From 041f602d30c9d23fc2ac61c948513dc30a67f28c Mon Sep 17 00:00:00 2001 From: Vasily Ilin Date: Fri, 27 Nov 2026 12:19:43 +0000 Subject: [PATCH 1/7] Import characterizations of function spaces --- LeanPool/FunctionSpaces.lean | 248 +++ .../Analysis/Differences/Differences.lean | 441 +++++ .../Analysis/Differences/DomainModuli.lean | 479 ++++++ .../Differences/TranslationAlgebra.lean | 190 +++ .../Analysis/Fourier/ApproxIdentity.lean | 533 ++++++ .../Analysis/Fourier/Convolution.lean | 467 ++++++ .../Fourier/LittlewoodPaleyKernels.lean | 769 +++++++++ .../Analysis/Fourier/SchwartzCutoff.lean | 430 +++++ .../Analysis/Lp/BoundedContinuous.lean | 100 ++ .../FunctionSpaces/Analysis/Lp/Inclusion.lean | 154 ++ .../Analysis/Lp/IndicatorOperator.lean | 242 +++ .../Analysis/Lp/Interpolation.lean | 135 ++ .../FunctionSpaces/Analysis/Lp/LayerCake.lean | 238 +++ .../Analysis/Lp/LintegralForm.lean | 100 ++ .../Analysis/Lp/Marcinkiewicz.lean | 726 ++++++++ .../Analysis/Lp/MixedNorms.lean | 815 +++++++++ .../Analysis/Lp/NormingFamily.lean | 305 ++++ .../FunctionSpaces/Analysis/Lp/WeakType.lean | 220 +++ .../FunctionSpaces/Analysis/Lp/Young.lean | 300 ++++ .../Analysis/Maximal/CalderonZygmund.lean | 279 ++++ .../Maximal/CalderonZygmundSigned.lean | 382 +++++ .../Analysis/Maximal/DyadicCubes.lean | 294 ++++ .../Analysis/Maximal/DyadicGrid.lean | 359 ++++ .../Analysis/Maximal/FeffermanStein.lean | 933 +++++++++++ .../Maximal/HardyLittlewoodMaximal.lean | 798 +++++++++ .../FunctionSpaces/ApproximationSpaces.lean | 231 +++ .../Decompositions/Atomic.lean | 186 +++ .../Decompositions/Blocks.lean | 380 +++++ .../Decompositions/Projection.lean | 250 +++ .../Decompositions/Synthesis.lean | 160 ++ .../ApproximationSpaces/Dyadic.lean | 342 ++++ .../ApproximationSpaces/Embedding.lean | 133 ++ .../ApproximationSpaces/Error.lean | 255 +++ .../ApproximationSpaces/Instances/NTerm.lean | 89 + .../Instances/NTermHilbertBasis.lean | 475 ++++++ .../ApproximationSpaces/Instances/Span.lean | 72 + .../Interpolation/ApproxSpaces.lean | 572 +++++++ .../Interpolation/Couple.lean | 748 +++++++++ .../Interpolation/EFunctional.lean | 723 ++++++++ .../Interpolation/EFunctionalModuli.lean | 503 ++++++ .../Interpolation/KFunctional.lean | 187 +++ .../Interpolation/KMethod.lean | 706 ++++++++ .../Interpolation/Property.lean | 474 ++++++ .../Interpolation/Reiteration.lean | 781 +++++++++ .../Interpolation/Representation.lean | 247 +++ .../ApproximationSpaces/Jackson.lean | 145 ++ .../ApproximationSpaces/Lift.lean | 414 +++++ .../ApproximationSpaces/Moduli.lean | 424 +++++ .../ApproximationSpaces/Nikolskii.lean | 157 ++ .../ApproximationSpaces/Norm.lean | 133 ++ .../ApproximationSpaces/Retract.lean | 163 ++ .../ApproximationSpaces/Scheme.lean | 257 +++ .../ApproximationSpaces/Sequences/Dyadic.lean | 665 ++++++++ .../ApproximationSpaces/Sequences/Hardy.lean | 592 +++++++ .../ApproximationSpaces/Sequences/Lq.lean | 1408 ++++++++++++++++ .../Sequences/Rearrangement.lean | 261 +++ .../ApproximationSpaces/Space.lean | 158 ++ .../ApproximationSpaces/Trace.lean | 542 ++++++ .../ApproximationSpaces/Transfer.lean | 76 + .../FunctionSpaces/Domains/Cube/Basic.lean | 271 +++ .../Domains/Cube/IsoCoincidence.lean | 344 ++++ .../Domains/Cube/IsoDifferences.lean | 157 ++ .../Domains/Cube/IsoInverse.lean | 289 ++++ .../Domains/Cube/IsoModulus.lean | 295 ++++ .../FunctionSpaces/Domains/Cube/Modulus.lean | 281 ++++ .../Domains/Cube/PiecewiseInverse.lean | 100 ++ .../Domains/Cube/PiecewiseJackson.lean | 371 +++++ .../Domains/Cube/PiecewisePoly.lean | 349 ++++ .../Domains/Cube/SlicewiseOperators.lean | 628 +++++++ .../Domains/Cube/Smoothing.lean | 305 ++++ .../Domains/Cube/SplineInverse.lean | 112 ++ .../Domains/Cube/SplineJackson.lean | 108 ++ .../FunctionSpaces/Domains/Cube/Splines.lean | 323 ++++ .../Extension/HalfSpaceReflection.lean | 769 +++++++++ .../Extension/HigherDivergenceKernels.lean | 1002 ++++++++++++ .../Extension/HigherSobolevExtension.lean | 670 ++++++++ .../Extension/LipschitzGraphBesov.lean | 277 ++++ .../Domains/Extension/LocalExtension.lean | 363 ++++ .../Extension/ReflectionExtension.lean | 688 ++++++++ .../ReflectionExtensionOperator.lean | 433 +++++ .../Domains/Extension/RychkovExtension.lean | 311 ++++ .../Domains/Extension/SobolevExtension.lean | 854 ++++++++++ .../Extension/SobolevExtensionOperator.lean | 513 ++++++ .../Domains/Interval/BSpline.lean | 557 +++++++ .../Domains/Interval/Differences.lean | 173 ++ .../Domains/Interval/LocalProjection.lean | 562 +++++++ .../Domains/Interval/LowerDifferences.lean | 516 ++++++ .../Domains/Interval/Modulus.lean | 359 ++++ .../Domains/Interval/Periodic.lean | 226 +++ .../Domains/Interval/PiecewiseInverse.lean | 459 ++++++ .../Domains/Interval/PiecewiseJackson.lean | 350 ++++ .../Domains/Interval/PiecewisePeriodic.lean | 235 +++ .../Domains/Interval/PiecewisePoly.lean | 469 ++++++ .../Domains/Interval/PolyDifferences.lean | 176 ++ .../Domains/Interval/Polynomials.lean | 317 ++++ .../Domains/Interval/QuasiInterp.lean | 422 +++++ .../Domains/Interval/Smoothing.lean | 518 ++++++ .../Domains/Interval/SplineInverse.lean | 456 ++++++ .../Domains/Interval/SplineJackson.lean | 647 ++++++++ .../Domains/Interval/SplinePeriodic.lean | 262 +++ .../Interval/SplinePeriodicJackson.lean | 480 ++++++ .../Domains/Interval/Splines.lean | 392 +++++ .../Domains/Interval/Steklov.lean | 183 +++ .../Domains/Interval/Taylor.lean | 132 ++ .../Domains/Interval/Whitney.lean | 179 ++ .../Lipschitz/BesovDomainLocalisation.lean | 225 +++ .../Domains/Lipschitz/BesovDomains.lean | 356 ++++ .../Domains/Lipschitz/BoundedLipschitz.lean | 715 ++++++++ .../Domains/Lipschitz/ConvexDomains.lean | 374 +++++ .../Lipschitz/GraphParametrization.lean | 285 ++++ .../Domains/Lipschitz/GraphStraightening.lean | 277 ++++ .../Domains/Lipschitz/HalfSpace.lean | 198 +++ .../Domains/Lipschitz/LipschitzGraph.lean | 478 ++++++ .../Domains/Lipschitz/LipschitzGraphArea.lean | 892 ++++++++++ .../Lipschitz/LocalLipschitzGraphs.lean | 547 +++++++ .../Domains/Lipschitz/SurfaceMeasure.lean | 579 +++++++ .../Domains/Manifolds/Besov.lean | 438 +++++ .../Domains/Manifolds/BesovAtlas.lean | 681 ++++++++ .../Domains/Manifolds/BoundaryBesov.lean | 347 ++++ .../Domains/Manifolds/BoundaryTrace.lean | 550 +++++++ .../Domains/Manifolds/ChartSobolev.lean | 433 +++++ .../Domains/Manifolds/SmoothDomain.lean | 420 +++++ .../Domains/Manifolds/SmoothDomainBesov.lean | 510 ++++++ .../Domains/Manifolds/SmoothLocalGraphs.lean | 316 ++++ .../Domains/Manifolds/SmoothMeasure.lean | 318 ++++ .../Manifolds/SmoothMeasureExistence.lean | 303 ++++ .../Domains/Sobolev/LipschitzDomainGreen.lean | 917 +++++++++++ .../Domains/Sobolev/LipschitzDomainH1.lean | 293 ++++ .../Domains/Sobolev/LipschitzDomainW1p.lean | 156 ++ .../Domains/Sobolev/LipschitzGraphGreen.lean | 766 +++++++++ .../Domains/Sobolev/SobolevDuality.lean | 573 +++++++ .../Sobolev/SobolevRestrictionSpaces.lean | 916 +++++++++++ .../Domains/Spectral/ChartFormEigenbasis.lean | 413 +++++ .../Domains/Spectral/DirichletEigenbasis.lean | 392 +++++ .../Spectral/ManifoldSpectralBesov.lean | 330 ++++ .../Domains/Spectral/NeumannEigenbasis.lean | 561 +++++++ .../Domains/Spectral/SpectralBesov.lean | 365 +++++ .../Domains/Traces/BoundaryBesovNorm.lean | 371 +++++ .../Domains/Traces/BoundaryGagliardo.lean | 942 +++++++++++ .../Domains/Traces/BoundaryTraceSpace.lean | 724 ++++++++ .../Domains/Traces/GraphTrace.lean | 667 ++++++++ .../Domains/Traces/GraphTraceCharts.lean | 604 +++++++ .../Domains/Traces/GraphTraceExtension.lean | 775 +++++++++ .../Domains/Traces/HalfSpaceTrace.lean | 493 ++++++ .../Traces/LipschitzBoundaryTrace.lean | 677 ++++++++ .../Domains/Traces/MollifiedGraph.lean | 620 +++++++ .../Domains/Traces/TraceKernel.lean | 483 ++++++ .../Domains/Traces/TraceSpaceNorm.lean | 538 ++++++ LeanPool/FunctionSpaces/Imports.lean | 297 ++++ .../MeasureSpaces/Besov/Basic.lean | 63 + .../Besov/ElementaryEmbeddings.lean | 71 + .../MeasureSpaces/Besov/Embeddings.lean | 111 ++ .../MeasureSpaces/Besov/Interpolation.lean | 137 ++ .../MeasureSpaces/Besov/Nikolskii.lean | 287 ++++ .../MeasureSpaces/Martingales/Filtration.lean | 177 ++ .../MeasureSpaces/Martingales/Partition.lean | 86 + .../FunctionSpaces/MeasureSpaces/Scheme.lean | 109 ++ .../MeasureSpaces/Sobolev/Embeddings.lean | 100 ++ .../MeasureSpaces/Spectral/Basic.lean | 295 ++++ .../MeasureSpaces/Spectral/Blocks.lean | 259 +++ .../Spectral/CompactEigenbasis.lean | 216 +++ .../Spectral/CompactEmbedding.lean | 566 +++++++ .../Spectral/ContinuousSpectralBasis.lean | 183 +++ .../MeasureSpaces/Spectral/LocalWeyl.lean | 304 ++++ .../Rd/Approximation/BandInverse.lean | 346 ++++ .../Rd/Approximation/BandJackson.lean | 248 +++ .../Rd/Approximation/BandLimited.lean | 89 + .../FunctionSpaces/Rd/Atoms/AtomAnalysis.lean | 613 +++++++ .../Rd/Atoms/AtomComposition.lean | 424 +++++ .../Rd/Atoms/AtomSynthesis.lean | 661 ++++++++ .../Rd/Atoms/DiffeoInvariance.lean | 602 +++++++ .../FunctionSpaces/Rd/Atoms/SmoothAtoms.lean | 485 ++++++ .../BesselPotentialDistributions.lean | 214 +++ .../BesselPotentialEmbedding.lean | 88 + .../BesselPotentialLifting.lean | 534 ++++++ .../UniformSchwartzFamilies.lean | 528 ++++++ .../Rd/Differences/BesovDifferences.lean | 153 ++ .../Rd/Differences/ConvexDifferences.lean | 197 +++ .../Rd/Differences/DilatedDifferences.lean | 113 ++ .../Rd/Differences/MomentKernels.lean | 381 +++++ .../Rd/Differences/PointwiseMultipliers.lean | 550 +++++++ .../Rd/Differences/SobolevSlobodeckij.lean | 954 +++++++++++ .../BesselPotentialMultipliers.lean | 158 ++ .../FourierMultipliers/MihlinMultipliers.lean | 152 ++ .../Rd/FourierMultipliers/SymbolKernels.lean | 540 ++++++ .../TriebelLizorkinMultipliers.lean | 194 +++ .../Rd/Interpolation/BesovInterpolation.lean | 106 ++ .../BesselPotentialInterpolation.lean | 246 +++ .../Interpolation/SobolevInterpolation.lean | 324 ++++ .../TriebelLizorkinInterpolation.lean | 149 ++ .../Rd/LittlewoodPaley/LittlewoodPaley.lean | 182 +++ .../Rd/LocalMeans/KernelMajorants.lean | 1455 +++++++++++++++++ .../Rd/LocalMeans/LocalMeans.lean | 657 ++++++++ .../Rd/MixedSmoothness/HyperbolicCross.lean | 332 ++++ .../MixedAveragedDifferences.lean | 312 ++++ .../Rd/MixedSmoothness/MixedDifferences.lean | 313 ++++ .../MixedSmoothness/MixedLittlewoodPaley.lean | 392 +++++ .../Rd/MixedSmoothness/MixedLocalMeans.lean | 552 +++++++ .../Rd/MixedSmoothness/MixedSequences.lean | 252 +++ .../Rd/MixedSmoothness/TensorKernels.lean | 194 +++ .../SingularIntegrals/ConvolutionAdjoint.lean | 431 +++++ .../SingularIntegrals/DilationFamilies.lean | 924 +++++++++++ .../SingularIntegrals/PlancherelBounds.lean | 222 +++ .../VectorValuedSingularIntegrals.lean | 526 ++++++ .../VectorValuedWeakType.lean | 486 ++++++ .../Rd/Sobolev/CriticalSobolevEmbedding.lean | 345 ++++ .../Rd/Sobolev/DerivativeKernels.lean | 468 ++++++ .../Rd/Sobolev/DivergenceKernels.lean | 668 ++++++++ .../Rd/Sobolev/GagliardoNirenbergSobolev.lean | 457 ++++++ .../Rd/Sobolev/RellichCompactness.lean | 566 +++++++ .../Rd/Sobolev/SobolevEmbedding.lean | 504 ++++++ .../Rd/Sobolev/SobolevJets.lean | 236 +++ .../Rd/Sobolev/SobolevTriebelLizorkin.lean | 534 ++++++ .../Rd/Sobolev/SobolevTwoLittlewoodPaley.lean | 907 ++++++++++ .../WeakDerivativeChangeOfVariables.lean | 837 ++++++++++ .../Rd/Sobolev/WeakDerivativeLeibniz.lean | 516 ++++++ .../Rd/Sobolev/WeakDerivatives.lean | 690 ++++++++ .../LittlewoodPaleyFamilies.lean | 387 +++++ .../Rd/TriebelLizorkin/SquareFunction.lean | 173 ++ .../Rd/TriebelLizorkin/TriebelLizorkin.lean | 458 ++++++ .../TriebelLizorkin/TriebelLizorkinAtoms.lean | 804 +++++++++ .../TriebelLizorkinDifferences.lean | 1100 +++++++++++++ .../TriebelLizorkinDistributions.lean | 539 ++++++ .../TriebelLizorkinLocalMeans.lean | 511 ++++++ .../Torus/BesovInterpolation.lean | 65 + .../FunctionSpaces/Torus/BesovModuli.lean | 260 +++ .../FunctionSpaces/Torus/Coefficients.lean | 79 + LeanPool/FunctionSpaces/Torus/Embeddings.lean | 118 ++ .../Torus/EuclideanConvolution.lean | 574 +++++++ .../Torus/EuclideanConvolutionIdentities.lean | 233 +++ .../FunctionSpaces/Torus/FeffermanStein.lean | 184 +++ .../Torus/FourierSpectralBasis.lean | 103 ++ .../FunctionSpaces/Torus/HaarMeasure.lean | 66 + .../FunctionSpaces/Torus/LittlewoodPaley.lean | 214 +++ .../FunctionSpaces/Torus/LpBesovModuli.lean | 96 ++ .../Torus/LpFourierCoefficients.lean | 267 +++ LeanPool/FunctionSpaces/Torus/LpJackson.lean | 344 ++++ .../Torus/LpWeakDerivatives.lean | 379 +++++ LeanPool/FunctionSpaces/Torus/Modulus.lean | 319 ++++ .../FunctionSpaces/Torus/NTermFourier.lean | 61 + LeanPool/FunctionSpaces/Torus/Nikolskii.lean | 234 +++ .../Torus/PeriodicDistributions.lean | 387 +++++ .../FunctionSpaces/Torus/PeriodicLift.lean | 380 +++++ .../Torus/SingularIntegrals.lean | 376 +++++ LeanPool/FunctionSpaces/Torus/Sobolev.lean | 107 ++ .../Torus/SobolevEmbedding.lean | 87 + .../Torus/SobolevTriebelLizorkin.lean | 481 ++++++ .../FunctionSpaces/Torus/SquareFunction.lean | 168 ++ LeanPool/FunctionSpaces/Torus/Trace.lean | 553 +++++++ .../FunctionSpaces/Torus/TraceContinuous.lean | 266 +++ .../FunctionSpaces/Torus/Translation.lean | 150 ++ .../FunctionSpaces/Torus/TriebelLizorkin.lean | 362 ++++ .../Torus/TriebelLizorkinInterpolation.lean | 137 ++ .../Torus/TriebelLizorkinLocalMeans.lean | 436 +++++ .../FunctionSpaces/Torus/TrigPolynomials.lean | 236 +++ .../FunctionSpaces/Torus/WeakDerivatives.lean | 204 +++ .../Wavelets/DyadicNormalisation.lean | 42 + .../Examples/Daubechies/Bernstein.lean | 369 +++++ .../Wavelets/Examples/Daubechies/Besov.lean | 375 +++++ .../Wavelets/Examples/Daubechies/Cascade.lean | 325 ++++ .../Wavelets/Examples/Daubechies/D4.lean | 134 ++ .../Wavelets/Examples/Daubechies/D4Besov.lean | 200 +++ .../Daubechies/DaubechiesPolynomial.lean | 356 ++++ .../Examples/Daubechies/Expansion.lean | 757 +++++++++ .../Examples/Daubechies/ExpansionScaling.lean | 126 ++ .../Examples/Daubechies/FejerRiesz.lean | 458 ++++++ .../Examples/Daubechies/FilterIdentities.lean | 794 +++++++++ .../Daubechies/FourierIntegrable.lean | 293 ++++ .../Examples/Daubechies/HolderRegularity.lean | 490 ++++++ .../Wavelets/Examples/Daubechies/Jackson.lean | 481 ++++++ .../Examples/Daubechies/JacksonSmoothing.lean | 171 ++ .../Wavelets/Examples/Daubechies/Mask.lean | 401 +++++ .../Examples/Daubechies/MaskExistence.lean | 268 +++ .../Examples/Daubechies/MatrixMethod.lean | 347 ++++ .../Examples/Daubechies/MatrixMethodD4.lean | 477 ++++++ .../Examples/Daubechies/OrderThree.lean | 312 ++++ .../Examples/Daubechies/Orthonormality.lean | 365 +++++ .../Daubechies/PolynomialReproduction.lean | 276 ++++ .../Examples/Daubechies/Projections.lean | 920 +++++++++++ .../Examples/Daubechies/ScalingFunction.lean | 179 ++ .../Examples/Daubechies/ScalingMoments.lean | 325 ++++ .../Daubechies/SobolevRegularity.lean | 516 ++++++ .../Examples/Daubechies/SymbolDecay.lean | 405 +++++ .../Examples/Daubechies/SymbolProduct.lean | 465 ++++++ .../Examples/Daubechies/TransferExamples.lean | 240 +++ .../Examples/Daubechies/TransferOperator.lean | 335 ++++ .../Wavelets/Examples/Daubechies/Wavelet.lean | 757 +++++++++ .../Examples/DyadicStepsQuasiBanach.lean | 694 ++++++++ .../Wavelets/Examples/Haar.lean | 485 ++++++ .../Wavelets/Examples/HaarBesov.lean | 152 ++ LeanPool/projects/function-spaces.yaml | 54 + 291 files changed, 114057 insertions(+) create mode 100644 LeanPool/FunctionSpaces.lean create mode 100644 LeanPool/FunctionSpaces/Analysis/Differences/Differences.lean create mode 100644 LeanPool/FunctionSpaces/Analysis/Differences/DomainModuli.lean create mode 100644 LeanPool/FunctionSpaces/Analysis/Differences/TranslationAlgebra.lean create mode 100644 LeanPool/FunctionSpaces/Analysis/Fourier/ApproxIdentity.lean create mode 100644 LeanPool/FunctionSpaces/Analysis/Fourier/Convolution.lean create mode 100644 LeanPool/FunctionSpaces/Analysis/Fourier/LittlewoodPaleyKernels.lean create mode 100644 LeanPool/FunctionSpaces/Analysis/Fourier/SchwartzCutoff.lean create mode 100644 LeanPool/FunctionSpaces/Analysis/Lp/BoundedContinuous.lean create mode 100644 LeanPool/FunctionSpaces/Analysis/Lp/Inclusion.lean create mode 100644 LeanPool/FunctionSpaces/Analysis/Lp/IndicatorOperator.lean create mode 100644 LeanPool/FunctionSpaces/Analysis/Lp/Interpolation.lean create mode 100644 LeanPool/FunctionSpaces/Analysis/Lp/LayerCake.lean create mode 100644 LeanPool/FunctionSpaces/Analysis/Lp/LintegralForm.lean create mode 100644 LeanPool/FunctionSpaces/Analysis/Lp/Marcinkiewicz.lean create mode 100644 LeanPool/FunctionSpaces/Analysis/Lp/MixedNorms.lean create mode 100644 LeanPool/FunctionSpaces/Analysis/Lp/NormingFamily.lean create mode 100644 LeanPool/FunctionSpaces/Analysis/Lp/WeakType.lean create mode 100644 LeanPool/FunctionSpaces/Analysis/Lp/Young.lean create mode 100644 LeanPool/FunctionSpaces/Analysis/Maximal/CalderonZygmund.lean create mode 100644 LeanPool/FunctionSpaces/Analysis/Maximal/CalderonZygmundSigned.lean create mode 100644 LeanPool/FunctionSpaces/Analysis/Maximal/DyadicCubes.lean create mode 100644 LeanPool/FunctionSpaces/Analysis/Maximal/DyadicGrid.lean create mode 100644 LeanPool/FunctionSpaces/Analysis/Maximal/FeffermanStein.lean create mode 100644 LeanPool/FunctionSpaces/Analysis/Maximal/HardyLittlewoodMaximal.lean create mode 100644 LeanPool/FunctionSpaces/ApproximationSpaces.lean create mode 100644 LeanPool/FunctionSpaces/ApproximationSpaces/Decompositions/Atomic.lean create mode 100644 LeanPool/FunctionSpaces/ApproximationSpaces/Decompositions/Blocks.lean create mode 100644 LeanPool/FunctionSpaces/ApproximationSpaces/Decompositions/Projection.lean create mode 100644 LeanPool/FunctionSpaces/ApproximationSpaces/Decompositions/Synthesis.lean create mode 100644 LeanPool/FunctionSpaces/ApproximationSpaces/Dyadic.lean create mode 100644 LeanPool/FunctionSpaces/ApproximationSpaces/Embedding.lean create mode 100644 LeanPool/FunctionSpaces/ApproximationSpaces/Error.lean create mode 100644 LeanPool/FunctionSpaces/ApproximationSpaces/Instances/NTerm.lean create mode 100644 LeanPool/FunctionSpaces/ApproximationSpaces/Instances/NTermHilbertBasis.lean create mode 100644 LeanPool/FunctionSpaces/ApproximationSpaces/Instances/Span.lean create mode 100644 LeanPool/FunctionSpaces/ApproximationSpaces/Interpolation/ApproxSpaces.lean create mode 100644 LeanPool/FunctionSpaces/ApproximationSpaces/Interpolation/Couple.lean create mode 100644 LeanPool/FunctionSpaces/ApproximationSpaces/Interpolation/EFunctional.lean create mode 100644 LeanPool/FunctionSpaces/ApproximationSpaces/Interpolation/EFunctionalModuli.lean create mode 100644 LeanPool/FunctionSpaces/ApproximationSpaces/Interpolation/KFunctional.lean create mode 100644 LeanPool/FunctionSpaces/ApproximationSpaces/Interpolation/KMethod.lean create mode 100644 LeanPool/FunctionSpaces/ApproximationSpaces/Interpolation/Property.lean create mode 100644 LeanPool/FunctionSpaces/ApproximationSpaces/Interpolation/Reiteration.lean create mode 100644 LeanPool/FunctionSpaces/ApproximationSpaces/Interpolation/Representation.lean create mode 100644 LeanPool/FunctionSpaces/ApproximationSpaces/Jackson.lean create mode 100644 LeanPool/FunctionSpaces/ApproximationSpaces/Lift.lean create mode 100644 LeanPool/FunctionSpaces/ApproximationSpaces/Moduli.lean create mode 100644 LeanPool/FunctionSpaces/ApproximationSpaces/Nikolskii.lean create mode 100644 LeanPool/FunctionSpaces/ApproximationSpaces/Norm.lean create mode 100644 LeanPool/FunctionSpaces/ApproximationSpaces/Retract.lean create mode 100644 LeanPool/FunctionSpaces/ApproximationSpaces/Scheme.lean create mode 100644 LeanPool/FunctionSpaces/ApproximationSpaces/Sequences/Dyadic.lean create mode 100644 LeanPool/FunctionSpaces/ApproximationSpaces/Sequences/Hardy.lean create mode 100644 LeanPool/FunctionSpaces/ApproximationSpaces/Sequences/Lq.lean create mode 100644 LeanPool/FunctionSpaces/ApproximationSpaces/Sequences/Rearrangement.lean create mode 100644 LeanPool/FunctionSpaces/ApproximationSpaces/Space.lean create mode 100644 LeanPool/FunctionSpaces/ApproximationSpaces/Trace.lean create mode 100644 LeanPool/FunctionSpaces/ApproximationSpaces/Transfer.lean create mode 100644 LeanPool/FunctionSpaces/Domains/Cube/Basic.lean create mode 100644 LeanPool/FunctionSpaces/Domains/Cube/IsoCoincidence.lean create mode 100644 LeanPool/FunctionSpaces/Domains/Cube/IsoDifferences.lean create mode 100644 LeanPool/FunctionSpaces/Domains/Cube/IsoInverse.lean create mode 100644 LeanPool/FunctionSpaces/Domains/Cube/IsoModulus.lean create mode 100644 LeanPool/FunctionSpaces/Domains/Cube/Modulus.lean create mode 100644 LeanPool/FunctionSpaces/Domains/Cube/PiecewiseInverse.lean create mode 100644 LeanPool/FunctionSpaces/Domains/Cube/PiecewiseJackson.lean create mode 100644 LeanPool/FunctionSpaces/Domains/Cube/PiecewisePoly.lean create mode 100644 LeanPool/FunctionSpaces/Domains/Cube/SlicewiseOperators.lean create mode 100644 LeanPool/FunctionSpaces/Domains/Cube/Smoothing.lean create mode 100644 LeanPool/FunctionSpaces/Domains/Cube/SplineInverse.lean create mode 100644 LeanPool/FunctionSpaces/Domains/Cube/SplineJackson.lean create mode 100644 LeanPool/FunctionSpaces/Domains/Cube/Splines.lean create mode 100644 LeanPool/FunctionSpaces/Domains/Extension/HalfSpaceReflection.lean create mode 100644 LeanPool/FunctionSpaces/Domains/Extension/HigherDivergenceKernels.lean create mode 100644 LeanPool/FunctionSpaces/Domains/Extension/HigherSobolevExtension.lean create mode 100644 LeanPool/FunctionSpaces/Domains/Extension/LipschitzGraphBesov.lean create mode 100644 LeanPool/FunctionSpaces/Domains/Extension/LocalExtension.lean create mode 100644 LeanPool/FunctionSpaces/Domains/Extension/ReflectionExtension.lean create mode 100644 LeanPool/FunctionSpaces/Domains/Extension/ReflectionExtensionOperator.lean create mode 100644 LeanPool/FunctionSpaces/Domains/Extension/RychkovExtension.lean create mode 100644 LeanPool/FunctionSpaces/Domains/Extension/SobolevExtension.lean create mode 100644 LeanPool/FunctionSpaces/Domains/Extension/SobolevExtensionOperator.lean create mode 100644 LeanPool/FunctionSpaces/Domains/Interval/BSpline.lean create mode 100644 LeanPool/FunctionSpaces/Domains/Interval/Differences.lean create mode 100644 LeanPool/FunctionSpaces/Domains/Interval/LocalProjection.lean create mode 100644 LeanPool/FunctionSpaces/Domains/Interval/LowerDifferences.lean create mode 100644 LeanPool/FunctionSpaces/Domains/Interval/Modulus.lean create mode 100644 LeanPool/FunctionSpaces/Domains/Interval/Periodic.lean create mode 100644 LeanPool/FunctionSpaces/Domains/Interval/PiecewiseInverse.lean create mode 100644 LeanPool/FunctionSpaces/Domains/Interval/PiecewiseJackson.lean create mode 100644 LeanPool/FunctionSpaces/Domains/Interval/PiecewisePeriodic.lean create mode 100644 LeanPool/FunctionSpaces/Domains/Interval/PiecewisePoly.lean create mode 100644 LeanPool/FunctionSpaces/Domains/Interval/PolyDifferences.lean create mode 100644 LeanPool/FunctionSpaces/Domains/Interval/Polynomials.lean create mode 100644 LeanPool/FunctionSpaces/Domains/Interval/QuasiInterp.lean create mode 100644 LeanPool/FunctionSpaces/Domains/Interval/Smoothing.lean create mode 100644 LeanPool/FunctionSpaces/Domains/Interval/SplineInverse.lean create mode 100644 LeanPool/FunctionSpaces/Domains/Interval/SplineJackson.lean create mode 100644 LeanPool/FunctionSpaces/Domains/Interval/SplinePeriodic.lean create mode 100644 LeanPool/FunctionSpaces/Domains/Interval/SplinePeriodicJackson.lean create mode 100644 LeanPool/FunctionSpaces/Domains/Interval/Splines.lean create mode 100644 LeanPool/FunctionSpaces/Domains/Interval/Steklov.lean create mode 100644 LeanPool/FunctionSpaces/Domains/Interval/Taylor.lean create mode 100644 LeanPool/FunctionSpaces/Domains/Interval/Whitney.lean create mode 100644 LeanPool/FunctionSpaces/Domains/Lipschitz/BesovDomainLocalisation.lean create mode 100644 LeanPool/FunctionSpaces/Domains/Lipschitz/BesovDomains.lean create mode 100644 LeanPool/FunctionSpaces/Domains/Lipschitz/BoundedLipschitz.lean create mode 100644 LeanPool/FunctionSpaces/Domains/Lipschitz/ConvexDomains.lean create mode 100644 LeanPool/FunctionSpaces/Domains/Lipschitz/GraphParametrization.lean create mode 100644 LeanPool/FunctionSpaces/Domains/Lipschitz/GraphStraightening.lean create mode 100644 LeanPool/FunctionSpaces/Domains/Lipschitz/HalfSpace.lean create mode 100644 LeanPool/FunctionSpaces/Domains/Lipschitz/LipschitzGraph.lean create mode 100644 LeanPool/FunctionSpaces/Domains/Lipschitz/LipschitzGraphArea.lean create mode 100644 LeanPool/FunctionSpaces/Domains/Lipschitz/LocalLipschitzGraphs.lean create mode 100644 LeanPool/FunctionSpaces/Domains/Lipschitz/SurfaceMeasure.lean create mode 100644 LeanPool/FunctionSpaces/Domains/Manifolds/Besov.lean create mode 100644 LeanPool/FunctionSpaces/Domains/Manifolds/BesovAtlas.lean create mode 100644 LeanPool/FunctionSpaces/Domains/Manifolds/BoundaryBesov.lean create mode 100644 LeanPool/FunctionSpaces/Domains/Manifolds/BoundaryTrace.lean create mode 100644 LeanPool/FunctionSpaces/Domains/Manifolds/ChartSobolev.lean create mode 100644 LeanPool/FunctionSpaces/Domains/Manifolds/SmoothDomain.lean create mode 100644 LeanPool/FunctionSpaces/Domains/Manifolds/SmoothDomainBesov.lean create mode 100644 LeanPool/FunctionSpaces/Domains/Manifolds/SmoothLocalGraphs.lean create mode 100644 LeanPool/FunctionSpaces/Domains/Manifolds/SmoothMeasure.lean create mode 100644 LeanPool/FunctionSpaces/Domains/Manifolds/SmoothMeasureExistence.lean create mode 100644 LeanPool/FunctionSpaces/Domains/Sobolev/LipschitzDomainGreen.lean create mode 100644 LeanPool/FunctionSpaces/Domains/Sobolev/LipschitzDomainH1.lean create mode 100644 LeanPool/FunctionSpaces/Domains/Sobolev/LipschitzDomainW1p.lean create mode 100644 LeanPool/FunctionSpaces/Domains/Sobolev/LipschitzGraphGreen.lean create mode 100644 LeanPool/FunctionSpaces/Domains/Sobolev/SobolevDuality.lean create mode 100644 LeanPool/FunctionSpaces/Domains/Sobolev/SobolevRestrictionSpaces.lean create mode 100644 LeanPool/FunctionSpaces/Domains/Spectral/ChartFormEigenbasis.lean create mode 100644 LeanPool/FunctionSpaces/Domains/Spectral/DirichletEigenbasis.lean create mode 100644 LeanPool/FunctionSpaces/Domains/Spectral/ManifoldSpectralBesov.lean create mode 100644 LeanPool/FunctionSpaces/Domains/Spectral/NeumannEigenbasis.lean create mode 100644 LeanPool/FunctionSpaces/Domains/Spectral/SpectralBesov.lean create mode 100644 LeanPool/FunctionSpaces/Domains/Traces/BoundaryBesovNorm.lean create mode 100644 LeanPool/FunctionSpaces/Domains/Traces/BoundaryGagliardo.lean create mode 100644 LeanPool/FunctionSpaces/Domains/Traces/BoundaryTraceSpace.lean create mode 100644 LeanPool/FunctionSpaces/Domains/Traces/GraphTrace.lean create mode 100644 LeanPool/FunctionSpaces/Domains/Traces/GraphTraceCharts.lean create mode 100644 LeanPool/FunctionSpaces/Domains/Traces/GraphTraceExtension.lean create mode 100644 LeanPool/FunctionSpaces/Domains/Traces/HalfSpaceTrace.lean create mode 100644 LeanPool/FunctionSpaces/Domains/Traces/LipschitzBoundaryTrace.lean create mode 100644 LeanPool/FunctionSpaces/Domains/Traces/MollifiedGraph.lean create mode 100644 LeanPool/FunctionSpaces/Domains/Traces/TraceKernel.lean create mode 100644 LeanPool/FunctionSpaces/Domains/Traces/TraceSpaceNorm.lean create mode 100644 LeanPool/FunctionSpaces/Imports.lean create mode 100644 LeanPool/FunctionSpaces/MeasureSpaces/Besov/Basic.lean create mode 100644 LeanPool/FunctionSpaces/MeasureSpaces/Besov/ElementaryEmbeddings.lean create mode 100644 LeanPool/FunctionSpaces/MeasureSpaces/Besov/Embeddings.lean create mode 100644 LeanPool/FunctionSpaces/MeasureSpaces/Besov/Interpolation.lean create mode 100644 LeanPool/FunctionSpaces/MeasureSpaces/Besov/Nikolskii.lean create mode 100644 LeanPool/FunctionSpaces/MeasureSpaces/Martingales/Filtration.lean create mode 100644 LeanPool/FunctionSpaces/MeasureSpaces/Martingales/Partition.lean create mode 100644 LeanPool/FunctionSpaces/MeasureSpaces/Scheme.lean create mode 100644 LeanPool/FunctionSpaces/MeasureSpaces/Sobolev/Embeddings.lean create mode 100644 LeanPool/FunctionSpaces/MeasureSpaces/Spectral/Basic.lean create mode 100644 LeanPool/FunctionSpaces/MeasureSpaces/Spectral/Blocks.lean create mode 100644 LeanPool/FunctionSpaces/MeasureSpaces/Spectral/CompactEigenbasis.lean create mode 100644 LeanPool/FunctionSpaces/MeasureSpaces/Spectral/CompactEmbedding.lean create mode 100644 LeanPool/FunctionSpaces/MeasureSpaces/Spectral/ContinuousSpectralBasis.lean create mode 100644 LeanPool/FunctionSpaces/MeasureSpaces/Spectral/LocalWeyl.lean create mode 100644 LeanPool/FunctionSpaces/Rd/Approximation/BandInverse.lean create mode 100644 LeanPool/FunctionSpaces/Rd/Approximation/BandJackson.lean create mode 100644 LeanPool/FunctionSpaces/Rd/Approximation/BandLimited.lean create mode 100644 LeanPool/FunctionSpaces/Rd/Atoms/AtomAnalysis.lean create mode 100644 LeanPool/FunctionSpaces/Rd/Atoms/AtomComposition.lean create mode 100644 LeanPool/FunctionSpaces/Rd/Atoms/AtomSynthesis.lean create mode 100644 LeanPool/FunctionSpaces/Rd/Atoms/DiffeoInvariance.lean create mode 100644 LeanPool/FunctionSpaces/Rd/Atoms/SmoothAtoms.lean create mode 100644 LeanPool/FunctionSpaces/Rd/BesselPotentials/BesselPotentialDistributions.lean create mode 100644 LeanPool/FunctionSpaces/Rd/BesselPotentials/BesselPotentialEmbedding.lean create mode 100644 LeanPool/FunctionSpaces/Rd/BesselPotentials/BesselPotentialLifting.lean create mode 100644 LeanPool/FunctionSpaces/Rd/BesselPotentials/UniformSchwartzFamilies.lean create mode 100644 LeanPool/FunctionSpaces/Rd/Differences/BesovDifferences.lean create mode 100644 LeanPool/FunctionSpaces/Rd/Differences/ConvexDifferences.lean create mode 100644 LeanPool/FunctionSpaces/Rd/Differences/DilatedDifferences.lean create mode 100644 LeanPool/FunctionSpaces/Rd/Differences/MomentKernels.lean create mode 100644 LeanPool/FunctionSpaces/Rd/Differences/PointwiseMultipliers.lean create mode 100644 LeanPool/FunctionSpaces/Rd/Differences/SobolevSlobodeckij.lean create mode 100644 LeanPool/FunctionSpaces/Rd/FourierMultipliers/BesselPotentialMultipliers.lean create mode 100644 LeanPool/FunctionSpaces/Rd/FourierMultipliers/MihlinMultipliers.lean create mode 100644 LeanPool/FunctionSpaces/Rd/FourierMultipliers/SymbolKernels.lean create mode 100644 LeanPool/FunctionSpaces/Rd/FourierMultipliers/TriebelLizorkinMultipliers.lean create mode 100644 LeanPool/FunctionSpaces/Rd/Interpolation/BesovInterpolation.lean create mode 100644 LeanPool/FunctionSpaces/Rd/Interpolation/BesselPotentialInterpolation.lean create mode 100644 LeanPool/FunctionSpaces/Rd/Interpolation/SobolevInterpolation.lean create mode 100644 LeanPool/FunctionSpaces/Rd/Interpolation/TriebelLizorkinInterpolation.lean create mode 100644 LeanPool/FunctionSpaces/Rd/LittlewoodPaley/LittlewoodPaley.lean create mode 100644 LeanPool/FunctionSpaces/Rd/LocalMeans/KernelMajorants.lean create mode 100644 LeanPool/FunctionSpaces/Rd/LocalMeans/LocalMeans.lean create mode 100644 LeanPool/FunctionSpaces/Rd/MixedSmoothness/HyperbolicCross.lean create mode 100644 LeanPool/FunctionSpaces/Rd/MixedSmoothness/MixedAveragedDifferences.lean create mode 100644 LeanPool/FunctionSpaces/Rd/MixedSmoothness/MixedDifferences.lean create mode 100644 LeanPool/FunctionSpaces/Rd/MixedSmoothness/MixedLittlewoodPaley.lean create mode 100644 LeanPool/FunctionSpaces/Rd/MixedSmoothness/MixedLocalMeans.lean create mode 100644 LeanPool/FunctionSpaces/Rd/MixedSmoothness/MixedSequences.lean create mode 100644 LeanPool/FunctionSpaces/Rd/MixedSmoothness/TensorKernels.lean create mode 100644 LeanPool/FunctionSpaces/Rd/SingularIntegrals/ConvolutionAdjoint.lean create mode 100644 LeanPool/FunctionSpaces/Rd/SingularIntegrals/DilationFamilies.lean create mode 100644 LeanPool/FunctionSpaces/Rd/SingularIntegrals/PlancherelBounds.lean create mode 100644 LeanPool/FunctionSpaces/Rd/SingularIntegrals/VectorValuedSingularIntegrals.lean create mode 100644 LeanPool/FunctionSpaces/Rd/SingularIntegrals/VectorValuedWeakType.lean create mode 100644 LeanPool/FunctionSpaces/Rd/Sobolev/CriticalSobolevEmbedding.lean create mode 100644 LeanPool/FunctionSpaces/Rd/Sobolev/DerivativeKernels.lean create mode 100644 LeanPool/FunctionSpaces/Rd/Sobolev/DivergenceKernels.lean create mode 100644 LeanPool/FunctionSpaces/Rd/Sobolev/GagliardoNirenbergSobolev.lean create mode 100644 LeanPool/FunctionSpaces/Rd/Sobolev/RellichCompactness.lean create mode 100644 LeanPool/FunctionSpaces/Rd/Sobolev/SobolevEmbedding.lean create mode 100644 LeanPool/FunctionSpaces/Rd/Sobolev/SobolevJets.lean create mode 100644 LeanPool/FunctionSpaces/Rd/Sobolev/SobolevTriebelLizorkin.lean create mode 100644 LeanPool/FunctionSpaces/Rd/Sobolev/SobolevTwoLittlewoodPaley.lean create mode 100644 LeanPool/FunctionSpaces/Rd/Sobolev/WeakDerivativeChangeOfVariables.lean create mode 100644 LeanPool/FunctionSpaces/Rd/Sobolev/WeakDerivativeLeibniz.lean create mode 100644 LeanPool/FunctionSpaces/Rd/Sobolev/WeakDerivatives.lean create mode 100644 LeanPool/FunctionSpaces/Rd/TriebelLizorkin/LittlewoodPaleyFamilies.lean create mode 100644 LeanPool/FunctionSpaces/Rd/TriebelLizorkin/SquareFunction.lean create mode 100644 LeanPool/FunctionSpaces/Rd/TriebelLizorkin/TriebelLizorkin.lean create mode 100644 LeanPool/FunctionSpaces/Rd/TriebelLizorkin/TriebelLizorkinAtoms.lean create mode 100644 LeanPool/FunctionSpaces/Rd/TriebelLizorkin/TriebelLizorkinDifferences.lean create mode 100644 LeanPool/FunctionSpaces/Rd/TriebelLizorkin/TriebelLizorkinDistributions.lean create mode 100644 LeanPool/FunctionSpaces/Rd/TriebelLizorkin/TriebelLizorkinLocalMeans.lean create mode 100644 LeanPool/FunctionSpaces/Torus/BesovInterpolation.lean create mode 100644 LeanPool/FunctionSpaces/Torus/BesovModuli.lean create mode 100644 LeanPool/FunctionSpaces/Torus/Coefficients.lean create mode 100644 LeanPool/FunctionSpaces/Torus/Embeddings.lean create mode 100644 LeanPool/FunctionSpaces/Torus/EuclideanConvolution.lean create mode 100644 LeanPool/FunctionSpaces/Torus/EuclideanConvolutionIdentities.lean create mode 100644 LeanPool/FunctionSpaces/Torus/FeffermanStein.lean create mode 100644 LeanPool/FunctionSpaces/Torus/FourierSpectralBasis.lean create mode 100644 LeanPool/FunctionSpaces/Torus/HaarMeasure.lean create mode 100644 LeanPool/FunctionSpaces/Torus/LittlewoodPaley.lean create mode 100644 LeanPool/FunctionSpaces/Torus/LpBesovModuli.lean create mode 100644 LeanPool/FunctionSpaces/Torus/LpFourierCoefficients.lean create mode 100644 LeanPool/FunctionSpaces/Torus/LpJackson.lean create mode 100644 LeanPool/FunctionSpaces/Torus/LpWeakDerivatives.lean create mode 100644 LeanPool/FunctionSpaces/Torus/Modulus.lean create mode 100644 LeanPool/FunctionSpaces/Torus/NTermFourier.lean create mode 100644 LeanPool/FunctionSpaces/Torus/Nikolskii.lean create mode 100644 LeanPool/FunctionSpaces/Torus/PeriodicDistributions.lean create mode 100644 LeanPool/FunctionSpaces/Torus/PeriodicLift.lean create mode 100644 LeanPool/FunctionSpaces/Torus/SingularIntegrals.lean create mode 100644 LeanPool/FunctionSpaces/Torus/Sobolev.lean create mode 100644 LeanPool/FunctionSpaces/Torus/SobolevEmbedding.lean create mode 100644 LeanPool/FunctionSpaces/Torus/SobolevTriebelLizorkin.lean create mode 100644 LeanPool/FunctionSpaces/Torus/SquareFunction.lean create mode 100644 LeanPool/FunctionSpaces/Torus/Trace.lean create mode 100644 LeanPool/FunctionSpaces/Torus/TraceContinuous.lean create mode 100644 LeanPool/FunctionSpaces/Torus/Translation.lean create mode 100644 LeanPool/FunctionSpaces/Torus/TriebelLizorkin.lean create mode 100644 LeanPool/FunctionSpaces/Torus/TriebelLizorkinInterpolation.lean create mode 100644 LeanPool/FunctionSpaces/Torus/TriebelLizorkinLocalMeans.lean create mode 100644 LeanPool/FunctionSpaces/Torus/TrigPolynomials.lean create mode 100644 LeanPool/FunctionSpaces/Torus/WeakDerivatives.lean create mode 100644 LeanPool/FunctionSpaces/Wavelets/DyadicNormalisation.lean create mode 100644 LeanPool/FunctionSpaces/Wavelets/Examples/Daubechies/Bernstein.lean create mode 100644 LeanPool/FunctionSpaces/Wavelets/Examples/Daubechies/Besov.lean create mode 100644 LeanPool/FunctionSpaces/Wavelets/Examples/Daubechies/Cascade.lean create mode 100644 LeanPool/FunctionSpaces/Wavelets/Examples/Daubechies/D4.lean create mode 100644 LeanPool/FunctionSpaces/Wavelets/Examples/Daubechies/D4Besov.lean create mode 100644 LeanPool/FunctionSpaces/Wavelets/Examples/Daubechies/DaubechiesPolynomial.lean create mode 100644 LeanPool/FunctionSpaces/Wavelets/Examples/Daubechies/Expansion.lean create mode 100644 LeanPool/FunctionSpaces/Wavelets/Examples/Daubechies/ExpansionScaling.lean create mode 100644 LeanPool/FunctionSpaces/Wavelets/Examples/Daubechies/FejerRiesz.lean create mode 100644 LeanPool/FunctionSpaces/Wavelets/Examples/Daubechies/FilterIdentities.lean create mode 100644 LeanPool/FunctionSpaces/Wavelets/Examples/Daubechies/FourierIntegrable.lean create mode 100644 LeanPool/FunctionSpaces/Wavelets/Examples/Daubechies/HolderRegularity.lean create mode 100644 LeanPool/FunctionSpaces/Wavelets/Examples/Daubechies/Jackson.lean create mode 100644 LeanPool/FunctionSpaces/Wavelets/Examples/Daubechies/JacksonSmoothing.lean create mode 100644 LeanPool/FunctionSpaces/Wavelets/Examples/Daubechies/Mask.lean create mode 100644 LeanPool/FunctionSpaces/Wavelets/Examples/Daubechies/MaskExistence.lean create mode 100644 LeanPool/FunctionSpaces/Wavelets/Examples/Daubechies/MatrixMethod.lean create mode 100644 LeanPool/FunctionSpaces/Wavelets/Examples/Daubechies/MatrixMethodD4.lean create mode 100644 LeanPool/FunctionSpaces/Wavelets/Examples/Daubechies/OrderThree.lean create mode 100644 LeanPool/FunctionSpaces/Wavelets/Examples/Daubechies/Orthonormality.lean create mode 100644 LeanPool/FunctionSpaces/Wavelets/Examples/Daubechies/PolynomialReproduction.lean create mode 100644 LeanPool/FunctionSpaces/Wavelets/Examples/Daubechies/Projections.lean create mode 100644 LeanPool/FunctionSpaces/Wavelets/Examples/Daubechies/ScalingFunction.lean create mode 100644 LeanPool/FunctionSpaces/Wavelets/Examples/Daubechies/ScalingMoments.lean create mode 100644 LeanPool/FunctionSpaces/Wavelets/Examples/Daubechies/SobolevRegularity.lean create mode 100644 LeanPool/FunctionSpaces/Wavelets/Examples/Daubechies/SymbolDecay.lean create mode 100644 LeanPool/FunctionSpaces/Wavelets/Examples/Daubechies/SymbolProduct.lean create mode 100644 LeanPool/FunctionSpaces/Wavelets/Examples/Daubechies/TransferExamples.lean create mode 100644 LeanPool/FunctionSpaces/Wavelets/Examples/Daubechies/TransferOperator.lean create mode 100644 LeanPool/FunctionSpaces/Wavelets/Examples/Daubechies/Wavelet.lean create mode 100644 LeanPool/FunctionSpaces/Wavelets/Examples/DyadicStepsQuasiBanach.lean create mode 100644 LeanPool/FunctionSpaces/Wavelets/Examples/Haar.lean create mode 100644 LeanPool/FunctionSpaces/Wavelets/Examples/HaarBesov.lean create mode 100644 LeanPool/projects/function-spaces.yaml diff --git a/LeanPool/FunctionSpaces.lean b/LeanPool/FunctionSpaces.lean new file mode 100644 index 0000000000..27d4fa36c9 --- /dev/null +++ b/LeanPool/FunctionSpaces.lean @@ -0,0 +1,248 @@ +/- +Copyright (c) 2026 Mario Ullrich. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Mario Ullrich +-/ +module + +public import LeanPool.FunctionSpaces.ApproximationSpaces +public import LeanPool.FunctionSpaces.Analysis.Differences.Differences +public import LeanPool.FunctionSpaces.Analysis.Differences.DomainModuli +public import LeanPool.FunctionSpaces.Analysis.Differences.TranslationAlgebra +public import LeanPool.FunctionSpaces.Analysis.Fourier.ApproxIdentity +public import LeanPool.FunctionSpaces.Analysis.Fourier.Convolution +public import LeanPool.FunctionSpaces.Analysis.Fourier.LittlewoodPaleyKernels +public import LeanPool.FunctionSpaces.Analysis.Fourier.SchwartzCutoff +public import LeanPool.FunctionSpaces.Analysis.Lp.BoundedContinuous +public import LeanPool.FunctionSpaces.Analysis.Lp.Inclusion +public import LeanPool.FunctionSpaces.Analysis.Lp.IndicatorOperator +public import LeanPool.FunctionSpaces.Analysis.Lp.Interpolation +public import LeanPool.FunctionSpaces.Analysis.Lp.LayerCake +public import LeanPool.FunctionSpaces.Analysis.Lp.LintegralForm +public import LeanPool.FunctionSpaces.Analysis.Lp.Marcinkiewicz +public import LeanPool.FunctionSpaces.Analysis.Lp.MixedNorms +public import LeanPool.FunctionSpaces.Analysis.Lp.NormingFamily +public import LeanPool.FunctionSpaces.Analysis.Lp.WeakType +public import LeanPool.FunctionSpaces.Analysis.Lp.Young +public import LeanPool.FunctionSpaces.Analysis.Maximal.CalderonZygmund +public import LeanPool.FunctionSpaces.Analysis.Maximal.CalderonZygmundSigned +public import LeanPool.FunctionSpaces.Analysis.Maximal.DyadicCubes +public import LeanPool.FunctionSpaces.Analysis.Maximal.DyadicGrid +public import LeanPool.FunctionSpaces.Analysis.Maximal.FeffermanStein +public import LeanPool.FunctionSpaces.Analysis.Maximal.HardyLittlewoodMaximal +public import LeanPool.FunctionSpaces.Domains.Cube.Basic +public import LeanPool.FunctionSpaces.Domains.Cube.IsoCoincidence +public import LeanPool.FunctionSpaces.Domains.Cube.IsoDifferences +public import LeanPool.FunctionSpaces.Domains.Cube.IsoInverse +public import LeanPool.FunctionSpaces.Domains.Cube.IsoModulus +public import LeanPool.FunctionSpaces.Domains.Cube.Modulus +public import LeanPool.FunctionSpaces.Domains.Cube.PiecewiseInverse +public import LeanPool.FunctionSpaces.Domains.Cube.PiecewiseJackson +public import LeanPool.FunctionSpaces.Domains.Cube.PiecewisePoly +public import LeanPool.FunctionSpaces.Domains.Cube.SlicewiseOperators +public import LeanPool.FunctionSpaces.Domains.Cube.Smoothing +public import LeanPool.FunctionSpaces.Domains.Cube.SplineInverse +public import LeanPool.FunctionSpaces.Domains.Cube.SplineJackson +public import LeanPool.FunctionSpaces.Domains.Cube.Splines +public import LeanPool.FunctionSpaces.Domains.Extension.HalfSpaceReflection +public import LeanPool.FunctionSpaces.Domains.Extension.HigherDivergenceKernels +public import LeanPool.FunctionSpaces.Domains.Extension.HigherSobolevExtension +public import LeanPool.FunctionSpaces.Domains.Extension.LipschitzGraphBesov +public import LeanPool.FunctionSpaces.Domains.Extension.LocalExtension +public import LeanPool.FunctionSpaces.Domains.Extension.ReflectionExtension +public import LeanPool.FunctionSpaces.Domains.Extension.ReflectionExtensionOperator +public import LeanPool.FunctionSpaces.Domains.Extension.RychkovExtension +public import LeanPool.FunctionSpaces.Domains.Extension.SobolevExtension +public import LeanPool.FunctionSpaces.Domains.Extension.SobolevExtensionOperator +public import LeanPool.FunctionSpaces.Domains.Interval.BSpline +public import LeanPool.FunctionSpaces.Domains.Interval.Differences +public import LeanPool.FunctionSpaces.Domains.Interval.LocalProjection +public import LeanPool.FunctionSpaces.Domains.Interval.LowerDifferences +public import LeanPool.FunctionSpaces.Domains.Interval.Modulus +public import LeanPool.FunctionSpaces.Domains.Interval.Periodic +public import LeanPool.FunctionSpaces.Domains.Interval.PiecewiseInverse +public import LeanPool.FunctionSpaces.Domains.Interval.PiecewiseJackson +public import LeanPool.FunctionSpaces.Domains.Interval.PiecewisePeriodic +public import LeanPool.FunctionSpaces.Domains.Interval.PiecewisePoly +public import LeanPool.FunctionSpaces.Domains.Interval.PolyDifferences +public import LeanPool.FunctionSpaces.Domains.Interval.Polynomials +public import LeanPool.FunctionSpaces.Domains.Interval.QuasiInterp +public import LeanPool.FunctionSpaces.Domains.Interval.Smoothing +public import LeanPool.FunctionSpaces.Domains.Interval.SplineInverse +public import LeanPool.FunctionSpaces.Domains.Interval.SplineJackson +public import LeanPool.FunctionSpaces.Domains.Interval.SplinePeriodic +public import LeanPool.FunctionSpaces.Domains.Interval.SplinePeriodicJackson +public import LeanPool.FunctionSpaces.Domains.Interval.Splines +public import LeanPool.FunctionSpaces.Domains.Interval.Steklov +public import LeanPool.FunctionSpaces.Domains.Interval.Taylor +public import LeanPool.FunctionSpaces.Domains.Interval.Whitney +public import LeanPool.FunctionSpaces.Domains.Lipschitz.BesovDomainLocalisation +public import LeanPool.FunctionSpaces.Domains.Lipschitz.BesovDomains +public import LeanPool.FunctionSpaces.Domains.Lipschitz.BoundedLipschitz +public import LeanPool.FunctionSpaces.Domains.Lipschitz.ConvexDomains +public import LeanPool.FunctionSpaces.Domains.Lipschitz.GraphParametrization +public import LeanPool.FunctionSpaces.Domains.Lipschitz.GraphStraightening +public import LeanPool.FunctionSpaces.Domains.Lipschitz.HalfSpace +public import LeanPool.FunctionSpaces.Domains.Lipschitz.LipschitzGraph +public import LeanPool.FunctionSpaces.Domains.Lipschitz.LipschitzGraphArea +public import LeanPool.FunctionSpaces.Domains.Lipschitz.LocalLipschitzGraphs +public import LeanPool.FunctionSpaces.Domains.Lipschitz.SurfaceMeasure +public import LeanPool.FunctionSpaces.Domains.Manifolds.Besov +public import LeanPool.FunctionSpaces.Domains.Manifolds.BesovAtlas +public import LeanPool.FunctionSpaces.Domains.Manifolds.BoundaryBesov +public import LeanPool.FunctionSpaces.Domains.Manifolds.BoundaryTrace +public import LeanPool.FunctionSpaces.Domains.Manifolds.ChartSobolev +public import LeanPool.FunctionSpaces.Domains.Manifolds.SmoothDomain +public import LeanPool.FunctionSpaces.Domains.Manifolds.SmoothDomainBesov +public import LeanPool.FunctionSpaces.Domains.Manifolds.SmoothLocalGraphs +public import LeanPool.FunctionSpaces.Domains.Manifolds.SmoothMeasure +public import LeanPool.FunctionSpaces.Domains.Manifolds.SmoothMeasureExistence +public import LeanPool.FunctionSpaces.Domains.Sobolev.LipschitzDomainGreen +public import LeanPool.FunctionSpaces.Domains.Sobolev.LipschitzDomainH1 +public import LeanPool.FunctionSpaces.Domains.Sobolev.LipschitzDomainW1p +public import LeanPool.FunctionSpaces.Domains.Sobolev.LipschitzGraphGreen +public import LeanPool.FunctionSpaces.Domains.Sobolev.SobolevDuality +public import LeanPool.FunctionSpaces.Domains.Sobolev.SobolevRestrictionSpaces +public import LeanPool.FunctionSpaces.Domains.Spectral.ChartFormEigenbasis +public import LeanPool.FunctionSpaces.Domains.Spectral.DirichletEigenbasis +public import LeanPool.FunctionSpaces.Domains.Spectral.ManifoldSpectralBesov +public import LeanPool.FunctionSpaces.Domains.Spectral.NeumannEigenbasis +public import LeanPool.FunctionSpaces.Domains.Spectral.SpectralBesov +public import LeanPool.FunctionSpaces.Domains.Traces.BoundaryBesovNorm +public import LeanPool.FunctionSpaces.Domains.Traces.BoundaryGagliardo +public import LeanPool.FunctionSpaces.Domains.Traces.BoundaryTraceSpace +public import LeanPool.FunctionSpaces.Domains.Traces.GraphTrace +public import LeanPool.FunctionSpaces.Domains.Traces.GraphTraceCharts +public import LeanPool.FunctionSpaces.Domains.Traces.GraphTraceExtension +public import LeanPool.FunctionSpaces.Domains.Traces.HalfSpaceTrace +public import LeanPool.FunctionSpaces.Domains.Traces.LipschitzBoundaryTrace +public import LeanPool.FunctionSpaces.Domains.Traces.MollifiedGraph +public import LeanPool.FunctionSpaces.Domains.Traces.TraceKernel +public import LeanPool.FunctionSpaces.Domains.Traces.TraceSpaceNorm +public import LeanPool.FunctionSpaces.MeasureSpaces.Besov.Basic +public import LeanPool.FunctionSpaces.MeasureSpaces.Besov.ElementaryEmbeddings +public import LeanPool.FunctionSpaces.MeasureSpaces.Besov.Embeddings +public import LeanPool.FunctionSpaces.MeasureSpaces.Besov.Interpolation +public import LeanPool.FunctionSpaces.MeasureSpaces.Besov.Nikolskii +public import LeanPool.FunctionSpaces.MeasureSpaces.Martingales.Filtration +public import LeanPool.FunctionSpaces.MeasureSpaces.Martingales.Partition +public import LeanPool.FunctionSpaces.MeasureSpaces.Scheme +public import LeanPool.FunctionSpaces.MeasureSpaces.Sobolev.Embeddings +public import LeanPool.FunctionSpaces.MeasureSpaces.Spectral.Basic +public import LeanPool.FunctionSpaces.MeasureSpaces.Spectral.Blocks +public import LeanPool.FunctionSpaces.MeasureSpaces.Spectral.CompactEigenbasis +public import LeanPool.FunctionSpaces.MeasureSpaces.Spectral.CompactEmbedding +public import LeanPool.FunctionSpaces.MeasureSpaces.Spectral.ContinuousSpectralBasis +public import LeanPool.FunctionSpaces.MeasureSpaces.Spectral.LocalWeyl +public import LeanPool.FunctionSpaces.Rd.Approximation.BandInverse +public import LeanPool.FunctionSpaces.Rd.Approximation.BandJackson +public import LeanPool.FunctionSpaces.Rd.Approximation.BandLimited +public import LeanPool.FunctionSpaces.Rd.Atoms.AtomAnalysis +public import LeanPool.FunctionSpaces.Rd.Atoms.AtomComposition +public import LeanPool.FunctionSpaces.Rd.Atoms.AtomSynthesis +public import LeanPool.FunctionSpaces.Rd.Atoms.DiffeoInvariance +public import LeanPool.FunctionSpaces.Rd.Atoms.SmoothAtoms +public import LeanPool.FunctionSpaces.Rd.BesselPotentials.BesselPotentialDistributions +public import LeanPool.FunctionSpaces.Rd.BesselPotentials.BesselPotentialEmbedding +public import LeanPool.FunctionSpaces.Rd.BesselPotentials.BesselPotentialLifting +public import LeanPool.FunctionSpaces.Rd.BesselPotentials.UniformSchwartzFamilies +public import LeanPool.FunctionSpaces.Rd.Differences.BesovDifferences +public import LeanPool.FunctionSpaces.Rd.Differences.ConvexDifferences +public import LeanPool.FunctionSpaces.Rd.Differences.DilatedDifferences +public import LeanPool.FunctionSpaces.Rd.Differences.MomentKernels +public import LeanPool.FunctionSpaces.Rd.Differences.PointwiseMultipliers +public import LeanPool.FunctionSpaces.Rd.Differences.SobolevSlobodeckij +public import LeanPool.FunctionSpaces.Rd.FourierMultipliers.BesselPotentialMultipliers +public import LeanPool.FunctionSpaces.Rd.FourierMultipliers.MihlinMultipliers +public import LeanPool.FunctionSpaces.Rd.FourierMultipliers.SymbolKernels +public import LeanPool.FunctionSpaces.Rd.FourierMultipliers.TriebelLizorkinMultipliers +public import LeanPool.FunctionSpaces.Rd.Interpolation.BesovInterpolation +public import LeanPool.FunctionSpaces.Rd.Interpolation.BesselPotentialInterpolation +public import LeanPool.FunctionSpaces.Rd.Interpolation.SobolevInterpolation +public import LeanPool.FunctionSpaces.Rd.Interpolation.TriebelLizorkinInterpolation +public import LeanPool.FunctionSpaces.Rd.LittlewoodPaley.LittlewoodPaley +public import LeanPool.FunctionSpaces.Rd.LocalMeans.KernelMajorants +public import LeanPool.FunctionSpaces.Rd.LocalMeans.LocalMeans +public import LeanPool.FunctionSpaces.Rd.MixedSmoothness.HyperbolicCross +public import LeanPool.FunctionSpaces.Rd.MixedSmoothness.MixedAveragedDifferences +public import LeanPool.FunctionSpaces.Rd.MixedSmoothness.MixedDifferences +public import LeanPool.FunctionSpaces.Rd.MixedSmoothness.MixedLittlewoodPaley +public import LeanPool.FunctionSpaces.Rd.MixedSmoothness.MixedLocalMeans +public import LeanPool.FunctionSpaces.Rd.MixedSmoothness.MixedSequences +public import LeanPool.FunctionSpaces.Rd.MixedSmoothness.TensorKernels +public import LeanPool.FunctionSpaces.Rd.SingularIntegrals.ConvolutionAdjoint +public import LeanPool.FunctionSpaces.Rd.SingularIntegrals.DilationFamilies +public import LeanPool.FunctionSpaces.Rd.SingularIntegrals.PlancherelBounds +public import LeanPool.FunctionSpaces.Rd.SingularIntegrals.VectorValuedSingularIntegrals +public import LeanPool.FunctionSpaces.Rd.SingularIntegrals.VectorValuedWeakType +public import LeanPool.FunctionSpaces.Rd.Sobolev.CriticalSobolevEmbedding +public import LeanPool.FunctionSpaces.Rd.Sobolev.DerivativeKernels +public import LeanPool.FunctionSpaces.Rd.Sobolev.DivergenceKernels +public import LeanPool.FunctionSpaces.Rd.Sobolev.GagliardoNirenbergSobolev +public import LeanPool.FunctionSpaces.Rd.Sobolev.RellichCompactness +public import LeanPool.FunctionSpaces.Rd.Sobolev.SobolevEmbedding +public import LeanPool.FunctionSpaces.Rd.Sobolev.SobolevJets +public import LeanPool.FunctionSpaces.Rd.Sobolev.SobolevTriebelLizorkin +public import LeanPool.FunctionSpaces.Rd.Sobolev.SobolevTwoLittlewoodPaley +public import LeanPool.FunctionSpaces.Rd.Sobolev.WeakDerivativeChangeOfVariables +public import LeanPool.FunctionSpaces.Rd.Sobolev.WeakDerivativeLeibniz +public import LeanPool.FunctionSpaces.Rd.Sobolev.WeakDerivatives +public import LeanPool.FunctionSpaces.Rd.TriebelLizorkin.LittlewoodPaleyFamilies +public import LeanPool.FunctionSpaces.Rd.TriebelLizorkin.SquareFunction +public import LeanPool.FunctionSpaces.Rd.TriebelLizorkin.TriebelLizorkin +public import LeanPool.FunctionSpaces.Rd.TriebelLizorkin.TriebelLizorkinAtoms +public import LeanPool.FunctionSpaces.Rd.TriebelLizorkin.TriebelLizorkinDifferences +public import LeanPool.FunctionSpaces.Rd.TriebelLizorkin.TriebelLizorkinDistributions +public import LeanPool.FunctionSpaces.Rd.TriebelLizorkin.TriebelLizorkinLocalMeans +public import LeanPool.FunctionSpaces.Torus.BesovInterpolation +public import LeanPool.FunctionSpaces.Torus.BesovModuli +public import LeanPool.FunctionSpaces.Torus.Coefficients +public import LeanPool.FunctionSpaces.Torus.Embeddings +public import LeanPool.FunctionSpaces.Torus.EuclideanConvolution +public import LeanPool.FunctionSpaces.Torus.EuclideanConvolutionIdentities +public import LeanPool.FunctionSpaces.Torus.FeffermanStein +public import LeanPool.FunctionSpaces.Torus.FourierSpectralBasis +public import LeanPool.FunctionSpaces.Torus.HaarMeasure +public import LeanPool.FunctionSpaces.Torus.LittlewoodPaley +public import LeanPool.FunctionSpaces.Torus.LpBesovModuli +public import LeanPool.FunctionSpaces.Torus.LpFourierCoefficients +public import LeanPool.FunctionSpaces.Torus.LpJackson +public import LeanPool.FunctionSpaces.Torus.LpWeakDerivatives +public import LeanPool.FunctionSpaces.Torus.Modulus +public import LeanPool.FunctionSpaces.Torus.NTermFourier +public import LeanPool.FunctionSpaces.Torus.Nikolskii +public import LeanPool.FunctionSpaces.Torus.PeriodicDistributions +public import LeanPool.FunctionSpaces.Torus.PeriodicLift +public import LeanPool.FunctionSpaces.Torus.SingularIntegrals +public import LeanPool.FunctionSpaces.Torus.Sobolev +public import LeanPool.FunctionSpaces.Torus.SobolevEmbedding +public import LeanPool.FunctionSpaces.Torus.SobolevTriebelLizorkin +public import LeanPool.FunctionSpaces.Torus.SquareFunction +public import LeanPool.FunctionSpaces.Torus.Trace +public import LeanPool.FunctionSpaces.Torus.TraceContinuous +public import LeanPool.FunctionSpaces.Torus.Translation +public import LeanPool.FunctionSpaces.Torus.TriebelLizorkin +public import LeanPool.FunctionSpaces.Torus.TriebelLizorkinInterpolation +public import LeanPool.FunctionSpaces.Torus.TriebelLizorkinLocalMeans +public import LeanPool.FunctionSpaces.Torus.TrigPolynomials +public import LeanPool.FunctionSpaces.Torus.WeakDerivatives +public import LeanPool.FunctionSpaces.Wavelets.DyadicNormalisation +public import LeanPool.FunctionSpaces.Wavelets.Examples.Daubechies.Besov +public import LeanPool.FunctionSpaces.Wavelets.Examples.Daubechies.D4Besov +public import LeanPool.FunctionSpaces.Wavelets.Examples.Daubechies.OrderThree +public import LeanPool.FunctionSpaces.Wavelets.Examples.DyadicStepsQuasiBanach +public import LeanPool.FunctionSpaces.Wavelets.Examples.HaarBesov + +/-! +# Characterizations of Besov, Triebel–Lizorkin and Sobolev spaces + +Source: url:https://github.com/mario-ullrich/Lean-FunctionSpaces/blob/d8b2b349567adb7ad049d517dec50bff4165e606/README.md +Authors: Mario Ullrich +Status: verified +Main declarations: `Rd.LocalMeansBump.besov_iff_atomic`, + `Rd.LocalMeansBump.memTriebelLizorkin_iff_atomic`, + `Rd.memSobolev_bessel_iff_memTriebelLizorkinDistr`, `Daubechies.besov_iff_coeff_d4`, + `Haar.memEMethod_stepCouple_iff_modulus`, `ApproximationScheme.memKMethod_reiteration` +Tags: approximation-theory, functional-analysis, harmonic-analysis, real-interpolation, wavelets +MSC: 46E35, 46B70, 42C40 +-/ diff --git a/LeanPool/FunctionSpaces/Analysis/Differences/Differences.lean b/LeanPool/FunctionSpaces/Analysis/Differences/Differences.lean new file mode 100644 index 0000000000..18df280938 --- /dev/null +++ b/LeanPool/FunctionSpaces/Analysis/Differences/Differences.lean @@ -0,0 +1,441 @@ +/- +Copyright (c) 2026 Mario Ullrich. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Mario Ullrich +-/ +module + +public import Mathlib.Algebra.Group.ForwardDiff +public import Mathlib.MeasureTheory.Constructions.BorelSpace.Complex +public import Mathlib.MeasureTheory.Function.LpSpace.Basic +public import Mathlib.MeasureTheory.Group.Integral +public import Mathlib.MeasureTheory.Measure.Haar.Unique + +/- +Modified for Lean Pool: module names and imports adapted. +-/ + +/-! +# Differences and the modulus of smoothness + +For `f : V → ℂ`, a step `h ∈ V` and `r ∈ ℕ`, the **difference** of order `r` is +`Δ_h^r f = (Δ_h)^r f` with `Δ_h f(x) = f(x + h) - f(x)` (Mathlib's `fwdDiff`), named +`Rd.higherDiff r h f` on every additive monoid. The statements on `V` use the iterate +`(fwdDiff h)^[r] f` itself, for which Mathlib has its lemmas; the files on intervals and cubes use +the name. Expanded, `Δ_h^r f(x) = ∑_{l ≤ r} (-1)^(r-l) C(r, l) f(x + l h)` +(`Rd.higherDiff_apply`); hence `|Δ_h^r f(x)| ≤ ∑_{l ≤ r} C(r, l) |f(x + l h)|` +(`Rd.enorm_higherDiff_le_sum`), so `|Δ_h^r f(x)| ≤ 2^r B` if `|f| ≤ B` at the points `x + l h` +(`Rd.enorm_higherDiff_le_of_bound_steps`), and `(x, h) ↦ |Δ_h^r f(x)|` is measurable for +measurable `f` +(`Rd.measurable_enorm_higherDiff_uncurry`). A negative step reflects the difference: +`Δ_{-h}^r f(x) = (-1)^r Δ_h^r f(x - r h)` (`Rd.higherDiff_neg`). For a Haar +measure `μ` the **modulus of smoothness** in `L_p(μ)` is +`ω_r(f, t)_p = sup_{‖h‖ ≤ t} ‖Δ_h^r f‖_p` (`Rd.modulus`). It increases in `t`, is subadditive and +homogeneous in `f` (`Rd.modulus_const_smul`), is bounded by `2^r ‖f‖_p` (`Rd.modulus_le`), and +depends only on the class of `f` modulo null sets (`Rd.modulus_congr_ae`). + +**Dilating the step** (`Rd.modulus_mul_le`): `ω_r(f, c t)_p ≤ (1 + c)^r ω_r(f, t)_p` for +`c, t ≥ 0`. For an integer `m ≥ 1`, `Δ_{mh} = ∑_{i exact hf + | succ r ih => + rw [higherDiff_def, Function.iterate_succ_apply'] + exact (ih.comp (measurable_add_const h)).sub ih + +/-- `(-1)^r (-1)^(r-m) = (-1)^m` for `m ≤ r`. -/ +theorem neg_one_pow_mul_neg_one_pow_sub {r m : ℕ} (hm : m ≤ r) : + (-1 : ℂ) ^ r * (-1) ^ (r - m) = (-1) ^ m := by + obtain ⟨d, rfl⟩ := Nat.exists_eq_add_of_le hm + rw [Nat.add_sub_cancel_left, pow_add, mul_assoc, ← pow_add, ← two_mul, pow_mul, neg_one_sq, + one_pow, mul_one] + +/-- **Negative steps**: `Δ_{-h}^r f(x) = (-1)^r Δ_h^r f(x - r h)`, by reflecting the sum +`∑_{l ≤ r} (-1)^(r-l) C(r, l) f(x + l h)` at `l ↦ r - l`. -/ +theorem higherDiff_neg {W : Type*} [AddCommGroup W] (r : ℕ) (h : W) (f : W → ℂ) (x : W) : + (fwdDiff (-h))^[r] f x = (-1 : ℂ) ^ r * (fwdDiff h)^[r] f (x - r • h) := by + rw [fwdDiff_iter_eq_sum_shift, fwdDiff_iter_eq_sum_shift, Finset.mul_sum, + ← Finset.sum_range_reflect] + refine Finset.sum_congr rfl fun k hk => ?_ + have hk' : k ≤ r := Nat.lt_succ_iff.1 (Finset.mem_range.1 hk) + have hx : x + (r - k) • -h = x - r • h + k • h := by + obtain ⟨j, rfl⟩ := Nat.exists_eq_add_of_le hk' + rw [Nat.add_sub_cancel_left, smul_neg, add_nsmul] + abel + rw [show r + 1 - 1 - k = r - k by omega, Nat.choose_symm hk', show r - (r - k) = k by omega, hx] + simp only [zsmul_eq_mul] + push_cast + rw [← neg_one_pow_mul_neg_one_pow_sub hk'] + ring + +omit [NormedSpace ℝ V] [FiniteDimensional ℝ V] [MeasurableSpace V] [BorelSpace V] in +/-- `Δ_h f = f(· + h) - f`. -/ +theorem fwdDiff_eq_sub (h : V) (f : V → ℂ) : fwdDiff h f = (fun x => f (x + h)) - f := + rfl + +omit [FiniteDimensional ℝ V] [MeasurableSpace V] [BorelSpace V] in +/-- `Δ_h^r f(x) = ∑_{l ≤ r} (-1)^(r-l) C(r, l) f(x + l h)` (Mathlib's +`fwdDiff_iter_eq_sum_shift`). -/ +theorem higherDiff_apply (r : ℕ) (h : V) (f : V → ℂ) (x : V) : + (fwdDiff h)^[r] f x = ∑ l ∈ Finset.range (r + 1), + ((-1 : ℂ) ^ (r - l) * (r.choose l : ℂ)) * f (x + (l : ℝ) • h) := by + rw [fwdDiff_iter_eq_sum_shift] + refine Finset.sum_congr rfl fun l _ => ?_ + rw [zsmul_eq_mul, Nat.cast_smul_eq_nsmul] + push_cast + ring + +omit [NormedSpace ℝ V] [FiniteDimensional ℝ V] [MeasurableSpace V] [BorelSpace V] in +/-- **Differences commute with translations**: `Δ_h^r (f(· + c)) = (Δ_h^r f)(· + c)`. -/ +theorem higherDiff_comp_add (r : ℕ) (h c : V) (f : V → ℂ) : + (fwdDiff h)^[r] (fun x => f (x + c)) = fun x => (fwdDiff h)^[r] f (x + c) := + funext fun x => fwdDiff_iter_comp_add h f c r x + +omit [NormedSpace ℝ V] [FiniteDimensional ℝ V] [MeasurableSpace V] [BorelSpace V] in +/-- **Differences with a multiple step telescope**: `Δ_{mh} f = ∑_{i fwdDiff h f (x + i • h) := by + induction m with + | zero => + funext x + simp [fwdDiff] + | succ m ih => + rw [Finset.sum_range_succ, ← ih] + funext x + simp only [fwdDiff, Pi.add_apply, succ_nsmul, ← add_assoc] + ring + +omit [FiniteDimensional ℝ V] [MeasurableSpace V] [BorelSpace V] in +/-- `|Δ_h^r f(x)| ≤ ∑_{l ≤ r} C(r, l) |f(x + l h)|`, from the expansion of the difference. -/ +theorem enorm_higherDiff_le_sum (r : ℕ) (h : V) (f : V → ℂ) (x : V) : + ‖(fwdDiff h)^[r] f x‖ₑ ≤ + ∑ l ∈ Finset.range (r + 1), (r.choose l : ℝ≥0∞) * ‖f (x + (l : ℝ) • h)‖ₑ := by + rw [higherDiff_apply] + refine (eNorm_sum_le _ _).trans (Finset.sum_le_sum fun l _ => le_of_eq ?_) + rw [eNorm_mul, eNorm_mul, eNorm_pow, eNorm_neg, eNorm_one, one_pow, one_mul, + ← ofReal_norm, Complex.norm_natCast, ENNReal.ofReal_natCast] + +omit [FiniteDimensional ℝ V] [MeasurableSpace V] [BorelSpace V] in +/-- `|Δ_h^r f(x)| ≤ 2^r B` if `|f(x + l h)| ≤ B` at the points `l = 0, …, r` of the difference: +the binomial weights of `Rd.enorm_higherDiff_le_sum` sum to `2^r` (Mathlib's +`Nat.sum_range_choose`). -/ +theorem enorm_higherDiff_le_of_bound_steps {f : V → ℂ} {B : ℝ≥0∞} {r : ℕ} {h x : V} + (hf : ∀ l ≤ r, ‖f (x + (l : ℝ) • h)‖ₑ ≤ B) : ‖(fwdDiff h)^[r] f x‖ₑ ≤ 2 ^ r * B := by + refine (enorm_higherDiff_le_sum r h f x).trans ((Finset.sum_le_sum fun l hl => + mul_le_mul' le_rfl (hf l (Nat.lt_succ_iff.1 (Finset.mem_range.1 hl)))).trans_eq ?_) + rw [← Finset.sum_mul] + congr 1 + exact_mod_cast Nat.sum_range_choose r + +omit [FiniteDimensional ℝ V] [MeasurableSpace V] [BorelSpace V] in +/-- `|Δ_h^r f| ≤ 2^r B` for `|f| ≤ B` (`Rd.enorm_higherDiff_le_of_bound_steps`). -/ +theorem enorm_higherDiff_le_of_bound {f : V → ℂ} {B : ℝ≥0∞} + (hf : ∀ y, ‖f y‖ₑ ≤ B) (r : ℕ) (h x : V) : ‖(fwdDiff h)^[r] f x‖ₑ ≤ 2 ^ r * B := + enorm_higherDiff_le_of_bound_steps fun _ _ => hf _ + +/-- For measurable `f` the differences `(x, h) ↦ |Δ_h^r f(x)|` are jointly measurable, by the +expansion `Δ_h^r f(x) = ∑_{l ≤ r} (-1)^(r-l) C(r, l) f(x + l h)`. -/ +theorem measurable_enorm_higherDiff_uncurry {f : V → ℂ} (hf : Measurable f) (r : ℕ) : + Measurable fun z : V × V => ‖(fwdDiff z.2)^[r] f z.1‖ₑ := by + have heq : (fun z : V × V => (fwdDiff z.2)^[r] f z.1) = fun z => + ∑ l ∈ Finset.range (r + 1), ((-1 : ℂ) ^ (r - l) * (r.choose l : ℂ)) * + f (z.1 + (l : ℝ) • z.2) := funext fun z => higherDiff_apply r z.2 f z.1 + refine Measurable.eNorm ?_ + rw [heq] + exact Finset.measurable_sum _ fun l _ => measurable_const.mul + (hf.comp (measurable_fst.add (measurable_snd.const_smul _))) + +omit [NormedSpace ℝ V] [FiniteDimensional ℝ V] in +/-- Translates of a.e. strongly measurable functions are a.e. strongly measurable. -/ +theorem aestronglyMeasurable_comp_add {f : V → ℂ} (hf : AEStronglyMeasurable f μ) (c : V) : + AEStronglyMeasurable (fun x => f (x + c)) μ := + hf.comp_measurePreserving (measurePreserving_add_right μ c) + +omit [NormedSpace ℝ V] [FiniteDimensional ℝ V] in +/-- **Translations keep `L_p` norms**: `‖f(· + c)‖_p = ‖f‖_p`. -/ +theorem eLpNorm_comp_add_right {f : V → ℂ} (hf : AEStronglyMeasurable f μ) (p : ℝ≥0∞) (c : V) : + eLpNorm (fun x => f (x + c)) p μ = eLpNorm f p μ := + eLpNorm_comp_measurePreserving hf (measurePreserving_add_right μ c) + +omit [NormedSpace ℝ V] [FiniteDimensional ℝ V] in +/-- Translates of functions that agree almost everywhere agree almost everywhere. -/ +theorem ae_comp_add_right {f g : V → ℂ} (hfg : f =ᵐ[μ] g) (c : V) : + (fun x => f (x + c)) =ᵐ[μ] fun x => g (x + c) := + (measurePreserving_add_right μ c).quasiMeasurePreserving.ae_eq_comp hfg + +omit [NormedSpace ℝ V] [FiniteDimensional ℝ V] in +/-- Differences of a.e. strongly measurable functions are a.e. strongly measurable. -/ +theorem aestronglyMeasurable_higherDiff {f : V → ℂ} (hf : AEStronglyMeasurable f μ) (r : ℕ) + (h : V) : AEStronglyMeasurable ((fwdDiff h)^[r] f) μ := by + induction r with + | zero => exact hf + | succ r ih => + rw [Function.iterate_succ_apply', fwdDiff_eq_sub] + exact (aestronglyMeasurable_comp_add ih h).sub ih + +omit [NormedSpace ℝ V] [FiniteDimensional ℝ V] in +/-- Differences of functions that agree almost everywhere agree almost everywhere. -/ +theorem higherDiff_congr_ae {f g : V → ℂ} (hfg : f =ᵐ[μ] g) (r : ℕ) (h : V) : + (fwdDiff h)^[r] f =ᵐ[μ] (fwdDiff h)^[r] g := by + induction r with + | zero => exact hfg + | succ r ih => + rw [Function.iterate_succ_apply', Function.iterate_succ_apply', fwdDiff_eq_sub, + fwdDiff_eq_sub] + exact (ae_comp_add_right ih h).sub ih + +omit [NormedSpace ℝ V] [FiniteDimensional ℝ V] in +/-- **`‖Δ_h^r f‖_p ≤ 2^r ‖f‖_p`**, from `‖Δ_h g‖_p ≤ ‖g(· + h)‖_p + ‖g‖_p = 2 ‖g‖_p`. -/ +theorem eLpNorm_higherDiff_le {f : V → ℂ} (hf : AEStronglyMeasurable f μ) {p : ℝ≥0∞} + (hp : 1 ≤ p) (r : ℕ) (h : V) : + eLpNorm ((fwdDiff h)^[r] f) p μ ≤ 2 ^ r * eLpNorm f p μ := by + induction r with + | zero => simp + | succ r ih => + rw [Function.iterate_succ_apply', fwdDiff_eq_sub] + calc eLpNorm ((fun x => (fwdDiff h)^[r] f (x + h)) - (fwdDiff h)^[r] f) p μ + ≤ eLpNorm (fun x => (fwdDiff h)^[r] f (x + h)) p μ + eLpNorm ((fwdDiff h)^[r] f) p μ := + eLpNorm_sub_le hp + _ = 2 * eLpNorm ((fwdDiff h)^[r] f) p μ := by + rw [eLpNorm_comp_add_right (aestronglyMeasurable_higherDiff hf r h), two_mul] + _ ≤ 2 * (2 ^ r * eLpNorm f p μ) := by gcongr + _ = 2 ^ (r + 1) * eLpNorm f p μ := by rw [pow_succ]; ring + +omit [NormedSpace ℝ V] [FiniteDimensional ℝ V] in +/-- **Multiples of the step**: `‖Δ_{mh}^a Δ_h^b f‖_p ≤ m^a ‖Δ_h^(a+b) f‖_p`, by induction on +`a`, with `Δ_{mh} = ∑_{i intro b; simp + | succ a ih => + intro b + have hsplit : (fwdDiff (m • h))^[a + 1] ((fwdDiff h)^[b] f) = + ∑ i ∈ Finset.range m, + fun x => (fwdDiff (m • h))^[a] ((fwdDiff h)^[b + 1] f) (x + i • h) := by + rw [Function.iterate_succ_apply, fwdDiff_nsmul, fwdDiff_iter_finsetSum] + refine Finset.sum_congr rfl fun i _ => ?_ + rw [higherDiff_comp_add, ← Function.iterate_succ_apply' (fwdDiff h) b f] + have hmeas : AEStronglyMeasurable ((fwdDiff (m • h))^[a] ((fwdDiff h)^[b + 1] f)) μ := + aestronglyMeasurable_higherDiff (aestronglyMeasurable_higherDiff hf (b + 1) h) a (m • h) + rw [hsplit] + calc eLpNorm (∑ i ∈ Finset.range m, + fun x => (fwdDiff (m • h))^[a] ((fwdDiff h)^[b + 1] f) (x + i • h)) p μ + ≤ ∑ i ∈ Finset.range m, + eLpNorm (fun x => (fwdDiff (m • h))^[a] ((fwdDiff h)^[b + 1] f) (x + i • h)) p μ := + eLpNorm_sum_le hp + _ = ∑ _i ∈ Finset.range m, + eLpNorm ((fwdDiff (m • h))^[a] ((fwdDiff h)^[b + 1] f)) p μ := + Finset.sum_congr rfl fun i _ => eLpNorm_comp_add_right hmeas p _ + _ ≤ ∑ _i ∈ Finset.range m, + (m : ℝ≥0∞) ^ a * eLpNorm ((fwdDiff h)^[a + (b + 1)] f) p μ := + Finset.sum_le_sum fun i _ => ih (b + 1) + _ = (m : ℝ≥0∞) ^ (a + 1) * eLpNorm ((fwdDiff h)^[a + 1 + b] f) p μ := by + rw [Finset.sum_const, Finset.card_range, nsmul_eq_mul, + show a + (b + 1) = a + 1 + b by omega, pow_succ] + ring + +omit [NormedSpace ℝ V] [FiniteDimensional ℝ V] in +/-- Differences of integrable functions are integrable. -/ +theorem integrable_higherDiff {K : V → ℂ} (hK : Integrable K μ) (r : ℕ) (h : V) : + Integrable ((fwdDiff h)^[r] K) μ := by + induction r with + | zero => exact hK + | succ r ih => + rw [Function.iterate_succ_apply', fwdDiff_eq_sub] + exact (ih.comp_add_right h).sub ih + +/-! ### The modulus of smoothness -/ + +variable (μ) in +/-- The **modulus of smoothness** `ω_r(f, t)_p = sup_{‖h‖ ≤ t} ‖Δ_h^r f‖_p`. -/ +noncomputable def modulus (r : ℕ) (p : ℝ≥0∞) (f : V → ℂ) (t : ℝ) : ℝ≥0∞ := + ⨆ (h : V) (_ : ‖h‖ ≤ t), eLpNorm ((fwdDiff h)^[r] f) p μ + +omit [NormedSpace ℝ V] [FiniteDimensional ℝ V] [BorelSpace V] [μ.IsAddHaarMeasure] in +/-- `‖Δ_h^r f‖_p ≤ ω_r(f, t)_p` for `‖h‖ ≤ t`. -/ +theorem eLpNorm_higherDiff_le_modulus {r : ℕ} {p : ℝ≥0∞} {f : V → ℂ} {t : ℝ} + {h : V} (hh : ‖h‖ ≤ t) : eLpNorm ((fwdDiff h)^[r] f) p μ ≤ modulus μ r p f t := + le_iSup₂ (f := fun (h : V) (_ : ‖h‖ ≤ t) => eLpNorm ((fwdDiff h)^[r] f) p μ) h hh + +omit [NormedSpace ℝ V] [FiniteDimensional ℝ V] [BorelSpace V] [μ.IsAddHaarMeasure] in +/-- The modulus increases in `t`. -/ +theorem modulus_mono (r : ℕ) (p : ℝ≥0∞) (f : V → ℂ) : + Monotone (modulus μ r p f) := + fun _ _ hst => iSup₂_le fun _ hh => eLpNorm_higherDiff_le_modulus (hh.trans hst) + +omit [NormedSpace ℝ V] [FiniteDimensional ℝ V] [BorelSpace V] [μ.IsAddHaarMeasure] in +/-- The modulus is subadditive. -/ +theorem modulus_add_le {p : ℝ≥0∞} (hp : 1 ≤ p) (r : ℕ) (f g : V → ℂ) + (t : ℝ) : modulus μ r p (f + g) t ≤ modulus μ r p f t + modulus μ r p g t := by + refine iSup₂_le fun h hh => ?_ + rw [fwdDiff_iter_add] + exact (eLpNorm_add_le hp).trans + (add_le_add (eLpNorm_higherDiff_le_modulus hh) (eLpNorm_higherDiff_le_modulus hh)) + +omit [NormedSpace ℝ V] [FiniteDimensional ℝ V] in +/-- `ω_r(f, t)_p ≤ 2^r ‖f‖_p`. -/ +theorem modulus_le {f : V → ℂ} (hf : AEStronglyMeasurable f μ) {p : ℝ≥0∞} (hp : 1 ≤ p) + (r : ℕ) (t : ℝ) : modulus μ r p f t ≤ 2 ^ r * eLpNorm f p μ := + iSup₂_le fun h _ => eLpNorm_higherDiff_le hf hp r h + +omit [NormedSpace ℝ V] [FiniteDimensional ℝ V] in +/-- **The modulus depends only on the class modulo null sets.** -/ +theorem modulus_congr_ae {f g : V → ℂ} (hfg : f =ᵐ[μ] g) (r : ℕ) (p : ℝ≥0∞) (t : ℝ) : + modulus μ r p f t = modulus μ r p g t := by + simp only [modulus] + congr 1 + funext h + congr 1 + funext _ + exact eLpNorm_congr_ae (higherDiff_congr_ae hfg r h) + +omit [NormedSpace ℝ V] [FiniteDimensional ℝ V] [BorelSpace V] [μ.IsAddHaarMeasure] in +/-- **The modulus is homogeneous**: `ω_r(c f, t)_p = |c| ω_r(f, t)_p`, since +`Δ_h^r (c f) = c Δ_h^r f` (Mathlib's `fwdDiff_iter_const_smul`, `eLpNorm_const_smul`). -/ +theorem modulus_const_smul (r : ℕ) (p : ℝ≥0∞) (c : ℂ) (f : V → ℂ) (t : ℝ) : + modulus μ r p (c • f) t = ‖c‖ₑ * modulus μ r p f t := by + simp only [modulus, fwdDiff_iter_const_smul, eLpNorm_const_smul, ENNReal.mul_iSup] + +omit [NormedSpace ℝ V] [FiniteDimensional ℝ V] in +/-- **Integer multiples of the scale, for divisible steps**: if every step `h` with +`‖h‖ ≤ m t` is `m h'` for a step `h'` with `‖h'‖ ≤ t`, then `ω_r(f, m t)_p ≤ m^r ω_r(f, t)_p`, +since `‖Δ^r_{m h'} f‖_p ≤ m^r ‖Δ^r_{h'} f‖_p` (`Rd.eLpNorm_higherDiff_nsmul_higherDiff_le`). The +hypothesis holds on every normed space and on the torus. -/ +theorem modulus_nat_mul_le_of_forall_exists_nsmul {f : V → ℂ} (hf : AEStronglyMeasurable f μ) + {p : ℝ≥0∞} (hp : 1 ≤ p) (r : ℕ) {m : ℕ} {t : ℝ} + (hdiv : ∀ h : V, ‖h‖ ≤ m * t → ∃ h' : V, ‖h'‖ ≤ t ∧ h = m • h') : + modulus μ r p f (m * t) ≤ (m : ℝ≥0∞) ^ r * modulus μ r p f t := by + refine iSup₂_le fun h hh => ?_ + obtain ⟨h', hh', rfl⟩ := hdiv h hh + have h1 := eLpNorm_higherDiff_nsmul_higherDiff_le hf hp m h' r 0 + simp only [Function.iterate_zero, id_eq, add_zero] at h1 + exact h1.trans (by gcongr; exact eLpNorm_higherDiff_le_modulus hh') + +omit [FiniteDimensional ℝ V] in +/-- **Integer multiples of the scale**: `ω_r(f, m t)_p ≤ m^r ω_r(f, t)_p` for `m ≥ 1`. -/ +theorem modulus_nat_mul_le {f : V → ℂ} (hf : AEStronglyMeasurable f μ) {p : ℝ≥0∞} (hp : 1 ≤ p) + (r : ℕ) {m : ℕ} (hm : 1 ≤ m) (t : ℝ) : + modulus μ r p f (m * t) ≤ (m : ℝ≥0∞) ^ r * modulus μ r p f t := by + have hm0 : (0 : ℝ) < m := by exact_mod_cast hm + refine modulus_nat_mul_le_of_forall_exists_nsmul hf hp r fun h hh => ⟨(m : ℝ)⁻¹ • h, ?_, ?_⟩ + · rw [norm_smul, Real.norm_of_nonneg (inv_nonneg.2 hm0.le), inv_mul_le_iff₀ hm0] + exact hh + · rw [← Nat.cast_smul_eq_nsmul ℝ, smul_inv_smul₀ hm0.ne'] + +omit [NormedSpace ℝ V] [FiniteDimensional ℝ V] [BorelSpace V] [μ.IsAddHaarMeasure] in +/-- **From integer to real dilations of the scale**: if `ω_r(f, m t)_p ≤ m^r ω_r(f, t)_p` for +every integer `m ≥ 1`, then `ω_r(f, c t)_p ≤ (1 + c)^r ω_r(f, t)_p` for every `c ≥ 0`, with the +integer `m = ⌊c⌋ + 1 ≤ 1 + c` and the monotonicity of the modulus. -/ +theorem modulus_mul_le_of_nat_mul_le {r : ℕ} {p : ℝ≥0∞} {f : V → ℂ} {c t : ℝ} (hc : 0 ≤ c) + (ht : 0 ≤ t) + (hnat : ∀ m : ℕ, 1 ≤ m → modulus μ r p f (m * t) ≤ (m : ℝ≥0∞) ^ r * modulus μ r p f t) : + modulus μ r p f (c * t) ≤ ENNReal.ofReal (1 + c) ^ r * modulus μ r p f t := by + have hm : 1 ≤ ⌊c⌋₊ + 1 := Nat.le_add_left 1 _ + have hcm : c ≤ ((⌊c⌋₊ + 1 : ℕ) : ℝ) := by + push_cast + exact (Nat.lt_floor_add_one c).le + have hm1 : (((⌊c⌋₊ + 1 : ℕ) : ℝ≥0∞)) ≤ ENNReal.ofReal (1 + c) := by + rw [← ENNReal.ofReal_natCast] + refine ENNReal.ofReal_le_ofReal ?_ + push_cast + linarith [Nat.floor_le hc] + calc modulus μ r p f (c * t) ≤ modulus μ r p f ((⌊c⌋₊ + 1 : ℕ) * t) := + modulus_mono r p f (mul_le_mul_of_nonneg_right hcm ht) + _ ≤ ((⌊c⌋₊ + 1 : ℕ) : ℝ≥0∞) ^ r * modulus μ r p f t := hnat _ hm + _ ≤ ENNReal.ofReal (1 + c) ^ r * modulus μ r p f t := by gcongr + +omit [FiniteDimensional ℝ V] in +/-- **Dilating the scale**: `ω_r(f, c t)_p ≤ (1 + c)^r ω_r(f, t)_p` for `c, t ≥ 0` +(`Rd.modulus_nat_mul_le`, `Rd.modulus_mul_le_of_nat_mul_le`). -/ +theorem modulus_mul_le {f : V → ℂ} (hf : AEStronglyMeasurable f μ) {p : ℝ≥0∞} (hp : 1 ≤ p) + (r : ℕ) {c t : ℝ} (hc : 0 ≤ c) (ht : 0 ≤ t) : + modulus μ r p f (c * t) ≤ ENNReal.ofReal (1 + c) ^ r * modulus μ r p f t := + modulus_mul_le_of_nat_mul_le hc ht fun _ hm => modulus_nat_mul_le hf hp r hm t + +/-! ### The modulus on `L_p` at dyadic scales -/ + +variable {p : ℝ≥0∞} [Fact (1 ≤ p)] + +variable (p) in +/-- The modulus of an element of `L_p` at the dyadic scale `2^(-k)`. -/ +noncomputable def lpModulus (r : ℕ) (f : Lp ℂ p μ) (k : ℕ) : ℝ≥0∞ := + modulus μ r p (f : V → ℂ) (1 / 2 ^ k) + +omit [NormedSpace ℝ V] [FiniteDimensional ℝ V] in +/-- The modulus on `L_p` is subadditive. -/ +theorem lpModulus_add_le (r : ℕ) (f g : Lp ℂ p μ) (k : ℕ) : + lpModulus p r (f + g) k ≤ lpModulus p r f k + lpModulus p r g k := by + rw [lpModulus, modulus_congr_ae (Lp.coeFn_add f g)] + exact modulus_add_le Fact.out r _ _ _ + +omit [NormedSpace ℝ V] [FiniteDimensional ℝ V] in +/-- `ω_r(f, 2^(-k))_p ≤ 2^r ‖f‖_p` on `L_p`. -/ +theorem lpModulus_le (r : ℕ) (f : Lp ℂ p μ) (k : ℕ) : lpModulus p r f k ≤ 2 ^ r * ‖f‖ₑ := by + rw [Lp.eNorm_def] + exact modulus_le (Lp.aestronglyMeasurable f) Fact.out r _ + +omit [NormedSpace ℝ V] [FiniteDimensional ℝ V] in +/-- `ω_{r+l}(f, t)_p ≤ 2^l ω_r(f, t)_p`. -/ +theorem lpModulus_add_order_le (r l : ℕ) (f : Lp ℂ p μ) + (k : ℕ) : lpModulus p (r + l) f k ≤ 2 ^ l * lpModulus p r f k := by + change modulus μ (r + l) p (f : V → ℂ) (1 / 2 ^ k) ≤ + 2 ^ l * modulus μ r p (f : V → ℂ) (1 / 2 ^ k) + refine iSup₂_le fun h hh => ?_ + rw [add_comm r l, Function.iterate_add_apply] + exact (eLpNorm_higherDiff_le (aestronglyMeasurable_higherDiff (Lp.aestronglyMeasurable f) r h) + Fact.out l h).trans (mul_le_mul' le_rfl (eLpNorm_higherDiff_le_modulus hh)) + +omit [NormedSpace ℝ V] [FiniteDimensional ℝ V] in +/-- The modulus of `0` vanishes. -/ +theorem lpModulus_zero (r k : ℕ) : lpModulus p r (0 : Lp ℂ p μ) k = 0 := + le_antisymm ((lpModulus_le r 0 k).trans (by simp)) bot_le + +omit [NormedSpace ℝ V] [FiniteDimensional ℝ V] [Fact (1 ≤ p)] in +/-- The dyadic moduli are homogeneous: `ω_r(c f, 2^(-k))_p = |c| ω_r(f, 2^(-k))_p` +(`Rd.modulus_const_smul`). -/ +theorem lpModulus_const_smul (r : ℕ) (c : ℂ) (f : Lp ℂ p μ) (k : ℕ) : + lpModulus p r (c • f) k = ‖c‖ₑ * lpModulus p r f k := by + rw [lpModulus, modulus_congr_ae (Lp.coeFn_smul c f), modulus_const_smul] + rfl + +end Rd diff --git a/LeanPool/FunctionSpaces/Analysis/Differences/DomainModuli.lean b/LeanPool/FunctionSpaces/Analysis/Differences/DomainModuli.lean new file mode 100644 index 0000000000..d0af0746d3 --- /dev/null +++ b/LeanPool/FunctionSpaces/Analysis/Differences/DomainModuli.lean @@ -0,0 +1,479 @@ +/- +Copyright (c) 2026 Mario Ullrich. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Mario Ullrich +-/ +module + +public import LeanPool.FunctionSpaces.Analysis.Differences.Differences +public import LeanPool.FunctionSpaces.Analysis.Lp.IndicatorOperator +public import LeanPool.FunctionSpaces.ApproximationSpaces.Sequences.Lq + +/- +Modified for Lean Pool: module names and imports adapted. +-/ + +/-! +# Moduli of smoothness on subsets of `V` + +For `U ⊆ V`, a step `h ∈ V` and `r ∈ ℕ`, the points `x` with `x, x + h, …, x + r h ∈ U` form the +set `U_{rh}` (`Rd.stepSet`, a subset of `U`). The **restricted difference** is +`Δ_h^r(f, x, U) = Δ_h^r f(x)` for `x ∈ U_{rh}` and `0` otherwise, and the **modulus of +smoothness on `U`** is + +`ω_r(f, t, U)_p = sup_{‖h‖ ≤ t} ‖Δ_h^r(f, ·, U)‖_{L_p(U)}` + +(DeVore–Sharpley, (2.1); `Rd.modulusOn`). The steps `h` and `-h` give the same norm, since +`Δ_{-h}^r(f, x, U) = (-1)^r Δ_h^r(f, x - r h, U)` (`Rd.eLpNorm_indicator_stepSet_neg`). The +modulus uses only the values of `f` on `U` (`Rd.modulusOn_indicator`, `Rd.modulusOn_congr_ae`), +increases in `t`, is subadditive, is bounded by `2^r ‖f‖_{L_p(U)}` (`Rd.modulusOn_le`) and by +the modulus on `V` (`Rd.modulusOn_le_modulus`), and on `U = V` it is the modulus on `V` +(`Rd.modulusOn_univ`). `Rd.lpModulusOn` samples it for `f ∈ L_p` at the dyadic scales `2^(-k)`; +for every `G ∈ L_p`, `ω_r(f, 2^(-k), Ω)_p ≤ 2^r ‖1_Ω (f - G)‖_p + ω_r(G, 2^(-k))_p` +(`Rd.lpModulusOn_le_add_lpModulus`). +The **intrinsic Besov quasi-norm** on a measurable set `Ω` is +`N_Ω(G) = ‖1_Ω G‖_p + ‖(2^(ks) ω_r(G, 2^(-k), Ω)_p)_k‖_{ℓ_q}` (`Rd.modNormOn`); it depends only +on `1_Ω G` (`Rd.modNormOn_congr`), is subadditive for `q ≥ 1` and homogeneous +(`Rd.modNormOn_add_le`, `Rd.modNormOn_finsetSum_le`, `Rd.modNormOn_const_smul`), and grows with +the set (`Rd.modNormOn_mono_set`). If +`1_O F = 1_O f`, the intrinsic quasi-norm of `f` on `O` is at most that of `F` on `V` +(`Rd.modNormOn_le_modNorm_of_indicatorLp`), and on `O = V` the two agree (`Rd.modNormOn_univ`). + +On `V` with Lebesgue measure, sets that agree up to a null set have almost equal step sets +(`Rd.stepSet_ae_eq`), the same moduli (`Rd.modulusOn_congr_set`, `Rd.lpModulusOn_congr_set`), the +same cut-offs (`Rd.indicatorLp_congr_set`) and the same intrinsic quasi-norms +(`Rd.modNormOn_congr_set`). +-/ + +@[expose] public section + +open MeasureTheory Filter +open scoped ENNReal + +open ENNReal (lqNorm dyadicWeight) + +namespace Rd + +variable {V : Type*} [NormedAddCommGroup V] [NormedSpace ℝ V] + +/-! ### Points whose steps stay in a set -/ + +/-- The set `U_{rh}` of the points `x` with `x, x + h, …, x + r h ∈ U`. -/ +def stepSet (U : Set V) (r : ℕ) (h : V) : Set V := {x | ∀ l ≤ r, x + (l : ℝ) • h ∈ U} + +/-- `U_{rh} ⊆ U` (the case `l = 0`). -/ +theorem stepSet_subset (U : Set V) (r : ℕ) (h : V) : stepSet U r h ⊆ U := fun x hx => by + simpa using hx 0 (Nat.zero_le r) + +/-- `U_{rh} ⊆ O_{rh}` for `U ⊆ O`. -/ +theorem stepSet_mono {U O : Set V} (hUO : U ⊆ O) (r : ℕ) (h : V) : stepSet U r h ⊆ stepSet O r h := + fun _ hx l hl => hUO (hx l hl) + +/-- `V_{rh} = V`. -/ +@[simp] +theorem stepSet_univ (r : ℕ) (h : V) : stepSet (Set.univ : Set V) r h = Set.univ := + Set.eq_univ_of_forall fun _ _ _ => Set.mem_univ _ + +/-- **Restricted differences use only the values on `U`**: +`1_{U_{rh}} Δ_h^r (1_U f) = 1_{U_{rh}} Δ_h^r f`. -/ +theorem indicator_stepSet_higherDiff_indicator (U : Set V) (r : ℕ) (h : V) (f : V → ℂ) : + (stepSet U r h).indicator ((fwdDiff h)^[r] (U.indicator f)) = + (stepSet U r h).indicator ((fwdDiff h)^[r] f) := by + funext x + by_cases hx : x ∈ stepSet U r h + · rw [Set.indicator_of_mem hx, Set.indicator_of_mem hx, higherDiff_apply, higherDiff_apply] + refine Finset.sum_congr rfl fun l hl => ?_ + rw [Set.indicator_of_mem (hx l (Nat.lt_succ_iff.1 (Finset.mem_range.1 hl)))] + · rw [Set.indicator_of_notMem hx, Set.indicator_of_notMem hx] + +/-- **Negative steps**: `x ∈ U_{r(-h)}` iff `x - r h ∈ U_{rh}`, by `l ↦ r - l`. -/ +theorem mem_stepSet_neg {U : Set V} {r : ℕ} {h x : V} : + x ∈ stepSet U r (-h) ↔ x - (r : ℝ) • h ∈ stepSet U r h := by + have key : ∀ l ≤ r, x - (r : ℝ) • h + ((r - l : ℕ) : ℝ) • h = x + (l : ℝ) • -h := + fun l hl => by + rw [Nat.cast_sub hl, smul_neg, sub_smul] + abel + constructor + · intro hx l hl + have := hx (r - l) (Nat.sub_le r l) + rwa [← key (r - l) (Nat.sub_le r l), Nat.sub_sub_self hl] at this + · intro hx l hl + simpa only [key l hl] using hx (r - l) (Nat.sub_le r l) + +/-- **Restricted differences with a negative step**: +`Δ_{-h}^r(f, x, U) = (-1)^r Δ_h^r(f, x - r h, U)`, from `Rd.higherDiff_neg`. -/ +theorem indicator_stepSet_neg (U : Set V) (r : ℕ) (h : V) (f : V → ℂ) (x : V) : + (stepSet U r (-h)).indicator ((fwdDiff (-h))^[r] f) x = + (-1 : ℂ) ^ r * (stepSet U r h).indicator ((fwdDiff h)^[r] f) (x - (r : ℝ) • h) := by + by_cases hx : x ∈ stepSet U r (-h) + · rw [Set.indicator_of_mem hx, Set.indicator_of_mem (mem_stepSet_neg.1 hx), higherDiff_neg, + Nat.cast_smul_eq_nsmul] + · rw [Set.indicator_of_notMem hx, Set.indicator_of_notMem (mt mem_stepSet_neg.2 hx), mul_zero] + +/-! ### The modulus of smoothness on a set -/ + +variable [MeasurableSpace V] {μ : Measure V} + +variable (μ) in +/-- The **modulus of smoothness on `U`**, `ω_r(f, t, U)_p = sup_{‖h‖ ≤ t} ‖Δ_h^r(f, ·, U)‖_p`, +with the restricted difference `Δ_h^r(f, ·, U) = 1_{U_{rh}} Δ_h^r f`. -/ +noncomputable def modulusOn (U : Set V) (r : ℕ) (p : ℝ≥0∞) (f : V → ℂ) (t : ℝ) : ℝ≥0∞ := + ⨆ (h : V) (_ : ‖h‖ ≤ t), eLpNorm ((stepSet U r h).indicator ((fwdDiff h)^[r] f)) p μ + +/-- `‖Δ_h^r(f, ·, U)‖_p ≤ ω_r(f, t, U)_p` for `‖h‖ ≤ t`. -/ +theorem eLpNorm_indicator_higherDiff_le_modulusOn {U : Set V} {r : ℕ} {p : ℝ≥0∞} {f : V → ℂ} + {t : ℝ} {h : V} (hh : ‖h‖ ≤ t) : + eLpNorm ((stepSet U r h).indicator ((fwdDiff h)^[r] f)) p μ ≤ modulusOn μ U r p f t := + le_iSup₂ (f := fun (h : V) (_ : ‖h‖ ≤ t) => + eLpNorm ((stepSet U r h).indicator ((fwdDiff h)^[r] f)) p μ) h hh + +/-- The modulus on `U` increases in `t`. -/ +theorem modulusOn_mono (U : Set V) (r : ℕ) (p : ℝ≥0∞) (f : V → ℂ) : + Monotone (modulusOn μ U r p f) := + fun _ _ hst => iSup₂_le fun _ hh => eLpNorm_indicator_higherDiff_le_modulusOn (hh.trans hst) + +/-- The modulus on `V` is the modulus. -/ +@[simp] +theorem modulusOn_univ (r : ℕ) (p : ℝ≥0∞) (f : V → ℂ) (t : ℝ) : + modulusOn μ Set.univ r p f t = modulus μ r p f t := by + simp [modulusOn, modulus] + +/-- **The modulus on `U` uses only the values on `U`**: `ω_r(1_U f, t, U)_p = ω_r(f, t, U)_p`. -/ +theorem modulusOn_indicator (U : Set V) (r : ℕ) (p : ℝ≥0∞) (f : V → ℂ) (t : ℝ) : + modulusOn μ U r p (U.indicator f) t = modulusOn μ U r p f t := by + simp only [modulusOn, indicator_stepSet_higherDiff_indicator] + +/-- The modulus on `U` is subadditive. -/ +theorem modulusOn_add_le {p : ℝ≥0∞} (hp : 1 ≤ p) (U : Set V) (r : ℕ) (f g : V → ℂ) (t : ℝ) : + modulusOn μ U r p (f + g) t ≤ modulusOn μ U r p f t + modulusOn μ U r p g t := by + refine iSup₂_le fun h hh => ?_ + rw [fwdDiff_iter_add, Set.indicator_add'] + exact (eLpNorm_add_le hp).trans (add_le_add (eLpNorm_indicator_higherDiff_le_modulusOn hh) + (eLpNorm_indicator_higherDiff_le_modulusOn hh)) + +variable [BorelSpace V] + +/-- `U_{rh}` is measurable for measurable `U`. -/ +theorem measurableSet_stepSet {U : Set V} (hU : MeasurableSet U) (r : ℕ) (h : V) : + MeasurableSet (stepSet U r h) := by + simp only [stepSet, Set.ofPred_forall] + exact MeasurableSet.iInter fun l => MeasurableSet.iInter fun _ => measurable_add_const _ hU + +/-- **A restricted difference has the same norm for the steps `h` and `-h`**: +`‖Δ_{-h}^r(f, ·, U)‖_p = ‖Δ_h^r(f, ·, U)‖_p` for a translation-invariant `μ`, by the substitution +`x ↦ x - r h` (Mathlib's `MeasurableEmbedding.eLpNorm_map_measure`). -/ +theorem eLpNorm_indicator_stepSet_neg [μ.IsAddRightInvariant] (U : Set V) (r : ℕ) (p : ℝ≥0∞) + (h : V) (f : V → ℂ) : + eLpNorm ((stepSet U r (-h)).indicator ((fwdDiff (-h))^[r] f)) p μ = + eLpNorm ((stepSet U r h).indicator ((fwdDiff h)^[r] f)) p μ := by + set G := (stepSet U r h).indicator ((fwdDiff h)^[r] f) + have hemb : MeasurableEmbedding fun x : V => x - (r : ℝ) • h := + (MeasurableEquiv.subRight ((r : ℝ) • h)).measurableEmbedding + have hfun : (stepSet U r (-h)).indicator ((fwdDiff (-h))^[r] f) = + ((-1 : ℂ) ^ r) • (G ∘ fun x => x - (r : ℝ) • h) := + funext fun x => indicator_stepSet_neg U r h f x + rw [hfun, eLpNorm_const_smul, eNorm_pow, eNorm_neg, eNorm_one, one_pow, one_mul, + ← hemb.eLpNorm_map_measure, map_sub_right_eq_self] + +/-- **The modulus on `U` is at most the modulus on `V`**, `ω_r(f, t, U)_p ≤ ω_r(f, t)_p`. -/ +theorem modulusOn_le_modulus {U : Set V} (hU : MeasurableSet U) (r : ℕ) (p : ℝ≥0∞) (f : V → ℂ) + (t : ℝ) : modulusOn μ U r p f t ≤ modulus μ r p f t := + iSup₂_mono fun h _ => eLpNorm_indicator_le _ (measurableSet_stepSet hU r h).nullMeasurableSet + +variable [μ.IsAddHaarMeasure] + +/-- **The modulus on a set grows with the set**: `ω_r(f, t, U)_p ≤ ω_r(f, t, O)_p` for `U ⊆ O`. -/ +theorem modulusOn_mono_set {f : V → ℂ} (hf : AEStronglyMeasurable f μ) {U O : Set V} + (hU : MeasurableSet U) (hUO : U ⊆ O) (r : ℕ) (p : ℝ≥0∞) (t : ℝ) : + modulusOn μ U r p f t ≤ modulusOn μ O r p f t := + iSup₂_mono fun h _ => eLpNorm_mono + ((aestronglyMeasurable_higherDiff hf r h).indicator (measurableSet_stepSet hU r h)) + fun x => norm_indicator_le_of_subset (stepSet_mono hUO r h) _ x + +/-- `ω_r(f, t, U)_p ≤ 2^r ‖f‖_{L_p(U)}`. -/ +theorem modulusOn_le {f : V → ℂ} (hf : AEStronglyMeasurable f μ) {U : Set V} + (hU : MeasurableSet U) {p : ℝ≥0∞} (hp : 1 ≤ p) (r : ℕ) (t : ℝ) : + modulusOn μ U r p f t ≤ 2 ^ r * eLpNorm (U.indicator f) p μ := by + rw [← modulusOn_indicator] + exact (modulusOn_le_modulus hU r p _ t).trans (modulus_le (hf.indicator hU) hp r t) + +/-- **The modulus on `U` depends only on the class of `f` on `U`**: if `1_U f = 1_U g` almost +everywhere, then `ω_r(f, t, U)_p = ω_r(g, t, U)_p`. -/ +theorem modulusOn_congr_ae {U : Set V} {f g : V → ℂ} (hfg : U.indicator f =ᵐ[μ] U.indicator g) + (r : ℕ) (p : ℝ≥0∞) (t : ℝ) : modulusOn μ U r p f t = modulusOn μ U r p g t := by + rw [← modulusOn_indicator U r p f, ← modulusOn_indicator U r p g] + simp only [modulusOn] + congr 1 + funext h + congr 1 + funext _ + refine eLpNorm_congr_ae ?_ + filter_upwards [higherDiff_congr_ae hfg r h] with x hx + by_cases hxU : x ∈ stepSet U r h + · rw [Set.indicator_of_mem hxU, Set.indicator_of_mem hxU, hx] + · rw [Set.indicator_of_notMem hxU, Set.indicator_of_notMem hxU] + +/-! ### The modulus on a set at dyadic scales -/ + +variable {p : ℝ≥0∞} + +variable (p) in +/-- The modulus on `U` of an element of `L_p` at the dyadic scale `2^(-k)`. -/ +noncomputable def lpModulusOn (U : Set V) (r : ℕ) (f : Lp ℂ p μ) (k : ℕ) : ℝ≥0∞ := + modulusOn μ U r p (f : V → ℂ) (1 / 2 ^ k) + +omit [BorelSpace V] [μ.IsAddHaarMeasure] in +/-- The modulus on `U` decreases along the dyadic scales. -/ +theorem lpModulusOn_succ_le (U : Set V) (r : ℕ) (f : Lp ℂ p μ) (k : ℕ) : + lpModulusOn p U r f (k + 1) ≤ lpModulusOn p U r f k := + modulusOn_mono U r p _ (one_div_le_one_div_of_le (by positivity) + (pow_le_pow_right₀ one_le_two (Nat.le_succ k))) + +omit [μ.IsAddHaarMeasure] in +/-- `ω_r(f, 2^(-k), U)_p ≤ ω_r(f, 2^(-k))_p` on `L_p`. -/ +theorem lpModulusOn_le_lpModulus [Fact (1 ≤ p)] {U : Set V} (hU : MeasurableSet U) (r : ℕ) + (f : Lp ℂ p μ) (k : ℕ) : lpModulusOn p U r f k ≤ lpModulus p r f k := + modulusOn_le_modulus hU r p _ _ + +/-- The modulus on a set at the dyadic scales grows with the set. -/ +theorem lpModulusOn_mono_set {U O : Set V} (hU : MeasurableSet U) (hUO : U ⊆ O) (r : ℕ) + (f : Lp ℂ p μ) (k : ℕ) : lpModulusOn p U r f k ≤ lpModulusOn p O r f k := + modulusOn_mono_set (Lp.aestronglyMeasurable f) hU hUO r p _ + +/-- Elements of `L_p` that agree on `U` have the same moduli on `U`. -/ +theorem lpModulusOn_congr {U : Set V} {f g : Lp ℂ p μ} + (hfg : U.indicator f =ᵐ[μ] U.indicator g) (r k : ℕ) : + lpModulusOn p U r f k = lpModulusOn p U r g k := + modulusOn_congr_ae hfg r p _ + +omit [BorelSpace V] [μ.IsAddHaarMeasure] in +/-- `ω_r(c f, t, U)_p = |c| ω_r(f, t, U)_p`. -/ +theorem modulusOn_const_smul (U : Set V) (r : ℕ) (p : ℝ≥0∞) (c : ℂ) (f : V → ℂ) (t : ℝ) : + modulusOn μ U r p (c • f) t = ‖c‖ₑ * modulusOn μ U r p f t := by + simp only [modulusOn, fwdDiff_iter_const_smul, ENNReal.mul_iSup] + congr 1 + funext h + congr 1 + funext _ + rw [← eLpNorm_const_smul] + congr 1 + funext x + by_cases hx : x ∈ stepSet U r h + · simp only [Set.indicator_of_mem hx, Pi.smul_apply] + · simp only [Set.indicator_of_notMem hx, Pi.smul_apply, smul_zero] + +/-- The dyadic moduli on `U` are homogeneous: `ω_r(c f, 2^(-k), U)_p = |c| ω_r(f, 2^(-k), U)_p`. -/ +theorem lpModulusOn_const_smul (U : Set V) (r : ℕ) (c : ℂ) (f : Lp ℂ p μ) (k : ℕ) : + lpModulusOn p U r (c • f) k = ‖c‖ₑ * lpModulusOn p U r f k := by + have h : U.indicator ((c • f : Lp ℂ p μ) : V → ℂ) =ᵐ[μ] U.indicator (c • (f : V → ℂ)) := by + filter_upwards [Lp.coeFn_smul c f] with x hx + by_cases hxU : x ∈ U + · rw [Set.indicator_of_mem hxU, Set.indicator_of_mem hxU, hx] + · rw [Set.indicator_of_notMem hxU, Set.indicator_of_notMem hxU] + rw [lpModulusOn, modulusOn_congr_ae h, modulusOn_const_smul] + rfl + +/-- The modulus on `U` of elements of `L_p` is subadditive. -/ +theorem lpModulusOn_add_le [Fact (1 ≤ p)] (U : Set V) (r : ℕ) (f g : Lp ℂ p μ) (k : ℕ) : + lpModulusOn p U r (f + g) k ≤ lpModulusOn p U r f k + lpModulusOn p U r g k := by + rw [lpModulusOn, modulusOn_congr_ae (g := (f : V → ℂ) + (g : V → ℂ)) ?_ r p _] + · exact modulusOn_add_le Fact.out U r _ _ _ + · filter_upwards [Lp.coeFn_add f g] with x hx + by_cases hxU : x ∈ U + · rw [Set.indicator_of_mem hxU, Set.indicator_of_mem hxU, hx] + · rw [Set.indicator_of_notMem hxU, Set.indicator_of_notMem hxU] + +/-- `ω_r(f, 2^(-k), U)_p ≤ 2^r ‖f‖_p` on `L_p`. -/ +theorem lpModulusOn_le [Fact (1 ≤ p)] {U : Set V} (hU : MeasurableSet U) (r : ℕ) (f : Lp ℂ p μ) + (k : ℕ) : lpModulusOn p U r f k ≤ 2 ^ r * ‖f‖ₑ := + (modulusOn_le (Lp.aestronglyMeasurable f) hU Fact.out r _).trans + (mul_le_mul' le_rfl + ((eLpNorm_indicator_le _ hU.nullMeasurableSet).trans_eq (Lp.eNorm_def f).symm)) + +/-- **The modulus on `Ω` through a function on `V`**: for a measurable `Ω`, `p ≥ 1` and +`f, G ∈ L_p`, `ω_r(f, 2^(-k), Ω)_p ≤ 2^r ‖1_Ω (f - G)‖_p + ω_r(G, 2^(-k))_p`. Split +`f = (f - G) + G` (`Rd.lpModulusOn_add_le`); the modulus of `f - G` on `Ω` sees only +`1_Ω (f - G)` (`Rd.lpModulusOn_congr`, `Rd.lpModulusOn_le`), and that of `G` is at most its +modulus on `V` (`Rd.lpModulusOn_le_lpModulus`). -/ +theorem lpModulusOn_le_add_lpModulus [Fact (1 ≤ p)] {Ω : Set V} (hΩ : MeasurableSet Ω) (r : ℕ) + (f G : Lp ℂ p μ) (k : ℕ) : + lpModulusOn p Ω r f k ≤ 2 ^ r * ‖indicatorLp hΩ (f - G)‖ₑ + lpModulus p r G k := by + have hfG : Ω.indicator ((f - G : Lp ℂ p μ) : V → ℂ) =ᵐ[μ] + Ω.indicator (indicatorLp hΩ (f - G) : V → ℂ) := by + filter_upwards [indicatorLp_apply_ae hΩ (f - G)] with x hx + by_cases hxΩ : x ∈ Ω + · rw [Set.indicator_of_mem hxΩ, Set.indicator_of_mem hxΩ, hx, Set.indicator_of_mem hxΩ] + · rw [Set.indicator_of_notMem hxΩ, Set.indicator_of_notMem hxΩ] + calc lpModulusOn p Ω r f k = lpModulusOn p Ω r ((f - G) + G) k := by rw [sub_add_cancel] + _ ≤ lpModulusOn p Ω r (f - G) k + lpModulusOn p Ω r G k := lpModulusOn_add_le Ω r _ _ k + _ ≤ 2 ^ r * ‖indicatorLp hΩ (f - G)‖ₑ + lpModulus p r G k := by + gcongr + · rw [lpModulusOn_congr hfG r k] + exact lpModulusOn_le hΩ r _ k + · exact lpModulusOn_le_lpModulus hΩ r G k + +/-! ### The intrinsic quasi-norm -/ + +section ModNormOn + +variable [Fact (1 ≤ p)] {Ω : Set V} (hΩ : MeasurableSet Ω) + +omit [BorelSpace V] [μ.IsAddHaarMeasure] in +/-- The **intrinsic Besov quasi-norm** on a measurable set `Ω`: +`N_Ω(G) = ‖1_Ω G‖_p + ‖(2^(ks) ω_r(G, 2^(-k), Ω)_p)_k‖_{ℓ_q}`. -/ +noncomputable def modNormOn (r : ℕ) (s : ℝ) (q : ℝ≥0∞) (G : Lp ℂ p μ) : ℝ≥0∞ := + ‖indicatorLp hΩ G‖ₑ + lqNorm q (fun k => dyadicWeight s k * lpModulusOn p Ω r G k) + +/-- **The intrinsic quasi-norm sees only `1_Ω G`**: equal cut-offs give equal quasi-norms. -/ +theorem modNormOn_congr {r : ℕ} {s : ℝ} {q : ℝ≥0∞} {G₁ G₂ : Lp ℂ p μ} + (h : indicatorLp hΩ G₁ = indicatorLp hΩ G₂) : + modNormOn hΩ r s q G₁ = modNormOn hΩ r s q G₂ := by + have hae : Ω.indicator G₁ =ᵐ[μ] Ω.indicator G₂ := by + filter_upwards [indicatorLp_apply_ae hΩ G₁, indicatorLp_apply_ae hΩ G₂] with x h1 h2 + rw [← h1, ← h2, h] + simp only [modNormOn, h, lpModulusOn_congr hae] + +/-- `N_Ω(0) = 0`. -/ +theorem modNormOn_zero (r : ℕ) (s : ℝ) (q : ℝ≥0∞) : + modNormOn hΩ r s q (0 : Lp ℂ p μ) = 0 := by + have h : ∀ k, lpModulusOn p Ω r (0 : Lp ℂ p μ) k = 0 := fun k => + le_antisymm ((lpModulusOn_le_lpModulus hΩ r 0 k).trans_eq (lpModulus_zero r k)) zero_le + simp only [modNormOn, map_zero, eNorm_zero, h, mul_zero, ENNReal.lqNorm_zero_right, add_zero] + +/-- **The intrinsic quasi-norm is subadditive** for `q ≥ 1`. -/ +theorem modNormOn_add_le (r : ℕ) (s : ℝ) {q : ℝ≥0∞} (hq : 1 ≤ q) (G G' : Lp ℂ p μ) : + modNormOn hΩ r s q (G + G') ≤ modNormOn hΩ r s q G + modNormOn hΩ r s q G' := by + have h1 : ‖indicatorLp hΩ (G + G')‖ₑ ≤ ‖indicatorLp hΩ G‖ₑ + ‖indicatorLp hΩ G'‖ₑ := by + rw [map_add] + exact eNorm_add_le _ _ + have h2 : lqNorm q (fun k => dyadicWeight s k * lpModulusOn p Ω r (G + G') k) ≤ + lqNorm q (fun k => dyadicWeight s k * lpModulusOn p Ω r G k) + + lqNorm q (fun k => dyadicWeight s k * lpModulusOn p Ω r G' k) := + (ENNReal.lqNorm_mono fun k => (mul_le_mul' le_rfl (lpModulusOn_add_le Ω r G G' k)).trans_eq + (mul_add _ _ _)).trans (ENNReal.lqNorm_add_le hq _ _) + calc modNormOn hΩ r s q (G + G') + ≤ (‖indicatorLp hΩ G‖ₑ + ‖indicatorLp hΩ G'‖ₑ) + + (lqNorm q (fun k => dyadicWeight s k * lpModulusOn p Ω r G k) + + lqNorm q (fun k => dyadicWeight s k * lpModulusOn p Ω r G' k)) := add_le_add h1 h2 + _ = modNormOn hΩ r s q G + modNormOn hΩ r s q G' := by + simp only [modNormOn] + ring + +/-- **The intrinsic quasi-norm is homogeneous**: `N_Ω(c G) = |c| N_Ω(G)`. -/ +theorem modNormOn_const_smul (r : ℕ) (s : ℝ) (q : ℝ≥0∞) (c : ℂ) (G : Lp ℂ p μ) : + modNormOn hΩ r s q (c • G) = ‖c‖ₑ * modNormOn hΩ r s q G := by + have h : (fun k => dyadicWeight s k * lpModulusOn p Ω r (c • G) k) = + fun k => ‖c‖ₑ * (dyadicWeight s k * lpModulusOn p Ω r G k) := funext fun k => by + rw [lpModulusOn_const_smul] + ring + simp only [modNormOn, map_smul, eNorm_smul, h, ENNReal.lqNorm_const_mul, mul_add] + +/-- **The intrinsic quasi-norm of a finite sum** is at most the sum of the quasi-norms. -/ +theorem modNormOn_finsetSum_le (r : ℕ) (s : ℝ) {q : ℝ≥0∞} (hq : 1 ≤ q) {ι : Type*} + (t : Finset ι) (G : ι → Lp ℂ p μ) : + modNormOn hΩ r s q (∑ i ∈ t, G i) ≤ ∑ i ∈ t, modNormOn hΩ r s q (G i) := by + classical + induction t using Finset.induction_on with + | empty => simp [modNormOn_zero] + | insert a t ha ih => + rw [Finset.sum_insert ha, Finset.sum_insert ha] + exact (modNormOn_add_le hΩ r s hq _ _).trans (add_le_add le_rfl ih) + +end ModNormOn + +/-- **The intrinsic quasi-norm grows with the set**: for measurable `T ⊆ U`, +`N_T(f) ≤ N_U(f)`, where `N_U(f) = ‖1_U f‖_p + ‖(2^(ks) ω_r(f, 2^(-k), U)_p)_k‖_{ℓ_q}` +(`Rd.lpModulusOn_mono_set`). -/ +theorem modNormOn_mono_set [Fact (1 ≤ p)] {T U : Set V} (hT : MeasurableSet T) + (hU : MeasurableSet U) (hTU : T ⊆ U) (r : ℕ) (s : ℝ) (q : ℝ≥0∞) (f : Lp ℂ p μ) : + modNormOn hT r s q f ≤ modNormOn hU r s q f := by + unfold modNormOn + refine add_le_add ?_ (ENNReal.lqNorm_mono fun k => + mul_le_mul' le_rfl (lpModulusOn_mono_set hT hTU r f k)) + rw [Lp.eNorm_def, Lp.eNorm_def, eLpNorm_congr_ae (indicatorLp_apply_ae hT f), + eLpNorm_congr_ae (indicatorLp_apply_ae hU f)] + exact eLpNorm_mono ((Lp.aestronglyMeasurable f).indicator hT) + fun x => norm_indicator_le_of_subset hTU _ x + +/-- **Restrictions have finite intrinsic moduli**: if `1_O F = 1_O f` for a measurable `O`, the +intrinsic quasi-norm of `f` on `O` is at most the quasi-norm of `F` on `V`. -/ +theorem modNormOn_le_modNorm_of_indicatorLp [Fact (1 ≤ p)] {O : Set V} (hO : MeasurableSet O) + (r : ℕ) (s : ℝ) (q : ℝ≥0∞) {F f : Lp ℂ p μ} (hFf : indicatorLp hO F = indicatorLp hO f) : + modNormOn hO r s q f ≤ ‖F‖ₑ + lqNorm q (fun k => dyadicWeight s k * lpModulus p r F k) := by + have hae : O.indicator F =ᵐ[μ] O.indicator f := by + filter_upwards [indicatorLp_apply_ae hO F, indicatorLp_apply_ae hO f] with x h1 h2 + rw [← h1, ← h2, hFf] + unfold modNormOn + refine add_le_add ?_ (ENNReal.lqNorm_mono fun k => mul_le_mul' le_rfl ?_) + · rw [← hFf] + exact enorm_indicatorLp_le hO F + · rw [← lpModulusOn_congr hae r k] + exact lpModulusOn_le_lpModulus hO r F k + +omit [BorelSpace V] [μ.IsAddHaarMeasure] in +/-- On `U = V` the intrinsic quasi-norm is the quasi-norm of `V`: +`N_V(f) = ‖f‖_p + ‖(2^(ks) ω_r(f, 2^(-k))_p)_k‖_{ℓ_q}` (`Rd.modulusOn_univ`). -/ +theorem modNormOn_univ [Fact (1 ≤ p)] (r : ℕ) (s : ℝ) (q : ℝ≥0∞) (f : Lp ℂ p μ) : + modNormOn MeasurableSet.univ r s q f = + ‖f‖ₑ + lqNorm q (fun k => dyadicWeight s k * lpModulus p r f k) := by + have h1 : ‖indicatorLp MeasurableSet.univ f‖ₑ = ‖f‖ₑ := by + rw [Lp.eNorm_def, Lp.eNorm_def, eLpNorm_congr_ae (indicatorLp_apply_ae _ f), + Set.indicator_univ] + have h2 : ∀ k, lpModulusOn p (Set.univ : Set V) r f k = lpModulus p r f k := fun k => by + rw [lpModulusOn, modulusOn_univ, lpModulus] + simp_rw [modNormOn, h1, h2] + +end Rd + +namespace Rd + +variable {V : Type*} [NormedAddCommGroup V] [InnerProductSpace ℝ V] [FiniteDimensional ℝ V] + [MeasurableSpace V] [BorelSpace V] + +/-! ### Changing the set by a null set -/ + +/-- **Step sets of almost equal sets are almost equal**: the translates by `l h` of almost equal +sets are almost equal, by the translation invariance of the Lebesgue measure. -/ +theorem stepSet_ae_eq {U U' : Set V} (hUU' : U =ᵐ[volume] U') (r : ℕ) (h : V) : + stepSet U r h =ᵐ[volume] stepSet U' r h := by + have hl : ∀ l : ℕ, ∀ᵐ x ∂(volume : Measure V), + (x + (l : ℝ) • h ∈ U) = (x + (l : ℝ) • h ∈ U') := fun l => + (measurePreserving_add_right volume ((l : ℝ) • h)).quasiMeasurePreserving.ae_eq_comp + (hUU'.mono fun _ hx => propext hx) + filter_upwards [ae_all_iff.2 hl] with x hx + exact forall₂_congr fun l _ => (hx l).to_iff + +/-- **The modulus on a set does not see null sets**: `ω_r(f, t, U)_p = ω_r(f, t, U')_p` if `U` +and `U'` agree up to a null set. -/ +theorem modulusOn_congr_set {U U' : Set V} (hUU' : U =ᵐ[volume] U') (r : ℕ) (p : ℝ≥0∞) + (f : V → ℂ) (t : ℝ) : modulusOn volume U r p f t = modulusOn volume U' r p f t := by + simp only [modulusOn] + congr 1 + funext h + congr 1 + funext _ + exact eLpNorm_congr_ae (indicator_ae_eq_of_ae_eq_set (stepSet_ae_eq hUU' r h)) + +/-- The dyadic moduli on almost equal sets agree. -/ +theorem lpModulusOn_congr_set {p : ℝ≥0∞} {U U' : Set V} (hUU' : U =ᵐ[volume] U') (r : ℕ) + (f : Lp ℂ p (volume : Measure V)) (k : ℕ) : + lpModulusOn p U r f k = lpModulusOn p U' r f k := + modulusOn_congr_set hUU' r p _ _ + +/-- The cut-offs to almost equal sets agree. -/ +theorem indicatorLp_congr_set {p : ℝ≥0∞} [Fact (1 ≤ p)] {U U' : Set V} (hU : MeasurableSet U) + (hU' : MeasurableSet U') (hUU' : U =ᵐ[volume] U') (f : Lp ℂ p (volume : Measure V)) : + indicatorLp hU f = indicatorLp hU' f := by + refine Lp.ext ?_ + filter_upwards [indicatorLp_apply_ae hU f, indicatorLp_apply_ae hU' f, + indicator_ae_eq_of_ae_eq_set (f := (f : V → ℂ)) hUU'] with x h1 h2 h3 + rw [h1, h2, h3] + +/-- **Sets that agree up to a null set have the same intrinsic quasi-norm**: `N_U(G) = N_{U'}(G)` +if `U` and `U'` agree up to a null set (`Rd.indicatorLp_congr_set`, `Rd.lpModulusOn_congr_set`). -/ +theorem modNormOn_congr_set {p : ℝ≥0∞} [Fact (1 ≤ p)] {U U' : Set V} (hU : MeasurableSet U) + (hU' : MeasurableSet U') (hUU' : U =ᵐ[volume] U') (r : ℕ) (s : ℝ) (q : ℝ≥0∞) + (G : Lp ℂ p (volume : Measure V)) : modNormOn hU r s q G = modNormOn hU' r s q G := by + simp only [modNormOn, indicatorLp_congr_set hU hU' hUU' G, lpModulusOn_congr_set hUU' r G] + +end Rd diff --git a/LeanPool/FunctionSpaces/Analysis/Differences/TranslationAlgebra.lean b/LeanPool/FunctionSpaces/Analysis/Differences/TranslationAlgebra.lean new file mode 100644 index 0000000000..682b20b04e --- /dev/null +++ b/LeanPool/FunctionSpaces/Analysis/Differences/TranslationAlgebra.lean @@ -0,0 +1,190 @@ +/- +Copyright (c) 2026 Mario Ullrich. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Mario Ullrich +-/ +module + +public import LeanPool.FunctionSpaces.Analysis.Differences.Differences +public import Mathlib.Algebra.MonoidAlgebra.Basic + +/- +Modified for Lean Pool: module names and imports adapted. +-/ + +/-! +# The translation algebra + +For an additive commutative monoid `G`, the commutative algebra `ℂ[G]` (Mathlib's +`AddMonoidAlgebra`) acts on functions `G → ℂ` by an algebra homomorphism +(`TranslationAlgebra.diffAct`, from Mathlib's `AddMonoidAlgebra.lift`): the generator `δ_v` acts +by the translation `τ_v f(x) = f(x + v)` (`TranslationAlgebra.transl`). The difference of order +`r` is a power, `Δ_h^r = (δ_h - 1)^r` (`TranslationAlgebra.higherDiff_eq_diffAct`), so identities +between differences become ring identities in `ℂ[G]`. + +On `ℝ^d = Fin d → ℝ`, with `δ_i = δ_{h_i e_i}`, `δ_h = ∏_i δ_i` and +`δ_h - 1 = ∑_i (δ_i - 1) ∏_{j α l = i).card + +/-- The multiplicities of a word add up to its length. -/ +theorem sum_count {r : ℕ} (α : Fin r → Fin d) : ∑ i, count α i = r := by + simp only [count] + rw [← Finset.card_eq_sum_card_fiberwise (fun l _ => Finset.mem_univ (α l)), Finset.card_univ, + Fintype.card_fin] + +/-- The vector `∑_{j < i} h_j e_j`. -/ +def lowerVec (h : Fin d → ℝ) (i : Fin d) : Fin d → ℝ := fun c => if c < i then h c else 0 + +/-- The shift `s_α = ∑_l ∑_{j < α_l} h_j e_j` of the term of a word `α`. -/ +def shiftVec {r : ℕ} (h : Fin d → ℝ) (α : Fin r → Fin d) : Fin d → ℝ := ∑ l, lowerVec h (α l) + +/-- The coordinates of the shift: `(s_α)_c = #{l : c < α_l} h_c`. -/ +theorem shiftVec_apply {r : ℕ} (h : Fin d → ℝ) (α : Fin r → Fin d) (c : Fin d) : + shiftVec h α c = (Finset.univ.filter fun l => c < α l).card * h c := by + simp only [shiftVec, lowerVec, Finset.sum_apply] + rw [← Finset.sum_filter, Finset.sum_const, nsmul_eq_mul] + +/-- The shift and the multiplicity of a coordinate add up to at most the length of the word: +`#{l : c < α_l} + #{l : α_l = c} ≤ r`. -/ +theorem card_lt_add_count_le {r : ℕ} (α : Fin r → Fin d) (c : Fin d) : + (Finset.univ.filter fun l => c < α l).card + count α c ≤ r := by + rw [count, ← Finset.card_union_of_disjoint] + · calc _ ≤ (Finset.univ : Finset (Fin r)).card := Finset.card_le_univ _ + _ = r := by rw [Finset.card_univ, Fintype.card_fin] + · rw [Finset.disjoint_filter] + intro l _ hl heq + rw [heq] at hl + exact lt_irrefl c hl + +/-- The lower products: `∏_{j < i} δ_{h_j e_j} = δ_{∑_{j rw [← Finset.univ_sum_single h] + rw [single_sum_one] + exact Finset.prod_congr rfl fun i _ => by rw [coordElem, add_sub_cancel] + rw [hprod, Finset.prod_add_ordered] + simp only [Finset.prod_const_one, mul_one, add_sub_cancel_left] + refine Finset.sum_congr rfl fun i _ => ?_ + rw [← prod_lt_single] + congr 1 + exact Finset.prod_congr rfl fun j _ => by rw [coordElem, add_sub_cancel] + +/-- **The expansion in the translation algebra**: +`(δ_h - 1)^r = ∑_α δ_{s_α} ∏_i (δ_{h_i e_i} - 1)^{m_i(α)}`, summed over the words +`α : Fin r → Fin d`. -/ +theorem single_sub_one_pow_eq_sum (r : ℕ) (h : Fin d → ℝ) : + (AddMonoidAlgebra.single h (1 : ℂ) - 1) ^ r = ∑ α : Fin r → Fin d, + AddMonoidAlgebra.single (shiftVec h α) 1 * ∏ i, coordElem h i ^ count α i := by + classical + rw [single_sub_one_eq_sum, ← Fin.prod_const, Finset.prod_univ_sum, Fintype.piFinset_univ] + refine Finset.sum_congr rfl fun α _ => ?_ + rw [Finset.prod_mul_distrib, mul_comm] + congr 1 + · rw [shiftVec, single_sum_one] + · rw [← Finset.prod_fiberwise Finset.univ α fun l => coordElem h (α l)] + refine Finset.prod_congr rfl fun i _ => ?_ + rw [Finset.prod_congr rfl fun l hl => by rw [(Finset.mem_filter.1 hl).2], + Finset.prod_const, count] + +end Coordinates + +end TranslationAlgebra diff --git a/LeanPool/FunctionSpaces/Analysis/Fourier/ApproxIdentity.lean b/LeanPool/FunctionSpaces/Analysis/Fourier/ApproxIdentity.lean new file mode 100644 index 0000000000..0a6ff929d7 --- /dev/null +++ b/LeanPool/FunctionSpaces/Analysis/Fourier/ApproxIdentity.lean @@ -0,0 +1,533 @@ +/- +Copyright (c) 2026 Mario Ullrich. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Mario Ullrich +-/ +module + +public import LeanPool.FunctionSpaces.Analysis.Fourier.Convolution +public import Mathlib.MeasureTheory.Measure.Haar.InnerProductSpace +public import Mathlib.MeasureTheory.Function.LpSpace.DomAct.Continuous +public import Mathlib.MeasureTheory.Measure.Haar.NormedSpace +public import Mathlib.MeasureTheory.Integral.Lebesgue.DominatedConvergence + +/- +Modified for Lean Pool: module names and imports adapted. +-/ + +/-! +# Approximate identities in `L_p` + +**Changes of scale**: `∫ f(r x) dμ(x) = |r|^(-n) ∫ f dμ` for `r ≠ 0`, every additive Haar +measure `μ` and every `f : V → [0, ∞]`, also over sets (`Rd.lintegral_comp_smul`, +`Rd.setLIntegral_comp_smul`, `Rd.lintegral_comp_two_pow_smul`). + +The **dilation** `Φ_c(x) = c^n Φ(c x)`, `n = dim V`, keeps the integral and the `L_1` norm of `Φ` +(`Rd.integral_dilate`, `Rd.lintegral_enorm_dilate`, `Rd.eLpNorm_dilate_one`) and compact +supports (`Rd.hasCompactSupport_dilate`); every `x` in its support has `c x` in the support of +`Φ`, so the support shrinks into small balls as `c → ∞` +(`Rd.smul_mem_tsupport_of_mem_tsupport_dilate`, `Rd.norm_le_of_mem_tsupport_dilate`, +`Rd.eventually_tsupport_dilate_add_subset_thickening`). The convolution with `Φ_c` averages `f` +over the shifts `c^(-1) z` weighted by `Φ(z)`: `(Φ_c ⋆ f)(x) = ∫ Φ(z) f(x - c^(-1) z) dz` +(`Rd.conv_dilate_apply`, Mathlib's `Measure.integral_comp_smul`). + +**Approximate identities** (`Rd.tendsto_eLpNorm_conv_dilate_sub`): for an integrable `Φ` with +`∫ Φ = 1` and `f ∈ L_p`, `1 ≤ p < ∞`, `‖Φ_c ⋆ f - f‖_p → 0` as `c → ∞`. With `∫ Φ = 1`, +`(Φ_c ⋆ f)(x) - f(x) = ∫ Φ(z) (f(x - c^(-1) z) - f(x)) dz`, and the weighted Jensen inequality +gives `‖Φ_c ⋆ f - f‖_p^p ≤ ‖Φ‖_1^(p-1) ∫ |Φ(z)| ‖f(· - c^(-1) z) - f‖_p^p dz` +(`Rd.eLpNorm_conv_dilate_sub_le`). Translation is +continuous in `L_p` (`Rd.continuous_eLpNorm_comp_sub_sub`, from Mathlib's continuity of the +action of `V` on `L_p` by translation of the domain), so the integrand tends to `0`, and dominated +convergence applies with the bound `|Φ(z)| (2 ‖f‖_p)^p`. For the operators of `Rd.convLp` this +reads `Φ_{c_i} ⋆ f → f` in `L_p` along any dilation factors `c_i → ∞` +(`Rd.tendsto_convLp_dilate`). Uniformly bounded operators with `T_i f → f` also satisfy +`T_i (T_i f) → f` (`Rd.tendsto_apply_apply_of_tendsto`). + +**At points of continuity** (`Rd.conv_dilate_near`): for `Φ` vanishing outside a ball, +`(Φ_{2^J} ⋆ F_J)(z) → z₀` as `J → ∞` and `z → y` whenever `F_J(z) → z₀` as `J → ∞` and `z → y`. + +**First moments of dilates** (`Rd.integral_inner_mul_dilate`): `∫ ⟪w, x⟫ Φ_c(x) dx` is `c⁻¹` times +the first moment of `Φ`, since `⟪w, x⟫ Φ_c(x) = c⁻¹ (⟪w, ·⟫ Φ)_c(x)` (`Rd.inner_mul_dilate_eq`). +-/ + +@[expose] public section + +open MeasureTheory Filter Topology Module +open scoped ENNReal + +namespace Rd + +variable {V : Type*} [NormedAddCommGroup V] [NormedSpace ℝ V] [FiniteDimensional ℝ V] + [MeasurableSpace V] [BorelSpace V] {μ : Measure V} [μ.IsAddHaarMeasure] + +/-! ### Continuity of translation -/ + +/-- **Continuity of translation in `L_p`**, `1 ≤ p < ∞`: `w ↦ ‖f(· - w) - f‖_p` is continuous, +from Mathlib's continuity of the action of `V` on `L_p` by translation of the domain +(`Lp.instContinuousVAddDomAddAct`). -/ +theorem continuous_eLpNorm_comp_sub_sub {p : ℝ≥0∞} [Fact (1 ≤ p)] (hp : p ≠ ∞) {f : V → ℂ} + (hf : MemLp f p μ) : Continuous fun w : V => eLpNorm (fun x => f (x - w) - f x) p μ := by + have : Fact (p ≠ ∞) := ⟨hp⟩ + set G : V → Lp ℂ p μ := fun w => + (hf.comp_measurePreserving (measurePreserving_vadd (-w) μ)).toLp (fun x => f (-w +ᵥ x)) + have hc : Continuous fun w : V => DomAddAct.mk (-w) +ᵥ hf.toLp f := + (DomAddAct.continuous_mk.comp continuous_neg).vadd continuous_const + have hG : Continuous G := hc.congr fun w => DomAddAct.mk_vadd_toLp (-w) hf + have hT : Continuous fun w : V => ‖G w - hf.toLp f‖ₑ := (hG.sub continuous_const).eNorm + refine hT.congr fun w => ?_ + simp only [G] + rw [← MemLp.toLp_sub, Lp.eNorm_toLp] + congr 1 + funext x + simp only [Pi.sub_apply, vadd_eq_add, neg_add_eq_sub] + +omit [NormedSpace ℝ V] [FiniteDimensional ℝ V] in +/-- `‖f(· - w)‖_p = ‖f‖_p`: translation preserves `L_p` norms. -/ +theorem eLpNorm_comp_sub_right {f : V → ℂ} (hf : AEStronglyMeasurable f μ) (p : ℝ≥0∞) (w : V) : + eLpNorm (fun x => f (x - w)) p μ = eLpNorm f p μ := + eLpNorm_comp_measurePreserving hf (measurePreserving_sub_right μ w) + +/-! ### Changes of scale -/ + +/-- **Integrals under a change of scale**: `∫ f(r x) dμ(x) = |r^(-n)| ∫ f dμ` for `r ≠ 0`, every +additive Haar measure `μ` and every `f : V → [0, ∞]` (Mathlib's `Measure.map_addHaar_smul`). -/ +theorem lintegral_comp_smul (f : V → ℝ≥0∞) {r : ℝ} (hr : r ≠ 0) : + ∫⁻ x, f (r • x) ∂μ = ENNReal.ofReal |(r ^ finrank ℝ V)⁻¹| * ∫⁻ x, f x ∂μ := by + rw [← smul_eq_mul, ← lintegral_smul_measure, ← Measure.map_addHaar_smul μ hr] + exact (lintegral_map_equiv f (Homeomorph.smulOfNeZero r hr).toMeasurableEquiv).symm + +open scoped Pointwise in +/-- The set version of `Rd.lintegral_comp_smul`: `∫_s f(r x) dμ(x) = |r^(-n)| ∫_{r s} f dμ` for +every set `s`, since `x ↦ r x` is a measurable equivalence (Mathlib's +`MeasurableEmbedding.restrict_map`). -/ +theorem setLIntegral_comp_smul (f : V → ℝ≥0∞) {r : ℝ} (hr : r ≠ 0) (s : Set V) : + ∫⁻ x in s, f (r • x) ∂μ = ENNReal.ofReal |(r ^ finrank ℝ V)⁻¹| * ∫⁻ x in r • s, f x ∂μ := by + let e := (Homeomorph.smulOfNeZero (α := V) r hr).toMeasurableEquiv + have hpre : e ⁻¹' (r • s) = s := by + ext x + exact Set.smul_mem_smul_set_iff₀ hr s x + rw [← smul_eq_mul, ← lintegral_smul_measure, ← Measure.restrict_smul, + ← Measure.map_addHaar_smul μ hr] + rw [show (fun x : V => r • x) = ⇑e from rfl, e.measurableEmbedding.restrict_map, + lintegral_map_equiv, hpre] + rfl + +omit [FiniteDimensional ℝ V] [MeasurableSpace V] [BorelSpace V] in +open scoped Pointwise in +/-- `r {z : a ≤ ‖z‖} = {u : r a ≤ ‖u‖}` for `r > 0`. -/ +theorem smul_setOf_le_norm {r : ℝ} (hr : 0 < r) (a : ℝ) : + r • {z : V | a ≤ ‖z‖} = {u : V | r * a ≤ ‖u‖} := by + ext u + rw [Set.mem_smul_set_iff_inv_smul_mem₀ hr.ne', Set.mem_ofPred_eq, Set.mem_ofPred_eq, norm_smul, + Real.norm_of_nonneg (inv_nonneg.2 hr.le), le_inv_mul_iff₀ hr] + +/-- `∫ f(2^j x) dμ(x) = 2^(-jn) ∫ f dμ`. -/ +theorem lintegral_comp_two_pow_smul (f : V → ℝ≥0∞) (j : ℕ) : + ∫⁻ x, f (((2 : ℝ) ^ j) • x) ∂μ = (2 ^ (j * finrank ℝ V))⁻¹ * ∫⁻ x, f x ∂μ := by + rw [lintegral_comp_smul f (by positivity), abs_of_pos (by positivity), ← pow_mul, + ENNReal.ofReal_inv_of_pos (by positivity), ENNReal.ofReal_pow zero_le_two, + ENNReal.ofReal_ofNat] + +/-! ### Dilations -/ + +/-- The **dilation** `Φ_c(x) = c^n Φ(c x)`, `n = dim V`, which keeps the integral of `Φ`. -/ +noncomputable def dilate (c : ℝ) (Φ : V → ℂ) (x : V) : ℂ := + (((c ^ finrank ℝ V : ℝ)) : ℂ) * Φ (c • x) + +/-- Dilations of integrable functions are integrable. -/ +theorem integrable_dilate {Φ : V → ℂ} (hΦ : Integrable Φ μ) {c : ℝ} (hc : c ≠ 0) : + Integrable (dilate c Φ) μ := + (hΦ.comp_smul hc).const_mul _ + +omit [FiniteDimensional ℝ V] [MeasurableSpace V] [BorelSpace V] in +/-- Dilates of compactly supported functions have compact support. -/ +theorem hasCompactSupport_dilate {K : V → ℂ} (hK : HasCompactSupport K) {c : ℝ} (hc : c ≠ 0) : + HasCompactSupport (dilate c K) := + (hK.comp_homeomorph (Homeomorph.smulOfNeZero c hc)).mul_left + +omit [FiniteDimensional ℝ V] [MeasurableSpace V] [BorelSpace V] in +/-- **The support of a dilation**: if `x` lies in the closed support of `Φ_c`, `c ≠ 0`, then +`c x` lies in the closed support of `Φ`; the closed support of `Φ_c` lies in the preimage of that +of `Φ` under `x ↦ c x` (Mathlib's `tsupport_comp_eq_preimage`). -/ +theorem smul_mem_tsupport_of_mem_tsupport_dilate {η : V → ℂ} {c : ℝ} (hc : c ≠ 0) {x : V} + (hx : x ∈ tsupport (dilate c η)) : c • x ∈ tsupport η := by + have h1 : tsupport (dilate c η) ⊆ tsupport (η ∘ Homeomorph.smulOfNeZero c hc) := + tsupport_mul_subset_right (f := fun _ => (((c ^ finrank ℝ V : ℝ)) : ℂ)) + have h2 := h1 hx + rw [tsupport_comp_eq_preimage] at h2 + exact h2 + +omit [FiniteDimensional ℝ V] [MeasurableSpace V] [BorelSpace V] in +/-- **Dilated supports shrink**: if the closed support of `η` lies in `B̄(0, R)` and `c > 0`, the +closed support of `η_c` lies in `B̄(0, R/c)`. -/ +theorem norm_le_of_mem_tsupport_dilate {η : V → ℂ} {R : ℝ} + (hηR : tsupport η ⊆ Metric.closedBall 0 R) {c : ℝ} (hc : 0 < c) {x : V} + (hx : x ∈ tsupport (dilate c η)) : ‖x‖ ≤ R / c := by + have h := hηR (smul_mem_tsupport_of_mem_tsupport_dilate hc.ne' hx) + rw [mem_closedBall_zero_iff, norm_smul, Real.norm_of_nonneg hc.le] at h + rw [le_div_iff₀ hc] + linarith + +omit [FiniteDimensional ℝ V] [MeasurableSpace V] [BorelSpace V] in +open scoped Pointwise in +/-- **Dilated supports plus a set lie in a thickening**: if the closed support of `η` lies in +`B̄(0, R)` and `δ > 0`, then `supp η_{2^n} + S` lies in the `δ`-neighbourhood of `S` for all large +`n`: once `R / 2^n < δ`, `supp η_{2^n} ⊆ B(0, δ)` (`Rd.norm_le_of_mem_tsupport_dilate`), and +`B(0, δ) + S` is the `δ`-neighbourhood of `S` (Mathlib's `ball_add_zero`). -/ +theorem eventually_tsupport_dilate_add_subset_thickening {η : V → ℂ} {R δ : ℝ} + (hηR : tsupport η ⊆ Metric.closedBall 0 R) (hδ : 0 < δ) (S : Set V) : + ∀ᶠ n : ℕ in atTop, tsupport (dilate ((2 : ℝ) ^ n) η) + S ⊆ Metric.thickening δ S := by + filter_upwards [(tendsto_pow_atTop_atTop_of_one_lt one_lt_two).eventually_gt_atTop (R / δ)] + with n hn + have hpos : (0 : ℝ) < 2 ^ n := by positivity + rw [div_lt_iff₀ hδ] at hn + rw [← ball_add_zero] + refine Set.add_subset_add (fun z hz => ?_) subset_rfl + rw [mem_ball_zero_iff] + refine (norm_le_of_mem_tsupport_dilate hηR hpos hz).trans_lt ?_ + rw [div_lt_iff₀ hpos] + linarith + +/-- **The dilation keeps the integral**: `∫ Φ_c = ∫ Φ` for `c > 0` (Mathlib's +`Measure.integral_comp_smul`). -/ +theorem integral_dilate (Φ : V → ℂ) {c : ℝ} (hc : 0 < c) : + ∫ x, dilate c Φ x ∂μ = ∫ x, Φ x ∂μ := by + have hpow : (0 : ℝ) < c ^ finrank ℝ V := pow_pos hc _ + simp only [dilate] + rw [integral_const_mul, Measure.integral_comp_smul μ Φ c, abs_of_pos (inv_pos.2 hpow), + Complex.real_smul, ← mul_assoc, ← Complex.ofReal_mul, mul_inv_cancel₀ hpow.ne', + Complex.ofReal_one, one_mul] + +/-- **Dilations keep the `L_1` norm of every function**: `∫ |F_c| dμ = ∫ |F| dμ` for `c > 0` and +every `F : V → ℂ`, integrable or not, by the change of scale `u = c x` +(`Rd.lintegral_comp_smul`). -/ +theorem lintegral_enorm_dilate (F : V → ℂ) {c : ℝ} (hc : 0 < c) : + ∫⁻ x, ‖dilate c F x‖ₑ ∂μ = ∫⁻ x, ‖F x‖ₑ ∂μ := by + have hpow : (0 : ℝ) < c ^ finrank ℝ V := pow_pos hc _ + have h : ∀ x, ‖dilate c F x‖ₑ = ENNReal.ofReal (c ^ finrank ℝ V) * ‖F (c • x)‖ₑ := fun x => by + rw [dilate, eNorm_mul, ← ofReal_norm (((c ^ finrank ℝ V : ℝ)) : ℂ), Complex.norm_real, + Real.norm_of_nonneg hpow.le] + simp_rw [h] + rw [lintegral_const_mul' _ _ ENNReal.ofReal_ne_top, lintegral_comp_smul (fun u => ‖F u‖ₑ) hc.ne', + ← mul_assoc, abs_of_pos (inv_pos.2 hpow), ← ENNReal.ofReal_mul hpow.le, + mul_inv_cancel₀ hpow.ne', ENNReal.ofReal_one, one_mul] + +/-- **The dilation keeps the `L_1` norm**: `‖Φ_c‖_1 = ‖Φ‖_1` for `c > 0` +(`Rd.lintegral_enorm_dilate`). -/ +theorem eLpNorm_dilate_one {Φ : V → ℂ} (hΦ : Integrable Φ μ) {c : ℝ} (hc : 0 < c) : + eLpNorm (dilate c Φ) 1 μ = eLpNorm Φ 1 μ := by + rw [eLpNorm_one_eq_lintegral_eNorm (integrable_dilate hΦ hc.ne').aestronglyMeasurable, + eLpNorm_one_eq_lintegral_eNorm hΦ.aestronglyMeasurable, lintegral_enorm_dilate Φ hc] + +/-- **Convolution with a dilation**: `(Φ_c ⋆ f)(x) = ∫ Φ(z) f(x - c^(-1) z) dz` for `c > 0` +(substitute `y = c^(-1) z`, Mathlib's `Measure.integral_comp_smul`). -/ +theorem conv_dilate_apply (Φ f : V → ℂ) {c : ℝ} (hc : 0 < c) (x : V) : + conv (dilate c Φ) f μ x = ∫ z, Φ z * f (x - c⁻¹ • z) ∂μ := by + have hpow : (0 : ℝ) < c ^ finrank ℝ V := pow_pos hc _ + rw [conv_apply] + have h : ∀ y, dilate c Φ y * f (x - y) = + (((c ^ finrank ℝ V : ℝ)) : ℂ) * (fun z => Φ z * f (x - c⁻¹ • z)) (c • y) := fun y => by + simp only [dilate, inv_smul_smul₀ hc.ne'] + ring + simp_rw [h] + rw [integral_const_mul, Measure.integral_comp_smul μ (fun z => Φ z * f (x - c⁻¹ • z)) c, + abs_of_pos (inv_pos.2 hpow), Complex.real_smul, ← mul_assoc, ← Complex.ofReal_mul, + mul_inv_cancel₀ hpow.ne', Complex.ofReal_one, one_mul] + +/-! ### Approximate identities -/ + +/-- **The averaged translates are integrable**: for integrable `Φ`, `f ∈ L_p`, `c > 0` and almost +every `x`, `z ↦ Φ(z) f(x - c^(-1) z)` is integrable; its integral is `(Φ_c ⋆ f)(x)`. -/ +theorem ae_integrable_dilate_mul {p : ℝ≥0∞} (hp1 : 1 ≤ p) (hp : p ≠ ∞) {Φ f : V → ℂ} + (hΦ : Integrable Φ μ) (hf : MemLp f p μ) {c : ℝ} (hc : 0 < c) : + ∀ᵐ x ∂μ, Integrable (fun z => Φ z * f (x - c⁻¹ • z)) μ := by + have hpow : (0 : ℝ) < c ^ finrank ℝ V := pow_pos hc _ + filter_upwards [ae_convolutionExistsAt hp1 hp (integrable_dilate hΦ hc.ne') hf] with x hx + have hx' : Integrable (fun y => dilate c Φ y * f (x - y)) μ := hx + have h2 := (hx'.comp_smul (inv_ne_zero hc.ne')).const_mul ((((c ^ finrank ℝ V)⁻¹ : ℝ)) : ℂ) + refine h2.congr (Eventually.of_forall fun z => ?_) + simp only [dilate, smul_inv_smul₀ hc.ne'] + rw [← mul_assoc, ← mul_assoc, ← Complex.ofReal_mul, inv_mul_cancel₀ hpow.ne', + Complex.ofReal_one, one_mul] + +/-- **The local bound of an approximate identity**: for `∫ Φ = 1`, `c > 0` and almost every +`x`, `|(Φ_c ⋆ f)(x) - f(x)| ≤ ∫ |Φ(z)| |f(x - c^(-1) z) - f(x)| dz`. -/ +theorem ae_enorm_conv_dilate_sub_le {p : ℝ≥0∞} (hp1 : 1 ≤ p) (hp : p ≠ ∞) {Φ f : V → ℂ} + (hΦ : Integrable Φ μ) (h1 : ∫ x, Φ x ∂μ = 1) (hf : MemLp f p μ) {c : ℝ} (hc : 0 < c) : + ∀ᵐ x ∂μ, ‖conv (dilate c Φ) f μ x - f x‖ₑ ≤ + ∫⁻ z, ‖Φ z‖ₑ * ‖f (x - c⁻¹ • z) - f x‖ₑ ∂μ := by + filter_upwards [ae_integrable_dilate_mul hp1 hp hΦ hf hc] with x hint + have hconst : Integrable (fun z => Φ z * f x) μ := hΦ.mul_const (f x) + calc ‖conv (dilate c Φ) f μ x - f x‖ₑ + = ‖∫ z, (Φ z * f (x - c⁻¹ • z) - Φ z * f x) ∂μ‖ₑ := by + rw [integral_sub hint hconst, integral_mul_const, h1, one_mul, conv_dilate_apply Φ f hc x] + _ ≤ ∫⁻ z, ‖Φ z * f (x - c⁻¹ • z) - Φ z * f x‖ₑ ∂μ := eNorm_integral_le_lintegral_eNorm _ + _ = ∫⁻ z, ‖Φ z‖ₑ * ‖f (x - c⁻¹ • z) - f x‖ₑ ∂μ := by + congr 1 + funext z + rw [← mul_sub, eNorm_mul] + +/-- **The `L_p` distance of an approximate identity**: for an integrable `Φ` with `∫ Φ = 1`, a +strongly measurable `g ∈ L_p` and `c > 0`, +`‖Φ_c ⋆ g - g‖_p ≤ (‖Φ‖_1^(p-1) ∫ |Φ(z)| ‖g(· - c^(-1) z) - g‖_p^p dz)^(1/p)`, by the local bound +`Rd.ae_enorm_conv_dilate_sub_le`, the weighted Jensen inequality and Tonelli's theorem. -/ +theorem eLpNorm_conv_dilate_sub_le {p : ℝ≥0∞} (hp1 : 1 ≤ p) (hp : p ≠ ∞) {Φ g : V → ℂ} + (hΦ : Integrable Φ μ) (h1 : ∫ x, Φ x ∂μ = 1) (hgm : StronglyMeasurable g) + (hg : MemLp g p μ) {c : ℝ} (hc : 0 < c) : + eLpNorm (conv (dilate c Φ) g μ - g) p μ ≤ + ((∫⁻ z, ‖Φ z‖ₑ ∂μ) ^ (p.toReal - 1) * + ∫⁻ z, ‖Φ z‖ₑ * eLpNorm (fun x => g (x - c⁻¹ • z) - g x) p μ ^ p.toReal ∂μ) ^ + (1 / p.toReal) := by + have hp0 : p ≠ 0 := (lt_of_lt_of_le zero_lt_one hp1).ne' + have hq : 0 < p.toReal := ENNReal.toReal_pos hp0 hp + have hq1 : 1 ≤ p.toReal := ENNReal.one_le_toReal_of_one_le hp1 hp + set q := p.toReal + have hgmeas : Measurable g := hgm.measurable + have hconvm : AEStronglyMeasurable (conv (dilate c Φ) g μ - g) μ := + (aestronglyMeasurable_conv (integrable_dilate hΦ hc.ne').aestronglyMeasurable + hg.aestronglyMeasurable).sub hgm.aestronglyMeasurable + refine eLpNorm_le_of_lintegral_le hconvm hp0 hp ?_ + rw [← ENNReal.rpow_mul, one_div_mul_cancel hq.ne', ENNReal.rpow_one] + have hprod : AEMeasurable (Function.uncurry fun x z => + ‖Φ z‖ₑ * ‖g (x - c⁻¹ • z) - g x‖ₑ ^ q) (μ.prod μ) := + hΦ.aestronglyMeasurable.eNorm.comp_snd.mul + (((hgmeas.comp (measurable_fst.sub (measurable_snd.const_smul c⁻¹))).sub + (hgmeas.comp measurable_fst)).eNorm.pow_const q).aemeasurable + calc ∫⁻ x, ‖(conv (dilate c Φ) g μ - g) x‖ₑ ^ q ∂μ + ≤ ∫⁻ x, (∫⁻ z, ‖Φ z‖ₑ * ‖g (x - c⁻¹ • z) - g x‖ₑ ∂μ) ^ q ∂μ := by + refine lintegral_mono_ae ?_ + filter_upwards [ae_enorm_conv_dilate_sub_le hp1 hp hΦ h1 hg hc] with x hx + exact ENNReal.rpow_le_rpow hx hq.le + _ ≤ ∫⁻ x, (∫⁻ z, ‖Φ z‖ₑ ∂μ) ^ (q - 1) * + ∫⁻ z, ‖Φ z‖ₑ * ‖g (x - c⁻¹ • z) - g x‖ₑ ^ q ∂μ ∂μ := + lintegral_mono fun x => lintegral_mul_rpow_le hq1 hΦ.aestronglyMeasurable.eNorm + ((hgmeas.comp (measurable_const.sub (measurable_id.const_smul c⁻¹))).sub + measurable_const).eNorm.aemeasurable + _ = (∫⁻ z, ‖Φ z‖ₑ ∂μ) ^ (q - 1) * + ∫⁻ x, ∫⁻ z, ‖Φ z‖ₑ * ‖g (x - c⁻¹ • z) - g x‖ₑ ^ q ∂μ ∂μ := + lintegral_const_mul'' _ hprod.lintegral_prod_right' + _ = (∫⁻ z, ‖Φ z‖ₑ ∂μ) ^ (q - 1) * + ∫⁻ z, ∫⁻ x, ‖Φ z‖ₑ * ‖g (x - c⁻¹ • z) - g x‖ₑ ^ q ∂μ ∂μ := by + rw [lintegral_lintegral_swap hprod] + _ = _ := by + congr 1 + refine lintegral_congr fun z => ?_ + have hm : Measurable fun x => ‖g (x - c⁻¹ • z) - g x‖ₑ ^ q := + ((hgmeas.comp (measurable_id.sub_const _)).sub hgmeas).eNorm.pow_const q + have hsm : AEStronglyMeasurable (fun x => g (x - c⁻¹ • z) - g x) μ := + ((hgm.comp_measurable (measurable_id.sub_const _)).sub hgm).aestronglyMeasurable + rw [lintegral_const_mul _ hm] + congr 1 + exact (eLpNorm_rpow_eq hsm hp0 hp).symm + +/-- **Approximate identities in `L_p`**: for an integrable `Φ` with `∫ Φ = 1` and `f ∈ L_p`, +`1 ≤ p < ∞`, `‖Φ_c ⋆ f - f‖_p → 0` as `c → ∞`. -/ +theorem tendsto_eLpNorm_conv_dilate_sub {p : ℝ≥0∞} [Fact (1 ≤ p)] (hp : p ≠ ∞) {Φ f : V → ℂ} + (hΦ : Integrable Φ μ) (h1 : ∫ x, Φ x ∂μ = 1) (hf : MemLp f p μ) : + Tendsto (fun c : ℝ => eLpNorm (conv (dilate c Φ) f μ - f) p μ) atTop (𝓝 0) := by + -- reduce to a strongly measurable representative of `f` + obtain ⟨g, hgm, hfg⟩ := hf.aestronglyMeasurable + have hg : MemLp g p μ := hf.ae_eq hfg + have hcong : ∀ c : ℝ, eLpNorm (conv (dilate c Φ) f μ - f) p μ = + eLpNorm (conv (dilate c Φ) g μ - g) p μ := fun c => by + rw [conv_congr_ae hfg] + exact eLpNorm_congr_ae ((Filter.EventuallyEq.refl _ _).sub hfg) + simp_rw [hcong] + have hp1 : 1 ≤ p := Fact.out + have hp0 : p ≠ 0 := (lt_of_lt_of_le zero_lt_one hp1).ne' + have hq : 0 < p.toReal := ENNReal.toReal_pos hp0 hp + have hq1 : 1 ≤ p.toReal := ENNReal.one_le_toReal_of_one_le hp1 hp + set q := p.toReal + set T : V → ℝ≥0∞ := fun w => eLpNorm (fun x => g (x - w) - g x) p μ + have hT : Continuous T := continuous_eLpNorm_comp_sub_sub hp hg + have hT0 : T 0 = 0 := by simp [T] + have hΦ1 : ∫⁻ z, ‖Φ z‖ₑ ∂μ ≠ ∞ := hΦ.2.ne + -- the bound for `c > 0` + set I : ℝ → ℝ≥0∞ := fun c => ∫⁻ z, ‖Φ z‖ₑ * T (c⁻¹ • z) ^ q ∂μ + have hbound : ∀ c : ℝ, 0 < c → eLpNorm (conv (dilate c Φ) g μ - g) p μ ≤ + ((∫⁻ z, ‖Φ z‖ₑ ∂μ) ^ (q - 1) * I c) ^ (1 / q) := fun c hc => + eLpNorm_conv_dilate_sub_le hp1 hp hΦ h1 hgm hg hc + -- dominated convergence for `I` + have hI : Tendsto I atTop (𝓝 0) := by + have hlim := tendsto_lintegral_filter_of_dominated_convergence' + (μ := μ) (l := atTop) (F := fun (c : ℝ) z => ‖Φ z‖ₑ * T (c⁻¹ • z) ^ q) + (f := fun _ => 0) (fun z => ‖Φ z‖ₑ * (2 * eLpNorm g p μ) ^ q) + (Eventually.of_forall fun c => hΦ.aestronglyMeasurable.eNorm.mul + ((hT.measurable.comp (measurable_const_smul c⁻¹)).pow_const q).aemeasurable) + (Eventually.of_forall fun c => Eventually.of_forall fun z => by + gcongr + calc T (c⁻¹ • z) ≤ eLpNorm (fun x => g (x - c⁻¹ • z)) p μ + eLpNorm g p μ := + eLpNorm_sub_le hp1 + _ = 2 * eLpNorm g p μ := by + rw [eLpNorm_comp_sub_right hgm.aestronglyMeasurable, two_mul]) + (by + rw [lintegral_mul_const'' _ hΦ.aestronglyMeasurable.eNorm] + exact ENNReal.mul_ne_top hΦ1 (ENNReal.rpow_ne_top_of_nonneg hq.le + (ENNReal.mul_ne_top (by simp) hg.eLpNorm_ne_top))) + (Eventually.of_forall fun z => by + have h0 : Tendsto (fun c : ℝ => c⁻¹ • z) atTop (𝓝 0) := by + have := (tendsto_inv_atTop_zero (𝕜 := ℝ)).smul_const z + rwa [zero_smul ℝ z] at this + have h2 : Tendsto (fun c : ℝ => T (c⁻¹ • z)) atTop (𝓝 0) := by + have := (hT.tendsto 0).comp h0 + rwa [hT0] at this + have h1' : Tendsto (fun c : ℝ => T (c⁻¹ • z) ^ q) atTop (𝓝 0) := by + have := ((ENNReal.continuous_rpow_const (y := q)).tendsto 0).comp h2 + rwa [ENNReal.zero_rpow_of_pos hq] at this + have := ENNReal.Tendsto.const_mul (a := ‖Φ z‖ₑ) h1' (Or.inr eNorm_ne_top) + rwa [mul_zero] at this) + rwa [lintegral_zero] at hlim + -- conclusion + have hlim2 : Tendsto (fun c => ((∫⁻ z, ‖Φ z‖ₑ ∂μ) ^ (q - 1) * I c) ^ (1 / q)) atTop (𝓝 0) := by + have h3 : Tendsto (fun c => (∫⁻ z, ‖Φ z‖ₑ ∂μ) ^ (q - 1) * I c) atTop (𝓝 0) := by + have := ENNReal.Tendsto.const_mul (a := (∫⁻ z, ‖Φ z‖ₑ ∂μ) ^ (q - 1)) hI + (Or.inr (ENNReal.rpow_ne_top_of_nonneg (by linarith) hΦ1)) + rwa [mul_zero] at this + have := ((ENNReal.continuous_rpow_const (y := 1 / q)).tendsto 0).comp h3 + rwa [ENNReal.zero_rpow_of_pos (one_div_pos.2 hq)] at this + exact tendsto_of_tendsto_of_tendsto_of_le_of_le' tendsto_const_nhds hlim2 + (Eventually.of_forall fun _ => zero_le) + ((eventually_gt_atTop 0).mono fun c hc => hbound c hc) + +/-- **Approximate identities as operators on `L_p`**: for an integrable `Φ` with `∫ Φ = 1`, +dilation factors `c_i ≠ 0` with `c_i → ∞` and `f ∈ L_p`, `1 ≤ p < ∞`, `Φ_{c_i} ⋆ f → f` in `L_p` +(Mathlib's `Lp.tendsto_Lp_iff_tendsto_eLpNorm'`). -/ +theorem tendsto_convLp_dilate {p : ℝ≥0∞} [Fact (1 ≤ p)] (hp : p ≠ ∞) {Φ : V → ℂ} + (hΦ : Integrable Φ μ) (h1 : ∫ x, Φ x ∂μ = 1) {ι : Type*} {l : Filter ι} {c : ι → ℝ} + (hc : ∀ i, c i ≠ 0) (hcl : Tendsto c l atTop) (f : Lp ℂ p μ) : + Tendsto (fun i => convLp hp (integrable_dilate hΦ (hc i)) f) l (𝓝 f) := by + rw [Lp.tendsto_Lp_iff_tendsto_eLpNorm'] + refine ((tendsto_eLpNorm_conv_dilate_sub hp hΦ h1 (Lp.memLp f)).comp hcl).congr fun i => ?_ + exact eLpNorm_congr_ae ((convLp_apply_ae hp _ f).sub (Filter.EventuallyEq.refl _ _)).symm + +end Rd + +namespace Rd + +variable {V : Type*} [NormedAddCommGroup V] [InnerProductSpace ℝ V] [FiniteDimensional ℝ V] + [MeasurableSpace V] [BorelSpace V] + +/-- **Uniformly bounded operators applied twice**: if additive maps `T_i : E → E` satisfy +`‖T_i g‖ ≤ C ‖g‖` for all `i` and `g`, and `T_i f → f`, then `T_i (T_i f) → f`, since +`T_i (T_i f) - f = T_i (T_i f - f) + (T_i f - f)` has norm at most `(C + 1) ‖T_i f - f‖`. -/ +theorem tendsto_apply_apply_of_tendsto {ι E F : Type*} [SeminormedAddCommGroup E] [FunLike F E E] + [AddMonoidHomClass F E E] {l : Filter ι} {T : ι → F} {C : ℝ} (hT : ∀ i g, ‖T i g‖ ≤ C * ‖g‖) + {f : E} (h : Tendsto (fun i => T i f) l (𝓝 f)) : Tendsto (fun i => T i (T i f)) l (𝓝 f) := by + rw [tendsto_iff_norm_sub_tendsto_zero] at h ⊢ + refine squeeze_zero (fun i => norm_nonneg _) (fun i => ?_) (by simpa using h.const_mul (C + 1)) + calc ‖T i (T i f) - f‖ = ‖T i (T i f - f) + (T i f - f)‖ := by + rw [map_sub] + congr 1 + abel + _ ≤ C * ‖T i f - f‖ + ‖T i f - f‖ := (norm_add_le _ _).trans (add_le_add (hT i _) le_rfl) + _ = (C + 1) * ‖T i f - f‖ := by ring + +/-! ### Approximate identities at points of continuity -/ + +/-- **Approximate identities at points of continuity**: if `Φ` is integrable with `∫ Φ = 1` and +vanishes outside `B̄(0, R)`, and `F_J(z) → z₀` as `J → ∞` and `z → y`, then +`(Φ_{2^J} ⋆ F_J)(z) → z₀` as `J → ∞` and `z → y`: for every `ε > 0` there are `J₀` and `δ > 0` +with `|(Φ_{2^J} ⋆ F_J)(z) - z₀| < ε` for `J ≥ J₀` and `‖z - y‖ < δ`. Since `∫ Φ_{2^J} = 1`, +`(Φ_{2^J} ⋆ F_J)(z) - z₀ = ∫ Φ_{2^J}(w) (F_J(z - w) - z₀) dw`, and only `‖w‖ ≤ R 2^(-J)` enters. -/ +theorem conv_dilate_near {Φ : V → ℂ} (hΦ : Integrable Φ) (h1 : ∫ x, Φ x = 1) {R : ℝ} + (hR : 0 ≤ R) (hΦR : ∀ w, R < ‖w‖ → Φ w = 0) {F : ℕ → V → ℂ} + (hFm : ∀ J, AEStronglyMeasurable (F J) volume) {y : V} {z₀ : ℂ} + (hF : ∀ ε > 0, ∃ J₀ : ℕ, ∃ δ > 0, ∀ J ≥ J₀, ∀ z, ‖z - y‖ < δ → ‖F J z - z₀‖ < ε) : + ∀ ε > 0, ∃ J₀ : ℕ, ∃ δ > 0, ∀ J ≥ J₀, ∀ z, ‖z - y‖ < δ → + ‖conv (dilate (2 ^ J) Φ) (F J) volume z - z₀‖ < ε := by + intro ε hε + have hM : 0 ≤ ∫ x, ‖Φ x‖ := integral_nonneg fun _ => norm_nonneg _ + obtain ⟨J₁, δ₁, hδ₁, hJ₁⟩ := hF (ε / ((∫ x, ‖Φ x‖) + 1)) (by positivity) + obtain ⟨J₂, hJ₂⟩ := pow_unbounded_of_one_lt (2 * R / δ₁) (one_lt_two : (1 : ℝ) < 2) + have hJ₂' : ∀ J ≥ J₂, R / 2 ^ J < δ₁ / 2 := fun J hJ => by + have h2 : (2 : ℝ) ^ J₂ ≤ 2 ^ J := pow_le_pow_right₀ one_le_two hJ + rw [div_lt_div_iff₀ (by positivity) two_pos] + rw [div_lt_iff₀ hδ₁] at hJ₂ + nlinarith + refine ⟨max J₁ J₂, δ₁ / 2, half_pos hδ₁, fun J hJ z hz => ?_⟩ + have hJ1 : J₁ ≤ J := le_of_max_le_left hJ + have hJ2 : J₂ ≤ J := le_of_max_le_right hJ + have hΦ' : Integrable (dilate ((2 : ℝ) ^ J) Φ) := integrable_dilate hΦ (by positivity) + have hsupp : ∀ w, dilate ((2 : ℝ) ^ J) Φ w ≠ 0 → ‖w‖ < δ₁ / 2 := fun w hw => by + by_contra hcon + push Not at hcon + apply hw + rw [dilate, hΦR _ ?_, mul_zero] + rw [norm_smul, Real.norm_of_nonneg (by positivity)] + have h3 := hJ₂' J hJ2 + rw [div_lt_iff₀ (by positivity)] at h3 + nlinarith [pow_pos (two_pos : (0 : ℝ) < 2) J] + have hpt : ∀ w, ‖dilate ((2 : ℝ) ^ J) Φ w * (F J (z - w) - z₀)‖ ≤ + ‖dilate ((2 : ℝ) ^ J) Φ w‖ * (ε / ((∫ x, ‖Φ x‖) + 1)) := fun w => by + by_cases hw : dilate ((2 : ℝ) ^ J) Φ w = 0 + · simp [hw] + · rw [norm_mul] + refine mul_le_mul_of_nonneg_left (hJ₁ J hJ1 (z - w) ?_).le (norm_nonneg _) + calc ‖z - w - y‖ = ‖(z - y) - w‖ := by congr 1; abel + _ ≤ ‖z - y‖ + ‖w‖ := norm_sub_le _ _ + _ < δ₁ / 2 + δ₁ / 2 := add_lt_add hz (hsupp w hw) + _ = δ₁ := by ring + have hmeas : AEStronglyMeasurable (fun w => F J (z - w)) volume := + (hFm J).comp_measurePreserving (Measure.measurePreserving_sub_left volume z) + have hint1 : Integrable (fun w => dilate ((2 : ℝ) ^ J) Φ w * (F J (z - w) - z₀)) volume := + Integrable.mono' (hΦ'.norm.mul_const _) + (hΦ'.aestronglyMeasurable.mul (hmeas.sub aestronglyMeasurable_const)) + (Eventually.of_forall hpt) + have hint2 : Integrable (fun w => dilate ((2 : ℝ) ^ J) Φ w * F J (z - w)) volume := + (hint1.add (hΦ'.mul_const z₀)).congr (Eventually.of_forall fun w => by + simp only [Pi.add_apply] + ring) + have hone : ∫ w, dilate ((2 : ℝ) ^ J) Φ w = 1 := by + rw [integral_dilate Φ (by positivity), h1] + have hkey : conv (dilate (2 ^ J) Φ) (F J) volume z - z₀ = + ∫ w, dilate ((2 : ℝ) ^ J) Φ w * (F J (z - w) - z₀) := by + rw [conv_apply] + calc (∫ w, dilate ((2 : ℝ) ^ J) Φ w * F J (z - w)) - z₀ + = (∫ w, dilate ((2 : ℝ) ^ J) Φ w * F J (z - w)) - + ∫ w, dilate ((2 : ℝ) ^ J) Φ w * z₀ := by + rw [integral_mul_const, hone, one_mul] + _ = ∫ w, (dilate ((2 : ℝ) ^ J) Φ w * F J (z - w) - dilate ((2 : ℝ) ^ J) Φ w * z₀) := + (integral_sub hint2 (hΦ'.mul_const z₀)).symm + _ = _ := by + congr 1 + funext w + ring + have hnorm : ∫ w, ‖dilate ((2 : ℝ) ^ J) Φ w‖ = ∫ x, ‖Φ x‖ := by + rw [integral_norm_eq_lintegral_eNorm hΦ'.aestronglyMeasurable, + integral_norm_eq_lintegral_eNorm hΦ.aestronglyMeasurable, + ← eLpNorm_one_eq_lintegral_eNorm hΦ'.aestronglyMeasurable, + ← eLpNorm_one_eq_lintegral_eNorm hΦ.aestronglyMeasurable, + eLpNorm_dilate_one hΦ (by positivity)] + rw [hkey] + calc ‖∫ w, dilate ((2 : ℝ) ^ J) Φ w * (F J (z - w) - z₀)‖ + ≤ ∫ w, ‖dilate ((2 : ℝ) ^ J) Φ w‖ * (ε / ((∫ x, ‖Φ x‖) + 1)) := + norm_integral_le_of_norm_le (hΦ'.norm.mul_const _) (Eventually.of_forall hpt) + _ = (∫ x, ‖Φ x‖) * ε / ((∫ x, ‖Φ x‖) + 1) := by + rw [integral_mul_const, hnorm] + ring + _ < ε := by + rw [div_lt_iff₀ (by positivity)] + nlinarith + +/-! ### First moments of dilates -/ + +omit [FiniteDimensional ℝ V] [MeasurableSpace V] [BorelSpace V] in +/-- `⟪w, x⟫ m_c(x) = c⁻¹ (⟪w, ·⟫ m)_c(x)` for `c ≠ 0`. -/ +theorem inner_mul_dilate_eq (m : V → ℂ) (w : V) {c : ℝ} (hc : c ≠ 0) (x : V) : + (inner ℝ w x : ℂ) * dilate c m x = + ((c⁻¹ : ℝ) : ℂ) * dilate c (fun y => (inner ℝ w y : ℂ) * m y) x := by + have hc0 : (c : ℂ) ≠ 0 := by exact_mod_cast hc + simp only [dilate, inner_smul_right, Complex.ofReal_mul, Complex.ofReal_inv] + field_simp + +/-- **First moments of a dilate**: `∫ ⟪w, x⟫ m_c(x) dx = c⁻¹ ∫ ⟪w, x⟫ m(x) dx` for `c > 0` +and every additive Haar measure, since `⟪w, x⟫ m_c(x) = c⁻¹ (⟪w, ·⟫ m)_c(x)` +(`Rd.inner_mul_dilate_eq`, `Rd.integral_dilate`). -/ +theorem integral_inner_mul_dilate {μ : Measure V} [μ.IsAddHaarMeasure] (m : V → ℂ) (w : V) {c : ℝ} + (hc : 0 < c) : + ∫ x, (inner ℝ w x : ℂ) * dilate c m x ∂μ = + ((c⁻¹ : ℝ) : ℂ) * ∫ x, (inner ℝ w x : ℂ) * m x ∂μ := by + simp_rw [inner_mul_dilate_eq m w hc.ne'] + rw [integral_const_mul, integral_dilate _ hc] + +end Rd diff --git a/LeanPool/FunctionSpaces/Analysis/Fourier/Convolution.lean b/LeanPool/FunctionSpaces/Analysis/Fourier/Convolution.lean new file mode 100644 index 0000000000..1800cf211d --- /dev/null +++ b/LeanPool/FunctionSpaces/Analysis/Fourier/Convolution.lean @@ -0,0 +1,467 @@ +/- +Copyright (c) 2026 Mario Ullrich. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Mario Ullrich +-/ +module + +public import LeanPool.FunctionSpaces.Analysis.Lp.Young +public import LeanPool.FunctionSpaces.ApproximationSpaces.Sequences.Lq +public import Mathlib.Analysis.Convolution +public import Mathlib.MeasureTheory.Measure.Haar.InnerProductSpace +public import Mathlib.MeasureTheory.Measure.Haar.Unique + +/- +Modified for Lean Pool: module names and imports adapted. +-/ + +/-! +# Convolution with integrable kernels in `L_p` + +On a finite-dimensional real vector space `V` with a Haar measure `μ`, the **convolution** of an +integrable kernel `K` with `f ∈ L_p` is `(K ⋆ f)(x) = ∫ K(y) f(x - y) dy` (`Rd.conv`, Mathlib's +`MeasureTheory.convolution` with the multiplication of `ℂ`). + +**Young's inequality** `‖K ⋆ f‖_p ≤ ‖K‖_1 ‖f‖_p`, `1 ≤ p < ∞` (`Rd.eLpNorm_conv_le`), is the case +of the group `V` of `MeasureTheory.eLpNorm_convolution_le`. The integral of the convolution +converges absolutely at almost every point (`MeasureTheory.ae_convolutionExistsAt`), so +convolution is linear in `f` almost everywhere (`Rd.conv_add_ae`, `Rd.conv_sub_ae`, +`Rd.conv_finsetSum_ae`, and `Rd.conv_add_ae_of_memLp` for `f ∈ L_p`, `g ∈ L_r`) and defines a +bounded operator on `L_p` of norm at most `‖K‖_1` (`Rd.convLp`). These operators compose like +their kernels, `K ⋆ (L ⋆ f) = (K ⋆ L) ⋆ f` (`Rd.convLp_convLp`, from the associativity +`Rd.conv_conv_ae`), and are linear in the kernel (`Rd.convLp_sub_kernel`). + +**Pointwise +bounds**: if `|K| ≤ A` and `K = 0` outside `B̄(0, ρ)`, Hölder's inequality on balls gives +`|(K ⋆ g)(x)| ≤ A |B̄(0,ρ)|^(1-1/p) ‖g‖_p` (`Rd.lintegral_closedBall_le`, +`Rd.enorm_conv_le_of_bound`). +-/ + +@[expose] public section + +open MeasureTheory +open scoped ENNReal Convolution + +namespace Rd + +/-! ### Convolution and Young's inequality -/ + +variable {V : Type*} [NormedAddCommGroup V] [NormedSpace ℝ V] [FiniteDimensional ℝ V] + [MeasurableSpace V] [BorelSpace V] {μ : Measure V} [μ.IsAddHaarMeasure] + +/-- The **convolution** of complex functions, `(K ⋆ f)(x) = ∫ K(y) f(x - y) dy` (Mathlib's +`MeasureTheory.convolution` with the multiplication of `ℂ`). -/ +noncomputable def conv (K f : V → ℂ) (μ : Measure V) : V → ℂ := + K ⋆[ContinuousLinearMap.mul ℂ ℂ, μ] f + +omit [NormedSpace ℝ V] [FiniteDimensional ℝ V] [BorelSpace V] in +/-- `(K ⋆ f)(x) = ∫ K(y) f(x - y) dy`. -/ +theorem conv_apply (K f : V → ℂ) (μ : Measure V) (x : V) : + conv K f μ x = ∫ y, K y * f (x - y) ∂μ := by + rw [conv, convolution_def] + rfl + +/-- Convolutions of a.e. strongly measurable functions are a.e. strongly measurable (Mathlib's +`AEStronglyMeasurable.convolution_integrand` and `AEStronglyMeasurable.integral_prod_right'`). -/ +theorem aestronglyMeasurable_conv {K f : V → ℂ} (hK : AEStronglyMeasurable K μ) + (hf : AEStronglyMeasurable f μ) : AEStronglyMeasurable (conv K f μ) μ := + (hK.convolution_integrand (ContinuousLinearMap.mul ℂ ℂ) hf).integral_prod_right' + +omit [NormedSpace ℝ V] [FiniteDimensional ℝ V] [BorelSpace V] [μ.IsAddHaarMeasure] in +/-- The pointwise bound `|(K ⋆ f)(x)| ≤ ∫ |K(y)| |f(x - y)| dy`. -/ +theorem enorm_conv_le_lintegral (K f : V → ℂ) (x : V) : + ‖conv K f μ x‖ₑ ≤ ∫⁻ y, ‖K y‖ₑ * ‖f (x - y)‖ₑ ∂μ := by + rw [conv_apply] + refine (eNorm_integral_le_lintegral_eNorm _).trans (le_of_eq ?_) + exact lintegral_congr fun y => eNorm_mul _ _ + +/-- **Young's inequality** for an integrable kernel: `‖K ⋆ f‖_p ≤ ‖K‖_1 ‖f‖_p`, `1 ≤ p < ∞` +(`MeasureTheory.eLpNorm_convolution_le` on the group `V`). -/ +theorem eLpNorm_conv_le {p : ℝ≥0∞} (hp1 : 1 ≤ p) (hp : p ≠ ∞) {K f : V → ℂ} + (hK : AEStronglyMeasurable K μ) (hf : AEStronglyMeasurable f μ) : + eLpNorm (conv K f μ) p μ ≤ eLpNorm K 1 μ * eLpNorm f p μ := + eLpNorm_convolution_le hp1 hp hK hf + +/-- Convolution of an integrable kernel with an `L_p` function is in `L_p`. -/ +theorem memLp_conv {p : ℝ≥0∞} (hp1 : 1 ≤ p) (hp : p ≠ ∞) {K f : V → ℂ} (hK : Integrable K μ) + (hf : MemLp f p μ) : MemLp (conv K f μ) p μ := + lt_top_iff_ne_top.2 (ne_top_of_le_ne_top (ENNReal.mul_ne_top + (memLp_one_iff_integrable.2 hK).eLpNorm_ne_top hf.eLpNorm_ne_top) + (eLpNorm_conv_le hp1 hp hK.aestronglyMeasurable hf.aestronglyMeasurable)) + +/-- **Convolution is additive** almost everywhere, in the two-exponent form: for `f ∈ L_p` and +`g ∈ L_r` with `1 ≤ p, r < ∞`, `K ⋆ (f + g) = K ⋆ f + K ⋆ g` almost everywhere, since both +convolution integrals converge absolutely at almost every point +(`MeasureTheory.ae_convolutionExistsAt`). -/ +theorem conv_add_ae_of_memLp {p r : ℝ≥0∞} (hp1 : 1 ≤ p) (hp : p ≠ ∞) (hr1 : 1 ≤ r) (hr : r ≠ ∞) + {K f g : V → ℂ} (hK : Integrable K μ) (hf : MemLp f p μ) (hg : MemLp g r μ) : + conv K (f + g) μ =ᵐ[μ] conv K f μ + conv K g μ := by + filter_upwards [ae_convolutionExistsAt hp1 hp hK hf, ae_convolutionExistsAt hr1 hr hK hg] + with x hfx hgx + exact hfx.distrib_add hgx + +/-- **Convolution is additive** in `f ∈ L_p` almost everywhere: the case of equal exponents of +`Rd.conv_add_ae_of_memLp`. -/ +theorem conv_add_ae {p : ℝ≥0∞} (hp1 : 1 ≤ p) (hp : p ≠ ∞) {K f g : V → ℂ} + (hK : Integrable K μ) (hf : MemLp f p μ) (hg : MemLp g p μ) : + conv K (f + g) μ =ᵐ[μ] conv K f μ + conv K g μ := + conv_add_ae_of_memLp hp1 hp hp1 hp hK hf hg + +omit [NormedSpace ℝ V] [FiniteDimensional ℝ V] [BorelSpace V] [μ.IsAddHaarMeasure] in +/-- Convolution is homogeneous in `f`. -/ +theorem conv_smul (K f : V → ℂ) (c : ℂ) : conv K (c • f) μ = c • conv K f μ := + convolution_smul + +/-- **The double convolution integral converges absolutely almost everywhere**: for integrable +`K`, `L` and `f ∈ L_p`, `1 ≤ p < ∞`, for almost every `x₀`, +`∫∫ |K(y)| |L(x - y)| |f(x₀ - x)| dx dy < ∞`. The double integral is +`∫ |K(y)| F(x₀ - y) dy` with `F(z) = ∫ |L(w)| |f(z - w)| dw`, and the integral form of Young's +inequality, applied twice, bounds the integral of its `p`-th power. -/ +theorem ae_integrable_conv_conv {p : ℝ≥0∞} (hp1 : 1 ≤ p) (hp : p ≠ ∞) {K L f : V → ℂ} + (hK : Integrable K μ) (hL : Integrable L μ) (hf : MemLp f p μ) : + ∀ᵐ x₀ ∂μ, Integrable (Function.uncurry fun x y => K y * (L (x - y) * f (x₀ - x))) + (μ.prod μ) := by + have hp0 : p ≠ 0 := (lt_of_lt_of_le zero_lt_one hp1).ne' + have hq : 0 < p.toReal := ENNReal.toReal_pos hp0 hp + have hq1 : 1 ≤ p.toReal := ENNReal.one_le_toReal_of_one_le hp1 hp + have hfm := hf.aestronglyMeasurable + set F : V → ℝ≥0∞ := fun z => ∫⁻ w, ‖L w‖ₑ * ‖f (z - w)‖ₑ ∂μ with hFdef + have hF : AEMeasurable F μ := aemeasurable_lintegral_kernel hL.aestronglyMeasurable hfm + set G : V → ℝ≥0∞ := fun x₀ => ∫⁻ y, ‖K y‖ₑ * F (x₀ - y) ∂μ with hGdef + have hGm : AEMeasurable G μ := + (hK.aestronglyMeasurable.eNorm.comp_snd.mul (hF.comp_quasiMeasurePreserving + (quasiMeasurePreserving_sub_of_right_invariant μ μ))).lintegral_prod_right' + -- the double integral of the norms is `G x₀` + have hdouble : ∀ x₀, ∫⁻ z, ‖Function.uncurry (fun x y => K y * (L (x - y) * f (x₀ - x))) z‖ₑ + ∂(μ.prod μ) = G x₀ := fun x₀ => by + have hmeas : AEMeasurable (Function.uncurry fun x y => + ‖K y‖ₑ * (‖L (x - y)‖ₑ * ‖f (x₀ - x)‖ₑ)) (μ.prod μ) := + hK.aestronglyMeasurable.eNorm.comp_snd.mul + ((hL.aestronglyMeasurable.eNorm.comp_quasiMeasurePreserving + (quasiMeasurePreserving_sub_of_right_invariant μ μ)).mul + (hfm.eNorm.comp_quasiMeasurePreserving + (quasiMeasurePreserving_sub_left_of_right_invariant μ x₀)).comp_fst) + have hrw : (fun z : V × V => + ‖Function.uncurry (fun x y => K y * (L (x - y) * f (x₀ - x))) z‖ₑ) = + Function.uncurry fun x y => ‖K y‖ₑ * (‖L (x - y)‖ₑ * ‖f (x₀ - x)‖ₑ) := by + funext z + obtain ⟨x, y⟩ := z + simp only [Function.uncurry_apply_pair, eNorm_mul] + have hinner : ∀ y, AEMeasurable (fun x => ‖L (x - y)‖ₑ * ‖f (x₀ - x)‖ₑ) μ := fun y => + (hL.aestronglyMeasurable.eNorm.comp_quasiMeasurePreserving + (measurePreserving_sub_right μ y).quasiMeasurePreserving).mul + (hfm.eNorm.comp_quasiMeasurePreserving + (quasiMeasurePreserving_sub_left_of_right_invariant μ x₀)) + rw [hrw, lintegral_prod _ hmeas] + simp only [Function.uncurry_apply_pair] + rw [lintegral_lintegral_swap hmeas] + refine lintegral_congr fun y => ?_ + rw [lintegral_const_mul'' _ (hinner y), + ← lintegral_add_right_eq_self (fun x => ‖L (x - y)‖ₑ * ‖f (x₀ - x)‖ₑ) y] + congr 1 + refine lintegral_congr fun w => ?_ + simp only [add_sub_cancel_right] + rw [show x₀ - (w + y) = x₀ - y - w by abel] + -- the `p`-th power of `G` has finite integral + have hK1 : ∫⁻ y, ‖K y‖ₑ ∂μ ≠ ∞ := hK.2.ne + have hL1 : ∫⁻ y, ‖L y‖ₑ ∂μ ≠ ∞ := hL.2.ne + have hfq : ∫⁻ x, ‖f x‖ₑ ^ p.toReal ∂μ ≠ ∞ := by + rw [← eLpNorm_rpow_eq hfm hp0 hp] + exact ENNReal.rpow_ne_top_of_nonneg hq.le hf.eLpNorm_ne_top + have hGfin : ∫⁻ x₀, G x₀ ^ p.toReal ∂μ ≠ ∞ := by + refine ne_top_of_le_ne_top ?_ ((lintegral_rpow_lintegral_mul_le hq1 + hK.aestronglyMeasurable.eNorm hF).trans (mul_le_mul' le_rfl + (lintegral_rpow_lintegral_mul_le hq1 hL.aestronglyMeasurable.eNorm hfm.eNorm))) + exact ENNReal.mul_ne_top (ENNReal.rpow_ne_top_of_nonneg hq.le hK1) + (ENNReal.mul_ne_top (ENNReal.rpow_ne_top_of_nonneg hq.le hL1) hfq) + filter_upwards [ae_lt_top' (hGm.pow_const _) hGfin] with x₀ hx₀ + have hG : G x₀ < ∞ := by + by_contra h + rw [not_lt, top_le_iff] at h + rw [h, ENNReal.top_rpow_of_pos hq] at hx₀ + exact lt_irrefl _ hx₀ + refine ⟨hK.aestronglyMeasurable.comp_snd.mul + ((hL.aestronglyMeasurable.comp_quasiMeasurePreserving + (quasiMeasurePreserving_sub_of_right_invariant μ μ)).mul + ((hfm.comp_quasiMeasurePreserving + (quasiMeasurePreserving_sub_left_of_right_invariant μ x₀)).comp_fst)), ?_⟩ + rw [HasFiniteIntegral, hdouble x₀] + exact hG + +/-- **Convolution is associative**: `(K ⋆ L) ⋆ f = K ⋆ (L ⋆ f)` almost everywhere for integrable +`K`, `L` and `f ∈ L_p`, `1 ≤ p < ∞` (Mathlib's `convolution_assoc'`, with the absolute convergence +of `Rd.ae_integrable_conv_conv`). -/ +theorem conv_conv_ae {p : ℝ≥0∞} (hp1 : 1 ≤ p) (hp : p ≠ ∞) {K L f : V → ℂ} + (hK : Integrable K μ) (hL : Integrable L μ) (hf : MemLp f p μ) : + conv (conv K L μ) f μ =ᵐ[μ] conv K (conv L f μ) μ := by + filter_upwards [ae_integrable_conv_conv hp1 hp hK hL hf] with x₀ hx₀ + exact convolution_assoc' (ContinuousLinearMap.mul ℂ ℂ) (ContinuousLinearMap.mul ℂ ℂ) + (ContinuousLinearMap.mul ℂ ℂ) (ContinuousLinearMap.mul ℂ ℂ) + (fun x y z => by simp only [ContinuousLinearMap.mul_apply']; ring) + (hK.ae_convolution_exists (ContinuousLinearMap.mul ℂ ℂ) hL) + (ae_convolutionExistsAt hp1 hp hL hf) hx₀ + +/-- **Convolution is additive in the kernel** almost everywhere, for integrable kernels and +`f ∈ L_p`. -/ +theorem add_conv_ae {p : ℝ≥0∞} (hp1 : 1 ≤ p) (hp : p ≠ ∞) {K K' f : V → ℂ} + (hK : Integrable K μ) (hK' : Integrable K' μ) (hf : MemLp f p μ) : + conv (K + K') f μ =ᵐ[μ] conv K f μ + conv K' f μ := by + filter_upwards [ae_convolutionExistsAt hp1 hp hK hf, ae_convolutionExistsAt hp1 hp hK' hf] + with x hx hx' + exact hx.add_distrib hx' + +omit [NormedSpace ℝ V] [FiniteDimensional ℝ V] [BorelSpace V] [μ.IsAddHaarMeasure] in +/-- Convolution is homogeneous in the kernel. -/ +theorem smul_conv (K f : V → ℂ) (c : ℂ) : conv (c • K) f μ = c • conv K f μ := + smul_convolution + +/-- **Convolution is subtractive in the kernel** almost everywhere. -/ +theorem sub_conv_ae {p : ℝ≥0∞} (hp1 : 1 ≤ p) (hp : p ≠ ∞) {K K' f : V → ℂ} + (hK : Integrable K μ) (hK' : Integrable K' μ) (hf : MemLp f p μ) : + conv (K - K') f μ =ᵐ[μ] conv K f μ - conv K' f μ := by + have hneg : conv (-K') f μ = -conv K' f μ := by + rw [show -K' = (-1 : ℂ) • K' by simp, smul_conv] + simp + filter_upwards [add_conv_ae hp1 hp hK hK'.neg hf] with x hx + rw [sub_eq_add_neg K K', hx, Pi.add_apply, hneg, Pi.neg_apply, Pi.sub_apply, sub_eq_add_neg] + +/-- **Convolution is subtractive in `f`** almost everywhere: `K ⋆ (f - g) = K ⋆ f - K ⋆ g` a.e. +for `K ∈ L_1` and `f, g ∈ L_p`, `1 ≤ p < ∞`. -/ +theorem conv_sub_ae {p : ℝ≥0∞} (hp1 : 1 ≤ p) (hp : p ≠ ∞) {K f g : V → ℂ} + (hK : Integrable K μ) (hf : MemLp f p μ) (hg : MemLp g p μ) : + conv K (f - g) μ =ᵐ[μ] conv K f μ - conv K g μ := by + have hneg : conv K (-g) μ = -conv K g μ := by + rw [show -g = (-1 : ℂ) • g by simp, conv_smul] + simp + filter_upwards [conv_add_ae hp1 hp hK hf hg.neg] with x hx + rw [sub_eq_add_neg f g, hx, Pi.add_apply, hneg, Pi.neg_apply, Pi.sub_apply, sub_eq_add_neg] + +/-- **Convolution is linear in `f`** almost everywhere: `K ⋆ ∑_i f_i = ∑_i K ⋆ f_i` a.e. for +`K ∈ L_1` and finitely many `f_i ∈ L_p`, `1 ≤ p < ∞`. -/ +theorem conv_finsetSum_ae {p : ℝ≥0∞} (hp1 : 1 ≤ p) (hp : p ≠ ∞) {ι : Type*} {K : V → ℂ} + (hK : Integrable K μ) {s : Finset ι} {f : ι → V → ℂ} (hf : ∀ i ∈ s, MemLp (f i) p μ) : + conv K (∑ i ∈ s, f i) μ =ᵐ[μ] ∑ i ∈ s, conv K (f i) μ := by + classical + induction s using Finset.induction_on with + | empty => + refine Filter.EventuallyEq.of_eq (funext fun x => ?_) + simp [conv_apply] + | insert i s hi ih => + have hs : MemLp (∑ j ∈ s, f j) p μ := + memLp_finsetSum' s fun j hj => hf j (Finset.mem_insert_of_mem hj) + filter_upwards [conv_add_ae hp1 hp hK (hf i (Finset.mem_insert_self i s)) hs, + ih fun j hj => hf j (Finset.mem_insert_of_mem hj)] with x h1 h2 + rw [Finset.sum_insert hi, h1, Pi.add_apply, h2, Finset.sum_insert hi, Pi.add_apply] + +/-- Convolutions of functions that agree almost everywhere agree everywhere (Mathlib's +`convolution_congr`). -/ +theorem conv_congr_ae {K f g : V → ℂ} (hfg : f =ᵐ[μ] g) : conv K f μ = conv K g μ := + convolution_congr (ContinuousLinearMap.mul ℂ ℂ) (Filter.EventuallyEq.refl _ K) hfg + +/-- **Convolution is commutative**: `K ⋆ L = L ⋆ K` (Mathlib's `convolution_flip`). -/ +theorem conv_comm (K L : V → ℂ) : conv K L μ = conv L K μ := by + rw [conv, conv, ← convolution_flip, ContinuousLinearMap.flip_mul] + +/-- Convolutions of integrable functions are integrable (Mathlib's +`Integrable.integrable_convolution`). -/ +theorem integrable_conv {K L : V → ℂ} (hK : Integrable K μ) (hL : Integrable L μ) : + Integrable (conv K L μ) μ := + hK.integrable_convolution (ContinuousLinearMap.mul ℂ ℂ) hL + +variable {p : ℝ≥0∞} [Fact (1 ≤ p)] + +/-- **Young's inequality for the classes in `L_p`**: +`‖K ⋆ f‖_p ≤ ‖K‖_1 ‖f‖_p` for `f ∈ L_p`. -/ +theorem norm_toLp_conv_le (hp : p ≠ ∞) {K : V → ℂ} (hK : Integrable K μ) (f : Lp ℂ p μ) : + ‖(memLp_conv Fact.out hp hK (Lp.memLp f)).toLp (conv K f μ)‖ ≤ + (eLpNorm K 1 μ).toReal * ‖f‖ := by + rw [Lp.norm_toLp, Lp.norm_def, ← ENNReal.toReal_mul] + exact ENNReal.toReal_mono (ENNReal.mul_ne_top (memLp_one_iff_integrable.2 hK).eLpNorm_ne_top + (Lp.eLpNorm_ne_top f)) (eLpNorm_conv_le Fact.out hp hK.aestronglyMeasurable + (Lp.aestronglyMeasurable f)) + +/-- **Convolution with an integrable kernel as a bounded operator on `L_p`**, `1 ≤ p < ∞`, of +norm at most `‖K‖_1` (Young's inequality). -/ +noncomputable def convLp (hp : p ≠ ∞) {K : V → ℂ} (hK : Integrable K μ) : + Lp ℂ p μ →L[ℂ] Lp ℂ p μ := + LinearMap.mkContinuous + { toFun := fun f => (memLp_conv Fact.out hp hK (Lp.memLp f)).toLp (conv K f μ) + map_add' := fun f g => by + refine Lp.ext ?_ + have hc : conv K (⇑(f + g)) μ = conv K (⇑f + ⇑g) μ := conv_congr_ae (Lp.coeFn_add f g) + filter_upwards [MemLp.coeFn_toLp (memLp_conv Fact.out hp hK (Lp.memLp (f + g))), + MemLp.coeFn_toLp (memLp_conv Fact.out hp hK (Lp.memLp f)), + MemLp.coeFn_toLp (memLp_conv Fact.out hp hK (Lp.memLp g)), + Lp.coeFn_add ((memLp_conv Fact.out hp hK (Lp.memLp f)).toLp (conv K f μ)) + ((memLp_conv Fact.out hp hK (Lp.memLp g)).toLp (conv K g μ)), + conv_add_ae Fact.out hp hK (Lp.memLp f) (Lp.memLp g)] with x h1 h2 h3 h4 h5 + rw [h1, h4, Pi.add_apply, h2, h3, hc, h5, Pi.add_apply] + map_smul' := fun c f => by + refine Lp.ext ?_ + have hc : conv K (⇑(c • f)) μ = conv K (c • ⇑f) μ := conv_congr_ae (Lp.coeFn_smul c f) + filter_upwards [MemLp.coeFn_toLp (memLp_conv Fact.out hp hK (Lp.memLp (c • f))), + MemLp.coeFn_toLp (memLp_conv Fact.out hp hK (Lp.memLp f)), + Lp.coeFn_smul c ((memLp_conv Fact.out hp hK (Lp.memLp f)).toLp (conv K f μ))] + with x h1 h2 h3 + rw [h1, RingHom.id_apply, h3, Pi.smul_apply, h2, hc, conv_smul, Pi.smul_apply] } + (eLpNorm K 1 μ).toReal (norm_toLp_conv_le hp hK) + +/-- The operator `convLp` is convolution, almost everywhere. -/ +theorem convLp_apply_ae (hp : p ≠ ∞) {K : V → ℂ} (hK : Integrable K μ) (f : Lp ℂ p μ) : + convLp hp hK f =ᵐ[μ] conv K f μ := + MemLp.coeFn_toLp (memLp_conv Fact.out hp hK (Lp.memLp f)) + +/-- **Young's inequality on `L_p`**: `‖K ⋆ f‖_p ≤ ‖K‖_1 ‖f‖_p`. -/ +theorem norm_convLp_le (hp : p ≠ ∞) {K : V → ℂ} (hK : Integrable K μ) (f : Lp ℂ p μ) : + ‖convLp hp hK f‖ ≤ (eLpNorm K 1 μ).toReal * ‖f‖ := + norm_toLp_conv_le hp hK f + +/-- **Young's inequality on `L_p`** in extended norms: `‖K ⋆ f‖_p ≤ ‖K‖_1 ‖f‖_p`. -/ +theorem enorm_convLp_le (hp : p ≠ ∞) {K : V → ℂ} (hK : Integrable K μ) (f : Lp ℂ p μ) : + ‖convLp hp hK f‖ₑ ≤ eLpNorm K 1 μ * ‖f‖ₑ := by + rw [Lp.eNorm_def, Lp.eNorm_def, eLpNorm_congr_ae (convLp_apply_ae hp hK f)] + exact eLpNorm_conv_le Fact.out hp hK.aestronglyMeasurable (Lp.aestronglyMeasurable f) + +/-- **Convolution operators compose like their kernels**: `K ⋆ (L ⋆ f) = (K ⋆ L) ⋆ f` in `L_p` +(`Rd.conv_conv_ae`). -/ +theorem convLp_convLp (hp : p ≠ ∞) {K L : V → ℂ} (hK : Integrable K μ) (hL : Integrable L μ) + (f : Lp ℂ p μ) : convLp hp hK (convLp hp hL f) = convLp hp (integrable_conv hK hL) f := by + refine Lp.ext ?_ + have h1 : conv K (⇑(convLp hp hL f)) μ = conv K (conv L f μ) μ := + conv_congr_ae (convLp_apply_ae hp hL f) + filter_upwards [convLp_apply_ae hp hK (convLp hp hL f), + convLp_apply_ae hp (integrable_conv hK hL) f, conv_conv_ae Fact.out hp hK hL (Lp.memLp f)] + with x hx1 hx2 hx3 + rw [hx1, h1, hx2, hx3] + +/-- If `K ⋆ L = M`, then `K ⋆ (L ⋆ f) = M ⋆ f` in `L_p`. -/ +theorem convLp_convLp_of_eq (hp : p ≠ ∞) {K L M : V → ℂ} (hK : Integrable K μ) + (hL : Integrable L μ) (hM : Integrable M μ) (h : conv K L μ = M) (f : Lp ℂ p μ) : + convLp hp hK (convLp hp hL f) = convLp hp hM f := by + rw [convLp_convLp hp hK hL] + subst h + rfl + +/-- Convolution with the zero kernel is zero. -/ +theorem convLp_of_eq_zero (hp : p ≠ ∞) {K : V → ℂ} (hK : Integrable K μ) (h : K = 0) + (f : Lp ℂ p μ) : convLp hp hK f = 0 := by + subst h + rw [Lp.eq_zero_iff_ae_eq_zero] + filter_upwards [convLp_apply_ae hp hK f] with x hx + rw [hx, conv_apply] + simp + +/-- **Convolution operators commute**: `K ⋆ (L ⋆ f) = L ⋆ (K ⋆ f)` in `L_p`. -/ +theorem convLp_comm (hp : p ≠ ∞) {K L : V → ℂ} (hK : Integrable K μ) (hL : Integrable L μ) + (f : Lp ℂ p μ) : convLp hp hK (convLp hp hL f) = convLp hp hL (convLp hp hK f) := by + rw [convLp_convLp_of_eq hp hK hL (integrable_conv hL hK) (conv_comm K L), convLp_convLp] + +/-- **Convolution operators are additive in the kernel**: `(K + K') ⋆ f = K ⋆ f + K' ⋆ f` in +`L_p`. -/ +theorem convLp_add_kernel (hp : p ≠ ∞) {K K' : V → ℂ} (hK : Integrable K μ) + (hK' : Integrable K' μ) (f : Lp ℂ p μ) : + convLp hp (hK.add hK') f = convLp hp hK f + convLp hp hK' f := by + refine Lp.ext ?_ + filter_upwards [convLp_apply_ae hp (hK.add hK') f, convLp_apply_ae hp hK f, + convLp_apply_ae hp hK' f, Lp.coeFn_add (convLp hp hK f) (convLp hp hK' f), + add_conv_ae Fact.out hp hK hK' (Lp.memLp f)] with x h1 h2 h3 h4 h5 + rw [h1, h4, Pi.add_apply, h2, h3, h5, Pi.add_apply] + +/-- **Convolution operators are subtractive in the kernel**: `(K - K') ⋆ f = K ⋆ f - K' ⋆ f` +in `L_p`. -/ +theorem convLp_sub_kernel (hp : p ≠ ∞) {K K' : V → ℂ} (hK : Integrable K μ) + (hK' : Integrable K' μ) (f : Lp ℂ p μ) : + convLp hp (hK.sub hK') f = convLp hp hK f - convLp hp hK' f := by + refine Lp.ext ?_ + filter_upwards [convLp_apply_ae hp (hK.sub hK') f, convLp_apply_ae hp hK f, + convLp_apply_ae hp hK' f, Lp.coeFn_sub (convLp hp hK f) (convLp hp hK' f), + sub_conv_ae Fact.out hp hK hK' (Lp.memLp f)] with x h1 h2 h3 h4 h5 + rw [h1, h4, Pi.sub_apply, h2, h3, h5, Pi.sub_apply] + +end Rd + +/-! ### Pointwise bounds with Lebesgue measure -/ + +namespace Rd + +open Metric + +variable {V : Type*} [NormedAddCommGroup V] [InnerProductSpace ℝ V] [FiniteDimensional ℝ V] + [MeasurableSpace V] [BorelSpace V] + +/-- `0 ≤ 1 - 1/p` for `p ≥ 1`. -/ +theorem one_sub_one_div_toReal_nonneg {p : ℝ≥0∞} (hp1 : 1 ≤ p) : 0 ≤ 1 - 1 / p.toReal := by + rcases eq_or_ne p ∞ with hpt | hpt + · simp [hpt] + · have : 1 ≤ p.toReal := ENNReal.one_le_toReal_of_one_le hp1 hpt + rw [sub_nonneg, div_le_one (by linarith)] + exact this + +/-- **Hölder's inequality on a ball**: `∫_{B̄(x,ρ)} |g| ≤ |B̄(x,ρ)|^(1-1/p) ‖g‖_p`. -/ +theorem lintegral_closedBall_le {p : ℝ≥0∞} (hp1 : 1 ≤ p) {g : V → ℂ} + (hg : AEStronglyMeasurable g volume) (x : V) (ρ : ℝ) : + ∫⁻ z in closedBall x ρ, ‖g z‖ₑ ≤ + volume (closedBall x ρ) ^ (1 - 1 / p.toReal) * eLpNorm g p volume := by + have hgr : AEStronglyMeasurable g (volume.restrict (closedBall x ρ)) := hg.restrict + have h := eLpNorm_le_eLpNorm_mul_rpow_measure_univ hp1 hgr + rw [eLpNorm_one_eq_lintegral_eNorm hgr, Measure.restrict_apply_univ, ENNReal.toReal_one, + div_one] at h + refine h.trans ?_ + rw [mul_comm] + exact mul_le_mul' le_rfl (eLpNorm_mono_measure _ Measure.restrict_le_self) + +/-- `∫ |K(y)| |g(x - y)| dy ≤ A |B̄(0,ρ)|^(1-1/p) ‖g‖_p` if `|K| ≤ A` and `K = 0` outside +`B̄(0, ρ)`. -/ +theorem lintegral_kernel_mul_le {p : ℝ≥0∞} (hp1 : 1 ≤ p) {K g : V → ℂ} + (hg : AEStronglyMeasurable g volume) {A : ℝ≥0∞} (hK : ∀ y, ‖K y‖ₑ ≤ A) {ρ : ℝ} + (hKρ : ∀ y, ρ < ‖y‖ → K y = 0) (x : V) : + ∫⁻ y, ‖K y‖ₑ * ‖g (x - y)‖ₑ ≤ + A * volume (closedBall (0 : V) ρ) ^ (1 - 1 / p.toReal) * eLpNorm g p volume := by + set G : V → ℝ≥0∞ := (closedBall x ρ).indicator fun z => ‖g z‖ₑ + have h1 : ∀ y, ‖K y‖ₑ * ‖g (x - y)‖ₑ ≤ A * G (x - y) := fun y => by + by_cases hy : ‖y‖ ≤ ρ + · have hmem : x - y ∈ closedBall x ρ := by + rw [mem_closedBall, dist_eq_norm, sub_sub_cancel_left, norm_neg] + exact hy + simp only [G, Set.indicator_of_mem hmem] + exact mul_le_mul' (hK y) le_rfl + · rw [hKρ y (not_le.1 hy), eNorm_zero, zero_mul] + exact zero_le + calc ∫⁻ y, ‖K y‖ₑ * ‖g (x - y)‖ₑ ≤ ∫⁻ y, A * G (x - y) := lintegral_mono h1 + _ = ∫⁻ z, A * G z := lintegral_sub_left_eq_self (fun z => A * G z) x + _ = A * ∫⁻ z in closedBall x ρ, ‖g z‖ₑ := by + rw [lintegral_const_mul'' A (hg.eNorm.indicator measurableSet_closedBall), + lintegral_indicator measurableSet_closedBall] + _ ≤ A * (volume (closedBall x ρ) ^ (1 - 1 / p.toReal) * eLpNorm g p volume) := + mul_le_mul' le_rfl (lintegral_closedBall_le hp1 hg x ρ) + _ = _ := by rw [Measure.addHaar_closedBall_center, mul_assoc] + +/-- **Pointwise bound of a convolution**: if `|K| ≤ A` and `K = 0` outside `B̄(0, ρ)`, then +`|(K ⋆ g)(x)| ≤ A |B̄(0,ρ)|^(1-1/p) ‖g‖_p`, by Hölder's inequality on the ball `B̄(x, ρ)`. -/ +theorem enorm_conv_le_of_bound {p : ℝ≥0∞} (hp1 : 1 ≤ p) {K g : V → ℂ} + (hg : AEStronglyMeasurable g volume) {A : ℝ≥0∞} (hK : ∀ y, ‖K y‖ₑ ≤ A) {ρ : ℝ} + (hKρ : ∀ y, ρ < ‖y‖ → K y = 0) (x : V) : + ‖conv K g volume x‖ₑ ≤ + A * volume (closedBall (0 : V) ρ) ^ (1 - 1 / p.toReal) * eLpNorm g p volume := + (enorm_conv_le_lintegral K g x).trans (lintegral_kernel_mul_le hp1 hg hK hKρ x) + +/-- The convolution integrals of a continuous kernel with compact support and a locally integrable +function converge absolutely. -/ +theorem integrable_translate_mul_of_locallyIntegrable {K g : V → ℂ} (hKc : Continuous K) + (hKs : HasCompactSupport K) (hg : LocallyIntegrable g volume) (v x : V) : + Integrable (fun y => K (y + v) * g (x - y)) volume := by + have hc : HasCompactSupport fun y => K (y + v) := + hKs.comp_homeomorph (Homeomorph.addRight v) + exact (hc.convolutionExists_left (ContinuousLinearMap.mul ℂ ℂ) + (hKc.comp (continuous_id.add continuous_const)) hg) x + +/-- `(K ⋆ g)(x + v) = ∫ K(y + v) g(x - y) dy`, by translation invariance. -/ +theorem conv_add_apply (K g : V → ℂ) (x v : V) : + conv K g volume (x + v) = ∫ y, K (y + v) * g (x - y) := by + rw [conv_apply, ← integral_add_right_eq_self (fun y => K y * g (x + v - y)) v] + congr 1 + funext y + congr 2 + abel + +end Rd diff --git a/LeanPool/FunctionSpaces/Analysis/Fourier/LittlewoodPaleyKernels.lean b/LeanPool/FunctionSpaces/Analysis/Fourier/LittlewoodPaleyKernels.lean new file mode 100644 index 0000000000..349317d414 --- /dev/null +++ b/LeanPool/FunctionSpaces/Analysis/Fourier/LittlewoodPaleyKernels.lean @@ -0,0 +1,769 @@ +/- +Copyright (c) 2026 Mario Ullrich. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Mario Ullrich +-/ +module + +public import LeanPool.FunctionSpaces.Analysis.Fourier.ApproxIdentity +public import Mathlib.Analysis.Fourier.Inversion +public import Mathlib.Analysis.Fourier.Convolution +public import Mathlib.Analysis.Distribution.SchwartzSpace.Fourier +public import Mathlib.Analysis.Calculus.BumpFunction.InnerProduct + +/- +Modified for Lean Pool: module names and imports adapted. +-/ + +/-! +# Littlewood–Paley kernels + +On a finite-dimensional real inner product space `V` with Lebesgue measure, the Fourier transform +is `𝓕 f(ξ) = ∫ e^(-2πi⟪x, ξ⟫) f(x) dx` (Mathlib's `Real.fourier_eq`). For integrable `K`, the +transforms `𝓕K` and `𝓕⁻K` are continuous and bounded by `‖K‖_1` +(`Rd.continuous_fourier_of_integrable`, `Rd.norm_fourier_le_integral_norm`, +`Rd.enorm_fourier_le_lintegral`, `Rd.continuous_fourierInv_of_integrable`, +`Rd.norm_fourierInv_le_integral_norm`), +`𝓕K ∈ L_∞` (`Rd.memLp_top_fourier`), the transform respects sums and differences +(`Rd.fourier_add_apply`, `Rd.fourier_sub_apply`) and conjugation as `conj (𝓕 f) = 𝓕⁻(conj f)`, +`conj (𝓕⁻ f) = 𝓕(conj f)` for every `f : V → ℂ` (`Rd.conj_fourier_apply`, +`Rd.conj_fourierInv_apply`), `𝓕(K ⋆ L) = 𝓕K · 𝓕L` (`Rd.fourier_conv`), +`𝓕K(0) = ∫ K` (`Rd.fourier_apply_zero`), and the multiplication formula +`∫ 𝓕u · K = ∫ u · 𝓕K`, `∫ 𝓕⁻u · K = ∫ u · 𝓕⁻K` holds for integrable `u` and `K` +(`Rd.integral_fourier_mul`, `Rd.integral_fourierInv_mul`), in particular for Schwartz functions +`u` (`Rd.integral_fourier_smul_eq_of_integrable`, `Rd.integral_fourierInv_smul_eq_of_integrable`). +The character `t ↦ e^(2πit)` is `2π`-Lipschitz (`Rd.norm_fourierChar_sub_le`), so the inverse +transform of an integrable `g` vanishing outside the ball of radius `K` is Lipschitz with +constant `2πK ‖g‖_1` (`Rd.norm_fourierInv_sub_le`). +The kernels of the Littlewood–Paley decomposition are inverse transforms of smooth cut-offs: + +* `Rd.cutoff a b`: a smooth function equal to `1` on the closed ball of radius `a` and to `0` + outside the ball of radius `b` (Mathlib's `ContDiffBump`), a Schwartz function + (`Rd.cutoffSchwartz`); +* `Rd.lpKernel = 𝓕⁻¹ χ_{1,2}` (`Rd.fourier_lpKernel`, `Rd.fourier_lpKernelS`) with + `∫ lpKernel = 1` (`Rd.integral_lpKernel`), hence + `1 ≤ ‖lpKernel‖_1 < ∞` (`Rd.one_le_eLpNorm_lpKernel`, `Rd.eLpNorm_lpKernel_ne_top`, + `Rd.eLpNorm_lpKernel_lt_top`), and + `Rd.bandKernel = 𝓕⁻¹ χ_{2,4}`; +* their dilations `Φ_k = Rd.Phi k` and `Θ_k = Rd.Theta k` by `2^k`, whose transforms are the + cut-offs at scale `2^k` (`Rd.fourier_dilate`: `𝓕(Φ_c)(ξ) = 𝓕Φ(c^(-1) ξ)`), and the blocks + `ψ_0 = Φ_0`, `ψ_j = Φ_j - Φ_{j-1}` (`Rd.psi`), with `∑_{j ≤ J} ψ_j = Φ_J` (`Rd.sum_psi`). + +On the frequency side `𝓕Φ_k` lives in the ball of radius `2^(k+1)`, `𝓕Θ_k` in the ball of radius +`2^(k+2)` and equals `1` on the ball of radius `2^(k+1)`, and `𝓕ψ_{j+1}` lives in the annulus +`2^j ≤ |ξ| ≤ 2^(j+2)`. The transforms of the blocks satisfy `|𝓕ψ_j| ≤ 1` +(`Rd.norm_fourier_psi_le_one`, `Rd.enorm_fourier_psi_le_one`) and telescope, +`∑_{j ≤ J} 𝓕ψ_j = 𝓕Φ_J` (`Rd.sum_range_fourier_psi`); at every frequency `ξ` at most the two +blocks `a`, `a + 1` are nonzero, and their transforms add up to `1` +(`Rd.exists_fourier_psi_window`); and where `𝓕ψ_j(ξ) ≠ 0`, `4^j ≤ 4(1 + |ξ|²)` +(`Rd.four_pow_le_of_fourier_psi_ne_zero`). The **kernel identities** follow by comparing Fourier +transforms (`Rd.conv_eq_of_fourier`: if `𝓕K · 𝓕L = 𝓕M`, then `K ⋆ L = M`, by `Rd.fourier_conv` +and the inversion theorem `Continuous.fourierInv_fourier_eq`): + +* `Θ_{k+1} ⋆ Θ_k = Θ_k` (`Rd.conv_Theta_succ`): the band-limited classes increase; +* `Θ_j ⋆ ψ_j = ψ_j` (`Rd.conv_Theta_psi`): the blocks are band-limited; +* `ψ_j ⋆ Θ_k = 0` for `j ≥ k + 3` (`Rd.conv_psi_Theta`): high blocks of band-limited functions + vanish. +-/ + +@[expose] public section + +open MeasureTheory Filter Topology Module ComplexConjugate +open scoped ENNReal FourierTransform SchwartzMap Real + +namespace Rd + +variable {V : Type*} [NormedAddCommGroup V] [InnerProductSpace ℝ V] [FiniteDimensional ℝ V] + [MeasurableSpace V] [BorelSpace V] + +/-! ### Dilations and the Fourier transform -/ + +omit [FiniteDimensional ℝ V] [MeasurableSpace V] [BorelSpace V] in +/-- Dilations of continuous functions are continuous. -/ +theorem continuous_dilate {Φ : V → ℂ} (hΦ : Continuous Φ) (c : ℝ) : Continuous (dilate c Φ) := + continuous_const.mul (hΦ.comp (continuous_const_smul c)) + +omit [FiniteDimensional ℝ V] [MeasurableSpace V] [BorelSpace V] in +/-- Dilations of bounded functions are bounded. -/ +theorem bddAbove_dilate {Φ : V → ℂ} (hΦ : BddAbove (Set.range fun x => ‖Φ x‖)) (c : ℝ) : + BddAbove (Set.range fun x => ‖dilate c Φ x‖) := by + obtain ⟨B, hB⟩ := hΦ + refine ⟨‖(((c ^ finrank ℝ V : ℝ)) : ℂ)‖ * B, Set.forall_mem_range.2 fun x => ?_⟩ + rw [dilate, norm_mul] + exact mul_le_mul_of_nonneg_left (hB (Set.mem_range_self _)) (norm_nonneg _) + +/-- **The dilation formula**: `𝓕(Φ_c)(ξ) = 𝓕Φ(c^(-1) ξ)` for `c > 0`, by the substitution +`y = c x` (Mathlib's `Measure.integral_comp_smul`). -/ +theorem fourier_dilate (Φ : V → ℂ) {c : ℝ} (hc : 0 < c) (ξ : V) : + 𝓕 (dilate c Φ) ξ = 𝓕 Φ (c⁻¹ • ξ) := by + have hpow : (0 : ℝ) < c ^ finrank ℝ V := pow_pos hc _ + have hinner : ∀ v : V, inner ℝ (c • v) (c⁻¹ • ξ) = inner ℝ v ξ := fun v => by + rw [real_inner_smul_left, real_inner_smul_right, ← mul_assoc, mul_inv_cancel₀ hc.ne', + one_mul] + have h : ∀ v : V, 𝐞 (-inner ℝ v ξ) • dilate c Φ v = (((c ^ finrank ℝ V : ℝ)) : ℂ) * + (fun y => 𝐞 (-inner ℝ y (c⁻¹ • ξ)) • Φ y) (c • v) := fun v => by + simp only [dilate, hinner, Circle.smul_def, smul_eq_mul] + ring + rw [Real.fourier_eq, Real.fourier_eq] + simp_rw [h] + rw [integral_const_mul, Measure.integral_comp_smul volume + (fun y => 𝐞 (-inner ℝ y (c⁻¹ • ξ)) • Φ y) c, abs_of_pos (inv_pos.2 hpow), Complex.real_smul, + ← mul_assoc, ← Complex.ofReal_mul, mul_inv_cancel₀ hpow.ne', Complex.ofReal_one, one_mul] + +/-- The dilation formula read backwards: `𝓕Φ(ζ) = 𝓕(Φ_c)(c ζ)` for `c > 0`. -/ +theorem fourier_eq_fourier_dilate (Φ : V → ℂ) {c : ℝ} (hc : 0 < c) (ζ : V) : + 𝓕 Φ ζ = 𝓕 (dilate c Φ) (c • ζ) := by + rw [fourier_dilate _ hc, inv_smul_smul₀ hc.ne'] + +/-- The Fourier transform of a dilation is integrable if that of the function is. -/ +theorem integrable_fourier_dilate {Φ : V → ℂ} (hΦ : Integrable (𝓕 Φ)) {c : ℝ} (hc : 0 < c) : + Integrable (𝓕 (dilate c Φ)) := by + rw [show 𝓕 (dilate c Φ) = fun ξ => 𝓕 Φ (c⁻¹ • ξ) from funext (fourier_dilate Φ hc)] + exact hΦ.comp_smul (inv_ne_zero hc.ne') + +/-! ### The Fourier transform of integrable functions -/ + +/-- The Fourier transform of a sum of integrable functions is the sum of the transforms (Mathlib's +`VectorFourier.fourierIntegral_add`). -/ +theorem fourier_add_apply {f g : V → ℂ} (hf : Integrable f) (hg : Integrable g) (ξ : V) : + 𝓕 (f + g) ξ = 𝓕 f ξ + 𝓕 g ξ := + congrFun (VectorFourier.fourierIntegral_add Real.continuous_fourierChar + (innerSL ℝ).continuous₂ hf hg) ξ + +/-- The Fourier transform of a difference of integrable functions is the difference of the +transforms. -/ +theorem fourier_sub_apply {f g : V → ℂ} (hf : Integrable f) (hg : Integrable g) (ξ : V) : + 𝓕 (f - g) ξ = 𝓕 f ξ - 𝓕 g ξ := by + simp only [Real.fourier_eq, Pi.sub_apply, smul_sub] + exact integral_sub ((Real.fourierIntegral_convergent_iff ξ).2 hf) + ((Real.fourierIntegral_convergent_iff ξ).2 hg) + +/-- **Conjugation and the Fourier transform**: for `f : V → ℂ` and `ξ ∈ V`, +`conj (𝓕 f(ξ)) = 𝓕⁻(conj ∘ f)(ξ)`, since `conj e^{-2πi⟨x, ξ⟩} = e^{2πi⟨x, ξ⟩}`. -/ +theorem conj_fourier_apply (f : V → ℂ) (ξ : V) : + conj (𝓕 f ξ) = 𝓕⁻ (fun x => conj (f x)) ξ := by + rw [Real.fourier_eq, Real.fourierInv_eq, ← integral_conj] + congr 1 with x + rw [Circle.smul_def, Circle.smul_def, smul_eq_mul, smul_eq_mul, map_mul, + Circle.starRingEnd_addChar, neg_neg] + +/-- **Conjugation and the inverse Fourier transform**: for `f : V → ℂ` and `x ∈ V`, +`conj (𝓕⁻ f(x)) = 𝓕(conj ∘ f)(x)`. -/ +theorem conj_fourierInv_apply (f : V → ℂ) (x : V) : + conj (𝓕⁻ f x) = 𝓕 (fun ξ => conj (f ξ)) x := by + rw [Real.fourierInv_eq, Real.fourier_eq, ← integral_conj] + congr 1 with ξ + rw [Circle.smul_def, Circle.smul_def, smul_eq_mul, smul_eq_mul, map_mul, + Circle.starRingEnd_addChar] + +/-- **The Fourier transform of a convolution** is the product of the transforms: +`𝓕(K ⋆ L)(ξ) = 𝓕K(ξ) 𝓕L(ξ)` for integrable `K` and `L` (Mathlib's +`Real.fourier_bilin_convolution_eq`). -/ +theorem fourier_conv {K L : V → ℂ} (hK : Integrable K) (hL : Integrable L) (ξ : V) : + 𝓕 (conv K L volume) ξ = 𝓕 K ξ * 𝓕 L ξ := by + rw [conv, Real.fourier_bilin_convolution_eq _ hK hL] + rfl + +/-- **The Fourier transform at the origin is the integral**: `𝓕K(0) = ∫ K`. -/ +theorem fourier_apply_zero (K : V → ℂ) : 𝓕 K 0 = ∫ x, K x := by + simp [Real.fourier_eq] + +/-- **The Fourier transform of an integrable function is continuous** (Mathlib's +`VectorFourier.fourierIntegral_continuous`). -/ +theorem continuous_fourier_of_integrable {K : V → ℂ} (hK : Integrable K) : Continuous (𝓕 K) := + VectorFourier.fourierIntegral_continuous Real.continuous_fourierChar + (innerSL ℝ).continuous₂ hK + +/-- **The multiplication formula** `∫ 𝓕f · g = ∫ f · 𝓕g` for integrable `f, g : V → ℂ`: both +sides are the double integral `∫∫ e^(-2πi⟪x, ξ⟫) f(x) g(ξ) dx dξ` (Fubini, Mathlib's +`VectorFourier.integral_bilin_fourierIntegral_eq_flip` with the product as bilinear form). -/ +theorem integral_fourier_mul {f g : V → ℂ} (hf : Integrable f) (hg : Integrable g) : + ∫ ξ, 𝓕 f ξ * g ξ = ∫ x, f x * 𝓕 g x := by + simpa using! VectorFourier.integral_bilin_fourierIntegral_eq_flip (ContinuousLinearMap.mul ℂ ℂ) + (L := innerₗ V) Real.continuous_fourierChar continuous_inner hf hg + +/-- **The multiplication formula for the inverse transform** `∫ 𝓕⁻f · g = ∫ f · 𝓕⁻g` for +integrable `f, g : V → ℂ` (the pairing `-⟪ξ, x⟫` in Mathlib's +`VectorFourier.integral_bilin_fourierIntegral_eq_flip`). -/ +theorem integral_fourierInv_mul {f g : V → ℂ} (hf : Integrable f) (hg : Integrable g) : + ∫ ξ, 𝓕⁻ f ξ * g ξ = ∫ x, f x * 𝓕⁻ g x := by + have hL : (-innerₗ V).flip = -innerₗ V := by + ext x y + simp [real_inner_comm] + have h := VectorFourier.integral_bilin_fourierIntegral_eq_flip (ContinuousLinearMap.mul ℂ ℂ) + (L := -innerₗ V) Real.continuous_fourierChar continuous_inner.neg hf hg + rw [hL] at h + simpa using! h + +/-- **Duality for the Fourier transform** (the multiplication formula), `∫ 𝓕u · g = ∫ u · 𝓕g`, +for a Schwartz function `u` and an integrable function `g` (`Rd.integral_fourier_mul`). -/ +theorem integral_fourier_smul_eq_of_integrable (u : 𝓢(V, ℂ)) {g : V → ℂ} (hg : Integrable g) : + ∫ ξ, 𝓕 u ξ • g ξ = ∫ x, u x • 𝓕 g x := by + simpa [SchwartzMap.fourier_coe] using integral_fourier_mul u.integrable hg + +/-- The Fourier transform of a function is bounded by its `L_1` norm: +`|𝓕K(ξ)| ≤ ∫ |K|` for every `ξ` (Mathlib's `VectorFourier.norm_fourierIntegral_le_integral_norm`). +-/ +theorem norm_fourier_le_integral_norm (K : V → ℂ) (ξ : V) : ‖𝓕 K ξ‖ ≤ ∫ x, ‖K x‖ := + VectorFourier.norm_fourierIntegral_le_integral_norm 𝐞 volume (innerₗ V) K ξ + +/-- The Fourier transform of a function is bounded by its `L_1` norm, in `ℝ≥0∞`: +`|𝓕K(ξ)| ≤ ∫ |K|` for every `K` and `ξ` (Mathlib's `eNorm_integral_le_lintegral_eNorm`, with +`|e^(-2πi⟪x, ξ⟫)| = 1`). -/ +theorem enorm_fourier_le_lintegral (K : V → ℂ) (ξ : V) : ‖𝓕 K ξ‖ₑ ≤ ∫⁻ x, ‖K x‖ₑ := by + rw [Real.fourier_eq] + simpa using eNorm_integral_le_lintegral_eNorm (fun v => 𝐞 (-inner ℝ v ξ) • K v) + +/-- The Fourier transform of an integrable function lies in `L_∞`: it is continuous +(`Rd.continuous_fourier_of_integrable`) and bounded by `‖K‖_1`. -/ +theorem memLp_top_fourier {K : V → ℂ} (hK : Integrable K) : MemLp (𝓕 K) ∞ volume := + memLp_top_of_bound (continuous_fourier_of_integrable hK).aestronglyMeasurable _ + (ae_of_all _ (norm_fourier_le_integral_norm K)) + +/-- The inverse Fourier transform `𝓕⁻g(x) = ∫ e^(2πi⟪ξ, x⟫) g(ξ) dξ` of an integrable function is +continuous, since `𝓕⁻g(x) = 𝓕g(-x)` (Mathlib's `Real.fourierInv_eq_fourier_neg`). -/ +theorem continuous_fourierInv_of_integrable {g : V → ℂ} (hg : Integrable g) : + Continuous (𝓕⁻ g) := by + rw [show 𝓕⁻ g = fun x => 𝓕 g (-x) from funext (Real.fourierInv_eq_fourier_neg g)] + exact (continuous_fourier_of_integrable hg).comp continuous_neg + +/-- The inverse Fourier transform is bounded by the `L_1` norm: `|𝓕⁻g(x)| ≤ ∫ |g|` for every +`x`. -/ +theorem norm_fourierInv_le_integral_norm (g : V → ℂ) (x : V) : ‖𝓕⁻ g x‖ ≤ ∫ ξ, ‖g ξ‖ := by + rw [Real.fourierInv_eq_fourier_neg] + exact norm_fourier_le_integral_norm g (-x) + +/-- **Duality for the inverse Fourier transform** (the multiplication formula), +`∫ 𝓕⁻u · g = ∫ u · 𝓕⁻g`, for a Schwartz function `u` and an integrable function `g` +(`Rd.integral_fourierInv_mul`). -/ +theorem integral_fourierInv_smul_eq_of_integrable (u : 𝓢(V, ℂ)) {g : V → ℂ} + (hg : Integrable g) : ∫ ξ, 𝓕⁻ u ξ • g ξ = ∫ x, u x • 𝓕⁻ g x := by + simpa [SchwartzMap.fourierInv_coe] using integral_fourierInv_mul u.integrable hg + +/-- The character `t ↦ e^(2πit)` is `2π`-Lipschitz: `|e^(2πia) - e^(2πib)| ≤ 2π |a - b|` +(Mathlib's `Real.norm_exp_I_mul_ofReal_sub_one_le`). -/ +theorem norm_fourierChar_sub_le (a b : ℝ) : ‖(𝐞 a : ℂ) - 𝐞 b‖ ≤ 2 * π * |a - b| := by + have h : (𝐞 a : ℂ) - 𝐞 b = 𝐞 b * (𝐞 (a - b) - 1) := by + rw [mul_sub, mul_one, ← Circle.coe_mul, ← AddChar.map_add_eq_mul, add_sub_cancel] + rw [h, norm_mul, Circle.norm_coe, one_mul, Real.fourierChar_apply, mul_comm _ Complex.I] + refine Real.norm_exp_I_mul_ofReal_sub_one_le.trans_eq ?_ + rw [Real.norm_eq_abs, abs_mul, abs_of_pos Real.two_pi_pos] + +/-- **Band-limited functions are Lipschitz**: if `g` is integrable and `g(ξ) = 0` for almost +every `ξ` with `|ξ| > K`, then `|𝓕⁻g(x) - 𝓕⁻g(y)| ≤ 2πK |x - y| ∫ |g|` for all `x, y`, since +`|e^(2πi⟪ξ, x⟫) - e^(2πi⟪ξ, y⟫)| ≤ 2π |⟪ξ, x - y⟫| ≤ 2πK |x - y|` for `|ξ| ≤ K`. -/ +theorem norm_fourierInv_sub_le {g : V → ℂ} (hg : Integrable g) {K : ℝ} + (hgK : ∀ᵐ ξ, K < ‖ξ‖ → g ξ = 0) (x y : V) : + ‖𝓕⁻ g x - 𝓕⁻ g y‖ ≤ 2 * π * K * ‖x - y‖ * ∫ ξ, ‖g ξ‖ := by + have hi : ∀ w : V, Integrable (fun ξ => 𝐞 (inner ℝ ξ w) • g ξ) := fun w => by + simpa using (VectorFourier.fourierIntegral_convergent_iff Real.continuous_fourierChar + (show Continuous fun p : V × V => (-innerₗ V) p.1 p.2 from continuous_inner.neg) + (μ := volume) w).2 hg + rw [Real.fourierInv_eq, Real.fourierInv_eq, ← integral_sub (hi x) (hi y), + ← integral_const_mul] + refine norm_integral_le_of_norm_le (hg.norm.const_mul _) ?_ + filter_upwards [hgK] with ξ hξK + simp only [Circle.smul_def, smul_eq_mul, ← sub_mul, norm_mul] + by_cases hξ : K < ‖ξ‖ + · simp [hξK hξ] + · push Not at hξ + have h2 : |inner ℝ ξ x - inner ℝ ξ y| ≤ K * ‖x - y‖ := by + rw [← inner_sub_right] + exact (abs_real_inner_le_norm _ _).trans (mul_le_mul_of_nonneg_right hξ (norm_nonneg _)) + gcongr + calc _ ≤ 2 * π * |inner ℝ ξ x - inner ℝ ξ y| := norm_fourierChar_sub_le _ _ + _ ≤ 2 * π * (K * ‖x - y‖) := by gcongr + _ = _ := by ring + +/-! ### Smooth cut-offs -/ + +omit [InnerProductSpace ℝ V] [FiniteDimensional ℝ V] [MeasurableSpace V] [BorelSpace V] in +/-- Schwartz functions are bounded. -/ +theorem bddAbove_schwartz [NormedSpace ℝ V] (f : 𝓢(V, ℂ)) : + BddAbove (Set.range fun x => ‖f x‖) := + ⟨_, Set.forall_mem_range.2 fun x => SchwartzMap.norm_le_seminorm ℝ f x⟩ + +/-- The **smooth cut-off** `χ_{a,b}` with `0 < a < b`: `1` on the closed ball of radius `a`, `0` +outside the ball of radius `b`, with values in `[0, 1]` (Mathlib's `ContDiffBump`). -/ +noncomputable def cutoff (a b : ℝ) (ha : 0 < a) (hab : a < b) (ξ : V) : ℂ := + (((⟨a, b, ha, hab⟩ : ContDiffBump (0 : V)) ξ : ℝ) : ℂ) + +omit [FiniteDimensional ℝ V] [MeasurableSpace V] [BorelSpace V] in +/-- The cut-off is `1` on the closed ball of radius `a`. -/ +theorem cutoff_eq_one {a b : ℝ} (ha : 0 < a) (hab : a < b) {ξ : V} (hξ : ‖ξ‖ ≤ a) : + cutoff a b ha hab ξ = 1 := by + rw [cutoff, ContDiffBump.one_of_mem_closedBall _ (by simpa using hξ), Complex.ofReal_one] + +omit [FiniteDimensional ℝ V] [MeasurableSpace V] [BorelSpace V] in +/-- The cut-off is `0` outside the ball of radius `b`. -/ +theorem cutoff_eq_zero {a b : ℝ} (ha : 0 < a) (hab : a < b) {ξ : V} (hξ : b ≤ ‖ξ‖) : + cutoff a b ha hab ξ = 0 := by + rw [cutoff, ContDiffBump.zero_of_le_dist _ (by simpa using hξ), Complex.ofReal_zero] + +omit [FiniteDimensional ℝ V] [MeasurableSpace V] [BorelSpace V] in +/-- Where the cut-off does not vanish, `‖ξ‖ < b`. -/ +theorem norm_lt_of_cutoff_ne_zero {a b : ℝ} (ha : 0 < a) (hab : a < b) {ξ : V} + (h : cutoff a b ha hab ξ ≠ 0) : ‖ξ‖ < b := + not_le.1 fun h' => h (cutoff_eq_zero ha hab h') + +omit [FiniteDimensional ℝ V] [MeasurableSpace V] [BorelSpace V] in +/-- The cut-off is smooth. -/ +theorem contDiff_cutoff {a b : ℝ} (ha : 0 < a) (hab : a < b) : + ContDiff ℝ ((⊤ : ℕ∞) : WithTop ℕ∞) (cutoff (V := V) a b ha hab) := + Complex.ofRealCLM.contDiff.comp (ContDiffBump.contDiff _) + +omit [MeasurableSpace V] [BorelSpace V] in +/-- The cut-off has compact support. -/ +theorem hasCompactSupport_cutoff {a b : ℝ} (ha : 0 < a) (hab : a < b) : + HasCompactSupport (cutoff (V := V) a b ha hab) := + (ContDiffBump.hasCompactSupport _).comp_left Complex.ofReal_zero + +/-- The cut-off as a **Schwartz function**. -/ +noncomputable def cutoffSchwartz (a b : ℝ) (ha : 0 < a) (hab : a < b) : 𝓢(V, ℂ) := + (hasCompactSupport_cutoff ha hab).toSchwartzMap (contDiff_cutoff ha hab) + +omit [MeasurableSpace V] [BorelSpace V] in +/-- The Schwartz cut-off is the cut-off. -/ +theorem coe_cutoffSchwartz {a b : ℝ} (ha : 0 < a) (hab : a < b) : + (cutoffSchwartz a b ha hab : V → ℂ) = cutoff a b ha hab := + rfl + +/-! ### The kernels -/ + +/-- The **Littlewood–Paley kernel** `Φ = 𝓕⁻¹ χ_{1,2}`, a Schwartz function. -/ +noncomputable def lpKernelS : 𝓢(V, ℂ) := 𝓕⁻ (cutoffSchwartz (V := V) 1 2 one_pos one_lt_two) + +/-- The **band-limiting kernel** `Θ = 𝓕⁻¹ χ_{2,4}`, a Schwartz function. -/ +noncomputable def bandKernelS : 𝓢(V, ℂ) := + 𝓕⁻ (cutoffSchwartz (V := V) 2 4 two_pos (by norm_num)) + +/-- The Littlewood–Paley kernel as a function. -/ +noncomputable def lpKernel : V → ℂ := (lpKernelS : 𝓢(V, ℂ)) + +/-- The band-limiting kernel as a function. -/ +noncomputable def bandKernel : V → ℂ := (bandKernelS : 𝓢(V, ℂ)) + +/-- `𝓕 Φ = χ_{1,2}`. -/ +theorem fourier_lpKernel : 𝓕 (lpKernel (V := V)) = cutoff 1 2 one_pos one_lt_two := by + rw [lpKernel, ← SchwartzMap.fourier_coe, lpKernelS, FourierInvPair.fourier_fourierInv_eq, + coe_cutoffSchwartz] + +/-- `𝓕 Φ = χ_{1,2}` as Schwartz functions (Mathlib's `FourierInvPair.fourier_fourierInv_eq`). -/ +theorem fourier_lpKernelS : + (𝓕 (lpKernelS (V := V)) : 𝓢(V, ℂ)) = cutoffSchwartz 1 2 one_pos one_lt_two := + FourierInvPair.fourier_fourierInv_eq _ + +/-- `𝓕 Θ = χ_{2,4}`. -/ +theorem fourier_bandKernel : 𝓕 (bandKernel (V := V)) = cutoff 2 4 two_pos (by norm_num) := by + rw [bandKernel, ← SchwartzMap.fourier_coe, bandKernelS, FourierInvPair.fourier_fourierInv_eq, + coe_cutoffSchwartz] + +/-- The Littlewood–Paley kernel is integrable. -/ +theorem integrable_lpKernel : Integrable (lpKernel (V := V)) := + (lpKernelS : 𝓢(V, ℂ)).integrable + +/-- The band-limiting kernel is integrable. -/ +theorem integrable_bandKernel : Integrable (bandKernel (V := V)) := + (bandKernelS : 𝓢(V, ℂ)).integrable + +/-- The Littlewood–Paley kernel is continuous. -/ +theorem continuous_lpKernel : Continuous (lpKernel (V := V)) := + (lpKernelS : 𝓢(V, ℂ)).continuous + +/-- The band-limiting kernel is continuous. -/ +theorem continuous_bandKernel : Continuous (bandKernel (V := V)) := + (bandKernelS : 𝓢(V, ℂ)).continuous + +/-- The Littlewood–Paley kernel is bounded. -/ +theorem bddAbove_lpKernel : BddAbove (Set.range fun x => ‖lpKernel (V := V) x‖) := + bddAbove_schwartz _ + +/-- The band-limiting kernel is bounded. -/ +theorem bddAbove_bandKernel : BddAbove (Set.range fun x => ‖bandKernel (V := V) x‖) := + bddAbove_schwartz _ + +/-- The Fourier transform of the Littlewood–Paley kernel is integrable. -/ +theorem integrable_fourier_lpKernel : Integrable (𝓕 (lpKernel (V := V))) := by + rw [fourier_lpKernel, ← coe_cutoffSchwartz] + exact SchwartzMap.integrable _ + +/-- The Fourier transform of the band-limiting kernel is integrable. -/ +theorem integrable_fourier_bandKernel : Integrable (𝓕 (bandKernel (V := V))) := by + rw [fourier_bandKernel, ← coe_cutoffSchwartz] + exact SchwartzMap.integrable _ + +/-- **The Littlewood–Paley kernel has integral `1`**: `∫ Φ = 𝓕Φ(0) = χ_{1,2}(0) = 1`. -/ +theorem integral_lpKernel : ∫ x, lpKernel (V := V) x = 1 := by + have h := congr_fun (fourier_lpKernel (V := V)) 0 + rw [Real.fourier_eq] at h + simp only [inner_zero_right, neg_zero, AddChar.map_zero_eq_one, one_smul] at h + rw [h] + exact cutoff_eq_one _ _ (by simp) + +/-! ### Dilated kernels and blocks -/ + +/-- The dilated Littlewood–Paley kernel `Φ_k = 2^(kn) Φ(2^k ·)`. -/ +noncomputable def Phi (k : ℕ) : V → ℂ := dilate (2 ^ k) lpKernel + +/-- The dilated band-limiting kernel `Θ_k = 2^(kn) Θ(2^k ·)`. -/ +noncomputable def Theta (k : ℕ) : V → ℂ := dilate (2 ^ k) bandKernel + +/-- The **Littlewood–Paley blocks** `ψ_0 = Φ_0`, `ψ_j = Φ_j - Φ_{j-1}`. -/ +noncomputable def psi : ℕ → V → ℂ + | 0 => Phi 0 + | j + 1 => Phi (j + 1) - Phi j + +/-- **The blocks add up to the dilated kernel**: `∑_{j ≤ J} ψ_j = Φ_J`. -/ +theorem sum_psi (J : ℕ) : ∑ j ∈ Finset.range (J + 1), psi (V := V) j = Phi J := by + induction J with + | zero => simp [psi] + | succ J ih => rw [Finset.sum_range_succ, ih, psi, add_sub_cancel] + +/-- The dilated kernels are integrable. -/ +theorem integrable_Phi (k : ℕ) : Integrable (Phi (V := V) k) := + integrable_dilate integrable_lpKernel (by positivity) + +/-- The dilated kernels are integrable. -/ +theorem integrable_Theta (k : ℕ) : Integrable (Theta (V := V) k) := + integrable_dilate integrable_bandKernel (by positivity) + +/-- The blocks are integrable. -/ +theorem integrable_psi (j : ℕ) : Integrable (psi (V := V) j) := by + cases j with + | zero => exact integrable_Phi 0 + | succ j => exact (integrable_Phi (j + 1)).sub (integrable_Phi j) + +/-- The dilated kernels are continuous. -/ +theorem continuous_Phi (k : ℕ) : Continuous (Phi (V := V) k) := + continuous_dilate continuous_lpKernel _ + +/-- The dilated kernels are continuous. -/ +theorem continuous_Theta (k : ℕ) : Continuous (Theta (V := V) k) := + continuous_dilate continuous_bandKernel _ + +/-- The blocks are continuous. -/ +theorem continuous_psi (j : ℕ) : Continuous (psi (V := V) j) := by + cases j with + | zero => exact continuous_Phi 0 + | succ j => exact (continuous_Phi (j + 1)).sub (continuous_Phi j) + +/-- The dilated kernels are bounded. -/ +theorem bddAbove_Phi (k : ℕ) : BddAbove (Set.range fun x => ‖Phi (V := V) k x‖) := + bddAbove_dilate bddAbove_lpKernel _ + +/-- The dilated kernels are bounded. -/ +theorem bddAbove_Theta (k : ℕ) : BddAbove (Set.range fun x => ‖Theta (V := V) k x‖) := + bddAbove_dilate bddAbove_bandKernel _ + +/-- The blocks are bounded. -/ +theorem bddAbove_psi (j : ℕ) : BddAbove (Set.range fun x => ‖psi (V := V) j x‖) := by + cases j with + | zero => exact bddAbove_Phi 0 + | succ j => + obtain ⟨A, hA⟩ := bddAbove_Phi (V := V) (j + 1) + obtain ⟨B, hB⟩ := bddAbove_Phi (V := V) j + change BddAbove (Set.range fun x => ‖Phi (j + 1) x - Phi j x‖) + exact ⟨A + B, Set.forall_mem_range.2 fun x => (norm_sub_le _ _).trans + (add_le_add (hA (Set.mem_range_self x)) (hB (Set.mem_range_self x)))⟩ + +/-- `‖Φ_k‖_1 = ‖Φ‖_1`. -/ +theorem eLpNorm_Phi_one (k : ℕ) : + eLpNorm (Phi (V := V) k) 1 volume = eLpNorm (lpKernel (V := V)) 1 volume := + eLpNorm_dilate_one integrable_lpKernel (by positivity) + +/-- `‖Θ_k‖_1 = ‖Θ‖_1`. -/ +theorem eLpNorm_Theta_one (k : ℕ) : + eLpNorm (Theta (V := V) k) 1 volume = eLpNorm (bandKernel (V := V)) 1 volume := + eLpNorm_dilate_one integrable_bandKernel (by positivity) + +/-- The norm `‖Θ‖_1` of the band-limiting kernel is finite. -/ +theorem eLpNorm_bandKernel_ne_top : eLpNorm (bandKernel (V := V)) 1 volume ≠ ⊤ := + (memLp_one_iff_integrable.2 integrable_bandKernel).eLpNorm_ne_top + +/-- The norm `‖Φ‖_1` of the low-pass kernel is finite. -/ +theorem eLpNorm_lpKernel_ne_top : eLpNorm (lpKernel (V := V)) 1 volume ≠ ⊤ := + (memLp_one_iff_integrable.2 integrable_lpKernel).eLpNorm_ne_top + +/-- The norm `‖Φ‖_1` of the low-pass kernel is finite, as a strict inequality +(`Rd.eLpNorm_lpKernel_ne_top`). -/ +theorem eLpNorm_lpKernel_lt_top : eLpNorm (lpKernel (V := V)) 1 volume < ⊤ := + eLpNorm_lpKernel_ne_top.lt_top + +/-- **The kernel `Φ` has `L_1` norm at least `1`**: `‖Φ‖_1 ≥ |∫ Φ| = 1` +(`Rd.integral_lpKernel` and Mathlib's `eNorm_integral_le_lintegral_eNorm`). -/ +theorem one_le_eLpNorm_lpKernel : 1 ≤ eLpNorm (lpKernel (V := V)) 1 volume := + calc (1 : ℝ≥0∞) = ‖∫ x, lpKernel (V := V) x‖ₑ := by rw [integral_lpKernel, eNorm_one] + _ ≤ ∫⁻ x, ‖lpKernel (V := V) x‖ₑ := eNorm_integral_le_lintegral_eNorm _ + _ = eLpNorm (lpKernel (V := V)) 1 volume := + (eLpNorm_one_eq_lintegral_eNorm integrable_lpKernel.aestronglyMeasurable).symm + +/-- `∫ |Θ_k| = ‖Θ‖_1` for every dilation, as a lower Lebesgue integral. -/ +theorem lintegral_enorm_Theta (k : ℕ) : + ∫⁻ y, ‖Theta (V := V) k y‖ₑ = eLpNorm (bandKernel (V := V)) 1 volume := by + rw [← eLpNorm_one_eq_lintegral_eNorm (integrable_Theta k).aestronglyMeasurable, + eLpNorm_Theta_one] + +/-- `‖ψ_j‖_1 ≤ 2 ‖Φ‖_1`. -/ +theorem eLpNorm_psi_one_le (j : ℕ) : + eLpNorm (psi (V := V) j) 1 volume ≤ 2 * eLpNorm (lpKernel (V := V)) 1 volume := by + cases j with + | zero => + rw [two_mul] + exact (eLpNorm_Phi_one 0).le.trans le_self_add + | succ j => + change eLpNorm (Phi (j + 1) - Phi j) 1 volume ≤ _ + calc eLpNorm (Phi (V := V) (j + 1) - Phi j) 1 volume + ≤ eLpNorm (Phi (V := V) (j + 1)) 1 volume + eLpNorm (Phi (V := V) j) 1 volume := + eLpNorm_sub_le le_rfl + _ = 2 * eLpNorm (lpKernel (V := V)) 1 volume := by + rw [eLpNorm_Phi_one, eLpNorm_Phi_one, two_mul] + +/-- `∫ Φ_k = 1`. -/ +theorem integral_Phi (k : ℕ) : ∫ x, Phi (V := V) k x = 1 := by + rw [Phi, integral_dilate _ (by positivity), integral_lpKernel] + +/-! ### The kernels on the frequency side -/ + +omit [FiniteDimensional ℝ V] [MeasurableSpace V] [BorelSpace V] in +/-- `‖2^(-k) ξ‖ = ‖ξ‖ / 2^k`. -/ +theorem norm_two_pow_inv_smul (k : ℕ) (ξ : V) : ‖((2 : ℝ) ^ k)⁻¹ • ξ‖ = ‖ξ‖ / 2 ^ k := by + rw [norm_smul, norm_inv, Real.norm_of_nonneg (by positivity), inv_mul_eq_div] + +/-- `𝓕Φ_k(ξ) = χ_{1,2}(2^(-k) ξ)`. -/ +theorem fourier_Phi (k : ℕ) (ξ : V) : + 𝓕 (Phi (V := V) k) ξ = cutoff 1 2 one_pos one_lt_two (((2 : ℝ) ^ k)⁻¹ • ξ) := by + rw [Phi, fourier_dilate _ (by positivity), fourier_lpKernel] + +/-- `𝓕Θ_k(ξ) = χ_{2,4}(2^(-k) ξ)`. -/ +theorem fourier_Theta (k : ℕ) (ξ : V) : + 𝓕 (Theta (V := V) k) ξ = cutoff 2 4 two_pos (by norm_num) (((2 : ℝ) ^ k)⁻¹ • ξ) := by + rw [Theta, fourier_dilate _ (by positivity), fourier_bandKernel] + +/-- `𝓕ψ_{j+1} = 𝓕Φ_{j+1} - 𝓕Φ_j`. -/ +theorem fourier_psi_succ (j : ℕ) (ξ : V) : + 𝓕 (psi (V := V) (j + 1)) ξ = 𝓕 (Phi (V := V) (j + 1)) ξ - 𝓕 (Phi (V := V) j) ξ := + fourier_sub_apply (integrable_Phi _) (integrable_Phi _) ξ + +/-- The Fourier transforms of the dilated kernels are integrable. -/ +theorem integrable_fourier_Phi (k : ℕ) : Integrable (𝓕 (Phi (V := V) k)) := + integrable_fourier_dilate integrable_fourier_lpKernel (by positivity) + +/-- The Fourier transforms of the dilated kernels are integrable. -/ +theorem integrable_fourier_Theta (k : ℕ) : Integrable (𝓕 (Theta (V := V) k)) := + integrable_fourier_dilate integrable_fourier_bandKernel (by positivity) + +/-- The Fourier transforms of the blocks are integrable. -/ +theorem integrable_fourier_psi (j : ℕ) : Integrable (𝓕 (psi (V := V) j)) := by + cases j with + | zero => exact integrable_fourier_Phi 0 + | succ j => + rw [show 𝓕 (psi (V := V) (j + 1)) = 𝓕 (Phi (V := V) (j + 1)) - 𝓕 (Phi (V := V) j) from + funext (fourier_psi_succ j)] + exact (integrable_fourier_Phi _).sub (integrable_fourier_Phi _) + +/-- `𝓕Φ_k` vanishes outside the ball of radius `2^(k+1)`. -/ +theorem norm_lt_of_fourier_Phi_ne_zero {k : ℕ} {ξ : V} (h : 𝓕 (Phi (V := V) k) ξ ≠ 0) : + ‖ξ‖ < 2 ^ (k + 1) := by + rw [fourier_Phi] at h + have h1 := norm_lt_of_cutoff_ne_zero _ _ h + rw [norm_two_pow_inv_smul, div_lt_iff₀ (by positivity)] at h1 + rw [pow_succ] + linarith + +/-- `𝓕Θ_k` vanishes outside the ball of radius `2^(k+2)`. -/ +theorem norm_lt_of_fourier_Theta_ne_zero {k : ℕ} {ξ : V} (h : 𝓕 (Theta (V := V) k) ξ ≠ 0) : + ‖ξ‖ < 2 ^ (k + 2) := by + rw [fourier_Theta] at h + have h1 := norm_lt_of_cutoff_ne_zero _ _ h + rw [norm_two_pow_inv_smul, div_lt_iff₀ (by positivity)] at h1 + rw [pow_succ, pow_succ] + linarith + +/-- `𝓕Θ_k = 1` on the closed ball of radius `2^(k+1)`. -/ +theorem fourier_Theta_eq_one {k : ℕ} {ξ : V} (h : ‖ξ‖ ≤ 2 ^ (k + 1)) : + 𝓕 (Theta (V := V) k) ξ = 1 := by + rw [fourier_Theta] + refine cutoff_eq_one _ _ ?_ + rw [norm_two_pow_inv_smul, div_le_iff₀ (by positivity)] + rw [pow_succ] at h + linarith + +/-- `𝓕ψ_j` vanishes outside the ball of radius `2^(j+1)`. -/ +theorem norm_lt_of_fourier_psi_ne_zero {j : ℕ} {ξ : V} (h : 𝓕 (psi (V := V) j) ξ ≠ 0) : + ‖ξ‖ < 2 ^ (j + 1) := by + cases j with + | zero => exact norm_lt_of_fourier_Phi_ne_zero h + | succ j => + rw [fourier_psi_succ] at h + by_cases h1 : 𝓕 (Phi (V := V) (j + 1)) ξ = 0 + · rw [h1, zero_sub, neg_ne_zero] at h + have h2 := norm_lt_of_fourier_Phi_ne_zero h + rw [pow_succ (2 : ℝ) (j + 1)] + linarith [pow_pos (two_pos : (0 : ℝ) < 2) (j + 1)] + · exact norm_lt_of_fourier_Phi_ne_zero h1 + +/-- `𝓕ψ_{i+1}` vanishes on the closed ball of radius `2^i`. -/ +theorem fourier_psi_succ_eq_zero {i : ℕ} {ξ : V} (h : ‖ξ‖ ≤ 2 ^ i) : + 𝓕 (psi (V := V) (i + 1)) ξ = 0 := by + rw [fourier_psi_succ, fourier_Phi, fourier_Phi, cutoff_eq_one, cutoff_eq_one, sub_self] + all_goals + rw [norm_two_pow_inv_smul, div_le_iff₀ (by positivity), one_mul] + first + | exact h + | exact h.trans (pow_le_pow_right₀ one_le_two (Nat.le_succ i)) + +/-- Where `𝓕ψ_{i+1}(ξ) ≠ 0`, `‖ξ‖ > 2^i`: the contrapositive of `Rd.fourier_psi_succ_eq_zero`. -/ +theorem lt_norm_of_fourier_psi_succ_ne_zero {i : ℕ} {ξ : V} + (h : 𝓕 (psi (V := V) (i + 1)) ξ ≠ 0) : 2 ^ i < ‖ξ‖ := + not_le.1 fun h' => h (fourier_psi_succ_eq_zero h') + +/-- `𝓕Θ_{k+1} · 𝓕Θ_k = 𝓕Θ_k`. -/ +theorem fourier_Theta_succ_mul (k : ℕ) (ξ : V) : + 𝓕 (Theta (V := V) (k + 1)) ξ * 𝓕 (Theta (V := V) k) ξ = 𝓕 (Theta (V := V) k) ξ := by + by_cases h : 𝓕 (Theta (V := V) k) ξ = 0 + · rw [h, mul_zero] + · rw [fourier_Theta_eq_one (k := k + 1) (norm_lt_of_fourier_Theta_ne_zero h).le, one_mul] + +/-- `𝓕Θ_j · 𝓕ψ_j = 𝓕ψ_j`. -/ +theorem fourier_Theta_mul_psi (j : ℕ) (ξ : V) : + 𝓕 (Theta (V := V) j) ξ * 𝓕 (psi (V := V) j) ξ = 𝓕 (psi (V := V) j) ξ := by + by_cases h : 𝓕 (psi (V := V) j) ξ = 0 + · rw [h, mul_zero] + · rw [fourier_Theta_eq_one (norm_lt_of_fourier_psi_ne_zero h).le, one_mul] + +/-- `𝓕ψ_j · 𝓕Θ_k = 0` for `j ≥ k + 3`. -/ +theorem fourier_psi_mul_Theta {j k : ℕ} (hjk : k + 3 ≤ j) (ξ : V) : + 𝓕 (psi (V := V) j) ξ * 𝓕 (Theta (V := V) k) ξ = 0 := by + by_cases h : 𝓕 (Theta (V := V) k) ξ = 0 + · rw [h, mul_zero] + · obtain ⟨i, rfl⟩ : ∃ i, j = i + 1 := ⟨j - 1, by omega⟩ + rw [fourier_psi_succ_eq_zero, zero_mul] + exact (norm_lt_of_fourier_Theta_ne_zero h).le.trans + (pow_le_pow_right₀ one_le_two (by omega)) + +/-- **The Fourier transforms of the blocks are bounded by `1`**: `|𝓕ψ_j(ξ)| ≤ 1`, since +`𝓕ψ_0 = χ(ξ)` and `𝓕ψ_{j+1} = χ(2^(-j-1) ξ) - χ(2^(-j) ξ)` with a cut-off `χ` with values in +`[0, 1]`. -/ +theorem norm_fourier_psi_le_one (j : ℕ) (ξ : V) : ‖𝓕 (psi (V := V) j) ξ‖ ≤ 1 := by + set b : ContDiffBump (0 : V) := ⟨1, 2, one_pos, one_lt_two⟩ + have h : ∀ x : V, cutoff 1 2 one_pos one_lt_two x = ((b x : ℝ) : ℂ) := fun x => rfl + cases j with + | zero => + rw [show psi (V := V) 0 = Phi 0 from rfl, fourier_Phi, h, Complex.norm_real, + Real.norm_of_nonneg b.nonneg] + exact b.le_one + | succ j => + rw [fourier_psi_succ, fourier_Phi, fourier_Phi, h, h, ← Complex.ofReal_sub, + Complex.norm_real, Real.norm_eq_abs, abs_sub_le_iff] + constructor <;> linarith [b.nonneg' (((2 : ℝ) ^ (j + 1))⁻¹ • ξ), + b.nonneg' (((2 : ℝ) ^ j)⁻¹ • ξ), b.le_one (x := ((2 : ℝ) ^ (j + 1))⁻¹ • ξ), + b.le_one (x := ((2 : ℝ) ^ j)⁻¹ • ξ)] + +/-- `|𝓕ψ_j(ξ)| ≤ 1` in `ℝ≥0∞`. -/ +theorem enorm_fourier_psi_le_one (j : ℕ) (ξ : V) : ‖𝓕 (psi (V := V) j) ξ‖ₑ ≤ 1 := by + rw [← ofReal_norm, ← ENNReal.ofReal_one] + exact ENNReal.ofReal_le_ofReal (norm_fourier_psi_le_one j ξ) + +/-- **The Fourier transforms of the blocks telescope**: +`∑_{j ≤ J} 𝓕ψ_j(ξ) = 𝓕Φ_J(ξ)`. -/ +theorem sum_range_fourier_psi (J : ℕ) (ξ : V) : + ∑ j ∈ Finset.range (J + 1), 𝓕 (psi (V := V) j) ξ = 𝓕 (Phi (V := V) J) ξ := by + induction J with + | zero => simp [psi] + | succ J ih => rw [Finset.sum_range_succ, ih, fourier_psi_succ]; ring + +/-- **At most two blocks see a frequency**: for every `ξ ∈ V` there is `a ∈ ℕ` with +`‖ξ‖ < 2^(a+1)` such that `𝓕ψ_j(ξ) = 0` for `j ∉ {a, a+1}` and +`𝓕ψ_a(ξ) + 𝓕ψ_{a+1}(ξ) = 1`. Here `a` is the least index with `‖ξ‖ < 2^(a+1)`: the blocks below +`a` vanish at `ξ` since `𝓕ψ_j` lives on `‖ξ‖ < 2^(j+1)`, those above `a + 1` since `𝓕ψ_{i+1}` +vanishes on `‖ξ‖ ≤ 2^i`, and the sum of all blocks up to `a + 1` is `𝓕Φ_{a+1}(ξ) = 1`. -/ +theorem exists_fourier_psi_window (ξ : V) : ∃ a : ℕ, ‖ξ‖ < 2 ^ (a + 1) ∧ + (∀ j, 𝓕 (psi (V := V) j) ξ ≠ 0 → j = a ∨ j = a + 1) ∧ + 𝓕 (psi (V := V) a) ξ + 𝓕 (psi (V := V) (a + 1)) ξ = 1 := by + classical + have hex : ∃ a : ℕ, ‖ξ‖ < 2 ^ (a + 1) := by + obtain ⟨n, hn⟩ := pow_unbounded_of_one_lt ‖ξ‖ (one_lt_two : (1 : ℝ) < 2) + exact ⟨n, hn.trans (pow_lt_pow_right₀ one_lt_two n.lt_succ_self)⟩ + obtain ⟨a, ha, hmin⟩ : ∃ a : ℕ, ‖ξ‖ < 2 ^ (a + 1) ∧ ∀ j < a, ¬ ‖ξ‖ < 2 ^ (j + 1) := + ⟨Nat.find hex, Nat.find_spec hex, fun j hj => Nat.find_min hex hj⟩ + have hlow : ∀ j < a, 𝓕 (psi (V := V) j) ξ = 0 := fun j hj => by + by_contra h + exact hmin j hj (norm_lt_of_fourier_psi_ne_zero h) + have hhigh : ∀ j, a + 1 < j → 𝓕 (psi (V := V) j) ξ = 0 := by + intro j hj + obtain ⟨i, rfl⟩ : ∃ i, j = i + 1 := ⟨j - 1, by omega⟩ + exact fourier_psi_succ_eq_zero (ha.le.trans (pow_le_pow_right₀ one_le_two (by omega))) + refine ⟨a, ha, fun j hj => ?_, ?_⟩ + · by_contra hne + push Not at hne + rcases lt_or_gt_of_ne hne.1 with h | h + · exact hj (hlow j h) + · exact hj (hhigh j (by omega)) + · have hsum := sum_range_fourier_psi (V := V) (a + 1) ξ + rw [fourier_Phi, cutoff_eq_one _ _ (by + rw [norm_two_pow_inv_smul, div_le_one (by positivity)]; exact ha.le)] at hsum + rw [Finset.sum_range_succ, Finset.sum_range_succ, Finset.sum_eq_zero + (fun j hj => hlow j (Finset.mem_range.1 hj)), zero_add] at hsum + exact hsum + +/-- Where the block `ψ_j` sees the frequency `ξ`, its scale is at most that of `ξ`: if +`𝓕ψ_j(ξ) ≠ 0`, then `4^j ≤ 4(1 + ‖ξ‖²)` (for `j ≥ 1`, `‖ξ‖ > 2^(j-1)`). -/ +theorem four_pow_le_of_fourier_psi_ne_zero {j : ℕ} {ξ : V} (h : 𝓕 (psi (V := V) j) ξ ≠ 0) : + (4 : ℝ) ^ j ≤ 4 * (1 + ‖ξ‖ ^ 2) := by + cases j with + | zero => nlinarith [sq_nonneg ‖ξ‖] + | succ i => + have hi : (2 : ℝ) ^ i < ‖ξ‖ := not_le.1 fun h' => h (fourier_psi_succ_eq_zero h') + have h4 : (4 : ℝ) ^ (i + 1) = 4 * ((2 : ℝ) ^ i) ^ 2 := by + rw [← pow_mul, pow_succ, mul_comm i 2, pow_mul] + norm_num + ring + rw [h4] + nlinarith [pow_pos (two_pos : (0 : ℝ) < 2) i] + +/-! ### Kernel identities -/ + +/-- **Kernel identities from Fourier transforms**: if `K`, `L`, `M` are integrable, `L` is bounded +and continuous, `M` is continuous with integrable Fourier transform, and `𝓕K · 𝓕L = 𝓕M`, then +`K ⋆ L = M`. Both sides have the same transform (`Rd.fourier_conv`), and the inversion theorem +applies to continuous integrable functions with integrable transform +(`Continuous.fourierInv_fourier_eq`). -/ +theorem conv_eq_of_fourier {K L M : V → ℂ} (hK : Integrable K) (hL : Integrable L) + (hLc : Continuous L) (hLb : BddAbove (Set.range fun x => ‖L x‖)) (hM : Integrable M) + (hMc : Continuous M) (hFM : Integrable (𝓕 M)) (h : ∀ ξ, 𝓕 K ξ * 𝓕 L ξ = 𝓕 M ξ) : + conv K L volume = M := by + have hKL : Integrable (conv K L volume) := + hK.integrable_convolution (ContinuousLinearMap.mul ℂ ℂ) hL + have hc : Continuous (conv K L volume) := + hLb.continuous_convolution_right_of_integrable (ContinuousLinearMap.mul ℂ ℂ) hK hLc + have hF : 𝓕 (conv K L volume) = 𝓕 M := funext fun ξ => (fourier_conv hK hL ξ).trans (h ξ) + have hFKL : Integrable (𝓕 (conv K L volume)) := by + rw [hF] + exact hFM + rw [← hc.fourierInv_fourier_eq hKL hFKL, hF, hMc.fourierInv_fourier_eq hM hFM] + +/-- **The band-limited classes increase**: `Θ_{k+1} ⋆ Θ_k = Θ_k`. -/ +theorem conv_Theta_succ (k : ℕ) : + conv (Theta (V := V) (k + 1)) (Theta k) volume = Theta k := + conv_eq_of_fourier (integrable_Theta _) (integrable_Theta _) (continuous_Theta _) + (bddAbove_Theta _) (integrable_Theta _) (continuous_Theta _) (integrable_fourier_Theta _) + (fourier_Theta_succ_mul k) + +/-- **The blocks are band-limited**: `Θ_j ⋆ ψ_j = ψ_j`. -/ +theorem conv_Theta_psi (j : ℕ) : conv (Theta (V := V) j) (psi j) volume = psi j := + conv_eq_of_fourier (integrable_Theta _) (integrable_psi _) (continuous_psi _) + (bddAbove_psi _) (integrable_psi _) (continuous_psi _) (integrable_fourier_psi _) + (fourier_Theta_mul_psi j) + +/-- **High blocks annihilate band-limited kernels**: `ψ_j ⋆ Θ_k = 0` for `j ≥ k + 3`. -/ +theorem conv_psi_Theta {j k : ℕ} (hjk : k + 3 ≤ j) : + conv (psi (V := V) j) (Theta k) volume = 0 := by + have h0 : 𝓕 (0 : V → ℂ) = 0 := funext fun ξ => by simp [Real.fourier_eq] + refine conv_eq_of_fourier (integrable_psi _) (integrable_Theta _) (continuous_Theta _) + (bddAbove_Theta _) (integrable_zero _ _ _) continuous_zero ?_ fun ξ => ?_ + · rw [h0] + exact integrable_zero _ _ _ + · rw [h0, fourier_psi_mul_Theta hjk] + rfl + +end Rd diff --git a/LeanPool/FunctionSpaces/Analysis/Fourier/SchwartzCutoff.lean b/LeanPool/FunctionSpaces/Analysis/Fourier/SchwartzCutoff.lean new file mode 100644 index 0000000000..0b33c797f7 --- /dev/null +++ b/LeanPool/FunctionSpaces/Analysis/Fourier/SchwartzCutoff.lean @@ -0,0 +1,430 @@ +/- +Copyright (c) 2026 Mario Ullrich. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Mario Ullrich +-/ +module + +public import LeanPool.FunctionSpaces.Analysis.Fourier.LittlewoodPaleyKernels +public import Mathlib.Analysis.Calculus.FDeriv.Symmetric +public import Mathlib.Analysis.Distribution.Distribution +public import Mathlib.Analysis.Distribution.TemperedDistribution + +/- +Modified for Lean Pool: module names and imports adapted. +-/ + +/-! +# Test functions in the Schwartz space + +Let `V` be a real normed space; in the section on cut-offs, `V` is a finite-dimensional real inner +product space, such as `ℝ^d`. A real test function `φ ∈ 𝓓(Ω, ℝ)` on an open set `Ω ⊆ V` is a +complex Schwartz function on `V` (`Rd.testSchwartz`), with the same iterated directional +derivatives `∂^v = ∂_{v_0} ⋯ ∂_{v_{k-1}}` (`Rd.iteratedLineDerivOp_testSchwartz`) and the same +derivative (`Rd.fderiv_testSchwartz_apply`); conversely a compactly supported complex Schwartz +function with support in `Ω` is `a + i b` for real test functions `a`, `b` on `Ω` +(`Rd.exists_testSchwartz_eq_of_tsupport_subset`). + +* **Directional derivatives commute** on Schwartz functions (`SchwartzMap.lineDerivOp_comm`, by + Mathlib's symmetry of second derivatives) and on test functions + (`TestFunction.lineDerivOp_comm`). +* **The transpose formula** `∂^v T(φ) = (-1)^k T(∂^v φ)` holds for distributions on `Ω` + (`Distribution.iteratedLineDerivOp_apply_apply`) and for tempered distributions + (`TemperedDistribution.iteratedLineDerivOp_apply_apply`); Mathlib differentiates them by + `∂_w T(φ) = T(-∂_w φ)`. +* **Cut-offs converge in the Schwartz space**: `χ(x/(n+1)) u(x) → u` in `𝓢(V, ℂ)` for the smooth + cut-off `χ = Rd.cutoff 1 2`, with every seminorm of the difference at most `C/(n+1)` for an + explicit `C` (`Rd.seminorm_sub_cutoffMul_le`, `Rd.tendsto_cutoffMul`). Hence a tempered + distribution that vanishes on all test functions is zero (`Rd.eq_zero_of_testSchwartz`). +-/ + +@[expose] public section + +open MeasureTheory Filter Topology TopologicalSpace +open scoped SchwartzMap LineDeriv Distributions + +/-! ### Commuting directional derivatives -/ + +namespace LineDeriv + +variable {V E : Type*} [LineDeriv V E E] + +/-- If directional derivatives commute pairwise, `∂_a ∂_b x = ∂_b ∂_a x`, then a directional +derivative commutes with every iterated one: `∂_a ∂^v x = ∂^v ∂_a x`. -/ +theorem lineDerivOp_iteratedLineDerivOp_comm_of + (h : ∀ (a b : V) (x : E), ∂_{a} (∂_{b} x) = ∂_{b} (∂_{a} x)) {k : ℕ} (a : V) + (v : Fin k → V) (x : E) : ∂_{a} (∂^{v} x) = ∂^{v} (∂_{a} x) := by + induction k generalizing x with + | zero => rfl + | succ k ih => + rw [iteratedLineDerivOp_succ_left, iteratedLineDerivOp_succ_left, h, ih] + +end LineDeriv + +namespace SchwartzMap + +variable {E F : Type*} [NormedAddCommGroup E] [NormedSpace ℝ E] [NormedAddCommGroup F] + [NormedSpace ℝ F] + +/-- Directional derivatives of a Schwartz function commute: `∂_a ∂_b u = ∂_b ∂_a u`. This is the +symmetry of the second derivative of a `C^2` function (Mathlib's +`ContDiffAt.isSymmSndFDerivAt`), read through `∂^{(a, b)} u(x) = D^2 u(x)(a, b)` +(`SchwartzMap.iteratedLineDerivOp_eq_iteratedFDeriv`). -/ +theorem lineDerivOp_comm (u : 𝓢(E, F)) (a b : E) : ∂_{a} (∂_{b} u) = ∂_{b} (∂_{a} u) := by + ext x + have h1 : ∂_{a} (∂_{b} u) x = ∂^{![a, b]} u x := rfl + have h2 : ∂_{b} (∂_{a} u) x = ∂^{![b, a]} u x := rfl + rw [h1, h2, iteratedLineDerivOp_eq_iteratedFDeriv, iteratedLineDerivOp_eq_iteratedFDeriv] + exact IsSymmSndFDerivAt.iteratedFDeriv_cons + (hf := ((u.smooth ⊤).contDiffAt).isSymmSndFDerivAt (by simp)) + +/-- A directional derivative commutes with every iterated directional derivative of a Schwartz +function: `∂_a ∂^v u = ∂^v ∂_a u`. -/ +theorem lineDerivOp_iteratedLineDerivOp_comm {k : ℕ} (u : 𝓢(E, F)) (a : E) (v : Fin k → E) : + ∂_{a} (∂^{v} u) = ∂^{v} (∂_{a} u) := + LineDeriv.lineDerivOp_iteratedLineDerivOp_comm_of (fun a b x => lineDerivOp_comm x a b) a v u + +end SchwartzMap + +/-! ### Test functions as Schwartz functions -/ + +namespace Rd + +variable {V : Type*} [NormedAddCommGroup V] [NormedSpace ℝ V] + +/-- A real test function `φ` on an open set `Ω` as a complex Schwartz function on `V`, +`x ↦ (φ x : ℂ)`: it is smooth with compact support (Mathlib's +`HasCompactSupport.toSchwartzMap`). -/ +noncomputable def testSchwartz {Ω : Opens V} (φ : 𝓓(Ω, ℝ)) : 𝓢(V, ℂ) := + HasCompactSupport.toSchwartzMap (f := fun x => ((φ x : ℝ) : ℂ)) + (φ.hasCompactSupport.comp_left Complex.ofReal_zero) + (Complex.ofRealCLM.contDiff.comp φ.contDiff) + +/-- The values of `Rd.testSchwartz φ` are those of `φ`. -/ +@[simp] +theorem testSchwartz_apply {Ω : Opens V} (φ : 𝓓(Ω, ℝ)) (x : V) : + testSchwartz φ x = ((φ x : ℝ) : ℂ) := + rfl + +/-- The directional derivative of a test function is the derivative of the function: +`∂_a φ(x) = Dφ(x) a`. -/ +theorem lineDerivOp_testFunction_apply {Ω : Opens V} (φ : 𝓓(Ω, ℝ)) (a x : V) : + (∂_{a} φ) x = fderiv ℝ φ x a := by + rw [TestFunction.lineDerivOp_eq_lineDerivCLM ℝ, TestFunction.lineDerivCLM_eq_fderivCLM, + TestFunction.fderivCLM_apply_of_le _ le_top] + +/-- Passing to complex values commutes with directional derivatives: +`∂_a (φ : ℂ) = (∂_a φ : ℂ)`. -/ +theorem lineDerivOp_testSchwartz {Ω : Opens V} (φ : 𝓓(Ω, ℝ)) (a : V) : + ∂_{a} (testSchwartz φ) = testSchwartz (∂_{a} φ) := by + ext x + have hd : HasFDerivAt (fun y => ((φ y : ℝ) : ℂ)) (Complex.ofRealCLM.comp (fderiv ℝ φ x)) x := + Complex.ofRealCLM.hasFDerivAt.comp x + ((φ.contDiff.differentiable (by simp)).differentiableAt.hasFDerivAt) + rw [SchwartzMap.lineDerivOp_apply_eq_fderiv, testSchwartz_apply, + lineDerivOp_testFunction_apply] + exact congrArg (fun L : V →L[ℝ] ℂ => L a) hd.fderiv + +/-- The derivative of a real test function as a complex function: +`D(φ : ℂ)(x) w = (∂_w φ)(x)`. -/ +theorem fderiv_testSchwartz_apply {Ω : Opens V} (φ : 𝓓(Ω, ℝ)) (x w : V) : + fderiv ℝ (testSchwartz φ) x w = (((∂_{w} φ) x : ℝ) : ℂ) := by + rw [← SchwartzMap.lineDerivOp_apply_eq_fderiv, lineDerivOp_testSchwartz, testSchwartz_apply] + +/-- Passing to complex values commutes with iterated directional derivatives: +`∂^v (φ : ℂ) = (∂^v φ : ℂ)`. -/ +theorem iteratedLineDerivOp_testSchwartz {Ω : Opens V} {k : ℕ} (φ : 𝓓(Ω, ℝ)) (v : Fin k → V) : + ∂^{v} (testSchwartz φ) = testSchwartz (∂^{v} φ) := by + induction k generalizing φ with + | zero => rfl + | succ k ih => + rw [LineDeriv.iteratedLineDerivOp_succ_left, LineDeriv.iteratedLineDerivOp_succ_left, ih, + lineDerivOp_testSchwartz] + +/-- Two test functions (possibly on different open sets) with the same values have iterated +directional derivatives with the same values. -/ +theorem coe_iteratedLineDerivOp_eq {Ω Ω' : Opens V} {k : ℕ} {φ : 𝓓(Ω, ℝ)} {ψ : 𝓓(Ω', ℝ)} + (h : (φ : V → ℝ) = ψ) (v : Fin k → V) : ((∂^{v} φ : 𝓓(Ω, ℝ)) : V → ℝ) = ∂^{v} ψ := by + have hs : testSchwartz φ = testSchwartz ψ := by + ext x + simp [h] + have h' := congrArg (fun u : 𝓢(V, ℂ) => (u : V → ℂ)) (congrArg (∂^{v} ·) hs) + simp only [iteratedLineDerivOp_testSchwartz] at h' + funext x + have hx := congrFun h' x + simp only [testSchwartz_apply, Complex.ofReal_inj] at hx + exact hx + +/-- A smooth compactly supported complex function `w` (given as a Schwartz function) whose support +lies in the open set `Ω` is `Re w + i Im w` with real test functions `Re w`, `Im w` on `Ω`. -/ +theorem exists_testSchwartz_eq_of_tsupport_subset {Ω : Opens V} (w : 𝓢(V, ℂ)) + (hw : HasCompactSupport w) (hwΩ : tsupport w ⊆ Ω) : + ∃ a b : 𝓓(Ω, ℝ), w = testSchwartz a + Complex.I • testSchwartz b := by + refine ⟨⟨fun x => (w x).re, Complex.reCLM.contDiff.comp (w.smooth ⊤), + hw.comp_left Complex.zero_re, (tsupport_comp_subset Complex.zero_re _).trans hwΩ⟩, + ⟨fun x => (w x).im, Complex.imCLM.contDiff.comp (w.smooth ⊤), hw.comp_left Complex.zero_im, + (tsupport_comp_subset Complex.zero_im _).trans hwΩ⟩, ?_⟩ + ext x + apply Complex.ext <;> simp <;> rfl + +/-- A smooth compactly supported complex function `w` (given as a Schwartz function) is +`Re w + i Im w` with real test functions `Re w`, `Im w` on `V`. -/ +theorem exists_testSchwartz_eq (w : 𝓢(V, ℂ)) (hw : HasCompactSupport w) : + ∃ a b : 𝓓((⊤ : Opens V), ℝ), w = testSchwartz a + Complex.I • testSchwartz b := + exists_testSchwartz_eq_of_tsupport_subset w hw (by simp) + +end Rd + +namespace TestFunction + +variable {V : Type*} [NormedAddCommGroup V] [NormedSpace ℝ V] {Ω : Opens V} + +/-- Directional derivatives of a test function commute: `∂_a ∂_b φ = ∂_b ∂_a φ`, read off the +complex Schwartz function `Rd.testSchwartz φ` (`SchwartzMap.lineDerivOp_comm`). -/ +theorem lineDerivOp_comm (φ : 𝓓(Ω, ℝ)) (a b : V) : ∂_{a} (∂_{b} φ) = ∂_{b} (∂_{a} φ) := by + have h := SchwartzMap.lineDerivOp_comm (Rd.testSchwartz φ) a b + simp only [Rd.lineDerivOp_testSchwartz] at h + ext x + have hx := congrArg (fun u : 𝓢(V, ℂ) => u x) h + simp only [Rd.testSchwartz_apply, Complex.ofReal_inj] at hx + exact hx + +/-- A directional derivative commutes with every iterated directional derivative of a test +function: `∂_a ∂^v φ = ∂^v ∂_a φ`. -/ +theorem lineDerivOp_iteratedLineDerivOp_comm {k : ℕ} (φ : 𝓓(Ω, ℝ)) (a : V) (v : Fin k → V) : + ∂_{a} (∂^{v} φ) = ∂^{v} (∂_{a} φ) := + LineDeriv.lineDerivOp_iteratedLineDerivOp_comm_of (fun a b x => lineDerivOp_comm x a b) a v φ + +end TestFunction + +/-! ### Iterated derivatives of distributions -/ + +namespace Distribution + +variable {V : Type*} [NormedAddCommGroup V] [NormedSpace ℝ V] {Ω : Opens V} + {F : Type*} [AddCommGroup F] [Module ℝ F] [TopologicalSpace F] [IsTopologicalAddGroup F] + [ContinuousSMul ℝ F] + +/-- The **transpose formula** for iterated derivatives of a distribution on `Ω`: for directions +`v = (v_0, …, v_{k-1})`, `∂^v T (φ) = (-1)^k T(∂^v φ)` for every test function `φ`. Mathlib +defines `∂_w T (φ) = T(-∂_w φ)` (`Distribution.lineDerivOp_apply_apply`); the order of the +derivatives on `φ` is irrelevant because they commute +(`TestFunction.lineDerivOp_iteratedLineDerivOp_comm`). -/ +theorem iteratedLineDerivOp_apply_apply {k : ℕ} (T : 𝓓'(Ω, F)) (φ : 𝓓(Ω, ℝ)) (v : Fin k → V) : + ∂^{v} T φ = ((-1 : ℝ) ^ k) • T (∂^{v} φ) := by + induction k generalizing T φ with + | zero => simp + | succ k ih => + rw [LineDeriv.iteratedLineDerivOp_succ_left v T, lineDerivOp_apply_apply, ih, + LineDeriv.iteratedLineDerivOp_succ_left v φ, LineDeriv.iteratedLineDerivOp_neg, + ← TestFunction.lineDerivOp_iteratedLineDerivOp_comm, map_neg, smul_neg, pow_succ, + mul_neg_one, neg_smul] + +end Distribution + +/-! ### Iterated derivatives of tempered distributions -/ + +namespace TemperedDistribution + +variable {E F : Type*} [NormedAddCommGroup E] [NormedSpace ℝ E] [NormedAddCommGroup F] + [NormedSpace ℂ F] + +/-- The **transpose formula** for iterated derivatives of a tempered distribution: for directions +`v = (v_0, …, v_{k-1})`, `∂^v T (u) = T((-1)^k ∂^v u)` for every Schwartz function `u`. Mathlib +defines `∂_w T (u) = T(-∂_w u)` (`TemperedDistribution.lineDerivOp_apply_apply`); the order of +the derivatives on `u` is irrelevant because they commute +(`SchwartzMap.lineDerivOp_iteratedLineDerivOp_comm`). -/ +theorem iteratedLineDerivOp_apply_apply {k : ℕ} (T : 𝓢'(E, F)) (u : 𝓢(E, ℂ)) (v : Fin k → E) : + ∂^{v} T u = T (((-1 : ℂ) ^ k) • ∂^{v} u) := by + induction k generalizing T u with + | zero => simp + | succ k ih => + rw [LineDeriv.iteratedLineDerivOp_succ_left v T, lineDerivOp_apply_apply, ih, + LineDeriv.iteratedLineDerivOp_succ_left v u, LineDeriv.iteratedLineDerivOp_neg, + ← SchwartzMap.lineDerivOp_iteratedLineDerivOp_comm, pow_succ, mul_neg_one, smul_neg, + neg_smul] + +variable [MeasurableSpace E] [BorelSpace E] [SecondCountableTopology E] [FiniteDimensional ℝ E] + {μ : Measure E} [μ.IsAddHaarMeasure] + +/-- The distributional derivative `∂^v S_u` of the tempered distribution `S_u` of a Schwartz +function `u` is the tempered distribution `S_{∂^v u}` of its classical derivative `∂^v u` (the +iterated form of Mathlib's `TemperedDistribution.lineDerivOp_toTemperedDistributionCLM_eq`). -/ +theorem iteratedLineDerivOp_toTemperedDistributionCLM_eq {k : ℕ} (u : 𝓢(E, F)) (v : Fin k → E) : + ∂^{v} (SchwartzMap.toTemperedDistributionCLM E F μ u) = + SchwartzMap.toTemperedDistributionCLM E F μ (∂^{v} u) := by + induction k generalizing u with + | zero => rfl + | succ k ih => + rw [LineDeriv.iteratedLineDerivOp_succ_left, LineDeriv.iteratedLineDerivOp_succ_left, ih, + lineDerivOp_toTemperedDistributionCLM_eq] + +end TemperedDistribution + +namespace Rd + +variable {V : Type*} [NormedAddCommGroup V] [InnerProductSpace ℝ V] [FiniteDimensional ℝ V] + +/-! ### Cutting Schwartz functions off -/ + +/-- The product of the rescaled cut-off `x ↦ χ(x/(n+1))`, `χ = Rd.cutoff 1 2`, with any function +has compact support. This function-level form enters the definition of `Rd.cutoffMul`. -/ +theorem hasCompactSupport_cutoff_smul_mul (n : ℕ) (u : V → ℂ) : + HasCompactSupport fun x => cutoff 1 2 one_pos one_lt_two (((n : ℝ) + 1)⁻¹ • x) * u x := by + have h := ((hasCompactSupport_cutoff (V := V) one_pos one_lt_two).comp_smul + (by positivity : ((n : ℝ) + 1)⁻¹ ≠ 0)).mul_right (f' := u) + exact h + +/-- The **cut-off** of a Schwartz function `u` at radius `n + 1`: `x ↦ χ(x/(n+1)) u(x)` with the +smooth cut-off `χ = Rd.cutoff 1 2` (equal to `1` on the closed unit ball and to `0` outside the +ball of radius `2`), a smooth function with compact support. -/ +noncomputable def cutoffMul (n : ℕ) (u : 𝓢(V, ℂ)) : 𝓢(V, ℂ) := + HasCompactSupport.toSchwartzMap (hasCompactSupport_cutoff_smul_mul n u) + (((contDiff_cutoff one_pos one_lt_two).comp (contDiff_const_smul _)).mul (u.smooth ⊤)) + +/-- The values of the cut-off: `cutoffMul n u x = χ(x/(n+1)) u(x)`. -/ +theorem cutoffMul_apply (n : ℕ) (u : 𝓢(V, ℂ)) (x : V) : + cutoffMul n u x = cutoff 1 2 one_pos one_lt_two (((n : ℝ) + 1)⁻¹ • x) * u x := + rfl + +/-- The cut-off of a Schwartz function has compact support. -/ +theorem hasCompactSupport_cutoffMul (n : ℕ) (u : 𝓢(V, ℂ)) : HasCompactSupport (cutoffMul n u) := + hasCompactSupport_cutoff_smul_mul n u + +/-- The cut-off at radius `n + 1` agrees with `u` near every point of the open ball of radius +`n + 1`. -/ +theorem cutoffMul_eventuallyEq (u : 𝓢(V, ℂ)) {n : ℕ} {x : V} (hx : ‖x‖ < n + 1) : + (cutoffMul n u : V → ℂ) =ᶠ[𝓝 x] u := by + filter_upwards [Metric.isOpen_ball.mem_nhds (mem_ball_zero_iff.2 hx)] with y hy + have hy' : ‖((n : ℝ) + 1)⁻¹ • y‖ ≤ 1 := by + rw [norm_smul, Real.norm_of_nonneg (by positivity), inv_mul_le_iff₀ (by positivity), mul_one] + exact (mem_ball_zero_iff.1 hy).le + rw [cutoffMul_apply, cutoff_eq_one one_pos one_lt_two hy', one_mul] + +/-- For `0 ≤ c ≤ 1` the derivatives of the rescaled cut-off `x ↦ χ(c x)` are bounded by the +Schwartz seminorms `p_{0,i}(χ) = sup ‖D^i χ‖` of `χ = Rd.cutoffSchwartz 1 2`, because +`D^i (χ(c ·))(x) = c^i D^i χ(c x)` (Mathlib's `iteratedFDeriv_comp_const_smul`). -/ +theorem norm_iteratedFDeriv_cutoff_comp_smul_le {c : ℝ} (hc0 : 0 ≤ c) (hc1 : c ≤ 1) (i : ℕ) + (x : V) : + ‖iteratedFDeriv ℝ i (fun y => cutoff 1 2 one_pos one_lt_two (c • y)) x‖ ≤ + SchwartzMap.seminorm ℝ 0 i (cutoffSchwartz (V := V) 1 2 one_pos one_lt_two) := by + rw [iteratedFDeriv_comp_const_smul c + ((contDiff_cutoff one_pos one_lt_two).of_le (mod_cast le_top)), norm_smul, norm_pow, + Real.norm_of_nonneg hc0] + exact (mul_le_of_le_one_left (norm_nonneg _) (pow_le_one₀ hc0 hc1)).trans + (SchwartzMap.norm_iteratedFDeriv_le_seminorm ℝ + (cutoffSchwartz (V := V) 1 2 one_pos one_lt_two) i (c • x)) + +/-- The **Leibniz bound** for the cut-off: `‖D^m (χ_n u)(x)‖ ≤ ∑_{i ≤ m} C(m,i) p_{0,i}(χ) +‖D^(m-i) u(x)‖`, uniformly in `n` (Mathlib's `norm_iteratedFDeriv_mul_le`). -/ +theorem norm_iteratedFDeriv_cutoffMul_le (n m : ℕ) (u : 𝓢(V, ℂ)) (x : V) : + ‖iteratedFDeriv ℝ m (cutoffMul n u) x‖ ≤ ∑ i ∈ Finset.range (m + 1), (m.choose i : ℝ) * + SchwartzMap.seminorm ℝ 0 i (cutoffSchwartz (V := V) 1 2 one_pos one_lt_two) * + ‖iteratedFDeriv ℝ (m - i) u x‖ := by + have hc0 : (0 : ℝ) ≤ ((n : ℝ) + 1)⁻¹ := by positivity + have hc1 : ((n : ℝ) + 1)⁻¹ ≤ 1 := inv_le_one_of_one_le₀ (by linarith [n.cast_nonneg (α := ℝ)]) + refine (norm_iteratedFDeriv_mul_le + ((contDiff_cutoff one_pos one_lt_two).comp (contDiff_const_smul ((n : ℝ) + 1)⁻¹)) + (u.smooth ⊤) x (mod_cast le_top)).trans ?_ + gcongr with i hi + exact norm_iteratedFDeriv_cutoff_comp_smul_le hc0 hc1 i x + +/-- The pointwise bound for the `m`-th derivative of `u - χ_n u`: +`B(x) = ‖D^m u(x)‖ + ∑_{i ≤ m} C(m,i) p_{0,i}(χ) ‖D^(m-i) u(x)‖`, the derivative of `u` plus the +Leibniz bound of `Rd.norm_iteratedFDeriv_cutoffMul_le`, with `χ = Rd.cutoffSchwartz 1 2`. -/ +noncomputable def cutoffMulBound (m : ℕ) (u : 𝓢(V, ℂ)) (x : V) : ℝ := + ‖iteratedFDeriv ℝ m u x‖ + ∑ i ∈ Finset.range (m + 1), (m.choose i : ℝ) * + SchwartzMap.seminorm ℝ 0 i (cutoffSchwartz (V := V) 1 2 one_pos one_lt_two) * + ‖iteratedFDeriv ℝ (m - i) u x‖ + +/-- The derivatives of `u - χ_n u` are bounded by the pointwise bound `Rd.cutoffMulBound`, +uniformly in `n`. -/ +theorem norm_iteratedFDeriv_sub_cutoffMul_le (n m : ℕ) (u : 𝓢(V, ℂ)) (x : V) : + ‖iteratedFDeriv ℝ m (u - cutoffMul n u) x‖ ≤ cutoffMulBound m u x := by + have hsub : ((u - cutoffMul n u : 𝓢(V, ℂ)) : V → ℂ) = u - cutoffMul n u := rfl + rw [hsub, iteratedFDeriv_sub_apply ((u.smooth ⊤).of_le (mod_cast le_top)).contDiffAt + (((cutoffMul n u).smooth ⊤).of_le (mod_cast le_top)).contDiffAt, cutoffMulBound] + exact (norm_sub_le _ _).trans (add_le_add_right (norm_iteratedFDeriv_cutoffMul_le n m u x) _) + +/-- All derivatives of `u - χ_n u` vanish on the open ball of radius `n + 1`, where the cut-off +is `1`. -/ +theorem iteratedFDeriv_sub_cutoffMul_eq_zero (u : 𝓢(V, ℂ)) {n : ℕ} {x : V} (hx : ‖x‖ < n + 1) + (m : ℕ) : iteratedFDeriv ℝ m (u - cutoffMul n u) x = 0 := by + have h : ((u - cutoffMul n u : 𝓢(V, ℂ)) : V → ℂ) =ᶠ[𝓝 x] fun _ => (0 : ℂ) := by + filter_upwards [cutoffMul_eventuallyEq u hx] with y hy + simp [hy] + rw [(h.iteratedFDeriv ℝ m).eq_of_nhds, iteratedFDeriv_fun_zero, Pi.zero_apply] + +/-- The constant of the cut-off estimate `Rd.seminorm_sub_cutoffMul_le`: +`p_{k+1,m}(u) + ∑_{i ≤ m} C(m,i) p_{0,i}(χ) p_{k+1,m-i}(u)` in the Schwartz seminorms of `u` and +of the cut-off `χ = Rd.cutoffSchwartz 1 2`. -/ +noncomputable def cutoffMulConst (k m : ℕ) (u : 𝓢(V, ℂ)) : ℝ := + SchwartzMap.seminorm ℝ (k + 1) m u + ∑ i ∈ Finset.range (m + 1), (m.choose i : ℝ) * + SchwartzMap.seminorm ℝ 0 i (cutoffSchwartz (V := V) 1 2 one_pos one_lt_two) * + SchwartzMap.seminorm ℝ (k + 1) (m - i) u + +/-- The constant of the cut-off estimate is nonnegative. -/ +theorem cutoffMulConst_nonneg (k m : ℕ) (u : 𝓢(V, ℂ)) : 0 ≤ cutoffMulConst k m u := by + unfold cutoffMulConst + positivity + +/-- The pointwise form of the cut-off estimate: `‖x‖^(k+1) B(x) ≤ Rd.cutoffMulConst k m u` for +the pointwise bound `B = Rd.cutoffMulBound m u`. -/ +theorem norm_pow_succ_mul_cutoffMulBound_le (k m : ℕ) (u : 𝓢(V, ℂ)) (x : V) : + ‖x‖ ^ (k + 1) * cutoffMulBound m u x ≤ cutoffMulConst k m u := by + rw [cutoffMulBound, mul_add, Finset.mul_sum, cutoffMulConst] + refine add_le_add (SchwartzMap.le_seminorm ℝ (k + 1) m u x) (Finset.sum_le_sum fun i _ => ?_) + rw [mul_comm, mul_assoc] + gcongr + rw [mul_comm] + exact SchwartzMap.le_seminorm ℝ (k + 1) (m - i) u x + +/-- **The cut-off estimate**: the Schwartz seminorm `p_{k,m}(u - χ_n u)` is at most +`Rd.cutoffMulConst k m u / (n + 1)`, because `u - χ_n u` vanishes on the ball of radius `n + 1` +and `‖x‖^k ≤ ‖x‖^(k+1)/(n+1)` outside it. -/ +theorem seminorm_sub_cutoffMul_le (k m n : ℕ) (u : 𝓢(V, ℂ)) : + SchwartzMap.seminorm ℝ k m (u - cutoffMul n u) ≤ cutoffMulConst k m u / ((n : ℝ) + 1) := by + have hC := cutoffMulConst_nonneg k m u + refine SchwartzMap.seminorm_le_bound ℝ k m _ (by positivity) fun x => ?_ + rcases lt_or_ge ‖x‖ (n + 1) with hx | hx + · rw [iteratedFDeriv_sub_cutoffMul_eq_zero u hx, norm_zero, mul_zero] + positivity + rw [le_div_iff₀ (by positivity)] + calc ‖x‖ ^ k * ‖iteratedFDeriv ℝ m (u - cutoffMul n u) x‖ * ((n : ℝ) + 1) + ≤ ‖x‖ ^ k * cutoffMulBound m u x * ‖x‖ := by + have hB := norm_iteratedFDeriv_sub_cutoffMul_le n m u x + exact mul_le_mul (mul_le_mul_of_nonneg_left hB (by positivity)) hx (by positivity) + (mul_nonneg (by positivity) ((norm_nonneg _).trans hB)) + _ = ‖x‖ ^ (k + 1) * cutoffMulBound m u x := by ring + _ ≤ cutoffMulConst k m u := norm_pow_succ_mul_cutoffMulBound_le k m u x + +/-- **The cut-offs converge in the Schwartz space**: `χ_n u → u` in `𝓢(V, ℂ)`, since every +Schwartz seminorm of `u - χ_n u` is `O(1/(n+1))` (`Rd.seminorm_sub_cutoffMul_le`, Mathlib's +`schwartz_withSeminorms`). Hence smooth compactly supported functions are dense in +`𝓢(V, ℂ)`. -/ +theorem tendsto_cutoffMul (u : 𝓢(V, ℂ)) : + Tendsto (fun n : ℕ => cutoffMul n u) atTop (𝓝 u) := by + rw [(schwartz_withSeminorms ℝ V ℂ).tendsto_nhds _ u] + rintro ⟨k, m⟩ ε hε + have h0 : Tendsto (fun n : ℕ => cutoffMulConst k m u / ((n : ℝ) + 1)) atTop (𝓝 0) := + tendsto_const_nhds.div_atTop (tendsto_atTop_add_const_right _ 1 tendsto_natCast_atTop_atTop) + filter_upwards [h0.eventually (gt_mem_nhds hε)] with n hn + rw [SchwartzMap.schwartzSeminormFamily_apply, map_sub_rev] + exact (seminorm_sub_cutoffMul_le k m n u).trans_lt hn + +/-- **Test functions determine tempered distributions**: a tempered distribution on `V` that +vanishes on all real test functions is zero. The cut-offs `Rd.cutoffMul n u` of a Schwartz +function `u` are combinations of test functions (`Rd.exists_testSchwartz_eq`) and converge to `u` +in `𝓢(V, ℂ)` (`Rd.tendsto_cutoffMul`). -/ +theorem eq_zero_of_testSchwartz {F : Type*} [NormedAddCommGroup F] [NormedSpace ℂ F] + {T : 𝓢'(V, F)} (h : ∀ φ : 𝓓((⊤ : Opens V), ℝ), T (testSchwartz φ) = 0) : T = 0 := by + ext1 u + have hn : ∀ n : ℕ, T (cutoffMul n u) = 0 := fun n => by + obtain ⟨a, b, hab⟩ := exists_testSchwartz_eq (cutoffMul n u) (hasCompactSupport_cutoffMul n u) + rw [hab, map_add, map_smul, h, h, smul_zero, add_zero] + have ht : Tendsto (fun n : ℕ => T (cutoffMul n u)) atTop (𝓝 (T u)) := + ((map_continuous T).tendsto u).comp (tendsto_cutoffMul u) + simp only [hn] at ht + simpa using tendsto_nhds_unique ht tendsto_const_nhds + +end Rd diff --git a/LeanPool/FunctionSpaces/Analysis/Lp/BoundedContinuous.lean b/LeanPool/FunctionSpaces/Analysis/Lp/BoundedContinuous.lean new file mode 100644 index 0000000000..fb2a987d2c --- /dev/null +++ b/LeanPool/FunctionSpaces/Analysis/Lp/BoundedContinuous.lean @@ -0,0 +1,100 @@ +/- +Copyright (c) 2026 Mario Ullrich. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Mario Ullrich +-/ +module + +public import LeanPool.FunctionSpaces.Analysis.Lp.Inclusion +public import Mathlib.MeasureTheory.Function.LpSpace.ContinuousFunctions +public import Mathlib.MeasureTheory.Measure.OpenPos +public import Mathlib.Topology.UniformSpace.CompleteSeparated + +/- +Modified for Lean Pool: module names and imports adapted. +-/ + +/-! +# Bounded continuous functions in `L_p` + +Mathlib's `BoundedContinuousFunction.toLp p μ 𝕜` regards a bounded continuous function on a +finite measure space as an element of `L_p(μ)`. This file adds: + +* compatibility with the inclusion `L_r ↪ L_p`: including the `L_r` class of `a` gives its + `L_p` class (`BoundedContinuousFunction.inclusionOfExponentLe_toLp`); +* `‖toLp p μ 𝕜 a‖ = ‖a‖_{L_p}` written with `eLpNorm` (`norm_toLp_eq_toReal_eLpNorm`); +* for a measure giving positive mass to nonempty open sets, the sup norm equals the `L_∞` + norm (`norm_toLp_top`), so `toLp ∞` is an isometry and its range is closed + (`isClosed_range_toLp_top`). + +The last point is what lets a limit of continuous functions in `L_∞` be continuous: it is the +step from "`f ∈ L_∞`" to "`f` has a continuous representative" in the embeddings into `C(Ω)`. +-/ + +@[expose] public section + +open MeasureTheory +open scoped ENNReal + +namespace BoundedContinuousFunction + +variable {α E 𝕜 : Type*} {m0 : MeasurableSpace α} {μ : Measure α} + [TopologicalSpace α] [BorelSpace α] [NormedAddCommGroup E] [SecondCountableTopologyEither α E] + [NontriviallyNormedField 𝕜] [NormedSpace 𝕜 E] [IsFiniteMeasure μ] {p r : ℝ≥0∞} + [Fact (1 ≤ p)] [Fact (1 ≤ r)] + +/-- The `L_p` class of `a` is the inclusion of its `L_r` class. -/ +@[simp] +theorem inclusionOfExponentLe_toLp (hpr : p ≤ r) (a : α →ᵇ E) : + Lp.inclusionOfExponentLe (𝕜 := 𝕜) μ hpr (toLp (E := E) r μ 𝕜 a) = toLp (E := E) p μ 𝕜 a := by + ext1 + filter_upwards [Lp.coeFn_inclusionOfExponentLe (𝕜 := 𝕜) hpr (toLp (E := E) r μ 𝕜 a), + coeFn_toLp (E := E) r μ 𝕜 a, coeFn_toLp (E := E) p μ 𝕜 a] with x h1 h2 h3 + rw [h1, h2, h3] + +/-- The `L_p` norm of the class of a bounded continuous function is its `eLpNorm`: the bounded +continuous analogue of Mathlib's `MeasureTheory.Lp.norm_toLp`, proved from +`MeasureTheory.Lp.norm_def` with the class `toLp p μ 𝕜 a` equal to `a` almost everywhere +(`BoundedContinuousFunction.coeFn_toLp`). -/ +theorem norm_toLp_eq_toReal_eLpNorm (a : α →ᵇ E) : + ‖toLp (E := E) p μ 𝕜 a‖ = (eLpNorm a p μ).toReal := by + rw [Lp.norm_def, eLpNorm_congr_ae (coeFn_toLp (E := E) p μ 𝕜 a)] + +/-- For a measure that charges every nonempty open set, the `L_∞` norm of a bounded +continuous function is its sup norm. -/ +theorem norm_toLp_top [μ.IsOpenPosMeasure] (a : α →ᵇ E) : ‖toLp (E := E) ∞ μ 𝕜 a‖ = ‖a‖ := by + apply le_antisymm + · have := Lp.norm_le_of_ae_bound (f := toLp (E := E) ∞ μ 𝕜 a) (norm_nonneg a) + ((coeFn_toLp (E := E) ∞ μ 𝕜 a).mono fun x hx => by rw [hx]; exact a.norm_coe_le_norm x) + simpa using this + · -- the open set where `‖a x‖` exceeds the `L_∞` norm is null, hence empty + set F := toLp (E := E) ∞ μ 𝕜 a + have hae : ∀ᵐ x ∂μ, ‖a x‖ₑ ≤ ‖F‖ₑ := by + filter_upwards [coeFn_toLp (E := E) ∞ μ 𝕜 a, + ae_le_eLpNormEssSup (f := (F : α → E)) (μ := μ)] with x h1 h2 + rw [← h1, Lp.eNorm_def, eLpNorm_exponent_top (Lp.aestronglyMeasurable F)] + exact h2 + have hU : IsOpen {x | ‖F‖ₑ < ‖a x‖ₑ} := + isOpen_lt continuous_const (continuous_eNorm.comp a.continuous) + have hU0 : μ {x | ‖F‖ₑ < ‖a x‖ₑ} = 0 := by + simpa [not_le] using ae_iff.1 hae + rw [hU.measure_eq_zero_iff μ] at hU0 + refine (norm_le (norm_nonneg _)).2 fun x => ?_ + have hx : ‖a x‖ₑ ≤ ‖F‖ₑ := by + by_contra h + exact (Set.eq_empty_iff_forall_notMem.1 hU0 x) (not_le.1 h) + rw [← toReal_eNorm, ← toReal_eNorm] + exact ENNReal.toReal_mono eNorm_ne_top hx + +/-- For a measure that charges every nonempty open set, `toLp ∞` is an isometry. -/ +theorem isometry_toLp_top [μ.IsOpenPosMeasure] : + Isometry (toLp (E := E) ∞ μ 𝕜 : (α →ᵇ E) → Lp E ∞ μ) := + (AddMonoidHomClass.isometry_iff_norm _).2 (norm_toLp_top (μ := μ) (𝕜 := 𝕜)) + +/-- For a measure that charges every nonempty open set, the bounded continuous functions form +a closed subspace of `L_∞`. -/ +theorem isClosed_range_toLp_top [μ.IsOpenPosMeasure] [CompleteSpace E] : + IsClosed (Set.range (toLp (E := E) ∞ μ 𝕜 : (α →ᵇ E) → Lp E ∞ μ)) := + ((isometry_toLp_top (μ := μ) (𝕜 := 𝕜)).isUniformInducing.isComplete_range).isClosed + +end BoundedContinuousFunction diff --git a/LeanPool/FunctionSpaces/Analysis/Lp/Inclusion.lean b/LeanPool/FunctionSpaces/Analysis/Lp/Inclusion.lean new file mode 100644 index 0000000000..84bcf0e6b4 --- /dev/null +++ b/LeanPool/FunctionSpaces/Analysis/Lp/Inclusion.lean @@ -0,0 +1,154 @@ +/- +Copyright (c) 2026 Mario Ullrich. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Mario Ullrich +-/ +module + +public import Mathlib.MeasureTheory.Function.LpSpace.Basic +public import Mathlib.MeasureTheory.Function.LpSeminorm.CompareExp +public import Mathlib.MeasureTheory.Function.LpSpace.Complete + +/- +Modified for Lean Pool: module names and imports adapted. +-/ + +/-! +# The inclusion `L_r ↪ L_p` for a finite measure + +For a finite measure `μ` and `p ≤ r`, every element of `L_r(μ)` is also an element of +`L_p(μ)`, with + +`‖f‖_p ≤ μ(Ω)^(1/p - 1/r) ‖f‖_r` + +(Hölder's inequality, `MeasureTheory.eLpNorm_le_eLpNorm_mul_rpow_measure_univ`). Mathlib has +this as an inclusion of additive subgroups of the space of a.e. classes (`Lp.antitone`), but +not as a map between the normed spaces `Lp E r μ` and `Lp E p μ`, which are different types. +This file provides that map, `MeasureTheory.Lp.inclusionOfExponentLe`, as a bounded linear +map; it is injective, and for a probability measure it has norm at most `1`. + +Every embedding theorem between different `L_p` spaces is stated through this map: "`f ∈ L_p` +lies in `L_r`" becomes "`f = inclusionOfExponentLe μ hpr g` for some `g ∈ L_r`". +-/ + +@[expose] public section + +open scoped ENNReal + +namespace MeasureTheory.Lp + +variable {α E 𝕜 : Type*} {m : MeasurableSpace α} {μ : Measure α} [NormedAddCommGroup E] + [NontriviallyNormedField 𝕜] [NormedSpace 𝕜 E] {p r : ℝ≥0∞} + +section Linear + +variable [IsFiniteMeasure μ] + +/-- The inclusion `L_r → L_p` for `p ≤ r` and a finite measure, as a linear map. -/ +noncomputable def inclusionOfExponentLeLinear (μ : Measure α) [IsFiniteMeasure μ] (hpr : p ≤ r) : + Lp E r μ →ₗ[𝕜] Lp E p μ where + toFun f := ((Lp.memLp f).mono_exponent hpr).toLp f + map_add' f g := by + ext + grw [MemLp.coeFn_toLp, Lp.coeFn_add, Lp.coeFn_add, MemLp.coeFn_toLp, MemLp.coeFn_toLp] + map_smul' c f := by + ext + grw [MemLp.coeFn_toLp, Lp.coeFn_smul, Lp.coeFn_smul, MemLp.coeFn_toLp] + rfl + +/-- The inclusion does not change the function, up to null sets. -/ +theorem coeFn_inclusionOfExponentLeLinear (hpr : p ≤ r) (f : Lp E r μ) : + inclusionOfExponentLeLinear (𝕜 := 𝕜) μ hpr f =ᵐ[μ] f := + MemLp.coeFn_toLp ((Lp.memLp f).mono_exponent hpr) + +end Linear + +/-- The constant `μ(Ω)^(1/p - 1/r)` of Hölder's inequality between `L_r` and `L_p`. -/ +noncomputable def inclusionConst (μ : Measure α) (p r : ℝ≥0∞) : ℝ := + (μ Set.univ ^ (1 / p.toReal - 1 / r.toReal)).toReal + +/-- The constant `μ(Ω)^(1/p - 1/r)` is nonnegative. -/ +theorem inclusionConst_nonneg (μ : Measure α) (p r : ℝ≥0∞) : 0 ≤ inclusionConst μ p r := + ENNReal.toReal_nonneg + +/-- For a probability measure the constant is `1`. -/ +@[simp] +theorem inclusionConst_of_isProbabilityMeasure [IsProbabilityMeasure μ] (p r : ℝ≥0∞) : + inclusionConst μ p r = 1 := by + simp [inclusionConst] + +variable [Fact (1 ≤ p)] [Fact (1 ≤ r)] [IsFiniteMeasure μ] + +/-- Hölder's inequality: `‖f‖_p ≤ μ(Ω)^(1/p - 1/r) ‖f‖_r`. -/ +theorem norm_inclusionOfExponentLeLinear_apply_le (hpr : p ≤ r) (f : Lp E r μ) : + ‖inclusionOfExponentLeLinear (𝕜 := 𝕜) μ hpr f‖ ≤ inclusionConst μ p r * ‖f‖ := by + have hp : 1 ≤ p := Fact.out + have hexp : 0 ≤ 1 / p.toReal - 1 / r.toReal := by + rcases eq_or_ne r ∞ with rfl | hr + · simp + have hp' : p ≠ ∞ := ne_top_of_le_ne_top hr hpr + have hp0 : 0 < p.toReal := ENNReal.toReal_pos (zero_lt_one.trans_le hp).ne' hp' + rw [sub_nonneg] + exact one_div_le_one_div_of_le hp0 (ENNReal.toReal_mono hr hpr) + have hM : μ Set.univ ^ (1 / p.toReal - 1 / r.toReal) ≠ ∞ := + ENNReal.rpow_ne_top_of_nonneg hexp (measure_ne_top μ _) + rw [Lp.norm_def, Lp.norm_def, eLpNorm_congr_ae (coeFn_inclusionOfExponentLeLinear hpr f), + inclusionConst, ← ENNReal.toReal_mul, mul_comm] + exact ENNReal.toReal_mono (ENNReal.mul_ne_top (Lp.eLpNorm_ne_top f) hM) + (eLpNorm_le_eLpNorm_mul_rpow_measure_univ hpr (Lp.aestronglyMeasurable f)) + +/-- The **inclusion `L_r ↪ L_p`** for `p ≤ r` and a finite measure `μ`, as a bounded linear +map with `‖f‖_p ≤ μ(Ω)^(1/p - 1/r) ‖f‖_r`. -/ +noncomputable def inclusionOfExponentLe (μ : Measure α) [IsFiniteMeasure μ] (hpr : p ≤ r) : + Lp E r μ →L[𝕜] Lp E p μ := + LinearMap.mkContinuous (inclusionOfExponentLeLinear μ hpr) (inclusionConst μ p r) + (norm_inclusionOfExponentLeLinear_apply_le hpr) + +/-- The inclusion does not change the function: `inclusionOfExponentLe μ hpr f = f` a.e. -/ +theorem coeFn_inclusionOfExponentLe (hpr : p ≤ r) (f : Lp E r μ) : + inclusionOfExponentLe (𝕜 := 𝕜) μ hpr f =ᵐ[μ] f := + coeFn_inclusionOfExponentLeLinear hpr f + +/-- Hölder's inequality: `‖f‖_p ≤ μ(Ω)^(1/p - 1/r) ‖f‖_r`. -/ +theorem norm_inclusionOfExponentLe_apply_le (hpr : p ≤ r) (f : Lp E r μ) : + ‖inclusionOfExponentLe (𝕜 := 𝕜) μ hpr f‖ ≤ inclusionConst μ p r * ‖f‖ := + norm_inclusionOfExponentLeLinear_apply_le hpr f + +/-- The inclusion has norm at most `μ(Ω)^(1/p - 1/r)`. -/ +theorem norm_inclusionOfExponentLe_le (hpr : p ≤ r) : + ‖(inclusionOfExponentLe (E := E) (𝕜 := 𝕜) μ hpr)‖ ≤ inclusionConst μ p r := + LinearMap.mkContinuous_norm_le _ (inclusionConst_nonneg μ p r) _ + +/-- For a probability measure the inclusion is a contraction. -/ +theorem norm_inclusionOfExponentLe_apply_le_of_prob [IsProbabilityMeasure μ] (hpr : p ≤ r) + (f : Lp E r μ) : ‖inclusionOfExponentLe (𝕜 := 𝕜) μ hpr f‖ ≤ ‖f‖ := by + simpa using norm_inclusionOfExponentLe_apply_le (𝕜 := 𝕜) hpr f + +/-- The inclusion is injective: an `L_r` class is determined by its `L_p` class. -/ +theorem inclusionOfExponentLe_injective (hpr : p ≤ r) : + Function.Injective (inclusionOfExponentLe (E := E) (𝕜 := 𝕜) μ hpr) := fun f g h => by + ext + have := congrArg (fun F : Lp E p μ => (F : α → E)) h + filter_upwards [coeFn_inclusionOfExponentLe (𝕜 := 𝕜) hpr f, + coeFn_inclusionOfExponentLe (𝕜 := 𝕜) hpr g] with x hf hg + rw [← hf, ← hg] + exact congrFun this x + +/-- The identity case `p = r`. -/ +@[simp] +theorem inclusionOfExponentLe_self (f : Lp E p μ) : + inclusionOfExponentLe (𝕜 := 𝕜) μ le_rfl f = f := by + ext1; exact coeFn_inclusionOfExponentLe le_rfl f + +/-- Two inclusions compose to an inclusion. -/ +theorem inclusionOfExponentLe_comp {s : ℝ≥0∞} [Fact (1 ≤ s)] (hps : p ≤ s) (hsr : s ≤ r) + (f : Lp E r μ) : + inclusionOfExponentLe (𝕜 := 𝕜) μ hps (inclusionOfExponentLe (𝕜 := 𝕜) μ hsr f) = + inclusionOfExponentLe (𝕜 := 𝕜) μ (hps.trans hsr) f := by + ext1 + filter_upwards [coeFn_inclusionOfExponentLe (𝕜 := 𝕜) hps (inclusionOfExponentLe (𝕜 := 𝕜) μ hsr f), + coeFn_inclusionOfExponentLe (𝕜 := 𝕜) hsr f, + coeFn_inclusionOfExponentLe (𝕜 := 𝕜) (hps.trans hsr) f] with x h1 h2 h3 + rw [h1, h2, h3] + +end MeasureTheory.Lp diff --git a/LeanPool/FunctionSpaces/Analysis/Lp/IndicatorOperator.lean b/LeanPool/FunctionSpaces/Analysis/Lp/IndicatorOperator.lean new file mode 100644 index 0000000000..53e48e7e53 --- /dev/null +++ b/LeanPool/FunctionSpaces/Analysis/Lp/IndicatorOperator.lean @@ -0,0 +1,242 @@ +/- +Copyright (c) 2026 Mario Ullrich. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Mario Ullrich +-/ +module + +public import Mathlib.MeasureTheory.Function.Holder +public import Mathlib.MeasureTheory.Integral.Bochner.Set + +/- +Modified for Lean Pool: module names and imports adapted. +-/ + +/-! +# Indicators, extension by zero and restriction in `L_p` + +For a measurable set `s` of a measure space, multiplication by the indicator `1_s` is a bounded +linear operator on `L_p(μ)` of norm at most `1` (`Rd.indicatorLp`); it is multiplication by +`1_s` almost everywhere (`Rd.indicatorLp_apply_ae`) and `‖1_s g‖_p ≤ ‖g‖_p` +(`Rd.enorm_indicatorLp_le`). Two classes have the same image iff they agree almost everywhere +on `s` (`Rd.indicatorLp_eq_iff_ae_eq_restrict`), and `∫_s a b = ⟨1_s a, b⟩` for `a, b ∈ L_2` +with Mathlib's pairing of `L_2` with `L_2` (`Rd.setIntegral_mul_eq_lpPairing`). For a measurable +`T ⊆ O`, the extension by zero `g ↦ 1_T g` from `L_p(μ|_O)` to `L_p(μ)` is a bounded linear +operator of norm at most `1` (`Rd.indicatorExtendLp`). The cut-off norm `‖1_s f‖_{L_p(μ)}` is the +norm of the restriction `f|_s ∈ L_p(μ|_s)` (`Rd.enorm_indicatorLp_eq`), and the extension by zero +of `f|_s` agrees with `f` on `s` (`Rd.indicatorLp_indicatorExtendLp_restrict`); it is `f` when `f` +vanishes almost everywhere outside `s` (`Rd.indicatorExtendLp_restrict_of_ae_eq_zero`). For a +measurable `D ⊆ O`, the restriction `g ↦ g|_D` from `L_p(μ|_O)` to `L_p(μ|_D)` is a bounded +linear operator (`Rd.restrictSubsetLp`) that agrees with `g` almost everywhere on `D` +(`Rd.restrictSubsetLp_ae`). +-/ + +@[expose] public section + +open MeasureTheory Filter +open scoped ENNReal + +namespace Rd + +variable {α : Type*} [MeasurableSpace α] {μ : Measure α} {p : ℝ≥0∞} [Fact (1 ≤ p)] + +omit [Fact (1 ≤ p)] in +/-- `1_s g ∈ L_p` for `g ∈ L_p`. -/ +theorem memLp_indicator_coe {s : Set α} (hs : MeasurableSet s) (g : Lp ℂ p μ) : + MemLp (s.indicator (g : α → ℂ)) p μ := + (Lp.memLp g).indicator hs.nullMeasurableSet + +omit [Fact (1 ≤ p)] in +/-- `‖1_s g‖_p ≤ ‖g‖_p` for the class of `1_s g`. -/ +theorem norm_toLp_indicator_le {s : Set α} (hs : MeasurableSet s) (g : Lp ℂ p μ) : + ‖(memLp_indicator_coe hs g).toLp _‖ ≤ ‖g‖ := by + rw [Lp.norm_toLp, Lp.norm_def] + exact ENNReal.toReal_mono (Lp.eLpNorm_ne_top g) (eLpNorm_indicator_le _ hs.nullMeasurableSet) + +/-- **Multiplication by the indicator of a measurable set** as an operator on `L_p` of norm at +most `1`. -/ +noncomputable def indicatorLp {s : Set α} (hs : MeasurableSet s) : Lp ℂ p μ →L[ℂ] Lp ℂ p μ := + LinearMap.mkContinuous + { toFun := fun g => (memLp_indicator_coe hs g).toLp _ + map_add' := fun f g => by + refine Lp.ext ?_ + have e1 := MemLp.coeFn_toLp (memLp_indicator_coe hs (f + g)) + have e2 := MemLp.coeFn_toLp (memLp_indicator_coe hs f) + have e3 := MemLp.coeFn_toLp (memLp_indicator_coe hs g) + have e4 := Lp.coeFn_add f g + have e5 := Lp.coeFn_add ((memLp_indicator_coe hs f).toLp _) + ((memLp_indicator_coe hs g).toLp _) + filter_upwards [e1, e2, e3, e4, e5] with x h1 h2 h3 h4 h5 + rw [h1, h5, Pi.add_apply, h2, h3] + by_cases hx : x ∈ s + · simp only [Set.indicator_of_mem hx, h4, Pi.add_apply] + · simp only [Set.indicator_of_notMem hx, add_zero] + map_smul' := fun c f => by + refine Lp.ext ?_ + have e1 := MemLp.coeFn_toLp (memLp_indicator_coe hs (c • f)) + have e2 := MemLp.coeFn_toLp (memLp_indicator_coe hs f) + have e3 := Lp.coeFn_smul c f + have e4 := Lp.coeFn_smul c ((memLp_indicator_coe hs f).toLp _) + filter_upwards [e1, e2, e3, e4] with x h1 h2 h3 h4 + rw [h1, RingHom.id_apply, h4, Pi.smul_apply, h2] + by_cases hx : x ∈ s + · simp only [Set.indicator_of_mem hx, h3, Pi.smul_apply] + · simp only [Set.indicator_of_notMem hx, smul_zero] } + 1 (fun g => by + rw [one_mul] + exact norm_toLp_indicator_le hs g) + +/-- Multiplication by an indicator is multiplication by the indicator, almost everywhere. -/ +theorem indicatorLp_apply_ae {s : Set α} (hs : MeasurableSet s) (g : Lp ℂ p μ) : + indicatorLp hs g =ᵐ[μ] s.indicator g := + MemLp.coeFn_toLp (memLp_indicator_coe hs g) + +/-- **Integrals over a set as a pairing**: `∫_s a b = ⟨1_s a, b⟩` for `a, b ∈ L_2(μ)` and a +measurable set `s`, with Mathlib's bounded bilinear pairing of `L_2` with `L_2` +(`ContinuousLinearMap.lpPairing`). -/ +theorem setIntegral_mul_eq_lpPairing {s : Set α} (hs : MeasurableSet s) (a b : Lp ℂ 2 μ) : + ∫ x in s, a x * b x ∂μ = + (ContinuousLinearMap.mul ℂ ℂ).lpPairing μ 2 2 (indicatorLp hs a) b := by + rw [ContinuousLinearMap.lpPairing_eq_integral, ← integral_indicator hs] + refine integral_congr_ae ?_ + filter_upwards [indicatorLp_apply_ae hs a] with x hx + rw [ContinuousLinearMap.mul_apply', hx] + by_cases h : x ∈ s + · rw [Set.indicator_of_mem h, Set.indicator_of_mem h] + · rw [Set.indicator_of_notMem h, Set.indicator_of_notMem h, zero_mul] + +/-- `‖1_s g‖_p ≤ ‖g‖_p`. -/ +theorem enorm_indicatorLp_le {s : Set α} (hs : MeasurableSet s) (g : Lp ℂ p μ) : + ‖indicatorLp hs g‖ₑ ≤ ‖g‖ₑ := by + rw [Lp.eNorm_def, Lp.eNorm_def, eLpNorm_congr_ae (indicatorLp_apply_ae hs g)] + exact eLpNorm_indicator_le _ hs.nullMeasurableSet + +/-- **The `L_p(μ|_s)` norm as a cut-off norm**: `‖1_s f‖_{L_p(μ)} = ‖f|_s‖_{L_p(μ|_s)}` for a +measurable `s` (Mathlib's `MeasureTheory.eLpNorm_indicator_eq_eLpNorm_restrict` and +`MeasureTheory.LpToLpRestrictCLM_coeFn`). -/ +theorem enorm_indicatorLp_eq {s : Set α} (hs : MeasurableSet s) (f : Lp ℂ p μ) : + ‖indicatorLp hs f‖ₑ = ‖LpToLpRestrictCLM α ℂ ℂ μ p s f‖ₑ := by + rw [Lp.eNorm_def, Lp.eNorm_def, eLpNorm_congr_ae (indicatorLp_apply_ae hs f), + eLpNorm_indicator_eq_eLpNorm_restrict hs.nullMeasurableSet, + eLpNorm_congr_ae (LpToLpRestrictCLM_coeFn ℂ s f)] + +/-- Two elements of `L_p` have the same restriction `1_s F = 1_s f` to a measurable set `s` iff +they agree almost everywhere on `s`: Mathlib's `MeasureTheory.ae_eq_restrict_iff_indicator_ae_eq` +for the classes in `L_p`. -/ +theorem indicatorLp_eq_iff_ae_eq_restrict {s : Set α} (hs : MeasurableSet s) {F f : Lp ℂ p μ} : + indicatorLp hs F = indicatorLp hs f ↔ (F : α → ℂ) =ᵐ[μ.restrict s] f := by + rw [ae_eq_restrict_iff_indicator_ae_eq hs, Lp.ext_iff] + exact ⟨fun h => (indicatorLp_apply_ae hs F).symm.trans (h.trans (indicatorLp_apply_ae hs f)), + fun h => (indicatorLp_apply_ae hs F).trans (h.trans (indicatorLp_apply_ae hs f).symm)⟩ + +/-! ### Extension by zero -/ + +omit [Fact (1 ≤ p)] in +/-- For `g ∈ L_p(μ|_O)` and a measurable `T ⊆ O`, the extension by zero `1_T g` lies in `L_p(μ)` +(Mathlib's `MeasureTheory.memLp_indicator_iff_restrict`). -/ +theorem memLp_indicator_restrict {T O : Set α} (hT : MeasurableSet T) (hTO : T ⊆ O) + (g : Lp ℂ p (μ.restrict O)) : MemLp (T.indicator (g : α → ℂ)) p μ := + (memLp_indicator_iff_restrict hT.nullMeasurableSet).2 + ((Lp.memLp g).mono_measure (Measure.restrict_mono hTO le_rfl)) + +omit [Fact (1 ≤ p)] in +/-- `‖1_T g‖_{L_p(μ)} ≤ ‖g‖_{L_p(μ|_O)}` for `T ⊆ O` (Mathlib's +`MeasureTheory.eLpNorm_indicator_eq_eLpNorm_restrict`). -/ +theorem eLpNorm_indicator_restrict_le {T O : Set α} (hT : MeasurableSet T) (hTO : T ⊆ O) + (g : Lp ℂ p (μ.restrict O)) : + eLpNorm (T.indicator (g : α → ℂ)) p μ ≤ eLpNorm g p (μ.restrict O) := by + rw [eLpNorm_indicator_eq_eLpNorm_restrict hT.nullMeasurableSet] + exact eLpNorm_mono_measure _ (Measure.restrict_mono hTO le_rfl) + +/-- **Extension by zero** from `L_p(μ|_O)` to `L_p(μ)` on a measurable `T ⊆ O`: the operator +`g ↦ 1_T g` of norm at most `1`. -/ +noncomputable def indicatorExtendLp {T O : Set α} (hT : MeasurableSet T) (hTO : T ⊆ O) : + Lp ℂ p (μ.restrict O) →L[ℂ] Lp ℂ p μ := + LinearMap.mkContinuous + { toFun := fun g => (memLp_indicator_restrict hT hTO g).toLp _ + map_add' := fun f g => by + refine Lp.ext ?_ + have e1 := MemLp.coeFn_toLp (memLp_indicator_restrict hT hTO (f + g)) + have e2 := MemLp.coeFn_toLp (memLp_indicator_restrict hT hTO f) + have e3 := MemLp.coeFn_toLp (memLp_indicator_restrict hT hTO g) + have e4 := ae_restrict_of_ae_restrict_of_subset hTO (Lp.coeFn_add f g) + have e5 := Lp.coeFn_add ((memLp_indicator_restrict hT hTO f).toLp _) + ((memLp_indicator_restrict hT hTO g).toLp _) + filter_upwards [e1, e2, e3, e5, (ae_restrict_iff' hT).1 e4] with x h1 h2 h3 h5 h4 + rw [h1, h5, Pi.add_apply, h2, h3] + by_cases hx : x ∈ T + · simp only [Set.indicator_of_mem hx, h4 hx, Pi.add_apply] + · simp only [Set.indicator_of_notMem hx, add_zero] + map_smul' := fun c f => by + refine Lp.ext ?_ + have e1 := MemLp.coeFn_toLp (memLp_indicator_restrict hT hTO (c • f)) + have e2 := MemLp.coeFn_toLp (memLp_indicator_restrict hT hTO f) + have e3 := ae_restrict_of_ae_restrict_of_subset hTO (Lp.coeFn_smul c f) + have e4 := Lp.coeFn_smul c ((memLp_indicator_restrict hT hTO f).toLp _) + filter_upwards [e1, e2, e4, (ae_restrict_iff' hT).1 e3] with x h1 h2 h4 h3 + rw [h1, RingHom.id_apply, h4, Pi.smul_apply, h2] + by_cases hx : x ∈ T + · simp only [Set.indicator_of_mem hx, h3 hx, Pi.smul_apply] + · simp only [Set.indicator_of_notMem hx, smul_zero] } + 1 (fun g => by + change ‖(memLp_indicator_restrict hT hTO g).toLp _‖ ≤ 1 * ‖g‖ + rw [one_mul, Lp.norm_toLp, Lp.norm_def] + exact ENNReal.toReal_mono (Lp.eLpNorm_ne_top g) (eLpNorm_indicator_restrict_le hT hTO g)) + +/-- The extension by zero is `1_T g` almost everywhere. -/ +theorem indicatorExtendLp_apply_ae {T O : Set α} (hT : MeasurableSet T) (hTO : T ⊆ O) + (g : Lp ℂ p (μ.restrict O)) : indicatorExtendLp hT hTO g =ᵐ[μ] T.indicator g := + MemLp.coeFn_toLp (memLp_indicator_restrict hT hTO g) + +/-- `‖1_T g‖_{L_p(μ)} ≤ ‖g‖_{L_p(μ|_O)}` for the extension by zero. -/ +theorem enorm_indicatorExtendLp_le {T O : Set α} (hT : MeasurableSet T) (hTO : T ⊆ O) + (g : Lp ℂ p (μ.restrict O)) : ‖indicatorExtendLp hT hTO g‖ₑ ≤ ‖g‖ₑ := by + rw [Lp.eNorm_def, Lp.eNorm_def g, eLpNorm_congr_ae (indicatorExtendLp_apply_ae hT hTO g)] + exact eLpNorm_indicator_restrict_le hT hTO g + +/-- **The zero extension of a restriction agrees with the function on the set**: for a +measurable `s` and `f ∈ L_p(μ)`, `1_s E(f|_s) = 1_s f` in `L_p(μ)`, where `E` is the extension by +zero from `L_p(μ|_s)` (`Rd.indicatorLp_eq_iff_ae_eq_restrict`). -/ +theorem indicatorLp_indicatorExtendLp_restrict {s : Set α} (hs : MeasurableSet s) + (f : Lp ℂ p μ) : + indicatorLp hs (indicatorExtendLp hs subset_rfl (LpToLpRestrictCLM α ℂ ℂ μ p s f)) = + indicatorLp hs f := by + refine (indicatorLp_eq_iff_ae_eq_restrict hs).2 ?_ + filter_upwards [ae_restrict_of_ae (indicatorExtendLp_apply_ae hs subset_rfl + (LpToLpRestrictCLM α ℂ ℂ μ p s f)), LpToLpRestrictCLM_coeFn ℂ s f, + ae_restrict_mem hs] with x hx1 hx2 hx3 + rw [hx1, Set.indicator_of_mem hx3, hx2] + +/-- **The zero extension of a restriction**: if `f ∈ L_p(μ)` vanishes almost everywhere outside a +measurable set `s`, then the zero extension of `f|_s` is `f`. -/ +theorem indicatorExtendLp_restrict_of_ae_eq_zero {s : Set α} (hs : MeasurableSet s) + {f : Lp ℂ p μ} (hf : ∀ᵐ x ∂μ, x ∉ s → f x = 0) : + indicatorExtendLp hs subset_rfl (LpToLpRestrictCLM α ℂ ℂ μ p s f) = f := by + refine Lp.ext ?_ + filter_upwards [indicatorExtendLp_apply_ae hs subset_rfl (LpToLpRestrictCLM α ℂ ℂ μ p s f), + (ae_restrict_iff' hs).1 (LpToLpRestrictCLM_coeFn ℂ s f), hf] with x h1 h2 h3 + rw [h1] + by_cases hx : x ∈ s + · rw [Set.indicator_of_mem hx, h2 hx] + · rw [Set.indicator_of_notMem hx, h3 hx] + +/-! ### Restriction to a smaller set -/ + +/-- **Restriction to a smaller set**: for measurable `D ⊆ O`, the operator +`L_p(μ|_O) → L_p(μ|_D)`, `g ↦ g|_D`, as the zero extension to the whole space +(`Rd.indicatorExtendLp`) followed by the restriction to `D` (Mathlib's +`MeasureTheory.LpToLpRestrictCLM`). Mathlib's `MeasureTheory.Lp.LpToLpOfMeasureLeSMul` gives the +same map as an `ℝ`-linear operator. -/ +noncomputable def restrictSubsetLp {D O : Set α} (hD : MeasurableSet D) (hDO : D ⊆ O) : + Lp ℂ p (μ.restrict O) →L[ℂ] Lp ℂ p (μ.restrict D) := + LpToLpRestrictCLM α ℂ ℂ μ p D ∘L indicatorExtendLp hD hDO + +/-- The restriction to `D` agrees with `g` almost everywhere on `D`. -/ +theorem restrictSubsetLp_ae {D O : Set α} (hD : MeasurableSet D) (hDO : D ⊆ O) + (g : Lp ℂ p (μ.restrict O)) : restrictSubsetLp hD hDO g =ᵐ[μ.restrict D] g := by + filter_upwards [LpToLpRestrictCLM_coeFn ℂ D (indicatorExtendLp hD hDO g), + ae_restrict_of_ae (indicatorExtendLp_apply_ae hD hDO g), ae_restrict_mem hD] with x h1 h2 h3 + change LpToLpRestrictCLM α ℂ ℂ μ p D (indicatorExtendLp hD hDO g) x = g x + rw [h1, h2, Set.indicator_of_mem h3] + +end Rd diff --git a/LeanPool/FunctionSpaces/Analysis/Lp/Interpolation.lean b/LeanPool/FunctionSpaces/Analysis/Lp/Interpolation.lean new file mode 100644 index 0000000000..0251be8a41 --- /dev/null +++ b/LeanPool/FunctionSpaces/Analysis/Lp/Interpolation.lean @@ -0,0 +1,135 @@ +/- +Copyright (c) 2026 Mario Ullrich. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Mario Ullrich +-/ +module + +public import Mathlib.MeasureTheory.Function.LpSeminorm.CompareExp + +/- +Modified for Lean Pool: module names and imports adapted. +-/ + +/-! +# Interpolation between `L_p` and `L_∞` + +For a function bounded by `M` and `0 < p ≤ r < ∞`, + +`‖f‖_r ≤ M^(1 - p/r) ‖f‖_p^(p/r)` + +(`eLpNorm_le_rpow_mul_eLpNorm_rpow`), because `|f|^r ≤ M^(r-p) |f|^p` pointwise. This is the +elementary case of log-convexity of `p ↦ ‖f‖_p`; Mathlib has Hölder's inequality but not this +form. It reduces every Nikolskii inequality `‖a‖_r ≲ n^(D(1/p-1/r)) ‖a‖_p` to the case +`r = ∞`. The real-valued form `toReal_eLpNorm_le_rpow_mul` is the one used in estimates. +A consequence is `MemLp.mono_exponent_of_enorm_le`: a bounded function in `L_p` lies in `L_r` for +every `r ≥ p`. The exponent `1 - p/r` is nonnegative for `p ≤ r ≤ ∞` +(`ENNReal.one_sub_toReal_div_nonneg`); for `1 ≤ p₀ < p₁ < ∞` the ratio `θ = p₀/p₁` lies in +`(0, 1)` and `p₁ θ = p₀` (`ENNReal.toReal_div_toReal_mem_Ioo`, +`ENNReal.mul_ofReal_toReal_div_toReal`). +-/ + +@[expose] public section + +open MeasureTheory +open scoped ENNReal + +/-- The interpolation exponent is nonnegative: `0 ≤ 1 - p/r` for `p ≤ r ≤ ∞`, with `1/∞ = 0`. -/ +theorem ENNReal.one_sub_toReal_div_nonneg {p r : ℝ≥0∞} (hpr : p ≤ r) : + 0 ≤ 1 - p.toReal / r.toReal := by + rcases eq_or_ne r ∞ with rfl | hr + · simp + · exact sub_nonneg.2 (div_le_one_of_le₀ (ENNReal.toReal_mono hr hpr) ENNReal.toReal_nonneg) + +/-- For `1 ≤ p₀ < p₁ < ∞` the ratio `θ = p₀/p₁` of the exponents lies in `(0, 1)`. -/ +theorem ENNReal.toReal_div_toReal_mem_Ioo {p₀ p₁ : ℝ≥0∞} (hp₀ : 1 ≤ p₀) (hp₀₁ : p₀ < p₁) + (hp₁ : p₁ ≠ ∞) : p₀.toReal / p₁.toReal ∈ Set.Ioo 0 1 := by + have h0 : 0 < p₀.toReal := + ENNReal.toReal_pos (zero_lt_one.trans_le hp₀).ne' (hp₀₁.trans_le le_top).ne + have h01 : p₀.toReal < p₁.toReal := ENNReal.toReal_strict_mono hp₁ hp₀₁ + exact ⟨div_pos h0 (h0.trans h01), (div_lt_one (h0.trans h01)).2 h01⟩ + +/-- `p₁ · (p₀/p₁) = p₀` for finite `p₀` and `0 < p₁ < ∞`: the exponent `p₁ θ` with +`θ = p₀/p₁` is `p₀`. -/ +theorem ENNReal.mul_ofReal_toReal_div_toReal {p₀ p₁ : ℝ≥0∞} (hp₀ : p₀ ≠ ∞) (hp₁0 : p₁ ≠ 0) + (hp₁ : p₁ ≠ ∞) : p₁ * ENNReal.ofReal (p₀.toReal / p₁.toReal) = p₀ := by + have h1 : 0 < p₁.toReal := ENNReal.toReal_pos hp₁0 hp₁ + calc p₁ * ENNReal.ofReal (p₀.toReal / p₁.toReal) + = ENNReal.ofReal p₁.toReal * ENNReal.ofReal (p₀.toReal / p₁.toReal) := by + rw [ENNReal.ofReal_toReal hp₁] + _ = p₀ := by + rw [← ENNReal.ofReal_mul h1.le, mul_div_cancel₀ _ h1.ne', ENNReal.ofReal_toReal hp₀] + +namespace MeasureTheory + +variable {α E : Type*} {m : MeasurableSpace α} {μ : Measure α} [NormedAddCommGroup E] + {p r : ℝ≥0∞} {f : α → E} + +/-- **Interpolation between `L_p` and `L_∞`**: for `‖f‖ ≤ M` a.e. and `0 < p ≤ r < ∞`, +`‖f‖_r ≤ M^(1 - p/r) ‖f‖_p^(p/r)`. -/ +theorem eLpNorm_le_rpow_mul_eLpNorm_rpow (hf : AEStronglyMeasurable f μ) {M : ℝ≥0∞} + (hM : ∀ᵐ x ∂μ, ‖f x‖ₑ ≤ M) (hp0 : p ≠ 0) (hpr : p ≤ r) (hr : r ≠ ∞) : + eLpNorm f r μ ≤ M ^ (1 - p.toReal / r.toReal) * eLpNorm f p μ ^ (p.toReal / r.toReal) := by + have hp : p ≠ ∞ := ne_top_of_le_ne_top hr hpr + have hr0 : r ≠ 0 := (lt_of_lt_of_le (pos_iff_ne_zero.2 hp0) hpr).ne' + have hpp : 0 < p.toReal := ENNReal.toReal_pos hp0 hp + have hrr : 0 < r.toReal := ENNReal.toReal_pos hr0 hr + have hpr' : p.toReal ≤ r.toReal := ENNReal.toReal_mono hr hpr + rw [eLpNorm_eq_lintegral_rpow_eNorm_toReal hr0 hr hf, + eLpNorm_eq_lintegral_rpow_eNorm_toReal hp0 hp hf] + have hpt : ∀ᵐ x ∂μ, ‖f x‖ₑ ^ r.toReal ≤ M ^ (r.toReal - p.toReal) * ‖f x‖ₑ ^ p.toReal := by + filter_upwards [hM] with x hx + rw [← sub_add_cancel r.toReal p.toReal, + ENNReal.rpow_add_of_nonneg _ _ (by linarith) hpp.le, sub_add_cancel] + gcongr + calc (∫⁻ x, ‖f x‖ₑ ^ r.toReal ∂μ) ^ (1 / r.toReal) + ≤ (∫⁻ x, M ^ (r.toReal - p.toReal) * ‖f x‖ₑ ^ p.toReal ∂μ) ^ (1 / r.toReal) := by + gcongr ?_ ^ _ + exact lintegral_mono_ae hpt + _ = (M ^ (r.toReal - p.toReal) * ∫⁻ x, ‖f x‖ₑ ^ p.toReal ∂μ) ^ (1 / r.toReal) := by + rw [lintegral_const_mul'' _ (hf.eNorm.pow_const _)] + _ = M ^ (1 - p.toReal / r.toReal) * + ((∫⁻ x, ‖f x‖ₑ ^ p.toReal ∂μ) ^ (1 / p.toReal)) ^ (p.toReal / r.toReal) := by + rw [ENNReal.mul_rpow_of_nonneg _ _ (by positivity), ← ENNReal.rpow_mul, + ← ENNReal.rpow_mul] + congr 2 <;> field_simp + +/-- **Bounded functions in `L_p` lie in `L_r` for every `r ≥ p`**: if `f ∈ L_p` with `p > 0` and +`‖f‖ ≤ M < ∞` almost everywhere, then `f ∈ L_r` for every `p ≤ r ≤ ∞`, by +`MeasureTheory.eLpNorm_le_rpow_mul_eLpNorm_rpow` for `r < ∞` and the essential supremum for +`r = ∞`. -/ +theorem MemLp.mono_exponent_of_enorm_le (hf : MemLp f p μ) {M : ℝ≥0∞} + (hM : ∀ᵐ x ∂μ, ‖f x‖ₑ ≤ M) (hMtop : M ≠ ∞) (hp0 : p ≠ 0) (hpr : p ≤ r) : MemLp f r μ := by + refine memLp_iff.2 ?_ + rcases eq_or_ne r ∞ with rfl | hr + · rw [eLpNorm_exponent_top hf.aestronglyMeasurable] + exact (eLpNormEssSup_le_of_ae_eNorm_bound hM).trans_lt hMtop.lt_top + · refine (eLpNorm_le_rpow_mul_eLpNorm_rpow hf.aestronglyMeasurable hM hp0 hpr hr).trans_lt + (ENNReal.mul_lt_top ?_ ?_) + · exact ENNReal.rpow_lt_top_of_nonneg (ENNReal.one_sub_toReal_div_nonneg hpr) hMtop + · exact ENNReal.rpow_lt_top_of_nonneg (by positivity) hf.eLpNorm_ne_top + +/-- The interpolation inequality in real numbers, for a bounded function on a finite measure +space: `‖f‖_r ≤ M^(1 - p/r) ‖f‖_p^(p/r)` for `0 < p ≤ r < ∞`. -/ +theorem toReal_eLpNorm_le_rpow_mul [IsFiniteMeasure μ] (hf : AEStronglyMeasurable f μ) {M : ℝ} + (hM0 : 0 ≤ M) (hM : ∀ᵐ x ∂μ, ‖f x‖ ≤ M) (hp0 : p ≠ 0) (hpr : p ≤ r) (hr : r ≠ ∞) : + (eLpNorm f r μ).toReal ≤ + M ^ (1 - p.toReal / r.toReal) * (eLpNorm f p μ).toReal ^ (p.toReal / r.toReal) := by + have hM' : ∀ᵐ x ∂μ, ‖f x‖ₑ ≤ ENNReal.ofReal M := by + filter_upwards [hM] with x hx + rw [← ofReal_norm]; exact ENNReal.ofReal_le_ofReal hx + have hp : p ≠ ∞ := ne_top_of_le_ne_top hr hpr + have hfp : eLpNorm f p μ ≠ ∞ := + ((memLp_const (p := p) (μ := μ) M).mono' hf hM).eLpNorm_ne_top + have hexp : 0 ≤ 1 - p.toReal / r.toReal := ENNReal.one_sub_toReal_div_nonneg hpr + have h := eLpNorm_le_rpow_mul_eLpNorm_rpow hf hM' hp0 hpr hr + calc (eLpNorm f r μ).toReal + ≤ (ENNReal.ofReal M ^ (1 - p.toReal / r.toReal) * + eLpNorm f p μ ^ (p.toReal / r.toReal)).toReal := + ENNReal.toReal_mono (ENNReal.mul_ne_top (ENNReal.rpow_ne_top_of_nonneg hexp + ENNReal.ofReal_ne_top) (ENNReal.rpow_ne_top_of_nonneg (by positivity) hfp)) h + _ = M ^ (1 - p.toReal / r.toReal) * (eLpNorm f p μ).toReal ^ (p.toReal / r.toReal) := by + rw [ENNReal.toReal_mul, ← ENNReal.toReal_rpow, ← ENNReal.toReal_rpow, + ENNReal.toReal_ofReal hM0] + +end MeasureTheory diff --git a/LeanPool/FunctionSpaces/Analysis/Lp/LayerCake.lean b/LeanPool/FunctionSpaces/Analysis/Lp/LayerCake.lean new file mode 100644 index 0000000000..9664b03123 --- /dev/null +++ b/LeanPool/FunctionSpaces/Analysis/Lp/LayerCake.lean @@ -0,0 +1,238 @@ +/- +Copyright (c) 2026 Mario Ullrich. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Mario Ullrich +-/ +module + +public import Mathlib.Analysis.SpecialFunctions.Pow.Integral +public import Mathlib.Analysis.SpecialFunctions.ImproperIntegrals + +/- +Modified for Lean Pool: module names and imports adapted. +-/ + +/-! +# The layer cake formula in `ℝ≥0∞` and integrals of powers + +For every measure `ν`, every almost everywhere measurable `F : α → [0, ∞]` and `p > 0`, the +**layer cake formula** `∫ F^p dν = p ∫_0^∞ ν{F > t} t^(p-1) dt` holds in `[0, ∞]` +(`MeasureTheory.lintegral_rpow_eq_lintegral_meas_lt_mul_ennreal`). Mathlib's +`lintegral_rpow_eq_lintegral_meas_lt_mul` is the version for real `f ≥ 0`. The truncations +`min(F, N)` reduce the formula to it (`MeasureTheory.lintegral_min_natCast_rpow_eq`, with the +level sets `ENNReal.lt_toReal_min_natCast_iff` and the limit `ENNReal.iSup_min_natCast_rpow`), +and monotone convergence gives the limit `N → ∞`. + +The **integrals of powers** in `[0, ∞]` that the layer cake method uses: + +* `∫_{(0,b)} t^r dt = b^(r+1)/(r+1)` for `b ≥ 0` and `r > -1` + (`MeasureTheory.lintegral_Ioo_rpow`), and `∫_{(0,∞)} t^r dt = ∞` for every `r` + (`MeasureTheory.lintegral_Ioi_rpow_eq_top`); +* for every `a ∈ [0, ∞]`, `∫_0^∞ 1_{t < a} t^r dt = a^(r+1)/(r+1)` for `r > -1` + (`MeasureTheory.lintegral_Ioi_rpow_indicator_lt`) and + `∫_0^∞ 1_{t ≥ a} t^r dt = a^(r+1)/(-(r+1))` for `r < -1` + (`MeasureTheory.lintegral_Ioi_rpow_indicator_ge`); +* `∫_0^∞ 1_{t/2 < a} a b t^(p-2) dt = 2^(p-1)/(p-1) a^p b` for `a, b ∈ [0, ∞]` and `p > 1` + (`MeasureTheory.lintegral_Ioi_indicator_half_lt_mul_rpow`). +-/ + +@[expose] public section + +open MeasureTheory Filter Set +open scoped ENNReal + +/-! ### The layer cake formula for `[0, ∞]`-valued functions -/ + +namespace ENNReal + +/-- The level sets of the truncation `min(a, N)`: for `t > 0`, `t < min(a, N)` exactly when +`t < a` and `t < N`. -/ +theorem lt_toReal_min_natCast_iff {a : ℝ≥0∞} {N : ℕ} {t : ℝ} (ht : 0 < t) : + t < (min a N).toReal ↔ ENNReal.ofReal t < a ∧ t < N := by + have hne : min a (N : ℝ≥0∞) ≠ ∞ := + ne_top_of_le_ne_top (ENNReal.natCast_ne_top N) (min_le_right _ _) + rw [← ENNReal.ofReal_lt_iff_lt_toReal ht.le hne, lt_min_iff, + ENNReal.ofReal_lt_iff_lt_toReal ht.le (ENNReal.natCast_ne_top N), ENNReal.toReal_natCast] + +/-- The truncations `min(a, N)^p` increase to `a^p`. -/ +theorem iSup_min_natCast_rpow (a : ℝ≥0∞) {p : ℝ} (hp : 0 < p) : + ⨆ N : ℕ, min a N ^ p = a ^ p := by + have h1 : ⨆ N : ℕ, min a (N : ℝ≥0∞) = a := by + rw [← inf_iSup_eq, ENNReal.iSup_natCast, inf_top_eq] + have h2 := (ENNReal.orderIsoRpow p hp).map_iSup fun N : ℕ => min a (N : ℝ≥0∞) + simp only [ENNReal.orderIsoRpow_apply, h1] at h2 + exact h2.symm + +end ENNReal + +namespace MeasureTheory + +variable {α : Type*} [MeasurableSpace α] + +/-- The **layer cake formula for the truncation** `min F N`: +`∫ min(F, N)^p dν = p ∫_0^N ν{F > t} t^(p-1) dt`, from Mathlib's real-valued +`lintegral_rpow_eq_lintegral_meas_lt_mul`. -/ +theorem lintegral_min_natCast_rpow_eq (ν : Measure α) {F : α → ℝ≥0∞} (hF : AEMeasurable F ν) + (N : ℕ) {p : ℝ} (hp : 0 < p) : + ∫⁻ x, min (F x) N ^ p ∂ν = ENNReal.ofReal p * + ∫⁻ t in Ioo (0 : ℝ) N, ν {x | ENNReal.ofReal t < F x} * ENNReal.ofReal (t ^ (p - 1)) := by + have hf : AEMeasurable (fun x => (min (F x) N).toReal) ν := + ENNReal.measurable_toReal.comp_aemeasurable (hF.min aemeasurable_const) + have h := lintegral_rpow_eq_lintegral_meas_lt_mul ν (ae_of_all _ fun x => ENNReal.toReal_nonneg) + hf hp + have hL : ∀ x, ENNReal.ofReal ((min (F x) N).toReal ^ p) = min (F x) N ^ p := fun x => by + rw [← ENNReal.ofReal_rpow_of_nonneg ENNReal.toReal_nonneg hp.le, ENNReal.ofReal_toReal + (ne_top_of_le_ne_top (ENNReal.natCast_ne_top N) (min_le_right _ _))] + simp_rw [hL] at h + rw [h] + congr 1 + rw [← Set.Ioi_inter_Iio, Set.inter_comm, ← Measure.restrict_restrict measurableSet_Iio, + ← lintegral_indicator measurableSet_Iio] + refine setLIntegral_congr_fun measurableSet_Ioi fun t ht => ?_ + by_cases htN : t < N + · rw [Set.indicator_of_mem (show t ∈ Iio (N : ℝ) from htN)] + congr 2 + ext x + simp only [mem_ofPred_eq, ENNReal.lt_toReal_min_natCast_iff ht, htN, and_true] + · rw [Set.indicator_of_notMem (show t ∉ Iio (N : ℝ) from htN)] + have : {x | t < (min (F x) N).toReal} = ∅ := by + ext x + simp only [mem_ofPred_eq, ENNReal.lt_toReal_min_natCast_iff ht, htN, and_false, + mem_empty_iff_false] + rw [this, measure_empty, zero_mul] + +/-- The **layer cake formula** for `[0, ∞]`-valued functions: +`∫ F^p dν = p ∫_0^∞ ν{F > t} t^(p-1) dt` for every measure `ν`, every almost everywhere +measurable `F : α → [0, ∞]` and `p > 0`. The truncations `min(F, N)` reduce it to Mathlib's +real-valued `lintegral_rpow_eq_lintegral_meas_lt_mul`, and both sides pass to the limit +`N → ∞` by monotone convergence. -/ +theorem lintegral_rpow_eq_lintegral_meas_lt_mul_ennreal (ν : Measure α) {F : α → ℝ≥0∞} + (hF : AEMeasurable F ν) {p : ℝ} (hp : 0 < p) : + ∫⁻ x, F x ^ p ∂ν = ENNReal.ofReal p * + ∫⁻ t in Ioi (0 : ℝ), ν {x | ENNReal.ofReal t < F x} * ENNReal.ofReal (t ^ (p - 1)) := by + have hL : ∫⁻ x, F x ^ p ∂ν = ⨆ N : ℕ, ∫⁻ x, min (F x) N ^ p ∂ν := by + rw [← lintegral_iSup' (fun N => (hF.min aemeasurable_const).pow_const p) + (ae_of_all _ fun x N M hNM => ENNReal.rpow_le_rpow + (min_le_min_left _ (Nat.cast_le.2 hNM)) hp.le)] + simp_rw [ENNReal.iSup_min_natCast_rpow _ hp] + have hU : Ioi (0 : ℝ) = ⋃ N : ℕ, Ioo (0 : ℝ) N := by + ext t + simp only [mem_Ioi, mem_iUnion, mem_Ioo] + exact ⟨fun ht => ⟨⌈t⌉₊ + 1, ht, (Nat.le_ceil t).trans_lt (by push_cast; linarith)⟩, + fun ⟨_, ht, _⟩ => ht⟩ + have hmono : Monotone fun N : ℕ => Ioo (0 : ℝ) N := fun N M hNM => + Ioo_subset_Ioo_right (Nat.cast_le.2 hNM) + rw [hL, hU, setLIntegral_iUnion_of_directed _ hmono.directed_le, ENNReal.mul_iSup] + simp_rw [lintegral_min_natCast_rpow_eq ν hF _ hp] + +/-! ### Integrals of powers -/ + +/-- `∫_{(0,b)} t^r dt = b^(r+1)/(r+1)` in `[0, ∞]`, for `b ≥ 0` and `r > -1`. -/ +theorem lintegral_Ioo_rpow {r : ℝ} (hr : -1 < r) {b : ℝ} (hb : 0 ≤ b) : + ∫⁻ t in Ioo (0 : ℝ) b, ENNReal.ofReal (t ^ r) = + ENNReal.ofReal b ^ (r + 1) / ENNReal.ofReal (r + 1) := by + have hint : IntegrableOn (fun t : ℝ => t ^ r) (Ioc 0 b) := + (intervalIntegral.intervalIntegrable_rpow' hr).1 + rw [setLIntegral_congr Ioo_ae_eq_Ioc, ← ofReal_integral_eq_lintegral_ofReal hint + (ae_restrict_of_forall_mem measurableSet_Ioc fun t ht => Real.rpow_nonneg ht.1.le r), + ← intervalIntegral.integral_of_le hb, integral_rpow (Or.inl hr), + Real.zero_rpow (by linarith), sub_zero, ENNReal.ofReal_div_of_pos (by linarith), + ENNReal.ofReal_rpow_of_nonneg hb (by linarith)] + +/-- `∫_{(0,∞)} t^r dt = ∞` for every exponent `r`, since `t^r` is not integrable on `(0, ∞)` +(Mathlib's `not_integrableOn_Ioi_rpow`). -/ +theorem lintegral_Ioi_rpow_eq_top (r : ℝ) : + ∫⁻ t in Ioi (0 : ℝ), ENNReal.ofReal (t ^ r) = ∞ := by + by_contra h + exact not_integrableOn_Ioi_rpow r ((lintegral_ofReal_ne_top_iff_integrable + (measurable_id.pow_const r).aestronglyMeasurable + (ae_restrict_of_forall_mem measurableSet_Ioi fun t ht => Real.rpow_nonneg (le_of_lt ht) r)).1 h) + +/-- `∫_0^∞ 1_{t < a} t^r dt = a^(r+1)/(r+1)` for every `a ∈ [0, ∞]` and `r > -1`. -/ +theorem lintegral_Ioi_rpow_indicator_lt {r : ℝ} (hr : -1 < r) (a : ℝ≥0∞) : + ∫⁻ t in Ioi (0 : ℝ), {t | ENNReal.ofReal t < a}.indicator (fun t => ENNReal.ofReal (t ^ r)) t + = a ^ (r + 1) / ENNReal.ofReal (r + 1) := by + have hm : MeasurableSet {t : ℝ | ENNReal.ofReal t < a} := + measurableSet_lt ENNReal.measurable_ofReal measurable_const + rw [lintegral_indicator hm, Measure.restrict_restrict hm] + rcases eq_or_ne a ∞ with rfl | ha + · have hS : {t : ℝ | ENNReal.ofReal t < ∞} ∩ Ioi 0 = Ioi 0 := by + ext t; simp [ENNReal.ofReal_lt_top] + rw [hS, lintegral_Ioi_rpow_eq_top, ENNReal.top_rpow_of_pos (by linarith), + ENNReal.top_div_of_ne_top ENNReal.ofReal_ne_top] + · have hS : {t : ℝ | ENNReal.ofReal t < a} ∩ Ioi 0 = Ioo 0 a.toReal := by + ext t + simp only [mem_inter_iff, mem_ofPred_eq, mem_Ioi, mem_Ioo] + constructor + · rintro ⟨h1, h2⟩ + exact ⟨h2, (ENNReal.ofReal_lt_iff_lt_toReal h2.le ha).1 h1⟩ + · rintro ⟨h1, h2⟩ + exact ⟨(ENNReal.ofReal_lt_iff_lt_toReal h1.le ha).2 h2, h1⟩ + rw [hS, lintegral_Ioo_rpow hr ENNReal.toReal_nonneg, ENNReal.ofReal_toReal ha] + +/-- `∫_0^∞ 1_{t ≥ a} t^r dt = a^(r+1)/(-(r+1))` for every `a ∈ [0, ∞]` and `r < -1`, with +`0^(r+1) = ∞` and `∞^(r+1) = 0`. -/ +theorem lintegral_Ioi_rpow_indicator_ge {r : ℝ} (hr : r < -1) (a : ℝ≥0∞) : + ∫⁻ t in Ioi (0 : ℝ), {t | a ≤ ENNReal.ofReal t}.indicator (fun t => ENNReal.ofReal (t ^ r)) t + = a ^ (r + 1) / ENNReal.ofReal (-(r + 1)) := by + have hm : MeasurableSet {t : ℝ | a ≤ ENNReal.ofReal t} := + measurableSet_le measurable_const ENNReal.measurable_ofReal + rw [lintegral_indicator hm, Measure.restrict_restrict hm] + rcases eq_or_ne a 0 with rfl | ha + · have hS : {t : ℝ | (0 : ℝ≥0∞) ≤ ENNReal.ofReal t} ∩ Ioi 0 = Ioi 0 := by + ext t; simp + rw [hS, lintegral_Ioi_rpow_eq_top, ENNReal.zero_rpow_of_neg (by linarith), + ENNReal.top_div_of_ne_top ENNReal.ofReal_ne_top] + rcases eq_or_ne a ∞ with rfl | hat + · have hS : {t : ℝ | ∞ ≤ ENNReal.ofReal t} ∩ Ioi 0 = ∅ := by + ext t; simp [ENNReal.ofReal_ne_top] + rw [hS, Measure.restrict_empty, lintegral_zero_measure, ENNReal.top_rpow_of_neg (by linarith), + ENNReal.zero_div] + have ha0 : 0 < a.toReal := ENNReal.toReal_pos ha hat + have hS : {t : ℝ | a ≤ ENNReal.ofReal t} ∩ Ioi 0 = Ici a.toReal := by + ext t + simp only [mem_inter_iff, mem_ofPred_eq, mem_Ioi, mem_Ici] + constructor + · rintro ⟨h1, h2⟩ + exact (ENNReal.le_ofReal_iff_toReal_le hat h2.le).1 h1 + · intro h + exact ⟨(ENNReal.le_ofReal_iff_toReal_le hat (ha0.trans_le h).le).2 h, ha0.trans_le h⟩ + have hint : IntegrableOn (fun t : ℝ => t ^ r) (Ioi a.toReal) := integrableOn_Ioi_rpow_of_lt hr ha0 + rw [hS, setLIntegral_congr Ioi_ae_eq_Ici.symm, ← ofReal_integral_eq_lintegral_ofReal hint + (ae_restrict_of_forall_mem measurableSet_Ioi fun t ht => Real.rpow_nonneg (ha0.trans ht).le r), + integral_Ioi_rpow_of_lt hr ha0, neg_div, ← div_neg, ENNReal.ofReal_div_of_pos (by linarith), + ← ENNReal.ofReal_rpow_of_pos ha0, ENNReal.ofReal_toReal hat] + +/-- **A power integral below half a level**: for `a, b ∈ [0, ∞]` and `p > 1`, +`∫_0^∞ 1_{t/2 < a} a b t^(p-2) dt = 2^(p-1)/(p-1) a^p b`, by +`MeasureTheory.lintegral_Ioi_rpow_indicator_lt` at the level `2a`. It is the integral in `t` of +the Tonelli step of the weighted strong type of the maximal function. -/ +theorem lintegral_Ioi_indicator_half_lt_mul_rpow (a b : ℝ≥0∞) {p : ℝ} (hp : 1 < p) : + ∫⁻ t in Ioi (0 : ℝ), {t : ℝ | ENNReal.ofReal t / 2 < a}.indicator (fun _ => a * b) t * + ENNReal.ofReal (t ^ (p - 2)) = + 2 ^ (p - 1) / ENNReal.ofReal (p - 1) * (a ^ p * b) := by + have hpt : ∀ t : ℝ, {t : ℝ | ENNReal.ofReal t / 2 < a}.indicator (fun _ => a * b) t * + ENNReal.ofReal (t ^ (p - 2)) = a * b * + {t : ℝ | ENNReal.ofReal t < 2 * a}.indicator (fun t => ENNReal.ofReal (t ^ (p - 2))) t := + fun t => by + have hiff : ENNReal.ofReal t / 2 < a ↔ ENNReal.ofReal t < 2 * a := by + rw [ENNReal.div_lt_iff (Or.inl two_ne_zero) (Or.inl ENNReal.ofNat_ne_top), mul_comm] + by_cases ht : ENNReal.ofReal t / 2 < a + · rw [Set.indicator_of_mem (show t ∈ {t : ℝ | ENNReal.ofReal t / 2 < a} from ht), + Set.indicator_of_mem (show t ∈ {t : ℝ | ENNReal.ofReal t < 2 * a} from hiff.1 ht)] + · rw [Set.indicator_of_notMem (show t ∉ {t : ℝ | ENNReal.ofReal t / 2 < a} from ht), + Set.indicator_of_notMem (show t ∉ {t : ℝ | ENNReal.ofReal t < 2 * a} from + fun h => ht (hiff.2 h)), zero_mul, mul_zero] + have hm : Measurable fun t : ℝ => + {t : ℝ | ENNReal.ofReal t < 2 * a}.indicator (fun t => ENNReal.ofReal (t ^ (p - 2))) t := + (ENNReal.measurable_ofReal.comp (measurable_id.pow_const _)).indicator + (measurableSet_lt ENNReal.measurable_ofReal measurable_const) + simp_rw [hpt] + rw [lintegral_const_mul _ hm, lintegral_Ioi_rpow_indicator_lt (by linarith), + show p - 2 + 1 = p - 1 by ring, ENNReal.mul_rpow_of_nonneg _ _ (by linarith), + show a ^ p = a ^ ((1 : ℝ) + (p - 1)) by rw [add_sub_cancel], + ENNReal.rpow_add_of_nonneg _ _ zero_le_one (by linarith), ENNReal.rpow_one, + div_eq_mul_inv, div_eq_mul_inv] + ring + +end MeasureTheory diff --git a/LeanPool/FunctionSpaces/Analysis/Lp/LintegralForm.lean b/LeanPool/FunctionSpaces/Analysis/Lp/LintegralForm.lean new file mode 100644 index 0000000000..0635eb80cd --- /dev/null +++ b/LeanPool/FunctionSpaces/Analysis/Lp/LintegralForm.lean @@ -0,0 +1,100 @@ +/- +Copyright (c) 2026 Mario Ullrich. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Mario Ullrich +-/ +module + +public import Mathlib.MeasureTheory.Function.LpSeminorm.Basic + +/- +Modified for Lean Pool: module names and imports adapted. +-/ + +/-! +# `L_p` norms through integrals of powers + +For `0 < p < ∞` the `L_p` norm of `g` is `(∫ ‖g‖^p)^(1/p)`. The function-space files use it in +three forms: as the identity `‖g‖_p^p = ∫ ‖g‖^p` (`MeasureTheory.eLpNorm_rpow_eq`, with the case +`p = 2` in `MeasureTheory.lintegral_enorm_sq_eq_eLpNorm_sq` and the case of `[0, ∞]`-valued `g` in +`MeasureTheory.eLpNorm_rpow_eq_lintegral`), as the bound `‖g‖_p ≤ B` whenever +`∫ ‖g‖^p ≤ B^p` (`MeasureTheory.eLpNorm_le_of_lintegral_le`), and as the comparison +`‖F‖_{L_p(ν)} ≤ C^(1/p) ‖G‖_{L_p(μ)}` whenever `∫ ‖F‖^p dν ≤ C ∫ ‖G‖^p dμ` +(`MeasureTheory.eLpNorm_le_rpow_mul_of_lintegral_enorm_le`, for `[0, ∞]`-valued functions +`MeasureTheory.eLpNorm_le_rpow_mul_of_lintegral_le`). Mathlib states the identity as +`eLpNorm_nnreal_pow_eq_lintegral`, for an exponent in `[0, ∞)`; the lemmas here take the exponent +in `[0, ∞]` with `p ≠ 0`, `p ≠ ∞`, the form in which exponents appear in the function-space files, +and are short consequences of Mathlib's lemma. +-/ + +@[expose] public section + +open scoped ENNReal NNReal + +namespace MeasureTheory + +/-- `L_p` norms through `L_p` integrals: `‖g‖_p^p = ∫ ‖g‖^p` for `0 < p < ∞` and every +almost everywhere strongly measurable `g` with values in a space with an extended norm, such as +`ℂ` or `[0, ∞]`. This is Mathlib's `eLpNorm_nnreal_pow_eq_lintegral`, with the exponent given in +`[0, ∞]` instead of `[0, ∞)`. -/ +theorem eLpNorm_rpow_eq {α : Type*} [MeasurableSpace α] {μ : Measure α} {ε : Type*} + [TopologicalSpace ε] [ContinuousENorm ε] {g : α → ε} (hg : AEStronglyMeasurable g μ) + {p : ℝ≥0∞} (hp0 : p ≠ 0) (hp : p ≠ ∞) : + eLpNorm g p μ ^ p.toReal = ∫⁻ x, ‖g x‖ₑ ^ p.toReal ∂μ := by + lift p to ℝ≥0 using hp + exact eLpNorm_nnreal_pow_eq_lintegral (by exact_mod_cast hp0) hg + +/-- `‖g‖_p^p = ∫ g^p` for `0 < p < ∞` and `g : α → [0, ∞]` measurable: the case `[0, ∞]` of +`MeasureTheory.eLpNorm_rpow_eq`, with `‖g(x)‖ₑ = g(x)`. -/ +theorem eLpNorm_rpow_eq_lintegral {α : Type*} [MeasurableSpace α] {μ : Measure α} {p : ℝ≥0∞} + (hp0 : p ≠ 0) (hp : p ≠ ∞) {g : α → ℝ≥0∞} (hg : AEMeasurable g μ) : + eLpNorm g p μ ^ p.toReal = ∫⁻ x, g x ^ p.toReal ∂μ := by + simpa only [eNorm_eq_self] using eLpNorm_rpow_eq hg.aestronglyMeasurable hp0 hp + +/-- **The `L_p` norm through the integral of the `p`-th power, as an inequality**: for +`0 < p < ∞`, every `B ∈ [0, ∞]` and every almost everywhere strongly measurable `g` with values +in a space with an extended norm, `∫ ‖g‖^p ≤ B^p` gives `‖g‖_p ≤ B`. This is +`MeasureTheory.eLpNorm_rpow_eq` combined with the monotonicity of `t ↦ t^p`. -/ +theorem eLpNorm_le_of_lintegral_le {α : Type*} [MeasurableSpace α] {μ : Measure α} {ε : Type*} + [TopologicalSpace ε] [ContinuousENorm ε] {g : α → ε} + (hg : AEStronglyMeasurable g μ) {p : ℝ≥0∞} (hp0 : p ≠ 0) (hp : p ≠ ∞) {B : ℝ≥0∞} + (h : ∫⁻ x, ‖g x‖ₑ ^ p.toReal ∂μ ≤ B ^ p.toReal) : eLpNorm g p μ ≤ B := by + rw [← ENNReal.rpow_le_rpow_iff (ENNReal.toReal_pos hp0 hp), eLpNorm_rpow_eq hg hp0 hp] + exact h + +/-- `L_2` norms through integrals of squares: `∫ ‖g‖² = ‖g‖_2²` for every almost everywhere +strongly measurable `g` with values in a space with an extended norm. This is Mathlib's +`eLpNorm_nnreal_pow_eq_lintegral` for `p = 2`, with natural-number powers in place of real +powers. -/ +theorem lintegral_enorm_sq_eq_eLpNorm_sq {α : Type*} [MeasurableSpace α] {μ : Measure α} + {ε : Type*} [TopologicalSpace ε] [ContinuousENorm ε] {g : α → ε} + (hg : AEStronglyMeasurable g μ) : ∫⁻ x, ‖g x‖ₑ ^ 2 ∂μ = eLpNorm g 2 μ ^ 2 := by + simpa using (eLpNorm_nnreal_pow_eq_lintegral (p := 2) two_ne_zero hg).symm + +/-- **From integrals of powers to `L_p` norms, for two measure spaces**: if +`∫ ‖F‖^p dν ≤ C ∫ ‖G‖^p dμ` for `0 < p < ∞` and almost everywhere strongly measurable `F`, `G`, +then `‖F‖_{L_p(ν)} ≤ C^(1/p) ‖G‖_{L_p(μ)}`: take `p`-th roots in `MeasureTheory.eLpNorm_rpow_eq`. -/ +theorem eLpNorm_le_rpow_mul_of_lintegral_enorm_le {α α' : Type*} [MeasurableSpace α] + [MeasurableSpace α'] {μ : Measure α} {ν : Measure α'} {ε ε' : Type*} [TopologicalSpace ε] + [ContinuousENorm ε] [TopologicalSpace ε'] [ContinuousENorm ε'] {p : ℝ≥0∞} (hp0 : p ≠ 0) + (hp : p ≠ ∞) {F : α' → ε} {G : α → ε'} (hF : AEStronglyMeasurable F ν) + (hG : AEStronglyMeasurable G μ) {C : ℝ≥0∞} + (h : ∫⁻ x, ‖F x‖ₑ ^ p.toReal ∂ν ≤ C * ∫⁻ x, ‖G x‖ₑ ^ p.toReal ∂μ) : + eLpNorm F p ν ≤ C ^ (1 / p.toReal) * eLpNorm G p μ := by + have hr : 0 < p.toReal := ENNReal.toReal_pos hp0 hp + rw [← ENNReal.rpow_le_rpow_iff hr, ENNReal.mul_rpow_of_nonneg _ _ hr.le, one_div, + ENNReal.rpow_inv_rpow hr.ne', eLpNorm_rpow_eq hF hp0 hp, eLpNorm_rpow_eq hG hp0 hp] + exact h + +/-- **From integrals of powers to `L_p` norms**: if `∫ F^p ≤ C ∫ G^p` for `0 < p < ∞` and +almost everywhere measurable `F, G : α → [0, ∞]`, then `‖F‖_p ≤ C^(1/p) ‖G‖_p`: the case +`[0, ∞]` of `MeasureTheory.eLpNorm_le_rpow_mul_of_lintegral_enorm_le`, with `‖F(x)‖ₑ = F(x)`. -/ +theorem eLpNorm_le_rpow_mul_of_lintegral_le {α : Type*} [MeasurableSpace α] {μ : Measure α} + {p : ℝ≥0∞} (hp0 : p ≠ 0) (hp : p ≠ ∞) {F G : α → ℝ≥0∞} (hF : AEMeasurable F μ) + (hG : AEMeasurable G μ) {C : ℝ≥0∞} + (h : ∫⁻ x, F x ^ p.toReal ∂μ ≤ C * ∫⁻ x, G x ^ p.toReal ∂μ) : + eLpNorm F p μ ≤ C ^ (1 / p.toReal) * eLpNorm G p μ := + eLpNorm_le_rpow_mul_of_lintegral_enorm_le hp0 hp hF.aestronglyMeasurable + hG.aestronglyMeasurable (by simpa only [eNorm_eq_self] using h) + +end MeasureTheory diff --git a/LeanPool/FunctionSpaces/Analysis/Lp/Marcinkiewicz.lean b/LeanPool/FunctionSpaces/Analysis/Lp/Marcinkiewicz.lean new file mode 100644 index 0000000000..2969ec563d --- /dev/null +++ b/LeanPool/FunctionSpaces/Analysis/Lp/Marcinkiewicz.lean @@ -0,0 +1,726 @@ +/- +Copyright (c) 2026 Mario Ullrich. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Mario Ullrich +-/ +module + +public import LeanPool.FunctionSpaces.Analysis.Lp.WeakType +public import LeanPool.FunctionSpaces.Analysis.Lp.LintegralForm +public import LeanPool.FunctionSpaces.Analysis.Lp.MixedNorms +public import LeanPool.FunctionSpaces.Analysis.Lp.LayerCake + +/- +Modified for Lean Pool: module names and imports adapted. +-/ + +/-! +# Marcinkiewicz interpolation between weak type `(1,1)` and strong type `(2,2)` + +For `1 < p < 2`, an operator that is subadditive almost everywhere, of weak type `(1,1)` and of +strong type `(2,2)` has strong type `(p,p)`. The constant for the integrals of `p`-th powers is +`MeasureTheory.marcinkiewiczConst p C₁ C₂ = p (2 C₁/(p - 1) + 4 C₂/(2 - p))`, where `C₁` is the +weak type constant and `C₂` the constant of `∫ (Tf)² ≤ C₂ ∫ f²`. The measure on the input space +is s-finite. + +* **Chebyshev's inequality and level sets**: `μ{F > t} ≤ t^(-r) ∫ F^r` + (`MeasureTheory.measure_lt_le_inv_rpow_mul_lintegral`, the lintegral form of the + distribution bound `MeasureTheory.distribution_le_inv_rpow_mul_eLpNorm_rpow` of + `FunctionSpaces.Analysis.Lp.WeakType`), its forms at half height + (`MeasureTheory.measure_half_lt_le_lintegral_sq`, + `MeasureTheory.measure_half_lt_le_add_setLIntegral_compl`) and the level sets of a function + split into a part controlled in `L_2` and a part controlled in `L_1` off an exceptional set + (`MeasureTheory.measure_lt_le_of_ae_le_add`), the bookkeeping of Calderón–Zygmund arguments, + with `t < a + b ⇒ t/2 < a ∨ t/2 < b` (`ENNReal.half_lt_or_half_lt_of_lt_add`) and `L_2` + membership from `∫ ‖f‖² < ∞` (`MeasureTheory.memLp_two_of_lintegral_enorm_sq_ne_top`). +* **The parts above and below a level** (`MeasureTheory.lintegral_indicator_lt_le`, + `MeasureTheory.lintegral_indicator_compl_rpow_le`): `∫_{F > s} F ≤ s^(1-p) ∫ F^p` and + `∫_{F ≤ s} F^r ≤ s^(r-p) ∫ F^p`. +* **Two Tonelli steps** on s-finite measure spaces + (`MeasureTheory.lintegral_Ioi_lintegral_indicator_lt_mul_rpow`, + `MeasureTheory.lintegral_Ioi_lintegral_indicator_compl_mul_rpow_le`). +* **The layer cake argument** (`MeasureTheory.lintegral_rpow_le_of_forall_le_add`): if at every + level `τ > 0` a function `F` splits as `F ≤ F₁ + F₂` with + `ν{F₁ > τ/2} ≤ C₁ (τ/2)⁻¹ ∫_{G > τ} G` and `∫ F₂² ≤ C₂ ∫_{G ≤ τ} G²`, then + `∫ F^p ≤ marcinkiewiczConst p C₁ C₂ ∫ G^p`. It combines the level estimate + (`MeasureTheory.measure_lt_mul_rpow_le_of_le_add`) with the layer cake formula and the two + Tonelli steps, collected in `MeasureTheory.lintegral_rpow_le_of_measure_lt_mul_rpow_le`. +* **Operators on an abstract input type** (`MeasureTheory.lintegral_rpow_le_of_weak_one_strong_two`, + in `L_p` norms `MeasureTheory.eLpNorm_le_of_weak_one_strong_two`): inputs `x : X` with a size + `G x : α → [0, ∞]` and restrictions `res x S` to measurable sets, such as families of functions + with their pointwise `ℓ_2` norms. +* **In the terms of the Carleson project** + (`MeasureTheory.hasStrongType_of_hasWeakType_one_of_hasStrongType_two`): `HasWeakType T 1 1`, + `HasStrongType T 2 2` and `AESubadditiveOn` with constant `A` give `HasStrongType T p p` with the + constant `MeasureTheory.marcinkiewiczNormConst`. Since strong type `(2,2)` implies weak type + `(2,2)`, the Carleson project's `exists_hasStrongType_real_interpolation` with + `(p₀, q₀) = (1, 1)`, `(p₁, q₁) = (2, 2)` gives strong type `(p,p)` for `A ≥ 1` and positive + finite constants. Here the layer cake argument gives it on s-finite measure spaces for every + `A ≥ 0` and `C₁, C₂ ∈ [0, ∞]`, with the constant + `(p (2 A C₁/(p - 1) + 4 A² C₂²/(2 - p)))^(1/p)`. + +The layer cake formula and the integrals of powers over `(0, ∞)` come from +`FunctionSpaces.Analysis.Lp.LayerCake`. +-/ + +@[expose] public section + +open Set +open scoped ENNReal NNReal + +namespace ENNReal + +/-- `a^r a^(p-r) ≤ a^p` in `[0, ∞]` for `0 < r` and `p < r`, with equality for `0 < a < ∞`; for +`a = ∞` the left side is `∞ · 0 = 0`. -/ +theorem rpow_mul_rpow_sub_le (a : ℝ≥0∞) {p r : ℝ} (hr : 0 < r) (hpr : p < r) : + a ^ r * a ^ (p - r) ≤ a ^ p := by + rcases eq_or_ne a 0 with rfl | h0 + · rw [ENNReal.zero_rpow_of_pos hr, zero_mul] + exact zero_le + rcases eq_or_ne a ∞ with rfl | ht + · rw [ENNReal.top_rpow_of_neg (by linarith : p - r < 0), mul_zero] + exact zero_le + rw [← ENNReal.rpow_add _ _ h0 ht] + exact le_of_eq (by ring_nf) + +/-- `(τ/2)⁻¹ τ^(p-1) = 2 τ^(p-2)` in `[0, ∞]` for `τ > 0`. -/ +theorem inv_half_mul_ofReal_rpow {τ : ℝ} (hτ : 0 < τ) (p : ℝ) : + (ENNReal.ofReal τ / 2)⁻¹ * ENNReal.ofReal (τ ^ (p - 1)) = 2 * ENNReal.ofReal (τ ^ (p - 2)) := by + rw [ENNReal.inv_div (Or.inl ENNReal.ofNat_ne_top) (Or.inl two_ne_zero), div_eq_mul_inv, + mul_assoc, show p - 1 = 1 + (p - 2) by ring, Real.rpow_add hτ, Real.rpow_one, + ENNReal.ofReal_mul hτ.le, ← mul_assoc (ENNReal.ofReal τ)⁻¹, + ENNReal.inv_mul_cancel (ENNReal.ofReal_pos.2 hτ).ne' ENNReal.ofReal_ne_top, one_mul] + +/-- `((τ/2)^r)⁻¹ τ^(p-1) = 2^r τ^(p-1-r)` in `[0, ∞]` for `τ > 0`. -/ +theorem inv_half_rpow_mul_ofReal_rpow {τ : ℝ} (hτ : 0 < τ) (p r : ℝ) : + ((ENNReal.ofReal τ / 2) ^ r)⁻¹ * ENNReal.ofReal (τ ^ (p - 1)) = + 2 ^ r * ENNReal.ofReal (τ ^ (p - 1 - r)) := by + have h2 : ENNReal.ofReal τ / 2 = ENNReal.ofReal (τ / 2) := by + rw [ENNReal.ofReal_div_of_pos two_pos, ENNReal.ofReal_ofNat] + have hreal : ((τ / 2) ^ r)⁻¹ * τ ^ (p - 1) = 2 ^ r * τ ^ (p - 1 - r) := by + rw [Real.div_rpow hτ.le zero_le_two, inv_div, Real.rpow_sub hτ (p - 1) r] + have : 0 < τ ^ r := Real.rpow_pos_of_pos hτ r + field_simp + rw [h2, ENNReal.ofReal_rpow_of_pos (by positivity), ← ENNReal.ofReal_inv_of_pos (by positivity), + ← ENNReal.ofReal_mul (by positivity), hreal, ENNReal.ofReal_mul (by positivity), + ← ENNReal.ofReal_rpow_of_pos two_pos, ENNReal.ofReal_ofNat] + +/-- If `t < a + b` in `[0, ∞]`, then `t/2 < a` or `t/2 < b`: Mathlib's `lt_or_lt_of_add_lt_add` +applied to `t/2 + t/2 = t`. -/ +theorem half_lt_or_half_lt_of_lt_add {t a b : ℝ≥0∞} (h : t < a + b) : t / 2 < a ∨ t / 2 < b := + lt_or_lt_of_add_lt_add (by rwa [ENNReal.add_halves]) + +end ENNReal + +namespace MeasureTheory + +variable {α α' : Type*} [MeasurableSpace α] [MeasurableSpace α'] {μ : Measure α} + {ν : Measure α'} + +/-! ### Chebyshev's inequality and level sets -/ + +section Chebyshev + +variable {t : ℝ≥0∞} + +/-- **Chebyshev's inequality with a power**: for an almost everywhere measurable +`F : α → [0, ∞]`, `r > 0` and `0 < t < ∞`, `μ {F > t} ≤ t^(-r) ∫ F^r`, from Mathlib's +`mul_meas_ge_le_lintegral₀` for `F^r`. This is the lintegral form of +`MeasureTheory.distribution_le_inv_rpow_mul_eLpNorm_rpow`. The bound holds for `t ∈ {0, ∞}` as +well (at `t = ∞` the level set is empty, at `t = 0` the right side is `∞` unless `F = 0` almost +everywhere); the callers use `0 < t < ∞`. -/ +theorem measure_lt_le_inv_rpow_mul_lintegral {F : α → ℝ≥0∞} (hF : AEMeasurable F μ) {r : ℝ} + (hr : 0 < r) (ht0 : t ≠ 0) (ht : t ≠ ∞) : + μ {x | t < F x} ≤ (t ^ r)⁻¹ * ∫⁻ x, F x ^ r ∂μ := by + rw [← ENNReal.mul_le_iff_le_inv (ENNReal.rpow_pos (pos_iff_ne_zero.2 ht0) ht).ne' + (ENNReal.rpow_ne_top_of_nonneg hr.le ht)] + calc t ^ r * μ {x | t < F x} ≤ t ^ r * μ {x | t ^ r ≤ F x ^ r} := + mul_le_mul_right (measure_mono fun x hx => ENNReal.rpow_le_rpow (le_of_lt hx) hr.le) _ + _ ≤ ∫⁻ x, F x ^ r ∂μ := mul_meas_ge_le_lintegral₀ (hF.pow_const r) _ + +/-- **Chebyshev's inequality with squares at half height**: for an almost everywhere measurable +`a : α → [0, ∞]` and `0 < t < ∞`, `μ {a > t/2} ≤ 4 t⁻² ∫ a²` +(`MeasureTheory.measure_lt_le_inv_rpow_mul_lintegral` with `r = 2`). -/ +theorem measure_half_lt_le_lintegral_sq {a : α → ℝ≥0∞} (ha : AEMeasurable a μ) (ht0 : 0 < t) + (ht : t ≠ ∞) : μ {x | t / 2 < a x} ≤ 4 * (t ^ 2)⁻¹ * ∫⁻ x, a x ^ 2 ∂μ := by + have h4 : (t / 2) ^ 2 = 4⁻¹ * t ^ 2 := by + rw [ENNReal.div_eq_inv_mul, mul_pow, ← ENNReal.inv_pow] + norm_num + have h := measure_lt_le_inv_rpow_mul_lintegral ha two_pos (ENNReal.half_pos ht0.ne').ne' + (ENNReal.div_ne_top ht two_ne_zero) + simp_rw [ENNReal.rpow_two] at h + rwa [h4, ENNReal.mul_inv (Or.inl (by norm_num)) (Or.inl (by norm_num)), inv_inv] at h + +/-- **Chebyshev's inequality off a set, at half height**: for an almost everywhere measurable +`b : α → [0, ∞]`, a measurable set `S` and `0 < t < ∞`, +`μ {b > t/2} ≤ μ(S) + 2 t⁻¹ ∫_{Sᶜ} b`. -/ +theorem measure_half_lt_le_add_setLIntegral_compl {b : α → ℝ≥0∞} (hb : AEMeasurable b μ) + {S : Set α} (hS : MeasurableSet S) (ht0 : 0 < t) (ht : t ≠ ∞) : + μ {x | t / 2 < b x} ≤ μ S + 2 * t⁻¹ * ∫⁻ x in Sᶜ, b x ∂μ := by + have hc : t / 2 ≠ 0 := (ENNReal.div_pos ht0.ne' (by norm_num)).ne' + have hc' : t / 2 ≠ ∞ := ENNReal.div_ne_top ht two_ne_zero + calc μ {x | t / 2 < b x} ≤ μ S + μ {x | t / 2 ≤ Sᶜ.indicator b x} := by + refine (measure_mono fun x hx => ?_).trans (measure_union_le _ _) + by_cases hxS : x ∈ S + · exact Or.inl hxS + · exact Or.inr (show t / 2 ≤ Sᶜ.indicator b x by + rw [Set.indicator_of_mem (show x ∈ Sᶜ from hxS)]; exact le_of_lt hx) + _ ≤ μ S + (∫⁻ x, Sᶜ.indicator b x ∂μ) / (t / 2) := + add_le_add le_rfl (meas_ge_le_lintegral_div (hb.indicator hS.compl) hc hc') + _ = μ S + 2 * t⁻¹ * ∫⁻ x in Sᶜ, b x ∂μ := by + rw [lintegral_indicator hS.compl, ENNReal.div_eq_inv_mul, ENNReal.div_eq_inv_mul, + ENNReal.mul_inv (Or.inr ht) (Or.inl (by norm_num)), inv_inv] + +/-- A function with `∫ ‖f‖² < ∞` that is almost everywhere strongly measurable lies in `L_2` +(Mathlib's `eLpNorm_lt_top_iff_lintegral_rpow_eNorm_lt_top`). -/ +theorem memLp_two_of_lintegral_enorm_sq_ne_top {E : Type*} [NormedAddCommGroup E] {f : α → E} + (hf : AEStronglyMeasurable f μ) (h : ∫⁻ x, ‖f x‖ₑ ^ 2 ∂μ ≠ ∞) : MemLp f 2 μ := + memLp_iff.2 ((eLpNorm_lt_top_iff_lintegral_rpow_eNorm_lt_top two_ne_zero ENNReal.ofNat_ne_top + hf).2 (by simpa [ENNReal.rpow_two] using h.lt_top)) + +/-- **The level sets of a split function**: let `u ≤ a + b` almost everywhere, with almost +everywhere measurable `a, b : α → [0, ∞]`, let `S` be measurable and `0 < t < ∞`. If +`∫ a² ≤ A t I`, `μ(S) ≤ D t⁻¹ I` and `∫_{Sᶜ} b ≤ K I`, then `μ {u > t} ≤ (4A + D + 2K) t⁻¹ I`. +This is the bookkeeping of the Calderón–Zygmund argument: `a` is the good part, controlled in +`L_2`, and `b` the bad part, controlled in `L_1` off the exceptional set `S`. -/ +theorem measure_lt_le_of_ae_le_add {u a b : α → ℝ≥0∞} (ha : AEMeasurable a μ) + (hb : AEMeasurable b μ) (hu : ∀ᵐ x ∂μ, u x ≤ a x + b x) {S : Set α} (hS : MeasurableSet S) + (ht0 : 0 < t) (ht : t ≠ ∞) {A D K I : ℝ≥0∞} (haI : ∫⁻ x, a x ^ 2 ∂μ ≤ A * t * I) + (hSI : μ S ≤ D * (t⁻¹ * I)) (hbI : ∫⁻ x in Sᶜ, b x ∂μ ≤ K * I) : + μ {x | t < u x} ≤ (4 * A + D + 2 * K) * t⁻¹ * I := by + have htt : (t ^ 2)⁻¹ * t = t⁻¹ := by + rw [pow_two, ENNReal.mul_inv (Or.inr ht) (Or.inl ht), mul_assoc, + ENNReal.inv_mul_cancel ht0.ne' ht, mul_one] + calc μ {x | t < u x} ≤ μ ({x | t / 2 < a x} ∪ {x | t / 2 < b x}) := + measure_mono_ae (hu.mono fun x hx hxt => + ENNReal.half_lt_or_half_lt_of_lt_add (lt_of_lt_of_le hxt hx)) + _ ≤ μ {x | t / 2 < a x} + μ {x | t / 2 < b x} := measure_union_le _ _ + _ ≤ 4 * (t ^ 2)⁻¹ * (A * t * I) + (μ S + 2 * t⁻¹ * (K * I)) := by + gcongr + · exact (measure_half_lt_le_lintegral_sq ha ht0 ht).trans (by gcongr) + · exact (measure_half_lt_le_add_setLIntegral_compl hb hS ht0 ht).trans (by gcongr) + _ ≤ 4 * (t ^ 2)⁻¹ * (A * t * I) + (D * (t⁻¹ * I) + 2 * t⁻¹ * (K * I)) := by gcongr + _ = (4 * A + D + 2 * K) * t⁻¹ * I := by + rw [show 4 * (t ^ 2)⁻¹ * (A * t * I) = 4 * A * ((t ^ 2)⁻¹ * t) * I by ring, htt] + ring + +end Chebyshev + +/-! ### The parts above and below a level -/ + +/-- **The part above a level**: `∫_{F > s} F ≤ s^(1-p) ∫ F^p` for `p ≥ 1`, `0 < s < ∞` and every +`F : α → [0, ∞]`, since `s^(p-1) F ≤ F^p` where `F > s`. -/ +theorem lintegral_indicator_lt_le {p : ℝ} (hp : 1 ≤ p) {s : ℝ≥0∞} (hs0 : s ≠ 0) (hs : s ≠ ∞) + (F : α → ℝ≥0∞) : + ∫⁻ x, {y | s < F y}.indicator F x ∂μ ≤ (s ^ (p - 1))⁻¹ * ∫⁻ x, F x ^ p ∂μ := by + have hc0 : s ^ (p - 1) ≠ 0 := (ENNReal.rpow_pos (pos_iff_ne_zero.2 hs0) hs).ne' + have hct : s ^ (p - 1) ≠ ∞ := ENNReal.rpow_ne_top_of_nonneg (by linarith) hs + rw [← ENNReal.mul_le_iff_le_inv hc0 hct] + refine (lintegral_const_mul_le _ _).trans (lintegral_mono fun x => ?_) + by_cases hx : s < F x + · rw [Set.indicator_of_mem (show x ∈ {y | s < F y} from hx)] + calc s ^ (p - 1) * F x = F x * s ^ (p - 1) := mul_comm _ _ + _ ≤ F x * F x ^ (p - 1) := mul_le_mul_right (ENNReal.rpow_le_rpow hx.le (by linarith)) _ + _ = F x ^ p := (ENNReal.rpow_eq_mul_rpow_sub_one _ hp).symm + · rw [Set.indicator_of_notMem (show x ∉ {y | s < F y} from hx), mul_zero] + exact zero_le + +/-- **The part below a level**: `∫_{F ≤ s} F^r ≤ s^(r-p) ∫ F^p` for `0 ≤ p ≤ r`, `0 < r`, +`s < ∞` and every `F : α → [0, ∞]`, since `F^r = F^p F^(r-p) ≤ F^p s^(r-p)` where `F ≤ s`. -/ +theorem lintegral_indicator_compl_rpow_le {p r : ℝ} (hp : 0 ≤ p) (hpr : p ≤ r) (hr : 0 < r) + {s : ℝ≥0∞} (hs : s ≠ ∞) (F : α → ℝ≥0∞) : + ∫⁻ x, {y | s < F y}ᶜ.indicator F x ^ r ∂μ ≤ s ^ (r - p) * ∫⁻ x, F x ^ p ∂μ := by + rw [← lintegral_const_mul' _ _ (ENNReal.rpow_ne_top_of_nonneg (by linarith) hs)] + refine lintegral_mono fun x => ?_ + by_cases hx : s < F x + · rw [Set.indicator_of_notMem (show x ∉ {y | s < F y}ᶜ from not_not.2 hx), + ENNReal.zero_rpow_of_pos hr] + exact zero_le + · rw [Set.indicator_of_mem (show x ∈ {y | s < F y}ᶜ from hx)] + calc F x ^ r = F x ^ p * F x ^ (r - p) := by + rw [← ENNReal.rpow_add_of_nonneg _ _ hp (by linarith)] + congr 1 + ring + _ ≤ F x ^ p * s ^ (r - p) := + mul_le_mul_right (ENNReal.rpow_le_rpow (not_lt.1 hx) (by linarith)) _ + _ = s ^ (r - p) * F x ^ p := mul_comm _ _ + +/-- **The part above a level has finite integral**: if `∫ F^p < ∞` for some `p ≥ 1`, then +`∫_{F > s} F < ∞` for every `0 < s < ∞` (`MeasureTheory.lintegral_indicator_lt_le`). -/ +theorem lintegral_indicator_lt_ne_top {p : ℝ} (hp : 1 ≤ p) {s : ℝ≥0∞} (hs0 : s ≠ 0) + (hs : s ≠ ∞) {F : α → ℝ≥0∞} (hF : ∫⁻ x, F x ^ p ∂μ ≠ ∞) : + ∫⁻ x, {y | s < F y}.indicator F x ∂μ ≠ ∞ := + ne_top_of_le_ne_top (ENNReal.mul_ne_top (ENNReal.inv_ne_top.2 + (ENNReal.rpow_pos (pos_iff_ne_zero.2 hs0) hs).ne') hF) (lintegral_indicator_lt_le hp hs0 hs F) + +/-- **The part below a level has finite integral**: if `∫ F^p < ∞` for some `0 ≤ p ≤ r` with +`0 < r`, then `∫_{F ≤ s} F^r < ∞` for every `s < ∞` +(`MeasureTheory.lintegral_indicator_compl_rpow_le`). -/ +theorem lintegral_indicator_compl_rpow_ne_top {p r : ℝ} (hp : 0 ≤ p) (hpr : p ≤ r) (hr : 0 < r) + {s : ℝ≥0∞} (hs : s ≠ ∞) {F : α → ℝ≥0∞} (hF : ∫⁻ x, F x ^ p ∂μ ≠ ∞) : + ∫⁻ x, {y | s < F y}ᶜ.indicator F x ^ r ∂μ ≠ ∞ := + ne_top_of_le_ne_top (ENNReal.mul_ne_top (ENNReal.rpow_ne_top_of_nonneg (by linarith) hs) hF) + (lintegral_indicator_compl_rpow_le hp hpr hr hs F) + +/-! ### Two Tonelli steps -/ + +/-- For a measurable set `S ⊆ ℝ × α` and measurable `F : α → [0, ∞]`, the function +`(τ, x) ↦ 1_{S_τ}(x) F(x)` with the sections `S_τ = {y : (τ, y) ∈ S}` is measurable. -/ +theorem measurable_indicator_section {S : Set (ℝ × α)} (hS : MeasurableSet S) {F : α → ℝ≥0∞} + (hF : Measurable F) : Measurable fun z : ℝ × α => {y | (z.1, y) ∈ S}.indicator F z.2 := by + have h : (fun z : ℝ × α => {y | (z.1, y) ∈ S}.indicator F z.2) = + S.indicator (fun z => F z.2) := by + funext z + by_cases hz : z ∈ S + · rw [Set.indicator_of_mem (show z.2 ∈ {y | (z.1, y) ∈ S} from hz), Set.indicator_of_mem hz] + · rw [Set.indicator_of_notMem (show z.2 ∉ {y | (z.1, y) ∈ S} from hz), + Set.indicator_of_notMem hz] + rw [h] + exact (hF.comp measurable_snd).indicator hS + +/-- The set `{(τ, y) : ofReal τ < F(y)}` is measurable for measurable `F : α → [0, ∞]`. -/ +theorem measurableSet_ofReal_lt {F : α → ℝ≥0∞} (hF : Measurable F) : + MeasurableSet {z : ℝ × α | ENNReal.ofReal z.1 < F z.2} := + measurableSet_lt (ENNReal.measurable_ofReal.comp measurable_fst) (hF.comp measurable_snd) + +/-- **The first Tonelli step**: for every s-finite measure `μ`, measurable `F : α → [0, ∞]` and +`p > 1`, `∫_0^∞ (∫_{F > τ} F dμ) τ^(p-2) dτ = (p - 1)⁻¹ ∫ F^p dμ`, since +`∫_0^F τ^(p-2) dτ = F^(p-1)/(p-1)`. -/ +theorem lintegral_Ioi_lintegral_indicator_lt_mul_rpow [SFinite μ] {F : α → ℝ≥0∞} + (hF : Measurable F) {p : ℝ} (hp : 1 < p) : + ∫⁻ τ in Ioi (0 : ℝ), (∫⁻ x, {y | ENNReal.ofReal τ < F y}.indicator F x ∂μ) * + ENNReal.ofReal (τ ^ (p - 2)) = (ENNReal.ofReal (p - 1))⁻¹ * ∫⁻ x, F x ^ p ∂μ := by + have hJ : AEMeasurable (Function.uncurry fun (τ : ℝ) (x : α) => + {y | ENNReal.ofReal τ < F y}.indicator F x * ENNReal.ofReal (τ ^ (p - 2))) + ((volume.restrict (Ioi (0 : ℝ))).prod μ) := + ((measurable_indicator_section (measurableSet_ofReal_lt hF) hF).mul + (ENNReal.measurable_ofReal.comp (measurable_fst.pow_const _))).aemeasurable + have hpt : ∀ (τ : ℝ) (x : α), {y | ENNReal.ofReal τ < F y}.indicator F x * + ENNReal.ofReal (τ ^ (p - 2)) = + F x * {s : ℝ | ENNReal.ofReal s < F x}.indicator (fun s => ENNReal.ofReal (s ^ (p - 2))) τ := + fun τ x => by + by_cases hτ : ENNReal.ofReal τ < F x + · rw [Set.indicator_of_mem (show x ∈ {y | ENNReal.ofReal τ < F y} from hτ), + Set.indicator_of_mem (show τ ∈ {s : ℝ | ENNReal.ofReal s < F x} from hτ)] + · rw [Set.indicator_of_notMem (show x ∉ {y | ENNReal.ofReal τ < F y} from hτ), + Set.indicator_of_notMem (show τ ∉ {s : ℝ | ENNReal.ofReal s < F x} from hτ), zero_mul, + mul_zero] + have hm : ∀ x, Measurable fun s : ℝ => + {s : ℝ | ENNReal.ofReal s < F x}.indicator (fun s => ENNReal.ofReal (s ^ (p - 2))) s := + fun x => (ENNReal.measurable_ofReal.comp (measurable_id.pow_const _)).indicator + (measurableSet_lt ENNReal.measurable_ofReal measurable_const) + simp_rw [← lintegral_mul_const' _ _ ENNReal.ofReal_ne_top] + rw [lintegral_lintegral_swap hJ, ← lintegral_const_mul' _ _ + (ENNReal.inv_ne_top.2 (ENNReal.ofReal_pos.2 (by linarith)).ne')] + refine lintegral_congr fun x => ?_ + simp_rw [hpt] + rw [lintegral_const_mul _ (hm x), lintegral_Ioi_rpow_indicator_lt (by linarith), + show p - 2 + 1 = p - 1 by ring, div_eq_mul_inv, ← mul_assoc, + ← ENNReal.rpow_eq_mul_rpow_sub_one _ hp.le, mul_comm] + +/-- **The second Tonelli step**: for every s-finite measure `μ`, measurable `F : α → [0, ∞]`, +`0 < r` and `p < r`, `∫_0^∞ (∫_{F ≤ τ} F^r dμ) τ^(p-1-r) dτ ≤ (r - p)⁻¹ ∫ F^p dμ`, since +`∫_F^∞ τ^(p-1-r) dτ = F^(p-r)/(r-p)` and `F^r F^(p-r) ≤ F^p`. -/ +theorem lintegral_Ioi_lintegral_indicator_compl_mul_rpow_le [SFinite μ] {F : α → ℝ≥0∞} + (hF : Measurable F) {p r : ℝ} (hr : 0 < r) (hpr : p < r) : + ∫⁻ τ in Ioi (0 : ℝ), (∫⁻ x, {y | ENNReal.ofReal τ < F y}ᶜ.indicator F x ^ r ∂μ) * + ENNReal.ofReal (τ ^ (p - 1 - r)) ≤ (ENNReal.ofReal (r - p))⁻¹ * ∫⁻ x, F x ^ p ∂μ := by + have hJ : AEMeasurable (Function.uncurry fun (τ : ℝ) (x : α) => + {y | ENNReal.ofReal τ < F y}ᶜ.indicator F x ^ r * ENNReal.ofReal (τ ^ (p - 1 - r))) + ((volume.restrict (Ioi (0 : ℝ))).prod μ) := + (((measurable_indicator_section (measurableSet_ofReal_lt hF).compl hF).pow_const r).mul + (ENNReal.measurable_ofReal.comp (measurable_fst.pow_const _))).aemeasurable + have hpt : ∀ (τ : ℝ) (x : α), {y | ENNReal.ofReal τ < F y}ᶜ.indicator F x ^ r * + ENNReal.ofReal (τ ^ (p - 1 - r)) = F x ^ r * + {s : ℝ | F x ≤ ENNReal.ofReal s}.indicator (fun s => ENNReal.ofReal (s ^ (p - 1 - r))) τ := + fun τ x => by + by_cases hτ : ENNReal.ofReal τ < F x + · rw [Set.indicator_of_notMem (show x ∉ {y | ENNReal.ofReal τ < F y}ᶜ from not_not.2 hτ), + Set.indicator_of_notMem (show τ ∉ {s : ℝ | F x ≤ ENNReal.ofReal s} from not_le.2 hτ), + ENNReal.zero_rpow_of_pos hr, zero_mul, mul_zero] + · rw [Set.indicator_of_mem (show x ∈ {y | ENNReal.ofReal τ < F y}ᶜ from hτ), + Set.indicator_of_mem (show τ ∈ {s : ℝ | F x ≤ ENNReal.ofReal s} from not_lt.1 hτ)] + have hm : ∀ x, Measurable fun s : ℝ => + {s : ℝ | F x ≤ ENNReal.ofReal s}.indicator (fun s => ENNReal.ofReal (s ^ (p - 1 - r))) s := + fun x => (ENNReal.measurable_ofReal.comp (measurable_id.pow_const _)).indicator + (measurableSet_le measurable_const ENNReal.measurable_ofReal) + simp_rw [← lintegral_mul_const' _ _ ENNReal.ofReal_ne_top] + rw [lintegral_lintegral_swap hJ, ← lintegral_const_mul' _ _ + (ENNReal.inv_ne_top.2 (ENNReal.ofReal_pos.2 (by linarith)).ne')] + refine lintegral_mono fun x => ?_ + simp_rw [hpt] + rw [lintegral_const_mul _ (hm x), lintegral_Ioi_rpow_indicator_ge (by linarith), + show p - 1 - r + 1 = p - r by ring, show -(p - r) = r - p by ring, div_eq_mul_inv, + ← mul_assoc, mul_comm _ (ENNReal.ofReal (r - p))⁻¹] + exact mul_le_mul_right (ENNReal.rpow_mul_rpow_sub_le _ hr hpr) _ + +/-! ### The layer cake argument -/ + +/-- **Integrals of powers from bounds at every level**: let `μ` be s-finite, `F : α' → [0, ∞]` +almost everywhere measurable, `G : α → [0, ∞]` measurable, `1 < p < r` and `K₁, K₂ ∈ [0, ∞]`. If +for every `τ > 0` +`ν{F > τ} τ^(p-1) ≤ K₁ τ^(p-2) ∫_{G > τ} G dμ + K₂ τ^(p-1-r) ∫_{G ≤ τ} G^r dμ`, then +`∫ F^p dν ≤ p (K₁/(p - 1) + K₂/(r - p)) ∫ G^p dμ`: the layer cake formula and the two Tonelli +steps. -/ +theorem lintegral_rpow_le_of_measure_lt_mul_rpow_le [SFinite μ] {F : α' → ℝ≥0∞} + {G : α → ℝ≥0∞} (hF : AEMeasurable F ν) (hG : Measurable G) {p r : ℝ} (hp1 : 1 < p) + (hpr : p < r) {K₁ K₂ : ℝ≥0∞} + (h : ∀ τ : ℝ, 0 < τ → ν {x | ENNReal.ofReal τ < F x} * ENNReal.ofReal (τ ^ (p - 1)) ≤ + K₁ * ((∫⁻ x, {y | ENNReal.ofReal τ < G y}.indicator G x ∂μ) * + ENNReal.ofReal (τ ^ (p - 2))) + + K₂ * ((∫⁻ x, {y | ENNReal.ofReal τ < G y}ᶜ.indicator G x ^ r ∂μ) * + ENNReal.ofReal (τ ^ (p - 1 - r)))) : + ∫⁻ x, F x ^ p ∂ν ≤ ENNReal.ofReal p * + (K₁ * (ENNReal.ofReal (p - 1))⁻¹ + K₂ * (ENNReal.ofReal (r - p))⁻¹) * ∫⁻ x, G x ^ p ∂μ := by + have hm1 : Measurable fun τ : ℝ => + (∫⁻ x, {y | ENNReal.ofReal τ < G y}.indicator G x ∂μ) * ENNReal.ofReal (τ ^ (p - 2)) := + (Measurable.lintegral_prod_right' + (measurable_indicator_section (measurableSet_ofReal_lt hG) hG)).mul + (ENNReal.measurable_ofReal.comp (measurable_id.pow_const _)) + have hm2 : Measurable fun τ : ℝ => + (∫⁻ x, {y | ENNReal.ofReal τ < G y}ᶜ.indicator G x ^ r ∂μ) * + ENNReal.ofReal (τ ^ (p - 1 - r)) := + (Measurable.lintegral_prod_right' + ((measurable_indicator_section (measurableSet_ofReal_lt hG).compl hG).pow_const r)).mul + (ENNReal.measurable_ofReal.comp (measurable_id.pow_const _)) + rw [lintegral_rpow_eq_lintegral_meas_lt_mul_ennreal ν hF (by linarith)] + calc ENNReal.ofReal p * ∫⁻ τ in Ioi (0 : ℝ), + ν {x | ENNReal.ofReal τ < F x} * ENNReal.ofReal (τ ^ (p - 1)) + ≤ ENNReal.ofReal p * ∫⁻ τ in Ioi (0 : ℝ), + (K₁ * ((∫⁻ x, {y | ENNReal.ofReal τ < G y}.indicator G x ∂μ) * + ENNReal.ofReal (τ ^ (p - 2))) + + K₂ * ((∫⁻ x, {y | ENNReal.ofReal τ < G y}ᶜ.indicator G x ^ r ∂μ) * + ENNReal.ofReal (τ ^ (p - 1 - r)))) := + mul_le_mul_right (setLIntegral_mono' measurableSet_Ioi fun τ hτ => h τ hτ) _ + _ = ENNReal.ofReal p * (K₁ * ((ENNReal.ofReal (p - 1))⁻¹ * ∫⁻ x, G x ^ p ∂μ) + + K₂ * ∫⁻ τ in Ioi (0 : ℝ), + (∫⁻ x, {y | ENNReal.ofReal τ < G y}ᶜ.indicator G x ^ r ∂μ) * + ENNReal.ofReal (τ ^ (p - 1 - r))) := by + rw [lintegral_add_left (hm1.const_mul _), lintegral_const_mul _ hm1, + lintegral_const_mul _ hm2, lintegral_Ioi_lintegral_indicator_lt_mul_rpow hG hp1] + _ ≤ ENNReal.ofReal p * (K₁ * ((ENNReal.ofReal (p - 1))⁻¹ * ∫⁻ x, G x ^ p ∂μ) + + K₂ * ((ENNReal.ofReal (r - p))⁻¹ * ∫⁻ x, G x ^ p ∂μ)) := by + gcongr + exact lintegral_Ioi_lintegral_indicator_compl_mul_rpow_le hG (by linarith) hpr + _ = _ := by ring + +/-- **The level estimate**: let `τ > 0` and `F ≤ F₁ + F₂` almost everywhere, with `F₂` almost +everywhere measurable. If `ν{F₁ > τ/2} ≤ C₁ (τ/2)⁻¹ I₁` and `∫ F₂² dν ≤ C₂ I₂`, then +`ν{F > τ} τ^(p-1) ≤ 2 C₁ τ^(p-2) I₁ + 4 C₂ τ^(p-3) I₂` for every real `p`: `{F > τ}` lies in +`{F₁ > τ/2} ∪ {F₂ > τ/2}` almost everywhere (`MeasureTheory.distribution_add_le_of_enorm`), and +Chebyshev's inequality bounds the second set. -/ +theorem measure_lt_mul_rpow_le_of_le_add {F F₁ F₂ : α' → ℝ≥0∞} (hF₂ : AEMeasurable F₂ ν) + (hsplit : ∀ᵐ x ∂ν, F x ≤ F₁ x + F₂ x) {τ : ℝ} (hτ : 0 < τ) (p : ℝ) {C₁ C₂ I₁ I₂ : ℝ≥0∞} + (hweak : ν {x | ENNReal.ofReal τ / 2 < F₁ x} ≤ C₁ * (ENNReal.ofReal τ / 2)⁻¹ * I₁) + (hstrong : ∫⁻ x, F₂ x ^ 2 ∂ν ≤ C₂ * I₂) : + ν {x | ENNReal.ofReal τ < F x} * ENNReal.ofReal (τ ^ (p - 1)) ≤ + 2 * C₁ * (I₁ * ENNReal.ofReal (τ ^ (p - 2))) + + 4 * C₂ * (I₂ * ENNReal.ofReal (τ ^ (p - 1 - 2))) := by + have ht0 : ENNReal.ofReal τ / 2 ≠ 0 := (ENNReal.half_pos (ENNReal.ofReal_pos.2 hτ).ne').ne' + have htt : ENNReal.ofReal τ / 2 ≠ ∞ := ENNReal.div_ne_top ENNReal.ofReal_ne_top two_ne_zero + have h2 : ν {x | ENNReal.ofReal τ / 2 < F₂ x} ≤ + ((ENNReal.ofReal τ / 2) ^ (2 : ℝ))⁻¹ * (C₂ * I₂) := + (measure_lt_le_inv_rpow_mul_lintegral hF₂ two_pos ht0 htt).trans + (by gcongr; simpa only [ENNReal.rpow_two] using hstrong) + have hunion : ν {x | ENNReal.ofReal τ < F x} ≤ + ν {x | ENNReal.ofReal τ / 2 < F₁ x} + ν {x | ENNReal.ofReal τ / 2 < F₂ x} := by + have h := distribution_add_le_of_enorm (μ := ν) (c := 1) (t := ENNReal.ofReal τ / 2) + (s := ENNReal.ofReal τ / 2) (f := F) (g₁ := F₁) (g₂ := F₂) + (hsplit.mono fun x hx => by simpa only [eNorm_eq_self, one_mul] using hx) + simpa only [distribution, eNorm_eq_self, one_mul, ENNReal.add_halves] using h + have h4 : (2 : ℝ≥0∞) ^ (2 : ℝ) = 4 := by rw [ENNReal.rpow_two]; norm_num + calc ν {x | ENNReal.ofReal τ < F x} * ENNReal.ofReal (τ ^ (p - 1)) + ≤ (C₁ * (ENNReal.ofReal τ / 2)⁻¹ * I₁ + + ((ENNReal.ofReal τ / 2) ^ (2 : ℝ))⁻¹ * (C₂ * I₂)) * ENNReal.ofReal (τ ^ (p - 1)) := + mul_le_mul_left (hunion.trans (add_le_add hweak h2)) _ + _ = C₁ * I₁ * ((ENNReal.ofReal τ / 2)⁻¹ * ENNReal.ofReal (τ ^ (p - 1))) + + C₂ * I₂ * (((ENNReal.ofReal τ / 2) ^ (2 : ℝ))⁻¹ * ENNReal.ofReal (τ ^ (p - 1))) := by + ring + _ = _ := by + rw [ENNReal.inv_half_mul_ofReal_rpow hτ p, ENNReal.inv_half_rpow_mul_ofReal_rpow hτ p 2, + h4] + ring + +/-- The constant of Marcinkiewicz interpolation between weak type `(1,1)` with constant `C₁` +and the bound `∫ (T f)² ≤ C₂ ∫ f²`, for the integrals of `p`-th powers: +`p (2 C₁/(p - 1) + 4 C₂/(2 - p))` for `1 < p < 2`, the range where it is used. -/ +noncomputable def marcinkiewiczConst (p : ℝ) (C₁ C₂ : ℝ≥0∞) : ℝ≥0∞ := + ENNReal.ofReal p * (2 * C₁ * (ENNReal.ofReal (p - 1))⁻¹ + 4 * C₂ * (ENNReal.ofReal (2 - p))⁻¹) + +/-- `marcinkiewiczConst p C₁ C₂` is finite for `1 < p < 2` and finite `C₁`, `C₂`. -/ +theorem marcinkiewiczConst_ne_top {p : ℝ} (hp1 : 1 < p) (hp2 : p < 2) {C₁ C₂ : ℝ≥0∞} + (hC₁ : C₁ ≠ ∞) (hC₂ : C₂ ≠ ∞) : marcinkiewiczConst p C₁ C₂ ≠ ∞ := by + have h1 : (ENNReal.ofReal (p - 1))⁻¹ ≠ ∞ := + ENNReal.inv_ne_top.2 (ENNReal.ofReal_pos.2 (by linarith)).ne' + have h2 : (ENNReal.ofReal (2 - p))⁻¹ ≠ ∞ := + ENNReal.inv_ne_top.2 (ENNReal.ofReal_pos.2 (by linarith)).ne' + exact ENNReal.mul_ne_top ENNReal.ofReal_ne_top (ENNReal.add_ne_top.2 + ⟨ENNReal.mul_ne_top (ENNReal.mul_ne_top ENNReal.ofNat_ne_top hC₁) h1, + ENNReal.mul_ne_top (ENNReal.mul_ne_top ENNReal.ofNat_ne_top hC₂) h2⟩) + +/-- **The layer cake argument of Marcinkiewicz interpolation**: let `μ` be s-finite, +`F : α' → [0, ∞]` almost everywhere measurable, `G : α → [0, ∞]` measurable and `1 < p < 2`. +Suppose that for every `τ > 0` there are `F₁ τ`, `F₂ τ` with `F ≤ F₁ τ + F₂ τ` almost +everywhere, `F₂ τ` almost everywhere measurable, +`ν{F₁ τ > τ/2} ≤ C₁ (τ/2)⁻¹ ∫_{G > τ} G dμ` and `∫ (F₂ τ)² dν ≤ C₂ ∫_{G ≤ τ} G² dμ`. Then +`∫ F^p dν ≤ marcinkiewiczConst p C₁ C₂ ∫ G^p dμ`. -/ +theorem lintegral_rpow_le_of_forall_le_add [SFinite μ] {F : α' → ℝ≥0∞} {G : α → ℝ≥0∞} + (F₁ F₂ : ℝ → α' → ℝ≥0∞) (hF : AEMeasurable F ν) (hG : Measurable G) + (hF₂ : ∀ τ : ℝ, 0 < τ → AEMeasurable (F₂ τ) ν) + (hsplit : ∀ τ : ℝ, 0 < τ → ∀ᵐ x ∂ν, F x ≤ F₁ τ x + F₂ τ x) {C₁ C₂ : ℝ≥0∞} + (hweak : ∀ τ : ℝ, 0 < τ → ν {x | ENNReal.ofReal τ / 2 < F₁ τ x} ≤ + C₁ * (ENNReal.ofReal τ / 2)⁻¹ * ∫⁻ x, {y | ENNReal.ofReal τ < G y}.indicator G x ∂μ) + (hstrong : ∀ τ : ℝ, 0 < τ → ∫⁻ x, F₂ τ x ^ 2 ∂ν ≤ + C₂ * ∫⁻ x, {y | ENNReal.ofReal τ < G y}ᶜ.indicator G x ^ 2 ∂μ) + {p : ℝ} (hp1 : 1 < p) (hp2 : p < 2) : + ∫⁻ x, F x ^ p ∂ν ≤ marcinkiewiczConst p C₁ C₂ * ∫⁻ x, G x ^ p ∂μ := + lintegral_rpow_le_of_measure_lt_mul_rpow_le (r := 2) hF hG hp1 hp2 fun τ hτ => by + simp only [ENNReal.rpow_two] + exact measure_lt_mul_rpow_le_of_le_add (hF₂ τ hτ) (hsplit τ hτ) hτ p (hweak τ hτ) + (hstrong τ hτ) + +/-! ### Operators on an abstract input type -/ + +/-- **Marcinkiewicz interpolation for operators on an abstract input type**: let `μ` be +s-finite and `1 < p < 2`. Every input `x : X` has a measurable size `G x : α → [0, ∞]` and an +almost everywhere measurable output `T x : α' → [0, ∞]`, and `res x S` restricts `x` to a +measurable set `S`, with size `1_S G x`. Suppose that `T x ≤ T (res x S) + T (res x Sᶜ)` almost +everywhere when `∫ (G x)^p < ∞`, that `ν{T x > t} ≤ C₁ t⁻¹ ∫ G x` for `0 < t < ∞` when +`∫ G x < ∞` (weak type `(1,1)`), and that `∫ (T x)² ≤ C₂ ∫ (G x)²` when `∫ (G x)² < ∞` +(strong type `(2,2)`). Then `∫ (T x)^p ≤ marcinkiewiczConst p C₁ C₂ ∫ (G x)^p` for every `x` +with `∫ (G x)^p < ∞`. At the level `τ` the input is split along `{G x > τ}`. -/ +theorem lintegral_rpow_le_of_weak_one_strong_two [SFinite μ] {X : Type*} (G : X → α → ℝ≥0∞) + (T : X → α' → ℝ≥0∞) (res : X → Set α → X) {p : ℝ} {C₁ C₂ : ℝ≥0∞} + (hG : ∀ x, Measurable (G x)) (hT : ∀ x, AEMeasurable (T x) ν) + (hres : ∀ x S, MeasurableSet S → G (res x S) = S.indicator (G x)) + (hsub : ∀ x S, MeasurableSet S → ∫⁻ a, G x a ^ p ∂μ ≠ ∞ → + ∀ᵐ a ∂ν, T x a ≤ T (res x S) a + T (res x Sᶜ) a) + (hweak : ∀ x, ∫⁻ a, G x a ∂μ ≠ ∞ → ∀ t, 0 < t → t ≠ ∞ → + ν {a | t < T x a} ≤ C₁ * t⁻¹ * ∫⁻ a, G x a ∂μ) + (hstrong : ∀ x, ∫⁻ a, G x a ^ 2 ∂μ ≠ ∞ → ∫⁻ a, T x a ^ 2 ∂ν ≤ C₂ * ∫⁻ a, G x a ^ 2 ∂μ) + (hp1 : 1 < p) (hp2 : p < 2) (x : X) (hx : ∫⁻ a, G x a ^ p ∂μ ≠ ∞) : + ∫⁻ a, T x a ^ p ∂ν ≤ marcinkiewiczConst p C₁ C₂ * ∫⁻ a, G x a ^ p ∂μ := by + have hS : ∀ τ : ℝ, MeasurableSet {y | ENNReal.ofReal τ < G x y} := fun τ => + measurableSet_lt measurable_const (hG x) + refine lintegral_rpow_le_of_forall_le_add (fun τ => T (res x {y | ENNReal.ofReal τ < G x y})) + (fun τ => T (res x {y | ENNReal.ofReal τ < G x y}ᶜ)) (hT x) (hG x) (fun τ _ => hT _) + (fun τ _ => hsub x _ (hS τ) hx) (fun τ hτ => ?_) (fun τ hτ => ?_) hp1 hp2 + · have hτ0 : ENNReal.ofReal τ ≠ 0 := (ENNReal.ofReal_pos.2 hτ).ne' + have hfin : ∫⁻ a, G (res x {y | ENNReal.ofReal τ < G x y}) a ∂μ ≠ ∞ := by + rw [hres x _ (hS τ)] + exact lintegral_indicator_lt_ne_top hp1.le hτ0 ENNReal.ofReal_ne_top hx + have h := hweak _ hfin (ENNReal.ofReal τ / 2) (ENNReal.half_pos hτ0) + (ENNReal.div_ne_top ENNReal.ofReal_ne_top two_ne_zero) + rwa [hres x _ (hS τ)] at h + · have hfin : ∫⁻ a, G (res x {y | ENNReal.ofReal τ < G x y}ᶜ) a ^ 2 ∂μ ≠ ∞ := by + rw [hres x _ (hS τ).compl] + simpa only [ENNReal.rpow_two] using lintegral_indicator_compl_rpow_ne_top (r := 2) + (by linarith) hp2.le two_pos ENNReal.ofReal_ne_top hx + have h := hstrong _ hfin + rwa [hres x _ (hS τ).compl] at h + +/-- **Marcinkiewicz interpolation for operators on an abstract input type, in `L_p` norms**: +under the hypotheses of `MeasureTheory.lintegral_rpow_le_of_weak_one_strong_two` with +`p ∈ (1, 2)` in `[0, ∞]`, `‖T x‖_p ≤ (marcinkiewiczConst p C₁ C₂)^(1/p) ‖G x‖_p` for every `x` +with `‖G x‖_p < ∞`. -/ +theorem eLpNorm_le_of_weak_one_strong_two [SFinite μ] {X : Type*} (G : X → α → ℝ≥0∞) + (T : X → α' → ℝ≥0∞) (res : X → Set α → X) {p : ℝ≥0∞} {C₁ C₂ : ℝ≥0∞} + (hG : ∀ x, Measurable (G x)) (hT : ∀ x, AEMeasurable (T x) ν) + (hres : ∀ x S, MeasurableSet S → G (res x S) = S.indicator (G x)) + (hsub : ∀ x S, MeasurableSet S → ∫⁻ a, G x a ^ p.toReal ∂μ ≠ ∞ → + ∀ᵐ a ∂ν, T x a ≤ T (res x S) a + T (res x Sᶜ) a) + (hweak : ∀ x, ∫⁻ a, G x a ∂μ ≠ ∞ → ∀ t, 0 < t → t ≠ ∞ → + ν {a | t < T x a} ≤ C₁ * t⁻¹ * ∫⁻ a, G x a ∂μ) + (hstrong : ∀ x, ∫⁻ a, G x a ^ 2 ∂μ ≠ ∞ → ∫⁻ a, T x a ^ 2 ∂ν ≤ C₂ * ∫⁻ a, G x a ^ 2 ∂μ) + (hp1 : 1 < p) (hp2 : p < 2) (x : X) (hx : eLpNorm (G x) p μ ≠ ∞) : + eLpNorm (T x) p ν ≤ marcinkiewiczConst p.toReal C₁ C₂ ^ (1 / p.toReal) * eLpNorm (G x) p μ := by + have hp : p ≠ ∞ := ne_top_of_lt hp2 + have hp0 : p ≠ 0 := (zero_lt_one.trans hp1).ne' + refine eLpNorm_le_rpow_mul_of_lintegral_enorm_le hp0 hp (hT x).aestronglyMeasurable + (hG x).aestronglyMeasurable ?_ + simp only [eNorm_eq_self] + refine lintegral_rpow_le_of_weak_one_strong_two G T res hG hT hres hsub hweak hstrong + (ENNReal.one_lt_toReal hp1 hp) (ENNReal.toReal_lt_of_lt_ofReal (by rwa [ENNReal.ofReal_ofNat])) + x ?_ + rw [← eLpNorm_rpow_eq_lintegral hp0 hp (hG x).aemeasurable] + exact ENNReal.rpow_ne_top_of_nonneg ENNReal.toReal_nonneg hx + +/-! ### Operators in the terms of the Carleson project -/ + +/-- **Level sets of a multiple from the weak `L_1` norm**: for `g : α' → ε`, `A ≥ 0` and +`0 < t < ∞`, `ν{A ‖g‖ > t} ≤ A t⁻¹ ‖g‖_{1,∞}`. -/ +theorem measure_lt_mul_enorm_le_wnorm_one {ε : Type*} [ENorm ε] (g : α' → ε) (A : ℝ≥0) + {t : ℝ≥0∞} (ht0 : t ≠ 0) (ht : t ≠ ∞) : + ν {x | t < A * ‖g x‖ₑ} ≤ A * t⁻¹ * wnorm g 1 ν := by + rcases eq_or_ne A 0 with rfl | hA + · have : {x | t < ((0 : ℝ≥0) : ℝ≥0∞) * ‖g x‖ₑ} = ∅ := by + ext x + simp + rw [this, measure_empty] + exact zero_le + have hA0 : (A : ℝ≥0∞) ≠ 0 := ENNReal.coe_ne_zero.2 hA + have hset : {x | t < A * ‖g x‖ₑ} = {x | t / A < ‖g x‖ₑ} := by + ext x + simp only [Set.mem_ofPred_eq] + rw [ENNReal.div_lt_iff (Or.inl hA0) (Or.inl ENNReal.coe_ne_top), mul_comm] + have hs0 : t / A ≠ 0 := (ENNReal.div_pos_iff.2 ⟨ht0, ENNReal.coe_ne_top⟩).ne' + have hst : t / A ≠ ∞ := ENNReal.div_ne_top ht hA0 + have h := mul_distribution_le_wnorm_one (μ := ν) g (t / A) + rw [ENNReal.mul_le_iff_le_inv hs0 hst, ENNReal.inv_div (Or.inl ENNReal.coe_ne_top) (Or.inl hA0), + div_eq_mul_inv] at h + rw [hset] + exact h + +/-- **Squares of a multiple from the strong type `(2,2)`**: if `T` has strong type `(2,2)` with +constant `C₂`, then `∫ (A ‖T g‖)² dν ≤ A² C₂² ∫ ‖g‖² dμ` for every `g ∈ L_2(μ)` and `A ≥ 0`. -/ +theorem lintegral_mul_enorm_sq_le_of_hasStrongType {ε₁ ε₂ : Type*} [TopologicalSpace ε₁] + [ContinuousENorm ε₁] [TopologicalSpace ε₂] [ContinuousENorm ε₂] {T : (α → ε₁) → (α' → ε₂)} + {C₂ : ℝ≥0∞} (h₂ : HasStrongType T 2 2 μ ν C₂) (A : ℝ≥0) {g : α → ε₁} (hg : MemLp g 2 μ) : + ∫⁻ x, ((A : ℝ≥0∞) * ‖T g x‖ₑ) ^ 2 ∂ν ≤ A ^ 2 * C₂ ^ 2 * ∫⁻ x, ‖g x‖ₑ ^ 2 ∂μ := by + obtain ⟨hm, hle⟩ := h₂ g hg + simp_rw [mul_pow] + rw [lintegral_const_mul' _ _ (ENNReal.pow_ne_top ENNReal.coe_ne_top), + lintegral_enorm_sq_eq_eLpNorm_sq hm, lintegral_enorm_sq_eq_eLpNorm_sq hg.aestronglyMeasurable] + calc (A : ℝ≥0∞) ^ 2 * eLpNorm (T g) 2 ν ^ 2 ≤ (A : ℝ≥0∞) ^ 2 * (C₂ * eLpNorm g 2 μ) ^ 2 := by + gcongr + _ = _ := by ring + +/-- Restricting a function and its extended norm to a set: if `‖f‖ = G` almost everywhere, +then `‖1_S f‖ = 1_S G` almost everywhere, for every set `S`. -/ +theorem ae_enorm_indicator_eq {ε₁ : Type*} [TopologicalSpace ε₁] [ESeminormedAddMonoid ε₁] + {f : α → ε₁} {G : α → ℝ≥0∞} (hfG : ∀ᵐ x ∂μ, ‖f x‖ₑ = G x) (S : Set α) : + ∀ᵐ x ∂μ, ‖S.indicator f x‖ₑ = S.indicator G x := + hfG.mono fun x hx => by + rw [eNorm_indicator_eq_indicator_eNorm] + by_cases h : x ∈ S + · rw [Set.indicator_of_mem h, Set.indicator_of_mem h, hx] + · rw [Set.indicator_of_notMem h, Set.indicator_of_notMem h] + +/-- Integrals of powers of a restricted function: if `‖f‖ = G` almost everywhere, then +`∫ ‖1_S f‖^r = ∫ (1_S G)^r` for every set `S` and every real `r`. -/ +theorem lintegral_enorm_indicator_rpow_eq {ε₁ : Type*} [TopologicalSpace ε₁] + [ESeminormedAddMonoid ε₁] {f : α → ε₁} {G : α → ℝ≥0∞} (hfG : ∀ᵐ x ∂μ, ‖f x‖ₑ = G x) + (S : Set α) (r : ℝ) : ∫⁻ x, ‖S.indicator f x‖ₑ ^ r ∂μ = ∫⁻ x, S.indicator G x ^ r ∂μ := + lintegral_congr_ae ((ae_enorm_indicator_eq hfG S).mono fun x hx => by simp only [hx]) + +/-- **The part above a level lies in `L_1`**: for almost everywhere strongly measurable `f` with +`‖f‖ = G` almost everywhere, where `G` is measurable with `∫ G^p < ∞` for some `p ≥ 1`, +`1_{G > τ} f ∈ L_1` for every `τ > 0`, since `∫_{G > τ} G ≤ τ^(1-p) ∫ G^p`. -/ +theorem memLp_one_indicator_lt {ε₁ : Type*} [TopologicalSpace ε₁] [ESeminormedAddMonoid ε₁] + {f : α → ε₁} {G : α → ℝ≥0∞} (hf : AEStronglyMeasurable f μ) + (hfG : ∀ᵐ x ∂μ, ‖f x‖ₑ = G x) (hG : Measurable G) {p : ℝ} (hp : 1 ≤ p) + (hGp : ∫⁻ x, G x ^ p ∂μ ≠ ∞) {τ : ℝ} (hτ : 0 < τ) : + MemLp ({y | ENNReal.ofReal τ < G y}.indicator f) 1 μ := by + have hm := hf.indicator (measurableSet_lt (measurable_const (a := ENNReal.ofReal τ)) hG) + rw [MemLp, eLpNorm_one_eq_lintegral_eNorm hm, lintegral_congr_ae (ae_enorm_indicator_eq hfG _)] + exact (lintegral_indicator_lt_ne_top hp (ENNReal.ofReal_pos.2 hτ).ne' ENNReal.ofReal_ne_top + hGp).lt_top + +/-- **The part below a level lies in `L_2`**: for almost everywhere strongly measurable `f` with +`‖f‖ = G` almost everywhere, where `G` is measurable with `∫ G^p < ∞` for some `0 ≤ p ≤ 2`, +`1_{G ≤ τ} f ∈ L_2` for every real `τ`, since `∫_{G ≤ τ} G² ≤ τ^(2-p) ∫ G^p`. -/ +theorem memLp_two_indicator_compl {ε₁ : Type*} [TopologicalSpace ε₁] [ESeminormedAddMonoid ε₁] + {f : α → ε₁} {G : α → ℝ≥0∞} (hf : AEStronglyMeasurable f μ) + (hfG : ∀ᵐ x ∂μ, ‖f x‖ₑ = G x) (hG : Measurable G) {p : ℝ} (hp0 : 0 ≤ p) (hp2 : p ≤ 2) + (hGp : ∫⁻ x, G x ^ p ∂μ ≠ ∞) (τ : ℝ) : + MemLp ({y | ENNReal.ofReal τ < G y}ᶜ.indicator f) 2 μ := by + have hm := hf.indicator (measurableSet_lt (measurable_const (a := ENNReal.ofReal τ)) hG).compl + refine (eLpNorm_lt_top_iff_lintegral_rpow_eNorm_lt_top two_ne_zero ENNReal.ofNat_ne_top hm).2 ?_ + rw [ENNReal.toReal_ofNat, + lintegral_enorm_indicator_rpow_eq hfG {y | ENNReal.ofReal τ < G y}ᶜ 2] + exact (lintegral_indicator_compl_rpow_ne_top hp0 hp2 two_pos ENNReal.ofReal_ne_top hGp).lt_top + +/-- The constant of Marcinkiewicz interpolation in `L_p` norms, for an operator of weak type +`(1,1)` with constant `C₁`, of strong type `(2,2)` with constant `C₂` and subadditive with +constant `A`: `(marcinkiewiczConst p (A C₁) (A² C₂²))^(1/p)` for `1 < p < 2`, the range where it +is used. -/ +noncomputable def marcinkiewiczNormConst (p A C₁ C₂ : ℝ≥0∞) : ℝ≥0∞ := + marcinkiewiczConst p.toReal (A * C₁) (A ^ 2 * C₂ ^ 2) ^ (1 / p.toReal) + +/-- `marcinkiewiczNormConst p A C₁ C₂` is finite for `1 < p < 2` and finite `A`, `C₁`, `C₂`. -/ +theorem marcinkiewiczNormConst_ne_top {p A C₁ C₂ : ℝ≥0∞} (hp1 : 1 < p) (hp2 : p < 2) + (hA : A ≠ ∞) (hC₁ : C₁ ≠ ∞) (hC₂ : C₂ ≠ ∞) : marcinkiewiczNormConst p A C₁ C₂ ≠ ∞ := + ENNReal.rpow_ne_top_of_nonneg (by positivity) (marcinkiewiczConst_ne_top + (ENNReal.one_lt_toReal hp1 (ne_top_of_lt hp2)) + (ENNReal.toReal_lt_of_lt_ofReal (by rwa [ENNReal.ofReal_ofNat])) (ENNReal.mul_ne_top hA hC₁) + (ENNReal.mul_ne_top (ENNReal.pow_ne_top hA) (ENNReal.pow_ne_top hC₂))) + +/-- **Marcinkiewicz interpolation in integral form, in the terms of the Carleson project**: let +`μ` be s-finite, `1 < p < 2`, and let `T` be almost everywhere subadditive with constant `A` on +`L_1(μ) ∪ L_2(μ)`, of weak type `(1,1)` with constant `C₁` and of strong type `(2,2)` with +constant `C₂`. Then `∫ ‖T f‖^p dν ≤ marcinkiewiczConst p (A C₁) (A² C₂²) ∫ ‖f‖^p dμ` for every +almost everywhere strongly measurable `f` with `∫ ‖f‖^p < ∞` and almost everywhere strongly +measurable `T f`. At the level `τ`, `f` splits into `1_{‖f‖ > τ} f ∈ L_1` and +`1_{‖f‖ ≤ τ} f ∈ L_2`. -/ +theorem lintegral_enorm_rpow_le_of_hasWeakType_of_hasStrongType [SFinite μ] + {ε₁ ε₂ : Type*} [TopologicalSpace ε₁] [ESeminormedAddMonoid ε₁] [TopologicalSpace ε₂] + [ContinuousENorm ε₂] {T : (α → ε₁) → (α' → ε₂)} {A : ℝ≥0} {C₁ C₂ : ℝ≥0∞} {p : ℝ} + (hp1 : 1 < p) (hp2 : p < 2) (hT : AESubadditiveOn T (fun f => MemLp f 1 μ ∨ MemLp f 2 μ) A ν) + (h₁ : HasWeakType T 1 1 μ ν C₁) (h₂ : HasStrongType T 2 2 μ ν C₂) {f : α → ε₁} + (hf : AEStronglyMeasurable f μ) (hfp : ∫⁻ x, ‖f x‖ₑ ^ p ∂μ ≠ ∞) + (hTf : AEStronglyMeasurable (T f) ν) : + ∫⁻ x, ‖T f x‖ₑ ^ p ∂ν ≤ + marcinkiewiczConst p (A * C₁) (A ^ 2 * C₂ ^ 2) * ∫⁻ x, ‖f x‖ₑ ^ p ∂μ := by + obtain ⟨G, hG, hfG⟩ := hf.eNorm + have hGf : ∫⁻ x, ‖f x‖ₑ ^ p ∂μ = ∫⁻ x, G x ^ p ∂μ := + lintegral_congr_ae (hfG.mono fun x (hx : ‖f x‖ₑ = G x) => by simp only [hx]) + rw [hGf] at hfp ⊢ + have h1 : ∀ τ : ℝ, 0 < τ → MemLp ({y | ENNReal.ofReal τ < G y}.indicator f) 1 μ := fun τ hτ => + memLp_one_indicator_lt hf hfG hG hp1.le hfp hτ + have h2 : ∀ τ : ℝ, MemLp ({y | ENNReal.ofReal τ < G y}ᶜ.indicator f) 2 μ := fun τ => + memLp_two_indicator_compl hf hfG hG (by linarith) hp2.le hfp τ + refine lintegral_rpow_le_of_forall_le_add + (fun τ x => A * ‖T ({y | ENNReal.ofReal τ < G y}.indicator f) x‖ₑ) + (fun τ x => A * ‖T ({y | ENNReal.ofReal τ < G y}ᶜ.indicator f) x‖ₑ) hTf.eNorm hG + (fun τ _ => ((h₂ _ (h2 τ)).1.eNorm.const_mul _)) (fun τ hτ => ?_) (fun τ hτ => ?_) + (fun τ _ => ?_) hp1 hp2 + · filter_upwards [hT _ _ (Or.inl (h1 τ hτ)) (Or.inr (h2 τ))] with x hx + rw [Set.indicator_self_add_compl, mul_add] at hx + exact hx + · have ht0 : ENNReal.ofReal τ / 2 ≠ 0 := (ENNReal.half_pos (ENNReal.ofReal_pos.2 hτ).ne').ne' + have hm := (h1 τ hτ).aestronglyMeasurable + refine (measure_lt_mul_enorm_le_wnorm_one _ A ht0 + (ENNReal.div_ne_top ENNReal.ofReal_ne_top two_ne_zero)).trans ?_ + rw [← lintegral_congr_ae (ae_enorm_indicator_eq hfG _), ← eLpNorm_one_eq_lintegral_eNorm hm] + calc (A : ℝ≥0∞) * (ENNReal.ofReal τ / 2)⁻¹ * + wnorm (T ({y | ENNReal.ofReal τ < G y}.indicator f)) 1 ν + ≤ A * (ENNReal.ofReal τ / 2)⁻¹ * + (C₁ * eLpNorm ({y | ENNReal.ofReal τ < G y}.indicator f) 1 μ) := by + gcongr + exact (h₁ _ (h1 τ hτ)).2 + _ = _ := by ring + · refine (lintegral_mul_enorm_sq_le_of_hasStrongType h₂ A (h2 τ)).trans (le_of_eq ?_) + have he := lintegral_enorm_indicator_rpow_eq hfG {y | ENNReal.ofReal τ < G y}ᶜ 2 + simp only [ENNReal.rpow_two] at he + rw [he] + +/-- **Marcinkiewicz interpolation between weak type `(1,1)` and strong type `(2,2)`, in the terms +of the Carleson project**: let `μ` be s-finite, `1 < p < 2`, and let `T` map functions in +`L_p(μ)` to almost everywhere strongly measurable functions, be almost everywhere subadditive +with constant `A` on `L_1(μ) ∪ L_2(μ)`, of weak type `(1,1)` with constant `C₁` and of strong +type `(2,2)` with constant `C₂`. Then `T` has strong type `(p, p)` with constant +`marcinkiewiczNormConst p A C₁ C₂ = (p (2 A C₁/(p - 1) + 4 A² C₂²/(2 - p)))^(1/p)`. Since strong +type `(2,2)` implies weak type `(2,2)` (`MeasureTheory.HasStrongType.hasWeakType`), the Carleson +project's `exists_hasStrongType_real_interpolation` with `(p₀, q₀) = (1, 1)`, +`(p₁, q₁) = (2, 2)` gives strong type `(p,p)` for `A ≥ 1` and positive finite constants; here +the layer cake argument gives it on s-finite measure spaces for every `A ≥ 0` and +`C₁, C₂ ∈ [0, ∞]`, with this constant. -/ +theorem hasStrongType_of_hasWeakType_one_of_hasStrongType_two [SFinite μ] {ε₁ ε₂ : Type*} + [TopologicalSpace ε₁] [ESeminormedAddMonoid ε₁] [TopologicalSpace ε₂] [ContinuousENorm ε₂] + {T : (α → ε₁) → (α' → ε₂)} {p : ℝ≥0∞} {A : ℝ≥0} {C₁ C₂ : ℝ≥0∞} (hp1 : 1 < p) + (hp2 : p < 2) (hmT : ∀ f, MemLp f p μ → AEStronglyMeasurable (T f) ν) + (hT : AESubadditiveOn T (fun f => MemLp f 1 μ ∨ MemLp f 2 μ) A ν) + (h₁ : HasWeakType T 1 1 μ ν C₁) (h₂ : HasStrongType T 2 2 μ ν C₂) : + HasStrongType T p p μ ν (marcinkiewiczNormConst p A C₁ C₂) := by + intro f hf + have hp : p ≠ ∞ := ne_top_of_lt hp2 + have hp0 : p ≠ 0 := (zero_lt_one.trans hp1).ne' + have hTf := hmT f hf + refine ⟨hTf, ?_⟩ + refine eLpNorm_le_rpow_mul_of_lintegral_enorm_le hp0 hp hTf hf.aestronglyMeasurable ?_ + exact lintegral_enorm_rpow_le_of_hasWeakType_of_hasStrongType + (ENNReal.one_lt_toReal hp1 hp) (ENNReal.toReal_lt_of_lt_ofReal (by rwa [ENNReal.ofReal_ofNat])) + hT h₁ h₂ hf.aestronglyMeasurable + ((eLpNorm_lt_top_iff_lintegral_rpow_eNorm_lt_top hp0 hp hf.aestronglyMeasurable).1 hf).ne hTf + +end MeasureTheory diff --git a/LeanPool/FunctionSpaces/Analysis/Lp/MixedNorms.lean b/LeanPool/FunctionSpaces/Analysis/Lp/MixedNorms.lean new file mode 100644 index 0000000000..7c3b239db1 --- /dev/null +++ b/LeanPool/FunctionSpaces/Analysis/Lp/MixedNorms.lean @@ -0,0 +1,815 @@ +/- +Copyright (c) 2026 Mario Ullrich. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Mario Ullrich +-/ +module + +public import LeanPool.FunctionSpaces.ApproximationSpaces.Sequences.Hardy +public import LeanPool.FunctionSpaces.Analysis.Lp.LintegralForm +public import Mathlib.Analysis.MeanInequalities +public import Mathlib.MeasureTheory.Function.ConvergenceInMeasure +public import Mathlib.MeasureTheory.Integral.Average + +/- +Modified for Lean Pool: module names and imports adapted. +-/ + +/-! +# Mixed norms + +For a countable family of functions `g_i : α → [0, ∞]` on a measure space, the mixed norm +`‖g‖_{L_p(ℓ_q)} = ‖ x ↦ ‖(g_i(x))_i‖_{ℓ_q} ‖_{L_p}` takes the `ℓ_q` norm at each point before +the `L_p` norm, and `‖g‖_{ℓ_q(L_p)} = ‖(‖g_i‖_p)_i‖_{ℓ_q}` takes them in the other order. +Triebel–Lizorkin spaces use the first, Besov spaces the second. This file compares the two: + +* `L_p(ℓ_p) = ℓ_p(L_p)` by Tonelli's theorem (`MeasureTheory.eLpNorm_lqNorm_eq_lqNorm_eLpNorm`); +* `ℓ_q(L_p) ≤ L_p(ℓ_q)` for `0 < p ≤ q` (`MeasureTheory.lqNorm_eLpNorm_le_eLpNorm_lqNorm`) and + `L_p(ℓ_q) ≤ ℓ_q(L_p)` for `0 < q ≤ p < ∞` (`MeasureTheory.eLpNorm_lqNorm_le_lqNorm_eLpNorm`); +* the sandwich `ℓ_{max(p,q)}(L_p) ≤ L_p(ℓ_q) ≤ ℓ_{min(p,q)}(L_p)` + (`MeasureTheory.lqNorm_max_le_eLpNorm_lqNorm`, `MeasureTheory.eLpNorm_lqNorm_le_lqNorm_min`), + and the same for the weighted families `w_j ‖u_j‖` of any functions `u_j` with values in a + normed group (`MeasureTheory.lqNorm_max_weighted_le`, + `MeasureTheory.eLpNorm_lqNorm_weighted_le_min`), such as the families `2^(js) ‖u_j‖` of + Littlewood–Paley blocks (`MeasureTheory.lqNorm_max_dyadicWeight_le`, + `MeasureTheory.eLpNorm_lqNorm_dyadicWeight_le_min`). + +The tools are the `L_p` norms of `[0, ∞]`-valued functions of `ApproximationSpaces.Sequences.Lq` +(powers, homogeneity, monotone convergence and Minkowski's inequality for series) and +Minkowski's integral inequality for `ℓ_u`-valued functions, +`‖(∫ g_i)_i‖_{ℓ_u} ≤ ∫ ‖(g_i)_i‖_{ℓ_u}` (`MeasureTheory.lqNorm_lintegral_le`), proved by +Hölder's inequality on finite sets, also for means (`MeasureTheory.lqNorm_laverage_le`) and, on +a probability space, with the `L_p` norm on the right (`MeasureTheory.lqNorm_lintegral_le_eLpNorm`). +Finally, a pointwise bound `u ≤ v + w_J` with `‖w_J‖_p → 0` gives `u ≤ v` almost everywhere +(`MeasureTheory.ae_le_of_le_add_of_tendsto_eLpNorm`), and a bound `|G_J| ≤ v` almost everywhere +passes to the limit of `G_J` in `L_p` (`MeasureTheory.ae_enorm_le_of_tendsto_Lp`). Setting +terms of a family to zero decreases its mixed norm (`MeasureTheory.eLpNorm_lqNorm_ite_le`, +`MeasureTheory.eLpNorm_lqNorm_ite_mono`), and one member is bounded by the mixed norm, +`2^(js) ‖h_j‖_p ≤ ‖ x ↦ ‖(2^(is) |h_i(x)|)_i‖_{ℓ_q} ‖_p` +(`MeasureTheory.dyadicWeight_mul_enorm_le_eLpNorm_lqNorm`, +`MeasureTheory.enorm_le_dyadicWeight_neg_mul_eLpNorm_lqNorm`). For +a family with a finite mixed norm, the tails `x ↦ ‖(g_j(x))_{j ≥ N}‖_{ℓ_q}` tend to zero in `L_p` +by dominated convergence (`MeasureTheory.tendsto_eLpNorm_lqNorm_ite_le`), since the tails of a +single sequence in `ℓ_q` do (`ENNReal.tendsto_lqNorm_ite_le`); a sequence whose differences are +bounded by these tails is a Cauchy sequence (`MeasureTheory.cauchySeq_of_edist_le_lqNorm_ite`). + +Three steps of the embeddings of Sobolev spaces into Triebel–Lizorkin spaces hold for all +families: the first term splits off, +`‖x ↦ ‖(2^(js) b_j(x))_j‖_{ℓ_q}‖_p ≤ ‖b_0‖_p + ‖x ↦ ‖(2^((n+1)s) b_{n+1}(x))_n‖_{ℓ_q}‖_p` +(`MeasureTheory.eLpNorm_lqNorm_dyadicWeight_le_zero_add_succ`), a pointwise bound by a finite +sum passes to `L_p` by Minkowski's inequality +(`MeasureTheory.eLpNorm_le_const_mul_sum_of_ae_le`), and `2^(nm) b_n ≤ ∑_i c_{i,n}` gives +`‖(2^((n+1)m) b_n)_n‖_{ℓ_q} ≤ 2^m ∑_i ‖c_i‖_{ℓ_q}` (`ENNReal.lqNorm_dyadicWeight_succ_le_sum`). + +The mixed norm `‖x ↦ ‖(u_j(x))_j‖_{ℓ_q}‖_p` of a family `u_j : α → [0, ∞]` satisfies the +triangle inequality for `w_j ≤ u_j + v_j`, is homogeneous and decreases in `q` +(`MeasureTheory.eLpNorm_lqNorm_le_add`, `MeasureTheory.eLpNorm_lqNorm_eq_const_mul`, +`MeasureTheory.eLpNorm_lqNorm_mono_exponent`). For the weighted family `(2^(js) u_j)_j`, which +gives the Triebel–Lizorkin quasi-norm for `u_j = |ψ_j ⋆ f|` on `ℝ^d` and on the torus, the weights +are `1` for `s = 0` and the norm increases in `s` +(`MeasureTheory.eLpNorm_lqNorm_dyadicWeight_zero_left`, +`MeasureTheory.eLpNorm_lqNorm_dyadicWeight_mono_smoothness`). + +Two facts on conjugate exponents serve the duality arguments: a power cancels in Hölder's +inequality, `X ≤ K A^{1/u} X^{1/u'}` with `X < ∞` gives `X ≤ K^u A` +(`ENNReal.le_rpow_mul_of_le_mul_rpow`), and the conjugate exponent of `p > 2` is below `2` +(`ENNReal.HolderConjugate.lt_two_of_two_lt`). +-/ + +@[expose] public section + +open Filter Topology +open scoped ENNReal +open ENNReal (lqNorm dyadicWeight) + +namespace ENNReal + +/-! ### Tails of sequences -/ + +/-- **The tails of a sequence in `ℓ_q` tend to zero**: for `0 < q < ∞` and `‖a‖_{ℓ_q} < ∞`, +`‖(0, …, 0, a_N, a_{N+1}, …)‖_{ℓ_q} → 0` as `N → ∞`, since the tails `∑_{k ≥ N} a_k^q` of a +convergent series tend to zero (Mathlib's `ENNReal.tendsto_sum_nat_add`). -/ +theorem tendsto_lqNorm_ite_le {q : ℝ≥0∞} (hq0 : q ≠ 0) (hq : q ≠ ∞) {a : ℕ → ℝ≥0∞} + (ha : lqNorm q a ≠ ∞) : + Tendsto (fun N => lqNorm q (fun j => if N ≤ j then a j else 0)) atTop (𝓝 0) := by + have hpos : 0 < q.toReal := ENNReal.toReal_pos hq0 hq + have hsum : ∑' j, a j ^ q.toReal ≠ ∞ := by + rw [← lqNorm_rpow hq0 hq] + exact ENNReal.rpow_ne_top_of_nonneg hpos.le ha + have h := ((ENNReal.continuous_rpow_const (y := 1 / q.toReal)).tendsto 0).comp + (ENNReal.tendsto_sum_nat_add _ hsum) + rw [ENNReal.zero_rpow_of_pos (one_div_pos.2 hpos)] at h + refine h.congr fun N => ?_ + rw [Function.comp_apply, lqNorm_ite_le_eq hq0 hq, lqNorm_eq_tsum hq0 hq] + simp_rw [add_comm N] + +/-! ### Powers in `[0, ∞]` -/ + +/-- Every term of a finite family is bounded by its `ℓ_r` norm: +`a_i ≤ (∑_{j ∈ S} a_j^r)^(1/r)` for `i ∈ S` and `r > 0`. -/ +theorem le_rpow_sum_rpow {ι : Type*} {S : Finset ι} {a : ι → ℝ≥0∞} {i : ι} + (hi : i ∈ S) {r : ℝ} (hr : 0 < r) : a i ≤ (∑ j ∈ S, a j ^ r) ^ (1 / r) := by + calc a i = (a i ^ r) ^ (1 / r) := by rw [one_div, ENNReal.rpow_rpow_inv hr.ne'] + _ ≤ _ := ENNReal.rpow_le_rpow + (Finset.single_le_sum (f := fun j => a j ^ r) (fun j _ => zero_le) hi) (by positivity) + +/-- **Conjugate exponents of exponents above `2`**: if `1/p + 1/q = 1` and `p > 2`, then +`q < 2`, since `1/q = 1 - 1/p > 1/2`. -/ +theorem HolderConjugate.lt_two_of_two_lt {p q : ℝ≥0∞} [p.HolderConjugate q] (hp : 2 < p) : + q < 2 := by + have h1 : p⁻¹ < 2⁻¹ := ENNReal.inv_lt_inv.2 hp + refine ENNReal.inv_lt_inv.1 (lt_of_not_ge fun hle => ?_) + have h2 : p⁻¹ + q⁻¹ < 2⁻¹ + 2⁻¹ := ENNReal.add_lt_add_of_lt_of_le + (ENNReal.inv_ne_top.2 (HolderConjugate.ne_zero q p)) h1 hle + rw [HolderConjugate.inv_add_inv_eq_one p q, ENNReal.inv_two_add_inv_two] at h2 + exact lt_irrefl _ h2 + +/-- **Cancellation in Hölder's inequality**: for conjugate exponents `u, u'` and `X < ∞`, the +bound `X ≤ K A^{1/u} X^{1/u'}` implies `X ≤ K^u A`, since `X = X^{1/u} X^{1/u'}`. -/ +theorem le_rpow_mul_of_le_mul_rpow {X K A : ℝ≥0∞} {u u' : ℝ} (h : u.HolderConjugate u') + (hX : X ≠ ∞) (hle : X ≤ K * A ^ (1 / u) * X ^ (1 / u')) : X ≤ K ^ u * A := by + rcases eq_or_ne X 0 with rfl | hX0 + · exact zero_le + have hu : 0 < u := h.pos + have hsplit : X = X ^ (1 / u) * X ^ (1 / u') := by + rw [← ENNReal.rpow_add _ _ hX0 hX, one_div, one_div, h.inv_add_inv_eq_one, ENNReal.rpow_one] + have hc0 : X ^ (1 / u') ≠ 0 := (ENNReal.rpow_pos (pos_iff_ne_zero.2 hX0) hX).ne' + have hct : X ^ (1 / u') ≠ ∞ := + ENNReal.rpow_ne_top_of_nonneg (one_div_nonneg.2 h.symm.pos.le) hX + have h1 : X ^ (1 / u) ≤ K * A ^ (1 / u) := by + refine (ENNReal.mul_le_mul_iff_left hc0 hct).1 ?_ + rw [← hsplit] + exact hle + calc X = (X ^ (1 / u)) ^ u := by rw [one_div, ENNReal.rpow_inv_rpow hu.ne'] + _ ≤ (K * A ^ (1 / u)) ^ u := ENNReal.rpow_le_rpow h1 hu.le + _ = K ^ u * A := by + rw [ENNReal.mul_rpow_of_nonneg _ _ hu.le, one_div, ENNReal.rpow_inv_rpow hu.ne'] + +/-! ### Shifted dyadic weights -/ + +/-- **Shifted dyadic weights against a finite sum**: for `m ∈ ℕ`, `1 ≤ q ≤ ∞`, a sequence +`b : ℕ → [0, ∞]` and finitely many sequences `c_i : ℕ → [0, ∞]` with +`2^(nm) b_n ≤ ∑_i c_{i,n}` for every `n`, +`‖(2^((n+1)m) b_n)_n‖_{ℓ_q} ≤ 2^m ∑_i ‖c_i‖_{ℓ_q}`, since `2^((n+1)m) = 2^m 2^(nm)`, by the +homogeneity of the `ℓ_q` norm and Minkowski's inequality (`ENNReal.lqNorm_sum_le`). -/ +theorem lqNorm_dyadicWeight_succ_le_sum {q : ℝ≥0∞} (hq : 1 ≤ q) {m : ℕ} {ι : Type*} + (s : Finset ι) {b : ℕ → ℝ≥0∞} {c : ι → ℕ → ℝ≥0∞} + (h : ∀ n, 2 ^ (n * m) * b n ≤ ∑ i ∈ s, c i n) : + lqNorm q (fun n => dyadicWeight (m : ℝ) (n + 1) * b n) ≤ + 2 ^ m * ∑ i ∈ s, lqNorm q (c i) := by + calc lqNorm q (fun n => dyadicWeight (m : ℝ) (n + 1) * b n) + ≤ lqNorm q (fun n => 2 ^ m * ∑ i ∈ s, c i n) := by + refine lqNorm_mono fun n => ?_ + rw [dyadicWeight_eq_pow, ENNReal.rpow_natCast, ← pow_mul, + show m * (n + 1) = m + n * m by ring, pow_add, mul_assoc] + gcongr + exact h n + _ = 2 ^ m * lqNorm q (fun n => ∑ i ∈ s, c i n) := lqNorm_const_mul _ _ + _ ≤ 2 ^ m * ∑ i ∈ s, lqNorm q (c i) := by + gcongr + exact lqNorm_sum_le hq _ _ + +end ENNReal + +namespace MeasureTheory + +variable {α : Type*} [MeasurableSpace α] {μ : Measure α} {p q : ℝ≥0∞} + +/-! ### `L_p` norms of functions with values in `[0, ∞]` -/ + +/-- **One weighted term of a family is bounded by the mixed norm**: for `q ≠ 0`, a family +`h_i ∈ L_p(μ)` and every `j`, `2^(js) ‖h_j‖_p ≤ ‖ x ↦ ‖(2^(is) |h_i(x)|)_i‖_{ℓ_q} ‖_p`, since +pointwise `2^(js) |h_j(x)|` is at most the `ℓ_q` norm (`ENNReal.le_lqNorm`). -/ +theorem dyadicWeight_mul_enorm_le_eLpNorm_lqNorm {E : Type*} [NormedAddCommGroup E] + (hq : q ≠ 0) (s : ℝ) (h : ℕ → Lp E p μ) (j : ℕ) : + dyadicWeight s j * ‖h j‖ₑ ≤ + eLpNorm (fun x => lqNorm q (fun i => dyadicWeight s i * ‖h i x‖ₑ)) p μ := by + rw [Lp.eNorm_def, ← eLpNorm_eNorm _ (Lp.aestronglyMeasurable (h j)), + ← eLpNorm_const_mul_ennreal (Lp.aestronglyMeasurable (h j)).eNorm.aestronglyMeasurable] + refine eLpNorm_mono_eNorm + (((Lp.aestronglyMeasurable (h j)).eNorm.const_mul _).aestronglyMeasurable) fun x => ?_ + simp only [eNorm_eq_self] + exact ENNReal.le_lqNorm hq (fun i => dyadicWeight s i * ‖h i x‖ₑ) j + +/-- **One term of a family is bounded by the mixed norm**: for `q ≠ 0`, a family `h_i ∈ L_p(μ)` +and every `j`, `‖h_j‖_p ≤ 2^(-js) ‖ x ↦ ‖(2^(is) |h_i(x)|)_i‖_{ℓ_q} ‖_p` +(`MeasureTheory.dyadicWeight_mul_enorm_le_eLpNorm_lqNorm`). -/ +theorem enorm_le_dyadicWeight_neg_mul_eLpNorm_lqNorm {E : Type*} [NormedAddCommGroup E] + (hq : q ≠ 0) (s : ℝ) (h : ℕ → Lp E p μ) (j : ℕ) : + ‖h j‖ₑ ≤ dyadicWeight (-s) j * + eLpNorm (fun x => lqNorm q (fun i => dyadicWeight s i * ‖h i x‖ₑ)) p μ := + calc ‖h j‖ₑ = dyadicWeight (-s) j * (dyadicWeight s j * ‖h j‖ₑ) := by + rw [← mul_assoc, ENNReal.dyadicWeight_neg_mul_self, one_mul] + _ ≤ _ := by gcongr; exact dyadicWeight_mul_enorm_le_eLpNorm_lqNorm hq s h j + +/-! ### Minkowski's integral inequality for `ℓ_u`-valued functions -/ + +/-- The **duality step** of Minkowski's integral inequality on a finite set `S`, for `r > 1` +with conjugate exponent `r'`: `∑_{i ∈ S} (∫ g_i)^r ≤ (∫ (∑_{i ∈ S} g_i^r)^(1/r)) · +(∑_{i ∈ S} (∫ g_i)^r)^(1/r')`. Write `(∫ g_i)^r = ∫ g_i · (∫ g_i)^(r-1)`, exchange the finite +sum with the integral and apply Hölder's inequality at every point. -/ +theorem sum_rpow_lintegral_le_mul {ι : Type*} {g : ι → α → ℝ≥0∞} + (hg : ∀ i, AEMeasurable (g i) μ) {r : ℝ} (hr : 1 < r) (S : Finset ι) : + ∑ i ∈ S, (∫⁻ x, g i x ∂μ) ^ r ≤ (∫⁻ x, (∑ i ∈ S, g i x ^ r) ^ (1 / r) ∂μ) * + (∑ i ∈ S, (∫⁻ x, g i x ∂μ) ^ r) ^ (1 / r.conjExponent) := by + have hpq := Real.HolderConjugate.conjExponent hr + have hconj : ∑ i ∈ S, ((∫⁻ x, g i x ∂μ) ^ (r - 1)) ^ r.conjExponent = + ∑ i ∈ S, (∫⁻ x, g i x ∂μ) ^ r := + Finset.sum_congr rfl fun i _ => by rw [← ENNReal.rpow_mul, hpq.sub_one_mul_conj] + calc ∑ i ∈ S, (∫⁻ x, g i x ∂μ) ^ r + = ∑ i ∈ S, (∫⁻ x, g i x ∂μ) * (∫⁻ x, g i x ∂μ) ^ (r - 1) := + Finset.sum_congr rfl fun i _ => ENNReal.rpow_eq_mul_rpow_sub_one _ hr.le + _ = ∫⁻ x, ∑ i ∈ S, g i x * (∫⁻ y, g i y ∂μ) ^ (r - 1) ∂μ := by + rw [lintegral_finsetSum' S fun i _ => (hg i).mul_const _] + exact Finset.sum_congr rfl fun i _ => (lintegral_mul_const'' _ (hg i)).symm + _ ≤ ∫⁻ x, (∑ i ∈ S, g i x ^ r) ^ (1 / r) * + (∑ i ∈ S, ((∫⁻ y, g i y ∂μ) ^ (r - 1)) ^ r.conjExponent) ^ (1 / r.conjExponent) ∂μ := + lintegral_mono fun x => ENNReal.inner_le_Lp_mul_Lq S (fun i => g i x) _ hpq + _ = (∫⁻ x, (∑ i ∈ S, g i x ^ r) ^ (1 / r) ∂μ) * + (∑ i ∈ S, (∫⁻ x, g i x ∂μ) ^ r) ^ (1 / r.conjExponent) := by + rw [hconj, lintegral_mul_const'' _ (by fun_prop)] + +/-- **Minkowski's integral inequality on a finite set**: for `r > 1` and measurable +`g_i : α → [0, ∞]`, `(∑_{i ∈ S} (∫ g_i)^r)^(1/r) ≤ ∫ (∑_{i ∈ S} g_i^r)^(1/r)`. If the left side is +finite and nonzero, cancel the factor `(∑_{i ∈ S} (∫ g_i)^r)^(1/r')` in +`MeasureTheory.sum_rpow_lintegral_le_mul`; if it is infinite, some `∫ g_i` is infinite and so is +the right side. -/ +theorem rpow_sum_rpow_lintegral_le {ι : Type*} {g : ι → α → ℝ≥0∞} + (hg : ∀ i, AEMeasurable (g i) μ) {r : ℝ} (hr : 1 < r) (S : Finset ι) : + (∑ i ∈ S, (∫⁻ x, g i x ∂μ) ^ r) ^ (1 / r) ≤ ∫⁻ x, (∑ i ∈ S, g i x ^ r) ^ (1 / r) ∂μ := by + have hr0 : 0 < r := zero_lt_one.trans hr + have hpq := Real.HolderConjugate.conjExponent hr + rcases eq_or_ne (∑ i ∈ S, (∫⁻ x, g i x ∂μ) ^ r) 0 with h0 | h0 + · rw [h0, ENNReal.zero_rpow_of_pos (by positivity)] + exact zero_le + rcases eq_or_ne (∑ i ∈ S, (∫⁻ x, g i x ∂μ) ^ r) ∞ with htop | htop + · obtain ⟨i, hi, hgi⟩ := ENNReal.sum_eq_top.1 htop + have hgi' : ∫⁻ x, g i x ∂μ = ∞ := by + rcases ENNReal.rpow_eq_top_iff.1 hgi with ⟨_, h⟩ | ⟨h, _⟩ + · linarith + · exact h + have hI : ∫⁻ x, (∑ j ∈ S, g j x ^ r) ^ (1 / r) ∂μ = ∞ := + top_unique (hgi' ▸ lintegral_mono fun x => + ENNReal.le_rpow_sum_rpow (a := fun j => g j x) hi hr0) + rw [hI] + exact le_top + have hc0 : (∑ i ∈ S, (∫⁻ x, g i x ∂μ) ^ r) ^ (1 / r.conjExponent) ≠ 0 := + (ENNReal.rpow_pos (pos_iff_ne_zero.2 h0) htop).ne' + have hctop : (∑ i ∈ S, (∫⁻ x, g i x ∂μ) ^ r) ^ (1 / r.conjExponent) ≠ ∞ := + ENNReal.rpow_ne_top_of_nonneg (by have := hpq.symm.pos; positivity) htop + refine (ENNReal.mul_le_mul_iff_left hc0 hctop).1 ?_ + rw [← ENNReal.rpow_add _ _ h0 htop, one_div, one_div, hpq.inv_add_inv_eq_one, ENNReal.rpow_one, + ← one_div, ← one_div] + exact sum_rpow_lintegral_le_mul hg hr S + +section Countable + +variable {ι : Type*} [Countable ι] [MeasurableSpace ι] [MeasurableSingletonClass ι] + +/-- **Minkowski's integral inequality for `ℓ_u`-valued functions**, `1 ≤ u ≤ ∞`: for measurable +`g_i : α → [0, ∞]` indexed by a countable set, `‖(∫ g_i)_i‖_{ℓ_u} ≤ ∫ ‖(g_i(x))_i‖_{ℓ_u} dx`. For +`u = 1` both sides are equal (Tonelli), for `u = ∞` the supremum of integrals is at most the +integral of the supremum, and for `1 < u < ∞` the finite sums are bounded by +`MeasureTheory.rpow_sum_rpow_lintegral_le`. -/ +theorem lqNorm_lintegral_le {u : ℝ≥0∞} (hu : 1 ≤ u) {g : ι → α → ℝ≥0∞} + (hg : ∀ i, AEMeasurable (g i) μ) : + lqNorm u (fun i => ∫⁻ x, g i x ∂μ) ≤ ∫⁻ x, lqNorm u (fun i => g i x) ∂μ := by + rcases eq_or_ne u ∞ with rfl | hu' + · simp only [ENNReal.lqNorm_top] + exact iSup_le fun i => lintegral_mono fun x => le_iSup (fun j => g j x) i + rcases eq_or_lt_of_le hu with rfl | hu1 + · simp only [ENNReal.lqNorm_one] + exact (lintegral_tsum hg).ge + have hu0 : u ≠ 0 := (zero_lt_one.trans hu1).ne' + have hr : 1 < u.toReal := ENNReal.one_lt_toReal hu1 hu' + have hr0 : 0 < u.toReal := zero_lt_one.trans hr + simp only [ENNReal.lqNorm_eq_tsum hu0 hu'] + rw [one_div, ENNReal.rpow_inv_le_iff hr0, tsum_eq_iSup_sum] + refine iSup_le fun S => ?_ + rw [← ENNReal.rpow_inv_le_iff hr0, ← one_div] + refine (rpow_sum_rpow_lintegral_le hg hr S).trans (lintegral_mono fun x => ?_) + exact ENNReal.rpow_le_rpow (sum_le_tsum S) (by positivity) + +/-- The pointwise `ℓ_q` norm `x ↦ ‖(g_i(x))_i‖_{ℓ_q}` of a countable family of measurable +functions is measurable: it is a constant for `q = 0`, a countable supremum for `q = ∞` and a +power of a series otherwise. -/ +theorem aemeasurable_lqNorm_comp {g : ι → α → ℝ≥0∞} (hg : ∀ i, AEMeasurable (g i) μ) + (q : ℝ≥0∞) : AEMeasurable (fun x => lqNorm q (fun i => g i x)) μ := by + rcases eq_or_ne q 0 with rfl | hq0 + · simp only [ENNReal.lqNorm_zero_left] + exact aemeasurable_const + rcases eq_or_ne q ∞ with rfl | hq + · simp only [ENNReal.lqNorm_top] + exact AEMeasurable.iSup hg + simp only [ENNReal.lqNorm_eq_tsum hq0 hq] + exact (AEMeasurable.tsum fun i => (hg i).pow_const _).pow_const _ + +/-- The pointwise `ℓ_q` norm `x ↦ ‖(g_i(x))_i‖_{ℓ_q}` of a countable family of measurable +functions is measurable, as in `MeasureTheory.aemeasurable_lqNorm_comp`. -/ +theorem measurable_lqNorm_comp {g : ι → α → ℝ≥0∞} (hg : ∀ i, Measurable (g i)) (q : ℝ≥0∞) : + Measurable fun x => lqNorm q (fun i => g i x) := by + rcases eq_or_ne q 0 with rfl | hq0 + · simp only [ENNReal.lqNorm_zero_left] + exact measurable_const + rcases eq_or_ne q ∞ with rfl | hq + · simp only [ENNReal.lqNorm_top] + exact Measurable.iSup hg + simp only [ENNReal.lqNorm_eq_tsum hq0 hq] + exact (Measurable.tsum fun i => (hg i).pow_const _).pow_const _ + +/-- **Minkowski's integral inequality on a probability space, in `L_p`**: for a probability +measure `μ`, `1 ≤ p ≤ ∞`, `1 ≤ q ≤ ∞` and almost everywhere measurable `g_i : α → [0, ∞]` +indexed by a countable set, `‖(∫ g_i dμ)_i‖_{ℓ_q} ≤ ‖ x ↦ ‖(g_i(x))_i‖_{ℓ_q} ‖_{L_p(μ)}`, by +`MeasureTheory.lqNorm_lintegral_le` and `‖·‖_1 ≤ ‖·‖_p` (Mathlib's +`eLpNorm_le_eLpNorm_of_exponent_le`). -/ +theorem lqNorm_lintegral_le_eLpNorm [IsProbabilityMeasure μ] (hp1 : 1 ≤ p) (hq : 1 ≤ q) + {g : ι → α → ℝ≥0∞} (hg : ∀ i, AEMeasurable (g i) μ) : + lqNorm q (fun i => ∫⁻ x, g i x ∂μ) ≤ eLpNorm (fun x => lqNorm q (fun i => g i x)) p μ := + calc lqNorm q (fun i => ∫⁻ x, g i x ∂μ) + ≤ ∫⁻ x, lqNorm q (fun i => g i x) ∂μ := lqNorm_lintegral_le hq hg + _ = eLpNorm (fun x => lqNorm q (fun i => g i x)) 1 μ := by + rw [eLpNorm_one_eq_lintegral_eNorm (aemeasurable_lqNorm_comp hg q).aestronglyMeasurable] + simp only [eNorm_eq_self] + _ ≤ _ := eLpNorm_le_eLpNorm_of_exponent_le hp1 + +/-- **Minkowski's integral inequality for means**: for `1 ≤ u ≤ ∞` and almost everywhere +measurable `g_i : α → [0, ∞]` indexed by a countable set, +`‖(⨍ g_i dμ)_i‖_{ℓ_u} ≤ ⨍ ‖(g_i(x))_i‖_{ℓ_u} dμ(x)`. The mean is the integral for the normalised +measure `μ(α)⁻¹ μ`, so this is `MeasureTheory.lqNorm_lintegral_le`. -/ +theorem lqNorm_laverage_le {u : ℝ≥0∞} (hu : 1 ≤ u) {g : ι → α → ℝ≥0∞} + (hg : ∀ i, AEMeasurable (g i) μ) : + lqNorm u (fun i => ⨍⁻ x, g i x ∂μ) ≤ ⨍⁻ x, lqNorm u (fun i => g i x) ∂μ := by + simp only [laverage_eq'] + exact lqNorm_lintegral_le hu fun i => (hg i).smul_measure _ + +/-! ### Comparison of `L_p(ℓ_q)` and `ℓ_q(L_p)` -/ + +/-- **`L_p(ℓ_p) = ℓ_p(L_p)`** for `0 < p < ∞`: +`‖ x ↦ ‖(g_i(x))_i‖_{ℓ_p} ‖_p = ‖(‖g_i‖_p)_i‖_{ℓ_p}`. Both sides to the power `p` equal +`∑_i ∫ g_i^p`, by Tonelli's theorem for series (`lintegral_tsum`). -/ +theorem eLpNorm_lqNorm_eq_lqNorm_eLpNorm (hp0 : p ≠ 0) (hp : p ≠ ∞) {g : ι → α → ℝ≥0∞} + (hg : ∀ i, AEMeasurable (g i) μ) : + eLpNorm (fun x => lqNorm p (fun i => g i x)) p μ = lqNorm p (fun i => eLpNorm (g i) p μ) := by + have hr : 0 < p.toReal := ENNReal.toReal_pos hp0 hp + refine ENNReal.rpow_left_injective hr.ne' ?_ + change eLpNorm _ p μ ^ p.toReal = lqNorm p _ ^ p.toReal + rw [eLpNorm_rpow_eq_lintegral hp0 hp (aemeasurable_lqNorm_comp hg p), + ENNReal.lqNorm_rpow hp0 hp] + simp_rw [ENNReal.lqNorm_rpow hp0 hp] + rw [lintegral_tsum fun i => (hg i).pow_const _] + exact tsum_congr fun i => (eLpNorm_rpow_eq_lintegral hp0 hp (hg i)).symm + +/-- **`ℓ_q(L_p) ≤ L_p(ℓ_q)` for `0 < p ≤ q ≤ ∞`**: +`‖(‖g_i‖_p)_i‖_{ℓ_q} ≤ ‖ x ↦ ‖(g_i(x))_i‖_{ℓ_q} ‖_p`. For `q = ∞` every `g_i` is at most the +pointwise supremum. For `q < ∞`, with `U = q/p ≥ 1`, the `p`-th power of the left side is +`‖(∫ g_i^p)_i‖_{ℓ_U}`, and Minkowski's integral inequality for `ℓ_U`-valued functions +(`MeasureTheory.lqNorm_lintegral_le`) bounds it by `∫ ‖(g_i^p)_i‖_{ℓ_U}`, the `p`-th power of the +right side. -/ +theorem lqNorm_eLpNorm_le_eLpNorm_lqNorm (hp0 : p ≠ 0) (hpq : p ≤ q) + {g : ι → α → ℝ≥0∞} (hg : ∀ i, AEMeasurable (g i) μ) : + lqNorm q (fun i => eLpNorm (g i) p μ) ≤ eLpNorm (fun x => lqNorm q (fun i => g i x)) p μ := by + rcases eq_or_ne q ∞ with rfl | hq + · rw [ENNReal.lqNorm_top] + refine iSup_le fun i => eLpNorm_mono_eNorm_ae (hg i).aestronglyMeasurable + (Eventually.of_forall fun x => ?_) + simp only [eNorm_eq_self] + exact ENNReal.le_lqNorm ENNReal.top_ne_zero (fun j => g j x) i + have hp : p ≠ ∞ := ne_top_of_le_ne_top hq hpq + have hr : 0 < p.toReal := ENNReal.toReal_pos hp0 hp + have hU : q / p * ENNReal.ofReal p.toReal = q := by + rw [ENNReal.ofReal_toReal hp, ENNReal.div_mul_cancel hp0 hp] + have hU1 : 1 ≤ q / p := + (ENNReal.le_div_iff_mul_le (Or.inl hp0) (Or.inl hp)).2 (by rwa [one_mul]) + rw [← ENNReal.rpow_le_rpow_iff hr] + calc lqNorm q (fun i => eLpNorm (g i) p μ) ^ p.toReal + = lqNorm (q / p) (fun i => eLpNorm (g i) p μ ^ p.toReal) := by + rw [ENNReal.lqNorm_fun_rpow _ hr, hU] + _ = lqNorm (q / p) (fun i => ∫⁻ x, g i x ^ p.toReal ∂μ) := by + congr 1 + funext i + exact eLpNorm_rpow_eq_lintegral hp0 hp (hg i) + _ ≤ ∫⁻ x, lqNorm (q / p) (fun i => g i x ^ p.toReal) ∂μ := + lqNorm_lintegral_le hU1 fun i => (hg i).pow_const _ + _ = ∫⁻ x, lqNorm q (fun i => g i x) ^ p.toReal ∂μ := by + congr 1 + funext x + rw [ENNReal.lqNorm_fun_rpow _ hr, hU] + _ = eLpNorm (fun x => lqNorm q (fun i => g i x)) p μ ^ p.toReal := + (eLpNorm_rpow_eq_lintegral hp0 hp (aemeasurable_lqNorm_comp hg q)).symm + +/-- **`L_p(ℓ_q) ≤ ℓ_q(L_p)` for `0 < q ≤ p < ∞`**: +`‖ x ↦ ‖(g_i(x))_i‖_{ℓ_q} ‖_p ≤ ‖(‖g_i‖_p)_i‖_{ℓ_q}`. If some `g_i` is not measurable, then +`‖g_i‖_p = ∞` and so is the right side. Otherwise, with `U = p/q ≥ 1`, the `q`-th power of the +left side is `‖∑_i g_i^q‖_U`, and Minkowski's inequality for series in `L_U` +(`MeasureTheory.eLpNorm_tsum_le`) bounds it by `∑_i ‖g_i^q‖_U = ∑_i ‖g_i‖_p^q`, the `q`-th power of +the right side. -/ +theorem eLpNorm_lqNorm_le_lqNorm_eLpNorm (hq0 : q ≠ 0) (hqp : q ≤ p) (hp : p ≠ ∞) + {g : ι → α → ℝ≥0∞} : + eLpNorm (fun x => lqNorm q (fun i => g i x)) p μ ≤ lqNorm q (fun i => eLpNorm (g i) p μ) := by + by_cases hg : ∀ i, AEMeasurable (g i) μ + swap + · obtain ⟨i, hi⟩ := not_forall.1 hg + have h : eLpNorm (g i) p μ = ∞ := + eLpNorm_of_not_aestronglyMeasurable fun h => hi h.aemeasurable + have hle := ENNReal.le_lqNorm hq0 (fun j => eLpNorm (g j) p μ) i + rw [h, top_le_iff] at hle + rw [hle] + exact le_top + have hq : q ≠ ∞ := ne_top_of_le_ne_top hp hqp + have hr : 0 < q.toReal := ENNReal.toReal_pos hq0 hq + have hU : p / q * ENNReal.ofReal q.toReal = p := by + rw [ENNReal.ofReal_toReal hq, ENNReal.div_mul_cancel hq0 hq] + have hU1 : 1 ≤ p / q := + (ENNReal.le_div_iff_mul_le (Or.inl hq0) (Or.inl hq)).2 (by rwa [one_mul]) + rw [← ENNReal.rpow_le_rpow_iff hr] + calc eLpNorm (fun x => lqNorm q (fun i => g i x)) p μ ^ q.toReal + = eLpNorm (fun x => lqNorm q (fun i => g i x) ^ q.toReal) (p / q) μ := by + rw [eLpNorm_fun_rpow (aemeasurable_lqNorm_comp hg q) hr, hU] + _ = eLpNorm (fun x => ∑' i, g i x ^ q.toReal) (p / q) μ := by + simp_rw [ENNReal.lqNorm_rpow hq0 hq] + _ ≤ ∑' i, eLpNorm (fun x => g i x ^ q.toReal) (p / q) μ := eLpNorm_tsum_le hU1 + _ = ∑' i, eLpNorm (g i) p μ ^ q.toReal := by + refine tsum_congr fun i => ?_ + rw [eLpNorm_fun_rpow (hg i) hr, hU] + _ = lqNorm q (fun i => eLpNorm (g i) p μ) ^ q.toReal := (ENNReal.lqNorm_rpow hq0 hq _).symm + +/-- **The upper half of the sandwich**: +`‖ x ↦ ‖(g_i(x))_i‖_{ℓ_q} ‖_p ≤ ‖(‖g_i‖_p)_i‖_{ℓ_{min(p,q)}}` for `1 ≤ p < ∞` and `1 ≤ q ≤ ∞`. +For `p ≤ q` the pointwise bound `‖·‖_{ℓ_q} ≤ ‖·‖_{ℓ_p}` and `L_p(ℓ_p) = ℓ_p(L_p)`; for `q ≤ p` the +inequality `L_p(ℓ_q) ≤ ℓ_q(L_p)`. -/ +theorem eLpNorm_lqNorm_le_lqNorm_min (hp1 : 1 ≤ p) (hp : p ≠ ∞) (hq : 1 ≤ q) + {g : ι → α → ℝ≥0∞} (hg : ∀ i, AEMeasurable (g i) μ) : + eLpNorm (fun x => lqNorm q (fun i => g i x)) p μ ≤ + lqNorm (min p q) (fun i => eLpNorm (g i) p μ) := by + rcases le_total p q with hpq | hqp + · rw [min_eq_left hpq, ← eLpNorm_lqNorm_eq_lqNorm_eLpNorm (zero_lt_one.trans_le hp1).ne' hp hg] + refine eLpNorm_mono_eNorm_ae (aemeasurable_lqNorm_comp hg q).aestronglyMeasurable + (Eventually.of_forall fun x => ?_) + simp only [eNorm_eq_self] + exact ENNReal.lqNorm_le_lqNorm_of_le (zero_lt_one.trans_le hp1).ne' hpq _ + · rw [min_eq_right hqp] + exact eLpNorm_lqNorm_le_lqNorm_eLpNorm (zero_lt_one.trans_le hq).ne' hqp hp + +/-- **The lower half of the sandwich**: +`‖(‖g_i‖_p)_i‖_{ℓ_{max(p,q)}} ≤ ‖ x ↦ ‖(g_i(x))_i‖_{ℓ_q} ‖_p` for `1 ≤ p < ∞` and `1 ≤ q ≤ ∞`. +For `p ≤ q` the inequality `ℓ_q(L_p) ≤ L_p(ℓ_q)`; for `q ≤ p` the identity +`ℓ_p(L_p) = L_p(ℓ_p)` and the pointwise bound `‖·‖_{ℓ_p} ≤ ‖·‖_{ℓ_q}`. -/ +theorem lqNorm_max_le_eLpNorm_lqNorm (hp1 : 1 ≤ p) (hp : p ≠ ∞) (hq : 1 ≤ q) + {g : ι → α → ℝ≥0∞} (hg : ∀ i, AEMeasurable (g i) μ) : + lqNorm (max p q) (fun i => eLpNorm (g i) p μ) ≤ + eLpNorm (fun x => lqNorm q (fun i => g i x)) p μ := by + rcases le_total p q with hpq | hqp + · rw [max_eq_right hpq] + exact lqNorm_eLpNorm_le_eLpNorm_lqNorm (zero_lt_one.trans_le hp1).ne' hpq hg + · rw [max_eq_left hqp, ← eLpNorm_lqNorm_eq_lqNorm_eLpNorm (zero_lt_one.trans_le hp1).ne' hp hg] + refine eLpNorm_mono_eNorm_ae (aemeasurable_lqNorm_comp hg p).aestronglyMeasurable + (Eventually.of_forall fun x => ?_) + simp only [eNorm_eq_self] + exact ENNReal.lqNorm_le_lqNorm_of_le (zero_lt_one.trans_le hq).ne' hqp _ + +end Countable + +/-! ### Weighted families of functions -/ + +section Weighted + +variable {E : Type*} [NormedAddCommGroup E] + +/-- **Homogeneity of the pointwise norm**: `‖c ‖v(·)‖‖_p = c ‖v‖_p` for every constant +`c ∈ [0, ∞]`, every measurable `v : α → E` with values in a normed group and every `p`. -/ +theorem eLpNorm_const_mul_enorm (c : ℝ≥0∞) {v : α → E} (hv : AEStronglyMeasurable v μ) + (p : ℝ≥0∞) : eLpNorm (fun x => c * ‖v x‖ₑ) p μ = c * eLpNorm v p μ := by + rw [eLpNorm_const_mul_ennreal hv.eNorm.aestronglyMeasurable, eLpNorm_eNorm _ hv] + +section Countable + +variable {ι : Type*} [Countable ι] [MeasurableSpace ι] [MeasurableSingletonClass ι] + {u : ι → α → E} + +/-- **`L_p(ℓ_p) = ℓ_p(L_p)` for weighted families**: for `0 < p < ∞`, weights `w_j ∈ [0, ∞]` and +measurable `u_j : α → E` with values in a normed group, indexed by a countable set, +`‖ x ↦ ‖(w_j ‖u_j(x)‖)_j‖_{ℓ_p} ‖_p = ‖(w_j ‖u_j‖_p)_j‖_{ℓ_p}`. -/ +theorem eLpNorm_lqNorm_weighted_eq (w : ι → ℝ≥0∞) (hp0 : p ≠ 0) (hp : p ≠ ∞) + (hu : ∀ j, AEStronglyMeasurable (u j) μ) : + eLpNorm (fun x => lqNorm p (fun j => w j * ‖u j x‖ₑ)) p μ = + lqNorm p (fun j => w j * eLpNorm (u j) p μ) := by + rw [eLpNorm_lqNorm_eq_lqNorm_eLpNorm hp0 hp fun j => (hu j).eNorm.const_mul _] + congr 1 + funext j + exact eLpNorm_const_mul_enorm (w j) (hu j) p + +/-- **The upper half of the sandwich for weighted families**: for `1 ≤ p < ∞`, `1 ≤ q ≤ ∞`, +weights `w_j ∈ [0, ∞]` and measurable `u_j : α → E` with values in a normed group, indexed by a +countable set, `‖ x ↦ ‖(w_j ‖u_j(x)‖)_j‖_{ℓ_q} ‖_p ≤ ‖(w_j ‖u_j‖_p)_j‖_{ℓ_{min(p,q)}}`. -/ +theorem eLpNorm_lqNorm_weighted_le_min (w : ι → ℝ≥0∞) (hp1 : 1 ≤ p) (hp : p ≠ ∞) (hq : 1 ≤ q) + (hu : ∀ j, AEStronglyMeasurable (u j) μ) : + eLpNorm (fun x => lqNorm q (fun j => w j * ‖u j x‖ₑ)) p μ ≤ + lqNorm (min p q) (fun j => w j * eLpNorm (u j) p μ) := by + refine (eLpNorm_lqNorm_le_lqNorm_min hp1 hp hq fun j => (hu j).eNorm.const_mul _).trans_eq ?_ + congr 1 + funext j + exact eLpNorm_const_mul_enorm (w j) (hu j) p + +/-- **The lower half of the sandwich for weighted families**: for `1 ≤ p < ∞`, `1 ≤ q ≤ ∞`, +weights `w_j ∈ [0, ∞]` and measurable `u_j : α → E` with values in a normed group, indexed by a +countable set, `‖(w_j ‖u_j‖_p)_j‖_{ℓ_{max(p,q)}} ≤ ‖ x ↦ ‖(w_j ‖u_j(x)‖)_j‖_{ℓ_q} ‖_p`. -/ +theorem lqNorm_max_weighted_le (w : ι → ℝ≥0∞) (hp1 : 1 ≤ p) (hp : p ≠ ∞) (hq : 1 ≤ q) + (hu : ∀ j, AEStronglyMeasurable (u j) μ) : + lqNorm (max p q) (fun j => w j * eLpNorm (u j) p μ) ≤ + eLpNorm (fun x => lqNorm q (fun j => w j * ‖u j x‖ₑ)) p μ := by + refine le_of_eq_of_le ?_ (lqNorm_max_le_eLpNorm_lqNorm hp1 hp hq + fun j => (hu j).eNorm.const_mul _) + congr 1 + funext j + exact (eLpNorm_const_mul_enorm (w j) (hu j) p).symm + +end Countable + +variable {s : ℝ} {u : ℕ → α → E} + +/-- **`L_p(ℓ_p) = ℓ_p(L_p)` for dyadic weights**: for `0 < p < ∞`, `s ∈ ℝ` and measurable +`u_j : α → E`, `‖ x ↦ ‖(2^(js) ‖u_j(x)‖)_j‖_{ℓ_p} ‖_p = ‖(2^(js) ‖u_j‖_p)_j‖_{ℓ_p}`. With `u_j` the +Littlewood–Paley blocks of `f`, this says that the Triebel–Lizorkin and the Besov quasi-norm agree +for `q = p`. -/ +theorem eLpNorm_lqNorm_dyadicWeight_eq (hp0 : p ≠ 0) (hp : p ≠ ∞) + (hu : ∀ j, AEStronglyMeasurable (u j) μ) : + eLpNorm (fun x => lqNorm p (fun j => dyadicWeight s j * ‖u j x‖ₑ)) p μ = + lqNorm p (fun j => dyadicWeight s j * eLpNorm (u j) p μ) := + eLpNorm_lqNorm_weighted_eq (dyadicWeight s) hp0 hp hu + +/-- **The upper half of the sandwich for dyadic weights**: for `1 ≤ p < ∞`, `1 ≤ q ≤ ∞`, +`s ∈ ℝ` and measurable `u_j : α → E`, +`‖ x ↦ ‖(2^(js) ‖u_j(x)‖)_j‖_{ℓ_q} ‖_p ≤ ‖(2^(js) ‖u_j‖_p)_j‖_{ℓ_{min(p,q)}}`. -/ +theorem eLpNorm_lqNorm_dyadicWeight_le_min (hp1 : 1 ≤ p) (hp : p ≠ ∞) (hq : 1 ≤ q) + (hu : ∀ j, AEStronglyMeasurable (u j) μ) : + eLpNorm (fun x => lqNorm q (fun j => dyadicWeight s j * ‖u j x‖ₑ)) p μ ≤ + lqNorm (min p q) (fun j => dyadicWeight s j * eLpNorm (u j) p μ) := + eLpNorm_lqNorm_weighted_le_min (dyadicWeight s) hp1 hp hq hu + +/-- **The lower half of the sandwich for dyadic weights**: for `1 ≤ p < ∞`, `1 ≤ q ≤ ∞`, +`s ∈ ℝ` and measurable `u_j : α → E`, +`‖(2^(js) ‖u_j‖_p)_j‖_{ℓ_{max(p,q)}} ≤ ‖ x ↦ ‖(2^(js) ‖u_j(x)‖)_j‖_{ℓ_q} ‖_p`. -/ +theorem lqNorm_max_dyadicWeight_le (hp1 : 1 ≤ p) (hp : p ≠ ∞) (hq : 1 ≤ q) + (hu : ∀ j, AEStronglyMeasurable (u j) μ) : + lqNorm (max p q) (fun j => dyadicWeight s j * eLpNorm (u j) p μ) ≤ + eLpNorm (fun x => lqNorm q (fun j => dyadicWeight s j * ‖u j x‖ₑ)) p μ := + lqNorm_max_weighted_le (dyadicWeight s) hp1 hp hq hu + +end Weighted + +/-! ### Limits of pointwise bounds -/ + +/-- **Limits of pointwise bounds**: if `u` and `v` are measurable, `u ≤ v + w_J` almost everywhere +for every `J` and `‖w_J‖_p → 0` for some `p > 0`, then `u ≤ v` almost everywhere. The truncated +difference `(u - v)_+` has `‖(u - v)_+‖_p ≤ ‖w_J‖_p` for every `J`, hence norm `0`. This passes +pointwise bounds to limits in `L_p` for functions with values in `[0, ∞]` directly; Mathlib +derives convergence in measure from `L_p` convergence for functions with values in a normed group +(`tendstoInMeasure_of_tendsto_eLpNorm`). -/ +theorem ae_le_of_le_add_of_tendsto_eLpNorm {u v : α → ℝ≥0∞} {w : ℕ → α → ℝ≥0∞} + (hu : AEMeasurable u μ) (hv : AEMeasurable v μ) (hp0 : p ≠ 0) + (h : ∀ J, ∀ᵐ x ∂μ, u x ≤ v x + w J x) + (hw : Tendsto (fun J => eLpNorm (w J) p μ) atTop (𝓝 0)) : ∀ᵐ x ∂μ, u x ≤ v x := by + have hd : AEStronglyMeasurable (fun x => u x - v x) μ := (hu.sub hv).aestronglyMeasurable + have hle : ∀ J, eLpNorm (fun x => u x - v x) p μ ≤ eLpNorm (w J) p μ := fun J => + eLpNorm_mono_eNorm_ae hd ((h J).mono fun x hx => by + simp only [eNorm_eq_self] + exact tsub_le_iff_left.2 hx) + have h0 : eLpNorm (fun x => u x - v x) p μ = 0 := le_antisymm (ge_of_tendsto' hw hle) zero_le + filter_upwards [(eLpNorm_eq_zero_iff hp0).1 h0] with x hx + exact tsub_eq_zero_iff_le.1 hx + +/-- **Pointwise bounds pass to limits in `L_p`**: for `1 ≤ p ≤ ∞`, if `G_J → F` in `L_p` and +`|G_J| ≤ v` almost everywhere for every `J`, then `|F| ≤ v` almost everywhere, for every +`v : α → [0, ∞]`. A subsequence of `G_J` converges to `F` almost everywhere (Mathlib's +`tendstoInMeasure_of_tendsto_Lp` and `MeasureTheory.TendstoInMeasure.exists_seq_tendsto_ae`). -/ +theorem ae_enorm_le_of_tendsto_Lp {E : Type*} [NormedAddCommGroup E] [Fact (1 ≤ p)] + {F : Lp E p μ} {G : ℕ → Lp E p μ} (hG : Tendsto G atTop (𝓝 F)) {v : α → ℝ≥0∞} + (h : ∀ J, ∀ᵐ x ∂μ, ‖G J x‖ₑ ≤ v x) : ∀ᵐ x ∂μ, ‖F x‖ₑ ≤ v x := by + obtain ⟨ns, -, hns⟩ := (tendstoInMeasure_of_tendsto_Lp hG).exists_seq_tendsto_ae + filter_upwards [hns, ae_all_iff.2 fun k => h (ns k)] with x hx hk + exact le_of_tendsto' hx.eNorm hk + +/-! ### Families with terms set to zero -/ + +/-- **Measurability with terms set to zero**: if every `g_j : α → [0, ∞]` is measurable, then for +every predicate `P` on `ℕ` the function `x ↦ ‖(1_P(j) g_j(x))_j‖_{ℓ_q}` is measurable, where +`1_P(j) g_j(x)` is `g_j(x)` if `P j` holds and `0` otherwise. -/ +theorem aemeasurable_lqNorm_ite {P : ℕ → Prop} [DecidablePred P] {g : ℕ → α → ℝ≥0∞} + (hg : ∀ j, AEMeasurable (g j) μ) (q : ℝ≥0∞) : + AEMeasurable (fun x => lqNorm q fun j => if P j then g j x else 0) μ := + aemeasurable_lqNorm_comp (fun j => by + split_ifs + · exact hg j + · exact aemeasurable_const) q + +/-- **Setting terms to zero decreases the mixed norm**: for measurable `g_j : α → [0, ∞]` and every +predicate `P` on `ℕ`, +`‖x ↦ ‖(1_P(j) g_j(x))_j‖_{ℓ_q}‖_p ≤ ‖x ↦ ‖(g_j(x))_j‖_{ℓ_q}‖_p`, by the monotonicity of the +`ℓ_q` norm and of the `L_p` norm. -/ +theorem eLpNorm_lqNorm_ite_le {P : ℕ → Prop} [DecidablePred P] {g : ℕ → α → ℝ≥0∞} + (hg : ∀ j, AEMeasurable (g j) μ) : + eLpNorm (fun x => lqNorm q fun j => if P j then g j x else 0) p μ ≤ + eLpNorm (fun x => lqNorm q fun j => g j x) p μ := + eLpNorm_mono_eNorm (aemeasurable_lqNorm_ite hg q).aestronglyMeasurable fun x => by + simp only [eNorm_eq_self] + exact ENNReal.lqNorm_mono fun j => by split_ifs <;> simp + +/-- **Setting more terms to zero decreases the mixed norm**: for measurable `g_j : α → [0, ∞]` and +predicates `P`, `Q` on `ℕ` with `P j → Q j` for every `j`, +`‖x ↦ ‖(1_P(j) g_j(x))_j‖_{ℓ_q}‖_p ≤ ‖x ↦ ‖(1_Q(j) g_j(x))_j‖_{ℓ_q}‖_p`; +`MeasureTheory.eLpNorm_lqNorm_ite_le` is the case where `Q` always holds. -/ +theorem eLpNorm_lqNorm_ite_mono {P Q : ℕ → Prop} [DecidablePred P] [DecidablePred Q] + {g : ℕ → α → ℝ≥0∞} (hg : ∀ j, AEMeasurable (g j) μ) (hPQ : ∀ j, P j → Q j) : + eLpNorm (fun x => lqNorm q fun j => if P j then g j x else 0) p μ ≤ + eLpNorm (fun x => lqNorm q fun j => if Q j then g j x else 0) p μ := + eLpNorm_mono_eNorm (aemeasurable_lqNorm_ite hg q).aestronglyMeasurable fun x => by + simp only [eNorm_eq_self] + refine ENNReal.lqNorm_mono fun j => ?_ + by_cases hP : P j + · simp only [hP, hPQ j hP, ↓reduceIte, le_refl] + · simp only [hP, ↓reduceIte] + exact zero_le + +/-! ### Tails in `L_p(ℓ_q)` -/ + +/-- **Dominated convergence for tails in `L_p(ℓ_q)`**: for `0 < p, q < ∞` and measurable +`g_j : α → [0, ∞]` with `‖x ↦ ‖(g_j(x))_j‖_{ℓ_q}‖_p < ∞`, +`∫ ‖(0, …, 0, g_N(x), g_{N+1}(x), …)‖_{ℓ_q}^p dμ(x) → 0` as `N → ∞`: the integrands are at most +`‖(g_j(x))_j‖_{ℓ_q}^p`, which is integrable and hence finite almost everywhere, and tend to zero +wherever it is finite (`ENNReal.tendsto_lqNorm_ite_le`; Mathlib's +`tendsto_lintegral_of_dominated_convergence'`). -/ +theorem tendsto_lintegral_lqNorm_ite_le_rpow (hp0 : p ≠ 0) (hp : p ≠ ∞) (hq0 : q ≠ 0) + (hq : q ≠ ∞) {g : ℕ → α → ℝ≥0∞} (hg : ∀ j, AEMeasurable (g j) μ) + (hG : eLpNorm (fun x => lqNorm q fun j => g j x) p μ ≠ ∞) : + Tendsto (fun N => ∫⁻ x, (lqNorm q fun j => if N ≤ j then g j x else 0) ^ p.toReal ∂μ) + atTop (𝓝 0) := by + have hr : 0 < p.toReal := ENNReal.toReal_pos hp0 hp + have hGm : AEMeasurable (fun x => lqNorm q fun j => g j x) μ := aemeasurable_lqNorm_comp hg q + have hint : ∫⁻ x, (lqNorm q fun j => g j x) ^ p.toReal ∂μ ≠ ∞ := by + rw [← eLpNorm_rpow_eq_lintegral hp0 hp hGm] + exact ENNReal.rpow_ne_top_of_nonneg hr.le hG + have hFm : ∀ N, AEMeasurable (fun x => lqNorm q fun j => if N ≤ j then g j x else 0) μ := + fun N => aemeasurable_lqNorm_ite hg q + have hae : ∀ᵐ x ∂μ, Tendsto (fun N => (lqNorm q fun j => if N ≤ j then g j x else 0) ^ p.toReal) + atTop (𝓝 0) := by + filter_upwards [ae_lt_top' (hGm.pow_const p.toReal) hint] with x hx + have hx' := ((ENNReal.rpow_lt_top_iff_of_pos hr).1 hx).ne + have h := ((ENNReal.continuous_rpow_const (y := p.toReal)).tendsto 0).comp + (ENNReal.tendsto_lqNorm_ite_le hq0 hq hx') + rwa [ENNReal.zero_rpow_of_pos hr] at h + have hlim : Tendsto (fun N => ∫⁻ x, (lqNorm q fun j => if N ≤ j then g j x else 0) ^ p.toReal ∂μ) + atTop (𝓝 (∫⁻ _, 0 ∂μ)) := by + refine tendsto_lintegral_of_dominated_convergence' _ (fun N => (hFm N).pow_const _) + (fun N => ae_of_all _ fun x => ?_) hint hae + refine ENNReal.rpow_le_rpow (ENNReal.lqNorm_mono fun j => ?_) hr.le + split_ifs + · exact le_rfl + · exact zero_le + rwa [lintegral_zero] at hlim + +/-- **Tails in `L_p(ℓ_q)` tend to zero**: for `0 < p, q < ∞` and measurable `g_j : α → [0, ∞]` +with `‖x ↦ ‖(g_j(x))_j‖_{ℓ_q}‖_p < ∞`, +`‖x ↦ ‖(0, …, 0, g_N(x), g_{N+1}(x), …)‖_{ℓ_q}‖_p → 0` as `N → ∞` +(`MeasureTheory.tendsto_lintegral_lqNorm_ite_le_rpow`). -/ +theorem tendsto_eLpNorm_lqNorm_ite_le (hp0 : p ≠ 0) (hp : p ≠ ∞) (hq0 : q ≠ 0) (hq : q ≠ ∞) + {g : ℕ → α → ℝ≥0∞} (hg : ∀ j, AEMeasurable (g j) μ) + (hG : eLpNorm (fun x => lqNorm q fun j => g j x) p μ ≠ ∞) : + Tendsto (fun N => eLpNorm (fun x => lqNorm q fun j => if N ≤ j then g j x else 0) p μ) + atTop (𝓝 0) := by + have hr : 0 < p.toReal := ENNReal.toReal_pos hp0 hp + have h := ((ENNReal.continuous_rpow_const (y := 1 / p.toReal)).tendsto 0).comp + (tendsto_lintegral_lqNorm_ite_le_rpow hp0 hp hq0 hq hg hG) + rw [ENNReal.zero_rpow_of_pos (one_div_pos.2 hr)] at h + refine h.congr fun N => ?_ + rw [Function.comp_apply, ← eLpNorm_rpow_eq_lintegral hp0 hp (aemeasurable_lqNorm_ite hg q), + ← ENNReal.rpow_mul, mul_one_div_cancel hr.ne', ENNReal.rpow_one] + +/-- **Cauchy sequences from tails in `L_p(ℓ_q)`**: let `0 < p, q < ∞`, let `g_j : α → [0, ∞]` be +measurable with `‖x ↦ ‖(g_j(x))_j‖_{ℓ_q}‖_p < ∞`, and let `C < ∞`. A sequence `S` in a +pseudo-extended metric space with `edist(S_{N'}, S_N) ≤ C ‖x ↦ ‖(g_j(x))_{j ≥ N}‖_{ℓ_q}‖_p` for +all `N ≤ N'` (the terms `j < N` set to `0`) is a Cauchy sequence: two members beyond `N` are +within `2 C` times the `N`-th tail, and the tails tend to zero +(`MeasureTheory.tendsto_eLpNorm_lqNorm_ite_le`; Mathlib's `EMetric.cauchySeq_iff_le_tendsto_0`). -/ +theorem cauchySeq_of_edist_le_lqNorm_ite {E : Type*} [PseudoEMetricSpace E] {S : ℕ → E} + {C : ℝ≥0∞} (hC : C ≠ ∞) (hp0 : p ≠ 0) (hp : p ≠ ∞) (hq0 : q ≠ 0) (hq : q ≠ ∞) + {g : ℕ → α → ℝ≥0∞} (hg : ∀ j, AEMeasurable (g j) μ) + (hG : eLpNorm (fun x => lqNorm q fun j => g j x) p μ ≠ ∞) + (hS : ∀ N N', N ≤ N' → edist (S N') (S N) ≤ + C * eLpNorm (fun x => lqNorm q fun j => if N ≤ j then g j x else 0) p μ) : + CauchySeq S := by + have h := ENNReal.Tendsto.const_mul (tendsto_eLpNorm_lqNorm_ite_le hp0 hp hq0 hq hg hG) + (Or.inr hC) + rw [mul_zero] at h + refine EMetric.cauchySeq_iff_le_tendsto_0.2 ⟨fun N => C * eLpNorm (fun x => lqNorm q fun j => + if N ≤ j then g j x else 0) p μ + C * eLpNorm (fun x => lqNorm q fun j => + if N ≤ j then g j x else 0) p μ, fun n m N hn hm => ?_, by simpa using h.add h⟩ + exact (edist_triangle_right _ _ (S N)).trans (add_le_add (hS N n hn) (hS N m hm)) + +/-! ### Splitting off the first term -/ + +/-- **Minkowski's inequality for a pointwise bound**: for `1 ≤ p`, a measurable `B : α → [0, ∞]` +and measurable `F_i : α → [0, ∞]`, `i ∈ s` finite, the bound `B ≤ c ∑_i F_i` almost everywhere +gives `‖B‖_p ≤ c ∑_i ‖F_i‖_p` (Mathlib's `MeasureTheory.eLpNorm_const_mul_ennreal` and +`eLpNorm_sum_le`). -/ +theorem eLpNorm_le_const_mul_sum_of_ae_le (hp1 : 1 ≤ p) {ι : Type*} (s : Finset ι) + {B : α → ℝ≥0∞} {F : ι → α → ℝ≥0∞} (hB : AEMeasurable B μ) + (hF : ∀ i ∈ s, AEMeasurable (F i) μ) (c : ℝ≥0∞) (h : ∀ᵐ x ∂μ, B x ≤ c * ∑ i ∈ s, F i x) : + eLpNorm B p μ ≤ c * ∑ i ∈ s, eLpNorm (F i) p μ := by + calc eLpNorm B p μ ≤ eLpNorm (fun x => c * ∑ i ∈ s, F i x) p μ := by + refine eLpNorm_mono_eNorm_ae hB.aestronglyMeasurable ?_ + filter_upwards [h] with x hx + simpa only [eNorm_eq_self] using hx + _ = c * eLpNorm (∑ i ∈ s, F i) p μ := by + rw [eLpNorm_const_mul_ennreal (Finset.aemeasurable_fun_sum _ hF).aestronglyMeasurable, + Finset.sum_fn] + _ ≤ c * ∑ i ∈ s, eLpNorm (F i) p μ := by + gcongr + exact eLpNorm_sum_le hp1 + +/-- **The first term of a weighted family splits off**: for `1 ≤ p`, `1 ≤ q ≤ ∞`, `s ∈ ℝ` and +measurable `b_j : α → [0, ∞]`, +`‖x ↦ ‖(2^(js) b_j(x))_j‖_{ℓ_q}‖_p ≤ ‖b_0‖_p + ‖x ↦ ‖(2^((n+1)s) b_{n+1}(x))_n‖_{ℓ_q}‖_p`, +by the bound of the `ℓ_q` norm by its first term and its shifted tail +(`ENNReal.lqNorm_le_sum_range_add_shift`) and the triangle inequality in `L_p`. -/ +theorem eLpNorm_lqNorm_dyadicWeight_le_zero_add_succ (hp1 : 1 ≤ p) (hq : 1 ≤ q) (s : ℝ) + {b : ℕ → α → ℝ≥0∞} (hb : ∀ j, AEMeasurable (b j) μ) : + eLpNorm (fun x => lqNorm q fun j => dyadicWeight s j * b j x) p μ ≤ + eLpNorm (b 0) p μ + + eLpNorm (fun x => lqNorm q fun n => dyadicWeight s (n + 1) * b (n + 1) x) p μ := by + refine (eLpNorm_mono_eNorm (f := fun x => lqNorm q fun j => dyadicWeight s j * b j x) + (g := b 0 + fun x => lqNorm q fun n => dyadicWeight s (n + 1) * b (n + 1) x) + (aemeasurable_lqNorm_comp (fun j => (hb j).const_mul _) q).aestronglyMeasurable + fun x => ?_).trans (eLpNorm_add_le hp1) + simp only [eNorm_eq_self, Pi.add_apply] + refine (ENNReal.lqNorm_le_sum_range_add_shift hq _ 1).trans_eq ?_ + simp [ENNReal.dyadicWeight_zero_right] + +/-! ### Mixed norms of families and of dyadically weighted families -/ + +section DyadicFamily + +variable {s : ℝ} {u v w : ℕ → α → ℝ≥0∞} + +/-- **The triangle inequality for mixed norms**: for `1 ≤ p`, `1 ≤ q ≤ ∞` and families +`u_j, v_j, w_j : α → [0, ∞]` with `w` measurable and, almost everywhere, `w_j ≤ u_j + v_j` for +every `j`, `‖x ↦ ‖(w_j(x))_j‖_{ℓ_q}‖_p` is at most the sum of the same norms of `u` and `v`, by +the triangle inequalities in `ℓ_q` at every point and in `L_p`. -/ +theorem eLpNorm_lqNorm_le_add (hp1 : 1 ≤ p) (hq : 1 ≤ q) (hw : ∀ j, AEMeasurable (w j) μ) + (h : ∀ᵐ x ∂μ, ∀ j, w j x ≤ u j x + v j x) : + eLpNorm (fun x => lqNorm q fun j => w j x) p μ ≤ + eLpNorm (fun x => lqNorm q fun j => u j x) p μ + + eLpNorm (fun x => lqNorm q fun j => v j x) p μ := by + refine (eLpNorm_mono_eNorm_ae (g := (fun x => lqNorm q fun j => u j x) + + fun x => lqNorm q fun j => v j x) + (aemeasurable_lqNorm_comp hw q).aestronglyMeasurable ?_).trans (eLpNorm_add_le hp1) + filter_upwards [h] with x hx + simp only [eNorm_eq_self, Pi.add_apply] + exact (ENNReal.lqNorm_mono hx).trans (ENNReal.lqNorm_add_le hq _ _) + +/-- **Homogeneity of mixed norms**: for `c ∈ [0, ∞]` and families `u_j, w_j : α → [0, ∞]` with +`u` measurable and, almost everywhere, `w_j = c u_j` for every `j`, +`‖x ↦ ‖(w_j(x))_j‖_{ℓ_q}‖_p = c ‖x ↦ ‖(u_j(x))_j‖_{ℓ_q}‖_p`. -/ +theorem eLpNorm_lqNorm_eq_const_mul (c : ℝ≥0∞) (hu : ∀ j, AEMeasurable (u j) μ) + (h : ∀ᵐ x ∂μ, ∀ j, w j x = c * u j x) : + eLpNorm (fun x => lqNorm q fun j => w j x) p μ = + c * eLpNorm (fun x => lqNorm q fun j => u j x) p μ := by + rw [← eLpNorm_const_mul_ennreal (c := c) (aemeasurable_lqNorm_comp hu q).aestronglyMeasurable] + refine eLpNorm_congr_ae ?_ + filter_upwards [h] with x hx + rw [← ENNReal.lqNorm_const_mul] + exact congrArg (lqNorm q) (funext hx) + +/-- **Smoothness `0` for dyadic families**: for every family `u_j : α → [0, ∞]`, +`‖x ↦ ‖(2^(j·0) u_j(x))_j‖_{ℓ_q}‖_p = ‖x ↦ ‖(u_j(x))_j‖_{ℓ_q}‖_p`, since the weights are `1`. -/ +theorem eLpNorm_lqNorm_dyadicWeight_zero_left (u : ℕ → α → ℝ≥0∞) : + eLpNorm (fun x => lqNorm q fun j => dyadicWeight 0 j * u j x) p μ = + eLpNorm (fun x => lqNorm q fun j => u j x) p μ := by + simp only [ENNReal.dyadicWeight_zero_left, one_mul] + +/-- **Mixed norms decrease in `q`**: for `0 < q ≤ r ≤ ∞` and measurable `u_j : α → [0, ∞]`, +`‖x ↦ ‖(u_j(x))_j‖_{ℓ_r}‖_p ≤ ‖x ↦ ‖(u_j(x))_j‖_{ℓ_q}‖_p`, since `‖·‖_{ℓ_r} ≤ ‖·‖_{ℓ_q}` at +every point. -/ +theorem eLpNorm_lqNorm_mono_exponent {r : ℝ≥0∞} (hq0 : q ≠ 0) (hqr : q ≤ r) + (hu : ∀ j, AEMeasurable (u j) μ) : + eLpNorm (fun x => lqNorm r fun j => u j x) p μ ≤ + eLpNorm (fun x => lqNorm q fun j => u j x) p μ := + eLpNorm_mono_eNorm (aemeasurable_lqNorm_comp hu r).aestronglyMeasurable fun x => by + simp only [eNorm_eq_self] + exact ENNReal.lqNorm_le_lqNorm_of_le hq0 hqr _ + +/-- **Monotonicity in `s` for dyadic families**: for `s ≤ t` and measurable `u_j : α → [0, ∞]`, +`‖x ↦ ‖(2^(js) u_j(x))_j‖_{ℓ_q}‖_p ≤ ‖x ↦ ‖(2^(jt) u_j(x))_j‖_{ℓ_q}‖_p`, since +`2^(js) ≤ 2^(jt)`. -/ +theorem eLpNorm_lqNorm_dyadicWeight_mono_smoothness {t : ℝ} (hst : s ≤ t) + (hu : ∀ j, AEMeasurable (u j) μ) : + eLpNorm (fun x => lqNorm q fun j => dyadicWeight s j * u j x) p μ ≤ + eLpNorm (fun x => lqNorm q fun j => dyadicWeight t j * u j x) p μ := + eLpNorm_mono_eNorm + (aemeasurable_lqNorm_comp (fun j => (hu j).const_mul _) q).aestronglyMeasurable + fun x => by + simp only [eNorm_eq_self] + exact ENNReal.lqNorm_mono fun j => by gcongr; exact ENNReal.dyadicWeight_le_of_le hst j + +end DyadicFamily + +end MeasureTheory diff --git a/LeanPool/FunctionSpaces/Analysis/Lp/NormingFamily.lean b/LeanPool/FunctionSpaces/Analysis/Lp/NormingFamily.lean new file mode 100644 index 0000000000..798bf539a3 --- /dev/null +++ b/LeanPool/FunctionSpaces/Analysis/Lp/NormingFamily.lean @@ -0,0 +1,305 @@ +/- +Copyright (c) 2026 Mario Ullrich. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Mario Ullrich +-/ +module + +public import LeanPool.FunctionSpaces.Analysis.Lp.MixedNorms +public import Mathlib.MeasureTheory.Integral.Bochner.ContinuousLinearMap + +/- +Modified for Lean Pool: module names and imports adapted. +-/ + +/-! +# `L_p(ℓ_2)` norms by duality: the norming family + +For `1 < p < ∞` with conjugate exponent `p'`, the `L_p(ℓ_2)` norm of a family +`u = (u_j)_{j ∈ ℕ}` of complex functions in `L_p` that vanishes outside a finite set is bounded +by every `A ∈ [0, ∞]` that bounds all pairings `|∑_j ∫ u_j conj g_j|` by +`A ‖ ‖(g_j)_j‖_{ℓ_2} ‖_{p'}` (`MeasureTheory.eLpNorm_lqNorm_le_of_forall_enorm_sum_integral_le`), +and the `L_p` norm of one function in `L_p` likewise +(`MeasureTheory.eLpNorm_le_of_forall_enorm_integral_mul_conj_le`). The proof tests the pairing +on the **norming family** `u_j ‖(u_i)_i‖_{ℓ_2}^{p-2}` (`MeasureTheory.normingFamily`), which lies +in `L_{p'}(ℓ_2)` (`MeasureTheory.eLpNorm_lqNorm_normingFamily`, +`MeasureTheory.memLp_normingFamily`) and pairs with `u` to `∫ ‖(u_i)_i‖_{ℓ_2}^p` +(`MeasureTheory.enorm_sum_integral_mul_conj_normingFamily`), and cancels a power in Hölder's +inequality with `ENNReal.le_rpow_mul_of_le_mul_rpow` from `FunctionSpaces.Analysis.Lp.MixedNorms`. + +The file also has Hölder's inequality for functions with values in `[0, ∞]` in `L_p` norms +(`MeasureTheory.lintegral_mul_le_eLpNorm_mul_eLpNorm`), the finiteness of the `L_p(ℓ_2)` norm of +a family in `L_p` that vanishes outside a finite set +(`MeasureTheory.eLpNorm_lqNorm_ne_top_of_finite`), and membership in `L_p` of each member of a +family whose pointwise `ℓ_2` norm has finite `p`-th power integral +(`MeasureTheory.memLp_of_lintegral_lqNorm_rpow_ne_top`). +-/ + +@[expose] public section + +open MeasureTheory +open scoped ENNReal ComplexConjugate +open ENNReal (lqNorm) + +namespace MeasureTheory + +variable {α : Type*} [MeasurableSpace α] {μ : Measure α} + +/-! ### Hölder's inequality and families vanishing outside a finite set -/ + +/-- **Hölder's inequality for functions with values in `[0, ∞]`, in `L_p` norms**: for +conjugate exponents `1 < p, q < ∞` and almost everywhere measurable `F, G`, +`∫ F G ≤ ‖F‖_p ‖G‖_q`. This is Mathlib's `ENNReal.lintegral_mul_le_Lp_mul_Lq`, which writes the +right side with the integrals `(∫ F^p)^(1/p) (∫ G^q)^(1/q)` and real exponents. -/ +theorem lintegral_mul_le_eLpNorm_mul_eLpNorm {p q : ℝ≥0∞} [p.HolderConjugate q] (hp : p ≠ ∞) + (hq : q ≠ ∞) {F G : α → ℝ≥0∞} (hF : AEMeasurable F μ) (hG : AEMeasurable G μ) : + ∫⁻ x, F x * G x ∂μ ≤ eLpNorm F p μ * eLpNorm G q μ := by + rw [eLpNorm_eq_lintegral_rpow_eNorm_toReal (ENNReal.HolderConjugate.ne_zero p q) hp + hF.aestronglyMeasurable, + eLpNorm_eq_lintegral_rpow_eNorm_toReal (ENNReal.HolderConjugate.ne_zero q p) hq + hG.aestronglyMeasurable] + simp only [eNorm_eq_self] + exact ENNReal.lintegral_mul_le_Lp_mul_Lq μ (ENNReal.HolderConjugate.toReal_of_ne_top hp hq) hF hG + +omit [MeasurableSpace α] in +/-- A family of complex functions that vanishes outside a finite set `s` has finite pointwise +`ℓ_2` norm: `‖(u_j(x))_j‖_{ℓ_2} ≤ ∑_{j ∈ s} |u_j(x)| < ∞` (`ENNReal.lqNorm_le_sum_of_eq_zero`). -/ +theorem lqNorm_enorm_ne_top_of_finite (s : Finset ℕ) {u : ℕ → α → ℂ} (hus : ∀ j ∉ s, u j = 0) + (x : α) : lqNorm 2 (fun j => ‖u j x‖ₑ) ≠ ∞ := + ne_top_of_le_ne_top (ENNReal.sum_lt_top.2 fun j (_ : j ∈ s) => eNorm_lt_top).ne + (ENNReal.lqNorm_le_sum_of_eq_zero one_le_two s fun j hj => by simp [hus j hj]) + +/-- **A family in `L_p` that vanishes outside a finite set lies in `L_p(ℓ_2)`**: if +`u_j ∈ L_p(μ)` for every `j`, `p ≥ 1`, and `u_j = 0` for `j` outside a finite set `s`, then +`‖ ‖(u_j)_j‖_{ℓ_2} ‖_p < ∞`, since `‖(u_j(x))_j‖_{ℓ_2} ≤ ∑_{j ∈ s} |u_j(x)|` and Minkowski's +inequality bounds the right side by `∑_{j ∈ s} ‖u_j‖_p`. -/ +theorem eLpNorm_lqNorm_ne_top_of_finite {p : ℝ≥0∞} (hp1 : 1 ≤ p) (s : Finset ℕ) + {u : ℕ → α → ℂ} (hu : ∀ j, MemLp (u j) p μ) (hus : ∀ j ∉ s, u j = 0) : + eLpNorm (fun x => lqNorm 2 fun j => ‖u j x‖ₑ) p μ ≠ ∞ := by + have hm : AEMeasurable (fun x => lqNorm 2 fun j => ‖u j x‖ₑ) μ := + aemeasurable_lqNorm_comp (fun j => (hu j).aestronglyMeasurable.eNorm) 2 + have hsum : eLpNorm (fun x => ∑ j ∈ s, ‖u j x‖ₑ) p μ ≤ ∑ j ∈ s, eLpNorm (u j) p μ := by + calc eLpNorm (fun x => ∑ j ∈ s, ‖u j x‖ₑ) p μ + = eLpNorm (∑ j ∈ s, fun x => ‖u j x‖ₑ) p μ := by + congr 1 + funext x + simp [Finset.sum_apply] + _ ≤ ∑ j ∈ s, eLpNorm (fun x => ‖u j x‖ₑ) p μ := eLpNorm_sum_le hp1 + _ = ∑ j ∈ s, eLpNorm (u j) p μ := + Finset.sum_congr rfl fun j _ => eLpNorm_eNorm _ (hu j).aestronglyMeasurable + refine ne_top_of_le_ne_top ?_ ((eLpNorm_mono_eNorm hm.aestronglyMeasurable fun x => ?_).trans + hsum) + · exact (ENNReal.sum_lt_top.2 fun j _ => (hu j).eLpNorm_lt_top).ne + · simpa only [eNorm_eq_self] using + ENNReal.lqNorm_le_sum_of_eq_zero one_le_two s fun j hj => by simp [hus j hj] + +/-- A member of a family lies in `L_p` if the pointwise `ℓ_2` norm of the family has finite +`p`-th power integral, `0 < p < ∞`, since `|g_j| ≤ ‖(g_i)_i‖_{ℓ_2}`; the member is assumed +almost everywhere strongly measurable. -/ +theorem memLp_of_lintegral_lqNorm_rpow_ne_top {p : ℝ≥0∞} (hp0 : p ≠ 0) (hp : p ≠ ∞) + {g : ℕ → α → ℂ} {j : ℕ} (hg : AEStronglyMeasurable (g j) μ) + (hG : ∫⁻ x, (lqNorm 2 fun i => ‖g i x‖ₑ) ^ p.toReal ∂μ ≠ ∞) : MemLp (g j) p μ := + memLp_iff.2 ((eLpNorm_lt_top_iff_lintegral_rpow_eNorm_lt_top hp0 hp hg).2 (lt_of_le_of_lt + (lintegral_mono fun x => ENNReal.rpow_le_rpow + (ENNReal.le_lqNorm two_ne_zero (fun i => ‖g i x‖ₑ) j) ENNReal.toReal_nonneg) hG.lt_top)) + +/-- A family in `L_p`, `1 ≤ p < ∞`, that vanishes outside a finite set `s` has +`∫ ‖(u_j)_j‖_{ℓ_2}^p dμ < ∞` (`MeasureTheory.eLpNorm_lqNorm_ne_top_of_finite`). -/ +theorem lintegral_lqNorm_rpow_ne_top_of_finite {p : ℝ≥0∞} (hp1 : 1 ≤ p) (hp : p ≠ ∞) + (s : Finset ℕ) {u : ℕ → α → ℂ} (hu : ∀ j, MemLp (u j) p μ) (hus : ∀ j ∉ s, u j = 0) : + ∫⁻ x, (lqNorm 2 fun j => ‖u j x‖ₑ) ^ p.toReal ∂μ ≠ ∞ := by + rw [← eLpNorm_rpow_eq_lintegral (zero_lt_one.trans_le hp1).ne' hp + (aemeasurable_lqNorm_comp (fun j => (hu j).aestronglyMeasurable.eNorm) 2)] + exact ENNReal.rpow_ne_top_of_nonneg ENNReal.toReal_nonneg + (eLpNorm_lqNorm_ne_top_of_finite hp1 s hu hus) + +/-! ### The norming family -/ + +/-- The **norming family** of a family `u = (u_j)_{j ∈ ℕ}` of functions `α → ℂ` for the real +exponent `p`: `N_j(x) = u_j(x) ‖(u_i(x))_i‖_{ℓ_2}^{p-2}`. For `u` in `L_p(ℓ_2)` vanishing +outside a finite set it lies in `L_{p'}(ℓ_2)`, `p'` the conjugate exponent, and its pairing +with `u` is `∫ ‖(u_i)_i‖_{ℓ_2}^p`, so it realises the `L_p(ℓ_2)` norm by duality. -/ +noncomputable def normingFamily (p : ℝ) (u : ℕ → α → ℂ) (j : ℕ) (x : α) : ℂ := + u j x * (((lqNorm 2 fun i => ‖u i x‖ₑ).toReal ^ (p - 2) : ℝ) : ℂ) + +/-- The members of the norming family are almost everywhere strongly measurable if the members +of `u` are. -/ +theorem aestronglyMeasurable_normingFamily {u : ℕ → α → ℂ} + (hu : ∀ j, AEStronglyMeasurable (u j) μ) (p : ℝ) (j : ℕ) : + AEStronglyMeasurable (normingFamily p u j) μ := + (hu j).mul (Complex.measurable_ofReal.comp_aemeasurable + ((ENNReal.measurable_toReal.comp_aemeasurable + (aemeasurable_lqNorm_comp (fun i => (hu i).eNorm) 2)).pow_const _)).aestronglyMeasurable + +omit [MeasurableSpace α] in +/-- **The size of the norming family**: for `p > 1` and every point `x` with +`‖(u_i(x))_i‖_{ℓ_2} < ∞`, `‖(N_j(x))_j‖_{ℓ_2} = ‖(u_i(x))_i‖_{ℓ_2}^{p-1}`, since every member +is multiplied by `‖(u_i(x))_i‖_{ℓ_2}^{p-2}`. -/ +theorem lqNorm_normingFamily {p : ℝ} (hp : 1 < p) (u : ℕ → α → ℂ) {x : α} + (hx : lqNorm 2 (fun i => ‖u i x‖ₑ) ≠ ∞) : + lqNorm 2 (fun j => ‖normingFamily p u j x‖ₑ) = lqNorm 2 (fun i => ‖u i x‖ₑ) ^ (p - 1) := by + have h1 : ∀ j, ‖normingFamily p u j x‖ₑ = + ENNReal.ofReal ((lqNorm 2 fun i => ‖u i x‖ₑ).toReal ^ (p - 2)) * ‖u j x‖ₑ := fun j => by + rw [normingFamily, eNorm_mul, mul_comm] + congr 1 + rw [← ofReal_norm, Complex.norm_real, + Real.norm_of_nonneg (Real.rpow_nonneg ENNReal.toReal_nonneg _)] + simp_rw [h1] + rw [ENNReal.lqNorm_const_mul] + generalize lqNorm 2 (fun i => ‖u i x‖ₑ) = U at hx ⊢ + rcases eq_or_ne U 0 with rfl | h0 + · rw [mul_zero, ENNReal.zero_rpow_of_pos (by linarith)] + rw [ENNReal.toReal_rpow, ENNReal.ofReal_toReal (ENNReal.rpow_ne_top_of_ne_zero h0 hx)] + calc U ^ (p - 2) * U = U ^ (p - 2) * U ^ (1 : ℝ) := by rw [ENNReal.rpow_one] + _ = U ^ (p - 2 + 1) := (ENNReal.rpow_add _ _ h0 hx).symm + _ = U ^ (p - 1) := by ring_nf + +omit [MeasurableSpace α] in +/-- **The pairing of a family with its norming family**: if `u_j(x) = 0` for every `j` outside a +finite set `s`, then `∑_{j ∈ s} u_j(x) conj N_j(x) = ‖(u_i(x))_i‖_{ℓ_2}^p` for every `p > 0`, +since `u_j conj u_j = |u_j|²` and `∑_{j ∈ s} |u_j(x)|² = ‖(u_i(x))_i‖_{ℓ_2}²`. -/ +theorem sum_mul_conj_normingFamily {p : ℝ} (hp : 0 < p) (s : Finset ℕ) (u : ℕ → α → ℂ) + {x : α} (hus : ∀ j ∉ s, u j x = 0) : + ∑ j ∈ s, u j x * conj (normingFamily p u j x) = + (((lqNorm 2 fun i => ‖u i x‖ₑ).toReal ^ p : ℝ) : ℂ) := by + have hsq : (lqNorm 2 fun i => ‖u i x‖ₑ).toReal ^ 2 = ∑ j ∈ s, ‖u j x‖ ^ 2 := by + have h := ENNReal.lqNorm_two_sq (fun i => ‖u i x‖ₑ) + rw [tsum_eq_sum (s := s) fun j hj => by simp [hus j hj]] at h + have h' := congrArg ENNReal.toReal h + rw [ENNReal.toReal_pow, ENNReal.toReal_sum fun j _ => by finiteness] at h' + simpa only [ENNReal.toReal_pow, toReal_eNorm] using h' + have hr : 0 ≤ (lqNorm 2 fun i => ‖u i x‖ₑ).toReal := ENNReal.toReal_nonneg + simp only [normingFamily] + generalize (lqNorm 2 fun i => ‖u i x‖ₑ).toReal = r at hr hsq ⊢ + have hterm : ∀ j, u j x * conj (u j x * ((r ^ (p - 2) : ℝ) : ℂ)) = + ((‖u j x‖ ^ 2 * r ^ (p - 2) : ℝ) : ℂ) := fun j => by + rw [map_mul, Complex.conj_ofReal, ← mul_assoc, Complex.mul_conj, Complex.normSq_eq_norm_sq] + push_cast + ring + rw [Finset.sum_congr rfl fun j _ => hterm j, ← Complex.ofReal_sum, ← Finset.sum_mul, ← hsq, + ← Real.rpow_two, ← Real.rpow_add' hr (by linarith : (0 : ℝ) < 2 + (p - 2)).ne', + show (2 : ℝ) + (p - 2) = p by ring] + +/-- **The `L_q(ℓ_2)` norm of the norming family**: let `1 < p < ∞` with conjugate exponent `q`, +and let the `u_j` be almost everywhere strongly measurable with `‖(u_j(x))_j‖_{ℓ_2} < ∞` at +every point. Then `‖ ‖(N_j)_j‖_{ℓ_2} ‖_q = (∫ ‖(u_j)_j‖_{ℓ_2}^p)^{1/q}`, by +`MeasureTheory.lqNorm_normingFamily` and `(p - 1) q = p`. -/ +theorem eLpNorm_lqNorm_normingFamily {p q : ℝ≥0∞} [p.HolderConjugate q] (hp1 : 1 < p) + (hp : p ≠ ∞) {u : ℕ → α → ℂ} (hu : ∀ j, AEStronglyMeasurable (u j) μ) + (hfin : ∀ x, lqNorm 2 (fun j => ‖u j x‖ₑ) ≠ ∞) : + eLpNorm (fun x => lqNorm 2 fun j => ‖normingFamily p.toReal u j x‖ₑ) q μ = + (∫⁻ x, (lqNorm 2 fun j => ‖u j x‖ₑ) ^ p.toReal ∂μ) ^ (1 / q.toReal) := by + have hq : q ≠ ∞ := ((ENNReal.HolderConjugate.lt_top_iff_one_lt q p).2 hp1).ne + have hpq := ENNReal.HolderConjugate.toReal_of_ne_top hp hq + have hGm : AEMeasurable (fun x => lqNorm 2 fun j => ‖normingFamily p.toReal u j x‖ₑ) μ := + aemeasurable_lqNorm_comp (fun j => (aestronglyMeasurable_normingFamily hu _ j).eNorm) 2 + rw [eLpNorm_eq_lintegral_rpow_eNorm_toReal (ENNReal.HolderConjugate.ne_zero q p) hq + hGm.aestronglyMeasurable] + simp only [eNorm_eq_self, lqNorm_normingFamily (ENNReal.one_lt_toReal hp1 hp) u (hfin _)] + congr 1 + refine lintegral_congr fun x => ?_ + rw [← ENNReal.rpow_mul, hpq.sub_one_mul_conj] + +/-- **The norming family lies in `L_q`**: let `1 < p < ∞` with conjugate exponent `q`, and let +`u_j ∈ L_p(μ)` for every `j` with `u_j = 0` for `j` outside a finite set `s`. Then every member +`N_j` of the norming family lies in `L_q(μ)`, since `|N_j| ≤ ‖(N_i)_i‖_{ℓ_2}`. -/ +theorem memLp_normingFamily {p q : ℝ≥0∞} [p.HolderConjugate q] (hp1 : 1 < p) (hp : p ≠ ∞) + (s : Finset ℕ) {u : ℕ → α → ℂ} (hu : ∀ j, MemLp (u j) p μ) (hus : ∀ j ∉ s, u j = 0) + (j : ℕ) : MemLp (normingFamily p.toReal u j) q μ := by + have hgm := aestronglyMeasurable_normingFamily (fun i => (hu i).aestronglyMeasurable) p.toReal + refine memLp_iff.2 (lt_of_le_of_lt (eLpNorm_mono_eNorm (hgm j) + (g := fun x => lqNorm 2 fun i => ‖normingFamily p.toReal u i x‖ₑ) fun x => ?_) ?_) + · rw [eNorm_eq_self] + exact ENNReal.le_lqNorm two_ne_zero (fun i => ‖normingFamily p.toReal u i x‖ₑ) j + · rw [eLpNorm_lqNorm_normingFamily hp1 hp (fun i => (hu i).aestronglyMeasurable) + (lqNorm_enorm_ne_top_of_finite s hus)] + exact (ENNReal.rpow_ne_top_of_nonneg (by positivity) + (lintegral_lqNorm_rpow_ne_top_of_finite hp1.le hp s hu hus)).lt_top + +/-- **The pairing with the norming family**: let `1 < p < ∞` with conjugate exponent `q`, and +let `u_j ∈ L_p(μ)` for every `j` with `u_j = 0` for `j` outside a finite set `s`. Then +`|∑_{j ∈ s} ∫ u_j conj N_j dμ| = ∫ ‖(u_j)_j‖_{ℓ_2}^p dμ`, the integral of the pointwise +identity `MeasureTheory.sum_mul_conj_normingFamily`, a nonnegative real function. -/ +theorem enorm_sum_integral_mul_conj_normingFamily {p q : ℝ≥0∞} [p.HolderConjugate q] + (hp1 : 1 < p) (hp : p ≠ ∞) (s : Finset ℕ) {u : ℕ → α → ℂ} (hu : ∀ j, MemLp (u j) p μ) + (hus : ∀ j ∉ s, u j = 0) : + ‖∑ j ∈ s, ∫ x, u j x * conj (normingFamily p.toReal u j x) ∂μ‖ₑ = + ∫⁻ x, (lqNorm 2 fun j => ‖u j x‖ₑ) ^ p.toReal ∂μ := by + have hUm : AEMeasurable (fun x => lqNorm 2 fun j => ‖u j x‖ₑ) μ := + aemeasurable_lqNorm_comp (fun j => (hu j).aestronglyMeasurable.eNorm) 2 + rw [← integral_finsetSum (f := fun j x => u j x * conj (normingFamily p.toReal u j x)) s + fun j _ => (hu j).integrable_mul (memLp_normingFamily (q := q) hp1 hp s hu hus j).star] + have hpt : ∀ x, ∑ j ∈ s, u j x * conj (normingFamily p.toReal u j x) = + ((((lqNorm 2 fun j => ‖u j x‖ₑ) ^ p.toReal).toReal : ℝ) : ℂ) := fun x => by + rw [sum_mul_conj_normingFamily (by linarith [ENNReal.one_lt_toReal hp1 hp]) s u + fun j hj => by rw [hus j hj]; rfl, ENNReal.toReal_rpow] + simp_rw [hpt] + rw [integral_complex_ofReal, integral_toReal (hUm.pow_const _) + (ae_of_all _ fun x => (ENNReal.rpow_ne_top_of_nonneg ENNReal.toReal_nonneg + (lqNorm_enorm_ne_top_of_finite s hus x)).lt_top), + ← ofReal_norm, Complex.norm_real, Real.norm_of_nonneg ENNReal.toReal_nonneg, + ENNReal.ofReal_toReal (lintegral_lqNorm_rpow_ne_top_of_finite hp1.le hp s hu hus)] + +/-! ### `L_p` norms by duality -/ + +/-- **The `L_p(ℓ_2)` norm by duality**: let `1 < p < ∞` with conjugate exponent `q`, let +`u_j ∈ L_p(μ)` for every `j` with `u_j = 0` for `j` outside a finite set `s`, and let +`A ∈ [0, ∞]`. If `|∑_{j ∈ s} ∫ u_j conj g_j dμ| ≤ A ‖ ‖(g_j)_j‖_{ℓ_2} ‖_q` for every family of +`g_j ∈ L_q(μ)`, then `‖ ‖(u_j)_j‖_{ℓ_2} ‖_p ≤ A`. The norming family gives `X ≤ A X^{1/q}` for +`X = ∫ ‖(u_j)_j‖_{ℓ_2}^p < ∞`, so `X^{1/p} ≤ A` (`ENNReal.le_rpow_mul_of_le_mul_rpow`). -/ +theorem eLpNorm_lqNorm_le_of_forall_enorm_sum_integral_le {p q : ℝ≥0∞} [p.HolderConjugate q] + (hp1 : 1 < p) (hp : p ≠ ∞) (s : Finset ℕ) {u : ℕ → α → ℂ} (hu : ∀ j, MemLp (u j) p μ) + (hus : ∀ j ∉ s, u j = 0) {A : ℝ≥0∞} + (hA : ∀ g : ℕ → α → ℂ, (∀ j, MemLp (g j) q μ) → + ‖∑ j ∈ s, ∫ x, u j x * conj (g j x) ∂μ‖ₑ ≤ + A * eLpNorm (fun x => lqNorm 2 fun j => ‖g j x‖ₑ) q μ) : + eLpNorm (fun x => lqNorm 2 fun j => ‖u j x‖ₑ) p μ ≤ A := by + have hq : q ≠ ∞ := ((ENNReal.HolderConjugate.lt_top_iff_one_lt q p).2 hp1).ne + have hpq := ENNReal.HolderConjugate.toReal_of_ne_top hp hq + have hP : 1 < p.toReal := ENNReal.one_lt_toReal hp1 hp + have hUm : AEMeasurable (fun x => lqNorm 2 fun j => ‖u j x‖ₑ) μ := + aemeasurable_lqNorm_comp (fun j => (hu j).aestronglyMeasurable.eNorm) 2 + have hle := hA _ (memLp_normingFamily hp1 hp s hu hus) + rw [enorm_sum_integral_mul_conj_normingFamily (q := q) hp1 hp s hu hus, + eLpNorm_lqNorm_normingFamily hp1 hp (fun j => (hu j).aestronglyMeasurable) + (lqNorm_enorm_ne_top_of_finite s hus)] at hle + have hXle := ENNReal.le_rpow_mul_of_le_mul_rpow (K := A) (A := 1) hpq + (lintegral_lqNorm_rpow_ne_top_of_finite hp1.le hp s hu hus) + (by rwa [ENNReal.one_rpow, mul_one]) + rw [mul_one] at hXle + rw [eLpNorm_eq_lintegral_rpow_eNorm_toReal (ENNReal.HolderConjugate.ne_zero p q) hp + hUm.aestronglyMeasurable] + simp only [eNorm_eq_self] + calc (∫⁻ x, (lqNorm 2 fun j => ‖u j x‖ₑ) ^ p.toReal ∂μ) ^ (1 / p.toReal) + ≤ (A ^ p.toReal) ^ (1 / p.toReal) := ENNReal.rpow_le_rpow hXle (by positivity) + _ = A := by rw [one_div, ENNReal.rpow_rpow_inv (by linarith)] + +/-- **The `L_p` norm by duality**: let `1 < p < ∞` with conjugate exponent `q`, `v ∈ L_p(μ)` +and `A ∈ [0, ∞]`. If `|∫ v conj g dμ| ≤ A ‖g‖_q` for every `g ∈ L_q(μ)`, then `‖v‖_p ≤ A`: the +case of one function in `MeasureTheory.eLpNorm_lqNorm_le_of_forall_enorm_sum_integral_le`, +where the norming function is `v |v|^{p-2}`; the `ℓ_2` norm of `(v(x), 0, 0, …)` is `|v(x)|` +(`ENNReal.lqNorm_ite_eq`). -/ +theorem eLpNorm_le_of_forall_enorm_integral_mul_conj_le {p q : ℝ≥0∞} [p.HolderConjugate q] + (hp1 : 1 < p) (hp : p ≠ ∞) {v : α → ℂ} (hv : MemLp v p μ) {A : ℝ≥0∞} + (hA : ∀ g : α → ℂ, MemLp g q μ → ‖∫ x, v x * conj (g x) ∂μ‖ₑ ≤ A * eLpNorm g q μ) : + eLpNorm v p μ ≤ A := by + have hu : ∀ j, MemLp (fun x => if j = 0 then v x else 0) p μ := fun j => by + by_cases hj : j = 0 + · simpa [hj] using hv + · simp [hj] + have h := eLpNorm_lqNorm_le_of_forall_enorm_sum_integral_le hp1 hp {0} + (u := fun j x => if j = 0 then v x else 0) hu + (fun j hj => by funext x; simp [Finset.mem_singleton.not.1 hj]) fun g hg => by + simp only [Finset.sum_singleton, ↓reduceIte] + refine (hA (g 0) (hg 0)).trans ?_ + gcongr + exact eLpNorm_mono_eNorm (hg 0).aestronglyMeasurable fun x => by + rw [eNorm_eq_self] + exact ENNReal.le_lqNorm two_ne_zero (fun j => ‖g j x‖ₑ) 0 + have hpt : (fun x => lqNorm 2 fun j => ‖(if j = 0 then v x else 0)‖ₑ) = fun x => ‖v x‖ₑ := by + funext x + simp_rw [apply_ite (fun z : ℂ => ‖z‖ₑ), eNorm_zero] + exact ENNReal.lqNorm_ite_eq two_ne_zero 0 _ + rwa [hpt, eLpNorm_eNorm _ hv.aestronglyMeasurable] at h + +end MeasureTheory diff --git a/LeanPool/FunctionSpaces/Analysis/Lp/WeakType.lean b/LeanPool/FunctionSpaces/Analysis/Lp/WeakType.lean new file mode 100644 index 0000000000..2536ef8cb4 --- /dev/null +++ b/LeanPool/FunctionSpaces/Analysis/Lp/WeakType.lean @@ -0,0 +1,220 @@ +/- +Copyright (c) 2026 Mario Ullrich. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Mario Ullrich +-/ +module + +public import Mathlib.MeasureTheory.Function.LpSeminorm.ChebyshevMarkov + +/- +Modified for Lean Pool: module names and imports adapted. + +Definitions and lemma statements from the Carleson project (L. Becker, M. I. de Frutos-Fernández, +L. Diedering, F. van Doorn, S. Gouëzel, E. Karunus, E. van de Meent, P. Monticone, J. Mulder-Sohn, +J. Portegies, J. Roos, M. Rothgang, J. Sundstrom, J. Tan), Apache 2.0. +-/ + +/-! +# Weak `L_p` norms and operators of weak and strong type + +These are the definitions of the Carleson project (`https://github.com/fpvandoorn/carleson`, +commit `12fb202`, files `Carleson/ToMathlib/WeakType.lean` and +`Carleson/ToMathlib/RealInterpolation/Main.lean`, Apache 2.0), with the same names and +statements, together with the lemmas `wnorm_ne_top`, `wnorm'_le_eLpNorm'`, `wnorm_le_eLpNorm`, +`MemLp.memWLp`, `HasWeakType.memWLp`, `HasStrongType.memLp` and `HasStrongType.hasWeakType` of +the first file; the distribution function is the Carleson project's `μ {x | t < ‖f x‖ₑ}`. They +are intended for Mathlib; when Mathlib has them, this file is replaced by the Mathlib import. +The proofs and docstrings are adapted to Mathlib v4.35.0 and to this project's conventions. +For a function `f : α → ε` into a type with an extended norm `‖·‖ₑ`, such as `ℂ` or `[0, ∞]`: + +* the distribution function `MeasureTheory.distribution f t μ = μ {x | t < ‖f x‖ₑ}`, with its + monotonicity, the distribution of a sum (`MeasureTheory.distribution_add_le_of_enorm`) and + Chebyshev's inequality (`MeasureTheory.distribution_le_inv_rpow_mul_eLpNorm_rpow`; its + lintegral form `MeasureTheory.measure_lt_le_inv_rpow_mul_lintegral` is in + `FunctionSpaces.Analysis.Lp.Marcinkiewicz`, next to the level-set lemmas that use it); +* the weak `L_p` norm `MeasureTheory.wnorm f p μ = sup_t t μ{‖f‖ > t}^{1/p}` (the essential + supremum for `p = ∞`), bounded by the `L_p` norm (`MeasureTheory.wnorm_le_eLpNorm`), and + weak `L_p` (`MeasureTheory.MemWLp`); +* operators of weak type and of strong type `(p, q)` (`MeasureTheory.HasWeakType`, + `MeasureTheory.HasStrongType`), with strong type implying weak type + (`MeasureTheory.HasStrongType.hasWeakType`), and almost everywhere subadditive operators + (`MeasureTheory.AESubadditiveOn`). +-/ + +@[expose] public section + +noncomputable section + +open scoped NNReal ENNReal + +namespace MeasureTheory + +variable {α α' ε ε₁ ε₂ : Type*} {m : MeasurableSpace α} {m' : MeasurableSpace α'} + {p p' : ℝ≥0∞} {c : ℝ≥0∞} {μ : Measure α} {ν : Measure α'} {t s : ℝ≥0∞} + +section ENorm + +variable [ENorm ε] {f : α → ε} + +/-- The **distribution function** of `f`: the measure `μ {x | ‖f x‖ > t}` of the set where the +extended norm of `f` exceeds the level `t ∈ [0, ∞]`. -/ +def distribution (f : α → ε) (t : ℝ≥0∞) (μ : Measure α) : ℝ≥0∞ := + μ {x | t < ‖f x‖ₑ} + +/-- No extended norm exceeds `∞`, so the distribution function vanishes at the level `∞`. -/ +@[simp] +lemma distribution_top (f : α → ε) (μ : Measure α) : distribution f ∞ μ = 0 := by + simp [distribution] + +/-- **Monotonicity in the function**: if `‖f‖ ≤ ‖g‖` almost everywhere, then the distribution +function of `f` is at most that of `g` at every level. -/ +lemma distribution_mono_left {ε' : Type*} [ENorm ε'] {g : α → ε'} + (h : ∀ᵐ x ∂μ, ‖f x‖ₑ ≤ ‖g x‖ₑ) : distribution f t μ ≤ distribution g t μ := + measure_mono_ae (h.mono fun _ hx hxt => lt_of_lt_of_le hxt hx) + +/-- **Antitonicity in the level**: the distribution function decreases as the level grows. -/ +lemma distribution_mono_right (h : t ≤ s) : distribution f s μ ≤ distribution f t μ := + measure_mono fun _ hx => lt_of_le_of_lt h hx + +/-- **The distribution of a sum**: if `‖f‖ ≤ c (‖g₁‖ + ‖g₂‖)` almost everywhere, then +`μ{‖f‖ > c (t + s)} ≤ μ{‖g₁‖ > t} + μ{‖g₂‖ > s}`, since `‖g₁‖ ≤ t` and `‖g₂‖ ≤ s` force +`‖f‖ ≤ c (t + s)`. -/ +lemma distribution_add_le_of_enorm {ε' ε'' : Type*} [ENorm ε'] [ENorm ε''] {g₁ : α → ε'} + {g₂ : α → ε''} (h : ∀ᵐ x ∂μ, ‖f x‖ₑ ≤ c * (‖g₁ x‖ₑ + ‖g₂ x‖ₑ)) : + distribution f (c * (t + s)) μ ≤ distribution g₁ t μ + distribution g₂ s μ := by + unfold distribution + refine (measure_mono_ae (h.mono fun x hx hxt => ?_)).trans (measure_union_le _ _) + by_contra hnot + simp only [Set.mem_union, Set.mem_ofPred_eq, not_or, not_lt] at hnot + have : c * (‖g₁ x‖ₑ + ‖g₂ x‖ₑ) ≤ c * (t + s) := mul_le_mul_right (add_le_add hnot.1 hnot.2) c + exact absurd (lt_of_lt_of_le hxt (hx.trans this)) (lt_irrefl _) + +/-- The **weak `L_p` norm** for a real exponent: `sup_{t ≥ 0} t μ{‖f‖ > t}^{1/p}`. -/ +def wnorm' (f : α → ε) (p : ℝ) (μ : Measure α) : ℝ≥0∞ := + ⨆ t : ℝ≥0, t * distribution f t μ ^ (p : ℝ)⁻¹ + +/-- The **weak `L_p` norm**: `sup_{t ≥ 0} t μ{‖f‖ > t}^{1/p}` for `p < ∞`, and the essential +supremum of `‖f‖` for `p = ∞`. -/ +def wnorm (f : α → ε) (p : ℝ≥0∞) (μ : Measure α) : ℝ≥0∞ := + if p = ∞ then eLpNormEssSup f μ else wnorm' f (p.toReal) μ + +/-- For a finite exponent the weak `L_p` norm is the supremum of `t μ{‖f‖ > t}^{1/p}`. -/ +lemma wnorm_ne_top (h : p ≠ ⊤) : wnorm f p μ = wnorm' f p.toReal μ := by simp [wnorm, h] + +/-- **The weak `L_1` norm bounds every level**: `t μ{‖f‖ > t} ≤ ‖f‖_{1,∞}` for every +`t ∈ [0, ∞]`. -/ +lemma mul_distribution_le_wnorm_one (f : α → ε) (t : ℝ≥0∞) : + t * distribution f t μ ≤ wnorm f 1 μ := by + rcases eq_or_ne t ∞ with rfl | ht + · simp + rw [wnorm_ne_top ENNReal.one_ne_top, ENNReal.toReal_one, wnorm', ← ENNReal.coe_toNNReal ht] + refine le_trans (le_of_eq ?_) (le_iSup _ t.toNNReal) + rw [inv_one, ENNReal.rpow_one] + +/-- A function is in **weak `L_p`** if it is almost everywhere strongly measurable and has finite +weak `L_p` norm. -/ +def MemWLp [TopologicalSpace ε] (f : α → ε) (p : ℝ≥0∞) (μ : Measure α) : Prop := + AEStronglyMeasurable f μ ∧ wnorm f p μ < ∞ + +end ENorm + +section ContinuousENorm + +variable [TopologicalSpace ε] [ContinuousENorm ε] {f : α → ε} + +/-- **Chebyshev's inequality** for the distribution function: for `0 < p < ∞` and `t ≠ 0`, +`μ{‖f‖ > t} ≤ t^{-p} ‖f‖_p^p`. -/ +lemma distribution_le_inv_rpow_mul_eLpNorm_rpow (hp0 : p ≠ 0) (hp : p ≠ ∞) (ht : t ≠ 0) : + distribution f t μ ≤ t⁻¹ ^ p.toReal * eLpNorm f p μ ^ p.toReal := by + rcases eq_or_ne t ∞ with rfl | htop + · rw [distribution_top] + exact zero_le + calc distribution f t μ ≤ μ {x | t ≤ ‖f x‖ₑ} := + measure_mono fun x (hx : t < ‖f x‖ₑ) => show t ≤ ‖f x‖ₑ from hx.le + _ ≤ _ := meas_ge_le_mul_pow_eLpNorm_eNorm μ hp0 hp ht fun h => absurd h htop + +/-- The weak `L_p` norm is at most the `L_p` norm, for a real exponent `p > 0`: Chebyshev's +inequality `t^p μ{‖f‖ > t} ≤ ∫ ‖f‖^p` at every level `t`. -/ +lemma wnorm'_le_eLpNorm' (hf : AEStronglyMeasurable f μ) {p : ℝ} (p0 : 0 < p) : + wnorm' f p μ ≤ eLpNorm' f p μ := by + refine iSup_le (fun t ↦ ?_) + simp_rw [distribution, eLpNorm'] + have p0' : 0 ≤ 1 / p := (div_pos one_pos p0).le + have set_eq : {x | (t : ℝ≥0∞) < ‖f x‖ₑ} = {x | (t : ℝ≥0∞) ^ p < ‖f x‖ₑ ^ p} := by + simp [ENNReal.rpow_lt_rpow_iff p0] + have : (t : ℝ≥0∞) = ((t : ℝ≥0∞) ^ p) ^ (1 / p) := by simp [p0.ne'] + nth_rewrite 1 [inv_eq_one_div p, this, ← ENNReal.mul_rpow_of_nonneg _ _ p0', set_eq] + refine ENNReal.rpow_le_rpow ?_ p0' + refine le_trans ?_ <| mul_meas_ge_le_lintegral₀ (hf.eNorm.pow_const p) ((t : ℝ≥0∞) ^ p) + gcongr + exact fun x ↦ le_of_lt x + +/-- The **weak `L_p` norm is at most the `L_p` norm**, for every exponent `p > 0`. -/ +lemma wnorm_le_eLpNorm (hf : AEStronglyMeasurable f μ) {p : ℝ≥0∞} (hp : 0 < p) : + wnorm f p μ ≤ eLpNorm f p μ := by + by_cases h : p = ⊤ + · simp only [h, wnorm, ↓reduceIte] + rw [eLpNorm_exponent_top hf] + · rw [wnorm_ne_top h, eLpNorm_eq_eLpNorm' hp.ne' h hf] + exact wnorm'_le_eLpNorm' hf (ENNReal.toReal_pos hp.ne' h) + +/-- Every function in `L_p`, `p > 0`, lies in weak `L_p`. -/ +lemma MemLp.memWLp (hp : 0 < p) (hf : MemLp f p μ) : MemWLp f p μ := + ⟨hf.aestronglyMeasurable, wnorm_le_eLpNorm hf.aestronglyMeasurable hp |>.trans_lt hf⟩ + +end ContinuousENorm + +section Defs + +variable [ENorm ε₁] [ENorm ε₂] [TopologicalSpace ε₁] [TopologicalSpace ε₂] + +/-- An operator has **weak type `(p, q)`** if it is bounded as a map from `L^p` to weak `L^q`. +`HasWeakType T p p' μ ν c` means that `T` has weak type `(p, p')` w.r.t. measures `μ`, `ν` +and constant `c`. -/ +def HasWeakType (T : (α → ε₁) → (α' → ε₂)) (p p' : ℝ≥0∞) (μ : Measure α) (ν : Measure α') + (c : ℝ≥0∞) : Prop := + ∀ f : α → ε₁, MemLp f p μ → AEStronglyMeasurable (T f) ν ∧ wnorm (T f) p' ν ≤ c * eLpNorm f p μ + +/-- An operator has **strong type `(p, q)`** if it is bounded as an operator on `L^p → L^q`. +`HasStrongType T p p' μ ν c` means that `T` has strong type (p, p') w.r.t. measures `μ`, `ν` +and constant `c`. -/ +def HasStrongType {α α' : Type*} + {_x : MeasurableSpace α} {_x' : MeasurableSpace α'} (T : (α → ε₁) → (α' → ε₂)) + (p p' : ℝ≥0∞) (μ : Measure α) (ν : Measure α') (c : ℝ≥0∞) : Prop := + ∀ f : α → ε₁, MemLp f p μ → AEStronglyMeasurable (T f) ν ∧ eLpNorm (T f) p' ν ≤ c * eLpNorm f p μ + +end Defs + +section TypeLemmas + +variable [TopologicalSpace ε₁] [ContinuousENorm ε₁] [TopologicalSpace ε₂] [ContinuousENorm ε₂] + {T : (α → ε₁) → (α' → ε₂)} {f₁ : α → ε₁} + +/-- An operator of weak type `(p, q)` with a finite constant maps `L_p` into weak `L_q`. -/ +lemma HasWeakType.memWLp (h : HasWeakType T p p' μ ν c) (hf₁ : MemLp f₁ p μ) + (hc : c < ⊤ := by finiteness) : MemWLp (T f₁) p' ν := + ⟨(h f₁ hf₁).1, h f₁ hf₁ |>.2.trans_lt <| ENNReal.mul_lt_top hc hf₁⟩ + +/-- An operator of strong type `(p, q)` with a finite constant maps `L_p` into `L_q`. -/ +lemma HasStrongType.memLp (h : HasStrongType T p p' μ ν c) (hf₁ : MemLp f₁ p μ) + (hc : c < ⊤ := by finiteness) : MemLp (T f₁) p' ν := + h f₁ hf₁ |>.2.trans_lt <| ENNReal.mul_lt_top hc hf₁ + +/-- **Strong type implies weak type** with the same constant, for a target exponent `q > 0`, +since the weak `L_q` norm is at most the `L_q` norm. -/ +lemma HasStrongType.hasWeakType (hp' : 0 < p') + (h : HasStrongType T p p' μ ν c) : HasWeakType T p p' μ ν c := + fun f hf ↦ ⟨(h f hf).1, wnorm_le_eLpNorm (h f hf).1 hp' |>.trans (h f hf).2⟩ + +end TypeLemmas + +variable [TopologicalSpace ε₁] [ESeminormedAddMonoid ε₁] in +/-- The operator is **almost everywhere subadditive** on the functions satisfying `P` with +constant `A`: `‖T(f + g)‖ ≤ A (‖T f‖ + ‖T g‖)` almost everywhere for all `f, g` satisfying `P` +(this is almost vacuous if `A = ⊤`). -/ +def AESubadditiveOn [ENorm ε] (T : (α → ε₁) → α' → ε) (P : (α → ε₁) → Prop) (A : ℝ≥0∞) + (ν : Measure α') : Prop := + ∀ (f g : α → ε₁), P f → P g → ∀ᵐ x ∂ν, ‖T (f + g) x‖ₑ ≤ A * (‖T f x‖ₑ + ‖T g x‖ₑ) + +end MeasureTheory diff --git a/LeanPool/FunctionSpaces/Analysis/Lp/Young.lean b/LeanPool/FunctionSpaces/Analysis/Lp/Young.lean new file mode 100644 index 0000000000..12ec0dd04a --- /dev/null +++ b/LeanPool/FunctionSpaces/Analysis/Lp/Young.lean @@ -0,0 +1,300 @@ +/- +Copyright (c) 2026 Mario Ullrich. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Mario Ullrich +-/ +module + +public import LeanPool.FunctionSpaces.Analysis.Lp.LintegralForm +public import Mathlib.Analysis.Convolution +public import Mathlib.MeasureTheory.Integral.Prod + +/- +Modified for Lean Pool: module names and imports adapted. +-/ + +/-! +# Young's inequality on measurable groups + +On a measurable group `G` with a right-invariant s-finite measure `μ` (a Haar measure on `ℝ^d` or +on the torus), the convolution `(K ⋆ f)(x) = ∫ K(y) f(x - y) dμ(y)` with the multiplication of +`ℂ` satisfies **Young's inequality** `‖K ⋆ f‖_p ≤ ‖K‖_1 ‖f‖_p` for `1 ≤ p < ∞` +(`MeasureTheory.eLpNorm_convolution_le`). It comes from the weighted Jensen inequality + +`(∫ a g)^p ≤ (∫ a)^(p-1) ∫ a g^p` + +(`MeasureTheory.lintegral_mul_rpow_le`, Hölder's inequality for the measure `a dμ`). Integrated +over `x` by Tonelli's theorem, it gives `∫ (∫ a(y) K(x, y) dy)^q dx ≤ (∫ a)^q C` for every kernel +with `∫ K(x, y)^q dx ≤ C` for all `y` (`MeasureTheory.lintegral_rpow_lintegral_kernel_le`). For +`K(x, y) = |f(x - y)|` the invariance of `μ` gives Young's inequality +(`MeasureTheory.lintegral_rpow_lintegral_le`). The same bound shows that the convolution integral +converges absolutely almost everywhere (`MeasureTheory.ae_convolutionExistsAt`). Mathlib has the +pointwise bounds of convolutions, not Young's inequality. + +**Weighted averages** (Minkowski's integral inequality in the form of the weighted Jensen +inequality): for a weight `Φ` on a second measure space, +`‖∫ Φ(z) G(·, z) dz‖_p^p ≤ ‖Φ‖_1^(p-1) ∫ |Φ(z)| ‖G(·, z)‖_p^p dz` +(`MeasureTheory.eLpNorm_integral_kernel_le`). +-/ + +@[expose] public section + +open scoped ENNReal Convolution + +namespace MeasureTheory + +/-! ### The weighted Jensen inequality -/ + +/-- **Weighted Jensen inequality**: for `1 ≤ p` and nonnegative `a`, `g`, +`(∫ a g)^p ≤ (∫ a)^(p-1) ∫ a g^p`. This is Hölder's inequality for the measure `a dμ`: split +`a g = a^(1/q) (a^(1/p) g)` with the conjugate exponent `q` (Mathlib's +`ENNReal.lintegral_mul_le_Lp_mul_Lq`). -/ +theorem lintegral_mul_rpow_le {α : Type*} [MeasurableSpace α] {μ : Measure α} {p : ℝ} + (hp : 1 ≤ p) {a g : α → ℝ≥0∞} (ha : AEMeasurable a μ) (hg : AEMeasurable g μ) : + (∫⁻ y, a y * g y ∂μ) ^ p ≤ (∫⁻ y, a y ∂μ) ^ (p - 1) * ∫⁻ y, a y * g y ^ p ∂μ := by + rcases eq_or_lt_of_le hp with rfl | hp1 + · simp + set q := p.conjExponent + have hpq : p.HolderConjugate q := .conjExponent hp1 + have hp0 : 0 < p := by linarith + have hq0 : 0 < q := hpq.symm.pos + have hsum : 1 / q + 1 / p = 1 := by + have := hpq.inv_add_inv_eq_one + rw [one_div, one_div] + linarith + have hsplit : ∀ y, a y * g y = a y ^ (1 / q) * (a y ^ (1 / p) * g y) := fun y => by + rw [← mul_assoc, ← ENNReal.rpow_add_of_nonneg _ _ (by positivity) (by positivity), hsum, + ENNReal.rpow_one] + have hH := ENNReal.lintegral_mul_le_Lp_mul_Lq μ hpq.symm (ha.pow_const (1 / q)) + ((ha.pow_const (1 / p)).mul hg) + have h1 : ∀ y, (a y ^ (1 / q)) ^ q = a y := fun y => by + rw [← ENNReal.rpow_mul, one_div_mul_cancel hq0.ne', ENNReal.rpow_one] + have h2 : ∀ y, (a y ^ (1 / p) * g y) ^ p = a y * g y ^ p := fun y => by + rw [ENNReal.mul_rpow_of_nonneg _ _ hp0.le, ← ENNReal.rpow_mul, one_div_mul_cancel hp0.ne', + ENNReal.rpow_one] + simp only [Pi.mul_apply, h1, h2] at hH + have hexp : 1 / q * p = p - 1 := by + have h : 1 / q = 1 - 1 / p := by linarith + rw [h] + field_simp + calc (∫⁻ y, a y * g y ∂μ) ^ p + = (∫⁻ y, a y ^ (1 / q) * (a y ^ (1 / p) * g y) ∂μ) ^ p := by + rw [lintegral_congr fun y => hsplit y] + _ ≤ ((∫⁻ y, a y ∂μ) ^ (1 / q) * (∫⁻ y, a y * g y ^ p ∂μ) ^ (1 / p)) ^ p := + ENNReal.rpow_le_rpow hH hp0.le + _ = (∫⁻ y, a y ∂μ) ^ (p - 1) * ∫⁻ y, a y * g y ^ p ∂μ := by + rw [ENNReal.mul_rpow_of_nonneg _ _ hp0.le, ← ENNReal.rpow_mul, ← ENNReal.rpow_mul, + one_div_mul_cancel hp0.ne', ENNReal.rpow_one, hexp] + +/-- **Young's inequality for kernels**, for nonnegative functions: for `1 ≤ q`, s-finite measures +`μ` on `X` and `ν` on `Y`, an almost everywhere measurable `a : Y → [0, ∞]` and a jointly almost +everywhere measurable `K : X × Y → [0, ∞]` with `∫ K(x, y)^q dμ(x) ≤ C` for every `y`, +`∫ (∫ a(y) K(x, y) dν(y))^q dμ(x) ≤ (∫ a dν)^q C`. By the weighted Jensen inequality the inner +power is at most `(∫ a)^(q-1) ∫ a(y) K(x, y)^q dν(y)`, and Tonelli's theorem gives +`(∫ a)^(q-1) ∫ a(y) C dν(y)`. -/ +theorem lintegral_rpow_lintegral_kernel_le {X Y : Type*} [MeasurableSpace X] [MeasurableSpace Y] + {μ : Measure X} {ν : Measure Y} [SFinite μ] [SFinite ν] {q : ℝ} (hq1 : 1 ≤ q) + {a : Y → ℝ≥0∞} (ha : AEMeasurable a ν) {K : X → Y → ℝ≥0∞} + (hK : AEMeasurable (Function.uncurry K) (μ.prod ν)) {C : ℝ≥0∞} + (hC : ∀ y, ∫⁻ x, K x y ^ q ∂μ ≤ C) : + ∫⁻ x, (∫⁻ y, a y * K x y ∂ν) ^ q ∂μ ≤ (∫⁻ y, a y ∂ν) ^ q * C := by + have hprod : AEMeasurable (Function.uncurry fun x y => a y * K x y ^ q) (μ.prod ν) := + ha.comp_snd.mul (hK.pow_const q) + have hx : ∀ᵐ x ∂μ, AEMeasurable (K x) ν := + hK.aestronglyMeasurable.prodMk_left.mono fun x hx => hx.aemeasurable + have hy : ∀ᵐ y ∂ν, AEMeasurable (fun x => K x y ^ q) μ := + hK.prod_swap.aestronglyMeasurable.prodMk_left.mono fun y hy => hy.aemeasurable.pow_const q + calc ∫⁻ x, (∫⁻ y, a y * K x y ∂ν) ^ q ∂μ + ≤ ∫⁻ x, (∫⁻ y, a y ∂ν) ^ (q - 1) * ∫⁻ y, a y * K x y ^ q ∂ν ∂μ := + lintegral_mono_ae (hx.mono fun x hx => lintegral_mul_rpow_le hq1 ha hx) + _ = (∫⁻ y, a y ∂ν) ^ (q - 1) * ∫⁻ x, ∫⁻ y, a y * K x y ^ q ∂ν ∂μ := + lintegral_const_mul'' _ hprod.lintegral_prod_right' + _ = (∫⁻ y, a y ∂ν) ^ (q - 1) * ∫⁻ y, ∫⁻ x, a y * K x y ^ q ∂μ ∂ν := by + rw [lintegral_lintegral_swap hprod] + _ ≤ (∫⁻ y, a y ∂ν) ^ (q - 1) * ∫⁻ y, a y * C ∂ν := by + gcongr 1 + refine lintegral_mono_ae (hy.mono fun y hy => ?_) + rw [lintegral_const_mul'' _ hy] + gcongr + exact hC y + _ = (∫⁻ y, a y ∂ν) ^ q * C := by + rw [lintegral_mul_const'' _ ha, ← mul_assoc] + congr 1 + conv_rhs => rw [show q = (q - 1) + 1 by ring] + rw [ENNReal.rpow_add_of_nonneg _ _ (by linarith) zero_le_one, ENNReal.rpow_one] + +/-! ### Young's inequality -/ + +section Young + +variable {G : Type*} [AddGroup G] [MeasurableSpace G] [MeasurableAdd₂ G] [MeasurableNeg G] + {μ : Measure G} [SFinite μ] [μ.IsAddRightInvariant] + +/-- **The integral form of Young's inequality** for nonnegative functions: for `1 ≤ q`, +`∫ (∫ a(y) b(x - y) dy)^q dx ≤ (∫ a)^q ∫ b^q`. This is the kernel form +`MeasureTheory.lintegral_rpow_lintegral_kernel_le` for `K(x, y) = b(x - y)`, since +`∫ b(x - y)^q dx = ∫ b^q` by the invariance of `μ`. -/ +theorem lintegral_rpow_lintegral_mul_le {q : ℝ} (hq1 : 1 ≤ q) {a b : G → ℝ≥0∞} + (ha : AEMeasurable a μ) (hb : AEMeasurable b μ) : + ∫⁻ x, (∫⁻ y, a y * b (x - y) ∂μ) ^ q ∂μ ≤ (∫⁻ y, a y ∂μ) ^ q * ∫⁻ x, b x ^ q ∂μ := + lintegral_rpow_lintegral_kernel_le hq1 ha (K := fun x y => b (x - y)) + (hb.comp_quasiMeasurePreserving (quasiMeasurePreserving_sub_of_right_invariant μ μ)) + fun y => (lintegral_sub_right_eq_self (fun x => b x ^ q) y).le + +/-- The integrand of `x ↦ ∫ |K(y)| |f(x - y)|^q dy` is measurable on the product. -/ +theorem aemeasurable_kernel_rpow {K f : G → ℂ} (hK : AEStronglyMeasurable K μ) + (hf : AEStronglyMeasurable f μ) (q : ℝ) : + AEMeasurable (Function.uncurry fun x y => ‖K y‖ₑ * ‖f (x - y)‖ₑ ^ q) (μ.prod μ) := + hK.eNorm.comp_snd.mul ((hf.eNorm.pow_const q).comp_quasiMeasurePreserving + (quasiMeasurePreserving_sub_of_right_invariant μ μ)) + +/-- The function `x ↦ ∫ |K(y)| |f(x - y)| dy` is measurable. -/ +theorem aemeasurable_lintegral_kernel {K f : G → ℂ} (hK : AEStronglyMeasurable K μ) + (hf : AEStronglyMeasurable f μ) : + AEMeasurable (fun x => ∫⁻ y, ‖K y‖ₑ * ‖f (x - y)‖ₑ ∂μ) μ := by + have h := (aemeasurable_kernel_rpow hK hf 1).lintegral_prod_right' + simpa only [ENNReal.rpow_one, Function.uncurry_apply_pair] using h + +/-- **The integral form of Young's inequality**: for `1 ≤ p < ∞`, +`∫ (∫ |K(y)| |f(x - y)| dy)^p dx ≤ (‖K‖_1 ‖f‖_p)^p`. -/ +theorem lintegral_rpow_lintegral_le {p : ℝ≥0∞} (hp1 : 1 ≤ p) (hp : p ≠ ∞) {K f : G → ℂ} + (hK : AEStronglyMeasurable K μ) (hf : AEStronglyMeasurable f μ) : + ∫⁻ x, (∫⁻ y, ‖K y‖ₑ * ‖f (x - y)‖ₑ ∂μ) ^ p.toReal ∂μ ≤ + (eLpNorm K 1 μ * eLpNorm f p μ) ^ p.toReal := by + have hp0 : p ≠ 0 := (lt_of_lt_of_le zero_lt_one hp1).ne' + have hq1 : 1 ≤ p.toReal := by + have h := ENNReal.toReal_mono hp hp1 + rwa [ENNReal.toReal_one] at h + refine (lintegral_rpow_lintegral_mul_le hq1 hK.eNorm hf.eNorm).trans_eq ?_ + rw [ENNReal.mul_rpow_of_nonneg _ _ (by linarith), eLpNorm_one_eq_lintegral_eNorm hK, + eLpNorm_rpow_eq hf hp0 hp] + +omit [MeasurableAdd₂ G] [MeasurableNeg G] [SFinite μ] [μ.IsAddRightInvariant] in +/-- The pointwise bound `|(K ⋆ f)(x)| ≤ ∫ |K(y)| |f(x - y)| dy`. -/ +theorem enorm_convolution_le_lintegral (K f : G → ℂ) (x : G) : + ‖(K ⋆[ContinuousLinearMap.mul ℂ ℂ, μ] f) x‖ₑ ≤ ∫⁻ y, ‖K y‖ₑ * ‖f (x - y)‖ₑ ∂μ := by + rw [convolution_def] + refine (eNorm_integral_le_lintegral_eNorm _).trans (le_of_eq ?_) + exact lintegral_congr fun y => eNorm_mul _ _ + +/-- **Young's inequality** for an integrable kernel on a measurable group: +`‖K ⋆ f‖_p ≤ ‖K‖_1 ‖f‖_p`, `1 ≤ p < ∞`. -/ +theorem eLpNorm_convolution_le {p : ℝ≥0∞} (hp1 : 1 ≤ p) (hp : p ≠ ∞) {K f : G → ℂ} + (hK : AEStronglyMeasurable K μ) (hf : AEStronglyMeasurable f μ) : + eLpNorm (K ⋆[ContinuousLinearMap.mul ℂ ℂ, μ] f) p μ ≤ eLpNorm K 1 μ * eLpNorm f p μ := by + have hp0 : p ≠ 0 := (lt_of_lt_of_le zero_lt_one hp1).ne' + have hq : 0 < p.toReal := ENNReal.toReal_pos hp0 hp + refine eLpNorm_le_of_lintegral_le + (hK.convolution_integrand (ContinuousLinearMap.mul ℂ ℂ) hf).integral_prod_right' hp0 hp ?_ + exact (lintegral_mono fun x => ENNReal.rpow_le_rpow (enorm_convolution_le_lintegral K f x) + hq.le).trans (lintegral_rpow_lintegral_le hp1 hp hK hf) + +/-- The convolution of an integrable kernel with an `L_p` function is in `L_p`. -/ +theorem memLp_convolution {p : ℝ≥0∞} (hp1 : 1 ≤ p) (hp : p ≠ ∞) {K f : G → ℂ} + (hK : Integrable K μ) (hf : MemLp f p μ) : + MemLp (K ⋆[ContinuousLinearMap.mul ℂ ℂ, μ] f) p μ := + lt_top_iff_ne_top.2 (ne_top_of_le_ne_top (ENNReal.mul_ne_top + (memLp_one_iff_integrable.2 hK).eLpNorm_ne_top hf.eLpNorm_ne_top) + (eLpNorm_convolution_le hp1 hp hK.aestronglyMeasurable hf.aestronglyMeasurable)) + +/-- **The convolution integral converges absolutely almost everywhere** for an integrable +kernel and `f ∈ L_p`, `1 ≤ p < ∞`: the integral form of Young's inequality is finite. -/ +theorem ae_convolutionExistsAt {p : ℝ≥0∞} (hp1 : 1 ≤ p) (hp : p ≠ ∞) {K f : G → ℂ} + (hK : Integrable K μ) (hf : MemLp f p μ) : + ∀ᵐ x ∂μ, ConvolutionExistsAt K f x (ContinuousLinearMap.mul ℂ ℂ) μ := by + have hp0 : p ≠ 0 := (lt_of_lt_of_le zero_lt_one hp1).ne' + have hq : 0 < p.toReal := ENNReal.toReal_pos hp0 hp + have hK1 : eLpNorm K 1 μ ≠ ∞ := (memLp_one_iff_integrable.2 hK).eLpNorm_ne_top + have hfin : ∫⁻ x, (∫⁻ y, ‖K y‖ₑ * ‖f (x - y)‖ₑ ∂μ) ^ p.toReal ∂μ ≠ ∞ := + ne_top_of_le_ne_top (ENNReal.rpow_ne_top_of_nonneg hq.le (ENNReal.mul_ne_top hK1 + hf.eLpNorm_ne_top)) + (lintegral_rpow_lintegral_le hp1 hp hK.aestronglyMeasurable hf.aestronglyMeasurable) + have hmeas : AEMeasurable (fun x => (∫⁻ y, ‖K y‖ₑ * ‖f (x - y)‖ₑ ∂μ) ^ p.toReal) μ := + (aemeasurable_lintegral_kernel hK.aestronglyMeasurable hf.aestronglyMeasurable).pow_const _ + filter_upwards [ae_lt_top' hmeas hfin] with x hx + have hx' : ∫⁻ y, ‖K y‖ₑ * ‖f (x - y)‖ₑ ∂μ < ∞ := by + by_contra h + rw [not_lt, top_le_iff] at h + rw [h, ENNReal.top_rpow_of_pos hq] at hx + exact lt_irrefl _ hx + refine ⟨hK.aestronglyMeasurable.convolution_integrand_snd (ContinuousLinearMap.mul ℂ ℂ) + hf.aestronglyMeasurable x, ?_⟩ + simpa [HasFiniteIntegral, eNorm_mul] using hx' + +end Young + +/-! ### Weighted averages -/ + +section Average + +variable {α β : Type*} [MeasurableSpace α] [MeasurableSpace β] {μ : Measure α} {ν : Measure β} + [SFinite μ] [SFinite ν] + +/-- **Weighted averages in `L_p`** (Minkowski's integral inequality, in the form of the weighted +Jensen inequality): for `1 ≤ p < ∞`, a weight `Φ` on `β` and a jointly measurable `G`, +`‖∫ Φ(z) G(·, z) dν(z)‖_p^p ≤ ‖Φ‖_1^(p-1) ∫ |Φ(z)| ‖G(·, z)‖_p^p dν(z)`. -/ +theorem eLpNorm_integral_kernel_le {p : ℝ≥0∞} (hp1 : 1 ≤ p) (hp : p ≠ ∞) {Φ : β → ℂ} + (hΦ : AEStronglyMeasurable Φ ν) {G : α → β → ℂ} (hG : Measurable (Function.uncurry G)) : + eLpNorm (fun x => ∫ z, Φ z * G x z ∂ν) p μ ^ p.toReal ≤ + (∫⁻ z, ‖Φ z‖ₑ ∂ν) ^ (p.toReal - 1) * + ∫⁻ z, ‖Φ z‖ₑ * eLpNorm (fun x => G x z) p μ ^ p.toReal ∂ν := by + have hp0 : p ≠ 0 := (lt_of_lt_of_le zero_lt_one hp1).ne' + have hq : 0 < p.toReal := ENNReal.toReal_pos hp0 hp + have hq1 : 1 ≤ p.toReal := by + have h := ENNReal.toReal_mono hp hp1 + rwa [ENNReal.toReal_one] at h + have hprod : AEMeasurable (Function.uncurry fun x z => ‖Φ z‖ₑ * ‖G x z‖ₑ ^ p.toReal) + (μ.prod ν) := + hΦ.eNorm.comp_snd.mul (hG.eNorm.pow_const _).aemeasurable + have hint : AEStronglyMeasurable (fun x => ∫ z, Φ z * G x z ∂ν) μ := + (hΦ.comp_snd.mul hG.aestronglyMeasurable).integral_prod_right' + rw [eLpNorm_rpow_eq hint hp0 hp] + calc ∫⁻ x, ‖∫ z, Φ z * G x z ∂ν‖ₑ ^ p.toReal ∂μ + ≤ ∫⁻ x, (∫⁻ z, ‖Φ z‖ₑ * ‖G x z‖ₑ ∂ν) ^ p.toReal ∂μ := lintegral_mono fun x => by + refine ENNReal.rpow_le_rpow ((eNorm_integral_le_lintegral_eNorm _).trans_eq ?_) hq.le + simp_rw [eNorm_mul] + _ ≤ ∫⁻ x, (∫⁻ z, ‖Φ z‖ₑ ∂ν) ^ (p.toReal - 1) * + ∫⁻ z, ‖Φ z‖ₑ * ‖G x z‖ₑ ^ p.toReal ∂ν ∂μ := + lintegral_mono fun x => lintegral_mul_rpow_le hq1 hΦ.eNorm + (hG.comp measurable_prodMk_left).eNorm.aemeasurable + _ = (∫⁻ z, ‖Φ z‖ₑ ∂ν) ^ (p.toReal - 1) * + ∫⁻ x, ∫⁻ z, ‖Φ z‖ₑ * ‖G x z‖ₑ ^ p.toReal ∂ν ∂μ := + lintegral_const_mul'' _ hprod.lintegral_prod_right' + _ = (∫⁻ z, ‖Φ z‖ₑ ∂ν) ^ (p.toReal - 1) * + ∫⁻ z, ∫⁻ x, ‖Φ z‖ₑ * ‖G x z‖ₑ ^ p.toReal ∂μ ∂ν := by + rw [lintegral_lintegral_swap hprod] + _ = (∫⁻ z, ‖Φ z‖ₑ ∂ν) ^ (p.toReal - 1) * + ∫⁻ z, ‖Φ z‖ₑ * eLpNorm (fun x => G x z) p μ ^ p.toReal ∂ν := by + congr 1 + refine lintegral_congr fun z => ?_ + have hGz : AEStronglyMeasurable (fun x => G x z) μ := + (hG.comp measurable_prodMk_right).aestronglyMeasurable + rw [lintegral_const_mul' _ _ eNorm_ne_top, eLpNorm_rpow_eq hGz hp0 hp] + +/-- **Weighted averages of uniformly bounded functions**: if `‖G(·, z)‖_p ≤ M` for every `z` with +`Φ(z) ≠ 0` and `0 < ‖Φ‖_1 < ∞`, then `‖∫ Φ(z) G(·, z) dν(z)‖_p ≤ ‖Φ‖_1 M` +(`MeasureTheory.eLpNorm_integral_kernel_le`). -/ +theorem eLpNorm_integral_kernel_le_of_bound {p : ℝ≥0∞} (hp1 : 1 ≤ p) (hp : p ≠ ∞) {Φ : β → ℂ} + (hΦ : AEStronglyMeasurable Φ ν) (hΦ0 : ∫⁻ z, ‖Φ z‖ₑ ∂ν ≠ 0) (hΦt : ∫⁻ z, ‖Φ z‖ₑ ∂ν ≠ ∞) + {G : α → β → ℂ} (hG : Measurable (Function.uncurry G)) {M : ℝ≥0∞} + (hM : ∀ z, Φ z ≠ 0 → eLpNorm (fun x => G x z) p μ ≤ M) : + eLpNorm (fun x => ∫ z, Φ z * G x z ∂ν) p μ ≤ (∫⁻ z, ‖Φ z‖ₑ ∂ν) * M := by + have hp0 : p ≠ 0 := (lt_of_lt_of_le zero_lt_one hp1).ne' + have hq : 0 < p.toReal := ENNReal.toReal_pos hp0 hp + rw [← ENNReal.rpow_le_rpow_iff hq] + refine (eLpNorm_integral_kernel_le hp1 hp hΦ hG).trans ?_ + calc (∫⁻ z, ‖Φ z‖ₑ ∂ν) ^ (p.toReal - 1) * + ∫⁻ z, ‖Φ z‖ₑ * eLpNorm (fun x => G x z) p μ ^ p.toReal ∂ν + ≤ (∫⁻ z, ‖Φ z‖ₑ ∂ν) ^ (p.toReal - 1) * ∫⁻ z, ‖Φ z‖ₑ * M ^ p.toReal ∂ν := + mul_le_mul' le_rfl (lintegral_mono fun z => by + by_cases hz : Φ z = 0 + · simp [hz] + · exact mul_le_mul' le_rfl (ENNReal.rpow_le_rpow (hM z hz) hq.le)) + _ = (∫⁻ z, ‖Φ z‖ₑ ∂ν) ^ (p.toReal - 1) * (∫⁻ z, ‖Φ z‖ₑ ∂ν) ^ (1 : ℝ) * M ^ p.toReal := by + rw [lintegral_mul_const'' _ hΦ.eNorm, ENNReal.rpow_one, mul_assoc] + _ = ((∫⁻ z, ‖Φ z‖ₑ ∂ν) * M) ^ p.toReal := by + rw [← ENNReal.rpow_add _ _ hΦ0 hΦt, sub_add_cancel, ENNReal.mul_rpow_of_nonneg _ _ hq.le] + +end Average + +end MeasureTheory diff --git a/LeanPool/FunctionSpaces/Analysis/Maximal/CalderonZygmund.lean b/LeanPool/FunctionSpaces/Analysis/Maximal/CalderonZygmund.lean new file mode 100644 index 0000000000..8b8b97f992 --- /dev/null +++ b/LeanPool/FunctionSpaces/Analysis/Maximal/CalderonZygmund.lean @@ -0,0 +1,279 @@ +/- +Copyright (c) 2026 Mario Ullrich. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Mario Ullrich +-/ +module + +public import LeanPool.FunctionSpaces.Analysis.Maximal.DyadicCubes + +/- +Modified for Lean Pool: module names and imports adapted. +-/ + +/-! +# The Calderón–Zygmund decomposition + +Three general facts on means come first: `‖⨍ f‖ ≤ ⨍ ‖f‖` for every measure +(`MeasureTheory.enorm_average_le`) and, for a set `s` of finite measure, +`μ(s) ‖⨍_s f‖ ≤ ∫_s ‖f‖` (`MeasureTheory.measure_mul_enorm_setAverage_le`) and +`∫_s ‖f - ⨍_s f‖ ≤ 2 ∫_s ‖f‖` (`MeasureTheory.setLIntegral_enorm_sub_setAverage_le`). + +For `G : V → [0, ∞]` and a height `t ∈ [0, ∞]`, a dyadic cube `Q` is **big** when the average +`⨍_Q G` exceeds `t` (`Rd.lt_setLAverage_zcell_iff`). The **maximal big cubes** (`Rd.czMaximal`) +are the big cubes whose strict ancestors are not big. They are pairwise disjoint +(`Rd.czMaximal_pairwiseDisjoint`), so every point lies in at most one of them +(`Rd.subsingleton_czMaximal_mem_zcell`), their averages lie in `(t, 2^n t]` (`Rd.cz_avg_gt`, +`Rd.cz_avg_le`), and their union `Ω` (`Rd.czSet`) has measure at most `t⁻¹ ∫ G` +(`Rd.cz_volume_le`). In dimension `n ≥ 1`, for `∫ G < ∞` and `0 < t`, cubes of large size have +average at most `t` (`Rd.exists_forall_setLAverage_zcell_sub_le`), so every big cube lies in a +maximal one (`Rd.exists_maximal_of_big`); for a.e.-measurable `G` with `∫ G < ∞` and `0 < t`, +`G ≤ t` almost everywhere outside `Ω` (`Rd.cz_ae_le_of_notMem`). The union of the closed balls of +radius `2n 2^(-k)` around the centres of the maximal cubes `Q_{k,m}`, twice the radius `n 2^(-k)` +of a ball around the centre containing +the cube, is the enlarged set `Ω*` (`Rd.czEnlarged`). +-/ + +@[expose] public section + +open MeasureTheory Module Metric Set +open scoped ENNReal + +namespace MeasureTheory + +variable {α E : Type*} [MeasurableSpace α] {μ : Measure α} [NormedAddCommGroup E] + [NormedSpace ℝ E] + +/-! ### Means over a set -/ + +/-- The norm of a mean is at most the mean of the norm: `‖⨍ f dμ‖ ≤ ⨍ ‖f‖ dμ` in `[0, ∞]`, for +every function `f` with values in a real normed space. Both means are integrals for the +normalised measure `μ(α)⁻¹ μ`. -/ +theorem enorm_average_le (f : α → E) : ‖⨍ x, f x ∂μ‖ₑ ≤ ⨍⁻ x, ‖f x‖ₑ ∂μ := by + rw [average_eq', laverage_eq'] + exact eNorm_integral_le_lintegral_eNorm f + +/-- `μ(s) ‖⨍_s f‖ ≤ ∫_s ‖f‖` for every set `s` of finite measure and every function `f` with +values in a real normed space, by `MeasureTheory.enorm_average_le` and Mathlib's +`measure_mul_setLAverage`. -/ +theorem measure_mul_enorm_setAverage_le {s : Set α} (hs : μ s ≠ ∞) (f : α → E) : + μ s * ‖⨍ x in s, f x ∂μ‖ₑ ≤ ∫⁻ x in s, ‖f x‖ₑ ∂μ := + (mul_le_mul_right (enorm_average_le f) _).trans_eq (measure_mul_setLAverage _ hs) + +/-- **The mass of `f` minus its mean**: `∫_s ‖f - ⨍_s f‖ ≤ 2 ∫_s ‖f‖` for every set `s` of finite +measure and every function `f` with values in a real normed space, since +`‖f - ⨍_s f‖ ≤ ‖f‖ + ‖⨍_s f‖` and `μ(s) ‖⨍_s f‖ ≤ ∫_s ‖f‖`. -/ +theorem setLIntegral_enorm_sub_setAverage_le {s : Set α} (hs : μ s ≠ ∞) (f : α → E) : + ∫⁻ x in s, ‖f x - ⨍ y in s, f y ∂μ‖ₑ ∂μ ≤ 2 * ∫⁻ x in s, ‖f x‖ₑ ∂μ := + calc ∫⁻ x in s, ‖f x - ⨍ y in s, f y ∂μ‖ₑ ∂μ + ≤ ∫⁻ x in s, (‖f x‖ₑ + ‖⨍ y in s, f y ∂μ‖ₑ) ∂μ := lintegral_mono fun _ => eNorm_sub_le + _ = (∫⁻ x in s, ‖f x‖ₑ ∂μ) + μ s * ‖⨍ y in s, f y ∂μ‖ₑ := by + rw [lintegral_add_right _ measurable_const, setLIntegral_const, mul_comm] + _ ≤ (∫⁻ x in s, ‖f x‖ₑ ∂μ) + ∫⁻ x in s, ‖f x‖ₑ ∂μ := + add_le_add le_rfl (measure_mul_enorm_setAverage_le hs f) + _ = 2 * ∫⁻ x in s, ‖f x‖ₑ ∂μ := (two_mul _).symm + +end MeasureTheory + +namespace Rd + +variable {V : Type*} [NormedAddCommGroup V] [InnerProductSpace ℝ V] [FiniteDimensional ℝ V] + [MeasurableSpace V] [BorelSpace V] + +/-! ### Big cubes -/ + +variable {G : V → ℝ≥0∞} {t : ℝ≥0∞} + +/-- A height `t` lies below the average of `G` over a cube `Q` exactly when `t |Q| < ∫_Q G`. -/ +theorem lt_setLAverage_zcell_iff (k : ℤ) (m : Fin (finrank ℝ V) → ℤ) : + t < ⨍⁻ y in zcell k m, G y ∂volume ↔ + t * volume (zcell (V := V) k m) < ∫⁻ y in zcell k m, G y := by + rw [setLAverage_eq] + exact ENNReal.lt_div_iff_mul_lt (Or.inl (volume_zcell_pos k m).ne') + (Or.inl (volume_zcell_lt_top k m).ne) + +/-- **Coarse cubes are not big**: in dimension `n ≥ 1`, if `∫ G < ∞` and `0 < t`, then for every +level `k` there is a bound `B` such that every cube of level `k - l` with `l > B` has an average of +`G` at most `t`, since `t |Q| ≥ ∫ G` for all large cubes `Q`. -/ +theorem exists_forall_setLAverage_zcell_sub_le [Nontrivial V] (hGi : ∫⁻ x, G x ≠ ∞) + (ht0 : 0 < t) (k : ℤ) : ∃ B : ℕ, ∀ l : ℕ, B < l → ∀ m' : Fin (finrank ℝ V) → ℤ, + ⨍⁻ y in zcell (k - l) m', G y ∂volume ≤ t := by + rcases eq_or_ne t ∞ with rfl | ht + · exact ⟨0, fun _ _ _ => le_top⟩ + have hc0 : volume (zcell (V := V) k 0) ≠ 0 := (volume_zcell_pos k 0).ne' + have hct : volume (zcell (V := V) k 0) ≠ ∞ := (volume_zcell_lt_top k 0).ne + have htc0 : t * volume (zcell (V := V) k 0) ≠ 0 := mul_ne_zero ht0.ne' hc0 + have htct : t * volume (zcell (V := V) k 0) ≠ ∞ := ENNReal.mul_ne_top ht hct + obtain ⟨N, hN⟩ := ENNReal.exists_nat_gt (ENNReal.div_ne_top hGi htc0) + refine ⟨N, fun l hl m' => not_lt.1 fun hbig => ?_⟩ + rw [lt_setLAverage_zcell_iff, volume_zcell_sub k l 0 m'] at hbig + have hGN := (ENNReal.div_lt_iff (Or.inl htc0) (Or.inl htct)).1 hN + have hNl : (N : ℝ≥0∞) ≤ 2 ^ (l * finrank ℝ V) := by + have hn : 0 < finrank ℝ V := finrank_pos + have h : N ≤ 2 ^ (l * finrank ℝ V) := (hl.le.trans l.lt_two_pow_self.le).trans + (Nat.pow_le_pow_right two_pos (Nat.le_mul_of_pos_right l hn)) + exact_mod_cast h + have hlt : ∫⁻ x, G x < ∫⁻ x, G x := + calc ∫⁻ x, G x < N * (t * volume (zcell (V := V) k 0)) := hGN + _ ≤ 2 ^ (l * finrank ℝ V) * (t * volume (zcell (V := V) k 0)) := by gcongr + _ = t * (2 ^ (l * finrank ℝ V) * volume (zcell (V := V) k 0)) := by ring + _ < ∫⁻ y in zcell (k - l) m', G y := hbig + _ ≤ ∫⁻ x, G x := setLIntegral_le_lintegral _ _ + exact lt_irrefl _ hlt + +/-! ### Maximal big cubes -/ + +/-- The **maximal big cubes** of `G` at height `t`: the pairs `(k, m)` such that the average of +`G` over the cube `Q_{k,m}` exceeds `t` while the average over every strict ancestor +`Q_{k-l, m^{(l)}}`, `l ≥ 1`, does not. -/ +def czMaximal (G : V → ℝ≥0∞) (t : ℝ≥0∞) : Set (ℤ × (Fin (finrank ℝ V) → ℤ)) := + {km | t < ⨍⁻ y in zcell km.1 km.2, G y ∂volume ∧ + ∀ l : ℕ, 0 < l → ¬ t < ⨍⁻ y in zcell (km.1 - l) (cubeAncestor l km.2), G y ∂volume} + +/-- **Every big cube lies in a maximal one**: in dimension `n ≥ 1`, if `∫ G < ∞`, `0 < t` and +the average of `G` over `Q_{k,m}` exceeds `t`, then for some `l ≥ 0` the ancestor +`Q_{k-l, m^{(l)}}` is a maximal big cube, and it contains `Q_{k,m}`. -/ +theorem exists_maximal_of_big [Nontrivial V] (hGi : ∫⁻ x, G x ≠ ∞) (ht0 : 0 < t) {k : ℤ} + {m : Fin (finrank ℝ V) → ℤ} (h : t < ⨍⁻ y in zcell k m, G y ∂volume) : + ∃ l : ℕ, (k - l, cubeAncestor l m) ∈ czMaximal G t ∧ + zcell k m ⊆ zcell (k - l) (cubeAncestor l m) := by + classical + obtain ⟨B, hB⟩ := exists_forall_setLAverage_zcell_sub_le hGi ht0 k + let P : ℕ → Prop := fun l => t < ⨍⁻ y in zcell (k - l) (cubeAncestor l m), G y ∂volume + have hP0 : P 0 := by simpa [P, cubeAncestor] using h + obtain ⟨l₀, hl₀⟩ : ∃ l₀, Nat.findGreatest P B = l₀ := ⟨_, rfl⟩ + have hspec : P l₀ := hl₀ ▸ Nat.findGreatest_spec (Nat.zero_le B) hP0 + refine ⟨l₀, ⟨hspec, fun l hl hbig => ?_⟩, ?_⟩ + · have hk : k - ((l₀ + l : ℕ) : ℤ) = k - l₀ - l := by push_cast; ring + have hbig' : P (l₀ + l) := by + change t < ⨍⁻ y in zcell (k - ((l₀ + l : ℕ) : ℤ)) (cubeAncestor (l₀ + l) m), G y ∂volume + rwa [hk, add_comm, ← cubeAncestor_add] + have hle : l₀ + l ≤ B := not_lt.1 fun hlt => (hB _ hlt _).not_gt hbig' + have hmax := Nat.le_findGreatest hle hbig' + rw [hl₀] at hmax + omega + · have hsub := zcell_subset_cubeAncestor (V := V) (k - l₀) l₀ m + rwa [sub_add_cancel] at hsub + +/-- Two distinct maximal big cubes `Q_{k,m}` and `Q_{k',m'}` with `k ≤ k'` are disjoint: if the +finer cube met the coarser one, the coarser one would be its ancestor, which is not big. -/ +theorem czMaximal_disjoint_of_le {k k' : ℤ} {m m' : Fin (finrank ℝ V) → ℤ} + (h : (k, m) ∈ czMaximal G t) (h' : (k', m') ∈ czMaximal G t) (hk : k ≤ k') + (hne : (k, m) ≠ (k', m')) : Disjoint (zcell (V := V) k' m') (zcell k m) := by + obtain ⟨l, rfl⟩ := Int.le.dest hk + rcases Nat.eq_zero_or_pos l with rfl | hl + · have hm : m' ≠ m := fun e => hne (by simp [e]) + simpa using zcell_disjoint (V := V) k hm + · have hanc : cubeAncestor l m' ≠ m := by + intro e + have hnot := h'.2 l hl + rw [add_sub_cancel_right, e] at hnot + exact hnot h.1 + exact (zcell_disjoint k hanc).mono_left (zcell_subset_cubeAncestor k l m') + +/-- The maximal big cubes are **pairwise disjoint**. -/ +theorem czMaximal_pairwiseDisjoint : + (czMaximal G t).PairwiseDisjoint (fun km => zcell (V := V) km.1 km.2) := by + rintro ⟨k, m⟩ h ⟨k', m'⟩ h' hne + rcases le_total k k' with hk | hk + · exact (czMaximal_disjoint_of_le h h' hk hne).symm + · exact czMaximal_disjoint_of_le h' h hk hne.symm + +/-- Every point lies in **at most one maximal big cube**, since these cubes are disjoint +(Mathlib's `Set.PairwiseDisjoint.elim_set`). -/ +theorem subsingleton_czMaximal_mem_zcell (x : V) : + {km : czMaximal G t | x ∈ zcell (V := V) km.1.1 km.1.2}.Subsingleton := + fun a ha b hb => Subtype.ext (czMaximal_pairwiseDisjoint.elim_set a.2 b.2 x ha hb) + +/-- There are countably many maximal big cubes. -/ +theorem czMaximal_countable : (czMaximal G t).Countable := + (czMaximal G t).to_countable + +/-- The average of `G` over a maximal big cube exceeds `t`. -/ +theorem cz_avg_gt {k : ℤ} {m : Fin (finrank ℝ V) → ℤ} (h : (k, m) ∈ czMaximal G t) : + t < ⨍⁻ y in zcell k m, G y ∂volume := + h.1 + +/-- The average of `G` over a maximal big cube is at most `2^n t`: the parent cube is not big and +has `2^n` times the volume. -/ +theorem cz_avg_le {k : ℤ} {m : Fin (finrank ℝ V) → ℤ} (h : (k, m) ∈ czMaximal G t) : + ⨍⁻ y in zcell k m, G y ∂volume ≤ 2 ^ finrank ℝ V * t := by + have hpar : ¬ t < ⨍⁻ y in zcell (k - 1) (cubeParent m), G y ∂volume := by + simpa [cubeAncestor] using h.2 1 one_pos + rw [lt_setLAverage_zcell_iff, not_lt] at hpar + have hvol := volume_zcell_cubeParent (V := V) (k - 1) m + have hsub := zcell_succ_subset_cubeParent (V := V) (k - 1) m + rw [sub_add_cancel] at hvol hsub + rw [setLAverage_eq] + refine ENNReal.div_le_of_le_mul ?_ + calc ∫⁻ y in zcell k m, G y ≤ ∫⁻ y in zcell (k - 1) (cubeParent m), G y := lintegral_mono_set hsub + _ ≤ t * volume (zcell (V := V) (k - 1) (cubeParent m)) := hpar + _ = 2 ^ finrank ℝ V * t * volume (zcell (V := V) k m) := by rw [hvol]; ring + +/-- A maximal big cube `Q` has volume at most `t⁻¹ ∫_Q G`, for every height `t`, with +`0⁻¹ = ∞`: for `t = 0` the integral `∫_Q G` is positive and the bound is `∞`. -/ +theorem cz_volume_zcell_le {k : ℤ} {m : Fin (finrank ℝ V) → ℤ} (h : (k, m) ∈ czMaximal G t) : + volume (zcell (V := V) k m) ≤ t⁻¹ * ∫⁻ y in zcell k m, G y := by + have hlt := (lt_setLAverage_zcell_iff k m).1 h.1 + rcases eq_or_ne t 0 with rfl | ht0 + · rw [zero_mul] at hlt + rw [ENNReal.inv_zero, ENNReal.top_mul hlt.ne'] + exact le_top + · exact (ENNReal.mul_le_iff_le_inv ht0 (ne_top_of_lt h.1)).1 hlt.le + +/-! ### The exceptional set -/ + +/-- The **exceptional set** `Ω` of the Calderón–Zygmund decomposition: the union of the maximal +big cubes. -/ +def czSet (G : V → ℝ≥0∞) (t : ℝ≥0∞) : Set V := ⋃ km ∈ czMaximal G t, zcell km.1 km.2 + +/-- The **enlarged exceptional set** `Ω*`: the union of the closed balls of radius `2n 2^(-k)` +around the centres of the maximal big cubes `Q_{k,m}`, twice the radius `n 2^(-k)` of a ball +around the centre containing the cube (`Rd.zcell_subset_closedBall`). -/ +noncomputable def czEnlarged (G : V → ℝ≥0∞) (t : ℝ≥0∞) : Set V := + ⋃ km ∈ czMaximal G t, closedBall (zcellCenter km.1 km.2) (2 * (finrank ℝ V / 2 ^ km.1)) + +/-- The exceptional set is measurable. -/ +theorem measurableSet_czSet : MeasurableSet (czSet G t) := + MeasurableSet.biUnion czMaximal_countable fun _ _ => measurableSet_zcell _ _ + +/-- The enlarged exceptional set is measurable. -/ +theorem measurableSet_czEnlarged : MeasurableSet (czEnlarged G t) := + MeasurableSet.biUnion czMaximal_countable fun _ _ => measurableSet_closedBall + +/-- Every maximal big cube lies in the exceptional set. -/ +theorem zcell_subset_czSet {k : ℤ} {m : Fin (finrank ℝ V) → ℤ} (h : (k, m) ∈ czMaximal G t) : + zcell k m ⊆ czSet G t := + subset_biUnion_of_mem (u := fun km : ℤ × (Fin (finrank ℝ V) → ℤ) => zcell km.1 km.2) h + +/-- The exceptional set lies in the enlarged one: a cube `Q_{k,m}` lies in the closed ball of +radius `n 2^(-k)` around its centre. -/ +theorem czSet_subset_czEnlarged : czSet G t ⊆ czEnlarged G t := + iUnion₂_mono fun km _ => (zcell_subset_closedBall _ _).trans + (closedBall_subset_closedBall (le_mul_of_one_le_left (by positivity) one_le_two)) + +/-- **The measure of the exceptional set**: `|Ω| ≤ t⁻¹ ∫ G` for every height `t`, with +`0⁻¹ = ∞`, since every maximal cube `Q` has `|Q| ≤ t⁻¹ ∫_Q G` and the cubes are disjoint. -/ +theorem cz_volume_le : volume (czSet G t) ≤ t⁻¹ * ∫⁻ x, G x := by + rw [czSet, measure_biUnion czMaximal_countable czMaximal_pairwiseDisjoint + fun _ _ => measurableSet_zcell _ _] + calc ∑' km : czMaximal G t, volume (zcell (V := V) km.1.1 km.1.2) + ≤ ∑' km : czMaximal G t, t⁻¹ * ∫⁻ y in zcell km.1.1 km.1.2, G y := + tsum_le_tsum fun km => cz_volume_zcell_le km.2 + _ = t⁻¹ * ∫⁻ y in czSet G t, G y := by + rw [ENNReal.tsum_mul_left, czSet, lintegral_biUnion czMaximal_countable + (fun _ _ => measurableSet_zcell _ _) czMaximal_pairwiseDisjoint] + _ ≤ t⁻¹ * ∫⁻ x, G x := mul_le_mul_right (setLIntegral_le_lintegral _ _) _ + +/-- **`G ≤ t` off the exceptional set**: in dimension `n ≥ 1`, for an a.e.-measurable `G` with +finite integral and `0 < t`, almost every `x ∉ Ω` satisfies `G x ≤ t`. No dyadic cube containing +such an `x` is big, since it would lie in a maximal big cube, so Lebesgue differentiation along +dyadic cubes (`Rd.ae_le_of_forall_laverage_le`) applies. -/ +theorem cz_ae_le_of_notMem [Nontrivial V] (hG : AEMeasurable G volume) (hGi : ∫⁻ x, G x ≠ ∞) + (ht0 : 0 < t) : ∀ᵐ x, x ∉ czSet G t → G x ≤ t := by + filter_upwards [ae_le_of_forall_laverage_le hG hGi t] with x hx hxΩ + refine hx fun k => not_lt.1 fun hbig => hxΩ ?_ + obtain ⟨l, hmem, hsub⟩ := exists_maximal_of_big hGi ht0 hbig + exact mem_biUnion hmem (hsub (mem_cubeAt _ x)) + +end Rd diff --git a/LeanPool/FunctionSpaces/Analysis/Maximal/CalderonZygmundSigned.lean b/LeanPool/FunctionSpaces/Analysis/Maximal/CalderonZygmundSigned.lean new file mode 100644 index 0000000000..de26afefc7 --- /dev/null +++ b/LeanPool/FunctionSpaces/Analysis/Maximal/CalderonZygmundSigned.lean @@ -0,0 +1,382 @@ +/- +Copyright (c) 2026 Mario Ullrich. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Mario Ullrich +-/ +module + +public import LeanPool.FunctionSpaces.Analysis.Maximal.FeffermanStein + +/- +Modified for Lean Pool: module names and imports adapted. +-/ + +/-! +# The signed Calderón–Zygmund decomposition + +For a function `f : V → E` with values in a real normed space `E`, such as `ℂ`, and the maximal +big cubes of a function `G : V → [0, ∞]` at height `t`, with exceptional set `Ω`, the **good +part** `Rd.czGoodC` keeps `f` outside `Ω` and replaces it by its mean `⨍_Q f` on every maximal +big cube `Q` (the averages `Rd.czAverageC`). The suffix `C` marks these signed versions of the +`[0, ∞]`-valued `Rd.czAverage` and `Rd.czGood`. The **bad part** `Rd.czBadC = f - czGoodC` +(`Rd.czGoodC_add_czBadC`) is the sum of the pieces `Rd.czBadPart`, which live on one cube each +and have mean zero there (`Rd.hasSum_czBadPart`, `Rd.integral_czBadPart`), with total mass at +most `2 ∫ ‖f‖` (`Rd.tsum_lintegral_enorm_czBadPart_le`). For `G = ‖f‖` the good part is +bounded by `2^n t` almost everywhere (`Rd.ae_enorm_czGoodC_le`) and has +`∫ ‖czGoodC‖² ≤ 2^n t ∫ ‖f‖` (`Rd.lintegral_enorm_czGoodC_sq_le`). For a family `(g_j)_j` and +`G = ‖(‖g_j‖)_j‖_{ℓ_q}` the same cubes serve every `g_j`, and the bounds hold for the pointwise +`ℓ_q` norms (`Rd.ae_lqNorm_czGoodC_le`, `Rd.lintegral_lqNorm_czGoodC_sq_le`, +`Rd.tsum_lintegral_lqNorm_czBadPart_le`). + +The definitions take the cube function `G` as an argument, so the scalar case and the family +case use the same definitions. The bounds of the good part follow from the comparison +`‖czGoodC f‖ ≤ czGood ‖f‖` (`Rd.enorm_czGoodC_le`) with the nonnegative good part, and those of +the bad pieces from general facts on means: `‖⨍ f‖ ≤ ⨍ ‖f‖` for every measure +(`MeasureTheory.enorm_average_le`) and, for a set `s` of finite measure, +`∫_s ‖f - ⨍_s f‖ ≤ 2 ∫_s ‖f‖` (`MeasureTheory.setLIntegral_enorm_sub_setAverage_le`) and its +`ℓ_q`-valued form. The `L_2` bounds of the good part use `∫ u² ≤ c ∫ u` for `u ≤ c` +(`MeasureTheory.lintegral_sq_le_mul_lintegral_of_ae_le`). + +The Carleson project (`github.com/fpvandoorn/carleson`) has a scalar Calderón–Zygmund +decomposition on doubling metric measure spaces (`czApproximation`, `czRemainder`). +-/ + +@[expose] public section + +open MeasureTheory Module Set Filter +open scoped ENNReal +open ENNReal (lqNorm) + +namespace MeasureTheory + +variable {α E : Type*} [MeasurableSpace α] {μ : Measure α} [NormedAddCommGroup E] + [NormedSpace ℝ E] + +section Countable + +variable {ι : Type*} [Countable ι] [MeasurableSpace ι] [MeasurableSingletonClass ι] + {q : ℝ≥0∞} {s : Set α} {g : ι → α → E} + +/-- `μ(s) ‖(‖⨍_s g_i‖)_i‖_{ℓ_q} ≤ ∫_s ‖(‖g_i‖)_i‖_{ℓ_q}` for `1 ≤ q ≤ ∞`, every set `s` of finite +measure and every countable family of functions `g_i` with values in a real normed space that +are almost everywhere strongly measurable on `s`, by `MeasureTheory.enorm_average_le` and +Minkowski's inequality for means (`MeasureTheory.lqNorm_laverage_le`). -/ +theorem measure_mul_lqNorm_setAverage_le (hq : 1 ≤ q) + (hg : ∀ i, AEStronglyMeasurable (g i) (μ.restrict s)) (hs : μ s ≠ ∞) : + μ s * lqNorm q (fun i => ‖⨍ x in s, g i x ∂μ‖ₑ) ≤ ∫⁻ x in s, lqNorm q (fun i => ‖g i x‖ₑ) ∂μ := + (mul_le_mul_right ((ENNReal.lqNorm_mono fun i => enorm_average_le (g i)).trans + (lqNorm_laverage_le hq fun i => (hg i).eNorm)) _).trans_eq (measure_mul_setLAverage _ hs) + +/-- **The mass of a family minus its means**: for `1 ≤ q ≤ ∞`, every set `s` of finite measure +and every countable family of functions `g_i` with values in a real normed space that are almost +everywhere strongly measurable on `s`, +`∫_s ‖(‖g_i - ⨍_s g_i‖)_i‖_{ℓ_q} ≤ 2 ∫_s ‖(‖g_i‖)_i‖_{ℓ_q}`, by Minkowski's inequality in `ℓ_q` +and `MeasureTheory.measure_mul_lqNorm_setAverage_le`. -/ +theorem setLIntegral_lqNorm_sub_setAverage_le (hq : 1 ≤ q) + (hg : ∀ i, AEStronglyMeasurable (g i) (μ.restrict s)) (hs : μ s ≠ ∞) : + ∫⁻ x in s, lqNorm q (fun i => ‖g i x - ⨍ y in s, g i y ∂μ‖ₑ) ∂μ ≤ + 2 * ∫⁻ x in s, lqNorm q (fun i => ‖g i x‖ₑ) ∂μ := + calc ∫⁻ x in s, lqNorm q (fun i => ‖g i x - ⨍ y in s, g i y ∂μ‖ₑ) ∂μ + ≤ ∫⁻ x in s, (lqNorm q (fun i => ‖g i x‖ₑ) + + lqNorm q (fun i => ‖⨍ y in s, g i y ∂μ‖ₑ)) ∂μ := + lintegral_mono fun _ => (ENNReal.lqNorm_mono fun _ => eNorm_sub_le).trans + (ENNReal.lqNorm_add_le hq _ _) + _ = (∫⁻ x in s, lqNorm q (fun i => ‖g i x‖ₑ) ∂μ) + + μ s * lqNorm q (fun i => ‖⨍ y in s, g i y ∂μ‖ₑ) := by + rw [lintegral_add_right _ measurable_const, setLIntegral_const, mul_comm] + _ ≤ (∫⁻ x in s, lqNorm q (fun i => ‖g i x‖ₑ) ∂μ) + + ∫⁻ x in s, lqNorm q (fun i => ‖g i x‖ₑ) ∂μ := + add_le_add le_rfl (measure_mul_lqNorm_setAverage_le hq hg hs) + _ = 2 * ∫⁻ x in s, lqNorm q (fun i => ‖g i x‖ₑ) ∂μ := (two_mul _).symm + +end Countable + +end MeasureTheory + +namespace Rd + +variable {V : Type*} [NormedAddCommGroup V] [InnerProductSpace ℝ V] [FiniteDimensional ℝ V] + [MeasurableSpace V] [BorelSpace V] +variable {E : Type*} [NormedAddCommGroup E] [NormedSpace ℝ E] +variable {G : V → ℝ≥0∞} {t : ℝ≥0∞} + +/-! ### Signed averages over the maximal big cubes -/ + +/-- The **signed Calderón–Zygmund averages** of `f : V → E`: on each maximal big cube `Q` of `G` +at height `t` the mean `⨍_Q f`, and `0` outside the exceptional set `Ω`. -/ +noncomputable def czAverageC (G : V → ℝ≥0∞) (t : ℝ≥0∞) (f : V → E) (x : V) : E := + ∑' km : czMaximal G t, + (zcell km.1.1 km.1.2).indicator (fun _ => ⨍ z in zcell km.1.1 km.1.2, f z) x + +/-- At every point the series defining the signed averages converges, since at most one of its +terms is nonzero. -/ +theorem hasSum_czAverageC (f : V → E) (x : V) : + HasSum (fun km : czMaximal G t => + (zcell km.1.1 km.1.2).indicator (fun _ => ⨍ z in zcell km.1.1 km.1.2, f z) x) + (czAverageC G t f x) := by + refine (summable_of_hasFiniteSupport ((subsingleton_czMaximal_mem_zcell x).finite.subset + fun km hkm => ?_)).hasSum + by_contra hx + exact hkm (Set.indicator_of_notMem (show x ∉ zcell km.1.1 km.1.2 from hx) _) + +/-- On a maximal big cube `Q`, the signed average of `f` is `⨍_Q f`. -/ +theorem czAverageC_eq_of_mem {k : ℤ} {m : Fin (finrank ℝ V) → ℤ} (hkm : (k, m) ∈ czMaximal G t) + (f : V → E) {x : V} (hx : x ∈ zcell k m) : + czAverageC G t f x = ⨍ z in zcell k m, f z := by + rw [czAverageC, tsum_eq_single ⟨(k, m), hkm⟩ fun km hne => ?_] + · exact Set.indicator_of_mem hx _ + refine Set.indicator_of_notMem (fun hx' => hne ?_) _ + exact subsingleton_czMaximal_mem_zcell (G := G) (t := t) x hx' (show x ∈ zcell k m from hx) + +/-- Outside the exceptional set `Ω` the signed averages vanish. -/ +theorem czAverageC_eq_zero_of_notMem (f : V → E) {x : V} (hx : x ∉ czSet G t) : + czAverageC G t f x = 0 := + (tsum_congr fun km => + Set.indicator_of_notMem (fun hx' => hx (zcell_subset_czSet km.2 hx')) _).trans tsum_zero + +/-- The signed averages are strongly measurable: they are the pointwise limit of the finite +partial sums, which are finite sums of constants times indicators of cubes. -/ +theorem stronglyMeasurable_czAverageC (f : V → E) : StronglyMeasurable (czAverageC G t f) := by + have := (czMaximal_countable (V := V) (G := G) (t := t)).to_subtype + exact stronglyMeasurable_of_tendsto atTop + (fun s => Finset.stronglyMeasurable_fun_sum s fun km _ => + stronglyMeasurable_const.indicator (measurableSet_zcell _ _)) + (tendsto_pi_nhds.2 fun x => hasSum_czAverageC f x) + +/-- The norm of the signed average is at most the nonnegative average of the norm: +`‖czAverageC f (x)‖ ≤ czAverage ‖f‖ (x)`, by `MeasureTheory.enorm_average_le` on each cube. -/ +theorem enorm_czAverageC_le (f : V → E) (x : V) : + ‖czAverageC G t f x‖ₑ ≤ czAverage G t (fun y => ‖f y‖ₑ) x := by + by_cases hx : x ∈ czSet G t + · obtain ⟨km, hkm, hxkm⟩ := Set.mem_iUnion₂.1 hx + rw [czAverageC_eq_of_mem hkm f hxkm, czAverage_eq_of_mem hkm _ hxkm] + exact enorm_average_le f + · rw [czAverageC_eq_zero_of_notMem f hx, eNorm_zero] + exact zero_le + +/-! ### The signed good part -/ + +/-- The **signed good part** of `f : V → E` in the Calderón–Zygmund decomposition of `G` at +height `t`: `f` outside the exceptional set `Ω`, and its mean `⨍_Q f` on each maximal big cube +`Q`. -/ +noncomputable def czGoodC (G : V → ℝ≥0∞) (t : ℝ≥0∞) (f : V → E) (x : V) : E := + (czSet G t)ᶜ.indicator f x + czAverageC G t f x + +/-- The signed good part of an almost everywhere strongly measurable function is almost +everywhere strongly measurable. -/ +theorem aestronglyMeasurable_czGoodC {f : V → E} (hf : AEStronglyMeasurable f volume) : + AEStronglyMeasurable (czGoodC G t f) volume := + (hf.indicator measurableSet_czSet.compl).add + (stronglyMeasurable_czAverageC f).aestronglyMeasurable + +/-- **Comparison with the nonnegative good part**: `‖czGoodC f (x)‖ ≤ czGood ‖f‖ (x)` at every +point `x` (outside `Ω` both sides are `‖f(x)‖`). -/ +theorem enorm_czGoodC_le (f : V → E) (x : V) : + ‖czGoodC G t f x‖ₑ ≤ czGood G t (fun y => ‖f y‖ₑ) x := by + refine (eNorm_add_le _ _).trans (add_le_add ?_ (enorm_czAverageC_le f x)) + rw [eNorm_indicator_eq_indicator_eNorm] + +/-- **The integral of the norm of the signed good part is at most that of `f`**: +`∫ ‖czGoodC f‖ ≤ ∫ ‖f‖` for every `f : V → E`, since the nonnegative good part keeps the integral +(`Rd.lintegral_czGood`). -/ +theorem lintegral_enorm_czGoodC_le (f : V → E) : + ∫⁻ x, ‖czGoodC G t f x‖ₑ ≤ ∫⁻ x, ‖f x‖ₑ := + (lintegral_mono fun x => enorm_czGoodC_le f x).trans_eq (lintegral_czGood _) + +/-- The signed good part of an integrable function is integrable. -/ +theorem integrable_czGoodC {f : V → E} (hf : Integrable f volume) : + Integrable (czGoodC G t f) volume := + ⟨aestronglyMeasurable_czGoodC hf.1, (lintegral_enorm_czGoodC_le f).trans_lt hf.2⟩ + +/-- **The good part is bounded**: in dimension `n ≥ 1`, for integrable `f` and `0 < t`, the good +part of `f` in the decomposition of `‖f‖` at height `t` satisfies `‖czGoodC f (x)‖ ≤ 2^n t` for +almost every `x`. -/ +theorem ae_enorm_czGoodC_le [Nontrivial V] {f : V → E} (hf : Integrable f volume) (ht0 : 0 < t) : + ∀ᵐ x, ‖czGoodC (fun y => ‖f y‖ₑ) t f x‖ₑ ≤ 2 ^ finrank ℝ V * t := by + filter_upwards [ae_czGood_self_le hf.1.eNorm hf.2.ne ht0] with x hx + exact (enorm_czGoodC_le f x).trans hx + +/-- **The square of the good part**: in dimension `n ≥ 1`, for integrable `f` and `0 < t`, the +good part of `f` in the decomposition of `‖f‖` at height `t` satisfies +`∫ ‖czGoodC f‖² ≤ 2^n t ∫ ‖f‖`: it is bounded by `2^n t`, and the integral of its norm is at +most `∫ ‖f‖`. -/ +theorem lintegral_enorm_czGoodC_sq_le [Nontrivial V] {f : V → E} (hf : Integrable f volume) + (ht0 : 0 < t) : + ∫⁻ x, ‖czGoodC (fun y => ‖f y‖ₑ) t f x‖ₑ ^ 2 ≤ 2 ^ finrank ℝ V * t * ∫⁻ x, ‖f x‖ₑ := + (lintegral_sq_le_mul_lintegral_of_ae_le (aestronglyMeasurable_czGoodC hf.1).eNorm + (ae_enorm_czGoodC_le hf ht0)).trans (mul_le_mul_right (lintegral_enorm_czGoodC_le f) _) + +/-! ### The signed bad part and its pieces -/ + +/-- The **signed bad part** `f - czGoodC f` of the Calderón–Zygmund decomposition of `G` at +height `t`. -/ +noncomputable def czBadC (G : V → ℝ≥0∞) (t : ℝ≥0∞) (f : V → E) (x : V) : E := + f x - czGoodC G t f x + +/-- The signed good and bad parts add up to the function: `czGoodC f + czBadC f = f` for every +`f : V → E`. -/ +theorem czGoodC_add_czBadC (f : V → E) : czGoodC G t f + czBadC G t f = f := + funext fun x => add_sub_cancel (czGoodC G t f x) (f x) + +/-- The **bad piece** of `f : V → E` on the dyadic cube `Q = Q_{k,m}`: `f - ⨍_Q f` on `Q` and `0` +outside. -/ +noncomputable def czBadPart (f : V → E) (km : ℤ × (Fin (finrank ℝ V) → ℤ)) : V → E := + (zcell km.1 km.2).indicator fun z => f z - ⨍ z' in zcell km.1 km.2, f z' + +/-- On its cube `Q` the bad piece is `f - ⨍_Q f`. -/ +theorem czBadPart_of_mem (f : V → E) {km : ℤ × (Fin (finrank ℝ V) → ℤ)} {x : V} + (hx : x ∈ zcell km.1 km.2) : czBadPart f km x = f x - ⨍ z in zcell km.1 km.2, f z := + Set.indicator_of_mem hx _ + +/-- Outside its cube the bad piece vanishes. -/ +theorem czBadPart_of_notMem (f : V → E) {km : ℤ × (Fin (finrank ℝ V) → ℤ)} {x : V} + (hx : x ∉ zcell km.1 km.2) : czBadPart f km x = 0 := + Set.indicator_of_notMem hx _ + +/-- Outside the exceptional set `Ω` the bad part vanishes. -/ +theorem czBadC_eq_zero_of_notMem (f : V → E) {x : V} (hx : x ∉ czSet G t) : + czBadC G t f x = 0 := by + rw [czBadC, czGoodC, Set.indicator_of_mem (show x ∈ (czSet G t)ᶜ from hx), + czAverageC_eq_zero_of_notMem f hx, add_zero, sub_self] + +/-- On a maximal big cube `Q` the bad part is `f - ⨍_Q f`. -/ +theorem czBadC_eq_of_mem {k : ℤ} {m : Fin (finrank ℝ V) → ℤ} (hkm : (k, m) ∈ czMaximal G t) + (f : V → E) {x : V} (hx : x ∈ zcell k m) : + czBadC G t f x = f x - ⨍ z in zcell k m, f z := by + rw [czBadC, czGoodC, Set.indicator_of_notMem (Set.notMem_compl_iff.2 (zcell_subset_czSet hkm hx)), + zero_add, czAverageC_eq_of_mem hkm f hx] + +/-- **The bad part is the sum of the bad pieces** on the maximal big cubes, at every point; at +most one piece is nonzero there. -/ +theorem hasSum_czBadPart (f : V → E) (x : V) : + HasSum (fun km : czMaximal G t => czBadPart f km.1 x) (czBadC G t f x) := by + by_cases hx : x ∈ czSet G t + · obtain ⟨km, hkm, hxkm⟩ := Set.mem_iUnion₂.1 hx + have h1 := hasSum_single (f := fun km : czMaximal G t => czBadPart f km.1 x) + (⟨km, hkm⟩ : czMaximal G t) fun km' hne => czBadPart_of_notMem f fun hx' => hne + (subsingleton_czMaximal_mem_zcell x hx' (show x ∈ zcell km.1 km.2 from hxkm)) + rw [czBadC_eq_of_mem hkm f hxkm, ← czBadPart_of_mem f hxkm] + exact h1 + · rw [czBadC_eq_zero_of_notMem f hx] + convert hasSum_zero with km + exact czBadPart_of_notMem f fun hx' => hx (zcell_subset_czSet km.2 hx') + +/-- The bad part as the series of the bad pieces, `czBadC f = ∑_Q czBadPart_Q f`. -/ +theorem czBadC_eq_tsum (f : V → E) (x : V) : + czBadC G t f x = ∑' km : czMaximal G t, czBadPart f km.1 x := + (hasSum_czBadPart f x).tsum_eq.symm + +/-- **The bad pieces have mean zero**: `∫ czBadPart_Q f = 0` for every function `f : V → E` and +every cube `Q`. For `f` not integrable on `Q`, or `E` not complete, both the mean and the +integral are `0` by convention. -/ +theorem integral_czBadPart (f : V → E) (km : ℤ × (Fin (finrank ℝ V) → ℤ)) : + ∫ z, czBadPart f km z = 0 := by + by_cases hE : CompleteSpace E + · rw [czBadPart, integral_indicator (measurableSet_zcell _ _)] + exact setAverage_sub_setAverage (volume_zcell_lt_top _ _).ne f + · exact integral_of_not_completeSpace hE + +/-- **The bad part has mean zero on every maximal big cube** `Q`: `∫_Q czBadC f = 0` for every +function `f : V → E`. -/ +theorem setIntegral_czBadC {k : ℤ} {m : Fin (finrank ℝ V) → ℤ} (hkm : (k, m) ∈ czMaximal G t) + (f : V → E) : ∫ z in zcell k m, czBadC G t f z = 0 := by + rw [setIntegral_congr_fun (measurableSet_zcell k m) fun x hx => czBadC_eq_of_mem hkm f hx] + by_cases hE : CompleteSpace E + · exact setAverage_sub_setAverage (volume_zcell_lt_top _ _).ne f + · exact integral_of_not_completeSpace hE + +/-- A bad piece of a function that is integrable on its cube is integrable. -/ +theorem integrable_czBadPart {f : V → E} {km : ℤ × (Fin (finrank ℝ V) → ℤ)} + (hf : IntegrableOn f (zcell km.1 km.2) volume) : Integrable (czBadPart f km) volume := + (hf.sub (integrableOn_const (volume_zcell_lt_top _ _).ne)).integrable_indicator + (measurableSet_zcell _ _) + +/-- **The mass of a bad piece**: `∫ ‖czBadPart_Q f‖ ≤ 2 ∫_Q ‖f‖` for every cube `Q` and every +`f : V → E` (`MeasureTheory.setLIntegral_enorm_sub_setAverage_le`). -/ +theorem lintegral_enorm_czBadPart_le (f : V → E) (km : ℤ × (Fin (finrank ℝ V) → ℤ)) : + ∫⁻ z, ‖czBadPart f km z‖ₑ ≤ 2 * ∫⁻ z in zcell km.1 km.2, ‖f z‖ₑ := by + simp only [czBadPart, eNorm_indicator_eq_indicator_eNorm] + rw [lintegral_indicator (measurableSet_zcell _ _)] + exact setLIntegral_enorm_sub_setAverage_le (volume_zcell_lt_top _ _).ne f + +/-- **The total mass of the bad pieces**: `∑_Q ∫ ‖czBadPart_Q f‖ ≤ 2 ∫ ‖f‖`, the sum over the +maximal big cubes `Q` of `G` at height `t`, for every `f : V → E`. -/ +theorem tsum_lintegral_enorm_czBadPart_le (f : V → E) : + ∑' km : czMaximal G t, ∫⁻ z, ‖czBadPart f km.1 z‖ₑ ≤ 2 * ∫⁻ z, ‖f z‖ₑ := + tsum_le_mul_lintegral_of_le_setLIntegral 2 fun km => lintegral_enorm_czBadPart_le f km.1 + +/-- The bad part of an integrable function is integrable. -/ +theorem integrable_czBadC {f : V → E} (hf : Integrable f volume) : + Integrable (czBadC G t f) volume := + hf.sub (integrable_czGoodC hf) + +/-- **The mass of the bad part**: `∫ ‖czBadC f‖ ≤ 2 ∫ ‖f‖` for every almost everywhere strongly +measurable `f`. -/ +theorem lintegral_enorm_czBadC_le {f : V → E} (hf : AEStronglyMeasurable f volume) : + ∫⁻ x, ‖czBadC G t f x‖ₑ ≤ 2 * ∫⁻ x, ‖f x‖ₑ := + calc ∫⁻ x, ‖czBadC G t f x‖ₑ ≤ ∫⁻ x, (‖f x‖ₑ + ‖czGoodC G t f x‖ₑ) := + lintegral_mono fun _ => eNorm_sub_le + _ = (∫⁻ x, ‖f x‖ₑ) + ∫⁻ x, ‖czGoodC G t f x‖ₑ := lintegral_add_left' hf.eNorm _ + _ ≤ (∫⁻ x, ‖f x‖ₑ) + ∫⁻ x, ‖f x‖ₑ := add_le_add le_rfl (lintegral_enorm_czGoodC_le f) + _ = 2 * ∫⁻ x, ‖f x‖ₑ := (two_mul _).symm + +/-! ### Families: the vector-valued decomposition -/ + +variable {q : ℝ≥0∞} {g : ℕ → V → E} + +/-- **The good parts of a family are bounded**: in dimension `n ≥ 1`, for `1 ≤ q ≤ ∞`, almost +everywhere strongly measurable `g_j` with `G = ‖(‖g_j‖)_j‖_{ℓ_q}` integrable, and `0 < t`, the +good parts of the `g_j` for the cubes of `G` at height `t` satisfy +`‖(‖czGoodC g_j (x)‖)_j‖_{ℓ_q} ≤ 2^n t` for almost every `x`. -/ +theorem ae_lqNorm_czGoodC_le [Nontrivial V] (hq : 1 ≤ q) + (hg : ∀ j, AEStronglyMeasurable (g j) volume) + (hG : ∫⁻ x, lqNorm q (fun j => ‖g j x‖ₑ) ≠ ∞) (ht0 : 0 < t) : + ∀ᵐ x, lqNorm q (fun j => ‖czGoodC (fun y => lqNorm q (fun j => ‖g j y‖ₑ)) t (g j) x‖ₑ) ≤ + 2 ^ finrank ℝ V * t := by + filter_upwards [ae_lqNorm_czGood_le hq (fun j => (hg j).eNorm) hG ht0] with x hx + exact (ENNReal.lqNorm_mono fun j => enorm_czGoodC_le (g j) x).trans hx + +/-- **The integral of the `ℓ_q` norm of the good parts of a family is at most `∫ G`**: +`∫ ‖(‖czGoodC g_j‖)_j‖_{ℓ_q} ≤ ∫ G` with `G = ‖(‖g_j‖)_j‖_{ℓ_q}`, for `1 ≤ q ≤ ∞`, almost +everywhere strongly measurable `g_j`, and the cubes of any function at any height. -/ +theorem lintegral_lqNorm_czGoodC_le (hq : 1 ≤ q) (hg : ∀ j, AEStronglyMeasurable (g j) volume) : + ∫⁻ x, lqNorm q (fun j => ‖czGoodC G t (g j) x‖ₑ) ≤ ∫⁻ x, lqNorm q (fun j => ‖g j x‖ₑ) := + (lintegral_mono fun x => ENNReal.lqNorm_mono fun j => enorm_czGoodC_le (g j) x).trans + (lintegral_lqNorm_czGood_le hq fun j => (hg j).eNorm) + +/-- **The square of the good parts of a family**: in dimension `n ≥ 1`, for `1 ≤ q ≤ ∞`, almost +everywhere strongly measurable `g_j` with `G = ‖(‖g_j‖)_j‖_{ℓ_q}` integrable, and `0 < t`, +`∫ ‖(‖czGoodC g_j‖)_j‖_{ℓ_q}² ≤ 2^n t ∫ G` for the cubes of `G` at height `t`. -/ +theorem lintegral_lqNorm_czGoodC_sq_le [Nontrivial V] (hq : 1 ≤ q) + (hg : ∀ j, AEStronglyMeasurable (g j) volume) + (hG : ∫⁻ x, lqNorm q (fun j => ‖g j x‖ₑ) ≠ ∞) (ht0 : 0 < t) : + ∫⁻ x, lqNorm q (fun j => ‖czGoodC (fun y => lqNorm q (fun j => ‖g j y‖ₑ)) t (g j) x‖ₑ) ^ 2 ≤ + 2 ^ finrank ℝ V * t * ∫⁻ x, lqNorm q (fun j => ‖g j x‖ₑ) := + (lintegral_sq_le_mul_lintegral_of_ae_le + (aemeasurable_lqNorm_comp (fun j => (aestronglyMeasurable_czGoodC (hg j)).eNorm) q) + (ae_lqNorm_czGoodC_le hq hg hG ht0)).trans + (mul_le_mul_right (lintegral_lqNorm_czGoodC_le hq hg) _) + +/-- **The mass of the bad pieces of a family on one cube**: for `1 ≤ q ≤ ∞`, almost everywhere +strongly measurable `g_j` and every cube `Q`, +`∫ ‖(‖czBadPart_Q g_j‖)_j‖_{ℓ_q} ≤ 2 ∫_Q ‖(‖g_j‖)_j‖_{ℓ_q}` +(`MeasureTheory.setLIntegral_lqNorm_sub_setAverage_le`). -/ +theorem lintegral_lqNorm_czBadPart_le (hq : 1 ≤ q) (hg : ∀ j, AEStronglyMeasurable (g j) volume) + (km : ℤ × (Fin (finrank ℝ V) → ℤ)) : + ∫⁻ z, lqNorm q (fun j => ‖czBadPart (g j) km z‖ₑ) ≤ + 2 * ∫⁻ z in zcell km.1 km.2, lqNorm q (fun j => ‖g j z‖ₑ) := by + simp only [czBadPart, eNorm_indicator_eq_indicator_eNorm, ENNReal.lqNorm_indicator] + rw [lintegral_indicator (measurableSet_zcell _ _)] + exact setLIntegral_lqNorm_sub_setAverage_le hq (fun j => (hg j).restrict) + (volume_zcell_lt_top _ _).ne + +/-- **The total mass of the bad pieces of a family**: for `1 ≤ q ≤ ∞` and almost everywhere +strongly measurable `g_j`, `∑_Q ∫ ‖(‖czBadPart_Q g_j‖)_j‖_{ℓ_q} ≤ 2 ∫ ‖(‖g_j‖)_j‖_{ℓ_q}`, the +sum over the maximal big cubes `Q` of any function at any height. -/ +theorem tsum_lintegral_lqNorm_czBadPart_le (hq : 1 ≤ q) + (hg : ∀ j, AEStronglyMeasurable (g j) volume) : + ∑' km : czMaximal G t, ∫⁻ z, lqNorm q (fun j => ‖czBadPart (g j) km.1 z‖ₑ) ≤ + 2 * ∫⁻ z, lqNorm q (fun j => ‖g j z‖ₑ) := + tsum_le_mul_lintegral_of_le_setLIntegral 2 fun km => lintegral_lqNorm_czBadPart_le hq hg km.1 + +end Rd diff --git a/LeanPool/FunctionSpaces/Analysis/Maximal/DyadicCubes.lean b/LeanPool/FunctionSpaces/Analysis/Maximal/DyadicCubes.lean new file mode 100644 index 0000000000..d1e41b5818 --- /dev/null +++ b/LeanPool/FunctionSpaces/Analysis/Maximal/DyadicCubes.lean @@ -0,0 +1,294 @@ +/- +Copyright (c) 2026 Mario Ullrich. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Mario Ullrich +-/ +module + +public import LeanPool.FunctionSpaces.Analysis.Maximal.DyadicGrid +public import Mathlib.MeasureTheory.Covering.DensityTheorem +public import Mathlib.MeasureTheory.Measure.Lebesgue.EqHaar +public import Mathlib.MeasureTheory.Measure.Haar.InnerProductSpace + +/- +Modified for Lean Pool: module names and imports adapted. +-/ + +/-! +# Volume and nesting of dyadic cubes + +The dyadic cube `Q_{k,m} = {x : ⌊2^k x_i⌋ = m_i for all i}` of level `k ∈ ℤ` (`Rd.zcell`) is a +box in the coordinates of `Rd.gridBasis` (`Rd.zcell_eq_preimage`) and has the volume `2^(-kn)` +(`Rd.volume_zcell`). Cubes are **nested**: each cube of level `k + 1` lies in its parent of +level `k` (`Rd.zcell_succ_subset_cubeParent`), so two cubes are nested or disjoint +(`Rd.zcell_subset_or_disjoint`). + +**Lebesgue differentiation along cubes**: for a locally integrable `F`, the averages of `F` over +the cube of level `k` containing `x` tend to `F x` as `k → ∞` for almost every `x` +(`Rd.ae_tendsto_average_cubeAt`), since every such cube lies in a ball of comparable volume +around a nearby centre and averages over a subset are controlled by averages over the larger set +(`Rd.abs_setAverage_sub_le`). Consequently an integrable `G ≥ 0` whose cube averages at `x` are +all at most `t` satisfies `G x ≤ t` almost everywhere (`Rd.ae_le_of_forall_laverage_le`). +-/ + +@[expose] public section + +open MeasureTheory Module Metric Filter Set +open scoped ENNReal Topology + +namespace Rd + +variable {V : Type*} [NormedAddCommGroup V] [InnerProductSpace ℝ V] [FiniteDimensional ℝ V] + +/-! ### Volume -/ + +section Measure + +variable [MeasurableSpace V] [BorelSpace V] + +omit [MeasurableSpace V] [BorelSpace V] in +/-- In coordinates, the cube `Q_{k,m}` is the box `∏_i [m_i 2^(-k), (m_i + 1) 2^(-k))`. -/ +theorem zcell_eq_preimage (k : ℤ) (m : Fin (finrank ℝ V) → ℤ) : + zcell k m = (fun x : V => WithLp.ofLp ((gridBasis V).repr x)) ⁻¹' + Set.pi univ (fun i => Ico ((m i : ℝ) / 2 ^ k) (((m i : ℝ) + 1) / 2 ^ k)) := by + have hpos : (0 : ℝ) < 2 ^ k := by positivity + ext x + simp only [zcell, zcellIndex, mem_ofPred_eq, mem_preimage, mem_univ_pi, mem_Ico, funext_iff, + Int.floor_eq_iff, div_le_iff₀ hpos, lt_div_iff₀ hpos] + refine forall_congr' fun i => ?_ + rw [mul_comm ((gridBasis V).repr x i)] + +/-- **The volume of a cube**: `|Q_{k,m}| = 2^(-kn)`. -/ +theorem volume_zcell (k : ℤ) (m : Fin (finrank ℝ V) → ℤ) : + volume (zcell (V := V) k m) = ENNReal.ofReal ((2 : ℝ) ^ k)⁻¹ ^ finrank ℝ V := by + have hmp : MeasurePreserving (fun x : V => WithLp.ofLp ((gridBasis V).repr x)) volume volume := + (PiLp.volume_preserving_ofLp _).comp (gridBasis V).measurePreserving_repr + have hlen : ∀ i, ((m i : ℝ) + 1) / 2 ^ k - m i / 2 ^ k = ((2 : ℝ) ^ k)⁻¹ := fun i => by + field_simp + ring + rw [zcell_eq_preimage, hmp.measure_preimage + (MeasurableSet.univ_pi fun _ => measurableSet_Ico).nullMeasurableSet, Real.volume_pi_Ico] + simp only [hlen, Finset.prod_const, Finset.card_univ, Fintype.card_fin] + +/-- Cubes have positive volume. -/ +theorem volume_zcell_pos (k : ℤ) (m : Fin (finrank ℝ V) → ℤ) : + 0 < volume (zcell (V := V) k m) := by + rw [volume_zcell] + exact ENNReal.pow_pos (ENNReal.ofReal_pos.2 (by positivity)) _ + +/-- Cubes have finite volume. -/ +theorem volume_zcell_lt_top (k : ℤ) (m : Fin (finrank ℝ V) → ℤ) : + volume (zcell (V := V) k m) < ∞ := by + rw [volume_zcell] + exact ENNReal.pow_lt_top ENNReal.ofReal_lt_top + +/-- The real volume of a cube is `2^(-kn)`. -/ +theorem volume_real_zcell (k : ℤ) (m : Fin (finrank ℝ V) → ℤ) : + volume.real (zcell (V := V) k m) = (((2 : ℝ) ^ k)⁻¹) ^ finrank ℝ V := by + rw [measureReal_def, volume_zcell, ENNReal.toReal_pow, ENNReal.toReal_ofReal (by positivity)] + +/-- The cells of level `j ∈ ℕ` have volume `2^(-jn)`. -/ +theorem volume_cell (j : ℕ) (m : Fin (finrank ℝ V) → ℤ) : + volume (cell (V := V) j m) = ENNReal.dyadicWeight (-(finrank ℝ V : ℝ)) j := by + rw [← zcell_natCast, volume_zcell, zpow_natCast, ← one_div, + ← ENNReal.ofReal_pow (by positivity), ENNReal.ofReal_one_div_two_pow_pow] + +end Measure + +/-! ### Nesting -/ + +/-- The index of the **parent** cube: `⌊m_i / 2⌋` in every coordinate. -/ +def cubeParent (m : Fin (finrank ℝ V) → ℤ) : Fin (finrank ℝ V) → ℤ := fun i => m i / 2 + +/-- Every cube of level `k + 1` lies in its parent of level `k`. -/ +theorem zcell_succ_subset_cubeParent (k : ℤ) (m : Fin (finrank ℝ V) → ℤ) : + zcell (V := V) (k + 1) m ⊆ zcell k (cubeParent m) := by + intro x hx + funext i + have hm : ⌊(2 : ℝ) ^ (k + 1) * (gridBasis V).repr x i⌋ = m i := congrFun hx i + have h2 : (2 : ℝ) ^ k * (gridBasis V).repr x i = + (2 : ℝ) ^ (k + 1) * (gridBasis V).repr x i / ((2 : ℕ) : ℝ) := by + rw [zpow_add_one₀ two_ne_zero] + push_cast + ring + change ⌊(2 : ℝ) ^ k * (gridBasis V).repr x i⌋ = m i / 2 + rw [h2, Int.floor_div_natCast, hm] + rfl + +/-- The index of the ancestor `l` levels up: the parent map iterated `l` times. -/ +def cubeAncestor (l : ℕ) (m : Fin (finrank ℝ V) → ℤ) : Fin (finrank ℝ V) → ℤ := cubeParent^[l] m + +omit [FiniteDimensional ℝ V] in +/-- Ancestors of ancestors are ancestors. -/ +theorem cubeAncestor_add (l l' : ℕ) (m : Fin (finrank ℝ V) → ℤ) : + cubeAncestor l (cubeAncestor l' m) = cubeAncestor (l + l') m := + (Function.iterate_add_apply cubeParent l l' m).symm + +/-- Every cube of level `k + l` lies in its ancestor of level `k`. -/ +theorem zcell_subset_cubeAncestor (k : ℤ) (l : ℕ) (m : Fin (finrank ℝ V) → ℤ) : + zcell (V := V) (k + l) m ⊆ zcell k (cubeAncestor l m) := by + induction l generalizing k with + | zero => simp [cubeAncestor] + | succ l ih => + have hk : k + ((l + 1 : ℕ) : ℤ) = (k + 1) + l := by push_cast; ring + rw [hk, cubeAncestor, Function.iterate_succ_apply'] + exact (ih (k + 1)).trans (zcell_succ_subset_cubeParent k _) + +/-- The index of level `k - l` is the ancestor of the index of level `k`. -/ +theorem zcellIndex_sub_cubeAncestor (k : ℤ) (l : ℕ) (x : V) : + zcellIndex (k - l) x = cubeAncestor l (zcellIndex k x) := by + have hx : x ∈ zcell ((k - l) + l) (zcellIndex k x) := by + rw [sub_add_cancel] + exact mem_zcell_zcellIndex k x + exact zcell_subset_cubeAncestor (k - l) l _ hx + +/-- **Nested or disjoint**: for `k ≤ k'`, the cube `Q_{k',m'}` lies in the cube `Q_{k,m}` or is +disjoint from it. -/ +theorem zcell_subset_or_disjoint {k k' : ℤ} (hk : k ≤ k') (m m' : Fin (finrank ℝ V) → ℤ) : + zcell (V := V) k' m' ⊆ zcell k m ∨ Disjoint (zcell (V := V) k' m') (zcell k m) := by + obtain ⟨l, hl⟩ := Int.le.dest hk + have hsub := zcell_subset_cubeAncestor (V := V) k l m' + rw [hl] at hsub + by_cases h : cubeAncestor l m' = m + · exact Or.inl (h ▸ hsub) + · exact Or.inr ((zcell_disjoint k h).mono_left hsub) + +section Measure + +variable [MeasurableSpace V] [BorelSpace V] + +/-- The parent cube has `2^n` times the volume of its child. -/ +theorem volume_zcell_cubeParent (k : ℤ) (m : Fin (finrank ℝ V) → ℤ) : + volume (zcell (V := V) k (cubeParent m)) = + 2 ^ finrank ℝ V * volume (zcell (V := V) (k + 1) m) := by + rw [volume_zcell, volume_zcell, ← mul_pow] + congr 1 + rw [← ENNReal.ofReal_ofNat 2, ← ENNReal.ofReal_mul (by norm_num), zpow_add_one₀ two_ne_zero] + congr 1 + field_simp + +/-- **Coarser cubes are larger**: a cube of level `k - l` has `2^(ln)` times the volume of a cube +of level `k`, for all indices. -/ +theorem volume_zcell_sub (k : ℤ) (l : ℕ) (m m' : Fin (finrank ℝ V) → ℤ) : + volume (zcell (V := V) (k - l) m') = 2 ^ (l * finrank ℝ V) * volume (zcell (V := V) k m) := by + have h : ((2 : ℝ) ^ (k - l))⁻¹ = 2 ^ l * ((2 : ℝ) ^ k)⁻¹ := by + rw [zpow_sub₀ two_ne_zero, zpow_natCast] + field_simp + rw [volume_zcell, volume_zcell, h, ENNReal.ofReal_mul (by positivity), + ENNReal.ofReal_pow (by norm_num), ENNReal.ofReal_ofNat, mul_pow, ← pow_mul] + +end Measure + +/-! ### Lebesgue differentiation along cubes -/ + +/-- The dyadic cube of level `k` containing `x`. -/ +noncomputable def cubeAt (k : ℤ) (x : V) : Set V := zcell k (zcellIndex k x) + +/-- Every point lies in its cube. -/ +theorem mem_cubeAt (k : ℤ) (x : V) : x ∈ cubeAt k x := mem_zcell_zcellIndex k x + +/-- **Averages over a subset**: if `Q ⊆ B` with `0 < |Q|` and `|B| < ∞`, and `F` is integrable +on `B`, then `|⨍_Q F - c| ≤ (|B| / |Q|) ⨍_B |F - c|` for every constant `c`. -/ +theorem abs_setAverage_sub_le {α : Type*} [MeasurableSpace α] {μ : Measure α} {Q B : Set α} + (hQB : Q ⊆ B) (hQ0 : μ Q ≠ 0) (hB : μ B ≠ ∞) {F : α → ℝ} (hF : IntegrableOn F B μ) (c : ℝ) : + |(⨍ y in Q, F y ∂μ) - c| ≤ μ.real B / μ.real Q * ⨍ y in B, |F y - c| ∂μ := by + have hQ : μ Q ≠ ∞ := ne_top_of_le_ne_top hB (measure_mono hQB) + have hQr : 0 < μ.real Q := ENNReal.toReal_pos hQ0 hQ + have hFQ : IntegrableOn F Q μ := hF.mono_set hQB + have hsub : (⨍ y in Q, F y ∂μ) - c = (μ.real Q)⁻¹ * ∫ y in Q, (F y - c) ∂μ := by + rw [setAverage_eq, integral_sub hFQ (integrableOn_const hQ), setIntegral_const, smul_eq_mul, + smul_eq_mul] + field_simp + have hint : IntegrableOn (fun y => |F y - c|) B μ := + (hF.sub (integrableOn_const hB)).abs + have hBr : 0 < μ.real B := ENNReal.toReal_pos (fun h => hQ0 (measure_mono_null hQB h)) hB + have hrhs : μ.real B / μ.real Q * ⨍ y in B, |F y - c| ∂μ = + (μ.real Q)⁻¹ * ∫ y in B, |F y - c| ∂μ := by + rw [setAverage_eq, smul_eq_mul] + field_simp + rw [hsub, abs_mul, abs_of_pos (inv_pos.2 hQr), hrhs] + gcongr + calc |∫ y in Q, (F y - c) ∂μ| ≤ ∫ y in Q, |F y - c| ∂μ := abs_integral_le_integral_abs + _ ≤ ∫ y in B, |F y - c| ∂μ := + setIntegral_mono_set hint (Eventually.of_forall fun _ => abs_nonneg _) + (Eventually.of_forall hQB) + +/-- The cube of level `k` containing `x` lies in the closed ball of radius `(n+1) 2^(-k)` around +its centre. -/ +theorem cubeAt_subset_closedBall (k : ℤ) (x : V) : + cubeAt k x ⊆ + closedBall (zcellCenter k (zcellIndex k x)) (((finrank ℝ V : ℝ) + 1) / 2 ^ k) := by + intro y hy + rw [mem_closedBall, dist_eq_norm] + refine (norm_sub_zcellCenter_le hy).trans ?_ + gcongr + linarith + +variable [MeasurableSpace V] [BorelSpace V] + +/-- The closed ball of radius `(n+1) 2^(-k)` around the centre of the cube of level `k` +containing `x` has `(n+1)^n |B(0,1)|` times the volume of that cube. -/ +theorem volume_real_closedBall_div_cubeAt (k : ℤ) (x : V) : + volume.real (closedBall (zcellCenter k (zcellIndex k x)) + (((finrank ℝ V : ℝ) + 1) / 2 ^ k)) / volume.real (cubeAt k x) = + ((finrank ℝ V : ℝ) + 1) ^ finrank ℝ V * volume.real (ball (0 : V) 1) := by + rw [cubeAt, volume_real_zcell, Measure.addHaar_real_closedBall _ _ (by positivity), + div_pow, inv_pow] + field_simp + +/-- **Lebesgue differentiation along dyadic cubes**: for a locally integrable `F`, almost every +`x` satisfies `⨍_{Q_k(x)} F → F x` as `k → ∞`, where `Q_k(x)` is the cube of level `k` +containing `x`. -/ +theorem ae_tendsto_average_cubeAt {F : V → ℝ} (hF : LocallyIntegrable F volume) : + ∀ᵐ x, Tendsto (fun k : ℕ => ⨍ y in cubeAt (k : ℤ) x, F y) atTop (𝓝 (F x)) := by + have hae := IsUnifLocDoublingMeasure.ae_tendsto_average_norm_sub (μ := volume) hF 1 + filter_upwards [hae] with x hx + have hδ : Tendsto (fun k : ℕ => ((finrank ℝ V : ℝ) + 1) / 2 ^ (k : ℤ)) atTop (𝓝[>] 0) := by + refine tendsto_nhdsWithin_iff.2 ⟨?_, Eventually.of_forall fun k => mem_Ioi.2 (by positivity)⟩ + have h := (tendsto_pow_atTop_nhds_zero_of_lt_one (r := (1 / 2 : ℝ)) (by norm_num) + (by norm_num)).const_mul ((finrank ℝ V : ℝ) + 1) + rw [mul_zero] at h + refine h.congr fun k => ?_ + rw [zpow_natCast, one_div, inv_pow, div_eq_mul_inv] + have hmem : ∀ᶠ k : ℕ in atTop, x ∈ closedBall (zcellCenter (k : ℤ) (zcellIndex (k : ℤ) x)) + (1 * (((finrank ℝ V : ℝ) + 1) / 2 ^ (k : ℤ))) := + Eventually.of_forall fun k => by + rw [one_mul] + exact cubeAt_subset_closedBall (k : ℤ) x (mem_cubeAt _ x) + have hlim := (hx (fun k : ℕ => zcellCenter (k : ℤ) (zcellIndex (k : ℤ) x)) _ hδ hmem).const_mul + (((finrank ℝ V : ℝ) + 1) ^ finrank ℝ V * volume.real (ball (0 : V) 1)) + rw [mul_zero] at hlim + rw [tendsto_iff_norm_sub_tendsto_zero] + refine squeeze_zero (fun _ => norm_nonneg _) (fun k => ?_) hlim + rw [Real.norm_eq_abs, ← volume_real_closedBall_div_cubeAt (k : ℤ) x] + simp only [Real.norm_eq_abs] + exact abs_setAverage_sub_le (cubeAt_subset_closedBall (k : ℤ) x) + (volume_zcell_pos _ _).ne' measure_closedBall_lt_top.ne + (hF.integrableOn_isCompact (isCompact_closedBall _ _)) (F x) + +/-- For an a.e.-measurable `G : α → ℝ≥0∞` with finite integral over `s`, the average of `G` +over `s` is `ENNReal.ofReal` of the average of the real function `G.toReal` (Mathlib's +`toReal_setLAverage`). -/ +theorem setLAverage_eq_ofReal_setAverage {α : Type*} [MeasurableSpace α] {μ : Measure α} + {G : α → ℝ≥0∞} {s : Set α} (hG : AEMeasurable G (μ.restrict s)) + (hGs : ∫⁻ x in s, G x ∂μ ≠ ∞) : + ⨍⁻ x in s, G x ∂μ = ENNReal.ofReal (⨍ x in s, (G x).toReal ∂μ) := by + rw [← toReal_setLAverage hG ((ae_lt_top' hG hGs).mono fun _ h => h.ne), + ENNReal.ofReal_toReal (setLAverage_lt_top hGs).ne] + +/-- **Pointwise bounds from cube averages**: if `G : V → ℝ≥0∞` is a.e.-measurable with finite +integral, then for every `t` and almost every `x`, `⨍_{Q_k(x)} G ≤ t` for all levels `k ∈ ℕ` +implies `G x ≤ t`. -/ +theorem ae_le_of_forall_laverage_le {G : V → ℝ≥0∞} (hG : AEMeasurable G volume) + (hGi : ∫⁻ x, G x ≠ ∞) (t : ℝ≥0∞) : + ∀ᵐ x, (∀ k : ℕ, ⨍⁻ y in cubeAt (k : ℤ) x, G y ∂volume ≤ t) → G x ≤ t := by + have hF : LocallyIntegrable (fun x => (G x).toReal) volume := + (integrable_toReal_of_lintegral_ne_top hG hGi).locallyIntegrable + filter_upwards [ae_tendsto_average_cubeAt hF, ae_lt_top' hG hGi] with x hx hxt hle + rw [← ENNReal.ofReal_toReal hxt.ne] + refine le_of_tendsto' (ENNReal.tendsto_ofReal hx) fun k => ?_ + rw [← setLAverage_eq_ofReal_setAverage (s := cubeAt (k : ℤ) x) hG.restrict + (ne_top_of_le_ne_top hGi (setLIntegral_le_lintegral _ G))] + exact hle k + +end Rd diff --git a/LeanPool/FunctionSpaces/Analysis/Maximal/DyadicGrid.lean b/LeanPool/FunctionSpaces/Analysis/Maximal/DyadicGrid.lean new file mode 100644 index 0000000000..c787fec6f7 --- /dev/null +++ b/LeanPool/FunctionSpaces/Analysis/Maximal/DyadicGrid.lean @@ -0,0 +1,359 @@ +/- +Copyright (c) 2026 Mario Ullrich. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Mario Ullrich +-/ +module + +public import LeanPool.FunctionSpaces.Analysis.Fourier.Convolution +public import Mathlib.MeasureTheory.Function.Floor +public import Mathlib.MeasureTheory.Measure.Haar.InnerProductSpace + +/- +Modified for Lean Pool: module names and imports adapted. +-/ + +/-! +# The dyadic grid of a finite-dimensional inner product space + +In the coordinates `x_i = ⟪b_i, x⟫` of the orthonormal basis `b = stdOrthonormalBasis ℝ V` +(`Rd.gridBasis`), the **dyadic cube** of level `k ∈ ℤ` and index `m ∈ ℤ^n` is +`Q_{k,m} = {x : ⌊2^k x_i⌋ = m_i for all i}` (`Rd.zcell`, `Rd.zcellIndex`). The cubes of one level +partition `V` (`Rd.zcell_disjoint`, `Rd.iUnion_zcell`). The centre `c_{k,m}` has the coordinates +`(m_i + 1/2) 2^(-k)` (`Rd.zcellCenter`), and `‖x - c_{k,m}‖ ≤ n 2^(-k)` on `Q_{k,m}` +(`Rd.norm_sub_zcellCenter_le`), so the cube lies between the balls of radii `2^(-k)/2` and +`n 2^(-k)` around its centre (`Rd.ball_subset_zcell`, `Rd.zcell_subset_closedBall`). + +The **dyadic cells** `P_{j,m}` of level `j ∈ ℕ` are the cubes of natural level (`Rd.cell`, +`Rd.cellIndex`, `Rd.cellCenter`, `Rd.zcell_natCast`), and their lemmas are the cases `k = j` of +those for cubes. **Counting**: at most `(2ρ + 2)^n` centres of level `j` lie in a ball of radius +`ρ 2^(-j)` (`Rd.card_le_of_norm_cellCenter_sub_le`), since each coordinate of such a centre lies +in an interval of length `2ρ 2^(-j)`. The cells of one level split integrals and `L_p` norms into +sums (`Rd.lintegral_eq_tsum_cell`, `Rd.eLpNorm_rpow_eq_tsum_cell`). + +**Bounded overlap**: if at every point at most `N` of the functions `g_m` are nonzero and +`F = ∑_m g_m`, then `‖F‖_p^p ≤ N^(p-1) ∑_m ‖g_m‖_p^p` (`Rd.eLpNorm_rpow_le_of_overlap`). +-/ + +@[expose] public section + +open MeasureTheory Module Metric +open scoped ENNReal + +namespace Rd + +variable (V : Type*) [NormedAddCommGroup V] [InnerProductSpace ℝ V] [FiniteDimensional ℝ V] + +/-- The orthonormal basis of the dyadic grid. -/ +noncomputable abbrev gridBasis : OrthonormalBasis (Fin (finrank ℝ V)) ℝ V := + stdOrthonormalBasis ℝ V + +variable {V} + +/-! ### Dyadic cubes of every level -/ + +/-- The index `(⌊2^k x_i⌋)_i` of the dyadic cube of level `k ∈ ℤ` containing `x`. -/ +noncomputable def zcellIndex (k : ℤ) (x : V) : Fin (finrank ℝ V) → ℤ := + fun i => ⌊(2 : ℝ) ^ k * (gridBasis V).repr x i⌋ + +/-- The **dyadic cube** `Q_{k,m}` of level `k ∈ ℤ` and index `m ∈ ℤ^n`: the points whose scaled +coordinates `2^k x_i` have the integer parts `m_i`. -/ +def zcell (k : ℤ) (m : Fin (finrank ℝ V) → ℤ) : Set V := {x | zcellIndex k x = m} + +/-- The **centre** of the dyadic cube `Q_{k,m}`, with the coordinates `(m_i + 1/2) 2^(-k)`. -/ +noncomputable def zcellCenter (k : ℤ) (m : Fin (finrank ℝ V) → ℤ) : V := + (gridBasis V).repr.symm (WithLp.toLp 2 fun i => ((m i : ℝ) + 1 / 2) / 2 ^ k) + +/-- Every point lies in the cube of its index. -/ +theorem mem_zcell_zcellIndex (k : ℤ) (x : V) : x ∈ zcell k (zcellIndex k x) := rfl + +/-- The coordinates of a centre. -/ +theorem repr_zcellCenter (k : ℤ) (m : Fin (finrank ℝ V) → ℤ) (i : Fin (finrank ℝ V)) : + (gridBasis V).repr (zcellCenter k m) i = ((m i : ℝ) + 1 / 2) / 2 ^ k := by + simp [zcellCenter] + +/-- A coordinate is at most the norm. -/ +theorem abs_repr_le_norm (y : V) (i : Fin (finrank ℝ V)) : |(gridBasis V).repr y i| ≤ ‖y‖ := by + rw [← Real.norm_eq_abs, ← (gridBasis V).repr.norm_map y] + exact PiLp.norm_apply_le _ i + +/-- The `i`-th coordinate of `x - c_{k,m}` is `(2^k x_i - m_i - 1/2) / 2^k`. -/ +theorem repr_sub_zcellCenter (k : ℤ) (m : Fin (finrank ℝ V) → ℤ) (x : V) (i : Fin (finrank ℝ V)) : + (gridBasis V).repr (x - zcellCenter k m) i = + (2 ^ k * (gridBasis V).repr x i - m i - 1 / 2) / 2 ^ k := by + rw [map_sub, PiLp.sub_apply, repr_zcellCenter] + field_simp + ring + +/-- On a cube of level `k`, every coordinate differs from that of the centre by at most +`2^(-k)/2`. -/ +theorem abs_repr_sub_zcellCenter_le {k : ℤ} {m : Fin (finrank ℝ V) → ℤ} {x : V} + (hx : x ∈ zcell k m) (i : Fin (finrank ℝ V)) : + |(gridBasis V).repr (x - zcellCenter k m) i| ≤ 1 / 2 / 2 ^ k := by + have hm : ⌊(2 : ℝ) ^ k * (gridBasis V).repr x i⌋ = m i := congrFun hx i + have h1 := Int.floor_le ((2 : ℝ) ^ k * (gridBasis V).repr x i) + have h2 := Int.lt_floor_add_one ((2 : ℝ) ^ k * (gridBasis V).repr x i) + rw [hm] at h1 h2 + have hpos : (0 : ℝ) < 2 ^ k := by positivity + rw [repr_sub_zcellCenter, abs_div, abs_of_pos hpos, div_le_div_iff_of_pos_right hpos, abs_le] + constructor <;> linarith + +/-- **Cubes are small**: `‖x - c_{k,m}‖ ≤ n 2^(-k)` on `Q_{k,m}`. -/ +theorem norm_sub_zcellCenter_le {k : ℤ} {m : Fin (finrank ℝ V) → ℤ} {x : V} + (hx : x ∈ zcell k m) : ‖x - zcellCenter k m‖ ≤ finrank ℝ V / 2 ^ k := by + have hy : x - zcellCenter k m = ∑ i, (gridBasis V).repr (x - zcellCenter k m) i • + (gridBasis V) i := ((gridBasis V).sum_repr _).symm + calc ‖x - zcellCenter k m‖ + = ‖∑ i, (gridBasis V).repr (x - zcellCenter k m) i • (gridBasis V) i‖ := by rw [← hy] + _ ≤ ∑ i, ‖(gridBasis V).repr (x - zcellCenter k m) i • (gridBasis V) i‖ := norm_sum_le _ _ + _ = ∑ i, |(gridBasis V).repr (x - zcellCenter k m) i| := by + refine Finset.sum_congr rfl fun i _ => ?_ + rw [norm_smul, (gridBasis V).orthonormal.1 i, mul_one, Real.norm_eq_abs] + _ ≤ ∑ _i : Fin (finrank ℝ V), 1 / 2 ^ k := + Finset.sum_le_sum fun i _ => (abs_repr_sub_zcellCenter_le hx i).trans + (div_le_div_of_nonneg_right (by norm_num) (by positivity)) + _ = finrank ℝ V / 2 ^ k := by + rw [Finset.sum_const, Finset.card_univ, Fintype.card_fin, nsmul_eq_mul, mul_one_div] + +/-- **Outer ball**: the cube `Q_{k,m}` lies in the closed ball of radius `n 2^(-k)` around its +centre. -/ +theorem zcell_subset_closedBall (k : ℤ) (m : Fin (finrank ℝ V) → ℤ) : + zcell k m ⊆ closedBall (zcellCenter k m) (finrank ℝ V / 2 ^ k) := fun _ hx => + mem_closedBall_iff_norm.2 (norm_sub_zcellCenter_le hx) + +/-- **Inner ball**: the cube `Q_{k,m}` contains the open ball of radius `2^(-k)/2` around its +centre. -/ +theorem ball_subset_zcell (k : ℤ) (m : Fin (finrank ℝ V) → ℤ) : + ball (zcellCenter k m) (1 / 2 / 2 ^ k) ⊆ zcell k m := by + intro y hy + funext i + have hpos : (0 : ℝ) < 2 ^ k := by positivity + have h := (abs_repr_le_norm (y - zcellCenter k m) i).trans_lt (mem_ball_iff_norm.1 hy) + rw [repr_sub_zcellCenter, abs_div, abs_of_pos hpos, div_lt_div_iff_of_pos_right hpos, abs_lt] at h + exact Int.floor_eq_iff.2 ⟨by linarith, by linarith⟩ + +/-- The cube index is measurable. -/ +theorem measurable_zcellIndex [MeasurableSpace V] [BorelSpace V] (k : ℤ) : + Measurable (zcellIndex (V := V) k) := by + refine Measurable.of_eval fun i => ?_ + simp only [zcellIndex, OrthonormalBasis.repr_apply_apply] + exact Int.measurable_floor.comp + (measurable_const.mul (continuous_const.inner continuous_id).measurable) + +/-- Cubes are measurable. -/ +theorem measurableSet_zcell [MeasurableSpace V] [BorelSpace V] (k : ℤ) + (m : Fin (finrank ℝ V) → ℤ) : MeasurableSet (zcell (V := V) k m) := + measurable_zcellIndex k (measurableSet_singleton m) + +/-- Cubes of the same level with different indices are disjoint: they are the fibres of the +cube index (Mathlib's `pairwise_disjoint_fiber`). -/ +theorem zcell_disjoint (k : ℤ) : Pairwise (Function.onFun Disjoint (zcell (V := V) k)) := + pairwise_disjoint_fiber (zcellIndex k) + +/-- The cubes of one level cover the space. -/ +theorem iUnion_zcell (k : ℤ) : ⋃ m, zcell (V := V) k m = Set.univ := + Set.eq_univ_of_forall fun x => Set.mem_iUnion.2 ⟨_, mem_zcell_zcellIndex k x⟩ + +/-! ### Dyadic cells of nonnegative level -/ + +/-- The index `(⌊2^j x_i⌋)_i` of the dyadic cell of level `j ∈ ℕ` containing `x`: the cube index +`Rd.zcellIndex` of level `j`. -/ +noncomputable def cellIndex (j : ℕ) (x : V) : Fin (finrank ℝ V) → ℤ := zcellIndex j x + +/-- The **dyadic cell** `P_{j,m}` of level `j ∈ ℕ` and index `m`: the dyadic cube `Q_{j,m}`. -/ +def cell (j : ℕ) (m : Fin (finrank ℝ V) → ℤ) : Set V := zcell j m + +/-- The **centre** of the dyadic cell `P_{j,m}`, with the coordinates `(m_i + 1/2) 2^(-j)`. -/ +noncomputable def cellCenter (j : ℕ) (m : Fin (finrank ℝ V) → ℤ) : V := zcellCenter j m + +/-- For natural levels the cube indices are the cell indices of `Rd.cellIndex`. -/ +theorem zcellIndex_natCast (j : ℕ) : zcellIndex (V := V) (j : ℤ) = cellIndex j := rfl + +/-- For natural levels the cubes are the cells of `Rd.cell`. -/ +theorem zcell_natCast (j : ℕ) : zcell (V := V) (j : ℤ) = cell j := rfl + +/-- For natural levels the centres are those of `Rd.cellCenter`. -/ +theorem zcellCenter_natCast (j : ℕ) (m : Fin (finrank ℝ V) → ℤ) : + zcellCenter (V := V) (j : ℤ) m = cellCenter j m := rfl + +/-- Every point lies in the cell of its index. -/ +theorem mem_cell_cellIndex (j : ℕ) (x : V) : x ∈ cell j (cellIndex j x) := rfl + +/-- The coordinates of a centre. -/ +theorem repr_cellCenter (j : ℕ) (m : Fin (finrank ℝ V) → ℤ) (i : Fin (finrank ℝ V)) : + (gridBasis V).repr (cellCenter j m) i = ((m i : ℝ) + 1 / 2) / 2 ^ j := by + rw [← zcellCenter_natCast, repr_zcellCenter, zpow_natCast] + +/-- On a cell, every coordinate differs from that of the centre by at most `2^(-j)/2`. -/ +theorem abs_repr_sub_cellCenter_le {j : ℕ} {m : Fin (finrank ℝ V) → ℤ} {x : V} + (hx : x ∈ cell j m) (i : Fin (finrank ℝ V)) : + |(gridBasis V).repr (x - cellCenter j m) i| ≤ 1 / 2 / 2 ^ j := by + rw [← zcellCenter_natCast, ← zpow_natCast] + exact abs_repr_sub_zcellCenter_le hx i + +/-- **Cells are small**: `‖x - c_{j,m}‖ ≤ n 2^(-j)` on `P_{j,m}`. -/ +theorem norm_sub_cellCenter_le {j : ℕ} {m : Fin (finrank ℝ V) → ℤ} {x : V} (hx : x ∈ cell j m) : + ‖x - cellCenter j m‖ ≤ finrank ℝ V / 2 ^ j := by + rw [← zcellCenter_natCast, ← zpow_natCast] + exact norm_sub_zcellCenter_le hx + +/-- The cell index is measurable. -/ +theorem measurable_cellIndex [MeasurableSpace V] [BorelSpace V] (j : ℕ) : + Measurable (cellIndex (V := V) j) := + measurable_zcellIndex j + +/-- Cells are measurable. -/ +theorem measurableSet_cell [MeasurableSpace V] [BorelSpace V] (j : ℕ) + (m : Fin (finrank ℝ V) → ℤ) : MeasurableSet (cell (V := V) j m) := + measurableSet_zcell j m + +/-- **Counting centres**: at most `(2ρ + 2)^n` centres of level `j` lie in the ball of radius +`ρ 2^(-j)` around `x`. -/ +theorem card_le_of_norm_cellCenter_sub_le (j : ℕ) (x : V) {ρ : ℝ} (hρ : 0 ≤ ρ) + (S : Finset (Fin (finrank ℝ V) → ℤ)) (hS : ∀ m ∈ S, ‖cellCenter j m - x‖ ≤ ρ / 2 ^ j) : + (S.card : ℝ) ≤ (2 * ρ + 2) ^ finrank ℝ V := by + set a : Fin (finrank ℝ V) → ℝ := fun i => (2 : ℝ) ^ j * (gridBasis V).repr x i + set T := Fintype.piFinset fun i => Finset.Icc ⌈a i - ρ - 1 / 2⌉ ⌊a i + ρ - 1 / 2⌋ + have hpos : (0 : ℝ) < 2 ^ j := by positivity + have hST : S ⊆ T := fun m hm => by + rw [Fintype.mem_piFinset] + intro i + have h := (abs_repr_le_norm (cellCenter j m - x) i).trans (hS m hm) + rw [map_sub, PiLp.sub_apply, repr_cellCenter] at h + have key : ((m i : ℝ) + 1 / 2) / 2 ^ j - (gridBasis V).repr x i = + ((m i : ℝ) + 1 / 2 - a i) / 2 ^ j := by + simp only [a] + field_simp + rw [key, abs_div, abs_of_pos hpos, div_le_div_iff_of_pos_right hpos, abs_le] at h + have h1 := h.1 + have h2 := h.2 + rw [Finset.mem_Icc] + exact ⟨Int.ceil_le.2 (by linarith), Int.le_floor.2 (by linarith)⟩ + calc (S.card : ℝ) ≤ T.card := by exact_mod_cast Finset.card_le_card hST + _ = ∏ i, ((Finset.Icc ⌈a i - ρ - 1 / 2⌉ ⌊a i + ρ - 1 / 2⌋).card : ℝ) := by + rw [Fintype.card_piFinset] + push_cast + rfl + _ ≤ ∏ _i : Fin (finrank ℝ V), (2 * ρ + 2) := by + refine Finset.prod_le_prod₀ (fun i _ => by positivity) fun i _ => ?_ + rw [Int.card_Icc] + have hc := Int.le_ceil (a i - ρ - 1 / 2) + have hf := Int.floor_le (a i + ρ - 1 / 2) + rcases le_or_gt 0 (⌊a i + ρ - 1 / 2⌋ + 1 - ⌈a i - ρ - 1 / 2⌉) with h | h + · have hcast : (((⌊a i + ρ - 1 / 2⌋ + 1 - ⌈a i - ρ - 1 / 2⌉).toNat : ℕ) : ℝ) = + ((⌊a i + ρ - 1 / 2⌋ + 1 - ⌈a i - ρ - 1 / 2⌉ : ℤ) : ℝ) := by + rw [← Int.cast_natCast, Int.toNat_of_nonneg h] + rw [hcast] + push_cast + linarith + · rw [Int.toNat_of_nonpos h.le] + push_cast + linarith + _ = (2 * ρ + 2) ^ finrank ℝ V := by + rw [Finset.prod_const, Finset.card_univ, Fintype.card_fin] + +/-! ### The cells partition the space -/ + +section Partition + +variable [MeasurableSpace V] [BorelSpace V] + +omit [MeasurableSpace V] [BorelSpace V] in +/-- Cells of the same level with different indices are disjoint: they are the fibres of +`Rd.cellIndex j` (Mathlib's `pairwise_disjoint_fiber`). -/ +theorem cell_disjoint (j : ℕ) : Pairwise (Function.onFun Disjoint (cell (V := V) j)) := + zcell_disjoint j + +omit [MeasurableSpace V] [BorelSpace V] in +/-- The cells of one level cover the space. -/ +theorem iUnion_cell (j : ℕ) : ⋃ m, cell (V := V) j m = Set.univ := + iUnion_zcell j + +/-- `∫ F = ∑_m ∫_{P_{j,m}} F`. -/ +theorem lintegral_eq_tsum_cell (j : ℕ) (F : V → ℝ≥0∞) : + ∫⁻ x, F x = ∑' m, ∫⁻ x in cell j m, F x := by + rw [← lintegral_iUnion (measurableSet_cell j) (cell_disjoint j), iUnion_cell, + Measure.restrict_univ] + +/-- `‖g‖_p^p = ∑_m ‖1_{P_{j,m}} g‖_p^p`. -/ +theorem eLpNorm_rpow_eq_tsum_cell {p : ℝ≥0∞} (hp0 : p ≠ 0) (hp : p ≠ ∞) {g : V → ℂ} + (hg : AEStronglyMeasurable g volume) (j : ℕ) : + eLpNorm g p volume ^ p.toReal = + ∑' m, eLpNorm ((cell j m).indicator g) p volume ^ p.toReal := by + rw [eLpNorm_rpow_eq hg hp0 hp, lintegral_eq_tsum_cell j] + congr 1 + funext m + rw [eLpNorm_indicator_eq_eLpNorm_restrict (measurableSet_cell j m).nullMeasurableSet, + eLpNorm_rpow_eq hg.restrict hp0 hp] + +omit [MeasurableSpace V] [BorelSpace V] in +/-- **Bounded overlap of the centres**: at most `⌈(2ρ + 2)^n⌉` centres of level `j` lie in a +ball of radius `ρ 2^(-j)`. -/ +theorem card_le_of_norm_sub_cellCenter_le (j : ℕ) {ρ : ℝ} (hρ : 0 ≤ ρ) (x : V) + (S : Finset (Fin (finrank ℝ V) → ℤ)) (hS : ∀ m ∈ S, ‖x - cellCenter j m‖ ≤ ρ / 2 ^ j) : + S.card ≤ ⌈(2 * ρ + 2) ^ finrank ℝ V⌉₊ := by + have h := card_le_of_norm_cellCenter_sub_le j x hρ S fun m hm => by + rw [norm_sub_rev] + exact hS m hm + exact_mod_cast h.trans (Nat.le_ceil _) + +end Partition + +/-! ### Bounded overlap -/ + +/-- If every finite set of indices with property `P` has at most `N` elements, the indices with +property `P` form a finite set with at most `N` elements. -/ +theorem exists_finset_of_card_le {ι : Type*} {P : ι → Prop} {N : ℕ} + (h : ∀ S : Finset ι, (∀ m ∈ S, P m) → S.card ≤ N) : + ∃ T : Finset ι, (∀ m, P m → m ∈ T) ∧ T.card ≤ N := by + have hfin : {m | P m}.Finite := by + by_contra hinf + obtain ⟨S, hS, hcard⟩ := Set.Infinite.exists_subset_card_eq hinf (N + 1) + have := h S fun m hm => hS hm + omega + exact ⟨hfin.toFinset, fun m hm => hfin.mem_toFinset.2 hm, + h _ fun m hm => hfin.mem_toFinset.1 hm⟩ + +/-- **Bounded overlap, pointwise**: if at most `N` of the `g m` are nonzero, then +`‖∑' m, g m‖^p ≤ N^(p-1) ∑' m, ‖g m‖^p` for `p ≥ 1`. -/ +theorem enorm_tsum_rpow_le_of_overlap {ι : Type*} (g : ι → ℂ) {N : ℕ} + (hN : ∀ S : Finset ι, (∀ m ∈ S, g m ≠ 0) → S.card ≤ N) {p : ℝ} (hp : 1 ≤ p) : + ‖∑' m, g m‖ₑ ^ p ≤ (N : ℝ≥0∞) ^ (p - 1) * ∑' m, ‖g m‖ₑ ^ p := by + obtain ⟨T, hT, hTN⟩ := exists_finset_of_card_le hN + have hzero : ∀ m ∉ T, g m = 0 := fun m hm => by_contra fun h => hm (hT m h) + rw [tsum_eq_sum hzero] + calc ‖∑ m ∈ T, g m‖ₑ ^ p ≤ (∑ m ∈ T, ‖g m‖ₑ) ^ p := + ENNReal.rpow_le_rpow (eNorm_sum_le _ _) (by linarith) + _ ≤ (T.card : ℝ≥0∞) ^ (p - 1) * ∑ m ∈ T, ‖g m‖ₑ ^ p := + ENNReal.rpow_sum_le_const_mul_sum_rpow _ _ hp + _ ≤ (N : ℝ≥0∞) ^ (p - 1) * ∑' m, ‖g m‖ₑ ^ p := + mul_le_mul' (ENNReal.rpow_le_rpow (by exact_mod_cast hTN) (by linarith)) + (sum_le_tsum _) + +/-- **Bounded overlap in `L_p`**: if at every point at most `N` of the `g m` are nonzero and +`F = ∑' m, g m` almost everywhere, then `‖F‖_p^p ≤ N^(p-1) ∑' m, ‖g m‖_p^p`. -/ +theorem eLpNorm_rpow_le_of_overlap {α : Type*} [MeasurableSpace α] {μ : Measure α} + {ι : Type*} [Countable ι] {p : ℝ≥0∞} (hp1 : 1 ≤ p) (hp : p ≠ ∞) {g : ι → α → ℂ} + (hg : ∀ m, AEStronglyMeasurable (g m) μ) {N : ℕ} + (hN : ∀ x (S : Finset ι), (∀ m ∈ S, g m x ≠ 0) → S.card ≤ N) {F : α → ℂ} + (hF : AEStronglyMeasurable F μ) (hFg : ∀ᵐ x ∂μ, F x = ∑' m, g m x) : + eLpNorm F p μ ^ p.toReal ≤ + (N : ℝ≥0∞) ^ (p.toReal - 1) * ∑' m, eLpNorm (g m) p μ ^ p.toReal := by + have hp0 : p ≠ 0 := (zero_lt_one.trans_le hp1).ne' + have hpr : 1 ≤ p.toReal := ENNReal.one_le_toReal_of_one_le hp1 hp + rw [eLpNorm_rpow_eq hF hp0 hp] + calc ∫⁻ x, ‖F x‖ₑ ^ p.toReal ∂μ + ≤ ∫⁻ x, (N : ℝ≥0∞) ^ (p.toReal - 1) * ∑' m, ‖g m x‖ₑ ^ p.toReal ∂μ := by + refine lintegral_mono_ae ?_ + filter_upwards [hFg] with x hx + rw [hx] + exact enorm_tsum_rpow_le_of_overlap (fun m => g m x) (hN x) hpr + _ = (N : ℝ≥0∞) ^ (p.toReal - 1) * ∑' m, ∫⁻ x, ‖g m x‖ₑ ^ p.toReal ∂μ := by + rw [lintegral_const_mul' _ _ (ENNReal.rpow_ne_top_of_nonneg (by linarith) + (ENNReal.natCast_ne_top N)), lintegral_tsum fun m => ((hg m).eNorm.pow_const _)] + _ = (N : ℝ≥0∞) ^ (p.toReal - 1) * ∑' m, eLpNorm (g m) p μ ^ p.toReal := by + congr 2 + funext m + rw [eLpNorm_rpow_eq (hg m) hp0 hp] + +end Rd diff --git a/LeanPool/FunctionSpaces/Analysis/Maximal/FeffermanStein.lean b/LeanPool/FunctionSpaces/Analysis/Maximal/FeffermanStein.lean new file mode 100644 index 0000000000..fcef4ce816 --- /dev/null +++ b/LeanPool/FunctionSpaces/Analysis/Maximal/FeffermanStein.lean @@ -0,0 +1,933 @@ +/- +Copyright (c) 2026 Mario Ullrich. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Mario Ullrich +-/ +module + +public import LeanPool.FunctionSpaces.Analysis.Maximal.CalderonZygmund +public import LeanPool.FunctionSpaces.Analysis.Maximal.HardyLittlewoodMaximal +public import LeanPool.FunctionSpaces.Analysis.Lp.Marcinkiewicz +public import LeanPool.FunctionSpaces.Analysis.Lp.MixedNorms + +/- +Modified for Lean Pool: module names and imports adapted. +-/ + +/-! +# The Fefferman–Stein inequality + +For `1 < p < ∞`, `1 < q ≤ ∞` and almost everywhere measurable functions `g_j : V → [0, ∞]`, +`j ∈ ℕ`, the **Fefferman–Stein inequality** +`‖ x ↦ ‖(M g_j(x))_j‖_{ℓ_q} ‖_p ≤ C ‖ x ↦ ‖(g_j(x))_j‖_{ℓ_q} ‖_p` holds with the explicit +constant `Rd.feffermanSteinConst` (`Rd.feffermanStein`). The cases: + +* `q = ∞` and `q = p` follow from the Hardy–Littlewood maximal theorem one function at a time + (`Rd.feffermanStein_top`, `Rd.feffermanStein_self`); +* `q < p` follows by duality with the weighted strong type, first for finitely many functions + (`Rd.lintegral_rpow_sum_maximal_le`) and then by monotone convergence in the number of + functions (`Rd.lintegral_lqNorm_maximal_rpow_le_of_gt`), with the norm form + `Rd.feffermanStein_of_gt`; +* `p < q` follows by interpolation between the case `q = p` and the vector-valued weak type + `(1,1)` (`Rd.volume_lqNorm_maximal_gt_le`, `Rd.lintegral_lqNorm_maximal_rpow_le_of_lt`), with + the norm form `Rd.feffermanStein_of_lt`. + +The weak type rests on the Calderón–Zygmund decomposition of `G = ‖(g_j)_j‖_{ℓ_q}`: off the +enlarged exceptional set, the maximal function of `1_Ω g` is at most `3^n` times the maximal +function of the averages of `g` over the maximal big cubes (`Rd.maximal_indicator_iUnion_le`, +`Rd.maximal_indicator_czSet_le`), and the good parts (`Rd.czGood`) keep the integral +(`Rd.lintegral_czGood`) and have `ℓ_q` norm at most `2^n t` (`Rd.ae_czGood_self_le`). +-/ + +@[expose] public section + +open MeasureTheory Module Metric Filter Set +open scoped ENNReal +open ENNReal (lqNorm) + +namespace Rd + +variable {V : Type*} [NormedAddCommGroup V] [InnerProductSpace ℝ V] [FiniteDimensional ℝ V] + [MeasurableSpace V] [BorelSpace V] + +/-! ### The maximal function off enlarged sets -/ + +/-- The integral of `g` over the part of `Q ⊆ B̄(c, ρ)` in `B(x, r)`, for `x ∉ B̄(c, 2ρ)`, is at +most `(⨍_Q g) |Q ∩ B(x, 3r)|`: either the two sets are disjoint, or `Q ⊆ B(x, 3r)`. -/ +theorem setLIntegral_inter_ball_le {Q : Set V} {c x : V} {ρ r : ℝ} (hQ : Q ⊆ closedBall c ρ) + (h0 : volume Q ≠ 0) (htop : volume Q ≠ ∞) (g : V → ℝ≥0∞) (hx : x ∉ closedBall c (2 * ρ)) : + ∫⁻ y in Q ∩ ball x r, g y ≤ (⨍⁻ z in Q, g z ∂volume) * volume (Q ∩ ball x (3 * r)) := by + rcases (Q ∩ ball x r).eq_empty_or_nonempty with he | hne + · rw [he, Measure.restrict_empty, lintegral_zero_measure] + exact zero_le + rw [Set.inter_eq_left.2 (subset_ball_three_mul_of_inter_nonempty hQ hx hne), setLAverage_eq, + ENNReal.div_mul_cancel h0 htop] + exact lintegral_mono_set Set.inter_subset_left + +/-- **The maximal function off enlarged sets**: let `Q_i ⊆ B̄(c_i, ρ_i)` be countably many +measurable sets of positive finite measure and `x` a point outside every `B̄(c_i, 2ρ_i)`. Then +`M(1_{⋃ Q_i} g)(x) ≤ 3^n M g̃(x)` for every `g : V → [0, ∞]`, where `g̃ = ∑_i (⨍_{Q_i} g) 1_{Q_i}` +replaces `g` on each `Q_i` by its mean. A ball `B(x, r)` that meets `Q_i` has radius `r > ρ_i` +and `Q_i ⊆ B(x, 3r)`, so `∫_{B(x,r)} 1_{⋃ Q_i} g ≤ ∫_{B(x,3r)} g̃`. The bound holds for arbitrary, +possibly overlapping sets `Q_i` and every `g`. -/ +theorem maximal_indicator_iUnion_le {ι : Type*} [Countable ι] (Q : ι → Set V) (c : ι → V) + (ρ : ι → ℝ) (hQ : ∀ i, Q i ⊆ closedBall (c i) (ρ i)) (hm : ∀ i, MeasurableSet (Q i)) + (h0 : ∀ i, volume (Q i) ≠ 0) (htop : ∀ i, volume (Q i) ≠ ∞) (g : V → ℝ≥0∞) {x : V} + (hx : ∀ i, x ∉ closedBall (c i) (2 * ρ i)) : + maximal ((⋃ i, Q i).indicator g) x ≤ + 3 ^ finrank ℝ V * + maximal (fun y => ∑' i, (Q i).indicator (fun _ => ⨍⁻ z in Q i, g z ∂volume) y) x := by + refine maximal_le_of_forall fun r hr => ?_ + calc ∫⁻ y in ball x r, (⋃ i, Q i).indicator g y + = ∫⁻ y in ⋃ i, Q i ∩ ball x r, g y := by + rw [setLIntegral_indicator (MeasurableSet.iUnion hm), Set.iUnion_inter] + _ ≤ ∑' i, ∫⁻ y in Q i ∩ ball x r, g y := lintegral_iUnion_le _ _ + _ ≤ ∑' i, (⨍⁻ z in Q i, g z ∂volume) * volume (Q i ∩ ball x (3 * r)) := + tsum_le_tsum fun i => + setLIntegral_inter_ball_le (hQ i) (h0 i) (htop i) g (hx i) + _ = ∫⁻ y in ball x (3 * r), ∑' i, (Q i).indicator (fun _ => ⨍⁻ z in Q i, g z ∂volume) y := by + rw [lintegral_tsum fun i => (measurable_const.indicator (hm i)).aemeasurable] + refine tsum_congr fun i => ?_ + rw [lintegral_indicator_const (hm i), Measure.restrict_apply (hm i)] + _ ≤ volume (ball (0 : V) (3 * r)) * + maximal (fun y => ∑' i, (Q i).indicator (fun _ => ⨍⁻ z in Q i, g z ∂volume) y) x := + setLIntegral_ball_le_mul_maximal (by positivity) _ x + _ = volume (ball (0 : V) r) * (3 ^ finrank ℝ V * + maximal (fun y => ∑' i, (Q i).indicator (fun _ => ⨍⁻ z in Q i, g z ∂volume) y) x) := by + rw [Measure.addHaar_ball_mul_of_pos volume (0 : V) (by norm_num : (0 : ℝ) < 3), + ENNReal.ofReal_pow (by norm_num), ENNReal.ofReal_ofNat] + ring + +/-! ### Averages over the Calderón–Zygmund cubes -/ + +variable {G : V → ℝ≥0∞} {t : ℝ≥0∞} + +/-- The **Calderón–Zygmund averages** of `h : V → [0, ∞]`: on each maximal big cube `Q` of `G` +at height `t` the mean `⨍_Q h`, and `0` outside the exceptional set `Ω`. -/ +noncomputable def czAverage (G : V → ℝ≥0∞) (t : ℝ≥0∞) (h : V → ℝ≥0∞) (y : V) : ℝ≥0∞ := + ∑' km : czMaximal G t, + (zcell km.1.1 km.1.2).indicator (fun _ => ⨍⁻ z in zcell km.1.1 km.1.2, h z ∂volume) y + +/-- The Calderón–Zygmund averages are measurable. -/ +theorem measurable_czAverage (h : V → ℝ≥0∞) : Measurable (czAverage G t h) := + Measurable.tsum fun _ => measurable_const.indicator (measurableSet_zcell _ _) + +/-- On a maximal big cube `Q`, the Calderón–Zygmund average of `h` is `⨍_Q h`, since the maximal +big cubes are disjoint. -/ +theorem czAverage_eq_of_mem {k : ℤ} {m : Fin (finrank ℝ V) → ℤ} (hkm : (k, m) ∈ czMaximal G t) + (h : V → ℝ≥0∞) {x : V} (hx : x ∈ zcell k m) : + czAverage G t h x = ⨍⁻ z in zcell k m, h z ∂volume := by + rw [czAverage, tsum_eq_single ⟨(k, m), hkm⟩ fun km hne => ?_] + · exact Set.indicator_of_mem hx _ + refine Set.indicator_of_notMem (fun hx' => hne ?_) _ + exact subsingleton_czMaximal_mem_zcell (G := G) (t := t) x hx' (show x ∈ zcell k m from hx) + +/-- Outside the exceptional set `Ω` the Calderón–Zygmund averages vanish. -/ +theorem czAverage_eq_zero_of_notMem (h : V → ℝ≥0∞) {x : V} (hx : x ∉ czSet G t) : + czAverage G t h x = 0 := + tsum_eq_zero_iff.2 fun km => + Set.indicator_of_notMem (fun hx' => hx (zcell_subset_czSet km.2 hx')) _ + +/-- The sum over the maximal big cubes of the integrals of `h : V → [0, ∞]` over the cubes is +the integral of `h` over the exceptional set `Ω`, since the cubes are disjoint. -/ +theorem tsum_setLIntegral_czMaximal (h : V → ℝ≥0∞) : + ∑' km : czMaximal G t, ∫⁻ z in zcell km.1.1 km.1.2, h z = ∫⁻ z in czSet G t, h z := by + rw [czSet, lintegral_biUnion czMaximal_countable (fun _ _ => measurableSet_zcell _ _) + czMaximal_pairwiseDisjoint] + +/-- **Summing bounds over the maximal big cubes**: if numbers `a_Q ∈ [0, ∞]` indexed by the +maximal big cubes `Q` of `G` at height `t` satisfy `a_Q ≤ c ∫_Q H` for a function +`H : V → [0, ∞]`, then `∑_Q a_Q ≤ c ∫ H`, since the cubes are disjoint +(`Rd.tsum_setLIntegral_czMaximal`). -/ +theorem tsum_le_mul_lintegral_of_le_setLIntegral {a : czMaximal G t → ℝ≥0∞} {H : V → ℝ≥0∞} + (c : ℝ≥0∞) (h : ∀ km, a km ≤ c * ∫⁻ z in zcell km.1.1 km.1.2, H z) : + ∑' km, a km ≤ c * ∫⁻ z, H z := + calc ∑' km, a km ≤ ∑' km : czMaximal G t, c * ∫⁻ z in zcell km.1.1 km.1.2, H z := + tsum_le_tsum h + _ = c * ∫⁻ z in czSet G t, H z := by rw [ENNReal.tsum_mul_left, tsum_setLIntegral_czMaximal] + _ ≤ c * ∫⁻ z, H z := mul_le_mul_right (setLIntegral_le_lintegral _ _) _ + +/-- **The averages keep the integral**: `∫ czAverage h = ∫_Ω h` for every `h : V → [0, ∞]`, since +`|Q| ⨍_Q h = ∫_Q h` on each of the disjoint maximal big cubes `Q`. -/ +theorem lintegral_czAverage (h : V → ℝ≥0∞) : + ∫⁻ x, czAverage G t h x = ∫⁻ x in czSet G t, h x := by + simp only [czAverage] + rw [lintegral_tsum fun _ => + (measurable_const.indicator (measurableSet_zcell _ _)).aemeasurable, + ← tsum_setLIntegral_czMaximal] + refine tsum_congr fun km => ?_ + rw [lintegral_indicator_const (measurableSet_zcell _ _), setLAverage_eq, + ENNReal.div_mul_cancel (volume_zcell_pos _ _).ne' (volume_zcell_lt_top _ _).ne] + +/-- The Calderón–Zygmund averages of `G` itself are at most `2^n t` +(`Rd.cz_avg_le`). -/ +theorem czAverage_self_le (x : V) : czAverage G t G x ≤ 2 ^ finrank ℝ V * t := by + by_cases hx : x ∈ czSet G t + · obtain ⟨km, hkm, hxkm⟩ := Set.mem_iUnion₂.1 hx + rw [czAverage_eq_of_mem hkm G hxkm] + exact cz_avg_le hkm + · rw [czAverage_eq_zero_of_notMem G hx] + exact zero_le + +/-- **Positivity of the maximal function off `Ω*`**: for `x` outside the enlarged exceptional +set, `M(1_Ω h)(x) ≤ 3^n M(czAverage h)(x)` for every `h : V → [0, ∞]`, since every maximal big +cube `Q_{k,m}` lies in `B̄(c_{k,m}, n 2^(-k))` and `Ω*` contains the balls of twice this +radius. -/ +theorem maximal_indicator_czSet_le (h : V → ℝ≥0∞) {x : V} (hx : x ∉ czEnlarged G t) : + maximal ((czSet G t).indicator h) x ≤ 3 ^ finrank ℝ V * maximal (czAverage G t h) x := by + have := (czMaximal_countable (V := V) (G := G) (t := t)).to_subtype + have hU : czSet G t = ⋃ km : czMaximal G t, zcell (V := V) km.1.1 km.1.2 := + Set.biUnion_eq_iUnion _ _ + rw [hU] + exact maximal_indicator_iUnion_le (fun km : czMaximal G t => zcell km.1.1 km.1.2) + (fun km => zcellCenter km.1.1 km.1.2) (fun km => finrank ℝ V / 2 ^ km.1.1) + (fun _ => zcell_subset_closedBall _ _) (fun _ => measurableSet_zcell _ _) + (fun _ => (volume_zcell_pos _ _).ne') (fun _ => (volume_zcell_lt_top _ _).ne) h + fun km hxkm => hx (mem_biUnion km.2 hxkm) + +/-- The closed ball of radius `2n 2^(-k)` around the centre of a cube `Q_{k,m}` has volume +`(2n)^n |B(0,1)| |Q_{k,m}|`. -/ +theorem volume_closedBall_zcellCenter (k : ℤ) (m : Fin (finrank ℝ V) → ℤ) : + volume (closedBall (zcellCenter k m) (2 * (finrank ℝ V / 2 ^ k))) = + (2 * finrank ℝ V) ^ finrank ℝ V * volume (ball (0 : V) 1) * volume (zcell (V := V) k m) := by + have hpow : (2 * ((finrank ℝ V : ℝ) / 2 ^ k)) ^ finrank ℝ V = + (2 * (finrank ℝ V : ℝ)) ^ finrank ℝ V * (((2 : ℝ) ^ k)⁻¹) ^ finrank ℝ V := by + rw [div_eq_mul_inv, ← mul_assoc, mul_pow] + rw [Measure.addHaar_closedBall _ _ (by positivity), volume_zcell, hpow, + ENNReal.ofReal_mul (by positivity), ENNReal.ofReal_pow (by positivity), + ENNReal.ofReal_pow (by positivity), ENNReal.ofReal_mul zero_le_two, ENNReal.ofReal_ofNat, + ENNReal.ofReal_natCast] + ring + +/-- **The measure of the enlarged exceptional set**: `|Ω*| ≤ (2n)^n |B(0,1)| t⁻¹ ∫ G` for every +height `t`, by `Rd.cz_volume_le`. -/ +theorem volume_czEnlarged_le : + volume (czEnlarged G t) ≤ + (2 * finrank ℝ V) ^ finrank ℝ V * volume (ball (0 : V) 1) * (t⁻¹ * ∫⁻ x, G x) := by + calc volume (czEnlarged G t) + ≤ ∑' km : czMaximal G t, + volume (closedBall (zcellCenter (V := V) km.1.1 km.1.2) + (2 * (finrank ℝ V / 2 ^ km.1.1))) := + measure_biUnion_le volume czMaximal_countable _ + _ = ∑' km : czMaximal G t, (2 * finrank ℝ V) ^ finrank ℝ V * volume (ball (0 : V) 1) * + volume (zcell (V := V) km.1.1 km.1.2) := + tsum_congr fun km => volume_closedBall_zcellCenter _ _ + _ = (2 * finrank ℝ V) ^ finrank ℝ V * volume (ball (0 : V) 1) * volume (czSet G t) := by + rw [ENNReal.tsum_mul_left, czSet, measure_biUnion czMaximal_countable + czMaximal_pairwiseDisjoint fun _ _ => measurableSet_zcell _ _] + _ ≤ _ := mul_le_mul_right cz_volume_le _ + +/-! ### The good part of the Calderón–Zygmund decomposition -/ + +/-- The **good part** of `h : V → [0, ∞]` in the Calderón–Zygmund decomposition of `G` at height +`t`: `h` outside the exceptional set `Ω`, and its mean `⨍_Q h` on each maximal big cube `Q`. -/ +noncomputable def czGood (G : V → ℝ≥0∞) (t : ℝ≥0∞) (h : V → ℝ≥0∞) (x : V) : ℝ≥0∞ := + (czSet G t)ᶜ.indicator h x + czAverage G t h x + +/-- The good part of an almost everywhere measurable function is almost everywhere measurable. -/ +theorem aemeasurable_czGood {h : V → ℝ≥0∞} (hh : AEMeasurable h volume) : + AEMeasurable (czGood G t h) volume := + (hh.indicator measurableSet_czSet.compl).add (measurable_czAverage h).aemeasurable + +/-- **The good part keeps the integral**: `∫ czGood h = ∫ h` for every `h : V → [0, ∞]`, since +`h` is kept outside `Ω` and the averages keep the integral over `Ω` (`Rd.lintegral_czAverage`). +-/ +theorem lintegral_czGood (h : V → ℝ≥0∞) : ∫⁻ x, czGood G t h x = ∫⁻ x, h x := by + simp only [czGood] + rw [lintegral_add_right' _ (measurable_czAverage h).aemeasurable, + lintegral_indicator measurableSet_czSet.compl, lintegral_czAverage, add_comm, + lintegral_add_compl _ measurableSet_czSet] + +/-- **The good part of `G` itself is bounded**: in dimension `n ≥ 1`, for an almost everywhere +measurable `G` with finite integral and `0 < t`, the good part of `G` in its own decomposition +at height `t` is at most `2^n t` almost everywhere: off `Ω` it is `G ≤ t` +(`Rd.cz_ae_le_of_notMem`), on a maximal big cube it is the mean `G_Q ≤ 2^n t`. -/ +theorem ae_czGood_self_le [Nontrivial V] (hG : AEMeasurable G volume) (hGi : ∫⁻ x, G x ≠ ∞) + (ht0 : 0 < t) : ∀ᵐ x, czGood G t G x ≤ 2 ^ finrank ℝ V * t := by + filter_upwards [cz_ae_le_of_notMem hG hGi ht0] with x hx + by_cases hxΩ : x ∈ czSet G t + · rw [czGood, Set.indicator_of_notMem (Set.notMem_compl_iff.2 hxΩ), zero_add] + exact czAverage_self_le x + · rw [czGood, Set.indicator_of_mem (show x ∈ (czSet G t)ᶜ from hxΩ), + czAverage_eq_zero_of_notMem _ hxΩ, add_zero] + exact (hx hxΩ).trans (le_mul_of_one_le_left zero_le (one_le_pow₀ one_le_two)) + +/-- **The pointwise `ℓ_q` norm of the good parts**: for a family `g_j` of almost everywhere +measurable functions and `1 ≤ q ≤ ∞`, `‖(czGood g_j (x))_j‖_{ℓ_q} ≤ 1_{Ωᶜ} F(x) + czAverage F (x)` +with `F(x) = ‖(g_j(x))_j‖_{ℓ_q}`: off `Ω` both sides are `F(x)`, and on a maximal big cube `Q` the +left side is `‖(⨍_Q g_j)_j‖_{ℓ_q} ≤ ⨍_Q F` (`MeasureTheory.lqNorm_laverage_le`). -/ +theorem lqNorm_czGood_le {q : ℝ≥0∞} (hq : 1 ≤ q) {g : ℕ → V → ℝ≥0∞} + (hg : ∀ j, AEMeasurable (g j) volume) (x : V) : + lqNorm q (fun j => czGood G t (g j) x) ≤ + (czSet G t)ᶜ.indicator (fun y => lqNorm q (fun j => g j y)) x + + czAverage G t (fun y => lqNorm q (fun j => g j y)) x := by + by_cases hx : x ∈ czSet G t + · obtain ⟨km, hkm, hxkm⟩ := Set.mem_iUnion₂.1 hx + have hxc : x ∉ (czSet G t)ᶜ := fun h => h hx + simp only [czGood, Set.indicator_of_notMem hxc, zero_add, czAverage_eq_of_mem hkm _ hxkm] + exact lqNorm_laverage_le hq fun j => (hg j).restrict + · have hxc : x ∈ (czSet G t)ᶜ := hx + simp only [czGood, Set.indicator_of_mem hxc, czAverage_eq_zero_of_notMem _ hx, add_zero] + exact le_rfl + +/-- **The good parts are bounded**: in dimension `n ≥ 1`, for `1 ≤ q ≤ ∞`, almost everywhere +measurable `g_j` with `F = ‖(g_j)_j‖_{ℓ_q}` integrable, and `0 < t`, the decomposition of `F` at +height `t` has `‖(czGood g_j (x))_j‖_{ℓ_q} ≤ 2^n t` for almost every `x`. -/ +theorem ae_lqNorm_czGood_le [Nontrivial V] {q : ℝ≥0∞} (hq : 1 ≤ q) {g : ℕ → V → ℝ≥0∞} + (hg : ∀ j, AEMeasurable (g j) volume) (hGi : ∫⁻ x, lqNorm q (fun j => g j x) ≠ ∞) + (ht0 : 0 < t) : + ∀ᵐ x, lqNorm q (fun j => czGood (fun y => lqNorm q (fun j => g j y)) t (g j) x) ≤ + 2 ^ finrank ℝ V * t := by + filter_upwards [ae_czGood_self_le (aemeasurable_lqNorm_comp hg q) hGi ht0] with x hx + exact (lqNorm_czGood_le hq hg x).trans hx + +/-- **The integral of the `ℓ_q` norm of the good parts is at most that of the family**: +`∫ ‖(czGood g_j)_j‖_{ℓ_q} ≤ ∫ ‖(g_j)_j‖_{ℓ_q}` for +`1 ≤ q ≤ ∞` and almost everywhere measurable `g_j`, for the decomposition of any `G` at any +height. -/ +theorem lintegral_lqNorm_czGood_le {q : ℝ≥0∞} (hq : 1 ≤ q) {g : ℕ → V → ℝ≥0∞} + (hg : ∀ j, AEMeasurable (g j) volume) : + ∫⁻ x, lqNorm q (fun j => czGood G t (g j) x) ≤ ∫⁻ x, lqNorm q (fun j => g j x) := + (lintegral_mono fun x => lqNorm_czGood_le hq hg x).trans_eq (lintegral_czGood _) + +/-- **The maximal function off `Ω*` is controlled by the good part**: for `x ∉ Ω*` and almost +everywhere measurable `g`, `M g(x) ≤ (1 + 3^n) M(czGood g)(x)`. Split `g = 1_{Ωᶜ} g + 1_Ω g`; +the first part is at most the good part, and `M(1_Ω g)(x) ≤ 3^n M(czAverage g)(x)` by +`Rd.maximal_indicator_czSet_le`. -/ +theorem maximal_le_maximal_czGood {g : V → ℝ≥0∞} (hg : AEMeasurable g volume) {x : V} + (hx : x ∉ czEnlarged G t) : + maximal g x ≤ (1 + 3 ^ finrank ℝ V) * maximal (czGood G t g) x := by + have h1 : maximal ((czSet G t)ᶜ.indicator g) x ≤ maximal (czGood G t g) x := + maximal_mono (fun y => le_self_add) x + have h2 : maximal (czAverage G t g) x ≤ maximal (czGood G t g) x := + maximal_mono (fun y => le_add_self) x + calc maximal g x + = maximal ((czSet G t)ᶜ.indicator g + (czSet G t).indicator g) x := by + rw [Set.indicator_compl_add_self] + _ ≤ maximal ((czSet G t)ᶜ.indicator g) x + maximal ((czSet G t).indicator g) x := + maximal_add_le (hg.indicator measurableSet_czSet.compl) _ x + _ ≤ maximal (czGood G t g) x + 3 ^ finrank ℝ V * maximal (czGood G t g) x := + add_le_add h1 ((maximal_indicator_czSet_le g hx).trans (mul_le_mul_right h2 _)) + _ = (1 + 3 ^ finrank ℝ V) * maximal (czGood G t g) x := by ring + +/-! ### The case `q = p` and the vector-valued weak type -/ + +/-- **The strong type in integral form**: `∫ (M g)^p ≤ C_{n,p} ∫ g^p` for `p > 1` and almost +everywhere measurable `g : V → [0, ∞]` (`Rd.lintegral_maximal_rpow_mul_le` with `w = 1`). -/ +theorem lintegral_maximal_rpow_le {g : V → ℝ≥0∞} (hg : AEMeasurable g volume) {p : ℝ} + (hp : 1 < p) : ∫⁻ x, maximal g x ^ p ≤ maximalConst (finrank ℝ V) p * ∫⁻ x, g x ^ p := by + have h := lintegral_maximal_rpow_mul_le (w := fun _ => (1 : ℝ≥0∞)) hg aemeasurable_const hp + simpa only [maximal_const, mul_one] using h + +/-- **The Fefferman–Stein inequality for `q = p` in integral form**: for `1 < q < ∞` and almost +everywhere measurable `g_j : V → [0, ∞]`, +`∫ ‖(M g_j(x))_j‖_{ℓ_q}^q dx ≤ C_{n,q} ∫ ‖(g_j(x))_j‖_{ℓ_q}^q dx`. Both sides are `∑_j ∫ (·)^q`, and +the maximal theorem applies to each `j`. -/ +theorem lintegral_lqNorm_maximal_rpow_le {q : ℝ≥0∞} (hq1 : 1 < q) (hq : q ≠ ∞) + {g : ℕ → V → ℝ≥0∞} (hg : ∀ j, AEMeasurable (g j) volume) : + ∫⁻ x, lqNorm q (fun j => maximal (g j) x) ^ q.toReal ≤ + maximalConst (finrank ℝ V) q.toReal * ∫⁻ x, lqNorm q (fun j => g j x) ^ q.toReal := by + have hq0 : q ≠ 0 := (zero_lt_one.trans hq1).ne' + simp_rw [ENNReal.lqNorm_rpow hq0 hq] + rw [lintegral_tsum fun j => (measurable_maximal _).aemeasurable.pow_const _, + lintegral_tsum fun j => (hg j).pow_const _, ← ENNReal.tsum_mul_left] + exact tsum_le_tsum fun j => + lintegral_maximal_rpow_le (hg j) (ENNReal.one_lt_toReal hq1 hq) + +variable (V) in +/-- The constant of the vector-valued weak type `(1,1)`: +`(2n)^n |B(0,1)| + (1 + 3^n)^q 2^(n(q-1)) C_{n,q}`. -/ +noncomputable def weakTypeConst (q : ℝ) : ℝ≥0∞ := + (2 * finrank ℝ V) ^ finrank ℝ V * volume (ball (0 : V) 1) + + (1 + 3 ^ finrank ℝ V) ^ q * 2 ^ ((finrank ℝ V : ℝ) * (q - 1)) * + maximalConst (finrank ℝ V) q + +/-- `weakTypeConst V q` is finite for `q > 1`. -/ +theorem weakTypeConst_ne_top {q : ℝ} (hq : 1 < q) : weakTypeConst V q ≠ ∞ := by + refine ENNReal.add_ne_top.2 ⟨ENNReal.mul_ne_top (ENNReal.pow_ne_top + (ENNReal.mul_ne_top ENNReal.ofNat_ne_top (ENNReal.natCast_ne_top _))) + (volume_ball_ne_top 1), ENNReal.mul_ne_top (ENNReal.mul_ne_top ?_ ?_) + (maximalConst_ne_top hq)⟩ + · exact ENNReal.rpow_ne_top_of_nonneg (by linarith) + (ENNReal.add_ne_top.2 ⟨ENNReal.one_ne_top, ENNReal.pow_ne_top ENNReal.ofNat_ne_top⟩) + · exact ENNReal.two_rpow_ne_top _ + +/-- **The `q`-th power of the good parts**: in dimension `n ≥ 1`, for `1 < q < ∞`, almost +everywhere measurable `g_j` with `G = ‖(g_j)_j‖_{ℓ_q}` integrable, and `0 < t`, the good parts +of the decomposition of `G` at height `t` satisfy +`∫ ‖(czGood g_j (x))_j‖_{ℓ_q}^q dx ≤ 2^(n(q-1)) t^(q-1) ∫ G`: their `ℓ_q` norm is bounded by +`2^n t` almost everywhere and has integral at most `∫ G` +(`MeasureTheory.lintegral_rpow_le_mul_lintegral_of_ae_le`). -/ +theorem lintegral_lqNorm_czGood_rpow_le [Nontrivial V] {q : ℝ≥0∞} (hq1 : 1 < q) (hq : q ≠ ∞) + {g : ℕ → V → ℝ≥0∞} (hg : ∀ j, AEMeasurable (g j) volume) + (hGi : ∫⁻ x, lqNorm q (fun j => g j x) ≠ ∞) (ht0 : 0 < t) : + ∫⁻ x, lqNorm q (fun j => czGood (fun y => lqNorm q (fun j => g j y)) t (g j) x) ^ q.toReal ≤ + 2 ^ ((finrank ℝ V : ℝ) * (q.toReal - 1)) * t ^ (q.toReal - 1) * + ∫⁻ x, lqNorm q (fun j => g j x) := by + have hr : 1 ≤ q.toReal := (ENNReal.one_lt_toReal hq1 hq).le + have hpow : ((2 : ℝ≥0∞) ^ finrank ℝ V * t) ^ (q.toReal - 1) = + 2 ^ ((finrank ℝ V : ℝ) * (q.toReal - 1)) * t ^ (q.toReal - 1) := by + rw [ENNReal.mul_rpow_of_nonneg _ _ (by linarith), ENNReal.rpow_mul, ENNReal.rpow_natCast] + have hL : AEMeasurable (fun x => + lqNorm q (fun j => czGood (fun y => lqNorm q (fun j => g j y)) t (g j) x)) volume := + aemeasurable_lqNorm_comp (fun j => aemeasurable_czGood (hg j)) q + rw [← hpow] + exact (lintegral_rpow_le_mul_lintegral_of_ae_le hr hL + (ae_lqNorm_czGood_le hq1.le hg hGi ht0)).trans + (mul_le_mul_right (lintegral_lqNorm_czGood_le hq1.le hg) _) + +/-- **Chebyshev's inequality for the good parts**: in dimension `n ≥ 1`, for `1 < q < ∞`, almost +everywhere measurable `g_j` with `G = ‖(g_j)_j‖_{ℓ_q}` integrable, and `0 < t < ∞`, let `czGood` +be the good part of the decomposition of `G` at height `t` and `c = 1 + 3^n`. The set where +`c ‖(M(czGood g_j)(x))_j‖_{ℓ_q}` exceeds `t` has measure at most `c^q 2^(n(q-1)) C_{n,q} t⁻¹ ∫ G`, +by the case `q = p` and the bound of the good parts. -/ +theorem volume_lt_mul_lqNorm_maximal_czGood_le [Nontrivial V] {q : ℝ≥0∞} (hq1 : 1 < q) + (hq : q ≠ ∞) {g : ℕ → V → ℝ≥0∞} (hg : ∀ j, AEMeasurable (g j) volume) + (hGi : ∫⁻ x, lqNorm q (fun j => g j x) ≠ ∞) (ht0 : 0 < t) (ht : t ≠ ∞) : + volume {x | t < (1 + 3 ^ finrank ℝ V) * lqNorm q (fun j => + maximal (czGood (fun y => lqNorm q (fun j => g j y)) t (g j)) x)} ≤ + (1 + 3 ^ finrank ℝ V) ^ q.toReal * 2 ^ ((finrank ℝ V : ℝ) * (q.toReal - 1)) * + maximalConst (finrank ℝ V) q.toReal * t⁻¹ * ∫⁻ x, lqNorm q (fun j => g j x) := by + have hr : 1 < q.toReal := ENNReal.one_lt_toReal hq1 hq + have hc : (1 + 3 ^ finrank ℝ V : ℝ≥0∞) ^ q.toReal ≠ ∞ := + ENNReal.rpow_ne_top_of_nonneg (by linarith) + (ENNReal.add_ne_top.2 ⟨ENNReal.one_ne_top, ENNReal.pow_ne_top ENNReal.ofNat_ne_top⟩) + have hL : Measurable fun x => lqNorm q (fun j => + maximal (czGood (fun y => lqNorm q (fun j => g j y)) t (g j)) x) := + measurable_lqNorm_comp (fun _ => measurable_maximal _) q + have hint := (lintegral_lqNorm_maximal_rpow_le hq1 hq + (fun j => aemeasurable_czGood (G := fun y => lqNorm q (fun j => g j y)) (t := t) (hg j))).trans + (mul_le_mul_right (lintegral_lqNorm_czGood_rpow_le hq1 hq hg hGi ht0) _) + have htt : (t ^ q.toReal)⁻¹ * t ^ (q.toReal - 1) = t⁻¹ := by + rw [ENNReal.rpow_sub _ _ ht0.ne' ht, ENNReal.rpow_one, div_eq_mul_inv, ← mul_assoc, + ENNReal.inv_mul_cancel (ENNReal.rpow_pos ht0 ht).ne' + (ENNReal.rpow_ne_top_of_nonneg (by linarith) ht), one_mul] + calc volume {x | t < (1 + 3 ^ finrank ℝ V) * lqNorm q (fun j => + maximal (czGood (fun y => lqNorm q (fun j => g j y)) t (g j)) x)} + ≤ (t ^ q.toReal)⁻¹ * ∫⁻ x, ((1 + 3 ^ finrank ℝ V) * lqNorm q (fun j => + maximal (czGood (fun y => lqNorm q (fun j => g j y)) t (g j)) x)) ^ q.toReal := + measure_lt_le_inv_rpow_mul_lintegral (hL.const_mul _).aemeasurable (by linarith) + ht0.ne' ht + _ ≤ (t ^ q.toReal)⁻¹ * ((1 + 3 ^ finrank ℝ V) ^ q.toReal * (maximalConst (finrank ℝ V) + q.toReal * (2 ^ ((finrank ℝ V : ℝ) * (q.toReal - 1)) * t ^ (q.toReal - 1) * + ∫⁻ x, lqNorm q (fun j => g j x)))) := by + simp_rw [ENNReal.mul_rpow_of_nonneg _ _ (zero_le_one.trans hr.le)] + rw [lintegral_const_mul' _ _ hc] + gcongr + _ = _ := by rw [← htt]; ring + +/-- **The vector-valued weak type `(1,1)`** of the maximal function (Fefferman–Stein): in +dimension `n ≥ 1`, for `1 < q < ∞`, almost everywhere measurable `g_j : V → [0, ∞]` with +`G = ‖(g_j)_j‖_{ℓ_q}` integrable, and `0 < t < ∞`, +`|{x : ‖(M g_j(x))_j‖_{ℓ_q} > t}| ≤ C t⁻¹ ∫ G` with `C = weakTypeConst V q`. The +Calderón–Zygmund decomposition of `G` at height `t` splits the level set into the enlarged +exceptional set `Ω*`, of measure at most `(2n)^n |B(0,1)| t⁻¹ ∫ G`, and the set where +`(1 + 3^n) ‖(M(czGood g_j))_j‖_{ℓ_q} > t`, which Chebyshev's inequality bounds. -/ +theorem volume_lqNorm_maximal_gt_le [Nontrivial V] {q : ℝ≥0∞} (hq1 : 1 < q) (hq : q ≠ ∞) + (g : ℕ → V → ℝ≥0∞) (hg : ∀ j, AEMeasurable (g j) volume) + (hGi : ∫⁻ x, lqNorm q (fun j => g j x) ≠ ∞) (ht0 : 0 < t) (ht : t ≠ ∞) : + volume {x | t < lqNorm q (fun j => maximal (g j) x)} ≤ + weakTypeConst V q.toReal * t⁻¹ * ∫⁻ x, lqNorm q (fun j => g j x) := by + have hsub : {x | t < lqNorm q (fun j => maximal (g j) x)} ⊆ + czEnlarged (fun y => lqNorm q (fun j => g j y)) t ∪ + {x | t < (1 + 3 ^ finrank ℝ V) * lqNorm q (fun j => + maximal (czGood (fun y => lqNorm q (fun j => g j y)) t (g j)) x)} := fun x hx => by + by_cases hxE : x ∈ czEnlarged (fun y => lqNorm q (fun j => g j y)) t + · exact Or.inl hxE + have h : lqNorm q (fun j => maximal (g j) x) ≤ (1 + 3 ^ finrank ℝ V) * lqNorm q (fun j => + maximal (czGood (fun y => lqNorm q (fun j => g j y)) t (g j)) x) := by + rw [← ENNReal.lqNorm_const_mul] + exact ENNReal.lqNorm_mono fun j => maximal_le_maximal_czGood (hg j) hxE + exact Or.inr (show t < _ from lt_of_lt_of_le hx h) + calc volume {x | t < lqNorm q (fun j => maximal (g j) x)} + ≤ volume (czEnlarged (fun y => lqNorm q (fun j => g j y)) t) + + volume {x | t < (1 + 3 ^ finrank ℝ V) * lqNorm q (fun j => + maximal (czGood (fun y => lqNorm q (fun j => g j y)) t (g j)) x)} := + (measure_mono hsub).trans (measure_union_le _ _) + _ ≤ (2 * finrank ℝ V) ^ finrank ℝ V * volume (ball (0 : V) 1) * + (t⁻¹ * ∫⁻ x, lqNorm q (fun j => g j x)) + + (1 + 3 ^ finrank ℝ V) ^ q.toReal * 2 ^ ((finrank ℝ V : ℝ) * (q.toReal - 1)) * + maximalConst (finrank ℝ V) q.toReal * t⁻¹ * ∫⁻ x, lqNorm q (fun j => g j x) := + add_le_add volume_czEnlarged_le + (volume_lt_mul_lqNorm_maximal_czGood_le hq1 hq hg hGi ht0 ht) + _ = _ := by rw [weakTypeConst]; ring + +/-! ### Interpolation for `p < q` -/ + +/-- **Splitting a family along a set**: for almost everywhere measurable `g_j`, measurable `S` and +`1 ≤ q ≤ ∞`, `‖(M g_j(x))_j‖_{ℓ_q} ≤ ‖(M(1_S g_j)(x))_j‖_{ℓ_q} + ‖(M(1_{Sᶜ} g_j)(x))_j‖_{ℓ_q}`, by +the subadditivity of `M` and Minkowski's inequality in `ℓ_q`. -/ +theorem lqNorm_maximal_le_indicator_add {q : ℝ≥0∞} (hq : 1 ≤ q) {g : ℕ → V → ℝ≥0∞} + (hg : ∀ j, AEMeasurable (g j) volume) {S : Set V} (hS : MeasurableSet S) (x : V) : + lqNorm q (fun j => maximal (g j) x) ≤ + lqNorm q (fun j => maximal (S.indicator (g j)) x) + + lqNorm q (fun j => maximal (Sᶜ.indicator (g j)) x) := by + refine (ENNReal.lqNorm_mono fun j => ?_).trans (ENNReal.lqNorm_add_le hq _ _) + calc maximal (g j) x = maximal (S.indicator (g j) + Sᶜ.indicator (g j)) x := by + rw [Set.indicator_self_add_compl] + _ ≤ _ := maximal_add_le ((hg j).indicator hS) _ x + +/-- **The two pieces at a level**: in dimension `n ≥ 1`, for `1 < q < ∞`, almost everywhere +measurable `g_j`, a measurable set `S` on which `G = ‖(g_j)_j‖_{ℓ_q}` is integrable, and +`0 < s < ∞`, +`|{‖(M g_j)_j‖_{ℓ_q} > s}| ≤ C (s/2)⁻¹ ∫ 1_S G + ((s/2)^q)⁻¹ C_{n,q} ∫ (1_{Sᶜ} G)^q` with +`C = weakTypeConst V q`: the vector-valued weak type for `1_S g_j` and Chebyshev's inequality +with the case `q = p` for `1_{Sᶜ} g_j`. -/ +theorem volume_lqNorm_maximal_gt_le_split [Nontrivial V] {q : ℝ≥0∞} (hq1 : 1 < q) (hq : q ≠ ∞) + {g : ℕ → V → ℝ≥0∞} (hg : ∀ j, AEMeasurable (g j) volume) {S : Set V} + (hS : MeasurableSet S) (hSi : ∫⁻ x, S.indicator (fun y => lqNorm q (fun j => g j y)) x ≠ ∞) + {s : ℝ≥0∞} (hs0 : 0 < s) (hs : s ≠ ∞) : + volume {x | s < lqNorm q (fun j => maximal (g j) x)} ≤ + weakTypeConst V q.toReal * (s / 2)⁻¹ * + (∫⁻ x, S.indicator (fun y => lqNorm q (fun j => g j y)) x) + + ((s / 2) ^ q.toReal)⁻¹ * (maximalConst (finrank ℝ V) q.toReal * + ∫⁻ x, Sᶜ.indicator (fun y => lqNorm q (fun j => g j y)) x ^ q.toReal) := by + have hs2 : 0 < s / 2 := ENNReal.half_pos hs0.ne' + have hs2t : s / 2 ≠ ∞ := ENNReal.div_ne_top hs two_ne_zero + have hr : 1 < q.toReal := ENNReal.one_lt_toReal hq1 hq + have hsub : {x | s < lqNorm q (fun j => maximal (g j) x)} ⊆ + {x | s / 2 < lqNorm q (fun j => maximal (S.indicator (g j)) x)} ∪ + {x | s / 2 < lqNorm q (fun j => maximal (Sᶜ.indicator (g j)) x)} := fun x hx => by + by_contra hnot + simp only [Set.mem_union, Set.mem_ofPred_eq, not_or, not_lt] at hnot + have h := (lqNorm_maximal_le_indicator_add hq1.le hg hS x).trans (add_le_add hnot.1 hnot.2) + rw [ENNReal.add_halves] at h + exact absurd hx (not_lt.2 h) + have h1 := volume_lqNorm_maximal_gt_le hq1 hq (fun j => S.indicator (g j)) + (fun j => (hg j).indicator hS) (by simpa only [ENNReal.lqNorm_indicator] using hSi) hs2 hs2t + simp only [ENNReal.lqNorm_indicator] at h1 + have hL : Measurable fun x => lqNorm q (fun j => maximal (Sᶜ.indicator (g j)) x) := + measurable_lqNorm_comp (fun _ => measurable_maximal _) q + have h2 : volume {x | s / 2 < lqNorm q (fun j => maximal (Sᶜ.indicator (g j)) x)} ≤ + ((s / 2) ^ q.toReal)⁻¹ * (maximalConst (finrank ℝ V) q.toReal * + ∫⁻ x, Sᶜ.indicator (fun y => lqNorm q (fun j => g j y)) x ^ q.toReal) := by + refine (measure_lt_le_inv_rpow_mul_lintegral hL.aemeasurable (by linarith) hs2.ne' + hs2t).trans ?_ + gcongr + have := lintegral_lqNorm_maximal_rpow_le hq1 hq fun j => (hg j).indicator hS.compl + simpa only [ENNReal.lqNorm_indicator] using this + calc volume {x | s < lqNorm q (fun j => maximal (g j) x)} + ≤ volume {x | s / 2 < lqNorm q (fun j => maximal (S.indicator (g j)) x)} + + volume {x | s / 2 < lqNorm q (fun j => maximal (Sᶜ.indicator (g j)) x)} := + (measure_mono hsub).trans (measure_union_le _ _) + _ ≤ _ := add_le_add h1 h2 + +/-- **The level sets of the vector-valued maximal function, weighted**: in dimension `n ≥ 1`, +for `p > 1`, `1 < q < ∞`, measurable `g_j` with `∫ G^p < ∞` for `G = ‖(g_j)_j‖_{ℓ_q}`, and +`τ > 0`, `|{‖(M g_j)_j‖_{ℓ_q} > τ}| τ^(p-1)` is at most +`2 C (∫_{G > τ} G) τ^(p-2) + 2^q C_{n,q} (∫_{G ≤ τ} G^q) τ^(p-1-q)` with +`C = weakTypeConst V q`: `Rd.volume_lqNorm_maximal_gt_le_split` for the set `{G > τ}`, on which +`G` is integrable since `∫_{G > τ} G ≤ τ^(1-p) ∫ G^p`. -/ +theorem volume_lqNorm_maximal_gt_mul_rpow_le [Nontrivial V] {p : ℝ} (hp1 : 1 < p) {q : ℝ≥0∞} + (hq1 : 1 < q) (hq : q ≠ ∞) {g : ℕ → V → ℝ≥0∞} (hg : ∀ j, Measurable (g j)) + (hA : ∫⁻ x, lqNorm q (fun j => g j x) ^ p ≠ ∞) {τ : ℝ} (hτ : 0 < τ) : + volume {x | ENNReal.ofReal τ < lqNorm q (fun j => maximal (g j) x)} * + ENNReal.ofReal (τ ^ (p - 1)) ≤ + 2 * weakTypeConst V q.toReal * + ((∫⁻ x, {y | ENNReal.ofReal τ < lqNorm q (fun j => g j y)}.indicator + (fun y => lqNorm q (fun j => g j y)) x) * ENNReal.ofReal (τ ^ (p - 2))) + + 2 ^ q.toReal * maximalConst (finrank ℝ V) q.toReal * + ((∫⁻ x, {y | ENNReal.ofReal τ < lqNorm q (fun j => g j y)}ᶜ.indicator + (fun y => lqNorm q (fun j => g j y)) x ^ q.toReal) * + ENNReal.ofReal (τ ^ (p - 1 - q.toReal))) := by + have hGm := measurable_lqNorm_comp hg q + have hS : MeasurableSet {y | ENNReal.ofReal τ < lqNorm q (fun j => g j y)} := + measurableSet_lt measurable_const hGm + have hc0 : ENNReal.ofReal τ ^ (p - 1) ≠ 0 := (ENNReal.rpow_pos (ENNReal.ofReal_pos.2 hτ) + ENNReal.ofReal_ne_top).ne' + have hSi := ne_top_of_le_ne_top (ENNReal.mul_ne_top (ENNReal.inv_ne_top.2 hc0) hA) + (lintegral_indicator_lt_le hp1.le (ENNReal.ofReal_pos.2 hτ).ne' ENNReal.ofReal_ne_top + (fun y => lqNorm q (fun j => g j y))) + have h := volume_lqNorm_maximal_gt_le_split hq1 hq (fun j => (hg j).aemeasurable) hS hSi + (ENNReal.ofReal_pos.2 hτ) ENNReal.ofReal_ne_top + refine (mul_le_mul_left h _).trans_eq ?_ + calc _ = weakTypeConst V q.toReal * + ((ENNReal.ofReal τ / 2)⁻¹ * ENNReal.ofReal (τ ^ (p - 1))) * + (∫⁻ x, {y | ENNReal.ofReal τ < lqNorm q (fun j => g j y)}.indicator + (fun y => lqNorm q (fun j => g j y)) x) + + ((ENNReal.ofReal τ / 2) ^ q.toReal)⁻¹ * ENNReal.ofReal (τ ^ (p - 1)) * + (maximalConst (finrank ℝ V) q.toReal * + ∫⁻ x, {y | ENNReal.ofReal τ < lqNorm q (fun j => g j y)}ᶜ.indicator + (fun y => lqNorm q (fun j => g j y)) x ^ q.toReal) := by ring + _ = _ := by + rw [ENNReal.inv_half_mul_ofReal_rpow hτ p, + ENNReal.inv_half_rpow_mul_ofReal_rpow hτ p q.toReal] + ring + +variable (V) in +/-- The constant of the interpolation for `p < q`: +`p (2 C^w_{n,q} / (p - 1) + 2^q C_{n,q} / (q - p))` with `C^w_{n,q} = weakTypeConst V q` and +`C_{n,q} = maximalConst n q`. -/ +noncomputable def interpolationConst (p q : ℝ) : ℝ≥0∞ := + ENNReal.ofReal p * (2 * weakTypeConst V q * (ENNReal.ofReal (p - 1))⁻¹ + + 2 ^ q * maximalConst (finrank ℝ V) q * (ENNReal.ofReal (q - p))⁻¹) + +/-- `interpolationConst V p q` is finite for `1 < p < q`. -/ +theorem interpolationConst_ne_top {p q : ℝ} (hp : 1 < p) (hpq : p < q) : + interpolationConst V p q ≠ ∞ := by + have hq : 1 < q := hp.trans hpq + refine ENNReal.mul_ne_top ENNReal.ofReal_ne_top (ENNReal.add_ne_top.2 ⟨?_, ?_⟩) + · exact ENNReal.mul_ne_top (ENNReal.mul_ne_top ENNReal.ofNat_ne_top (weakTypeConst_ne_top hq)) + (ENNReal.inv_ne_top.2 (ENNReal.ofReal_pos.2 (by linarith)).ne') + · exact ENNReal.mul_ne_top (ENNReal.mul_ne_top + (ENNReal.two_rpow_ne_top _) (maximalConst_ne_top hq)) + (ENNReal.inv_ne_top.2 (ENNReal.ofReal_pos.2 (by linarith)).ne') + +/-- `interpolationConst V p q` is positive for `0 < p` and `0 < q`. -/ +theorem interpolationConst_ne_zero {p q : ℝ} (hp : 0 < p) (hq : 0 < q) : + interpolationConst V p q ≠ 0 := by + refine mul_ne_zero (ENNReal.ofReal_pos.2 hp).ne' (ne_of_gt ?_) + refine lt_of_lt_of_le ?_ le_add_self + refine ENNReal.mul_pos (ENNReal.mul_pos + (ENNReal.rpow_pos (by norm_num : (0 : ℝ≥0∞) < 2) ENNReal.ofNat_ne_top).ne' + (maximalConst_ne_zero hq)).ne' (ENNReal.inv_ne_zero.2 ENNReal.ofReal_ne_top) + +/-- **The Fefferman–Stein inequality for `p < q` in integral form, measurable case**: in +dimension `n ≥ 1`, for `1 < p < q < ∞` and measurable `g_j : V → [0, ∞]`, +`∫ ‖(M g_j(x))_j‖_{ℓ_q}^p dx ≤ C ∫ G^p` with `G = ‖(g_j)_j‖_{ℓ_q}` and +`C = interpolationConst V p q`. The layer cake formula, the level estimate +`Rd.volume_lqNorm_maximal_gt_mul_rpow_le` and the two Tonelli steps give it. The bound +`1 < p < q.toReal` forces `q < ∞`. -/ +theorem lintegral_lqNorm_maximal_rpow_le_of_lt_of_measurable [Nontrivial V] {p : ℝ} + {q : ℝ≥0∞} (hp1 : 1 < p) (hpq : p < q.toReal) {g : ℕ → V → ℝ≥0∞} + (hg : ∀ j, Measurable (g j)) : + ∫⁻ x, lqNorm q (fun j => maximal (g j) x) ^ p ≤ + interpolationConst V p q.toReal * ∫⁻ x, lqNorm q (fun j => g j x) ^ p := by + have hq : q ≠ ∞ := (ENNReal.toReal_pos_iff.1 ((zero_lt_one.trans hp1).trans hpq)).2.ne + have hq1 : 1 < q := + (ENNReal.toReal_lt_toReal ENNReal.one_ne_top hq).1 (by simpa using hp1.trans hpq) + have hr : 1 < q.toReal := hp1.trans hpq + have hGm := measurable_lqNorm_comp hg q + rcases eq_or_ne (∫⁻ x, lqNorm q (fun j => g j x) ^ p) ∞ with hA | hA + · rw [hA, ENNReal.mul_top (interpolationConst_ne_zero (by linarith) (by linarith))] + exact le_top + have hc1 : 2 * weakTypeConst V q.toReal ≠ ∞ := + ENNReal.mul_ne_top ENNReal.ofNat_ne_top (weakTypeConst_ne_top hr) + have hc2 : (2 : ℝ≥0∞) ^ q.toReal * maximalConst (finrank ℝ V) q.toReal ≠ ∞ := + ENNReal.mul_ne_top (ENNReal.two_rpow_ne_top _) + (maximalConst_ne_top hr) + have hm1 : Measurable fun τ : ℝ => + (∫⁻ x, {y | ENNReal.ofReal τ < lqNorm q (fun j => g j y)}.indicator + (fun y => lqNorm q (fun j => g j y)) x) * ENNReal.ofReal (τ ^ (p - 2)) := + (Measurable.lintegral_prod_right' + (measurable_indicator_section (measurableSet_ofReal_lt hGm) hGm)).mul + (ENNReal.measurable_ofReal.comp (measurable_id.pow_const _)) + rw [lintegral_rpow_eq_lintegral_meas_lt_mul_ennreal volume + (measurable_lqNorm_comp (fun _ => measurable_maximal _) q).aemeasurable (by linarith)] + refine (mul_le_mul_right (setLIntegral_mono' measurableSet_Ioi fun τ hτ => + volume_lqNorm_maximal_gt_mul_rpow_le hp1 hq1 hq hg hA hτ) _).trans ?_ + rw [lintegral_add_left' (hm1.const_mul _).aemeasurable, lintegral_const_mul' _ _ hc1, + lintegral_const_mul' _ _ hc2, lintegral_Ioi_lintegral_indicator_lt_mul_rpow hGm hp1] + calc ENNReal.ofReal p * (2 * weakTypeConst V q.toReal * + ((ENNReal.ofReal (p - 1))⁻¹ * ∫⁻ x, lqNorm q (fun j => g j x) ^ p) + + 2 ^ q.toReal * maximalConst (finrank ℝ V) q.toReal * ∫⁻ τ in Ioi (0 : ℝ), + (∫⁻ x, {y | ENNReal.ofReal τ < lqNorm q (fun j => g j y)}ᶜ.indicator + (fun y => lqNorm q (fun j => g j y)) x ^ q.toReal) * + ENNReal.ofReal (τ ^ (p - 1 - q.toReal))) + ≤ ENNReal.ofReal p * (2 * weakTypeConst V q.toReal * + ((ENNReal.ofReal (p - 1))⁻¹ * ∫⁻ x, lqNorm q (fun j => g j x) ^ p) + + 2 ^ q.toReal * maximalConst (finrank ℝ V) q.toReal * + ((ENNReal.ofReal (q.toReal - p))⁻¹ * ∫⁻ x, lqNorm q (fun j => g j x) ^ p)) := by + gcongr + exact lintegral_Ioi_lintegral_indicator_compl_mul_rpow_le hGm (by linarith) hpq + _ = _ := by rw [interpolationConst]; ring + +/-- **The Fefferman–Stein inequality for `p < q` in integral form** (interpolation): in dimension +`n ≥ 1`, for `1 < p < q < ∞` and almost everywhere measurable `g_j : V → [0, ∞]`, +`∫ ‖(M g_j(x))_j‖_{ℓ_q}^p dx ≤ C ∫ ‖(g_j(x))_j‖_{ℓ_q}^p dx` with +`C = interpolationConst V p q`. At each level `τ` the family is split at `{G > τ}`; the +vector-valued weak type `(1,1)` controls the large part and the case `q = p` the small part, as +in Marcinkiewicz's interpolation theorem. -/ +theorem lintegral_lqNorm_maximal_rpow_le_of_lt [Nontrivial V] {p q : ℝ≥0∞} (hp1 : 1 < p) + (hpq : p < q) (hq : q ≠ ∞) (g : ℕ → V → ℝ≥0∞) (hg : ∀ j, AEMeasurable (g j) volume) : + ∫⁻ x, lqNorm q (fun j => maximal (g j) x) ^ p.toReal ≤ + interpolationConst V p.toReal q.toReal * ∫⁻ x, lqNorm q (fun j => g j x) ^ p.toReal := by + have hp : p ≠ ∞ := ne_top_of_lt hpq + have hmax : ∀ j, maximal (g j) = maximal ((hg j).mk (g j)) := fun j => + maximal_congr_ae (hg j).ae_eq_mk + have hae : ∀ᵐ x ∂volume, ∀ j, g j x = (hg j).mk (g j) x := + ae_all_iff.2 fun j => (hg j).ae_eq_mk + have hint : ∫⁻ x, lqNorm q (fun j => g j x) ^ p.toReal = + ∫⁻ x, lqNorm q (fun j => (hg j).mk (g j) x) ^ p.toReal := + lintegral_congr_ae (hae.mono fun x hx => by simp only [hx]) + simp_rw [hmax] + rw [hint] + exact lintegral_lqNorm_maximal_rpow_le_of_lt_of_measurable (ENNReal.one_lt_toReal hp1 hp) + ((ENNReal.toReal_lt_toReal hp hq).2 hpq) fun j => (hg j).measurable_mk + +/-! ### Duality for `q < p` -/ + +/-- The constant of the duality argument for `q < p`: +`(C_{n,q} C_{n,u'}^{1/u'})^(p/q)` with the exponent `u' = p/(p - q)` conjugate to `u = p/q`. -/ +noncomputable def dualityConst (n : ℕ) (p q : ℝ) : ℝ≥0∞ := + (maximalConst n q * maximalConst n (p / (p - q)) ^ ((p - q) / p)) ^ (p / q) + +/-- `dualityConst n p q` is finite for `1 < q < p`. -/ +theorem dualityConst_ne_top {n : ℕ} {p q : ℝ} (hq : 1 < q) (hqp : q < p) : + dualityConst n p q ≠ ∞ := by + have hu' : 1 < p / (p - q) := (one_lt_div (by linarith)).2 (by linarith) + refine ENNReal.rpow_ne_top_of_nonneg (div_nonneg (by linarith) (by linarith)) + (ENNReal.mul_ne_top (maximalConst_ne_top hq) ?_) + exact ENNReal.rpow_ne_top_of_nonneg (div_nonneg (by linarith) (by linarith)) + (maximalConst_ne_top hu') + +/-- `dualityConst n p q` is positive for `0 < q < p`. -/ +theorem dualityConst_ne_zero {n : ℕ} {p q : ℝ} (hq : 0 < q) (hqp : q < p) : + dualityConst n p q ≠ 0 := by + have hu' : 0 < p / (p - q) := div_pos (by linarith) (by linarith) + refine (ENNReal.rpow_pos_of_nonneg (pos_iff_ne_zero.2 (mul_ne_zero (maximalConst_ne_zero hq) + (ENNReal.rpow_pos_of_nonneg (pos_iff_ne_zero.2 (maximalConst_ne_zero hu')) + (div_nonneg (by linarith) (by linarith))).ne')) (div_nonneg (by linarith) hq.le)).ne' + +/-- **Finiteness for finitely many functions**: for `1 < q < p`, finitely many almost everywhere +measurable `g_j` and `∫ (∑_j g_j^q)^(p/q) < ∞`, also `∫ (∑_j (M g_j)^q)^(p/q) < ∞`: each `g_j^p` +is at most `(∑_j g_j^q)^(p/q)`, the maximal theorem bounds `∫ (M g_j)^p`, and +`(∑_{j ∈ S} a_j)^u ≤ |S|^(u-1) ∑_{j ∈ S} a_j^u`. -/ +theorem lintegral_rpow_sum_maximal_ne_top {p q : ℝ} (hq1 : 1 < q) (hqp : q < p) (S : Finset ℕ) + {g : ℕ → V → ℝ≥0∞} (hg : ∀ j, AEMeasurable (g j) volume) + (hA : ∫⁻ x, (∑ j ∈ S, g j x ^ q) ^ (p / q) ≠ ∞) : + ∫⁻ x, (∑ j ∈ S, maximal (g j) x ^ q) ^ (p / q) ≠ ∞ := by + have hq0 : 0 < q := zero_lt_one.trans hq1 + have hu : 1 ≤ p / q := (one_le_div hq0).2 hqp.le + have hpow : ∀ a : ℝ≥0∞, (a ^ q) ^ (p / q) = a ^ p := fun a => by + rw [← ENNReal.rpow_mul, mul_div_cancel₀ _ hq0.ne'] + have hgj : ∀ j ∈ S, ∫⁻ x, g j x ^ p ≠ ∞ := fun j hj => + ne_top_of_le_ne_top hA (lintegral_mono fun x => by + rw [← hpow] + exact ENNReal.rpow_le_rpow (Finset.single_le_sum (f := fun i => g i x ^ q) + (fun _ _ => zero_le) hj) (by linarith)) + have hMj : ∀ j ∈ S, ∫⁻ x, maximal (g j) x ^ p ≠ ∞ := fun j hj => + ne_top_of_le_ne_top (ENNReal.mul_ne_top (maximalConst_ne_top (hq1.trans hqp)) (hgj j hj)) + (lintegral_maximal_rpow_le (hg j) (hq1.trans hqp)) + have hc : (S.card : ℝ≥0∞) ^ (p / q - 1) ≠ ∞ := + ENNReal.rpow_ne_top_of_nonneg (by linarith) (ENNReal.natCast_ne_top _) + refine ne_top_of_le_ne_top ?_ (lintegral_mono fun x => + ENNReal.rpow_sum_le_const_mul_sum_rpow (s := S) (f := fun j => maximal (g j) x ^ q) hu) + rw [lintegral_const_mul' _ _ hc, lintegral_finsetSum' S fun j _ => + (((measurable_maximal _).pow_const _).pow_const _).aemeasurable] + simp_rw [hpow] + exact ENNReal.mul_ne_top hc (ENNReal.sum_ne_top.2 hMj) + +/-- **The duality step** for finitely many functions: for `q > 1`, conjugate exponents `u, u'` +and almost everywhere measurable `g_j`, with `H = ∑_{j ∈ S} (M g_j)^q`, +`∫ H^u ≤ C_{n,q} C_{n,u'}^{1/u'} (∫ (∑_{j ∈ S} g_j^q)^u)^{1/u} (∫ H^u)^{1/u'}`. With +`w = H^(u-1)`, `∫ H^u = ∑_j ∫ (M g_j)^q w ≤ C_{n,q} ∫ (∑_j g_j^q) M w` by the weighted strong type, +then Hölder's inequality and the maximal theorem for `w` in `L_{u'}`, where +`∫ w^{u'} = ∫ H^u`. -/ +theorem lintegral_rpow_sum_maximal_le_mul {q u u' : ℝ} (hq1 : 1 < q) + (hu : u.HolderConjugate u') (S : Finset ℕ) {g : ℕ → V → ℝ≥0∞} + (hg : ∀ j, AEMeasurable (g j) volume) : + ∫⁻ x, (∑ j ∈ S, maximal (g j) x ^ q) ^ u ≤ + maximalConst (finrank ℝ V) q * maximalConst (finrank ℝ V) u' ^ (1 / u') * + (∫⁻ x, (∑ j ∈ S, g j x ^ q) ^ u) ^ (1 / u) * + (∫⁻ x, (∑ j ∈ S, maximal (g j) x ^ q) ^ u) ^ (1 / u') := by + have hH : Measurable fun x => ∑ j ∈ S, maximal (g j) x ^ q := + Finset.measurable_fun_sum S fun j _ => (measurable_maximal _).pow_const _ + have hw : Measurable fun x => (∑ j ∈ S, maximal (g j) x ^ q) ^ (u - 1) := hH.pow_const _ + have hGq : AEMeasurable (fun x => ∑ j ∈ S, g j x ^ q) volume := + Finset.aemeasurable_fun_sum S fun j _ => (hg j).pow_const _ + have hu'0 : (0 : ℝ) ≤ 1 / u' := one_div_nonneg.2 hu.symm.pos.le + have hM : ∫⁻ x, maximal (fun y => (∑ j ∈ S, maximal (g j) y ^ q) ^ (u - 1)) x ^ u' ≤ + maximalConst (finrank ℝ V) u' * ∫⁻ x, (∑ j ∈ S, maximal (g j) x ^ q) ^ u := by + have hww : ∫⁻ x, (∑ j ∈ S, maximal (g j) x ^ q) ^ u = + ∫⁻ x, ((∑ j ∈ S, maximal (g j) x ^ q) ^ (u - 1)) ^ u' := by + congr 1 + funext x + rw [← ENNReal.rpow_mul, hu.sub_one_mul_conj] + rw [hww] + exact lintegral_maximal_rpow_le hw.aemeasurable hu.symm.lt + calc ∫⁻ x, (∑ j ∈ S, maximal (g j) x ^ q) ^ u + = ∑ j ∈ S, ∫⁻ x, maximal (g j) x ^ q * (∑ i ∈ S, maximal (g i) x ^ q) ^ (u - 1) := by + rw [← lintegral_finsetSum' S (f := fun j x => + maximal (g j) x ^ q * (∑ i ∈ S, maximal (g i) x ^ q) ^ (u - 1)) fun j _ => + (((measurable_maximal _).pow_const _).mul hw).aemeasurable] + congr 1 + funext x + rw [← Finset.sum_mul, ← ENNReal.rpow_eq_mul_rpow_sub_one _ hu.lt.le] + _ ≤ ∑ j ∈ S, maximalConst (finrank ℝ V) q * ∫⁻ x, g j x ^ q * + maximal (fun y => (∑ i ∈ S, maximal (g i) y ^ q) ^ (u - 1)) x := + Finset.sum_le_sum fun j _ => lintegral_maximal_rpow_mul_le (hg j) hw.aemeasurable hq1 + _ = maximalConst (finrank ℝ V) q * ∫⁻ x, (∑ j ∈ S, g j x ^ q) * + maximal (fun y => (∑ i ∈ S, maximal (g i) y ^ q) ^ (u - 1)) x := by + rw [← Finset.mul_sum, ← lintegral_finsetSum' S (f := fun j x => + g j x ^ q * maximal (fun y => (∑ i ∈ S, maximal (g i) y ^ q) ^ (u - 1)) x) fun j _ => + ((hg j).pow_const _).mul (measurable_maximal _).aemeasurable] + congr 2 + funext x + rw [Finset.sum_mul] + _ ≤ maximalConst (finrank ℝ V) q * ((∫⁻ x, (∑ j ∈ S, g j x ^ q) ^ u) ^ (1 / u) * + (∫⁻ x, maximal (fun y => (∑ i ∈ S, maximal (g i) y ^ q) ^ (u - 1)) x ^ u') ^ + (1 / u')) := + mul_le_mul_right (ENNReal.lintegral_mul_le_Lp_mul_Lq volume hu hGq + (measurable_maximal _).aemeasurable) _ + _ ≤ maximalConst (finrank ℝ V) q * ((∫⁻ x, (∑ j ∈ S, g j x ^ q) ^ u) ^ (1 / u) * + (maximalConst (finrank ℝ V) u' * + ∫⁻ x, (∑ j ∈ S, maximal (g j) x ^ q) ^ u) ^ (1 / u')) := + mul_le_mul_right (mul_le_mul_right (ENNReal.rpow_le_rpow hM hu'0) _) _ + _ = _ := by rw [ENNReal.mul_rpow_of_nonneg _ _ hu'0]; ring + +/-- **The Fefferman–Stein inequality for `q < p` and finitely many functions**: for `1 < q < p` and +almost everywhere measurable `g_j`, `∫ (∑_{j ∈ S} (M g_j)^q)^(p/q) ≤ C ∫ (∑_{j ∈ S} g_j^q)^(p/q)` +with `C = dualityConst n p q`. The duality step `Rd.lintegral_rpow_sum_maximal_le_mul` with +`u = p/q` and `u' = p/(p - q)` gives `X ≤ K A^{1/u} X^{1/u'}`, and since `X < ∞` the factor +`X^{1/u'}` cancels (`ENNReal.le_rpow_mul_of_le_mul_rpow`). -/ +theorem lintegral_rpow_sum_maximal_le {p q : ℝ} (hq1 : 1 < q) (hqp : q < p) (S : Finset ℕ) + {g : ℕ → V → ℝ≥0∞} (hg : ∀ j, AEMeasurable (g j) volume) : + ∫⁻ x, (∑ j ∈ S, maximal (g j) x ^ q) ^ (p / q) ≤ + dualityConst (finrank ℝ V) p q * ∫⁻ x, (∑ j ∈ S, g j x ^ q) ^ (p / q) := by + have hq0 : 0 < q := zero_lt_one.trans hq1 + have hpq0 : p - q ≠ 0 := (sub_pos.2 hqp).ne' + have hconj : (p / q).HolderConjugate (p / (p - q)) := by + rw [Real.holderConjugate_iff_eq_conjExponent ((one_lt_div hq0).2 hqp)] + field_simp + rcases eq_or_ne (∫⁻ x, (∑ j ∈ S, g j x ^ q) ^ (p / q)) ∞ with hA | hA + · rw [hA, ENNReal.mul_top (dualityConst_ne_zero hq0 hqp)] + exact le_top + have h := ENNReal.le_rpow_mul_of_le_mul_rpow hconj + (lintegral_rpow_sum_maximal_ne_top hq1 hqp S hg hA) + (lintegral_rpow_sum_maximal_le_mul hq1 hconj S hg) + rw [one_div_div] at h + exact h + +/-- **The Fefferman–Stein inequality for `q < p` in integral form** (duality): for +`1 < q < p < ∞` and almost everywhere measurable `g_j : V → [0, ∞]`, in every dimension, +`∫ ‖(M g_j(x))_j‖_{ℓ_q}^p dx ≤ C ∫ ‖(g_j(x))_j‖_{ℓ_q}^p dx` with `C = dualityConst n p q`. The +finite partial sums satisfy `Rd.lintegral_rpow_sum_maximal_le`, and monotone convergence passes +to the series. -/ +theorem lintegral_lqNorm_maximal_rpow_le_of_gt {p q : ℝ≥0∞} (hq1 : 1 < q) (hqp : q < p) + (hp : p ≠ ∞) (g : ℕ → V → ℝ≥0∞) (hg : ∀ j, AEMeasurable (g j) volume) : + ∫⁻ x, lqNorm q (fun j => maximal (g j) x) ^ p.toReal ≤ + dualityConst (finrank ℝ V) p.toReal q.toReal * + ∫⁻ x, lqNorm q (fun j => g j x) ^ p.toReal := by + have hq : q ≠ ∞ := ne_top_of_lt hqp + have hq0 : q ≠ 0 := (zero_lt_one.trans hq1).ne' + have hR : 1 < q.toReal := ENNReal.one_lt_toReal hq1 hq + have hRP : q.toReal < p.toReal := (ENNReal.toReal_lt_toReal hq hp).2 hqp + have hu : 0 < p.toReal / q.toReal := div_pos (by linarith) (by linarith) + have hpow : ∀ a : ℕ → ℝ≥0∞, lqNorm q a ^ p.toReal = + ⨆ J : ℕ, (∑ j ∈ Finset.range J, a j ^ q.toReal) ^ (p.toReal / q.toReal) := fun a => by + rw [ENNReal.lqNorm_eq_tsum hq0 hq, ← ENNReal.rpow_mul, one_div_mul_eq_div, + ENNReal.tsum_eq_iSup_nat] + have h := (ENNReal.orderIsoRpow _ hu).map_iSup fun J : ℕ => + ∑ j ∈ Finset.range J, a j ^ q.toReal + simpa only [ENNReal.orderIsoRpow_apply] using h + simp_rw [hpow] + rw [lintegral_iSup (f := fun J x => + (∑ j ∈ Finset.range J, maximal (g j) x ^ q.toReal) ^ (p.toReal / q.toReal)) + (fun J => (Finset.measurable_fun_sum _ fun j _ => + (measurable_maximal (g j)).pow_const _).pow_const _) + fun J J' hJ x => ENNReal.rpow_le_rpow (Finset.sum_le_sum_of_subset (Finset.range_mono hJ)) + hu.le] + refine iSup_le fun J => (lintegral_rpow_sum_maximal_le hR hRP _ hg).trans + (mul_le_mul_right (lintegral_mono fun x => ?_) _) + exact le_iSup (fun J : ℕ => (∑ j ∈ Finset.range J, g j x ^ q.toReal) ^ + (p.toReal / q.toReal)) J + +/-! ### The Fefferman–Stein inequality -/ + +/-- **The Fefferman–Stein inequality for `q = ∞`**: for `1 < p < ∞` and every family +`g_j : V → [0, ∞]`, `‖sup_j M g_j‖_p ≤ C_{n,p}^{1/p} ‖sup_j g_j‖_p`, since +`M g_j ≤ M(sup_k g_k)` for every `j`. -/ +theorem feffermanStein_top {p : ℝ≥0∞} (hp1 : 1 < p) (hp : p ≠ ∞) (g : ℕ → V → ℝ≥0∞) : + eLpNorm (fun x => lqNorm ∞ (fun j => maximal (g j) x)) p volume ≤ + maximalConst (finrank ℝ V) p.toReal ^ (1 / p.toReal) * + eLpNorm (fun x => lqNorm ∞ (fun j => g j x)) p volume := by + simp only [ENNReal.lqNorm_top] + refine (eLpNorm_mono_eNorm + (Measurable.iSup fun j => measurable_maximal (g j)).aestronglyMeasurable fun x => ?_).trans + (eLpNorm_maximal_le (fun y => ⨆ j, g j y) hp1 hp) + simp only [eNorm_eq_self] + exact iSup_le fun j => maximal_mono (fun y => le_iSup (fun k => g k y) j) x + +/-- **The Fefferman–Stein inequality for `q = p`**: for `1 < p < ∞` and almost everywhere +measurable `g_j : V → [0, ∞]`, `‖(M g_j)_j‖_{L_p(ℓ_p)} ≤ C_{n,p}^{1/p} ‖(g_j)_j‖_{L_p(ℓ_p)}`. -/ +theorem feffermanStein_self {p : ℝ≥0∞} (hp1 : 1 < p) (hp : p ≠ ∞) (g : ℕ → V → ℝ≥0∞) + (hg : ∀ j, AEMeasurable (g j) volume) : + eLpNorm (fun x => lqNorm p (fun j => maximal (g j) x)) p volume ≤ + maximalConst (finrank ℝ V) p.toReal ^ (1 / p.toReal) * + eLpNorm (fun x => lqNorm p (fun j => g j x)) p volume := + eLpNorm_le_rpow_mul_of_lintegral_le (zero_lt_one.trans hp1).ne' hp + (measurable_lqNorm_comp (fun _ => measurable_maximal _) p).aemeasurable + (aemeasurable_lqNorm_comp hg p) (lintegral_lqNorm_maximal_rpow_le hp1 hp hg) + +/-- **The Fefferman–Stein inequality for `q < p`**: for `1 < q < p < ∞` and almost everywhere +measurable `g_j : V → [0, ∞]`, +`‖(M g_j)_j‖_{L_p(ℓ_q)} ≤ (dualityConst n p q)^{1/p} ‖(g_j)_j‖_{L_p(ℓ_q)}`. -/ +theorem feffermanStein_of_gt {p q : ℝ≥0∞} (hp1 : 1 < p) (hp : p ≠ ∞) (hq1 : 1 < q) + (hqp : q < p) (g : ℕ → V → ℝ≥0∞) (hg : ∀ j, AEMeasurable (g j) volume) : + eLpNorm (fun x => lqNorm q (fun j => maximal (g j) x)) p volume ≤ + dualityConst (finrank ℝ V) p.toReal q.toReal ^ (1 / p.toReal) * + eLpNorm (fun x => lqNorm q (fun j => g j x)) p volume := + eLpNorm_le_rpow_mul_of_lintegral_le (zero_lt_one.trans hp1).ne' hp + (measurable_lqNorm_comp (fun _ => measurable_maximal _) q).aemeasurable + (aemeasurable_lqNorm_comp hg q) (lintegral_lqNorm_maximal_rpow_le_of_gt hq1 hqp hp g hg) + +/-- **The Fefferman–Stein inequality for `p < q`**: in dimension `n ≥ 1`, for `1 < p < q < ∞` and +almost everywhere measurable `g_j : V → [0, ∞]`, +`‖(M g_j)_j‖_{L_p(ℓ_q)} ≤ (interpolationConst V p q)^{1/p} ‖(g_j)_j‖_{L_p(ℓ_q)}`. -/ +theorem feffermanStein_of_lt [Nontrivial V] {p q : ℝ≥0∞} (hp1 : 1 < p) (hp : p ≠ ∞) + (hpq : p < q) (hq : q ≠ ∞) (g : ℕ → V → ℝ≥0∞) (hg : ∀ j, AEMeasurable (g j) volume) : + eLpNorm (fun x => lqNorm q (fun j => maximal (g j) x)) p volume ≤ + interpolationConst V p.toReal q.toReal ^ (1 / p.toReal) * + eLpNorm (fun x => lqNorm q (fun j => g j x)) p volume := + eLpNorm_le_rpow_mul_of_lintegral_le (zero_lt_one.trans hp1).ne' hp + (measurable_lqNorm_comp (fun _ => measurable_maximal _) q).aemeasurable + (aemeasurable_lqNorm_comp hg q) (lintegral_lqNorm_maximal_rpow_le_of_lt hp1 hpq hq g hg) + +variable (V) in +/-- The constant of the **Fefferman–Stein inequality**: `1` in dimension `0`, otherwise +`C_{n,p}^{1/p}` for `q = ∞` or `q = p`, `(dualityConst n p q)^{1/p}` for `q < p` and +`(interpolationConst V p q)^{1/p}` for `p < q`. -/ +noncomputable def feffermanSteinConst (p q : ℝ≥0∞) : ℝ≥0∞ := + if finrank ℝ V = 0 then 1 + else if q = ∞ ∨ q = p then maximalConst (finrank ℝ V) p.toReal ^ (1 / p.toReal) + else if q < p then dualityConst (finrank ℝ V) p.toReal q.toReal ^ (1 / p.toReal) + else interpolationConst V p.toReal q.toReal ^ (1 / p.toReal) + +/-- `feffermanSteinConst V p q` is finite for `1 < p < ∞` and `1 < q ≤ ∞`. -/ +theorem feffermanSteinConst_ne_top {p q : ℝ≥0∞} (hp1 : 1 < p) (hp : p ≠ ∞) (hq1 : 1 < q) : + feffermanSteinConst V p q ≠ ∞ := by + have hP : 1 < p.toReal := ENNReal.one_lt_toReal hp1 hp + have hnn : (0 : ℝ) ≤ 1 / p.toReal := by positivity + unfold feffermanSteinConst + split_ifs with h0 h1 h2 + · exact ENNReal.one_ne_top + · exact ENNReal.rpow_ne_top_of_nonneg hnn (maximalConst_ne_top hP) + · have hq : q ≠ ∞ := ne_top_of_lt h2 + exact ENNReal.rpow_ne_top_of_nonneg hnn (dualityConst_ne_top + (ENNReal.one_lt_toReal hq1 hq) ((ENNReal.toReal_lt_toReal hq hp).2 h2)) + · obtain ⟨hq, hqp⟩ := not_or.1 h1 + have hpq : p < q := lt_of_le_of_ne (not_lt.1 h2) (Ne.symm hqp) + exact ENNReal.rpow_ne_top_of_nonneg hnn + (interpolationConst_ne_top hP ((ENNReal.toReal_lt_toReal hp hq).2 hpq)) + +/-- **The Fefferman–Stein inequality**: for `1 < p < ∞`, `1 < q ≤ ∞` and almost everywhere +measurable `g_j : V → [0, ∞]`, `j ∈ ℕ`, +`‖ x ↦ ‖(M g_j(x))_j‖_{ℓ_q} ‖_p ≤ C ‖ x ↦ ‖(g_j(x))_j‖_{ℓ_q} ‖_p` with the explicit constant +`C = feffermanSteinConst V p q`. In dimension `0` the maximal function is the identity; otherwise +the cases `q = ∞`, `q = p`, `q < p` (duality) and `p < q` (interpolation) are +`Rd.feffermanStein_top`, `Rd.feffermanStein_self`, `Rd.feffermanStein_of_gt` and +`Rd.feffermanStein_of_lt`. The case `q = 2` is the one behind the Littlewood–Paley description +of the spaces `H^s_p = F^s_{p,2}`. -/ +theorem feffermanStein {p q : ℝ≥0∞} (hp1 : 1 < p) (hp : p ≠ ∞) (hq1 : 1 < q) + (g : ℕ → V → ℝ≥0∞) (hg : ∀ j, AEMeasurable (g j) volume) : + eLpNorm (fun x => lqNorm q (fun j => maximal (g j) x)) p volume ≤ + feffermanSteinConst V p q * eLpNorm (fun x => lqNorm q (fun j => g j x)) p volume := by + rcases subsingleton_or_nontrivial V with hV | hV + · have h0 : finrank ℝ V = 0 := Module.finrank_zero_iff.2 hV + simp only [feffermanSteinConst, h0, ↓reduceIte, one_mul, maximal_eq_self_of_subsingleton] + exact le_rfl + have h0 : finrank ℝ V ≠ 0 := Module.finrank_pos.ne' + rcases eq_or_ne q ∞ with rfl | hq + · simpa only [feffermanSteinConst, h0, ↓reduceIte, true_or] using feffermanStein_top hp1 hp g + rcases eq_or_ne q p with rfl | hqp + · simpa only [feffermanSteinConst, h0, ↓reduceIte, or_true] using + feffermanStein_self hp1 hp g hg + have hor : ¬ (q = ∞ ∨ q = p) := not_or.2 ⟨hq, hqp⟩ + rcases lt_or_gt_of_ne hqp with hlt | hgt + · simpa only [feffermanSteinConst, h0, hor, hlt, ↓reduceIte] using + feffermanStein_of_gt hp1 hp hq1 hlt g hg + · simpa only [feffermanSteinConst, h0, hor, not_lt.2 hgt.le, ↓reduceIte] using + feffermanStein_of_lt hp1 hp hgt hq g hg + +end Rd diff --git a/LeanPool/FunctionSpaces/Analysis/Maximal/HardyLittlewoodMaximal.lean b/LeanPool/FunctionSpaces/Analysis/Maximal/HardyLittlewoodMaximal.lean new file mode 100644 index 0000000000..650675cb96 --- /dev/null +++ b/LeanPool/FunctionSpaces/Analysis/Maximal/HardyLittlewoodMaximal.lean @@ -0,0 +1,798 @@ +/- +Copyright (c) 2026 Mario Ullrich. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Mario Ullrich +-/ +module + +public import LeanPool.FunctionSpaces.Analysis.Maximal.DyadicCubes +public import LeanPool.FunctionSpaces.Analysis.Lp.MixedNorms +public import LeanPool.FunctionSpaces.Analysis.Lp.LayerCake +public import Mathlib.MeasureTheory.Covering.Vitali +public import Mathlib.Topology.Semicontinuity.Basic + +/- +Modified for Lean Pool: module names and imports adapted. +-/ + +/-! +# The Hardy–Littlewood maximal function + +For `g : V → [0, ∞]` the **Hardy–Littlewood maximal function** is +`M g(x) = sup_{r > 0} |B(0,r)|⁻¹ ∫_{B(x,r)} g` (`Rd.maximal`). It is lower semicontinuous, hence +measurable, for every `g` (`Rd.measurable_maximal`), and it controls convolutions with kernels +bounded by `A 1_{B(0,ρ)}` (`Rd.lintegral_mul_le_maximal_of_ball`), by `A min(1, (ρ/‖y‖)^N)` with +`N > n` (`Rd.lintegral_mul_le_maximal_of_decay`), or by the Peetre weight +`A 2^(jn) (1 + 2^j ‖y‖)^(-N)` (`Rd.lintegral_mul_le_maximal_of_one_add_norm`). + +The **weighted weak type `(1,1)`** `∫_{M g > t} w ≤ 5^n t⁻¹ ∫ g M w` holds for all +`g, w ≥ 0` (`Rd.setLIntegral_maximal_gt_le`), by Vitali's covering lemma. With the layer cake +formula for `[0, ∞]`-valued functions +(`MeasureTheory.lintegral_rpow_eq_lintegral_meas_lt_mul_ennreal`) and the integral of `t^(p-2)` +over `(0, 2a)` (`MeasureTheory.lintegral_Ioi_indicator_half_lt_mul_rpow`), both from +`FunctionSpaces.Analysis.Lp.LayerCake`, and Tonelli's theorem +(`Rd.lintegral_Ioi_lintegral_indicator_mul_rpow`) it gives the **weighted strong type** +`∫ (M g)^p w ≤ C_{n,p} ∫ g^p M w` for `1 < p < ∞` (`Rd.lintegral_maximal_rpow_mul_le`) and the +**Hardy–Littlewood maximal theorem** `‖M g‖_p ≤ C_{n,p}^{1/p} ‖g‖_p` (`Rd.eLpNorm_maximal_le`), +with the explicit constant `C_{n,p} = p 2^p 5^n / (p - 1)` (`Rd.maximalConst`). For `p = ∞`, +`M g ≤ ‖g‖_∞` (`Rd.maximal_le_eLpNorm_top`). + +Two geometric facts serve the covering arguments: the balls of radius `ρ 2^(-j)` have the volume +`ρ^n |B_1| 2^(-jn)` (`Rd.volume_ball_div_two_pow`, `Rd.volume_closedBall_div_two_pow`), and a set +in `B̄(c, ρ)` that meets `B(x, r)` for some `x ∉ B̄(c, 2ρ)` lies in `B(x, 3r)` +(`Metric.subset_ball_three_mul_of_inter_nonempty`). +-/ + +@[expose] public section + +open MeasureTheory Module Metric Filter Set +open scoped ENNReal Topology + +namespace Metric + +/-- If a set `Q ⊆ B̄(c, ρ)` meets the ball `B(x, r)` around a point `x ∉ B̄(c, 2ρ)`, then +`Q ⊆ B(x, 3r)`: a point of `Q` in the ball forces `r > ρ`, so every point of `Q` lies within +`r + 2ρ < 3r` of `x`. -/ +theorem subset_ball_three_mul_of_inter_nonempty {α : Type*} [PseudoMetricSpace α] {Q : Set α} + {c x : α} {ρ r : ℝ} (hQ : Q ⊆ closedBall c ρ) (hx : x ∉ closedBall c (2 * ρ)) + (hne : (Q ∩ ball x r).Nonempty) : Q ⊆ ball x (3 * r) := by + obtain ⟨y, hyQ, hyB⟩ := hne + have hy : dist y c ≤ ρ := hQ hyQ + have hyx : dist y x < r := hyB + have hxc : 2 * ρ < dist x c := not_le.1 hx + have h1 : dist x c ≤ dist x y + dist y c := dist_triangle _ _ _ + rw [dist_comm x y] at h1 + intro z hz + have hz : dist z c ≤ ρ := hQ hz + have h2 : dist z x ≤ dist z c + dist c y + dist y x := + (dist_triangle z y x).trans (add_le_add_left (dist_triangle z c y) _) |>.trans_eq (by ring) + rw [dist_comm c y] at h2 + rw [mem_ball] + linarith + +end Metric + +namespace Rd + +variable {V : Type*} [NormedAddCommGroup V] [InnerProductSpace ℝ V] [FiniteDimensional ℝ V] + [MeasurableSpace V] [BorelSpace V] + +/-! ### Definition and first properties -/ + +/-- The **Hardy–Littlewood maximal function** of `g : V → [0, ∞]`: +`M g(x) = sup_{r > 0} |B(0,r)|⁻¹ ∫_{B(x,r)} g`, the supremum of the means of `g` over the open +balls centred at `x`. The volume `|B(0,r)| = |B(x,r)|` of the centred ball keeps the factor +independent of `x`. -/ +noncomputable def maximal (g : V → ℝ≥0∞) (x : V) : ℝ≥0∞ := + ⨆ (r : ℝ) (_ : 0 < r), (volume (ball (0 : V) r))⁻¹ * ∫⁻ y in ball x r, g y + +/-- The ball `B(0,r)` of radius `r > 0` has positive volume. -/ +theorem volume_ball_ne_zero {r : ℝ} (hr : 0 < r) : volume (ball (0 : V) r) ≠ 0 := + (measure_ball_pos volume (0 : V) hr).ne' + +/-- The ball `B(0,r)` has finite volume. -/ +theorem volume_ball_ne_top (r : ℝ) : volume (ball (0 : V) r) ≠ ∞ := + measure_ball_lt_top.ne + +/-- **Volumes of dyadic balls**: a ball of radius `ρ 2^(-j)`, `ρ > 0`, around any centre has +volume `ρ^n |B_1| 2^(-jn)`, where `|B_1|` is the volume of the unit ball. -/ +theorem volume_ball_div_two_pow {ρ : ℝ} (hρ : 0 < ρ) (j : ℕ) (z : V) : + volume (ball z (ρ / 2 ^ j)) = ENNReal.ofReal (ρ ^ finrank ℝ V) * + volume (ball (0 : V) 1) * ENNReal.dyadicWeight (-(finrank ℝ V : ℝ)) j := by + rw [Measure.addHaar_ball_of_pos _ _ (by positivity), div_eq_mul_one_div, mul_pow, + ENNReal.ofReal_mul (by positivity), ENNReal.ofReal_one_div_two_pow_pow] + ring + +/-- The volume of the closed ball of radius `d 2^(-j)` is `d^n |B_1| 2^(-jn)` for `d ≥ 0`. -/ +theorem volume_closedBall_div_two_pow {d : ℝ} (hd : 0 ≤ d) (j : ℕ) (z : V) : + volume (closedBall z (d / 2 ^ j)) = ENNReal.ofReal (d ^ finrank ℝ V) * + volume (ball (0 : V) 1) * ENNReal.dyadicWeight (-(finrank ℝ V : ℝ)) j := by + rw [Measure.addHaar_closedBall _ _ (by positivity), div_eq_mul_one_div, mul_pow, + ENNReal.ofReal_mul (by positivity), ENNReal.ofReal_one_div_two_pow_pow] + ring + +/-- Every mean over a ball centred at `x` is at most `M g(x)`. -/ +theorem le_maximal {r : ℝ} (hr : 0 < r) (g : V → ℝ≥0∞) (x : V) : + (volume (ball (0 : V) r))⁻¹ * ∫⁻ y in ball x r, g y ≤ maximal g x := + le_iSup₂ (f := fun (r : ℝ) (_ : 0 < r) => + (volume (ball (0 : V) r))⁻¹ * ∫⁻ y in ball x r, g y) r hr + +/-- `∫_{B(x,r)} g ≤ |B(0,r)| M g(x)` for every `g : V → [0, ∞]` and every `r > 0`. -/ +theorem setLIntegral_ball_le_mul_maximal {r : ℝ} (hr : 0 < r) (g : V → ℝ≥0∞) (x : V) : + ∫⁻ y in ball x r, g y ≤ volume (ball (0 : V) r) * maximal g x := + (ENNReal.inv_mul_le_iff (volume_ball_ne_zero hr) (volume_ball_ne_top r)).1 (le_maximal hr g x) + +/-- `M g(x) ≤ c` as soon as `∫_{B(x,r)} g ≤ |B(0,r)| c` for every `r > 0`. -/ +theorem maximal_le_of_forall {g : V → ℝ≥0∞} {x : V} {c : ℝ≥0∞} + (h : ∀ r : ℝ, 0 < r → ∫⁻ y in ball x r, g y ≤ volume (ball (0 : V) r) * c) : + maximal g x ≤ c := + iSup₂_le fun r hr => + (ENNReal.inv_mul_le_iff (volume_ball_ne_zero hr) (volume_ball_ne_top r)).2 (h r hr) + +/-- The maximal function is **monotone**: `g ≤ h` implies `M g ≤ M h`. -/ +theorem maximal_mono {g h : V → ℝ≥0∞} (hgh : g ≤ h) : maximal g ≤ maximal h := fun x => + iSup₂_mono fun _ _ => by gcongr with y; exact hgh y + +/-- The maximal function is **subadditive**: `M (g + h) ≤ M g + M h`. One summand has to be +measurable, since the lower Lebesgue integral of a sum of two non-measurable functions can exceed +the sum of their integrals. -/ +theorem maximal_add_le {g : V → ℝ≥0∞} (hg : AEMeasurable g volume) (h : V → ℝ≥0∞) (x : V) : + maximal (g + h) x ≤ maximal g x + maximal h x := by + refine maximal_le_of_forall fun r hr => ?_ + rw [mul_add] + calc ∫⁻ y in ball x r, (g + h) y + = (∫⁻ y in ball x r, g y) + ∫⁻ y in ball x r, h y := + lintegral_add_left' hg.restrict h + _ ≤ _ := add_le_add (setLIntegral_ball_le_mul_maximal hr g x) + (setLIntegral_ball_le_mul_maximal hr h x) + +/-- The maximal function is **homogeneous**: `M (c g) = c M g` for a finite constant `c`. -/ +theorem maximal_const_mul {c : ℝ≥0∞} (hc : c ≠ ∞) (g : V → ℝ≥0∞) (x : V) : + maximal (fun y => c * g y) x = c * maximal g x := by + simp only [maximal, lintegral_const_mul' c _ hc, ENNReal.mul_iSup] + simp_rw [mul_left_comm c] + +/-- If `g ≤ c` almost everywhere, then `M g ≤ c` everywhere. -/ +theorem maximal_le_of_ae_le {g : V → ℝ≥0∞} {c : ℝ≥0∞} (h : ∀ᵐ y ∂volume, g y ≤ c) (x : V) : + maximal g x ≤ c := by + refine maximal_le_of_forall fun r _ => ?_ + calc ∫⁻ y in ball x r, g y ≤ ∫⁻ _ in ball x r, c := lintegral_mono_ae (ae_restrict_of_ae h) + _ = volume (ball (0 : V) r) * c := by + rw [setLIntegral_const, Measure.addHaar_ball_center, mul_comm] + +/-- The maximal function of a **constant** is that constant. -/ +theorem maximal_const (c : ℝ≥0∞) : maximal (fun _ : V => c) = fun _ => c := by + funext x + refine le_antisymm (maximal_le_of_ae_le (ae_of_all _ fun _ => le_rfl) x) ?_ + calc c = (volume (ball (0 : V) 1))⁻¹ * ∫⁻ _ in ball x 1, c := by + rw [setLIntegral_const, Measure.addHaar_ball_center volume x, mul_comm c, ← mul_assoc, + ENNReal.inv_mul_cancel (volume_ball_ne_zero one_pos) (volume_ball_ne_top 1), one_mul] + _ ≤ maximal (fun _ => c) x := le_maximal one_pos _ x + +/-- Functions that agree almost everywhere have the **same maximal function**. -/ +theorem maximal_congr_ae {g h : V → ℝ≥0∞} (hgh : g =ᵐ[volume] h) : maximal g = maximal h := by + funext x + simp only [maximal, lintegral_congr_ae (ae_restrict_of_ae hgh)] + +/-- Restricting `g` to a set decreases its maximal function: `M (1_s g) ≤ M g`. -/ +theorem maximal_indicator_le (s : Set V) (g : V → ℝ≥0∞) : maximal (s.indicator g) ≤ maximal g := + maximal_mono (Set.indicator_le_self s g) + +/-- **Monotone convergence** for the maximal function: for an increasing sequence of almost +everywhere measurable `g_N`, `M (sup_N g_N) = sup_N M g_N`. -/ +theorem maximal_iSup_of_monotone {g : ℕ → V → ℝ≥0∞} (hg : ∀ N, AEMeasurable (g N) volume) + (hmono : Monotone g) : maximal (⨆ N, g N) = ⨆ N, maximal (g N) := by + funext x + simp only [maximal, iSup_apply] + rw [iSup_comm] + refine iSup_congr fun r => ?_ + rw [iSup_comm] + refine iSup_congr fun _ => ?_ + rw [lintegral_iSup' (fun N => (hg N).restrict) + (ae_of_all _ fun y _ _ hab => hmono hab y), ENNReal.mul_iSup] + +/-- On a space with one point (`n = 0`) every function is its own maximal function: every ball +of positive radius is the whole space, of positive finite volume. -/ +theorem maximal_eq_self_of_subsingleton [Subsingleton V] (g : V → ℝ≥0∞) : maximal g = g := by + funext x + have hball : ∀ r : ℝ, 0 < r → ∀ z : V, ball z r = univ := fun r hr z => + Set.eq_univ_of_forall fun y => by rw [Subsingleton.elim y z]; exact mem_ball_self hr + have hg : g = fun _ => g x := funext fun y => by rw [Subsingleton.elim y x] + have hterm : ∀ r : ℝ, 0 < r → + (volume (ball (0 : V) r))⁻¹ * ∫⁻ y in ball x r, g y = g x := fun r hr => by + rw [hg, setLIntegral_const, hball r hr x, ← hball r hr 0, mul_comm (g x), ← mul_assoc, + ENNReal.inv_mul_cancel (volume_ball_ne_zero hr) (volume_ball_ne_top r), one_mul] + refine le_antisymm (iSup₂_le fun r hr => (hterm r hr).le) ?_ + exact (hterm 1 one_pos).ge.trans (le_maximal one_pos g x) + +/-! ### Measurability by lower semicontinuity -/ + +/-- For every `g : V → [0, ∞]` and every radius `r`, `x ↦ ∫_{B(x,r)} g` is **lower +semicontinuous**: the ball `B(x₀, r)` is the increasing union of the balls `B(x₀, r - 1/(m+1))`, +and each of them lies in `B(x, r)` for all `x` close to `x₀`. -/ +theorem lowerSemicontinuous_setLIntegral_ball (g : V → ℝ≥0∞) (r : ℝ) : + LowerSemicontinuous fun x => ∫⁻ y in ball x r, g y := by + intro x₀ a ha + dsimp only at ha ⊢ + have hU : ball x₀ r = ⋃ m : ℕ, ball x₀ (r - 1 / ((m : ℝ) + 1)) := by + refine Set.Subset.antisymm (fun y hy => ?_) (Set.iUnion_subset fun m => + ball_subset_ball (by have : (0 : ℝ) ≤ 1 / ((m : ℝ) + 1) := by positivity + linarith)) + obtain ⟨m, hm⟩ := exists_nat_one_div_lt (sub_pos.2 (mem_ball.1 hy)) + exact Set.mem_iUnion.2 ⟨m, mem_ball.2 (by linarith)⟩ + have hmono : Monotone fun m : ℕ => ball x₀ (r - 1 / ((m : ℝ) + 1)) := fun m m' hmm' => + ball_subset_ball (by gcongr) + rw [hU, setLIntegral_iUnion_of_directed g hmono.directed_le] at ha + obtain ⟨m, hm⟩ := lt_iSup_iff.1 ha + refine Filter.eventually_of_mem (ball_mem_nhds x₀ (by positivity : (0 : ℝ) < 1 / ((m : ℝ) + 1))) + fun x hx => hm.trans_le (lintegral_mono_set (ball_subset_ball' ?_)) + rw [dist_comm] + linarith [mem_ball.1 hx] + +/-- The maximal function of every `g : V → [0, ∞]` is **lower semicontinuous**, as a supremum of +the lower semicontinuous functions `x ↦ |B(0,r)|⁻¹ ∫_{B(x,r)} g`. -/ +theorem lowerSemicontinuous_maximal (g : V → ℝ≥0∞) : LowerSemicontinuous (maximal g) := + lowerSemicontinuous_biSup fun r hr => + Continuous.comp_lowerSemicontinuous + (ENNReal.continuous_const_mul (ENNReal.inv_ne_top.2 (volume_ball_ne_zero hr))) + (lowerSemicontinuous_setLIntegral_ball g r) fun _ _ h => mul_le_mul_right h _ + +/-- The maximal function of every `g : V → [0, ∞]` is **measurable**. -/ +theorem measurable_maximal (g : V → ℝ≥0∞) : Measurable (maximal g) := + (lowerSemicontinuous_maximal g).measurable + +/-! ### Kernels with radial majorants -/ + +/-- **Kernels bounded by a ball, before the maximal function**: if `0 ≤ K ≤ A 1_{B(0,ρ)}` +with `A < ∞`, then `∫ K(y) g(x - y) dy ≤ A ∫_{B(x,ρ)} g` for every `g : V → [0, ∞]`, by the +translation invariance of the Lebesgue measure. -/ +theorem lintegral_mul_le_setLIntegral_ball {K : V → ℝ≥0∞} {A : ℝ≥0∞} {ρ : ℝ} (hA : A ≠ ∞) + (hK : ∀ y, K y ≤ A * (ball (0 : V) ρ).indicator 1 y) (g : V → ℝ≥0∞) (x : V) : + ∫⁻ y, K y * g (x - y) ≤ A * ∫⁻ y in ball x ρ, g y := by + have hpt : ∀ y, K y * g (x - y) ≤ A * (ball x ρ).indicator g (x - y) := fun y => by + by_cases hy : y ∈ ball (0 : V) ρ + · have hxy : x - y ∈ ball x ρ := by + rw [sub_eq_add_neg, add_mem_ball_iff_norm, norm_neg]; exact mem_ball_zero_iff.1 hy + rw [Set.indicator_of_mem hxy] + have := hK y + rw [Set.indicator_of_mem hy, Pi.one_apply, mul_one] at this + gcongr + · have := hK y + rw [Set.indicator_of_notMem hy, mul_zero, nonpos_iff_eq_zero] at this + simp [this] + calc ∫⁻ y, K y * g (x - y) ≤ ∫⁻ y, A * (ball x ρ).indicator g (x - y) := lintegral_mono hpt + _ = A * ∫⁻ y in ball x ρ, g y := by + rw [lintegral_const_mul' A _ hA, + lintegral_sub_left_eq_self (fun z => (ball x ρ).indicator g z) x, + lintegral_indicator measurableSet_ball] + +/-- **Kernels bounded by a ball.** If `0 ≤ K ≤ A 1_{B(0,ρ)}`, then +`∫ K(y) g(x - y) dy ≤ A |B(0,ρ)| M g(x)` for every `g : V → [0, ∞]` and every kernel `K` +(`Rd.lintegral_mul_le_setLIntegral_ball` and the definition of `M g`). -/ +theorem lintegral_mul_le_maximal_of_ball {K : V → ℝ≥0∞} {A : ℝ≥0∞} {ρ : ℝ} (hA : A ≠ ∞) + (hK : ∀ y, K y ≤ A * (ball (0 : V) ρ).indicator 1 y) (hρ : 0 < ρ) (g : V → ℝ≥0∞) (x : V) : + ∫⁻ y, K y * g (x - y) ≤ A * volume (ball (0 : V) ρ) * maximal g x := + (lintegral_mul_le_setLIntegral_ball hA hK g x).trans (by + rw [mul_assoc]; gcongr; exact setLIntegral_ball_le_mul_maximal hρ g x) + +/-- The dyadic **shell** `{y : ‖y‖ < 2^(i+1) ρ}` for `i = 0` and +`{y : 2^i ρ ≤ ‖y‖ < 2^(i+1) ρ}` for `i ≥ 1`. -/ +def dyadicShell (ρ : ℝ) (i : ℕ) : Set V := + {y | ‖y‖ < 2 ^ (i + 1) * ρ ∧ (i = 0 ∨ 2 ^ i * ρ ≤ ‖y‖)} + +omit [InnerProductSpace ℝ V] [FiniteDimensional ℝ V] in +/-- The shells are measurable. -/ +theorem measurableSet_dyadicShell (ρ : ℝ) (i : ℕ) : + MeasurableSet (dyadicShell (V := V) ρ i) := by + rw [dyadicShell, ofPred_and, ofPred_or] + exact (measurableSet_lt measurable_norm measurable_const).inter + ((MeasurableSet.const _).union (measurableSet_le measurable_const measurable_norm)) + +omit [InnerProductSpace ℝ V] [FiniteDimensional ℝ V] [MeasurableSpace V] [BorelSpace V] in +/-- The shells **cover** `V`: a point with `‖y‖ ≥ ρ` lies in the shell `i` with +`2^i ≤ ‖y‖/ρ < 2^(i+1)`. -/ +theorem iUnion_dyadicShell {ρ : ℝ} (hρ : 0 < ρ) : ⋃ i, dyadicShell (V := V) ρ i = univ := by + refine Set.eq_univ_of_forall fun y => Set.mem_iUnion.2 ?_ + by_cases hy : ‖y‖ < ρ + · refine ⟨0, ?_, Or.inl rfl⟩ + rw [zero_add, pow_one] + linarith + · obtain ⟨i, hi1, hi2⟩ := exists_nat_pow_near ((one_le_div hρ).2 (not_lt.1 hy)) + (one_lt_two : (1 : ℝ) < 2) + exact ⟨i, (div_lt_iff₀ hρ).1 hi2, Or.inr ((le_div_iff₀ hρ).1 hi1)⟩ + +omit [InnerProductSpace ℝ V] [FiniteDimensional ℝ V] [MeasurableSpace V] [BorelSpace V] in +/-- A kernel with the bound `A` on `B̄(0,ρ)` and the bound `A (ρ/‖y‖)^N` outside is at most +`A 2^(-iN)` on the shell `i`. -/ +theorem kernel_le_of_mem_dyadicShell {K : V → ℝ≥0∞} {A : ℝ≥0∞} {ρ : ℝ} {N : ℕ} (hρ : 0 < ρ) + (hK₁ : ∀ y, ‖y‖ ≤ ρ → K y ≤ A) + (hK₂ : ∀ y, ρ < ‖y‖ → K y ≤ A * ENNReal.ofReal ((ρ / ‖y‖) ^ N)) {i : ℕ} {y : V} + (hy : y ∈ dyadicShell ρ i) : K y ≤ A * 2⁻¹ ^ (i * N) := by + rcases le_or_gt ‖y‖ ρ with h | h + · have hi : i = 0 := by + rcases hy.2 with hi | hi + · exact hi + · by_contra hne + have : (2 : ℝ) ≤ 2 ^ i := le_self_pow₀ one_le_two hne + nlinarith + simpa [hi] using hK₁ y h + · refine (hK₂ y h).trans (mul_le_mul_right ?_ A) + have hpow : (2⁻¹ : ℝ≥0∞) ^ (i * N) = ENNReal.ofReal (((2 : ℝ) ^ i)⁻¹ ^ N) := by + rw [ENNReal.ofReal_pow (by positivity), ENNReal.ofReal_inv_of_pos (by positivity), + ENNReal.ofReal_pow zero_le_two, ENNReal.ofReal_ofNat, ENNReal.inv_pow, ← pow_mul] + rw [hpow] + refine ENNReal.ofReal_le_ofReal (pow_le_pow_left₀ (by positivity) ?_ N) + have hy0 : 0 < ‖y‖ := hρ.trans h + rw [div_le_iff₀ hy0] + rcases hy.2 with hi | hi + · subst hi; simpa using h.le + · calc ρ = ((2 : ℝ) ^ i)⁻¹ * (2 ^ i * ρ) := by field_simp + _ ≤ ((2 : ℝ) ^ i)⁻¹ * ‖y‖ := by gcongr + +/-- `|B(0, 2^(i+1) ρ)| = 2^((i+1) n) |B(0,ρ)|`. -/ +theorem volume_ball_two_pow_mul (i : ℕ) {ρ : ℝ} : + volume (ball (0 : V) (2 ^ (i + 1) * ρ)) = + 2 ^ ((i + 1) * finrank ℝ V) * volume (ball (0 : V) ρ) := by + rw [Measure.addHaar_ball_mul_of_pos volume 0 (by positivity), ← pow_mul, + ENNReal.ofReal_pow zero_le_two, ENNReal.ofReal_ofNat] + +/-- The geometric sum `∑_i 2^(-iN) 2^((i+1)n) = 2^n (1 - 2^(-(N-n)))⁻¹` for `n ≤ N`. -/ +theorem tsum_two_inv_pow_mul_two_pow {n N : ℕ} (hN : n ≤ N) : + ∑' i : ℕ, (2⁻¹ : ℝ≥0∞) ^ (i * N) * 2 ^ ((i + 1) * n) = 2 ^ n * (1 - 2⁻¹ ^ (N - n))⁻¹ := by + have hterm : ∀ i : ℕ, (2⁻¹ : ℝ≥0∞) ^ (i * N) * 2 ^ ((i + 1) * n) = 2 ^ n * (2⁻¹ ^ (N - n)) ^ i := + fun i => by + obtain ⟨k, rfl⟩ := Nat.exists_eq_add_of_le hN + have h2 : (2⁻¹ : ℝ≥0∞) ^ (i * n) * 2 ^ (i * n) = 1 := by + rw [← mul_pow, ENNReal.inv_mul_cancel two_ne_zero ENNReal.ofNat_ne_top, one_pow] + rw [Nat.add_sub_cancel_left, mul_add, pow_add, add_mul, one_mul, pow_add, ← pow_mul, + mul_comm k i] + calc (2⁻¹ : ℝ≥0∞) ^ (i * n) * 2⁻¹ ^ (i * k) * (2 ^ (i * n) * 2 ^ n) + = ((2⁻¹ : ℝ≥0∞) ^ (i * n) * 2 ^ (i * n)) * (2 ^ n * 2⁻¹ ^ (i * k)) := by ring + _ = 2 ^ n * 2⁻¹ ^ (i * k) := by rw [h2, one_mul] + simp_rw [hterm] + rw [ENNReal.tsum_mul_left, ENNReal.tsum_geometric] + +/-- **Kernels with a power tail.** If `K ≤ A` on `B̄(0,ρ)` and `K(y) ≤ A (ρ/‖y‖)^N` outside, with +`N > n`, then `∫ K(y) g(x - y) dy ≤ A |B(0,ρ)| 2^n (1 - 2^(-(N-n)))⁻¹ M g(x)` for every +`g : V → [0, ∞]`. The proof covers `V` by the ball `B(0,2ρ)` and the dyadic shells +`2^i ρ ≤ ‖y‖ < 2^(i+1) ρ`, `i ≥ 1`, applies the ball bound on each, and sums a geometric +series. -/ +theorem lintegral_mul_le_maximal_of_decay {K : V → ℝ≥0∞} {A : ℝ≥0∞} {ρ : ℝ} {N : ℕ} + (hN : finrank ℝ V < N) (hA : A ≠ ∞) (hK₁ : ∀ y, ‖y‖ ≤ ρ → K y ≤ A) + (hK₂ : ∀ y, ρ < ‖y‖ → K y ≤ A * ENNReal.ofReal ((ρ / ‖y‖) ^ N)) (hρ : 0 < ρ) + (g : V → ℝ≥0∞) (x : V) : + ∫⁻ y, K y * g (x - y) ≤ + A * volume (ball (0 : V) ρ) * 2 ^ finrank ℝ V * (1 - 2⁻¹ ^ (N - finrank ℝ V))⁻¹ * + maximal g x := by + have hshell : ∀ i : ℕ, ∫⁻ y in dyadicShell ρ i, K y * g (x - y) ≤ + A * volume (ball (0 : V) ρ) * maximal g x * (2⁻¹ ^ (i * N) * 2 ^ ((i + 1) * finrank ℝ V)) := + fun i => by + rw [← lintegral_indicator (measurableSet_dyadicShell ρ i)] + have hAi : A * 2⁻¹ ^ (i * N) ≠ ∞ := + ENNReal.mul_ne_top hA (ENNReal.pow_ne_top (ENNReal.inv_ne_top.2 two_ne_zero)) + calc ∫⁻ y, (dyadicShell ρ i).indicator (fun y => K y * g (x - y)) y + = ∫⁻ y, (dyadicShell ρ i).indicator K y * g (x - y) := by + congr 1; funext y + by_cases hy : y ∈ dyadicShell ρ i + · simp [Set.indicator_of_mem hy] + · simp [Set.indicator_of_notMem hy] + _ ≤ A * 2⁻¹ ^ (i * N) * volume (ball (0 : V) (2 ^ (i + 1) * ρ)) * maximal g x := by + refine lintegral_mul_le_maximal_of_ball hAi (fun y => ?_) (by positivity) g x + by_cases hy : y ∈ dyadicShell ρ i + · rw [Set.indicator_of_mem hy, Set.indicator_of_mem (mem_ball_zero_iff.2 hy.1), + Pi.one_apply, mul_one] + exact kernel_le_of_mem_dyadicShell hρ hK₁ hK₂ hy + · simp [Set.indicator_of_notMem hy] + _ = _ := by rw [volume_ball_two_pow_mul]; ring + calc ∫⁻ y, K y * g (x - y) = ∫⁻ y in ⋃ i, dyadicShell ρ i, K y * g (x - y) := by + rw [iUnion_dyadicShell hρ, Measure.restrict_univ] + _ ≤ ∑' i, ∫⁻ y in dyadicShell ρ i, K y * g (x - y) := lintegral_iUnion_le _ _ + _ ≤ ∑' i : ℕ, A * volume (ball (0 : V) ρ) * maximal g x * + (2⁻¹ ^ (i * N) * 2 ^ ((i + 1) * finrank ℝ V)) := tsum_le_tsum hshell + _ = _ := by rw [ENNReal.tsum_mul_left, tsum_two_inv_pow_mul_two_pow hN.le]; ring + +variable (V) in +/-- The constant `|B(0,1)| 2^n (1 - 2^(-(N-n)))⁻¹` of the maximal function bound for kernels +with the decay `2^(jn) (1 + 2^j ‖y‖)^(-N)`. -/ +noncomputable def decayMaximalConst (N : ℕ) : ℝ≥0∞ := + volume (ball (0 : V) 1) * 2 ^ finrank ℝ V * (1 - 2⁻¹ ^ (N - finrank ℝ V))⁻¹ + +/-- `decayMaximalConst V N` is finite for `N > n`. -/ +theorem decayMaximalConst_ne_top {N : ℕ} (hN : finrank ℝ V < N) : decayMaximalConst V N ≠ ∞ := by + have hlt : (2⁻¹ : ℝ≥0∞) ^ (N - finrank ℝ V) < 1 := + pow_lt_one₀ zero_le (ENNReal.inv_lt_one.2 ENNReal.one_lt_two) (Nat.sub_ne_zero_of_lt hN) + refine ENNReal.mul_ne_top (ENNReal.mul_ne_top (volume_ball_ne_top 1) + (ENNReal.pow_ne_top ENNReal.ofNat_ne_top)) (ENNReal.inv_ne_top.2 ?_) + exact (tsub_pos_iff_lt.2 hlt).ne' + +omit [InnerProductSpace ℝ V] [FiniteDimensional ℝ V] [MeasurableSpace V] [BorelSpace V] in +/-- The tail bound of the Peetre weight: for every `y ≠ 0`, +`(1 + 2^j ‖y‖)^(-N) ≤ (2^(-j)/‖y‖)^N`. -/ +theorem inv_one_add_two_pow_mul_pow_le {j N : ℕ} {y : V} (hy0 : 0 < ‖y‖) : + ((1 + 2 ^ j * ‖y‖ₑ) ^ N)⁻¹ ≤ ENNReal.ofReal ((((2 : ℝ) ^ j)⁻¹ / ‖y‖) ^ N) := by + have h : (((2 : ℝ) ^ j)⁻¹ / ‖y‖) ^ N = ((2 ^ j * ‖y‖) ^ N)⁻¹ := by + rw [div_eq_mul_inv, ← mul_inv, inv_pow] + rw [h, ENNReal.ofReal_inv_of_pos (by positivity), ENNReal.ofReal_pow (by positivity), + ENNReal.ofReal_mul (by positivity), ENNReal.ofReal_pow zero_le_two, ENNReal.ofReal_ofNat, + ofReal_norm] + gcongr + exact le_add_self + +/-- **Kernels with Peetre decay.** If `K(y) ≤ A 2^(jn) (1 + 2^j ‖y‖)^(-N)` with `N > n`, then +`∫ K(y) g(x - y) dy ≤ C_{n,N} A M g(x)` for every `g : V → [0, ∞]`, with the constant +`C_{n,N} = decayMaximalConst V N` independent of the level `j`. -/ +theorem lintegral_mul_le_maximal_of_one_add_norm {K : V → ℝ≥0∞} {A : ℝ≥0∞} {j N : ℕ} + (hN : finrank ℝ V < N) (hA : A ≠ ∞) + (hK : ∀ y, K y ≤ A * 2 ^ (j * finrank ℝ V) * ((1 + 2 ^ j * ‖y‖ₑ) ^ N)⁻¹) + (g : V → ℝ≥0∞) (x : V) : + ∫⁻ y, K y * g (x - y) ≤ decayMaximalConst V N * A * maximal g x := by + have hA' : A * 2 ^ (j * finrank ℝ V) ≠ ∞ := + ENNReal.mul_ne_top hA (ENNReal.pow_ne_top ENNReal.ofNat_ne_top) + have hρ : (0 : ℝ) < ((2 : ℝ) ^ j)⁻¹ := by positivity + have h := lintegral_mul_le_maximal_of_decay hN hA' + (fun y _ => (hK y).trans (mul_le_of_le_one_right zero_le + (ENNReal.inv_le_one.2 (one_le_pow₀ le_self_add)))) + (fun y hy => (hK y).trans + (mul_le_mul_right (inv_one_add_two_pow_mul_pow_le (hρ.trans hy)) _)) hρ g x + refine h.trans (le_of_eq ?_) + have hvol : volume (ball (0 : V) ((2 : ℝ) ^ j)⁻¹) = + (2 ^ (j * finrank ℝ V))⁻¹ * volume (ball (0 : V) 1) := by + rw [Measure.addHaar_ball_of_pos volume 0 hρ, ENNReal.ofReal_pow hρ.le, + ENNReal.ofReal_inv_of_pos (by positivity), ENNReal.ofReal_pow zero_le_two, + ENNReal.ofReal_ofNat, ENNReal.inv_pow, ENNReal.inv_pow, ← pow_mul] + have hc : (2 : ℝ≥0∞) ^ (j * finrank ℝ V) * (2 ^ (j * finrank ℝ V))⁻¹ = 1 := + ENNReal.mul_inv_cancel (pow_ne_zero _ two_ne_zero) (ENNReal.pow_ne_top ENNReal.ofNat_ne_top) + rw [hvol, decayMaximalConst] + calc A * 2 ^ (j * finrank ℝ V) * ((2 ^ (j * finrank ℝ V))⁻¹ * volume (ball (0 : V) 1)) * + 2 ^ finrank ℝ V * (1 - 2⁻¹ ^ (N - finrank ℝ V))⁻¹ * maximal g x + = (2 ^ (j * finrank ℝ V) * (2 ^ (j * finrank ℝ V))⁻¹) * (volume (ball (0 : V) 1) * + 2 ^ finrank ℝ V * (1 - 2⁻¹ ^ (N - finrank ℝ V))⁻¹ * A * maximal g x) := by ring + _ = _ := by rw [hc, one_mul] + +/-! ### The weighted weak type `(1,1)` -/ + +/-- For `y ∈ B(b,r)`: `∫_{B̄(b,4r)} w ≤ 5^n |B(0,r)| M w(y)`, since `B̄(b,4r) ⊆ B(y,5r)` and +`|B(0,5r)| = 5^n |B(0,r)|`. -/ +theorem setLIntegral_closedBall_le_maximal {r : ℝ} (hr : 0 < r) (w : V → ℝ≥0∞) {b y : V} + (hy : y ∈ ball b r) : + ∫⁻ z in closedBall b (4 * r), w z ≤ + 5 ^ finrank ℝ V * volume (ball (0 : V) r) * maximal w y := by + have hsub : closedBall b (4 * r) ⊆ ball y (5 * r) := fun z hz => by + rw [mem_closedBall] at hz + rw [mem_ball] at hy ⊢ + calc dist z y ≤ dist z b + dist b y := dist_triangle _ _ _ + _ < 4 * r + r := by rw [dist_comm b y]; linarith + _ = 5 * r := by ring + calc ∫⁻ z in closedBall b (4 * r), w z ≤ ∫⁻ z in ball y (5 * r), w z := lintegral_mono_set hsub + _ ≤ volume (ball (0 : V) (5 * r)) * maximal w y := + setLIntegral_ball_le_mul_maximal (by positivity) w y + _ = _ := by + rw [Measure.addHaar_ball_mul_of_pos volume (0 : V) (by norm_num : (0 : ℝ) < 5), + ENNReal.ofReal_pow (by norm_num), ENNReal.ofReal_ofNat] + +/-- **One ball of the Vitali cover.** If `t |B(0,r)| ≤ ∫_{B(b,r)} g`, then +`t ∫_{B̄(b,4r)} w ≤ 5^n ∫_{B(b,r)} g M w`: the mass of `w` on the enlarged ball is spread over +`B(b,r)` with the weight `g`, at the price of `M w`. -/ +theorem mul_setLIntegral_closedBall_le {r : ℝ} (hr : 0 < r) {g : V → ℝ≥0∞} (w : V → ℝ≥0∞) + {b : V} {t : ℝ≥0∞} (hI : t * volume (ball (0 : V) r) ≤ ∫⁻ y in ball b r, g y) : + t * ∫⁻ z in closedBall b (4 * r), w z ≤ + 5 ^ finrank ℝ V * ∫⁻ y in ball b r, g y * maximal w y := by + have hc : (5 : ℝ≥0∞) ^ finrank ℝ V * volume (ball (0 : V) r) ≠ ∞ := + ENNReal.mul_ne_top (ENNReal.pow_ne_top ENNReal.ofNat_ne_top) (volume_ball_ne_top r) + refine (ENNReal.mul_le_mul_iff_left (volume_ball_ne_zero (V := V) hr) (volume_ball_ne_top r)).1 ?_ + calc t * (∫⁻ z in closedBall b (4 * r), w z) * volume (ball (0 : V) r) + = (∫⁻ z in closedBall b (4 * r), w z) * (t * volume (ball (0 : V) r)) := by ring + _ ≤ (∫⁻ z in closedBall b (4 * r), w z) * ∫⁻ y in ball b r, g y := by gcongr + _ = (∫⁻ y in ball b r, g y) * ∫⁻ z in closedBall b (4 * r), w z := mul_comm _ _ + _ ≤ ∫⁻ y in ball b r, g y * ∫⁻ z in closedBall b (4 * r), w z := lintegral_mul_const_le _ _ + _ ≤ ∫⁻ y in ball b r, g y * (5 ^ finrank ℝ V * volume (ball (0 : V) r) * maximal w y) := + setLIntegral_mono' measurableSet_ball fun y hy => by + gcongr; exact setLIntegral_closedBall_le_maximal hr w hy + _ = 5 ^ finrank ℝ V * volume (ball (0 : V) r) * ∫⁻ y in ball b r, g y * maximal w y := by + rw [← lintegral_const_mul' _ _ hc]; congr 1; funext y; ring + _ = _ := by ring + +/-- The points `x` for which the integral of `g` over some ball `B(x,r)` with `0 < r ≤ R` exceeds +`t |B(0,r)|`. These sets exhaust `{M g > t}` as `R → ∞`. -/ +def bigBallSet (g : V → ℝ≥0∞) (t : ℝ≥0∞) (R : ℝ) : Set V := + {x | ∃ r, 0 < r ∧ r ≤ R ∧ t * volume (ball (0 : V) r) < ∫⁻ y in ball x r, g y} + +/-- The sets `bigBallSet g t R` increase with `R`. -/ +theorem bigBallSet_mono (g : V → ℝ≥0∞) (t : ℝ≥0∞) : Monotone (bigBallSet g t) := + fun _ _ hRR' _ ⟨r, hr0, hrR, hrI⟩ => ⟨r, hr0, hrR.trans hRR', hrI⟩ + +/-- The level set `{M g > t}` lies in the union of the sets `bigBallSet g t N`, `N ∈ ℕ`. -/ +theorem setOf_lt_maximal_subset (g : V → ℝ≥0∞) (t : ℝ≥0∞) : + {x | t < maximal g x} ⊆ ⋃ N : ℕ, bigBallSet g t N := fun x hx => by + obtain ⟨r, hr⟩ := lt_iSup_iff.1 (show t < maximal g x from hx) + obtain ⟨hr0, hlt⟩ := lt_iSup_iff.1 hr + rw [← ENNReal.div_eq_inv_mul, ENNReal.lt_div_iff_mul_lt (Or.inl (volume_ball_ne_zero hr0)) + (Or.inl (volume_ball_ne_top r))] at hlt + exact Set.mem_iUnion.2 ⟨⌈r⌉₊, r, hr0, Nat.le_ceil r, hlt⟩ + +/-- **Vitali step.** `t ∫_{E_R} w ≤ 5^n ∫ g M w` for the set `E_R = bigBallSet g t R`: Vitali's +covering lemma selects countably many disjoint balls `B(b, r_b)` from the balls that define +`E_R` such that the balls `B̄(b, 4 r_b)` cover `E_R`, and each of them is estimated by +`Rd.mul_setLIntegral_closedBall_le`. -/ +theorem mul_setLIntegral_bigBallSet_le (g w : V → ℝ≥0∞) (t : ℝ≥0∞) (R : ℝ) : + t * ∫⁻ x in bigBallSet g t R, w x ≤ 5 ^ finrank ℝ V * ∫⁻ x, g x * maximal w x := by + have hex : ∀ x ∈ bigBallSet g t R, ∃ r, 0 < r ∧ r ≤ R ∧ + t * volume (ball (0 : V) r) < ∫⁻ y in ball x r, g y := fun x hx => hx + choose! r hr0 hrR hrI using hex + obtain ⟨u, hus, hdisj, hcov⟩ := Vitali.exists_disjoint_subfamily_covering_enlargement_closedBall + (bigBallSet g t R) id r R hrR 4 (by norm_num) + have hdisj' : u.PairwiseDisjoint fun b => ball b (r b) := + hdisj.mono fun b => ball_subset_closedBall + have hu : u.Countable := hdisj'.countable_of_isOpen (fun _ _ => isOpen_ball) + fun b hb => nonempty_ball.2 (hr0 b (hus hb)) + have := hu.to_subtype + have hcover : bigBallSet g t R ⊆ ⋃ b : u, closedBall (b : V) (4 * r b) := fun a ha => by + obtain ⟨b, hb, hab⟩ := hcov a ha + exact Set.mem_iUnion.2 ⟨⟨b, hb⟩, hab (mem_closedBall_self (hr0 a ha).le)⟩ + have hball : ∫⁻ x in ⋃ b : u, ball (b : V) (r b), g x * maximal w x = + ∑' b : u, ∫⁻ x in ball (b : V) (r b), g x * maximal w x := + lintegral_iUnion (fun _ => measurableSet_ball) (hdisj'.subtype _ _) _ + calc t * ∫⁻ x in bigBallSet g t R, w x + ≤ t * ∫⁻ x in ⋃ b : u, closedBall (b : V) (4 * r b), w x := + mul_le_mul_right (lintegral_mono_set hcover) t + _ ≤ t * ∑' b : u, ∫⁻ x in closedBall (b : V) (4 * r b), w x := + mul_le_mul_right (lintegral_iUnion_le _ _) t + _ = ∑' b : u, t * ∫⁻ x in closedBall (b : V) (4 * r b), w x := ENNReal.tsum_mul_left.symm + _ ≤ ∑' b : u, 5 ^ finrank ℝ V * ∫⁻ x in ball (b : V) (r b), g x * maximal w x := + tsum_le_tsum fun b => + mul_setLIntegral_closedBall_le (hr0 b (hus b.2)) w (hrI b (hus b.2)).le + _ = 5 ^ finrank ℝ V * ∫⁻ x in ⋃ b : u, ball (b : V) (r b), g x * maximal w x := by + rw [hball, ENNReal.tsum_mul_left] + _ ≤ 5 ^ finrank ℝ V * ∫⁻ x, g x * maximal w x := + mul_le_mul_right (setLIntegral_le_lintegral _ _) _ + +/-- **Weighted weak type `(1,1)` of the maximal function** (Fefferman–Stein): for all +`g, w : V → [0, ∞]` and `t > 0`, `∫_{M g > t} w ≤ 5^n t⁻¹ ∫ g M w`. The level set is exhausted +by the sets `Rd.bigBallSet`, whose radii are bounded, and Vitali's covering lemma applies to each +of them. -/ +theorem setLIntegral_maximal_gt_le (g w : V → ℝ≥0∞) {t : ℝ≥0∞} (ht0 : 0 < t) : + ∫⁻ x in {x | t < maximal g x}, w x ≤ + 5 ^ finrank ℝ V * t⁻¹ * ∫⁻ x, g x * maximal w x := by + rcases eq_or_ne t ∞ with rfl | ht + · simp + have hmono : Monotone fun N : ℕ => bigBallSet g t N := + (bigBallSet_mono g t).comp Nat.mono_cast + have hle : t * ∫⁻ x in {x | t < maximal g x}, w x ≤ + 5 ^ finrank ℝ V * ∫⁻ x, g x * maximal w x := by + calc t * ∫⁻ x in {x | t < maximal g x}, w x + ≤ t * ∫⁻ x in ⋃ N : ℕ, bigBallSet g t N, w x := + mul_le_mul_right (lintegral_mono_set (setOf_lt_maximal_subset g t)) t + _ = ⨆ N : ℕ, t * ∫⁻ x in bigBallSet g t N, w x := by + rw [setLIntegral_iUnion_of_directed w hmono.directed_le, ENNReal.mul_iSup] + _ ≤ _ := iSup_le fun N => mul_setLIntegral_bigBallSet_le g w t N + rw [ENNReal.mul_le_iff_le_inv ht0.ne' ht] at hle + calc _ ≤ t⁻¹ * (5 ^ finrank ℝ V * ∫⁻ x, g x * maximal w x) := hle + _ = _ := by ring + +/-- **Weak type `(1,1)` of the maximal function**: `|{M g > t}| ≤ 5^n t⁻¹ ∫ g` for every +`g : V → [0, ∞]` and `t > 0` (the weight `w = 1`). -/ +theorem volume_maximal_gt_le (g : V → ℝ≥0∞) {t : ℝ≥0∞} (ht0 : 0 < t) : + volume {x | t < maximal g x} ≤ 5 ^ finrank ℝ V * t⁻¹ * ∫⁻ x, g x := by + have h := setLIntegral_maximal_gt_le g (fun _ => 1) ht0 + rw [maximal_const] at h + simpa only [setLIntegral_one, mul_one] using h + +/-! ### The weighted strong type -/ + +/-- The constant `C_{n,p} = p 2^p 5^n / (p - 1)` of the strong type bound +`∫ (M g)^p w ≤ C_{n,p} ∫ g^p M w`. -/ +noncomputable def maximalConst (n : ℕ) (p : ℝ) : ℝ≥0∞ := + ENNReal.ofReal p * 2 ^ p * 5 ^ n * (ENNReal.ofReal (p - 1))⁻¹ + +/-- `maximalConst n p` is finite for `p > 1`. -/ +theorem maximalConst_ne_top {n : ℕ} {p : ℝ} (hp : 1 < p) : maximalConst n p ≠ ∞ := by + refine ENNReal.mul_ne_top (ENNReal.mul_ne_top (ENNReal.mul_ne_top ENNReal.ofReal_ne_top ?_) + (ENNReal.pow_ne_top ENNReal.ofNat_ne_top)) ?_ + · exact ENNReal.two_rpow_ne_top _ + · exact ENNReal.inv_ne_top.2 (ENNReal.ofReal_pos.2 (by linarith)).ne' + +/-- **Cutting `g` at the height `s`**: `M g ≤ M (1_{g > s} g) + s` for measurable `g`, since +`g ≤ 1_{g > s} g + s`. -/ +theorem maximal_le_maximal_indicator_add {g : V → ℝ≥0∞} (hg : Measurable g) (s : ℝ≥0∞) + (x : V) : maximal g x ≤ maximal ({y | s < g y}.indicator g) x + s := by + have hle : g ≤ {y | s < g y}.indicator g + fun _ => s := fun y => by + by_cases hy : y ∈ {y | s < g y} + · rw [Pi.add_apply, Set.indicator_of_mem hy]; exact le_self_add + · rw [Pi.add_apply, Set.indicator_of_notMem hy, zero_add]; exact not_lt.1 hy + calc maximal g x ≤ maximal ({y | s < g y}.indicator g + fun _ => s) x := maximal_mono hle x + _ ≤ maximal ({y | s < g y}.indicator g) x + maximal (fun _ => s) x := + maximal_add_le ((hg.indicator (measurableSet_lt measurable_const hg)).aemeasurable) _ x + _ = _ := by rw [maximal_const] + +/-- The weighted level sets of `M g` for measurable `g`: +`∫_{M g > s} w ≤ 2 · 5^n s⁻¹ ∫_{g > s/2} g M w` for `s > 0`, by the weighted weak type +applied to `1_{g > s/2} g`. -/ +theorem setLIntegral_maximal_gt_le_indicator {g : V → ℝ≥0∞} (hg : Measurable g) + (w : V → ℝ≥0∞) {s : ℝ≥0∞} (hs0 : 0 < s) : + ∫⁻ x in {x | s < maximal g x}, w x ≤ + 5 ^ finrank ℝ V * 2 * s⁻¹ * ∫⁻ x, {y | s / 2 < g y}.indicator g x * maximal w x := by + have hsub : {x | s < maximal g x} ⊆ + {x | s / 2 < maximal ({y | s / 2 < g y}.indicator g) x} := fun x (hx : s < _) => by + change s / 2 < _ + refine lt_of_not_ge fun hle => lt_irrefl s ?_ + calc s < maximal g x := hx + _ ≤ maximal ({y | s / 2 < g y}.indicator g) x + s / 2 := + maximal_le_maximal_indicator_add hg (s / 2) x + _ ≤ s / 2 + s / 2 := by gcongr + _ = s := ENNReal.add_halves s + have hinv : (s / 2)⁻¹ = 2 * s⁻¹ := by + rw [ENNReal.inv_div (Or.inl ENNReal.ofNat_ne_top) (Or.inl two_ne_zero), div_eq_mul_inv] + calc ∫⁻ x in {x | s < maximal g x}, w x + ≤ ∫⁻ x in {x | s / 2 < maximal ({y | s / 2 < g y}.indicator g) x}, w x := + lintegral_mono_set hsub + _ ≤ 5 ^ finrank ℝ V * (s / 2)⁻¹ * + ∫⁻ x, {y | s / 2 < g y}.indicator g x * maximal w x := + setLIntegral_maximal_gt_le _ w (ENNReal.half_pos hs0.ne') + _ = _ := by rw [hinv]; ring + +/-- The integrand of the layer cake formula for `M g` in the measure `w dx`, for measurable `g` +and `t > 0`: `|{M g > t}|_w t^(p-1) ≤ 2 · 5^n (∫_{g > t/2} g M w) t^(p-2)`. -/ +theorem withDensity_maximal_gt_mul_le {g : V → ℝ≥0∞} (hg : Measurable g) (w : V → ℝ≥0∞) + (p : ℝ) {t : ℝ} (ht : 0 < t) : + volume.withDensity w {x | ENNReal.ofReal t < maximal g x} * ENNReal.ofReal (t ^ (p - 1)) ≤ + 5 ^ finrank ℝ V * 2 * ((∫⁻ x, {y | ENNReal.ofReal t / 2 < g y}.indicator g x * + maximal w x) * ENNReal.ofReal (t ^ (p - 2))) := by + have hpow : (ENNReal.ofReal t)⁻¹ * ENNReal.ofReal (t ^ (p - 1)) = + ENNReal.ofReal (t ^ (p - 2)) := by + rw [show p - 1 = 1 + (p - 2) by ring, Real.rpow_add ht, Real.rpow_one, + ENNReal.ofReal_mul ht.le, ← mul_assoc, + ENNReal.inv_mul_cancel (ENNReal.ofReal_pos.2 ht).ne' ENNReal.ofReal_ne_top, one_mul] + rw [withDensity_apply' w] + calc (∫⁻ x in {x | ENNReal.ofReal t < maximal g x}, w x) * ENNReal.ofReal (t ^ (p - 1)) + ≤ 5 ^ finrank ℝ V * 2 * (ENNReal.ofReal t)⁻¹ * + (∫⁻ x, {y | ENNReal.ofReal t / 2 < g y}.indicator g x * maximal w x) * + ENNReal.ofReal (t ^ (p - 1)) := by + gcongr + exact setLIntegral_maximal_gt_le_indicator hg w (ENNReal.ofReal_pos.2 ht) + _ = 5 ^ finrank ℝ V * 2 * ((∫⁻ x, {y | ENNReal.ofReal t / 2 < g y}.indicator g x * + maximal w x) * ((ENNReal.ofReal t)⁻¹ * ENNReal.ofReal (t ^ (p - 1)))) := by ring + _ = _ := by rw [hpow] + +omit [NormedAddCommGroup V] [InnerProductSpace ℝ V] [FiniteDimensional ℝ V] [BorelSpace V] in +/-- The function `(t, x) ↦ 1_{g > t/2}(x) g(x)` is measurable on `ℝ × V` for measurable `g`. -/ +theorem measurable_indicator_half_lt {g : V → ℝ≥0∞} (hg : Measurable g) : + Measurable fun q : ℝ × V => {y | ENNReal.ofReal q.1 / 2 < g y}.indicator g q.2 := by + have h : (fun q : ℝ × V => {y | ENNReal.ofReal q.1 / 2 < g y}.indicator g q.2) = + {q : ℝ × V | ENNReal.ofReal q.1 / 2 < g q.2}.indicator (fun q => g q.2) := by + funext q + by_cases hq : ENNReal.ofReal q.1 / 2 < g q.2 + · rw [Set.indicator_of_mem (show q.2 ∈ {y | ENNReal.ofReal q.1 / 2 < g y} from hq), + Set.indicator_of_mem (show q ∈ {q : ℝ × V | ENNReal.ofReal q.1 / 2 < g q.2} from hq)] + · rw [Set.indicator_of_notMem (show q.2 ∉ {y | ENNReal.ofReal q.1 / 2 < g y} from hq), + Set.indicator_of_notMem (show q ∉ {q : ℝ × V | ENNReal.ofReal q.1 / 2 < g q.2} from hq)] + rw [h] + exact (hg.comp measurable_snd).indicator (measurableSet_lt + ((ENNReal.measurable_ofReal.comp measurable_fst).div_const 2) (hg.comp measurable_snd)) + +/-- The **Tonelli step** of the strong type bound: for measurable `g, v : V → [0, ∞]` and +`p > 1`, `∫_0^∞ (∫_{g > t/2} g v) t^(p-2) dt = 2^(p-1)/(p-1) ∫ g^p v`. -/ +theorem lintegral_Ioi_lintegral_indicator_mul_rpow {g v : V → ℝ≥0∞} (hg : Measurable g) + (hv : Measurable v) {p : ℝ} (hp : 1 < p) : + ∫⁻ t in Ioi (0 : ℝ), (∫⁻ x, {y | ENNReal.ofReal t / 2 < g y}.indicator g x * v x) * + ENNReal.ofReal (t ^ (p - 2)) = + 2 ^ (p - 1) / ENNReal.ofReal (p - 1) * ∫⁻ x, g x ^ p * v x := by + have hc : (2 : ℝ≥0∞) ^ (p - 1) / ENNReal.ofReal (p - 1) ≠ ∞ := + ENNReal.div_ne_top (ENNReal.two_rpow_ne_top _) + (ENNReal.ofReal_pos.2 (by linarith)).ne' + have hF : AEMeasurable (Function.uncurry fun (t : ℝ) (x : V) => + {y | ENNReal.ofReal t / 2 < g y}.indicator g x * v x * ENNReal.ofReal (t ^ (p - 2))) + ((volume.restrict (Ioi (0 : ℝ))).prod volume) := + (((measurable_indicator_half_lt hg).mul (hv.comp measurable_snd)).mul + (ENNReal.measurable_ofReal.comp (measurable_fst.pow_const _))).aemeasurable + have hpt : ∀ (t : ℝ) (x : V), {y | ENNReal.ofReal t / 2 < g y}.indicator g x * v x = + {s : ℝ | ENNReal.ofReal s / 2 < g x}.indicator (fun _ => g x * v x) t := fun t x => by + by_cases ht : ENNReal.ofReal t / 2 < g x + · rw [Set.indicator_of_mem (show x ∈ {y | ENNReal.ofReal t / 2 < g y} from ht), + Set.indicator_of_mem (show t ∈ {s : ℝ | ENNReal.ofReal s / 2 < g x} from ht)] + · rw [Set.indicator_of_notMem (show x ∉ {y | ENNReal.ofReal t / 2 < g y} from ht), + Set.indicator_of_notMem (show t ∉ {s : ℝ | ENNReal.ofReal s / 2 < g x} from ht), zero_mul] + simp_rw [← lintegral_mul_const' _ _ ENNReal.ofReal_ne_top] + rw [lintegral_lintegral_swap hF] + simp_rw [hpt, lintegral_Ioi_indicator_half_lt_mul_rpow _ _ hp] + exact lintegral_const_mul' _ _ hc + +/-- The **weighted strong type** for measurable `g` and `w`: `∫ (M g)^p w ≤ C_{n,p} ∫ g^p M w` +for `p > 1`, the case of `Rd.lintegral_maximal_rpow_mul_le` before `g` and `w` are replaced by +measurable representatives. -/ +theorem lintegral_maximal_rpow_mul_le_of_measurable {g w : V → ℝ≥0∞} (hg : Measurable g) + (hw : Measurable w) {p : ℝ} (hp : 1 < p) : + ∫⁻ x, maximal g x ^ p * w x ≤ maximalConst (finrank ℝ V) p * ∫⁻ x, g x ^ p * maximal w x := by + have hc : (5 : ℝ≥0∞) ^ finrank ℝ V * 2 ≠ ∞ := + ENNReal.mul_ne_top (ENNReal.pow_ne_top ENNReal.ofNat_ne_top) ENNReal.ofNat_ne_top + calc ∫⁻ x, maximal g x ^ p * w x + = ∫⁻ x, maximal g x ^ p ∂(volume.withDensity w) := by + rw [lintegral_withDensity_eq_lintegral_mul volume hw + ((measurable_maximal g).pow_const p)] + congr 1; funext x; exact mul_comm _ _ + _ = ENNReal.ofReal p * ∫⁻ t in Ioi (0 : ℝ), + volume.withDensity w {x | ENNReal.ofReal t < maximal g x} * + ENNReal.ofReal (t ^ (p - 1)) := + lintegral_rpow_eq_lintegral_meas_lt_mul_ennreal _ (measurable_maximal g).aemeasurable + (by linarith) + _ ≤ ENNReal.ofReal p * ∫⁻ t in Ioi (0 : ℝ), 5 ^ finrank ℝ V * 2 * + ((∫⁻ x, {y | ENNReal.ofReal t / 2 < g y}.indicator g x * maximal w x) * + ENNReal.ofReal (t ^ (p - 2))) := + mul_le_mul_right (setLIntegral_mono' measurableSet_Ioi fun t ht => + withDensity_maximal_gt_mul_le hg w p ht) _ + _ = ENNReal.ofReal p * (5 ^ finrank ℝ V * 2 * + (2 ^ (p - 1) / ENNReal.ofReal (p - 1) * ∫⁻ x, g x ^ p * maximal w x)) := by + rw [lintegral_const_mul' _ _ hc, + lintegral_Ioi_lintegral_indicator_mul_rpow hg (measurable_maximal w) hp] + _ = _ := by + rw [maximalConst, ENNReal.rpow_eq_mul_rpow_sub_one 2 hp.le, div_eq_mul_inv]; ring + +/-- **Weighted strong type of the maximal function** (Fefferman–Stein): for `1 < p < ∞` and +almost everywhere measurable `g, w : V → [0, ∞]`, `∫ (M g)^p w ≤ C_{n,p} ∫ g^p M w` with +`C_{n,p} = p 2^p 5^n / (p - 1)`. The bound holds for every such `g` and `w`, with both sides +possibly infinite. The proof is the layer cake formula in the measure `w dx`, the weighted weak +type for the part of `g` above half the height, and Tonelli's theorem. -/ +theorem lintegral_maximal_rpow_mul_le {g w : V → ℝ≥0∞} (hg : AEMeasurable g volume) + (hw : AEMeasurable w volume) {p : ℝ} (hp : 1 < p) : + ∫⁻ x, maximal g x ^ p * w x ≤ maximalConst (finrank ℝ V) p * ∫⁻ x, g x ^ p * maximal w x := by + calc ∫⁻ x, maximal g x ^ p * w x = ∫⁻ x, maximal (hg.mk g) x ^ p * hw.mk w x := by + rw [maximal_congr_ae hg.ae_eq_mk] + exact lintegral_congr_ae (hw.ae_eq_mk.mono fun x hx => by simp only [hx]) + _ ≤ maximalConst (finrank ℝ V) p * ∫⁻ x, hg.mk g x ^ p * maximal (hw.mk w) x := + lintegral_maximal_rpow_mul_le_of_measurable hg.measurable_mk hw.measurable_mk hp + _ = _ := by + rw [← maximal_congr_ae hw.ae_eq_mk] + congr 1 + exact lintegral_congr_ae (hg.ae_eq_mk.mono fun x hx => by simp only [hx]) + +/-- `C_{n,p} = p 2^p 5^n / (p - 1)` is positive for `p > 0`. -/ +theorem maximalConst_ne_zero {n : ℕ} {p : ℝ} (hp : 0 < p) : maximalConst n p ≠ 0 := by + refine mul_ne_zero (mul_ne_zero (mul_ne_zero (ENNReal.ofReal_pos.2 hp).ne' ?_) + (pow_ne_zero _ (by norm_num))) (ENNReal.inv_ne_zero.2 ENNReal.ofReal_ne_top) + exact (ENNReal.rpow_pos (by norm_num) ENNReal.ofNat_ne_top).ne' + +/-- The **Hardy–Littlewood maximal theorem**: `‖M g‖_p ≤ C_{n,p}^{1/p} ‖g‖_p` for +`1 < p < ∞` and every `g : V → [0, ∞]` (the weight `w = 1`). -/ +theorem eLpNorm_maximal_le (g : V → ℝ≥0∞) {p : ℝ≥0∞} (hp1 : 1 < p) (hp : p ≠ ∞) : + eLpNorm (maximal g) p volume ≤ + maximalConst (finrank ℝ V) p.toReal ^ (1 / p.toReal) * eLpNorm g p volume := by + have hp0 : p ≠ 0 := (zero_lt_one.trans hp1).ne' + have hpr : 1 < p.toReal := ENNReal.one_lt_toReal hp1 hp + by_cases hg : AEStronglyMeasurable g volume + · have h := lintegral_maximal_rpow_mul_le (w := fun _ => (1 : ℝ≥0∞)) hg.aemeasurable + aemeasurable_const hpr + rw [maximal_const] at h + simp only [mul_one] at h + rw [eLpNorm_eq_lintegral_rpow_eNorm_toReal hp0 hp (measurable_maximal g).aestronglyMeasurable, + eLpNorm_eq_lintegral_rpow_eNorm_toReal hp0 hp hg] + simp only [eNorm_eq_self] + rw [← ENNReal.mul_rpow_of_nonneg _ _ (by positivity)] + exact ENNReal.rpow_le_rpow h (by positivity) + · have hC : maximalConst (finrank ℝ V) p.toReal ^ (1 / p.toReal) ≠ 0 := + (ENNReal.rpow_pos (pos_iff_ne_zero.2 (maximalConst_ne_zero (zero_lt_one.trans hpr))) + (maximalConst_ne_top hpr)).ne' + rw [eLpNorm_of_not_aestronglyMeasurable hg, ENNReal.mul_top hC] + exact le_top + +/-- The maximal function of `g ∈ L_p`, `1 < p < ∞`, is **finite almost everywhere**. -/ +theorem maximal_lt_top_ae {g : V → ℝ≥0∞} {p : ℝ≥0∞} (hp1 : 1 < p) (hp : p ≠ ∞) + (hgp : eLpNorm g p volume ≠ ∞) : ∀ᵐ x ∂volume, maximal g x < ∞ := by + have hp0 : p ≠ 0 := (zero_lt_one.trans hp1).ne' + have hpr : 0 < p.toReal := zero_lt_one.trans (ENNReal.one_lt_toReal hp1 hp) + have hlt : eLpNorm (maximal g) p volume ≠ ∞ := + ne_top_of_le_ne_top (ENNReal.mul_ne_top (ENNReal.rpow_ne_top_of_nonneg (by positivity) + (maximalConst_ne_top (ENNReal.one_lt_toReal hp1 hp))) hgp) (eLpNorm_maximal_le g hp1 hp) + have hint : ∫⁻ x, maximal g x ^ p.toReal ≠ ∞ := by + rw [← eLpNorm_rpow_eq_lintegral hp0 hp (measurable_maximal g).aemeasurable] + exact ENNReal.rpow_ne_top_of_nonneg hpr.le hlt + filter_upwards [ae_lt_top ((measurable_maximal g).pow_const _) hint] with x hx + exact (ENNReal.rpow_lt_top_iff_of_pos hpr).1 hx + +/-- The **`p = ∞` bound**: `M g ≤ ‖g‖_∞` everywhere. -/ +theorem maximal_le_eLpNorm_top (g : V → ℝ≥0∞) (x : V) : maximal g x ≤ eLpNorm g ∞ volume := by + by_cases hg : AEStronglyMeasurable g volume + · rw [eLpNorm_exponent_top hg] + exact maximal_le_of_ae_le ((ae_le_eLpNormEssSup (f := g)).mono fun y hy => by simpa using hy) x + · rw [eLpNorm_of_not_aestronglyMeasurable hg] + exact le_top + +end Rd diff --git a/LeanPool/FunctionSpaces/ApproximationSpaces.lean b/LeanPool/FunctionSpaces/ApproximationSpaces.lean new file mode 100644 index 0000000000..457d0b2eb5 --- /dev/null +++ b/LeanPool/FunctionSpaces/ApproximationSpaces.lean @@ -0,0 +1,231 @@ +/- +Copyright (c) 2026 Mario Ullrich. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Mario Ullrich +-/ +module + +public import LeanPool.FunctionSpaces.ApproximationSpaces.Scheme +public import LeanPool.FunctionSpaces.ApproximationSpaces.Error +public import LeanPool.FunctionSpaces.ApproximationSpaces.Instances.Span +public import LeanPool.FunctionSpaces.ApproximationSpaces.Instances.NTerm +public import LeanPool.FunctionSpaces.ApproximationSpaces.Instances.NTermHilbertBasis +public import LeanPool.FunctionSpaces.ApproximationSpaces.Norm +public import LeanPool.FunctionSpaces.ApproximationSpaces.Dyadic +public import LeanPool.FunctionSpaces.ApproximationSpaces.Space +public import LeanPool.FunctionSpaces.ApproximationSpaces.Sequences.Lq +public import LeanPool.FunctionSpaces.ApproximationSpaces.Sequences.Dyadic +public import LeanPool.FunctionSpaces.ApproximationSpaces.Sequences.Hardy +public import LeanPool.FunctionSpaces.ApproximationSpaces.Sequences.Rearrangement +public import LeanPool.FunctionSpaces.ApproximationSpaces.Embedding +public import LeanPool.FunctionSpaces.ApproximationSpaces.Transfer +public import LeanPool.FunctionSpaces.ApproximationSpaces.Lift +public import LeanPool.FunctionSpaces.ApproximationSpaces.Nikolskii +public import LeanPool.FunctionSpaces.ApproximationSpaces.Jackson +public import LeanPool.FunctionSpaces.ApproximationSpaces.Interpolation.KFunctional +public import LeanPool.FunctionSpaces.ApproximationSpaces.Interpolation.Representation +public import LeanPool.FunctionSpaces.ApproximationSpaces.Interpolation.KMethod +public import LeanPool.FunctionSpaces.ApproximationSpaces.Interpolation.Couple +public import LeanPool.FunctionSpaces.ApproximationSpaces.Interpolation.Property +public import LeanPool.FunctionSpaces.ApproximationSpaces.Interpolation.Reiteration +public import LeanPool.FunctionSpaces.ApproximationSpaces.Interpolation.ApproxSpaces +public import LeanPool.FunctionSpaces.ApproximationSpaces.Interpolation.EFunctional +public import LeanPool.FunctionSpaces.ApproximationSpaces.Interpolation.EFunctionalModuli +public import LeanPool.FunctionSpaces.ApproximationSpaces.Decompositions.Projection +public import LeanPool.FunctionSpaces.ApproximationSpaces.Decompositions.Blocks +public import LeanPool.FunctionSpaces.ApproximationSpaces.Decompositions.Synthesis +public import LeanPool.FunctionSpaces.ApproximationSpaces.Decompositions.Atomic +public import LeanPool.FunctionSpaces.ApproximationSpaces.Trace +public import LeanPool.FunctionSpaces.ApproximationSpaces.Retract +public import LeanPool.FunctionSpaces.ApproximationSpaces.Moduli + +/- +Modified for Lean Pool: module names and imports adapted. +-/ + +/-! +# Approximation spaces + +This library is the abstract theory of approximation spaces in the sense of Pietsch +(J. Approx. Theory 32, 1981), together with real interpolation by the K-method. + +**Approximation schemes.** An approximation scheme is an increasing sequence of sets +`A 0 ⊆ A 1 ⊆ A 2 ⊆ ⋯` in a real normed space `X`, with `A 0 = {0}`, `c • A n ⊆ A n` and +`A m + A n ⊆ A (m + n)`. The elements of `A n` are the approximants of complexity `n`: +polynomials of degree `< n`, combinations of the first `n` elements of a basis, or combinations +of at most `n` elements of a dictionary. The error of best approximation of `f ∈ X` from `A n` is + +`E_n(f) = inf { ‖f - a‖ : a ∈ A n }`. + +**Approximation spaces.** For a smoothness `s > 0` and a fine index `1 ≤ q ≤ ∞`, the space +`A^s_q` consists of the `f` whose errors decay at the rate `n^(-s)`, measured in `ℓ_q`: + +`‖f‖_{A^s_q} = ‖(n^(s - 1/q) E_{n-1}(f))_{n ≥ 1}‖_{ℓ_q} < ∞`. + +So smoothness becomes a rate of approximation. Two inequalities link the spaces `A^s_q` to +classical spaces such as Besov spaces. Jackson's inequality says that smooth elements are well +approximated. Bernstein's inequality says that approximants are smooth, with controlled norm. + +**Real interpolation.** For a smaller space `Y` inside `X`, the K-functional +`K(t, f) = inf_y (‖f - y‖_X + t ‖y‖_Y)` measures how well `f` is approximated by elements of `Y` +of controlled size. The K-method builds from it the interpolation spaces `(X, Y)_{θ,q}`. Under +Jackson's and Bernstein's inequalities of order `r`, the representation theorem gives + +`A^s_q = (X, Y)_{s/r,q}` for `0 < s < r`. + +Hence theorems about interpolation spaces, such as the reiteration theorem, apply to +approximation spaces. + +**Setting.** Everything here is abstract. The schemes live in real normed spaces, and the +couples of the interpolation part live on additive commutative groups. No function spaces +occur, and the only measures are the counting measure behind the `ℓ_q` norms, Lebesgue measure on +`(0, ∞)` in the layer cake formula for sums, and `dt/t` on `(0, ∞)` in the continuous K-method. +One concrete scheme is treated here, since it needs only a Hilbert basis: best `n`-term +approximation, with the theorem of Stechkin and DeVore. The library `FunctionSpaces` applies the +theory to concrete schemes of functions. + +## Layout + +The files at the top level hold the schemes, the spaces `A^s_q` and the theorems about them. The +subfolders hold the basic examples of schemes (`Instances`), the sequence spaces +(`Sequences`), real interpolation (`Interpolation`) and decompositions (`Decompositions`). Names +below are relative to the namespace `ApproximationScheme`, except those that start with `ENNReal`, +`MeasureTheory`, `InterpCouple`, `HilbertBasis` or `lp`, and the decreasing rearrangement, which is +in the root namespace. + +### The scheme and the error + +* `ApproximationSpaces.Scheme`: the structure `ApproximationScheme` and its elementary + consequences, the preimage `comap` and the image `map` of a scheme under a linear map, the + scheme `ofSubmodules` of an increasing sequence of subspaces, and the dyadic scheme + `ofMonotoneSubmodules`, with the `k`-th subspace at complexity `2^k`. +* `ApproximationSpaces.Error`: the error `E_n(f)`, `approxError`, with values in `ℝ≥0∞`, and + its calculus: `E_0(f) = ‖f‖`, monotonicity in `n`, homogeneity, subadditivity, near-best + approximants, the limit `E_n(f) → 0` exactly on the closure of `⋃ A n` + (`tendsto_approxError_zero_iff`), the bound for linear maps (`approxError_map_le`), the + extension of modulus bounds from a dense set (`approxError_le_of_dense`) and the Lebesgue + inequality. + +### Examples of schemes (`Instances/`) + +* `ApproximationSpaces.Instances.Span`: linear approximation from the first `n` elements of a + sequence, `ofSpan`. Its errors tend to zero exactly on the closed span. +* `ApproximationSpaces.Instances.NTerm`: nonlinear `n`-term approximation from a dictionary, + `nTerm`. Its errors are at most those of `ofSpan` (`approxError_nTerm_le_ofSpan`). +* `ApproximationSpaces.Instances.NTermHilbertBasis`: best `n`-term approximation from a Hilbert + basis of a complex Hilbert space, with the dictionary `HilbertBasis.coeffDictionary` of + multiples of the basis vectors: the error as the smallest tail of the coefficients + (`HilbertBasis.approxError_nTerm_sq_eq`), tail bounds by the rearranged coefficients, and + the theorem of Stechkin and DeVore, `f ∈ A^(1/τ - 1/2)_τ` iff `(⟨e_i, f⟩)_i ∈ ℓ_τ` for + `0 < τ < 2` (`HilbertBasis.memApprox_nTerm_iff`). + +### The spaces `A^s_q` and their dyadic norm + +* `ApproximationSpaces.Norm`: Pietsch's quasi-norm `approxNorm` of `A^s_q`, membership + `MemApprox`, homogeneity, and the embedding `‖f‖ ≤ ‖f‖_{A^s_q}` for every `q ≠ 0` + (`enorm_le_approxNorm`). +* `ApproximationSpaces.Dyadic`: the equivalent dyadic quasi-norm + `‖f‖ + ‖(2^(ks) E_{2^k}(f))_k‖_{ℓ_q}`, `approxNormDyadic`, the working norm of all later files; + the equivalence holds for every `q ∈ (0, ∞]` (`memApprox_iff_approxNormDyadic_lt_top'`). +* `ApproximationSpaces.Space`: the quasi-triangle inequality and `A^s_q` as a submodule of `X`, + `approxSpace`. + +### Sequence spaces (`Sequences/`) + +* `ApproximationSpaces.Sequences.Lq`: sums of powers in `[0, ∞]` (`ENNReal.rpow_tsum_le_tsum_rpow`), + the `ℓ_q` norm `ENNReal.lqNorm` of a sequence in `ℝ≥0∞`, defined as the `L_q` norm for the + counting measure, with its monotonicity in `q`, the quasi-triangle inequality for `q < 1` + (`ENNReal.lqNorm_add_le'`), the Cauchy–Schwarz inequality, the dyadic weights + `ENNReal.dyadicWeight`, powers of two and products in `[0, ∞]`, `L_q` norms of functions + bounded on pieces, the subadditivity of `‖·‖_p^p` for `0 < p ≤ 1` + (`MeasureTheory.eLpNorm_add_rpow_le_of_le_one`), and Parseval's identity for `ℓ²` in `ℝ≥0∞` + (`lp.enorm_sq_eq_tsum`). +* `ApproximationSpaces.Sequences.Dyadic`: Cauchy condensation with power weights + (`ENNReal.tsum_pow_mul_le_dyadic`) and for capped sequences (`ENNReal.tsum_min_le_dyadic`), + three sums over dyadic scales, and the interpolation inequality for dyadic suprema + (`ENNReal.tsum_dyadicWeight_mul_le_iSup`). +* `ApproximationSpaces.Sequences.Rearrangement`: the decreasing rearrangement + `TauCeti.decreasingRearrangement` of a nonnegative null family (copied from TauCeti), the + layer cake + formula for sums, `∑_n (r*_n)^p = ∑_i r_i^p` (`tsum_ofReal_rpow_decreasingRearrangement`), and + the block inequalities that compare `∑_i r_i^p` with `∑_l 2^l (r*_{2^l})^p`. +* `ApproximationSpaces.Sequences.Hardy`: the countable Minkowski inequality, window sums + (`ENNReal.lqNorm_sum_Icc_le`), the two discrete Hardy inequalities (`ENNReal.hardy_sum_le`, + `ENNReal.hardy_tail_le`), their forms for `0 < q ≤ 1` (`ENNReal.hardy_tail_le_of_le_one`) and + for every exponent (`ENNReal.hardy_sum_le'`), powers inside an `ℓ_q` norm + (`ENNReal.lqNorm_fun_rpow`, `ENNReal.lqNorm_div_fun_rpow`), almost diagonal sums and their + constant `ENNReal.almostDiagonalConst`, shifts on `ℓ_q(ℤ)` and geometric convolutions. + +### Embeddings, transfer and lifting + +* `ApproximationSpaces.Embedding`: the embeddings `A^s_q ↪ A^s_r` for `q ≤ r` and + `A^s_q ↪ A^t_r` for `t < s` (`MemApprox.mono`). +* `ApproximationSpaces.Transfer`: a bounded linear map `T` with `T (A n) ⊆ B n` maps `A^s_q(X)` + into `B^s_q(Y)` with norm at most `‖T‖` (`approxNorm_map_le`). +* `ApproximationSpaces.Lift`: lifting bounds `LiftBound` (Bernstein's and Nikolskii's + inequalities), dyadic near-best approximants `DyadicApprox`, and the telescoping construction. + A lifting bound of exponent `β` gives `A^β_1 ↪ Y` (`exists_preimage_of_liftBound`). +* `ApproximationSpaces.Nikolskii`: the Nikolskii transfer theorem `A^s_q(X) ↪ B^{s-α}_q(Y)` for + `0 ≤ α < s` (`exists_preimage_of_nikolskii`). + +### Jackson inequalities and smoothness spaces + +* `ApproximationSpaces.Jackson`: Jackson's inequality `JacksonBound`, which gives + `ι(Y) ⊆ A^r_∞`, and smoothness spaces `SmoothnessSpace`, with `A^r_1 ⊆ ι(Y) ⊆ A^r_∞`. + +### Real interpolation (`Interpolation/`) + +* `ApproximationSpaces.Interpolation.KFunctional`: the K-functional `kFunctional` of a bounded + linear map `ι : Y → X` and the spaces `(X, Y)_{θ,q}` of the discrete K-method (`interpNorm`, + `MemInterp`). +* `ApproximationSpaces.Interpolation.Representation`: the representation theorem + `A^s_q = (X, Y)_{s/r,q}` under Jackson's and Bernstein's inequalities of order `r` + (`approxSpace_eq_interpSpace`). +* `ApproximationSpaces.Interpolation.KMethod`: the continuous K-method `kMethodNorm` and its + equivalence with the discrete K-method on every dyadic grid (Bergh–Löfström, Lemma 3.1.3; + `memInterp_iff_memKMethod`). +* `ApproximationSpaces.Interpolation.Couple`: couples `InterpCouple` of two extended quasi-norms + on an abelian group, their K-functional and K-methods, and the couple `InterpCouple.ofMap ι` + of a bounded linear map. +* `ApproximationSpaces.Interpolation.Property`: the interpolation property of the K-method, + exact of exponent `θ` (`InterpCouple.kMethodNorm_map_le`), comparable couples and retracts. +* `ApproximationSpaces.Interpolation.Reiteration`: Holmstedt's formula in discrete form and the + reiteration theorem `((X₀, X₁)_{θ₀,q₀}, (X₀, X₁)_{θ₁,q₁})_{η,q} = (X₀, X₁)_{(1-η)θ₀+ηθ₁,q}` + (`InterpCouple.memKMethod_kCouple_iff`). +* `ApproximationSpaces.Interpolation.ApproxSpaces`: approximation spaces as interpolation + spaces, `A^s_q = (X, A^r_∞)_{s/r,q}` for every scheme (`memApprox_iff_memKMethod_reprCouple`), + their reiteration (`memKMethod_approxCouple_iff`) and the sandwich principle. +* `ApproximationSpaces.Interpolation.EFunctional`: the E-functional + `E(t, u) = inf {N₀(u - b) : N₁(b) ≤ t}` of a couple (`InterpCouple.eFunctional`), its + approximation spaces `E_{α,q}` (`InterpCouple.eMethodNorm`, `InterpCouple.MemEMethod`) and their + dyadic norm `InterpCouple.eNormDyadic` (Bergh–Löfström, Section 7.1), the complexity couple of a + sequence of sets and of increasing subgroups (`InterpCouple.ofMonotoneSubgroups`), and + `E_{s,q} = A^s_q` for the complexity couple of a scheme + (`memEMethod_complexityCouple_iff`). +* `ApproximationSpaces.Interpolation.EFunctionalModuli`: moduli of smoothness compatible with a + couple whose first norm has a subadditive `ρ`-th power (`InterpCouple.ModulusData`), and the + coincidence of `E_{s,q}` with the classical space for `0 < s < θ` + (`InterpCouple.ModulusData.memEMethod_iff_modNorm_lt_top`), as for `L_p`, `0 < p < 1`. + +### Decompositions (`Decompositions/`) + +* `ApproximationSpaces.Decompositions.Projection`: schemes with uniformly bounded projections + `ProjectionScheme` and the characterisation of `A^s_q` by dyadic blocks. +* `ApproximationSpaces.Decompositions.Blocks`: the characterisation of `A^s_q` by block + decompositions `f = ∑ g_k` with `g_k ∈ A (2^k)` (`memApprox_iff_blockDecompNorm_lt_top`). +* `ApproximationSpaces.Decompositions.Synthesis`: linear schemes `IsLinear` and synthesis from + blocks that are approximable at rate `σ` (`approxNormDyadic_le_of_hasSum_decay`). +* `ApproximationSpaces.Decompositions.Atomic`: atomic systems `AtomicSystem`, the sequence + spaces `b^s_{p,q}` and the atomic characterisation of `A^s_q` + (`AtomicSystem.memApprox_iff_exists_atomic`). + +### Traces, retracts and moduli of smoothness + +* `ApproximationSpaces.Trace`: maps controlled only on the approximants (`TraceBound`), their + extension to `A^β_1`, the transfer `A^s_q(X) → B^{s-β}_q(Y)` and its surjectivity. +* `ApproximationSpaces.Retract`: approximation-preserving extensions `ApproxExtension` and the + equivalence of intrinsic and restriction quasi-norms (`memApprox_iff_exists_restrict`). +* `ApproximationSpaces.Moduli`: moduli of smoothness compatible with a scheme (`ModulusData`), + the coincidence of `A^s_q` with the classical space for `0 < s < θ`, and the interpolation of + the classical spaces. +-/ diff --git a/LeanPool/FunctionSpaces/ApproximationSpaces/Decompositions/Atomic.lean b/LeanPool/FunctionSpaces/ApproximationSpaces/Decompositions/Atomic.lean new file mode 100644 index 0000000000..5197d4093b --- /dev/null +++ b/LeanPool/FunctionSpaces/ApproximationSpaces/Decompositions/Atomic.lean @@ -0,0 +1,186 @@ +/- +Copyright (c) 2026 Mario Ullrich. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Mario Ullrich +-/ +module + +public import LeanPool.FunctionSpaces.ApproximationSpaces.Decompositions.Synthesis + +/- +Modified for Lean Pool: module names and imports adapted. +-/ + +/-! +# Atomic decompositions + +An atomic decomposition writes `f = ∑_j ∑_m λ_{j,m} a_{j,m}` with atoms `a_{j,m}` of level `j` +at finitely many positions `m ∈ M j`, and measures `f` by the coefficients alone. On a domain +of dimension `d` in `L_p` the positions are the dyadic cubes of side `2^(-j)` and the +coefficients are measured in the sequence space `b^s_{p,q}`, + +`‖λ‖_{b^s_{p,q}} = ‖(2^(j(s - δ)) ‖λ_{j,·}‖_{ℓ_p})_j‖_{ℓ_q}`, `δ = d/p` + +(`ApproximationScheme.bNorm`), as in Schneider–Vybíral, *Non-smooth atomic decompositions*. + +An **atomic system** (`ApproximationScheme.AtomicSystem`) records two properties of the atoms of +one level, for all coefficients `c`: + +* **size**: `‖∑_m c_m a_m‖ ≤ C 2^(-jδ) ‖c‖_{ℓ_p}`, which expresses the normalisation and the + bounded overlap of the supports; +* **decay**: `E_{2^k}(∑_m c_m a_m) ≤ C 2^(-(k-j)σ) 2^(-jδ) ‖c‖_{ℓ_p}` for `k ≥ j`, which + expresses the smoothness `σ` of the atoms relative to the scheme (for instance `σ = 1` for + atoms with a Lipschitz bound and trigonometric approximation in `L_2`). + +**Synthesis** (`AtomicSystem.approxNormDyadic_le_bNorm`): for a linear scheme and `0 < s < σ`, +every atomic sum lies in `A^s_q` with `‖f‖_{A^s_q} ≲ ‖λ‖_{b^s_{p,q}}`; this is synthesis with +decay (`ApproximationSpaces.Decompositions.Synthesis`) with `ε_j = C 2^(-jδ) ‖λ_j‖_{ℓ_p}`. + +**Analysis** (`AtomicSystem.exists_atomic_decomposition`): if every approximant +`x ∈ A (2^j)` expands in atoms of level `j` with `‖c‖_{ℓ_p} ≤ C' 2^(jδ) ‖x‖` +(`AtomicSystem.StableExpansion`, a stable local basis such as the Haar functions), then every +`f ∈ A^s_q`, `s > 0`, has an atomic decomposition with `‖λ‖_{b^s_{p,q}} ≲ ‖f‖_{A^s_q}`: expand +the blocks of a block decomposition of `f`. Together: +`A^s_q` is the space of atomic sums with coefficients in `b^s_{p,q}` +(`AtomicSystem.memApprox_iff_exists_atomic`). +-/ + +@[expose] public section + +open Filter Topology Finset +open scoped ENNReal + +namespace ApproximationScheme + +open ENNReal (lqNorm dyadicWeight) + +variable {X : Type*} [NormedAddCommGroup X] [NormedSpace ℝ X] + {A : ApproximationScheme X} {s : ℝ} {q : ℝ≥0∞} + +/-- The quasi-norm of the **sequence space** `b^s_{p,q}`: +`‖(2^(j(s - δ)) ‖λ_{j,·}‖_{ℓ_p})_j‖_{ℓ_q}` for coefficients `λ_{j,m}`, `m ∈ M j`. -/ +noncomputable def bNorm (M : ℕ → Type*) [∀ j, Fintype (M j)] [∀ j, MeasurableSpace (M j)] + (s δ : ℝ) (p q : ℝ≥0∞) + (c : ∀ j, M j → ℝ) : ℝ≥0∞ := + lqNorm q (fun j => dyadicWeight (s - δ) j * lqNorm p (fun m => ‖c j m‖ₑ)) + +/-- A **system of atoms** for the scheme `A`, with positions `M j` at level `j`, size exponent `δ` +and smoothness `σ`: admissible atoms `adm j m` (containing `0`) such that every combination +`∑_m c_m a_m` of atoms of level `j` has size `≤ C 2^(-jδ) ‖c‖_{ℓ_p}` and error +`E_{2^k} ≤ C 2^(-(k-j)σ) 2^(-jδ) ‖c‖_{ℓ_p}` for `k ≥ j`. -/ +structure AtomicSystem (A : ApproximationScheme X) (M : ℕ → Type*) [∀ j, Fintype (M j)] + [∀ j, MeasurableSpace (M j)] + (p : ℝ≥0∞) (δ σ : ℝ) where + /-- The admissible atoms of level `j` at position `m`. -/ + adm : ∀ j, M j → Set X + zero_mem : ∀ j m, (0 : X) ∈ adm j m + /-- The constant of the size and decay bounds. -/ + C : ℝ≥0∞ + C_ne_top : C ≠ ∞ + size : ∀ j (a : M j → X), (∀ m, a m ∈ adm j m) → ∀ c : M j → ℝ, + ‖∑ m, c m • a m‖ₑ ≤ C * (dyadicWeight (-δ) j * lqNorm p (fun m => ‖c m‖ₑ)) + decay : ∀ j (a : M j → X), (∀ m, a m ∈ adm j m) → ∀ c : M j → ℝ, ∀ k, j ≤ k → + A.approxError (∑ m, c m • a m) (2 ^ k) ≤ + dyadicWeight (-σ) (k - j) * (C * (dyadicWeight (-δ) j * lqNorm p (fun m => ‖c m‖ₑ))) + +namespace AtomicSystem + +variable {M : ℕ → Type*} [∀ j, Fintype (M j)] [∀ j, MeasurableSpace (M j)] {p : ℝ≥0∞} + {δ σ : ℝ} + (AS : A.AtomicSystem M p δ σ) + +/-- The constant `(2 (1 - 2^(-s))⁻¹ + (1 - 2^(-(σ-s)))⁻¹) C` of atomic synthesis. -/ +noncomputable def synthConst (s : ℝ) : ℝ≥0∞ := + (2 * (1 - (2 : ℝ≥0∞) ^ (-s))⁻¹ + (1 - (2 : ℝ≥0∞) ^ (-(σ - s)))⁻¹) * AS.C + +/-- The constant of atomic synthesis is finite for `0 < s < σ`. -/ +theorem synthConst_ne_top (hs : 0 < s) (hsσ : s < σ) : AS.synthConst s ≠ ∞ := + ENNReal.mul_ne_top (ENNReal.add_ne_top.2 ⟨ENNReal.mul_ne_top (by norm_num) + (ENNReal.one_sub_two_rpow_neg_inv_ne_top hs), + ENNReal.one_sub_two_rpow_neg_inv_ne_top (sub_pos.2 hsσ)⟩) AS.C_ne_top + +/-- **Atomic synthesis**: for a linear scheme, every atomic sum +`f = ∑_j ∑_m λ_{j,m} a_{j,m}` (series over `j` converging in `X`) satisfies +`‖f‖_{A^s_q} ≤ K ‖λ‖_{b^s_{p,q}}` in the dyadic quasi-norm, `K = synthConst s`, finite for +`0 < s < σ`. -/ +theorem approxNormDyadic_le_bNorm (hA : A.IsLinear) (hq : 1 ≤ q) {a : ∀ j, M j → X} + (ha : ∀ j m, a j m ∈ AS.adm j m) {c : ∀ j, M j → ℝ} {f : X} + (hf : HasSum (fun j => ∑ m, c j m • a j m) f) : + A.approxNormDyadic s q f ≤ AS.synthConst s * bNorm M s δ p q c := by + set ε : ℕ → ℝ≥0∞ := fun j => AS.C * (dyadicWeight (-δ) j * lqNorm p (fun m => ‖c j m‖ₑ)) + have h := approxNormDyadic_le_of_hasSum_decay (s := s) (C := 1) hA hq hf (ε := ε) + (fun j => AS.size j _ (ha j) _) (fun j k hjk => by + rw [one_mul]; exact AS.decay j _ (ha j) _ k hjk) + refine h.trans_eq ?_ + have hw : (fun j => dyadicWeight s j * ε j) = fun j => + AS.C * (dyadicWeight (s - δ) j * lqNorm p (fun m => ‖c j m‖ₑ)) := funext fun j => by + simp only [ε] + rw [show s - δ = s + -δ by ring, ENNReal.dyadicWeight_add]; ring + rw [hw, ENNReal.lqNorm_const_mul, one_mul, synthConst, bNorm] + ring + +/-- **Atomic synthesis**, membership form: atomic sums with `‖λ‖_{b^s_{p,q}} < ∞` lie in +`A^s_q`, for `0 < s < σ`. -/ +theorem memApprox_of_bNorm_lt_top (hA : A.IsLinear) (hs : 0 < s) (hsσ : s < σ) (hq : 1 ≤ q) + {a : ∀ j, M j → X} (ha : ∀ j m, a j m ∈ AS.adm j m) {c : ∀ j, M j → ℝ} {f : X} + (hf : HasSum (fun j => ∑ m, c j m • a j m) f) (hc : bNorm M s δ p q c < ∞) : + A.MemApprox s q f := + (memApprox_iff_approxNormDyadic_lt_top hq hs.le).2 + ((AS.approxNormDyadic_le_bNorm hA hq ha hf).trans_lt + (ENNReal.mul_lt_top (AS.synthConst_ne_top hs hsσ).lt_top hc)) + +/-- **Stable expansion in atoms**: every approximant `x ∈ A (2^j)` is `∑_m c_m a_m` with atoms +`a_m ∈ adm j m` of the same level and `‖c‖_{ℓ_p} ≤ C' 2^(jδ) ‖x‖`. Local bases such as the +Haar functions have this property. -/ +def StableExpansion (C' : ℝ≥0∞) : Prop := + ∀ j, ∀ x ∈ A (2 ^ j), ∃ a : M j → X, (∀ m, a m ∈ AS.adm j m) ∧ ∃ c : M j → ℝ, + x = ∑ m, c m • a m ∧ lqNorm p (fun m => ‖c m‖ₑ) ≤ C' * dyadicWeight δ j * ‖x‖ₑ + +/-- **Atomic analysis**: in a Banach space, under a stable expansion, every `f ∈ A^s_q`, `s > 0`, +is an atomic sum `f = ∑_j ∑_m λ_{j,m} a_{j,m}` with +`‖λ‖_{b^s_{p,q}} ≤ C' (3·2^s + 4·4^s) ‖f‖^dyadic_{A^s_q}`. -/ +theorem exists_atomic_decomposition [CompleteSpace X] {C' : ℝ≥0∞} + (hstab : AS.StableExpansion C') (hs : 0 < s) (hq : 1 ≤ q) {f : X} (hf : A.MemApprox s q f) : + ∃ (a : ∀ j, M j → X) (c : ∀ j, M j → ℝ), (∀ j m, a j m ∈ AS.adm j m) ∧ + HasSum (fun j => ∑ m, c j m • a j m) f ∧ + bNorm M s δ p q c ≤ C' * (3 * 2 ^ s + 4 * dyadicWeight s 2) * A.approxNormDyadic s q f := by + obtain ⟨b, hb_mem, hb_sum, -, hb_lq⟩ := exists_blocks hs hq hf + choose a ha c hc hcle using fun j => hstab j (b j) (hb_mem j) + refine ⟨a, c, ha, ?_, ?_⟩ + · have : (fun j => ∑ m, c j m • a j m) = b := funext fun j => (hc j).symm + rw [this]; exact hb_sum + · calc bNorm M s δ p q c + = lqNorm q (fun j => dyadicWeight (s - δ) j * lqNorm p (fun m => ‖c j m‖ₑ)) := rfl + _ ≤ lqNorm q (fun j => C' * (dyadicWeight s j * ‖b j‖ₑ)) := ENNReal.lqNorm_mono fun j => by + calc dyadicWeight (s - δ) j * lqNorm p (fun m => ‖c j m‖ₑ) + ≤ dyadicWeight (s - δ) j * (C' * dyadicWeight δ j * ‖b j‖ₑ) := by + gcongr; exact hcle j + _ = C' * ((dyadicWeight (s - δ) j * dyadicWeight δ j) * ‖b j‖ₑ) := by ring + _ = C' * (dyadicWeight s j * ‖b j‖ₑ) := by + rw [← ENNReal.dyadicWeight_add, sub_add_cancel] + _ = C' * lqNorm q (fun j => dyadicWeight s j * ‖b j‖ₑ) := ENNReal.lqNorm_const_mul _ _ + _ ≤ C' * ((3 * 2 ^ s + 4 * dyadicWeight s 2) * A.approxNormDyadic s q f) := by gcongr + _ = C' * (3 * 2 ^ s + 4 * dyadicWeight s 2) * A.approxNormDyadic s q f := by ring + +/-- **The atomic characterisation of `A^s_q`**: for a linear scheme in a Banach space with a +stable expansion, `0 < s < σ` and `1 ≤ q ≤ ∞`, `f ∈ A^s_q` iff `f` is an atomic sum with +coefficients in `b^s_{p,q}`. -/ +theorem memApprox_iff_exists_atomic [CompleteSpace X] (hA : A.IsLinear) {C' : ℝ≥0∞} + (hC' : C' ≠ ∞) (hstab : AS.StableExpansion C') (hs : 0 < s) (hsσ : s < σ) (hq : 1 ≤ q) + {f : X} : + A.MemApprox s q f ↔ ∃ (a : ∀ j, M j → X) (c : ∀ j, M j → ℝ), (∀ j m, a j m ∈ AS.adm j m) ∧ + HasSum (fun j => ∑ m, c j m • a j m) f ∧ bNorm M s δ p q c < ∞ := by + constructor + · intro hf + obtain ⟨a, c, ha, hsum, hle⟩ := AS.exists_atomic_decomposition hstab hs hq hf + refine ⟨a, c, ha, hsum, hle.trans_lt (ENNReal.mul_lt_top (ENNReal.mul_lt_top hC'.lt_top ?_) + ((memApprox_iff_approxNormDyadic_lt_top hq hs.le).1 hf))⟩ + exact ENNReal.add_lt_top.2 ⟨ENNReal.mul_lt_top (by norm_num) + (ENNReal.two_rpow_ne_top _).lt_top, + ENNReal.mul_lt_top (by norm_num) (ENNReal.dyadicWeight_lt_top s 2)⟩ + · rintro ⟨a, c, ha, hsum, hc⟩ + exact AS.memApprox_of_bNorm_lt_top hA hs hsσ hq ha hsum hc + +end AtomicSystem + +end ApproximationScheme diff --git a/LeanPool/FunctionSpaces/ApproximationSpaces/Decompositions/Blocks.lean b/LeanPool/FunctionSpaces/ApproximationSpaces/Decompositions/Blocks.lean new file mode 100644 index 0000000000..5494b25759 --- /dev/null +++ b/LeanPool/FunctionSpaces/ApproximationSpaces/Decompositions/Blocks.lean @@ -0,0 +1,380 @@ +/- +Copyright (c) 2026 Mario Ullrich. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Mario Ullrich +-/ +module + +public import LeanPool.FunctionSpaces.ApproximationSpaces.Lift +public import LeanPool.FunctionSpaces.ApproximationSpaces.Sequences.Hardy + +/- +Modified for Lean Pool: module names and imports adapted. +-/ + +/-! +# Block decompositions + +For `s > 0`, `1 ≤ q ≤ ∞` and a Banach space `X`, an element `f` lies in `A^s_q` if and only if +it has a **block decomposition** + +`f = ∑_{k ≥ 0} g_k`, `g_k ∈ A (2^k)`, `(2^(ks) ‖g_k‖)_k ∈ ℓ_q` + +(`memApprox_iff_blockDecompNorm_lt_top`), and the infimum of `‖(2^(ks) ‖g_k‖)_k‖_q` over all +block decompositions (`blockDecompNorm`) is an equivalent quasi-norm +(`approxNormDyadic_le_blockDecompNorm`, `blockDecompNorm_le_approxNormDyadic`). Each block +`g_k` is a whole level, an approximant of complexity `2^k`. Atomic decompositions refine every +block into localised atoms with coefficients; wavelet decompositions expand it in a basis. + +* Given a decomposition, `∑_{j < k} g_j ∈ A (2^k)`, so `E_{2^k}(f) ≤ ∑_{i ≥ 0} ‖g_{k+i}‖`, and + Hardy's inequality for tails gives the bound on `‖f‖_{A^s_q}`. +* Conversely, the differences of near-best approximants form a decomposition + (`g_{k+2} = a_{k+1} - a_k ∈ A (2^(k+2))`), whose norms are controlled by the errors. +* For concrete blocks such as Littlewood–Paley blocks, a finite weighted `ℓ_q` norm makes the + series converge absolutely (`HasSum.of_tendsto_of_lqNorm_dyadicWeight_lt_top`), and blocks + bounded by the errors have weighted `ℓ_q` norm at most a multiple of `‖f‖_{A^s_q}` + (`lqNorm_dyadicWeight_mul_enorm_le_approxNormDyadic`). +* A series moved up by `γ` levels (`shiftSeq`) keeps its sum, and blocks `a_j ∈ A (2^(j+γ))` + become blocks `g_i ∈ A (2^i)` with the same weighted `ℓ_q` norm (`shiftSeq_mem`, + `lqNorm_shiftSeq_le`). +-/ + +@[expose] public section + +open Filter Topology Finset +open scoped ENNReal + +/-- **A weighted `ℓ_q` bound gives the sum**: for `s > 0` and `1 ≤ q ≤ ∞`, a sequence `b_j` in a +complete normed group with `‖(2^(js) ‖b_j‖)_j‖_{ℓ_q} < ∞` is absolutely summable +(`ENNReal.tsum_le_lqNorm_dyadicWeight`), so its sum is the limit `f` of its partial sums. -/ +theorem HasSum.of_tendsto_of_lqNorm_dyadicWeight_lt_top {E : Type*} [NormedAddCommGroup E] + [CompleteSpace E] {s : ℝ} {q : ℝ≥0∞} (hs : 0 < s) (hq : 1 ≤ q) {b : ℕ → E} {f : E} + (hb : Tendsto (fun n => ∑ j ∈ range n, b j) atTop (𝓝 f)) + (hL : ENNReal.lqNorm q (fun j => ENNReal.dyadicWeight s j * ‖b j‖ₑ) < ∞) : HasSum b f := + (Summable.of_eNorm (ne_top_of_le_ne_top + (ENNReal.mul_ne_top (ENNReal.one_sub_two_rpow_neg_inv_ne_top hs) hL.ne) + (ENNReal.tsum_le_lqNorm_dyadicWeight hq s _))).hasSum_iff_tendsto_nat.2 hb + +namespace ApproximationScheme + +open ENNReal (lqNorm dyadicWeight) + +variable {X : Type*} [NormedAddCommGroup X] [NormedSpace ℝ X] + {A : ApproximationScheme X} {s : ℝ} {q : ℝ≥0∞} + +variable (A) in +/-- The **block decomposition quasi-norm**: the infimum of `‖(2^(ks) ‖g_k‖)_k‖_q` over all +block decompositions `f = ∑ g_k` with `g_k ∈ A (2^k)`. -/ +noncomputable def blockDecompNorm (s : ℝ) (q : ℝ≥0∞) (f : X) : ℝ≥0∞ := + ⨅ (g : ℕ → X) (_ : ∀ k, g k ∈ A (2 ^ k)) (_ : HasSum g f), + lqNorm q (fun k => dyadicWeight s k * ‖g k‖ₑ) + +/-- Every block decomposition `f = ∑ g_k` with `g_k ∈ A_{2^k}` bounds the block decomposition +quasi-norm. -/ +theorem blockDecompNorm_le {f : X} {g : ℕ → X} (hg : ∀ k, g k ∈ A (2 ^ k)) (hf : HasSum g f) : + A.blockDecompNorm s q f ≤ lqNorm q (fun k => dyadicWeight s k * ‖g k‖ₑ) := + iInf₂_le_of_le g hg (iInf_le_of_le hf le_rfl) + +/-- The partial sums of a block decomposition are approximants: `∑_{j mem_range.1 hj).le + (sum_mem (range k) fun j _ => hg j) + +/-- **A block decomposition controls the approximation norm**: for `s > 0`, +`‖f‖^dyadic ≤ 2 (1 - 2^(-s))⁻¹ ‖(2^(ks) ‖g_k‖)_k‖_q`. -/ +theorem approxNormDyadic_le_of_hasSum (hq : 1 ≤ q) {f : X} {g : ℕ → X} + (hg : ∀ k, g k ∈ A (2 ^ k)) (hf : HasSum g f) : + A.approxNormDyadic s q f ≤ + 2 * (1 - (2 : ℝ≥0∞) ^ (-s))⁻¹ * lqNorm q (fun k => dyadicWeight s k * ‖g k‖ₑ) := by + set Cs := (1 - (2 : ℝ≥0∞) ^ (-s))⁻¹ + set L := lqNorm q (fun k => dyadicWeight s k * ‖g k‖ₑ) + have htail : ∀ k, ‖f - ∑ j ∈ range k, g j‖ₑ ≤ ∑' i, ‖g (k + i)‖ₑ := fun k => + (hf.enorm_sub_sum_range_le k).trans_eq (by simp_rw [add_comm]) + have hD : lqNorm q (A.approxSeqDyadic s f) ≤ Cs * L := by + calc lqNorm q (A.approxSeqDyadic s f) + ≤ lqNorm q (fun k => dyadicWeight s k * ∑' i, ‖g (k + i)‖ₑ) := + ENNReal.lqNorm_mono fun k => by + rw [approxSeqDyadic]; gcongr + exact (approxError_le_of_mem (sum_range_mem hg k) f).trans (htail k) + _ ≤ Cs * L := ENNReal.hardy_tail_le hq s (fun m => ‖g m‖ₑ) + have hf' : ‖f‖ₑ ≤ Cs * L := + calc ‖f‖ₑ = ‖f - ∑ j ∈ range 0, g j‖ₑ := by simp + _ ≤ ∑' i, ‖g (0 + i)‖ₑ := htail 0 + _ ≤ Cs * L := by + simpa only [zero_add] using ENNReal.tsum_le_lqNorm_dyadicWeight hq s (‖g ·‖ₑ) + calc A.approxNormDyadic s q f = ‖f‖ₑ + lqNorm q (A.approxSeqDyadic s f) := rfl + _ ≤ Cs * L + Cs * L := add_le_add hf' hD + _ = 2 * Cs * L := by ring + +/-- **The block decomposition quasi-norm controls the approximation norm**, `s > 0`. -/ +theorem approxNormDyadic_le_blockDecompNorm (hs : 0 < s) (hq : 1 ≤ q) (f : X) : + A.approxNormDyadic s q f ≤ 2 * (1 - (2 : ℝ≥0∞) ^ (-s))⁻¹ * A.blockDecompNorm s q f := by + have h : 2 * (1 - (2 : ℝ≥0∞) ^ (-s))⁻¹ ≠ ∞ := + ENNReal.mul_ne_top (by norm_num) (ENNReal.one_sub_two_rpow_neg_inv_ne_top hs) + have h0 : 2 * (1 - (2 : ℝ≥0∞) ^ (-s))⁻¹ ≠ 0 := + mul_ne_zero two_ne_zero (zero_lt_one.trans_le (ENNReal.one_le_one_sub_two_rpow_neg_inv s)).ne' + rw [blockDecompNorm, ENNReal.mul_iInf_of_ne h0 h] + refine le_iInf fun g => ?_ + rw [ENNReal.mul_iInf_of_ne h0 h] + refine le_iInf fun hg => ?_ + rw [ENNReal.mul_iInf_of_ne h0 h] + exact le_iInf fun hf => approxNormDyadic_le_of_hasSum hq hg hf + +/-- The block decomposition built from near-best approximants: `g 0 = 0`, `g 1 = a 0` and +`g (k + 2) = a (k + 1) - a k`. -/ +noncomputable def DyadicApprox.blocks {f : X} {t : ℕ → ℝ≥0∞} (D : A.DyadicApprox f t) : ℕ → X + | 0 => 0 + | 1 => D.a 0 + | k + 2 => D.a (k + 1) - D.a k + +/-- The blocks of a dyadic approximation lie in the right sets: `g_k ∈ A_{2^k}`. -/ +theorem DyadicApprox.blocks_mem {f : X} {t : ℕ → ℝ≥0∞} (D : A.DyadicApprox f t) (k : ℕ) : + D.blocks k ∈ A (2 ^ k) := by + match k with + | 0 => exact A.zero_mem _ + | 1 => exact A.mem_of_le (by norm_num) (D.mem 0) + | k + 2 => exact D.sub_mem k + +/-- The partial sums of the blocks are the approximants: `∑_{j < K+2} g_j = a_K`. -/ +theorem DyadicApprox.sum_range_blocks {f : X} {t : ℕ → ℝ≥0∞} (D : A.DyadicApprox f t) (K : ℕ) : + ∑ j ∈ range (K + 2), D.blocks j = D.a K := by + induction K with + | zero => simp [Finset.sum_range_succ, DyadicApprox.blocks] + | succ K ih => + rw [Finset.sum_range_succ, ih] + simp only [DyadicApprox.blocks] + abel + +/-- The blocks of near-best approximants are summable in norm: for `f ∈ A^s_q` with `s > 0` +and tolerances with `∑ t_k ≤ 2 ‖f‖`, `∑_k ‖g_k‖ < ∞`. -/ +theorem DyadicApprox.tsum_enorm_blocks_ne_top (hs : 0 < s) (hq : 1 ≤ q) {f : X} + (hf : A.MemApprox s q f) {t : ℕ → ℝ≥0∞} (D : A.DyadicApprox f t) (ht : Antitone t) + (htsum : ∑' k, t k ≤ 2 * ‖f‖ₑ) : ∑' k, ‖D.blocks k‖ₑ ≠ ∞ := by + have hg : ∀ k, ‖D.blocks (k + 2)‖ₑ ≤ 2 * (A.approxError f (2 ^ k) + t k) := fun k => + D.enorm_sub_succ_le ht k + have hE1 : lqNorm 1 (A.approxSeqDyadic 0 f) < ∞ := hf.lqNorm_one_lt_top hq le_rfl hs + have htail : ∑' k, ‖D.blocks (k + 2)‖ₑ ≠ ∞ := by + have hfin : 2 * (lqNorm 1 (A.approxSeqDyadic 0 f) + 2 * ‖f‖ₑ) ≠ ∞ := + ENNReal.mul_ne_top (by norm_num) (ENNReal.add_ne_top.2 + ⟨hE1.ne, ENNReal.mul_ne_top (by norm_num) eNorm_ne_top⟩) + refine ne_top_of_le_ne_top hfin ?_ + calc ∑' k, ‖D.blocks (k + 2)‖ₑ ≤ ∑' k, 2 * (A.approxError f (2 ^ k) + t k) := + tsum_le_tsum hg + _ = 2 * (∑' k, A.approxSeqDyadic 0 f k + ∑' k, t k) := by + rw [ENNReal.tsum_mul_left, tsum_add]; simp [approxSeqDyadic] + _ ≤ 2 * (lqNorm 1 (A.approxSeqDyadic 0 f) + 2 * ‖f‖ₑ) := by + rw [ENNReal.lqNorm_one]; gcongr + rw [← Summable.sum_add_tsum_nat_add' (f := fun k => ‖D.blocks k‖ₑ) (k := 2) + CompleteLattice.summable] + exact ENNReal.add_ne_top.2 ⟨ENNReal.sum_ne_top.2 fun j _ => eNorm_ne_top, htail⟩ + +/-- **The blocks of near-best approximants add up to `f`**: in a Banach space, for +`f ∈ A^s_q` with `s > 0` and tolerances that decrease, tend to `0` and satisfy +`∑ t_k ≤ 2 ‖f‖`. -/ +theorem DyadicApprox.hasSum_blocks [CompleteSpace X] (hs : 0 < s) (hq : 1 ≤ q) {f : X} + (hf : A.MemApprox s q f) {t : ℕ → ℝ≥0∞} (D : A.DyadicApprox f t) (ht : Antitone t) + (htend : Tendsto t atTop (𝓝 0)) (htsum : ∑' k, t k ≤ 2 * ‖f‖ₑ) : + HasSum D.blocks f := by + have hsum : Summable D.blocks := Summable.of_eNorm (D.tsum_enorm_blocks_ne_top hs hq hf ht htsum) + have he := tendsto_approxError_pow_zero_of_memApprox hq hs hf + have h2 : Tendsto (fun K => ∑ j ∈ range (K + 2), D.blocks j) atTop (𝓝 (∑' k, D.blocks k)) := + hsum.hasSum.tendsto_sum_nat.comp (tendsto_add_atTop_nat 2) + simp_rw [D.sum_range_blocks] at h2 + have hfeq : f = ∑' k, D.blocks k := tendsto_nhds_unique (D.tendsto he htend) h2 + exact (congrArg (HasSum D.blocks) hfeq).mpr hsum.hasSum + +/-- **The weighted blocks of near-best approximants**: for decreasing tolerances with +`t_0 ≤ ‖f‖` and `‖(2^(ks) t_k)_k‖_q ≤ 2 ‖f‖`, +`‖(2^(ks) ‖g_k‖)_k‖_q ≤ 3·2^s ‖f‖ + 2·4^s (‖(2^(ks) E_{2^k}(f))_k‖_q + 2 ‖f‖)`. -/ +theorem DyadicApprox.lqNorm_blocks_le (hq : 1 ≤ q) {f : X} {t : ℕ → ℝ≥0∞} + (D : A.DyadicApprox f t) (ht : Antitone t) (ht0 : t 0 ≤ ‖f‖ₑ) + (htq : lqNorm q (fun k => dyadicWeight s k * t k) ≤ 2 * ‖f‖ₑ) : + lqNorm q (fun k => dyadicWeight s k * ‖D.blocks k‖ₑ) ≤ 2 ^ s * (3 * ‖f‖ₑ) + + 2 * dyadicWeight s 2 * (lqNorm q (A.approxSeqDyadic s f) + 2 * ‖f‖ₑ) := by + have hg : ∀ k, ‖D.blocks (k + 2)‖ₑ ≤ 2 * (A.approxError f (2 ^ k) + t k) := fun k => + D.enorm_sub_succ_le ht k + have hg1 : ‖D.blocks 1‖ₑ ≤ 3 * ‖f‖ₑ := + calc ‖D.blocks 1‖ₑ = ‖D.a 0‖ₑ := rfl + _ ≤ 2 * ‖f‖ₑ + t 0 := D.enorm_zero_le + _ ≤ 2 * ‖f‖ₑ + ‖f‖ₑ := by gcongr + _ = 3 * ‖f‖ₑ := by ring + refine ((ENNReal.lqNorm_le_head_add_shift hq _).trans (add_le_add le_rfl + (ENNReal.lqNorm_le_head_add_shift hq _))).trans ?_ + have h0 : dyadicWeight s 0 * ‖D.blocks 0‖ₑ = 0 := by simp [DyadicApprox.blocks] + have h1 : dyadicWeight s (0 + 1) * ‖D.blocks (0 + 1)‖ₑ ≤ 2 ^ s * (3 * ‖f‖ₑ) := by + rw [zero_add, ENNReal.dyadicWeight_succ, ENNReal.dyadicWeight_zero_right, mul_one] + gcongr + have h2 : lqNorm q (fun k => dyadicWeight s (k + 1 + 1) * ‖D.blocks (k + 1 + 1)‖ₑ) ≤ + 2 * dyadicWeight s 2 * (lqNorm q (A.approxSeqDyadic s f) + 2 * ‖f‖ₑ) := by + calc lqNorm q (fun k => dyadicWeight s (k + 1 + 1) * ‖D.blocks (k + 1 + 1)‖ₑ) + ≤ lqNorm q (fun k => 2 * dyadicWeight s 2 * + (A.approxSeqDyadic s f k + dyadicWeight s k * t k)) := + ENNReal.lqNorm_mono fun k => by + calc dyadicWeight s (k + 1 + 1) * ‖D.blocks (k + 2)‖ₑ + ≤ dyadicWeight s (k + 2) * (2 * (A.approxError f (2 ^ k) + t k)) := by + gcongr; exact hg k + _ = _ := by rw [ENNReal.dyadicWeight_add_nat, approxSeqDyadic]; ring + _ = 2 * dyadicWeight s 2 * + lqNorm q (fun k => A.approxSeqDyadic s f k + dyadicWeight s k * t k) := + ENNReal.lqNorm_const_mul _ _ + _ ≤ _ := by + gcongr + exact (ENNReal.lqNorm_add_le hq _ _).trans (add_le_add le_rfl htq) + rw [h0, zero_add] + exact add_le_add h1 h2 + +/-- **The block decomposition of near-best approximants**: for tolerances `t` that decrease, tend to +`0`, start at most at `‖f‖` and satisfy `∑ t_k ≤ 2 ‖f‖` and `‖(2^(ks) t_k)_k‖_q ≤ 2 ‖f‖`, the +blocks of a dyadic approximation of `f ∈ A^s_q` form a block decomposition of `f` with +`‖(2^(ks) ‖g_k‖)_k‖_q ≤ 3·2^s ‖f‖ + 2·4^s (‖(2^(ks) E_{2^k}(f))_k‖_q + 2 ‖f‖)`. -/ +theorem DyadicApprox.blockDecompNorm_le [CompleteSpace X] (hs : 0 < s) (hq : 1 ≤ q) {f : X} + (hf : A.MemApprox s q f) {t : ℕ → ℝ≥0∞} (D : A.DyadicApprox f t) (ht : Antitone t) + (ht0 : t 0 ≤ ‖f‖ₑ) (htend : Tendsto t atTop (𝓝 0)) (htsum : ∑' k, t k ≤ 2 * ‖f‖ₑ) + (htq : lqNorm q (fun k => dyadicWeight s k * t k) ≤ 2 * ‖f‖ₑ) : + A.blockDecompNorm s q f ≤ 2 ^ s * (3 * ‖f‖ₑ) + + 2 * dyadicWeight s 2 * (lqNorm q (A.approxSeqDyadic s f) + 2 * ‖f‖ₑ) := + (ApproximationScheme.blockDecompNorm_le D.blocks_mem + (D.hasSum_blocks hs hq hf ht htend htsum)).trans (D.lqNorm_blocks_le hq ht ht0 htq) + +/-- **Existence of a block decomposition with bounds**: in a Banach space, for `s > 0` and +`f ∈ A^s_q`, there are blocks `g_k ∈ A (2^k)` with `f = ∑ g_k`, `∑_k ‖g_k‖ < ∞` and +`‖(2^(ks) ‖g_k‖)_k‖_q ≤ (3·2^s + 4·4^s) ‖f‖^dyadic`. -/ +theorem exists_blocks [CompleteSpace X] (hs : 0 < s) (hq : 1 ≤ q) {f : X} + (hf : A.MemApprox s q f) : + ∃ g : ℕ → X, (∀ k, g k ∈ A (2 ^ k)) ∧ HasSum g f ∧ ∑' k, ‖g k‖ₑ ≠ ∞ ∧ + lqNorm q (fun k => dyadicWeight s k * ‖g k‖ₑ) ≤ + (3 * 2 ^ s + 4 * dyadicWeight s 2) * A.approxNormDyadic s q f := by + rcases eq_or_ne f 0 with rfl | hf0 + · exact ⟨fun _ => 0, fun k => A.zero_mem _, hasSum_zero, by simp, by simp⟩ + obtain ⟨D⟩ := exists_dyadicApprox A f (tolerance_ne_zero hf0 s) + have ht := tolerance_anti f hs.le + have htsum := tsum_tolerance_le f hs.le + refine ⟨D.blocks, D.blocks_mem, D.hasSum_blocks hs hq hf ht (tendsto_tolerance f (by linarith)) + htsum, D.tsum_enorm_blocks_ne_top hs hq hf ht htsum, ?_⟩ + refine (D.lqNorm_blocks_le hq ht (tolerance_zero f s).le + (lqNorm_dyadicWeight_mul_tolerance_le hq f le_rfl)).trans ?_ + have hfN : ‖f‖ₑ ≤ A.approxNormDyadic s q f := enorm_le_approxNormDyadic f + have hDN : lqNorm q (A.approxSeqDyadic s f) + ‖f‖ₑ = A.approxNormDyadic s q f := by + rw [approxNormDyadic, add_comm] + calc 2 ^ s * (3 * ‖f‖ₑ) + 2 * dyadicWeight s 2 * (lqNorm q (A.approxSeqDyadic s f) + 2 * ‖f‖ₑ) + = 2 ^ s * (3 * ‖f‖ₑ) + 2 * dyadicWeight s 2 * + ((lqNorm q (A.approxSeqDyadic s f) + ‖f‖ₑ) + ‖f‖ₑ) := by ring + _ ≤ 2 ^ s * (3 * A.approxNormDyadic s q f) + 2 * dyadicWeight s 2 * + (A.approxNormDyadic s q f + A.approxNormDyadic s q f) := by + rw [hDN]; gcongr + _ = (3 * 2 ^ s + 4 * dyadicWeight s 2) * A.approxNormDyadic s q f := by ring + +/-- **The approximation norm controls the block decomposition quasi-norm**: in a Banach space +and for `s > 0`, `inf ‖(2^(ks) ‖g_k‖)_k‖_q ≤ (3·2^s + 4·4^s) ‖f‖^dyadic`. -/ +theorem blockDecompNorm_le_approxNormDyadic [CompleteSpace X] (hs : 0 < s) (hq : 1 ≤ q) (f : X) : + A.blockDecompNorm s q f ≤ (3 * 2 ^ s + 4 * dyadicWeight s 2) * A.approxNormDyadic s q f := by + by_cases hf : A.MemApprox s q f + · obtain ⟨g, hg, hgf, -, hle⟩ := exists_blocks hs hq hf + exact (blockDecompNorm_le hg hgf).trans hle + · rw [memApprox_iff_approxNormDyadic_lt_top hq hs.le, not_lt, top_le_iff] at hf + rw [hf, ENNReal.mul_top (by positivity)]; exact le_top + +/-! ### Weighted sequences of blocks -/ + +/-- **Blocks controlled by the errors**: for `s ≥ 0`, `1 ≤ q ≤ ∞`, `M ≥ 1` and a sequence `b_j` +in a normed group with `‖b_j‖ ≤ C ‖f‖` for `j < M` and `‖b_{n+M}‖ ≤ C E_{2^n}(f)` for every `n`, +`‖(2^(js) ‖b_j‖)_j‖_{ℓ_q} ≤ M 2^(Ms) C ‖f‖^dyadic`. For Littlewood–Paley blocks `b_j = Δ_j f` +this is the bound of the Littlewood–Paley quasi-norm by the approximation norm. -/ +theorem lqNorm_dyadicWeight_mul_enorm_le_approxNormDyadic {E : Type*} [NormedAddCommGroup E] + (hs : 0 ≤ s) (hq : 1 ≤ q) {M : ℕ} (hM : 1 ≤ M) {C : ℝ≥0∞} {f : X} {b : ℕ → E} + (hhead : ∀ j < M, ‖b j‖ₑ ≤ C * ‖f‖ₑ) + (htail : ∀ n, ‖b (n + M)‖ₑ ≤ C * A.approxError f (2 ^ n)) : + lqNorm q (fun j => dyadicWeight s j * ‖b j‖ₑ) ≤ + M * dyadicWeight s M * C * A.approxNormDyadic s q f := by + set w := dyadicWeight s M + set a : ℕ → ℝ≥0∞ := fun j => dyadicWeight s j * ‖b j‖ₑ + have hhead' : ∀ j < M, a j ≤ w * C * ‖f‖ₑ := fun j hj => by + rw [mul_assoc] + exact mul_le_mul' (ENNReal.dyadicWeight_mono hs hj.le) (hhead j hj) + have htail' : ∀ n, a (n + M) ≤ w * C * A.approxSeqDyadic s f n := fun n => by + calc a (n + M) = w * dyadicWeight s n * ‖b (n + M)‖ₑ := by + simp only [a]; rw [add_comm n M, ENNReal.dyadicWeight_add_nat, add_comm M n] + _ ≤ w * dyadicWeight s n * (C * A.approxError f (2 ^ n)) := by gcongr; exact htail n + _ = w * C * A.approxSeqDyadic s f n := by rw [approxSeqDyadic]; ring + calc lqNorm q a ≤ ∑ j ∈ range M, a j + lqNorm q (fun n => a (n + M)) := + ENNReal.lqNorm_le_sum_range_add_shift hq a M + _ ≤ ∑ _j ∈ range M, w * C * ‖f‖ₑ + lqNorm q (fun n => w * C * A.approxSeqDyadic s f n) := by + gcongr with j hj + · exact hhead' j (mem_range.1 hj) + · exact ENNReal.lqNorm_mono htail' + _ = (M : ℝ≥0∞) * (w * C * ‖f‖ₑ) + w * C * lqNorm q (A.approxSeqDyadic s f) := by + rw [sum_const, card_range, nsmul_eq_mul, ENNReal.lqNorm_const_mul] + _ ≤ (M : ℝ≥0∞) * (w * C * ‖f‖ₑ) + (M : ℝ≥0∞) * (w * C * lqNorm q (A.approxSeqDyadic s f)) := + add_le_add le_rfl (le_mul_of_one_le_left zero_le (by exact_mod_cast hM)) + _ = M * w * C * A.approxNormDyadic s q f := by rw [approxNormDyadic]; ring + +/-- **The characterisation of `A^s_q` by block decompositions**: in a Banach space, for +`s > 0` and `1 ≤ q ≤ ∞`, `f ∈ A^s_q` iff `f = ∑ g_k` with `g_k ∈ A (2^k)` and +`(2^(ks) ‖g_k‖)_k ∈ ℓ_q`. -/ +theorem memApprox_iff_blockDecompNorm_lt_top [CompleteSpace X] (hs : 0 < s) (hq : 1 ≤ q) {f : X} : + A.MemApprox s q f ↔ A.blockDecompNorm s q f < ∞ := by + rw [memApprox_iff_approxNormDyadic_lt_top hq hs.le] + constructor + · intro h + exact (blockDecompNorm_le_approxNormDyadic hs hq f).trans_lt (ENNReal.mul_lt_top + (ENNReal.add_lt_top.2 ⟨ENNReal.mul_lt_top (by norm_num) + (ENNReal.two_rpow_ne_top _).lt_top, + ENNReal.mul_lt_top (by norm_num) (ENNReal.dyadicWeight_lt_top s 2)⟩) h) + · intro h + exact (approxNormDyadic_le_blockDecompNorm hs hq f).trans_lt (ENNReal.mul_lt_top + (ENNReal.mul_lt_top (by norm_num) (ENNReal.one_sub_two_rpow_neg_inv_ne_top hs).lt_top) h) + +/-! ### Series moved up by a number of levels -/ + +/-- The sequence `a` moved up by `γ` levels: `a_{i-γ}` at the levels `i ≥ γ`, and `0` below. -/ +def shiftSeq (γ : ℕ) (a : ℕ → X) (i : ℕ) : X := if γ ≤ i then a (i - γ) else 0 + +omit [NormedSpace ℝ X] in +/-- `(shiftSeq γ a)_{n+γ} = a_n`. -/ +theorem shiftSeq_add (γ : ℕ) (a : ℕ → X) (n : ℕ) : shiftSeq γ a (n + γ) = a n := by + simp [shiftSeq] + +omit [NormedSpace ℝ X] in +/-- The levels below `γ` of the moved sequence are `0`. -/ +theorem shiftSeq_of_lt {γ i : ℕ} (a : ℕ → X) (h : i < γ) : shiftSeq γ a i = 0 := by + simp [shiftSeq, not_le.2 h] + +omit [NormedSpace ℝ X] in +/-- **Moving a series up keeps its sum.** -/ +theorem hasSum_shiftSeq {γ : ℕ} {a : ℕ → X} {f : X} (hfa : HasSum a f) : + HasSum (shiftSeq γ a) f := by + refine (hasSum_nat_add_iff' γ).1 ?_ + have h1 : (fun n => shiftSeq γ a (n + γ)) = a := funext (shiftSeq_add γ a) + have h2 : ∑ i ∈ range γ, shiftSeq γ a i = 0 := + Finset.sum_eq_zero fun i hi => shiftSeq_of_lt a (Finset.mem_range.1 hi) + rw [h1, h2, sub_zero] + exact hfa + +/-- **Moving approximants up**: if `a_j ∈ A_{2^(j+γ)}`, then `(shiftSeq γ a)_i ∈ A_{2^i}`. -/ +theorem shiftSeq_mem {A : ApproximationScheme X} {γ : ℕ} {a : ℕ → X} + (ha : ∀ j, a j ∈ A (2 ^ (j + γ))) (i : ℕ) : shiftSeq γ a i ∈ A (2 ^ i) := by + by_cases h : γ ≤ i + · simp only [shiftSeq, h, ↓reduceIte] + have := ha (i - γ) + rwa [Nat.sub_add_cancel h] at this + · simp only [shiftSeq, h, ↓reduceIte] + exact A.zero_mem _ + +omit [NormedSpace ℝ X] in +/-- **The weighted norm of a moved sequence**: +`‖(2^(iσ) ‖(shiftSeq γ a)_i‖)_i‖_{ℓ_q} ≤ ‖(2^((j+γ)σ) ‖a_j‖)_j‖_{ℓ_q}`. -/ +theorem lqNorm_shiftSeq_le (γ : ℕ) (a : ℕ → X) (σ : ℝ) (q : ℝ≥0∞) : + lqNorm q (fun i => dyadicWeight σ i * ‖shiftSeq γ a i‖ₑ) ≤ + lqNorm q (fun j => dyadicWeight σ (j + γ) * ‖a j‖ₑ) := by + have : (fun i => dyadicWeight σ i * ‖shiftSeq γ a i‖ₑ) = fun i => + if γ ≤ i then (fun j => dyadicWeight σ (j + γ) * ‖a j‖ₑ) (i - γ) else 0 := by + funext i + by_cases h : γ ≤ i + · simp only [shiftSeq, h, ↓reduceIte, Nat.sub_add_cancel h] + · simp [shiftSeq, h] + rw [this] + exact ENNReal.lqNorm_shiftRight_le γ (fun j => dyadicWeight σ (j + γ) * ‖a j‖ₑ) + +end ApproximationScheme diff --git a/LeanPool/FunctionSpaces/ApproximationSpaces/Decompositions/Projection.lean b/LeanPool/FunctionSpaces/ApproximationSpaces/Decompositions/Projection.lean new file mode 100644 index 0000000000..4331de3d3c --- /dev/null +++ b/LeanPool/FunctionSpaces/ApproximationSpaces/Decompositions/Projection.lean @@ -0,0 +1,250 @@ +/- +Copyright (c) 2026 Mario Ullrich. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Mario Ullrich +-/ +module + +public import LeanPool.FunctionSpaces.ApproximationSpaces.Embedding +public import LeanPool.FunctionSpaces.ApproximationSpaces.Sequences.Hardy +public import Mathlib.Analysis.Normed.Operator.NNNorm + +/- +Modified for Lean Pool: module names and imports adapted. +-/ + +/-! +# Characterisation by dyadic blocks for projection schemes + +Many schemes come with **uniformly bounded projections**: bounded linear maps `P n : X → X` +onto `A n` (fixing `A n`) with `‖P n‖ ≤ M` (`ApproximationScheme.ProjectionScheme`). Examples: +partial sums of an unconditional or orthonormal basis (Fourier series in `L_2`, wavelets in +`L_p`), conditional expectations onto dyadic σ-algebras (Haar). Bounded projections onto an +increasing sequence of subspaces `V_k` give a projection scheme for the dyadic scheme of the +`V_k` (`ProjectionScheme.ofMonotone`). For projection schemes: + +* `P n` is a near-best approximation: `E_n(f) ≤ ‖f - P n f‖ ≤ (1 + M) E_n(f)` + (`enorm_sub_le_approxError`), a **Lebesgue inequality**; +* `A^s_q` is characterised by the **dyadic blocks** `Δ_k f = P (2^(k+1)) f - P (2^k) f`: + for `s > 0`, and if `P n f → f` for every `f`, + + `‖f‖_{A^s_q} ≍ ‖P 1 f‖ + ‖(2^(ks) ‖Δ_k f‖)_k‖_{ℓ_q}` + + (`blockNorm_le_approxNormDyadic`, `approxNormDyadic_le_blockNorm`). + +For a wavelet basis the block `Δ_k f` is the part of `f` at level `k`, and for an orthonormal +basis `‖Δ_k f‖` is the `ℓ²` norm of the coefficients in the block; this is how coefficient +characterisations of Besov spaces arise. The direction `≲` uses Hardy's inequality for tails; +the density hypothesis is needed because the blocks see nothing outside the closure of +`⋃ A n`. +-/ + +@[expose] public section + +open Filter Topology Finset +open scoped ENNReal + +namespace ApproximationScheme + +open ENNReal (lqNorm dyadicWeight) + +variable {X : Type*} [NormedAddCommGroup X] [NormedSpace ℝ X] + +/-- A **projection scheme**: bounded linear projections `P n` of `X` onto `A n`, uniformly +bounded by `M`. -/ +structure ProjectionScheme (A : ApproximationScheme X) where + /-- The projection onto the approximants of complexity `n`. -/ + P : ℕ → X →L[ℝ] X + mem : ∀ n f, P n f ∈ A n + proj : ∀ n, ∀ a ∈ A n, P n a = a + /-- The uniform bound on the projections. -/ + bound : ℝ + norm_le : ∀ n, ‖P n‖ ≤ bound + +namespace ProjectionScheme + +/-- **The projection scheme of an increasing sequence of subspaces**: bounded linear projections +`Q_k` onto `V_k`, with `Q_k a = a` for `a ∈ V_k` and `‖Q_k‖ ≤ B`, give a projection scheme for the +dyadic scheme `ofMonotoneSubmodules V`, with `P_0 = 0` and `P_n = Q_⌊log₂ n⌋` for `n ≥ 1`. -/ +noncomputable def ofMonotone (V : ℕ → Submodule ℝ X) (hV : Monotone V) (Q : ℕ → X →L[ℝ] X) + (hmem : ∀ k f, Q k f ∈ V k) (hproj : ∀ k, ∀ a ∈ V k, Q k a = a) (B : ℝ) + (hB : ∀ k, ‖Q k‖ ≤ B) : (ofMonotoneSubmodules V hV).ProjectionScheme where + P n := if n = 0 then 0 else Q (Nat.log 2 n) + mem n f := by + split_ifs with hn + · rw [hn, zero_apply, mem_ofMonotoneSubmodules_zero] + · exact (mem_ofMonotoneSubmodules hn).2 (hmem _ f) + proj n a ha := by + split_ifs with hn + · subst hn + rw [mem_ofMonotoneSubmodules_zero.1 ha, zero_apply] + · exact hproj _ a ((mem_ofMonotoneSubmodules hn).1 ha) + bound := B + norm_le n := by + split_ifs + · simpa using (norm_nonneg (Q 0)).trans (hB 0) + · exact hB _ + +/-- The projection of complexity `2^k` of `ProjectionScheme.ofMonotone` is `Q_k`. -/ +theorem ofMonotone_two_pow {V : ℕ → Submodule ℝ X} {hV : Monotone V} {Q : ℕ → X →L[ℝ] X} + {hmem : ∀ k f, Q k f ∈ V k} {hproj : ∀ k, ∀ a ∈ V k, Q k a = a} {B : ℝ} + {hB : ∀ k, ‖Q k‖ ≤ B} (k : ℕ) : + (ofMonotone V hV Q hmem hproj B hB).P (2 ^ k) = Q k := by + simp only [ofMonotone, pow_ne_zero k two_ne_zero, ↓reduceIte, Nat.log_pow Nat.one_lt_two] + +variable {A : ApproximationScheme X} (PS : ProjectionScheme A) + +/-- The bound of a projection scheme is nonnegative. -/ +theorem bound_nonneg : 0 ≤ PS.bound := (norm_nonneg _).trans (PS.norm_le 0) + +/-- `‖P_n f‖ ≤ M ‖f‖`. -/ +theorem enorm_apply_le (n : ℕ) (f : X) : ‖PS.P n f‖ₑ ≤ ENNReal.ofReal PS.bound * ‖f‖ₑ := by + refine ((PS.P n).le_opENorm f).trans ?_ + gcongr + rw [← ofReal_norm]; exact ENNReal.ofReal_le_ofReal (PS.norm_le n) + +/-- `P n f` is an approximant, so `E_n(f) ≤ ‖f - P n f‖`. -/ +theorem approxError_le_enorm_sub (n : ℕ) (f : X) : A.approxError f n ≤ ‖f - PS.P n f‖ₑ := + approxError_le_of_mem (PS.mem n f) f + +/-- **The Lebesgue inequality**: `‖f - P n f‖ ≤ (1 + M) E_n(f)`. -/ +theorem enorm_sub_le_approxError (n : ℕ) (f : X) : + ‖f - PS.P n f‖ₑ ≤ (1 + ENNReal.ofReal PS.bound) * A.approxError f n := + le_mul_approxError_of_forall_mem + (ENNReal.add_ne_top.2 ⟨ENNReal.one_ne_top, ENNReal.ofReal_ne_top⟩) + fun a ha => enorm_sub_apply_le_of_apply_eq (PS.enorm_apply_le n) (PS.proj n a ha) f + +/-- The **dyadic block** `Δ_k f = P (2^(k+1)) f - P (2^k) f`. -/ +noncomputable def block (k : ℕ) (f : X) : X := PS.P (2 ^ (k + 1)) f - PS.P (2 ^ k) f + +/-- A block is controlled by the error: `‖Δ_k f‖ ≤ 2 (1 + M) E_{2^k}(f)`. -/ +theorem enorm_block_le (k : ℕ) (f : X) : + ‖PS.block k f‖ₑ ≤ 2 * (1 + ENNReal.ofReal PS.bound) * A.approxError f (2 ^ k) := by + calc ‖PS.block k f‖ₑ = ‖(f - PS.P (2 ^ k) f) - (f - PS.P (2 ^ (k + 1)) f)‖ₑ := by + rw [block]; congr 1; abel + _ ≤ ‖f - PS.P (2 ^ k) f‖ₑ + ‖f - PS.P (2 ^ (k + 1)) f‖ₑ := eNorm_sub_le + _ ≤ (1 + ENNReal.ofReal PS.bound) * A.approxError f (2 ^ k) + + (1 + ENNReal.ofReal PS.bound) * A.approxError f (2 ^ k) := by + gcongr + · exact PS.enorm_sub_le_approxError _ f + · exact (PS.enorm_sub_le_approxError _ f).trans (by + gcongr; exact approxError_anti f (Nat.pow_le_pow_right two_pos (Nat.le_succ k))) + _ = _ := by ring + +/-- The **block quasi-norm** `‖P 1 f‖ + ‖(2^(ks) ‖Δ_k f‖)_k‖_{ℓ_q}`. -/ +noncomputable def blockNorm (s : ℝ) (q : ℝ≥0∞) (f : X) : ℝ≥0∞ := + ‖PS.P 1 f‖ₑ + lqNorm q (fun k => dyadicWeight s k * ‖PS.block k f‖ₑ) + +variable {s : ℝ} {q : ℝ≥0∞} + +/-- **The blocks are controlled by the approximation norm**: +`‖P 1 f‖ + ‖(2^(ks) ‖Δ_k f‖)_k‖_q ≤ (M + 2 (1 + M)) ‖f‖^dyadic`. -/ +theorem blockNorm_le_approxNormDyadic (f : X) : + PS.blockNorm s q f ≤ + (ENNReal.ofReal PS.bound + 2 * (1 + ENNReal.ofReal PS.bound)) * A.approxNormDyadic s q f := by + set c := 2 * (1 + ENNReal.ofReal PS.bound) + have hlq : lqNorm q (fun k => dyadicWeight s k * ‖PS.block k f‖ₑ) ≤ + c * lqNorm q (A.approxSeqDyadic s f) := by + rw [← ENNReal.lqNorm_const_mul] + refine ENNReal.lqNorm_mono fun k => ?_ + rw [approxSeqDyadic, mul_left_comm] + gcongr + exact PS.enorm_block_le k f + calc PS.blockNorm s q f ≤ ENNReal.ofReal PS.bound * ‖f‖ₑ + c * lqNorm q (A.approxSeqDyadic s f) := + add_le_add (PS.enorm_apply_le 1 f) hlq + _ ≤ (ENNReal.ofReal PS.bound + c) * ‖f‖ₑ + (ENNReal.ofReal PS.bound + c) * + lqNorm q (A.approxSeqDyadic s f) := by + gcongr + · exact le_self_add + · exact le_add_self + _ = _ := by rw [approxNormDyadic, mul_add] + +/-- The blocks telescope: `∑_{i < N} Δ_{k+i} f = P (2^(k+N)) f - P (2^k) f`. -/ +theorem sum_block (k N : ℕ) (f : X) : + ∑ i ∈ range N, PS.block (k + i) f = PS.P (2 ^ (k + N)) f - PS.P (2 ^ k) f := by + induction N with + | zero => simp + | succ N ih => + rw [Finset.sum_range_succ, ih, block, show k + N + 1 = k + (N + 1) by ring] + abel + +/-- If `P n f → f`, the error of `P (2^k)` is the norm of the tail of the blocks: +`‖f - P (2^k) f‖ ≤ ∑_{i ≥ 0} ‖Δ_{k+i} f‖`. -/ +theorem enorm_sub_le_tsum_block {f : X} (hf : Tendsto (fun n => PS.P n f) atTop (𝓝 f)) (k : ℕ) : + ‖f - PS.P (2 ^ k) f‖ₑ ≤ ∑' i, ‖PS.block (k + i) f‖ₑ := by + have hlim : Tendsto (fun N => PS.P (2 ^ (k + N)) f - PS.P (2 ^ k) f) atTop + (𝓝 (f - PS.P (2 ^ k) f)) := by + refine (hf.comp ?_).sub_const _ + exact (tendsto_pow_atTop_atTop_of_one_lt Nat.one_lt_two).comp + (tendsto_atTop_atTop_of_monotone (fun _ _ h => by omega) fun b => ⟨b, by omega⟩) + refine le_of_tendsto' ((continuous_eNorm.tendsto _).comp hlim) fun N => ?_ + rw [Function.comp_apply, ← PS.sum_block k N f] + exact (eNorm_sum_le _ _).trans (sum_le_tsum _) + +/-- **The approximation norm is controlled by the blocks**: for `s > 0`, `1 ≤ q ≤ ∞` and +`P n f → f`, `‖f‖^dyadic ≤ (1 + 2 C_s) (‖P 1 f‖ + ‖(2^(ks) ‖Δ_k f‖)_k‖_q)` with +`C_s = (1 - 2^(-s))⁻¹`. -/ +theorem approxNormDyadic_le_blockNorm (hq : 1 ≤ q) {f : X} + (hf : Tendsto (fun n => PS.P n f) atTop (𝓝 f)) : + A.approxNormDyadic s q f ≤ (1 + 2 * (1 - (2 : ℝ≥0∞) ^ (-s))⁻¹) * PS.blockNorm s q f := by + set Cs := (1 - (2 : ℝ≥0∞) ^ (-s))⁻¹ + set L := lqNorm q (fun k => dyadicWeight s k * ‖PS.block k f‖ₑ) + have hD : lqNorm q (A.approxSeqDyadic s f) ≤ Cs * L := by + calc lqNorm q (A.approxSeqDyadic s f) + ≤ lqNorm q (fun k => dyadicWeight s k * ∑' i, ‖PS.block (k + i) f‖ₑ) := + ENNReal.lqNorm_mono fun k => by + rw [approxSeqDyadic]; gcongr + exact (PS.approxError_le_enorm_sub _ f).trans (PS.enorm_sub_le_tsum_block hf k) + _ ≤ Cs * L := ENNReal.hardy_tail_le hq s (fun m => ‖PS.block m f‖ₑ) + have hsum : ∑' i, ‖PS.block i f‖ₑ ≤ Cs * L := + ENNReal.tsum_le_lqNorm_dyadicWeight hq s (‖PS.block · f‖ₑ) + have h0 := PS.enorm_sub_le_tsum_block hf 0 + simp only [pow_zero, zero_add] at h0 + have hf' : ‖f‖ₑ ≤ ‖PS.P 1 f‖ₑ + Cs * L := by + calc ‖f‖ₑ = ‖PS.P 1 f + (f - PS.P 1 f)‖ₑ := by congr 1; abel + _ ≤ ‖PS.P 1 f‖ₑ + ‖f - PS.P 1 f‖ₑ := eNorm_add_le _ _ + _ ≤ ‖PS.P 1 f‖ₑ + Cs * L := by gcongr; exact h0.trans hsum + have hC1 : 1 ≤ Cs := ENNReal.one_le_one_sub_two_rpow_neg_inv s + calc A.approxNormDyadic s q f = ‖f‖ₑ + lqNorm q (A.approxSeqDyadic s f) := rfl + _ ≤ (‖PS.P 1 f‖ₑ + Cs * L) + Cs * L := add_le_add hf' hD + _ ≤ (1 + 2 * Cs) * ‖PS.P 1 f‖ₑ + (1 + 2 * Cs) * L := by + have : ‖PS.P 1 f‖ₑ ≤ (1 + 2 * Cs) * ‖PS.P 1 f‖ₑ := le_mul_of_one_le_left' le_self_add + calc (‖PS.P 1 f‖ₑ + Cs * L) + Cs * L = ‖PS.P 1 f‖ₑ + 2 * Cs * L := by ring + _ ≤ (1 + 2 * Cs) * ‖PS.P 1 f‖ₑ + (1 + 2 * Cs) * L := by + gcongr; exact le_add_self + _ = _ := by rw [blockNorm, mul_add] + +/-- If `⋃ A n` is dense, the projections converge: `P n f → f` for every `f`. -/ +theorem tendsto_of_dense (hd : closure (⋃ n, A n) = Set.univ) (f : X) : + Tendsto (fun n => PS.P n f) atTop (𝓝 f) := by + have hE' := (tendsto_approxError_zero_iff (A := A) f).2 (by rw [hd]; trivial) + have hbound : + Tendsto (fun n => (1 + ENNReal.ofReal PS.bound) * A.approxError f n) atTop (𝓝 0) := by + simpa using ENNReal.Tendsto.const_mul hE' (Or.inr (ENNReal.add_ne_top.2 + ⟨ENNReal.one_ne_top, ENNReal.ofReal_ne_top⟩)) + have h0 : Tendsto (fun n => ‖f - PS.P n f‖ₑ) atTop (𝓝 0) := + tendsto_of_tendsto_of_tendsto_of_le_of_le tendsto_const_nhds hbound (fun _ => bot_le) + (PS.enorm_sub_le_approxError · f) + rw [tendsto_iff_norm_sub_tendsto_zero] + have := (ENNReal.tendsto_toReal ENNReal.zero_ne_top).comp h0 + simpa [Function.comp_def, norm_sub_rev] using this + +/-- **Characterisation of `A^s_q` by dyadic blocks**: for a projection scheme with dense +`⋃ A n`, `s > 0` and `1 ≤ q ≤ ∞`, `f ∈ A^s_q` iff +`‖P 1 f‖ + ‖(2^(ks) ‖Δ_k f‖)_k‖_q < ∞`. -/ +theorem memApprox_iff_blockNorm_lt_top (hd : closure (⋃ n, A n) = Set.univ) (hs : 0 < s) + (hq : 1 ≤ q) {f : X} : A.MemApprox s q f ↔ PS.blockNorm s q f < ∞ := by + rw [memApprox_iff_approxNormDyadic_lt_top hq hs.le] + constructor + · intro h + exact (PS.blockNorm_le_approxNormDyadic f).trans_lt (ENNReal.mul_lt_top + (ENNReal.add_lt_top.2 ⟨ENNReal.ofReal_lt_top, ENNReal.mul_lt_top (by norm_num) + (ENNReal.add_lt_top.2 ⟨ENNReal.one_lt_top, ENNReal.ofReal_lt_top⟩)⟩) h) + · intro h + exact (PS.approxNormDyadic_le_blockNorm hq (PS.tendsto_of_dense hd f)).trans_lt + (ENNReal.mul_lt_top (ENNReal.add_lt_top.2 ⟨ENNReal.one_lt_top, ENNReal.mul_lt_top + (by norm_num) (ENNReal.one_sub_two_rpow_neg_inv_ne_top hs).lt_top⟩) h) + +end ProjectionScheme + +end ApproximationScheme diff --git a/LeanPool/FunctionSpaces/ApproximationSpaces/Decompositions/Synthesis.lean b/LeanPool/FunctionSpaces/ApproximationSpaces/Decompositions/Synthesis.lean new file mode 100644 index 0000000000..79bf7d6053 --- /dev/null +++ b/LeanPool/FunctionSpaces/ApproximationSpaces/Decompositions/Synthesis.lean @@ -0,0 +1,160 @@ +/- +Copyright (c) 2026 Mario Ullrich. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Mario Ullrich +-/ +module + +public import LeanPool.FunctionSpaces.ApproximationSpaces.Decompositions.Blocks + +/- +Modified for Lean Pool: module names and imports adapted. +-/ + +/-! +# Synthesis with decay + +A block decomposition `f = ∑ g_j` with `g_j ∈ A (2^j)` controls `‖f‖_{A^s_q}` +(`ApproximationSpaces.Decompositions.Blocks`). Atoms of a function space lie in no fixed set of +approximants, so their blocks need a weaker hypothesis: `g_j` has size `ε_j` and is +**approximable at rate `σ` from level `j` on**, + +`‖g_j‖ ≤ ε_j`, `E_{2^k}(g_j) ≤ C 2^(-(k-j)σ) ε_j` for `k ≥ j`. + +Then for `0 < s < σ` and `1 ≤ q ≤ ∞` (`ApproximationScheme.approxNormDyadic_le_of_hasSum_decay`) + +`‖f‖_{A^s_q} ≤ (2 (1 - 2^(-s))⁻¹ + C (1 - 2^(-(σ-s)))⁻¹) ‖(2^(js) ε_j)_j‖_{ℓ_q}` + +in the dyadic quasi-norm. The levels `j ≤ k` are approximated together, which needs a +**linear** scheme (`ApproximationScheme.IsLinear`: each `A n` closed under addition), so that +`E_n(f + g) ≤ E_n(f) + E_n(g)`; the levels `j > k` are estimated by their size. The two parts +are the two Hardy inequalities, with exponents `σ - s` and `s`. +-/ + +@[expose] public section + +open Filter Topology Finset +open scoped ENNReal + +namespace ApproximationScheme + +open ENNReal (lqNorm dyadicWeight) + +variable {X : Type*} [NormedAddCommGroup X] [NormedSpace ℝ X] + {A : ApproximationScheme X} {s : ℝ} {q : ℝ≥0∞} + +/-- A scheme is **linear** if every set of approximants is closed under addition, so that it is +a linear subspace. -/ +def IsLinear (A : ApproximationScheme X) : Prop := ∀ n, ∀ a ∈ A n, ∀ b ∈ A n, a + b ∈ A n + +/-- The scheme of an increasing sequence of subspaces is linear. -/ +theorem isLinear_ofSubmodules (V : ℕ → Submodule ℝ X) (h0 : V 0 = ⊥) (hV : Monotone V) : + (ofSubmodules V h0 hV).IsLinear := fun n a ha b hb => by + rw [mem_ofSubmodules] at ha hb ⊢ + exact (V n).add_mem ha hb + +/-- The dyadic scheme of an increasing sequence of subspaces is linear. -/ +theorem isLinear_ofMonotoneSubmodules (V : ℕ → Submodule ℝ X) (hV : Monotone V) : + (ofMonotoneSubmodules V hV).IsLinear := + isLinear_ofSubmodules _ _ _ + +/-- The image of a linear scheme under a linear map is linear. -/ +theorem IsLinear.map {Y : Type*} [NormedAddCommGroup Y] [NormedSpace ℝ Y] (hA : A.IsLinear) + (T : X →ₗ[ℝ] Y) : (A.map T).IsLinear := fun n a ha b hb => by + obtain ⟨a', ha', rfl⟩ := A.mem_map.1 ha + obtain ⟨b', hb', rfl⟩ := A.mem_map.1 hb + exact A.mem_map.2 ⟨a' + b', hA n a' ha' b' hb', map_add T a' b'⟩ + +/-- For a linear scheme the error is subadditive at a fixed complexity: +`E_n(f + g) ≤ E_n(f) + E_n(g)`. -/ +theorem approxError_add_le_of_isLinear (hA : A.IsLinear) (n : ℕ) (f g : X) : + A.approxError (f + g) n ≤ A.approxError f n + A.approxError g n := + approxError_add_le_of_add_mem (hA n) f g + +/-- `E_n(∑ g_j) ≤ ∑ E_n(g_j)` for a linear scheme (Mathlib's `Finset.le_sum_of_subadditive`). -/ +theorem approxError_sum_le_of_isLinear (hA : A.IsLinear) (n : ℕ) {ι : Type*} (t : Finset ι) + (g : ι → X) : A.approxError (∑ j ∈ t, g j) n ≤ ∑ j ∈ t, A.approxError (g j) n := + Finset.le_sum_of_subadditive (A.approxError · n) (approxError_zero_left n).le + (approxError_add_le_of_isLinear hA n) t g + +/-- The algebra of the weights: `2^(ks) 2^(-(k-j)σ) = 2^(-k(σ-s)) 2^(jσ)` for `j ≤ k` +(`ENNReal.dyadicWeight_mul_dyadicWeight_neg_sub`). -/ +theorem dyadicWeight_mul_dyadicWeight_sub {σ : ℝ} {j k : ℕ} (hjk : j ≤ k) (c e : ℝ≥0∞) : + dyadicWeight s k * (c * dyadicWeight (-σ) (k - j) * e) = + c * (dyadicWeight (-(σ - s)) k * (dyadicWeight σ j * e)) := + calc dyadicWeight s k * (c * dyadicWeight (-σ) (k - j) * e) + = c * (dyadicWeight s k * dyadicWeight (-σ) (k - j)) * e := by ring + _ = _ := by rw [ENNReal.dyadicWeight_mul_dyadicWeight_neg_sub s σ hjk]; ring + +/-- **Synthesis with decay**: for a linear scheme, `f = ∑ g_j` with `‖g_j‖ ≤ ε_j` and +`E_{2^k}(g_j) ≤ C 2^(-(k-j)σ) ε_j` for `k ≥ j` satisfies +`‖f‖_{A^s_q} ≤ (2 (1 - 2^(-s))⁻¹ + C (1 - 2^(-(σ-s)))⁻¹) ‖(2^(js) ε_j)_j‖_{ℓ_q}` (dyadic +quasi-norm). The constant is finite for `0 < s < σ`. -/ +theorem approxNormDyadic_le_of_hasSum_decay (hA : A.IsLinear) (hq : 1 ≤ q) {σ : ℝ} + {C : ℝ≥0∞} {f : X} {g : ℕ → X} (hf : HasSum g f) {ε : ℕ → ℝ≥0∞} + (hsize : ∀ j, ‖g j‖ₑ ≤ ε j) + (hdecay : ∀ j k, j ≤ k → A.approxError (g j) (2 ^ k) ≤ C * dyadicWeight (-σ) (k - j) * ε j) : + A.approxNormDyadic s q f ≤ (2 * (1 - (2 : ℝ≥0∞) ^ (-s))⁻¹ + + C * (1 - (2 : ℝ≥0∞) ^ (-(σ - s)))⁻¹) * lqNorm q (fun j => dyadicWeight s j * ε j) := by + set Cs := (1 - (2 : ℝ≥0∞) ^ (-s))⁻¹ + set Cα := (1 - (2 : ℝ≥0∞) ^ (-(σ - s)))⁻¹ + set P := lqNorm q (fun j => dyadicWeight s j * ε j) + have hq0 : q ≠ 0 := (zero_lt_one.trans_le hq).ne' + -- the tail of the series + have htail : ∀ k, ‖f - ∑ j ∈ range (k + 1), g j‖ₑ ≤ ∑' i, ε (k + i) := fun k => by + calc _ ≤ ∑' i, ‖g (i + (k + 1))‖ₑ := hf.enorm_sub_sum_range_le (k + 1) + _ ≤ ∑' i, ε (i + (k + 1)) := tsum_le_tsum fun i => hsize _ + _ = ∑' i, ε (k + (i + 1)) := by congr 1; funext i; congr 1; omega + _ ≤ ∑' i, ε (k + i) := + tsum_comp_le_tsum_of_injective Nat.succ_injective (fun i => ε (k + i)) + -- the dyadic errors + have herr : ∀ k, A.approxSeqDyadic s f k ≤ + C * (dyadicWeight (-(σ - s)) k * ∑ j ∈ range (k + 1), dyadicWeight σ j * ε j) + + dyadicWeight s k * ∑' i, ε (k + i) := fun k => by + have h1 : A.approxError (∑ j ∈ range (k + 1), g j) (2 ^ k) ≤ + ∑ j ∈ range (k + 1), C * dyadicWeight (-σ) (k - j) * ε j := + (approxError_sum_le_of_isLinear hA _ _ _).trans (Finset.sum_le_sum fun j hj => + hdecay j k (Nat.lt_succ_iff.1 (Finset.mem_range.1 hj))) + calc A.approxSeqDyadic s f k = dyadicWeight s k * A.approxError f (2 ^ k) := rfl + _ ≤ dyadicWeight s k * (∑ j ∈ range (k + 1), C * dyadicWeight (-σ) (k - j) * ε j + + ∑' i, ε (k + i)) := by + gcongr + exact (approxError_le_approxError_add_enorm _ f _).trans (add_le_add h1 (htail k)) + _ = ∑ j ∈ range (k + 1), dyadicWeight s k * (C * dyadicWeight (-σ) (k - j) * ε j) + + dyadicWeight s k * ∑' i, ε (k + i) := by rw [mul_add, Finset.mul_sum] + _ = C * (dyadicWeight (-(σ - s)) k * ∑ j ∈ range (k + 1), dyadicWeight σ j * ε j) + + dyadicWeight s k * ∑' i, ε (k + i) := by + rw [Finset.sum_congr rfl fun j hj => dyadicWeight_mul_dyadicWeight_sub + (Nat.lt_succ_iff.1 (Finset.mem_range.1 hj)) C (ε j), ← Finset.mul_sum, + ← Finset.mul_sum] + have hHs : lqNorm q (fun k => dyadicWeight (-(σ - s)) k * + ∑ j ∈ range (k + 1), dyadicWeight σ j * ε j) ≤ Cα * P := by + refine (ENNReal.hardy_sum_le hq (σ - s) (fun j => dyadicWeight σ j * ε j)).trans_eq ?_ + congr 2; funext k + rw [← mul_assoc, ← ENNReal.dyadicWeight_add]; congr 2; ring + have hHt : lqNorm q (fun k => dyadicWeight s k * ∑' i, ε (k + i)) ≤ Cs * P := + ENNReal.hardy_tail_le hq s ε + have hf0 : ‖f‖ₑ ≤ Cs * P := by + calc ‖f‖ₑ ≤ ∑' i, ε i := by + rw [← hf.tsum_eq] + exact eNorm_tsum_le_tsum_eNorm.trans (tsum_le_tsum hsize) + _ = dyadicWeight s 0 * ∑' i, ε (0 + i) := by simp + _ ≤ lqNorm q (fun k => dyadicWeight s k * ∑' i, ε (k + i)) := + ENNReal.le_lqNorm hq0 (fun k => dyadicWeight s k * ∑' i, ε (k + i)) 0 + _ ≤ Cs * P := hHt + calc A.approxNormDyadic s q f = ‖f‖ₑ + lqNorm q (A.approxSeqDyadic s f) := rfl + _ ≤ Cs * P + (C * (Cα * P) + Cs * P) := by + gcongr + calc lqNorm q (A.approxSeqDyadic s f) + ≤ lqNorm q (fun k => C * (dyadicWeight (-(σ - s)) k * + ∑ j ∈ range (k + 1), dyadicWeight σ j * ε j) + + dyadicWeight s k * ∑' i, ε (k + i)) := ENNReal.lqNorm_mono herr + _ ≤ C * lqNorm q (fun k => dyadicWeight (-(σ - s)) k * + ∑ j ∈ range (k + 1), dyadicWeight σ j * ε j) + + lqNorm q (fun k => dyadicWeight s k * ∑' i, ε (k + i)) := by + refine (ENNReal.lqNorm_add_le hq _ _).trans ?_ + rw [ENNReal.lqNorm_const_mul] + _ ≤ C * (Cα * P) + Cs * P := by gcongr + _ = (2 * Cs + C * Cα) * P := by ring + +end ApproximationScheme diff --git a/LeanPool/FunctionSpaces/ApproximationSpaces/Dyadic.lean b/LeanPool/FunctionSpaces/ApproximationSpaces/Dyadic.lean new file mode 100644 index 0000000000..97ea6b294f --- /dev/null +++ b/LeanPool/FunctionSpaces/ApproximationSpaces/Dyadic.lean @@ -0,0 +1,342 @@ +/- +Copyright (c) 2026 Mario Ullrich. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Mario Ullrich +-/ +module + +public import LeanPool.FunctionSpaces.ApproximationSpaces.Norm +public import LeanPool.FunctionSpaces.ApproximationSpaces.Sequences.Dyadic +public import Mathlib.Analysis.MeanInequalitiesPow + +/- +Modified for Lean Pool: module names and imports adapted. +-/ + +/-! +# The dyadic quasi-norm of `A^s_q` + +Since `E_n(f)` decreases in `n`, only the errors at the dyadic points `n = 2^k` matter: +for `s ≥ 0` and `1 ≤ q ≤ ∞`, + +`‖f‖_{A^s_q} ≍ ‖f‖ + ‖(2^(ks) E_{2^k}(f))_k‖_{ℓ_q}`, + +with the explicit constants `approxNorm ≤ 2^s · approxNormDyadic` and +`approxNormDyadic ≤ 4 · 2^s · approxNorm` (`approxNorm_le_approxNormDyadic`, +`approxNormDyadic_le_approxNorm`). The term `‖f‖` is needed because the dyadic sequence +starts with `E_1(f)`, which vanishes on `A 1`, while Pietsch's sequence starts with +`E_0(f) = ‖f‖`. + +The equivalence holds for every `q ∈ (0, ∞]`, also below `1`, with the constants +`C_q 2^s` and `4 C_q² 2^s`, where `C_q = LpAddConst q` is Mathlib's constant of the +quasi-triangle inequality, `2^(1/q - 1)` for `0 < q < 1` and `1` otherwise +(`approxNorm_le_approxNormDyadic'`, `approxNormDyadic_le_approxNorm'`, +`memApprox_iff_approxNormDyadic_lt_top'`, `memApprox_iff_lqNorm_dyadic_lt_top'`); the statements +for `q ≥ 1` are their cases `C_q = 1`. The primed statements assume `q ≠ 0`, the range `(0, ∞]` +of Pietsch's definition; the bound of the dyadic quasi-norm by Pietsch's needs it, since +`lqNorm 0 = 0`. + +**Why the dyadic form is the working norm.** Its weights `2^(ks)` do not depend on `q`, so +comparing different `q` is monotonicity of `ℓ_q` norms, and a shift `k ↦ k + 1` multiplies the +weights by the constant `2^s`. Every later theorem is proved for `approxNormDyadic` and +transported through this equivalence; no later proof unfolds Pietsch's weights `n^(s - 1/q)`. + +For an approximant `a ∈ A_{2^k}` the quasi-norm of `A^s_∞` is at most a finite sum +(`approxNormDyadic_top_le_of_mem`). The file ends with the consequence that the errors of an +element of `A^s_q`, `s > 0`, tend to zero, so that `A^s_q` lies in the closure of `⋃ A n`. +-/ + +@[expose] public section + +open Filter Topology +open scoped ENNReal + +namespace ApproximationScheme + +open ENNReal (lqNorm dyadicWeight LpAddConst LpAddConst_of_one_le) + +variable {X : Type*} [NormedAddCommGroup X] [NormedSpace ℝ X] + +variable (A : ApproximationScheme X) + +/-- The **dyadic sequence** `(2^(ks) E_{2^k}(f))_k`. -/ +noncomputable def approxSeqDyadic (s : ℝ) (f : X) (k : ℕ) : ℝ≥0∞ := + dyadicWeight s k * A.approxError f (2 ^ k) + +/-- The **dyadic quasi-norm** `‖f‖ + ‖(2^(ks) E_{2^k}(f))_k‖_{ℓ_q}`, equivalent to Pietsch's +quasi-norm for `s ≥ 0`. -/ +noncomputable def approxNormDyadic (s : ℝ) (q : ℝ≥0∞) (f : X) : ℝ≥0∞ := + ‖f‖ₑ + lqNorm q (A.approxSeqDyadic s f) + +variable {A} {s : ℝ} {q : ℝ≥0∞} + +/-- Each term `2^(ks) E_{2^k}(f)` is at most the `ℓ_q` norm of the dyadic sequence, for every +`q ≠ 0`. -/ +theorem approxSeqDyadic_le_lqNorm (hq0 : q ≠ 0) (f : X) (k : ℕ) : + A.approxSeqDyadic s f k ≤ lqNorm q (A.approxSeqDyadic s f) := + ENNReal.le_lqNorm hq0 _ k + +/-- `‖f‖ ≤ ‖f‖^dyadic_{A^s_q}`. -/ +theorem enorm_le_approxNormDyadic (f : X) : ‖f‖ₑ ≤ A.approxNormDyadic s q f := le_self_add + +/-- The `ℓ_q` part of the dyadic quasi-norm is at most the quasi-norm. -/ +theorem lqNorm_le_approxNormDyadic (f : X) : + lqNorm q (A.approxSeqDyadic s f) ≤ A.approxNormDyadic s q f := le_add_self + +/-- Powers of the dyadic terms: `(2^(ks) E_{2^k}(f))^p = 2^(ksp) E_{2^k}(f)^p` for `p ≥ 0`. -/ +theorem approxSeqDyadic_rpow {p : ℝ} (hp : 0 ≤ p) (f : X) (k : ℕ) : + A.approxSeqDyadic s f k ^ p = dyadicWeight (s * p) k * A.approxError f (2 ^ k) ^ p := by + rw [approxSeqDyadic, ENNReal.mul_rpow_of_nonneg _ _ hp, ENNReal.dyadicWeight_rpow] + +/-- The first dyadic term is `E_1(f)`. -/ +theorem approxSeqDyadic_zero (f : X) : A.approxSeqDyadic s f 0 = A.approxError f 1 := by + simp [approxSeqDyadic] + +/-- The dyadic quasi-norm of `0` is `0`. -/ +@[simp] +theorem approxNormDyadic_zero (s : ℝ) (q : ℝ≥0∞) : A.approxNormDyadic s q 0 = 0 := by + have : A.approxSeqDyadic s 0 = fun _ => 0 := by funext k; simp [approxSeqDyadic] + simp [approxNormDyadic, this] + +/-- The dyadic terms are homogeneous: `2^(ks) E_{2^k}(c f) = |c| 2^(ks) E_{2^k}(f)`. -/ +theorem approxSeqDyadic_smul (c : ℝ) (f : X) : + A.approxSeqDyadic s (c • f) = fun k => ‖c‖ₑ * A.approxSeqDyadic s f k := by + funext k; rw [approxSeqDyadic, approxSeqDyadic, approxError_smul, mul_left_comm] + +/-- The dyadic quasi-norm is homogeneous: `‖c f‖^dyadic = |c| ‖f‖^dyadic`. -/ +theorem approxNormDyadic_smul (c : ℝ) (f : X) : + A.approxNormDyadic s q (c • f) = ‖c‖ₑ * A.approxNormDyadic s q f := by + rw [approxNormDyadic, approxNormDyadic, approxSeqDyadic_smul, ENNReal.lqNorm_const_mul, + eNorm_smul, mul_add] + +/-- The dyadic quasi-norm is even: `‖-f‖_{A^s_q} = ‖f‖_{A^s_q}`. -/ +theorem approxNormDyadic_neg (f : X) : A.approxNormDyadic s q (-f) = A.approxNormDyadic s q f := by + have h : A.approxSeqDyadic s (-f) = A.approxSeqDyadic s f := by + funext k + rw [approxSeqDyadic, approxSeqDyadic, approxError_neg] + rw [approxNormDyadic, approxNormDyadic, h, eNorm_neg] + +/-- **Pietsch's quasi-norm is dominated by the dyadic one**, for every `q ≠ 0`: for `s ≥ 0`, +`‖f‖_{A^s_q} ≤ C_q 2^s (‖f‖ + ‖(2^(ks) E_{2^k}(f))_k‖_q)` with Mathlib's constant +`C_q = LpAddConst q` of the quasi-triangle inequality (`1` for `q ≥ 1`). Cauchy condensation +compares the `q`-th powers, and `(x^q + y^q)^(1/q) ≤ C_q (x + y)` +(`ENNReal.rpow_add_rpow_le_LpAddConst_mul`). -/ +theorem approxNorm_le_approxNormDyadic' (hq0 : q ≠ 0) (hs : 0 ≤ s) (f : X) : + A.approxNorm s q f ≤ LpAddConst q * 2 ^ s * A.approxNormDyadic s q f := by + have h2s := ENNReal.one_le_two_rpow hs + rcases eq_or_ne q ∞ with rfl | hq' + · rw [LpAddConst_of_one_le le_top, one_mul, approxNorm_top, approxNormDyadic, + ENNReal.lqNorm_top] + calc ⨆ n, ((n + 1 : ℕ) : ℝ≥0∞) ^ s * A.approxError f n + ≤ A.approxError f 0 + 2 ^ s * ⨆ k, dyadicWeight s k * A.approxError f (2 ^ k) := + ENNReal.iSup_pow_mul_le_dyadic (approxError_anti f) hs + _ ≤ 2 ^ s * ‖f‖ₑ + 2 ^ s * ⨆ k, A.approxSeqDyadic s f k := by + rw [approxError_zero_right] + exact add_le_add (le_mul_of_one_le_left' h2s) le_rfl + _ = 2 ^ s * (‖f‖ₑ + ⨆ k, A.approxSeqDyadic s f k) := by rw [mul_add] + have hp : 0 < q.toReal := ENNReal.toReal_pos hq0 hq' + have hD : lqNorm q (A.approxSeqDyadic s f) ^ q.toReal = + ∑' k, dyadicWeight (s * q.toReal) k * A.approxError f (2 ^ k) ^ q.toReal := by + rw [ENNReal.lqNorm_rpow hq0 hq'] + simp_rw [approxSeqDyadic_rpow hp.le] + set p := q.toReal + have hb : Antitone fun n => A.approxError f n ^ p := fun m n h => + ENNReal.rpow_le_rpow (approxError_anti f h) hp.le + set D := lqNorm q (A.approxSeqDyadic s f) + have hpow : A.approxNorm s q f ^ p ≤ (2 ^ s) ^ p * (‖f‖ₑ ^ p + D ^ p) := by + rw [approxNorm_rpow hq0 hq'] + calc ∑' n, ((n + 1 : ℕ) : ℝ≥0∞) ^ (s * p - 1) * A.approxError f n ^ p + ≤ A.approxError f 0 ^ p + 2 ^ max (s * p - 1) 0 * + ∑' k, dyadicWeight (s * p - 1 + 1) k * A.approxError f (2 ^ k) ^ p := + ENNReal.tsum_pow_mul_le_dyadic hb (s * p - 1) + _ = ‖f‖ₑ ^ p + 2 ^ max (s * p - 1) 0 * D ^ p := by + rw [sub_add_cancel, hD, approxError_zero_right] + _ ≤ (2 ^ s) ^ p * ‖f‖ₑ ^ p + (2 ^ s) ^ p * D ^ p := by + gcongr + · exact le_mul_of_one_le_left' (ENNReal.one_le_rpow h2s hp |>.trans_eq' rfl) + · rw [← ENNReal.rpow_mul] + exact ENNReal.rpow_le_rpow_of_exponent_le one_le_two + (max_le (by linarith) (by positivity)) + _ = (2 ^ s) ^ p * (‖f‖ₑ ^ p + D ^ p) := by rw [mul_add] + calc A.approxNorm s q f = (A.approxNorm s q f ^ p) ^ (1 / p) := by + rw [one_div, ENNReal.rpow_rpow_inv hp.ne'] + _ ≤ ((2 ^ s) ^ p * (‖f‖ₑ ^ p + D ^ p)) ^ (1 / p) := by gcongr + _ = 2 ^ s * (‖f‖ₑ ^ p + D ^ p) ^ (1 / p) := by + rw [ENNReal.mul_rpow_of_nonneg _ _ (by positivity), one_div, ENNReal.rpow_rpow_inv hp.ne'] + _ ≤ 2 ^ s * (LpAddConst q * (‖f‖ₑ + D)) := by + gcongr; exact ENNReal.rpow_add_rpow_le_LpAddConst_mul hq0 hq' _ _ + _ = LpAddConst q * 2 ^ s * A.approxNormDyadic s q f := by rw [approxNormDyadic]; ring + +/-- **Pietsch's quasi-norm is dominated by the dyadic one**: for `s ≥ 0` and `1 ≤ q ≤ ∞`, +`‖f‖_{A^s_q} ≤ 2^s (‖f‖ + ‖(2^(ks) E_{2^k}(f))_k‖_q)`, the case `LpAddConst q = 1` of +`ApproximationScheme.approxNorm_le_approxNormDyadic'`. -/ +theorem approxNorm_le_approxNormDyadic (hq : 1 ≤ q) (hs : 0 ≤ s) (f : X) : + A.approxNorm s q f ≤ 2 ^ s * A.approxNormDyadic s q f := by + simpa [LpAddConst_of_one_le hq] using + approxNorm_le_approxNormDyadic' (zero_lt_one.trans_le hq).ne' hs f + +/-- **The shifted dyadic sequence**, for every `q ≠ 0`: `(2^(ks) E_{2^(k+1)}(f))_k` has `ℓ_q` norm +at most `2 C_q ‖f‖_{A^s_q}` for `s ≥ 0`, with Mathlib's constant `C_q = LpAddConst q`. Cauchy +condensation bounds the `q`-th power by `2^(max(1 - sq, 0)) ≤ 2 ≤ (2 C_q)^q` times +`‖f‖_{A^s_q}^q` (`ENNReal.two_rpow_one_div_le_two_mul_LpAddConst`). -/ +theorem lqNorm_dyadic_succ_le' (hq0 : q ≠ 0) (hs : 0 ≤ s) (f : X) : + lqNorm q (fun k => dyadicWeight s k * A.approxError f (2 ^ (k + 1))) ≤ + 2 * LpAddConst q * A.approxNorm s q f := by + rcases eq_or_ne q ∞ with rfl | hq' + · rw [ENNReal.lqNorm_top, LpAddConst_of_one_le le_top, mul_one] + calc ⨆ k, dyadicWeight s k * A.approxError f (2 ^ (k + 1)) + ≤ ⨆ k, dyadicWeight s k * A.approxError f (2 ^ k) := iSup_mono fun k => by + gcongr + exact approxError_anti f (Nat.pow_le_pow_right two_pos (Nat.le_succ k)) + _ ≤ ⨆ n, ((n + 1 : ℕ) : ℝ≥0∞) ^ s * A.approxError f n := ENNReal.dyadic_le_iSup_pow_mul hs + _ = A.approxNorm s ∞ f := (approxNorm_top s f).symm + _ ≤ 2 * A.approxNorm s ∞ f := le_mul_of_one_le_left' one_le_two + have hp : 0 < q.toReal := ENNReal.toReal_pos hq0 hq' + set p := q.toReal + have hb : Antitone fun n => A.approxError f n ^ p := fun m n h => + ENNReal.rpow_le_rpow (approxError_anti f h) hp.le + have h2 : (2 : ℝ≥0∞) ≤ (2 * LpAddConst q) ^ p := by + calc (2 : ℝ≥0∞) = ((2 : ℝ≥0∞) ^ (1 / p)) ^ p := by + rw [← ENNReal.rpow_mul, one_div_mul_cancel hp.ne', ENNReal.rpow_one] + _ ≤ (2 * LpAddConst q) ^ p := + ENNReal.rpow_le_rpow (ENNReal.two_rpow_one_div_le_two_mul_LpAddConst q) hp.le + rw [← ENNReal.rpow_le_rpow_iff hp, ENNReal.lqNorm_rpow hq0 hq'] + calc ∑' k, (dyadicWeight s k * A.approxError f (2 ^ (k + 1))) ^ p + = ∑' k, dyadicWeight (s * p - 1 + 1) k * A.approxError f (2 ^ (k + 1)) ^ p := by + congr 1; funext k + rw [ENNReal.mul_rpow_of_nonneg _ _ hp.le, ENNReal.dyadicWeight_rpow, sub_add_cancel] + _ ≤ 2 ^ max (-(s * p - 1)) 0 * ∑' n, ((n + 1 : ℕ) : ℝ≥0∞) ^ (s * p - 1) * + A.approxError f n ^ p := ENNReal.dyadic_le_tsum_pow_mul hb _ + _ = 2 ^ max (-(s * p - 1)) 0 * A.approxNorm s q f ^ p := by rw [approxNorm_rpow hq0 hq'] + _ ≤ (2 * LpAddConst q) ^ p * A.approxNorm s q f ^ p := by + have hsp : 0 ≤ s * p := mul_nonneg hs hp.le + gcongr ?_ * _ + refine le_trans ?_ h2 + calc (2 : ℝ≥0∞) ^ max (-(s * p - 1)) 0 ≤ 2 ^ (1 : ℝ) := + ENNReal.rpow_le_rpow_of_exponent_le one_le_two (max_le (by linarith) zero_le_one) + _ = 2 := ENNReal.rpow_one 2 + _ = (2 * LpAddConst q * A.approxNorm s q f) ^ p := (ENNReal.mul_rpow_of_nonneg _ _ hp.le).symm + +/-- The shifted dyadic sequence `(2^(ks) E_{2^(k+1)}(f))_k` is dominated by twice Pietsch's +quasi-norm for `1 ≤ q ≤ ∞`, the case `LpAddConst q = 1` of +`ApproximationScheme.lqNorm_dyadic_succ_le'`. -/ +theorem lqNorm_dyadic_succ_le (hq : 1 ≤ q) (hs : 0 ≤ s) (f : X) : + lqNorm q (fun k => dyadicWeight s k * A.approxError f (2 ^ (k + 1))) ≤ + 2 * A.approxNorm s q f := by + simpa [LpAddConst_of_one_le hq] using lqNorm_dyadic_succ_le' (zero_lt_one.trans_le hq).ne' hs f + +/-- **The dyadic quasi-norm is dominated by Pietsch's**, for every `q ≠ 0`: for `s ≥ 0`, +`‖f‖ + ‖(2^(ks) E_{2^k}(f))_k‖_q ≤ 4 C_q² 2^s ‖f‖_{A^s_q}` with Mathlib's constant +`C_q = LpAddConst q` of the quasi-triangle inequality (`1` for `q ≥ 1`). The first dyadic term is +`E_1(f) ≤ ‖f‖`, and the shifted ones are bounded by `ApproximationScheme.lqNorm_dyadic_succ_le'`; +splitting off the first term costs `C_q` (`ENNReal.lqNorm_le_head_add_shift'`). -/ +theorem approxNormDyadic_le_approxNorm' (hq0 : q ≠ 0) (hs : 0 ≤ s) (f : X) : + A.approxNormDyadic s q f ≤ LpAddConst q ^ 2 * 4 * 2 ^ s * A.approxNorm s q f := by + set P := A.approxNorm s q f + set C := LpAddConst q + have h2s := ENNReal.one_le_two_rpow hs + have hC : 1 ≤ C := ENNReal.one_le_LpAddConst q + have h1 : 1 ≤ C ^ 2 * 2 ^ s := + (one_mul (1 : ℝ≥0∞)).symm.le.trans (mul_le_mul' (one_le_pow₀ hC) h2s) + have hC2 : C ≤ C ^ 2 * 2 ^ s := + calc C = C * 1 * 1 := by ring + _ ≤ C * C * 2 ^ s := by gcongr + _ = C ^ 2 * 2 ^ s := by ring + have hfP : ‖f‖ₑ ≤ P := enorm_le_approxNorm hq0 f + have hhead : A.approxSeqDyadic s f 0 ≤ P := by + rw [approxSeqDyadic_zero]; exact (approxError_le_enorm f 1).trans hfP + have hshift : lqNorm q (fun k => A.approxSeqDyadic s f (k + 1)) ≤ 2 ^ s * (2 * C * P) := by + have : (fun k => A.approxSeqDyadic s f (k + 1)) = + fun k => 2 ^ s * (dyadicWeight s k * A.approxError f (2 ^ (k + 1))) := by + funext k; rw [approxSeqDyadic, ENNReal.dyadicWeight_succ, mul_assoc] + rw [this, ENNReal.lqNorm_const_mul] + gcongr + exact lqNorm_dyadic_succ_le' hq0 hs f + calc A.approxNormDyadic s q f = ‖f‖ₑ + lqNorm q (A.approxSeqDyadic s f) := rfl + _ ≤ P + C * (P + 2 ^ s * (2 * C * P)) := by + gcongr + exact (ENNReal.lqNorm_le_head_add_shift' q _).trans (by gcongr) + _ = (1 + C + 2 * C ^ 2 * 2 ^ s) * P := by ring + _ ≤ (C ^ 2 * 2 ^ s + C ^ 2 * 2 ^ s + 2 * C ^ 2 * 2 ^ s) * P := by gcongr + _ = C ^ 2 * 4 * 2 ^ s * P := by ring + +/-- **The dyadic quasi-norm is dominated by Pietsch's**: for `s ≥ 0` and `1 ≤ q ≤ ∞`, +`‖f‖ + ‖(2^(ks) E_{2^k}(f))_k‖_q ≤ 4 · 2^s ‖f‖_{A^s_q}`, the case `LpAddConst q = 1` of +`ApproximationScheme.approxNormDyadic_le_approxNorm'`. -/ +theorem approxNormDyadic_le_approxNorm (hq : 1 ≤ q) (hs : 0 ≤ s) (f : X) : + A.approxNormDyadic s q f ≤ 4 * 2 ^ s * A.approxNorm s q f := by + simpa [LpAddConst_of_one_le hq] using + approxNormDyadic_le_approxNorm' (zero_lt_one.trans_le hq).ne' hs f + +/-- For `s ≥ 0` and every `q ≠ 0`, `f ∈ A^s_q` iff its dyadic quasi-norm is finite. -/ +theorem memApprox_iff_approxNormDyadic_lt_top' (hq0 : q ≠ 0) (hs : 0 ≤ s) {f : X} : + A.MemApprox s q f ↔ A.approxNormDyadic s q f < ∞ := by + have hC := ENNReal.LpAddConst_lt_top q + constructor + · intro hf + refine (approxNormDyadic_le_approxNorm' hq0 hs f).trans_lt (ENNReal.mul_lt_top ?_ hf) + exact ENNReal.mul_lt_top (ENNReal.mul_lt_top (ENNReal.pow_ne_top hC.ne).lt_top (by norm_num)) + (ENNReal.two_rpow_ne_top s).lt_top + · intro hf + exact (approxNorm_le_approxNormDyadic' hq0 hs f).trans_lt + (ENNReal.mul_lt_top (ENNReal.mul_lt_top hC (ENNReal.two_rpow_ne_top s).lt_top) hf) + +/-- For `s ≥ 0` and `1 ≤ q ≤ ∞`, `f ∈ A^s_q` iff its dyadic quasi-norm is finite. -/ +theorem memApprox_iff_approxNormDyadic_lt_top (hq : 1 ≤ q) (hs : 0 ≤ s) {f : X} : + A.MemApprox s q f ↔ A.approxNormDyadic s q f < ∞ := + memApprox_iff_approxNormDyadic_lt_top' (zero_lt_one.trans_le hq).ne' hs + +/-- For `s ≥ 0` and every `q ≠ 0`, `f ∈ A^s_q` iff `(2^(ks) E_{2^k}(f))_k ∈ ℓ_q`. -/ +theorem memApprox_iff_lqNorm_dyadic_lt_top' (hq0 : q ≠ 0) (hs : 0 ≤ s) {f : X} : + A.MemApprox s q f ↔ lqNorm q (A.approxSeqDyadic s f) < ∞ := by + rw [memApprox_iff_approxNormDyadic_lt_top' hq0 hs, approxNormDyadic, ENNReal.add_lt_top] + exact and_iff_right eNorm_lt_top + +/-- For `s ≥ 0` and `1 ≤ q ≤ ∞`, `f ∈ A^s_q` iff `(2^(ks) E_{2^k}(f))_k ∈ ℓ_q`. -/ +theorem memApprox_iff_lqNorm_dyadic_lt_top (hq : 1 ≤ q) (hs : 0 ≤ s) {f : X} : + A.MemApprox s q f ↔ lqNorm q (A.approxSeqDyadic s f) < ∞ := + memApprox_iff_lqNorm_dyadic_lt_top' (zero_lt_one.trans_le hq).ne' hs + +/-- A bound on the dyadic quasi-norm gives the decay `E_{2^k}(f) ≤ 2^(-ks) ‖f‖^dyadic`, for every +`q ≠ 0`. -/ +theorem approxError_pow_le (hq0 : q ≠ 0) (f : X) (k : ℕ) : + A.approxError f (2 ^ k) ≤ dyadicWeight (-s) k * lqNorm q (A.approxSeqDyadic s f) := by + calc A.approxError f (2 ^ k) = dyadicWeight (-s) k * A.approxSeqDyadic s f k := by + rw [approxSeqDyadic, ← mul_assoc, ENNReal.dyadicWeight_neg_mul_self, one_mul] + _ ≤ _ := by gcongr; exact approxSeqDyadic_le_lqNorm hq0 f k + +/-- **The quasi-norm of `A^s_∞` of an approximant**: for `a ∈ A_{2^k}`, `E_{2^j}(a) = 0` for +`j ≥ k`, hence `‖a‖_{A^s_∞} ≤ ‖a‖ + ∑_{j ?_ + rcases lt_or_ge j k with hj | hj + · exact Finset.single_le_sum (f := A.approxSeqDyadic s a) (fun _ _ => zero_le) + (Finset.mem_range.2 hj) + · rw [approxSeqDyadic, + approxError_eq_zero_of_mem (mem_of_le (Nat.pow_le_pow_right two_pos hj) ha), mul_zero] + exact zero_le + +/-- For `f ∈ A^s_q` with `s > 0`, the dyadic errors `E_{2^k}(f)` tend to zero. -/ +theorem tendsto_approxError_pow_zero_of_memApprox (hq : 1 ≤ q) (hs : 0 < s) {f : X} + (hf : A.MemApprox s q f) : Tendsto (fun k => A.approxError f (2 ^ k)) atTop (𝓝 0) := by + have hD := (memApprox_iff_lqNorm_dyadic_lt_top hq hs.le).1 hf + set D := lqNorm q (A.approxSeqDyadic s f) + have hgeom : Tendsto (fun k => D * ((2 : ℝ≥0∞) ^ (-s)) ^ k) atTop (𝓝 0) := by + simpa using ENNReal.Tendsto.const_mul + (ENNReal.tendsto_pow_atTop_nhds_zero_of_lt_one (ENNReal.two_rpow_neg_lt_one hs)) + (Or.inr hD.ne) + exact tendsto_of_tendsto_of_tendsto_of_le_of_le tendsto_const_nhds hgeom (fun _ => bot_le) + fun k => by + rw [mul_comm, ← ENNReal.dyadicWeight_eq_pow] + exact approxError_pow_le (zero_lt_one.trans_le hq).ne' f k + +/-- **`A^s_q` lies in the closure of `⋃ A n`** for `s > 0`. -/ +theorem mem_closure_iUnion_of_memApprox (hq : 1 ≤ q) (hs : 0 < s) {f : X} + (hf : A.MemApprox s q f) : f ∈ closure (⋃ n, A n) := + (tendsto_approxError_zero_iff f).1 + (tendsto_approxError_zero_of_pow (tendsto_approxError_pow_zero_of_memApprox hq hs hf)) + +end ApproximationScheme diff --git a/LeanPool/FunctionSpaces/ApproximationSpaces/Embedding.lean b/LeanPool/FunctionSpaces/ApproximationSpaces/Embedding.lean new file mode 100644 index 0000000000..2b2fc6e655 --- /dev/null +++ b/LeanPool/FunctionSpaces/ApproximationSpaces/Embedding.lean @@ -0,0 +1,133 @@ +/- +Copyright (c) 2026 Mario Ullrich. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Mario Ullrich +-/ +module + +public import LeanPool.FunctionSpaces.ApproximationSpaces.Space + +/- +Modified for Lean Pool: module names and imports adapted. +-/ + +/-! +# Embeddings between approximation spaces + +For a fixed scheme, the approximation spaces are ordered as follows (Pietsch, DeVore–Lorentz +§7.9): + +* `A^s_q ↪ A^s_r` for `q ≤ r`: the fine index may be increased + (`approxNormDyadic_mono_exponent`); +* `A^s_q ↪ A^t_r` for `t < s` and any `q, r`: a loss in smoothness absorbs any change of the + fine index (`approxNormDyadic_le_of_lt`), with the constant `(1 - 2^(-(s-t)))⁻¹`. + +In the dyadic form both are elementary: the first is the monotonicity of `ℓ_q` norms in `q`, +the second the bound `2^(kt) E_{2^k} ≤ 2^(-k(s-t)) · sup_j 2^(js) E_{2^j}` and the `ℓ_r` norm of +a geometric sequence. Both are transported to Pietsch's quasi-norm, and combined in +`MemApprox.mono`. +-/ + +@[expose] public section + +open scoped ENNReal + +namespace ApproximationScheme + +open ENNReal (lqNorm dyadicWeight) + +variable {X : Type*} [NormedAddCommGroup X] [NormedSpace ℝ X] + +variable {A : ApproximationScheme X} {s t : ℝ} {q r : ℝ≥0∞} + +/-- **Increasing the fine index**: `‖f‖_{A^s_r} ≤ ‖f‖_{A^s_q}` in the dyadic form, for +`0 < q ≤ r`. -/ +theorem approxNormDyadic_mono_exponent (hq0 : q ≠ 0) (hqr : q ≤ r) (f : X) : + A.approxNormDyadic s r f ≤ A.approxNormDyadic s q f := by + unfold approxNormDyadic + gcongr + exact ENNReal.lqNorm_le_lqNorm_of_le hq0 hqr _ + +/-- Changing the smoothness index multiplies the dyadic terms by `2^(k(t-s))`. -/ +theorem approxSeqDyadic_eq_mul (s t : ℝ) (f : X) (k : ℕ) : + A.approxSeqDyadic t f k = dyadicWeight (t - s) k * A.approxSeqDyadic s f k := by + rw [approxSeqDyadic, approxSeqDyadic, ← mul_assoc, ← ENNReal.dyadicWeight_add, sub_add_cancel] + +/-- **Trading smoothness for the fine index**: for `t < s` and `1 ≤ q, r ≤ ∞`, +`‖f‖_{A^t_r} ≤ (1 - 2^(-(s-t)))⁻¹ ‖f‖_{A^s_q}` in the dyadic form. -/ +theorem approxNormDyadic_le_of_lt (hq : 1 ≤ q) (hr : 1 ≤ r) (f : X) : + A.approxNormDyadic t r f ≤ (1 - (2 : ℝ≥0∞) ^ (-(s - t)))⁻¹ * A.approxNormDyadic s q f := by + set C := (1 - (2 : ℝ≥0∞) ^ (-(s - t)))⁻¹ + set D := lqNorm q (A.approxSeqDyadic s f) + have hC : 1 ≤ C := ENNReal.one_le_one_sub_two_rpow_neg_inv _ + have hD : lqNorm r (A.approxSeqDyadic t f) ≤ C * D := by + calc lqNorm r (A.approxSeqDyadic t f) + ≤ lqNorm r (fun k => D * dyadicWeight (-(s - t)) k) := ENNReal.lqNorm_mono fun k => by + rw [approxSeqDyadic_eq_mul s t, show t - s = -(s - t) by ring, mul_comm D] + gcongr + exact approxSeqDyadic_le_lqNorm (zero_lt_one.trans_le hq).ne' f k + _ = D * lqNorm r (dyadicWeight (-(s - t))) := ENNReal.lqNorm_const_mul _ _ + _ ≤ D * C := by gcongr; exact ENNReal.lqNorm_dyadicWeight_neg_le hr _ + _ = C * D := mul_comm _ _ + calc A.approxNormDyadic t r f = ‖f‖ₑ + lqNorm r (A.approxSeqDyadic t f) := rfl + _ ≤ C * ‖f‖ₑ + C * D := add_le_add (le_mul_of_one_le_left' hC) hD + _ = C * A.approxNormDyadic s q f := by rw [approxNormDyadic, mul_add] + +/-- **Increasing the fine index** for Pietsch's quasi-norm, `s ≥ 0`, `1 ≤ q ≤ r`. -/ +theorem approxNorm_le_of_exponent_le (hq : 1 ≤ q) (hqr : q ≤ r) (hs : 0 ≤ s) (f : X) : + A.approxNorm s r f ≤ 2 ^ s * (4 * 2 ^ s) * A.approxNorm s q f := by + calc A.approxNorm s r f ≤ 2 ^ s * A.approxNormDyadic s r f := + approxNorm_le_approxNormDyadic (hq.trans hqr) hs f + _ ≤ 2 ^ s * A.approxNormDyadic s q f := by + gcongr; exact approxNormDyadic_mono_exponent (zero_lt_one.trans_le hq).ne' hqr f + _ ≤ 2 ^ s * (4 * 2 ^ s * A.approxNorm s q f) := by + gcongr; exact approxNormDyadic_le_approxNorm hq hs f + _ = _ := by ring + +/-- **Trading smoothness for the fine index** for Pietsch's quasi-norm, `0 ≤ t < s`. -/ +theorem approxNorm_le_of_lt (hq : 1 ≤ q) (hr : 1 ≤ r) (ht : 0 ≤ t) (hts : t < s) (f : X) : + A.approxNorm t r f ≤ + 2 ^ t * (1 - (2 : ℝ≥0∞) ^ (-(s - t)))⁻¹ * (4 * 2 ^ s) * A.approxNorm s q f := by + calc A.approxNorm t r f ≤ 2 ^ t * A.approxNormDyadic t r f := + approxNorm_le_approxNormDyadic hr ht f + _ ≤ 2 ^ t * ((1 - (2 : ℝ≥0∞) ^ (-(s - t)))⁻¹ * A.approxNormDyadic s q f) := by + gcongr; exact approxNormDyadic_le_of_lt hq hr f + _ ≤ 2 ^ t * ((1 - (2 : ℝ≥0∞) ^ (-(s - t)))⁻¹ * (4 * 2 ^ s * A.approxNorm s q f)) := by + gcongr; exact approxNormDyadic_le_approxNorm hq (ht.trans hts.le) f + _ = _ := by ring + +/-- `A^s_q ⊆ A^s_r` for `1 ≤ q ≤ r` and `s ≥ 0`. -/ +theorem MemApprox.mono_exponent (hq : 1 ≤ q) (hqr : q ≤ r) (hs : 0 ≤ s) {f : X} + (hf : A.MemApprox s q f) : A.MemApprox s r f := by + rw [memApprox_iff_approxNormDyadic_lt_top hq hs] at hf + rw [memApprox_iff_approxNormDyadic_lt_top (hq.trans hqr) hs] + exact (approxNormDyadic_mono_exponent (zero_lt_one.trans_le hq).ne' hqr f).trans_lt hf + +/-- `A^s_q ⊆ A^t_r` for `0 ≤ t < s` and all `1 ≤ q, r ≤ ∞`. -/ +theorem MemApprox.of_lt (hq : 1 ≤ q) (hr : 1 ≤ r) (ht : 0 ≤ t) (hts : t < s) {f : X} + (hf : A.MemApprox s q f) : A.MemApprox t r f := by + rw [memApprox_iff_approxNormDyadic_lt_top hq (ht.trans hts.le)] at hf + rw [memApprox_iff_approxNormDyadic_lt_top hr ht] + exact (approxNormDyadic_le_of_lt hq hr f).trans_lt + (ENNReal.mul_lt_top (ENNReal.one_sub_two_rpow_neg_inv_ne_top (sub_pos.2 hts)).lt_top hf) + +/-- **The embeddings `A^s_q ↪ A^t_r`**: for `0 ≤ t` and either `t < s`, or `t = s` and +`q ≤ r`, every element of `A^s_q` belongs to `A^t_r`. -/ +theorem MemApprox.mono (hq : 1 ≤ q) (hr : 1 ≤ r) (ht : 0 ≤ t) + (h : t < s ∨ (t = s ∧ q ≤ r)) {f : X} (hf : A.MemApprox s q f) : A.MemApprox t r f := by + rcases h with h | ⟨rfl, hqr⟩ + · exact hf.of_lt hq hr ht h + · exact hf.mono_exponent hq hqr ht + +/-- The approximation spaces decrease in `s` and increase in `q`, as submodules. -/ +theorem approxSpace_mono (hq : 1 ≤ q) (hr : 1 ≤ r) (ht : 0 ≤ t) (hs : 0 ≤ s) + (h : t < s ∨ (t = s ∧ q ≤ r)) : A.approxSpace s q hs hq ≤ A.approxSpace t r ht hr := + fun _ hf => MemApprox.mono hq hr ht h hf + +/-- For `0 ≤ t < s`, the dyadic series `∑ₖ 2^(kt) E_{2^k}(f)` converges for `f ∈ A^s_q`. This +is the form in which telescoping arguments use membership. -/ +theorem MemApprox.lqNorm_one_lt_top (hq : 1 ≤ q) (ht : 0 ≤ t) (hts : t < s) {f : X} + (hf : A.MemApprox s q f) : lqNorm 1 (A.approxSeqDyadic t f) < ∞ := + (memApprox_iff_lqNorm_dyadic_lt_top le_rfl ht).1 (hf.of_lt hq le_rfl ht hts) + +end ApproximationScheme diff --git a/LeanPool/FunctionSpaces/ApproximationSpaces/Error.lean b/LeanPool/FunctionSpaces/ApproximationSpaces/Error.lean new file mode 100644 index 0000000000..7335e34043 --- /dev/null +++ b/LeanPool/FunctionSpaces/ApproximationSpaces/Error.lean @@ -0,0 +1,255 @@ +/- +Copyright (c) 2026 Mario Ullrich. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Mario Ullrich +-/ +module + +public import LeanPool.FunctionSpaces.ApproximationSpaces.Scheme +public import Mathlib.Analysis.Normed.Module.Ball.Pointwise +public import Mathlib.Analysis.Normed.Operator.NNNorm +public import Mathlib.Analysis.SpecialFunctions.Pow.NNReal +public import Mathlib.Topology.MetricSpace.HausdorffDistance + +/- +Modified for Lean Pool: module names and imports adapted. +-/ + +/-! +# The error of best approximation + +For an approximation scheme `A` in a normed space `X`, the **error of best approximation** of +`f ∈ X` from `A n` is + +`E_n(f) = inf { ‖f - a‖ : a ∈ A n }`, + +in Lean `A.approxError f n`, defined as the extended distance `Metric.infEDist f (A n)` with +values in `ℝ≥0∞`; it is finite (`approxError_ne_top`). This file collects its calculus: +`E_0(f) = ‖f‖`, `E_n(f) ≤ ‖f‖`, `E_n` decreases in `n`, the bounds `r ≤ E_n(f)` and +`r ≤ E_n(f)²` through all approximants, `E_n(c f) = |c| E_n(f)`, +`E_{m+n}(f + g) ≤ E_m(f) + E_n(g)`, `E_n(f) ≤ E_n(g) + ‖f - g‖`, `E_n(f) → 0` exactly for `f` +in the closure of `⋃ A n`, a bounded linear map `T` with `T (A n) ⊆ B n` satisfies +`E^B_n(T f) ≤ ‖T‖ E^A_n(f)`, and bounds by a subadditive modulus pass from a dense set to all +of `X`. The Lebesgue inequality `‖f - P f‖ ≤ (1 + C) ‖f - a‖` holds for every additive map `P` +with `‖P x‖ ≤ C ‖x‖` that fixes `a`. + +A best approximant need not exist, since the sets `A n` need not be closed (sets of `n`-term +approximants are in general not closed). Proofs pick approximants `a ∈ A n` with +`‖f - a‖ ≤ E_n(f) + ε` (`ApproximationScheme.exists_mem_enorm_sub_le_add`), or bound `E_n(f)` +through every approximant at once (`ApproximationScheme.le_mul_approxError_of_forall_mem`). +-/ + +@[expose] public section + +open Filter Topology +open scoped ENNReal + +namespace ApproximationScheme + +variable {X Y : Type*} [NormedAddCommGroup X] [NormedSpace ℝ X] + [NormedAddCommGroup Y] [NormedSpace ℝ Y] + +variable (A : ApproximationScheme X) + +/-- The **error of best approximation** `E_n(f) = inf_{a ∈ A n} ‖f - a‖ ∈ [0, ∞]` of `f` from +the approximants of complexity `n`, the extended distance from `f` to `A n`. -/ +noncomputable def approxError (f : X) (n : ℕ) : ℝ≥0∞ := Metric.infEDist f (A n) + +variable {A} + +/-- The errors are finite, since `A n` is nonempty. -/ +theorem approxError_ne_top (f : X) (n : ℕ) : A.approxError f n ≠ ∞ := + Metric.infEDist_ne_top (A.nonempty n) + +/-- Every approximant gives an upper bound: `E_n(f) ≤ ‖f - a‖` for `a ∈ A_n`. -/ +theorem approxError_le_of_mem {n : ℕ} {a : X} (ha : a ∈ A n) (f : X) : + A.approxError f n ≤ ‖f - a‖ₑ := by + rw [← eDist_eq_eNorm_sub]; exact Metric.infEDist_le_edist_of_mem ha + +/-- The error never exceeds the norm, since `0` is an approximant. -/ +theorem approxError_le_enorm (f : X) (n : ℕ) : A.approxError f n ≤ ‖f‖ₑ := by + simpa using approxError_le_of_mem (A.zero_mem n) f + +/-- `E_n(0) = 0`. -/ +@[simp] +theorem approxError_zero_left (n : ℕ) : A.approxError 0 n = 0 := + Metric.infEDist_zero_of_mem (A.zero_mem n) + +/-- `E_0(f) = ‖f‖`, because `A 0 = {0}`. -/ +@[simp] +theorem approxError_zero_right (f : X) : A.approxError f 0 = ‖f‖ₑ := by + simp [approxError, A.coe_zero, Metric.infEDist_singleton] + +/-- `E_n(f) = 0` for `f ∈ A_n`. -/ +theorem approxError_eq_zero_of_mem {n : ℕ} {f : X} (hf : f ∈ A n) : A.approxError f n = 0 := + Metric.infEDist_zero_of_mem hf + +/-- `E_n(f) = 0` for `f` in the closure of `A_n`. -/ +theorem approxError_eq_zero_of_mem_closure {n : ℕ} {f : X} (hf : f ∈ closure (A n)) : + A.approxError f n = 0 := + Metric.mem_closure_iff_infEDist_zero.1 hf + +/-- The error decreases as the complexity grows. -/ +theorem approxError_anti (f : X) : Antitone (A.approxError f) := fun _ _ h => + Metric.infEDist_anti (A.mono h) + +/-- A scheme with larger sets has smaller errors. -/ +theorem approxError_anti_scheme {A' : ApproximationScheme X} (h : ∀ n, A n ⊆ A' n) (f : X) + (n : ℕ) : A'.approxError f n ≤ A.approxError f n := + Metric.infEDist_anti (h n) + +/-- `r ≤ E_n(f)` iff `r ≤ ‖f - a‖` for every `a ∈ A_n`. -/ +theorem le_approxError_iff {n : ℕ} {f : X} {r : ℝ≥0∞} : + r ≤ A.approxError f n ↔ ∀ a ∈ A n, r ≤ ‖f - a‖ₑ := by + simp only [approxError, Metric.le_infEDist, eDist_eq_eNorm_sub] + +/-- `r ≤ E_n(f)²` iff `r ≤ ‖f - a‖²` for every `a ∈ A_n`. Squaring preserves the order of +`[0, ∞]` (`ENNReal.rpow_inv_le_iff`), so `le_approxError_iff` applies to `r^(1/2)`. -/ +theorem le_approxError_sq_iff {n : ℕ} {f : X} {r : ℝ≥0∞} : + r ≤ A.approxError f n ^ 2 ↔ ∀ a ∈ A n, r ≤ ‖f - a‖ₑ ^ 2 := by + have h2 : (0 : ℝ) < 2 := two_pos + simp_rw [← ENNReal.rpow_two, ← ENNReal.rpow_inv_le_iff h2] + exact le_approxError_iff + +/-- If the error is below `r`, some approximant is closer than `r`. -/ +theorem exists_mem_enorm_sub_lt {n : ℕ} {f : X} {r : ℝ≥0∞} (h : A.approxError f n < r) : + ∃ a ∈ A n, ‖f - a‖ₑ < r := by + simpa [eDist_eq_eNorm_sub] using Metric.infEDist_lt_iff.1 h + +/-- **Near-best approximants.** For every `ε > 0` there is `a ∈ A n` with +`‖f - a‖ ≤ E_n(f) + ε`. A best approximant (`ε = 0`) need not exist. -/ +theorem exists_mem_enorm_sub_le_add (n : ℕ) (f : X) {ε : ℝ≥0∞} (hε : ε ≠ 0) : + ∃ a ∈ A n, ‖f - a‖ₑ ≤ A.approxError f n + ε := by + obtain ⟨a, ha, h⟩ := exists_mem_enorm_sub_lt (ENNReal.lt_add_right (approxError_ne_top f n) hε) + exact ⟨a, ha, h.le⟩ + +/-- To bound a quantity by `C · E_n(f)` with `C < ∞` it suffices to bound it by `C ‖f - a‖` +for every approximant `a`. The finiteness of `C` is needed: for `C = ∞` and `f` in the +closure of `A n` outside `A n`, every `C ‖f - a‖` is `∞`, so the hypothesis holds for every +`e`, while `C · E_n(f) = ∞ · 0 = 0`. -/ +theorem le_mul_approxError_of_forall_mem {n : ℕ} {f : X} {e C : ℝ≥0∞} (hC : C ≠ ∞) + (h : ∀ a ∈ A n, e ≤ C * ‖f - a‖ₑ) : e ≤ C * A.approxError f n := by + rcases eq_or_ne C 0 with rfl | hC0 + · simpa using h 0 (A.zero_mem n) + rw [mul_comm, ← ENNReal.div_le_iff hC0 hC, le_approxError_iff] + exact fun a ha => (ENNReal.div_le_iff hC0 hC).2 (by rw [mul_comm]; exact h a ha) + +/-- **Subadditivity** for any three complexities with `A m + A n ⊆ A k`: +`E_k(f + g) ≤ E_m(f) + E_n(g)`. -/ +theorem approxError_add_le_of_add_mem {m n k : ℕ} (h : ∀ a ∈ A m, ∀ b ∈ A n, a + b ∈ A k) + (f g : X) : A.approxError (f + g) k ≤ A.approxError f m + A.approxError g n := by + refine ENNReal.le_iInf₂_add_iInf₂ fun a ha b hb => ?_ + calc A.approxError (f + g) k ≤ edist (f + g) (a + b) := + Metric.infEDist_le_edist_of_mem (h a ha b hb) + _ ≤ edist f a + edist g b := edist_add_add_le f g a b + +/-- **Subadditivity**: `E_{m+n}(f + g) ≤ E_m(f) + E_n(g)`, because `A m + A n ⊆ A (m + n)`. -/ +theorem approxError_add_le (m n : ℕ) (f g : X) : + A.approxError (f + g) (m + n) ≤ A.approxError f m + A.approxError g n := + approxError_add_le_of_add_mem (fun _ ha _ hb => add_mem ha hb) f g + +/-- The dyadic form of subadditivity: `E_{2^(k+1)}(f + g) ≤ E_{2^k}(f) + E_{2^k}(g)`. -/ +theorem approxError_add_le_pow_succ (k : ℕ) (f g : X) : + A.approxError (f + g) (2 ^ (k + 1)) ≤ A.approxError f (2 ^ k) + A.approxError g (2 ^ k) := + approxError_add_le_of_add_mem (fun _ ha _ hb => A.add_mem_pow_succ ha hb) f g + +/-- **Homogeneity**: `E_n(c f) = |c| E_n(f)`, because `c • A n = A n` for `c ≠ 0`. -/ +theorem approxError_smul (c : ℝ) (f : X) (n : ℕ) : + A.approxError (c • f) n = ‖c‖ₑ * A.approxError f n := by + rcases eq_or_ne c 0 with rfl | hc + · simp + · have := infEDist_smul₀ hc (A n) f + rw [A.smul_set_eq hc n, ENNReal.smul_def, smul_eq_mul] at this + exact this + +/-- `E_n(-f) = E_n(f)`. -/ +@[simp] +theorem approxError_neg (f : X) (n : ℕ) : A.approxError (-f) n = A.approxError f n := by + simpa using approxError_smul (A := A) (-1) f n + +/-- `E_n(f) ≤ E_n(g) + ‖f - g‖`: the error is `1`-Lipschitz in `f`. -/ +theorem approxError_le_approxError_add_enorm (n : ℕ) (f g : X) : + A.approxError f n ≤ A.approxError g n + ‖f - g‖ₑ := by + rw [← eDist_eq_eNorm_sub]; exact Metric.infEDist_le_infEDist_add_edist + +/-- `E_n` is continuous in `f`, being `1`-Lipschitz. -/ +theorem continuous_approxError (n : ℕ) : Continuous (A.approxError · n) := + Metric.continuous_infEDist + +/-- The errors tend to zero exactly for the elements of the closure of `⋃ n, A n`: the +decreasing errors tend to their infimum, the distance from `f` to `⋃ n, A n`. -/ +theorem tendsto_approxError_zero_iff (f : X) : + Tendsto (A.approxError f) atTop (𝓝 0) ↔ f ∈ closure (⋃ n, A n) := by + have h := tendsto_atTop_iInf (approxError_anti (A := A) f) + rw [Metric.mem_closure_iff_infEDist_zero, Metric.infEDist_iUnion] + exact ⟨fun h0 => tendsto_nhds_unique h h0, fun h0 => h0 ▸ h⟩ + +/-- Since the errors decrease, they tend to zero as soon as the dyadic errors `E_{2^k}` do. -/ +theorem tendsto_approxError_zero_of_pow {f : X} + (h : Tendsto (fun k => A.approxError f (2 ^ k)) atTop (𝓝 0)) : + Tendsto (A.approxError f) atTop (𝓝 0) := by + rw [ENNReal.tendsto_atTop_zero_iff_le_of_antitone (approxError_anti f)] + intro ε hε + obtain ⟨N, hN⟩ := ENNReal.tendsto_atTop_zero.1 h ε hε + exact ⟨2 ^ N, hN N le_rfl⟩ + +/-- **Functoriality of the error**: a bounded linear map that sends approximants to +approximants satisfies `E^B_n(T f) ≤ ‖T‖ E^A_n(f)`. -/ +theorem approxError_map_le {B : ApproximationScheme Y} (T : X →L[ℝ] Y) + (hT : ∀ n, ∀ a ∈ A n, T a ∈ B n) (f : X) (n : ℕ) : + B.approxError (T f) n ≤ ‖T‖ₑ * A.approxError f n := by + refine le_mul_approxError_of_forall_mem eNorm_ne_top fun a ha => ?_ + calc B.approxError (T f) n ≤ ‖T f - T a‖ₑ := approxError_le_of_mem (hT n a ha) _ + _ = ‖T (f - a)‖ₑ := by rw [map_sub] + _ ≤ ‖T‖ₑ * ‖f - a‖ₑ := T.le_opENorm _ + +/-- **Bounds by a modulus pass from a dense set to all of `X`**: if `ω` is subadditive with +`ω(f) ≤ C₀ ‖f‖` and `E_n(g) ≤ C ω(g)` for all `g` in a dense set, then `E_n(f) ≤ C ω(f)` for every +`f`, since both sides move by at most a multiple of `‖f - g‖` +(`ApproximationScheme.approxError_le_approxError_add_enorm`). -/ +theorem approxError_le_of_dense {D : Set X} (hD : Dense D) + {ω : X → ℝ≥0∞} (hadd : ∀ f g, ω (f + g) ≤ ω f + ω g) {C0 : ℝ≥0∞} (hC0 : C0 ≠ ∞) + (hle : ∀ f, ω f ≤ C0 * ‖f‖ₑ) {n : ℕ} {C : ℝ≥0∞} (hC : C ≠ ∞) + (h : ∀ g ∈ D, A.approxError g n ≤ C * ω g) (f : X) : A.approxError f n ≤ C * ω f := by + refine ENNReal.le_of_forall_pos_le_add fun ε hε _ => ?_ + set K : ℝ≥0∞ := C * C0 + 1 + have hK : K ≠ ∞ := ENNReal.add_ne_top.2 ⟨ENNReal.mul_ne_top hC hC0, ENNReal.one_ne_top⟩ + have hK0 : K ≠ 0 := by simp [K] + obtain ⟨g, hgD, hfg⟩ := EMetric.mem_closure_iff.1 (hD f) (ε / K) + (ENNReal.div_pos (by exact_mod_cast hε.ne') hK) + have hdist : ‖f - g‖ₑ ≤ ε / K := by rw [← eDist_eq_eNorm_sub]; exact hfg.le + have hmod : ω g ≤ ω f + C0 * ‖f - g‖ₑ := by + have h1 := hadd f (g - f) + rw [add_sub_cancel] at h1 + refine h1.trans (add_le_add le_rfl ((hle _).trans ?_)) + rw [← eNorm_neg, neg_sub] + calc A.approxError f n + ≤ A.approxError g n + ‖f - g‖ₑ := approxError_le_approxError_add_enorm n f g + _ ≤ C * (ω f + C0 * ‖f - g‖ₑ) + ‖f - g‖ₑ := add_le_add ((h g hgD).trans (by gcongr)) le_rfl + _ = C * ω f + K * ‖f - g‖ₑ := by simp only [K]; ring + _ ≤ C * ω f + K * (ε / K) := by gcongr + _ = C * ω f + ε := by rw [ENNReal.mul_div_cancel hK0 hK] + +/-! ### The Lebesgue inequality -/ + +/-- **The Lebesgue inequality**: if an additive map `P` with `‖P x‖ ≤ C ‖x‖` fixes `a`, then +`‖f - P f‖ ≤ (1 + C) ‖f - a‖`, since `f - P f = (f - a) - P (f - a)`. -/ +theorem norm_sub_apply_le_of_apply_eq {E F : Type*} [SeminormedAddCommGroup E] [FunLike F E E] + [AddMonoidHomClass F E E] {P : F} {C : ℝ} (hP : ∀ x, ‖P x‖ ≤ C * ‖x‖) {a : E} + (ha : P a = a) (f : E) : ‖f - P f‖ ≤ (1 + C) * ‖f - a‖ := by + calc ‖f - P f‖ = ‖(f - a) - P (f - a)‖ := by rw [map_sub, ha]; abel_nf + _ ≤ ‖f - a‖ + ‖P (f - a)‖ := norm_sub_le _ _ + _ ≤ ‖f - a‖ + C * ‖f - a‖ := by gcongr; exact hP _ + _ = (1 + C) * ‖f - a‖ := by ring + +/-- **The Lebesgue inequality in extended norms**: if an additive map `P` with +`‖P x‖ ≤ C ‖x‖`, `C ∈ [0, ∞]`, fixes `a`, then `‖f - P f‖ ≤ (1 + C) ‖f - a‖`. -/ +theorem enorm_sub_apply_le_of_apply_eq {E F : Type*} [SeminormedAddCommGroup E] [FunLike F E E] + [AddMonoidHomClass F E E] {P : F} {C : ENNReal} (hP : ∀ x, ‖P x‖ₑ ≤ C * ‖x‖ₑ) {a : E} + (ha : P a = a) (f : E) : ‖f - P f‖ₑ ≤ (1 + C) * ‖f - a‖ₑ := by + calc ‖f - P f‖ₑ = ‖(f - a) - P (f - a)‖ₑ := by rw [map_sub, ha]; abel_nf + _ ≤ ‖f - a‖ₑ + ‖P (f - a)‖ₑ := eNorm_sub_le + _ ≤ ‖f - a‖ₑ + C * ‖f - a‖ₑ := by gcongr; exact hP _ + _ = (1 + C) * ‖f - a‖ₑ := by rw [add_mul, one_mul] + +end ApproximationScheme diff --git a/LeanPool/FunctionSpaces/ApproximationSpaces/Instances/NTerm.lean b/LeanPool/FunctionSpaces/ApproximationSpaces/Instances/NTerm.lean new file mode 100644 index 0000000000..baa1f2ea8e --- /dev/null +++ b/LeanPool/FunctionSpaces/ApproximationSpaces/Instances/NTerm.lean @@ -0,0 +1,89 @@ +/- +Copyright (c) 2026 Mario Ullrich. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Mario Ullrich +-/ +module + +public import LeanPool.FunctionSpaces.ApproximationSpaces.Instances.Span + +/- +Modified for Lean Pool: module names and imports adapted. +-/ + +/-! +# Nonlinear `n`-term approximation from a dictionary + +For a set `D ⊆ X`, the **dictionary**, the scheme `nTerm D` has + +`A n = { linear combinations of at most n elements of D }`. + +The approximant may use any `n` elements of `D`, chosen depending on `f`, so `A n` is a +union of subspaces and not itself a subspace. This is nonlinear approximation in the sense +of DeVore: best `n`-term approximation from a wavelet basis or from a redundant dictionary. +The sets need not be closed, so best approximants need not exist. + +Linear approximation from the first `n` elements of a sequence is a special case with fewer +approximants, so its errors are larger (`approxError_nTerm_le_ofSpan`). +-/ + +@[expose] public section + +namespace ApproximationScheme + +variable {X : Type*} [NormedAddCommGroup X] [NormedSpace ℝ X] + +/-- The scheme of **`n`-term approximation** from a dictionary `D`: `A n` consists of the +linear combinations of at most `n` elements of `D`. -/ +def nTerm (D : Set X) : ApproximationScheme X where + sets n := {x | ∃ S : Finset X, (S : Set X) ⊆ D ∧ S.card ≤ n ∧ x ∈ Submodule.span ℝ (S : Set X)} + sets_zero := by + ext x + simp only [Set.mem_ofPred_eq, Set.mem_singleton_iff, Nat.le_zero, Finset.card_eq_zero] + constructor + · rintro ⟨S, -, rfl, hx⟩ + simpa using hx + · rintro rfl + exact ⟨∅, by simp, rfl, Submodule.zero_mem _⟩ + mono _ _ h := by + rintro x ⟨S, hSD, hS, hx⟩ + exact ⟨S, hSD, hS.trans h, hx⟩ + smul_mem c _ _ := by + rintro ⟨S, hSD, hS, hx⟩ + exact ⟨S, hSD, hS, Submodule.smul_mem _ c hx⟩ + add_subset m n := by + classical + rintro _ ⟨a, ⟨S, hSD, hS, ha⟩, b, ⟨T, hTD, hT, hb⟩, rfl⟩ + refine ⟨S ∪ T, ?_, (Finset.card_union_le S T).trans (Nat.add_le_add hS hT), ?_⟩ + · rw [Finset.coe_union]; exact Set.union_subset hSD hTD + · rw [Finset.coe_union] + exact Submodule.add_mem _ (Submodule.span_mono Set.subset_union_left ha) + (Submodule.span_mono Set.subset_union_right hb) + +variable {D : Set X} + +/-- `x ∈ A_n` iff `x` is a linear combination of at most `n` elements of `D`. -/ +theorem mem_nTerm {n : ℕ} {x : X} : x ∈ nTerm D n ↔ + ∃ S : Finset X, (S : Set X) ⊆ D ∧ S.card ≤ n ∧ x ∈ Submodule.span ℝ (S : Set X) := Iff.rfl + +/-- Every element of the dictionary is a `1`-term approximant. -/ +theorem mem_nTerm_of_mem {x : X} (hx : x ∈ D) : x ∈ nTerm D 1 := + ⟨{x}, by simpa using hx, by simp, Submodule.subset_span (by simp)⟩ + +/-- Linear approximation from the first `n` elements of `e` is `n`-term approximation from +the dictionary `range e` with a fixed choice of the terms. -/ +theorem ofSpan_subset_nTerm (e : ℕ → X) (n : ℕ) : ofSpan e n ⊆ nTerm (Set.range e) n := by + classical + intro x hx + refine ⟨(Finset.range n).image e, ?_, ?_, ?_⟩ + · rw [Finset.coe_image]; exact Set.image_subset_range e _ + · exact (Finset.card_image_le).trans (Finset.card_range n).le + · rw [Finset.coe_image, Finset.coe_range]; exact hx + +/-- `n`-term approximation from `range e` is at least as good as linear approximation from +the first `n` elements of `e`. -/ +theorem approxError_nTerm_le_ofSpan (e : ℕ → X) (f : X) (n : ℕ) : + (nTerm (Set.range e)).approxError f n ≤ (ofSpan e).approxError f n := + approxError_anti_scheme (ofSpan_subset_nTerm e) f n + +end ApproximationScheme diff --git a/LeanPool/FunctionSpaces/ApproximationSpaces/Instances/NTermHilbertBasis.lean b/LeanPool/FunctionSpaces/ApproximationSpaces/Instances/NTermHilbertBasis.lean new file mode 100644 index 0000000000..8299bccebd --- /dev/null +++ b/LeanPool/FunctionSpaces/ApproximationSpaces/Instances/NTermHilbertBasis.lean @@ -0,0 +1,475 @@ +/- +Copyright (c) 2026 Mario Ullrich. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Mario Ullrich +-/ +module + +public import LeanPool.FunctionSpaces.ApproximationSpaces.Instances.NTerm +public import LeanPool.FunctionSpaces.ApproximationSpaces.Dyadic +public import LeanPool.FunctionSpaces.ApproximationSpaces.Sequences.Hardy +public import LeanPool.FunctionSpaces.ApproximationSpaces.Sequences.Rearrangement +public import Mathlib.Analysis.InnerProductSpace.l2Space + +/- +Modified for Lean Pool: module names and imports adapted. +-/ + +/-! +# Best `n`-term approximation from a Hilbert basis + +Let `H` be a complex Hilbert space with a Hilbert basis `(e_i)_{i ∈ ι}` and let +`γ_i(f) = |⟨e_i, f⟩|` be the moduli of the coefficients of `f ∈ H`. The **dictionary** of the +basis is the set of the multiples `c e_i`, `c ∈ ℂ` (`HilbertBasis.coeffDictionary`), so the +approximants of `n`-term approximation (`ApproximationScheme.nTerm`) are the combinations +`∑_{i ∈ Λ} c_i e_i` with `#Λ ≤ n`. By Parseval's identity (`lp.enorm_sq_eq_tsum`) the error is +the tail of the coefficients outside the best set `Λ`: + +`E_n(f)² = inf_{#Λ ≤ n} ∑_{i ∉ Λ} γ_i(f)²` (`HilbertBasis.approxError_nTerm_sq_eq`). + +With the decreasing rearrangement `γ*_k` of the coefficients (`TauCeti.decreasingRearrangement`, +`ApproximationSpaces.Sequences.Rearrangement`), +`∑_{k ≥ N} (γ*_k)² ≤ E_N(f)² ≤ ∑_k min(γ*_k, γ*_N)²`. +For `0 < τ ≤ 2` and `θ = 1/τ - 1/2` this gives the tail bound with constant `1` + +`E_n(f) ≤ (n + 1)^(-θ) ‖(γ_i(f))_i‖_{ℓ_τ}` for every `n ≥ 0` +(`HilbertBasis.approxError_nTerm_le`; Dũng–Temlyakov–Ullrich, *Hyperbolic Cross Approximation*, +Lemma 7.8 in the numbering of arXiv:1601.03978v3), and, for `τ < 2`, through the dyadic blocks +`2^m (γ*_{2^(m+1)})² ≤ E_{2^m}(f)² ≤ 2 ∑_{l ≥ m} 2^l (γ*_{2^l})²`, the theorem of Stechkin and +DeVore: + +`f ∈ A^θ_τ(nTerm) ⟺ ∑_i |⟨e_i, f⟩|^τ < ∞` (`HilbertBasis.memApprox_nTerm_iff`), + +with the two-sided bound `∑_i γ_i(f)^τ ≤ 4 ‖f‖^τ_{A^θ_τ}` and +`‖f‖_{A^θ_τ} ≤ C_τ ‖(γ_i(f))_i‖_{ℓ_τ}` for the dyadic quasi-norm +(`HilbertBasis.tsum_repr_rpow_le`, `HilbertBasis.approxNormDyadic_nTerm_le`, +`HilbertBasis.stechkinConst`). The case `τ = 1` is Stechkin's theorem (Dokl. Akad. Nauk SSSR +102, 1955). For general `τ` the sequence form goes back to Pietsch (*Approximation spaces*, +J. Approx. Theory 32, 1981, Example 1 in §3.2), and DeVore (*Nonlinear approximation*, Acta +Numer. 7, 1998, Theorem 4) proves it by interpolation; the proof here works with the dyadic +blocks directly. The range `τ < 1`, where `A^θ_τ` is only quasi-normed, is included. +-/ + +@[expose] public section + +open Filter Topology Finset +open scoped ENNReal InnerProductSpace + +/-- `min(x², y²) ≤ x^τ y^(2-τ)` in `[0, ∞]` for `0 ≤ τ ≤ 2`. -/ +private theorem min_sq_le_rpow_mul_rpow (x y : ℝ≥0∞) {τ : ℝ} (hτ0 : 0 ≤ τ) (hτ2 : τ ≤ 2) : + min (x ^ 2) (y ^ 2) ≤ x ^ τ * y ^ (2 - τ) := by + have hsplit (z : ℝ≥0∞) : z ^ 2 = z ^ τ * z ^ (2 - τ) := by + rw [← ENNReal.rpow_add_of_nonneg (x := z) τ (2 - τ) hτ0 (sub_nonneg.2 hτ2), add_sub_cancel, + ENNReal.rpow_two] + rcases le_total x y with h | h + · calc min (x ^ 2) (y ^ 2) ≤ x ^ 2 := min_le_left _ _ + _ = x ^ τ * x ^ (2 - τ) := hsplit x + _ ≤ x ^ τ * y ^ (2 - τ) := by gcongr + · calc min (x ^ 2) (y ^ 2) ≤ y ^ 2 := min_le_right _ _ + _ = y ^ τ * y ^ (2 - τ) := hsplit y + _ ≤ x ^ τ * y ^ (2 - τ) := by gcongr + +namespace HilbertBasis + +open ApproximationScheme ENNReal + +variable {ι H : Type*} [NormedAddCommGroup H] [InnerProductSpace ℂ H] (b : HilbertBasis ι ℂ H) + +/-! ### The dictionary and the error -/ + +/-- The **coefficient dictionary** of a Hilbert basis `(e_i)`: the multiples `c e_i`, `c ∈ ℂ`. +The scheme `nTerm` takes real linear spans, so complex multiples are needed for its approximants +to be all complex combinations of `n` basis vectors. -/ +noncomputable def coeffDictionary : Set H := Set.range fun p : ι × ℂ => p.2 • b p.1 + +/-- Every complex multiple of a basis vector lies in the coefficient dictionary. -/ +theorem smul_mem_coeffDictionary (c : ℂ) (i : ι) : c • b i ∈ b.coeffDictionary := + ⟨(i, c), rfl⟩ + +/-- The coefficients of a finite combination: `⟨e_i, ∑_{j ∈ Λ} c_j e_j⟩ = c_i` for `i ∈ Λ` and +`0` otherwise, by orthonormality. -/ +theorem repr_sum_smul [DecidableEq ι] (Λ : Finset ι) (c : ι → ℂ) (i : ι) : + b.repr (∑ j ∈ Λ, c j • b j) i = if i ∈ Λ then c i else 0 := by + rw [b.repr_apply_apply, inner_sum] + simp_rw [inner_smul_right, orthonormal_iff_ite.1 b.orthonormal i, mul_ite, mul_one, mul_zero] + exact Finset.sum_ite_eq Λ i c + +/-- **The coefficients form a null family**: `|⟨e_i, f⟩| → 0` along the cofinite filter, since +`∑_i |⟨e_i, f⟩|² < ∞`. -/ +theorem tendsto_norm_repr (f : H) : Tendsto (fun i => ‖b.repr f i‖) cofinite (𝓝 0) := by + have hsq : Tendsto (fun i => ‖b.repr f i‖ ^ 2) cofinite (𝓝 0) := by + simpa [Real.rpow_two] using ((lp.memℓp (b.repr f)).summable + (by norm_num : 0 < (2 : ℝ≥0∞).toReal)).tendsto_cofinite_zero + simpa [Function.comp_def, Real.sqrt_sq (norm_nonneg _)] using + (Real.continuous_sqrt.tendsto 0).comp hsq + +/-- Every coefficient is at most the norm: `γ*_n ≤ ‖f‖` for the rearranged moduli +`γ_i = |⟨e_i, f⟩|`, since `|⟨e_i, f⟩| ≤ ‖f‖`. -/ +theorem decreasingRearrangement_norm_repr_le (f : H) (n : ℕ) : + TauCeti.decreasingRearrangement (fun i => ‖b.repr f i‖) n ≤ ‖f‖ := + TauCeti.decreasingRearrangement_le_of_card_le (norm_nonneg f) (s := ∅) (Nat.zero_le n) fun i _ => + (lp.norm_apply_le_norm (by norm_num) (b.repr f) i).trans_eq (b.repr.norm_map f) + +/-- **Upper bound for the error**: for every set `Λ` of at most `n` indices, +`E_n(f)² ≤ ∑_{i ∉ Λ} |⟨e_i, f⟩|²`, since `∑_{i ∈ Λ} ⟨e_i, f⟩ e_i` is an approximant and +Parseval's identity computes the distance to it. -/ +theorem approxError_nTerm_sq_le [DecidableEq ι] {n : ℕ} {Λ : Finset ι} (hΛ : Λ.card ≤ n) + (f : H) : (nTerm b.coeffDictionary).approxError f n ^ 2 ≤ + ∑' i, if i ∈ Λ then 0 else ‖b.repr f i‖ₑ ^ 2 := by + classical + have ha : (∑ j ∈ Λ, b.repr f j • b j) ∈ nTerm b.coeffDictionary n := by + refine ⟨Λ.image fun j => b.repr f j • b j, ?_, card_image_le.trans hΛ, ?_⟩ + · intro x hx + obtain ⟨j, -, rfl⟩ := mem_image.1 (mem_coe.1 hx) + exact b.smul_mem_coeffDictionary _ j + · exact Submodule.sum_mem _ fun j hj => + Submodule.subset_span (mem_coe.2 (mem_image_of_mem _ hj)) + calc (nTerm b.coeffDictionary).approxError f n ^ 2 + ≤ ‖f - ∑ j ∈ Λ, b.repr f j • b j‖ₑ ^ 2 := by + gcongr; exact approxError_le_of_mem ha f + _ = ∑' i, ‖b.repr (f - ∑ j ∈ Λ, b.repr f j • b j) i‖ₑ ^ 2 := by + rw [← b.repr.eNorm_map, lp.enorm_sq_eq_tsum] + _ = _ := by + congr 1; funext i + rw [b.repr_apply_apply, inner_sub_right, ← b.repr_apply_apply, ← b.repr_apply_apply, + repr_sum_smul] + split_ifs <;> simp + +/-- **Lower bound for the error**: every `n`-term approximant `a` has a set `Λ` of at most `n` +indices with `∑_{i ∉ Λ} |⟨e_i, f⟩|² ≤ ‖f - a‖²`. The coefficients of `a` vanish off the indices +`Λ` of the dictionary elements that `a` combines. -/ +theorem exists_tsum_ite_le_enorm_sub_sq [DecidableEq ι] {n : ℕ} {a : H} + (ha : a ∈ nTerm b.coeffDictionary n) (f : H) : + ∃ Λ : Finset ι, Λ.card ≤ n ∧ + (∑' i, if i ∈ Λ then 0 else ‖b.repr f i‖ₑ ^ 2) ≤ ‖f - a‖ₑ ^ 2 := by + classical + obtain ⟨S, hSD, hS, haS⟩ := ha + choose p hp using fun x : S => hSD (mem_coe.2 x.2) + refine ⟨S.attach.image fun x => (p x).1, card_image_le.trans (card_attach.le.trans hS), ?_⟩ + set Λ := S.attach.image fun x => (p x).1 + have hzero : ∀ i ∉ Λ, ⟪b i, a⟫_ℂ = 0 := by + intro i hi + induction haS using Submodule.span_induction with + | mem x hx => + have hx' : (p ⟨x, mem_coe.1 hx⟩).2 • b (p ⟨x, mem_coe.1 hx⟩).1 = x := hp _ + have hne : i ≠ (p ⟨x, mem_coe.1 hx⟩).1 := fun h => + hi (by rw [h]; exact mem_image.2 ⟨⟨x, mem_coe.1 hx⟩, mem_attach _ _, rfl⟩) + rw [← hx', inner_smul_right, b.orthonormal.inner_eq_zero hne, mul_zero] + | zero => exact inner_zero_right _ + | add x y _ _ hx hy => rw [inner_add_right, hx, hy, add_zero] + | smul t x _ hx => rw [RCLike.real_smul_eq_coe_smul (K := ℂ), inner_smul_right, hx, mul_zero] + calc (∑' i, if i ∈ Λ then 0 else ‖b.repr f i‖ₑ ^ 2) ≤ ∑' i, ‖b.repr (f - a) i‖ₑ ^ 2 := by + refine tsum_le_tsum fun i => ?_ + split_ifs with hi + · exact zero_le + · rw [b.repr_apply_apply, b.repr_apply_apply, inner_sub_right, hzero i hi, sub_zero] + _ = ‖f - a‖ₑ ^ 2 := by rw [← lp.enorm_sq_eq_tsum, b.repr.eNorm_map] + +/-- **The error of best `n`-term approximation from a Hilbert basis**: +`E_n(f)² = inf_{#Λ ≤ n} ∑_{i ∉ Λ} |⟨e_i, f⟩|²`, the smallest tail of the squared coefficients +outside `n` indices (DeVore, *Nonlinear approximation*, 1998, §2). -/ +theorem approxError_nTerm_sq_eq [DecidableEq ι] (n : ℕ) (f : H) : + (nTerm b.coeffDictionary).approxError f n ^ 2 = + ⨅ (Λ : Finset ι) (_ : Λ.card ≤ n), ∑' i, if i ∈ Λ then 0 else ‖b.repr f i‖ₑ ^ 2 := by + refine le_antisymm (le_iInf₂ fun Λ hΛ => b.approxError_nTerm_sq_le hΛ f) ?_ + refine le_approxError_sq_iff.2 fun a ha => ?_ + obtain ⟨Λ, hΛ, h⟩ := b.exists_tsum_ite_le_enorm_sub_sq ha f + exact (iInf₂_le Λ hΛ).trans h + +/-! ### Tail bounds by the rearranged coefficients -/ + +/-- **Upper tail bound**: `E_N(f)² ≤ ∑_k min((γ*_k)², (γ*_N)²)` for the decreasing +rearrangement `γ*` of `γ_i = |⟨e_i, f⟩|`. The at most `N` indices with `γ_i > γ*_N` form an +admissible set, and the remaining coefficients are bounded by `tsum_ite_rpow_le_tsum_min`. -/ +theorem approxError_nTerm_sq_le_tsum_min (N : ℕ) (f : H) : + (nTerm b.coeffDictionary).approxError f N ^ 2 ≤ + ∑' k, min (ENNReal.ofReal (TauCeti.decreasingRearrangement (fun i => ‖b.repr f i‖) k) ^ 2) + (ENNReal.ofReal (TauCeti.decreasingRearrangement (fun i => ‖b.repr f i‖) N) ^ 2) := by + classical + have hr := b.tendsto_norm_repr f + have hfin := TauCeti.finite_setOf_decreasingRearrangement_lt hr.bddAbove_range_of_cofinite N + have hcard : hfin.toFinset.card ≤ N := + TauCeti.card_le_of_forall_decreasingRearrangement_lt hr.bddAbove_range_of_cofinite fun i hi => + hfin.mem_toFinset.1 hi + refine (b.approxError_nTerm_sq_le hcard f).trans ?_ + have h := tsum_ite_rpow_le_tsum_min (fun i => norm_nonneg (b.repr f i)) hr two_pos N + simp only [ENNReal.rpow_two, ofReal_norm] at h + refine le_trans (le_of_eq ?_) h + congr 1; funext i + simp only [Set.Finite.mem_toFinset, Set.mem_ofPred_eq] + +/-- **Lower tail bound**: `∑_k (γ*_{k+N})² ≤ E_N(f)²`. Removing at most `N` coefficients leaves at +least the rearranged tail (`tsum_rpow_decreasingRearrangement_add_le`). -/ +theorem tsum_decreasingRearrangement_add_sq_le (N : ℕ) (f : H) : + ∑' k, ENNReal.ofReal (TauCeti.decreasingRearrangement (fun i => ‖b.repr f i‖) (k + N)) ^ 2 ≤ + (nTerm b.coeffDictionary).approxError f N ^ 2 := by + classical + rw [b.approxError_nTerm_sq_eq] + refine le_iInf₂ fun Λ hΛ => ?_ + have h := tsum_rpow_decreasingRearrangement_add_le (fun i => norm_nonneg (b.repr f i)) + (b.tendsto_norm_repr f) two_pos hΛ + simpa only [ENNReal.rpow_two, ofReal_norm] using h + +/-- **Dyadic upper bound**: `E_{2^m}(f)² ≤ 2 ∑_{l ≥ 0} 2^(m+l) (γ*_{2^(m+l)})²`, the upper tail +bound condensed (`ENNReal.tsum_min_le_dyadic`). -/ +theorem approxError_nTerm_two_pow_sq_le (m : ℕ) (f : H) : + (nTerm b.coeffDictionary).approxError f (2 ^ m) ^ 2 ≤ 2 * ∑' l, 2 ^ (m + l) * + ENNReal.ofReal (TauCeti.decreasingRearrangement (fun i => ‖b.repr f i‖) (2 ^ (m + l))) ^ 2 := + (b.approxError_nTerm_sq_le_tsum_min (2 ^ m) f).trans + (ENNReal.tsum_min_le_dyadic (fun _ _ h => by + dsimp only; gcongr; exact TauCeti.antitone_decreasingRearrangement h) m) + +/-- **Dyadic lower bound**: `2^m (γ*_{2^(m+1)})² ≤ E_{2^m}(f)²`, from the lower tail bound, since +the `2^m` terms `γ*_{k+2^m}`, `k < 2^m`, are at least `γ*_{2^(m+1)}`. -/ +theorem two_pow_mul_decreasingRearrangement_sq_le (m : ℕ) (f : H) : + 2 ^ m * ENNReal.ofReal (TauCeti.decreasingRearrangement (fun i => ‖b.repr f i‖) (2 ^ (m + 1))) + ^ 2 ≤ + (nTerm b.coeffDictionary).approxError f (2 ^ m) ^ 2 := by + set c := TauCeti.decreasingRearrangement fun i => ‖b.repr f i‖ + refine le_trans ?_ (b.tsum_decreasingRearrangement_add_sq_le (2 ^ m) f) + calc (2 : ℝ≥0∞) ^ m * ENNReal.ofReal (c (2 ^ (m + 1))) ^ 2 + = ∑ _k ∈ range (2 ^ m), ENNReal.ofReal (c (2 ^ (m + 1))) ^ 2 := by + rw [sum_const, card_range, nsmul_eq_mul, Nat.cast_pow, Nat.cast_ofNat] + _ ≤ ∑ k ∈ range (2 ^ m), ENNReal.ofReal (c (k + 2 ^ m)) ^ 2 := by + gcongr with k hk + refine TauCeti.antitone_decreasingRearrangement ?_ + have hk' := mem_range.1 hk + rw [pow_succ] + omega + _ ≤ _ := sum_le_tsum _ + +/-- `E_n(f)² ≤ (γ*_n)^(2-τ) ∑_i γ_i^τ` for `0 < τ ≤ 2`: each term of the upper tail bound is +`min((γ*_k)², (γ*_n)²) ≤ (γ*_k)^τ (γ*_n)^(2-τ)`, and `∑_k (γ*_k)^τ = ∑_i γ_i^τ`. -/ +private theorem approxError_nTerm_sq_le_mul {τ : ℝ} (hτ0 : 0 < τ) (hτ2 : τ ≤ 2) (n : ℕ) + (f : H) : (nTerm b.coeffDictionary).approxError f n ^ 2 ≤ + (∑' i, ‖b.repr f i‖ₑ ^ τ) * + ENNReal.ofReal (TauCeti.decreasingRearrangement (fun i => ‖b.repr f i‖) n) ^ (2 - τ) := by + set c := TauCeti.decreasingRearrangement fun i => ‖b.repr f i‖ + have hS : ∑' i, ‖b.repr f i‖ₑ ^ τ = ∑' k, ENNReal.ofReal (c k) ^ τ := by + rw [tsum_ofReal_rpow_decreasingRearrangement (fun i => norm_nonneg (b.repr f i)) + (b.tendsto_norm_repr f) hτ0] + simp only [ofReal_norm] + refine (b.approxError_nTerm_sq_le_tsum_min n f).trans ?_ + rw [hS, ← ENNReal.tsum_mul_right] + exact tsum_le_tsum fun k => min_sq_le_rpow_mul_rpow _ _ hτ0.le hτ2 + +/-- **The tail bound with constant `1`**: for `0 < τ ≤ 2`, `θ = 1/τ - 1/2` and every `n ≥ 0`, +`E_n(f) ≤ (n + 1)^(-θ) (∑_i |⟨e_i, f⟩|^τ)^(1/τ)`. Since `θ ≥ 0`, it gives +`E_n(f) ≤ n^(-θ) (∑_i |⟨e_i, f⟩|^τ)^(1/τ)` for `n ≥ 1`, and `‖f‖ ≤ (∑_i |⟨e_i, f⟩|^τ)^(1/τ)` at +`n = 0`. The error `E_n(f)` is the tail of the coefficients from the `(n + 1)`-th largest one +on, so this is Dũng–Temlyakov–Ullrich, *Hyperbolic Cross Approximation*, Lemma 7.8 (numbering of +arXiv:1601.03978v3), with `m = n + 1`. With `S = ∑_i γ_i^τ`, the weak-type bound +`(n + 1) (γ*_n)^τ ≤ S` turns `E_n(f)² ≤ S (γ*_n)^(2-τ)` into +`E_n(f)² ≤ (n + 1)^(-2θ) S^(2/τ)`. -/ +theorem approxError_nTerm_le {τ : ℝ} (hτ0 : 0 < τ) (hτ2 : τ ≤ 2) (n : ℕ) (f : H) : + (nTerm b.coeffDictionary).approxError f n ≤ + ((n + 1 : ℕ) : ℝ≥0∞) ^ (-(1 / τ - 1 / 2)) * (∑' i, ‖b.repr f i‖ₑ ^ τ) ^ (1 / τ) := by + set S := ∑' i, ‖b.repr f i‖ₑ ^ τ + set C := ENNReal.ofReal (TauCeti.decreasingRearrangement (fun i => ‖b.repr f i‖) n) + have hτ : τ ≠ 0 := hτ0.ne' + have ha : 0 ≤ (2 - τ) / τ := div_nonneg (by linarith) hτ0.le + have hn0 : ((n + 1 : ℕ) : ℝ≥0∞) ≠ 0 := by exact_mod_cast Nat.succ_ne_zero n + have hweak : C ^ τ ≤ S * ((n + 1 : ℕ) : ℝ≥0∞)⁻¹ := by + rw [← div_eq_mul_inv, + ENNReal.le_div_iff_mul_le (Or.inl hn0) (Or.inl (natCast_ne_top (n + 1))), mul_comm] + have h := succ_mul_rpow_decreasingRearrangement_le (fun i => norm_nonneg (b.repr f i)) + (b.tendsto_norm_repr f) hτ0 n + simpa only [ofReal_norm] using h + have hC : C ^ (2 - τ) ≤ S ^ ((2 - τ) / τ) * ((n + 1 : ℕ) : ℝ≥0∞) ^ (-((2 - τ) / τ)) := by + calc C ^ (2 - τ) = (C ^ τ) ^ ((2 - τ) / τ) := by + rw [← ENNReal.rpow_mul, mul_div_cancel₀ _ hτ] + _ ≤ (S * ((n + 1 : ℕ) : ℝ≥0∞)⁻¹) ^ ((2 - τ) / τ) := by gcongr + _ = S ^ ((2 - τ) / τ) * ((n + 1 : ℕ) : ℝ≥0∞) ^ (-((2 - τ) / τ)) := by + rw [ENNReal.mul_rpow_of_nonneg _ _ ha, ENNReal.inv_rpow, ENNReal.rpow_neg] + have e1 : 1 / τ * ((2 : ℕ) : ℝ) = 1 + (2 - τ) / τ := by push_cast; field_simp; ring + have e2 : -(1 / τ - 1 / 2) * ((2 : ℕ) : ℝ) = -((2 - τ) / τ) := by push_cast; field_simp + have hsq : (nTerm b.coeffDictionary).approxError f n ^ 2 ≤ + (((n + 1 : ℕ) : ℝ≥0∞) ^ (-(1 / τ - 1 / 2)) * S ^ (1 / τ)) ^ 2 := by + calc (nTerm b.coeffDictionary).approxError f n ^ 2 ≤ S * C ^ (2 - τ) := + b.approxError_nTerm_sq_le_mul hτ0 hτ2 n f + _ ≤ S * (S ^ ((2 - τ) / τ) * ((n + 1 : ℕ) : ℝ≥0∞) ^ (-((2 - τ) / τ))) := by gcongr + _ = (((n + 1 : ℕ) : ℝ≥0∞) ^ (-(1 / τ - 1 / 2)) * S ^ (1 / τ)) ^ 2 := by + rw [mul_pow, ← ENNReal.rpow_natCast (((n + 1 : ℕ) : ℝ≥0∞) ^ _), + ← ENNReal.rpow_natCast (S ^ _), ← ENNReal.rpow_mul, ← ENNReal.rpow_mul, e1, e2, + ENNReal.rpow_add_of_nonneg 1 ((2 - τ) / τ) zero_le_one ha, ENNReal.rpow_one] + ring + rw [← ENNReal.rpow_two, ← ENNReal.rpow_two] at hsq + exact (ENNReal.rpow_le_rpow_iff two_pos).1 hsq + +/-! ### The theorem of Stechkin and DeVore -/ + +/-- The constant `C_τ = 1 + (2 · 2^(τ/2) (1 - 2^(-(1 - τ/2)))⁻¹)^(1/τ)` of the upper bound +`‖f‖_{A^θ_τ} ≤ C_τ ‖(⟨e_i, f⟩)_i‖_{ℓ_τ}` (`HilbertBasis.approxNormDyadic_nTerm_le`). -/ +noncomputable def stechkinConst (τ : ℝ) : ℝ≥0∞ := + 1 + (2 ^ (τ / 2) * (1 - 2 ^ (-(1 - τ / 2)))⁻¹ * 2) ^ (1 / τ) + +/-- The constant `C_τ` is finite for `0 < τ < 2`. -/ +theorem stechkinConst_ne_top {τ : ℝ} (hτ0 : 0 < τ) (hτ2 : τ < 2) : stechkinConst τ ≠ ∞ := by + refine ENNReal.add_ne_top.2 ⟨one_ne_top, ENNReal.rpow_ne_top_of_nonneg (by positivity) ?_⟩ + exact ENNReal.mul_ne_top (ENNReal.mul_ne_top (two_rpow_ne_top _) + (one_sub_two_rpow_neg_inv_ne_top (by linarith))) (by norm_num) + +/-- **`ℓ_τ ⊆ ℓ_2` for the coefficients**: `‖f‖ ≤ (∑_i |⟨e_i, f⟩|^τ)^(1/τ)` for `0 < τ ≤ 2`, by +Parseval's identity and the decrease of the `ℓ_p` sums in `p` (`ENNReal.rpow_tsum_rpow_le`). -/ +theorem enorm_le_tsum_repr_rpow {τ : ℝ} (hτ0 : 0 < τ) (hτ2 : τ ≤ 2) (f : H) : + ‖f‖ₑ ≤ (∑' i, ‖b.repr f i‖ₑ ^ τ) ^ (1 / τ) := by + refine le_trans (le_of_eq ?_) (ENNReal.rpow_tsum_rpow_le (fun i => ‖b.repr f i‖ₑ) hτ0 hτ2) + have hP : ‖f‖ₑ ^ 2 = ∑' i, ‖b.repr f i‖ₑ ^ 2 := by + rw [← b.repr.eNorm_map, lp.enorm_sq_eq_tsum] + simp_rw [ENNReal.rpow_two] + rw [← hP, ← ENNReal.rpow_two, ← ENNReal.rpow_mul] + norm_num + +/-- The weights of the dyadic blocks: `2^(k(1 - τ/2)) (2^k x²)^(τ/2) = 2^k x^τ`. -/ +private theorem dyadicWeight_mul_rpow_eq {τ : ℝ} (hτ0 : 0 < τ) (k : ℕ) (x : ℝ≥0∞) : + dyadicWeight (1 - τ / 2) k * (2 ^ k * x ^ 2) ^ (τ / 2) = 2 ^ k * x ^ τ := by + rw [ENNReal.mul_rpow_of_nonneg _ _ (by positivity : (0 : ℝ) ≤ τ / 2)] + have h1 : ((2 : ℝ≥0∞) ^ k) ^ (τ / 2) = dyadicWeight (τ / 2) k := by + simpa using natCast_two_pow_rpow (τ / 2) k + have h2 : (x ^ 2) ^ (τ / 2) = x ^ τ := by + rw [← ENNReal.rpow_natCast, ← ENNReal.rpow_mul] + congr 1 + push_cast + ring + have h3 : dyadicWeight (1 - τ / 2) k * dyadicWeight (τ / 2) k = 2 ^ k := by + rw [← dyadicWeight_add, sub_add_cancel, dyadicWeight_eq_pow, ENNReal.rpow_one] + rw [h1, h2, ← mul_assoc, h3] + +/-- `θ τ = 1 - τ/2` for `θ = 1/τ - 1/2`. -/ +private theorem one_div_sub_mul_self {τ : ℝ} (hτ0 : 0 < τ) : (1 / τ - 1 / 2) * τ = 1 - τ / 2 := by + field_simp + +/-- **The dyadic sum of the errors**: `∑_k 2^(kθτ) E_{2^k}(f)^τ ≤ K ∑_i |⟨e_i, f⟩|^τ` with +`K = 2 · 2^(τ/2) (1 - 2^(-(1 - τ/2)))⁻¹`, for `0 < τ < 2`. The dyadic upper bound, the +subadditivity of `x ↦ x^(τ/2)` and Hardy's inequality for tails reduce the sum to +`∑_l 2^l (γ*_{2^l})^τ`, at most `2 ∑_i γ_i^τ` +(`tsum_two_pow_mul_decreasingRearrangement_le_two_mul`). -/ +theorem tsum_approxSeqDyadic_nTerm_rpow_le {τ : ℝ} (hτ0 : 0 < τ) (hτ2 : τ < 2) (f : H) : + ∑' k, (nTerm b.coeffDictionary).approxSeqDyadic (1 / τ - 1 / 2) f k ^ τ ≤ + 2 ^ (τ / 2) * (1 - 2 ^ (-(1 - τ / 2)))⁻¹ * 2 * ∑' i, ‖b.repr f i‖ₑ ^ τ := by + set c := TauCeti.decreasingRearrangement fun i => ‖b.repr f i‖ + set v : ℕ → ℝ≥0∞ := fun j => (2 ^ j * ENNReal.ofReal (c (2 ^ j)) ^ 2) ^ (τ / 2) + have hτ2' : 0 ≤ τ / 2 := by positivity + have hE : ∀ k, (nTerm b.coeffDictionary).approxError f (2 ^ k) ^ τ ≤ + 2 ^ (τ / 2) * ∑' l, v (k + l) := fun k => by + calc (nTerm b.coeffDictionary).approxError f (2 ^ k) ^ τ + = ((nTerm b.coeffDictionary).approxError f (2 ^ k) ^ 2) ^ (τ / 2) := by + rw [← ENNReal.rpow_natCast, ← ENNReal.rpow_mul]; congr 1; push_cast; ring + _ ≤ (2 * ∑' l, 2 ^ (k + l) * ENNReal.ofReal (c (2 ^ (k + l))) ^ 2) ^ (τ / 2) := by + gcongr; exact b.approxError_nTerm_two_pow_sq_le k f + _ ≤ 2 ^ (τ / 2) * ∑' l, v (k + l) := by + rw [ENNReal.mul_rpow_of_nonneg _ _ hτ2'] + gcongr + exact ENNReal.rpow_tsum_le_tsum_rpow _ (by positivity) (by linarith) + have hHardy := hardy_tail_le (le_refl (1 : ℝ≥0∞)) (1 - τ / 2) v + simp only [lqNorm_one] at hHardy + have hv : ∀ k, dyadicWeight (1 - τ / 2) k * v k = 2 ^ k * ENNReal.ofReal (c (2 ^ k)) ^ τ := + fun k => dyadicWeight_mul_rpow_eq hτ0 k _ + simp_rw [hv] at hHardy + have h2 := tsum_two_pow_mul_decreasingRearrangement_le_two_mul + (fun i => norm_nonneg (b.repr f i)) (b.tendsto_norm_repr f) hτ0 + simp only [ofReal_norm] at h2 + calc ∑' k, (nTerm b.coeffDictionary).approxSeqDyadic (1 / τ - 1 / 2) f k ^ τ + = ∑' k, dyadicWeight (1 - τ / 2) k * + (nTerm b.coeffDictionary).approxError f (2 ^ k) ^ τ := by + simp_rw [approxSeqDyadic_rpow hτ0.le, one_div_sub_mul_self hτ0] + _ ≤ ∑' k, dyadicWeight (1 - τ / 2) k * (2 ^ (τ / 2) * ∑' l, v (k + l)) := by + gcongr with k; exact hE k + _ = 2 ^ (τ / 2) * ∑' k, dyadicWeight (1 - τ / 2) k * ∑' l, v (k + l) := by + rw [← ENNReal.tsum_mul_left]; congr 1; funext k; ring + _ ≤ 2 ^ (τ / 2) * ((1 - 2 ^ (-(1 - τ / 2)))⁻¹ * (2 * ∑' i, ‖b.repr f i‖ₑ ^ τ)) := by + gcongr; exact hHardy.trans (by gcongr) + _ = _ := by ring + +/-- **Stechkin–DeVore, upper bound**: for `0 < τ < 2` and `θ = 1/τ - 1/2`, the dyadic quasi-norm +of `A^θ_τ` for `n`-term approximation satisfies +`‖f‖_{A^θ_τ} ≤ C_τ (∑_i |⟨e_i, f⟩|^τ)^(1/τ)` (`HilbertBasis.stechkinConst`; Stechkin 1955 for +`τ = 1`; in general Pietsch, *Approximation spaces*, 1981, Example 1 in §3.2, and DeVore, +*Nonlinear approximation*, 1998, Theorem 4). -/ +theorem approxNormDyadic_nTerm_le {τ : ℝ} (hτ0 : 0 < τ) (hτ2 : τ < 2) (f : H) : + (nTerm b.coeffDictionary).approxNormDyadic (1 / τ - 1 / 2) (ENNReal.ofReal τ) f ≤ + stechkinConst τ * (∑' i, ‖b.repr f i‖ₑ ^ τ) ^ (1 / τ) := by + have hq0 : ENNReal.ofReal τ ≠ 0 := (ENNReal.ofReal_pos.2 hτ0).ne' + rw [approxNormDyadic, stechkinConst, add_mul, one_mul, + ← ENNReal.mul_rpow_of_nonneg _ _ (by positivity : (0 : ℝ) ≤ 1 / τ)] + gcongr + · exact b.enorm_le_tsum_repr_rpow hτ0 hτ2.le f + · rw [lqNorm_eq_tsum hq0 ofReal_ne_top, ENNReal.toReal_ofReal hτ0.le] + gcongr + exact b.tsum_approxSeqDyadic_nTerm_rpow_le hτ0 hτ2 f + +/-- **Stechkin–DeVore, lower bound**: for `τ > 0` and `θ = 1/τ - 1/2`, +`∑_i |⟨e_i, f⟩|^τ ≤ 4 ‖f‖^τ_{A^θ_τ}` for the dyadic quasi-norm; the theorem uses it for +`τ < 2`, where `θ > 0`. The upper block inequality +bounds `∑_i γ_i^τ` by `(γ*_0)^τ + (γ*_1)^τ + ∑_l 2^(l+1) (γ*_{2^(l+1)})^τ`; the first two terms +are at most `‖f‖^τ`, and the dyadic lower bound gives +`2^(l+1) (γ*_{2^(l+1)})^τ ≤ 2 (2^(lθ) E_{2^l}(f))^τ`. -/ +theorem tsum_repr_rpow_le {τ : ℝ} (hτ0 : 0 < τ) (f : H) : + ∑' i, ‖b.repr f i‖ₑ ^ τ ≤ + 4 * (nTerm b.coeffDictionary).approxNormDyadic (1 / τ - 1 / 2) (ENNReal.ofReal τ) f ^ τ := by + set c := TauCeti.decreasingRearrangement fun i => ‖b.repr f i‖ + set N := (nTerm b.coeffDictionary).approxNormDyadic (1 / τ - 1 / 2) (ENNReal.ofReal τ) f + set L := lqNorm (ENNReal.ofReal τ) ((nTerm b.coeffDictionary).approxSeqDyadic (1 / τ - 1 / 2) f) + have hq0 : ENNReal.ofReal τ ≠ 0 := (ENNReal.ofReal_pos.2 hτ0).ne' + have hτ2' : 0 ≤ τ / 2 := by positivity + have hc : ∀ n, ENNReal.ofReal (c n) ≤ ‖f‖ₑ := fun n => by + rw [← ofReal_norm]; gcongr; exact b.decreasingRearrangement_norm_repr_le f n + have hblock : ∀ l, 2 ^ (l + 1) * ENNReal.ofReal (c (2 ^ (l + 1))) ^ τ ≤ + 2 * (nTerm b.coeffDictionary).approxSeqDyadic (1 / τ - 1 / 2) f l ^ τ := fun l => by + have hE : ((nTerm b.coeffDictionary).approxError f (2 ^ l) ^ 2) ^ (τ / 2) = + (nTerm b.coeffDictionary).approxError f (2 ^ l) ^ τ := by + rw [← ENNReal.rpow_natCast, ← ENNReal.rpow_mul]; congr 1; push_cast; ring + rw [approxSeqDyadic_rpow hτ0.le, one_div_sub_mul_self hτ0, ← hE] + calc 2 ^ (l + 1) * ENNReal.ofReal (c (2 ^ (l + 1))) ^ τ + = 2 * (dyadicWeight (1 - τ / 2) l * + (2 ^ l * ENNReal.ofReal (c (2 ^ (l + 1))) ^ 2) ^ (τ / 2)) := by + rw [dyadicWeight_mul_rpow_eq hτ0]; ring + _ ≤ 2 * (dyadicWeight (1 - τ / 2) l * + ((nTerm b.coeffDictionary).approxError f (2 ^ l) ^ 2) ^ (τ / 2)) := by + gcongr; exact b.two_pow_mul_decreasingRearrangement_sq_le l f + have hL : L ^ τ = ∑' l, (nTerm b.coeffDictionary).approxSeqDyadic (1 / τ - 1 / 2) f l ^ τ := by + have h := lqNorm_rpow hq0 ofReal_ne_top + ((nTerm b.coeffDictionary).approxSeqDyadic (1 / τ - 1 / 2) f) + rwa [ENNReal.toReal_ofReal hτ0.le] at h + have hfN : ‖f‖ₑ ^ τ ≤ N ^ τ := by gcongr; exact enorm_le_approxNormDyadic f + have hLN : L ^ τ ≤ N ^ τ := by gcongr; exact lqNorm_le_approxNormDyadic f + have h1 := tsum_rpow_le_decreasingRearrangement (fun i => norm_nonneg (b.repr f i)) + (b.tendsto_norm_repr f) hτ0 + simp only [ofReal_norm] at h1 + rw [tsum_eq_zero_add' CompleteLattice.summable] at h1 + calc ∑' i, ‖b.repr f i‖ₑ ^ τ + ≤ ENNReal.ofReal (c 0) ^ τ + (2 ^ 0 * ENNReal.ofReal (c (2 ^ 0)) ^ τ + + ∑' l, 2 ^ (l + 1) * ENNReal.ofReal (c (2 ^ (l + 1))) ^ τ) := h1 + _ ≤ ‖f‖ₑ ^ τ + (‖f‖ₑ ^ τ + 2 * L ^ τ) := by + gcongr + · exact hc 0 + · simpa using ENNReal.rpow_le_rpow (hc 1) hτ0.le + · rw [hL, ← ENNReal.tsum_mul_left]; exact tsum_le_tsum hblock + _ ≤ N ^ τ + (N ^ τ + 2 * N ^ τ) := by gcongr + _ = 4 * N ^ τ := by ring + +/-- **The theorem of Stechkin and DeVore** on best `n`-term approximation from a Hilbert basis: +for `0 < τ < 2` and `θ = 1/τ - 1/2`, `f` lies in the approximation space `A^θ_τ` of +`n`-term approximation from the basis iff its coefficients lie in `ℓ_τ`, +`∑_i |⟨e_i, f⟩|^τ < ∞`. The range `τ < 1`, where `A^θ_τ` is only quasi-normed, is included. +Stechkin (Dokl. Akad. Nauk SSSR 102, 1955) proved the case `τ = 1`. For general `τ` the +sequence form goes back to Pietsch (*Approximation spaces*, J. Approx. Theory 1981, Example 1 in +§3.2), and DeVore (*Nonlinear approximation*, Acta Numer. 1998, Theorem 4) proves it by +interpolation. -/ +theorem memApprox_nTerm_iff {τ : ℝ} (hτ0 : 0 < τ) (hτ2 : τ < 2) (f : H) : + (nTerm b.coeffDictionary).MemApprox (1 / τ - 1 / 2) (ENNReal.ofReal τ) f ↔ + ∑' i, ‖b.repr f i‖ₑ ^ τ < ∞ := by + have hθ : 0 ≤ 1 / τ - 1 / 2 := by + have : 1 / 2 < 1 / τ := one_div_lt_one_div_of_lt hτ0 hτ2 + linarith + rw [memApprox_iff_approxNormDyadic_lt_top' (ENNReal.ofReal_pos.2 hτ0).ne' hθ] + constructor + · intro h + exact (b.tsum_repr_rpow_le hτ0 f).trans_lt + (ENNReal.mul_lt_top (by norm_num) (ENNReal.rpow_lt_top_of_nonneg hτ0.le h.ne)) + · intro h + exact (b.approxNormDyadic_nTerm_le hτ0 hτ2 f).trans_lt + (ENNReal.mul_lt_top (stechkinConst_ne_top hτ0 hτ2).lt_top + (ENNReal.rpow_lt_top_of_nonneg (by positivity) h.ne)) + +end HilbertBasis diff --git a/LeanPool/FunctionSpaces/ApproximationSpaces/Instances/Span.lean b/LeanPool/FunctionSpaces/ApproximationSpaces/Instances/Span.lean new file mode 100644 index 0000000000..eb9a4c5cf9 --- /dev/null +++ b/LeanPool/FunctionSpaces/ApproximationSpaces/Instances/Span.lean @@ -0,0 +1,72 @@ +/- +Copyright (c) 2026 Mario Ullrich. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Mario Ullrich +-/ +module + +public import LeanPool.FunctionSpaces.ApproximationSpaces.Error +public import Mathlib.Topology.Algebra.Module.FiniteDimension + +/- +Modified for Lean Pool: module names and imports adapted. +-/ + +/-! +# Linear approximation from the first `n` elements of a sequence + +For a sequence `e 0, e 1, e 2, …` in `X`, the scheme `ofSpan e` has + +`A n = span {e 0, …, e (n - 1)}`, + +the linear span of the first `n` elements (`A 0 = span ∅ = {0}`). This is linear +approximation in a fixed order: Fourier partial sums, polynomials of degree `< n` in the +monomial basis, the first `n` elements of a wavelet basis. The sets are finite-dimensional +subspaces, hence closed, so a best approximant exists. Their union is the span of the whole +sequence, so `E_n(f) → 0` exactly when `f` lies in the closed span of `e`. +-/ + +@[expose] public section + +namespace ApproximationScheme + +variable {X : Type*} [NormedAddCommGroup X] [NormedSpace ℝ X] + +/-- The scheme of **linear approximation from the first `n` elements** of a sequence `e`: +`A n = span {e i : i < n}`. -/ +def ofSpan (e : ℕ → X) : ApproximationScheme X := + ofSubmodules (fun n => Submodule.span ℝ (e '' Set.Iio n)) (by simp) + fun _ _ h => Submodule.span_mono (Set.image_mono (Set.Iio_subset_Iio h)) + +variable (e : ℕ → X) + +/-- `A_n = span {e_i : i < n}`. -/ +theorem ofSpan_apply (n : ℕ) : ofSpan e n = (Submodule.span ℝ (e '' Set.Iio n) : Set X) := rfl + +/-- The sets of `ofSpan e` are finite-dimensional. -/ +instance finiteDimensional_span_ofSpan (n : ℕ) : + FiniteDimensional ℝ (Submodule.span ℝ (e '' Set.Iio n)) := + FiniteDimensional.span_of_finite ℝ ((Set.finite_Iio n).image e) + +/-- The sets of `ofSpan e` are closed, being finite-dimensional subspaces. -/ +theorem isClosed_ofSpan (n : ℕ) : IsClosed (ofSpan e n) := + Submodule.isClosed_of_finiteDimensional _ + +/-- The union of the sets of `ofSpan e` is the span of the whole sequence. -/ +theorem iUnion_ofSpan : (⋃ n, ofSpan e n) = (Submodule.span ℝ (Set.range e) : Set X) := by + have hdir : Directed (· ≤ ·) fun n : ℕ => Submodule.span ℝ (e '' Set.Iio n) := + Monotone.directed_le fun _ _ h => Submodule.span_mono (Set.image_mono (Set.Iio_subset_Iio h)) + have hrange : (⋃ n : ℕ, e '' Set.Iio n) = Set.range e := by + ext x + simp only [Set.mem_iUnion, Set.mem_image, Set.mem_Iio, Set.mem_range] + exact ⟨fun ⟨_, i, _, hi⟩ => ⟨i, hi⟩, fun ⟨i, hi⟩ => ⟨i + 1, i, Nat.lt_succ_self i, hi⟩⟩ + rw [← hrange, Submodule.span_iUnion, Submodule.coe_iSup_of_directed _ hdir] + rfl + +/-- For `ofSpan e`, the errors tend to zero exactly on the closed span of `e`. -/ +theorem tendsto_approxError_ofSpan_iff (f : X) : + Filter.Tendsto ((ofSpan e).approxError f) Filter.atTop (nhds 0) ↔ + f ∈ closure (Submodule.span ℝ (Set.range e) : Set X) := by + rw [tendsto_approxError_zero_iff, iUnion_ofSpan] + +end ApproximationScheme diff --git a/LeanPool/FunctionSpaces/ApproximationSpaces/Interpolation/ApproxSpaces.lean b/LeanPool/FunctionSpaces/ApproximationSpaces/Interpolation/ApproxSpaces.lean new file mode 100644 index 0000000000..0beae0df12 --- /dev/null +++ b/LeanPool/FunctionSpaces/ApproximationSpaces/Interpolation/ApproxSpaces.lean @@ -0,0 +1,572 @@ +/- +Copyright (c) 2026 Mario Ullrich. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Mario Ullrich +-/ +module + +public import LeanPool.FunctionSpaces.ApproximationSpaces.Interpolation.Reiteration + +/- +Modified for Lean Pool: module names and imports adapted. +-/ + +/-! +# Approximation spaces as interpolation spaces + +For every approximation scheme `A` in `X`, every `s ≥ 0` and `1 ≤ q ≤ ∞`, the couple `(X, A^s_q)` +(`ApproximationScheme.leftApproxCouple`, with the norm of `X` and the dyadic quasi-norm of +`A^s_q`) is quasi-normed and homogeneous. For the couple `(X, A^r_∞)` +(`ApproximationScheme.reprCouple`), `0 < s < r` and `1 ≤ q ≤ ∞` + +`A^s_q = (X, A^r_∞)_{s/r,q}` + +(Pietsch 1981; DeVore–Popov, LNM 1302 (1988); +`ApproximationScheme.memApprox_iff_memKMethod_reprCouple`). The proof uses the scheme alone: +Jackson's half is `E_{2^(k+1)}(f) ≤ K(2^(-kr), f)` +(`ApproximationScheme.approxError_le_kFunctional_reprCouple`), and Bernstein's half takes +near-best approximants `a_k ∈ A_{2^k}`, whose norm in `A^r_∞` is at most a finite sum, since +`E_{2^j}(a_k) = 0` for `j ≥ k` (`ApproximationScheme.interpNorm_reprCouple_le_approxNormDyadic`, +with the constant `ApproximationScheme.devorePopovConst`). + +With the reiteration theorem of `ApproximationSpaces.Interpolation.Reiteration` this gives the +**reiteration of approximation spaces**: for `0 < s₀ < s₁`, `0 < η < 1` and `1 ≤ q₀, q₁, q ≤ ∞`, +`(A^{s₀}_{q₀}, A^{s₁}_{q₁})_{η,q} = A^{(1-η)s₀+ηs₁}_q` and `(X, A^{s₁}_{q₁})_{η,q} = A^{ηs₁}_q` +(`ApproximationScheme.memKMethod_approxCouple_iff`, +`ApproximationScheme.memKMethod_approxCouple_zero_iff`), and the **sandwich principle**: a couple +whose norms lie between two dyadic quasi-norms of the same smoothness has the corresponding +approximation spaces as interpolation spaces +(`ApproximationScheme.memKMethod_iff_memApprox_of_sandwich`, +`ApproximationScheme.memKMethod_iff_memApprox_of_two_sandwiches`). For a smoothness space with +Jackson's and Bernstein's inequalities this gives the representation theorem once more +(`ApproximationScheme.memKMethod_ofMap_iff_memApprox`). The exponent `(1-η)s₀ + ηs₁` lies +in `(0, θ)` whenever `0 < s₀ < s₁ < θ` (`ApproximationScheme.reiterationExponent_pos`, +`ApproximationScheme.reiterationExponent_lt`). +-/ + +@[expose] public section + +open Finset +open scoped ENNReal +open ENNReal (lqNorm dyadicWeight) + +namespace ApproximationScheme + +variable {X : Type*} [NormedAddCommGroup X] [NormedSpace ℝ X] + +variable {A : ApproximationScheme X} {r s s₀ s₁ η θ : ℝ} {q q₀ q₁ : ℝ≥0∞} + +/-! ### The couples `(X, A^s_q)` and `(X, A^r_∞)` -/ + +variable (A) in +/-- The **couple `(X, A^s_q)`** of the scheme: the norm `‖f‖` of `X` and the dyadic quasi-norm +`‖f‖ + ‖(2^(ks) E_{2^k}(f))_k‖_{ℓ_q}` of `A^s_q`. Its interpolation spaces are the +approximation spaces `A^{ηs}_q`, `0 < η < 1` (`memKMethod_approxCouple_zero_iff`). -/ +noncomputable def leftApproxCouple (s : ℝ) (q : ℝ≥0∞) : InterpCouple X := + ⟨fun f => ‖f‖ₑ, A.approxNormDyadic s q⟩ + +/-- The first norm of `(X, A^s_q)` is the norm of `X`. -/ +@[simp] +theorem leftApproxCouple_norm0 (f : X) : (A.leftApproxCouple s q).norm0 f = ‖f‖ₑ := rfl + +/-- The second norm of `(X, A^s_q)` is the dyadic quasi-norm of `A^s_q`. -/ +@[simp] +theorem leftApproxCouple_norm1 (f : X) : + (A.leftApproxCouple s q).norm1 f = A.approxNormDyadic s q f := rfl + +/-- For `s ≥ 0` and `q ≥ 1` the couple `(X, A^s_q)` is quasi-normed with constant `2 · 2^s` +(`approxNormDyadic_add_le`). -/ +theorem isQuasiNormed_leftApproxCouple (hs : 0 ≤ s) (hq : 1 ≤ q) : + (A.leftApproxCouple s q).IsQuasiNormed (2 * 2 ^ s) where + ne_top := ENNReal.mul_ne_top (by norm_num) (ENNReal.two_rpow_ne_top s) + norm0_zero := eNorm_zero + norm1_zero := approxNormDyadic_zero s q + norm0_neg a := eNorm_neg a + norm1_neg a := approxNormDyadic_neg a + norm0_add_le a b := + (eNorm_add_le a b).trans (le_mul_of_one_le_left' (ENNReal.one_le_two_mul_two_rpow hs)) + norm1_add_le := approxNormDyadic_add_le hq hs + +/-- The couple `(X, A^s_q)` is homogeneous (`approxNormDyadic_smul`). -/ +theorem isHomogeneous_leftApproxCouple : (A.leftApproxCouple s q).IsHomogeneous where + norm0_smul_le c a := (eNorm_smul c a).le + norm1_smul_le c a := (approxNormDyadic_smul c a).le + +variable (A) in +/-- The **couple `(X, A^r_∞)`** of the scheme, `leftApproxCouple r ∞`: the norm `‖f‖` of `X` and +the dyadic quasi-norm `‖f‖ + sup_k 2^(kr) E_{2^k}(f)` of `A^r_∞`. Its interpolation spaces are +the approximation spaces `A^s_q`, `0 < s < r` (`memApprox_iff_memKMethod_reprCouple`). -/ +noncomputable def reprCouple (r : ℝ) : InterpCouple X := + A.leftApproxCouple r ∞ + +/-- The first norm of `(X, A^r_∞)` is the norm of `X`. -/ +@[simp] +theorem reprCouple_norm0 (f : X) : (A.reprCouple r).norm0 f = ‖f‖ₑ := rfl + +/-- The second norm of `(X, A^r_∞)` is the dyadic quasi-norm of `A^r_∞`. -/ +@[simp] +theorem reprCouple_norm1 (f : X) : (A.reprCouple r).norm1 f = A.approxNormDyadic r ∞ f := rfl + +/-- For `r ≥ 0` the couple `(X, A^r_∞)` is quasi-normed with constant `2 · 2^r`. -/ +theorem isQuasiNormed_reprCouple (hr : 0 ≤ r) : (A.reprCouple r).IsQuasiNormed (2 * 2 ^ r) := + isQuasiNormed_leftApproxCouple hr le_top + +/-- The couple `(X, A^r_∞)` is homogeneous. -/ +theorem isHomogeneous_reprCouple : (A.reprCouple r).IsHomogeneous := + isHomogeneous_leftApproxCouple + +/-- The couple `(X, A^r_∞)` is ordered: `‖f‖ ≤ 1 · ‖f‖_{A^r_∞}`. -/ +theorem norm0_reprCouple_le (f : X) : (A.reprCouple r).norm0 f ≤ 1 * (A.reprCouple r).norm1 f := by + rw [one_mul] + exact enorm_le_approxNormDyadic f + +/-! ### Jackson's half -/ + +/-- One term of the dyadic quasi-norm of `A^r_∞`: `E_{2^k}(b) ≤ 2^(-kr) ‖b‖_{A^r_∞}`. -/ +theorem approxError_pow_le_dyadicWeight_mul (b : X) (k : ℕ) : + A.approxError b (2 ^ k) ≤ dyadicWeight (-r) k * A.approxNormDyadic r ∞ b := + (approxError_pow_le (s := r) ENNReal.top_ne_zero b k).trans + (by gcongr; exact lqNorm_le_approxNormDyadic b) + +/-- **Jackson's inequality for the couple `(X, A^r_∞)`**: `E_{2^(k+1)}(f) ≤ K(2^(-kr), f)`, since +`E_{2^(k+1)}(f) ≤ E_{2^k}(f - b) + E_{2^k}(b) ≤ ‖f - b‖ + 2^(-kr) ‖b‖_{A^r_∞}` for every `b`. -/ +theorem approxError_le_kFunctional_reprCouple (f : X) (k : ℕ) : + A.approxError f (2 ^ (k + 1)) ≤ (A.reprCouple r).kFunctional (dyadicWeight (-r) k) f := by + unfold InterpCouple.kFunctional + refine le_iInf fun b => ?_ + calc A.approxError f (2 ^ (k + 1)) = A.approxError ((f - b) + b) (2 ^ (k + 1)) := by + rw [sub_add_cancel] + _ ≤ A.approxError (f - b) (2 ^ k) + A.approxError b (2 ^ k) := approxError_add_le_pow_succ k _ _ + _ ≤ ‖f - b‖ₑ + dyadicWeight (-r) k * A.approxNormDyadic r ∞ b := + add_le_add (approxError_le_enorm _ _) (approxError_pow_le_dyadicWeight_mul b k) + +/-- **Jackson's half of `A^s_q = (X, A^r_∞)_{s/r,q}`**: for `s ≥ 0`, `r ≠ 0` and `q ≥ 1`, +`‖f‖_{A^s_q} ≤ 2 · 2^s (‖f‖ + ‖(2^(ks) K(2^(-kr), f))_k‖_{ℓ_q})`, the dyadic quasi-norm against +the norm of the couple `(X, A^r_∞)` on the grid `t = 2^(-kr)`. -/ +theorem approxNormDyadic_le_interpNorm_reprCouple (hs : 0 ≤ s) (hr : r ≠ 0) (hq : 1 ≤ q) + (f : X) : + A.approxNormDyadic s q f ≤ 2 * 2 ^ s * (A.reprCouple r).interpNorm (s / r) r q f := by + have hshift : lqNorm q (fun k => A.approxSeqDyadic s f (k + 1)) ≤ 2 ^ s * + lqNorm q (fun k : ℕ => dyadicWeight (r * (s / r)) k * + (A.reprCouple r).kFunctional (dyadicWeight (-r) k) f) := by + rw [← ENNReal.lqNorm_const_mul] + refine ENNReal.lqNorm_mono fun k => ?_ + rw [approxSeqDyadic, ENNReal.dyadicWeight_succ, mul_div_cancel₀ s hr, mul_assoc] + gcongr + exact approxError_le_kFunctional_reprCouple f k + calc A.approxNormDyadic s q f = ‖f‖ₑ + lqNorm q (A.approxSeqDyadic s f) := rfl + _ ≤ ‖f‖ₑ + (‖f‖ₑ + 2 ^ s * lqNorm q (fun k : ℕ => dyadicWeight (r * (s / r)) k * + (A.reprCouple r).kFunctional (dyadicWeight (-r) k) f)) := by + gcongr + refine (ENNReal.lqNorm_le_head_add_shift hq _).trans (add_le_add ?_ hshift) + rw [approxSeqDyadic_zero] + exact approxError_le_enorm f 1 + _ ≤ 2 * 2 ^ s * ‖f‖ₑ + 2 * 2 ^ s * lqNorm q (fun k : ℕ => dyadicWeight (r * (s / r)) k * + (A.reprCouple r).kFunctional (dyadicWeight (-r) k) f) := by + rw [← add_assoc, ← two_mul] + gcongr + · exact le_mul_of_one_le_right' (ENNReal.one_le_two_rpow hs) + · exact le_mul_of_one_le_left' one_le_two + _ = 2 * 2 ^ s * (A.reprCouple r).interpNorm (s / r) r q f := by + rw [InterpCouple.interpNorm, mul_add] + rfl + +/-! ### Bernstein's half -/ + +/-- **One term of the interpolation norm of `(X, A^r_∞)` by near-best approximants**: for `s ≥ 0`, +`r ≠ 0` and near-best approximants `a_k` with the tolerances `t_k = tolerance f s k`, +`2^(ks) K(2^(-kr), f) ≤ (2^(ks) E_{2^k}(f) + 2^(ks) t_k) + 3 ‖f‖ 2^(-k(r-s)) ++ 2 · 2^(-k(r-s)) ∑_{j ≤ k} 2^(jr) (E_{2^j}(f) + t_j)`, from +`K(2^(-kr), f) ≤ ‖f - a_k‖ + 2^(-kr) ‖a_k‖_{A^r_∞}`. -/ +theorem dyadicWeight_mul_kFunctional_reprCouple_le (hs : 0 ≤ s) (hr : r ≠ 0) {f : X} + (D : A.DyadicApprox f (tolerance f s)) (k : ℕ) : + dyadicWeight (r * (s / r)) k * (A.reprCouple r).kFunctional (dyadicWeight (-r) k) f ≤ + (A.approxSeqDyadic s f k + dyadicWeight s k * tolerance f s k) + + (3 * ‖f‖ₑ * dyadicWeight (-(r - s)) k + 2 * (dyadicWeight (-(r - s)) k * + ∑ j ∈ range (k + 1), + dyadicWeight r j * (A.approxError f (2 ^ j) + tolerance f s j))) := by + have hK : (A.reprCouple r).kFunctional (dyadicWeight (-r) k) f ≤ + (A.approxError f (2 ^ k) + tolerance f s k) + dyadicWeight (-r) k * (3 * ‖f‖ₑ + 2 * + ∑ j ∈ range (k + 1), dyadicWeight r j * (A.approxError f (2 ^ j) + tolerance f s j)) := by + refine (InterpCouple.kFunctional_le (D.a k) f).trans ?_ + gcongr + · exact D.eNorm_sub_le k + · exact D.approxNormDyadic_top_le (tolerance_anti f hs) (tolerance_zero f s).le k + have hw : dyadicWeight s k * dyadicWeight (-r) k = dyadicWeight (-(r - s)) k := by + rw [← ENNReal.dyadicWeight_add] + congr 1 + ring + rw [mul_div_cancel₀ s hr] + calc dyadicWeight s k * (A.reprCouple r).kFunctional (dyadicWeight (-r) k) f + ≤ dyadicWeight s k * ((A.approxError f (2 ^ k) + tolerance f s k) + + dyadicWeight (-r) k * (3 * ‖f‖ₑ + 2 * ∑ j ∈ range (k + 1), + dyadicWeight r j * (A.approxError f (2 ^ j) + tolerance f s j))) := by gcongr + _ = _ := by + simp only [approxSeqDyadic, mul_add, ← mul_assoc, hw] + ring + +/-- **The `ℓ_q` part of the interpolation norm of `(X, A^r_∞)`**: for `0 ≤ s < r`, `q ≥ 1` and +near-best approximants with the tolerances `tolerance f s`, +`‖(2^(ks) K(2^(-kr), f))_k‖_{ℓ_q} ≤ (D + 2 ‖f‖) + 3 ‖f‖ c_{r-s} + 2 c_{r-s} (D + 2 ‖f‖)`, where +`D = ‖(2^(ks) E_{2^k}(f))_k‖_{ℓ_q}` and `c_{r-s} = (1 - 2^(-(r-s)))⁻¹` +(`lqNorm_le_of_le_partialSums` with `B = 3 ‖f‖` and `K = 2`). -/ +theorem lqNorm_kFunctional_reprCouple_le (hs : 0 ≤ s) (hsr : s < r) (hq : 1 ≤ q) {f : X} + (D : A.DyadicApprox f (tolerance f s)) : + lqNorm q (fun k : ℕ => dyadicWeight (r * (s / r)) k * + (A.reprCouple r).kFunctional (dyadicWeight (-r) k) f) ≤ + (lqNorm q (A.approxSeqDyadic s f) + 2 * ‖f‖ₑ) + + (3 * ‖f‖ₑ * (1 - (2 : ℝ≥0∞) ^ (-(r - s)))⁻¹ + + 2 * ((1 - (2 : ℝ≥0∞) ^ (-(r - s)))⁻¹ * (lqNorm q (A.approxSeqDyadic s f) + 2 * ‖f‖ₑ))) := + lqNorm_le_of_le_partialSums hq + (dyadicWeight_mul_kFunctional_reprCouple_le hs (hs.trans_lt hsr).ne' D) + +/-- The constant `3 + 7 (1 - 2^(-(r-s)))⁻¹` of the proof here of Bernstein's half of the theorem +`A^s_q = (X, A^r_∞)_{s/r,q}` of DeVore–Popov, LNM 1302 (1988). -/ +noncomputable def devorePopovConst (r s : ℝ) : ℝ≥0∞ := + 3 + 7 * (1 - (2 : ℝ≥0∞) ^ (-(r - s)))⁻¹ + +/-- The constant `devorePopovConst r s` is finite for `s < r`. -/ +theorem devorePopovConst_ne_top (h : s < r) : devorePopovConst r s ≠ ∞ := + ENNReal.add_ne_top.2 ⟨by norm_num, ENNReal.mul_ne_top (by norm_num) + (ENNReal.one_sub_two_rpow_neg_inv_ne_top (sub_pos.2 h))⟩ + +/-- **Bernstein's half of `A^s_q = (X, A^r_∞)_{s/r,q}`** (DeVore–Popov, LNM 1302 (1988)): for +`0 ≤ s < r` and `q ≥ 1`, +`‖f‖ + ‖(2^(ks) K(2^(-kr), f))_k‖_{ℓ_q} ≤ devorePopovConst r s · ‖f‖_{A^s_q}`. The near-best +approximants themselves lie in `A^r_∞` and take the place of the lifts of the representation +theorem (`enorm_add_le_mul_approxNormDyadic` with `B = 3` and `K = 2`). -/ +theorem interpNorm_reprCouple_le_approxNormDyadic (hs : 0 ≤ s) (hsr : s < r) (hq : 1 ≤ q) + (f : X) : + (A.reprCouple r).interpNorm (s / r) r q f ≤ + devorePopovConst r s * A.approxNormDyadic s q f := by + rcases eq_or_ne f 0 with rfl | hf0 + · rw [InterpCouple.interpNorm_zero eNorm_zero (approxNormDyadic_zero r ∞)] + exact zero_le + obtain ⟨D⟩ := exists_dyadicApprox A f (tolerance_ne_zero hf0 s) + calc (A.reprCouple r).interpNorm (s / r) r q f + = ‖f‖ₑ + lqNorm q (fun k : ℕ => dyadicWeight (r * (s / r)) k * + (A.reprCouple r).kFunctional (dyadicWeight (-r) k) f) := rfl + _ ≤ (3 + (3 + 2 * 2) * (1 - (2 : ℝ≥0∞) ^ (-(r - s)))⁻¹) * A.approxNormDyadic s q f := + enorm_add_le_mul_approxNormDyadic (lqNorm_kFunctional_reprCouple_le hs hsr hq D) + _ = devorePopovConst r s * A.approxNormDyadic s q f := by + rw [devorePopovConst] + ring + +/-! ### Approximation spaces are interpolation spaces -/ + +/-- **Approximation spaces are interpolation spaces** (Pietsch 1981; DeVore–Popov, LNM 1302 +(1988)): for every scheme, `0 < s < r` and `1 ≤ q ≤ ∞`, `A^s_q = (X, A^r_∞)_{s/r,q}`, the real +interpolation space of the continuous K-method of the couple `(X, A^r_∞)`. -/ +theorem memApprox_iff_memKMethod_reprCouple (hs : 0 < s) (hsr : s < r) (hq : 1 ≤ q) {f : X} : + A.MemApprox s q f ↔ (A.reprCouple r).MemKMethod (s / r) q f := by + have hr : 0 < r := hs.trans hsr + rw [memApprox_iff_approxNormDyadic_lt_top hq hs.le, + InterpCouple.memKMethod_iff_interpNorm_lt_top (isQuasiNormed_reprCouple hr.le) + ENNReal.one_ne_top norm0_reprCouple_le (div_pos hs hr) hr (zero_lt_one.trans_le hq).ne'] + exact ⟨fun h => (interpNorm_reprCouple_le_approxNormDyadic hs.le hsr hq f).trans_lt + (ENNReal.mul_lt_top (devorePopovConst_ne_top hsr).lt_top h), + fun h => (approxNormDyadic_le_interpNorm_reprCouple hs.le hr.ne' hq f).trans_lt + (ENNReal.mul_lt_top (ENNReal.mul_lt_top (by norm_num) (ENNReal.two_rpow_ne_top s).lt_top) h)⟩ + +/-- **Approximation spaces are interpolation spaces**, as an equality of subspaces: for +`0 < s < r` and `1 ≤ q ≤ ∞`, the real interpolation space `(X, A^r_∞)_{s/r,q}` is `A^s_q`. -/ +theorem kMethodSpace_reprCouple (hs : 0 < s) (hsr : s < r) (hq : 1 ≤ q) : + InterpCouple.kMethodSpace (isQuasiNormed_reprCouple (A := A) (hs.trans hsr).le) + isHomogeneous_reprCouple (s / r) q = A.approxSpace s q hs.le hq := + Submodule.ext fun _ => (memApprox_iff_memKMethod_reprCouple hs hsr hq).symm + +/-- The constant `2 · 2^s (1 + 2 · 2^r) 2^s (r log 2)^(-1/q)` of the bound of the dyadic +quasi-norm of `A^s_q` by the continuous K-norm of `(X, A^r_∞)`. -/ +noncomputable def reprLowerConst (r s : ℝ) (q : ℝ≥0∞) : ℝ≥0∞ := + 2 * 2 ^ s * ((1 + 2 * 2 ^ r) * (2 ^ s * (ENNReal.ofReal (r * Real.log 2) ^ (1 / q.toReal))⁻¹)) + +/-- The constant `reprLowerConst r s q` is finite for `r > 0`. -/ +theorem reprLowerConst_ne_top (hr : 0 < r) (s : ℝ) (q : ℝ≥0∞) : reprLowerConst r s q ≠ ∞ := + ENNReal.mul_ne_top (ENNReal.mul_ne_top (by norm_num) (ENNReal.two_rpow_ne_top s)) + (ENNReal.mul_ne_top (ENNReal.add_ne_top.2 ⟨ENNReal.one_ne_top, + ENNReal.mul_ne_top (by norm_num) (ENNReal.two_rpow_ne_top r)⟩) + (ENNReal.mul_ne_top (ENNReal.two_rpow_ne_top s) + (ENNReal.inv_ne_top.2 (ofReal_mul_log_two_rpow_ne_zero hr q)))) + +/-- **The dyadic quasi-norm of `A^s_q` by the continuous K-norm of `(X, A^r_∞)`**: for `s ≥ 0`, +`r > 0` and `q ≥ 1`, `‖f‖_{A^s_q} ≤ reprLowerConst r s q · ‖f‖_{K,s/r,q}`. -/ +theorem approxNormDyadic_le_kMethodNorm_reprCouple (hs : 0 ≤ s) (hr : 0 < r) (hq : 1 ≤ q) + (f : X) : + A.approxNormDyadic s q f ≤ reprLowerConst r s q * (A.reprCouple r).kMethodNorm (s / r) q f := by + have h := InterpCouple.interpNorm_le_kMethodNorm (isQuasiNormed_reprCouple (A := A) hr.le) + ENNReal.one_ne_top norm0_reprCouple_le (div_nonneg hs hr.le) hr (zero_lt_one.trans_le hq).ne' + f + rw [mul_div_cancel₀ s hr.ne', max_self, mul_one] at h + calc A.approxNormDyadic s q f ≤ 2 * 2 ^ s * (A.reprCouple r).interpNorm (s / r) r q f := + approxNormDyadic_le_interpNorm_reprCouple hs hr.ne' hq f + _ ≤ 2 * 2 ^ s * ((1 + 2 * 2 ^ r) * (2 ^ s * + (ENNReal.ofReal (r * Real.log 2) ^ (1 / q.toReal))⁻¹) * + (A.reprCouple r).kMethodNorm (s / r) q f) := by gcongr + _ = reprLowerConst r s q * (A.reprCouple r).kMethodNorm (s / r) q f := by + rw [reprLowerConst] + ring + +/-- The constant `kMethodUpperConst (s/r) r q · devorePopovConst r s` of the bound of the +continuous K-norm of `(X, A^r_∞)` by the dyadic quasi-norm of `A^s_q`. -/ +noncomputable def reprUpperConst (r s : ℝ) (q : ℝ≥0∞) : ℝ≥0∞ := + kMethodUpperConst (s / r) r q * devorePopovConst r s + +/-- The constant `reprUpperConst r s q` is finite for `0 < s < r`. -/ +theorem reprUpperConst_ne_top (hs : 0 < s) (hsr : s < r) (q : ℝ≥0∞) : + reprUpperConst r s q ≠ ∞ := + ENNReal.mul_ne_top (kMethodUpperConst_ne_top (div_pos hs (hs.trans hsr)) (hs.trans hsr) q) + (devorePopovConst_ne_top hsr) + +/-- **The continuous K-norm of `(X, A^r_∞)` by the dyadic quasi-norm of `A^s_q`**: for +`0 < s < r` and `q ≥ 1`, `‖f‖_{K,s/r,q} ≤ reprUpperConst r s q · ‖f‖_{A^s_q}`. -/ +theorem kMethodNorm_reprCouple_le_approxNormDyadic (hs : 0 < s) (hsr : s < r) (hq : 1 ≤ q) + (f : X) : + (A.reprCouple r).kMethodNorm (s / r) q f ≤ reprUpperConst r s q * A.approxNormDyadic s q f := + calc (A.reprCouple r).kMethodNorm (s / r) q f + ≤ kMethodUpperConst (s / r) r q * (A.reprCouple r).interpNorm (s / r) r q f := + InterpCouple.kMethodNorm_le_interpNorm + (isQuasiNormed_reprCouple (A := A) (hs.trans hsr).le).norm1_zero + (div_pos hs (hs.trans hsr)).le (hs.trans hsr) f + _ ≤ kMethodUpperConst (s / r) r q * (devorePopovConst r s * A.approxNormDyadic s q f) := by + gcongr + exact interpNorm_reprCouple_le_approxNormDyadic hs.le hsr hq f + _ = reprUpperConst r s q * A.approxNormDyadic s q f := by rw [reprUpperConst, mul_assoc] + +/-- **The dyadic quasi-norm of `A^s_q` by the discrete K-norm of `(X, A^r_∞)` on the grid +`t = 2^n`**: for `s ≥ 0`, `r > 0` and `q ≥ 1`, +`‖f‖_{A^s_q} ≤ reprLowerConst r s q (log 2)^(1/q) 2^(s/r) ‖(2^(-ns/r) K(2^n, f))_{n ∈ ℤ}‖_{ℓ_q}` +(`InterpCouple.kMethodNorm_le_mul_discreteKMethodNorm`). -/ +theorem approxNormDyadic_le_discreteKMethodNorm_reprCouple (hs : 0 ≤ s) (hr : 0 < r) + (hq : 1 ≤ q) (f : X) : + A.approxNormDyadic s q f ≤ reprLowerConst r s q * + (ENNReal.ofReal (Real.log 2) ^ (1 / q.toReal) * 2 ^ (s / r)) * + (A.reprCouple r).discreteKMethodNorm (s / r) 1 q f := by + rw [mul_assoc] + exact (approxNormDyadic_le_kMethodNorm_reprCouple hs hr hq f).trans + (by gcongr; exact InterpCouple.kMethodNorm_le_mul_discreteKMethodNorm (div_nonneg hs hr.le) f) + +/-- **The discrete K-norm of `(X, A^r_∞)` on the grid `t = 2^n` by the dyadic quasi-norm of +`A^s_q`**: for `0 < s < r` and `q ≥ 1`, +`‖(2^(-ns/r) K(2^n, f))_{n ∈ ℤ}‖_{ℓ_q} ≤ ((log 2)^(1/q) 2^(-s/r))⁻¹ reprUpperConst r s q +‖f‖_{A^s_q}` (`InterpCouple.discreteKMethodNorm_le_mul_kMethodNorm`). -/ +theorem discreteKMethodNorm_reprCouple_le_approxNormDyadic (hs : 0 < s) (hsr : s < r) + (hq : 1 ≤ q) (f : X) : + (A.reprCouple r).discreteKMethodNorm (s / r) 1 q f ≤ + (ENNReal.ofReal (Real.log 2) ^ (1 / q.toReal) * 2 ^ (-(s / r)))⁻¹ * reprUpperConst r s q * + A.approxNormDyadic s q f := by + rw [mul_assoc] + exact (InterpCouple.discreteKMethodNorm_le_mul_kMethodNorm (div_pos hs (hs.trans hsr)).le f).trans + (by gcongr; exact kMethodNorm_reprCouple_le_approxNormDyadic hs hsr hq f) + +/-! ### Reiteration of approximation spaces -/ + +variable (A) in +/-- The **couple `(A^{s₀}_{q₀}, A^{s₁}_{q₁})`** of two approximation spaces, with their dyadic +quasi-norms. -/ +noncomputable def approxCouple (s₀ : ℝ) (q₀ : ℝ≥0∞) (s₁ : ℝ) (q₁ : ℝ≥0∞) : InterpCouple X := + ⟨A.approxNormDyadic s₀ q₀, A.approxNormDyadic s₁ q₁⟩ + +/-- For `s₀, s₁ ≥ 0` and `q₀, q₁ ≥ 1` the couple `(A^{s₀}_{q₀}, A^{s₁}_{q₁})` is quasi-normed with +constant `2 · 2^max(s₀, s₁)` (`approxNormDyadic_add_le`). -/ +theorem isQuasiNormed_approxCouple (hs₀ : 0 ≤ s₀) (hs₁ : 0 ≤ s₁) (hq₀ : 1 ≤ q₀) (hq₁ : 1 ≤ q₁) : + (A.approxCouple s₀ q₀ s₁ q₁).IsQuasiNormed (2 * 2 ^ max s₀ s₁) where + ne_top := ENNReal.mul_ne_top (by norm_num) (ENNReal.two_rpow_ne_top _) + norm0_zero := approxNormDyadic_zero s₀ q₀ + norm1_zero := approxNormDyadic_zero s₁ q₁ + norm0_neg a := approxNormDyadic_neg a + norm1_neg a := approxNormDyadic_neg a + norm0_add_le a b := (approxNormDyadic_add_le hq₀ hs₀ a b).trans (mul_le_mul_left + (mul_le_mul_right (ENNReal.rpow_le_rpow_of_exponent_le one_le_two (le_max_left _ _)) _) _) + norm1_add_le a b := (approxNormDyadic_add_le hq₁ hs₁ a b).trans (mul_le_mul_left + (mul_le_mul_right (ENNReal.rpow_le_rpow_of_exponent_le one_le_two (le_max_right _ _)) _) _) + +/-- The couple `(A^{s₀}_{q₀}, A^{s₁}_{q₁})` is homogeneous (`approxNormDyadic_smul`). -/ +theorem isHomogeneous_approxCouple : (A.approxCouple s₀ q₀ s₁ q₁).IsHomogeneous where + norm0_smul_le c a := (approxNormDyadic_smul c a).le + norm1_smul_le c a := (approxNormDyadic_smul c a).le + +/-- **The reiteration exponent is positive**: for `0 < s₀ < s₁` and `0 < η < 1`, +`0 < (1-η)s₀ + ηs₁`. -/ +theorem reiterationExponent_pos (hs₀ : 0 < s₀) (hs : s₀ < s₁) (hη : 0 < η) (hη' : η < 1) : + 0 < (1 - η) * s₀ + η * s₁ := + add_pos (mul_pos (sub_pos.2 hη') hs₀) (mul_pos hη (hs₀.trans hs)) + +/-- **The reiteration exponent stays below every bound of `s₁`**: for `s₀ < s₁ < θ` and +`η < 1`, `(1-η)s₀ + ηs₁ = s₁ - (1-η)(s₁ - s₀)` is at most `s₁`, hence `< θ`. -/ +theorem reiterationExponent_lt (hs : s₀ < s₁) (hs₁ : s₁ < θ) (hη' : η < 1) : + (1 - η) * s₀ + η * s₁ < θ := + calc (1 - η) * s₀ + η * s₁ ≤ (1 - η) * s₁ + η * s₁ := by gcongr + _ = s₁ := by ring + _ < θ := hs₁ + +/-- **The reiteration theorem for approximation spaces** (DeVore–Lorentz, Chapter 7; Pietsch +1981; DeVore–Popov, LNM 1302 (1988)): for `0 < s₀ < s₁`, `0 < η < 1` and `1 ≤ q₀, q₁, q ≤ ∞`, +`(A^{s₀}_{q₀}, A^{s₁}_{q₁})_{η,q} = A^{(1-η)s₀+ηs₁}_q`. The proof represents both spaces in the +couple `(X, A^r_∞)` with `r = s₁ + 1` and applies `InterpCouple.memKMethod_kCouple_iff`. -/ +theorem memKMethod_approxCouple_iff (hs₀ : 0 < s₀) (hs : s₀ < s₁) (hη : 0 < η) (hη' : η < 1) + (hq₀ : 1 ≤ q₀) (hq₁ : 1 ≤ q₁) (hq : 1 ≤ q) {f : X} : + (A.approxCouple s₀ q₀ s₁ q₁).MemKMethod η q f ↔ A.MemApprox ((1 - η) * s₀ + η * s₁) q f := by + have hs₁ : 0 < s₁ := hs₀.trans hs + have hr : 0 < s₁ + 1 := by linarith + have hsr₀ : s₀ < s₁ + 1 := by linarith + have hsr₁ : s₁ < s₁ + 1 := by linarith + have hθ : 0 < (1 - η) * s₀ + η * s₁ := reiterationExponent_pos hs₀ hs hη hη' + have hθr : (1 - η) * s₀ + η * s₁ < s₁ + 1 := reiterationExponent_lt hs hsr₁ hη' + rw [memApprox_iff_memKMethod_reprCouple hθ hθr hq, + show ((1 - η) * s₀ + η * s₁) / (s₁ + 1) = (1 - η) * (s₀ / (s₁ + 1)) + η * (s₁ / (s₁ + 1)) by + ring, + ← InterpCouple.memKMethod_kCouple_iff (θ₀ := s₀ / (s₁ + 1)) (θ₁ := s₁ / (s₁ + 1)) + (isQuasiNormed_reprCouple hr.le) (div_pos hs₀ hr) (div_lt_div_of_pos_right hs hr) + ((div_lt_one hr).2 hsr₁) hη hη' hq₀ hq₁ hq] + exact InterpCouple.memKMethod_congr (A := A.approxCouple s₀ q₀ s₁ q₁) + (B := (A.reprCouple (s₁ + 1)).kCouple (s₀ / (s₁ + 1)) q₀ (s₁ / (s₁ + 1)) q₁) + (ENNReal.mul_ne_top (inv_log_two_rpow_mul_two_rpow_ne_top _ q₀) + (reprUpperConst_ne_top hs₀ hsr₀ q₀)) + (ENNReal.mul_ne_top (inv_log_two_rpow_mul_two_rpow_ne_top _ q₁) + (reprUpperConst_ne_top hs₁ hsr₁ q₁)) + (ENNReal.mul_ne_top (reprLowerConst_ne_top hr _ q₀) (log_two_rpow_mul_two_rpow_ne_top _ q₀)) + (ENNReal.mul_ne_top (reprLowerConst_ne_top hr _ q₁) (log_two_rpow_mul_two_rpow_ne_top _ q₁)) + (discreteKMethodNorm_reprCouple_le_approxNormDyadic hs₀ hsr₀ hq₀) + (discreteKMethodNorm_reprCouple_le_approxNormDyadic hs₁ hsr₁ hq₁) + (approxNormDyadic_le_discreteKMethodNorm_reprCouple hs₀.le hr hq₀) + (approxNormDyadic_le_discreteKMethodNorm_reprCouple hs₁.le hr hq₁) + +/-- **The reiteration theorem for approximation spaces at the left endpoint**: for `s₁ > 0`, +`0 < η < 1` and `1 ≤ q₁, q ≤ ∞`, `(X, A^{s₁}_{q₁})_{η,q} = A^{ηs₁}_q`, for the couple +`leftApproxCouple s₁ q₁` of the norm of `X` and the dyadic quasi-norm of `A^{s₁}_{q₁}`. -/ +theorem memKMethod_approxCouple_zero_iff (hs₁ : 0 < s₁) (hη : 0 < η) (hη' : η < 1) + (hq₁ : 1 ≤ q₁) (hq : 1 ≤ q) {f : X} : + (A.leftApproxCouple s₁ q₁).MemKMethod η q f ↔ A.MemApprox (η * s₁) q f := by + have hr : 0 < s₁ + 1 := by linarith + have hsr₁ : s₁ < s₁ + 1 := by linarith + have hθr : η * s₁ < s₁ + 1 := by nlinarith + rw [memApprox_iff_memKMethod_reprCouple (mul_pos hη hs₁) hθr hq, + show η * s₁ / (s₁ + 1) = η * (s₁ / (s₁ + 1)) by ring, + ← InterpCouple.memKMethod_leftKCouple_iff (θ₁ := s₁ / (s₁ + 1)) + (isQuasiNormed_reprCouple hr.le) (div_pos hs₁ hr) ((div_lt_one hr).2 hsr₁) hη.le hη' hq₁ + hq] + exact InterpCouple.memKMethod_congr (A := A.leftApproxCouple s₁ q₁) + (B := (A.reprCouple (s₁ + 1)).leftKCouple (s₁ / (s₁ + 1)) q₁) ENNReal.one_ne_top + (ENNReal.mul_ne_top (inv_log_two_rpow_mul_two_rpow_ne_top _ q₁) + (reprUpperConst_ne_top hs₁ hsr₁ q₁)) + ENNReal.one_ne_top + (ENNReal.mul_ne_top (reprLowerConst_ne_top hr _ q₁) (log_two_rpow_mul_two_rpow_ne_top _ q₁)) + (fun a => (one_mul ‖a‖ₑ).ge) + (discreteKMethodNorm_reprCouple_le_approxNormDyadic hs₁ hsr₁ hq₁) + (fun a => (one_mul ‖a‖ₑ).ge) + (approxNormDyadic_le_discreteKMethodNorm_reprCouple hs₁.le hr hq₁) + +/-- **The reiteration theorem for approximation spaces**, as an equality of subspaces: for +`0 < s₀ < s₁`, `0 < η < 1` and `1 ≤ q₀, q₁, q ≤ ∞`, the real interpolation space +`(A^{s₀}_{q₀}, A^{s₁}_{q₁})_{η,q}` is `A^{(1-η)s₀+ηs₁}_q`. -/ +theorem kMethodSpace_approxCouple (hs₀ : 0 < s₀) (hs : s₀ < s₁) (hη : 0 < η) (hη' : η < 1) + (hq₀ : 1 ≤ q₀) (hq₁ : 1 ≤ q₁) (hq : 1 ≤ q) : + InterpCouple.kMethodSpace (isQuasiNormed_approxCouple (A := A) hs₀.le (hs₀.trans hs).le hq₀ hq₁) + isHomogeneous_approxCouple η q = + A.approxSpace ((1 - η) * s₀ + η * s₁) q (reiterationExponent_pos hs₀ hs hη hη').le hq := + Submodule.ext fun _ => memKMethod_approxCouple_iff hs₀ hs hη hη' hq₀ hq₁ hq + +/-- **The reiteration theorem for approximation spaces at the left endpoint**, as an equality of +subspaces: for `s₁ > 0`, `0 < η < 1` and `1 ≤ q₁, q ≤ ∞`, the real interpolation space +`(X, A^{s₁}_{q₁})_{η,q}` is `A^{ηs₁}_q`. -/ +theorem kMethodSpace_approxCouple_zero (hs₁ : 0 < s₁) (hη : 0 < η) (hη' : η < 1) + (hq₁ : 1 ≤ q₁) (hq : 1 ≤ q) : + InterpCouple.kMethodSpace (isQuasiNormed_leftApproxCouple (A := A) hs₁.le hq₁) + isHomogeneous_leftApproxCouple η q = A.approxSpace (η * s₁) q (mul_pos hη hs₁).le hq := + Submodule.ext fun _ => memKMethod_approxCouple_zero_iff hs₁ hη hη' hq₁ hq + +/-! ### Sandwiches -/ + +/-- **The sandwich principle at the left endpoint**: if a function `N₁ : X → [0, ∞]` lies between +two dyadic quasi-norms of smoothness `r > 0`, `N₁ ≤ c ‖·‖_{A^r_{q'}}` and +`‖·‖_{A^r_{q''}} ≤ c' N₁` with finite `c, c'` and `q', q'' ≥ 1`, then for `0 < θ < 1` and +`1 ≤ q ≤ ∞`, `(X, N₁)_{θ,q} = A^{θr}_q`. Smaller norms give larger interpolation spaces +(`InterpCouple.MemKMethod.of_le`), and both outer spaces are `A^{θr}_q` +(`memKMethod_approxCouple_zero_iff`). -/ +theorem memKMethod_iff_memApprox_of_sandwich {N₁ : X → ℝ≥0∞} {c c' q' q'' : ℝ≥0∞} + (hc : c ≠ ∞) (hc' : c' ≠ ∞) (hq' : 1 ≤ q') (hq'' : 1 ≤ q'') (hr : 0 < r) (hθ : 0 < θ) + (hθ' : θ < 1) (hq : 1 ≤ q) (h : ∀ f, N₁ f ≤ c * A.approxNormDyadic r q' f) + (h' : ∀ f, A.approxNormDyadic r q'' f ≤ c' * N₁ f) {f : X} : + (⟨fun f => ‖f‖ₑ, N₁⟩ : InterpCouple X).MemKMethod θ q f ↔ A.MemApprox (θ * r) q f := + ⟨fun hf => (memKMethod_approxCouple_zero_iff hr hθ hθ' hq'' hq).1 + (InterpCouple.MemKMethod.of_le (A := ⟨fun f => ‖f‖ₑ, N₁⟩) + (B := A.leftApproxCouple r q'') ENNReal.one_ne_top hc' + (fun a => (one_mul ‖a‖ₑ).ge) h' hf), + fun hf => InterpCouple.MemKMethod.of_le (A := A.leftApproxCouple r q') + (B := ⟨fun f => ‖f‖ₑ, N₁⟩) ENNReal.one_ne_top hc (fun a => (one_mul ‖a‖ₑ).ge) h + ((memKMethod_approxCouple_zero_iff hr hθ hθ' hq' hq).2 hf)⟩ + +/-- **The sandwich principle**: if `N₀` lies between two dyadic quasi-norms of smoothness `s₀` +and `N₁` between two of smoothness `s₁`, with `0 < s₀ < s₁`, finite constants and fine indices +`≥ 1`, then for `0 < η < 1` and `1 ≤ q ≤ ∞`, `(N₀, N₁)_{η,q} = A^{(1-η)s₀+ηs₁}_q`. -/ +theorem memKMethod_iff_memApprox_of_two_sandwiches {N₀ N₁ : X → ℝ≥0∞} + {c₀ c₀' c₁ c₁' q₀' q₀'' q₁' q₁'' : ℝ≥0∞} (hc₀ : c₀ ≠ ∞) (hc₀' : c₀' ≠ ∞) (hc₁ : c₁ ≠ ∞) + (hc₁' : c₁' ≠ ∞) (hq₀' : 1 ≤ q₀') (hq₀'' : 1 ≤ q₀'') (hq₁' : 1 ≤ q₁') (hq₁'' : 1 ≤ q₁'') + (hs₀ : 0 < s₀) (hs : s₀ < s₁) (hη : 0 < η) (hη' : η < 1) (hq : 1 ≤ q) + (h₀ : ∀ f, N₀ f ≤ c₀ * A.approxNormDyadic s₀ q₀' f) + (h₀' : ∀ f, A.approxNormDyadic s₀ q₀'' f ≤ c₀' * N₀ f) + (h₁ : ∀ f, N₁ f ≤ c₁ * A.approxNormDyadic s₁ q₁' f) + (h₁' : ∀ f, A.approxNormDyadic s₁ q₁'' f ≤ c₁' * N₁ f) {f : X} : + (⟨N₀, N₁⟩ : InterpCouple X).MemKMethod η q f ↔ A.MemApprox ((1 - η) * s₀ + η * s₁) q f := + ⟨fun hf => (memKMethod_approxCouple_iff hs₀ hs hη hη' hq₀'' hq₁'' hq).1 + (InterpCouple.MemKMethod.of_le (A := ⟨N₀, N₁⟩) (B := A.approxCouple s₀ q₀'' s₁ q₁'') + hc₀' hc₁' h₀' h₁' hf), + fun hf => InterpCouple.MemKMethod.of_le (A := A.approxCouple s₀ q₀' s₁ q₁') (B := ⟨N₀, N₁⟩) + hc₀ hc₁ h₀ h₁ ((memKMethod_approxCouple_iff hs₀ hs hη hη' hq₀' hq₁' hq).2 hf)⟩ + +/-! ### Smoothness spaces -/ + +section SmoothnessSpace + +variable {Y : Type*} [NormedAddCommGroup Y] [NormedSpace ℝ Y] {ι : Y →L[ℝ] X} {C₁ C₂ : ℝ} + +/-- **Jackson's inequality bounds `A^r_∞` by the quotient norm**: if `ι` satisfies Jackson's +inequality of order `r` with constant `C₁ ≥ 0`, then +`‖f‖_{A^r_∞} ≤ (1 + ‖ι‖ + C₁) inf {‖y‖ : ι y = f}`. -/ +theorem approxNormDyadic_top_le_norm1_ofMap (hJ : JacksonBound ι A r C₁) (hC₁ : 0 ≤ C₁) (f : X) : + A.approxNormDyadic r ∞ f ≤ + (1 + (‖ι‖ₑ + ENNReal.ofReal C₁)) * (InterpCouple.ofMap ι).norm1 f := by + rw [InterpCouple.ofMap_norm1, ENNReal.mul_iInf_of_ne + (by positivity) + (ENNReal.add_ne_top.2 ⟨ENNReal.one_ne_top, ENNReal.add_ne_top.2 ⟨eNorm_ne_top, + ENNReal.ofReal_ne_top⟩⟩)] + refine le_iInf fun ⟨y, hy⟩ => ?_ + subst hy + exact (approxNormDyadic_top_le_of_jackson hJ hC₁ y).trans (mul_le_mul_left le_add_self _) + +/-- **Bernstein's inequality bounds the quotient norm by `A^r_1`**: if `Y` is complete and `ι` +satisfies a lifting bound of order `r ≥ 0` with constant `C₂ ≥ 0`, then +`inf {‖y‖ : ι y = f} ≤ (1 + 3 C₂ + 3 K) ‖f‖_{A^r_1}` with `K = liftConst C₂ r` +(`exists_preimage_of_liftBound`). -/ +theorem norm1_ofMap_le_approxNormDyadic_one [CompleteSpace Y] (hB : LiftBound ι A r C₂) + (hC₂ : 0 ≤ C₂) (hr : 0 ≤ r) (f : X) : + (InterpCouple.ofMap ι).norm1 f ≤ + (1 + (3 * ENNReal.ofReal C₂ + 3 * liftConst C₂ r)) * A.approxNormDyadic r 1 f := by + rcases lt_or_ge (lqNorm 1 (A.approxSeqDyadic r f)) ∞ with hf | hf + · obtain ⟨y, hy, hyle⟩ := exists_preimage_of_liftBound hB hC₂ hr hf + exact (InterpCouple.norm1_ofMap_le hy).trans (hyle.trans (mul_le_mul_left le_add_self _)) + · have h : A.approxNormDyadic r 1 f = ∞ := top_le_iff.1 (hf.trans le_add_self) + rw [h, ENNReal.mul_top (by positivity)] + exact le_top + +/-- **The representation theorem through the sandwich principle**: if `Y` is complete and `ι` +satisfies Jackson's inequality and a lifting bound of order `r > 0`, then for `0 < θ < 1` and +`1 ≤ q ≤ ∞`, `(X, ι(Y))_{θ,q} = A^{θr}_q` for the couple `InterpCouple.ofMap ι`, since +`A^r_1 ⊆ ι(Y) ⊆ A^r_∞` with norms. This is the representation theorem +`memApprox_iff_memKMethod` again, which holds for every normed space `Y`. -/ +theorem memKMethod_ofMap_iff_memApprox [CompleteSpace Y] (hJ : JacksonBound ι A r C₁) + (hC₁ : 0 ≤ C₁) (hB : LiftBound ι A r C₂) (hC₂ : 0 ≤ C₂) (hr : 0 < r) (hθ : 0 < θ) + (hθ' : θ < 1) (hq : 1 ≤ q) {f : X} : + (InterpCouple.ofMap ι).MemKMethod θ q f ↔ A.MemApprox (θ * r) q f := + memKMethod_iff_memApprox_of_sandwich (N₁ := (InterpCouple.ofMap ι).norm1) + (ENNReal.add_ne_top.2 ⟨ENNReal.one_ne_top, ENNReal.add_ne_top.2 ⟨ENNReal.mul_ne_top + (by norm_num) ENNReal.ofReal_ne_top, ENNReal.mul_ne_top (by norm_num) + (liftConst_ne_top C₂ r)⟩⟩) + (ENNReal.add_ne_top.2 ⟨ENNReal.one_ne_top, ENNReal.add_ne_top.2 ⟨eNorm_ne_top, + ENNReal.ofReal_ne_top⟩⟩) + le_rfl le_top hr hθ hθ' hq (norm1_ofMap_le_approxNormDyadic_one hB hC₂ hr.le) + (approxNormDyadic_top_le_norm1_ofMap hJ hC₁) + +end SmoothnessSpace + +end ApproximationScheme diff --git a/LeanPool/FunctionSpaces/ApproximationSpaces/Interpolation/Couple.lean b/LeanPool/FunctionSpaces/ApproximationSpaces/Interpolation/Couple.lean new file mode 100644 index 0000000000..8760ebcfdb --- /dev/null +++ b/LeanPool/FunctionSpaces/ApproximationSpaces/Interpolation/Couple.lean @@ -0,0 +1,748 @@ +/- +Copyright (c) 2026 Mario Ullrich. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Mario Ullrich +-/ +module + +public import LeanPool.FunctionSpaces.ApproximationSpaces.Interpolation.KMethod + +/- +Modified for Lean Pool: module names and imports adapted. +-/ + +/-! +# Couples of extended quasi-norms and their K-method + +A **couple** on an additive commutative group `U` is a pair of functions `N₀, N₁ : U → [0, ∞]` +(`InterpCouple`); its two spaces are `X_i = {N_i < ∞}`, and their sum and intersection stay +implicit. The axioms of extended quasi-norms (`InterpCouple.IsQuasiNormed`) and homogeneity +(`InterpCouple.IsHomogeneous`) are separate propositions, assumed only where they are used. +This is the setting of quasi-normed abelian groups in Bergh–Löfström, Sections 3.10 and 3.11. + +The **K-functional** is `K(t, u) = inf_b (N₀(u - b) + t N₁(b))` (`InterpCouple.kFunctional`), the +**continuous K-method** is `‖u‖_{K,θ,q} = Φ_{θ,q}(K(·, u))` with the functional +`ApproximationScheme.phiFunctional` (`InterpCouple.kMethodNorm`, `InterpCouple.MemKMethod`), and +the **discrete K-method** on the grid `t = 2^(nρ)`, `n ∈ ℤ`, is +`‖(2^(-nρθ) K(2^(nρ), u))_n‖_{ℓ_q}` (`InterpCouple.discreteKMethodNorm`). For `θ ≥ 0` and +`ρ > 0` both give the same space (`InterpCouple.memKMethod_iff_discreteKMethodNorm_lt_top`, +Bergh–Löfström, Lemma 3.1.3); swapping the couple replaces `θ` by `1 - θ` +(`InterpCouple.discreteKMethodNorm_swap`); for a quasi-normed couple both K-norms satisfy a +quasi-triangle inequality (`InterpCouple.kMethodNorm_add_le`, +`InterpCouple.discreteKMethodNorm_add_le`), and for a quasi-normed homogeneous couple the space is +a real subspace (`InterpCouple.kMethodSpace`). For an ordered quasi-normed couple +(`N₀ ≤ c N₁`, `InterpCouple.norm0_le_mul_kFunctional_one`), the norm +`N₀(u) + ‖(2^(kρθ) K(2^(-kρ), u))_{k ∈ ℕ}‖_{ℓ_q}` on the grid `t = 2^(-kρ)` +(`InterpCouple.interpNorm`) gives the same space for `θ > 0`, `ρ > 0` and `q ≠ 0` +(`InterpCouple.memKMethod_iff_interpNorm_lt_top`), with explicit constants in both directions +(`InterpCouple.kMethodNorm_le_interpNorm`, `InterpCouple.interpNorm_le_kMethodNorm`). + +A bounded linear map `ι : Y → X` gives the couple `(X, ι(Y))` (`InterpCouple.ofMap`), whose +K-functional is `ApproximationScheme.kFunctional ι` for `0 < t < ∞`. Hence its continuous +K-method and its norm on the grid `t = 2^(-kρ)` are `ApproximationScheme.kMethodNorm` and +`ApproximationScheme.interpNorm` (`InterpCouple.kMethodNorm_ofMap`, +`InterpCouple.interpNorm_ofMap`). + +The encoding is that of `EQuasinorm.Couple` in the project *MultilinearInterpolation* (Bonn; +van Doorn, Portegies, Rothgang, Viana Reis; Apache 2.0) on a group instead of a monoid; its +`kNorm`, `kMethod` and `discreteKMethod` are `kFunctional`, `kMethodNorm` and +`discreteKMethodNorm` here (the last one with `ρ = 1`). +-/ + +@[expose] public section + +open MeasureTheory Set Function +open scoped ENNReal +open ENNReal (lqNorm dyadicWeight LpAddConst dyadicGeomConst) + +/-- A **couple** on an additive commutative group `U`: two functions `N₀, N₁ : U → [0, ∞]`, +whose spaces are `X_i = {u : N_i(u) < ∞}`. This is a couple of quasi-normed abelian groups of +Bergh–Löfström, Section 3.10, with the compatibility of Section 2.3 built in, since both spaces +lie in `U`; the axioms are the separate propositions `InterpCouple.IsQuasiNormed` and +`InterpCouple.IsHomogeneous`. `EQuasinorm.Couple` of the project *MultilinearInterpolation* +(Bonn, Apache 2.0) carries the axioms in its data. -/ +structure InterpCouple (U : Type*) [AddCommGroup U] where + /-- The first extended quasi-norm `N₀`. -/ + norm0 : U → ℝ≥0∞ + /-- The second extended quasi-norm `N₁`. -/ + norm1 : U → ℝ≥0∞ + +namespace InterpCouple + +variable {U : Type*} [AddCommGroup U] + +/-! ### Swapping, quasi-norms and homogeneity -/ + +/-- The **swapped couple** `(N₁, N₀)`. -/ +def swap (A : InterpCouple U) : InterpCouple U := ⟨A.norm1, A.norm0⟩ + +/-- The first norm of the swapped couple is `N₁`. -/ +@[simp] +theorem swap_norm0 (A : InterpCouple U) : A.swap.norm0 = A.norm1 := rfl + +/-- The second norm of the swapped couple is `N₀`. -/ +@[simp] +theorem swap_norm1 (A : InterpCouple U) : A.swap.norm1 = A.norm0 := rfl + +/-- Swapping twice gives the couple back. -/ +@[simp] +theorem swap_swap (A : InterpCouple U) : A.swap.swap = A := rfl + +/-- The couple is **quasi-normed with constant `C`**: `C < ∞`, and both `N_i` vanish at `0`, +are even and satisfy the quasi-triangle inequality `N_i(a + b) ≤ C (N_i(a) + N_i(b))`. These are +the axioms of a quasi-normed abelian group (Bergh–Löfström, Section 3.10) except definiteness; +the zero and quasi-triangle axioms are those of `EQuasinorm` in *MultilinearInterpolation*, which +lives on a monoid and asks `C ≥ 1`. -/ +structure IsQuasiNormed (A : InterpCouple U) (C : ℝ≥0∞) : Prop where + /-- The quasi-triangle constant is finite. -/ + ne_top : C ≠ ∞ + /-- `N₀(0) = 0`. -/ + norm0_zero : A.norm0 0 = 0 + /-- `N₁(0) = 0`. -/ + norm1_zero : A.norm1 0 = 0 + /-- `N₀(-a) = N₀(a)`. -/ + norm0_neg (a : U) : A.norm0 (-a) = A.norm0 a + /-- `N₁(-a) = N₁(a)`. -/ + norm1_neg (a : U) : A.norm1 (-a) = A.norm1 a + /-- The quasi-triangle inequality for `N₀`. -/ + norm0_add_le (a b : U) : A.norm0 (a + b) ≤ C * (A.norm0 a + A.norm0 b) + /-- The quasi-triangle inequality for `N₁`. -/ + norm1_add_le (a b : U) : A.norm1 (a + b) ≤ C * (A.norm1 a + A.norm1 b) + +/-- The swapped couple of a quasi-normed couple is quasi-normed with the same constant. -/ +theorem IsQuasiNormed.swap {A : InterpCouple U} {C : ℝ≥0∞} (hA : A.IsQuasiNormed C) : + A.swap.IsQuasiNormed C := + ⟨hA.ne_top, hA.norm1_zero, hA.norm0_zero, hA.norm1_neg, hA.norm0_neg, hA.norm1_add_le, + hA.norm0_add_le⟩ + +/-- The couple is **homogeneous** on a real vector space: `N_i(c a) ≤ |c| N_i(a)` for every real +`c` (hence equality for `c ≠ 0`). -/ +structure IsHomogeneous [Module ℝ U] (A : InterpCouple U) : Prop where + /-- Homogeneity of `N₀`. -/ + norm0_smul_le (c : ℝ) (a : U) : A.norm0 (c • a) ≤ ‖c‖ₑ * A.norm0 a + /-- Homogeneity of `N₁`. -/ + norm1_smul_le (c : ℝ) (a : U) : A.norm1 (c • a) ≤ ‖c‖ₑ * A.norm1 a + +/-- A homogeneous couple has `N₀(0) = 0`, from `c = 0`. -/ +theorem IsHomogeneous.norm0_zero [Module ℝ U] {A : InterpCouple U} (hH : A.IsHomogeneous) : + A.norm0 0 = 0 := by + simpa using hH.norm0_smul_le 0 0 + +/-- A homogeneous couple has `N₁(0) = 0`, from `c = 0`. -/ +theorem IsHomogeneous.norm1_zero [Module ℝ U] {A : InterpCouple U} (hH : A.IsHomogeneous) : + A.norm1 0 = 0 := by + simpa using hH.norm1_smul_le 0 0 + +/-! ### The K-functional -/ + +/-- The **K-functional** of the couple, `K(t, u) = inf_b (N₀(u - b) + t N₁(b))` for +`t ∈ [0, ∞]` (Bergh–Löfström, Section 3.1). It is `kNorm` of the project +*MultilinearInterpolation*, there an infimum over the pairs `u = a + b`. -/ +noncomputable def kFunctional (A : InterpCouple U) (t : ℝ≥0∞) (u : U) : ℝ≥0∞ := + ⨅ b : U, A.norm0 (u - b) + t * A.norm1 b + +variable {A : InterpCouple U} {t s c C : ℝ≥0∞} + +/-- Every decomposition bounds the K-functional: `K(t, u) ≤ N₀(u - b) + t N₁(b)` (Bonn's +`kNorm_le_of_decomp`). -/ +theorem kFunctional_le (b u : U) : A.kFunctional t u ≤ A.norm0 (u - b) + t * A.norm1 b := + iInf_le (fun b => A.norm0 (u - b) + t * A.norm1 b) b + +/-- **An upper bound by decompositions passes to the K-functional**: if +`F ≤ X + c (N₀(u - b) + t N₁(b))` for every `b` and `c < ∞`, then `F ≤ X + c K(t, u)`, since +`b ↦ X + c (N₀(u - b) + t N₁(b))` has the infimum `X + c K(t, u)`. -/ +theorem le_add_mul_kFunctional {F X : ℝ≥0∞} (hc : c ≠ ∞) {u : U} + (h : ∀ b, F ≤ X + c * (A.norm0 (u - b) + t * A.norm1 b)) : F ≤ X + c * A.kFunctional t u := by + rw [kFunctional, ENNReal.mul_iInf fun h' => absurd h' hc, ENNReal.add_iInf] + exact le_iInf h + +/-- `K(t, u) ≤ N₀(u)` if `N₁(0) = 0`, from `b = 0`. -/ +theorem kFunctional_le_norm0 (h : A.norm1 0 = 0) (u : U) : A.kFunctional t u ≤ A.norm0 u := + (kFunctional_le 0 u).trans_eq (by rw [sub_zero, h, mul_zero, add_zero]) + +/-- `K(t, u) ≤ t N₁(u)` if `N₀(0) = 0`, from `b = u`. -/ +theorem kFunctional_le_mul_norm1 (h : A.norm0 0 = 0) (u : U) : + A.kFunctional t u ≤ t * A.norm1 u := + (kFunctional_le u u).trans_eq (by rw [sub_self, h, zero_add]) + +/-- `K(t, 0) = 0` if both norms vanish at `0`. -/ +theorem kFunctional_zero_right (h0 : A.norm0 0 = 0) (h1 : A.norm1 0 = 0) : + A.kFunctional t 0 = 0 := + le_antisymm ((kFunctional_le_norm0 h1 0).trans_eq h0) bot_le + +/-- The K-functional increases with `t`. -/ +theorem kFunctional_mono (h : t ≤ s) (u : U) : A.kFunctional t u ≤ A.kFunctional s u := + iInf_mono fun _ => by gcongr + +/-- The K-functional `t ↦ K(t, u)` is monotone (Bonn's `monotone_kNorm`). -/ +theorem monotone_kFunctional (u : U) : Monotone fun t => A.kFunctional t u := + fun _ _ h => kFunctional_mono h u + +/-- **The K-functional under a finite change of scale** (Bergh–Löfström, Lemma 3.1.1; Bonn's +`kNorm_le_mul`): `K(c t, u) ≤ max(1, c) K(t, u)` for `c < ∞`. -/ +theorem kFunctional_mul_le_of_ne_top (hc : c ≠ ∞) (t : ℝ≥0∞) (u : U) : + A.kFunctional (c * t) u ≤ max 1 c * A.kFunctional t u := by + have hM0 : max 1 c ≠ 0 := (zero_lt_one.trans_le (le_max_left _ _)).ne' + have hMt : max 1 c ≠ ∞ := max_ne_top ENNReal.one_ne_top hc + have h : max 1 c * A.kFunctional t u = ⨅ b, max 1 c * (A.norm0 (u - b) + t * A.norm1 b) := + ENNReal.mul_iInf_of_ne hM0 hMt + rw [h] + refine iInf_mono fun b => ?_ + rw [mul_add, mul_assoc c] + gcongr + · exact le_mul_of_one_le_left' (le_max_left _ _) + · exact le_max_right _ _ + +/-- The pointwise bound behind the quasi-triangle inequality of the K-functional: for all +`b, b'`, `K(t, u + v) ≤ C ((N₀(u - b) + t N₁(b)) + (N₀(v - b') + t N₁(b')))`. -/ +theorem kFunctional_add_le_of_decomp (hA : A.IsQuasiNormed C) (u v b b' : U) : + A.kFunctional t (u + v) ≤ + C * ((A.norm0 (u - b) + t * A.norm1 b) + (A.norm0 (v - b') + t * A.norm1 b')) := + calc A.kFunctional t (u + v) ≤ A.norm0 ((u - b) + (v - b')) + t * A.norm1 (b + b') := by + rw [← add_sub_add_comm] + exact kFunctional_le _ _ + _ ≤ C * (A.norm0 (u - b) + A.norm0 (v - b')) + t * (C * (A.norm1 b + A.norm1 b')) := by + gcongr + · exact hA.norm0_add_le _ _ + · exact hA.norm1_add_le _ _ + _ = _ := by ring + +/-- **The quasi-triangle inequality of the K-functional** (Bergh–Löfström, Lemma 3.11.1; Bonn's +`kNorm_add_le_mul`): `K(t, u + v) ≤ C (K(t, u) + K(t, v))` for a couple quasi-normed with +constant `C`. -/ +theorem kFunctional_add_le (hA : A.IsQuasiNormed C) (u v : U) : + A.kFunctional t (u + v) ≤ C * (A.kFunctional t u + A.kFunctional t v) := by + rcases eq_or_ne C 0 with rfl | hC0 + · simpa using kFunctional_add_le_of_decomp hA u v 0 0 + have hu : C * A.kFunctional t u = ⨅ b, C * (A.norm0 (u - b) + t * A.norm1 b) := + ENNReal.mul_iInf_of_ne hC0 hA.ne_top + have hv : C * A.kFunctional t v = ⨅ b, C * (A.norm0 (v - b) + t * A.norm1 b) := + ENNReal.mul_iInf_of_ne hC0 hA.ne_top + rw [mul_add, hu, hv] + exact ENNReal.le_iInf_add_iInf fun b b' => + (kFunctional_add_le_of_decomp hA u v b b').trans_eq (mul_add _ _ _) + +/-- The K-functional of a couple of even functions is even: `K(t, -u) = K(t, u)` if +`N₀(-a) = N₀(a)` and `N₁(-a) = N₁(a)` for every `a`, by the substitution `b ↦ -b`. For a +quasi-normed couple `hA` the hypotheses are `hA.norm0_neg` and `hA.norm1_neg`. -/ +theorem kFunctional_neg (h0 : ∀ a, A.norm0 (-a) = A.norm0 a) (h1 : ∀ a, A.norm1 (-a) = A.norm1 a) + (u : U) : A.kFunctional t (-u) = A.kFunctional t u := by + refine Equiv.iInf_congr (Equiv.neg U) fun b => ?_ + rw [Equiv.neg_apply, h1, ← h0 (-u - b), show -(-u - b) = u - -b by abel] + +/-- **Homogeneity of the K-functional**: `K(t, c u) ≤ |c| K(t, u)` for a homogeneous couple. -/ +theorem kFunctional_smul_le [Module ℝ U] (hH : A.IsHomogeneous) (c : ℝ) (u : U) : + A.kFunctional t (c • u) ≤ ‖c‖ₑ * A.kFunctional t u := by + rcases eq_or_ne c 0 with rfl | hc + · rw [zero_smul, kFunctional_zero_right hH.norm0_zero hH.norm1_zero] + exact zero_le + have h : ‖c‖ₑ * A.kFunctional t u = ⨅ b, ‖c‖ₑ * (A.norm0 (u - b) + t * A.norm1 b) := + ENNReal.mul_iInf_of_ne (eNorm_ne_zero.2 hc) eNorm_ne_top + rw [h] + refine le_iInf fun b => ?_ + calc A.kFunctional t (c • u) ≤ A.norm0 (c • u - c • b) + t * A.norm1 (c • b) := + kFunctional_le _ _ + _ ≤ ‖c‖ₑ * A.norm0 (u - b) + t * (‖c‖ₑ * A.norm1 b) := by + rw [← smul_sub] + gcongr + · exact hH.norm0_smul_le c _ + · exact hH.norm1_smul_le c _ + _ = ‖c‖ₑ * (A.norm0 (u - b) + t * A.norm1 b) := by ring + +/-- **The K-functional of the swapped couple** (Bonn's `kNorm_swap`): for `0 < t < ∞`, +`K(t, u; N₁, N₀) = t K(t⁻¹, u; N₀, N₁)`, by the substitution `b ↦ u - b`. -/ +theorem kFunctional_swap (ht0 : t ≠ 0) (ht : t ≠ ∞) (u : U) : + A.swap.kFunctional t u = t * A.kFunctional t⁻¹ u := by + have h : t * A.kFunctional t⁻¹ u = ⨅ b, t * (A.norm0 (u - b) + t⁻¹ * A.norm1 b) := + ENNReal.mul_iInf_of_ne ht0 ht + rw [h] + refine Equiv.iInf_congr (Equiv.subLeft u) fun b => ?_ + rw [Equiv.subLeft_apply, sub_sub_cancel, mul_add, ← mul_assoc, ENNReal.mul_inv_cancel ht0 ht, + one_mul, add_comm] + rfl + +/-- **The first norm of an ordered couple by the K-functional at `t = 1`**: if the couple is +quasi-normed with constant `C` and `N₀ ≤ c N₁` with `c < ∞`, then +`N₀(u) ≤ C max(1, c) K(1, u)`, since `N₀(u) ≤ C (N₀(u - b) + c N₁(b))` for every `b`. -/ +theorem norm0_le_mul_kFunctional_one (hA : A.IsQuasiNormed C) (hc : c ≠ ∞) + (hord : ∀ a, A.norm0 a ≤ c * A.norm1 a) (u : U) : + A.norm0 u ≤ C * max 1 c * A.kFunctional 1 u := by + have hM : C * max 1 c ≠ ∞ := ENNReal.mul_ne_top hA.ne_top (max_ne_top ENNReal.one_ne_top hc) + rw [kFunctional, ENNReal.mul_iInf fun h => absurd h hM] + refine le_iInf fun b => ?_ + calc A.norm0 u = A.norm0 ((u - b) + b) := by rw [sub_add_cancel] + _ ≤ C * (A.norm0 (u - b) + A.norm0 b) := hA.norm0_add_le _ _ + _ ≤ C * (max 1 c * A.norm0 (u - b) + max 1 c * (1 * A.norm1 b)) := by + gcongr + · exact le_mul_of_one_le_left' (le_max_left _ _) + · rw [one_mul] + exact (hord b).trans (by gcongr; exact le_max_right _ _) + _ = C * max 1 c * (A.norm0 (u - b) + 1 * A.norm1 b) := by ring + +/-! ### The continuous and the discrete K-method -/ + +variable {θ ρ : ℝ} {q : ℝ≥0∞} + +/-- The norm of the **continuous K-method** of the couple, `‖u‖_{K,θ,q} = Φ_{θ,q}(K(·, u))`, +that is `(∫_0^∞ (t^(-θ) K(t, u))^q dt/t)^(1/q)` for `0 < q < ∞`, the essential supremum of +`t^(-θ) K(t, u)` for `q = ∞`, and `0` for `q = 0` (Bergh–Löfström, Sections 3.1 and 3.11; the +norm of Bonn's `kMethod`). -/ +noncomputable def kMethodNorm (A : InterpCouple U) (θ : ℝ) (q : ℝ≥0∞) (u : U) : ℝ≥0∞ := + ApproximationScheme.phiFunctional θ q fun t => A.kFunctional t u + +/-- `u` belongs to the **real interpolation space** `(X₀, X₁)_{θ,q}` of the couple: +`‖u‖_{K,θ,q} < ∞`. -/ +def MemKMethod (A : InterpCouple U) (θ : ℝ) (q : ℝ≥0∞) (u : U) : Prop := + A.kMethodNorm θ q u < ∞ + +/-- The sequence `(2^(-nρθ) K(2^(nρ), u))_{n ∈ ℤ}` of the discrete K-method on the grid +`t = 2^(nρ)`. -/ +noncomputable def discreteKSeq (A : InterpCouple U) (θ ρ : ℝ) (u : U) (n : ℤ) : ℝ≥0∞ := + (2 : ℝ≥0∞) ^ (-((n : ℝ) * ρ * θ)) * A.kFunctional ((2 : ℝ≥0∞) ^ ((n : ℝ) * ρ)) u + +/-- The norm of the **discrete K-method** on the grid `t = 2^(nρ)`, `n ∈ ℤ`: +`‖(2^(-nρθ) K(2^(nρ), u))_{n ∈ ℤ}‖_{ℓ_q}`. For `ρ = 1` it is the norm of Bonn's +`discreteKMethod`. -/ +noncomputable def discreteKMethodNorm (A : InterpCouple U) (θ ρ : ℝ) (q : ℝ≥0∞) (u : U) : + ℝ≥0∞ := + lqNorm q (A.discreteKSeq θ ρ u) + +/-- The discrete K-norm is the `ℓ_q` norm of `ApproximationScheme.discretePhiSeq θ ρ` for +`φ = K(·, u)`. -/ +theorem discreteKMethodNorm_eq (u : U) : A.discreteKMethodNorm θ ρ q u = + lqNorm q (ApproximationScheme.discretePhiSeq θ ρ fun t => A.kFunctional t u) := rfl + +/-- The term with `n = 0` is `K(1, u)`. -/ +theorem discreteKSeq_zero (u : U) : A.discreteKSeq θ ρ u 0 = A.kFunctional 1 u := + ApproximationScheme.discretePhiSeq_zero fun t => A.kFunctional t u + +/-- The term `n` of the discrete K-method on the grid `t = 2^n`: +`2^(-nθ) K(2^n, u)`. -/ +theorem discreteKSeq_one (u : U) (n : ℤ) : + A.discreteKSeq θ 1 u n = 2 ^ (-((n : ℝ) * θ)) * A.kFunctional (2 ^ (n : ℝ)) u := by + simp only [discreteKSeq, mul_one] + +/-- **The continuous K-norm by the discrete one**: for `θ ≥ 0` and `ρ > 0`, +`‖u‖_{K,θ,q} ≤ (ρ log 2)^(1/q) 2^(ρθ) ‖(2^(-nρθ) K(2^(nρ), u))_{n ∈ ℤ}‖_{ℓ_q}`. -/ +theorem kMethodNorm_le_discreteKMethodNorm (hθ : 0 ≤ θ) (hρ : 0 < ρ) (u : U) : + A.kMethodNorm θ q u ≤ ENNReal.ofReal (ρ * Real.log 2) ^ (1 / q.toReal) * + (2 ^ (ρ * θ) * A.discreteKMethodNorm θ ρ q u) := by + rw [discreteKMethodNorm_eq] + exact ApproximationScheme.phiFunctional_le_lqNorm_discretePhiSeq + (monotone_kFunctional (A := A) u) hθ hρ + +/-- **The discrete K-norm by the continuous one**: for `θ ≥ 0` and `ρ > 0`, +`(ρ log 2)^(1/q) 2^(-ρθ) ‖(2^(-nρθ) K(2^(nρ), u))_{n ∈ ℤ}‖_{ℓ_q} ≤ ‖u‖_{K,θ,q}`. -/ +theorem discreteKMethodNorm_le_kMethodNorm (hθ : 0 ≤ θ) (hρ : 0 < ρ) (u : U) : + ENNReal.ofReal (ρ * Real.log 2) ^ (1 / q.toReal) * + (2 ^ (-(ρ * θ)) * A.discreteKMethodNorm θ ρ q u) ≤ A.kMethodNorm θ q u := by + rw [discreteKMethodNorm_eq] + exact ApproximationScheme.lqNorm_discretePhiSeq_le_phiFunctional + (monotone_kFunctional (A := A) u) hθ hρ + +/-- **The discrete K-norm by the continuous one, solved for the discrete norm**: for `θ ≥ 0` and +`ρ > 0`, `‖(2^(-nρθ) K(2^(nρ), u))_{n ∈ ℤ}‖_{ℓ_q} ≤ ((ρ log 2)^(1/q) 2^(-ρθ))⁻¹ ‖u‖_{K,θ,q}` +(`discreteKMethodNorm_le_kMethodNorm`). -/ +theorem discreteKMethodNorm_le_inv_mul_kMethodNorm (hθ : 0 ≤ θ) (hρ : 0 < ρ) (u : U) : + A.discreteKMethodNorm θ ρ q u ≤ + (ENNReal.ofReal (ρ * Real.log 2) ^ (1 / q.toReal) * 2 ^ (-(ρ * θ)))⁻¹ * + A.kMethodNorm θ q u := by + rw [discreteKMethodNorm_eq] + exact ApproximationScheme.lqNorm_discretePhiSeq_le_inv_mul_phiFunctional + (monotone_kFunctional (A := A) u) hθ hρ + +/-- The continuous K-norm by the discrete K-norm on the grid `t = 2^n`: for `θ ≥ 0`, +`‖u‖_{K,θ,q} ≤ (log 2)^(1/q) 2^θ ‖u‖_{θ,1,q}` (`kMethodNorm_le_discreteKMethodNorm` with +`ρ = 1`). -/ +theorem kMethodNorm_le_mul_discreteKMethodNorm (hθ : 0 ≤ θ) (u : U) : + A.kMethodNorm θ q u ≤ + ENNReal.ofReal (Real.log 2) ^ (1 / q.toReal) * 2 ^ θ * A.discreteKMethodNorm θ 1 q u := by + have h := kMethodNorm_le_discreteKMethodNorm (A := A) (q := q) hθ one_pos u + simpa only [one_mul, mul_assoc] using h + +/-- The discrete K-norm on the grid `t = 2^n` by the continuous K-norm: for `θ ≥ 0`, +`‖u‖_{θ,1,q} ≤ ((log 2)^(1/q) 2^(-θ))⁻¹ ‖u‖_{K,θ,q}` (`discreteKMethodNorm_le_inv_mul_kMethodNorm` +with `ρ = 1`). -/ +theorem discreteKMethodNorm_le_mul_kMethodNorm (hθ : 0 ≤ θ) (u : U) : + A.discreteKMethodNorm θ 1 q u ≤ + (ENNReal.ofReal (Real.log 2) ^ (1 / q.toReal) * 2 ^ (-θ))⁻¹ * A.kMethodNorm θ q u := by + simpa only [one_mul] using discreteKMethodNorm_le_inv_mul_kMethodNorm (A := A) (q := q) hθ + one_pos u + +/-- **The discrete and the continuous K-method agree** (Bergh–Löfström, Lemma 3.1.3; Bonn's +`discreteKMethod_equiv_kmethod`): for `θ ≥ 0`, `ρ > 0` and every `q`, `‖u‖_{K,θ,q} < ∞` if and +only if `‖(2^(-nρθ) K(2^(nρ), u))_{n ∈ ℤ}‖_{ℓ_q} < ∞`. -/ +theorem memKMethod_iff_discreteKMethodNorm_lt_top (hθ : 0 ≤ θ) (hρ : 0 < ρ) {u : U} : + A.MemKMethod θ q u ↔ A.discreteKMethodNorm θ ρ q u < ∞ := by + have hc0 := ApproximationScheme.ofReal_mul_log_two_rpow_ne_zero hρ q + have hct : ENNReal.ofReal (ρ * Real.log 2) ^ (1 / q.toReal) ≠ ∞ := + ENNReal.rpow_ne_top_of_nonneg (by positivity) ENNReal.ofReal_ne_top + have h2 : (2 : ℝ≥0∞) ^ (-(ρ * θ)) ≠ 0 := (ENNReal.rpow_pos two_pos ENNReal.ofNat_ne_top).ne' + exact ⟨fun h => ENNReal.lt_top_of_mul_ne_top_right (ENNReal.lt_top_of_mul_ne_top_right + ((discreteKMethodNorm_le_kMethodNorm hθ hρ u).trans_lt h).ne hc0).ne h2, + fun h => (kMethodNorm_le_discreteKMethodNorm hθ hρ u).trans_lt (ENNReal.mul_lt_top hct.lt_top + (ENNReal.mul_lt_top (ENNReal.two_rpow_ne_top _).lt_top h))⟩ + +/-- **The discrete K-method of the swapped couple**, termwise: the term `n` for `(N₁, N₀)` and +`θ` is the term `-n` for `(N₀, N₁)` and `1 - θ`, by `kFunctional_swap`. -/ +theorem discreteKSeq_swap (u : U) (n : ℤ) : + A.swap.discreteKSeq θ ρ u n = A.discreteKSeq (1 - θ) ρ u (-n) := by + have h0 : (2 : ℝ≥0∞) ^ ((n : ℝ) * ρ) ≠ 0 := (ENNReal.rpow_pos two_pos ENNReal.ofNat_ne_top).ne' + have ht : (2 : ℝ≥0∞) ^ ((n : ℝ) * ρ) ≠ ∞ := ENNReal.two_rpow_ne_top _ + have e1 : -((n : ℝ) * ρ * θ) + (n : ℝ) * ρ = -(((-n : ℤ) : ℝ) * ρ * (1 - θ)) := by + push_cast + ring + have e2 : -((n : ℝ) * ρ) = ((-n : ℤ) : ℝ) * ρ := by + push_cast + ring + rw [discreteKSeq, discreteKSeq, kFunctional_swap h0 ht, ← ENNReal.rpow_neg, ← mul_assoc, + ← ENNReal.rpow_add _ _ two_ne_zero ENNReal.ofNat_ne_top, e1, e2] + +/-- **Swapping the couple replaces `θ` by `1 - θ`** (Bonn's `enorm_discreteKMethod_swap`): +the discrete K-norm of `(N₁, N₀)` with `θ` is that of `(N₀, N₁)` with `1 - θ`, on every grid +`t = 2^(nρ)`. -/ +theorem discreteKMethodNorm_swap (u : U) : + A.swap.discreteKMethodNorm θ ρ q u = A.discreteKMethodNorm (1 - θ) ρ q u := by + have h : A.swap.discreteKSeq θ ρ u = A.discreteKSeq (1 - θ) ρ u ∘ Equiv.neg ℤ := + funext fun n => discreteKSeq_swap u n + rw [discreteKMethodNorm, discreteKMethodNorm, h, ENNReal.lqNorm_comp_equiv] + +/-- **The K-functional by the discrete K-norm** (the class `C_K(θ)` of Bergh–Löfström, +Definition 3.5.1, in discrete form): for `q ≠ 0` and every `n ∈ ℤ`, +`K(2^(nρ), u) ≤ 2^(nρθ) ‖(2^(-mρθ) K(2^(mρ), u))_{m ∈ ℤ}‖_{ℓ_q}`. -/ +theorem kFunctional_le_discreteKMethodNorm (hq : q ≠ 0) (n : ℤ) (u : U) : + A.kFunctional ((2 : ℝ≥0∞) ^ ((n : ℝ) * ρ)) u ≤ + (2 : ℝ≥0∞) ^ ((n : ℝ) * ρ * θ) * A.discreteKMethodNorm θ ρ q u := by + calc A.kFunctional ((2 : ℝ≥0∞) ^ ((n : ℝ) * ρ)) u + = (2 : ℝ≥0∞) ^ ((n : ℝ) * ρ * θ) * A.discreteKSeq θ ρ u n := by + rw [discreteKSeq, ← mul_assoc, ← ENNReal.rpow_add _ _ two_ne_zero ENNReal.ofNat_ne_top, + add_neg_cancel, ENNReal.rpow_zero, one_mul] + _ ≤ _ := by + gcongr + exact ENNReal.le_lqNorm hq _ n + +/-- The class `C_K` on the grid `t = 2^n`: `K(2^n, u) ≤ 2^(nθ) ‖u‖_{θ,1,q}` for every `n ∈ ℤ` +and `q ≠ 0` (`kFunctional_le_discreteKMethodNorm` with `ρ = 1`). -/ +theorem kFunctional_two_rpow_le_discreteKMethodNorm (hq : q ≠ 0) (n : ℤ) (u : U) : + A.kFunctional (2 ^ (n : ℝ)) u ≤ 2 ^ ((n : ℝ) * θ) * A.discreteKMethodNorm θ 1 q u := by + simpa only [mul_one] using kFunctional_le_discreteKMethodNorm (A := A) (ρ := 1) (θ := θ) hq n u + +/-- The integrand of the continuous K-norm of `u` as a function of `t : ℝ`; it is measurable, +since `K(·, u)` is monotone. -/ +theorem aestronglyMeasurable_phiIntegrand_kFunctional (u : U) : + AEStronglyMeasurable (ApproximationScheme.phiIntegrand θ fun t => A.kFunctional t u) + ApproximationScheme.kMethodMeasure := + (ApproximationScheme.measurable_phiIntegrand (monotone_kFunctional u)).aestronglyMeasurable + +/-- **The quasi-triangle inequality of the continuous K-norm** (Bergh–Löfström, Section 3.11): +for a couple quasi-normed with constant `C`, +`‖u + v‖_{K,θ,q} ≤ C_q C (‖u‖_{K,θ,q} + ‖v‖_{K,θ,q})`, where `C_q` is Mathlib's constant +`LpAddConst q` (`1` for `q ≥ 1`). -/ +theorem kMethodNorm_add_le (hA : A.IsQuasiNormed C) (u v : U) : + A.kMethodNorm θ q (u + v) ≤ LpAddConst q * C * (A.kMethodNorm θ q u + A.kMethodNorm θ q v) := by + rw [kMethodNorm, kMethodNorm, kMethodNorm, ApproximationScheme.phiFunctional_eq, + ApproximationScheme.phiFunctional_eq, ApproximationScheme.phiFunctional_eq] + calc eLpNorm (ApproximationScheme.phiIntegrand θ fun t => A.kFunctional t (u + v)) q + ApproximationScheme.kMethodMeasure + ≤ C * eLpNorm ((ApproximationScheme.phiIntegrand θ fun t => A.kFunctional t u) + + ApproximationScheme.phiIntegrand θ fun t => A.kFunctional t v) q + ApproximationScheme.kMethodMeasure := by + refine eLpNorm_le_mul_eLpNorm_of_ae_le_mul'' q + (aestronglyMeasurable_phiIntegrand_kFunctional _) (Filter.Eventually.of_forall + fun t => ?_) + simp only [eNorm_eq_self, Pi.add_apply, ApproximationScheme.phiIntegrand] + calc ENNReal.ofReal t ^ (-θ) * A.kFunctional (ENNReal.ofReal t) (u + v) + ≤ ENNReal.ofReal t ^ (-θ) * (C * (A.kFunctional (ENNReal.ofReal t) u + + A.kFunctional (ENNReal.ofReal t) v)) := by + gcongr + exact kFunctional_add_le hA u v + _ = _ := by ring + _ ≤ C * (LpAddConst q * (eLpNorm (ApproximationScheme.phiIntegrand θ fun t => + A.kFunctional t u) q ApproximationScheme.kMethodMeasure + + eLpNorm (ApproximationScheme.phiIntegrand θ fun t => A.kFunctional t v) q + ApproximationScheme.kMethodMeasure)) := by + gcongr + exact eLpNorm_add_le' q + _ = _ := by ring + +/-- **Homogeneity of the continuous K-norm**: `‖c u‖_{K,θ,q} ≤ |c| ‖u‖_{K,θ,q}` for a +homogeneous couple. -/ +theorem kMethodNorm_smul_le [Module ℝ U] (hH : A.IsHomogeneous) (c : ℝ) (u : U) : + A.kMethodNorm θ q (c • u) ≤ ‖c‖ₑ * A.kMethodNorm θ q u := by + rw [kMethodNorm, kMethodNorm, ApproximationScheme.phiFunctional_eq, + ApproximationScheme.phiFunctional_eq] + refine eLpNorm_le_mul_eLpNorm_of_ae_le_mul'' q + (aestronglyMeasurable_phiIntegrand_kFunctional _) (Filter.Eventually.of_forall fun t => ?_) + simp only [eNorm_eq_self, ApproximationScheme.phiIntegrand] + calc ENNReal.ofReal t ^ (-θ) * A.kFunctional (ENNReal.ofReal t) (c • u) + ≤ ENNReal.ofReal t ^ (-θ) * (‖c‖ₑ * A.kFunctional (ENNReal.ofReal t) u) := by + gcongr + exact kFunctional_smul_le hH c u + _ = _ := by ring + +/-- `‖0‖_{K,θ,q} = 0` if both norms vanish at `0`. -/ +theorem kMethodNorm_zero (h0 : A.norm0 0 = 0) (h1 : A.norm1 0 = 0) : + A.kMethodNorm θ q 0 = 0 := by + simp [kMethodNorm, kFunctional_zero_right h0 h1, ApproximationScheme.phiFunctional] + +/-- The discrete K-norm vanishes at `0` if both norms do. -/ +theorem discreteKMethodNorm_zero (h0 : A.norm0 0 = 0) (h1 : A.norm1 0 = 0) : + A.discreteKMethodNorm θ ρ q 0 = 0 := by + have h : A.discreteKSeq θ ρ 0 = fun _ => 0 := + funext fun n => by rw [discreteKSeq, kFunctional_zero_right h0 h1, mul_zero] + rw [discreteKMethodNorm, h, ENNReal.lqNorm_zero_right] + +/-- The discrete K-norm of a couple of even functions is even. -/ +theorem discreteKMethodNorm_neg (h0 : ∀ a, A.norm0 (-a) = A.norm0 a) + (h1 : ∀ a, A.norm1 (-a) = A.norm1 a) (u : U) : + A.discreteKMethodNorm θ ρ q (-u) = A.discreteKMethodNorm θ ρ q u := by + have h : A.discreteKSeq θ ρ (-u) = A.discreteKSeq θ ρ u := + funext fun n => by rw [discreteKSeq, discreteKSeq, kFunctional_neg h0 h1] + rw [discreteKMethodNorm, discreteKMethodNorm, h] + +/-- **The quasi-triangle inequality of the discrete K-norm**: for a couple quasi-normed with +constant `C` and `1 ≤ q ≤ ∞`, `‖u + v‖_{θ,ρ,q} ≤ C (‖u‖_{θ,ρ,q} + ‖v‖_{θ,ρ,q})`, from the +quasi-triangle inequality of the K-functional and Minkowski's inequality. -/ +theorem discreteKMethodNorm_add_le (hA : A.IsQuasiNormed C) (hq : 1 ≤ q) (u v : U) : + A.discreteKMethodNorm θ ρ q (u + v) ≤ + C * (A.discreteKMethodNorm θ ρ q u + A.discreteKMethodNorm θ ρ q v) := + calc A.discreteKMethodNorm θ ρ q (u + v) + ≤ lqNorm q (fun n => C * (A.discreteKSeq θ ρ u n + A.discreteKSeq θ ρ v n)) := + ENNReal.lqNorm_mono fun n => (mul_le_mul_right (kFunctional_add_le hA u v) _).trans_eq + (by simp only [discreteKSeq]; ring) + _ = C * lqNorm q (fun n => A.discreteKSeq θ ρ u n + A.discreteKSeq θ ρ v n) := + ENNReal.lqNorm_const_mul _ _ + _ ≤ _ := by + gcongr + exact ENNReal.lqNorm_add_le hq _ _ + +/-- The **real interpolation space** `(X₀, X₁)_{θ,q}` of a quasi-normed homogeneous couple, as a +real subspace of `U` (Bergh–Löfström, Sections 3.1 and 3.11). -/ +def kMethodSpace [Module ℝ U] (hA : A.IsQuasiNormed C) (hH : A.IsHomogeneous) (θ : ℝ) + (q : ℝ≥0∞) : Submodule ℝ U where + carrier := {u | A.MemKMethod θ q u} + zero_mem' := by + change A.kMethodNorm θ q 0 < ∞ + rw [kMethodNorm_zero hA.norm0_zero hA.norm1_zero] + exact ENNReal.zero_lt_top + add_mem' hu hv := (kMethodNorm_add_le hA _ _).trans_lt (ENNReal.mul_lt_top + (ENNReal.mul_lt_top (ENNReal.LpAddConst_lt_top q) hA.ne_top.lt_top) + (ENNReal.add_lt_top.2 ⟨hu, hv⟩)) + smul_mem' c _ hu := (kMethodNorm_smul_le hH c _).trans_lt (ENNReal.mul_lt_top eNorm_lt_top hu) + +/-- Membership in the real interpolation space as a submodule. -/ +@[simp] +theorem mem_kMethodSpace [Module ℝ U] {hA : A.IsQuasiNormed C} {hH : A.IsHomogeneous} {u : U} : + u ∈ kMethodSpace hA hH θ q ↔ A.MemKMethod θ q u := Iff.rfl + +/-! ### The grid on `ℕ` with the term `N₀` -/ + +/-- The norm `N₀(u) + ‖(2^(kρθ) K(2^(-kρ), u))_{k ∈ ℕ}‖_{ℓ_q}` of the discrete K-method on the +grid `t = 2^(-kρ)`, `k ∈ ℕ`, as in `ApproximationScheme.interpNorm`. -/ +noncomputable def interpNorm (A : InterpCouple U) (θ ρ : ℝ) (q : ℝ≥0∞) (u : U) : ℝ≥0∞ := + A.norm0 u + lqNorm q fun k : ℕ => dyadicWeight (ρ * θ) k * A.kFunctional (dyadicWeight (-ρ) k) u + +/-- The norm on the grid `ℕ` vanishes at `0` if both norms do. -/ +theorem interpNorm_zero (h0 : A.norm0 0 = 0) (h1 : A.norm1 0 = 0) : A.interpNorm θ ρ q 0 = 0 := by + simp [interpNorm, h0, kFunctional_zero_right h0 h1, ENNReal.lqNorm_zero_right] + +/-- **The discrete K-norm on `ℤ` by the norm on the grid `ℕ`**: if `N₁(0) = 0` and `ρθ ≥ 0`, +`‖(2^(-nρθ) K(2^(nρ), u))_{n ∈ ℤ}‖_{ℓ_q} ≤ C_q γ (N₀(u) + ‖(2^(kρθ) K(2^(-kρ), u))_k‖_{ℓ_q})` +with `γ = dyadicGeomConst (ρθ) q` and Mathlib's constant `C_q = LpAddConst q`. -/ +theorem discreteKMethodNorm_le_interpNorm (h1 : A.norm1 0 = 0) (hρθ : 0 ≤ ρ * θ) (u : U) : + A.discreteKMethodNorm θ ρ q u ≤ + LpAddConst q * dyadicGeomConst (ρ * θ) q * A.interpNorm θ ρ q u := + ApproximationScheme.lqNorm_discretePhiSeq_le (φ := fun t => A.kFunctional t u) hρθ + fun _ => kFunctional_le_norm0 h1 u + +/-- **The norm on the grid `ℕ` by the discrete K-norm on `ℤ`**, for an ordered couple: if the +couple is quasi-normed with constant `C`, `N₀ ≤ c N₁` with `c < ∞`, and `q ≠ 0`, then +`N₀(u) + ‖(2^(kρθ) K(2^(-kρ), u))_k‖_{ℓ_q} ≤ (1 + C max(1, c)) ‖(2^(-nρθ) K(2^(nρ), u))_n‖_{ℓ_q}`. +-/ +theorem interpNorm_le_discreteKMethodNorm (hA : A.IsQuasiNormed C) (hc : c ≠ ∞) + (hord : ∀ a, A.norm0 a ≤ c * A.norm1 a) (hq : q ≠ 0) (u : U) : + A.interpNorm θ ρ q u ≤ (1 + C * max 1 c) * A.discreteKMethodNorm θ ρ q u := by + have h1 : A.norm0 u ≤ C * max 1 c * A.discreteKMethodNorm θ ρ q u := by + refine (norm0_le_mul_kFunctional_one hA hc hord u).trans ?_ + gcongr + exact (discreteKSeq_zero u).symm.le.trans (ENNReal.le_lqNorm hq _ 0) + have h2 : lqNorm q (fun k : ℕ => dyadicWeight (ρ * θ) k * + A.kFunctional (dyadicWeight (-ρ) k) u) ≤ A.discreteKMethodNorm θ ρ q u := + ApproximationScheme.lqNorm_le_lqNorm_discretePhiSeq (φ := fun t => A.kFunctional t u) + calc A.interpNorm θ ρ q u ≤ C * max 1 c * A.discreteKMethodNorm θ ρ q u + + A.discreteKMethodNorm θ ρ q u := add_le_add h1 h2 + _ = (1 + C * max 1 c) * A.discreteKMethodNorm θ ρ q u := by ring + +/-- **The continuous K-method and the grid on `ℕ`**, for an ordered couple: if the couple is +quasi-normed with constant `C` and `N₀ ≤ c N₁` with `c < ∞`, then for `θ > 0`, `ρ > 0` and +`q ≠ 0`, `‖u‖_{K,θ,q} < ∞` if and only if `N₀(u) + ‖(2^(kρθ) K(2^(-kρ), u))_k‖_{ℓ_q} < ∞`. -/ +theorem memKMethod_iff_interpNorm_lt_top (hA : A.IsQuasiNormed C) (hc : c ≠ ∞) + (hord : ∀ a, A.norm0 a ≤ c * A.norm1 a) (hθ : 0 < θ) (hρ : 0 < ρ) (hq : q ≠ 0) {u : U} : + A.MemKMethod θ q u ↔ A.interpNorm θ ρ q u < ∞ := by + rw [memKMethod_iff_discreteKMethodNorm_lt_top hθ.le hρ] + have hM : 1 + C * max 1 c < ∞ := ENNReal.add_lt_top.2 ⟨ENNReal.one_lt_top, + ENNReal.mul_lt_top hA.ne_top.lt_top (max_lt ENNReal.one_lt_top hc.lt_top)⟩ + have hL : LpAddConst q * dyadicGeomConst (ρ * θ) q < ∞ := + ENNReal.mul_lt_top (ENNReal.LpAddConst_lt_top q) + (ENNReal.dyadicGeomConst_ne_top (mul_pos hρ hθ) q).lt_top + exact ⟨fun h => (interpNorm_le_discreteKMethodNorm hA hc hord hq u).trans_lt + (ENNReal.mul_lt_top hM h), + fun h => (discreteKMethodNorm_le_interpNorm hA.norm1_zero (mul_pos hρ hθ).le u).trans_lt + (ENNReal.mul_lt_top hL h)⟩ + +/-- **The continuous K-norm by the norm on the grid `ℕ`**: if `N₁(0) = 0`, `θ ≥ 0` and `ρ > 0`, +then `‖u‖_{K,θ,q} ≤ c (N₀(u) + ‖(2^(kρθ) K(2^(-kρ), u))_k‖_{ℓ_q})` with the constant +`c = ApproximationScheme.kMethodUpperConst θ ρ q` of the couples of bounded linear maps. -/ +theorem kMethodNorm_le_interpNorm (h1 : A.norm1 0 = 0) (hθ : 0 ≤ θ) (hρ : 0 < ρ) (u : U) : + A.kMethodNorm θ q u ≤ ApproximationScheme.kMethodUpperConst θ ρ q * A.interpNorm θ ρ q u := + calc A.kMethodNorm θ q u + ≤ ENNReal.ofReal (ρ * Real.log 2) ^ (1 / q.toReal) * + (2 ^ (ρ * θ) * A.discreteKMethodNorm θ ρ q u) := + kMethodNorm_le_discreteKMethodNorm hθ hρ u + _ ≤ ENNReal.ofReal (ρ * Real.log 2) ^ (1 / q.toReal) * (2 ^ (ρ * θ) * + (LpAddConst q * dyadicGeomConst (ρ * θ) q * A.interpNorm θ ρ q u)) := by + gcongr + exact discreteKMethodNorm_le_interpNorm h1 (mul_nonneg hρ.le hθ) u + _ = ApproximationScheme.kMethodUpperConst θ ρ q * A.interpNorm θ ρ q u := by + rw [ApproximationScheme.kMethodUpperConst] + ring + +/-- **The norm on the grid `ℕ` by the continuous K-norm**, for an ordered couple: if the couple +is quasi-normed with constant `C`, `N₀ ≤ c N₁` with `c < ∞`, `θ ≥ 0`, `ρ > 0` and `q ≠ 0`, then +`N₀(u) + ‖(2^(kρθ) K(2^(-kρ), u))_k‖_{ℓ_q} ≤ (1 + C max(1, c)) 2^(ρθ) (ρ log 2)^(-1/q) +‖u‖_{K,θ,q}`. -/ +theorem interpNorm_le_kMethodNorm (hA : A.IsQuasiNormed C) (hc : c ≠ ∞) + (hord : ∀ a, A.norm0 a ≤ c * A.norm1 a) (hθ : 0 ≤ θ) (hρ : 0 < ρ) (hq : q ≠ 0) (u : U) : + A.interpNorm θ ρ q u ≤ (1 + C * max 1 c) * + (2 ^ (ρ * θ) * (ENNReal.ofReal (ρ * Real.log 2) ^ (1 / q.toReal))⁻¹) * + A.kMethodNorm θ q u := + have hinv : (ENNReal.ofReal (ρ * Real.log 2) ^ (1 / q.toReal) * 2 ^ (-(ρ * θ)))⁻¹ = + 2 ^ (ρ * θ) * (ENNReal.ofReal (ρ * Real.log 2) ^ (1 / q.toReal))⁻¹ := by + rw [ENNReal.mul_inv (Or.inl (ApproximationScheme.ofReal_mul_log_two_rpow_ne_zero hρ q)) + (Or.inl (ENNReal.rpow_ne_top_of_nonneg (by positivity) ENNReal.ofReal_ne_top)), + ENNReal.rpow_neg, inv_inv, mul_comm] + calc A.interpNorm θ ρ q u ≤ (1 + C * max 1 c) * A.discreteKMethodNorm θ ρ q u := + interpNorm_le_discreteKMethodNorm hA hc hord hq u + _ ≤ (1 + C * max 1 c) * ((ENNReal.ofReal (ρ * Real.log 2) ^ (1 / q.toReal) * + 2 ^ (-(ρ * θ)))⁻¹ * A.kMethodNorm θ q u) := by + gcongr + exact discreteKMethodNorm_le_inv_mul_kMethodNorm hθ hρ u + _ = _ := by rw [hinv]; ring + +/-! ### The couple of a bounded linear map -/ + +section OfMap + +variable {X Y : Type*} [NormedAddCommGroup X] [NormedSpace ℝ X] + [NormedAddCommGroup Y] [NormedSpace ℝ Y] {ι : Y →L[ℝ] X} + +/-- The **couple of a bounded linear map** `ι : Y → X`: `N₀(f) = ‖f‖` and +`N₁(f) = inf {‖y‖ : ι y = f}` (`∞` off the range of `ι`), so that the spaces are `X` and +`ι(Y)` with the quotient norm; `ι` need not be injective. -/ +noncomputable def ofMap (ι : Y →L[ℝ] X) : InterpCouple X where + norm0 f := ‖f‖ₑ + norm1 f := ⨅ y : {y : Y // ι y = f}, ‖(y : Y)‖ₑ + +/-- The first norm of `ofMap ι` is the norm of `X`. -/ +theorem ofMap_norm0 (f : X) : (ofMap ι).norm0 f = ‖f‖ₑ := rfl + +/-- The second norm of `ofMap ι` is the quotient norm `inf {‖y‖ : ι y = f}`. -/ +theorem ofMap_norm1 (f : X) : (ofMap ι).norm1 f = ⨅ y : {y : Y // ι y = f}, ‖(y : Y)‖ₑ := rfl + +/-- Every preimage bounds the quotient norm: `N₁(f) ≤ ‖y‖` if `ι y = f`. -/ +theorem norm1_ofMap_le {y : Y} {f : X} (hy : ι y = f) : (ofMap ι).norm1 f ≤ ‖y‖ₑ := + iInf_le_of_le ⟨y, hy⟩ le_rfl + +/-- The quotient norm of `-f` is at most that of `f`. -/ +theorem norm1_ofMap_neg_le (f : X) : (ofMap ι).norm1 (-f) ≤ (ofMap ι).norm1 f := + le_iInf fun y => (norm1_ofMap_le (by rw [map_neg, y.2])).trans_eq (eNorm_neg _) + +/-- The couple of a bounded linear map is quasi-normed with constant `1`. -/ +theorem isQuasiNormed_ofMap : (ofMap ι).IsQuasiNormed 1 where + ne_top := ENNReal.one_ne_top + norm0_zero := eNorm_zero + norm1_zero := nonpos_iff_eq_zero.1 ((norm1_ofMap_le (map_zero ι)).trans_eq eNorm_zero) + norm0_neg := eNorm_neg + norm1_neg f := + le_antisymm (norm1_ofMap_neg_le f) (by simpa using norm1_ofMap_neg_le (ι := ι) (-f)) + norm0_add_le f g := by + rw [one_mul] + exact eNorm_add_le f g + norm1_add_le f g := by + rw [one_mul] + exact ENNReal.le_iInf_add_iInf fun y z => + (norm1_ofMap_le (by rw [map_add, y.2, z.2])).trans (eNorm_add_le _ _) + +/-- The couple of a bounded linear map is homogeneous. -/ +theorem isHomogeneous_ofMap : (ofMap ι).IsHomogeneous where + norm0_smul_le c f := (eNorm_smul c f).le + norm1_smul_le c f := by + rcases eq_or_ne c 0 with rfl | hc + · rw [zero_smul, isQuasiNormed_ofMap.norm1_zero] + exact zero_le + rw [ofMap_norm1 f, ENNReal.mul_iInf_of_ne (eNorm_ne_zero.2 hc) eNorm_ne_top] + exact le_iInf fun y => + (norm1_ofMap_le (by rw [map_smul, y.2])).trans_eq (eNorm_smul _ _) + +/-- **The couple of a bounded linear map is ordered**: `‖f‖ ≤ max(1, ‖ι‖) N₁(f)`, since +`‖ι y‖ ≤ ‖ι‖ ‖y‖`; the factor `max(1, ‖ι‖) ≥ 1` keeps the bound true for `ι = 0`, where +`N₁(f) = ∞` for `f ≠ 0`. -/ +theorem norm0_ofMap_le (f : X) : (ofMap ι).norm0 f ≤ max 1 ‖ι‖ₑ * (ofMap ι).norm1 f := by + rcases isEmpty_or_nonempty {y : Y // ι y = f} with hE | hN + · rw [ofMap_norm1, iInf_of_empty, ENNReal.mul_top (one_pos.trans_le (le_max_left _ _)).ne'] + exact le_top + · rw [ofMap_norm1, ENNReal.mul_iInf fun h => + absurd h (max_ne_top ENNReal.one_ne_top eNorm_ne_top)] + refine le_iInf fun y => ?_ + calc (ofMap ι).norm0 f = ‖ι y‖ₑ := by rw [ofMap_norm0, y.2] + _ ≤ ‖ι‖ₑ * ‖(y : Y)‖ₑ := ι.le_opENorm y + _ ≤ max 1 ‖ι‖ₑ * ‖(y : Y)‖ₑ := by gcongr; exact le_max_right _ _ + +/-- **The K-functional of `ofMap ι`** is the K-functional `inf_y (‖f - ι y‖ + t ‖y‖)` of +`ApproximationSpaces.Interpolation.KFunctional`, for `0 < t < ∞`. -/ +theorem kFunctional_ofMap (ht0 : t ≠ 0) (ht : t ≠ ∞) (f : X) : + (ofMap ι).kFunctional t f = ApproximationScheme.kFunctional ι t f := by + refine le_antisymm (le_iInf fun y => ?_) (le_iInf fun b => ?_) + · exact (kFunctional_le (A := ofMap ι) (ι y) f).trans + (add_le_add le_rfl (mul_le_mul_right (norm1_ofMap_le (ι := ι) rfl) t)) + · change _ ≤ ‖f - b‖ₑ + t * ⨅ y : {y : Y // ι y = b}, ‖(y : Y)‖ₑ + rw [ENNReal.mul_iInf_of_ne ht0 ht, ENNReal.add_iInf] + exact le_iInf fun y => + (ApproximationScheme.kFunctional_le (y : Y) f).trans_eq (by rw [y.2]) + +/-- The continuous K-norm of `ofMap ι` is `ApproximationScheme.kMethodNorm ι`. -/ +theorem kMethodNorm_ofMap (f : X) : + (ofMap ι).kMethodNorm θ q f = ApproximationScheme.kMethodNorm ι θ q f := + ApproximationScheme.phiFunctional_congr fun _ ht0 ht => kFunctional_ofMap ht0 ht f + +/-- The real interpolation space of `ofMap ι` is that of +`ApproximationSpaces.Interpolation.KMethod`. -/ +theorem memKMethod_ofMap_iff {f : X} : + (ofMap ι).MemKMethod θ q f ↔ ApproximationScheme.MemKMethod ι θ q f := by + rw [MemKMethod, kMethodNorm_ofMap] + rfl + +/-- The discrete K-norm of `ofMap ι` on the grid `2^(nρ)`, `n ∈ ℤ`, is +`ApproximationScheme.discreteKMethodNorm ι`. -/ +theorem discreteKMethodNorm_ofMap (f : X) : + (ofMap ι).discreteKMethodNorm θ ρ q f = ApproximationScheme.discreteKMethodNorm ι θ ρ q f := by + rw [discreteKMethodNorm, ApproximationScheme.discreteKMethodNorm] + congr 1 + funext n + rw [discreteKSeq, ApproximationScheme.discreteKSeq, + kFunctional_ofMap (ENNReal.rpow_pos two_pos ENNReal.ofNat_ne_top).ne' + (ENNReal.two_rpow_ne_top _)] + +/-- The norm of `ofMap ι` on the grid `2^(-kρ)`, `k ∈ ℕ`, is +`ApproximationScheme.interpNorm ι`. -/ +theorem interpNorm_ofMap (f : X) : + (ofMap ι).interpNorm θ ρ q f = ApproximationScheme.interpNorm ι θ ρ q f := by + rw [interpNorm, ApproximationScheme.interpNorm, ofMap_norm0] + congr 2 + funext k + rw [ApproximationScheme.interpSeq, + kFunctional_ofMap (ENNReal.dyadicWeight_ne_zero _ k) (ENNReal.dyadicWeight_ne_top _ k)] + +end OfMap + +end InterpCouple diff --git a/LeanPool/FunctionSpaces/ApproximationSpaces/Interpolation/EFunctional.lean b/LeanPool/FunctionSpaces/ApproximationSpaces/Interpolation/EFunctional.lean new file mode 100644 index 0000000000..f5db9617b8 --- /dev/null +++ b/LeanPool/FunctionSpaces/ApproximationSpaces/Interpolation/EFunctional.lean @@ -0,0 +1,723 @@ +/- +Copyright (c) 2026 Mario Ullrich. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Mario Ullrich +-/ +module + +public import LeanPool.FunctionSpaces.ApproximationSpaces.Interpolation.Couple + +/- +Modified for Lean Pool: module names and imports adapted. +-/ + +/-! +# The E-functional of a couple and the approximation spaces `E_{α,q}` + +For a couple `A = (N₀, N₁)` on an abelian group `U` (`InterpCouple`), with `N₀` the ambient +quasi-norm and `N₁` a measure of complexity, the **E-functional** is the error of best +approximation by elements of complexity at most `t`, + +`E(t, u) = inf {N₀(u - b) : N₁(b) ≤ t}` (`InterpCouple.eFunctional`), + +as in Bergh–Löfström, Section 7.1. Bergh–Löfström put the complexity first: their +`E(t, a; A₀, A₁)` is `eFunctional` of the swapped couple. The E-functional decreases in `t`, +and for a subadditive complexity with `N₁(0) = 0` it satisfies +`E(t + s, u + v) ≤ C (E(t, u) + E(s, v))` when `N₀` satisfies the quasi-triangle inequality with +a finite constant `C` (Bergh–Löfström, Lemma 7.1.1; +`InterpCouple.eFunctional_add_le`), and `E(t + s, u + v)^ρ ≤ E(t, u)^ρ + E(s, v)^ρ` when `N₀^ρ` +is subadditive (`InterpCouple.eFunctional_add_rpow_le`). No triangle inequality and no +homogeneity is needed, so the couple may consist of quasi-norms such as `‖·‖_p` for `p < 1`. + +The **approximation space** `E_{α,q}` consists of the `u` with +`‖u‖_{α,q;E} = Φ_{-α,q}(E(·, u)) = (∫_0^∞ (t^α E(t, u))^q dt/t)^(1/q) < ∞` +(Bergh–Löfström, Definition 7.1.5; `InterpCouple.eMethodNorm`, `InterpCouple.MemEMethod`). Its +dyadic form is `N₀(u) + ‖(2^(kα) E(2^k, u))_k‖_{ℓ_q}` (`InterpCouple.eNormDyadic`). When +`N₁(0) = 0` and only `0` has complexity below `1`, the two give the same space for `α > 0` and +`q ≠ 0`, and for `α = 0` and `q = ∞`, with explicit constants +(`InterpCouple.memEMethod_iff_eNormDyadic_lt_top`); the comparison holds for every decreasing +function in place of `E(·, u)` (`ApproximationScheme.phiFunctional_neg_le_of_antitone`, +`ApproximationScheme.lqNorm_le_phiFunctional_neg_of_antitone`). The dyadic norm satisfies a +quasi-triangle inequality (Bergh–Löfström, Lemma 7.1.6, in dyadic form; +`InterpCouple.eNormDyadic_add_le`). + +The **complexity couple** of a sequence of sets `S n` is `(N, min {n : b ∈ S n})` +(`InterpCouple.complexity`); for increasing sets its E-functional at `t = n` is the error of best +approximation from `S n` (`InterpCouple.eFunctional_complexity_natCast`). The couple +`InterpCouple.ofMonotoneSubgroups` puts an increasing sequence of subgroups `V_j` at the +complexities `2^j`. For an approximation scheme in a normed space the complexity couple +(`ApproximationScheme.complexityCouple`) has `E(n, f) = E_n(f)`, and `E_{s,q}` is the +approximation space `A^s_q` for `s > 0` and `q ≠ 0`, and for `s = 0` and `q = ∞` +(`ApproximationScheme.memEMethod_complexityCouple_iff`). The couple needs only an abelian group, +so quasi-normed spaces such as `L_p`, `0 < p < 1`, have approximation spaces of this form. +-/ + +@[expose] public section + +open MeasureTheory Set Function +open scoped ENNReal Pointwise +open ENNReal (lqNorm dyadicWeight LpAddConst dyadicGeomConst) + +namespace ApproximationScheme + +/-! ### The functional `Φ_{-α,q}` of a decreasing function -/ + +variable {α : ℝ} {q : ℝ≥0∞} {φ : ℝ≥0∞ → ℝ≥0∞} + +/-- **Upper bound on a piece for a decreasing function**: for a decreasing `φ`, `α ≥ 0` and +`t ∈ [2^n, 2^(n+1))`, `t^α φ(t) ≤ 2^((n+1)α) φ(2^n)`. -/ +theorem phiIntegrand_neg_le_of_antitone (hφ : Antitone φ) (hα : 0 ≤ α) {n : ℤ} {t : ℝ} + (ht : t ∈ dyadicPiece 1 n) : + phiIntegrand (-α) φ t ≤ 2 ^ (((n + 1 : ℤ) : ℝ) * α) * φ (2 ^ (n : ℝ)) := by + have h := ofReal_mem_Icc_of_mem_dyadicPiece ht + simp only [mul_one] at h + rw [phiIntegrand, neg_neg, ENNReal.rpow_mul] + exact mul_le_mul' (ENNReal.rpow_le_rpow h.2 hα) (hφ h.1) + +/-- **Lower bound on a piece for a decreasing function**: for a decreasing `φ`, `α ≥ 0` and +`t ∈ [2^n, 2^(n+1))`, `2^(nα) φ(2^(n+1)) ≤ t^α φ(t)`. -/ +theorem le_phiIntegrand_neg_of_antitone (hφ : Antitone φ) (hα : 0 ≤ α) {n : ℤ} {t : ℝ} + (ht : t ∈ dyadicPiece 1 n) : + 2 ^ ((n : ℝ) * α) * φ (2 ^ (((n + 1 : ℤ) : ℝ))) ≤ phiIntegrand (-α) φ t := by + have h := ofReal_mem_Icc_of_mem_dyadicPiece ht + simp only [mul_one] at h + rw [phiIntegrand, neg_neg, ENNReal.rpow_mul] + exact mul_le_mul' (ENNReal.rpow_le_rpow h.1 hα) (hφ h.2) + +/-- **The functional `Φ_{-α,q}` of a decreasing function by its dyadic samples**: for a +decreasing `φ ≤ M` and `α ≥ 0`, +`Φ_{-α,q}(φ) ≤ (log 2)^(1/q) C_q (2^α ‖(2^(kα) φ(2^k))_k‖_{ℓ_q} + M γ_{α,q})`, with Mathlib's +constant `C_q = LpAddConst q` and `γ_{α,q} = dyadicGeomConst α q`. On `[2^k, 2^(k+1))` the +integrand `t^α φ(t)` is at most `2^α 2^(kα) φ(2^k)`, and on `[2^(-k-1), 2^(-k))` at most +`2^(-kα) M`. -/ +theorem phiFunctional_neg_le_of_antitone (hφ : Antitone φ) (hα : 0 ≤ α) {M : ℝ≥0∞} + (hM : ∀ t, φ t ≤ M) : + phiFunctional (-α) q φ ≤ ENNReal.ofReal (Real.log 2) ^ (1 / q.toReal) * (LpAddConst q * + (2 ^ α * lqNorm q (fun k : ℕ => dyadicWeight α k * φ ((2 ^ k : ℕ) : ℝ≥0∞)) + + M * dyadicGeomConst α q)) := by + set a : ℕ → ℝ≥0∞ := fun k => 2 ^ α * (dyadicWeight α k * φ ((2 ^ k : ℕ) : ℝ≥0∞)) with ha + set b : ℕ → ℝ≥0∞ := fun k => M * dyadicWeight (-α) k with hb + have hneg : Injective Int.negSucc := fun _ _ h => Int.negSucc.inj h + have hnat : ∀ k : ℕ, ∀ t ∈ dyadicPiece 1 k, phiIntegrand (-α) φ t ≤ a k := by + intro k t ht + refine (phiIntegrand_neg_le_of_antitone hφ hα ht).trans (le_of_eq ?_) + have e1 : (2 : ℝ≥0∞) ^ ((((k : ℤ) + 1 : ℤ) : ℝ) * α) = 2 ^ α * dyadicWeight α k := by + rw [dyadicWeight, ← ENNReal.rpow_add _ _ two_ne_zero ENNReal.ofNat_ne_top] + congr 1 + push_cast + ring + rw [e1, ENNReal.two_rpow_intCast_natCast, mul_assoc, ha] + have hnegs : ∀ k : ℕ, ∀ t ∈ dyadicPiece 1 (Int.negSucc k), phiIntegrand (-α) φ t ≤ b k := by + intro k t ht + refine (phiIntegrand_neg_le_of_antitone hφ hα ht).trans ?_ + have e2 : (2 : ℝ≥0∞) ^ (((Int.negSucc k + 1 : ℤ) : ℝ) * α) = dyadicWeight (-α) k := by + rw [dyadicWeight] + congr 1 + rw [Int.cast_add, Int.cast_negSucc] + push_cast + ring + rw [e2] + exact (mul_le_mul' le_rfl (hM _)).trans_eq (mul_comm _ _) + have hpiece : ∀ n : ℤ, ∀ t ∈ dyadicPiece 1 n, phiIntegrand (-α) φ t ≤ + extend (Nat.cast : ℕ → ℤ) a 0 n + extend Int.negSucc b 0 n := by + intro n t ht + cases n with + | ofNat k => + rw [Int.ofNat_eq_natCast] at ht ⊢ + rw [Nat.cast_injective.extend_apply] + exact le_add_right (hnat k t ht) + | negSucc k => + rw [hneg.extend_apply] + exact le_add_left (hnegs k t ht) + have hμ : ∀ n, kMethodMeasure (dyadicPiece 1 n) = ENNReal.ofReal (Real.log 2) := fun n => by + rw [kMethodMeasure_dyadicPiece zero_le_one, one_mul] + calc phiFunctional (-α) q φ = eLpNorm (phiIntegrand (-α) φ) q kMethodMeasure := rfl + _ ≤ ENNReal.ofReal (Real.log 2) ^ (1 / q.toReal) * + lqNorm q (fun n => extend (Nat.cast : ℕ → ℤ) a 0 n + extend Int.negSucc b 0 n) := + eLpNorm_le_of_le_on_pieces + (measurable_phiIntegrand_of_measurable hφ.measurable).aestronglyMeasurable + (measurableSet_dyadicPiece 1) (pairwise_disjoint_dyadicPiece zero_le_one) + (ae_mem_iUnion_dyadicPiece one_pos) hμ hpiece + _ ≤ ENNReal.ofReal (Real.log 2) ^ (1 / q.toReal) * (LpAddConst q * + (lqNorm q (extend (Nat.cast : ℕ → ℤ) a 0) + lqNorm q (extend Int.negSucc b 0))) := by + gcongr + exact ENNReal.lqNorm_add_le' q _ _ + _ ≤ _ := by + rw [ENNReal.lqNorm_extend_zero Nat.cast_injective, ENNReal.lqNorm_extend_zero hneg, ha, + hb, ENNReal.lqNorm_const_mul, ENNReal.lqNorm_const_mul] + gcongr + exact ENNReal.lqNorm_dyadicWeight_neg_le_dyadicGeomConst hα + +/-- **A lower bound on the shifted dyadic pieces bounds `Φ_{θ,q}` below**: if +`a_k ≤ t^(-θ) φ(t)` for every `k ∈ ℕ` and every `t ∈ [2^(k-1), 2^k)`, then +`(log 2)^(1/q) ‖a‖_{ℓ_q} ≤ Φ_{θ,q}(φ)`. The pieces are disjoint, each of measure `log 2` for +`dt/t`. -/ +theorem le_phiFunctional_of_le_on_shifted_pieces {θ : ℝ} {a : ℕ → ℝ≥0∞} + (h : ∀ k : ℕ, ∀ t ∈ dyadicPiece 1 ((k : ℤ) - 1), a k ≤ phiIntegrand θ φ t) : + ENNReal.ofReal (Real.log 2) ^ (1 / q.toReal) * lqNorm q a ≤ phiFunctional θ q φ := by + have hinj : Injective fun k : ℕ => (k : ℤ) - 1 := fun i j h => by simpa using h + have hc : ENNReal.ofReal (Real.log 2) ≠ 0 := by + rw [← one_mul (Real.log 2)] + exact ofReal_mul_log_two_ne_zero one_pos + rw [phiFunctional_eq] + exact le_eLpNorm_of_le_on_pieces (S := fun k : ℕ => dyadicPiece 1 ((k : ℤ) - 1)) + (fun k => measurableSet_dyadicPiece 1 _) + ((pairwise_disjoint_dyadicPiece zero_le_one).comp_of_injective hinj) + (fun k => by rw [kMethodMeasure_dyadicPiece zero_le_one, one_mul]) hc h + +/-- **The dyadic samples of a decreasing function by `Φ_{-α,q}`**: for a decreasing `φ` and +`α ≥ 0`, `(log 2)^(1/q) 2^(-α) ‖(2^(kα) φ(2^k))_k‖_{ℓ_q} ≤ Φ_{-α,q}(φ)`, since +`t^α φ(t) ≥ 2^(-α) 2^(kα) φ(2^k)` on `[2^(k-1), 2^k)`. -/ +theorem lqNorm_le_phiFunctional_neg_of_antitone (hφ : Antitone φ) (hα : 0 ≤ α) : + ENNReal.ofReal (Real.log 2) ^ (1 / q.toReal) * + (2 ^ (-α) * lqNorm q (fun k : ℕ => dyadicWeight α k * φ ((2 ^ k : ℕ) : ℝ≥0∞))) ≤ + phiFunctional (-α) q φ := by + rw [← ENNReal.lqNorm_const_mul] + refine le_phiFunctional_of_le_on_shifted_pieces fun k t ht => ?_ + refine le_trans (le_of_eq ?_) (le_phiIntegrand_neg_of_antitone hφ hα ht) + have e1 : ((((k : ℤ) - 1 + 1 : ℤ)) : ℝ) = ((k : ℤ) : ℝ) := by rw [sub_add_cancel] + have e2 : (2 : ℝ≥0∞) ^ ((((k : ℤ) - 1 : ℤ) : ℝ) * α) = 2 ^ (-α) * dyadicWeight α k := by + rw [dyadicWeight, ← ENNReal.rpow_add _ _ two_ne_zero ENNReal.ofNat_ne_top] + congr 1 + push_cast + ring + rw [e1, e2, ENNReal.two_rpow_intCast_natCast, mul_assoc] + +/-- **A lower bound of `φ` near `0` bounds `Φ_{-α,q}` below**: if `M ≤ φ(t)` for every `t < 1`, +`α ≥ 0` and `q ≠ 0`, then `(log 2)^(1/q) 2^(-α) M ≤ Φ_{-α,q}(φ)`, from the piece `[1/2, 1)`. -/ +theorem le_phiFunctional_neg_of_le (hα : 0 ≤ α) (hq0 : q ≠ 0) {M : ℝ≥0∞} + (hM : ∀ t < 1, M ≤ φ t) : + ENNReal.ofReal (Real.log 2) ^ (1 / q.toReal) * (2 ^ (-α) * M) ≤ phiFunctional (-α) q φ := by + rw [← ENNReal.lqNorm_ite_eq hq0 0 (2 ^ (-α) * M)] + refine le_phiFunctional_of_le_on_shifted_pieces fun k t ht => ?_ + split_ifs with hk + · subst hk + have hpiece : dyadicPiece 1 (((0 : ℕ) : ℤ) - 1) = Ico (2⁻¹ : ℝ) 1 := by + norm_num [dyadicPiece] + rw [hpiece] at ht + rw [phiIntegrand, neg_neg] + refine mul_le_mul' ?_ (hM _ (ENNReal.ofReal_lt_one.2 ht.2)) + calc (2 : ℝ≥0∞) ^ (-α) = ENNReal.ofReal 2⁻¹ ^ α := by + rw [ENNReal.ofReal_inv_of_pos two_pos, ENNReal.ofReal_ofNat, ENNReal.inv_rpow, + ENNReal.rpow_neg] + _ ≤ ENNReal.ofReal t ^ α := ENNReal.rpow_le_rpow (ENNReal.ofReal_le_ofReal ht.1) hα + · exact zero_le + +end ApproximationScheme + +namespace InterpCouple + +variable {U : Type*} [AddCommGroup U] + +/-! ### The E-functional -/ + +/-- The **E-functional** of a couple `A = (N₀, N₁)`: the error of best approximation of `u` in +`N₀` by elements of complexity `N₁(b) ≤ t`, `E(t, u) = inf {N₀(u - b) : N₁(b) ≤ t}`, with the +value `∞` if no `b` has `N₁(b) ≤ t` (Bergh–Löfström, Section 7.1). Bergh–Löfström put the +complexity first: their `E(t, a; A₀, A₁)` is `eFunctional` of the swapped couple +`(‖·‖_{A₁}, ‖·‖_{A₀})`. -/ +noncomputable def eFunctional (A : InterpCouple U) (t : ℝ≥0∞) (u : U) : ℝ≥0∞ := + ⨅ b : {b : U // A.norm1 b ≤ t}, A.norm0 (u - b) + +variable {A : InterpCouple U} {t s C : ℝ≥0∞} {ρ : ℝ} + +/-- Every admissible element bounds the E-functional: `E(t, u) ≤ N₀(u - b)` if `N₁(b) ≤ t`. -/ +theorem eFunctional_le {b u : U} (hb : A.norm1 b ≤ t) : A.eFunctional t u ≤ A.norm0 (u - b) := + iInf_le_of_le ⟨b, hb⟩ le_rfl + +/-- A lower bound of `N₀(u - b)` for every admissible `b` is a lower bound of `E(t, u)`. -/ +theorem le_eFunctional {F : ℝ≥0∞} {u : U} (h : ∀ b, A.norm1 b ≤ t → F ≤ A.norm0 (u - b)) : + F ≤ A.eFunctional t u := + le_iInf fun b => h b b.2 + +/-- **The E-functional decreases in `t`** (Bergh–Löfström, Lemma 7.1.1): more elements are +admissible for a larger `t`. -/ +theorem eFunctional_anti (u : U) : Antitone fun t => A.eFunctional t u := + fun _ _ h => le_eFunctional fun _ hb => eFunctional_le (hb.trans h) + +/-- `E(t, u) ≤ N₀(u)` if `N₁(0) = 0`, from `b = 0`. -/ +theorem eFunctional_le_norm0 (h1 : A.norm1 0 = 0) (u : U) : A.eFunctional t u ≤ A.norm0 u := + (eFunctional_le (by rw [h1]; exact zero_le)).trans_eq (by rw [sub_zero]) + +/-- `E(t, 0) = 0` if both norms vanish at `0`. -/ +theorem eFunctional_zero_right (h0 : A.norm0 0 = 0) (h1 : A.norm1 0 = 0) : + A.eFunctional t 0 = 0 := + le_antisymm ((eFunctional_le_norm0 h1 0).trans_eq h0) bot_le + +/-- **If every `b` with `N₁(b) < 1` is `0`, then `E(t, u) ≥ N₀(u)` for `t < 1`**: every +admissible element is `b = 0`. -/ +theorem norm0_le_eFunctional_of_lt_one (hdisc : ∀ b, A.norm1 b < 1 → b = 0) (ht : t < 1) + (u : U) : A.norm0 u ≤ A.eFunctional t u := + le_eFunctional fun b hb => le_of_eq (by rw [hdisc b (hb.trans_lt ht), sub_zero]) + +/-- The E-functional of a couple of even functions is even: `E(t, -u) = E(t, u)`, by the +substitution `b ↦ -b`. -/ +theorem eFunctional_neg (h0 : ∀ a, A.norm0 (-a) = A.norm0 a) (h1 : ∀ a, A.norm1 (-a) = A.norm1 a) + (u : U) : A.eFunctional t (-u) = A.eFunctional t u := by + have key : ∀ v, A.eFunctional t (-v) ≤ A.eFunctional t v := fun v => + le_eFunctional fun b hb => (eFunctional_le (b := -b) (by rwa [h1])).trans_eq + (by rw [← h0, show -(-v - -b) = v - b by abel]) + exact le_antisymm (key u) (by simpa using key (-u)) + +/-- **Near-best elements**: if `E(t, u) < ∞` and `ε > 0`, some `b` with `N₁(b) ≤ t` has +`N₀(u - b) ≤ E(t, u) + ε`. -/ +theorem exists_norm0_sub_le_eFunctional_add {u : U} {ε : ℝ≥0∞} (h : A.eFunctional t u ≠ ∞) + (hε : ε ≠ 0) : ∃ b, A.norm1 b ≤ t ∧ A.norm0 (u - b) ≤ A.eFunctional t u + ε := by + obtain ⟨b, hb⟩ := iInf_lt_iff.1 (ENNReal.lt_add_right h hε) + exact ⟨b, b.2, hb.le⟩ + +/-- The decomposition bound behind the subadditivity of the E-functional: if `N₀` satisfies the +quasi-triangle inequality with constant `C`, `N₁` is subadditive, `N₁(b) ≤ t` and `N₁(b') ≤ s`, +then `E(t + s, u + v) ≤ C (N₀(u - b) + N₀(v - b'))`. -/ +theorem eFunctional_add_le_of_le (h0 : ∀ a b, A.norm0 (a + b) ≤ C * (A.norm0 a + A.norm0 b)) + (h1 : ∀ a b, A.norm1 (a + b) ≤ A.norm1 a + A.norm1 b) {u v b b' : U} (hb : A.norm1 b ≤ t) + (hb' : A.norm1 b' ≤ s) : + A.eFunctional (t + s) (u + v) ≤ C * (A.norm0 (u - b) + A.norm0 (v - b')) := + (eFunctional_le ((h1 b b').trans (add_le_add hb hb'))).trans + ((le_of_eq (by rw [add_sub_add_comm])).trans (h0 _ _)) + +/-- **Subadditivity of the E-functional** (Bergh–Löfström, Lemma 7.1.1, with `c₀ = 1`): if `N₀` +satisfies the quasi-triangle inequality with a finite constant `C`, `N₁(0) = 0` and `N₁` is +subadditive, then `E(t + s, u + v) ≤ C (E(t, u) + E(s, v))`. The hypothesis `N₁(0) = 0` serves +the case `C = 0`, in which `N₀` vanishes and the left side is `0` once `b = 0` is admissible. -/ +theorem eFunctional_add_le (hC : C ≠ ∞) (h10 : A.norm1 0 = 0) + (h0 : ∀ a b, A.norm0 (a + b) ≤ C * (A.norm0 a + A.norm0 b)) + (h1 : ∀ a b, A.norm1 (a + b) ≤ A.norm1 a + A.norm1 b) (t s : ℝ≥0∞) (u v : U) : + A.eFunctional (t + s) (u + v) ≤ C * (A.eFunctional t u + A.eFunctional s v) := by + rcases eq_or_ne C 0 with rfl | hC0 + · refine (eFunctional_le_norm0 h10 _).trans ?_ + simpa using h0 u v + have hu : C * A.eFunctional t u = ⨅ b : {b : U // A.norm1 b ≤ t}, C * A.norm0 (u - b) := + ENNReal.mul_iInf_of_ne hC0 hC + have hv : C * A.eFunctional s v = ⨅ b : {b : U // A.norm1 b ≤ s}, C * A.norm0 (v - b) := + ENNReal.mul_iInf_of_ne hC0 hC + rw [mul_add, hu, hv] + exact ENNReal.le_iInf_add_iInf fun b b' => + (eFunctional_add_le_of_le h0 h1 b.2 b'.2).trans_eq (mul_add _ _ _) + +/-- **`ρ`-subadditivity of the E-functional**: if `N₀^ρ` is subadditive for some `ρ > 0` and +`N₁` is subadditive, then `E(t + s, u + v)^ρ ≤ E(t, u)^ρ + E(s, v)^ρ`. The power `x ↦ x^ρ` is an +order isomorphism of `[0, ∞]`, so `E(t, u)^ρ` is the infimum of the `N₀(u - b)^ρ`. -/ +theorem eFunctional_add_rpow_le (hρ : 0 < ρ) + (h0 : ∀ a b, A.norm0 (a + b) ^ ρ ≤ A.norm0 a ^ ρ + A.norm0 b ^ ρ) + (h1 : ∀ a b, A.norm1 (a + b) ≤ A.norm1 a + A.norm1 b) (t s : ℝ≥0∞) (u v : U) : + A.eFunctional (t + s) (u + v) ^ ρ ≤ A.eFunctional t u ^ ρ + A.eFunctional s v ^ ρ := by + have hu : A.eFunctional t u ^ ρ = ⨅ b : {b : U // A.norm1 b ≤ t}, A.norm0 (u - b) ^ ρ := + (ENNReal.orderIsoRpow ρ hρ).map_iInf _ + have hv : A.eFunctional s v ^ ρ = ⨅ b : {b : U // A.norm1 b ≤ s}, A.norm0 (v - b) ^ ρ := + (ENNReal.orderIsoRpow ρ hρ).map_iInf _ + rw [hu, hv] + refine ENNReal.le_iInf_add_iInf fun b b' => ?_ + calc A.eFunctional (t + s) (u + v) ^ ρ ≤ A.norm0 ((u - b) + (v - b')) ^ ρ := by + refine ENNReal.rpow_le_rpow ?_ hρ.le + rw [← add_sub_add_comm] + exact eFunctional_le ((h1 _ _).trans (add_le_add b.2 b'.2)) + _ ≤ _ := h0 _ _ + +/-! ### The spaces `E_{α,q}` -/ + +/-- The norm of the **approximation space** `E_{α,q}` of the couple (Bergh–Löfström, +Definition 7.1.5): `‖u‖_{α,q;E} = Φ_{-α,q}(E(·, u))`, that is +`(∫_0^∞ (t^α E(t, u))^q dt/t)^(1/q)` for `0 < q < ∞` and the essential supremum of +`t^α E(t, u)` for `q = ∞`. -/ +noncomputable def eMethodNorm (A : InterpCouple U) (α : ℝ) (q : ℝ≥0∞) (u : U) : ℝ≥0∞ := + ApproximationScheme.phiFunctional (-α) q fun t => A.eFunctional t u + +/-- `u` belongs to the **approximation space** `E_{α,q}` of the couple: `‖u‖_{α,q;E} < ∞`. -/ +def MemEMethod (A : InterpCouple U) (α : ℝ) (q : ℝ≥0∞) (u : U) : Prop := + A.eMethodNorm α q u < ∞ + +/-- The **dyadic norm** of `E_{s,q}`: `N₀(u) + ‖(2^(ks) E(2^k, u))_{k ∈ ℕ}‖_{ℓ_q}`. For the +complexity couple of an approximation scheme it is the dyadic quasi-norm of `A^s_q`. -/ +noncomputable def eNormDyadic (A : InterpCouple U) (s : ℝ) (q : ℝ≥0∞) (u : U) : ℝ≥0∞ := + A.norm0 u + lqNorm q fun k : ℕ => dyadicWeight s k * A.eFunctional ((2 ^ k : ℕ) : ℝ≥0∞) u + +/-- The constant `(log 2)^(1/q) C_q (2^α + γ_{α,q})` of the bound of `‖·‖_{α,q;E}` by the dyadic +norm, with `C_q = LpAddConst q` and `γ_{α,q} = dyadicGeomConst α q`. -/ +noncomputable def eDyadicUpperConst (α : ℝ) (q : ℝ≥0∞) : ℝ≥0∞ := + ENNReal.ofReal (Real.log 2) ^ (1 / q.toReal) * LpAddConst q * (2 ^ α + dyadicGeomConst α q) + +/-- The constant `eDyadicUpperConst α q` is finite for `α > 0`, and for every `α` if `q = ∞` +(then `γ_{α,∞} = 1`). -/ +theorem eDyadicUpperConst_ne_top {α : ℝ} {q : ℝ≥0∞} (hαq : 0 < α ∨ q = ∞) : + eDyadicUpperConst α q ≠ ∞ := by + have hγ : dyadicGeomConst α q ≠ ∞ := by + rcases hαq with hα | rfl + · exact ENNReal.dyadicGeomConst_ne_top hα q + · rw [ENNReal.dyadicGeomConst_top] + exact ENNReal.one_ne_top + exact ENNReal.mul_ne_top (ENNReal.mul_ne_top + (ENNReal.rpow_ne_top_of_nonneg (by positivity) ENNReal.ofReal_ne_top) + (ENNReal.LpAddConst_lt_top q).ne) + (ENNReal.add_ne_top.2 ⟨ENNReal.two_rpow_ne_top α, hγ⟩) + +/-- The constant `2 · 2^α (log 2)^(-1/q)` of the bound of the dyadic norm by `‖·‖_{α,q;E}`. -/ +noncomputable def eDyadicLowerConst (α : ℝ) (q : ℝ≥0∞) : ℝ≥0∞ := + 2 * 2 ^ α * (ENNReal.ofReal (Real.log 2) ^ (1 / q.toReal))⁻¹ + +/-- The constant `eDyadicLowerConst α q` is finite. -/ +theorem eDyadicLowerConst_ne_top (α : ℝ) (q : ℝ≥0∞) : eDyadicLowerConst α q ≠ ∞ := + ENNReal.mul_ne_top (ENNReal.mul_ne_top ENNReal.ofNat_ne_top (ENNReal.two_rpow_ne_top α)) + (ENNReal.inv_ne_top.2 (ApproximationScheme.ofReal_log_two_rpow_ne_zero q)) + +variable {α : ℝ} {q : ℝ≥0∞} + +/-- **The norm of `E_{α,q}` by the dyadic norm**: if `N₁(0) = 0` and `α ≥ 0`, then +`‖u‖_{α,q;E} ≤ eDyadicUpperConst α q · (N₀(u) + ‖(2^(kα) E(2^k, u))_k‖_{ℓ_q})`; the constant is +finite for `α > 0` and for `q = ∞`. -/ +theorem eMethodNorm_le_eNormDyadic (h1 : A.norm1 0 = 0) (hα : 0 ≤ α) (u : U) : + A.eMethodNorm α q u ≤ eDyadicUpperConst α q * A.eNormDyadic α q u := by + set L := lqNorm q fun k : ℕ => dyadicWeight α k * A.eFunctional ((2 ^ k : ℕ) : ℝ≥0∞) u + set γ := dyadicGeomConst α q + set X := ENNReal.ofReal (Real.log 2) ^ (1 / q.toReal) + calc A.eMethodNorm α q u ≤ X * (LpAddConst q * (2 ^ α * L + A.norm0 u * γ)) := + ApproximationScheme.phiFunctional_neg_le_of_antitone (eFunctional_anti u) hα + fun _ => eFunctional_le_norm0 h1 u + _ ≤ X * (LpAddConst q * ((2 ^ α + γ) * L + A.norm0 u * (2 ^ α + γ))) := by + gcongr + · exact le_self_add + · exact le_add_self + _ = X * LpAddConst q * (2 ^ α + γ) * (A.norm0 u + L) := by ring + _ = eDyadicUpperConst α q * A.eNormDyadic α q u := rfl + +/-- **The dyadic norm by the norm of `E_{α,q}`**: if every `b` with `N₁(b) < 1` is `0`, +`α ≥ 0` and `q ≠ 0`, then +`N₀(u) + ‖(2^(kα) E(2^k, u))_k‖_{ℓ_q} ≤ eDyadicLowerConst α q · ‖u‖_{α,q;E}`. On `(0, 1)` the +E-functional is at least `N₀(u)`, which bounds the first term. -/ +theorem eNormDyadic_le_eMethodNorm (hdisc : ∀ b, A.norm1 b < 1 → b = 0) (hα : 0 ≤ α) + (hq0 : q ≠ 0) (u : U) : + A.eNormDyadic α q u ≤ eDyadicLowerConst α q * A.eMethodNorm α q u := by + have hX0 := ApproximationScheme.ofReal_log_two_rpow_ne_zero q + have hXt : ENNReal.ofReal (Real.log 2) ^ (1 / q.toReal) ≠ ∞ := + ENNReal.rpow_ne_top_of_nonneg (by positivity) ENNReal.ofReal_ne_top + have h20 : (2 : ℝ≥0∞) ^ (-α) ≠ 0 := (ENNReal.rpow_pos two_pos ENNReal.ofNat_ne_top).ne' + have hc0 := mul_ne_zero hX0 h20 + have hct := ENNReal.mul_ne_top hXt (ENNReal.two_rpow_ne_top (-α)) + have hN : ENNReal.ofReal (Real.log 2) ^ (1 / q.toReal) * 2 ^ (-α) * A.norm0 u ≤ + A.eMethodNorm α q u := by + rw [mul_assoc] + exact ApproximationScheme.le_phiFunctional_neg_of_le (φ := fun t => A.eFunctional t u) hα + hq0 fun t ht => norm0_le_eFunctional_of_lt_one hdisc ht u + have hL : ENNReal.ofReal (Real.log 2) ^ (1 / q.toReal) * 2 ^ (-α) * + lqNorm q (fun k : ℕ => dyadicWeight α k * A.eFunctional ((2 ^ k : ℕ) : ℝ≥0∞) u) ≤ + A.eMethodNorm α q u := by + rw [mul_assoc] + exact ApproximationScheme.lqNorm_le_phiFunctional_neg_of_antitone + (φ := fun t => A.eFunctional t u) (eFunctional_anti u) hα + rw [ENNReal.mul_le_iff_le_inv hc0 hct] at hN hL + have hinv : (ENNReal.ofReal (Real.log 2) ^ (1 / q.toReal) * 2 ^ (-α))⁻¹ = + 2 ^ α * (ENNReal.ofReal (Real.log 2) ^ (1 / q.toReal))⁻¹ := by + rw [ENNReal.mul_inv (Or.inl hX0) (Or.inr h20), ENNReal.rpow_neg, inv_inv, mul_comm] + rw [hinv] at hN hL + calc A.eNormDyadic α q u ≤ 2 ^ α * (ENNReal.ofReal (Real.log 2) ^ (1 / q.toReal))⁻¹ * + A.eMethodNorm α q u + 2 ^ α * (ENNReal.ofReal (Real.log 2) ^ (1 / q.toReal))⁻¹ * + A.eMethodNorm α q u := add_le_add hN hL + _ = eDyadicLowerConst α q * A.eMethodNorm α q u := by + rw [eDyadicLowerConst] + ring + +/-- **The space `E_{α,q}` by its dyadic norm**: if `N₁(0) = 0` and only `0` has complexity +below `1`, then for `α ≥ 0` and `q ≠ 0` with `α > 0` or `q = ∞` (the range of Bergh–Löfström, +Definition 7.1.5), `u ∈ E_{α,q}` iff `N₀(u) + ‖(2^(kα) E(2^k, u))_k‖_{ℓ_q} < ∞`. -/ +theorem memEMethod_iff_eNormDyadic_lt_top (h1 : A.norm1 0 = 0) + (hdisc : ∀ b, A.norm1 b < 1 → b = 0) (hα : 0 ≤ α) (hαq : 0 < α ∨ q = ∞) (hq0 : q ≠ 0) + {u : U} : A.MemEMethod α q u ↔ A.eNormDyadic α q u < ∞ := + ⟨fun h => (eNormDyadic_le_eMethodNorm hdisc hα hq0 u).trans_lt + (ENNReal.mul_lt_top (eDyadicLowerConst_ne_top α q).lt_top h), + fun h => (eMethodNorm_le_eNormDyadic h1 hα u).trans_lt + (ENNReal.mul_lt_top (eDyadicUpperConst_ne_top hαq).lt_top h)⟩ + +/-- The constant `C C_q (2 + 2^s C_q)` of the quasi-triangle inequality of the dyadic norm, for a +couple quasi-normed with constant `C` and Mathlib's constant `C_q = LpAddConst q`. -/ +noncomputable def eAddConst (C : ℝ≥0∞) (s : ℝ) (q : ℝ≥0∞) : ℝ≥0∞ := + C * LpAddConst q * (2 + 2 ^ s * LpAddConst q) + +/-- The constant `eAddConst C s q` is finite for `C < ∞`. -/ +theorem eAddConst_ne_top (hC : C ≠ ∞) (s : ℝ) (q : ℝ≥0∞) : eAddConst C s q ≠ ∞ := + ENNReal.mul_ne_top (ENNReal.mul_ne_top hC (ENNReal.LpAddConst_lt_top q).ne) + (ENNReal.add_ne_top.2 ⟨ENNReal.ofNat_ne_top, + ENNReal.mul_ne_top (ENNReal.two_rpow_ne_top s) (ENNReal.LpAddConst_lt_top q).ne⟩) + +/-- One level up: `2^((k+1)s) E(2^(k+1), u + v) ≤ 2^s C (2^(ks) E(2^k, u) + 2^(ks) E(2^k, v))` +for a couple quasi-normed with constant `C` with subadditive complexity, since +`2^(k+1) = 2^k + 2^k` (`eFunctional_add_le`). -/ +theorem dyadicWeight_succ_mul_eFunctional_add_le (hA : A.IsQuasiNormed C) + (h1 : ∀ a b, A.norm1 (a + b) ≤ A.norm1 a + A.norm1 b) (s : ℝ) (u v : U) (k : ℕ) : + dyadicWeight s (k + 1) * A.eFunctional ((2 ^ (k + 1) : ℕ) : ℝ≥0∞) (u + v) ≤ + 2 ^ s * C * (dyadicWeight s k * A.eFunctional ((2 ^ k : ℕ) : ℝ≥0∞) u + + dyadicWeight s k * A.eFunctional ((2 ^ k : ℕ) : ℝ≥0∞) v) := by + have h2 : ((2 ^ (k + 1) : ℕ) : ℝ≥0∞) = ((2 ^ k : ℕ) : ℝ≥0∞) + ((2 ^ k : ℕ) : ℝ≥0∞) := by + push_cast + ring + rw [h2, ENNReal.dyadicWeight_succ] + calc 2 ^ s * dyadicWeight s k * A.eFunctional (((2 ^ k : ℕ) : ℝ≥0∞) + ((2 ^ k : ℕ) : ℝ≥0∞)) + (u + v) ≤ 2 ^ s * dyadicWeight s k * (C * (A.eFunctional ((2 ^ k : ℕ) : ℝ≥0∞) u + + A.eFunctional ((2 ^ k : ℕ) : ℝ≥0∞) v)) := by + gcongr + exact eFunctional_add_le hA.ne_top hA.norm1_zero hA.norm0_add_le h1 _ _ u v + _ = _ := by ring + +/-- **The quasi-triangle inequality of the dyadic norm** (Bergh–Löfström, Lemma 7.1.6, in dyadic +form): for a couple quasi-normed with constant `C` whose complexity is subadditive, +`‖u + v‖ ≤ C C_q (2 + 2^s C_q) (‖u‖ + ‖v‖)` for the norm `N₀(u) + ‖(2^(ks) E(2^k, u))_k‖_{ℓ_q}`, +by `E(2^(k+1), u + v) ≤ C (E(2^k, u) + E(2^k, v))` and the shift by one level. -/ +theorem eNormDyadic_add_le (hA : A.IsQuasiNormed C) + (h1 : ∀ a b, A.norm1 (a + b) ≤ A.norm1 a + A.norm1 b) (s : ℝ) (q : ℝ≥0∞) (u v : U) : + A.eNormDyadic s q (u + v) ≤ eAddConst C s q * (A.eNormDyadic s q u + A.eNormDyadic s q v) := by + set x : ℕ → ℝ≥0∞ := fun k => dyadicWeight s k * A.eFunctional ((2 ^ k : ℕ) : ℝ≥0∞) (u + v) + set yu : ℕ → ℝ≥0∞ := fun k => dyadicWeight s k * A.eFunctional ((2 ^ k : ℕ) : ℝ≥0∞) u + set yv : ℕ → ℝ≥0∞ := fun k => dyadicWeight s k * A.eFunctional ((2 ^ k : ℕ) : ℝ≥0∞) v + set Cq := LpAddConst q + have hP : A.norm0 (u + v) ≤ C * (A.norm0 u + A.norm0 v) := hA.norm0_add_le u v + have hx0 : x 0 ≤ C * (A.norm0 u + A.norm0 v) := by + simp only [x, ENNReal.dyadicWeight_zero_right, one_mul] + exact (eFunctional_le_norm0 hA.norm1_zero _).trans hP + have hshift : lqNorm q (fun k => x (k + 1)) ≤ 2 ^ s * C * (Cq * (lqNorm q yu + lqNorm q yv)) := by + calc lqNorm q (fun k => x (k + 1)) ≤ lqNorm q (fun k => 2 ^ s * C * (yu k + yv k)) := + ENNReal.lqNorm_mono fun k => dyadicWeight_succ_mul_eFunctional_add_le hA h1 s u v k + _ ≤ _ := by + rw [ENNReal.lqNorm_const_mul] + gcongr + exact ENNReal.lqNorm_add_le' q _ _ + have hCq : 1 ≤ Cq := ENNReal.one_le_LpAddConst q + calc A.eNormDyadic s q (u + v) = A.norm0 (u + v) + lqNorm q x := rfl + _ ≤ Cq * (C * (A.norm0 u + A.norm0 v)) + Cq * (C * (A.norm0 u + A.norm0 v) + + 2 ^ s * C * (Cq * (lqNorm q yu + lqNorm q yv))) := by + gcongr + · exact hP.trans (le_mul_of_one_le_left' hCq) + · exact (ENNReal.lqNorm_le_head_add_shift' q x).trans (by gcongr) + _ = C * Cq * (2 * (A.norm0 u + A.norm0 v) + + 2 ^ s * Cq * (lqNorm q yu + lqNorm q yv)) := by ring + _ ≤ C * Cq * ((2 + 2 ^ s * Cq) * (A.norm0 u + A.norm0 v) + + (2 + 2 ^ s * Cq) * (lqNorm q yu + lqNorm q yv)) := by + gcongr + · exact le_self_add + · exact le_add_self + _ = C * Cq * (2 + 2 ^ s * Cq) * ((A.norm0 u + lqNorm q yu) + (A.norm0 v + lqNorm q yv)) := by + ring + _ = eAddConst C s q * (A.eNormDyadic s q u + A.eNormDyadic s q v) := rfl + +/-! ### The complexity couple -/ + +/-- The **complexity couple** of a function `N : U → [0, ∞]` and a sequence of sets `S n`: +`N₀ = N` and `N₁(b) = min {n : b ∈ S n}`, with `N₁(b) = ∞` if `b` lies in no `S n`. -/ +noncomputable def complexity (N : U → ℝ≥0∞) (S : ℕ → Set U) : InterpCouple U := + ⟨N, fun b => ⨅ n : {n : ℕ // b ∈ S n}, ((n : ℕ) : ℝ≥0∞)⟩ + +variable {N : U → ℝ≥0∞} {S : ℕ → Set U} + +/-- The first norm of the complexity couple is `N`. -/ +@[simp] +theorem complexity_norm0 (u : U) : (complexity N S).norm0 u = N u := rfl + +/-- An element of `S n` has complexity at most `n`. -/ +theorem complexity_norm1_le_of_mem {b : U} {n : ℕ} (h : b ∈ S n) : + (complexity N S).norm1 b ≤ n := + iInf_le_of_le ⟨n, h⟩ le_rfl + +/-- For increasing sets, an element of complexity at most `n` lies in `S n`: every `m` with +`b ∈ S m` exceeds `n` otherwise, and then the complexity is at least `n + 1`. -/ +theorem mem_of_complexity_norm1_le (hS : Monotone S) {b : U} {n : ℕ} + (h : (complexity N S).norm1 b ≤ n) : b ∈ S n := by + by_contra hb + have hge : (((n + 1 : ℕ)) : ℝ≥0∞) ≤ (complexity N S).norm1 b := le_iInf fun m => by + have hm : n < m := by + by_contra hm + exact hb (hS (not_lt.1 hm) m.2) + exact Nat.cast_le.2 hm + have := Nat.cast_le.1 (hge.trans h) + omega + +/-- For increasing sets, `N₁(b) ≤ n` iff `b ∈ S n`. -/ +theorem complexity_norm1_le_natCast_iff (hS : Monotone S) {b : U} {n : ℕ} : + (complexity N S).norm1 b ≤ n ↔ b ∈ S n := + ⟨mem_of_complexity_norm1_le hS, complexity_norm1_le_of_mem⟩ + +/-- **The E-functional of the complexity couple at an integer** is the error of best +approximation from `S n`: for increasing sets, `E(n, u) = inf_{b ∈ S n} N(u - b)`. -/ +theorem eFunctional_complexity_natCast (hS : Monotone S) (n : ℕ) (u : U) : + (complexity N S).eFunctional n u = ⨅ b ∈ S n, N (u - b) := + le_antisymm (le_iInf₂ fun _ hb => eFunctional_le (complexity_norm1_le_of_mem hb)) + (le_eFunctional fun b hb => iInf₂_le b (mem_of_complexity_norm1_le hS hb)) + +/-- If `0 ∈ S 0`, the element `0` has complexity `0`. -/ +theorem complexity_norm1_zero (h : (0 : U) ∈ S 0) : (complexity N S).norm1 0 = 0 := + nonpos_iff_eq_zero.1 ((complexity_norm1_le_of_mem h).trans_eq Nat.cast_zero) + +/-- If every `S n` is symmetric, the complexity is even. -/ +theorem complexity_norm1_neg (hneg : ∀ n, ∀ b ∈ S n, -b ∈ S n) (b : U) : + (complexity N S).norm1 (-b) = (complexity N S).norm1 b := by + have key : ∀ a : U, (complexity N S).norm1 (-a) ≤ (complexity N S).norm1 a := fun a => + le_iInf fun n => complexity_norm1_le_of_mem (hneg n a n.2) + exact le_antisymm (key b) (by simpa using key (-b)) + +/-- If `S m + S n ⊆ S (m + n)`, the complexity is subadditive. -/ +theorem complexity_norm1_add_le (hadd : ∀ m n, S m + S n ⊆ S (m + n)) (a b : U) : + (complexity N S).norm1 (a + b) ≤ (complexity N S).norm1 a + (complexity N S).norm1 b := + ENNReal.le_iInf_add_iInf fun m n => + (complexity_norm1_le_of_mem (hadd m n (Set.add_mem_add m.2 n.2))).trans_eq (Nat.cast_add _ _) + +/-- If `S 0 = {0}`, every `b` with complexity below `1` is `0`. -/ +theorem eq_zero_of_complexity_norm1_lt_one (hS0 : S 0 = {0}) {b : U} + (hb : (complexity N S).norm1 b < 1) : b = 0 := by + obtain ⟨n, hn⟩ := iInf_lt_iff.1 hb + have h := n.2 + rw [Nat.cast_lt_one.1 hn, hS0] at h + exact Set.mem_singleton_iff.1 h + +/-! ### Subgroups at dyadic complexities -/ + +/-- The **dyadic levels** of a sequence of subgroups `V_j`: `{0}` at complexity `0` and +`V_{⌊log₂ n⌋}` at complexity `n ≥ 1`, so that `V_j` sits at the complexities +`2^j, …, 2^(j+1) - 1`. -/ +def dyadicLevels (V : ℕ → AddSubgroup U) (n : ℕ) : Set U := + if n = 0 then {0} else (V (Nat.log 2 n) : Set U) + +variable {V : ℕ → AddSubgroup U} + +/-- The dyadic level `0` is `{0}`. -/ +theorem dyadicLevels_zero : dyadicLevels V 0 = {0} := by simp [dyadicLevels] + +/-- The dyadic level `2^j` is `V_j`. -/ +theorem dyadicLevels_two_pow (j : ℕ) : dyadicLevels V (2 ^ j) = V j := by + have h : (2 ^ j : ℕ) ≠ 0 := pow_ne_zero j two_ne_zero + simp only [dyadicLevels, h, ↓reduceIte, Nat.log_pow Nat.one_lt_two] + +/-- Every dyadic level contains `0`. -/ +theorem zero_mem_dyadicLevels (n : ℕ) : (0 : U) ∈ dyadicLevels V n := by + unfold dyadicLevels + split_ifs + · exact Set.mem_singleton 0 + · exact SetLike.mem_coe.2 (zero_mem _) + +/-- For increasing subgroups the dyadic levels increase. -/ +theorem monotone_dyadicLevels (hV : Monotone V) : Monotone (dyadicLevels V) := by + intro m n hmn b hb + rcases eq_or_ne m 0 with rfl | hm + · rw [dyadicLevels_zero, Set.mem_singleton_iff] at hb + rw [hb] + exact zero_mem_dyadicLevels n + have hn : n ≠ 0 := by omega + simp only [dyadicLevels, hm, hn, ↓reduceIte, SetLike.mem_coe] at hb ⊢ + exact hV (Nat.log_mono_right hmn) hb + +/-- The dyadic levels are symmetric. -/ +theorem neg_mem_dyadicLevels {n : ℕ} {b : U} (hb : b ∈ dyadicLevels V n) : + -b ∈ dyadicLevels V n := by + unfold dyadicLevels at hb ⊢ + split_ifs at hb ⊢ + · rw [Set.mem_singleton_iff] at hb ⊢ + rw [hb, neg_zero] + · exact SetLike.mem_coe.2 (neg_mem (SetLike.mem_coe.1 hb)) + +/-- For increasing subgroups, `S m + S n ⊆ S (m + n)` for the dyadic levels. -/ +theorem dyadicLevels_add_subset (hV : Monotone V) (m n : ℕ) : + dyadicLevels V m + dyadicLevels V n ⊆ dyadicLevels V (m + n) := by + rintro _ ⟨a, ha, b, hb, rfl⟩ + change a + b ∈ dyadicLevels V (m + n) + rcases eq_or_ne m 0 with rfl | hm + · rw [dyadicLevels_zero, Set.mem_singleton_iff] at ha + rwa [ha, zero_add, zero_add] + rcases eq_or_ne n 0 with rfl | hn + · rw [dyadicLevels_zero, Set.mem_singleton_iff] at hb + rwa [hb, add_zero, add_zero] + have hmn : m + n ≠ 0 := by omega + simp only [dyadicLevels, hm, hn, hmn, ↓reduceIte, SetLike.mem_coe] at ha hb ⊢ + exact add_mem (hV (Nat.log_mono_right (by omega)) ha) (hV (Nat.log_mono_right (by omega)) hb) + +/-- The **couple of an increasing sequence of subgroups** `V_0 ⊆ V_1 ⊆ ⋯` of `U` with the first +norm `N`: the complexity couple of the dyadic levels, in which `V_j` has complexity `2^j`. It +mirrors the dyadic scheme `ApproximationScheme.ofMonotoneSubmodules`, on an abelian group with a +quasi-norm in place of a normed space. As there, the proof that the subgroups increase is part +of the data, so that every couple of this form has increasing levels; the lemmas on the +subadditivity of the complexity and on the E-functional at `2^j` use it. -/ +noncomputable def ofMonotoneSubgroups (N : U → ℝ≥0∞) (V : ℕ → AddSubgroup U) + (_hV : Monotone V) : InterpCouple U := + complexity N (dyadicLevels V) + +variable {hV : Monotone V} + +/-- The first norm of the couple of subgroups is `N`. -/ +@[simp] +theorem ofMonotoneSubgroups_norm0 (u : U) : (ofMonotoneSubgroups N V hV).norm0 u = N u := rfl + +/-- In the couple of subgroups, `0` has complexity `0`. -/ +theorem ofMonotoneSubgroups_norm1_zero : (ofMonotoneSubgroups N V hV).norm1 0 = 0 := + complexity_norm1_zero (zero_mem_dyadicLevels 0) + +/-- In the couple of subgroups the complexity is even. -/ +theorem ofMonotoneSubgroups_norm1_neg (b : U) : + (ofMonotoneSubgroups N V hV).norm1 (-b) = (ofMonotoneSubgroups N V hV).norm1 b := + complexity_norm1_neg (fun _ _ hb => neg_mem_dyadicLevels hb) b + +/-- In the couple of subgroups the complexity is subadditive. -/ +theorem ofMonotoneSubgroups_norm1_add_le (a b : U) : + (ofMonotoneSubgroups N V hV).norm1 (a + b) ≤ + (ofMonotoneSubgroups N V hV).norm1 a + (ofMonotoneSubgroups N V hV).norm1 b := + complexity_norm1_add_le (dyadicLevels_add_subset hV) a b + +/-- In the couple of subgroups only `0` has complexity below `1`. -/ +theorem eq_zero_of_ofMonotoneSubgroups_norm1_lt_one {b : U} + (hb : (ofMonotoneSubgroups N V hV).norm1 b < 1) : b = 0 := + eq_zero_of_complexity_norm1_lt_one dyadicLevels_zero hb + +/-- **The E-functional of the couple of subgroups at `t = 2^j`** is the error of best +approximation from `V_j`: `E(2^j, u) = inf_{b ∈ V_j} N(u - b)`. -/ +theorem eFunctional_ofMonotoneSubgroups_two_pow (j : ℕ) (u : U) : + (ofMonotoneSubgroups N V hV).eFunctional ((2 ^ j : ℕ) : ℝ≥0∞) u = ⨅ b ∈ V j, N (u - b) := by + have h := eFunctional_complexity_natCast (N := N) (monotone_dyadicLevels hV) (2 ^ j) u + rw [dyadicLevels_two_pow] at h + exact h + +/-- **The E-functional at `t = 2^j` ignores elements of `V_j`**: `E(2^j, u - a) = E(2^j, u)` for +`a ∈ V_j`, by the substitution `b ↦ a + b` of the subgroup `V_j`. -/ +theorem eFunctional_ofMonotoneSubgroups_sub_of_mem {j : ℕ} {a : U} (ha : a ∈ V j) (u : U) : + (ofMonotoneSubgroups N V hV).eFunctional ((2 ^ j : ℕ) : ℝ≥0∞) (u - a) = + (ofMonotoneSubgroups N V hV).eFunctional ((2 ^ j : ℕ) : ℝ≥0∞) u := by + rw [eFunctional_ofMonotoneSubgroups_two_pow, eFunctional_ofMonotoneSubgroups_two_pow] + refine le_antisymm (le_iInf₂ fun b hb => ?_) (le_iInf₂ fun b hb => ?_) + · exact iInf₂_le_of_le (b - a) (sub_mem hb ha) (by rw [sub_sub, add_sub_cancel]) + · exact iInf₂_le_of_le (a + b) (add_mem ha hb) (by rw [sub_sub]) + +end InterpCouple + +/-! ### The complexity couple of an approximation scheme -/ + +namespace ApproximationScheme + +variable {X : Type*} [NormedAddCommGroup X] [NormedSpace ℝ X] (A : ApproximationScheme X) + +/-- The **complexity couple** of an approximation scheme: the norm of `X` and the complexity +`min {n : b ∈ A n}`. -/ +noncomputable def complexityCouple : InterpCouple X := + InterpCouple.complexity (fun f => ‖f‖ₑ) A.sets + +variable {A} {s : ℝ} {q : ℝ≥0∞} + +/-- **The E-functional of the complexity couple is the error of best approximation**: +`E(n, f) = E_n(f)` for every `n ∈ ℕ`. -/ +theorem eFunctional_complexityCouple (n : ℕ) (f : X) : + A.complexityCouple.eFunctional n f = A.approxError f n := by + rw [complexityCouple, InterpCouple.eFunctional_complexity_natCast A.mono, approxError, + Metric.infEDist] + simp only [eDist_eq_eNorm_sub] + +/-- The dyadic norm of the complexity couple is the dyadic quasi-norm +`‖f‖ + ‖(2^(ks) E_{2^k}(f))_k‖_{ℓ_q}` of `A^s_q`. -/ +theorem eNormDyadic_complexityCouple (f : X) : + A.complexityCouple.eNormDyadic s q f = A.approxNormDyadic s q f := by + simp only [InterpCouple.eNormDyadic, eFunctional_complexityCouple, approxNormDyadic] + rfl + +/-- **`E_{s,q}` of the complexity couple is the approximation space** (the E-method for +approximation schemes): for `s ≥ 0` and `q ≠ 0` with `s > 0` or `q = ∞`, `f ∈ E_{s,q}` iff +`f ∈ A^s_q`. -/ +theorem memEMethod_complexityCouple_iff (hs : 0 ≤ s) (hsq : 0 < s ∨ q = ∞) (hq0 : q ≠ 0) + {f : X} : A.complexityCouple.MemEMethod s q f ↔ A.MemApprox s q f := by + have h1 : A.complexityCouple.norm1 0 = 0 := InterpCouple.complexity_norm1_zero (A.zero_mem 0) + have hdisc : ∀ b, A.complexityCouple.norm1 b < 1 → b = 0 := fun _ hb => + InterpCouple.eq_zero_of_complexity_norm1_lt_one A.sets_zero hb + rw [InterpCouple.memEMethod_iff_eNormDyadic_lt_top h1 hdisc hs hsq hq0, + eNormDyadic_complexityCouple, memApprox_iff_approxNormDyadic_lt_top' hq0 hs] + +end ApproximationScheme diff --git a/LeanPool/FunctionSpaces/ApproximationSpaces/Interpolation/EFunctionalModuli.lean b/LeanPool/FunctionSpaces/ApproximationSpaces/Interpolation/EFunctionalModuli.lean new file mode 100644 index 0000000000..b56f1051fd --- /dev/null +++ b/LeanPool/FunctionSpaces/ApproximationSpaces/Interpolation/EFunctionalModuli.lean @@ -0,0 +1,503 @@ +/- +Copyright (c) 2026 Mario Ullrich. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Mario Ullrich +-/ +module + +public import LeanPool.FunctionSpaces.ApproximationSpaces.Interpolation.EFunctional + +/- +Modified for Lean Pool: module names and imports adapted. +-/ + +/-! +# Moduli of smoothness for `ρ`-normed couples + +The coincidence of approximation spaces with classical spaces defined by a modulus of +smoothness (`ApproximationScheme.ModulusData`) needs the triangle inequality: the near-best +approximants are telescoped over arbitrarily many levels. For a quasi-norm with constant `C` +the telescoping would cost `C^k` at level `k`. In `L_p`, `0 < p < 1`, the `p`-th power of the +quasi-norm is subadditive, and DeVore–Popov (Trans. Amer. Math. Soc. 305 (1988), (2.3)) telescope +with `‖∑ f_j‖_p^μ ≤ ∑ ‖f_j‖_p^μ`, `μ ≤ min(1, p)`. This file states the coincidence theorem in +that form, for a couple `A = (N₀, N₁)` (`InterpCouple`) with an exponent `ρ > 0`. + +An `InterpCouple.ModulusData A ρ θ` bundles + +* the couple axioms: `N₀(0) = 0`, `N₀` even, `N₀(a + b)^ρ ≤ N₀(a)^ρ + N₀(b)^ρ`, and a + subadditive even complexity `N₁` with `N₁(0) = 0`; +* a modulus `ω(f, k)` (the modulus of smoothness at the scale `2^(-k)`) with + `ω(f + g, k)^ρ ≤ ω(f, k)^ρ + ω(g, k)^ρ` and `ω(f, k) ≤ C₀ N₀(f)`; +* a **Jackson inequality** `E(2^k, f) ≤ C_J ω(f, k)` at every level, for the E-functional + `E(t, f) = inf {N₀(f - b) : N₁(b) ≤ t}` (`InterpCouple.eFunctional`); +* an **inverse inequality** of order `θ`: `ω(a, k) ≤ C_B 2^(-(k-j)θ) N₀(a)` for `N₁(a) ≤ 2^j` + (with `k - j` truncated at `0`). + +With the classical quasi-norm `‖f‖^ω_{s,q} = N₀(f) + ‖(2^(ks) ω(f, k))_k‖_{ℓ_q}` +(`InterpCouple.ModulusData.modNorm`) and the dyadic norm of the E-method +`N₀(f) + ‖(2^(ks) E(2^k, f))_k‖_{ℓ_q}` (`InterpCouple.eNormDyadic`): + +* `‖f‖_E ≤ max(1, C_J) ‖f‖^ω_{s,q}` for every `s` and `q` + (`InterpCouple.ModulusData.eNormDyadic_le_modNorm`); +* `‖f‖^ω_{s,q} ≤ K ‖f‖_E` for `0 ≤ s < θ` and every `q` + (`InterpCouple.ModulusData.modNorm_le_eNormDyadic`). The proof follows DeVore–Popov, proof of + Theorem 4.8: near-best `b_k` with `N₁(b_k) ≤ 2^k`, the telescoping + `f = (f - b_k) + b_0 + ∑_{j dyadicWeight s k * (A.eFunctional ((2 ^ k : ℕ) : ℝ≥0∞) f + + A.norm0 f * dyadicWeight (-(s + 1)) k)) ≤ + LpAddConst q * (1 + dyadicGeomConst 1 q) * A.eNormDyadic s q f := by + set L := lqNorm q fun k : ℕ => dyadicWeight s k * A.eFunctional ((2 ^ k : ℕ) : ℝ≥0∞) f + set γ := dyadicGeomConst 1 q + have hw : ∀ k : ℕ, dyadicWeight s k * (A.eFunctional ((2 ^ k : ℕ) : ℝ≥0∞) f + + A.norm0 f * dyadicWeight (-(s + 1)) k) = + dyadicWeight s k * A.eFunctional ((2 ^ k : ℕ) : ℝ≥0∞) f + + A.norm0 f * dyadicWeight (-1) k := fun k => by + rw [mul_add, mul_left_comm, ← ENNReal.dyadicWeight_add, show s + -(s + 1) = -1 by ring] + calc lqNorm q (fun k : ℕ => dyadicWeight s k * (A.eFunctional ((2 ^ k : ℕ) : ℝ≥0∞) f + + A.norm0 f * dyadicWeight (-(s + 1)) k)) + = lqNorm q (fun k : ℕ => dyadicWeight s k * A.eFunctional ((2 ^ k : ℕ) : ℝ≥0∞) f + + A.norm0 f * dyadicWeight (-1) k) := by + congr 1 + exact funext hw + _ ≤ LpAddConst q * (L + A.norm0 f * lqNorm q (dyadicWeight (-1))) := by + refine (ENNReal.lqNorm_add_le' q _ _).trans ?_ + rw [ENNReal.lqNorm_const_mul] + _ ≤ LpAddConst q * ((1 + γ) * L + A.norm0 f * (1 + γ)) := by + gcongr + · exact le_mul_of_one_le_left' le_self_add + · exact (ENNReal.lqNorm_dyadicWeight_neg_le_dyadicGeomConst zero_le_one).trans le_add_self + _ = LpAddConst q * (1 + γ) * (A.norm0 f + L) := by ring + _ = LpAddConst q * (1 + γ) * A.eNormDyadic s q f := rfl + +/-- A **modulus of smoothness compatible with a `ρ`-normed couple** `A = (N₀, N₁)`, with inverse +order `θ`: the couple axioms with `ρ`-subadditivity of `N₀` and subadditivity of the complexity +`N₁`, a modulus at the dyadic scales `modulus f k = ω(f, 2^(-k))` whose `ρ`-th power is +subadditive and which is bounded by `C₀ N₀(f)`, a Jackson inequality `E(2^k, f) ≤ C_J ω(f, k)` +for the E-functional, and an inverse inequality `ω(a, k) ≤ C_B 2^(-(k-j)θ) N₀(a)` for +`N₁(a) ≤ 2^j`. -/ +structure ModulusData (A : InterpCouple U) (ρ θ : ℝ) where + /-- The exponent `ρ` is positive. -/ + rho_pos : 0 < ρ + /-- `N₀(0) = 0`. -/ + norm0_zero : A.norm0 0 = 0 + /-- `N₀` is even. -/ + norm0_neg : ∀ a, A.norm0 (-a) = A.norm0 a + /-- `N₀^ρ` is subadditive. -/ + norm0_add_rpow_le : ∀ a b, A.norm0 (a + b) ^ ρ ≤ A.norm0 a ^ ρ + A.norm0 b ^ ρ + /-- `N₁(0) = 0`. -/ + norm1_zero : A.norm1 0 = 0 + /-- `N₁` is even. -/ + norm1_neg : ∀ a, A.norm1 (-a) = A.norm1 a + /-- `N₁` is subadditive. -/ + norm1_add_le : ∀ a b, A.norm1 (a + b) ≤ A.norm1 a + A.norm1 b + /-- The modulus at the dyadic scales. -/ + modulus : U → ℕ → ℝ≥0∞ + /-- The `ρ`-th power of the modulus is subadditive. -/ + add_rpow_le : ∀ f g k, modulus (f + g) k ^ ρ ≤ modulus f k ^ ρ + modulus g k ^ ρ + /-- The constant of `ω(f, k) ≤ C₀ N₀(f)`. -/ + C0 : ℝ≥0∞ + /-- The constant `C₀` is finite. -/ + C0_ne_top : C0 ≠ ∞ + /-- `ω(f, k) ≤ C₀ N₀(f)`. -/ + le_norm0 : ∀ f k, modulus f k ≤ C0 * A.norm0 f + /-- The Jackson constant. -/ + CJ : ℝ≥0∞ + /-- The Jackson constant is finite. -/ + CJ_ne_top : CJ ≠ ∞ + /-- The Jackson inequality `E(2^k, f) ≤ C_J ω(f, k)`. -/ + jackson : ∀ f k, A.eFunctional ((2 ^ k : ℕ) : ℝ≥0∞) f ≤ CJ * modulus f k + /-- The constant of the inverse inequality. -/ + CB : ℝ≥0∞ + /-- The constant of the inverse inequality is finite. -/ + CB_ne_top : CB ≠ ∞ + /-- The inverse inequality `ω(a, k) ≤ C_B 2^(-(k-j)θ) N₀(a)` for `N₁(a) ≤ 2^j`. -/ + inverse : ∀ j k a, A.norm1 a ≤ ((2 ^ j : ℕ) : ℝ≥0∞) → + modulus a k ≤ CB * dyadicWeight (-θ) (k - j) * A.norm0 a + +namespace ModulusData + +variable {A : InterpCouple U} {ρ θ : ℝ} + +/-- A modulus compatible with a `ρ`-normed couple from **existence statements** for the Jackson +and the inverse constant: the couple axioms, the modulus with its `ρ`-subadditivity and the bound +`ω(f, k) ≤ C₀ N₀(f)`, a Jackson inequality `E(2^k, f) ≤ C_J ω(f, k)` with some finite `C_J`, and +an inverse inequality `ω(a, k) ≤ C_B 2^(-(k-j)θ) N₀(a)`, `N₁(a) ≤ 2^j`, with some finite `C_B`. +The constants are chosen with `Exists.choose`. -/ +noncomputable def ofExists (rho_pos : 0 < ρ) (norm0_zero : A.norm0 0 = 0) + (norm0_neg : ∀ a, A.norm0 (-a) = A.norm0 a) + (norm0_add_rpow_le : ∀ a b, A.norm0 (a + b) ^ ρ ≤ A.norm0 a ^ ρ + A.norm0 b ^ ρ) + (norm1_zero : A.norm1 0 = 0) (norm1_neg : ∀ a, A.norm1 (-a) = A.norm1 a) + (norm1_add_le : ∀ a b, A.norm1 (a + b) ≤ A.norm1 a + A.norm1 b) (modulus : U → ℕ → ℝ≥0∞) + (add_rpow_le : ∀ f g k, modulus (f + g) k ^ ρ ≤ modulus f k ^ ρ + modulus g k ^ ρ) + (C0 : ℝ≥0∞) (C0_ne_top : C0 ≠ ∞) (le_norm0 : ∀ f k, modulus f k ≤ C0 * A.norm0 f) + (hJ : ∃ CJ : ℝ≥0∞, CJ ≠ ∞ ∧ + ∀ f k, A.eFunctional ((2 ^ k : ℕ) : ℝ≥0∞) f ≤ CJ * modulus f k) + (hB : ∃ CB : ℝ≥0∞, CB ≠ ∞ ∧ ∀ j k a, A.norm1 a ≤ ((2 ^ j : ℕ) : ℝ≥0∞) → + modulus a k ≤ CB * dyadicWeight (-θ) (k - j) * A.norm0 a) : + A.ModulusData ρ θ where + rho_pos := rho_pos + norm0_zero := norm0_zero + norm0_neg := norm0_neg + norm0_add_rpow_le := norm0_add_rpow_le + norm1_zero := norm1_zero + norm1_neg := norm1_neg + norm1_add_le := norm1_add_le + modulus := modulus + add_rpow_le := add_rpow_le + C0 := C0 + C0_ne_top := C0_ne_top + le_norm0 := le_norm0 + CJ := hJ.choose + CJ_ne_top := hJ.choose_spec.1 + jackson := hJ.choose_spec.2 + CB := hB.choose + CB_ne_top := hB.choose_spec.1 + inverse := hB.choose_spec.2 + +variable (M : A.ModulusData ρ θ) + +/-- The **classical quasi-norm** `‖f‖^ω_{s,q} = N₀(f) + ‖(2^(ks) ω(f, k))_k‖_{ℓ_q}`. -/ +noncomputable def modNorm (s : ℝ) (q : ℝ≥0∞) (f : U) : ℝ≥0∞ := + A.norm0 f + lqNorm q (fun k => dyadicWeight s k * M.modulus f k) + +variable {s : ℝ} {q : ℝ≥0∞} + +/-- The modulus of `0` vanishes. -/ +theorem modulus_zero (k : ℕ) : M.modulus 0 k = 0 := + le_antisymm ((M.le_norm0 0 k).trans_eq (by rw [M.norm0_zero, mul_zero])) bot_le + +/-- The `ρ`-th power of the modulus is subadditive on finite sums (Mathlib's +`Finset.le_sum_of_subadditive`). -/ +theorem modulus_sum_rpow_le {ι : Type*} (t : Finset ι) (g : ι → U) (k : ℕ) : + M.modulus (∑ i ∈ t, g i) k ^ ρ ≤ ∑ i ∈ t, M.modulus (g i) k ^ ρ := by + have h0 : M.modulus 0 k ^ ρ = 0 := by + rw [M.modulus_zero, ENNReal.zero_rpow_of_pos M.rho_pos] + exact Finset.le_sum_of_subadditive (fun f => M.modulus f k ^ ρ) h0.le + (fun f g => M.add_rpow_le f g k) t g + +/-- **The inverse inequality in `ρ`-th powers**: `ω(a, k)^ρ ≤ C_B^ρ 2^(-(k-j)θρ) N₀(a)^ρ` for +`N₁(a) ≤ 2^j`. -/ +theorem modulus_rpow_le_of_norm1_le {a : U} {j : ℕ} (ha : A.norm1 a ≤ ((2 ^ j : ℕ) : ℝ≥0∞)) + (k : ℕ) : + M.modulus a k ^ ρ ≤ M.CB ^ ρ * dyadicWeight (-(θ * ρ)) (k - j) * A.norm0 a ^ ρ := by + have hρ := M.rho_pos.le + calc M.modulus a k ^ ρ ≤ (M.CB * dyadicWeight (-θ) (k - j) * A.norm0 a) ^ ρ := + ENNReal.rpow_le_rpow (M.inverse j k a ha) hρ + _ = _ := by + rw [ENNReal.mul_rpow_of_nonneg _ _ hρ, ENNReal.mul_rpow_of_nonneg _ _ hρ, + ENNReal.dyadicWeight_rpow, neg_mul] + +/-- **One block of the telescoping sum**: if `N₁(b_j) ≤ 2^j` and `N₁(b_{j+1}) ≤ 2^(j+1)`, and +`N₀(f - b_i) ≤ e_i` for `i = j, j+1` with `e_{j+1} ≤ e_j`, then `b_{j+1} - b_j` has complexity at +most `2^(j+2)` and `ω(b_{j+1} - b_j, k)^ρ ≤ 2 C_B^ρ 4^(θρ) 2^(-(k-j)θρ) e_j^ρ` for `θ ≥ 0`. -/ +theorem modulus_sub_rpow_le (hθ : 0 ≤ θ) {f b b' : U} {j k : ℕ} {e e' : ℝ≥0∞} + (hb : A.norm1 b ≤ ((2 ^ j : ℕ) : ℝ≥0∞)) (hb' : A.norm1 b' ≤ ((2 ^ (j + 1) : ℕ) : ℝ≥0∞)) + (he : A.norm0 (f - b) ≤ e) (he' : A.norm0 (f - b') ≤ e') (hee : e' ≤ e) : + M.modulus (b' - b) k ^ ρ ≤ + 2 * M.CB ^ ρ * dyadicWeight (θ * ρ) 2 * (dyadicWeight (-(θ * ρ)) (k - j) * e ^ ρ) := by + have hρ := M.rho_pos.le + have h2 : 2 ^ (j + 1) + 2 ^ j ≤ 2 ^ (j + 2) := by + rw [show j + 2 = j + 1 + 1 from rfl, pow_succ 2 (j + 1), pow_succ 2 j] + omega + have hN1 : A.norm1 (b' - b) ≤ ((2 ^ (j + 2) : ℕ) : ℝ≥0∞) := by + refine (norm1_sub_le M.norm1_neg M.norm1_add_le _ _).trans ((add_le_add hb' hb).trans ?_) + exact_mod_cast h2 + have hN0 : A.norm0 (b' - b) ^ ρ ≤ 2 * e ^ ρ := by + calc A.norm0 (b' - b) ^ ρ = A.norm0 ((f - b) - (f - b')) ^ ρ := by + rw [sub_sub_sub_cancel_left] + _ ≤ A.norm0 (f - b) ^ ρ + A.norm0 (f - b') ^ ρ := + norm0_sub_rpow_le M.norm0_neg M.norm0_add_rpow_le _ _ + _ ≤ e ^ ρ + e ^ ρ := + add_le_add (ENNReal.rpow_le_rpow he hρ) (ENNReal.rpow_le_rpow (he'.trans hee) hρ) + _ = 2 * e ^ ρ := (two_mul _).symm + calc M.modulus (b' - b) k ^ ρ + ≤ M.CB ^ ρ * dyadicWeight (-(θ * ρ)) (k - (j + 2)) * A.norm0 (b' - b) ^ ρ := + M.modulus_rpow_le_of_norm1_le hN1 k + _ ≤ M.CB ^ ρ * (dyadicWeight (θ * ρ) 2 * dyadicWeight (-(θ * ρ)) (k - j)) * (2 * e ^ ρ) := by + gcongr + rw [show k - (j + 2) = k - j - 2 by omega] + exact ENNReal.dyadicWeight_neg_sub_two_le (mul_nonneg hθ hρ) (k - j) + _ = _ := by ring + +/-- **The modulus at one scale from near-best elements** (DeVore–Popov, proof of Theorem 4.8): +let `θ ≥ 0`, `b_j ∈ U` with `N₁(b_j) ≤ 2^j`, and `e` decreasing with `N₀(f - b_j) ≤ e_j` and +`N₀(f) ≤ e_0`. The telescoping `f = (f - b_k) + b_0 + ∑_{j b j) k] + abel + have h1 : M.modulus (f - b k) k ^ ρ ≤ M.C0 ^ ρ * e k ^ ρ := + (ENNReal.rpow_le_rpow ((M.le_norm0 _ k).trans (mul_le_mul_right (hb0 k) _)) hρ).trans_eq + (ENNReal.mul_rpow_of_nonneg _ _ hρ) + have h2 : M.modulus (b 0) k ^ ρ ≤ + 2 * M.CB ^ ρ * dyadicWeight (θ * ρ) 2 * (dyadicWeight (-(θ * ρ)) (k - 0) * e 0 ^ ρ) := by + have hn : A.norm0 (b 0) ^ ρ ≤ 2 * e 0 ^ ρ := by + calc A.norm0 (b 0) ^ ρ = A.norm0 (f - (f - b 0)) ^ ρ := by rw [sub_sub_cancel] + _ ≤ A.norm0 f ^ ρ + A.norm0 (f - b 0) ^ ρ := + norm0_sub_rpow_le M.norm0_neg M.norm0_add_rpow_le _ _ + _ ≤ e 0 ^ ρ + e 0 ^ ρ := + add_le_add (ENNReal.rpow_le_rpow hfe hρ) (ENNReal.rpow_le_rpow (hb0 0) hρ) + _ = 2 * e 0 ^ ρ := (two_mul _).symm + calc M.modulus (b 0) k ^ ρ + ≤ M.CB ^ ρ * dyadicWeight (-(θ * ρ)) (k - 0) * A.norm0 (b 0) ^ ρ := + M.modulus_rpow_le_of_norm1_le (hb1 0) k + _ ≤ M.CB ^ ρ * dyadicWeight (-(θ * ρ)) (k - 0) * (2 * e 0 ^ ρ) := by gcongr + _ = 2 * M.CB ^ ρ * 1 * (dyadicWeight (-(θ * ρ)) (k - 0) * e 0 ^ ρ) := by ring + _ ≤ _ := by + gcongr + exact ENNReal.one_le_dyadicWeight (mul_nonneg hθ hρ) 2 + have h3 : ∀ j ∈ range k, M.modulus (b (j + 1) - b j) k ^ ρ ≤ + 2 * M.CB ^ ρ * dyadicWeight (θ * ρ) 2 * (dyadicWeight (-(θ * ρ)) (k - j) * e j ^ ρ) := + fun j _ => M.modulus_sub_rpow_le hθ (hb1 j) (hb1 (j + 1)) (hb0 j) (hb0 (j + 1)) + (he (Nat.le_succ j)) + calc M.modulus f k ^ ρ + = M.modulus ((f - b k) + (b 0 + ∑ j ∈ range k, (b (j + 1) - b j))) k ^ ρ := by + rw [← htel] + _ ≤ M.modulus (f - b k) k ^ ρ + (M.modulus (b 0) k ^ ρ + + ∑ j ∈ range k, M.modulus (b (j + 1) - b j) k ^ ρ) := + (M.add_rpow_le _ _ k).trans (add_le_add le_rfl ((M.add_rpow_le _ _ k).trans + (add_le_add le_rfl (M.modulus_sum_rpow_le _ _ k)))) + _ ≤ M.C0 ^ ρ * e k ^ ρ + (2 * M.CB ^ ρ * dyadicWeight (θ * ρ) 2 * + (dyadicWeight (-(θ * ρ)) (k - 0) * e 0 ^ ρ) + ∑ j ∈ range k, + 2 * M.CB ^ ρ * dyadicWeight (θ * ρ) 2 * + (dyadicWeight (-(θ * ρ)) (k - j) * e j ^ ρ)) := + add_le_add h1 (add_le_add h2 (sum_le_sum h3)) + _ ≤ _ := add_le_add le_rfl (ENNReal.add_sum_range_le_two_mul_sum (fun j => + 2 * M.CB ^ ρ * dyadicWeight (θ * ρ) 2 * (dyadicWeight (-(θ * ρ)) (k - j) * e j ^ ρ)) k) + +/-- **The weighted modulus at one scale**: with `α = (θ - s)ρ` and `x_j = (2^(js) e_j)^ρ`, +`ModulusData.modulus_rpow_le` multiplied by `2^(ksρ)` reads +`(2^(ks) ω(f, k))^ρ ≤ C₀^ρ x_k + 4 C_B^ρ 4^(θρ) 2^(-kα) ∑_{j ≤ k} 2^(jα) x_j`. -/ +theorem dyadicWeight_mul_modulus_rpow_le (hθ : 0 ≤ θ) {f : U} {b : ℕ → U} {e : ℕ → ℝ≥0∞} + (hb1 : ∀ j, A.norm1 (b j) ≤ ((2 ^ j : ℕ) : ℝ≥0∞)) (hb0 : ∀ j, A.norm0 (f - b j) ≤ e j) + (he : Antitone e) (hfe : A.norm0 f ≤ e 0) (k : ℕ) : + (dyadicWeight s k * M.modulus f k) ^ ρ ≤ M.C0 ^ ρ * (dyadicWeight s k * e k) ^ ρ + + 4 * M.CB ^ ρ * dyadicWeight (θ * ρ) 2 * (dyadicWeight (-((θ - s) * ρ)) k * + ∑ j ∈ range (k + 1), dyadicWeight ((θ - s) * ρ) j * (dyadicWeight s j * e j) ^ ρ) := by + have hρ := M.rho_pos.le + have hx : ∀ j, (dyadicWeight s j * e j) ^ ρ = dyadicWeight (s * ρ) j * e j ^ ρ := fun j => by + rw [ENNReal.mul_rpow_of_nonneg _ _ hρ, ENNReal.dyadicWeight_rpow] + have hw : ∀ j ∈ range (k + 1), dyadicWeight (s * ρ) k * dyadicWeight (-(θ * ρ)) (k - j) = + dyadicWeight (-((θ - s) * ρ)) k * dyadicWeight ((θ - s) * ρ) j * dyadicWeight (s * ρ) j := + fun j hj => by + rw [ENNReal.dyadicWeight_mul_dyadicWeight_neg_sub (s * ρ) (θ * ρ) + (Nat.lt_succ_iff.1 (mem_range.1 hj)), mul_assoc, ← ENNReal.dyadicWeight_add] + congr 2 <;> ring + calc (dyadicWeight s k * M.modulus f k) ^ ρ = dyadicWeight (s * ρ) k * M.modulus f k ^ ρ := by + rw [ENNReal.mul_rpow_of_nonneg _ _ hρ, ENNReal.dyadicWeight_rpow] + _ ≤ dyadicWeight (s * ρ) k * (M.C0 ^ ρ * e k ^ ρ + 2 * ∑ j ∈ range (k + 1), + 2 * M.CB ^ ρ * dyadicWeight (θ * ρ) 2 * (dyadicWeight (-(θ * ρ)) (k - j) * e j ^ ρ)) := + mul_le_mul_right (M.modulus_rpow_le hθ hb1 hb0 he hfe k) _ + _ = M.C0 ^ ρ * (dyadicWeight (s * ρ) k * e k ^ ρ) + ∑ j ∈ range (k + 1), + 4 * M.CB ^ ρ * dyadicWeight (θ * ρ) 2 * + (dyadicWeight (s * ρ) k * dyadicWeight (-(θ * ρ)) (k - j) * e j ^ ρ) := by + rw [mul_add, Finset.mul_sum, Finset.mul_sum] + congr 1 + · ring + · exact Finset.sum_congr rfl fun j _ => by ring + _ = _ := by + simp only [hx] + rw [Finset.mul_sum, Finset.mul_sum] + congr 1 + exact Finset.sum_congr rfl fun j hj => by rw [hw j hj]; ring + +/-- **The weighted modulus in `ℓ_r`**: under the hypotheses of `ModulusData.modulus_rpow_le`, +for every exponent `r`, +`‖((2^(ks) ω(f, k))^ρ)_k‖_{ℓ_r} ≤ C_r (C₀^ρ + 4 C_B^ρ 4^(θρ) H) ‖((2^(ks) e_k)^ρ)_k‖_{ℓ_r}`, with +Mathlib's constant `C_r = LpAddConst r` and the constant `H = hardyConst ((θ - s)ρ) r` of +Hardy's inequality (`ENNReal.hardy_sum_le'`). -/ +theorem lqNorm_rpow_le (hθ : 0 ≤ θ) {f : U} {b : ℕ → U} {e : ℕ → ℝ≥0∞} + (hb1 : ∀ j, A.norm1 (b j) ≤ ((2 ^ j : ℕ) : ℝ≥0∞)) (hb0 : ∀ j, A.norm0 (f - b j) ≤ e j) + (he : Antitone e) (hfe : A.norm0 f ≤ e 0) (r : ℝ≥0∞) : + lqNorm r (fun k => (dyadicWeight s k * M.modulus f k) ^ ρ) ≤ + LpAddConst r * (M.C0 ^ ρ + 4 * M.CB ^ ρ * dyadicWeight (θ * ρ) 2 * + hardyConst ((θ - s) * ρ) r) * lqNorm r (fun k => (dyadicWeight s k * e k) ^ ρ) := by + set x : ℕ → ℝ≥0∞ := fun k => (dyadicWeight s k * e k) ^ ρ with hx + set α := (θ - s) * ρ + set K := 4 * M.CB ^ ρ * dyadicWeight (θ * ρ) 2 + have hhardy : lqNorm r (fun k => dyadicWeight (-α) k * + ∑ j ∈ range (k + 1), dyadicWeight α j * x j) ≤ hardyConst α r * lqNorm r x := by + refine (ENNReal.hardy_sum_le' α (fun j => dyadicWeight α j * x j)).trans_eq ?_ + congr 2 + funext k + show dyadicWeight (-α) k * (dyadicWeight α k * x k) = x k + rw [← mul_assoc, ENNReal.dyadicWeight_neg_mul_self, one_mul] + calc lqNorm r (fun k => (dyadicWeight s k * M.modulus f k) ^ ρ) + ≤ lqNorm r (fun k => M.C0 ^ ρ * x k + + K * (dyadicWeight (-α) k * ∑ j ∈ range (k + 1), dyadicWeight α j * x j)) := + ENNReal.lqNorm_mono fun k => M.dyadicWeight_mul_modulus_rpow_le hθ hb1 hb0 he hfe k + _ ≤ LpAddConst r * (M.C0 ^ ρ * lqNorm r x + K * (hardyConst α r * lqNorm r x)) := by + refine (ENNReal.lqNorm_add_le' r _ _).trans ?_ + rw [ENNReal.lqNorm_const_mul, ENNReal.lqNorm_const_mul] + gcongr + _ = _ := by ring + +/-- The constant of the inverse direction, +`1 + (C_r (C₀^ρ + 4 C_B^ρ 4^(θρ) H))^(1/ρ) C_q (1 + γ_{1,q})` with `r = q/ρ`, Mathlib's constants +`C_r = LpAddConst r`, `C_q = LpAddConst q`, the constant `H = hardyConst ((θ - s)ρ) r` of Hardy's +inequality and `γ_{1,q} = dyadicGeomConst 1 q`. -/ +noncomputable def inverseConst (s : ℝ) (q : ℝ≥0∞) : ℝ≥0∞ := + 1 + (LpAddConst (q / ENNReal.ofReal ρ) * (M.C0 ^ ρ + 4 * M.CB ^ ρ * dyadicWeight (θ * ρ) 2 * + hardyConst ((θ - s) * ρ) (q / ENNReal.ofReal ρ))) ^ ρ⁻¹ * + (LpAddConst q * (1 + dyadicGeomConst 1 q)) + +/-- The constant of the inverse direction is finite for `s < θ`. -/ +theorem inverseConst_ne_top (hsθ : s < θ) (q : ℝ≥0∞) : M.inverseConst s q ≠ ∞ := by + have hρ := M.rho_pos + have hα : 0 < (θ - s) * ρ := mul_pos (by linarith) hρ + refine ENNReal.add_ne_top.2 ⟨ENNReal.one_ne_top, ENNReal.mul_ne_top + (ENNReal.rpow_ne_top_of_nonneg (inv_nonneg.2 hρ.le) ?_) ?_⟩ + · refine ENNReal.mul_ne_top (ENNReal.LpAddConst_lt_top _).ne (ENNReal.add_ne_top.2 + ⟨ENNReal.rpow_ne_top_of_nonneg hρ.le M.C0_ne_top, ?_⟩) + exact ENNReal.mul_ne_top (ENNReal.mul_ne_top (ENNReal.mul_ne_top ENNReal.ofNat_ne_top + (ENNReal.rpow_ne_top_of_nonneg hρ.le M.CB_ne_top)) (ENNReal.dyadicWeight_ne_top _ _)) + (ENNReal.hardyConst_ne_top hα _) + · exact ENNReal.mul_ne_top (ENNReal.LpAddConst_lt_top q).ne + (ENNReal.add_ne_top.2 ⟨ENNReal.one_ne_top, ENNReal.dyadicGeomConst_ne_top one_pos q⟩) + +/-- **Jackson's direction**: `N₀(f) + ‖(2^(ks) E(2^k, f))_k‖_{ℓ_q} ≤ max(1, C_J) ‖f‖^ω_{s,q}` +for every `s` and `q`. -/ +theorem eNormDyadic_le_modNorm (f : U) : A.eNormDyadic s q f ≤ max 1 M.CJ * M.modNorm s q f := by + have hL : lqNorm q (fun k : ℕ => dyadicWeight s k * A.eFunctional ((2 ^ k : ℕ) : ℝ≥0∞) f) ≤ + M.CJ * lqNorm q (fun k => dyadicWeight s k * M.modulus f k) := by + rw [← ENNReal.lqNorm_const_mul] + refine ENNReal.lqNorm_mono fun k => ?_ + rw [mul_left_comm] + gcongr + exact M.jackson f k + calc A.eNormDyadic s q f + ≤ A.norm0 f + M.CJ * lqNorm q (fun k => dyadicWeight s k * M.modulus f k) := + add_le_add le_rfl hL + _ ≤ max 1 M.CJ * A.norm0 f + + max 1 M.CJ * lqNorm q (fun k => dyadicWeight s k * M.modulus f k) := by + gcongr + · exact le_mul_of_one_le_left' (le_max_left _ _) + · exact le_max_right _ _ + _ = max 1 M.CJ * M.modNorm s q f := by rw [modNorm, mul_add] + +/-- **The inverse direction**: for `0 ≤ s < θ` and every `q`, +`‖f‖^ω_{s,q} ≤ K (N₀(f) + ‖(2^(ks) E(2^k, f))_k‖_{ℓ_q})` with `K = M.inverseConst s q`. The +near-best elements `b_k` have the tolerances `N₀(f) 2^(-k(s+1))`. -/ +theorem modNorm_le_eNormDyadic (hs : 0 ≤ s) (hsθ : s < θ) (f : U) : + M.modNorm s q f ≤ M.inverseConst s q * A.eNormDyadic s q f := by + have hθ : 0 ≤ θ := hs.trans hsθ.le + have hρ := M.rho_pos + have hone : 1 ≤ M.inverseConst s q := le_self_add + have hfN : A.norm0 f ≤ A.eNormDyadic s q f := le_self_add + rcases eq_or_ne (A.norm0 f) ∞ with hf | hf + · rw [hf, top_le_iff] at hfN + rw [hfN, ENNReal.mul_top (one_pos.trans_le hone).ne'] + exact le_top + rcases eq_or_ne (A.norm0 f) 0 with hf0 | hf0 + · have hω : ∀ k, M.modulus f k = 0 := fun k => + le_antisymm ((M.le_norm0 f k).trans_eq (by rw [hf0, mul_zero])) bot_le + simp [modNorm, hf0, hω] + have hE : ∀ k, A.eFunctional ((2 ^ k : ℕ) : ℝ≥0∞) f ≠ ∞ := fun k => + ne_top_of_le_ne_top hf (eFunctional_le_norm0 M.norm1_zero f) + choose b hb1 hb0 using fun k => exists_norm0_sub_le_eFunctional_add (hE k) + (mul_ne_zero hf0 (ENNReal.dyadicWeight_ne_zero (-(s + 1)) k)) + obtain ⟨e, he_eq⟩ : ∃ e : ℕ → ℝ≥0∞, e = fun k => + A.eFunctional ((2 ^ k : ℕ) : ℝ≥0∞) f + A.norm0 f * dyadicWeight (-(s + 1)) k := ⟨_, rfl⟩ + have hbe : ∀ j, A.norm0 (f - b j) ≤ e j := fun j => by rw [he_eq]; exact hb0 j + have he : Antitone e := by + rw [he_eq] + intro i j hij + exact add_le_add (eFunctional_anti f (Nat.cast_le.2 (Nat.pow_le_pow_right two_pos hij))) + (mul_le_mul_right (ENNReal.dyadicWeight_anti (by linarith) hij) _) + have hfe : A.norm0 f ≤ e 0 := by + rw [he_eq] + exact le_add_left (le_of_eq (by rw [ENNReal.dyadicWeight_zero_right, mul_one])) + have hX : lqNorm q (fun k => dyadicWeight s k * e k) ≤ + LpAddConst q * (1 + dyadicGeomConst 1 q) * A.eNormDyadic s q f := by + rw [he_eq] + exact lqNorm_dyadicWeight_mul_eFunctional_add_le A s q f + have hmain := M.lqNorm_rpow_le (s := s) hθ hb1 hbe he hfe (q / ENNReal.ofReal ρ) + rw [ENNReal.lqNorm_div_fun_rpow hρ, ENNReal.lqNorm_div_fun_rpow hρ] at hmain + set K := LpAddConst (q / ENNReal.ofReal ρ) * (M.C0 ^ ρ + 4 * M.CB ^ ρ * + dyadicWeight (θ * ρ) 2 * hardyConst ((θ - s) * ρ) (q / ENNReal.ofReal ρ)) + set P := LpAddConst q * (1 + dyadicGeomConst 1 q) + set N := A.eNormDyadic s q f + have h2 : lqNorm q (fun k => dyadicWeight s k * M.modulus f k) ≤ K ^ ρ⁻¹ * (P * N) := by + calc lqNorm q (fun k => dyadicWeight s k * M.modulus f k) + = (lqNorm q (fun k => dyadicWeight s k * M.modulus f k) ^ ρ) ^ ρ⁻¹ := + (ENNReal.rpow_rpow_inv hρ.ne' _).symm + _ ≤ (K * (P * N) ^ ρ) ^ ρ⁻¹ := by + refine ENNReal.rpow_le_rpow (hmain.trans ?_) (inv_nonneg.2 hρ.le) + gcongr + _ = K ^ ρ⁻¹ * (P * N) := by + rw [ENNReal.mul_rpow_of_nonneg _ _ (inv_nonneg.2 hρ.le), ENNReal.rpow_rpow_inv hρ.ne'] + calc M.modNorm s q f = A.norm0 f + lqNorm q (fun k => dyadicWeight s k * M.modulus f k) := rfl + _ ≤ N + K ^ ρ⁻¹ * (P * N) := add_le_add hfN h2 + _ = (1 + K ^ ρ⁻¹ * P) * N := by ring + _ = M.inverseConst s q * N := rfl + +/-- For `0 ≤ s < θ` and every `q`, the dyadic norm of the E-method is finite iff the classical +quasi-norm `N₀(f) + ‖(2^(ks) ω(f, k))_k‖_{ℓ_q}` is. -/ +theorem eNormDyadic_lt_top_iff (hs : 0 ≤ s) (hsθ : s < θ) (f : U) : + A.eNormDyadic s q f < ∞ ↔ M.modNorm s q f < ∞ := + ⟨fun h => (M.modNorm_le_eNormDyadic hs hsθ f).trans_lt + (ENNReal.mul_lt_top (M.inverseConst_ne_top hsθ q).lt_top h), + fun h => (M.eNormDyadic_le_modNorm f).trans_lt + (ENNReal.mul_lt_top (max_lt ENNReal.one_lt_top M.CJ_ne_top.lt_top) h)⟩ + +/-- **The coincidence theorem for `ρ`-normed couples**: if every `b` with `N₁(b) < 1` is `0`, +then for `0 < s < θ` and `q ≠ 0`, `f ∈ E_{s,q}` iff the classical quasi-norm +`N₀(f) + ‖(2^(ks) ω(f, k))_k‖_{ℓ_q}` is finite. -/ +theorem memEMethod_iff_modNorm_lt_top (hdisc : ∀ b, A.norm1 b < 1 → b = 0) (hq0 : q ≠ 0) + (hs : 0 < s) (hsθ : s < θ) (f : U) : A.MemEMethod s q f ↔ M.modNorm s q f < ∞ := by + rw [memEMethod_iff_eNormDyadic_lt_top M.norm1_zero hdisc hs.le (Or.inl hs) hq0] + exact M.eNormDyadic_lt_top_iff hs.le hsθ f + +end ModulusData + +end InterpCouple diff --git a/LeanPool/FunctionSpaces/ApproximationSpaces/Interpolation/KFunctional.lean b/LeanPool/FunctionSpaces/ApproximationSpaces/Interpolation/KFunctional.lean new file mode 100644 index 0000000000..bca39576e1 --- /dev/null +++ b/LeanPool/FunctionSpaces/ApproximationSpaces/Interpolation/KFunctional.lean @@ -0,0 +1,187 @@ +/- +Copyright (c) 2026 Mario Ullrich. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Mario Ullrich +-/ +module + +public import LeanPool.FunctionSpaces.ApproximationSpaces.Jackson + +/- +Modified for Lean Pool: module names and imports adapted. +-/ + +/-! +# The Peetre K-functional and real interpolation + +For a bounded linear map `ι : Y → X` (think of `Y` as a space of smooth elements of `X`), the +**K-functional** of `f ∈ X` at `t ≥ 0` is + +`K(t, f) = inf_{y ∈ Y} (‖f - ι y‖_X + t ‖y‖_Y)` (`ApproximationScheme.kFunctional`), + +a measure of how well `f` is approximated by elements of `Y` of controlled size. It is +increasing in `t`, bounded by `‖f‖`, and subadditive in `f`. + +The **real interpolation space** `(X, Y)_{θ,q}`, `0 < θ < 1`, consists of the `f` with + +`‖f‖_{θ,q} = ‖f‖ + ‖(2^(kρθ) K(2^(-kρ), f))_{k ≥ 0}‖_{ℓ_q} < ∞` (`interpNorm`, `MemInterp`). + +The usual definition takes `ρ = 1` and all `k ∈ ℤ`; the terms with `k < 0` (that is `t > 1`) +are controlled by `‖f‖` since `K(t, f) ≤ ‖f‖`, which is why `‖f‖` appears here. A scale +`ρ > 0` of the dyadic grid is allowed because the representation theorem produces the grid +`t = 2^(-kr)`. So `MemInterp` is the **discrete K-method** on the grid `t = 2^(-kρ)`. For +`θ > 0` it gives the same space for every `ρ > 0`, the space of the continuous K-method +`(∫_0^∞ (t^(-θ) K(t, f))^q dt/t)^(1/q)` (`ApproximationScheme.memInterp_iff_memKMethod` in +`ApproximationSpaces.Interpolation.KMethod`). +-/ + +@[expose] public section + +open scoped ENNReal + +namespace ApproximationScheme + +open ENNReal (lqNorm dyadicWeight) + +variable {X Y : Type*} [NormedAddCommGroup X] [NormedSpace ℝ X] + [NormedAddCommGroup Y] [NormedSpace ℝ Y] + +/-- The **Peetre K-functional** `K(t, f) = inf_y (‖f - ι y‖ + t ‖y‖)`. -/ +noncomputable def kFunctional (ι : Y →L[ℝ] X) (t : ℝ≥0∞) (f : X) : ℝ≥0∞ := + ⨅ y : Y, ‖f - ι y‖ₑ + t * ‖y‖ₑ + +variable {ι : Y →L[ℝ] X} {t u : ℝ≥0∞} + +/-- Every `y ∈ Y` bounds the K-functional: `K(t, f) ≤ ‖f - ι y‖ + t ‖y‖`. -/ +theorem kFunctional_le (y : Y) (f : X) : kFunctional ι t f ≤ ‖f - ι y‖ₑ + t * ‖y‖ₑ := + iInf_le (fun y => ‖f - ι y‖ₑ + t * ‖y‖ₑ) y + +/-- `K(t, f) ≤ ‖f‖`, from `y = 0`. -/ +theorem kFunctional_le_enorm (f : X) : kFunctional ι t f ≤ ‖f‖ₑ := by + simpa using kFunctional_le (ι := ι) (t := t) 0 f + +/-- `K(t, 0) = 0`. -/ +@[simp] +theorem kFunctional_zero_right : kFunctional ι t 0 = 0 := + le_antisymm ((kFunctional_le_enorm 0).trans_eq eNorm_zero) bot_le + +/-- The K-functional increases with `t`. -/ +theorem kFunctional_mono (h : t ≤ u) (f : X) : kFunctional ι t f ≤ kFunctional ι u f := + iInf_mono fun y => by gcongr + +/-- The K-functional `t ↦ K(t, f)` is monotone (the `Monotone` form of `kFunctional_mono`). -/ +theorem monotone_kFunctional (f : X) : Monotone fun t => kFunctional ι t f := + fun _ _ h => kFunctional_mono h f + +/-- **Subadditivity**: `K(t, f + g) ≤ K(t, f) + K(t, g)`. -/ +theorem kFunctional_add_le (f g : X) : + kFunctional ι t (f + g) ≤ kFunctional ι t f + kFunctional ι t g := by + refine ENNReal.le_iInf_add_iInf fun y z => ?_ + calc kFunctional ι t (f + g) ≤ ‖f + g - ι (y + z)‖ₑ + t * ‖y + z‖ₑ := kFunctional_le _ _ + _ ≤ (‖f - ι y‖ₑ + ‖g - ι z‖ₑ) + t * (‖y‖ₑ + ‖z‖ₑ) := by + rw [map_add, add_sub_add_comm] + gcongr + · exact eNorm_add_le _ _ + · exact eNorm_add_le _ _ + _ = (‖f - ι y‖ₑ + t * ‖y‖ₑ) + (‖g - ι z‖ₑ + t * ‖z‖ₑ) := by ring + +/-- **Homogeneity**, one inequality: `K(t, c f) ≤ |c| K(t, f)`. -/ +theorem kFunctional_smul_le (c : ℝ) (f : X) : + kFunctional ι t (c • f) ≤ ‖c‖ₑ * kFunctional ι t f := by + rcases eq_or_ne c 0 with rfl | hc + · simp + rw [show ‖c‖ₑ * kFunctional ι t f = ⨅ y, ‖c‖ₑ * (‖f - ι y‖ₑ + t * ‖y‖ₑ) from + ENNReal.mul_iInf_of_ne (eNorm_ne_zero.2 hc) eNorm_ne_top] + refine le_iInf fun y => ?_ + calc kFunctional ι t (c • f) ≤ ‖c • f - ι (c • y)‖ₑ + t * ‖c • y‖ₑ := kFunctional_le _ _ + _ = ‖c‖ₑ * (‖f - ι y‖ₑ + t * ‖y‖ₑ) := by + rw [map_smul, ← smul_sub, eNorm_smul, eNorm_smul]; ring + +/-- **Jackson's inequality controls the errors by the K-functional**: +`E_n(f) ≤ max(1, C) K(n^(-r), f)` for `n ≥ 1`. -/ +theorem approxError_le_kFunctional_of_jackson {A : ApproximationScheme X} {r C : ℝ} + (hJ : JacksonBound ι A r C) (hC : 0 ≤ C) {n : ℕ} (hn : 1 ≤ n) (f : X) : + A.approxError f n ≤ max 1 (ENNReal.ofReal C) * kFunctional ι ((n : ℝ≥0∞) ^ (-r)) f := by + have hM0 : max 1 (ENNReal.ofReal C) ≠ 0 := (zero_lt_one.trans_le (le_max_left _ _)).ne' + have hMt : max 1 (ENNReal.ofReal C) ≠ ∞ := max_ne_top ENNReal.one_ne_top ENNReal.ofReal_ne_top + rw [show max 1 (ENNReal.ofReal C) * kFunctional ι ((n : ℝ≥0∞) ^ (-r)) f = + ⨅ y, max 1 (ENNReal.ofReal C) * (‖f - ι y‖ₑ + (n : ℝ≥0∞) ^ (-r) * ‖y‖ₑ) from + ENNReal.mul_iInf_of_ne hM0 hMt] + refine le_iInf fun y => ?_ + have h1 : A.approxError f n ≤ ‖f - ι y‖ₑ + A.approxError (ι y) n := by + rw [add_comm]; exact approxError_le_approxError_add_enorm n f (ι y) + calc A.approxError f n ≤ ‖f - ι y‖ₑ + ENNReal.ofReal C * (n : ℝ≥0∞) ^ (-r) * ‖y‖ₑ := + h1.trans (by gcongr; exact hJ.approxError_le hC hn y) + _ ≤ max 1 (ENNReal.ofReal C) * ‖f - ι y‖ₑ + + max 1 (ENNReal.ofReal C) * ((n : ℝ≥0∞) ^ (-r) * ‖y‖ₑ) := by + rw [mul_assoc] + gcongr + · exact le_mul_of_one_le_left' (le_max_left _ _) + · exact le_max_right _ _ + _ = _ := by rw [mul_add] + +variable (ι) in +/-- The dyadic sequence of the interpolation norm, `2^(kρθ) K(2^(-kρ), f)`. -/ +noncomputable def interpSeq (θ ρ : ℝ) (f : X) (k : ℕ) : ℝ≥0∞ := + dyadicWeight (ρ * θ) k * kFunctional ι (dyadicWeight (-ρ) k) f + +variable (ι) in +/-- The norm of the **real interpolation space** `(X, Y)_{θ,q}` on the dyadic grid +`t = 2^(-kρ)`: `‖f‖ + ‖(2^(kρθ) K(2^(-kρ), f))_k‖_{ℓ_q}`. -/ +noncomputable def interpNorm (θ ρ : ℝ) (q : ℝ≥0∞) (f : X) : ℝ≥0∞ := + ‖f‖ₑ + lqNorm q (interpSeq ι θ ρ f) + +variable (ι) in +/-- `f` belongs to the **real interpolation space** `(X, Y)_{θ,q}` of the discrete K-method on +the grid `t = 2^(-kρ)`: `‖f‖ + ‖(2^(kρθ) K(2^(-kρ), f))_k‖_{ℓ_q} < ∞`. -/ +def MemInterp (θ ρ : ℝ) (q : ℝ≥0∞) (f : X) : Prop := interpNorm ι θ ρ q f < ∞ + +variable {θ ρ : ℝ} {q : ℝ≥0∞} + +/-- **The triangle inequality** for the interpolation norm. -/ +theorem interpNorm_add_le (hq : 1 ≤ q) (f g : X) : + interpNorm ι θ ρ q (f + g) ≤ interpNorm ι θ ρ q f + interpNorm ι θ ρ q g := by + have hseq : lqNorm q (interpSeq ι θ ρ (f + g)) ≤ + lqNorm q (interpSeq ι θ ρ f) + lqNorm q (interpSeq ι θ ρ g) := by + calc lqNorm q (interpSeq ι θ ρ (f + g)) + ≤ lqNorm q (fun k => interpSeq ι θ ρ f k + interpSeq ι θ ρ g k) := + ENNReal.lqNorm_mono fun k => by + rw [interpSeq, interpSeq, interpSeq, ← mul_add] + gcongr + exact kFunctional_add_le f g + _ ≤ _ := ENNReal.lqNorm_add_le hq _ _ + calc interpNorm ι θ ρ q (f + g) ≤ (‖f‖ₑ + ‖g‖ₑ) + + (lqNorm q (interpSeq ι θ ρ f) + lqNorm q (interpSeq ι θ ρ g)) := + add_le_add (eNorm_add_le f g) hseq + _ = _ := by rw [interpNorm, interpNorm]; ring + +/-- The interpolation norm is homogeneous: `‖c f‖_{θ,q} ≤ |c| ‖f‖_{θ,q}`. -/ +theorem interpNorm_smul_le (c : ℝ) (f : X) : + interpNorm ι θ ρ q (c • f) ≤ ‖c‖ₑ * interpNorm ι θ ρ q f := by + rw [interpNorm, interpNorm, mul_add, eNorm_smul, ← ENNReal.lqNorm_const_mul] + gcongr + refine ENNReal.lqNorm_mono fun k => ?_ + rw [interpSeq, interpSeq, mul_left_comm] + gcongr + exact kFunctional_smul_le c f + +/-- `‖f‖ ≤ ‖f‖_{θ,q}`. -/ +theorem enorm_le_interpNorm (f : X) : ‖f‖ₑ ≤ interpNorm ι θ ρ q f := le_self_add + +variable (ι) in +/-- The **real interpolation space** `(X, Y)_{θ,q}` as a real subspace of `X`. -/ +def interpSpace (θ ρ : ℝ) (q : ℝ≥0∞) (hq : 1 ≤ q) : Submodule ℝ X where + carrier := {f | MemInterp ι θ ρ q f} + zero_mem' := by + change interpNorm ι θ ρ q 0 < ∞ + have : interpSeq ι θ ρ (0 : X) = fun _ => 0 := by funext k; simp [interpSeq] + simp [interpNorm, this] + add_mem' hf hg := (interpNorm_add_le hq _ _).trans_lt (ENNReal.add_lt_top.2 ⟨hf, hg⟩) + smul_mem' c _ hf := (interpNorm_smul_le c _).trans_lt (ENNReal.mul_lt_top eNorm_lt_top hf) + +/-- Membership in the interpolation space as a submodule. -/ +@[simp] +theorem mem_interpSpace {hq : 1 ≤ q} {f : X} : + f ∈ interpSpace ι θ ρ q hq ↔ MemInterp ι θ ρ q f := Iff.rfl + +end ApproximationScheme diff --git a/LeanPool/FunctionSpaces/ApproximationSpaces/Interpolation/KMethod.lean b/LeanPool/FunctionSpaces/ApproximationSpaces/Interpolation/KMethod.lean new file mode 100644 index 0000000000..dcf75d6fdf --- /dev/null +++ b/LeanPool/FunctionSpaces/ApproximationSpaces/Interpolation/KMethod.lean @@ -0,0 +1,706 @@ +/- +Copyright (c) 2026 Mario Ullrich. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Mario Ullrich +-/ +module + +public import LeanPool.FunctionSpaces.ApproximationSpaces.Interpolation.Representation +public import Mathlib.Analysis.SpecialFunctions.Integrals.Basic +public import Mathlib.Order.SuccPred.IntervalSucc + +/- +Modified for Lean Pool: module names and imports adapted. +-/ + +/-! +# The discrete and the continuous K-method + +For a bounded linear map `ι : Y → X`, `0 < θ` and `0 < q ≤ ∞`, the **continuous K-method** +measures `f ∈ X` by + +`‖f‖_{K,θ,q} = (∫_0^∞ (t^(-θ) K(t, f))^q dt/t)^(1/q)` (`ApproximationScheme.kMethodNorm`), + +the essential supremum of `t^(-θ) K(t, f)` for `q = ∞`, and `(X, Y)_{θ,q}` is the space of the +`f` with `‖f‖_{K,θ,q} < ∞` (`ApproximationScheme.MemKMethod`), as in Bergh–Löfström, +Section 3.1. The main theorem (`ApproximationScheme.memInterp_iff_memKMethod`, Bergh–Löfström, +Lemma 3.1.3) says that the discrete K-method on every dyadic grid `t = 2^(-kρ)`, `ρ > 0`, gives +the same space, with equivalent norms and explicit constants +(`ApproximationScheme.kMethodNorm_le_interpNorm`, `ApproximationScheme.interpNorm_le_kMethodNorm`). +Hence the grid does not matter, and the representation theorem reads `A^s_q = (X, Y)_{s/r,q}` +for the continuous K-method (`ApproximationScheme.memApprox_iff_memKMethod`). + +The proof passes through the grid `t = 2^(nρ)`, `n ∈ ℤ`, for every increasing +`φ : [0, ∞] → [0, ∞]` in place of `K(·, f)` (`ApproximationScheme.discretePhiSeq`). On the +piece `[2^(nρ), 2^((n+1)ρ))`, whose measure for `dt/t` is `ρ log 2`, the integrand `t^(-θ) φ(t)` +lies between `2^(-ρθ)` times the `n`-th and `2^(ρθ)` times the `(n+1)`-th term of the sequence +`(2^(-nρθ) φ(2^(nρ)))_n`; the general comparison of an `L_q` norm with step functions on disjoint +pieces of equal measure is `MeasureTheory.eLpNorm_le_of_le_on_pieces` and +`MeasureTheory.le_eLpNorm_of_le_on_pieces`. For `φ = K(·, f)`, the terms with `n ≤ 0` are the +sequence of `ApproximationScheme.interpNorm`, the term with `n = k + 1 > 0` is at most +`2^(-kρθ) ‖f‖`, and `‖f‖ ≤ max(1, ‖ι‖) K(1, f)`; the comparison of the two grids holds for every +`φ`, with an upper bound `M` of `φ` in place of `‖f‖` +(`ApproximationScheme.lqNorm_le_lqNorm_discretePhiSeq`, +`ApproximationScheme.lqNorm_discretePhiSeq_le`). Under a change of scale, +`K(c t, f) ≤ max(1, c) K(t, f)` (`ApproximationScheme.kFunctional_mul_le`), and `‖f‖ ≤ K(t, f)` +for `t ≥ ‖ι‖` (`ApproximationScheme.enorm_le_kFunctional`). + +The functional `ApproximationScheme.phiFunctional` is the formula of `EQuasinorm.phiFunctional` +in the project *MultilinearInterpolation* (Bonn; van Doorn, Portegies, Rothgang, Viana Reis; +Apache 2.0). That project states the equivalence `discreteKMethod_equiv_kmethod` +(Bergh–Löfström, Lemma 3.1.3) for general couples of quasi-normed spaces on the grid `2^n`, +`n ∈ ℤ`. For `ρ = 1` and `θ ≥ 0`, the comparison of `phiFunctional` with its discrete version +for increasing `φ` (`ApproximationScheme.phiFunctional_le_lqNorm_discretePhiSeq`, +`ApproximationScheme.lqNorm_discretePhiSeq_le_phiFunctional`) gives the two inequalities of that +equivalence for every couple whose K-functional is increasing in `t`. This file applies it to +the couple given by a bounded linear map `ι`; `memInterp_iff_memKMethod` is its form with the +grid on `ℕ` and the term `‖f‖`. +-/ + +@[expose] public section + +open MeasureTheory Set Function +open scoped ENNReal + +namespace ApproximationScheme + +open ENNReal (lqNorm dyadicWeight LpAddConst dyadicGeomConst) + +variable {X Y : Type*} [NormedAddCommGroup X] [NormedSpace ℝ X] + [NormedAddCommGroup Y] [NormedSpace ℝ Y] {ι : Y →L[ℝ] X} + +/-! ### The K-functional across scales -/ + +/-- **The K-functional under a finite change of scale**: `K(c t, f) ≤ max(1, c) K(t, f)` for +`c < ∞`, since `‖f - ι y‖ + c t ‖y‖ ≤ max(1, c) (‖f - ι y‖ + t ‖y‖)` for every `y`. -/ +theorem kFunctional_mul_le_of_ne_top {c : ℝ≥0∞} (hc : c ≠ ∞) (t : ℝ≥0∞) (f : X) : + kFunctional ι (c * t) f ≤ max 1 c * kFunctional ι t f := by + have hM0 : max 1 c ≠ 0 := (zero_lt_one.trans_le (le_max_left _ _)).ne' + have hMt : max 1 c ≠ ∞ := max_ne_top ENNReal.one_ne_top hc + rw [kFunctional, kFunctional, ENNReal.mul_iInf_of_ne hM0 hMt] + refine iInf_mono fun y => ?_ + rw [mul_add, mul_assoc c] + gcongr + · exact le_mul_of_one_le_left' (le_max_left _ _) + · exact le_max_right _ _ + +/-- **The K-functional at large scales bounds the norm**: `‖f‖ ≤ K(t, f)` for `t ≥ ‖ι‖`, since +`‖f‖ ≤ ‖f - ι y‖ + ‖ι‖ ‖y‖`. -/ +theorem enorm_le_kFunctional {t : ℝ≥0∞} (ht : ‖ι‖ₑ ≤ t) (f : X) : ‖f‖ₑ ≤ kFunctional ι t f := + le_iInf fun y => calc + ‖f‖ₑ = ‖(f - ι y) + ι y‖ₑ := by rw [sub_add_cancel] + _ ≤ ‖f - ι y‖ₑ + ‖ι y‖ₑ := eNorm_add_le _ _ + _ ≤ ‖f - ι y‖ₑ + t * ‖y‖ₑ := by + gcongr + exact (ι.le_opENorm y).trans (by gcongr) + +/-- **The norm by the K-functional at scale one**: `‖f‖ ≤ max(1, ‖ι‖) K(1, f)`. -/ +theorem enorm_le_max_mul_kFunctional_one (f : X) : ‖f‖ₑ ≤ max 1 ‖ι‖ₑ * kFunctional ι 1 f := by + have h := kFunctional_mul_le_of_ne_top (ι := ι) (eNorm_ne_top : ‖ι‖ₑ ≠ ∞) 1 f + rw [mul_one] at h + exact (enorm_le_kFunctional le_rfl f).trans h + +/-- **The K-functional vanishes only at `0`**: if `K(t, f) = 0` for some `t > 0`, then `f = 0`. +With `s = min(t, 1)`, `‖f‖ ≤ K(‖ι‖, f) ≤ max(1, ‖ι‖/s) K(s, f) ≤ max(1, ‖ι‖/s) K(t, f)`. -/ +theorem eq_zero_of_kFunctional_eq_zero {t : ℝ≥0∞} (ht : t ≠ 0) {f : X} + (h : kFunctional ι t f = 0) : f = 0 := by + have hs0 : min t 1 ≠ 0 := (lt_min (pos_iff_ne_zero.2 ht) zero_lt_one).ne' + have hsT : min t 1 ≠ ∞ := (min_le_right t 1).trans_lt ENNReal.one_lt_top |>.ne + have hc : ‖ι‖ₑ / min t 1 ≠ ∞ := ENNReal.div_ne_top eNorm_ne_top hs0 + have hf : ‖f‖ₑ ≤ 0 := calc + ‖f‖ₑ ≤ kFunctional ι (‖ι‖ₑ / min t 1 * min t 1) f := + enorm_le_kFunctional (ENNReal.div_mul_cancel hs0 hsT).ge f + _ ≤ max 1 (‖ι‖ₑ / min t 1) * kFunctional ι (min t 1) f := + kFunctional_mul_le_of_ne_top hc _ f + _ ≤ max 1 (‖ι‖ₑ / min t 1) * kFunctional ι t f := by + gcongr + exact kFunctional_mono (min_le_left t 1) f + _ = 0 := by rw [h, mul_zero] + exact eNorm_eq_zero.1 (nonpos_iff_eq_zero.1 hf) + +/-- **The K-functional under a change of scale**: `K(c t, f) ≤ max(1, c) K(t, f)` for every +`c, t ∈ [0, ∞]`. For `c = ∞` and `t > 0` the right side is `∞` unless `K(t, f) = 0`, and then +`f = 0`. -/ +theorem kFunctional_mul_le (c t : ℝ≥0∞) (f : X) : + kFunctional ι (c * t) f ≤ max 1 c * kFunctional ι t f := by + rcases ne_or_eq c ∞ with hc | rfl + · exact kFunctional_mul_le_of_ne_top hc t f + rcases eq_or_ne t 0 with rfl | ht + · rw [mul_zero] + exact le_mul_of_one_le_left' (le_max_left _ _) + rcases eq_or_ne (kFunctional ι t f) 0 with h | h + · rw [eq_zero_of_kFunctional_eq_zero ht h, kFunctional_zero_right] + exact zero_le + · rw [max_eq_right le_top, ENNReal.top_mul h] + exact le_top + +/-! ### The continuous K-method -/ + +/-- The measure `dt/t` on `(0, ∞)`, as a measure on `ℝ`: Lebesgue measure with density `1/t`, +restricted to `t > 0`. -/ +noncomputable def kMethodMeasure : Measure ℝ := + (volume.withDensity (·.toNNReal⁻¹)).restrict (Ioi 0) + +/-- The functional `Φ_{θ,q}(φ) = (∫_0^∞ (t^(-θ) φ(t))^q dt/t)^(1/q)` of a function +`φ : [0, ∞] → [0, ∞]` (the essential supremum of `t^(-θ) φ(t)` for `q = ∞`). The formula is +that of `EQuasinorm.phiFunctional` in the project *MultilinearInterpolation* (Bonn, Apache 2.0). -/ +noncomputable def phiFunctional (θ : ℝ) (q : ℝ≥0∞) (φ : ℝ≥0∞ → ℝ≥0∞) : ℝ≥0∞ := + eLpNorm (fun (t : ℝ) ↦ t.toNNReal ^ (-θ) * φ t.toNNReal) q + (volume.withDensity (·.toNNReal⁻¹) |>.restrict (Ioi 0)) + +/-- The integrand `t ↦ t^(-θ) φ(t)` of `Φ_{θ,q}(φ)`, for `t : ℝ`. -/ +noncomputable def phiIntegrand (θ : ℝ) (φ : ℝ≥0∞ → ℝ≥0∞) (t : ℝ) : ℝ≥0∞ := + ENNReal.ofReal t ^ (-θ) * φ (ENNReal.ofReal t) + +variable {θ ρ : ℝ} {q : ℝ≥0∞} {φ : ℝ≥0∞ → ℝ≥0∞} + +/-- `Φ_{θ,q}(φ)` is the `L_q(dt/t)` norm of `t ↦ t^(-θ) φ(t)`. -/ +theorem phiFunctional_eq (φ : ℝ≥0∞ → ℝ≥0∞) : + phiFunctional θ q φ = eLpNorm (phiIntegrand θ φ) q kMethodMeasure := rfl + +/-- For a measurable `φ`, the integrand `t ↦ t^(-θ) φ(t)` is measurable. -/ +theorem measurable_phiIntegrand_of_measurable (hφ : Measurable φ) : + Measurable (phiIntegrand θ φ) := + (ENNReal.measurable_ofReal.pow_const _).mul (hφ.comp ENNReal.measurable_ofReal) + +/-- For an increasing `φ`, the integrand `t ↦ t^(-θ) φ(t)` is measurable. -/ +theorem measurable_phiIntegrand (hφ : Monotone φ) : Measurable (phiIntegrand θ φ) := + measurable_phiIntegrand_of_measurable hφ.measurable + +/-- `Φ_{θ,q}(φ)` depends only on the values of `φ` on `(0, ∞)`: if `φ t = ψ t` for every +`t ≠ 0, ∞`, then `Φ_{θ,q}(φ) = Φ_{θ,q}(ψ)`. -/ +theorem phiFunctional_congr {ψ : ℝ≥0∞ → ℝ≥0∞} (h : ∀ t, t ≠ 0 → t ≠ ∞ → φ t = ψ t) : + phiFunctional θ q φ = phiFunctional θ q ψ := by + rw [phiFunctional_eq, phiFunctional_eq, kMethodMeasure] + refine eLpNorm_congr_ae ((ae_restrict_iff' measurableSet_Ioi).2 + (Filter.Eventually.of_forall fun t ht => ?_)) + rw [phiIntegrand, phiIntegrand, h _ (ENNReal.ofReal_pos.2 ht).ne' ENNReal.ofReal_ne_top] + +variable (ι) in +/-- The norm of the **continuous K-method**, `‖f‖_{K,θ,q} = Φ_{θ,q}(K(·, f))`, that is +`(∫_0^∞ (t^(-θ) K(t, f))^q dt/t)^(1/q)` for `0 < q < ∞`, the essential supremum of +`t^(-θ) K(t, f)` for `q = ∞`, and `0` for `q = 0` (Bergh–Löfström, Section 3.1). -/ +noncomputable def kMethodNorm (θ : ℝ) (q : ℝ≥0∞) (f : X) : ℝ≥0∞ := + phiFunctional θ q fun t => kFunctional ι t f + +variable (ι) in +/-- `f` belongs to the **real interpolation space** `(X, Y)_{θ,q}` of the continuous +K-method: `‖f‖_{K,θ,q} < ∞`. -/ +def MemKMethod (θ : ℝ) (q : ℝ≥0∞) (f : X) : Prop := kMethodNorm ι θ q f < ∞ + +variable (ι) in +/-- The integrand `t ↦ t^(-θ) K(t, f)` of the continuous K-method, for `t : ℝ`. -/ +noncomputable def kMethodIntegrand (θ : ℝ) (f : X) (t : ℝ) : ℝ≥0∞ := + ENNReal.ofReal t ^ (-θ) * kFunctional ι (ENNReal.ofReal t) f + +/-- The continuous K-norm is the `L_q(dt/t)` norm of `t ↦ t^(-θ) K(t, f)`. -/ +theorem kMethodNorm_eq (f : X) : + kMethodNorm ι θ q f = eLpNorm (kMethodIntegrand ι θ f) q kMethodMeasure := rfl + +/-- The integrand of the continuous K-method is measurable (`K(·, f)` is monotone). -/ +theorem measurable_kMethodIntegrand (f : X) : Measurable (kMethodIntegrand ι θ f) := + measurable_phiIntegrand (monotone_kFunctional f) + +/-! ### The dyadic pieces of `(0, ∞)` -/ + +/-- The dyadic piece `[2^(nρ), 2^((n+1)ρ))` of `(0, ∞)`. -/ +noncomputable def dyadicPiece (ρ : ℝ) (n : ℤ) : Set ℝ := + Ico ((2 : ℝ) ^ ((n : ℝ) * ρ)) ((2 : ℝ) ^ (((n + 1 : ℤ) : ℝ) * ρ)) + +/-- The dyadic pieces are measurable. -/ +theorem measurableSet_dyadicPiece (ρ : ℝ) (n : ℤ) : MeasurableSet (dyadicPiece ρ n) := + measurableSet_Ico + +/-- The dyadic pieces lie in `(0, ∞)`. -/ +theorem dyadicPiece_subset_Ioi (ρ : ℝ) (n : ℤ) : dyadicPiece ρ n ⊆ Ioi 0 := + fun _ ht => lt_of_lt_of_le (Real.rpow_pos_of_pos two_pos _) ht.1 + +/-- A point `t` of the dyadic piece `[2^(nρ), 2^((n+1)ρ))` satisfies +`2^(nρ) ≤ t ≤ 2^((n+1)ρ)` as an element of `[0, ∞]`. -/ +theorem ofReal_mem_Icc_of_mem_dyadicPiece {n : ℤ} {t : ℝ} (ht : t ∈ dyadicPiece ρ n) : + ENNReal.ofReal t ∈ + Icc ((2 : ℝ≥0∞) ^ ((n : ℝ) * ρ)) ((2 : ℝ≥0∞) ^ (((n + 1 : ℤ) : ℝ) * ρ)) := by + rw [← ENNReal.ofReal_two_rpow, ← ENNReal.ofReal_two_rpow] + exact ⟨ENNReal.ofReal_le_ofReal ht.1, ENNReal.ofReal_le_ofReal ht.2.le⟩ + +/-- The dyadic pieces are pairwise disjoint for `ρ ≥ 0`. -/ +theorem pairwise_disjoint_dyadicPiece (hρ : 0 ≤ ρ) : Pairwise (Disjoint on dyadicPiece ρ) := by + have hmono : Monotone fun n : ℤ => (2 : ℝ) ^ ((n : ℝ) * ρ) := fun m n h => + Real.rpow_le_rpow_of_exponent_le one_le_two + (mul_le_mul_of_nonneg_right (Int.cast_le.2 h) hρ) + have h := Monotone.pairwise_disjoint_on_Ico_succ hmono + simp only [Order.succ_eq_add_one] at h + exact h + +/-- For `ρ > 0` the dyadic pieces cover `(0, ∞)`. -/ +theorem exists_mem_dyadicPiece (hρ : 0 < ρ) {t : ℝ} (ht : 0 < t) : + ∃ n, t ∈ dyadicPiece ρ n := by + obtain ⟨n, hn⟩ := exists_mem_Ico_zpow ht (Real.one_lt_rpow one_lt_two hρ) + have h : ∀ m : ℤ, ((2 : ℝ) ^ ρ) ^ m = (2 : ℝ) ^ ((m : ℝ) * ρ) := fun m => by + rw [← Real.rpow_intCast, ← Real.rpow_mul zero_le_two, mul_comm] + rw [h, h] at hn + exact ⟨n, hn⟩ + +/-- For `ρ > 0`, almost every point for `dt/t` lies in a dyadic piece. -/ +theorem ae_mem_iUnion_dyadicPiece (hρ : 0 < ρ) : + ∀ᵐ t ∂kMethodMeasure, t ∈ ⋃ n, dyadicPiece ρ n := by + rw [kMethodMeasure] + exact (ae_restrict_iff' measurableSet_Ioi).2 + (Filter.Eventually.of_forall fun t ht => mem_iUnion.2 (exists_mem_dyadicPiece hρ ht)) + +/-- **The measure `dt/t` of a dyadic piece** is `log 2^ρ = ρ log 2`, for `ρ ≥ 0`. -/ +theorem kMethodMeasure_dyadicPiece (hρ : 0 ≤ ρ) (n : ℤ) : + kMethodMeasure (dyadicPiece ρ n) = ENNReal.ofReal (ρ * Real.log 2) := by + have ha : 0 < (2 : ℝ) ^ ((n : ℝ) * ρ) := Real.rpow_pos_of_pos two_pos _ + have hb : 0 < (2 : ℝ) ^ (((n + 1 : ℤ) : ℝ) * ρ) := Real.rpow_pos_of_pos two_pos _ + have hab : (2 : ℝ) ^ ((n : ℝ) * ρ) ≤ (2 : ℝ) ^ (((n + 1 : ℤ) : ℝ) * ρ) := + Real.rpow_le_rpow_of_exponent_le one_le_two (by push_cast; nlinarith) + have hint : IntegrableOn (fun t : ℝ => t⁻¹) (dyadicPiece ρ n) := by + refine (ContinuousOn.integrableOn_Icc ?_).mono_set Ico_subset_Icc_self + exact continuousOn_inv₀.mono fun t ht => (ha.trans_le ht.1).ne' + have hnn : 0 ≤ᵐ[volume.restrict (dyadicPiece ρ n)] fun t : ℝ => t⁻¹ := + (ae_restrict_iff' measurableSet_Ico).2 + (Filter.Eventually.of_forall fun t ht => inv_nonneg.2 (ha.le.trans ht.1)) + rw [kMethodMeasure, Measure.restrict_apply (measurableSet_dyadicPiece ρ n), + inter_eq_left.2 (dyadicPiece_subset_Ioi ρ n), + withDensity_apply _ (measurableSet_dyadicPiece ρ n)] + calc ∫⁻ t in dyadicPiece ρ n, ((t.toNNReal : ℝ≥0∞))⁻¹ + = ∫⁻ t in dyadicPiece ρ n, ENNReal.ofReal t⁻¹ := + setLIntegral_congr_fun (measurableSet_dyadicPiece ρ n) fun t ht => + (ENNReal.ofReal_inv_of_pos (ha.trans_le ht.1)).symm + _ = ENNReal.ofReal (∫ t in dyadicPiece ρ n, t⁻¹) := + (ofReal_integral_eq_lintegral_ofReal hint hnn).symm + _ = ENNReal.ofReal (ρ * Real.log 2) := by + rw [dyadicPiece, integral_Ico_eq_integral_Ioc, ← intervalIntegral.integral_of_le hab, + integral_inv_of_pos ha hb, ← Real.rpow_sub two_pos, Real.log_rpow two_pos] + congr 2 + push_cast + ring + +/-- The measure `ρ log 2` of a dyadic piece is nonzero for `ρ > 0`. -/ +theorem ofReal_mul_log_two_ne_zero (hρ : 0 < ρ) : ENNReal.ofReal (ρ * Real.log 2) ≠ 0 := + (ENNReal.ofReal_pos.2 (mul_pos hρ (Real.log_pos one_lt_two))).ne' + +/-! ### The discrete functional on the grid `2^(nρ)`, `n ∈ ℤ` -/ + +/-- The sequence `(2^(-nρθ) φ(2^(nρ)))_{n ∈ ℤ}`: the function `φ` sampled on the grid +`t = 2^(nρ)` with the weight `t^(-θ)`. For `ρ = 1` its `ℓ_q` norm is the formula of +`EQuasinorm.discretePhiFunctional θ q (n ↦ φ(2^n))` in the project *MultilinearInterpolation*. -/ +noncomputable def discretePhiSeq (θ ρ : ℝ) (φ : ℝ≥0∞ → ℝ≥0∞) (n : ℤ) : ℝ≥0∞ := + (2 : ℝ≥0∞) ^ (-((n : ℝ) * ρ * θ)) * φ ((2 : ℝ≥0∞) ^ ((n : ℝ) * ρ)) + +/-- **Upper bound on a piece**: for an increasing `φ`, `θ ≥ 0` and +`t ∈ [2^(nρ), 2^((n+1)ρ))`, `t^(-θ) φ(t) ≤ 2^(ρθ) · 2^(-(n+1)ρθ) φ(2^((n+1)ρ))`. -/ +theorem phiIntegrand_le_discretePhiSeq (hφ : Monotone φ) (hθ : 0 ≤ θ) {n : ℤ} {t : ℝ} + (ht : t ∈ dyadicPiece ρ n) : + phiIntegrand θ φ t ≤ 2 ^ (ρ * θ) * discretePhiSeq θ ρ φ (n + 1) := by + have h := ofReal_mem_Icc_of_mem_dyadicPiece ht + have hw : ((2 : ℝ≥0∞) ^ ((n : ℝ) * ρ)) ^ (-θ) = + 2 ^ (ρ * θ) * 2 ^ (-(((n + 1 : ℤ) : ℝ) * ρ * θ)) := by + rw [← ENNReal.rpow_mul, ← ENNReal.rpow_add _ _ two_ne_zero ENNReal.ofNat_ne_top] + congr 1 + push_cast + ring + calc phiIntegrand θ φ t + ≤ ((2 : ℝ≥0∞) ^ ((n : ℝ) * ρ)) ^ (-θ) * φ ((2 : ℝ≥0∞) ^ (((n + 1 : ℤ) : ℝ) * ρ)) := + mul_le_mul' (ENNReal.rpow_le_rpow_of_nonpos h.1 (neg_nonpos.2 hθ)) (hφ h.2) + _ = 2 ^ (ρ * θ) * discretePhiSeq θ ρ φ (n + 1) := by + rw [hw, discretePhiSeq, mul_assoc] + +/-- **Lower bound on a piece**: for an increasing `φ`, `θ ≥ 0` and +`t ∈ [2^(nρ), 2^((n+1)ρ))`, `2^(-ρθ) · 2^(-nρθ) φ(2^(nρ)) ≤ t^(-θ) φ(t)`. -/ +theorem discretePhiSeq_le_phiIntegrand (hφ : Monotone φ) (hθ : 0 ≤ θ) {n : ℤ} {t : ℝ} + (ht : t ∈ dyadicPiece ρ n) : + 2 ^ (-(ρ * θ)) * discretePhiSeq θ ρ φ n ≤ phiIntegrand θ φ t := by + have h := ofReal_mem_Icc_of_mem_dyadicPiece ht + have hw : 2 ^ (-(ρ * θ)) * (2 : ℝ≥0∞) ^ (-((n : ℝ) * ρ * θ)) = + ((2 : ℝ≥0∞) ^ (((n + 1 : ℤ) : ℝ) * ρ)) ^ (-θ) := by + rw [← ENNReal.rpow_mul, ← ENNReal.rpow_add _ _ two_ne_zero ENNReal.ofNat_ne_top] + congr 1 + push_cast + ring + calc 2 ^ (-(ρ * θ)) * discretePhiSeq θ ρ φ n + = ((2 : ℝ≥0∞) ^ (((n + 1 : ℤ) : ℝ) * ρ)) ^ (-θ) * φ ((2 : ℝ≥0∞) ^ ((n : ℝ) * ρ)) := by + rw [discretePhiSeq, ← mul_assoc, hw] + _ ≤ phiIntegrand θ φ t := + mul_le_mul' (ENNReal.rpow_le_rpow_of_nonpos h.2 (neg_nonpos.2 hθ)) (hφ h.1) + +/-- **The functional `Φ_{θ,q}` by its discrete version**: for an increasing `φ`, `θ ≥ 0` and +`ρ > 0`, `Φ_{θ,q}(φ) ≤ (ρ log 2)^(1/q) 2^(ρθ) ‖(2^(-nρθ) φ(2^(nρ)))_{n ∈ ℤ}‖_{ℓ_q}`. -/ +theorem phiFunctional_le_lqNorm_discretePhiSeq (hφ : Monotone φ) (hθ : 0 ≤ θ) (hρ : 0 < ρ) : + phiFunctional θ q φ ≤ ENNReal.ofReal (ρ * Real.log 2) ^ (1 / q.toReal) * + (2 ^ (ρ * θ) * lqNorm q (discretePhiSeq θ ρ φ)) := by + rw [phiFunctional_eq, ← ENNReal.lqNorm_comp_equiv (Equiv.addRight (1 : ℤ)), + ← ENNReal.lqNorm_const_mul] + exact eLpNorm_le_of_le_on_pieces (measurable_phiIntegrand hφ).aestronglyMeasurable + (measurableSet_dyadicPiece ρ) (pairwise_disjoint_dyadicPiece hρ.le) + (ae_mem_iUnion_dyadicPiece hρ) (kMethodMeasure_dyadicPiece hρ.le) + fun _ _ ht => phiIntegrand_le_discretePhiSeq hφ hθ ht + +/-- **The discrete version of `Φ_{θ,q}` by the functional**: for an increasing `φ`, `θ ≥ 0` +and `ρ > 0`, `(ρ log 2)^(1/q) 2^(-ρθ) ‖(2^(-nρθ) φ(2^(nρ)))_{n ∈ ℤ}‖_{ℓ_q} ≤ Φ_{θ,q}(φ)`. -/ +theorem lqNorm_discretePhiSeq_le_phiFunctional (hφ : Monotone φ) (hθ : 0 ≤ θ) (hρ : 0 < ρ) : + ENNReal.ofReal (ρ * Real.log 2) ^ (1 / q.toReal) * + (2 ^ (-(ρ * θ)) * lqNorm q (discretePhiSeq θ ρ φ)) ≤ phiFunctional θ q φ := by + rw [phiFunctional_eq, ← ENNReal.lqNorm_const_mul] + exact le_eLpNorm_of_le_on_pieces (measurableSet_dyadicPiece ρ) + (pairwise_disjoint_dyadicPiece hρ.le) (kMethodMeasure_dyadicPiece hρ.le) + (ofReal_mul_log_two_ne_zero hρ) fun _ _ ht => discretePhiSeq_le_phiIntegrand hφ hθ ht + +/-! ### The discrete K-method on the grid `2^(nρ)`, `n ∈ ℤ` -/ + +variable (ι) in +/-- The sequence `(2^(-nρθ) K(2^(nρ), f))_{n ∈ ℤ}` of the discrete K-method on the grid +`t = 2^(nρ)`: `discretePhiSeq θ ρ` for `φ = K(·, f)`. -/ +noncomputable def discreteKSeq (θ ρ : ℝ) (f : X) (n : ℤ) : ℝ≥0∞ := + (2 : ℝ≥0∞) ^ (-((n : ℝ) * ρ * θ)) * kFunctional ι ((2 : ℝ≥0∞) ^ ((n : ℝ) * ρ)) f + +variable (ι) in +/-- The norm of the **discrete K-method** on the grid `t = 2^(nρ)`, `n ∈ ℤ`: +`‖(2^(-nρθ) K(2^(nρ), f))_{n ∈ ℤ}‖_{ℓ_q}`. For `ρ = 1` this is the formula of +`discreteKMethod` in the project *MultilinearInterpolation*. -/ +noncomputable def discreteKMethodNorm (θ ρ : ℝ) (q : ℝ≥0∞) (f : X) : ℝ≥0∞ := + lqNorm q (discreteKSeq ι θ ρ f) + +/-- The discrete K-norm on `ℤ` is the `ℓ_q` norm of `discretePhiSeq θ ρ` for `φ = K(·, f)`. -/ +theorem discreteKMethodNorm_eq (f : X) : discreteKMethodNorm ι θ ρ q f = + lqNorm q (discretePhiSeq θ ρ fun t => kFunctional ι t f) := rfl + +/-- **Upper bound on a piece**: for `t ∈ [2^(nρ), 2^((n+1)ρ))` and `θ ≥ 0`, +`t^(-θ) K(t, f) ≤ 2^(ρθ) · 2^(-(n+1)ρθ) K(2^((n+1)ρ), f)`. -/ +theorem kMethodIntegrand_le_discreteKSeq (hθ : 0 ≤ θ) {n : ℤ} {t : ℝ} + (ht : t ∈ dyadicPiece ρ n) (f : X) : + kMethodIntegrand ι θ f t ≤ 2 ^ (ρ * θ) * discreteKSeq ι θ ρ f (n + 1) := + phiIntegrand_le_discretePhiSeq (monotone_kFunctional f) hθ ht + +/-- **Lower bound on a piece**: for `t ∈ [2^(nρ), 2^((n+1)ρ))` and `θ ≥ 0`, +`2^(-ρθ) · 2^(-nρθ) K(2^(nρ), f) ≤ t^(-θ) K(t, f)`. -/ +theorem discreteKSeq_le_kMethodIntegrand (hθ : 0 ≤ θ) {n : ℤ} {t : ℝ} + (ht : t ∈ dyadicPiece ρ n) (f : X) : + 2 ^ (-(ρ * θ)) * discreteKSeq ι θ ρ f n ≤ kMethodIntegrand ι θ f t := + discretePhiSeq_le_phiIntegrand (monotone_kFunctional f) hθ ht + +/-- **The continuous K-norm by the discrete one on `ℤ`**: for `θ ≥ 0` and `ρ > 0`, +`‖f‖_{K,θ,q} ≤ (ρ log 2)^(1/q) 2^(ρθ) ‖(2^(-nρθ) K(2^(nρ), f))_{n ∈ ℤ}‖_{ℓ_q}`. -/ +theorem kMethodNorm_le_discreteKMethodNorm (hθ : 0 ≤ θ) (hρ : 0 < ρ) (f : X) : + kMethodNorm ι θ q f ≤ ENNReal.ofReal (ρ * Real.log 2) ^ (1 / q.toReal) * + (2 ^ (ρ * θ) * discreteKMethodNorm ι θ ρ q f) := by + rw [discreteKMethodNorm_eq] + exact phiFunctional_le_lqNorm_discretePhiSeq (monotone_kFunctional f) hθ hρ + +/-- **The discrete K-norm on `ℤ` by the continuous one**: for `θ ≥ 0` and `ρ > 0`, +`(ρ log 2)^(1/q) 2^(-ρθ) ‖(2^(-nρθ) K(2^(nρ), f))_{n ∈ ℤ}‖_{ℓ_q} ≤ ‖f‖_{K,θ,q}`. -/ +theorem discreteKMethodNorm_le_kMethodNorm (hθ : 0 ≤ θ) (hρ : 0 < ρ) (f : X) : + ENNReal.ofReal (ρ * Real.log 2) ^ (1 / q.toReal) * + (2 ^ (-(ρ * θ)) * discreteKMethodNorm ι θ ρ q f) ≤ kMethodNorm ι θ q f := by + rw [discreteKMethodNorm_eq] + exact lqNorm_discretePhiSeq_le_phiFunctional (monotone_kFunctional f) hθ hρ + +/-! ### The grid on `ℤ` and the grid on `ℕ` -/ + +/-- The map `k ↦ -k` from `ℕ` to `ℤ` is injective. -/ +theorem injective_neg_natCast : Injective fun k : ℕ => -(k : ℤ) := + neg_injective.comp Nat.cast_injective + +/-- The map `k ↦ k + 1` from `ℕ` to `ℤ` is injective. -/ +theorem injective_natCast_add_one : Injective fun k : ℕ => (k : ℤ) + 1 := + (add_left_injective 1).comp Nat.cast_injective + +/-- The terms of `(2^(-nρθ) φ(2^(nρ)))_{n ∈ ℤ}` with `n = -k ≤ 0` are `2^(kρθ) φ(2^(-kρ))`. -/ +theorem discretePhiSeq_neg_natCast (φ : ℝ≥0∞ → ℝ≥0∞) (k : ℕ) : + discretePhiSeq θ ρ φ (-k) = dyadicWeight (ρ * θ) k * φ (dyadicWeight (-ρ) k) := by + have h1 : -(((-(k : ℤ) : ℤ) : ℝ) * ρ * θ) = (k : ℝ) * (ρ * θ) := by push_cast; ring + have h2 : ((-(k : ℤ) : ℤ) : ℝ) * ρ = (k : ℝ) * -ρ := by push_cast; ring + rw [discretePhiSeq, ENNReal.dyadicWeight, ENNReal.dyadicWeight, h1, h2] + +/-- The term of `(2^(-nρθ) φ(2^(nρ)))_{n ∈ ℤ}` with `n = 0` is `φ(1)`. -/ +theorem discretePhiSeq_zero (φ : ℝ≥0∞ → ℝ≥0∞) : discretePhiSeq θ ρ φ 0 = φ 1 := by + simp [discretePhiSeq] + +/-- If `φ ≤ M`, the terms of `(2^(-nρθ) φ(2^(nρ)))_{n ∈ ℤ}` with `n = k + 1 > 0` are at most +`2^(-kρθ) M`, for `ρθ ≥ 0`. -/ +theorem discretePhiSeq_natCast_add_one_le {M : ℝ≥0∞} (hρθ : 0 ≤ ρ * θ) (hM : ∀ t, φ t ≤ M) + (k : ℕ) : discretePhiSeq θ ρ φ ((k : ℤ) + 1) ≤ M * dyadicWeight (-(ρ * θ)) k := by + rw [discretePhiSeq, mul_comm M, ENNReal.dyadicWeight] + refine mul_le_mul' (ENNReal.rpow_le_rpow_of_exponent_le one_le_two ?_) (hM _) + push_cast + nlinarith + +/-- **Splitting the grid on `ℤ`**: if `φ ≤ M` and `ρθ ≥ 0`, the sequence +`(2^(-nρθ) φ(2^(nρ)))_{n ∈ ℤ}` is at most the sequence `2^(kρθ) φ(2^(-kρ))` placed at +`n = -k ≤ 0` plus the sequence `2^(-kρθ) M` placed at `n = k + 1 > 0`. -/ +theorem discretePhiSeq_le_extend {M : ℝ≥0∞} (hρθ : 0 ≤ ρ * θ) (hM : ∀ t, φ t ≤ M) (n : ℤ) : + discretePhiSeq θ ρ φ n ≤ + extend (fun k : ℕ => -(k : ℤ)) (fun k => dyadicWeight (ρ * θ) k * φ (dyadicWeight (-ρ) k)) + 0 n + + extend (fun k : ℕ => (k : ℤ) + 1) (fun k => M * dyadicWeight (-(ρ * θ)) k) 0 n := by + obtain ⟨k, rfl | rfl⟩ := Int.eq_nat_or_neg n + · rcases k with _ | k + · have h0 : ((0 : ℕ) : ℤ) = -((0 : ℕ) : ℤ) := by simp + rw [h0, injective_neg_natCast.extend_apply, discretePhiSeq_neg_natCast] + exact le_self_add + · have h1 : ((k + 1 : ℕ) : ℤ) = (k : ℤ) + 1 := by push_cast; ring + rw [h1, injective_natCast_add_one.extend_apply] + exact (discretePhiSeq_natCast_add_one_le hρθ hM k).trans le_add_self + · rw [injective_neg_natCast.extend_apply, discretePhiSeq_neg_natCast] + exact le_self_add + +/-- **The grid on `ℤ` by the grid on `ℕ`**: if `φ ≤ M` and `ρθ ≥ 0`, then +`‖(2^(-nρθ) φ(2^(nρ)))_{n ∈ ℤ}‖_{ℓ_q} ≤ C_q γ (M + ‖(2^(kρθ) φ(2^(-kρ)))_{k ∈ ℕ}‖_{ℓ_q})` with +`γ = dyadicGeomConst (ρθ) q`, where `C_q` is Mathlib's constant `LpAddConst q` of the +quasi-triangle inequality (`1` for `q ≥ 1`). -/ +theorem lqNorm_discretePhiSeq_le {M : ℝ≥0∞} (hρθ : 0 ≤ ρ * θ) (hM : ∀ t, φ t ≤ M) : + lqNorm q (discretePhiSeq θ ρ φ) ≤ LpAddConst q * dyadicGeomConst (ρ * θ) q * + (M + lqNorm q fun k : ℕ => dyadicWeight (ρ * θ) k * φ (dyadicWeight (-ρ) k)) := by + set a : ℕ → ℝ≥0∞ := fun k => dyadicWeight (ρ * θ) k * φ (dyadicWeight (-ρ) k) + calc lqNorm q (discretePhiSeq θ ρ φ) + ≤ lqNorm q (fun n => extend (fun k : ℕ => -(k : ℤ)) a 0 n + + extend (fun k : ℕ => (k : ℤ) + 1) (fun k => M * dyadicWeight (-(ρ * θ)) k) 0 n) := + ENNReal.lqNorm_mono (discretePhiSeq_le_extend hρθ hM) + _ ≤ LpAddConst q * (lqNorm q (extend (fun k : ℕ => -(k : ℤ)) a 0) + + lqNorm q (extend (fun k : ℕ => (k : ℤ) + 1) + (fun k => M * dyadicWeight (-(ρ * θ)) k) 0)) := + ENNReal.lqNorm_add_le' q _ _ + _ ≤ LpAddConst q * (lqNorm q a + M * dyadicGeomConst (ρ * θ) q) := by + rw [ENNReal.lqNorm_extend_zero injective_neg_natCast, + ENNReal.lqNorm_extend_zero injective_natCast_add_one, ENNReal.lqNorm_const_mul] + gcongr + exact ENNReal.lqNorm_dyadicWeight_neg_le_dyadicGeomConst hρθ + _ ≤ LpAddConst q * dyadicGeomConst (ρ * θ) q * (M + lqNorm q a) := by + rw [mul_assoc] + gcongr + calc lqNorm q a + M * dyadicGeomConst (ρ * θ) q + ≤ dyadicGeomConst (ρ * θ) q * lqNorm q a + M * dyadicGeomConst (ρ * θ) q := by + gcongr + exact le_mul_of_one_le_left' (ENNReal.one_le_dyadicGeomConst _ _) + _ = dyadicGeomConst (ρ * θ) q * (M + lqNorm q a) := by ring + +/-- **The grid on `ℕ` is part of the grid on `ℤ`**: +`‖(2^(kρθ) φ(2^(-kρ)))_{k ∈ ℕ}‖_{ℓ_q} ≤ ‖(2^(-nρθ) φ(2^(nρ)))_{n ∈ ℤ}‖_{ℓ_q}`. -/ +theorem lqNorm_le_lqNorm_discretePhiSeq : + lqNorm q (fun k : ℕ => dyadicWeight (ρ * θ) k * φ (dyadicWeight (-ρ) k)) ≤ + lqNorm q (discretePhiSeq θ ρ φ) := by + have h : (fun k : ℕ => dyadicWeight (ρ * θ) k * φ (dyadicWeight (-ρ) k)) = + discretePhiSeq θ ρ φ ∘ fun k : ℕ => -(k : ℤ) := + funext fun k => (discretePhiSeq_neg_natCast φ k).symm + rw [h] + exact ENNReal.lqNorm_comp_le_of_injective injective_neg_natCast _ + +/-- The terms with `n = -k ≤ 0` are the sequence of the interpolation norm: +`2^(kρθ) K(2^(-kρ), f)`. -/ +theorem discreteKSeq_neg_natCast (f : X) (k : ℕ) : + discreteKSeq ι θ ρ f (-k) = interpSeq ι θ ρ f k := + discretePhiSeq_neg_natCast (fun t => kFunctional ι t f) k + +/-- The term with `n = 0` is `K(1, f)`. -/ +theorem discreteKSeq_zero (f : X) : discreteKSeq ι θ ρ f 0 = kFunctional ι 1 f := + discretePhiSeq_zero (fun t => kFunctional ι t f) + +/-- The terms with `n = k + 1 > 0` are at most `2^(-kρθ) ‖f‖`, for `ρθ ≥ 0`. -/ +theorem discreteKSeq_natCast_add_one_le (hρθ : 0 ≤ ρ * θ) (f : X) (k : ℕ) : + discreteKSeq ι θ ρ f ((k : ℤ) + 1) ≤ ‖f‖ₑ * dyadicWeight (-(ρ * θ)) k := + discretePhiSeq_natCast_add_one_le (φ := fun t => kFunctional ι t f) hρθ + (fun _ => kFunctional_le_enorm f) k + +/-- **Splitting the grid on `ℤ`**: the sequence on `ℤ` is at most the interpolation sequence +placed at `n = -k ≤ 0` plus the sequence `2^(-kρθ) ‖f‖` placed at `n = k + 1 > 0`. -/ +theorem discreteKSeq_le_extend (hρθ : 0 ≤ ρ * θ) (f : X) (n : ℤ) : + discreteKSeq ι θ ρ f n ≤ + extend (fun k : ℕ => -(k : ℤ)) (interpSeq ι θ ρ f) 0 n + + extend (fun k : ℕ => (k : ℤ) + 1) (fun k => ‖f‖ₑ * dyadicWeight (-(ρ * θ)) k) 0 n := + discretePhiSeq_le_extend (φ := fun t => kFunctional ι t f) hρθ (fun _ => kFunctional_le_enorm f) n + +/-- **The discrete K-norm on `ℤ` by the interpolation norm**: for `ρθ ≥ 0`, +`‖(2^(-nρθ) K(2^(nρ), f))_{n ∈ ℤ}‖_{ℓ_q} ≤ C_q γ ‖f‖_{θ,q}` with +`γ = dyadicGeomConst (ρθ) q`, where `C_q` is Mathlib's constant `LpAddConst q` of the +quasi-triangle inequality (`1` for `q ≥ 1`). -/ +theorem discreteKMethodNorm_le_interpNorm (hρθ : 0 ≤ ρ * θ) (f : X) : + discreteKMethodNorm ι θ ρ q f ≤ + LpAddConst q * dyadicGeomConst (ρ * θ) q * interpNorm ι θ ρ q f := + lqNorm_discretePhiSeq_le (φ := fun t => kFunctional ι t f) hρθ fun _ => kFunctional_le_enorm f + +/-- **The interpolation norm by the discrete K-norm on `ℤ`**: for `q ≠ 0`, +`‖f‖_{θ,q} ≤ (1 + max(1, ‖ι‖)) ‖(2^(-nρθ) K(2^(nρ), f))_{n ∈ ℤ}‖_{ℓ_q}`; the term `‖f‖` is +controlled by `‖f‖ ≤ max(1, ‖ι‖) K(1, f)`. -/ +theorem interpNorm_le_discreteKMethodNorm (hq : q ≠ 0) (f : X) : + interpNorm ι θ ρ q f ≤ (1 + max 1 ‖ι‖ₑ) * discreteKMethodNorm ι θ ρ q f := by + have h1 : ‖f‖ₑ ≤ max 1 ‖ι‖ₑ * discreteKMethodNorm ι θ ρ q f := by + refine (enorm_le_max_mul_kFunctional_one (ι := ι) f).trans ?_ + gcongr + rw [← discreteKSeq_zero (θ := θ) (ρ := ρ)] + exact ENNReal.le_lqNorm hq _ 0 + have h2 : lqNorm q (interpSeq ι θ ρ f) ≤ discreteKMethodNorm ι θ ρ q f := + lqNorm_le_lqNorm_discretePhiSeq (φ := fun t => kFunctional ι t f) + calc interpNorm ι θ ρ q f = ‖f‖ₑ + lqNorm q (interpSeq ι θ ρ f) := rfl + _ ≤ max 1 ‖ι‖ₑ * discreteKMethodNorm ι θ ρ q f + discreteKMethodNorm ι θ ρ q f := + add_le_add h1 h2 + _ = (1 + max 1 ‖ι‖ₑ) * discreteKMethodNorm ι θ ρ q f := by ring + +/-! ### The discrete and the continuous K-method agree -/ + +/-- The constant `(ρ log 2)^(1/q) 2^(ρθ) C_q γ`, with `γ = dyadicGeomConst (ρθ) q`, of the bound +of the continuous K-norm by the discrete one on the grid `2^(-kρ)`. -/ +noncomputable def kMethodUpperConst (θ ρ : ℝ) (q : ℝ≥0∞) : ℝ≥0∞ := + ENNReal.ofReal (ρ * Real.log 2) ^ (1 / q.toReal) * 2 ^ (ρ * θ) * + (LpAddConst q * dyadicGeomConst (ρ * θ) q) + +/-- The constant `kMethodUpperConst θ ρ q` is finite for `θ, ρ > 0`. -/ +theorem kMethodUpperConst_ne_top (hθ : 0 < θ) (hρ : 0 < ρ) (q : ℝ≥0∞) : + kMethodUpperConst θ ρ q ≠ ∞ := + ENNReal.mul_ne_top (ENNReal.mul_ne_top + (ENNReal.rpow_ne_top_of_nonneg (by positivity) ENNReal.ofReal_ne_top) + (ENNReal.two_rpow_ne_top _)) + (ENNReal.mul_ne_top (ENNReal.LpAddConst_lt_top q).ne + (ENNReal.dyadicGeomConst_ne_top (mul_pos hρ hθ) q)) + +/-- **The continuous K-norm by the discrete one** (Bergh–Löfström, Lemma 3.1.3): for `θ ≥ 0` +and `ρ > 0`, `‖f‖_{K,θ,q} ≤ kMethodUpperConst θ ρ q · ‖f‖_{θ,q}`, where `‖f‖_{θ,q}` is the +discrete K-method on the grid `2^(-kρ)`. The constant is finite for `θ > 0` +(`kMethodUpperConst_ne_top`). -/ +theorem kMethodNorm_le_interpNorm (hθ : 0 ≤ θ) (hρ : 0 < ρ) (f : X) : + kMethodNorm ι θ q f ≤ kMethodUpperConst θ ρ q * interpNorm ι θ ρ q f := by + calc kMethodNorm ι θ q f + ≤ ENNReal.ofReal (ρ * Real.log 2) ^ (1 / q.toReal) * + (2 ^ (ρ * θ) * discreteKMethodNorm ι θ ρ q f) := + kMethodNorm_le_discreteKMethodNorm hθ hρ f + _ ≤ ENNReal.ofReal (ρ * Real.log 2) ^ (1 / q.toReal) * (2 ^ (ρ * θ) * + (LpAddConst q * dyadicGeomConst (ρ * θ) q * interpNorm ι θ ρ q f)) := by + gcongr + exact discreteKMethodNorm_le_interpNorm (mul_nonneg hρ.le hθ) f + _ = kMethodUpperConst θ ρ q * interpNorm ι θ ρ q f := by + rw [kMethodUpperConst] + ring + +variable (ι) in +/-- The constant `(1 + max(1, ‖ι‖)) 2^(ρθ) (ρ log 2)^(-1/q)` of the bound of the discrete +K-norm on the grid `2^(-kρ)` by the continuous one. -/ +noncomputable def kMethodLowerConst (θ ρ : ℝ) (q : ℝ≥0∞) : ℝ≥0∞ := + (1 + max 1 ‖ι‖ₑ) * (2 ^ (ρ * θ) * (ENNReal.ofReal (ρ * Real.log 2) ^ (1 / q.toReal))⁻¹) + +/-- The factor `(ρ log 2)^(1/q)` is nonzero for `ρ > 0`. -/ +theorem ofReal_mul_log_two_rpow_ne_zero (hρ : 0 < ρ) (q : ℝ≥0∞) : + ENNReal.ofReal (ρ * Real.log 2) ^ (1 / q.toReal) ≠ 0 := + (ENNReal.rpow_pos (pos_iff_ne_zero.2 (ofReal_mul_log_two_ne_zero hρ)) + ENNReal.ofReal_ne_top).ne' + +/-- The factor `(log 2)^(1/q)` is nonzero: the case `ρ = 1` of +`ofReal_mul_log_two_rpow_ne_zero`. -/ +theorem ofReal_log_two_rpow_ne_zero (q : ℝ≥0∞) : + ENNReal.ofReal (Real.log 2) ^ (1 / q.toReal) ≠ 0 := by + have h := ofReal_mul_log_two_rpow_ne_zero (ρ := 1) one_pos q + rwa [one_mul] at h + +/-- **The discrete version of `Φ_{θ,q}` by the functional, solved for the sequence**: for an +increasing `φ`, `θ ≥ 0` and `ρ > 0`, +`‖(2^(-nρθ) φ(2^(nρ)))_{n ∈ ℤ}‖_{ℓ_q} ≤ ((ρ log 2)^(1/q) 2^(-ρθ))⁻¹ Φ_{θ,q}(φ)` +(`lqNorm_discretePhiSeq_le_phiFunctional`). -/ +theorem lqNorm_discretePhiSeq_le_inv_mul_phiFunctional {φ : ℝ≥0∞ → ℝ≥0∞} (hφ : Monotone φ) + (hθ : 0 ≤ θ) (hρ : 0 < ρ) : + lqNorm q (discretePhiSeq θ ρ φ) ≤ + (ENNReal.ofReal (ρ * Real.log 2) ^ (1 / q.toReal) * 2 ^ (-(ρ * θ)))⁻¹ * + phiFunctional θ q φ := by + refine (ENNReal.mul_le_iff_le_inv (mul_ne_zero (ofReal_mul_log_two_rpow_ne_zero hρ q) + (ENNReal.rpow_pos two_pos ENNReal.ofNat_ne_top).ne') + (ENNReal.mul_ne_top (ENNReal.rpow_ne_top_of_nonneg (by positivity) ENNReal.ofReal_ne_top) + (ENNReal.two_rpow_ne_top _))).1 ?_ + rw [mul_assoc] + exact lqNorm_discretePhiSeq_le_phiFunctional hφ hθ hρ + +/-- The factor `((log 2)^(1/q) 2^(-θ))⁻¹` of `InterpCouple.discreteKMethodNorm_le_mul_kMethodNorm` +is finite. -/ +theorem inv_log_two_rpow_mul_two_rpow_ne_top (θ : ℝ) (q : ℝ≥0∞) : + (ENNReal.ofReal (Real.log 2) ^ (1 / q.toReal) * 2 ^ (-θ))⁻¹ ≠ ∞ := + ENNReal.inv_ne_top.2 (mul_ne_zero (ofReal_log_two_rpow_ne_zero q) + (ENNReal.rpow_pos two_pos ENNReal.ofNat_ne_top).ne') + +/-- The factor `(log 2)^(1/q) 2^θ` of `InterpCouple.kMethodNorm_le_mul_discreteKMethodNorm` is +finite. -/ +theorem log_two_rpow_mul_two_rpow_ne_top (θ : ℝ) (q : ℝ≥0∞) : + ENNReal.ofReal (Real.log 2) ^ (1 / q.toReal) * 2 ^ θ ≠ ∞ := + ENNReal.mul_ne_top (ENNReal.rpow_ne_top_of_nonneg (by positivity) ENNReal.ofReal_ne_top) + (ENNReal.two_rpow_ne_top θ) + +/-- The constant `kMethodLowerConst ι θ ρ q` is finite for `ρ > 0`. -/ +theorem kMethodLowerConst_ne_top (hρ : 0 < ρ) (q : ℝ≥0∞) : kMethodLowerConst ι θ ρ q ≠ ∞ := + ENNReal.mul_ne_top (ENNReal.add_ne_top.2 ⟨ENNReal.one_ne_top, + max_ne_top ENNReal.one_ne_top eNorm_ne_top⟩) + (ENNReal.mul_ne_top (ENNReal.two_rpow_ne_top _) + (ENNReal.inv_ne_top.2 (ofReal_mul_log_two_rpow_ne_zero hρ q))) + +/-- **The discrete K-norm by the continuous one** (Bergh–Löfström, Lemma 3.1.3): for `θ ≥ 0`, +`ρ > 0` and `q ≠ 0`, `‖f‖_{θ,q} ≤ kMethodLowerConst ι θ ρ q · ‖f‖_{K,θ,q}`, where `‖f‖_{θ,q}` +is the discrete K-method on the grid `2^(-kρ)`. -/ +theorem interpNorm_le_kMethodNorm (hθ : 0 ≤ θ) (hρ : 0 < ρ) (hq : q ≠ 0) (f : X) : + interpNorm ι θ ρ q f ≤ kMethodLowerConst ι θ ρ q * kMethodNorm ι θ q f := by + have hc0 := ofReal_mul_log_two_rpow_ne_zero hρ q + have hct : ENNReal.ofReal (ρ * Real.log 2) ^ (1 / q.toReal) ≠ ∞ := + ENNReal.rpow_ne_top_of_nonneg (by positivity) ENNReal.ofReal_ne_top + have hD : discreteKMethodNorm ι θ ρ q f ≤ 2 ^ (ρ * θ) * + (ENNReal.ofReal (ρ * Real.log 2) ^ (1 / q.toReal))⁻¹ * kMethodNorm ι θ q f := by + rw [discreteKMethodNorm_eq, kMethodNorm] + refine (lqNorm_discretePhiSeq_le_inv_mul_phiFunctional (monotone_kFunctional f) hθ + hρ).trans_eq ?_ + rw [ENNReal.mul_inv (Or.inl hc0) (Or.inl hct), ENNReal.rpow_neg, inv_inv, + mul_comm _ (2 ^ (ρ * θ))] + calc interpNorm ι θ ρ q f ≤ (1 + max 1 ‖ι‖ₑ) * discreteKMethodNorm ι θ ρ q f := + interpNorm_le_discreteKMethodNorm hq f + _ ≤ (1 + max 1 ‖ι‖ₑ) * (2 ^ (ρ * θ) * + (ENNReal.ofReal (ρ * Real.log 2) ^ (1 / q.toReal))⁻¹ * kMethodNorm ι θ q f) := by + gcongr + _ = kMethodLowerConst ι θ ρ q * kMethodNorm ι θ q f := by + rw [kMethodLowerConst] + ring + +/-- For the degenerate exponent `q = 0` every `f` lies in both spaces: `‖f‖_{θ,0} = ‖f‖` and +`‖f‖_{K,θ,0} = 0`. -/ +theorem memInterp_zero_and_memKMethod_zero (f : X) : + MemInterp ι θ ρ 0 f ∧ MemKMethod ι θ 0 f := by + refine ⟨?_, ?_⟩ + · simp [MemInterp, interpNorm, ENNReal.lqNorm_zero_left] + · simp [MemKMethod, kMethodNorm_eq, + eLpNorm_exponent_zero (measurable_kMethodIntegrand (ι := ι) (θ := θ) f).aestronglyMeasurable] + +/-- **The discrete and the continuous K-method agree** (Bergh–Löfström, Lemma 3.1.3): for +`θ > 0`, `ρ > 0` and every `q`, `f` lies in the interpolation space of the discrete K-method on +the grid `t = 2^(-kρ)` if and only if `‖f‖_{K,θ,q} < ∞`, that is +`∫_0^∞ (t^(-θ) K(t, f))^q dt/t < ∞` for `0 < q < ∞` and `t^(-θ) K(t, f)` essentially bounded +for `q = ∞`. This is, for the couple given by a bounded linear map `ι`, the analogue of the +equivalence `discreteKMethod_equiv_kmethod` stated in the project *MultilinearInterpolation*, +with the grid on `ℕ` and the term `‖f‖`. -/ +theorem memInterp_iff_memKMethod (hθ : 0 < θ) (hρ : 0 < ρ) {f : X} : + MemInterp ι θ ρ q f ↔ MemKMethod ι θ q f := by + rcases eq_or_ne q 0 with rfl | hq + · exact iff_of_true (memInterp_zero_and_memKMethod_zero f).1 + (memInterp_zero_and_memKMethod_zero (ρ := ρ) f).2 + exact ⟨fun h => (kMethodNorm_le_interpNorm hθ.le hρ f).trans_lt + (ENNReal.mul_lt_top (kMethodUpperConst_ne_top hθ hρ q).lt_top h), + fun h => (interpNorm_le_kMethodNorm hθ.le hρ hq f).trans_lt + (ENNReal.mul_lt_top (kMethodLowerConst_ne_top hρ q).lt_top h)⟩ + +/-- **The grid does not matter**: for `θ > 0` and every `q`, the discrete K-methods on the grids +`t = 2^(-kρ)` and `t = 2^(-kρ')`, `ρ, ρ' > 0`, give the same space. -/ +theorem memInterp_iff_memInterp_of_pos {ρ' : ℝ} (hθ : 0 < θ) (hρ : 0 < ρ) (hρ' : 0 < ρ') + {f : X} : MemInterp ι θ ρ q f ↔ MemInterp ι θ ρ' q f := + (memInterp_iff_memKMethod hθ hρ).trans (memInterp_iff_memKMethod hθ hρ').symm + +/-- **The representation theorem for the continuous K-method**: under Jackson's and Bernstein's +inequalities of order `r` and for `0 < s < r`, `1 ≤ q ≤ ∞`, `A^s_q = (X, Y)_{s/r,q}`, where +`(X, Y)_{s/r,q}` consists of the `f` with `‖f‖_{K,s/r,q} < ∞` (the integral +`∫_0^∞ (t^(-s/r) K(t, f))^q dt/t` for `q < ∞`, the essential supremum of `t^(-s/r) K(t, f)` for +`q = ∞`). -/ +theorem memApprox_iff_memKMethod {A : ApproximationScheme X} {r s C₁ C₂ : ℝ} + (hJ : JacksonBound ι A r C₁) (hC₁ : 0 ≤ C₁) (hB : LiftBound ι A r C₂) (hC₂ : 0 ≤ C₂) + (hs : 0 < s) (hsr : s < r) (hq : 1 ≤ q) {f : X} : + A.MemApprox s q f ↔ MemKMethod ι (s / r) q f := + (memApprox_iff_memInterp hJ hC₁ hB hC₂ hs hsr hq).trans + (memInterp_iff_memKMethod (div_pos hs (hs.trans hsr)) (hs.trans hsr)) + +/-- **The representation theorem for a smoothness space** `W` of order `r` and the continuous +K-method: for `0 < s < r` and `1 ≤ q ≤ ∞`, `A^s_q = (X, W)_{s/r,q}`. -/ +theorem SmoothnessSpace.memApprox_iff_memKMethod {A : ApproximationScheme X} {s : ℝ} + (W : SmoothnessSpace A Y) (hs : 0 < s) (hsr : s < W.order) (hq : 1 ≤ q) {f : X} : + A.MemApprox s q f ↔ MemKMethod W.incl (s / W.order) q f := + ApproximationScheme.memApprox_iff_memKMethod W.jackson W.jacksonConst_nonneg W.bernstein + W.bernsteinConst_nonneg hs hsr hq + +end ApproximationScheme diff --git a/LeanPool/FunctionSpaces/ApproximationSpaces/Interpolation/Property.lean b/LeanPool/FunctionSpaces/ApproximationSpaces/Interpolation/Property.lean new file mode 100644 index 0000000000..9046e93d47 --- /dev/null +++ b/LeanPool/FunctionSpaces/ApproximationSpaces/Interpolation/Property.lean @@ -0,0 +1,474 @@ +/- +Copyright (c) 2026 Mario Ullrich. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Mario Ullrich +-/ +module + +public import LeanPool.FunctionSpaces.ApproximationSpaces.Interpolation.Couple + +/- +Modified for Lean Pool: module names and imports adapted. +-/ + +/-! +# The interpolation property of the K-method + +The real interpolation spaces of the K-method are **exact of exponent `θ`** (Bergh–Löfström, +Theorems 3.1.2 and 3.11.2): if an additive map `T` from a couple `(N₀, N₁)` on `U` to a couple +`(N₀', N₁')` on `V` satisfies `N_i'(T a) ≤ M_i N_i(a)` with `0 < M_i < ∞`, then +`‖T u‖_{K,θ,q} ≤ M₀^(1-θ) M₁^θ ‖u‖_{K,θ,q}` (`InterpCouple.kMethodNorm_map_le`). + +The proof has two steps. The measure `dt/t` on `(0, ∞)` is invariant under every dilation +`t ↦ c t`, `c > 0` (`ApproximationScheme.measurePreserving_mul_left_kMethodMeasure`), so that +`Φ_{θ,q}(φ(c ·)) = c^θ Φ_{θ,q}(φ)` (`ApproximationScheme.phiFunctional_comp_mul`, Bergh–Löfström +(3.1.7)); and `K(t, T u) ≤ M₀ K((M₁/M₀) t, u)` (`InterpCouple.kFunctional_map_le`, Bergh–Löfström +(3.1.8)). The second inequality needs additivity of `T` only on the decompositions +`u = (u - b) + b` into pieces of finite norm (`InterpCouple.kFunctional_map_le_of_additiveOn`, +the Remark after Bergh–Löfström, Theorem 3.1.2). + +Consequences: the discrete K-norms transform with the extra factor `2^(2ρθ)` +(`InterpCouple.discreteKMethodNorm_map_le`); couples with comparable norms have comparable +K-norms and the same interpolation spaces (`InterpCouple.kMethodNorm_le_of_le`, +`InterpCouple.memKMethod_congr`); the interpolation space of a retract is the image of the +interpolation space (`InterpCouple.memKMethod_iff_of_retract`, +`InterpCouple.memKMethod_iff_exists_map_eq`, Bergh–Löfström, Theorem 6.4.2); +and for bounded linear maps `T : X → X'`, `S : Y → Y'` with `T ι = ι' S`, the map `T` is bounded +between the spaces of `ApproximationSpaces.Interpolation.KMethod` +(`ApproximationScheme.kMethodNorm_map_le_of_comp_eq`, `ApproximationScheme.MemInterp.map`). +-/ + +@[expose] public section + +open MeasureTheory Set Function +open scoped ENNReal + +/-! ### Dilations of `dt/t` -/ + +namespace ApproximationScheme + +variable {θ : ℝ} {q : ℝ≥0∞} {φ ψ : ℝ≥0∞ → ℝ≥0∞} + +/-- The measure `dt/t` of a measurable set `s` is `∫ 1_{s ∩ (0, ∞)}(t) t⁻¹ dt`. -/ +theorem kMethodMeasure_apply {s : Set ℝ} (hs : MeasurableSet s) : + kMethodMeasure s = ∫⁻ t, (s ∩ Ioi 0).indicator (fun t => (ENNReal.ofReal t)⁻¹) t := by + rw [kMethodMeasure, Measure.restrict_apply hs, withDensity_apply _ (hs.inter measurableSet_Ioi), + lintegral_indicator (hs.inter measurableSet_Ioi)] + rfl + +/-- The density of `dt/t` under a dilation: for `c > 0`, +`1_{c⁻¹ s ∩ (0, ∞)}(t) t⁻¹ = c · 1_{s ∩ (0, ∞)}(c t) (c t)⁻¹`. -/ +theorem indicator_preimage_mul_left_inv {c : ℝ} (hc : 0 < c) (s : Set ℝ) (t : ℝ) : + (((c * ·) ⁻¹' s) ∩ Ioi 0).indicator (fun t => (ENNReal.ofReal t)⁻¹) t = + ENNReal.ofReal c * (s ∩ Ioi 0).indicator (fun t => (ENNReal.ofReal t)⁻¹) (c * t) := by + have hc0 : ENNReal.ofReal c ≠ 0 := (ENNReal.ofReal_pos.2 hc).ne' + by_cases ht : 0 < t + · have hct : 0 < c * t := mul_pos hc ht + by_cases hs : c * t ∈ s + · rw [indicator_of_mem (show t ∈ (c * ·) ⁻¹' s ∩ Ioi 0 from ⟨hs, ht⟩), + indicator_of_mem (show c * t ∈ s ∩ Ioi 0 from ⟨hs, hct⟩), ENNReal.ofReal_mul hc.le, + ENNReal.mul_inv (Or.inl hc0) (Or.inl ENNReal.ofReal_ne_top), ← mul_assoc, + ENNReal.mul_inv_cancel hc0 ENNReal.ofReal_ne_top, one_mul] + · rw [indicator_of_notMem (fun h : t ∈ (c * ·) ⁻¹' s ∩ Ioi 0 => hs h.1), + indicator_of_notMem (fun h : c * t ∈ s ∩ Ioi 0 => hs h.1), mul_zero] + · have hct : ¬ 0 < c * t := fun h => ht (pos_of_mul_pos_right h hc.le) + rw [indicator_of_notMem (fun h : t ∈ (c * ·) ⁻¹' s ∩ Ioi 0 => ht h.2), + indicator_of_notMem (fun h : c * t ∈ s ∩ Ioi 0 => hct h.2), mul_zero] + +/-- **Dilations preserve `dt/t`**: for `c > 0`, `t ↦ c t` maps the measure `dt/t` on `(0, ∞)` +to itself, since Lebesgue measure scales by `c⁻¹` and the density `t⁻¹` by `c`. -/ +theorem measurePreserving_mul_left_kMethodMeasure {c : ℝ} (hc : 0 < c) : + MeasurePreserving (c * ·) kMethodMeasure kMethodMeasure := by + have hm : Measurable (c * · : ℝ → ℝ) := measurable_const_mul c + have hG : ∀ {s : Set ℝ}, MeasurableSet s → + Measurable ((s ∩ Ioi 0).indicator fun t : ℝ => (ENNReal.ofReal t)⁻¹) := fun hs => + ENNReal.measurable_ofReal.inv.indicator (hs.inter measurableSet_Ioi) + refine ⟨hm, Measure.ext fun s hs => ?_⟩ + rw [Measure.map_apply hm hs, kMethodMeasure_apply (hm hs), kMethodMeasure_apply hs] + simp_rw [indicator_preimage_mul_left_inv hc s] + rw [lintegral_const_mul (ENNReal.ofReal c) + (f := fun t => (s ∩ Ioi 0).indicator (fun t => (ENNReal.ofReal t)⁻¹) (c * t)) + ((hG hs).comp hm), ← lintegral_map (hG hs) hm, + Real.map_volume_mul_left hc.ne', lintegral_smul_measure, smul_eq_mul, ← mul_assoc, + ← ENNReal.ofReal_mul hc.le, abs_of_pos (inv_pos.2 hc), mul_inv_cancel₀ hc.ne', + ENNReal.ofReal_one, one_mul] + +/-- Almost every point for `dt/t` is positive, since `dt/t` is a restriction to `(0, ∞)` +(Mathlib's `MeasureTheory.ae_restrict_mem`). -/ +theorem ae_pos_kMethodMeasure : ∀ᵐ t ∂kMethodMeasure, 0 < t := by + rw [kMethodMeasure] + exact ae_restrict_mem measurableSet_Ioi + +/-- **Monotonicity of `Φ_{θ,q}`**: if `φ ≤ ψ` on `(0, ∞)` and `φ` is measurable, then +`Φ_{θ,q}(φ) ≤ Φ_{θ,q}(ψ)`. -/ +theorem phiFunctional_mono (hφ : Measurable φ) (h : ∀ t, t ≠ 0 → t ≠ ∞ → φ t ≤ ψ t) : + phiFunctional θ q φ ≤ phiFunctional θ q ψ := by + rw [phiFunctional_eq, phiFunctional_eq] + refine eLpNorm_mono_eNorm_ae (measurable_phiIntegrand_of_measurable hφ).aestronglyMeasurable + (ae_pos_kMethodMeasure.mono fun t ht => ?_) + simp only [eNorm_eq_self, phiIntegrand] + gcongr + exact h _ (ENNReal.ofReal_pos.2 ht).ne' ENNReal.ofReal_ne_top + +/-- The integrand of `a φ` is `a` times the integrand of `φ`. -/ +theorem phiIntegrand_const_mul (a : ℝ≥0∞) (φ : ℝ≥0∞ → ℝ≥0∞) : + phiIntegrand θ (fun t => a * φ t) = fun t => a * phiIntegrand θ φ t := by + funext t + simp only [phiIntegrand] + ring + +/-- **Homogeneity of `Φ_{θ,q}`**: `Φ_{θ,q}(a φ) = a Φ_{θ,q}(φ)` for every `a ∈ [0, ∞]` and +measurable `φ`, by the homogeneity of `L_q` norms of `[0, ∞]`-valued functions +(Mathlib's `MeasureTheory.eLpNorm_const_mul_ennreal`). -/ +theorem phiFunctional_const_mul (a : ℝ≥0∞) (hφ : Measurable φ) : + phiFunctional θ q (fun t => a * φ t) = a * phiFunctional θ q φ := by + rw [phiFunctional_eq, phiFunctional_eq, phiIntegrand_const_mul] + exact eLpNorm_const_mul_ennreal (measurable_phiIntegrand_of_measurable hφ).aestronglyMeasurable + +/-- The integrand of `φ(c ·)` at `t` is the integrand of `c^θ φ` at `c t`: +`t^(-θ) φ(c t) = (c t)^(-θ) c^θ φ(c t)`, for `0 < c < ∞`. -/ +theorem phiIntegrand_comp_mul {c : ℝ≥0∞} (hc0 : c ≠ 0) (hc : c ≠ ∞) (t : ℝ) : + phiIntegrand θ (fun s => φ (c * s)) t = + phiIntegrand θ (fun s => c ^ θ * φ s) (c.toReal * t) := by + have hct : ENNReal.ofReal (c.toReal * t) = c * ENNReal.ofReal t := by + rw [ENNReal.ofReal_mul ENNReal.toReal_nonneg, ENNReal.ofReal_toReal hc] + have h1 : c ^ (-θ) * c ^ θ = 1 := by + rw [← ENNReal.rpow_add _ _ hc0 hc, neg_add_cancel, ENNReal.rpow_zero] + rw [phiIntegrand, phiIntegrand, hct, ENNReal.mul_rpow_of_ne_top hc ENNReal.ofReal_ne_top] + calc ENNReal.ofReal t ^ (-θ) * φ (c * ENNReal.ofReal t) + = (c ^ (-θ) * c ^ θ) * (ENNReal.ofReal t ^ (-θ) * φ (c * ENNReal.ofReal t)) := by + rw [h1, one_mul] + _ = _ := by ring + +/-- **`Φ_{θ,q}` under a dilation** (Bergh–Löfström (3.1.7)): for `0 < c < ∞` and measurable `φ`, +`Φ_{θ,q}(φ(c ·)) = c^θ Φ_{θ,q}(φ)`, by the invariance of `dt/t` under `t ↦ c t`. -/ +theorem phiFunctional_comp_mul {c : ℝ≥0∞} (hc0 : c ≠ 0) (hc : c ≠ ∞) (hφ : Measurable φ) : + phiFunctional θ q (fun t => φ (c * t)) = c ^ θ * phiFunctional θ q φ := by + have hc' : 0 < c.toReal := ENNReal.toReal_pos hc0 hc + have hm : Measurable (phiIntegrand θ fun s => c ^ θ * φ s) := + measurable_phiIntegrand_of_measurable (hφ.const_mul _) + calc phiFunctional θ q (fun t => φ (c * t)) + = eLpNorm ((phiIntegrand θ fun s => c ^ θ * φ s) ∘ (c.toReal * ·)) q kMethodMeasure := by + rw [phiFunctional_eq] + exact congrArg (eLpNorm · q kMethodMeasure) (funext (phiIntegrand_comp_mul hc0 hc)) + _ = phiFunctional θ q (fun s => c ^ θ * φ s) := + eLpNorm_comp_measurePreserving hm.aestronglyMeasurable + (measurePreserving_mul_left_kMethodMeasure hc') + _ = c ^ θ * phiFunctional θ q φ := phiFunctional_const_mul _ hφ + +end ApproximationScheme + +namespace InterpCouple + +/-! ### The K-functional under a map -/ + +section Map + +variable {U V : Type*} [AddCommGroup U] [AddCommGroup V] {A : InterpCouple U} + {B : InterpCouple V} {t M₀ M₁ : ℝ≥0∞} {θ ρ : ℝ} {q : ℝ≥0∞} + +/-- **One decomposition under a map**: if `T u = T (u - b) + T b`, +`N₀'(T (u - b)) ≤ M₀ N₀(u - b)` and `N₁'(T b) ≤ M₁ N₁(b)`, then +`K'(t, T u) ≤ M₀ N₀(u - b) + t M₁ N₁(b)`. -/ +theorem kFunctional_map_le_of_decomp {T : U → V} {u b : U} (hTu : T u = T (u - b) + T b) + (h₀ : B.norm0 (T (u - b)) ≤ M₀ * A.norm0 (u - b)) (h₁ : B.norm1 (T b) ≤ M₁ * A.norm1 b) : + B.kFunctional t (T u) ≤ M₀ * A.norm0 (u - b) + t * (M₁ * A.norm1 b) := + calc B.kFunctional t (T u) ≤ B.norm0 (T u - T b) + t * B.norm1 (T b) := kFunctional_le _ _ + _ = B.norm0 (T (u - b)) + t * B.norm1 (T b) := by rw [hTu, add_sub_cancel_right] + _ ≤ M₀ * A.norm0 (u - b) + t * (M₁ * A.norm1 b) := by gcongr + +/-- **The K-functional under an additive map** (Bergh–Löfström (3.1.8)): if `T : U → V` is +additive with `N₀'(T a) ≤ M₀ N₀(a)` and `N₁'(T a) ≤ M₁ N₁(a)` for every `a`, and `0 < M₀ < ∞`, +then `K'(t, T u) ≤ M₀ K((M₁/M₀) t, u)` for every `t` and `u`. -/ +theorem kFunctional_map_le (T : U →+ V) (hM₀ : M₀ ≠ 0) (hM₀' : M₀ ≠ ∞) + (h₀ : ∀ a, B.norm0 (T a) ≤ M₀ * A.norm0 a) (h₁ : ∀ a, B.norm1 (T a) ≤ M₁ * A.norm1 a) + (t : ℝ≥0∞) (u : U) : B.kFunctional t (T u) ≤ M₀ * A.kFunctional (M₁ / M₀ * t) u := by + rw [show M₀ * A.kFunctional (M₁ / M₀ * t) u = + ⨅ b, M₀ * (A.norm0 (u - b) + M₁ / M₀ * t * A.norm1 b) from ENNReal.mul_iInf_of_ne hM₀ hM₀'] + refine le_iInf fun b => ?_ + rw [ENNReal.mul_add_div_mul_mul hM₀ hM₀'] + exact kFunctional_map_le_of_decomp (by rw [← map_add, sub_add_cancel]) (h₀ _) (h₁ _) + +/-- **The K-functional under a map that is additive on pieces of finite norm** (the Remark after +Bergh–Löfström, Theorem 3.1.2): if `T u = T (u - b) + T b` whenever `N₀(u - b) < ∞` and +`N₁(b) < ∞`, `N_i'(T a) ≤ M_i N_i(a)` for every `a`, `0 < M₀ < ∞`, `M₁ ≠ 0` and `t ≠ 0`, then +`K'(t, T u) ≤ M₀ K((M₁/M₀) t, u)`. The decompositions with a piece of infinite norm give the +term `∞`. -/ +theorem kFunctional_map_le_of_additiveOn {T : U → V} {u : U} (hM₀ : M₀ ≠ 0) (hM₀' : M₀ ≠ ∞) + (hM₁ : M₁ ≠ 0) (ht : t ≠ 0) + (hT : ∀ b, A.norm0 (u - b) ≠ ∞ → A.norm1 b ≠ ∞ → T u = T (u - b) + T b) + (h₀ : ∀ a, B.norm0 (T a) ≤ M₀ * A.norm0 a) (h₁ : ∀ a, B.norm1 (T a) ≤ M₁ * A.norm1 a) : + B.kFunctional t (T u) ≤ M₀ * A.kFunctional (M₁ / M₀ * t) u := by + rw [show M₀ * A.kFunctional (M₁ / M₀ * t) u = + ⨅ b, M₀ * (A.norm0 (u - b) + M₁ / M₀ * t * A.norm1 b) from ENNReal.mul_iInf_of_ne hM₀ hM₀'] + refine le_iInf fun b => ?_ + rw [ENNReal.mul_add_div_mul_mul hM₀ hM₀'] + rcases eq_or_ne (A.norm0 (u - b)) ∞ with h | h + · rw [h, ENNReal.mul_top hM₀, top_add] + exact le_top + rcases eq_or_ne (A.norm1 b) ∞ with h' | h' + · rw [h', ENNReal.mul_top hM₁, ENNReal.mul_top ht, add_top] + exact le_top + exact kFunctional_map_le_of_decomp (hT b h h') (h₀ _) (h₁ _) + +/-! ### Exactness of exponent `θ` -/ + +/-- **The K-norm under a rescaled bound of the K-functional**: if `0 < M₀, M₁ < ∞` and +`K'(t, v) ≤ M₀ K((M₁/M₀) t, u)` for every `0 < t < ∞`, then +`‖v‖_{K,θ,q} ≤ M₀^(1-θ) M₁^θ ‖u‖_{K,θ,q}`, by the dilation formula for `Φ_{θ,q}`. -/ +theorem kMethodNorm_le_of_kFunctional_le {v : V} {u : U} (hM₀ : M₀ ≠ 0) (hM₀' : M₀ ≠ ∞) + (hM₁ : M₁ ≠ 0) (hM₁' : M₁ ≠ ∞) + (h : ∀ t, t ≠ 0 → t ≠ ∞ → B.kFunctional t v ≤ M₀ * A.kFunctional (M₁ / M₀ * t) u) : + B.kMethodNorm θ q v ≤ M₀ ^ (1 - θ) * M₁ ^ θ * A.kMethodNorm θ q u := by + have hc0 : M₁ / M₀ ≠ 0 := ENNReal.div_ne_zero.2 ⟨hM₁, hM₀'⟩ + have hc : M₁ / M₀ ≠ ∞ := ENNReal.div_ne_top hM₁' hM₀ + have hK : Measurable fun t => A.kFunctional (M₁ / M₀ * t) u := + ((monotone_kFunctional u).comp fun _ _ hst => by gcongr).measurable + calc B.kMethodNorm θ q v + ≤ ApproximationScheme.phiFunctional θ q (fun t => M₀ * A.kFunctional (M₁ / M₀ * t) u) := + ApproximationScheme.phiFunctional_mono (monotone_kFunctional v).measurable h + _ = M₀ * ((M₁ / M₀) ^ θ * A.kMethodNorm θ q u) := by + rw [ApproximationScheme.phiFunctional_const_mul M₀ hK, + ApproximationScheme.phiFunctional_comp_mul (φ := fun t => A.kFunctional t u) hc0 hc + (monotone_kFunctional u).measurable] + rfl + _ = M₀ ^ (1 - θ) * M₁ ^ θ * A.kMethodNorm θ q u := by + rw [← mul_assoc, ENNReal.mul_div_rpow_eq hM₀ hM₀'] + +/-- **The interpolation property of the K-method** (Bergh–Löfström, Theorems 3.1.2 and 3.11.2): +the K-method is exact of exponent `θ`. If `T : U → V` is additive with `N₀'(T a) ≤ M₀ N₀(a)` +and `N₁'(T a) ≤ M₁ N₁(a)` for every `a`, and `0 < M₀, M₁ < ∞`, then +`‖T u‖_{K,θ,q} ≤ M₀^(1-θ) M₁^θ ‖u‖_{K,θ,q}` for every `θ`, `q` and `u`. Bounds with `M_i = 0` +can be enlarged. -/ +theorem kMethodNorm_map_le (T : U →+ V) (hM₀ : M₀ ≠ 0) (hM₀' : M₀ ≠ ∞) (hM₁ : M₁ ≠ 0) + (hM₁' : M₁ ≠ ∞) (h₀ : ∀ a, B.norm0 (T a) ≤ M₀ * A.norm0 a) + (h₁ : ∀ a, B.norm1 (T a) ≤ M₁ * A.norm1 a) (u : U) : + B.kMethodNorm θ q (T u) ≤ M₀ ^ (1 - θ) * M₁ ^ θ * A.kMethodNorm θ q u := + kMethodNorm_le_of_kFunctional_le hM₀ hM₀' hM₁ hM₁' fun t _ _ => + kFunctional_map_le T hM₀ hM₀' h₀ h₁ t u + +/-- **The interpolation property for maps additive on pieces of finite norm**: if +`T u = T (u - b) + T b` whenever `N₀(u - b) < ∞` and `N₁(b) < ∞`, `N_i'(T a) ≤ M_i N_i(a)` for +every `a`, and `0 < M₀, M₁ < ∞`, then `‖T u‖_{K,θ,q} ≤ M₀^(1-θ) M₁^θ ‖u‖_{K,θ,q}`. -/ +theorem kMethodNorm_map_le_of_additiveOn {T : U → V} {u : U} (hM₀ : M₀ ≠ 0) (hM₀' : M₀ ≠ ∞) + (hM₁ : M₁ ≠ 0) (hM₁' : M₁ ≠ ∞) + (hT : ∀ b, A.norm0 (u - b) ≠ ∞ → A.norm1 b ≠ ∞ → T u = T (u - b) + T b) + (h₀ : ∀ a, B.norm0 (T a) ≤ M₀ * A.norm0 a) (h₁ : ∀ a, B.norm1 (T a) ≤ M₁ * A.norm1 a) : + B.kMethodNorm θ q (T u) ≤ M₀ ^ (1 - θ) * M₁ ^ θ * A.kMethodNorm θ q u := + kMethodNorm_le_of_kFunctional_le hM₀ hM₀' hM₁ hM₁' fun _ ht _ => + kFunctional_map_le_of_additiveOn hM₀ hM₀' hM₁ ht hT h₀ h₁ + +/-- **Interpolation spaces are mapped into interpolation spaces**: if `T : U → V` is additive +with `N_i'(T a) ≤ M_i N_i(a)` for every `a` and finite `M₀, M₁`, then `T u ∈ (X₀', X₁')_{θ,q}` +for every `u ∈ (X₀, X₁)_{θ,q}`. The bounds hold with the constants `max(1, M_i) ∈ (0, ∞)` +(Mathlib's `mul_le_mul_of_nonneg_right` and `le_max_right`), and `kMethodNorm_map_le` applies. -/ +theorem MemKMethod.map (T : U →+ V) (hM₀ : M₀ ≠ ∞) (hM₁ : M₁ ≠ ∞) + (h₀ : ∀ a, B.norm0 (T a) ≤ M₀ * A.norm0 a) (h₁ : ∀ a, B.norm1 (T a) ≤ M₁ * A.norm1 a) + {u : U} (hu : A.MemKMethod θ q u) : B.MemKMethod θ q (T u) := by + have hN₀ : max 1 M₀ ≠ ∞ := max_ne_top ENNReal.one_ne_top hM₀ + have hN₁ : max 1 M₁ ≠ ∞ := max_ne_top ENNReal.one_ne_top hM₁ + have hP₀ : max 1 M₀ ≠ 0 := (zero_lt_one.trans_le (le_max_left _ _)).ne' + have hP₁ : max 1 M₁ ≠ 0 := (zero_lt_one.trans_le (le_max_left _ _)).ne' + exact (kMethodNorm_map_le T hP₀ hN₀ hP₁ hN₁ + (fun a => (h₀ a).trans (mul_le_mul_of_nonneg_right (le_max_right 1 M₀) zero_le)) + (fun a => (h₁ a).trans (mul_le_mul_of_nonneg_right (le_max_right 1 M₁) zero_le)) u).trans_lt + (ENNReal.mul_lt_top (ENNReal.rpow_mul_rpow_ne_top hP₀ hN₀ hP₁ hN₁ θ).lt_top hu) + +/-- **The discrete K-norm under a bound of the continuous K-norms**: for `θ ≥ 0` and `ρ > 0`, if +`‖v‖_{K,θ,q} ≤ M ‖u‖_{K,θ,q}`, then the discrete K-norms on the grid `t = 2^(nρ)` satisfy +`‖v‖^ℤ_{θ,ρ,q} ≤ 2^(2ρθ) M ‖u‖^ℤ_{θ,ρ,q}`: the two comparisons of the discrete with the continuous +K-method lose `2^(ρθ)` each. -/ +theorem discreteKMethodNorm_le_of_kMethodNorm_le {v : V} {u : U} {M : ℝ≥0∞} (hθ : 0 ≤ θ) + (hρ : 0 < ρ) (h : B.kMethodNorm θ q v ≤ M * A.kMethodNorm θ q u) : + B.discreteKMethodNorm θ ρ q v ≤ 2 ^ (2 * (ρ * θ)) * M * A.discreteKMethodNorm θ ρ q u := by + have hL0 := ApproximationScheme.ofReal_mul_log_two_rpow_ne_zero hρ q + have hLt : ENNReal.ofReal (ρ * Real.log 2) ^ (1 / q.toReal) ≠ ∞ := + ENNReal.rpow_ne_top_of_nonneg (by positivity) ENNReal.ofReal_ne_top + have h2 : (2 : ℝ≥0∞) ^ (-(ρ * θ)) ≠ 0 := (ENNReal.rpow_pos two_pos ENNReal.ofNat_ne_top).ne' + have h2t : (2 : ℝ≥0∞) ^ (-(ρ * θ)) ≠ ∞ := ENNReal.two_rpow_ne_top _ + have e : (2 : ℝ≥0∞) ^ (ρ * θ) = 2 ^ (-(ρ * θ)) * 2 ^ (2 * (ρ * θ)) := by + rw [← ENNReal.rpow_add _ _ two_ne_zero ENNReal.ofNat_ne_top] + congr 1 + ring + refine (ENNReal.mul_le_mul_iff_right (a := ENNReal.ofReal (ρ * Real.log 2) ^ (1 / q.toReal) * + 2 ^ (-(ρ * θ))) (mul_ne_zero hL0 h2) (ENNReal.mul_ne_top hLt h2t)).1 ?_ + calc ENNReal.ofReal (ρ * Real.log 2) ^ (1 / q.toReal) * 2 ^ (-(ρ * θ)) * + B.discreteKMethodNorm θ ρ q v + = ENNReal.ofReal (ρ * Real.log 2) ^ (1 / q.toReal) * + (2 ^ (-(ρ * θ)) * B.discreteKMethodNorm θ ρ q v) := mul_assoc _ _ _ + _ ≤ M * A.kMethodNorm θ q u := (discreteKMethodNorm_le_kMethodNorm hθ hρ v).trans h + _ ≤ M * (ENNReal.ofReal (ρ * Real.log 2) ^ (1 / q.toReal) * + (2 ^ (ρ * θ) * A.discreteKMethodNorm θ ρ q u)) := by + gcongr + exact kMethodNorm_le_discreteKMethodNorm hθ hρ u + _ = _ := by + rw [e] + ring + +/-- **The interpolation property for the discrete K-method**: under the hypotheses of +`kMethodNorm_map_le`, for `θ ≥ 0` and `ρ > 0`, the discrete K-norms on the grid `t = 2^(nρ)` +satisfy `‖T u‖^ℤ_{θ,ρ,q} ≤ 2^(2ρθ) M₀^(1-θ) M₁^θ ‖u‖^ℤ_{θ,ρ,q}`. -/ +theorem discreteKMethodNorm_map_le (T : U →+ V) (hM₀ : M₀ ≠ 0) (hM₀' : M₀ ≠ ∞) (hM₁ : M₁ ≠ 0) + (hM₁' : M₁ ≠ ∞) (h₀ : ∀ a, B.norm0 (T a) ≤ M₀ * A.norm0 a) + (h₁ : ∀ a, B.norm1 (T a) ≤ M₁ * A.norm1 a) (hθ : 0 ≤ θ) (hρ : 0 < ρ) (u : U) : + B.discreteKMethodNorm θ ρ q (T u) ≤ + 2 ^ (2 * (ρ * θ)) * (M₀ ^ (1 - θ) * M₁ ^ θ) * A.discreteKMethodNorm θ ρ q u := + discreteKMethodNorm_le_of_kMethodNorm_le hθ hρ (kMethodNorm_map_le T hM₀ hM₀' hM₁ hM₁' h₀ h₁ u) + +/-! ### Retracts -/ + +/-- **The K-norm on a retract**: if `R : U → V` is additive with `N_i'(R a) ≤ M_i N_i(a)` and +`0 < M_i < ∞`, then for every map `E : V → U` with `R (E v) = v`, +`‖v‖_{K,θ,q} ≤ M₀^(1-θ) M₁^θ ‖E v‖_{K,θ,q}`; for additive `E` the reverse bound is +`kMethodNorm_map_le` for `E`. -/ +theorem kMethodNorm_le_of_retract (R : U →+ V) (E : V → U) (hRE : ∀ v, R (E v) = v) + (hM₀ : M₀ ≠ 0) (hM₀' : M₀ ≠ ∞) (hM₁ : M₁ ≠ 0) (hM₁' : M₁ ≠ ∞) + (hR₀ : ∀ a, B.norm0 (R a) ≤ M₀ * A.norm0 a) (hR₁ : ∀ a, B.norm1 (R a) ≤ M₁ * A.norm1 a) + (v : V) : B.kMethodNorm θ q v ≤ M₀ ^ (1 - θ) * M₁ ^ θ * A.kMethodNorm θ q (E v) := by + simpa only [hRE] using kMethodNorm_map_le R hM₀ hM₀' hM₁ hM₁' hR₀ hR₁ (E v) + +/-- **Interpolation of retracts** (Bergh–Löfström, Theorem 6.4.2): if `R : U → V` and +`E : V → U` are additive with `R (E v) = v`, `N_i'(R a) ≤ M_i N_i(a)` and +`N_i(E v) ≤ L_i N_i'(v)` with finite `M_i, L_i`, then `v ∈ (X₀', X₁')_{θ,q}` if and only if +`E v ∈ (X₀, X₁)_{θ,q}`. -/ +theorem memKMethod_iff_of_retract (R : U →+ V) (E : V →+ U) (hRE : ∀ v, R (E v) = v) + {L₀ L₁ : ℝ≥0∞} (hM₀ : M₀ ≠ ∞) (hM₁ : M₁ ≠ ∞) (hL₀ : L₀ ≠ ∞) (hL₁ : L₁ ≠ ∞) + (hR₀ : ∀ a, B.norm0 (R a) ≤ M₀ * A.norm0 a) (hR₁ : ∀ a, B.norm1 (R a) ≤ M₁ * A.norm1 a) + (hE₀ : ∀ v, A.norm0 (E v) ≤ L₀ * B.norm0 v) (hE₁ : ∀ v, A.norm1 (E v) ≤ L₁ * B.norm1 v) + {v : V} : B.MemKMethod θ q v ↔ A.MemKMethod θ q (E v) := + ⟨fun h => h.map E hL₀ hL₁ hE₀ hE₁, + fun h => by simpa only [hRE] using h.map R hM₀ hM₁ hR₀ hR₁⟩ + +/-- **The space of a retract is the image of the space** (Bergh–Löfström, Theorem 6.4.2): under +the hypotheses of `memKMethod_iff_of_retract`, `(X₀', X₁')_{θ,q} = R((X₀, X₁)_{θ,q})`, that is, +`v ∈ (X₀', X₁')_{θ,q}` if and only if `v = R u` for some `u ∈ (X₀, X₁)_{θ,q}`. -/ +theorem memKMethod_iff_exists_map_eq (R : U →+ V) (E : V →+ U) (hRE : ∀ v, R (E v) = v) + {L₀ L₁ : ℝ≥0∞} (hM₀ : M₀ ≠ ∞) (hM₁ : M₁ ≠ ∞) (hL₀ : L₀ ≠ ∞) (hL₁ : L₁ ≠ ∞) + (hR₀ : ∀ a, B.norm0 (R a) ≤ M₀ * A.norm0 a) (hR₁ : ∀ a, B.norm1 (R a) ≤ M₁ * A.norm1 a) + (hE₀ : ∀ v, A.norm0 (E v) ≤ L₀ * B.norm0 v) (hE₁ : ∀ v, A.norm1 (E v) ≤ L₁ * B.norm1 v) + {v : V} : B.MemKMethod θ q v ↔ ∃ u, A.MemKMethod θ q u ∧ R u = v := + ⟨fun h => ⟨E v, h.map E hL₀ hL₁ hE₀ hE₁, hRE v⟩, + fun ⟨_, hu, huv⟩ => huv ▸ hu.map R hM₀ hM₁ hR₀ hR₁⟩ + +end Map + +/-! ### Comparable couples -/ + +section Compare + +variable {U : Type*} [AddCommGroup U] {A B : InterpCouple U} {c₀ c₁ c₀' c₁' : ℝ≥0∞} {θ : ℝ} + {q : ℝ≥0∞} + +/-- **Monotonicity of the K-method in the couple**: if `N₀' ≤ c₀ N₀` and `N₁' ≤ c₁ N₁` with +`0 < c₀, c₁ < ∞`, then `‖u‖'_{K,θ,q} ≤ c₀^(1-θ) c₁^θ ‖u‖_{K,θ,q}` (the identity map in +`kMethodNorm_map_le`). -/ +theorem kMethodNorm_le_of_le (hc₀ : c₀ ≠ 0) (hc₀' : c₀ ≠ ∞) (hc₁ : c₁ ≠ 0) (hc₁' : c₁ ≠ ∞) + (h₀ : ∀ a, B.norm0 a ≤ c₀ * A.norm0 a) (h₁ : ∀ a, B.norm1 a ≤ c₁ * A.norm1 a) (u : U) : + B.kMethodNorm θ q u ≤ c₀ ^ (1 - θ) * c₁ ^ θ * A.kMethodNorm θ q u := + kMethodNorm_map_le (AddMonoidHom.id U) hc₀ hc₀' hc₁ hc₁' h₀ h₁ u + +/-- **Smaller norms give larger interpolation spaces**: if `N₀' ≤ c₀ N₀` and `N₁' ≤ c₁ N₁` with +finite `c₀, c₁`, then `(X₀, X₁)_{θ,q} ⊆ (X₀', X₁')_{θ,q}`. -/ +theorem MemKMethod.of_le (hc₀ : c₀ ≠ ∞) (hc₁ : c₁ ≠ ∞) (h₀ : ∀ a, B.norm0 a ≤ c₀ * A.norm0 a) + (h₁ : ∀ a, B.norm1 a ≤ c₁ * A.norm1 a) {u : U} (hu : A.MemKMethod θ q u) : + B.MemKMethod θ q u := + hu.map (AddMonoidHom.id U) hc₀ hc₁ h₀ h₁ + +/-- **Equivalent couples give the same interpolation spaces**: if `N₀' ≤ c₀ N₀`, `N₁' ≤ c₁ N₁`, +`N₀ ≤ c₀' N₀'` and `N₁ ≤ c₁' N₁'` with finite constants, then +`(X₀, X₁)_{θ,q} = (X₀', X₁')_{θ,q}`. -/ +theorem memKMethod_congr (hc₀ : c₀ ≠ ∞) (hc₁ : c₁ ≠ ∞) (hc₀' : c₀' ≠ ∞) (hc₁' : c₁' ≠ ∞) + (h₀ : ∀ a, B.norm0 a ≤ c₀ * A.norm0 a) (h₁ : ∀ a, B.norm1 a ≤ c₁ * A.norm1 a) + (h₀' : ∀ a, A.norm0 a ≤ c₀' * B.norm0 a) (h₁' : ∀ a, A.norm1 a ≤ c₁' * B.norm1 a) {u : U} : + A.MemKMethod θ q u ↔ B.MemKMethod θ q u := + ⟨MemKMethod.of_le hc₀ hc₁ h₀ h₁, MemKMethod.of_le hc₀' hc₁' h₀' h₁'⟩ + +end Compare + +/-! ### Couples of bounded linear maps -/ + +section OfMap + +variable {X Y X' Y' : Type*} [NormedAddCommGroup X] [NormedSpace ℝ X] + [NormedAddCommGroup Y] [NormedSpace ℝ Y] [NormedAddCommGroup X'] [NormedSpace ℝ X'] + [NormedAddCommGroup Y'] [NormedSpace ℝ Y'] {ι : Y →L[ℝ] X} {ι' : Y' →L[ℝ] X'} + +/-- A bounded linear map `T : X → X'` satisfies `‖T f‖ ≤ ‖T‖ ‖f‖` for the first norms of +`ofMap ι` and `ofMap ι'`. -/ +theorem norm0_ofMap_apply_le (T : X →L[ℝ] X') (f : X) : + (ofMap ι').norm0 (T f) ≤ ‖T‖ₑ * (ofMap ι).norm0 f := + T.le_opENorm f + +/-- **The quotient norms under compatible maps**: if `T ι = ι' S` and `‖S‖ ≤ M` with +`0 < M < ∞`, then `N₁'(T f) ≤ M N₁(f)`, since `ι y = f` gives `ι' (S y) = T f`. -/ +theorem norm1_ofMap_apply_le {T : X →L[ℝ] X'} {S : Y →L[ℝ] Y'} (hTS : T.comp ι = ι'.comp S) + {M : ℝ≥0∞} (hM0 : M ≠ 0) (hM : M ≠ ∞) (hS : ‖S‖ₑ ≤ M) (f : X) : + (ofMap ι').norm1 (T f) ≤ M * (ofMap ι).norm1 f := by + rw [ofMap_norm1 (ι := ι) f, ENNReal.mul_iInf_of_ne hM0 hM] + refine le_iInf fun y => ?_ + obtain ⟨y, rfl⟩ := y + refine (norm1_ofMap_le (y := S y) ?_).trans ((S.le_opENorm y).trans (by gcongr)) + rw [← ContinuousLinearMap.comp_apply ι' S, ← hTS, ContinuousLinearMap.comp_apply] + +end OfMap + +end InterpCouple + +/-! ### The interpolation property for the spaces of a bounded linear map -/ + +namespace ApproximationScheme + +variable {X Y X' Y' : Type*} [NormedAddCommGroup X] [NormedSpace ℝ X] + [NormedAddCommGroup Y] [NormedSpace ℝ Y] [NormedAddCommGroup X'] [NormedSpace ℝ X'] + [NormedAddCommGroup Y'] [NormedSpace ℝ Y'] {ι : Y →L[ℝ] X} {ι' : Y' →L[ℝ] X'} + {θ ρ : ℝ} {q M₀ M₁ : ℝ≥0∞} + +/-- **The interpolation property for the couples `(X, ι(Y))`**: if `T : X → X'` and +`S : Y → Y'` are bounded linear maps with `T ι = ι' S`, `‖T‖ ≤ M₀`, `‖S‖ ≤ M₁` and +`0 < M₀, M₁ < ∞`, then `‖T f‖_{K,θ,q} ≤ M₀^(1-θ) M₁^θ ‖f‖_{K,θ,q}`. -/ +theorem kMethodNorm_map_le_of_comp_eq (T : X →L[ℝ] X') (S : Y →L[ℝ] Y') + (hTS : T.comp ι = ι'.comp S) (h₀ : ‖T‖ₑ ≤ M₀) (h₁ : ‖S‖ₑ ≤ M₁) (hM₀ : M₀ ≠ 0) + (hM₀' : M₀ ≠ ∞) (hM₁ : M₁ ≠ 0) (hM₁' : M₁ ≠ ∞) (f : X) : + kMethodNorm ι' θ q (T f) ≤ M₀ ^ (1 - θ) * M₁ ^ θ * kMethodNorm ι θ q f := by + rw [← InterpCouple.kMethodNorm_ofMap, ← InterpCouple.kMethodNorm_ofMap] + exact InterpCouple.kMethodNorm_map_le (T : X →+ X') hM₀ hM₀' hM₁ hM₁' + (fun a => (InterpCouple.norm0_ofMap_apply_le T a).trans (by gcongr)) + (InterpCouple.norm1_ofMap_apply_le hTS hM₁ hM₁' h₁) f + +/-- **The interpolation property on the grid `2^(-kρ)`**: under the hypotheses of +`kMethodNorm_map_le_of_comp_eq`, for `θ ≥ 0`, `ρ > 0` and `q ≠ 0`, +`‖T f‖_{θ,q} ≤ c' M₀^(1-θ) M₁^θ c ‖f‖_{θ,q}` with `c = kMethodUpperConst θ ρ q`, finite for +`θ > 0` (`kMethodUpperConst_ne_top`), and `c' = kMethodLowerConst ι' θ ρ q`, finite for `ρ > 0` +(`kMethodLowerConst_ne_top`). -/ +theorem interpNorm_map_le_of_comp_eq (T : X →L[ℝ] X') (S : Y →L[ℝ] Y') + (hTS : T.comp ι = ι'.comp S) (h₀ : ‖T‖ₑ ≤ M₀) (h₁ : ‖S‖ₑ ≤ M₁) (hM₀ : M₀ ≠ 0) + (hM₀' : M₀ ≠ ∞) (hM₁ : M₁ ≠ 0) (hM₁' : M₁ ≠ ∞) (hθ : 0 ≤ θ) (hρ : 0 < ρ) (hq : q ≠ 0) + (f : X) : interpNorm ι' θ ρ q (T f) ≤ kMethodLowerConst ι' θ ρ q * + (M₀ ^ (1 - θ) * M₁ ^ θ) * kMethodUpperConst θ ρ q * interpNorm ι θ ρ q f := + calc interpNorm ι' θ ρ q (T f) ≤ kMethodLowerConst ι' θ ρ q * kMethodNorm ι' θ q (T f) := + interpNorm_le_kMethodNorm hθ hρ hq (T f) + _ ≤ kMethodLowerConst ι' θ ρ q * (M₀ ^ (1 - θ) * M₁ ^ θ * + (kMethodUpperConst θ ρ q * interpNorm ι θ ρ q f)) := by + gcongr + exact (kMethodNorm_map_le_of_comp_eq T S hTS h₀ h₁ hM₀ hM₀' hM₁ hM₁' f).trans + (by gcongr; exact kMethodNorm_le_interpNorm hθ hρ f) + _ = _ := by ring + +/-- **The spaces of the continuous K-method under compatible maps**: if `T : X → X'` and +`S : Y → Y'` are bounded linear maps with `T ι = ι' S`, then `T` maps `(X, Y)_{θ,q}` into +`(X', Y')_{θ,q}`. -/ +theorem MemKMethod.map (T : X →L[ℝ] X') (S : Y →L[ℝ] Y') (hTS : T.comp ι = ι'.comp S) {f : X} + (hf : MemKMethod ι θ q f) : MemKMethod ι' θ q (T f) := + InterpCouple.memKMethod_ofMap_iff.1 ((InterpCouple.memKMethod_ofMap_iff.2 hf).map (T : X →+ X') + eNorm_ne_top (max_ne_top ENNReal.one_ne_top eNorm_ne_top) (InterpCouple.norm0_ofMap_apply_le T) + (InterpCouple.norm1_ofMap_apply_le hTS (zero_lt_one.trans_le (le_max_left _ _)).ne' + (max_ne_top ENNReal.one_ne_top eNorm_ne_top) (le_max_right _ _))) + +/-- **The spaces of the discrete K-method under compatible maps**: if `T : X → X'` and +`S : Y → Y'` are bounded linear maps with `T ι = ι' S`, then for `θ > 0` and `ρ > 0` the map `T` +sends the space of the discrete K-method on the grid `2^(-kρ)` for `ι` into that for `ι'`. -/ +theorem MemInterp.map (T : X →L[ℝ] X') (S : Y →L[ℝ] Y') (hTS : T.comp ι = ι'.comp S) + (hθ : 0 < θ) (hρ : 0 < ρ) {f : X} (hf : MemInterp ι θ ρ q f) : MemInterp ι' θ ρ q (T f) := + (memInterp_iff_memKMethod hθ hρ).2 (((memInterp_iff_memKMethod hθ hρ).1 hf).map T S hTS) + +end ApproximationScheme diff --git a/LeanPool/FunctionSpaces/ApproximationSpaces/Interpolation/Reiteration.lean b/LeanPool/FunctionSpaces/ApproximationSpaces/Interpolation/Reiteration.lean new file mode 100644 index 0000000000..5bd5aef139 --- /dev/null +++ b/LeanPool/FunctionSpaces/ApproximationSpaces/Interpolation/Reiteration.lean @@ -0,0 +1,781 @@ +/- +Copyright (c) 2026 Mario Ullrich. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Mario Ullrich +-/ +module + +public import LeanPool.FunctionSpaces.ApproximationSpaces.Interpolation.Property +public import LeanPool.FunctionSpaces.ApproximationSpaces.Sequences.Hardy + +/- +Modified for Lean Pool: module names and imports adapted. +-/ + +/-! +# The reiteration theorem + +For a couple `A = (N₀, N₁)` quasi-normed with constant `C`, the discrete K-norms +`‖u‖_{θ,q} = ‖(2^(-nθ) K(2^n, u))_{n ∈ ℤ}‖_{ℓ_q}` with `1 ≤ q ≤ ∞` are quasi-norms with the same +constant (`InterpCouple.discreteKMethodNorm_add_le` of `ApproximationSpaces.Interpolation.Couple`), +and they form the **couple of K-spaces** +`(‖·‖_{θ₀,q₀}, ‖·‖_{θ₁,q₁})` (`InterpCouple.kCouple`) and the endpoint couples +`(N₀, ‖·‖_{θ₁,q₁})` and `(‖·‖_{θ₀,q₀}, N₁)` (`InterpCouple.leftKCouple`, +`InterpCouple.rightKCouple`). The **reiteration theorem** (Bergh–Löfström, Theorems 3.5.3 and +3.11.5) says that for `0 < θ₀ < θ₁ < 1`, `0 < η < 1` and `θ = (1 - η) θ₀ + η θ₁`, +`((X₀, X₁)_{θ₀,q₀}, (X₀, X₁)_{θ₁,q₁})_{η,q} = (X₀, X₁)_{θ,q}` +(`InterpCouple.memKMethod_kCouple_iff`), also for the continuous K-norms +(`InterpCouple.memKMethod_kMethodCouple_iff`), the endpoint couples +(`InterpCouple.memKMethod_leftKCouple_iff`, `InterpCouple.memKMethod_rightKCouple_iff`) and the +couples of bounded linear maps (`ApproximationScheme.memKMethod_reiteration`). + +The inclusion `⊆` is the class `C_K` (Bergh–Löfström, Definition 3.5.1): +`K(2^n, a) ≤ 2^(nθ_i) ‖a‖_{θ_i,q_i}` gives `‖u‖_{θ,q} ≤ C ‖u‖_{η,q}` termwise +(`InterpCouple.discreteKMethodNorm_le_of_kFunctional_le`). The inclusion `⊇` rests on +**Holmstedt's formula** (Holmstedt 1970; Bergh–Löfström, Theorem 3.6.1) in discrete form, with +`ℓ₁` sums in place of the `ℓ_{q_i}` norms of Theorem 3.6.1, which is enough for the reiteration +theorem: with `S₀(m) = ∑_{n < m} 2^(-nθ₀) K(2^n, u)` and `S₁(m) = ∑_{n ≥ m} 2^(-nθ₁) K(2^n, u)` +(`InterpCouple.kSumBelow`, `InterpCouple.kSumAbove`), the K-functional `K̄` of the couple of +K-spaces satisfies `K̄(2^(m(θ₁-θ₀)), u) ≤ c (S₀(m) + 2^(m(θ₁-θ₀)) S₁(m))` +(`InterpCouple.kFunctional_kCouple_le`; the endpoint versions are +`InterpCouple.kFunctional_leftKCouple_le` and `InterpCouple.kFunctional_rightKCouple_le`). The +proof bounds the two discrete K-norms of `u - b` and `b` for every `b` by geometric sums and +takes the infimum over `b`. Multiplied by +`2^(-mη(θ₁-θ₀))`, the two sums become the geometric convolutions of +`(2^(-nθ) K(2^n, u))_n` of `ApproximationSpaces.Sequences.Hardy` +(`InterpCouple.kCouple_discreteKMethodNorm_le`). The constants are the named definitions +`InterpCouple.holmstedtConst`, `InterpCouple.reiterationConst` and their endpoint versions. +-/ + +@[expose] public section + +open MeasureTheory Set Function +open scoped ENNReal +open ENNReal (lqNorm dyadicWeight) + +namespace InterpCouple + +open ENNReal (two_rpow_mul_two_rpow) + +variable {U : Type*} [AddCommGroup U] {A : InterpCouple U} {C : ℝ≥0∞} + {θ θ₀ θ₁ η ρ : ℝ} {q q₀ q₁ : ℝ≥0∞} + +/-! ### Couples of K-spaces -/ + +/-- The **couple of two K-spaces** `((X₀, X₁)_{θ₀,q₀}, (X₀, X₁)_{θ₁,q₁})`, with the discrete +K-norms `‖u‖_{θ_i,q_i} = ‖(2^(-nθ_i) K(2^n, u))_{n ∈ ℤ}‖_{ℓ_{q_i}}` on the grid `t = 2^n`. -/ +noncomputable def kCouple (A : InterpCouple U) (θ₀ : ℝ) (q₀ : ℝ≥0∞) (θ₁ : ℝ) (q₁ : ℝ≥0∞) : + InterpCouple U := + ⟨A.discreteKMethodNorm θ₀ 1 q₀, A.discreteKMethodNorm θ₁ 1 q₁⟩ + +/-- The **left endpoint couple** `(X₀, (X₀, X₁)_{θ₁,q₁})`: the norm `N₀` and the discrete K-norm +`‖·‖_{θ₁,q₁}` on the grid `t = 2^n`. -/ +noncomputable def leftKCouple (A : InterpCouple U) (θ₁ : ℝ) (q₁ : ℝ≥0∞) : InterpCouple U := + ⟨A.norm0, A.discreteKMethodNorm θ₁ 1 q₁⟩ + +/-- The **right endpoint couple** `((X₀, X₁)_{θ₀,q₀}, X₁)`: the discrete K-norm `‖·‖_{θ₀,q₀}` on +the grid `t = 2^n` and the norm `N₁`. -/ +noncomputable def rightKCouple (A : InterpCouple U) (θ₀ : ℝ) (q₀ : ℝ≥0∞) : InterpCouple U := + ⟨A.discreteKMethodNorm θ₀ 1 q₀, A.norm1⟩ + +/-- The couple of two K-spaces with the **continuous K-norms** `‖·‖_{K,θ₀,q₀}` and +`‖·‖_{K,θ₁,q₁}`. -/ +noncomputable def kMethodCouple (A : InterpCouple U) (θ₀ : ℝ) (q₀ : ℝ≥0∞) (θ₁ : ℝ) + (q₁ : ℝ≥0∞) : InterpCouple U := + ⟨A.kMethodNorm θ₀ q₀, A.kMethodNorm θ₁ q₁⟩ + +/-- The couple of two K-spaces of a couple quasi-normed with constant `C` is quasi-normed with +constant `C`, for `q₀, q₁ ≥ 1`. -/ +theorem isQuasiNormed_kCouple (hA : A.IsQuasiNormed C) (hq₀ : 1 ≤ q₀) (hq₁ : 1 ≤ q₁) : + (A.kCouple θ₀ q₀ θ₁ q₁).IsQuasiNormed C where + ne_top := hA.ne_top + norm0_zero := discreteKMethodNorm_zero hA.norm0_zero hA.norm1_zero + norm1_zero := discreteKMethodNorm_zero hA.norm0_zero hA.norm1_zero + norm0_neg := discreteKMethodNorm_neg hA.norm0_neg hA.norm1_neg + norm1_neg := discreteKMethodNorm_neg hA.norm0_neg hA.norm1_neg + norm0_add_le := discreteKMethodNorm_add_le hA hq₀ + norm1_add_le := discreteKMethodNorm_add_le hA hq₁ + +/-- The left endpoint couple of a couple quasi-normed with constant `C` is quasi-normed with +constant `C`, for `q₁ ≥ 1`. -/ +theorem isQuasiNormed_leftKCouple (hA : A.IsQuasiNormed C) (hq₁ : 1 ≤ q₁) : + (A.leftKCouple θ₁ q₁).IsQuasiNormed C where + ne_top := hA.ne_top + norm0_zero := hA.norm0_zero + norm1_zero := discreteKMethodNorm_zero hA.norm0_zero hA.norm1_zero + norm0_neg := hA.norm0_neg + norm1_neg := discreteKMethodNorm_neg hA.norm0_neg hA.norm1_neg + norm0_add_le := hA.norm0_add_le + norm1_add_le := discreteKMethodNorm_add_le hA hq₁ + +/-- The right endpoint couple of a couple quasi-normed with constant `C` is quasi-normed with +constant `C`, for `q₀ ≥ 1`. -/ +theorem isQuasiNormed_rightKCouple (hA : A.IsQuasiNormed C) (hq₀ : 1 ≤ q₀) : + (A.rightKCouple θ₀ q₀).IsQuasiNormed C where + ne_top := hA.ne_top + norm0_zero := discreteKMethodNorm_zero hA.norm0_zero hA.norm1_zero + norm1_zero := hA.norm1_zero + norm0_neg := discreteKMethodNorm_neg hA.norm0_neg hA.norm1_neg + norm1_neg := hA.norm1_neg + norm0_add_le := discreteKMethodNorm_add_le hA hq₀ + norm1_add_le := hA.norm1_add_le + +/-- **The right endpoint couple is a swapped left endpoint couple**: +`((X₀, X₁)_{θ₀,q₀}, X₁)` is the swap of `(X₁, (X₁, X₀)_{1-θ₀,q₀})`, by +`discreteKMethodNorm_swap`. -/ +theorem rightKCouple_eq_swap (A : InterpCouple U) (θ₀ : ℝ) (q₀ : ℝ≥0∞) : + A.rightKCouple θ₀ q₀ = (A.swap.leftKCouple (1 - θ₀) q₀).swap := by + have h : A.discreteKMethodNorm θ₀ 1 q₀ = A.swap.discreteKMethodNorm (1 - θ₀) 1 q₀ := by + funext u + rw [discreteKMethodNorm_swap, sub_sub_cancel] + change (⟨A.discreteKMethodNorm θ₀ 1 q₀, A.norm1⟩ : InterpCouple U) = + ⟨A.swap.discreteKMethodNorm (1 - θ₀) 1 q₀, A.norm1⟩ + rw [h] + +/-! ### The easy inclusion: the class `C_K` -/ + +/-- The termwise bound behind `discreteKMethodNorm_le_of_kFunctional_le`: for a couple `A` +quasi-normed with constant `C` and a couple `B = (M₀, M₁)` with +`K_A(2^n, a) ≤ 2^(nθ_i) M_i(a)` for `i = 0, 1`, every `n ∈ ℤ` and every `a`, and for +`θ = (1 - η) θ₀ + η θ₁`, `2^(-nθ) K_A(2^n, u) ≤ C 2^(-n(θ₁-θ₀)η) K_B(2^(n(θ₁-θ₀)), u)`. -/ +theorem discreteKSeq_le_of_kFunctional_le (hA : A.IsQuasiNormed C) {B : InterpCouple U} + (h₀ : ∀ (n : ℤ) a, A.kFunctional (2 ^ (n : ℝ)) a ≤ 2 ^ ((n : ℝ) * θ₀) * B.norm0 a) + (h₁ : ∀ (n : ℤ) a, A.kFunctional (2 ^ (n : ℝ)) a ≤ 2 ^ ((n : ℝ) * θ₁) * B.norm1 a) + (η : ℝ) (u : U) (n : ℤ) : + A.discreteKSeq ((1 - η) * θ₀ + η * θ₁) 1 u n ≤ + C * B.discreteKSeq η (θ₁ - θ₀) u n := by + have hne : C * 2 ^ (-((n : ℝ) * (θ₁ - θ₀) * η)) ≠ ∞ := + ENNReal.mul_ne_top hA.ne_top (ENNReal.two_rpow_ne_top _) + rw [discreteKSeq_one, discreteKSeq, ← mul_assoc] + conv_rhs => rw [kFunctional, ENNReal.mul_iInf fun h => absurd h hne] + refine le_iInf fun b => ?_ + have e₀ : (2 : ℝ≥0∞) ^ (-((n : ℝ) * ((1 - η) * θ₀ + η * θ₁))) * 2 ^ ((n : ℝ) * θ₀) = + 2 ^ (-((n : ℝ) * (θ₁ - θ₀) * η)) := by + rw [two_rpow_mul_two_rpow]; congr 1; ring + have e₁ : (2 : ℝ≥0∞) ^ (-((n : ℝ) * ((1 - η) * θ₀ + η * θ₁))) * 2 ^ ((n : ℝ) * θ₁) = + 2 ^ (-((n : ℝ) * (θ₁ - θ₀) * η)) * 2 ^ ((n : ℝ) * (θ₁ - θ₀)) := by + rw [two_rpow_mul_two_rpow, two_rpow_mul_two_rpow]; congr 1; ring + calc 2 ^ (-((n : ℝ) * ((1 - η) * θ₀ + η * θ₁))) * A.kFunctional (2 ^ (n : ℝ)) u + = 2 ^ (-((n : ℝ) * ((1 - η) * θ₀ + η * θ₁))) * + A.kFunctional (2 ^ (n : ℝ)) ((u - b) + b) := by rw [sub_add_cancel] + _ ≤ 2 ^ (-((n : ℝ) * ((1 - η) * θ₀ + η * θ₁))) * (C * (2 ^ ((n : ℝ) * θ₀) * B.norm0 (u - b) + + 2 ^ ((n : ℝ) * θ₁) * B.norm1 b)) := by + gcongr + exact (kFunctional_add_le hA _ _).trans (by gcongr <;> simp only [h₀, h₁]) + _ = C * ((2 ^ (-((n : ℝ) * ((1 - η) * θ₀ + η * θ₁))) * 2 ^ ((n : ℝ) * θ₀)) * B.norm0 (u - b) + + (2 ^ (-((n : ℝ) * ((1 - η) * θ₀ + η * θ₁))) * 2 ^ ((n : ℝ) * θ₁)) * B.norm1 b) := by + ring + _ = C * 2 ^ (-((n : ℝ) * (θ₁ - θ₀) * η)) * + (B.norm0 (u - b) + 2 ^ ((n : ℝ) * (θ₁ - θ₀)) * B.norm1 b) := by + rw [e₀, e₁]; ring + +/-- **The easy inclusion of the reiteration theorem** (the class `C_K` of Bergh–Löfström, +Definition 3.5.1, and the first half of the proof of Theorem 3.5.3): let `A` be quasi-normed +with constant `C` and let `B = (M₀, M₁)` be a couple with `K_A(2^n, a) ≤ 2^(nθ_i) M_i(a)` for +`i = 0, 1`, every `n ∈ ℤ` and every `a`. Then for `θ = (1 - η) θ₀ + η θ₁`, the discrete +K-norms of `A` on the grid `2^n` and of `B` on the grid `2^(n(θ₁-θ₀))` satisfy +`‖u‖_{θ,q} ≤ C ‖u‖^B_{η,q}`. -/ +theorem discreteKMethodNorm_le_of_kFunctional_le (hA : A.IsQuasiNormed C) {B : InterpCouple U} + (h₀ : ∀ (n : ℤ) a, A.kFunctional (2 ^ (n : ℝ)) a ≤ 2 ^ ((n : ℝ) * θ₀) * B.norm0 a) + (h₁ : ∀ (n : ℤ) a, A.kFunctional (2 ^ (n : ℝ)) a ≤ 2 ^ ((n : ℝ) * θ₁) * B.norm1 a) + (η : ℝ) (q : ℝ≥0∞) (u : U) : + A.discreteKMethodNorm ((1 - η) * θ₀ + η * θ₁) 1 q u ≤ + C * B.discreteKMethodNorm η (θ₁ - θ₀) q u := by + rw [discreteKMethodNorm, discreteKMethodNorm, ← ENNReal.lqNorm_const_mul] + exact ENNReal.lqNorm_mono (discreteKSeq_le_of_kFunctional_le hA h₀ h₁ η u) + +/-- **The easy inclusion for the couple of K-spaces**: for a couple quasi-normed with constant +`C`, `q₀, q₁ ≠ 0` and `θ = (1 - η) θ₀ + η θ₁`, `‖u‖_{θ,q} ≤ C ‖u‖_{η,q}`, where the right side is +the discrete K-norm of `kCouple` on the grid `t = 2^(n(θ₁-θ₀))`. -/ +theorem discreteKMethodNorm_le_kCouple (hA : A.IsQuasiNormed C) (hq₀ : q₀ ≠ 0) (hq₁ : q₁ ≠ 0) + (η : ℝ) (q : ℝ≥0∞) (u : U) : + A.discreteKMethodNorm ((1 - η) * θ₀ + η * θ₁) 1 q u ≤ + C * (A.kCouple θ₀ q₀ θ₁ q₁).discreteKMethodNorm η (θ₁ - θ₀) q u := + discreteKMethodNorm_le_of_kFunctional_le hA + (fun n a => kFunctional_two_rpow_le_discreteKMethodNorm hq₀ n a) + (fun n a => kFunctional_two_rpow_le_discreteKMethodNorm hq₁ n a) η q u + +/-- **The easy inclusion for the left endpoint couple**: for a couple quasi-normed with +constant `C` and `q₁ ≠ 0`, `‖u‖_{ηθ₁,q} ≤ C ‖u‖_{η,q}`, where the right side is the discrete +K-norm of `leftKCouple` on the grid `t = 2^(nθ₁)`. -/ +theorem discreteKMethodNorm_le_leftKCouple (hA : A.IsQuasiNormed C) (hq₁ : q₁ ≠ 0) (η : ℝ) + (q : ℝ≥0∞) (u : U) : + A.discreteKMethodNorm (η * θ₁) 1 q u ≤ + C * (A.leftKCouple θ₁ q₁).discreteKMethodNorm η θ₁ q u := by + have h := discreteKMethodNorm_le_of_kFunctional_le (θ₀ := 0) (B := A.leftKCouple θ₁ q₁) hA + (fun n a => by + rw [mul_zero, ENNReal.rpow_zero, one_mul] + exact kFunctional_le_norm0 hA.norm1_zero a) + (fun n a => kFunctional_two_rpow_le_discreteKMethodNorm hq₁ n a) η q u + simpa only [mul_zero, zero_add, sub_zero] using h + +/-- **The easy inclusion for the right endpoint couple**: for a couple quasi-normed with +constant `C` and `q₀ ≠ 0`, `‖u‖_{(1-η)θ₀+η,q} ≤ C ‖u‖_{η,q}`, where the right side is the +discrete K-norm of `rightKCouple` on the grid `t = 2^(n(1-θ₀))`. -/ +theorem discreteKMethodNorm_le_rightKCouple (hA : A.IsQuasiNormed C) (hq₀ : q₀ ≠ 0) (η : ℝ) + (q : ℝ≥0∞) (u : U) : + A.discreteKMethodNorm ((1 - η) * θ₀ + η) 1 q u ≤ + C * (A.rightKCouple θ₀ q₀).discreteKMethodNorm η (1 - θ₀) q u := by + have h := discreteKMethodNorm_le_of_kFunctional_le (θ₁ := 1) (B := A.rightKCouple θ₀ q₀) hA + (fun n a => kFunctional_two_rpow_le_discreteKMethodNorm hq₀ n a) + (fun n a => by + rw [mul_one] + exact kFunctional_le_mul_norm1 hA.norm0_zero a) η q u + simpa only [mul_one] using h + +/-! ### Holmstedt's formula -/ + +/-- The sum `S₀(m) = ∑_{n < m} 2^(-nθ) K(2^n, u)` of the terms below `m` of the discrete +K-method on the grid `t = 2^n`, indexed by `n = m - (j + 1)`, `j ∈ ℕ`. -/ +noncomputable def kSumBelow (A : InterpCouple U) (θ : ℝ) (u : U) (m : ℤ) : ℝ≥0∞ := + ∑' j : ℕ, A.discreteKSeq θ 1 u (m - (j + 1)) + +/-- The sum `S₁(m) = ∑_{n ≥ m} 2^(-nθ) K(2^n, u)` of the terms from `m` on of the discrete +K-method on the grid `t = 2^n`, indexed by `n = m + j`, `j ∈ ℕ`. -/ +noncomputable def kSumAbove (A : InterpCouple U) (θ : ℝ) (u : U) (m : ℤ) : ℝ≥0∞ := + ∑' j : ℕ, A.discreteKSeq θ 1 u (m + j) + +/-- The discrete K-norm on the grid `2^n` is at most the sum of all its terms, split at `m`: +`‖v‖_{θ,q} ≤ S₁(m) + S₀(m)` for `q ≥ 1`. -/ +theorem discreteKMethodNorm_le_kSumAbove_add_kSumBelow (hq : 1 ≤ q) (m : ℤ) (v : U) : + A.discreteKMethodNorm θ 1 q v ≤ A.kSumAbove θ v m + A.kSumBelow θ v m := + (ENNReal.lqNorm_le_lqNorm_one hq _).trans_eq (ENNReal.tsum_int_eq_tsum_add_tsum_sub m _) + +/-- **The sum from `m` on under a pointwise bound**: if `K(2^n, v) ≤ a K(2^n, u) + X` for every +`n ≥ m`, then `S₁(m; v) ≤ a S₁(m; u) + 2^(-mθ) (1 - 2^(-θ))⁻¹ X`. -/ +theorem kSumAbove_le {u v : U} {a X : ℝ≥0∞} {m : ℤ} + (h : ∀ n : ℤ, m ≤ n → A.kFunctional (2 ^ (n : ℝ)) v ≤ + a * A.kFunctional (2 ^ (n : ℝ)) u + X) : + A.kSumAbove θ v m ≤ + a * A.kSumAbove θ u m + 2 ^ (-((m : ℝ) * θ)) * (1 - (2 : ℝ≥0∞) ^ (-θ))⁻¹ * X := by + have hterm : ∀ j : ℕ, A.discreteKSeq θ 1 v (m + j) ≤ + a * A.discreteKSeq θ 1 u (m + j) + 2 ^ (-((m : ℝ) * θ)) * dyadicWeight (-θ) j * X := by + intro j + have e : (2 : ℝ≥0∞) ^ (-(((m + j : ℤ) : ℝ) * θ)) = + 2 ^ (-((m : ℝ) * θ)) * dyadicWeight (-θ) j := by + rw [dyadicWeight, two_rpow_mul_two_rpow] + congr 1 + push_cast + ring + rw [discreteKSeq_one, discreteKSeq_one] + calc 2 ^ (-(((m + j : ℤ) : ℝ) * θ)) * A.kFunctional (2 ^ ((m + j : ℤ) : ℝ)) v + ≤ 2 ^ (-(((m + j : ℤ) : ℝ) * θ)) * (a * A.kFunctional (2 ^ ((m + j : ℤ) : ℝ)) u + X) := by + gcongr + exact h _ (by omega) + _ = _ := by rw [e]; ring + calc A.kSumAbove θ v m ≤ ∑' j : ℕ, (a * A.discreteKSeq θ 1 u (m + j) + + 2 ^ (-((m : ℝ) * θ)) * dyadicWeight (-θ) j * X) := tsum_le_tsum hterm + _ = _ := by + rw [tsum_add, ENNReal.tsum_mul_left, ENNReal.tsum_mul_right, + ENNReal.tsum_mul_left, ENNReal.tsum_dyadicWeight_neg] + rfl + +/-- **The sum below `m` under a pointwise bound**: if `K(2^n, v) ≤ a K(2^n, u) + 2^(n-m) X` for +every `n < m`, then `S₀(m; v) ≤ a S₀(m; u) + 2^(-mθ) (1 - 2^(-(1-θ)))⁻¹ X`. -/ +theorem kSumBelow_le {u v : U} {a X : ℝ≥0∞} {m : ℤ} + (h : ∀ n : ℤ, n < m → A.kFunctional (2 ^ (n : ℝ)) v ≤ + a * A.kFunctional (2 ^ (n : ℝ)) u + 2 ^ ((n : ℝ) - m) * X) : + A.kSumBelow θ v m ≤ + a * A.kSumBelow θ u m + 2 ^ (-((m : ℝ) * θ)) * (1 - (2 : ℝ≥0∞) ^ (-(1 - θ)))⁻¹ * X := by + have hterm : ∀ j : ℕ, A.discreteKSeq θ 1 v (m - (j + 1)) ≤ a * A.discreteKSeq θ 1 u (m - (j + 1)) + + 2 ^ (-((m : ℝ) * θ)) * dyadicWeight (-(1 - θ)) (j + 1) * X := by + intro j + have e : (2 : ℝ≥0∞) ^ (-(((m - (j + 1) : ℤ) : ℝ) * θ)) * 2 ^ (((m - (j + 1) : ℤ) : ℝ) - m) = + 2 ^ (-((m : ℝ) * θ)) * dyadicWeight (-(1 - θ)) (j + 1) := by + rw [dyadicWeight, two_rpow_mul_two_rpow, two_rpow_mul_two_rpow] + congr 1 + push_cast + ring + rw [discreteKSeq_one, discreteKSeq_one] + calc 2 ^ (-(((m - (j + 1) : ℤ) : ℝ) * θ)) * A.kFunctional (2 ^ ((m - (j + 1) : ℤ) : ℝ)) v + ≤ 2 ^ (-(((m - (j + 1) : ℤ) : ℝ) * θ)) * (a * A.kFunctional (2 ^ ((m - (j + 1) : ℤ) : ℝ)) u + + 2 ^ (((m - (j + 1) : ℤ) : ℝ) - m) * X) := by + gcongr + exact h _ (by omega) + _ = _ := by rw [← e]; ring + calc A.kSumBelow θ v m ≤ ∑' j : ℕ, (a * A.discreteKSeq θ 1 u (m - (j + 1)) + + 2 ^ (-((m : ℝ) * θ)) * dyadicWeight (-(1 - θ)) (j + 1) * X) := tsum_le_tsum hterm + _ = a * A.kSumBelow θ u m + + 2 ^ (-((m : ℝ) * θ)) * (∑' j : ℕ, dyadicWeight (-(1 - θ)) (j + 1)) * X := by + rw [tsum_add, ENNReal.tsum_mul_left, ENNReal.tsum_mul_right, + ENNReal.tsum_mul_left] + rfl + _ ≤ _ := by + gcongr + exact ENNReal.tsum_dyadicWeight_neg_succ_le _ + +/-- `K(2^n, b) ≤ 2^(n-m) (N₀(u - b) + 2^m N₁(b))` if `N₀(0) = 0`, since `K(2^n, b) ≤ 2^n N₁(b)`. -/ +theorem kFunctional_le_two_rpow_sub_mul (h0 : A.norm0 0 = 0) (n m : ℤ) (u b : U) : + A.kFunctional (2 ^ (n : ℝ)) b ≤ + 2 ^ ((n : ℝ) - m) * (A.norm0 (u - b) + 2 ^ (m : ℝ) * A.norm1 b) := + calc A.kFunctional (2 ^ (n : ℝ)) b ≤ 2 ^ (n : ℝ) * A.norm1 b := kFunctional_le_mul_norm1 h0 b + _ = 2 ^ ((n : ℝ) - m) * (2 ^ (m : ℝ) * A.norm1 b) := by + rw [← mul_assoc, two_rpow_mul_two_rpow, sub_add_cancel] + _ ≤ _ := by gcongr; exact le_add_self + +/-- The constant `(1 - 2^(-α))⁻¹ + C (1 - 2^(-(1-α)))⁻¹` of one half of Holmstedt's formula. -/ +noncomputable def holmstedtSideConst (C : ℝ≥0∞) (α : ℝ) : ℝ≥0∞ := + (1 - (2 : ℝ≥0∞) ^ (-α))⁻¹ + C * (1 - (2 : ℝ≥0∞) ^ (-(1 - α)))⁻¹ + +/-- The constant `holmstedtSideConst C α` is finite for `C < ∞` and `0 < α < 1`. -/ +theorem holmstedtSideConst_ne_top {α : ℝ} (hC : C ≠ ∞) (hα : 0 < α) (hα' : α < 1) : + holmstedtSideConst C α ≠ ∞ := + ENNReal.add_ne_top.2 ⟨ENNReal.one_sub_two_rpow_neg_inv_ne_top hα, + ENNReal.mul_ne_top hC (ENNReal.one_sub_two_rpow_neg_inv_ne_top (sub_pos.2 hα'))⟩ + +/-- **The first half of Holmstedt's bound**: for a couple quasi-normed with constant `C`, +`q ≥ 1`, `m ∈ ℤ` and `u, b ∈ U`, with `J = N₀(u - b) + 2^m N₁(b)`, +`‖u - b‖_{θ,q} ≤ C S₀(m; u) + 2^(-mθ) holmstedtSideConst C θ · J`. -/ +theorem discreteKMethodNorm_sub_le_kSumBelow (hA : A.IsQuasiNormed C) (hq : 1 ≤ q) (m : ℤ) + (u b : U) : + A.discreteKMethodNorm θ 1 q (u - b) ≤ C * A.kSumBelow θ u m + 2 ^ (-((m : ℝ) * θ)) * + holmstedtSideConst C θ * (A.norm0 (u - b) + 2 ^ (m : ℝ) * A.norm1 b) := by + have h₁ := kSumAbove_le (A := A) (θ := θ) (u := u) (v := u - b) (a := 0) (m := m) + (X := A.norm0 (u - b) + 2 ^ (m : ℝ) * A.norm1 b) fun n _ => by + rw [zero_mul, zero_add] + exact (kFunctional_le_norm0 hA.norm1_zero _).trans le_self_add + have h₂ := kSumBelow_le (A := A) (θ := θ) (u := u) (v := u - b) (a := C) (m := m) + (X := C * (A.norm0 (u - b) + 2 ^ (m : ℝ) * A.norm1 b)) fun n _ => by + calc A.kFunctional (2 ^ (n : ℝ)) (u - b) + ≤ C * (A.kFunctional (2 ^ (n : ℝ)) u + A.kFunctional (2 ^ (n : ℝ)) (-b)) := by + rw [sub_eq_add_neg]; exact kFunctional_add_le hA _ _ + _ ≤ C * (A.kFunctional (2 ^ (n : ℝ)) u + 2 ^ ((n : ℝ) - m) * + (A.norm0 (u - b) + 2 ^ (m : ℝ) * A.norm1 b)) := by + rw [kFunctional_neg hA.norm0_neg hA.norm1_neg] + gcongr + exact kFunctional_le_two_rpow_sub_mul hA.norm0_zero n m u b + _ = _ := by ring + calc A.discreteKMethodNorm θ 1 q (u - b) ≤ A.kSumAbove θ (u - b) m + A.kSumBelow θ (u - b) m := + discreteKMethodNorm_le_kSumAbove_add_kSumBelow hq m _ + _ ≤ _ := add_le_add h₁ h₂ + _ = _ := by rw [holmstedtSideConst]; ring + +/-- **The second half of Holmstedt's bound**: for a couple quasi-normed with constant `C`, +`q ≥ 1`, `m ∈ ℤ` and `u, b ∈ U`, with `J = N₀(u - b) + 2^m N₁(b)`, +`‖b‖_{θ,q} ≤ C S₁(m; u) + 2^(-mθ) holmstedtSideConst C (1 - θ) · J`. -/ +theorem discreteKMethodNorm_le_kSumAbove (hA : A.IsQuasiNormed C) (hq : 1 ≤ q) (m : ℤ) + (u b : U) : + A.discreteKMethodNorm θ 1 q b ≤ C * A.kSumAbove θ u m + 2 ^ (-((m : ℝ) * θ)) * + holmstedtSideConst C (1 - θ) * (A.norm0 (u - b) + 2 ^ (m : ℝ) * A.norm1 b) := by + have h₁ := kSumAbove_le (A := A) (θ := θ) (u := u) (v := b) (a := C) (m := m) + (X := C * (A.norm0 (u - b) + 2 ^ (m : ℝ) * A.norm1 b)) fun n _ => by + calc A.kFunctional (2 ^ (n : ℝ)) b + ≤ C * (A.kFunctional (2 ^ (n : ℝ)) u + A.kFunctional (2 ^ (n : ℝ)) (-(u - b))) := by + rw [show b = u + -(u - b) by abel] + exact (kFunctional_add_le hA _ _).trans_eq (by rw [show u + -(u - b) = b by abel]) + _ ≤ C * (A.kFunctional (2 ^ (n : ℝ)) u + (A.norm0 (u - b) + 2 ^ (m : ℝ) * A.norm1 b)) := by + rw [kFunctional_neg hA.norm0_neg hA.norm1_neg] + gcongr + exact (kFunctional_le_norm0 hA.norm1_zero _).trans le_self_add + _ = _ := by ring + have h₂ := kSumBelow_le (A := A) (θ := θ) (u := u) (v := b) (a := 0) (m := m) + (X := A.norm0 (u - b) + 2 ^ (m : ℝ) * A.norm1 b) fun n _ => by + rw [zero_mul, zero_add] + exact kFunctional_le_two_rpow_sub_mul hA.norm0_zero n m u b + calc A.discreteKMethodNorm θ 1 q b ≤ A.kSumAbove θ b m + A.kSumBelow θ b m := + discreteKMethodNorm_le_kSumAbove_add_kSumBelow hq m _ + _ ≤ _ := add_le_add h₁ h₂ + _ = _ := by rw [holmstedtSideConst, sub_sub_cancel]; ring + +/-- The constant `C + holmstedtSideConst C θ₀ + holmstedtSideConst C (1 - θ₁)` of Holmstedt's +formula for the couple of K-spaces. -/ +noncomputable def holmstedtConst (C : ℝ≥0∞) (θ₀ θ₁ : ℝ) : ℝ≥0∞ := + C + (holmstedtSideConst C θ₀ + holmstedtSideConst C (1 - θ₁)) + +/-- The constant `holmstedtConst C θ₀ θ₁` is finite for `C < ∞` and `0 < θ₀, θ₁ < 1`. -/ +theorem holmstedtConst_ne_top (hC : C ≠ ∞) (hθ₀ : 0 < θ₀) (hθ₀' : θ₀ < 1) (hθ₁ : 0 < θ₁) + (hθ₁' : θ₁ < 1) : holmstedtConst C θ₀ θ₁ ≠ ∞ := + ENNReal.add_ne_top.2 ⟨hC, ENNReal.add_ne_top.2 ⟨holmstedtSideConst_ne_top hC hθ₀ hθ₀', + holmstedtSideConst_ne_top hC (sub_pos.2 hθ₁') (by linarith)⟩⟩ + +/-- The term `2^(-mθ) K(2^m, u)` is at most `S₁(m)`, being its first term. -/ +theorem two_rpow_mul_kFunctional_le_kSumAbove (u : U) (m : ℤ) : + 2 ^ (-((m : ℝ) * θ)) * A.kFunctional (2 ^ (m : ℝ)) u ≤ A.kSumAbove θ u m := + calc 2 ^ (-((m : ℝ) * θ)) * A.kFunctional (2 ^ (m : ℝ)) u + = A.discreteKSeq θ 1 u (m + ((0 : ℕ) : ℤ)) := by + rw [Nat.cast_zero, add_zero, discreteKSeq_one] + _ ≤ A.kSumAbove θ u m := le_tsum (f := fun j : ℕ => A.discreteKSeq θ 1 u (m + j)) 0 + +/-- **Holmstedt's formula, the upper bound in `ℓ₁` form** (Holmstedt 1970; Bergh–Löfström, +Theorem 3.6.1, in discrete form, with `ℓ₁` sums in place of the `ℓ_{q_i}` norms of +Theorem 3.6.1, which is enough for the reiteration theorem): for a couple quasi-normed with +constant `C`, `q₀, q₁ ≥ 1`, `0 < θ₀, θ₁ < 1`, `m ∈ ℤ` and `s = 2^(m(θ₁-θ₀))`, the K-functional +of the couple of K-spaces satisfies `K̄(s, u) ≤ holmstedtConst C θ₀ θ₁ · (S₀(m) + s S₁(m))`, +with `S₀(m) = ∑_{n < m} 2^(-nθ₀) K(2^n, u)` and `S₁(m) = ∑_{n ≥ m} 2^(-nθ₁) K(2^n, u)`. -/ +theorem kFunctional_kCouple_le (hA : A.IsQuasiNormed C) (hq₀ : 1 ≤ q₀) (hq₁ : 1 ≤ q₁) + (hθ₀ : 0 < θ₀) (hθ₀' : θ₀ < 1) (hθ₁ : 0 < θ₁) (hθ₁' : θ₁ < 1) (m : ℤ) (u : U) : + (A.kCouple θ₀ q₀ θ₁ q₁).kFunctional (2 ^ ((m : ℝ) * (θ₁ - θ₀))) u ≤ + holmstedtConst C θ₀ θ₁ * + (A.kSumBelow θ₀ u m + 2 ^ ((m : ℝ) * (θ₁ - θ₀)) * A.kSumAbove θ₁ u m) := by + set G := holmstedtSideConst C θ₀ + holmstedtSideConst C (1 - θ₁) with hG + have hGt : G ≠ ∞ := ENNReal.add_ne_top.2 ⟨holmstedtSideConst_ne_top hA.ne_top hθ₀ hθ₀', + holmstedtSideConst_ne_top hA.ne_top (sub_pos.2 hθ₁') (by linarith)⟩ + have hs : (2 : ℝ≥0∞) ^ ((m : ℝ) * (θ₁ - θ₀)) * 2 ^ (-((m : ℝ) * θ₁)) = 2 ^ (-((m : ℝ) * θ₀)) := by + rw [two_rpow_mul_two_rpow]; congr 1; ring + have hK : 2 ^ (-((m : ℝ) * θ₀)) * A.kFunctional (2 ^ (m : ℝ)) u ≤ + 2 ^ ((m : ℝ) * (θ₁ - θ₀)) * A.kSumAbove θ₁ u m := by + rw [← hs, mul_assoc] + gcongr + exact two_rpow_mul_kFunctional_le_kSumAbove u m + have hstep : (A.kCouple θ₀ q₀ θ₁ q₁).kFunctional (2 ^ ((m : ℝ) * (θ₁ - θ₀))) u ≤ + (C * A.kSumBelow θ₀ u m + 2 ^ ((m : ℝ) * (θ₁ - θ₀)) * (C * A.kSumAbove θ₁ u m)) + + G * 2 ^ (-((m : ℝ) * θ₀)) * A.kFunctional (2 ^ (m : ℝ)) u := by + refine le_add_mul_kFunctional (A := A) + (ENNReal.mul_ne_top hGt (ENNReal.two_rpow_ne_top _)) fun b => ?_ + calc (A.kCouple θ₀ q₀ θ₁ q₁).kFunctional (2 ^ ((m : ℝ) * (θ₁ - θ₀))) u + ≤ A.discreteKMethodNorm θ₀ 1 q₀ (u - b) + + 2 ^ ((m : ℝ) * (θ₁ - θ₀)) * A.discreteKMethodNorm θ₁ 1 q₁ b := + kFunctional_le (A := A.kCouple θ₀ q₀ θ₁ q₁) b u + _ ≤ (C * A.kSumBelow θ₀ u m + 2 ^ (-((m : ℝ) * θ₀)) * holmstedtSideConst C θ₀ * + (A.norm0 (u - b) + 2 ^ (m : ℝ) * A.norm1 b)) + 2 ^ ((m : ℝ) * (θ₁ - θ₀)) * + (C * A.kSumAbove θ₁ u m + 2 ^ (-((m : ℝ) * θ₁)) * holmstedtSideConst C (1 - θ₁) * + (A.norm0 (u - b) + 2 ^ (m : ℝ) * A.norm1 b)) := by + gcongr + · exact discreteKMethodNorm_sub_le_kSumBelow hA hq₀ m u b + · exact discreteKMethodNorm_le_kSumAbove hA hq₁ m u b + _ = _ := by rw [← hs, hG]; ring + calc (A.kCouple θ₀ q₀ θ₁ q₁).kFunctional (2 ^ ((m : ℝ) * (θ₁ - θ₀))) u + ≤ (C * A.kSumBelow θ₀ u m + 2 ^ ((m : ℝ) * (θ₁ - θ₀)) * (C * A.kSumAbove θ₁ u m)) + + G * (2 ^ ((m : ℝ) * (θ₁ - θ₀)) * A.kSumAbove θ₁ u m) := by + refine hstep.trans ?_ + rw [mul_assoc G] + gcongr + _ = C * A.kSumBelow θ₀ u m + (C + G) * (2 ^ ((m : ℝ) * (θ₁ - θ₀)) * A.kSumAbove θ₁ u m) := by + ring + _ ≤ (C + G) * A.kSumBelow θ₀ u m + + (C + G) * (2 ^ ((m : ℝ) * (θ₁ - θ₀)) * A.kSumAbove θ₁ u m) := by + gcongr + exact le_self_add + _ = _ := by rw [holmstedtConst, ← hG, mul_add] + +/-- The constant `C + (1 + holmstedtSideConst C (1 - θ₁))` of Holmstedt's formula for the left +endpoint couple. -/ +noncomputable def endpointHolmstedtConst (C : ℝ≥0∞) (θ₁ : ℝ) : ℝ≥0∞ := + C + (1 + holmstedtSideConst C (1 - θ₁)) + +/-- The constant `endpointHolmstedtConst C θ₁` is finite for `C < ∞` and `0 < θ₁ < 1`. -/ +theorem endpointHolmstedtConst_ne_top (hC : C ≠ ∞) (hθ₁ : 0 < θ₁) (hθ₁' : θ₁ < 1) : + endpointHolmstedtConst C θ₁ ≠ ∞ := + ENNReal.add_ne_top.2 ⟨hC, ENNReal.add_ne_top.2 ⟨ENNReal.one_ne_top, + holmstedtSideConst_ne_top hC (sub_pos.2 hθ₁') (by linarith)⟩⟩ + +/-- **Holmstedt's formula for the left endpoint couple**, the upper bound in `ℓ₁` form (with an +`ℓ₁` sum in place of the `ℓ_{q₁}` norm of Bergh–Löfström, Theorem 3.6.1, which is enough for +the reiteration theorem): for a couple quasi-normed with constant `C`, `q₁ ≥ 1`, `0 < θ₁ < 1`, +`m ∈ ℤ` and `s = 2^(mθ₁)`, the K-functional of `(N₀, ‖·‖_{θ₁,q₁})` satisfies +`K̄(s, u) ≤ endpointHolmstedtConst C θ₁ · s S₁(m)`, with +`S₁(m) = ∑_{n ≥ m} 2^(-nθ₁) K(2^n, u)`. -/ +theorem kFunctional_leftKCouple_le (hA : A.IsQuasiNormed C) (hq₁ : 1 ≤ q₁) (hθ₁ : 0 < θ₁) + (hθ₁' : θ₁ < 1) (m : ℤ) (u : U) : + (A.leftKCouple θ₁ q₁).kFunctional (2 ^ ((m : ℝ) * θ₁)) u ≤ + endpointHolmstedtConst C θ₁ * (2 ^ ((m : ℝ) * θ₁) * A.kSumAbove θ₁ u m) := by + set G := 1 + holmstedtSideConst C (1 - θ₁) with hG + have hGt : G ≠ ∞ := ENNReal.add_ne_top.2 ⟨ENNReal.one_ne_top, + holmstedtSideConst_ne_top hA.ne_top (sub_pos.2 hθ₁') (by linarith)⟩ + have hs : (2 : ℝ≥0∞) ^ ((m : ℝ) * θ₁) * 2 ^ (-((m : ℝ) * θ₁)) = 1 := by + rw [two_rpow_mul_two_rpow, add_neg_cancel, ENNReal.rpow_zero] + have hK : A.kFunctional (2 ^ (m : ℝ)) u ≤ 2 ^ ((m : ℝ) * θ₁) * A.kSumAbove θ₁ u m := by + calc A.kFunctional (2 ^ (m : ℝ)) u + = 2 ^ ((m : ℝ) * θ₁) * (2 ^ (-((m : ℝ) * θ₁)) * A.kFunctional (2 ^ (m : ℝ)) u) := by + rw [← mul_assoc, hs, one_mul] + _ ≤ _ := by gcongr; exact two_rpow_mul_kFunctional_le_kSumAbove u m + have hstep : (A.leftKCouple θ₁ q₁).kFunctional (2 ^ ((m : ℝ) * θ₁)) u ≤ + 2 ^ ((m : ℝ) * θ₁) * (C * A.kSumAbove θ₁ u m) + G * A.kFunctional (2 ^ (m : ℝ)) u := by + refine le_add_mul_kFunctional hGt fun b => ?_ + calc (A.leftKCouple θ₁ q₁).kFunctional (2 ^ ((m : ℝ) * θ₁)) u + ≤ A.norm0 (u - b) + 2 ^ ((m : ℝ) * θ₁) * A.discreteKMethodNorm θ₁ 1 q₁ b := + kFunctional_le (A := A.leftKCouple θ₁ q₁) b u + _ ≤ (A.norm0 (u - b) + 2 ^ (m : ℝ) * A.norm1 b) + 2 ^ ((m : ℝ) * θ₁) * + (C * A.kSumAbove θ₁ u m + 2 ^ (-((m : ℝ) * θ₁)) * holmstedtSideConst C (1 - θ₁) * + (A.norm0 (u - b) + 2 ^ (m : ℝ) * A.norm1 b)) := by + gcongr + · exact le_self_add + · exact discreteKMethodNorm_le_kSumAbove hA hq₁ m u b + _ = 2 ^ ((m : ℝ) * θ₁) * (C * A.kSumAbove θ₁ u m) + (1 + (2 ^ ((m : ℝ) * θ₁) * + 2 ^ (-((m : ℝ) * θ₁))) * holmstedtSideConst C (1 - θ₁)) * + (A.norm0 (u - b) + 2 ^ (m : ℝ) * A.norm1 b) := by ring + _ = _ := by rw [hs, one_mul] + calc (A.leftKCouple θ₁ q₁).kFunctional (2 ^ ((m : ℝ) * θ₁)) u + ≤ 2 ^ ((m : ℝ) * θ₁) * (C * A.kSumAbove θ₁ u m) + + G * (2 ^ ((m : ℝ) * θ₁) * A.kSumAbove θ₁ u m) := hstep.trans (by gcongr) + _ = _ := by rw [endpointHolmstedtConst, ← hG]; ring + +/-- **Swapping turns the sum from `-m` on into the sum up to `m`**: `S₁(-m)` of the swapped +couple with exponent `1 - θ₀` is `S₀(m + 1) = ∑_{n ≤ m} 2^(-nθ₀) K(2^n, u)` of `A`, by +`discreteKSeq_swap`. -/ +theorem kSumAbove_swap (u : U) (m : ℤ) : + A.swap.kSumAbove (1 - θ₀) u (-m) = A.kSumBelow θ₀ u (m + 1) := by + rw [kSumAbove, kSumBelow] + congr 1 + funext j + rw [discreteKSeq_swap, sub_sub_cancel] + congr 1 + ring + +/-- **Holmstedt's formula for the right endpoint couple**, the upper bound in `ℓ₁` form: for a +couple quasi-normed with constant `C`, `q₀ ≥ 1`, `0 < θ₀ < 1` and `m ∈ ℤ`, the K-functional of +`(‖·‖_{θ₀,q₀}, N₁)` satisfies +`K̄(2^(m(1-θ₀)), u) ≤ endpointHolmstedtConst C (1 - θ₀) · ∑_{n ≤ m} 2^(-nθ₀) K(2^n, u)`, the sum +being `S₀(m + 1)`. It is `kFunctional_leftKCouple_le` for the swapped couple +(`rightKCouple_eq_swap`, `kFunctional_swap`). -/ +theorem kFunctional_rightKCouple_le (hA : A.IsQuasiNormed C) (hq₀ : 1 ≤ q₀) (hθ₀ : 0 < θ₀) + (hθ₀' : θ₀ < 1) (m : ℤ) (u : U) : + (A.rightKCouple θ₀ q₀).kFunctional (2 ^ ((m : ℝ) * (1 - θ₀))) u ≤ + endpointHolmstedtConst C (1 - θ₀) * A.kSumBelow θ₀ u (m + 1) := by + have h0 : (2 : ℝ≥0∞) ^ ((m : ℝ) * (1 - θ₀)) ≠ 0 := + (ENNReal.rpow_pos two_pos ENNReal.ofNat_ne_top).ne' + have ht : (2 : ℝ≥0∞) ^ ((m : ℝ) * (1 - θ₀)) ≠ ∞ := ENNReal.two_rpow_ne_top _ + have hK := kFunctional_leftKCouple_le (A := A.swap) (q₁ := q₀) hA.swap hq₀ (sub_pos.2 hθ₀') + (by linarith) (-m) u + have e : -((m : ℝ) * (1 - θ₀)) = ((-m : ℤ) : ℝ) * (1 - θ₀) := by push_cast; ring + have hs : (2 : ℝ≥0∞) ^ ((m : ℝ) * (1 - θ₀)) * 2 ^ (((-m : ℤ) : ℝ) * (1 - θ₀)) = 1 := by + rw [← e, two_rpow_mul_two_rpow, add_neg_cancel, ENNReal.rpow_zero] + rw [rightKCouple_eq_swap, kFunctional_swap h0 ht, ← ENNReal.rpow_neg, e] + calc 2 ^ ((m : ℝ) * (1 - θ₀)) * + (A.swap.leftKCouple (1 - θ₀) q₀).kFunctional (2 ^ (((-m : ℤ) : ℝ) * (1 - θ₀))) u + ≤ 2 ^ ((m : ℝ) * (1 - θ₀)) * (endpointHolmstedtConst C (1 - θ₀) * + (2 ^ (((-m : ℤ) : ℝ) * (1 - θ₀)) * A.swap.kSumAbove (1 - θ₀) u (-m))) := by + gcongr + _ = endpointHolmstedtConst C (1 - θ₀) * ((2 ^ ((m : ℝ) * (1 - θ₀)) * + 2 ^ (((-m : ℤ) : ℝ) * (1 - θ₀))) * A.swap.kSumAbove (1 - θ₀) u (-m)) := by ring + _ = _ := by rw [hs, one_mul, kSumAbove_swap] + +/-! ### The reiteration theorem -/ + +/-- The weighted sum below `m` as a geometric convolution: for `θ = θ₀ + ηρ`, +`2^(-mρη) S₀(m) = ∑_{j ≥ 0} 2^(-(j+1)ηρ) c_{m-(j+1)}` with `c_n = 2^(-nθ) K(2^n, u)`. -/ +theorem two_rpow_mul_kSumBelow (hθ : θ = θ₀ + η * ρ) (m : ℤ) (u : U) : + 2 ^ (-((m : ℝ) * ρ * η)) * A.kSumBelow θ₀ u m = + ∑' j : ℕ, dyadicWeight (-(η * ρ)) (j + 1) * A.discreteKSeq θ 1 u (m - (j + 1)) := by + rw [kSumBelow, ← ENNReal.tsum_mul_left] + congr 1 + funext j + rw [discreteKSeq_one, discreteKSeq_one, dyadicWeight, ← mul_assoc, ← mul_assoc, + two_rpow_mul_two_rpow, two_rpow_mul_two_rpow, hθ] + congr 2 + push_cast + ring + +/-- The weighted sum from `m` on as a geometric convolution: for `θ₁ = θ + (1 - η) ρ`, +`2^(-mρη) 2^(mρ) S₁(m) = ∑_{j ≥ 0} 2^(-j(1-η)ρ) c_{m+j}` with `c_n = 2^(-nθ) K(2^n, u)`. -/ +theorem two_rpow_mul_kSumAbove (hθ : θ₁ = θ + (1 - η) * ρ) (m : ℤ) (u : U) : + 2 ^ (-((m : ℝ) * ρ * η)) * (2 ^ ((m : ℝ) * ρ) * A.kSumAbove θ₁ u m) = + ∑' j : ℕ, dyadicWeight (-((1 - η) * ρ)) j * A.discreteKSeq θ 1 u (m + j) := by + rw [kSumAbove, ← ENNReal.tsum_mul_left, ← ENNReal.tsum_mul_left] + congr 1 + funext j + rw [discreteKSeq_one, discreteKSeq_one, dyadicWeight, ← mul_assoc, ← mul_assoc, ← mul_assoc, + two_rpow_mul_two_rpow, two_rpow_mul_two_rpow, two_rpow_mul_two_rpow, hθ] + congr 2 + push_cast + ring + +/-- The constant +`holmstedtConst C θ₀ θ₁ · ((1 - 2^(-η(θ₁-θ₀)))⁻¹ + (1 - 2^(-(1-η)(θ₁-θ₀)))⁻¹)` of the +reiteration theorem. -/ +noncomputable def reiterationConst (C : ℝ≥0∞) (θ₀ θ₁ η : ℝ) : ℝ≥0∞ := + holmstedtConst C θ₀ θ₁ * ((1 - (2 : ℝ≥0∞) ^ (-(η * (θ₁ - θ₀))))⁻¹ + + (1 - (2 : ℝ≥0∞) ^ (-((1 - η) * (θ₁ - θ₀))))⁻¹) + +/-- The constant `reiterationConst C θ₀ θ₁ η` is finite for `C < ∞`, `0 < θ₀ < θ₁ < 1` and +`0 < η < 1`. -/ +theorem reiterationConst_ne_top (hC : C ≠ ∞) (hθ₀ : 0 < θ₀) (hθ : θ₀ < θ₁) (hθ₁ : θ₁ < 1) + (hη : 0 < η) (hη' : η < 1) : reiterationConst C θ₀ θ₁ η ≠ ∞ := + ENNReal.mul_ne_top (holmstedtConst_ne_top hC hθ₀ (hθ.trans hθ₁) (hθ₀.trans hθ) hθ₁) + (ENNReal.add_ne_top.2 ⟨ENNReal.one_sub_two_rpow_neg_inv_ne_top + (mul_pos hη (sub_pos.2 hθ)), + ENNReal.one_sub_two_rpow_neg_inv_ne_top (mul_pos (sub_pos.2 hη') (sub_pos.2 hθ))⟩) + +/-- **The reiteration bound** (the hard inclusion of Bergh–Löfström, Theorems 3.5.3 and +3.11.5): for a couple quasi-normed with constant `C`, `q₀, q₁, q ≥ 1`, `0 < θ₀, θ₁ < 1` and +`θ = (1 - η) θ₀ + η θ₁`, the discrete K-norm of the couple of K-spaces on the grid +`t = 2^(n(θ₁-θ₀))` satisfies `‖u‖_{η,q} ≤ reiterationConst C θ₀ θ₁ η · ‖u‖_{θ,q}`. -/ +theorem kCouple_discreteKMethodNorm_le (hA : A.IsQuasiNormed C) (hq₀ : 1 ≤ q₀) (hq₁ : 1 ≤ q₁) + (hq : 1 ≤ q) (hθ₀ : 0 < θ₀) (hθ₀' : θ₀ < 1) (hθ₁ : 0 < θ₁) (hθ₁' : θ₁ < 1) (η : ℝ) (u : U) : + (A.kCouple θ₀ q₀ θ₁ q₁).discreteKMethodNorm η (θ₁ - θ₀) q u ≤ + reiterationConst C θ₀ θ₁ η * A.discreteKMethodNorm ((1 - η) * θ₀ + η * θ₁) 1 q u := by + set c := A.discreteKSeq ((1 - η) * θ₀ + η * θ₁) 1 u + set x : ℤ → ℝ≥0∞ := fun m => + ∑' j : ℕ, dyadicWeight (-(η * (θ₁ - θ₀))) (j + 1) * c (m - (j + 1)) + set y : ℤ → ℝ≥0∞ := fun m => ∑' j : ℕ, dyadicWeight (-((1 - η) * (θ₁ - θ₀))) j * c (m + j) + have hterm : ∀ m, (A.kCouple θ₀ q₀ θ₁ q₁).discreteKSeq η (θ₁ - θ₀) u m ≤ + holmstedtConst C θ₀ θ₁ * (x m + y m) := fun m => by + rw [discreteKSeq] + calc 2 ^ (-((m : ℝ) * (θ₁ - θ₀) * η)) * + (A.kCouple θ₀ q₀ θ₁ q₁).kFunctional (2 ^ ((m : ℝ) * (θ₁ - θ₀))) u + ≤ 2 ^ (-((m : ℝ) * (θ₁ - θ₀) * η)) * (holmstedtConst C θ₀ θ₁ * + (A.kSumBelow θ₀ u m + 2 ^ ((m : ℝ) * (θ₁ - θ₀)) * A.kSumAbove θ₁ u m)) := by + gcongr + exact kFunctional_kCouple_le hA hq₀ hq₁ hθ₀ hθ₀' hθ₁ hθ₁' m u + _ = holmstedtConst C θ₀ θ₁ * (2 ^ (-((m : ℝ) * (θ₁ - θ₀) * η)) * A.kSumBelow θ₀ u m + + 2 ^ (-((m : ℝ) * (θ₁ - θ₀) * η)) * + (2 ^ ((m : ℝ) * (θ₁ - θ₀)) * A.kSumAbove θ₁ u m)) := by ring + _ = _ := by + rw [two_rpow_mul_kSumBelow (θ := (1 - η) * θ₀ + η * θ₁) (θ₀ := θ₀) (η := η) + (ρ := θ₁ - θ₀) (by ring), two_rpow_mul_kSumAbove (θ := (1 - η) * θ₀ + η * θ₁) + (θ₁ := θ₁) (η := η) (ρ := θ₁ - θ₀) (by ring)] + calc (A.kCouple θ₀ q₀ θ₁ q₁).discreteKMethodNorm η (θ₁ - θ₀) q u + ≤ lqNorm q (fun m => holmstedtConst C θ₀ θ₁ * (x m + y m)) := ENNReal.lqNorm_mono hterm + _ ≤ holmstedtConst C θ₀ θ₁ * (lqNorm q x + lqNorm q y) := by + rw [ENNReal.lqNorm_const_mul] + gcongr + exact ENNReal.lqNorm_add_le hq _ _ + _ ≤ holmstedtConst C θ₀ θ₁ * ((1 - (2 : ℝ≥0∞) ^ (-(η * (θ₁ - θ₀))))⁻¹ * lqNorm q c + + (1 - (2 : ℝ≥0∞) ^ (-((1 - η) * (θ₁ - θ₀))))⁻¹ * lqNorm q c) := by + gcongr + · exact ENNReal.lqNorm_tsum_geom_sub_le hq _ c + · exact ENNReal.lqNorm_tsum_geom_add_le hq _ c + _ = _ := by rw [reiterationConst, discreteKMethodNorm]; ring + +/-- The constant `endpointHolmstedtConst C θ₁ · (1 - 2^(-(1-η)θ₁))⁻¹` of the reiteration theorem +for the endpoint couples. -/ +noncomputable def endpointReiterationConst (C : ℝ≥0∞) (θ₁ η : ℝ) : ℝ≥0∞ := + endpointHolmstedtConst C θ₁ * (1 - (2 : ℝ≥0∞) ^ (-((1 - η) * θ₁)))⁻¹ + +/-- The constant `endpointReiterationConst C θ₁ η` is finite for `C < ∞`, `0 < θ₁ < 1` and +`η < 1`. -/ +theorem endpointReiterationConst_ne_top (hC : C ≠ ∞) (hθ₁ : 0 < θ₁) (hθ₁' : θ₁ < 1) + (hη' : η < 1) : endpointReiterationConst C θ₁ η ≠ ∞ := + ENNReal.mul_ne_top (endpointHolmstedtConst_ne_top hC hθ₁ hθ₁') + (ENNReal.one_sub_two_rpow_neg_inv_ne_top (mul_pos (sub_pos.2 hη') hθ₁)) + +/-- **The reiteration bound for the left endpoint couple**: for a couple quasi-normed with +constant `C`, `q₁, q ≥ 1` and `0 < θ₁ < 1`, the discrete K-norm of `(N₀, ‖·‖_{θ₁,q₁})` on the +grid `t = 2^(nθ₁)` satisfies `‖u‖_{η,q} ≤ endpointReiterationConst C θ₁ η · ‖u‖_{ηθ₁,q}`. -/ +theorem leftKCouple_discreteKMethodNorm_le (hA : A.IsQuasiNormed C) (hq₁ : 1 ≤ q₁) (hq : 1 ≤ q) + (hθ₁ : 0 < θ₁) (hθ₁' : θ₁ < 1) (η : ℝ) (u : U) : + (A.leftKCouple θ₁ q₁).discreteKMethodNorm η θ₁ q u ≤ + endpointReiterationConst C θ₁ η * A.discreteKMethodNorm (η * θ₁) 1 q u := by + set c := A.discreteKSeq (η * θ₁) 1 u + have hterm : ∀ m, (A.leftKCouple θ₁ q₁).discreteKSeq η θ₁ u m ≤ endpointHolmstedtConst C θ₁ * + ∑' j : ℕ, dyadicWeight (-((1 - η) * θ₁)) j * c (m + j) := fun m => by + rw [discreteKSeq, ← two_rpow_mul_kSumAbove (θ := η * θ₁) (θ₁ := θ₁) (η := η) (ρ := θ₁) + (by ring), mul_left_comm] + gcongr + exact kFunctional_leftKCouple_le hA hq₁ hθ₁ hθ₁' m u + calc (A.leftKCouple θ₁ q₁).discreteKMethodNorm η θ₁ q u + ≤ lqNorm q (fun m => endpointHolmstedtConst C θ₁ * + ∑' j : ℕ, dyadicWeight (-((1 - η) * θ₁)) j * c (m + j)) := ENNReal.lqNorm_mono hterm + _ ≤ endpointHolmstedtConst C θ₁ * ((1 - (2 : ℝ≥0∞) ^ (-((1 - η) * θ₁)))⁻¹ * lqNorm q c) := by + rw [ENNReal.lqNorm_const_mul] + gcongr + exact ENNReal.lqNorm_tsum_geom_add_le hq _ c + _ = _ := by rw [endpointReiterationConst, discreteKMethodNorm]; ring + +/-- **The reiteration bound for the right endpoint couple**: for a couple quasi-normed with +constant `C`, `q₀, q ≥ 1` and `0 < θ₀ < 1`, the discrete K-norm of `(‖·‖_{θ₀,q₀}, N₁)` on the grid +`t = 2^(n(1-θ₀))` satisfies +`‖u‖_{η,q} ≤ endpointReiterationConst C (1 - θ₀) (1 - η) · ‖u‖_{(1-η)θ₀+η,q}`, by swapping the +couple (`rightKCouple_eq_swap`). -/ +theorem rightKCouple_discreteKMethodNorm_le (hA : A.IsQuasiNormed C) (hq₀ : 1 ≤ q₀) + (hq : 1 ≤ q) (hθ₀ : 0 < θ₀) (hθ₀' : θ₀ < 1) (η : ℝ) (u : U) : + (A.rightKCouple θ₀ q₀).discreteKMethodNorm η (1 - θ₀) q u ≤ + endpointReiterationConst C (1 - θ₀) (1 - η) * + A.discreteKMethodNorm ((1 - η) * θ₀ + η) 1 q u := by + have h := leftKCouple_discreteKMethodNorm_le (A := A.swap) hA.swap hq₀ hq (sub_pos.2 hθ₀') + (by linarith) (1 - η) u + rw [discreteKMethodNorm_swap] at h + rw [rightKCouple_eq_swap, discreteKMethodNorm_swap] + convert h using 3 + ring + +/-! ### Membership -/ + +/-- **Equal spaces from comparable discrete K-norms**: for couples `A`, `B`, finite constants +`c, c'`, `η ≥ 0`, `ρ > 0` and `θ ≥ 0`, if `‖u‖^B_{η,ρ,q} ≤ c ‖u‖^A_{θ,1,q}` and +`‖u‖^A_{θ,1,q} ≤ c' ‖u‖^B_{η,ρ,q}`, then `u ∈ (Y₀, Y₁)_{η,q}` if and only if +`u ∈ (X₀, X₁)_{θ,q}` (`memKMethod_iff_discreteKMethodNorm_lt_top`). -/ +theorem memKMethod_iff_of_discreteKMethodNorm_le {B : InterpCouple U} {c c' : ℝ≥0∞} + (hc : c ≠ ∞) (hc' : c' ≠ ∞) (hη : 0 ≤ η) (hρ : 0 < ρ) (hθ : 0 ≤ θ) {u : U} + (h : B.discreteKMethodNorm η ρ q u ≤ c * A.discreteKMethodNorm θ 1 q u) + (h' : A.discreteKMethodNorm θ 1 q u ≤ c' * B.discreteKMethodNorm η ρ q u) : + B.MemKMethod η q u ↔ A.MemKMethod θ q u := by + rw [memKMethod_iff_discreteKMethodNorm_lt_top hη hρ, + memKMethod_iff_discreteKMethodNorm_lt_top (ρ := 1) hθ one_pos] + exact ⟨fun hB => h'.trans_lt (ENNReal.mul_lt_top hc'.lt_top hB), + fun hA => h.trans_lt (ENNReal.mul_lt_top hc.lt_top hA)⟩ + +/-- **The reiteration theorem** (Bergh–Löfström, Theorems 3.5.3 and 3.11.5): for a couple +quasi-normed with constant `C`, `0 < θ₀ < θ₁ < 1`, `0 < η < 1` and `q₀, q₁, q ≥ 1`, +`((X₀, X₁)_{θ₀,q₀}, (X₀, X₁)_{θ₁,q₁})_{η,q} = (X₀, X₁)_{θ,q}` with `θ = (1 - η) θ₀ + η θ₁`, for +the discrete K-norms of the two K-spaces. -/ +theorem memKMethod_kCouple_iff (hA : A.IsQuasiNormed C) (hθ₀ : 0 < θ₀) (hθ : θ₀ < θ₁) + (hθ₁ : θ₁ < 1) (hη : 0 < η) (hη' : η < 1) (hq₀ : 1 ≤ q₀) (hq₁ : 1 ≤ q₁) (hq : 1 ≤ q) + {u : U} : + (A.kCouple θ₀ q₀ θ₁ q₁).MemKMethod η q u ↔ A.MemKMethod ((1 - η) * θ₀ + η * θ₁) q u := + memKMethod_iff_of_discreteKMethodNorm_le (reiterationConst_ne_top hA.ne_top hθ₀ hθ hθ₁ hη hη') + hA.ne_top hη.le (sub_pos.2 hθ) (by nlinarith) + (kCouple_discreteKMethodNorm_le hA hq₀ hq₁ hq hθ₀ (hθ.trans hθ₁) (hθ₀.trans hθ) hθ₁ η u) + (discreteKMethodNorm_le_kCouple hA (one_pos.trans_le hq₀).ne' + (one_pos.trans_le hq₁).ne' η q u) + +/-- **The reiteration theorem for the left endpoint** (Bergh–Löfström, Theorem 3.5.3): for a +couple quasi-normed with constant `C`, `0 < θ₁ < 1`, `0 ≤ η < 1` and `q₁, q ≥ 1`, +`(X₀, (X₀, X₁)_{θ₁,q₁})_{η,q} = (X₀, X₁)_{ηθ₁,q}`. -/ +theorem memKMethod_leftKCouple_iff (hA : A.IsQuasiNormed C) (hθ₁ : 0 < θ₁) (hθ₁' : θ₁ < 1) + (hη : 0 ≤ η) (hη' : η < 1) (hq₁ : 1 ≤ q₁) (hq : 1 ≤ q) {u : U} : + (A.leftKCouple θ₁ q₁).MemKMethod η q u ↔ A.MemKMethod (η * θ₁) q u := + memKMethod_iff_of_discreteKMethodNorm_le + (endpointReiterationConst_ne_top hA.ne_top hθ₁ hθ₁' hη') hA.ne_top hη hθ₁ + (mul_nonneg hη hθ₁.le) (leftKCouple_discreteKMethodNorm_le hA hq₁ hq hθ₁ hθ₁' η u) + (discreteKMethodNorm_le_leftKCouple hA (one_pos.trans_le hq₁).ne' η q u) + +/-- **The reiteration theorem for the right endpoint** (Bergh–Löfström, Theorem 3.5.3): for a +couple quasi-normed with constant `C`, `0 < θ₀ < 1`, `η > 0` and `q₀, q ≥ 1`, +`((X₀, X₁)_{θ₀,q₀}, X₁)_{η,q} = (X₀, X₁)_{(1-η)θ₀+η,q}`. -/ +theorem memKMethod_rightKCouple_iff (hA : A.IsQuasiNormed C) (hθ₀ : 0 < θ₀) (hθ₀' : θ₀ < 1) + (hη : 0 < η) (hq₀ : 1 ≤ q₀) (hq : 1 ≤ q) {u : U} : + (A.rightKCouple θ₀ q₀).MemKMethod η q u ↔ A.MemKMethod ((1 - η) * θ₀ + η) q u := + memKMethod_iff_of_discreteKMethodNorm_le + (endpointReiterationConst_ne_top hA.ne_top (sub_pos.2 hθ₀') (by linarith) (by linarith)) + hA.ne_top hη.le (sub_pos.2 hθ₀') (by nlinarith) + (rightKCouple_discreteKMethodNorm_le hA hq₀ hq hθ₀ hθ₀' η u) + (discreteKMethodNorm_le_rightKCouple hA (one_pos.trans_le hq₀).ne' η q u) + +/-- **The reiteration theorem for the continuous K-norms**: under the hypotheses of +`memKMethod_kCouple_iff`, `((X₀, X₁)_{θ₀,q₀}, (X₀, X₁)_{θ₁,q₁})_{η,q} = (X₀, X₁)_{θ,q}` with +`θ = (1 - η) θ₀ + η θ₁`, for the continuous K-norms `‖·‖_{K,θ_i,q_i}` of the two K-spaces. -/ +theorem memKMethod_kMethodCouple_iff (hA : A.IsQuasiNormed C) (hθ₀ : 0 < θ₀) (hθ : θ₀ < θ₁) + (hθ₁ : θ₁ < 1) (hη : 0 < η) (hη' : η < 1) (hq₀ : 1 ≤ q₀) (hq₁ : 1 ≤ q₁) (hq : 1 ≤ q) + {u : U} : + (A.kMethodCouple θ₀ q₀ θ₁ q₁).MemKMethod η q u ↔ + A.MemKMethod ((1 - η) * θ₀ + η * θ₁) q u := by + rw [← memKMethod_kCouple_iff hA hθ₀ hθ hθ₁ hη hη' hq₀ hq₁ hq] + exact memKMethod_congr (ApproximationScheme.inv_log_two_rpow_mul_two_rpow_ne_top θ₀ q₀) + (ApproximationScheme.inv_log_two_rpow_mul_two_rpow_ne_top θ₁ q₁) + (ApproximationScheme.log_two_rpow_mul_two_rpow_ne_top θ₀ q₀) + (ApproximationScheme.log_two_rpow_mul_two_rpow_ne_top θ₁ q₁) + (discreteKMethodNorm_le_mul_kMethodNorm hθ₀.le) + (discreteKMethodNorm_le_mul_kMethodNorm (hθ₀.trans hθ).le) + (kMethodNorm_le_mul_discreteKMethodNorm hθ₀.le) + (kMethodNorm_le_mul_discreteKMethodNorm (hθ₀.trans hθ).le) + +end InterpCouple + +/-! ### Couples of bounded linear maps -/ + +namespace ApproximationScheme + +variable {X Y : Type*} [NormedAddCommGroup X] [NormedSpace ℝ X] [NormedAddCommGroup Y] + [NormedSpace ℝ Y] {ι : Y →L[ℝ] X} {θ₀ θ₁ η : ℝ} {q₀ q₁ q : ℝ≥0∞} + +/-- **The reiteration theorem for a bounded linear map** `ι : Y → X`: for `0 < θ₀ < θ₁ < 1`, +`0 < η < 1` and `q₀, q₁, q ≥ 1`, `((X, Y)_{θ₀,q₀}, (X, Y)_{θ₁,q₁})_{η,q} = (X, Y)_{θ,q}` with +`θ = (1 - η) θ₀ + η θ₁`, for the continuous K-norms of +`ApproximationSpaces.Interpolation.KMethod`. -/ +theorem memKMethod_reiteration (hθ₀ : 0 < θ₀) (hθ : θ₀ < θ₁) (hθ₁ : θ₁ < 1) (hη : 0 < η) + (hη' : η < 1) (hq₀ : 1 ≤ q₀) (hq₁ : 1 ≤ q₁) (hq : 1 ≤ q) {f : X} : + (⟨kMethodNorm ι θ₀ q₀, kMethodNorm ι θ₁ q₁⟩ : InterpCouple X).MemKMethod η q f ↔ + MemKMethod ι ((1 - η) * θ₀ + η * θ₁) q f := by + have e : (⟨kMethodNorm ι θ₀ q₀, kMethodNorm ι θ₁ q₁⟩ : InterpCouple X) = + (InterpCouple.ofMap ι).kMethodCouple θ₀ q₀ θ₁ q₁ := by + have h₀ : kMethodNorm ι θ₀ q₀ = (InterpCouple.ofMap ι).kMethodNorm θ₀ q₀ := + funext fun f => (InterpCouple.kMethodNorm_ofMap f).symm + have h₁ : kMethodNorm ι θ₁ q₁ = (InterpCouple.ofMap ι).kMethodNorm θ₁ q₁ := + funext fun f => (InterpCouple.kMethodNorm_ofMap f).symm + rw [h₀, h₁] + rfl + rw [e, InterpCouple.memKMethod_kMethodCouple_iff InterpCouple.isQuasiNormed_ofMap hθ₀ hθ hθ₁ + hη hη' hq₀ hq₁ hq, InterpCouple.memKMethod_ofMap_iff] + +end ApproximationScheme diff --git a/LeanPool/FunctionSpaces/ApproximationSpaces/Interpolation/Representation.lean b/LeanPool/FunctionSpaces/ApproximationSpaces/Interpolation/Representation.lean new file mode 100644 index 0000000000..58046608ec --- /dev/null +++ b/LeanPool/FunctionSpaces/ApproximationSpaces/Interpolation/Representation.lean @@ -0,0 +1,247 @@ +/- +Copyright (c) 2026 Mario Ullrich. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Mario Ullrich +-/ +module + +public import LeanPool.FunctionSpaces.ApproximationSpaces.Interpolation.KFunctional +public import LeanPool.FunctionSpaces.ApproximationSpaces.Sequences.Hardy + +/- +Modified for Lean Pool: module names and imports adapted. +-/ + +/-! +# The representation theorem: approximation spaces are interpolation spaces + +Let `ι : Y → X` satisfy Jackson's and Bernstein's inequalities of order `r > 0` for the scheme +`A`. Then for `0 < s < r` and `1 ≤ q ≤ ∞` + +`A^s_q = (X, Y)_{s/r, q}` with equivalent norms + +(DeVore–Lorentz, Chapter 7, Theorem 9.1; Pietsch), where `(X, Y)_{s/r, q}` is the discrete +K-method on the grid `t = 2^(-kr)` (`ApproximationScheme.MemInterp`); the same space comes from +the continuous K-method `(∫_0^∞ (t^(-θ) K(t, f))^q dt/t)^(1/q)` +(`ApproximationScheme.memApprox_iff_memKMethod` in +`ApproximationSpaces.Interpolation.KMethod`). The two halves: + +* **Jackson** (`approxNormDyadic_le_interpNorm_of_jackson`): + `E_n(f) ≤ max(1, C) K(n^(-r), f)` (`approxError_le_kFunctional_of_jackson`), so at the + dyadic points `2^(ks) E_{2^k}(f) ≤ max(1, C) 2^(kr·s/r) K(2^(-kr), f)`; +* **Bernstein** (`interpNorm_le_approxNormDyadic_of_bernstein`): with near-best approximants + `a_k = ι z_k` lifted by Bernstein's inequality (`DyadicApprox.exists_lift_partial`), + `K(2^(-kr), f) ≤ ‖f - a_k‖ + 2^(-kr) ‖z_k‖` and `‖z_k‖ ≲ ∑_{j ≤ k} 2^(jr) E_{2^j}(f)`; Hardy's + inequality for partial sums with exponent `r - s > 0` (`ENNReal.hardy_sum_le`) finishes. + +Neither half needs `Y` to be complete. The theorem identifies Besov spaces defined by +different schemes with the same Jackson and Bernstein inequalities +(`approxSpace_eq_of_jackson_bernstein`): approximation spaces depend only on the smoothness +space `Y`, not on the particular approximants. +-/ + +@[expose] public section + +open Finset +open scoped ENNReal + +namespace ApproximationScheme + +open ENNReal (lqNorm dyadicWeight) + +variable {X Y : Type*} [NormedAddCommGroup X] [NormedSpace ℝ X] + [NormedAddCommGroup Y] [NormedSpace ℝ Y] + +variable {ι : Y →L[ℝ] X} {A : ApproximationScheme X} {r s C : ℝ} {q : ℝ≥0∞} + +/-- **Jackson's half of the representation theorem**: +`‖f‖_{A^s_q} ≤ max(1, C) ‖f‖_{(X,Y)_{s/r,q}}` (dyadic quasi-norm), for `r ≠ 0`. -/ +theorem approxNormDyadic_le_interpNorm_of_jackson (hJ : JacksonBound ι A r C) (hC : 0 ≤ C) + (hr : r ≠ 0) (f : X) : + A.approxNormDyadic s q f ≤ max 1 (ENNReal.ofReal C) * interpNorm ι (s / r) r q f := by + set M := max 1 (ENNReal.ofReal C) + have hseq : ∀ k, A.approxSeqDyadic s f k ≤ M * interpSeq ι (s / r) r f k := fun k => by + rw [approxSeqDyadic, interpSeq, mul_div_cancel₀ s hr, mul_left_comm] + gcongr + have := approxError_le_kFunctional_of_jackson hJ hC (Nat.one_le_two_pow (n := k)) f + rwa [ENNReal.natCast_two_pow_rpow] at this + calc A.approxNormDyadic s q f = ‖f‖ₑ + lqNorm q (A.approxSeqDyadic s f) := rfl + _ ≤ M * ‖f‖ₑ + M * lqNorm q (interpSeq ι (s / r) r f) := by + gcongr + · exact le_mul_of_one_le_left' (le_max_left _ _) + · rw [← ENNReal.lqNorm_const_mul]; exact ENNReal.lqNorm_mono hseq + _ = M * interpNorm ι (s / r) r q f := by rw [interpNorm, mul_add] + +/-- The constant of Bernstein's half of the representation theorem, +`3 + (3 C + 2 K) (1 - 2^(-(r-s)))⁻¹` with `K = liftConst C r`. -/ +noncomputable def reprConst (C r s : ℝ) : ℝ≥0∞ := + 3 + (3 * ENNReal.ofReal C + 2 * liftConst C r) * (1 - (2 : ℝ≥0∞) ^ (-(r - s)))⁻¹ + +/-- The constant of the representation theorem is finite for `s < r`. -/ +theorem reprConst_ne_top (C : ℝ) (h : s < r) : reprConst C r s ≠ ∞ := by + unfold reprConst + refine ENNReal.add_ne_top.2 ⟨by norm_num, ENNReal.mul_ne_top (ENNReal.add_ne_top.2 + ⟨ENNReal.mul_ne_top (by norm_num) ENNReal.ofReal_ne_top, + ENNReal.mul_ne_top (by norm_num) (liftConst_ne_top C r)⟩) + (ENNReal.one_sub_two_rpow_neg_inv_ne_top (sub_pos.2 h))⟩ + +/-- **The interpolation sequence at one scale from lifted approximants**: if `y_0` and `d_j` +lift near-best approximants `a_k` of `f`, `ι(y_0 + ∑_{j by + simp only [approxSeqDyadic, ← mul_assoc, ← ENNReal.dyadicWeight_add, mul_add] + congr 2 <;> congr 1 <;> ring + have hL3 : lqNorm q (fun k => B * dyadicWeight (-(r - s)) k) ≤ + B * (1 - (2 : ℝ≥0∞) ^ (-(r - s)))⁻¹ := by + rw [ENNReal.lqNorm_const_mul] + gcongr + exact ENNReal.lqNorm_dyadicWeight_neg_le hq _ + have hL4 : lqNorm q (fun k => K * (dyadicWeight (-(r - s)) k * ∑ j ∈ range (k + 1), + dyadicWeight r j * (A.approxError f (2 ^ j) + tolerance f s j))) ≤ + K * ((1 - (2 : ℝ≥0∞) ^ (-(r - s)))⁻¹ * (lqNorm q (A.approxSeqDyadic s f) + 2 * ‖f‖ₑ)) := by + rw [ENNReal.lqNorm_const_mul] + gcongr + refine (ENNReal.hardy_sum_le hq (r - s) _).trans ?_ + simp_rw [hsplit] + gcongr + exact lqNorm_approxSeqDyadic_add_tolerance_le hq f s + exact (ENNReal.lqNorm_mono hu).trans ((ENNReal.lqNorm_add_le hq _ _).trans + (add_le_add (lqNorm_approxSeqDyadic_add_tolerance_le hq f s) + ((ENNReal.lqNorm_add_le hq _ _).trans (add_le_add hL3 hL4)))) + +/-- **Adding the norm**: if `L ≤ (D + 2 ‖f‖) + (B ‖f‖ c + K c (D + 2 ‖f‖))` with +`D = ‖(2^(ks) E_{2^k}(f))_k‖_{ℓ_q}`, then `‖f‖ + L ≤ (3 + (B + 2 K) c) ‖f‖_{A^s_q}`, since +`‖f‖` and `D` are at most the dyadic quasi-norm `‖f‖_{A^s_q} = ‖f‖ + D`. -/ +theorem enorm_add_le_mul_approxNormDyadic {f : X} {L B K c : ℝ≥0∞} + (h : L ≤ (lqNorm q (A.approxSeqDyadic s f) + 2 * ‖f‖ₑ) + + (B * ‖f‖ₑ * c + K * (c * (lqNorm q (A.approxSeqDyadic s f) + 2 * ‖f‖ₑ)))) : + ‖f‖ₑ + L ≤ (3 + (B + 2 * K) * c) * A.approxNormDyadic s q f := by + set N := A.approxNormDyadic s q f + set Ds := lqNorm q (A.approxSeqDyadic s f) + have hN : N = ‖f‖ₑ + Ds := rfl + have hfN : ‖f‖ₑ ≤ N := enorm_le_approxNormDyadic f + have h2 : Ds + 2 * ‖f‖ₑ ≤ 2 * N := + calc Ds + 2 * ‖f‖ₑ = N + ‖f‖ₑ := by rw [hN]; ring + _ ≤ N + N := by gcongr + _ = 2 * N := by ring + have h1 : ‖f‖ₑ + (Ds + 2 * ‖f‖ₑ) ≤ 3 * N := + calc ‖f‖ₑ + (Ds + 2 * ‖f‖ₑ) = N + 2 * ‖f‖ₑ := by rw [hN]; ring + _ ≤ N + 2 * N := by gcongr + _ = 3 * N := by ring + calc ‖f‖ₑ + L ≤ ‖f‖ₑ + ((Ds + 2 * ‖f‖ₑ) + (B * ‖f‖ₑ * c + K * (c * (Ds + 2 * ‖f‖ₑ)))) := by + gcongr + _ = (‖f‖ₑ + (Ds + 2 * ‖f‖ₑ)) + B * ‖f‖ₑ * c + K * (c * (Ds + 2 * ‖f‖ₑ)) := by ring + _ ≤ 3 * N + B * N * c + K * (c * (2 * N)) := by gcongr + _ = (3 + (B + 2 * K) * c) * N := by ring + +/-- **Bernstein's half of the representation theorem**: for `0 < s < r`, +`‖f‖_{(X,Y)_{s/r,q}} ≤ reprConst C r s · ‖f‖_{A^s_q}` (dyadic quasi-norm). -/ +theorem interpNorm_le_approxNormDyadic_of_bernstein (hB : LiftBound ι A r C) (hC : 0 ≤ C) + (hs : 0 < s) (hsr : s < r) (hq : 1 ≤ q) (f : X) : + interpNorm ι (s / r) r q f ≤ reprConst C r s * A.approxNormDyadic s q f := by + rcases eq_or_ne f 0 with rfl | hf0 + · have : interpSeq ι (s / r) r (0 : X) = fun _ => 0 := by funext k; simp [interpSeq] + simp [interpNorm, this] + obtain ⟨D⟩ := exists_dyadicApprox A f (tolerance_ne_zero hf0 s) + obtain ⟨y0, d, hpart, hy0, hd⟩ := D.exists_lift_partial (tolerance_anti f hs.le) hB hC + have hy0' : ‖y0‖ₑ ≤ 3 * ENNReal.ofReal C * ‖f‖ₑ := by + rw [tolerance_zero] at hy0 + calc ‖y0‖ₑ ≤ ENNReal.ofReal C * (2 * ‖f‖ₑ + ‖f‖ₑ) := hy0 + _ = 3 * ENNReal.ofReal C * ‖f‖ₑ := by ring + -- the K-functional at `2^(-kr)`, through the lifted partial sums + have hK := interpSeq_le_of_lift (s := s) (hs.trans hsr).ne' D hpart hy0' hd + calc interpNorm ι (s / r) r q f = ‖f‖ₑ + lqNorm q (interpSeq ι (s / r) r f) := rfl + _ ≤ reprConst C r s * A.approxNormDyadic s q f := by + rw [reprConst] + exact enorm_add_le_mul_approxNormDyadic (lqNorm_le_of_le_partialSums hq hK) + +/-- **The representation theorem**: under Jackson's and Bernstein's inequalities of order `r` +and for `0 < s < r`, `f ∈ A^s_q` if and only if `f ∈ (X, Y)_{s/r,q}`, the real interpolation +space of the discrete K-method on the grid `t = 2^(-kr)`. -/ +theorem memApprox_iff_memInterp {C₁ C₂ : ℝ} (hJ : JacksonBound ι A r C₁) (hC₁ : 0 ≤ C₁) + (hB : LiftBound ι A r C₂) (hC₂ : 0 ≤ C₂) (hs : 0 < s) (hsr : s < r) (hq : 1 ≤ q) {f : X} : + A.MemApprox s q f ↔ MemInterp ι (s / r) r q f := by + rw [memApprox_iff_approxNormDyadic_lt_top hq hs.le] + constructor + · intro h + exact (interpNorm_le_approxNormDyadic_of_bernstein hB hC₂ hs hsr hq f).trans_lt + (ENNReal.mul_lt_top (reprConst_ne_top C₂ hsr).lt_top h) + · intro h + exact (approxNormDyadic_le_interpNorm_of_jackson hJ hC₁ (hs.trans hsr).ne' f).trans_lt + (ENNReal.mul_lt_top (max_lt ENNReal.one_lt_top ENNReal.ofReal_lt_top) h) + +/-- **The representation theorem** as an equality of subspaces: `A^s_q = (X, Y)_{s/r,q}`. -/ +theorem approxSpace_eq_interpSpace {C₁ C₂ : ℝ} (hJ : JacksonBound ι A r C₁) (hC₁ : 0 ≤ C₁) + (hB : LiftBound ι A r C₂) (hC₂ : 0 ≤ C₂) (hs : 0 < s) (hsr : s < r) (hq : 1 ≤ q) : + A.approxSpace s q hs.le hq = interpSpace ι (s / r) r q hq := + Submodule.ext fun _ => memApprox_iff_memInterp hJ hC₁ hB hC₂ hs hsr hq + +/-- **Approximation spaces depend only on the smoothness space**: two schemes satisfying +Jackson's and Bernstein's inequalities of the same order `r` for the same `ι : Y → X` have the +same approximation spaces `A^s_q`, `0 < s < r`. -/ +theorem approxSpace_eq_of_jackson_bernstein {B : ApproximationScheme X} {C₁ C₂ C₃ C₄ : ℝ} + (hJA : JacksonBound ι A r C₁) (hC₁ : 0 ≤ C₁) (hBA : LiftBound ι A r C₂) (hC₂ : 0 ≤ C₂) + (hJB : JacksonBound ι B r C₃) (hC₃ : 0 ≤ C₃) (hBB : LiftBound ι B r C₄) (hC₄ : 0 ≤ C₄) + (hs : 0 < s) (hsr : s < r) (hq : 1 ≤ q) : + A.approxSpace s q hs.le hq = B.approxSpace s q hs.le hq := by + rw [approxSpace_eq_interpSpace hJA hC₁ hBA hC₂ hs hsr hq, + approxSpace_eq_interpSpace hJB hC₃ hBB hC₄ hs hsr hq] + +/-- **The representation theorem for a smoothness space** `W` of order `r`: for `0 < s < r`, +`A^s_q = (X, W)_{s/r,q}`. -/ +theorem SmoothnessSpace.memApprox_iff_memInterp (W : SmoothnessSpace A Y) (hs : 0 < s) + (hsr : s < W.order) (hq : 1 ≤ q) {f : X} : + A.MemApprox s q f ↔ MemInterp W.incl (s / W.order) W.order q f := + ApproximationScheme.memApprox_iff_memInterp W.jackson W.jacksonConst_nonneg W.bernstein + W.bernsteinConst_nonneg hs hsr hq + +end ApproximationScheme diff --git a/LeanPool/FunctionSpaces/ApproximationSpaces/Jackson.lean b/LeanPool/FunctionSpaces/ApproximationSpaces/Jackson.lean new file mode 100644 index 0000000000..828e361f49 --- /dev/null +++ b/LeanPool/FunctionSpaces/ApproximationSpaces/Jackson.lean @@ -0,0 +1,145 @@ +/- +Copyright (c) 2026 Mario Ullrich. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Mario Ullrich +-/ +module + +public import LeanPool.FunctionSpaces.ApproximationSpaces.Lift + +/- +Modified for Lean Pool: module names and imports adapted. +-/ + +/-! +# Jackson and Bernstein inequalities, smoothness spaces + +Let `ι : Y → X` be a bounded linear map; think of `Y` as a space of smooth elements of `X` +(a Sobolev space inside `L_p`). Two inequalities relate `Y` to a scheme `A` in `X`: + +* **Jackson's inequality** of order `r`: `E_n(ι y) ≤ C n^(-r) ‖y‖_Y` for `n ≥ 1` + (`ApproximationScheme.JacksonBound`); smooth elements are well approximated; +* **Bernstein's inequality** of order `r`: every `a ∈ A n` is `ι y` with + `‖y‖_Y ≤ C n^r ‖a‖_X` (`ApproximationScheme.LiftBound` with exponent `r`); approximants are + smooth, with controlled norm. + +Jackson's inequality gives `ι(Y) ⊆ A^r_∞` with `‖ι y‖_{A^r_∞} ≤ (‖ι‖ + C) ‖y‖` +(`approxNormDyadic_top_le_of_jackson`), and Bernstein's inequality gives `A^r_1 ⊆ ι(Y)` +(`exists_preimage_of_liftBound`). So a space with both inequalities sits between the two +extreme approximation spaces of order `r`: + +`A^r_1 ⊆ ι(Y) ⊆ A^r_∞`. + +A **smoothness space** (`ApproximationScheme.SmoothnessSpace`) bundles `Y`, `ι`, the order and +the two inequalities. These two inclusions are all that the embedding theorems for Sobolev +spaces use; they lose the fine index at both ends, which is why the limiting cases of the +Sobolev embedding are out of reach of this method. +-/ + +@[expose] public section + +open scoped ENNReal + +namespace ApproximationScheme + +open ENNReal (lqNorm dyadicWeight) + +variable {X Y : Type*} [NormedAddCommGroup X] [NormedSpace ℝ X] + [NormedAddCommGroup Y] [NormedSpace ℝ Y] + +/-- **Jackson's inequality** of order `r` with constant `C`: `E_n(ι y) ≤ C n^(-r) ‖y‖` for all +`y ∈ Y` and `n ≥ 1`, stated for the real number `E_n(ι y)` (the error is finite). -/ +def JacksonBound (ι : Y →L[ℝ] X) (A : ApproximationScheme X) (r C : ℝ) : Prop := + ∀ n : ℕ, 1 ≤ n → ∀ y : Y, (A.approxError (ι y) n).toReal ≤ C * (n : ℝ) ^ (-r) * ‖y‖ + +variable {ι : Y →L[ℝ] X} {A : ApproximationScheme X} {r C : ℝ} + +/-- Jackson's inequality in `ℝ≥0∞`. -/ +theorem JacksonBound.approxError_le (hJ : JacksonBound ι A r C) (hC : 0 ≤ C) {n : ℕ} (hn : 1 ≤ n) + (y : Y) : A.approxError (ι y) n ≤ ENNReal.ofReal C * (n : ℝ≥0∞) ^ (-r) * ‖y‖ₑ := by + have hn0 : (0 : ℝ) < n := by exact_mod_cast hn + rw [← ENNReal.ofReal_toReal (approxError_ne_top (ι y) n), ← ofReal_norm, + ← ENNReal.ofReal_natCast, ENNReal.ofReal_rpow_of_pos hn0, + ← ENNReal.ofReal_mul hC, ← ENNReal.ofReal_mul (by positivity)] + exact ENNReal.ofReal_le_ofReal (hJ n hn y) + +/-- **Jackson's inequality gives `ι(Y) ⊆ A^r_∞`**: +`‖ι y‖ + sup_k 2^(kr) E_{2^k}(ι y) ≤ (‖ι‖ + C) ‖y‖`. -/ +theorem approxNormDyadic_top_le_of_jackson (hJ : JacksonBound ι A r C) (hC : 0 ≤ C) (y : Y) : + A.approxNormDyadic r ∞ (ι y) ≤ (‖ι‖ₑ + ENNReal.ofReal C) * ‖y‖ₑ := by + rw [approxNormDyadic, ENNReal.lqNorm_top, add_mul] + refine add_le_add (ι.le_opENorm y) (iSup_le fun k => ?_) + calc A.approxSeqDyadic r (ι y) k + ≤ dyadicWeight r k * (ENNReal.ofReal C * ((2 ^ k : ℕ) : ℝ≥0∞) ^ (-r) * ‖y‖ₑ) := by + rw [approxSeqDyadic]; gcongr; exact hJ.approxError_le hC Nat.one_le_two_pow y + _ = ENNReal.ofReal C * ‖y‖ₑ := by + rw [ENNReal.natCast_two_pow_rpow, mul_comm (ENNReal.ofReal C), mul_assoc, ← mul_assoc, + ENNReal.dyadicWeight_mul_neg_self, one_mul] + +/-- **Jackson's inequality gives `ι(Y) ⊆ A^r_∞`**, membership form. -/ +theorem memApprox_top_of_jackson (hJ : JacksonBound ι A r C) (hC : 0 ≤ C) (hr : 0 ≤ r) (y : Y) : + A.MemApprox r ∞ (ι y) := by + rw [memApprox_iff_approxNormDyadic_lt_top le_top hr] + exact (approxNormDyadic_top_le_of_jackson hJ hC y).trans_lt + (ENNReal.mul_lt_top (ENNReal.add_lt_top.2 ⟨eNorm_lt_top, ENNReal.ofReal_lt_top⟩) eNorm_lt_top) + +/-- A **smoothness space** of order `r` for the scheme `A`: a normed space `F` with an injective +bounded linear map `ι : F → E` satisfying Jackson's and Bernstein's inequalities of order `r`. +Sobolev spaces inside `L_p` are the motivating example. -/ +structure SmoothnessSpace {E : Type*} [NormedAddCommGroup E] [NormedSpace ℝ E] + (A : ApproximationScheme E) (F : Type*) [NormedAddCommGroup F] [NormedSpace ℝ F] where + /-- The embedding `ι` of the smoothness space into `E`. -/ + incl : F →L[ℝ] E + injective : Function.Injective incl + /-- The order of smoothness. -/ + order : ℝ + order_pos : 0 < order + /-- The constant of Jackson's inequality. -/ + jacksonConst : ℝ + jacksonConst_nonneg : 0 ≤ jacksonConst + /-- The constant of Bernstein's inequality. -/ + bernsteinConst : ℝ + bernsteinConst_nonneg : 0 ≤ bernsteinConst + jackson : JacksonBound incl A order jacksonConst + bernstein : LiftBound incl A order bernsteinConst + +namespace SmoothnessSpace + +variable (W : SmoothnessSpace A Y) + +/-- **`W ⊆ A^r_∞`**, from Jackson's inequality. -/ +theorem memApprox_top (y : Y) : A.MemApprox W.order ∞ (W.incl y) := + memApprox_top_of_jackson W.jackson W.jacksonConst_nonneg W.order_pos.le y + +/-- **`A^r_1 ⊆ W`**, from Bernstein's inequality. -/ +theorem exists_eq_of_memApprox_one [CompleteSpace Y] {f : X} (hf : A.MemApprox W.order 1 f) : + ∃ y : Y, W.incl y = f ∧ ‖y‖ₑ ≤ (3 * ENNReal.ofReal W.bernsteinConst + + 3 * liftConst W.bernsteinConst W.order) * A.approxNormDyadic W.order 1 f := + exists_preimage_of_liftBound W.bernstein W.bernsteinConst_nonneg W.order_pos.le + ((memApprox_iff_lqNorm_dyadic_lt_top le_rfl W.order_pos.le).1 hf) + +/-- **`A^s_q ⊆ W` for `s > r`**: more smoothness in the approximation sense than the order of +`W` gives an element of `W`, for every fine index. -/ +theorem exists_eq_of_lt [CompleteSpace Y] {s : ℝ} {q : ℝ≥0∞} (hs : W.order < s) (hq : 1 ≤ q) + {f : X} (hf : A.MemApprox s q f) : ∃ y : Y, W.incl y = f := + let ⟨y, hy, _⟩ := W.exists_eq_of_memApprox_one (hf.of_lt hq le_rfl W.order_pos.le hs) + ⟨y, hy⟩ + +/-- Transport of a smoothness space to an equal scheme, keeping the embedding, the order and +the constants. -/ +def congr {B : ApproximationScheme X} (h : A = B) (W : SmoothnessSpace A Y) : + SmoothnessSpace B Y where + incl := W.incl + injective := W.injective + order := W.order + order_pos := W.order_pos + jacksonConst := W.jacksonConst + jacksonConst_nonneg := W.jacksonConst_nonneg + bernsteinConst := W.bernsteinConst + bernsteinConst_nonneg := W.bernsteinConst_nonneg + jackson := h ▸ W.jackson + bernstein := h ▸ W.bernstein + +end SmoothnessSpace + +end ApproximationScheme diff --git a/LeanPool/FunctionSpaces/ApproximationSpaces/Lift.lean b/LeanPool/FunctionSpaces/ApproximationSpaces/Lift.lean new file mode 100644 index 0000000000..d1a3ab74b4 --- /dev/null +++ b/LeanPool/FunctionSpaces/ApproximationSpaces/Lift.lean @@ -0,0 +1,414 @@ +/- +Copyright (c) 2026 Mario Ullrich. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Mario Ullrich +-/ +module + +public import LeanPool.FunctionSpaces.ApproximationSpaces.Embedding +public import Mathlib.Analysis.Normed.Group.InfiniteSum +public import Mathlib.Analysis.Normed.Operator.NNNorm +public import Mathlib.Topology.Algebra.InfiniteSum.Module + +/- +Modified for Lean Pool: module names and imports adapted. +-/ + +/-! +# Lifting approximants: the telescoping argument + +Let `ι : Y → X` be a bounded linear map and `A` a scheme in `X`. A **lifting bound** of +exponent `β` says that every approximant is the image of an element of `Y` of controlled size: + +`a ∈ A n, n ≥ 1 ⟹ a = ι y with ‖y‖_Y ≤ C n^β ‖a‖_X` (`ApproximationScheme.LiftBound`). + +For `Y` a space of smooth functions this is **Bernstein's inequality** (`β` the smoothness); +for `Y = L_r ⊆ X = L_p` it is **Nikolskii's inequality** (`β = d (1/p - 1/r)`). + +Given `f ∈ X`, choose near-best approximants `a_k ∈ A (2^k)` (`DyadicApprox`), so that +`f = a_0 + ∑_k (a_{k+1} - a_k)` with blocks `a_{k+1} - a_k ∈ A (2^(k+2))` of size +`≲ E_{2^k}(f)`. Lift every block to `Y`: the lifted blocks have size `≲ 2^(kβ) E_{2^k}(f)`, so +if `∑_k 2^(kβ) E_{2^k}(f) < ∞` their series converges in the Banach space `Y` to some `y` with +`ι y = f` (`DyadicApprox.exists_preimage`). The partial sums of that series lift the +approximants `a_k`, and the tails bound how well `y` is approximated in `Y`. + +This single construction yields three theorems: Bernstein implies `A^β_1 ↪ Y` +(`exists_preimage_of_liftBound`, this file), the Nikolskii transfer theorem +(`ApproximationSpaces.Nikolskii`), and one half of the representation theorem. The +approximants themselves are controlled in `X` and in `A^r_∞` (`DyadicApprox.enorm_le`, +`DyadicApprox.approxNormDyadic_top_le`). + +**Tolerances.** Best approximants need not exist, so `a_k` is only near-best: +`‖f - a_k‖ ≤ E_{2^k}(f) + t_k`. The tolerances `t_k = ‖f‖ 2^(-k(σ+1))` are chosen so small +that every weighted sum of them that occurs is at most `2 ‖f‖`, which is absorbed into the +final constant; this avoids a limit `ε → 0`. The resulting bounds of the tolerances against +the errors (`tsum_dyadicWeight_mul_add_tolerance_le`, `mul_add_mul_tsum_tolerance_le`, +`lqNorm_approxSeqDyadic_add_tolerance_le`) serve every theorem built on the construction. +The tails of the lifted series are bounded by the tail of a convergent series, +`‖f - ∑_{i exists_mem_enorm_sub_le_add (A := A) (2 ^ k) f (ht0 k) + exact ⟨⟨a, ha, h⟩⟩ + +namespace DyadicApprox + +variable {f : X} {t : ℕ → ℝ≥0∞} (D : A.DyadicApprox f t) + +/-- Consecutive approximants differ by an approximant of complexity `2^(k+2)`. -/ +theorem sub_mem (k : ℕ) : D.a (k + 1) - D.a k ∈ A (2 ^ (k + 2)) := + sub_mem_pow_add_two (D.mem (k + 1)) (D.mem k) + +/-- The blocks are controlled by the errors: `‖a_{k+1} - a_k‖ ≤ 2 (E_{2^k}(f) + t_k)`. -/ +theorem enorm_sub_succ_le (ht : Antitone t) (k : ℕ) : + ‖D.a (k + 1) - D.a k‖ₑ ≤ 2 * (A.approxError f (2 ^ k) + t k) := by + calc ‖D.a (k + 1) - D.a k‖ₑ = ‖(f - D.a k) - (f - D.a (k + 1))‖ₑ := by congr 1; abel + _ ≤ ‖f - D.a k‖ₑ + ‖f - D.a (k + 1)‖ₑ := _root_.eNorm_sub_le + _ ≤ (A.approxError f (2 ^ k) + t k) + (A.approxError f (2 ^ (k + 1)) + t (k + 1)) := + add_le_add (D.eNorm_sub_le k) (D.eNorm_sub_le (k + 1)) + _ ≤ (A.approxError f (2 ^ k) + t k) + (A.approxError f (2 ^ k) + t k) := by + gcongr + · exact approxError_anti f (Nat.pow_le_pow_right two_pos (Nat.le_succ k)) + · exact ht (Nat.le_succ k) + _ = 2 * (A.approxError f (2 ^ k) + t k) := by ring + +/-- A near-best approximant of complexity `2^k` has norm at most `2 ‖f‖ + t_k`. -/ +theorem enorm_le (k : ℕ) : ‖D.a k‖ₑ ≤ 2 * ‖f‖ₑ + t k := + calc ‖D.a k‖ₑ = ‖f - (f - D.a k)‖ₑ := by rw [sub_sub_cancel] + _ ≤ ‖f‖ₑ + ‖f - D.a k‖ₑ := _root_.eNorm_sub_le + _ ≤ ‖f‖ₑ + (‖f‖ₑ + t k) := by + gcongr + exact (D.eNorm_sub_le k).trans (by gcongr; exact approxError_le_enorm f _) + _ = 2 * ‖f‖ₑ + t k := by ring + +/-- The first approximant is bounded: `‖a_0‖ ≤ 2 ‖f‖ + t_0`. -/ +theorem enorm_zero_le : ‖D.a 0‖ₑ ≤ 2 * ‖f‖ₑ + t 0 := D.enorm_le 0 + +/-- **The errors of a near-best approximant**: for decreasing tolerances and `j ≤ k`, +`E_{2^j}(a_k) ≤ E_{2^j}(f) + ‖f - a_k‖ ≤ 2 (E_{2^j}(f) + t_j)`. -/ +theorem approxError_le (ht : Antitone t) {j k : ℕ} (hjk : j ≤ k) : + A.approxError (D.a k) (2 ^ j) ≤ 2 * (A.approxError f (2 ^ j) + t j) := + calc A.approxError (D.a k) (2 ^ j) ≤ A.approxError f (2 ^ j) + ‖D.a k - f‖ₑ := + approxError_le_approxError_add_enorm _ _ _ + _ ≤ A.approxError f (2 ^ j) + (A.approxError f (2 ^ j) + t j) := by + rw [eNorm_sub_rev] + gcongr + exact (D.eNorm_sub_le k).trans + (add_le_add (approxError_anti f (Nat.pow_le_pow_right two_pos hjk)) (ht hjk)) + _ ≤ 2 * (A.approxError f (2 ^ j) + t j) := by + rw [two_mul] + gcongr + exact le_self_add + +/-- **The quasi-norm of `A^r_∞` of a near-best approximant**: for decreasing tolerances with +`t_0 ≤ ‖f‖`, `‖a_k‖_{A^r_∞} ≤ 3 ‖f‖ + 2 ∑_{j ≤ k} 2^(jr) (E_{2^j}(f) + t_j)`. -/ +theorem approxNormDyadic_top_le {r : ℝ} (ht : Antitone t) (ht0 : t 0 ≤ ‖f‖ₑ) (k : ℕ) : + A.approxNormDyadic r ∞ (D.a k) ≤ 3 * ‖f‖ₑ + + 2 * ∑ j ∈ range (k + 1), dyadicWeight r j * (A.approxError f (2 ^ j) + t j) := by + refine (approxNormDyadic_top_le_of_mem (D.mem k)).trans (add_le_add ?_ ?_) + · calc ‖D.a k‖ₑ ≤ 2 * ‖f‖ₑ + t k := D.enorm_le k + _ ≤ 2 * ‖f‖ₑ + ‖f‖ₑ := by gcongr; exact (ht (Nat.zero_le k)).trans ht0 + _ = 3 * ‖f‖ₑ := by ring + · rw [Finset.mul_sum] + calc ∑ j ∈ range k, A.approxSeqDyadic r (D.a k) j + ≤ ∑ j ∈ range k, 2 * (dyadicWeight r j * (A.approxError f (2 ^ j) + t j)) := + sum_le_sum fun j hj => by + rw [approxSeqDyadic, mul_left_comm] + gcongr + exact D.approxError_le ht (mem_range.1 hj).le + _ ≤ _ := sum_le_sum_of_subset (range_mono (Nat.le_succ k)) + +/-- The approximants converge to `f` when the dyadic errors and the tolerances tend to `0`. -/ +theorem tendsto (he : Tendsto (fun k => A.approxError f (2 ^ k)) atTop (𝓝 0)) + (ht : Tendsto t atTop (𝓝 0)) : Tendsto D.a atTop (𝓝 f) := by + have h : Tendsto (fun k => ‖f - D.a k‖ₑ) atTop (𝓝 0) := by + have := he.add ht + rw [add_zero] at this + exact tendsto_of_tendsto_of_tendsto_of_le_of_le tendsto_const_nhds this (fun _ => bot_le) + D.eNorm_sub_le + rw [tendsto_iff_norm_sub_tendsto_zero] + have := (ENNReal.tendsto_toReal ENNReal.zero_ne_top).comp h + simpa [Function.comp_def, norm_sub_rev] using this + +/-- **Lifting the blocks**: `a_0 = ι y_0` and `a_{k+1} - a_k = ι d_k` with +`‖y_0‖ ≤ C ‖a_0‖` and `‖d_k‖ ≤ C 2^((k+2)β) ‖a_{k+1} - a_k‖`. -/ +theorem exists_lift (hB : LiftBound ι A β C) (hC : 0 ≤ C) : + ∃ y0 : Y, ∃ d : ℕ → Y, ι y0 = D.a 0 ∧ (∀ k, ι (d k) = D.a (k + 1) - D.a k) ∧ + ‖y0‖ₑ ≤ ENNReal.ofReal C * ‖D.a 0‖ₑ ∧ + ∀ k, ‖d k‖ₑ ≤ ENNReal.ofReal C * dyadicWeight β (k + 2) * ‖D.a (k + 1) - D.a k‖ₑ := by + obtain ⟨y0, hy0, hy0le⟩ := hB.exists_enorm_le hC (n := 2 ^ 0) le_rfl (D.mem 0) + have : ∀ k, ∃ z : Y, ι z = D.a (k + 1) - D.a k ∧ + ‖z‖ₑ ≤ ENNReal.ofReal C * ((2 ^ (k + 2) : ℕ) : ℝ≥0∞) ^ β * ‖D.a (k + 1) - D.a k‖ₑ := + fun k => hB.exists_enorm_le hC Nat.one_le_two_pow (D.sub_mem k) + choose d hd hdle using this + refine ⟨y0, d, hy0, hd, by simpa using hy0le, fun k => ?_⟩ + rw [← ENNReal.natCast_two_pow_rpow] + exact hdle k + +include D in +/-- **The lifted partial sums.** There are `y_0` and `d_k` in `Y` whose partial sums +`z_n = y_0 + ∑_{j ?_, hy0le.trans (by gcongr; exact D.enorm_zero_le), fun k => ?_⟩ + · rw [map_add, map_sum, hy0] + simp_rw [hd] + rw [Finset.sum_range_sub (fun k => D.a k) n] + abel + · calc ‖d k‖ₑ ≤ ENNReal.ofReal C * dyadicWeight β (k + 2) * ‖D.a (k + 1) - D.a k‖ₑ := hdle k + _ ≤ ENNReal.ofReal C * dyadicWeight β (k + 2) * (2 * (A.approxError f (2 ^ k) + t k)) := by + gcongr; exact D.enorm_sub_succ_le ht k + _ = _ := by simp only [liftConst, ENNReal.dyadicWeight_add_nat]; ring + +include D in +/-- **The telescoping lift.** If `∑_k 2^(kβ) (E_{2^k}(f) + t_k) < ∞`, then `f = ι y` for some +`y ∈ Y` with + +* `‖y‖ ≤ C (2 ‖f‖ + t_0) + K ∑_k 2^(kβ) (E_{2^k}(f) + t_k)`, and +* for every `k` some `z` with `ι z ∈ A (2^k)` and + `‖y - z‖ ≤ K ∑_{i ≥ 0} 2^((k+i)β) (E_{2^(k+i)}(f) + t_{k+i})`, + +where `K = liftConst C β`. -/ +theorem exists_preimage [CompleteSpace Y] (ht : Antitone t) (hB : LiftBound ι A β C) + (hC : 0 ≤ C) (hβ : 0 ≤ β) + (hsum : ∑' k, dyadicWeight β k * (A.approxError f (2 ^ k) + t k) ≠ ∞) : + ∃ y : Y, ι y = f ∧ + ‖y‖ₑ ≤ ENNReal.ofReal C * (2 * ‖f‖ₑ + t 0) + + liftConst C β * ∑' k, dyadicWeight β k * (A.approxError f (2 ^ k) + t k) ∧ + ∀ k, ∃ z : Y, ι z ∈ A (2 ^ k) ∧ + ‖y - z‖ₑ ≤ liftConst C β * + ∑' i, dyadicWeight β (k + i) * (A.approxError f (2 ^ (k + i)) + t (k + i)) := by + obtain ⟨y0, d, hpart, hy0le, hdk⟩ := D.exists_lift_partial ht hB hC + set g : ℕ → ℝ≥0∞ := fun k => dyadicWeight β k * (A.approxError f (2 ^ k) + t k) + have hsumd : ∑' k, ‖d k‖ₑ ≠ ∞ := + ne_top_of_le_ne_top (ENNReal.mul_ne_top (liftConst_ne_top C β) hsum) + ((tsum_le_tsum hdk).trans_eq ENNReal.tsum_mul_left) + have hsd : Summable d := Summable.of_eNorm hsumd + -- the errors and the tolerances tend to zero + have hg : Tendsto g atTop (𝓝 0) := ENNReal.tendsto_atTop_zero_of_tsum_ne_top hsum + have hle1 : ∀ k, A.approxError f (2 ^ k) + t k ≤ g k := fun k => + le_mul_of_one_le_left' (ENNReal.one_le_dyadicWeight hβ k) + have he : Tendsto (fun k => A.approxError f (2 ^ k)) atTop (𝓝 0) := + tendsto_of_tendsto_of_tendsto_of_le_of_le tendsto_const_nhds hg (fun _ => bot_le) + fun k => le_self_add.trans (hle1 k) + have ht0 : Tendsto t atTop (𝓝 0) := + tendsto_of_tendsto_of_tendsto_of_le_of_le tendsto_const_nhds hg (fun _ => bot_le) + fun k => le_add_self.trans (hle1 k) + set y := y0 + ∑' k, d k + have hlim : Tendsto (fun n => ι (y0 + ∑ j ∈ range n, d j)) atTop (𝓝 (ι y)) := + (ι.continuous.tendsto y).comp (tendsto_const_nhds.add hsd.hasSum.tendsto_sum_nat) + simp_rw [hpart] at hlim + have hy : ι y = f := tendsto_nhds_unique hlim (D.tendsto he ht0) + refine ⟨y, hy, ?_, fun k => ⟨y0 + ∑ j ∈ range k, d j, by rw [hpart]; exact D.mem k, ?_⟩⟩ + · calc ‖y‖ₑ ≤ ‖y0‖ₑ + ‖∑' k, d k‖ₑ := eNorm_add_le _ _ + _ ≤ ENNReal.ofReal C * (2 * ‖f‖ₑ + t 0) + ∑' k, liftConst C β * g k := by + gcongr + exact eNorm_tsum_le_tsum_eNorm.trans (tsum_le_tsum hdk) + _ = _ := by rw [ENNReal.tsum_mul_left] + · rw [show y = y0 + ∑' k, d k from rfl, add_sub_add_left_eq_sub] + calc ‖∑' j, d j - ∑ j ∈ range k, d j‖ₑ ≤ ∑' i, ‖d (i + k)‖ₑ := + hsd.hasSum.enorm_sub_sum_range_le k + _ ≤ ∑' i, liftConst C β * g (k + i) := tsum_le_tsum fun i => by + rw [add_comm k i]; exact hdk (i + k) + _ = _ := ENNReal.tsum_mul_left + +end DyadicApprox + +section Tolerance + +variable {E : Type*} [NormedAddCommGroup E] + +/-- The tolerances `t_k = ‖f‖ 2^(-k(σ+1))`: positive and finite for `f ≠ 0`, decreasing for +`σ ≥ -1`, and small against every weight `2^(kτ)` with `τ ≤ σ`. -/ +noncomputable def tolerance (f : E) (σ : ℝ) (k : ℕ) : ℝ≥0∞ := ‖f‖ₑ * dyadicWeight (-(σ + 1)) k + +/-- For `f ≠ 0` the tolerances are positive. -/ +theorem tolerance_ne_zero {f : E} (hf : f ≠ 0) (σ : ℝ) (k : ℕ) : tolerance f σ k ≠ 0 := + mul_ne_zero (eNorm_ne_zero.2 hf) (ENNReal.dyadicWeight_ne_zero _ k) + +/-- The tolerances are finite. -/ +theorem tolerance_ne_top (f : E) (σ : ℝ) (k : ℕ) : tolerance f σ k ≠ ∞ := + ENNReal.mul_ne_top eNorm_ne_top (ENNReal.dyadicWeight_ne_top _ k) + +/-- For `σ ≥ 0` the tolerances decrease. -/ +theorem tolerance_anti (f : E) {σ : ℝ} (hσ : 0 ≤ σ) : Antitone (tolerance f σ) := fun _ _ h => by + unfold tolerance + gcongr + exact ENNReal.dyadicWeight_anti (by linarith) h + +/-- The first tolerance is `‖f‖`. -/ +@[simp] +theorem tolerance_zero (f : E) (σ : ℝ) : tolerance f σ 0 = ‖f‖ₑ := by simp [tolerance] + +/-- `2^(kτ) t_k ≤ ‖f‖ 2^(-k)` for `τ ≤ σ`. -/ +theorem dyadicWeight_mul_tolerance_le (f : E) {σ τ : ℝ} (h : τ ≤ σ) (k : ℕ) : + dyadicWeight τ k * tolerance f σ k ≤ ‖f‖ₑ * dyadicWeight (-1) k := by + rw [tolerance, mul_left_comm, ← ENNReal.dyadicWeight_add] + gcongr + exact ENNReal.dyadicWeight_le_of_le (by linarith) k + +/-- For `τ ≤ σ`, `∑_k 2^(kτ) ‖f‖ 2^(-k(σ+1)) ≤ 2 ‖f‖`. -/ +theorem tsum_dyadicWeight_mul_tolerance_le (f : E) {σ τ : ℝ} (h : τ ≤ σ) : + ∑' k, dyadicWeight τ k * tolerance f σ k ≤ 2 * ‖f‖ₑ := by + calc ∑' k, dyadicWeight τ k * tolerance f σ k ≤ ∑' k, ‖f‖ₑ * dyadicWeight (-1) k := + tsum_le_tsum fun k => dyadicWeight_mul_tolerance_le f h k + _ = 2 * ‖f‖ₑ := by rw [ENNReal.tsum_mul_left, ENNReal.tsum_dyadicWeight_neg_one, mul_comm] + +/-- For `σ > -1` the tolerances tend to `0`. -/ +theorem tendsto_tolerance (f : E) {σ : ℝ} (hσ : -1 < σ) : + Tendsto (tolerance f σ) atTop (𝓝 0) := by + have hr : (2 : ℝ≥0∞) ^ (-(σ + 1)) < 1 := ENNReal.two_rpow_neg_lt_one (by linarith) + have hgeo := ENNReal.Tendsto.const_mul (a := ‖f‖ₑ) + (ENNReal.tendsto_pow_atTop_nhds_zero_of_lt_one hr) (Or.inr eNorm_ne_top) + rw [mul_zero] at hgeo + refine hgeo.congr fun k => ?_ + rw [tolerance, ENNReal.dyadicWeight_eq_pow] + +/-- For `σ ≥ 0`, `∑_k ‖f‖ 2^(-k(σ+1)) ≤ 2 ‖f‖`. -/ +theorem tsum_tolerance_le (f : E) {σ : ℝ} (hσ : 0 ≤ σ) : ∑' k, tolerance f σ k ≤ 2 * ‖f‖ₑ := by + have := tsum_dyadicWeight_mul_tolerance_le (σ := σ) (τ := 0) f hσ + simp only [ENNReal.dyadicWeight_zero_left, one_mul] at this + exact this + +/-- For `τ ≤ σ`, `‖(2^(kτ) ‖f‖ 2^(-k(σ+1)))_k‖_{ℓ_q} ≤ 2 ‖f‖`. -/ +theorem lqNorm_dyadicWeight_mul_tolerance_le {q : ℝ≥0∞} (hq : 1 ≤ q) (f : E) {σ τ : ℝ} + (h : τ ≤ σ) : lqNorm q (fun k => dyadicWeight τ k * tolerance f σ k) ≤ 2 * ‖f‖ₑ := by + calc lqNorm q (fun k => dyadicWeight τ k * tolerance f σ k) + ≤ lqNorm q (fun k => ‖f‖ₑ * dyadicWeight (-1) k) := + ENNReal.lqNorm_mono fun k => dyadicWeight_mul_tolerance_le f h k + _ = ‖f‖ₑ * lqNorm q (dyadicWeight (-1)) := ENNReal.lqNorm_const_mul _ _ + _ ≤ ‖f‖ₑ * 2 := by gcongr; exact ENNReal.lqNorm_dyadicWeight_neg_one_le hq + _ = 2 * ‖f‖ₑ := mul_comm _ _ + +end Tolerance + +/-! ### The tolerances against the errors -/ + +/-- **Splitting off the tolerances**: for `τ ≤ σ`, +`∑_k 2^(kτ) (E_{2^k}(f) + t_k) ≤ ‖(2^(kτ) E_{2^k}(f))_k‖_{ℓ_1} + 2 ‖f‖`, with the tolerances +`t_k = tolerance f σ k`. -/ +theorem tsum_dyadicWeight_mul_add_tolerance_le (f : X) {σ τ : ℝ} (h : τ ≤ σ) : + ∑' k, dyadicWeight τ k * (A.approxError f (2 ^ k) + tolerance f σ k) ≤ + lqNorm 1 (A.approxSeqDyadic τ f) + 2 * ‖f‖ₑ := by + simp_rw [mul_add] + rw [tsum_add, ← ENNReal.lqNorm_one] + exact add_le_add le_rfl (tsum_dyadicWeight_mul_tolerance_le f h) + +/-- For `τ ≤ σ` and `‖(2^(kτ) E_{2^k}(f))_k‖_{ℓ_1} < ∞`, the series +`∑_k 2^(kτ) (E_{2^k}(f) + t_k)` with the tolerances `t_k = tolerance f σ k` is finite. -/ +theorem tsum_dyadicWeight_mul_add_tolerance_ne_top {f : X} {σ τ : ℝ} (h : τ ≤ σ) + (hf : lqNorm 1 (A.approxSeqDyadic τ f) ≠ ∞) : + ∑' k, dyadicWeight τ k * (A.approxError f (2 ^ k) + tolerance f σ k) ≠ ∞ := + ne_top_of_le_ne_top (ENNReal.add_ne_top.2 ⟨hf, ENNReal.mul_ne_top (by norm_num) eNorm_ne_top⟩) + (tsum_dyadicWeight_mul_add_tolerance_le f h) + +/-- **The bound of a telescoping lift by the norm of `A^σ_1`**: +`c (2 ‖f‖ + ‖f‖) + K ∑_k 2^(kσ) (E_{2^k}(f) + t_k) ≤ (3 c + 3 K) ‖f‖_{A^σ_1}` with the +tolerances `t_k = tolerance f σ k`, for all `c, K ∈ [0, ∞]`. -/ +theorem mul_add_mul_tsum_tolerance_le (c K : ℝ≥0∞) (f : X) (σ : ℝ) : + c * (2 * ‖f‖ₑ + ‖f‖ₑ) + + K * ∑' k, dyadicWeight σ k * (A.approxError f (2 ^ k) + tolerance f σ k) ≤ + (3 * c + 3 * K) * A.approxNormDyadic σ 1 f := by + set L := lqNorm 1 (A.approxSeqDyadic σ f) + have hN : A.approxNormDyadic σ 1 f = ‖f‖ₑ + L := rfl + calc _ ≤ c * (3 * (‖f‖ₑ + L)) + K * (3 * (‖f‖ₑ + L)) := by + gcongr + · calc 2 * ‖f‖ₑ + ‖f‖ₑ = 3 * ‖f‖ₑ := by ring + _ ≤ 3 * (‖f‖ₑ + L) := by gcongr; exact le_self_add + · calc _ ≤ L + 2 * ‖f‖ₑ := tsum_dyadicWeight_mul_add_tolerance_le f le_rfl + _ ≤ (‖f‖ₑ + L) + 2 * (‖f‖ₑ + L) := by gcongr; exacts [le_add_self, le_self_add] + _ = 3 * (‖f‖ₑ + L) := by ring + _ = _ := by rw [hN]; ring + +/-- **The `ℓ_q` norm of the errors plus the tolerances**: for `q ≥ 1`, +`‖(2^(ks) E_{2^k}(f) + 2^(ks) t_k)_k‖_{ℓ_q} ≤ ‖(2^(ks) E_{2^k}(f))_k‖_{ℓ_q} + 2 ‖f‖`, with the +tolerances `t_k = tolerance f s k`. -/ +theorem lqNorm_approxSeqDyadic_add_tolerance_le {q : ℝ≥0∞} (hq : 1 ≤ q) (f : X) (s : ℝ) : + lqNorm q (fun k => A.approxSeqDyadic s f k + dyadicWeight s k * tolerance f s k) ≤ + lqNorm q (A.approxSeqDyadic s f) + 2 * ‖f‖ₑ := + (ENNReal.lqNorm_add_le hq _ _).trans + (add_le_add le_rfl (lqNorm_dyadicWeight_mul_tolerance_le hq f le_rfl)) + +/-- **A lifting bound of exponent `β` gives `A^β_1 ↪ Y`**: if +`∑_k 2^(kβ) E_{2^k}(f) < ∞`, then `f = ι y` with +`‖y‖ ≤ (3 C + 3 K) (‖f‖ + ∑_k 2^(kβ) E_{2^k}(f))`, `K = liftConst C β`. For a Bernstein +inequality this is the embedding of the approximation space into the smoothness space. -/ +theorem exists_preimage_of_liftBound [CompleteSpace Y] (hB : LiftBound ι A β C) (hC : 0 ≤ C) + (hβ : 0 ≤ β) {f : X} (hf : lqNorm 1 (A.approxSeqDyadic β f) < ∞) : + ∃ y : Y, ι y = f ∧ + ‖y‖ₑ ≤ (3 * ENNReal.ofReal C + 3 * liftConst C β) * A.approxNormDyadic β 1 f := by + rcases eq_or_ne f 0 with rfl | hf0 + · exact ⟨0, map_zero ι, by simp⟩ + obtain ⟨D⟩ := exists_dyadicApprox A f (tolerance_ne_zero hf0 β) + obtain ⟨y, hy, hyle, -⟩ := D.exists_preimage (tolerance_anti f hβ) hB hC hβ + (tsum_dyadicWeight_mul_add_tolerance_ne_top le_rfl hf.ne) + rw [tolerance_zero] at hyle + exact ⟨y, hy, hyle.trans (mul_add_mul_tsum_tolerance_le _ _ f β)⟩ + +end ApproximationScheme diff --git a/LeanPool/FunctionSpaces/ApproximationSpaces/Moduli.lean b/LeanPool/FunctionSpaces/ApproximationSpaces/Moduli.lean new file mode 100644 index 0000000000..746c23e695 --- /dev/null +++ b/LeanPool/FunctionSpaces/ApproximationSpaces/Moduli.lean @@ -0,0 +1,424 @@ +/- +Copyright (c) 2026 Mario Ullrich. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Mario Ullrich +-/ +module + +public import LeanPool.FunctionSpaces.ApproximationSpaces.Lift +public import LeanPool.FunctionSpaces.ApproximationSpaces.Sequences.Hardy +public import LeanPool.FunctionSpaces.ApproximationSpaces.Interpolation.ApproxSpaces + +/- +Modified for Lean Pool: module names and imports adapted. +-/ + +/-! +# Moduli of smoothness and approximation: the coincidence theorem + +Classical function spaces are defined by a **modulus of smoothness** `ω(f, 2^(-k))`, approximation +spaces by the errors `E_{2^k}(f)`. They coincide when the scheme and the modulus are linked by + +* a **Jackson inequality** `E_{2^k}(f) ≤ C_J ω(f, 2^(-k))` for `k ≥ k₀`, and +* an **inverse inequality** of order `θ`: `ω(a, 2^(-k)) ≤ C_B 2^(-(k-j)θ) ‖a‖` for `a ∈ A_{2^j}` + (with `k - j` truncated at `0`, so for `k < j` this is a bound by `‖a‖`). + +A `ModulusData A θ` bundles the modulus (sampled at dyadic scales, `modulus f k = ω(f, +2^(-k))`), its +subadditivity and bound `ω(f) ≤ C₀ ‖f‖`, and the two inequalities; `ModulusData.ofExists` +builds one from existence statements for the constants `C_J`, `C_B`. With the classical +quasi-norm `‖f‖ + ‖(2^(ks) ω(f, 2^(-k)))_k‖_{ℓ_q}` (`ModulusData.modNorm`): + +* `‖f‖_{A^s_q} ≤ (1 + ∑_{k dyadicWeight s k * M.modulus f k) + +/-- The modulus of `0` vanishes. -/ +theorem modulus_zero (k : ℕ) : M.modulus 0 k = 0 := + le_antisymm ((M.le_enorm 0 k).trans (by simp)) bot_le + +/-- The modulus is subadditive on finite sums (Mathlib's `Finset.le_sum_of_subadditive`). -/ +theorem modulus_sum_le {ι : Type*} (t : Finset ι) (g : ι → X) (k : ℕ) : + M.modulus (∑ i ∈ t, g i) k ≤ ∑ i ∈ t, M.modulus (g i) k := + Finset.le_sum_of_subadditive (M.modulus · k) (M.modulus_zero k).le (fun f g => M.add_le f g k) + t g + +/-- The constant of Jackson's direction, `1 + ∑_{k ENNReal.dyadicWeight_ne_top s k⟩, M.CJ_ne_top⟩ + +/-- **Jackson's direction**: `‖f‖_{A^s_q} ≤ (1 + ∑_{k dyadicWeight s k * M.modulus f k) + set W := ∑ k ∈ range M.jacksonStart, dyadicWeight s k + -- the levels below `k₀` and from `k₀` on + have hpt : ∀ k, A.approxSeqDyadic s f k ≤ + (if k < M.jacksonStart then dyadicWeight s k * ‖f‖ₑ else 0) + + M.CJ * (dyadicWeight s k * M.modulus f k) := fun k => by + rw [approxSeqDyadic] + split_ifs with hk + · exact le_add_right (by gcongr; exact approxError_le_enorm f _) + · rw [zero_add, mul_left_comm] + gcongr + exact M.jackson f k (not_lt.1 hk) + have hlow : lqNorm q (fun k => if k < M.jacksonStart then dyadicWeight s k * ‖f‖ₑ else 0) ≤ + W * ‖f‖ₑ := by + refine (ENNReal.lqNorm_le_sum_of_eq_zero hq (range M.jacksonStart) fun k hk => by + rw [mem_range] at hk; simp only [hk, ↓reduceIte]).trans_eq ?_ + rw [Finset.sum_mul] + exact Finset.sum_congr rfl fun k hk => by rw [mem_range] at hk; simp only [hk, ↓reduceIte] + calc A.approxNormDyadic s q f = ‖f‖ₑ + lqNorm q (A.approxSeqDyadic s f) := rfl + _ ≤ ‖f‖ₑ + (W * ‖f‖ₑ + M.CJ * L) := by + gcongr + refine (ENNReal.lqNorm_mono hpt).trans ((ENNReal.lqNorm_add_le hq _ _).trans ?_) + rw [ENNReal.lqNorm_const_mul] + gcongr + _ ≤ (1 + W + M.CJ) * (‖f‖ₑ + L) := by + calc ‖f‖ₑ + (W * ‖f‖ₑ + M.CJ * L) = (1 + W) * ‖f‖ₑ + M.CJ * L := by ring + _ ≤ ((1 + W) * ‖f‖ₑ + M.CJ * ‖f‖ₑ) + ((1 + W) * L + M.CJ * L) := by + gcongr + · exact le_self_add + · exact le_add_self + _ = (1 + W + M.CJ) * (‖f‖ₑ + L) := by ring + +/-- The constant of the inverse direction, +`1 + 3 C₀ + C_B (3 + 6 · 4^θ) (1 - 2^(-(θ-s)))⁻¹`. -/ +noncomputable def inverseConst (s : ℝ) : ℝ≥0∞ := + 1 + 3 * M.C0 + M.CB * (3 + 6 * dyadicWeight θ 2) * (1 - (2 : ℝ≥0∞) ^ (-(θ - s)))⁻¹ + +/-- The constant of the inverse direction is finite for `s < θ`. -/ +theorem inverseConst_ne_top (hsθ : s < θ) : M.inverseConst s ≠ ∞ := by + have hr : (2 : ℝ≥0∞) ^ (-(θ - s)) < 1 := ENNReal.two_rpow_neg_lt_one (by linarith) + unfold inverseConst + refine ENNReal.add_ne_top.2 ⟨ENNReal.add_ne_top.2 ⟨ENNReal.one_ne_top, + ENNReal.mul_ne_top (by norm_num) M.C0_ne_top⟩, ENNReal.mul_ne_top (ENNReal.mul_ne_top + M.CB_ne_top (ENNReal.add_ne_top.2 ⟨by norm_num, ENNReal.mul_ne_top (by norm_num) + (ENNReal.dyadicWeight_ne_top _ _)⟩)) (ENNReal.inv_ne_top.2 (tsub_pos_of_lt hr).ne')⟩ + +/-- **The modulus at one scale from near-best approximants**: for near-best approximants +`a_k ∈ A_{2^k}` of `f` with an antitone tolerance `t` and `t_0 = ‖f‖`, the telescoping +`f = (f - a_k) + a_0 + ∑_{j D.a j) k]; abel + have h1 : M.modulus (f - D.a k) k ≤ M.C0 * (A.approxError f (2 ^ k) + t k) := + (M.le_enorm _ k).trans (by gcongr; exact D.eNorm_sub_le k) + have h2 : M.modulus (D.a 0) k ≤ M.CB * dyadicWeight (-θ) k * (3 * ‖f‖ₑ) := by + refine (M.inverse 0 k _ (by simpa using D.mem 0)).trans ?_ + rw [Nat.sub_zero] + gcongr + calc ‖D.a 0‖ₑ ≤ 2 * ‖f‖ₑ + t 0 := D.enorm_zero_le + _ = 3 * ‖f‖ₑ := by rw [ht0]; ring + have h3 : ∀ j ∈ range k, M.modulus (D.a (j + 1) - D.a j) k ≤ + M.CB * (2 * dyadicWeight θ 2) * (dyadicWeight (-θ) (k - j) * + (A.approxError f (2 ^ j) + t j)) := fun j _ => by + refine (M.inverse (j + 2) k _ (D.sub_mem j)).trans ?_ + calc M.CB * dyadicWeight (-θ) (k - (j + 2)) * ‖D.a (j + 1) - D.a j‖ₑ + ≤ M.CB * (dyadicWeight θ 2 * dyadicWeight (-θ) (k - j)) * + (2 * (A.approxError f (2 ^ j) + t j)) := by + gcongr + · rw [show k - (j + 2) = k - j - 2 by omega] + exact ENNReal.dyadicWeight_neg_sub_two_le hθ (k - j) + · exact D.enorm_sub_succ_le ht j + _ = _ := by ring + calc M.modulus f k + = M.modulus ((f - D.a k) + (D.a 0 + ∑ j ∈ range k, (D.a (j + 1) - D.a j))) k := by + rw [← htel] + _ ≤ M.modulus (f - D.a k) k + + (M.modulus (D.a 0) k + ∑ j ∈ range k, M.modulus (D.a (j + 1) - D.a j) k) := + (M.add_le _ _ k).trans (add_le_add le_rfl ((M.add_le _ _ k).trans + (add_le_add le_rfl (M.modulus_sum_le _ _ k)))) + _ ≤ _ := by + rw [← add_assoc] + exact add_le_add (add_le_add h1 h2) (Finset.sum_le_sum h3) + +/-- **The weighted modulus at one scale**: with `E_k = 2^(ks) (E_{2^k}(f) + t_k)` and +`α = θ - s`, `ModulusData.modulus_le_of_dyadicApprox` multiplied by `2^(ks)` reads +`2^(ks) ω(f, 2^(-k)) ≤ C₀ E_k + 3 C_B ‖f‖ 2^(-kα) + 2 C_B 4^θ 2^(-kα) ∑_{j ≤ k} 2^(jα) E_j`. -/ +theorem dyadicWeight_mul_modulus_le_of_dyadicApprox (hθ : 0 ≤ θ) {f : X} {t : ℕ → ℝ≥0∞} + (D : A.DyadicApprox f t) (ht : Antitone t) (ht0 : t 0 = ‖f‖ₑ) (k : ℕ) : + dyadicWeight s k * M.modulus f k ≤ + M.C0 * (dyadicWeight s k * (A.approxError f (2 ^ k) + t k)) + + M.CB * 3 * ‖f‖ₑ * dyadicWeight (-(θ - s)) k + + M.CB * (2 * dyadicWeight θ 2) * (dyadicWeight (-(θ - s)) k * + ∑ j ∈ range (k + 1), dyadicWeight (θ - s) j * + (dyadicWeight s j * (A.approxError f (2 ^ j) + t j))) := by + have hw : ∀ j ∈ range k, dyadicWeight s k * dyadicWeight (-θ) (k - j) = + dyadicWeight (-(θ - s)) k * dyadicWeight (θ - s) j * dyadicWeight s j := fun j hj => by + rw [ENNReal.dyadicWeight_mul_dyadicWeight_neg_sub s θ (Finset.mem_range.1 hj).le, mul_assoc, + ← ENNReal.dyadicWeight_add, sub_add_cancel] + have hw0 : dyadicWeight s k * dyadicWeight (-θ) k = dyadicWeight (-(θ - s)) k := by + rw [← ENNReal.dyadicWeight_add]; congr 1; ring + calc dyadicWeight s k * M.modulus f k + ≤ dyadicWeight s k * (M.C0 * (A.approxError f (2 ^ k) + t k) + + M.CB * dyadicWeight (-θ) k * (3 * ‖f‖ₑ) + ∑ j ∈ range k, + M.CB * (2 * dyadicWeight θ 2) * (dyadicWeight (-θ) (k - j) * + (A.approxError f (2 ^ j) + t j))) := by + gcongr + exact M.modulus_le_of_dyadicApprox hθ D ht ht0 k + _ = M.C0 * (dyadicWeight s k * (A.approxError f (2 ^ k) + t k)) + + M.CB * 3 * ‖f‖ₑ * (dyadicWeight s k * dyadicWeight (-θ) k) + + M.CB * (2 * dyadicWeight θ 2) * ∑ j ∈ range k, + (dyadicWeight s k * dyadicWeight (-θ) (k - j)) * + (A.approxError f (2 ^ j) + t j) := by + simp only [mul_add, Finset.mul_sum]; ring_nf + _ ≤ _ := by + rw [hw0, Finset.sum_congr rfl fun j hj => by rw [hw j hj]] + have hsum : ∑ j ∈ range k, dyadicWeight (-(θ - s)) k * dyadicWeight (θ - s) j * + dyadicWeight s j * (A.approxError f (2 ^ j) + t j) = + dyadicWeight (-(θ - s)) k * ∑ j ∈ range k, dyadicWeight (θ - s) j * + (dyadicWeight s j * (A.approxError f (2 ^ j) + t j)) := by + rw [Finset.mul_sum] + refine Finset.sum_congr rfl fun j _ => ?_ + ring + rw [hsum] + exact add_le_add le_rfl (mul_le_mul_right (mul_le_mul_right + (Finset.sum_le_sum_of_subset (Finset.range_mono (Nat.le_succ k))) _) _) + +/-- **The inverse direction**: for `0 ≤ s < θ`, `‖f‖^ω_{s,q} ≤ K ‖f‖_{A^s_q}` with +`K = M.inverseConst s`. -/ +theorem modNorm_le_approxNormDyadic (hq : 1 ≤ q) (hs : 0 ≤ s) (hsθ : s < θ) (f : X) : + M.modNorm s q f ≤ M.inverseConst s * A.approxNormDyadic s q f := by + have hθ : 0 ≤ θ := hs.trans hsθ.le + rcases eq_or_ne f 0 with rfl | hf0 + · simp [modNorm, M.modulus_zero] + set t := tolerance f s + obtain ⟨D⟩ := A.exists_dyadicApprox f (fun k => tolerance_ne_zero hf0 s k) + have ht : Antitone t := tolerance_anti f hs + set N := A.approxNormDyadic s q f + set E : ℕ → ℝ≥0∞ := fun k => dyadicWeight s k * (A.approxError f (2 ^ k) + t k) + have hE : lqNorm q E ≤ N + 2 * ‖f‖ₑ := by + calc lqNorm q E = lqNorm q (fun k => A.approxSeqDyadic s f k + dyadicWeight s k * t k) := by + congr 1; funext k; simp only [E, approxSeqDyadic]; ring + _ ≤ N + 2 * ‖f‖ₑ := + (lqNorm_approxSeqDyadic_add_tolerance_le hq f s).trans (add_le_add le_add_self le_rfl) + -- pointwise bound for one scale + set α := θ - s + have hpt : ∀ k, dyadicWeight s k * M.modulus f k ≤ + M.C0 * E k + M.CB * 3 * ‖f‖ₑ * dyadicWeight (-α) k + + M.CB * (2 * dyadicWeight θ 2) * (dyadicWeight (-α) k * + ∑ j ∈ range (k + 1), dyadicWeight α j * E j) := fun k => + M.dyadicWeight_mul_modulus_le_of_dyadicApprox hθ D ht (tolerance_zero f s) k + -- the ℓ_q norm + have hr : (2 : ℝ≥0∞) ^ (-α) < 1 := ENNReal.two_rpow_neg_lt_one (by simp only [α]; linarith) + have hgeo : lqNorm q (dyadicWeight (-α)) ≤ (1 - (2 : ℝ≥0∞) ^ (-α))⁻¹ := + ENNReal.lqNorm_dyadicWeight_neg_le hq α + have hhardy := ENNReal.hardy_sum_le hq α (fun j => dyadicWeight α j * E j) + have hcancel : (fun k => dyadicWeight (-α) k * (dyadicWeight α k * E k)) = E := by + funext k; rw [← mul_assoc, ENNReal.dyadicWeight_neg_mul_self, one_mul] + rw [hcancel] at hhardy + have hfN : ‖f‖ₑ ≤ N := enorm_le_approxNormDyadic f + calc M.modNorm s q f = ‖f‖ₑ + lqNorm q (fun k => dyadicWeight s k * M.modulus f k) := rfl + _ ≤ ‖f‖ₑ + (M.C0 * lqNorm q E + M.CB * 3 * ‖f‖ₑ * lqNorm q (dyadicWeight (-α)) + + M.CB * (2 * dyadicWeight θ 2) * lqNorm q (fun k => dyadicWeight (-α) k * + ∑ j ∈ range (k + 1), dyadicWeight α j * E j)) := by + gcongr + refine (ENNReal.lqNorm_mono hpt).trans ?_ + refine (ENNReal.lqNorm_add_le hq _ _).trans ?_ + gcongr + · refine (ENNReal.lqNorm_add_le hq _ _).trans ?_ + rw [ENNReal.lqNorm_const_mul, ENNReal.lqNorm_const_mul] + · rw [ENNReal.lqNorm_const_mul] + _ ≤ N + (M.C0 * (N + 2 * N) + M.CB * 3 * N * (1 - (2 : ℝ≥0∞) ^ (-α))⁻¹ + + M.CB * (2 * dyadicWeight θ 2) * ((1 - (2 : ℝ≥0∞) ^ (-α))⁻¹ * (N + 2 * N))) := by + gcongr + · exact hE.trans (by gcongr) + · exact hhardy.trans (by gcongr; exact hE.trans (by gcongr)) + _ = (1 + 3 * M.C0 + M.CB * (3 + 6 * dyadicWeight θ 2) * (1 - (2 : ℝ≥0∞) ^ (-α))⁻¹) * N := by + ring + _ = M.inverseConst s * N := rfl + +/-- **The coincidence theorem**: for `0 ≤ s < θ` and `1 ≤ q ≤ ∞`, `f ∈ A^s_q` iff the classical +quasi-norm `‖f‖ + ‖(2^(ks) ω(f, 2^(-k)))_k‖_{ℓ_q}` is finite. -/ +theorem memApprox_iff_modNorm_lt_top (hq : 1 ≤ q) (hs : 0 ≤ s) (hsθ : s < θ) (f : X) : + A.MemApprox s q f ↔ M.modNorm s q f < ∞ := by + rw [memApprox_iff_approxNormDyadic_lt_top hq hs] + constructor + · intro h + exact (M.modNorm_le_approxNormDyadic hq hs hsθ f).trans_lt + (ENNReal.mul_lt_top (M.inverseConst_ne_top hsθ).lt_top h) + · intro h + exact (M.approxNormDyadic_le_modNorm hq f).trans_lt + (ENNReal.mul_lt_top (M.directConst_ne_top s).lt_top h) + +/-! ### Interpolation of the classical spaces -/ + +variable {s₀ s₁ η : ℝ} {q₀ q₁ : ℝ≥0∞} + +/-- The **couple of two classical spaces** of a modulus `ω` compatible with the scheme: the +classical quasi-norms `‖f‖ + ‖(2^(ks_i) ω(f, 2^(-k)))_k‖_{ℓ_{q_i}}`, `i = 0, 1`. -/ +noncomputable def modCouple (s₀ : ℝ) (q₀ : ℝ≥0∞) (s₁ : ℝ) (q₁ : ℝ≥0∞) : InterpCouple X := + ⟨M.modNorm s₀ q₀, M.modNorm s₁ q₁⟩ + +/-- The first norm of the couple of two classical spaces is the classical quasi-norm of +smoothness `s₀`. -/ +@[simp] +theorem modCouple_norm0 (f : X) : (M.modCouple s₀ q₀ s₁ q₁).norm0 f = M.modNorm s₀ q₀ f := rfl + +/-- The second norm of the couple of two classical spaces is the classical quasi-norm of +smoothness `s₁`. -/ +@[simp] +theorem modCouple_norm1 (f : X) : (M.modCouple s₀ q₀ s₁ q₁).norm1 f = M.modNorm s₁ q₁ f := rfl + +/-- The **couple of `X` and a classical space** of a modulus `ω` compatible with the scheme: the +norm `‖f‖` of `X` and the classical quasi-norm `‖f‖ + ‖(2^(ks₁) ω(f, 2^(-k)))_k‖_{ℓ_{q₁}}`. -/ +noncomputable def leftModCouple (s₁ : ℝ) (q₁ : ℝ≥0∞) : InterpCouple X := + ⟨fun f => ‖f‖ₑ, M.modNorm s₁ q₁⟩ + +/-- The first norm of the couple of `X` and a classical space is the norm of `X`. -/ +@[simp] +theorem leftModCouple_norm0 (f : X) : (M.leftModCouple s₁ q₁).norm0 f = ‖f‖ₑ := rfl + +/-- The second norm of the couple of `X` and a classical space is the classical quasi-norm. -/ +@[simp] +theorem leftModCouple_norm1 (f : X) : (M.leftModCouple s₁ q₁).norm1 f = M.modNorm s₁ q₁ f := rfl + +/-- **Classical spaces interpolate to approximation spaces**: for a modulus compatible with the +scheme of inverse order `θ`, `0 < s₀ < s₁ < θ`, `0 < η < 1` and `1 ≤ q₀, q₁, q ≤ ∞`, the real +interpolation space of the couple of the classical spaces of smoothness `s₀` and `s₁` is +`A^{(1-η)s₀+ηs₁}_q`. The classical quasi-norms are equivalent to the dyadic quasi-norms +(`approxNormDyadic_le_modNorm`, `modNorm_le_approxNormDyadic`), so the sandwich principle +applies (`memKMethod_iff_memApprox_of_two_sandwiches`). -/ +theorem memKMethod_modCouple_iff_memApprox (hs₀ : 0 < s₀) (hs : s₀ < s₁) (hs₁ : s₁ < θ) + (hη : 0 < η) (hη' : η < 1) (hq₀ : 1 ≤ q₀) (hq₁ : 1 ≤ q₁) (hq : 1 ≤ q) {f : X} : + (M.modCouple s₀ q₀ s₁ q₁).MemKMethod η q f ↔ A.MemApprox ((1 - η) * s₀ + η * s₁) q f := + memKMethod_iff_memApprox_of_two_sandwiches (M.inverseConst_ne_top (hs.trans hs₁)) + (M.directConst_ne_top s₀) (M.inverseConst_ne_top hs₁) (M.directConst_ne_top s₁) hq₀ hq₀ hq₁ + hq₁ hs₀ hs hη hη' hq (M.modNorm_le_approxNormDyadic hq₀ hs₀.le (hs.trans hs₁)) + (M.approxNormDyadic_le_modNorm hq₀) + (M.modNorm_le_approxNormDyadic hq₁ (hs₀.trans hs).le hs₁) (M.approxNormDyadic_le_modNorm hq₁) + +/-- **The interpolation spaces of two classical spaces**: for a modulus compatible with the +scheme of inverse order `θ`, `0 < s₀ < s₁ < θ`, `0 < η < 1` and `1 ≤ q₀, q₁, q ≤ ∞`, `f` lies in +the real interpolation space of the couple of the classical spaces of smoothness `s₀` and `s₁` +iff `‖f‖ + ‖(2^(ks) ω(f, 2^(-k)))_k‖_{ℓ_q} < ∞` with `s = (1-η)s₀ + ηs₁`. -/ +theorem memKMethod_modCouple_iff (hs₀ : 0 < s₀) (hs : s₀ < s₁) (hs₁ : s₁ < θ) (hη : 0 < η) + (hη' : η < 1) (hq₀ : 1 ≤ q₀) (hq₁ : 1 ≤ q₁) (hq : 1 ≤ q) {f : X} : + (M.modCouple s₀ q₀ s₁ q₁).MemKMethod η q f ↔ + M.modNorm ((1 - η) * s₀ + η * s₁) q f < ∞ := by + rw [M.memKMethod_modCouple_iff_memApprox hs₀ hs hs₁ hη hη' hq₀ hq₁ hq] + exact M.memApprox_iff_modNorm_lt_top hq (reiterationExponent_pos hs₀ hs hη hη').le + (reiterationExponent_lt hs hs₁ hη') f + +/-- **`X` and a classical space interpolate to approximation spaces**: for a modulus compatible +with the scheme of inverse order `θ`, `0 < s₁ < θ`, `0 < η < 1` and `1 ≤ q₁, q ≤ ∞`, the real +interpolation space of the couple of `X` and the classical space of smoothness `s₁` is +`A^{ηs₁}_q` (`memKMethod_iff_memApprox_of_sandwich`). -/ +theorem memKMethod_leftModCouple_iff_memApprox (hs₁ : 0 < s₁) (hs₁θ : s₁ < θ) (hη : 0 < η) + (hη' : η < 1) (hq₁ : 1 ≤ q₁) (hq : 1 ≤ q) {f : X} : + (M.leftModCouple s₁ q₁).MemKMethod η q f ↔ A.MemApprox (η * s₁) q f := + memKMethod_iff_memApprox_of_sandwich (M.inverseConst_ne_top hs₁θ) (M.directConst_ne_top s₁) + hq₁ hq₁ hs₁ hη hη' hq (M.modNorm_le_approxNormDyadic hq₁ hs₁.le hs₁θ) + (M.approxNormDyadic_le_modNorm hq₁) + +/-- **The interpolation spaces of `X` and a classical space**: for a modulus compatible with the +scheme of inverse order `θ`, `0 < s₁ < θ`, `0 < η < 1` and `1 ≤ q₁, q ≤ ∞`, `f` lies in the real +interpolation space of the couple of `X` and the classical space of smoothness `s₁` iff +`‖f‖ + ‖(2^(kηs₁) ω(f, 2^(-k)))_k‖_{ℓ_q} < ∞`. -/ +theorem memKMethod_leftModCouple_iff (hs₁ : 0 < s₁) (hs₁θ : s₁ < θ) (hη : 0 < η) (hη' : η < 1) + (hq₁ : 1 ≤ q₁) (hq : 1 ≤ q) {f : X} : + (M.leftModCouple s₁ q₁).MemKMethod η q f ↔ M.modNorm (η * s₁) q f < ∞ := by + have hlt : η * s₁ < θ := by nlinarith + rw [M.memKMethod_leftModCouple_iff_memApprox hs₁ hs₁θ hη hη' hq₁ hq] + exact M.memApprox_iff_modNorm_lt_top hq (mul_pos hη hs₁).le hlt f + +end ModulusData + +end ApproximationScheme diff --git a/LeanPool/FunctionSpaces/ApproximationSpaces/Nikolskii.lean b/LeanPool/FunctionSpaces/ApproximationSpaces/Nikolskii.lean new file mode 100644 index 0000000000..73b382fd45 --- /dev/null +++ b/LeanPool/FunctionSpaces/ApproximationSpaces/Nikolskii.lean @@ -0,0 +1,157 @@ +/- +Copyright (c) 2026 Mario Ullrich. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Mario Ullrich +-/ +module + +public import LeanPool.FunctionSpaces.ApproximationSpaces.Lift +public import LeanPool.FunctionSpaces.ApproximationSpaces.Sequences.Hardy + +/- +Modified for Lean Pool: module names and imports adapted. +-/ + +/-! +# The Nikolskii transfer theorem + +Let `ι : Y → X` be an injective bounded linear map between Banach spaces, `A` a scheme in +`X` whose approximants lie in `ι(Y)`, and suppose the **Nikolskii inequality** + +`a ∈ A n, n ≥ 1 ⟹ a = ι y with ‖y‖_Y ≤ C n^α ‖a‖_X` + +(`LiftBound ι A α C`). Pull the scheme back to `Y`, `B n = ι⁻¹(A n)`. Then for `0 ≤ α < s` +and `1 ≤ q ≤ ∞`, every `f ∈ A^s_q(X)` is `f = ι y` for some `y ∈ B^{s-α}_q(Y)`, with + +`‖y‖_{B^{s-α}_q} ≤ K ‖f‖_{A^s_q}`, `K = nikolskiiConst C α s` + +in the dyadic quasi-norms (`exists_preimage_of_nikolskii`). The typical case is +`X = L_p ⊇ Y = L_r` with `p < r` and `α = d (1/p - 1/r)`: a function in the Besov space +`B^s_{p,q}` with `s > d(1/p - 1/r)` is in `L_r` and belongs to `B^{s - d(1/p-1/r)}_{r,q}`. +`ι` is the inclusion `L_r → L_p`, which is not surjective, so `f` is *a priori* only an +element of `L_p`; the theorem constructs its `L_r` version. + +**Proof.** The telescoping lift of `ApproximationSpaces.Lift` gives `y = y_0 + ∑_k d_k` in `Y` +whose partial sums `z_k` lie in `B (2^k)`. So `E^B_{2^k}(y) ≤ ‖y - z_k‖ ≤ ∑_{i ≥ k} ‖d_i‖` and +`‖d_i‖ ≲ 2^(iα) E_{2^i}(f)`; Hardy's inequality for tails with exponent `s - α > 0` +(`ENNReal.hardy_tail_le`) converts this into the bound on `‖(2^(k(s-α)) E^B_{2^k}(y))_k‖_q` +(`approxNormDyadic_le_of_tail`, which the trace transfer theorem uses as well). +The strict inequality `α < s` is needed for Hardy's inequality and for the convergence of the +series; the limiting case `α = s` is false in general. +-/ + +@[expose] public section + +open scoped ENNReal + +namespace ApproximationScheme + +open ENNReal (lqNorm dyadicWeight) + +variable {X Y : Type*} [NormedAddCommGroup X] [NormedSpace ℝ X] + [NormedAddCommGroup Y] [NormedSpace ℝ Y] + +variable {ι : Y →L[ℝ] X} {A : ApproximationScheme X} {α C s : ℝ} {q : ℝ≥0∞} + +/-- The constant of the Nikolskii transfer theorem, +`3 C + 3 K (1 - 2^(-(s-α)))⁻¹ + 2 K` with `K = liftConst C α`. -/ +noncomputable def nikolskiiConst (C α s : ℝ) : ℝ≥0∞ := + 3 * ENNReal.ofReal C + 3 * liftConst C α * (1 - (2 : ℝ≥0∞) ^ (-(s - α)))⁻¹ + 2 * liftConst C α + +/-- The constant of the Nikolskii transfer theorem is finite for `α < s`. -/ +theorem nikolskiiConst_ne_top (C : ℝ) (h : α < s) : nikolskiiConst C α s ≠ ∞ := by + have h1 : liftConst C α ≠ ∞ := liftConst_ne_top C α + have h2 := ENNReal.one_sub_two_rpow_neg_inv_ne_top (sub_pos.2 h) + unfold nikolskiiConst + exact ENNReal.add_ne_top.2 ⟨ENNReal.add_ne_top.2 + ⟨ENNReal.mul_ne_top (by norm_num) ENNReal.ofReal_ne_top, + ENNReal.mul_ne_top (ENNReal.mul_ne_top (by norm_num) h1) h2⟩, + ENNReal.mul_ne_top (by norm_num) h1⟩ + +/-- **The transfer estimate.** Let `1 ≤ q ≤ ∞`, `α ≤ s`, `t_k = tolerance f s k` and +`g_k = 2^(kα) (E_{2^k}(f) + t_k)`. If an element `y` of `Y` and a scheme `B` in `Y` satisfy +`‖y‖ ≤ c (2 ‖f‖ + ‖f‖) + K ∑_k g_k` and `E^B_{2^k}(y) ≤ K ∑_{i ≥ 0} g_{k+i}` for every `k`, then +`‖y‖_{B^{s-α}_q} ≤ (3 c + 3 K (1 - 2^(-(s-α)))⁻¹ + 2 K) ‖f‖_{A^s_q}` in the dyadic +quasi-norms. The constant is finite for `α < s` (`ENNReal.one_sub_two_rpow_neg_inv_ne_top`), +the case of both transfer theorems. Hardy's inequality for tails (`ENNReal.hardy_tail_le`) +turns the tail bound into the bound of the `ℓ_q` part. The Nikolskii transfer theorem and the +trace transfer theorem (`TraceBound.approxNormDyadic_ext_le`) both end with this estimate. -/ +theorem approxNormDyadic_le_of_tail {B : ApproximationScheme Y} {c K : ℝ≥0∞} (hαs : α ≤ s) + (hq : 1 ≤ q) (f : X) {y : Y} + (hy : ‖y‖ₑ ≤ c * (2 * ‖f‖ₑ + ‖f‖ₑ) + + K * ∑' k, dyadicWeight α k * (A.approxError f (2 ^ k) + tolerance f s k)) + (herr : ∀ k, B.approxError y (2 ^ k) ≤ K * ∑' i, dyadicWeight α (k + i) * + (A.approxError f (2 ^ (k + i)) + tolerance f s (k + i))) : + B.approxNormDyadic (s - α) q y ≤ + (3 * c + 3 * K * (1 - (2 : ℝ≥0∞) ^ (-(s - α)))⁻¹ + 2 * K) * A.approxNormDyadic s q f := by + set N := A.approxNormDyadic s q f + set Cs := (1 - (2 : ℝ≥0∞) ^ (-(s - α)))⁻¹ + set g : ℕ → ℝ≥0∞ := fun m => dyadicWeight α m * (A.approxError f (2 ^ m) + tolerance f s m) + have hfN : ‖f‖ₑ ≤ N := enorm_le_approxNormDyadic f + have hL : lqNorm 1 (A.approxSeqDyadic α f) ≤ Cs * N := + (lqNorm_le_approxNormDyadic f).trans (approxNormDyadic_le_of_lt hq le_rfl f) + have hg : ∀ k, dyadicWeight (s - α) k * g k = + A.approxSeqDyadic s f k + dyadicWeight s k * tolerance f s k := fun k => by + simp only [g, approxSeqDyadic, ← mul_assoc, ← ENNReal.dyadicWeight_add, sub_add_cancel, + mul_add] + have hlq : lqNorm q (B.approxSeqDyadic (s - α) y) ≤ K * (Cs * (2 * N)) := by + calc lqNorm q (B.approxSeqDyadic (s - α) y) + ≤ lqNorm q (fun k => K * (dyadicWeight (s - α) k * ∑' i, g (k + i))) := + ENNReal.lqNorm_mono fun k => + (mul_le_mul' le_rfl (herr k)).trans_eq (mul_left_comm _ _ _) + _ = K * lqNorm q (fun k => dyadicWeight (s - α) k * ∑' i, g (k + i)) := + ENNReal.lqNorm_const_mul _ _ + _ ≤ K * (Cs * lqNorm q (fun k => dyadicWeight (s - α) k * g k)) := by + gcongr; exact ENNReal.hardy_tail_le hq (s - α) g + _ ≤ K * (Cs * (2 * N)) := by + gcongr + simp_rw [hg] + refine (lqNorm_approxSeqDyadic_add_tolerance_le hq f s).trans ?_ + calc lqNorm q (A.approxSeqDyadic s f) + 2 * ‖f‖ₑ + ≤ 2 * lqNorm q (A.approxSeqDyadic s f) + 2 * ‖f‖ₑ := by + gcongr; exact le_mul_of_one_le_left' one_le_two + _ = 2 * N := by rw [show N = ‖f‖ₑ + lqNorm q (A.approxSeqDyadic s f) from rfl]; ring + have hnorm : ‖y‖ₑ ≤ (3 * c + K * Cs + 2 * K) * N := by + calc ‖y‖ₑ ≤ c * (2 * ‖f‖ₑ + ‖f‖ₑ) + K * ∑' k, g k := hy + _ ≤ c * (3 * N) + K * (Cs * N + 2 * N) := by + gcongr + · calc 2 * ‖f‖ₑ + ‖f‖ₑ = 3 * ‖f‖ₑ := by ring + _ ≤ 3 * N := by gcongr + · exact (tsum_dyadicWeight_mul_add_tolerance_le (A := A) f hαs).trans + (add_le_add hL (by gcongr)) + _ = (3 * c + K * Cs + 2 * K) * N := by ring + calc B.approxNormDyadic (s - α) q y = ‖y‖ₑ + lqNorm q (B.approxSeqDyadic (s - α) y) := rfl + _ ≤ (3 * c + K * Cs + 2 * K) * N + K * (Cs * (2 * N)) := add_le_add hnorm hlq + _ = (3 * c + 3 * K * Cs + 2 * K) * N := by ring + +/-- **The Nikolskii transfer theorem.** For an injective `ι : Y → X` with a Nikolskii +inequality of exponent `α` for `A`, `0 ≤ α < s` and `1 ≤ q ≤ ∞`, every `f ∈ A^s_q(X)` is +`ι y` for some `y ∈ Y` with `‖y‖_{B^{s-α}_q} ≤ K ‖f‖_{A^s_q}` (dyadic quasi-norms), where `B` +is the scheme `ι⁻¹(A n)` in `Y`. -/ +theorem exists_preimage_of_nikolskii [CompleteSpace Y] (hι : Function.Injective ι) + (hN : LiftBound ι A α C) (hC : 0 ≤ C) (hα : 0 ≤ α) (hαs : α < s) (hq : 1 ≤ q) {f : X} + (hf : A.MemApprox s q f) : + ∃ y : Y, ι y = f ∧ (A.comap ι.toLinearMap hι).approxNormDyadic (s - α) q y ≤ + nikolskiiConst C α s * A.approxNormDyadic s q f := by + rcases eq_or_ne f 0 with rfl | hf0 + · exact ⟨0, map_zero ι, by simp⟩ + obtain ⟨D⟩ := exists_dyadicApprox A f (tolerance_ne_zero hf0 s) + obtain ⟨y, hy, hyle, htail⟩ := D.exists_preimage (tolerance_anti f (hα.trans hαs.le)) hN hC + hα (tsum_dyadicWeight_mul_add_tolerance_ne_top hαs.le (hf.lqNorm_one_lt_top hq hα hαs).ne) + rw [tolerance_zero] at hyle + refine ⟨y, hy, approxNormDyadic_le_of_tail hαs.le hq f hyle fun k => ?_⟩ + obtain ⟨z, hz, hzle⟩ := htail k + exact (approxError_le_of_mem (A.mem_comap.2 hz) y).trans hzle + +/-- **The Nikolskii transfer theorem**, membership form: `f ∈ A^s_q(X)` gives `f = ι y` with +`y ∈ B^{s-α}_q(Y)`. -/ +theorem MemApprox.exists_preimage_of_nikolskii [CompleteSpace Y] (hι : Function.Injective ι) + (hN : LiftBound ι A α C) (hC : 0 ≤ C) (hα : 0 ≤ α) (hαs : α < s) (hq : 1 ≤ q) {f : X} + (hf : A.MemApprox s q f) : + ∃ y : Y, ι y = f ∧ (A.comap ι.toLinearMap hι).MemApprox (s - α) q y := by + obtain ⟨y, hy, hle⟩ := ApproximationScheme.exists_preimage_of_nikolskii hι hN hC hα hαs hq hf + refine ⟨y, hy, (memApprox_iff_approxNormDyadic_lt_top hq (sub_nonneg.2 hαs.le)).2 ?_⟩ + exact hle.trans_lt (ENNReal.mul_lt_top (nikolskiiConst_ne_top C hαs).lt_top + ((memApprox_iff_approxNormDyadic_lt_top hq (hα.trans hαs.le)).1 hf)) + +end ApproximationScheme diff --git a/LeanPool/FunctionSpaces/ApproximationSpaces/Norm.lean b/LeanPool/FunctionSpaces/ApproximationSpaces/Norm.lean new file mode 100644 index 0000000000..370f059921 --- /dev/null +++ b/LeanPool/FunctionSpaces/ApproximationSpaces/Norm.lean @@ -0,0 +1,133 @@ +/- +Copyright (c) 2026 Mario Ullrich. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Mario Ullrich +-/ +module + +public import LeanPool.FunctionSpaces.ApproximationSpaces.Error +public import LeanPool.FunctionSpaces.ApproximationSpaces.Sequences.Lq + +/- +Modified for Lean Pool: module names and imports adapted. +-/ + +/-! +# The approximation spaces `A^s_q` + +For an approximation scheme `A` in `X`, a smoothness `s` and a fine index `1 ≤ q ≤ ∞`, +Pietsch's **approximation space** `A^s_q` consists of the `f ∈ X` with + +`‖f‖_{A^s_q} = ‖ (n^(s - 1/q) E_{n-1}(f))_{n ≥ 1} ‖_{ℓ_q} < ∞`. + +In Lean the sequence is indexed from `0` as `((n + 1)^(s - 1/q) E_n(f))_{n ≥ 0}`, the +quasi-norm is `A.approxNorm s q f`, and membership is `A.MemApprox s q f`. For `q = ∞` the +exponent is `s` (in Lean `1 / ∞.toReal = 1 / 0 = 0`), so `‖f‖_{A^s_∞} = sup (n+1)^s E_n(f)`. +The same formula defines `A^s_q` for `0 < q < 1`, the range of nonlinear approximation; the +embedding `‖f‖ ≤ ‖f‖_{A^s_q}` holds for every `q ≠ 0`. + +**Design.** The quasi-norm takes values in `ℝ≥0∞` and is defined for every `f`; membership is +finiteness, as for `MeasureTheory.eLpNorm` and `MeasureTheory.MemLp`. The spaces are only +quasi-normed (the triangle inequality holds up to a constant), and Mathlib has no class for +quasi-normed spaces, so no new normed type is introduced. The linear structure is recorded +separately as a `Submodule` (`ApproximationScheme.approxSpace`). + +This file holds the definition and the facts that follow directly from the calculus of the +error `E_n(f) = A.approxError f n` of `ApproximationSpaces.Error`: homogeneity, +`‖f‖ ≤ ‖f‖_{A^s_q}` (because `E_0(f) = ‖f‖`), definiteness, and comparison of schemes. +Everything else is proved for the equivalent dyadic quasi-norm of +`ApproximationSpaces.Dyadic`. +-/ + +@[expose] public section + +open scoped ENNReal + +namespace ApproximationScheme + +variable {X : Type*} [NormedAddCommGroup X] [NormedSpace ℝ X] + +variable (A : ApproximationScheme X) + +/-- **Pietsch's quasi-norm** of `A^s_q`: the `ℓ_q` norm of `((n + 1)^(s - 1/q) E_n(f))_n`. -/ +noncomputable def approxNorm (s : ℝ) (q : ℝ≥0∞) (f : X) : ℝ≥0∞ := + ENNReal.lqNorm q (fun n => ((n + 1 : ℕ) : ℝ≥0∞) ^ (s - 1 / q.toReal) * A.approxError f n) + +/-- `f` belongs to the **approximation space** `A^s_q`: its quasi-norm is finite. -/ +def MemApprox (s : ℝ) (q : ℝ≥0∞) (f : X) : Prop := A.approxNorm s q f < ∞ + +variable {A} {s : ℝ} {q : ℝ≥0∞} + +/-- `f ∈ A^s_q` iff its quasi-norm is finite. -/ +theorem memApprox_iff {f : X} : A.MemApprox s q f ↔ A.approxNorm s q f < ∞ := Iff.rfl + +/-- The quasi-norm of an element of `A^s_q` is finite. -/ +theorem MemApprox.approxNorm_ne_top {f : X} (hf : A.MemApprox s q f) : A.approxNorm s q f ≠ ∞ := + hf.ne + +/-- For `q = ∞` the quasi-norm is `sup_n (n + 1)^s E_n(f)`. -/ +theorem approxNorm_top (s : ℝ) (f : X) : + A.approxNorm s ∞ f = ⨆ n, ((n + 1 : ℕ) : ℝ≥0∞) ^ s * A.approxError f n := by + simp [approxNorm, ENNReal.lqNorm_top] + +/-- For `q < ∞` the `q`-th power of the quasi-norm is `∑ₙ (n + 1)^(sq - 1) E_n(f)^q`. -/ +theorem approxNorm_rpow (hq0 : q ≠ 0) (hq : q ≠ ∞) (s : ℝ) (f : X) : + A.approxNorm s q f ^ q.toReal = + ∑' n, ((n + 1 : ℕ) : ℝ≥0∞) ^ (s * q.toReal - 1) * A.approxError f n ^ q.toReal := by + have hp : 0 < q.toReal := ENNReal.toReal_pos hq0 hq + rw [approxNorm, ENNReal.lqNorm_rpow hq0 hq] + congr 1; funext n + rw [ENNReal.mul_rpow_of_nonneg _ _ hp.le, ← ENNReal.rpow_mul] + congr 2 + field_simp + +/-- `‖0‖_{A^s_q} = 0`. -/ +@[simp] +theorem approxNorm_zero (s : ℝ) (q : ℝ≥0∞) : A.approxNorm s q 0 = 0 := by + simp [approxNorm] + +/-- `0 ∈ A^s_q`. -/ +theorem memApprox_zero (s : ℝ) (q : ℝ≥0∞) : A.MemApprox s q 0 := by + simp [MemApprox] + +/-- **Homogeneity**: `‖c f‖_{A^s_q} = |c| ‖f‖_{A^s_q}`. -/ +theorem approxNorm_smul (c : ℝ) (f : X) : + A.approxNorm s q (c • f) = ‖c‖ₑ * A.approxNorm s q f := by + simp_rw [approxNorm, approxError_smul, mul_left_comm _ ‖c‖ₑ] + exact ENNReal.lqNorm_const_mul _ _ + +/-- `A^s_q` is closed under real multiples. -/ +theorem MemApprox.smul {f : X} (hf : A.MemApprox s q f) (c : ℝ) : A.MemApprox s q (c • f) := by + rw [MemApprox, approxNorm_smul] + exact ENNReal.mul_lt_top eNorm_lt_top hf + +/-- `A^s_q` is closed under negation. -/ +theorem MemApprox.neg {f : X} (hf : A.MemApprox s q f) : A.MemApprox s q (-f) := by + simpa using hf.smul (-1) + +/-- **The embedding `A^s_q ↪ X`**: `‖f‖ ≤ ‖f‖_{A^s_q}` for every `q ≠ 0`, also below `1`, from +the term `E_0(f) = ‖f‖`. -/ +theorem enorm_le_approxNorm (hq0 : q ≠ 0) (f : X) : ‖f‖ₑ ≤ A.approxNorm s q f := by + have := ENNReal.le_lqNorm (a := fun n => ((n + 1 : ℕ) : ℝ≥0∞) ^ (s - 1 / q.toReal) * + A.approxError f n) hq0 0 + simp only [zero_add, Nat.cast_one, ENNReal.one_rpow, one_mul, approxError_zero_right] at this + exact this + +/-- For `q ≠ 0`, `‖f‖_{A^s_q} = 0` only for `f = 0`. -/ +theorem approxNorm_eq_zero_iff (hq0 : q ≠ 0) {f : X} : A.approxNorm s q f = 0 ↔ f = 0 := by + refine ⟨fun h => ?_, fun h => h ▸ approxNorm_zero s q⟩ + have := enorm_le_approxNorm (A := A) (s := s) hq0 f + rw [h, nonpos_iff_eq_zero, eNorm_eq_zero] at this + exact this + +/-- A scheme with larger sets has smaller quasi-norms, hence larger approximation spaces. -/ +theorem approxNorm_anti_scheme {A' : ApproximationScheme X} (h : ∀ n, A n ⊆ A' n) (f : X) : + A'.approxNorm s q f ≤ A.approxNorm s q f := + ENNReal.lqNorm_mono fun n => by gcongr; exact approxError_anti_scheme h f n + +/-- A scheme with larger sets has larger approximation spaces. -/ +theorem MemApprox.of_subset_scheme {A' : ApproximationScheme X} (h : ∀ n, A n ⊆ A' n) {f : X} + (hf : A.MemApprox s q f) : A'.MemApprox s q f := + (approxNorm_anti_scheme h f).trans_lt hf + +end ApproximationScheme diff --git a/LeanPool/FunctionSpaces/ApproximationSpaces/Retract.lean b/LeanPool/FunctionSpaces/ApproximationSpaces/Retract.lean new file mode 100644 index 0000000000..f6abdaa783 --- /dev/null +++ b/LeanPool/FunctionSpaces/ApproximationSpaces/Retract.lean @@ -0,0 +1,163 @@ +/- +Copyright (c) 2026 Mario Ullrich. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Mario Ullrich +-/ +module + +public import LeanPool.FunctionSpaces.ApproximationSpaces.Transfer +public import LeanPool.FunctionSpaces.ApproximationSpaces.Sequences.Hardy + +/- +Modified for Lean Pool: module names and imports adapted. +-/ + +/-! +# Intrinsic norms: the retract theorem + +Let `R : X → Y` be a bounded linear map with `R (A n) ⊆ B n`; the model is the restriction +`L_p(ℝ^d) → L_p(Ω)` to a domain `Ω`. The **restriction quasi-norm** of `g ∈ Y` is +`inf { ‖f‖_{A^s_q} : R f = g }` (`ApproximationScheme.restrictionNorm`). The approximation +quasi-norm `‖g‖_{B^s_q}` uses only `g` and the scheme on `Y`, so it is *intrinsic*. + +By functoriality the intrinsic quasi-norm is at most `‖R‖` times the quasi-norm of every +preimage (`ApproximationScheme.approxNormDyadic_le_iInf_restrict`). The reverse holds as soon +as there is an **approximation-preserving extension**: a map `E : Y → X`, not necessarily +linear, with `R (E g) = g`, `‖E g‖ ≤ C ‖g‖` and `E^A_{2^(k+γ)}(E g) ≤ C E^B_{2^k}(g)` for all `k` +(`ApproximationScheme.ApproxExtension`). Then `‖E g‖_{A^s_q} ≤ K ‖g‖_{B^s_q}` +(`ApproximationScheme.approxNormDyadic_extension_le`), so the two quasi-norms are equivalent +and `B^s_q = R(A^s_q)` (`ApproximationScheme.memApprox_iff_exists_restrict`). + +On Lipschitz domains such an extension is built from near-best local polynomial approximations +on Whitney cubes (DeVore–Sharpley). The extension may be nonlinear on purpose: in parts of the +quasi-Banach range no linear extension exists. +-/ + +@[expose] public section + +open Finset +open scoped ENNReal + +namespace ApproximationScheme + +open ENNReal (lqNorm dyadicWeight) + +variable {X Y : Type*} [NormedAddCommGroup X] [NormedSpace ℝ X] + [NormedAddCommGroup Y] [NormedSpace ℝ Y] + {A : ApproximationScheme X} {B : ApproximationScheme Y} {s : ℝ} {q : ℝ≥0∞} + +/-- An **approximation-preserving extension** for `R : X → Y`: a map `E : Y → X`, not +necessarily linear, with `R (E g) = g`, `‖E g‖ ≤ C ‖g‖` and +`E^A_{2^(k+γ)}(E g) ≤ C E^B_{2^k}(g)`. -/ +structure ApproxExtension (R : X →L[ℝ] Y) (A : ApproximationScheme X) + (B : ApproximationScheme Y) where + /-- The extension. -/ + E : Y → X + right_inv : ∀ g, R (E g) = g + /-- The constant of the extension. -/ + C : ℝ≥0∞ + C_ne_top : C ≠ ∞ + /-- The loss `γ` in complexity: `2^k` becomes `2^(k+γ)`. -/ + loss : ℕ + enorm_le : ∀ g, ‖E g‖ₑ ≤ C * ‖g‖ₑ + approxError_le : ∀ g k, A.approxError (E g) (2 ^ (k + loss)) ≤ C * B.approxError g (2 ^ k) + +/-- The constant `C (1 + (γ + 1) 2^(γs))` of the extension bound. -/ +noncomputable def extensionConst (C : ℝ≥0∞) (γ : ℕ) (s : ℝ) : ℝ≥0∞ := + C * (1 + (γ + 1) * dyadicWeight s γ) + +/-- The constant of the extension bound is finite. -/ +theorem extensionConst_ne_top {C : ℝ≥0∞} (hC : C ≠ ∞) (γ : ℕ) (s : ℝ) : + extensionConst C γ s ≠ ∞ := + ENNReal.mul_ne_top hC (ENNReal.add_ne_top.2 ⟨ENNReal.one_ne_top, ENNReal.mul_ne_top + (ENNReal.add_ne_top.2 ⟨ENNReal.natCast_ne_top γ, ENNReal.one_ne_top⟩) + (ENNReal.dyadicWeight_ne_top s γ)⟩) + +/-- **The extension preserves the approximation quasi-norm**: for `s ≥ 0` and `1 ≤ q ≤ ∞`, +`‖E g‖_{A^s_q} ≤ C (1 + (γ + 1) 2^(γs)) ‖g‖_{B^s_q}` in the dyadic quasi-norms. -/ +theorem approxNormDyadic_extension_le {R : X →L[ℝ] Y} (Ex : ApproxExtension R A B) (hs : 0 ≤ s) + (hq : 1 ≤ q) (g : Y) : + A.approxNormDyadic s q (Ex.E g) ≤ extensionConst Ex.C Ex.loss s * B.approxNormDyadic s q g := by + set γ := Ex.loss + set C := Ex.C + set w := dyadicWeight s γ + set L := lqNorm q (B.approxSeqDyadic s g) + set u : ℕ → ℝ≥0∞ := fun k => if k < γ then w * (C * ‖g‖ₑ) else 0 + set v : ℕ → ℝ≥0∞ := fun k => if γ ≤ k then w * C * B.approxSeqDyadic s g (k - γ) else 0 + have hpt : ∀ k, A.approxSeqDyadic s (Ex.E g) k ≤ u k + v k := fun k => by + rcases lt_or_ge k γ with hk | hk + · calc A.approxSeqDyadic s (Ex.E g) k + = dyadicWeight s k * A.approxError (Ex.E g) (2 ^ k) := rfl + _ ≤ w * (C * ‖g‖ₑ) := by + gcongr + · exact ENNReal.dyadicWeight_mono hs hk.le + · exact (approxError_le_enorm _ _).trans (Ex.enorm_le g) + _ ≤ u k + v k := by simp only [u, hk, ↓reduceIte]; exact le_self_add + · obtain ⟨j, rfl⟩ := Nat.exists_eq_add_of_le' hk + calc A.approxSeqDyadic s (Ex.E g) (j + γ) + = dyadicWeight s (j + γ) * A.approxError (Ex.E g) (2 ^ (j + γ)) := rfl + _ ≤ dyadicWeight s (j + γ) * (C * B.approxError g (2 ^ j)) := by + gcongr; exact Ex.approxError_le g j + _ = w * C * B.approxSeqDyadic s g j := by + rw [ENNReal.dyadicWeight_add_nat, approxSeqDyadic]; ring + _ ≤ u (j + γ) + v (j + γ) := by + simp only [v, hk, ↓reduceIte, Nat.add_sub_cancel]; exact le_add_self + have hu : lqNorm q u ≤ γ * (w * (C * ‖g‖ₑ)) := by + refine (ENNReal.lqNorm_le_sum_of_eq_zero hq (range γ) fun k hk => by + simp only [u, Finset.mem_range.not.1 hk, ↓reduceIte]).trans_eq ?_ + calc ∑ k ∈ range γ, u k = ∑ _k ∈ range γ, w * (C * ‖g‖ₑ) := + Finset.sum_congr rfl fun k hk => by simp only [u, Finset.mem_range.1 hk, ↓reduceIte] + _ = γ * (w * (C * ‖g‖ₑ)) := by rw [Finset.sum_const, Finset.card_range, nsmul_eq_mul] + have hv : lqNorm q v ≤ w * C * L := by + calc lqNorm q v ≤ lqNorm q (fun j => w * C * B.approxSeqDyadic s g j) := + ENNReal.lqNorm_shiftRight_le γ (fun j => w * C * B.approxSeqDyadic s g j) + _ = w * C * L := ENNReal.lqNorm_const_mul _ _ + have hgN : ‖g‖ₑ ≤ B.approxNormDyadic s q g := enorm_le_approxNormDyadic g + have hLN : L ≤ B.approxNormDyadic s q g := lqNorm_le_approxNormDyadic g + calc A.approxNormDyadic s q (Ex.E g) + = ‖Ex.E g‖ₑ + lqNorm q (A.approxSeqDyadic s (Ex.E g)) := rfl + _ ≤ C * ‖g‖ₑ + (lqNorm q u + lqNorm q v) := by + gcongr + · exact Ex.enorm_le g + · exact (ENNReal.lqNorm_mono hpt).trans (ENNReal.lqNorm_add_le hq u v) + _ ≤ C * ‖g‖ₑ + (γ * (w * (C * ‖g‖ₑ)) + w * C * L) := by gcongr + _ ≤ C * B.approxNormDyadic s q g + (γ * (w * (C * B.approxNormDyadic s q g)) + + w * C * B.approxNormDyadic s q g) := by gcongr + _ = extensionConst C γ s * B.approxNormDyadic s q g := by + simp only [extensionConst, w]; ring + +/-- The **restriction quasi-norm** `inf { ‖f‖_{A^s_q} : R f = g }` (dyadic form), an infimum +over all preimages; it is `∞` when `g` has no preimage. -/ +noncomputable def restrictionNorm (R : X →L[ℝ] Y) (A : ApproximationScheme X) (s : ℝ) + (q : ℝ≥0∞) (g : Y) : ℝ≥0∞ := + ⨅ (f : X) (_ : R f = g), A.approxNormDyadic s q f + +/-- **The intrinsic quasi-norm is at most the norm of every preimage**: for `R (A n) ⊆ B n`, +`‖g‖_{B^s_q} ≤ inf { ‖R‖ ‖f‖_{A^s_q} : R f = g }`. -/ +theorem approxNormDyadic_le_iInf_restrict {R : X →L[ℝ] Y} (hR : ∀ n, ∀ a ∈ A n, R a ∈ B n) + (g : Y) : + B.approxNormDyadic s q g ≤ ⨅ (f : X) (_ : R f = g), ‖R‖ₑ * A.approxNormDyadic s q f := + le_iInf₂ fun f hf => hf ▸ approxNormDyadic_map_le R hR f + +/-- **The restriction quasi-norm is at most the intrinsic one** when an approximation-preserving +extension exists: `inf { ‖f‖_{A^s_q} : R f = g } ≤ K ‖g‖_{B^s_q}`. -/ +theorem restrictionNorm_le_approxNormDyadic {R : X →L[ℝ] Y} (Ex : ApproxExtension R A B) + (hs : 0 ≤ s) (hq : 1 ≤ q) (g : Y) : + restrictionNorm R A s q g ≤ extensionConst Ex.C Ex.loss s * B.approxNormDyadic s q g := + (iInf₂_le (Ex.E g) (Ex.right_inv g)).trans (approxNormDyadic_extension_le Ex hs hq g) + +/-- **Intrinsic description of the restricted space**: with an approximation-preserving +extension, `g ∈ B^s_q` iff `g = R f` for some `f ∈ A^s_q`. -/ +theorem memApprox_iff_exists_restrict {R : X →L[ℝ] Y} (hR : ∀ n, ∀ a ∈ A n, R a ∈ B n) + (Ex : ApproxExtension R A B) (hs : 0 ≤ s) (hq : 1 ≤ q) {g : Y} : + B.MemApprox s q g ↔ ∃ f, R f = g ∧ A.MemApprox s q f := by + constructor + · intro hg + refine ⟨Ex.E g, Ex.right_inv g, (memApprox_iff_approxNormDyadic_lt_top hq hs).2 ?_⟩ + exact (approxNormDyadic_extension_le Ex hs hq g).trans_lt (ENNReal.mul_lt_top + (extensionConst_ne_top Ex.C_ne_top Ex.loss s).lt_top + ((memApprox_iff_approxNormDyadic_lt_top hq hs).1 hg)) + · rintro ⟨f, rfl, hf⟩ + exact hf.map R hR + +end ApproximationScheme diff --git a/LeanPool/FunctionSpaces/ApproximationSpaces/Scheme.lean b/LeanPool/FunctionSpaces/ApproximationSpaces/Scheme.lean new file mode 100644 index 0000000000..d3bfb918d2 --- /dev/null +++ b/LeanPool/FunctionSpaces/ApproximationSpaces/Scheme.lean @@ -0,0 +1,257 @@ +/- +Copyright (c) 2026 Mario Ullrich. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Mario Ullrich +-/ +module + +public import Mathlib.Analysis.Normed.Module.Basic +public import Mathlib.Algebra.Module.Submodule.Map +public import Mathlib.Algebra.Group.Pointwise.Set.Basic +public import Mathlib.Algebra.BigOperators.Group.Finset.Basic +public import Mathlib.Data.Nat.Log + +/- +Modified for Lean Pool: module names and imports adapted. +-/ + +/-! +# Approximation schemes + +An **approximation scheme** in the sense of Pietsch is a sequence `A 0 ⊆ A 1 ⊆ A 2 ⊆ ⋯` of +subsets of a real normed space `X` with + +* `A 0 = {0}`, +* `c • a ∈ A n` for every real `c` and every `a ∈ A n`, +* `A m + A n ⊆ A (m + n)`. + +The elements of `A n` are the "approximants of complexity `n`": polynomials of degree `< n`, +linear combinations of the first `n` elements of a basis, or linear combinations of at most +`n` elements of a dictionary. The last example is not a linear subspace, which is why a +scheme consists of sets and not of submodules. + +`A 0 = {0}` is part of the definition, as in Pietsch's paper. It makes the error of +approximation from `A 0` equal to the norm, and hence every approximation space embed into +`X`. Families indexed by a degree are fed in with a strict inequality ("degree `< n`"), so +that this condition holds without shifting indices. + +The file provides the structure, its elementary consequences (the sets are nonempty and +closed under negation, differences and finite sums), the dyadic inclusions used by all +telescoping arguments, and two constructions: the preimage `A.comap ι` of a scheme under an +injective linear map and the image `A.map T` under a linear map. +-/ + +@[expose] public section + +open scoped Pointwise + +/-- An **approximation scheme** in the sense of Pietsch: an increasing sequence of sets +`A 0 ⊆ A 1 ⊆ ⋯` in a real normed space, starting with `A 0 = {0}`, closed under real +multiples, and with `A m + A n ⊆ A (m + n)`. -/ +structure ApproximationScheme (X : Type*) [NormedAddCommGroup X] [NormedSpace ℝ X] where + /-- The set `A n` of approximants of complexity `n`. -/ + sets : ℕ → Set X + /-- The only approximant of complexity `0` is `0`. -/ + sets_zero : sets 0 = {0} + /-- The sets increase with the complexity. -/ + mono : Monotone sets + /-- Each set is closed under real multiples. -/ + smul_mem : ∀ (c : ℝ) {n : ℕ} {a : X}, a ∈ sets n → c • a ∈ sets n + /-- The sum of two approximants has at most the sum of their complexities. -/ + add_subset : ∀ m n, sets m + sets n ⊆ sets (m + n) + +namespace ApproximationScheme + +variable {X Y : Type*} [NormedAddCommGroup X] [NormedSpace ℝ X] + [NormedAddCommGroup Y] [NormedSpace ℝ Y] + +/-- A scheme is used as its sequence of sets `n ↦ A_n`. -/ +instance : CoeFun (ApproximationScheme X) (fun _ => ℕ → Set X) := ⟨ApproximationScheme.sets⟩ + +variable (A : ApproximationScheme X) + +/-- `A_0 = {0}`. -/ +theorem coe_zero : A 0 = {0} := A.sets_zero + +/-- Two schemes with the same sets are equal. -/ +@[ext] +theorem ext {A B : ApproximationScheme X} (h : ∀ n, A n = B n) : A = B := by + cases A; cases B; congr; funext n; exact h n + +/-- `0` is an approximant of every complexity. -/ +theorem zero_mem (n : ℕ) : (0 : X) ∈ A n := + A.mono (Nat.zero_le n) (by rw [A.coe_zero]; rfl) + +/-- The sets of a scheme are nonempty. This is the hypothesis under which +`Metric.infEDist` is finite, so the error of approximation is finite. -/ +theorem nonempty (n : ℕ) : (A n).Nonempty := ⟨0, A.zero_mem n⟩ + +variable {A} + +/-- The sets increase: `A_m ⊆ A_n` for `m ≤ n`. -/ +theorem mem_of_le {m n : ℕ} (h : m ≤ n) {a : X} (ha : a ∈ A m) : a ∈ A n := A.mono h ha + +/-- `a + b ∈ A_{m+n}` for `a ∈ A_m` and `b ∈ A_n`. -/ +theorem add_mem {m n : ℕ} {a b : X} (ha : a ∈ A m) (hb : b ∈ A n) : a + b ∈ A (m + n) := + A.add_subset m n (Set.add_mem_add ha hb) + +/-- `-a ∈ A_n` for `a ∈ A_n`. -/ +theorem neg_mem {n : ℕ} {a : X} (ha : a ∈ A n) : -a ∈ A n := by + simpa using A.smul_mem (-1) ha + +/-- `a - b ∈ A_{m+n}` for `a ∈ A_m` and `b ∈ A_n`. -/ +theorem sub_mem {m n : ℕ} {a b : X} (ha : a ∈ A m) (hb : b ∈ A n) : a - b ∈ A (m + n) := by + simpa [sub_eq_add_neg] using add_mem ha (neg_mem hb) + +/-- Two approximants of complexity `2 ^ k` add up to one of complexity `2 ^ (k + 1)`. -/ +theorem add_mem_pow_succ {k : ℕ} {a b : X} (ha : a ∈ A (2 ^ k)) (hb : b ∈ A (2 ^ k)) : + a + b ∈ A (2 ^ (k + 1)) := by + have := add_mem ha hb + rwa [← two_mul, ← pow_succ'] at this + +/-- `a - b ∈ A_{2^(k+1)}` for `a, b ∈ A_{2^k}`. -/ +theorem sub_mem_pow_succ {k : ℕ} {a b : X} (ha : a ∈ A (2 ^ k)) (hb : b ∈ A (2 ^ k)) : + a - b ∈ A (2 ^ (k + 1)) := by + have := sub_mem ha hb + rwa [← two_mul, ← pow_succ'] at this + +/-- The difference of consecutive dyadic approximants, `a ∈ A (2 ^ (k + 1))` and +`b ∈ A (2 ^ k)`, lies in `A (2 ^ (k + 2))`. This is the inclusion that every telescoping +argument uses. -/ +theorem sub_mem_pow_add_two {k : ℕ} {a b : X} (ha : a ∈ A (2 ^ (k + 1))) (hb : b ∈ A (2 ^ k)) : + a - b ∈ A (2 ^ (k + 2)) := + mem_of_le (by rw [pow_succ 2 (k + 1), pow_succ 2 k]; omega) (sub_mem ha hb) + +/-- A finite sum of approximants has at most the sum of the complexities. -/ +theorem sum_mem {ι : Type*} (s : Finset ι) {f : ι → X} {n : ι → ℕ} + (h : ∀ i ∈ s, f i ∈ A (n i)) : ∑ i ∈ s, f i ∈ A (∑ i ∈ s, n i) := by + classical + induction s using Finset.induction_on with + | empty => simpa using A.zero_mem 0 + | insert i s hi ih => + rw [Finset.sum_insert hi, Finset.sum_insert hi] + exact add_mem (h i (Finset.mem_insert_self i s)) + (ih fun j hj => h j (Finset.mem_insert_of_mem hj)) + +/-- Multiplying by a nonzero scalar maps `A n` onto itself. -/ +theorem smul_set_eq {c : ℝ} (hc : c ≠ 0) (n : ℕ) : c • A n = A n := by + apply le_antisymm + · rintro _ ⟨a, ha, rfl⟩ + exact A.smul_mem c ha + · intro a ha + refine ⟨c⁻¹ • a, A.smul_mem _ ha, ?_⟩ + simp [smul_smul, hc] + +variable (A) + +/-- The union of all the sets of a scheme, as a real subspace. It is closed under addition +because `A m + A n ⊆ A (m + n)`. -/ +def iUnionSubmodule : Submodule ℝ X where + carrier := ⋃ n, A n + zero_mem' := Set.mem_iUnion.2 ⟨0, A.zero_mem 0⟩ + add_mem' := by + rintro a b ⟨_, ⟨m, rfl⟩, ha⟩ ⟨_, ⟨n, rfl⟩, hb⟩ + exact Set.mem_iUnion.2 ⟨m + n, add_mem ha hb⟩ + smul_mem' := by + rintro c a ⟨_, ⟨n, rfl⟩, ha⟩ + exact Set.mem_iUnion.2 ⟨n, A.smul_mem c ha⟩ + +/-- The submodule `iUnionSubmodule` has the carrier `⋃ n, A_n`. -/ +@[simp] +theorem coe_iUnionSubmodule : (A.iUnionSubmodule : Set X) = ⋃ n, A n := rfl + +/-- The **preimage of a scheme** under an injective linear map `ι : Y → X`: the sets +`ι ⁻¹' A n`. Injectivity is what makes `ι ⁻¹' {0} = {0}`. This is the scheme on a smaller +space `Y` (for instance `L_r ⊆ L_p`) induced by a scheme on `X`. -/ +def comap (ι : Y →ₗ[ℝ] X) (hι : Function.Injective ι) : ApproximationScheme Y where + sets n := ι ⁻¹' A n + sets_zero := by + ext y + simp only [Set.mem_preimage, A.coe_zero, Set.mem_singleton_iff] + constructor + · intro h; exact hι (by rw [h, map_zero]) + · rintro rfl; exact map_zero ι + mono _ _ h _ hy := A.mono h hy + smul_mem c _ _ hy := by + simp only [Set.mem_preimage, map_smul] at hy ⊢ + exact A.smul_mem c hy + add_subset m n := by + rintro _ ⟨a, ha, b, hb, rfl⟩ + simp only [Set.mem_preimage, map_add] at ha hb ⊢ + exact add_mem ha hb + +/-- Membership in the preimage scheme: `y ∈ ι⁻¹(A_n)` iff `ι y ∈ A_n`. -/ +@[simp] +theorem mem_comap {ι : Y →ₗ[ℝ] X} {hι : Function.Injective ι} {n : ℕ} {y : Y} : + y ∈ A.comap ι hι n ↔ ι y ∈ A n := Iff.rfl + +/-- The **image of a scheme** under a linear map `T : X → Y`: the sets `T '' A n`. -/ +def map (T : X →ₗ[ℝ] Y) : ApproximationScheme Y where + sets n := T '' A n + sets_zero := by simp [A.coe_zero] + mono _ _ h := Set.image_mono (A.mono h) + smul_mem c _ _ := by + rintro ⟨a, ha, rfl⟩ + exact ⟨c • a, A.smul_mem c ha, map_smul T c a⟩ + add_subset m n := by + rintro _ ⟨_, ⟨a, ha, rfl⟩, _, ⟨b, hb, rfl⟩, rfl⟩ + exact ⟨a + b, add_mem ha hb, map_add T a b⟩ + +/-- Membership in the image scheme: `y ∈ T(A_n)` iff `y = T a` for some `a ∈ A_n`. -/ +@[simp] +theorem mem_map {T : X →ₗ[ℝ] Y} {n : ℕ} {y : Y} : y ∈ A.map T n ↔ ∃ a ∈ A n, T a = y := + Iff.rfl + +/-- `T a ∈ T(A_n)` for `a ∈ A_n`. -/ +theorem mem_map_of_mem (T : X →ₗ[ℝ] Y) {n : ℕ} {a : X} (ha : a ∈ A n) : T a ∈ A.map T n := + ⟨a, ha, rfl⟩ + +/-- A scheme made of an increasing sequence of **linear subspaces** starting with `{0}`. The +third axiom holds automatically, since `A m` and `A n` both lie in `A (m + n)`. -/ +def ofSubmodules (A : ℕ → Submodule ℝ X) (h0 : A 0 = ⊥) (hA : Monotone A) : + ApproximationScheme X where + sets n := A n + sets_zero := by rw [h0, Submodule.bot_coe] + mono _ _ h := hA h + smul_mem c _ _ ha := (A _).smul_mem c ha + add_subset m n := by + rintro _ ⟨a, ha, b, hb, rfl⟩ + exact (A (m + n)).add_mem (hA (Nat.le_add_right m n) ha) (hA (Nat.le_add_left n m) hb) + +/-- Membership in the scheme of an increasing sequence of subspaces. -/ +@[simp] +theorem mem_ofSubmodules {A : ℕ → Submodule ℝ X} {h0 : A 0 = ⊥} {hA : Monotone A} {n : ℕ} + {x : X} : x ∈ ofSubmodules A h0 hA n ↔ x ∈ A n := Iff.rfl + +/-- The **dyadic scheme of an increasing sequence of subspaces** `V_0 ⊆ V_1 ⊆ ⋯`: `{0}` at +complexity `0` and `V_k`, `k = ⌊log₂ n⌋`, at complexity `n ≥ 1`, so that the level `V_k` is the +set of approximants of complexity `2^k`. Piecewise polynomials and splines on dyadic partitions +are schemes of this form. -/ +def ofMonotoneSubmodules (V : ℕ → Submodule ℝ X) (hV : Monotone V) : ApproximationScheme X := + ofSubmodules (fun n => if n = 0 then ⊥ else V (Nat.log 2 n)) (by simp) (by + intro a b hab + by_cases ha : a = 0 + · simp only [ha, ↓reduceIte] + exact bot_le + · have hb : b ≠ 0 := by omega + simp only [ha, hb, ↓reduceIte] + exact hV (Nat.log_mono_right hab)) + +/-- The dyadic scheme of a sequence of subspaces is `{0}` at complexity `0`. -/ +theorem mem_ofMonotoneSubmodules_zero {V : ℕ → Submodule ℝ X} {hV : Monotone V} {x : X} : + x ∈ ofMonotoneSubmodules V hV 0 ↔ x = 0 := by + rw [ofMonotoneSubmodules, mem_ofSubmodules] + simp + +/-- The dyadic scheme of a sequence of subspaces is `V_⌊log₂ n⌋` at complexity `n ≥ 1`. -/ +theorem mem_ofMonotoneSubmodules {V : ℕ → Submodule ℝ X} {hV : Monotone V} {n : ℕ} + (hn : n ≠ 0) {x : X} : x ∈ ofMonotoneSubmodules V hV n ↔ x ∈ V (Nat.log 2 n) := by + rw [ofMonotoneSubmodules, mem_ofSubmodules] + simp only [hn, ↓reduceIte] + +/-- The dyadic scheme of a sequence of subspaces is `V_k` at complexity `2^k`. -/ +theorem mem_ofMonotoneSubmodules_two_pow {V : ℕ → Submodule ℝ X} {hV : Monotone V} {k : ℕ} + {x : X} : x ∈ ofMonotoneSubmodules V hV (2 ^ k) ↔ x ∈ V k := by + rw [mem_ofMonotoneSubmodules (pow_ne_zero k two_ne_zero), Nat.log_pow Nat.one_lt_two] + +end ApproximationScheme diff --git a/LeanPool/FunctionSpaces/ApproximationSpaces/Sequences/Dyadic.lean b/LeanPool/FunctionSpaces/ApproximationSpaces/Sequences/Dyadic.lean new file mode 100644 index 0000000000..b17d080dbe --- /dev/null +++ b/LeanPool/FunctionSpaces/ApproximationSpaces/Sequences/Dyadic.lean @@ -0,0 +1,665 @@ +/- +Copyright (c) 2026 Mario Ullrich. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Mario Ullrich +-/ +module + +public import LeanPool.FunctionSpaces.ApproximationSpaces.Sequences.Lq +public import Mathlib.Algebra.BigOperators.Intervals +public import Mathlib.Algebra.Order.Ring.GeomSum +public import Mathlib.Analysis.PSeries +public import Mathlib.Data.Nat.Log + +/- +Modified for Lean Pool: module names and imports adapted. +-/ + +/-! +# Cauchy condensation with power weights and dyadic sums + +For a **decreasing** sequence `b : ℕ → ℝ≥0∞` and a real exponent `γ`, the weighted series +`∑ₙ (n + 1) ^ γ b n` and its dyadic version `∑ₖ 2 ^ (k (γ + 1)) b (2 ^ k)` are comparable: + +* `tsum_pow_mul_le_dyadic`: + `∑ₙ (n+1)^γ b n ≤ b 0 + 2^(max γ 0) ∑ₖ 2^(k(γ+1)) b (2^k)`; +* `dyadic_le_tsum_pow_mul`: + `∑ₖ 2^(k(γ+1)) b (2^(k+1)) ≤ 2^(max (-γ) 0) ∑ₙ (n+1)^γ b n`; + +and the analogous statements for suprema, `iSup_pow_mul_le_dyadic` and +`dyadic_le_iSup_pow_mul`; for the sequence capped at `b (2^m)`, +`∑ₖ min(b k, b (2^m)) ≤ 2 ∑_{l ≥ 0} 2^(m+l) b (2^(m+l))` (`tsum_min_le_dyadic`); and +`∑ₖ 2^k b (2^k) ≤ 2 ∑ₙ b n` (`tsum_two_pow_mul_le_two_mul`). The proof +splits `ℕ \ {0}` into the dyadic blocks `[2^k, 2^(k+1))`, which have `2^k` elements, on which +`b` is at most `b (2^k)` and at least `b (2^(k+1))`, and on which `(n+1)^γ` is within a factor +`2^|γ|` of `2^(kγ)`. Every `n ≥ 1` is `2^k + i` for exactly one pair with `0 ≤ i < 2^k` +(`Nat.exists_eq_two_pow_add`, `Nat.two_pow_add_eq_iff`), so a series over `ℕ` is its first term +plus the sums over these blocks (`tsum_eq_add_tsum_two_pow_add`, with the finite form +`sum_range_two_pow_eq`). + +For `γ = 0` this is Cauchy's condensation test (Mathlib: `ENNReal.le_tsum_condensed`, +`ENNReal.tsum_condensed_le`). The weight `(n + 1) ^ γ` is in general increasing, so the +weighted sequence is not decreasing and Mathlib's version does not apply to it directly. +These estimates are what makes Pietsch's quasi-norm `‖(n^(s - 1/q) E_{n-1})ₙ‖_q` equivalent to +the dyadic one `‖(2^(ks) E_{2^k})ₖ‖_q`. + +Three sums over dyadic scales follow: + +* **the dyadic sum** `∑_{j ∈ ℕ} min(2^j a, (2^j a)⁻¹) ≤ 4` for `a ∈ [0, ∞]` + (`tsum_min_two_pow_le`), the sum behind the Hörmander condition for dyadic dilations, with + `min(x, x⁻¹)² ≤ min(x, x⁻¹)` for its squares (`min_inv_sq_le`); +* **finitely many changed terms**: `∑_j u_j ≤ ∑_j v_j + ∑_{i < N} u_i` when `u_j = v_j` for + `j ≥ N` (`tsum_le_tsum_add_sum_of_forall_ge_eq`); +* **dyadic scales of an annulus**: a sequence bounded by `M` whose nonzero terms have `t / 2^j` + in `[a, 2^N a]`, `a > 0`, sums to at most `(N + 1) M` (`tsum_le_of_dyadic_annulus`). + +The last section proves the **interpolation inequality for dyadic suprema** (Brezis–Mironescu; +Johnsen–Sickel, Lemma 2): for `σ₁ < σ₀` and `0 < θ < 1`, +`∑_j 2^(j(θσ₀ + (1-θ)σ₁)) a_j ≤ c (sup_j 2^(jσ₀) a_j)^θ (sup_j 2^(jσ₁) a_j)^(1-θ)` +(`tsum_dyadicWeight_mul_le_iSup`, constant `dyadicInterpConst`). The series is split at the +index where the two bounds `2^(jθδ) sup_j 2^(jσ₁) a_j` and `2^(-j(1-θ)δ) sup_j 2^(jσ₀) a_j` of +its terms cross, `δ = σ₀ - σ₁`, and each part is a geometric series. +-/ + +@[expose] public section + +open Finset Filter +open scoped ENNReal + +namespace ENNReal + +/-- For a nonpositive exponent, `x ↦ x ^ z` is decreasing on `ℝ≥0∞`. -/ +theorem rpow_le_rpow_of_nonpos {x y : ℝ≥0∞} {z : ℝ} (hxy : x ≤ y) (hz : z ≤ 0) : + y ^ z ≤ x ^ z := by + have hy : y ^ z = (y ^ (-z))⁻¹ := by rw [← ENNReal.rpow_neg, neg_neg] + have hx : x ^ z = (x ^ (-z))⁻¹ := by rw [← ENNReal.rpow_neg, neg_neg] + rw [hy, hx] + exact ENNReal.inv_le_inv.2 (ENNReal.rpow_le_rpow hxy (neg_nonneg.2 hz)) + +/-- The initial segment `[0, 2^K)` of `ℕ` is `{0}` together with the dyadic blocks +`[2^k, 2^(k+1))`, `k < K`. -/ +theorem sum_range_two_pow_eq {M : Type*} [AddCommMonoid M] (g : ℕ → M) (K : ℕ) : + ∑ n ∈ range (2 ^ K), g n = g 0 + ∑ k ∈ range K, ∑ n ∈ Ico (2 ^ k) (2 ^ (k + 1)), g n := by + induction K with + | zero => simp + | succ K ih => + rw [← Finset.sum_range_add_sum_Ico g (Nat.pow_le_pow_right two_pos (Nat.le_succ K)), ih, + Finset.sum_range_succ, add_assoc] + +/-- For `0 ≤ i < 2^k`, `⌊log₂ (2^k + i)⌋ = k`, since `2^k ≤ 2^k + i < 2^(k+1)`. -/ +theorem _root_.Nat.log_two_pow_add {k i : ℕ} (hi : i < 2 ^ k) : Nat.log 2 (2 ^ k + i) = k := + Nat.log_eq_of_pow_le_of_lt_pow (Nat.le_add_right _ _) (by rw [pow_succ, mul_two]; omega) + +/-- Every `n ≥ 1` is `2^k + i` with `0 ≤ i < 2^k`, namely for `k = ⌊log₂ n⌋`. -/ +theorem _root_.Nat.exists_eq_two_pow_add {n : ℕ} (hn : n ≠ 0) : + ∃ k i, i < 2 ^ k ∧ 2 ^ k + i = n := by + have h1 := Nat.pow_log_le_self 2 hn + have h2 := Nat.lt_pow_succ_log_self _root_.one_lt_two n + rw [pow_succ, mul_two] at h2 + exact ⟨Nat.log 2 n, n - 2 ^ Nat.log 2 n, by omega, by omega⟩ + +/-- `2^k + i = 2^l + j` with `i < 2^k` and `j < 2^l` iff `k = l` and `i = j`: the level is +`⌊log₂ (2^k + i)⌋` (`Nat.log_two_pow_add`). -/ +theorem _root_.Nat.two_pow_add_eq_iff {k l i j : ℕ} (hi : i < 2 ^ k) (hj : j < 2 ^ l) : + 2 ^ k + i = 2 ^ l + j ↔ k = l ∧ i = j := by + constructor + · intro h + have hkl : k = l := by rw [← Nat.log_two_pow_add hi, h, Nat.log_two_pow_add hj] + subst hkl + exact ⟨rfl, by omega⟩ + · rintro ⟨rfl, rfl⟩ + rfl + +/-- **Splitting `ℕ` into dyadic blocks**: `∑_n g(n) = g(0) + ∑_k ∑_{i<2^k} g(2^k + i)` for every +family `g` in `[0, ∞]`, since `(k, i) ↦ 2^k + i` maps the pairs with `i < 2^k` bijectively onto +the positive integers. The series form of `ENNReal.sum_range_two_pow_eq`. -/ +theorem tsum_eq_add_tsum_two_pow_add (g : ℕ → ℝ≥0∞) : + ∑' n, g n = g 0 + ∑' k, ∑ i : Fin (2 ^ k), g (2 ^ k + i) := by + have hinj : Function.Injective fun s : (Σ k, Fin (2 ^ k)) => 2 ^ s.1 + (s.2 : ℕ) := by + rintro ⟨k, i⟩ ⟨l, j⟩ h + obtain ⟨rfl, h2⟩ := (Nat.two_pow_add_eq_iff i.isLt j.isLt).1 h + rw [Fin.ext h2] + rw [tsum_eq_add_tsum_ite 0, ← hinj.tsum_eq ?hs, tsum_sigma'] + · congr 1 + refine tsum_congr fun k => ?_ + rw [tsum_fintype] + exact Finset.sum_congr rfl fun i _ => ite_eq_right (by positivity) + · intro n hn + have hn0 : n ≠ 0 := by + rintro rfl + exact hn (ite_eq_left rfl) + obtain ⟨k, i, hi, rfl⟩ := Nat.exists_eq_two_pow_add hn0 + exact ⟨⟨k, ⟨i, hi⟩⟩, rfl⟩ + +/-- `2^k = 2^(k · 1)`, the dyadic weight of exponent `1`. -/ +theorem natCast_two_pow_eq (k : ℕ) : ((2 ^ k : ℕ) : ℝ≥0∞) = dyadicWeight 1 k := by + rw [← natCast_two_pow_rpow, ENNReal.rpow_one] + +/-- A dyadic block `[2^k, 2^(k+1))` has `2^k` elements. -/ +theorem card_Ico_two_pow (k : ℕ) : (Ico (2 ^ k) (2 ^ (k + 1))).card = 2 ^ k := by + rw [Nat.card_Ico, pow_succ]; omega + +/-- On the dyadic block `[2^k, 2^(k+1))`, `(n + 1)^γ ≤ 2^(max γ 0) 2^(kγ)`. -/ +theorem natCast_succ_rpow_le {k n : ℕ} (hn : n ∈ Ico (2 ^ k) (2 ^ (k + 1))) (γ : ℝ) : + ((n + 1 : ℕ) : ℝ≥0∞) ^ γ ≤ 2 ^ max γ 0 * dyadicWeight γ k := by + rw [Finset.mem_Ico] at hn + rcases le_or_gt 0 γ with hγ | hγ + · rw [max_eq_left hγ] + calc ((n + 1 : ℕ) : ℝ≥0∞) ^ γ ≤ ((2 ^ (k + 1) : ℕ) : ℝ≥0∞) ^ γ := by + gcongr; exact_mod_cast hn.2 + _ = 2 ^ γ * dyadicWeight γ k := by rw [natCast_two_pow_rpow, dyadicWeight_succ] + · rw [max_eq_right hγ.le, ENNReal.rpow_zero, one_mul, ← natCast_two_pow_rpow] + exact rpow_le_rpow_of_nonpos (by exact_mod_cast hn.1.trans (Nat.le_succ n)) hγ.le + +/-- On the dyadic block `[2^k, 2^(k+1))`, `2^(kγ) ≤ 2^(max (-γ) 0) (n + 1)^γ`. -/ +theorem dyadicWeight_le_natCast_succ_rpow {k n : ℕ} (hn : n ∈ Ico (2 ^ k) (2 ^ (k + 1))) + (γ : ℝ) : dyadicWeight γ k ≤ 2 ^ max (-γ) 0 * ((n + 1 : ℕ) : ℝ≥0∞) ^ γ := by + rw [Finset.mem_Ico] at hn + rcases le_or_gt 0 γ with hγ | hγ + · rw [max_eq_right (neg_nonpos.2 hγ), ENNReal.rpow_zero, one_mul, ← natCast_two_pow_rpow] + gcongr; exact_mod_cast hn.1.trans (Nat.le_succ n) + · rw [max_eq_left (neg_nonneg.2 hγ.le)] + have h1 : ((2 ^ (k + 1) : ℕ) : ℝ≥0∞) ^ γ ≤ ((n + 1 : ℕ) : ℝ≥0∞) ^ γ := + rpow_le_rpow_of_nonpos (by exact_mod_cast hn.2) hγ.le + rw [natCast_two_pow_rpow, dyadicWeight_succ] at h1 + calc dyadicWeight γ k = 2 ^ (-γ) * (2 ^ γ * dyadicWeight γ k) := by + rw [← mul_assoc, ← ENNReal.rpow_add _ _ two_ne_zero ENNReal.ofNat_ne_top, + neg_add_cancel, ENNReal.rpow_zero, one_mul] + _ ≤ _ := by gcongr + +variable {b : ℕ → ℝ≥0∞} + +/-- The weighted sum over a dyadic block is at most `2^(max γ 0) 2^(k(γ+1)) b (2^k)`. -/ +theorem sum_Ico_pow_mul_le (hb : Antitone b) (γ : ℝ) (k : ℕ) : + ∑ n ∈ Ico (2 ^ k) (2 ^ (k + 1)), ((n + 1 : ℕ) : ℝ≥0∞) ^ γ * b n ≤ + 2 ^ max γ 0 * dyadicWeight (γ + 1) k * b (2 ^ k) := by + calc ∑ n ∈ Ico (2 ^ k) (2 ^ (k + 1)), ((n + 1 : ℕ) : ℝ≥0∞) ^ γ * b n + ≤ ∑ _n ∈ Ico (2 ^ k) (2 ^ (k + 1)), 2 ^ max γ 0 * dyadicWeight γ k * b (2 ^ k) := by + gcongr with n hn + · exact natCast_succ_rpow_le hn γ + · exact hb (Finset.mem_Ico.1 hn).1 + _ = 2 ^ max γ 0 * dyadicWeight (γ + 1) k * b (2 ^ k) := by + rw [Finset.sum_const, card_Ico_two_pow, nsmul_eq_mul, dyadicWeight_add, + natCast_two_pow_eq] + ring + +/-- The weighted sum over a dyadic block is at least `2^(-max (-γ) 0) 2^(k(γ+1)) b (2^(k+1))`. -/ +theorem le_sum_Ico_pow_mul (hb : Antitone b) (γ : ℝ) (k : ℕ) : + dyadicWeight (γ + 1) k * b (2 ^ (k + 1)) ≤ + 2 ^ max (-γ) 0 * ∑ n ∈ Ico (2 ^ k) (2 ^ (k + 1)), ((n + 1 : ℕ) : ℝ≥0∞) ^ γ * b n := by + calc dyadicWeight (γ + 1) k * b (2 ^ (k + 1)) + = ∑ _n ∈ Ico (2 ^ k) (2 ^ (k + 1)), dyadicWeight γ k * b (2 ^ (k + 1)) := by + rw [Finset.sum_const, card_Ico_two_pow, nsmul_eq_mul, dyadicWeight_add, + natCast_two_pow_eq] + ring + _ ≤ ∑ n ∈ Ico (2 ^ k) (2 ^ (k + 1)), 2 ^ max (-γ) 0 * (((n + 1 : ℕ) : ℝ≥0∞) ^ γ * b n) := by + refine Finset.sum_le_sum fun n hn => ?_ + rw [← mul_assoc] + exact mul_le_mul' (dyadicWeight_le_natCast_succ_rpow hn γ) + (hb (Finset.mem_Ico.1 hn).2.le) + _ = _ := by rw [Finset.mul_sum] + +/-- **Weighted condensation, upper bound**: +`∑ₙ (n+1)^γ b n ≤ b 0 + 2^(max γ 0) ∑ₖ 2^(k(γ+1)) b (2^k)` for decreasing `b`. -/ +theorem tsum_pow_mul_le_dyadic (hb : Antitone b) (γ : ℝ) : + ∑' n, ((n + 1 : ℕ) : ℝ≥0∞) ^ γ * b n ≤ + b 0 + 2 ^ max γ 0 * ∑' k, dyadicWeight (γ + 1) k * b (2 ^ k) := by + rw [ENNReal.tsum_eq_iSup_nat' (tendsto_pow_atTop_atTop_of_one_lt Nat.one_lt_two)] + refine iSup_le fun K => ?_ + rw [sum_range_two_pow_eq] + simp only [Nat.cast_one, Nat.zero_add, ENNReal.one_rpow, one_mul] + gcongr + calc ∑ k ∈ range K, ∑ n ∈ Ico (2 ^ k) (2 ^ (k + 1)), ((n + 1 : ℕ) : ℝ≥0∞) ^ γ * b n + ≤ ∑ k ∈ range K, 2 ^ max γ 0 * (dyadicWeight (γ + 1) k * b (2 ^ k)) := by + gcongr with k + rw [← mul_assoc]; exact sum_Ico_pow_mul_le hb γ k + _ ≤ ∑' k, 2 ^ max γ 0 * (dyadicWeight (γ + 1) k * b (2 ^ k)) := sum_le_tsum _ + _ = _ := ENNReal.tsum_mul_left + +/-- **Weighted condensation, lower bound**: +`∑ₖ 2^(k(γ+1)) b (2^(k+1)) ≤ 2^(max (-γ) 0) ∑ₙ (n+1)^γ b n` for decreasing `b`. -/ +theorem dyadic_le_tsum_pow_mul (hb : Antitone b) (γ : ℝ) : + ∑' k, dyadicWeight (γ + 1) k * b (2 ^ (k + 1)) ≤ + 2 ^ max (-γ) 0 * ∑' n, ((n + 1 : ℕ) : ℝ≥0∞) ^ γ * b n := by + rw [ENNReal.tsum_eq_iSup_nat] + refine iSup_le fun K => ?_ + calc ∑ k ∈ range K, dyadicWeight (γ + 1) k * b (2 ^ (k + 1)) + ≤ ∑ k ∈ range K, 2 ^ max (-γ) 0 * + ∑ n ∈ Ico (2 ^ k) (2 ^ (k + 1)), ((n + 1 : ℕ) : ℝ≥0∞) ^ γ * b n := by + exact Finset.sum_le_sum fun k _ => le_sum_Ico_pow_mul hb γ k + _ = 2 ^ max (-γ) 0 * ∑ k ∈ range K, + ∑ n ∈ Ico (2 ^ k) (2 ^ (k + 1)), ((n + 1 : ℕ) : ℝ≥0∞) ^ γ * b n := by + rw [Finset.mul_sum] + _ ≤ 2 ^ max (-γ) 0 * ∑ n ∈ range (2 ^ K), ((n + 1 : ℕ) : ℝ≥0∞) ^ γ * b n := by + rw [sum_range_two_pow_eq]; gcongr; exact le_add_self + _ ≤ _ := by gcongr; exact sum_le_tsum _ + +/-- **Condensation for suprema**, upper bound: for decreasing `b` and `s ≥ 0`, +`supₙ (n+1)^s b n ≤ b 0 + 2^s supₖ 2^(ks) b (2^k)`. -/ +theorem iSup_pow_mul_le_dyadic (hb : Antitone b) {s : ℝ} (hs : 0 ≤ s) : + ⨆ n, ((n + 1 : ℕ) : ℝ≥0∞) ^ s * b n ≤ b 0 + 2 ^ s * ⨆ k, dyadicWeight s k * b (2 ^ k) := by + refine iSup_le fun n => ?_ + rcases Nat.eq_zero_or_pos n with rfl | hn + · simp + set k := Nat.log 2 n + have hmem : n ∈ Ico (2 ^ k) (2 ^ (k + 1)) := + Finset.mem_Ico.2 ⟨Nat.pow_log_le_self 2 hn.ne', Nat.lt_pow_succ_log_self Nat.one_lt_two n⟩ + calc ((n + 1 : ℕ) : ℝ≥0∞) ^ s * b n ≤ 2 ^ s * dyadicWeight s k * b (2 ^ k) := by + gcongr + · simpa [max_eq_left hs] using natCast_succ_rpow_le hmem s + · exact hb (Finset.mem_Ico.1 hmem).1 + _ ≤ 2 ^ s * ⨆ k, dyadicWeight s k * b (2 ^ k) := by + rw [mul_assoc]; gcongr; exact le_iSup (fun k => dyadicWeight s k * b (2 ^ k)) k + _ ≤ _ := le_add_self + +/-- **Condensation for suprema**, lower bound: for `s ≥ 0`, +`supₖ 2^(ks) b (2^k) ≤ supₙ (n+1)^s b n`. -/ +theorem dyadic_le_iSup_pow_mul {s : ℝ} (hs : 0 ≤ s) : + ⨆ k, dyadicWeight s k * b (2 ^ k) ≤ ⨆ n, ((n + 1 : ℕ) : ℝ≥0∞) ^ s * b n := by + refine iSup_le fun k => ?_ + calc dyadicWeight s k * b (2 ^ k) ≤ ((2 ^ k + 1 : ℕ) : ℝ≥0∞) ^ s * b (2 ^ k) := by + rw [← natCast_two_pow_rpow]; gcongr; exact_mod_cast Nat.le_succ _ + _ ≤ _ := le_iSup (fun n => ((n + 1 : ℕ) : ℝ≥0∞) ^ s * b n) (2 ^ k) + +/-- `1 + ∑_{j < m} 2^j = 2^m` in `[0, ∞]`, Mathlib's geometric sum `geom_sum_mul_add` for +`x = 1`. -/ +theorem one_add_sum_range_two_pow (m : ℕ) : + 1 + ∑ j ∈ range m, (2 : ℝ≥0∞) ^ j = 2 ^ m := by + have h := geom_sum_mul_add (1 : ℝ≥0∞) m + rw [one_add_one_eq_two, mul_one] at h + rw [add_comm, h] + +/-- **Condensation of a capped decreasing sequence**: for decreasing `b` and every `m`, +`∑_k min(b_k, b_{2^m}) ≤ 2 ∑_{l ≥ 0} 2^(m+l) b_{2^(m+l)}`. Cauchy condensation +(`ENNReal.tsum_pow_mul_le_dyadic` with `γ = 0`) applies to the decreasing sequence +`min(b_k, b_{2^m})`; its first `m + 1` dyadic terms are at most `b_{2^m}` with total weight +`1 + ∑_{j < m} 2^j = 2^m`, and the others are at most `2^(m+l) b_{2^(m+l)}`. This bounds the +tail `∑_{k ≥ 2^m} b_k` together with `2^m b_{2^m}`. -/ +theorem tsum_min_le_dyadic (hb : Antitone b) (m : ℕ) : + ∑' k, min (b k) (b (2 ^ m)) ≤ 2 * ∑' l, 2 ^ (m + l) * b (2 ^ (m + l)) := by + set T := ∑' l, (2 : ℝ≥0∞) ^ (m + l) * b (2 ^ (m + l)) + have hd : Antitone fun k => min (b k) (b (2 ^ m)) := fun i j hij => min_le_min (hb hij) le_rfl + have hcond := tsum_pow_mul_le_dyadic hd 0 + simp only [ENNReal.rpow_zero, one_mul, max_self, zero_add, dyadicWeight_eq_pow, + ENNReal.rpow_one] at hcond + rw [← CompleteLattice.summable.sum_add_tsum_nat_add' (k := m) + (f := fun k => (2 : ℝ≥0∞) ^ k * min (b (2 ^ k)) (b (2 ^ m))), ← add_assoc] at hcond + have hhead : min (b 0) (b (2 ^ m)) + + ∑ k ∈ range m, 2 ^ k * min (b (2 ^ k)) (b (2 ^ m)) ≤ 2 ^ m * b (2 ^ m) := by + calc min (b 0) (b (2 ^ m)) + ∑ k ∈ range m, 2 ^ k * min (b (2 ^ k)) (b (2 ^ m)) + ≤ b (2 ^ m) + ∑ k ∈ range m, 2 ^ k * b (2 ^ m) := by + gcongr + · exact min_le_right _ _ + · exact min_le_right _ _ + _ = (1 + ∑ k ∈ range m, (2 : ℝ≥0∞) ^ k) * b (2 ^ m) := by rw [add_mul, one_mul, sum_mul] + _ = 2 ^ m * b (2 ^ m) := by rw [one_add_sum_range_two_pow] + have hT : 2 ^ m * b (2 ^ m) ≤ T := by + simpa using le_tsum (f := fun l => (2 : ℝ≥0∞) ^ (m + l) * b (2 ^ (m + l))) 0 + have htail : ∑' k, 2 ^ (k + m) * min (b (2 ^ (k + m))) (b (2 ^ m)) ≤ T := + tsum_le_tsum fun l => by rw [add_comm l m]; gcongr; exact min_le_left _ _ + calc ∑' k, min (b k) (b (2 ^ m)) ≤ _ := hcond + _ ≤ T + T := add_le_add (hhead.trans hT) htail + _ = 2 * T := (two_mul T).symm + +/-- **Condensation with constant `2`**: `∑_k 2^k b_{2^k} ≤ 2 ∑_n b_n` for decreasing `b`. The +term `k = 0` is `b_1`; the block `(2^k, 2^(k+1)]` has `2^k` indices with terms at least +`b_{2^(k+1)}`, and these blocks cover the indices `n ≥ 2`, so +`∑_k 2^k b_{2^(k+1)} ≤ ∑_{n ≥ 2} b_n` (Mathlib's `Finset.sum_condensed_le'`). Mathlib's +`ENNReal.tsum_condensed_le` gives the bound `b_1 + 2 ∑_n b_n`. -/ +theorem tsum_two_pow_mul_le_two_mul (hb : Antitone b) : + ∑' k, 2 ^ k * b (2 ^ k) ≤ 2 * ∑' n, b n := by + rw [ENNReal.tsum_eq_iSup_nat' (tendsto_add_atTop_nat 1)] + refine iSup_le fun K => ?_ + have hc := Finset.sum_condensed_le' (f := b) (fun _ _ _ h => hb h) K + have hK : 1 < 2 ^ K + 1 := Nat.lt_add_of_pos_left (Nat.two_pow_pos K) + calc ∑ k ∈ range (K + 1), (2 : ℝ≥0∞) ^ k * b (2 ^ k) + = b 1 + 2 * ∑ k ∈ range K, 2 ^ k • b (2 ^ (k + 1)) := by + rw [sum_range_succ', mul_sum, add_comm] + simp [pow_succ', mul_assoc, nsmul_eq_mul] + _ ≤ b 1 + 2 * ∑ n ∈ Ico 2 (2 ^ K + 1), b n := by gcongr + _ ≤ 2 * (b 1 + ∑ n ∈ Ico 2 (2 ^ K + 1), b n) := by + rw [mul_add]; gcongr; exact le_mul_of_one_le_left' one_le_two + _ = 2 * ∑ n ∈ Ico 1 (2 ^ K + 1), b n := by rw [sum_eq_sum_Ico_succ_bot hK] + _ ≤ 2 * ∑' n, b n := by gcongr; exact sum_le_tsum _ + +/-! ### The dyadic sum -/ + +/-- **Geometric partial sums**: `∑_{j < J} r^j ≤ r^J (r - 1)⁻¹` for `1 ≤ r < ∞`, from the +geometric sum `(∑_{j < J} r^j)(r - 1) + 1 = r^J` (Mathlib's `geom_sum_mul_add` with +`x = r - 1`). -/ +theorem sum_range_pow_le_pow_mul_inv {r : ℝ≥0∞} (hr1 : 1 ≤ r) (hr : r ≠ ∞) (J : ℕ) : + ∑ j ∈ range J, r ^ j ≤ r ^ J * (r - 1)⁻¹ := by + have h := geom_sum_mul_add (r - 1) J + rw [tsub_add_cancel_of_le hr1] at h + rw [← div_eq_mul_inv, + ENNReal.le_div_iff_mul_le (Or.inr (pow_ne_zero _ (one_pos.trans_le hr1).ne')) + (Or.inl (tsub_le_self.trans_lt hr.lt_top).ne)] + rw [← h] + exact le_self_add + +/-- `∑_{j < N} 2^j ≤ 2^N` in `[0, ∞]`, the case `r = 2` of +`ENNReal.sum_range_pow_le_pow_mul_inv`. -/ +theorem sum_range_two_pow_le (N : ℕ) : ∑ j ∈ Finset.range N, (2 : ℝ≥0∞) ^ j ≤ 2 ^ N := by + have h := sum_range_pow_le_pow_mul_inv one_le_two ofNat_ne_top N + rwa [ENNReal.sub_eq_of_eq_add one_ne_top one_add_one_eq_two.symm, inv_one, mul_one] at h + +/-- For `a ≠ 0` in `[0, ∞]` there is `j ∈ ℕ` with `2^j a > 1`: Mathlib's +`ENNReal.exists_nat_mul_gt` gives `n a > 1`, and `n < 2^n`. -/ +theorem exists_one_lt_two_pow_mul {a : ℝ≥0∞} (ha : a ≠ 0) : ∃ j : ℕ, 1 < 2 ^ j * a := by + obtain ⟨n, hn⟩ := exists_nat_mul_gt ha one_ne_top + refine ⟨n, hn.trans_le ?_⟩ + gcongr + exact_mod_cast (Nat.lt_two_pow_self).le + +/-- The terms `min(2^j a, (2^j a)⁻¹)` with `2^j a ≤ 1`, the indices `j < j₀`, add up to at most +`2`: they are at most `2^j a`, and `∑_{j < j₀} 2^j a ≤ 2^{j₀} a ≤ 2` when `2^{j₀ - 1} a ≤ 1`. -/ +theorem sum_range_min_two_pow_le {a : ℝ≥0∞} {j₀ : ℕ} (h : ∀ j < j₀, ¬ 1 < 2 ^ j * a) : + ∑ j ∈ Finset.range j₀, min (2 ^ j * a) (2 ^ j * a)⁻¹ ≤ 2 := by + cases j₀ with + | zero => simp + | succ m => + have hm : 2 ^ m * a ≤ 1 := not_lt.1 (h m (Nat.lt_succ_self m)) + calc ∑ j ∈ Finset.range (m + 1), min (2 ^ j * a) (2 ^ j * a)⁻¹ + ≤ ∑ j ∈ Finset.range (m + 1), 2 ^ j * a := Finset.sum_le_sum fun j _ => min_le_left _ _ + _ = (∑ j ∈ Finset.range (m + 1), (2 : ℝ≥0∞) ^ j) * a := (Finset.sum_mul _ _ _).symm + _ ≤ 2 ^ (m + 1) * a := by gcongr; exact sum_range_two_pow_le _ + _ = 2 * (2 ^ m * a) := by ring + _ ≤ 2 * 1 := by gcongr + _ = 2 := mul_one 2 + +/-- The terms `min(2^{i+j₀} a, (2^{i+j₀} a)⁻¹)` with `2^{j₀} a > 1` add up to at most `2`: they +are at most `2^{-i}`. -/ +theorem tsum_min_two_pow_add_le {a : ℝ≥0∞} {j₀ : ℕ} (h : 1 < 2 ^ j₀ * a) : + ∑' i, min (2 ^ (i + j₀) * a) (2 ^ (i + j₀) * a)⁻¹ ≤ 2 := by + have hterm : ∀ i : ℕ, min (2 ^ (i + j₀) * a) (2 ^ (i + j₀) * a)⁻¹ ≤ 2⁻¹ ^ i := fun i => by + refine (min_le_right _ _).trans ?_ + rw [pow_add, mul_assoc, ENNReal.mul_inv (Or.inl (pow_ne_zero _ two_ne_zero)) + (Or.inl (ENNReal.pow_ne_top ENNReal.ofNat_ne_top)), ENNReal.inv_pow] + calc (2⁻¹ : ℝ≥0∞) ^ i * (2 ^ j₀ * a)⁻¹ ≤ 2⁻¹ ^ i * 1 := by + gcongr + exact ENNReal.inv_le_one.2 h.le + _ = 2⁻¹ ^ i := mul_one _ + exact (tsum_le_tsum hterm).trans_eq ENNReal.tsum_geometric_two + +/-- **The dyadic sum of `min(t, t⁻¹)`**: for every `a ∈ [0, ∞]`, +`∑_{j ∈ ℕ} min(2^j a, (2^j a)⁻¹) ≤ 4`. With `j₀` the least `j` such that `2^j a > 1`, the terms +below `j₀` add up to at most `2` (`ENNReal.sum_range_min_two_pow_le`) and the terms from `j₀` on +to at most `2` (`ENNReal.tsum_min_two_pow_add_le`). -/ +theorem tsum_min_two_pow_le (a : ℝ≥0∞) : ∑' j : ℕ, min (2 ^ j * a) (2 ^ j * a)⁻¹ ≤ 4 := by + classical + rcases eq_or_ne a 0 with rfl | ha + · simp + have hex := exists_one_lt_two_pow_mul ha + rw [← CompleteLattice.summable.sum_add_tsum_nat_add' (k := Nat.find hex)] + calc _ ≤ 2 + 2 := add_le_add (sum_range_min_two_pow_le fun j hj => Nat.find_min hex hj) + (tsum_min_two_pow_add_le (Nat.find_spec hex)) + _ = 4 := by norm_num + +/-- `min(x, x⁻¹)² ≤ min(x, x⁻¹)` in `ℝ≥0∞`, since `min(x, x⁻¹) ≤ 1` (Mathlib's `sq_le`). -/ +theorem min_inv_sq_le (x : ℝ≥0∞) : min x x⁻¹ ^ 2 ≤ min x x⁻¹ := by + have h1 : min x x⁻¹ ≤ 1 := by + rcases le_total x 1 with h | h + · exact (min_le_left _ _).trans h + · exact (min_le_right _ _).trans (ENNReal.inv_le_one.2 h) + exact sq_le zero_le h1 + +/-! ### Finitely many changed terms -/ + +/-- **Finitely many changed terms**: if `u_j = v_j` for every `j ≥ N`, then +`∑_j u_j ≤ ∑_j v_j + ∑_{i < N} u_i` in `[0, ∞]`. -/ +theorem tsum_le_tsum_add_sum_of_forall_ge_eq {u v : ℕ → ℝ≥0∞} {N : ℕ} + (h : ∀ j, N ≤ j → u j = v j) : ∑' j, u j ≤ ∑' j, v j + ∑ i ∈ Finset.range N, u i := by + calc ∑' j, u j = ∑ i ∈ Finset.range N, u i + ∑' i, u (i + N) := + (CompleteLattice.summable (f := fun i => u (i + N))).sum_add_tsum_nat_add'.symm + _ = ∑ i ∈ Finset.range N, u i + ∑' i, v (i + N) := by + rw [tsum_congr fun i => h _ (Nat.le_add_left N i)] + _ ≤ ∑ i ∈ Finset.range N, u i + ∑' j, v j := + add_le_add_right (tsum_comp_le_tsum_of_injective (add_left_injective N) v) _ + _ = ∑' j, v j + ∑ i ∈ Finset.range N, u i := add_comm _ _ + +/-! ### Sums with few nonzero terms -/ + +/-- **Dyadic scales of an annulus**: for `a > 0`, if `a ≤ t / 2^j` and `t / 2^i ≤ 2^N a`, then +`j ≤ i + N`, since `2^j a ≤ t ≤ 2^{i+N} a`. -/ +theorem _root_.Nat.le_add_of_dyadic_annulus {a t : ℝ} (ha : 0 < a) {i j N : ℕ} + (hj : a ≤ t / 2 ^ j) (hi : t / 2 ^ i ≤ 2 ^ N * a) : j ≤ i + N := by + rw [le_div_iff₀ (by positivity)] at hj + rw [div_le_iff₀ (by positivity)] at hi + have h : a * 2 ^ j ≤ a * 2 ^ (i + N) := by + calc a * 2 ^ j ≤ t := hj + _ ≤ 2 ^ N * a * 2 ^ i := hi + _ = a * 2 ^ (i + N) := by ring + exact (_root_.pow_le_pow_iff_right₀ (_root_.one_lt_two (α := ℝ))).1 + (_root_.le_of_mul_le_mul_left h ha) + +/-- **A sum with at most `N + 1` nonzero terms**: if `u_j ≤ M` for every `j` and `u_j ≠ 0` only +for `i₀ ≤ j ≤ i₀ + N`, then `∑_j u_j ≤ (N + 1) M`. -/ +theorem tsum_le_of_mem_Icc {u : ℕ → ℝ≥0∞} {M : ℝ≥0∞} {i₀ N : ℕ} + (hM : ∀ j, u j ≤ M) (hu : ∀ j, u j ≠ 0 → j ∈ Finset.Icc i₀ (i₀ + N)) : + ∑' j, u j ≤ (N + 1) * M := by + rw [tsum_eq_sum (s := Finset.Icc i₀ (i₀ + N)) fun j hj => not_not.1 fun h => hj (hu j h)] + calc ∑ j ∈ Finset.Icc i₀ (i₀ + N), u j ≤ ∑ _j ∈ Finset.Icc i₀ (i₀ + N), M := + Finset.sum_le_sum fun j _ => hM j + _ = (N + 1) * M := by + rw [Finset.sum_const, Nat.card_Icc, nsmul_eq_mul, show i₀ + N + 1 - i₀ = N + 1 by omega] + push_cast + rfl + +/-- **At most `N + 1` dyadic scales see a point of an annulus**: for `a > 0`, if `u_j ≤ M` for +every `j` and `u_j ≠ 0` only when `t / 2^j` lies in the annulus `[a, 2^N a]`, then +`∑_j u_j ≤ (N + 1) M`. With `i₀` the least `j` with `u_j ≠ 0`, every such `j` satisfies +`i₀ ≤ j ≤ i₀ + N` (`Nat.le_add_of_dyadic_annulus`, `ENNReal.tsum_le_of_mem_Icc`). -/ +theorem tsum_le_of_dyadic_annulus {u : ℕ → ℝ≥0∞} {M : ℝ≥0∞} {a t : ℝ} + (ha : 0 < a) {N : ℕ} (hM : ∀ j, u j ≤ M) + (hu : ∀ j, u j ≠ 0 → a ≤ t / 2 ^ j ∧ t / 2 ^ j ≤ 2 ^ N * a) : + ∑' j, u j ≤ (N + 1) * M := by + classical + by_cases hex : ∃ j, u j ≠ 0 + · exact tsum_le_of_mem_Icc hM fun j hj => Finset.mem_Icc.2 + ⟨Nat.find_min' hex hj, Nat.le_add_of_dyadic_annulus ha (hu j hj).1 + (hu _ (Nat.find_spec hex)).2⟩ + · push Not at hex + simp [hex] + +/-! ### Interpolation of dyadic suprema -/ + +/-- The **constant of the dyadic interpolation inequality**, +`c(δ, θ) = 2^(θδ) (2^(θδ) - 1)⁻¹ + (1 - 2^(-(1-θ)δ))⁻¹` +(`ENNReal.tsum_dyadicWeight_mul_le_iSup`): the first summand bounds the geometric sum of the +low indices, the second that of the high indices. -/ +noncomputable def dyadicInterpConst (δ θ : ℝ) : ℝ≥0∞ := + 2 ^ (θ * δ) * (2 ^ (θ * δ) - 1)⁻¹ + (1 - (2 : ℝ≥0∞) ^ (-((1 - θ) * δ)))⁻¹ + +/-- The constant `c(δ, θ)` is finite for `δ > 0` and `0 < θ < 1`. -/ +theorem dyadicInterpConst_ne_top {δ θ : ℝ} (hδ : 0 < δ) (hθ0 : 0 < θ) (hθ1 : θ < 1) : + dyadicInterpConst δ θ ≠ ∞ := by + refine ENNReal.add_ne_top.2 ⟨ENNReal.mul_ne_top + (ENNReal.two_rpow_ne_top _) ?_, + one_sub_two_rpow_neg_inv_ne_top (_root_.mul_pos (sub_pos.2 hθ1) hδ)⟩ + rw [ENNReal.inv_ne_top] + exact (tsub_pos_of_lt (ENNReal.one_lt_rpow one_lt_two (_root_.mul_pos hθ0 hδ))).ne' + +/-- The constant `c(δ, θ)` is at least `1`. -/ +theorem one_le_dyadicInterpConst (δ θ : ℝ) : 1 ≤ dyadicInterpConst δ θ := + (one_le_one_sub_two_rpow_neg_inv _).trans le_add_self + +/-- `Y = Y^θ Y^(1-θ)` in `[0, ∞]` for `0 ≤ θ ≤ 1` (Mathlib's `ENNReal.rpow_add_of_nonneg`). -/ +theorem rpow_mul_rpow_one_sub {θ : ℝ} (hθ0 : 0 ≤ θ) (hθ1 : θ ≤ 1) (Y : ℝ≥0∞) : + Y ^ θ * Y ^ (1 - θ) = Y := by + rw [← ENNReal.rpow_add_of_nonneg _ _ hθ0 (sub_nonneg.2 hθ1), add_sub_cancel, ENNReal.rpow_one] + +variable {δ θ : ℝ} {X Y : ℝ≥0∞} + +/-- **The low-index bound**: if `Y ≤ 2^(-Kδ) X`, then `2^(Kθδ) Y ≤ X^θ Y^(1-θ)` for +`0 ≤ θ ≤ 1`, since `Y^θ ≤ 2^(-Kθδ) X^θ`. -/ +theorem dyadicWeight_mul_le_rpow_mul_rpow (hθ0 : 0 ≤ θ) (hθ1 : θ ≤ 1) {K : ℕ} + (hK : Y ≤ dyadicWeight (-δ) K * X) : + dyadicWeight (θ * δ) K * Y ≤ X ^ θ * Y ^ (1 - θ) := by + have h1 : Y ^ θ ≤ dyadicWeight (-(θ * δ)) K * X ^ θ := by + calc Y ^ θ ≤ (dyadicWeight (-δ) K * X) ^ θ := ENNReal.rpow_le_rpow hK hθ0 + _ = dyadicWeight (-(θ * δ)) K * X ^ θ := by + rw [ENNReal.mul_rpow_of_nonneg _ _ hθ0, dyadicWeight_rpow] + congr 2 + ring + calc dyadicWeight (θ * δ) K * Y = dyadicWeight (θ * δ) K * Y ^ θ * Y ^ (1 - θ) := by + rw [mul_assoc, rpow_mul_rpow_one_sub hθ0 hθ1] + _ ≤ dyadicWeight (θ * δ) K * (dyadicWeight (-(θ * δ)) K * X ^ θ) * Y ^ (1 - θ) := by + gcongr + _ = X ^ θ * Y ^ (1 - θ) := by + rw [← mul_assoc, dyadicWeight_mul_neg_self, one_mul] + +/-- **The high-index bound**: if `2^(-Jδ) X ≤ Y`, then `2^(-J(1-θ)δ) X ≤ X^θ Y^(1-θ)` for +`0 ≤ θ ≤ 1`, since `2^(-J(1-θ)δ) X^(1-θ) = (2^(-Jδ) X)^(1-θ) ≤ Y^(1-θ)`. -/ +theorem dyadicWeight_neg_mul_le_rpow_mul_rpow (hθ0 : 0 ≤ θ) (hθ1 : θ ≤ 1) {J : ℕ} + (hJ : dyadicWeight (-δ) J * X ≤ Y) : + dyadicWeight (-((1 - θ) * δ)) J * X ≤ X ^ θ * Y ^ (1 - θ) := by + have h1 : dyadicWeight (-((1 - θ) * δ)) J * X ^ (1 - θ) ≤ Y ^ (1 - θ) := by + calc dyadicWeight (-((1 - θ) * δ)) J * X ^ (1 - θ) + = (dyadicWeight (-δ) J * X) ^ (1 - θ) := by + rw [ENNReal.mul_rpow_of_nonneg _ _ (sub_nonneg.2 hθ1), dyadicWeight_rpow] + congr 2 + ring + _ ≤ Y ^ (1 - θ) := ENNReal.rpow_le_rpow hJ (sub_nonneg.2 hθ1) + calc dyadicWeight (-((1 - θ) * δ)) J * X + = X ^ θ * (dyadicWeight (-((1 - θ) * δ)) J * X ^ (1 - θ)) := by + conv_lhs => rw [← rpow_mul_rpow_one_sub hθ0 hθ1 X] + ring + _ ≤ X ^ θ * Y ^ (1 - θ) := by gcongr + +/-- **The low indices**: if `b_j ≤ 2^(jθδ) Y` for every `j` and `Y ≤ 2^(-Kδ) X`, then +`∑_{j ≤ K} b_j ≤ 2^(θδ) (2^(θδ) - 1)⁻¹ X^θ Y^(1-θ)` for `θ ∈ [0, 1]` and `δ ≥ 0`. The geometric +sum is at most `2^((K+1)θδ) (2^(θδ) - 1)⁻¹` (`ENNReal.sum_range_pow_le_pow_mul_inv`), and +`2^(Kθδ) Y ≤ X^θ Y^(1-θ)` (`ENNReal.dyadicWeight_mul_le_rpow_mul_rpow`). -/ +theorem sum_range_succ_le_of_le_dyadicWeight (hδ : 0 ≤ δ) (hθ0 : 0 ≤ θ) (hθ1 : θ ≤ 1) + (hlow : ∀ j, b j ≤ dyadicWeight (θ * δ) j * Y) {K : ℕ} + (hK : Y ≤ dyadicWeight (-δ) K * X) : + ∑ j ∈ range (K + 1), b j ≤ + 2 ^ (θ * δ) * (2 ^ (θ * δ) - 1)⁻¹ * (X ^ θ * Y ^ (1 - θ)) := by + have hr1 : 1 ≤ (2 : ℝ≥0∞) ^ (θ * δ) := ENNReal.one_le_two_rpow (mul_nonneg hθ0 hδ) + have hr : (2 : ℝ≥0∞) ^ (θ * δ) ≠ ∞ := + ENNReal.two_rpow_ne_top _ + calc ∑ j ∈ range (K + 1), b j + ≤ ∑ j ∈ range (K + 1), ((2 : ℝ≥0∞) ^ (θ * δ)) ^ j * Y := + Finset.sum_le_sum fun j _ => (hlow j).trans_eq (by rw [dyadicWeight_eq_pow]) + _ = (∑ j ∈ range (K + 1), ((2 : ℝ≥0∞) ^ (θ * δ)) ^ j) * Y := (Finset.sum_mul _ _ _).symm + _ ≤ ((2 : ℝ≥0∞) ^ (θ * δ)) ^ (K + 1) * (2 ^ (θ * δ) - 1)⁻¹ * Y := by + gcongr + exact sum_range_pow_le_pow_mul_inv hr1 hr _ + _ = 2 ^ (θ * δ) * (2 ^ (θ * δ) - 1)⁻¹ * (dyadicWeight (θ * δ) K * Y) := by + rw [dyadicWeight_eq_pow, pow_succ] + ring + _ ≤ _ := mul_le_mul' le_rfl (dyadicWeight_mul_le_rpow_mul_rpow hθ0 hθ1 hK) + +/-- **The high indices**: if `b_j ≤ 2^(-j(1-θ)δ) X` for every `j` and `2^(-Jδ) X ≤ Y`, then +`∑_{i} b_{i+J} ≤ (1 - 2^(-(1-θ)δ))⁻¹ X^θ Y^(1-θ)` for `θ ∈ [0, 1]`: the geometric series +`∑_i 2^(-i(1-θ)δ)` (`ENNReal.tsum_dyadicWeight_neg`) times +`2^(-J(1-θ)δ) X ≤ X^θ Y^(1-θ)` (`ENNReal.dyadicWeight_neg_mul_le_rpow_mul_rpow`). -/ +theorem tsum_add_le_of_le_dyadicWeight_neg (hθ0 : 0 ≤ θ) (hθ1 : θ ≤ 1) + (hhigh : ∀ j, b j ≤ dyadicWeight (-((1 - θ) * δ)) j * X) {J : ℕ} + (hJ : dyadicWeight (-δ) J * X ≤ Y) : + ∑' i, b (i + J) ≤ (1 - (2 : ℝ≥0∞) ^ (-((1 - θ) * δ)))⁻¹ * (X ^ θ * Y ^ (1 - θ)) := by + calc ∑' i, b (i + J) + ≤ ∑' i, dyadicWeight (-((1 - θ) * δ)) i * (dyadicWeight (-((1 - θ) * δ)) J * X) := + tsum_le_tsum fun i => (hhigh (i + J)).trans_eq (by + rw [dyadicWeight_add_nat, mul_assoc]) + _ = (1 - (2 : ℝ≥0∞) ^ (-((1 - θ) * δ)))⁻¹ * (dyadicWeight (-((1 - θ) * δ)) J * X) := by + rw [ENNReal.tsum_mul_right, tsum_dyadicWeight_neg] + _ ≤ _ := mul_le_mul' le_rfl (dyadicWeight_neg_mul_le_rpow_mul_rpow hθ0 hθ1 hJ) + +/-- For `δ > 0`, `X < ∞` and `Y > 0` there is `J` with `2^(-Jδ) X ≤ Y`, since +`2^(-Jδ) X → 0` (Mathlib's `ENNReal.tendsto_pow_atTop_nhds_zero_of_lt_one`). -/ +theorem exists_dyadicWeight_neg_mul_le (hδ : 0 < δ) (hX : X ≠ ∞) (hY : Y ≠ 0) : + ∃ J : ℕ, dyadicWeight (-δ) J * X ≤ Y := by + have h : Tendsto (fun J : ℕ => dyadicWeight (-δ) J * X) atTop (nhds 0) := by + simp_rw [dyadicWeight_eq_pow] + simpa using ENNReal.Tendsto.mul_const + (ENNReal.tendsto_pow_atTop_nhds_zero_of_lt_one (two_rpow_neg_lt_one hδ)) (Or.inr hX) + obtain ⟨J, hJ⟩ := ((tendsto_order.1 h).2 Y (pos_iff_ne_zero.2 hY)).exists + exact ⟨J, hJ.le⟩ + +/-- **Splitting a series into low and high indices**: with `δ > 0`, `0 < θ < 1`, `X < ∞` and +`Y > 0`, if `b_j ≤ 2^(jθδ) Y` and `b_j ≤ 2^(-j(1-θ)δ) X` for every `j`, then +`∑_j b_j ≤ c(δ, θ) X^θ Y^(1-θ)`. The series is split at the least `J` with `2^(-Jδ) X ≤ Y` +(`ENNReal.exists_dyadicWeight_neg_mul_le`): the indices `j < J` are bounded by +`ENNReal.sum_range_succ_le_of_le_dyadicWeight`, the indices `j ≥ J` by +`ENNReal.tsum_add_le_of_le_dyadicWeight_neg`. -/ +theorem tsum_le_dyadicInterpConst_of_ne (hδ : 0 < δ) (hθ0 : 0 < θ) (hθ1 : θ < 1) + (hX : X ≠ ∞) (hY : Y ≠ 0) (hlow : ∀ j, b j ≤ dyadicWeight (θ * δ) j * Y) + (hhigh : ∀ j, b j ≤ dyadicWeight (-((1 - θ) * δ)) j * X) : + ∑' j, b j ≤ dyadicInterpConst δ θ * (X ^ θ * Y ^ (1 - θ)) := by + classical + have hex := exists_dyadicWeight_neg_mul_le hδ hX hY + rw [← CompleteLattice.summable.sum_add_tsum_nat_add' (k := Nat.find hex), dyadicInterpConst, + add_mul] + refine add_le_add ?_ + (tsum_add_le_of_le_dyadicWeight_neg hθ0.le hθ1.le hhigh (Nat.find_spec hex)) + rcases Nat.eq_zero_or_pos (Nat.find hex) with h0 | hpos + · rw [h0, Finset.sum_range_zero] + exact zero_le + obtain ⟨K, hK⟩ := Nat.exists_eq_add_of_lt hpos + rw [hK, zero_add] + refine sum_range_succ_le_of_le_dyadicWeight hδ.le hθ0.le hθ1.le hlow ?_ + have := Nat.find_min hex (show K < Nat.find hex by omega) + rw [not_le] at this + exact this.le + +/-- **Splitting a series into low and high indices**, for all `X, Y ∈ [0, ∞]`: with `δ > 0` and +`0 < θ < 1`, if `b_j ≤ 2^(jθδ) Y` and `b_j ≤ 2^(-j(1-θ)δ) X` for every `j`, then +`∑_j b_j ≤ c(δ, θ) X^θ Y^(1-θ)`. For `Y = 0` every `b_j` is `0`; for `X = ∞` and `Y > 0` the +right side is `∞`; otherwise this is `ENNReal.tsum_le_dyadicInterpConst_of_ne`. -/ +theorem tsum_le_dyadicInterpConst (hδ : 0 < δ) (hθ0 : 0 < θ) (hθ1 : θ < 1) + (hlow : ∀ j, b j ≤ dyadicWeight (θ * δ) j * Y) + (hhigh : ∀ j, b j ≤ dyadicWeight (-((1 - θ) * δ)) j * X) : + ∑' j, b j ≤ dyadicInterpConst δ θ * (X ^ θ * Y ^ (1 - θ)) := by + rcases eq_or_ne Y 0 with rfl | hY + · have hb : ∀ j, b j = 0 := fun j => le_antisymm ((hlow j).trans_eq (mul_zero _)) zero_le + simp [hb] + rcases eq_or_ne X ∞ with rfl | hX + · have h1 : Y ^ (1 - θ) ≠ 0 := (ENNReal.rpow_pos_of_nonneg (pos_iff_ne_zero.2 hY) + (sub_nonneg.2 hθ1.le)).ne' + rw [ENNReal.top_rpow_of_pos hθ0, ENNReal.top_mul h1, + ENNReal.mul_top (one_pos.trans_le (one_le_dyadicInterpConst δ θ)).ne'] + exact le_top + exact tsum_le_dyadicInterpConst_of_ne hδ hθ0 hθ1 hX hY hlow hhigh + +/-- **The interpolation inequality for dyadic suprema** (Brezis–Mironescu 2001; Johnsen–Sickel +2007, Lemma 2 for `q = 1`): for `σ₁ < σ₀`, `0 < θ < 1` and every sequence `a` in `[0, ∞]`, + +`∑_j 2^(j(θσ₀ + (1-θ)σ₁)) a_j ≤ c(σ₀ - σ₁, θ) (sup_j 2^(jσ₀) a_j)^θ (sup_j 2^(jσ₁) a_j)^(1-θ)` + +with `c = ENNReal.dyadicInterpConst`. With `δ = σ₀ - σ₁`, every term is at most +`2^(jθδ) sup_j 2^(jσ₁) a_j` and at most `2^(-j(1-θ)δ) sup_j 2^(jσ₀) a_j` +(`ENNReal.tsum_le_dyadicInterpConst`). -/ +theorem tsum_dyadicWeight_mul_le_iSup {σ₀ σ₁ : ℝ} (hσ : σ₁ < σ₀) (hθ0 : 0 < θ) (hθ1 : θ < 1) + (a : ℕ → ℝ≥0∞) : + ∑' j, dyadicWeight (θ * σ₀ + (1 - θ) * σ₁) j * a j ≤ + dyadicInterpConst (σ₀ - σ₁) θ * (⨆ j, dyadicWeight σ₀ j * a j) ^ θ * + (⨆ j, dyadicWeight σ₁ j * a j) ^ (1 - θ) := by + rw [mul_assoc] + refine tsum_le_dyadicInterpConst (sub_pos.2 hσ) hθ0 hθ1 (fun j => ?_) (fun j => ?_) + · calc dyadicWeight (θ * σ₀ + (1 - θ) * σ₁) j * a j + = dyadicWeight (θ * (σ₀ - σ₁)) j * (dyadicWeight σ₁ j * a j) := by + rw [← mul_assoc, ← dyadicWeight_add] + congr 2 + ring + _ ≤ _ := mul_le_mul' le_rfl (le_iSup (fun j => dyadicWeight σ₁ j * a j) j) + · calc dyadicWeight (θ * σ₀ + (1 - θ) * σ₁) j * a j + = dyadicWeight (-((1 - θ) * (σ₀ - σ₁))) j * (dyadicWeight σ₀ j * a j) := by + rw [← mul_assoc, ← dyadicWeight_add] + congr 2 + ring + _ ≤ _ := mul_le_mul' le_rfl (le_iSup (fun j => dyadicWeight σ₀ j * a j) j) + +/-- **The interpolation inequality for dyadic suprema in `ℓ_q`** (Brezis–Mironescu 2001; +Johnsen–Sickel 2007, Lemma 2): for `1 ≤ q ≤ ∞`, `σ₁ < σ₀` and `0 < θ < 1`, +`‖(2^(j(θσ₀ + (1-θ)σ₁)) a_j)_j‖_{ℓ_q} ≤ + c(σ₀ - σ₁, θ) (sup_j 2^(jσ₀) a_j)^θ (sup_j 2^(jσ₁) a_j)^(1-θ)`, since the `ℓ_q` norm is at +most the sum (`ENNReal.lqNorm_le_lqNorm_one`). -/ +theorem lqNorm_dyadicWeight_mul_le_iSup {q : ℝ≥0∞} (hq : 1 ≤ q) {σ₀ σ₁ : ℝ} (hσ : σ₁ < σ₀) + (hθ0 : 0 < θ) (hθ1 : θ < 1) (a : ℕ → ℝ≥0∞) : + lqNorm q (fun j => dyadicWeight (θ * σ₀ + (1 - θ) * σ₁) j * a j) ≤ + dyadicInterpConst (σ₀ - σ₁) θ * (⨆ j, dyadicWeight σ₀ j * a j) ^ θ * + (⨆ j, dyadicWeight σ₁ j * a j) ^ (1 - θ) := + (lqNorm_le_lqNorm_one hq _).trans (tsum_dyadicWeight_mul_le_iSup hσ hθ0 hθ1 a) + +end ENNReal diff --git a/LeanPool/FunctionSpaces/ApproximationSpaces/Sequences/Hardy.lean b/LeanPool/FunctionSpaces/ApproximationSpaces/Sequences/Hardy.lean new file mode 100644 index 0000000000..571af036e3 --- /dev/null +++ b/LeanPool/FunctionSpaces/ApproximationSpaces/Sequences/Hardy.lean @@ -0,0 +1,592 @@ +/- +Copyright (c) 2026 Mario Ullrich. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Mario Ullrich +-/ +module + +public import LeanPool.FunctionSpaces.ApproximationSpaces.Sequences.Lq + +/- +Modified for Lean Pool: module names and imports adapted. +-/ + +/-! +# Discrete Hardy inequalities and geometric convolutions + +For `α > 0`, `1 ≤ q ≤ ∞` and a sequence `b : ℕ → ℝ≥0∞`, with `C_α = (1 - 2^(-α))⁻¹`: + +* `hardy_sum_le`: + `‖(2^(-kα) ∑_{j ≤ k} b j)ₖ‖_q ≤ C_α ‖(2^(-kα) b k)ₖ‖_q`; +* `hardy_tail_le`: + `‖(2^(kα) ∑_{i ≥ 0} b (k + i))ₖ‖_q ≤ C_α ‖(2^(kα) b k)ₖ‖_q`. + +These are the two estimates behind every telescoping argument in approximation theory: the +first controls partial sums of dyadic blocks (Bernstein side), the second controls tails +(Jackson and Nikolskii side). Both are Young's inequality `‖w * c‖_q ≤ ‖w‖_1 ‖c‖_q` for the +geometric kernel `w i = 2^(-iα)`. The proof writes the convolution as a series of shifted +copies of `c` and uses the **countable Minkowski inequality** `lqNorm_tsum_le`, the case of +`MeasureTheory.eLpNorm_tsum_le` for the counting measure; monotone convergence (`lqNorm_iSup`, the +case of `MeasureTheory.eLpNorm_iSup_of_directed`) gives the norm of a sequence as the supremum of +the norms of its truncations, which increase (`lqNorm_eq_iSup_lqNorm_ite`, `monotone_ite_lt`). +Shifts do not increase the norm, so window sums cost a constant: +`‖(∑_{k = j - c}^{j + c} b_k)_j‖_q ≤ (2c + 1) ‖b‖_q` (`lqNorm_sum_Icc_le`). + +Together they bound an **almost diagonal sum**: with `c_{ij} = 2^(-(i-j)L)` for `j ≤ i` and +`c_{ij} = 1` for `j > i`, `‖(2^(is) ∑_j c_{ij} a_j)_i‖_q ≤ C ‖(2^(js) a_j)_j‖_q` for `0 < s < L` +(`lqNorm_almostDiagonal_le`), with the constant `C = (1 - 2^(-(L-s)))⁻¹ + (1 - 2^(-s))⁻¹` +(`almostDiagonalConst`); the same bound holds for every sequence below `C' ∑_j c_{ij} m_j` +(`lqNorm_le_almostDiagonalConst_mul_of_le`). + +For `0 < q ≤ 1` the same three estimates hold with the constants of the `q`-th powers: the +Hardy inequalities with `γ_{α,q} = (1 - 2^(-αq))^(-1/q)` (`hardy_tail_le_of_le_one`, +`hardy_sum_le_of_le_one`, with `dyadicGeomConst`) and the almost diagonal sum with +`almostDiagonalConst (sq) (Lq) ^ (1/q)` (`lqNorm_almostDiagonal_le_of_le_one`). The `q`-th power of +a sum is at most the sum of the `q`-th powers, so each is the estimate for `ℓ_1` applied to the +`q`-th powers. For every exponent `q` both Hardy inequalities hold with the constant +`hardyConst α q`, which is `(1 - 2^(-α))⁻¹` for `q ≥ 1` and `γ_{α,q}` otherwise +(`hardy_tail_le'`, `hardy_sum_le'`). + +The Minkowski inequalities and monotone convergence hold for families on every countable index +set, and so does the rule for powers inside the norm, `‖(a_i^r)_i‖_{ℓ_{q/r}} = ‖a‖_{ℓ_q}^r` for +`r > 0` (`lqNorm_fun_rpow`, `lqNorm_div_fun_rpow`). On `ℤ`, the norm is invariant under shifts +(`lqNorm_comp_add_int`), which gives Young's inequality for a series of shifts +(`lqNorm_tsum_shift_le`) and the two **geometric convolutions** +`‖(∑_{j ≥ 0} 2^(-(j+1)α) c_{m-(j+1)})_m‖_q ≤ (1 - 2^(-α))⁻¹ ‖c‖_q` and the same bound for +`(∑_{j ≥ 0} 2^(-jα) c_{m+j})_m` (`lqNorm_tsum_geom_sub_le`, `lqNorm_tsum_geom_add_le`), the +convolutions behind the reiteration theorem. +-/ + +@[expose] public section + +open Finset Filter MeasureTheory +open scoped ENNReal + +namespace ENNReal + +variable {q : ℝ≥0∞} + +section Countable + +variable {κ : Type*} [MeasurableSpace κ] [Countable κ] [MeasurableSingletonClass κ] + +/-- **Monotone convergence** for the `ℓ_q` norm: for an increasing sequence of families indexed +by a countable set, the norm of the pointwise supremum is the supremum of the norms +(`MeasureTheory.eLpNorm_iSup_of_directed` for the counting measure). -/ +theorem lqNorm_iSup {F : ℕ → κ → ℝ≥0∞} (hF : Monotone F) : + lqNorm q (fun k => ⨆ N, F N k) = ⨆ N, lqNorm q (F N) := + eLpNorm_iSup_of_directed (fun _ => (measurable_of_countable _).aemeasurable) hF.directed_le q + +omit [Countable κ] [MeasurableSingletonClass κ] in +/-- **Minkowski's inequality for finite sums** of families. -/ +theorem lqNorm_sum_le (hq : 1 ≤ q) {ι : Type*} (s : Finset ι) (f : ι → κ → ℝ≥0∞) : + lqNorm q (fun k => ∑ i ∈ s, f i k) ≤ ∑ i ∈ s, lqNorm q (f i) := by + have : (fun k => ∑ i ∈ s, f i k) = ∑ i ∈ s, f i := by funext k; simp + rw [this] + exact eLpNorm_sum_le hq + +omit [Countable κ] [MeasurableSingletonClass κ] in +/-- **Minkowski's inequality for series** of families: the norm of a pointwise sum is at most the +sum of the norms (`MeasureTheory.eLpNorm_tsum_le` for the counting measure). -/ +theorem lqNorm_tsum_le (hq : 1 ≤ q) (f : ℕ → κ → ℝ≥0∞) : + lqNorm q (fun k => ∑' i, f i k) ≤ ∑' i, lqNorm q (f i) := + eLpNorm_tsum_le hq + +/-- **Powers inside an `ℓ_u` norm**: `‖(a_i^r)_i‖_{ℓ_u} = ‖a‖_{ℓ_{u r}}^r` for `r > 0` +(`MeasureTheory.eLpNorm_fun_rpow` for the counting measure). -/ +theorem lqNorm_fun_rpow (u : ℝ≥0∞) {r : ℝ} (hr : 0 < r) (a : κ → ℝ≥0∞) : + lqNorm u (fun i => a i ^ r) = lqNorm (u * ENNReal.ofReal r) a ^ r := + MeasureTheory.eLpNorm_fun_rpow (measurable_of_countable a).aemeasurable hr u + +/-- **Powers inside an `ℓ_q` norm, quotient form**: `‖(a_i^r)_i‖_{ℓ_{q/r}} = ‖a‖_{ℓ_q}^r` for +every `r > 0` and every exponent `q`, with `∞ / r = ∞`. For `0 < r ≤ 1` the `r`-th powers of a +sum are subadditive, so estimates in `ℓ_q` for sums of `r`-th powers pass through `ℓ_{q/r}`. -/ +theorem lqNorm_div_fun_rpow {r : ℝ} (hr : 0 < r) (q : ℝ≥0∞) (a : κ → ℝ≥0∞) : + lqNorm (q / ENNReal.ofReal r) (fun i => a i ^ r) = lqNorm q a ^ r := by + rw [lqNorm_fun_rpow _ hr, + ENNReal.div_mul_cancel (ENNReal.ofReal_pos.2 hr).ne' ENNReal.ofReal_ne_top] + +end Countable + +/-- **The truncations of a sequence increase**: `J ↦ (a_j 1_{j < J})_j` is monotone. -/ +theorem monotone_ite_lt (a : ℕ → ℝ≥0∞) : + Monotone fun (J j : ℕ) => if j < J then a j else 0 := by + intro J J' hJ j + dsimp only + split_ifs with h1 h2 + · exact le_rfl + · exact absurd (lt_of_lt_of_le h1 hJ) h2 + · exact zero_le + · exact le_rfl + +/-- **`ℓ_q` norms of truncations increase to the norm**: for every sequence `a` in `[0, ∞]`, +`‖a‖_{ℓ_q} = sup_J ‖(a_j 1_{j < J})_j‖_{ℓ_q}`, the case of `ENNReal.lqNorm_iSup` for the +truncations of `a`. -/ +theorem lqNorm_eq_iSup_lqNorm_ite (a : ℕ → ℝ≥0∞) : + lqNorm q a = ⨆ J : ℕ, lqNorm q (fun j => if j < J then a j else 0) := by + rw [← lqNorm_iSup (monotone_ite_lt a)] + congr 1 + funext j + refine le_antisymm (le_iSup_of_le (j + 1) (by simp)) (iSup_le fun J => ?_) + split_ifs + · exact le_rfl + · exact zero_le + +/-- Dropping the first `i` terms does not increase the norm +(`ENNReal.lqNorm_comp_le_of_injective` for `n ↦ n + i`). -/ +theorem lqNorm_shift_le' (i : ℕ) (a : ℕ → ℝ≥0∞) : lqNorm q (fun n => a (n + i)) ≤ lqNorm q a := + lqNorm_comp_le_of_injective (add_left_injective i) a + +/-- Shifting a sequence to the right by `i` places, filling with zeros, does not increase the +norm: the shifted sequence is the extension by zero of `a` along `k ↦ k + i` +(`ENNReal.lqNorm_extend_zero`). -/ +theorem lqNorm_shiftRight_le (i : ℕ) (a : ℕ → ℝ≥0∞) : + lqNorm q (fun k => if i ≤ k then a (k - i) else 0) ≤ lqNorm q a := by + have h : (fun k => if i ≤ k then a (k - i) else 0) = Function.extend (· + i) a 0 := by + funext k + split_ifs with hk + · obtain ⟨m, rfl⟩ := Nat.exists_eq_add_of_le' hk + rw [Nat.add_sub_cancel] + exact ((add_left_injective i).extend_apply a 0 m).symm + · rw [Function.extend_apply' _ _ _ fun ⟨m, hm⟩ => hk (hm ▸ Nat.le_add_left i m)] + rfl + rw [h, lqNorm_extend_zero (add_left_injective i)] + +/-! ### Window sums -/ + +/-- **Window sums as shifted sequences**: for `c, j ∈ ℕ` and `b : ℕ → [0, ∞]`, +`∑_{k = j - c}^{j + c} b_k = ∑_{i < 2c + 1} b_{j + i - c}`, where the terms with `j + i < c` are +`0` (Mathlib's `Finset.sum_nbij'` with `k ↦ k + c - j`). -/ +theorem sum_Icc_eq_sum_range_ite (c j : ℕ) (b : ℕ → ℝ≥0∞) : + ∑ k ∈ Finset.Icc (j - c) (j + c), b k = + ∑ i ∈ Finset.range (2 * c + 1), if c ≤ j + i then b (j + i - c) else 0 := by + rw [← Finset.sum_filter] + refine Finset.sum_nbij' (fun k => k + c - j) (fun i => j + i - c) ?_ ?_ ?_ ?_ ?_ + · intro k hk + simp only [Finset.mem_Icc, Finset.mem_filter, Finset.mem_range] at hk ⊢ + omega + · intro i hi + simp only [Finset.mem_Icc, Finset.mem_filter, Finset.mem_range] at hi ⊢ + omega + · intro k hk + rw [Finset.mem_Icc] at hk + omega + · intro i hi + rw [Finset.mem_filter, Finset.mem_range] at hi + omega + · intro k hk + rw [Finset.mem_Icc] at hk + congr 1 + omega + +/-- **One shifted sequence**: for `c, i ∈ ℕ`, the sequence `j ↦ b_{j + i - c}` (with the terms +`j + i < c` set to `0`) has `ℓ_q` norm at most `‖b‖_{ℓ_q}`: it is a shift of `b` to the right +(`ENNReal.lqNorm_shiftRight_le`) for `i ≤ c`, and to the left (`ENNReal.lqNorm_shift_le'`) +otherwise. -/ +theorem lqNorm_ite_add_sub_le {q : ℝ≥0∞} (c i : ℕ) (b : ℕ → ℝ≥0∞) : + lqNorm q (fun j => if c ≤ j + i then b (j + i - c) else 0) ≤ lqNorm q b := by + rcases le_or_gt i c with hic | hic + · have h : (fun j => if c ≤ j + i then b (j + i - c) else 0) = + fun j => if c - i ≤ j then b (j - (c - i)) else 0 := by + funext j + split_ifs with h1 h2 h2 + · congr 1 + omega + · exfalso + omega + · exfalso + omega + · rfl + rw [h] + exact lqNorm_shiftRight_le _ b + · have h : (fun j => if c ≤ j + i then b (j + i - c) else 0) = fun j => b (j + (i - c)) := by + funext j + split_ifs with h1 + · congr 1 + omega + · exfalso + omega + rw [h] + exact lqNorm_shift_le' _ b + +/-- **Window sums in `ℓ_q`**: for `1 ≤ q ≤ ∞`, `c ∈ ℕ` and every sequence `b` in `[0, ∞]`, +`‖(∑_{k = j - c}^{j + c} b_k)_j‖_{ℓ_q} ≤ (2c + 1) ‖b‖_{ℓ_q}`: the window sum is a sum of `2c + 1` +shifted sequences (`ENNReal.sum_Icc_eq_sum_range_ite`, `ENNReal.lqNorm_ite_add_sub_le`), and +Minkowski's inequality applies (`ENNReal.lqNorm_sum_le`). -/ +theorem lqNorm_sum_Icc_le {q : ℝ≥0∞} (hq : 1 ≤ q) (c : ℕ) (b : ℕ → ℝ≥0∞) : + lqNorm q (fun j => ∑ k ∈ Finset.Icc (j - c) (j + c), b k) ≤ (2 * c + 1) * lqNorm q b := by + simp_rw [sum_Icc_eq_sum_range_ite c _ b] + refine (lqNorm_sum_le hq _ _).trans ?_ + refine (Finset.sum_le_sum fun i _ => lqNorm_ite_add_sub_le c i b).trans ?_ + rw [Finset.sum_const, Finset.card_range, nsmul_eq_mul] + push_cast + exact le_rfl + +/-! ### Hardy's inequalities -/ + +/-- **Hardy's inequality for tails**: for `α > 0` and `1 ≤ q ≤ ∞`, +`‖(2^(kα) ∑_{i ≥ 0} b (k + i))ₖ‖_q ≤ (1 - 2^(-α))⁻¹ ‖(2^(kα) b k)ₖ‖_q`. -/ +theorem hardy_tail_le (hq : 1 ≤ q) (α : ℝ) (b : ℕ → ℝ≥0∞) : + lqNorm q (fun k => dyadicWeight α k * ∑' i, b (k + i)) ≤ + (1 - (2 : ℝ≥0∞) ^ (-α))⁻¹ * lqNorm q (fun k => dyadicWeight α k * b k) := by + set c : ℕ → ℝ≥0∞ := fun k => dyadicWeight α k * b k + have hterm : ∀ k, dyadicWeight α k * ∑' i, b (k + i) = + ∑' i, dyadicWeight (-α) i * c (k + i) := fun k => by + rw [← ENNReal.tsum_mul_left] + congr 1; funext i + simp only [c, dyadicWeight_add_nat, ← mul_assoc] + rw [mul_comm (dyadicWeight (-α) i), mul_assoc (dyadicWeight α k), dyadicWeight_neg_mul_self, + mul_one] + simp_rw [hterm] + calc lqNorm q (fun k => ∑' i, dyadicWeight (-α) i * c (k + i)) + ≤ ∑' i, lqNorm q (fun k => dyadicWeight (-α) i * c (k + i)) := + lqNorm_tsum_le hq (fun i k => dyadicWeight (-α) i * c (k + i)) + _ = ∑' i, dyadicWeight (-α) i * lqNorm q (fun k => c (k + i)) := by + simp_rw [lqNorm_const_mul] + _ ≤ ∑' i, dyadicWeight (-α) i * lqNorm q c := by + gcongr with i; exact lqNorm_shift_le' i c + _ = (1 - (2 : ℝ≥0∞) ^ (-α))⁻¹ * lqNorm q c := by + rw [ENNReal.tsum_mul_right] + simp_rw [dyadicWeight_eq_pow] + rw [ENNReal.tsum_geometric] + +/-- **Hardy's inequality for partial sums**: for `α > 0` and `1 ≤ q ≤ ∞`, +`‖(2^(-kα) ∑_{j ≤ k} b j)ₖ‖_q ≤ (1 - 2^(-α))⁻¹ ‖(2^(-kα) b k)ₖ‖_q`. -/ +theorem hardy_sum_le (hq : 1 ≤ q) (α : ℝ) (b : ℕ → ℝ≥0∞) : + lqNorm q (fun k => dyadicWeight (-α) k * ∑ j ∈ range (k + 1), b j) ≤ + (1 - (2 : ℝ≥0∞) ^ (-α))⁻¹ * lqNorm q (fun k => dyadicWeight (-α) k * b k) := by + set c : ℕ → ℝ≥0∞ := fun k => dyadicWeight (-α) k * b k + set g : ℕ → ℕ → ℝ≥0∞ := fun i k => dyadicWeight (-α) i * (if i ≤ k then c (k - i) else 0) + have hterm : ∀ k, dyadicWeight (-α) k * ∑ j ∈ range (k + 1), b j = ∑' i, g i k := fun k => by + rw [tsum_eq_sum (s := range (k + 1)) fun i hi => by + simp [g, not_le.2 (by simpa using hi : k < i)]] + rw [Finset.mul_sum, ← Finset.sum_range_reflect] + refine Finset.sum_congr rfl fun i hi => ?_ + have hik : i ≤ k := Nat.lt_succ_iff.1 (Finset.mem_range.1 hi) + have hk : k = (k - i) + i := (Nat.sub_add_cancel hik).symm + simp only [g, c, hik, ↓reduceIte, add_tsub_cancel_right] + rw [← mul_assoc, ← dyadicWeight_add_nat, add_comm i, ← hk] + simp_rw [hterm] + calc lqNorm q (fun k => ∑' i, g i k) ≤ ∑' i, lqNorm q (g i) := lqNorm_tsum_le hq g + _ = ∑' i, dyadicWeight (-α) i * lqNorm q (fun k => if i ≤ k then c (k - i) else 0) := by + simp_rw [g, lqNorm_const_mul] + _ ≤ ∑' i, dyadicWeight (-α) i * lqNorm q c := by + gcongr with i; exact lqNorm_shiftRight_le i c + _ = (1 - (2 : ℝ≥0∞) ^ (-α))⁻¹ * lqNorm q c := by + rw [ENNReal.tsum_mul_right] + simp_rw [dyadicWeight_eq_pow] + rw [ENNReal.tsum_geometric] + +/-! ### Hardy's inequalities for `0 < q ≤ 1` -/ + +/-- **Hardy's inequality for tails, `0 < q ≤ 1`**: +`‖(2^(kα) ∑_{i ≥ 0} b (k + i))ₖ‖_q ≤ γ_{α,q} ‖(2^(kα) b k)ₖ‖_q` with +`γ_{α,q} = (1 - 2^(-αq))^(-1/q)` (`ENNReal.dyadicGeomConst`); for `q = 0` both sides are the +degenerate value `0`. The `q`-th power of a series is at most the series of the `q`-th powers +(`ENNReal.rpow_tsum_le_tsum_rpow`), and Hardy's inequality for `ℓ_1` with the exponent `αq` +(`ENNReal.hardy_tail_le`) bounds the result. -/ +theorem hardy_tail_le_of_le_one (hq1 : q ≤ 1) (α : ℝ) (b : ℕ → ℝ≥0∞) : + lqNorm q (fun k => dyadicWeight α k * ∑' i, b (k + i)) ≤ + dyadicGeomConst α q * lqNorm q (fun k => dyadicWeight α k * b k) := by + rcases eq_or_ne q 0 with rfl | hq0 + · simp + obtain ⟨hp, hp1⟩ := toReal_mem_Ioc_of_le_one hq0 hq1 + rw [dyadicGeomConst] + refine lqNorm_le_rpow_mul_of_tsum_rpow_le (ne_top_of_le_ne_top one_ne_top hq1) ?_ + set p := q.toReal + calc ∑' k, (dyadicWeight α k * ∑' i, b (k + i)) ^ p + ≤ ∑' k, dyadicWeight (α * p) k * ∑' i, (fun j => b j ^ p) (k + i) := + tsum_le_tsum fun k => by + rw [mul_rpow_of_nonneg _ _ hp.le, dyadicWeight_rpow] + gcongr + exact rpow_tsum_le_tsum_rpow _ hp hp1 + _ = lqNorm 1 (fun k => dyadicWeight (α * p) k * ∑' i, (fun j => b j ^ p) (k + i)) := + (lqNorm_one _).symm + _ ≤ (1 - 2 ^ (-(α * p)))⁻¹ * lqNorm 1 (fun k => dyadicWeight (α * p) k * b k ^ p) := + hardy_tail_le le_rfl (α * p) (fun j => b j ^ p) + _ = (1 - 2 ^ (-(α * p)))⁻¹ * ∑' k, (dyadicWeight α k * b k) ^ p := by + rw [lqNorm_one] + congr 1 + refine tsum_congr fun k => ?_ + rw [mul_rpow_of_nonneg _ _ hp.le, dyadicWeight_rpow] + +/-- **Hardy's inequality for partial sums, `0 < q ≤ 1`**: +`‖(2^(-kα) ∑_{j ≤ k} b j)ₖ‖_q ≤ γ_{α,q} ‖(2^(-kα) b k)ₖ‖_q` with +`γ_{α,q} = (1 - 2^(-αq))^(-1/q)` (`ENNReal.dyadicGeomConst`); for `q = 0` both sides are the +degenerate value `0`. The `q`-th power of a finite sum is at most the sum of the `q`-th powers +(`ENNReal.rpow_sum_le_sum_rpow`), and Hardy's inequality for `ℓ_1` with the exponent `αq` +(`ENNReal.hardy_sum_le`) bounds the result. -/ +theorem hardy_sum_le_of_le_one (hq1 : q ≤ 1) (α : ℝ) (b : ℕ → ℝ≥0∞) : + lqNorm q (fun k => dyadicWeight (-α) k * ∑ j ∈ range (k + 1), b j) ≤ + dyadicGeomConst α q * lqNorm q (fun k => dyadicWeight (-α) k * b k) := by + rcases eq_or_ne q 0 with rfl | hq0 + · simp + obtain ⟨hp, hp1⟩ := toReal_mem_Ioc_of_le_one hq0 hq1 + rw [dyadicGeomConst] + refine lqNorm_le_rpow_mul_of_tsum_rpow_le (ne_top_of_le_ne_top one_ne_top hq1) ?_ + set p := q.toReal + have hw : ∀ k, dyadicWeight (-α) k ^ p = dyadicWeight (-(α * p)) k := fun k => by + rw [dyadicWeight_rpow, neg_mul] + calc ∑' k, (dyadicWeight (-α) k * ∑ j ∈ range (k + 1), b j) ^ p + ≤ ∑' k, dyadicWeight (-(α * p)) k * ∑ j ∈ range (k + 1), b j ^ p := + tsum_le_tsum fun k => by + rw [mul_rpow_of_nonneg _ _ hp.le, hw] + gcongr + exact rpow_sum_le_sum_rpow _ _ hp hp1 + _ = lqNorm 1 (fun k => dyadicWeight (-(α * p)) k * ∑ j ∈ range (k + 1), b j ^ p) := + (lqNorm_one _).symm + _ ≤ (1 - 2 ^ (-(α * p)))⁻¹ * lqNorm 1 (fun k => dyadicWeight (-(α * p)) k * b k ^ p) := + hardy_sum_le le_rfl (α * p) (fun j => b j ^ p) + _ = (1 - 2 ^ (-(α * p)))⁻¹ * ∑' k, (dyadicWeight (-α) k * b k) ^ p := by + rw [lqNorm_one] + congr 1 + refine tsum_congr fun k => ?_ + rw [mul_rpow_of_nonneg _ _ hp.le, hw] + +/-! ### Hardy's inequalities for every exponent -/ + +/-- The constant of Hardy's inequalities for every exponent `q`: `(1 - 2^(-α))⁻¹` for +`1 ≤ q ≤ ∞` (`ENNReal.hardy_tail_le`, `ENNReal.hardy_sum_le`) and +`γ_{α,q} = (1 - 2^(-αq))^(-1/q)` for `q < 1` (`ENNReal.dyadicGeomConst`). -/ +noncomputable def hardyConst (α : ℝ) (q : ℝ≥0∞) : ℝ≥0∞ := + if 1 ≤ q then (1 - (2 : ℝ≥0∞) ^ (-α))⁻¹ else dyadicGeomConst α q + +/-- The constant `hardyConst α q` is finite for `α > 0`. -/ +theorem hardyConst_ne_top {α : ℝ} (hα : 0 < α) (q : ℝ≥0∞) : hardyConst α q ≠ ∞ := by + unfold hardyConst + split_ifs + · exact one_sub_two_rpow_neg_inv_ne_top hα + · exact dyadicGeomConst_ne_top hα q + +/-- **Hardy's inequality for tails, every exponent**: +`‖(2^(kα) ∑_{i ≥ 0} b (k + i))ₖ‖_q ≤ hardyConst α q · ‖(2^(kα) b k)ₖ‖_q` for every `q`, by +`ENNReal.hardy_tail_le` for `q ≥ 1` and `ENNReal.hardy_tail_le_of_le_one` for `q < 1`. -/ +theorem hardy_tail_le' (α : ℝ) (b : ℕ → ℝ≥0∞) : + lqNorm q (fun k => dyadicWeight α k * ∑' i, b (k + i)) ≤ + hardyConst α q * lqNorm q (fun k => dyadicWeight α k * b k) := by + unfold hardyConst + split_ifs with hq + · exact hardy_tail_le hq α b + · exact hardy_tail_le_of_le_one (not_le.1 hq).le α b + +/-- **Hardy's inequality for partial sums, every exponent**: +`‖(2^(-kα) ∑_{j ≤ k} b j)ₖ‖_q ≤ hardyConst α q · ‖(2^(-kα) b k)ₖ‖_q` for every `q`, by +`ENNReal.hardy_sum_le` for `q ≥ 1` and `ENNReal.hardy_sum_le_of_le_one` for `q < 1`. -/ +theorem hardy_sum_le' (α : ℝ) (b : ℕ → ℝ≥0∞) : + lqNorm q (fun k => dyadicWeight (-α) k * ∑ j ∈ range (k + 1), b j) ≤ + hardyConst α q * lqNorm q (fun k => dyadicWeight (-α) k * b k) := by + unfold hardyConst + split_ifs with hq + · exact hardy_sum_le hq α b + · exact hardy_sum_le_of_le_one (not_le.1 hq).le α b + +/-! ### Almost diagonal sums -/ + +/-- **An almost diagonal sum in weighted `ℓ_q`**: +`‖(2^(is) ∑_j c_{ij} a_j)_i‖_{ℓ_q} ≤ ((1 - 2^(-(L-s)))⁻¹ + (1 - 2^(-s))⁻¹) ‖(2^(js) a_j)_j‖_{ℓ_q}` +with `c_{ij} = 2^(-(i-j)L)` for `j ≤ i` and `c_{ij} = 1` for `j > i`, by Hardy's inequalities for +the sum below and the tail above the diagonal (finite for `0 < s < L`). -/ +theorem lqNorm_almostDiagonal_le (hq : 1 ≤ q) (s L : ℝ) (a : ℕ → ℝ≥0∞) : + lqNorm q (fun i => dyadicWeight s i * + ∑' j, (if j ≤ i then dyadicWeight (-L) (i - j) else 1) * a j) ≤ + ((1 - (2 : ℝ≥0∞) ^ (-(L - s)))⁻¹ + (1 - (2 : ℝ≥0∞) ^ (-s))⁻¹) * + lqNorm q (fun j => dyadicWeight s j * a j) := by + set X := lqNorm q (fun j => dyadicWeight s j * a j) + have hsplit : ∀ i, ∑' j, (if j ≤ i then dyadicWeight (-L) (i - j) else 1) * a j = + ∑ j ∈ Finset.range (i + 1), dyadicWeight (-L) (i - j) * a j + ∑' t, a (t + (i + 1)) := + fun i => by + rw [← Summable.sum_add_tsum_nat_add' (k := i + 1) CompleteLattice.summable] + congr 1 + · refine Finset.sum_congr rfl fun j hj => ?_ + have hji : j ≤ i := Nat.lt_succ_iff.1 (Finset.mem_range.1 hj) + simp only [hji, ↓reduceIte] + · refine tsum_congr fun t => ?_ + have hti : ¬(t + (i + 1) ≤ i) := by omega + simp only [hti, ↓reduceIte, one_mul] + have hP : lqNorm q (fun i => dyadicWeight s i * + ∑ j ∈ Finset.range (i + 1), dyadicWeight (-L) (i - j) * a j) ≤ + (1 - (2 : ℝ≥0∞) ^ (-(L - s)))⁻¹ * X := by + have h := ENNReal.hardy_sum_le hq (L - s) + (fun j => dyadicWeight (L - s) j * (dyadicWeight s j * a j)) + have h1 : (fun i => dyadicWeight s i * + ∑ j ∈ Finset.range (i + 1), dyadicWeight (-L) (i - j) * a j) = + fun i => dyadicWeight (-(L - s)) i * + ∑ j ∈ Finset.range (i + 1), dyadicWeight (L - s) j * (dyadicWeight s j * a j) := by + funext i + rw [Finset.mul_sum, Finset.mul_sum] + refine Finset.sum_congr rfl fun j hj => ?_ + have hL : dyadicWeight L j = dyadicWeight (L - s) j * dyadicWeight s j := by + rw [← dyadicWeight_add, sub_add_cancel] + rw [← mul_assoc, dyadicWeight_mul_dyadicWeight_neg_sub s L + (Nat.lt_succ_iff.1 (Finset.mem_range.1 hj)), hL] + ring + have h2 : (fun k => dyadicWeight (-(L - s)) k * + (dyadicWeight (L - s) k * (dyadicWeight s k * a k))) = fun k => dyadicWeight s k * a k := by + funext k + rw [← mul_assoc, ENNReal.dyadicWeight_neg_mul_self, one_mul] + rw [h1] + rw [h2] at h + exact h + have hT : lqNorm q (fun i => dyadicWeight s i * ∑' t, a (t + (i + 1))) ≤ + (1 - (2 : ℝ≥0∞) ^ (-s))⁻¹ * X := by + refine (ENNReal.lqNorm_mono fun i => ?_).trans (ENNReal.hardy_tail_le hq s a) + have hinj : Function.Injective fun t : ℕ => t + 1 := add_left_injective 1 + have htail : ∑' t, a (t + (i + 1)) ≤ ∑' n, a (i + n) := + calc ∑' t, a (t + (i + 1)) = ∑' t, (fun n => a (i + n)) (t + 1) := by + congr 1 + funext t + congr 1 + omega + _ ≤ ∑' n, a (i + n) := tsum_comp_le_tsum_of_injective hinj (fun n => a (i + n)) + exact mul_le_mul' le_rfl htail + calc lqNorm q (fun i => dyadicWeight s i * + ∑' j, (if j ≤ i then dyadicWeight (-L) (i - j) else 1) * a j) + = lqNorm q (fun i => dyadicWeight s i * + ∑ j ∈ Finset.range (i + 1), dyadicWeight (-L) (i - j) * a j + + dyadicWeight s i * ∑' t, a (t + (i + 1))) := by + congr 1 + funext i + rw [hsplit i, mul_add] + _ ≤ lqNorm q (fun i => dyadicWeight s i * + ∑ j ∈ Finset.range (i + 1), dyadicWeight (-L) (i - j) * a j) + + lqNorm q (fun i => dyadicWeight s i * ∑' t, a (t + (i + 1))) := + ENNReal.lqNorm_add_le hq _ _ + _ ≤ (1 - (2 : ℝ≥0∞) ^ (-(L - s)))⁻¹ * X + (1 - (2 : ℝ≥0∞) ^ (-s))⁻¹ * X := add_le_add hP hT + _ = _ := by ring + +/-- The constant `(1 - 2^(-(L-s)))⁻¹ + (1 - 2^(-s))⁻¹` of the almost diagonal estimate in `ℓ_q` +(`ENNReal.lqNorm_almostDiagonal_le`). -/ +noncomputable def almostDiagonalConst (s L : ℝ) : ℝ≥0∞ := + (1 - (2 : ℝ≥0∞) ^ (-(L - s)))⁻¹ + (1 - (2 : ℝ≥0∞) ^ (-s))⁻¹ + +/-- The constant of the almost diagonal estimate is finite for `0 < s < L`. -/ +theorem almostDiagonalConst_ne_top {s L : ℝ} (hs : 0 < s) (hsL : s < L) : + ENNReal.almostDiagonalConst s L ≠ ∞ := + add_ne_top.2 ⟨one_sub_two_rpow_neg_inv_ne_top (sub_pos.2 hsL), + one_sub_two_rpow_neg_inv_ne_top hs⟩ + +/-- **An almost diagonal sum in weighted `ℓ_q`, `0 < q ≤ 1`**: with `c_{ij} = 2^(-(i-j)L)` for +`j ≤ i` and `c_{ij} = 1` for `j > i`, +`‖(2^(is) ∑_j c_{ij} a_j)_i‖_{ℓ_q} ≤ A_{sq,Lq}^(1/q) ‖(2^(js) a_j)_j‖_{ℓ_q}` with +`A_{s,L} = ENNReal.almostDiagonalConst s L`, finite for `0 < s < L`; for `q = 0` both sides are +the degenerate value `0`. The `q`-th power of the inner series is at most `∑_j c_{ij}^q a_j^q` +(`ENNReal.rpow_tsum_le_tsum_rpow`), and `c_{ij}^q` is the coefficient of the exponent `Lq`, so +the estimate for `ℓ_1` with the exponents `sq` and `Lq` (`ENNReal.lqNorm_almostDiagonal_le`) +applies to `(a_j^q)_j`. -/ +theorem lqNorm_almostDiagonal_le_of_le_one (hq1 : q ≤ 1) (s L : ℝ) (a : ℕ → ℝ≥0∞) : + lqNorm q (fun i => dyadicWeight s i * + ∑' j, (if j ≤ i then dyadicWeight (-L) (i - j) else 1) * a j) ≤ + almostDiagonalConst (s * q.toReal) (L * q.toReal) ^ (1 / q.toReal) * + lqNorm q (fun j => dyadicWeight s j * a j) := by + rcases eq_or_ne q 0 with rfl | hq0 + · simp + obtain ⟨hp, hp1⟩ := toReal_mem_Ioc_of_le_one hq0 hq1 + refine lqNorm_le_rpow_mul_of_tsum_rpow_le (ne_top_of_le_ne_top one_ne_top hq1) ?_ + set p := q.toReal + have hc : ∀ i j, (if j ≤ i then dyadicWeight (-L) (i - j) else 1) ^ p = + if j ≤ i then dyadicWeight (-(L * p)) (i - j) else 1 := fun i j => by + split_ifs + · rw [dyadicWeight_rpow, neg_mul] + · exact one_rpow p + calc ∑' i, (dyadicWeight s i * ∑' j, (if j ≤ i then dyadicWeight (-L) (i - j) else 1) * a j) ^ p + ≤ ∑' i, dyadicWeight (s * p) i * + ∑' j, (if j ≤ i then dyadicWeight (-(L * p)) (i - j) else 1) * a j ^ p := + tsum_le_tsum fun i => by + rw [mul_rpow_of_nonneg _ _ hp.le, dyadicWeight_rpow] + gcongr + refine (rpow_tsum_le_tsum_rpow _ hp hp1).trans_eq (tsum_congr fun j => ?_) + rw [mul_rpow_of_nonneg _ _ hp.le, hc] + _ = lqNorm 1 (fun i => dyadicWeight (s * p) i * + ∑' j, (if j ≤ i then dyadicWeight (-(L * p)) (i - j) else 1) * a j ^ p) := + (lqNorm_one _).symm + _ ≤ almostDiagonalConst (s * p) (L * p) * + lqNorm 1 (fun j => dyadicWeight (s * p) j * a j ^ p) := + lqNorm_almostDiagonal_le le_rfl (s * p) (L * p) (fun j => a j ^ p) + _ = almostDiagonalConst (s * p) (L * p) * ∑' j, (dyadicWeight s j * a j) ^ p := by + rw [lqNorm_one] + congr 1 + refine tsum_congr fun j => ?_ + rw [mul_rpow_of_nonneg _ _ hp.le, dyadicWeight_rpow] + +/-- **The almost diagonal step at one point**: if `a_j ≤ C ∑_i c_{ji} m_i` for every `j`, with +`c_{ji} = 2^(-(j-i)L)` for `i ≤ j` and `c_{ji} = 1` for `i > j`, then for `1 ≤ q ≤ ∞`, +`‖(2^(js) a_j)_j‖_{ℓ_q} ≤ C A_{s,L} ‖(2^(is) m_i)_i‖_{ℓ_q}` with +`A_{s,L} = ENNReal.almostDiagonalConst s L`. -/ +theorem lqNorm_le_almostDiagonalConst_mul_of_le {q : ℝ≥0∞} (hq : 1 ≤ q) (s L : ℝ) {C : ℝ≥0∞} + {a m : ℕ → ℝ≥0∞} + (h : ∀ j, a j ≤ C * ∑' i, (if i ≤ j then dyadicWeight (-L) (j - i) else 1) * m i) : + lqNorm q (fun j => dyadicWeight s j * a j) ≤ + C * ENNReal.almostDiagonalConst s L * lqNorm q (fun i => dyadicWeight s i * m i) := by + calc lqNorm q (fun j => dyadicWeight s j * a j) + ≤ lqNorm q (fun j => C * (dyadicWeight s j * + ∑' i, (if i ≤ j then dyadicWeight (-L) (j - i) else 1) * m i)) := + lqNorm_mono fun j => by + rw [mul_left_comm] + gcongr + exact h j + _ = C * lqNorm q (fun j => dyadicWeight s j * + ∑' i, (if i ≤ j then dyadicWeight (-L) (j - i) else 1) * m i) := + lqNorm_const_mul _ _ + _ ≤ C * (ENNReal.almostDiagonalConst s L * lqNorm q (fun i => dyadicWeight s i * m i)) := by + gcongr + exact lqNorm_almostDiagonal_le hq s L m + _ = _ := by rw [mul_assoc] + +/-! ### Sequences on `ℤ` -/ + +/-- The geometric series without its first term is at most the full series: +`∑_{j ≥ 0} 2^(-(j+1)α) ≤ (1 - 2^(-α))⁻¹` for every real `α`. -/ +theorem tsum_dyadicWeight_neg_succ_le (α : ℝ) : + ∑' j : ℕ, dyadicWeight (-α) (j + 1) ≤ (1 - (2 : ℝ≥0∞) ^ (-α))⁻¹ := + (tsum_comp_le_tsum_of_injective (add_left_injective 1) (dyadicWeight (-α))).trans_eq + (tsum_dyadicWeight_neg α) + +/-- **A series over `ℤ` split at `m`**: +`∑_{n ∈ ℤ} f n = ∑_{j ≥ 0} f(m + j) + ∑_{j ≥ 0} f(m - (j+1))`, the terms with `n ≥ m` and those +with `n < m` (Mathlib's `tsum_of_nat_of_neg_add_one` after the shift `n ↦ m + n`). -/ +theorem tsum_int_eq_tsum_add_tsum_sub (m : ℤ) (f : ℤ → ℝ≥0∞) : + ∑' n, f n = ∑' j : ℕ, f (m + j) + ∑' j : ℕ, f (m - (j + 1)) := by + rw [← (Equiv.addLeft m).tsum_eq f, + tsum_of_nat_of_neg_add_one CompleteLattice.summable CompleteLattice.summable] + simp only [Equiv.coe_addLeft, ← sub_eq_add_neg] + +/-- **The `ℓ_q` norm on `ℤ` is shift invariant**: `‖(a(k + i))_k‖_{ℓ_q} = ‖a‖_{ℓ_q}` for every +`a : ℤ → [0, ∞]`, every `i ∈ ℤ` and every exponent `q`, since `k ↦ k + i` is a bijection of `ℤ` +(`lqNorm_comp_equiv` for Mathlib's `Equiv.addRight`). -/ +theorem lqNorm_comp_add_int (q : ℝ≥0∞) (a : ℤ → ℝ≥0∞) (i : ℤ) : + lqNorm q (fun k : ℤ => a (k + i)) = lqNorm q a := + lqNorm_comp_equiv (Equiv.addRight i) a + +/-- **Young's inequality for a series of shifts on `ℤ`**: for weights `w_j ≥ 0`, shifts +`s_j ∈ ℤ` and `1 ≤ q ≤ ∞`, `‖(∑_j w_j c_{m + s_j})_{m ∈ ℤ}‖_{ℓ_q} ≤ (∑_j w_j) ‖c‖_{ℓ_q}`, by the +countable Minkowski inequality and the invariance of the norm under shifts. -/ +theorem lqNorm_tsum_shift_le (hq : 1 ≤ q) (w : ℕ → ℝ≥0∞) (s : ℕ → ℤ) (c : ℤ → ℝ≥0∞) : + lqNorm q (fun m => ∑' j, w j * c (m + s j)) ≤ (∑' j, w j) * lqNorm q c := + calc lqNorm q (fun m => ∑' j, w j * c (m + s j)) + ≤ ∑' j, lqNorm q (fun m => w j * c (m + s j)) := + lqNorm_tsum_le hq fun j m => w j * c (m + s j) + _ = ∑' j, w j * lqNorm q c := by + congr 1 + funext j + rw [lqNorm_const_mul, lqNorm_comp_add_int] + _ = (∑' j, w j) * lqNorm q c := ENNReal.tsum_mul_right + +/-- **The geometric convolution from below on `ℤ`**: for `1 ≤ q ≤ ∞` and every real `α`, +`‖(∑_{j ≥ 0} 2^(-(j+1)α) c_{m-(j+1)})_{m ∈ ℤ}‖_{ℓ_q} ≤ (1 - 2^(-α))⁻¹ ‖c‖_{ℓ_q}`. -/ +theorem lqNorm_tsum_geom_sub_le (hq : 1 ≤ q) (α : ℝ) (c : ℤ → ℝ≥0∞) : + lqNorm q (fun m => ∑' j : ℕ, dyadicWeight (-α) (j + 1) * c (m - (j + 1))) ≤ + (1 - (2 : ℝ≥0∞) ^ (-α))⁻¹ * lqNorm q c := by + have h := lqNorm_tsum_shift_le hq (fun j => dyadicWeight (-α) (j + 1)) + (fun j => -((j : ℤ) + 1)) c + simp only [← sub_eq_add_neg] at h + exact h.trans (by gcongr; exact tsum_dyadicWeight_neg_succ_le α) + +/-- **The geometric convolution from above on `ℤ`**: for `1 ≤ q ≤ ∞` and every real `α`, +`‖(∑_{j ≥ 0} 2^(-jα) c_{m+j})_{m ∈ ℤ}‖_{ℓ_q} ≤ (1 - 2^(-α))⁻¹ ‖c‖_{ℓ_q}`. -/ +theorem lqNorm_tsum_geom_add_le (hq : 1 ≤ q) (α : ℝ) (c : ℤ → ℝ≥0∞) : + lqNorm q (fun m => ∑' j : ℕ, dyadicWeight (-α) j * c (m + j)) ≤ + (1 - (2 : ℝ≥0∞) ^ (-α))⁻¹ * lqNorm q c := + (lqNorm_tsum_shift_le hq (dyadicWeight (-α)) (fun j => (j : ℤ)) c).trans_eq + (by rw [tsum_dyadicWeight_neg]) + +end ENNReal diff --git a/LeanPool/FunctionSpaces/ApproximationSpaces/Sequences/Lq.lean b/LeanPool/FunctionSpaces/ApproximationSpaces/Sequences/Lq.lean new file mode 100644 index 0000000000..ade171a2bc --- /dev/null +++ b/LeanPool/FunctionSpaces/ApproximationSpaces/Sequences/Lq.lean @@ -0,0 +1,1408 @@ +/- +Copyright (c) 2026 Mario Ullrich. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Mario Ullrich +-/ +module + +public import Mathlib.MeasureTheory.Function.LpSeminorm.Count +public import Mathlib.MeasureTheory.Function.LpSeminorm.SMul +public import Mathlib.MeasureTheory.Function.LpSeminorm.TriangleInequality +public import Mathlib.MeasureTheory.Integral.Lebesgue.Countable +public import Mathlib.Analysis.Normed.Lp.lpSpace +public import Mathlib.Analysis.SpecificLimits.Basic + +/- +Modified for Lean Pool: module names and imports adapted. +-/ + +/-! +# `ℓ_q` norms of sequences in `ℝ≥0∞` + +For a sequence `a : ℕ → ℝ≥0∞` and `q ∈ (0, ∞]`, + +`lqNorm q a = (∑ₙ a n ^ q) ^ (1/q)` for `q < ∞`, `lqNorm ∞ a = supₙ a n`. + +**Why `ℝ≥0∞` and why `eLpNorm`.** All quasi-norms of approximation spaces are `ℓ_q` norms of +nonnegative sequences. In `ℝ≥0∞` every series has a value, possibly `∞`, so no summability +side conditions appear, and membership in a space becomes the statement `lqNorm q a < ∞`. +This is Mathlib's own design for `L_p` (`MeasureTheory.eLpNorm`, `MeasureTheory.MemLp`). The +definition is literally `eLpNorm a q Measure.count`, the `L_q` norm for the counting measure +on `ℕ`, so Minkowski's inequality (`MeasureTheory.eLpNorm_add_le`) and monotonicity come for +free from Mathlib. The alternative, Mathlib's normed space `lp`, would require summability +proofs for every sequence that enters. + +**Sums of powers.** The file opens with the comparison of a sum of powers with the power of the +sum in `[0, ∞]`: `∑_{i ∈ s} f_i^p ≤ (∑_{i ∈ s} f_i)^p` for `p ≥ 1`, the decrease of +`(∑_{i ∈ s} f_i^p)^(1/p)` in `p`, and `(∑_{i ∈ s} f_i)^p ≤ ∑_{i ∈ s} f_i^p` for `0 < p ≤ 1` +(`ENNReal.sum_rpow_le_rpow_sum`, `ENNReal.rpow_sum_rpow_le`, `ENNReal.rpow_sum_le_sum_rpow`). +These three are a copy of Mathlib PR #44783; delete them when the project's Mathlib has it. The +series form `(∑_i f_i)^p ≤ ∑_i f_i^p` for `0 < p ≤ 1` (`ENNReal.rpow_tsum_le_tsum_rpow`) bounds +the `q`-th power of an inner series by the series of the `q`-th powers for `q ≤ 1`, so that +estimates for `ℓ_1` transfer to `ℓ_q` (`ENNReal.lqNorm_le_rpow_mul_of_tsum_rpow_le`); it also +gives the decrease of `(∑_i f_i^p)^(1/p)` in `p` for series over any index set +(`ENNReal.rpow_tsum_rpow_le`). + +**Exponents below `1`.** For `0 < q < 1` the `ℓ_q` norm satisfies only the quasi-triangle +inequality `‖a + b‖_q ≤ C_q (‖a‖_q + ‖b‖_q)` with Mathlib's constant `C_q = LpAddConst q` +(`ENNReal.lqNorm_add_le'`, `ENNReal.lqNorm_le_head_add_shift'`); `C_q = 2^(1/q - 1)` for +`0 < q < 1` and `C_q = 1` otherwise, with `1 ≤ C_q`, `2^(1/q) ≤ 2 C_q` and +`(x^q + y^q)^(1/q) ≤ C_q (x + y)` (`ENNReal.one_le_LpAddConst`, +`ENNReal.two_rpow_one_div_le_two_mul_LpAddConst`, `ENNReal.rpow_add_rpow_le_LpAddConst_mul`). +On any measure space the `p`-th power of the `L_p` quasi-norm, `0 < p ≤ 1`, is subadditive, +`‖f + g‖_p^p ≤ ‖f‖_p^p + ‖g‖_p^p` (`MeasureTheory.eLpNorm_add_rpow_le_of_le_one`), so sums of +many terms are estimated in the `p`-th power with constant `1`. + +The file adds what Mathlib lacks: the explicit formulas, homogeneity for `ℝ≥0∞` scalars, +**monotonicity in `q`** (`lqNorm r a ≤ lqNorm q a` for `0 < q ≤ r`; Mathlib has only the +inclusion `lp.monotone`, without the norm bound), the Cauchy–Schwarz inequality +`∑_k a_k b_k ≤ ‖a‖_{ℓ_2} ‖b‖_{ℓ_2}` for series and for finite sums +(`ENNReal.lqNorm_one_mul_le`, `ENNReal.sum_mul_le_lqNorm_two_mul`), the splitting off of the +first term, also with dyadic weights (`ENNReal.lqNorm_dyadicWeight_le_of_head_of_succ_le`), tails +of sequences (`ENNReal.lqNorm_ite_le_eq`), sequences with one nonzero term +(`ENNReal.lqNorm_ite_eq`), reindexing along bijections and injections +(`ENNReal.lqNorm_comp_equiv`, `ENNReal.lqNorm_extend_zero`), the `ℓ_q` norm of the geometric +sequence for every `q` (`ENNReal.dyadicGeomConst`, which is `1` for `q = ∞`, +`ENNReal.dyadicGeomConst_top`), and the **dyadic weights** +`dyadicWeight s k = 2 ^ (k s)` that every approximation space uses, with the identity +`2^(ks) 2^(-(k-j)σ) = 2^(-k(σ-s)) 2^(jσ)` of almost diagonal estimates +(`ENNReal.dyadicWeight_mul_dyadicWeight_neg_sub`), the bound `2^(-(n-2)θ) ≤ 2^(2θ) 2^(-nθ)` for +truncated subtraction and `θ ≥ 0` (`ENNReal.dyadicWeight_neg_sub_two_le`), the bound +`2^{js} ≤ 2^{c|s|} 2^{ks}` for `|j - k| ≤ c` (`ENNReal.dyadicWeight_le_of_mem_Icc`), the weights +of integer order (`ENNReal.dyadicWeight_natCast`), and the powers of two `2^s ≠ ∞`, `1 ≤ 2^s` +for `s ≥ 0` (`ENNReal.two_rpow_ne_top`, `ENNReal.one_le_two_rpow`), `2^((k : ℤ) : ℝ) = 2^k` +(`ENNReal.two_rpow_intCast_natCast`) and `(ρ 2^(-j))^b = ρ^b 2^(-jb)` +(`ENNReal.ofReal_div_two_pow_rpow`). Three inequalities in `[0, ∞]`, +`a x + b y ≤ (a + b)(x + y)`, `∑_i a_i b_i ≤ (∑_i a_i)(∑_i b_i)` and +`x_0 + ∑_{j simp [zero_rpow_of_pos (zero_lt_one.trans_le hp1)] + | insert i s hi ih => + rw [Finset.sum_insert hi, Finset.sum_insert hi] + exact (add_le_add le_rfl ih).trans (add_rpow_le_rpow_add _ _ hp1) + +/-- **The finite `ℓ_p` sums decrease in `p`**: +`(∑_{i ∈ s} f_i^q)^(1/q) ≤ (∑_{i ∈ s} f_i^p)^(1/p)` for `0 < p ≤ q`, every finite set `s` and every +family `f` in `[0, ∞]`. Write `f_i^q = (f_i^p)^(q/p)` with `q/p ≥ 1` and apply +`ENNReal.sum_rpow_le_rpow_sum`; this is the finite form of Mathlib's `ENNReal.rpow_add_rpow_le`. -/ +theorem rpow_sum_rpow_le (s : Finset ι) (f : ι → ℝ≥0∞) {p q : ℝ} (hp_pos : 0 < p) (hpq : p ≤ q) : + (∑ i ∈ s, f i ^ q) ^ (1 / q) ≤ (∑ i ∈ s, f i ^ p) ^ (1 / p) := by + have hq_pos : 0 < q := hp_pos.trans_le hpq + have h_rpow : ∀ i ∈ s, f i ^ q = (f i ^ p) ^ (q / p) := fun i _ => by + rw [← ENNReal.rpow_mul, mul_div_cancel₀ _ hp_pos.ne'] + have h_sum : ∑ i ∈ s, (f i ^ p) ^ (q / p) ≤ (∑ i ∈ s, f i ^ p) ^ (q / p) := + sum_rpow_le_rpow_sum s (fun i => f i ^ p) ((one_le_div hp_pos).2 hpq) + rw [Finset.sum_congr rfl h_rpow] + calc (∑ i ∈ s, (f i ^ p) ^ (q / p)) ^ (1 / q) + ≤ ((∑ i ∈ s, f i ^ p) ^ (q / p)) ^ (1 / q) := rpow_le_rpow h_sum (by positivity) + _ = (∑ i ∈ s, f i ^ p) ^ (1 / p) := by + rw [← ENNReal.rpow_mul] + congr 1 + field_simp + +/-- **Subadditivity of `x ↦ x^p` for `0 < p ≤ 1`**: `(∑_{i ∈ s} f_i)^p ≤ ∑_{i ∈ s} f_i^p` for every +finite set `s` and every family `f` in `[0, ∞]` (Mathlib's `Finset.le_sum_of_subadditive` for the +case of two terms, `ENNReal.rpow_add_le_add_rpow`). -/ +theorem rpow_sum_le_sum_rpow (s : Finset ι) (f : ι → ℝ≥0∞) {p : ℝ} (hp_pos : 0 < p) + (hp1 : p ≤ 1) : (∑ i ∈ s, f i) ^ p ≤ ∑ i ∈ s, f i ^ p := + Finset.le_sum_of_subadditive (fun x : ℝ≥0∞ => x ^ p) (zero_rpow_of_pos hp_pos).le + (fun x y => rpow_add_le_add_rpow x y hp_pos.le hp1) s f + +/-- **Subadditivity of `x ↦ x^p` for series**, `0 < p ≤ 1`: `(∑_i f_i)^p ≤ ∑_i f_i^p` for every +family `f` in `[0, ∞]`. A series is the supremum of its finite partial sums +(`tsum_eq_iSup_sum`), the power `x ↦ x^p` commutes with suprema +(`ENNReal.orderIsoRpow`), and `ENNReal.rpow_sum_le_sum_rpow` bounds each partial sum. -/ +theorem rpow_tsum_le_tsum_rpow (f : ι → ℝ≥0∞) {p : ℝ} (hp_pos : 0 < p) (hp1 : p ≤ 1) : + (∑' i, f i) ^ p ≤ ∑' i, f i ^ p := by + rw [tsum_eq_iSup_sum] + calc (⨆ s : Finset ι, ∑ i ∈ s, f i) ^ p = ⨆ s : Finset ι, (∑ i ∈ s, f i) ^ p := + (orderIsoRpow p hp_pos).map_iSup _ + _ ≤ ⨆ s : Finset ι, ∑ i ∈ s, f i ^ p := + iSup_mono fun s => rpow_sum_le_sum_rpow s f hp_pos hp1 + _ = ∑' i, f i ^ p := tsum_eq_iSup_sum.symm + +/-- **The `ℓ_p` sums of a series decrease in `p`**: `(∑_i f_i^q)^(1/q) ≤ (∑_i f_i^p)^(1/p)` for +`0 < p ≤ q` and every family `f` in `[0, ∞]` on any index set, so `‖f‖_{ℓ_q} ≤ ‖f‖_{ℓ_p}`; for a +countable index set this is `ENNReal.lqNorm_le_lqNorm_of_le`, the same bound for `ENNReal.lqNorm`. +The subadditivity `ENNReal.rpow_tsum_le_tsum_rpow` with the exponent `p/q ≤ 1`, applied to the +family `f_i^q`, gives `(∑_i f_i^q)^(p/q) ≤ ∑_i f_i^p`; this is the series form of +`ENNReal.rpow_sum_rpow_le`. -/ +theorem rpow_tsum_rpow_le (f : ι → ℝ≥0∞) {p q : ℝ} (hp_pos : 0 < p) (hpq : p ≤ q) : + (∑' i, f i ^ q) ^ (1 / q) ≤ (∑' i, f i ^ p) ^ (1 / p) := by + have hq_pos : 0 < q := hp_pos.trans_le hpq + have h := rpow_tsum_le_tsum_rpow (fun i => f i ^ q) (div_pos hp_pos hq_pos) + ((div_le_one hq_pos).2 hpq) + have hfi : ∀ i, (f i ^ q) ^ (p / q) = f i ^ p := fun i => by + rw [← ENNReal.rpow_mul, mul_div_cancel₀ _ hq_pos.ne'] + simp_rw [hfi] at h + calc (∑' i, f i ^ q) ^ (1 / q) = ((∑' i, f i ^ q) ^ (p / q)) ^ (1 / p) := by + rw [← ENNReal.rpow_mul] + congr 1 + field_simp + _ ≤ (∑' i, f i ^ p) ^ (1 / p) := rpow_le_rpow h (by positivity) + +end PowerSums + +/-- The **`ℓ_q` norm** of a family `a : ι → [0, ∞]`: `(∑_i a_i ^ q) ^ (1/q)` for `q < ∞` and +`sup_i a_i` for `q = ∞`, defined as the `L_q` norm for the counting measure. The index set is `ℕ` +for sequences, `ℕ^d` for the spaces of dominating mixed smoothness and a finite set for the +coefficients of one level of atoms or wavelets; the general lemmas hold for every countable `ι` +with measurable singletons. -/ +noncomputable def lqNorm {ι : Type*} [MeasurableSpace ι] (q : ℝ≥0∞) (a : ι → ℝ≥0∞) : ℝ≥0∞ := + eLpNorm a q Measure.count + +section Generic + +variable {ι : Type*} [MeasurableSpace ι] [Countable ι] [MeasurableSingletonClass ι] + {q r : ℝ≥0∞} {a b : ι → ℝ≥0∞} + +/-- Every sequence is measurable for the counting measure; this is the side condition of the +Mathlib lemmas on `eLpNorm`. -/ +theorem aestronglyMeasurable_count (a : ι → ℝ≥0∞) : AEStronglyMeasurable a Measure.count := + (measurable_of_countable a).aestronglyMeasurable + +/-- `‖a‖_{ℓ_∞} = sup_n a_n`. -/ +theorem lqNorm_top (a : ι → ℝ≥0∞) : lqNorm ∞ a = ⨆ n, a n := by + simp [lqNorm, eLpNorm_exponent_top (aestronglyMeasurable_count a)] + +/-- `‖a‖_{ℓ_q} = (∑_n a_n^q)^(1/q)` for `0 < q < ∞`. -/ +theorem lqNorm_eq_tsum (hq0 : q ≠ 0) (hq : q ≠ ∞) (a : ι → ℝ≥0∞) : + lqNorm q a = (∑' n, a n ^ q.toReal) ^ (1 / q.toReal) := by + rw [lqNorm, eLpNorm_eq_lintegral_rpow_eNorm_toReal hq0 hq (aestronglyMeasurable_count a), + lintegral_count] + rfl + +/-- `‖a‖_{ℓ_1} = ∑_n a_n`. -/ +theorem lqNorm_one (a : ι → ℝ≥0∞) : lqNorm 1 a = ∑' n, a n := by + simp [lqNorm_eq_tsum one_ne_zero one_ne_top] + +/-- For `1 ≤ q < ∞` the exponent `q.toReal` is at least `1`. -/ +theorem one_le_toReal_of_one_le (hq : 1 ≤ q) (hq' : q ≠ ∞) : 1 ≤ q.toReal := by + simpa using ENNReal.toReal_mono hq' hq + +/-- `a^r = a · a^(r-1)` in `[0, ∞]` for `r ≥ 1`. -/ +theorem rpow_eq_mul_rpow_sub_one (a : ℝ≥0∞) {r : ℝ} (hr : 1 ≤ r) : + a ^ r = a * a ^ (r - 1) := by + calc a ^ r = a ^ ((1 : ℝ) + (r - 1)) := by ring_nf + _ = a ^ (1 : ℝ) * a ^ (r - 1) := ENNReal.rpow_add_of_nonneg _ _ zero_le_one (by linarith) + _ = a * a ^ (r - 1) := by rw [ENNReal.rpow_one] + +/-- An exponent `1 < p < ∞` in `[0, ∞]` has real value `p.toReal > 1`. -/ +theorem one_lt_toReal {p : ℝ≥0∞} (hp1 : 1 < p) (hp : p ≠ ∞) : 1 < p.toReal := by + simpa using (ENNReal.toReal_lt_toReal ENNReal.one_ne_top hp).2 hp1 + +/-- An exponent `0 < q ≤ 1` in `[0, ∞]` has real value `q.toReal ∈ (0, 1]`. -/ +theorem toReal_mem_Ioc_of_le_one (hq0 : q ≠ 0) (hq1 : q ≤ 1) : q.toReal ∈ Set.Ioc 0 1 := + ⟨ENNReal.toReal_pos hq0 (ne_top_of_le_ne_top one_ne_top hq1), + by simpa using ENNReal.toReal_mono one_ne_top hq1⟩ + +/-- The `q`-th power of the norm is the sum of the `q`-th powers. -/ +theorem lqNorm_rpow (hq0 : q ≠ 0) (hq : q ≠ ∞) (a : ι → ℝ≥0∞) : + lqNorm q a ^ q.toReal = ∑' n, a n ^ q.toReal := by + have hp : q.toReal ≠ 0 := (ENNReal.toReal_pos hq0 hq).ne' + rw [lqNorm_eq_tsum hq0 hq, one_div, ENNReal.rpow_inv_rpow hp] + +/-- **The square of the `ℓ_2` norm** is the sum of the squares: +`‖a‖_{ℓ_2}² = ∑_i a_i²` (`ENNReal.lqNorm_rpow` with `q = 2`, natural exponent). -/ +theorem lqNorm_two_sq (a : ι → ℝ≥0∞) : lqNorm 2 a ^ 2 = ∑' i, a i ^ 2 := by + have h := lqNorm_rpow two_ne_zero ofNat_ne_top a + simpa only [toReal_ofNat, rpow_two] using h + +/-- **The Cauchy–Schwarz inequality for nonnegative sequences**: +`∑_k a_k b_k ≤ ‖a‖_{ℓ_2} ‖b‖_{ℓ_2}` for families `a, b` in `[0, ∞]` indexed by a countable set +(Mathlib's `ENNReal.lintegral_mul_le_Lp_mul_Lq` for the counting measure). -/ +theorem lqNorm_one_mul_le (a b : ι → ℝ≥0∞) : + lqNorm 1 (fun k => a k * b k) ≤ lqNorm 2 a * lqNorm 2 b := by + have h := ENNReal.lintegral_mul_le_Lp_mul_Lq (Measure.count : Measure ι) + Real.HolderConjugate.two_two (measurable_of_countable a).aemeasurable + (measurable_of_countable b).aemeasurable + rw [lqNorm_one, lqNorm_eq_tsum two_ne_zero ofNat_ne_top, lqNorm_eq_tsum two_ne_zero ofNat_ne_top] + simpa [lintegral_count] using h + +/-- **The Cauchy–Schwarz inequality for finite sums against `ℓ_2` norms**: +`∑_{j ∈ s} a_j b_j ≤ ‖a‖_{ℓ_2} ‖b‖_{ℓ_2}` for every finite set `s` and all families `a, b` in +`[0, ∞]` indexed by a countable set: a finite sum is at most the series +(`sum_le_tsum`), which is the `ℓ_1` norm of the products (`ENNReal.lqNorm_one`), and +`ENNReal.lqNorm_one_mul_le` bounds that. -/ +theorem sum_mul_le_lqNorm_two_mul (s : Finset ι) (a b : ι → ℝ≥0∞) : + ∑ j ∈ s, a j * b j ≤ lqNorm 2 a * lqNorm 2 b := + (sum_le_tsum s).trans ((lqNorm_one _).symm.trans_le (lqNorm_one_mul_le a b)) + +omit [Countable ι] [MeasurableSingletonClass ι] in +/-- The zero family has norm `0`. -/ +@[simp] +theorem lqNorm_zero_right (q : ℝ≥0∞) : lqNorm q (fun _ : ι => (0 : ℝ≥0∞)) = 0 := eLpNorm_fun_zero + +/-- The exponent `0` is degenerate: `eLpNorm` assigns it the value `0`. The statements below +that hold only for genuine exponents carry a hypothesis `q ≠ 0` or `1 ≤ q`; the others hold for +every `q`. -/ +@[simp] +theorem lqNorm_zero_left (a : ι → ℝ≥0∞) : lqNorm 0 a = 0 := + eLpNorm_exponent_zero (aestronglyMeasurable_count a) + +omit [Countable ι] in +/-- Every term is bounded by the norm. -/ +theorem le_lqNorm (hq : q ≠ 0) (a : ι → ℝ≥0∞) (n : ι) : a n ≤ lqNorm q a := + eNorm_le_eLpNorm_count a n hq + +/-- The `ℓ_q` norm is monotone in the sequence. -/ +theorem lqNorm_mono (h : ∀ n, a n ≤ b n) : lqNorm q a ≤ lqNorm q b := + eLpNorm_mono_eNorm (aestronglyMeasurable_count a) h + +omit [Countable ι] [MeasurableSingletonClass ι] in +/-- **Minkowski's inequality** for `ℓ_q`, `1 ≤ q ≤ ∞`. -/ +theorem lqNorm_add_le (hq : 1 ≤ q) (a b : ι → ℝ≥0∞) : + lqNorm q (fun n => a n + b n) ≤ lqNorm q a + lqNorm q b := + eLpNorm_add_le (f := a) (g := b) hq + +omit [Countable ι] [MeasurableSingletonClass ι] in +/-- **The quasi-triangle inequality** for `ℓ_q`, every `q ∈ [0, ∞]`: +`‖a + b‖_q ≤ C_q (‖a‖_q + ‖b‖_q)` with Mathlib's constant `C_q = LpAddConst q`, which is +`2^(1/q - 1)` for `0 < q < 1` and `1` otherwise (`MeasureTheory.eLpNorm_add_le'` for the counting +measure). -/ +theorem lqNorm_add_le' (q : ℝ≥0∞) (a b : ι → ℝ≥0∞) : + lqNorm q (fun n => a n + b n) ≤ LpAddConst q * (lqNorm q a + lqNorm q b) := + eLpNorm_add_le' (f := a) (g := b) q + +/-- **Homogeneity**: `‖c a‖_q = c ‖a‖_q` for every `c ∈ ℝ≥0∞`. -/ +theorem lqNorm_const_mul (c : ℝ≥0∞) (a : ι → ℝ≥0∞) : + lqNorm q (fun n => c * a n) = c * lqNorm q a := by + rcases eq_or_ne q 0 with rfl | hq0 + · simp + rcases eq_or_ne q ∞ with rfl | hq + · rw [lqNorm_top, lqNorm_top, ENNReal.mul_iSup] + have hp : 0 < q.toReal := ENNReal.toReal_pos hq0 hq + rw [lqNorm_eq_tsum hq0 hq, lqNorm_eq_tsum hq0 hq] + simp_rw [ENNReal.mul_rpow_of_nonneg _ _ hp.le] + rw [ENNReal.tsum_mul_left, ENNReal.mul_rpow_of_nonneg _ _ (by positivity), ← ENNReal.rpow_mul, + mul_one_div_cancel hp.ne', ENNReal.rpow_one] + +/-- **Comparable sequences have finite `ℓ_q` norms together**: if `a ≤ M b` and `b ≤ K a` with +finite `K, M`, then `‖a‖_q < ∞ ↔ ‖b‖_q < ∞`. -/ +theorem lqNorm_lt_top_iff_of_le_mul {a b : ι → ℝ≥0∞} {K M : ℝ≥0∞} (hK : K ≠ ∞) (hM : M ≠ ∞) + (hab : ∀ n, a n ≤ M * b n) (hba : ∀ n, b n ≤ K * a n) : + lqNorm q a < ∞ ↔ lqNorm q b < ∞ := by + constructor + · intro h + calc lqNorm q b ≤ lqNorm q (fun n => K * a n) := lqNorm_mono hba + _ = K * lqNorm q a := lqNorm_const_mul K a + _ < ∞ := ENNReal.mul_lt_top hK.lt_top h + · intro h + calc lqNorm q a ≤ lqNorm q (fun n => M * b n) := lqNorm_mono hab + _ = M * lqNorm q b := lqNorm_const_mul M b + _ < ∞ := ENNReal.mul_lt_top hM.lt_top h + +/-- **Monotonicity in the exponent**: for `0 < q ≤ r`, `‖a‖_r ≤ ‖a‖_q`, also for exponents below +`1`. For `r = ∞` every term is at most `‖a‖_q`; for `r < ∞` this is the decrease of the `ℓ_p` +sums of a series in `p` (`ENNReal.rpow_tsum_rpow_le`). -/ +theorem lqNorm_le_lqNorm_of_le (hq0 : q ≠ 0) (hqr : q ≤ r) (a : ι → ℝ≥0∞) : + lqNorm r a ≤ lqNorm q a := by + rcases eq_or_ne r ∞ with rfl | hr + · rw [lqNorm_top]; exact iSup_le (le_lqNorm hq0 a) + have hq' : q ≠ ∞ := ne_top_of_le_ne_top hr hqr + have hr0 : r ≠ 0 := ((pos_iff_ne_zero.2 hq0).trans_le hqr).ne' + rw [lqNorm_eq_tsum hr0 hr, lqNorm_eq_tsum hq0 hq'] + exact rpow_tsum_rpow_le a (ENNReal.toReal_pos hq0 hq') (ENNReal.toReal_mono hr hqr) + +/-- `‖a‖_{ℓ_q} ≤ ‖a‖_{ℓ_1} = ∑_i a_i` for `q ≥ 1`. -/ +theorem lqNorm_le_lqNorm_one (hq : 1 ≤ q) (a : ι → ℝ≥0∞) : lqNorm q a ≤ ∑' n, a n := by + simpa [lqNorm_one] using lqNorm_le_lqNorm_of_le one_ne_zero hq a + +/-- A family that vanishes outside a finite set `s` has `‖a‖_{ℓ_q} ≤ ∑_{i ∈ s} a_i` for +`q ≥ 1` (`ENNReal.lqNorm_le_lqNorm_one`). -/ +theorem lqNorm_le_sum_of_eq_zero (hq : 1 ≤ q) (s : Finset ι) (ha : ∀ i ∉ s, a i = 0) : + lqNorm q a ≤ ∑ i ∈ s, a i := + (lqNorm_le_lqNorm_one hq a).trans_eq (tsum_eq_sum ha) + +/-- For a finite index set, `‖a‖_{ℓ_q} = (∑_i a_i^q)^(1/q)` for `0 < q < ∞`. -/ +theorem lqNorm_eq_sum [Fintype ι] (hq0 : q ≠ 0) (hq : q ≠ ∞) (a : ι → ℝ≥0∞) : + lqNorm q a = (∑ i, a i ^ q.toReal) ^ (1 / q.toReal) := by + rw [lqNorm_eq_tsum hq0 hq, tsum_fintype] + +/-- For a finite index set, a family bounded by `B` has `‖a‖_{ℓ_q} ≤ (#ι)^(1/q) B` (Mathlib's +`eLpNorm_le_of_ae_eNorm_bound`, with `#ι` the counting measure of `ι`). -/ +theorem lqNorm_le_card_rpow_mul [Fintype ι] {B : ℝ≥0∞} (h : ∀ i, a i ≤ B) : + lqNorm q a ≤ (Fintype.card ι : ℝ≥0∞) ^ (1 / q.toReal) * B := by + refine (eLpNorm_le_of_ae_eNorm_bound (aestronglyMeasurable_count a) + (Eventually.of_forall h)).trans_eq ?_ + rw [Measure.count_univ, ENat.card_eq_coe_fintype_card, ENat.toENNReal_coe, smul_eq_mul, + mul_comm, one_div] + +/-- **The `ℓ_q` norm on a finite product**: `‖a‖_{ℓ_q(M × N)}^q = ∑_m ‖a_{m,·}‖_{ℓ_q(N)}^q` for +`0 < q < ∞`. -/ +theorem lqNorm_prod_rpow {M N : Type*} [Fintype M] [Finite N] [MeasurableSpace M] + [MeasurableSpace N] [MeasurableSingletonClass M] [MeasurableSingletonClass N] (hq0 : q ≠ 0) + (hq : q ≠ ∞) (a : M × N → ℝ≥0∞) : + lqNorm q a ^ q.toReal = ∑ m, lqNorm q (fun n => a (m, n)) ^ q.toReal := by + let := Fintype.ofFinite N + rw [lqNorm_rpow hq0 hq, tsum_fintype, Fintype.sum_prod_type] + refine Finset.sum_congr rfl fun m _ => ?_ + rw [lqNorm_rpow hq0 hq, tsum_fintype] + +/-- **Iterated `ℓ_q` norms**: for `0 < q < ∞` and families `a_k` on countable index sets `N_k`, +`‖(‖a_k‖_{ℓ_q(N_k)})_k‖_{ℓ_q}^q = ∑_k ∑_{n ∈ N_k} a_{k,n}^q`, the `q`-th power of the `ℓ_q` norm +of the whole family. -/ +theorem lqNorm_lqNorm_rpow {N : ι → Type*} [∀ k, MeasurableSpace (N k)] [∀ k, Countable (N k)] + [∀ k, MeasurableSingletonClass (N k)] (hq0 : q ≠ 0) (hq : q ≠ ∞) (a : ∀ k, N k → ℝ≥0∞) : + lqNorm q (fun k => lqNorm q (a k)) ^ q.toReal = ∑' k, ∑' n, a k n ^ q.toReal := by + rw [lqNorm_rpow hq0 hq] + exact tsum_congr fun k => lqNorm_rpow hq0 hq (a k) + +/-! ### Reindexing -/ + +variable {ι' : Type*} [MeasurableSpace ι'] [Countable ι'] [MeasurableSingletonClass ι'] + +/-- **Reindexing by a bijection** does not change the `ℓ_q` norm: `‖a ∘ e‖_q = ‖a‖_q`. -/ +theorem lqNorm_comp_equiv (e : ι ≃ ι') (a : ι' → ℝ≥0∞) : lqNorm q (a ∘ e) = lqNorm q a := by + rcases eq_or_ne q 0 with rfl | hq0 + · simp [lqNorm_zero_left] + rcases eq_or_ne q ∞ with rfl | hq + · rw [lqNorm_top, lqNorm_top] + exact e.iSup_comp + rw [lqNorm_eq_tsum hq0 hq, lqNorm_eq_tsum hq0 hq] + congr 1 + exact e.tsum_eq fun n => a n ^ q.toReal + +/-- **Extension by zero along an injective map** does not change the `ℓ_q` norm: if +`g : ι → ι'` is injective, the family on `ι'` equal to `a i` at `g i` and to `0` off the range +of `g` has the norm of `a`. -/ +theorem lqNorm_extend_zero {g : ι → ι'} (hg : Function.Injective g) (a : ι → ℝ≥0∞) : + lqNorm q (Function.extend g a 0) = lqNorm q a := by + rcases eq_or_ne q 0 with rfl | hq0 + · simp [lqNorm_zero_left] + rcases eq_or_ne q ∞ with rfl | hq + · rw [lqNorm_top, lqNorm_top] + exact iSup_extend_bot hg a + have hp : 0 < q.toReal := ENNReal.toReal_pos hq0 hq + rw [lqNorm_eq_tsum hq0 hq, lqNorm_eq_tsum hq0 hq] + congr 1 + have hext : ∀ n, Function.extend g a 0 n ^ q.toReal = + Function.extend g (fun i => a i ^ q.toReal) 0 n := + fun n => by + rw [Function.apply_extend (· ^ q.toReal) g 0 n] + congr 1 + funext m + simp [ENNReal.zero_rpow_of_pos hp] + simp_rw [hext] + exact tsum_extend_zero hg _ + +/-- **Restriction to the range of an injective map** does not increase the `ℓ_q` norm: +`‖a ∘ g‖_q ≤ ‖a‖_q`. -/ +theorem lqNorm_comp_le_of_injective {g : ι → ι'} (hg : Function.Injective g) (a : ι' → ℝ≥0∞) : + lqNorm q (a ∘ g) ≤ lqNorm q a := by + rw [← lqNorm_extend_zero hg] + refine lqNorm_mono fun n => ?_ + by_cases hn : ∃ i, g i = n + · obtain ⟨i, rfl⟩ := hn + rw [hg.extend_apply] + rfl + · rw [Function.extend_apply' _ _ _ hn] + exact zero_le + +/-- **Comparing `ℓ_q` norms through the sums of `q`-th powers**: for `q < ∞` and families +`a`, `b` in `[0, ∞]` on two countable sets, if `∑_i a_i^q ≤ C ∑_j b_j^q`, then +`‖a‖_{ℓ_q} ≤ C^(1/q) ‖b‖_{ℓ_q}` (for `q = 0` the left side is the degenerate value `0`). For +`q ≤ 1` the `q`-th power of an inner series is at most the series of the `q`-th powers, so an +inequality for `ℓ_1` norms transfers to `ℓ_q` this way. -/ +theorem lqNorm_le_rpow_mul_of_tsum_rpow_le (hq : q ≠ ∞) {a : ι → ℝ≥0∞} + {b : ι' → ℝ≥0∞} {C : ℝ≥0∞} (h : ∑' i, a i ^ q.toReal ≤ C * ∑' j, b j ^ q.toReal) : + lqNorm q a ≤ C ^ (1 / q.toReal) * lqNorm q b := by + rcases eq_or_ne q 0 with rfl | hq0 + · simp + rw [lqNorm_eq_tsum hq0 hq, lqNorm_eq_tsum hq0 hq, ← mul_rpow_of_nonneg _ _ (by positivity)] + exact rpow_le_rpow h (by positivity) + +end Generic + +/-- Restricting every member of a family to a set `S` restricts its pointwise `ℓ_q` norm: +`‖(1_S g_i(x))_i‖_{ℓ_q} = 1_S(x) ‖(g_i(x))_i‖_{ℓ_q}`. -/ +theorem lqNorm_indicator {α ι : Type*} [MeasurableSpace ι] [Countable ι] + [MeasurableSingletonClass ι] (q : ℝ≥0∞) (S : Set α) (g : ι → α → ℝ≥0∞) (x : α) : + lqNorm q (fun i => S.indicator (g i) x) = + S.indicator (fun y => lqNorm q (fun i => g i y)) x := by + by_cases hx : x ∈ S + · simp only [Set.indicator_of_mem hx] + · simp only [Set.indicator_of_notMem hx, ENNReal.lqNorm_zero_right] + +variable {q r : ℝ≥0∞} {a b : ℕ → ℝ≥0∞} + +/-- Dropping the first term does not increase the norm. -/ +theorem lqNorm_shift_le (a : ℕ → ℝ≥0∞) : lqNorm q (fun n => a (n + 1)) ≤ lqNorm q a := + lqNorm_comp_le_of_injective (add_left_injective 1) a + +/-- `‖(…, 0, x, 0, …)‖_{ℓ_q} = x` for a sequence with one nonzero term and every `q ≠ 0`. -/ +theorem lqNorm_ite_eq {q : ℝ≥0∞} (hq0 : q ≠ 0) (j : ℕ) (x : ℝ≥0∞) : + lqNorm q (fun i => if i = j then x else 0) = x := by + have h : (fun i => if i = j then x else 0) = ({j} : Set ℕ).indicator fun _ => x := by + funext i + by_cases hi : i = j + · rw [Set.indicator_of_mem (Set.mem_singleton_iff.2 hi)]; simp [hi] + · rw [Set.indicator_of_notMem (mt Set.mem_singleton_iff.1 hi)]; simp [hi] + rw [lqNorm, h, eLpNorm_indicator_const' (measurableSet_singleton j).nullMeasurableSet + (by simp) hq0, Measure.count_singleton, ENNReal.one_rpow, mul_one] + rfl + +/-- **Splitting off the first term, for every exponent**: +`‖a‖_q ≤ C_q (a 0 + ‖(a (n + 1))ₙ‖_q)` with Mathlib's constant `C_q = LpAddConst q` of the +quasi-triangle inequality (`ENNReal.lqNorm_add_le'`) for +`a = (a 0, 0, 0, …) + (0, a 1, a 2, …)`; the second summand is the extension by zero of +`(a (n + 1))ₙ` along `n ↦ n + 1` (`ENNReal.lqNorm_extend_zero`). -/ +theorem lqNorm_le_head_add_shift' (q : ℝ≥0∞) (a : ℕ → ℝ≥0∞) : + lqNorm q a ≤ LpAddConst q * (a 0 + lqNorm q (fun n => a (n + 1))) := by + rcases eq_or_ne q 0 with rfl | hq0 + · simp + have hab : a = fun n => (if n = 0 then a 0 else 0) + + Function.extend (· + 1) (fun n => a (n + 1)) 0 n := by + funext n + rcases n with _ | n + · simp + · simp [(add_left_injective 1).extend_apply (fun n => a (n + 1)) 0 n] + calc lqNorm q a ≤ LpAddConst q * (lqNorm q (fun n => if n = 0 then a 0 else 0) + + lqNorm q (Function.extend (· + 1) (fun n => a (n + 1)) 0)) := by + conv_lhs => rw [hab] + exact lqNorm_add_le' q _ _ + _ = LpAddConst q * (a 0 + lqNorm q (fun n => a (n + 1))) := by + rw [lqNorm_extend_zero (add_left_injective 1), lqNorm_ite_eq hq0] + +/-- **Splitting off the first term**: `‖a‖_q ≤ a 0 + ‖(a (n + 1))ₙ‖_q` for `1 ≤ q ≤ ∞`, the case +`LpAddConst q = 1` of `ENNReal.lqNorm_le_head_add_shift'`. -/ +theorem lqNorm_le_head_add_shift (hq : 1 ≤ q) (a : ℕ → ℝ≥0∞) : + lqNorm q a ≤ a 0 + lqNorm q (fun n => a (n + 1)) := by + simpa [LpAddConst_of_one_le hq] using lqNorm_le_head_add_shift' q a + +/-- **Splitting off the first `m` terms**: `‖a‖_q ≤ a 0 + ⋯ + a (m - 1) + ‖(a (n + m))ₙ‖_q`. -/ +theorem lqNorm_le_sum_range_add_shift (hq : 1 ≤ q) (a : ℕ → ℝ≥0∞) (m : ℕ) : + lqNorm q a ≤ ∑ j ∈ Finset.range m, a j + lqNorm q (fun n => a (n + m)) := by + induction m with + | zero => simp + | succ m ih => + have hshift : (fun n => a (n + 1 + m)) = fun n => a (n + (m + 1)) := by + funext n + congr 1 + omega + calc lqNorm q a ≤ ∑ j ∈ Finset.range m, a j + lqNorm q (fun n => a (n + m)) := ih + _ ≤ ∑ j ∈ Finset.range m, a j + (a (0 + m) + lqNorm q (fun n => a (n + 1 + m))) := by + gcongr + exact lqNorm_le_head_add_shift hq (fun n => a (n + m)) + _ = ∑ j ∈ Finset.range (m + 1), a j + lqNorm q (fun n => a (n + (m + 1))) := by + rw [hshift, Finset.sum_range_succ, zero_add, add_assoc] + +/-- The norm of a geometric sequence: `‖(r ^ k)ₖ‖_q ≤ (1 - r)⁻¹`, the value of the series +for `q = 1`. -/ +theorem lqNorm_geometric_le (hq : 1 ≤ q) (r : ℝ≥0∞) : + lqNorm q (fun k => r ^ k) ≤ (1 - r)⁻¹ := by + calc lqNorm q (fun k => r ^ k) ≤ lqNorm 1 (fun k => r ^ k) := + lqNorm_le_lqNorm_of_le one_ne_zero hq _ + _ = (1 - r)⁻¹ := by rw [lqNorm_one, ENNReal.tsum_geometric] + +/-! ### Dyadic weights -/ + +/-- The **dyadic weight** `2 ^ (k s)`: the factor by which the error `E_{2^k}` is multiplied +in the dyadic form of an approximation space of smoothness `s`. -/ +noncomputable def dyadicWeight (s : ℝ) (k : ℕ) : ℝ≥0∞ := (2 : ℝ≥0∞) ^ ((k : ℝ) * s) + +variable {s t : ℝ} + +/-- `2^s` is finite in `ℝ≥0∞`. -/ +theorem two_rpow_ne_top (s : ℝ) : (2 : ℝ≥0∞) ^ s ≠ ∞ := + rpow_ne_top_of_ne_zero two_ne_zero ofNat_ne_top + +/-- `1 ≤ 2^s` for `s ≥ 0`. -/ +theorem one_le_two_rpow (hs : 0 ≤ s) : 1 ≤ (2 : ℝ≥0∞) ^ s := by + simpa using ENNReal.rpow_le_rpow_of_exponent_le one_le_two hs + +/-- `1 ≤ 2 · 2^s` for `s ≥ 0`: the quasi-triangle constants `2 · 2^s` of the dyadic quasi-norms +dominate the constant `1` of the norm. -/ +theorem one_le_two_mul_two_rpow (hs : 0 ≤ s) : 1 ≤ (2 : ℝ≥0∞) * 2 ^ s := + one_le_two.trans (le_mul_of_one_le_right' (ENNReal.one_le_two_rpow hs)) + +/-- `2^(0·s) = 1`. -/ +@[simp] +theorem dyadicWeight_zero_right (s : ℝ) : dyadicWeight s 0 = 1 := by simp [dyadicWeight] + +/-- `2^(k·0) = 1`. -/ +@[simp] +theorem dyadicWeight_zero_left (k : ℕ) : dyadicWeight 0 k = 1 := by simp [dyadicWeight] + +/-- The dyadic weights are finite. -/ +theorem dyadicWeight_ne_top (s : ℝ) (k : ℕ) : dyadicWeight s k ≠ ∞ := + ENNReal.two_rpow_ne_top _ + +/-- The dyadic weights are finite. -/ +theorem dyadicWeight_lt_top (s : ℝ) (k : ℕ) : dyadicWeight s k < ∞ := + (dyadicWeight_ne_top s k).lt_top + +/-- The dyadic weights are positive. -/ +theorem dyadicWeight_pos (s : ℝ) (k : ℕ) : 0 < dyadicWeight s k := + ENNReal.rpow_pos two_pos ENNReal.ofNat_ne_top + +/-- The dyadic weights are nonzero. -/ +theorem dyadicWeight_ne_zero (s : ℝ) (k : ℕ) : dyadicWeight s k ≠ 0 := (dyadicWeight_pos s k).ne' + +/-- `2^(k(s+t)) = 2^(ks) 2^(kt)`. -/ +theorem dyadicWeight_add (s t : ℝ) (k : ℕ) : + dyadicWeight (s + t) k = dyadicWeight s k * dyadicWeight t k := by + rw [dyadicWeight, mul_add, ENNReal.rpow_add _ _ two_ne_zero ENNReal.ofNat_ne_top]; rfl + +/-- `2^((k+j)s) = 2^(ks) 2^(js)`. -/ +theorem dyadicWeight_add_nat (s : ℝ) (k j : ℕ) : + dyadicWeight s (k + j) = dyadicWeight s k * dyadicWeight s j := by + rw [dyadicWeight, Nat.cast_add, add_mul, ENNReal.rpow_add _ _ two_ne_zero ENNReal.ofNat_ne_top] + rfl + +/-- `2^((k+1)s) = 2^s 2^(ks)`. -/ +theorem dyadicWeight_succ (s : ℝ) (k : ℕ) : + dyadicWeight s (k + 1) = 2 ^ s * dyadicWeight s k := by + rw [dyadicWeight_add_nat, mul_comm]; simp [dyadicWeight] + +/-- `2^(-ks) = (2^(ks))⁻¹`. -/ +theorem dyadicWeight_neg (s : ℝ) (k : ℕ) : dyadicWeight (-s) k = (dyadicWeight s k)⁻¹ := by + rw [dyadicWeight, mul_neg, ENNReal.rpow_neg]; rfl + +/-- `2^(-ks) 2^(ks) = 1`. -/ +theorem dyadicWeight_neg_mul_self (s : ℝ) (k : ℕ) : dyadicWeight (-s) k * dyadicWeight s k = 1 := by + rw [dyadicWeight_neg, ENNReal.inv_mul_cancel (dyadicWeight_ne_zero s k) (dyadicWeight_ne_top s k)] + +/-- `2^(ks) 2^(-ks) = 1`. -/ +theorem dyadicWeight_mul_neg_self (s : ℝ) (k : ℕ) : dyadicWeight s k * dyadicWeight (-s) k = 1 := by + rw [mul_comm, dyadicWeight_neg_mul_self] + +/-- **Trading growth for decay**: `2^(ks) 2^(-(k-j)σ) = 2^(-k(σ-s)) 2^(jσ)` for `j ≤ k`, the +identity behind every almost diagonal estimate. -/ +theorem dyadicWeight_mul_dyadicWeight_neg_sub (s σ : ℝ) {j k : ℕ} (hjk : j ≤ k) : + dyadicWeight s k * dyadicWeight (-σ) (k - j) = + dyadicWeight (-(σ - s)) k * dyadicWeight σ j := by + simp only [dyadicWeight] + rw [← ENNReal.rpow_add _ _ two_ne_zero ENNReal.ofNat_ne_top, + ← ENNReal.rpow_add _ _ two_ne_zero ENNReal.ofNat_ne_top, Nat.cast_sub hjk] + congr 1 + ring + +/-- **Weights inside a window**: for `|j - k| ≤ c`, `2^{js} ≤ 2^{c|s|} 2^{ks}`, since +`s(j - k) ≤ |s| c`. -/ +theorem dyadicWeight_le_of_mem_Icc (s : ℝ) {c j k : ℕ} (hk : k ∈ Finset.Icc (j - c) (j + c)) : + dyadicWeight s j ≤ dyadicWeight |s| c * dyadicWeight s k := by + rw [Finset.mem_Icc] at hk + rw [dyadicWeight, dyadicWeight, dyadicWeight, + ← ENNReal.rpow_add _ _ two_ne_zero ENNReal.ofNat_ne_top] + refine ENNReal.rpow_le_rpow_of_exponent_le one_le_two ?_ + have h1 : (j : ℝ) ≤ k + c := by exact_mod_cast (by omega : j ≤ k + c) + have h2 : (k : ℝ) ≤ j + c := by exact_mod_cast hk.2 + have hjk : |(j : ℝ) - k| ≤ c := abs_le.2 ⟨by linarith, by linarith⟩ + have h3 : ((j : ℝ) - k) * s ≤ |s| * c := by + calc ((j : ℝ) - k) * s ≤ |((j : ℝ) - k) * s| := le_abs_self _ + _ = |(j : ℝ) - k| * |s| := abs_mul _ _ + _ ≤ c * |s| := mul_le_mul_of_nonneg_right hjk (abs_nonneg s) + _ = |s| * c := mul_comm _ _ + linarith [h3] + +/-- `(2^(ks))^p = 2^(k s p)`. -/ +theorem dyadicWeight_rpow (s p : ℝ) (k : ℕ) : dyadicWeight s k ^ p = dyadicWeight (s * p) k := by + rw [dyadicWeight, dyadicWeight, ← ENNReal.rpow_mul, mul_assoc] + +/-- The dyadic weights are a geometric sequence with ratio `2 ^ s`. -/ +theorem dyadicWeight_eq_pow (s : ℝ) (k : ℕ) : dyadicWeight s k = ((2 : ℝ≥0∞) ^ s) ^ k := by + rw [dyadicWeight, mul_comm, ENNReal.rpow_mul_natCast] + +/-- The squared dyadic weight: `(2^(ks))² = (4^k)^s`. -/ +theorem dyadicWeight_sq (s : ℝ) (k : ℕ) : dyadicWeight s k ^ 2 = ((4 : ℝ≥0∞) ^ k) ^ s := by + rw [dyadicWeight, ← ENNReal.rpow_mul_natCast, ← ENNReal.rpow_natCast (4 : ℝ≥0∞) k, + ← ENNReal.rpow_mul, show (4 : ℝ≥0∞) = 2 ^ (2 : ℝ) by norm_num, ← ENNReal.rpow_mul] + congr 1 + push_cast + ring + +/-- For `s ≥ 0` the dyadic weights increase in `k`. -/ +theorem dyadicWeight_mono (hs : 0 ≤ s) : Monotone (dyadicWeight s) := fun _ _ hkj => + ENNReal.rpow_le_rpow_of_exponent_le one_le_two + (mul_le_mul_of_nonneg_right (Nat.cast_le.2 hkj) hs) + +/-- For a fixed `k`, the weight `2 ^ (k s)` increases with `s`. -/ +theorem dyadicWeight_le_of_le {s t : ℝ} (h : s ≤ t) (k : ℕ) : dyadicWeight s k ≤ dyadicWeight t k := + ENNReal.rpow_le_rpow_of_exponent_le one_le_two (mul_le_mul_of_nonneg_left h (Nat.cast_nonneg k)) + +/-- For `s ≤ 0` the weights decrease. -/ +theorem dyadicWeight_anti (hs : s ≤ 0) : Antitone (dyadicWeight s) := fun _ _ hkj => + ENNReal.rpow_le_rpow_of_exponent_le one_le_two + (mul_le_mul_of_nonpos_right (Nat.cast_le.2 hkj) hs) + +/-- For `s ≥ 0`, `1 ≤ 2^(ks)`. -/ +theorem one_le_dyadicWeight (hs : 0 ≤ s) (k : ℕ) : 1 ≤ dyadicWeight s k := by + simpa using dyadicWeight_mono hs (Nat.zero_le k) + +/-- `2^(-(n-2)θ) ≤ 2^(2θ) 2^(-nθ)` for truncated subtraction and `θ ≥ 0`. -/ +theorem dyadicWeight_neg_sub_two_le {θ : ℝ} (hθ : 0 ≤ θ) (n : ℕ) : + dyadicWeight (-θ) (n - 2) ≤ dyadicWeight θ 2 * dyadicWeight (-θ) n := by + rcases le_or_gt 2 n with h | h + · obtain ⟨m, rfl⟩ := Nat.exists_eq_add_of_le h + rw [Nat.add_sub_cancel_left, dyadicWeight_add_nat, ← mul_assoc, dyadicWeight_mul_neg_self, + one_mul] + · calc dyadicWeight (-θ) (n - 2) = 1 := by rw [show n - 2 = 0 by omega]; simp + _ ≤ dyadicWeight θ 2 * dyadicWeight (-θ) n := by + rw [← dyadicWeight_mul_neg_self θ n] + gcongr + · exact dyadicWeight_mono hθ (by omega) + +/-- `(2 ^ k) ^ s = 2 ^ (k s)`: the dyadic weight is the power weight at the dyadic point. -/ +theorem natCast_two_pow_rpow (s : ℝ) (k : ℕ) : + ((2 ^ k : ℕ) : ℝ≥0∞) ^ s = dyadicWeight s k := by + rw [dyadicWeight, ENNReal.rpow_natCast_mul, Nat.cast_pow, Nat.cast_ofNat] + +/-- `2^((k : ℤ) : ℝ) = 2^k` in `[0, ∞]` for `k ∈ ℕ`: the real power of `2` with an integer +exponent `k ≥ 0` is the natural power. -/ +theorem two_rpow_intCast_natCast (k : ℕ) : + (2 : ℝ≥0∞) ^ (((k : ℤ) : ℝ)) = ((2 ^ k : ℕ) : ℝ≥0∞) := by + rw [Int.cast_natCast, rpow_natCast, Nat.cast_pow, Nat.cast_ofNat] + +/-- `(2^(jn))^t = 2^(j n t)`: a power of the volume factor `2^(jn)` is a dyadic weight. -/ +theorem two_pow_rpow_eq_dyadicWeight (j n : ℕ) (t : ℝ) : + ((2 : ℝ≥0∞) ^ (j * n)) ^ t = dyadicWeight (n * t) j := by + rw [dyadicWeight, ← ENNReal.rpow_natCast, ← ENNReal.rpow_mul] + congr 1 + push_cast + ring + +/-- **A weighted `ℓ_q` norm from its first term and a bound of the others**: if `x_0 ≤ M a` and +`x_{j+1} ≤ A w_{j+1}` for every `j`, then for `1 ≤ q ≤ ∞` +`‖(2^(js) x_j)_j‖_{ℓ_q} ≤ (M + A) (a + ‖(2^(js) w_j)_j‖_{ℓ_q})`. The first term splits off +(`ENNReal.lqNorm_le_head_add_shift`), and the shifted rest is at most `A ‖(2^(js) w_j)_j‖_{ℓ_q}`. -/ +theorem lqNorm_dyadicWeight_le_of_head_of_succ_le {q : ℝ≥0∞} (hq : 1 ≤ q) (s : ℝ) + (x w : ℕ → ℝ≥0∞) {a M A : ℝ≥0∞} (h0 : x 0 ≤ M * a) (hsucc : ∀ j, x (j + 1) ≤ A * w (j + 1)) : + lqNorm q (fun j => dyadicWeight s j * x j) ≤ + (M + A) * (a + lqNorm q (fun j => dyadicWeight s j * w j)) := by + set Λ := lqNorm q (fun j => dyadicWeight s j * w j) + have htail : lqNorm q (fun j => dyadicWeight s (j + 1) * x (j + 1)) ≤ A * Λ := + calc lqNorm q (fun j => dyadicWeight s (j + 1) * x (j + 1)) + ≤ lqNorm q (fun j => A * (dyadicWeight s (j + 1) * w (j + 1))) := + lqNorm_mono fun j => (mul_le_mul' le_rfl (hsucc j)).trans_eq (by ring) + _ = A * lqNorm q (fun j => dyadicWeight s (j + 1) * w (j + 1)) := + lqNorm_const_mul _ _ + _ ≤ A * Λ := mul_le_mul' le_rfl (lqNorm_shift_le fun j => dyadicWeight s j * w j) + calc lqNorm q (fun j => dyadicWeight s j * x j) + ≤ dyadicWeight s 0 * x 0 + lqNorm q (fun j => dyadicWeight s (j + 1) * x (j + 1)) := + lqNorm_le_head_add_shift hq _ + _ ≤ M * a + A * Λ := by + rw [dyadicWeight_zero_right, one_mul] + exact add_le_add h0 htail + _ ≤ (M + A) * a + (M + A) * Λ := by + gcongr + · exact le_self_add + · exact le_add_self + _ = (M + A) * (a + Λ) := by ring + +/-! ### Dyadic weights of integer order -/ + +/-- For a natural order `L`, the dyadic weight `dyadicWeight L k`, a real power `2^(k·L)` in +`[0, ∞]`, equals the natural power `2^(kL)`. -/ +theorem dyadicWeight_natCast (L k : ℕ) : dyadicWeight (L : ℝ) k = 2 ^ (k * L) := by + rw [dyadicWeight_eq_pow, ENNReal.rpow_natCast, ← pow_mul, mul_comm] + +/-- `2^(-kL) = (2^k)^(-L)`. -/ +theorem dyadicWeight_neg_natCast (L k : ℕ) : + dyadicWeight (-(L : ℝ)) k = ((2 : ℝ≥0∞) ^ k)⁻¹ ^ L := by + rw [ENNReal.dyadicWeight_neg, dyadicWeight_natCast, pow_mul, ENNReal.inv_pow] + +/-- For `i ≤ j' ≤ k`, `2^(-(k-i)L) ≤ 2^L 2^(-(j'+1-i)L)`. -/ +theorem dyadicWeight_neg_sub_le (L : ℕ) {i j' k : ℕ} (hij : i ≤ j') (hk : j' ≤ k) : + dyadicWeight (-(L : ℝ)) (k - i) ≤ 2 ^ L * dyadicWeight (-(L : ℝ)) (j' + 1 - i) := by + have h1 : dyadicWeight (-(L : ℝ)) (k - i) ≤ dyadicWeight (-(L : ℝ)) (j' - i) := + ENNReal.dyadicWeight_anti (neg_nonpos.2 (Nat.cast_nonneg L)) (Nat.sub_le_sub_right hk i) + have h2 : j' + 1 - i = (j' - i) + 1 := by omega + rw [h2, ENNReal.dyadicWeight_add_nat, dyadicWeight_neg_natCast L 1, pow_one] + calc dyadicWeight (-(L : ℝ)) (k - i) ≤ dyadicWeight (-(L : ℝ)) (j' - i) := h1 + _ = dyadicWeight (-(L : ℝ)) (j' - i) * (2 ^ L * (2 : ℝ≥0∞)⁻¹ ^ L) := by + rw [← mul_pow, ENNReal.mul_inv_cancel two_ne_zero ENNReal.ofNat_ne_top, one_pow, mul_one] + _ = _ := by ring + +/-- `1 ≤ 2^L 2^(-mL)` for `m ≤ 1`. -/ +theorem one_le_two_pow_mul_dyadicWeight_neg (L : ℕ) {m : ℕ} (hm : m ≤ 1) : + 1 ≤ 2 ^ L * dyadicWeight (-(L : ℝ)) m := by + have h : dyadicWeight (-(L : ℝ)) 1 ≤ dyadicWeight (-(L : ℝ)) m := + ENNReal.dyadicWeight_anti (neg_nonpos.2 (Nat.cast_nonneg L)) hm + calc (1 : ℝ≥0∞) = 2 ^ L * dyadicWeight (-(L : ℝ)) 1 := by + rw [dyadicWeight_neg_natCast, pow_one, ← mul_pow, + ENNReal.mul_inv_cancel two_ne_zero ENNReal.ofNat_ne_top, one_pow] + _ ≤ 2 ^ L * dyadicWeight (-(L : ℝ)) m := by gcongr + +/-- `2^(iL) 2^(-j'L) = 4^L 2^(-(j'+2-i)L)` for `i ≤ j' + 2`. -/ +theorem dyadicWeight_mul_dyadicWeight_neg_eq (L : ℕ) {i j' : ℕ} (hij : i ≤ j' + 2) : + dyadicWeight (L : ℝ) i * dyadicWeight (-(L : ℝ)) j' = + 4 ^ L * dyadicWeight (-(L : ℝ)) (j' + 2 - i) := by + have h1 : dyadicWeight (-(L : ℝ)) (j' + 2 - i) * dyadicWeight (-(L : ℝ)) i = + dyadicWeight (-(L : ℝ)) j' * dyadicWeight (-(L : ℝ)) 2 := by + rw [← ENNReal.dyadicWeight_add_nat, ← ENNReal.dyadicWeight_add_nat, Nat.sub_add_cancel hij] + have h4 : (4 : ℝ≥0∞) ^ L * dyadicWeight (-(L : ℝ)) 2 = 1 := by + rw [dyadicWeight_neg_natCast, ← mul_pow, show (2 : ℝ≥0∞) ^ 2 = 4 by norm_num, + ENNReal.mul_inv_cancel (by norm_num) (by norm_num), one_pow] + calc dyadicWeight (L : ℝ) i * dyadicWeight (-(L : ℝ)) j' + = dyadicWeight (L : ℝ) i * dyadicWeight (-(L : ℝ)) j' * + (4 ^ L * dyadicWeight (-(L : ℝ)) 2) := by rw [h4, mul_one] + _ = 4 ^ L * (dyadicWeight (-(L : ℝ)) j' * dyadicWeight (-(L : ℝ)) 2) * + dyadicWeight (L : ℝ) i := by ring + _ = 4 ^ L * (dyadicWeight (-(L : ℝ)) (j' + 2 - i) * dyadicWeight (-(L : ℝ)) i) * + dyadicWeight (L : ℝ) i := by rw [h1] + _ = 4 ^ L * dyadicWeight (-(L : ℝ)) (j' + 2 - i) * + (dyadicWeight (-(L : ℝ)) i * dyadicWeight (L : ℝ) i) := by ring + _ = _ := by rw [ENNReal.dyadicWeight_neg_mul_self, mul_one] + +/-- `(X 2^(-jn))^(1/p) = X^(1/p) 2^(-jn/p)`. -/ +theorem rpow_mul_dyadicWeight_neg (X : ℝ≥0∞) (n : ℕ) (p : ℝ≥0∞) (j : ℕ) : + (X * dyadicWeight (-(n : ℝ)) j) ^ (1 / p.toReal) = + X ^ (1 / p.toReal) * dyadicWeight (-(n / p.toReal)) j := by + rw [ENNReal.mul_rpow_of_nonneg _ _ (div_nonneg zero_le_one ENNReal.toReal_nonneg), + ENNReal.dyadicWeight_rpow] + congr 2 + ring + +/-- The product rule for powers of `2` in `[0, ∞]`: `2^x 2^y = 2^(x+y)` for all real `x, y` +(Mathlib's `ENNReal.rpow_add` with the side conditions `2 ≠ 0` and `2 ≠ ∞` discharged). -/ +theorem two_rpow_mul_two_rpow (x y : ℝ) : (2 : ℝ≥0∞) ^ x * 2 ^ y = 2 ^ (x + y) := + (ENNReal.rpow_add x y two_ne_zero ENNReal.ofNat_ne_top).symm + +/-- For `α > 0` the ratio `2 ^ (-α)` of the decaying weights is `< 1`. -/ +theorem two_rpow_neg_lt_one {α : ℝ} (hα : 0 < α) : (2 : ℝ≥0∞) ^ (-α) < 1 := + ENNReal.rpow_lt_one_of_one_lt_of_neg one_lt_two (neg_neg_iff_pos.2 hα) + +/-- The constant `(1 - 2 ^ (-α))⁻¹` of geometric sums is finite for `α > 0`. -/ +theorem one_sub_two_rpow_neg_inv_ne_top {α : ℝ} (hα : 0 < α) : (1 - (2 : ℝ≥0∞) ^ (-α))⁻¹ ≠ ∞ := by + rw [ENNReal.inv_ne_top] + exact (tsub_pos_of_lt (two_rpow_neg_lt_one hα)).ne' + +/-- The constant `2 (1 - 2^(-s))⁻¹` is finite for `s > 0` +(`ENNReal.one_sub_two_rpow_neg_inv_ne_top`). -/ +theorem two_mul_one_sub_two_rpow_neg_inv_ne_top {s : ℝ} (hs : 0 < s) : + 2 * (1 - (2 : ℝ≥0∞) ^ (-s))⁻¹ ≠ ∞ := + ENNReal.mul_ne_top ENNReal.ofNat_ne_top (one_sub_two_rpow_neg_inv_ne_top hs) + +/-- The constant `(1 - 2 ^ (-α))⁻¹` is at least `1`. -/ +theorem one_le_one_sub_two_rpow_neg_inv (α : ℝ) : 1 ≤ (1 - (2 : ℝ≥0∞) ^ (-α))⁻¹ := + ENNReal.one_le_inv.2 tsub_le_self + +/-- `‖(2 ^ (-k α))ₖ‖_q ≤ (1 - 2 ^ (-α))⁻¹`. -/ +theorem lqNorm_dyadicWeight_neg_le (hq : 1 ≤ q) (α : ℝ) : + lqNorm q (dyadicWeight (-α)) ≤ (1 - (2 : ℝ≥0∞) ^ (-α))⁻¹ := by + have : dyadicWeight (-α) = fun k => ((2 : ℝ≥0∞) ^ (-α)) ^ k := funext (dyadicWeight_eq_pow _) + rw [this] + exact lqNorm_geometric_le hq _ + +/-- `∑ₖ 2^(-kα) = (1 - 2^(-α))⁻¹`. -/ +theorem tsum_dyadicWeight_neg (α : ℝ) : + ∑' k, dyadicWeight (-α) k = (1 - (2 : ℝ≥0∞) ^ (-α))⁻¹ := by + simp_rw [dyadicWeight_eq_pow] + exact ENNReal.tsum_geometric _ + +/-- The constant `(1 - 2^(-α q))^(-1/q)` of the dyadic geometric sequence `(2^(-kα))_k`, with +the value `1` for `q = ∞` (where `q.toReal = 0`). For `α ≥ 0` and `q ≠ 0` it is the `ℓ_q` norm +of that sequence (`ENNReal.lqNorm_dyadicWeight_neg_eq_dyadicGeomConst`). -/ +noncomputable def dyadicGeomConst (α : ℝ) (q : ℝ≥0∞) : ℝ≥0∞ := + ((1 - (2 : ℝ≥0∞) ^ (-(α * q.toReal)))⁻¹) ^ (1 / q.toReal) + +/-- **The geometric sequence in `ℓ_q`** for every `q ≠ 0`: +`‖(2^(-kα))_k‖_{ℓ_q} = dyadicGeomConst α q` for `α ≥ 0`. -/ +theorem lqNorm_dyadicWeight_neg_eq_dyadicGeomConst {α : ℝ} (hα : 0 ≤ α) (hq0 : q ≠ 0) : + lqNorm q (dyadicWeight (-α)) = dyadicGeomConst α q := by + rcases eq_or_ne q ∞ with rfl | hq + · rw [lqNorm_top, dyadicGeomConst, toReal_top, _root_.div_zero, rpow_zero] + refine le_antisymm (iSup_le fun k => ?_) (le_iSup_of_le 0 (dyadicWeight_zero_right _).ge) + exact (dyadicWeight_anti (neg_nonpos.2 hα) (Nat.zero_le k)).trans_eq + (dyadicWeight_zero_right _) + rw [lqNorm_eq_tsum hq0 hq, dyadicGeomConst] + simp_rw [dyadicWeight_rpow, neg_mul] + rw [tsum_dyadicWeight_neg] + +/-- The geometric sequence for every `q`: `‖(2^(-kα))_k‖_{ℓ_q} ≤ dyadicGeomConst α q` for +`α ≥ 0`; for `q = 0` the left side is `0`. -/ +theorem lqNorm_dyadicWeight_neg_le_dyadicGeomConst {α : ℝ} (hα : 0 ≤ α) : + lqNorm q (dyadicWeight (-α)) ≤ dyadicGeomConst α q := by + rcases eq_or_ne q 0 with rfl | hq0 + · simp [lqNorm_zero_left] + exact (lqNorm_dyadicWeight_neg_eq_dyadicGeomConst hα hq0).le + +/-- The constant `dyadicGeomConst α q` is at least `1`, for every `α` and `q`. -/ +theorem one_le_dyadicGeomConst (α : ℝ) (q : ℝ≥0∞) : 1 ≤ dyadicGeomConst α q := + (one_rpow _).symm.trans_le + (rpow_le_rpow (one_le_one_sub_two_rpow_neg_inv _) (by positivity)) + +/-- The constant `dyadicGeomConst α q` is finite for `α > 0`. -/ +theorem dyadicGeomConst_ne_top {α : ℝ} (hα : 0 < α) (q : ℝ≥0∞) : dyadicGeomConst α q ≠ ∞ := by + rcases (ENNReal.toReal_nonneg (a := q)).eq_or_lt with h | h + · rw [dyadicGeomConst, ← h, _root_.div_zero, rpow_zero] + exact one_ne_top + exact rpow_ne_top_of_nonneg (by positivity) + (one_sub_two_rpow_neg_inv_ne_top (_root_.mul_pos hα h)) + +/-- For `q = ∞` the constant `dyadicGeomConst α ∞` is `1`, for every `α`. -/ +theorem dyadicGeomConst_top (α : ℝ) : dyadicGeomConst α ∞ = 1 := by + rw [dyadicGeomConst, toReal_top, _root_.div_zero, rpow_zero] + +/-- `∑ₖ 2^(-k) = 2`. -/ +theorem tsum_dyadicWeight_neg_one : ∑' k, dyadicWeight (-1) k = 2 := by + simp_rw [dyadicWeight_eq_pow, ENNReal.rpow_neg_one] + exact ENNReal.tsum_geometric_two + +/-- `‖(2^(-k))ₖ‖_q ≤ 2`. -/ +theorem lqNorm_dyadicWeight_neg_one_le (hq : 1 ≤ q) : lqNorm q (dyadicWeight (-1)) ≤ 2 := by + calc lqNorm q (dyadicWeight (-1)) ≤ ∑' k, dyadicWeight (-1) k := lqNorm_le_lqNorm_one hq _ + _ = 2 := tsum_dyadicWeight_neg_one + +/-! ### Powers of two as dyadic weights -/ + +/-- `ofReal (2^x) = 2^x`: the real power of two as an element of `[0, ∞]`. -/ +theorem ofReal_two_rpow (x : ℝ) : ENNReal.ofReal ((2 : ℝ) ^ x) = (2 : ℝ≥0∞) ^ x := by + rw [← ENNReal.ofReal_rpow_of_pos two_pos, ENNReal.ofReal_ofNat] + +/-- `2^k` as a dyadic weight. -/ +theorem ofReal_two_pow_eq (k : ℕ) : ENNReal.ofReal (2 ^ k) = dyadicWeight 1 k := by + rw [← ENNReal.natCast_two_pow_rpow, ENNReal.rpow_one, ENNReal.ofReal_pow zero_le_two, + ENNReal.ofReal_ofNat] + push_cast + rfl + +/-- `(2^i)^n = 2^(in)` as a dyadic weight. -/ +theorem ofReal_two_pow_pow (i n : ℕ) : + ENNReal.ofReal (((2 : ℝ) ^ i) ^ n) = dyadicWeight n i := by + rw [ENNReal.dyadicWeight_eq_pow, ENNReal.rpow_natCast, ENNReal.ofReal_pow (by positivity), + ENNReal.ofReal_pow zero_le_two, ENNReal.ofReal_ofNat, ← pow_mul, ← pow_mul, mul_comm] + +/-- `(2^(-k))^l = 2^(-kl)` as a dyadic weight. -/ +theorem ofReal_one_div_two_pow_pow (k l : ℕ) : + ENNReal.ofReal ((1 / 2 ^ k) ^ l) = dyadicWeight (-(l : ℝ)) k := by + have h : (1 / 2 ^ k : ℝ) ^ l = ((2 : ℝ) ^ (-(l : ℝ))) ^ k := by + rw [Real.rpow_neg (by norm_num), Real.rpow_natCast, one_div, inv_pow, inv_pow, ← pow_mul, + ← pow_mul, mul_comm] + rw [ENNReal.dyadicWeight_eq_pow, h, ENNReal.ofReal_pow (by positivity), + ← ENNReal.ofReal_rpow_of_pos (by norm_num), ENNReal.ofReal_ofNat] + +/-- `(2^j h)^θ ≤ 2^(-(k-j)θ)` for `0 ≤ h ≤ 2^(-k)`, `j ≤ k` and `θ ≥ 0`. -/ +theorem ofReal_two_pow_mul_rpow_le {j k : ℕ} (hjk : j ≤ k) {h : ℝ} (hh : h ≤ 1 / 2 ^ k) {θ : ℝ} + (hθ : 0 ≤ θ) : ENNReal.ofReal (2 ^ j * h) ^ θ ≤ dyadicWeight (-θ) (k - j) := by + obtain ⟨m, rfl⟩ := Nat.exists_eq_add_of_le hjk + rw [Nat.add_sub_cancel_left] + have h1 : (2 : ℝ) ^ j * h ≤ ((2 : ℝ) ^ m)⁻¹ := by + rw [pow_add] at hh + calc (2 : ℝ) ^ j * h ≤ 2 ^ j * (1 / (2 ^ j * 2 ^ m)) := by gcongr + _ = ((2 : ℝ) ^ m)⁻¹ := by field_simp + calc ENNReal.ofReal (2 ^ j * h) ^ θ ≤ ENNReal.ofReal (((2 : ℝ) ^ m)⁻¹) ^ θ := + ENNReal.rpow_le_rpow (ENNReal.ofReal_le_ofReal h1) hθ + _ = dyadicWeight (-θ) m := by + rw [ENNReal.ofReal_inv_of_pos (by positivity), ENNReal.ofReal_pow (by norm_num), + ENNReal.ofReal_ofNat, ENNReal.inv_rpow, ← ENNReal.rpow_natCast, ← ENNReal.rpow_mul, + dyadicWeight, mul_neg, ENNReal.rpow_neg] + +/-- `(ρ 2^(-j))^b = ρ^b 2^(-jb)` in `[0, ∞]` for `ρ > 0` and every real `b`. -/ +theorem ofReal_div_two_pow_rpow {ρ : ℝ} (hρ : 0 < ρ) (b : ℝ) (j : ℕ) : + ENNReal.ofReal (ρ / 2 ^ j) ^ b = ENNReal.ofReal ρ ^ b * dyadicWeight (-b) j := by + rw [div_eq_mul_inv, ENNReal.ofReal_mul hρ.le, + ENNReal.mul_rpow_of_ne_zero (ENNReal.ofReal_pos.2 hρ).ne' (by positivity), + ENNReal.ofReal_inv_of_pos (by positivity), ENNReal.ofReal_pow zero_le_two, + ENNReal.ofReal_ofNat, ENNReal.inv_rpow, ENNReal.dyadicWeight_neg, + ← ENNReal.natCast_two_pow_rpow] + norm_cast + +/-- `(2^j ρ)^b = ρ^b 2^(jb)` in `[0, ∞]` for `ρ > 0` and every real `b`. -/ +theorem ofReal_two_pow_mul_rpow {ρ : ℝ} (hρ : 0 < ρ) (b : ℝ) (j : ℕ) : + ENNReal.ofReal (2 ^ j * ρ) ^ b = ENNReal.ofReal ρ ^ b * dyadicWeight b j := by + rw [ENNReal.ofReal_mul (by positivity), + ENNReal.mul_rpow_of_ne_zero (by positivity) (ENNReal.ofReal_pos.2 hρ).ne', mul_comm, + ENNReal.ofReal_pow zero_le_two, ENNReal.ofReal_ofNat, ← ENNReal.natCast_two_pow_rpow] + norm_cast + +/-- **Dyadic scales as dyadic weights**: `(2^(-n))^θ = 2^(-nθ)` for every `n ∈ ℕ` and every real +exponent `θ`, as an identity in `[0, ∞]` (`ENNReal.dyadicWeight`); the case `ρ = 1` of +`ENNReal.ofReal_div_two_pow_rpow`. -/ +theorem ofReal_one_div_two_pow_rpow (n : ℕ) (θ : ℝ) : + ENNReal.ofReal ((1 / 2 ^ n) ^ θ) = dyadicWeight (-θ) n := by + rw [← ENNReal.ofReal_rpow_of_pos (by positivity), ofReal_div_two_pow_rpow one_pos, + ENNReal.ofReal_one, ENNReal.one_rpow, one_mul] + +/-! ### Subadditive functionals and series -/ + +/-- **Subadditive functionals and multiple series**: if `Q` is subadditive, `Q a ≤ C ‖a‖` with +`C < ∞`, and the partial sums of `∑ u_k` over finite sets `S_J` converge to `F`, then +`Q F ≤ ∑_k Q(u_k)`. -/ +theorem le_tsum_of_tendsto_finsetSum {E ι : Type*} [NormedAddCommGroup E] {Q : E → ℝ≥0∞} + {C : ℝ≥0∞} (hC : C ≠ ∞) (hadd : ∀ a b, Q (a + b) ≤ Q a + Q b) (hle : ∀ a, Q a ≤ C * ‖a‖ₑ) + {S : ℕ → Finset ι} {u : ι → E} {F : E} + (hu : Tendsto (fun J => ∑ k ∈ S J, u k) atTop (nhds F)) : + Q F ≤ ∑' k, Q (u k) := by + have hsum : ∀ s : Finset ι, Q (∑ k ∈ s, u k) ≤ ∑ k ∈ s, Q (u k) := fun s => + Finset.le_sum_of_subadditive Q (by simpa using hle 0) hadd s u + have hJ : ∀ J, Q F ≤ ∑' k, Q (u k) + C * ‖F - ∑ k ∈ S J, u k‖ₑ := fun J => by + calc Q F = Q (∑ k ∈ S J, u k + (F - ∑ k ∈ S J, u k)) := by rw [add_sub_cancel] + _ ≤ Q (∑ k ∈ S J, u k) + Q (F - ∑ k ∈ S J, u k) := hadd _ _ + _ ≤ ∑' k, Q (u k) + C * ‖F - ∑ k ∈ S J, u k‖ₑ := + add_le_add ((hsum _).trans (sum_le_tsum _)) (hle _) + have h1 : Tendsto (fun J => F - ∑ k ∈ S J, u k) atTop (nhds 0) := by + have := (tendsto_const_nhds (x := F)).sub hu + rwa [sub_self] at this + have h2 : Tendsto (fun J => ‖F - ∑ k ∈ S J, u k‖ₑ) atTop (nhds 0) := by + have h3 := (continuous_eNorm.tendsto (0 : E)).comp h1 + rw [eNorm_zero] at h3 + exact h3 + have hlim : Tendsto (fun J => ∑' k, Q (u k) + C * ‖F - ∑ k ∈ S J, u k‖ₑ) atTop + (nhds (∑' k, Q (u k) + C * 0)) := + tendsto_const_nhds.add (ENNReal.Tendsto.const_mul h2 (Or.inr hC)) + rw [mul_zero, add_zero] at hlim + exact ge_of_tendsto hlim (Eventually.of_forall hJ) + +/-- **Subadditive functionals and series**: if `Q` is subadditive, `Q a ≤ C ‖a‖` with `C < ∞`, and +the partial sums of `∑ u_j` converge to `f`, then `Q f ≤ ∑_j Q(u_j)`. -/ +theorem le_tsum_of_tendsto_sum {E : Type*} [NormedAddCommGroup E] {Q : E → ℝ≥0∞} {C : ℝ≥0∞} + (hC : C ≠ ∞) (hadd : ∀ a b, Q (a + b) ≤ Q a + Q b) (hle : ∀ a, Q a ≤ C * ‖a‖ₑ) + {u : ℕ → E} {f : E} + (hu : Tendsto (fun J => ∑ j ∈ Finset.range (J + 1), u j) atTop (nhds f)) : + Q f ≤ ∑' j, Q (u j) := + le_tsum_of_tendsto_finsetSum (S := fun J => Finset.range (J + 1)) hC hadd hle hu + +/-- **Weighted sequences are summable**: `∑_j a_j ≤ (1 - 2^(-s))⁻¹ ‖(2^(js) a_j)_j‖_{ℓ_q}`, +since `a_j ≤ 2^(-js) ‖(2^(js) a_j)_j‖_{ℓ_q}`. -/ +theorem tsum_le_lqNorm_dyadicWeight {q : ℝ≥0∞} (hq : 1 ≤ q) (s : ℝ) (a : ℕ → ℝ≥0∞) : + ∑' j, a j ≤ (1 - (2 : ℝ≥0∞) ^ (-s))⁻¹ * lqNorm q (fun j => dyadicWeight s j * a j) := by + set X := lqNorm q (fun j => dyadicWeight s j * a j) + calc ∑' j, a j ≤ ∑' j, dyadicWeight (-s) j * X := tsum_le_tsum fun j => by + calc a j = dyadicWeight (-s) j * (dyadicWeight s j * a j) := by + rw [← mul_assoc, dyadicWeight_neg_mul_self, one_mul] + _ ≤ dyadicWeight (-s) j * X := mul_le_mul' le_rfl + (le_lqNorm (zero_lt_one.trans_le hq).ne' (fun j => dyadicWeight s j * a j) j) + _ = (1 - (2 : ℝ≥0∞) ^ (-s))⁻¹ * X := by + rw [ENNReal.tsum_mul_right, tsum_dyadicWeight_neg] + +/-- **A series with weighted bounds**: if the partial sums of `∑ u_j` converge to `F` and +`‖u_j‖ ≤ K b_j`, then `‖F‖ ≤ K (1 - 2^(-s))⁻¹ ‖(2^(js) b_j)_j‖_{ℓ_q}` +(`ENNReal.tsum_le_lqNorm_dyadicWeight`). -/ +theorem enorm_le_of_tendsto_sum {E : Type*} [NormedAddCommGroup E] {u : ℕ → E} {F : E} + (hu : Tendsto (fun J => ∑ j ∈ Finset.range (J + 1), u j) atTop (nhds F)) {K : ℝ≥0∞} + {b : ℕ → ℝ≥0∞} (hb : ∀ j, ‖u j‖ₑ ≤ K * b j) (s : ℝ) {q : ℝ≥0∞} (hq : 1 ≤ q) : + ‖F‖ₑ ≤ K * (1 - (2 : ℝ≥0∞) ^ (-s))⁻¹ * lqNorm q (fun j => dyadicWeight s j * b j) := by + have h1 : ‖F‖ₑ ≤ ∑' j, ‖u j‖ₑ := + le_tsum_of_tendsto_sum (C := 1) ENNReal.one_ne_top (fun x y => eNorm_add_le x y) + (fun x => by rw [one_mul]) hu + calc ‖F‖ₑ ≤ ∑' j, K * b j := h1.trans (tsum_le_tsum hb) + _ = K * ∑' j, b j := ENNReal.tsum_mul_left + _ ≤ K * ((1 - (2 : ℝ≥0∞) ^ (-s))⁻¹ * lqNorm q (fun j => dyadicWeight s j * b j)) := + mul_le_mul' le_rfl (tsum_le_lqNorm_dyadicWeight hq s b) + _ = _ := (mul_assoc _ _ _).symm + +/-! ### Tails and partial sums -/ + +/-- `∑_K [j ≤ K] g K = ∑_i g (j + i)`. -/ +theorem tsum_ite_le_eq (j : ℕ) (g : ℕ → ℝ≥0∞) : + ∑' K, (if j ≤ K then g K else 0) = ∑' i, g (j + i) := by + rw [← CompleteLattice.summable.sum_add_tsum_nat_add' (k := j)] + have h0 : ∑ K ∈ Finset.range j, (if j ≤ K then g K else 0) = 0 := + Finset.sum_eq_zero fun K hK => by simp [not_le.2 (Finset.mem_range.1 hK)] + rw [h0, zero_add] + congr 1; funext i + simp only [Nat.le_add_left j i, ↓reduceIte] + rw [add_comm] + +/-- `∑_K [K ≤ j] g K = ∑_{K ≤ j} g K`. -/ +theorem tsum_ite_ge_eq (j : ℕ) (g : ℕ → ℝ≥0∞) : + ∑' K, (if K ≤ j then g K else 0) = ∑ K ∈ Finset.range (j + 1), g K := by + rw [tsum_eq_sum (s := Finset.range (j + 1)) fun K hK => by + simp [not_le.2 (by simpa using hK : j < K)]] + exact Finset.sum_congr rfl fun K hK => by + simp [Nat.lt_succ_iff.1 (Finset.mem_range.1 hK)] + +/-- **The `ℓ_q` norm of a tail is the norm of the shifted sequence**: for `0 < q < ∞`, +`‖(0, …, 0, a_N, a_{N+1}, …)‖_{ℓ_q} = ‖(a_{N+k})_k‖_{ℓ_q}` (`ENNReal.tsum_ite_le_eq`). -/ +theorem lqNorm_ite_le_eq {q : ℝ≥0∞} (hq0 : q ≠ 0) (hq : q ≠ ∞) (a : ℕ → ℝ≥0∞) (N : ℕ) : + lqNorm q (fun j => if N ≤ j then a j else 0) = lqNorm q (fun k => a (N + k)) := by + have hpos : 0 < q.toReal := ENNReal.toReal_pos hq0 hq + rw [lqNorm_eq_tsum hq0 hq, lqNorm_eq_tsum hq0 hq, ← tsum_ite_le_eq N (fun n => a n ^ q.toReal)] + congr 1 + refine tsum_congr fun j => ?_ + split_ifs <;> simp [ENNReal.zero_rpow_of_pos hpos] + +/-! ### Products of sums -/ + +/-- `a x + b y ≤ (a + b)(x + y)` in `[0, ∞]`. -/ +theorem mul_add_mul_le_add_mul_add (a b x y : ℝ≥0∞) : + a * x + b * y ≤ (a + b) * (x + y) := by + rw [add_mul, mul_add, mul_add] + exact add_le_add le_self_add le_add_self + +/-- `∑_{i ∈ s} a_i b_i ≤ (∑_{i ∈ s} a_i)(∑_{i ∈ s} b_i)` for every finite set `s` and all families +`a, b` in `[0, ∞]`: each `b_i` is at most `∑_{j ∈ s} b_j` (Mathlib's `Finset.single_le_sum`, +`Finset.sum_mul`). -/ +theorem sum_mul_le_sum_mul_sum {ι : Type*} (s : Finset ι) (a b : ι → ℝ≥0∞) : + ∑ i ∈ s, a i * b i ≤ (∑ i ∈ s, a i) * ∑ i ∈ s, b i := by + rw [Finset.sum_mul] + exact Finset.sum_le_sum fun i hi => mul_le_mul_right (Finset.single_le_sum + (fun j _ => zero_le) hi) _ + +/-- `x_0 + ∑_{j zero_le) (Finset.mem_range.2 k.succ_pos)) + (Finset.sum_le_sum_of_subset (Finset.range_mono k.le_succ)) + +/-- **Dividing by a smaller power**: if `w ≤ c v` with `0 < c < ∞` and `a ≥ 0`, then +`u / v^a ≤ c^a (u / w^a)` in `[0, ∞]`. -/ +theorem div_rpow_le_rpow_mul_div_rpow {u v w c : ℝ≥0∞} (hc0 : c ≠ 0) (hct : c ≠ ∞) + (hw : w ≤ c * v) {a : ℝ} (ha : 0 ≤ a) : u / v ^ a ≤ c ^ a * (u / w ^ a) := by + have hca0 : c ^ a ≠ 0 := (ENNReal.rpow_pos (pos_iff_ne_zero.2 hc0) hct).ne' + have hcat : c ^ a ≠ ∞ := ENNReal.rpow_ne_top_of_nonneg ha hct + calc u / v ^ a = c ^ a * u / (c ^ a * v ^ a) := (ENNReal.mul_div_mul_left _ _ hca0 hcat).symm + _ ≤ c ^ a * u / w ^ a := ENNReal.div_le_div_left (by + rw [← ENNReal.mul_rpow_of_nonneg _ _ ha] + exact ENNReal.rpow_le_rpow hw ha) _ + _ = c ^ a * (u / w ^ a) := mul_div_assoc _ _ _ + +/-- `a Y + b X + c X ≤ (a + b + c) (X + Y)` in `[0, ∞]`. -/ +theorem mul_add_mul_add_mul_le (a b c X Y : ℝ≥0∞) : + a * Y + b * X + c * X ≤ (a + b + c) * (X + Y) := + calc a * Y + b * X + c * X ≤ a * (X + Y) + b * (X + Y) + c * (X + Y) := + add_le_add (add_le_add (mul_le_mul' le_rfl le_add_self) (mul_le_mul' le_rfl le_self_add)) + (mul_le_mul' le_rfl le_self_add) + _ = (a + b + c) * (X + Y) := by ring + +/-! ### Quotients and powers -/ + +/-- `a (x + (b/a) t y) = a x + t (b y)` for `0 < a < ∞`: the rescaled decomposition term of the +K-functional under a map. -/ +theorem mul_add_div_mul_mul {a b : ℝ≥0∞} (ha0 : a ≠ 0) (ha : a ≠ ∞) (t x y : ℝ≥0∞) : + a * (x + b / a * t * y) = a * x + t * (b * y) := by + have h : a * (b / a) = b := ENNReal.mul_div_cancel ha0 ha + calc a * (x + b / a * t * y) = a * x + a * (b / a) * t * y := by ring + _ = a * x + t * (b * y) := by rw [h]; ring + +/-- `a (b/a)^θ = a^(1-θ) b^θ` for `0 < a < ∞` and every `b ∈ [0, ∞]`. For `b = ∞` the power +rule for products holds since both factors `∞` and `a⁻¹` are nonzero +(`ENNReal.mul_rpow_of_ne_zero`). -/ +theorem mul_div_rpow_eq {a b : ℝ≥0∞} (ha0 : a ≠ 0) (ha : a ≠ ∞) (θ : ℝ) : + a * (b / a) ^ θ = a ^ (1 - θ) * b ^ θ := by + have h : (b * a⁻¹) ^ θ = b ^ θ * a⁻¹ ^ θ := by + rcases eq_or_ne b ∞ with rfl | hb + · exact ENNReal.mul_rpow_of_ne_zero ENNReal.top_ne_zero (ENNReal.inv_ne_zero.2 ha) θ + · exact ENNReal.mul_rpow_of_ne_top hb (ENNReal.inv_ne_top.2 ha0) θ + rw [div_eq_mul_inv, h, ENNReal.inv_rpow, ← ENNReal.rpow_neg, sub_eq_add_neg, + ENNReal.rpow_add _ _ ha0 ha, ENNReal.rpow_one] + ring + +/-- The constant `a^(1-θ) b^θ` is finite for `0 < a, b < ∞`. -/ +theorem rpow_mul_rpow_ne_top {a b : ℝ≥0∞} (ha0 : a ≠ 0) (ha : a ≠ ∞) (hb0 : b ≠ 0) (hb : b ≠ ∞) + (θ : ℝ) : a ^ (1 - θ) * b ^ θ ≠ ∞ := + ENNReal.mul_ne_top (ENNReal.rpow_ne_top_of_ne_zero ha0 ha) (ENNReal.rpow_ne_top_of_ne_zero hb0 hb) + +/-! ### The constant of the quasi-triangle inequality -/ + +/-- Mathlib's constant `LpAddConst q` of the quasi-triangle inequality is at least `1`: it is `1` +outside `(0, 1)` and `2^(1/q - 1)` with `1/q - 1 > 0` inside. -/ +theorem one_le_LpAddConst (q : ℝ≥0∞) : 1 ≤ LpAddConst q := by + rw [LpAddConst] + split_ifs with h + · refine one_le_two_rpow ?_ + rw [one_div, sub_nonneg, ← ENNReal.toReal_inv, ← ENNReal.toReal_one] + exact ENNReal.toReal_mono (by simpa using h.1.ne') (ENNReal.one_le_inv.2 h.2.le) + · exact le_rfl + +/-- **`2^(1/q)` and the constant of the quasi-triangle inequality**: `2^(1/q) ≤ 2 C_q` for every +`q`, with Mathlib's constant `C_q = LpAddConst q` (and `1/0 = 1/∞ = 0` for the real value of +`q`). For `0 < q < 1` both sides are equal, since `C_q = 2^(1/q - 1)`; otherwise `C_q = 1` and +the left side is at most `2`. -/ +theorem two_rpow_one_div_le_two_mul_LpAddConst (q : ℝ≥0∞) : + (2 : ℝ≥0∞) ^ (1 / q.toReal) ≤ 2 * LpAddConst q := by + by_cases h : q ∈ Set.Ioo 0 1 + · rw [LpAddConst, ite_eq_left h] + refine le_of_eq ?_ + calc (2 : ℝ≥0∞) ^ (1 / q.toReal) = 2 ^ (1 : ℝ) * 2 ^ (1 / q.toReal - 1) := by + rw [two_rpow_mul_two_rpow, add_sub_cancel] + _ = 2 * 2 ^ (1 / q.toReal - 1) := by rw [rpow_one] + rw [LpAddConst, ite_eq_right h, mul_one] + calc (2 : ℝ≥0∞) ^ (1 / q.toReal) ≤ 2 ^ (1 : ℝ) := by + refine rpow_le_rpow_of_exponent_le one_le_two ?_ + rcases eq_or_ne q 0 with rfl | hq0 + · simp + rcases eq_or_ne q ∞ with rfl | hq + · simp + have hq1 : 1 ≤ q := not_lt.1 fun h1 => h ⟨pos_iff_ne_zero.2 hq0, h1⟩ + exact div_le_one_of_le₀ (one_le_toReal_of_one_le hq1 hq) toReal_nonneg + _ = 2 := rpow_one 2 + +/-- **The `ℓ_q` sum of two numbers**: `(x^q + y^q)^(1/q) ≤ C_q (x + y)` for `0 < q < ∞` and all +`x, y ∈ [0, ∞]`, with Mathlib's constant `C_q = LpAddConst q` (Mathlib's +`ENNReal.rpow_add_le_mul_rpow_add_rpow''` for `x^q` and `y^q`). -/ +theorem rpow_add_rpow_le_LpAddConst_mul {q : ℝ≥0∞} (hq0 : q ≠ 0) (hq : q ≠ ∞) (x y : ℝ≥0∞) : + (x ^ q.toReal + y ^ q.toReal) ^ (1 / q.toReal) ≤ LpAddConst q * (x + y) := by + have hp : q.toReal ≠ 0 := (ENNReal.toReal_pos hq0 hq).ne' + have h := rpow_add_le_mul_rpow_add_rpow'' (x ^ q.toReal) (y ^ q.toReal) (p := q) + rwa [rpow_rpow_inv hp, rpow_rpow_inv hp, ← one_div] at h + +end ENNReal + +/-- **Parseval's identity in `ℝ≥0∞`**: `‖x‖² = ∑_i ‖x_i‖²` for every `x ∈ ℓ²`, the series of +squares in `[0, ∞]`, from Mathlib's `lp.norm_rpow_eq_tsum` at `p = 2`. Through the coefficient +map of a Hilbert basis it computes `‖f‖²` as the sum of the squared coefficients. -/ +theorem lp.enorm_sq_eq_tsum {ι : Type*} {E : ι → Type*} [∀ i, NormedAddCommGroup (E i)] + (x : lp E 2) : ‖x‖ₑ ^ 2 = ∑' i, ‖x i‖ₑ ^ 2 := by + have h := lp.norm_rpow_eq_tsum (p := 2) (by norm_num) x + simp only [ENNReal.toReal_ofNat, Real.rpow_two] at h + rw [← ofReal_norm, ← ENNReal.ofReal_pow (norm_nonneg _), h, + ENNReal.ofReal_tsum_of_nonneg (fun _ => by positivity) + ((lp.memℓp x).summable (by norm_num) |>.congr fun i => by simp)] + congr 1; funext i + rw [ENNReal.ofReal_pow (norm_nonneg _), ofReal_norm] + +/-- `(1 + t)^N ≤ 2^N (1 + t^N)` for `t ≥ 0`, from Mathlib's `add_pow_le`. -/ +theorem one_add_pow_le_two_pow_mul {t : ℝ} (ht : 0 ≤ t) (N : ℕ) : + (1 + t) ^ N ≤ 2 ^ N * (1 + t ^ N) := by + calc (1 + t) ^ N ≤ 2 ^ (N - 1) * (1 ^ N + t ^ N) := add_pow_le zero_le_one ht N + _ ≤ 2 ^ N * (1 + t ^ N) := by + rw [one_pow] + gcongr + · exact one_le_two + · exact Nat.sub_le N 1 + +namespace MeasureTheory + +variable {α : Type*} [MeasurableSpace α] {μ : Measure α} + +/-! ### `L_p` norms of functions with values in `[0, ∞]` -/ + +/-- **Powers inside an `L_p` norm**: `‖g^r‖_p = ‖g‖_{p r}^r` for `r > 0` and `g : α → [0, ∞]` +measurable (Mathlib's `eLpNorm_eNorm_rpow`). -/ +theorem eLpNorm_fun_rpow {g : α → ℝ≥0∞} (hg : AEMeasurable g μ) {r : ℝ} (hr : 0 < r) + (p : ℝ≥0∞) : eLpNorm (fun x => g x ^ r) p μ = eLpNorm g (p * ENNReal.ofReal r) μ ^ r := by + simpa only [eNorm_eq_self] using eLpNorm_eNorm_rpow (p := p) (μ := μ) g hg.aestronglyMeasurable hr + +/-- **The `p`-th power of the `L_p` quasi-norm is subadditive for `0 < p ≤ 1`**: +`‖f + g‖_p^p ≤ ‖f‖_p^p + ‖g‖_p^p` on any measure space, for all functions `f`, `g` with values in +an additive monoid with an extended seminorm and continuous addition, such as a normed group or +`[0, ∞]`. This is Mathlib's triangle inequality `inhmgELpNorm_add_le` for +`∫ ‖f‖^p = ‖f‖_p^p` (`inhmgELpNorm_eq_eLpNorm_pow`); the `L_p` quasi-norm itself satisfies only +`‖f + g‖_p ≤ 2^(1/p - 1) (‖f‖_p + ‖g‖_p)` (`eLpNorm_add_le'`). -/ +theorem eLpNorm_add_rpow_le_of_le_one {ε : Type*} [TopologicalSpace ε] [ESeminormedAddMonoid ε] + [ContinuousAdd ε] {p : ℝ≥0∞} (hp0 : p ≠ 0) (hp1 : p ≤ 1) (f g : α → ε) : + eLpNorm (f + g) p μ ^ p.toReal ≤ eLpNorm f p μ ^ p.toReal + eLpNorm g p μ ^ p.toReal := by + rw [← inhmgELpNorm_eq_eLpNorm_pow hp1 hp0, ← inhmgELpNorm_eq_eLpNorm_pow hp1 hp0, + ← inhmgELpNorm_eq_eLpNorm_pow hp1 hp0] + exact inhmgELpNorm_add_le + +/-- **Monotone convergence for `L_p` norms**: for a directed countable family of measurable +functions `F_b : α → [0, ∞]`, `‖sup_b F_b‖_p = sup_b ‖F_b‖_p`. For `p < ∞` this is the monotone +convergence theorem for `∫ F_b^p`; for `p = ∞` it holds for every countable family. -/ +theorem eLpNorm_iSup_of_directed {β : Type*} [Countable β] {F : β → α → ℝ≥0∞} + (hF : ∀ b, AEMeasurable (F b) μ) (hd : Directed (· ≤ ·) F) (p : ℝ≥0∞) : + eLpNorm (fun x => ⨆ b, F b x) p μ = ⨆ b, eLpNorm (F b) p μ := by + have hm : AEMeasurable (fun x => ⨆ b, F b x) μ := AEMeasurable.iSup hF + rcases eq_or_ne p 0 with rfl | hp0 + · simp [eLpNorm_exponent_zero hm.aestronglyMeasurable, + eLpNorm_exponent_zero (hF _).aestronglyMeasurable] + rcases eq_or_ne p ∞ with rfl | hp + · simp only [eLpNorm_exponent_top hm.aestronglyMeasurable, + eLpNorm_exponent_top (hF _).aestronglyMeasurable, eLpNormEssSup, eNorm_eq_self] + refine le_antisymm (essSup_le_of_ae_le _ ?_) (iSup_le fun b => essSup_mono_ae ?_) + · have h : ∀ᵐ x ∂μ, ∀ b, F b x ≤ essSup (F b) μ := + ae_all_iff.2 fun b => ENNReal.ae_le_essSup (F b) + filter_upwards [h] with x hx + exact iSup_le fun b => (hx b).trans (le_iSup (fun b => essSup (F b) μ) b) + · exact Eventually.of_forall fun x => le_iSup (fun b => F b x) b + have hr : 0 < p.toReal := ENNReal.toReal_pos hp0 hp + rw [eLpNorm_eq_lintegral_rpow_eNorm_toReal hp0 hp hm.aestronglyMeasurable] + simp_rw [eLpNorm_eq_lintegral_rpow_eNorm_toReal hp0 hp (hF _).aestronglyMeasurable] + simp only [eNorm_eq_self] + have h1 : ∀ x, (⨆ b, F b x) ^ p.toReal = ⨆ b, F b x ^ p.toReal := fun x => + (ENNReal.orderIsoRpow p.toReal hr).map_iSup (fun b => F b x) + simp_rw [h1] + rw [lintegral_iSup_directed (fun b => (hF b).pow_const _) ?_] + · exact (ENNReal.orderIsoRpow (1 / p.toReal) (by positivity)).map_iSup _ + · intro b₁ b₂ + obtain ⟨c, h₁, h₂⟩ := hd b₁ b₂ + exact ⟨c, fun x => ENNReal.rpow_le_rpow (h₁ x) hr.le, + fun x => ENNReal.rpow_le_rpow (h₂ x) hr.le⟩ + +/-- **Minkowski's inequality for series** in `L_p`, `1 ≤ p ≤ ∞`, on any measure space: for +`g_i : α → [0, ∞]` indexed by a countable set, `‖∑_i g_i‖_p ≤ ∑_i ‖g_i‖_p`. If some `g_i` is not +measurable, then `‖g_i‖_p = ∞` and so is the right side. Otherwise the series is the supremum of +its finite partial sums, and this follows from Mathlib's finite version `eLpNorm_sum_le` by +monotone convergence (`MeasureTheory.eLpNorm_iSup_of_directed`). -/ +theorem eLpNorm_tsum_le {ι : Type*} [Countable ι] {g : ι → α → ℝ≥0∞} {p : ℝ≥0∞} (hp1 : 1 ≤ p) : + eLpNorm (fun x => ∑' i, g i x) p μ ≤ ∑' i, eLpNorm (g i) p μ := by + by_cases hg : ∀ i, AEMeasurable (g i) μ + swap + · obtain ⟨i, hi⟩ := not_forall.1 hg + have h : eLpNorm (g i) p μ = ∞ := + eLpNorm_of_not_aestronglyMeasurable fun h => hi h.aemeasurable + rw [tsum_eq_top_of_eq_top ⟨i, h⟩] + exact le_top + have h : (fun x => ∑' i, g i x) = fun x => ⨆ s : Finset ι, ∑ i ∈ s, g i x := by + funext x + exact tsum_eq_iSup_sum + have hmono : Monotone fun (s : Finset ι) (x : α) => ∑ i ∈ s, g i x := fun s t hst x => + Finset.sum_le_sum_of_subset hst + rw [h, eLpNorm_iSup_of_directed (fun s => Finset.aemeasurable_fun_sum s fun i _ => hg i) + hmono.directed_le p] + refine iSup_le fun s => ?_ + calc eLpNorm (fun x => ∑ i ∈ s, g i x) p μ = eLpNorm (∑ i ∈ s, g i) p μ := by + congr 1 + funext x + simp [Finset.sum_apply] + _ ≤ ∑ i ∈ s, eLpNorm (g i) p μ := eLpNorm_sum_le hp1 + _ ≤ ∑' i, eLpNorm (g i) p μ := sum_le_tsum s + +/-! ### Powers of bounded functions -/ + +/-- **Powers of a bounded function**: if `u ≤ c` almost everywhere, then +`∫ u^r ≤ c^(r-1) ∫ u` for every `r ≥ 1` and every almost everywhere measurable `u : α → [0, ∞]`, +since `u^r = u · u^(r-1) ≤ u · c^(r-1)`. -/ +theorem lintegral_rpow_le_mul_lintegral_of_ae_le {u : α → ℝ≥0∞} {c : ℝ≥0∞} {r : ℝ} (hr : 1 ≤ r) + (hu : AEMeasurable u μ) (h : ∀ᵐ x ∂μ, u x ≤ c) : + ∫⁻ x, u x ^ r ∂μ ≤ c ^ (r - 1) * ∫⁻ x, u x ∂μ := + calc ∫⁻ x, u x ^ r ∂μ ≤ ∫⁻ x, u x * c ^ (r - 1) ∂μ := + lintegral_mono_ae (h.mono fun x hx => by + rw [ENNReal.rpow_eq_mul_rpow_sub_one _ hr] + exact mul_le_mul_right (ENNReal.rpow_le_rpow hx (by linarith)) _) + _ = (∫⁻ x, u x ∂μ) * c ^ (r - 1) := lintegral_mul_const'' _ hu + _ = c ^ (r - 1) * ∫⁻ x, u x ∂μ := mul_comm _ _ + +/-- If `u ≤ c` almost everywhere, then `∫ u² ≤ c ∫ u`, for every almost everywhere measurable +`u : α → [0, ∞]`: the case `r = 2` of +`MeasureTheory.lintegral_rpow_le_mul_lintegral_of_ae_le`. -/ +theorem lintegral_sq_le_mul_lintegral_of_ae_le {u : α → ℝ≥0∞} {c : ℝ≥0∞} (hu : AEMeasurable u μ) + (h : ∀ᵐ x ∂μ, u x ≤ c) : ∫⁻ x, u x ^ 2 ∂μ ≤ c * ∫⁻ x, u x ∂μ := by + have h2 := lintegral_rpow_le_mul_lintegral_of_ae_le one_le_two hu h + norm_num [ENNReal.rpow_two] at h2 + exact h2 + +/-! ### `L_q` norms of functions that are bounded on pieces -/ + +section Pieces + +open Function Set + +variable {ι : Type*} [MeasurableSpace ι] [Countable ι] [MeasurableSingletonClass ι] + {S : ι → Set α} {c : ℝ≥0∞} {G : α → ℝ≥0∞} {a : ι → ℝ≥0∞} {q : ℝ≥0∞} + +omit [MeasurableSpace ι] [MeasurableSingletonClass ι] in +/-- **Integral of a function bounded on pieces**: if almost every point lies in one of the +disjoint measurable sets `S n`, each of measure `c`, and `G ≤ a n` on `S n`, then +`∫ G dμ ≤ c ∑_n a n`. -/ +theorem lintegral_le_of_le_on_pieces (hS : ∀ n, MeasurableSet (S n)) + (hd : Pairwise (Disjoint on S)) (hcov : ∀ᵐ x ∂μ, x ∈ ⋃ n, S n) (hμ : ∀ n, μ (S n) = c) + (h : ∀ n, ∀ x ∈ S n, G x ≤ a n) : ∫⁻ x, G x ∂μ ≤ c * ∑' n, a n := by + calc ∫⁻ x, G x ∂μ = ∫⁻ x in ⋃ n, S n, G x ∂μ := by + rw [Measure.restrict_eq_self_of_ae_mem hcov] + _ = ∑' n, ∫⁻ x in S n, G x ∂μ := lintegral_iUnion hS hd G + _ ≤ ∑' n, ∫⁻ _ in S n, a n ∂μ := tsum_le_tsum fun n => + lintegral_mono_ae ((ae_restrict_iff' (hS n)).2 (Filter.Eventually.of_forall (h n))) + _ = c * ∑' n, a n := by + simp_rw [setLIntegral_const, hμ] + rw [ENNReal.tsum_mul_right, mul_comm] + +omit [MeasurableSpace ι] [MeasurableSingletonClass ι] in +/-- **Integral of a function bounded below on pieces**: if the measurable sets `S n` are +disjoint, each of measure `c`, and `a n ≤ G` on `S n`, then `c ∑_n a n ≤ ∫ G dμ`. -/ +theorem le_lintegral_of_le_on_pieces (hS : ∀ n, MeasurableSet (S n)) + (hd : Pairwise (Disjoint on S)) (hμ : ∀ n, μ (S n) = c) + (h : ∀ n, ∀ x ∈ S n, a n ≤ G x) : c * ∑' n, a n ≤ ∫⁻ x, G x ∂μ := by + calc c * ∑' n, a n = ∑' n, ∫⁻ _ in S n, a n ∂μ := by + simp_rw [setLIntegral_const, hμ] + rw [ENNReal.tsum_mul_right, mul_comm] + _ ≤ ∑' n, ∫⁻ x in S n, G x ∂μ := tsum_le_tsum fun n => + lintegral_mono_ae ((ae_restrict_iff' (hS n)).2 (Filter.Eventually.of_forall (h n))) + _ = ∫⁻ x in ⋃ n, S n, G x ∂μ := (lintegral_iUnion hS hd G).symm + _ ≤ ∫⁻ x, G x ∂μ := setLIntegral_le_lintegral _ _ + +/-- **`L_q` norm of a function bounded on pieces**: if almost every point lies in one of the +disjoint measurable sets `S n`, each of measure `c`, and `G ≤ a n` on `S n`, then +`‖G‖_{L_q(μ)} ≤ c^(1/q) ‖a‖_{ℓ_q}` for every `q` (with `c^(1/q) = 1` for `q = ∞`). `G` is +measurable, since `eLpNorm` is `∞` otherwise. -/ +theorem eLpNorm_le_of_le_on_pieces (hG : AEStronglyMeasurable G μ) + (hS : ∀ n, MeasurableSet (S n)) (hd : Pairwise (Disjoint on S)) + (hcov : ∀ᵐ x ∂μ, x ∈ ⋃ n, S n) (hμ : ∀ n, μ (S n) = c) (h : ∀ n, ∀ x ∈ S n, G x ≤ a n) : + eLpNorm G q μ ≤ c ^ (1 / q.toReal) * ENNReal.lqNorm q a := by + rcases eq_or_ne q 0 with rfl | hq0 + · rw [eLpNorm_exponent_zero hG] + exact zero_le + rcases eq_or_ne q ∞ with rfl | hq + · rw [eLpNorm_exponent_top hG, ENNReal.lqNorm_top, ENNReal.toReal_top, div_zero, + ENNReal.rpow_zero, one_mul] + refine essSup_le_of_ae_le _ (hcov.mono fun x hx => ?_) + obtain ⟨n, hn⟩ := mem_iUnion.1 hx + simpa only [eNorm_eq_self] using (h n x hn).trans (le_iSup a n) + have hp : 0 < q.toReal := ENNReal.toReal_pos hq0 hq + rw [eLpNorm_eq_lintegral_rpow_eNorm_toReal hq0 hq hG, ENNReal.lqNorm_eq_tsum hq0 hq, + ← ENNReal.mul_rpow_of_nonneg _ _ (by positivity)] + gcongr + refine lintegral_le_of_le_on_pieces hS hd hcov hμ fun n x hx => ?_ + simp only [eNorm_eq_self] + exact ENNReal.rpow_le_rpow (h n x hx) hp.le + +/-- **`L_q` norm of a function bounded below on pieces**: if the measurable sets `S n` are +disjoint, each of measure `c ≠ 0`, and `a n ≤ G` on `S n`, then +`c^(1/q) ‖a‖_{ℓ_q} ≤ ‖G‖_{L_q(μ)}` for every `q` (with `c^(1/q) = 1` for `q = ∞`). -/ +theorem le_eLpNorm_of_le_on_pieces (hS : ∀ n, MeasurableSet (S n)) + (hd : Pairwise (Disjoint on S)) (hμ : ∀ n, μ (S n) = c) (hc : c ≠ 0) + (h : ∀ n, ∀ x ∈ S n, a n ≤ G x) : + c ^ (1 / q.toReal) * ENNReal.lqNorm q a ≤ eLpNorm G q μ := by + by_cases hG : AEStronglyMeasurable G μ + swap + · rw [eLpNorm_of_not_aestronglyMeasurable hG] + exact le_top + rcases eq_or_ne q 0 with rfl | hq0 + · simp [ENNReal.lqNorm_zero_left] + rcases eq_or_ne q ∞ with rfl | hq + · rw [eLpNorm_exponent_top hG, ENNReal.lqNorm_top, ENNReal.toReal_top, div_zero, + ENNReal.rpow_zero, one_mul] + refine iSup_le fun n => ?_ + by_contra hlt + push Not at hlt + have hae : ∀ᵐ x ∂μ, ‖G x‖ₑ < a n := ae_lt_of_essSup_lt hlt + have hsub : S n ⊆ {x | ¬ ‖G x‖ₑ < a n} := fun x hx => by + simp only [mem_ofPred_eq, eNorm_eq_self, not_lt] + exact h n x hx + exact hc ((hμ n).symm.trans (measure_mono_null hsub (ae_iff.1 hae))) + have hp : 0 < q.toReal := ENNReal.toReal_pos hq0 hq + rw [eLpNorm_eq_lintegral_rpow_eNorm_toReal hq0 hq hG, ENNReal.lqNorm_eq_tsum hq0 hq, + ← ENNReal.mul_rpow_of_nonneg _ _ (by positivity)] + gcongr + refine le_lintegral_of_le_on_pieces hS hd hμ fun n x hx => ?_ + simp only [eNorm_eq_self] + exact ENNReal.rpow_le_rpow (h n x hx) hp.le + +end Pieces + +end MeasureTheory diff --git a/LeanPool/FunctionSpaces/ApproximationSpaces/Sequences/Rearrangement.lean b/LeanPool/FunctionSpaces/ApproximationSpaces/Sequences/Rearrangement.lean new file mode 100644 index 0000000000..4d10e8d849 --- /dev/null +++ b/LeanPool/FunctionSpaces/ApproximationSpaces/Sequences/Rearrangement.lean @@ -0,0 +1,261 @@ +/- +Copyright (c) 2026 Mario Ullrich. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Mario Ullrich +-/ +module + +public import LeanPool.FunctionSpaces.ApproximationSpaces.Sequences.Dyadic +public import Mathlib.Analysis.SpecialFunctions.Pow.Integral +public import Mathlib.Topology.Instances.Real.Lemmas +public import Mathlib.Topology.Order.LiminfLimsup +public import TauCeti.Topology.Order.DecreasingRearrangement + +/- +Modified for Lean Pool: module names and imports adapted. +-/ + +/-! +# The decreasing rearrangement of a null family + +For a family `r : ι → ℝ` of nonnegative numbers that tends to zero along the cofinite filter (a +**null family**: only finitely many entries exceed any `t > 0`), the **decreasing +rearrangement** `r* : ℕ → ℝ` lists the entries in decreasing order with multiplicities, padded by +zeros. It is defined without enumerating `ι`: + +`r*_n = sup ({0} ∪ {a : a ≤ r_i for n + 1 distinct indices i})`. + +The rearrangement and its basic properties come from Tau Ceti. + +**Sums.** The project adds what best `n`-term approximation needs. The distribution functions +of `r` and `r*` agree at every positive level (`encard_setOf_lt_decreasingRearrangement`), so by +the layer cake formula for sums (`tsum_ofReal_rpow_eq_lintegral`, from Mathlib's +`lintegral_rpow_eq_lintegral_meas_lt_mul` for the counting measure) + +`∑_n (r*_n)^p = ∑_i r_i^p` for every `p > 0` + +(`tsum_ofReal_rpow_decreasingRearrangement`); in particular `(n + 1) (r*_n)^p ≤ ∑_i r_i^p`. Two +modifications of `r` compare with `r*`: removing the entries above `r*_N` leaves a family whose +`p`-th power sum is at most `∑_k min(r*_k, r*_N)^p` (`tsum_ite_rpow_le_tsum_min`), and removing +at most `N` entries leaves at least `∑_k (r*_{k+N})^p` +(`tsum_rpow_decreasingRearrangement_add_le`). Cauchy condensation of `r*` gives the **block +inequalities** + +`∑_i r_i^p ≤ (r*_0)^p + ∑_l 2^l (r*_{2^l})^p`, `∑_l 2^l (r*_{2^(l+1)})^p ≤ ∑_i r_i^p` + +(`tsum_rpow_le_decreasingRearrangement`, `tsum_two_pow_decreasingRearrangement_le`) and +`∑_l 2^l (r*_{2^l})^p ≤ 2 ∑_i r_i^p` (`tsum_two_pow_mul_decreasingRearrangement_le_two_mul`). +Sums are in `[0, ∞]`, with the terms `ENNReal.ofReal (r*_n) ^ p`. +-/ + +@[expose] public section + +open Filter Finset Topology +open scoped ENNReal + +variable {ι : Type*} {r : ι → ℝ} + +/-! ### Comparison of rearrangements -/ + +/-- **Monotonicity**: if `s_i ≤ r_i` for every `i` and `r` is bounded above, then +`s*_n ≤ r*_n`, since every lower bound of `n + 1` entries of `s` is one of `r`. -/ +theorem decreasingRearrangement_mono {s : ι → ℝ} (hsr : ∀ i, s i ≤ r i) + (hr : BddAbove (Set.range r)) (n : ℕ) : + TauCeti.decreasingRearrangement s n ≤ TauCeti.decreasingRearrangement r n := by + rw [TauCeti.decreasingRearrangement_def] + apply csSup_le ⟨0, Set.mem_insert _ _⟩ + rintro a (rfl | ⟨t, ht, ha⟩) + · exact TauCeti.decreasingRearrangement_nonneg n + · exact TauCeti.le_decreasingRearrangement hr ht fun i hi => (ha i hi).trans (hsr i) + +/-- **Removing at most `N` entries shifts the rearrangement by at most `N`**: if `r` is bounded +above and `Λ` has at most `N` elements, the family `s` equal to `r` off `Λ` and to `0` on `Λ` +has `r*_{n+N} ≤ s*_n`. For `0 ≤ t < r*_{n+N}` there are `n + N + 1` entries above `t`, and at +least `n + 1` of them lie outside `Λ`. -/ +theorem decreasingRearrangement_add_le_of_card_le [DecidableEq ι] (hr : BddAbove (Set.range r)) + {Λ : Finset ι} {N : ℕ} (hΛ : Λ.card ≤ N) (n : ℕ) : + TauCeti.decreasingRearrangement r (n + N) ≤ + TauCeti.decreasingRearrangement (fun i => if i ∈ Λ then 0 else r i) n := by + set s : ι → ℝ := fun i => if i ∈ Λ then 0 else r i + have hs : BddAbove (Set.range s) := by + obtain ⟨M, hM⟩ := hr + refine ⟨max 0 M, ?_⟩ + rintro _ ⟨i, rfl⟩ + by_cases hi : i ∈ Λ + · simp [s, hi] + · simp only [s, hi, ite_false]; exact (hM ⟨i, rfl⟩).trans (le_max_right _ _) + refine le_of_forall_lt fun t ht => ?_ + rcases lt_or_ge t 0 with ht0 | ht0 + · exact ht0.trans_le (TauCeti.decreasingRearrangement_nonneg n) + obtain ⟨u, hu, hut⟩ := (TauCeti.lt_decreasingRearrangement_iff hr ht0 (n + N)).1 ht + have hcard : n + 1 ≤ (u \ Λ).card := by + have := le_card_sdiff Λ u + omega + obtain ⟨v, hvu, hv⟩ := exists_subset_card_eq hcard + refine (TauCeti.lt_decreasingRearrangement_iff hs ht0 n).2 ⟨v, hv, fun i hi => ?_⟩ + obtain ⟨hiu, hiΛ⟩ := mem_sdiff.1 (hvu hi) + simpa only [s, hiΛ, ite_false] using hut i hiu + +/-! ### Sums of powers -/ + +/-- **The layer cake formula for sums**: for a nonnegative family `g` on any index set and +`p > 0`, `∑_a g(a)^p = p ∫_0^∞ #{a : t < g(a)} t^(p-1) dt`. It is Mathlib's +`lintegral_rpow_eq_lintegral_meas_lt_mul` for the counting measure on the discrete +`σ`-algebra. -/ +theorem tsum_ofReal_rpow_eq_lintegral {α : Type*} {g : α → ℝ} (hg : ∀ a, 0 ≤ g a) {p : ℝ} + (hp : 0 < p) : + ∑' a, ENNReal.ofReal (g a) ^ p = ENNReal.ofReal p * + ∫⁻ t in Set.Ioi 0, {a | t < g a}.encard * ENNReal.ofReal (t ^ (p - 1)) := by + let _ : MeasurableSpace α := ⊤ + have hms (s : Set α) : MeasurableSet s := MeasurableSpace.measurableSet_top + have : MeasurableSingletonClass α := ⟨fun _ => hms _⟩ + have h := MeasureTheory.lintegral_rpow_eq_lintegral_meas_lt_mul MeasureTheory.Measure.count + (Filter.Eventually.of_forall hg) measurable_from_top.aemeasurable hp + rw [MeasureTheory.lintegral_count] at h + simp_rw [ENNReal.ofReal_rpow_of_nonneg (hg _) hp.le, h, + MeasureTheory.Measure.count_apply (hms _)] + +/-- **Equal distribution functions**: for a null family and `t > 0`, the number of terms of `r*` +above `t` is the number of entries of `r` above `t`. -/ +theorem encard_setOf_lt_decreasingRearrangement (hr : Tendsto r cofinite (𝓝 0)) {t : ℝ} + (ht : 0 < t) : {n | t < TauCeti.decreasingRearrangement r n}.encard = {i | t < r i}.encard := by + have hfin : {i | t < r i}.Finite := by + simpa only [Filter.eventually_cofinite, not_le] using hr.eventually_le_const ht + rw [TauCeti.setOf_lt_decreasingRearrangement ht.le hfin, hfin.encard_eq_coe_toFinset_card, + ← Finset.coe_range, Set.encard_coe_eq_coe_finsetCard, Finset.card_range] + +/-- **Rearrangement preserves sums of powers**: for a nonnegative null family and `p > 0`, +`∑_n (r*_n)^p = ∑_i r_i^p`. Both sides are given by the layer cake formula +(`tsum_ofReal_rpow_eq_lintegral`), and the distribution functions agree at every positive level +(`encard_setOf_lt_decreasingRearrangement`). -/ +theorem tsum_ofReal_rpow_decreasingRearrangement (hr0 : ∀ i, 0 ≤ r i) + (hr : Tendsto r cofinite (𝓝 0)) {p : ℝ} (hp : 0 < p) : + ∑' n, ENNReal.ofReal (TauCeti.decreasingRearrangement r n) ^ p = ∑' i, ENNReal.ofReal (r i) ^ + p := by + rw [tsum_ofReal_rpow_eq_lintegral (fun n => TauCeti.decreasingRearrangement_nonneg n) hp, + tsum_ofReal_rpow_eq_lintegral hr0 hp] + congr 1 + refine MeasureTheory.setLIntegral_congr_fun measurableSet_Ioi fun t ht => ?_ + rw [encard_setOf_lt_decreasingRearrangement hr ht] + +/-- **The weak-type bound**: `(n + 1) (r*_n)^p ≤ ∑_i r_i^p` for a nonnegative null family and +`p > 0`, since `r*_0, …, r*_n` are all at least `r*_n`. -/ +theorem succ_mul_rpow_decreasingRearrangement_le (hr0 : ∀ i, 0 ≤ r i) + (hr : Tendsto r cofinite (𝓝 0)) {p : ℝ} (hp : 0 < p) (n : ℕ) : + ((n + 1 : ℕ) : ℝ≥0∞) * ENNReal.ofReal (TauCeti.decreasingRearrangement r n) ^ p ≤ + ∑' i, ENNReal.ofReal (r i) ^ p := by + rw [← tsum_ofReal_rpow_decreasingRearrangement hr0 hr hp] + calc ((n + 1 : ℕ) : ℝ≥0∞) * ENNReal.ofReal (TauCeti.decreasingRearrangement r n) ^ p + = ∑ _k ∈ range (n + 1), ENNReal.ofReal (TauCeti.decreasingRearrangement r n) ^ p := by + rw [sum_const, card_range, nsmul_eq_mul] + _ ≤ ∑ k ∈ range (n + 1), ENNReal.ofReal (TauCeti.decreasingRearrangement r k) ^ p := by + gcongr with k hk + exact TauCeti.antitone_decreasingRearrangement (Nat.lt_succ_iff.1 (mem_range.1 hk)) + _ ≤ _ := sum_le_tsum _ + +/-- `(r*_n)^p ≤ ∑_i r_i^p` for a nonnegative null family and `p > 0`. -/ +theorem rpow_decreasingRearrangement_le_tsum (hr0 : ∀ i, 0 ≤ r i) + (hr : Tendsto r cofinite (𝓝 0)) {p : ℝ} (hp : 0 < p) (n : ℕ) : + ENNReal.ofReal (TauCeti.decreasingRearrangement r n) ^ p ≤ ∑' i, ENNReal.ofReal (r i) ^ p := + le_trans (le_mul_of_one_le_left zero_le (by exact_mod_cast Nat.succ_pos n)) + (succ_mul_rpow_decreasingRearrangement_le hr0 hr hp n) + +/-- A nonnegative family below a null family is null. -/ +private theorem tendsto_of_le {s : ι → ℝ} (hs0 : ∀ i, 0 ≤ s i) (hsr : ∀ i, s i ≤ r i) + (hr : Tendsto r cofinite (𝓝 0)) : Tendsto s cofinite (𝓝 0) := + tendsto_of_tendsto_of_tendsto_of_le_of_le tendsto_const_nhds hr hs0 hsr + +/-- **The tail above `r*_N` removed**: for a nonnegative null family and `p > 0`, the entries +`r_i ≤ r*_N` satisfy `∑_{r_i ≤ r*_N} r_i^p ≤ ∑_k min((r*_k)^p, (r*_N)^p)`. The family `s` with +the entries above `r*_N` set to `0` has `s ≤ r` and `s ≤ r*_N`, so `s*_k ≤ min(r*_k, r*_N)`, and +its power sum is that of `s*`. -/ +theorem tsum_ite_rpow_le_tsum_min (hr0 : ∀ i, 0 ≤ r i) (hr : Tendsto r cofinite (𝓝 0)) + {p : ℝ} (hp : 0 < p) (N : ℕ) : + ∑' i, (if TauCeti.decreasingRearrangement r N < r i then 0 else ENNReal.ofReal (r i) ^ p) ≤ + ∑' k, min (ENNReal.ofReal (TauCeti.decreasingRearrangement r k) ^ p) + (ENNReal.ofReal (TauCeti.decreasingRearrangement r N) ^ p) := by + set c := TauCeti.decreasingRearrangement r N + set s : ι → ℝ := fun i => if c < r i then 0 else r i + have hs0 : ∀ i, 0 ≤ s i := fun i => by + by_cases hi : c < r i <;> simp [s, hi, hr0 i] + have hsr : ∀ i, s i ≤ r i := fun i => by + by_cases hi : c < r i <;> simp [s, hi, hr0 i] + have hsc : ∀ i, s i ≤ c := fun i => by + by_cases hi : c < r i + · simpa [s, hi] using TauCeti.decreasingRearrangement_nonneg (r := r) N + · rw [show s i = r i by simp [s, hi]]; exact le_of_not_gt hi + have hterm : ∀ i, (if c < r i then 0 else ENNReal.ofReal (r i) ^ p) = + ENNReal.ofReal (s i) ^ p := fun i => by + by_cases hi : c < r i <;> simp [s, hi, ENNReal.zero_rpow_of_pos hp] + simp_rw [hterm] + rw [← tsum_ofReal_rpow_decreasingRearrangement hs0 (tendsto_of_le hs0 hsr hr) hp] + refine tsum_le_tsum fun k => le_min ?_ ?_ + · gcongr + exact decreasingRearrangement_mono hsr hr.bddAbove_range_of_cofinite k + · gcongr + exact TauCeti.decreasingRearrangement_le_of_card_le (TauCeti.decreasingRearrangement_nonneg N) + (s := ∅) (Nat.zero_le k) fun i _ => hsc i + +/-- **At most `N` entries removed**: for a nonnegative null family, `p > 0` and a set `Λ` of at +most `N` indices, `∑_k (r*_{k+N})^p ≤ ∑_{i ∉ Λ} r_i^p`. The family with the entries in `Λ` set +to `0` has power sum `∑_k (s*_k)^p`, and `r*_{k+N} ≤ s*_k` +(`decreasingRearrangement_add_le_of_card_le`). -/ +theorem tsum_rpow_decreasingRearrangement_add_le [DecidableEq ι] (hr0 : ∀ i, 0 ≤ r i) + (hr : Tendsto r cofinite (𝓝 0)) {p : ℝ} (hp : 0 < p) {Λ : Finset ι} {N : ℕ} + (hΛ : Λ.card ≤ N) : + ∑' k, ENNReal.ofReal (TauCeti.decreasingRearrangement r (k + N)) ^ p ≤ + ∑' i, if i ∈ Λ then 0 else ENNReal.ofReal (r i) ^ p := by + set s : ι → ℝ := fun i => if i ∈ Λ then 0 else r i + have hs0 : ∀ i, 0 ≤ s i := fun i => by by_cases hi : i ∈ Λ <;> simp [s, hi, hr0 i] + have hsr : ∀ i, s i ≤ r i := fun i => by by_cases hi : i ∈ Λ <;> simp [s, hi, hr0 i] + have hterm : ∀ i, (if i ∈ Λ then 0 else ENNReal.ofReal (r i) ^ p) = + ENNReal.ofReal (s i) ^ p := fun i => by + by_cases hi : i ∈ Λ <;> simp [s, hi, ENNReal.zero_rpow_of_pos hp] + simp_rw [hterm] + rw [← tsum_ofReal_rpow_decreasingRearrangement hs0 (tendsto_of_le hs0 hsr hr) hp] + refine tsum_le_tsum fun k => ?_ + gcongr + exact decreasingRearrangement_add_le_of_card_le hr.bddAbove_range_of_cofinite hΛ k + +/-! ### The block inequalities -/ + +/-- The terms `(r*_n)^p` decrease in `n`. -/ +private theorem antitone_rpow_decreasingRearrangement {p : ℝ} (hp : 0 ≤ p) : + Antitone fun n => ENNReal.ofReal (TauCeti.decreasingRearrangement r n) ^ p := fun _ _ h => by + dsimp only; gcongr; exact TauCeti.antitone_decreasingRearrangement h + +/-- **Upper block inequality**: for a nonnegative null family and `p > 0`, +`∑_i r_i^p ≤ (r*_0)^p + ∑_l 2^l (r*_{2^l})^p`, Cauchy condensation of the decreasing sequence +`(r*_n)^p` (`ENNReal.tsum_pow_mul_le_dyadic`) together with +`tsum_ofReal_rpow_decreasingRearrangement`. -/ +theorem tsum_rpow_le_decreasingRearrangement (hr0 : ∀ i, 0 ≤ r i) + (hr : Tendsto r cofinite (𝓝 0)) {p : ℝ} (hp : 0 < p) : + ∑' i, ENNReal.ofReal (r i) ^ p ≤ ENNReal.ofReal (TauCeti.decreasingRearrangement r 0) ^ p + + ∑' l, 2 ^ l * ENNReal.ofReal (TauCeti.decreasingRearrangement r (2 ^ l)) ^ p := by + have h := ENNReal.tsum_pow_mul_le_dyadic (antitone_rpow_decreasingRearrangement (r := r) hp.le) 0 + simp only [ENNReal.rpow_zero, one_mul, max_self, zero_add, ENNReal.dyadicWeight_eq_pow, + ENNReal.rpow_one] at h + rwa [tsum_ofReal_rpow_decreasingRearrangement hr0 hr hp] at h + +/-- **Lower block inequality**: for a nonnegative null family and `p > 0`, +`∑_l 2^l (r*_{2^(l+1)})^p ≤ ∑_i r_i^p`, the lower condensation bound +(`ENNReal.dyadic_le_tsum_pow_mul`) for `(r*_n)^p`. -/ +theorem tsum_two_pow_decreasingRearrangement_le (hr0 : ∀ i, 0 ≤ r i) + (hr : Tendsto r cofinite (𝓝 0)) {p : ℝ} (hp : 0 < p) : + ∑' l, 2 ^ l * ENNReal.ofReal (TauCeti.decreasingRearrangement r (2 ^ (l + 1))) ^ p ≤ + ∑' i, ENNReal.ofReal (r i) ^ p := by + have h := ENNReal.dyadic_le_tsum_pow_mul (antitone_rpow_decreasingRearrangement (r := r) hp.le) 0 + simp only [ENNReal.rpow_zero, one_mul, neg_zero, max_self, zero_add, + ENNReal.dyadicWeight_eq_pow, ENNReal.rpow_one] at h + rwa [tsum_ofReal_rpow_decreasingRearrangement hr0 hr hp] at h + +/-- **The dyadic sum of the rearrangement**: for a nonnegative null family and `p > 0`, +`∑_l 2^l (r*_{2^l})^p ≤ 2 ∑_i r_i^p`, condensation with constant `2` +(`ENNReal.tsum_two_pow_mul_le_two_mul`) for the decreasing sequence `(r*_n)^p`, together with +`tsum_ofReal_rpow_decreasingRearrangement`. -/ +theorem tsum_two_pow_mul_decreasingRearrangement_le_two_mul (hr0 : ∀ i, 0 ≤ r i) + (hr : Tendsto r cofinite (𝓝 0)) {p : ℝ} (hp : 0 < p) : + ∑' l, 2 ^ l * ENNReal.ofReal (TauCeti.decreasingRearrangement r (2 ^ l)) ^ p ≤ + 2 * ∑' i, ENNReal.ofReal (r i) ^ p := by + rw [← tsum_ofReal_rpow_decreasingRearrangement hr0 hr hp] + exact ENNReal.tsum_two_pow_mul_le_two_mul (antitone_rpow_decreasingRearrangement hp.le) diff --git a/LeanPool/FunctionSpaces/ApproximationSpaces/Space.lean b/LeanPool/FunctionSpaces/ApproximationSpaces/Space.lean new file mode 100644 index 0000000000..bbf9bf70dd --- /dev/null +++ b/LeanPool/FunctionSpaces/ApproximationSpaces/Space.lean @@ -0,0 +1,158 @@ +/- +Copyright (c) 2026 Mario Ullrich. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Mario Ullrich +-/ +module + +public import LeanPool.FunctionSpaces.ApproximationSpaces.Dyadic + +/- +Modified for Lean Pool: module names and imports adapted. +-/ + +/-! +# The linear structure of `A^s_q` + +For `s ≥ 0` and `1 ≤ q ≤ ∞` the approximation space `A^s_q` is a linear subspace of `X`, and +its quasi-norm satisfies the **quasi-triangle inequality** + +`‖f + g‖_{A^s_q} ≤ C (‖f‖_{A^s_q} + ‖g‖_{A^s_q})` + +(`approxNormDyadic_add_le` with `C = 2 · 2^s` for the dyadic quasi-norm, `approxNorm_add_le` +with `C = 8 · (2^s)^3` for Pietsch's; these constants are not optimised). The reason is +`E_{2n}(f + g) ≤ E_n(f) + E_n(g)`: in the dyadic form, the errors of `f + g` at `2^(k+1)` are +controlled by those of `f` and `g` at `2^k`, at the cost of the factor `2^s`. + +`ApproximationScheme.approxSpace A s q hs hq` is `A^s_q` as a `Submodule ℝ X`. A `Submodule` +must carry the proof that it is closed under addition, which holds for `s ≥ 0` and `q ≥ 1`; +hence the two hypotheses are arguments of the definition. The approximants themselves lie in +every `A^s_q` (`memApprox_of_mem`), and for `s > 0` the space lies in the closure of `⋃ A n`. +-/ + +@[expose] public section + +open scoped ENNReal + +namespace ApproximationScheme + +open ENNReal (lqNorm dyadicWeight) + +variable {X : Type*} [NormedAddCommGroup X] [NormedSpace ℝ X] + +variable {A : ApproximationScheme X} {s : ℝ} {q : ℝ≥0∞} + +/-- The dyadic sequence of `f + g` at `k + 1` is controlled by those of `f` and `g` at `k`. -/ +theorem approxSeqDyadic_add_le_succ (f g : X) (k : ℕ) : + A.approxSeqDyadic s (f + g) (k + 1) ≤ + 2 ^ s * (A.approxSeqDyadic s f k + A.approxSeqDyadic s g k) := by + rw [approxSeqDyadic, ENNReal.dyadicWeight_succ, mul_assoc, approxSeqDyadic, approxSeqDyadic, + ← mul_add] + gcongr + exact approxError_add_le_pow_succ k f g + +/-- **Quasi-triangle inequality** for the dyadic quasi-norm, with constant `2 · 2^s`. -/ +theorem approxNormDyadic_add_le (hq : 1 ≤ q) (hs : 0 ≤ s) (f g : X) : + A.approxNormDyadic s q (f + g) ≤ + 2 * 2 ^ s * (A.approxNormDyadic s q f + A.approxNormDyadic s q g) := by + have h2s := ENNReal.one_le_two_rpow hs + have hfg : ‖f + g‖ₑ ≤ ‖f‖ₑ + ‖g‖ₑ := eNorm_add_le f g + have hD : lqNorm q (A.approxSeqDyadic s (f + g)) ≤ (‖f‖ₑ + ‖g‖ₑ) + + 2 ^ s * (lqNorm q (A.approxSeqDyadic s f) + lqNorm q (A.approxSeqDyadic s g)) := by + refine (ENNReal.lqNorm_le_head_add_shift hq _).trans (add_le_add ?_ ?_) + · rw [approxSeqDyadic_zero]; exact (approxError_le_enorm _ 1).trans hfg + · calc lqNorm q (fun k => A.approxSeqDyadic s (f + g) (k + 1)) + ≤ lqNorm q (fun k => 2 ^ s * (A.approxSeqDyadic s f k + A.approxSeqDyadic s g k)) := + ENNReal.lqNorm_mono fun k => approxSeqDyadic_add_le_succ f g k + _ = 2 ^ s * lqNorm q (fun k => A.approxSeqDyadic s f k + A.approxSeqDyadic s g k) := + ENNReal.lqNorm_const_mul _ _ + _ ≤ _ := by gcongr; exact ENNReal.lqNorm_add_le hq _ _ + calc A.approxNormDyadic s q (f + g) = ‖f + g‖ₑ + lqNorm q (A.approxSeqDyadic s (f + g)) := rfl + _ ≤ (‖f‖ₑ + ‖g‖ₑ) + ((‖f‖ₑ + ‖g‖ₑ) + + 2 ^ s * (lqNorm q (A.approxSeqDyadic s f) + lqNorm q (A.approxSeqDyadic s g))) := + add_le_add hfg hD + _ = 2 * (‖f‖ₑ + ‖g‖ₑ) + + 2 ^ s * (lqNorm q (A.approxSeqDyadic s f) + lqNorm q (A.approxSeqDyadic s g)) := by ring + _ ≤ 2 * 2 ^ s * (‖f‖ₑ + ‖g‖ₑ) + + 2 * 2 ^ s * (lqNorm q (A.approxSeqDyadic s f) + lqNorm q (A.approxSeqDyadic s g)) := by + gcongr + · exact le_mul_of_one_le_right' h2s + · exact le_mul_of_one_le_left' one_le_two + _ = 2 * 2 ^ s * (A.approxNormDyadic s q f + A.approxNormDyadic s q g) := by + simp only [approxNormDyadic]; ring + +/-- **Quasi-triangle inequality** for Pietsch's quasi-norm, with the (not optimised) constant +`8 · (2^s)^3`, obtained through the dyadic quasi-norm. -/ +theorem approxNorm_add_le (hq : 1 ≤ q) (hs : 0 ≤ s) (f g : X) : + A.approxNorm s q (f + g) ≤ 8 * (2 ^ s) ^ 3 * (A.approxNorm s q f + A.approxNorm s q g) := by + calc A.approxNorm s q (f + g) ≤ 2 ^ s * A.approxNormDyadic s q (f + g) := + approxNorm_le_approxNormDyadic hq hs _ + _ ≤ 2 ^ s * (2 * 2 ^ s * (A.approxNormDyadic s q f + A.approxNormDyadic s q g)) := by + gcongr; exact approxNormDyadic_add_le hq hs f g + _ ≤ 2 ^ s * (2 * 2 ^ s * (4 * 2 ^ s * A.approxNorm s q f + 4 * 2 ^ s * A.approxNorm s q g)) := + by + gcongr <;> exact approxNormDyadic_le_approxNorm hq hs _ + _ = 8 * (2 ^ s) ^ 3 * (A.approxNorm s q f + A.approxNorm s q g) := by ring + +/-- For `s ≥ 0` and `q ≥ 1`, `A^s_q` is closed under addition. -/ +theorem MemApprox.add (hq : 1 ≤ q) (hs : 0 ≤ s) {f g : X} (hf : A.MemApprox s q f) + (hg : A.MemApprox s q g) : A.MemApprox s q (f + g) := by + rw [memApprox_iff_approxNormDyadic_lt_top hq hs] at hf hg ⊢ + exact (approxNormDyadic_add_le hq hs f g).trans_lt (ENNReal.mul_lt_top + (ENNReal.mul_lt_top (by norm_num) (ENNReal.two_rpow_ne_top s).lt_top) + (ENNReal.add_lt_top.2 ⟨hf, hg⟩)) + +/-- For `s ≥ 0` and `q ≥ 1`, `A^s_q` is closed under subtraction. -/ +theorem MemApprox.sub (hq : 1 ≤ q) (hs : 0 ≤ s) {f g : X} (hf : A.MemApprox s q f) + (hg : A.MemApprox s q g) : A.MemApprox s q (f - g) := by + simpa [sub_eq_add_neg] using hf.add hq hs hg.neg + +/-- For `s ≥ 0` and `q ≥ 1`, `A^s_q` is closed under finite sums. -/ +theorem MemApprox.sum (hq : 1 ≤ q) (hs : 0 ≤ s) {ι : Type*} (t : Finset ι) {f : ι → X} + (hf : ∀ i ∈ t, A.MemApprox s q (f i)) : A.MemApprox s q (∑ i ∈ t, f i) := + Finset.sum_induction f (A.MemApprox s q) (fun _ _ ha hb => ha.add hq hs hb) + (memApprox_zero s q) hf + +/-- **Approximants lie in every approximation space**: an element of `A m` has only finitely +many nonzero dyadic errors. -/ +theorem memApprox_of_mem (hq : 1 ≤ q) (hs : 0 ≤ s) {m : ℕ} {a : X} (ha : a ∈ A m) : + A.MemApprox s q a := by + rw [memApprox_iff_lqNorm_dyadic_lt_top hq hs] + have hzero : ∀ k ∉ Finset.range m, A.approxSeqDyadic s a k = 0 := fun k hk => by + have hmk : m ≤ 2 ^ k := + (not_lt.1 (Finset.mem_range.not.1 hk)).trans (Nat.lt_two_pow_self).le + rw [approxSeqDyadic, approxError_eq_zero_of_mem (A.mono hmk ha), mul_zero] + calc lqNorm q (A.approxSeqDyadic s a) ≤ ∑' k, A.approxSeqDyadic s a k := + ENNReal.lqNorm_le_lqNorm_one hq _ + _ = ∑ k ∈ Finset.range m, A.approxSeqDyadic s a k := tsum_eq_sum hzero + _ < ∞ := ENNReal.sum_lt_top.2 fun k _ => + ENNReal.mul_lt_top (ENNReal.dyadicWeight_lt_top s k) (approxError_ne_top a _).lt_top + +variable (A) + +/-- The **approximation space** `A^s_q` as a real subspace of `X`, for `s ≥ 0`, `1 ≤ q ≤ ∞`. -/ +def approxSpace (s : ℝ) (q : ℝ≥0∞) (hs : 0 ≤ s) (hq : 1 ≤ q) : Submodule ℝ X where + carrier := {f | A.MemApprox s q f} + zero_mem' := memApprox_zero s q + add_mem' hf hg := MemApprox.add hq hs hf hg + smul_mem' c _ hf := MemApprox.smul hf c + +variable {A} + +/-- Membership in the approximation space as a submodule. -/ +@[simp] +theorem mem_approxSpace {hs : 0 ≤ s} {hq : 1 ≤ q} {f : X} : + f ∈ A.approxSpace s q hs hq ↔ A.MemApprox s q f := Iff.rfl + +/-- `⋃ A n ⊆ A^s_q`. -/ +theorem iUnion_subset_approxSpace (hs : 0 ≤ s) (hq : 1 ≤ q) : + (⋃ n, A n) ⊆ A.approxSpace s q hs hq := fun _ hf => + let ⟨_, hn⟩ := Set.mem_iUnion.1 hf + memApprox_of_mem hq hs hn + +/-- For `s > 0`, `A^s_q` lies in the closure of `⋃ A n`. -/ +theorem approxSpace_subset_closure (hs : 0 < s) (hq : 1 ≤ q) : + (A.approxSpace s q hs.le hq : Set X) ⊆ closure (⋃ n, A n) := fun _ hf => + mem_closure_iUnion_of_memApprox hq hs hf + +end ApproximationScheme diff --git a/LeanPool/FunctionSpaces/ApproximationSpaces/Trace.lean b/LeanPool/FunctionSpaces/ApproximationSpaces/Trace.lean new file mode 100644 index 0000000000..5864f41947 --- /dev/null +++ b/LeanPool/FunctionSpaces/ApproximationSpaces/Trace.lean @@ -0,0 +1,542 @@ +/- +Copyright (c) 2026 Mario Ullrich. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Mario Ullrich +-/ +module + +public import LeanPool.FunctionSpaces.ApproximationSpaces.Decompositions.Blocks +public import LeanPool.FunctionSpaces.ApproximationSpaces.Nikolskii +public import Mathlib.LinearAlgebra.Basis.VectorSpace + +/- +Modified for Lean Pool: module names and imports adapted. +-/ + +/-! +# The trace theorem + +A **trace bound** is a linear map `T : X → Y` that is controlled only on the approximants: it +maps `A n` into the sets `B n` of a scheme in `Y`, and + +`‖T a‖_Y ≤ C n^β ‖a‖_X` for `a ∈ A n`, `n ≥ 1` (`ApproximationScheme.TraceBound`). + +The restriction of functions to a hyperplane is the model: it is defined on continuous +functions, unbounded on `L_p`, and on trigonometric polynomials of degree `< n` it satisfies +the bound with `β = 1/p`. The values of `T` away from the approximants play no role; a linear +map given only on `⋃ n, A n` extends to `X` by `LinearMap.exists_extend` +(`TraceBound.ofSubmodule`). + +For `f ∈ A^β_1` the **trace** `TraceBound.ext f` is the limit of `T a_k` for near-best +approximants `a_k ∈ A (2^k)`. It does not depend on the approximants +(`TraceBound.tendsto_ext`), agrees with `T` on the approximants (`TraceBound.ext_eq_of_mem`), +is linear (`TraceBound.extLinear`) and is bounded by the dyadic norm of `A^β_1` +(`TraceBound.enorm_ext_le`). + +* **Transfer** (`TraceBound.approxNormDyadic_ext_le`): for `0 ≤ β < s` and `1 ≤ q ≤ ∞` the + trace maps `A^s_q(X)` into `B^{s-β}_q(Y)`. The proof ends with the transfer estimate + (`approxNormDyadic_le_of_tail`) of the Nikolskii transfer theorem, which is the case + `T = ι⁻¹` on the approximants. +* **Surjectivity** (`TraceBound.exists_ext_eq`): if every `b ∈ B (2^k)` is `T a` for some + `a ∈ A (2^(k+γ))` with `‖a‖ ≤ C' 2^(-kβ) ‖b‖`, then every `g ∈ B^s_q(Y)`, `s > 0`, is the + trace of some `f ∈ A^{s+β}_q(X)` with `‖f‖ ≲ ‖g‖`. The proof lifts the blocks of the block + decomposition of `g` (`ApproximationSpaces.Decompositions.Blocks`). +-/ + +@[expose] public section + +open Filter Topology Finset +open scoped ENNReal + +namespace ApproximationScheme + +open ENNReal (lqNorm dyadicWeight) + +variable {X Y : Type*} [NormedAddCommGroup X] [NormedSpace ℝ X] + [NormedAddCommGroup Y] [NormedSpace ℝ Y] + +/-- A **trace bound** of exponent `β` from the scheme `A` in `X` to the scheme `B` in `Y`: a +linear map `T` with `T (A n) ⊆ B n` and `‖T a‖ ≤ C n^β ‖a‖` for `a ∈ A n`, `n ≥ 1`. Only the +values of `T` on the approximants matter. -/ +structure TraceBound (A : ApproximationScheme X) (B : ApproximationScheme Y) (β : ℝ) where + /-- The map on the approximants, extended linearly to `X`. -/ + T : X →ₗ[ℝ] Y + mapsTo : ∀ n, ∀ a ∈ A n, T a ∈ B n + /-- The constant of the trace inequality. -/ + C : ℝ≥0∞ + C_ne_top : C ≠ ∞ + bound : ∀ n : ℕ, 1 ≤ n → ∀ a ∈ A n, ‖T a‖ₑ ≤ C * (n : ℝ≥0∞) ^ β * ‖a‖ₑ + +/-- The constant `2 C 4^β` by which the trace of a dyadic block exceeds `2^(kβ)` times its +error. -/ +noncomputable def traceConst (C : ℝ≥0∞) (β : ℝ) : ℝ≥0∞ := 2 * C * dyadicWeight β 2 + +/-- The constant `2 C 4^β` is finite. -/ +theorem traceConst_ne_top {C : ℝ≥0∞} (hC : C ≠ ∞) (β : ℝ) : traceConst C β ≠ ∞ := + ENNReal.mul_ne_top (ENNReal.mul_ne_top (by norm_num) hC) (ENNReal.dyadicWeight_ne_top β 2) + +/-- The constant of the trace transfer theorem, `3 C + 3 K (1 - 2^(-(s-β)))⁻¹ + 2 K` with +`K = traceConst C β`. -/ +noncomputable def traceTransferConst (C : ℝ≥0∞) (β s : ℝ) : ℝ≥0∞ := + 3 * C + 3 * traceConst C β * (1 - (2 : ℝ≥0∞) ^ (-(s - β)))⁻¹ + 2 * traceConst C β + +/-- The constant of the trace transfer theorem is finite for `β < s`. -/ +theorem traceTransferConst_ne_top {C : ℝ≥0∞} (hC : C ≠ ∞) {β s : ℝ} (h : β < s) : + traceTransferConst C β s ≠ ∞ := by + have h1 := traceConst_ne_top hC β + have h2 := ENNReal.one_sub_two_rpow_neg_inv_ne_top (sub_pos.2 h) + unfold traceTransferConst + exact ENNReal.add_ne_top.2 ⟨ENNReal.add_ne_top.2 + ⟨ENNReal.mul_ne_top (by norm_num) hC, + ENNReal.mul_ne_top (ENNReal.mul_ne_top (by norm_num) h1) h2⟩, + ENNReal.mul_ne_top (by norm_num) h1⟩ + +/-- The constant of the trace surjectivity theorem, +`2 (1 - 2^(-(s+β)))⁻¹ 2^(γ(s+β)) C' (3·2^s + 4·4^s)`. -/ +noncomputable def traceSurjConst (C' : ℝ≥0∞) (β s : ℝ) (γ : ℕ) : ℝ≥0∞ := + 2 * (1 - (2 : ℝ≥0∞) ^ (-(s + β)))⁻¹ * dyadicWeight (s + β) γ * C' * + (3 * 2 ^ s + 4 * dyadicWeight s 2) + +/-- The constant of the trace surjectivity theorem is finite for `s + β > 0`. -/ +theorem traceSurjConst_ne_top {C' : ℝ≥0∞} (hC' : C' ≠ ∞) {β s : ℝ} (h : 0 < s + β) (γ : ℕ) : + traceSurjConst C' β s γ ≠ ∞ := by + unfold traceSurjConst + refine ENNReal.mul_ne_top (ENNReal.mul_ne_top (ENNReal.mul_ne_top (ENNReal.mul_ne_top + (by norm_num) (ENNReal.one_sub_two_rpow_neg_inv_ne_top h)) + (ENNReal.dyadicWeight_ne_top _ γ)) hC') (ENNReal.add_ne_top.2 ⟨?_, ?_⟩) + · exact ENNReal.mul_ne_top (by norm_num) + (ENNReal.two_rpow_ne_top _) + · exact ENNReal.mul_ne_top (by norm_num) (ENNReal.dyadicWeight_ne_top s 2) + +/-- The canonical near-best approximants with tolerances `2^(-k(β+1))`, used to define the +trace. -/ +noncomputable def canonicalApprox (A : ApproximationScheme X) (β : ℝ) (f : X) : + A.DyadicApprox f (dyadicWeight (-(β + 1))) := + (exists_dyadicApprox A f (fun k => ENNReal.dyadicWeight_ne_zero _ k)).some + +/-- An approximant lies in the subspace spanned by all approximants. -/ +theorem mem_iUnionSubmodule {A : ApproximationScheme X} {n : ℕ} {a : X} (ha : a ∈ A n) : + a ∈ A.iUnionSubmodule := by + rw [← SetLike.mem_coe, coe_iUnionSubmodule] + exact Set.mem_iUnion.2 ⟨n, ha⟩ + +/-- For a dyadic approximation with `∑_k 2^(kβ) (E_{2^k}(f) + t_k) < ∞`, the weighted errors +`2^(kβ) ‖f - a_k‖` tend to `0`. -/ +theorem DyadicApprox.tendsto_dyadicWeight_mul_enorm_sub {A : ApproximationScheme X} {f : X} + {t : ℕ → ℝ≥0∞} (D : A.DyadicApprox f t) {β : ℝ} + (hsum : ∑' k, dyadicWeight β k * (A.approxError f (2 ^ k) + t k) ≠ ∞) : + Tendsto (fun k => dyadicWeight β k * ‖f - D.a k‖ₑ) atTop (𝓝 0) := + tendsto_of_tendsto_of_tendsto_of_le_of_le tendsto_const_nhds + (ENNReal.tendsto_atTop_zero_of_tsum_ne_top hsum) (fun _ => bot_le) + (fun k => by gcongr; exact D.eNorm_sub_le k) + +/-- For `f ∈ A^β_1`, the series `∑_k 2^(kβ) (E_{2^k}(f) + 2^(-k(β+1)))` of the canonical +approximants is finite. -/ +theorem tsum_canonical_ne_top {A : ApproximationScheme X} {β : ℝ} (hβ : 0 ≤ β) {f : X} + (hf : A.MemApprox β 1 f) : + ∑' k, dyadicWeight β k * (A.approxError f (2 ^ k) + dyadicWeight (-(β + 1)) k) ≠ ∞ := by + have hL := (memApprox_iff_lqNorm_dyadic_lt_top le_rfl hβ).1 hf + have h2 : ∀ k, dyadicWeight β k * dyadicWeight (-(β + 1)) k = dyadicWeight (-1) k := + fun k => by rw [← ENNReal.dyadicWeight_add]; congr 1; ring + simp_rw [mul_add, h2] + rw [tsum_add, ENNReal.tsum_dyadicWeight_neg_one, ← ENNReal.lqNorm_one] + exact ENNReal.add_ne_top.2 ⟨hL.ne, by norm_num⟩ + +namespace TraceBound + +variable {A : ApproximationScheme X} {B : ApproximationScheme Y} {β : ℝ} (TB : TraceBound A B β) + +/-- A linear map defined on the span of the approximants, with `T (A n) ⊆ B n` and the trace +inequality, extends to a trace bound (`LinearMap.exists_extend`). -/ +noncomputable def ofSubmodule (T₀ : A.iUnionSubmodule →ₗ[ℝ] Y) + (hT : ∀ n (a : A.iUnionSubmodule), (a : X) ∈ A n → T₀ a ∈ B n) (C : ℝ≥0∞) (hC : C ≠ ∞) + (hb : ∀ n : ℕ, 1 ≤ n → ∀ a : A.iUnionSubmodule, (a : X) ∈ A n → + ‖T₀ a‖ₑ ≤ C * (n : ℝ≥0∞) ^ β * ‖(a : X)‖ₑ) : TraceBound A B β where + T := (LinearMap.exists_extend T₀).choose + mapsTo n a ha := by + have h := LinearMap.congr_fun (LinearMap.exists_extend T₀).choose_spec + ⟨a, mem_iUnionSubmodule ha⟩ + simp only [LinearMap.comp_apply, Submodule.subtype_apply] at h + rw [h] + exact hT n _ ha + C := C + C_ne_top := hC + bound n hn a ha := by + have h := LinearMap.congr_fun (LinearMap.exists_extend T₀).choose_spec + ⟨a, mem_iUnionSubmodule ha⟩ + simp only [LinearMap.comp_apply, Submodule.subtype_apply] at h + rw [h] + exact hb n hn _ ha + +/-- The trace of an extension agrees with the given map on the span of the approximants. -/ +theorem ofSubmodule_T (T₀ : A.iUnionSubmodule →ₗ[ℝ] Y) + (hT : ∀ n (a : A.iUnionSubmodule), (a : X) ∈ A n → T₀ a ∈ B n) (C : ℝ≥0∞) (hC : C ≠ ∞) + (hb : ∀ n : ℕ, 1 ≤ n → ∀ a : A.iUnionSubmodule, (a : X) ∈ A n → + ‖T₀ a‖ₑ ≤ C * (n : ℝ≥0∞) ^ β * ‖(a : X)‖ₑ) (a : A.iUnionSubmodule) : + (ofSubmodule T₀ hT C hC hb).T a = T₀ a := by + have h := LinearMap.congr_fun (LinearMap.exists_extend T₀).choose_spec a + simp only [LinearMap.comp_apply, Submodule.subtype_apply] at h + exact h + +/-- The trace inequality on the dyadic levels: `‖T a‖ ≤ C 2^(kβ) ‖a‖` for `a ∈ A (2^k)`. -/ +theorem enorm_apply_le {k : ℕ} {a : X} (ha : a ∈ A (2 ^ k)) : + ‖TB.T a‖ₑ ≤ TB.C * dyadicWeight β k * ‖a‖ₑ := by + have h := TB.bound (2 ^ k) Nat.one_le_two_pow a ha + rwa [ENNReal.natCast_two_pow_rpow] at h + +/-- The trace of a dyadic block: `‖T a_{k+1} - T a_k‖ ≤ 2 C 4^β 2^(kβ) (E_{2^k}(f) + t_k)`. -/ +theorem enorm_apply_sub_succ_le {f : X} {t : ℕ → ℝ≥0∞} (D : A.DyadicApprox f t) + (ht : Antitone t) (k : ℕ) : + ‖TB.T (D.a (k + 1)) - TB.T (D.a k)‖ₑ ≤ + traceConst TB.C β * (dyadicWeight β k * (A.approxError f (2 ^ k) + t k)) := by + rw [← map_sub] + calc ‖TB.T (D.a (k + 1) - D.a k)‖ₑ ≤ TB.C * dyadicWeight β (k + 2) * ‖D.a (k + 1) - D.a k‖ₑ := + TB.enorm_apply_le (D.sub_mem k) + _ ≤ TB.C * dyadicWeight β (k + 2) * (2 * (A.approxError f (2 ^ k) + t k)) := by + gcongr; exact D.enorm_sub_succ_le ht k + _ = _ := by simp only [traceConst, ENNReal.dyadicWeight_add_nat]; ring + +/-- The traces of consecutive approximants are close: `edist (T a_k) (T a_{k+1})` is at most +`2 C 4^β 2^(kβ) (E_{2^k}(f) + t_k)`. -/ +theorem edist_apply_succ_le {f : X} {t : ℕ → ℝ≥0∞} (D : A.DyadicApprox f t) (ht : Antitone t) + (k : ℕ) : + edist (TB.T (D.a k)) (TB.T (D.a (k + 1))) ≤ + traceConst TB.C β * (dyadicWeight β k * (A.approxError f (2 ^ k) + t k)) := by + rw [edist_comm, eDist_eq_eNorm_sub] + exact TB.enorm_apply_sub_succ_le D ht k + +/-- The traces of near-best approximants form a Cauchy sequence when +`∑_k 2^(kβ) (E_{2^k}(f) + t_k) < ∞`. -/ +theorem cauchySeq_apply {f : X} {t : ℕ → ℝ≥0∞} (D : A.DyadicApprox f t) (ht : Antitone t) + (hsum : ∑' k, dyadicWeight β k * (A.approxError f (2 ^ k) + t k) ≠ ∞) : + CauchySeq fun k => TB.T (D.a k) := + cauchySeq_of_edist_le_of_tsum_ne_top _ (TB.edist_apply_succ_le D ht) (by + rw [ENNReal.tsum_mul_left] + exact ENNReal.mul_ne_top (traceConst_ne_top TB.C_ne_top β) hsum) + +/-- **Independence of the approximants**: if `c_k ∈ A (2^(k+γ))` and `c'_k ∈ A (2^(k+γ'))` both +satisfy `2^(kβ) ‖f - c_k‖ → 0`, then their traces are asymptotically equal. -/ +theorem tendsto_edist_apply {f : X} {γ γ' : ℕ} {c c' : ℕ → X} + (hc : ∀ k, c k ∈ A (2 ^ (k + γ))) (hc' : ∀ k, c' k ∈ A (2 ^ (k + γ'))) + (h : Tendsto (fun k => dyadicWeight β k * ‖f - c k‖ₑ) atTop (𝓝 0)) + (h' : Tendsto (fun k => dyadicWeight β k * ‖f - c' k‖ₑ) atTop (𝓝 0)) : + Tendsto (fun k => edist (TB.T (c k)) (TB.T (c' k))) atTop (𝓝 0) := by + set M := γ + γ' + 1 + have hmem : ∀ k, c k - c' k ∈ A (2 ^ (k + M)) := fun k => by + refine A.mem_of_le ?_ (A.sub_mem (hc k) (hc' k)) + have h1 : 2 ^ (k + γ) ≤ 2 ^ (k + (γ + γ')) := Nat.pow_le_pow_right two_pos (by omega) + have h2 : 2 ^ (k + γ') ≤ 2 ^ (k + (γ + γ')) := Nat.pow_le_pow_right two_pos (by omega) + calc 2 ^ (k + γ) + 2 ^ (k + γ') ≤ 2 ^ (k + (γ + γ')) + 2 ^ (k + (γ + γ')) := + add_le_add h1 h2 + _ = 2 ^ (k + M) := by rw [show k + M = k + (γ + γ') + 1 by omega, pow_succ]; ring + have hle : ∀ k, edist (TB.T (c k)) (TB.T (c' k)) ≤ TB.C * dyadicWeight β M * + (dyadicWeight β k * ‖f - c k‖ₑ + dyadicWeight β k * ‖f - c' k‖ₑ) := fun k => by + rw [eDist_eq_eNorm_sub, ← map_sub] + calc ‖TB.T (c k - c' k)‖ₑ ≤ TB.C * dyadicWeight β (k + M) * ‖c k - c' k‖ₑ := + TB.enorm_apply_le (hmem k) + _ ≤ TB.C * dyadicWeight β (k + M) * (‖f - c k‖ₑ + ‖f - c' k‖ₑ) := by + gcongr + calc ‖c k - c' k‖ₑ = ‖(f - c' k) - (f - c k)‖ₑ := by congr 1; abel + _ ≤ ‖f - c' k‖ₑ + ‖f - c k‖ₑ := eNorm_sub_le + _ = ‖f - c k‖ₑ + ‖f - c' k‖ₑ := add_comm _ _ + _ = _ := by rw [ENNReal.dyadicWeight_add_nat]; ring + have hlim : Tendsto (fun k => TB.C * dyadicWeight β M * + (dyadicWeight β k * ‖f - c k‖ₑ + dyadicWeight β k * ‖f - c' k‖ₑ)) atTop (𝓝 0) := by + have := ENNReal.Tendsto.const_mul (h.add h') + (Or.inr (ENNReal.mul_ne_top TB.C_ne_top (ENNReal.dyadicWeight_ne_top β M))) + simpa using this + exact tendsto_of_tendsto_of_tendsto_of_le_of_le tendsto_const_nhds hlim (fun _ => bot_le) hle + +/-- The **trace** of `f`: the limit of `T a_k` for the canonical near-best approximants. -/ +noncomputable def ext (f : X) : Y := limUnder atTop fun k => TB.T ((canonicalApprox A β f).a k) + +/-- For `f ∈ A^β_1` the traces of the canonical approximants converge to the trace of `f`. -/ +theorem tendsto_canonical [CompleteSpace Y] (hβ : 0 ≤ β) {f : X} (hf : A.MemApprox β 1 f) : + Tendsto (fun k => TB.T ((canonicalApprox A β f).a k)) atTop (𝓝 (TB.ext f)) := + (TB.cauchySeq_apply _ (ENNReal.dyadicWeight_anti (by linarith)) + (tsum_canonical_ne_top hβ hf)).tendsto_limUnder + +/-- **The trace is the limit for all approximants**: for `f ∈ A^β_1`, `c_k ∈ A (2^(k+γ))` and +`2^(kβ) ‖f - c_k‖ → 0`, the traces `T c_k` converge to the trace of `f`. -/ +theorem tendsto_ext [CompleteSpace Y] (hβ : 0 ≤ β) {f : X} (hf : A.MemApprox β 1 f) {γ : ℕ} + {c : ℕ → X} (hc : ∀ k, c k ∈ A (2 ^ (k + γ))) + (hcf : Tendsto (fun k => dyadicWeight β k * ‖f - c k‖ₑ) atTop (𝓝 0)) : + Tendsto (fun k => TB.T (c k)) atTop (𝓝 (TB.ext f)) := by + set D := canonicalApprox A β f + have hD := TB.tendsto_canonical hβ hf + have hD0 := D.tendsto_dyadicWeight_mul_enorm_sub (tsum_canonical_ne_top hβ hf) + have hed := TB.tendsto_edist_apply (γ' := 0) hc (fun k => by simpa using D.mem k) hcf hD0 + rw [tendsto_iff_edist_tendsto_0] at hD ⊢ + have := hed.add hD + rw [add_zero] at this + exact tendsto_of_tendsto_of_tendsto_of_le_of_le tendsto_const_nhds this (fun _ => bot_le) + fun k => edist_triangle _ _ _ + +/-- **The trace extends `T`**: on approximants the trace is `T`. -/ +theorem ext_eq_of_mem [CompleteSpace Y] (hβ : 0 ≤ β) {m : ℕ} {a : X} (ha : a ∈ A m) : + TB.ext a = TB.T a := by + have hc : ∀ k, a ∈ A (2 ^ (k + m)) := fun k => + A.mem_of_le ((Nat.lt_two_pow_self).le.trans + (Nat.pow_le_pow_right two_pos (Nat.le_add_left m k))) ha + have h := TB.tendsto_ext hβ (memApprox_of_mem le_rfl hβ ha) hc (by simp) + exact tendsto_nhds_unique h tendsto_const_nhds + +/-- The trace of `0` is `0`. -/ +theorem ext_zero [CompleteSpace Y] (hβ : 0 ≤ β) : TB.ext 0 = 0 := by + rw [TB.ext_eq_of_mem hβ (A.zero_mem 0), map_zero] + +/-- The trace is additive on `A^β_1`. -/ +theorem ext_add [CompleteSpace Y] (hβ : 0 ≤ β) {f g : X} (hf : A.MemApprox β 1 f) + (hg : A.MemApprox β 1 g) : TB.ext (f + g) = TB.ext f + TB.ext g := by + set Df := canonicalApprox A β f + set Dg := canonicalApprox A β g + have hcf := Df.tendsto_dyadicWeight_mul_enorm_sub (tsum_canonical_ne_top hβ hf) + have hcg := Dg.tendsto_dyadicWeight_mul_enorm_sub (tsum_canonical_ne_top hβ hg) + have hc : ∀ k, Df.a k + Dg.a k ∈ A (2 ^ (k + 1)) := fun k => + add_mem_pow_succ (Df.mem k) (Dg.mem k) + have hlim : Tendsto (fun k => dyadicWeight β k * ‖(f + g) - (Df.a k + Dg.a k)‖ₑ) atTop + (𝓝 0) := by + have := hcf.add hcg + rw [add_zero] at this + refine tendsto_of_tendsto_of_tendsto_of_le_of_le tendsto_const_nhds this (fun _ => bot_le) + fun k => ?_ + calc dyadicWeight β k * ‖(f + g) - (Df.a k + Dg.a k)‖ₑ + = dyadicWeight β k * ‖(f - Df.a k) + (g - Dg.a k)‖ₑ := by congr 2; abel + _ ≤ dyadicWeight β k * (‖f - Df.a k‖ₑ + ‖g - Dg.a k‖ₑ) := by + gcongr; exact eNorm_add_le _ _ + _ = _ := mul_add _ _ _ + have h1 := TB.tendsto_ext hβ (MemApprox.add le_rfl hβ hf hg) hc hlim + have h2 : Tendsto (fun k => TB.T (Df.a k + Dg.a k)) atTop (𝓝 (TB.ext f + TB.ext g)) := by + simp_rw [map_add] + exact (TB.tendsto_canonical hβ hf).add (TB.tendsto_canonical hβ hg) + exact tendsto_nhds_unique h1 h2 + +/-- The trace is homogeneous on `A^β_1`. -/ +theorem ext_smul [CompleteSpace Y] (hβ : 0 ≤ β) {f : X} (hf : A.MemApprox β 1 f) (r : ℝ) : + TB.ext (r • f) = r • TB.ext f := by + set D := canonicalApprox A β f + have hcf := D.tendsto_dyadicWeight_mul_enorm_sub (tsum_canonical_ne_top hβ hf) + have hc : ∀ k, r • D.a k ∈ A (2 ^ (k + 0)) := fun k => A.smul_mem r (D.mem k) + have hlim : Tendsto (fun k => dyadicWeight β k * ‖r • f - r • D.a k‖ₑ) atTop (𝓝 0) := by + have := ENNReal.Tendsto.const_mul (a := ‖r‖ₑ) hcf (Or.inr eNorm_ne_top) + rw [mul_zero] at this + refine this.congr fun k => ?_ + rw [← smul_sub, eNorm_smul]; ring + have h1 := TB.tendsto_ext hβ (hf.smul r) hc hlim + have h2 : Tendsto (fun k => TB.T (r • D.a k)) atTop (𝓝 (r • TB.ext f)) := by + simp_rw [map_smul] + exact (TB.tendsto_canonical hβ hf).const_smul r + exact tendsto_nhds_unique h1 h2 + +/-- The trace as a linear map on `A^β_1`. -/ +noncomputable def extLinear [CompleteSpace Y] (hβ : 0 ≤ β) : + A.approxSpace β 1 hβ le_rfl →ₗ[ℝ] Y where + toFun f := TB.ext f + map_add' f g := TB.ext_add hβ (mem_approxSpace.1 f.2) (mem_approxSpace.1 g.2) + map_smul' r f := TB.ext_smul hβ (mem_approxSpace.1 f.2) r + +/-- **The distance of a traced approximant to the trace**: for near-best approximants with +decreasing tolerances and `∑_k 2^(kβ) (E_{2^k}(f) + t_k) < ∞`, +`edist (T a_k) (ext f) ≤ 2 C 4^β ∑_{i ≥ 0} 2^((k+i)β) (E_{2^(k+i)}(f) + t_{k+i})`. -/ +theorem edist_apply_ext_le [CompleteSpace Y] (hβ : 0 ≤ β) {f : X} {t : ℕ → ℝ≥0∞} + (D : A.DyadicApprox f t) (ht : Antitone t) + (hsum : ∑' k, dyadicWeight β k * (A.approxError f (2 ^ k) + t k) ≠ ∞) (k : ℕ) : + edist (TB.T (D.a k)) (TB.ext f) ≤ traceConst TB.C β * + ∑' i, dyadicWeight β (k + i) * (A.approxError f (2 ^ (k + i)) + t (k + i)) := by + have hf : A.MemApprox β 1 f := by + refine (memApprox_iff_lqNorm_dyadic_lt_top le_rfl hβ).2 (lt_of_le_of_lt ?_ hsum.lt_top) + rw [ENNReal.lqNorm_one] + exact tsum_le_tsum fun k => by rw [approxSeqDyadic]; gcongr; exact le_self_add + have hlim := TB.tendsto_ext hβ hf (γ := 0) (fun k => by simpa using D.mem k) + (D.tendsto_dyadicWeight_mul_enorm_sub hsum) + calc edist (TB.T (D.a k)) (TB.ext f) ≤ ∑' m, traceConst TB.C β * + (dyadicWeight β (k + m) * (A.approxError f (2 ^ (k + m)) + t (k + m))) := + edist_le_tsum_of_edist_le_of_tendsto _ (TB.edist_apply_succ_le D ht) hlim k + _ = _ := ENNReal.tsum_mul_left + +/-- The norm of the trace through any near-best approximants: +`‖ext f‖ ≤ C (2 ‖f‖ + t_0) + 2 C 4^β ∑_k 2^(kβ) (E_{2^k}(f) + t_k)`. -/ +theorem enorm_ext_le_of_dyadicApprox [CompleteSpace Y] (hβ : 0 ≤ β) {f : X} {t : ℕ → ℝ≥0∞} + (D : A.DyadicApprox f t) (ht : Antitone t) + (hsum : ∑' k, dyadicWeight β k * (A.approxError f (2 ^ k) + t k) ≠ ∞) : + ‖TB.ext f‖ₑ ≤ TB.C * (2 * ‖f‖ₑ + t 0) + + traceConst TB.C β * ∑' k, dyadicWeight β k * (A.approxError f (2 ^ k) + t k) := by + have h0 := TB.edist_apply_ext_le hβ D ht hsum 0 + simp only [zero_add] at h0 + have hT0 : ‖TB.T (D.a 0)‖ₑ ≤ TB.C * (2 * ‖f‖ₑ + t 0) := by + calc ‖TB.T (D.a 0)‖ₑ ≤ TB.C * dyadicWeight β 0 * ‖D.a 0‖ₑ := TB.enorm_apply_le (D.mem 0) + _ ≤ TB.C * (2 * ‖f‖ₑ + t 0) := by + rw [ENNReal.dyadicWeight_zero_right, mul_one]; gcongr; exact D.enorm_zero_le + calc ‖TB.ext f‖ₑ = ‖TB.T (D.a 0) + (TB.ext f - TB.T (D.a 0))‖ₑ := by congr 1; abel + _ ≤ ‖TB.T (D.a 0)‖ₑ + ‖TB.ext f - TB.T (D.a 0)‖ₑ := eNorm_add_le _ _ + _ ≤ _ := by + gcongr + rw [← eDist_eq_eNorm_sub, edist_comm] + exact h0 + +/-- **The trace is bounded on `A^β_1`**: +`‖ext f‖ ≤ (3 C + 3·2 C 4^β) (‖f‖ + ∑_k 2^(kβ) E_{2^k}(f))`. -/ +theorem enorm_ext_le [CompleteSpace Y] (hβ : 0 ≤ β) {f : X} (hf : A.MemApprox β 1 f) : + ‖TB.ext f‖ₑ ≤ (3 * TB.C + 3 * traceConst TB.C β) * A.approxNormDyadic β 1 f := by + rcases eq_or_ne f 0 with rfl | hf0 + · rw [TB.ext_zero hβ, eNorm_zero]; exact bot_le + obtain ⟨D⟩ := exists_dyadicApprox A f (tolerance_ne_zero hf0 β) + have h := TB.enorm_ext_le_of_dyadicApprox hβ D (tolerance_anti f hβ) + (tsum_dyadicWeight_mul_add_tolerance_ne_top le_rfl + ((memApprox_iff_lqNorm_dyadic_lt_top le_rfl hβ).1 hf).ne) + rw [tolerance_zero] at h + exact h.trans (mul_add_mul_tsum_tolerance_le _ _ f β) + +/-- **The trace transfer theorem**: for `0 ≤ β < s` and `1 ≤ q ≤ ∞` the trace maps `A^s_q(X)` +into `B^{s-β}_q(Y)`, with `‖ext f‖_{B^{s-β}_q} ≤ K ‖f‖_{A^s_q}` in the dyadic quasi-norms, +`K = traceTransferConst C β s`. -/ +theorem approxNormDyadic_ext_le [CompleteSpace Y] (hβ : 0 ≤ β) {s : ℝ} (hβs : β < s) + {q : ℝ≥0∞} (hq : 1 ≤ q) {f : X} (hf : A.MemApprox s q f) : + B.approxNormDyadic (s - β) q (TB.ext f) ≤ + traceTransferConst TB.C β s * A.approxNormDyadic s q f := by + rcases eq_or_ne f 0 with rfl | hf0 + · rw [TB.ext_zero hβ, approxNormDyadic_zero]; exact bot_le + obtain ⟨D⟩ := exists_dyadicApprox A f (tolerance_ne_zero hf0 s) + have ht := tolerance_anti f (hβ.trans hβs.le) + have hsum := tsum_dyadicWeight_mul_add_tolerance_ne_top hβs.le (hf.lqNorm_one_lt_top hq hβ hβs).ne + have hy := TB.enorm_ext_le_of_dyadicApprox hβ D ht hsum + rw [tolerance_zero] at hy + refine approxNormDyadic_le_of_tail hβs.le hq f hy fun k => ?_ + refine (approxError_le_of_mem (TB.mapsTo _ _ (D.mem k)) _).trans ?_ + rw [← eDist_eq_eNorm_sub, edist_comm] + exact TB.edist_apply_ext_le hβ D ht hsum k + +/-- **The trace transfer theorem**, membership form: `f ∈ A^s_q(X)` gives +`ext f ∈ B^{s-β}_q(Y)` for `0 ≤ β < s`. -/ +theorem memApprox_ext [CompleteSpace Y] (hβ : 0 ≤ β) {s : ℝ} (hβs : β < s) {q : ℝ≥0∞} + (hq : 1 ≤ q) {f : X} (hf : A.MemApprox s q f) : B.MemApprox (s - β) q (TB.ext f) := by + refine (memApprox_iff_approxNormDyadic_lt_top hq (sub_nonneg.2 hβs.le)).2 ?_ + exact (TB.approxNormDyadic_ext_le hβ hβs hq hf).trans_lt (ENNReal.mul_lt_top + (traceTransferConst_ne_top TB.C_ne_top hβs).lt_top + ((memApprox_iff_approxNormDyadic_lt_top hq (hβ.trans hβs.le)).1 hf)) + +/-- A **right inverse bound** for a trace: every `b ∈ B (2^k)` is `T a` for some +`a ∈ A (2^(k+γ))` with `‖a‖ ≤ C' 2^(-kβ) ‖b‖`. For the restriction to a hyperplane, `a` is +`b` times a peaked function of width `2^(-k)` in the normal direction. -/ +def RightInverseBound (γ : ℕ) (C' : ℝ≥0∞) : Prop := + ∀ k, ∀ b ∈ B (2 ^ k), ∃ a ∈ A (2 ^ (k + γ)), TB.T a = b ∧ + ‖a‖ₑ ≤ C' * dyadicWeight (-β) k * ‖b‖ₑ + +/-- **The trace of a lifted series**: if `a_j ∈ A_{2^(j+γ)}` lift `b_j = T a_j` with +`‖a_j‖ ≤ C' 2^(-jβ) ‖b_j‖`, `∑ ‖b_j‖ < ∞` and `∑ b_j = g`, and `f = ∑ a_j` lies in `A^β_1`, then +the trace of `f` is `g`. The partial sums of the moved series approximate `f` with +`2^(Kβ) ‖f - ∑_{i < K+γ} G_i‖ ≤ C' ∑_m ‖b_{m+K}‖ → 0`, and `TraceBound.tendsto_ext` applies. -/ +theorem ext_eq_of_hasSum_lift [CompleteSpace Y] (hβ : 0 ≤ β) {γ : ℕ} {C' : ℝ≥0∞} (hC' : C' ≠ ∞) + {a : ℕ → X} {b : ℕ → Y} (ha : ∀ j, a j ∈ A (2 ^ (j + γ))) (hTa : ∀ j, TB.T (a j) = b j) + (hale : ∀ j, ‖a j‖ₑ ≤ C' * dyadicWeight (-β) j * ‖b j‖ₑ) (hb_fin : ∑' j, ‖b j‖ₑ ≠ ∞) + {g : Y} (hb_sum : HasSum b g) {f : X} (hfa : HasSum a f) (hfβ : A.MemApprox β 1 f) : + TB.ext f = g := by + have hw1 : ∀ j, dyadicWeight (-β) j ≤ 1 := fun j => + (ENNReal.dyadicWeight_le_of_le (by linarith) j).trans_eq (ENNReal.dyadicWeight_zero_left j) + have hG : HasSum (shiftSeq γ a) f := hasSum_shiftSeq hfa + have htailG : ∀ K, ‖f - ∑ i ∈ range (K + γ), shiftSeq γ a i‖ₑ ≤ ∑' m, ‖a (m + K)‖ₑ := + fun K => (hG.enorm_sub_sum_range_le (K + γ)).trans_eq (by + congr 1; funext m; rw [← add_assoc, shiftSeq_add]) + have hdecay : ∀ K, dyadicWeight β K * ‖f - ∑ i ∈ range (K + γ), shiftSeq γ a i‖ₑ ≤ + C' * ∑' m, ‖b (m + K)‖ₑ := fun K => by + calc dyadicWeight β K * ‖f - ∑ i ∈ range (K + γ), shiftSeq γ a i‖ₑ + ≤ dyadicWeight β K * ∑' m, ‖a (m + K)‖ₑ := mul_le_mul' le_rfl (htailG K) + _ ≤ dyadicWeight β K * ∑' m, C' * dyadicWeight (-β) (m + K) * ‖b (m + K)‖ₑ := + mul_le_mul' le_rfl (tsum_le_tsum fun m => hale (m + K)) + _ = ∑' m, C' * dyadicWeight (-β) m * ‖b (m + K)‖ₑ := by + rw [← ENNReal.tsum_mul_left] + congr 1; funext m + rw [ENNReal.dyadicWeight_add_nat] + calc dyadicWeight β K * (C' * (dyadicWeight (-β) m * dyadicWeight (-β) K) * + ‖b (m + K)‖ₑ) + = C' * dyadicWeight (-β) m * ‖b (m + K)‖ₑ * + (dyadicWeight β K * dyadicWeight (-β) K) := by ring + _ = _ := by rw [ENNReal.dyadicWeight_mul_neg_self, mul_one] + _ ≤ ∑' m, C' * ‖b (m + K)‖ₑ := tsum_le_tsum fun m => by + calc C' * dyadicWeight (-β) m * ‖b (m + K)‖ₑ ≤ C' * 1 * ‖b (m + K)‖ₑ := by + gcongr; exact hw1 m + _ = C' * ‖b (m + K)‖ₑ := by rw [mul_one] + _ = C' * ∑' m, ‖b (m + K)‖ₑ := ENNReal.tsum_mul_left + have hcf : Tendsto (fun K => dyadicWeight β K * ‖f - ∑ i ∈ range (K + γ), shiftSeq γ a i‖ₑ) + atTop (𝓝 0) := by + have h0 := ENNReal.Tendsto.const_mul (a := C') + (ENNReal.tendsto_sum_nat_add (fun j => ‖b j‖ₑ) hb_fin) (Or.inr hC') + rw [mul_zero] at h0 + exact tendsto_of_tendsto_of_tendsto_of_le_of_le tendsto_const_nhds h0 (fun _ => bot_le) hdecay + have h1 := TB.tendsto_ext hβ hfβ (c := fun K => ∑ i ∈ range (K + γ), shiftSeq γ a i) + (fun K => sum_range_mem (shiftSeq_mem ha) (K + γ)) hcf + have hTG : HasSum (fun i => TB.T (shiftSeq γ a i)) g := by + refine (hasSum_nat_add_iff' γ).1 ?_ + have h1' : (fun n => TB.T (shiftSeq γ a (n + γ))) = b := + funext fun n => by rw [shiftSeq_add, hTa] + have h2' : ∑ i ∈ range γ, TB.T (shiftSeq γ a i) = 0 := + Finset.sum_eq_zero fun i hi => by rw [shiftSeq_of_lt a (Finset.mem_range.1 hi), map_zero] + rw [h1', h2', sub_zero]; exact hb_sum + have h2 : Tendsto (fun K => TB.T (∑ i ∈ range (K + γ), shiftSeq γ a i)) atTop (𝓝 g) := by + simp_rw [map_sum] + exact hTG.tendsto_sum_nat.comp (tendsto_add_atTop_nat γ) + exact tendsto_nhds_unique h1 h2 + +/-- **Surjectivity of the trace**: in Banach spaces, for `β ≥ 0`, a right inverse bound, +`s > 0` and `1 ≤ q ≤ ∞`, every `g ∈ B^s_q(Y)` is the trace of some `f ∈ A^{s+β}_q(X)` with +`‖f‖_{A^{s+β}_q} ≤ K ‖g‖_{B^s_q}` in the dyadic quasi-norms, `K = traceSurjConst C' β s γ`. +The proof lifts the blocks `b_j ∈ B (2^j)` of a block decomposition of `g` +(`ApproximationScheme.exists_blocks`) to `a_j` with `T a_j = b_j` and takes `f = ∑ a_j`. -/ +theorem exists_ext_eq [CompleteSpace X] [CompleteSpace Y] (hβ : 0 ≤ β) {γ : ℕ} {C' : ℝ≥0∞} + (hC' : C' ≠ ∞) (hR : TB.RightInverseBound γ C') {s : ℝ} (hs : 0 < s) {q : ℝ≥0∞} + (hq : 1 ≤ q) {g : Y} (hg : B.MemApprox s q g) : + ∃ f : X, A.MemApprox (s + β) q f ∧ TB.ext f = g ∧ + A.approxNormDyadic (s + β) q f ≤ traceSurjConst C' β s γ * B.approxNormDyadic s q g := by + have hsβ : 0 < s + β := by linarith + have hw1 : ∀ j, dyadicWeight (-β) j ≤ 1 := fun j => + (ENNReal.dyadicWeight_le_of_le (by linarith) j).trans_eq (ENNReal.dyadicWeight_zero_left j) + -- the blocks of `g`, and their lifts + obtain ⟨b, hb_mem, hb_sum, hb_fin, hlqb⟩ := B.exists_blocks hs hq hg + set N := B.approxNormDyadic s q g + choose a ha hTa hale using fun j => hR j (b j) (hb_mem j) + have hale' : ∀ j, ‖a j‖ₑ ≤ C' * ‖b j‖ₑ := fun j => by + calc ‖a j‖ₑ ≤ C' * dyadicWeight (-β) j * ‖b j‖ₑ := hale j + _ ≤ C' * 1 * ‖b j‖ₑ := by gcongr; exact hw1 j + _ = C' * ‖b j‖ₑ := by rw [mul_one] + have ha_fin : ∑' j, ‖a j‖ₑ ≠ ∞ := ne_top_of_le_ne_top (ENNReal.mul_ne_top hC' hb_fin) + ((tsum_le_tsum hale').trans_eq ENNReal.tsum_mul_left) + have ha_summ : Summable a := Summable.of_eNorm ha_fin + set f := ∑' j, a j + have hfa : HasSum a f := ha_summ.hasSum + -- the norm of `f`, through the lifted blocks placed at the levels `j + γ` + have hpt : ∀ j, dyadicWeight (s + β) (j + γ) * ‖a j‖ₑ ≤ + dyadicWeight (s + β) γ * C' * (dyadicWeight s j * ‖b j‖ₑ) := fun j => by + calc dyadicWeight (s + β) (j + γ) * ‖a j‖ₑ + ≤ dyadicWeight (s + β) (j + γ) * (C' * dyadicWeight (-β) j * ‖b j‖ₑ) := by + gcongr; exact hale j + _ = dyadicWeight (s + β) γ * C' * + ((dyadicWeight (s + β) j * dyadicWeight (-β) j) * ‖b j‖ₑ) := by + rw [ENNReal.dyadicWeight_add_nat]; ring + _ = dyadicWeight (s + β) γ * C' * (dyadicWeight s j * ‖b j‖ₑ) := by + rw [← ENNReal.dyadicWeight_add, show s + β + -β = s by ring] + have hnorm : A.approxNormDyadic (s + β) q f ≤ traceSurjConst C' β s γ * N := by + calc A.approxNormDyadic (s + β) q f + ≤ 2 * (1 - (2 : ℝ≥0∞) ^ (-(s + β)))⁻¹ * + lqNorm q (fun i => dyadicWeight (s + β) i * ‖shiftSeq γ a i‖ₑ) := + approxNormDyadic_le_of_hasSum hq (shiftSeq_mem ha) (hasSum_shiftSeq hfa) + _ ≤ 2 * (1 - (2 : ℝ≥0∞) ^ (-(s + β)))⁻¹ * + (dyadicWeight (s + β) γ * C' * ((3 * 2 ^ s + 4 * dyadicWeight s 2) * N)) := by + gcongr + calc _ ≤ lqNorm q (fun j => dyadicWeight (s + β) (j + γ) * ‖a j‖ₑ) := + lqNorm_shiftSeq_le γ a (s + β) q + _ ≤ lqNorm q (fun j => dyadicWeight (s + β) γ * C' * (dyadicWeight s j * ‖b j‖ₑ)) := + ENNReal.lqNorm_mono hpt + _ = dyadicWeight (s + β) γ * C' * lqNorm q (fun j => dyadicWeight s j * ‖b j‖ₑ) := + ENNReal.lqNorm_const_mul _ _ + _ ≤ _ := by gcongr + _ = traceSurjConst C' β s γ * N := by simp only [traceSurjConst]; ring + have hfmem : A.MemApprox (s + β) q f := (memApprox_iff_approxNormDyadic_lt_top hq hsβ.le).2 + (hnorm.trans_lt (ENNReal.mul_lt_top (traceSurjConst_ne_top hC' hsβ γ).lt_top + ((memApprox_iff_approxNormDyadic_lt_top hq hs.le).1 hg))) + -- the trace of `f` is `g` + exact ⟨f, hfmem, TB.ext_eq_of_hasSum_lift hβ hC' ha hTa hale hb_fin hb_sum hfa + (hfmem.mono hq le_rfl hβ (Or.inl (by linarith))), hnorm⟩ + +end TraceBound + +end ApproximationScheme diff --git a/LeanPool/FunctionSpaces/ApproximationSpaces/Transfer.lean b/LeanPool/FunctionSpaces/ApproximationSpaces/Transfer.lean new file mode 100644 index 0000000000..f299390145 --- /dev/null +++ b/LeanPool/FunctionSpaces/ApproximationSpaces/Transfer.lean @@ -0,0 +1,76 @@ +/- +Copyright (c) 2026 Mario Ullrich. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Mario Ullrich +-/ +module + +public import LeanPool.FunctionSpaces.ApproximationSpaces.Embedding +public import Mathlib.Analysis.Normed.Operator.NNNorm + +/- +Modified for Lean Pool: module names and imports adapted. +-/ + +/-! +# Functoriality of approximation spaces + +Let `A` and `B` be approximation schemes in `X` and `Y`, and `T : X → Y` a bounded linear map +that sends approximants to approximants, `T (A n) ⊆ B n`. Then `E^B_n(T f) ≤ ‖T‖ E^A_n(f)` +for all `n` (`approxError_map_le`), and therefore `T` maps `A^s_q(X)` into `B^s_q(Y)` with + +`‖T f‖_{B^s_q} ≤ ‖T‖ ‖f‖_{A^s_q}` + +for both quasi-norms (`approxNorm_map_le`, `approxNormDyadic_map_le`). Approximation spaces +are functorial in the pair (space, scheme); the image scheme `A.map T` satisfies the +hypothesis automatically. +-/ + +@[expose] public section + +open scoped ENNReal + +namespace ApproximationScheme + +open ENNReal (lqNorm dyadicWeight) + +variable {X Y : Type*} [NormedAddCommGroup X] [NormedSpace ℝ X] + [NormedAddCommGroup Y] [NormedSpace ℝ Y] + +variable {A : ApproximationScheme X} {B : ApproximationScheme Y} {s : ℝ} {q : ℝ≥0∞} + +/-- **Functoriality**, Pietsch's quasi-norm: `‖T f‖_{B^s_q} ≤ ‖T‖ ‖f‖_{A^s_q}`. -/ +theorem approxNorm_map_le (T : X →L[ℝ] Y) (hT : ∀ n, ∀ a ∈ A n, T a ∈ B n) (f : X) : + B.approxNorm s q (T f) ≤ ‖T‖ₑ * A.approxNorm s q f := by + rw [approxNorm, approxNorm, ← ENNReal.lqNorm_const_mul] + refine ENNReal.lqNorm_mono fun n => ?_ + rw [mul_left_comm] + gcongr + exact approxError_map_le T hT f n + +/-- **Functoriality**, dyadic quasi-norm: `‖T f‖^dyadic ≤ ‖T‖ ‖f‖^dyadic`. -/ +theorem approxNormDyadic_map_le (T : X →L[ℝ] Y) (hT : ∀ n, ∀ a ∈ A n, T a ∈ B n) (f : X) : + B.approxNormDyadic s q (T f) ≤ ‖T‖ₑ * A.approxNormDyadic s q f := by + rw [approxNormDyadic, approxNormDyadic, mul_add, ← ENNReal.lqNorm_const_mul] + refine add_le_add (T.le_opENorm f) (ENNReal.lqNorm_mono fun k => ?_) + rw [approxSeqDyadic, approxSeqDyadic, mul_left_comm] + gcongr + exact approxError_map_le T hT f _ + +/-- A bounded linear map with `T(A_n) ⊆ B_n` maps `A^s_q` into `B^s_q`. -/ +theorem MemApprox.map (T : X →L[ℝ] Y) (hT : ∀ n, ∀ a ∈ A n, T a ∈ B n) {f : X} + (hf : A.MemApprox s q f) : B.MemApprox s q (T f) := + (approxNorm_map_le T hT f).trans_lt (ENNReal.mul_lt_top eNorm_lt_top hf) + +/-- The image of `A^s_q(X)` under `T` lies in `B^s_q(Y)`. -/ +theorem approxSpace_map_le (hs : 0 ≤ s) (hq : 1 ≤ q) (T : X →L[ℝ] Y) + (hT : ∀ n, ∀ a ∈ A n, T a ∈ B n) : + (A.approxSpace s q hs hq).map T.toLinearMap ≤ B.approxSpace s q hs hq := by + rintro _ ⟨f, hf, rfl⟩ + exact MemApprox.map T hT hf + +/-- A bounded linear map is functorial for the image scheme `A.map T`. -/ +theorem mem_map_of_mem' (T : X →L[ℝ] Y) : ∀ n, ∀ a ∈ A n, T a ∈ A.map T.toLinearMap n := + fun _ _ ha => A.mem_map_of_mem T.toLinearMap ha + +end ApproximationScheme diff --git a/LeanPool/FunctionSpaces/Domains/Cube/Basic.lean b/LeanPool/FunctionSpaces/Domains/Cube/Basic.lean new file mode 100644 index 0000000000..4cab57e2a9 --- /dev/null +++ b/LeanPool/FunctionSpaces/Domains/Cube/Basic.lean @@ -0,0 +1,271 @@ +/- +Copyright (c) 2026 Mario Ullrich. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Mario Ullrich +-/ +module + +public import LeanPool.FunctionSpaces.Domains.Interval.PiecewisePoly +public import LeanPool.FunctionSpaces.Domains.Interval.Smoothing +public import Mathlib.MeasureTheory.Integral.Marginal +public import Mathlib.MeasureTheory.Constructions.Pi + +/- +Modified for Lean Pool: module names and imports adapted. +-/ + +/-! +# The unit cube and slices + +The unit cube `Q = [0, 1]^d` carries the product of Lebesgue measure on `[0, 1]` +(`Cube.cubeVol`), a probability measure on `Fin d → ℝ`. Functions on the cube are +functions `(Fin d → ℝ) → ℂ`, and `L_p(Q) = Lp ℂ p (cubeVol d)`. + +The theory on the cube is built from the theory on the interval through **slices**: the slice of +`f` through `x` in coordinate `i` is the function `t ↦ f(x₁, …, x_{i-1}, t, x_{i+1}, …, x_d)` +(`Cube.slice`). Tonelli's theorem in one coordinate, in Mathlib's form of marginals +(`MeasureTheory.lmarginal_singleton`, `MeasureTheory.lintegral_eq_of_lmarginal_eq`), integrates +out the coordinate `i`: `∫_Q G = ∫_Q (∫_0^1 G(x with t in place i) dt) dx` +(`Cube.lintegral_cubeVol_eq_slice`); the inner integral does not depend on `x_i`. So `L_p` norms +on the cube, also over the regions `{x ∈ Q : x_i ∈ S}`, are `L_p` norms over `x` of the +`L_p[0, 1]` norms of the slices (`Cube.eLpNorm_rpow_region_eq_slice`), and functions equal +almost everywhere on the cube have almost everywhere equal slices for almost every `x` +(`Cube.ae_slice_ae_eq`). The same holds over `R ∩ {x_i ∈ S}` for every measurable set `R` that +does not depend on `x_i` (`Cube.lintegral_inter_eq_slice`): there +`‖f‖_{L_p(R ∩ {x_i ∈ S})} = ‖x ↦ ‖slice f x i‖_{L_p(S ∩ [0, 1])}‖_{L_p(R)}` +(`Cube.eLpNorm_inter_eq_slice`, on `Q` and on the regions `{x ∈ Q : x_i ∈ [a, b]}` with the +restricted measures `Cube.regionVol`: `Cube.eLpNorm_cubeVol_eq_slice`, +`Cube.eLpNorm_regionVol_eq_slice`), so bounds of the slices give bounds on the cube +(`Cube.eLpNorm_inter_le_of_slice_le`, `Cube.eLpNorm_cubeVol_le_of_slice_le`). +-/ + +@[expose] public section + +open MeasureTheory Set +open scoped ENNReal + +namespace Cube + +open Interval + +/-- On `[a, b] ⊆ [0, 1]`, Lebesgue measure on `[0, 1]` restricted to `[a, b]` is Lebesgue measure +on `[a, b]`. -/ +theorem unitVol_restrict_Icc_of_subset {a b : ℝ} (ha : 0 ≤ a) (hb : b ≤ 1) : + unitVol.restrict (Icc a b) = volume.restrict (Icc a b) := by + rw [Measure.restrict_restrict measurableSet_Icc, Set.inter_eq_left.2 (Icc_subset_Icc ha hb)] + +/-- **Lebesgue measure on the unit cube** `[0, 1]^d`, the product of Lebesgue measure on +`[0, 1]`. -/ +noncomputable abbrev cubeVol (d : ℕ) : Measure (Fin d → ℝ) := Measure.pi fun _ : Fin d => unitVol + +variable {d : ℕ} + +/-- The **slice** of `f` through `x` in coordinate `i`: `t ↦ f(x₁, …, t, …, x_d)`, with `t` in +place `i`. -/ +def slice (f : (Fin d → ℝ) → ℂ) (x : Fin d → ℝ) (i : Fin d) (t : ℝ) : ℂ := + f (Function.update x i t) + +/-- The slices of a measurable function are measurable. -/ +theorem measurable_slice {f : (Fin d → ℝ) → ℂ} (hf : Measurable f) (x : Fin d → ℝ) + (i : Fin d) : Measurable (slice f x i) := + hf.comp (measurable_update x) + +/-- The slices of a continuous function are continuous. -/ +theorem continuous_slice {f : (Fin d → ℝ) → ℂ} (hf : Continuous f) (x : Fin d → ℝ) (i : Fin d) : + Continuous (slice f x i) := + hf.comp (continuous_const.update i continuous_id) + +/-- The slices of a measurable function are jointly measurable in the point and the variable. -/ +theorem measurable_slice_uncurry {f : (Fin d → ℝ) → ℂ} (hf : Measurable f) (i : Fin d) : + Measurable (fun q : (Fin d → ℝ) × ℝ => slice f q.1 i q.2) := + hf.comp measurable_update' + +/-- A slice does not depend on the coordinate `i` of the point. -/ +theorem slice_update (f : (Fin d → ℝ) → ℂ) (x : Fin d → ℝ) (i : Fin d) (s : ℝ) : + slice f (Function.update x i s) i = slice f x i := by + funext t + simp only [slice, Function.update_idem] + +/-- **Integrating out one coordinate**: for measurable `G ≥ 0` on the cube and every +coordinate `i`, `∫_Q G = ∫_Q (∫_0^1 G(update x i t) dt) dx`; the inner integral does not depend +on `x_i`. -/ +theorem lintegral_cubeVol_eq_slice {G : (Fin d → ℝ) → ℝ≥0∞} (hG : Measurable G) (i : Fin d) : + ∫⁻ x, G x ∂cubeVol d = ∫⁻ x, (∫⁻ t, G (Function.update x i t) ∂unitVol) ∂cubeVol d := by + set F : (Fin d → ℝ) → ℝ≥0∞ := fun x => ∫⁻ t, G (Function.update x i t) ∂unitVol + have hmarg : (∫⋯∫⁻_{i}, G ∂fun _ => unitVol) = F := lmarginal_singleton G i + have hF : Measurable F := hmarg ▸ hG.lmarginal (fun _ => unitVol) + refine lintegral_eq_of_lmarginal_eq {i} hG hF ?_ + rw [hmarg, lmarginal_singleton] + funext x + simp only [F, Function.update_idem] + rw [lintegral_const, measure_univ, mul_one] + +/-- **Integrating out one coordinate under a constraint that does not depend on it**: if the +measurable set `R` does not depend on the coordinate `i`, then +`∫_{R ∩ {x_i ∈ S}} G = ∫_R (∫_{S ∩ [0,1]} G(x with t in place i) dt) dx`. -/ +theorem lintegral_inter_eq_slice {G : (Fin d → ℝ) → ℝ≥0∞} (hG : Measurable G) (i : Fin d) + {R : Set (Fin d → ℝ)} (hR : MeasurableSet R) + (hRi : ∀ x t, Function.update x i t ∈ R ↔ x ∈ R) {S : Set ℝ} (hS : MeasurableSet S) : + ∫⁻ x in R ∩ {x | x i ∈ S}, G x ∂cubeVol d = + ∫⁻ x in R, (∫⁻ t in S, G (Function.update x i t) ∂unitVol) ∂cubeVol d := by + have hRS : MeasurableSet (R ∩ {x : Fin d → ℝ | x i ∈ S}) := + hR.inter (measurable_pi_apply i hS) + rw [← lintegral_indicator hRS, lintegral_cubeVol_eq_slice (hG.indicator hRS) i, + ← lintegral_indicator hR] + refine lintegral_congr fun x => ?_ + by_cases hx : x ∈ R + · rw [indicator_of_mem hx, ← lintegral_indicator hS] + refine lintegral_congr fun t => ?_ + by_cases ht : t ∈ S + · rw [indicator_of_mem ht, indicator_of_mem (show Function.update x i t ∈ + R ∩ {x | x i ∈ S} from ⟨(hRi x t).2 hx, by simpa using ht⟩)] + · rw [indicator_of_notMem ht, indicator_of_notMem fun h => ht (by simpa using h.2)] + · rw [indicator_of_notMem hx] + have h0 : ∀ t, (R ∩ {x | x i ∈ S}).indicator G (Function.update x i t) = 0 := fun t => + indicator_of_notMem + (fun h : Function.update x i t ∈ R ∩ {x | x i ∈ S} => hx ((hRi x t).1 h.1)) _ + simp only [h0, lintegral_zero] + +/-- **Integrating out one coordinate over a region** `{x ∈ Q : x_i ∈ S}`: +`∫_{x_i ∈ S} G = ∫_Q (∫_{S ∩ [0,1]} G(update x i t) dt) dx`, the case `R = ℝ^d` of +`Cube.lintegral_inter_eq_slice`. -/ +theorem lintegral_region_eq_slice {G : (Fin d → ℝ) → ℝ≥0∞} (hG : Measurable G) (i : Fin d) + {S : Set ℝ} (hS : MeasurableSet S) : + ∫⁻ x in {x | x i ∈ S}, G x ∂cubeVol d = + ∫⁻ x, (∫⁻ t in S, G (Function.update x i t) ∂unitVol) ∂cubeVol d := by + simpa using lintegral_inter_eq_slice hG i MeasurableSet.univ (fun _ _ => Iff.rfl) hS + +/-- **`L_p` norms over a region through slices**: for measurable `f`, `0 < p < ∞`, +`‖f‖_{L_p({x_i ∈ S})}^p = ∫_Q ‖slice f x i‖_{L_p(S)}^p dx`. -/ +theorem eLpNorm_rpow_region_eq_slice {f : (Fin d → ℝ) → ℂ} (hf : Measurable f) {p : ℝ≥0∞} + (hp0 : p ≠ 0) (hp : p ≠ ∞) (i : Fin d) {S : Set ℝ} (hS : MeasurableSet S) : + eLpNorm f p ((cubeVol d).restrict {x | x i ∈ S}) ^ p.toReal = + ∫⁻ x, eLpNorm (slice f x i) p (unitVol.restrict S) ^ p.toReal ∂cubeVol d := by + rw [eLpNorm_rpow_eq hf.aestronglyMeasurable hp0 hp, + lintegral_region_eq_slice (hf.eNorm.pow_const _) i hS] + refine lintegral_congr fun x => ?_ + rw [eLpNorm_rpow_eq (measurable_slice hf x i).aestronglyMeasurable hp0 hp] + rfl + +/-- **`L_p` norms on the cube through slices**: for measurable `f`, `0 < p < ∞`, +`‖f‖_{L_p(Q)}^p = ∫_Q ‖slice f x i‖_{L_p[0,1]}^p dx`. -/ +theorem eLpNorm_rpow_cubeVol_eq_slice {f : (Fin d → ℝ) → ℂ} (hf : Measurable f) {p : ℝ≥0∞} + (hp0 : p ≠ 0) (hp : p ≠ ∞) (i : Fin d) : + eLpNorm f p (cubeVol d) ^ p.toReal = + ∫⁻ x, eLpNorm (slice f x i) p unitVol ^ p.toReal ∂cubeVol d := by + have h := eLpNorm_rpow_region_eq_slice hf hp0 hp i MeasurableSet.univ + simpa using h + +/-- The `L_p` norms of the slices of a measurable function are measurable in the point. -/ +theorem measurable_eLpNorm_slice {f : (Fin d → ℝ) → ℂ} (hf : Measurable f) {p : ℝ≥0∞} + (hp0 : p ≠ 0) (hp : p ≠ ∞) (i : Fin d) (μ : Measure ℝ) [SFinite μ] : + Measurable fun x => eLpNorm (slice f x i) p μ := by + have h : Measurable fun x => ∫⁻ t, ‖slice f x i t‖ₑ ^ p.toReal ∂μ := + ((measurable_slice_uncurry hf i).eNorm.pow_const p.toReal).lintegral_prod_right' + have heq : (fun x => eLpNorm (slice f x i) p μ) = + fun x => (∫⁻ t, ‖slice f x i t‖ₑ ^ p.toReal ∂μ) ^ (1 / p.toReal) := funext fun x => + eLpNorm_eq_lintegral_rpow_eNorm_toReal hp0 hp (measurable_slice hf x i).aestronglyMeasurable + rw [heq] + exact h.pow_const _ + +/-- **`L_p` norms as mixed norms of slices**: let the measurable set `R` not depend on the +coordinate `i`. For measurable `f` and `0 < p < ∞`, +`‖f‖_{L_p(R ∩ {x_i ∈ S})} = ‖x ↦ ‖slice f x i‖_{L_p(S ∩ [0, 1])}‖_{L_p(R)}`, by integrating out the +coordinate `i` in `|f|^p` (`Cube.lintegral_inter_eq_slice`). -/ +theorem eLpNorm_inter_eq_slice {f : (Fin d → ℝ) → ℂ} (hf : Measurable f) {p : ℝ≥0∞} + (hp0 : p ≠ 0) (hp : p ≠ ∞) (i : Fin d) {R : Set (Fin d → ℝ)} (hR : MeasurableSet R) + (hRi : ∀ x t, Function.update x i t ∈ R ↔ x ∈ R) {S : Set ℝ} (hS : MeasurableSet S) : + eLpNorm f p ((cubeVol d).restrict (R ∩ {x | x i ∈ S})) = + eLpNorm (fun x => eLpNorm (slice f x i) p (unitVol.restrict S)) p + ((cubeVol d).restrict R) := by + refine (ENNReal.rpow_left_injective (ENNReal.toReal_pos hp0 hp).ne').eq_iff.1 ?_ + simp only [eLpNorm_rpow_eq hf.aestronglyMeasurable hp0 hp, eLpNorm_rpow_eq + (measurable_eLpNorm_slice hf hp0 hp i _).aestronglyMeasurable hp0 hp, eNorm_eq_self] + rw [lintegral_inter_eq_slice (hf.eNorm.pow_const _) i hR hRi hS] + refine setLIntegral_congr_fun hR fun x _ => ?_ + rw [eLpNorm_rpow_eq (measurable_slice hf x i).aestronglyMeasurable hp0 hp] + rfl + +/-- **Bounds through slices**: let the measurable set `R` not depend on the coordinate `i`. For +measurable `F, G`, `0 < p < ∞`, measurable `S, S' ⊆ ℝ` and `C ∈ [0, ∞]`, if +`‖slice F x i‖_{L_p(S ∩ [0, 1])} ≤ C ‖slice G x i‖_{L_p(S' ∩ [0, 1])}` for every point `x`, then +`‖F‖_{L_p(R ∩ {x_i ∈ S})} ≤ C ‖G‖_{L_p(R ∩ {x_i ∈ S'})}` (`Cube.eLpNorm_inter_eq_slice`). -/ +theorem eLpNorm_inter_le_of_slice_le {F G : (Fin d → ℝ) → ℂ} (hF : Measurable F) + (hG : Measurable G) {p : ℝ≥0∞} (hp0 : p ≠ 0) (hp : p ≠ ∞) (i : Fin d) + {R : Set (Fin d → ℝ)} (hR : MeasurableSet R) (hRi : ∀ x t, Function.update x i t ∈ R ↔ x ∈ R) + {S S' : Set ℝ} (hS : MeasurableSet S) (hS' : MeasurableSet S') {C : ℝ≥0∞} + (h : ∀ x, eLpNorm (slice F x i) p (unitVol.restrict S) ≤ + C * eLpNorm (slice G x i) p (unitVol.restrict S')) : + eLpNorm F p ((cubeVol d).restrict (R ∩ {x | x i ∈ S})) ≤ + C * eLpNorm G p ((cubeVol d).restrict (R ∩ {x | x i ∈ S'})) := by + rw [eLpNorm_inter_eq_slice hF hp0 hp i hR hRi hS, eLpNorm_inter_eq_slice hG hp0 hp i hR hRi hS', + ← eLpNorm_const_mul_ennreal (c := C) + (measurable_eLpNorm_slice hG hp0 hp i _).aestronglyMeasurable] + exact eLpNorm_mono_eNorm (measurable_eLpNorm_slice hF hp0 hp i _).aestronglyMeasurable + fun x => by simpa only [eNorm_eq_self] using h x + +/-- **Bounds through slices on the whole cube**: for measurable `F, G`, `0 < p < ∞` and +`C ∈ [0, ∞]`, if `‖slice F x i‖_{L_p[0,1]} ≤ C ‖slice G x i‖_{L_p[0,1]}` for every point `x`, +then `‖F‖_{L_p(Q)} ≤ C ‖G‖_{L_p(Q)}`. -/ +theorem eLpNorm_cubeVol_le_of_slice_le {F G : (Fin d → ℝ) → ℂ} (hF : Measurable F) + (hG : Measurable G) {p : ℝ≥0∞} (hp0 : p ≠ 0) (hp : p ≠ ∞) (i : Fin d) {C : ℝ≥0∞} + (h : ∀ x, eLpNorm (slice F x i) p unitVol ≤ C * eLpNorm (slice G x i) p unitVol) : + eLpNorm F p (cubeVol d) ≤ C * eLpNorm G p (cubeVol d) := by + simpa using eLpNorm_inter_le_of_slice_le hF hG hp0 hp i MeasurableSet.univ + (fun _ _ => Iff.rfl) MeasurableSet.univ MeasurableSet.univ (C := C) fun x => by simpa using h x + +/-- The cube measure restricted to the region `{x ∈ Q : x_i ∈ [a, b]}`. -/ +noncomputable abbrev regionVol (d : ℕ) (i : Fin d) (a b : ℝ) : Measure (Fin d → ℝ) := + (cubeVol d).restrict {x | x i ∈ Icc a b} + +/-- **`L_p` norms over a region through slices**, with Lebesgue measure on the slices: +`‖f‖_{L_p({x_i ∈ [a, b]})}^p = ∫_Q ‖slice f x i‖_{L_p[a, b]}^p dx` for `[a, b] ⊆ [0, 1]`. -/ +theorem eLpNorm_rpow_regionVol_eq_slice {f : (Fin d → ℝ) → ℂ} (hf : Measurable f) {p : ℝ≥0∞} + (hp0 : p ≠ 0) (hp : p ≠ ∞) (i : Fin d) {a b : ℝ} (ha : 0 ≤ a) (hb : b ≤ 1) : + eLpNorm f p (regionVol d i a b) ^ p.toReal = + ∫⁻ x, eLpNorm (slice f x i) p (volume.restrict (Icc a b)) ^ p.toReal ∂cubeVol d := by + rw [regionVol, eLpNorm_rpow_region_eq_slice hf hp0 hp i measurableSet_Icc, + unitVol_restrict_Icc_of_subset ha hb] + +/-- **`L_p` norms on the cube as mixed norms of slices**: for measurable `f` and `0 < p < ∞`, +`‖f‖_{L_p(Q)} = ‖x ↦ ‖slice f x i‖_{L_p[0, 1]}‖_{L_p(Q)}` (`Cube.eLpNorm_inter_eq_slice`). -/ +theorem eLpNorm_cubeVol_eq_slice {f : (Fin d → ℝ) → ℂ} (hf : Measurable f) {p : ℝ≥0∞} + (hp0 : p ≠ 0) (hp : p ≠ ∞) (i : Fin d) : + eLpNorm f p (cubeVol d) = eLpNorm (fun x => eLpNorm (slice f x i) p unitVol) p (cubeVol d) := by + simpa using eLpNorm_inter_eq_slice hf hp0 hp i MeasurableSet.univ (fun _ _ => Iff.rfl) + MeasurableSet.univ + +/-- **`L_p` norms over a region as mixed norms of slices**: for measurable `f`, `0 < p < ∞` and +`[a, b] ⊆ [0, 1]`, `‖f‖_{L_p({x_i ∈ [a, b]})} = ‖x ↦ ‖slice f x i‖_{L_p[a, b]}‖_{L_p(Q)}` +(`Cube.eLpNorm_inter_eq_slice`). -/ +theorem eLpNorm_regionVol_eq_slice {f : (Fin d → ℝ) → ℂ} (hf : Measurable f) {p : ℝ≥0∞} + (hp0 : p ≠ 0) (hp : p ≠ ∞) (i : Fin d) {a b : ℝ} (ha : 0 ≤ a) (hb : b ≤ 1) : + eLpNorm f p (regionVol d i a b) = + eLpNorm (fun x => eLpNorm (slice f x i) p (volume.restrict (Icc a b))) p (cubeVol d) := by + have h := eLpNorm_inter_eq_slice hf hp0 hp i MeasurableSet.univ (fun _ _ => Iff.rfl) + (measurableSet_Icc (a := a) (b := b)) + rwa [univ_inter, Measure.restrict_univ, unitVol_restrict_Icc_of_subset ha hb] at h + +/-- **Slices of almost equal functions**: if `f = g` almost everywhere on the cube, then for +almost every `x` the slices of `f` and `g` through `x` in coordinate `i` agree almost +everywhere on `[0, 1]`. -/ +theorem ae_slice_ae_eq {f g : (Fin d → ℝ) → ℂ} (hf : Measurable f) (hg : Measurable g) + (hfg : f =ᵐ[cubeVol d] g) (i : Fin d) : + ∀ᵐ x ∂cubeVol d, slice f x i =ᵐ[unitVol] slice g x i := by + have hset : MeasurableSet {x : Fin d → ℝ | f x ≠ g x} := + (measurableSet_eq_fun hf hg).compl + have h0 : ∫⁻ x, {x | f x ≠ g x}.indicator 1 x ∂cubeVol d = 0 := by + rw [lintegral_indicator_one hset] + exact ae_iff.1 hfg + rw [lintegral_cubeVol_eq_slice ((measurable_one.indicator hset)) i, + lintegral_eq_zero_iff (by + have : Measurable ((∫⋯∫⁻_{i}, {x | f x ≠ g x}.indicator 1 ∂fun _ => unitVol)) := + (measurable_one.indicator hset).lmarginal (fun _ => unitVol) + rwa [lmarginal_singleton] at this)] at h0 + filter_upwards [h0] with x hx + have hx' : ∫⁻ t, {t | slice f x i t ≠ slice g x i t}.indicator 1 t ∂unitVol = 0 := hx + rw [lintegral_indicator_one (s := {t | slice f x i t ≠ slice g x i t}) + (measurableSet_eq_fun (measurable_slice hf x i) (measurable_slice hg x i)).compl] at hx' + exact ae_iff.2 hx' + +end Cube diff --git a/LeanPool/FunctionSpaces/Domains/Cube/IsoCoincidence.lean b/LeanPool/FunctionSpaces/Domains/Cube/IsoCoincidence.lean new file mode 100644 index 0000000000..d9fdf3bc03 --- /dev/null +++ b/LeanPool/FunctionSpaces/Domains/Cube/IsoCoincidence.lean @@ -0,0 +1,344 @@ +/- +Copyright (c) 2026 Mario Ullrich. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Mario Ullrich +-/ +module + +public import LeanPool.FunctionSpaces.Domains.Cube.IsoInverse +public import LeanPool.FunctionSpaces.Domains.Cube.PiecewiseInverse +public import LeanPool.FunctionSpaces.Domains.Cube.SplineInverse + +/- +Modified for Lean Pool: module names and imports adapted. +-/ + +/-! +# Approximation spaces on the cube and the isotropic modulus + +The approximation spaces of the piecewise polynomials and of the tensor splines on the cube +`Q = [0, 1]^d` are the Besov spaces defined by the **isotropic** modulus as well +(`Cube.memApprox_cubePPScheme_iff_iso`, `Cube.memApprox_cubeSplineScheme_iff_iso`). Jackson's +inequality carries over from the coordinate moduli (`Cube.lpCubeModulus_le_lpIsoModulus`); the +inverse inequality comes from the bound of the isotropic difference by the gains in the single +coordinates (`Cube.eLpNorm_higherDiff_le_of_exponents`), applied to the one-dimensional classes of +the slices (`Cube.ppSubmodule`, `Cube.splineSubmodule`): + +* piecewise polynomials: the gain `(2^j |t|)^(1/p)` for every difference of order `m ≥ 1` + (`Interval.exists_eLpNorm_higherDiff_ppFun_le`), so every word of total order `r ≥ 1` gains + `(2^j ‖h‖)^(1/p)` (`Cube.le_sum_ppExponent`); +* splines of order `r`: the gain `(2^j |t|)^m` for `m < r` + (`Interval.exists_eLpNorm_higherDiff_spline_le_of_lt`) and `(2^j |t|)^(r - 1 + 1/p)` for + `m = r` (`Interval.eLpNorm_higherDiff_ppFun_spline_le`), so + every word gains `(2^j ‖h‖)^(r - 1 + 1/p)` (`Cube.le_sum_splineExponent`): either one + coordinate carries all `r` differences, or all coordinates carry fewer and their orders add up + to `r ≥ r - 1 + 1/p`. + +As a consequence, the Besov conditions with the coordinate moduli and with the isotropic modulus +agree for `0 ≤ s < r - 1 + 1/p` (`Cube.lqNorm_cubeModulus_lt_top_iff_iso`): both describe the +approximation space of the tensor splines of order `r`. +-/ + +@[expose] public section + +open MeasureTheory Set Polynomial +open Rd (higherDiff) +open scoped ENNReal +open ENNReal (dyadicWeight) + +namespace Cube + +open Interval + +variable {d : ℕ} {p : ℝ≥0∞} [Fact (1 ≤ p)] + +/-! ### The classes of the slices -/ + +/-- The **piecewise polynomials** of level `j` and degree `< r` on `[0, 1)`, as a subspace of the +functions on `ℝ`. -/ +noncomputable def ppSubmodule (r j : ℕ) : Submodule ℂ (ℝ → ℂ) where + carrier := {u | ∃ Q : ℕ → ℂ[X], (∀ n, Q n ∈ degreeLT ℂ r) ∧ u = ppFun j Q} + add_mem' := by + rintro _ _ ⟨Q, hQ, rfl⟩ ⟨Q', hQ', rfl⟩ + exact ⟨Q + Q', fun n => Submodule.add_mem _ (hQ n) (hQ' n), (ppFun_add j Q Q').symm⟩ + zero_mem' := ⟨0, fun _ => Submodule.zero_mem _, (ppFun_zero j).symm⟩ + smul_mem' := by + rintro c _ ⟨Q, hQ, rfl⟩ + refine ⟨fun n => C c * Q n, fun n => ?_, ?_⟩ + · change C c * Q n ∈ degreeLT ℂ r + rw [← smul_eq_C_mul] + exact Submodule.smul_mem _ _ (hQ n) + · rw [ppFun_const_mul] + rfl + +/-- The **splines** of order `r` and level `j` on `[0, 1)`, as a subspace of the functions on +`ℝ`. -/ +noncomputable def splineSubmodule (r j : ℕ) : Submodule ℂ (ℝ → ℂ) where + carrier := {u | ∃ Q : ℕ → ℂ[X], (∀ n, Q n ∈ degreeLT ℂ r) ∧ SplineJoins r j Q ∧ + u = ppFun j Q} + add_mem' := by + rintro _ _ ⟨Q, hQ, hJ, rfl⟩ ⟨Q', hQ', hJ', rfl⟩ + exact ⟨Q + Q', fun n => Submodule.add_mem _ (hQ n) (hQ' n), hJ.add hJ', + (ppFun_add j Q Q').symm⟩ + zero_mem' := ⟨0, fun _ => Submodule.zero_mem _, splineJoins_zero r j, (ppFun_zero j).symm⟩ + smul_mem' := by + rintro c _ ⟨Q, hQ, hJ, rfl⟩ + refine ⟨fun n => C c * Q n, fun n => ?_, hJ.const_mul c, ?_⟩ + · change C c * Q n ∈ degreeLT ℂ r + rw [← smul_eq_C_mul] + exact Submodule.smul_mem _ _ (hQ n) + · rw [ppFun_const_mul] + rfl + +omit [Fact (1 ≤ p)] in +/-- The slices of a piecewise polynomial on the cube are piecewise polynomials. -/ +theorem IsCubePP.slice_mem_ppSubmodule {r j : ℕ} {g : (Fin d → ℝ) → ℂ} (hg : IsCubePP r j g) + (i : Fin d) (x : Fin d → ℝ) : slice g x i ∈ ppSubmodule r j := by + obtain ⟨Q, hQ, hs⟩ := hg.exists_slice_eq_ppFun i x + exact ⟨Q, hQ, hs⟩ + +omit [Fact (1 ≤ p)] in +/-- The slices of a spline on the cube are splines. -/ +theorem IsCubeSpline.slice_mem_splineSubmodule {r j : ℕ} {g : (Fin d → ℝ) → ℂ} + (hg : IsCubeSpline r j g) (i : Fin d) (x : Fin d → ℝ) : slice g x i ∈ splineSubmodule r j := + hg.2 i x + +/-! ### The exponents of the gains -/ + +variable (p) in +/-- The gain exponent of a difference of order `m` of piecewise polynomials: `0` for `m = 0`, +`1/p` otherwise. -/ +noncomputable def ppExponent (m : ℕ) : ℝ := if m = 0 then 0 else 1 / p.toReal + +variable (p) in +/-- The gain exponent of a difference of order `m` of splines of order `r`: `m` for `m < r`, +`r - 1 + 1/p` for `m = r`. -/ +noncomputable def splineExponent (r m : ℕ) : ℝ := + if m < r then m else ((r - 1 : ℕ) : ℝ) + 1 / p.toReal + +omit [Fact (1 ≤ p)] in +/-- The gain exponents of piecewise polynomials are nonnegative. -/ +theorem ppExponent_nonneg (m : ℕ) : 0 ≤ ppExponent p m := by + unfold ppExponent + split_ifs <;> positivity + +omit [Fact (1 ≤ p)] in +/-- The gain exponents of splines are nonnegative. -/ +theorem splineExponent_nonneg (r m : ℕ) : 0 ≤ splineExponent p r m := by + unfold splineExponent + split_ifs <;> positivity + +omit [Fact (1 ≤ p)] in +/-- **Every word of positive order gains `1/p` for piecewise polynomials**: if `∑_i m_i = r ≥ 1`, +some `m_i ≥ 1`. -/ +theorem le_sum_ppExponent {r : ℕ} (hr : 1 ≤ r) (m : Fin d → ℕ) (hm : ∑ i, m i = r) : + 1 / p.toReal ≤ ∑ i, ppExponent p (m i) := by + obtain ⟨i, hi⟩ : ∃ i, m i ≠ 0 := by + by_contra h + push Not at h + simp [h] at hm + omega + calc 1 / p.toReal = ppExponent p (m i) := by simp [ppExponent, hi] + _ ≤ ∑ i, ppExponent p (m i) := + Finset.single_le_sum (f := fun i => ppExponent p (m i)) + (fun i _ => ppExponent_nonneg _) (Finset.mem_univ i) + +/-- **Every word of order `r` gains `r - 1 + 1/p` for splines of order `r`**: either one +coordinate carries all `r` differences, or all orders are `< r` and add up to `r`. -/ +theorem le_sum_splineExponent {r : ℕ} (hr : 1 ≤ r) (m : Fin d → ℕ) (hm : ∑ i, m i = r) : + ((r - 1 : ℕ) : ℝ) + 1 / p.toReal ≤ ∑ i, splineExponent p r (m i) := by + have hle : ∀ i, m i ≤ r := fun i => hm ▸ Finset.single_le_sum (f := m) + (fun _ _ => Nat.zero_le _) (Finset.mem_univ i) + by_cases h : ∃ i, m i = r + · obtain ⟨i, hi⟩ := h + calc ((r - 1 : ℕ) : ℝ) + 1 / p.toReal = splineExponent p r (m i) := by + simp [splineExponent, hi] + _ ≤ ∑ i, splineExponent p r (m i) := + Finset.single_le_sum (f := fun i => splineExponent p r (m i)) + (fun i _ => splineExponent_nonneg _ _) (Finset.mem_univ i) + · push Not at h + have hlt : ∀ i, m i < r := fun i => lt_of_le_of_ne (hle i) (h i) + have hsum : ∑ i, splineExponent p r (m i) = r := by + simp only [splineExponent, hlt, ↓reduceIte] + exact_mod_cast hm + have h1p : 1 / p.toReal ≤ 1 := by + rcases eq_or_ne p ∞ with hpinf | hpinf + · simp [hpinf] + · have h := ENNReal.one_le_toReal_of_one_le Fact.out hpinf + exact (div_le_one (by linarith)).2 h + rw [hsum, Nat.cast_sub hr, Nat.cast_one] + linarith + +/-! ### Differences of every order in one variable, for steps of either sign -/ + +/-- **Piecewise polynomials, steps of either sign**: there is `C` such that for every level `j`, +every piecewise polynomial `u` of level `j` and degree `< r`, every order `m ≤ r` and +`|t| ≤ 2^(-j)`, `‖Δ_t^m u‖_{L_p(J(m,t))} ≤ C (2^j |t|)^{θ_m} ‖u‖_p` with the exponent +`θ_m = Cube.ppExponent p m`. -/ +theorem exists_eLpNorm_higherDiff_stepRegion_pp_le (r : ℕ) (hp : p ≠ ∞) : + ∃ C : ℝ≥0∞, C ≠ ∞ ∧ ∀ j : ℕ, ∀ u ∈ ppSubmodule r j, ∀ m ≤ r, ∀ t : ℝ, |t| ≤ 1 / 2 ^ j → + eLpNorm (higherDiff m t u) p (volume.restrict (stepRegion m t)) ≤ + C * ENNReal.ofReal (2 ^ j * |t|) ^ ppExponent p m * eLpNorm u p unitVol := by + classical + have hex : ∀ m : ℕ, ∃ C : ℝ≥0∞, C ≠ ∞ ∧ (1 ≤ m → m ≤ r → ∀ (j : ℕ) (Q : ℕ → ℂ[X]), + (∀ n, Q n ∈ degreeLT ℂ r) → ∀ {h : ℝ}, 0 ≤ h → h ≤ 1 / 2 ^ j → + eLpNorm (higherDiff m h (ppFun j Q)) p (volume.restrict (Icc 0 (1 - m * h))) ≤ + C * ENNReal.ofReal (2 ^ j * h) ^ (1 / p.toReal) * eLpNorm (ppFun j Q) p unitVol) := + fun m => by + by_cases hm : 1 ≤ m ∧ m ≤ r + · obtain ⟨C, hC, hb⟩ := exists_eLpNorm_higherDiff_ppFun_le (p := p) hm.1 hm.2 hp + exact ⟨C, hC, fun _ _ => hb⟩ + · exact ⟨0, ENNReal.zero_ne_top, fun h1 h2 => absurd ⟨h1, h2⟩ hm⟩ + choose Cm hCm hCmb using hex + refine ⟨1 + ∑ m ∈ Finset.range (r + 1), Cm m, ENNReal.add_ne_top.2 ⟨ENNReal.one_ne_top, + ENNReal.sum_ne_top.2 fun m _ => hCm m⟩, fun j u hu m hmr t ht => ?_⟩ + obtain ⟨Q, hQ, rfl⟩ := hu + rw [eLpNorm_higherDiff_stepRegion_eq (ppFun j Q) p m t] + have hCle : Cm m ≤ 1 + ∑ m ∈ Finset.range (r + 1), Cm m := + le_add_left (Finset.single_le_sum (f := Cm) (fun _ _ => zero_le) + (Finset.mem_range.2 (Nat.lt_succ_of_le hmr))) + rcases Nat.eq_zero_or_pos m with rfl | hm + · simp only [ppExponent, ↓reduceIte, ENNReal.rpow_zero, mul_one, higherDiff_zero, + Nat.cast_zero, zero_mul, sub_zero] + exact le_mul_of_one_le_left zero_le le_self_add + · have hb := hCmb m hm hmr j Q hQ (abs_nonneg t) ht + simp only [ppExponent, show m ≠ 0 by omega, ↓reduceIte] + exact hb.trans (by gcongr) + +/-- **Splines, steps of either sign**: there is `C` such that for every level `j`, every spline +`u` of order `r` and level `j`, every order `m ≤ r` and `|t| ≤ 2^(-j)`, +`‖Δ_t^m u‖_{L_p(J(m,t))} ≤ C (2^j |t|)^{θ_m} ‖u‖_p` with the exponent +`θ_m = Cube.splineExponent p r m`. -/ +theorem exists_eLpNorm_higherDiff_stepRegion_spline_le {r : ℕ} (hr : 1 ≤ r) (hp : p ≠ ∞) : + ∃ C : ℝ≥0∞, C ≠ ∞ ∧ ∀ j : ℕ, ∀ u ∈ splineSubmodule r j, ∀ m ≤ r, ∀ t : ℝ, + |t| ≤ 1 / 2 ^ j → + eLpNorm (higherDiff m t u) p (volume.restrict (stepRegion m t)) ≤ + C * ENNReal.ofReal (2 ^ j * |t|) ^ splineExponent p r m * eLpNorm u p unitVol := by + classical + obtain ⟨K, hK, hKb⟩ := enorm_polyFun_le (p := p) r hp + have hex : ∀ m : ℕ, ∃ C : ℝ≥0∞, C ≠ ∞ ∧ (1 ≤ m → m < r → ∀ (j : ℕ) (Q : ℕ → ℂ[X]), + (∀ n, Q n ∈ degreeLT ℂ r) → SplineJoins r j Q → ∀ {h : ℝ}, 0 ≤ h → h ≤ 1 / 2 ^ j → + eLpNorm (higherDiff m h (ppFun j Q)) p (volume.restrict (Icc 0 (1 - m * h))) ≤ + C * ENNReal.ofReal (2 ^ j * h) ^ m * eLpNorm (ppFun j Q) p unitVol) := + fun m => by + by_cases hm : 1 ≤ m ∧ m < r + · obtain ⟨C, hC, hb⟩ := exists_eLpNorm_higherDiff_spline_le_of_lt (p := p) hm.1 hm.2 hp + exact ⟨C, hC, fun _ _ => hb⟩ + · exact ⟨0, ENNReal.zero_ne_top, fun h1 h2 => absurd ⟨h1, h2⟩ hm⟩ + choose Cm hCm hCmb using hex + set C := 1 + ∑ m ∈ Finset.range (r + 1), Cm m + splineInverseConst r K p + refine ⟨C, ENNReal.add_ne_top.2 ⟨ENNReal.add_ne_top.2 ⟨ENNReal.one_ne_top, + ENNReal.sum_ne_top.2 fun m _ => hCm m⟩, splineInverseConst_ne_top r hK⟩, + fun j u hu m hmr t ht => ?_⟩ + obtain ⟨Q, hQ, hJ, rfl⟩ := hu + rw [eLpNorm_higherDiff_stepRegion_eq (ppFun j Q) p m t] + have hCle : Cm m ≤ C := le_add_right (le_add_left (Finset.single_le_sum (f := Cm) + (fun _ _ => zero_le) (Finset.mem_range.2 (Nat.lt_succ_of_le hmr)))) + rcases lt_or_eq_of_le hmr with hmr' | rfl + · rcases Nat.eq_zero_or_pos m with rfl | hm + · simp only [splineExponent, hmr', ↓reduceIte, Nat.cast_zero, ENNReal.rpow_zero, mul_one, + higherDiff_zero, zero_mul, sub_zero] + exact le_mul_of_one_le_left zero_le (le_add_right le_self_add) + · have hb := hCmb m hm hmr' j Q hQ hJ (abs_nonneg t) ht + simp only [splineExponent, hmr', ↓reduceIte, ENNReal.rpow_natCast] + exact hb.trans (by gcongr) + · have hb := eLpNorm_higherDiff_ppFun_spline_le hQ hJ hKb hp (abs_nonneg t) ht + rw [splineStripConst_mul_eq m j K |t|] at hb + simp only [splineExponent, lt_irrefl, ↓reduceIte] + exact hb.trans (by gcongr; exact le_add_self) + +/-! ### The inverse inequalities with the isotropic modulus -/ + +/-- **The inverse inequality for piecewise polynomials on the cube with the isotropic +modulus**, of order `θ = 1/p`. -/ +theorem exists_inverse_cubePPScheme_iso {r : ℕ} (hr : 1 ≤ r) (hp : p ≠ ∞) : + ∃ CB : ℝ≥0∞, CB ≠ ∞ ∧ ∀ j k : ℕ, ∀ a ∈ cubePPScheme p d r (2 ^ j), + lpIsoModulus p r a k ≤ CB * dyadicWeight (-(1 / p.toReal)) (k - j) * ‖a‖ₑ := by + obtain ⟨C, hC, hCb⟩ := exists_eLpNorm_higherDiff_stepRegion_pp_le (p := p) r hp + refine ⟨(d : ℝ≥0∞) ^ r * C ^ d + 2 ^ r, ENNReal.add_ne_top.2 ⟨ENNReal.mul_ne_top + (ENNReal.pow_ne_top (ENNReal.natCast_ne_top d)) (ENNReal.pow_ne_top hC), by simp⟩, + fun j k a ha => ?_⟩ + obtain ⟨g, hg, hae⟩ := mem_cubePPScheme_two_pow.1 ha + exact lpIsoModulus_le_of_exponents (ppSubmodule r j) hp r (ppExponent p) ppExponent_nonneg + (by positivity) (fun m hm => le_sum_ppExponent hr m hm) (hCb j) hg.1.1 + (fun i x => hg.slice_mem_ppSubmodule i x) hae + +/-- **The inverse inequality for tensor splines on the cube with the isotropic modulus**, of +order `θ = r - 1 + 1/p`. -/ +theorem exists_inverse_cubeSplineScheme_iso {r : ℕ} (hr : 1 ≤ r) (hp : p ≠ ∞) : + ∃ CB : ℝ≥0∞, CB ≠ ∞ ∧ ∀ j k : ℕ, ∀ a ∈ cubeSplineScheme p d r (2 ^ j), + lpIsoModulus p r a k ≤ + CB * dyadicWeight (-(((r - 1 : ℕ) : ℝ) + 1 / p.toReal)) (k - j) * ‖a‖ₑ := by + obtain ⟨C, hC, hCb⟩ := exists_eLpNorm_higherDiff_stepRegion_spline_le (p := p) hr hp + refine ⟨(d : ℝ≥0∞) ^ r * C ^ d + 2 ^ r, ENNReal.add_ne_top.2 ⟨ENNReal.mul_ne_top + (ENNReal.pow_ne_top (ENNReal.natCast_ne_top d)) (ENNReal.pow_ne_top hC), by simp⟩, + fun j k a ha => ?_⟩ + obtain ⟨g, hg, hae⟩ := mem_cubeSplineScheme_two_pow.1 ha + exact lpIsoModulus_le_of_exponents (splineSubmodule r j) hp r (splineExponent p r) + (splineExponent_nonneg r) (by positivity) (fun m hm => le_sum_splineExponent hr m hm) (hCb j) + hg.1.1 (fun i x => hg.slice_mem_splineSubmodule i x) hae + +/-! ### The coincidence theorems -/ + +/-- The **isotropic modulus** `ω_r(f, 2^(-k))_p` on the cube is compatible with the scheme of +piecewise polynomials, with inverse order `θ = 1/p` and Jackson's inequality at every level. -/ +noncomputable def cubePPIsoModulusData {r : ℕ} (hr : 1 ≤ r) (hp : p ≠ ∞) : + ApproximationScheme.ModulusData (cubePPScheme p d r) (1 / p.toReal) := + .ofExists (lpIsoModulus p r) (lpIsoModulus_add_le r) (2 ^ r) (by simp) (lpIsoModulus_le r) 0 + (by + obtain ⟨CJ, hCJ, h⟩ := exists_approxError_cubePPScheme_le (d := d) (p := p) hr hp + exact ⟨CJ * d, ENNReal.mul_ne_top hCJ (ENNReal.natCast_ne_top d), fun f k _ => + (h f k).trans (by + rw [mul_assoc] + exact mul_le_mul' le_rfl (lpCubeModulus_le_lpIsoModulus r f k))⟩) + (exists_inverse_cubePPScheme_iso hr hp) + +/-- **Piecewise polynomials on the cube and the isotropic modulus.** For `1 ≤ p < ∞`, +`1 ≤ q ≤ ∞`, `r ≥ 1` and `0 ≤ s < 1/p`, an `f ∈ L_p([0, 1]^d)` lies in the approximation space +`A^s_q` of the piecewise polynomials of degree `< r` in each variable iff +`‖f‖_p + ‖(2^(ks) ω_r(f, 2^(-k))_p)_k‖_{ℓ_q} < ∞` with the isotropic modulus `ω_r`. -/ +theorem memApprox_cubePPScheme_iff_iso {r : ℕ} (hr : 1 ≤ r) (hp : p ≠ ∞) {s : ℝ} {q : ℝ≥0∞} + (hq : 1 ≤ q) (hs : 0 ≤ s) (hsp : s < 1 / p.toReal) (f : Lp ℂ p (cubeVol d)) : + (cubePPScheme p d r).MemApprox s q f ↔ + ‖f‖ₑ + ENNReal.lqNorm q (fun k => dyadicWeight s k * lpIsoModulus p r f k) < ∞ := + (cubePPIsoModulusData hr hp).memApprox_iff_modNorm_lt_top hq hs hsp f + +/-- The **isotropic modulus** `ω_r(f, 2^(-k))_p` on the cube is compatible with the scheme of +tensor splines of order `r`, with inverse order `θ = r - 1 + 1/p`. -/ +noncomputable def cubeSplineIsoModulusData {r : ℕ} (hr : 1 ≤ r) (hp : p ≠ ∞) : + ApproximationScheme.ModulusData (cubeSplineScheme p d r) (((r - 1 : ℕ) : ℝ) + 1 / p.toReal) := + .ofExists (lpIsoModulus p r) (lpIsoModulus_add_le r) (2 ^ r) (by simp) (lpIsoModulus_le r) 0 + (by + obtain ⟨CJ, hCJ, h⟩ := exists_approxError_cubeSplineScheme_le (d := d) (p := p) hr hp + exact ⟨CJ * d, ENNReal.mul_ne_top hCJ (ENNReal.natCast_ne_top d), fun f k _ => + (h f k).trans (by + rw [mul_assoc] + exact mul_le_mul' le_rfl (lpCubeModulus_le_lpIsoModulus r f k))⟩) + (exists_inverse_cubeSplineScheme_iso hr hp) + +/-- **Tensor splines on the cube and the isotropic modulus.** For `1 ≤ p < ∞`, `1 ≤ q ≤ ∞`, +`r ≥ 1` and `0 ≤ s < r - 1 + 1/p`, an `f ∈ L_p([0, 1]^d)` lies in the approximation space +`A^s_q` of the tensor splines of order `r` iff +`‖f‖_p + ‖(2^(ks) ω_r(f, 2^(-k))_p)_k‖_{ℓ_q} < ∞` with the isotropic modulus `ω_r`. -/ +theorem memApprox_cubeSplineScheme_iff_iso {r : ℕ} (hr : 1 ≤ r) (hp : p ≠ ∞) {s : ℝ} + {q : ℝ≥0∞} (hq : 1 ≤ q) (hs : 0 ≤ s) (hsr : s < (r : ℝ) - 1 + 1 / p.toReal) + (f : Lp ℂ p (cubeVol d)) : + (cubeSplineScheme p d r).MemApprox s q f ↔ + ‖f‖ₑ + ENNReal.lqNorm q (fun k => dyadicWeight s k * lpIsoModulus p r f k) < ∞ := by + have hθ : (r : ℝ) - 1 + 1 / p.toReal = ((r - 1 : ℕ) : ℝ) + 1 / p.toReal := by + rw [Nat.cast_sub hr, Nat.cast_one] + exact (cubeSplineIsoModulusData hr hp).memApprox_iff_modNorm_lt_top hq hs (hθ ▸ hsr) f + +/-- **The coordinate and the isotropic Besov conditions agree on the cube**: for `1 ≤ p < ∞`, +`1 ≤ q ≤ ∞`, `r ≥ 1` and `0 ≤ s < r - 1 + 1/p`, +`‖f‖_p + ‖(2^(ks) ω_r^cube(f, 2^(-k))_p)_k‖_{ℓ_q} < ∞` iff the same holds with the isotropic +modulus; both say that `f` lies in the approximation space of the tensor splines of order `r`. -/ +theorem lqNorm_cubeModulus_lt_top_iff_iso {r : ℕ} (hr : 1 ≤ r) (hp : p ≠ ∞) {s : ℝ} + {q : ℝ≥0∞} (hq : 1 ≤ q) (hs : 0 ≤ s) (hsr : s < (r : ℝ) - 1 + 1 / p.toReal) + (f : Lp ℂ p (cubeVol d)) : + ‖f‖ₑ + ENNReal.lqNorm q (fun k => dyadicWeight s k * lpCubeModulus p r f k) < ∞ ↔ + ‖f‖ₑ + ENNReal.lqNorm q (fun k => dyadicWeight s k * lpIsoModulus p r f k) < ∞ := + (memApprox_cubeSplineScheme_iff hr hp hq hs hsr f).symm.trans + (memApprox_cubeSplineScheme_iff_iso hr hp hq hs hsr f) + +end Cube diff --git a/LeanPool/FunctionSpaces/Domains/Cube/IsoDifferences.lean b/LeanPool/FunctionSpaces/Domains/Cube/IsoDifferences.lean new file mode 100644 index 0000000000..8be7faae19 --- /dev/null +++ b/LeanPool/FunctionSpaces/Domains/Cube/IsoDifferences.lean @@ -0,0 +1,157 @@ +/- +Copyright (c) 2026 Mario Ullrich. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Mario Ullrich +-/ +module + +public import LeanPool.FunctionSpaces.Domains.Cube.Modulus +public import LeanPool.FunctionSpaces.Analysis.Differences.TranslationAlgebra + +/- +Modified for Lean Pool: module names and imports adapted. +-/ + +/-! +# Isotropic differences and their expansion into coordinate differences + +The **isotropic difference** of order `r` with step `h ∈ ℝ^d`, +`Δ_h^r f(x) = ∑_k (-1)^(r-k) C(r,k) f(x + kh)` (`Rd.higherDiff`, `Cube.higherDiff_apply`), moves all +coordinates at once; with the step `t e_i` it is the difference in coordinate `i` +(`Cube.higherDiff_single`). The translation algebra `ℂ[ℝ^d]` of +`FunctionSpaces.Analysis.Differences.TranslationAlgebra` expands it into differences in single +coordinates: the element `(δ_{h_i e_i} - 1)^m` acts by the coordinate difference `Δ^m_{h_i e_i}` +(`Cube.diffAct_coordElem_pow`), a product of such elements along a list of coordinates by the mixed +coordinate difference `M_m f = Δ^{m_0}_{h_0 e_0} ⋯ Δ^{m_{d-1}}_{h_{d-1} e_{d-1}} f` +(`Cube.mixedDiff`, `Cube.diffAct_list_prod`), and the expansion +`(δ_h - 1)^r = ∑_α δ_{s_α} ∏_i (δ_i - 1)^{m_i(α)}` (`TranslationAlgebra.single_sub_one_pow_eq_sum`) +gives `Δ_h^r f(x) = ∑_α M_{m(α)} f(x + s_α)` (`Cube.higherDiff_eq_sum`): a sum of `d^r` mixed +coordinate differences of total order `r`, at points shifted by `s_α`. + +The slices in coordinate `i` of a mixed difference in other coordinates are combinations of +slices of `f` (`Cube.slice_mixedDiff_mem`), so they stay in every subspace of functions of one +variable that contains the slices of `f`. +-/ + +@[expose] public section + +open MeasureTheory Set +open Rd (higherDiff) +open scoped ENNReal + +namespace Cube + +open Interval TranslationAlgebra + +variable {d : ℕ} + +/-! ### Isotropic differences -/ + +/-- `Δ_h^r f(x) = ∑_{k ≤ r} (-1)^(r-k) C(r,k) f(x + kh)`. -/ +theorem higherDiff_apply (r : ℕ) (h : Fin d → ℝ) (f : (Fin d → ℝ) → ℂ) (x : Fin d → ℝ) : + higherDiff r h f x = ∑ k ∈ Finset.range (r + 1), + ((-1 : ℂ) ^ (r - k) * (r.choose k : ℂ)) * f (x + (k : ℝ) • h) := + Rd.higherDiff_apply r h f x + +/-- Isotropic differences are linear. -/ +theorem higherDiff_add (r : ℕ) (h : Fin d → ℝ) (f g : (Fin d → ℝ) → ℂ) : + higherDiff r h (f + g) = higherDiff r h f + higherDiff r h g := + fwdDiff_iter_add h f g r + +/-- **Isotropic differences in a coordinate direction** are the coordinate differences: the +isotropic difference with step `t e_i` is the difference `Cube.cubeDiff r t i` in coordinate `i`. -/ +theorem higherDiff_single (r : ℕ) (i : Fin d) (t : ℝ) (f : (Fin d → ℝ) → ℂ) : + higherDiff r (Pi.single i t) f = cubeDiff r t i f := by + funext x + rw [higherDiff_apply, cubeDiff_eq] + refine Finset.sum_congr rfl fun k _ => ?_ + congr 2 + funext c + by_cases hc : c = i + · subst hc + simp + · simp [hc] + +/-! ### Mixed coordinate differences -/ + +/-- The **mixed coordinate difference** along a list of coordinates: the difference of order +`m_i` with step `h_i` in each coordinate `i` of the list, the last one first. -/ +noncomputable def mixedDiff (m : Fin d → ℕ) (h : Fin d → ℝ) (l : List (Fin d)) + (f : (Fin d → ℝ) → ℂ) : (Fin d → ℝ) → ℂ := + l.foldr (fun i g => cubeDiff (m i) (h i) i g) f + +/-- The mixed difference along the empty list is the function itself. -/ +theorem mixedDiff_nil (m : Fin d → ℕ) (h : Fin d → ℝ) (f : (Fin d → ℝ) → ℂ) : + mixedDiff m h [] f = f := rfl + +/-- The mixed difference along `i :: l`. -/ +theorem mixedDiff_cons (m : Fin d → ℕ) (h : Fin d → ℝ) (i : Fin d) (l : List (Fin d)) + (f : (Fin d → ℝ) → ℂ) : + mixedDiff m h (i :: l) f = cubeDiff (m i) (h i) i (mixedDiff m h l f) := rfl + +/-- Mixed differences of measurable functions are measurable. -/ +theorem measurable_mixedDiff (m : Fin d → ℕ) (h : Fin d → ℝ) (l : List (Fin d)) + {f : (Fin d → ℝ) → ℂ} (hf : Measurable f) : Measurable (mixedDiff m h l f) := by + induction l with + | nil => exact hf + | cons i l ih => exact measurable_cubeDiff ih _ _ i + +/-- `(δ_{h_i e_i} - 1)^m` acts by the coordinate difference `Δ^m_{h_i e_i}`. -/ +theorem diffAct_coordElem_pow (h : Fin d → ℝ) (i : Fin d) (m : ℕ) (f : (Fin d → ℝ) → ℂ) : + diffAct (coordElem h i ^ m) f = cubeDiff m (h i) i f := by + rw [coordElem, ← higherDiff_eq_diffAct, higherDiff_single] + +/-- **Products of coordinate elements act by mixed differences**. -/ +theorem diffAct_list_prod (m : Fin d → ℕ) (h : Fin d → ℝ) (l : List (Fin d)) + (f : (Fin d → ℝ) → ℂ) : + diffAct ((l.map fun i => coordElem h i ^ m i).prod) f = mixedDiff m h l f := by + induction l with + | nil => simp [mixedDiff_nil] + | cons i l ih => + rw [List.map_cons, List.prod_cons, map_mul, mul_apply_eq_comp, ih, + diffAct_coordElem_pow, mixedDiff_cons] + +/-! ### The expansion -/ + +/-- **The isotropic difference as a sum of mixed coordinate differences**: +`Δ_h^r f(x) = ∑_α M_{m(α)} f(x + s_α)`, summed over the words `α : Fin r → Fin d`, with the +multiplicities `m_i(α)` and the shifts `s_α`. -/ +theorem higherDiff_eq_sum (r : ℕ) (h : Fin d → ℝ) (f : (Fin d → ℝ) → ℂ) (x : Fin d → ℝ) : + higherDiff r h f x = ∑ α : Fin r → Fin d, + mixedDiff (count α) h (List.finRange d) f (x + shiftVec h α) := by + rw [higherDiff_eq_diffAct, single_sub_one_pow_eq_sum, map_sum, LinearMap.sum_apply, + Finset.sum_apply] + refine Finset.sum_congr rfl fun α _ => ?_ + rw [map_mul, mul_apply_eq_comp, diffAct_single_one, transl_apply, Fin.prod_univ_def, + diffAct_list_prod] + +/-! ### Slices of mixed differences -/ + +/-- **Slices of coordinate differences in other coordinates**: for `c ≠ i`, the slice in +coordinate `i` of `Δ^m_{t e_c} G` is a combination of slices of `G` in coordinate `i`. -/ +theorem slice_cubeDiff_of_ne (m : ℕ) (t : ℝ) {c i : Fin d} (hci : c ≠ i) + (G : (Fin d → ℝ) → ℂ) (x : Fin d → ℝ) : + slice (cubeDiff m t c G) x i = ∑ k ∈ Finset.range (m + 1), + ((-1 : ℂ) ^ (m - k) * (m.choose k : ℂ)) • + slice G (Function.update x c (x c + k * t)) i := by + funext s + rw [Finset.sum_apply] + simp only [slice, cubeDiff_eq, Pi.smul_apply, smul_eq_mul] + refine Finset.sum_congr rfl fun k _ => ?_ + rw [Function.update_of_ne hci, Function.update_comm hci] + +/-- **Slices of mixed differences stay in a subspace**: if every slice of `f` in coordinate `i` +lies in a subspace `V` of functions of one variable, so does every slice in coordinate `i` of a +mixed difference along a list of coordinates `≠ i`. -/ +theorem slice_mixedDiff_mem (V : Submodule ℂ (ℝ → ℂ)) (m : Fin d → ℕ) (h : Fin d → ℝ) + {i : Fin d} {l : List (Fin d)} (hl : i ∉ l) {f : (Fin d → ℝ) → ℂ} + (hf : ∀ x, slice f x i ∈ V) (x : Fin d → ℝ) : slice (mixedDiff m h l f) x i ∈ V := by + induction l generalizing x with + | nil => exact hf x + | cons c l ih => + have hci : c ≠ i := fun h => hl (h ▸ List.mem_cons_self) + have hl' : i ∉ l := fun h => hl (List.mem_cons_of_mem c h) + rw [mixedDiff_cons, slice_cubeDiff_of_ne _ _ hci] + exact Submodule.sum_mem _ fun k _ => Submodule.smul_mem _ _ (ih hl' _) + +end Cube diff --git a/LeanPool/FunctionSpaces/Domains/Cube/IsoInverse.lean b/LeanPool/FunctionSpaces/Domains/Cube/IsoInverse.lean new file mode 100644 index 0000000000..229d56c392 --- /dev/null +++ b/LeanPool/FunctionSpaces/Domains/Cube/IsoInverse.lean @@ -0,0 +1,289 @@ +/- +Copyright (c) 2026 Mario Ullrich. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Mario Ullrich +-/ +module + +public import LeanPool.FunctionSpaces.Domains.Cube.IsoModulus +public import LeanPool.FunctionSpaces.Domains.Interval.LowerDifferences + +/- +Modified for Lean Pool: module names and imports adapted. +-/ + +/-! +# Isotropic differences of functions with slices in a class + +Let `V` be a subspace of functions of one variable (for instance the piecewise polynomials or +the splines of level `j`) whose differences of every order `m ≤ r` satisfy +`‖Δ_t^m u‖_{L_p(J(m,t))} ≤ β(m, t) ‖u‖_{L_p[0,1]}` on the step regions +`J(m,t) = {x ∈ [0, 1] : x + mt ∈ [0, 1]}` (`Interval.stepRegion`). For a function `f` on the cube +all of whose slices lie in `V`, + +`‖Δ_h^r f‖_{L_p(Q_{rh})} ≤ (∑_{α : Fin r → Fin d} ∏_i β(m_i(α), h_i)) ‖f‖_{L_p(Q)}` + +(`Cube.eLpNorm_higherDiff_le_sum`). The isotropic difference is a sum of `d^r` translated mixed +coordinate differences (`Cube.higherDiff_eq_sum`). A translate stays in the cube on `Q_{rh}`, so its +norm is at most the norm of the mixed difference on a box (`Cube.eLpNorm_shift_mixedDiff_le`), +and the mixed difference is bounded one coordinate at a time by Tonelli's theorem +(`Cube.eLpNorm_cubeDiff_inter_le`, `Cube.eLpNorm_mixedDiff_le`): the box constraint in the other +coordinates does not depend on the coordinate of the step (`Cube.eLpNorm_inter_le_of_slice_le`), and +the slices of the intermediate functions stay in `V` (`Cube.slice_mixedDiff_mem`). + +If `β(m, t) = C (2^j |t|)^{θ_m}` for `|t| ≤ 2^(-j)` and `Θ ≤ ∑_i θ_{m_i}` whenever `∑_i m_i = r`, +this gives `‖Δ_h^r f‖ ≤ d^r C^d (2^j ‖h‖_∞)^Θ ‖f‖` for `‖h‖_∞ ≤ 2^(-j)` +(`Cube.eLpNorm_higherDiff_le_of_exponents`): every word `α` carries the total order `r`, and the +gains in the single coordinates multiply. Together with `ω_r(f, t)_p ≤ 2^r ‖f‖_p` this is the +inverse inequality `ω_r(a, 2^(-k))_p ≤ (d^r C^d + 2^r) 2^(-(k-j)Θ) ‖a‖_p` for every `a` whose +slices lie in `V` (`Cube.lpIsoModulus_le_of_exponents`). +-/ + +@[expose] public section + +open MeasureTheory Set +open Rd (higherDiff measurable_higherDiff) +open scoped ENNReal + +namespace Cube + +open Interval TranslationAlgebra + +variable {d : ℕ} + +/-! ### One coordinate at a time -/ + +/-- **One coordinate step**: let `R` not depend on the coordinate `i`, and let every slice of `F` +in coordinate `i` satisfy `‖Δ_t^m u‖_{L_p(J(m,t))} ≤ β ‖u‖_{L_p[0,1]}`. Then +`‖Δ^m_{t e_i} F‖_{L_p(R ∩ {x_i + mt ∈ [0,1]})} ≤ β ‖F‖_{L_p(R)}`, by Tonelli in coordinate `i` +(`Cube.eLpNorm_inter_le_of_slice_le`). -/ +theorem eLpNorm_cubeDiff_inter_le {F : (Fin d → ℝ) → ℂ} (hF : Measurable F) {p : ℝ≥0∞} + (hp0 : p ≠ 0) (hp : p ≠ ∞) (m : ℕ) (t : ℝ) (i : Fin d) {R : Set (Fin d → ℝ)} + (hR : MeasurableSet R) (hRi : ∀ x s, Function.update x i s ∈ R ↔ x ∈ R) {β : ℝ≥0∞} + (hβ : ∀ x, eLpNorm (higherDiff m t (slice F x i)) p (volume.restrict (stepRegion m t)) ≤ + β * eLpNorm (slice F x i) p unitVol) : + eLpNorm (cubeDiff m t i F) p + ((cubeVol d).restrict (R ∩ {x | x i + m * t ∈ Icc (0 : ℝ) 1})) ≤ + β * eLpNorm F p ((cubeVol d).restrict R) := by + set S : Set ℝ := {s | s + m * t ∈ Icc (0 : ℝ) 1} + have hS : MeasurableSet S := (measurable_add_const _) measurableSet_Icc + have hstep : unitVol.restrict S = volume.restrict (stepRegion m t) := by + rw [unitVol, Measure.restrict_restrict hS] + congr 1 + ext s + rw [mem_stepRegion] + simp only [S, mem_inter_iff, mem_ofPred_eq] + exact and_comm + have h := eLpNorm_inter_le_of_slice_le (measurable_cubeDiff hF m t i) hF hp0 hp i hR hRi hS + MeasurableSet.univ (C := β) fun x => by + rw [slice_cubeDiff, hstep, Measure.restrict_univ] + exact hβ x + simp only [mem_univ, ofPred_true, inter_univ] at h + exact h + +/-! ### Mixed differences on boxes -/ + +/-- The **box region** of a mixed difference along a list: the points `x` with +`x_i + m_i h_i ∈ [0, 1]` for the coordinates `i` of the list. -/ +def listRegion (m : Fin d → ℕ) (h : Fin d → ℝ) (l : List (Fin d)) : Set (Fin d → ℝ) := + {x | ∀ i ∈ l, x i + m i * h i ∈ Icc (0 : ℝ) 1} + +/-- The box region of the empty list is everything. -/ +theorem listRegion_nil (m : Fin d → ℕ) (h : Fin d → ℝ) : listRegion m h [] = univ := by + ext x + simp [listRegion] + +/-- The box region of `i :: l`. -/ +theorem listRegion_cons (m : Fin d → ℕ) (h : Fin d → ℝ) (i : Fin d) (l : List (Fin d)) : + listRegion m h (i :: l) = listRegion m h l ∩ {x | x i + m i * h i ∈ Icc (0 : ℝ) 1} := by + ext x + simp only [listRegion, List.mem_cons, forall_eq_or_imp, mem_inter_iff, mem_ofPred_eq] + exact and_comm + +/-- Box regions are measurable. -/ +theorem measurableSet_listRegion (m : Fin d → ℕ) (h : Fin d → ℝ) (l : List (Fin d)) : + MeasurableSet (listRegion m h l) := by + induction l with + | nil => rw [listRegion_nil]; exact MeasurableSet.univ + | cons i l ih => + rw [listRegion_cons] + exact ih.inter (((measurable_pi_apply i).add_const _) measurableSet_Icc) + +/-- The box region of a list does not depend on the coordinates outside the list. -/ +theorem update_mem_listRegion_iff (m : Fin d → ℕ) (h : Fin d → ℝ) {l : List (Fin d)} + {i : Fin d} (hi : i ∉ l) (x : Fin d → ℝ) (s : ℝ) : + Function.update x i s ∈ listRegion m h l ↔ x ∈ listRegion m h l := by + simp only [listRegion, mem_ofPred_eq] + refine forall₂_congr fun c hc => ?_ + rw [Function.update_of_ne (by rintro rfl; exact hi hc)] + +/-- **Mixed differences on boxes**: if every slice of `f` in every coordinate lies in `V`, and +the differences of order `m_i` and step `h_i` of the functions in `V` are bounded by `β_i` on the +step regions, then the mixed difference along a list of distinct coordinates satisfies +`‖M f‖_{L_p(box)} ≤ (∏_{i ∈ l} β_i) ‖f‖_{L_p(Q)}`. -/ +theorem eLpNorm_mixedDiff_le (V : Submodule ℂ (ℝ → ℂ)) {p : ℝ≥0∞} (hp0 : p ≠ 0) (hp : p ≠ ∞) + (m : Fin d → ℕ) (h : Fin d → ℝ) (β : Fin d → ℝ≥0∞) + (hβ : ∀ u ∈ V, ∀ i, eLpNorm (higherDiff (m i) (h i) u) p + (volume.restrict (stepRegion (m i) (h i))) ≤ β i * eLpNorm u p unitVol) + {f : (Fin d → ℝ) → ℂ} (hf : Measurable f) (hfV : ∀ i x, slice f x i ∈ V) : + ∀ l : List (Fin d), l.Nodup → + eLpNorm (mixedDiff m h l f) p ((cubeVol d).restrict (listRegion m h l)) ≤ + (l.map β).prod * eLpNorm f p (cubeVol d) + | [], _ => by + rw [mixedDiff_nil, listRegion_nil, Measure.restrict_univ, List.map_nil, List.prod_nil, + one_mul] + | i :: l, hl => by + obtain ⟨hil, hl'⟩ := List.nodup_cons.1 hl + rw [mixedDiff_cons, listRegion_cons, List.map_cons, List.prod_cons, mul_assoc] + refine (eLpNorm_cubeDiff_inter_le (measurable_mixedDiff m h l hf) hp0 hp (m i) (h i) i + (measurableSet_listRegion m h l) (update_mem_listRegion_iff m h hil) + fun x => hβ _ (slice_mixedDiff_mem V m h hil (hfV i) x) i).trans ?_ + exact mul_le_mul' le_rfl (eLpNorm_mixedDiff_le V hp0 hp m h β hβ hf hfV l hl') + +/-- **The translated terms**: on the isotropic region the translate of the mixed difference of +a word `α` by its shift `s_α` stays in the cube, and lands in the box of the mixed difference, so +`‖M f(· + s_α)‖_{L_p(Q_{rh})} ≤ ‖M f‖_{L_p(box)}`. -/ +theorem eLpNorm_shift_mixedDiff_le {r : ℕ} (h : Fin d → ℝ) (α : Fin r → Fin d) + {f : (Fin d → ℝ) → ℂ} (hf : Measurable f) (p : ℝ≥0∞) : + eLpNorm (fun x => mixedDiff (count α) h (List.finRange d) f (x + shiftVec h α)) p + ((cubeVol d).restrict (isoRegion r h)) ≤ + eLpNorm (mixedDiff (count α) h (List.finRange d) f) p + ((cubeVol d).restrict (listRegion (count α) h (List.finRange d))) := by + refine eLpNorm_comp_add_le (measurable_mixedDiff _ h _ hf) p (measurableSet_isoRegion r h) + (measurableSet_listRegion _ h _) _ fun x hx => ?_ + have hle := card_lt_add_count_le α + have hcoord : ∀ c, x c + ((Finset.univ.filter fun l => c < α l).card : ℝ) * h c ∈ + Icc (0 : ℝ) 1 := fun c => + add_mul_mem_Icc (hx.2 c (mem_univ c)) (hx.1 c) (Nat.cast_nonneg _) + (by exact_mod_cast (Nat.le_add_right _ _).trans (hle c)) + refine ⟨fun c _ => ?_, fun c _ => ?_⟩ + · simp only [Pi.add_apply, shiftVec_apply] + rw [add_assoc, ← add_mul] + exact add_mul_mem_Icc (hx.2 c (mem_univ c)) (hx.1 c) (by positivity) + (by exact_mod_cast hle c) + · simp only [Pi.add_apply, shiftVec_apply] + exact hcoord c + +/-! ### The isotropic difference -/ + +/-- The multiplicities of a word are at most its length. -/ +theorem count_le {r : ℕ} (α : Fin r → Fin d) (i : Fin d) : count α i ≤ r := by + rw [count] + exact (Finset.card_le_univ _).trans (by rw [Fintype.card_fin]) + +/-- **Isotropic differences of functions with slices in a class**: if the differences of order +`m ≤ r` of the functions in `V` with the steps `h_i` are bounded by `β(m, h_i)` on the step regions, +and every slice of `f` lies in `V`, then +`‖Δ_h^r f‖_{L_p(Q_{rh})} ≤ (∑_α ∏_i β(m_i(α), h_i)) ‖f‖_{L_p(Q)}`, summed over the words +`α : Fin r → Fin d`. -/ +theorem eLpNorm_higherDiff_le_sum (V : Submodule ℂ (ℝ → ℂ)) {p : ℝ≥0∞} (hp1 : 1 ≤ p) + (hp : p ≠ ∞) (r : ℕ) (h : Fin d → ℝ) (β : ℕ → ℝ → ℝ≥0∞) + (hβ : ∀ u ∈ V, ∀ m ≤ r, ∀ i : Fin d, eLpNorm (higherDiff m (h i) u) p + (volume.restrict (stepRegion m (h i))) ≤ β m (h i) * eLpNorm u p unitVol) + {f : (Fin d → ℝ) → ℂ} (hf : Measurable f) (hfV : ∀ i x, slice f x i ∈ V) : + eLpNorm (higherDiff r h f) p ((cubeVol d).restrict (isoRegion r h)) ≤ + (∑ α : Fin r → Fin d, ∏ i, β (count α i) (h i)) * eLpNorm f p (cubeVol d) := by + have hp0 : p ≠ 0 := (lt_of_lt_of_le zero_lt_one hp1).ne' + have hsum : higherDiff r h f = ∑ α : Fin r → Fin d, + fun x => mixedDiff (count α) h (List.finRange d) f (x + shiftVec h α) := by + funext x + rw [higherDiff_eq_sum, Finset.sum_apply] + rw [hsum, Finset.sum_mul] + refine (eLpNorm_sum_le hp1).trans (Finset.sum_le_sum fun α _ => ?_) + refine (eLpNorm_shift_mixedDiff_le h α hf p).trans ?_ + have hmix := eLpNorm_mixedDiff_le V hp0 hp (count α) h (fun i => β (count α i) (h i)) + (fun u hu i => hβ u hu _ (count_le α i) i) hf hfV + (List.finRange d) (List.nodup_finRange d) + rwa [← Fin.prod_univ_def] at hmix + +/-- `∏_i A^{θ_i} = A^{∑_i θ_i}` for exponents `θ_i ≥ 0`. -/ +theorem prod_rpow_eq_rpow_sum {ι : Type*} (s : Finset ι) (A : ℝ≥0∞) {θ : ι → ℝ} + (hθ : ∀ i ∈ s, 0 ≤ θ i) : ∏ i ∈ s, A ^ θ i = A ^ ∑ i ∈ s, θ i := by + classical + induction s using Finset.induction_on with + | empty => simp + | insert a s ha ih => + rw [Finset.prod_insert ha, Finset.sum_insert ha, ih fun i hi => hθ i + (Finset.mem_insert_of_mem hi), ENNReal.rpow_add_of_nonneg _ _ (hθ a + (Finset.mem_insert_self a s)) (Finset.sum_nonneg fun i hi => hθ i + (Finset.mem_insert_of_mem hi))] + +/-- **Isotropic differences with gains in the coordinates**: let the differences of order +`m ≤ r` of the functions in `V` satisfy `‖Δ_t^m u‖_{L_p(J(m,t))} ≤ C (2^j |t|)^{θ_m} ‖u‖_p` for +`|t| ≤ 2^(-j)`, with `θ_m ≥ 0`, and let `Θ ≤ ∑_i θ_{m_i}` whenever `∑_i m_i = r`. Then for every +`f` with slices in `V` and `‖h‖_∞ ≤ 2^(-j)`, +`‖Δ_h^r f‖_{L_p(Q_{rh})} ≤ d^r C^d (2^j ‖h‖_∞)^Θ ‖f‖_{L_p(Q)}`. -/ +theorem eLpNorm_higherDiff_le_of_exponents (V : Submodule ℂ (ℝ → ℂ)) {p : ℝ≥0∞} (hp1 : 1 ≤ p) + (hp : p ≠ ∞) (r j : ℕ) {C : ℝ≥0∞} (θ : ℕ → ℝ) (hθ : ∀ m, 0 ≤ θ m) {Θ : ℝ} + (hΘ : ∀ m : Fin d → ℕ, ∑ i, m i = r → Θ ≤ ∑ i, θ (m i)) + (hV : ∀ u ∈ V, ∀ m ≤ r, ∀ t : ℝ, |t| ≤ 1 / 2 ^ j → + eLpNorm (higherDiff m t u) p (volume.restrict (stepRegion m t)) ≤ + C * ENNReal.ofReal (2 ^ j * |t|) ^ θ m * eLpNorm u p unitVol) + {f : (Fin d → ℝ) → ℂ} (hf : Measurable f) (hfV : ∀ i x, slice f x i ∈ V) + {h : Fin d → ℝ} (hh : ‖h‖ ≤ 1 / 2 ^ j) : + eLpNorm (higherDiff r h f) p ((cubeVol d).restrict (isoRegion r h)) ≤ + (d : ℝ≥0∞) ^ r * C ^ d * ENNReal.ofReal (2 ^ j * ‖h‖) ^ Θ * eLpNorm f p (cubeVol d) := by + have hpos : (0 : ℝ) < 2 ^ j := by positivity + have hhi : ∀ i, |h i| ≤ ‖h‖ := fun i => by + rw [← Real.norm_eq_abs] + exact norm_le_pi_norm h i + set A := ENNReal.ofReal (2 ^ j * ‖h‖) + have hA1 : A ≤ 1 := by + rw [← ENNReal.ofReal_one] + refine ENNReal.ofReal_le_ofReal ?_ + rw [le_div_iff₀ hpos] at hh + linarith + set β : ℕ → ℝ → ℝ≥0∞ := fun m t => C * ENNReal.ofReal (2 ^ j * |t|) ^ θ m + refine (eLpNorm_higherDiff_le_sum V hp1 hp r h β + (fun u hu m hm i => hV u hu m hm (h i) ((hhi i).trans hh)) hf hfV).trans ?_ + -- each word contributes at most `C^d A^Θ` + have hword : ∀ α : Fin r → Fin d, ∏ i, β (count α i) (h i) ≤ C ^ d * A ^ Θ := fun α => by + simp only [β] + rw [Finset.prod_mul_distrib, Finset.prod_const, Finset.card_univ, Fintype.card_fin] + refine mul_le_mul' le_rfl ?_ + calc ∏ i, ENNReal.ofReal (2 ^ j * |h i|) ^ θ (count α i) + ≤ ∏ i, A ^ θ (count α i) := Finset.prod_le_prod fun i _ => + ENNReal.rpow_le_rpow (ENNReal.ofReal_le_ofReal (by + have := hhi i; nlinarith)) (hθ _) + _ = A ^ ∑ i, θ (count α i) := prod_rpow_eq_rpow_sum _ A fun i _ => hθ _ + _ ≤ A ^ Θ := ENNReal.rpow_le_rpow_of_exponent_ge hA1 (hΘ _ (sum_count α)) + calc (∑ α : Fin r → Fin d, ∏ i, β (count α i) (h i)) * eLpNorm f p (cubeVol d) + ≤ (∑ _α : Fin r → Fin d, C ^ d * A ^ Θ) * eLpNorm f p (cubeVol d) := + mul_le_mul' (Finset.sum_le_sum fun α _ => hword α) le_rfl + _ = (d : ℝ≥0∞) ^ r * C ^ d * A ^ Θ * eLpNorm f p (cubeVol d) := by + rw [Finset.sum_const, Finset.card_univ, Fintype.card_fun, Fintype.card_fin, + Fintype.card_fin, nsmul_eq_mul] + push_cast + ring + +/-- **The isotropic inverse inequality from estimates in one variable**: let `V` be a subspace of +functions of one variable with `‖Δ_t^m u‖_{L_p(J(m,t))} ≤ C (2^j |t|)^{θ_m} ‖u‖_{L_p[0,1]}` for +`u ∈ V`, `m ≤ r` and `|t| ≤ 2^(-j)`, where `θ_m ≥ 0` and `0 ≤ Θ ≤ ∑_i θ_{m_i}` whenever +`∑_i m_i = r`. If `a ∈ L_p(Q)`, `1 ≤ p < ∞`, is represented by a measurable `g` whose slices all +lie in `V`, then for every `k` +`ω_r(a, 2^(-k))_p ≤ (d^r C^d + 2^r) 2^(-(k-j)Θ) ‖a‖_p`, with `k - j` truncated +at `0` (`Cube.eLpNorm_higherDiff_le_of_exponents` for `k ≥ j`, `Cube.isoModulus_le` for +`k < j`). -/ +theorem lpIsoModulus_le_of_exponents {p : ℝ≥0∞} [Fact (1 ≤ p)] (V : Submodule ℂ (ℝ → ℂ)) + (hp : p ≠ ∞) (r : ℕ) {C : ℝ≥0∞} (θ : ℕ → ℝ) (hθ : ∀ m, 0 ≤ θ m) {Θ : ℝ} + (hΘ0 : 0 ≤ Θ) (hΘ : ∀ m : Fin d → ℕ, ∑ i, m i = r → Θ ≤ ∑ i, θ (m i)) {j : ℕ} + (hV : ∀ u ∈ V, ∀ m ≤ r, ∀ t : ℝ, |t| ≤ 1 / 2 ^ j → + eLpNorm (higherDiff m t u) p (volume.restrict (stepRegion m t)) ≤ + C * ENNReal.ofReal (2 ^ j * |t|) ^ θ m * eLpNorm u p unitVol) + {k : ℕ} {a : Lp ℂ p (cubeVol d)} {g : (Fin d → ℝ) → ℂ} (hg : Measurable g) + (hgV : ∀ i x, slice g x i ∈ V) (hae : a =ᵐ[cubeVol d] g) : + lpIsoModulus p r a k ≤ + ((d : ℝ≥0∞) ^ r * C ^ d + 2 ^ r) * ENNReal.dyadicWeight (-Θ) (k - j) * ‖a‖ₑ := by + rw [lpIsoModulus, isoModulus_congr_ae hae, Lp.eNorm_def, eLpNorm_congr_ae hae] + rcases lt_or_ge k j with hkj | hjk + · rw [Nat.sub_eq_zero_of_le hkj.le, ENNReal.dyadicWeight_zero_right, mul_one] + exact (isoModulus_le hg Fact.out r _).trans (by gcongr; exact le_add_self) + rw [isoModulus_eq_iSup] + refine iSup₂_le fun h hh => ?_ + have hhj : ‖h‖ ≤ 1 / 2 ^ j := hh.trans (one_div_le_one_div_of_le (by positivity) + (pow_le_pow_right₀ (by norm_num) hjk)) + exact (eLpNorm_higherDiff_le_of_exponents V Fact.out hp r j θ hθ hΘ hV hg hgV + hhj).trans (mul_le_mul' (mul_le_mul' le_self_add + (ENNReal.ofReal_two_pow_mul_rpow_le hjk hh hΘ0)) le_rfl) + +end Cube diff --git a/LeanPool/FunctionSpaces/Domains/Cube/IsoModulus.lean b/LeanPool/FunctionSpaces/Domains/Cube/IsoModulus.lean new file mode 100644 index 0000000000..34f250812e --- /dev/null +++ b/LeanPool/FunctionSpaces/Domains/Cube/IsoModulus.lean @@ -0,0 +1,295 @@ +/- +Copyright (c) 2026 Mario Ullrich. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Mario Ullrich +-/ +module + +public import LeanPool.FunctionSpaces.Domains.Cube.IsoDifferences +public import LeanPool.FunctionSpaces.Analysis.Differences.DomainModuli + +/- +Modified for Lean Pool: module names and imports adapted. +-/ + +/-! +# The isotropic modulus of smoothness on the cube + +The **isotropic modulus** on the cube `Q = [0, 1]^d` is the modulus on the set `Q` of +`Rd.modulusOn` (`Cube.isoModulus`), + +`ω_r(f, t)_p = sup_{‖h‖_∞ ≤ t} ‖Δ_h^r f‖_{L_p({x ∈ Q : x + rh ∈ Q})}` (`Cube.isoModulus_eq_iSup`), + +with steps `h ∈ ℝ^d` of every direction and sign and the region `{x ∈ Q : x + rh ∈ Q}` +(`Cube.isoRegion`), which is the set of the points `x` with `x, x + h, …, x + rh ∈ Q` +(`Cube.isoRegion_inter_cubeSet`). It increases in `t`, is subadditive, is bounded by +`2^r ‖f‖_p`, and depends only on the class of `f` in `L_p(Q)`, as every modulus on a set. +Translations that stay in the cube keep `L_p` norms and null sets (`Cube.eLpNorm_comp_add_le`, +`Cube.ae_comp_add_of_ae`). + +Steps along a coordinate are isotropic steps, so the moduli in the coordinates are bounded by +the isotropic modulus (`Cube.coordModulus_le_isoModulus`) and `ω_cube ≤ d ω_iso` +(`Cube.cubeModulus_le_isoModulus`). Jackson's inequalities with the coordinate moduli therefore +hold with the isotropic modulus as well. The converse comparison, for the approximants, is the +inverse inequality of `FunctionSpaces.Domains.Cube.IsoInverse`. +-/ + +@[expose] public section + +open MeasureTheory Set +open Rd (higherDiff) +open scoped ENNReal + +namespace Cube + +open Interval + +variable {d : ℕ} + +/-! ### The cube as a set, and translations inside it -/ + +/-- The **cube** `Q = [0, 1]^d` as a subset of `ℝ^d`. -/ +def cubeSet (d : ℕ) : Set (Fin d → ℝ) := Set.univ.pi fun _ => Icc (0 : ℝ) 1 + +/-- The cube is measurable. -/ +theorem measurableSet_cubeSet (d : ℕ) : MeasurableSet (cubeSet d) := + MeasurableSet.univ_pi fun _ => measurableSet_Icc + +/-- The cube measure is Lebesgue measure restricted to the cube (Mathlib's +`Measure.restrict_pi_pi`). -/ +theorem cubeVol_eq_restrict (d : ℕ) : cubeVol d = volume.restrict (cubeSet d) := by + rw [cubeSet, volume_pi, Measure.restrict_pi_pi] + +/-- The cube measure restricted to two sets that agree on the cube. -/ +theorem cubeVol_restrict_congr {A B : Set (Fin d → ℝ)} (hA : MeasurableSet A) + (hB : MeasurableSet B) (hAB : A ∩ cubeSet d = B ∩ cubeSet d) : + (cubeVol d).restrict A = (cubeVol d).restrict B := by + rw [cubeVol_eq_restrict, Measure.restrict_restrict hA, Measure.restrict_restrict hB, hAB] + +/-- **Translation inside the cube**: if `x + v ∈ R' ∩ Q` for all `x ∈ R ∩ Q`, then +`‖G(· + v)‖_{L_p(R ∩ Q)} ≤ ‖G‖_{L_p(R' ∩ Q)}`, by the translation invariance of Lebesgue measure +(Mathlib's `measurePreserving_add_right`). -/ +theorem eLpNorm_comp_add_le {G : (Fin d → ℝ) → ℂ} (hG : Measurable G) (p : ℝ≥0∞) + {R R' : Set (Fin d → ℝ)} (hR : MeasurableSet R) (hR' : MeasurableSet R') (v : Fin d → ℝ) + (hsub : ∀ x ∈ R ∩ cubeSet d, x + v ∈ R' ∩ cubeSet d) : + eLpNorm (fun x => G (x + v)) p ((cubeVol d).restrict R) ≤ + eLpNorm G p ((cubeVol d).restrict R') := by + have hC' : MeasurableSet (R' ∩ cubeSet d) := hR'.inter (measurableSet_cubeSet d) + have hmp : MeasurePreserving (· + v) (volume.restrict ((· + v) ⁻¹' (R' ∩ cubeSet d))) + (volume.restrict (R' ∩ cubeSet d)) := + (measurePreserving_add_right volume v).restrict_preimage hC' + rw [cubeVol_eq_restrict, Measure.restrict_restrict hR, Measure.restrict_restrict hR'] + calc eLpNorm (fun x => G (x + v)) p (volume.restrict (R ∩ cubeSet d)) + ≤ eLpNorm (fun x => G (x + v)) p (volume.restrict ((· + v) ⁻¹' (R' ∩ cubeSet d))) := + eLpNorm_mono_measure _ (Measure.restrict_mono (fun x hx => hsub x hx) le_rfl) + _ = eLpNorm G p (volume.restrict (R' ∩ cubeSet d)) := + eLpNorm_comp_measurePreserving hG.aestronglyMeasurable hmp + +/-- **Translation inside the cube preserves almost everywhere equality**: if `f = g` almost +everywhere on the cube and `x + v ∈ Q` for `x ∈ R ∩ Q`, then `f(x + v) = g(x + v)` for almost +every `x ∈ R ∩ Q`. -/ +theorem ae_comp_add_of_ae {f g : (Fin d → ℝ) → ℂ} (hfg : f =ᵐ[cubeVol d] g) + {R : Set (Fin d → ℝ)} (hR : MeasurableSet R) (v : Fin d → ℝ) + (hsub : ∀ x ∈ R ∩ cubeSet d, x + v ∈ cubeSet d) : + ∀ᵐ x ∂(cubeVol d).restrict R, f (x + v) = g (x + v) := by + rw [cubeVol_eq_restrict] at hfg ⊢ + rw [Measure.restrict_restrict hR] + have hmp : MeasurePreserving (· + v) (volume.restrict ((· + v) ⁻¹' cubeSet d)) + (volume.restrict (cubeSet d)) := + (measurePreserving_add_right volume v).restrict_preimage (measurableSet_cubeSet d) + have h1 : (fun x => f (x + v)) =ᵐ[volume.restrict ((· + v) ⁻¹' cubeSet d)] + fun x => g (x + v) := + hmp.quasiMeasurePreserving.ae_eq_comp hfg + exact ae_restrict_of_ae_restrict_of_subset (fun x hx => hsub x hx) h1 + +/-- **Convexity of intervals**: if `a, a + R b ∈ [0, 1]` and `0 ≤ n ≤ R`, then +`a + n b ∈ [0, 1]`. -/ +theorem add_mul_mem_Icc {a b R n : ℝ} (ha : a ∈ Icc (0 : ℝ) 1) (hR : a + R * b ∈ Icc (0 : ℝ) 1) + (hn : 0 ≤ n) (hnR : n ≤ R) : a + n * b ∈ Icc (0 : ℝ) 1 := by + rcases le_total 0 b with hb | hb + · have h1 := mul_le_mul_of_nonneg_right hnR hb + have h2 := mul_nonneg hn hb + constructor <;> linarith [ha.1, ha.2, hR.1, hR.2] + · have h1 := mul_le_mul_of_nonpos_right hnR hb + have h2 := mul_nonpos_of_nonneg_of_nonpos hn hb + constructor <;> linarith [ha.1, ha.2, hR.1, hR.2] + +/-! ### The isotropic modulus -/ + +/-- The **region of the isotropic difference** of order `r` and step `h`: the points `x` with +`x + rh ∈ [0, 1]^d`. Together with `x ∈ Q` (the cube measure lives on `Q`) all points `x + kh`, +`k ≤ r`, lie in `Q`. -/ +def isoRegion (r : ℕ) (h : Fin d → ℝ) : Set (Fin d → ℝ) := + {x | ∀ i, x i + r * h i ∈ Icc (0 : ℝ) 1} + +/-- The isotropic region is measurable. -/ +theorem measurableSet_isoRegion (r : ℕ) (h : Fin d → ℝ) : MeasurableSet (isoRegion r h) := by + have : isoRegion r h = ⋂ i, (fun x : Fin d → ℝ => x i + r * h i) ⁻¹' Icc 0 1 := by + ext x + simp [isoRegion] + rw [this] + exact MeasurableSet.iInter fun i => ((measurable_pi_apply i).add_const _) measurableSet_Icc + +/-- For `x` in the isotropic region of the cube and `0 ≤ n ≤ r`, `x + nh` lies in the cube. -/ +theorem add_smul_mem_cubeSet {r : ℕ} {h x : Fin d → ℝ} (hx : x ∈ isoRegion r h ∩ cubeSet d) + {n : ℝ} (hn : 0 ≤ n) (hnr : n ≤ r) : x + n • h ∈ cubeSet d := by + intro i _ + simp only [Pi.add_apply, Pi.smul_apply, smul_eq_mul] + exact add_mul_mem_Icc (hx.2 i (mem_univ i)) (hx.1 i) hn hnr + +/-- **The isotropic region on the cube is a step set**: `{x ∈ Q : x + rh ∈ Q}` is the set `Q_{rh}` +of the points `x` with `x, x + h, …, x + rh ∈ Q` (`Rd.stepSet`). -/ +theorem isoRegion_inter_cubeSet (r : ℕ) (h : Fin d → ℝ) : + isoRegion r h ∩ cubeSet d = Rd.stepSet (cubeSet d) r h := by + ext x + constructor + · intro hx l hl + exact add_smul_mem_cubeSet hx (Nat.cast_nonneg l) (by exact_mod_cast hl) + · intro hx + refine ⟨fun i => ?_, by simpa using hx 0 (Nat.zero_le r)⟩ + simpa using hx r le_rfl i (mem_univ i) + +/-- The isotropic difference on the cube is the restricted difference on the set `Q`: +`‖Δ_h^r f‖_{L_p(Q_{rh})} = ‖Δ_h^r(f, ·, Q)‖_p`. -/ +theorem eLpNorm_higherDiff_isoRegion_eq (r : ℕ) (p : ℝ≥0∞) (f : (Fin d → ℝ) → ℂ) + (h : Fin d → ℝ) : + eLpNorm (higherDiff r h f) p ((cubeVol d).restrict (isoRegion r h)) = + eLpNorm ((Rd.stepSet (cubeSet d) r h).indicator ((fwdDiff h)^[r] f)) p volume := by + rw [cubeVol_eq_restrict, Measure.restrict_restrict (measurableSet_isoRegion r h), + isoRegion_inter_cubeSet, eLpNorm_indicator_eq_eLpNorm_restrict + (Rd.measurableSet_stepSet (measurableSet_cubeSet d) r h).nullMeasurableSet] + rfl + +/-- The **isotropic modulus of smoothness** on the cube, the modulus on the set `Q` of +`Rd.modulusOn`: `ω_r(f, t)_p = sup_{‖h‖_∞ ≤ t} ‖Δ_h^r(f, ·, Q)‖_p`. -/ +noncomputable def isoModulus (r : ℕ) (p : ℝ≥0∞) (f : (Fin d → ℝ) → ℂ) (t : ℝ) : ℝ≥0∞ := + Rd.modulusOn volume (cubeSet d) r p f t + +/-- **The isotropic modulus through the isotropic regions**: +`ω_r(f, t)_p = sup_{‖h‖_∞ ≤ t} ‖Δ_h^r f‖_{L_p({x ∈ Q : x + rh ∈ Q})}`. -/ +theorem isoModulus_eq_iSup (r : ℕ) (p : ℝ≥0∞) (f : (Fin d → ℝ) → ℂ) (t : ℝ) : + isoModulus r p f t = ⨆ (h : Fin d → ℝ) (_ : ‖h‖ ≤ t), + eLpNorm (higherDiff r h f) p ((cubeVol d).restrict (isoRegion r h)) := by + simp only [eLpNorm_higherDiff_isoRegion_eq] + rfl + +/-- `‖Δ_h^r f‖_{L_p(Q_{rh})} ≤ ω_r(f, t)_p` for `‖h‖_∞ ≤ t`. -/ +theorem eLpNorm_higherDiff_le_isoModulus {r : ℕ} {p : ℝ≥0∞} {f : (Fin d → ℝ) → ℂ} {t : ℝ} + {h : Fin d → ℝ} (hh : ‖h‖ ≤ t) : + eLpNorm (higherDiff r h f) p ((cubeVol d).restrict (isoRegion r h)) ≤ + isoModulus r p f t := by + rw [eLpNorm_higherDiff_isoRegion_eq] + exact Rd.eLpNorm_indicator_higherDiff_le_modulusOn hh + +/-- The isotropic modulus increases in `t`. -/ +theorem isoModulus_mono (r : ℕ) (p : ℝ≥0∞) (f : (Fin d → ℝ) → ℂ) : + Monotone (isoModulus r p f) := + Rd.modulusOn_mono _ r p f + +/-- The isotropic modulus is subadditive. -/ +theorem isoModulus_add_le {p : ℝ≥0∞} (hp : 1 ≤ p) (r : ℕ) (f g : (Fin d → ℝ) → ℂ) (t : ℝ) : + isoModulus r p (f + g) t ≤ isoModulus r p f t + isoModulus r p g t := + Rd.modulusOn_add_le hp _ r f g t + +/-- `ω_r(f, t)_p ≤ 2^r ‖f‖_{L_p(Q)}` for the isotropic modulus (`Rd.modulusOn_le`). -/ +theorem isoModulus_le {f : (Fin d → ℝ) → ℂ} (hf : Measurable f) {p : ℝ≥0∞} (hp : 1 ≤ p) + (r : ℕ) (t : ℝ) : isoModulus r p f t ≤ 2 ^ r * eLpNorm f p (cubeVol d) := by + have h := Rd.modulusOn_le (μ := volume) hf.aestronglyMeasurable (measurableSet_cubeSet d) hp + r t + rwa [eLpNorm_indicator_eq_eLpNorm_restrict (measurableSet_cubeSet d).nullMeasurableSet, + ← cubeVol_eq_restrict] + at h + +/-- **`‖Δ_h^r f‖_{L_p(Q_{rh})} ≤ 2^r ‖f‖_{L_p(Q)}`**, the bound of `Cube.isoModulus_le` at +`t = ‖h‖_∞`. -/ +theorem eLpNorm_higherDiff_le {f : (Fin d → ℝ) → ℂ} (hf : Measurable f) {p : ℝ≥0∞} (hp : 1 ≤ p) + (r : ℕ) (h : Fin d → ℝ) : + eLpNorm (higherDiff r h f) p ((cubeVol d).restrict (isoRegion r h)) ≤ + 2 ^ r * eLpNorm f p (cubeVol d) := + (eLpNorm_higherDiff_le_isoModulus le_rfl).trans (isoModulus_le hf hp r ‖h‖) + +/-- **The isotropic modulus depends only on the class in `L_p(Q)`** (`Rd.modulusOn_congr_ae`, +with Mathlib's `ae_eq_restrict_iff_indicator_ae_eq`). -/ +theorem isoModulus_congr_ae {f g : (Fin d → ℝ) → ℂ} (hfg : f =ᵐ[cubeVol d] g) (r : ℕ) + (p : ℝ≥0∞) (t : ℝ) : isoModulus r p f t = isoModulus r p g t := by + rw [cubeVol_eq_restrict, ae_eq_restrict_iff_indicator_ae_eq (measurableSet_cubeSet d)] at hfg + exact Rd.modulusOn_congr_ae hfg r p t + +/-! ### Coordinate moduli and the isotropic modulus -/ + +/-- The region of a coordinate difference is the isotropic region of the step `s e_i`, on the +cube. -/ +theorem diffRegion_eq_isoRegion (r : ℕ) {s : ℝ} (hs : 0 ≤ s) (i : Fin d) : + diffRegion d r s i = (cubeVol d).restrict (isoRegion r (Pi.single i s)) := by + refine cubeVol_restrict_congr (measurable_pi_apply i measurableSet_Icc) + (measurableSet_isoRegion r _) ?_ + ext x + simp only [mem_inter_iff, mem_ofPred_eq, isoRegion, cubeSet, mem_pi, mem_univ, true_implies] + constructor + · rintro ⟨hxi, hx⟩ + refine ⟨fun c => ?_, hx⟩ + by_cases hc : c = i + · subst hc + simp only [Pi.single_eq_same] + constructor <;> nlinarith [hxi.1, hxi.2, mul_nonneg (Nat.cast_nonneg r) hs] + · simpa [hc] using hx c + · rintro ⟨hiso, hx⟩ + refine ⟨?_, hx⟩ + have h := hiso i + simp only [Pi.single_eq_same] at h + exact ⟨(hx i).1, by linarith [h.2]⟩ + +/-- **Coordinate moduli are bounded by the isotropic modulus**: steps `s e_i`, `0 ≤ s ≤ t`, are +isotropic steps with `‖s e_i‖_∞ = s`. -/ +theorem coordModulus_le_isoModulus (r : ℕ) (p : ℝ≥0∞) (i : Fin d) (f : (Fin d → ℝ) → ℂ) + (t : ℝ) : coordModulus r p i f t ≤ isoModulus r p f t := by + classical + refine iSup₂_le fun s hs => ?_ + have hnorm : ‖(Pi.single i s : Fin d → ℝ)‖ ≤ t := by + rw [Pi.norm_single, Real.norm_eq_abs, abs_of_nonneg hs.1] + exact hs.2 + rw [← higherDiff_single, diffRegion_eq_isoRegion r hs.1 i] + exact eLpNorm_higherDiff_le_isoModulus hnorm + +/-- **The modulus on the cube is bounded by the isotropic modulus**: `ω_cube ≤ d ω_iso`. -/ +theorem cubeModulus_le_isoModulus (r : ℕ) (p : ℝ≥0∞) (f : (Fin d → ℝ) → ℂ) (t : ℝ) : + cubeModulus r p f t ≤ d * isoModulus r p f t := by + calc cubeModulus r p f t ≤ ∑ _i : Fin d, isoModulus r p f t := + Finset.sum_le_sum fun i _ => coordModulus_le_isoModulus r p i f t + _ = d * isoModulus r p f t := by + rw [Finset.sum_const, Finset.card_univ, Fintype.card_fin, nsmul_eq_mul] + +/-! ### The isotropic modulus on `L_p(Q)` at dyadic scales -/ + +variable {p : ℝ≥0∞} [Fact (1 ≤ p)] + +variable (p) in +/-- The isotropic modulus of an element of `L_p(Q)` at the dyadic scale `2^(-k)`. -/ +noncomputable def lpIsoModulus (r : ℕ) (f : Lp ℂ p (cubeVol d)) (k : ℕ) : ℝ≥0∞ := + isoModulus r p (f : (Fin d → ℝ) → ℂ) (1 / 2 ^ k) + +/-- The isotropic modulus on `L_p(Q)` is subadditive. -/ +theorem lpIsoModulus_add_le (r : ℕ) (f g : Lp ℂ p (cubeVol d)) (k : ℕ) : + lpIsoModulus p r (f + g) k ≤ lpIsoModulus p r f k + lpIsoModulus p r g k := by + rw [lpIsoModulus, isoModulus_congr_ae (Lp.coeFn_add f g)] + exact isoModulus_add_le Fact.out r _ _ _ + +/-- `ω_r(f, t)_p ≤ 2^r ‖f‖_p` in `L_p(Q)`, for the isotropic modulus. -/ +theorem lpIsoModulus_le (r : ℕ) (f : Lp ℂ p (cubeVol d)) (k : ℕ) : + lpIsoModulus p r f k ≤ 2 ^ r * ‖f‖ₑ := by + rw [Lp.eNorm_def] + exact isoModulus_le (Lp.stronglyMeasurable f).measurable Fact.out r _ + +omit [Fact (1 ≤ p)] in +/-- The isotropic modulus at the dyadic scales decreases with the level. -/ +theorem lpIsoModulus_anti (r : ℕ) (f : Lp ℂ p (cubeVol d)) : Antitone (lpIsoModulus p r f) := + fun _ _ hjk => isoModulus_mono r p _ (one_div_le_one_div_of_le (by positivity) + (pow_le_pow_right₀ (by norm_num) hjk)) + +omit [Fact (1 ≤ p)] in +/-- `ω_cube(f, 2^(-k)) ≤ d ω_iso(f, 2^(-k))` in `L_p(Q)`. -/ +theorem lpCubeModulus_le_lpIsoModulus (r : ℕ) (f : Lp ℂ p (cubeVol d)) (k : ℕ) : + lpCubeModulus p r f k ≤ d * lpIsoModulus p r f k := + cubeModulus_le_isoModulus r p _ _ + +end Cube diff --git a/LeanPool/FunctionSpaces/Domains/Cube/Modulus.lean b/LeanPool/FunctionSpaces/Domains/Cube/Modulus.lean new file mode 100644 index 0000000000..edce8484b2 --- /dev/null +++ b/LeanPool/FunctionSpaces/Domains/Cube/Modulus.lean @@ -0,0 +1,281 @@ +/- +Copyright (c) 2026 Mario Ullrich. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Mario Ullrich +-/ +module + +public import LeanPool.FunctionSpaces.Domains.Cube.Basic + +/- +Modified for Lean Pool: module names and imports adapted. +-/ + +/-! +# Moduli of smoothness on the cube + +The difference of order `r` and step `h` in coordinate `i`, +`Δ^r_{h e_i} f(x) = ∑_k (-1)^(r-k) C(r,k) f(x + k h e_i)` (`Cube.cubeDiff`), is the difference +`Δ_h^r` of the slice of `f` through `x` in coordinate `i`, evaluated at `x_i`. The **modulus of +smoothness in coordinate `i`** on the cube `Q = [0, 1]^d` is + +`ω_r^{(i)}(f, t)_p = sup_{0 ≤ h ≤ t} ‖Δ^r_{h e_i} f‖_{L_p({x ∈ Q : x_i ≤ 1 - rh})}` + +(`Cube.coordModulus`), and the **modulus on the cube** is their sum +`ω_r(f, t)_p = ∑_i ω_r^{(i)}(f, t)_p` (`Cube.cubeModulus`). + +**Design.** These are the coordinatewise moduli of Nikol'skii's definition of Besov spaces. The +isotropic modulus `sup_{|h| ≤ t} ‖Δ_h^r f‖_p` is in `FunctionSpaces.Domains.Cube.IsoModulus`, and +for `0 < s < r - 1 + 1/p` both give the same Besov spaces on the cube +(`Cube.lqNorm_cubeModulus_lt_top_iff_iso`). +The supremum over `h` stays outside the integral over the other coordinates. Through the slices +(`Cube.eLpNorm_rpow_cubeDiff_eq_slice`), every bound of `Δ_h^r` in one variable for a fixed step +`h` carries over to the cube (`Cube.eLpNorm_cubeDiff_le_of_slice_le`), and equal norms of the +differences of the slices give equal moduli (`Cube.coordModulus_eq_of_slice`). + +As in one variable, the modulus increases in `t`, is subadditive, is bounded by `2^r ‖f‖_p` in +every coordinate, and depends only on the class of `f` in `L_p(Q)`, `1 ≤ p < ∞`. Bounds of the +differences in every coordinate give inverse inequalities for the modulus at the dyadic scales +(`Cube.lpCubeModulus_le_of_coord`). +-/ + +@[expose] public section + +open MeasureTheory Set +open Rd (higherDiff) +open scoped ENNReal + +namespace Cube + +open Interval + +variable {d : ℕ} + +/-- The **difference of order `r` and step `h` in coordinate `i`**, +`Δ^r_{h e_i} f(x) = Δ_h^r (slice f x i)(x_i)`. -/ +noncomputable def cubeDiff (r : ℕ) (h : ℝ) (i : Fin d) (f : (Fin d → ℝ) → ℂ) + (x : Fin d → ℝ) : ℂ := + higherDiff r h (slice f x i) (x i) + +/-- The coordinate difference as a sum: `Δ^r_{h e_i} f(x) = ∑_k (-1)^(r-k) C(r,k) f(x + k h +e_i)`. -/ +theorem cubeDiff_eq (r : ℕ) (h : ℝ) (i : Fin d) (f : (Fin d → ℝ) → ℂ) (x : Fin d → ℝ) : + cubeDiff r h i f x = ∑ k ∈ Finset.range (r + 1), + ((-1 : ℂ) ^ (r - k) * (r.choose k : ℂ)) * f (Function.update x i (x i + k * h)) := by + rw [cubeDiff, Interval.higherDiff_apply] + rfl + +/-- Coordinate differences of measurable functions are measurable. -/ +theorem measurable_cubeDiff {f : (Fin d → ℝ) → ℂ} (hf : Measurable f) (r : ℕ) (h : ℝ) + (i : Fin d) : Measurable (cubeDiff r h i f) := by + have : cubeDiff r h i f = fun x => ∑ k ∈ Finset.range (r + 1), + ((-1 : ℂ) ^ (r - k) * (r.choose k : ℂ)) * f (Function.update x i (x i + k * h)) := + funext (cubeDiff_eq r h i f) + rw [this] + refine Finset.measurable_sum _ fun k _ => measurable_const.mul (hf.comp ?_) + exact measurable_update'.comp (measurable_id.prodMk ((measurable_pi_apply i).add_const _)) + +/-- The slice of a coordinate difference in its own coordinate is the difference of the slice. -/ +theorem slice_cubeDiff (r : ℕ) (h : ℝ) (i : Fin d) (f : (Fin d → ℝ) → ℂ) (x : Fin d → ℝ) : + slice (cubeDiff r h i f) x i = higherDiff r h (slice f x i) := by + funext t + simp only [slice, cubeDiff] + rw [slice_update, Function.update_self] + +/-- Coordinate differences are additive. -/ +theorem cubeDiff_add (r : ℕ) (h : ℝ) (i : Fin d) (f g : (Fin d → ℝ) → ℂ) : + cubeDiff r h i (f + g) = cubeDiff r h i f + cubeDiff r h i g := by + funext x + simp only [cubeDiff, Pi.add_apply] + rw [show slice (f + g) x i = slice f x i + slice g x i from rfl, Interval.higherDiff_add] + rfl + +/-- The region `{x ∈ Q : x_i ≤ 1 - r h}` of the differences of step `h` in coordinate `i`, as a +restriction of the cube measure. -/ +noncomputable abbrev diffRegion (d : ℕ) (r : ℕ) (h : ℝ) (i : Fin d) : Measure (Fin d → ℝ) := + (cubeVol d).restrict {x | x i ∈ Icc 0 (1 - r * h)} + +/-- **Coordinate differences through slices**: for measurable `f`, `h ≥ 0` and `0 < p < ∞`, +`‖Δ^r_{h e_i} f‖_{L_p({x_i ≤ 1 - rh})}^p = ∫_Q ‖Δ_h^r (slice f x i)‖_{L_p[0, 1-rh]}^p dx`. -/ +theorem eLpNorm_rpow_cubeDiff_eq_slice {f : (Fin d → ℝ) → ℂ} (hf : Measurable f) {p : ℝ≥0∞} + (hp0 : p ≠ 0) (hp : p ≠ ∞) (r : ℕ) {h : ℝ} (hh : 0 ≤ h) (i : Fin d) : + eLpNorm (cubeDiff r h i f) p (diffRegion d r h i) ^ p.toReal = + ∫⁻ x, eLpNorm (higherDiff r h (slice f x i)) p (volume.restrict (Icc 0 (1 - r * h))) ^ + p.toReal ∂cubeVol d := by + rw [diffRegion, eLpNorm_rpow_region_eq_slice (measurable_cubeDiff hf r h i) hp0 hp i + measurableSet_Icc] + refine lintegral_congr fun x => ?_ + rw [slice_cubeDiff, unitVol_restrict_Icc_of_subset le_rfl + (sub_le_self _ (mul_nonneg (Nat.cast_nonneg r) hh))] + +/-- The **modulus of smoothness in coordinate `i`** on the cube: +`ω_r^{(i)}(f, t)_p = sup_{0 ≤ h ≤ t} ‖Δ^r_{h e_i} f‖_{L_p({x ∈ Q : x_i ≤ 1 - rh})}`. -/ +noncomputable def coordModulus (r : ℕ) (p : ℝ≥0∞) (i : Fin d) (f : (Fin d → ℝ) → ℂ) (t : ℝ) : + ℝ≥0∞ := + ⨆ (h : ℝ) (_ : h ∈ Icc 0 t), eLpNorm (cubeDiff r h i f) p (diffRegion d r h i) + +/-- `‖Δ^r_{h e_i} f‖_{L_p({x_i ≤ 1 - rh})} ≤ ω_r^{(i)}(f, t)` for `0 ≤ h ≤ t`. -/ +theorem eLpNorm_cubeDiff_le_coordModulus {r : ℕ} {p : ℝ≥0∞} {i : Fin d} + {f : (Fin d → ℝ) → ℂ} {t h : ℝ} (hh : h ∈ Icc 0 t) : + eLpNorm (cubeDiff r h i f) p (diffRegion d r h i) ≤ coordModulus r p i f t := + le_iSup₂ (f := fun (h : ℝ) (_ : h ∈ Icc 0 t) => + eLpNorm (cubeDiff r h i f) p (diffRegion d r h i)) h hh + +/-- The coordinate modulus increases in `t`. -/ +theorem coordModulus_mono (r : ℕ) (p : ℝ≥0∞) (i : Fin d) (f : (Fin d → ℝ) → ℂ) : + Monotone (coordModulus r p i f) := + fun _ _ hst => iSup₂_le fun _ hh => eLpNorm_cubeDiff_le_coordModulus ⟨hh.1, hh.2.trans hst⟩ + +/-- The coordinate modulus is subadditive. -/ +theorem coordModulus_add_le {p : ℝ≥0∞} (hp : 1 ≤ p) (r : ℕ) (i : Fin d) + (f g : (Fin d → ℝ) → ℂ) (t : ℝ) : + coordModulus r p i (f + g) t ≤ coordModulus r p i f t + coordModulus r p i g t := by + refine iSup₂_le fun h hh => ?_ + rw [cubeDiff_add] + exact (eLpNorm_add_le hp).trans + (add_le_add (eLpNorm_cubeDiff_le_coordModulus hh) (eLpNorm_cubeDiff_le_coordModulus hh)) + +/-- **Coordinate differences bounded through slices**: for measurable `f`, `0 < p < ∞`, +`h ≥ 0` and `B ∈ [0, ∞]`, if `‖Δ_h^r (slice f x i)‖_{L_p[0, 1-rh]} ≤ B ‖slice f x i‖_{L_p[0,1]}` +for every point `x`, then `‖Δ^r_{h e_i} f‖_{L_p({x_i ≤ 1 - rh})} ≤ B ‖f‖_{L_p(Q)}` +(`Cube.eLpNorm_inter_le_of_slice_le`). -/ +theorem eLpNorm_cubeDiff_le_of_slice_le {f : (Fin d → ℝ) → ℂ} (hf : Measurable f) {p : ℝ≥0∞} + (hp0 : p ≠ 0) (hp : p ≠ ∞) (r : ℕ) {h : ℝ} (hh : 0 ≤ h) (i : Fin d) {B : ℝ≥0∞} + (hB : ∀ x, eLpNorm (higherDiff r h (slice f x i)) p (volume.restrict (Icc 0 (1 - r * h))) ≤ + B * eLpNorm (slice f x i) p unitVol) : + eLpNorm (cubeDiff r h i f) p (diffRegion d r h i) ≤ B * eLpNorm f p (cubeVol d) := by + have hR := eLpNorm_inter_le_of_slice_le (measurable_cubeDiff hf r h i) hf hp0 hp i + MeasurableSet.univ (fun _ _ => Iff.rfl) measurableSet_Icc MeasurableSet.univ (C := B) + fun x => by + rw [slice_cubeDiff, unitVol_restrict_Icc_of_subset le_rfl + (sub_le_self _ (mul_nonneg (Nat.cast_nonneg r) hh)), Measure.restrict_univ] + exact hB x + simpa only [univ_inter, mem_univ, ofPred_true, Measure.restrict_univ] using hR + +/-- **`‖Δ^r_{h e_i} f‖_{L_p({x_i ≤ 1 - rh})} ≤ 2^r ‖f‖_{L_p(Q)}`** for `h ≥ 0`, from the bound in +one variable on every slice. -/ +theorem eLpNorm_cubeDiff_le {f : (Fin d → ℝ) → ℂ} (hf : Measurable f) {p : ℝ≥0∞} (hp : 1 ≤ p) + (hp' : p ≠ ∞) (r : ℕ) {h : ℝ} (hh : 0 ≤ h) (i : Fin d) : + eLpNorm (cubeDiff r h i f) p (diffRegion d r h i) ≤ 2 ^ r * eLpNorm f p (cubeVol d) := + eLpNorm_cubeDiff_le_of_slice_le hf (zero_lt_one.trans_le hp).ne' hp' r hh i fun x => + Interval.eLpNorm_higherDiff_le (measurable_slice hf x i) hp r hh 0 1 + +/-- `ω_r^{(i)}(f, t)_p ≤ 2^r ‖f‖_{L_p(Q)}`. -/ +theorem coordModulus_le {f : (Fin d → ℝ) → ℂ} (hf : Measurable f) {p : ℝ≥0∞} (hp : 1 ≤ p) + (hp' : p ≠ ∞) (r : ℕ) (i : Fin d) (t : ℝ) : + coordModulus r p i f t ≤ 2 ^ r * eLpNorm f p (cubeVol d) := + iSup₂_le fun _ hh => eLpNorm_cubeDiff_le hf hp hp' r hh.1 i + +/-- **Equal coordinate moduli through slices**: for measurable `f, g` and `0 < p < ∞`, if for +every step `0 ≤ s ≤ t` and almost every point `x` the differences of the slices have equal norms, +`‖Δ_s^r (slice f x i)‖_{L_p[0, 1-rs]} = ‖Δ_s^r (slice g x i)‖_{L_p[0, 1-rs]}`, then +`ω_r^{(i)}(f, t)_p = ω_r^{(i)}(g, t)_p` (`Cube.eLpNorm_rpow_cubeDiff_eq_slice`). -/ +theorem coordModulus_eq_of_slice {f g : (Fin d → ℝ) → ℂ} (hf : Measurable f) (hg : Measurable g) + {p : ℝ≥0∞} (hp0 : p ≠ 0) (hp : p ≠ ∞) (r : ℕ) (i : Fin d) (t : ℝ) + (heq : ∀ s ∈ Icc 0 t, ∀ᵐ x ∂cubeVol d, + eLpNorm (higherDiff r s (slice f x i)) p (volume.restrict (Icc 0 (1 - r * s))) = + eLpNorm (higherDiff r s (slice g x i)) p (volume.restrict (Icc 0 (1 - r * s)))) : + coordModulus r p i f t = coordModulus r p i g t := by + simp only [coordModulus] + refine iSup_congr fun s => iSup_congr fun hs => + (ENNReal.rpow_left_injective (ENNReal.toReal_pos hp0 hp).ne').eq_iff.1 ?_ + rw [eLpNorm_rpow_cubeDiff_eq_slice hf hp0 hp r hs.1 i, + eLpNorm_rpow_cubeDiff_eq_slice hg hp0 hp r hs.1 i] + exact lintegral_congr_ae ((heq s hs).mono fun x hx => by simp only [hx]) + +/-- **The coordinate modulus depends only on the class in `L_p(Q)`**: measurable functions that +agree almost everywhere on the cube have almost everywhere equal slices, hence equal +differences. -/ +theorem coordModulus_congr_ae {f g : (Fin d → ℝ) → ℂ} (hf : Measurable f) (hg : Measurable g) + (hfg : f =ᵐ[cubeVol d] g) {p : ℝ≥0∞} (hp0 : p ≠ 0) (hp : p ≠ ∞) (r : ℕ) (i : Fin d) + (t : ℝ) : coordModulus r p i f t = coordModulus r p i g t := + coordModulus_eq_of_slice hf hg hp0 hp r i t fun _ hh => + (ae_slice_ae_eq hf hg hfg i).mono fun _ hx => + eLpNorm_higherDiff_congr_ae (a := 0) (b := 1) hx r p hh.1 + +/-- The **modulus of smoothness on the cube**, `ω_r(f, t)_p = ∑_i ω_r^{(i)}(f, t)_p`. -/ +noncomputable def cubeModulus (r : ℕ) (p : ℝ≥0∞) (f : (Fin d → ℝ) → ℂ) (t : ℝ) : ℝ≥0∞ := + ∑ i, coordModulus r p i f t + +/-- The modulus on the cube increases in `t`. -/ +theorem cubeModulus_mono (r : ℕ) (p : ℝ≥0∞) (f : (Fin d → ℝ) → ℂ) : + Monotone (cubeModulus r p f) := + fun _ _ hst => Finset.sum_le_sum fun i _ => coordModulus_mono r p i f hst + +/-- The modulus on the cube is subadditive. -/ +theorem cubeModulus_add_le {p : ℝ≥0∞} (hp : 1 ≤ p) (r : ℕ) (f g : (Fin d → ℝ) → ℂ) (t : ℝ) : + cubeModulus r p (f + g) t ≤ cubeModulus r p f t + cubeModulus r p g t := by + rw [cubeModulus, cubeModulus, cubeModulus, ← Finset.sum_add_distrib] + exact Finset.sum_le_sum fun i _ => coordModulus_add_le hp r i f g t + +/-- `ω_r(f, t)_p ≤ d 2^r ‖f‖_{L_p(Q)}`. -/ +theorem cubeModulus_le {f : (Fin d → ℝ) → ℂ} (hf : Measurable f) {p : ℝ≥0∞} (hp : 1 ≤ p) + (hp' : p ≠ ∞) (r : ℕ) (t : ℝ) : + cubeModulus r p f t ≤ d * 2 ^ r * eLpNorm f p (cubeVol d) := by + calc cubeModulus r p f t ≤ ∑ _i : Fin d, 2 ^ r * eLpNorm f p (cubeVol d) := + Finset.sum_le_sum fun i _ => coordModulus_le hf hp hp' r i t + _ = d * 2 ^ r * eLpNorm f p (cubeVol d) := by + rw [Finset.sum_const, Finset.card_univ, Fintype.card_fin, nsmul_eq_mul, mul_assoc] + +/-- The modulus on the cube depends only on the class in `L_p(Q)`. -/ +theorem cubeModulus_congr_ae {f g : (Fin d → ℝ) → ℂ} (hf : Measurable f) (hg : Measurable g) + (hfg : f =ᵐ[cubeVol d] g) {p : ℝ≥0∞} (hp0 : p ≠ 0) (hp : p ≠ ∞) (r : ℕ) (t : ℝ) : + cubeModulus r p f t = cubeModulus r p g t := + Finset.sum_congr rfl fun i _ => coordModulus_congr_ae hf hg hfg hp0 hp r i t + +/-! ### The modulus on `L_p(Q)` at dyadic scales -/ + +variable {p : ℝ≥0∞} [Fact (1 ≤ p)] + +variable (p) in +/-- The modulus of an element of `L_p(Q)` at the dyadic scale `2^(-k)`, +`ω_r(f, 2^(-k))_p` on the cube. -/ +noncomputable def lpCubeModulus (r : ℕ) (f : Lp ℂ p (cubeVol d)) (k : ℕ) : ℝ≥0∞ := + cubeModulus r p (f : (Fin d → ℝ) → ℂ) (1 / 2 ^ k) + +/-- The modulus on `L_p(Q)` is subadditive. -/ +theorem lpCubeModulus_add_le (hp : p ≠ ∞) (r : ℕ) (f g : Lp ℂ p (cubeVol d)) (k : ℕ) : + lpCubeModulus p r (f + g) k ≤ lpCubeModulus p r f k + lpCubeModulus p r g k := by + have hp0 : p ≠ 0 := (lt_of_lt_of_le zero_lt_one (Fact.out : 1 ≤ p)).ne' + rw [lpCubeModulus, cubeModulus_congr_ae (Lp.stronglyMeasurable (f + g)).measurable + ((Lp.stronglyMeasurable f).measurable.add (Lp.stronglyMeasurable g).measurable) + (Lp.coeFn_add f g) hp0 hp] + exact cubeModulus_add_le Fact.out r _ _ _ + +/-- `ω_r(f, t)_p ≤ d 2^r ‖f‖_p` in `L_p(Q)`. -/ +theorem lpCubeModulus_le (hp : p ≠ ∞) (r : ℕ) (f : Lp ℂ p (cubeVol d)) (k : ℕ) : + lpCubeModulus p r f k ≤ d * 2 ^ r * ‖f‖ₑ := by + rw [Lp.eNorm_def] + exact cubeModulus_le (Lp.stronglyMeasurable f).measurable Fact.out hp r _ + +omit [Fact (1 ≤ p)] in +/-- The modulus at the dyadic scales decreases with the level. -/ +theorem lpCubeModulus_anti (r : ℕ) (f : Lp ℂ p (cubeVol d)) : Antitone (lpCubeModulus p r f) := + fun _ _ hjk => cubeModulus_mono r p _ (one_div_le_one_div_of_le (by positivity) + (pow_le_pow_right₀ (by norm_num) hjk)) + +/-- **Inverse inequalities on the cube from bounds in each coordinate**: let `a ∈ L_p(Q)` be +represented by a measurable `g`, `θ ∈ ℝ` and `2^r ≤ B`. If for `j ≤ k`, every coordinate `i` and +every `0 ≤ h ≤ 2^(-k)`, `‖Δ^r_{h e_i} g‖_{L_p({x_i ≤ 1 - rh})} ≤ B 2^(-(k-j)θ) ‖g‖_{L_p(Q)}`, then +`ω_r(a, 2^(-k))_p ≤ d B 2^(-(k-j)θ) ‖a‖_p`, with `k - j` truncated at `0`. For `k < j` the bound +`ω_r(a, 2^(-k))_p ≤ d 2^r ‖a‖_p` (`Cube.lpCubeModulus_le`) suffices. -/ +theorem lpCubeModulus_le_of_coord (hp : p ≠ ∞) {r j k : ℕ} {θ : ℝ} {B : ℝ≥0∞} (hB : 2 ^ r ≤ B) + {a : Lp ℂ p (cubeVol d)} {g : (Fin d → ℝ) → ℂ} (hg : Measurable g) (hae : a =ᵐ[cubeVol d] g) + (hcoord : j ≤ k → ∀ (i : Fin d) {h : ℝ}, 0 ≤ h → h ≤ 1 / 2 ^ k → + eLpNorm (cubeDiff r h i g) p (diffRegion d r h i) ≤ + B * ENNReal.dyadicWeight (-θ) (k - j) * eLpNorm g p (cubeVol d)) : + lpCubeModulus p r a k ≤ d * B * ENNReal.dyadicWeight (-θ) (k - j) * ‖a‖ₑ := by + have hp0 : p ≠ 0 := (zero_lt_one.trans_le (Fact.out : 1 ≤ p)).ne' + rcases lt_or_ge k j with hkj | hjk + · rw [Nat.sub_eq_zero_of_le hkj.le, ENNReal.dyadicWeight_zero_right, mul_one] + exact (lpCubeModulus_le hp r a k).trans (by gcongr) + rw [Lp.eNorm_def, eLpNorm_congr_ae hae, lpCubeModulus, + cubeModulus_congr_ae (Lp.stronglyMeasurable a).measurable hg hae hp0 hp, cubeModulus] + calc ∑ i, coordModulus r p i g (1 / 2 ^ k) + ≤ ∑ _i : Fin d, B * ENNReal.dyadicWeight (-θ) (k - j) * eLpNorm g p (cubeVol d) := + Finset.sum_le_sum fun i _ => iSup₂_le fun _ hh => hcoord hjk i hh.1 hh.2 + _ = _ := by + rw [Finset.sum_const, Finset.card_univ, Fintype.card_fin, nsmul_eq_mul] + ring + +end Cube diff --git a/LeanPool/FunctionSpaces/Domains/Cube/PiecewiseInverse.lean b/LeanPool/FunctionSpaces/Domains/Cube/PiecewiseInverse.lean new file mode 100644 index 0000000000..e3db902767 --- /dev/null +++ b/LeanPool/FunctionSpaces/Domains/Cube/PiecewiseInverse.lean @@ -0,0 +1,100 @@ +/- +Copyright (c) 2026 Mario Ullrich. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Mario Ullrich +-/ +module + +public import LeanPool.FunctionSpaces.Domains.Cube.PiecewiseJackson +public import LeanPool.FunctionSpaces.Domains.Interval.PiecewiseInverse + +/- +Modified for Lean Pool: module names and imports adapted. +-/ + +/-! +# The inverse inequality on the cube and the coincidence theorem + +The slices of a piecewise polynomial of level `j` on the cube are piecewise polynomials of level +`j` on `[0, 1]` (`Cube.IsCubePP.exists_slice_eq_ppFun`). So the local inverse estimate in one +variable (`Interval.eLpNorm_higherDiff_ppFun_le`), applied to every slice and integrated over the +point, bounds the differences in each coordinate: +`‖Δ^r_{h e_i} g‖_{L_p({x_i ≤ 1 - rh})} ≤ 2^r K (r (r + 1) 2^j h)^(1/p) ‖g‖_{L_p(Q)}` for +`0 ≤ h ≤ 2^(-j)` (`Cube.eLpNorm_cubeDiff_le_of_isCubePP`). Summed over the coordinates this is the +**inverse inequality of order `1/p`** (`Cube.exists_inverse_cubePPScheme`). + +With Jackson's inequality at every level (`Cube.exists_approxError_cubePPScheme_le`, Whitney's +inequality at level `0`) the modulus on the cube is compatible with the scheme +(`Cube.cubePPModulusData`), and the coincidence theorem of +`ApproximationSpaces.Moduli` gives `A^s_q = B^s_{p,q}([0, 1]^d)` for `0 ≤ s < 1/p` +(`Cube.memApprox_cubePPScheme_iff`), with the Besov space defined by the moduli in the +coordinates. +-/ + +@[expose] public section + +open MeasureTheory Set Polynomial +open scoped ENNReal +open ENNReal (dyadicWeight) + +namespace Cube + +open Interval + +variable {d : ℕ} {p : ℝ≥0∞} [Fact (1 ≤ p)] + +/-- **The local inverse estimate on the cube**: for a piecewise polynomial `g` of level `j` on +the cube and `0 ≤ h ≤ 2^(-j)`, +`‖Δ^r_{h e_i} g‖_{L_p({x_i ≤ 1 - rh})} ≤ 2^r K (r (r + 1) 2^j h)^(1/p) ‖g‖_{L_p(Q)}`, with the +Nikolskii constant `K` of the polynomials of degree `< r`. Each slice satisfies the estimate in +one variable (`Interval.eLpNorm_higherDiff_ppFun_le`). -/ +theorem eLpNorm_cubeDiff_le_of_isCubePP {r j : ℕ} {g : (Fin d → ℝ) → ℂ} (hg : IsCubePP r j g) + {K : ℝ≥0∞} (hKb : NikolskiiBound p r K) (hp : p ≠ ∞) (i : Fin d) {h : ℝ} + (hh0 : 0 ≤ h) (hh : h ≤ 1 / 2 ^ j) : + eLpNorm (cubeDiff r h i g) p (diffRegion d r h i) ≤ + 2 ^ r * K * (((r * (r + 1) : ℕ) : ℝ≥0∞) * ENNReal.ofReal (2 ^ j * h)) ^ (1 / p.toReal) * + eLpNorm g p (cubeVol d) := by + refine eLpNorm_cubeDiff_le_of_slice_le hg.1.1 + (zero_lt_one.trans_le (Fact.out : 1 ≤ p)).ne' hp r hh0 i fun x => ?_ + obtain ⟨Q, hQ, hs⟩ := hg.exists_slice_eq_ppFun i x + rw [hs] + exact eLpNorm_higherDiff_ppFun_le hQ hKb hp j hh0 hh + +/-- **The inverse inequality for piecewise polynomials on the cube**, of order `θ = 1/p`: there is +`C_B < ∞` with `ω_r(a, 2^(-k))_p ≤ C_B 2^(-(k-j)/p) ‖a‖_p` for every piecewise polynomial `a` of +level `j` on the cube (and `k - j` truncated at `0`). -/ +theorem exists_inverse_cubePPScheme {r : ℕ} (hp : p ≠ ∞) : + ∃ CB : ℝ≥0∞, CB ≠ ∞ ∧ ∀ j k : ℕ, ∀ a ∈ cubePPScheme p d r (2 ^ j), + lpCubeModulus p r a k ≤ CB * dyadicWeight (-(1 / p.toReal)) (k - j) * ‖a‖ₑ := by + obtain ⟨K, hK, hKb⟩ := enorm_polyFun_le (p := p) r hp + refine ⟨d * ppInverseConst p r K, ENNReal.mul_ne_top (ENNReal.natCast_ne_top d) + (ppInverseConst_ne_top r hK), fun j k a ha => ?_⟩ + obtain ⟨g, hg, hae⟩ := mem_cubePPScheme_two_pow.1 ha + refine lpCubeModulus_le_of_coord hp (two_pow_le_ppInverseConst r K) hg.1.1 hae + fun hjk i h hh0 hh => ?_ + exact (eLpNorm_cubeDiff_le_of_isCubePP hg hKb hp i hh0 (hh.trans (one_div_le_one_div_of_le + (by positivity) (pow_le_pow_right₀ (by norm_num) hjk)))).trans + (le_ppInverseConst_mul hjk K hh _) + +/-- The modulus `ω_r(f, 2^(-k))_p` on the cube is compatible with the scheme of piecewise +polynomials on the cube, with inverse order `θ = 1/p` and Jackson's inequality at every level +(Whitney's inequality at level `0`). -/ +noncomputable def cubePPModulusData {r : ℕ} (hr : 1 ≤ r) (hp : p ≠ ∞) : + ApproximationScheme.ModulusData (cubePPScheme p d r) (1 / p.toReal) := + .ofExists (lpCubeModulus p r) (lpCubeModulus_add_le hp r) (d * 2 ^ r) + (ENNReal.mul_ne_top (ENNReal.natCast_ne_top d) (by simp)) (lpCubeModulus_le hp r) 0 + ((exists_approxError_cubePPScheme_le hr hp).imp fun _ h => ⟨h.1, fun f k _ => h.2 f k⟩) + (exists_inverse_cubePPScheme hp) + +/-- **Approximation by piecewise polynomials on the cube.** For `1 ≤ p < ∞`, `1 ≤ q ≤ ∞`, +`r ≥ 1` and `0 ≤ s < 1/p`, an `f ∈ L_p([0, 1]^d)` lies in the approximation space `A^s_q` of the +piecewise polynomials of degree `< r` in each variable on dyadic cubes iff its Besov quasi-norm +`‖f‖_p + ‖(2^(ks) ω_r(f, 2^(-k))_p)_k‖_{ℓ_q}` is finite, where `ω_r = ∑_i ω_r^{(i)}` is the sum of +the moduli in the coordinates. -/ +theorem memApprox_cubePPScheme_iff {r : ℕ} (hr : 1 ≤ r) (hp : p ≠ ∞) {s : ℝ} {q : ℝ≥0∞} + (hq : 1 ≤ q) (hs : 0 ≤ s) (hsp : s < 1 / p.toReal) (f : Lp ℂ p (cubeVol d)) : + (cubePPScheme p d r).MemApprox s q f ↔ + ‖f‖ₑ + ENNReal.lqNorm q (fun k => dyadicWeight s k * lpCubeModulus p r f k) < ∞ := + (cubePPModulusData hr hp).memApprox_iff_modNorm_lt_top hq hs hsp f + +end Cube diff --git a/LeanPool/FunctionSpaces/Domains/Cube/PiecewiseJackson.lean b/LeanPool/FunctionSpaces/Domains/Cube/PiecewiseJackson.lean new file mode 100644 index 0000000000..5f5ce73db3 --- /dev/null +++ b/LeanPool/FunctionSpaces/Domains/Cube/PiecewiseJackson.lean @@ -0,0 +1,371 @@ +/- +Copyright (c) 2026 Mario Ullrich. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Mario Ullrich +-/ +module + +public import LeanPool.FunctionSpaces.Domains.Cube.PiecewisePoly +public import LeanPool.FunctionSpaces.Domains.Cube.Smoothing +public import LeanPool.FunctionSpaces.Domains.Interval.PiecewiseJackson + +/- +Modified for Lean Pool: module names and imports adapted. +-/ + +/-! +# Jackson's inequality for piecewise polynomials on the cube + +For `1 ≤ p < ∞`, `r ≥ 1` and `k ≥ 1`, the error of best approximation in `L_p(Q)`, +`Q = [0, 1]^d`, by piecewise polynomials of level `k` and degree `< r` in each variable is bounded +by the modulus on the cube, +`E_{2^k}(f)_p ≤ (1 + C_r)^(d+1) 2 (1 + 2^r r^(2r)) ω_r(f, 2^(-k))_p` +(`Cube.approxError_cubePPScheme_le`), with the bound `C_r` of the local projections. + +The approximant of a bounded continuous `f` is the tensor projection +`P_k^d f = P_k^{(0)} ⋯ P_k^{(d-1)} f`. Its error telescopes into the errors of the projections in +single coordinates (`Cube.KernelOp.eLpNorm_sub_foldSlicewise_le`). In coordinate `i`, every slice +of `f - P_k^{(i)} f` is the error of the local projection in one variable, and Lebesgue's +inequality (`Cube.eLpNorm_sub_ppKernel_apply_le`) bounds it by the error of any piecewise +polynomial. That piecewise polynomial is built slice by slice from Taylor polynomials of the +smoothings in coordinate `i` on the halves `{x_i ≤ 1/2}` and `{x_i ≥ 1/2}` +(`Cube.exists_left_cubeSmoothing`, `Cube.exists_right_cubeSmoothing`, +`Interval.exists_ppFun_approx_of_taylor`), so it need not depend measurably on the slice. +Minkowski's inequality in the point turns the bounds of the slices into bounds on two regions of +the cube (`Cube.eLpNorm_le_of_slice_le`), and every one-variable bound through such smoothings +becomes a bound in coordinate `i` (`Cube.eLpNorm_sub_slicewise_le_of_smoothing`, used in +`Cube.eLpNorm_sub_slicewise_ppKernel_le`). +General `f ∈ L_p(Q)` follow by density of the bounded continuous functions +(`Cube.approxError_le_of_continuous`). + +At level `0` the approximants are the polynomials of degree `< r` in each variable, and +**Whitney's inequality on the cube** `E_1(f)_p ≤ W ω_r(f, 2^(-m))_p`, `m ≥ 2` +(`Cube.exists_approxError_cubePPScheme_one_le`), follows in the same way: on every slice, the Taylor +polynomials of the smoothings on `{x_i ≤ 1 - t}` and `{x_i ≥ t}`, `t = 2^(-m)`, are glued as in +one variable (`Interval.exists_eLpNorm_sub_polyFun_le_glue`, +`Cube.exists_eLpNorm_sub_ppKernel_zero_apply_le`). So Jackson's inequality holds at every level +(`Cube.exists_approxError_cubePPScheme_le`). +-/ + +@[expose] public section + +open MeasureTheory Set Polynomial +open scoped ENNReal BoundedContinuousFunction + +namespace Cube + +open Interval + +variable {d : ℕ} + +/-! ### From slices to the cube -/ + +/-- **From slices to the cube, on two regions**: if every slice of `F` in coordinate `i` satisfies +`‖F_{x,i}‖_{L_p[0,1]} ≤ c ((‖(G₁)_{x,i}‖_{L_p[a₁,b₁]} + M ‖(D₁)_{x,i}‖_{L_p[a₁,b₁]}) + +(‖(G₂)_{x,i}‖_{L_p[a₂,b₂]} + M ‖(D₂)_{x,i}‖_{L_p[a₂,b₂]}))`, +then the same bound holds for the norms on the cube and on the regions `{x_i ∈ [a_ν, b_ν]}`: the +norms are mixed norms of the slices (`Cube.eLpNorm_cubeVol_eq_slice`, +`Cube.eLpNorm_regionVol_eq_slice`), and Minkowski's inequality in `L_p` over the point applies. -/ +theorem eLpNorm_le_of_slice_le {F G₁ D₁ G₂ D₂ : (Fin d → ℝ) → ℂ} (hF : Measurable F) + (hG₁ : Measurable G₁) (hD₁ : Measurable D₁) (hG₂ : Measurable G₂) (hD₂ : Measurable D₂) + {p : ℝ≥0∞} (hp : 1 ≤ p) (hp' : p ≠ ∞) (i : Fin d) {a₁ b₁ a₂ b₂ : ℝ} (ha₁ : 0 ≤ a₁) + (hb₁ : b₁ ≤ 1) (ha₂ : 0 ≤ a₂) (hb₂ : b₂ ≤ 1) {c M : ℝ≥0∞} + (h : ∀ x, eLpNorm (slice F x i) p unitVol ≤ + c * ((eLpNorm (slice G₁ x i) p (volume.restrict (Icc a₁ b₁)) + + M * eLpNorm (slice D₁ x i) p (volume.restrict (Icc a₁ b₁))) + + (eLpNorm (slice G₂ x i) p (volume.restrict (Icc a₂ b₂)) + + M * eLpNorm (slice D₂ x i) p (volume.restrict (Icc a₂ b₂))))) : + eLpNorm F p (cubeVol d) ≤ + c * ((eLpNorm G₁ p (regionVol d i a₁ b₁) + M * eLpNorm D₁ p (regionVol d i a₁ b₁)) + + (eLpNorm G₂ p (regionVol d i a₂ b₂) + M * eLpNorm D₂ p (regionVol d i a₂ b₂))) := by + have hp0 : p ≠ 0 := (zero_lt_one.trans_le hp).ne' + have hm : ∀ {G : (Fin d → ℝ) → ℂ} (a b : ℝ), Measurable G → + Measurable fun x => eLpNorm (slice G x i) p (volume.restrict (Icc a b)) := + fun a b hG => measurable_eLpNorm_slice hG hp0 hp' i _ + rw [eLpNorm_cubeVol_eq_slice hF hp0 hp' i, eLpNorm_regionVol_eq_slice hG₁ hp0 hp' i ha₁ hb₁, + eLpNorm_regionVol_eq_slice hD₁ hp0 hp' i ha₁ hb₁, + eLpNorm_regionVol_eq_slice hG₂ hp0 hp' i ha₂ hb₂, + eLpNorm_regionVol_eq_slice hD₂ hp0 hp' i ha₂ hb₂, + ← eLpNorm_const_mul_ennreal (c := M) (hm a₁ b₁ hD₁).aestronglyMeasurable, + ← eLpNorm_const_mul_ennreal (c := M) (hm a₂ b₂ hD₂).aestronglyMeasurable] + refine (eLpNorm_mono_eNorm (g := fun x => + c * ((eLpNorm (slice G₁ x i) p (volume.restrict (Icc a₁ b₁)) + + M * eLpNorm (slice D₁ x i) p (volume.restrict (Icc a₁ b₁))) + + (eLpNorm (slice G₂ x i) p (volume.restrict (Icc a₂ b₂)) + + M * eLpNorm (slice D₂ x i) p (volume.restrict (Icc a₂ b₂))))) + (measurable_eLpNorm_slice hF hp0 hp' i _).aestronglyMeasurable + fun x => by simpa only [eNorm_eq_self] using h x).trans ?_ + refine (eLpNorm_const_mul_ennreal (c := c) ?_).trans_le ?_ + · exact (((hm a₁ b₁ hG₁).add ((hm a₁ b₁ hD₁).const_mul M)).add + ((hm a₂ b₂ hG₂).add ((hm a₂ b₂ hD₂).const_mul M))).aestronglyMeasurable + gcongr + exact (eLpNorm_add_le hp).trans (add_le_add (eLpNorm_add_le hp) (eLpNorm_add_le hp)) + +/-- **From one coordinate to all**: if `‖T u‖_{L_p[0,1]} ≤ C ‖u‖_{L_p[0,1]}` and +`‖f - T^{(i)} f‖_{L_p(Q)} ≤ B ω_r^{(i)}(f, t)_p` in every coordinate, then +`‖f - T^{(0)} ⋯ T^{(d-1)} f‖_{L_p(Q)} ≤ (1 + C)^d B ω_r(f, t)_p`, by telescoping +(`Cube.KernelOp.eLpNorm_sub_foldSlicewise_le`). -/ +theorem KernelOp.eLpNorm_sub_foldSlicewise_le_of_coord {ι : Type*} [Fintype ι] (T : KernelOp ι) + {p : ℝ≥0∞} (hp : 1 ≤ p) (hp' : p ≠ ∞) {C : ℝ≥0∞} + (hT : ∀ u : ℝ → ℂ, Measurable u → eLpNorm (T.apply u) p unitVol ≤ C * eLpNorm u p unitVol) + {f : (Fin d → ℝ) → ℂ} (hfb : BddMeas f) {r : ℕ} {B : ℝ≥0∞} {t : ℝ} + (h : ∀ i, eLpNorm (fun x => f x - T.slicewise i f x) p (cubeVol d) ≤ + B * coordModulus r p i f t) : + eLpNorm (fun x => f x - T.foldSlicewise (List.finRange d) f x) p (cubeVol d) ≤ + (1 + C) ^ d * B * cubeModulus r p f t := by + refine (T.eLpNorm_sub_foldSlicewise_le hp hp' hT (List.finRange d) hfb).trans ?_ + rw [List.length_finRange, ← Fin.sum_univ_def] + calc (1 + C) ^ d * ∑ i, eLpNorm (fun x => f x - T.slicewise i f x) p (cubeVol d) + ≤ (1 + C) ^ d * ∑ i, B * coordModulus r p i f t := + mul_le_mul' le_rfl (Finset.sum_le_sum fun i _ => h i) + _ = (1 + C) ^ d * B * cubeModulus r p f t := by + rw [cubeModulus, ← Finset.mul_sum, mul_assoc] + +/-- **From one coordinate to all, for the tensor projection**: if +`‖f - P_k^{(i)} f‖_{L_p(Q)} ≤ B ω_r^{(i)}(f, t)_p` in every coordinate, then +`‖f - P_k^d f‖_{L_p(Q)} ≤ (1 + C_r)^d B ω_r(f, t)_p`. -/ +theorem eLpNorm_sub_cubeProj_le_of_coord {f : (Fin d → ℝ) → ℂ} (hfb : BddMeas f) {r k : ℕ} + {p : ℝ≥0∞} (hp : 1 ≤ p) (hp' : p ≠ ∞) {B : ℝ≥0∞} {t : ℝ} + (h : ∀ i, eLpNorm (fun x => f x - (ppKernel r k).slicewise i f x) p (cubeVol d) ≤ + B * coordModulus r p i f t) : + eLpNorm (fun x => f x - cubeProj r k f x) p (cubeVol d) ≤ + (1 + ppProjConst r) ^ d * B * cubeModulus r p f t := + (ppKernel r k).eLpNorm_sub_foldSlicewise_le_of_coord hp hp' + (fun _ hu => eLpNorm_ppKernel_apply_le hp hp' r k hu) hfb h + +/-- **Jackson's estimate in one coordinate from the smoothings**: let `f` be continuous, `r ≥ 1`, +`L > 0` and `w + L ≤ 1`. Suppose that in one variable the error of `T` on every continuous `u` is +bounded through any functions `g₁, g₂` that are approximated on every interval `[a, b]` by +polynomials of degree `< r` up to `(b - a)^r ‖D_ν‖_{L_p[a,b]}`: +`‖u - T u‖_{L_p[0,1]} ≤ c ((‖u - g₁‖_{L_p[0,w]} + M ‖D₁‖_{L_p[0,w]})` +`+ (‖u - g₂‖_{L_p[1-w,1]} + M ‖D₂‖_{L_p[1-w,1]}))`. +If `a + M b ≤ J ω` whenever `a ≤ ω` and `b ≤ L^(-r) 2^r r^(2r) ω`, then +`‖f - T^{(i)} f‖_{L_p(Q)} ≤ c (2 J) ω_r^{(i)}(f, L)_p`: apply the bound on every slice to the +smoothings of `f` in coordinate `i` (`Cube.exists_left_cubeSmoothing`, +`Cube.exists_right_cubeSmoothing`) and pass to the cube as in `Cube.eLpNorm_le_of_slice_le`. +The constants `c, M, J` may be any elements of `[0, ∞]`. -/ +theorem eLpNorm_sub_slicewise_le_of_smoothing {ι : Type*} [Fintype ι] (T : KernelOp ι) + {f : (Fin d → ℝ) → ℂ} (hf : Continuous f) {r : ℕ} (hr : 1 ≤ r) {p : ℝ≥0∞} (hp : 1 ≤ p) + (hp' : p ≠ ∞) (i : Fin d) {L w : ℝ} (hL : 0 < L) (hwL : w + L ≤ 1) {c M J : ℝ≥0∞} + (hT : ∀ {u g₁ D₁ g₂ D₂ : ℝ → ℂ}, Continuous u → Measurable g₁ → Measurable D₁ → + Measurable g₂ → Measurable D₂ → + (∀ a b : ℝ, a ≤ b → ∃ P ∈ degreeLT ℂ r, + eLpNorm (fun t => g₁ t - polyFun P t) p (volume.restrict (Icc a b)) ≤ + ENNReal.ofReal (b - a) ^ r * eLpNorm D₁ p (volume.restrict (Icc a b))) → + (∀ a b : ℝ, a ≤ b → ∃ P ∈ degreeLT ℂ r, + eLpNorm (fun t => g₂ t - polyFun P t) p (volume.restrict (Icc a b)) ≤ + ENNReal.ofReal (b - a) ^ r * eLpNorm D₂ p (volume.restrict (Icc a b))) → + eLpNorm (fun t => u t - T.apply u t) p unitVol ≤ + c * ((eLpNorm (fun t => u t - g₁ t) p (volume.restrict (Icc 0 w)) + + M * eLpNorm D₁ p (volume.restrict (Icc 0 w))) + + (eLpNorm (fun t => u t - g₂ t) p (volume.restrict (Icc (1 - w) 1)) + + M * eLpNorm D₂ p (volume.restrict (Icc (1 - w) 1))))) + (hJ : ∀ {a b ω : ℝ≥0∞}, a ≤ ω → + b ≤ ENNReal.ofReal L⁻¹ ^ r * (2 ^ r * (r : ℝ≥0∞) ^ (2 * r)) * ω → a + M * b ≤ J * ω) : + eLpNorm (fun x => f x - T.slicewise i f x) p (cubeVol d) ≤ + c * (2 * J) * coordModulus r p i f L := by + have hfm := hf.measurable + obtain ⟨G₁, D₁, hG₁, hD₁, h1L, h2L, hTL⟩ := exists_left_cubeSmoothing hf hr hp hp' i hL hwL + obtain ⟨G₂, D₂, hG₂, hD₂, h1R, h2R, hTR⟩ := exists_right_cubeSmoothing hf hr hp hp' i hL hwL + refine (eLpNorm_le_of_slice_le (hfm.sub (T.measurable_slicewise hfm i)) (hfm.sub hG₁) hD₁ + (hfm.sub hG₂) hD₂ hp hp' i (a₁ := 0) (b₁ := w) (a₂ := 1 - w) (b₂ := 1) le_rfl (by linarith) + (by linarith) le_rfl (c := c) (M := M) fun x => ?_).trans ?_ + · exact (congrArg (eLpNorm · p unitVol) (slice_sub_slicewise T f i x)).trans_le + (hT (continuous_slice hf x i) (measurable_slice hG₁ x i) (measurable_slice hD₁ x i) + (measurable_slice hG₂ x i) (measurable_slice hD₂ x i) (hTL x) (hTR x)) + · rw [mul_assoc, two_mul, add_mul] + exact mul_le_mul' le_rfl (add_le_add (hJ h1L h2L) (hJ h1R h2R)) + +/-! ### Jackson's inequality from level `1` on -/ + +/-- **Jackson's estimate in one coordinate**: for continuous `f`, `r ≥ 1` and `k ≥ 0`, +`‖f - P_{k+1}^{(i)} f‖_{L_p(Q)} ≤ (1 + C_r) 2 (1 + 2^r r^(2r)) ω_r^{(i)}(f, 2^(-(k+1)))_p`. -/ +theorem eLpNorm_sub_slicewise_ppKernel_le {f : (Fin d → ℝ) → ℂ} (hf : Continuous f) {r : ℕ} + (hr : 1 ≤ r) {p : ℝ≥0∞} (hp : 1 ≤ p) (hp' : p ≠ ∞) (i : Fin d) (k : ℕ) : + eLpNorm (fun x => f x - (ppKernel r (k + 1)).slicewise i f x) p (cubeVol d) ≤ + (1 + ppProjConst r) * (2 * jacksonConst r) * coordModulus r p i f (1 / 2 ^ (k + 1)) := by + have hL : (0 : ℝ) < 1 / 2 ^ (k + 1) := by positivity + refine eLpNorm_sub_slicewise_le_of_smoothing (ppKernel r (k + 1)) hf hr hp hp' i hL + (one_half_add_le_one k) (c := 1 + ppProjConst r) (M := ENNReal.ofReal (1 / 2 ^ (k + 1)) ^ r) + (fun hu hG₁ hD₁ hG₂ hD₂ hTL hTR => ?_) + fun ha hb => add_ofReal_pow_mul_le_jacksonConst hL r ha hb + obtain ⟨Q, hQ, hb⟩ := exists_ppFun_approx_of_taylor hu.measurable hG₁ hD₁ hG₂ hD₂ hp hp' hTL hTR k + rw [show (1 : ℝ) - 1 / 2 = 1 / 2 by norm_num] + exact (eLpNorm_sub_ppKernel_apply_le hp hp' hu.measurable hu.integrableOn_Icc hQ).trans + (mul_le_mul' le_rfl hb) + +/-- The constant of Jackson's inequality on the cube, `(1 + C_r)^(d+1) 2 (1 + 2^r r^(2r))`, with +the bound `C_r` of the local projections. -/ +noncomputable def cubeJacksonConst (d r : ℕ) : ℝ≥0∞ := + (1 + ppProjConst r) ^ (d + 1) * (2 * jacksonConst r) + +/-- The Jackson constant on the cube is finite. -/ +theorem cubeJacksonConst_ne_top (d r : ℕ) : cubeJacksonConst d r ≠ ∞ := + ENNReal.mul_ne_top + (ENNReal.pow_ne_top (ENNReal.add_ne_top.2 ⟨ENNReal.one_ne_top, ppProjConst_ne_top r⟩)) + (ENNReal.mul_ne_top (by norm_num) (jacksonConst_ne_top r)) + +/-- **Jackson's estimate for continuous functions on the cube**: for bounded continuous `f`, +`r ≥ 1` and `k ≥ 0`, the tensor projection satisfies +`‖f - P_{k+1}^d f‖_{L_p(Q)} ≤ (1 + C_r)^(d+1) 2 (1 + 2^r r^(2r)) ω_r(f, 2^(-(k+1)))_p`. -/ +theorem eLpNorm_sub_cubeProj_le {f : (Fin d → ℝ) → ℂ} (hf : Continuous f) (hfb : BddMeas f) + {r : ℕ} (hr : 1 ≤ r) {p : ℝ≥0∞} (hp : 1 ≤ p) (hp' : p ≠ ∞) (k : ℕ) : + eLpNorm (fun x => f x - cubeProj r (k + 1) f x) p (cubeVol d) ≤ + cubeJacksonConst d r * cubeModulus r p f (1 / 2 ^ (k + 1)) := by + refine (eLpNorm_sub_cubeProj_le_of_coord hfb hp hp' + fun i => eLpNorm_sub_slicewise_ppKernel_le hf hr hp hp' i k).trans_eq ?_ + rw [cubeJacksonConst, pow_succ] + ring + +variable {p : ℝ≥0∞} [Fact (1 ≤ p)] + +/-- **From continuous functions to `L_p(Q)` by density**: a bound +`E_n(g) ≤ C ω_r(g, 2^(-k))_p` for every bounded continuous `g`, given by an approximant +`u ∈ A_n` of `g`, holds for every `f ∈ L_p(Q)`, `p < ∞`, as in one variable +(`Interval.approxError_le_of_continuous`). -/ +theorem approxError_le_of_continuous {A : ApproximationScheme (Lp ℂ p (cubeVol d))} (hp : p ≠ ∞) + {r n k : ℕ} {C : ℝ≥0∞} (hC : C ≠ ∞) + (h : ∀ g : (Fin d → ℝ) →ᵇ ℂ, ∃ u : (Fin d → ℝ) → ℂ, + (∃ a ∈ A n, (a : (Fin d → ℝ) → ℂ) =ᵐ[cubeVol d] u) ∧ + eLpNorm (fun x => g x - u x) p (cubeVol d) ≤ C * cubeModulus r p g (1 / 2 ^ k)) + (f : Lp ℂ p (cubeVol d)) : A.approxError f n ≤ C * lpCubeModulus p r f k := by + have hp0 : p ≠ 0 := (lt_of_lt_of_le zero_lt_one (Fact.out : 1 ≤ p)).ne' + refine ApproximationScheme.approxError_le_of_dense + (BoundedContinuousFunction.toLp_denseRange ℂ (cubeVol d) ℝ hp) + (fun f g => lpCubeModulus_add_le hp r f g k) (C0 := d * 2 ^ r) + (ENNReal.mul_ne_top (ENNReal.natCast_ne_top d) (ENNReal.pow_ne_top ENNReal.ofNat_ne_top)) + (fun f => lpCubeModulus_le hp r f k) hC ?_ f + rintro _ ⟨g, rfl⟩ + obtain ⟨u, ⟨a, ha, hau⟩, hbound⟩ := h g + have hg := BoundedContinuousFunction.coeFn_toLp (E := ℂ) p (cubeVol d) ℝ g + refine (A.approxError_le_of_mem ha _).trans ?_ + rw [Lp.eNorm_def, eLpNorm_congr_ae ((Lp.coeFn_sub _ _).trans (hg.sub hau)), lpCubeModulus, + cubeModulus_congr_ae (Lp.stronglyMeasurable _).measurable g.continuous.measurable hg hp0 hp] + exact hbound + +/-- **Jackson's inequality for piecewise polynomials on the cube**: for `1 ≤ p < ∞`, `r ≥ 1` and +`k ≥ 1`, `E_{2^k}(f)_p ≤ (1 + C_r)^(d+1) 2 (1 + 2^r r^(2r)) ω_r(f, 2^(-k))_p` for every +`f ∈ L_p(Q)`; first for bounded continuous functions with the tensor projection +(`Cube.eLpNorm_sub_cubeProj_le`), then by density. -/ +theorem approxError_cubePPScheme_le {r : ℕ} (hr : 1 ≤ r) (hp : p ≠ ∞) (f : Lp ℂ p (cubeVol d)) + {k : ℕ} (hk : 1 ≤ k) : + (cubePPScheme p d r).approxError f (2 ^ k) ≤ cubeJacksonConst d r * lpCubeModulus p r f k := by + obtain ⟨k, rfl⟩ := Nat.exists_eq_add_of_le' hk + refine approxError_le_of_continuous hp (cubeJacksonConst_ne_top d r) (fun g => ?_) f + have hgb : BddMeas (g : (Fin d → ℝ) → ℂ) := ⟨g.continuous.measurable, ‖g‖, g.norm_coe_le_norm⟩ + have hP := isCubePP_cubeProj r (k + 1) hgb + exact ⟨cubeProj r (k + 1) g, ⟨(hP.1.memLp p (cubeVol d)).toLp _, + mem_cubePPScheme_two_pow.2 ⟨_, hP, MemLp.coeFn_toLp _⟩, MemLp.coeFn_toLp _⟩, + eLpNorm_sub_cubeProj_le g.continuous hgb hr Fact.out hp k⟩ + +/-! ### Whitney's inequality: level `0` -/ + +/-- **Whitney's estimate for the projection of level `0`**: there is `K < ∞` such that for `u` +integrable on `[0, 1]` and polynomials `T₁, T₂` of degree `< r`, +`‖u - P_0 u‖_{L_p[0,1]} ≤ K (‖u - T₁‖_{L_p[0,2/3]} + ‖u - T₂‖_{L_p[1/3,1]})`: the projection is +quasi-optimal (`Cube.eLpNorm_sub_ppKernel_apply_le`), and `T₁` and `T₂` are glued as in Whitney's +inequality (`Interval.exists_eLpNorm_sub_polyFun_le_glue`). -/ +theorem exists_eLpNorm_sub_ppKernel_zero_apply_le (r : ℕ) (hp' : p ≠ ∞) : + ∃ K : ℝ≥0∞, K ≠ ∞ ∧ ∀ {u : ℝ → ℂ}, Measurable u → IntegrableOn u (Icc 0 1) → + ∀ {T₁ T₂ : ℂ[X]}, T₁ ∈ degreeLT ℂ r → T₂ ∈ degreeLT ℂ r → + eLpNorm (fun s => u s - (ppKernel r 0).apply u s) p unitVol ≤ + K * (eLpNorm (fun s => u s - polyFun T₁ s) p (volume.restrict (Icc 0 (2 / 3))) + + eLpNorm (fun s => u s - polyFun T₂ s) p (volume.restrict (Icc (1 / 3) 1))) := by + have hp : 1 ≤ p := Fact.out + obtain ⟨K, hK, hKb⟩ := exists_eLpNorm_sub_polyFun_le_glue (p := p) r hp' + refine ⟨(1 + ppProjConst r) * (1 + K), + ENNReal.mul_ne_top (ENNReal.add_ne_top.2 ⟨ENNReal.one_ne_top, ppProjConst_ne_top r⟩) + (ENNReal.add_ne_top.2 ⟨ENNReal.one_ne_top, hK⟩), fun {u} hu hui {T₁ T₂} hT₁ hT₂ => ?_⟩ + have hae : (fun s => u s - ppFun 0 (fun _ => T₁) s) =ᵐ[unitVol] + fun s => u s - polyFun T₁ s := by + filter_upwards [ae_mem_Ico_unitVol] with s hs + obtain ⟨hmem, hlt⟩ := mem_dyadicIco_floor (k := 0) hs + rw [ppFun_eq_of_mem _ hlt hmem] + calc eLpNorm (fun s => u s - (ppKernel r 0).apply u s) p unitVol + ≤ (1 + ppProjConst r) * eLpNorm (fun s => u s - ppFun 0 (fun _ => T₁) s) p unitVol := + eLpNorm_sub_ppKernel_apply_le hp hp' hu hui fun _ => hT₁ + _ = (1 + ppProjConst r) * + eLpNorm (fun s => u s - polyFun T₁ s) p (volume.restrict (Icc 0 1)) := by + rw [eLpNorm_congr_ae hae] + _ ≤ (1 + ppProjConst r) * ((1 + K) * + (eLpNorm (fun s => u s - polyFun T₁ s) p (volume.restrict (Icc 0 (2 / 3))) + + eLpNorm (fun s => u s - polyFun T₂ s) p (volume.restrict (Icc (1 / 3) 1)))) := + mul_le_mul' le_rfl (hKb hu hT₁ hT₂) + _ = _ := (mul_assoc _ _ _).symm + +/-- **Whitney's estimate in one coordinate**: for `0 < t ≤ 1/3` there is `W < ∞` with +`‖f - P_0^{(i)} f‖_{L_p(Q)} ≤ W ω_r^{(i)}(f, t)_p` for every continuous `f` and every +coordinate `i`, where `P_0` is the projection onto the polynomials of degree `< r` in one +variable. On every slice, the Taylor polynomials of the smoothings on `{x_i ≤ 1 - t}` and on +`{x_i ≥ t}` are glued as in Whitney's inequality on `[0, 1]` +(`Cube.exists_eLpNorm_sub_ppKernel_zero_apply_le`). -/ +theorem exists_eLpNorm_sub_slicewise_ppKernel_zero_le {r : ℕ} (hr : 1 ≤ r) (hp' : p ≠ ∞) + {t : ℝ} (ht : 0 < t) (ht3 : t ≤ 1 / 3) : + ∃ W : ℝ≥0∞, W ≠ ∞ ∧ ∀ {f : (Fin d → ℝ) → ℂ}, Continuous f → ∀ i : Fin d, + eLpNorm (fun x => f x - (ppKernel r 0).slicewise i f x) p (cubeVol d) ≤ + W * coordModulus r p i f t := by + have hp : 1 ≤ p := Fact.out + obtain ⟨K, hK, hKb⟩ := exists_eLpNorm_sub_ppKernel_zero_apply_le (p := p) r hp' + obtain ⟨c, hc_eq⟩ : ∃ c : ℝ≥0∞, + c = ENNReal.ofReal t⁻¹ ^ r * (2 ^ r * (r : ℝ≥0∞) ^ (2 * r)) := ⟨_, rfl⟩ + have hc : c ≠ ∞ := hc_eq ▸ ENNReal.mul_ne_top (ENNReal.pow_ne_top ENNReal.ofReal_ne_top) + (ENNReal.mul_ne_top (by simp) (ENNReal.pow_ne_top (ENNReal.natCast_ne_top r))) + refine ⟨K * (2 * (1 + c)), ENNReal.mul_ne_top hK + (ENNReal.mul_ne_top (by simp) (ENNReal.add_ne_top.2 ⟨ENNReal.one_ne_top, hc⟩)), + fun {f} hf i => eLpNorm_sub_slicewise_le_of_smoothing (ppKernel r 0) hf hr hp hp' i ht + (by linarith : (1 - t) + t ≤ 1) (c := K) (M := 1) (J := 1 + c) + (fun hu _ _ _ _ hTL hTR => ?_) fun ha hb => ?_⟩ + · obtain ⟨T₁, hT₁, hT₁b⟩ := hTL 0 (1 - t) (by linarith) + obtain ⟨T₂, hT₂, hT₂b⟩ := hTR t 1 (by linarith) + rw [sub_sub_cancel] + refine (hKb hu.measurable hu.integrableOn_Icc hT₁ hT₂).trans + (mul_le_mul' le_rfl (add_le_add ?_ ?_)) + · rw [one_mul] + exact (eLpNorm_Icc_mono _ p le_rfl (by linarith)).trans + (eLpNorm_sub_polyFun_le_add (by linarith) hT₁b) + · rw [one_mul] + exact (eLpNorm_Icc_mono _ p ht3 le_rfl).trans + (eLpNorm_sub_polyFun_le_add (by linarith) hT₂b) + · rw [one_mul, add_mul, one_mul, hc_eq] + exact add_le_add ha hb + +/-- **Whitney's inequality on the cube**: for `m ≥ 2` there is `W < ∞` with +`E_1(f)_p ≤ W ω_r(f, 2^(-m))_p` for every `f ∈ L_p(Q)`; the approximants of complexity `1` are the +polynomials of degree `< r` in each variable. -/ +theorem exists_approxError_cubePPScheme_one_le {r : ℕ} (hr : 1 ≤ r) (hp : p ≠ ∞) {m : ℕ} + (hm : 2 ≤ m) : + ∃ W : ℝ≥0∞, W ≠ ∞ ∧ ∀ f : Lp ℂ p (cubeVol d), + (cubePPScheme p d r).approxError f 1 ≤ W * lpCubeModulus p r f m := by + have ht : (0 : ℝ) < 1 / 2 ^ m := by positivity + have ht3 : (1 : ℝ) / 2 ^ m ≤ 1 / 3 := by + rw [div_le_div_iff₀ (by positivity) (by norm_num), one_mul, one_mul] + calc (3 : ℝ) ≤ 2 ^ 2 := by norm_num + _ ≤ 2 ^ m := pow_le_pow_right₀ (by norm_num) hm + obtain ⟨W, hW, hWb⟩ := + exists_eLpNorm_sub_slicewise_ppKernel_zero_le (d := d) (p := p) hr hp ht ht3 + have hW' : (1 + ppProjConst r) ^ d * W ≠ ∞ := ENNReal.mul_ne_top + (ENNReal.pow_ne_top (ENNReal.add_ne_top.2 ⟨ENNReal.one_ne_top, ppProjConst_ne_top r⟩)) hW + refine ⟨(1 + ppProjConst r) ^ d * W, hW', + fun f => approxError_le_of_continuous hp hW' (fun g => ?_) f⟩ + have hgb : BddMeas (g : (Fin d → ℝ) → ℂ) := ⟨g.continuous.measurable, ‖g‖, g.norm_coe_le_norm⟩ + have hP := isCubePP_cubeProj r 0 hgb + refine ⟨cubeProj r 0 g, ⟨(hP.1.memLp p (cubeVol d)).toLp _, ?_, MemLp.coeFn_toLp _⟩, ?_⟩ + · change _ ∈ cubePPScheme p d r (2 ^ 0) + exact mem_cubePPScheme_two_pow.2 ⟨_, hP, MemLp.coeFn_toLp _⟩ + · exact eLpNorm_sub_cubeProj_le_of_coord hgb Fact.out hp fun i => hWb g.continuous i + +/-- **Jackson's inequality for piecewise polynomials on the cube at every level**: for +`1 ≤ p < ∞` and `r ≥ 1` there is `C_J < ∞` with `E_{2^k}(f)_p ≤ C_J ω_r(f, 2^(-k))_p` for every +`f ∈ L_p(Q)` and every `k ≥ 0`; level `0` is Whitney's inequality. -/ +theorem exists_approxError_cubePPScheme_le {r : ℕ} (hr : 1 ≤ r) (hp : p ≠ ∞) : + ∃ CJ : ℝ≥0∞, CJ ≠ ∞ ∧ ∀ (f : Lp ℂ p (cubeVol d)) (k : ℕ), + (cubePPScheme p d r).approxError f (2 ^ k) ≤ CJ * lpCubeModulus p r f k := by + obtain ⟨W, hW, hWb⟩ := exists_approxError_cubePPScheme_one_le (d := d) (p := p) hr hp le_rfl + refine ⟨W + cubeJacksonConst d r, + ENNReal.add_ne_top.2 ⟨hW, cubeJacksonConst_ne_top d r⟩, fun f k => ?_⟩ + rcases Nat.eq_zero_or_pos k with rfl | hk + · rw [pow_zero] + exact (hWb f).trans (mul_le_mul' le_self_add (lpCubeModulus_anti r f (Nat.zero_le 2))) + · exact (approxError_cubePPScheme_le hr hp f hk).trans (mul_le_mul' le_add_self le_rfl) + +end Cube diff --git a/LeanPool/FunctionSpaces/Domains/Cube/PiecewisePoly.lean b/LeanPool/FunctionSpaces/Domains/Cube/PiecewisePoly.lean new file mode 100644 index 0000000000..4e2b94f3a1 --- /dev/null +++ b/LeanPool/FunctionSpaces/Domains/Cube/PiecewisePoly.lean @@ -0,0 +1,349 @@ +/- +Copyright (c) 2026 Mario Ullrich. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Mario Ullrich +-/ +module + +public import LeanPool.FunctionSpaces.Domains.Cube.SlicewiseOperators +public import LeanPool.FunctionSpaces.Domains.Interval.LocalProjection + +/- +Modified for Lean Pool: module names and imports adapted. +-/ + +/-! +# Dyadic piecewise polynomials on the cube + +The local projection onto the piecewise polynomials of level `k` and degree `< r` on `[0, 1]` is a +finite-rank kernel operator (`Cube.ppKernel`, `Cube.ppKernel_apply`): with the monomials `b_l` and +their dual basis `d_l`, +`P_k g(t) = ∑_{n < 2^k} ∑_{l < r} (2^k ∫_{I_{k,n}} g b_l(2^k s - n) ds) 1_{I_{k,n}}(t) d_l(2^k t +- n)`. +The functions of level `k` are combinations of those of level `k + 1`, since `P_{k+1}` reproduces +the piecewise polynomials of level `k` (`Cube.ppKernel_rangeFn_eq_sum`). + +A function on the cube `Q = [0, 1]^d` is a **piecewise polynomial of level `k` and degree `< r` +in each variable** (`Cube.IsCubePP`) if it is bounded and measurable and has, in every coordinate +`i`, the form `∑_j c_j(x) φ_j(x_i)` of `P_k` with coefficients independent of `x_i`: on every +dyadic cube of level `k` it is a polynomial of degree `< r` in each variable separately. These +functions form subspaces `V_k^d` of `L_p(Q)` increasing in `k` (`Cube.cubePPSpace`) and the scheme +`Cube.cubePPScheme`. Applying `P_k` in all coordinates (`Cube.cubeProj`) maps bounded measurable +functions into `V_k^d` (`Cube.isCubePP_cubeProj`), and the slices of a function in `V_k^d` are +piecewise polynomials of level `k` on `[0, 1]` (`Cube.IsCubePP.exists_slice_eq_ppFun`). + +Since `P_k` reproduces the piecewise polynomials (`Cube.ppKernel_reproduces`), `V_k^d` is the +**tensor product** of the one-dimensional spaces: its functions are the combinations of products +`∏_i u_i(x_i)` of piecewise polynomials `u_i` of level `k` and degree `< r` on `[0, 1]` +(`Cube.isCubePP_iff_mem_span_prod_ppFun`, `Cube.isCubePP_iff_mem_span`). The definition through +slices is the one used in the proofs: it describes `V_k^d` without choosing a basis. +-/ + +@[expose] public section + +open MeasureTheory Set Polynomial +open scoped ENNReal + +namespace Cube + +open Interval + +/-! ### The local projection as a kernel operator -/ + +/-- The polynomials `b_l(2^k s - n)` and `d_l(2^k t - n)` on `I_{k,n}` are bounded by the bound +of the +bases on `[0, 1]`. -/ +theorem norm_indicator_polyFun_le (k : ℕ) (n : ℕ) (P : ℂ[X]) {B : ℝ≥0∞} (hB : B ≠ ∞) + (hPB : ∀ t ∈ Icc (0 : ℝ) 1, ‖polyFun P t‖ₑ ≤ B) (c : ℂ) (s : ℝ) : + ‖(dyadicIco k n).indicator (fun s => c * polyFun P (-(n : ℝ) + 2 ^ k * s)) s‖ ≤ + ‖c‖ * B.toReal := by + by_cases hs : s ∈ dyadicIco k n + · rw [indicator_of_mem hs, norm_mul] + refine mul_le_mul_of_nonneg_left ?_ (norm_nonneg c) + have ht : -(n : ℝ) + 2 ^ k * s ∈ Icc (0 : ℝ) 1 := by + rw [mem_dyadicIco] at hs + constructor <;> linarith [hs.1, hs.2] + have h := hPB _ ht + rw [← ofReal_norm] at h + exact (ENNReal.ofReal_le_iff_le_toReal hB).1 h + · rw [indicator_of_notMem hs, norm_zero] + positivity + +/-- The **local projection onto piecewise polynomials of level `k`** as a kernel operator, indexed +by `(n, l)`: `κ_{n,l}(s) = 1_{I_{k,n}}(s) 2^k b_l(2^k s - n)`, `φ_{n,l}(t) = 1_{I_{k,n}}(t) +d_l(2^k t - n)`. -/ +noncomputable def ppKernel (r k : ℕ) : KernelOp (Fin (2 ^ k) × Fin r) where + kernel j := (dyadicIco k j.1).indicator fun s => + (((2 : ℝ) ^ k : ℝ) : ℂ) * polyFun (monoBasis r j.2) (-(j.1 : ℝ) + 2 ^ k * s) + rangeFn j := (dyadicIco k j.1).indicator fun t => + (1 : ℂ) * polyFun (dualPoly r j.2) (-(j.1 : ℝ) + 2 ^ k * t) + bddMeas_kernel j := ⟨(measurable_const.mul ((measurable_polyFun _).comp + (by fun_prop))).indicator (measurableSet_dyadicIco _ _), _, + norm_indicator_polyFun_le k j.1 _ (basisBound_ne_top r) (fun t ht => enorm_monoBasis_le r + j.2 ht) + _⟩ + bddMeas_rangeFn j := ⟨(measurable_const.mul ((measurable_polyFun _).comp + (by fun_prop))).indicator (measurableSet_dyadicIco _ _), _, + norm_indicator_polyFun_le k j.1 _ (basisBound_ne_top r) (fun t ht => enorm_dualPoly_le r j.2 ht) + _⟩ + +/-- The coefficients of the kernel operator are the local coefficients. -/ +theorem ppKernel_coef (r k : ℕ) (g : ℝ → ℂ) (j : Fin (2 ^ k) × Fin r) : + (ppKernel r k).coef g j = locCoeff r k g j.1 j.2 := by + have hsub : dyadicIco k j.1 ⊆ Icc (0 : ℝ) 1 := + (dyadicIco_subset j.1.isLt).trans Ico_subset_Icc_self + have hfun : (fun s => g s * (ppKernel r k).kernel j s) = (dyadicIco k j.1).indicator + (fun s => (((2 : ℝ) ^ k : ℝ) : ℂ) * + (g s * polyFun (monoBasis r j.2) (-(j.1 : ℝ) + 2 ^ k * s))) := by + funext s + simp only [ppKernel] + by_cases hs : s ∈ dyadicIco k j.1 + · rw [indicator_of_mem hs, indicator_of_mem hs]; ring + · rw [indicator_of_notMem hs, indicator_of_notMem hs, mul_zero] + rw [KernelOp.coef, hfun, setIntegral_indicator (measurableSet_dyadicIco _ _), + Set.inter_eq_right.2 hsub, integral_const_mul, locCoeff] + +/-- **The kernel operator is the local projection**: `(ppKernel r k).apply g = P_k g`. -/ +theorem ppKernel_apply (r k : ℕ) (g : ℝ → ℂ) : + (ppKernel r k).apply g = ppFun k (locProj r k g) := by + funext t + simp only [KernelOp.apply, ppKernel_coef, Fintype.sum_prod_type, ppFun] + rw [← Fin.sum_univ_eq_sum_range] + refine Finset.sum_congr rfl fun n _ => ?_ + by_cases ht : t ∈ dyadicIco k n + · simp only [ppKernel, indicator_of_mem ht, one_mul] + rw [polyFun_locProj] + · simp only [ppKernel, indicator_of_notMem ht, mul_zero, Finset.sum_const_zero] + +/-- The kernel operator is bounded on `L_p[0, 1]` by the bound of the local projections. -/ +theorem eLpNorm_ppKernel_apply_le {p : ℝ≥0∞} (hp : 1 ≤ p) (hp' : p ≠ ∞) (r k : ℕ) {u : ℝ → ℂ} + (hu : Measurable u) : + eLpNorm ((ppKernel r k).apply u) p unitVol ≤ ppProjConst r * eLpNorm u p unitVol := by + rw [ppKernel_apply] + exact eLpNorm_ppFun_locProj_le hp hp' r k hu.aestronglyMeasurable + +/-- The local projection reproduces the piecewise polynomials of its level. -/ +theorem ppKernel_apply_ppFun {r k : ℕ} {Q : ℕ → ℂ[X]} (hQ : ∀ n, Q n ∈ degreeLT ℂ r) : + (ppKernel r k).apply (ppFun k Q) = ppFun k Q := by + rw [ppKernel_apply, ppFun_locProj_ppFun hQ] + +/-- Piecewise polynomials are bounded and measurable (`Interval.measurable_ppFun`, +`Interval.exists_norm_ppFun_le`). -/ +theorem bddMeas_ppFun (k : ℕ) (Q : ℕ → ℂ[X]) : BddMeas (ppFun k Q) := + ⟨measurable_ppFun k Q, exists_norm_ppFun_le k Q⟩ + +/-- **Lebesgue's inequality for the local projection**: for `u` integrable on `[0, 1]` and every +piecewise polynomial `S` of level `k` and degree `< r`, +`‖u - P_k u‖_{L_p[0,1]} ≤ (1 + C_r) ‖u - S‖_{L_p[0,1]}`. Since `P_k S = S`, the error is +`u - P_k u = (u - S) - P_k (u - S)`. -/ +theorem eLpNorm_sub_ppKernel_apply_le {p : ℝ≥0∞} (hp : 1 ≤ p) (hp' : p ≠ ∞) {r k : ℕ} + {u : ℝ → ℂ} (hu : Measurable u) (hui : IntegrableOn u (Icc (0 : ℝ) 1)) {Q : ℕ → ℂ[X]} + (hQ : ∀ n, Q n ∈ degreeLT ℂ r) : + eLpNorm (fun t => u t - (ppKernel r k).apply u t) p unitVol ≤ + (1 + ppProjConst r) * eLpNorm (fun t => u t - ppFun k Q t) p unitVol := by + have heq : (fun t => u t - (ppKernel r k).apply u t) = + (fun t => u t - ppFun k Q t) - (ppKernel r k).apply (fun s => u s - ppFun k Q s) := by + funext t + rw [Pi.sub_apply, KernelOp.apply_sub _ hui (integrableOn_ppFun k Q), ppKernel_apply_ppFun hQ] + ring + rw [heq, add_mul, one_mul] + exact (eLpNorm_sub_le hp).trans (add_le_add le_rfl + (eLpNorm_ppKernel_apply_le hp hp' r k (hu.sub (measurable_ppFun k Q)))) + +/-- The function `φ_{n,l}` of level `k` is the piecewise polynomial with the single piece +`d_l(2^k t - n)` on `I_{k,n}`. -/ +theorem ppKernel_rangeFn_eq_ppFun (r k : ℕ) (j : Fin (2 ^ k) × Fin r) : + (ppKernel r k).rangeFn j = ppFun k (fun m => if m = j.1 then + (dualPoly r j.2 : ℂ[X]).comp (C ((-(j.1 : ℝ) : ℝ) : ℂ) + C (((2 : ℝ) ^ k : ℝ) : ℂ) * X) + else 0) := by + funext t + simp only [ppKernel, ppFun] + rw [Finset.sum_eq_single (j.1 : ℕ) (fun m _ hm => by simp [hm, polyFun_zero]) + (fun h => absurd (Finset.mem_range.2 j.1.isLt) h)] + simp only [↓reduceIte, one_mul] + by_cases ht : t ∈ dyadicIco k j.1 + · rw [indicator_of_mem ht, indicator_of_mem ht, polyFun_comp_affine] + · rw [indicator_of_notMem ht, indicator_of_notMem ht] + +/-- **Refinement**: the functions of level `k` are combinations of those of level `k + 1`, +`φ^{(k)}_j = P_{k+1} φ^{(k)}_j = ∑_{j'} (∫_0^1 φ^{(k)}_j κ^{(k+1)}_{j'}) φ^{(k+1)}_{j'}`. -/ +theorem ppKernel_rangeFn_eq_sum (r k : ℕ) (j : Fin (2 ^ k) × Fin r) (t : ℝ) : + (ppKernel r k).rangeFn j t = ∑ j', (ppKernel r (k + 1)).coef ((ppKernel r k).rangeFn j) j' * + (ppKernel r (k + 1)).rangeFn j' t := by + set Q : ℕ → ℂ[X] := fun m => if m = j.1 then + (dualPoly r j.2 : ℂ[X]).comp (C ((-(j.1 : ℝ) : ℝ) : ℂ) + C (((2 : ℝ) ^ k : ℝ) : ℂ) * X) + else 0 + have hQ : ∀ m, Q m ∈ degreeLT ℂ r := fun m => by + simp only [Q] + split_ifs + · exact comp_affine_mem_degreeLT (dualPoly r j.2).2 _ _ + · exact Submodule.zero_mem _ + have h := ppKernel_rangeFn_eq_ppFun r k j + have hrep : (ppKernel r k).rangeFn j = (ppKernel r (k + 1)).apply ((ppKernel r k).rangeFn j) := by + rw [ppKernel_apply, h, ← ppFun_refine_eq k Q, ppFun_locProj_ppFun fun m => hQ (m / 2)] + exact congrFun hrep t + +/-! ### Piecewise polynomials on the cube -/ + +variable {d : ℕ} + +/-- A function on the cube is a **piecewise polynomial of level `k` and degree `< r` in each +variable**: bounded and measurable with the form of the local projection `P_k` in every +coordinate, so that on every dyadic cube of level `k` it is a polynomial of degree `< r` in each +variable separately. -/ +def IsCubePP (r k : ℕ) (g : (Fin d → ℝ) → ℂ) : Prop := + BddMeas g ∧ ∀ i, (ppKernel r k).IsForm i g + +/-- Piecewise polynomials of level `k` are piecewise polynomials of level `k + 1`. -/ +theorem IsCubePP.succ {r k : ℕ} {g : (Fin d → ℝ) → ℂ} (h : IsCubePP r k g) : + IsCubePP r (k + 1) g := + ⟨h.1, fun i => KernelOp.IsForm.refine (ppKernel r k) (h.2 i) _ (ppKernel_rangeFn_eq_sum r k)⟩ + +/-- Sums of piecewise polynomials. -/ +theorem IsCubePP.add {r k : ℕ} {f g : (Fin d → ℝ) → ℂ} (hf : IsCubePP r k f) + (hg : IsCubePP r k g) : IsCubePP r k (f + g) := + ⟨hf.1.add hg.1, fun i => (hf.2 i).add _ (hg.2 i)⟩ + +/-- Constant multiples of piecewise polynomials. -/ +theorem IsCubePP.const_mul {r k : ℕ} {g : (Fin d → ℝ) → ℂ} (hg : IsCubePP r k g) (a : ℂ) : + IsCubePP r k (fun x => a * g x) := + ⟨hg.1.const_mul a, fun i => (hg.2 i).const_mul _ a⟩ + +/-- The zero function is a piecewise polynomial. -/ +theorem isCubePP_zero (r k : ℕ) : IsCubePP (d := d) r k 0 := + ⟨bddMeas_zero, fun i => (ppKernel r k).isForm_zero i⟩ + +/-- **The slices of a piecewise polynomial on the cube** are piecewise polynomials of the same +level and degree on `[0, 1]`. -/ +theorem IsCubePP.exists_slice_eq_ppFun {r k : ℕ} {g : (Fin d → ℝ) → ℂ} (hg : IsCubePP r k g) + (i : Fin d) (x : Fin d → ℝ) : + ∃ Q : ℕ → ℂ[X], (∀ n, Q n ∈ degreeLT ℂ r) ∧ slice g x i = ppFun k Q := by + obtain ⟨a, ha⟩ := (hg.2 i).slice_eq _ x + refine ⟨fun m => ∑ l : Fin r, if h : m < 2 ^ k then a (⟨m, h⟩, l) • + (dualPoly r l : ℂ[X]).comp (C ((-(m : ℝ) : ℝ) : ℂ) + C (((2 : ℝ) ^ k : ℝ) : ℂ) * X) + else 0, fun m => Submodule.sum_mem _ fun l _ => ?_, ?_⟩ + · split_ifs + · exact Submodule.smul_mem _ _ (comp_affine_mem_degreeLT (dualPoly r l).2 _ _) + · exact Submodule.zero_mem _ + · rw [ha] + funext t + simp only [ppFun, Fintype.sum_prod_type] + rw [← Fin.sum_univ_eq_sum_range] + refine Finset.sum_congr rfl fun n _ => ?_ + by_cases ht : t ∈ dyadicIco k n + · rw [indicator_of_mem ht] + conv_rhs => rw [polyFun, eval_finsetSum] + refine Finset.sum_congr rfl fun l _ => ?_ + rw [dite_eq_left n.isLt, eval_smul, smul_eq_mul, ← polyFun, polyFun_comp_affine, Fin.eta] + simp only [ppKernel, indicator_of_mem ht, one_mul] + · simp only [ppKernel, indicator_of_notMem ht, mul_zero, Finset.sum_const_zero] + +variable {p : ℝ≥0∞} [Fact (1 ≤ p)] + +variable (p) in +/-- The space `V_k^d` of **piecewise polynomials of level `k` and degree `< r` in each variable** +in `L_p(Q)`. -/ +noncomputable def cubePPSpace (r k : ℕ) : Submodule ℝ (Lp ℂ p (cubeVol d)) where + carrier := {f | ∃ g, IsCubePP r k g ∧ (f : (Fin d → ℝ) → ℂ) =ᵐ[cubeVol d] g} + add_mem' := by + rintro f f' ⟨g, hg, hfg⟩ ⟨g', hg', hfg'⟩ + exact ⟨g + g', hg.add hg', (Lp.coeFn_add f f').trans (hfg.add hfg')⟩ + zero_mem' := ⟨0, isCubePP_zero r k, Lp.coeFn_zero ℂ p (cubeVol d)⟩ + smul_mem' := by + rintro c f ⟨g, hg, hfg⟩ + refine ⟨fun x => (c : ℂ) * g x, hg.const_mul c, ?_⟩ + filter_upwards [Lp.coeFn_smul c f, hfg] with x h1 h2 + rw [h1, Pi.smul_apply, h2, Complex.real_smul] + +omit [Fact (1 ≤ p)] in +/-- The spaces `V_k^d` increase with the level. -/ +theorem cubePPSpace_mono (r : ℕ) : Monotone (cubePPSpace (d := d) p r) := + monotone_nat_of_le_succ fun _ _ ⟨g, hg, hfg⟩ => ⟨g, hg.succ, hfg⟩ + +variable (p) in +/-- The **scheme of dyadic piecewise polynomials on the cube**: `{0}` at complexity `0` and +`V_{⌊log₂ n⌋}^d` at complexity `n ≥ 1`. -/ +noncomputable def cubePPScheme (d r : ℕ) : ApproximationScheme (Lp ℂ p (cubeVol d)) := + ApproximationScheme.ofMonotoneSubmodules (cubePPSpace p r) (cubePPSpace_mono r) + +/-- The approximants of complexity `2^k` are the piecewise polynomials of level `k`. -/ +theorem mem_cubePPScheme_two_pow {r k : ℕ} {g : Lp ℂ p (cubeVol d)} : + g ∈ cubePPScheme p d r (2 ^ k) ↔ g ∈ cubePPSpace p r k := + ApproximationScheme.mem_ofMonotoneSubmodules_two_pow + +/-- The scheme of piecewise polynomials on the cube is linear. -/ +theorem cubePPScheme_isLinear (r : ℕ) : (cubePPScheme p d r).IsLinear := + ApproximationScheme.isLinear_ofMonotoneSubmodules _ _ + +/-! ### The tensor projection -/ + +/-- The **tensor projection**: the local projection `P_k` applied in all coordinates, +`P_k^{(0)} ∘ ⋯ ∘ P_k^{(d-1)}`. -/ +noncomputable def cubeProj (r k : ℕ) (g : (Fin d → ℝ) → ℂ) : (Fin d → ℝ) → ℂ := + (ppKernel r k).foldSlicewise (List.finRange d) g + +/-- The tensor projection of a bounded measurable function is a piecewise polynomial on the +cube. -/ +theorem isCubePP_cubeProj (r k : ℕ) {g : (Fin d → ℝ) → ℂ} (hg : BddMeas g) : + IsCubePP r k (cubeProj r k g) := + ⟨(ppKernel r k).bddMeas_foldSlicewise _ hg, + fun i => (ppKernel r k).isForm_foldSlicewise _ hg (List.mem_finRange i)⟩ + +/-! ### Tensor products -/ + +omit [Fact (1 ≤ p)] in +/-- The local projection reproduces its functions `φ_{n,l}`. -/ +theorem ppKernel_reproduces (r k : ℕ) : (ppKernel r k).Reproduces := fun j => by + rw [ppKernel_rangeFn_eq_ppFun, ppKernel_apply_ppFun fun m => ?_] + split_ifs + · exact comp_affine_mem_degreeLT (dualPoly r j.2).2 _ _ + · exact Submodule.zero_mem _ + +omit [Fact (1 ≤ p)] in +/-- **Piecewise polynomials on the cube are tensor products**: `g` is a piecewise polynomial of +level `k` and degree `< r` in each variable iff it is a combination of the products +`∏_i φ_{j_i}(x_i)` of the functions `φ_{n,l}(t) = 1_{I_{k,n}}(t) d_l(2^k t - n)` of the local +projection. -/ +theorem isCubePP_iff_mem_span {r k : ℕ} (hr : 1 ≤ r) {g : (Fin d → ℝ) → ℂ} : + IsCubePP r k g ↔ g ∈ Submodule.span ℂ (Set.range fun j : Fin d → Fin (2 ^ k) × Fin r => + fun x => ∏ i, (ppKernel r k).rangeFn (j i) (x i)) := by + have : Nonempty (Fin (2 ^ k) × Fin r) := ⟨(⟨0, Nat.two_pow_pos k⟩, ⟨0, hr⟩)⟩ + exact ⟨fun h => (ppKernel r k).mem_span_prod_of_isForm (ppKernel_reproduces r k) h.1 h.2, + fun h => (ppKernel r k).isForm_of_mem_span_prod h⟩ + +omit [Fact (1 ≤ p)] in +/-- **Piecewise polynomials on the cube are the tensor products of those in one variable**: the +piecewise polynomials of level `k` and degree `< r` in each variable are the combinations of +products `∏_i u_i(x_i)` of piecewise polynomials `u_i` of level `k` and degree `< r` on +`[0, 1]`. -/ +theorem isCubePP_iff_mem_span_prod_ppFun {r k : ℕ} (hr : 1 ≤ r) {g : (Fin d → ℝ) → ℂ} : + IsCubePP r k g ↔ g ∈ Submodule.span ℂ {G | ∃ Q : Fin d → ℕ → ℂ[X], + (∀ i n, Q i n ∈ degreeLT ℂ r) ∧ G = fun x => ∏ i, ppFun k (Q i) (x i)} := by + rw [isCubePP_iff_mem_span hr] + constructor + · refine fun h => Submodule.span_mono ?_ h + rintro _ ⟨j, rfl⟩ + refine ⟨fun i m => if m = ((j i).1 : ℕ) then (dualPoly r (j i).2 : ℂ[X]).comp + (C ((-((j i).1 : ℝ) : ℝ) : ℂ) + C (((2 : ℝ) ^ k : ℝ) : ℂ) * X) else 0, + fun i n => ?_, ?_⟩ + · dsimp only + split_ifs + · exact comp_affine_mem_degreeLT (dualPoly r (j i).2).2 _ _ + · exact Submodule.zero_mem _ + · funext x + exact Finset.prod_congr rfl fun i _ => congrFun (ppKernel_rangeFn_eq_ppFun r k (j i)) (x i) + · refine fun h => (Submodule.span_le.2 ?_) h + rintro _ ⟨Q, hQ, rfl⟩ + have hexp : ∀ i (t : ℝ), ppFun k (Q i) t = + ∑ m, (ppKernel r k).coef (ppFun k (Q i)) m * (ppKernel r k).rangeFn m t := fun i t => + (congrFun (ppKernel_apply_ppFun (r := r) (k := k) (hQ i)) t).symm + have hG : (fun x : Fin d → ℝ => ∏ i, ppFun k (Q i) (x i)) = + ∑ j : Fin d → Fin (2 ^ k) × Fin r, (∏ i, (ppKernel r k).coef (ppFun k (Q i)) (j i)) • + fun x : Fin d → ℝ => ∏ i, (ppKernel r k).rangeFn (j i) (x i) := by + funext x + simp only [hexp, Finset.prod_univ_sum, Fintype.piFinset_univ, Finset.sum_apply, + Pi.smul_apply, smul_eq_mul, Finset.prod_mul_distrib] + rw [hG] + exact Submodule.sum_mem _ fun j _ => Submodule.smul_mem _ _ (Submodule.subset_span ⟨j, rfl⟩) + +end Cube diff --git a/LeanPool/FunctionSpaces/Domains/Cube/SlicewiseOperators.lean b/LeanPool/FunctionSpaces/Domains/Cube/SlicewiseOperators.lean new file mode 100644 index 0000000000..5545e0d1de --- /dev/null +++ b/LeanPool/FunctionSpaces/Domains/Cube/SlicewiseOperators.lean @@ -0,0 +1,628 @@ +/- +Copyright (c) 2026 Mario Ullrich. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Mario Ullrich +-/ +module + +public import LeanPool.FunctionSpaces.Domains.Cube.Basic +public import Mathlib.MeasureTheory.Integral.Prod + +/- +Modified for Lean Pool: module names and imports adapted. +-/ + +/-! +# Finite-rank kernel operators and their action on slices + +A **finite-rank kernel operator** on functions on `[0, 1]` is `T g = ∑_j (∫_0^1 g κ_j) φ_j`, +with finitely many bounded measurable kernels `κ_j` and functions `φ_j` (`Cube.KernelOp`). The +local projections onto piecewise polynomials and the spline quasi-interpolants are of this form. + +On the cube `T` acts on the slices in a coordinate `i`: `T^{(i)} g(x) = T(slice g x i)(x_i)` +(`Cube.KernelOp.slicewise`). The result has the **form of `T` in coordinate `i`**, +`g(x) = ∑_j c_j(x) φ_j(x_i)` with bounded measurable coefficients `c_j` that do not depend on +`x_i` (`Cube.KernelOp.IsForm`, `Cube.KernelOp.isForm_slicewise`), and the action of a kernel +operator in another coordinate keeps this form (`Cube.KernelOp.IsForm.slicewise`): it only +integrates the coefficients, by linearity of the integral over finite sums. Applying `T` in all +coordinates one after another (`Cube.KernelOp.foldSlicewise`) therefore gives a function with the +form of `T` in every coordinate (`Cube.KernelOp.isForm_foldSlicewise`). This replaces +multidimensional Fubini arguments in the construction of tensor approximants. + +If `T` reproduces its functions, `T φ_j = φ_j` (`Cube.KernelOp.Reproduces`), then the bounded +measurable functions with the form of `T` in every coordinate are exactly the combinations of the +tensor products `∏_i φ_{j_i}(x_i)` (`Cube.KernelOp.mem_span_prod_of_isForm`, +`Cube.KernelOp.isForm_of_mem_span_prod`). The proof expands the coefficients one coordinate at a +time (`Cube.KernelOp.partialTensor_subset_span`): a form in coordinate `i` is reproduced by +`T^{(i)}` (`Cube.KernelOp.IsForm.slicewise_self`), which writes its coefficient as a combination of +the `φ_j(x_i)`. + +On `L_p(Q)` the slicewise action inherits the bounds of `T` on `L_p[0, 1]` slice by slice +(`Cube.KernelOp.eLpNorm_slicewise_le`), and the slices of `f - T^{(i)} f` are the errors of `T` on +the slices of `f` (`Cube.slice_sub_slicewise`). By linearity, the error of the action in all +coordinates telescopes into the errors in the single coordinates +(`Cube.KernelOp.eLpNorm_sub_foldSlicewise_le`). +-/ + +@[expose] public section + +open MeasureTheory Set +open scoped ENNReal + +namespace Cube + +open Interval + +/-- A function is **bounded and measurable**. -/ +def BddMeas {α : Type*} [MeasurableSpace α] (g : α → ℂ) : Prop := + Measurable g ∧ ∃ M : ℝ, ∀ x, ‖g x‖ ≤ M + +/-- Bounded measurable functions are closed under sums. -/ +theorem BddMeas.add {α : Type*} [MeasurableSpace α] {f g : α → ℂ} (hf : BddMeas f) + (hg : BddMeas g) : BddMeas (f + g) := by + obtain ⟨hfm, M, hM⟩ := hf + obtain ⟨hgm, N, hN⟩ := hg + exact ⟨hfm.add hgm, M + N, fun x => (norm_add_le _ _).trans (add_le_add (hM x) (hN x))⟩ + +/-- Bounded measurable functions are closed under constant multiples. -/ +theorem BddMeas.const_mul {α : Type*} [MeasurableSpace α] {f : α → ℂ} (hf : BddMeas f) (c : ℂ) : + BddMeas (fun x => c * f x) := by + obtain ⟨hfm, M, hM⟩ := hf + exact ⟨measurable_const.mul hfm, ‖c‖ * M, fun x => by + rw [norm_mul]; exact mul_le_mul_of_nonneg_left (hM x) (norm_nonneg c)⟩ + +/-- The zero function is bounded and measurable. -/ +theorem bddMeas_zero {α : Type*} [MeasurableSpace α] : BddMeas (0 : α → ℂ) := + ⟨measurable_const, 0, fun _ => by simp⟩ + +/-- Finite sums of bounded measurable functions are bounded and measurable. -/ +theorem bddMeas_sum {α ι : Type*} [MeasurableSpace α] (s : Finset ι) {f : ι → α → ℂ} + (hf : ∀ j ∈ s, BddMeas (f j)) : BddMeas (fun x => ∑ j ∈ s, f j x) := by + classical + induction s using Finset.induction_on with + | empty => exact ⟨measurable_const, 0, fun _ => by simp⟩ + | insert j s hj ih => + simp only [Finset.sum_insert hj] + exact (hf j (Finset.mem_insert_self j s)).add (ih fun j' hj' => hf j' + (Finset.mem_insert_of_mem hj')) + +/-- Products `∏_{i ∈ s} u_i(x_i)` of bounded measurable functions of single coordinates are +bounded and measurable. -/ +theorem bddMeas_prod_coord {d : ℕ} (s : Finset (Fin d)) {u : Fin d → ℝ → ℂ} + (hu : ∀ i ∈ s, BddMeas (u i)) : BddMeas (fun x : Fin d → ℝ => ∏ i ∈ s, u i (x i)) := by + classical + induction s using Finset.induction_on with + | empty => exact ⟨measurable_const, 1, fun _ => by simp⟩ + | insert a s ha ih => + simp only [Finset.prod_insert ha] + obtain ⟨hm, M, hM⟩ := hu a (Finset.mem_insert_self a s) + obtain ⟨hm', M', hM'⟩ := ih fun i hi => hu i (Finset.mem_insert_of_mem hi) + refine ⟨(hm.comp (measurable_pi_apply a)).mul hm', M * M', fun x => ?_⟩ + rw [norm_mul] + exact mul_le_mul (hM (x a)) (hM' x) (norm_nonneg _) ((norm_nonneg (u a (x a))).trans (hM (x a))) + +/-- A bounded measurable function is integrable on `[0, 1]`. -/ +theorem BddMeas.integrableOn_Icc {g : ℝ → ℂ} (hg : BddMeas g) : + IntegrableOn g (Icc (0 : ℝ) 1) := by + obtain ⟨hgm, M, hM⟩ := hg + exact IntegrableOn.of_bound (by simp) hgm.aestronglyMeasurable M + (Filter.Eventually.of_forall hM) + +/-- A bounded measurable function lies in every `L_p` of a finite measure. -/ +theorem BddMeas.memLp {α : Type*} [MeasurableSpace α] {g : α → ℂ} (hg : BddMeas g) + (p : ℝ≥0∞) (μ : Measure α) [IsFiniteMeasure μ] : MemLp g p μ := by + obtain ⟨hgm, M, hM⟩ := hg + exact MemLp.of_bound hgm.aestronglyMeasurable M (Filter.Eventually.of_forall hM) + +/-- The slices of a bounded measurable function are bounded and measurable. -/ +theorem BddMeas.slice {d : ℕ} {g : (Fin d → ℝ) → ℂ} (hg : BddMeas g) (x : Fin d → ℝ) + (i : Fin d) : BddMeas (slice g x i) := by + obtain ⟨hgm, M, hM⟩ := hg + exact ⟨measurable_slice hgm x i, M, fun _ => hM _⟩ + +/-- A **finite-rank kernel operator** on functions on `[0, 1]`: `T g = ∑_j (∫_0^1 g κ_j) φ_j` +with bounded measurable kernels `κ_j` and functions `φ_j`. -/ +structure KernelOp (ι : Type*) [Fintype ι] where + /-- The kernels of the coefficients. -/ + kernel : ι → ℝ → ℂ + /-- The functions of the range. -/ + rangeFn : ι → ℝ → ℂ + bddMeas_kernel : ∀ j, BddMeas (kernel j) + bddMeas_rangeFn : ∀ j, BddMeas (rangeFn j) + +namespace KernelOp + +variable {ι : Type*} [Fintype ι] (T : KernelOp ι) + +/-- The coefficient `∫_0^1 g κ_j`. -/ +noncomputable def coef (g : ℝ → ℂ) (j : ι) : ℂ := ∫ s in Icc (0 : ℝ) 1, g s * T.kernel j s + +/-- The operator `T g = ∑_j (∫_0^1 g κ_j) φ_j`. -/ +noncomputable def apply (g : ℝ → ℂ) (t : ℝ) : ℂ := ∑ j, T.coef g j * T.rangeFn j t + +/-- The products `g κ_j` of a function `g` integrable on `[0, 1]` are integrable on `[0, 1]`. -/ +theorem integrableOn_mul_kernel {g : ℝ → ℂ} (hg : IntegrableOn g (Icc (0 : ℝ) 1)) (j : ι) : + IntegrableOn (fun s => g s * T.kernel j s) (Icc (0 : ℝ) 1) := + hg.mul_bdd (c := (T.bddMeas_kernel j).2.choose) (T.bddMeas_kernel j).1.aestronglyMeasurable + (Filter.Eventually.of_forall fun s => (T.bddMeas_kernel j).2.choose_spec s) + +/-- The coefficients are additive on functions integrable on `[0, 1]`. -/ +theorem coef_add {g h : ℝ → ℂ} (hg : IntegrableOn g (Icc (0 : ℝ) 1)) + (hh : IntegrableOn h (Icc (0 : ℝ) 1)) (j : ι) : + T.coef (fun s => g s + h s) j = T.coef g j + T.coef h j := by + simp only [coef, add_mul] + exact integral_add (T.integrableOn_mul_kernel hg j) (T.integrableOn_mul_kernel hh j) + +/-- The coefficients of a difference of functions integrable on `[0, 1]`. -/ +theorem coef_sub {g h : ℝ → ℂ} (hg : IntegrableOn g (Icc (0 : ℝ) 1)) + (hh : IntegrableOn h (Icc (0 : ℝ) 1)) (j : ι) : + T.coef (fun s => g s - h s) j = T.coef g j - T.coef h j := by + simp only [coef, sub_mul] + exact integral_sub (T.integrableOn_mul_kernel hg j) (T.integrableOn_mul_kernel hh j) + +/-- The coefficients are homogeneous. -/ +theorem coef_const_mul (c : ℂ) (g : ℝ → ℂ) (j : ι) : + T.coef (fun s => c * g s) j = c * T.coef g j := by + simp only [coef, mul_assoc] + exact integral_const_mul c _ + +/-- The coefficients of finite sums of functions integrable on `[0, 1]`. -/ +theorem coef_sum {κι : Type*} (s : Finset κι) {g : κι → ℝ → ℂ} + (hg : ∀ a ∈ s, IntegrableOn (g a) (Icc (0 : ℝ) 1)) (j : ι) : + T.coef (fun t => ∑ a ∈ s, g a t) j = ∑ a ∈ s, T.coef (g a) j := by + simp only [coef, Finset.sum_mul] + exact integral_finsetSum _ fun a ha => T.integrableOn_mul_kernel (hg a ha) j + +/-- **Kernel operators are linear** on functions integrable on `[0, 1]`: +`T(g - h) = T g - T h`. -/ +theorem apply_sub {g h : ℝ → ℂ} (hg : IntegrableOn g (Icc (0 : ℝ) 1)) + (hh : IntegrableOn h (Icc (0 : ℝ) 1)) (t : ℝ) : + T.apply (fun s => g s - h s) t = T.apply g t - T.apply h t := by + simp only [apply, T.coef_sub hg hh, sub_mul, Finset.sum_sub_distrib] + +/-- `|∫_0^1 g κ_j| ≤ M B` for `|g| ≤ M` and `|κ_j| ≤ B`. -/ +theorem norm_coef_le {g : ℝ → ℂ} {M : ℝ} (hM : ∀ s, ‖g s‖ ≤ M) (j : ι) : + ‖T.coef g j‖ ≤ M * (T.bddMeas_kernel j).2.choose := by + have h := norm_setIntegral_le_of_norm_le_const (μ := volume) (s := Icc (0 : ℝ) 1) + (f := fun s => g s * T.kernel j s) (C := M * (T.bddMeas_kernel j).2.choose) (by simp) fun s + _ => by + rw [norm_mul] + exact mul_le_mul (hM s) ((T.bddMeas_kernel j).2.choose_spec s) (norm_nonneg _) + ((norm_nonneg _).trans (hM s)) + rw [coef] + simpa [Real.volume_real_Icc] using h + +/-! ### The slicewise action -/ + +variable {d : ℕ} + +/-- The **slicewise action in coordinate `i`**: `T^{(i)} g(x) = T(slice g x i)(x_i)`. -/ +noncomputable def slicewise (i : Fin d) (g : (Fin d → ℝ) → ℂ) (x : Fin d → ℝ) : ℂ := + T.apply (slice g x i) (x i) + +/-- The slicewise action as a sum: `T^{(i)} g(x) = ∑_j (∫_0^1 g(x with s in place i) κ_j(s) ds) +φ_j(x_i)`. -/ +theorem slicewise_eq (i : Fin d) (g : (Fin d → ℝ) → ℂ) (x : Fin d → ℝ) : + T.slicewise i g x = ∑ j, T.coef (slice g x i) j * T.rangeFn j (x i) := rfl + +/-- The slices of `T^{(i)} g` in coordinate `i` are the images of the slices under `T`. -/ +theorem slice_slicewise (i : Fin d) (g : (Fin d → ℝ) → ℂ) (x : Fin d → ℝ) : + slice (T.slicewise i g) x i = T.apply (slice g x i) := by + funext t + simp only [slice, slicewise] + rw [slice_update, Function.update_self] + +/-- The coefficients of the slices are measurable in the point. -/ +theorem measurable_coef_slice {g : (Fin d → ℝ) → ℂ} (hg : Measurable g) (i : Fin d) (j : ι) : + Measurable fun x => T.coef (slice g x i) j := by + have h : StronglyMeasurable (Function.uncurry fun (x : Fin d → ℝ) (s : ℝ) => + slice g x i s * T.kernel j s) := + ((measurable_slice_uncurry hg i).mul ((T.bddMeas_kernel j).1.comp + measurable_snd)).stronglyMeasurable + exact (h.integral_prod_right (ν := volume.restrict (Icc (0 : ℝ) 1))).measurable + +/-- The slicewise action of a measurable function is measurable. -/ +theorem measurable_slicewise {g : (Fin d → ℝ) → ℂ} (hg : Measurable g) (i : Fin d) : + Measurable (T.slicewise i g) := + Finset.measurable_sum _ fun j _ => (T.measurable_coef_slice hg i j).mul + ((T.bddMeas_rangeFn j).1.comp (measurable_pi_apply i)) + +/-- The slicewise action keeps functions bounded and measurable. -/ +theorem bddMeas_slicewise {g : (Fin d → ℝ) → ℂ} (hg : BddMeas g) (i : Fin d) : + BddMeas (T.slicewise i g) := by + obtain ⟨hgm, M, hM⟩ := hg + refine ⟨T.measurable_slicewise hgm i, ∑ j, M * (T.bddMeas_kernel j).2.choose * + (T.bddMeas_rangeFn j).2.choose, fun x => ?_⟩ + rw [slicewise_eq] + refine (norm_sum_le _ _).trans (Finset.sum_le_sum fun j _ => ?_) + rw [norm_mul] + exact mul_le_mul (T.norm_coef_le (g := slice g x i) (fun s => hM _) j) + ((T.bddMeas_rangeFn j).2.choose_spec _) (norm_nonneg _) + ((norm_nonneg _).trans (T.norm_coef_le (g := slice g x i) (fun s => hM _) j)) + +/-- **The slicewise action is linear** on bounded measurable functions. -/ +theorem slicewise_sub {g h : (Fin d → ℝ) → ℂ} (hg : BddMeas g) (hh : BddMeas h) (i : Fin d) + (x : Fin d → ℝ) : + T.slicewise i (fun y => g y - h y) x = T.slicewise i g x - T.slicewise i h x := + T.apply_sub (hg.slice x i).integrableOn_Icc (hh.slice x i).integrableOn_Icc (x i) + +/-! ### The form of an operator in a coordinate -/ + +/-- `g` has the **form of `T` in coordinate `i`**: `g(x) = ∑_j c_j(x) φ_j(x_i)` with bounded +measurable coefficients `c_j` that do not depend on `x_i`. -/ +def IsForm (i : Fin d) (g : (Fin d → ℝ) → ℂ) : Prop := + ∃ c : ι → (Fin d → ℝ) → ℂ, (∀ j, BddMeas (c j)) ∧ + (∀ j x t, c j (Function.update x i t) = c j x) ∧ ∀ x, g x = ∑ j, c j x * T.rangeFn j (x i) + +/-- **The slicewise action produces the form**: `T^{(i)} g` has the form of `T` in coordinate `i` +for bounded measurable `g`, with the coefficients `c_j(x) = ∫_0^1 g(x with s in place i) κ_j`. -/ +theorem isForm_slicewise {g : (Fin d → ℝ) → ℂ} (hg : BddMeas g) (i : Fin d) : + T.IsForm i (T.slicewise i g) := by + obtain ⟨hgm, M, hM⟩ := hg + refine ⟨fun j x => T.coef (slice g x i) j, fun j => ⟨T.measurable_coef_slice hgm i j, + M * (T.bddMeas_kernel j).2.choose, fun x => T.norm_coef_le (g := slice g x i) (fun s => hM + _) j⟩, + fun j x t => by simp only [slice_update], fun x => rfl⟩ + +/-- The slices of a function of the form of `T` in coordinate `i` are combinations of the `φ_j`. -/ +theorem IsForm.slice_eq {i : Fin d} {g : (Fin d → ℝ) → ℂ} (hg : T.IsForm i g) + (x : Fin d → ℝ) : ∃ a : ι → ℂ, slice g x i = fun t => ∑ j, a j * T.rangeFn j t := by + obtain ⟨c, -, hci, hgc⟩ := hg + refine ⟨fun j => c j x, funext fun t => ?_⟩ + simp only [slice, hgc, hci, Function.update_self] + +/-- **The form is kept by the action in another coordinate**: if `g` has the form of `T` in +coordinate `i` and `j ≠ i`, then `S^{(j)} g` has the form of `T` in coordinate `i`, with the +coefficients `S^{(j)} c_a`. -/ +theorem IsForm.slicewise {κι : Type*} [Fintype κι] (S : KernelOp κι) {i j : Fin d} (hij : i ≠ j) + {g : (Fin d → ℝ) → ℂ} (hg : T.IsForm i g) : T.IsForm i (S.slicewise j g) := by + obtain ⟨c, hcb, hci, hgc⟩ := hg + refine ⟨fun a => S.slicewise j (c a), fun a => S.bddMeas_slicewise (hcb a) j, + fun a x t => ?_, fun x => ?_⟩ + · have hs : slice (c a) (Function.update x i t) j = slice (c a) x j := by + funext s + simp only [slice] + rw [Function.update_comm hij, hci] + simp only [KernelOp.slicewise, hs, Function.update_of_ne hij.symm] + · have hslice : slice g x j = fun s => ∑ a, c a (Function.update x j s) * T.rangeFn a (x i) := by + funext s + simp only [slice, hgc, Function.update_of_ne hij] + rw [KernelOp.slicewise_eq, hslice] + have hcoef : ∀ b, S.coef (fun s => ∑ a, c a (Function.update x j s) * T.rangeFn a (x i)) b = + ∑ a, S.coef (fun s => c a (Function.update x j s)) b * T.rangeFn a (x i) := fun b => by + have hb : ∀ a ∈ (Finset.univ : Finset ι), + BddMeas (fun s => c a (Function.update x j s) * T.rangeFn a (x i)) := fun a _ => by + obtain ⟨hcm, M, hM⟩ := hcb a + exact ⟨(hcm.comp (measurable_update x)).mul measurable_const, M * ‖T.rangeFn a (x i)‖, + fun s => by rw [norm_mul]; exact mul_le_mul_of_nonneg_right (hM _) (norm_nonneg _)⟩ + rw [S.coef_sum _ fun a ha => (hb a ha).integrableOn_Icc] + refine Finset.sum_congr rfl fun a _ => ?_ + simp only [mul_comm _ (T.rangeFn a (x i))] + rw [S.coef_const_mul] + simp only [hcoef, Finset.sum_mul] + rw [Finset.sum_comm] + refine Finset.sum_congr rfl fun a _ => ?_ + rw [KernelOp.slicewise_eq, Finset.sum_mul] + refine Finset.sum_congr rfl fun b _ => ?_ + rw [show slice (c a) x j = fun s => c a (Function.update x j s) from rfl] + ring + +/-- Functions of the form of `T` in a coordinate form a linear space: sums. -/ +theorem IsForm.add {i : Fin d} {f g : (Fin d → ℝ) → ℂ} (hf : T.IsForm i f) (hg : T.IsForm i g) : + T.IsForm i (f + g) := by + obtain ⟨c, hcb, hci, hfc⟩ := hf + obtain ⟨c', hcb', hci', hgc⟩ := hg + refine ⟨fun j => c j + c' j, fun j => (hcb j).add (hcb' j), fun j x t => by + simp only [Pi.add_apply, hci, hci'], fun x => ?_⟩ + simp only [Pi.add_apply, hfc, hgc, add_mul, Finset.sum_add_distrib] + +/-- Functions of the form of `T` in a coordinate form a linear space: constant multiples. -/ +theorem IsForm.const_mul {i : Fin d} {g : (Fin d → ℝ) → ℂ} (hg : T.IsForm i g) (a : ℂ) : + T.IsForm i (fun x => a * g x) := by + obtain ⟨c, hcb, hci, hgc⟩ := hg + refine ⟨fun j x => a * c j x, fun j => (hcb j).const_mul a, fun j x t => by + simp only [hci], fun x => ?_⟩ + simp only [hgc, Finset.mul_sum, mul_assoc] + +/-- The zero function has the form of every operator. -/ +theorem isForm_zero (i : Fin d) : T.IsForm i 0 := + ⟨fun _ => 0, fun _ => bddMeas_zero, fun _ _ _ => rfl, fun _ => by simp⟩ + +/-- Functions equal everywhere have the same forms. -/ +theorem IsForm.congr {i : Fin d} {f g : (Fin d → ℝ) → ℂ} (hf : T.IsForm i f) (hfg : f = g) : + T.IsForm i g := hfg ▸ hf + +/-- **Refinement of forms**: if every `φ_j` of `T` is a combination of the `φ'_{j'}` of `T'`, +then the form of `T` in a coordinate is a form of `T'`. -/ +theorem IsForm.refine {κι : Type*} [Fintype κι] {T' : KernelOp κι} {i : Fin d} + {g : (Fin d → ℝ) → ℂ} (hg : T.IsForm i g) (M : ι → κι → ℂ) + (hM : ∀ j t, T.rangeFn j t = ∑ j', M j j' * T'.rangeFn j' t) : T'.IsForm i g := by + obtain ⟨c, hcb, hci, hgc⟩ := hg + refine ⟨fun j' x => ∑ j, M j j' * c j x, fun j' => bddMeas_sum _ fun j _ => + (hcb j).const_mul _, fun j' x t => by simp only [hci], fun x => ?_⟩ + rw [hgc] + simp only [hM, Finset.mul_sum, Finset.sum_mul] + rw [Finset.sum_comm] + refine Finset.sum_congr rfl fun j' _ => Finset.sum_congr rfl fun j _ => ?_ + ring + +/-! ### Tensor products -/ + +/-- A kernel operator **reproduces its functions** if `T φ_m = φ_m` for every `m`. -/ +def Reproduces : Prop := ∀ m, T.apply (T.rangeFn m) = T.rangeFn m + +/-- A reproducing operator is the identity on the combinations of its functions. -/ +theorem Reproduces.apply_sum (hT : T.Reproduces) (a : ι → ℂ) (t : ℝ) : + T.apply (fun s => ∑ m, a m * T.rangeFn m s) t = ∑ m, a m * T.rangeFn m t := by + have hcoef : ∀ j, T.coef (fun s => ∑ m, a m * T.rangeFn m s) j = + ∑ m, a m * T.coef (T.rangeFn m) j := fun j => by + rw [T.coef_sum (g := fun m s => a m * T.rangeFn m s) _ + fun m _ => ((T.bddMeas_rangeFn m).const_mul (a m)).integrableOn_Icc] + exact Finset.sum_congr rfl fun m _ => T.coef_const_mul _ _ _ + simp only [apply, hcoef, Finset.sum_mul] + rw [Finset.sum_comm] + refine Finset.sum_congr rfl fun m _ => ?_ + have h := congrFun (hT m) t + simp only [apply] at h + rw [← h, Finset.mul_sum] + exact Finset.sum_congr rfl fun j _ => by ring + +/-- **A reproducing operator acts as the identity on its forms**: `T^{(i)} g = g` if `g` has +the form of `T` in coordinate `i`. -/ +theorem IsForm.slicewise_self (hT : T.Reproduces) {i : Fin d} {g : (Fin d → ℝ) → ℂ} + (hg : T.IsForm i g) : T.slicewise i g = g := by + funext x + obtain ⟨a, ha⟩ := KernelOp.IsForm.slice_eq T hg x + rw [KernelOp.slicewise, ha, KernelOp.Reproduces.apply_sum T hT a (x i)] + have h := congrFun ha (x i) + simp only [slice, Function.update_eq_self] at h + exact h.symm + +/-- **The coefficients of slices keep the forms in other coordinates**: if `g` has the form of +`T` in coordinate `i` and `j ≠ i`, then `x ↦ ∫_0^1 g(x with s in place j) κ'_m(s) ds` has the +form of `T` in coordinate `i`. -/ +theorem IsForm.coef_slice {κι : Type*} [Fintype κι] (S : KernelOp κι) {i j : Fin d} + (hij : i ≠ j) {g : (Fin d → ℝ) → ℂ} (hg : T.IsForm i g) (m : κι) : + T.IsForm i (fun x => S.coef (slice g x j) m) := by + obtain ⟨c, hcb, hci, hgc⟩ := hg + refine ⟨fun a x => S.coef (slice (c a) x j) m, fun a => ?_, fun a x t => ?_, fun x => ?_⟩ + · obtain ⟨hcm, M, hM⟩ := hcb a + exact ⟨S.measurable_coef_slice hcm j m, M * (S.bddMeas_kernel m).2.choose, + fun x => S.norm_coef_le (g := slice (c a) x j) (fun s => hM _) m⟩ + · have hs : slice (c a) (Function.update x i t) j = slice (c a) x j := by + funext s + simp only [slice] + rw [Function.update_comm hij, hci] + simp only [hs] + · change S.coef (slice g x j) m = ∑ a, S.coef (slice (c a) x j) m * T.rangeFn a (x i) + have hslice : slice g x j = fun s => ∑ a, c a (Function.update x j s) * T.rangeFn a (x i) := by + funext s + simp only [slice, hgc, Function.update_of_ne hij] + rw [hslice] + have hb : ∀ a ∈ (Finset.univ : Finset ι), IntegrableOn + (fun s => c a (Function.update x j s) * T.rangeFn a (x i)) (Icc (0 : ℝ) 1) := fun a _ => by + obtain ⟨hcm, M, hM⟩ := hcb a + exact BddMeas.integrableOn_Icc ⟨(hcm.comp (measurable_update x)).mul measurable_const, + M * ‖T.rangeFn a (x i)‖, fun s => by + rw [norm_mul]; exact mul_le_mul_of_nonneg_right (hM _) (norm_nonneg _)⟩ + rw [S.coef_sum (g := fun a s => c a (Function.update x j s) * T.rangeFn a (x i)) _ hb] + refine Finset.sum_congr rfl fun a _ => ?_ + simp only [mul_comm _ (T.rangeFn a (x i))] + rw [S.coef_const_mul] + rfl + +/-- The **partial tensor products** for a set `S` of coordinates: `c(x) ∏_{i ∈ S} φ_{j_i}(x_i)` +with `c` bounded and measurable, independent of the coordinates in `S`, and with the form of `T` +in every coordinate outside `S`. -/ +def partialTensor (S : Finset (Fin d)) : Set ((Fin d → ℝ) → ℂ) := + {G | ∃ (c : (Fin d → ℝ) → ℂ) (j : Fin d → ι), BddMeas c ∧ + (∀ x, ∀ i ∈ S, ∀ t, c (Function.update x i t) = c x) ∧ (∀ i ∉ S, T.IsForm i c) ∧ + G = fun x => c x * ∏ i ∈ S, T.rangeFn (j i) (x i)} + +/-- **One more coordinate**: for a reproducing operator, every partial tensor product for `S` is a +combination of partial tensor products for `S ∪ {i₀}`, by expanding its coefficient in +coordinate `i₀`. -/ +theorem partialTensor_subset_span (hT : T.Reproduces) {S : Finset (Fin d)} {i₀ : Fin d} + (hi₀ : i₀ ∉ S) : T.partialTensor S ⊆ Submodule.span ℂ (T.partialTensor (insert i₀ S)) := by + classical + rintro G ⟨c, j, hcb, hci, hcf, rfl⟩ + have hc : ∀ x, c x = ∑ m, T.coef (slice c x i₀) m * T.rangeFn m (x i₀) := fun x => + (congrFun (KernelOp.IsForm.slicewise_self T hT (hcf i₀ hi₀)) x).symm + have hG : (fun x => c x * ∏ i ∈ S, T.rangeFn (j i) (x i)) = ∑ m, fun x => + T.coef (slice c x i₀) m * + ∏ i ∈ insert i₀ S, T.rangeFn (Function.update j i₀ m i) (x i) := by + funext x + rw [Finset.sum_apply, hc x, Finset.sum_mul] + refine Finset.sum_congr rfl fun m _ => ?_ + rw [Finset.prod_insert hi₀, Function.update_self] + have hprod : ∏ i ∈ S, T.rangeFn (Function.update j i₀ m i) (x i) = + ∏ i ∈ S, T.rangeFn (j i) (x i) := + Finset.prod_congr rfl fun i hi => by + rw [Function.update_of_ne (ne_of_mem_of_not_mem hi hi₀)] + rw [hprod] + ring + rw [hG] + refine Submodule.sum_mem _ fun m _ => Submodule.subset_span + ⟨fun x => T.coef (slice c x i₀) m, Function.update j i₀ m, ?_, ?_, ?_, rfl⟩ + · obtain ⟨hcm, M, hM⟩ := hcb + exact ⟨T.measurable_coef_slice hcm i₀ m, M * (T.bddMeas_kernel m).2.choose, + fun x => T.norm_coef_le (g := slice c x i₀) (fun s => hM _) m⟩ + · intro x i hi t + rcases Finset.mem_insert.1 hi with rfl | hi' + · simp only [slice_update] + · have hs : slice c (Function.update x i t) i₀ = slice c x i₀ := by + funext s + simp only [slice] + rw [Function.update_comm (ne_of_mem_of_not_mem hi' hi₀), hci _ i hi'] + simp only [hs] + · intro i hi + have hi' : i ∉ S := fun h => hi (Finset.mem_insert_of_mem h) + have hne : i ≠ i₀ := fun h => hi (h ▸ Finset.mem_insert_self i₀ S) + exact KernelOp.IsForm.coef_slice T T hne (hcf i hi') m + +/-- **Forms in every coordinate are tensor products**: for a reproducing operator, a bounded +measurable function with the form of `T` in every coordinate is a combination of the products +`∏_i φ_{j_i}(x_i)`. -/ +theorem mem_span_prod_of_isForm [Nonempty ι] (hT : T.Reproduces) {g : (Fin d → ℝ) → ℂ} + (hg : BddMeas g) (hform : ∀ i, T.IsForm i g) : + g ∈ Submodule.span ℂ + (Set.range fun j : Fin d → ι => fun x => ∏ i, T.rangeFn (j i) (x i)) := by + classical + have hS : ∀ S : Finset (Fin d), g ∈ Submodule.span ℂ (T.partialTensor S) := by + intro S + induction S using Finset.induction_on with + | empty => + refine Submodule.subset_span ⟨g, fun _ => Classical.arbitrary ι, hg, + fun x i hi => absurd hi (Finset.notMem_empty i), fun i _ => hform i, ?_⟩ + funext x + simp + | insert a S ha ih => exact Submodule.span_le.2 (T.partialTensor_subset_span hT ha) ih + refine Submodule.span_le.2 ?_ (hS Finset.univ) + rintro G ⟨c, j, -, hci, -, rfl⟩ + have hconst : ∀ x, c x = c 0 := fun x => by + have key : ∀ S : Finset (Fin d), c (S.piecewise 0 x) = c x := by + intro S + induction S using Finset.induction_on with + | empty => simp + | insert a S ha ih => rw [Finset.piecewise_insert, hci _ a (Finset.mem_univ a), ih] + have h := key Finset.univ + rw [Finset.piecewise_univ] at h + exact h.symm + have hG : (fun x => c x * ∏ i ∈ Finset.univ, T.rangeFn (j i) (x i)) = + c 0 • fun x => ∏ i, T.rangeFn (j i) (x i) := by + funext x + rw [hconst x] + rfl + rw [hG] + exact Submodule.smul_mem _ _ (Submodule.subset_span ⟨j, rfl⟩) + +/-- Products `∏_l φ_{j_l}(x_l)` have the form of `T` in every coordinate. -/ +theorem isForm_prod (j : Fin d → ι) (i : Fin d) : + T.IsForm i (fun x => ∏ l, T.rangeFn (j l) (x l)) := by + classical + refine ⟨fun m => if m = j i then (fun x => ∏ l ∈ Finset.univ.erase i, T.rangeFn (j l) (x l)) + else 0, fun m => ?_, fun m x t => ?_, fun x => ?_⟩ + · dsimp only + split_ifs + · exact bddMeas_prod_coord _ fun l _ => T.bddMeas_rangeFn (j l) + · exact bddMeas_zero + · dsimp only + split_ifs + · exact Finset.prod_congr rfl fun l hl => by + rw [Function.update_of_ne (Finset.ne_of_mem_erase hl)] + · rfl + · rw [Finset.sum_eq_single (j i) (fun m _ hm => by simp [hm]) + (fun h => absurd (Finset.mem_univ _) h)] + simp only [↓reduceIte] + rw [Finset.prod_erase_mul _ _ (Finset.mem_univ i)] + +/-- **Tensor products have the forms**: combinations of products `∏_i φ_{j_i}(x_i)` are bounded +and measurable and have the form of `T` in every coordinate. -/ +theorem isForm_of_mem_span_prod {g : (Fin d → ℝ) → ℂ} + (hg : g ∈ Submodule.span ℂ + (Set.range fun j : Fin d → ι => fun x => ∏ i, T.rangeFn (j i) (x i))) : + BddMeas g ∧ ∀ i, T.IsForm i g := by + induction hg using Submodule.span_induction with + | mem G hG => + obtain ⟨j, rfl⟩ := hG + exact ⟨bddMeas_prod_coord _ fun l _ => T.bddMeas_rangeFn (j l), fun i => T.isForm_prod j i⟩ + | zero => exact ⟨bddMeas_zero, fun i => T.isForm_zero i⟩ + | add f g _ _ hf hg => exact ⟨hf.1.add hg.1, fun i => (hf.2 i).add _ (hg.2 i)⟩ + | smul a f _ hf => exact ⟨hf.1.const_mul a, fun i => (hf.2 i).const_mul _ a⟩ + +/-! ### Action in all coordinates -/ + +/-- The action of `T` in the coordinates of a list, the last coordinate first: +`T^{(l_1)} ∘ ⋯ ∘ T^{(l_m)}`. -/ +noncomputable def foldSlicewise (l : List (Fin d)) (g : (Fin d → ℝ) → ℂ) : + (Fin d → ℝ) → ℂ := + l.foldr (fun i acc => T.slicewise i acc) g + +/-- The action in the coordinates of the empty list is the identity. -/ +theorem foldSlicewise_nil (g : (Fin d → ℝ) → ℂ) : T.foldSlicewise [] g = g := rfl + +/-- The action in the coordinates of `i :: l` is `T^{(i)}` after the action in those of `l`. -/ +theorem foldSlicewise_cons (i : Fin d) (l : List (Fin d)) (g : (Fin d → ℝ) → ℂ) : + T.foldSlicewise (i :: l) g = T.slicewise i (T.foldSlicewise l g) := rfl + +/-- The action in the coordinates of a list keeps functions bounded and measurable. -/ +theorem bddMeas_foldSlicewise (l : List (Fin d)) {g : (Fin d → ℝ) → ℂ} (hg : BddMeas g) : + BddMeas (T.foldSlicewise l g) := by + induction l with + | nil => exact hg + | cons i l ih => exact T.bddMeas_slicewise ih i + +/-- **The action in all coordinates of a list gives the form in each of them.** -/ +theorem isForm_foldSlicewise (l : List (Fin d)) {g : (Fin d → ℝ) → ℂ} (hg : BddMeas g) + {i : Fin d} (hi : i ∈ l) : T.IsForm i (T.foldSlicewise l g) := by + induction l with + | nil => exact absurd hi List.not_mem_nil + | cons j l ih => + rcases eq_or_ne i j with rfl | hij + · exact T.isForm_slicewise (T.bddMeas_foldSlicewise l hg) i + · exact KernelOp.IsForm.slicewise T T hij (ih ((List.mem_cons.1 hi).resolve_left hij)) + +/-! ### Bounds in `L_p` of the cube -/ + +/-- **Slicewise bounds**: if `‖T u‖_{L_p[0,1]} ≤ C ‖u‖_{L_p[0,1]}` for all measurable `u`, then +`‖T^{(i)} g‖_{L_p(Q)} ≤ C ‖g‖_{L_p(Q)}` for measurable `g` with measurable `T^{(i)} g`. -/ +theorem eLpNorm_slicewise_le {p : ℝ≥0∞} (hp0 : p ≠ 0) (hp : p ≠ ∞) {C : ℝ≥0∞} + (hT : ∀ u : ℝ → ℂ, Measurable u → eLpNorm (T.apply u) p unitVol ≤ C * eLpNorm u p unitVol) + (i : Fin d) {g : (Fin d → ℝ) → ℂ} (hg : Measurable g) + (hTg : Measurable (T.slicewise i g)) : + eLpNorm (T.slicewise i g) p (cubeVol d) ≤ C * eLpNorm g p (cubeVol d) := + eLpNorm_cubeVol_le_of_slice_le hTg hg hp0 hp i fun x => by + rw [slice_slicewise] + exact hT _ (measurable_slice hg x i) + +/-- **Telescoping over the coordinates of a list**: if `‖T u‖_{L_p[0,1]} ≤ C ‖u‖_{L_p[0,1]}`, +then `‖g - T^{(l_1)} ⋯ T^{(l_m)} g‖_{L_p(Q)} ≤ (1 + C)^m ∑_{i ∈ l} ‖g - T^{(i)} g‖_{L_p(Q)}` for +bounded measurable `g`. The step is `g - T^{(i)} h = (g - T^{(i)} g) + T^{(i)} (g - h)`. -/ +theorem eLpNorm_sub_foldSlicewise_le {p : ℝ≥0∞} (hp : 1 ≤ p) (hp' : p ≠ ∞) {C : ℝ≥0∞} + (hT : ∀ u : ℝ → ℂ, Measurable u → eLpNorm (T.apply u) p unitVol ≤ C * eLpNorm u p unitVol) + (l : List (Fin d)) {g : (Fin d → ℝ) → ℂ} (hg : BddMeas g) : + eLpNorm (fun x => g x - T.foldSlicewise l g x) p (cubeVol d) ≤ + (1 + C) ^ l.length * + (l.map fun i => eLpNorm (fun x => g x - T.slicewise i g x) p (cubeVol d)).sum := by + have hp0 : p ≠ 0 := (lt_of_lt_of_le zero_lt_one hp).ne' + induction l with + | nil => simp [foldSlicewise_nil] + | cons i l ih => + have hF := T.bddMeas_foldSlicewise l hg + have hgF : Measurable fun y => g y - T.foldSlicewise l g y := hg.1.sub hF.1 + have heq : (fun x => g x - T.foldSlicewise (i :: l) g x) = + (fun x => g x - T.slicewise i g x) + + T.slicewise i (fun y => g y - T.foldSlicewise l g y) := by + funext x + rw [Pi.add_apply, foldSlicewise_cons, T.slicewise_sub hg hF i x] + ring + have h2 : eLpNorm (T.slicewise i fun y => g y - T.foldSlicewise l g y) p (cubeVol d) ≤ + C * eLpNorm (fun y => g y - T.foldSlicewise l g y) p (cubeVol d) := + T.eLpNorm_slicewise_le hp0 hp' hT i hgF (T.measurable_slicewise hgF i) + set e := eLpNorm (fun x => g x - T.slicewise i g x) p (cubeVol d) + set S := (l.map fun i => eLpNorm (fun x => g x - T.slicewise i g x) p (cubeVol d)).sum + have h1 : 1 ≤ (1 + C) ^ (l.length + 1) := one_le_pow₀ le_self_add + rw [heq, List.length_cons, List.map_cons, List.sum_cons] + calc eLpNorm ((fun x => g x - T.slicewise i g x) + + T.slicewise i (fun y => g y - T.foldSlicewise l g y)) p (cubeVol d) + ≤ e + C * ((1 + C) ^ l.length * S) := + (eLpNorm_add_le hp).trans (add_le_add le_rfl (h2.trans (mul_le_mul' le_rfl ih))) + _ = e + (1 + C) ^ l.length * C * S := by ring + _ ≤ (1 + C) ^ (l.length + 1) * e + (1 + C) ^ l.length * (1 + C) * S := by + gcongr + · exact le_mul_of_one_le_left' h1 + · exact le_add_self + _ = (1 + C) ^ (l.length + 1) * (e + S) := by ring + +end KernelOp + +/-- The slices of `f - T^{(i)} f` in coordinate `i` are the errors of `T` on the slices of `f`. -/ +theorem slice_sub_slicewise {d : ℕ} {ι : Type*} [Fintype ι] (T : KernelOp ι) + (f : (Fin d → ℝ) → ℂ) (i : Fin d) (x : Fin d → ℝ) : + slice (fun y => f y - T.slicewise i f y) x i = + fun t => slice f x i t - T.apply (slice f x i) t := by + funext t + rw [← KernelOp.slice_slicewise] + rfl + +end Cube diff --git a/LeanPool/FunctionSpaces/Domains/Cube/Smoothing.lean b/LeanPool/FunctionSpaces/Domains/Cube/Smoothing.lean new file mode 100644 index 0000000000..1f61a0ba9c --- /dev/null +++ b/LeanPool/FunctionSpaces/Domains/Cube/Smoothing.lean @@ -0,0 +1,305 @@ +/- +Copyright (c) 2026 Mario Ullrich. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Mario Ullrich +-/ +module + +public import LeanPool.FunctionSpaces.Domains.Cube.Modulus +public import LeanPool.FunctionSpaces.Domains.Interval.Taylor + +/- +Modified for Lean Pool: module names and imports adapted. +-/ + +/-! +# Smoothing in one coordinate + +The **Steklov smoothing in coordinate `i`** smooths every slice in coordinate `i`, +`S^{(i)}_δ f(x) = S_δ (slice f x i)(x_i)` (`Cube.cubeSmooth`), with the smoothing `S_δ` of one +variable (`Interval.smooth`). For continuous `f` its two identities hold pointwise on the cube: + +* `f - S^{(i)}_δ f = (-1)^r avg_v Δ^r_{(v_1 + ⋯ + v_r) e_i} f`, the average being over the steps + only (`Cube.sub_cubeSmooth_eq`, from `Interval.sub_smooth_eq` and + `Interval.avgStepIter_congr_point`); +* the derivative of order `r` in `x_i` (`Cube.cubeSmoothDeriv`) is the finite combination + `∑_k (-1)^(k+1) C(r,k) (kδ)^(-r) Δ^r_{kδ e_i} f` (`Cube.cubeSmoothDeriv_eq`). + +Minkowski's inequality for averages on the cube (`Interval.eLpNorm_avgStepIter_le`, for any point +space) and the derivative bound for any measure (`Interval.eLpNorm_sum_smoothCoeff_smul_le`) then +bound both by the coordinate modulus, with the supremum over the steps outside the integral over +the cube (`Cube.eLpNorm_sub_cubeSmooth_le`, `Cube.eLpNorm_cubeSmoothDeriv_le`). With `δ = L / r²` +this gives smoothings on the regions `{x_i ≤ w}` and, by the reflection `x_i ↦ 1 - x_i` +(`Cube.coordModulus_reflect`), `{x_i ≥ 1 - w}`, `w + L ≤ 1`, whose slices have Taylor polynomials +on all intervals (`Cube.exists_left_cubeSmoothing`, `Cube.exists_right_cubeSmoothing`), with the +step bounds and the reflected Taylor polynomials of the interval (`Interval.step_div_sq_bounds`, +`Interval.two_pow_mul_inv_div_sq_pow_mul_le`, `Interval.exists_eLpNorm_sub_polyFun_reflect_le`). +-/ + +@[expose] public section + +open MeasureTheory Set Polynomial +open Rd (higherDiff) +open scoped ENNReal + +namespace Cube + +open Interval + +variable {d : ℕ} + +/-- Coordinate differences of a continuous function are jointly continuous in the step and the +point. -/ +theorem continuous_cubeDiff_uncurry {f : (Fin d → ℝ) → ℂ} (hf : Continuous f) (r : ℕ) + (i : Fin d) : + Continuous (Function.uncurry fun (h : ℝ) (x : Fin d → ℝ) => cubeDiff r h i f x) := by + have : (Function.uncurry fun (h : ℝ) (x : Fin d → ℝ) => cubeDiff r h i f x) = + fun q : ℝ × (Fin d → ℝ) => ∑ k ∈ Finset.range (r + 1), + ((-1 : ℂ) ^ (r - k) * (r.choose k : ℂ)) * f (Function.update q.2 i (q.2 i + k * q.1)) := + funext fun q => cubeDiff_eq r q.1 i f q.2 + rw [this] + refine continuous_finsetSum _ fun k _ => continuous_const.mul (hf.comp ?_) + exact continuous_snd.update i (((continuous_apply i).comp continuous_snd).add + (continuous_const.mul continuous_fst)) + +/-- Coordinate differences of a continuous function are continuous. -/ +theorem continuous_cubeDiff {f : (Fin d → ℝ) → ℂ} (hf : Continuous f) (r : ℕ) (h : ℝ) + (i : Fin d) : Continuous (cubeDiff r h i f) := + (continuous_cubeDiff_uncurry hf r i).comp (continuous_const.prodMk continuous_id) + +/-! ### The smoothing and its identities -/ + +/-- The **Steklov smoothing in coordinate `i`**: `S^{(i)}_δ f(x) = S_δ (slice f x i)(x_i)`. -/ +noncomputable def cubeSmooth (r : ℕ) (δ : ℝ) (i : Fin d) (f : (Fin d → ℝ) → ℂ) + (x : Fin d → ℝ) : ℂ := + smooth r δ (slice f x i) (x i) + +/-- The **derivative of order `r` in coordinate `i`** of the smoothing, +`∂_i^r S^{(i)}_δ f(x) = (S_δ (slice f x i))^(r)(x_i)`. -/ +noncomputable def cubeSmoothDeriv (r : ℕ) (δ : ℝ) (i : Fin d) (f : (Fin d → ℝ) → ℂ) + (x : Fin d → ℝ) : ℂ := + iteratedDeriv r (smooth r δ (slice f x i)) (x i) + +/-- The slices of the smoothing are the smoothings of the slices. -/ +theorem slice_cubeSmooth (r : ℕ) (δ : ℝ) (i : Fin d) (f : (Fin d → ℝ) → ℂ) (x : Fin d → ℝ) : + slice (cubeSmooth r δ i f) x i = smooth r δ (slice f x i) := by + funext t + simp only [slice, cubeSmooth] + rw [slice_update, Function.update_self] + +/-- The slices of the derivative are the derivatives of the smoothed slices. -/ +theorem slice_cubeSmoothDeriv (r : ℕ) (δ : ℝ) (i : Fin d) (f : (Fin d → ℝ) → ℂ) + (x : Fin d → ℝ) : + slice (cubeSmoothDeriv r δ i f) x i = iteratedDeriv r (smooth r δ (slice f x i)) := by + funext t + simp only [slice, cubeSmoothDeriv] + rw [slice_update, Function.update_self] + +/-- **`f - S^{(i)}_δ f` is an averaged coordinate difference**: +`f(x) - S^{(i)}_δ f(x) = (-1)^r avg_h Δ^r_{h e_i} f(x)`, the average over the steps only. -/ +theorem sub_cubeSmooth_eq {f : (Fin d → ℝ) → ℂ} (hf : Continuous f) (r : ℕ) {δ : ℝ} + (hδ : δ ≠ 0) (i : Fin d) (x : Fin d → ℝ) : + f x - cubeSmooth r δ i f x = + (-1 : ℂ) ^ r * avgStepIter r δ (fun h y => cubeDiff r h i f y) 0 x := by + have h := sub_smooth_eq (continuous_slice hf x i) r hδ (x i) + rw [show slice f x i (x i) = f x by simp [slice] ] at h + rw [cubeSmooth, h] + congr 1 + exact avgStepIter_congr_point (G := fun h y => higherDiff r h (slice f x i) y) + (G' := fun h y => cubeDiff r h i f y) (x := x i) (x' := x) (fun s => rfl) r δ 0 + +/-- **The derivative of the smoothing is a combination of coordinate differences**: +`∂_i^r S^{(i)}_δ f = ∑_{k=1}^r (-1)^(k+1) C(r,k) (kδ)^(-r) Δ^r_{kδ e_i} f`. -/ +theorem cubeSmoothDeriv_eq {f : (Fin d → ℝ) → ℂ} (hf : Continuous f) (r : ℕ) (δ : ℝ) + (i : Fin d) (x : Fin d → ℝ) : + cubeSmoothDeriv r δ i f x = ∑ k ∈ Finset.range r, + ((-1 : ℂ) ^ (k + 2) * (r.choose (k + 1) : ℂ)) * + ((((k + 1 : ℕ) * δ : ℝ) : ℂ)⁻¹ ^ r * cubeDiff r ((k + 1 : ℕ) * δ) i f x) := by + rw [cubeSmoothDeriv, iteratedDeriv_smooth (continuous_slice hf x i) r δ] + rfl + +/-- **The derivative of the smoothing as a sum of functions**: +`∂_i^r S^{(i)}_δ f = ∑_{k=1}^r (-1)^(k+1) C(r,k) (kδ)^(-r) Δ^r_{kδ e_i} f` as an identity of +functions on `ℝ^d` (`Cube.cubeSmoothDeriv_eq` at every point), written as a sum `∑_k c_k • g_k`, +the form to which the triangle inequality in `L_p` applies. -/ +theorem cubeSmoothDeriv_eq_sum_smul {f : (Fin d → ℝ) → ℂ} (hf : Continuous f) (r : ℕ) (δ : ℝ) + (i : Fin d) : + cubeSmoothDeriv r δ i f = ∑ k ∈ Finset.range r, + (((-1 : ℂ) ^ (k + 2) * (r.choose (k + 1) : ℂ)) * + (((k + 1 : ℕ) * δ : ℝ) : ℂ)⁻¹ ^ r) • cubeDiff r ((k + 1 : ℕ) * δ) i f := by + funext x + rw [cubeSmoothDeriv_eq hf r δ i x, Finset.sum_apply] + refine Finset.sum_congr rfl fun k _ => ?_ + rw [Pi.smul_apply, smul_eq_mul] + ring + +/-- The smoothing of a continuous function is continuous. -/ +theorem continuous_cubeSmooth {f : (Fin d → ℝ) → ℂ} (hf : Continuous f) (r : ℕ) {δ : ℝ} + (hδ : δ ≠ 0) (i : Fin d) : Continuous (cubeSmooth r δ i f) := by + have : cubeSmooth r δ i f = fun x => + f x - (-1 : ℂ) ^ r * avgStepIter r δ (fun h y => cubeDiff r h i f y) 0 x := by + funext x + rw [← sub_cubeSmooth_eq hf r hδ i x] + ring + rw [this] + exact hf.sub (continuous_const.mul ((continuous_avgStepIter + (continuous_cubeDiff_uncurry hf r i) r δ).comp (continuous_const.prodMk continuous_id))) + +/-- The derivative of the smoothing of a continuous function is continuous. -/ +theorem continuous_cubeSmoothDeriv {f : (Fin d → ℝ) → ℂ} (hf : Continuous f) (r : ℕ) (δ : ℝ) + (i : Fin d) : Continuous (cubeSmoothDeriv r δ i f) := by + rw [show cubeSmoothDeriv r δ i f = fun x => ∑ k ∈ Finset.range r, + ((-1 : ℂ) ^ (k + 2) * (r.choose (k + 1) : ℂ)) * + ((((k + 1 : ℕ) * δ : ℝ) : ℂ)⁻¹ ^ r * cubeDiff r ((k + 1 : ℕ) * δ) i f x) from + funext (cubeSmoothDeriv_eq hf r δ i)] + exact continuous_finsetSum _ fun k _ => + continuous_const.mul (continuous_const.mul (continuous_cubeDiff hf r _ i)) + +/-! ### Bounds by the coordinate modulus -/ + +/-- **Coordinate differences on a region are bounded by the modulus**: for `w + r (rδ) ≤ 1` and +`0 ≤ h ≤ rδ`, `‖Δ^r_{h e_i} f‖_{L_p({x_i ≤ w})} ≤ ω_r^{(i)}(f, rδ)_p`, since the region +`{0 ≤ x_i ≤ w}` lies in `{0 ≤ x_i ≤ 1 - rh}`. -/ +theorem eLpNorm_cubeDiff_regionVol_le {f : (Fin d → ℝ) → ℂ} {r : ℕ} {δ : ℝ} {p : ℝ≥0∞} + {i : Fin d} {w h : ℝ} (hwb : w + r * (r * δ) ≤ 1) (h0 : 0 ≤ h) (hh : h ≤ r * δ) : + eLpNorm (cubeDiff r h i f) p (regionVol d i 0 w) ≤ coordModulus r p i f (r * δ) := by + have hsub : {x : Fin d → ℝ | x i ∈ Icc 0 w} ⊆ {x | x i ∈ Icc 0 (1 - r * h)} := fun x hx => by + have : (r : ℝ) * h ≤ r * (r * δ) := mul_le_mul_of_nonneg_left hh (Nat.cast_nonneg r) + exact ⟨hx.1, by linarith [hx.2]⟩ + exact (eLpNorm_mono_measure _ (Measure.restrict_mono hsub le_rfl)).trans + (eLpNorm_cubeDiff_le_coordModulus ⟨h0, hh⟩) + +/-- **The smoothing is close to `f`**: on `{x_i ≤ w}` with `w + r² δ ≤ 1`, +`‖f - S^{(i)}_δ f‖_p ≤ ω_r^{(i)}(f, rδ)_p`. -/ +theorem eLpNorm_sub_cubeSmooth_le {f : (Fin d → ℝ) → ℂ} (hf : Continuous f) (r : ℕ) {δ : ℝ} + (hδ : 0 < δ) {p : ℝ≥0∞} (hp : 1 ≤ p) (hp' : p ≠ ∞) (i : Fin d) {w : ℝ} + (hwb : w + r * (r * δ) ≤ 1) : + eLpNorm (fun x => f x - cubeSmooth r δ i f x) p (regionVol d i 0 w) ≤ + coordModulus r p i f (r * δ) := by + have heq : (fun x => f x - cubeSmooth r δ i f x) = + ((-1 : ℂ) ^ r) • avgStepIter r δ (fun h y => cubeDiff r h i f y) 0 := by + funext x + rw [sub_cubeSmooth_eq hf r hδ.ne' i x] + rfl + rw [heq, eLpNorm_const_smul, eNorm_pow, eNorm_neg, eNorm_one, one_pow, one_mul] + refine (eLpNorm_avgStepIter_le (continuous_cubeDiff_uncurry hf r i) hδ hp hp' _ r 0).trans ?_ + refine iSup₂_le fun h hh => ?_ + rw [zero_add] at hh + exact eLpNorm_cubeDiff_regionVol_le hwb hh.1 hh.2 + +/-- **The derivative of the smoothing**: on `{x_i ≤ w}` with `w + r² δ ≤ 1`, +`‖∂_i^r S^{(i)}_δ f‖_p ≤ 2^r δ^(-r) ω_r^{(i)}(f, rδ)_p`. -/ +theorem eLpNorm_cubeSmoothDeriv_le {f : (Fin d → ℝ) → ℂ} (hf : Continuous f) (r : ℕ) {δ : ℝ} + (hδ : 0 < δ) {p : ℝ≥0∞} (hp : 1 ≤ p) (i : Fin d) {w : ℝ} (hwb : w + r * (r * δ) ≤ 1) : + eLpNorm (cubeSmoothDeriv r δ i f) p (regionVol d i 0 w) ≤ + 2 ^ r * (ENNReal.ofReal δ)⁻¹ ^ r * coordModulus r p i f (r * δ) := by + rw [cubeSmoothDeriv_eq_sum_smul hf r δ i] + exact eLpNorm_sum_smoothCoeff_smul_le (D := fun h => cubeDiff r h i f) hδ hp + fun h h0 hh => eLpNorm_cubeDiff_regionVol_le hwb h0 hh + +/-! ### Smoothings on the two ends of a coordinate -/ + +/-- **Smoothing on a left region**: for continuous `f`, `r ≥ 1`, a scale `L > 0` and +`w + L ≤ 1`, the smoothing `G = S^{(i)}_δ f`, `δ = L/r²`, and `D = ∂_i^r G` satisfy +`‖f - G‖_{L_p({x_i ≤ w})} ≤ ω_r^{(i)}(f, L)_p` and +`‖D‖_{L_p({x_i ≤ w})} ≤ L^(-r) 2^r r^(2r) ω_r^{(i)}(f, L)_p`, and every slice of `G` has Taylor +polynomials `‖G - T‖_{L_p[u,v]} ≤ (v - u)^r ‖D‖_{L_p[u,v]}` on the slice. -/ +theorem exists_left_cubeSmoothing {f : (Fin d → ℝ) → ℂ} (hf : Continuous f) {r : ℕ} + (hr : 1 ≤ r) {p : ℝ≥0∞} (hp : 1 ≤ p) (hp' : p ≠ ∞) (i : Fin d) {L w : ℝ} (hL : 0 < L) + (hwL : w + L ≤ 1) : + ∃ G D : (Fin d → ℝ) → ℂ, Measurable G ∧ Measurable D ∧ + eLpNorm (fun x => f x - G x) p (regionVol d i 0 w) ≤ coordModulus r p i f L ∧ + eLpNorm D p (regionVol d i 0 w) ≤ + ENNReal.ofReal L⁻¹ ^ r * (2 ^ r * (r : ℝ≥0∞) ^ (2 * r)) * coordModulus r p i f L ∧ + ∀ x : Fin d → ℝ, ∀ u v : ℝ, u ≤ v → ∃ T ∈ degreeLT ℂ r, + eLpNorm (fun t => slice G x i t - polyFun T t) p (volume.restrict (Icc u v)) ≤ + ENNReal.ofReal (v - u) ^ r * eLpNorm (slice D x i) p (volume.restrict (Icc u v)) := by + obtain ⟨hδ, hrδ, hrrδ⟩ := step_div_sq_bounds hr hL + have hwb : w + r * (r * (L / r ^ 2)) ≤ 1 := by rw [hrrδ]; exact hwL + refine ⟨cubeSmooth r (L / r ^ 2) i f, cubeSmoothDeriv r (L / r ^ 2) i f, + (continuous_cubeSmooth hf r hδ.ne' i).measurable, + (continuous_cubeSmoothDeriv hf r (L / r ^ 2) i).measurable, ?_, ?_, fun x u v huv => ?_⟩ + · exact (eLpNorm_sub_cubeSmooth_le hf r hδ hp hp' i hwb).trans (coordModulus_mono r p i f hrδ) + · exact (eLpNorm_cubeSmoothDeriv_le hf r hδ hp i hwb).trans + (two_pow_mul_inv_div_sq_pow_mul_le hr hL (coordModulus_mono r p i f hrδ)) + · rw [slice_cubeSmooth, slice_cubeSmoothDeriv] + exact exists_eLpNorm_sub_polyFun_le hp r + (contDiff_smooth (continuous_slice hf x i) r (L / r ^ 2)) huv + +/-- The **reflection in coordinate `i`**, `x ↦ x` with `x_i` replaced by `1 - x_i`. -/ +def reflect (i : Fin d) (x : Fin d → ℝ) : Fin d → ℝ := Function.update x i (1 - x i) + +/-- The reflection is an involution. -/ +theorem reflect_reflect (i : Fin d) (x : Fin d → ℝ) : reflect i (reflect i x) = x := by + simp [reflect] + +/-- The reflection is continuous. -/ +theorem continuous_reflect (i : Fin d) : Continuous (reflect (d := d) i) := + continuous_id.update i (continuous_const.sub (continuous_apply i)) + +/-- The slice of a reflected function is the reflected slice. -/ +theorem slice_reflect (f : (Fin d → ℝ) → ℂ) (x : Fin d → ℝ) (i : Fin d) : + slice (fun y => f (reflect i y)) x i = fun t => slice f x i (1 - t) := by + funext t + simp [slice, reflect] + +/-- **Reflection preserves the coordinate modulus**: `ω_r^{(i)}(f(reflect_i ·), t) = +ω_r^{(i)}(f, t)`, +slice by slice (`Interval.eLpNorm_higherDiff_reflect`, `Cube.coordModulus_eq_of_slice`). -/ +theorem coordModulus_reflect {f : (Fin d → ℝ) → ℂ} (hf : Measurable f) {p : ℝ≥0∞} (hp0 : p ≠ 0) + (hp : p ≠ ∞) (r : ℕ) (i : Fin d) (t : ℝ) : + coordModulus r p i (fun y => f (reflect i y)) t = coordModulus r p i f t := + coordModulus_eq_of_slice (f := fun y => f (reflect i y)) + (hf.comp (continuous_reflect i).measurable) hf hp0 hp r i t fun h _ => ae_of_all _ fun x => by + rw [slice_reflect] + simpa only [zero_add] using eLpNorm_higherDiff_reflect (measurable_slice hf x i) r p 0 1 h + +/-- **Reflection of a region**: `‖F(reflect_i ·)‖_{L_p({x_i ∈ [0, w]})} = ‖F‖_{L_p({x_i ∈ [1-w, +1]})}` +for `w ≤ 1`. -/ +theorem eLpNorm_reflect_regionVol {F : (Fin d → ℝ) → ℂ} (hF : Measurable F) {p : ℝ≥0∞} + (hp0 : p ≠ 0) (hp : p ≠ ∞) (i : Fin d) {w : ℝ} (hw1 : w ≤ 1) : + eLpNorm (fun y => F (reflect i y)) p (regionVol d i 0 w) = + eLpNorm F p (regionVol d i (1 - w) 1) := by + have hFr : Measurable fun y => F (reflect i y) := hF.comp (continuous_reflect i).measurable + rw [eLpNorm_regionVol_eq_slice hFr hp0 hp i le_rfl hw1, + eLpNorm_regionVol_eq_slice hF hp0 hp i (by linarith) le_rfl] + congr 1 + funext x + rw [slice_reflect, eLpNorm_comp_sub_Icc (measurable_slice hF x i), sub_zero] + +/-- **Smoothing on a right region**: the same as `Cube.exists_left_cubeSmoothing` on +`{x_i ≥ 1 - w}`, by the reflection in coordinate `i`. -/ +theorem exists_right_cubeSmoothing {f : (Fin d → ℝ) → ℂ} (hf : Continuous f) {r : ℕ} + (hr : 1 ≤ r) {p : ℝ≥0∞} (hp : 1 ≤ p) (hp' : p ≠ ∞) (i : Fin d) {L w : ℝ} (hL : 0 < L) + (hwL : w + L ≤ 1) : + ∃ G D : (Fin d → ℝ) → ℂ, Measurable G ∧ Measurable D ∧ + eLpNorm (fun x => f x - G x) p (regionVol d i (1 - w) 1) ≤ coordModulus r p i f L ∧ + eLpNorm D p (regionVol d i (1 - w) 1) ≤ + ENNReal.ofReal L⁻¹ ^ r * (2 ^ r * (r : ℝ≥0∞) ^ (2 * r)) * coordModulus r p i f L ∧ + ∀ x : Fin d → ℝ, ∀ u v : ℝ, u ≤ v → ∃ T ∈ degreeLT ℂ r, + eLpNorm (fun t => slice G x i t - polyFun T t) p (volume.restrict (Icc u v)) ≤ + ENNReal.ofReal (v - u) ^ r * eLpNorm (slice D x i) p (volume.restrict (Icc u v)) := by + have hp0 : p ≠ 0 := (lt_of_lt_of_le zero_lt_one hp).ne' + have hw1 : w ≤ 1 := by linarith + have hfr : Continuous fun y => f (reflect i y) := hf.comp (continuous_reflect i) + obtain ⟨G, D, hGm, hDm, h1, h2, h3⟩ := exists_left_cubeSmoothing hfr hr hp hp' i hL hwL + rw [coordModulus_reflect hf.measurable hp0 hp'] at h1 h2 + have hrefl : Measurable (reflect (d := d) i) := (continuous_reflect i).measurable + refine ⟨fun y => G (reflect i y), fun y => D (reflect i y), hGm.comp hrefl, hDm.comp hrefl, + ?_, ?_, fun x u v huv => ?_⟩ + · have h := eLpNorm_reflect_regionVol (F := fun y => f y - G (reflect i y)) + (hf.measurable.sub (hGm.comp hrefl)) hp0 hp' i hw1 + simp only [reflect_reflect] at h + rw [← h] + exact h1 + · have h := eLpNorm_reflect_regionVol (F := fun y => D (reflect i y)) (hDm.comp hrefl) hp0 hp' + i hw1 + simp only [reflect_reflect] at h + rw [← h] + exact h2 + · simp only [slice_reflect] + exact exists_eLpNorm_sub_polyFun_reflect_le (measurable_slice hGm x i) + (measurable_slice hDm x i) (h3 x (1 - v) (1 - u) (by linarith)) + +end Cube diff --git a/LeanPool/FunctionSpaces/Domains/Cube/SplineInverse.lean b/LeanPool/FunctionSpaces/Domains/Cube/SplineInverse.lean new file mode 100644 index 0000000000..9f30747d3f --- /dev/null +++ b/LeanPool/FunctionSpaces/Domains/Cube/SplineInverse.lean @@ -0,0 +1,112 @@ +/- +Copyright (c) 2026 Mario Ullrich. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Mario Ullrich +-/ +module + +public import LeanPool.FunctionSpaces.Domains.Cube.SplineJackson +public import LeanPool.FunctionSpaces.Domains.Interval.SplineInverse + +/- +Modified for Lean Pool: module names and imports adapted. +-/ + +/-! +# The inverse inequality for tensor splines and the coincidence theorem + +The slices of a spline of level `j` on the cube are dyadic splines of level `j` on `[0, 1]` +(`Cube.IsCubeSpline`), so the local inverse estimate for splines in one variable +(`Interval.eLpNorm_higherDiff_ppFun_spline_le`), applied to every slice and integrated over the +point, bounds the differences in each coordinate (`Cube.eLpNorm_cubeDiff_le_of_isCubeSpline`). +Summed over the coordinates this is the **inverse inequality of order `r - 1 + 1/p`** +(`Cube.exists_inverse_cubeSplineScheme`). + +With Jackson's inequality at every level (`Cube.exists_approxError_cubeSplineScheme_le`) the modulus +on the cube is compatible with the scheme of tensor splines (`Cube.cubeSplineModulusData`), and +`A^s_q = B^s_{p,q}([0, 1]^d)` for `0 ≤ s < r - 1 + 1/p` (`Cube.memApprox_cubeSplineScheme_iff`), +beyond smoothness `1` for `r ≥ 2`. +-/ + +@[expose] public section + +open MeasureTheory Set Polynomial +open scoped ENNReal +open ENNReal (dyadicWeight) + +namespace Cube + +open Interval + +variable {d : ℕ} {p : ℝ≥0∞} [Fact (1 ≤ p)] + +omit [Fact (1 ≤ p)] in +/-- The strip constant of the local inverse estimate for splines is finite. -/ +theorem splineStripConst_ne_top (r j : ℕ) {K : ℝ≥0∞} (hK : K ≠ ∞) (h : ℝ) : + splineStripConst r j K h p ≠ ∞ := by + unfold splineStripConst + refine ENNReal.mul_ne_top (ENNReal.mul_ne_top (ENNReal.mul_ne_top (ENNReal.mul_ne_top + (ENNReal.mul_ne_top (by simp) (ENNReal.natCast_ne_top r)) (by simp)) hK) + (ENNReal.pow_ne_top ENNReal.ofReal_ne_top)) + (ENNReal.rpow_ne_top_of_nonneg (by positivity) ENNReal.ofReal_ne_top) + +/-- **The local inverse estimate for tensor splines**: for a spline `g` of level `j` on the cube +and `0 ≤ h ≤ 2^(-j)`, +`‖Δ^r_{h e_i} g‖_{L_p({x_i ≤ 1 - rh})} ≤ S_j(h) (r h (r + 1))^(1/p) ‖g‖_{L_p(Q)}`, from the +estimate in one variable on every slice (`Interval.eLpNorm_higherDiff_ppFun_spline_le`). -/ +theorem eLpNorm_cubeDiff_le_of_isCubeSpline {r j : ℕ} {g : (Fin d → ℝ) → ℂ} + (hg : IsCubeSpline r j g) {K : ℝ≥0∞} (hKb : NikolskiiBound p r K) + (hp : p ≠ ∞) (i : Fin d) {h : ℝ} (hh0 : 0 ≤ h) (hh : h ≤ 1 / 2 ^ j) : + eLpNorm (cubeDiff r h i g) p (diffRegion d r h i) ≤ + splineStripConst r j K h p * (ENNReal.ofReal (r * h) * (r + 1)) ^ (1 / p.toReal) * + eLpNorm g p (cubeVol d) := by + refine eLpNorm_cubeDiff_le_of_slice_le hg.1.1 + (zero_lt_one.trans_le (Fact.out : 1 ≤ p)).ne' hp r hh0 i fun x => ?_ + obtain ⟨Q, hQ, hJ, hs⟩ := hg.2 i x + rw [hs] + exact eLpNorm_higherDiff_ppFun_spline_le hQ hJ hKb hp hh0 hh + +/-- **The inverse inequality for tensor splines**, of order `θ = r - 1 + 1/p`: there is +`C_B < ∞` with `ω_r(a, 2^(-k))_p ≤ C_B 2^(-(k-j)θ) ‖a‖_p` for every spline `a` of order `r` and +level `j` on the cube (and `k - j` truncated at `0`). -/ +theorem exists_inverse_cubeSplineScheme {r : ℕ} (hp : p ≠ ∞) : + ∃ CB : ℝ≥0∞, CB ≠ ∞ ∧ ∀ j k : ℕ, ∀ a ∈ cubeSplineScheme p d r (2 ^ j), + lpCubeModulus p r a k ≤ + CB * dyadicWeight (-(((r - 1 : ℕ) : ℝ) + 1 / p.toReal)) (k - j) * ‖a‖ₑ := by + obtain ⟨K, hK, hKb⟩ := enorm_polyFun_le (p := p) r hp + refine ⟨d * (2 ^ r * (1 + splineInverseConst r K p)), + ENNReal.mul_ne_top (ENNReal.natCast_ne_top d) (ENNReal.mul_ne_top (by simp) + (ENNReal.add_ne_top.2 ⟨ENNReal.one_ne_top, splineInverseConst_ne_top r hK⟩)), + fun j k a ha => ?_⟩ + obtain ⟨g, hg, hae⟩ := mem_cubeSplineScheme_two_pow.1 ha + refine lpCubeModulus_le_of_coord hp (two_pow_le_two_pow_mul_one_add r _) hg.1.1 hae + fun hjk i h hh0 hh => ?_ + refine ((eLpNorm_cubeDiff_le_of_isCubeSpline hg hKb hp i hh0 (hh.trans + (one_div_le_one_div_of_le (by positivity) (pow_le_pow_right₀ (by norm_num) hjk)))).trans + (splineStripConst_mul_le hjk K hh _)).trans ?_ + gcongr + exact le_two_pow_mul_one_add r _ + +/-- The modulus `ω_r(f, 2^(-k))_p` on the cube is compatible with the scheme of tensor splines of +order `r`, with inverse order `θ = r - 1 + 1/p` and Jackson's inequality at every level. -/ +noncomputable def cubeSplineModulusData {r : ℕ} (hr : 1 ≤ r) (hp : p ≠ ∞) : + ApproximationScheme.ModulusData (cubeSplineScheme p d r) (((r - 1 : ℕ) : ℝ) + 1 / p.toReal) := + .ofExists (lpCubeModulus p r) (lpCubeModulus_add_le hp r) (d * 2 ^ r) + (ENNReal.mul_ne_top (ENNReal.natCast_ne_top d) (by simp)) (lpCubeModulus_le hp r) 0 + ((exists_approxError_cubeSplineScheme_le hr hp).imp fun _ h => ⟨h.1, fun f k _ => h.2 f k⟩) + (exists_inverse_cubeSplineScheme hp) + +/-- **Approximation by tensor splines on the cube.** For `1 ≤ p < ∞`, `1 ≤ q ≤ ∞`, `r ≥ 1` and +`0 ≤ s < r - 1 + 1/p`, an `f ∈ L_p([0, 1]^d)` lies in the approximation space `A^s_q` of the +splines of order `r` in each variable on dyadic cubes iff its Besov quasi-norm +`‖f‖_p + ‖(2^(ks) ω_r(f, 2^(-k))_p)_k‖_{ℓ_q}` is finite, where `ω_r = ∑_i ω_r^{(i)}` is the sum +of the moduli in the coordinates. -/ +theorem memApprox_cubeSplineScheme_iff {r : ℕ} (hr : 1 ≤ r) (hp : p ≠ ∞) {s : ℝ} {q : ℝ≥0∞} + (hq : 1 ≤ q) (hs : 0 ≤ s) (hsr : s < (r : ℝ) - 1 + 1 / p.toReal) (f : Lp ℂ p (cubeVol d)) : + (cubeSplineScheme p d r).MemApprox s q f ↔ + ‖f‖ₑ + ENNReal.lqNorm q (fun k => dyadicWeight s k * lpCubeModulus p r f k) < ∞ := by + have hθ : (r : ℝ) - 1 + 1 / p.toReal = ((r - 1 : ℕ) : ℝ) + 1 / p.toReal := by + rw [Nat.cast_sub hr, Nat.cast_one] + exact (cubeSplineModulusData hr hp).memApprox_iff_modNorm_lt_top hq hs (hθ ▸ hsr) f + +end Cube diff --git a/LeanPool/FunctionSpaces/Domains/Cube/SplineJackson.lean b/LeanPool/FunctionSpaces/Domains/Cube/SplineJackson.lean new file mode 100644 index 0000000000..195b75ca41 --- /dev/null +++ b/LeanPool/FunctionSpaces/Domains/Cube/SplineJackson.lean @@ -0,0 +1,108 @@ +/- +Copyright (c) 2026 Mario Ullrich. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Mario Ullrich +-/ +module + +public import LeanPool.FunctionSpaces.Domains.Cube.Splines +public import LeanPool.FunctionSpaces.Domains.Cube.PiecewiseJackson + +/- +Modified for Lean Pool: module names and imports adapted. +-/ + +/-! +# Jackson's inequality for tensor splines on the cube + +For `1 ≤ p < ∞` and `r ≥ 1` there is `C_J < ∞` with `E_{2^k}(f)_p ≤ C_J ω_r(f, 2^(-k))_p` for every +`f ∈ L_p(Q)`, `Q = [0, 1]^d`, and every level `k`, where `E` is the error of best approximation +by splines of order `r` in each variable (`Cube.exists_approxError_cubeSplineScheme_le`). + +For `k ≥ r + 2` the approximant of a bounded continuous `f` is the tensor quasi-interpolant. In +coordinate `i`, every slice of `f - Q_k^{(i)} f` is the error of the quasi-interpolant in one +variable, and `Interval.exists_eLpNorm_sub_qi_le_of_taylor` bounds it by the smoothings of `f` in +coordinate `i` on `{x_i ≤ 3/4}` and `{x_i ≥ 1/4}` (`Cube.exists_left_cubeSmoothing`, +`Cube.exists_right_cubeSmoothing` with `L = 2^(-k)`); the windows of the quasi-interpolant have +length at most `1/4`. The transfer lemma `Cube.eLpNorm_sub_slicewise_le_of_smoothing` passes the +bound to the cube (`Cube.exists_eLpNorm_sub_slicewise_qiKernel_le`), and the errors telescope over +the coordinates (`Cube.KernelOp.eLpNorm_sub_foldSlicewise_le_of_coord`). The coarse levels +`k ≤ r + 1` use Whitney's inequality on the cube at the scale `2^(-(r+1))`: the splines of level +`0` contain the polynomials of degree `< r` in each variable. +-/ + +@[expose] public section + +open MeasureTheory Set Polynomial +open scoped ENNReal BoundedContinuousFunction + +namespace Cube + +open Interval + +variable {d : ℕ} {p : ℝ≥0∞} [Fact (1 ≤ p)] + +/-- **Jackson's estimate for splines in one coordinate**: there is `B < ∞` with +`‖f - Q_k^{(i)} f‖_{L_p(Q)} ≤ B ω_r^{(i)}(f, 2^(-k))_p` for every continuous `f`, every +coordinate `i` and every `k ≥ r + 2`. -/ +theorem exists_eLpNorm_sub_slicewise_qiKernel_le {r : ℕ} (hr : 1 ≤ r) (hp : p ≠ ∞) : + ∃ B : ℝ≥0∞, B ≠ ∞ ∧ ∀ {f : (Fin d → ℝ) → ℂ}, Continuous f → ∀ (i : Fin d) {k : ℕ}, + r + 2 ≤ k → eLpNorm (fun x => f x - (qiKernel hr k).slicewise i f x) p (cubeVol d) ≤ + B * coordModulus r p i f (1 / 2 ^ k) := by + have hp1 : 1 ≤ p := Fact.out + obtain ⟨A, hA, hAb⟩ := exists_eLpNorm_sub_qi_le_of_taylor (p := p) hr hp + have hJ : 1 + (r : ℝ≥0∞) ^ r * (2 ^ r * (r : ℝ≥0∞) ^ (2 * r)) ≠ ∞ := + ENNReal.add_ne_top.2 ⟨ENNReal.one_ne_top, ENNReal.mul_ne_top + (ENNReal.pow_ne_top (ENNReal.natCast_ne_top r)) + (ENNReal.mul_ne_top (by simp) (ENNReal.pow_ne_top (ENNReal.natCast_ne_top r)))⟩ + refine ⟨A * (2 * (1 + (r : ℝ≥0∞) ^ r * (2 ^ r * (r : ℝ≥0∞) ^ (2 * r)))), + ENNReal.mul_ne_top hA (ENNReal.mul_ne_top (by simp) hJ), fun {f} hf i {k} hk => ?_⟩ + have hL : (0 : ℝ) < 1 / 2 ^ k := by positivity + have hwL : (3 / 4 : ℝ) + 1 / 2 ^ k ≤ 1 := by + have : (1 : ℝ) / 2 ^ k ≤ 1 / 4 := by + rw [div_le_div_iff₀ (by positivity) (by norm_num), one_mul, one_mul] + calc (4 : ℝ) = 2 ^ 2 := by norm_num + _ ≤ 2 ^ k := pow_le_pow_right₀ (by norm_num) (by omega) + linarith + refine eLpNorm_sub_slicewise_le_of_smoothing (qiKernel hr k) hf hr hp1 hp i hL hwL + (c := A) (M := ENNReal.ofReal ((r : ℝ) / 2 ^ k) ^ r) (fun hu hG₁ hD₁ hG₂ hD₂ hTL hTR => ?_) + fun ha hb => add_ofReal_div_pow_mul_le r k ha hb + rw [show (1 : ℝ) - 3 / 4 = 1 / 4 by norm_num, qiKernel_apply hr k hu.integrableOn_Icc] + exact hAb hk hu.measurable (fun m _ => integrableOn_dyadicIco_of_continuous hu k m) hG₁ hD₁ hG₂ + hD₂ hTL hTR + +/-- **Jackson's inequality for tensor splines on the cube**: for `1 ≤ p < ∞` and `r ≥ 1` there is +`C_J < ∞` with `E_{2^k}(f)_p ≤ C_J ω_r(f, 2^(-k))_p` for every `f ∈ L_p(Q)` and every `k ≥ 0`: +the tensor quasi-interpolant for `k ≥ r + 2`, Whitney's inequality for `k ≤ r + 1`. -/ +theorem exists_approxError_cubeSplineScheme_le {r : ℕ} (hr : 1 ≤ r) (hp : p ≠ ∞) : + ∃ CJ : ℝ≥0∞, CJ ≠ ∞ ∧ ∀ (f : Lp ℂ p (cubeVol d)) (k : ℕ), + (cubeSplineScheme p d r).approxError f (2 ^ k) ≤ CJ * lpCubeModulus p r f k := by + have hp1 : 1 ≤ p := Fact.out + obtain ⟨B, hB, hBb⟩ := exists_eLpNorm_sub_slicewise_qiKernel_le (d := d) (p := p) hr hp + obtain ⟨Cq, hCq, hCqb⟩ := exists_eLpNorm_qiKernel_apply_le (p := p) hr hp + obtain ⟨W, hW, hWb⟩ := + exists_approxError_cubePPScheme_one_le (d := d) (p := p) hr hp (m := r + 1) (by omega) + have hF : (1 + Cq) ^ d * B ≠ ∞ := ENNReal.mul_ne_top + (ENNReal.pow_ne_top (ENNReal.add_ne_top.2 ⟨ENNReal.one_ne_top, hCq⟩)) hB + refine ⟨W + (1 + Cq) ^ d * B, ENNReal.add_ne_top.2 ⟨hW, hF⟩, fun f k => ?_⟩ + rcases lt_or_ge k (r + 2) with hk | hk + · -- the coarse levels: Whitney's inequality + calc (cubeSplineScheme p d r).approxError f (2 ^ k) + ≤ (cubeSplineScheme p d r).approxError f 1 := + ApproximationScheme.approxError_anti f Nat.one_le_two_pow + _ ≤ (cubePPScheme p d r).approxError f 1 := approxError_cubeSplineScheme_one_le r f + _ ≤ W * lpCubeModulus p r f (r + 1) := hWb f + _ ≤ (W + (1 + Cq) ^ d * B) * lpCubeModulus p r f k := + mul_le_mul' le_self_add (lpCubeModulus_anti r f (by omega)) + · -- the fine levels: the tensor quasi-interpolant + refine (approxError_le_of_continuous hp hF (fun g => ?_) f).trans + (mul_le_mul' le_add_self le_rfl) + have hgb : BddMeas (g : (Fin d → ℝ) → ℂ) := + ⟨g.continuous.measurable, ‖g‖, g.norm_coe_le_norm⟩ + have hS := isCubeSpline_cubeQI hr k hgb + exact ⟨cubeQI hr k g, ⟨(hS.1.memLp p (cubeVol d)).toLp _, + mem_cubeSplineScheme_two_pow.2 ⟨_, hS, MemLp.coeFn_toLp _⟩, MemLp.coeFn_toLp _⟩, + (qiKernel hr k).eLpNorm_sub_foldSlicewise_le_of_coord hp1 hp (hCqb k) hgb + fun i => hBb g.continuous i hk⟩ + +end Cube diff --git a/LeanPool/FunctionSpaces/Domains/Cube/Splines.lean b/LeanPool/FunctionSpaces/Domains/Cube/Splines.lean new file mode 100644 index 0000000000..55e84e77f4 --- /dev/null +++ b/LeanPool/FunctionSpaces/Domains/Cube/Splines.lean @@ -0,0 +1,323 @@ +/- +Copyright (c) 2026 Mario Ullrich. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Mario Ullrich +-/ +module + +public import LeanPool.FunctionSpaces.Domains.Cube.PiecewisePoly +public import LeanPool.FunctionSpaces.Domains.Interval.SplineJackson + +/- +Modified for Lean Pool: module names and imports adapted. +-/ + +/-! +# Tensor splines on the cube + +The spline quasi-interpolant `Q_k g = ∑_n λ_n(g) N_r(2^k x - n)` of +`FunctionSpaces.Domains.Interval.QuasiInterp` is a finite-rank kernel operator (`Cube.qiKernel`, +`Cube.qiKernel_apply`): its coefficients `λ_n` are combinations of the coefficients of the local +projection on one interval (`Interval.qiCoeff_eq_sum`), so `λ_n(g) = ∫_0^1 g κ_n` with a bounded +kernel `κ_n`, and its functions are the B-splines `N_r(2^k x - n)` on `[0, 1)`. It is bounded on +`L_p[0, 1]` uniformly in `k` (`Cube.exists_eLpNorm_qiKernel_apply_le`). + +A function on the cube `Q = [0, 1]^d` is a **spline of order `r` and level `k` in each variable** +(`Cube.IsCubeSpline`) if it is bounded and measurable and every slice in every coordinate is a +dyadic spline of order `r` and level `k` on `[0, 1]`. These functions form subspaces of `L_p(Q)` +increasing in `k` (`Cube.cubeSplineSpace`) and the scheme `Cube.cubeSplineScheme`; at level `0` +they contain the polynomials of degree `< r` in each variable (`Cube.IsCubePP.isCubeSpline_zero`). +The **tensor quasi-interpolant** `Q_k^{(0)} ⋯ Q_k^{(d-1)} g` (`Cube.cubeQI`) has the form of `Q_k` +in every coordinate, so its slices are combinations of B-splines (`Cube.isCubeSpline_cubeQI`). + +Since `Q_k` reproduces the splines (`Interval.ppFun_qiPieces_ppFun`), in particular its own +B-splines (`Cube.qiKernel_reproduces`), the splines on the cube are the **tensor products** of the +splines in one variable: the combinations of products `∏_i u_i(x_i)` of dyadic splines `u_i` on +`[0, 1]` (`Cube.isCubeSpline_iff_mem_span_prod_ppFun`), or of products of B-splines +(`Cube.isCubeSpline_iff_mem_span`). +-/ + +@[expose] public section + +open MeasureTheory Set Polynomial +open scoped ENNReal + +namespace Cube + +open Interval + +/-! ### The quasi-interpolant as a kernel operator -/ + +/-- The interval `J(n) = I_{k, max(n, 0)}` of a coefficient `λ_n`, `-r < n < 2^k`, lies in +`[0, 1)`. -/ +theorem toNat_lt_of_mem_qiIdx {r k : ℕ} {n : ℤ} (hn : n ∈ qiIdx r (2 ^ k)) : n.toNat < 2 ^ k := by + rw [qiIdx, Finset.mem_Ioo] at hn + have h2 : 0 < 2 ^ k := Nat.two_pow_pos k + generalize 2 ^ k = N at hn h2 ⊢ + omega + +/-- The **quasi-interpolant of level `k` as a kernel operator**, indexed by the B-splines +`-r < n < 2^k`: the kernel `κ_n = ∑_i β_{n,i} κ_{J(n),i}` combines the kernels of the local +projection on `J(n)` (`Cube.ppKernel`), and `φ_n` is the B-spline `N_r(2^k x - n)` on `[0, 1)`. -/ +noncomputable def qiKernel {r : ℕ} (hr : 1 ≤ r) (k : ℕ) : KernelOp (qiIdx r (2 ^ k)) where + kernel n s := ∑ i : Fin r, bsplineCoef hr (qiBasisPoly r k (n : ℤ).toNat i) n * + (ppKernel r k).kernel (⟨(n : ℤ).toNat, toNat_lt_of_mem_qiIdx n.2⟩, i) s + rangeFn n := ppFun k (bsplinePieces r k n) + bddMeas_kernel _ := bddMeas_sum _ fun _ _ => ((ppKernel r k).bddMeas_kernel _).const_mul _ + bddMeas_rangeFn _ := bddMeas_ppFun k _ + +/-- The coefficients of the kernel operator are the quasi-interpolant coefficients, for `g` +integrable on `[0, 1]`. -/ +theorem qiKernel_coef {r : ℕ} (hr : 1 ≤ r) (k : ℕ) {g : ℝ → ℂ} + (hg : IntegrableOn g (Icc (0 : ℝ) 1)) (n : qiIdx r (2 ^ k)) : + (qiKernel hr k).coef g n = qiCoeff hr k g n := by + calc (qiKernel hr k).coef g n + = ∫ s in Icc (0 : ℝ) 1, ∑ i : Fin r, bsplineCoef hr (qiBasisPoly r k (n : ℤ).toNat i) n * + (g s * (ppKernel r k).kernel (⟨(n : ℤ).toNat, toNat_lt_of_mem_qiIdx n.2⟩, i) s) := by + rw [KernelOp.coef] + congr 1 + funext s + simp only [qiKernel] + rw [Finset.mul_sum] + exact Finset.sum_congr rfl fun i _ => by ring + _ = ∑ i : Fin r, ∫ s in Icc (0 : ℝ) 1, bsplineCoef hr (qiBasisPoly r k (n : ℤ).toNat i) n * + (g s * (ppKernel r k).kernel (⟨(n : ℤ).toNat, toNat_lt_of_mem_qiIdx n.2⟩, i) s) := + integral_finsetSum _ fun i _ => + ((ppKernel r k).integrableOn_mul_kernel hg _).const_mul _ + _ = ∑ i : Fin r, bsplineCoef hr (qiBasisPoly r k (n : ℤ).toNat i) n * + locCoeff r k g (n : ℤ).toNat i := by + refine Finset.sum_congr rfl fun i _ => ?_ + rw [integral_const_mul, ← KernelOp.coef, ppKernel_coef] + _ = qiCoeff hr k g n := by + rw [qiCoeff_eq_sum] + exact Finset.sum_congr rfl fun i _ => mul_comm _ _ + +/-- **The kernel operator is the quasi-interpolant**: `(qiKernel hr k).apply g = Q_k g` for `g` +integrable on `[0, 1]`. -/ +theorem qiKernel_apply {r : ℕ} (hr : 1 ≤ r) (k : ℕ) {g : ℝ → ℂ} + (hg : IntegrableOn g (Icc (0 : ℝ) 1)) : + (qiKernel hr k).apply g = ppFun k (qiPieces hr k (2 ^ k) g) := by + funext t + rw [KernelOp.apply, qiPieces, ppFun_sum, Finset.sum_apply, + ← Finset.sum_coe_sort (qiIdx r (2 ^ k))] + refine Finset.sum_congr rfl fun n _ => ?_ + rw [qiKernel_coef hr k hg n, ppFun_const_mul] + rfl + +/-- **The quasi-interpolant is bounded on `L_p[0, 1]`** as a kernel operator, uniformly in the +level: there is `C < ∞` with `‖Q_k u‖_{L_p[0,1]} ≤ C ‖u‖_{L_p[0,1]}` for all `k` and all +measurable `u`. -/ +theorem exists_eLpNorm_qiKernel_apply_le {r : ℕ} (hr : 1 ≤ r) {p : ℝ≥0∞} [Fact (1 ≤ p)] + (hp : p ≠ ∞) : + ∃ C : ℝ≥0∞, C ≠ ∞ ∧ ∀ (k : ℕ) (u : ℝ → ℂ), Measurable u → + eLpNorm ((qiKernel hr k).apply u) p unitVol ≤ C * eLpNorm u p unitVol := by + obtain ⟨C, hC, hCb⟩ := exists_eLpNorm_qi_le (p := p) hr hp + refine ⟨C + 1, ENNReal.add_ne_top.2 ⟨hC, ENNReal.one_ne_top⟩, fun k u hu => ?_⟩ + rcases eq_or_ne (eLpNorm u p unitVol) ∞ with hinf | hfin + · rw [hinf, ENNReal.mul_top (ne_of_gt (lt_of_lt_of_le zero_lt_one le_add_self))] + exact le_top + · have hmem : MemLp u p unitVol := lt_top_iff_ne_top.2 hfin + have hint : IntegrableOn u (Icc (0 : ℝ) 1) := (hmem.integrable Fact.out : Integrable u unitVol) + rw [qiKernel_apply hr k hint] + exact (hCb k hu fun m hm => hint.mono_set + ((dyadicIco_subset hm).trans Ico_subset_Icc_self)).trans (mul_le_mul' le_self_add le_rfl) + +/-! ### Splines on the cube -/ + +variable {d : ℕ} + +/-- A function on the cube is a **spline of order `r` and level `k` in each variable**: bounded +and measurable, and every slice in every coordinate is a dyadic spline of order `r` and level `k` +on `[0, 1]`. -/ +def IsCubeSpline (r k : ℕ) (g : (Fin d → ℝ) → ℂ) : Prop := + BddMeas g ∧ ∀ (i : Fin d) (x : Fin d → ℝ), ∃ Q : ℕ → ℂ[X], (∀ n, Q n ∈ degreeLT ℂ r) ∧ + SplineJoins r k Q ∧ slice g x i = ppFun k Q + +/-- Splines of level `k` are splines of level `k + 1`. -/ +theorem IsCubeSpline.succ {r k : ℕ} {g : (Fin d → ℝ) → ℂ} (h : IsCubeSpline r k g) : + IsCubeSpline r (k + 1) g := + ⟨h.1, fun i x => by + obtain ⟨Q, hQ, hJ, hs⟩ := h.2 i x + exact ⟨fun m => Q (m / 2), fun m => hQ _, hJ.refine, hs.trans (ppFun_refine_eq k Q).symm⟩⟩ + +/-- Sums of splines on the cube. -/ +theorem IsCubeSpline.add {r k : ℕ} {f g : (Fin d → ℝ) → ℂ} (hf : IsCubeSpline r k f) + (hg : IsCubeSpline r k g) : IsCubeSpline r k (f + g) := + ⟨hf.1.add hg.1, fun i x => by + obtain ⟨Q, hQ, hJ, hs⟩ := hf.2 i x + obtain ⟨Q', hQ', hJ', hs'⟩ := hg.2 i x + refine ⟨Q + Q', fun n => Submodule.add_mem _ (hQ n) (hQ' n), hJ.add hJ', ?_⟩ + rw [ppFun_add, ← hs, ← hs'] + rfl⟩ + +/-- Constant multiples of splines on the cube. -/ +theorem IsCubeSpline.const_mul {r k : ℕ} {g : (Fin d → ℝ) → ℂ} (hg : IsCubeSpline r k g) + (a : ℂ) : IsCubeSpline r k (fun x => a * g x) := + ⟨hg.1.const_mul a, fun i x => by + obtain ⟨Q, hQ, hJ, hs⟩ := hg.2 i x + refine ⟨fun n => C a * Q n, fun n => by + change C a * Q n ∈ degreeLT ℂ r + rw [← smul_eq_C_mul]; exact Submodule.smul_mem _ _ (hQ n), hJ.const_mul a, ?_⟩ + rw [ppFun_const_mul, ← hs] + rfl⟩ + +/-- The zero function is a spline on the cube. -/ +theorem isCubeSpline_zero (r k : ℕ) : IsCubeSpline (d := d) r k 0 := + ⟨bddMeas_zero, fun _ _ => ⟨0, fun _ => Submodule.zero_mem _, splineJoins_zero r k, by + rw [ppFun_zero]; rfl⟩⟩ + +/-- **At level `0` the piecewise polynomials are splines**: there are no interior knots. -/ +theorem IsCubePP.isCubeSpline_zero {r : ℕ} {g : (Fin d → ℝ) → ℂ} (hg : IsCubePP r 0 g) : + IsCubeSpline r 0 g := + ⟨hg.1, fun i x => by + obtain ⟨Q, hQ, hs⟩ := hg.exists_slice_eq_ppFun i x + exact ⟨Q, hQ, fun n hn hn1 => absurd hn1 (by rw [pow_zero]; omega), hs⟩⟩ + +/-- The **tensor quasi-interpolant**: the quasi-interpolant `Q_k` applied in all coordinates, +`Q_k^{(0)} ∘ ⋯ ∘ Q_k^{(d-1)}`. -/ +noncomputable def cubeQI {r : ℕ} (hr : 1 ≤ r) (k : ℕ) (g : (Fin d → ℝ) → ℂ) : + (Fin d → ℝ) → ℂ := + (qiKernel hr k).foldSlicewise (List.finRange d) g + +/-- **The forms of the quasi-interpolant are splines on the cube**: a bounded measurable function +with the form of `Q_k` in every coordinate has slices that are combinations of B-splines. -/ +theorem isCubeSpline_of_isForm {r : ℕ} (hr : 1 ≤ r) {k : ℕ} {g : (Fin d → ℝ) → ℂ} + (hg : BddMeas g) (hform : ∀ i, (qiKernel hr k).IsForm i g) : IsCubeSpline r k g := by + refine ⟨hg, fun i x => ?_⟩ + obtain ⟨a, ha⟩ := (hform i).slice_eq _ x + refine ⟨∑ n : qiIdx r (2 ^ k), fun m => C (a n) * bsplinePieces r k n m, fun m => ?_, ?_, ?_⟩ + · rw [Finset.sum_apply] + exact Submodule.sum_mem _ fun n _ => by + rw [← smul_eq_C_mul]; exact Submodule.smul_mem _ _ (bsplinePieces_mem hr k n m) + · exact SplineJoins.sum _ fun n _ => (splineJoins_bsplinePieces hr k n).const_mul (a n) + · rw [ha, ppFun_sum] + funext t + rw [Finset.sum_apply] + refine Finset.sum_congr rfl fun n _ => ?_ + rw [ppFun_const_mul] + rfl + +/-- **The tensor quasi-interpolant is a spline on the cube**: it has the form of `Q_k` in every +coordinate, so its slices are combinations of B-splines. -/ +theorem isCubeSpline_cubeQI {r : ℕ} (hr : 1 ≤ r) (k : ℕ) {g : (Fin d → ℝ) → ℂ} + (hg : BddMeas g) : IsCubeSpline r k (cubeQI hr k g) := + isCubeSpline_of_isForm hr ((qiKernel hr k).bddMeas_foldSlicewise _ hg) + fun i => (qiKernel hr k).isForm_foldSlicewise _ hg (List.mem_finRange i) + +/-! ### Tensor products -/ + +/-- The quasi-interpolant reproduces its B-splines `N_r(2^k x - n)`. -/ +theorem qiKernel_reproduces {r : ℕ} (hr : 1 ≤ r) (k : ℕ) : (qiKernel hr k).Reproduces := + fun n => by + change (qiKernel hr k).apply (ppFun k (bsplinePieces r k n)) = ppFun k (bsplinePieces r k n) + rw [qiKernel_apply hr k (bddMeas_ppFun k _).integrableOn_Icc, + ppFun_qiPieces_ppFun hr (bsplinePieces_mem hr k n) (splineJoins_bsplinePieces hr k n)] + +/-- **The quasi-interpolant reproduces splines on the cube**: `Q_k^{(i)} g = g` in every +coordinate `i`, since it reproduces the slices. -/ +theorem IsCubeSpline.slicewise_qiKernel {r k : ℕ} (hr : 1 ≤ r) {g : (Fin d → ℝ) → ℂ} + (hg : IsCubeSpline r k g) (i : Fin d) : (qiKernel hr k).slicewise i g = g := by + funext x + obtain ⟨Q, hQ, hJ, hs⟩ := hg.2 i x + rw [KernelOp.slicewise, hs, qiKernel_apply hr k (bddMeas_ppFun k Q).integrableOn_Icc, + ppFun_qiPieces_ppFun hr hQ hJ, ← hs] + simp only [slice, Function.update_eq_self] + +/-- Splines on the cube have the form of `Q_k` in every coordinate. -/ +theorem IsCubeSpline.isForm {r k : ℕ} (hr : 1 ≤ r) {g : (Fin d → ℝ) → ℂ} + (hg : IsCubeSpline r k g) (i : Fin d) : (qiKernel hr k).IsForm i g := + KernelOp.IsForm.congr (qiKernel hr k) ((qiKernel hr k).isForm_slicewise hg.1 i) + (hg.slicewise_qiKernel hr i) + +/-- **Splines on the cube are tensor products of B-splines**: `g` is a spline of order `r` and +level `k` in each variable iff it is a combination of the products `∏_i N_r(2^k x_i - n_i)` of the +B-splines that meet `[0, 1)`. -/ +theorem isCubeSpline_iff_mem_span {r k : ℕ} (hr : 1 ≤ r) {g : (Fin d → ℝ) → ℂ} : + IsCubeSpline r k g ↔ g ∈ Submodule.span ℂ (Set.range fun j : Fin d → qiIdx r (2 ^ k) => + fun x => ∏ i, (qiKernel hr k).rangeFn (j i) (x i)) := by + have : Nonempty (qiIdx r (2 ^ k)) := ⟨⟨0, by + rw [qiIdx, Finset.mem_Ioo] + exact ⟨by omega, by exact_mod_cast Nat.two_pow_pos k⟩⟩⟩ + exact ⟨fun h => (qiKernel hr k).mem_span_prod_of_isForm (qiKernel_reproduces hr k) h.1 + (h.isForm hr), + fun h => isCubeSpline_of_isForm hr ((qiKernel hr k).isForm_of_mem_span_prod h).1 + ((qiKernel hr k).isForm_of_mem_span_prod h).2⟩ + +/-- **Splines on the cube are the tensor products of splines in one variable**: the splines of +order `r` and level `k` in each variable are the combinations of products `∏_i u_i(x_i)` of dyadic +splines `u_i` of order `r` and level `k` on `[0, 1]`. -/ +theorem isCubeSpline_iff_mem_span_prod_ppFun {r k : ℕ} (hr : 1 ≤ r) {g : (Fin d → ℝ) → ℂ} : + IsCubeSpline r k g ↔ g ∈ Submodule.span ℂ {G | ∃ Q : Fin d → ℕ → ℂ[X], + (∀ i n, Q i n ∈ degreeLT ℂ r) ∧ (∀ i, SplineJoins r k (Q i)) ∧ + G = fun x => ∏ i, ppFun k (Q i) (x i)} := by + rw [isCubeSpline_iff_mem_span hr] + constructor + · refine fun h => Submodule.span_mono ?_ h + rintro _ ⟨j, rfl⟩ + exact ⟨fun i => bsplinePieces r k (j i), fun i n => bsplinePieces_mem hr k _ n, + fun i => splineJoins_bsplinePieces hr k _, rfl⟩ + · refine fun h => (Submodule.span_le.2 ?_) h + rintro _ ⟨Q, hQ, hJ, rfl⟩ + have hexp : ∀ i (t : ℝ), ppFun k (Q i) t = + ∑ m, (qiKernel hr k).coef (ppFun k (Q i)) m * (qiKernel hr k).rangeFn m t := fun i t => by + have h := congrFun (qiKernel_apply hr k (bddMeas_ppFun k (Q i)).integrableOn_Icc) t + rw [ppFun_qiPieces_ppFun hr (hQ i) (hJ i)] at h + rw [← h] + rfl + have hG : (fun x : Fin d → ℝ => ∏ i, ppFun k (Q i) (x i)) = + ∑ j : Fin d → qiIdx r (2 ^ k), (∏ i, (qiKernel hr k).coef (ppFun k (Q i)) (j i)) • + fun x : Fin d → ℝ => ∏ i, (qiKernel hr k).rangeFn (j i) (x i) := by + funext x + simp only [hexp, Finset.prod_univ_sum, Fintype.piFinset_univ, Finset.sum_apply, + Pi.smul_apply, smul_eq_mul, Finset.prod_mul_distrib] + rw [hG] + exact Submodule.sum_mem _ fun j _ => Submodule.smul_mem _ _ (Submodule.subset_span ⟨j, rfl⟩) + +variable {p : ℝ≥0∞} [Fact (1 ≤ p)] + +variable (p) in +/-- The space of **splines of order `r` and level `k` in each variable** in `L_p(Q)`. -/ +noncomputable def cubeSplineSpace (r k : ℕ) : Submodule ℝ (Lp ℂ p (cubeVol d)) where + carrier := {f | ∃ g, IsCubeSpline r k g ∧ (f : (Fin d → ℝ) → ℂ) =ᵐ[cubeVol d] g} + add_mem' := by + rintro f f' ⟨g, hg, hfg⟩ ⟨g', hg', hfg'⟩ + exact ⟨g + g', hg.add hg', (Lp.coeFn_add f f').trans (hfg.add hfg')⟩ + zero_mem' := ⟨0, isCubeSpline_zero r k, Lp.coeFn_zero ℂ p (cubeVol d)⟩ + smul_mem' := by + rintro c f ⟨g, hg, hfg⟩ + refine ⟨fun x => (c : ℂ) * g x, hg.const_mul c, ?_⟩ + filter_upwards [Lp.coeFn_smul c f, hfg] with x h1 h2 + rw [h1, Pi.smul_apply, h2, Complex.real_smul] + +omit [Fact (1 ≤ p)] in +/-- The spline spaces on the cube increase with the level. -/ +theorem cubeSplineSpace_mono (r : ℕ) : Monotone (cubeSplineSpace (d := d) p r) := + monotone_nat_of_le_succ fun _ _ ⟨g, hg, hfg⟩ => ⟨g, hg.succ, hfg⟩ + +variable (p) in +/-- The **scheme of tensor splines on the cube**: `{0}` at complexity `0` and the splines of +level `⌊log₂ n⌋` in each variable at complexity `n ≥ 1`. -/ +noncomputable def cubeSplineScheme (d r : ℕ) : ApproximationScheme (Lp ℂ p (cubeVol d)) := + ApproximationScheme.ofMonotoneSubmodules (cubeSplineSpace p r) (cubeSplineSpace_mono r) + +/-- The approximants of complexity `2^k` are the splines of level `k`. -/ +theorem mem_cubeSplineScheme_two_pow {r k : ℕ} {g : Lp ℂ p (cubeVol d)} : + g ∈ cubeSplineScheme p d r (2 ^ k) ↔ g ∈ cubeSplineSpace p r k := + ApproximationScheme.mem_ofMonotoneSubmodules_two_pow + +/-- The scheme of tensor splines is linear. -/ +theorem cubeSplineScheme_isLinear (r : ℕ) : (cubeSplineScheme p d r).IsLinear := + ApproximationScheme.isLinear_ofMonotoneSubmodules _ _ + +/-- At complexity `1` the tensor splines contain the polynomials of degree `< r` in each +variable, so their error is at most that of the piecewise polynomials. -/ +theorem approxError_cubeSplineScheme_one_le (r : ℕ) (f : Lp ℂ p (cubeVol d)) : + (cubeSplineScheme p d r).approxError f 1 ≤ (cubePPScheme p d r).approxError f 1 := by + have hsub : (cubePPScheme p d r 1 : Set (Lp ℂ p (cubeVol d))) ⊆ cubeSplineScheme p d r 1 := by + intro g hg + obtain ⟨g', hg', hgg'⟩ := (mem_cubePPScheme_two_pow (k := 0)).1 hg + exact (mem_cubeSplineScheme_two_pow (k := 0)).2 ⟨g', hg'.isCubeSpline_zero, hgg'⟩ + rw [ApproximationScheme.approxError, ApproximationScheme.approxError] + exact Metric.infEDist_anti hsub + +end Cube diff --git a/LeanPool/FunctionSpaces/Domains/Extension/HalfSpaceReflection.lean b/LeanPool/FunctionSpaces/Domains/Extension/HalfSpaceReflection.lean new file mode 100644 index 0000000000..721e0630d4 --- /dev/null +++ b/LeanPool/FunctionSpaces/Domains/Extension/HalfSpaceReflection.lean @@ -0,0 +1,769 @@ +/- +Copyright (c) 2026 Mario Ullrich. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Mario Ullrich +-/ +module + +public import LeanPool.FunctionSpaces.Rd.Sobolev.WeakDerivativeChangeOfVariables +public import Mathlib.Analysis.SpecialFunctions.SmoothTransition +public import Mathlib.Analysis.InnerProductSpace.Projection.Reflection + +/- +Modified for Lean Pool: module names and imports adapted. +-/ + +/-! +# Even reflection across a hyperplane + +Let `e` be a unit vector of a finite-dimensional real inner product space `V`, +`H₊ = {y : ⟪y, e⟫ > 0}` the open half-space (`Rd.openHalfSpace`) and `σ y = y - 2⟪y, e⟫ e` the +reflection across `e^⊥` (`Rd.halfSpaceReflection`, Mathlib's `Submodule.reflection`), a linear +isometry that preserves Lebesgue measure. + +* **Two general facts** (`Real.smoothTransition.exists_abs_deriv_le`, + `MeasureTheory.locallyIntegrable_of_forall_integrableOn_ball`): the derivative of Mathlib's + smooth step is bounded and vanishes outside `[0, 1]`, and a function integrable on every ball + around a point is locally integrable. +* **The even reflection** (`Rd.evenReflection`): `E u = 1_{H₊} u + (1_{H₊} u) ∘ σ`, that is `u` on + `H₊` and `u ∘ σ` on `σ(H₊)`, linear in `u` (`Rd.evenReflection_add`, `Rd.evenReflection_smul`), + with `‖E u‖_{L_p(V)} ≤ 2 ‖u‖_{L_p(H₊)}` for `1 ≤ p` (`Rd.eLpNorm_evenReflection_le`). +* **Cutoffs near the hyperplane** (`Rd.halfSpaceCutoff`): `η_n(y) = s((n + 1)⟪y, e⟫ - 1)` with + Mathlib's smooth step `s = Real.smoothTransition`; their derivatives have size `n + 1` on a + strip of width `1/(n + 1)`. +* **Integration by parts on `H₊`** (`Rd.setIntegral_openHalfSpace_smul_add_eq`): for smooth + compactly supported `χ_1`, `χ_2` with `|⟪w_1, e⟫ χ_1 + ⟪w_2, e⟫ χ_2| ≤ C ⟪y, e⟫` on `H₊`, weak + derivatives `∂_{w_k} u` on `H₊` integrate by parts against them without a boundary term; the + cutoffs and dominated convergence give the limit. +* **Weak derivatives of the even reflection** (`Rd.hasWeakLineDeriv_evenReflection`; Brezis 2011, + Chapter 9): if `u` and its weak derivatives `h_i = ∂_{e_i} u` on `H₊` are integrable on the + bounded parts of `H₊`, then `∂_v E u = 1_{H₊} ∑_i ⟪v, e_i⟫ h_i + (1_{H₊} ∑_i ⟪σ v, e_i⟫ h_i) ∘ σ` + weakly on `V`. +-/ + +@[expose] public section + +open MeasureTheory Filter Topology TopologicalSpace Module Set Metric +open scoped ENNReal NNReal SchwartzMap LineDeriv Distributions + +/-! ### The derivative of the smooth step, and local integrability from balls -/ + +namespace Real.smoothTransition + +/-- The derivative of Mathlib's `Real.smoothTransition` vanishes for `x > 1`, where the function +is constantly `1`. -/ +theorem deriv_eq_zero_of_one_lt {x : ℝ} (hx : 1 < x) : + deriv Real.smoothTransition x = 0 := by + have h : Real.smoothTransition =ᶠ[𝓝 x] fun _ => 1 := + eventually_of_mem (isOpen_Ioi.mem_nhds hx) fun y hy => + Real.smoothTransition.one_of_one_le (le_of_lt hy) + rw [h.deriv_eq, deriv_const] + +/-- The derivative of Mathlib's `Real.smoothTransition` vanishes for `x < 0`, where the function +is constantly `0`. -/ +theorem deriv_eq_zero_of_neg {x : ℝ} (hx : x < 0) : + deriv Real.smoothTransition x = 0 := by + have h : Real.smoothTransition =ᶠ[𝓝 x] fun _ => 0 := + eventually_of_mem (isOpen_Iio.mem_nhds hx) fun y hy => + Real.smoothTransition.zero_of_nonpos (le_of_lt hy) + rw [h.deriv_eq, deriv_const] + +/-- **The derivative of `Real.smoothTransition` is bounded**: it is continuous and vanishes +outside `[0, 1]` (Mathlib's `Continuous.bounded_above_of_compact_support`). -/ +theorem exists_abs_deriv_le : ∃ D : ℝ, 0 ≤ D ∧ ∀ x, |deriv Real.smoothTransition x| ≤ D := by + have hc : Continuous (deriv Real.smoothTransition) := + (Real.smoothTransition.contDiff (n := 1)).continuous_deriv le_rfl + have hs : HasCompactSupport (deriv Real.smoothTransition) := + HasCompactSupport.intro isCompact_Icc fun x hx => by + rcases not_and_or.1 (show ¬(0 ≤ x ∧ x ≤ 1) from hx) with h | h + · exact deriv_eq_zero_of_neg (not_le.1 h) + · exact deriv_eq_zero_of_one_lt (not_le.1 h) + obtain ⟨D, hD⟩ := hc.bounded_above_of_compact_support hs + exact ⟨D, (abs_nonneg _).trans (hD 0), hD⟩ + +end Real.smoothTransition + +namespace MeasureTheory + +/-- **Local integrability from the balls**: a function integrable on every ball `B(x₀, R)` around +a fixed point `x₀` is locally integrable, since every point has the neighbourhood +`B(x₀, d(x, x₀) + 1)`. -/ +theorem locallyIntegrable_of_forall_integrableOn_ball {X E : Type*} [PseudoMetricSpace X] + [MeasurableSpace X] {μ : Measure X} [NormedAddCommGroup E] {f : X → E} (x₀ : X) + (h : ∀ R, IntegrableOn f (ball x₀ R) μ) : LocallyIntegrable f μ := fun x => + ⟨ball x₀ (dist x x₀ + 1), isOpen_ball.mem_nhds (by simp), h _⟩ + +end MeasureTheory + +namespace Rd + +/-! ### The half-space, the reflection and the even reflection -/ + +section Reflection + +variable {V : Type*} [NormedAddCommGroup V] [InnerProductSpace ℝ V] (e : V) + +/-- The **open half-space** `H₊ = {y : 0 < ⟪y, e⟫}`, an open set. -/ +def openHalfSpace : Opens V := + ⟨{y | 0 < inner ℝ y e}, isOpen_lt continuous_const (continuous_id.inner continuous_const)⟩ + +variable {e} in +/-- Membership in the open half-space: `y ∈ H₊` iff `0 < ⟪y, e⟫`. -/ +@[simp] +theorem mem_openHalfSpace {y : V} : y ∈ openHalfSpace e ↔ 0 < inner ℝ y e := + Iff.rfl + +/-- The open half-space as a set. -/ +theorem coe_openHalfSpace : (openHalfSpace e : Set V) = {y | 0 < inner ℝ y e} := + rfl + +/-- The **reflection** `σ` across the hyperplane `e^⊥` (Mathlib's `Submodule.reflection` in +`(ℝ e)^⊥`), a linear isometry of `V`; for `‖e‖ = 1`, `σ y = y - 2⟪y, e⟫ e` +(`Rd.halfSpaceReflection_apply`). -/ +noncomputable def halfSpaceReflection : V ≃ₗᵢ[ℝ] V := + (ℝ ∙ e)ᗮ.reflection + +variable {e} + +/-- **The reflection formula**: for a unit vector `e`, `σ y = y - 2⟪y, e⟫ e` (Mathlib's +`Submodule.reflection_orthogonal_apply` and `Submodule.reflection_singleton_apply`). -/ +theorem halfSpaceReflection_apply (he : ‖e‖ = 1) (y : V) : + halfSpaceReflection e y = y - (2 * inner ℝ y e) • e := by + rw [halfSpaceReflection, Submodule.reflection_orthogonal_apply, + Submodule.reflection_singleton_apply, he] + simp only [RCLike.ofReal_real_eq_id, id, one_pow, div_one, real_inner_comm e y] + module + +/-- **The reflection reverses the height**: `⟪σ y, e⟫ = -⟪y, e⟫` for a unit vector `e`. -/ +theorem inner_halfSpaceReflection (he : ‖e‖ = 1) (y : V) : + inner ℝ (halfSpaceReflection e y) e = -inner ℝ y e := by + rw [halfSpaceReflection_apply he, inner_sub_left, real_inner_smul_left, + real_inner_self_eq_norm_sq, he] + ring + +/-- The reflection is an involution: `σ (σ y) = y` (Mathlib's +`Submodule.reflection_reflection`). -/ +@[simp] +theorem halfSpaceReflection_halfSpaceReflection (y : V) : + halfSpaceReflection e (halfSpaceReflection e y) = y := + Submodule.reflection_reflection _ y + +/-- The reflection fixes the directions `w` with `⟪w, e⟫ = 0`. -/ +theorem halfSpaceReflection_of_inner_eq_zero (he : ‖e‖ = 1) {w : V} (hw : inner ℝ w e = 0) : + halfSpaceReflection e w = w := by + rw [halfSpaceReflection_apply he, hw, mul_zero, zero_smul, sub_zero] + +/-- The reflection maps `e` to `-e`. -/ +theorem halfSpaceReflection_self (he : ‖e‖ = 1) : halfSpaceReflection e e = -e := by + rw [halfSpaceReflection_apply he, real_inner_self_eq_norm_sq, he] + rw [show (2 * (1 : ℝ) ^ 2) • e = e + e by rw [one_pow, mul_one, two_smul]] + abel + +/-- The reflection of a point of `H₊` lies outside `H₊`. -/ +theorem halfSpaceReflection_notMem (he : ‖e‖ = 1) {y : V} (hy : y ∈ openHalfSpace e) : + halfSpaceReflection e y ∉ openHalfSpace e := by + rw [mem_openHalfSpace, inner_halfSpaceReflection he] at * + linarith + +/-- **The distance to the reflected point**: `‖y - σ y‖ = 2 |⟪y, e⟫|` for a unit vector `e`. -/ +theorem norm_sub_halfSpaceReflection (he : ‖e‖ = 1) (y : V) : + ‖y - halfSpaceReflection e y‖ = 2 * |inner ℝ y e| := by + rw [halfSpaceReflection_apply he, sub_sub_cancel, norm_smul, he, mul_one, Real.norm_eq_abs, + abs_mul, abs_two] + +variable (e) in +/-- The **even reflection** of `u` across the hyperplane `e^⊥`: +`E u (y) = 1_{H₊} u (y) + 1_{H₊} u (σ y)`, that is `u` on `H₊`, `u ∘ σ` on `σ(H₊)` and `0` on +the hyperplane. -/ +noncomputable def evenReflection (u : V → ℂ) (y : V) : ℂ := + (openHalfSpace e : Set V).indicator u y + + (openHalfSpace e : Set V).indicator u (halfSpaceReflection e y) + +/-- On `H₊` the even reflection of `u` is `u`. -/ +theorem evenReflection_of_mem (he : ‖e‖ = 1) (u : V → ℂ) {y : V} (hy : y ∈ openHalfSpace e) : + evenReflection e u y = u y := by + rw [evenReflection, indicator_of_mem hy, + indicator_of_notMem (halfSpaceReflection_notMem he hy), add_zero] + +/-- On `σ(H₊)` the even reflection of `u` is `u ∘ σ`. -/ +theorem evenReflection_of_reflection_mem (he : ‖e‖ = 1) (u : V → ℂ) {y : V} + (hy : halfSpaceReflection e y ∈ openHalfSpace e) : + evenReflection e u y = u (halfSpaceReflection e y) := by + have hy' : y ∉ openHalfSpace e := by + simpa using halfSpaceReflection_notMem he hy + rw [evenReflection, indicator_of_notMem hy', indicator_of_mem hy, zero_add] + +variable (e) in +/-- The even reflection is additive: `E(u + u') = E u + E u'`. -/ +theorem evenReflection_add (u u' : V → ℂ) : + evenReflection e (u + u') = evenReflection e u + evenReflection e u' := by + funext y + simp only [evenReflection, indicator_add', Pi.add_apply] + ring + +variable (e) in +/-- The even reflection is homogeneous: `E(c u) = c E u`. -/ +theorem evenReflection_smul (c : ℂ) (u : V → ℂ) : + evenReflection e (c • u) = c • evenReflection e u := by + funext y + simp only [evenReflection, Pi.smul_apply, smul_eq_mul] + rw [show c • u = fun z => c • u z from rfl, indicator_const_smul] + simp only [smul_eq_mul] + ring + +variable [FiniteDimensional ℝ V] [MeasurableSpace V] [BorelSpace V] + +variable (e) in +/-- The reflection preserves the Lebesgue measure (Mathlib's +`LinearIsometryEquiv.measurePreserving`). -/ +theorem measurePreserving_halfSpaceReflection : + MeasurePreserving (halfSpaceReflection e) volume volume := + (halfSpaceReflection e).measurePreserving + +end Reflection + +/-! ### Cutoffs near the hyperplane -/ + +section Cutoff + +variable {V : Type*} [NormedAddCommGroup V] [InnerProductSpace ℝ V] + +variable (e : V) in +/-- The **cutoffs near the hyperplane** `η_n(y) = s((n + 1)⟪y, e⟫ - 1)` with Mathlib's smooth +step `s = Real.smoothTransition`: `η_n = 0` where `⟪y, e⟫ ≤ 1/(n + 1)`, `η_n = 1` where +`⟪y, e⟫ ≥ 2/(n + 1)`, and `0 ≤ η_n ≤ 1`. -/ +noncomputable def halfSpaceCutoff (n : ℕ) (y : V) : ℝ := + Real.smoothTransition (((n : ℝ) + 1) * inner ℝ y e - 1) + +variable {e : V} + +/-- The cutoffs `η_n` are smooth. -/ +theorem contDiff_halfSpaceCutoff (n : ℕ) : + ContDiff ℝ ((⊤ : ℕ∞) : WithTop ℕ∞) (halfSpaceCutoff e n) := + Real.smoothTransition.contDiff.comp + ((contDiff_const.mul (contDiff_id.inner ℝ contDiff_const)).sub contDiff_const) + +/-- The cutoffs take values in `[0, 1]`. -/ +theorem abs_halfSpaceCutoff_le (n : ℕ) (y : V) : |halfSpaceCutoff e n y| ≤ 1 := by + rw [halfSpaceCutoff, abs_of_nonneg (Real.smoothTransition.nonneg _)] + exact Real.smoothTransition.le_one _ + +/-- `η_n(y) = 0` where `⟪y, e⟫ ≤ 1/(n + 1)`. -/ +theorem halfSpaceCutoff_eq_zero {n : ℕ} {y : V} (hy : inner ℝ y e ≤ 1 / ((n : ℝ) + 1)) : + halfSpaceCutoff e n y = 0 := by + refine Real.smoothTransition.zero_of_nonpos ?_ + have h := mul_le_mul_of_nonneg_left hy (by positivity : (0 : ℝ) ≤ (n : ℝ) + 1) + rw [mul_one_div_cancel (by positivity)] at h + linarith + +/-- The cutoffs vanish outside `H₊`. -/ +theorem halfSpaceCutoff_eq_zero_of_notMem {n : ℕ} {y : V} (hy : y ∉ openHalfSpace e) : + halfSpaceCutoff e n y = 0 := + halfSpaceCutoff_eq_zero ((not_lt.1 hy).trans (by positivity)) + +/-- **The closed support of `η_n` lies in `H₊`**: it lies in `{⟪y, e⟫ ≥ 1/(n + 1)}`. -/ +theorem tsupport_halfSpaceCutoff_subset (n : ℕ) : + tsupport (halfSpaceCutoff e n) ⊆ openHalfSpace e := by + have hsub : tsupport (halfSpaceCutoff e n) ⊆ {y : V | 1 / ((n : ℝ) + 1) ≤ inner ℝ y e} := + closure_minimal (fun y hy => le_of_lt (not_le.1 fun h => hy (halfSpaceCutoff_eq_zero h))) + (isClosed_le continuous_const (continuous_id.inner continuous_const)) + exact hsub.trans fun y hy => lt_of_lt_of_le (by positivity : (0 : ℝ) < 1 / ((n : ℝ) + 1)) hy + +/-- **The cutoffs tend to `1` on `H₊`**: `η_n(y) = 1` as soon as `(n + 1)⟪y, e⟫ ≥ 2`. -/ +theorem tendsto_halfSpaceCutoff {y : V} (hy : y ∈ openHalfSpace e) : + Tendsto (fun n : ℕ => halfSpaceCutoff e n y) atTop (𝓝 1) := by + rw [mem_openHalfSpace] at hy + obtain ⟨N, hN⟩ := exists_nat_gt (2 / inner ℝ y e) + refine tendsto_const_nhds.congr' (eventually_atTop.2 ⟨N, fun n hn => ?_⟩) + refine (Real.smoothTransition.one_of_one_le ?_).symm + have h1 : 2 / inner ℝ y e < (n : ℝ) + 1 := hN.trans_le (by exact_mod_cast hn.trans (by omega)) + rw [div_lt_iff₀ hy] at h1 + linarith + +/-- **The derivative of the cutoff**: +`Dη_n(y) w = s'((n + 1)⟪y, e⟫ - 1) (n + 1) ⟪w, e⟫`. -/ +theorem fderiv_halfSpaceCutoff_apply (n : ℕ) (y w : V) : + fderiv ℝ (halfSpaceCutoff e n) y w = + deriv Real.smoothTransition (((n : ℝ) + 1) * inner ℝ y e - 1) * + (((n : ℝ) + 1) * inner ℝ w e) := by + have hL : (fun y : V => inner ℝ y e) = innerSL ℝ e := + funext fun y => by rw [innerSL_apply_apply, real_inner_comm] + have h1 : HasFDerivAt (fun y : V => inner ℝ y e) (innerSL ℝ e) y := by + rw [hL] + exact (innerSL ℝ e).hasFDerivAt + have hA := (h1.const_mul ((n : ℝ) + 1)).sub_const 1 + have h := (((Real.smoothTransition.contDiff (n := 1)).differentiable one_ne_zero _).hasDerivAt + ).comp_hasFDerivAt y hA + rw [show halfSpaceCutoff e n = Real.smoothTransition ∘ + fun y : V => ((n : ℝ) + 1) * inner ℝ y e - 1 from rfl, h.fderiv] + simp [innerSL_apply_apply, real_inner_comm] + +/-- **The strip estimate**: if `|c(y)| ≤ C ⟪y, e⟫` at a point `y ∈ H₊`, then +`|s'((n + 1)⟪y, e⟫ - 1) (n + 1) c(y)| ≤ 2 D C` for a bound `D` of `|s'|`, since `s'` vanishes +unless `(n + 1)⟪y, e⟫ ≤ 2`. -/ +theorem abs_deriv_smoothTransition_mul_le {D C c : ℝ} + (hD : ∀ x, |deriv Real.smoothTransition x| ≤ D) {y : V} (hy : y ∈ openHalfSpace e) + (hc : |c| ≤ C * inner ℝ y e) (n : ℕ) : + |deriv Real.smoothTransition (((n : ℝ) + 1) * inner ℝ y e - 1) * (((n : ℝ) + 1) * c)| ≤ + 2 * D * C := by + rw [mem_openHalfSpace] at hy + have hC : 0 ≤ C := nonneg_of_mul_nonneg_left ((abs_nonneg c).trans hc) hy + have hD0 : 0 ≤ D := (abs_nonneg _).trans (hD 0) + by_cases h2 : 1 < ((n : ℝ) + 1) * inner ℝ y e - 1 + · rw [Real.smoothTransition.deriv_eq_zero_of_one_lt h2, zero_mul, abs_zero] + positivity + have hn : (0 : ℝ) ≤ (n : ℝ) + 1 := by positivity + rw [abs_mul, abs_mul, abs_of_nonneg hn] + calc |deriv Real.smoothTransition (((n : ℝ) + 1) * inner ℝ y e - 1)| * (((n : ℝ) + 1) * |c|) + ≤ D * (((n : ℝ) + 1) * (C * inner ℝ y e)) := by gcongr; exact hD _ + _ = D * C * (((n : ℝ) + 1) * inner ℝ y e) := by ring + _ ≤ D * C * 2 := by gcongr; linarith + _ = 2 * D * C := by ring + +end Cutoff + +/-! ### Integration by parts on the half-space -/ + +section IntegrationByParts + +variable {V : Type*} [NormedAddCommGroup V] [InnerProductSpace ℝ V] [FiniteDimensional ℝ V] + [MeasurableSpace V] [BorelSpace V] {e : V} + +/-- **Compactly supported multipliers**: for a measurable set `s`, if `b` is integrable on every +bounded part `s ∩ B(0, R)` of `s` and `c` is continuous with compact support, then `c b` is +integrable on `s`: `c` is bounded (Mathlib's `Continuous.bounded_above_of_compact_support`) and +vanishes outside some ball. -/ +theorem integrableOn_smul_of_hasCompactSupport {s : Set V} (hs : MeasurableSet s) {c : V → ℝ} + (hc : Continuous c) (hcc : HasCompactSupport c) {b : V → ℂ} + (hb : ∀ R, IntegrableOn b (s ∩ ball 0 R)) : IntegrableOn (fun y => c y • b y) s := by + obtain ⟨R, hR⟩ := hcc.isCompact.isBounded.subset_ball 0 + obtain ⟨C, hC⟩ := hc.bounded_above_of_compact_support hcc + have h : IntegrableOn (fun y => c y • b y) (s ∩ ball 0 R) := + (hb R).bdd_smul C hc.aestronglyMeasurable (ae_of_all _ hC) + refine h.of_forall_sdiff_eq_zero hs fun y hy => ?_ + have hy' : y ∉ tsupport c := fun h' => hy.2 ⟨hy.1, hR h'⟩ + rw [image_eq_zero_of_notMem_tsupport hy', zero_smul] + +/-- **Multipliers supported in a set**: if moreover `c` vanishes outside the measurable set `s`, +then `c b` is integrable on `V` (`Rd.integrableOn_smul_of_hasCompactSupport`). -/ +theorem integrable_smul_of_forall_notMem {s : Set V} (hs : MeasurableSet s) {c : V → ℝ} + (hc : Continuous c) (hcc : HasCompactSupport c) (hcs : ∀ y ∉ s, c y = 0) {b : V → ℂ} + (hb : ∀ R, IntegrableOn b (s ∩ ball 0 R)) : Integrable (fun y => c y • b y) := + (integrableOn_smul_of_hasCompactSupport hs hc hcc hb).integrable_of_forall_notMem_eq_zero + fun y hy => by rw [hcs y hy, zero_smul] + +/-- **The cutoffs in the limit**: for `F` integrable on `H₊`, `∫ η_n F → ∫_{H₊} F`, by dominated +convergence: `|η_n| ≤ 1`, `η_n → 1` on `H₊` and `η_n = 0` outside `H₊`. -/ +theorem tendsto_integral_halfSpaceCutoff_smul {F : V → ℂ} + (hF : IntegrableOn F (openHalfSpace e)) : + Tendsto (fun n : ℕ => ∫ y, halfSpaceCutoff e n y • F y) atTop + (𝓝 (∫ y in openHalfSpace e, F y)) := by + have h0 : ∀ n : ℕ, ∫ y, halfSpaceCutoff e n y • F y = + ∫ y in openHalfSpace e, halfSpaceCutoff e n y • F y := fun n => + (setIntegral_eq_integral_of_forall_compl_eq_zero fun y hy => by + rw [halfSpaceCutoff_eq_zero_of_notMem hy, zero_smul]).symm + simp_rw [h0] + refine tendsto_integral_of_dominated_convergence (fun y => ‖F y‖) + (fun n => ((contDiff_halfSpaceCutoff n).continuous.aestronglyMeasurable).smul + hF.aestronglyMeasurable) hF.norm (fun n => ae_of_all _ fun y => ?_) ?_ + · rw [norm_smul, Real.norm_eq_abs] + exact mul_le_of_le_one_left (norm_nonneg _) (abs_halfSpaceCutoff_le n y) + · filter_upwards [ae_restrict_mem (openHalfSpace e).isOpen.measurableSet] with y hy + simpa using (tendsto_halfSpaceCutoff hy).smul_const (F y) + +omit [FiniteDimensional ℝ V] [MeasurableSpace V] [BorelSpace V] in +/-- The derivative terms of the cutoffs vanish outside the bounded part `H₊ ∩ B(0, R)` of `H₊` +for every multiplier `c` vanishing outside `B(0, R)`, since `s' = 0` on `(-∞, 0)`. -/ +theorem deriv_smoothTransition_mul_eq_zero {c : V → ℝ} {R : ℝ} (hR : tsupport c ⊆ ball 0 R) + (n : ℕ) {y : V} (hy : y ∉ (openHalfSpace e : Set V) ∩ ball 0 R) : + deriv Real.smoothTransition (((n : ℝ) + 1) * inner ℝ y e - 1) * (((n : ℝ) + 1) * c y) = 0 := by + by_cases hyH : y ∈ openHalfSpace e + · have hc : c y = 0 := image_eq_zero_of_notMem_tsupport fun h => hy ⟨hyH, hR h⟩ + rw [hc, mul_zero, mul_zero] + · have hneg : ((n : ℝ) + 1) * inner ℝ y e - 1 < 0 := by + have h := mul_le_mul_of_nonneg_left (not_lt.1 hyH) (by positivity : (0 : ℝ) ≤ (n : ℝ) + 1) + rw [mul_zero] at h + linarith + rw [Real.smoothTransition.deriv_eq_zero_of_neg hneg, zero_mul] + +/-- **The derivatives of the cutoffs in the limit**: if `c` is continuous with compact support and +`|c(y)| ≤ C ⟪y, e⟫` on `H₊`, and `u` is integrable on every bounded part `H₊ ∩ B(0, R)`, then +`∫ s'((n + 1)⟪y, e⟫ - 1) (n + 1) c(y) u(y) dy → 0`. By the strip estimate +(`Rd.abs_deriv_smoothTransition_mul_le`) the integrands are bounded by `2 D C |u|` on +`H₊ ∩ B(0, R)`, vanish elsewhere (`Rd.deriv_smoothTransition_mul_eq_zero`), and tend to `0` +pointwise, since `s' = 0` on `(1, ∞)`. -/ +theorem tendsto_integral_deriv_halfSpaceCutoff_smul {c : V → ℝ} (hc : Continuous c) + (hcc : HasCompactSupport c) {C : ℝ} + (hC : ∀ y ∈ openHalfSpace e, |c y| ≤ C * inner ℝ y e) {u : V → ℂ} + (hu : ∀ R, IntegrableOn u ((openHalfSpace e : Set V) ∩ ball 0 R)) : + Tendsto (fun n : ℕ => ∫ y, (deriv Real.smoothTransition (((n : ℝ) + 1) * inner ℝ y e - 1) * + (((n : ℝ) + 1) * c y)) • u y) atTop (𝓝 0) := by + obtain ⟨R, hR⟩ := hcc.isCompact.isBounded.subset_ball 0 + obtain ⟨D, -, hD⟩ := Real.smoothTransition.exists_abs_deriv_le + have h0 : ∀ n : ℕ, ∫ y, (deriv Real.smoothTransition (((n : ℝ) + 1) * inner ℝ y e - 1) * + (((n : ℝ) + 1) * c y)) • u y = ∫ y in (openHalfSpace e : Set V) ∩ ball 0 R, + (deriv Real.smoothTransition (((n : ℝ) + 1) * inner ℝ y e - 1) * + (((n : ℝ) + 1) * c y)) • u y := fun n => + (setIntegral_eq_integral_of_forall_compl_eq_zero fun y hy => by + rw [deriv_smoothTransition_mul_eq_zero hR n hy, zero_smul]).symm + have hds : Continuous (deriv Real.smoothTransition) := + (Real.smoothTransition.contDiff (n := 1)).continuous_deriv le_rfl + have hS : MeasurableSet ((openHalfSpace e : Set V) ∩ ball 0 R) := + (openHalfSpace e).isOpen.measurableSet.inter measurableSet_ball + have hm : ∀ n : ℕ, Continuous fun y : V => + deriv Real.smoothTransition (((n : ℝ) + 1) * inner ℝ y e - 1) * (((n : ℝ) + 1) * c y) := + fun n => (hds.comp ((continuous_const.mul (continuous_id.inner continuous_const)).sub + continuous_const)).mul (continuous_const.mul hc) + simp_rw [h0] + have hlim := tendsto_integral_of_dominated_convergence (μ := volume.restrict + ((openHalfSpace e : Set V) ∩ ball 0 R)) (f := fun _ => (0 : ℂ)) + (F := fun (n : ℕ) y => (deriv Real.smoothTransition (((n : ℝ) + 1) * inner ℝ y e - 1) * + (((n : ℝ) + 1) * c y)) • u y) (fun y => 2 * D * C * ‖u y‖) + (fun n => (hm n).aestronglyMeasurable.smul (hu R).aestronglyMeasurable) + ((hu R).norm.const_mul _) (fun n => ?_) ?_ + · simpa using hlim + · filter_upwards [ae_restrict_mem hS] with y hy + rw [norm_smul, Real.norm_eq_abs] + exact mul_le_mul_of_nonneg_right (abs_deriv_smoothTransition_mul_le hD hy.1 (hC y hy.1) n) + (norm_nonneg _) + · filter_upwards [ae_restrict_mem hS] with y hy + have ht : 0 < inner ℝ y e := hy.1 + obtain ⟨N, hN⟩ := exists_nat_gt (2 / inner ℝ y e) + refine tendsto_const_nhds.congr' (eventually_atTop.2 ⟨N, fun n hn => ?_⟩) + have h1 : 2 / inner ℝ y e < (n : ℝ) + 1 := hN.trans_le (by exact_mod_cast hn.trans (by omega)) + rw [div_lt_iff₀ ht] at h1 + dsimp only + rw [Real.smoothTransition.deriv_eq_zero_of_one_lt (by linarith), zero_mul, zero_smul] + +/-- **The weak derivative tested against a cutoff product**: if `g = ∂_w u` weakly on `H₊` and +`χ` is smooth with compact support, then for every `n` +`∫ η_n χ g = -∫ η_n (∂_w χ) u - ∫ (∂_w η_n) χ u`: the product `η_n u` has the weak derivative +`η_n g + (∂_w η_n) u` on `V` (`Rd.HasWeakLineDeriv.mul_of_tsupport_subset`), tested against +`χ`. -/ +theorem integral_halfSpaceCutoff_smul_eq {w : V} {u g : V → ℂ} + (h : HasWeakLineDeriv (openHalfSpace e) (fun _ : Fin 1 => w) u g) {χ : V → ℝ} + (hχ : ContDiff ℝ ((⊤ : ℕ∞) : WithTop ℕ∞) χ) (hχc : HasCompactSupport χ) (n : ℕ) : + ∫ y, halfSpaceCutoff e n y • (χ y • g y) = + -(∫ y, halfSpaceCutoff e n y • (fderiv ℝ χ y w • u y)) - + ∫ y, (fderiv ℝ (halfSpaceCutoff e n) y w * χ y) • u y := by + have hη := contDiff_halfSpaceCutoff (e := e) n + have hηH := tsupport_halfSpaceCutoff_subset (e := e) n + have hmono := h.mono (inf_le_right : (⊤ ⊓ openHalfSpace e : Opens V) ≤ openHalfSpace e) + have h' := hmono.mul_of_tsupport_subset hη hηH + let φ : 𝓓((⊤ : Opens V), ℝ) := ⟨χ, hχ, hχc, by simp⟩ + have hI := h'.integral_eq φ + rw [LineDeriv.iteratedLineDerivOp_one, pow_one, neg_one_smul] at hI + have hc : Continuous fun y => (halfSpaceCutoff e n y : ℂ) := + Complex.continuous_ofReal.comp hη.continuous + have hc' : Continuous fun y => (fderiv ℝ (halfSpaceCutoff e n) y w : ℂ) := + Complex.continuous_ofReal.comp ((hη.continuous_fderiv (by simp)).clm_apply continuous_const) + have hcH : tsupport (fun y => (halfSpaceCutoff e n y : ℂ)) ⊆ openHalfSpace e := + (tsupport_comp_subset Complex.ofReal_zero _).trans hηH + have hcH' : tsupport (fun y => (fderiv ℝ (halfSpaceCutoff e n) y w : ℂ)) ⊆ openHalfSpace e := + ((tsupport_comp_subset Complex.ofReal_zero _).trans (tsupport_fderiv_apply_subset ℝ w)).trans + hηH + have i1 := φ.integrable_smul (locallyIntegrableOn_mul_of_tsupport_subset hmono.2 hc hcH) + have i2 := φ.integrable_smul (locallyIntegrableOn_mul_of_tsupport_subset hmono.1 hc' hcH') + have e1 : (fun y => φ y • ((halfSpaceCutoff e n y : ℂ) * g y + + (fderiv ℝ (halfSpaceCutoff e n) y w : ℂ) * u y)) = fun y => + φ y • ((halfSpaceCutoff e n y : ℂ) * g y) + + φ y • ((fderiv ℝ (halfSpaceCutoff e n) y w : ℂ) * u y) := + funext fun y => smul_add _ _ _ + rw [e1, integral_add i1 i2] at hI + have e2 : (fun y => halfSpaceCutoff e n y • (χ y • g y)) = + fun y => φ y • ((halfSpaceCutoff e n y : ℂ) * g y) := funext fun y => by + change _ = χ y • _ + simp only [Complex.real_smul] + ring + have e3 : (fun y => (fderiv ℝ (halfSpaceCutoff e n) y w * χ y) • u y) = + fun y => φ y • ((fderiv ℝ (halfSpaceCutoff e n) y w : ℂ) * u y) := funext fun y => by + change _ = χ y • _ + simp only [Complex.real_smul, Complex.ofReal_mul] + ring + have e4 : (fun y => halfSpaceCutoff e n y • (fderiv ℝ χ y w • u y)) = + fun y => (∂_{w} φ) y • ((halfSpaceCutoff e n y : ℂ) * u y) := funext fun y => by + rw [lineDerivOp_testFunction_apply] + change _ = fderiv ℝ χ y w • _ + simp only [Complex.real_smul] + ring + rw [e2, e3, e4] + linear_combination hI + +/-- **Integration by parts on the half-space with a vanishing boundary term**: let `g_k = ∂_{w_k} u` +weakly on `H₊` (`k = 1, 2`), with `u`, `g_1`, `g_2` integrable on every bounded part +`H₊ ∩ B(0, R)`, and let `χ_1`, `χ_2` be smooth with compact support and +`|⟪w_1, e⟫ χ_1(y) + ⟪w_2, e⟫ χ_2(y)| ≤ C ⟪y, e⟫` on `H₊`. Then +`∫_{H₊} (χ_1 g_1 + χ_2 g_2) = -∫_{H₊} ((∂_{w_1} χ_1) u + (∂_{w_2} χ_2) u)`. With the cutoffs +`η_n` (`Rd.integral_halfSpaceCutoff_smul_eq`), the boundary terms are +`∫ s'((n + 1)⟪y, e⟫ - 1) (n + 1) (⟪w_1, e⟫ χ_1 + ⟪w_2, e⟫ χ_2) u → 0` +(`Rd.tendsto_integral_deriv_halfSpaceCutoff_smul`), and the other terms converge by dominated +convergence (`Rd.tendsto_integral_halfSpaceCutoff_smul`). This is the half-space lemma of +Brezis (2011, Chapter 9) in a form with two test functions. -/ +theorem setIntegral_openHalfSpace_smul_add_eq {w₁ w₂ : V} {u g₁ g₂ : V → ℂ} + (hu : ∀ R, IntegrableOn u ((openHalfSpace e : Set V) ∩ ball 0 R)) + (hg₁ : ∀ R, IntegrableOn g₁ ((openHalfSpace e : Set V) ∩ ball 0 R)) + (hg₂ : ∀ R, IntegrableOn g₂ ((openHalfSpace e : Set V) ∩ ball 0 R)) + (h₁ : HasWeakLineDeriv (openHalfSpace e) (fun _ : Fin 1 => w₁) u g₁) + (h₂ : HasWeakLineDeriv (openHalfSpace e) (fun _ : Fin 1 => w₂) u g₂) {χ₁ χ₂ : V → ℝ} + (hχ₁ : ContDiff ℝ ((⊤ : ℕ∞) : WithTop ℕ∞) χ₁) (hχ₁c : HasCompactSupport χ₁) + (hχ₂ : ContDiff ℝ ((⊤ : ℕ∞) : WithTop ℕ∞) χ₂) (hχ₂c : HasCompactSupport χ₂) {C : ℝ} + (hC : ∀ y ∈ openHalfSpace e, + |inner ℝ w₁ e * χ₁ y + inner ℝ w₂ e * χ₂ y| ≤ C * inner ℝ y e) : + ∫ y in openHalfSpace e, (χ₁ y • g₁ y + χ₂ y • g₂ y) = + -∫ y in openHalfSpace e, (fderiv ℝ χ₁ y w₁ • u y + fderiv ℝ χ₂ y w₂ • u y) := by + have hd : ∀ {χ : V → ℝ}, ContDiff ℝ ((⊤ : ℕ∞) : WithTop ℕ∞) χ → ∀ w : V, + Continuous fun y => fderiv ℝ χ y w := fun hχ w => + (hχ.continuous_fderiv (by simp)).clm_apply continuous_const + have hH := (openHalfSpace e).isOpen.measurableSet + have I1 := integrableOn_smul_of_hasCompactSupport hH hχ₁.continuous hχ₁c hg₁ + have I2 := integrableOn_smul_of_hasCompactSupport hH hχ₂.continuous hχ₂c hg₂ + have J1 := integrableOn_smul_of_hasCompactSupport hH (hd hχ₁ w₁) + (hχ₁c.fderiv_apply (𝕜 := ℝ) w₁) hu + have J2 := integrableOn_smul_of_hasCompactSupport hH (hd hχ₂ w₂) + (hχ₂c.fderiv_apply (𝕜 := ℝ) w₂) hu + have hK : ∀ (n : ℕ) {χ : V → ℝ}, ContDiff ℝ ((⊤ : ℕ∞) : WithTop ℕ∞) χ → HasCompactSupport χ → + ∀ w : V, Integrable fun y => (fderiv ℝ (halfSpaceCutoff e n) y w * χ y) • u y := + fun n χ hχ hχc w => integrable_smul_of_forall_notMem hH + ((hd (contDiff_halfSpaceCutoff n) w).mul hχ.continuous) hχc.mul_left (fun y hy => by + change fderiv ℝ (halfSpaceCutoff e n) y w * χ y = 0 + rw [image_eq_zero_of_notMem_tsupport fun h => hy ((tsupport_halfSpaceCutoff_subset n) + ((tsupport_fderiv_apply_subset ℝ w) h)), zero_mul]) hu + have hsum : ∀ n : ℕ, (∫ y, halfSpaceCutoff e n y • (χ₁ y • g₁ y)) + + ∫ y, halfSpaceCutoff e n y • (χ₂ y • g₂ y) = + -((∫ y, halfSpaceCutoff e n y • (fderiv ℝ χ₁ y w₁ • u y)) + + ∫ y, halfSpaceCutoff e n y • (fderiv ℝ χ₂ y w₂ • u y)) - + ∫ y, (deriv Real.smoothTransition (((n : ℝ) + 1) * inner ℝ y e - 1) * + (((n : ℝ) + 1) * (inner ℝ w₁ e * χ₁ y + inner ℝ w₂ e * χ₂ y))) • u y := fun n => by + have H1 := integral_halfSpaceCutoff_smul_eq h₁ hχ₁ hχ₁c n + have H2 := integral_halfSpaceCutoff_smul_eq h₂ hχ₂ hχ₂c n + have he : (fun y => (deriv Real.smoothTransition (((n : ℝ) + 1) * inner ℝ y e - 1) * + (((n : ℝ) + 1) * (inner ℝ w₁ e * χ₁ y + inner ℝ w₂ e * χ₂ y))) • u y) = + fun y => (fderiv ℝ (halfSpaceCutoff e n) y w₁ * χ₁ y) • u y + + (fderiv ℝ (halfSpaceCutoff e n) y w₂ * χ₂ y) • u y := funext fun y => by + rw [fderiv_halfSpaceCutoff_apply, fderiv_halfSpaceCutoff_apply, ← add_smul] + ring_nf + rw [he, integral_add (hK n hχ₁ hχ₁c w₁) (hK n hχ₂ hχ₂c w₂)] + linear_combination H1 + H2 + have hcont : Continuous fun y => inner ℝ w₁ e * χ₁ y + inner ℝ w₂ e * χ₂ y := + (continuous_const.mul hχ₁.continuous).add (continuous_const.mul hχ₂.continuous) + have hL := ((tendsto_integral_halfSpaceCutoff_smul I1).add + (tendsto_integral_halfSpaceCutoff_smul I2)) + have hR := ((tendsto_integral_halfSpaceCutoff_smul J1).add + (tendsto_integral_halfSpaceCutoff_smul J2)).neg.sub + (tendsto_integral_deriv_halfSpaceCutoff_smul hcont + ((hχ₁c.mul_left).add (hχ₂c.mul_left)) hC hu) + have hlim := tendsto_nhds_unique (hL.congr fun n => hsum n) hR + rw [integral_add I1 I2, integral_add J1 J2, hlim, sub_zero] + +end IntegrationByParts + +/-! ### The weak derivatives of the even reflection -/ + +section EvenReflection + +variable {V : Type*} [NormedAddCommGroup V] [InnerProductSpace ℝ V] [FiniteDimensional ℝ V] + [MeasurableSpace V] [BorelSpace V] {e : V} + +/-- **`L_p` functions on a set are integrable on its bounded parts**: for `1 ≤ p` and every set +`s`, every `u ∈ L_p(s)` is integrable on `s ∩ B(0, R)`, a set of finite measure (Mathlib's +`MemLp.integrable`). -/ +theorem integrableOn_inter_ball_of_memLp {p : ℝ≥0∞} (hp : 1 ≤ p) {s : Set V} {u : V → ℂ} + (hu : MemLp u p (volume.restrict s)) (R : ℝ) : IntegrableOn u (s ∩ ball 0 R) := by + have hfin : IsFiniteMeasure (volume.restrict (s ∩ ball 0 R)) := + ⟨by + rw [Measure.restrict_apply_univ] + exact (measure_mono inter_subset_right).trans_lt measure_ball_lt_top⟩ + have h := hu.restrict (ball 0 R) + rw [Measure.restrict_restrict measurableSet_ball, inter_comm] at h + exact h.integrable hp + +/-- **The two halves of a reflected function are locally integrable**: for a measurable set `s`, +if `a` and `b` are integrable on every bounded part `s ∩ B(0, R)` of `s`, then +`y ↦ 1_s a (y) + 1_s b (σ y)` is locally integrable on `V`; the reflection `σ` preserves Lebesgue +measure and the balls `B(0, R)`. -/ +theorem locallyIntegrable_indicator_add_indicator_comp_halfSpaceReflection {s : Set V} + (hs : MeasurableSet s) {a b : V → ℂ} (ha : ∀ R, IntegrableOn a (s ∩ ball 0 R)) + (hb : ∀ R, IntegrableOn b (s ∩ ball 0 R)) : + LocallyIntegrable (fun y => s.indicator a y + s.indicator b (halfSpaceReflection e y)) + volume := by + refine (locallyIntegrable_of_forall_integrableOn_ball 0 fun R => + (integrableOn_indicator_iff hs.nullMeasurableSet).2 (ha R)).add + (locallyIntegrable_of_forall_integrableOn_ball 0 fun R => ?_) + have h := ((measurePreserving_halfSpaceReflection e).integrableOn_comp_preimage + (halfSpaceReflection e).toHomeomorph.measurableEmbedding + (f := s.indicator b) (s := ball 0 R)).2 + ((integrableOn_indicator_iff hs.nullMeasurableSet).2 (hb R)) + rwa [LinearIsometryEquiv.preimage_ball, map_zero] at h + +/-- Multipliers of a function on a measurable set `s`: `∫ c 1_s b = ∫_s c b`. -/ +theorem integral_smul_indicator {s : Set V} (hs : MeasurableSet s) (c : V → ℝ) (b : V → ℂ) : + ∫ y, c y • s.indicator b y = ∫ y in s, c y • b y := by + simp_rw [← indicator_smul_apply] + exact integral_indicator hs + +/-- **The reflected half**: for a measurable set `s`, +`∫ c(y) 1_s b (σ y) dy = ∫_s c(σ y) b(y) dy`, since `σ` is an involution that preserves Lebesgue +measure (Mathlib's `MeasurePreserving.integral_comp`). -/ +theorem integral_smul_indicator_comp_halfSpaceReflection {s : Set V} (hs : MeasurableSet s) + (c : V → ℝ) (b : V → ℂ) : + ∫ y, c y • s.indicator b (halfSpaceReflection e y) = + ∫ y in s, c (halfSpaceReflection e y) • b y := by + have h := (measurePreserving_halfSpaceReflection e).integral_comp + (halfSpaceReflection e).toHomeomorph.measurableEmbedding + (fun y => c (halfSpaceReflection e y) • s.indicator b y) + simp only [halfSpaceReflection_halfSpaceReflection] at h + rw [h, integral_smul_indicator hs] + +/-- Compactly supported multipliers of `1_s b` are integrable when `b` is integrable on every +bounded part of the measurable set `s` (`Rd.integrableOn_smul_of_hasCompactSupport`). -/ +theorem integrable_smul_indicator {s : Set V} (hs : MeasurableSet s) {c : V → ℝ} + (hc : Continuous c) (hcc : HasCompactSupport c) {b : V → ℂ} + (hb : ∀ R, IntegrableOn b (s ∩ ball 0 R)) : Integrable fun y => c y • s.indicator b y := by + simp_rw [← indicator_smul_apply] + exact (integrableOn_smul_of_hasCompactSupport hs hc hcc hb).integrable_indicator hs + +/-- Compactly supported multipliers of `1_s b ∘ σ` are integrable when `b` is integrable on every +bounded part of the measurable set `s`: compose with the measure-preserving `σ`. -/ +theorem integrable_smul_indicator_comp_halfSpaceReflection {s : Set V} (hs : MeasurableSet s) + {c : V → ℝ} (hc : Continuous c) (hcc : HasCompactSupport c) {b : V → ℂ} + (hb : ∀ R, IntegrableOn b (s ∩ ball 0 R)) : + Integrable fun y => c y • s.indicator b (halfSpaceReflection e y) := by + have h := integrable_smul_indicator hs (hc.comp (halfSpaceReflection e).continuous) + (hcc.comp_homeomorph (halfSpaceReflection e).toHomeomorph) hb + have h' := ((measurePreserving_halfSpaceReflection e).integrable_comp_emb + (halfSpaceReflection e).toHomeomorph.measurableEmbedding).2 h + simpa [Function.comp_def] using h' + +omit [FiniteDimensional ℝ V] [MeasurableSpace V] [BorelSpace V] in +/-- **The reflection bound for Lipschitz functions**: for `L`-Lipschitz `φ`, a unit vector `e` and +`y ∈ H₊`, `|⟪v, e⟫ φ(y) + ⟪σ v, e⟫ φ(σ y)| ≤ 2 L |⟪v, e⟫| ⟪y, e⟫`, since `⟪σ v, e⟫ = -⟪v, e⟫` +and `‖y - σ y‖ = 2⟪y, e⟫`. -/ +theorem abs_inner_mul_add_inner_halfSpaceReflection_mul_le (he : ‖e‖ = 1) {φ : V → ℝ} {L : ℝ≥0} + (hφ : LipschitzWith L φ) (v : V) {y : V} (hy : y ∈ openHalfSpace e) : + |inner ℝ v e * φ y + inner ℝ (halfSpaceReflection e v) e * φ (halfSpaceReflection e y)| ≤ + 2 * L * |inner ℝ v e| * inner ℝ y e := by + rw [mem_openHalfSpace] at hy + rw [inner_halfSpaceReflection he, neg_mul, ← sub_eq_add_neg, ← mul_sub, abs_mul] + have h := hφ.dist_le_mul y (halfSpaceReflection e y) + rw [Real.dist_eq, dist_eq_norm, norm_sub_halfSpaceReflection he, abs_of_pos hy] at h + calc |inner ℝ v e| * |φ y - φ (halfSpaceReflection e y)| + ≤ |inner ℝ v e| * (L * (2 * inner ℝ y e)) := by gcongr + _ = 2 * L * |inner ℝ v e| * inner ℝ y e := by ring + +/-- **The even reflection is weakly differentiable** (Brezis 2011, Chapter 9; Evans–Gariepy, +Section 4.4): let `e` be a unit vector, `u` and its weak derivatives `g_w = ∂_w u` on `H₊` +integrable on every bounded part `H₊ ∩ B(0, R)` of `H₊`. Then for every `v ∈ V` the function +`y ↦ 1_{H₊} g_v (y) + 1_{H₊} g_{σ v} (σ y)` is the weak derivative `∂_v` of the even reflection +`E u` on `V`. Tested against `φ`, both sides are integrals over `H₊` after the change of +variables `y ↦ σ y` (`Rd.integral_smul_indicator_comp_halfSpaceReflection`), and they agree by +the integration by parts of `Rd.setIntegral_openHalfSpace_smul_add_eq` with `χ_1 = φ` and +`χ_2 = φ ∘ σ`, whose boundary term vanishes by +`Rd.abs_inner_mul_add_inner_halfSpaceReflection_mul_le`. -/ +theorem hasWeakLineDeriv_evenReflection_of_forall (he : ‖e‖ = 1) {u : V → ℂ} {g : V → V → ℂ} + (hu : ∀ R, IntegrableOn u ((openHalfSpace e : Set V) ∩ ball 0 R)) + (hg : ∀ w R, IntegrableOn (g w) ((openHalfSpace e : Set V) ∩ ball 0 R)) + (hug : ∀ w, HasWeakLineDeriv (openHalfSpace e) (fun _ : Fin 1 => w) u (g w)) (v : V) : + HasWeakLineDeriv ⊤ (fun _ : Fin 1 => v) (evenReflection e u) + (fun y => (openHalfSpace e : Set V).indicator (g v) y + + (openHalfSpace e : Set V).indicator (g (halfSpaceReflection e v)) + (halfSpaceReflection e y)) := by + have hH := (openHalfSpace e).isOpen.measurableSet + refine (hasWeakLineDeriv_iff_integral + ((locallyIntegrable_indicator_add_indicator_comp_halfSpaceReflection hH hu + hu).locallyIntegrableOn _) + ((locallyIntegrable_indicator_add_indicator_comp_halfSpaceReflection hH (hg v) + (hg (halfSpaceReflection e v))).locallyIntegrableOn _)).2 fun φ => ?_ + rw [LineDeriv.iteratedLineDerivOp_one, pow_one, neg_one_smul] + have hφ := φ.contDiff + have hφc := φ.hasCompactSupport + have hψ : ContDiff ℝ ((⊤ : ℕ∞) : WithTop ℕ∞) fun y => φ (halfSpaceReflection e y) := + hφ.comp (halfSpaceReflection e).toContinuousLinearEquiv.contDiff + have hψc : HasCompactSupport fun y => φ (halfSpaceReflection e y) := + hφc.comp_homeomorph (halfSpaceReflection e).toHomeomorph + obtain ⟨L, hL⟩ := hφ.lipschitzWith_of_hasCompactSupport hφc (by simp) + have key := setIntegral_openHalfSpace_smul_add_eq hu (hg v) (hg (halfSpaceReflection e v)) + (hug v) (hug (halfSpaceReflection e v)) hφ hφc hψ hψc fun y hy => + abs_inner_mul_add_inner_halfSpaceReflection_mul_le he hL v hy + have hdψ : ∀ y, fderiv ℝ (fun y => φ (halfSpaceReflection e y)) y (halfSpaceReflection e v) = + (∂_{v} φ) (halfSpaceReflection e y) := fun y => by + rw [lineDerivOp_testFunction_apply] + have h := (halfSpaceReflection e).toContinuousLinearEquiv.comp_right_fderiv + (f := (φ : V → ℝ)) (x := y) (𝕜 := ℝ) + change fderiv ℝ ((φ : V → ℝ) ∘ (halfSpaceReflection e).toContinuousLinearEquiv) y + (halfSpaceReflection e v) = _ + rw [h, ContinuousLinearMap.comp_apply] + simp + have hdφ : ∀ y, fderiv ℝ φ y v = (∂_{v} φ) y := fun y => + (lineDerivOp_testFunction_apply _ _ _).symm + simp only [hdψ, hdφ] at key + have hd := (∂_{v} φ).contDiff.continuous + have hdc := (∂_{v} φ).hasCompactSupport + simp only [smul_add] + rw [integral_add (integrable_smul_indicator hH hφ.continuous hφc (hg v)) + (integrable_smul_indicator_comp_halfSpaceReflection hH hφ.continuous hφc + (hg (halfSpaceReflection e v))), + integral_add (integrable_smul_indicator hH hd hdc hu) + (integrable_smul_indicator_comp_halfSpaceReflection hH hd hdc hu), + integral_smul_indicator hH, integral_smul_indicator_comp_halfSpaceReflection hH, + integral_smul_indicator hH, integral_smul_indicator_comp_halfSpaceReflection hH, + ← integral_add (integrableOn_smul_of_hasCompactSupport hH hφ.continuous hφc (hg v)) + (integrableOn_smul_of_hasCompactSupport hH hψ.continuous hψc + (hg (halfSpaceReflection e v))), + key] + congr 1 + exact integral_add (integrableOn_smul_of_hasCompactSupport hH hd hdc hu) + (integrableOn_smul_of_hasCompactSupport hH (hd.comp (halfSpaceReflection e).continuous) + (hdc.comp_homeomorph (halfSpaceReflection e).toHomeomorph) hu) + +/-- **The even reflection in the basis directions** (the form of +`Rd.hasWeakLineDeriv_evenReflection_of_forall` with the derivatives `h_i = ∂_{e_i} u` along the +basis `e_i = Rd.gridBasis V i`): for a unit vector `e`, if `u` and the `h_i` are integrable on +every bounded part `H₊ ∩ B(0, R)` of `H₊`, +then for every `v ∈ V` the weak derivative `∂_v` of the even reflection `E u` on `V` is +`y ↦ 1_{H₊} (∑_i ⟪v, e_i⟫ h_i) (y) + 1_{H₊} (∑_i ⟪σ v, e_i⟫ h_i) (σ y)`; on `H₊` the derivative +along `w` is `∑_i ⟪w, e_i⟫ h_i` (`Rd.hasWeakLineDeriv_of_forall_gridBasis`). -/ +theorem hasWeakLineDeriv_evenReflection (he : ‖e‖ = 1) {u : V → ℂ} + {h : Fin (finrank ℝ V) → V → ℂ} + (hu : ∀ R, IntegrableOn u ((openHalfSpace e : Set V) ∩ ball 0 R)) + (hh : ∀ i R, IntegrableOn (h i) ((openHalfSpace e : Set V) ∩ ball 0 R)) + (huh : ∀ i, HasWeakLineDeriv (openHalfSpace e) (fun _ : Fin 1 => gridBasis V i) u (h i)) + (v : V) : + HasWeakLineDeriv ⊤ (fun _ : Fin 1 => v) (evenReflection e u) + (fun y => (openHalfSpace e : Set V).indicator + (fun x => ∑ i, (inner ℝ v (gridBasis V i) : ℂ) * h i x) y + + (openHalfSpace e : Set V).indicator + (fun x => ∑ i, (inner ℝ (halfSpaceReflection e v) (gridBasis V i) : ℂ) * h i x) + (halfSpaceReflection e y)) := + hasWeakLineDeriv_evenReflection_of_forall he hu + (fun _ R => integrable_finsetSum _ fun i _ => (hh i R).const_mul _) + (fun w => hasWeakLineDeriv_of_forall_gridBasis huh w) v + +/-- **The `L_p` norm of a reflected function**: for `1 ≤ p` and a measurable set `s`, +`‖y ↦ 1_s a (y) + 1_s b (σ y)‖_{L_p(V)} ≤ ‖a‖_{L_p(s)} + ‖b‖_{L_p(s)}`, by Minkowski's +inequality and since `σ` preserves Lebesgue measure (Mathlib's `eLpNorm_comp_measurePreserving`). -/ +theorem eLpNorm_indicator_add_indicator_comp_halfSpaceReflection_le {E : Type*} + [NormedAddCommGroup E] {p : ℝ≥0∞} (hp : 1 ≤ p) {s : Set V} (hs : MeasurableSet s) + (a b : V → E) : + eLpNorm (fun y => s.indicator a y + s.indicator b (halfSpaceReflection e y)) p volume ≤ + eLpNorm a p (volume.restrict s) + eLpNorm b p (volume.restrict s) := by + have hc := eLpNorm_comp_le_of_mapsTo (h := s.indicator b) (U := univ) + (measurePreserving_halfSpaceReflection e) MeasurableSet.univ (mapsTo_univ _ _) p + rw [Measure.restrict_univ] at hc + calc _ ≤ _ := eLpNorm_add_le (f := s.indicator a) + (g := fun y => s.indicator b (halfSpaceReflection e y)) hp + _ ≤ eLpNorm (s.indicator a) p volume + eLpNorm (s.indicator b) p volume := + add_le_add le_rfl hc + _ = _ := by + rw [eLpNorm_indicator_eq_eLpNorm_restrict hs.nullMeasurableSet, + eLpNorm_indicator_eq_eLpNorm_restrict hs.nullMeasurableSet] + +/-- **The `L_p` norm of the even reflection**: `‖E u‖_{L_p(V)} ≤ 2 ‖u‖_{L_p(H₊)}` for `1 ≤ p` +(`Rd.eLpNorm_indicator_add_indicator_comp_halfSpaceReflection_le`). -/ +theorem eLpNorm_evenReflection_le {p : ℝ≥0∞} (hp : 1 ≤ p) (u : V → ℂ) : + eLpNorm (evenReflection e u) p volume ≤ 2 * eLpNorm u p (volume.restrict (openHalfSpace e)) := + (eLpNorm_indicator_add_indicator_comp_halfSpaceReflection_le hp + (openHalfSpace e).isOpen.measurableSet u u).trans_eq (two_mul _).symm + +end EvenReflection + +end Rd diff --git a/LeanPool/FunctionSpaces/Domains/Extension/HigherDivergenceKernels.lean b/LeanPool/FunctionSpaces/Domains/Extension/HigherDivergenceKernels.lean new file mode 100644 index 0000000000..2d6b713633 --- /dev/null +++ b/LeanPool/FunctionSpaces/Domains/Extension/HigherDivergenceKernels.lean @@ -0,0 +1,1002 @@ +/- +Copyright (c) 2026 Mario Ullrich. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Mario Ullrich +-/ +module + +public import LeanPool.FunctionSpaces.Rd.Sobolev.DivergenceKernels +public import LeanPool.FunctionSpaces.Domains.Lipschitz.LipschitzGraph + +/- +Modified for Lean Pool: module names and imports adapted. +-/ + +/-! +# Higher divergence kernels + +Let `V` be a finite-dimensional real inner product space of dimension `n` with Lebesgue measure, +the orthonormal basis `(e_i)` of `Rd.gridBasis` and the dilations `G_c(x) = c^n G(c x)` +(`Rd.dilate`). A word `i = (i_0, …, i_{m-1})` stands for the derivative +`∂^{e_i} = ∂_{e_{i_0}} ⋯ ∂_{e_{i_{m-1}}}` and the monomial `x^i = ∏_l ⟪e_{i_l}, x⟫`. + +* **Weighted dilation averages** (`Rd.weightedDilation`): `A_w G(x) = ∫_a^b w(s) G_{e^s}(x) ds`. + They are smooth for smooth `w` and `G` (`Rd.contDiff_weightedDilation`), vanish outside the ball + of radius `R e^{-a}` if `G` vanishes outside the ball of radius `R`, satisfy + `∫ A_w G = (∫_a^b w) ∫ G` (`Rd.integral_weightedDilation`), and are supported in `-K` if `G` is + (`Rd.LipschitzGraph.coneSupported_weightedDilation`). +* **One step** (`Rd.weightedDilation_eq_sum_fderiv`): if `∫_a^b w = 0`, then + `A_w G = ∑_i ∂_{e_i} A_W(⟪e_i, ·⟫ G)` with the anti-weight `W(s) = -e^{-s} ∫_a^s w` + (`Rd.antiWeight`), by Euler's identity `d/ds G_{e^s} = div(x G_{e^s})` and integration by parts + in `s`. The anti-weight shifts the moments: + `∫_a^b W(s) e^{-rs} ds = -(r + 1)⁻¹ ∫_a^b w(s) e^{-(r+1)s} ds` + (`Rd.integral_antiWeight_mul_exp`). +* **Iteration** (`Rd.weightedDilation_eq_sum_iteratedLineDeriv`): if the moments + `∫_a^b w(s) e^{-rs} ds` vanish for `r < m`, then `A_w G = ∑_i ∂^{e_i} K_i` over the words of + length `m`, with the higher divergence kernels `K_i = A_{w_m}(x^i G)` (`Rd.higherDivKernel`, + `Rd.higherDivSchwartz`) and the iterated anti-weights `w_m` (`Rd.iterWeight`). The `K_i` have + mean zero if also the moment of order `m` vanishes (`Rd.integral_higherDivKernel_eq_zero`). +* **The smoothed bump** (`Rd.LocalMeansBump.dilationSmoothed`): for a bump `b`, + `b' = ∫_0^{log 2} ρ(s) b_{e^s} ds` with a smooth weight `ρ` (`Rd.dilationWeight`) is a bump of the + same radius. Its moment kernel of order `L` is `A_u b` with the smooth weight + `u(s) = ∑_{l w s * dilate (Real.exp s) G x) := + (hw.comp contDiff_snd).mul (contDiff_dilate_exp hG) + +omit [MeasurableSpace V] [BorelSpace V] in +/-- Weighted dilation averages of smooth functions with smooth weights are smooth +(`intervalIntegral.contDiff_parametric_intervalIntegral_of_contDiff`). -/ +theorem contDiff_weightedDilation (a b : ℝ) {w : ℝ → ℂ} + (hw : ContDiff ℝ ((⊤ : ℕ∞) : WithTop ℕ∞) w) {G : V → ℂ} + (hG : ContDiff ℝ ((⊤ : ℕ∞) : WithTop ℕ∞) G) : + ContDiff ℝ ((⊤ : ℕ∞) : WithTop ℕ∞) (weightedDilation a b w G) := + intervalIntegral.contDiff_parametric_intervalIntegral_of_contDiff + (contDiff_weight_mul_dilate_exp hw hG) a b + +omit [FiniteDimensional ℝ V] [MeasurableSpace V] [BorelSpace V] in +/-- A weighted dilation average vanishes at `x` if `G(e^s x) = 0` for every `s` between `a` and +`b`. -/ +theorem weightedDilation_eq_zero (a b : ℝ) (w : ℝ → ℂ) {G : V → ℂ} {x : V} + (hx : ∀ s ∈ uIcc a b, G (Real.exp s • x) = 0) : weightedDilation a b w G x = 0 := by + refine (intervalIntegral.integral_congr (g := fun _ => (0 : ℂ)) fun s hs => ?_).trans + intervalIntegral.integral_zero + simp [dilate, hx s hs] + +omit [FiniteDimensional ℝ V] [MeasurableSpace V] [BorelSpace V] in +/-- If `R e^{-a} < ‖x‖` and `a ≤ s`, then `R < ‖e^s x‖`. -/ +theorem lt_norm_exp_smul {R a s : ℝ} {x : V} (has : a ≤ s) (hx : R * Real.exp (-a) < ‖x‖) : + R < ‖Real.exp s • x‖ := by + rw [norm_smul, Real.norm_of_nonneg (Real.exp_pos s).le] + have h1 : R < ‖x‖ * Real.exp a := by + rw [← div_lt_iff₀ (Real.exp_pos a), div_eq_mul_inv, ← Real.exp_neg] + exact hx + have h2 : Real.exp a ≤ Real.exp s := Real.exp_le_exp.2 has + nlinarith [norm_nonneg x] + +omit [FiniteDimensional ℝ V] [MeasurableSpace V] [BorelSpace V] in +/-- A weighted dilation average over `[a, b]` of a function that vanishes outside the ball of +radius `R` vanishes outside the ball of radius `R e^{-a}`. -/ +theorem weightedDilation_eq_zero_of_lt {a b : ℝ} (hab : a ≤ b) (w : ℝ → ℂ) {G : V → ℂ} {R : ℝ} + (hR : ∀ z, R < ‖z‖ → G z = 0) {x : V} (hx : R * Real.exp (-a) < ‖x‖) : + weightedDilation a b w G x = 0 := + weightedDilation_eq_zero a b w fun s hs => hR _ (lt_norm_exp_smul + (by rw [uIcc_of_le hab] at hs; exact hs.1) hx) + +omit [FiniteDimensional ℝ V] [MeasurableSpace V] [BorelSpace V] in +/-- A weighted dilation average of a function that vanishes outside a ball has compact +support. -/ +theorem hasCompactSupport_weightedDilation [ProperSpace V] {a b : ℝ} (hab : a ≤ b) (w : ℝ → ℂ) + {G : V → ℂ} {R : ℝ} (hR : ∀ z, R < ‖z‖ → G z = 0) : + HasCompactSupport (weightedDilation a b w G) := + HasCompactSupport.intro (isCompact_closedBall 0 (R * Real.exp (-a))) fun x hx => + weightedDilation_eq_zero_of_lt hab w hR (by simpa [mem_closedBall, dist_zero_right] using hx) + +/-- The integrand `(x, s) ↦ w(s) G_{e^s}(x)` is integrable on `V × (a, b]` if `w` and `G` are +continuous and `G` vanishes outside a ball: it is continuous and vanishes outside the compact set +`B̄(0, R e^{-a}) × [a, b]`. -/ +theorem integrable_weight_mul_dilate_exp {a b : ℝ} {w : ℝ → ℂ} (hw : Continuous w) {G : V → ℂ} + (hG : Continuous G) {R : ℝ} (hR : ∀ z, R < ‖z‖ → G z = 0) : + Integrable (Function.uncurry fun (x : V) (s : ℝ) => w s * dilate (Real.exp s) G x) + ((volume : Measure V).prod (volume.restrict (Ioc a b))) := by + have hcont : Continuous (Function.uncurry fun (x : V) (s : ℝ) => + w s * dilate (Real.exp s) G x) := (hw.comp continuous_snd).mul (continuous_dilate_exp hG) + have hμ : (volume : Measure V).prod (volume.restrict (Ioc a b)) = + ((volume : Measure V).prod volume).restrict (univ ×ˢ Ioc a b) := by + rw [← Measure.prod_restrict, Measure.restrict_univ] + rw [hμ] + refine IntegrableOn.mono_set ?_ (prod_mono subset_rfl Ioc_subset_Icc_self) + refine IntegrableOn.of_forall_sdiff_eq_zero (s := closedBall 0 (R * Real.exp (-a)) ×ˢ Icc a b) + (hcont.continuousOn.integrableOn_compact ((isCompact_closedBall _ _).prod isCompact_Icc)) + (MeasurableSet.univ.prod measurableSet_Icc) ?_ + rintro ⟨x, s⟩ ⟨⟨-, hs⟩, hns⟩ + have hx : R * Real.exp (-a) < ‖x‖ := by + by_contra h + exact hns ⟨by simpa [mem_closedBall, dist_zero_right] using h, hs⟩ + simp [dilate, hR _ (lt_norm_exp_smul hs.1 hx)] + +/-- **The integral of a weighted dilation average**: `∫ A = (∫_a^b w) ∫ G` for `a ≤ b`, continuous +`w` and continuous `G` vanishing outside a ball, by Fubini (Mathlib's `integral_integral_swap`) +and `∫ G_t = ∫ G` (`Rd.integral_dilate`). -/ +theorem integral_weightedDilation {a b : ℝ} (hab : a ≤ b) {w : ℝ → ℂ} (hw : Continuous w) + {G : V → ℂ} (hG : Continuous G) {R : ℝ} (hR : ∀ z, R < ‖z‖ → G z = 0) : + ∫ x, weightedDilation a b w G x = (∫ s in a..b, w s) * ∫ x, G x := by + have h : ∀ x, weightedDilation a b w G x = + ∫ s in Ioc a b, w s * dilate (Real.exp s) G x := fun x => by + rw [weightedDilation, intervalIntegral.integral_of_le hab] + simp_rw [h] + rw [integral_integral_swap (integrable_weight_mul_dilate_exp hw hG hR), + intervalIntegral.integral_of_le hab, ← integral_mul_const] + refine integral_congr_ae (ae_of_all _ fun s => ?_) + change (∫ x, w s * dilate (Real.exp s) G x) = w s * ∫ x, G x + rw [integral_const_mul, integral_dilate G (Real.exp_pos s)] + +/-! ### One step: a weighted dilation average as a divergence -/ + +/-- The **primitive** `s ↦ ∫_a^s w` of a smooth function is smooth: its derivative is `w` +(Mathlib's `Continuous.integral_hasStrictDerivAt` and `contDiff_infty_iff_deriv`). -/ +theorem contDiff_primitive {w : ℝ → ℂ} (hw : ContDiff ℝ ((⊤ : ℕ∞) : WithTop ℕ∞) w) (a : ℝ) : + ContDiff ℝ ((⊤ : ℕ∞) : WithTop ℕ∞) fun s => ∫ σ in a..s, w σ := by + have hd : ∀ s, HasDerivAt (fun s => ∫ σ in a..s, w σ) (w s) s := fun s => + (hw.continuous.integral_hasStrictDerivAt a s).hasDerivAt + refine contDiff_infty_iff_deriv.2 ⟨fun s => (hd s).differentiableAt, ?_⟩ + rw [show deriv (fun s => ∫ σ in a..s, w σ) = w from funext fun s => (hd s).deriv] + exact hw + +/-- The **anti-weight** `W(s) = -e^{-s} ∫_a^s w` of a weight `w`: if `∫_a^b w = 0`, the weighted +dilation average with the weight `w` is the divergence of those with the weight `W` +(`Rd.weightedDilation_eq_sum_fderiv`). -/ +noncomputable def antiWeight (a : ℝ) (w : ℝ → ℂ) (s : ℝ) : ℂ := + -((Real.exp (-s) : ℝ) : ℂ) * ∫ σ in a..s, w σ + +/-- The anti-weight of a smooth weight is smooth. -/ +theorem contDiff_antiWeight (a : ℝ) {w : ℝ → ℂ} (hw : ContDiff ℝ ((⊤ : ℕ∞) : WithTop ℕ∞) w) : + ContDiff ℝ ((⊤ : ℕ∞) : WithTop ℕ∞) (antiWeight a w) := + ((Complex.ofRealCLM.contDiff.comp (Real.contDiff_exp.comp contDiff_neg)).neg).mul + (contDiff_primitive hw a) + +omit [FiniteDimensional ℝ V] [MeasurableSpace V] [BorelSpace V] in +/-- **The anti-weight carries a coordinate factor**: with `W = Rd.antiWeight a w`, +`∫_a^b W(s) (⟪e, ·⟫ G)_{e^s}(x) ds = ⟪e, x⟫ ∫_a^b (-∫_a^s w) G_{e^s}(x) ds`, since +`(⟪e, ·⟫ G)_c(x) = c ⟪e, x⟫ G_c(x)` (`Rd.inner_mul_dilate_eq`). -/ +theorem weightedDilation_antiWeight_inner_mul (a b : ℝ) (w : ℝ → ℂ) (G : V → ℂ) (e x : V) : + weightedDilation a b (antiWeight a w) (fun y => (inner ℝ e y : ℂ) * G y) x = + (inner ℝ e x : ℂ) * weightedDilation a b (fun s => -∫ σ in a..s, w σ) G x := by + rw [weightedDilation, weightedDilation, ← intervalIntegral.integral_const_mul] + refine intervalIntegral.integral_congr fun s _ => ?_ + have hc : Real.exp s ≠ 0 := (Real.exp_pos s).ne' + have h1 : ((Real.exp (-s) : ℝ) : ℂ) * ((Real.exp s : ℝ) : ℂ) = 1 := by + rw [← Complex.ofReal_mul, ← Real.exp_add, neg_add_cancel, Real.exp_zero, Complex.ofReal_one] + have h2 : dilate (Real.exp s) (fun y => (inner ℝ e y : ℂ) * G y) x = + ((Real.exp s : ℝ) : ℂ) * ((inner ℝ e x : ℂ) * dilate (Real.exp s) G x) := by + rw [inner_mul_dilate_eq G e hc x, ← mul_assoc, ← Complex.ofReal_mul, mul_inv_cancel₀ hc, + Complex.ofReal_one, one_mul] + simp only [antiWeight] + rw [h2] + linear_combination (-(∫ σ in a..s, w σ) * (inner ℝ e x : ℂ) * dilate (Real.exp s) G x) * h1 + +omit [MeasurableSpace V] [BorelSpace V] in +/-- **Differentiation under the integral sign** for weighted dilation averages: for a `C^1` weight +`w` and `G ∈ C^1`, `DA(x) v = ∫_a^b w(s) D(G_{e^s})(x) v ds` +(`intervalIntegral.fderiv_integral_apply_of_contDiff`). -/ +theorem fderiv_weightedDilation_apply (a b : ℝ) {w : ℝ → ℂ} (hw : ContDiff ℝ 1 w) {G : V → ℂ} + (hG : ContDiff ℝ 1 G) (x v : V) : + fderiv ℝ (weightedDilation a b w G) x v = + ∫ s in a..b, w s * fderiv ℝ (dilate (Real.exp s) G) x v := by + change fderiv ℝ (fun x => ∫ s in a..b, w s * dilate (Real.exp s) G x) x v = _ + rw [intervalIntegral.fderiv_integral_apply_of_contDiff (contDiff_weight_mul_dilate_exp hw hG)] + refine intervalIntegral.integral_congr fun s _ => ?_ + rw [fderiv_const_mul (differentiableAt_dilate (hG.differentiable one_ne_zero) _ x)] + rfl + +omit [MeasurableSpace V] [BorelSpace V] in +/-- **Integration by parts along the dilations**: for smooth `w` with `∫_a^b w = 0` and smooth `G`, +the weighted dilation average `A` with the weight `-∫_a^s w` satisfies +`n A(x) + DA(x) x = ∫_a^b w(s) G_{e^s}(x) ds`. The left side is +`-∫_a^b (∫_a^s w) d/ds G_{e^s}(x) ds` by Euler's identity (`Rd.hasDerivAt_dilate_exp`), and +integration by parts (Mathlib's `intervalIntegral.integral_mul_deriv_eq_deriv_mul`) has no boundary +terms. -/ +theorem finrank_mul_add_fderiv_weightedDilation_primitive {a b : ℝ} {w : ℝ → ℂ} + (hw : ContDiff ℝ ((⊤ : ℕ∞) : WithTop ℕ∞) w) (hw0 : ∫ s in a..b, w s = 0) {G : V → ℂ} + (hG : ContDiff ℝ ((⊤ : ℕ∞) : WithTop ℕ∞) G) (x : V) : + (finrank ℝ V : ℂ) * weightedDilation a b (fun s => -∫ σ in a..s, w σ) G x + + fderiv ℝ (weightedDilation a b (fun s => -∫ σ in a..s, w σ) G) x x = + weightedDilation a b w G x := by + have hW : ∀ s, HasDerivAt (fun s => ∫ σ in a..s, w σ) (w s) s := fun s => + (hw.continuous.integral_hasStrictDerivAt a s).hasDerivAt + have hWc : Continuous fun s => ∫ σ in a..s, w σ := (contDiff_primitive hw a).continuous + have hG1 : ContDiff ℝ 1 G := hG.of_le (by exact_mod_cast le_top) + have hD : ∀ s, HasDerivAt (fun s => dilate (Real.exp s) G x) + ((finrank ℝ V : ℂ) * dilate (Real.exp s) G x + fderiv ℝ (dilate (Real.exp s) G) x x) s := + fun s => hasDerivAt_dilate_exp (hG1.differentiable one_ne_zero) x s + have hDc : Continuous fun s => dilate (Real.exp s) G x := + (continuous_dilate_exp hG.continuous).comp (continuous_const.prodMk continuous_id) + have hFc := continuous_fderiv_dilate_exp_apply hG1 x + have hibp := intervalIntegral.integral_mul_deriv_eq_deriv_mul (fun s _ => hD s) + (fun s _ => hW s) (((continuous_const.mul hDc).add hFc).intervalIntegrable a b) + (hw.continuous.intervalIntegrable a b) + rw [intervalIntegral.integral_same, hw0, mul_zero, mul_zero, sub_zero, zero_sub] at hibp + have h1 : Continuous fun s => + (finrank ℝ V : ℂ) * (-(∫ σ in a..s, w σ) * dilate (Real.exp s) G x) := + continuous_const.mul (hWc.neg.mul hDc) + have h2 : Continuous fun s => -(∫ σ in a..s, w σ) * fderiv ℝ (dilate (Real.exp s) G) x x := + hWc.neg.mul hFc + rw [fderiv_weightedDilation_apply a b ((contDiff_primitive hw a).neg.of_le + (by exact_mod_cast le_top)) hG1, weightedDilation, weightedDilation, + ← intervalIntegral.integral_const_mul, + ← intervalIntegral.integral_add (h1.intervalIntegrable a b) (h2.intervalIntegrable a b)] + calc ∫ s in a..b, ((finrank ℝ V : ℂ) * (-(∫ σ in a..s, w σ) * dilate (Real.exp s) G x) + + -(∫ σ in a..s, w σ) * fderiv ℝ (dilate (Real.exp s) G) x x) + = ∫ s in a..b, -(((finrank ℝ V : ℂ) * dilate (Real.exp s) G x + + fderiv ℝ (dilate (Real.exp s) G) x x) * ∫ σ in a..s, w σ) := + intervalIntegral.integral_congr fun s _ => by ring + _ = ∫ s in a..b, dilate (Real.exp s) G x * w s := by rw [intervalIntegral.integral_neg, hibp] + _ = ∫ s in a..b, w s * dilate (Real.exp s) G x := + intervalIntegral.integral_congr fun s _ => mul_comm _ _ + +omit [MeasurableSpace V] [BorelSpace V] in +/-- **A weighted dilation average as a divergence**: for smooth `w` with `∫_a^b w = 0` and smooth +`G`, `A_w G = ∑_i ∂_{e_i} A_W(⟪e_i, ·⟫ G)` with the anti-weight `W = Rd.antiWeight a w`. The terms +are `⟪e_i, x⟫` times the average with the weight `-∫_a^s w` +(`Rd.weightedDilation_antiWeight_inner_mul`), whose divergence is computed by +`Rd.sum_fderiv_inner_mul` and `Rd.finrank_mul_add_fderiv_weightedDilation_primitive`. -/ +theorem weightedDilation_eq_sum_fderiv {a b : ℝ} {w : ℝ → ℂ} + (hw : ContDiff ℝ ((⊤ : ℕ∞) : WithTop ℕ∞) w) (hw0 : ∫ s in a..b, w s = 0) {G : V → ℂ} + (hG : ContDiff ℝ ((⊤ : ℕ∞) : WithTop ℕ∞) G) (x : V) : + weightedDilation a b w G x = ∑ i, fderiv ℝ (weightedDilation a b (antiWeight a w) + (fun y => (inner ℝ (gridBasis V i) y : ℂ) * G y)) x (gridBasis V i) := by + have h : ∀ i, weightedDilation a b (antiWeight a w) + (fun y => (inner ℝ (gridBasis V i) y : ℂ) * G y) = fun y => + (inner ℝ (gridBasis V i) y : ℂ) * weightedDilation a b (fun s => -∫ σ in a..s, w σ) G y := + fun i => funext fun y => weightedDilation_antiWeight_inner_mul a b w G _ y + simp_rw [h] + rw [sum_fderiv_inner_mul (gridBasis V) ((contDiff_weightedDilation a b + (contDiff_primitive hw a).neg hG).differentiable (by simp) x), + finrank_mul_add_fderiv_weightedDilation_primitive hw hw0 hG x] + +/-- The anti-weight of a continuous weight is continuous: the primitive `s ↦ ∫_a^s w` is +continuous (Mathlib's `intervalIntegral.continuous_primitive`). -/ +theorem continuous_antiWeight (a : ℝ) {w : ℝ → ℂ} (hw : Continuous w) : + Continuous (antiWeight a w) := + ((Complex.continuous_ofReal.comp (Real.continuous_exp.comp continuous_neg)).neg).mul + (intervalIntegral.continuous_primitive (fun _ _ => hw.intervalIntegrable _ _) a) + +/-- The exponential `s ↦ -(c⁻¹ e^{-cs})` has the derivative `e^{-cs}` for `c ≠ 0`. -/ +theorem hasDerivAt_neg_inv_mul_exp {c : ℝ} (hc : c ≠ 0) (s : ℝ) : + HasDerivAt (fun s => -(c⁻¹ * Real.exp (-(c * s)))) (Real.exp (-(c * s))) s := by + have h := ((((hasDerivAt_id' s).const_mul c).neg).exp.const_mul c⁻¹).neg + convert h using 1 + simp only [Pi.neg_apply] + field_simp + +/-- **The moments of the anti-weight**: for continuous `w` with `∫_a^b w = 0` and `r ∈ ℕ`, +`∫_a^b W(s) e^{-rs} ds = -(r + 1)⁻¹ ∫_a^b w(s) e^{-(r+1)s} ds` with `W = Rd.antiWeight a w`, by +integration by parts against `-(r + 1)⁻¹ e^{-(r+1)s}` (Mathlib's +`intervalIntegral.integral_mul_deriv_eq_deriv_mul`). -/ +theorem integral_antiWeight_mul_exp {a b : ℝ} {w : ℝ → ℂ} (hw : Continuous w) + (hw0 : ∫ s in a..b, w s = 0) (r : ℕ) : + ∫ s in a..b, antiWeight a w s * ((Real.exp (-(r * s)) : ℝ) : ℂ) = + -((r : ℂ) + 1)⁻¹ * ∫ s in a..b, w s * ((Real.exp (-((r + 1 : ℕ) * s)) : ℝ) : ℂ) := by + have hc : ((r : ℝ) + 1) ≠ 0 := by positivity + have hW : ∀ s, HasDerivAt (fun s => ∫ σ in a..s, w σ) (w s) s := fun s => + (hw.integral_hasStrictDerivAt a s).hasDerivAt + have hE : Continuous fun s => ((Real.exp (-(((r : ℝ) + 1) * s)) : ℝ) : ℂ) := by fun_prop + have hibp := intervalIntegral.integral_mul_deriv_eq_deriv_mul (fun s _ => hW s) + (fun s _ => (hasDerivAt_neg_inv_mul_exp hc s).ofReal_comp) + (hw.intervalIntegrable a b) (hE.intervalIntegrable a b) + rw [intervalIntegral.integral_same, hw0, zero_mul, zero_mul, sub_zero, zero_sub] at hibp + calc ∫ s in a..b, antiWeight a w s * ((Real.exp (-(r * s)) : ℝ) : ℂ) + = -∫ s in a..b, (∫ σ in a..s, w σ) * ((Real.exp (-(((r : ℝ) + 1) * s)) : ℝ) : ℂ) := by + rw [← intervalIntegral.integral_neg] + refine intervalIntegral.integral_congr fun s _ => ?_ + have he : Real.exp (-s) * Real.exp (-(r * s)) = Real.exp (-(((r : ℝ) + 1) * s)) := by + rw [← Real.exp_add] + ring_nf + simp only [antiWeight] + rw [← he, Complex.ofReal_mul] + ring + _ = -((r : ℂ) + 1)⁻¹ * ∫ s in a..b, w s * ((Real.exp (-((r + 1 : ℕ) * s)) : ℝ) : ℂ) := by + rw [hibp, neg_neg, ← intervalIntegral.integral_const_mul] + refine intervalIntegral.integral_congr fun s _ => ?_ + simp only [Nat.cast_add, Nat.cast_one, Complex.ofReal_neg, Complex.ofReal_mul, + Complex.ofReal_inv, Complex.ofReal_add, Complex.ofReal_natCast, Complex.ofReal_one] + ring + +/-! ### Iterated anti-weights and the higher divergence kernels -/ + +/-- The **iterated anti-weights** `w_0 = w`, `w_{k+1} = Rd.antiWeight a w_k`. -/ +noncomputable def iterWeight (a : ℝ) (w : ℝ → ℂ) (k : ℕ) : ℝ → ℂ := (antiWeight a)^[k] w + +/-- `w_{k+1}` of `w` is `w_k` of the anti-weight of `w`. -/ +theorem iterWeight_succ (a : ℝ) (w : ℝ → ℂ) (k : ℕ) : + iterWeight a w (k + 1) = iterWeight a (antiWeight a w) k := + Function.iterate_succ_apply _ _ _ + +/-- The iterated anti-weights of a smooth weight are smooth. -/ +theorem contDiff_iterWeight (a : ℝ) {w : ℝ → ℂ} (hw : ContDiff ℝ ((⊤ : ℕ∞) : WithTop ℕ∞) w) + (k : ℕ) : ContDiff ℝ ((⊤ : ℕ∞) : WithTop ℕ∞) (iterWeight a w k) := by + induction k generalizing w with + | zero => exact hw + | succ k ih => rw [iterWeight_succ]; exact ih (contDiff_antiWeight a hw) + +/-- The zeroth moment of a weight is its integral. -/ +theorem integral_mul_exp_zero (a b : ℝ) (w : ℝ → ℂ) : + ∫ s in a..b, w s * ((Real.exp (-(((0 : ℕ) : ℝ) * s)) : ℝ) : ℂ) = ∫ s in a..b, w s := by + simp + +/-- **Moments of the iterated anti-weights**: if the moments `∫_a^b w(s) e^{-r's} ds` of a +continuous `w` vanish for `r' ≤ r + k`, then `∫_a^b w_k(s) e^{-rs} ds = 0`, by induction on `k` +with `Rd.integral_antiWeight_mul_exp`. -/ +theorem integral_iterWeight_mul_exp_eq_zero {a b : ℝ} {w : ℝ → ℂ} (hw : Continuous w) {k r : ℕ} + (hmom : ∀ r' ≤ r + k, ∫ s in a..b, w s * ((Real.exp (-(r' * s)) : ℝ) : ℂ) = 0) : + ∫ s in a..b, iterWeight a w k s * ((Real.exp (-(r * s)) : ℝ) : ℂ) = 0 := by + induction k generalizing w with + | zero => exact hmom r (by omega) + | succ k ih => + rw [iterWeight_succ] + have hw0 : ∫ s in a..b, w s = 0 := by + rw [← integral_mul_exp_zero] + exact hmom 0 (by omega) + refine ih (continuous_antiWeight a hw) fun r' hr' => ?_ + rw [integral_antiWeight_mul_exp hw hw0, hmom (r' + 1) (by omega), mul_zero] + +/-- The iterated anti-weights of a continuous weight are continuous. -/ +theorem continuous_iterWeight (a : ℝ) {w : ℝ → ℂ} (hw : Continuous w) (k : ℕ) : + Continuous (iterWeight a w k) := by + induction k generalizing w with + | zero => exact hw + | succ k ih => rw [iterWeight_succ]; exact ih (continuous_antiWeight a hw) + +omit [MeasurableSpace V] [BorelSpace V] in +/-- The products `∏_l ⟪e_{i_l}, x⟫ G(x)` of a smooth `G` with the coordinates along a word `i` are +smooth. -/ +theorem contDiff_prod_inner_mul {G : V → ℂ} (hG : ContDiff ℝ ((⊤ : ℕ∞) : WithTop ℕ∞) G) {m : ℕ} + (i : Fin m → Fin (finrank ℝ V)) : + ContDiff ℝ ((⊤ : ℕ∞) : WithTop ℕ∞) + fun y => (∏ l, (inner ℝ (gridBasis V (i l)) y : ℂ)) * G y := + (contDiff_prod (t := Finset.univ) (f := fun l y => (inner ℝ (gridBasis V (i l)) y : ℂ)) + fun l _ => Complex.ofRealCLM.contDiff.comp (innerSL ℝ (gridBasis V (i l))).contDiff).mul hG + +omit [MeasurableSpace V] [BorelSpace V] in +/-- The products `⟪e_j, x⟫ G(x)` of a smooth `G` with a coordinate are smooth. -/ +theorem contDiff_inner_mul {G : V → ℂ} (hG : ContDiff ℝ ((⊤ : ℕ∞) : WithTop ℕ∞) G) + (j : Fin (finrank ℝ V)) : + ContDiff ℝ ((⊤ : ℕ∞) : WithTop ℕ∞) fun y => (inner ℝ (gridBasis V j) y : ℂ) * G y := + (Complex.ofRealCLM.contDiff.comp (innerSL ℝ (gridBasis V j)).contDiff).mul hG + +omit [InnerProductSpace ℝ V] [FiniteDimensional ℝ V] [MeasurableSpace V] [BorelSpace V] in +/-- Products `c(x) G(x)` vanish where `G` vanishes. -/ +theorem mul_eq_zero_of_lt_norm {G : V → ℂ} {R : ℝ} (hR : ∀ z, R < ‖z‖ → G z = 0) (c : V → ℂ) : + ∀ z, R < ‖z‖ → c z * G z = 0 := fun z hz => by rw [hR z hz, mul_zero] + +/-- The **higher divergence kernel** of the word `i = (i_0, …, i_{m-1})`: the weighted dilation +average `∫_a^b w_m(s) (x^i G)_{e^s} ds` of `x^i G(x) = ∏_l ⟪e_{i_l}, x⟫ G(x)` with the iterated +anti-weight `w_m = Rd.iterWeight a w m`. If the moments of `w` of the orders `0, …, m - 1` vanish, +`A_w G = ∑_i ∂^{e_i}` of these kernels (`Rd.weightedDilation_eq_sum_iteratedLineDeriv`). -/ +noncomputable def higherDivKernel (a b : ℝ) (w : ℝ → ℂ) (G : V → ℂ) {m : ℕ} + (i : Fin m → Fin (finrank ℝ V)) : V → ℂ := + weightedDilation a b (iterWeight a w m) + (fun y => (∏ l, (inner ℝ (gridBasis V (i l)) y : ℂ)) * G y) + +/-- The higher divergence kernel of smooth `w` and of a smooth `G` that vanishes outside a ball, as +a Schwartz function (it is smooth with compact support). -/ +noncomputable def higherDivSchwartz {a b : ℝ} (hab : a ≤ b) {w : ℝ → ℂ} + (hw : ContDiff ℝ ((⊤ : ℕ∞) : WithTop ℕ∞) w) {G : V → ℂ} + (hG : ContDiff ℝ ((⊤ : ℕ∞) : WithTop ℕ∞) G) {R : ℝ} (hR : ∀ z, R < ‖z‖ → G z = 0) {m : ℕ} + (i : Fin m → Fin (finrank ℝ V)) : 𝓢(V, ℂ) := + (hasCompactSupport_weightedDilation hab (iterWeight a w m) + (mul_eq_zero_of_lt_norm hR fun y => ∏ l, (inner ℝ (gridBasis V (i l)) y : ℂ))).toSchwartzMap + (contDiff_weightedDilation a b (contDiff_iterWeight a hw m) (contDiff_prod_inner_mul hG i)) + +omit [MeasurableSpace V] [BorelSpace V] in +/-- The values of `Rd.higherDivSchwartz` are those of `Rd.higherDivKernel`. -/ +theorem higherDivSchwartz_apply {a b : ℝ} (hab : a ≤ b) {w : ℝ → ℂ} + (hw : ContDiff ℝ ((⊤ : ℕ∞) : WithTop ℕ∞) w) {G : V → ℂ} + (hG : ContDiff ℝ ((⊤ : ℕ∞) : WithTop ℕ∞) G) {R : ℝ} (hR : ∀ z, R < ‖z‖ → G z = 0) {m : ℕ} + (i : Fin m → Fin (finrank ℝ V)) (x : V) : + higherDivSchwartz hab hw hG hR i x = higherDivKernel a b w G i x := + rfl + +omit [MeasurableSpace V] [BorelSpace V] in +/-- **Words of the anti-weight**: the kernel of the word `i` for the anti-weight of `w` and +`⟪e_j, ·⟫ G` is the kernel of the word `(j, i)` for `w` and `G`. -/ +theorem higherDivSchwartz_antiWeight {a b : ℝ} (hab : a ≤ b) {w : ℝ → ℂ} + (hw : ContDiff ℝ ((⊤ : ℕ∞) : WithTop ℕ∞) w) {G : V → ℂ} + (hG : ContDiff ℝ ((⊤ : ℕ∞) : WithTop ℕ∞) G) {R : ℝ} (hR : ∀ z, R < ‖z‖ → G z = 0) {m : ℕ} + (j : Fin (finrank ℝ V)) (i : Fin m → Fin (finrank ℝ V)) : + higherDivSchwartz hab (contDiff_antiWeight a hw) (contDiff_inner_mul hG j) + (mul_eq_zero_of_lt_norm hR fun y => (inner ℝ (gridBasis V j) y : ℂ)) i = + higherDivSchwartz hab hw hG hR (Fin.cons j i : Fin (m + 1) → Fin (finrank ℝ V)) := by + ext x + rw [higherDivSchwartz_apply, higherDivSchwartz_apply, higherDivKernel, higherDivKernel, + iterWeight_succ] + congr 1 + funext y + rw [Fin.prod_univ_succ] + simp only [Fin.cons_zero, Fin.cons_succ] + ring + +omit [MeasurableSpace V] [BorelSpace V] in +/-- **A weighted dilation average as a sum of derivatives of order `m`**: if `w` is smooth with +vanishing moments `∫_a^b w(s) e^{-rs} ds = 0` for `r < m` and `G` is smooth and vanishes outside a +ball, then `A_w G = ∑_i ∂_{e_{i_0}} ⋯ ∂_{e_{i_{m-1}}} K_i` over the words `i` of length `m`, with +the higher divergence kernels `K_i` (`Rd.higherDivSchwartz`). By induction on `m`: one step is +`Rd.weightedDilation_eq_sum_fderiv`, and the anti-weight keeps the vanishing moments +(`Rd.integral_antiWeight_mul_exp`). -/ +theorem weightedDilation_eq_sum_iteratedLineDeriv {a b : ℝ} (hab : a ≤ b) {w : ℝ → ℂ} + (hw : ContDiff ℝ ((⊤ : ℕ∞) : WithTop ℕ∞) w) {G : V → ℂ} + (hG : ContDiff ℝ ((⊤ : ℕ∞) : WithTop ℕ∞) G) {R : ℝ} (hR : ∀ z, R < ‖z‖ → G z = 0) {m : ℕ} + (hmom : ∀ r < m, ∫ s in a..b, w s * ((Real.exp (-(r * s)) : ℝ) : ℂ) = 0) (x : V) : + weightedDilation a b w G x = ∑ i : Fin m → Fin (finrank ℝ V), + (∂^{fun l => gridBasis V (i l)} (higherDivSchwartz hab hw hG hR i) : 𝓢(V, ℂ)) x := by + induction m generalizing w G x with + | zero => + simp [higherDivSchwartz_apply, higherDivKernel, iterWeight] + | succ m ih => + have hw0 : ∫ s in a..b, w s = 0 := by + rw [← integral_mul_exp_zero] + exact hmom 0 (by omega) + have hmom' : ∀ r < m, ∫ s in a..b, antiWeight a w s * ((Real.exp (-(r * s)) : ℝ) : ℂ) = 0 := + fun r hr => by + rw [integral_antiWeight_mul_exp hw.continuous hw0, hmom (r + 1) (by omega), mul_zero] + have hS : ∀ j, weightedDilation a b (antiWeight a w) + (fun y => (inner ℝ (gridBasis V j) y : ℂ) * G y) = + ⇑(∑ i : Fin m → Fin (finrank ℝ V), ∂^{fun l => gridBasis V (i l)} + (higherDivSchwartz hab hw hG hR (Fin.cons j i : Fin (m + 1) → Fin (finrank ℝ V)))) := + fun j => funext fun y => by + rw [ih (contDiff_antiWeight a hw) (contDiff_inner_mul hG j) + (mul_eq_zero_of_lt_norm hR fun y => (inner ℝ (gridBasis V j) y : ℂ)) hmom' y, sum_apply] + refine Finset.sum_congr rfl fun i _ => ?_ + rw [higherDivSchwartz_antiWeight] + rw [weightedDilation_eq_sum_fderiv hw hw0 hG x] + simp_rw [hS] + rw [← Fintype.sum_equiv (Fin.consEquiv fun _ => Fin (finrank ℝ V)) _ _ fun _ => rfl, + Fintype.sum_prod_type] + refine Finset.sum_congr rfl fun j _ => ?_ + rw [← SchwartzMap.lineDerivOp_apply_eq_fderiv, LineDeriv.lineDerivOp_sum, sum_apply] + refine Finset.sum_congr rfl fun i _ => ?_ + rw [LineDeriv.iteratedLineDerivOp_succ_left] + rfl + +/-- **The higher divergence kernels have mean zero**: if the moments `∫_a^b w(s) e^{-rs} ds` of a +continuous `w` vanish for `r ≤ m`, then `∫ K_i = (∫_a^b w_m) ∫ x^i G = 0` for every word `i` of +length `m` (`Rd.integral_weightedDilation`, `Rd.integral_iterWeight_mul_exp_eq_zero`). -/ +theorem integral_higherDivKernel_eq_zero {a b : ℝ} (hab : a ≤ b) {w : ℝ → ℂ} (hw : Continuous w) + {G : V → ℂ} (hG : Continuous G) {R : ℝ} (hR : ∀ z, R < ‖z‖ → G z = 0) {m : ℕ} + (hmom : ∀ r ≤ m, ∫ s in a..b, w s * ((Real.exp (-(r * s)) : ℝ) : ℂ) = 0) + (i : Fin m → Fin (finrank ℝ V)) : ∫ x, higherDivKernel a b w G i x = 0 := by + have hc : Continuous fun y => (∏ l, (inner ℝ (gridBasis V (i l)) y : ℂ)) * G y := + (continuous_finsetProd _ fun l _ => + Complex.continuous_ofReal.comp (continuous_const.inner continuous_id)).mul hG + rw [higherDivKernel, integral_weightedDilation hab (continuous_iterWeight a hw m) hc + (mul_eq_zero_of_lt_norm hR _), ← integral_mul_exp_zero, + integral_iterWeight_mul_exp_eq_zero (r := 0) hw fun r' hr' => hmom r' (by omega), zero_mul] + +/-! ### Supports in a cone -/ + +namespace LipschitzGraph + +variable (Ω : LipschitzGraph V) + +omit [FiniteDimensional ℝ V] [MeasurableSpace V] [BorelSpace V] in +/-- Products `c(x) G(x)` of a kernel supported in `-K` are supported in `-K`. -/ +theorem ConeSupported.mul_left {G : V → ℂ} (hG : Ω.ConeSupported G) (c : V → ℂ) : + Ω.ConeSupported fun y => c y * G y := fun y hy => hG y (right_ne_zero_of_mul hy) + +omit [FiniteDimensional ℝ V] [MeasurableSpace V] [BorelSpace V] in +/-- **Weighted dilation averages of cone kernels are cone kernels**: if `G` is supported in `-K`, +so is every weighted dilation average of `G`, since `A_w G(y) ≠ 0` needs `G(e^s y) ≠ 0` for some +`s`, and `-e^s y ∈ K` gives `-y ∈ K` (`Rd.LipschitzGraph.smul_mem_cone`). -/ +theorem coneSupported_weightedDilation {G : V → ℂ} (hG : Ω.ConeSupported G) (a b : ℝ) + (w : ℝ → ℂ) : Ω.ConeSupported (weightedDilation a b w G) := fun y hy => by + by_contra hny + refine hy (weightedDilation_eq_zero a b w fun s _ => ?_) + by_contra hne + have h := Ω.smul_mem_cone (inv_pos.2 (Real.exp_pos s)) (hG _ hne) + rw [smul_neg, inv_smul_smul₀ (Real.exp_pos s).ne'] at h + exact hny h + +omit [MeasurableSpace V] [BorelSpace V] in +/-- The higher divergence kernels of a kernel supported in `-K` are supported in `-K`. -/ +theorem coneSupported_higherDivKernel {G : V → ℂ} (hG : Ω.ConeSupported G) (a b : ℝ) + (w : ℝ → ℂ) {m : ℕ} (i : Fin m → Fin (finrank ℝ V)) : + Ω.ConeSupported (higherDivKernel a b w G i) := + Ω.coneSupported_weightedDilation (ConeSupported.mul_left Ω hG _) a b _ + +end LipschitzGraph + +/-! ### Changes of the interval, linearity and dilation -/ + +/-- **Interval integrals only see the support**: if `f` vanishes outside `(a, b] ⊆ (a', b']`, then +`∫_a^b f = ∫_{a'}^{b'} f`, both being `∫ f` (Mathlib's +`intervalIntegral.integral_eq_integral_of_support_subset`). -/ +theorem intervalIntegral_eq_of_support_subset {f : ℝ → ℂ} {a b a' b' : ℝ} + (h : Function.support f ⊆ Ioc a b) (h' : Ioc a b ⊆ Ioc a' b') : + ∫ s in a..b, f s = ∫ s in a'..b', f s := + (intervalIntegral.integral_eq_integral_of_support_subset h).trans + (intervalIntegral.integral_eq_integral_of_support_subset (h.trans h')).symm + +omit [FiniteDimensional ℝ V] [MeasurableSpace V] [BorelSpace V] in +/-- A weighted dilation average does not change if the interval grows beyond the support of the +weight (`Rd.intervalIntegral_eq_of_support_subset`). -/ +theorem weightedDilation_eq_of_support {a b a' b' : ℝ} {w : ℝ → ℂ} + (h : ∀ s, w s ≠ 0 → s ∈ Ioc a b) (h' : Ioc a b ⊆ Ioc a' b') (G : V → ℂ) (x : V) : + weightedDilation a b w G x = weightedDilation a' b' w G x := + intervalIntegral_eq_of_support_subset (fun s hs => h s (left_ne_zero_of_mul hs)) h' + +omit [FiniteDimensional ℝ V] [MeasurableSpace V] [BorelSpace V] in +/-- **Weighted dilation averages are linear in the weight**: +`A_{∑_l c_l w_l} G = ∑_l c_l A_{w_l} G` for continuous `w_l` and `G`. -/ +theorem weightedDilation_sum {ι : Type*} (t : Finset ι) (c : ι → ℂ) {w : ι → ℝ → ℂ} + (hw : ∀ l ∈ t, Continuous (w l)) {G : V → ℂ} (hG : Continuous G) (a b : ℝ) (x : V) : + weightedDilation a b (fun s => ∑ l ∈ t, c l * w l s) G x = + ∑ l ∈ t, c l * weightedDilation a b (w l) G x := by + have hD : Continuous fun s => dilate (Real.exp s) G x := + (continuous_dilate_exp hG).comp (continuous_const.prodMk continuous_id) + simp only [weightedDilation] + calc ∫ s in a..b, (∑ l ∈ t, c l * w l s) * dilate (Real.exp s) G x + = ∫ s in a..b, ∑ l ∈ t, c l * (w l s * dilate (Real.exp s) G x) := + intervalIntegral.integral_congr fun s _ => by + rw [Finset.sum_mul] + exact Finset.sum_congr rfl fun l _ => mul_assoc _ _ _ + _ = ∑ l ∈ t, ∫ s in a..b, c l * (w l s * dilate (Real.exp s) G x) := + intervalIntegral.integral_finsetSum fun l hl => + (continuous_const.mul ((hw l hl).mul hD)).intervalIntegrable a b + _ = _ := Finset.sum_congr rfl fun l _ => intervalIntegral.integral_const_mul _ _ + +omit [FiniteDimensional ℝ V] [MeasurableSpace V] [BorelSpace V] in +/-- Weighted dilation averages of differences of continuous weights: `A_{w - v} G = A_w G - A_v G` +for continuous `G`. -/ +theorem weightedDilation_sub {w v : ℝ → ℂ} (hw : Continuous w) (hv : Continuous v) {G : V → ℂ} + (hG : Continuous G) (a b : ℝ) (x : V) : + weightedDilation a b (fun s => w s - v s) G x = + weightedDilation a b w G x - weightedDilation a b v G x := by + have hD : Continuous fun s => dilate (Real.exp s) G x := + (continuous_dilate_exp hG).comp (continuous_const.prodMk continuous_id) + simp only [weightedDilation, sub_mul] + exact intervalIntegral.integral_sub ((hw.mul hD).intervalIntegrable a b) + ((hv.mul hD).intervalIntegrable a b) + +omit [FiniteDimensional ℝ V] [MeasurableSpace V] [BorelSpace V] in +/-- **Dilating a weighted dilation average shifts the weight**: +`(A_w G)_{e^{-t}} = ∫_{a-t}^{b-t} w(s + t) G_{e^s} ds`, since +`(G_{e^s})_{e^{-t}} = G_{e^{s-t}}` (`Rd.dilate_dilate`) and the substitution `s ↦ s + t` (Mathlib's +`intervalIntegral.integral_comp_add_right`). -/ +theorem dilate_exp_neg_weightedDilation (a b t : ℝ) (w : ℝ → ℂ) (G : V → ℂ) (x : V) : + dilate (Real.exp (-t)) (weightedDilation a b w G) x = + weightedDilation (a - t) (b - t) (fun s => w (s + t)) G x := by + have h := intervalIntegral.integral_comp_add_right + (fun s => w s * dilate (Real.exp (s - t)) G x) t (a := a - t) (b := b - t) + simp only [add_sub_cancel_right, sub_add_cancel] at h + change ((Real.exp (-t) ^ finrank ℝ V : ℝ) : ℂ) * + (∫ s in a..b, w s * dilate (Real.exp s) G (Real.exp (-t) • x)) = + ∫ s in (a - t)..(b - t), w (s + t) * dilate (Real.exp s) G x + rw [h, ← intervalIntegral.integral_const_mul] + refine intervalIntegral.integral_congr fun s _ => ?_ + have hd : dilate (Real.exp (s - t)) G x = + ((Real.exp (-t) ^ finrank ℝ V : ℝ) : ℂ) * dilate (Real.exp s) G (Real.exp (-t) • x) := by + rw [sub_eq_neg_add, Real.exp_add, ← dilate_dilate] + rfl + rw [hd] + ring + +/-! ### The smoothing weight and the smoothed bump -/ + +/-- The smooth bump on `ℝ` centred at `log 2 / 2` with inner radius `log 2 / 4` and outer radius +`log 2 / 2`, supported in `[0, log 2]`. -/ +noncomputable def logBumpBase : ContDiffBump (Real.log 2 / 2) := + ⟨Real.log 2 / 4, Real.log 2 / 2, div_pos (Real.log_pos one_lt_two) four_pos, + by linarith [Real.log_pos one_lt_two]⟩ + +/-- The **smoothing weight** `ρ`: a smooth function with `∫ ρ = 1` that vanishes outside +`(0, log 2)` (the normalised bump `logBumpBase`). -/ +noncomputable def dilationWeight (s : ℝ) : ℂ := ((logBumpBase.normed volume s : ℝ) : ℂ) + +/-- The smoothing weight is smooth. -/ +theorem contDiff_dilationWeight : ContDiff ℝ ((⊤ : ℕ∞) : WithTop ℕ∞) dilationWeight := + Complex.ofRealCLM.contDiff.comp (logBumpBase.contDiff_normed (n := ⊤)) + +/-- The smoothing weight vanishes outside `(0, log 2)` (Mathlib's +`ContDiffBump.support_normed_eq`). -/ +theorem mem_Ioo_of_dilationWeight_ne_zero {s : ℝ} (h : dilationWeight s ≠ 0) : + s ∈ Ioo 0 (Real.log 2) := by + have hs : s ∈ Function.support (logBumpBase.normed volume) := fun h0 => + h (by simp [dilationWeight, h0]) + rw [logBumpBase.support_normed_eq, Real.ball_eq_Ioo] at hs + change s ∈ Ioo (Real.log 2 / 2 - Real.log 2 / 2) (Real.log 2 / 2 + Real.log 2 / 2) at hs + exact ⟨by linarith [hs.1], by linarith [hs.2]⟩ + +/-- The smoothing weight has integral `1` over `[0, log 2]` (Mathlib's +`ContDiffBump.integral_normed`). -/ +theorem integral_dilationWeight : ∫ s in (0 : ℝ)..Real.log 2, dilationWeight s = 1 := by + rw [intervalIntegral.integral_eq_integral_of_support_subset fun s hs => + Ioo_subset_Ioc_self (mem_Ioo_of_dilationWeight_ne_zero hs)] + simp only [dilationWeight] + rw [integral_complex_ofReal, logBumpBase.integral_normed, Complex.ofReal_one] + +/-- The **smoothed bump** `∫_0^{log 2} ρ(s) b_{e^s} ds` of a bump `b` of radius `R`: a bump of the +same radius, an average of the dilates `b_t`, `1 ≤ t ≤ 2`. Its moment kernels are weighted dilation +averages of `b` with smooth weights (`Rd.LocalMeansBump.momentKernel_dilationSmoothed`). -/ +noncomputable def LocalMeansBump.dilationSmoothed (b : LocalMeansBump V) : LocalMeansBump V where + toFun := weightedDilation 0 (Real.log 2) dilationWeight b.toFun + radius := b.radius + radius_nonneg := b.radius_nonneg + contDiff := contDiff_weightedDilation _ _ contDiff_dilationWeight b.contDiff + eq_zero z hz := weightedDilation_eq_zero_of_lt (Real.log_nonneg one_le_two) _ b.eq_zero + (by rwa [neg_zero, Real.exp_zero, mul_one]) + integral_eq_one := by + rw [integral_weightedDilation (Real.log_nonneg one_le_two) + contDiff_dilationWeight.continuous b.contDiff.continuous + b.eq_zero, integral_dilationWeight, b.integral_eq_one, one_mul] + +/-- The smoothed bump has the radius of the bump. -/ +theorem LocalMeansBump.dilationSmoothed_radius (b : LocalMeansBump V) : + b.dilationSmoothed.radius = b.radius := + rfl + +/-- The smoothed bump of a bump supported in `-K` is supported in `-K` +(`Rd.LipschitzGraph.coneSupported_weightedDilation`). -/ +theorem LipschitzGraph.coneSupported_dilationSmoothed (Ω : LipschitzGraph V) + {b : LocalMeansBump V} (hb : Ω.ConeSupported b.toFun) : + Ω.ConeSupported b.dilationSmoothed.toFun := + Ω.coneSupported_weightedDilation hb _ _ _ + +/-! ### The moment weights -/ + +/-- The **moment weight** `u(s) = ∑_{l contDiff_const.mul (contDiff_dilationWeight.comp + (contDiff_id.add contDiff_const)) + +/-- The kernel weights are smooth. -/ +theorem contDiff_kernelWeight (L : ℕ) : ContDiff ℝ ((⊤ : ℕ∞) : WithTop ℕ∞) (kernelWeight L) := + ((contDiff_momentWeight L).comp (contDiff_id.sub contDiff_const)).sub (contDiff_momentWeight L) + +/-- `0 ≤ log(l + 1) ≤ log L` for `l < L`. -/ +theorem log_succ_mem_Icc {L l : ℕ} (hl : l < L) : + Real.log ((l : ℝ) + 1) ∈ Icc 0 (Real.log L) := by + have h1 : (1 : ℝ) ≤ (l : ℝ) + 1 := by linarith [(Nat.cast_nonneg l : (0 : ℝ) ≤ l)] + have h2 : (l : ℝ) + 1 ≤ L := by exact_mod_cast hl + exact ⟨Real.log_nonneg h1, Real.log_le_log (by linarith) h2⟩ + +/-- The shifted smoothing weights `ρ(s + log(l + 1))`, `l < L`, vanish outside +`(-log L, log 2]`. -/ +theorem mem_Ioc_of_dilationWeight_add_ne_zero {L l : ℕ} (hl : l < L) {s : ℝ} + (h : dilationWeight (s + Real.log ((l : ℝ) + 1)) ≠ 0) : s ∈ Ioc (-Real.log L) (Real.log 2) := by + obtain ⟨h1, h2⟩ := mem_Ioo_of_dilationWeight_ne_zero h + obtain ⟨h3, h4⟩ := log_succ_mem_Icc hl + exact ⟨by linarith, by linarith⟩ + +/-- The moment weight vanishes outside `(-log L, log 2]`. -/ +theorem mem_Ioc_of_momentWeight_ne_zero {L : ℕ} {s : ℝ} (h : momentWeight L s ≠ 0) : + s ∈ Ioc (-Real.log L) (Real.log 2) := by + obtain ⟨l, hl, hne⟩ := Finset.exists_ne_zero_of_sum_ne_zero h + exact mem_Ioc_of_dilationWeight_add_ne_zero (Finset.mem_range.1 hl) (right_ne_zero_of_mul hne) + +/-- The kernel weight vanishes outside `(-log L, 2 log 2]`. -/ +theorem mem_Ioc_of_kernelWeight_ne_zero {L : ℕ} {s : ℝ} (h : kernelWeight L s ≠ 0) : + s ∈ Ioc (-Real.log L) (2 * Real.log 2) := by + have hlog := Real.log_nonneg (one_le_two : (1 : ℝ) ≤ 2) + by_cases h1 : momentWeight L (s - Real.log 2) = 0 + · have h2 : momentWeight L s ≠ 0 := fun h2 => h (by rw [kernelWeight, h1, h2, sub_zero]) + obtain ⟨h3, h4⟩ := mem_Ioc_of_momentWeight_ne_zero h2 + exact ⟨h3, by linarith⟩ + · obtain ⟨h3, h4⟩ := mem_Ioc_of_momentWeight_ne_zero h1 + have h5 : 0 ≤ Real.log L := Real.log_natCast_nonneg L + exact ⟨by linarith, by linarith⟩ + +/-- The interval `(-log L, 2 log 2]` of the kernel weights is not reversed. -/ +theorem neg_log_le_two_mul_log_two (L : ℕ) : -Real.log L ≤ 2 * Real.log 2 := by + have h1 := Real.log_natCast_nonneg L + have h2 := Real.log_nonneg (one_le_two : (1 : ℝ) ≤ 2) + linarith + +/-- **The moment kernels of the smoothed bump**: `m = ∑_{l dilationWeight (s + Real.log ((l : ℝ) + 1))) b.toFun x := fun l hl => by + have hc : (1 : ℝ) / ((l : ℝ) + 1) = Real.exp (-Real.log ((l : ℝ) + 1)) := by + rw [Real.exp_neg, Real.exp_log (by positivity), one_div] + obtain ⟨h3, h4⟩ := log_succ_mem_Icc (Finset.mem_range.1 hl) + rw [hc] + refine (dilate_exp_neg_weightedDilation 0 (Real.log 2) _ dilationWeight b.toFun x).trans + (weightedDilation_eq_of_support (fun s hs => ?_) + (Ioc_subset_Ioc (by linarith) (by linarith)) _ x) + obtain ⟨h1, h2⟩ := mem_Ioo_of_dilationWeight_ne_zero hs + exact ⟨by linarith, by linarith⟩ + rw [momentKernel, Finset.sum_congr rfl fun l hl => by rw [hterm l hl]] + exact (weightedDilation_sum _ _ (fun l _ => contDiff_dilationWeight.continuous.comp + (continuous_id.add continuous_const)) b.contDiff.continuous _ _ x).symm + +/-- **The local means kernels of the smoothed bump**: `k_{j+1} = (m_2 - m)_{2^j}` with +`m_2 - m = ∫_{-log L}^{2 log 2} (u(s - log 2) - u(s)) b_{e^s} ds`, the weighted dilation average +with the kernel weight (`Rd.LocalMeansBump.kernel_succ_eq_dilate`, +`Rd.LocalMeansBump.momentKernel_dilationSmoothed`, `Rd.dilate_exp_neg_weightedDilation`). -/ +theorem LocalMeansBump.kernel_succ_dilationSmoothed (b : LocalMeansBump V) (L j : ℕ) : + b.dilationSmoothed.kernel L (j + 1) = dilate (2 ^ j) + (weightedDilation (-Real.log L) (2 * Real.log 2) (kernelWeight L) b.toFun) := by + rw [b.dilationSmoothed.kernel_succ_eq_dilate L j] + congr 1 + funext y + have hlog := Real.log_nonneg (one_le_two : (1 : ℝ) ≤ 2) + have hL := Real.log_natCast_nonneg L + have hcont := (contDiff_momentWeight L).continuous + have h2 : dilate 2 (weightedDilation (-Real.log L) (Real.log 2) (momentWeight L) b.toFun) y = + dilate (Real.exp (-(-Real.log 2))) + (weightedDilation (-Real.log L) (Real.log 2) (momentWeight L) b.toFun) y := by + rw [neg_neg, Real.exp_log two_pos] + rw [b.momentKernel_dilationSmoothed, h2, dilate_exp_neg_weightedDilation, + weightedDilation_eq_of_support (a' := -Real.log L) (b' := 2 * Real.log 2) (fun s hs => ?_) + (Ioc_subset_Ioc (by linarith) (by linarith)), + weightedDilation_eq_of_support (a' := -Real.log L) (b' := 2 * Real.log 2) + (fun s hs => mem_Ioc_of_momentWeight_ne_zero hs) (Ioc_subset_Ioc le_rfl (by linarith)), + ← weightedDilation_sub (w := fun s => momentWeight L (s + -Real.log 2)) + (hcont.comp (continuous_id.add continuous_const)) hcont b.contDiff.continuous] + · congr 1 + · obtain ⟨h3, h4⟩ := mem_Ioc_of_momentWeight_ne_zero hs + exact ⟨by linarith, by linarith⟩ + +/-! ### Vanishing moments of the kernel weights -/ + +/-- **Moments of the shifted smoothing weight**: for `l < L` and `r ∈ ℕ`, +`∫_{-log L}^{log 2} ρ(s + log(l + 1)) e^{-rs} ds = (l + 1)^r ∫_0^{log 2} ρ(s) e^{-rs} ds`, by the +substitution `s ↦ s + log(l + 1)` (Mathlib's `intervalIntegral.integral_comp_add_right`). -/ +theorem integral_dilationWeight_add_mul_exp {L l : ℕ} (hl : l < L) (r : ℕ) : + ∫ s in (-Real.log L)..(Real.log 2), + dilationWeight (s + Real.log ((l : ℝ) + 1)) * ((Real.exp (-(r * s)) : ℝ) : ℂ) = + ((l : ℂ) + 1) ^ r * + ∫ s in (0 : ℝ)..Real.log 2, dilationWeight s * ((Real.exp (-(r * s)) : ℝ) : ℂ) := by + obtain ⟨h3, h4⟩ := log_succ_mem_Icc hl + have hlog := Real.log_nonneg (one_le_two : (1 : ℝ) ≤ 2) + have h := intervalIntegral.integral_comp_add_right (fun s => dilationWeight s * + ((Real.exp (-(r * (s - Real.log ((l : ℝ) + 1)))) : ℝ) : ℂ)) (Real.log ((l : ℝ) + 1)) + (a := -Real.log L) (b := Real.log 2) + simp only [add_sub_cancel_right] at h + rw [h, ← intervalIntegral_eq_of_support_subset (a := 0) (b := Real.log 2) + (fun s hs => Ioo_subset_Ioc_self (mem_Ioo_of_dilationWeight_ne_zero (left_ne_zero_of_mul hs))) + (Ioc_subset_Ioc (by linarith) (by linarith)), ← intervalIntegral.integral_const_mul] + refine intervalIntegral.integral_congr fun s _ => ?_ + have he : Real.exp (-(r * (s - Real.log ((l : ℝ) + 1)))) = + ((l : ℝ) + 1) ^ r * Real.exp (-(r * s)) := by + rw [show -(r * (s - Real.log ((l : ℝ) + 1))) = r * Real.log ((l : ℝ) + 1) + -(r * s) by ring, + Real.exp_add, Real.exp_nat_mul, Real.exp_log (by positivity)] + rw [he] + push_cast + ring + +/-- **Moments of the moment weight**: `∫_{-log L}^{log 2} u(s) e^{-rs} ds` is +`∑_{l ((Real.exp (-(r * s)) : ℝ) : ℂ) := by fun_prop + have hcont : ∀ l : ℕ, Continuous fun s => jacksonCoeff L l * + (dilationWeight (s + Real.log ((l : ℝ) + 1)) * ((Real.exp (-(r * s)) : ℝ) : ℂ)) := fun l => + continuous_const.mul ((contDiff_dilationWeight.continuous.comp + (continuous_id.add continuous_const)).mul hE) + simp only [momentWeight, Finset.sum_mul, mul_assoc] + rw [intervalIntegral.integral_finsetSum fun l _ => (hcont l).intervalIntegrable _ _] + refine Finset.sum_congr rfl fun l hl => ?_ + rw [intervalIntegral.integral_const_mul, + integral_dilationWeight_add_mul_exp (Finset.mem_range.1 hl)] + +/-- **The kernel weights have vanishing moments**: `∫_{-log L}^{2 log 2} (u(s - log 2) - u(s)) +e^{-rs} ds = 0` for `r < L`. The integral is `(2^{-r} - 1)` times the moment of the moment weight +`u` (substitution `s ↦ s - log 2`); the factor vanishes for `r = 0`, the moment for +`1 ≤ r < L` (`Rd.integral_momentWeight_mul_exp`, `Rd.sum_jacksonCoeff_mul_pow`). -/ +theorem integral_kernelWeight_mul_exp {L r : ℕ} (hr : r < L) : + ∫ s in (-Real.log L)..(2 * Real.log 2), + kernelWeight L s * ((Real.exp (-(r * s)) : ℝ) : ℂ) = 0 := by + have hlog := Real.log_nonneg (one_le_two : (1 : ℝ) ≤ 2) + have hc := (contDiff_momentWeight L).continuous + have hE : Continuous fun s : ℝ => ((Real.exp (-(r * s)) : ℝ) : ℂ) := by fun_prop + have hsupp : ∀ (f : ℝ → ℂ), Function.support (fun s => momentWeight L s * f s) ⊆ + Ioc (-Real.log L) (Real.log 2) := fun f s hs => + mem_Ioc_of_momentWeight_ne_zero (left_ne_zero_of_mul hs) + have h1 : ∫ s in (-Real.log L)..(2 * Real.log 2), + momentWeight L (s - Real.log 2) * ((Real.exp (-(r * s)) : ℝ) : ℂ) = + ((Real.exp (-(r * Real.log 2)) : ℝ) : ℂ) * ∫ s in (-Real.log L)..(Real.log 2), + momentWeight L s * ((Real.exp (-(r * s)) : ℝ) : ℂ) := by + have h := intervalIntegral.integral_comp_sub_right (fun s => momentWeight L s * + ((Real.exp (-(r * (s + Real.log 2))) : ℝ) : ℂ)) (Real.log 2) (a := -Real.log L) + (b := 2 * Real.log 2) + simp only [sub_add_cancel] at h + rw [h, ← intervalIntegral_eq_of_support_subset (hsupp _) + (Ioc_subset_Ioc (by linarith) (by linarith)), ← intervalIntegral.integral_const_mul] + refine intervalIntegral.integral_congr fun s _ => ?_ + rw [show -(r * (s + Real.log 2)) = -(r * Real.log 2) + -(r * s) by ring, Real.exp_add] + push_cast + ring + have h2 : ∫ s in (-Real.log L)..(2 * Real.log 2), + momentWeight L s * ((Real.exp (-(r * s)) : ℝ) : ℂ) = ∫ s in (-Real.log L)..(Real.log 2), + momentWeight L s * ((Real.exp (-(r * s)) : ℝ) : ℂ) := + (intervalIntegral_eq_of_support_subset (hsupp _) (Ioc_subset_Ioc le_rfl (by linarith))).symm + have hsplit : ∫ s in (-Real.log L)..(2 * Real.log 2), + kernelWeight L s * ((Real.exp (-(r * s)) : ℝ) : ℂ) = + (∫ s in (-Real.log L)..(2 * Real.log 2), + momentWeight L (s - Real.log 2) * ((Real.exp (-(r * s)) : ℝ) : ℂ)) - + ∫ s in (-Real.log L)..(2 * Real.log 2), + momentWeight L s * ((Real.exp (-(r * s)) : ℝ) : ℂ) := by + have hc1 : Continuous fun s => + momentWeight L (s - Real.log 2) * ((Real.exp (-(r * s)) : ℝ) : ℂ) := + (hc.comp (continuous_id.sub continuous_const)).mul hE + have hc2 : Continuous fun s => momentWeight L s * ((Real.exp (-(r * s)) : ℝ) : ℂ) := hc.mul hE + rw [← intervalIntegral.integral_sub (hc1.intervalIntegrable _ _) (hc2.intervalIntegrable _ _)] + exact intervalIntegral.integral_congr fun s _ => by simp only [kernelWeight]; ring + rw [hsplit, h1, h2, integral_momentWeight_mul_exp] + rcases Nat.eq_zero_or_pos r with rfl | hr1 + · simp + · rw [sum_jacksonCoeff_mul_pow hr1 hr] + simp + +/-! ### The higher divergence kernels of a bump -/ + +namespace LocalMeansBump + +variable (b : LocalMeansBump V) + +/-- The **higher divergence kernels** of a bump `b` for the word `i` of length `m` and the order +`L`: the higher divergence kernels (`Rd.higherDivSchwartz`) of `b` with the kernel weight +`u(s - log 2) - u(s)` on `[-log L, 2 log 2]`. The local means kernels of order `L` of the smoothed +bump are sums of their derivatives of order `m ≤ L` +(`Rd.LocalMeansBump.kernel_succ_eq_sum_higherKernel`). -/ +noncomputable def higherKernel (L m : ℕ) (i : Fin m → Fin (finrank ℝ V)) : 𝓢(V, ℂ) := + higherDivSchwartz (neg_log_le_two_mul_log_two L) (contDiff_kernelWeight L) b.contDiff b.eq_zero i + +/-- The values of the higher divergence kernels of a bump. -/ +theorem higherKernel_apply (L m : ℕ) (i : Fin m → Fin (finrank ℝ V)) (x : V) : + b.higherKernel L m i x = + higherDivKernel (-Real.log L) (2 * Real.log 2) (kernelWeight L) b.toFun i x := + rfl + +/-- **The local means kernels of the smoothed bump at dyadic scales as derivatives of order `m`**: +for `m ≤ L`, +`k_{j+1} = 2^{-jm} ∑_i ∂_{e_{i_0}} ⋯ ∂_{e_{i_{m-1}}} (K_i)_{2^j}` with the higher divergence kernels +`K_i` (`Rd.LocalMeansBump.kernel_succ_dilationSmoothed`, +`Rd.weightedDilation_eq_sum_iteratedLineDeriv` with the moments +`Rd.integral_kernelWeight_mul_exp`, and the chain rule for dilations +`Rd.iteratedLineDerivOp_schwartzDilate`). -/ +theorem kernel_succ_eq_sum_higherKernel {L m : ℕ} (hmL : m ≤ L) (j : ℕ) (y : V) : + b.dilationSmoothed.kernel L (j + 1) y = ((2 : ℂ) ^ (j * m))⁻¹ * + ∑ i, (∂^{fun l => gridBasis V (i l)} + (schwartzDilate (2 ^ j) (by positivity) (b.higherKernel L m i)) : 𝓢(V, ℂ)) y := by + rw [b.kernel_succ_dilationSmoothed, dilate, + weightedDilation_eq_sum_iteratedLineDeriv (neg_log_le_two_mul_log_two L) + (contDiff_kernelWeight L) b.contDiff b.eq_zero (m := m) + (fun r hr => integral_kernelWeight_mul_exp (by omega))] + simp_rw [iteratedLineDerivOp_schwartzDilate, smul_apply, coe_schwartzDilate, smul_eq_mul] + rw [Finset.mul_sum, Finset.mul_sum] + refine Finset.sum_congr rfl fun i _ => ?_ + simp only [dilate] + have h2 : ((2 : ℂ) ^ (j * m)) ≠ 0 := pow_ne_zero _ two_ne_zero + rw [pow_mul] + push_cast + field_simp + rfl + +/-- **The higher divergence kernels have mean zero** for `m < L` +(`Rd.integral_higherDivKernel_eq_zero`, `Rd.integral_kernelWeight_mul_exp`). -/ +theorem integral_higherKernel {L m : ℕ} (hmL : m < L) (i : Fin m → Fin (finrank ℝ V)) : + ∫ x, b.higherKernel L m i x = 0 := + integral_higherDivKernel_eq_zero (neg_log_le_two_mul_log_two L) + (contDiff_kernelWeight L).continuous b.contDiff.continuous b.eq_zero + (fun r hr => integral_kernelWeight_mul_exp (by omega)) i + +/-- **The higher divergence kernels form Calderón–Zygmund families**: for `m < L`, the dilates +`(K_i)_{2^j}` have the Fourier overlap `Rd.meanZeroOverlap (K_i)` and the Hörmander constant +`4 H_{K_i}` (`Rd.isCZFamily_dilate_of_integral_eq_zero`). -/ +theorem isCZFamily_higherKernel {L m : ℕ} (hmL : m < L) (i : Fin m → Fin (finrank ℝ V)) : + IsCZFamily (fun j => dilate (2 ^ j) (b.higherKernel L m i : V → ℂ)) + (meanZeroOverlap (b.higherKernel L m i)) + (4 * familyHormanderConst V fun k l => SchwartzMap.seminorm ℝ k l (b.higherKernel L m i)) := + isCZFamily_dilate_of_integral_eq_zero _ (b.integral_higherKernel hmL i) + +/-- The higher divergence kernels of a bump of radius `R` vanish outside the ball of radius +`L R` for `L ≥ 1` (`Rd.weightedDilation_eq_zero_of_lt` with `R e^{log L} = L R`). -/ +theorem higherKernel_eq_zero_of_lt {L m : ℕ} (hL : 1 ≤ L) (i : Fin m → Fin (finrank ℝ V)) + {y : V} (hy : L * b.radius < ‖y‖) : b.higherKernel L m i y = 0 := + weightedDilation_eq_zero_of_lt (neg_log_le_two_mul_log_two L) _ + (mul_eq_zero_of_lt_norm b.eq_zero _) + (by rwa [neg_neg, Real.exp_log (by exact_mod_cast hL), mul_comm]) + +/-- The higher divergence kernels of a bump have compact support +(`Rd.hasCompactSupport_weightedDilation`). -/ +theorem hasCompactSupport_higherKernel (L m : ℕ) (i : Fin m → Fin (finrank ℝ V)) : + HasCompactSupport (b.higherKernel L m i : V → ℂ) := + hasCompactSupport_weightedDilation (neg_log_le_two_mul_log_two L) _ + (mul_eq_zero_of_lt_norm b.eq_zero _) + +/-- The higher divergence kernels of a bump of radius `R` and their dilates `(K_i)_{2^j}` are +supported in the closed ball of radius `L R`, for `L ≥ 1`. -/ +theorem tsupport_dilate_higherKernel_subset_closedBall {L m : ℕ} (hL : 1 ≤ L) + (i : Fin m → Fin (finrank ℝ V)) (j : ℕ) : + tsupport (dilate (2 ^ j) (b.higherKernel L m i : V → ℂ)) ⊆ closedBall 0 (L * b.radius) := by + refine tsupport_dilate_two_pow_subset isClosed_closedBall (fun y hy => ?_) + (fun c hc y hy => ?_) j + · rw [mem_closedBall, dist_zero_right] + exact not_lt.1 fun h => hy (b.higherKernel_eq_zero_of_lt hL i h) + · rw [mem_closedBall, dist_zero_right, norm_smul, Real.norm_of_nonneg (zero_le_one.trans hc)] + at hy + rw [mem_closedBall, dist_zero_right] + nlinarith [norm_nonneg y] + +end LocalMeansBump + +namespace LipschitzGraph + +variable (Ω : LipschitzGraph V) + +/-- **The higher divergence kernels of a cone-supported bump lie in the reflected closed cone**: +for a bump of radius `R` supported in `-K` and `L ≥ 1`, every dilate `(K_i)_{2^j}` of its higher +divergence kernels is supported in `{y : -y ∈ K̄, ‖y‖ ≤ L R}` +(`Rd.LipschitzGraph.coneSupported_higherDivKernel`). -/ +theorem tsupport_dilate_higherKernel_subset {b : LocalMeansBump V} (hb : Ω.ConeSupported b.toFun) + {L m : ℕ} (hL : 1 ≤ L) (i : Fin m → Fin (finrank ℝ V)) (j : ℕ) : + tsupport (dilate (2 ^ j) (b.higherKernel L m i : V → ℂ)) ⊆ + {y | -y ∈ Ω.closedCone} ∩ closedBall 0 (L * b.radius) := by + refine subset_inter (tsupport_dilate_two_pow_subset + (Ω.isClosed_closedCone.preimage continuous_neg) (fun y hy => ?_) (fun c hc y hy => ?_) j) + (b.tsupport_dilate_higherKernel_subset_closedBall hL i j) + · exact Ω.cone_subset_closedCone (Ω.coneSupported_higherDivKernel hb _ _ _ i y hy) + · have h := Ω.smul_mem_closedCone (inv_nonneg.2 (zero_le_one.trans hc)) hy + rwa [smul_neg, inv_smul_smul₀ (zero_lt_one.trans_le hc).ne'] at h + +end LipschitzGraph + +end Rd diff --git a/LeanPool/FunctionSpaces/Domains/Extension/HigherSobolevExtension.lean b/LeanPool/FunctionSpaces/Domains/Extension/HigherSobolevExtension.lean new file mode 100644 index 0000000000..74e6630a65 --- /dev/null +++ b/LeanPool/FunctionSpaces/Domains/Extension/HigherSobolevExtension.lean @@ -0,0 +1,670 @@ +/- +Copyright (c) 2026 Mario Ullrich. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Mario Ullrich +-/ +module + +public import LeanPool.FunctionSpaces.Domains.Extension.SobolevExtension +public import LeanPool.FunctionSpaces.Domains.Extension.HigherDivergenceKernels +public import LeanPool.FunctionSpaces.Rd.Sobolev.WeakDerivativeLeibniz + +/- +Modified for Lean Pool: module names and imports adapted. +-/ + +/-! +# The extension theorem for Sobolev spaces of higher order + +Let `Ω` be a bounded Lipschitz domain in a finite-dimensional real inner product space `V` of +dimension `n`, `1 < p < ∞` and `m ∈ ℕ`. Every `f ∈ W^m_p(Ω)` agrees on `Ω` with some +`F ∈ W^m_p(V)` (`Rd.BoundedLipschitzDomain.memWeakSobolev_iff_exists_memSobolev_order`), for +`n ≥ 1` with `‖F‖_{W^m_p(V)} ≤ C ‖f‖_{W^m_p(Ω)}` +(`Rd.BoundedLipschitzDomain.exists_extendsSobolevOrder`). A word `w : Fin k → Fin n` stands for +the derivative `∂^{e_w} = ∂_{e_{w_0}} ⋯ ∂_{e_{w_{k-1}}}` along the orthonormal basis +`e_i = Rd.gridBasis V i`, and `‖f‖_{W^m_p(O)} = ∑_{k ≤ m} ∑_w ‖∂^{e_w} f‖_{L_p(O)}`. + +* **Local means by the derivatives of order `m`**: for the smoothed bump `b'` of a bump `b` and + `m ≤ L`, the local means kernels of order `L` are `k_{j+1} = 2^{-jm} ∑_i ∂^{e_i} (K_i)_{2^j}` + with the higher divergence kernels `K_i` of `b`, so + `(k_{j+1} ⋆ 1_T f)(x) = 2^{-jm} ∑_i ((K_i)_{2^j} ⋆ 1_T ∂^{e_i} f)(x)` + (`Rd.LocalMeansBump.conv_kernel_succ_eq_sum_higherKernel`, by the general identity for kernels + that are sums of derivatives, `Rd.conv_indicator_eq_mul_sum_of_eq_sum_iteratedLineDerivOp`). + For `m < L` the strong type of the Calderón–Zygmund families `((K_i)_{2^j})_j` bounds the + local means quasi-norm of Triebel–Lizorkin type with smoothness `m` on a set by + `‖f‖_{L_p(T)} + ∑_i ‖∂^{e_i} f‖_{L_p(T)}` + (`Rd.LocalMeansBump.tlLocalNormOn_le_higherPatchConst`). +* **One patch** (`Rd.LocalMeansBump.extendsSobolevOrder`): for `m ≥ 1` the local extension of + order `L = m + 1` lies in `F^m_{p,2}(V) = W^m_p(V)` and agrees with `f` on the patch; + `Rd.ExtendsSobolevOrder p m O U C` says that such extensions from `U` exist with the constant + `C`. +* **Pasting** (`Rd.extendsSobolevOrder_of_cover`): a smooth resolution of unity pastes the local + extensions in `W^m_p(V)`, by the Leibniz rule + (`Rd.exists_hasWeakLineDeriv_mul_of_tsupport_subset`). +* **Bounded Lipschitz domains**: the boundary patches extend by the local extension of the smoothed + cone bump (`Rd.BoundedLipschitzDomain.exists_extendsSobolevOrder_boundary`), the inner patch by a + cutoff (`Rd.BoundedLipschitzDomain.exists_extendsSobolevOrder_interior`, for every `1 ≤ p ≤ ∞`), + and `W^0_p = L_p` by zero (`Rd.extendsSobolevOrder_zero`). +-/ + +@[expose] public section + +open MeasureTheory Filter Topology Module Metric TopologicalSpace +open scoped ENNReal SchwartzMap LineDeriv + +open ENNReal (lqNorm dyadicWeight) + +namespace Rd + +variable {V : Type*} [NormedAddCommGroup V] [InnerProductSpace ℝ V] [FiniteDimensional ℝ V] + [MeasurableSpace V] [BorelSpace V] + +/-! ### Local means by the derivatives of order `m` -/ + +namespace LocalMeansBump + +variable (b : LocalMeansBump V) {p : ℝ≥0∞} [Fact (1 ≤ p)] + +/-- **Local means of order `L` by the derivatives of order `m ≤ L`, at one point**: let +`g_i = ∂^{e_i} f` weakly on an open set `T` for every word `i` of length `m`, `f ∈ L_p(T)`, and let +`x - y ∈ T` for every `y` in the support of every `(K_i)_{2^j}`, with the higher divergence kernels +`K_i` of `b`. Then the local means kernels of the smoothed bump satisfy +`(k_{j+1} ⋆ 1_T f)(x) = 2^{-jm} ∑_i ((K_i)_{2^j} ⋆ 1_T g_i)(x)` +(`Rd.LocalMeansBump.kernel_succ_eq_sum_higherKernel`; each derivative moves to `f` by +`Rd.conv_indicator_eq_mul_sum_of_eq_sum_iteratedLineDerivOp`). -/ +theorem conv_kernel_succ_eq_sum_higherKernel {L m : ℕ} (hmL : m ≤ L) {T : Opens V} + {f : V → ℂ} {g : (Fin m → Fin (finrank ℝ V)) → V → ℂ} (hf : MemLp f p (volume.restrict T)) + (hfg : ∀ i, HasWeakLineDeriv T (fun l => gridBasis V (i l)) f (g i)) (j : ℕ) {x : V} + (hx : ∀ i, ∀ y ∈ tsupport (dilate (2 ^ j) (b.higherKernel L m i : V → ℂ)), x - y ∈ T) : + conv (b.dilationSmoothed.kernel L (j + 1)) ((T : Set V).indicator f) volume x = + ((2 : ℂ) ^ (j * m))⁻¹ * ∑ i, conv (dilate (2 ^ j) (b.higherKernel L m i : V → ℂ)) + ((T : Set V).indicator (g i)) volume x := + conv_indicator_eq_mul_sum_of_eq_sum_iteratedLineDerivOp hf hfg + (b.hasCompactSupport_higherKernel L m) (by positivity) (b.kernel_succ_eq_sum_higherKernel hmL j) + hx + +/-- **One local mean by the derivatives of order `m`**: under the hypotheses of +`Rd.LocalMeansBump.conv_kernel_succ_eq_sum_higherKernel`, +`2^{(j+1)m} |(k_{j+1} ⋆ 1_T f)(x)| ≤ 2^m ∑_i |((K_i)_{2^j} ⋆ 1_T g_i)(x)|`. -/ +theorem dyadicWeight_mul_enorm_conv_kernel_succ_le {L m : ℕ} (hmL : m ≤ L) {T : Opens V} + {f : V → ℂ} {g : (Fin m → Fin (finrank ℝ V)) → V → ℂ} (hf : MemLp f p (volume.restrict T)) + (hfg : ∀ i, HasWeakLineDeriv T (fun l => gridBasis V (i l)) f (g i)) (j : ℕ) {x : V} + (hx : ∀ i, ∀ y ∈ tsupport (dilate (2 ^ j) (b.higherKernel L m i : V → ℂ)), x - y ∈ T) : + dyadicWeight (m : ℝ) (j + 1) * + ‖conv (b.dilationSmoothed.kernel L (j + 1)) ((T : Set V).indicator f) volume x‖ₑ ≤ + 2 ^ m * ∑ i, ‖conv (dilate (2 ^ j) (b.higherKernel L m i : V → ℂ)) + ((T : Set V).indicator (g i)) volume x‖ₑ := by + have hw : dyadicWeight (m : ℝ) (j + 1) * ‖((2 : ℂ) ^ (j * m))⁻¹‖ₑ = 2 ^ m := by + have h2 : ‖(2 : ℂ)‖ₑ = 2 := by + rw [← ofReal_norm, Complex.norm_two, ENNReal.ofReal_ofNat] + rw [ENNReal.dyadicWeight_natCast, eNorm_inv (pow_ne_zero _ two_ne_zero), eNorm_pow, h2, + add_mul, one_mul, pow_add, mul_comm, ← mul_assoc, ENNReal.inv_mul_cancel + (pow_ne_zero _ two_ne_zero) (ENNReal.pow_ne_top ENNReal.ofNat_ne_top), one_mul] + rw [b.conv_kernel_succ_eq_sum_higherKernel hmL hf hfg j hx, eNorm_mul, ← mul_assoc, hw] + gcongr + exact eNorm_sum_le _ _ + +/-- **The local means of order `L` by the derivatives of order `m ≤ L`, pointwise**: let `m ≤ L`, +`f ∈ L_p(T)` on an open set `T` with weak derivatives `g_i = ∂^{e_i} f` on `T` for the words `i` +of length `m`, let `x - y ∈ T` for `x ∈ W`, every level `j` and every `y` in the support of +`(K_i)_{2^j}`, with the higher divergence kernels `K_i` of `b`, and let `F = 1_T f` in `L_p`. +Then almost everywhere, for the smoothed bump, +`‖(2^{jm} |1_W (k_j ⋆ F)(x)|)_j‖_{ℓ_2} ≤ |1_W (k_0 ⋆ F)(x)| + +2^m ∑_i ‖(((K_i)_{2^j} ⋆ 1_T g_i)(x))_j‖_{ℓ_2}` +(`Rd.LocalMeansBump.ae_lqNorm_le_of_pointwise`). -/ +theorem ae_lqNorm_le_of_hasWeakLineDeriv_words (hp : p ≠ ∞) {L m : ℕ} (hmL : m ≤ L) {W : Set V} + (hW : MeasurableSet W) {T : Opens V} {f : V → ℂ} {g : (Fin m → Fin (finrank ℝ V)) → V → ℂ} + (hf : MemLp f p (volume.restrict T)) + (hfg : ∀ i, HasWeakLineDeriv T (fun l => gridBasis V (i l)) f (g i)) + (hsupp : ∀ x ∈ W, ∀ j i, ∀ y ∈ tsupport (dilate (2 ^ j) (b.higherKernel L m i : V → ℂ)), + x - y ∈ T) + {F : Lp ℂ p (volume : Measure V)} (hF : (F : V → ℂ) =ᵐ[volume] (T : Set V).indicator f) : + ∀ᵐ x ∂volume, lqNorm 2 (fun j => dyadicWeight (m : ℝ) j * + ‖(indicatorLp hW (b.dilationSmoothed.localMean hp L j F) : V → ℂ) x‖ₑ) ≤ + ‖(indicatorLp hW (b.dilationSmoothed.localMean hp L 0 F) : V → ℂ) x‖ₑ + + 2 ^ m * ∑ i, lqNorm 2 (fun j => ‖conv (dilate (2 ^ j) (b.higherKernel L m i : V → ℂ)) + ((T : Set V).indicator (g i)) volume x‖ₑ) := + b.dilationSmoothed.ae_lqNorm_le_of_pointwise hp L m hW (b.higherKernel L m) + (fun i => (T : Set V).indicator (g i)) (2 ^ m) + (fun x hx j => b.dyadicWeight_mul_enorm_conv_kernel_succ_le hmL hf hfg j (hsupp x hx j)) hF + +omit [Fact (1 ≤ p)] in +/-- The square functions of the higher divergence kernels: for `m < L` and `1 < p < ∞`, +`‖ x ↦ ‖(((K_i)_{2^j} ⋆ 1_T g)(x))_j‖_{ℓ_2} ‖_p ≤ C_p(K_i) ‖g‖_{L_p(T)}` +(`Rd.LocalMeansBump.isCZFamily_higherKernel`, `Rd.IsCZFamily.eLpNorm_lqNorm_conv_le`). -/ +theorem eLpNorm_lqNorm_conv_higherKernel_le [Nontrivial V] (hp1 : 1 < p) (hp : p ≠ ∞) {L m : ℕ} + (hmL : m < L) {T : Opens V} {g : V → ℂ} (hg : MemLp g p (volume.restrict T)) + (i : Fin m → Fin (finrank ℝ V)) : + eLpNorm (fun x => lqNorm 2 (fun j => ‖conv (dilate (2 ^ j) (b.higherKernel L m i : V → ℂ)) + ((T : Set V).indicator g) volume x‖ₑ)) p volume ≤ + czConst V p (meanZeroOverlap (b.higherKernel L m i)) + (4 * familyHormanderConst V fun k l => SchwartzMap.seminorm ℝ k l (b.higherKernel L m i)) * + eLpNorm g p (volume.restrict T) := by + rw [← eLpNorm_indicator_eq_eLpNorm_restrict T.isOpen.measurableSet.nullMeasurableSet] + exact (b.isCZFamily_higherKernel hmL i).eLpNorm_lqNorm_conv_le hp1 hp + ((memLp_indicator_iff_restrict T.isOpen.measurableSet.nullMeasurableSet).2 hg) + +/-- The constant `∑_i C_p(K_i)` of the bound of the local means by the derivatives of order `m`, +with the constants `C_p(K_i) = Rd.czConst V p B_i H_i` of the Calderón–Zygmund families of the +higher divergence kernels (`Rd.LocalMeansBump.isCZFamily_higherKernel`). -/ +noncomputable def higherGradientConst (L m : ℕ) (p : ℝ≥0∞) : ℝ≥0∞ := + ∑ i : Fin m → Fin (finrank ℝ V), czConst V p (meanZeroOverlap (b.higherKernel L m i)) + (4 * familyHormanderConst V fun k l => SchwartzMap.seminorm ℝ k l (b.higherKernel L m i)) + +omit [Fact (1 ≤ p)] in +/-- The constant of the bound by the derivatives of order `m` is finite for `1 < p < ∞`. -/ +theorem higherGradientConst_ne_top (L m : ℕ) (hp1 : 1 < p) (hp : p ≠ ∞) : + b.higherGradientConst L m p ≠ ∞ := + ENNReal.sum_ne_top.2 fun _ _ => czConst_ne_top hp1 hp (meanZeroOverlap_ne_top _) + (ENNReal.mul_ne_top ENNReal.ofNat_ne_top (familyHormanderConst_ne_top _)) + +/-- **The local means of Triebel–Lizorkin type by the derivatives of order `m`**: let +`g_i = ∂^{e_i} f` weakly on an open set `T` for the words `i` of length `m < L`, with +`f, g_i ∈ L_p(T)` and `1 < p < ∞`, let `x - y ∈ T` for every `x ∈ W`, every level `j` and every `y` +in the support of `(K_i)_{2^j}`, and let `F = 1_T f` in `L_p`. Then, for the smoothed bump `b'`, +`‖ x ↦ ‖(2^{jm} |1_W (k_j ⋆ F)(x)|)_j‖_{ℓ_2} ‖_p ≤ ‖m_L‖_1 ‖f‖_{L_p(T)} + +2^m ∑_i C_p(K_i) ‖g_i‖_{L_p(T)}`, with the moment kernel `m_L` of `b'` +(`Rd.LocalMeansBump.tlLocalNormOn_le_of_pointwise`). -/ +theorem tlLocalNormOn_le_of_hasWeakLineDeriv_words [Nontrivial V] (hp1 : 1 < p) (hp : p ≠ ∞) + {L m : ℕ} (hmL : m < L) {W : Set V} (hW : MeasurableSet W) {T : Opens V} {f : V → ℂ} + {g : (Fin m → Fin (finrank ℝ V)) → V → ℂ} (hf : MemLp f p (volume.restrict T)) + (hg : ∀ i, MemLp (g i) p (volume.restrict T)) + (hfg : ∀ i, HasWeakLineDeriv T (fun l => gridBasis V (i l)) f (g i)) + (hsupp : ∀ x ∈ W, ∀ j i, ∀ y ∈ tsupport (dilate (2 ^ j) (b.higherKernel L m i : V → ℂ)), + x - y ∈ T) + {F : Lp ℂ p (volume : Measure V)} (hF : (F : V → ℂ) =ᵐ[volume] (T : Set V).indicator f) : + b.dilationSmoothed.tlLocalNormOn hp hW L m 2 F ≤ + eLpNorm (momentKernel b.dilationSmoothed.toFun L) 1 volume * + eLpNorm f p (volume.restrict T) + + 2 ^ m * ∑ i, czConst V p (meanZeroOverlap (b.higherKernel L m i)) + (4 * familyHormanderConst V fun k l => + SchwartzMap.seminorm ℝ k l (b.higherKernel L m i)) * + eLpNorm (g i) p (volume.restrict T) := by + have hT := T.isOpen.measurableSet + have hFn : ‖F‖ₑ = eLpNorm f p (volume.restrict T) := by + rw [Lp.eNorm_def, eLpNorm_congr_ae hF, + eLpNorm_indicator_eq_eLpNorm_restrict hT.nullMeasurableSet] + refine (b.dilationSmoothed.tlLocalNormOn_le_of_pointwise hp L m hW (b.higherKernel L m) + (fun i => (T : Set V).indicator (g i)) + (fun i => ((memLp_indicator_iff_restrict hT.nullMeasurableSet).2 (hg i)).aestronglyMeasurable) + (2 ^ m) + (fun x hx j => b.dyadicWeight_mul_enorm_conv_kernel_succ_le hmL.le hf hfg j (hsupp x hx j)) + hF).trans ?_ + rw [hFn] + gcongr with i + exact b.eLpNorm_lqNorm_conv_higherKernel_le hp1 hp hmL (hg i) i + +/-- The constant `‖m_L‖_1 + 2^m ∑_i C_p(K_i)` of the local means of the smoothed bump by the +derivatives of order `m`, with the moment kernel `m_L` of order `L` of the smoothed bump and +`∑_i C_p(K_i) = Rd.LocalMeansBump.higherGradientConst b L m p`. -/ +noncomputable def higherPatchConst (L m : ℕ) (p : ℝ≥0∞) : ℝ≥0∞ := + eLpNorm (momentKernel b.dilationSmoothed.toFun L) 1 volume + 2 ^ m * b.higherGradientConst L m p + +omit [Fact (1 ≤ p)] in +/-- The constant of the local means by the derivatives of order `m` is finite for `1 < p < ∞`. -/ +theorem higherPatchConst_ne_top (L m : ℕ) (hp1 : 1 < p) (hp : p ≠ ∞) : + b.higherPatchConst L m p ≠ ∞ := + ENNReal.add_ne_top.2 ⟨eLpNorm_momentKernel_ne_top b.dilationSmoothed.integrable L, + ENNReal.mul_ne_top (ENNReal.pow_ne_top ENNReal.ofNat_ne_top) + (b.higherGradientConst_ne_top L m hp1 hp)⟩ + +/-- **The local means of Triebel–Lizorkin type by the derivatives of order `m`, with one +constant**: under the hypotheses of `Rd.LocalMeansBump.tlLocalNormOn_le_of_hasWeakLineDeriv_words`, +`‖ x ↦ ‖(2^{jm} |1_W (k_j ⋆ F)(x)|)_j‖_{ℓ_2} ‖_p ≤ C (‖f‖_{L_p(T)} + ∑_i ‖g_i‖_{L_p(T)})` with +`C = Rd.LocalMeansBump.higherPatchConst b L m p`. -/ +theorem tlLocalNormOn_le_higherPatchConst [Nontrivial V] (hp1 : 1 < p) (hp : p ≠ ∞) {L m : ℕ} + (hmL : m < L) {W : Set V} (hW : MeasurableSet W) {T : Opens V} {f : V → ℂ} + {g : (Fin m → Fin (finrank ℝ V)) → V → ℂ} (hf : MemLp f p (volume.restrict T)) + (hg : ∀ i, MemLp (g i) p (volume.restrict T)) + (hfg : ∀ i, HasWeakLineDeriv T (fun l => gridBasis V (i l)) f (g i)) + (hsupp : ∀ x ∈ W, ∀ j i, ∀ y ∈ tsupport (dilate (2 ^ j) (b.higherKernel L m i : V → ℂ)), + x - y ∈ T) + {F : Lp ℂ p (volume : Measure V)} (hF : (F : V → ℂ) =ᵐ[volume] (T : Set V).indicator f) : + b.dilationSmoothed.tlLocalNormOn hp hW L m 2 F ≤ b.higherPatchConst L m p * + (eLpNorm f p (volume.restrict T) + ∑ i, eLpNorm (g i) p (volume.restrict T)) := by + refine (b.tlLocalNormOn_le_of_hasWeakLineDeriv_words hp1 hp hmL hW hf hg hfg hsupp hF).trans ?_ + rw [higherPatchConst, add_mul, mul_assoc (2 ^ m), higherGradientConst] + refine add_le_add (mul_le_mul_right le_self_add _) (mul_le_mul_right ?_ _) + exact (ENNReal.sum_mul_le_sum_mul_sum _ _ _).trans (mul_le_mul_right le_add_self _) + +end LocalMeansBump + +/-! ### Bounded extensions of order `m` from a set -/ + +variable {p : ℝ≥0∞} + +variable (p) in +/-- **Sobolev functions of order `m` on `O` extend from `U` with constant `C`**: for every `f` with +weak derivatives `g_{k,w} = ∂^{e_w} f ∈ L_p(O)` on `O` along all words `w` of length `k ≤ m` there +are `F ∈ W^m_p(V)` with `F = f` almost everywhere on `U` and weak derivatives +`G_{k,w} = ∂^{e_w} F ∈ L_p(V)` on `V` with +`∑_{k ≤ m} ∑_w ‖G_{k,w}‖_p ≤ C ∑_{k ≤ m} ∑_w ‖g_{k,w}‖_{L_p(O)}`. The words of length `0` give +`g_{0,∅} = f` on `O` and `G_{0,∅} = F`, so both sides are the norms of `W^m_p`. For `m = 1` this is +the content of `Rd.ExtendsSobolev`. -/ +def ExtendsSobolevOrder (m : ℕ) (O : Opens V) (U : Set V) (C : ℝ≥0∞) : Prop := + ∀ (f : V → ℂ) (g : (k : ℕ) → (Fin k → Fin (finrank ℝ V)) → V → ℂ), + (∀ k ≤ m, ∀ w, MemLp (g k w) p (volume.restrict O)) → + (∀ k ≤ m, ∀ w, HasWeakLineDeriv O (fun l => gridBasis V (w l)) f (g k w)) → + ∃ F : Lp ℂ p (volume : Measure V), MemSobolev m F ∧ (∀ᵐ x ∂volume, x ∈ U → F x = f x) ∧ + ∃ G : (k : ℕ) → (Fin k → Fin (finrank ℝ V)) → Lp ℂ p (volume : Measure V), + (∀ k ≤ m, ∀ w, HasWeakLineDeriv ⊤ (fun l => gridBasis V (w l)) F (G k w)) ∧ + ∑ k ∈ Finset.range (m + 1), ∑ w : Fin k → Fin (finrank ℝ V), ‖G k w‖ₑ ≤ + C * ∑ k ∈ Finset.range (m + 1), ∑ w : Fin k → Fin (finrank ℝ V), + eLpNorm (g k w) p (volume.restrict O) + +/-- **Larger domains**: an extension of order `m` from `U` for Sobolev functions on `T` serves for +Sobolev functions on every open `O ⊇ T`, with the same constant, since +`‖h‖_{L_p(T)} ≤ ‖h‖_{L_p(O)}` and weak derivatives restrict to `T` (`Rd.HasWeakLineDeriv.mono`). -/ +theorem ExtendsSobolevOrder.of_le {m : ℕ} {T O : Opens V} {U : Set V} {C : ℝ≥0∞} + (h : ExtendsSobolevOrder p m T U C) (hTO : T ≤ O) : ExtendsSobolevOrder p m O U C := by + intro f g hg hfg + have hμ : volume.restrict (T : Set V) ≤ volume.restrict O := + Measure.restrict_mono (show (T : Set V) ⊆ O from hTO) le_rfl + obtain ⟨F, hF, hFf, G, hG, hb⟩ := h f g (fun k hk w => (hg k hk w).mono_measure hμ) + fun k hk w => (hfg k hk w).mono hTO + refine ⟨F, hF, hFf, G, hG, hb.trans ?_⟩ + gcongr + +/-- **Extensions of order `m` from `L_p` bounds**: Sobolev functions of order `m` on `O` extend from +`U` with constant `C` (`Rd.ExtendsSobolevOrder`) as soon as every such `f` agrees almost everywhere +on `U` with a function `F` on `V` with weak derivatives `G_{k,w} = ∂^{e_w} F` on `V`, `k ≤ m`, and +`∑_{k ≤ m} ∑_w ‖G_{k,w}‖_p ≤ C ∑_{k ≤ m} ∑_w ‖g_{k,w}‖_{L_p(O)}`. The bound puts the `G_{k,w}` +into `L_p(V)`, and `F = G_{0,∅}`; then `F ∈ W^m_p(V)` by +`Rd.memSobolev_of_forall_gridBasis_words`. -/ +theorem extendsSobolevOrder_of_eLpNorm_le [Fact (1 ≤ p)] {m : ℕ} {O : Opens V} {U : Set V} + {C : ℝ≥0∞} (hC : C ≠ ∞) + (h : ∀ (f : V → ℂ) (g : (k : ℕ) → (Fin k → Fin (finrank ℝ V)) → V → ℂ), + (∀ k ≤ m, ∀ w, MemLp (g k w) p (volume.restrict O)) → + (∀ k ≤ m, ∀ w, HasWeakLineDeriv O (fun l => gridBasis V (w l)) f (g k w)) → + ∃ (F : V → ℂ) (G : (k : ℕ) → (Fin k → Fin (finrank ℝ V)) → V → ℂ), + (∀ k ≤ m, ∀ w, HasWeakLineDeriv ⊤ (fun l => gridBasis V (w l)) F (G k w)) ∧ + (∀ᵐ x ∂volume, x ∈ U → F x = f x) ∧ + ∑ k ∈ Finset.range (m + 1), ∑ w : Fin k → Fin (finrank ℝ V), eLpNorm (G k w) p volume ≤ + C * ∑ k ∈ Finset.range (m + 1), ∑ w : Fin k → Fin (finrank ℝ V), + eLpNorm (g k w) p (volume.restrict O)) : + ExtendsSobolevOrder p m O U C := by + intro f g hg hfg + obtain ⟨F, G, hG, hFf, hb⟩ := h f g hg hfg + have hfin : C * ∑ k ∈ Finset.range (m + 1), ∑ w : Fin k → Fin (finrank ℝ V), + eLpNorm (g k w) p (volume.restrict O) < ∞ := + ENNReal.mul_lt_top hC.lt_top (ENNReal.sum_lt_top.2 fun k hk => ENNReal.sum_lt_top.2 fun w _ => + (hg k (Nat.lt_succ_iff.1 (Finset.mem_range.1 hk)) w).eLpNorm_lt_top) + have hGm : ∀ k ≤ m, ∀ w, MemLp (G k w) p volume := fun k hk w => memLp_iff.2 + (((le_sum_range_sum_words (fun k w => eLpNorm (G k w) p volume) hk w).trans hb).trans_lt hfin) + have hG0 := hG 0 (Nat.zero_le m) Fin.elim0 + have hF0 : F =ᵐ[volume] G 0 Fin.elim0 := by + have h0 := (hasWeakLineDeriv_fin_zero _ hG0.1).unique hG0 + rwa [volume_restrict_top] at h0 + have hFm : MemLp F p volume := (hGm 0 (Nat.zero_le m) Fin.elim0).ae_eq hF0.symm + let GLp : (k : ℕ) → (Fin k → Fin (finrank ℝ V)) → Lp ℂ p (volume : Measure V) := fun k w => + if hk : k ≤ m then (hGm k hk w).toLp (G k w) else 0 + have hGL : ∀ k (hk : k ≤ m) w, GLp k w = (hGm k hk w).toLp (G k w) := fun k hk w => by + simp only [GLp, hk, ↓reduceDIte] + have hW : ∀ k ≤ m, ∀ w, HasWeakLineDeriv ⊤ (fun l => gridBasis V (w l)) (hFm.toLp F) + (GLp k w) := fun k hk w => by + rw [hGL k hk w] + exact (hG k hk w).congr_ae (by rw [volume_restrict_top]; exact hFm.coeFn_toLp.symm) + (by rw [volume_restrict_top]; exact (hGm k hk w).coeFn_toLp.symm) + refine ⟨hFm.toLp F, memSobolev_of_forall_gridBasis_words fun k hk w => + ⟨_, Lp.memLp (GLp k w), hW k hk w⟩, ?_, GLp, hW, ?_⟩ + · filter_upwards [hFm.coeFn_toLp, hFf] with x h1 h2 hx + rw [h1, h2 hx] + · refine le_trans (le_of_eq ?_) hb + refine Finset.sum_congr rfl fun k hk => Finset.sum_congr rfl fun w _ => ?_ + rw [hGL k (Nat.lt_succ_iff.1 (Finset.mem_range.1 hk)) w, Lp.eNorm_toLp] + +/-- **Order zero**: `W^0_p(O) = L_p(O)` extends from `O` by zero, with constant `1`: `F = 1_O f`, +and `‖F‖_p = ‖f‖_{L_p(O)} = ‖g_{0,∅}‖_{L_p(O)}`. -/ +theorem extendsSobolevOrder_zero [Fact (1 ≤ p)] (O : Opens V) : ExtendsSobolevOrder p 0 O O 1 := by + refine extendsSobolevOrder_of_eLpNorm_le ENNReal.one_ne_top fun f g hg hfg => ?_ + have hO := O.isOpen.measurableSet + have h0 := hfg 0 le_rfl Fin.elim0 + have hfg0 : f =ᵐ[volume.restrict O] g 0 Fin.elim0 := (hasWeakLineDeriv_fin_zero _ h0.1).unique h0 + have hf : MemLp ((O : Set V).indicator f) p volume := + (memLp_indicator_iff_restrict hO.nullMeasurableSet).2 ((hg 0 le_rfl Fin.elim0).ae_eq hfg0.symm) + refine ⟨(O : Set V).indicator f, fun _ _ => (O : Set V).indicator f, fun k hk w => ?_, + ae_of_all _ fun x hx => Set.indicator_of_mem hx f, ?_⟩ + · obtain rfl : k = 0 := Nat.le_zero.1 hk + exact hasWeakLineDeriv_fin_zero _ + (locallyIntegrableOn_of_memLp Fact.out (by rw [volume_restrict_top]; exact hf)) + · simp only [zero_add, Finset.range_one, Finset.sum_singleton, one_mul] + refine Finset.sum_le_sum fun w _ => ?_ + rw [eLpNorm_indicator_eq_eLpNorm_restrict hO.nullMeasurableSet, Subsingleton.elim w Fin.elim0, + eLpNorm_congr_ae hfg0] + +/-- **The value and the derivatives of top order by the norm of `W^m_p`**: for `m ≥ 1`, if +`g_{0,∅} = f` on `O` (the derivative along the empty word), then +`‖f‖_{L_p(O)} + ∑_i ‖g_{m,i}‖_{L_p(O)} ≤ ∑_{k ≤ m} ∑_w ‖g_{k,w}‖_{L_p(O)}`, since the words of +length `0` and those of length `m` are different summands on the right. -/ +theorem eLpNorm_add_sum_le_sum_words {O : Opens V} {m : ℕ} (hm : 0 < m) {f : V → ℂ} + {g : (k : ℕ) → (Fin k → Fin (finrank ℝ V)) → V → ℂ} + (h0 : HasWeakLineDeriv O (fun l => gridBasis V ((Fin.elim0 : Fin 0 → Fin (finrank ℝ V)) l)) f + (g 0 Fin.elim0)) : + eLpNorm f p (volume.restrict O) + ∑ i, eLpNorm (g m i) p (volume.restrict O) ≤ + ∑ k ∈ Finset.range (m + 1), ∑ w : Fin k → Fin (finrank ℝ V), + eLpNorm (g k w) p (volume.restrict O) := by + rw [eLpNorm_congr_ae ((hasWeakLineDeriv_fin_zero _ h0.1).unique h0)] + have hsub : ({0, m} : Finset ℕ) ⊆ Finset.range (m + 1) := by + intro k hk + rw [Finset.mem_insert, Finset.mem_singleton] at hk + rw [Finset.mem_range] + omega + refine le_trans ?_ (Finset.sum_le_sum_of_subset hsub) + rw [Finset.sum_pair hm.ne] + gcongr + exact Finset.single_le_sum (f := fun w => eLpNorm (g 0 w) p (volume.restrict O)) + (fun _ _ => zero_le) (Finset.mem_univ _) + +/-! ### One patch -/ + +namespace LocalMeansBump + +variable (b : LocalMeansBump V) + +/-- The constant `(∑_{k ≤ m} ∑_w C_w) A C_b` of the extension of order `m` from one patch, +with the constants `C_w = Rd.tlToSobolevConst p e_w` of the weak derivatives of `F^m_{p,2}` +functions, `A = Rd.LocalMeansBump.tlUpperConst b' (m + 1) p 2 m` of the smoothed bump `b'` and +`C_b = Rd.LocalMeansBump.higherPatchConst b (m + 1) m p`. -/ +noncomputable def higherExtensionConst (m : ℕ) (p : ℝ≥0∞) : ℝ≥0∞ := + (∑ k ∈ Finset.range (m + 1), ∑ w : Fin k → Fin (finrank ℝ V), + tlToSobolevConst p (fun l => gridBasis V (w l))) * + b.dilationSmoothed.tlUpperConst (m + 1) p 2 m * b.higherPatchConst (m + 1) m p + +/-- The constant of the extension of order `m ≥ 1` from one patch is finite for `1 < p < ∞`. -/ +theorem higherExtensionConst_ne_top {m : ℕ} (hm : 0 < m) (hp1 : 1 < p) (hp : p ≠ ∞) : + b.higherExtensionConst m p ≠ ∞ := + ENNReal.mul_ne_top (ENNReal.mul_ne_top + (ENNReal.sum_ne_top.2 fun _ _ => ENNReal.sum_ne_top.2 fun _ _ => + tlToSobolevConst_ne_top hp1 hp _) + (b.dilationSmoothed.tlUpperConst_ne_top _ hp1 hp ENNReal.one_lt_two (Nat.cast_pos.2 hm))) + (b.higherPatchConst_ne_top _ _ hp1 hp) + +/-- **The extension of order `m` from one patch** (Rychkov's local extension with the local means +of the derivatives of order `m`): let `m ≥ 1`, `U ⊆ T` with `T` open, let the dual kernels of +order `m + 1` of the smoothed bump `b'` at points of `U` only see `W`, and let `x - y ∈ T` for +every `x ∈ W`, every level `j` and every `y` in the support of the dilated higher divergence +kernels `(K_i)_{2^j}` of `b`. Then for `1 < p < ∞` the local extension +`F = ∑_j η_j ⋆ 1_W (k_j ⋆ 1_T f)` of order `m + 1` of `b'` lies in `F^m_{p,2}(V) = W^m_p(V)` and +agrees with `f` on `U`, with the constant `Rd.LocalMeansBump.higherExtensionConst b m p` +(`Rd.LocalMeansBump.tlLocalNormOn_le_higherPatchConst`, +`Rd.LocalMeansBump.triebelLizorkinNorm_localExtension_le`, +`Rd.exists_hasWeakLineDeriv_of_memTriebelLizorkin_of_le`). -/ +theorem extendsSobolevOrder [Nontrivial V] (hp1 : 1 < p) (hp : p ≠ ∞) {m : ℕ} (hm : 0 < m) + {U W : Set V} (hU : MeasurableSet U) (hW : MeasurableSet W) {T : Opens V} (hUT : U ⊆ T) + (hUW : ∀ x ∈ U, ∀ j y, b.dilationSmoothed.dual (m + 1) j y ≠ 0 → x - y ∈ W) + (hsupp : ∀ x ∈ W, ∀ j i, ∀ y ∈ tsupport (dilate (2 ^ j) (b.higherKernel (m + 1) m i : V → ℂ)), + x - y ∈ T) : + ExtendsSobolevOrder p m T U (b.higherExtensionConst m p) := by + have : Fact (1 ≤ p) := ⟨hp1.le⟩ + intro f g hg hfg + have h0 := hfg 0 (Nat.zero_le m) Fin.elim0 + have hf : MemLp f p (volume.restrict T) := + (hg 0 (Nat.zero_le m) Fin.elim0).ae_eq ((hasWeakLineDeriv_fin_zero _ h0.1).unique h0).symm + have hf₀ := (memLp_indicator_iff_restrict T.isOpen.measurableSet.nullMeasurableSet).2 hf + have hY : ∑ k ∈ Finset.range (m + 1), ∑ w : Fin k → Fin (finrank ℝ V), + eLpNorm (g k w) p (volume.restrict T) ≠ ∞ := + ENNReal.sum_ne_top.2 fun k hk => ENNReal.sum_ne_top.2 fun w _ => + (hg k (Nat.lt_succ_iff.1 (Finset.mem_range.1 hk)) w).eLpNorm_ne_top + have hX := (b.tlLocalNormOn_le_higherPatchConst hp1 hp (Nat.lt_succ_self m) hW hf (hg m le_rfl) + (hfg m le_rfl) hsupp hf₀.coeFn_toLp).trans + (mul_le_mul_right (eLpNorm_add_sum_le_sum_words hm h0) _) + have hXf := hX.trans_lt (ENNReal.mul_lt_top (b.higherPatchConst_ne_top _ _ hp1 hp).lt_top + hY.lt_top) + have hs : (0 : ℝ) < m := Nat.cast_pos.2 hm + have hTL := b.dilationSmoothed.triebelLizorkinNorm_localExtension_le hp1 hp hW (m + 1) hs + ENNReal.one_lt_two hXf + have hmem : MemTriebelLizorkin (m : ℝ) 2 (b.dilationSmoothed.localExtension hp hW (m + 1) + (hf₀.toLp _)) := hTL.trans_lt (ENNReal.mul_lt_top + (b.dilationSmoothed.tlUpperConst_ne_top _ hp1 hp ENNReal.one_lt_two hs).lt_top hXf) + obtain ⟨G, hG⟩ := exists_forall_words_of_forall_le (m := m) + (P := fun k w (G : Lp ℂ p (volume : Measure V)) => HasWeakLineDeriv ⊤ + (fun l => gridBasis V (w l)) + (b.dilationSmoothed.localExtension hp hW (m + 1) (hf₀.toLp _)) G ∧ + ‖G‖ₑ ≤ tlToSobolevConst p (fun l => gridBasis V (w l)) * triebelLizorkinNorm (m : ℝ) 2 + (b.dilationSmoothed.localExtension hp hW (m + 1) (hf₀.toLp _))) + fun k hk _ => exists_hasWeakLineDeriv_of_memTriebelLizorkin_of_le hp1 hp hk _ hmem + refine ⟨_, memSobolev_of_memTriebelLizorkin hp1 hp hmem, + b.dilationSmoothed.ae_localExtension_eq_of_ae_eq_indicator hp (Nat.le_add_left 1 m) hU hW hUT + hUW hf₀.coeFn_toLp (b.dilationSmoothed.summable_localExtTerm_of_tlLocalNormOn hp hW (m + 1) + hs two_ne_zero hXf), G, fun k hk w => (hG k hk w).1, ?_⟩ + calc ∑ k ∈ Finset.range (m + 1), ∑ w : Fin k → Fin (finrank ℝ V), ‖G k w‖ₑ + ≤ ∑ k ∈ Finset.range (m + 1), ∑ w : Fin k → Fin (finrank ℝ V), + tlToSobolevConst p (fun l => gridBasis V (w l)) * triebelLizorkinNorm (m : ℝ) 2 + (b.dilationSmoothed.localExtension hp hW (m + 1) (hf₀.toLp _)) := + Finset.sum_le_sum fun k hk => Finset.sum_le_sum fun w _ => + (hG k (Nat.lt_succ_iff.1 (Finset.mem_range.1 hk)) w).2 + _ = (∑ k ∈ Finset.range (m + 1), ∑ w : Fin k → Fin (finrank ℝ V), + tlToSobolevConst p (fun l => gridBasis V (w l))) * triebelLizorkinNorm (m : ℝ) 2 + (b.dilationSmoothed.localExtension hp hW (m + 1) (hf₀.toLp _)) := by + simp_rw [Finset.sum_mul] + _ ≤ (∑ k ∈ Finset.range (m + 1), ∑ w : Fin k → Fin (finrank ℝ V), + tlToSobolevConst p (fun l => gridBasis V (w l))) * + (b.dilationSmoothed.tlUpperConst (m + 1) p 2 m * (b.higherPatchConst (m + 1) m p * + ∑ k ∈ Finset.range (m + 1), ∑ w : Fin k → Fin (finrank ℝ V), + eLpNorm (g k w) p (volume.restrict T))) := by + gcongr + exact hTL.trans (mul_le_mul_right hX _) + _ = _ := by rw [higherExtensionConst]; ring + +end LocalMeansBump + +/-! ### Pasting in `W^m_p(V)` -/ + +/-- **The Leibniz rule with a bound, on all of `V`**: let `G_{k,w} = ∂^{e_w} F` weakly on an open +set `B` for all words of length `k ≤ m`, and let `χ` be smooth with compact support in `B`. Then +`χ F` has a weak derivative `H` on `V` along every word of length `k ≤ m`, with +`‖H‖_p ≤ C_k(χ) ∑_{k' ≤ m} ∑_{w'} ‖G_{k',w'}‖_{L_p(B)}` +(`Rd.exists_hasWeakLineDeriv_mul_of_tsupport_subset` with `O = V`). -/ +theorem exists_hasWeakLineDeriv_top_mul_le [Fact (1 ≤ p)] {m : ℕ} {B : Opens V} {F : V → ℂ} + {G : (k : ℕ) → (Fin k → Fin (finrank ℝ V)) → V → ℂ} + (hG : ∀ k ≤ m, ∀ w, HasWeakLineDeriv B (fun l => gridBasis V (w l)) F (G k w)) + {χ : V → ℝ} (hχ : ContDiff ℝ ((⊤ : ℕ∞) : WithTop ℕ∞) χ) (hχc : HasCompactSupport χ) + (hχB : tsupport χ ⊆ B) {k : ℕ} (hk : k ≤ m) (w : Fin k → Fin (finrank ℝ V)) : + ∃ H : V → ℂ, HasWeakLineDeriv ⊤ (fun l => gridBasis V (w l)) (fun x => (χ x : ℂ) * F x) H ∧ + eLpNorm H p volume ≤ leibnizConst χ k * ∑ k' ∈ Finset.range (m + 1), + ∑ w' : Fin k' → Fin (finrank ℝ V), eLpNorm (G k' w') p (volume.restrict B) := by + obtain ⟨H, hH, hHb⟩ := exists_hasWeakLineDeriv_mul_of_tsupport_subset (p := p) (O := ⊤) (B := B) + G (fun k hk w => by rw [top_inf_eq]; exact hG k hk w) hχ hχc hχB hk w + refine ⟨H, hH, ?_⟩ + rw [volume_restrict_top, top_inf_eq] at hHb + exact hHb.trans (mul_le_mul_right (sum_range_sum_words_mono + (fun k' w' => eLpNorm (G k' w') p (volume.restrict B)) hk) _) + +/-- **Pasting bounded extensions of order `m`**: let `(U_i)` be a finite cover of `Ō` by bounded +open sets and let Sobolev functions of order `m` on `O` extend from every `O ∩ U_i` with finite +constants. Then they extend from `O` with a finite constant: for a smooth resolution of unity +`(ψ_i)` subordinate to `(U_i)` (`Rd.exists_smooth_partition`), `F = ∑_i ψ_i F_i` agrees with `f` +on `O` (`Rd.ae_sum_mul_eq`), and its derivatives along words come from the Leibniz rule +(`Rd.exists_hasWeakLineDeriv_top_mul_le`). -/ +theorem extendsSobolevOrder_of_cover [Fact (1 ≤ p)] {m : ℕ} {ι : Type*} [Finite ι] {O : Opens V} + (U : ι → Set V) (hUo : ∀ i, IsOpen (U i)) (hUb : ∀ i, Bornology.IsBounded (U i)) + (hcov : closure (O : Set V) ⊆ ⋃ i, U i) {C : ι → ℝ≥0∞} (hC : ∀ i, C i ≠ ∞) + (hext : ∀ i, ExtendsSobolevOrder p m O ((O : Set V) ∩ U i) (C i)) : + ∃ C' : ℝ≥0∞, C' ≠ ∞ ∧ ExtendsSobolevOrder p m O O C' := by + let := Fintype.ofFinite ι + classical + obtain ⟨ψ, hψ, hψU, hψ1, -⟩ := exists_smooth_partition isClosed_closure U hUo hcov + have hcs : ∀ i, HasCompactSupport (ψ i) := fun i => + isCompact_of_isClosed_isBounded (isClosed_tsupport _) ((hUb i).subset (hψU i)) + have hC' : ∑ i, (∑ k ∈ Finset.range (m + 1), ∑ _w : Fin k → Fin (finrank ℝ V), + leibnizConst (ψ i) k) * C i ≠ ∞ := + ENNReal.sum_ne_top.2 fun i _ => ENNReal.mul_ne_top (ENNReal.sum_ne_top.2 fun k _ => + ENNReal.sum_ne_top.2 fun _ _ => leibnizConst_ne_top (hψ i) (hcs i) k) (hC i) + refine ⟨_, hC', extendsSobolevOrder_of_eLpNorm_le hC' fun f g hg hfg => ?_⟩ + choose F hF hFf G hG hb using fun i => hext i f g hg hfg + choose H hH using fun i => exists_forall_words_of_forall_le (m := m) + (P := fun k w (H : V → ℂ) => HasWeakLineDeriv ⊤ (fun l => gridBasis V (w l)) + (fun x => (ψ i x : ℂ) * F i x) H ∧ + eLpNorm H p volume ≤ leibnizConst (ψ i) k * (C i * ∑ k ∈ Finset.range (m + 1), + ∑ w : Fin k → Fin (finrank ℝ V), eLpNorm (g k w) p (volume.restrict O))) fun k hk w => by + obtain ⟨H, hH, hHb⟩ := exists_hasWeakLineDeriv_top_mul_le (p := p) (B := ⊤) + (G := fun k w => (G i k w : V → ℂ)) (hG i) (hψ i) (hcs i) (Set.subset_univ _) hk w + refine ⟨H, hH, hHb.trans (mul_le_mul_right ?_ _)⟩ + simpa only [volume_restrict_top, ← Lp.eNorm_def] using hb i + refine ⟨fun x => ∑ i, (ψ i x : ℂ) * F i x, fun k w => ∑ i, H i k w, fun k hk w => ?_, + ae_sum_mul_eq hψU (fun x hx => hψ1 x (subset_closure hx)) hFf, ?_⟩ + · refine (HasWeakLineDeriv.sum (s := Finset.univ) fun i _ => (hH i k hk w).1).congr_ae ?_ ?_ <;> + exact ae_of_all _ fun x => by simp only [Finset.sum_apply] + · calc _ ≤ ∑ k ∈ Finset.range (m + 1), ∑ _w : Fin k → Fin (finrank ℝ V), ∑ i, + leibnizConst (ψ i) k * (C i * ∑ k ∈ Finset.range (m + 1), + ∑ w : Fin k → Fin (finrank ℝ V), eLpNorm (g k w) p (volume.restrict O)) := + Finset.sum_le_sum fun k hk => Finset.sum_le_sum fun w _ => + (eLpNorm_sum_le Fact.out).trans + (Finset.sum_le_sum fun i _ => (hH i k (Nat.lt_succ_iff.1 + (Finset.mem_range.1 hk)) w).2) + _ = _ := by rw [sum_range_sum_words_sum_mul, Finset.sum_mul]; simp_rw [mul_assoc] + +/-! ### The supports of the higher divergence kernels in the patches -/ + +namespace LipschitzGraph + +variable (G : LipschitzGraph V) + +/-- **Boundary patches, the support condition for the higher divergence kernels**: for a bump +supported in `-K`, `L ≥ 1` and `L R ≤ ε`, `x - y ∈ Ω ∩ B(c, ρ)` for `x ∈ Ω ∩ B(c, ρ - ε)` and `y` +in the support of a dilated higher divergence kernel +(`Rd.LipschitzGraph.tsupport_dilate_higherKernel_subset`, +`Rd.LipschitzGraph.sub_mem_patch_of_mem_closedCone`). -/ +theorem patch_support_higherKernel {b : LocalMeansBump V} (hb : G.ConeSupported b.toFun) + {L m : ℕ} (hL : 1 ≤ L) {ε ρ : ℝ} {c : V} (hR : L * b.radius ≤ ε) : + ∀ x ∈ G.domain ∩ ball c (ρ - ε), ∀ (j : ℕ) (i : Fin m → Fin (finrank ℝ V)), + ∀ y ∈ tsupport (dilate (2 ^ j) (b.higherKernel L m i : V → ℂ)), + x - y ∈ G.domain ∩ ball c ρ := by + intro x hx j i y hy + obtain ⟨hyK, hyR⟩ := G.tsupport_dilate_higherKernel_subset hb hL i j hy + rw [mem_closedBall, dist_zero_right] at hyR + exact G.sub_mem_patch_of_mem_closedCone hx hyK (hyR.trans hR) + +end LipschitzGraph + +/-! ### The extension theorem of higher order -/ + +/-- **A small radius**: for every `m ∈ ℕ` and `ε > 0`, the radius `R = (1/2) / ((m + 1)(1 + 1/ε))` +satisfies `(m + 1) R ≤ ε`, since `(m + 1) R = ε / (2 (ε + 1))`. -/ +theorem natCast_succ_mul_half_div_le {m : ℕ} {ε : ℝ} (hε : 0 < ε) : + ((m + 1 : ℕ) : ℝ) * (1 / 2 / (((m + 1 : ℕ) : ℝ) * (1 + 1 / ε))) ≤ ε := by + have hm : (0 : ℝ) < ((m + 1 : ℕ) : ℝ) := by positivity + rw [show ((m + 1 : ℕ) : ℝ) * (1 / 2 / (((m + 1 : ℕ) : ℝ) * (1 + 1 / ε))) = ε / (2 * (ε + 1)) by + field_simp] + rw [div_le_iff₀ (by positivity)] + nlinarith + +namespace BoundedLipschitzDomain + +variable (Ω : BoundedLipschitzDomain V) + +/-- **The boundary patches of order `m ≥ 1`**: Sobolev functions of order `m` on `Ω` extend from +`Ω ∩ B(c_j, ρ_j - 2ε)` with a finite constant, by the extension from one patch +(`Rd.LocalMeansBump.extendsSobolevOrder`) with a cone bump of `Ω_j` of radius `R ≤ ε / (m + 1)` +(`Rd.LipschitzGraph.exists_coneBump_radius_le`, `Rd.LipschitzGraph.patch_support`, +`Rd.LipschitzGraph.patch_support_higherKernel`). -/ +theorem exists_extendsSobolevOrder_boundary [Nontrivial V] (hp1 : 1 < p) (hp : p ≠ ∞) {m : ℕ} + (hm : 0 < m) {ε : ℝ} (hε : 0 < ε) (j : Fin Ω.N) : + ∃ C : ℝ≥0∞, C ≠ ∞ ∧ ExtendsSobolevOrder p m Ω.toOpens + (Ω.carrier ∩ ball (Ω.center j) (Ω.radius j - 2 * ε)) C := by + obtain ⟨b, hb, -, hR⟩ := + (Ω.graph j).exists_coneBump_radius_le (a := ((m + 1 : ℕ) : ℝ)) (Nat.cast_nonneg _) hε + have hTo : IsOpen ((Ω.graph j).domain ∩ ball (Ω.center j) (Ω.radius j)) := + (Ω.graph j).isOpen_domain.inter isOpen_ball + have hTΩ : (⟨_, hTo⟩ : Opens V) ≤ Ω.toOpens := by + change (Ω.graph j).domain ∩ ball (Ω.center j) (Ω.radius j) ⊆ Ω.carrier + rw [← Ω.inter_ball_eq j le_rfl] + exact Set.inter_subset_left + have hU : Ω.carrier ∩ ball (Ω.center j) (Ω.radius j - 2 * ε) = + (Ω.graph j).domain ∩ ball (Ω.center j) (Ω.radius j - 2 * ε) := + Ω.inter_ball_eq j (by linarith) + refine ⟨_, b.higherExtensionConst_ne_top hm hp1 hp, ?_⟩ + rw [hU] + exact (b.extendsSobolevOrder hp1 hp hm + (((Ω.graph j).isOpen_domain.inter isOpen_ball).measurableSet) + (((Ω.graph j).isOpen_domain.inter isOpen_ball).measurableSet) (T := ⟨_, hTo⟩) + (Set.inter_subset_inter_right _ (ball_subset_ball (by linarith))) + ((Ω.graph j).patch_support ((Ω.graph j).coneSupported_dilationSmoothed hb) hR) + ((Ω.graph j).patch_support_higherKernel hb (Nat.le_add_left 1 m) hR)).of_le hTΩ + +/-- **The inner patch of order `m`, for every `1 ≤ p ≤ ∞`**: Sobolev functions of order `m` on `Ω` +extend from `{infDist(·, Ωᶜ) > 2δ}` with a finite constant. The proof takes a smooth cutoff `χ` +with compact support in `Ω` and `χ = 1` near `{infDist(·, Ωᶜ) ≥ 2δ}` +(`Rd.BoundedLipschitzDomain.exists_cutoff_interior`); then `χ f` has the derivatives of the +Leibniz rule (`Rd.exists_hasWeakLineDeriv_top_mul_le`), and the constant is `∑_{k ≤ m} ∑_w C_k(χ)` +(`Rd.leibnizConst`). -/ +theorem exists_extendsSobolevOrder_interior [Fact (1 ≤ p)] (m : ℕ) {δ : ℝ} (hδ : 0 < δ) : + ∃ C : ℝ≥0∞, C ≠ ∞ ∧ ExtendsSobolevOrder p m Ω.toOpens + (Ω.carrier ∩ {x : V | 2 * δ < infDist x Ω.carrierᶜ}) C := by + obtain ⟨χ, hχ, hχc, hχΩ, -, hχ1⟩ := Ω.exists_cutoff_interior hδ + have hC : ∑ k ∈ Finset.range (m + 1), ∑ _w : Fin k → Fin (finrank ℝ V), leibnizConst χ k ≠ ∞ := + ENNReal.sum_ne_top.2 fun k _ => ENNReal.sum_ne_top.2 fun _ _ => leibnizConst_ne_top hχ hχc k + refine ⟨_, hC, extendsSobolevOrder_of_eLpNorm_le hC fun f g hg hfg => ?_⟩ + obtain ⟨H, hH⟩ := exists_forall_words_of_forall_le (m := m) + (P := fun k w (H : V → ℂ) => HasWeakLineDeriv ⊤ (fun l => gridBasis V (w l)) + (fun x => (χ x : ℂ) * f x) H ∧ + eLpNorm H p volume ≤ leibnizConst χ k * ∑ k ∈ Finset.range (m + 1), + ∑ w : Fin k → Fin (finrank ℝ V), eLpNorm (g k w) p (volume.restrict Ω.toOpens)) + fun k hk w => exists_hasWeakLineDeriv_top_mul_le (p := p) hfg hχ hχc hχΩ hk w + refine ⟨fun x => (χ x : ℂ) * f x, H, fun k hk w => (hH k hk w).1, ae_of_all _ fun x hx => ?_, ?_⟩ + · change (χ x : ℂ) * f x = f x + rw [hχ1.self_of_nhdsSet x (show 2 * δ ≤ infDist x Ω.carrierᶜ from hx.2.le), Complex.ofReal_one, + one_mul] + · calc _ ≤ ∑ k ∈ Finset.range (m + 1), ∑ _w : Fin k → Fin (finrank ℝ V), leibnizConst χ k * + ∑ k ∈ Finset.range (m + 1), ∑ w : Fin k → Fin (finrank ℝ V), + eLpNorm (g k w) p (volume.restrict Ω.toOpens) := + Finset.sum_le_sum fun k hk => Finset.sum_le_sum fun w _ => + (hH k (Nat.lt_succ_iff.1 (Finset.mem_range.1 hk)) w).2 + _ = _ := by simp_rw [Finset.sum_mul] + +/-- **The extension theorem of order `m` with a bound**: for a bounded Lipschitz domain `Ω` in +dimension `n ≥ 1`, `1 < p < ∞` and `m ∈ ℕ` there is a finite constant `C` such that every `f` +with weak derivatives `g_{k,w} = ∂^{e_w} f ∈ L_p(Ω)` along all words `w` of length `k ≤ m` agrees +on `Ω` with some `F ∈ W^m_p(V)` whose weak derivatives `G_{k,w} = ∂^{e_w} F` satisfy +`∑_{k ≤ m} ∑_w ‖G_{k,w}‖_p ≤ C ∑_{k ≤ m} ∑_w ‖g_{k,w}‖_{L_p(Ω)}`. The patches +`Rd.BoundedLipschitzDomain.patch` cover `Ω̄` +(`Rd.BoundedLipschitzDomain.exists_extendsSobolevOrder_boundary`, +`Rd.BoundedLipschitzDomain.exists_extendsSobolevOrder_interior`), pasted by +`Rd.extendsSobolevOrder_of_cover` (`Rd.BoundedLipschitzDomain.exists_of_patches`); for `m = 0`, +`Rd.extendsSobolevOrder_zero`. -/ +theorem exists_extendsSobolevOrder [Nontrivial V] (hp1 : 1 < p) (hp : p ≠ ∞) (m : ℕ) : + ∃ C : ℝ≥0∞, C ≠ ∞ ∧ ExtendsSobolevOrder p m Ω.toOpens Ω.carrier C := by + have : Fact (1 ≤ p) := ⟨hp1.le⟩ + rcases Nat.eq_zero_or_pos m with rfl | hm + · exact ⟨1, ENNReal.one_ne_top, extendsSobolevOrder_zero Ω.toOpens⟩ + exact Ω.exists_of_patches (fun U C => ExtendsSobolevOrder p m Ω.toOpens U C) + (fun U hUo hUb hcov _ hC hext => + extendsSobolevOrder_of_cover (O := Ω.toOpens) U hUo hUb hcov hC hext) + (fun _ hε j => Ω.exists_extendsSobolevOrder_boundary hp1 hp hm hε j) + (fun _ hδ => Ω.exists_extendsSobolevOrder_interior (p := p) m hδ) + +/-- **The extension theorem of order `m`** (the extension theorem of Calderón and Stein for +`1 < p < ∞`, by Rychkov's local extension and the local means of the derivatives of order `m`): +for a bounded Lipschitz domain `Ω`, `1 < p < ∞` and `m ∈ ℕ`, every `f ∈ W^m_p(Ω)` agrees almost +everywhere on `Ω` with some `F ∈ W^m_p(V)` +(`Rd.BoundedLipschitzDomain.exists_extendsSobolevOrder` in dimension `n ≥ 1`, +`Rd.exists_memSobolev_of_memWeakSobolev_of_subsingleton` in dimension `0`). -/ +theorem exists_memSobolev_of_memWeakSobolev_order (hp1 : 1 < p) (hp : p ≠ ∞) {m : ℕ} + {f : V → ℂ} (hf : MemWeakSobolev Ω.toOpens m p f) : + ∃ F : Lp ℂ p (volume : Measure V), MemSobolev m F ∧ + (F : V → ℂ) =ᵐ[volume.restrict Ω.carrier] f := by + rcases subsingleton_or_nontrivial V with hV | hV + · exact exists_memSobolev_of_memWeakSobolev_of_subsingleton hf + obtain ⟨C, -, hC⟩ := Ω.exists_extendsSobolevOrder hp1 hp m + obtain ⟨g, hg⟩ := exists_forall_words_of_forall_le (m := m) + (P := fun k w (g : V → ℂ) => MemLp g p (volume.restrict Ω.toOpens) ∧ + HasWeakLineDeriv Ω.toOpens (fun l => gridBasis V (w l)) f g) + fun k hk w => hf.2 k hk fun l => gridBasis V (w l) + obtain ⟨F, hF, hFf, -⟩ := hC f g (fun k hk w => (hg k hk w).1) fun k hk w => (hg k hk w).2 + exact ⟨F, hF, (ae_restrict_iff' Ω.measurableSet).2 hFf⟩ + +/-- **`W^m_p(Ω)` is the space of restrictions of `W^m_p(V)`**: for a bounded Lipschitz domain `Ω`, +`1 < p < ∞` and `m ∈ ℕ`, `f` lies in `W^m_p(Ω)` iff it agrees almost everywhere on `Ω` with some +`F ∈ W^m_p(V)` (`Rd.BoundedLipschitzDomain.exists_memSobolev_of_memWeakSobolev_order`; the converse +restricts the weak derivatives, `Rd.MemWeakSobolev.mono_set`). -/ +theorem memWeakSobolev_iff_exists_memSobolev_order (hp1 : 1 < p) (hp : p ≠ ∞) (m : ℕ) + (f : V → ℂ) : + MemWeakSobolev Ω.toOpens m p f ↔ ∃ F : Lp ℂ p (volume : Measure V), MemSobolev m F ∧ + (F : V → ℂ) =ᵐ[volume.restrict Ω.carrier] f := by + refine ⟨Ω.exists_memSobolev_of_memWeakSobolev_order hp1 hp, ?_⟩ + rintro ⟨F, hF, hFf⟩ + exact (MemWeakSobolev.mono_set hF le_top).congr_ae hFf + +end BoundedLipschitzDomain + +end Rd diff --git a/LeanPool/FunctionSpaces/Domains/Extension/LipschitzGraphBesov.lean b/LeanPool/FunctionSpaces/Domains/Extension/LipschitzGraphBesov.lean new file mode 100644 index 0000000000..4ce56edc53 --- /dev/null +++ b/LeanPool/FunctionSpaces/Domains/Extension/LipschitzGraphBesov.lean @@ -0,0 +1,277 @@ +/- +Copyright (c) 2026 Mario Ullrich. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Mario Ullrich +-/ +module + +public import LeanPool.FunctionSpaces.Domains.Extension.RychkovExtension + +/- +Modified for Lean Pool: module names and imports adapted. +-/ + +/-! +# Besov spaces on Lipschitz graph domains by intrinsic differences + +Let `Ω` be a Lipschitz graph domain with cone `K`. **Steps in the cone stay in `Ω`**: for `h ∈ K` +and `x ∈ Ω`, all points `x + l h`, `l ∈ ℕ`, lie in `Ω` (`Rd.LipschitzGraph.subset_stepSet`), so for +such steps the differences on `Ω` (`Rd.modulusOn`) are the differences on `V`. The cone bump `g` +vanishes outside `-K ∩ B(0, 1/2)`, so the steps `-c^(-1) z`, `g(z) ≠ 0`, of the averaged +differences lie in `K` and have length at most `1/(2c)`, and + +`‖1_Ω (f - m_{2^j} ⋆ f)‖_p ≤ ‖g‖_1 ω_L(f, 2^(-(j+1)), Ω)_p` + +(`Rd.LipschitzGraph.enorm_cutoff_sub_convLp_scaled_le`, from +`Rd.eLpNorm_indicator_sub_convLp_momentKernel_le`). Hence the intrinsic local means are bounded +by the moduli on `Ω` at the same scale, `‖1_Ω (k_j ⋆ f)‖_p ≤ 2 ‖g‖_1 ω_L(f, 2^(-j), Ω)_p` for +`j ≥ 1` (`Rd.LipschitzGraph.enorm_cutoff_localMean_succ_le`), and + +`‖(2^(js) ‖1_Ω (k_j ⋆ f)‖_p)_j‖_{ℓ_q} ≤ C (‖f‖_{L_p(Ω)} + ‖(2^(js) ω_L(f, 2^(-j), Ω)_p)_j‖_{ℓ_q})` + +(`Rd.LipschitzGraph.intrinsicNorm_le`, by the sequence bound +`ENNReal.lqNorm_dyadicWeight_le_of_head_of_succ_le`). The radius `1/2` of the bump matches the +scales, so the modulus on `Ω` is never dilated. + +**Restrictions by intrinsic differences** +(`Rd.LipschitzGraph.exists_besov_extension_iff_modulusOn`): for `1 ≤ p < ∞`, `0 < s < r` and +`1 ≤ q ≤ ∞`, `f` agrees on `Ω` with some `F ∈ L_p(V)` with +`‖F‖_p + ‖(2^(ks) ω_r(F, 2^(-k))_p)_k‖_{ℓ_q} < ∞` iff +`‖f‖_{L_p(Ω)} + ‖(2^(ks) ω_r(f, 2^(-k), Ω)_p)_k‖_{ℓ_q} < ∞`. The quasi-norms are equivalent: the +intrinsic one is at most that of every such `F` (`Rd.LipschitzGraph.modNormOn_le_modNorm`), and +Rychkov's extension `F = Ext f` attains it up to a constant +(`Rd.LipschitzGraph.modNorm_extension_le_modNormOn`). Since differences and band-limited +approximation describe the same spaces on `V` (`Rd.memApprox_bandScheme_iff_modulus`), the +restrictions of the approximation spaces `A^s_q(L_p(V))` of band-limited functions are described +by the same intrinsic condition (`Rd.LipschitzGraph.exists_memApprox_extension_iff`). +-/ + +@[expose] public section + +open MeasureTheory Filter Topology Module +open scoped ENNReal + +open ENNReal (lqNorm dyadicWeight) + +namespace Rd + +namespace LocalMeansBump + +variable {V : Type*} [NormedAddCommGroup V] [InnerProductSpace ℝ V] [FiniteDimensional ℝ V] + [MeasurableSpace V] [BorelSpace V] {p : ℝ≥0∞} [Fact (1 ≤ p)] (b : LocalMeansBump V) + +/-! ### Local means and moduli on a set -/ + +/-- **Moment kernels approximate with the modulus on `T`**: if the steps take `W` into `T`, +`‖1_W (f - m_{2^j} ⋆ f)‖_p ≤ ‖g‖_1 ω_L(f, R 2^(-j), T)_p`. -/ +theorem enorm_indicatorLp_sub_convLp_scaled_le (hp : p ≠ ∞) {W T : Set V} + (hW : MeasurableSet W) (L j : ℕ) + (hstep : ∀ c : ℝ, 1 ≤ c → ∀ z, b.toFun z ≠ 0 → W ⊆ stepSet T L (-c⁻¹ • z)) + (f : Lp ℂ p (volume : Measure V)) : + ‖indicatorLp hW (f - convLp hp (b.integrable_scaled L j) f)‖ₑ ≤ + (∫⁻ z, ‖b.toFun z‖ₑ) * modulusOn volume T L p (f : V → ℂ) (b.radius / 2 ^ j) := by + rw [Lp.eNorm_def, eLpNorm_congr_ae (indicatorLp_apply_ae hW _)] + exact eLpNorm_indicator_sub_convLp_momentKernel_le hp b.integrable b.integral_eq_one b.eq_zero L + (c := 2 ^ j) (by positivity) hW (hstep _ (one_le_pow₀ one_le_two)) f + +/-- **Local means are bounded by the modulus on `T`**: for a bump of radius `R ≤ 1/2` whose steps +take `W` into `T`, `‖1_W (k_{j+1} ⋆ f)‖_p ≤ 2 ‖g‖_1 ω_L(f, 2^(-(j+1)), T)_p`. -/ +theorem enorm_indicatorLp_localMean_succ_le (hp : p ≠ ∞) {W T : Set V} (hW : MeasurableSet W) + (L j : ℕ) (hstep : ∀ c : ℝ, 1 ≤ c → ∀ z, b.toFun z ≠ 0 → W ⊆ stepSet T L (-c⁻¹ • z)) + (hR : b.radius ≤ 1 / 2) (f : Lp ℂ p (volume : Measure V)) : + ‖indicatorLp hW (b.localMean hp L (j + 1) f)‖ₑ ≤ + 2 * (∫⁻ z, ‖b.toFun z‖ₑ) * lpModulusOn p T L f (j + 1) := by + set A := ∫⁻ z, ‖b.toFun z‖ₑ + have hk : b.localMean hp L (j + 1) f = (f - convLp hp (b.integrable_scaled L j) f) - + (f - convLp hp (b.integrable_scaled L (j + 1)) f) := by + rw [show b.localMean hp L (j + 1) f = convLp hp (b.integrable_scaled L (j + 1)) f - + convLp hp (b.integrable_scaled L j) f from + convLp_sub_kernel hp (b.integrable_scaled L (j + 1)) (b.integrable_scaled L j) f] + abel + have hmono : ∀ i, j ≤ i → + modulusOn volume T L p (f : V → ℂ) (b.radius / 2 ^ i) ≤ lpModulusOn p T L f (j + 1) := + fun i hi => modulusOn_mono _ _ _ _ (by + calc b.radius / 2 ^ i ≤ (1 / 2) / 2 ^ i := + div_le_div_of_nonneg_right hR (by positivity) + _ ≤ (1 / 2) / 2 ^ j := + div_le_div_of_nonneg_left (by norm_num) (by positivity) + (pow_le_pow_right₀ one_le_two hi) + _ = 1 / 2 ^ (j + 1) := by + rw [pow_succ] + ring) + calc ‖indicatorLp hW (b.localMean hp L (j + 1) f)‖ₑ + ≤ ‖indicatorLp hW (f - convLp hp (b.integrable_scaled L j) f)‖ₑ + + ‖indicatorLp hW (f - convLp hp (b.integrable_scaled L (j + 1)) f)‖ₑ := by + rw [hk, map_sub] + exact eNorm_sub_le + _ ≤ A * lpModulusOn p T L f (j + 1) + A * lpModulusOn p T L f (j + 1) := + add_le_add + ((b.enorm_indicatorLp_sub_convLp_scaled_le hp hW L j hstep f).trans + (mul_le_mul' le_rfl (hmono j le_rfl))) + ((b.enorm_indicatorLp_sub_convLp_scaled_le hp hW L (j + 1) hstep f).trans + (mul_le_mul' le_rfl (hmono (j + 1) (Nat.le_succ j)))) + _ = 2 * A * lpModulusOn p T L f (j + 1) := by ring + +/-- The constant `‖m‖_1 + 2 ‖g‖_1` of the bounds of the local means by the moduli on a set +(`Rd.LipschitzGraph.intrinsicConst` for the cone bump, `Rd.LocalMeansBump.localNormOn_le`) is +finite, for the moment kernel `m` of the bump `g` (`Rd.eLpNorm_momentKernel_ne_top`). -/ +theorem momentConst_ne_top (L : ℕ) : + eLpNorm (momentKernel b.toFun L) 1 volume + 2 * ∫⁻ z, ‖b.toFun z‖ₑ ≠ ∞ := + ENNReal.add_ne_top.2 + ⟨eLpNorm_momentKernel_ne_top b.integrable L, ENNReal.mul_ne_top (by norm_num) b.integrable.2.ne⟩ + +end LocalMeansBump + +namespace LipschitzGraph + +variable {V : Type*} [NormedAddCommGroup V] [InnerProductSpace ℝ V] (Ω : LipschitzGraph V) + +/-! ### Steps in the cone -/ + +/-- **Steps in the cone stay in `Ω`**: `Ω ⊆ Ω_{rh}` for `h ∈ K`. -/ +theorem subset_stepSet {h : V} (hh : h ∈ Ω.cone) (r : ℕ) : Ω.domain ⊆ stepSet Ω.domain r h := + fun _ hx l _ => Ω.add_nsmul_mem hx hh l + +/-- The steps of the averaged differences of a kernel supported in `-K` lie in the cone: +`Ω ⊆ Ω_{r h}` for `h = -c^(-1) z`, `c > 0` and `g(z) ≠ 0`. -/ +theorem subset_stepSet_of_coneSupported {g : V → ℂ} (hg : Ω.ConeSupported g) {c : ℝ} + (hc : 0 < c) (r : ℕ) {z : V} (hz : g z ≠ 0) : Ω.domain ⊆ stepSet Ω.domain r (-c⁻¹ • z) := by + rw [neg_smul, ← smul_neg] + exact Ω.subset_stepSet (Ω.smul_mem_cone (inv_pos.2 hc) (hg z hz)) r + +variable [FiniteDimensional ℝ V] [MeasurableSpace V] [BorelSpace V] {p : ℝ≥0∞} [Fact (1 ≤ p)] + +/-! ### Intrinsic local means and moduli on `Ω` -/ + +/-- **Moment kernels approximate with the modulus on `Ω`**: +`‖1_Ω (f - m_{2^j} ⋆ f)‖_p ≤ ‖g‖_1 ω_L(f, 2^(-(j+1)), Ω)_p` for the cone bump `g`. -/ +theorem enorm_cutoff_sub_convLp_scaled_le (hp : p ≠ ∞) (L j : ℕ) + (f : Lp ℂ p (volume : Measure V)) : + ‖Ω.cutoff (f - convLp hp (Ω.coneBump.integrable_scaled L j) f)‖ₑ ≤ + (∫⁻ z, ‖Ω.coneBump.toFun z‖ₑ) * lpModulusOn p Ω.domain L f (j + 1) := by + have hR : Ω.coneBump.radius / 2 ^ j = 1 / 2 ^ (j + 1) := by + rw [Ω.coneBump_radius, pow_succ] + ring + rw [lpModulusOn, ← hR] + exact Ω.coneBump.enorm_indicatorLp_sub_convLp_scaled_le hp Ω.measurableSet_domain L j + (fun _ hc _ hz => Ω.subset_stepSet_of_coneSupported Ω.coneSupported_coneBump + (lt_of_lt_of_le one_pos hc) L hz) f + +/-- `‖1_Ω (k_0 ⋆ f)‖_p ≤ ‖m‖_1 ‖f‖_{L_p(Ω)}`, by the support principle. -/ +theorem enorm_cutoff_localMean_zero_le (hp : p ≠ ∞) (L : ℕ) (f : Lp ℂ p (volume : Measure V)) : + ‖Ω.cutoff (Ω.coneBump.localMean hp L 0 f)‖ₑ ≤ + eLpNorm (momentKernel Ω.coneBump.toFun L) 1 volume * ‖Ω.cutoff f‖ₑ := by + have h := Ω.cutoff_convLp_cutoff hp (Ω.coneBump.integrable_kernel L 0) + (Ω.coneSupported_kernel L 0) f + calc ‖Ω.cutoff (Ω.coneBump.localMean hp L 0 f)‖ₑ + = ‖Ω.cutoff (Ω.coneBump.localMean hp L 0 (Ω.cutoff f))‖ₑ := congrArg (‖·‖ₑ) h.symm + _ ≤ ‖Ω.coneBump.localMean hp L 0 (Ω.cutoff f)‖ₑ := Ω.enorm_cutoff_le _ + _ ≤ eLpNorm (momentKernel Ω.coneBump.toFun L) 1 volume * ‖Ω.cutoff f‖ₑ := + Ω.coneBump.enorm_localMean_zero_le hp L (Ω.cutoff f) + +/-- **Intrinsic local means are bounded by the modulus on `Ω`**: +`‖1_Ω (k_{j+1} ⋆ f)‖_p ≤ 2 ‖g‖_1 ω_L(f, 2^(-(j+1)), Ω)_p`, since +`k_{j+1} ⋆ f = (f - m_{2^j} ⋆ f) - (f - m_{2^(j+1)} ⋆ f)`. -/ +theorem enorm_cutoff_localMean_succ_le (hp : p ≠ ∞) (L j : ℕ) + (f : Lp ℂ p (volume : Measure V)) : + ‖Ω.cutoff (Ω.coneBump.localMean hp L (j + 1) f)‖ₑ ≤ + 2 * (∫⁻ z, ‖Ω.coneBump.toFun z‖ₑ) * lpModulusOn p Ω.domain L f (j + 1) := + Ω.coneBump.enorm_indicatorLp_localMean_succ_le hp Ω.measurableSet_domain L j + (fun _ hc _ hz => Ω.subset_stepSet_of_coneSupported Ω.coneSupported_coneBump + (lt_of_lt_of_le one_pos hc) L hz) Ω.coneBump_radius.le f + +/-- The constant `‖m‖_1 + 2 ‖g‖_1` of the intrinsic upper bound. -/ +noncomputable def intrinsicConst (L : ℕ) : ℝ≥0∞ := + eLpNorm (momentKernel Ω.coneBump.toFun L) 1 volume + 2 * ∫⁻ z, ‖Ω.coneBump.toFun z‖ₑ + +/-- The constant of the intrinsic upper bound is finite +(`Rd.LocalMeansBump.momentConst_ne_top` for the cone bump). -/ +theorem intrinsicConst_ne_top (L : ℕ) : Ω.intrinsicConst L ≠ ∞ := + Ω.coneBump.momentConst_ne_top L + +/-- **The intrinsic local means are bounded by the moduli on `Ω`**: +`‖(2^(js) ‖1_Ω (k_j ⋆ f)‖_p)_j‖_{ℓ_q} ≤ +C (‖f‖_{L_p(Ω)} + ‖(2^(js) ω_L(f, 2^(-j), Ω)_p)_j‖_{ℓ_q})` +(`ENNReal.lqNorm_dyadicWeight_le_of_head_of_succ_le`). -/ +theorem intrinsicNorm_le (hp : p ≠ ∞) (L : ℕ) (s : ℝ) {q : ℝ≥0∞} (hq : 1 ≤ q) + (f : Lp ℂ p (volume : Measure V)) : + Ω.intrinsicNorm hp L s q f ≤ Ω.intrinsicConst L * + modNormOn Ω.measurableSet_domain L s q f := + ENNReal.lqNorm_dyadicWeight_le_of_head_of_succ_le hq s + (fun j => ‖Ω.cutoff (Ω.coneBump.localMean hp L j f)‖ₑ) (lpModulusOn p Ω.domain L f) + (Ω.enorm_cutoff_localMean_zero_le hp L f) fun j => Ω.enorm_cutoff_localMean_succ_le hp L j f + +/-- Finite intrinsic moduli give a finite intrinsic local means quasi-norm. -/ +theorem intrinsicNorm_lt_top (hp : p ≠ ∞) (L : ℕ) (s : ℝ) {q : ℝ≥0∞} (hq : 1 ≤ q) + {f : Lp ℂ p (volume : Measure V)} + (hf : modNormOn Ω.measurableSet_domain L s q f < ∞) : + Ω.intrinsicNorm hp L s q f < ∞ := + (Ω.intrinsicNorm_le hp L s hq f).trans_lt + (ENNReal.mul_lt_top (Ω.intrinsicConst_ne_top L).lt_top hf) + +/-! ### Restrictions by intrinsic differences -/ + +/-- **The moduli on `Ω` are at most those of every function that agrees with `f` on `Ω`**: if +`1_Ω F = 1_Ω f`, then `‖f‖_{L_p(Ω)} + ‖(2^(ks) ω_r(f, 2^(-k), Ω)_p)_k‖_{ℓ_q} ≤ +‖F‖_p + ‖(2^(ks) ω_r(F, 2^(-k))_p)_k‖_{ℓ_q}`; the case `O = Ω` of +`Rd.modNormOn_le_modNorm_of_indicatorLp`, since the cut-off is `indicatorLp`. -/ +theorem modNormOn_le_modNorm (r : ℕ) (s : ℝ) (q : ℝ≥0∞) {F f : Lp ℂ p (volume : Measure V)} + (hFf : Ω.cutoff F = Ω.cutoff f) : + modNormOn Ω.measurableSet_domain r s q f ≤ + ‖F‖ₑ + lqNorm q (fun k => dyadicWeight s k * lpModulus p r F k) := + modNormOn_le_modNorm_of_indicatorLp Ω.measurableSet_domain r s q hFf + +/-- **Rychkov's extension agrees with `f` on `Ω`** when the intrinsic moduli are finite. -/ +theorem cutoff_extension_of_modNormOn (hp : p ≠ ∞) {r : ℕ} (hr : 1 ≤ r) {s : ℝ} (hs : 0 < s) + {q : ℝ≥0∞} (hq : 1 ≤ q) {f : Lp ℂ p (volume : Measure V)} + (hf : modNormOn Ω.measurableSet_domain r s q f < ∞) : + Ω.cutoff (Ω.extension hp r f) = Ω.cutoff f := + Ω.cutoff_extension hp hr hs hq (Ω.intrinsicNorm_lt_top hp r s hq hf) + +/-- **Rychkov's extension is bounded in the moduli**: for `s > 0`, +`‖Ext f‖_p + ‖(2^(ks) ω_r(Ext f, 2^(-k))_p)_k‖_{ℓ_q} ≤ +C (‖f‖_{L_p(Ω)} + ‖(2^(ks) ω_r(f, 2^(-k), Ω)_p)_k‖_{ℓ_q})`, with `C` finite for `s < r`. -/ +theorem modNorm_extension_le_modNormOn (hp : p ≠ ∞) (r : ℕ) {s : ℝ} (hs : 0 < s) {q : ℝ≥0∞} + (hq : 1 ≤ q) {f : Lp ℂ p (volume : Measure V)} + (hf : modNormOn Ω.measurableSet_domain r s q f < ∞) : + ‖Ω.extension hp r f‖ₑ + + lqNorm q (fun k => dyadicWeight s k * lpModulus p r (Ω.extension hp r f) k) ≤ + Ω.coneBump.synthConst r s * Ω.intrinsicConst r * + modNormOn Ω.measurableSet_domain r s q f := by + rw [mul_assoc] + exact (Ω.modNorm_extension_le hp r hs hq (Ω.intrinsicNorm_lt_top hp r s hq hf)).trans + (mul_le_mul' le_rfl (Ω.intrinsicNorm_le hp r s hq f)) + +/-- **Restrictions of Besov spaces to Lipschitz graph domains, by intrinsic differences**: for +`1 ≤ p < ∞`, `0 < s < r` and `1 ≤ q ≤ ∞`, `f` agrees on `Ω` with some `F ∈ L_p(V)` with +`‖F‖_p + ‖(2^(ks) ω_r(F, 2^(-k))_p)_k‖_{ℓ_q} < ∞` iff +`‖f‖_{L_p(Ω)} + ‖(2^(ks) ω_r(f, 2^(-k), Ω)_p)_k‖_{ℓ_q} < ∞`; Rychkov's extension is such an +`F`. -/ +theorem exists_besov_extension_iff_modulusOn (hp : p ≠ ∞) {r : ℕ} {s : ℝ} (hs : 0 < s) + (hsr : s < r) {q : ℝ≥0∞} (hq : 1 ≤ q) (f : Lp ℂ p (volume : Measure V)) : + (∃ F : Lp ℂ p (volume : Measure V), Ω.cutoff F = Ω.cutoff f ∧ + ‖F‖ₑ + lqNorm q (fun k => dyadicWeight s k * lpModulus p r F k) < ∞) ↔ + modNormOn Ω.measurableSet_domain r s q f < ∞ := by + have hr : 1 ≤ r := Nat.one_le_iff_ne_zero.2 (Nat.cast_pos.1 (hs.trans hsr)).ne' + constructor + · rintro ⟨F, hFf, hF⟩ + exact (Ω.modNormOn_le_modNorm r s q hFf).trans_lt hF + · intro hf + exact (Ω.exists_besov_extension_iff hp hr hs hsr hq f).2 (Ω.intrinsicNorm_lt_top hp r s hq hf) + +/-- **Restrictions of band-limited approximation spaces to Lipschitz graph domains**: for +`1 ≤ p < ∞`, `0 < s < r` and `1 ≤ q ≤ ∞`, `f` agrees on `Ω` with some `F` in the approximation +space `A^s_q(L_p(V))` of band-limited functions iff +`‖f‖_{L_p(Ω)} + ‖(2^(ks) ω_r(f, 2^(-k), Ω)_p)_k‖_{ℓ_q} < ∞`. -/ +theorem exists_memApprox_extension_iff (hp : p ≠ ∞) {r : ℕ} {s : ℝ} (hs : 0 < s) (hsr : s < r) + {q : ℝ≥0∞} (hq : 1 ≤ q) (f : Lp ℂ p (volume : Measure V)) : + (∃ F : Lp ℂ p (volume : Measure V), Ω.cutoff F = Ω.cutoff f ∧ + (bandScheme hp).MemApprox s q F) ↔ + modNormOn Ω.measurableSet_domain r s q f < ∞ := by + rw [← Ω.exists_besov_extension_iff_modulusOn hp hs hsr hq f] + exact exists_congr fun F => + and_congr_right fun _ => memApprox_bandScheme_iff_modulus hp hs.le hsr hq F + +end LipschitzGraph + +end Rd diff --git a/LeanPool/FunctionSpaces/Domains/Extension/LocalExtension.lean b/LeanPool/FunctionSpaces/Domains/Extension/LocalExtension.lean new file mode 100644 index 0000000000..caa4e79061 --- /dev/null +++ b/LeanPool/FunctionSpaces/Domains/Extension/LocalExtension.lean @@ -0,0 +1,363 @@ +/- +Copyright (c) 2026 Mario Ullrich. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Mario Ullrich +-/ +module + +public import LeanPool.FunctionSpaces.Domains.Extension.LipschitzGraphBesov + +/- +Modified for Lean Pool: module names and imports adapted. +-/ + +/-! +# Local extensions + +Rychkov's construction works locally. Let `b` be a bump for local means with kernels `k_j`, dual +kernels `η_j` and radius `R ≤ 1/2`, and let `U ⊆ W` and `U ⊆ T` be measurable sets such that + +* `x - y ∈ W` for `x ∈ U` and `y` in the support of a dual kernel (`η_j ⋆` at points of `U` only + sees `W`), and +* `W ⊆ T_{L h}` for the steps `h = -c^(-1) z`, `c ≥ 1`, `b(z) ≠ 0` (the averaged differences of + the moment kernels at points of `W` stay in `T`). + +Then for `f ∈ L_p(V)` with `‖f‖_{L_p(T)} + ‖(2^(ks) ω_L(f, 2^(-k), T)_p)_k‖_{ℓ_q} < ∞` (the +intrinsic quasi-norm `Rd.modNormOn` on `T`) and `0 < s < L`, the local extension +`F = ∑_j η_j ⋆ 1_W (k_j ⋆ 1_T f)` (`Rd.LocalMeansBump.localExtension`) has a finite Besov +quasi-norm on `V` and `F = f` almost everywhere on `U` (`Rd.LocalMeansBump.exists_local_extension`); +its Besov quasi-norm is at most a constant of the bump (`Rd.LocalMeansBump.localExtConst`) times +that of `f` on `T` (`Rd.LocalMeansBump.exists_local_extension_le`). The local means on `W` are +bounded by the moduli on `T` (`Rd.LocalMeansBump.localNormOn_le`), by the moment kernel bound for +two sets (`Rd.eLpNorm_indicator_sub_convLp_momentKernel_le`). + +Two kinds of patches satisfy the conditions: + +* **boundary patches** of a Lipschitz graph domain `Ω`, `U = Ω ∩ B(c, ρ - 2ε)`, + `W = Ω ∩ B(c, ρ - ε)`, `T = Ω ∩ B(c, ρ)`, for a bump supported in the reflected cone with + `L R ≤ ε` (`Rd.LipschitzGraph.patch_support`, `Rd.LipschitzGraph.patch_step`); +* **interior patches** of an open set `O`, `U = {infDist(·, Oᶜ) > 2δ}`, `W = {infDist(·, Oᶜ) > δ}`, + `T = O`, for any bump with `L R ≤ δ` (`Rd.interior_patch_support`, `Rd.interior_patch_step`); + these sets lie in `O` (`Rd.setOf_lt_infDist_compl_subset`), and so does `x - y` for + `δ < infDist(x, Oᶜ)` and `‖y‖ ≤ δ` (`Rd.sub_mem_of_lt_infDist_of_norm_le`). + +Short steps `-y ∈ K̄`, `‖y‖ ≤ ε`, take `Ω ∩ B(c, ρ - ε)` into `Ω ∩ B(c, ρ)` +(`Rd.LipschitzGraph.sub_mem_patch_of_mem_closedCone`); this gives the support conditions of all +cone-supported kernels of small support. + +Bumps of every radius come from rescaling (`Rd.LocalMeansBump.rescale`) and from the normalised +smooth bump centred at `0` (`Rd.LocalMeansBump.centered`). The cone bump of a Lipschitz graph +domain, rescaled, is supported in the reflected cone with a radius `R ≤ 1/2` and `a R ≤ ε` +(`Rd.LipschitzGraph.exists_coneBump_radius_le`). +-/ + +@[expose] public section + +open MeasureTheory Filter Topology Module Metric +open scoped ENNReal + +open ENNReal (lqNorm dyadicWeight) + +namespace Rd + +variable {V : Type*} [NormedAddCommGroup V] [InnerProductSpace ℝ V] [FiniteDimensional ℝ V] + [MeasurableSpace V] [BorelSpace V] {p : ℝ≥0∞} [Fact (1 ≤ p)] + +/-! ### Bumps of every radius -/ + +namespace LocalMeansBump + +variable (b : LocalMeansBump V) + +/-- The **rescaled bump** `c^n b(c ·)`, of radius `R / c`. -/ +noncomputable def rescale {c : ℝ} (hc : 0 < c) : LocalMeansBump V where + toFun := Rd.dilate c b.toFun + radius := b.radius / c + radius_nonneg := div_nonneg b.radius_nonneg hc.le + contDiff := contDiff_const.mul (b.contDiff.comp (contDiff_const_smul c)) + eq_zero z hz := by + have hz' : b.radius < ‖c • z‖ := by + rw [norm_smul, Real.norm_of_nonneg hc.le] + rwa [div_lt_iff₀ hc, mul_comm] at hz + simp only [Rd.dilate, b.eq_zero _ hz', mul_zero] + integral_eq_one := by rw [integral_dilate _ hc, b.integral_eq_one] + +/-- The rescaled bump has radius `R / c`. -/ +theorem rescale_radius {c : ℝ} (hc : 0 < c) : (b.rescale hc).radius = b.radius / c := rfl + +/-- The dilated moment kernels vanish outside the ball of radius `L R`. -/ +theorem scaled_eq_zero (L j : ℕ) {y : V} (hy : L * b.radius < ‖y‖) : b.scaled L j y = 0 := by + have h1 : (1 : ℝ) ≤ 2 ^ j := one_le_pow₀ one_le_two + have hy' : L * b.radius < ‖(2 : ℝ) ^ j • y‖ := by + rw [norm_smul, Real.norm_of_nonneg (by positivity)] + calc (L : ℝ) * b.radius < ‖y‖ := hy + _ ≤ 2 ^ j * ‖y‖ := le_mul_of_one_le_left (norm_nonneg y) h1 + simp only [scaled, Rd.dilate, b.momentKernel_eq_zero L hy', mul_zero] + +/-- The dual kernels vanish outside the ball of radius `L R`. -/ +theorem dual_eq_zero (L j : ℕ) {y : V} (hy : L * b.radius < ‖y‖) : b.dual L j y = 0 := by + cases j with + | zero => exact b.scaled_eq_zero L 0 hy + | succ j => + change b.scaled L (j + 1) y + b.scaled L j y = 0 + rw [b.scaled_eq_zero L _ hy, b.scaled_eq_zero L _ hy, add_zero] + +/-- The local means kernels vanish outside the ball of radius `L R`. -/ +theorem kernel_eq_zero (L j : ℕ) {y : V} (hy : L * b.radius < ‖y‖) : b.kernel L j y = 0 := by + cases j with + | zero => exact b.scaled_eq_zero L 0 hy + | succ j => + change b.scaled L (j + 1) y - b.scaled L j y = 0 + rw [b.scaled_eq_zero L _ hy, b.scaled_eq_zero L _ hy, sub_zero] + +end LocalMeansBump + +/-! ### Kernels supported in the reflected cone -/ + +namespace LipschitzGraph + +variable (Ω : LipschitzGraph V) + +/-- Rescaled bumps supported in `-K` are supported in `-K`. -/ +theorem coneSupported_rescale {b : LocalMeansBump V} (hb : Ω.ConeSupported b.toFun) {c : ℝ} + (hc : 0 < c) : Ω.ConeSupported (b.rescale hc).toFun := + hb.dilate hc + +/-- **Cone bumps of small radius**: for `a ≥ 0` and `ε > 0` the cone bump rescaled by +`1 + a / ε` is supported in `-K` and has a radius `R ≤ 1/2` with `a R ≤ ε` +(`Rd.LipschitzGraph.coneBump_radius`). -/ +theorem exists_coneBump_radius_le {a ε : ℝ} (ha : 0 ≤ a) (hε : 0 < ε) : + ∃ b : LocalMeansBump V, Ω.ConeSupported b.toFun ∧ b.radius ≤ 1 / 2 ∧ a * b.radius ≤ ε := by + have hc : 0 < 1 + a / ε := by positivity + refine ⟨Ω.coneBump.rescale hc, Ω.coneSupported_rescale Ω.coneSupported_coneBump hc, ?_, ?_⟩ <;> + rw [LocalMeansBump.rescale_radius, Ω.coneBump_radius] + · exact div_le_self (by norm_num) (le_add_of_nonneg_right (by positivity)) + · rw [← mul_div_assoc, div_le_iff₀ hc, mul_add, mul_one, mul_div_cancel₀ a hε.ne'] + linarith + +omit [FiniteDimensional ℝ V] [MeasurableSpace V] [BorelSpace V] in +/-- **Short steps into the reflected closed cone stay in a patch**: if `x ∈ Ω ∩ B(c, ρ - ε)`, +`-y ∈ K̄` and `‖y‖ ≤ ε`, then `x - y ∈ Ω ∩ B(c, ρ)` (`Rd.LipschitzGraph.add_mem_of_mem_closedCone` +and the triangle inequality). -/ +theorem sub_mem_patch_of_mem_closedCone {ε ρ : ℝ} {c x y : V} + (hx : x ∈ Ω.domain ∩ ball c (ρ - ε)) (hy : -y ∈ Ω.closedCone) (hyR : ‖y‖ ≤ ε) : + x - y ∈ Ω.domain ∩ ball c ρ := by + obtain ⟨hxΩ, hxc⟩ := hx + refine ⟨by simpa [sub_eq_add_neg] using Ω.add_mem_of_mem_closedCone hxΩ hy, ?_⟩ + rw [mem_ball] at hxc ⊢ + calc dist (x - y) c ≤ dist x c + ‖y‖ := by + rw [dist_eq_norm, dist_eq_norm, sub_right_comm] + exact norm_sub_le _ _ + _ < ρ - ε + ε := by linarith + _ = ρ := by ring + +/-- **Boundary patches, the support condition**: for a bump supported in `-K` with `L R ≤ ε`, the +dual kernels at points of `Ω ∩ B(c, ρ - 2ε)` only see `Ω ∩ B(c, ρ - ε)` +(`Rd.LipschitzGraph.sub_mem_patch_of_mem_closedCone`). -/ +theorem patch_support {b : LocalMeansBump V} (hb : Ω.ConeSupported b.toFun) {L : ℕ} {ε ρ : ℝ} + {c : V} (hLR : L * b.radius ≤ ε) : + ∀ x ∈ Ω.domain ∩ ball c (ρ - 2 * ε), ∀ j y, b.dual L j y ≠ 0 → + x - y ∈ Ω.domain ∩ ball c (ρ - ε) := by + intro x hx j y hy + have hyR : ‖y‖ ≤ L * b.radius := not_lt.1 fun h => hy (b.dual_eq_zero L j h) + rw [show ρ - 2 * ε = ρ - ε - ε by ring] at hx + exact Ω.sub_mem_patch_of_mem_closedCone hx + (Ω.cone_subset_closedCone (Ω.coneSupported_dual_of hb L j y hy)) (hyR.trans hLR) + +/-- **Boundary patches, the step condition**: for a bump supported in `-K` with `L R ≤ ε`, the steps +`-c'^(-1) z`, `c' ≥ 1`, `b(z) ≠ 0`, take `Ω ∩ B(c, ρ - ε)` into `Ω ∩ B(c, ρ)`. -/ +theorem patch_step {b : LocalMeansBump V} (hb : Ω.ConeSupported b.toFun) {L : ℕ} {ε ρ : ℝ} + {c : V} (hLR : L * b.radius ≤ ε) : + ∀ c' : ℝ, 1 ≤ c' → ∀ z, b.toFun z ≠ 0 → + Ω.domain ∩ ball c (ρ - ε) ⊆ stepSet (Ω.domain ∩ ball c ρ) L (-c'⁻¹ • z) := by + intro c' hc' z hz x ⟨hxΩ, hxc⟩ l hl + have hc0 : 0 < c' := zero_lt_one.trans_le hc' + have hzK : -z ∈ Ω.cone := hb z hz + have hzR : ‖z‖ ≤ b.radius := not_lt.1 fun h => hz (b.eq_zero z h) + have hh : -c'⁻¹ • z = c'⁻¹ • -z := by rw [neg_smul, smul_neg] + have hnorm : ‖(l : ℝ) • (-c'⁻¹ • z)‖ ≤ L * b.radius := by + rw [norm_smul, norm_smul, norm_neg, norm_inv, Real.norm_of_nonneg hc0.le, + Real.norm_of_nonneg (Nat.cast_nonneg l)] + have hl' : (l : ℝ) ≤ L := by exact_mod_cast hl + have hinv : c'⁻¹ ≤ 1 := inv_le_one_of_one_le₀ hc' + calc (l : ℝ) * (c'⁻¹ * ‖z‖) ≤ L * (1 * b.radius) := by + gcongr + _ = L * b.radius := by ring + refine ⟨?_, ?_⟩ + · rw [hh] + exact Ω.add_nsmul_mem hxΩ (Ω.smul_mem_cone (inv_pos.2 hc0) hzK) l + · rw [mem_ball] at hxc ⊢ + calc dist (x + (l : ℝ) • (-c'⁻¹ • z)) c ≤ dist x c + ‖(l : ℝ) • (-c'⁻¹ • z)‖ := by + rw [dist_eq_norm, dist_eq_norm, add_sub_right_comm] + exact norm_add_le _ _ + _ < ρ - ε + ε := by linarith + _ = ρ := by ring + +end LipschitzGraph + +/-! ### Interior patches -/ + +omit [InnerProductSpace ℝ V] [FiniteDimensional ℝ V] [MeasurableSpace V] [BorelSpace V] in +/-- Points at distance more than `r ≥ 0` from the complement of `s` lie in `s`. -/ +theorem setOf_lt_infDist_compl_subset (s : Set V) {r : ℝ} (hr : 0 ≤ r) : + {x : V | r < infDist x sᶜ} ⊆ s := fun x hx => by + by_contra h + have h0 : infDist x sᶜ = 0 := infDist_zero_of_mem h + simp only [Set.mem_ofPred_eq] at hx + linarith + +omit [InnerProductSpace ℝ V] [FiniteDimensional ℝ V] [MeasurableSpace V] [BorelSpace V] in +/-- **Interior patches, the support condition**: if the dual kernels vanish outside the ball of +radius `δ`, they see `{infDist(·, Oᶜ) > δ}` from points of `{infDist(·, Oᶜ) > 2δ}`. -/ +theorem interior_patch_support (O : Set V) {k : V → ℂ} {δ : ℝ} (hk : ∀ y, k y ≠ 0 → ‖y‖ ≤ δ) : + ∀ x ∈ {x : V | 2 * δ < infDist x Oᶜ}, ∀ y, k y ≠ 0 → x - y ∈ {x : V | δ < infDist x Oᶜ} := by + intro x hx y hy + have h := infDist_le_infDist_add_dist (s := Oᶜ) (x := x) (y := x - y) + rw [dist_eq_norm, sub_sub_cancel] at h + simp only [Set.mem_ofPred_eq] at hx ⊢ + linarith [hk y hy] + +omit [InnerProductSpace ℝ V] [FiniteDimensional ℝ V] [MeasurableSpace V] [BorelSpace V] in +/-- **Inner patches, the support condition for kernels in a ball**: if `δ < infDist(x, Oᶜ)` and +`‖y‖ ≤ δ`, then `x - y ∈ O`, since `x - y` lies in the ball `B(x, infDist(x, Oᶜ)) ⊆ O` +(Mathlib's `Metric.ball_infDist_compl_subset`). -/ +theorem sub_mem_of_lt_infDist_of_norm_le (O : Set V) {δ : ℝ} {x y : V} + (hx : x ∈ {x : V | δ < infDist x Oᶜ}) (hy : ‖y‖ ≤ δ) : x - y ∈ O := + ball_infDist_compl_subset (by + rw [mem_ball, dist_eq_norm, sub_sub_cancel_left, norm_neg] + exact hy.trans_lt hx) + +omit [FiniteDimensional ℝ V] [MeasurableSpace V] [BorelSpace V] in +/-- **Interior patches, the step condition**: steps of length at most `δ / L` take +`{infDist(·, Oᶜ) > δ}` into `O_{L h}`. -/ +theorem interior_patch_step (O : Set V) {L : ℕ} {δ : ℝ} {h : V} (hh : L * ‖h‖ ≤ δ) : + {x : V | δ < infDist x Oᶜ} ⊆ stepSet O L h := by + intro x hx l hl + by_contra hmem + have h1 : infDist x Oᶜ ≤ dist x (x + (l : ℝ) • h) := infDist_le_dist_of_mem hmem + have hl' : (l : ℝ) ≤ L := by exact_mod_cast hl + have h2 : dist x (x + (l : ℝ) • h) ≤ δ := by + rw [dist_eq_norm, sub_add_cancel_left, norm_neg, norm_smul, + Real.norm_of_nonneg (Nat.cast_nonneg l)] + exact (mul_le_mul_of_nonneg_right hl' (norm_nonneg h)).trans hh + simp only [Set.mem_ofPred_eq] at hx + linarith + +omit [InnerProductSpace ℝ V] [FiniteDimensional ℝ V] in +/-- The sets `{infDist(·, Oᶜ) > δ}` are measurable. -/ +theorem measurableSet_infDist_gt (O : Set V) (δ : ℝ) : + MeasurableSet {x : V | δ < infDist x Oᶜ} := + (isOpen_lt continuous_const (continuous_infDist_pt _)).measurableSet + +/-! ### Local means and moduli on a set -/ + +namespace LocalMeansBump + +variable (b : LocalMeansBump V) + +/-- `‖1_W (k_0 ⋆ f)‖_p ≤ ‖m‖_1 ‖f‖_p`. -/ +theorem enorm_indicatorLp_localMean_zero_le (hp : p ≠ ∞) {W : Set V} (hW : MeasurableSet W) + (L : ℕ) (f : Lp ℂ p (volume : Measure V)) : + ‖indicatorLp hW (b.localMean hp L 0 f)‖ₑ ≤ + eLpNorm (momentKernel b.toFun L) 1 volume * ‖f‖ₑ := + (enorm_indicatorLp_le hW _).trans (b.enorm_localMean_zero_le hp L f) + +/-- **The local means on `W` are bounded by the moduli on `T`**: +`‖(2^(js) ‖1_W (k_j ⋆ f)‖_p)_j‖_{ℓ_q} ≤ +(‖m‖_1 + 2 ‖g‖_1) (‖f‖_p + ‖(2^(js) ω_L(f, 2^(-j), T)_p)_j‖_{ℓ_q})` +(`ENNReal.lqNorm_dyadicWeight_le_of_head_of_succ_le`). -/ +theorem localNormOn_le (hp : p ≠ ∞) {W T : Set V} (hW : MeasurableSet W) (L : ℕ) (s : ℝ) + {q : ℝ≥0∞} (hq : 1 ≤ q) + (hstep : ∀ c : ℝ, 1 ≤ c → ∀ z, b.toFun z ≠ 0 → W ⊆ stepSet T L (-c⁻¹ • z)) + (hR : b.radius ≤ 1 / 2) (f : Lp ℂ p (volume : Measure V)) : + b.localNormOn hp hW L s q f ≤ + (eLpNorm (momentKernel b.toFun L) 1 volume + 2 * ∫⁻ z, ‖b.toFun z‖ₑ) * + (‖f‖ₑ + lqNorm q (fun j => dyadicWeight s j * lpModulusOn p T L f j)) := + ENNReal.lqNorm_dyadicWeight_le_of_head_of_succ_le hq s + (fun j => ‖indicatorLp hW (b.localMean hp L j f)‖ₑ) (lpModulusOn p T L f) + (b.enorm_indicatorLp_localMean_zero_le hp hW L f) + fun j => b.enorm_indicatorLp_localMean_succ_le hp hW L j hstep hR f + +/-- The **constant of the local extension** `C_b(L, s) (‖m‖_1 + 2 ‖g‖_1)`, for the moment kernel +`m` of the bump `g`: the constant of the synthesis estimate (`Rd.LocalMeansBump.synthConst`) times +that of `Rd.LocalMeansBump.localNormOn_le`. -/ +noncomputable def localExtConst (L : ℕ) (s : ℝ) : ℝ≥0∞ := + b.synthConst L s * (eLpNorm (momentKernel b.toFun L) 1 volume + 2 * ∫⁻ z, ‖b.toFun z‖ₑ) + +/-- The constant of the local extension is finite for `0 < s < L`. -/ +theorem localExtConst_ne_top {L : ℕ} {s : ℝ} (hs : 0 < s) (hsL : s < L) : + b.localExtConst L s ≠ ∞ := + ENNReal.mul_ne_top (b.synthConst_ne_top hs hsL) (b.momentConst_ne_top L) + +/-- **The local extension theorem with a bound**: let `U ⊆ W`, `U ⊆ T` be measurable sets such +that the dual kernels at points of `U` only see `W` and the steps take `W` into `T`, and let the +bump have radius `R ≤ 1/2`. For `1 ≤ p < ∞`, `0 < s`, `1 ≤ q ≤ ∞` and `f` with +`N_T(f) = ‖f‖_{L_p(T)} + ‖(2^(ks) ω_L(f, 2^(-k), T)_p)_k‖_{ℓ_q} < ∞` there is `F` with +`F = f` almost everywhere on `U` and +`‖F‖_p + ‖(2^(ks) ω_L(F, 2^(-k))_p)_k‖_{ℓ_q} ≤ C_b(L, s) (‖m‖_1 + 2 ‖g‖_1) N_T(f)` +(`Rd.LocalMeansBump.localExtConst`): the local extension of `1_T f` +(`Rd.LocalMeansBump.modNorm_localExtension_le`, `Rd.LocalMeansBump.localNormOn_le`). The constant +is finite for `s < L` (`Rd.LocalMeansBump.localExtConst_ne_top`); for `s ≥ L` the factor +`(1 - 2^(-(L - s)))⁻¹` of `Rd.LocalMeansBump.synthConst` is `∞`. -/ +theorem exists_local_extension_le (hp : p ≠ ∞) {L : ℕ} (hL : 1 ≤ L) {s : ℝ} (hs : 0 < s) + {q : ℝ≥0∞} (hq : 1 ≤ q) {U W T : Set V} (hU : MeasurableSet U) + (hW : MeasurableSet W) (hT : MeasurableSet T) (hUT : U ⊆ T) + (hUW : ∀ x ∈ U, ∀ j y, b.dual L j y ≠ 0 → x - y ∈ W) + (hstep : ∀ c : ℝ, 1 ≤ c → ∀ z, b.toFun z ≠ 0 → W ⊆ stepSet T L (-c⁻¹ • z)) + (hR : b.radius ≤ 1 / 2) (f : Lp ℂ p (volume : Measure V)) + (hf : modNormOn hT L s q f < ∞) : + ∃ F : Lp ℂ p (volume : Measure V), + ‖F‖ₑ + lqNorm q (fun k => dyadicWeight s k * lpModulus p L F k) ≤ + b.localExtConst L s * modNormOn hT L s q f ∧ + indicatorLp hU F = indicatorLp hU f := by + set f' := indicatorLp hT f + have hae : T.indicator f' =ᵐ[volume] T.indicator f := by + filter_upwards [indicatorLp_apply_ae hT f] with x hx + by_cases hxT : x ∈ T + · rw [Set.indicator_of_mem hxT, Set.indicator_of_mem hxT, hx, Set.indicator_of_mem hxT] + · rw [Set.indicator_of_notMem hxT, Set.indicator_of_notMem hxT] + have hmod : ∀ k, lpModulusOn p T L f' k = lpModulusOn p T L f k := fun k => + lpModulusOn_congr hae L k + have hle : b.localNormOn hp hW L s q f' ≤ + (eLpNorm (momentKernel b.toFun L) 1 volume + 2 * ∫⁻ z, ‖b.toFun z‖ₑ) * + (‖f'‖ₑ + lqNorm q (fun k => dyadicWeight s k * lpModulusOn p T L f k)) := by + have h := b.localNormOn_le hp hW L s hq hstep hR f' + simp_rw [hmod] at h + exact h + have hfin : b.localNormOn hp hW L s q f' < ∞ := + hle.trans_lt (ENNReal.mul_lt_top (b.momentConst_ne_top L).lt_top hf) + refine ⟨b.localExtension hp hW L f', (b.modNorm_localExtension_le hp hW L hs hq hfin).trans ?_, + ?_⟩ + · rw [localExtConst, mul_assoc] + exact mul_le_mul' le_rfl hle + rw [b.indicatorLp_localExtension hp hL hU hW hUW hs hq hfin] + refine Lp.ext ?_ + filter_upwards [indicatorLp_apply_ae hU f', indicatorLp_apply_ae hU f, + indicatorLp_apply_ae hT f] with x h1 h2 h3 + rw [h1, h2] + by_cases hxU : x ∈ U + · rw [Set.indicator_of_mem hxU, Set.indicator_of_mem hxU, h3, Set.indicator_of_mem (hUT hxU)] + · rw [Set.indicator_of_notMem hxU, Set.indicator_of_notMem hxU] + +/-- **The local extension theorem**: let `U ⊆ W`, `U ⊆ T` be measurable sets such that the dual +kernels at points of `U` only see `W` and the steps take `W` into `T`, and let the bump have +radius `R ≤ 1/2`. For `1 ≤ p < ∞`, `0 < s < L`, `1 ≤ q ≤ ∞` and `f` with +`‖f‖_{L_p(T)} + ‖(2^(ks) ω_L(f, 2^(-k), T)_p)_k‖_{ℓ_q} < ∞` there is `F` with a finite Besov +quasi-norm by differences on `V` and `F = f` almost everywhere on `U` +(`Rd.LocalMeansBump.exists_local_extension_le`). -/ +theorem exists_local_extension (hp : p ≠ ∞) {L : ℕ} (hL : 1 ≤ L) {s : ℝ} (hs : 0 < s) + (hsL : s < L) {q : ℝ≥0∞} (hq : 1 ≤ q) {U W T : Set V} (hU : MeasurableSet U) + (hW : MeasurableSet W) (hT : MeasurableSet T) (hUT : U ⊆ T) + (hUW : ∀ x ∈ U, ∀ j y, b.dual L j y ≠ 0 → x - y ∈ W) + (hstep : ∀ c : ℝ, 1 ≤ c → ∀ z, b.toFun z ≠ 0 → W ⊆ stepSet T L (-c⁻¹ • z)) + (hR : b.radius ≤ 1 / 2) (f : Lp ℂ p (volume : Measure V)) + (hf : modNormOn hT L s q f < ∞) : + ∃ F : Lp ℂ p (volume : Measure V), + ‖F‖ₑ + lqNorm q (fun k => dyadicWeight s k * lpModulus p L F k) < ∞ ∧ + indicatorLp hU F = indicatorLp hU f := by + obtain ⟨F, hF, hFf⟩ := b.exists_local_extension_le hp hL hs hq hU hW hT hUT hUW hstep hR f hf + exact ⟨F, hF.trans_lt (ENNReal.mul_lt_top (b.localExtConst_ne_top hs hsL).lt_top hf), hFf⟩ + +end LocalMeansBump + +end Rd diff --git a/LeanPool/FunctionSpaces/Domains/Extension/ReflectionExtension.lean b/LeanPool/FunctionSpaces/Domains/Extension/ReflectionExtension.lean new file mode 100644 index 0000000000..8cd6b7a50f --- /dev/null +++ b/LeanPool/FunctionSpaces/Domains/Extension/ReflectionExtension.lean @@ -0,0 +1,688 @@ +/- +Copyright (c) 2026 Mario Ullrich. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Mario Ullrich +-/ +module + +public import LeanPool.FunctionSpaces.Domains.Extension.HalfSpaceReflection +public import LeanPool.FunctionSpaces.Domains.Extension.SobolevExtension +public import LeanPool.FunctionSpaces.Domains.Sobolev.LipschitzGraphGreen +public import LeanPool.FunctionSpaces.Domains.Lipschitz.GraphStraightening + +/- +Modified for Lean Pool: module names and imports adapted. +-/ + +/-! +# Extension by reflection + +Let `Ω = {x : φ(x) < ⟪x, e⟫}` be a Lipschitz graph domain (`Rd.LipschitzGraph`) with the +flattening `F(x) = x - φ(x) e` and its inverse `F⁻¹(y) = y + φ(y) e`. + +* **Flattening** (`Rd.LipschitzGraph.mapsTo_flatten`, + `Rd.LipschitzGraph.mapsTo_unflatten_inter_ball`): `F` maps `Ω` into the half-space + `H₊ = {⟪y, e⟫ > 0}` and `F⁻¹` maps `H₊ ∩ B(0, R)` into `Ω ∩ B(0, R')`. Both preserve Lebesgue + measure (`Rd.LipschitzGraph.measurePreserving_flatten`, + `Rd.LipschitzGraph.measurePreserving_unflatten`). +* **The extension by reflection** (`Rd.LipschitzGraph.reflectionExtension`): the even reflection + (`Rd.evenReflection`) of `f ∘ F⁻¹` across `e^⊥`, composed with `F`. It is `f` on `Ω` and + `f ∘ R` below the graph, for the graph reflection `R = F⁻¹ ∘ σ ∘ F` + (`Rd.LipschitzGraph.reflect_eq`). It is linear (`Rd.LipschitzGraph.reflectionExtensionLinearMap`) + and sees only the values on `Ω` (`Rd.LipschitzGraph.reflectionExtension_congr_ae`). If `f` and + its weak derivatives on `Ω` are integrable on the bounded parts of `Ω`, it is weakly + differentiable on `V` (`Rd.LipschitzGraph.hasWeakLineDeriv_reflectionExtension_of_integrableOn`, + by the chain rule `Rd.HasWeakLineDeriv.comp_lipschitzWith` for `F⁻¹` and for `F`); for + `1 ≤ p ≤ ∞` and `f ∈ W^1_p(Ω)`, with `‖E f‖_{L_p(V)} ≤ 2 ‖f‖_{L_p(Ω)}` and + `‖∂_v E f‖_{L_p(V)} ≤ 2 (1 + M)² ‖v‖ ∑_i ‖∂_{e_i} f‖_{L_p(Ω)}`. +* **Bounded Lipschitz domains**: a boundary patch extends by a cutoff + (`Rd.BoundedLipschitzDomain.hasWeakLineDeriv_mul_graph`) and the reflection in its graph domain + with the constant `Rd.reflectionConst` + (`Rd.BoundedLipschitzDomain.exists_hasWeakLineDeriv_reflectionExtension_mul`), the inner patch + by a cutoff (`Rd.BoundedLipschitzDomain.exists_hasWeakLineDeriv_mul_interior`). These bounds + give the extension operator by reflection and with it the extension theorem for every + `1 ≤ p ≤ ∞` (Evans–Gariepy, Section 4.4), in + `FunctionSpaces.Domains.Extension.ReflectionExtensionOperator`. +-/ + +@[expose] public section + +open MeasureTheory Filter Topology TopologicalSpace Module Set Metric +open scoped ENNReal NNReal LineDeriv + +namespace Rd + +namespace LipschitzGraph + +/-! ### Flattening a Lipschitz graph domain -/ + +section Flattening + +variable {V : Type*} [NormedAddCommGroup V] [InnerProductSpace ℝ V] (Ω : LipschitzGraph V) + +/-- **The flattening maps the domain into the half-space** `H₊ = {⟪y, e⟫ > 0}` +(`Rd.LipschitzGraph.inner_flatten`). -/ +theorem mapsTo_flatten : MapsTo Ω.flatten Ω.domain (openHalfSpace Ω.e) := fun x hx => by + have hx' : Ω.phi x < inner ℝ x Ω.e := hx + change 0 < inner ℝ (Ω.flatten x) Ω.e + rw [Ω.inner_flatten] + linarith + +/-- **The inverse flattening maps the half-space into the domain**: `⟪y, e⟫ > 0` gives +`y + φ(y) e ∈ Ω`, since its flattening is `y`. -/ +theorem mapsTo_unflatten : MapsTo Ω.unflatten (openHalfSpace Ω.e) Ω.domain := fun y hy => by + have h := Ω.inner_flatten (Ω.unflatten y) + rw [Ω.flatten_unflatten] at h + have hy' : 0 < inner ℝ y Ω.e := hy + change Ω.phi (Ω.unflatten y) < inner ℝ (Ω.unflatten y) Ω.e + linarith + +/-- **The inverse flattening on bounded parts**: `F⁻¹` maps `H₊ ∩ B(0, R)` into +`Ω ∩ B(0, ‖F⁻¹ 0‖ + (1 + M) R)`, since it is `(1 + M)`-Lipschitz (Mathlib's +`LipschitzWith.mapsTo_ball`). -/ +theorem mapsTo_unflatten_inter_ball (R : ℝ) : + MapsTo Ω.unflatten ((openHalfSpace Ω.e : Set V) ∩ ball 0 R) + (Ω.domain ∩ ball 0 (‖Ω.unflatten 0‖ + (1 + Ω.M) * R)) := fun y hy => by + have hK : (⟨1 + Ω.M, add_nonneg zero_le_one Ω.M_nonneg⟩ : ℝ≥0) ≠ 0 := fun h => by + have h' : (1 + Ω.M : ℝ) = ((0 : ℝ≥0) : ℝ) := congrArg NNReal.toReal h + rw [NNReal.coe_zero] at h' + linarith [Ω.M_nonneg] + refine ⟨Ω.mapsTo_unflatten hy.1, ball_subset_ball' ?_ + (Ω.lipschitzWith_unflatten.mapsTo_ball hK 0 R hy.2)⟩ + change (1 + Ω.M) * R + dist (Ω.unflatten 0) 0 ≤ ‖Ω.unflatten 0‖ + (1 + Ω.M) * R + rw [dist_zero_right, add_comm] + +end Flattening + +/-! ### The reflection across the graph -/ + +section Reflection + +variable {V : Type*} [NormedAddCommGroup V] [InnerProductSpace ℝ V] (Ω : LipschitzGraph V) + +/-- The **reflection across the graph** `x ↦ x + 2(φ(x) - ⟪x, e⟫) e`: it moves `x` along `e` to the +point at the same distance on the other side of the graph. -/ +def reflect (x : V) : V := x + (2 * (Ω.phi x - inner ℝ x Ω.e)) • Ω.e + +/-- **The graph reflection in flat coordinates**: it is the reflection `σ` across the hyperplane +`e^⊥` after the flattening, followed by the inverse flattening. -/ +theorem reflect_eq : Ω.reflect = Ω.unflatten ∘ halfSpaceReflection Ω.e ∘ Ω.flatten := by + funext x + simp only [Function.comp_apply, reflect, unflatten] + rw [halfSpaceReflection_apply Ω.norm_e, Ω.inner_flatten] + have hφ : Ω.phi (Ω.flatten x - (2 * (inner ℝ x Ω.e - Ω.phi x)) • Ω.e) = Ω.phi x := by + rw [Ω.phi_sub_smul, flatten, Ω.phi_sub_smul] + rw [hφ, flatten] + module + +/-- The graph reflection is an involution. -/ +theorem reflect_reflect (x : V) : Ω.reflect (Ω.reflect x) = x := by + simp only [reflect_eq, Function.comp_apply, flatten_unflatten, + halfSpaceReflection_halfSpaceReflection, unflatten_flatten] + +/-- The **extension by reflection** of a function `u` on the graph domain `Ω`: the even reflection +(`Rd.evenReflection`) of `u ∘ F⁻¹` across `e^⊥` in the flat coordinates `F(x) = x - φ(x) e`, that +is `u` on `Ω` (`Rd.LipschitzGraph.reflectionExtension_of_mem`) and `u` after the graph reflection +below the graph (`Rd.LipschitzGraph.reflectionExtension_of_lt`). -/ +noncomputable def reflectionExtension (u : V → ℂ) : V → ℂ := + evenReflection Ω.e (u ∘ Ω.unflatten) ∘ Ω.flatten + +/-- On the graph domain the extension by reflection of `u` is `u`. -/ +theorem reflectionExtension_of_mem (u : V → ℂ) {x : V} (hx : x ∈ Ω.domain) : + Ω.reflectionExtension u x = u x := by + rw [reflectionExtension, Function.comp_apply, + evenReflection_of_mem Ω.norm_e _ (Ω.mapsTo_flatten hx), Function.comp_apply, + unflatten_flatten] + +/-- Below the graph, `⟪x, e⟫ < φ(x)`, the extension by reflection of `u` is `u` at the reflected +point. -/ +theorem reflectionExtension_of_lt (u : V → ℂ) {x : V} (hx : inner ℝ x Ω.e < Ω.phi x) : + Ω.reflectionExtension u x = u (Ω.reflect x) := by + have h : halfSpaceReflection Ω.e (Ω.flatten x) ∈ openHalfSpace Ω.e := by + change 0 < inner ℝ (halfSpaceReflection Ω.e (Ω.flatten x)) Ω.e + rw [inner_halfSpaceReflection Ω.norm_e, Ω.inner_flatten] + linarith + rw [reflectionExtension, Function.comp_apply, evenReflection_of_reflection_mem Ω.norm_e _ h, + reflect_eq] + rfl + +/-- The extension by reflection is additive (`Rd.evenReflection_add`). -/ +theorem reflectionExtension_add (u u' : V → ℂ) : + Ω.reflectionExtension (u + u') = Ω.reflectionExtension u + Ω.reflectionExtension u' := by + simp only [reflectionExtension] + rw [show (u + u') ∘ Ω.unflatten = u ∘ Ω.unflatten + u' ∘ Ω.unflatten from rfl, + evenReflection_add] + rfl + +/-- The extension by reflection is homogeneous (`Rd.evenReflection_smul`). -/ +theorem reflectionExtension_smul (c : ℂ) (u : V → ℂ) : + Ω.reflectionExtension (c • u) = c • Ω.reflectionExtension u := by + simp only [reflectionExtension] + rw [show (c • u) ∘ Ω.unflatten = c • (u ∘ Ω.unflatten) from rfl, evenReflection_smul] + rfl + +/-- **The extension by reflection as a linear map** on functions `V → ℂ`. -/ +noncomputable def reflectionExtensionLinearMap : (V → ℂ) →ₗ[ℂ] V → ℂ where + toFun := Ω.reflectionExtension + map_add' := Ω.reflectionExtension_add + map_smul' := Ω.reflectionExtension_smul + +/-- The linear map of the extension by reflection is the extension by reflection. -/ +theorem reflectionExtensionLinearMap_apply (u : V → ℂ) : + Ω.reflectionExtensionLinearMap u = Ω.reflectionExtension u := + rfl + +variable [FiniteDimensional ℝ V] [MeasurableSpace V] [BorelSpace V] + +/-- The graph reflection preserves the Lebesgue measure (`Rd.LipschitzGraph.reflect_eq`). -/ +theorem measurePreserving_reflect : MeasurePreserving Ω.reflect volume volume := by + rw [reflect_eq] + exact Ω.measurePreserving_unflatten.comp + ((measurePreserving_halfSpaceReflection Ω.e).comp Ω.measurePreserving_flatten) + +/-- **The extension by reflection sees only the values on the graph domain**: if `u = u'` almost +everywhere on the graph domain, then their extensions by reflection agree almost everywhere on +`V`, since the inverse flattening maps `H₊` into the graph domain and the flattening, its inverse +and `σ` preserve Lebesgue measure (Mathlib's +`MeasureTheory.QuasiMeasurePreserving.ae_eq_comp`). -/ +theorem reflectionExtension_congr_ae {u u' : V → ℂ} (h : u =ᵐ[volume.restrict Ω.domain] u') : + Ω.reflectionExtension u =ᵐ[volume] Ω.reflectionExtension u' := by + have hH := (openHalfSpace Ω.e).isOpen.measurableSet + have h1 : u ∘ Ω.unflatten =ᵐ[volume.restrict (openHalfSpace Ω.e)] u' ∘ Ω.unflatten := by + refine (ae_restrict_iff' hH).2 ?_ + filter_upwards [Ω.measurePreserving_unflatten.quasiMeasurePreserving.ae + ((ae_restrict_iff' Ω.measurableSet_domain).1 h)] with y hy hyH + exact hy (Ω.mapsTo_unflatten hyH) + have h2 := (ae_eq_restrict_iff_indicator_ae_eq hH).1 h1 + have h3 : evenReflection Ω.e (u ∘ Ω.unflatten) =ᵐ[volume] + evenReflection Ω.e (u' ∘ Ω.unflatten) := + h2.add ((measurePreserving_halfSpaceReflection Ω.e).quasiMeasurePreserving.ae_eq_comp h2) + exact Ω.measurePreserving_flatten.quasiMeasurePreserving.ae_eq_comp h3 + +end Reflection + +/-! ### The weak derivatives of the extension by reflection -/ + +section Derivatives + +variable {V : Type*} [NormedAddCommGroup V] [InnerProductSpace ℝ V] [FiniteDimensional ℝ V] + (Ω : LipschitzGraph V) + +/-- The **derivative in flat coordinates**: for the derivatives `g_i = ∂_{e_i} f` on `Ω`, the +function `y ↦ ∑_i ⟪DF⁻¹(y) w, e_i⟫ g_i(F⁻¹ y)` with the inverse flattening `F⁻¹(y) = y + φ(y) e`; +it is the weak derivative `∂_w (f ∘ F⁻¹)` on `H₊` +(`Rd.LipschitzGraph.hasWeakLineDeriv_comp_unflatten`). -/ +noncomputable def flatDeriv (g : Fin (finrank ℝ V) → V → ℂ) (w y : V) : ℂ := + ∑ i, (inner ℝ (fderiv ℝ Ω.unflatten y w) (gridBasis V i) : ℂ) * g i (Ω.unflatten y) + +variable {g : Fin (finrank ℝ V) → V → ℂ} + +/-- The derivative in flat coordinates is linear in the direction: +`D_{∑ c_k w_k} = ∑_k c_k D_{w_k}`. -/ +theorem flatDeriv_sum_smul {ι : Type*} (s : Finset ι) (c : ι → ℝ) (w : ι → V) (y : V) : + Ω.flatDeriv g (∑ k ∈ s, c k • w k) y = ∑ k ∈ s, (c k : ℂ) * Ω.flatDeriv g (w k) y := by + simp only [flatDeriv, map_sum, map_smul, sum_inner, real_inner_smul_left, Complex.ofReal_sum, + Complex.ofReal_mul, Finset.sum_mul, Finset.mul_sum] + rw [Finset.sum_comm] + exact Finset.sum_congr rfl fun i _ => Finset.sum_congr rfl fun k _ => by ring + +/-- **The derivative in flat coordinates through the basis**: for a linear map `T`, +`∑_k ⟪a, e_k⟫ D_{T e_k} = D_{T a}`, since `a = ∑_k ⟪a, e_k⟫ e_k` (Mathlib's +`OrthonormalBasis.sum_repr'`). -/ +theorem sum_inner_mul_flatDeriv (T : V →ₗ[ℝ] V) (a y : V) : + ∑ k, (inner ℝ a (gridBasis V k) : ℂ) * Ω.flatDeriv g (T (gridBasis V k)) y = + Ω.flatDeriv g (T a) y := by + conv_rhs => rw [← (gridBasis V).sum_repr' a] + rw [map_sum] + simp_rw [map_smul] + rw [flatDeriv_sum_smul] + exact Finset.sum_congr rfl fun k _ => by rw [real_inner_comm] + +/-- **The pointwise bound of the derivative in flat coordinates**: +`|D_w(y)| ≤ (1 + M) ‖w‖ ∑_i |g_i(F⁻¹ y)|`, since `F⁻¹` is `(1 + M)`-Lipschitz (Mathlib's +`norm_fderiv_le_of_lipschitz`) and `‖e_i‖ = 1`. -/ +theorem norm_flatDeriv_le (w y : V) : + ‖Ω.flatDeriv g w y‖ ≤ (1 + Ω.M) * ‖w‖ * ∑ i, ‖g i (Ω.unflatten y)‖ := by + rw [flatDeriv, Finset.mul_sum] + refine (norm_sum_le _ _).trans (Finset.sum_le_sum fun i _ => ?_) + rw [norm_mul, Complex.norm_real] + gcongr + calc ‖inner ℝ (fderiv ℝ Ω.unflatten y w) (gridBasis V i)‖ + ≤ ‖fderiv ℝ Ω.unflatten y w‖ * ‖gridBasis V i‖ := norm_inner_le_norm _ _ + _ = ‖fderiv ℝ Ω.unflatten y w‖ := by rw [(gridBasis V).orthonormal.1 i, mul_one] + _ ≤ ‖fderiv ℝ Ω.unflatten y‖ * ‖w‖ := (fderiv ℝ Ω.unflatten y).le_opNorm w + _ ≤ (1 + Ω.M) * ‖w‖ := by + gcongr + exact norm_fderiv_le_of_lipschitz ℝ Ω.lipschitzWith_unflatten + +/-- The **derivative of the extension by reflection** along `v`: with `a = DF(x) v` for the +flattening `F`, `x ↦ 1_{H₊}(D_a)(F x) + 1_{H₊}(D_{σ a})(σ F x)`, where `D_w` is the derivative in +flat coordinates (`Rd.LipschitzGraph.flatDeriv`) and `σ` the reflection across `e^⊥`. It is the +weak derivative `∂_v` of the extension by reflection on `V` +(`Rd.LipschitzGraph.hasWeakLineDeriv_reflectionExtension`). -/ +noncomputable def reflectionDeriv (g : Fin (finrank ℝ V) → V → ℂ) (v x : V) : ℂ := + (openHalfSpace Ω.e : Set V).indicator (Ω.flatDeriv g (fderiv ℝ Ω.flatten x v)) (Ω.flatten x) + + (openHalfSpace Ω.e : Set V).indicator + (Ω.flatDeriv g (halfSpaceReflection Ω.e (fderiv ℝ Ω.flatten x v))) + (halfSpaceReflection Ω.e (Ω.flatten x)) + +/-- **The chain rule collapses the basis sum**: for every `a` and `y`, +`∑_k ⟪a, e_k⟫ (1_{H₊}(D_{e_k})(y) + 1_{H₊}(D_{σ e_k})(σ y)) = 1_{H₊}(D_a)(y) + 1_{H₊}(D_{σ a})(σ y)` +(`Rd.LipschitzGraph.sum_inner_mul_flatDeriv` for the identity and for `σ`). -/ +theorem sum_inner_mul_indicator_flatDeriv (a y : V) : + ∑ k, (inner ℝ a (gridBasis V k) : ℂ) * + ((openHalfSpace Ω.e : Set V).indicator (Ω.flatDeriv g (gridBasis V k)) y + + (openHalfSpace Ω.e : Set V).indicator + (Ω.flatDeriv g (halfSpaceReflection Ω.e (gridBasis V k))) (halfSpaceReflection Ω.e y)) = + (openHalfSpace Ω.e : Set V).indicator (Ω.flatDeriv g a) y + + (openHalfSpace Ω.e : Set V).indicator (Ω.flatDeriv g (halfSpaceReflection Ω.e a)) + (halfSpaceReflection Ω.e y) := by + have hind : ∀ (T : V →ₗ[ℝ] V) (z : V), ∑ k, (inner ℝ a (gridBasis V k) : ℂ) * + (openHalfSpace Ω.e : Set V).indicator (Ω.flatDeriv g (T (gridBasis V k))) z = + (openHalfSpace Ω.e : Set V).indicator (Ω.flatDeriv g (T a)) z := fun T z => by + by_cases hz : z ∈ (openHalfSpace Ω.e : Set V) + · simp only [indicator_of_mem hz] + exact Ω.sum_inner_mul_flatDeriv T a z + · simp only [indicator_of_notMem hz, mul_zero, Finset.sum_const_zero] + have h1 := hind LinearMap.id y + have h2 := hind (halfSpaceReflection Ω.e).toLinearEquiv.toLinearMap (halfSpaceReflection Ω.e y) + simp only [LinearMap.id_apply, LinearEquiv.coe_coe, LinearIsometryEquiv.coe_toLinearEquiv] + at h1 h2 + simp only [mul_add, Finset.sum_add_distrib] + rw [h1, h2] + +/-- **The pointwise bound of the reflection derivative**: with `S(y) = ∑_i |g_i(F⁻¹ y)|`, +`|∂_v E(x)| ≤ (1 + M)² ‖v‖ (1_{H₊}(S)(F x) + 1_{H₊}(S)(σ F x))`, since `‖DF(x) v‖ ≤ (1 + M) ‖v‖`, +`σ` preserves norms and `Rd.LipschitzGraph.norm_flatDeriv_le`. -/ +theorem norm_reflectionDeriv_le (v x : V) : + ‖Ω.reflectionDeriv g v x‖ ≤ (1 + Ω.M) ^ 2 * ‖v‖ * + ((openHalfSpace Ω.e : Set V).indicator (fun y => ∑ i, ‖g i (Ω.unflatten y)‖) (Ω.flatten x) + + (openHalfSpace Ω.e : Set V).indicator (fun y => ∑ i, ‖g i (Ω.unflatten y)‖) + (halfSpaceReflection Ω.e (Ω.flatten x))) := by + have hM : 0 ≤ 1 + Ω.M := add_nonneg zero_le_one Ω.M_nonneg + have hA : ‖fderiv ℝ Ω.flatten x v‖ ≤ (1 + Ω.M) * ‖v‖ := + ((fderiv ℝ Ω.flatten x).le_opNorm v).trans + (mul_le_mul_of_nonneg_right (norm_fderiv_le_of_lipschitz ℝ Ω.lipschitzWith_flatten) + (norm_nonneg v)) + have hb : ∀ w y : V, ‖w‖ ≤ (1 + Ω.M) * ‖v‖ → + ‖(openHalfSpace Ω.e : Set V).indicator (Ω.flatDeriv g w) y‖ ≤ (1 + Ω.M) ^ 2 * ‖v‖ * + (openHalfSpace Ω.e : Set V).indicator (fun y => ∑ i, ‖g i (Ω.unflatten y)‖) y := by + intro w y hw + by_cases hy : y ∈ (openHalfSpace Ω.e : Set V) + · rw [indicator_of_mem hy, indicator_of_mem hy] + calc _ ≤ (1 + Ω.M) * ‖w‖ * ∑ i, ‖g i (Ω.unflatten y)‖ := Ω.norm_flatDeriv_le w y + _ ≤ (1 + Ω.M) * ((1 + Ω.M) * ‖v‖) * ∑ i, ‖g i (Ω.unflatten y)‖ := + mul_le_mul_of_nonneg_right (mul_le_mul_of_nonneg_left hw hM) + (Finset.sum_nonneg fun i _ => norm_nonneg _) + _ = _ := by ring + · rw [indicator_of_notMem hy, indicator_of_notMem hy, norm_zero, mul_zero] + rw [reflectionDeriv, mul_add] + refine (norm_add_le _ _).trans (add_le_add (hb _ _ hA) (hb _ _ ?_)) + rwa [LinearIsometryEquiv.norm_map] + +variable [MeasurableSpace V] [BorelSpace V] + +/-- **Weak derivatives in flat coordinates**: if `g_i = ∂_{e_i} f` weakly on `Ω`, then the +derivative in flat coordinates `Rd.LipschitzGraph.flatDeriv` is the weak derivative +`∂_w (f ∘ F⁻¹)` on `H₊` (the chain rule `Rd.HasWeakLineDeriv.comp_lipschitzWith` for the +measure-preserving Lipschitz map `F⁻¹`). -/ +theorem hasWeakLineDeriv_comp_unflatten {f : V → ℂ} + (hfg : ∀ i, HasWeakLineDeriv Ω.toOpens (fun _ : Fin 1 => gridBasis V i) f (g i)) (w : V) : + HasWeakLineDeriv (openHalfSpace Ω.e) (fun _ : Fin 1 => w) (f ∘ Ω.unflatten) + (Ω.flatDeriv g w) := + HasWeakLineDeriv.comp_lipschitzWith hfg Ω.lipschitzWith_unflatten Ω.measurePreserving_unflatten + Ω.mapsTo_unflatten w + +/-- **The `L_p` bound in flat coordinates**: for `1 ≤ p`, +`‖D_w‖_{L_p(H₊)} ≤ (1 + M) ‖w‖ ∑_i ‖g_i‖_{L_p(Ω)}` (`Rd.eLpNorm_sum_inner_fderiv_mul_comp_le`). -/ +theorem eLpNorm_flatDeriv_le {p : ℝ≥0∞} (hp : 1 ≤ p) (w : V) : + eLpNorm (Ω.flatDeriv g w) p (volume.restrict (openHalfSpace Ω.e)) ≤ + ENNReal.ofReal (1 + Ω.M) * ‖w‖ₑ * ∑ i, eLpNorm (g i) p (volume.restrict Ω.domain) := by + have h := eLpNorm_sum_inner_fderiv_mul_comp_le hp Ω.lipschitzWith_unflatten + Ω.measurePreserving_unflatten Ω.measurableSet_domain Ω.mapsTo_unflatten w g + rwa [ENNReal.ofReal_eq_coe_nnreal (add_nonneg zero_le_one Ω.M_nonneg)] + +/-- **Functions in flat coordinates**: for `f ∈ L_p(Ω)`, `f ∘ F⁻¹ ∈ L_p(H₊)` with +`‖f ∘ F⁻¹‖_{L_p(H₊)} ≤ ‖f‖_{L_p(Ω)}` (`Rd.eLpNorm_comp_le_of_mapsTo`). -/ +theorem memLp_comp_unflatten {p : ℝ≥0∞} {f : V → ℂ} (hf : MemLp f p (volume.restrict Ω.domain)) : + MemLp (f ∘ Ω.unflatten) p (volume.restrict (openHalfSpace Ω.e)) := + memLp_iff.2 ((eLpNorm_comp_le_of_mapsTo Ω.measurePreserving_unflatten Ω.measurableSet_domain + Ω.mapsTo_unflatten p).trans_lt hf) + +/-- The derivatives in flat coordinates of `L_p` derivatives lie in `L_p(H₊)` +(`Rd.LipschitzGraph.eLpNorm_flatDeriv_le`). -/ +theorem memLp_flatDeriv {p : ℝ≥0∞} (hp : 1 ≤ p) + (hg : ∀ i, MemLp (g i) p (volume.restrict Ω.domain)) (w : V) : + MemLp (Ω.flatDeriv g w) p (volume.restrict (openHalfSpace Ω.e)) := + memLp_iff.2 ((Ω.eLpNorm_flatDeriv_le hp w).trans_lt (ENNReal.mul_lt_top + (ENNReal.mul_lt_top ENNReal.ofReal_lt_top eNorm_lt_top) + (ENNReal.sum_lt_top.2 fun i _ => hg i))) + +/-- **Functions in flat coordinates on bounded parts**: if `f` is integrable on every bounded part +`Ω ∩ B(0, R)` of `Ω`, then `f ∘ F⁻¹` is integrable on every bounded part `H₊ ∩ B(0, R)` of `H₊` +(`Rd.LipschitzGraph.mapsTo_unflatten_inter_ball`, `Rd.eLpNorm_comp_le_of_mapsTo`). -/ +theorem integrableOn_comp_unflatten_inter_ball {f : V → ℂ} + (hf : ∀ R, IntegrableOn f (Ω.domain ∩ ball 0 R)) (R : ℝ) : + IntegrableOn (f ∘ Ω.unflatten) ((openHalfSpace Ω.e : Set V) ∩ ball 0 R) := + memLp_one_iff_integrable.1 (memLp_iff.2 ((eLpNorm_comp_le_of_mapsTo Ω.measurePreserving_unflatten + (Ω.measurableSet_domain.inter measurableSet_ball) (Ω.mapsTo_unflatten_inter_ball R) 1).trans_lt + (memLp_one_iff_integrable.2 (hf _)).eLpNorm_lt_top)) + +/-- **Derivatives in flat coordinates on bounded parts**: if every `g_i` is integrable on every +bounded part `Ω ∩ B(0, R)` of `Ω`, then every `D_w` is integrable on every bounded part +`H₊ ∩ B(0, R)` of `H₊` (`Rd.eLpNorm_sum_inner_fderiv_mul_comp_le` for `p = 1`). -/ +theorem integrableOn_flatDeriv_inter_ball + (hg : ∀ i R, IntegrableOn (g i) (Ω.domain ∩ ball 0 R)) (w : V) (R : ℝ) : + IntegrableOn (Ω.flatDeriv g w) ((openHalfSpace Ω.e : Set V) ∩ ball 0 R) := by + have h := eLpNorm_sum_inner_fderiv_mul_comp_le le_rfl Ω.lipschitzWith_unflatten + Ω.measurePreserving_unflatten (Ω.measurableSet_domain.inter measurableSet_ball) + (Ω.mapsTo_unflatten_inter_ball R) w g + exact memLp_one_iff_integrable.1 (memLp_iff.2 (h.trans_lt (ENNReal.mul_lt_top + (ENNReal.mul_lt_top ENNReal.coe_lt_top eNorm_lt_top) + (ENNReal.sum_lt_top.2 fun i _ => (memLp_one_iff_integrable.2 (hg i _)).eLpNorm_lt_top)))) + +/-- **The extension by reflection is weakly differentiable** (Evans–Gariepy, Section 4.4): if +`g_i = ∂_{e_i} f` weakly on the graph domain `Ω` and `f` and the `g_i` are integrable on every +bounded part `Ω ∩ B(0, R)` of `Ω`, then for every `v ∈ V` the derivative +`Rd.LipschitzGraph.reflectionDeriv` is the weak derivative `∂_v` of the extension by reflection on +`V`. The chain rule for the inverse flattening +(`Rd.LipschitzGraph.hasWeakLineDeriv_comp_unflatten`), the even reflection on the half-space +(`Rd.hasWeakLineDeriv_evenReflection_of_forall`) and the chain rule for the flattening +(`Rd.HasWeakLineDeriv.comp_lipschitzWith`) give it as a basis sum, which collapses by +`Rd.LipschitzGraph.sum_inner_mul_indicator_flatDeriv`. -/ +theorem hasWeakLineDeriv_reflectionExtension_of_integrableOn {f : V → ℂ} + (hf : ∀ R, IntegrableOn f (Ω.domain ∩ ball 0 R)) + (hg : ∀ i R, IntegrableOn (g i) (Ω.domain ∩ ball 0 R)) + (hfg : ∀ i, HasWeakLineDeriv Ω.toOpens (fun _ : Fin 1 => gridBasis V i) f (g i)) (v : V) : + HasWeakLineDeriv ⊤ (fun _ : Fin 1 => v) (Ω.reflectionExtension f) (Ω.reflectionDeriv g v) := by + have hE : ∀ w, HasWeakLineDeriv ⊤ (fun _ : Fin 1 => w) (evenReflection Ω.e (f ∘ Ω.unflatten)) + (fun y => (openHalfSpace Ω.e : Set V).indicator (Ω.flatDeriv g w) y + + (openHalfSpace Ω.e : Set V).indicator (Ω.flatDeriv g (halfSpaceReflection Ω.e w)) + (halfSpaceReflection Ω.e y)) := fun w => + hasWeakLineDeriv_evenReflection_of_forall Ω.norm_e + (Ω.integrableOn_comp_unflatten_inter_ball hf) + (fun w => Ω.integrableOn_flatDeriv_inter_ball hg w) + (Ω.hasWeakLineDeriv_comp_unflatten hfg) w + have h := HasWeakLineDeriv.comp_lipschitzWith (O := ⊤) (U := ⊤) (fun k => hE (gridBasis V k)) + Ω.lipschitzWith_flatten Ω.measurePreserving_flatten (fun _ _ => trivial) v + exact h.congr_ae EventuallyEq.rfl (ae_of_all _ fun x => + Ω.sum_inner_mul_indicator_flatDeriv _ _) + +/-- **The extension by reflection of `W^1_p` functions**: for `1 ≤ p`, `f ∈ L_p(Ω)` with weak +derivatives `g_i = ∂_{e_i} f ∈ L_p(Ω)` on the graph domain `Ω`, and every `v ∈ V`, the derivative +`Rd.LipschitzGraph.reflectionDeriv` is the weak derivative `∂_v` of the extension by reflection on +`V` (`Rd.LipschitzGraph.hasWeakLineDeriv_reflectionExtension_of_integrableOn`; `L_p` functions are +integrable on the bounded parts, `Rd.integrableOn_inter_ball_of_memLp`). -/ +theorem hasWeakLineDeriv_reflectionExtension {p : ℝ≥0∞} (hp : 1 ≤ p) {f : V → ℂ} + (hf : MemLp f p (volume.restrict Ω.domain)) (hg : ∀ i, MemLp (g i) p (volume.restrict Ω.domain)) + (hfg : ∀ i, HasWeakLineDeriv Ω.toOpens (fun _ : Fin 1 => gridBasis V i) f (g i)) (v : V) : + HasWeakLineDeriv ⊤ (fun _ : Fin 1 => v) (Ω.reflectionExtension f) (Ω.reflectionDeriv g v) := + Ω.hasWeakLineDeriv_reflectionExtension_of_integrableOn (integrableOn_inter_ball_of_memLp hp hf) + (fun i => integrableOn_inter_ball_of_memLp hp (hg i)) hfg v + +/-- **The `L_p` norm of the extension by reflection**: `‖E f‖_{L_p(V)} ≤ 2 ‖f‖_{L_p(Ω)}` for +`1 ≤ p` (`Rd.eLpNorm_evenReflection_le`; the flattening and its inverse preserve Lebesgue +measure). -/ +theorem eLpNorm_reflectionExtension_le {p : ℝ≥0∞} (hp : 1 ≤ p) (f : V → ℂ) : + eLpNorm (Ω.reflectionExtension f) p volume ≤ 2 * eLpNorm f p (volume.restrict Ω.domain) := by + have h1 := eLpNorm_comp_le_of_mapsTo (h := evenReflection Ω.e (f ∘ Ω.unflatten)) (U := univ) + Ω.measurePreserving_flatten MeasurableSet.univ (mapsTo_univ _ _) p + rw [Measure.restrict_univ] at h1 + calc eLpNorm (Ω.reflectionExtension f) p volume + ≤ eLpNorm (evenReflection Ω.e (f ∘ Ω.unflatten)) p volume := h1 + _ ≤ 2 * eLpNorm (f ∘ Ω.unflatten) p (volume.restrict (openHalfSpace Ω.e)) := + eLpNorm_evenReflection_le hp _ + _ ≤ 2 * eLpNorm f p (volume.restrict Ω.domain) := by + gcongr + exact eLpNorm_comp_le_of_mapsTo Ω.measurePreserving_unflatten Ω.measurableSet_domain + Ω.mapsTo_unflatten p + +/-- The `L_p` norm of `y ↦ ∑_i |g_i(F⁻¹ y)|` on `H₊` is at most `∑_i ‖g_i‖_{L_p(Ω)}` for `1 ≤ p` +and `g_i ∈ L_p(Ω)` (Minkowski's inequality and `Rd.eLpNorm_comp_le_of_mapsTo`). -/ +theorem eLpNorm_sum_norm_comp_unflatten_le {p : ℝ≥0∞} (hp : 1 ≤ p) + (hg : ∀ i, MemLp (g i) p (volume.restrict Ω.domain)) : + eLpNorm (fun y => ∑ i, ‖g i (Ω.unflatten y)‖) p (volume.restrict (openHalfSpace Ω.e)) ≤ + ∑ i, eLpNorm (g i) p (volume.restrict Ω.domain) := by + have h1 := eLpNorm_comp_le_of_mapsTo (h := fun z => ∑ i, ‖g i z‖) Ω.measurePreserving_unflatten + Ω.measurableSet_domain Ω.mapsTo_unflatten p + have hfun : (fun z => ∑ i, ‖g i z‖) = ∑ i, fun z => ‖g i z‖ := by + funext z + simp [Finset.sum_apply] + refine h1.trans ?_ + rw [hfun] + refine (eLpNorm_sum_le hp).trans_eq (Finset.sum_congr rfl fun i _ => ?_) + exact eLpNorm_norm _ (hg i).aestronglyMeasurable + +/-- **The `L_p` bound of the reflection derivative**: for `1 ≤ p`, `f ∈ L_p(Ω)` with weak +derivatives `g_i = ∂_{e_i} f ∈ L_p(Ω)` on `Ω`, and every `v ∈ V`, the reflection derivative +`Rd.LipschitzGraph.reflectionDeriv g v` (the weak derivative `∂_v` of the extension by reflection) +satisfies `‖Rd.LipschitzGraph.reflectionDeriv g v‖_{L_p(V)} ≤ 2 (1 + M)² ‖v‖ ∑_i ‖g_i‖_{L_p(Ω)}`; +the hypotheses give its measurability. The proof uses the pointwise bound +`Rd.LipschitzGraph.norm_reflectionDeriv_le`, the measure-preserving flattening and +`Rd.eLpNorm_indicator_add_indicator_comp_halfSpaceReflection_le`. -/ +theorem eLpNorm_reflectionDeriv_le {p : ℝ≥0∞} (hp : 1 ≤ p) {f : V → ℂ} + (hf : MemLp f p (volume.restrict Ω.domain)) (hg : ∀ i, MemLp (g i) p (volume.restrict Ω.domain)) + (hfg : ∀ i, HasWeakLineDeriv Ω.toOpens (fun _ : Fin 1 => gridBasis V i) f (g i)) (v : V) : + eLpNorm (Ω.reflectionDeriv g v) p volume ≤ + 2 * ENNReal.ofReal ((1 + Ω.M) ^ 2) * ‖v‖ₑ * + ∑ i, eLpNorm (g i) p (volume.restrict Ω.domain) := by + have hm : AEStronglyMeasurable (Ω.reflectionDeriv g v) volume := + (Ω.hasWeakLineDeriv_reflectionExtension hp hf hg hfg + v).locallyIntegrable_deriv.aestronglyMeasurable + have hc : 0 ≤ (1 + Ω.M) ^ 2 * ‖v‖ := by positivity + set S : V → ℝ := fun y => ∑ i, ‖g i (Ω.unflatten y)‖ + set Ψ : V → ℝ := fun y => (openHalfSpace Ω.e : Set V).indicator S y + + (openHalfSpace Ω.e : Set V).indicator S (halfSpaceReflection Ω.e y) + have h1 := eLpNorm_comp_le_of_mapsTo (h := Ψ) (U := univ) + Ω.measurePreserving_flatten MeasurableSet.univ (mapsTo_univ _ _) p + rw [Measure.restrict_univ] at h1 + calc eLpNorm (Ω.reflectionDeriv g v) p volume + ≤ eLpNorm (((1 + Ω.M) ^ 2 * ‖v‖) • (Ψ ∘ Ω.flatten)) p volume := + eLpNorm_mono_real hm fun x => (Ω.norm_reflectionDeriv_le v x).trans_eq rfl + _ ≤ ‖(1 + Ω.M) ^ 2 * ‖v‖‖ₑ * eLpNorm Ψ p volume := + eLpNorm_const_smul_le.trans (by gcongr) + _ ≤ ‖(1 + Ω.M) ^ 2 * ‖v‖‖ₑ * (∑ i, eLpNorm (g i) p (volume.restrict Ω.domain) + + ∑ i, eLpNorm (g i) p (volume.restrict Ω.domain)) := by + gcongr + refine (eLpNorm_indicator_add_indicator_comp_halfSpaceReflection_le hp + (openHalfSpace Ω.e).isOpen.measurableSet S S).trans ?_ + gcongr <;> exact Ω.eLpNorm_sum_norm_comp_unflatten_le hp hg + _ = _ := by + rw [Real.eNorm_eq_ofReal hc, ENNReal.ofReal_mul (by positivity), ofReal_norm] + ring + +end Derivatives + +end LipschitzGraph + +/-! ### The patches of bounded Lipschitz domains -/ + +section BoundedDomains + +variable {V : Type*} [NormedAddCommGroup V] [InnerProductSpace ℝ V] [FiniteDimensional ℝ V] + [MeasurableSpace V] [BorelSpace V] {p : ℝ≥0∞} + +/-- **The arithmetic of the reflection bound**: if `a ≤ 2X` and `b_k ≤ K (Y + dX)` for all `k`, +then `a + ∑_k b_k ≤ (2 + N K (1 + d)) (X + Y)` with `N` the number of indices. -/ +theorem add_sum_le_of_le_two_mul {ι : Type*} [Fintype ι] {a X Y K d : ℝ≥0∞} {b : ι → ℝ≥0∞} + (ha : a ≤ 2 * X) (hb : ∀ k, b k ≤ K * (Y + d * X)) : + a + ∑ k, b k ≤ (2 + Fintype.card ι * K * (1 + d)) * (X + Y) := by + calc a + ∑ k, b k ≤ 2 * X + Fintype.card ι * (K * (Y + d * X)) := by + refine add_le_add ha ((Finset.sum_le_sum fun k _ => hb k).trans_eq ?_) + rw [Finset.sum_const, Finset.card_univ, nsmul_eq_mul] + _ ≤ (2 * X + Fintype.card ι * (K * (Y + d * X))) + + (2 * Y + Fintype.card ι * K * (X + d * Y)) := le_self_add + _ = _ := by ring + +/-- The **constant of the boundary patches by reflection**: `2 + 2 n (1 + M)² (1 + d)` for the +dimension `n`, the Lipschitz constant `M` of the graph and the sum `d` of the bounds of the +derivatives of the cutoff +(`Rd.BoundedLipschitzDomain.exists_hasWeakLineDeriv_reflectionExtension_mul`). -/ +noncomputable def reflectionConst (n : ℕ) (M : ℝ) (d : ℝ≥0∞) : ℝ≥0∞ := + 2 + n * (2 * ENNReal.ofReal ((1 + M) ^ 2)) * (1 + d) + +/-- The constant of the boundary patches by reflection is finite for finite `d`. -/ +theorem reflectionConst_ne_top (n : ℕ) (M : ℝ) {d : ℝ≥0∞} (hd : d ≠ ∞) : + reflectionConst n M d ≠ ∞ := by + simp [reflectionConst, ENNReal.mul_eq_top, hd] + +namespace BoundedLipschitzDomain + +variable (Ω : BoundedLipschitzDomain V) + +omit [FiniteDimensional ℝ V] [MeasurableSpace V] [BorelSpace V] in +/-- **The graph domain near a boundary ball lies in `Ω`**: `Ω_j ∩ B(c_j, ρ_j) ⊆ Ω` as open sets +(`Rd.BoundedLipschitzDomain.inter_ball_eq`). -/ +theorem graph_toOpens_inf_ball_le (j : Fin Ω.N) : + ((Ω.graph j).toOpens ⊓ ⟨ball (Ω.center j) (Ω.radius j), isOpen_ball⟩ : Opens V) ≤ + Ω.toOpens := fun x hx => by + have hx' : x ∈ (Ω.graph j).domain ∩ ball (Ω.center j) (Ω.radius j) := hx + rw [← Ω.inter_ball_eq j le_rfl] at hx' + exact hx'.1 + +/-- **Cutoffs carry weak derivatives from `Ω` to a graph domain**: if `g = ∂_w f` weakly on `Ω` +and the smooth `χ` has closed support in the boundary ball `B(c_j, ρ_j)`, then +`χ g + (∂_w χ) f = ∂_w (χ f)` weakly on the graph domain `Ω_j` +(`Rd.HasWeakLineDeriv.mul_of_tsupport_subset`, `Rd.BoundedLipschitzDomain.inter_ball_eq`). -/ +theorem hasWeakLineDeriv_mul_graph (j : Fin Ω.N) {χ : V → ℝ} + (hχ : ContDiff ℝ ((⊤ : ℕ∞) : WithTop ℕ∞) χ) + (hχB : tsupport χ ⊆ ball (Ω.center j) (Ω.radius j)) {w : V} {f g : V → ℂ} + (hfg : HasWeakLineDeriv Ω.toOpens (fun _ : Fin 1 => w) f g) : + HasWeakLineDeriv (Ω.graph j).toOpens (fun _ : Fin 1 => w) (fun x => (χ x : ℂ) * f x) + (fun x => (χ x : ℂ) * g x + (fderiv ℝ χ x w : ℂ) * f x) := + (hfg.mono (Ω.graph_toOpens_inf_ball_le j)).mul_of_tsupport_subset + (B := ⟨ball (Ω.center j) (Ω.radius j), isOpen_ball⟩) hχ hχB + +/-- **The `L_p` norm of a cutoff on a graph domain**: if `χ` is continuous with closed support in +the boundary ball `B(c_j, ρ_j)` and `|χ| ≤ C`, then `‖χ f‖_{L_p(Ω_j)} ≤ C ‖f‖_{L_p(Ω)}` for every +`f` and every `0 ≤ p ≤ ∞` (`Rd.eLpNorm_mul_le_of_tsupport_subset`). -/ +theorem eLpNorm_mul_graph_le (j : Fin Ω.N) {χ : V → ℝ} (hχ : Continuous χ) + (hχB : tsupport χ ⊆ ball (Ω.center j) (Ω.radius j)) {C : ℝ≥0} (hC : ∀ x, ‖χ x‖ ≤ C) + (f : V → ℂ) (p : ℝ≥0∞) : + eLpNorm (fun x => (χ x : ℂ) * f x) p (volume.restrict (Ω.graph j).domain) ≤ + C * eLpNorm f p (volume.restrict Ω.carrier) := + (eLpNorm_mul_le_of_tsupport_subset (O := (Ω.graph j).toOpens) + (B := ⟨ball (Ω.center j) (Ω.radius j), isOpen_ball⟩) hχ hχB hC).trans + (by gcongr; exact Ω.graph_toOpens_inf_ball_le j) + +/-- **The `L_p` norm of a cutoff derivative on a graph domain**: for `1 ≤ p`, a smooth `χ` with +closed support in the boundary ball `B(c_j, ρ_j)`, `|χ| ≤ C` and `|∂_w χ| ≤ C'`, +`‖χ g + (∂_w χ) f‖_{L_p(Ω_j)} ≤ C ‖g‖_{L_p(Ω)} + C' ‖f‖_{L_p(Ω)}` for all `f`, `g` +(`Rd.eLpNorm_mul_add_fderiv_mul_le`). -/ +theorem eLpNorm_mul_add_fderiv_mul_graph_le (j : Fin Ω.N) (hp : 1 ≤ p) {w : V} {f g : V → ℂ} + {χ : V → ℝ} (hχ : ContDiff ℝ ((⊤ : ℕ∞) : WithTop ℕ∞) χ) + (hχB : tsupport χ ⊆ ball (Ω.center j) (Ω.radius j)) {C C' : ℝ≥0} (hC : ∀ x, ‖χ x‖ ≤ C) + (hC' : ∀ x, ‖fderiv ℝ χ x w‖ ≤ C') : + eLpNorm (fun x => (χ x : ℂ) * g x + (fderiv ℝ χ x w : ℂ) * f x) p + (volume.restrict (Ω.graph j).domain) ≤ + C * eLpNorm g p (volume.restrict Ω.carrier) + C' * eLpNorm f p (volume.restrict Ω.carrier) := + (eLpNorm_mul_add_fderiv_mul_le (O := (Ω.graph j).toOpens) + (B := ⟨ball (Ω.center j) (Ω.radius j), isOpen_ball⟩) hp hχ hχB hC hC').trans (by + gcongr <;> exact Ω.graph_toOpens_inf_ball_le j) + +/-- **The extension by reflection of a cutoff on a boundary patch, with its bound**: for `1 ≤ p`, a +smooth `χ` with values in `[0, 1]`, closed support in the boundary ball `B(c_j, ρ_j)` and +`|∂_{e_i} χ| ≤ d_i`, and `f ∈ L_p(Ω)` with weak derivatives `g_i = ∂_{e_i} f ∈ L_p(Ω)` on `Ω`, the +extension by reflection `F` of `χ f` in the graph domain `Ω_j` has weak derivatives +`G_k = ∂_{e_k} F` on `V` with +`‖F‖_p + ∑_k ‖G_k‖_p ≤ C (‖f‖_{L_p(Ω)} + ∑_i ‖g_i‖_{L_p(Ω)})`, +`C = 2 + 2 n (1 + M_j)² (1 + ∑_i d_i)` (`Rd.reflectionConst`) with the Lipschitz constant `M_j` of +the graph of `Ω_j` +(`Rd.BoundedLipschitzDomain.hasWeakLineDeriv_mul_graph`, +`Rd.LipschitzGraph.hasWeakLineDeriv_reflectionExtension`, `Rd.add_sum_le_of_le_two_mul`). -/ +theorem exists_hasWeakLineDeriv_reflectionExtension_mul (j : Fin Ω.N) (hp : 1 ≤ p) {χ : V → ℝ} + (hχ : ContDiff ℝ ((⊤ : ℕ∞) : WithTop ℕ∞) χ) + (hχB : tsupport χ ⊆ ball (Ω.center j) (Ω.radius j)) (hχ01 : ∀ x, χ x ∈ Icc (0 : ℝ) 1) + {d : Fin (finrank ℝ V) → ℝ≥0} (hd : ∀ i x, ‖fderiv ℝ χ x (gridBasis V i)‖ ≤ d i) + {f : V → ℂ} {g : Fin (finrank ℝ V) → V → ℂ} (hf : MemLp f p (volume.restrict Ω.carrier)) + (hg : ∀ i, MemLp (g i) p (volume.restrict Ω.carrier)) + (hfg : ∀ i, HasWeakLineDeriv Ω.toOpens (fun _ : Fin 1 => gridBasis V i) f (g i)) : + ∃ G : Fin (finrank ℝ V) → V → ℂ, + (∀ k, HasWeakLineDeriv ⊤ (fun _ : Fin 1 => gridBasis V k) + ((Ω.graph j).reflectionExtension fun x => (χ x : ℂ) * f x) (G k)) ∧ + eLpNorm ((Ω.graph j).reflectionExtension fun x => (χ x : ℂ) * f x) p volume + + ∑ k, eLpNorm (G k) p volume ≤ + reflectionConst (finrank ℝ V) (Ω.graph j).M (∑ i, (d i : ℝ≥0∞)) * + (eLpNorm f p (volume.restrict Ω.carrier) + + ∑ i, eLpNorm (g i) p (volume.restrict Ω.carrier)) := by + have h1 : ∀ x, ‖χ x‖ ≤ ((1 : ℝ≥0) : ℝ) := fun x => + (norm_le_one_of_forall_mem_Icc hχ01 x).trans_eq NNReal.coe_one.symm + have hloc := fun i => Ω.hasWeakLineDeriv_mul_graph j hχ hχB (hfg i) + have hF0 : eLpNorm (fun x => (χ x : ℂ) * f x) p (volume.restrict (Ω.graph j).domain) ≤ + eLpNorm f p (volume.restrict Ω.carrier) := + (Ω.eLpNorm_mul_graph_le j hχ.continuous hχB h1 f p).trans_eq (by rw [ENNReal.coe_one, one_mul]) + have hG0 : ∀ i, eLpNorm (fun x => (χ x : ℂ) * g i x + (fderiv ℝ χ x (gridBasis V i) : ℂ) * f x) + p (volume.restrict (Ω.graph j).domain) ≤ eLpNorm (g i) p (volume.restrict Ω.carrier) + + d i * eLpNorm f p (volume.restrict Ω.carrier) := fun i => + (Ω.eLpNorm_mul_add_fderiv_mul_graph_le j hp hχ hχB h1 (hd i)).trans_eq + (by rw [ENNReal.coe_one, one_mul]) + have hmf : MemLp (fun x => (χ x : ℂ) * f x) p (volume.restrict (Ω.graph j).domain) := + memLp_iff.2 (hF0.trans_lt hf) + have hmg : ∀ i, MemLp (fun x => (χ x : ℂ) * g i x + (fderiv ℝ χ x (gridBasis V i) : ℂ) * f x) + p (volume.restrict (Ω.graph j).domain) := fun i => + memLp_iff.2 ((hG0 i).trans_lt (ENNReal.add_lt_top.2 ⟨hg i, ENNReal.mul_lt_top + ENNReal.coe_lt_top hf⟩)) + refine ⟨_, fun k => (Ω.graph j).hasWeakLineDeriv_reflectionExtension hp hmf hmg hloc + (gridBasis V k), ?_⟩ + calc _ ≤ (2 + Fintype.card (Fin (finrank ℝ V)) * (2 * ENNReal.ofReal ((1 + (Ω.graph j).M) ^ 2)) * + (1 + ∑ i, (d i : ℝ≥0∞))) * (eLpNorm f p (volume.restrict Ω.carrier) + + ∑ i, eLpNorm (g i) p (volume.restrict Ω.carrier)) := by + refine add_sum_le_of_le_two_mul + ((LipschitzGraph.eLpNorm_reflectionExtension_le _ hp _).trans (by gcongr)) fun k => ?_ + refine ((Ω.graph j).eLpNorm_reflectionDeriv_le hp hmf hmg hloc _).trans ?_ + rw [← ofReal_norm, (gridBasis V).orthonormal.1 k, ENNReal.ofReal_one, mul_one] + gcongr + calc _ ≤ ∑ i, (eLpNorm (g i) p (volume.restrict Ω.carrier) + + d i * eLpNorm f p (volume.restrict Ω.carrier)) := + Finset.sum_le_sum fun i _ => hG0 i + _ = _ := by rw [Finset.sum_add_distrib, Finset.sum_mul] + _ = _ := by rw [Fintype.card_fin]; rfl + +omit [FiniteDimensional ℝ V] [MeasurableSpace V] [BorelSpace V] in +/-- **The extension by reflection of a cutoff agrees with the function near the patch**: if +`χ = 1` near `B̄(c_j, ρ_j - 2ε)` with `ε ≥ 0`, then the extension by reflection of `χ f` in the +graph domain `Ω_j` is `f` on `Ω ∩ B(c_j, ρ_j - 2ε)`, a subset of `Ω_j` +(`Rd.BoundedLipschitzDomain.inter_ball_eq`, `Rd.LipschitzGraph.reflectionExtension_of_mem`). -/ +theorem reflectionExtension_mul_eq_of_mem (j : Fin Ω.N) {ε : ℝ} (hε : 0 ≤ ε) {χ : V → ℝ} + (hχ1 : ∀ᶠ x in 𝓝ˢ (closedBall (Ω.center j) (Ω.radius j - 2 * ε)), χ x = 1) (f : V → ℂ) + {x : V} (hx : x ∈ Ω.carrier ∩ ball (Ω.center j) (Ω.radius j - 2 * ε)) : + (Ω.graph j).reflectionExtension (fun x => (χ x : ℂ) * f x) x = f x := by + have hxG : x ∈ (Ω.graph j).domain := by + have hx' := hx + rw [Ω.inter_ball_eq j (by linarith)] at hx' + exact hx'.1 + rw [LipschitzGraph.reflectionExtension_of_mem _ _ hxG, + hχ1.self_of_nhdsSet x (ball_subset_closedBall hx.2), Complex.ofReal_one, one_mul] + +/-- **The cutoff of a function on the inner patch, with its bound**: for `1 ≤ p`, a smooth `χ` with +values in `[0, 1]`, compact closed support in `Ω`, `|∂_{e_i} χ| ≤ d_i` and `χ = 1` near +`{infDist(·, Ωᶜ) ≥ 2δ}`, and `f` with weak derivatives `g_i = ∂_{e_i} f` on `Ω`, the function +`χ f` has weak derivatives `G_i = ∂_{e_i} (χ f)` on `V`, equals `f` on +`{x ∈ Ω : infDist(x, Ωᶜ) > 2δ}`, and +`‖χ f‖_p + ∑_i ‖G_i‖_p ≤ (1 + ∑_i d_i) (‖f‖_{L_p(Ω)} + ∑_i ‖g_i‖_{L_p(Ω)})` +(`Rd.HasWeakLineDeriv.cutoff_top`, `Rd.eLpNorm_mul_add_sum_le_of_tsupport_subset`). -/ +theorem exists_hasWeakLineDeriv_mul_interior (hp : 1 ≤ p) {δ : ℝ} {χ : V → ℝ} + (hχ : ContDiff ℝ ((⊤ : ℕ∞) : WithTop ℕ∞) χ) (hχc : HasCompactSupport χ) + (hχΩ : tsupport χ ⊆ Ω.carrier) (hχ01 : ∀ x, χ x ∈ Icc (0 : ℝ) 1) + {d : Fin (finrank ℝ V) → ℝ≥0} (hd : ∀ i x, ‖fderiv ℝ χ x (gridBasis V i)‖ ≤ d i) + (hχ1 : ∀ᶠ x in 𝓝ˢ {x : V | 2 * δ ≤ infDist x Ω.carrierᶜ}, χ x = 1) {f : V → ℂ} + {g : Fin (finrank ℝ V) → V → ℂ} + (hfg : ∀ i, HasWeakLineDeriv Ω.toOpens (fun _ : Fin 1 => gridBasis V i) f (g i)) : + ∃ G : Fin (finrank ℝ V) → V → ℂ, + (∀ i, HasWeakLineDeriv ⊤ (fun _ : Fin 1 => gridBasis V i) (fun x => (χ x : ℂ) * f x) + (G i)) ∧ + (∀ x ∈ Ω.carrier ∩ {x : V | 2 * δ < infDist x Ω.carrierᶜ}, (χ x : ℂ) * f x = f x) ∧ + eLpNorm (fun x => (χ x : ℂ) * f x) p volume + ∑ i, eLpNorm (G i) p volume ≤ + (1 + ∑ i, (d i : ℝ≥0∞)) * (eLpNorm f p (volume.restrict Ω.carrier) + + ∑ i, eLpNorm (g i) p (volume.restrict Ω.carrier)) := by + refine ⟨fun i x => (χ x : ℂ) * g i x + (fderiv ℝ χ x (gridBasis V i) : ℂ) * f x, + fun i => ((hfg i).cutoff_top hχ hχc hχΩ).1, fun x hx => ?_, + eLpNorm_mul_add_sum_le_of_tsupport_subset (O := Ω.toOpens) hp hχ hχΩ hχ01 hd f g⟩ + rw [hχ1.self_of_nhdsSet x (le_of_lt hx.2 : 2 * δ ≤ infDist x Ω.carrierᶜ), Complex.ofReal_one, + one_mul] + +end BoundedLipschitzDomain + +end BoundedDomains + +end Rd diff --git a/LeanPool/FunctionSpaces/Domains/Extension/ReflectionExtensionOperator.lean b/LeanPool/FunctionSpaces/Domains/Extension/ReflectionExtensionOperator.lean new file mode 100644 index 0000000000..7790ed9c2f --- /dev/null +++ b/LeanPool/FunctionSpaces/Domains/Extension/ReflectionExtensionOperator.lean @@ -0,0 +1,433 @@ +/- +Copyright (c) 2026 Mario Ullrich. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Mario Ullrich +-/ +module + +public import LeanPool.FunctionSpaces.Domains.Extension.ReflectionExtension +public import LeanPool.FunctionSpaces.Domains.Extension.SobolevExtensionOperator + +/- +Modified for Lean Pool: module names and imports adapted. +-/ + +/-! +# The extension operator for `W^1_p` on bounded Lipschitz domains, by reflection + +Let `Ω` be a bounded Lipschitz domain in a finite-dimensional real inner product space `V` of +dimension `n ≥ 1`, and `1 ≤ p ≤ ∞`. There is a bounded linear operator `E` (built by reflection) +from the jets of `W^1_p(Ω)` to the jets of `W^1_p(V)` with `E u = u` on `Ω` +(`Rd.BoundedLipschitzDomain.sobolevExtensionL`, +`Rd.BoundedLipschitzDomain.restrictL_comp_sobolevExtensionL`), in the shape of TauCeti's +`W1p.exists_extensionL_of_isLipschitzDomainWith` (`Rd.BoundedLipschitzDomain.exists_extensionL`, +`Rd.exists_extensionL_of_isBoundedLipschitzDomain`). It is the chosen extension operator of the +project for every `1 ≤ p ≤ ∞`. + +* **Linear extensions of functions** (`Rd.IsSobolevExtensionMap`): a linear map on functions + `V → ℂ` that sees only the values on `O` and extends every Sobolev function on `O` from `U` with + the constant `C` is an extension operator on jets + (`Rd.IsSobolevExtensionMap.toSobolevExtensionOp`). +* **Bounded Lipschitz domains**: the boundary patches by a cutoff and reflection + (`Rd.LipschitzGraph.reflectionExtensionLinearMap`) and the inner patch by a cutoff are linear + extensions of functions (`Rd.BoundedLipschitzDomain.isSobolevExtensionMap_boundary_reflection`, + `Rd.BoundedLipschitzDomain.isSobolevExtensionMap_interior_cutoff`), and pasting gives an + extension operator from `Ω` (`Rd.BoundedLipschitzDomain.exists_sobolevExtensionOp_reflection`). +* **The extension theorem for `1 ≤ p ≤ ∞`** (Evans–Gariepy, Section 4.4): applied to single + functions, the operators extend from the patches + (`Rd.BoundedLipschitzDomain.exists_extendsSobolev_boundary_reflection`, + `Rd.BoundedLipschitzDomain.exists_extendsSobolev_interior_cutoff`) and from `Ω` with a bound + (`Rd.BoundedLipschitzDomain.exists_extendsSobolev_reflection`), so `W^1_p(Ω)` is the space of + restrictions of `W^1_p(V)` in every dimension + (`Rd.BoundedLipschitzDomain.memWeakSobolev_iff_exists_memSobolev`), and the value of + every jet of `W^1_p(Ω)` lies in `W^1_p(Ω)` + (`Rd.BoundedLipschitzDomain.memWeakSobolev_of_mem_weakSobolevJet`). +-/ + +@[expose] public section + +open MeasureTheory Filter Topology TopologicalSpace Module Set Metric +open scoped ENNReal NNReal + +namespace Rd + +/-! ### Linear extensions of functions -/ + +section LinearExtensions + +variable {V : Type*} [NormedAddCommGroup V] [InnerProductSpace ℝ V] [FiniteDimensional ℝ V] + [MeasurableSpace V] [BorelSpace V] {p : ℝ≥0∞} + +variable (p) in +/-- A **linear extension of Sobolev functions from `U` with constant `C`**: a complex linear map +`E` on functions `V → ℂ` such that `E f` depends only on the values of `f` on `O` up to null sets, +and every `f ∈ L_p(O)` with weak derivatives `g_i = ∂_{e_i} f ∈ L_p(O)` on `O` has an extension +`E f` with weak derivatives `G_i = ∂_{e_i} (E f)` on `V`, `E f = f` almost everywhere on `U`, and +`‖E f‖_p + ∑_i ‖G_i‖_p ≤ C (‖f‖_{L_p(O)} + ∑_i ‖g_i‖_{L_p(O)})`. -/ +structure IsSobolevExtensionMap (O : Opens V) (U : Set V) (C : ℝ≥0∞) + (E : (V → ℂ) →ₗ[ℂ] V → ℂ) : Prop where + /-- `E f` depends only on the values of `f` on `O`, up to null sets. -/ + ae_eq_of_ae_eq : ∀ f f' : V → ℂ, f =ᵐ[volume.restrict (O : Set V)] f' → E f =ᵐ[volume] E f' + /-- `E` extends Sobolev functions on `O` from `U` with the constant `C`. -/ + exists_hasWeakLineDeriv : ∀ (f : V → ℂ) (g : Fin (finrank ℝ V) → V → ℂ), + MemLp f p (volume.restrict (O : Set V)) → (∀ i, MemLp (g i) p (volume.restrict (O : Set V))) → + (∀ i, HasWeakLineDeriv O (fun _ : Fin 1 => gridBasis V i) f (g i)) → + ∃ G : Fin (finrank ℝ V) → V → ℂ, + (∀ i, HasWeakLineDeriv ⊤ (fun _ : Fin 1 => gridBasis V i) (E f) (G i)) ∧ + (∀ᵐ x ∂volume, x ∈ U → E f x = f x) ∧ + eLpNorm (E f) p volume + ∑ i, eLpNorm (G i) p volume ≤ + C * (eLpNorm f p (volume.restrict (O : Set V)) + + ∑ i, eLpNorm (g i) p (volume.restrict (O : Set V))) + +namespace IsSobolevExtensionMap + +variable [Fact (1 ≤ p)] {O : Opens V} {U : Set V} {C : ℝ≥0∞} {E : (V → ℂ) →ₗ[ℂ] V → ℂ} + +/-- **A linear extension of a jet**: for a jet `u = (f, (g_i)_i)` of `W^1_p(O)`, `E f` has weak +derivatives `G_i` on `V`, agrees with `f` on `U`, and +`‖E f‖_p + ∑_i ‖G_i‖_p ≤ C (‖f‖_{L_p(O)} + ∑_i ‖g_i‖_{L_p(O)})`. -/ +theorem exists_hasWeakLineDeriv_jet (hE : IsSobolevExtensionMap p O U C E) + (u : weakSobolevJet p O) : + ∃ G : Fin (finrank ℝ V) → V → ℂ, + (∀ i, HasWeakLineDeriv ⊤ (fun _ : Fin 1 => gridBasis V i) (E u.1.1) (G i)) ∧ + (∀ᵐ x ∂volume, x ∈ U → E u.1.1 x = u.1.1 x) ∧ + eLpNorm (E u.1.1) p volume + ∑ i, eLpNorm (G i) p volume ≤ + C * (‖u.1.1‖ₑ + ∑ i, ‖u.1.2 i‖ₑ) := by + obtain ⟨G, hG, hU, hb⟩ := hE.exists_hasWeakLineDeriv u.1.1 (fun i => u.1.2 i) (Lp.memLp _) + (fun i => Lp.memLp _) u.2 + exact ⟨G, hG, hU, by simpa only [Lp.eNorm_def] using hb⟩ + +/-- The linear extension of the value of a jet lies in `L_p(V)` for finite `C` +(`Rd.memLp_of_eLpNorm_add_sum_le`). -/ +theorem memLp_apply (hE : IsSobolevExtensionMap p O U C E) (hC : C ≠ ∞) + (u : weakSobolevJet p O) : MemLp (E u.1.1) p volume := by + obtain ⟨G, -, -, hb⟩ := hE.exists_hasWeakLineDeriv_jet u + exact (memLp_of_eLpNorm_add_sum_le hC (ENNReal.add_ne_top.2 ⟨eNorm_ne_top, + ENNReal.sum_ne_top.2 fun _ _ => eNorm_ne_top⟩) hb).1 + +/-- **The values of the extension of jets**: `u = (f, (g_i)_i) ↦ E f`, a linear map from the jets +of `W^1_p(O)` into `L_p(V)`; it is additive and homogeneous since `E` is linear and sees only the +classes of the values on `O`. -/ +noncomputable def valueMap (hE : IsSobolevExtensionMap p O U C E) (hC : C ≠ ∞) : + weakSobolevJet p O →ₗ[ℂ] Lp ℂ p (volume : Measure V) where + toFun u := (hE.memLp_apply hC u).toLp _ + map_add' u v := by + rw [← MemLp.toLp_add] + refine MemLp.toLp_congr _ _ ?_ + have h := hE.ae_eq_of_ae_eq _ _ (Lp.coeFn_add u.1.1 v.1.1) + rw [map_add] at h + exact h + map_smul' c u := by + rw [RingHom.id_apply, ← MemLp.toLp_const_smul] + refine MemLp.toLp_congr _ _ ?_ + have h := hE.ae_eq_of_ae_eq _ _ (Lp.coeFn_smul c u.1.1) + rw [map_smul] at h + exact h + +/-- The value map of a linear extension is the class of `E f`. -/ +theorem valueMap_apply (hE : IsSobolevExtensionMap p O U C E) (hC : C ≠ ∞) + (u : weakSobolevJet p O) : hE.valueMap hC u = (hE.memLp_apply hC u).toLp _ := + rfl + +/-- **The derivatives of the extension of a jet**: the derivatives `G_i` of +`Rd.IsSobolevExtensionMap.exists_hasWeakLineDeriv_jet` lie in `L_p(V)` and are the weak derivatives +`∂_{e_i}` of the value map on `V`, with +`‖F‖_p + ∑_i ‖G_i‖_p ≤ C (‖f‖_{L_p(O)} + ∑_i ‖g_i‖_{L_p(O)})` for the value `F` of the extension +of the jet `u = (f, (g_i)_i)`. -/ +theorem exists_hasWeakLineDeriv_valueMap (hE : IsSobolevExtensionMap p O U C E) (hC : C ≠ ∞) + (u : weakSobolevJet p O) : + ∃ G : Fin (finrank ℝ V) → Lp ℂ p (volume : Measure V), + (∀ i, HasWeakLineDeriv ⊤ (fun _ : Fin 1 => gridBasis V i) (hE.valueMap hC u) (G i)) ∧ + ‖hE.valueMap hC u‖ₑ + ∑ i, ‖G i‖ₑ ≤ C * (‖u.1.1‖ₑ + ∑ i, ‖u.1.2 i‖ₑ) := by + obtain ⟨G, hG, -, hb⟩ := hE.exists_hasWeakLineDeriv_jet u + have hm := memLp_of_eLpNorm_add_sum_le hC (ENNReal.add_ne_top.2 ⟨eNorm_ne_top, + ENNReal.sum_ne_top.2 fun _ _ => eNorm_ne_top⟩) hb + refine ⟨fun i => (hm.2 i).toLp (G i), fun i => (hG i).congr_ae ?_ ?_, ?_⟩ + · rw [volume_restrict_top, valueMap_apply] + exact (hE.memLp_apply hC u).coeFn_toLp.symm + · rw [volume_restrict_top] + exact (hm.2 i).coeFn_toLp.symm + · simpa only [valueMap_apply, Lp.eNorm_toLp] using hb + +/-- The value map of a linear extension agrees with the value of the jet almost everywhere on +`U`. -/ +theorem ae_valueMap_eq (hE : IsSobolevExtensionMap p O U C E) (hC : C ≠ ∞) + (u : weakSobolevJet p O) : ∀ᵐ x ∂volume, x ∈ U → hE.valueMap hC u x = u.1.1 x := by + obtain ⟨G, -, hU, -⟩ := hE.exists_hasWeakLineDeriv_jet u + filter_upwards [(hE.memLp_apply hC u).coeFn_toLp, hU] with x h1 h2 hx + rw [valueMap_apply, h1, h2 hx] + +/-- **The bound of the extension of jets**: for weak derivatives `G_i = ∂_{e_i} F ∈ L_p(V)` of the +value `F` of the extension of a jet `u = (f, (g_i)_i)`, +`‖F‖_p + ∑_i ‖G_i‖_p ≤ C (‖f‖_{L_p(O)} + ∑_i ‖g_i‖_{L_p(O)})`; the `G_i` are those of +`Rd.IsSobolevExtensionMap.exists_hasWeakLineDeriv_valueMap` (`Rd.HasWeakLineDeriv.eq_of_top`). -/ +theorem enorm_valueMap_add_le (hE : IsSobolevExtensionMap p O U C E) (hC : C ≠ ∞) + (u : weakSobolevJet p O) {G : Fin (finrank ℝ V) → Lp ℂ p (volume : Measure V)} + (hG : ∀ i, HasWeakLineDeriv ⊤ (fun _ : Fin 1 => gridBasis V i) (hE.valueMap hC u) (G i)) : + ‖hE.valueMap hC u‖ₑ + ∑ i, ‖G i‖ₑ ≤ C * (‖u.1.1‖ₑ + ∑ i, ‖u.1.2 i‖ₑ) := by + obtain ⟨G', hG', hb⟩ := hE.exists_hasWeakLineDeriv_valueMap hC u + have hGG : G = G' := funext fun i => (hG i).eq_of_top (hG' i) + rw [hGG] + exact hb + +/-- **Linear extensions of functions are extension operators**: for finite `C`, the value map with +its weak derivatives (`Rd.sobolevJet.lift`) is an extension operator from `U` with the constant +`C`. -/ +noncomputable def toSobolevExtensionOp (hE : IsSobolevExtensionMap p O U C E) (hC : C ≠ ∞) : + SobolevExtensionOp p O U C := + let L := sobolevJet.lift (hE.valueMap hC) fun u i => + (hE.exists_hasWeakLineDeriv_valueMap hC u).elim fun G hG => ⟨G i, hG.1 i⟩ + { toLinearMap := L + memSobolev := fun u => memSobolev_one_of_forall_gridBasis (L u).2 + ae_eq := hE.ae_valueMap_eq hC + bound := fun u => hE.enorm_valueMap_add_le hC u fun i => (L u).2 i } + +end IsSobolevExtensionMap + +end LinearExtensions + +/-! ### Extension operators on bounded Lipschitz domains -/ + +section BoundedDomains + +variable {V : Type*} [NormedAddCommGroup V] [InnerProductSpace ℝ V] [FiniteDimensional ℝ V] + [MeasurableSpace V] [BorelSpace V] {p : ℝ≥0∞} + +/-- **Cutoffs see only the values on a set**: if `χ` has closed support in `B`, `s ∩ B ⊆ t` and +`f = f'` almost everywhere on `t`, then `χ f = χ f'` almost everywhere on `s`. -/ +theorem mul_ae_eq_of_tsupport_subset {s t B : Set V} (hs : MeasurableSet s) (ht : MeasurableSet t) + {χ : V → ℝ} (hχ : tsupport χ ⊆ B) (hst : s ∩ B ⊆ t) {f f' : V → ℂ} + (h : f =ᵐ[volume.restrict t] f') : + (fun x => (χ x : ℂ) * f x) =ᵐ[volume.restrict s] fun x => (χ x : ℂ) * f' x := by + refine (ae_restrict_iff' hs).2 ?_ + filter_upwards [(ae_restrict_iff' ht).1 h] with x hx hxs + by_cases hxB : x ∈ B + · rw [hx (hst ⟨hxs, hxB⟩)] + · rw [image_eq_zero_of_notMem_tsupport fun h => hxB (hχ h), Complex.ofReal_zero, zero_mul, + zero_mul] + +namespace BoundedLipschitzDomain + +variable (Ω : BoundedLipschitzDomain V) + +/-- **The boundary patches by reflection are linear**: for `1 ≤ p ≤ ∞`, `ε ≥ 0` and a smooth `χ` +with values in `[0, 1]`, closed support in `B(c_j, ρ_j)`, `|∂_{e_i} χ| ≤ d_i` and `χ = 1` near +`B̄(c_j, ρ_j - 2ε)`, the map `f ↦ E_j(χ f)` (the extension by reflection in the graph domain `Ω_j`) +is a linear extension of Sobolev functions on `Ω` from `Ω ∩ B(c_j, ρ_j - 2ε)` with the constant +`Rd.reflectionConst` (`Rd.BoundedLipschitzDomain.exists_hasWeakLineDeriv_reflectionExtension_mul`, +`Rd.BoundedLipschitzDomain.reflectionExtension_mul_eq_of_mem`). -/ +theorem isSobolevExtensionMap_boundary_reflection [Fact (1 ≤ p)] (j : Fin Ω.N) {ε : ℝ} + (hε : 0 ≤ ε) {χ : V → ℝ} (hχ : ContDiff ℝ ((⊤ : ℕ∞) : WithTop ℕ∞) χ) + (hχB : tsupport χ ⊆ ball (Ω.center j) (Ω.radius j)) (hχ01 : ∀ x, χ x ∈ Icc (0 : ℝ) 1) + {d : Fin (finrank ℝ V) → ℝ≥0} (hd : ∀ i x, ‖fderiv ℝ χ x (gridBasis V i)‖ ≤ d i) + (hχ1 : ∀ᶠ x in 𝓝ˢ (closedBall (Ω.center j) (Ω.radius j - 2 * ε)), χ x = 1) : + IsSobolevExtensionMap p Ω.toOpens (Ω.carrier ∩ ball (Ω.center j) (Ω.radius j - 2 * ε)) + (reflectionConst (finrank ℝ V) (Ω.graph j).M (∑ i, (d i : ℝ≥0∞))) + ((Ω.graph j).reflectionExtensionLinearMap.comp + (LinearMap.mulLeft ℂ fun x => (χ x : ℂ))) where + ae_eq_of_ae_eq f f' h := (Ω.graph j).reflectionExtension_congr_ae + (mul_ae_eq_of_tsupport_subset (Ω.graph j).measurableSet_domain Ω.measurableSet hχB + (fun x hx => Ω.graph_toOpens_inf_ball_le j hx) h) + exists_hasWeakLineDeriv f g hf hg hfg := by + obtain ⟨G, hG, hb⟩ := Ω.exists_hasWeakLineDeriv_reflectionExtension_mul j Fact.out hχ hχB + hχ01 hd hf hg hfg + exact ⟨G, hG, ae_of_all _ fun x hx => Ω.reflectionExtension_mul_eq_of_mem j hε hχ1 f hx, hb⟩ + +/-- **The boundary patches by reflection carry extension operators**: for `1 ≤ p ≤ ∞` and +`ε > 0` there is an extension operator from `Ω ∩ B(c_j, ρ_j - 2ε)` with a finite constant +(`Rd.BoundedLipschitzDomain.isSobolevExtensionMap_boundary_reflection` with the cutoff of +`Rd.BoundedLipschitzDomain.exists_cutoff_boundary`). -/ +theorem exists_sobolevExtensionOp_boundary_reflection [Fact (1 ≤ p)] {ε : ℝ} (hε : 0 < ε) + (j : Fin Ω.N) : + ∃ C : ℝ≥0∞, C ≠ ∞ ∧ Nonempty (SobolevExtensionOp p Ω.toOpens + (Ω.carrier ∩ ball (Ω.center j) (Ω.radius j - 2 * ε)) C) := by + obtain ⟨χ, hχ, hχc, hχB, hχ01, hχ1⟩ := Ω.exists_cutoff_boundary hε j + obtain ⟨d, hd⟩ := exists_norm_fderiv_gridBasis_le hχ hχc + have hC := reflectionConst_ne_top (finrank ℝ V) (Ω.graph j).M + (ENNReal.sum_ne_top.2 fun i _ => ENNReal.coe_ne_top : ∑ i, (d i : ℝ≥0∞) ≠ ∞) + exact ⟨_, hC, ⟨(Ω.isSobolevExtensionMap_boundary_reflection j hε.le hχ hχB hχ01 hd + hχ1).toSobolevExtensionOp hC⟩⟩ + +/-- **The boundary patches by reflection**: for `1 ≤ p ≤ ∞` and `ε > 0`, Sobolev functions on `Ω` +extend from `Ω ∩ B(c_j, ρ_j - 2ε)` with a finite constant, by the extension operator of the patch +(`Rd.BoundedLipschitzDomain.exists_sobolevExtensionOp_boundary_reflection`, +`Rd.SobolevExtensionOp.extendsSobolev`). -/ +theorem exists_extendsSobolev_boundary_reflection [Fact (1 ≤ p)] {ε : ℝ} (hε : 0 < ε) + (j : Fin Ω.N) : + ∃ C : ℝ≥0∞, C ≠ ∞ ∧ ExtendsSobolev p Ω.toOpens + (Ω.carrier ∩ ball (Ω.center j) (Ω.radius j - 2 * ε)) C := by + obtain ⟨C, hC, ⟨E⟩⟩ := Ω.exists_sobolevExtensionOp_boundary_reflection (p := p) hε j + exact ⟨C, hC, E.extendsSobolev fun _ hx => hx.1⟩ + +/-- **The inner patch by a cutoff is linear**: for `1 ≤ p ≤ ∞` and a smooth `χ` with values in +`[0, 1]`, compact closed support in `Ω`, `|∂_{e_i} χ| ≤ d_i` and `χ = 1` near +`{infDist(·, Ωᶜ) ≥ 2δ}`, the map `f ↦ χ f` is a linear extension of Sobolev functions on `Ω` from +`{x ∈ Ω : infDist(x, Ωᶜ) > 2δ}` with the constant `1 + ∑_i d_i` +(`Rd.BoundedLipschitzDomain.exists_hasWeakLineDeriv_mul_interior`). -/ +theorem isSobolevExtensionMap_interior_cutoff [Fact (1 ≤ p)] {δ : ℝ} {χ : V → ℝ} + (hχ : ContDiff ℝ ((⊤ : ℕ∞) : WithTop ℕ∞) χ) (hχc : HasCompactSupport χ) + (hχΩ : tsupport χ ⊆ Ω.carrier) (hχ01 : ∀ x, χ x ∈ Icc (0 : ℝ) 1) + {d : Fin (finrank ℝ V) → ℝ≥0} (hd : ∀ i x, ‖fderiv ℝ χ x (gridBasis V i)‖ ≤ d i) + (hχ1 : ∀ᶠ x in 𝓝ˢ {x : V | 2 * δ ≤ infDist x Ω.carrierᶜ}, χ x = 1) : + IsSobolevExtensionMap p Ω.toOpens (Ω.carrier ∩ {x : V | 2 * δ < infDist x Ω.carrierᶜ}) + (1 + ∑ i, (d i : ℝ≥0∞)) (LinearMap.mulLeft ℂ fun x => (χ x : ℂ)) where + ae_eq_of_ae_eq f f' h := by + have h' := mul_ae_eq_of_tsupport_subset (s := univ) MeasurableSet.univ Ω.measurableSet hχΩ + (fun x hx => hx.2) h + rwa [Measure.restrict_univ] at h' + exists_hasWeakLineDeriv f g _ _ hfg := by + obtain ⟨G, hG, hU, hb⟩ := + Ω.exists_hasWeakLineDeriv_mul_interior (p := p) Fact.out hχ hχc hχΩ hχ01 hd hχ1 hfg + exact ⟨G, hG, ae_of_all _ hU, hb⟩ + +/-- **The inner patch carries an extension operator**: for `1 ≤ p ≤ ∞` and `δ > 0` there is an +extension operator from `{x ∈ Ω : infDist(x, Ωᶜ) > 2δ}` with a finite constant +(`Rd.BoundedLipschitzDomain.isSobolevExtensionMap_interior_cutoff` with the cutoff of +`Rd.BoundedLipschitzDomain.exists_cutoff_interior`). -/ +theorem exists_sobolevExtensionOp_interior_cutoff [Fact (1 ≤ p)] {δ : ℝ} (hδ : 0 < δ) : + ∃ C : ℝ≥0∞, C ≠ ∞ ∧ Nonempty (SobolevExtensionOp p Ω.toOpens + (Ω.carrier ∩ {x : V | 2 * δ < infDist x Ω.carrierᶜ}) C) := by + obtain ⟨χ, hχ, hχc, hχΩ, hχ01, hχ1⟩ := Ω.exists_cutoff_interior hδ + obtain ⟨d, hd⟩ := exists_norm_fderiv_gridBasis_le hχ hχc + have hC : 1 + ∑ i, (d i : ℝ≥0∞) ≠ ∞ := by simp [ENNReal.sum_eq_top] + exact ⟨_, hC, ⟨(Ω.isSobolevExtensionMap_interior_cutoff hχ hχc hχΩ hχ01 hd + hχ1).toSobolevExtensionOp hC⟩⟩ + +/-- **The inner patch by a cutoff**: for `1 ≤ p ≤ ∞` and `δ > 0`, Sobolev functions on `Ω` extend +from `{x ∈ Ω : infDist(x, Ωᶜ) > 2δ}` with a finite constant, by the extension operator of the patch +(`Rd.BoundedLipschitzDomain.exists_sobolevExtensionOp_interior_cutoff`, +`Rd.SobolevExtensionOp.extendsSobolev`). -/ +theorem exists_extendsSobolev_interior_cutoff [Fact (1 ≤ p)] {δ : ℝ} (hδ : 0 < δ) : + ∃ C : ℝ≥0∞, C ≠ ∞ ∧ ExtendsSobolev p Ω.toOpens + (Ω.carrier ∩ {x : V | 2 * δ < infDist x Ω.carrierᶜ}) C := by + obtain ⟨C, hC, ⟨E⟩⟩ := Ω.exists_sobolevExtensionOp_interior_cutoff (p := p) hδ + exact ⟨C, hC, E.extendsSobolev fun _ hx => hx.1⟩ + +/-- **The extension operator by reflection with a finite constant**: for a bounded Lipschitz +domain `Ω` in dimension `n ≥ 1` and `1 ≤ p ≤ ∞` there is an extension operator from `Ω` with a +finite constant (`Rd.BoundedLipschitzDomain.exists_sobolevExtensionOp_of_patches` with the patch +operators `Rd.BoundedLipschitzDomain.exists_sobolevExtensionOp_boundary_reflection` and +`Rd.BoundedLipschitzDomain.exists_sobolevExtensionOp_interior_cutoff`). -/ +theorem exists_sobolevExtensionOp_reflection [Fact (1 ≤ p)] [Nontrivial V] : + ∃ C : ℝ≥0∞, C ≠ ∞ ∧ Nonempty (SobolevExtensionOp p Ω.toOpens Ω.carrier C) := + Ω.exists_sobolevExtensionOp_of_patches + (fun _ hε j => Ω.exists_sobolevExtensionOp_boundary_reflection hε j) + (fun _ hδ => Ω.exists_sobolevExtensionOp_interior_cutoff hδ) + +/-- **The extension theorem for `1 ≤ p ≤ ∞` with a bound**: for a bounded Lipschitz domain `Ω` in +dimension `n ≥ 1` and `1 ≤ p ≤ ∞` there is a finite constant `C` such that every `f ∈ L_p(Ω)` with +weak derivatives `g_i = ∂_{e_i} f ∈ L_p(Ω)` agrees on `Ω` with some `F ∈ W^1_p(V)` whose weak +derivatives `G_i = ∂_{e_i} F` satisfy +`‖F‖_p + ∑_i ‖G_i‖_p ≤ C (‖f‖_{L_p(Ω)} + ∑_i ‖g_i‖_{L_p(Ω)})`: the extension operator by +reflection (`Rd.BoundedLipschitzDomain.exists_sobolevExtensionOp_reflection`) applied to `f` +(`Rd.SobolevExtensionOp.extendsSobolev`). -/ +theorem exists_extendsSobolev_reflection [Nontrivial V] (hp : 1 ≤ p) : + ∃ C : ℝ≥0∞, C ≠ ∞ ∧ ExtendsSobolev p Ω.toOpens Ω.carrier C := by + have : Fact (1 ≤ p) := ⟨hp⟩ + obtain ⟨C, hC, ⟨E⟩⟩ := Ω.exists_sobolevExtensionOp_reflection (p := p) + exact ⟨C, hC, E.extendsSobolev subset_rfl⟩ + +/-- **The extension theorem for `W^1_p`, `1 ≤ p ≤ ∞`** (Evans–Gariepy, Section 4.4; Brezis 2011, +Chapter 9): for a bounded Lipschitz domain `Ω` and `1 ≤ p ≤ ∞`, every `f ∈ W^1_p(Ω)` agrees almost +everywhere on `Ω` with some `F ∈ W^1_p(V)` +(`Rd.BoundedLipschitzDomain.exists_extendsSobolev_reflection` in dimension `n ≥ 1`, +`Rd.exists_memSobolev_of_memWeakSobolev_of_subsingleton` in dimension `0`). -/ +theorem exists_memSobolev_of_memWeakSobolev (hp : 1 ≤ p) {f : V → ℂ} + (hf : MemWeakSobolev Ω.toOpens 1 p f) : + ∃ F : Lp ℂ p (volume : Measure V), MemSobolev 1 F ∧ + (F : V → ℂ) =ᵐ[volume.restrict Ω.carrier] f := by + rcases subsingleton_or_nontrivial V with hV | hV + · exact exists_memSobolev_of_memWeakSobolev_of_subsingleton hf + obtain ⟨C, -, hC⟩ := Ω.exists_extendsSobolev_reflection hp + choose g hg hfg using fun i => hf.2 1 le_rfl fun _ => gridBasis V i + obtain ⟨F, hF, hFf, -⟩ := hC f g hf.1 hg hfg + exact ⟨F, hF, (ae_restrict_iff' Ω.measurableSet).2 hFf⟩ + +/-- **`W^1_p(Ω)` is the space of restrictions of `W^1_p(V)` for `1 ≤ p ≤ ∞`**: for a bounded +Lipschitz domain `Ω`, `f` lies in `W^1_p(Ω)` iff it agrees almost everywhere on `Ω` with some +`F ∈ W^1_p(V)` (`Rd.BoundedLipschitzDomain.exists_memSobolev_of_memWeakSobolev`; the +converse restricts the weak derivatives, `Rd.MemWeakSobolev.mono_set`). -/ +theorem memWeakSobolev_iff_exists_memSobolev (hp : 1 ≤ p) (f : V → ℂ) : + MemWeakSobolev Ω.toOpens 1 p f ↔ ∃ F : Lp ℂ p (volume : Measure V), MemSobolev 1 F ∧ + (F : V → ℂ) =ᵐ[volume.restrict Ω.carrier] f := by + refine ⟨Ω.exists_memSobolev_of_memWeakSobolev hp, ?_⟩ + rintro ⟨F, hF, hFf⟩ + exact (MemWeakSobolev.mono_set hF le_top).congr_ae hFf + +variable (p) in +/-- **The extension operator for `W^1_p`, `1 ≤ p ≤ ∞`** (Evans–Gariepy, Section 4.4, by +reflection): for a bounded Lipschitz domain `Ω` in dimension `n ≥ 1`, a bounded linear operator +`E` from the jets of `W^1_p(Ω)` to the jets of `W^1_p(V)` with `E u = u` on `Ω`, chosen among the +extension operators of `Rd.BoundedLipschitzDomain.exists_sobolevExtensionOp_reflection`. -/ +noncomputable def sobolevExtensionL [Fact (1 ≤ p)] [Nontrivial V] : + weakSobolevJet p Ω.toOpens →L[ℂ] sobolevJet (V := V) p := + SobolevExtensionOp.toContinuousLinearMap + (Classical.choice (Ω.exists_sobolevExtensionOp_reflection (p := p)).choose_spec.2) + (Ω.exists_sobolevExtensionOp_reflection (p := p)).choose_spec.1 + +/-- The values of the extension operator lie in `W^1_p(V)`. -/ +theorem memSobolev_sobolevExtensionL [Fact (1 ≤ p)] [Nontrivial V] + (u : weakSobolevJet p Ω.toOpens) : MemSobolev 1 (Ω.sobolevExtensionL p u).1.1 := + (Classical.choice (Ω.exists_sobolevExtensionOp_reflection (p := p)).choose_spec.2).memSobolev u + +/-- **The extension operator extends**: the value of `E u` agrees with the value of `u` almost +everywhere on `Ω`. -/ +theorem sobolevExtensionL_fst_ae_eq [Fact (1 ≤ p)] [Nontrivial V] + (u : weakSobolevJet p Ω.toOpens) : + ⇑(Ω.sobolevExtensionL p u).1.1 =ᵐ[volume.restrict Ω.carrier] ⇑u.1.1 := + (ae_restrict_iff' Ω.measurableSet).2 + ((Classical.choice (Ω.exists_sobolevExtensionOp_reflection (p := p)).choose_spec.2).ae_eq u) + +/-- **The value of every jet of `W^1_p(Ω)` lies in `W^1_p(Ω)`** for `1 ≤ p ≤ ∞`: it agrees on `Ω` +with the value of `E u ∈ W^1_p(V)` (`Rd.BoundedLipschitzDomain.memSobolev_sobolevExtensionL`, +`Rd.BoundedLipschitzDomain.sobolevExtensionL_fst_ae_eq`). With +`Rd.exists_mem_weakSobolevJet_of_memWeakSobolev`, the values of the jets of `W^1_p(Ω)` are exactly +the functions of `W^1_p(Ω)`. On every open set the same follows from the weak derivatives along +the basis (`Rd.hasWeakLineDeriv_of_forall_gridBasis`). -/ +theorem memWeakSobolev_of_mem_weakSobolevJet [Fact (1 ≤ p)] [Nontrivial V] + (u : weakSobolevJet p Ω.toOpens) : MemWeakSobolev Ω.toOpens 1 p u.1.1 := + ((Ω.memSobolev_sobolevExtensionL u).mono_set le_top).congr_ae (Ω.sobolevExtensionL_fst_ae_eq u) + +/-- **The bound of the extension operator** in the norm `‖f‖_p + ∑_i ‖g_i‖_p`: there is a finite +`C` with `‖F‖_p + ∑_i ‖G_i‖_p ≤ C (‖f‖_{L_p(Ω)} + ∑_i ‖g_i‖_{L_p(Ω)})` for `E (f, g) = (F, G)`. -/ +theorem exists_enorm_sobolevExtensionL_le [Fact (1 ≤ p)] [Nontrivial V] : + ∃ C : ℝ≥0∞, C ≠ ∞ ∧ ∀ u : weakSobolevJet p Ω.toOpens, + ‖(Ω.sobolevExtensionL p u).1.1‖ₑ + ∑ i, ‖(Ω.sobolevExtensionL p u).1.2 i‖ₑ ≤ + C * (‖u.1.1‖ₑ + ∑ i, ‖u.1.2 i‖ₑ) := + ⟨_, (Ω.exists_sobolevExtensionOp_reflection (p := p)).choose_spec.1, + (Classical.choice (Ω.exists_sobolevExtensionOp_reflection (p := p)).choose_spec.2).bound⟩ + +/-- **Restriction after extension is the identity**: `(E u)|_Ω = u` for every jet `u` of +`W^1_p(Ω)` (`Rd.SobolevExtensionOp.restrictL_comp_toContinuousLinearMap`). -/ +theorem restrictL_comp_sobolevExtensionL [Fact (1 ≤ p)] [Nontrivial V] : + (sobolevJet.restrictL Ω.toOpens).comp (Ω.sobolevExtensionL p) = + ContinuousLinearMap.id ℂ _ := + SobolevExtensionOp.restrictL_comp_toContinuousLinearMap _ _ subset_rfl + +/-- **The extension theorem in operator form** (TauCeti's +`W1p.exists_extensionL_of_isLipschitzDomainWith`): for a bounded Lipschitz domain `Ω` in dimension +`n ≥ 1` and `1 ≤ p ≤ ∞` there is a bounded linear operator `E` from the jets of `W^1_p(Ω)` to the +jets of `W^1_p(V)` that is a right inverse of the restriction and has values in `W^1_p(V)`. -/ +theorem exists_extensionL [Fact (1 ≤ p)] [Nontrivial V] : + ∃ E : weakSobolevJet p Ω.toOpens →L[ℂ] sobolevJet (V := V) p, + (sobolevJet.restrictL Ω.toOpens).comp E = ContinuousLinearMap.id ℂ _ ∧ + ∀ u, MemSobolev 1 (E u).1.1 := + ⟨Ω.sobolevExtensionL p, Ω.restrictL_comp_sobolevExtensionL, Ω.memSobolev_sobolevExtensionL⟩ + +end BoundedLipschitzDomain + +/-- **The extension theorem in operator form for the usual definition**: for a bounded Lipschitz +set `Ω` (`Rd.IsBoundedLipschitzDomain`) in dimension `n ≥ 1` and `1 ≤ p ≤ ∞` there is a bounded +linear extension operator from the jets of `W^1_p(Ω)` to those of `W^1_p(V)` +(`Rd.BoundedLipschitzDomain.exists_extensionL` for +`Rd.BoundedLipschitzDomain.ofIsBoundedLipschitzDomain`). -/ +theorem exists_extensionL_of_isBoundedLipschitzDomain [Fact (1 ≤ p)] [Nontrivial V] + {Ω : Set V} (h : IsBoundedLipschitzDomain Ω) : + ∃ E : weakSobolevJet p ⟨Ω, h.1⟩ →L[ℂ] sobolevJet (V := V) p, + (sobolevJet.restrictL ⟨Ω, h.1⟩).comp E = ContinuousLinearMap.id ℂ _ ∧ + ∀ u, MemSobolev 1 (E u).1.1 := + (BoundedLipschitzDomain.ofIsBoundedLipschitzDomain h).exists_extensionL + +end BoundedDomains + +end Rd diff --git a/LeanPool/FunctionSpaces/Domains/Extension/RychkovExtension.lean b/LeanPool/FunctionSpaces/Domains/Extension/RychkovExtension.lean new file mode 100644 index 0000000000..f60b589b4e --- /dev/null +++ b/LeanPool/FunctionSpaces/Domains/Extension/RychkovExtension.lean @@ -0,0 +1,311 @@ +/- +Copyright (c) 2026 Mario Ullrich. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Mario Ullrich +-/ +module + +public import LeanPool.FunctionSpaces.Domains.Lipschitz.LipschitzGraph + +/- +Modified for Lean Pool: module names and imports adapted. +-/ + +/-! +# Rychkov's extension + +Let `b` be a bump for local means with kernels `k_j` and dual kernels `η_j`, and `W ⊆ V` +measurable. For `f ∈ L_p(V)`, `1 ≤ p < ∞`, the **local extension** +(`Rd.LocalMeansBump.localExtension`) is `F = ∑_j η_j ⋆ 1_W (k_j ⋆ f)`. If the local means +quasi-norm on `W`, `‖(2^(js) ‖1_W (k_j ⋆ f)‖_p)_j‖_{ℓ_q}` (`Rd.LocalMeansBump.localNormOn`), is +finite and `s > 0`, the series converges absolutely (`Rd.LocalMeansBump.summable_localExtTerm`; +a bound `2^(js) ‖1_W (k_j ⋆ f)‖_p ≤ X < ∞` suffices, +`Rd.LocalMeansBump.summable_localExtTerm_of_forall_le`), and by the synthesis estimate of local +means `‖F‖_p + ‖(2^(is) ω_L(F, 2^(-i))_p)_i‖_{ℓ_q}` is at most a constant times that quasi-norm +(`Rd.LocalMeansBump.modNorm_localExtension_le`). If `L ≥ 1` and `x - y ∈ W` for `x ∈ U` and +`η_j(y) ≠ 0`, then `F = f` on `U` (`Rd.LocalMeansBump.indicatorLp_localExtension`): by the +support principle for two sets (`Rd.indicatorLp_convLp_indicatorLp`), on `U` the partial sums are +those of the reproducing formula `∑_{j ≤ J} η_j ⋆ k_j ⋆ f → f`. The terms are linear in `f` +(`Rd.LocalMeansBump.localExtTerm_add`, `Rd.LocalMeansBump.localExtTerm_smul`). + +**Rychkov's extension** (`Rd.LipschitzGraph.extension`) for a Lipschitz graph domain `Ω` with +cone `K` and `L ≥ 1` is the local extension of the cone bump for `W = Ω`, + +`Ext f = ∑_j η_j ⋆ (1_Ω (k_j ⋆ f))`. + +Its quasi-norm on `Ω` is the **intrinsic local means quasi-norm** +`‖(2^(js) ‖1_Ω (k_j ⋆ f)‖_p)_j‖_{ℓ_q}` (`Rd.LipschitzGraph.intrinsicNorm`), which depends only on +`f` on `Ω` (`Rd.LipschitzGraph.intrinsicNorm_congr`). The kernels of the cone bump are supported in +`-K`, so `x - y ∈ x + K ⊆ Ω` for `x ∈ Ω` and `η_j(y) ≠ 0`, and `Ext f = f` on `Ω` +(`Rd.LipschitzGraph.cutoff_extension`); for `0 < s < L`, +`‖Ext f‖_p + ‖(2^(is) ω_L(Ext f, 2^(-i))_p)_i‖_{ℓ_q} ≤ C ‖(2^(js) ‖1_Ω (k_j ⋆ f)‖_p)_j‖_{ℓ_q}` +(`Rd.LipschitzGraph.modNorm_extension_le`). + +**Restrictions** (`Rd.LipschitzGraph.exists_besov_extension_iff`): for `0 < s < L`, `f` agrees on +`Ω` with some `F ∈ L_p(V)` satisfying the Besov condition by differences iff the intrinsic +quasi-norm of `f` is finite, and `Ext f` is such an `F`. The construction does not depend on `s`: +one operator serves all `0 < s < L`. +-/ + +@[expose] public section + +open MeasureTheory Filter Topology Module +open scoped ENNReal + +open ENNReal (lqNorm dyadicWeight) + +namespace Rd + +variable {V : Type*} [NormedAddCommGroup V] [InnerProductSpace ℝ V] [FiniteDimensional ℝ V] + [MeasurableSpace V] [BorelSpace V] + +/-! ### The local extension -/ + +namespace LocalMeansBump + +variable {p : ℝ≥0∞} [Fact (1 ≤ p)] (b : LocalMeansBump V) + +/-- The **local means quasi-norm on a set** `‖(2^(js) ‖1_W (k_j ⋆ f)‖_p)_j‖_{ℓ_q}`. -/ +noncomputable def localNormOn (hp : p ≠ ∞) {W : Set V} (hW : MeasurableSet W) (L : ℕ) (s : ℝ) + (q : ℝ≥0∞) (f : Lp ℂ p (volume : Measure V)) : ℝ≥0∞ := + lqNorm q (fun j => dyadicWeight s j * ‖indicatorLp hW (b.localMean hp L j f)‖ₑ) + +/-- The terms `η_j ⋆ 1_W (k_j ⋆ f)` of the local extension. -/ +noncomputable def localExtTerm (hp : p ≠ ∞) {W : Set V} (hW : MeasurableSet W) (L j : ℕ) + (f : Lp ℂ p (volume : Measure V)) : Lp ℂ p (volume : Measure V) := + convLp hp (b.integrable_dual L j) (indicatorLp hW (b.localMean hp L j f)) + +/-- The terms of the local extension are additive in `f`. -/ +theorem localExtTerm_add (hp : p ≠ ∞) {W : Set V} (hW : MeasurableSet W) (L j : ℕ) + (f g : Lp ℂ p (volume : Measure V)) : + b.localExtTerm hp hW L j (f + g) = b.localExtTerm hp hW L j f + b.localExtTerm hp hW L j g := by + simp only [localExtTerm, map_add] + +/-- The terms of the local extension commute with complex scalars. -/ +theorem localExtTerm_smul (hp : p ≠ ∞) {W : Set V} (hW : MeasurableSet W) (L j : ℕ) (c : ℂ) + (f : Lp ℂ p (volume : Measure V)) : + b.localExtTerm hp hW L j (c • f) = c • b.localExtTerm hp hW L j f := by + simp only [localExtTerm, map_smul] + +/-- The **local extension** `∑_j η_j ⋆ 1_W (k_j ⋆ f)`. -/ +noncomputable def localExtension (hp : p ≠ ∞) {W : Set V} (hW : MeasurableSet W) (L : ℕ) + (f : Lp ℂ p (volume : Measure V)) : Lp ℂ p (volume : Measure V) := + ∑' j, b.localExtTerm hp hW L j f + +/-- **The terms of the local extension from a bound on the weighted local means**: if +`2^(js) ‖1_W (k_j ⋆ f)‖_p ≤ X` for every `j`, then `‖η_j ⋆ 1_W (k_j ⋆ f)‖_p ≤ 2 ‖m‖_1 2^(-js) X`. -/ +theorem enorm_localExtTerm_le_of_forall_le (hp : p ≠ ∞) {W : Set V} (hW : MeasurableSet W) + (L : ℕ) {s : ℝ} {f : Lp ℂ p (volume : Measure V)} {X : ℝ≥0∞} + (hX : ∀ j, dyadicWeight s j * ‖indicatorLp hW (b.localMean hp L j f)‖ₑ ≤ X) (j : ℕ) : + ‖b.localExtTerm hp hW L j f‖ₑ ≤ + 2 * eLpNorm (momentKernel b.toFun L) 1 volume * (dyadicWeight (-s) j * X) := + calc ‖b.localExtTerm hp hW L j f‖ₑ + ≤ eLpNorm (b.dual L j) 1 volume * ‖indicatorLp hW (b.localMean hp L j f)‖ₑ := + enorm_convLp_le hp _ _ + _ ≤ 2 * eLpNorm (momentKernel b.toFun L) 1 volume * (dyadicWeight (-s) j * + (dyadicWeight s j * ‖indicatorLp hW (b.localMean hp L j f)‖ₑ)) := by + rw [← mul_assoc (dyadicWeight (-s) j), ENNReal.dyadicWeight_neg_mul_self, one_mul] + exact mul_le_mul' (b.eLpNorm_dual_one_le L j) le_rfl + _ ≤ _ := by gcongr; exact hX j + +/-- **The sum of the norms of the terms**: if `2^(js) ‖1_W (k_j ⋆ f)‖_p ≤ X` for every `j`, then +`∑_j ‖η_j ⋆ 1_W (k_j ⋆ f)‖_p ≤ 2 ‖m‖_1 (1 - 2^(-s))⁻¹ X` +(`Rd.LocalMeansBump.enorm_localExtTerm_le_of_forall_le`, `ENNReal.tsum_dyadicWeight_neg`). -/ +theorem tsum_enorm_localExtTerm_le (hp : p ≠ ∞) {W : Set V} (hW : MeasurableSet W) (L : ℕ) + {s : ℝ} {f : Lp ℂ p (volume : Measure V)} {X : ℝ≥0∞} + (hX : ∀ j, dyadicWeight s j * ‖indicatorLp hW (b.localMean hp L j f)‖ₑ ≤ X) : + ∑' j, ‖b.localExtTerm hp hW L j f‖ₑ ≤ + 2 * eLpNorm (momentKernel b.toFun L) 1 volume * (1 - (2 : ℝ≥0∞) ^ (-s))⁻¹ * X := by + refine (tsum_le_tsum (b.enorm_localExtTerm_le_of_forall_le hp hW L hX)).trans_eq ?_ + rw [ENNReal.tsum_mul_left, ENNReal.tsum_mul_right, ENNReal.tsum_dyadicWeight_neg] + ring + +/-- **The local extension converges absolutely** for `s > 0` if +`2^(js) ‖1_W (k_j ⋆ f)‖_p ≤ X < ∞` for every `j` +(`Rd.LocalMeansBump.tsum_enorm_localExtTerm_le`). -/ +theorem summable_localExtTerm_of_forall_le (hp : p ≠ ∞) {W : Set V} (hW : MeasurableSet W) + (L : ℕ) {s : ℝ} (hs : 0 < s) {f : Lp ℂ p (volume : Measure V)} {X : ℝ≥0∞} (hXf : X ≠ ∞) + (hX : ∀ j, dyadicWeight s j * ‖indicatorLp hW (b.localMean hp L j f)‖ₑ ≤ X) : + Summable fun j => b.localExtTerm hp hW L j f := by + have htsum : ∑' j, ‖b.localExtTerm hp hW L j f‖ₑ ≠ ∞ := + ne_top_of_le_ne_top (ENNReal.mul_ne_top (ENNReal.mul_ne_top (ENNReal.mul_ne_top (by norm_num) + (eLpNorm_momentKernel_ne_top b.integrable L)) + (ENNReal.one_sub_two_rpow_neg_inv_ne_top hs)) hXf) (b.tsum_enorm_localExtTerm_le hp hW L hX) + exact Summable.of_eNorm htsum + +/-- **The local extension converges absolutely** for `s > 0` and a finite local means +quasi-norm on `W`: `‖η_j ⋆ 1_W (k_j ⋆ f)‖_p ≤ 2 ‖m‖_1 2^(-js) ‖f‖_W` +(`Rd.LocalMeansBump.summable_localExtTerm_of_forall_le`). -/ +theorem summable_localExtTerm (hp : p ≠ ∞) {W : Set V} (hW : MeasurableSet W) (L : ℕ) {s : ℝ} + (hs : 0 < s) {q : ℝ≥0∞} (hq : 1 ≤ q) {f : Lp ℂ p (volume : Measure V)} + (hf : b.localNormOn hp hW L s q f < ∞) : Summable fun j => b.localExtTerm hp hW L j f := + b.summable_localExtTerm_of_forall_le hp hW L hs hf.ne fun j => + ENNReal.le_lqNorm (zero_lt_one.trans_le hq).ne' + (fun j => dyadicWeight s j * ‖indicatorLp hW (b.localMean hp L j f)‖ₑ) j + +/-- The partial sums of the local extension converge to it if its terms are summable. -/ +theorem tendsto_sum_localExtTerm_of_summable (hp : p ≠ ∞) {W : Set V} (hW : MeasurableSet W) + (L : ℕ) {f : Lp ℂ p (volume : Measure V)} + (hsum : Summable fun j => b.localExtTerm hp hW L j f) : + Tendsto (fun J => ∑ j ∈ Finset.range (J + 1), b.localExtTerm hp hW L j f) atTop + (𝓝 (b.localExtension hp hW L f)) := + (hsum.hasSum.tendsto_sum_nat).comp (tendsto_add_atTop_nat 1) + +/-- The partial sums of the local extension converge to it. -/ +theorem tendsto_sum_localExtTerm (hp : p ≠ ∞) {W : Set V} (hW : MeasurableSet W) (L : ℕ) + {s : ℝ} (hs : 0 < s) {q : ℝ≥0∞} (hq : 1 ≤ q) {f : Lp ℂ p (volume : Measure V)} + (hf : b.localNormOn hp hW L s q f < ∞) : + Tendsto (fun J => ∑ j ∈ Finset.range (J + 1), b.localExtTerm hp hW L j f) atTop + (𝓝 (b.localExtension hp hW L f)) := + b.tendsto_sum_localExtTerm_of_summable hp hW L (b.summable_localExtTerm hp hW L hs hq hf) + +/-- **The local extension satisfies the Besov condition by differences**: for `0 < s`, +`‖F‖_p + ‖(2^(is) ω_L(F, 2^(-i))_p)_i‖_{ℓ_q} ≤ C ‖(2^(js) ‖1_W (k_j ⋆ f)‖_p)_j‖_{ℓ_q}`. -/ +theorem modNorm_localExtension_le (hp : p ≠ ∞) {W : Set V} (hW : MeasurableSet W) (L : ℕ) + {s : ℝ} (hs : 0 < s) {q : ℝ≥0∞} (hq : 1 ≤ q) {f : Lp ℂ p (volume : Measure V)} + (hf : b.localNormOn hp hW L s q f < ∞) : + ‖b.localExtension hp hW L f‖ₑ + + lqNorm q (fun i => dyadicWeight s i * lpModulus p L (b.localExtension hp hW L f) i) ≤ + b.synthConst L s * b.localNormOn hp hW L s q f := + b.modNorm_le_of_tendsto hp L s hq (b.tendsto_sum_localExtTerm hp hW L hs hq hf) + +/-- **The local extension agrees with `f` on `U`** if its terms are summable and the dual kernels +at points of `U` only see `W`: on `U` the terms are those of the reproducing formula. -/ +theorem indicatorLp_localExtension_of_summable (hp : p ≠ ∞) {L : ℕ} (hL : 1 ≤ L) {U W : Set V} + (hU : MeasurableSet U) (hW : MeasurableSet W) + (hUW : ∀ x ∈ U, ∀ j y, b.dual L j y ≠ 0 → x - y ∈ W) {f : Lp ℂ p (volume : Measure V)} + (hsum : Summable fun j => b.localExtTerm hp hW L j f) : + indicatorLp hU (b.localExtension hp hW L f) = indicatorLp hU f := by + have hsum' : ∀ J, indicatorLp hU (∑ j ∈ Finset.range (J + 1), b.localExtTerm hp hW L j f) = + indicatorLp hU (∑ j ∈ Finset.range (J + 1), + convLp hp (b.integrable_dual L j) (b.localMean hp L j f)) := fun J => by + rw [map_sum, map_sum] + exact Finset.sum_congr rfl fun j _ => + indicatorLp_convLp_indicatorLp hp _ hU hW (fun x hx y hy => hUW x hx j y hy) _ + have h1 : Tendsto (fun J => indicatorLp hU (∑ j ∈ Finset.range (J + 1), + b.localExtTerm hp hW L j f)) atTop (𝓝 (indicatorLp hU (b.localExtension hp hW L f))) := + ((indicatorLp hU).continuous.tendsto _).comp + (b.tendsto_sum_localExtTerm_of_summable hp hW L hsum) + have h2 : Tendsto (fun J => indicatorLp hU (∑ j ∈ Finset.range (J + 1), + convLp hp (b.integrable_dual L j) (b.localMean hp L j f))) atTop (𝓝 (indicatorLp hU f)) := + ((indicatorLp hU).continuous.tendsto _).comp (b.tendsto_sum_dual_localMean hp hL f) + simp_rw [hsum'] at h1 + exact tendsto_nhds_unique h1 h2 + +/-- **The local extension agrees with `f` on `U`** if the dual kernels at points of `U` only see +`W`: on `U` the terms are those of the reproducing formula. -/ +theorem indicatorLp_localExtension (hp : p ≠ ∞) {L : ℕ} (hL : 1 ≤ L) {U W : Set V} + (hU : MeasurableSet U) (hW : MeasurableSet W) + (hUW : ∀ x ∈ U, ∀ j y, b.dual L j y ≠ 0 → x - y ∈ W) {s : ℝ} (hs : 0 < s) {q : ℝ≥0∞} + (hq : 1 ≤ q) {f : Lp ℂ p (volume : Measure V)} (hf : b.localNormOn hp hW L s q f < ∞) : + indicatorLp hU (b.localExtension hp hW L f) = indicatorLp hU f := + b.indicatorLp_localExtension_of_summable hp hL hU hW hUW + (b.summable_localExtTerm hp hW L hs hq hf) + +end LocalMeansBump + +/-! ### Rychkov's extension for Lipschitz graph domains -/ + +namespace LipschitzGraph + +variable (Ω : LipschitzGraph V) {p : ℝ≥0∞} [Fact (1 ≤ p)] + +/-- The terms `η_j ⋆ (1_Ω (k_j ⋆ f))` of the extension: the terms of the local extension of the +cone bump for `W = Ω`. -/ +noncomputable def extTerm (hp : p ≠ ∞) (L j : ℕ) (f : Lp ℂ p (volume : Measure V)) : + Lp ℂ p (volume : Measure V) := + Ω.coneBump.localExtTerm hp Ω.measurableSet_domain L j f + +/-- The **intrinsic local means quasi-norm** `‖(2^(js) ‖1_Ω (k_j ⋆ f)‖_p)_j‖_{ℓ_q}`: the local +means quasi-norm of the cone bump on `Ω`. -/ +noncomputable def intrinsicNorm (hp : p ≠ ∞) (L : ℕ) (s : ℝ) (q : ℝ≥0∞) + (f : Lp ℂ p (volume : Measure V)) : ℝ≥0∞ := + Ω.coneBump.localNormOn hp Ω.measurableSet_domain L s q f + +/-- The intrinsic quasi-norm written with the cut-off: +`‖(2^(js) ‖1_Ω (k_j ⋆ f)‖_p)_j‖_{ℓ_q}`. -/ +theorem intrinsicNorm_def (hp : p ≠ ∞) (L : ℕ) (s : ℝ) (q : ℝ≥0∞) + (f : Lp ℂ p (volume : Measure V)) : + Ω.intrinsicNorm hp L s q f = + lqNorm q (fun j => dyadicWeight s j * ‖Ω.cutoff (Ω.coneBump.localMean hp L j f)‖ₑ) := + rfl + +/-- **The intrinsic quasi-norm depends only on `f` on `Ω`**: the kernels `k_j` are supported in +`-K` (the support principle). -/ +theorem intrinsicNorm_congr (hp : p ≠ ∞) (L : ℕ) (s : ℝ) (q : ℝ≥0∞) + {F f : Lp ℂ p (volume : Measure V)} (hFf : Ω.cutoff F = Ω.cutoff f) : + Ω.intrinsicNorm hp L s q F = Ω.intrinsicNorm hp L s q f := by + rw [intrinsicNorm_def, intrinsicNorm_def] + congr 1 + funext j + exact congrArg (fun g => dyadicWeight s j * ‖g‖ₑ) + (Ω.cutoff_convLp_eq hp (Ω.coneBump.integrable_kernel L j) (Ω.coneSupported_kernel L j) hFf) + +/-- The intrinsic quasi-norm is at most the local means quasi-norm. -/ +theorem intrinsicNorm_le_localMeansNorm (hp : p ≠ ∞) (L : ℕ) (s : ℝ) (q : ℝ≥0∞) + (f : Lp ℂ p (volume : Measure V)) : + Ω.intrinsicNorm hp L s q f ≤ Ω.coneBump.localMeansNorm hp L s q f := + ENNReal.lqNorm_mono fun _ => mul_le_mul' le_rfl (enorm_indicatorLp_le _ _) + +/-- **The extension converges absolutely** for `s > 0` and a finite intrinsic quasi-norm: +`‖η_j ⋆ (1_Ω (k_j ⋆ f))‖_p ≤ 2 ‖m‖_1 2^(-js) ‖f‖_intr` +(`Rd.LocalMeansBump.summable_localExtTerm`). -/ +theorem summable_extTerm (hp : p ≠ ∞) (L : ℕ) {s : ℝ} (hs : 0 < s) {q : ℝ≥0∞} (hq : 1 ≤ q) + {f : Lp ℂ p (volume : Measure V)} (hf : Ω.intrinsicNorm hp L s q f < ∞) : + Summable fun j => Ω.extTerm hp L j f := + Ω.coneBump.summable_localExtTerm hp Ω.measurableSet_domain L hs hq hf + +/-- **Rychkov's extension** `Ext f = ∑_j η_j ⋆ (1_Ω (k_j ⋆ f))`: the local extension of the cone +bump for `W = Ω`. -/ +noncomputable def extension (hp : p ≠ ∞) (L : ℕ) (f : Lp ℂ p (volume : Measure V)) : + Lp ℂ p (volume : Measure V) := + Ω.coneBump.localExtension hp Ω.measurableSet_domain L f + +/-- The partial sums of the extension converge to it. -/ +theorem tendsto_sum_extTerm (hp : p ≠ ∞) (L : ℕ) {s : ℝ} (hs : 0 < s) {q : ℝ≥0∞} (hq : 1 ≤ q) + {f : Lp ℂ p (volume : Measure V)} (hf : Ω.intrinsicNorm hp L s q f < ∞) : + Tendsto (fun J => ∑ j ∈ Finset.range (J + 1), Ω.extTerm hp L j f) atTop + (𝓝 (Ω.extension hp L f)) := + Ω.coneBump.tendsto_sum_localExtTerm hp Ω.measurableSet_domain L hs hq hf + +/-- **The extension agrees with `f` on `Ω`**: `1_Ω Ext f = 1_Ω f`. The dual kernels at points of +`Ω` only see `Ω`, since they are supported in `-K` (`Rd.LocalMeansBump.indicatorLp_localExtension` +for `U = W = Ω`). -/ +theorem cutoff_extension (hp : p ≠ ∞) {L : ℕ} (hL : 1 ≤ L) {s : ℝ} (hs : 0 < s) {q : ℝ≥0∞} + (hq : 1 ≤ q) {f : Lp ℂ p (volume : Measure V)} (hf : Ω.intrinsicNorm hp L s q f < ∞) : + Ω.cutoff (Ω.extension hp L f) = Ω.cutoff f := + Ω.coneBump.indicatorLp_localExtension hp hL Ω.measurableSet_domain Ω.measurableSet_domain + (fun _ hx j _ hy => (Ω.coneSupported_dual L j).sub_mem hx hy) hs hq hf + +/-- **The extension satisfies the Besov condition by differences**: for `0 < s < L`, +`‖Ext f‖_p + ‖(2^(is) ω_L(Ext f, 2^(-i))_p)_i‖_{ℓ_q} ≤ C ‖(2^(js) ‖1_Ω (k_j ⋆ f)‖_p)_j‖_{ℓ_q}`. -/ +theorem modNorm_extension_le (hp : p ≠ ∞) (L : ℕ) {s : ℝ} (hs : 0 < s) {q : ℝ≥0∞} (hq : 1 ≤ q) + {f : Lp ℂ p (volume : Measure V)} (hf : Ω.intrinsicNorm hp L s q f < ∞) : + ‖Ω.extension hp L f‖ₑ + + lqNorm q (fun i => dyadicWeight s i * lpModulus p L (Ω.extension hp L f) i) ≤ + Ω.coneBump.synthConst L s * Ω.intrinsicNorm hp L s q f := + Ω.coneBump.modNorm_localExtension_le hp Ω.measurableSet_domain L hs hq hf + +/-- **Restrictions of Besov spaces to Lipschitz graph domains**: for `1 ≤ p < ∞`, `0 < s < L` and +`1 ≤ q ≤ ∞`, `f` agrees on `Ω` with some `F ∈ L_p(V)` with +`‖F‖_p + ‖(2^(ks) ω_L(F, 2^(-k))_p)_k‖_{ℓ_q} < ∞` iff the intrinsic local means quasi-norm of `f` +is finite; `F = Ext f` is such a function. -/ +theorem exists_besov_extension_iff (hp : p ≠ ∞) {L : ℕ} (hL : 1 ≤ L) {s : ℝ} (hs : 0 < s) + (hsL : s < L) {q : ℝ≥0∞} (hq : 1 ≤ q) (f : Lp ℂ p (volume : Measure V)) : + (∃ F : Lp ℂ p (volume : Measure V), Ω.cutoff F = Ω.cutoff f ∧ + ‖F‖ₑ + lqNorm q (fun k => dyadicWeight s k * lpModulus p L F k) < ∞) ↔ + Ω.intrinsicNorm hp L s q f < ∞ := by + constructor + · rintro ⟨F, hFf, hF⟩ + rw [← Ω.intrinsicNorm_congr hp L s q hFf] + exact (Ω.intrinsicNorm_le_localMeansNorm hp L s q F).trans_lt + ((Ω.coneBump.localMeansNorm_le hp L s hq F).trans_lt + (ENNReal.mul_lt_top (Ω.coneBump.upperConst_ne_top L s).lt_top hF)) + · intro hf + exact ⟨Ω.extension hp L f, Ω.cutoff_extension hp hL hs hq hf, + (Ω.modNorm_extension_le hp L hs hq hf).trans_lt + (ENNReal.mul_lt_top (Ω.coneBump.synthConst_ne_top hs hsL).lt_top hf)⟩ + +end LipschitzGraph + +end Rd diff --git a/LeanPool/FunctionSpaces/Domains/Extension/SobolevExtension.lean b/LeanPool/FunctionSpaces/Domains/Extension/SobolevExtension.lean new file mode 100644 index 0000000000..ace769e6ec --- /dev/null +++ b/LeanPool/FunctionSpaces/Domains/Extension/SobolevExtension.lean @@ -0,0 +1,854 @@ +/- +Copyright (c) 2026 Mario Ullrich. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Mario Ullrich +-/ +module + +public import LeanPool.FunctionSpaces.Rd.Sobolev.DivergenceKernels +public import LeanPool.FunctionSpaces.Domains.Lipschitz.BoundedLipschitz +public import LeanPool.FunctionSpaces.Rd.TriebelLizorkin.TriebelLizorkinLocalMeans +public import LeanPool.FunctionSpaces.Rd.Sobolev.SobolevTriebelLizorkin +public import LeanPool.FunctionSpaces.Domains.Sobolev.LipschitzDomainH1 +public import LeanPool.FunctionSpaces.Rd.Sobolev.SobolevJets +public import LeanPool.FunctionSpaces.Rd.Sobolev.WeakDerivativeLeibniz + +/- +Modified for Lean Pool: module names and imports adapted. +-/ + +/-! +# Bounded extensions of `W^1_p` by the local means of the gradient + +Let `V` be a finite-dimensional real inner product space of dimension `n` and `1 ≤ p ≤ ∞`; the +bounds of the local extension need `1 < p < ∞`. This file holds the estimates behind the extension +theorem of Calderón and Stein in Rychkov's form: the local extension +`∑_j η_j ⋆ 1_W (k_j ⋆ 1_T f)` of a Sobolev function `f` on an open set `T` lies in `W^1_p(V)`, +with a bound by `‖f‖_{L_p(T)} + ∑_i ‖∂_{e_i} f‖_{L_p(T)}`. The extension operators +(`Rd.SobolevExtensionOp`, `Rd.BoundedLipschitzDomain.exists_sobolevExtensionOp`) and the +extension theorem itself (`Rd.BoundedLipschitzDomain.exists_extendsSobolev`) are built from it. + +* **Local means by the gradient**: for a bump with moment kernel `m` of order two, the local + means kernels are divergences, `k_{j+1} = 2^(-j) ∑_i ∂_{e_i} (K_i)_{2^j}` with the divergence + kernels `K_i` of `m` (`Rd.LocalMeansBump.divKernel`, `Rd.LocalMeansBump.kernel_two_succ_apply`). + If `g_i = ∂_{e_i} f` weakly on an open set `T` and the kernels at `x` only see `T`, then + `(k_{j+1} ⋆ 1_T f)(x) = 2^(-j) ∑_i ((K_i)_{2^j} ⋆ 1_T g_i)(x)` + (`Rd.LocalMeansBump.conv_kernel_two_succ_eq`, by the general identity for kernels that are + sums of derivatives, `Rd.conv_indicator_eq_mul_sum_of_eq_sum_iteratedLineDerivOp`), and the + strong type of the Calderón–Zygmund + families `((K_i)_{2^j})_j` bounds the local means quasi-norm of Triebel–Lizorkin type on a set + (`Rd.LocalMeansBump.tlLocalNormOn`) by `‖f‖_{L_p(T)} + ∑_i ‖g_i‖_{L_p(T)}` + (`Rd.LocalMeansBump.tlLocalNormOn_le_patchConst`). The step from a pointwise bound of the + local means by convolutions with Schwartz kernels to the quasi-norm holds for every kernel family + (`Rd.LocalMeansBump.tlLocalNormOn_le_of_pointwise`). +* **One patch**: the local extension lies in `F^1_{p,2}(V) = W^1_p(V)` + (`Rd.LocalMeansBump.memTriebelLizorkin_localExtension_of_tlLocalNormOn`), agrees with `f` on the + patch (`Rd.LocalMeansBump.ae_localExtension_eq_of_ae_eq_indicator`) and has the constant + `Rd.LocalMeansBump.extensionConst` + (`Rd.LocalMeansBump.enorm_localExtension_add_le_extensionConst`); + `Rd.ExtendsSobolev p O U C` says that extensions from `U` exist with the constant `C`. +* **Pasting** (`Rd.extendsSobolev_of_cover`): a smooth resolution of unity subordinate to a finite + cover pastes extensions in `W^1_p(V)`, by the product rule (`Rd.hasWeakLineDeriv_mulLp`), with + the arithmetic of `Rd.pasting_bound`. Extensions also come from `L_p` bounds alone + (`Rd.extendsSobolev_of_eLpNorm_le`). +* **Supports and cutoffs**: the dilates of the divergence kernels of a cone bump keep the patches + inside the domain (`Rd.LipschitzGraph.patch_support_divKernel`), and the patches of a bounded + Lipschitz domain have smooth cutoffs (`Rd.BoundedLipschitzDomain.exists_cutoff_boundary`, + `Rd.BoundedLipschitzDomain.exists_cutoff_interior`), which serve the extensions by reflection and + those of higher order. +* **Dimension zero**: for `n = 0`, every `f ∈ W^m_p(O)` agrees on `O` with `F = f` or `F = 0` in + `W^m_p(V)` (`Rd.exists_memSobolev_of_memWeakSobolev_of_subsingleton`). +-/ + +@[expose] public section + +open MeasureTheory Filter Topology Module Metric TopologicalSpace +open scoped ENNReal SchwartzMap FourierTransform LineDeriv Real BesselPotentialSpace + +open ENNReal (lqNorm dyadicWeight) + +namespace Rd + +variable {V : Type*} [NormedAddCommGroup V] [InnerProductSpace ℝ V] [FiniteDimensional ℝ V] + [MeasurableSpace V] [BorelSpace V] + +/-! ### Convolutions with sums of derivatives -/ + +/-- **A convolution with a sum of derivatives of dilated kernels**: let `g_i = ∂^{u_i} f` weakly +on an open set `T` with `f ∈ L_p(T)`, let `K_i` be Schwartz functions with compact support, `t ≠ 0`, +and let `κ = c ∑_i ∂^{u_i} (K_i)_t`. If `x - y ∈ T` for every `i` and every `y` in the support of +`(K_i)_t`, then `(κ ⋆ 1_T f)(x) = c ∑_i ((K_i)_t ⋆ 1_T g_i)(x)`: each derivative moves from the +kernel to `1_T f` (`Rd.conv_eq_conv_iteratedLineDerivOp_of_hasWeakLineDeriv`). -/ +theorem conv_indicator_eq_mul_sum_of_eq_sum_iteratedLineDerivOp {p : ℝ≥0∞} [Fact (1 ≤ p)] + {ι : Type*} [Fintype ι] {k : ℕ} {T : Opens V} {f : V → ℂ} {g : ι → V → ℂ} + {u : ι → Fin k → V} (hf : MemLp f p (volume.restrict T)) + (hfg : ∀ i, HasWeakLineDeriv T (u i) f (g i)) {K : ι → 𝓢(V, ℂ)} + (hK : ∀ i, HasCompactSupport (K i : V → ℂ)) {t : ℝ} (ht : t ≠ 0) {κ : V → ℂ} {c : ℂ} + (hκ : ∀ y, κ y = c * ∑ i, (∂^{u i} (schwartzDilate t ht (K i)) : 𝓢(V, ℂ)) y) {x : V} + (hx : ∀ i, ∀ y ∈ tsupport (dilate t (K i : V → ℂ)), x - y ∈ T) : + conv κ ((T : Set V).indicator f) volume x = + c * ∑ i, conv (dilate t (K i : V → ℂ)) ((T : Set V).indicator (g i)) volume x := by + have hT := T.isOpen.measurableSet + have hKc : ∀ i, (schwartzDilate t ht (K i) : V → ℂ) = dilate t (K i) := fun i => + coe_schwartzDilate _ _ _ + have hcs : ∀ i, HasCompactSupport (schwartzDilate t ht (K i) : V → ℂ) := + fun i => by rw [hKc]; exact hasCompactSupport_dilate (hK i) ht + have hloc : LocallyIntegrable ((T : Set V).indicator f) volume := + ((memLp_indicator_iff_restrict hT.nullMeasurableSet).2 hf).locallyIntegrable Fact.out + have hfg' : ∀ i, HasWeakLineDeriv T (u i) ((T : Set V).indicator f) + ((T : Set V).indicator (g i)) := fun i => + (hfg i).congr_ae (indicator_ae_eq_restrict hT.nullMeasurableSet).symm + (indicator_ae_eq_restrict hT.nullMeasurableSet).symm + have hstep : ∀ i, conv (dilate t (K i : V → ℂ)) ((T : Set V).indicator (g i)) volume x = + conv (∂^{u i} (schwartzDilate t ht (K i)) : 𝓢(V, ℂ)) ((T : Set V).indicator f) volume x := + fun i => by + rw [← hKc, conv_eq_conv_iteratedLineDerivOp_of_hasWeakLineDeriv (hfg' i) (hcs i) + (by rw [hKc]; exact hx i)] + have hint : ∀ i, Integrable fun y => (∂^{u i} (schwartzDilate t ht (K i)) : 𝓢(V, ℂ)) y * + (T : Set V).indicator f (x - y) := fun i => + ((hcs i).mono' ((subset_tsupport _).trans (SchwartzMap.tsupport_iteratedLineDerivOp_subset _ + _))).convolutionExists_left (ContinuousLinearMap.mul ℂ ℂ) + (∂^{u i} (schwartzDilate t ht (K i))).continuous hloc x + rw [Finset.sum_congr rfl fun i _ => hstep i] + simp only [conv_apply] + simp_rw [hκ, mul_assoc, Finset.sum_mul] + rw [integral_const_mul, integral_finsetSum _ fun i _ => hint i] + +/-! ### The local means kernels as divergences -/ + +namespace LocalMeansBump + +variable (b : LocalMeansBump V) + +/-- The moment kernel of order two of a bump of radius `R` vanishes outside the ball of radius +`2R`. -/ +theorem momentKernel_two_eq_zero {z : V} (hz : 2 * b.radius < ‖z‖) : + momentKernel b.toFun 2 z = 0 := + b.momentKernel_eq_zero 2 (by exact_mod_cast hz) + +/-- The **divergence kernels** `K_i` of a bump: the divergence kernels (`Rd.divergenceSchwartz`) of +its moment kernel `m` of order two in the directions of the orthonormal basis `e_i = Rd.gridBasis`, +so that `∑_i ∂_{e_i} K_i = m_2 - m` (`Rd.sum_lineDerivOp_divergenceSchwartz`); at the dyadic scales +this writes the local means kernels as divergences (`Rd.LocalMeansBump.kernel_two_succ_apply`). -/ +noncomputable def divKernel (i : Fin (finrank ℝ V)) : 𝓢(V, ℂ) := + divergenceSchwartz (b.contDiff_momentKernel 2) (fun _ hz => b.momentKernel_two_eq_zero hz) + (gridBasis V i) + +/-- The divergence kernels of a bump have compact support. -/ +theorem hasCompactSupport_divKernel (i : Fin (finrank ℝ V)) : + HasCompactSupport (b.divKernel i : V → ℂ) := + hasCompactSupport_divergenceKernel (fun _ hz => b.momentKernel_two_eq_zero hz) _ + +/-- The divergence kernels vanish at `y` if the moment kernel vanishes at every `t y`, +`t ∈ [1, 2]`. -/ +theorem divKernel_eq_zero (i : Fin (finrank ℝ V)) {y : V} + (hy : ∀ t : ℝ, 1 ≤ t → t ≤ 2 → momentKernel b.toFun 2 (t • y) = 0) : b.divKernel i y = 0 := + divergenceKernel_eq_zero _ hy + +/-- **The local means kernels of order two at dyadic scales**: `k_{j+1} = (m_2 - m)_{2^j}` +(`Rd.LocalMeansBump.kernel_succ_eq_dilate`). -/ +theorem kernel_two_succ (j : ℕ) : + b.kernel 2 (j + 1) = + dilate (2 ^ j) (fun y => dilate 2 (momentKernel b.toFun 2) y - momentKernel b.toFun 2 y) := + b.kernel_succ_eq_dilate 2 j + +/-- **The local means kernels are divergences**: `k_{j+1} = 2^(-j) ∑_i ∂_{e_i} (K_i)_{2^j}` +(`Rd.sum_lineDerivOp_schwartzDilate_divergenceSchwartz`). -/ +theorem kernel_two_succ_apply (j : ℕ) (y : V) : + b.kernel 2 (j + 1) y = ((((2 : ℝ) ^ j)⁻¹ : ℝ) : ℂ) * ∑ i, (∂_{gridBasis V i} + (schwartzDilate (2 ^ j) (by positivity) (b.divKernel i)) : 𝓢(V, ℂ)) y := by + unfold divKernel + rw [sum_lineDerivOp_schwartzDilate_divergenceSchwartz (gridBasis V), kernel_two_succ] + have h : (((2 : ℝ) ^ j : ℝ) : ℂ) ≠ 0 := by exact_mod_cast (pow_pos two_pos j).ne' + push_cast + field_simp + +/-- **The moment kernel of order two of a bump has vanishing first moments** +(`Rd.integral_inner_mul_momentKernel_two`). -/ +theorem integral_inner_mul_momentKernel (w : V) : + ∫ x, (inner ℝ w x : ℂ) * momentKernel b.toFun 2 x = 0 := + integral_inner_mul_momentKernel_two w + (((Complex.continuous_ofReal.comp (continuous_const.inner continuous_id)).mul + b.contDiff.continuous).integrable_of_hasCompactSupport b.hasCompactSupport.mul_left) + +/-- **The divergence kernels form Calderón–Zygmund families**: the dilates `(K_i)_{2^j}` have the +Fourier overlap `Rd.meanZeroOverlap (K_i)` and the Hörmander constant `4 H_{K_i}` +(`Rd.isCZFamily_divergenceSchwartz`). -/ +theorem isCZFamily_divKernel (i : Fin (finrank ℝ V)) : + IsCZFamily (fun j => dilate (2 ^ j) (b.divKernel i : V → ℂ)) (meanZeroOverlap (b.divKernel i)) + (4 * familyHormanderConst V fun k l => SchwartzMap.seminorm ℝ k l (b.divKernel i)) := + isCZFamily_divergenceSchwartz (b.contDiff_momentKernel 2) + (fun _ hz => b.momentKernel_two_eq_zero hz) (b.integral_inner_mul_momentKernel (gridBasis V i)) + +/-! ### Local means by the gradient -/ + +variable {p : ℝ≥0∞} [Fact (1 ≤ p)] + +/-- **Local means of order two by the gradient, at one point**: let `g_i = ∂_{e_i} f` weakly on an +open set `T`, `f ∈ L_p(T)`, and let `x - y ∈ T` for every `y` in the support of every +`(K_i)_{2^j}`. Then `(k_{j+1} ⋆ 1_T f)(x) = 2^(-j) ∑_i ((K_i)_{2^j} ⋆ 1_T g_i)(x)`: the kernel is +`2^(-j) ∑_i ∂_{e_i} (K_i)_{2^j}` (`Rd.LocalMeansBump.kernel_two_succ_apply`), and each derivative +moves to `f` (`Rd.conv_indicator_eq_mul_sum_of_eq_sum_iteratedLineDerivOp`). -/ +theorem conv_kernel_two_succ_eq {T : Opens V} {f : V → ℂ} {g : Fin (finrank ℝ V) → V → ℂ} + (hf : MemLp f p (volume.restrict T)) + (hfg : ∀ i, HasWeakLineDeriv T (fun _ : Fin 1 => gridBasis V i) f (g i)) (j : ℕ) {x : V} + (hx : ∀ i, ∀ y ∈ tsupport (dilate (2 ^ j) (b.divKernel i : V → ℂ)), x - y ∈ T) : + conv (b.kernel 2 (j + 1)) ((T : Set V).indicator f) volume x = + ((((2 : ℝ) ^ j)⁻¹ : ℝ) : ℂ) * ∑ i, conv (dilate (2 ^ j) (b.divKernel i : V → ℂ)) + ((T : Set V).indicator (g i)) volume x := + conv_indicator_eq_mul_sum_of_eq_sum_iteratedLineDerivOp hf hfg b.hasCompactSupport_divKernel + (by positivity) (b.kernel_two_succ_apply j) hx + +/-- The constant `∑_i C_{p}(K_i)` of the gradient bound of the local means, with the constants +`C_p(K_i) = Rd.czConst V p B_i H_i` of the Calderón–Zygmund families of the divergence kernels +(`Rd.LocalMeansBump.isCZFamily_divKernel`). -/ +noncomputable def gradientConst (p : ℝ≥0∞) : ℝ≥0∞ := + ∑ i, czConst V p (meanZeroOverlap (b.divKernel i)) + (4 * familyHormanderConst V fun k l => SchwartzMap.seminorm ℝ k l (b.divKernel i)) + +/-- The constant of the gradient bound is finite for `1 < p < ∞`. -/ +theorem gradientConst_ne_top {p : ℝ≥0∞} (hp1 : 1 < p) (hp : p ≠ ∞) : b.gradientConst p ≠ ∞ := + ENNReal.sum_ne_top.2 fun _ _ => czConst_ne_top hp1 hp (meanZeroOverlap_ne_top _) + (ENNReal.mul_ne_top ENNReal.ofNat_ne_top (familyHormanderConst_ne_top _)) + +/-! ### Local means of Triebel–Lizorkin type on a set -/ + +/-- The **local means quasi-norm of Triebel–Lizorkin type on a set** `W`, +`‖ x ↦ ‖(2^(js) |1_W (k_j ⋆ f)(x)|)_j‖_{ℓ_q} ‖_p`. -/ +noncomputable def tlLocalNormOn (hp : p ≠ ∞) {W : Set V} (hW : MeasurableSet W) (L : ℕ) (s : ℝ) + (q : ℝ≥0∞) (f : Lp ℂ p (volume : Measure V)) : ℝ≥0∞ := + eLpNorm (fun x => lqNorm q (fun j => dyadicWeight s j * + ‖(indicatorLp hW (b.localMean hp L j f) : V → ℂ) x‖ₑ)) p volume + +/-- The local means on `W` are bounded by the local means quasi-norm of Triebel–Lizorkin type: +`‖1_W (k_j ⋆ f)‖_p ≤ 2^(-js) X` with `X = Rd.LocalMeansBump.tlLocalNormOn`. -/ +theorem enorm_indicatorLp_localMean_le (hp : p ≠ ∞) {W : Set V} (hW : MeasurableSet W) (L : ℕ) + {s : ℝ} {q : ℝ≥0∞} (hq : q ≠ 0) (f : Lp ℂ p (volume : Measure V)) (j : ℕ) : + ‖indicatorLp hW (b.localMean hp L j f)‖ₑ ≤ + dyadicWeight (-s) j * b.tlLocalNormOn hp hW L s q f := + enorm_le_dyadicWeight_neg_mul_eLpNorm_lqNorm hq s + (fun j => indicatorLp hW (b.localMean hp L j f)) j + +/-- The weighted local means on `W` are bounded by the local means quasi-norm of Triebel–Lizorkin +type: `2^(js) ‖1_W (k_j ⋆ f)‖_p ≤ X` with `X = Rd.LocalMeansBump.tlLocalNormOn` +(`Rd.LocalMeansBump.enorm_indicatorLp_localMean_le`). -/ +theorem dyadicWeight_mul_enorm_indicatorLp_localMean_le (hp : p ≠ ∞) {W : Set V} + (hW : MeasurableSet W) (L : ℕ) {s : ℝ} {q : ℝ≥0∞} (hq : q ≠ 0) + (f : Lp ℂ p (volume : Measure V)) (j : ℕ) : + dyadicWeight s j * ‖indicatorLp hW (b.localMean hp L j f)‖ₑ ≤ b.tlLocalNormOn hp hW L s q f := + calc dyadicWeight s j * ‖indicatorLp hW (b.localMean hp L j f)‖ₑ + ≤ dyadicWeight s j * (dyadicWeight (-s) j * b.tlLocalNormOn hp hW L s q f) := by + gcongr + exact b.enorm_indicatorLp_localMean_le hp hW L hq f j + _ = b.tlLocalNormOn hp hW L s q f := by + rw [← mul_assoc, ENNReal.dyadicWeight_mul_neg_self, one_mul] + +/-- The terms of the local extension: `‖η_j ⋆ 1_W (k_j ⋆ f)‖_p ≤ 2 ‖m‖_1 2^(-js) X` with +`X = Rd.LocalMeansBump.tlLocalNormOn` (`Rd.LocalMeansBump.enorm_localExtTerm_le_of_forall_le`). -/ +theorem enorm_localExtTerm_le (hp : p ≠ ∞) {W : Set V} (hW : MeasurableSet W) (L : ℕ) + {s : ℝ} {q : ℝ≥0∞} (hq : q ≠ 0) (f : Lp ℂ p (volume : Measure V)) (j : ℕ) : + ‖b.localExtTerm hp hW L j f‖ₑ ≤ 2 * eLpNorm (momentKernel b.toFun L) 1 volume * + (dyadicWeight (-s) j * b.tlLocalNormOn hp hW L s q f) := + b.enorm_localExtTerm_le_of_forall_le hp hW L + (b.dyadicWeight_mul_enorm_indicatorLp_localMean_le hp hW L hq f) j + +/-- **The local extension converges absolutely** for `s > 0` and a finite local means quasi-norm +of Triebel–Lizorkin type on `W` (`Rd.LocalMeansBump.summable_localExtTerm_of_forall_le`). -/ +theorem summable_localExtTerm_of_tlLocalNormOn (hp : p ≠ ∞) {W : Set V} (hW : MeasurableSet W) + (L : ℕ) {s : ℝ} (hs : 0 < s) {q : ℝ≥0∞} (hq : q ≠ 0) {f : Lp ℂ p (volume : Measure V)} + (hf : b.tlLocalNormOn hp hW L s q f < ∞) : Summable fun j => b.localExtTerm hp hW L j f := + b.summable_localExtTerm_of_forall_le hp hW L hs hf.ne + (b.dyadicWeight_mul_enorm_indicatorLp_localMean_le hp hW L hq f) + +/-- **The local extension in `L_p`**: for `s > 0`, +`‖∑_j η_j ⋆ 1_W (k_j ⋆ f)‖_p ≤ 2 ‖m‖_1 (1 - 2^(-s))⁻¹ X` with +`X = Rd.LocalMeansBump.tlLocalNormOn` (`Rd.LocalMeansBump.tsum_enorm_localExtTerm_le`). -/ +theorem enorm_localExtension_le_of_tlLocalNormOn (hp : p ≠ ∞) {W : Set V} (hW : MeasurableSet W) + (L : ℕ) {s : ℝ} (hs : 0 < s) {q : ℝ≥0∞} (hq : q ≠ 0) {f : Lp ℂ p (volume : Measure V)} + (hf : b.tlLocalNormOn hp hW L s q f < ∞) : + ‖b.localExtension hp hW L f‖ₑ ≤ 2 * eLpNorm (momentKernel b.toFun L) 1 volume * + (1 - (2 : ℝ≥0∞) ^ (-s))⁻¹ * b.tlLocalNormOn hp hW L s q f := by + have h1 : ‖b.localExtension hp hW L f‖ₑ ≤ ∑' j, ‖b.localExtTerm hp hW L j f‖ₑ := + ENNReal.le_tsum_of_tendsto_sum (C := 1) ENNReal.one_ne_top (fun x y => eNorm_add_le x y) + (fun x => by rw [one_mul]) + (b.tendsto_sum_localExtTerm_of_summable hp hW L + (b.summable_localExtTerm_of_tlLocalNormOn hp hW L hs hq hf)) + exact h1.trans (b.tsum_enorm_localExtTerm_le hp hW L + (b.dyadicWeight_mul_enorm_indicatorLp_localMean_le hp hW L hq f)) + +/-- **The local extension lies in `F^s_{p,q}`**: for `1 < p < ∞`, `1 < q ≤ ∞`, `s > 0` and a +finite local means quasi-norm of Triebel–Lizorkin type on `W`, +`‖∑_j η_j ⋆ 1_W (k_j ⋆ f)‖_{F^s_{p,q}} ≤ C X` with `C = Rd.LocalMeansBump.tlUpperConst L p q s` +(`Rd.LocalMeansBump.triebelLizorkinNorm_le_of_tendsto_sum_dual`). -/ +theorem triebelLizorkinNorm_localExtension_le (hp1 : 1 < p) (hp : p ≠ ∞) {W : Set V} + (hW : MeasurableSet W) (L : ℕ) {s : ℝ} (hs : 0 < s) {q : ℝ≥0∞} (hq1 : 1 < q) + {f : Lp ℂ p (volume : Measure V)} (hf : b.tlLocalNormOn hp hW L s q f < ∞) : + triebelLizorkinNorm s q (b.localExtension hp hW L f) ≤ + b.tlUpperConst L p q s * b.tlLocalNormOn hp hW L s q f := + b.triebelLizorkinNorm_le_of_tendsto_sum_dual L hp1 hp hq1 s + (b.tendsto_sum_localExtTerm_of_summable hp hW L + (b.summable_localExtTerm_of_tlLocalNormOn hp hW L hs (zero_lt_one.trans hq1).ne' hf)) + +/-! ### The Triebel–Lizorkin local means from a pointwise bound -/ + +/-- **The local means from a pointwise bound, almost everywhere**: let `F = φ` almost +everywhere, and let `2^{(j+1)s} |(k_{j+1} ⋆ φ)(x)| ≤ c ∑_i |((K_i)_{2^j} ⋆ h_i)(x)|` for the local +means kernels `k_j` of order `L`, every `x ∈ W` and every level `j`, with Schwartz kernels `K_i` +and functions `h_i`. Then almost everywhere +`‖(2^{js} |1_W (k_j ⋆ F)(x)|)_j‖_{ℓ_2} ≤ |1_W (k_0 ⋆ F)(x)| + +c ∑_i ‖(((K_i)_{2^j} ⋆ h_i)(x))_j‖_{ℓ_2}`. -/ +theorem ae_lqNorm_le_of_pointwise (hp : p ≠ ∞) (L : ℕ) (s : ℝ) {W : Set V} + (hW : MeasurableSet W) {φ : V → ℂ} {ι : Type*} [Fintype ι] (K : ι → 𝓢(V, ℂ)) + (h : ι → V → ℂ) (c : ℝ≥0∞) + (hpt : ∀ x ∈ W, ∀ j, dyadicWeight s (j + 1) * ‖conv (b.kernel L (j + 1)) φ volume x‖ₑ ≤ + c * ∑ i, ‖conv (dilate (2 ^ j) (K i : V → ℂ)) (h i) volume x‖ₑ) + {F : Lp ℂ p (volume : Measure V)} (hF : (F : V → ℂ) =ᵐ[volume] φ) : + ∀ᵐ x ∂volume, lqNorm 2 (fun j => dyadicWeight s j * + ‖(indicatorLp hW (b.localMean hp L j F) : V → ℂ) x‖ₑ) ≤ + ‖(indicatorLp hW (b.localMean hp L 0 F) : V → ℂ) x‖ₑ + c * ∑ i, lqNorm 2 (fun j => + ‖conv (dilate (2 ^ j) (K i : V → ℂ)) (h i) volume x‖ₑ) := by + have hae : ∀ᵐ x ∂volume, ∀ j, (indicatorLp hW (b.localMean hp L j F) : V → ℂ) x = + W.indicator (conv (b.kernel L j) φ volume) x := ae_all_iff.2 fun j => by + filter_upwards [indicatorLp_apply_ae hW (b.localMean hp L j F), b.localMean_ae_eq hp L j F] + with x h1 h2 + rw [h1, ← conv_congr_ae hF] + by_cases hxW : x ∈ W + · rw [Set.indicator_of_mem hxW, Set.indicator_of_mem hxW, h2] + · rw [Set.indicator_of_notMem hxW, Set.indicator_of_notMem hxW] + filter_upwards [hae] with x hx + refine (ENNReal.lqNorm_le_head_add_shift one_le_two _).trans ?_ + rw [ENNReal.dyadicWeight_zero_right, one_mul] + gcongr + calc lqNorm 2 (fun j => dyadicWeight s (j + 1) * + ‖(indicatorLp hW (b.localMean hp L (j + 1) F) : V → ℂ) x‖ₑ) + ≤ lqNorm 2 (fun j => c * ∑ i, ‖conv (dilate (2 ^ j) (K i : V → ℂ)) (h i) volume x‖ₑ) := + ENNReal.lqNorm_mono fun j => by + rw [hx (j + 1)] + by_cases hxW : x ∈ W + · rw [Set.indicator_of_mem hxW] + exact hpt x hxW j + · simp [Set.indicator_of_notMem hxW] + _ = c * lqNorm 2 (fun j => ∑ i, ‖conv (dilate (2 ^ j) (K i : V → ℂ)) (h i) volume x‖ₑ) := + ENNReal.lqNorm_const_mul _ _ + _ ≤ _ := by + gcongr + exact ENNReal.lqNorm_sum_le one_le_two _ fun i j => + ‖conv (dilate (2 ^ j) (K i : V → ℂ)) (h i) volume x‖ₑ + +/-- **The local means of Triebel–Lizorkin type from a pointwise bound**: under the hypotheses of +`Rd.LocalMeansBump.ae_lqNorm_le_of_pointwise`, with almost everywhere strongly measurable `h_i`, +`‖ x ↦ ‖(2^{js} |1_W (k_j ⋆ F)(x)|)_j‖_{ℓ_2} ‖_p ≤ ‖m_L‖_1 ‖F‖_p + +c ∑_i ‖ x ↦ ‖(((K_i)_{2^j} ⋆ h_i)(x))_j‖_{ℓ_2} ‖_p`, with the moment kernel `m_L` of order `L`. -/ +theorem tlLocalNormOn_le_of_pointwise (hp : p ≠ ∞) (L : ℕ) (s : ℝ) {W : Set V} + (hW : MeasurableSet W) {φ : V → ℂ} {ι : Type*} [Fintype ι] (K : ι → 𝓢(V, ℂ)) + (h : ι → V → ℂ) (hh : ∀ i, AEStronglyMeasurable (h i) volume) (c : ℝ≥0∞) + (hpt : ∀ x ∈ W, ∀ j, dyadicWeight s (j + 1) * ‖conv (b.kernel L (j + 1)) φ volume x‖ₑ ≤ + c * ∑ i, ‖conv (dilate (2 ^ j) (K i : V → ℂ)) (h i) volume x‖ₑ) + {F : Lp ℂ p (volume : Measure V)} (hF : (F : V → ℂ) =ᵐ[volume] φ) : + b.tlLocalNormOn hp hW L s 2 F ≤ eLpNorm (momentKernel b.toFun L) 1 volume * ‖F‖ₑ + + c * ∑ i, eLpNorm (fun x => lqNorm 2 (fun j => + ‖conv (dilate (2 ^ j) (K i : V → ℂ)) (h i) volume x‖ₑ)) p volume := by + have hΛ : ∀ i, AEMeasurable (fun x => lqNorm 2 (fun j => + ‖conv (dilate (2 ^ j) (K i : V → ℂ)) (h i) volume x‖ₑ)) volume := fun i => + aemeasurable_lqNorm_comp (fun j => (aestronglyMeasurable_conv + (continuous_dilate (K i).continuous _).aestronglyMeasurable (hh i)).eNorm) 2 + have h1 : b.tlLocalNormOn hp hW L s 2 F ≤ + eLpNorm (fun x => ‖(indicatorLp hW (b.localMean hp L 0 F) : V → ℂ) x‖ₑ) p volume + + eLpNorm (fun x => c * ∑ i, lqNorm 2 (fun j => + ‖conv (dilate (2 ^ j) (K i : V → ℂ)) (h i) volume x‖ₑ)) p volume := by + refine (eLpNorm_mono_eNorm_ae + (aemeasurable_lqNorm_comp (fun j => ((Lp.aestronglyMeasurable _).eNorm.const_mul _)) + 2).aestronglyMeasurable ?_).trans (eLpNorm_add_le Fact.out) + filter_upwards [b.ae_lqNorm_le_of_pointwise hp L s hW K h c hpt hF] with x hx + simpa only [eNorm_eq_self, Pi.add_apply] using hx + have h2 : eLpNorm (fun x => c * ∑ i, lqNorm 2 (fun j => + ‖conv (dilate (2 ^ j) (K i : V → ℂ)) (h i) volume x‖ₑ)) p volume ≤ + c * ∑ i, eLpNorm (fun x => lqNorm 2 (fun j => + ‖conv (dilate (2 ^ j) (K i : V → ℂ)) (h i) volume x‖ₑ)) p volume := by + rw [eLpNorm_const_mul_ennreal + (Finset.aemeasurable_fun_sum _ fun i _ => hΛ i).aestronglyMeasurable] + gcongr + simpa only [Finset.sum_fn] using eLpNorm_sum_le (p := p) (μ := volume) Fact.out + have h3 : eLpNorm (fun x => ‖(indicatorLp hW (b.localMean hp L 0 F) : V → ℂ) x‖ₑ) p volume ≤ + eLpNorm (momentKernel b.toFun L) 1 volume * ‖F‖ₑ := by + rw [eLpNorm_eNorm _ (Lp.aestronglyMeasurable _), ← Lp.eNorm_def] + exact b.enorm_indicatorLp_localMean_zero_le hp hW L F + exact h1.trans (add_le_add h3 h2) + +/-! ### The Triebel–Lizorkin local means of order two by the gradient -/ + +/-- **One local mean by the gradient**: under the hypotheses of +`Rd.LocalMeansBump.conv_kernel_two_succ_eq`, +`2^(j+1) |(k_{j+1} ⋆ 1_T f)(x)| ≤ 2 ∑_i |((K_i)_{2^j} ⋆ 1_T g_i)(x)|`. -/ +theorem dyadicWeight_mul_enorm_conv_kernel_le {T : Opens V} {f : V → ℂ} + {g : Fin (finrank ℝ V) → V → ℂ} (hf : MemLp f p (volume.restrict T)) + (hfg : ∀ i, HasWeakLineDeriv T (fun _ : Fin 1 => gridBasis V i) f (g i)) (j : ℕ) {x : V} + (hx : ∀ i, ∀ y ∈ tsupport (dilate (2 ^ j) (b.divKernel i : V → ℂ)), x - y ∈ T) : + dyadicWeight 1 (j + 1) * ‖conv (b.kernel 2 (j + 1)) ((T : Set V).indicator f) volume x‖ₑ ≤ + 2 * ∑ i, ‖conv (dilate (2 ^ j) (b.divKernel i : V → ℂ)) ((T : Set V).indicator (g i)) + volume x‖ₑ := by + have hw : dyadicWeight 1 (j + 1) * ‖(((((2 : ℝ) ^ j)⁻¹ : ℝ) : ℂ))‖ₑ = 2 := by + rw [ENNReal.dyadicWeight_succ, ENNReal.dyadicWeight_eq_pow, ENNReal.rpow_one, + ← ofReal_norm, Complex.norm_real, Real.norm_of_nonneg (by positivity), + ENNReal.ofReal_inv_of_pos (by positivity), ENNReal.ofReal_pow zero_le_two, + ENNReal.ofReal_ofNat, mul_assoc, ENNReal.mul_inv_cancel (pow_ne_zero _ two_ne_zero) + (ENNReal.pow_ne_top ENNReal.ofNat_ne_top), mul_one] + rw [b.conv_kernel_two_succ_eq hf hfg j hx, eNorm_mul, ← mul_assoc, hw] + gcongr + exact eNorm_sum_le _ _ + +/-- **The local means of order two by the gradient, pointwise**: if `x - y ∈ T` for `x ∈ W`, every +level `j` and every `y` in the support of `(K_i)_{2^j}`, and `F = 1_T f` in `L_p`, then almost +everywhere `‖(2^j |1_W (k_j ⋆ F)(x)|)_j‖_{ℓ_2} ≤ |1_W (k_0 ⋆ F)(x)| + +2 ∑_i ‖(((K_i)_{2^j} ⋆ 1_T g_i)(x))_j‖_{ℓ_2}` (`Rd.LocalMeansBump.ae_lqNorm_le_of_pointwise`). -/ +theorem ae_lqNorm_le_of_hasWeakLineDeriv (hp : p ≠ ∞) {W : Set V} (hW : MeasurableSet W) + {T : Opens V} {f : V → ℂ} {g : Fin (finrank ℝ V) → V → ℂ} + (hf : MemLp f p (volume.restrict T)) + (hfg : ∀ i, HasWeakLineDeriv T (fun _ : Fin 1 => gridBasis V i) f (g i)) + (hsupp : ∀ x ∈ W, ∀ j i, ∀ y ∈ tsupport (dilate (2 ^ j) (b.divKernel i : V → ℂ)), x - y ∈ T) + {F : Lp ℂ p (volume : Measure V)} (hF : (F : V → ℂ) =ᵐ[volume] (T : Set V).indicator f) : + ∀ᵐ x ∂volume, lqNorm 2 (fun j => dyadicWeight 1 j * + ‖(indicatorLp hW (b.localMean hp 2 j F) : V → ℂ) x‖ₑ) ≤ + ‖(indicatorLp hW (b.localMean hp 2 0 F) : V → ℂ) x‖ₑ + 2 * ∑ i, lqNorm 2 (fun j => + ‖conv (dilate (2 ^ j) (b.divKernel i : V → ℂ)) ((T : Set V).indicator (g i)) volume + x‖ₑ) := + b.ae_lqNorm_le_of_pointwise hp 2 1 hW b.divKernel (fun i => (T : Set V).indicator (g i)) 2 + (fun x hx j => b.dyadicWeight_mul_enorm_conv_kernel_le hf hfg j (hsupp x hx j)) hF + +omit [Fact (1 ≤ p)] in +/-- The square functions of the divergence kernels: for `1 < p < ∞`, +`‖ x ↦ ‖(((K_i)_{2^j} ⋆ 1_T g)(x))_j‖_{ℓ_2} ‖_p ≤ C_p(K_i) ‖g‖_{L_p(T)}` +(`Rd.IsCZFamily.eLpNorm_lqNorm_conv_le`). -/ +theorem eLpNorm_lqNorm_conv_divKernel_le [Nontrivial V] (hp1 : 1 < p) (hp : p ≠ ∞) + {T : Opens V} {g : V → ℂ} (hg : MemLp g p (volume.restrict T)) (i : Fin (finrank ℝ V)) : + eLpNorm (fun x => lqNorm 2 (fun j => ‖conv (dilate (2 ^ j) (b.divKernel i : V → ℂ)) + ((T : Set V).indicator g) volume x‖ₑ)) p volume ≤ + czConst V p (meanZeroOverlap (b.divKernel i)) + (4 * familyHormanderConst V fun k l => SchwartzMap.seminorm ℝ k l (b.divKernel i)) * + eLpNorm g p (volume.restrict T) := by + rw [← eLpNorm_indicator_eq_eLpNorm_restrict T.isOpen.measurableSet.nullMeasurableSet] + exact (b.isCZFamily_divKernel i).eLpNorm_lqNorm_conv_le hp1 hp + ((memLp_indicator_iff_restrict T.isOpen.measurableSet.nullMeasurableSet).2 hg) + +/-- **The local means of Triebel–Lizorkin type by the gradient**: let `g_i = ∂_{e_i} f` weakly on +an open set `T` with `f, g_i ∈ L_p(T)`, `1 < p < ∞`, let `x - y ∈ T` for every `x ∈ W`, every level +`j` and every `y` in the support of `(K_i)_{2^j}`, and let `F = 1_T f` in `L_p`. Then +`‖ x ↦ ‖(2^j |1_W (k_j ⋆ F)(x)|)_j‖_{ℓ_2} ‖_p ≤ ‖m‖_1 ‖f‖_{L_p(T)} + +2 ∑_i C_p(K_i) ‖g_i‖_{L_p(T)}` (`Rd.LocalMeansBump.tlLocalNormOn_le_of_pointwise`). -/ +theorem tlLocalNormOn_le_of_hasWeakLineDeriv [Nontrivial V] (hp1 : 1 < p) (hp : p ≠ ∞) + {W : Set V} (hW : MeasurableSet W) {T : Opens V} {f : V → ℂ} + {g : Fin (finrank ℝ V) → V → ℂ} (hf : MemLp f p (volume.restrict T)) + (hg : ∀ i, MemLp (g i) p (volume.restrict T)) + (hfg : ∀ i, HasWeakLineDeriv T (fun _ : Fin 1 => gridBasis V i) f (g i)) + (hsupp : ∀ x ∈ W, ∀ j i, ∀ y ∈ tsupport (dilate (2 ^ j) (b.divKernel i : V → ℂ)), x - y ∈ T) + {F : Lp ℂ p (volume : Measure V)} (hF : (F : V → ℂ) =ᵐ[volume] (T : Set V).indicator f) : + b.tlLocalNormOn hp hW 2 1 2 F ≤ eLpNorm (momentKernel b.toFun 2) 1 volume * + eLpNorm f p (volume.restrict T) + 2 * ∑ i, czConst V p (meanZeroOverlap (b.divKernel i)) + (4 * familyHormanderConst V fun k l => SchwartzMap.seminorm ℝ k l (b.divKernel i)) * + eLpNorm (g i) p (volume.restrict T) := by + have hT := T.isOpen.measurableSet + have hFn : ‖F‖ₑ = eLpNorm f p (volume.restrict T) := by + rw [Lp.eNorm_def, eLpNorm_congr_ae hF, + eLpNorm_indicator_eq_eLpNorm_restrict hT.nullMeasurableSet] + refine (b.tlLocalNormOn_le_of_pointwise hp 2 1 hW b.divKernel + (fun i => (T : Set V).indicator (g i)) + (fun i => ((memLp_indicator_iff_restrict hT.nullMeasurableSet).2 (hg i)).aestronglyMeasurable) 2 + (fun x hx j => b.dyadicWeight_mul_enorm_conv_kernel_le hf hfg j (hsupp x hx j)) hF).trans ?_ + rw [hFn] + gcongr with i + exact b.eLpNorm_lqNorm_conv_divKernel_le hp1 hp (hg i) i + +end LocalMeansBump + +/-! ### Bounded extensions from a set -/ + +variable {p : ℝ≥0∞} + +variable (p) in +/-- **Sobolev functions on `O` extend from `U` with constant `C`**: for every `f ∈ L_p(O)` with +weak derivatives `g_i = ∂_{e_i} f ∈ L_p(O)` along the orthonormal basis `e_i = Rd.gridBasis V i` +there are `F ∈ W^1_p(V)` with `F = f` almost everywhere on `U` and weak derivatives +`G_i = ∂_{e_i} F ∈ L_p(V)` with `‖F‖_p + ∑_i ‖G_i‖_p ≤ C (‖f‖_{L_p(O)} + ∑_i ‖g_i‖_{L_p(O)})`. -/ +def ExtendsSobolev (O : Opens V) (U : Set V) (C : ℝ≥0∞) : Prop := + ∀ (f : V → ℂ) (g : Fin (finrank ℝ V) → V → ℂ), MemLp f p (volume.restrict O) → + (∀ i, MemLp (g i) p (volume.restrict O)) → + (∀ i, HasWeakLineDeriv O (fun _ : Fin 1 => gridBasis V i) f (g i)) → + ∃ F : Lp ℂ p (volume : Measure V), MemSobolev 1 F ∧ (∀ᵐ x ∂volume, x ∈ U → F x = f x) ∧ + ∃ G : Fin (finrank ℝ V) → Lp ℂ p (volume : Measure V), + (∀ i, HasWeakLineDeriv ⊤ (fun _ : Fin 1 => gridBasis V i) F (G i)) ∧ + ‖F‖ₑ + ∑ i, ‖G i‖ₑ ≤ + C * (eLpNorm f p (volume.restrict O) + ∑ i, eLpNorm (g i) p (volume.restrict O)) + +/-- **Larger domains**: an extension from `U` for Sobolev functions on `T` serves for Sobolev +functions on every open `O ⊇ T`, with the same constant, since `‖h‖_{L_p(T)} ≤ ‖h‖_{L_p(O)}` and +weak derivatives restrict to `T` (`Rd.HasWeakLineDeriv.mono`). -/ +theorem ExtendsSobolev.of_le {T O : Opens V} {U : Set V} {C : ℝ≥0∞} + (h : ExtendsSobolev p T U C) (hTO : T ≤ O) : ExtendsSobolev p O U C := by + intro f g hf hg hfg + have hμ : volume.restrict (T : Set V) ≤ volume.restrict O := + Measure.restrict_mono (show (T : Set V) ⊆ O from hTO) le_rfl + obtain ⟨F, hF, hFf, G, hG, hb⟩ := h f g (hf.mono_measure hμ) (fun i => (hg i).mono_measure hμ) + fun i => (hfg i).mono hTO + refine ⟨F, hF, hFf, G, hG, hb.trans ?_⟩ + gcongr + +/-- **Finiteness from a bound**: if `‖F‖_p + ∑_i ‖G_i‖_p ≤ C X` with finite `C` and `X`, then `F` +and every `G_i` lie in `L_p(V)`. -/ +theorem memLp_of_eLpNorm_add_sum_le {ι : Type*} [Fintype ι] {F : V → ℂ} {G : ι → V → ℂ} + {C X : ℝ≥0∞} (hC : C ≠ ∞) (hX : X ≠ ∞) + (hb : eLpNorm F p volume + ∑ i, eLpNorm (G i) p volume ≤ C * X) : + MemLp F p volume ∧ ∀ i, MemLp (G i) p volume := by + have hfin : C * X < ∞ := ENNReal.mul_lt_top hC.lt_top hX.lt_top + refine ⟨memLp_iff.2 ((le_self_add.trans hb).trans_lt hfin), fun i => memLp_iff.2 ?_⟩ + exact (((Finset.single_le_sum (f := fun j => eLpNorm (G j) p volume) (fun j _ => zero_le) + (Finset.mem_univ i)).trans le_add_self).trans hb).trans_lt hfin + +/-- **Extensions from `L_p` bounds**: Sobolev functions on `O` extend from `U` with constant `C` +(`Rd.ExtendsSobolev`) as soon as every `f ∈ L_p(O)` with weak derivatives `g_i = ∂_{e_i} f` in +`L_p(O)` agrees almost everywhere on `U` with a function `F` on `V` with weak derivatives +`G_i = ∂_{e_i} F` on `V` and `‖F‖_p + ∑_i ‖G_i‖_p ≤ C (‖f‖_{L_p(O)} + ∑_i ‖g_i‖_{L_p(O)})`; +the bound puts `F` and the `G_i` into `L_p(V)` (`Rd.memLp_of_eLpNorm_add_sum_le`, Mathlib's +`MemLp.toLp`). -/ +theorem extendsSobolev_of_eLpNorm_le [Fact (1 ≤ p)] {O : Opens V} {U : Set V} {C : ℝ≥0∞} + (hC : C ≠ ∞) + (h : ∀ (f : V → ℂ) (g : Fin (finrank ℝ V) → V → ℂ), MemLp f p (volume.restrict O) → + (∀ i, MemLp (g i) p (volume.restrict O)) → + (∀ i, HasWeakLineDeriv O (fun _ : Fin 1 => gridBasis V i) f (g i)) → + ∃ (F : V → ℂ) (G : Fin (finrank ℝ V) → V → ℂ), + (∀ i, HasWeakLineDeriv ⊤ (fun _ : Fin 1 => gridBasis V i) F (G i)) ∧ + (∀ᵐ x ∂volume, x ∈ U → F x = f x) ∧ + eLpNorm F p volume + ∑ i, eLpNorm (G i) p volume ≤ + C * (eLpNorm f p (volume.restrict O) + ∑ i, eLpNorm (g i) p (volume.restrict O))) : + ExtendsSobolev p O U C := by + intro f g hf hg hfg + obtain ⟨F, G, hG, hFf, hb⟩ := h f g hf hg hfg + obtain ⟨hFm, hGm⟩ := memLp_of_eLpNorm_add_sum_le hC + (ENNReal.add_ne_top.2 ⟨hf.eLpNorm_ne_top, ENNReal.sum_ne_top.2 fun i _ => + (hg i).eLpNorm_ne_top⟩) hb + have hW : ∀ i, HasWeakLineDeriv ⊤ (fun _ : Fin 1 => gridBasis V i) (hFm.toLp F) + ((hGm i).toLp (G i)) := fun i => + (hG i).congr_ae (by rw [volume_restrict_top]; exact hFm.coeFn_toLp.symm) + (by rw [volume_restrict_top]; exact (hGm i).coeFn_toLp.symm) + refine ⟨hFm.toLp F, memSobolev_one_of_forall_gridBasis hW, ?_, fun i => (hGm i).toLp (G i), hW, + ?_⟩ + · filter_upwards [hFm.coeFn_toLp, hFf] with x h1 h2 hx + rw [h1, h2 hx] + · simpa only [Lp.eNorm_toLp] using hb + +namespace LocalMeansBump + +variable (b : LocalMeansBump V) + +/-- The constant `‖m‖_1 + 2 ∑_i C_p(K_i)` of the local means of a bump by the gradient. -/ +noncomputable def patchConst (p : ℝ≥0∞) : ℝ≥0∞ := + eLpNorm (momentKernel b.toFun 2) 1 volume + 2 * b.gradientConst p + +/-- The constant of the local means by the gradient is finite for `1 < p < ∞`. -/ +theorem patchConst_ne_top {p : ℝ≥0∞} (hp1 : 1 < p) (hp : p ≠ ∞) : b.patchConst p ≠ ∞ := + ENNReal.add_ne_top.2 ⟨eLpNorm_momentKernel_ne_top b.integrable 2, + ENNReal.mul_ne_top ENNReal.ofNat_ne_top (b.gradientConst_ne_top hp1 hp)⟩ + +/-- **The local means of Triebel–Lizorkin type by the gradient, with one constant**: under the +hypotheses of `Rd.LocalMeansBump.tlLocalNormOn_le_of_hasWeakLineDeriv`, +`‖ x ↦ ‖(2^j |1_W (k_j ⋆ F)(x)|)_j‖_{ℓ_2} ‖_p ≤ C (‖f‖_{L_p(T)} + ∑_i ‖g_i‖_{L_p(T)})` with +`C = Rd.LocalMeansBump.patchConst b p`. -/ +theorem tlLocalNormOn_le_patchConst [Fact (1 ≤ p)] [Nontrivial V] (hp1 : 1 < p) (hp : p ≠ ∞) + {W : Set V} (hW : MeasurableSet W) {T : Opens V} {f : V → ℂ} + {g : Fin (finrank ℝ V) → V → ℂ} (hf : MemLp f p (volume.restrict T)) + (hg : ∀ i, MemLp (g i) p (volume.restrict T)) + (hfg : ∀ i, HasWeakLineDeriv T (fun _ : Fin 1 => gridBasis V i) f (g i)) + (hsupp : ∀ x ∈ W, ∀ j i, ∀ y ∈ tsupport (dilate (2 ^ j) (b.divKernel i : V → ℂ)), x - y ∈ T) + {F : Lp ℂ p (volume : Measure V)} (hF : (F : V → ℂ) =ᵐ[volume] (T : Set V).indicator f) : + b.tlLocalNormOn hp hW 2 1 2 F ≤ b.patchConst p * + (eLpNorm f p (volume.restrict T) + ∑ i, eLpNorm (g i) p (volume.restrict T)) := by + refine (b.tlLocalNormOn_le_of_hasWeakLineDeriv hp1 hp hW hf hg hfg hsupp hF).trans ?_ + rw [patchConst, add_mul, mul_assoc 2] + refine add_le_add (mul_le_mul_right le_self_add _) (mul_le_mul_right ?_ 2) + exact (ENNReal.sum_mul_le_sum_mul_sum _ _ _).trans (mul_le_mul_right le_add_self _) + +/-- The constant `(2 ‖m‖_1 (1 - 2^(-1))⁻¹ + (∑_i C_i) A) C_b` of the extension from one patch, with +the constants `C_i = Rd.tlToSobolevConst p e_i` of the weak derivatives of `F^1_{p,2}` functions, +`A = Rd.LocalMeansBump.tlUpperConst b 2 p 2 1` and `C_b = Rd.LocalMeansBump.patchConst b p`. -/ +noncomputable def extensionConst (p : ℝ≥0∞) : ℝ≥0∞ := + (2 * eLpNorm (momentKernel b.toFun 2) 1 volume * (1 - (2 : ℝ≥0∞) ^ (-(1 : ℝ)))⁻¹ + + (∑ i, tlToSobolevConst p (fun _ : Fin 1 => gridBasis V i)) * b.tlUpperConst 2 p 2 1) * + b.patchConst p + +/-- The constant of the extension from one patch is finite for `1 < p < ∞`. -/ +theorem extensionConst_ne_top {p : ℝ≥0∞} (hp1 : 1 < p) (hp : p ≠ ∞) : b.extensionConst p ≠ ∞ := + ENNReal.mul_ne_top (ENNReal.add_ne_top.2 ⟨ENNReal.mul_ne_top (ENNReal.mul_ne_top + ENNReal.ofNat_ne_top (eLpNorm_momentKernel_ne_top b.integrable 2)) + (ENNReal.one_sub_two_rpow_neg_inv_ne_top one_pos), + ENNReal.mul_ne_top (ENNReal.sum_ne_top.2 fun _ _ => tlToSobolevConst_ne_top hp1 hp _) + (b.tlUpperConst_ne_top 2 hp1 hp ENNReal.one_lt_two one_pos)⟩) (b.patchConst_ne_top hp1 hp) + +/-- **The local extension lies in `F^1_{p,2}(V)`** if the local means quasi-norm of +Triebel–Lizorkin type of `F` on `W` is finite +(`Rd.LocalMeansBump.triebelLizorkinNorm_localExtension_le`). -/ +theorem memTriebelLizorkin_localExtension_of_tlLocalNormOn [Fact (1 ≤ p)] (hp1 : 1 < p) + (hp : p ≠ ∞) {W : Set V} (hW : MeasurableSet W) {F : Lp ℂ p (volume : Measure V)} + (hXf : b.tlLocalNormOn hp hW 2 1 2 F < ∞) : + MemTriebelLizorkin ((1 : ℕ) : ℝ) 2 (b.localExtension hp hW 2 F) := by + rw [Nat.cast_one] + exact (b.triebelLizorkinNorm_localExtension_le hp1 hp hW 2 one_pos ENNReal.one_lt_two + hXf).trans_lt (ENNReal.mul_lt_top + (b.tlUpperConst_ne_top 2 hp1 hp ENNReal.one_lt_two one_pos).lt_top hXf) + +/-- **The local extension agrees with `f` on `U`**: if `F = 1_T f` almost everywhere, `U ⊆ T`, the +dual kernels of order `L ≥ 1` at points of `U` only see `W` and the series of the local extension +converges, then `∑_j η_j ⋆ 1_W (k_j ⋆ F) = f` almost everywhere on `U` +(`Rd.LocalMeansBump.indicatorLp_localExtension_of_summable`). -/ +theorem ae_localExtension_eq_of_ae_eq_indicator [Fact (1 ≤ p)] (hp : p ≠ ∞) {L : ℕ} (hL : 1 ≤ L) + {U W T : Set V} (hU : MeasurableSet U) (hW : MeasurableSet W) (hUT : U ⊆ T) + (hUW : ∀ x ∈ U, ∀ j y, b.dual L j y ≠ 0 → x - y ∈ W) {F : Lp ℂ p (volume : Measure V)} + {f : V → ℂ} (hF : (F : V → ℂ) =ᵐ[volume] T.indicator f) + (hsum : Summable fun j => b.localExtTerm hp hW L j F) : + ∀ᵐ x ∂volume, x ∈ U → b.localExtension hp hW L F x = f x := by + have heq := b.indicatorLp_localExtension_of_summable hp hL hU hW hUW hsum + filter_upwards [Lp.ext_iff.1 heq, indicatorLp_apply_ae hU (b.localExtension hp hW L F), + indicatorLp_apply_ae hU F, hF] with x h1 h2 h3 h4 hxU + rw [h2, h3, Set.indicator_of_mem hxU, Set.indicator_of_mem hxU] at h1 + rw [h1, h4, Set.indicator_of_mem (hUT hxU)] + +/-- **The bound of the local extension**: if the local means quasi-norm of Triebel–Lizorkin type +of `F` on `W` is finite and at most `C_b Y`, `C_b = Rd.LocalMeansBump.patchConst b p`, then the +local extension `E = ∑_j η_j ⋆ 1_W (k_j ⋆ F)` and every family of weak derivatives +`G_i = ∂_{e_i} E ∈ L_p(V)` satisfy `‖E‖_p + ∑_i ‖G_i‖_p ≤ C Y` with +`C = Rd.LocalMeansBump.extensionConst b p` (`Rd.exists_hasWeakLineDeriv_of_memTriebelLizorkin`). -/ +theorem enorm_localExtension_add_le_extensionConst [Fact (1 ≤ p)] [Nontrivial V] (hp1 : 1 < p) + (hp : p ≠ ∞) {W : Set V} (hW : MeasurableSet W) {F : Lp ℂ p (volume : Measure V)} + {Y : ℝ≥0∞} (hX : b.tlLocalNormOn hp hW 2 1 2 F ≤ b.patchConst p * Y) + (hXf : b.tlLocalNormOn hp hW 2 1 2 F < ∞) + {G : Fin (finrank ℝ V) → Lp ℂ p (volume : Measure V)} + (hG : ∀ i, HasWeakLineDeriv ⊤ (fun _ : Fin 1 => gridBasis V i) + (b.localExtension hp hW 2 F) (G i)) : + ‖b.localExtension hp hW 2 F‖ₑ + ∑ i, ‖G i‖ₑ ≤ b.extensionConst p * Y := by + have hTL := b.triebelLizorkinNorm_localExtension_le hp1 hp hW 2 one_pos ENNReal.one_lt_two hXf + have hmem := b.memTriebelLizorkin_localExtension_of_tlLocalNormOn hp1 hp hW hXf + have hFn := b.enorm_localExtension_le_of_tlLocalNormOn hp hW 2 one_pos two_ne_zero hXf + have hGs : ∑ i, ‖G i‖ₑ ≤ (∑ i, tlToSobolevConst p (fun _ : Fin 1 => gridBasis V i)) * + b.tlUpperConst 2 p 2 1 * b.tlLocalNormOn hp hW 2 1 2 F := by + rw [Finset.sum_mul, Finset.sum_mul] + refine Finset.sum_le_sum fun i _ => ?_ + obtain ⟨G', hG', hG'n⟩ := exists_hasWeakLineDeriv_of_memTriebelLizorkin hp1 hp + (fun _ : Fin 1 => gridBasis V i) hmem + rw [(hG i).eq_of_top hG'] + refine hG'n.trans ?_ + rw [Nat.cast_one, mul_assoc] + exact mul_le_mul_right hTL _ + calc _ ≤ _ := add_le_add hFn hGs + _ = (2 * eLpNorm (momentKernel b.toFun 2) 1 volume * (1 - (2 : ℝ≥0∞) ^ (-(1 : ℝ)))⁻¹ + + (∑ i, tlToSobolevConst p (fun _ : Fin 1 => gridBasis V i)) * b.tlUpperConst 2 p 2 1) * + b.tlLocalNormOn hp hW 2 1 2 F := by ring + _ ≤ (2 * eLpNorm (momentKernel b.toFun 2) 1 volume * (1 - (2 : ℝ≥0∞) ^ (-(1 : ℝ)))⁻¹ + + (∑ i, tlToSobolevConst p (fun _ : Fin 1 => gridBasis V i)) * b.tlUpperConst 2 p 2 1) * + (b.patchConst p * Y) := mul_le_mul_right hX _ + _ = _ := by rw [extensionConst]; ring + +end LocalMeansBump + +/-! ### Pasting in `W^1_p(V)` -/ + +/-- **The arithmetic of the pasting bound**: if `‖F‖ ≤ ∑_k a_k x_k`, +`‖G_i‖ ≤ ∑_k (a_k y_{k,i} + d_{k,i} x_k)` and `x_k + ∑_i y_{k,i} ≤ C_k Y`, then +`‖F‖ + ∑_i ‖G_i‖ ≤ (∑_k (a_k + ∑_i d_{k,i}) C_k) Y`. -/ +theorem pasting_bound {ι κ : Type*} [Fintype ι] [Fintype κ] {nF : ℝ≥0∞} + {nG : κ → ℝ≥0∞} {a x C : ι → ℝ≥0∞} {d y : ι → κ → ℝ≥0∞} {Y : ℝ≥0∞} + (hF : nF ≤ ∑ k, a k * x k) (hG : ∀ i, nG i ≤ ∑ k, (a k * y k i + d k i * x k)) + (hxy : ∀ k, x k + ∑ i, y k i ≤ C k * Y) : + nF + ∑ i, nG i ≤ (∑ k, (a k + ∑ i, d k i) * C k) * Y := by + calc nF + ∑ i, nG i ≤ ∑ k, a k * x k + ∑ i, ∑ k, (a k * y k i + d k i * x k) := + add_le_add hF (Finset.sum_le_sum fun i _ => hG i) + _ = ∑ k, (a k * (x k + ∑ i, y k i) + (∑ i, d k i) * x k) := by + rw [Finset.sum_comm, ← Finset.sum_add_distrib] + refine Finset.sum_congr rfl fun k _ => ?_ + rw [Finset.sum_add_distrib, mul_add, Finset.mul_sum, Finset.sum_mul] + ring + _ ≤ ∑ k, (a k + ∑ i, d k i) * (C k * Y) := Finset.sum_le_sum fun k _ => by + calc a k * (x k + ∑ i, y k i) + (∑ i, d k i) * x k + ≤ a k * (x k + ∑ i, y k i) + (∑ i, d k i) * (x k + ∑ i, y k i) := by + gcongr + exact le_self_add + _ = (a k + ∑ i, d k i) * (x k + ∑ i, y k i) := by ring + _ ≤ _ := mul_le_mul_right (hxy k) _ + _ = _ := by rw [Finset.sum_mul]; exact Finset.sum_congr rfl fun k _ => by ring + +/-- **Pasting bounded extensions**: let `(U_k)` be a finite cover of `Ō` by bounded open sets and +let Sobolev functions on `O` extend from every `O ∩ U_k` with finite constants. Then they extend +from `O` with a finite constant: for a smooth resolution of unity `(ψ_k)` subordinate to `(U_k)` +(`Rd.exists_smooth_partition`), `F = ∑_k ψ_k F_k` agrees with `f` on `O` (`Rd.ae_sum_mul_eq`), +lies in `W^1_p(V)` (`Rd.MemSobolev.mulLp`) and has the weak derivatives +`∑_k (ψ_k ∂_{e_i} F_k + (∂_{e_i} ψ_k) F_k)` +(`Rd.hasWeakLineDeriv_mulLp`). -/ +theorem extendsSobolev_of_cover [Fact (1 ≤ p)] {ι : Type*} [Finite ι] {O : Opens V} (U : ι → Set V) + (hUo : ∀ k, IsOpen (U k)) (hUb : ∀ k, Bornology.IsBounded (U k)) + (hcov : closure (O : Set V) ⊆ ⋃ k, U k) {C : ι → ℝ≥0∞} (hC : ∀ k, C k ≠ ∞) + (hext : ∀ k, ExtendsSobolev p O ((O : Set V) ∩ U k) (C k)) : + ∃ C' : ℝ≥0∞, C' ≠ ∞ ∧ ExtendsSobolev p O O C' := by + let := Fintype.ofFinite ι + classical + obtain ⟨ψ, hψ, hψU, hψ1, -⟩ := exists_smooth_partition isClosed_closure U hUo hcov + have hcs : ∀ k, HasCompactSupport (ψ k) := fun k => + isCompact_of_isClosed_isBounded (isClosed_tsupport _) ((hUb k).subset (hψU k)) + have hc : ∀ k, Continuous fun x => ((ψ k x : ℝ) : ℂ) := fun k => + Complex.continuous_ofReal.comp (hψ k).continuous + have hc' : ∀ k i, Continuous fun x => ((fderiv ℝ (ψ k) x (gridBasis V i) : ℝ) : ℂ) := + fun k i => Complex.continuous_ofReal.comp + (((hψ k).continuous_fderiv (by simp)).clm_apply continuous_const) + choose a ha using fun k => + (hc k).bounded_above_of_compact_support ((hcs k).comp_left Complex.ofReal_zero) + choose d hd using fun k i => (hc' k i).bounded_above_of_compact_support + (((hcs k).fderiv_apply (𝕜 := ℝ) (gridBasis V i)).comp_left Complex.ofReal_zero) + refine ⟨∑ k, (ENNReal.ofReal (a k) + ∑ i, ENNReal.ofReal (d k i)) * C k, + ENNReal.sum_ne_top.2 fun k _ => ENNReal.mul_ne_top (ENNReal.add_ne_top.2 + ⟨ENNReal.ofReal_ne_top, ENNReal.sum_ne_top.2 fun _ _ => ENNReal.ofReal_ne_top⟩) (hC k), ?_⟩ + intro f g hf hg hfg + choose F hF hFf G hG hb using fun k => hext k f g hf hg hfg + refine ⟨∑ k, mulLp (hc k) (ha k) (F k), MemSobolev.sum _ fun k _ => + (hF k).mulLp (hψ k) (hcs k) (hc k) (ha k), ?_, + fun i => ∑ k, (mulLp (hc k) (ha k) (G k i) + mulLp (hc' k i) (hd k i) (F k)), fun i => ?_, ?_⟩ + · filter_upwards [Lp.coeFn_fun_finsetSum Finset.univ fun k => mulLp (hc k) (ha k) (F k), + ae_all_iff.2 fun k => mulLp_apply_ae (hc k) (ha k) (F k), + ae_sum_mul_eq hψU (fun x hx => hψ1 x (subset_closure hx)) hFf] with x h1 h2 h3 hxO + rw [h1, ← h3 hxO] + exact Finset.sum_congr rfl fun k _ => h2 k + · refine (HasWeakLineDeriv.sum (s := Finset.univ) fun k _ => hasWeakLineDeriv_mulLp (hG k i) + (hψ k) (hc k) (ha k) (hc' k i) (hd k i)).congr_ae ?_ ?_ <;> rw [volume_restrict_top] + · exact (Lp.coeFn_finsetSum _ _).symm + · exact (Lp.coeFn_finsetSum _ _).symm + · refine pasting_bound (x := fun k => ‖F k‖ₑ) (y := fun k i => ‖G k i‖ₑ) + ((eNorm_sum_le _ _).trans (Finset.sum_le_sum fun k _ => enorm_mulLp_le _ _ _)) + (fun i => (eNorm_sum_le _ _).trans (Finset.sum_le_sum fun k _ => (eNorm_add_le _ _).trans + (add_le_add (enorm_mulLp_le _ _ _) (enorm_mulLp_le _ _ _)))) hb + +/-! ### The supports of the divergence kernels -/ + +namespace LocalMeansBump + +variable (b : LocalMeansBump V) + +/-- If a divergence kernel is nonzero at `y`, the moment kernel is nonzero at some `t y` with +`t ∈ [1, 2]` (`Rd.LocalMeansBump.divKernel_eq_zero`). -/ +theorem exists_momentKernel_ne_zero_of_divKernel_ne_zero (i : Fin (finrank ℝ V)) {y : V} + (hy : b.divKernel i y ≠ 0) : + ∃ t : ℝ, 1 ≤ t ∧ t ≤ 2 ∧ momentKernel b.toFun 2 (t • y) ≠ 0 := by + by_contra h + push Not at h + exact hy (b.divKernel_eq_zero i h) + +/-- **The supports of the dilated divergence kernels**: if the divergence kernel `K_i` vanishes +outside a closed set `S` with `c y ∈ S ⇒ y ∈ S` for `c ≥ 1`, then every dilate `(K_i)_{2^j}` is +supported in `S` (`Rd.tsupport_dilate_two_pow_subset`). -/ +theorem tsupport_dilate_divKernel_subset (i : Fin (finrank ℝ V)) {S : Set V} (hS : IsClosed S) + (hK : ∀ y, b.divKernel i y ≠ 0 → y ∈ S) (hscale : ∀ c : ℝ, 1 ≤ c → ∀ y, c • y ∈ S → y ∈ S) + (j : ℕ) : tsupport (dilate (2 ^ j) (b.divKernel i : V → ℂ)) ⊆ S := + tsupport_dilate_two_pow_subset hS hK hscale j + +/-- The divergence kernels of a bump of radius `R` and their dilates `(K_i)_{2^j}` are supported +in the closed ball of radius `2R`. -/ +theorem tsupport_dilate_divKernel_subset_closedBall (i : Fin (finrank ℝ V)) (j : ℕ) : + tsupport (dilate (2 ^ j) (b.divKernel i : V → ℂ)) ⊆ closedBall 0 (2 * b.radius) := by + refine b.tsupport_dilate_divKernel_subset i isClosed_closedBall (fun y hy => ?_) + (fun c hc y hy => ?_) j + · obtain ⟨t, ht1, -, ht⟩ := b.exists_momentKernel_ne_zero_of_divKernel_ne_zero i hy + have h := not_lt.1 fun h => ht (b.momentKernel_two_eq_zero h) + rw [norm_smul, Real.norm_of_nonneg (zero_le_one.trans ht1)] at h + rw [mem_closedBall, dist_zero_right] + nlinarith [norm_nonneg y] + · rw [mem_closedBall, dist_zero_right, norm_smul, Real.norm_of_nonneg (zero_le_one.trans hc)] + at hy + rw [mem_closedBall, dist_zero_right] + nlinarith [norm_nonneg y] + +end LocalMeansBump + +namespace LipschitzGraph + +variable (G : LipschitzGraph V) + +/-- **The divergence kernels of a cone-supported bump lie in the reflected closed cone**: for a bump +of radius `R` supported in `-K`, every dilate `(K_i)_{2^j}` of its divergence kernels is supported +in `{y : -y ∈ K̄, ‖y‖ ≤ 2R}`. -/ +theorem tsupport_dilate_divKernel_subset {b : LocalMeansBump V} (hb : G.ConeSupported b.toFun) + (i : Fin (finrank ℝ V)) (j : ℕ) : + tsupport (dilate (2 ^ j) (b.divKernel i : V → ℂ)) ⊆ + {y | -y ∈ G.closedCone} ∩ closedBall 0 (2 * b.radius) := by + refine Set.subset_inter (b.tsupport_dilate_divKernel_subset i + (G.isClosed_closedCone.preimage continuous_neg) (fun y hy => ?_) (fun c hc y hy => ?_) j) + (b.tsupport_dilate_divKernel_subset_closedBall i j) + · obtain ⟨t, ht1, -, ht⟩ := b.exists_momentKernel_ne_zero_of_divKernel_ne_zero i hy + have h := G.smul_mem_closedCone (inv_nonneg.2 (zero_le_one.trans ht1)) + (G.cone_subset_closedCone (G.coneSupported_momentKernel_of hb 2 _ ht)) + rwa [smul_neg, inv_smul_smul₀ (zero_lt_one.trans_le ht1).ne'] at h + · have h := G.smul_mem_closedCone (inv_nonneg.2 (zero_le_one.trans hc)) hy + rwa [smul_neg, inv_smul_smul₀ (zero_lt_one.trans_le hc).ne'] at h + +/-- **Boundary patches, the support condition for the divergence kernels**: for a bump supported in +`-K` with `2R ≤ ε`, `x - y ∈ Ω ∩ B(c, ρ)` for `x ∈ Ω ∩ B(c, ρ - ε)` and `y` in the support of a +dilated divergence kernel (`Rd.LipschitzGraph.sub_mem_patch_of_mem_closedCone`). -/ +theorem patch_support_divKernel {b : LocalMeansBump V} (hb : G.ConeSupported b.toFun) + {ε ρ : ℝ} {c : V} (hR : 2 * b.radius ≤ ε) : + ∀ x ∈ G.domain ∩ ball c (ρ - ε), ∀ (j : ℕ) (i : Fin (finrank ℝ V)), + ∀ y ∈ tsupport (dilate (2 ^ j) (b.divKernel i : V → ℂ)), x - y ∈ G.domain ∩ ball c ρ := by + intro x hx j i y hy + obtain ⟨hyK, hyR⟩ := G.tsupport_dilate_divKernel_subset hb i j hy + rw [mem_closedBall, dist_zero_right] at hyR + exact G.sub_mem_patch_of_mem_closedCone hx hyK (hyR.trans hR) + +end LipschitzGraph + +/-! ### Dimension zero -/ + +/-- **Extension in dimension `0`**: if `V` is a single point, every `f ∈ W^m_p(O)` on an open set +`O`, of every order `m`, agrees almost everywhere on `O` with some `F ∈ W^m_p(V)`. Here `O` is +empty, and `F = 0` serves, or `O = V`, and `F = f` serves (Mathlib's +`Subsingleton.eq_univ_of_nonempty`). -/ +theorem exists_memSobolev_of_memWeakSobolev_of_subsingleton [Subsingleton V] {O : Opens V} + {m : ℕ} {f : V → ℂ} (hf : MemWeakSobolev O m p f) : + ∃ F : Lp ℂ p (volume : Measure V), MemSobolev m F ∧ (F : V → ℂ) =ᵐ[volume.restrict O] f := by + rcases (O : Set V).eq_empty_or_nonempty with h | h + · refine ⟨0, zero_memSobolev, ?_⟩ + rw [h, Measure.restrict_empty, ae_zero] + exact Filter.eventually_bot + · obtain rfl : O = ⊤ := + Opens.ext ((Subsingleton.eq_univ_of_nonempty h).trans Opens.coe_top.symm) + have hf1 : MemLp f p volume := volume_restrict_top (V := V) ▸ hf.1 + refine ⟨hf1.toLp f, hf.congr_ae ?_, ?_⟩ <;> rw [volume_restrict_top] + · exact hf1.coeFn_toLp.symm + · exact hf1.coeFn_toLp + +/-! ### The cutoffs of the patches -/ + +namespace BoundedLipschitzDomain + +variable (Ω : BoundedLipschitzDomain V) + +omit [MeasurableSpace V] [BorelSpace V] in +/-- **The cutoff of a boundary patch**: for `ε > 0` and every `j` there is a smooth `χ` with values +in `[0, 1]`, compact closed support in the boundary ball `B(c_j, ρ_j)` and `χ = 1` near +`B̄(c_j, ρ_j - 2ε)` (`Rd.exists_contDiff_eventuallyEq_one`). -/ +theorem exists_cutoff_boundary {ε : ℝ} (hε : 0 < ε) (j : Fin Ω.N) : + ∃ χ : V → ℝ, ContDiff ℝ ((⊤ : ℕ∞) : WithTop ℕ∞) χ ∧ HasCompactSupport χ ∧ + tsupport χ ⊆ ball (Ω.center j) (Ω.radius j) ∧ (∀ x, χ x ∈ Set.Icc (0 : ℝ) 1) ∧ + ∀ᶠ x in 𝓝ˢ (closedBall (Ω.center j) (Ω.radius j - 2 * ε)), χ x = 1 := + exists_contDiff_eventuallyEq_one (isCompact_closedBall _ _) isOpen_ball + (closedBall_subset_ball (by linarith)) + +omit [MeasurableSpace V] [BorelSpace V] in +/-- **The cutoff of the inner patch**: for `δ > 0` there is a smooth `χ` with values in `[0, 1]`, +compact closed support in `Ω` and `χ = 1` near the compact set `{infDist(·, Ωᶜ) ≥ 2δ} ⊆ Ω` +(`Rd.exists_contDiff_eventuallyEq_one`). -/ +theorem exists_cutoff_interior {δ : ℝ} (hδ : 0 < δ) : + ∃ χ : V → ℝ, ContDiff ℝ ((⊤ : ℕ∞) : WithTop ℕ∞) χ ∧ HasCompactSupport χ ∧ + tsupport χ ⊆ Ω.carrier ∧ (∀ x, χ x ∈ Set.Icc (0 : ℝ) 1) ∧ + ∀ᶠ x in 𝓝ˢ {x : V | 2 * δ ≤ infDist x Ω.carrierᶜ}, χ x = 1 := by + have hKΩ : {x : V | 2 * δ ≤ infDist x Ω.carrierᶜ} ⊆ Ω.carrier := fun x hx => + setOf_lt_infDist_compl_subset Ω.carrier hδ.le + (show δ < infDist x Ω.carrierᶜ from (lt_two_mul_self hδ).trans_le hx) + exact exists_contDiff_eventuallyEq_one + (isCompact_of_isClosed_isBounded (isClosed_le continuous_const (continuous_infDist_pt _)) + (Ω.isBounded.subset hKΩ)) Ω.isOpen hKΩ + +end BoundedLipschitzDomain + +end Rd diff --git a/LeanPool/FunctionSpaces/Domains/Extension/SobolevExtensionOperator.lean b/LeanPool/FunctionSpaces/Domains/Extension/SobolevExtensionOperator.lean new file mode 100644 index 0000000000..9c3fcd2d49 --- /dev/null +++ b/LeanPool/FunctionSpaces/Domains/Extension/SobolevExtensionOperator.lean @@ -0,0 +1,513 @@ +/- +Copyright (c) 2026 Mario Ullrich. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Mario Ullrich +-/ +module + +public import LeanPool.FunctionSpaces.Domains.Extension.SobolevExtension +public import LeanPool.FunctionSpaces.Domains.Lipschitz.LocalLipschitzGraphs +public import LeanPool.FunctionSpaces.Rd.Sobolev.SobolevJets + +/- +Modified for Lean Pool: module names and imports adapted. +-/ + +/-! +# Rychkov's extension operator for `W^1_p` on bounded Lipschitz domains + +Let `Ω` be a bounded Lipschitz domain in a finite-dimensional real inner product space `V` of +dimension `n ≥ 1`, and `1 < p < ∞`. Rychkov's local extension gives a linear extension operator +from the jets of `W^1_p(Ω)` to the jets of `W^1_p(V)` (`Rd.weakSobolevJet`, `Rd.sobolevJet`) with +a finite constant (`Rd.BoundedLipschitzDomain.exists_sobolevExtensionOp`). + +* **Extension operators** (`Rd.SobolevExtensionOp p O U C`): linear maps from the jets on `O` to the + jets on `V` that agree with the value on `U` and have the constant `C` in the norm + `‖f‖_p + ∑_i ‖g_i‖_p`; they give the extensions of `Rd.ExtendsSobolev` + (`Rd.SobolevExtensionOp.extendsSobolev`), and for a finite constant bounded linear operators + (`Rd.SobolevExtensionOp.toContinuousLinearMap`). +* **One patch** (`Rd.LocalMeansBump.sobolevExtensionOp`): Rychkov's local extension + `∑_j η_j ⋆ 1_W (k_j ⋆ 1_T f)` converges for every jet, so it is linear in the jet; applied to + one function it is the extension from one patch (`Rd.LocalMeansBump.extendsSobolev`). +* **Pasting** (`Rd.sobolevExtensionOp_of_cover`): `∑_k ψ_k E_k u` for a smooth resolution of unity + `(ψ_k)`, with the derivatives of the product rule. +* **Bounded Lipschitz domains**: the boundary and inner patches carry extension operators + (`Rd.BoundedLipschitzDomain.exists_sobolevExtensionOp_boundary`, + `Rd.BoundedLipschitzDomain.exists_sobolevExtensionOp_interior`), pasted to one from `Ω` + (`Rd.BoundedLipschitzDomain.exists_sobolevExtensionOp_of_patches`, for every `1 ≤ p ≤ ∞`; + `Rd.BoundedLipschitzDomain.exists_sobolevExtensionOp`). +* **The extension theorem** (Calderón and Stein, here by Rychkov's extension): every `f ∈ L_p(Ω)` + with weak derivatives `g_i = ∂_{e_i} f ∈ L_p(Ω)` agrees on `Ω` with some `F ∈ W^1_p(V)` with + `‖F‖_p + ∑_i ‖∂_{e_i} F‖_p ≤ C (‖f‖_{L_p(Ω)} + ∑_i ‖g_i‖_{L_p(Ω)})` + (`Rd.BoundedLipschitzDomain.exists_extendsSobolev`), and the same holds on every patch + (`Rd.BoundedLipschitzDomain.exists_extendsSobolev_boundary`, + `Rd.BoundedLipschitzDomain.exists_extendsSobolev_interior`): each is an extension operator + applied to one function. +-/ + +@[expose] public section + +open MeasureTheory Filter Topology Module Metric TopologicalSpace +open scoped ENNReal + +namespace Rd + +variable {V : Type*} [NormedAddCommGroup V] [InnerProductSpace ℝ V] [FiniteDimensional ℝ V] + [MeasurableSpace V] [BorelSpace V] {p : ℝ≥0∞} [Fact (1 ≤ p)] + +/-! ### Extension operators -/ + +variable (p) in +/-- An **extension operator for `W^1_p` from `U` with constant `C`**: a linear map `E` from the jets +of `W^1_p(O)` to the jets of `W^1_p(V)` whose values lie in `W^1_p(V)`, agree with the value of the +jet almost everywhere on `U`, and satisfy +`‖F‖_p + ∑_i ‖G_i‖_p ≤ C (‖f‖_{L_p(O)} + ∑_i ‖g_i‖_{L_p(O)})` for `E (f, g) = (F, G)`. The +condition on `U` is meant for `U ⊆ O`, the case of every use. -/ +structure SobolevExtensionOp (O : Opens V) (U : Set V) (C : ℝ≥0∞) where + /-- The linear map on jets. -/ + toLinearMap : weakSobolevJet p O →ₗ[ℂ] sobolevJet (V := V) p + /-- The values lie in `W^1_p(V)`. -/ + memSobolev : ∀ u, MemSobolev 1 (toLinearMap u).1.1 + /-- The value of `E u` agrees with the value of `u` almost everywhere on `U`. -/ + ae_eq : ∀ u, ∀ᵐ x ∂volume, x ∈ U → (toLinearMap u).1.1 x = u.1.1 x + /-- The bound with the constant `C`. -/ + bound : ∀ u, ‖(toLinearMap u).1.1‖ₑ + ∑ i, ‖(toLinearMap u).1.2 i‖ₑ ≤ + C * (‖u.1.1‖ₑ + ∑ i, ‖u.1.2 i‖ₑ) + +namespace SobolevExtensionOp + +variable {O : Opens V} {U : Set V} {C : ℝ≥0∞} + +/-- **Extension operators give extensions**: an extension operator from `U ⊆ O` extends every +`f ∈ L_p(O)` with weak derivatives `g_i ∈ L_p(O)` in the sense of `Rd.ExtendsSobolev`, applied to +the jet of the classes of `f` and `g_i`. -/ +theorem extendsSobolev (E : SobolevExtensionOp p O U C) (hUO : U ⊆ O) : + ExtendsSobolev p O U C := by + intro f g hf hg hfg + let u : weakSobolevJet p O := ⟨(hf.toLp f, fun i => (hg i).toLp (g i)), fun i => + (hfg i).congr_ae hf.coeFn_toLp.symm (hg i).coeFn_toLp.symm⟩ + refine ⟨(E.toLinearMap u).1.1, E.memSobolev u, ?_, (E.toLinearMap u).1.2, + (E.toLinearMap u).2, ?_⟩ + · filter_upwards [E.ae_eq u, (ae_restrict_iff' O.isOpen.measurableSet).1 hf.coeFn_toLp] + with x h1 h2 hxU + rw [h1 hxU] + exact h2 (hUO hxU) + · refine (E.bound u).trans_eq ?_ + simp only [u, Lp.eNorm_toLp] + +/-- The norm bound of an extension operator in the product norm of the jets: +`‖E u‖ ≤ (n + 1) C ‖u‖` for finite `C` (`Rd.norm_le_norm_fst_add_sum`, +`Rd.norm_fst_add_sum_le`). -/ +theorem norm_apply_le (E : SobolevExtensionOp p O U C) (hC : C ≠ ∞) (u : weakSobolevJet p O) : + ‖E.toLinearMap u‖ ≤ (finrank ℝ V + 1) * C.toReal * ‖u‖ := by + have h1 := ENNReal.toReal_mono (ENNReal.mul_ne_top hC (ENNReal.add_ne_top.2 + ⟨eNorm_ne_top, ENNReal.sum_ne_top.2 fun _ _ => eNorm_ne_top⟩)) (E.bound u) + rw [ENNReal.toReal_mul, toReal_enorm_add_sum, toReal_enorm_add_sum] at h1 + have h2 := norm_fst_add_sum_le u.1 + rw [Fintype.card_fin] at h2 + calc ‖E.toLinearMap u‖ = ‖(E.toLinearMap u).1‖ := rfl + _ ≤ _ := norm_le_norm_fst_add_sum _ + _ ≤ C.toReal * (‖u.1.1‖ + ∑ i, ‖u.1.2 i‖) := h1 + _ ≤ C.toReal * ((finrank ℝ V + 1) * ‖u‖) := by gcongr; exact h2 + _ = _ := by ring + +/-- An extension operator with a finite constant as a **bounded linear operator** +(`Rd.SobolevExtensionOp.norm_apply_le`). -/ +noncomputable def toContinuousLinearMap (E : SobolevExtensionOp p O U C) (hC : C ≠ ∞) : + weakSobolevJet p O →L[ℂ] sobolevJet (V := V) p := + E.toLinearMap.mkContinuous ((finrank ℝ V + 1) * C.toReal) (E.norm_apply_le hC) + +/-- The bounded linear operator of an extension operator with a finite constant `C` has norm at +most `(n + 1) C` (Mathlib's `LinearMap.mkContinuous_norm_le`). -/ +theorem norm_toContinuousLinearMap_le (E : SobolevExtensionOp p O U C) (hC : C ≠ ∞) : + ‖E.toContinuousLinearMap hC‖ ≤ (finrank ℝ V + 1) * C.toReal := + LinearMap.mkContinuous_norm_le _ (by positivity) _ + +/-- **Restriction after extension is the identity** for an extension operator from `U ⊇ O`: the +restriction of `E u` to `O` has the value of `u`, hence it is `u` +(`Rd.weakSobolevJet.ext_of_fst_eq`). -/ +theorem restrictL_comp_toContinuousLinearMap (E : SobolevExtensionOp p O U C) (hC : C ≠ ∞) + (hOU : (O : Set V) ⊆ U) : + (sobolevJet.restrictL O).comp (E.toContinuousLinearMap hC) = ContinuousLinearMap.id ℂ _ := by + refine ContinuousLinearMap.ext fun u => weakSobolevJet.ext_of_fst_eq (Lp.ext ?_) + change ⇑(LpToLpRestrictCLM V ℂ ℂ volume p O (E.toLinearMap u).1.1) =ᵐ[volume.restrict O] + ⇑u.1.1 + filter_upwards [LpToLpRestrictCLM_coeFn ℂ (O : Set V) (E.toLinearMap u).1.1, + (ae_restrict_iff' O.isOpen.measurableSet).2 ((E.ae_eq u).mono fun x hx hxO => hx (hOU hxO))] + with x h1 h2 + exact h1.trans h2 + +end SobolevExtensionOp + +/-! ### One patch -/ + +namespace LocalMeansBump + +variable (b : LocalMeansBump V) + +/-- **The local means of Triebel–Lizorkin type of a jet**: for a jet `u = (f, (g_i)_i)` of +`W^1_p(O)`, an open `T ⊆ O` and the support condition of +`Rd.LocalMeansBump.tlLocalNormOn_le_patchConst`, the local means quasi-norm on `W` of `1_T f` is +at most `C_b (‖f‖_{L_p(O)} + ∑_i ‖g_i‖_{L_p(O)})`, `C_b = Rd.LocalMeansBump.patchConst b p`. -/ +theorem tlLocalNormOn_indicatorExtendLp_le [Nontrivial V] (hp1 : 1 < p) (hp : p ≠ ∞) {W : Set V} + (hW : MeasurableSet W) {T O : Opens V} (hTO : T ≤ O) + (hsupp : ∀ x ∈ W, ∀ j i, ∀ y ∈ tsupport (dilate (2 ^ j) (b.divKernel i : V → ℂ)), x - y ∈ T) + (u : weakSobolevJet p O) : + b.tlLocalNormOn hp hW 2 1 2 (indicatorExtendLp T.isOpen.measurableSet hTO u.1.1) ≤ + b.patchConst p * (‖u.1.1‖ₑ + ∑ i, ‖u.1.2 i‖ₑ) := by + have hμ : volume.restrict (T : Set V) ≤ volume.restrict (O : Set V) := + Measure.restrict_mono (show (T : Set V) ⊆ O from hTO) le_rfl + refine (b.tlLocalNormOn_le_patchConst hp1 hp hW ((Lp.memLp u.1.1).mono_measure hμ) + (fun i => (Lp.memLp (u.1.2 i)).mono_measure hμ) (fun i => (u.2 i).mono hTO) hsupp + (indicatorExtendLp_apply_ae _ _ u.1.1)).trans ?_ + gcongr with i <;> exact (eLpNorm_mono_measure _ hμ).trans_eq (Lp.eNorm_def _).symm + +/-- The local means quasi-norm of Triebel–Lizorkin type of a jet is finite +(`Rd.LocalMeansBump.tlLocalNormOn_indicatorExtendLp_le`). -/ +theorem tlLocalNormOn_indicatorExtendLp_lt_top [Nontrivial V] (hp1 : 1 < p) (hp : p ≠ ∞) + {W : Set V} (hW : MeasurableSet W) {T O : Opens V} (hTO : T ≤ O) + (hsupp : ∀ x ∈ W, ∀ j i, ∀ y ∈ tsupport (dilate (2 ^ j) (b.divKernel i : V → ℂ)), x - y ∈ T) + (u : weakSobolevJet p O) : + b.tlLocalNormOn hp hW 2 1 2 (indicatorExtendLp T.isOpen.measurableSet hTO u.1.1) < ∞ := + (b.tlLocalNormOn_indicatorExtendLp_le hp1 hp hW hTO hsupp u).trans_lt (ENNReal.mul_lt_top + (b.patchConst_ne_top hp1 hp).lt_top (ENNReal.add_lt_top.2 ⟨eNorm_lt_top, + ENNReal.sum_lt_top.2 fun _ _ => eNorm_lt_top⟩)) + +/-- **The local extension of a jet converges absolutely** +(`Rd.LocalMeansBump.summable_localExtTerm_of_tlLocalNormOn`). -/ +theorem summable_localExtTerm_indicatorExtendLp [Nontrivial V] (hp1 : 1 < p) (hp : p ≠ ∞) + {W : Set V} (hW : MeasurableSet W) {T O : Opens V} (hTO : T ≤ O) + (hsupp : ∀ x ∈ W, ∀ j i, ∀ y ∈ tsupport (dilate (2 ^ j) (b.divKernel i : V → ℂ)), x - y ∈ T) + (u : weakSobolevJet p O) : + Summable fun j => + b.localExtTerm hp hW 2 j (indicatorExtendLp T.isOpen.measurableSet hTO u.1.1) := + b.summable_localExtTerm_of_tlLocalNormOn hp hW 2 one_pos two_ne_zero + (b.tlLocalNormOn_indicatorExtendLp_lt_top hp1 hp hW hTO hsupp u) + +/-- **The local extension of jets**: `u = (f, (g_i)_i) ↦ ∑_j η_j ⋆ 1_W (k_j ⋆ 1_T f)`, a linear +map from the jets of `W^1_p(O)` into `L_p(V)`; the series converges for every jet +(`Rd.LocalMeansBump.summable_localExtTerm_indicatorExtendLp`), so it is additive. -/ +noncomputable def localExtensionJet [Nontrivial V] (hp1 : 1 < p) (hp : p ≠ ∞) {W : Set V} + (hW : MeasurableSet W) {T O : Opens V} (hTO : T ≤ O) + (hsupp : ∀ x ∈ W, ∀ j i, ∀ y ∈ tsupport (dilate (2 ^ j) (b.divKernel i : V → ℂ)), x - y ∈ T) : + weakSobolevJet p O →ₗ[ℂ] Lp ℂ p (volume : Measure V) where + toFun u := b.localExtension hp hW 2 (indicatorExtendLp T.isOpen.measurableSet hTO u.1.1) + map_add' u v := by + simp only [localExtension, Submodule.coe_add, Prod.fst_add, map_add, localExtTerm_add] + exact (b.summable_localExtTerm_indicatorExtendLp hp1 hp hW hTO hsupp u).tsum_add + (b.summable_localExtTerm_indicatorExtendLp hp1 hp hW hTO hsupp v) + map_smul' c u := by + simp only [localExtension, Submodule.coe_smul, Prod.smul_fst, map_smul, localExtTerm_smul, + RingHom.id_apply] + exact tsum_const_smul'' c + +/-- The local extension of a jet lies in `F^1_{p,2}(V)` +(`Rd.LocalMeansBump.memTriebelLizorkin_localExtension_of_tlLocalNormOn`). -/ +theorem memTriebelLizorkin_localExtensionJet [Nontrivial V] (hp1 : 1 < p) (hp : p ≠ ∞) + {W : Set V} (hW : MeasurableSet W) {T O : Opens V} (hTO : T ≤ O) + (hsupp : ∀ x ∈ W, ∀ j i, ∀ y ∈ tsupport (dilate (2 ^ j) (b.divKernel i : V → ℂ)), x - y ∈ T) + (u : weakSobolevJet p O) : + MemTriebelLizorkin ((1 : ℕ) : ℝ) 2 (b.localExtensionJet hp1 hp hW hTO hsupp u) := + b.memTriebelLizorkin_localExtension_of_tlLocalNormOn hp1 hp hW + (b.tlLocalNormOn_indicatorExtendLp_lt_top hp1 hp hW hTO hsupp u) + +/-- **The local extension of a jet agrees with its value on `U`** if `U ⊆ T` and the dual kernels +at points of `U` only see `W` (`Rd.LocalMeansBump.ae_localExtension_eq_of_ae_eq_indicator`). -/ +theorem ae_localExtensionJet_eq [Nontrivial V] (hp1 : 1 < p) (hp : p ≠ ∞) {U W : Set V} + (hU : MeasurableSet U) (hW : MeasurableSet W) {T O : Opens V} (hTO : T ≤ O) (hUT : U ⊆ T) + (hUW : ∀ x ∈ U, ∀ j y, b.dual 2 j y ≠ 0 → x - y ∈ W) + (hsupp : ∀ x ∈ W, ∀ j i, ∀ y ∈ tsupport (dilate (2 ^ j) (b.divKernel i : V → ℂ)), x - y ∈ T) + (u : weakSobolevJet p O) : + ∀ᵐ x ∂volume, x ∈ U → b.localExtensionJet hp1 hp hW hTO hsupp u x = u.1.1 x := + b.ae_localExtension_eq_of_ae_eq_indicator hp one_le_two hU hW hUT hUW + (indicatorExtendLp_apply_ae T.isOpen.measurableSet hTO u.1.1) + (b.summable_localExtTerm_indicatorExtendLp hp1 hp hW hTO hsupp u) + +/-- **The bound of the local extension of jets**: for the local extension `F` of a jet +`u = (f, (g_i)_i)` and weak derivatives `G_i = ∂_{e_i} F ∈ L_p(V)`, +`‖F‖_p + ∑_i ‖G_i‖_p ≤ C (‖f‖_{L_p(O)} + ∑_i ‖g_i‖_{L_p(O)})` with +`C = Rd.LocalMeansBump.extensionConst b p` +(`Rd.LocalMeansBump.enorm_localExtension_add_le_extensionConst`). -/ +theorem enorm_localExtensionJet_add_le [Nontrivial V] (hp1 : 1 < p) (hp : p ≠ ∞) {W : Set V} + (hW : MeasurableSet W) {T O : Opens V} (hTO : T ≤ O) + (hsupp : ∀ x ∈ W, ∀ j i, ∀ y ∈ tsupport (dilate (2 ^ j) (b.divKernel i : V → ℂ)), x - y ∈ T) + (u : weakSobolevJet p O) {G : Fin (finrank ℝ V) → Lp ℂ p (volume : Measure V)} + (hG : ∀ i, HasWeakLineDeriv ⊤ (fun _ : Fin 1 => gridBasis V i) + (b.localExtensionJet hp1 hp hW hTO hsupp u) (G i)) : + ‖b.localExtensionJet hp1 hp hW hTO hsupp u‖ₑ + ∑ i, ‖G i‖ₑ ≤ + b.extensionConst p * (‖u.1.1‖ₑ + ∑ i, ‖u.1.2 i‖ₑ) := + b.enorm_localExtension_add_le_extensionConst hp1 hp hW + (b.tlLocalNormOn_indicatorExtendLp_le hp1 hp hW hTO hsupp u) + (b.tlLocalNormOn_indicatorExtendLp_lt_top hp1 hp hW hTO hsupp u) hG + +/-- **The extension operator from one patch** (Rychkov's local extension with the local means of +the gradient): let `U ⊆ T ⊆ O` with `T` and `O` open, let the dual kernels at points of `U` only +see `W`, and let `x - y ∈ T` for every `x ∈ W`, every level `j` and every `y` in the support of +`(K_i)_{2^j}`. Then for `1 < p < ∞` the local extension of jets +(`Rd.LocalMeansBump.localExtensionJet`) with its weak derivatives (`Rd.sobolevJet.lift`) is an +extension operator from `U` with the constant `Rd.LocalMeansBump.extensionConst b p`. -/ +noncomputable def sobolevExtensionOp [Nontrivial V] (hp1 : 1 < p) (hp : p ≠ ∞) {U W : Set V} + (hU : MeasurableSet U) (hW : MeasurableSet W) {T O : Opens V} (hTO : T ≤ O) (hUT : U ⊆ T) + (hUW : ∀ x ∈ U, ∀ j y, b.dual 2 j y ≠ 0 → x - y ∈ W) + (hsupp : ∀ x ∈ W, ∀ j i, ∀ y ∈ tsupport (dilate (2 ^ j) (b.divKernel i : V → ℂ)), x - y ∈ T) : + SobolevExtensionOp p O U (b.extensionConst p) := + let L := sobolevJet.lift (b.localExtensionJet hp1 hp hW hTO hsupp) fun u i => + (exists_hasWeakLineDeriv_of_memTriebelLizorkin hp1 hp (fun _ : Fin 1 => gridBasis V i) + (b.memTriebelLizorkin_localExtensionJet hp1 hp hW hTO hsupp u)).imp fun _ h => h.1 + { toLinearMap := L + memSobolev := fun u => memSobolev_of_memTriebelLizorkin hp1 hp + (b.memTriebelLizorkin_localExtensionJet hp1 hp hW hTO hsupp u) + ae_eq := fun u => b.ae_localExtensionJet_eq hp1 hp hU hW hTO hUT hUW hsupp u + bound := fun u => b.enorm_localExtensionJet_add_le hp1 hp hW hTO hsupp u fun i => (L u).2 i } + +omit [Fact (1 ≤ p)] in +/-- **The extension from one patch** (Rychkov's local extension with the local means of the +gradient): let `U ⊆ T` with `T` open, let the dual kernels at points of `U` only see `W`, and let +`x - y ∈ T` for every `x ∈ W`, every level `j` and every `y` in the support of `(K_i)_{2^j}`. Then +for `1 < p < ∞` the local extension `F = ∑_j η_j ⋆ 1_W (k_j ⋆ 1_T f)` of order two lies in +`F^1_{p,2}(V) = W^1_p(V)` and agrees with `f` on `U`, with the constant +`Rd.LocalMeansBump.extensionConst b p`: the extension operator from one patch +(`Rd.LocalMeansBump.sobolevExtensionOp` with `O = T`) applied to `f` +(`Rd.SobolevExtensionOp.extendsSobolev`). -/ +theorem extendsSobolev [Nontrivial V] (hp1 : 1 < p) (hp : p ≠ ∞) {U W : Set V} + (hU : MeasurableSet U) (hW : MeasurableSet W) {T : Opens V} (hUT : U ⊆ T) + (hUW : ∀ x ∈ U, ∀ j y, b.dual 2 j y ≠ 0 → x - y ∈ W) + (hsupp : ∀ x ∈ W, ∀ j i, ∀ y ∈ tsupport (dilate (2 ^ j) (b.divKernel i : V → ℂ)), x - y ∈ T) : + ExtendsSobolev p T U (b.extensionConst p) := + have : Fact (1 ≤ p) := ⟨hp1.le⟩ + (b.sobolevExtensionOp hp1 hp hU hW (O := T) le_rfl hUT hUW hsupp).extendsSobolev hUT + +end LocalMeansBump + +/-! ### Pasting -/ + +namespace SobolevExtensionOp + +variable {ι : Type*} [Fintype ι] {O : Opens V} {U : ι → Set V} {C : ι → ℝ≥0∞} + {ψ : ι → V → ℝ} {a : ι → ℝ} {d : ι → Fin (finrank ℝ V) → ℝ} + +/-- **The values of the pasted extension**: `u ↦ ∑_k ψ_k F_k` with `F_k` the value of `E_k u`, a +linear map from the jets of `W^1_p(O)` into `L_p(V)` (`Rd.mulLp`, `Rd.mulLp_add`, +`Rd.mulLp_smul`). -/ +noncomputable def pasteValue (E : ∀ k, SobolevExtensionOp p O ((O : Set V) ∩ U k) (C k)) + (hc : ∀ k, Continuous fun x => ((ψ k x : ℝ) : ℂ)) (ha : ∀ k x, ‖((ψ k x : ℝ) : ℂ)‖ ≤ a k) : + weakSobolevJet p O →ₗ[ℂ] Lp ℂ p (volume : Measure V) where + toFun u := ∑ k, mulLp (hc k) (ha k) ((E k).toLinearMap u).1.1 + map_add' u v := by + simp only [map_add, Submodule.coe_add, Prod.fst_add, mulLp_add, Finset.sum_add_distrib] + map_smul' c u := by + simp only [map_smul, Submodule.coe_smul, Prod.smul_fst, mulLp_smul, Finset.smul_sum, + RingHom.id_apply] + +/-- **The derivatives of the pasted extension** (the product rule, `Rd.hasWeakLineDeriv_mulLp`): +`∂_{e_i} ∑_k ψ_k F_k = ∑_k (ψ_k G_{k,i} + (∂_{e_i} ψ_k) F_k)` weakly on `V`, for +`E_k u = (F_k, (G_{k,i})_i)`. -/ +theorem hasWeakLineDeriv_pasteValue (E : ∀ k, SobolevExtensionOp p O ((O : Set V) ∩ U k) (C k)) + (hψ : ∀ k, ContDiff ℝ ((⊤ : ℕ∞) : WithTop ℕ∞) (ψ k)) + (hc : ∀ k, Continuous fun x => ((ψ k x : ℝ) : ℂ)) (ha : ∀ k x, ‖((ψ k x : ℝ) : ℂ)‖ ≤ a k) + (hc' : ∀ k i, Continuous fun x => ((fderiv ℝ (ψ k) x (gridBasis V i) : ℝ) : ℂ)) + (hd : ∀ k i x, ‖((fderiv ℝ (ψ k) x (gridBasis V i) : ℝ) : ℂ)‖ ≤ d k i) + (u : weakSobolevJet p O) (i : Fin (finrank ℝ V)) : + HasWeakLineDeriv ⊤ (fun _ : Fin 1 => gridBasis V i) (pasteValue E hc ha u) + (∑ k, (mulLp (hc k) (ha k) (((E k).toLinearMap u).1.2 i) + + mulLp (hc' k i) (hd k i) ((E k).toLinearMap u).1.1) : Lp ℂ p (volume : Measure V)) := by + refine (HasWeakLineDeriv.sum (s := Finset.univ) fun k _ => hasWeakLineDeriv_mulLp + (((E k).toLinearMap u).2 i) (hψ k) (hc k) (ha k) (hc' k i) (hd k i)).congr_ae ?_ ?_ <;> + rw [volume_restrict_top] + · exact (Lp.coeFn_finsetSum _ _).symm + · exact (Lp.coeFn_finsetSum _ _).symm + +/-- The pasted extension agrees with the value of the jet on `O`: `ψ_k F_k = ψ_k f` on `O` since +`F_k = f` on `O ∩ U_k ⊇ O ∩ supp ψ_k`, and `∑_k ψ_k = 1` on `O` (`Rd.ae_sum_mul_eq`). -/ +theorem ae_pasteValue_eq (E : ∀ k, SobolevExtensionOp p O ((O : Set V) ∩ U k) (C k)) + (hψU : ∀ k, tsupport (ψ k) ⊆ U k) (hψ1 : ∀ x ∈ (O : Set V), ∑ k, ψ k x = 1) + (hc : ∀ k, Continuous fun x => ((ψ k x : ℝ) : ℂ)) (ha : ∀ k x, ‖((ψ k x : ℝ) : ℂ)‖ ≤ a k) + (u : weakSobolevJet p O) : + ∀ᵐ x ∂volume, x ∈ (O : Set V) → pasteValue E hc ha u x = u.1.1 x := by + filter_upwards [Lp.coeFn_fun_finsetSum Finset.univ fun k => + mulLp (hc k) (ha k) ((E k).toLinearMap u).1.1, + ae_all_iff.2 fun k => mulLp_apply_ae (hc k) (ha k) ((E k).toLinearMap u).1.1, + ae_sum_mul_eq hψU hψ1 fun k => (E k).ae_eq u] with x h1 h2 h3 hxO + change (⇑(∑ k, mulLp (hc k) (ha k) ((E k).toLinearMap u).1.1)) x = u.1.1 x + rw [h1, ← h3 hxO] + exact Finset.sum_congr rfl fun k _ => h2 k + +/-- **The pasted extension operator**: for extension operators `E_k` from `O ∩ U_k` and a smooth, +compactly supported resolution of unity `(ψ_k)` on `O` subordinate to `(U_k)` with `|ψ_k| ≤ a_k`, +`|∂_{e_i} ψ_k| ≤ d_{k,i}`, the map `u ↦ ∑_k ψ_k E_k u` with the derivatives of the product rule is +an extension operator from `O` with the constant `∑_k (a_k + ∑_i d_{k,i}) C_k` +(`Rd.pasting_bound`). -/ +noncomputable def paste (E : ∀ k, SobolevExtensionOp p O ((O : Set V) ∩ U k) (C k)) + (hψ : ∀ k, ContDiff ℝ ((⊤ : ℕ∞) : WithTop ℕ∞) (ψ k)) (hcs : ∀ k, HasCompactSupport (ψ k)) + (hψU : ∀ k, tsupport (ψ k) ⊆ U k) (hψ1 : ∀ x ∈ (O : Set V), ∑ k, ψ k x = 1) + (hc : ∀ k, Continuous fun x => ((ψ k x : ℝ) : ℂ)) (ha : ∀ k x, ‖((ψ k x : ℝ) : ℂ)‖ ≤ a k) + (hc' : ∀ k i, Continuous fun x => ((fderiv ℝ (ψ k) x (gridBasis V i) : ℝ) : ℂ)) + (hd : ∀ k i x, ‖((fderiv ℝ (ψ k) x (gridBasis V i) : ℝ) : ℂ)‖ ≤ d k i) : + SobolevExtensionOp p O O (∑ k, (ENNReal.ofReal (a k) + ∑ i, ENNReal.ofReal (d k i)) * C k) + where + toLinearMap := sobolevJet.lift (pasteValue E hc ha) fun u i => + ⟨_, hasWeakLineDeriv_pasteValue E hψ hc ha hc' hd u i⟩ + memSobolev u := MemSobolev.sum _ fun k _ => + ((E k).memSobolev u).mulLp (hψ k) (hcs k) (hc k) (ha k) + ae_eq u := ae_pasteValue_eq E hψU hψ1 hc ha u + bound u := by + simp only [sobolevJet.lift_apply_fst, + sobolevJet.lift_apply_snd _ _ u _ (hasWeakLineDeriv_pasteValue E hψ hc ha hc' hd u _)] + exact pasting_bound (x := fun k => ‖((E k).toLinearMap u).1.1‖ₑ) + (y := fun k i => ‖((E k).toLinearMap u).1.2 i‖ₑ) + ((eNorm_sum_le _ _).trans (Finset.sum_le_sum fun k _ => enorm_mulLp_le _ _ _)) + (fun i => (eNorm_sum_le _ _).trans (Finset.sum_le_sum fun k _ => (eNorm_add_le _ _).trans + (add_le_add (enorm_mulLp_le _ _ _) (enorm_mulLp_le _ _ _)))) fun k => (E k).bound u + +end SobolevExtensionOp + +/-- **Pasting extension operators**: let `(U_k)` be a finite cover of `Ō` by bounded open sets and +let `E_k` be extension operators from `O ∩ U_k` with finite constants. Then there is an extension +operator from `O` with a finite constant (`Rd.SobolevExtensionOp.paste` with a smooth resolution of +unity, `Rd.exists_smooth_partition`). -/ +theorem sobolevExtensionOp_of_cover {ι : Type*} [Finite ι] {O : Opens V} (U : ι → Set V) + (hUo : ∀ k, IsOpen (U k)) (hUb : ∀ k, Bornology.IsBounded (U k)) + (hcov : closure (O : Set V) ⊆ ⋃ k, U k) {C : ι → ℝ≥0∞} (hC : ∀ k, C k ≠ ∞) + (E : ∀ k, SobolevExtensionOp p O ((O : Set V) ∩ U k) (C k)) : + ∃ C' : ℝ≥0∞, C' ≠ ∞ ∧ Nonempty (SobolevExtensionOp p O O C') := by + let := Fintype.ofFinite ι + obtain ⟨ψ, hψ, hψU, hψ1, -⟩ := exists_smooth_partition isClosed_closure U hUo hcov + have hcs : ∀ k, HasCompactSupport (ψ k) := fun k => + isCompact_of_isClosed_isBounded (isClosed_tsupport _) ((hUb k).subset (hψU k)) + have hc : ∀ k, Continuous fun x => ((ψ k x : ℝ) : ℂ) := fun k => + Complex.continuous_ofReal.comp (hψ k).continuous + have hc' : ∀ k i, Continuous fun x => ((fderiv ℝ (ψ k) x (gridBasis V i) : ℝ) : ℂ) := + fun k i => Complex.continuous_ofReal.comp + (((hψ k).continuous_fderiv (by simp)).clm_apply continuous_const) + choose a ha using fun k => + (hc k).bounded_above_of_compact_support ((hcs k).comp_left Complex.ofReal_zero) + choose d hd using fun k i => (hc' k i).bounded_above_of_compact_support + (((hcs k).fderiv_apply (𝕜 := ℝ) (gridBasis V i)).comp_left Complex.ofReal_zero) + exact ⟨_, ENNReal.sum_ne_top.2 fun k _ => ENNReal.mul_ne_top (ENNReal.add_ne_top.2 + ⟨ENNReal.ofReal_ne_top, ENNReal.sum_ne_top.2 fun _ _ => ENNReal.ofReal_ne_top⟩) (hC k), + ⟨SobolevExtensionOp.paste E hψ hcs hψU (fun x hx => hψ1 x (subset_closure hx)) hc ha hc' + hd⟩⟩ + +/-! ### Bounded Lipschitz domains -/ + +namespace BoundedLipschitzDomain + +variable (Ω : BoundedLipschitzDomain V) + +/-- **The boundary patches**: there are extension operators from `Ω ∩ B(c_j, ρ_j - 2ε)` with finite +constants (`Rd.LocalMeansBump.sobolevExtensionOp` on `T = Ω_j ∩ B(c_j, ρ_j) ⊆ Ω` with the cone +bump of `Ω_j` rescaled to radius `≤ ε / 2`, `Rd.LipschitzGraph.exists_coneBump_radius_le`). -/ +theorem exists_sobolevExtensionOp_boundary [Nontrivial V] (hp1 : 1 < p) (hp : p ≠ ∞) {ε : ℝ} + (hε : 0 < ε) (j : Fin Ω.N) : + ∃ C : ℝ≥0∞, C ≠ ∞ ∧ Nonempty (SobolevExtensionOp p Ω.toOpens + (Ω.carrier ∩ ball (Ω.center j) (Ω.radius j - 2 * ε)) C) := by + set G := Ω.graph j + set c := Ω.center j + set ρ := Ω.radius j + obtain ⟨b, hb, -, hR⟩ := G.exists_coneBump_radius_le zero_le_two hε + have hLR : ((2 : ℕ) : ℝ) * b.radius ≤ ε := by exact_mod_cast hR + have hTo : IsOpen (G.domain ∩ ball c ρ) := G.isOpen_domain.inter isOpen_ball + have hTΩ : (⟨_, hTo⟩ : Opens V) ≤ Ω.toOpens := by + change G.domain ∩ ball c ρ ⊆ Ω.carrier + rw [← Ω.inter_ball_eq j le_rfl] + exact Set.inter_subset_left + have hU : Ω.carrier ∩ ball c (ρ - 2 * ε) = G.domain ∩ ball c (ρ - 2 * ε) := + Ω.inter_ball_eq j (by linarith) + refine ⟨b.extensionConst p, b.extensionConst_ne_top hp1 hp, ?_⟩ + rw [hU] + exact ⟨b.sobolevExtensionOp hp1 hp ((G.isOpen_domain.inter isOpen_ball).measurableSet) + ((G.isOpen_domain.inter isOpen_ball).measurableSet) (T := ⟨_, hTo⟩) hTΩ + (Set.inter_subset_inter_right _ (ball_subset_ball (by linarith))) + (G.patch_support hb hLR) (G.patch_support_divKernel hb hR)⟩ + +omit [Fact (1 ≤ p)] in +/-- **The boundary patches**: Sobolev functions on `Ω` extend from `Ω ∩ B(c_j, ρ_j - 2ε)` with a +finite constant, by the extension operator of the patch +(`Rd.BoundedLipschitzDomain.exists_sobolevExtensionOp_boundary`, +`Rd.SobolevExtensionOp.extendsSobolev`). -/ +theorem exists_extendsSobolev_boundary [Nontrivial V] (hp1 : 1 < p) (hp : p ≠ ∞) {ε : ℝ} + (hε : 0 < ε) (j : Fin Ω.N) : + ∃ C : ℝ≥0∞, C ≠ ∞ ∧ ExtendsSobolev p Ω.toOpens + (Ω.carrier ∩ ball (Ω.center j) (Ω.radius j - 2 * ε)) C := by + have : Fact (1 ≤ p) := ⟨hp1.le⟩ + obtain ⟨C, hC, ⟨E⟩⟩ := Ω.exists_sobolevExtensionOp_boundary hp1 hp hε j + exact ⟨C, hC, E.extendsSobolev fun _ hx => hx.1⟩ + +/-- **The inner patch**: there is an extension operator from `{infDist(·, Ωᶜ) > 2δ}` with a finite +constant (`Rd.LocalMeansBump.sobolevExtensionOp` on `T = Ω` with a centred bump of radius +`≤ δ / 2`, `Rd.sub_mem_of_lt_infDist_of_norm_le`). -/ +theorem exists_sobolevExtensionOp_interior [Nontrivial V] (hp1 : 1 < p) (hp : p ≠ ∞) {δ : ℝ} + (hδ : 0 < δ) : + ∃ C : ℝ≥0∞, C ≠ ∞ ∧ Nonempty (SobolevExtensionOp p Ω.toOpens + (Ω.carrier ∩ {x : V | 2 * δ < infDist x Ω.carrierᶜ}) C) := by + have hR0 : 0 < δ / 2 := by positivity + set b := LocalMeansBump.centered (V := V) hR0 + have hR : 2 * b.radius = δ := by rw [LocalMeansBump.centered_radius]; ring + have hUΩ := setOf_lt_infDist_compl_subset Ω.carrier (by positivity : (0 : ℝ) ≤ 2 * δ) + refine ⟨b.extensionConst p, b.extensionConst_ne_top hp1 hp, ?_⟩ + rw [Set.inter_eq_right.2 hUΩ] + refine ⟨b.sobolevExtensionOp hp1 hp (measurableSet_infDist_gt Ω.carrier (2 * δ)) + (measurableSet_infDist_gt Ω.carrier δ) (T := Ω.toOpens) le_rfl hUΩ + (fun x hx j y hy => interior_patch_support Ω.carrier (fun y hy => + (not_lt.1 fun h => hy (b.dual_eq_zero 2 j h)).trans (by rw [← hR]; push_cast; rfl)) x hx y hy) + fun x hx j i y hy => sub_mem_of_lt_infDist_of_norm_le Ω.carrier hx (by + rw [← hR] + exact mem_closedBall_zero_iff.1 (b.tsupport_dilate_divKernel_subset_closedBall i j hy))⟩ + +omit [Fact (1 ≤ p)] in +/-- **The inner patch**: Sobolev functions on `Ω` extend from `{infDist(·, Ωᶜ) > 2δ}` with a finite +constant, by the extension operator of the patch +(`Rd.BoundedLipschitzDomain.exists_sobolevExtensionOp_interior`, +`Rd.SobolevExtensionOp.extendsSobolev`). -/ +theorem exists_extendsSobolev_interior [Nontrivial V] (hp1 : 1 < p) (hp : p ≠ ∞) {δ : ℝ} + (hδ : 0 < δ) : + ∃ C : ℝ≥0∞, C ≠ ∞ ∧ ExtendsSobolev p Ω.toOpens + (Ω.carrier ∩ {x : V | 2 * δ < infDist x Ω.carrierᶜ}) C := by + have : Fact (1 ≤ p) := ⟨hp1.le⟩ + obtain ⟨C, hC, ⟨E⟩⟩ := Ω.exists_sobolevExtensionOp_interior hp1 hp hδ + exact ⟨C, hC, E.extendsSobolev fun _ hx => hx.1⟩ + +/-- **Pasting the patch operators**: for a bounded Lipschitz domain `Ω` in dimension `n ≥ 1` and +`1 ≤ p ≤ ∞`, if for every `ε > 0` and every `j` there is an extension operator from the boundary +patch `Ω ∩ B(c_j, ρ_j - 2ε)` with a finite constant, and for every `δ > 0` one from the inner patch +`{x ∈ Ω : infDist(x, Ωᶜ) > 2δ}`, then there is an extension operator from `Ω` with a finite +constant (the patches of `Rd.BoundedLipschitzDomain.patch`, pasted by +`Rd.sobolevExtensionOp_of_cover`, `Rd.BoundedLipschitzDomain.exists_of_patches`). -/ +theorem exists_sobolevExtensionOp_of_patches [Nontrivial V] + (hbd : ∀ ε : ℝ, 0 < ε → ∀ j : Fin Ω.N, ∃ C : ℝ≥0∞, C ≠ ∞ ∧ Nonempty (SobolevExtensionOp p + Ω.toOpens (Ω.carrier ∩ ball (Ω.center j) (Ω.radius j - 2 * ε)) C)) + (hin : ∀ δ : ℝ, 0 < δ → ∃ C : ℝ≥0∞, C ≠ ∞ ∧ Nonempty (SobolevExtensionOp p Ω.toOpens + (Ω.carrier ∩ {x : V | 2 * δ < infDist x Ω.carrierᶜ}) C)) : + ∃ C : ℝ≥0∞, C ≠ ∞ ∧ Nonempty (SobolevExtensionOp p Ω.toOpens Ω.carrier C) := + Ω.exists_of_patches (fun U C => Nonempty (SobolevExtensionOp p Ω.toOpens U C)) + (fun U hUo hUb hcov _ hC hext => sobolevExtensionOp_of_cover (O := Ω.toOpens) U hUo hUb hcov + hC fun i => Nonempty.some (hext i)) hbd hin + +/-- **Rychkov's extension operator with a finite constant**: for a bounded Lipschitz domain +`Ω` in dimension `n ≥ 1` and `1 < p < ∞` there is an extension operator from `Ω` with a finite +constant (`Rd.BoundedLipschitzDomain.exists_sobolevExtensionOp_of_patches` with the patch operators +`Rd.BoundedLipschitzDomain.exists_sobolevExtensionOp_boundary` and +`Rd.BoundedLipschitzDomain.exists_sobolevExtensionOp_interior`). -/ +theorem exists_sobolevExtensionOp [Nontrivial V] (hp1 : 1 < p) (hp : p ≠ ∞) : + ∃ C : ℝ≥0∞, C ≠ ∞ ∧ Nonempty (SobolevExtensionOp p Ω.toOpens Ω.carrier C) := + Ω.exists_sobolevExtensionOp_of_patches + (fun _ hε j => Ω.exists_sobolevExtensionOp_boundary hp1 hp hε j) + (fun _ hδ => Ω.exists_sobolevExtensionOp_interior hp1 hp hδ) + +omit [Fact (1 ≤ p)] in +/-- **The extension theorem with a bound**: for a bounded Lipschitz domain `Ω` in dimension +`n ≥ 1` and `1 < p < ∞` there is a finite constant `C` such that every `f ∈ L_p(Ω)` with weak +derivatives `g_i = ∂_{e_i} f ∈ L_p(Ω)` agrees on `Ω` with some `F ∈ W^1_p(V)` whose weak +derivatives `G_i = ∂_{e_i} F` satisfy +`‖F‖_p + ∑_i ‖G_i‖_p ≤ C (‖f‖_{L_p(Ω)} + ∑_i ‖g_i‖_{L_p(Ω)})`: the extension operator of +`Rd.BoundedLipschitzDomain.exists_sobolevExtensionOp` applied to `f` +(`Rd.SobolevExtensionOp.extendsSobolev`). -/ +theorem exists_extendsSobolev [Nontrivial V] (hp1 : 1 < p) (hp : p ≠ ∞) : + ∃ C : ℝ≥0∞, C ≠ ∞ ∧ ExtendsSobolev p Ω.toOpens Ω.carrier C := by + have : Fact (1 ≤ p) := ⟨hp1.le⟩ + obtain ⟨C, hC, ⟨E⟩⟩ := Ω.exists_sobolevExtensionOp hp1 hp + exact ⟨C, hC, E.extendsSobolev subset_rfl⟩ + +end BoundedLipschitzDomain + +end Rd diff --git a/LeanPool/FunctionSpaces/Domains/Interval/BSpline.lean b/LeanPool/FunctionSpaces/Domains/Interval/BSpline.lean new file mode 100644 index 0000000000..1862bd778d --- /dev/null +++ b/LeanPool/FunctionSpaces/Domains/Interval/BSpline.lean @@ -0,0 +1,557 @@ +/- +Copyright (c) 2026 Mario Ullrich. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Mario Ullrich +-/ +module + +public import LeanPool.FunctionSpaces.Domains.Interval.Polynomials +public import Mathlib.LinearAlgebra.Vandermonde +public import Mathlib.LinearAlgebra.Matrix.Nondegenerate +public import Mathlib.LinearAlgebra.Dimension.OrzechProperty + +/- +Modified for Lean Pool: module names and imports adapted. +-/ + +/-! +# Cardinal B-splines + +The **cardinal B-spline** of order `r ≥ 1` is the function `N_r` that vanishes outside `[0, r)` +and on `[j, j + 1)`, `0 ≤ j < r`, is the polynomial +`B_j(X) = ∑_{l ≤ j} (-1)^l C(r, l) (X - l)^(r-1) / (r-1)!` (`Interval.bsplinePiece`), so that +`N_r(x) = ∑_l (-1)^l C(r, l) (x - l)_+^(r-1) / (r-1)!`. Everything here is algebra of the pieces. + +* Consecutive pieces differ by a multiple of `(X - j)^(r-1)` (`Interval.bsplinePiece_succ`), + and `B_r = 0` (`Interval.bsplinePiece_top`), the `r`-th difference of a polynomial of degree + `< r` (Mathlib's `Polynomial.fwdDiff_iter_eq_zero_of_degree_lt`). So `N_r` is a spline: its + pieces agree to order `r - 2` at the knots. +* On `[0, 1)` the `r` B-splines `N_r(· + j)`, `j < r`, are the polynomials + `β_j(X) = B_j(X + j)` (`Interval.bsplineLocal`), and these form a basis of the polynomials of + degree `< r` (`Interval.bsplineBasis`): in terms of the shifted powers `(X + m)^(r-1)`, which + are linearly independent by a Vandermonde argument, the change of basis is triangular. +* `β_j(X + 1) = β_{j+1} - (const) X^(r-1)` (`Interval.bsplineLocal_comp_add_one`). Hence the + coordinates of a polynomial in these bases on neighbouring unit intervals agree + (`Interval.bcoord_comp_add_one`, `Interval.bcoord_comp_eq_bsplineCoef`): **every polynomial `P` + of degree `< r` is `∑_n c_n(P) N_r(x - n)` on all of `ℝ`**, with one coefficient `c_n(P)` per + B-spline (`Interval.polyFun_eq_sum_bsplineCoef`). The coefficients are linear in `P` + (`Interval.bsplineCoef_sum`). +* Since `B_r = 0`, every piece also has a right-sided form, `B_j = -∑_{j < l ≤ r} (…) (X - l)^(r-1)` + (`Interval.bsplinePiece_eq_neg_sum`). Hence the powers `(X - a)^(r-1)`, `0 < a < r`, are + combinations of `β_1, …, β_{r-1}`, and **`c_n((X - m)^(r-1)) = 0` for `n < m < n + r`** + (`Interval.bsplineCoef_X_sub_C_pow`): the B-splines that contain a knot `m` in the interior of + their support do not see the jump `(x - m)_+^(r-1)` there. +-/ + +@[expose] public section + +open Polynomial Finset + +namespace Interval + +/-- The coefficients `(-1)^l C(r, l) / (r-1)!` of the pieces of the B-spline of order `r`. -/ +noncomputable def bsplineCoeff (r l : ℕ) : ℂ := + (-1 : ℂ) ^ l * (r.choose l : ℂ) / ((r - 1).factorial : ℂ) + +/-- The `j`-th piece of the cardinal B-spline of order `r`, +`B_j(X) = ∑_{l ≤ j} (-1)^l C(r, l) (X - l)^(r-1) / (r-1)!`, the B-spline on `[j, j + 1)`. -/ +noncomputable def bsplinePiece (r j : ℕ) : ℂ[X] := + ∑ l ∈ range (j + 1), C (bsplineCoeff r l) * (X - C (l : ℂ)) ^ (r - 1) + +/-- Consecutive pieces differ by a multiple of `(X - (j + 1))^(r-1)`. -/ +theorem bsplinePiece_succ (r j : ℕ) : + bsplinePiece r (j + 1) = + bsplinePiece r j + C (bsplineCoeff r (j + 1)) * (X - C ((j + 1 : ℕ) : ℂ)) ^ (r - 1) := by + rw [bsplinePiece, sum_range_succ, ← bsplinePiece] + +/-- The first piece `B_0 = X^(r-1)/(r-1)!`. -/ +theorem bsplinePiece_zero (r : ℕ) : + bsplinePiece r 0 = C (bsplineCoeff r 0) * (X - C 0) ^ (r - 1) := by + simp [bsplinePiece] + +/-- The power of a polynomial of degree `≤ 1` to the `r - 1` has degree `< r` (Mathlib's +`Polynomial.natDegree_pow_le_of_le`). -/ +theorem pow_mem_degreeLT {r : ℕ} (hr : 1 ≤ r) {P : ℂ[X]} (hP : P.natDegree ≤ 1) : + P ^ (r - 1) ∈ degreeLT ℂ r := by + rw [mem_degreeLT] + have h : (P ^ (r - 1)).natDegree < r := (natDegree_pow_le_of_le (r - 1) hP).trans_lt (by omega) + exact (degree_le_natDegree).trans_lt (by exact_mod_cast h) + +/-- The pieces have degree `< r`. -/ +theorem bsplinePiece_mem {r : ℕ} (hr : 1 ≤ r) (j : ℕ) : bsplinePiece r j ∈ degreeLT ℂ r := + Submodule.sum_mem _ fun l _ => by + rw [← smul_eq_C_mul] + exact Submodule.smul_mem _ _ (pow_mem_degreeLT hr (natDegree_X_sub_C_le _)) + +/-- **The last piece vanishes**, `B_r = 0`: `∑_{l ≤ r} (-1)^l C(r, l) (z - l)^(r-1) = 0` is the +`r`-th difference of the polynomial `(z - X)^(r-1)` of degree `< r` at `0` (Mathlib's +`Polynomial.fwdDiff_iter_eq_zero_of_degree_lt` and `fwdDiff_iter_eq_sum_shift`). -/ +theorem bsplinePiece_top {r : ℕ} (hr : 1 ≤ r) : bsplinePiece r r = 0 := by + refine Polynomial.funext fun z => ?_ + have hdeg : ((C z - X) ^ (r - 1)).natDegree < r := + (natDegree_pow_le_of_le (m := 1) (r - 1) ((natDegree_sub_le _ _).trans (by simp))).trans_lt + (by omega) + have hsum : ∑ k ∈ range (r + 1), + (-1 : ℂ) ^ (r - k) * (r.choose k : ℂ) * (z - k) ^ (r - 1) = 0 := by + have h := congrFun (Polynomial.fwdDiff_iter_eq_zero_of_degree_lt hdeg) 0 + rw [fwdDiff_iter_eq_sum_shift, Pi.zero_apply] at h + refine (sum_congr rfl fun k _ => ?_).trans h + simp only [eval_pow, eval_sub, eval_C, eval_X, zero_add, nsmul_eq_mul, mul_one, zsmul_eq_mul] + push_cast + ring + rw [eval_zero, bsplinePiece, eval_finsetSum] + simp only [eval_mul, eval_C, eval_pow, eval_sub, eval_X] + calc ∑ l ∈ range (r + 1), bsplineCoeff r l * (z - l) ^ (r - 1) + = ((-1 : ℂ) ^ r / ((r - 1).factorial : ℂ)) * ∑ k ∈ range (r + 1), + (-1 : ℂ) ^ (r - k) * (r.choose k : ℂ) * (z - k) ^ (r - 1) := by + rw [mul_sum] + refine sum_congr rfl fun l hl => ?_ + rw [bsplineCoeff, ← Rd.neg_one_pow_mul_neg_one_pow_sub (Nat.lt_succ_iff.1 (mem_range.1 hl))] + ring + _ = 0 := by rw [hsum, mul_zero] + +/-! ### The B-spline basis on a unit interval -/ + +/-- The **B-splines on `[0, 1)`**: `β_j(X) = B_j(X + j)` is `N_r(· + j)` on `[0, 1)`. -/ +noncomputable def bsplineLocal (r j : ℕ) : ℂ[X] := (bsplinePiece r j).comp (X + C (j : ℂ)) + +/-- `β_j = ∑_{l ≤ j} (-1)^l C(r, l) (X + (j - l))^(r-1) / (r-1)!`. -/ +theorem bsplineLocal_eq (r j : ℕ) : + bsplineLocal r j = + ∑ l ∈ range (j + 1), C (bsplineCoeff r l) * (X + C ((j - l : ℕ) : ℂ)) ^ (r - 1) := by + rw [bsplineLocal, bsplinePiece, Polynomial.sum_comp] + refine sum_congr rfl fun l hl => ?_ + have hl' : l ≤ j := Nat.lt_succ_iff.1 (mem_range.1 hl) + rw [mul_comp, C_comp, pow_comp, sub_comp, X_comp, C_comp, Nat.cast_sub hl', C_sub] + ring + +/-- The B-splines on `[0, 1)` have degree `< r`. -/ +theorem bsplineLocal_mem {r : ℕ} (hr : 1 ≤ r) (j : ℕ) : bsplineLocal r j ∈ degreeLT ℂ r := by + rw [bsplineLocal_eq] + exact Submodule.sum_mem _ fun l _ => by + rw [← smul_eq_C_mul] + exact Submodule.smul_mem _ _ (pow_mem_degreeLT hr (natDegree_X_add_C _).le) + +/-- **The shifted powers `(X + m)^(r-1)`, `m < r`, are linearly independent**: their +coefficients give the system `∑_m g_m m^e = 0`, `e < r`, with a Vandermonde matrix. -/ +theorem linearIndependent_X_add_C_pow (r : ℕ) : + LinearIndependent ℂ (fun m : Fin r => (X + C ((m : ℕ) : ℂ)) ^ (r - 1)) := by + rw [Fintype.linearIndependent_iff] + intro g hg + have hcoeff : ∀ d : ℕ, + ∑ m : Fin r, g m * (((m : ℕ) : ℂ) ^ (r - 1 - d) * ((r - 1).choose d : ℂ)) = 0 := fun d => by + have h := congrArg (fun P => P.coeff d) hg + simpa only [finsetSum_coeff, AddMonoidAlgebra.coeff_smul_apply, coeff_X_add_C_pow, + smul_eq_mul, coeff_zero] using h + have hv : Matrix.vecMul g (Matrix.vandermonde (fun m : Fin r => ((m : ℕ) : ℂ))) = 0 := by + funext e + have h := hcoeff (r - 1 - e) + rw [show r - 1 - (r - 1 - e) = e by omega] at h + have hc : ((r - 1).choose (r - 1 - e) : ℂ) ≠ 0 := + Nat.cast_ne_zero.2 (Nat.choose_pos (by omega)).ne' + simp only [← mul_assoc] at h + rw [← sum_mul] at h + simp only [Matrix.vecMul, dotProduct, Matrix.vandermonde_apply, Pi.zero_apply] + exact (mul_eq_zero.1 h).resolve_right hc + have hdet : (Matrix.vandermonde (fun m : Fin r => ((m : ℕ) : ℂ))).det ≠ 0 := + Matrix.det_vandermonde_ne_zero_iff.2 fun a b hab => Fin.ext (by exact_mod_cast hab) + exact fun i => congrFun (Matrix.eq_zero_of_vecMul_eq_zero hdet hv) i + +/-- The shifted powers as elements of the polynomials of degree `< r`. -/ +noncomputable def shiftedPow {r : ℕ} (hr : 1 ≤ r) (m : Fin r) : degreeLT ℂ r := + ⟨(X + C ((m : ℕ) : ℂ)) ^ (r - 1), pow_mem_degreeLT hr (natDegree_X_add_C _).le⟩ + +/-- The shifted powers span the polynomials of degree `< r`. -/ +theorem top_le_span_shiftedPow {r : ℕ} (hr : 1 ≤ r) : + ⊤ ≤ Submodule.span ℂ (Set.range (shiftedPow hr)) := by + have hli : LinearIndependent ℂ (shiftedPow hr) := by + have h := linearIndependent_X_add_C_pow r + exact LinearIndependent.of_comp (degreeLT ℂ r).subtype h + have := hli.span_eq_top_of_card_eq_finrank' (by rw [Fintype.card_fin, finrank_degreeLT]) + exact this.ge + +/-- The B-splines on `[0, 1)` as elements of the polynomials of degree `< r`. -/ +noncomputable def bsplineVec {r : ℕ} (hr : 1 ≤ r) (j : Fin r) : degreeLT ℂ r := + ⟨bsplineLocal r j, bsplineLocal_mem hr j⟩ + +/-- `β_j = (1/(r-1)!) (X + j)^(r-1) + ∑_{1 ≤ l ≤ j} (…) (X + (j - l))^(r-1)`, the triangular +form in the shifted powers. -/ +theorem bsplineVec_eq {r : ℕ} (hr : 1 ≤ r) (j : Fin r) : + bsplineVec hr j = bsplineCoeff r 0 • shiftedPow hr j + ∑ l ∈ range j, + bsplineCoeff r (l + 1) • shiftedPow hr ⟨j - (l + 1), by omega⟩ := by + apply Subtype.ext + simp only [bsplineVec, shiftedPow, Submodule.coe_add, Submodule.coe_smul, Submodule.coe_sum, + smul_eq_C_mul] + rw [bsplineLocal_eq, sum_range_succ', Nat.sub_zero, add_comm] + +/-- **The B-splines on `[0, 1)` span the polynomials of degree `< r`**: every shifted power is a +combination of them, by induction along the triangular form. -/ +theorem top_le_span_bsplineVec {r : ℕ} (hr : 1 ≤ r) : + ⊤ ≤ Submodule.span ℂ (Set.range (bsplineVec hr)) := by + refine (top_le_span_shiftedPow hr).trans (Submodule.span_le.2 ?_) + rintro _ ⟨⟨m, hm⟩, rfl⟩ + induction m using Nat.strong_induction_on with + | _ m ih => + have hc : bsplineCoeff r 0 ≠ 0 := by + simp [bsplineCoeff, Nat.factorial_ne_zero] + have h := bsplineVec_eq hr ⟨m, hm⟩ + have hsum : ∑ l ∈ range m, bsplineCoeff r (l + 1) • shiftedPow hr ⟨m - (l + 1), by omega⟩ ∈ + Submodule.span ℂ (Set.range (bsplineVec hr)) := + Submodule.sum_mem _ fun l hl => Submodule.smul_mem _ _ (ih (m - (l + 1)) + (by have := mem_range.1 hl; omega) (by omega)) + have hβ : bsplineVec hr ⟨m, hm⟩ ∈ Submodule.span ℂ (Set.range (bsplineVec hr)) := + Submodule.subset_span ⟨_, rfl⟩ + have hrepr : shiftedPow hr ⟨m, hm⟩ = (bsplineCoeff r 0)⁻¹ • + (bsplineVec hr ⟨m, hm⟩ - ∑ l ∈ range m, + bsplineCoeff r (l + 1) • shiftedPow hr ⟨m - (l + 1), by omega⟩) := by + rw [h, add_sub_cancel_right, smul_smul, inv_mul_cancel₀ hc, one_smul] + rw [hrepr] + exact Submodule.smul_mem _ _ (Submodule.sub_mem _ hβ hsum) + +/-- **The B-spline basis** of the polynomials of degree `< r` on `[0, 1)`. -/ +noncomputable def bsplineBasis {r : ℕ} (hr : 1 ≤ r) : Module.Basis (Fin r) ℂ (degreeLT ℂ r) := + basisOfTopLeSpanOfCardEqFinrank (bsplineVec hr) (top_le_span_bsplineVec hr) + (by rw [Fintype.card_fin, finrank_degreeLT]) + +/-- The elements of the B-spline basis. -/ +theorem bsplineBasis_apply {r : ℕ} (hr : 1 ≤ r) (j : Fin r) : + bsplineBasis hr j = bsplineVec hr j := by + rw [bsplineBasis, coe_basisOfTopLeSpanOfCardEqFinrank] + +/-! ### Coordinates in the B-spline basis -/ + +/-- Splitting off the last term of a sum over `range r`, `r ≥ 1`. -/ +theorem sum_range_eq_add_last {M : Type*} [AddCommMonoid M] {r : ℕ} (hr : 1 ≤ r) (f : ℕ → M) : + ∑ k ∈ range r, f k = ∑ k ∈ range (r - 1), f k + f (r - 1) := by + conv_lhs => rw [show r = r - 1 + 1 by omega] + rw [sum_range_succ] + +/-- Splitting off the first term of a sum over `range r`, `r ≥ 1`. -/ +theorem sum_range_eq_first_add {M : Type*} [AddCommMonoid M] {r : ℕ} (hr : 1 ≤ r) + (f : ℕ → M) : ∑ k ∈ range r, f k = f 0 + ∑ k ∈ range (r - 1), f (k + 1) := by + conv_lhs => rw [show r = r - 1 + 1 by omega] + rw [sum_range_succ', add_comm] + +open Classical in +/-- The **coordinates** of a polynomial `P` of degree `< r` in the B-spline basis on `[0, 1)`: +`P = ∑_{j < r} a_j β_j` (`0` for `j ≥ r` or `P` of higher degree). -/ +noncomputable def bcoord {r : ℕ} (hr : 1 ≤ r) (P : ℂ[X]) (j : ℕ) : ℂ := + if h : P ∈ degreeLT ℂ r ∧ j < r then (bsplineBasis hr).repr ⟨P, h.1⟩ ⟨j, h.2⟩ else 0 + +/-- **Expansion in the B-spline basis**: `P = ∑_{j < r} a_j β_j`. -/ +theorem sum_bcoord {r : ℕ} (hr : 1 ≤ r) {P : ℂ[X]} (hP : P ∈ degreeLT ℂ r) : + ∑ j ∈ range r, bcoord hr P j • bsplineLocal r j = P := by + have h := congrArg Subtype.val ((bsplineBasis hr).sum_repr ⟨P, hP⟩) + simp only [Submodule.coe_sum, Submodule.coe_smul, bsplineBasis_apply, bsplineVec] at h + rw [← Fin.sum_univ_eq_sum_range (fun j => bcoord hr P j • bsplineLocal r j)] + refine (sum_congr rfl fun j _ => ?_).trans h + rw [bcoord, dite_eq_left ⟨hP, j.2⟩] + +/-- **The coordinates are unique**: if `P = ∑_{j < r} c_j β_j`, then the `c_j` are the +coordinates. -/ +theorem bcoord_eq_of_sum {r : ℕ} (hr : 1 ≤ r) {P : ℂ[X]} (c : ℕ → ℂ) + (h : ∑ j ∈ range r, c j • bsplineLocal r j = P) {j : ℕ} (hj : j < r) : + bcoord hr P j = c j := by + have hP : P ∈ degreeLT ℂ r := h ▸ Submodule.sum_mem _ fun j _ => + Submodule.smul_mem _ _ (bsplineLocal_mem hr j) + have hli := (bsplineBasis hr).linearIndependent + rw [Fintype.linearIndependent_iff] at hli + have h0 := hli (fun k => bcoord hr P k - c k) (by + apply Subtype.ext + simp only [sub_smul, sum_sub_distrib, Submodule.coe_sub, Submodule.coe_sum, + Submodule.coe_smul, bsplineBasis_apply, bsplineVec, Submodule.coe_zero] + rw [Fin.sum_univ_eq_sum_range (fun k => bcoord hr P k • bsplineLocal r k), + Fin.sum_univ_eq_sum_range (fun k => c k • bsplineLocal r k), sum_bcoord hr hP, h, sub_self]) + ⟨j, hj⟩ + exact sub_eq_zero.1 h0 + +/-- `β_j(X + 1) = β_{j+1} - (-1)^(j+1) C(r, j+1)/(r-1)! X^(r-1)`. -/ +theorem bsplineLocal_comp_add_one (r j : ℕ) : + (bsplineLocal r j).comp (X + C 1) = + bsplineLocal r (j + 1) - C (bsplineCoeff r (j + 1)) * X ^ (r - 1) := by + have hL : (bsplineLocal r j).comp (X + C 1) = + (bsplinePiece r j).comp (X + C ((j + 1 : ℕ) : ℂ)) := by + rw [bsplineLocal, comp_assoc] + congr 1 + simp only [add_comp, X_comp, C_comp, Nat.cast_succ, C_add, C_1] + ring + have hR : bsplineLocal r (j + 1) = (bsplinePiece r j).comp (X + C ((j + 1 : ℕ) : ℂ)) + + C (bsplineCoeff r (j + 1)) * X ^ (r - 1) := by + rw [bsplineLocal, bsplinePiece_succ, add_comp, mul_comp, C_comp, pow_comp, sub_comp, X_comp, + C_comp, add_sub_cancel_right] + rw [hL, hR, add_sub_cancel_right] + +/-- `β_0 = X^(r-1)/(r-1)!`. -/ +theorem bsplineLocal_zero (r : ℕ) : bsplineLocal r 0 = C (bsplineCoeff r 0) * X ^ (r - 1) := by + simp [bsplineLocal, bsplinePiece] + +/-- `β_r = 0`. -/ +theorem bsplineLocal_top {r : ℕ} (hr : 1 ≤ r) : bsplineLocal r r = 0 := by + rw [bsplineLocal, bsplinePiece_top hr, zero_comp] + +/-- **The coordinates move by one under a shift by `1`**: the coordinate `j + 1` of `P(X + 1)` is +the coordinate `j` of `P`. -/ +theorem bcoord_comp_add_one {r : ℕ} (hr : 1 ≤ r) {P : ℂ[X]} (hP : P ∈ degreeLT ℂ r) {j : ℕ} + (hj : j + 1 < r) : bcoord hr (P.comp (X + C 1)) (j + 1) = bcoord hr P j := by + have hc0 : bsplineCoeff r 0 ≠ 0 := by simp [bsplineCoeff, Nat.factorial_ne_zero] + -- the coordinates of `P(X + 1)` + have h1 : P.comp (X + C 1) = ∑ k ∈ range r, bcoord hr P k • bsplineLocal r (k + 1) - + C (∑ k ∈ range r, bcoord hr P k * bsplineCoeff r (k + 1)) * X ^ (r - 1) := by + conv_lhs => rw [← sum_bcoord hr hP] + rw [Polynomial.sum_comp] + simp only [smul_eq_C_mul, mul_comp, C_comp, bsplineLocal_comp_add_one, mul_sub, + sum_sub_distrib, map_sum, sum_mul, C_mul, mul_assoc] + have h2 : ∑ k ∈ range r, bcoord hr P k • bsplineLocal r (k + 1) = + ∑ k ∈ range (r - 1), bcoord hr P k • bsplineLocal r (k + 1) := by + rw [sum_range_eq_add_last hr, Nat.sub_add_cancel hr, bsplineLocal_top hr, smul_zero, add_zero] + have hexp : ∑ k ∈ range r, (if k = 0 then + -(∑ k ∈ range r, bcoord hr P k * bsplineCoeff r (k + 1)) / bsplineCoeff r 0 + else bcoord hr P (k - 1)) • bsplineLocal r k = P.comp (X + C 1) := by + rw [h1, h2, sum_range_eq_first_add hr] + simp only [Nat.succ_ne_zero, ↓reduceIte, Nat.add_sub_cancel, bsplineLocal_zero, + smul_eq_C_mul, ← mul_assoc, ← C_mul, div_mul_cancel₀ _ hc0, C_neg, neg_mul] + ring + rw [bcoord_eq_of_sum hr _ hexp hj] + simp + +/-! ### B-spline coefficients of polynomials -/ + +/-- Translates of polynomials of degree `< r` have degree `< r`: Mathlib's +`Polynomial.taylor_mem_degreeLT`, since `taylor a P = P.comp (X + C a)` (`Polynomial.taylor_apply`), +stated in the `comp` form that the rewrites below need. -/ +theorem comp_X_add_C_mem {r : ℕ} {P : ℂ[X]} (hP : P ∈ degreeLT ℂ r) (a : ℂ) : + P.comp (X + C a) ∈ degreeLT ℂ r := + (taylor_mem_degreeLT (r := a)).2 hP + +/-- The **B-spline coefficient** `c_n(P)` of a polynomial `P`: the coordinate of `N_r(· - n)` in +the expansion of `P` on `[n, n + 1)`. -/ +noncomputable def bsplineCoef {r : ℕ} (hr : 1 ≤ r) (P : ℂ[X]) (n : ℤ) : ℂ := + bcoord hr (P.comp (X + C (n : ℂ))) 0 + +/-- **Consistency of the coefficients**: on `[i, i + 1)` the coordinate `j` of `P(X + i)` is the +coefficient `c_{i-j}(P)` of the B-spline `N_r(· - (i - j))`, whatever the interval. -/ +theorem bcoord_comp_eq_bsplineCoef {r : ℕ} (hr : 1 ≤ r) {P : ℂ[X]} (hP : P ∈ degreeLT ℂ r) + (i : ℤ) {j : ℕ} (hj : j < r) : + bcoord hr (P.comp (X + C (i : ℂ))) j = bsplineCoef hr P (i - j) := by + induction j generalizing i with + | zero => simp [bsplineCoef] + | succ j ih => + have h : P.comp (X + C (i : ℂ)) = (P.comp (X + C ((i - 1 : ℤ) : ℂ))).comp (X + C 1) := by + rw [comp_assoc] + congr 1 + rw [add_comp, X_comp, C_comp] + push_cast + simp only [C_sub, C_1] + ring + rw [h, bcoord_comp_add_one hr (comp_X_add_C_mem hP _) hj, ih (i - 1) (by omega)] + congr 1 + push_cast + ring + +/-- The **cardinal B-spline** `N_r` of order `r`: the piece `B_j` on `[j, j + 1)`, `0 ≤ j < r`, +and `0` outside `[0, r)`. -/ +noncomputable def bspline (r : ℕ) (x : ℝ) : ℂ := + if 0 ≤ x ∧ x < r then polyFun (bsplinePiece r ⌊x⌋₊) x else 0 + +/-- On `[j, j + 1)`, `j < r`, the B-spline is its piece `B_j`. -/ +theorem bspline_eq_piece {r j : ℕ} (hj : j < r) {x : ℝ} (hx : x ∈ Set.Ico (j : ℝ) (j + 1)) : + bspline r x = polyFun (bsplinePiece r j) x := by + have h0 : 0 ≤ x := (Nat.cast_nonneg j).trans hx.1 + have hfl : ⌊x⌋₊ = j := (Nat.floor_eq_iff h0).2 hx + have hxr : x < r := hx.2.trans_le (by exact_mod_cast hj) + simp only [bspline, h0, hxr, and_self, ↓reduceIte, hfl] + +/-- The B-spline vanishes left of `0`. -/ +theorem bspline_eq_zero_of_lt (r : ℕ) {x : ℝ} (hx : x < 0) : bspline r x = 0 := by + simp only [bspline, not_le.2 hx, false_and, ↓reduceIte] + +/-- The B-spline vanishes right of `r`. -/ +theorem bspline_eq_zero_of_ge {r : ℕ} {x : ℝ} (hx : (r : ℝ) ≤ x) : bspline r x = 0 := by + simp only [bspline, not_lt.2 hx, and_false, ↓reduceIte] + +/-- `N_r(x - (i - j)) = β_j(x - i)` for `x ∈ [i, i + 1)` and `j < r`. -/ +theorem bspline_sub_eq {r : ℕ} {i : ℤ} {j : ℕ} (hj : j < r) {x : ℝ} + (hx : x ∈ Set.Ico (i : ℝ) (i + 1)) : + bspline r (x - ((i - j : ℤ) : ℝ)) = polyFun (bsplineLocal r j) (x - i) := by + have hmem : x - ((i - j : ℤ) : ℝ) ∈ Set.Ico (j : ℝ) (j + 1) := by + push_cast + constructor <;> linarith [hx.1, hx.2] + rw [bspline_eq_piece hj hmem] + simp only [polyFun, bsplineLocal, eval_comp, eval_add, eval_X, eval_C] + congr 1 + push_cast + ring + +/-- **Polynomials are combinations of B-splines** (Marsden's identity): for `P` of degree `< r` +and `x ∈ [i, i + 1)`, `P(x) = ∑_{j < r} c_{i-j}(P) N_r(x - (i - j))`, with the coefficients +`c_n(P)` independent of the interval. -/ +theorem polyFun_eq_sum_bsplineCoef {r : ℕ} (hr : 1 ≤ r) {P : ℂ[X]} (hP : P ∈ degreeLT ℂ r) + {i : ℤ} {x : ℝ} (hx : x ∈ Set.Ico (i : ℝ) (i + 1)) : + polyFun P x = + ∑ j ∈ range r, bsplineCoef hr P (i - j) * bspline r (x - ((i - j : ℤ) : ℝ)) := by + have hexp := sum_bcoord hr (comp_X_add_C_mem hP (i : ℂ)) + have hval : polyFun P x = polyFun (P.comp (X + C (i : ℂ))) (x - i) := by + simp only [polyFun, eval_comp, eval_add, eval_X, eval_C] + congr 1 + push_cast + ring + rw [hval, ← hexp] + simp only [polyFun, eval_finsetSum, eval_smul, smul_eq_mul] + refine sum_congr rfl fun j hj => ?_ + rw [bcoord_comp_eq_bsplineCoef hr hP i (mem_range.1 hj), bspline_sub_eq (mem_range.1 hj) hx, + polyFun] + +/-! ### Linearity of the coefficients -/ + +/-- The B-spline coordinates are additive. -/ +theorem bcoord_add {r : ℕ} (hr : 1 ≤ r) {P Q : ℂ[X]} (hP : P ∈ degreeLT ℂ r) + (hQ : Q ∈ degreeLT ℂ r) (j : ℕ) : bcoord hr (P + Q) j = bcoord hr P j + bcoord hr Q j := by + by_cases hj : j < r + · have h1 : P + Q ∈ degreeLT ℂ r ∧ j < r := ⟨Submodule.add_mem _ hP hQ, hj⟩ + have h2 : P ∈ degreeLT ℂ r ∧ j < r := ⟨hP, hj⟩ + have h3 : Q ∈ degreeLT ℂ r ∧ j < r := ⟨hQ, hj⟩ + simp only [bcoord, h1, h2, h3, and_self, ↓reduceDIte] + rw [show (⟨P + Q, h1.1⟩ : degreeLT ℂ r) = ⟨P, hP⟩ + ⟨Q, hQ⟩ from rfl, map_add, + Finsupp.add_apply] + · have h : ∀ R : ℂ[X], ¬ (R ∈ degreeLT ℂ r ∧ j < r) := fun R h => hj h.2 + simp only [bcoord, h, ↓reduceDIte, add_zero] + +/-- The B-spline coordinates are homogeneous. -/ +theorem bcoord_C_mul {r : ℕ} (hr : 1 ≤ r) (c : ℂ) {P : ℂ[X]} (hP : P ∈ degreeLT ℂ r) (j : ℕ) : + bcoord hr (C c * P) j = c * bcoord hr P j := by + by_cases hj : j < r + · have hcP : C c * P ∈ degreeLT ℂ r := by + rw [← smul_eq_C_mul]; exact Submodule.smul_mem _ _ hP + have h1 : C c * P ∈ degreeLT ℂ r ∧ j < r := ⟨hcP, hj⟩ + have h2 : P ∈ degreeLT ℂ r ∧ j < r := ⟨hP, hj⟩ + simp only [bcoord, h1, h2, and_self, ↓reduceDIte] + rw [show (⟨C c * P, h1.1⟩ : degreeLT ℂ r) = c • ⟨P, hP⟩ from + Subtype.ext (by simp [smul_eq_C_mul]), map_smul, Finsupp.smul_apply, smul_eq_mul] + · have h : ∀ R : ℂ[X], ¬ (R ∈ degreeLT ℂ r ∧ j < r) := fun R h => hj h.2 + simp only [bcoord, h, ↓reduceDIte, mul_zero] + +/-- The B-spline coefficients are additive. -/ +theorem bsplineCoef_add {r : ℕ} (hr : 1 ≤ r) {P Q : ℂ[X]} (hP : P ∈ degreeLT ℂ r) + (hQ : Q ∈ degreeLT ℂ r) (n : ℤ) : + bsplineCoef hr (P + Q) n = bsplineCoef hr P n + bsplineCoef hr Q n := by + rw [bsplineCoef, add_comp, bcoord_add hr (comp_X_add_C_mem hP _) (comp_X_add_C_mem hQ _)] + rfl + +/-- The B-spline coefficients are homogeneous. -/ +theorem bsplineCoef_C_mul {r : ℕ} (hr : 1 ≤ r) (c : ℂ) {P : ℂ[X]} (hP : P ∈ degreeLT ℂ r) + (n : ℤ) : bsplineCoef hr (C c * P) n = c * bsplineCoef hr P n := by + rw [bsplineCoef, mul_comp, C_comp, bcoord_C_mul hr c (comp_X_add_C_mem hP _)] + rfl + +/-- The B-spline coefficients of finite combinations of polynomials of degree `< r`. -/ +theorem bsplineCoef_sum {r : ℕ} (hr : 1 ≤ r) {ι : Type*} (s : Finset ι) (c : ι → ℂ) + {P : ι → ℂ[X]} (hP : ∀ i ∈ s, P i ∈ degreeLT ℂ r) (n : ℤ) : + bsplineCoef hr (∑ i ∈ s, c i • P i) n = ∑ i ∈ s, c i * bsplineCoef hr (P i) n := by + classical + induction s using Finset.induction_on with + | empty => + have h := bsplineCoef_C_mul hr 0 (Submodule.zero_mem (degreeLT ℂ r)) n + simpa using h + | insert j s hj ih => + have hj' : P j ∈ degreeLT ℂ r := hP j (Finset.mem_insert_self j s) + have hs : ∀ i ∈ s, P i ∈ degreeLT ℂ r := fun i hi => hP i (Finset.mem_insert_of_mem hi) + rw [Finset.sum_insert hj, Finset.sum_insert hj, + bsplineCoef_add hr (Submodule.smul_mem _ _ hj') + (Submodule.sum_mem _ fun i hi => Submodule.smul_mem _ _ (hs i hi)), + smul_eq_C_mul, bsplineCoef_C_mul hr _ hj', ih hs] + +/-! ### Coefficients of shifted powers -/ + +/-- **The right-sided form of the pieces**: since `B_r = 0` (`Interval.bsplinePiece_top`), +`B_j = -∑_{j < l ≤ r} (-1)^l C(r, l) (X - l)^(r-1) / (r-1)!` for `j ≤ r`. -/ +theorem bsplinePiece_eq_neg_sum {r : ℕ} (hr : 1 ≤ r) {j : ℕ} (hj : j ≤ r) : + bsplinePiece r j = + -∑ l ∈ Ico (j + 1) (r + 1), C (bsplineCoeff r l) * (X - C (l : ℂ)) ^ (r - 1) := by + have h := bsplinePiece_top hr + rw [bsplinePiece, ← sum_range_add_sum_Ico _ (show j + 1 ≤ r + 1 by omega), ← bsplinePiece] at h + exact eq_neg_of_add_eq_zero_left h + +/-- The B-splines on `[0, 1)` in right-sided form: +`β_j = -∑_{j < l ≤ r} (-1)^l C(r, l) (X - (l - j))^(r-1) / (r-1)!` for `j ≤ r`. -/ +theorem bsplineLocal_eq_neg_sum {r : ℕ} (hr : 1 ≤ r) {j : ℕ} (hj : j ≤ r) : + bsplineLocal r j = -∑ l ∈ Ico (j + 1) (r + 1), + C (bsplineCoeff r l) * (X - C ((l - j : ℕ) : ℂ)) ^ (r - 1) := by + rw [bsplineLocal, bsplinePiece_eq_neg_sum hr hj, neg_comp, Polynomial.sum_comp] + congr 1 + refine sum_congr rfl fun l hl => ?_ + have hl' : j ≤ l := by have := (mem_Ico.1 hl).1; omega + rw [mul_comp, C_comp, pow_comp, sub_comp, X_comp, C_comp, Nat.cast_sub hl', C_sub] + ring + +/-- **The powers `(X - a)^(r-1)`, `1 ≤ a < r`, are combinations of `β_1, …, β_{r-1}`**: by the +right-sided form, `β_{r-a}` is a nonzero multiple of `(X - a)^(r-1)` plus multiples of the powers +`(X - b)^(r-1)`, `1 ≤ b < a`, so induction on `a` applies. -/ +theorem X_sub_C_pow_mem_span_bsplineLocal {r : ℕ} (hr : 1 ≤ r) {a : ℕ} (ha1 : 1 ≤ a) + (ha : a < r) : + (X - C (a : ℂ)) ^ (r - 1) ∈ Submodule.span ℂ (bsplineLocal r '' Set.Ico 1 r) := by + induction a using Nat.strong_induction_on with + | _ a ih => + have hc : bsplineCoeff r r ≠ 0 := by simp [bsplineCoeff, Nat.factorial_ne_zero] + have hβ := bsplineLocal_eq_neg_sum hr (show r - a ≤ r by omega) + rw [sum_Ico_succ_top (show r - a + 1 ≤ r by omega), show r - (r - a) = a by omega] at hβ + have hrepr : (X - C (a : ℂ)) ^ (r - 1) = (bsplineCoeff r r)⁻¹ • (-bsplineLocal r (r - a) - + ∑ l ∈ Ico (r - a + 1) r, + C (bsplineCoeff r l) * (X - C ((l - (r - a) : ℕ) : ℂ)) ^ (r - 1)) := by + rw [hβ, smul_eq_C_mul, neg_neg, add_sub_cancel_left, ← mul_assoc, ← C_mul, + inv_mul_cancel₀ hc, C_1, one_mul] + rw [hrepr] + refine Submodule.smul_mem _ _ (Submodule.sub_mem _ (Submodule.neg_mem _ + (Submodule.subset_span ⟨r - a, ⟨by omega, by omega⟩, rfl⟩)) + (Submodule.sum_mem _ fun l hl => ?_)) + have hl := mem_Ico.1 hl + rw [← smul_eq_C_mul] + exact Submodule.smul_mem _ _ (ih (l - (r - a)) (by omega) (by omega) (by omega)) + +/-- The coordinates of the B-splines on `[0, 1)` in their own basis: `β_j` has coordinate `1` at +`j` and `0` elsewhere. -/ +theorem bcoord_bsplineLocal {r : ℕ} (hr : 1 ≤ r) {j l : ℕ} (hj : j < r) (hl : l < r) : + bcoord hr (bsplineLocal r j) l = if l = j then 1 else 0 := by + refine bcoord_eq_of_sum hr (fun m => if m = j then 1 else 0) ?_ hl + rw [sum_eq_single j (fun m _ hm => by simp [hm]) (fun h => absurd (mem_range.2 hj) h)] + simp + +/-- **Combinations of `β_1, …, β_{r-1}` have coordinate `0` at `β_0`.** -/ +theorem bcoord_zero_of_mem_span {r : ℕ} (hr : 1 ≤ r) {P : ℂ[X]} + (hP : P ∈ Submodule.span ℂ (bsplineLocal r '' Set.Ico 1 r)) : bcoord hr P 0 = 0 := by + have key : P ∈ degreeLT ℂ r ∧ bcoord hr P 0 = 0 := by + induction hP using Submodule.span_induction with + | mem Q hQ => + obtain ⟨j, hj, rfl⟩ := hQ + have hj0 : (0 : ℕ) ≠ j := by have := hj.1; omega + refine ⟨bsplineLocal_mem hr j, ?_⟩ + rw [bcoord_bsplineLocal hr hj.2 (by omega)] + simp only [hj0, ↓reduceIte] + | zero => + exact ⟨Submodule.zero_mem _, + bcoord_eq_of_sum hr (P := 0) (fun _ => (0 : ℂ)) (by simp) (by omega : 0 < r)⟩ + | add Q R _ _ hQ hR => + exact ⟨Submodule.add_mem _ hQ.1 hR.1, by rw [bcoord_add hr hQ.1 hR.1, hQ.2, hR.2, add_zero]⟩ + | smul c Q _ hQ => + exact ⟨Submodule.smul_mem _ c hQ.1, by + rw [smul_eq_C_mul, bcoord_C_mul hr c hQ.1, hQ.2, mul_zero]⟩ + exact key.2 + +/-- **Vanishing coefficients of shifted powers**: `c_n((X - m)^(r-1)) = 0` for `n < m < n + r`. +On `[n, n + 1)` the coefficient `c_n` is the coordinate at `β_0`, and `(X - m)^(r-1)` becomes +`(X - a)^(r-1)` with `a = m - n`, a combination of `β_1, …, β_{r-1}` +(`Interval.X_sub_C_pow_mem_span_bsplineLocal`). In the spline expansion of `(x - m)_+^(r-1)` this +is why the B-splines that start left of the knot `m` but contain it get the coefficient `0`. -/ +theorem bsplineCoef_X_sub_C_pow {r : ℕ} (hr : 1 ≤ r) {m n : ℤ} (hnm : n < m) (hmn : m < n + r) : + bsplineCoef hr ((X - C (m : ℂ)) ^ (r - 1)) n = 0 := by + obtain ⟨a, ha⟩ : ∃ a : ℕ, m - n = a := ⟨(m - n).toNat, (Int.toNat_of_nonneg (by omega)).symm⟩ + have hcomp : ((X - C (m : ℂ)) ^ (r - 1)).comp (X + C (n : ℂ)) = (X - C (a : ℂ)) ^ (r - 1) := by + have hm : ((m : ℤ) : ℂ) = (n : ℂ) + (a : ℂ) := by + have h := congrArg (fun z : ℤ => (z : ℂ)) ha + push_cast at h + linear_combination h + rw [pow_comp, sub_comp, X_comp, C_comp, hm, C_add] + ring + rw [bsplineCoef, hcomp] + exact bcoord_zero_of_mem_span hr (X_sub_C_pow_mem_span_bsplineLocal hr (by omega) (by omega)) + +end Interval diff --git a/LeanPool/FunctionSpaces/Domains/Interval/Differences.lean b/LeanPool/FunctionSpaces/Domains/Interval/Differences.lean new file mode 100644 index 0000000000..ac5180835f --- /dev/null +++ b/LeanPool/FunctionSpaces/Domains/Interval/Differences.lean @@ -0,0 +1,173 @@ +/- +Copyright (c) 2026 Mario Ullrich. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Mario Ullrich +-/ +module + +public import LeanPool.FunctionSpaces.Analysis.Differences.Differences +public import Mathlib.RingTheory.Polynomial.Basic +public import Mathlib.Analysis.Complex.Basic + +/- +Modified for Lean Pool: module names and imports adapted. +-/ + +/-! +# Differences of higher order + +The **difference of order `r` with step `h`** of `f : ℝ → ℂ` is + +`Δ_h^r f(x) = ∑_{k=0}^r (-1)^(r-k) C(r,k) f(x + k h)` (`Interval.higherDiff_apply`), + +the `r`-fold iterate `Rd.higherDiff r h f` of Mathlib's forward difference `fwdDiff h` +(`Δ_h f(x) = f(x + h) - f(x)`). +It is linear in `f` and commutes with translations (Mathlib's `fwdDiff_iter_add`, +`fwdDiff_iter_const_smul`, `fwdDiff_iter_comp_add`), and it is invariant up to sign and shift +under the reflection `x ↦ c - x`. Its coefficients have modulus `C(r, k)`, so +`|Δ_h^r f(x)| ≤ 2^r max_k |f(x + k h)|` (`Interval.enorm_higherDiff_le_of_forall`). Differences +of order `r` annihilate the **polynomials of degree `< r`** (`Interval.higherDiff_polynomial`), +which is why they measure smoothness of order `r`; this comes from Mathlib's +`Polynomial.fwdDiff_iter_eq_zero_of_degree_lt` (step `1`) after the change of variable `x + k h`, +which keeps the degree `< r` (`Interval.comp_affine_mem_degreeLT`). Polynomials are elements of +Mathlib's `Polynomial.degreeLT ℂ r`, evaluated at real points. +-/ + +@[expose] public section + +open Finset Polynomial +open Rd (higherDiff higherDiff_def) +open scoped ENNReal + +namespace Interval + +/-- `Δ_h^r f(x) = ∑_{k=0}^r (-1)^(r-k) C(r,k) f(x + k h)`. -/ +theorem higherDiff_apply (r : ℕ) (h : ℝ) (f : ℝ → ℂ) (x : ℝ) : + higherDiff r h f x = + ∑ k ∈ range (r + 1), ((-1 : ℂ) ^ (r - k) * (r.choose k : ℂ)) * f (x + k * h) := by + rw [higherDiff_def, Rd.higherDiff_apply] + simp only [smul_eq_mul] + +/-- `Δ_h^r f = ∑_{k=0}^r (-1)^(r-k) C(r,k) f(· + k h)`, as an identity of functions: a sum of +multiples of translates of `f`. -/ +theorem higherDiff_eq_sum_smul (r : ℕ) (h : ℝ) (f : ℝ → ℂ) : + higherDiff r h f = + ∑ k ∈ range (r + 1), ((-1 : ℂ) ^ (r - k) * (r.choose k : ℂ)) • fun x => f (x + k * h) := by + funext x + rw [higherDiff_apply, Finset.sum_apply] + rfl + +/-- `Δ_h^0 f = f`. -/ +@[simp] theorem higherDiff_zero (h : ℝ) (f : ℝ → ℂ) : higherDiff 0 h f = f := rfl + +/-- `Δ_h^(r+1) f(x) = Δ_h^r f(x + h) - Δ_h^r f(x)`. -/ +theorem higherDiff_succ (r : ℕ) (h : ℝ) (f : ℝ → ℂ) (x : ℝ) : + higherDiff (r + 1) h f x = higherDiff r h f (x + h) - higherDiff r h f x := by + rw [higherDiff, Function.iterate_succ_apply'] + rfl + +/-- `Δ_h^(r+1) f = Δ_h^r (Δ_h f)`. -/ +theorem higherDiff_succ' (r : ℕ) (h : ℝ) (f : ℝ → ℂ) : + higherDiff (r + 1) h f = higherDiff r h (fwdDiff h f) := by + rw [higherDiff, Function.iterate_succ_apply] + rfl + +/-- Differences are additive (Mathlib's `fwdDiff_iter_add`). -/ +theorem higherDiff_add (r : ℕ) (h : ℝ) (f g : ℝ → ℂ) : + higherDiff r h (f + g) = higherDiff r h f + higherDiff r h g := + fwdDiff_iter_add h f g r + +/-- Differences commute with subtraction. -/ +theorem higherDiff_sub (r : ℕ) (h : ℝ) (f g : ℝ → ℂ) : + higherDiff r h (f - g) = higherDiff r h f - higherDiff r h g := by + funext x + simp only [higherDiff_apply, Pi.sub_apply, mul_sub, sum_sub_distrib] + +/-- Differences are homogeneous (Mathlib's `fwdDiff_iter_const_smul`). -/ +theorem higherDiff_const_mul (r : ℕ) (h : ℝ) (c : ℂ) (f : ℝ → ℂ) : + higherDiff r h (fun x => c * f x) = fun x => c * higherDiff r h f x := + fwdDiff_iter_const_smul h c f r + +/-- Differences commute with translations: `Δ_h^r (f(· + c))(x) = Δ_h^r f(x + c)` (Mathlib's +`fwdDiff_iter_comp_add`). -/ +theorem higherDiff_comp_add (r : ℕ) (h : ℝ) (f : ℝ → ℂ) (c x : ℝ) : + higherDiff r h (fun y => f (y + c)) x = higherDiff r h f (x + c) := + fwdDiff_iter_comp_add h f c r x + +/-- **Reflection**: for `g(x) = f(c - x)`, `Δ_h^r g(x) = (-1)^r Δ_h^r f(c - x - r h)`. -/ +theorem higherDiff_reflect (r : ℕ) (h : ℝ) (f : ℝ → ℂ) (c x : ℝ) : + higherDiff r h (fun y => f (c - y)) x = (-1 : ℂ) ^ r * higherDiff r h f (c - x - r * h) := by + simp only [higherDiff_apply, mul_sum] + rw [← sum_range_reflect] + refine sum_congr rfl fun k hk => ?_ + have hk' : k ≤ r := Nat.lt_succ_iff.1 (mem_range.1 hk) + rw [show r + 1 - 1 - k = r - k by omega, Nat.choose_symm hk', show r - (r - k) = k by omega] + have hx : c - (x + ((r - k : ℕ) : ℝ) * h) = c - x - r * h + k * h := by + rw [Nat.cast_sub hk']; ring + rw [hx, ← Rd.neg_one_pow_mul_neg_one_pow_sub hk'] + ring + +/-- **The coefficients of a difference**: `‖(-1)^(r-k) C(r, k)‖ = C(r, k)`. -/ +theorem enorm_higherDiff_coeff (r k : ℕ) : + ‖(-1 : ℂ) ^ (r - k) * (r.choose k : ℂ)‖ₑ = (r.choose k : ℝ≥0∞) := by + rw [eNorm_mul, eNorm_pow, eNorm_neg, eNorm_one, one_pow, one_mul, ← ofReal_norm, + Complex.norm_natCast, ENNReal.ofReal_natCast] + +/-- **Pointwise bound for differences**: if `|f(x + k h)| ≤ B` for `k ≤ r`, then +`|Δ_h^r f(x)| ≤ 2^r B`, since the coefficients `C(r, k)` add up to `2^r`. -/ +theorem enorm_higherDiff_le_of_forall {r : ℕ} {h x : ℝ} {f : ℝ → ℂ} {B : ℝ≥0∞} + (hB : ∀ k ∈ range (r + 1), ‖f (x + k * h)‖ₑ ≤ B) : ‖higherDiff r h f x‖ₑ ≤ 2 ^ r * B := by + rw [higherDiff_apply] + refine (eNorm_sum_le _ _).trans ?_ + calc ∑ k ∈ range (r + 1), ‖(-1 : ℂ) ^ (r - k) * (r.choose k : ℂ) * f (x + k * h)‖ₑ + ≤ ∑ k ∈ range (r + 1), (r.choose k : ℝ≥0∞) * B := + sum_le_sum fun k hk => by + rw [eNorm_mul, enorm_higherDiff_coeff] + exact mul_le_mul_right (hB k hk) _ + _ = 2 ^ r * B := by + rw [← sum_mul, ← Nat.cast_sum, Nat.sum_range_choose] + push_cast + rfl + +/-- **Affine changes of variable do not raise the degree**: +`deg P(u + v X) ≤ deg P`, since `deg (P ∘ Q) ≤ deg P · deg Q` (Mathlib's `natDegree_comp_le`). -/ +theorem natDegree_comp_affine_le (P : ℂ[X]) (u v : ℂ) : + (P.comp (C u + C v * X)).natDegree ≤ P.natDegree := by + have h1 : (C u + C v * X).natDegree ≤ 1 := + (natDegree_add_le _ _).trans (max_le (by simp) ((natDegree_C_mul_le _ _).trans (by simp))) + calc (P.comp (C u + C v * X)).natDegree ≤ P.natDegree * (C u + C v * X).natDegree := + natDegree_comp_le + _ ≤ P.natDegree * 1 := Nat.mul_le_mul_left _ h1 + _ = P.natDegree := mul_one _ + +/-- **Affine changes of variable** keep the degree `< r`. -/ +theorem comp_affine_mem_degreeLT {r : ℕ} {P : ℂ[X]} (hP : P ∈ degreeLT ℂ r) (u v : ℂ) : + P.comp (C u + C v * X) ∈ degreeLT ℂ r := by + rcases eq_or_ne P 0 with rfl | hP0 + · simp + rw [mem_degreeLT] at hP ⊢ + refine degree_le_natDegree.trans_lt ?_ + exact_mod_cast (natDegree_comp_affine_le P u v).trans_lt ((natDegree_lt_iff_degree_lt hP0).2 hP) + +/-- **Differences of order `r` annihilate polynomials of degree `< r`**: +`Δ_h^r P = 0` for `P ∈ degreeLT ℂ r`. -/ +theorem higherDiff_polynomial {r : ℕ} {P : ℂ[X]} (hP : P ∈ degreeLT ℂ r) (h : ℝ) : + higherDiff r h (fun x => P.eval (x : ℂ)) = 0 := by + funext x + rcases eq_or_ne P 0 with rfl | hP0 + · simp [higherDiff_apply] + set Q : ℂ[X] := P.comp (C (x : ℂ) + C (h : ℂ) * X) + have hdeg : Q.natDegree < r := (natDegree_comp_affine_le P _ _).trans_lt + ((natDegree_lt_iff_degree_lt hP0).2 (mem_degreeLT.1 hP)) + have hzero := congrFun (Polynomial.fwdDiff_iter_eq_zero_of_degree_lt hdeg) 0 + rw [fwdDiff_iter_eq_sum_shift] at hzero + rw [higherDiff_apply, Pi.zero_apply] + rw [Pi.zero_apply] at hzero + rw [← hzero] + refine sum_congr rfl fun k _ => ?_ + rw [zsmul_eq_mul, nsmul_eq_mul, mul_one, zero_add, eval_comp] + simp only [eval_add, eval_C, eval_mul, eval_X] + push_cast + ring_nf + +end Interval diff --git a/LeanPool/FunctionSpaces/Domains/Interval/LocalProjection.lean b/LeanPool/FunctionSpaces/Domains/Interval/LocalProjection.lean new file mode 100644 index 0000000000..6bfc1bd138 --- /dev/null +++ b/LeanPool/FunctionSpaces/Domains/Interval/LocalProjection.lean @@ -0,0 +1,562 @@ +/- +Copyright (c) 2026 Mario Ullrich. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Mario Ullrich +-/ +module + +public import LeanPool.FunctionSpaces.Domains.Interval.PiecewisePoly +public import LeanPool.FunctionSpaces.Domains.Interval.Smoothing +public import Mathlib.LinearAlgebra.BilinearForm.Properties +public import Mathlib.MeasureTheory.Integral.Bochner.ContinuousLinearMap +public import LeanPool.FunctionSpaces.ApproximationSpaces.Decompositions.Projection + +/- +Modified for Lean Pool: module names and imports adapted. +-/ + +/-! +# Local projections onto polynomials + +The **local projection** of a function `g` on an interval onto the polynomials of degree `< r` +is computed from the moments of `g`. On `[0, 1]` the pairing `⟨P, Q⟩ = ∫_0^1 P Q` of +polynomials of degree `< r` is nondegenerate (`Interval.polyPairing_nondegenerate`): pairing `P` +with its conjugate `P̄` gives `∫_0^1 |P|²`. So the monomial basis `b_i` has a dual basis `d_i`, +`⟨d_i, b_k⟩ = δ_{ik}` (Mathlib's `LinearMap.BilinForm.dualBasis`), and every `P` of degree `< r` +is `P = ∑_i ⟨P, b_i⟩ d_i` (`Interval.sum_polyPairing_smul_dualPoly`). For any function `g`, +`Π g = ∑_i (∫_0^1 g b_i) d_i` is therefore a projection onto the polynomials, the +`L_2[0, 1]`-orthogonal projection. + +On a dyadic interval `I_{j,m}` the local projection is `Π g(x) = ∑_i c_i d_i(2^j x - m)` with +`c_i = 2^j ∫_{I_{j,m}} g(y) b_i(2^j y - m) dy` (`Interval.locProj`). It reproduces polynomials +(`Interval.polyFun_locProj_of_eqOn`, by the change of variables `y = (m + t) 2^(-j)`) and is +bounded in `L_p(I_{j,m})` by `r M²`, with `M` a bound of the `b_i` and `d_i` on `[0, 1]` +(`Interval.eLpNorm_locProj_le`): Hölder's inequality gives `|c_i| ≤ M 2^(j/p) ‖g‖_{L_p(I_{j,m})}`, +and the interval has length `2^(-j)`. Applied on all intervals of level `j` it is the +projection `P_j` of `L_p[0, 1]`, `1 ≤ p < ∞`, onto the piecewise polynomials of level `j` +(`Interval.ppProj`), with `‖P_j‖ ≤ r M²` for every `j`. So the dyadic piecewise polynomials form +a projection scheme (`Interval.ppProjectionScheme`). +-/ + +@[expose] public section + +open MeasureTheory Set Polynomial +open scoped ENNReal + +namespace Interval + +/-- The product of two polynomials is integrable on `[0, 1]`. -/ +theorem integrableOn_polyFun_mul (P Q : ℂ[X]) : + IntegrableOn (fun x => polyFun P x * polyFun Q x) (Icc (0 : ℝ) 1) := + ((continuous_polyFun P).mul (continuous_polyFun Q)).integrableOn_Icc + +/-- The **pairing** `⟨P, Q⟩ = ∫_0^1 P Q` of polynomials of degree `< r`, a bilinear form. -/ +noncomputable def polyPairing (r : ℕ) : LinearMap.BilinForm ℂ (degreeLT ℂ r) := + LinearMap.mk₂ ℂ (fun P Q => ∫ x in Icc (0 : ℝ) 1, polyFun P x * polyFun Q x) + (fun P₁ P₂ Q => by + simp only [Submodule.coe_add, polyFun_add, add_mul] + exact integral_add (integrableOn_polyFun_mul _ _) (integrableOn_polyFun_mul _ _)) + (fun c P Q => by + simp only [Submodule.coe_smul, polyFun_smul, mul_assoc, smul_eq_mul] + exact integral_const_mul c _) + (fun P Q₁ Q₂ => by + simp only [Submodule.coe_add, polyFun_add, mul_add] + exact integral_add (integrableOn_polyFun_mul _ _) (integrableOn_polyFun_mul _ _)) + (fun c P Q => by + simp only [Submodule.coe_smul, polyFun_smul, mul_left_comm _ c, smul_eq_mul] + exact integral_const_mul c _) + +/-- `⟨P, Q⟩ = ∫_0^1 P Q`. -/ +theorem polyPairing_apply (r : ℕ) (P Q : degreeLT ℂ r) : + polyPairing r P Q = ∫ x in Icc (0 : ℝ) 1, polyFun P x * polyFun Q x := rfl + +/-- The pairing is symmetric. -/ +theorem polyPairing_comm (r : ℕ) (P Q : degreeLT ℂ r) : polyPairing r P Q = polyPairing r Q P := by + simp only [polyPairing_apply, mul_comm] + +/-- **The pairing separates points**: if `∫_0^1 P Q = 0` for all `Q`, then `P = 0`; take +`Q = P̄`, so that `∫_0^1 |P|² = 0`. -/ +theorem polyPairing_separatingLeft (r : ℕ) : (polyPairing r).SeparatingLeft := by + intro P hP + have hmem : (P : ℂ[X]).map (starRingEnd ℂ) ∈ degreeLT ℂ r := + mem_degreeLT.2 (degree_map_le.trans_lt (mem_degreeLT.1 P.2)) + have h := hP ⟨_, hmem⟩ + rw [polyPairing_apply] at h + simp only [polyFun_map_conj, Complex.mul_conj] at h + rw [integral_complex_ofReal, Complex.ofReal_eq_zero] at h + have hint : IntegrableOn (fun x => Complex.normSq (polyFun P x)) (Icc (0 : ℝ) 1) := + (Complex.continuous_normSq.comp (continuous_polyFun P)).integrableOn_Icc + have hae := (integral_eq_zero_iff_of_nonneg (fun x => Complex.normSq_nonneg _) hint).1 h + have hP0 : polyFun P =ᵐ[volume.restrict (Icc 0 1)] 0 := + hae.mono fun x hx => Complex.normSq_eq_zero.1 hx + exact Subtype.ext (eq_zero_of_ae_eq_zero zero_lt_one hP0) + +/-- The pairing is nondegenerate. -/ +theorem polyPairing_nondegenerate (r : ℕ) : (polyPairing r).Nondegenerate := + ⟨polyPairing_separatingLeft r, fun P hP => + polyPairing_separatingLeft r P fun Q => by rw [polyPairing_comm]; exact hP Q⟩ + +/-- The **monomial basis** `b_i = X^i` of the polynomials of degree `< r`. -/ +noncomputable def monoBasis (r : ℕ) : Module.Basis (Fin r) ℂ (degreeLT ℂ r) := + Module.Basis.ofEquivFun (degreeLTEquiv ℂ r) + +/-- The **dual basis** `d_i` of the monomials for the pairing `∫_0^1 P Q`. -/ +noncomputable def dualPoly (r : ℕ) : Module.Basis (Fin r) ℂ (degreeLT ℂ r) := + (polyPairing r).dualBasis (polyPairing_nondegenerate r) (monoBasis r) + +/-- **Expansion in the dual basis**: `P = ∑_i ⟨P, b_i⟩ d_i` for every `P` of degree `< r`. -/ +theorem sum_polyPairing_smul_dualPoly (r : ℕ) (P : degreeLT ℂ r) : + ∑ i, polyPairing r P (monoBasis r i) • dualPoly r i = P := by + conv_rhs => rw [← (dualPoly r).sum_repr P] + simp only [dualPoly, LinearMap.BilinForm.dualBasis_repr_apply] + +/-- The expansion at a point: `P(x) = ∑_i (∫_0^1 P b_i) d_i(x)`. -/ +theorem polyFun_eq_sum_dualPoly (r : ℕ) (P : degreeLT ℂ r) (x : ℝ) : + polyFun P x = ∑ i, (∫ t in Icc (0 : ℝ) 1, polyFun P t * polyFun (monoBasis r i) t) * + polyFun (dualPoly r i) x := by + conv_lhs => rw [← sum_polyPairing_smul_dualPoly r P] + simp only [Submodule.coe_sum, Submodule.coe_smul, polyFun, eval_finsetSum, eval_smul, + smul_eq_mul, polyPairing_apply] + +/-! ### Local projections on dyadic intervals -/ + +/-- A finite family of polynomials is bounded on `[0, 1]`. -/ +theorem exists_enorm_polyFun_le_of_fintype {ι : Type*} [Finite ι] (P : ι → ℂ[X]) : + ∃ M : ℝ≥0∞, M ≠ ∞ ∧ ∀ i, ∀ t ∈ Icc (0 : ℝ) 1, ‖polyFun (P i) t‖ₑ ≤ M := by + let := Fintype.ofFinite ι + choose C hC using fun i => (isCompact_Icc (a := (0 : ℝ)) (b := 1)).exists_bound_of_continuousOn + (continuous_polyFun (P i)).continuousOn + refine ⟨∑ i, ENNReal.ofReal (C i), ENNReal.sum_ne_top.2 fun _ _ => ENNReal.ofReal_ne_top, + fun i t ht => ?_⟩ + rw [← ofReal_norm] + exact (ENNReal.ofReal_le_ofReal (hC i t ht)).trans (Finset.single_le_sum + (f := fun i => ENNReal.ofReal (C i)) (fun _ _ => zero_le) (Finset.mem_univ i)) + +/-- The coefficients of the local projection of `g` on `I_{j,m}`, +`c_i = 2^j ∫_{I_{j,m}} g(y) b_i(2^j y - m) dy`. -/ +noncomputable def locCoeff (r j : ℕ) (g : ℝ → ℂ) (m : ℕ) (i : Fin r) : ℂ := + (((2 : ℝ) ^ j : ℝ) : ℂ) * + ∫ y in dyadicIco j m, g y * polyFun (monoBasis r i) (-(m : ℝ) + 2 ^ j * y) + +/-- The **local projection** of `g` on `I_{j,m}`, the polynomial `∑_i c_i d_i(2^j x - m)`. -/ +noncomputable def locProj (r j : ℕ) (g : ℝ → ℂ) (m : ℕ) : ℂ[X] := + ∑ i, locCoeff r j g m i • + (dualPoly r i : ℂ[X]).comp (C ((-(m : ℝ) : ℝ) : ℂ) + C (((2 : ℝ) ^ j : ℝ) : ℂ) * X) + +/-- The local projection has degree `< r`. -/ +theorem locProj_mem (r j : ℕ) (g : ℝ → ℂ) (m : ℕ) : locProj r j g m ∈ degreeLT ℂ r := + Submodule.sum_mem _ fun i _ => + Submodule.smul_mem _ _ (comp_affine_mem_degreeLT (dualPoly r i).2 _ _) + +/-- The values of the local projection, `Π g(x) = ∑_i c_i d_i(2^j x - m)`. -/ +theorem polyFun_locProj (r j : ℕ) (g : ℝ → ℂ) (m : ℕ) (x : ℝ) : + polyFun (locProj r j g m) x = + ∑ i, locCoeff r j g m i * polyFun (dualPoly r i) (-(m : ℝ) + 2 ^ j * x) := by + rw [locProj, polyFun, eval_finsetSum] + refine Finset.sum_congr rfl fun i _ => ?_ + rw [eval_smul, smul_eq_mul, ← polyFun, polyFun_comp_affine] + +/-- **Polynomials are reproduced**: if `g = Q` on `I_{j,m}` with `Q` of degree `< r`, then the +local projection of `g` on `I_{j,m}` is `Q`. -/ +theorem polyFun_locProj_of_eqOn {r j m : ℕ} {g : ℝ → ℂ} {Q : ℂ[X]} (hQ : Q ∈ degreeLT ℂ r) + (hg : ∀ y ∈ dyadicIco j m, g y = polyFun Q y) (x : ℝ) : + polyFun (locProj r j g m) x = polyFun Q x := by + have hQt : Q.comp (C (((m : ℝ) / 2 ^ j : ℝ) : ℂ) + C ((1 / 2 ^ j : ℝ) : ℂ) * X) ∈ + degreeLT ℂ r := comp_affine_mem_degreeLT hQ _ _ + have hcoeff : ∀ i, locCoeff r j g m i = ∫ t in Icc (0 : ℝ) 1, + polyFun (Q.comp (C (((m : ℝ) / 2 ^ j : ℝ) : ℂ) + C ((1 / 2 ^ j : ℝ) : ℂ) * X)) t * + polyFun (monoBasis r i) t := fun i => by + have hcongr : ∫ y in dyadicIco j m, g y * polyFun (monoBasis r i) (-(m : ℝ) + 2 ^ j * y) = + ∫ y in dyadicIco j m, polyFun Q y * polyFun (monoBasis r i) (-(m : ℝ) + 2 ^ j * y) := + setIntegral_congr_fun (measurableSet_dyadicIco j m) fun y hy => by simp only [hg y hy] + rw [locCoeff, hcongr, integral_dyadicIco_eq] + refine setIntegral_congr_fun measurableSet_Icc fun t _ => ?_ + have h2 : (2 : ℝ) ^ j ≠ 0 := by positivity + simp only [polyFun_comp_affine] + rw [show -(m : ℝ) + 2 ^ j * (t / 2 ^ j + m / 2 ^ j) = t by field_simp; ring, + show (m : ℝ) / 2 ^ j + 1 / 2 ^ j * t = t / 2 ^ j + m / 2 ^ j by ring] + have hexp := polyFun_eq_sum_dualPoly r ⟨_, hQt⟩ (-(m : ℝ) + 2 ^ j * x) + simp only at hexp + rw [polyFun_locProj] + simp only [hcoeff] + rw [← hexp, polyFun_comp_affine] + congr 1 + field_simp + ring + +/-- `2^j (2^(-j))^(1-θ) = 2^(jθ)`. -/ +theorem ofReal_two_pow_mul_inv_rpow (j : ℕ) (θ : ℝ) : + ENNReal.ofReal (2 ^ j) * ENNReal.ofReal (1 / 2 ^ j) ^ (1 - θ) = + ENNReal.ofReal (2 ^ j) ^ θ := by + have hx0 : ENNReal.ofReal (2 ^ j) ≠ 0 := (ENNReal.ofReal_pos.2 (by positivity)).ne' + have hxt : ENNReal.ofReal (2 ^ j) ≠ ∞ := ENNReal.ofReal_ne_top + rw [one_div, ENNReal.ofReal_inv_of_pos (by positivity), ENNReal.inv_rpow, ← ENNReal.rpow_neg] + calc ENNReal.ofReal (2 ^ j) * ENNReal.ofReal (2 ^ j) ^ (-(1 - θ)) + = ENNReal.ofReal (2 ^ j) ^ (1 : ℝ) * ENNReal.ofReal (2 ^ j) ^ (-(1 - θ)) := by + rw [ENNReal.rpow_one] + _ = ENNReal.ofReal (2 ^ j) ^ (1 + -(1 - θ)) := (ENNReal.rpow_add _ _ hx0 hxt).symm + _ = ENNReal.ofReal (2 ^ j) ^ θ := by congr 1; ring + +/-- **Bound for the local coefficients**: `|c_i| ≤ M 2^(j/p) ‖g‖_{L_p(I_{j,m})}` when the +monomials are bounded by `M` on `[0, 1]`. -/ +theorem enorm_locCoeff_le {r : ℕ} {M : ℝ≥0∞} + (hM : ∀ i, ∀ t ∈ Icc (0 : ℝ) 1, ‖polyFun (monoBasis r i) t‖ₑ ≤ M) {p : ℝ≥0∞} (hp : 1 ≤ p) + (j m : ℕ) {g : ℝ → ℂ} (hg : AEStronglyMeasurable g (volume.restrict (dyadicIco j m))) + (i : Fin r) : + ‖locCoeff r j g m i‖ₑ ≤ + M * ENNReal.ofReal (2 ^ j) ^ (1 / p.toReal) * eLpNorm g p (volume.restrict (dyadicIco j + m)) := by + have h1 : ‖∫ y in dyadicIco j m, g y * polyFun (monoBasis r i) (-(m : ℝ) + 2 ^ j * y)‖ₑ ≤ + (∫⁻ y in dyadicIco j m, ‖g y‖ₑ) * M := by + refine (eNorm_integral_le_lintegral_eNorm _).trans ?_ + rw [← lintegral_mul_const'' M hg.eNorm] + refine setLIntegral_mono' (measurableSet_dyadicIco j m) fun y hy => ?_ + rw [eNorm_mul] + gcongr + refine hM i _ ⟨?_, ?_⟩ <;> rw [mem_dyadicIco] at hy <;> linarith [hy.1, hy.2] + have h2 : ∫⁻ y in dyadicIco j m, ‖g y‖ₑ ≤ + eLpNorm g p (volume.restrict (dyadicIco j m)) * ENNReal.ofReal (1 / 2 ^ j) ^ (1 - 1 / + p.toReal) := by + rw [← eLpNorm_one_eq_lintegral_eNorm hg] + have := eLpNorm_le_eLpNorm_mul_rpow_measure_univ hp hg + rwa [Measure.restrict_apply_univ, volume_dyadicIco, ENNReal.toReal_one, div_one] at this + rw [locCoeff, eNorm_mul, ← ofReal_norm, Complex.norm_real, Real.norm_eq_abs, + abs_of_pos (by positivity)] + calc ENNReal.ofReal (2 ^ j) * ‖∫ y in dyadicIco j m, + g y * polyFun (monoBasis r i) (-(m : ℝ) + 2 ^ j * y)‖ₑ + ≤ ENNReal.ofReal (2 ^ j) * ((eLpNorm g p (volume.restrict (dyadicIco j m)) * + ENNReal.ofReal (1 / 2 ^ j) ^ (1 - 1 / p.toReal)) * M) := by + gcongr + exact h1.trans (mul_le_mul' h2 le_rfl) + _ = M * (ENNReal.ofReal (2 ^ j) * ENNReal.ofReal (1 / 2 ^ j) ^ (1 - 1 / p.toReal)) * + eLpNorm g p (volume.restrict (dyadicIco j m)) := by ring + _ = _ := by rw [ofReal_two_pow_mul_inv_rpow] + +/-- **Pointwise bound for the local projection**: on `I_{j,m}`, +`|Π g(x)| ≤ r M² 2^(j/p) ‖g‖_{L_p(I_{j,m})}` when the monomials and the dual basis are bounded by +`M` on `[0, 1]`. -/ +theorem enorm_polyFun_locProj_le {r : ℕ} {M : ℝ≥0∞} + (hMb : ∀ i, ∀ t ∈ Icc (0 : ℝ) 1, ‖polyFun (monoBasis r i) t‖ₑ ≤ M) + (hMd : ∀ i, ∀ t ∈ Icc (0 : ℝ) 1, ‖polyFun (dualPoly r i) t‖ₑ ≤ M) {p : ℝ≥0∞} (hp : 1 ≤ p) + (j m : ℕ) {g : ℝ → ℂ} (hg : AEStronglyMeasurable g (volume.restrict (dyadicIco j m))) + {x : ℝ} (hx : x ∈ dyadicIco j m) : + ‖polyFun (locProj r j g m) x‖ₑ ≤ + r * M * M * ENNReal.ofReal (2 ^ j) ^ (1 / p.toReal) * + eLpNorm g p (volume.restrict (dyadicIco j m)) := by + have hxt : -(m : ℝ) + 2 ^ j * x ∈ Icc (0 : ℝ) 1 := by + rw [mem_dyadicIco] at hx + constructor <;> linarith [hx.1, hx.2] + rw [polyFun_locProj] + refine (eNorm_sum_le _ _).trans ?_ + calc ∑ i, ‖locCoeff r j g m i * polyFun (dualPoly r i) (-(m : ℝ) + 2 ^ j * x)‖ₑ + ≤ ∑ _i : Fin r, M * ENNReal.ofReal (2 ^ j) ^ (1 / p.toReal) * + eLpNorm g p (volume.restrict (dyadicIco j m)) * M := + Finset.sum_le_sum fun i _ => by + rw [eNorm_mul] + exact mul_le_mul' (enorm_locCoeff_le hMb hp j m hg i) (hMd i _ hxt) + _ = _ := by + rw [Finset.sum_const, Finset.card_univ, Fintype.card_fin, nsmul_eq_mul] + ring + +/-- **The local projection is bounded in `L_p(I_{j,m})`**: +`‖Π g‖_{L_p(I_{j,m})} ≤ r M² ‖g‖_{L_p(I_{j,m})}`, with a constant independent of `j` and `m`. -/ +theorem eLpNorm_locProj_le {r : ℕ} {M : ℝ≥0∞} + (hMb : ∀ i, ∀ t ∈ Icc (0 : ℝ) 1, ‖polyFun (monoBasis r i) t‖ₑ ≤ M) + (hMd : ∀ i, ∀ t ∈ Icc (0 : ℝ) 1, ‖polyFun (dualPoly r i) t‖ₑ ≤ M) {p : ℝ≥0∞} (hp : 1 ≤ p) + (j m : ℕ) {g : ℝ → ℂ} (hg : AEStronglyMeasurable g (volume.restrict (dyadicIco j m))) : + eLpNorm (polyFun (locProj r j g m)) p (volume.restrict (dyadicIco j m)) ≤ + r * M * M * eLpNorm g p (volume.restrict (dyadicIco j m)) := by + have hθ : 0 ≤ 1 / p.toReal := by positivity + refine (eLpNorm_le_of_ae_eNorm_bound (measurable_polyFun _).aestronglyMeasurable + ((ae_restrict_iff' (measurableSet_dyadicIco j m)).2 (Filter.Eventually.of_forall + fun x hx => enorm_polyFun_locProj_le hMb hMd hp j m hg hx))).trans_eq ?_ + rw [Measure.restrict_apply_univ, volume_dyadicIco, smul_eq_mul, ← one_div] + have h1 : ENNReal.ofReal (2 ^ j) ^ (1 / p.toReal) * ENNReal.ofReal (1 / 2 ^ j) ^ (1 / p.toReal) = + 1 := by + rw [← ENNReal.mul_rpow_of_nonneg _ _ hθ, ← ENNReal.ofReal_mul (by positivity), + mul_one_div_cancel (by positivity), ENNReal.ofReal_one, ENNReal.one_rpow] + calc r * M * M * ENNReal.ofReal (2 ^ j) ^ (1 / p.toReal) * + eLpNorm g p (volume.restrict (dyadicIco j m)) * ENNReal.ofReal (1 / 2 ^ j) ^ (1 / p.toReal) + = r * M * M * (ENNReal.ofReal (2 ^ j) ^ (1 / p.toReal) * + ENNReal.ofReal (1 / 2 ^ j) ^ (1 / p.toReal)) * + eLpNorm g p (volume.restrict (dyadicIco j m)) := by ring + _ = _ := by rw [h1, mul_one] + +/-! ### Linearity of the local projection -/ + +/-- The local integrands `g(y) b_i(2^j y - m)` are integrable on `I_{j,m}`. -/ +theorem integrableOn_mul_monoBasis {r j m : ℕ} {g : ℝ → ℂ} (hg : IntegrableOn g (dyadicIco j m)) + (i : Fin r) : + IntegrableOn (fun y => g y * polyFun (monoBasis r i) (-(m : ℝ) + 2 ^ j * y)) + (dyadicIco j m) := by + obtain ⟨M, hM, hMb⟩ := exists_enorm_polyFun_le_of_fintype (fun i => (monoBasis r i : ℂ[X])) + have hc : Continuous fun y : ℝ => polyFun (monoBasis r i) (-(m : ℝ) + 2 ^ j * y) := + (continuous_polyFun _).comp (by fun_prop) + refine hg.mul_bdd (c := M.toReal) hc.aestronglyMeasurable + ((ae_restrict_iff' (measurableSet_dyadicIco j m)).2 (Filter.Eventually.of_forall + fun y hy => ?_)) + have hyt : -(m : ℝ) + 2 ^ j * y ∈ Icc (0 : ℝ) 1 := by + rw [mem_dyadicIco] at hy + constructor <;> linarith [hy.1, hy.2] + have h := hMb i _ hyt + rw [← ofReal_norm] at h + exact (ENNReal.ofReal_le_iff_le_toReal hM).1 h + +/-- The local coefficients are additive. -/ +theorem locCoeff_add {r j m : ℕ} {g₁ g₂ : ℝ → ℂ} (h₁ : IntegrableOn g₁ (dyadicIco j m)) + (h₂ : IntegrableOn g₂ (dyadicIco j m)) (i : Fin r) : + locCoeff r j (g₁ + g₂) m i = locCoeff r j g₁ m i + locCoeff r j g₂ m i := by + simp only [locCoeff, Pi.add_apply, add_mul] + rw [integral_add (integrableOn_mul_monoBasis h₁ i) (integrableOn_mul_monoBasis h₂ i), mul_add] + +/-- The local coefficients are homogeneous. -/ +theorem locCoeff_const_mul (r j m : ℕ) (c : ℂ) (g : ℝ → ℂ) (i : Fin r) : + locCoeff r j (fun y => c * g y) m i = c * locCoeff r j g m i := by + simp only [locCoeff, mul_assoc] + rw [integral_const_mul] + ring + +/-- The local coefficients only see `g` almost everywhere on `I_{j,m}`. -/ +theorem locCoeff_congr {r j m : ℕ} {g₁ g₂ : ℝ → ℂ} + (h : g₁ =ᵐ[volume.restrict (dyadicIco j m)] g₂) (i : Fin r) : + locCoeff r j g₁ m i = locCoeff r j g₂ m i := by + rw [locCoeff, locCoeff] + congr 1 + refine integral_congr_ae (h.mono fun y hy => ?_) + simp only [hy] + +/-- The local projection is additive. -/ +theorem locProj_add {r j m : ℕ} {g₁ g₂ : ℝ → ℂ} (h₁ : IntegrableOn g₁ (dyadicIco j m)) + (h₂ : IntegrableOn g₂ (dyadicIco j m)) : + locProj r j (g₁ + g₂) m = locProj r j g₁ m + locProj r j g₂ m := by + simp only [locProj, locCoeff_add h₁ h₂, add_smul, Finset.sum_add_distrib] + +/-- The local projection is homogeneous. -/ +theorem locProj_const_mul (r j m : ℕ) (c : ℂ) (g : ℝ → ℂ) : + locProj r j (fun y => c * g y) m = C c * locProj r j g m := by + rw [locProj, locProj, Finset.mul_sum] + refine Finset.sum_congr rfl fun i _ => ?_ + rw [locCoeff_const_mul, mul_smul, smul_eq_C_mul c] + +/-- The local projection only sees `g` almost everywhere on `I_{j,m}`. -/ +theorem locProj_congr {r j m : ℕ} {g₁ g₂ : ℝ → ℂ} + (h : g₁ =ᵐ[volume.restrict (dyadicIco j m)] g₂) : locProj r j g₁ m = locProj r j g₂ m := by + simp only [locProj, locCoeff_congr h] + +/-! ### Orthogonality of the local projection -/ + +/-- **The moments of the local projection**: `Π g` and `g` have the same moments +`∫_{I_{j,m}} · b_l(2^j x - m)` against the monomials `b_l` in the coordinate of the interval, +since `⟨d_i, b_l⟩ = δ_{il}`. -/ +theorem integral_locProj_mul_monoBasis (r j m : ℕ) (g : ℝ → ℂ) (l : Fin r) : + ∫ x in dyadicIco j m, polyFun (locProj r j g m) x * + polyFun (monoBasis r l) (-(m : ℝ) + 2 ^ j * x) = + ∫ x in dyadicIco j m, g x * polyFun (monoBasis r l) (-(m : ℝ) + 2 ^ j * x) := by + have h2 : (((2 : ℝ) ^ j : ℝ) : ℂ) ≠ 0 := by rw [Complex.ofReal_ne_zero]; positivity + refine mul_left_cancel₀ h2 ?_ + rw [show (((2 : ℝ) ^ j : ℝ) : ℂ) * ∫ x in dyadicIco j m, g x * + polyFun (monoBasis r l) (-(m : ℝ) + 2 ^ j * x) = locCoeff r j g m l from rfl, + integral_dyadicIco_eq] + have ht : ∀ t : ℝ, -(m : ℝ) + 2 ^ j * (t / 2 ^ j + m / 2 ^ j) = t := fun t => by + field_simp + ring + simp only [polyFun_locProj, ht, Finset.sum_mul] + have hdual : ∀ i, ∫ t in Icc (0 : ℝ) 1, polyFun (dualPoly r i) t * polyFun (monoBasis r l) t = + if l = i then 1 else 0 := fun i => + LinearMap.BilinForm.apply_dualBasis_left (polyPairing_nondegenerate r) (monoBasis r) i l + rw [integral_finsetSum _ fun i _ => by + simpa only [mul_assoc] using (integrableOn_polyFun_mul (dualPoly r i : ℂ[X]) + (monoBasis r l : ℂ[X])).const_mul (locCoeff r j g m i)] + simp only [mul_assoc, integral_const_mul, hdual, mul_ite, mul_one, mul_zero, + Finset.sum_ite_eq, Finset.mem_univ, ↓reduceIte] + +/-- **The local projection is the `L_2(I_{j,m})`-orthogonal projection** onto the polynomials of +degree `< r`: `∫_{I_{j,m}} (g - Π g) Q = 0` for every polynomial `Q` of degree `< r`, since `Q` +is a combination of the monomials in the coordinate of the interval. -/ +theorem integral_sub_locProj_mul {r j m : ℕ} {g : ℝ → ℂ} (hg : IntegrableOn g (dyadicIco j m)) + {Q : ℂ[X]} (hQ : Q ∈ degreeLT ℂ r) : + ∫ x in dyadicIco j m, (g x - polyFun (locProj r j g m) x) * polyFun Q x = 0 := by + set R : ℂ[X] := Q.comp (C ((((m : ℝ) / 2 ^ j : ℝ)) : ℂ) + C (((1 / 2 ^ j : ℝ)) : ℂ) * X) + have hR : R ∈ degreeLT ℂ r := comp_affine_mem_degreeLT hQ _ _ + set a := (monoBasis r).repr ⟨R, hR⟩ + have hQx : ∀ x : ℝ, polyFun Q x = + ∑ l, a l * polyFun (monoBasis r l) (-(m : ℝ) + 2 ^ j * x) := fun x => by + have hval : polyFun R (-(m : ℝ) + 2 ^ j * x) = polyFun Q x := by + rw [polyFun_comp_affine] + congr 1 + field_simp + ring + rw [← hval] + conv_lhs => rw [show R = ((⟨R, hR⟩ : degreeLT ℂ r) : ℂ[X]) from rfl, + ← (monoBasis r).sum_repr ⟨R, hR⟩] + simp only [Submodule.coe_sum, Submodule.coe_smul, polyFun, eval_finsetSum, eval_smul, + smul_eq_mul, a] + have hPg : IntegrableOn (polyFun (locProj r j g m)) (dyadicIco j m) := + integrableOn_dyadicIco_of_continuous (continuous_polyFun _) j m + have hint : ∀ l, IntegrableOn (fun x => (g x - polyFun (locProj r j g m) x) * + polyFun (monoBasis r l) (-(m : ℝ) + 2 ^ j * x)) (dyadicIco j m) := fun l => by + simp only [sub_mul] + exact (integrableOn_mul_monoBasis hg l).sub (integrableOn_mul_monoBasis hPg l) + simp only [hQx, Finset.mul_sum] + rw [integral_finsetSum _ fun l _ => by + simpa only [mul_left_comm _ (a l)] using (hint l).const_mul (a l)] + refine Finset.sum_eq_zero fun l _ => ?_ + simp only [mul_left_comm _ (a l)] + rw [integral_const_mul, mul_eq_zero] + right + simp only [sub_mul] + rw [integral_sub (integrableOn_mul_monoBasis hg l) (integrableOn_mul_monoBasis hPg l), + integral_locProj_mul_monoBasis, sub_self] + +/-- **The local projections reproduce piecewise polynomials exactly**: +`P_j (ppFun j Q) = ppFun j Q` as functions, for pieces of degree `< r`. -/ +theorem ppFun_locProj_ppFun {r j : ℕ} {Q : ℕ → ℂ[X]} (hQ : ∀ n, Q n ∈ degreeLT ℂ r) : + ppFun j (locProj r j (ppFun j Q)) = ppFun j Q := + ppFun_congr fun n hn => by + funext x + exact polyFun_locProj_of_eqOn (hQ n) (fun y hy => ppFun_eq_of_mem Q hn hy) x + +/-! ### The projections onto piecewise polynomials -/ + +variable {p : ℝ≥0∞} [Fact (1 ≤ p)] + +/-- A common bound for the monomials and the dual basis on `[0, 1]`. -/ +noncomputable def basisBound (r : ℕ) : ℝ≥0∞ := + (exists_enorm_polyFun_le_of_fintype (fun i : Fin r ⊕ Fin r => + Sum.elim (fun i => (monoBasis r i : ℂ[X])) (fun i => (dualPoly r i : ℂ[X])) i)).choose + +/-- The basis bound is finite. -/ +theorem basisBound_ne_top (r : ℕ) : basisBound r ≠ ∞ := + (exists_enorm_polyFun_le_of_fintype _).choose_spec.1 + +/-- The monomials are bounded by `basisBound r` on `[0, 1]`. -/ +theorem enorm_monoBasis_le (r : ℕ) (i : Fin r) {t : ℝ} (ht : t ∈ Icc (0 : ℝ) 1) : + ‖polyFun (monoBasis r i) t‖ₑ ≤ basisBound r := + (exists_enorm_polyFun_le_of_fintype (fun i : Fin r ⊕ Fin r => + Sum.elim (fun i => (monoBasis r i : ℂ[X])) (fun i => (dualPoly r i : ℂ[X])) i)).choose_spec.2 + (Sum.inl i) t ht + +/-- The dual basis is bounded by `basisBound r` on `[0, 1]`. -/ +theorem enorm_dualPoly_le (r : ℕ) (i : Fin r) {t : ℝ} (ht : t ∈ Icc (0 : ℝ) 1) : + ‖polyFun (dualPoly r i) t‖ₑ ≤ basisBound r := + (exists_enorm_polyFun_le_of_fintype (fun i : Fin r ⊕ Fin r => + Sum.elim (fun i => (monoBasis r i : ℂ[X])) (fun i => (dualPoly r i : ℂ[X])) i)).choose_spec.2 + (Sum.inr i) t ht + +/-- The bound of the projections onto piecewise polynomials, `r M²`. -/ +noncomputable def ppProjConst (r : ℕ) : ℝ≥0∞ := r * basisBound r * basisBound r + +/-- The bound of the projections is finite. -/ +theorem ppProjConst_ne_top (r : ℕ) : ppProjConst r ≠ ∞ := + ENNReal.mul_ne_top (ENNReal.mul_ne_top (ENNReal.natCast_ne_top r) (basisBound_ne_top r)) + (basisBound_ne_top r) + +omit [Fact (1 ≤ p)] in +/-- **The projections onto piecewise polynomials are uniformly bounded**: +`‖P_j g‖_{L_p[0,1]} ≤ r M² ‖g‖_{L_p[0,1]}` for `1 ≤ p < ∞`, with `P_j g` the local projections +of `g` on the dyadic intervals of level `j`. -/ +theorem eLpNorm_ppFun_locProj_le (hp : 1 ≤ p) (hp' : p ≠ ∞) (r j : ℕ) {g : ℝ → ℂ} + (hg : AEStronglyMeasurable g unitVol) : + eLpNorm (ppFun j (locProj r j g)) p unitVol ≤ ppProjConst r * eLpNorm g p unitVol := by + have hp0 : p ≠ 0 := (lt_of_lt_of_le zero_lt_one hp).ne' + have hq : 0 < p.toReal := ENNReal.toReal_pos hp0 hp' + refine eLpNorm_le_of_lintegral_le (measurable_ppFun _ _).aestronglyMeasurable hp0 hp' ?_ + have hpiece : ∀ n ∈ Finset.range (2 ^ j), + ∫⁻ x in dyadicIco j n, ‖ppFun j (locProj r j g) x‖ₑ ^ p.toReal ≤ + ppProjConst r ^ p.toReal * ∫⁻ x in dyadicIco j n, ‖g x‖ₑ ^ p.toReal := fun n hn => by + have hn' := Finset.mem_range.1 hn + have hgI : AEStronglyMeasurable g (volume.restrict (dyadicIco j n)) := + hg.mono_measure (Measure.restrict_mono + ((dyadicIco_subset hn').trans Ico_subset_Icc_self) le_rfl) + rw [setLIntegral_congr_fun (measurableSet_dyadicIco j n) + (fun x hx => by rw [ppFun_eq_of_mem _ hn' hx]), + ← eLpNorm_rpow_eq (measurable_polyFun _).aestronglyMeasurable hp0 hp', + ← eLpNorm_rpow_eq hgI hp0 hp', ← ENNReal.mul_rpow_of_nonneg _ _ hq.le] + exact ENNReal.rpow_le_rpow (eLpNorm_locProj_le (enorm_monoBasis_le r) (enorm_dualPoly_le r) + hp j n hgI) hq.le + calc ∫⁻ x, ‖ppFun j (locProj r j g) x‖ₑ ^ p.toReal ∂unitVol + ≤ ∑ n ∈ Finset.range (2 ^ j), + ∫⁻ x in dyadicIco j n, ‖ppFun j (locProj r j g) x‖ₑ ^ p.toReal := + lintegral_Icc_le_sum_dyadicIco _ j + _ ≤ ∑ n ∈ Finset.range (2 ^ j), ppProjConst r ^ p.toReal * + ∫⁻ x in dyadicIco j n, ‖g x‖ₑ ^ p.toReal := Finset.sum_le_sum hpiece + _ ≤ ppProjConst r ^ p.toReal * ∫⁻ x in Icc (0 : ℝ) 1, ‖g x‖ₑ ^ p.toReal := by + rw [← Finset.mul_sum] + gcongr + exact sum_lintegral_dyadicIco_le _ j + _ = (ppProjConst r * eLpNorm g p unitVol) ^ p.toReal := by + rw [ENNReal.mul_rpow_of_nonneg _ _ hq.le, eLpNorm_rpow_eq hg hp0 hp'] + +variable (p) in +/-- The projection onto the piecewise polynomials of level `j`, as a linear map on `L_p[0, 1]`: +on every dyadic interval of level `j` it is the local projection. -/ +noncomputable def ppProjLinear (r j : ℕ) : Lp ℂ p unitVol →ₗ[ℝ] Lp ℂ p unitVol where + toFun f := (memLp_ppFun j (locProj r j f) p).toLp _ + map_add' f g := by + rw [← MemLp.toLp_add] + refine MemLp.toLp_congr _ _ (Filter.Eventually.of_forall fun x => ?_) + rw [← ppFun_add] + refine congrFun (ppFun_congr fun n hn => ?_) x + rw [Pi.add_apply, locProj_congr (ae_dyadicIco_of_unitVol (Lp.coeFn_add f g) hn), + locProj_add (integrableOn_dyadicIco f hn) (integrableOn_dyadicIco g hn)] + map_smul' c f := by + rw [RingHom.id_apply, ← MemLp.toLp_const_smul] + refine MemLp.toLp_congr _ _ (Filter.Eventually.of_forall fun x => ?_) + have hcf : ⇑(c • f) =ᵐ[unitVol] fun y => (c : ℂ) * f y := + (Lp.coeFn_smul c f).mono fun y hy => by rw [hy, Pi.smul_apply, Complex.real_smul] + rw [Pi.smul_apply, Complex.real_smul, show (c : ℂ) * ppFun j (locProj r j f) x = + ppFun j (fun n => C (c : ℂ) * locProj r j f n) x from + (congrFun (ppFun_const_mul j (c : ℂ) _) x).symm] + refine congrFun (ppFun_congr fun n hn => ?_) x + rw [locProj_congr (ae_dyadicIco_of_unitVol hcf hn), locProj_const_mul] + +variable (p) in +/-- The **projection onto the piecewise polynomials of level `j`** in `L_p[0, 1]`, +`1 ≤ p < ∞`, a bounded operator with norm at most `r M²`. -/ +noncomputable def ppProj (hp : p ≠ ∞) (r j : ℕ) : Lp ℂ p unitVol →L[ℝ] Lp ℂ p unitVol := + LinearMap.mkContinuous (ppProjLinear p r j) (ppProjConst r).toReal fun f => by + rw [Lp.norm_def, Lp.norm_def, ← ENNReal.toReal_mul] + refine ENNReal.toReal_mono (ENNReal.mul_ne_top (ppProjConst_ne_top r) + (Lp.eLpNorm_ne_top f)) ?_ + rw [show (ppProjLinear p r j) f = (memLp_ppFun j (locProj r j f) p).toLp _ from rfl, + eLpNorm_congr_ae (MemLp.coeFn_toLp (memLp_ppFun j (locProj r j f) p))] + exact eLpNorm_ppFun_locProj_le Fact.out hp r j (Lp.aestronglyMeasurable f) + +/-- The projection agrees almost everywhere with the piecewise local projections. -/ +theorem coeFn_ppProj (hp : p ≠ ∞) (r j : ℕ) (f : Lp ℂ p unitVol) : + ppProj p hp r j f =ᵐ[unitVol] ppFun j (locProj r j f) := + MemLp.coeFn_toLp (memLp_ppFun j (locProj r j f) p) + +/-- The projection has norm at most `r M²`. -/ +theorem norm_ppProj_le (hp : p ≠ ∞) (r j : ℕ) : ‖ppProj p hp r j‖ ≤ (ppProjConst r).toReal := + LinearMap.mkContinuous_norm_le _ ENNReal.toReal_nonneg _ + +/-- The projection maps into the piecewise polynomials of level `j`. -/ +theorem ppProj_mem (hp : p ≠ ∞) (r j : ℕ) (f : Lp ℂ p unitVol) : + ppProj p hp r j f ∈ ppSpace p r j := + ⟨locProj r j f, fun m => locProj_mem r j f m, coeFn_ppProj hp r j f⟩ + +/-- **The projection fixes the piecewise polynomials of level `j`.** -/ +theorem ppProj_of_mem (hp : p ≠ ∞) {r j : ℕ} {a : Lp ℂ p unitVol} (ha : a ∈ ppSpace p r j) : + ppProj p hp r j a = a := by + obtain ⟨Q, hQ, hae⟩ := ha + have hfun : ppFun j (locProj r j a) = ppFun j Q := ppFun_congr fun n hn => by + funext x + rw [locProj_congr (ae_dyadicIco_of_unitVol hae hn)] + exact polyFun_locProj_of_eqOn (hQ n) (fun y hy => ppFun_eq_of_mem Q hn hy) x + exact Lp.ext ((coeFn_ppProj hp r j a).trans ((Filter.EventuallyEq.of_eq hfun).trans hae.symm)) + +/-- **The projection scheme of dyadic piecewise polynomials** in `L_p[0, 1]`, `1 ≤ p < ∞`: the +projection of complexity `n ≥ 1` is the one onto the piecewise polynomials of level +`⌊log₂ n⌋`, and all are bounded by `r M²`. -/ +noncomputable def ppProjectionScheme (hp : p ≠ ∞) (r : ℕ) : (ppScheme p r).ProjectionScheme := + ApproximationScheme.ProjectionScheme.ofMonotone (ppSpace p r) (ppSpace_mono r) (ppProj p hp r) + (ppProj_mem hp r) (fun _ _ ha => ppProj_of_mem hp ha) (ppProjConst r).toReal + (norm_ppProj_le hp r) + +/-- The projection of complexity `2^k` is the one onto the piecewise polynomials of level `k`. -/ +theorem ppProjectionScheme_two_pow (hp : p ≠ ∞) (r k : ℕ) : + (ppProjectionScheme hp r).P (2 ^ k) = ppProj p hp r k := + ApproximationScheme.ProjectionScheme.ofMonotone_two_pow k + +end Interval diff --git a/LeanPool/FunctionSpaces/Domains/Interval/LowerDifferences.lean b/LeanPool/FunctionSpaces/Domains/Interval/LowerDifferences.lean new file mode 100644 index 0000000000..f07ab6ad46 --- /dev/null +++ b/LeanPool/FunctionSpaces/Domains/Interval/LowerDifferences.lean @@ -0,0 +1,516 @@ +/- +Copyright (c) 2026 Mario Ullrich. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Mario Ullrich +-/ +module + +public import LeanPool.FunctionSpaces.Domains.Interval.PolyDifferences +public import LeanPool.FunctionSpaces.Domains.Interval.SplineInverse +public import Mathlib.MeasureTheory.Function.Floor + +/- +Modified for Lean Pool: module names and imports adapted. +-/ + +/-! +# Differences of every order of piecewise polynomials and splines + +The inverse inequalities of `FunctionSpaces.Domains.Interval.PiecewiseInverse` and +`FunctionSpaces.Domains.Interval.SplineInverse` bound the difference `Δ_h^r` whose order `r` is +the order of the pieces. The isotropic modulus on the cube needs differences of every order +`m ≤ r` in each variable, and these do not vanish inside the pieces. + +* **Piecewise polynomials**, `1 ≤ m ≤ r`, `0 ≤ h ≤ 2^(-j)`: + `‖Δ_h^m u‖_{L_p[0, 1 - mh]} ≤ C (2^j h)^(1/p) ‖u‖_p` + (`Interval.exists_eLpNorm_higherDiff_ppFun_le`). On the strips of width `rh` left of the knots + the difference is bounded by the neighbouring pieces, as for `m = r` + (`Interval.enorm_higherDiff_le_of_isPiecewisePoly_of_le`); inside a piece the difference bound + of the polynomials (`Interval.DiffBound`) gives the factor `(2^j h)^m ≤ 2^j h`. +* **Splines** of order `r`, `1 ≤ m ≤ r - 1`, `0 ≤ h ≤ 2^(-j)`: + `‖Δ_h^m u‖_{L_p[0, 1 - mh]} ≤ C (2^j h)^m ‖u‖_p` + (`Interval.exists_eLpNorm_higherDiff_spline_le_of_lt`). On `[x, x + mh]` the spline is the + piece at `x` plus jumps `c (y - ξ)_+^(r-1)` at knots `ξ > x` + (`Interval.higherDiff_eq_add_sum_jumps`); the piece contributes `(2^j h)^m` by the difference + bound, and a jump `|c| 2^m (mh)^(r-1)`, which is of order `(2^j h)^(r-1) ≤ (2^j h)^m` by the + bound of the jump terms of every order + (`Interval.enorm_jumpCoeff_mul_higherDiff_truncPow_le_any_order` in + `FunctionSpaces.Domains.Interval.SplineInverse`). So the bound holds at every point + (`Interval.enorm_higherDiff_spline_le_of_lt`), not only on strips; this is the smoothness + `C^(r-2)` of splines. + +For steps `t` of either sign the difference lives on `{x ∈ [0, 1] : x + mt ∈ [0, 1]}` +(`Interval.stepRegion`), and its norm there depends only on `|t|` +(`Interval.eLpNorm_higherDiff_stepRegion_eq`), since `Δ_{-t}^m f(x) = (-1)^m Δ_t^m f(x - mt)` +(`Interval.higherDiff_neg`). +-/ + +@[expose] public section + +open MeasureTheory Set Polynomial +open Rd (higherDiff higherDiff_def measurable_higherDiff) +open scoped ENNReal + +namespace Interval + +/-! ### Steps of either sign -/ + +/-- **Negative steps**: `Δ_{-t}^m f(x) = (-1)^m Δ_t^m f(x - mt)` (`Rd.higherDiff_neg` on `ℝ`). -/ +theorem higherDiff_neg (m : ℕ) (t : ℝ) (f : ℝ → ℂ) (x : ℝ) : + higherDiff m (-t) f x = (-1 : ℂ) ^ m * higherDiff m t f (x - m * t) := by + rw [higherDiff_def, higherDiff_def, Rd.higherDiff_neg, nsmul_eq_mul] + +/-- The **step region** of a difference of order `m` and step `t`: the points `x ∈ [0, 1]` with +`x + mt ∈ [0, 1]`, for `t` of either sign. -/ +def stepRegion (m : ℕ) (t : ℝ) : Set ℝ := Icc (max 0 (-(m * t))) (min 1 (1 - m * t)) + +/-- `x` lies in the step region iff `x` and `x + mt` lie in `[0, 1]`. -/ +theorem mem_stepRegion {m : ℕ} {t x : ℝ} : + x ∈ stepRegion m t ↔ x ∈ Icc (0 : ℝ) 1 ∧ x + m * t ∈ Icc (0 : ℝ) 1 := by + rw [stepRegion, mem_Icc, max_le_iff, le_min_iff, mem_Icc, mem_Icc] + constructor + · rintro ⟨⟨h1, h2⟩, h3, h4⟩ + exact ⟨⟨h1, h3⟩, by linarith, by linarith⟩ + · rintro ⟨⟨h1, h3⟩, h5, h6⟩ + exact ⟨⟨h1, by linarith⟩, h3, by linarith⟩ + +/-- For `t ≥ 0` the step region is `[0, 1 - mt]`. -/ +theorem stepRegion_of_nonneg (m : ℕ) {t : ℝ} (ht : 0 ≤ t) : stepRegion m t = Icc 0 (1 - m * t) := by + have hmt : 0 ≤ (m : ℝ) * t := mul_nonneg (Nat.cast_nonneg m) ht + rw [stepRegion, max_eq_left (by linarith), min_eq_right (by linarith)] + +/-- For `t < 0` the step region is `[-mt, 1]`. -/ +theorem stepRegion_of_neg (m : ℕ) {t : ℝ} (ht : t < 0) : stepRegion m t = Icc (-(m * t)) 1 := by + have hmt : (m : ℝ) * t ≤ 0 := mul_nonpos_of_nonneg_of_nonpos (Nat.cast_nonneg m) ht.le + rw [stepRegion, max_eq_right (by linarith), min_eq_left (by linarith)] + +/-- **The step region is a step set**: `J(m, t) = [0, 1]_{mt}` (`Rd.stepSet`), since `x + lt`, +`l ≤ m`, lies between `x` and `x + mt`. -/ +theorem stepRegion_eq_stepSet (m : ℕ) (t : ℝ) : stepRegion m t = Rd.stepSet (Icc 0 1) m t := by + ext x + rw [mem_stepRegion] + simp only [Rd.stepSet, mem_ofPred_eq, smul_eq_mul] + constructor + · rintro ⟨⟨h0, h1⟩, h2, h3⟩ l hl + have hl' : (l : ℝ) ≤ m := by exact_mod_cast hl + rcases le_or_gt 0 t with ht | ht + · exact ⟨by linarith [mul_nonneg (Nat.cast_nonneg l) ht], + by linarith [mul_le_mul_of_nonneg_right hl' ht]⟩ + · exact ⟨by linarith [mul_le_mul_of_nonpos_right hl' ht.le], + by linarith [mul_nonpos_of_nonneg_of_nonpos (Nat.cast_nonneg l) ht.le]⟩ + · intro hx + exact ⟨by simpa using hx 0 (Nat.zero_le m), hx m le_rfl⟩ + +/-- **The norm of a difference depends only on the size of the step**: +`‖Δ_t^m u‖_{L_p(step region)} = ‖Δ_{|t|}^m u‖_{L_p[0, 1 - m|t|]}` +(`Rd.eLpNorm_indicator_stepSet_neg`). -/ +theorem eLpNorm_higherDiff_stepRegion_eq (u : ℝ → ℂ) (p : ℝ≥0∞) (m : ℕ) (t : ℝ) : + eLpNorm (higherDiff m t u) p (volume.restrict (stepRegion m t)) = + eLpNorm (higherDiff m |t| u) p (volume.restrict (Icc 0 (1 - m * |t|))) := by + rw [stepRegion_eq_stepSet, ← eLpNorm_indicator_eq_eLpNorm_restrict + (Rd.measurableSet_stepSet measurableSet_Icc m t).nullMeasurableSet, + ← eLpNorm_indicator_stepSet_Icc m (abs_nonneg t)] + rcases le_or_gt 0 t with ht | ht + · rw [abs_of_nonneg ht] + rfl + · rw [abs_of_neg ht, ← Rd.eLpNorm_indicator_stepSet_neg, neg_neg] + rfl + +/-! ### Tools for the local estimates -/ + +variable {p : ℝ≥0∞} [Fact (1 ≤ p)] + +/-- **From an integral bound to an `L_p` bound**: `∫ |F|^p ≤ A^p σ B^p` gives +`‖F‖_p ≤ A σ^(1/p) B`. -/ +theorem eLpNorm_le_of_lintegral_le_mul (hp : p ≠ ∞) {F : ℝ → ℂ} {μ : Measure ℝ} + (hF : AEStronglyMeasurable F μ) {A σ B : ℝ≥0∞} + (h : ∫⁻ x, ‖F x‖ₑ ^ p.toReal ∂μ ≤ A ^ p.toReal * σ * B ^ p.toReal) : + eLpNorm F p μ ≤ A * σ ^ (1 / p.toReal) * B := by + have hp0 : p ≠ 0 := (lt_of_lt_of_le zero_lt_one (Fact.out : 1 ≤ p)).ne' + have hq : 0 < p.toReal := ENNReal.toReal_pos hp0 hp + refine eLpNorm_le_of_lintegral_le hF hp0 hp (h.trans_eq ?_) + rw [ENNReal.mul_rpow_of_nonneg _ _ hq.le, ENNReal.mul_rpow_of_nonneg _ _ hq.le, + ← ENNReal.rpow_mul, one_div_mul_cancel hq.ne', ENNReal.rpow_one] + +omit [Fact (1 ≤ p)] in +/-- `(G a^(1/p))^p = G^p a` for `p ≠ 0, ∞`. -/ +theorem mul_rpow_one_div_rpow (hp0 : p ≠ 0) (hp : p ≠ ∞) (G a : ℝ≥0∞) : + (G * a ^ (1 / p.toReal)) ^ p.toReal = G ^ p.toReal * a := by + have hq : 0 < p.toReal := ENNReal.toReal_pos hp0 hp + rw [ENNReal.mul_rpow_of_nonneg _ _ hq.le, ← ENNReal.rpow_mul, one_div_mul_cancel hq.ne', + ENNReal.rpow_one] + +/-- **Integral of a local bound**: `∫_{[0,1]} c M_{⌊2^j x⌋} dx ≤ c 2^(-j) ∑_{n < 2^j} M_n`. -/ +theorem lintegral_localBound_le (j : ℕ) (c : ℝ≥0∞) (M : ℕ → ℝ≥0∞) : + ∫⁻ x in Icc (0 : ℝ) 1, c * M ⌊2 ^ j * x⌋₊ ≤ + c * ENNReal.ofReal (1 / 2 ^ j) * ∑ n ∈ Finset.range (2 ^ j), M n := by + refine (lintegral_Icc_le_sum_dyadicIco _ j).trans ?_ + rw [Finset.mul_sum] + refine Finset.sum_le_sum fun n _ => le_of_eq ?_ + calc ∫⁻ x in dyadicIco j n, c * M ⌊2 ^ j * x⌋₊ = ∫⁻ x in dyadicIco j n, c * M n := + setLIntegral_congr_fun (measurableSet_dyadicIco j n) fun x hx => by + rw [floor_eq_of_mem_dyadicIco hx] + _ = c * M n * volume (dyadicIco j n) := setLIntegral_const _ _ + _ = c * ENNReal.ofReal (1 / 2 ^ j) * M n := by + rw [dyadicIco, Real.volume_Ico, + show ((n : ℝ) + 1) / 2 ^ j - n / 2 ^ j = 1 / 2 ^ j by ring] + ring + +/-- The local masses of a piecewise polynomial of level `j`, summed over `n < 2^j`, are at most +`‖u‖_p^p`. -/ +theorem sum_localMass_ppFun_le (hp : p ≠ ∞) (j : ℕ) (Q : ℕ → ℂ[X]) : + ∑ n ∈ Finset.range (2 ^ j), localMass p j (ppFun j Q) n ≤ + eLpNorm (ppFun j Q) p unitVol ^ p.toReal := + (sum_le_tsum _).trans (tsum_localMass_ppFun_le hp j Q) + +/-! ### Pointwise bounds -/ + +/-- **Differences inside a piece**: if `x, …, x + mh` lie in the dyadic interval `I_{k,n}` of `x`, +`n = ⌊2^k x⌋`, then `|Δ_h^m u(x)| ≤ K (2^k h)^m 2^(k/p) M_n^(1/p)`, by the difference bound of +the polynomial piece (`Interval.DiffBound`). -/ +theorem enorm_higherDiff_le_of_mem_piece {r k m : ℕ} {u : ℝ → ℂ} (hu : IsPiecewisePoly r k u) + {K : ℝ≥0∞} (hK : DiffBound p r m K) (hp : p ≠ ∞) {h x : ℝ} (hh0 : 0 ≤ h) (hx : 0 ≤ x) + (hgood : x + m * h < ((⌊2 ^ k * x⌋₊ : ℝ) + 1) / 2 ^ k) : + ‖higherDiff m h u x‖ₑ ≤ K * ENNReal.ofReal (2 ^ k * h) ^ m * + ENNReal.ofReal (2 ^ k) ^ (1 / p.toReal) * localMass p k u ⌊2 ^ k * x⌋₊ ^ (1 / p.toReal) := by + obtain ⟨P, hP, hPu⟩ := hu ⌊2 ^ k * x⌋₊ + have hpos : (0 : ℝ) < 2 ^ k := by positivity + have hfl : (⌊2 ^ k * x⌋₊ : ℝ) ≤ 2 ^ k * x := Nat.floor_le (by positivity) + have h1 := higherDiff_eq_of_mem_piece hPu hh0 hx hgood + have hL : (0 : ℝ) < 1 / 2 ^ k := by positivity + have hux : (⌊2 ^ k * x⌋₊ : ℝ) / 2 ^ k ≤ x := by rw [div_le_iff₀ hpos]; linarith + have hxu : x + m * h ≤ (⌊2 ^ k * x⌋₊ : ℝ) / 2 ^ k + 2 * (1 / 2 ^ k) := by + have : ((⌊2 ^ k * x⌋₊ : ℝ) + 1) / 2 ^ k = (⌊2 ^ k * x⌋₊ : ℝ) / 2 ^ k + 1 / 2 ^ k := + add_div _ _ _ + linarith + have hb := hK P hP ((⌊2 ^ k * x⌋₊ : ℝ) / 2 ^ k) hL hh0 x hux hxu + rw [h1] + rwa [show h / (1 / 2 ^ k) = 2 ^ k * h by field_simp, + show (1 / (2 : ℝ) ^ k)⁻¹ = 2 ^ k by rw [one_div, inv_inv], + eLpNorm_piece_eq_localMass hp hPu] at hb + +/-! ### Piecewise polynomials -/ + +/-- **The pointwise bound for differences of piecewise polynomials**: for `m ≤ r`, +`0 ≤ h ≤ 2^(-j)` and `x ∈ [0, 1 - mh]`, `|Δ_h^m u(x)|^p` is at most the strip bound of the +neighbouring masses `∑_{l ≤ r} M_{n+l}` (`Interval.enorm_higherDiff_le_of_isPiecewisePoly_of_le`) +plus `(K_m (2^j h)^m 2^(j/p))^p M_n` for the piece of `x` +(`Interval.enorm_higherDiff_le_of_mem_piece`), where `n = ⌊2^j x⌋`. -/ +theorem enorm_higherDiff_rpow_le_strip_add_piece (hp : p ≠ ∞) {r j m : ℕ} (hmr : m ≤ r) + {u : ℝ → ℂ} (hu : IsPiecewisePoly r j u) {K Km : ℝ≥0∞} (hK : NikolskiiBound p r K) + (hKm : DiffBound p r m Km) {h : ℝ} (hh0 : 0 ≤ h) (hh : h ≤ 1 / 2 ^ j) {x : ℝ} + (hx : x ∈ Icc (0 : ℝ) (1 - m * h)) : + ‖higherDiff m h u x‖ₑ ^ p.toReal ≤ + stripBound j r h ((2 ^ m * K * ENNReal.ofReal (2 ^ j) ^ (1 / p.toReal)) ^ p.toReal) + (fun n => ∑ l ∈ Finset.range (r + 1), localMass p j u (n + l)) x + + (Km * ENNReal.ofReal (2 ^ j * h) ^ m * ENNReal.ofReal (2 ^ j) ^ (1 / p.toReal)) ^ + p.toReal * localMass p j u ⌊2 ^ j * x⌋₊ := by + have hp0 : p ≠ 0 := (lt_of_lt_of_le zero_lt_one (Fact.out : 1 ≤ p)).ne' + have hq : 0 < p.toReal := ENNReal.toReal_pos hp0 hp + by_cases hbad : ((⌊2 ^ j * x⌋₊ : ℝ) + 1) / 2 ^ j ≤ x + m * h + · have hbad' : ((⌊2 ^ j * x⌋₊ : ℝ) + 1) / 2 ^ j ≤ x + r * h := + hbad.trans (by + have : (m : ℝ) ≤ r := by exact_mod_cast hmr + nlinarith) + refine le_add_right ?_ + simp only [stripBound, hbad', ↓reduceIte] + rw [← mul_rpow_one_div_rpow hp0 hp] + refine ENNReal.rpow_le_rpow ?_ hq.le + exact (enorm_higherDiff_le_of_isPiecewisePoly_of_le hmr hu hK hp hh0 hh hx.1).trans_eq + (by ring) + · push Not at hbad + refine le_add_left ?_ + rw [← mul_rpow_one_div_rpow hp0 hp] + exact ENNReal.rpow_le_rpow (enorm_higherDiff_le_of_mem_piece hu hKm hp hh0 hx.1 hbad) hq.le + +omit [Fact (1 ≤ p)] in +/-- **The strip constant**: `(A 2^(j/p))^p (r h) = A^p r (2^j h)`. -/ +theorem rpow_strip_mul_eq (hp0 : p ≠ 0) (hp : p ≠ ∞) (A : ℝ≥0∞) (r j : ℕ) (h : ℝ) : + (A * ENNReal.ofReal (2 ^ j) ^ (1 / p.toReal)) ^ p.toReal * ENNReal.ofReal (r * h) = + A ^ p.toReal * r * ENNReal.ofReal (2 ^ j * h) := by + rw [mul_rpow_one_div_rpow hp0 hp, mul_assoc, ← ENNReal.ofReal_mul (by positivity), + show (2 : ℝ) ^ j * (r * h) = r * (2 ^ j * h) by ring, ENNReal.ofReal_mul (Nat.cast_nonneg r), + ENNReal.ofReal_natCast] + ring + +omit [Fact (1 ≤ p)] in +/-- **The gain inside the pieces**: for `σ = 2^j h ≤ 1` and `m ≥ 1`, +`(K σ^m 2^(j/p))^p 2^(-j) ≤ K^p σ`, since `σ^(mp) ≤ σ^p ≤ σ`. -/ +theorem rpow_piece_mul_le (hp0 : p ≠ 0) (hp : p ≠ ∞) (hq1 : 1 ≤ p.toReal) (K : ℝ≥0∞) {m : ℕ} + (hm : 1 ≤ m) (j : ℕ) {σ : ℝ≥0∞} (hσ1 : σ ≤ 1) : + (K * σ ^ m * ENNReal.ofReal (2 ^ j) ^ (1 / p.toReal)) ^ p.toReal * + ENNReal.ofReal (1 / 2 ^ j) ≤ K ^ p.toReal * σ := by + have hq : 0 < p.toReal := ENNReal.toReal_pos hp0 hp + rw [mul_rpow_one_div_rpow hp0 hp, mul_assoc, ← ENNReal.ofReal_mul (by positivity), + show (2 : ℝ) ^ j * (1 / 2 ^ j) = 1 by field_simp, ENNReal.ofReal_one, mul_one, + ENNReal.mul_rpow_of_nonneg _ _ hq.le] + gcongr + calc (σ ^ m) ^ p.toReal ≤ σ ^ p.toReal := + ENNReal.rpow_le_rpow (pow_le_of_le_one zero_le hσ1 (by omega)) hq.le + _ ≤ σ := ENNReal.rpow_le_self_of_le_one hσ1 hq1 + +/-- **Differences of every positive order of piecewise polynomials**: for `1 ≤ m ≤ r` there is +`C` such that for every level `j`, every piecewise polynomial `u` of level `j` and degree `< r` and +`0 ≤ h ≤ 2^(-j)`, `‖Δ_h^m u‖_{L_p[0, 1 - mh]} ≤ C (2^j h)^(1/p) ‖u‖_p`. On the strips of width +`rh` left of the knots the difference is bounded by the neighbouring pieces +(`Interval.enorm_higherDiff_le_of_isPiecewisePoly_of_le`), inside a piece by `(2^j h)^m` times the +piece (`Interval.enorm_higherDiff_le_of_mem_piece`), and `(2^j h)^(mp) ≤ 2^j h`. -/ +theorem exists_eLpNorm_higherDiff_ppFun_le {r m : ℕ} (hm : 1 ≤ m) (hmr : m ≤ r) (hp : p ≠ ∞) : + ∃ C : ℝ≥0∞, C ≠ ∞ ∧ ∀ (j : ℕ) (Q : ℕ → ℂ[X]), (∀ n, Q n ∈ degreeLT ℂ r) → ∀ {h : ℝ}, + 0 ≤ h → h ≤ 1 / 2 ^ j → + eLpNorm (higherDiff m h (ppFun j Q)) p (volume.restrict (Icc 0 (1 - m * h))) ≤ + C * ENNReal.ofReal (2 ^ j * h) ^ (1 / p.toReal) * eLpNorm (ppFun j Q) p unitVol := by + obtain ⟨K, hK, hKb⟩ := enorm_polyFun_le (p := p) r hp + obtain ⟨Km, hKm, hKmb⟩ := exists_diffBound (p := p) r m hp + have hp0 : p ≠ 0 := (lt_of_lt_of_le zero_lt_one (Fact.out : 1 ≤ p)).ne' + have hq : 0 < p.toReal := ENNReal.toReal_pos hp0 hp + have hq1 : 1 ≤ p.toReal := ENNReal.one_le_toReal_of_one_le Fact.out hp + set C₀ : ℝ≥0∞ := (2 ^ m * K) ^ p.toReal * ((r : ℝ≥0∞) * (r + 1)) + Km ^ p.toReal + have hC₀ : C₀ ≠ ∞ := by + refine ENNReal.add_ne_top.2 ⟨ENNReal.mul_ne_top (ENNReal.rpow_ne_top_of_nonneg hq.le + (ENNReal.mul_ne_top (by simp) hK)) (ENNReal.mul_ne_top (ENNReal.natCast_ne_top r) + (ENNReal.add_ne_top.2 ⟨ENNReal.natCast_ne_top r, ENNReal.one_ne_top⟩)), + ENNReal.rpow_ne_top_of_nonneg hq.le hKm⟩ + refine ⟨C₀ ^ (1 / p.toReal), ENNReal.rpow_ne_top_of_nonneg (by positivity) hC₀, + fun j Q hQ h hh0 hh => ?_⟩ + set u := ppFun j Q + have hu := isPiecewisePoly_ppFun hQ j + set B := eLpNorm u p unitVol + set σ := ENNReal.ofReal (2 ^ j * h) + have hσ1 : σ ≤ 1 := by + rw [← ENNReal.ofReal_one] + refine ENNReal.ofReal_le_ofReal ?_ + rw [le_div_iff₀ (by positivity)] at hh + linarith + set Mw : ℕ → ℝ≥0∞ := fun n => ∑ l ∈ Finset.range (r + 1), localMass p j u (n + l) + set G₁ := 2 ^ m * K * ENNReal.ofReal (2 ^ j) ^ (1 / p.toReal) + set G₂ := Km * σ ^ m * ENNReal.ofReal (2 ^ j) ^ (1 / p.toReal) + -- the pointwise bound: strip part plus interior part + have hpt : ∀ x ∈ Icc (0 : ℝ) (1 - m * h), ‖higherDiff m h u x‖ₑ ^ p.toReal ≤ + stripBound j r h (G₁ ^ p.toReal) Mw x + G₂ ^ p.toReal * localMass p j u ⌊2 ^ j * x⌋₊ := + fun x hx => enorm_higherDiff_rpow_le_strip_add_piece hp hmr hu hKb hKmb hh0 hh hx + -- the integral + have hmeas : Measurable fun x : ℝ => G₂ ^ p.toReal * localMass p j u ⌊2 ^ j * x⌋₊ := + measurable_const.mul ((measurable_from_nat (f := localMass p j u)).comp + (measurable_const_mul ((2 : ℝ) ^ j)).nat_floor) + have hstrip := lintegral_stripBound_le j r h (G₁ ^ p.toReal) Mw + have hloc := lintegral_localBound_le j (G₂ ^ p.toReal) (localMass p j u) + have hsum1 : ∑ n ∈ Finset.range (2 ^ j), Mw n ≤ (r + 1) * B ^ p.toReal := + sum_sum_localMass_le hp j r Q + have hsum2 := sum_localMass_ppFun_le hp j Q + -- the constants + have hG₁ : G₁ ^ p.toReal * ENNReal.ofReal (r * h) = (2 ^ m * K) ^ p.toReal * r * σ := + rpow_strip_mul_eq hp0 hp (2 ^ m * K) r j h + have hG₂ : G₂ ^ p.toReal * ENNReal.ofReal (1 / 2 ^ j) ≤ Km ^ p.toReal * σ := + rpow_piece_mul_le hp0 hp hq1 Km hm j hσ1 + refine eLpNorm_le_of_lintegral_le_mul hp + (measurable_higherDiff (measurable_ppFun j Q) m h).aestronglyMeasurable + (A := C₀ ^ (1 / p.toReal)) ?_ + rw [← ENNReal.rpow_mul, one_div_mul_cancel hq.ne', ENNReal.rpow_one] + calc ∫⁻ x in Icc (0 : ℝ) (1 - m * h), ‖higherDiff m h u x‖ₑ ^ p.toReal + ≤ ∫⁻ x in Icc (0 : ℝ) (1 - m * h), (stripBound j r h (G₁ ^ p.toReal) Mw x + + G₂ ^ p.toReal * localMass p j u ⌊2 ^ j * x⌋₊) := setLIntegral_mono' measurableSet_Icc hpt + _ ≤ ∫⁻ x in Icc (0 : ℝ) 1, (stripBound j r h (G₁ ^ p.toReal) Mw x + + G₂ ^ p.toReal * localMass p j u ⌊2 ^ j * x⌋₊) := + lintegral_mono_set (Icc_subset_Icc le_rfl (by + linarith [mul_nonneg (Nat.cast_nonneg m) hh0])) + _ = (∫⁻ x in Icc (0 : ℝ) 1, stripBound j r h (G₁ ^ p.toReal) Mw x) + + ∫⁻ x in Icc (0 : ℝ) 1, G₂ ^ p.toReal * localMass p j u ⌊2 ^ j * x⌋₊ := + lintegral_add_right' _ hmeas.aemeasurable + _ ≤ G₁ ^ p.toReal * ENNReal.ofReal (r * h) * ((r + 1) * B ^ p.toReal) + + G₂ ^ p.toReal * ENNReal.ofReal (1 / 2 ^ j) * B ^ p.toReal := by + gcongr + · exact hstrip.trans (by gcongr) + · exact hloc.trans (by gcongr) + _ ≤ (2 ^ m * K) ^ p.toReal * r * σ * ((r + 1) * B ^ p.toReal) + + Km ^ p.toReal * σ * B ^ p.toReal := by + rw [hG₁] + gcongr + _ = C₀ * σ * B ^ p.toReal := by + simp only [C₀] + ring + +/-! ### Splines -/ + +/-- **A jump term of a spline**: for `1 ≤ m < r`, `h ≥ 0` with `mh ≤ 2^(-j)`, `x ≥ 0` and a knot +`l 2^(-j)` with `n₀ < l ≤ n₀ + r`, `n₀ = ⌊2^j x⌋`, the term `c_l Δ_h^m (· - l 2^(-j))_+^(r-1)(x)` +is at most `2 · 2^m m^(r-1) K (2^j h)^m 2^(j/p) (∑_{l' ≤ r} M_{n₀+l'})^(1/p)`: the bound of every +order (`Interval.enorm_jumpCoeff_mul_higherDiff_truncPow_le_any_order`) with +`(2^j h)^(r-1) ≤ (2^j h)^m`, since `2^j h ≤ 1`. -/ +theorem enorm_jumpCoeff_mul_higherDiff_truncPow_le {r j N m : ℕ} (hm : 1 ≤ m) (hmr : m < r) + {P : ℕ → ℂ[X]} (hP : ∀ n, P n ∈ degreeLT ℂ r) (hJ : SplineJoinsBelow r j N P) {u : ℝ → ℂ} + (hu : ∀ n < N, ∀ x ∈ dyadicIco j n, u x = polyFun (P n) x) {K : ℝ≥0∞} + (hK : NikolskiiBound p r K) (hp : p ≠ ∞) {h x : ℝ} (hh0 : 0 ≤ h) (hmh : m * h ≤ 1 / 2 ^ j) + {l : ℕ} (hl : l ∈ Finset.Ioc ⌊2 ^ j * x⌋₊ (⌊2 ^ j * x⌋₊ + r)) : + ‖jumpCoeff r N P l * higherDiff m h (truncPow r ((l : ℝ) / 2 ^ j)) x‖ₑ ≤ + 2 * 2 ^ m * (m : ℝ≥0∞) ^ (r - 1) * K * ENNReal.ofReal (2 ^ j * h) ^ m * + ENNReal.ofReal (2 ^ j) ^ (1 / p.toReal) * + (∑ l' ∈ Finset.range (r + 1), localMass p j u (⌊2 ^ j * x⌋₊ + l')) ^ (1 / p.toReal) := by + have hm1 : (1 : ℝ) ≤ m := by exact_mod_cast hm + have hh : h ≤ 1 / 2 ^ j := le_trans (by nlinarith) hmh + have hσ1 : ENNReal.ofReal (2 ^ j * h) ≤ 1 := by + rw [← ENNReal.ofReal_one] + refine ENNReal.ofReal_le_ofReal ?_ + rw [le_div_iff₀ (by positivity)] at hh + linarith + refine (enorm_jumpCoeff_mul_higherDiff_truncPow_le_any_order m hP hJ hu hK hp hh0 + hl).trans (mul_le_mul' (mul_le_mul' (mul_le_mul' le_rfl ?_) le_rfl) le_rfl) + exact pow_le_pow_of_le_one zero_le hσ1 (by omega) + +/-- **Pointwise bound for differences of lower order of splines**: for `1 ≤ m < r`, `h ≥ 0` with +`mh ≤ 2^(-j)`, `x ≥ 0` and `x + mh < N 2^(-j)`, +`|Δ_h^m u(x)| ≤ (K_m + 2 r 2^m m^(r-1) K) (2^j h)^m 2^(j/p) (∑_{l ≤ r} M_{n₀+l})^(1/p)`. The +piece contributes by the difference bound `K_m` of the polynomials, a jump +`c_l (· - ξ_l)_+^(r-1)` by `|c_l| 2^m (mh)^(r-1)` with +`|c_l| 2^(-j(r-1)) ≤ 2 K 2^(j/p) (…)^(1/p)`, and `(2^j h)^(r-1) ≤ (2^j h)^m`. -/ +theorem enorm_higherDiff_spline_le_of_lt {r j N m : ℕ} (hm : 1 ≤ m) (hmr : m < r) + {P : ℕ → ℂ[X]} (hP : ∀ n, P n ∈ degreeLT ℂ r) (hJ : SplineJoinsBelow r j N P) {u : ℝ → ℂ} + (hu : ∀ n < N, ∀ x ∈ dyadicIco j n, u x = polyFun (P n) x) {K Km : ℝ≥0∞} + (hK : NikolskiiBound p r K) (hKm : DiffBound p r m Km) (hp : p ≠ ∞) {h x : ℝ} + (hh0 : 0 ≤ h) (hmh : m * h ≤ 1 / 2 ^ j) (hx : 0 ≤ x) (hxm : x + m * h < N / 2 ^ j) : + ‖higherDiff m h u x‖ₑ ≤ (Km + 2 * r * 2 ^ m * (m : ℝ≥0∞) ^ (r - 1) * K) * + ENNReal.ofReal (2 ^ j * h) ^ m * ENNReal.ofReal (2 ^ j) ^ (1 / p.toReal) * + (∑ l ∈ Finset.range (r + 1), localMass p j u (⌊2 ^ j * x⌋₊ + l)) ^ (1 / p.toReal) := by + have hpos : (0 : ℝ) < 2 ^ j := by positivity + have hL : (0 : ℝ) < 1 / 2 ^ j := by positivity + have hm1 : (1 : ℝ) ≤ m := by exact_mod_cast hm + have hh : h ≤ 1 / 2 ^ j := le_trans (by nlinarith) hmh + set n₀ := ⌊2 ^ j * x⌋₊ + set S := ∑ l ∈ Finset.range (r + 1), localMass p j u (n₀ + l) + set σ := ENNReal.ofReal (2 ^ j * h) + have hfl : (n₀ : ℝ) ≤ 2 ^ j * x := Nat.floor_le (by positivity) + have hfl' : 2 ^ j * x < (n₀ : ℝ) + 1 := Nat.lt_floor_add_one _ + have hn₀N : n₀ < N := by + refine (Nat.floor_lt (by positivity)).2 ?_ + rw [lt_div_iff₀ hpos] at hxm + nlinarith [mul_nonneg (Nat.cast_nonneg m) hh0] + -- the piece + have hpiece : ‖higherDiff m h (polyFun (P n₀)) x‖ₑ ≤ + Km * σ ^ m * ENNReal.ofReal (2 ^ j) ^ (1 / p.toReal) * S ^ (1 / p.toReal) := by + have hux : (n₀ : ℝ) / 2 ^ j ≤ x := by rw [div_le_iff₀ hpos]; linarith + have hxu : x + m * h ≤ (n₀ : ℝ) / 2 ^ j + 2 * (1 / 2 ^ j) := by + have : x < (n₀ : ℝ) / 2 ^ j + 1 / 2 ^ j := by + rw [← add_div, lt_div_iff₀ hpos]; linarith + linarith + have hb := hKm (P n₀) (hP n₀) ((n₀ : ℝ) / 2 ^ j) hL hh0 x hux hxu + rw [show h / (1 / 2 ^ j) = 2 ^ j * h by field_simp, + show (1 / (2 : ℝ) ^ j)⁻¹ = 2 ^ j by rw [one_div, inv_inv], + eLpNorm_piece_eq_localMass hp (hu n₀ hn₀N)] at hb + refine hb.trans ?_ + gcongr + simpa using localMass_le_sum_range j u n₀ (Nat.zero_le r) + -- the jumps + have hterm : ∀ l ∈ Finset.Ioc n₀ (n₀ + r), ‖jumpCoeff r N P l * + higherDiff m h (truncPow r ((l : ℝ) / 2 ^ j)) x‖ₑ ≤ + 2 * 2 ^ m * (m : ℝ≥0∞) ^ (r - 1) * K * σ ^ m * ENNReal.ofReal (2 ^ j) ^ (1 / p.toReal) * + S ^ (1 / p.toReal) := fun l hl => + enorm_jumpCoeff_mul_higherDiff_truncPow_le hm hmr hP hJ hu hK hp hh0 hmh hl + rw [higherDiff_eq_add_sum_jumps hmr.le hJ hu hh0 hh hx hxm] + refine (eNorm_add_le _ _).trans ((add_le_add hpiece ((eNorm_sum_le _ _).trans + (Finset.sum_le_sum hterm))).trans ?_) + rw [Finset.sum_const, Nat.card_Ioc, show n₀ + r - n₀ = r by omega, nsmul_eq_mul] + exact le_of_eq (by ring) + +/-- **Long steps**: for `mh > 2^(-j)`, `‖Δ_h^m u‖_{L_p[0, 1 - mh]} ≤ 2^m m^m (2^j h)^m ‖u‖_p`, +from `‖Δ_h^m u‖_p ≤ 2^m ‖u‖_p` and `1 < m 2^j h`. -/ +theorem eLpNorm_higherDiff_le_of_lt_mul {u : ℝ → ℂ} (hu : Measurable u) {m j : ℕ} {h : ℝ} + (hh0 : 0 ≤ h) (hmh : 1 / 2 ^ j < m * h) : + eLpNorm (higherDiff m h u) p (volume.restrict (Icc 0 (1 - m * h))) ≤ + 2 ^ m * (m : ℝ≥0∞) ^ m * ENNReal.ofReal (2 ^ j * h) ^ m * eLpNorm u p unitVol := by + have hpos : (0 : ℝ) < 2 ^ j := by positivity + have h1 := eLpNorm_higherDiff_le hu (Fact.out : 1 ≤ p) m hh0 0 1 + have hmσ : 1 ≤ (m : ℝ≥0∞) * ENNReal.ofReal (2 ^ j * h) := by + rw [← ENNReal.ofReal_natCast, ← ENNReal.ofReal_mul (Nat.cast_nonneg _), + ← ENNReal.ofReal_one] + refine ENNReal.ofReal_le_ofReal ?_ + rw [div_lt_iff₀ hpos] at hmh + nlinarith + calc eLpNorm (higherDiff m h u) p (volume.restrict (Icc 0 (1 - m * h))) + ≤ 2 ^ m * eLpNorm u p unitVol := h1 + _ ≤ 2 ^ m * ((m : ℝ≥0∞) * ENNReal.ofReal (2 ^ j * h)) ^ m * eLpNorm u p unitVol := by + gcongr + calc (2 : ℝ≥0∞) ^ m = 2 ^ m * 1 := (mul_one _).symm + _ ≤ 2 ^ m * ((m : ℝ≥0∞) * ENNReal.ofReal (2 ^ j * h)) ^ m := by + gcongr; exact one_le_pow₀ hmσ + _ = _ := by rw [mul_pow]; ring + +/-- **Differences of lower order of splines**: for `1 ≤ m < r` there is `C` such that for every +level `j`, every spline `u` of order `r` and level `j` and `0 ≤ h ≤ 2^(-j)`, +`‖Δ_h^m u‖_{L_p[0, 1 - mh]} ≤ C (2^j h)^m ‖u‖_p`. For `mh ≤ 2^(-j)` the pointwise bound +(`Interval.enorm_higherDiff_spline_le_of_lt`) holds at almost every point, and the local masses +of `r + 1` consecutive pieces add up to at most `(r + 1) ‖u‖_p^p`; for `mh > 2^(-j)` the trivial +bound `2^m ‖u‖_p ≤ 2^m (m 2^j h)^m ‖u‖_p` suffices. -/ +theorem exists_eLpNorm_higherDiff_spline_le_of_lt {r m : ℕ} (hm : 1 ≤ m) (hmr : m < r) + (hp : p ≠ ∞) : + ∃ C : ℝ≥0∞, C ≠ ∞ ∧ ∀ (j : ℕ) (Q : ℕ → ℂ[X]), (∀ n, Q n ∈ degreeLT ℂ r) → + SplineJoins r j Q → ∀ {h : ℝ}, 0 ≤ h → h ≤ 1 / 2 ^ j → + eLpNorm (higherDiff m h (ppFun j Q)) p (volume.restrict (Icc 0 (1 - m * h))) ≤ + C * ENNReal.ofReal (2 ^ j * h) ^ m * eLpNorm (ppFun j Q) p unitVol := by + obtain ⟨K, hK, hKb⟩ := enorm_polyFun_le (p := p) r hp + obtain ⟨Km, hKm, hKmb⟩ := exists_diffBound (p := p) r m hp + have hp0 : p ≠ 0 := (lt_of_lt_of_le zero_lt_one (Fact.out : 1 ≤ p)).ne' + have hq : 0 < p.toReal := ENNReal.toReal_pos hp0 hp + set C₁ := Km + 2 * r * 2 ^ m * (m : ℝ≥0∞) ^ (r - 1) * K + have hC₁ : C₁ ≠ ∞ := ENNReal.add_ne_top.2 ⟨hKm, ENNReal.mul_ne_top (ENNReal.mul_ne_top + (ENNReal.mul_ne_top (ENNReal.mul_ne_top (by simp) (ENNReal.natCast_ne_top r)) (by simp)) + (ENNReal.pow_ne_top (ENNReal.natCast_ne_top m))) hK⟩ + refine ⟨C₁ * ((r : ℝ≥0∞) + 1) ^ (1 / p.toReal) + 2 ^ m * (m : ℝ≥0∞) ^ m, + ENNReal.add_ne_top.2 ⟨ENNReal.mul_ne_top hC₁ (ENNReal.rpow_ne_top_of_nonneg (by positivity) + (ENNReal.add_ne_top.2 ⟨ENNReal.natCast_ne_top r, ENNReal.one_ne_top⟩)), + ENNReal.mul_ne_top (by simp) (ENNReal.pow_ne_top (ENNReal.natCast_ne_top m))⟩, + fun j Q hQ hJ h hh0 hh => ?_⟩ + set u := ppFun j Q + set B := eLpNorm u p unitVol + set σ := ENNReal.ofReal (2 ^ j * h) + have hpos : (0 : ℝ) < 2 ^ j := by positivity + rcases le_or_gt ((m : ℝ) * h) (1 / 2 ^ j) with hmh | hmh + · have hu : ∀ n < 2 ^ j, ∀ x ∈ dyadicIco j n, u x = polyFun (Q n) x := + fun n hn x hx => ppFun_eq_of_mem Q hn hx + set Mw : ℕ → ℝ≥0∞ := fun n => ∑ l ∈ Finset.range (r + 1), localMass p j u (n + l) + set G := C₁ * σ ^ m * ENNReal.ofReal (2 ^ j) ^ (1 / p.toReal) + have hae : ∀ᵐ x ∂volume.restrict (Icc (0 : ℝ) (1 - m * h)), x ∈ Ico 0 (1 - m * h) := by + rw [← Measure.restrict_congr_set Ico_ae_eq_Icc] + exact ae_restrict_mem measurableSet_Ico + have hpt : ∀ᵐ x ∂volume.restrict (Icc (0 : ℝ) (1 - m * h)), + ‖higherDiff m h u x‖ₑ ^ p.toReal ≤ G ^ p.toReal * Mw ⌊2 ^ j * x⌋₊ := by + filter_upwards [hae] with x hx + have hxm : x + m * h < ((2 ^ j : ℕ) : ℝ) / 2 ^ j := by + rw [Nat.cast_pow, Nat.cast_ofNat, div_self hpos.ne'] + linarith [hx.2] + rw [← mul_rpow_one_div_rpow hp0 hp] + exact ENNReal.rpow_le_rpow (enorm_higherDiff_spline_le_of_lt hm hmr hQ hJ.below hu hKb hKmb + hp hh0 hmh hx.1 hxm) hq.le + have hG : G ^ p.toReal * ENNReal.ofReal (1 / 2 ^ j) = (C₁ * σ ^ m) ^ p.toReal := by + simp only [G] + rw [mul_rpow_one_div_rpow hp0 hp, mul_assoc, ← ENNReal.ofReal_mul (by positivity), + show (2 : ℝ) ^ j * (1 / 2 ^ j) = 1 by field_simp, ENNReal.ofReal_one, mul_one] + refine (eLpNorm_le_of_lintegral_le_mul hp + (measurable_higherDiff (measurable_ppFun j Q) m h).aestronglyMeasurable + (A := C₁ * σ ^ m) (σ := (r : ℝ≥0∞) + 1) (B := B) ?_).trans ?_ + · calc ∫⁻ x in Icc (0 : ℝ) (1 - m * h), ‖higherDiff m h u x‖ₑ ^ p.toReal + ≤ ∫⁻ x in Icc (0 : ℝ) (1 - m * h), G ^ p.toReal * Mw ⌊2 ^ j * x⌋₊ := + lintegral_mono_ae hpt + _ ≤ ∫⁻ x in Icc (0 : ℝ) 1, G ^ p.toReal * Mw ⌊2 ^ j * x⌋₊ := + lintegral_mono_set (Icc_subset_Icc le_rfl (by + linarith [mul_nonneg (Nat.cast_nonneg m) hh0])) + _ ≤ G ^ p.toReal * ENNReal.ofReal (1 / 2 ^ j) * ∑ n ∈ Finset.range (2 ^ j), Mw n := + lintegral_localBound_le j _ Mw + _ ≤ G ^ p.toReal * ENNReal.ofReal (1 / 2 ^ j) * ((r + 1) * B ^ p.toReal) := by + gcongr + exact sum_sum_localMass_le hp j r Q + _ = (C₁ * σ ^ m) ^ p.toReal * ((r : ℝ≥0∞) + 1) * B ^ p.toReal := by + rw [hG]; ring + · calc C₁ * σ ^ m * ((r : ℝ≥0∞) + 1) ^ (1 / p.toReal) * B + = C₁ * ((r : ℝ≥0∞) + 1) ^ (1 / p.toReal) * σ ^ m * B := by ring + _ ≤ (C₁ * ((r : ℝ≥0∞) + 1) ^ (1 / p.toReal) + 2 ^ m * (m : ℝ≥0∞) ^ m) * σ ^ m * B := by + gcongr + exact le_self_add + · -- `mh > 2^(-j)`: the trivial bound + calc eLpNorm (higherDiff m h u) p (volume.restrict (Icc 0 (1 - m * h))) + ≤ 2 ^ m * (m : ℝ≥0∞) ^ m * σ ^ m * B := + eLpNorm_higherDiff_le_of_lt_mul (measurable_ppFun j Q) hh0 hmh + _ ≤ (C₁ * ((r : ℝ≥0∞) + 1) ^ (1 / p.toReal) + 2 ^ m * (m : ℝ≥0∞) ^ m) * σ ^ m * B := by + gcongr + exact le_add_self + +end Interval diff --git a/LeanPool/FunctionSpaces/Domains/Interval/Modulus.lean b/LeanPool/FunctionSpaces/Domains/Interval/Modulus.lean new file mode 100644 index 0000000000..794c62cd84 --- /dev/null +++ b/LeanPool/FunctionSpaces/Domains/Interval/Modulus.lean @@ -0,0 +1,359 @@ +/- +Copyright (c) 2026 Mario Ullrich. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Mario Ullrich +-/ +module + +public import LeanPool.FunctionSpaces.Domains.Interval.Differences +public import LeanPool.FunctionSpaces.Analysis.Differences.DomainModuli +public import Mathlib.MeasureTheory.Function.LpSeminorm.TriangleInequality +public import Mathlib.MeasureTheory.Measure.Lebesgue.Basic +public import Mathlib.MeasureTheory.Group.Measure +public import Mathlib.MeasureTheory.Measure.Haar.Unique +public import Mathlib.MeasureTheory.Function.LpSeminorm.SMul + +/- +Modified for Lean Pool: module names and imports adapted. +-/ + +/-! +# The modulus of smoothness on an interval + +For `f : ℝ → ℂ`, `1 ≤ p ≤ ∞` and an interval `[a, b]`, the **modulus of smoothness of order `r`** +is the modulus on the set `[a, b]` of `Rd.modulusOn` (`Interval.modulus`), + +`ω_r(f, t, [a, b])_p = sup_{|h| ≤ t} ‖Δ_h^r(f, ·, [a, b])‖_p + = sup_{0 ≤ h ≤ t} ‖Δ_h^r f‖_{L_p[a, b - r h]}` (`Interval.modulus_eq_iSup_nonneg`): + +the differences are taken only where all points `x, x + h, …, x + r h` lie in `[a, b]`, and the +steps `h` and `-h` give the same norm. It +increases in `t`, is subadditive and homogeneous in `f`, satisfies +`ω_r(f, t) ≤ 2^r ‖f‖_{L_p[a,b]}`, vanishes on polynomials of degree `< r`, depends only on +the class of `f` in `L_p[a, b]` (`Interval.modulus_congr_ae`) and is invariant under the +reflection `x ↦ a + b - x` (`Interval.modulus_reflect`). + +The same formula defines the modulus for `0 < p < 1`. For `0 < p ≤ 1` the `p`-th power of the +modulus is subadditive and `ω_r(f, t) ≤ 2^(r/p) ‖f‖_{L_p[a,b]}` (`Interval.modulus_add_rpow_le`, +`Interval.modulus_le_of_le_one`), since the `p`-th power of the `L_p` quasi-norm is subadditive. + +All norms are `eLpNorm` on the restriction of Lebesgue measure; the functions are measurable +functions on `ℝ`, as the representatives of elements of `L_p` are. +-/ + +@[expose] public section + +open MeasureTheory Set +open Rd (higherDiff measurable_higherDiff) +open scoped ENNReal + +namespace Interval + +/-- Translation: `‖f(· + c)‖_{L_p[u,v]} = ‖f‖_{L_p[u+c, v+c]}`. -/ +theorem eLpNorm_comp_add_Icc {f : ℝ → ℂ} (hf : Measurable f) (p : ℝ≥0∞) (c u v : ℝ) : + eLpNorm (fun x => f (x + c)) p (volume.restrict (Icc u v)) = + eLpNorm f p (volume.restrict (Icc (u + c) (v + c))) := by + have hpre : (fun x => x + c) ⁻¹' Icc (u + c) (v + c) = Icc u v := by + ext x + simp only [mem_preimage, mem_Icc] + constructor <;> intro h <;> constructor <;> linarith [h.1, h.2] + have hmp : MeasurePreserving (· + c) (volume.restrict (Icc u v)) + (volume.restrict (Icc (u + c) (v + c))) := by + have := (measurePreserving_add_right volume c).restrict_preimage + (measurableSet_Icc (a := u + c) (b := v + c)) + rwa [hpre] at this + exact eLpNorm_comp_measurePreserving hf.aestronglyMeasurable hmp + +/-- Reflection: `‖f(c - ·)‖_{L_p[u,v]} = ‖f‖_{L_p[c-v, c-u]}`. -/ +theorem eLpNorm_comp_sub_Icc {f : ℝ → ℂ} (hf : Measurable f) (p : ℝ≥0∞) (c u v : ℝ) : + eLpNorm (fun x => f (c - x)) p (volume.restrict (Icc u v)) = + eLpNorm f p (volume.restrict (Icc (c - v) (c - u))) := by + have hpre : (fun x => c - x) ⁻¹' Icc (c - v) (c - u) = Icc u v := by + ext x + simp only [mem_preimage, mem_Icc] + constructor <;> intro h <;> constructor <;> linarith [h.1, h.2] + have hmp : MeasurePreserving (fun x => c - x) (volume.restrict (Icc u v)) + (volume.restrict (Icc (c - v) (c - u))) := by + have := (volume.measurePreserving_sub_left c).restrict_preimage + (measurableSet_Icc (a := c - v) (b := c - u)) + rwa [hpre] at this + exact eLpNorm_comp_measurePreserving hf.aestronglyMeasurable hmp + +/-- `L_p` norms increase with the interval. -/ +theorem eLpNorm_Icc_mono (f : ℝ → ℂ) (p : ℝ≥0∞) {u v u' v' : ℝ} (hu : u' ≤ u) (hv : v ≤ v') : + eLpNorm f p (volume.restrict (Icc u v)) ≤ eLpNorm f p (volume.restrict (Icc u' v')) := + eLpNorm_mono_measure _ (Measure.restrict_mono (Icc_subset_Icc hu hv) le_rfl) + +/-- Splitting `[a, c]` at `b`: `‖G‖_{L_p[a,c]} ≤ ‖G‖_{L_p[a,b]} + ‖G‖_{L_p[b,c]}`. -/ +theorem eLpNorm_Icc_split {G : ℝ → ℂ} (hG : Measurable G) {p : ℝ≥0∞} (hp : 1 ≤ p) + (hp' : p ≠ ∞) {a b c : ℝ} (hab : a ≤ b) (hbc : b ≤ c) : + eLpNorm G p (volume.restrict (Icc a c)) ≤ + eLpNorm G p (volume.restrict (Icc a b)) + eLpNorm G p (volume.restrict (Icc b c)) := by + have hp0 : p ≠ 0 := (lt_of_lt_of_le zero_lt_one hp).ne' + have hq1 : 1 ≤ p.toReal := ENNReal.one_le_toReal_of_one_le hp hp' + rw [eLpNorm_eq_lintegral_rpow_eNorm_toReal hp0 hp' hG.aestronglyMeasurable, + eLpNorm_eq_lintegral_rpow_eNorm_toReal hp0 hp' hG.aestronglyMeasurable, + eLpNorm_eq_lintegral_rpow_eNorm_toReal hp0 hp' hG.aestronglyMeasurable, + ← Icc_union_Icc_eq_Icc hab hbc] + refine le_trans (ENNReal.rpow_le_rpow (lintegral_union_le _ _ _) (by positivity)) ?_ + have := ENNReal.rpow_add_rpow_le_add + ((∫⁻ x in Icc a b, ‖G x‖ₑ ^ p.toReal) ^ (1 / p.toReal)) + ((∫⁻ x in Icc b c, ‖G x‖ₑ ^ p.toReal) ^ (1 / p.toReal)) hq1 + rwa [← ENNReal.rpow_mul, ← ENNReal.rpow_mul, one_div_mul_cancel (by linarith), + ENNReal.rpow_one, ENNReal.rpow_one] at this + +/-- **Differences in `L_p`**: if `‖f(· + k h)‖_{L_p(μ)} ≤ B` for `k ≤ r`, then +`‖Δ_h^r f‖_{L_p(μ)} ≤ 2^r B`, by the triangle inequality and `∑_k C(r, k) = 2^r`. -/ +theorem eLpNorm_higherDiff_le_of_forall {f : ℝ → ℂ} {p : ℝ≥0∞} (hp : 1 ≤ p) {μ : Measure ℝ} + {r : ℕ} {h : ℝ} {B : ℝ≥0∞} + (hB : ∀ k ∈ Finset.range (r + 1), eLpNorm (fun x => f (x + k * h)) p μ ≤ B) : + eLpNorm (higherDiff r h f) p μ ≤ 2 ^ r * B := by + rw [higherDiff_eq_sum_smul] + refine (eLpNorm_sum_le hp).trans ?_ + calc ∑ k ∈ Finset.range (r + 1), + eLpNorm (((-1 : ℂ) ^ (r - k) * (r.choose k : ℂ)) • fun x => f (x + k * h)) p μ + ≤ ∑ k ∈ Finset.range (r + 1), (r.choose k : ℝ≥0∞) * B := + Finset.sum_le_sum fun k hk => by + rw [eLpNorm_const_smul, enorm_higherDiff_coeff] + exact mul_le_mul_right (hB k hk) _ + _ = 2 ^ r * B := by + rw [← Finset.sum_mul, ← Nat.cast_sum, Nat.sum_range_choose] + push_cast + rfl + +/-- **Differences in `L_p`, `0 < p ≤ 1`**: if `‖f(· + k h)‖_{L_p(μ)} ≤ B` for `k ≤ r`, then +`‖Δ_h^r f‖_{L_p(μ)} ≤ 2^(r/p) B`. The `p`-th power of the quasi-norm is subadditive +(`MeasureTheory.eLpNorm_add_rpow_le_of_le_one`), `C(r, k)^p ≤ C(r, k)` and `∑_k C(r, k) = 2^r`. -/ +theorem eLpNorm_higherDiff_le_of_forall_of_le_one {f : ℝ → ℂ} {p : ℝ≥0∞} (hp0 : p ≠ 0) + (hp1 : p ≤ 1) {μ : Measure ℝ} {r : ℕ} {h : ℝ} {B : ℝ≥0∞} + (hB : ∀ k ∈ Finset.range (r + 1), eLpNorm (fun x => f (x + k * h)) p μ ≤ B) : + eLpNorm (higherDiff r h f) p μ ≤ 2 ^ ((r : ℝ) / p.toReal) * B := by + have hq : 0 < p.toReal := ENNReal.toReal_pos hp0 (ne_top_of_le_ne_top ENNReal.one_ne_top hp1) + have hq1 : p.toReal ≤ 1 := ENNReal.toReal_le_of_le_ofReal zero_le_one (by simpa using hp1) + have hterm : ∀ k ∈ Finset.range (r + 1), eLpNorm (((-1 : ℂ) ^ (r - k) * (r.choose k : ℂ)) • + fun x => f (x + k * h)) p μ ^ p.toReal ≤ (r.choose k : ℝ≥0∞) * B ^ p.toReal := by + intro k hk + have h1 : (1 : ℝ≥0∞) ≤ r.choose k := by + exact_mod_cast Nat.choose_pos (Nat.lt_succ_iff.1 (Finset.mem_range.1 hk)) + have hc : (r.choose k : ℝ≥0∞) ^ p.toReal ≤ r.choose k := + (ENNReal.rpow_le_rpow_of_exponent_le h1 hq1).trans_eq (ENNReal.rpow_one _) + rw [eLpNorm_const_smul, enorm_higherDiff_coeff, ENNReal.mul_rpow_of_nonneg _ _ hq.le] + exact mul_le_mul' hc (ENNReal.rpow_le_rpow (hB k hk) hq.le) + have hpow : eLpNorm (higherDiff r h f) p μ ^ p.toReal ≤ + (2 ^ ((r : ℝ) / p.toReal) * B) ^ p.toReal := by + rw [higherDiff_eq_sum_smul, ENNReal.mul_rpow_of_nonneg _ _ hq.le, ← ENNReal.rpow_mul, + div_mul_cancel₀ _ hq.ne', ENNReal.rpow_natCast] + refine (Finset.le_sum_of_subadditive (fun g : ℝ → ℂ => eLpNorm g p μ ^ p.toReal) + (by simp [ENNReal.zero_rpow_of_pos hq]) + (fun g g' => eLpNorm_add_rpow_le_of_le_one hp0 hp1 g g') _ _).trans ?_ + refine (Finset.sum_le_sum hterm).trans_eq ?_ + rw [← Finset.sum_mul, ← Nat.cast_sum, Nat.sum_range_choose] + push_cast + rfl + exact (ENNReal.rpow_le_rpow_iff hq).1 hpow + +/-- **Translates on a shorter interval**: for `h ≥ 0` and `k ≤ r`, +`‖f(· + k h)‖_{L_p[a, b - rh]} ≤ ‖f‖_{L_p[a, b]}`, since `[a, b - rh] + kh ⊆ [a, b]`. -/ +theorem eLpNorm_comp_add_mul_le {f : ℝ → ℂ} (hf : Measurable f) (p : ℝ≥0∞) {k r : ℕ} + (hkr : k ≤ r) {h : ℝ} (hh : 0 ≤ h) (a b : ℝ) : + eLpNorm (fun x => f (x + k * h)) p (volume.restrict (Icc a (b - r * h))) ≤ + eLpNorm f p (volume.restrict (Icc a b)) := by + have hkr' : (k : ℝ) ≤ r := by exact_mod_cast hkr + rw [eLpNorm_comp_add_Icc hf] + exact eLpNorm_Icc_mono f p (by nlinarith) (by nlinarith [mul_le_mul_of_nonneg_right hkr' hh]) + +/-- **`‖Δ_h^r f‖_{L_p[a, b - rh]} ≤ 2^r ‖f‖_{L_p[a,b]}`** for `h ≥ 0`. -/ +theorem eLpNorm_higherDiff_le {f : ℝ → ℂ} (hf : Measurable f) {p : ℝ≥0∞} (hp : 1 ≤ p) (r : ℕ) + {h : ℝ} (hh : 0 ≤ h) (a b : ℝ) : + eLpNorm (higherDiff r h f) p (volume.restrict (Icc a (b - r * h))) ≤ + 2 ^ r * eLpNorm f p (volume.restrict (Icc a b)) := + eLpNorm_higherDiff_le_of_forall hp fun _ hk => + eLpNorm_comp_add_mul_le hf p (Nat.lt_succ_iff.1 (Finset.mem_range.1 hk)) hh a b + +/-- **Differences in `L_p`, `p ≤ 1`, on an interval**: for measurable `f` and `h ≥ 0`, +`‖Δ_h^r f‖_{L_p[a, b - rh]} ≤ 2^(r/p) ‖f‖_{L_p[a, b]}`; at `p = 0` the left side is `0`. -/ +theorem eLpNorm_higherDiff_le_of_le_one {f : ℝ → ℂ} (hf : Measurable f) {p : ℝ≥0∞} (hp1 : p ≤ 1) + (r : ℕ) {h : ℝ} (hh : 0 ≤ h) (a b : ℝ) : + eLpNorm (higherDiff r h f) p (volume.restrict (Icc a (b - r * h))) ≤ + 2 ^ ((r : ℝ) / p.toReal) * eLpNorm f p (volume.restrict (Icc a b)) := by + rcases eq_or_ne p 0 with rfl | hp0 + · simp [eLpNorm_exponent_zero (measurable_higherDiff hf r h).aestronglyMeasurable] + exact eLpNorm_higherDiff_le_of_forall_of_le_one hp0 hp1 fun _ hk => + eLpNorm_comp_add_mul_le hf p (Nat.lt_succ_iff.1 (Finset.mem_range.1 hk)) hh a b + +/-- For `h ≥ 0`, the points `x` with `x, x + h, …, x + rh ∈ [a, b]` form `[a, b - rh]`. -/ +theorem stepSet_Icc_of_nonneg (r : ℕ) {h : ℝ} (hh : 0 ≤ h) (a b : ℝ) : + Rd.stepSet (Icc a b) r h = Icc a (b - r * h) := by + ext x + simp only [Rd.stepSet, mem_ofPred_eq, mem_Icc, smul_eq_mul] + constructor + · intro hx + exact ⟨by simpa using (hx 0 (Nat.zero_le r)).1, by linarith [(hx r le_rfl).2]⟩ + · rintro ⟨hax, hxb⟩ l hl + have hl' : (l : ℝ) * h ≤ r * h := mul_le_mul_of_nonneg_right (by exact_mod_cast hl) hh + exact ⟨by linarith [mul_nonneg (Nat.cast_nonneg l) hh], by linarith⟩ + +/-- For `h ≥ 0`, the restricted difference on `[a, b]` has the norm of `Δ_h^r f` on +`[a, b - rh]`. -/ +theorem eLpNorm_indicator_stepSet_Icc (r : ℕ) {h : ℝ} (hh : 0 ≤ h) (p : ℝ≥0∞) (a b : ℝ) + (f : ℝ → ℂ) : + eLpNorm ((Rd.stepSet (Icc a b) r h).indicator ((fwdDiff h)^[r] f)) p volume = + eLpNorm (higherDiff r h f) p (volume.restrict (Icc a (b - r * h))) := by + rw [stepSet_Icc_of_nonneg r hh, + eLpNorm_indicator_eq_eLpNorm_restrict measurableSet_Icc.nullMeasurableSet] + rfl + +/-- The **modulus of smoothness of order `r`** on `[a, b]` in `L_p`, the modulus on the set +`[a, b]` (`Rd.modulusOn`): `ω_r(f, t, [a, b])_p = sup_{|h| ≤ t} ‖Δ_h^r(f, ·, [a, b])‖_p`, with the +differences taken at the points `x` with `x, x + h, …, x + r h ∈ [a, b]`. -/ +noncomputable def modulus (r : ℕ) (p : ℝ≥0∞) (a b : ℝ) (f : ℝ → ℂ) (t : ℝ) : ℝ≥0∞ := + Rd.modulusOn volume (Icc a b) r p f t + +/-- `‖Δ_h^r f‖_{L_p[a, b - rh]} ≤ ω_r(f, t)` for `0 ≤ h ≤ t`. -/ +theorem eLpNorm_higherDiff_le_modulus {r : ℕ} {p : ℝ≥0∞} {a b : ℝ} {f : ℝ → ℂ} {t h : ℝ} + (hh : h ∈ Icc 0 t) : + eLpNorm (higherDiff r h f) p (volume.restrict (Icc a (b - r * h))) ≤ modulus r p a b f t := by + rw [← eLpNorm_indicator_stepSet_Icc r hh.1] + exact Rd.eLpNorm_indicator_higherDiff_le_modulusOn (by rw [Real.norm_of_nonneg hh.1]; exact hh.2) + +/-- **The modulus on an interval through steps `h ≥ 0`**: +`ω_r(f, t, [a, b])_p = sup_{0 ≤ h ≤ t} ‖Δ_h^r f‖_{L_p[a, b - rh]}`, since the step `-h` gives the +norm of the step `h` (`Rd.eLpNorm_indicator_stepSet_neg`). -/ +theorem modulus_eq_iSup_nonneg (r : ℕ) (p : ℝ≥0∞) (a b : ℝ) (f : ℝ → ℂ) (t : ℝ) : + modulus r p a b f t = ⨆ (h : ℝ) (_ : h ∈ Icc 0 t), + eLpNorm (higherDiff r h f) p (volume.restrict (Icc a (b - r * h))) := by + refine le_antisymm (iSup₂_le fun h hh => ?_) + (iSup₂_le fun h hh => eLpNorm_higherDiff_le_modulus hh) + rcases le_or_gt 0 h with h0 | h0 + · rw [eLpNorm_indicator_stepSet_Icc r h0] + exact le_iSup₂_of_le h ⟨h0, by rwa [Real.norm_of_nonneg h0] at hh⟩ le_rfl + · obtain ⟨s, rfl⟩ : ∃ s, h = -s := ⟨-h, (neg_neg h).symm⟩ + have hs : 0 ≤ s := by linarith + rw [Rd.eLpNorm_indicator_stepSet_neg, eLpNorm_indicator_stepSet_Icc r hs] + exact le_iSup₂_of_le s ⟨hs, by rwa [norm_neg, Real.norm_of_nonneg hs] at hh⟩ le_rfl + +/-- The modulus increases in `t`. -/ +theorem modulus_mono (r : ℕ) (p : ℝ≥0∞) (a b : ℝ) (f : ℝ → ℂ) : Monotone (modulus r p a b f) := + Rd.modulusOn_mono _ r p f + +/-- `ω_r(f, t) ≤ 2^r ‖f‖_{L_p[a,b]}`. -/ +theorem modulus_le {f : ℝ → ℂ} (hf : Measurable f) {p : ℝ≥0∞} (hp : 1 ≤ p) (r : ℕ) (a b t : ℝ) : + modulus r p a b f t ≤ 2 ^ r * eLpNorm f p (volume.restrict (Icc a b)) := by + rw [modulus_eq_iSup_nonneg] + exact iSup₂_le fun _ hh => eLpNorm_higherDiff_le hf hp r hh.1 a b + +/-- **The modulus is bounded by the quasi-norm for `0 < p ≤ 1`**: +`ω_r(f, t, [a, b])_p ≤ 2^(r/p) ‖f‖_{L_p[a, b]}`. -/ +theorem modulus_le_of_le_one {f : ℝ → ℂ} (hf : Measurable f) {p : ℝ≥0∞} (hp1 : p ≤ 1) (r : ℕ) + (a b t : ℝ) : + modulus r p a b f t ≤ 2 ^ ((r : ℝ) / p.toReal) * eLpNorm f p (volume.restrict (Icc a b)) := by + rw [modulus_eq_iSup_nonneg] + exact iSup₂_le fun _ hh => eLpNorm_higherDiff_le_of_le_one hf hp1 r hh.1 a b + +/-- The modulus is subadditive. -/ +theorem modulus_add_le {p : ℝ≥0∞} (hp : 1 ≤ p) (r : ℕ) (a b : ℝ) (f g : ℝ → ℂ) (t : ℝ) : + modulus r p a b (f + g) t ≤ modulus r p a b f t + modulus r p a b g t := + Rd.modulusOn_add_le hp _ r f g t + +/-- **The `p`-th power of the modulus is subadditive for `0 < p ≤ 1`**: +`ω_r(f + g, t, [a, b])_p^p ≤ ω_r(f, t, [a, b])_p^p + ω_r(g, t, [a, b])_p^p`, from the same +inequality for the `L_p` quasi-norm of each difference +(`MeasureTheory.eLpNorm_add_rpow_le_of_le_one`). -/ +theorem modulus_add_rpow_le {p : ℝ≥0∞} (hp1 : p ≤ 1) (r : ℕ) (a b : ℝ) (f g : ℝ → ℂ) (t : ℝ) : + modulus r p a b (f + g) t ^ p.toReal ≤ + modulus r p a b f t ^ p.toReal + modulus r p a b g t ^ p.toReal := by + rcases eq_or_ne p 0 with rfl | hp0 + · simp only [ENNReal.toReal_zero, ENNReal.rpow_zero] + exact le_self_add + have hq : 0 < p.toReal := ENNReal.toReal_pos hp0 (ne_top_of_le_ne_top ENNReal.one_ne_top hp1) + set M := modulus r p a b f t ^ p.toReal + modulus r p a b g t ^ p.toReal + have key : modulus r p a b (f + g) t ≤ M ^ (1 / p.toReal) := by + refine iSup₂_le fun h hh => ?_ + rw [fwdDiff_iter_add, Set.indicator_add', ← ENNReal.rpow_le_rpow_iff hq, ← ENNReal.rpow_mul, + one_div_mul_cancel hq.ne', ENNReal.rpow_one] + exact (eLpNorm_add_rpow_le_of_le_one hp0 hp1 _ _).trans (add_le_add + (ENNReal.rpow_le_rpow (Rd.eLpNorm_indicator_higherDiff_le_modulusOn hh) hq.le) + (ENNReal.rpow_le_rpow (Rd.eLpNorm_indicator_higherDiff_le_modulusOn hh) hq.le)) + calc modulus r p a b (f + g) t ^ p.toReal ≤ (M ^ (1 / p.toReal)) ^ p.toReal := + ENNReal.rpow_le_rpow key hq.le + _ = M := by rw [← ENNReal.rpow_mul, one_div_mul_cancel hq.ne', ENNReal.rpow_one] + +/-- The modulus is homogeneous. -/ +theorem modulus_const_mul (r : ℕ) (p : ℝ≥0∞) (a b : ℝ) (c : ℂ) (f : ℝ → ℂ) (t : ℝ) : + modulus r p a b (fun x => c * f x) t = ‖c‖ₑ * modulus r p a b f t := by + simp only [modulus_eq_iSup_nonneg, higherDiff_const_mul, ENNReal.mul_iSup] + congr 1 + funext h + congr 1 + funext _ + exact eLpNorm_const_smul c (higherDiff r h f) p _ + +/-- The modulus vanishes on polynomials of degree `< r`. -/ +theorem modulus_polynomial {r : ℕ} {P : Polynomial ℂ} (hP : P ∈ Polynomial.degreeLT ℂ r) + (p : ℝ≥0∞) (a b t : ℝ) : modulus r p a b (fun x => P.eval (x : ℂ)) t = 0 := by + simp [modulus_eq_iSup_nonneg, higherDiff_polynomial hP] + +/-- **The line has vanishing second modulus**: `ω_2(x ↦ x, t, [0, 1])_p = 0` for every `p` and +`t` (`Interval.modulus_polynomial` with `P = X`, of degree `1 < 2`). -/ +theorem modulus_two_id (p : ℝ≥0∞) (t : ℝ) : modulus 2 p 0 1 (fun x => (x : ℂ)) t = 0 := by + simpa using modulus_polynomial (P := Polynomial.X) + (Polynomial.mem_degreeLT.2 (Polynomial.degree_X_le.trans_lt (by exact_mod_cast one_lt_two))) + p 0 1 t + +/-- **Differences depend only on the class in `L_p[a, b]`**: for `h ≥ 0`, functions that agree +almost everywhere on `[a, b]` have differences of step `h` with the same `L_p` norm on +`[a, b - rh]`: the norm is that of `Δ_h^r (1_{[a,b]} f)` on the step set +(`Interval.eLpNorm_indicator_stepSet_Icc`, `Rd.indicator_stepSet_higherDiff_indicator`), and the +differences of `1_{[a,b]} f = 1_{[a,b]} g` agree almost everywhere (`Rd.higherDiff_congr_ae`). -/ +theorem eLpNorm_higherDiff_congr_ae {f g : ℝ → ℂ} {a b : ℝ} + (hfg : f =ᵐ[volume.restrict (Icc a b)] g) (r : ℕ) (p : ℝ≥0∞) {h : ℝ} (hh : 0 ≤ h) : + eLpNorm (higherDiff r h f) p (volume.restrict (Icc a (b - r * h))) = + eLpNorm (higherDiff r h g) p (volume.restrict (Icc a (b - r * h))) := by + rw [← eLpNorm_indicator_stepSet_Icc r hh p a b f, ← eLpNorm_indicator_stepSet_Icc r hh p a b g, + ← Rd.indicator_stepSet_higherDiff_indicator (Icc a b) r h f, + ← Rd.indicator_stepSet_higherDiff_indicator (Icc a b) r h g] + rw [ae_eq_restrict_iff_indicator_ae_eq measurableSet_Icc] at hfg + refine eLpNorm_congr_ae ?_ + filter_upwards [Rd.higherDiff_congr_ae hfg r h] with x hx + by_cases hxU : x ∈ Rd.stepSet (Icc a b) r h + · rw [Set.indicator_of_mem hxU, Set.indicator_of_mem hxU, hx] + · rw [Set.indicator_of_notMem hxU, Set.indicator_of_notMem hxU] + +/-- **The modulus depends only on the class in `L_p[a, b]`**: functions that agree almost +everywhere on `[a, b]` have the same modulus. -/ +theorem modulus_congr_ae {f g : ℝ → ℂ} {a b : ℝ} (hfg : f =ᵐ[volume.restrict (Icc a b)] g) + (r : ℕ) (p : ℝ≥0∞) (t : ℝ) : + modulus r p a b f t = modulus r p a b g t := by + rw [ae_eq_restrict_iff_indicator_ae_eq measurableSet_Icc] at hfg + exact Rd.modulusOn_congr_ae hfg r p t + +/-- **Reflection of a difference**: +`‖Δ_h^r f(a + b - ·)‖_{L_p[a, b - rh]} = ‖Δ_h^r f‖_{L_p[a, b - rh]}`, since +`Δ_h^r f(a + b - ·)(x) = (-1)^r Δ_h^r f(a + b - rh - x)`. -/ +theorem eLpNorm_higherDiff_reflect {f : ℝ → ℂ} (hf : Measurable f) (r : ℕ) (p : ℝ≥0∞) + (a b h : ℝ) : + eLpNorm (higherDiff r h fun x => f (a + b - x)) p (volume.restrict (Icc a (b - r * h))) = + eLpNorm (higherDiff r h f) p (volume.restrict (Icc a (b - r * h))) := by + have hfun : higherDiff r h (fun x => f (a + b - x)) = + fun x => (-1 : ℂ) ^ r * higherDiff r h f (a + b - r * h - x) := by + funext x + rw [higherDiff_reflect] + congr 2 + ring + rw [hfun, show (fun x => (-1 : ℂ) ^ r * higherDiff r h f (a + b - r * h - x)) = + ((-1 : ℂ) ^ r) • fun x => higherDiff r h f (a + b - r * h - x) from rfl, eLpNorm_const_smul, + eLpNorm_comp_sub_Icc (measurable_higherDiff hf r h)] + simp only [eNorm_pow, eNorm_neg, eNorm_one, one_pow, one_mul] + congr 3 <;> ring + +/-- **Reflection**: `ω_r(f(a + b - ·), t, [a, b]) = ω_r(f, t, [a, b])`. -/ +theorem modulus_reflect {f : ℝ → ℂ} (hf : Measurable f) (r : ℕ) (p : ℝ≥0∞) (a b t : ℝ) : + modulus r p a b (fun x => f (a + b - x)) t = modulus r p a b f t := by + simp only [modulus_eq_iSup_nonneg] + congr 1 + funext h + congr 1 + funext _ + exact eLpNorm_higherDiff_reflect hf r p a b h + +end Interval diff --git a/LeanPool/FunctionSpaces/Domains/Interval/Periodic.lean b/LeanPool/FunctionSpaces/Domains/Interval/Periodic.lean new file mode 100644 index 0000000000..7bb736a3a3 --- /dev/null +++ b/LeanPool/FunctionSpaces/Domains/Interval/Periodic.lean @@ -0,0 +1,226 @@ +/- +Copyright (c) 2026 Mario Ullrich. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Mario Ullrich +-/ +module + +public import LeanPool.FunctionSpaces.Domains.Interval.Modulus +public import Mathlib.MeasureTheory.Integral.IntervalIntegral.Periodic +public import Mathlib.MeasureTheory.Function.Floor + +/- +Modified for Lean Pool: module names and imports adapted. +-/ + +/-! +# Periodic functions and the periodic modulus of smoothness + +A function `f` on `[0, 1)` extends to the `1`-periodic function `f̃(x) = f(x - ⌊x⌋)` +(`Interval.perExt`). This identifies functions on the circle `𝕋 = ℝ/ℤ` with functions on +`[0, 1)`, and `L_p(𝕋)` with `L_p[0, 1]`; working with `f̃` keeps everything on the real line. + +The **periodic modulus of smoothness** +`ω_r^per(f, t)_p = sup_{0 ≤ h ≤ t} ‖Δ_h^r f̃‖_{L_p[0, 1]}` (`Interval.perModulus`) +differs from the modulus on `[0, 1]` in that its differences wrap around and compare values near +`1` with values near `0`. It depends only on the class of `f` in `L_p[0, 1]` +(`Interval.perModulus_congr_ae`), since `f̃` changes only on the integer translates of a null set +(`Interval.perExt_ae_eq`), and it dominates the modulus on the interval +(`Interval.modulus_le_perModulus`). The `L_p` norm of a periodic function over a unit interval +does not depend on the interval (`Interval.lintegral_Icc_periodic`), from Mathlib's integration +over the circle (`UnitAddCircle.lintegral_preimage`). +-/ + +@[expose] public section + +open MeasureTheory Set +open Rd (higherDiff measurable_higherDiff) +open scoped ENNReal + +namespace Interval + +/-- The **periodic extension** `f̃(x) = f(x - ⌊x⌋)` of a function `f` on `[0, 1)`. -/ +noncomputable def perExt (f : ℝ → ℂ) (x : ℝ) : ℂ := f (Int.fract x) + +/-- The periodic extension has period `1`. -/ +theorem perExt_periodic (f : ℝ → ℂ) : Function.Periodic (perExt f) 1 := fun x => by + simp [perExt] + +/-- The periodic extension agrees with `f` on `[0, 1)`. -/ +theorem perExt_of_mem (f : ℝ → ℂ) {x : ℝ} (hx : x ∈ Ico (0 : ℝ) 1) : perExt f x = f x := by + rw [perExt, Int.fract_eq_self.2 hx] + +/-- The periodic extension of a measurable function is measurable. -/ +theorem measurable_perExt {f : ℝ → ℂ} (hf : Measurable f) : Measurable (perExt f) := + hf.comp measurable_fract + +/-- The periodic extension is additive. -/ +theorem perExt_add (f g : ℝ → ℂ) : perExt (f + g) = perExt f + perExt g := rfl + +/-- A `1`-periodic function is its own periodic extension. -/ +theorem perExt_eq_of_periodic {f : ℝ → ℂ} (hf : Function.Periodic f 1) : perExt f = f := by + funext x + rw [perExt, ← Int.self_sub_floor, ← mul_one ((⌊x⌋ : ℤ) : ℝ), hf.sub_int_mul_eq] + +/-- The differences of a `1`-periodic function are `1`-periodic. -/ +theorem higherDiff_periodic {f : ℝ → ℂ} (hf : Function.Periodic f 1) (r : ℕ) (h : ℝ) : + Function.Periodic (higherDiff r h f) 1 := fun x => by + rw [higherDiff_apply, higherDiff_apply] + refine Finset.sum_congr rfl fun k _ => ?_ + rw [show x + 1 + k * h = x + k * h + 1 by ring, hf] + +/-- **Periodic extensions of almost equal functions**: if `f = g` almost everywhere on `[0, 1]`, +then `f̃ = g̃` almost everywhere on `ℝ`, since `{f̃ ≠ g̃}` is the union of the integer translates +of `{f ≠ g} ∩ [0, 1)`. -/ +theorem perExt_ae_eq {f g : ℝ → ℂ} (hfg : f =ᵐ[volume.restrict (Icc 0 1)] g) : + perExt f =ᵐ[volume] perExt g := by + have h1 : ∀ᵐ x ∂volume.restrict (Ico (0 : ℝ) 1), f x = g x := + ae_restrict_of_ae_restrict_of_subset Ico_subset_Icc_self hfg + rw [ae_restrict_iff' measurableSet_Ico, ae_iff] at h1 + rw [Filter.EventuallyEq, ae_iff] + refine measure_mono_null (t := ⋃ n : ℤ, + (fun x => x + (-(n : ℝ))) ⁻¹' {x | ¬(x ∈ Ico (0 : ℝ) 1 → f x = g x)}) ?_ + (measure_iUnion_null fun n => by rw [measure_preimage_add_right]; exact h1) + intro x hx + refine mem_iUnion.2 ⟨⌊x⌋, ?_⟩ + simp only [mem_preimage, mem_ofPred_eq, ← sub_eq_add_neg, Int.self_sub_floor] + exact fun h => hx (h ⟨Int.fract_nonneg x, Int.fract_lt_one x⟩) + +/-- Differences of periodic extensions of almost equal functions agree almost everywhere. -/ +theorem higherDiff_perExt_ae_eq {f g : ℝ → ℂ} (hfg : f =ᵐ[volume.restrict (Icc 0 1)] g) + (r : ℕ) (h : ℝ) : higherDiff r h (perExt f) =ᵐ[volume] higherDiff r h (perExt g) := + Rd.higherDiff_congr_ae (perExt_ae_eq hfg) r h + +/-- **Integrals of periodic functions over unit intervals**: for `1`-periodic `G`, +`∫_{[c, c + 1]} G = ∫_{[0, 1]} G`, both being the integral over the circle. -/ +theorem lintegral_Icc_periodic {G : ℝ → ℝ≥0∞} (hG : Function.Periodic G 1) (c : ℝ) : + ∫⁻ x in Icc c (c + 1), G x = ∫⁻ x in Icc 0 1, G x := by + have key : ∀ t : ℝ, ∫⁻ x in Icc t (t + 1), G x = ∫⁻ y : UnitAddCircle, hG.lift y := fun t => by + rw [← setLIntegral_congr Ioc_ae_eq_Icc, ← UnitAddCircle.lintegral_preimage t] + simp only [Function.Periodic.lift_coe] + rw [key c, ← key 0, zero_add] + +/-- **Integrals of periodic functions over `n` periods**: `∫_{[0, n]} G ≤ n ∫_{[0, 1]} G` for +`1`-periodic `G`, since `[0, n]` is covered by the unit intervals `[i, i + 1]`, `i < n`. -/ +theorem lintegral_Icc_nat_le {G : ℝ → ℝ≥0∞} (hG : Function.Periodic G 1) (n : ℕ) : + ∫⁻ x in Icc 0 (n : ℝ), G x ≤ n * ∫⁻ x in Icc 0 1, G x := by + induction n with + | zero => simp + | succ n ih => + have hsub : Icc (0 : ℝ) ((n + 1 : ℕ) : ℝ) ⊆ Icc 0 (n : ℝ) ∪ Icc (n : ℝ) (n + 1) := by + intro x hx + push_cast at hx + rcases le_or_gt x n with h | h + · exact Or.inl ⟨hx.1, h⟩ + · exact Or.inr ⟨h.le, hx.2⟩ + calc ∫⁻ x in Icc 0 ((n + 1 : ℕ) : ℝ), G x + ≤ ∫⁻ x in Icc 0 (n : ℝ) ∪ Icc (n : ℝ) (n + 1), G x := lintegral_mono_set hsub + _ ≤ (∫⁻ x in Icc 0 (n : ℝ), G x) + ∫⁻ x in Icc (n : ℝ) (n + 1), G x := + lintegral_union_le _ _ _ + _ ≤ n * (∫⁻ x in Icc 0 1, G x) + ∫⁻ x in Icc 0 1, G x := + add_le_add ih (le_of_eq (lintegral_Icc_periodic hG n)) + _ = ((n + 1 : ℕ) : ℝ≥0∞) * ∫⁻ x in Icc 0 1, G x := by push_cast; ring + +/-- The **periodic modulus of smoothness** +`ω_r^per(f, t)_p = sup_{0 ≤ h ≤ t} ‖Δ_h^r f̃‖_{L_p[0, 1]}` of the periodic extension `f̃`. -/ +noncomputable def perModulus (r : ℕ) (p : ℝ≥0∞) (f : ℝ → ℂ) (t : ℝ) : ℝ≥0∞ := + ⨆ (h : ℝ) (_ : h ∈ Icc 0 t), eLpNorm (higherDiff r h (perExt f)) p (volume.restrict (Icc 0 1)) + +/-- `‖Δ_h^r f̃‖_{L_p[0, 1]} ≤ ω_r^per(f, t)` for `0 ≤ h ≤ t`. -/ +theorem eLpNorm_higherDiff_le_perModulus {r : ℕ} {p : ℝ≥0∞} {f : ℝ → ℂ} {t h : ℝ} + (hh : h ∈ Icc 0 t) : + eLpNorm (higherDiff r h (perExt f)) p (volume.restrict (Icc 0 1)) ≤ perModulus r p f t := + le_iSup₂ (f := fun (h : ℝ) (_ : h ∈ Icc 0 t) => + eLpNorm (higherDiff r h (perExt f)) p (volume.restrict (Icc 0 1))) h hh + +/-- The periodic modulus increases in `t`. -/ +theorem perModulus_mono (r : ℕ) (p : ℝ≥0∞) (f : ℝ → ℂ) : Monotone (perModulus r p f) := + fun _ _ hst => iSup₂_le fun _ hh => eLpNorm_higherDiff_le_perModulus ⟨hh.1, hh.2.trans hst⟩ + +/-- **The periodic modulus depends only on the class in `L_p[0, 1]`.** -/ +theorem perModulus_congr_ae {f g : ℝ → ℂ} (hfg : f =ᵐ[volume.restrict (Icc 0 1)] g) (r : ℕ) + (p : ℝ≥0∞) (t : ℝ) : perModulus r p f t = perModulus r p g t := by + simp only [perModulus] + congr 1 + funext h + congr 1 + funext _ + exact eLpNorm_congr_ae (ae_restrict_of_ae (higherDiff_perExt_ae_eq hfg r h)) + +/-- The periodic modulus is subadditive. -/ +theorem perModulus_add_le {p : ℝ≥0∞} (hp : 1 ≤ p) (r : ℕ) (f g : ℝ → ℂ) (t : ℝ) : + perModulus r p (f + g) t ≤ perModulus r p f t + perModulus r p g t := by + refine iSup₂_le fun h hh => ?_ + rw [perExt_add, higherDiff_add] + exact (eLpNorm_add_le hp).trans + (add_le_add (eLpNorm_higherDiff_le_perModulus hh) (eLpNorm_higherDiff_le_perModulus hh)) + +/-- The `L_p` norm of the periodic extension over a unit interval `[c, c + 1]` is the `L_p` norm +of `f` on `[0, 1]`. -/ +theorem eLpNorm_perExt_Icc {f : ℝ → ℂ} (hf : Measurable f) {p : ℝ≥0∞} (hp0 : p ≠ 0) + (hp : p ≠ ∞) (c : ℝ) : + eLpNorm (perExt f) p (volume.restrict (Icc c (c + 1))) = + eLpNorm f p (volume.restrict (Icc 0 1)) := by + have hm := measurable_perExt hf + rw [eLpNorm_eq_lintegral_rpow_eNorm_toReal hp0 hp hm.aestronglyMeasurable, + eLpNorm_eq_lintegral_rpow_eNorm_toReal hp0 hp hf.aestronglyMeasurable] + congr 1 + rw [lintegral_Icc_periodic (G := fun x => ‖perExt f x‖ₑ ^ p.toReal) + (fun x => by simp only [perExt_periodic f x]) c] + rw [← setLIntegral_congr Ico_ae_eq_Icc, ← setLIntegral_congr Ico_ae_eq_Icc] + exact setLIntegral_congr_fun measurableSet_Ico fun x hx => by rw [perExt_of_mem f hx] + +/-- `ω_r^per(f, t)_p ≤ 2^r ‖f‖_{L_p[0, 1]}`. -/ +theorem perModulus_le {f : ℝ → ℂ} (hf : Measurable f) {p : ℝ≥0∞} (hp : 1 ≤ p) (hp' : p ≠ ∞) + (r : ℕ) (t : ℝ) : perModulus r p f t ≤ 2 ^ r * eLpNorm f p (volume.restrict (Icc 0 1)) := by + have hp0 : p ≠ 0 := (lt_of_lt_of_le zero_lt_one hp).ne' + refine iSup₂_le fun h _ => eLpNorm_higherDiff_le_of_forall hp fun k _ => le_of_eq ?_ + rw [eLpNorm_comp_add_Icc (measurable_perExt hf), zero_add, add_comm (1 : ℝ), + eLpNorm_perExt_Icc hf hp0 hp'] + +/-- **The periodic modulus dominates the modulus on `[0, 1]`**: on `[0, 1 - rh)` the differences +of `f̃` and of `f` agree, since `x, …, x + rh` stay in `[0, 1)`. -/ +theorem modulus_le_perModulus (r : ℕ) (p : ℝ≥0∞) (f : ℝ → ℂ) (t : ℝ) : + modulus r p 0 1 f t ≤ perModulus r p f t := by + rw [modulus_eq_iSup_nonneg] + refine iSup₂_le fun h hh => ?_ + have hrh : (0 : ℝ) ≤ r * h := mul_nonneg (Nat.cast_nonneg r) hh.1 + have hae : higherDiff r h f =ᵐ[volume.restrict (Icc 0 (1 - r * h))] + higherDiff r h (perExt f) := by + rw [← Measure.restrict_congr_set Ico_ae_eq_Icc] + filter_upwards [ae_restrict_mem measurableSet_Ico] with x hx + rw [higherDiff_apply, higherDiff_apply] + refine Finset.sum_congr rfl fun i hi => ?_ + have hi' : (i : ℝ) ≤ r := by exact_mod_cast Nat.lt_succ_iff.1 (Finset.mem_range.1 hi) + have hih : (i : ℝ) * h ≤ r * h := mul_le_mul_of_nonneg_right hi' hh.1 + rw [perExt_of_mem f ⟨by nlinarith [hx.1, mul_nonneg (Nat.cast_nonneg i) hh.1], + by linarith [hx.2]⟩] + rw [eLpNorm_congr_ae hae] + exact (eLpNorm_Icc_mono _ p le_rfl (by linarith)).trans (eLpNorm_higherDiff_le_perModulus hh) + +/-- **The modulus of a periodic extension over `n` periods**: +`ω_r(f̃, t, [0, n])_p ≤ n^(1/p) ω_r^per(f, t)_p`, since `Δ_h^r f̃` is `1`-periodic +(`Interval.lintegral_Icc_nat_le`). -/ +theorem modulus_perExt_le {f : ℝ → ℂ} (hf : Measurable f) {p : ℝ≥0∞} (hp0 : p ≠ 0) + (hp : p ≠ ∞) (r n : ℕ) (t : ℝ) : + modulus r p 0 n (perExt f) t ≤ (n : ℝ≥0∞) ^ (1 / p.toReal) * perModulus r p f t := by + have hθ : (0 : ℝ) ≤ 1 / p.toReal := by positivity + rw [modulus_eq_iSup_nonneg] + refine iSup₂_le fun h hh => ?_ + have hm := measurable_higherDiff (measurable_perExt hf) r h + have hrh : (0 : ℝ) ≤ r * h := mul_nonneg (Nat.cast_nonneg r) hh.1 + have hper : Function.Periodic (fun x => ‖higherDiff r h (perExt f) x‖ₑ ^ p.toReal) 1 := + fun x => by simp only [higherDiff_periodic (perExt_periodic f) r h x] + calc eLpNorm (higherDiff r h (perExt f)) p (volume.restrict (Icc 0 (n - r * h))) + ≤ eLpNorm (higherDiff r h (perExt f)) p (volume.restrict (Icc 0 n)) := + eLpNorm_Icc_mono _ p le_rfl (by linarith) + _ ≤ (n : ℝ≥0∞) ^ (1 / p.toReal) * + eLpNorm (higherDiff r h (perExt f)) p (volume.restrict (Icc 0 1)) := by + rw [eLpNorm_eq_lintegral_rpow_eNorm_toReal hp0 hp hm.aestronglyMeasurable, + eLpNorm_eq_lintegral_rpow_eNorm_toReal hp0 hp hm.aestronglyMeasurable, + ← ENNReal.mul_rpow_of_nonneg _ _ hθ] + exact ENNReal.rpow_le_rpow (lintegral_Icc_nat_le hper n) hθ + _ ≤ (n : ℝ≥0∞) ^ (1 / p.toReal) * perModulus r p f t := + mul_le_mul' le_rfl (eLpNorm_higherDiff_le_perModulus hh) + +end Interval diff --git a/LeanPool/FunctionSpaces/Domains/Interval/PiecewiseInverse.lean b/LeanPool/FunctionSpaces/Domains/Interval/PiecewiseInverse.lean new file mode 100644 index 0000000000..1c13e6bac7 --- /dev/null +++ b/LeanPool/FunctionSpaces/Domains/Interval/PiecewiseInverse.lean @@ -0,0 +1,459 @@ +/- +Copyright (c) 2026 Mario Ullrich. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Mario Ullrich +-/ +module + +public import LeanPool.FunctionSpaces.Domains.Interval.PiecewiseJackson +public import LeanPool.FunctionSpaces.ApproximationSpaces.Moduli + +/- +Modified for Lean Pool: module names and imports adapted. +-/ + +/-! +# The inverse inequality for dyadic piecewise polynomials + +For a piecewise polynomial `a` of level `j` and degree `< r` and every `k`, +`ω_r(a, 2^(-k), [0, 1])_p ≤ C_B 2^(-(k-j)/p) ‖a‖_p`, with `k - j` truncated at `0` +(`Interval.exists_inverse_ppScheme`). For `0 ≤ h ≤ 2^(-k)` the difference `Δ_h^r a(x)` vanishes +when `x, …, x + rh` lie in one dyadic interval, since there `a` is a polynomial of degree `< r` +(`Interval.higherDiff_eq_zero_of_isPiecewisePoly`). The other points form strips of width `rh` +left of the knots. There Nikolskii's inequality bounds `|a|` by `2^(j/p)` times the local `L_p` +norm of a piece (`Interval.enorm_le_localMass`), and the points `x, …, x + rh` meet only `r + 1` +consecutive pieces (`Interval.floor_add_mul_le`), so each piece is counted at most `r + 1` times +(`Interval.sum_sum_localMass_le`). The same pointwise bound holds for differences of every order +`m ≤ r` (`Interval.enorm_higherDiff_le_of_isPiecewisePoly_of_le`). The strip integral +(`Interval.eLpNorm_le_of_strip`) turns a pointwise bound on the strips into the `L_p` bound +(`Interval.eLpNorm_higherDiff_le_of_pointwise`); +the splines of `FunctionSpaces.Domains.Interval.SplineInverse` use it with their own pointwise +bound, and the step functions in `L_p`, `0 < p ≤ 1`, of +`FunctionSpaces.Wavelets.Examples.DyadicStepsQuasiBanach` with theirs: the strip integral holds +for every `0 < p < ∞`. These local estimates hold for every piecewise polynomial on `[0, ∞)` +(`Interval.IsPiecewisePoly`, `Interval.eLpNorm_higherDiff_le_of_isPiecewisePoly`), so they serve +the periodic extensions of `FunctionSpaces.Domains.Interval.PiecewisePeriodic` as well. + +With Jackson's inequality at every level (`Interval.exists_approxError_ppScheme_le`) this is a +modulus compatible with the scheme, of inverse order `θ = 1/p` (`Interval.ppModulusData`), and the +abstract coincidence theorem gives, for +`1 ≤ p < ∞`, `1 ≤ q ≤ ∞`, `r ≥ 1` and `0 ≤ s < 1/p`, +`f ∈ A^s_q ↔ ‖f‖_p + ‖(2^(ks) ω_r(f, 2^(-k), [0, 1])_p)_k‖_{ℓ_q} < ∞` +(`Interval.memApprox_ppScheme_iff`). For `0 < s < 1/p` the approximation space of dyadic +piecewise polynomials is therefore the Besov space `B^s_{p,q}[0, 1]` defined by moduli of +smoothness. The bound `s < 1/p` belongs to the method: the indicator of `[0, 1/2)` is a piecewise +polynomial of level `1` with `ω_r(·, t)_p` of order `t^(1/p)`. Higher smoothness needs +piecewise polynomials that are smooth across the knots, that is, splines. +-/ + +@[expose] public section + +open MeasureTheory Set Polynomial +open Rd (higherDiff measurable_higherDiff) +open scoped ENNReal BoundedContinuousFunction +open ENNReal (dyadicWeight) + +namespace Interval + +variable {p : ℝ≥0∞} [Fact (1 ≤ p)] + +variable (p) in +/-- The **local mass** `∫_{I_{k,m}} |u|^p` of `u` on the dyadic interval `I_{k,m}`. -/ +noncomputable def localMass (k : ℕ) (u : ℝ → ℂ) (m : ℕ) : ℝ≥0∞ := + ∫⁻ x in dyadicIco k m, ‖u x‖ₑ ^ p.toReal + +/-- The local masses of a piecewise polynomial add up to at most `‖u‖_p^p`. -/ +theorem tsum_localMass_ppFun_le (hp : p ≠ ∞) (k : ℕ) (Q : ℕ → ℂ[X]) : + ∑' m, localMass p k (ppFun k Q) m ≤ eLpNorm (ppFun k Q) p unitVol ^ p.toReal := by + have hp0 : p ≠ 0 := (lt_of_lt_of_le zero_lt_one (Fact.out : 1 ≤ p)).ne' + have hq : 0 < p.toReal := ENNReal.toReal_pos hp0 hp + rw [eLpNorm_rpow_eq (measurable_ppFun k Q).aestronglyMeasurable hp0 hp] + unfold localMass + rw [← lintegral_iUnion (measurableSet_dyadicIco k) (pairwise_disjoint_dyadicIco k)] + refine (setLIntegral_le_lintegral _ _).trans_eq ?_ + refine (setLIntegral_eq_of_support_subset fun x hx => ?_).symm + by_contra hx' + refine hx ?_ + dsimp only + rw [ppFun_eq_zero Q (fun h => hx' (Ico_subset_Icc_self h)), eNorm_zero, + ENNReal.zero_rpow_of_pos hq] + +/-- `u` is a **piecewise polynomial of level `k` and degree `< r` on `[0, ∞)`**: on every dyadic +interval `I_{k,m}`, `m ∈ ℕ`, it agrees with a polynomial of degree `< r`. The local estimates +below need only this, so they serve the piecewise polynomials on `[0, 1)` and their periodic +extensions alike. -/ +def IsPiecewisePoly (r k : ℕ) (u : ℝ → ℂ) : Prop := + ∀ m : ℕ, ∃ P ∈ degreeLT ℂ r, ∀ x ∈ dyadicIco k m, u x = polyFun P x + +/-- A piecewise polynomial on `[0, 1)`, extended by `0`, is a piecewise polynomial on +`[0, ∞)`. -/ +theorem isPiecewisePoly_ppFun {r : ℕ} {Q : ℕ → ℂ[X]} (hQ : ∀ n, Q n ∈ degreeLT ℂ r) (k : ℕ) : + IsPiecewisePoly r k (ppFun k Q) := fun m => + ⟨_, ite_mem_degreeLT hQ k m, fun _ hx => ppFun_eq_polyFun Q hx⟩ + +/-- **The norm of a piece is a local mass**: if `u = P` on `I_{k,m}`, then +`‖P‖_{L_p[m 2^(-k), (m + 1) 2^(-k)]} = (∫_{I_{k,m}} |u|^p)^(1/p)`. -/ +theorem eLpNorm_piece_eq_localMass (hp : p ≠ ∞) {k m : ℕ} {u : ℝ → ℂ} {P : ℂ[X]} + (hPu : ∀ x ∈ dyadicIco k m, u x = polyFun P x) : + eLpNorm (polyFun P) p (volume.restrict (Icc ((m : ℝ) / 2 ^ k) (m / 2 ^ k + 1 / 2 ^ k))) = + localMass p k u m ^ (1 / p.toReal) := by + have hp0 : p ≠ 0 := (lt_of_lt_of_le zero_lt_one (Fact.out : 1 ≤ p)).ne' + have hIco : dyadicIco k m = Ico ((m : ℝ) / 2 ^ k) (m / 2 ^ k + 1 / 2 ^ k) := by + rw [dyadicIco, add_div] + rw [eLpNorm_eq_lintegral_rpow_eNorm_toReal hp0 hp (measurable_polyFun _).aestronglyMeasurable, + localMass, hIco, ← setLIntegral_congr Ico_ae_eq_Icc] + congr 1 + refine setLIntegral_congr_fun (measurableSet_Ico : + MeasurableSet (Ico ((m : ℝ) / 2 ^ k) (m / 2 ^ k + 1 / 2 ^ k))) fun x hx => ?_ + have hx' : x ∈ dyadicIco k m := by rw [hIco]; exact hx + rw [hPu x hx'] + +/-- **Pointwise bound** for a piecewise polynomial by its local mass (Nikolskii's inequality on +`I_{k,m}`): `|u(y)| ≤ K 2^(k/p) (∫_{I_{k,m}} |u|^p)^(1/p)` for `y ∈ I_{k,m}`. -/ +theorem enorm_le_localMass {r k : ℕ} {u : ℝ → ℂ} (hu : IsPiecewisePoly r k u) {K : ℝ≥0∞} + (hK : NikolskiiBound p r K) (hp : p ≠ ∞) (m : ℕ) {y : ℝ} (hy : y ∈ dyadicIco k m) : + ‖u y‖ₑ ≤ K * ENNReal.ofReal (2 ^ k) ^ (1 / p.toReal) * localMass p k u m ^ (1 / p.toReal) := by + obtain ⟨P, hP, hPu⟩ := hu m + have hL : (0 : ℝ) < 1 / 2 ^ k := by positivity + have hIco : dyadicIco k m = Ico ((m : ℝ) / 2 ^ k) (m / 2 ^ k + 1 / 2 ^ k) := by + rw [dyadicIco, add_div] + have hy' : y ∈ Icc ((m : ℝ) / 2 ^ k) (m / 2 ^ k + 1 / 2 ^ k) := by + rw [hIco] at hy + exact Ico_subset_Icc_self hy + rw [hPu y hy] + have h := hK.enorm_le hP _ hL hy' + rwa [show (1 / (2 : ℝ) ^ k)⁻¹ = 2 ^ k by rw [one_div, inv_inv], + eLpNorm_piece_eq_localMass hp hPu] at h + +/-- **The points `x + i h` meet at most `r + 1` pieces**: for `x ≥ 0`, `h ≥ 0`, `2^j h ≤ 1` and +`i ≤ r`, `⌊2^j (x + i h)⌋ ≤ ⌊2^j x⌋ + r`. -/ +theorem floor_add_mul_le {j r i : ℕ} {x h : ℝ} (hx : 0 ≤ x) (hh0 : 0 ≤ h) + (hjh : (2 : ℝ) ^ j * h ≤ 1) (hi : i ≤ r) : ⌊2 ^ j * (x + i * h)⌋₊ ≤ ⌊2 ^ j * x⌋₊ + r := by + have hi' : (i : ℝ) ≤ r := by exact_mod_cast hi + have hle : 2 ^ j * (x + i * h) ≤ 2 ^ j * x + r := by + have : (2 : ℝ) ^ j * (i * h) ≤ r := + calc (2 : ℝ) ^ j * (i * h) = i * (2 ^ j * h) := by ring + _ ≤ r * 1 := mul_le_mul hi' hjh (by positivity) (Nat.cast_nonneg r) + _ = r := mul_one _ + linarith + calc ⌊2 ^ j * (x + i * h)⌋₊ ≤ ⌊2 ^ j * x + (r : ℝ)⌋₊ := Nat.floor_mono hle + _ = ⌊2 ^ j * x⌋₊ + r := Nat.floor_add_natCast (by positivity) r + +omit [Fact (1 ≤ p)] in +/-- One piece is counted in the local mass of `r + 1` consecutive pieces. -/ +theorem localMass_le_sum_range (k : ℕ) (u : ℝ → ℂ) (n : ℕ) {r l : ℕ} (hl : l ≤ r) : + localMass p k u (n + l) ≤ ∑ l' ∈ Finset.range (r + 1), localMass p k u (n + l') := + Finset.single_le_sum (f := fun l' => localMass p k u (n + l')) (fun _ _ => zero_le) + (Finset.mem_range.2 (Nat.lt_succ_of_le hl)) + +/-- **Inside a piece a difference sees only the piece**: for `h ≥ 0` and `x ≥ 0`: if `u` agrees +with `P` on the dyadic interval `I_{k,n}` of `x`, `n = ⌊2^k x⌋`, and `x + mh` lies left of its +right end, then +`Δ_h^m u(x) = Δ_h^m P(x)`, since `x, x + h, …, x + mh` lie in `I_{k,n}`. -/ +theorem higherDiff_eq_of_mem_piece {k m : ℕ} {u : ℝ → ℂ} {P : ℂ[X]} {h x : ℝ} + (hPu : ∀ y ∈ dyadicIco k ⌊2 ^ k * x⌋₊, u y = polyFun P y) (hh0 : 0 ≤ h) (hx : 0 ≤ x) + (hgood : x + m * h < ((⌊2 ^ k * x⌋₊ : ℝ) + 1) / 2 ^ k) : + higherDiff m h u x = higherDiff m h (polyFun P) x := by + have hpos : (0 : ℝ) < 2 ^ k := by positivity + have hfl : (⌊2 ^ k * x⌋₊ : ℝ) ≤ 2 ^ k * x := Nat.floor_le (by positivity) + rw [higherDiff_apply, higherDiff_apply] + refine Finset.sum_congr rfl fun i hi => ?_ + have hi' : (i : ℝ) ≤ m := by exact_mod_cast Nat.lt_succ_iff.1 (Finset.mem_range.1 hi) + have hmem : x + i * h ∈ dyadicIco k ⌊2 ^ k * x⌋₊ := by + rw [dyadicIco, mem_Ico] + constructor + · rw [div_le_iff₀ hpos] + nlinarith [mul_nonneg (Nat.cast_nonneg i) hh0] + · calc x + i * h ≤ x + m * h := by nlinarith + _ < _ := hgood + rw [hPu _ hmem] + +/-- **Differences vanish inside a piece**: if `x, x + h, …, x + rh` lie in the dyadic interval of +`x`, then `Δ_h^r u(x) = 0`, since there `u` is a polynomial of degree `< r`. -/ +theorem higherDiff_eq_zero_of_isPiecewisePoly {r k : ℕ} {u : ℝ → ℂ} (hu : IsPiecewisePoly r k u) + {h x : ℝ} (hh0 : 0 ≤ h) (hx : 0 ≤ x) + (hgood : x + r * h < ((⌊2 ^ k * x⌋₊ : ℝ) + 1) / 2 ^ k) : + higherDiff r h u x = 0 := by + obtain ⟨P, hP, hPu⟩ := hu ⌊2 ^ k * x⌋₊ + rw [higherDiff_eq_of_mem_piece hPu hh0 hx hgood] + exact congrFun (higherDiff_polynomial hP h) x + +/-- **Pointwise bound for differences of order `m ≤ r`**: for `0 ≤ h ≤ 2^(-k)` and `x ≥ 0`, +`|Δ_h^m u(x)| ≤ 2^m K 2^(k/p) (∑_{l ≤ r} M_{n+l})^(1/p)` with `n = ⌊2^k x⌋`, since +`x, …, x + mh` meet only the intervals `I_{k,n}, …, I_{k,n+r}`. -/ +theorem enorm_higherDiff_le_of_isPiecewisePoly_of_le {r k m : ℕ} (hmr : m ≤ r) {u : ℝ → ℂ} + (hu : IsPiecewisePoly r k u) {K : ℝ≥0∞} (hK : NikolskiiBound p r K) (hp : p ≠ ∞) {h x : ℝ} + (hh0 : 0 ≤ h) (hh : h ≤ 1 / 2 ^ k) (hx : 0 ≤ x) : + ‖higherDiff m h u x‖ₑ ≤ 2 ^ m * (K * ENNReal.ofReal (2 ^ k) ^ (1 / p.toReal) * + (∑ l ∈ Finset.range (r + 1), localMass p k u (⌊2 ^ k * x⌋₊ + l)) ^ (1 / p.toReal)) := by + have hkh : (2 : ℝ) ^ k * h ≤ 1 := by + rw [le_div_iff₀ (by positivity)] at hh + linarith + refine enorm_higherDiff_le_of_forall fun i hi => ?_ + have hi' : i ≤ r := (Nat.lt_succ_iff.1 (Finset.mem_range.1 hi)).trans hmr + have h0 : 0 ≤ 2 ^ k * (x + i * h) := by positivity + have hm : x + i * h ∈ dyadicIco k ⌊2 ^ k * (x + i * h)⌋₊ := + mem_dyadicIco.2 ⟨Nat.floor_le h0, Nat.lt_floor_add_one _⟩ + have hnm : ⌊2 ^ k * x⌋₊ ≤ ⌊2 ^ k * (x + i * h)⌋₊ := Nat.floor_mono + (mul_le_mul_of_nonneg_left (le_add_of_nonneg_right (mul_nonneg (Nat.cast_nonneg i) hh0)) + (by positivity)) + obtain ⟨d, hd⟩ := Nat.exists_eq_add_of_le hnm + have hdr : d ≤ r := by have := floor_add_mul_le hx hh0 hkh hi'; omega + refine (enorm_le_localMass hu hK hp _ hm).trans ?_ + gcongr + rw [hd] + exact localMass_le_sum_range k u _ hdr + +/-- **Pointwise bound for differences**: for `0 ≤ h ≤ 2^(-k)` and `x ≥ 0`, +`|Δ_h^r u(x)| ≤ 2^r K 2^(k/p) (∑_{l ≤ r} ∫_{I_{k,n+l}} |u|^p)^(1/p)` with `n = ⌊2^k x⌋`, since +`x, …, x + rh` meet only the intervals `I_{k,n}, …, I_{k,n+r}`. -/ +theorem enorm_higherDiff_le_of_isPiecewisePoly {r k : ℕ} {u : ℝ → ℂ} (hu : IsPiecewisePoly r k u) + {K : ℝ≥0∞} (hK : NikolskiiBound p r K) (hp : p ≠ ∞) {h x : ℝ} (hh0 : 0 ≤ h) + (hh : h ≤ 1 / 2 ^ k) (hx : 0 ≤ x) : + ‖higherDiff r h u x‖ₑ ≤ 2 ^ r * (K * ENNReal.ofReal (2 ^ k) ^ (1 / p.toReal) * + (∑ l ∈ Finset.range (r + 1), localMass p k u (⌊2 ^ k * x⌋₊ + l)) ^ (1 / p.toReal)) := + enorm_higherDiff_le_of_isPiecewisePoly_of_le le_rfl hu hK hp hh0 hh hx + +/-- The **strip function** of the inverse estimate: `c M_n` at the points `x` of the strip +`[(n + 1) 2^(-j) - rh, (n + 1) 2^(-j))` left of the right end of the dyadic interval +`I_{j,n}` containing `x`, and `0` elsewhere. -/ +noncomputable def stripBound (j r : ℕ) (h : ℝ) (c : ℝ≥0∞) (M : ℕ → ℝ≥0∞) (x : ℝ) : ℝ≥0∞ := + if ((⌊2 ^ j * x⌋₊ : ℝ) + 1) / 2 ^ j ≤ x + r * h then c * M ⌊2 ^ j * x⌋₊ else 0 + +/-- **Integral of the strip function**: the strips have width `rh`, so +`∫_{[0,1]} (strip function) ≤ c rh ∑_{n < 2^j} M_n`. -/ +theorem lintegral_stripBound_le (j r : ℕ) (h : ℝ) (c : ℝ≥0∞) (M : ℕ → ℝ≥0∞) : + ∫⁻ x in Icc (0 : ℝ) 1, stripBound j r h c M x ≤ + c * ENNReal.ofReal (r * h) * ∑ n ∈ Finset.range (2 ^ j), M n := by + refine (lintegral_Icc_le_sum_dyadicIco _ j).trans ?_ + rw [Finset.mul_sum] + refine Finset.sum_le_sum fun n _ => ?_ + calc ∫⁻ x in dyadicIco j n, stripBound j r h c M x + ≤ ∫⁻ x in dyadicIco j n, + (Ici (((n : ℝ) + 1) / 2 ^ j - r * h)).indicator (fun _ => c * M n) x := by + refine setLIntegral_mono' (measurableSet_dyadicIco j n) fun x hx => ?_ + rw [stripBound, floor_eq_of_mem_dyadicIco hx] + split_ifs with hbad + · rw [indicator_of_mem (by rw [mem_Ici]; linarith)] + · exact zero_le + _ = c * M n * volume (Ici (((n : ℝ) + 1) / 2 ^ j - r * h) ∩ dyadicIco j n) := by + rw [lintegral_indicator_const measurableSet_Ici, Measure.restrict_apply measurableSet_Ici] + _ ≤ c * M n * ENNReal.ofReal (r * h) := by + gcongr + calc volume (Ici (((n : ℝ) + 1) / 2 ^ j - r * h) ∩ dyadicIco j n) + ≤ volume (Icc (((n : ℝ) + 1) / 2 ^ j - r * h) (((n : ℝ) + 1) / 2 ^ j)) := + measure_mono fun x hx => ⟨hx.1, hx.2.2.le⟩ + _ = ENNReal.ofReal (r * h) := by rw [Real.volume_Icc]; congr 1; ring + _ = c * ENNReal.ofReal (r * h) * M n := by ring + +omit [Fact (1 ≤ p)] in +/-- **The strip integral**: for `0 < p < ∞`, if `|F|^p` is bounded by `G^p M_n` on the strip of +width `rh` left of the right end of every dyadic interval `I_{j,n}` and vanishes elsewhere on +`S ⊆ [0, 1]`, and `∑_{n < 2^j} M_n ≤ (r + 1) B^p`, then `‖F‖_{L_p(S)} ≤ G (rh (r + 1))^(1/p) B`. -/ +theorem eLpNorm_le_of_strip (hp0 : p ≠ 0) (hp : p ≠ ∞) {F : ℝ → ℂ} {S : Set ℝ} + (hS : S ⊆ Icc 0 1) (hF : AEStronglyMeasurable F (volume.restrict S)) {j r : ℕ} {h : ℝ} + {G : ℝ≥0∞} {M : ℕ → ℝ≥0∞} {B : ℝ≥0∞} + (hpt : ∀ᵐ x ∂volume.restrict S, ‖F x‖ₑ ^ p.toReal ≤ stripBound j r h (G ^ p.toReal) M x) + (hB : ∑ n ∈ Finset.range (2 ^ j), M n ≤ (r + 1) * B ^ p.toReal) : + eLpNorm F p (volume.restrict S) ≤ + G * (ENNReal.ofReal (r * h) * (r + 1)) ^ (1 / p.toReal) * B := by + have hq : 0 < p.toReal := ENNReal.toReal_pos hp0 hp + refine eLpNorm_le_of_lintegral_le hF hp0 hp ?_ + calc ∫⁻ x in S, ‖F x‖ₑ ^ p.toReal + ≤ ∫⁻ x in S, stripBound j r h (G ^ p.toReal) M x := lintegral_mono_ae hpt + _ ≤ ∫⁻ x in Icc (0 : ℝ) 1, stripBound j r h (G ^ p.toReal) M x := lintegral_mono_set hS + _ ≤ G ^ p.toReal * ENNReal.ofReal (r * h) * ∑ n ∈ Finset.range (2 ^ j), M n := + lintegral_stripBound_le j r h _ _ + _ ≤ G ^ p.toReal * ENNReal.ofReal (r * h) * ((r + 1) * B ^ p.toReal) := by gcongr + _ = (G * (ENNReal.ofReal (r * h) * (r + 1)) ^ (1 / p.toReal) * B) ^ p.toReal := by + rw [ENNReal.mul_rpow_of_nonneg _ _ hq.le, ENNReal.mul_rpow_of_nonneg _ _ hq.le, + ← ENNReal.rpow_mul, one_div_mul_cancel hq.ne', ENNReal.rpow_one] + ring + +/-- **The local inverse estimate from a pointwise bound**: let `u` be a piecewise polynomial of +level `j` on `[0, ∞)`, `S ⊆ [0, 1]` measurable and `h ≥ 0`. If on the strips of width `rh` left +of the knots `|Δ_h^r u(x)| ≤ G (∑_{l ≤ r} ∫_{I_{j,n+l}} |u|^p)^(1/p)`, `n = ⌊2^j x⌋`, for almost +every `x ∈ S`, and these local masses add up to at most `(r + 1) B^p` over `n < 2^j`, then +`‖Δ_h^r u‖_{L_p(S)} ≤ G (rh (r + 1))^(1/p) B`. Off the strips the difference vanishes +(`Interval.higherDiff_eq_zero_of_isPiecewisePoly`). -/ +theorem eLpNorm_higherDiff_le_of_pointwise (hp : p ≠ ∞) {r j : ℕ} {u : ℝ → ℂ} + (hu : IsPiecewisePoly r j u) (hum : Measurable u) {S : Set ℝ} (hSm : MeasurableSet S) + (hS : S ⊆ Icc 0 1) {h : ℝ} (hh0 : 0 ≤ h) {G B : ℝ≥0∞} + (hpt : ∀ᵐ x ∂volume.restrict S, ((⌊2 ^ j * x⌋₊ : ℝ) + 1) / 2 ^ j ≤ x + r * h → + ‖higherDiff r h u x‖ₑ ≤ + G * (∑ l ∈ Finset.range (r + 1), localMass p j u (⌊2 ^ j * x⌋₊ + l)) ^ (1 / p.toReal)) + (hB : ∑ n ∈ Finset.range (2 ^ j), ∑ l ∈ Finset.range (r + 1), localMass p j u (n + l) ≤ + (r + 1) * B ^ p.toReal) : + eLpNorm (higherDiff r h u) p (volume.restrict S) ≤ + G * (ENNReal.ofReal (r * h) * (r + 1)) ^ (1 / p.toReal) * B := by + have hp0 : p ≠ 0 := (lt_of_lt_of_le zero_lt_one (Fact.out : 1 ≤ p)).ne' + have hq : 0 < p.toReal := ENNReal.toReal_pos hp0 hp + refine eLpNorm_le_of_strip hp0 hp hS (measurable_higherDiff hum r h).aestronglyMeasurable + (M := fun n => ∑ l ∈ Finset.range (r + 1), localMass p j u (n + l)) ?_ hB + filter_upwards [hpt, ae_restrict_mem hSm] with x hx hxS + rw [stripBound] + split_ifs with hbad + · calc ‖higherDiff r h u x‖ₑ ^ p.toReal + ≤ (G * (∑ l ∈ Finset.range (r + 1), localMass p j u (⌊2 ^ j * x⌋₊ + l)) ^ + (1 / p.toReal)) ^ p.toReal := ENNReal.rpow_le_rpow (hx hbad) hq.le + _ = _ := by + rw [ENNReal.mul_rpow_of_nonneg _ _ hq.le, ← ENNReal.rpow_mul, one_div_mul_cancel hq.ne', + ENNReal.rpow_one] + · push Not at hbad + rw [higherDiff_eq_zero_of_isPiecewisePoly hu hh0 (hS hxS).1 hbad, eNorm_zero, + ENNReal.zero_rpow_of_pos hq] + +/-- **Bounded overlap**: summing the local masses of `r + 1` consecutive pieces over all starting +pieces counts each piece at most `r + 1` times, +`∑_{n < 2^j} ∑_{l ≤ r} ∫_{I_{j,n+l}} |u|^p ≤ (r + 1) ‖u‖_p^p`. -/ +theorem sum_sum_localMass_le (hp : p ≠ ∞) (j r : ℕ) (Q : ℕ → ℂ[X]) : + ∑ n ∈ Finset.range (2 ^ j), ∑ l ∈ Finset.range (r + 1), localMass p j (ppFun j Q) (n + l) ≤ + (r + 1) * eLpNorm (ppFun j Q) p unitVol ^ p.toReal := by + rw [Finset.sum_comm] + calc ∑ l ∈ Finset.range (r + 1), ∑ n ∈ Finset.range (2 ^ j), + localMass p j (ppFun j Q) (n + l) + ≤ ∑ l ∈ Finset.range (r + 1), ∑' m, localMass p j (ppFun j Q) m := + Finset.sum_le_sum fun l _ => (sum_le_tsum _).trans + (tsum_comp_le_tsum_of_injective (add_left_injective l) _) + _ = (r + 1) * ∑' m, localMass p j (ppFun j Q) m := by + rw [Finset.sum_const, Finset.card_range, nsmul_eq_mul] + push_cast + ring + _ ≤ (r + 1) * eLpNorm (ppFun j Q) p unitVol ^ p.toReal := by + gcongr + exact tsum_localMass_ppFun_le hp j Q + +/-- `2^(jθ) (rh (r + 1))^θ = (r (r + 1) 2^j h)^θ` for `θ ≥ 0`. -/ +theorem ofReal_two_pow_rpow_mul_eq (r j : ℕ) (h : ℝ) {θ : ℝ} (hθ : 0 ≤ θ) : + ENNReal.ofReal (2 ^ j) ^ θ * (ENNReal.ofReal (r * h) * (r + 1)) ^ θ = + (((r * (r + 1) : ℕ) : ℝ≥0∞) * ENNReal.ofReal (2 ^ j * h)) ^ θ := by + have h1 : ENNReal.ofReal (2 ^ j) * ENNReal.ofReal (r * h) = + (r : ℝ≥0∞) * ENNReal.ofReal (2 ^ j * h) := by + rw [← ENNReal.ofReal_mul (by positivity), show (2 : ℝ) ^ j * (r * h) = r * (2 ^ j * h) by ring, + ENNReal.ofReal_mul (Nat.cast_nonneg r), ENNReal.ofReal_natCast] + rw [← ENNReal.mul_rpow_of_nonneg _ _ hθ, ← mul_assoc, h1] + congr 1 + push_cast + ring + +/-- **The local inverse estimate** for a piecewise polynomial `u` of level `j` on `[0, ∞)`: if +the local masses of `r + 1` consecutive pieces, summed over the pieces in `[0, 1)`, are at most +`(r + 1) B^p`, then for `0 ≤ h ≤ 2^(-j)`, +`‖Δ_h^r u‖_{L_p[0, 1]} ≤ 2^r K (r (r + 1) 2^j h)^(1/p) B`. +The difference vanishes except on strips of width `rh` left of the knots, and there it is +bounded by the local masses of at most `r + 1` neighbouring pieces. -/ +theorem eLpNorm_higherDiff_le_of_isPiecewisePoly {r j : ℕ} {u : ℝ → ℂ} + (hu : IsPiecewisePoly r j u) (hum : Measurable u) {K : ℝ≥0∞} (hK : NikolskiiBound p r K) + (hp : p ≠ ∞) {h : ℝ} (hh0 : 0 ≤ h) (hh : h ≤ 1 / 2 ^ j) {B : ℝ≥0∞} + (hB : ∑ n ∈ Finset.range (2 ^ j), ∑ l ∈ Finset.range (r + 1), localMass p j u (n + l) ≤ + (r + 1) * B ^ p.toReal) : + eLpNorm (higherDiff r h u) p (volume.restrict (Icc 0 1)) ≤ + 2 ^ r * K * (((r * (r + 1) : ℕ) : ℝ≥0∞) * ENNReal.ofReal (2 ^ j * h)) ^ (1 / p.toReal) * + B := by + refine (eLpNorm_higherDiff_le_of_pointwise hp hu hum measurableSet_Icc le_rfl hh0 + (G := 2 ^ r * K * ENNReal.ofReal (2 ^ j) ^ (1 / p.toReal)) ?_ hB).trans_eq ?_ + · filter_upwards [ae_restrict_mem measurableSet_Icc] with x hx _ + exact (enorm_higherDiff_le_of_isPiecewisePoly hu hK hp hh0 hh hx.1).trans_eq (by ring) + · rw [mul_assoc (2 ^ r * K), ofReal_two_pow_rpow_mul_eq r j h (by positivity)] + +/-- **The local inverse estimate on `[0, 1]`** for a piecewise polynomial `u` of level `j`: for +`0 ≤ h ≤ 2^(-j)`, +`‖Δ_h^r u‖_{L_p[0, 1 - rh]} ≤ 2^r K (r (r + 1) 2^j h)^(1/p) ‖u‖_{L_p[0,1]}`. -/ +theorem eLpNorm_higherDiff_ppFun_le {r : ℕ} {Q : ℕ → ℂ[X]} (hQ : ∀ n, Q n ∈ degreeLT ℂ r) + {K : ℝ≥0∞} (hK : NikolskiiBound p r K) (hp : p ≠ ∞) (j : ℕ) {h : ℝ} (hh0 : 0 ≤ h) + (hh : h ≤ 1 / 2 ^ j) : + eLpNorm (higherDiff r h (ppFun j Q)) p (volume.restrict (Icc 0 (1 - r * h))) ≤ + 2 ^ r * K * (((r * (r + 1) : ℕ) : ℝ≥0∞) * ENNReal.ofReal (2 ^ j * h)) ^ (1 / p.toReal) * + eLpNorm (ppFun j Q) p unitVol := + (eLpNorm_Icc_mono _ p le_rfl (by linarith [mul_nonneg (Nat.cast_nonneg r) hh0])).trans + (eLpNorm_higherDiff_le_of_isPiecewisePoly (isPiecewisePoly_ppFun hQ j) + (measurable_ppFun j Q) hK hp hh0 hh (sum_sum_localMass_le hp j r Q)) + +variable (p) in +/-- The constant of the inverse inequality, `2^r (1 + K (r (r + 1))^(1/p))`, with the Nikolskii +constant `K`. -/ +noncomputable def ppInverseConst (r : ℕ) (K : ℝ≥0∞) : ℝ≥0∞ := + 2 ^ r * (1 + K * ((r * (r + 1) : ℕ) : ℝ≥0∞) ^ (1 / p.toReal)) + +omit [Fact (1 ≤ p)] in +/-- The constant of the inverse inequality is finite. -/ +theorem ppInverseConst_ne_top (r : ℕ) {K : ℝ≥0∞} (hK : K ≠ ∞) : ppInverseConst p r K ≠ ∞ := + ENNReal.mul_ne_top (by simp) (ENNReal.add_ne_top.2 ⟨ENNReal.one_ne_top, + ENNReal.mul_ne_top hK (ENNReal.rpow_ne_top_of_nonneg (by positivity) + (ENNReal.natCast_ne_top _))⟩) + +omit [Fact (1 ≤ p)] in +/-- `2^r` is at most the constant of the inverse inequality. -/ +theorem two_pow_le_ppInverseConst (r : ℕ) (K : ℝ≥0∞) : 2 ^ r ≤ ppInverseConst p r K := + le_mul_of_one_le_right zero_le le_self_add + +omit [Fact (1 ≤ p)] in +/-- The local inverse estimate in dyadic form: for `j ≤ k` and `h ≤ 2^(-k)`, +`2^r K (r (r + 1) 2^j h)^(1/p) B ≤ C_B 2^(-(k-j)/p) B`. -/ +theorem le_ppInverseConst_mul {r j k : ℕ} (hjk : j ≤ k) (K : ℝ≥0∞) {h : ℝ} (hh : h ≤ 1 / 2 ^ k) + (B : ℝ≥0∞) : + 2 ^ r * K * (((r * (r + 1) : ℕ) : ℝ≥0∞) * ENNReal.ofReal (2 ^ j * h)) ^ (1 / p.toReal) * B ≤ + ppInverseConst p r K * dyadicWeight (-(1 / p.toReal)) (k - j) * B := by + have hθ : 0 ≤ 1 / p.toReal := by positivity + have hw : (((r * (r + 1) : ℕ) : ℝ≥0∞) * ENNReal.ofReal (2 ^ j * h)) ^ (1 / p.toReal) ≤ + ((r * (r + 1) : ℕ) : ℝ≥0∞) ^ (1 / p.toReal) * dyadicWeight (-(1 / p.toReal)) (k - j) := by + rw [ENNReal.mul_rpow_of_nonneg _ _ hθ] + exact mul_le_mul' le_rfl (ENNReal.ofReal_two_pow_mul_rpow_le hjk hh hθ) + calc 2 ^ r * K * (((r * (r + 1) : ℕ) : ℝ≥0∞) * ENNReal.ofReal (2 ^ j * h)) ^ + (1 / p.toReal) * B + ≤ 2 ^ r * K * (((r * (r + 1) : ℕ) : ℝ≥0∞) ^ (1 / p.toReal) * + dyadicWeight (-(1 / p.toReal)) (k - j)) * B := + mul_le_mul' (mul_le_mul' le_rfl hw) le_rfl + _ = 2 ^ r * (K * ((r * (r + 1) : ℕ) : ℝ≥0∞) ^ (1 / p.toReal)) * + dyadicWeight (-(1 / p.toReal)) (k - j) * B := by ring + _ ≤ ppInverseConst p r K * dyadicWeight (-(1 / p.toReal)) (k - j) * B := by + unfold ppInverseConst + gcongr + exact le_add_self + +/-- **The inverse inequality for dyadic piecewise polynomials**, of order `θ = 1/p`: there is +`C_B < ∞` with `ω_r(a, 2^(-k), [0, 1])_p ≤ C_B 2^(-(k-j)/p) ‖a‖_p` for every piecewise polynomial +`a` of level `j` (and `k - j` truncated at `0`). The order `1/p` reflects the jumps at the knots: +a single jump has `ω_r(a, t)_p ≈ t^(1/p)`. -/ +theorem exists_inverse_ppScheme {r : ℕ} (hp : p ≠ ∞) : + ∃ CB : ℝ≥0∞, CB ≠ ∞ ∧ ∀ j k : ℕ, ∀ a ∈ ppScheme p r (2 ^ j), + lpModulus p r a k ≤ CB * dyadicWeight (-(1 / p.toReal)) (k - j) * ‖a‖ₑ := by + obtain ⟨K, hK, hKb⟩ := enorm_polyFun_le (p := p) r hp + refine ⟨ppInverseConst p r K, ppInverseConst_ne_top r hK, fun j k a ha => ?_⟩ + obtain ⟨Q, hQ, hae⟩ := mem_ppScheme_two_pow.1 ha + rcases lt_or_ge k j with hkj | hjk + · rw [Nat.sub_eq_zero_of_le hkj.le, ENNReal.dyadicWeight_zero_right, mul_one] + exact (lpModulus_le r a k).trans (by gcongr; exact two_pow_le_ppInverseConst r K) + · have hnorm : ‖a‖ₑ = eLpNorm (ppFun j Q) p unitVol := by + rw [Lp.eNorm_def] + exact eLpNorm_congr_ae hae + rw [lpModulus, modulus_congr_ae hae, hnorm, modulus_eq_iSup_nonneg] + refine iSup₂_le fun h hh => ?_ + have hhj : h ≤ 1 / 2 ^ j := hh.2.trans (one_div_le_one_div_of_le (by positivity) + (pow_le_pow_right₀ (by norm_num) hjk)) + exact (eLpNorm_higherDiff_ppFun_le hQ hKb hp j hh.1 hhj).trans + (le_ppInverseConst_mul hjk K hh.2 _) + +/-! ### The coincidence theorem -/ + +/-- The modulus `ω_r(f, 2^(-k), [0, 1])_p` is compatible with the scheme of dyadic piecewise +polynomials of degree `< r`, with inverse order `θ = 1/p` and Jackson's inequality at every +level (Whitney's inequality at level `0`). -/ +noncomputable def ppModulusData {r : ℕ} (hr : 1 ≤ r) (hp : p ≠ ∞) : + ApproximationScheme.ModulusData (ppScheme p r) (1 / p.toReal) := + .ofExists (lpModulus p r) (lpModulus_add_le r) (2 ^ r) (by simp) (lpModulus_le r) 0 + ((exists_approxError_ppScheme_le hr hp).imp fun _ h => ⟨h.1, fun f k _ => h.2 f k⟩) + (exists_inverse_ppScheme hp) + +/-- **Approximation by dyadic piecewise polynomials.** For `1 ≤ p < ∞`, `1 ≤ q ≤ ∞`, `r ≥ 1` and +`0 ≤ s < 1/p`, an `f ∈ L_p[0, 1]` lies in the approximation space `A^s_q` of the piecewise +polynomials of degree `< r` on dyadic partitions iff its classical Besov quasi-norm +`‖f‖_p + ‖(2^(ks) ω_r(f, 2^(-k), [0, 1])_p)_k‖_{ℓ_q}` is finite. The bound `s < 1/p` is sharp +for discontinuous pieces; higher smoothness needs smooth splines. -/ +theorem memApprox_ppScheme_iff {r : ℕ} (hr : 1 ≤ r) (hp : p ≠ ∞) {s : ℝ} {q : ℝ≥0∞} + (hq : 1 ≤ q) (hs : 0 ≤ s) (hsp : s < 1 / p.toReal) (f : Lp ℂ p unitVol) : + (ppScheme p r).MemApprox s q f ↔ + ‖f‖ₑ + ENNReal.lqNorm q (fun k => dyadicWeight s k * lpModulus p r f k) < ∞ := + (ppModulusData hr hp).memApprox_iff_modNorm_lt_top hq hs hsp f + +end Interval diff --git a/LeanPool/FunctionSpaces/Domains/Interval/PiecewiseJackson.lean b/LeanPool/FunctionSpaces/Domains/Interval/PiecewiseJackson.lean new file mode 100644 index 0000000000..a297fc9442 --- /dev/null +++ b/LeanPool/FunctionSpaces/Domains/Interval/PiecewiseJackson.lean @@ -0,0 +1,350 @@ +/- +Copyright (c) 2026 Mario Ullrich. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Mario Ullrich +-/ +module + +public import LeanPool.FunctionSpaces.Domains.Interval.PiecewisePoly +public import LeanPool.FunctionSpaces.Domains.Interval.Whitney +public import Mathlib.MeasureTheory.Function.ContinuousMapDense + +/- +Modified for Lean Pool: module names and imports adapted. +-/ + +/-! +# Jackson's inequality for dyadic piecewise polynomials + +For `1 ≤ p < ∞`, `r ≥ 1` and `k ≥ 1`, the error of best approximation in `L_p[0, 1]` by +piecewise polynomials of level `k` and degree `< r` is bounded by the modulus of smoothness, +`E_{2^k}(f)_p ≤ 2 (1 + 2^r r^(2r)) ω_r(f, 2^(-k), [0, 1])_p` +(`Interval.approxError_ppScheme_le`). At level `0` the approximants are the polynomials of degree +`< r`, and Whitney's inequality of `FunctionSpaces.Domains.Interval.Whitney` gives the bound there +(`Interval.exists_approxError_ppScheme_one_le`), so Jackson's inequality holds at every level +(`Interval.exists_approxError_ppScheme_le`). + +For `k ≥ 1` the proof needs no Whitney theorem. For continuous `f`, the Steklov smoothing of +`Interval.exists_left_smoothing` is close to `f`, its `r`-th derivative is bounded by `2^(kr)` +times the modulus, and on each dyadic interval it is approximated by a Taylor polynomial +(`Interval.exists_taylor_pieces`). The smoothing looks to the right of `x`, so it serves +`[0, 1/2]`; its reflection `Interval.exists_right_smoothing` serves `[1/2, 1]`. The Taylor +polynomials of both halves form one piecewise polynomial +(`Interval.exists_ppFun_approx_of_taylor`, stated for any function and any two smoothings, so +that the slices of functions on the cube use it too). The point `1/2` is a knot of every level +`k ≥ 1`, which is why `k ≥ 1` in this part of the argument. General `f ∈ L_p` follow by density +of bounded continuous functions (`Interval.approxError_le_of_continuous`, which serves every scheme +in `L_p[0, 1]`). + +The modulus of elements of `L_p[0, 1]` at the dyadic scales (`Interval.lpModulus`) is defined for +every `p`; for `0 < p ≤ 1` its `p`-th power is subadditive and it is at most `2^(r/p) ‖f‖_p` +(`Interval.lpModulus_add_rpow_le`, `Interval.lpModulus_le_of_le_one`). +-/ + +@[expose] public section + +open MeasureTheory Set Polynomial +open scoped ENNReal BoundedContinuousFunction +open ENNReal (dyadicWeight) + +namespace Interval + +variable {p : ℝ≥0∞} [Fact (1 ≤ p)] + +/-- The constant of the local Jackson estimate, `1 + 2^r r^(2r)`. -/ +noncomputable def jacksonConst (r : ℕ) : ℝ≥0∞ := 1 + 2 ^ r * (r : ℝ≥0∞) ^ (2 * r) + +/-- The local Jackson constant is finite. -/ +theorem jacksonConst_ne_top (r : ℕ) : jacksonConst r ≠ ∞ := by + unfold jacksonConst + exact ENNReal.add_ne_top.2 ⟨ENNReal.one_ne_top, ENNReal.mul_ne_top (by simp) + (ENNReal.pow_ne_top (ENNReal.natCast_ne_top r))⟩ + +/-- The bound of a smoothing and of its Taylor remainders at scale `L` combine to the local +Jackson constant: `a ≤ ω` and `b ≤ L^(-r) 2^r r^(2r) ω` give `a + L^r b ≤ (1 + 2^r r^(2r)) ω`. -/ +theorem add_ofReal_pow_mul_le_jacksonConst {L : ℝ} (hL : 0 < L) (r : ℕ) {a b ω : ℝ≥0∞} + (ha : a ≤ ω) (hb : b ≤ ENNReal.ofReal L⁻¹ ^ r * (2 ^ r * (r : ℝ≥0∞) ^ (2 * r)) * ω) : + a + ENNReal.ofReal L ^ r * b ≤ jacksonConst r * ω := by + have hLL : ENNReal.ofReal L * ENNReal.ofReal L⁻¹ = 1 := by + rw [← ENNReal.ofReal_mul hL.le, mul_inv_cancel₀ hL.ne', ENNReal.ofReal_one] + calc a + ENNReal.ofReal L ^ r * b + ≤ ω + ENNReal.ofReal L ^ r * (ENNReal.ofReal L⁻¹ ^ r * (2 ^ r * (r : ℝ≥0∞) ^ (2 * r)) * ω) := + add_le_add ha (mul_le_mul' le_rfl hb) + _ = ω + (ENNReal.ofReal L * ENNReal.ofReal L⁻¹) ^ r * (2 ^ r * (r : ℝ≥0∞) ^ (2 * r)) * ω := by + rw [mul_pow]; ring + _ = jacksonConst r * ω := by rw [hLL, one_pow, one_mul, jacksonConst]; ring + +/-- The half `[0, 1/2]` and the scale `2^(-(k+1))` fit into `[0, 1]`: `1/2 + 2^(-(k+1)) ≤ 1`. -/ +theorem one_half_add_le_one (k : ℕ) : (1 / 2 : ℝ) + 1 / 2 ^ (k + 1) ≤ 1 := by + have : (1 : ℝ) / 2 ^ (k + 1) ≤ 1 / 2 := by + rw [div_le_div_iff₀ (by positivity) (by norm_num), one_mul, one_mul] + calc (2 : ℝ) = 2 ^ 1 := by norm_num + _ ≤ 2 ^ (k + 1) := pow_le_pow_right₀ (by norm_num) (by omega) + linarith + +/-- **Taylor polynomials on consecutive intervals**: let `g` have on every interval `[u, v]` a +polynomial `T` of degree `< r` with `‖g - T‖_{L_p[u, v]} ≤ (v - u)^r ‖D‖_{L_p[u, v]}`. For the +intervals `[a + nL, a + (n + 1)L]`, `n < N`, there are such polynomials `Q_n`, and every +measurable `S` equal to `Q_n` on the open intervals satisfies +`‖g - S‖_{L_p[a, a + NL]} ≤ L^r ‖D‖_{L_p[a, a + NL]}`: the `p`-th powers of the local errors add +up. -/ +theorem exists_taylor_pieces {g D : ℝ → ℂ} (hg : Measurable g) (hD : Measurable D) {r : ℕ} + {p : ℝ≥0∞} (hp0 : p ≠ 0) (hp' : p ≠ ∞) + (hT : ∀ u v : ℝ, u ≤ v → ∃ T ∈ degreeLT ℂ r, + eLpNorm (fun x => g x - polyFun T x) p (volume.restrict (Icc u v)) ≤ + ENNReal.ofReal (v - u) ^ r * eLpNorm D p (volume.restrict (Icc u v))) + (a : ℝ) {L : ℝ} (hL : 0 ≤ L) (N : ℕ) : + ∃ Q : ℕ → ℂ[X], (∀ n, Q n ∈ degreeLT ℂ r) ∧ ∀ S : ℝ → ℂ, Measurable S → + (∀ n < N, ∀ x ∈ Ioo (a + n * L) (a + (n + 1) * L), S x = polyFun (Q n) x) → + eLpNorm (fun x => g x - S x) p (volume.restrict (Icc a (a + N * L))) ≤ + ENNReal.ofReal L ^ r * eLpNorm D p (volume.restrict (Icc a (a + N * L))) := by + have hq : 0 < p.toReal := ENNReal.toReal_pos hp0 hp' + choose Q hQ hQb using fun n : ℕ => hT (a + n * L) (a + (n + 1) * L) (by nlinarith) + refine ⟨Q, hQ, fun S hS hSQ => ?_⟩ + refine eLpNorm_le_of_lintegral_le (hg.sub hS).aestronglyMeasurable hp0 hp' ?_ + refine (lintegral_Icc_le_sum (fun x => ‖g x - S x‖ₑ ^ p.toReal) a hL N).trans ?_ + have hpiece : ∀ n ∈ Finset.range N, + ∫⁻ x in Icc (a + n * L) (a + (n + 1) * L), ‖g x - S x‖ₑ ^ p.toReal ≤ + (ENNReal.ofReal L ^ r) ^ p.toReal * + ∫⁻ x in Icc (a + n * L) (a + (n + 1) * L), ‖D x‖ₑ ^ p.toReal := fun n hn => by + have hae : ∀ᵐ x ∂volume.restrict (Icc (a + n * L) (a + (n + 1) * L)), + ‖g x - S x‖ₑ ^ p.toReal = ‖g x - polyFun (Q n) x‖ₑ ^ p.toReal := by + rw [← Measure.restrict_congr_set Ioo_ae_eq_Icc] + filter_upwards [ae_restrict_mem measurableSet_Ioo] with x hx + rw [hSQ n (Finset.mem_range.1 hn) x hx] + rw [lintegral_congr_ae hae, ← eLpNorm_rpow_eq (g := fun x => g x - polyFun (Q n) x) + ((hg.sub (measurable_polyFun _)).aestronglyMeasurable) hp0 hp', + ← eLpNorm_rpow_eq hD.aestronglyMeasurable hp0 hp', ← ENNReal.mul_rpow_of_nonneg _ _ hq.le] + have hb := hQb n + rw [show a + (n + 1) * L - (a + n * L) = L by ring] at hb + exact ENNReal.rpow_le_rpow hb hq.le + refine (Finset.sum_le_sum hpiece).trans ?_ + rw [← Finset.mul_sum, ENNReal.mul_rpow_of_nonneg _ _ hq.le, + eLpNorm_rpow_eq hD.aestronglyMeasurable hp0 hp'] + gcongr + exact sum_le_lintegral_Icc a hL N + +/-- **Piecewise Taylor approximation on the two halves of `[0, 1]`**: let `g_L` and `g_R` have +Taylor polynomials of degree `< r` on every interval, with remainders controlled by `D_L` and +`D_R` as in `Interval.exists_taylor_pieces`. For every measurable `u` and every `k` there is a +piecewise polynomial `S` of level `k + 1` and degree `< r`, made of Taylor polynomials of `g_L` +on `[0, 1/2]` and of `g_R` on `[1/2, 1]`, with +`‖u - S‖_{L_p[0, 1]} ≤ (‖u - g_L‖_{L_p[0, 1/2]} + L^r ‖D_L‖_{L_p[0, 1/2]}) + (‖u - +g_R‖_{L_p[1/2, 1]} + L^r ‖D_R‖_{L_p[1/2, 1]})`, +`L = 2^(-(k+1))`. The point `1/2` is a knot of level `k + 1`. -/ +theorem exists_ppFun_approx_of_taylor {u gL DL gR DR : ℝ → ℂ} (hu : Measurable u) + (hgL : Measurable gL) (hDL : Measurable DL) (hgR : Measurable gR) (hDR : Measurable DR) + {r : ℕ} {p : ℝ≥0∞} (hp : 1 ≤ p) (hp' : p ≠ ∞) + (hTL : ∀ a b : ℝ, a ≤ b → ∃ T ∈ degreeLT ℂ r, + eLpNorm (fun x => gL x - polyFun T x) p (volume.restrict (Icc a b)) ≤ + ENNReal.ofReal (b - a) ^ r * eLpNorm DL p (volume.restrict (Icc a b))) + (hTR : ∀ a b : ℝ, a ≤ b → ∃ T ∈ degreeLT ℂ r, + eLpNorm (fun x => gR x - polyFun T x) p (volume.restrict (Icc a b)) ≤ + ENNReal.ofReal (b - a) ^ r * eLpNorm DR p (volume.restrict (Icc a b))) + (k : ℕ) : + ∃ Q : ℕ → ℂ[X], (∀ n, Q n ∈ degreeLT ℂ r) ∧ + eLpNorm (fun x => u x - ppFun (k + 1) Q x) p unitVol ≤ + (eLpNorm (fun x => u x - gL x) p (volume.restrict (Icc 0 (1 / 2))) + + ENNReal.ofReal (1 / 2 ^ (k + 1)) ^ r * eLpNorm DL p (volume.restrict (Icc 0 (1 / 2)))) + + (eLpNorm (fun x => u x - gR x) p (volume.restrict (Icc (1 / 2) 1)) + + ENNReal.ofReal (1 / 2 ^ (k + 1)) ^ r * eLpNorm DR p (volume.restrict (Icc (1 / 2) 1))) + := by + have hp0 : p ≠ 0 := (lt_of_lt_of_le zero_lt_one hp).ne' + set L : ℝ := 1 / 2 ^ (k + 1) with hLdef + have hL : 0 < L := by positivity + have hL2 : ((2 ^ k : ℕ) : ℝ) * L = 1 / 2 := by + rw [hLdef]; push_cast; rw [pow_succ]; field_simp + obtain ⟨Ql, hQl, hl⟩ := exists_taylor_pieces hgL hDL hp0 hp' hTL 0 hL.le (2 ^ k) + obtain ⟨Qr, hQr, hrt⟩ := exists_taylor_pieces hgR hDR hp0 hp' hTR (1 / 2) hL.le (2 ^ k) + rw [zero_add, hL2] at hl + rw [hL2, show (1 / 2 : ℝ) + 1 / 2 = 1 by norm_num] at hrt + set Q : ℕ → ℂ[X] := fun m => if m < 2 ^ k then Ql m else Qr (m - 2 ^ k) + have hQ : ∀ m, Q m ∈ degreeLT ℂ r := fun m => by + simp only [Q] + split_ifs + · exact hQl m + · exact hQr _ + refine ⟨Q, hQ, ?_⟩ + have hSm : Measurable (ppFun (k + 1) Q) := measurable_ppFun _ _ + have hleft : ∀ n : ℕ, n < 2 ^ k → ∀ x ∈ Ioo (0 + n * L) (0 + (n + 1) * L), + ppFun (k + 1) Q x = polyFun (Ql n) x := fun n hn x hx => by + have hn' : n < 2 ^ (k + 1) := lt_of_lt_of_le hn (Nat.pow_le_pow_right two_pos (Nat.le_succ k)) + have hmem : x ∈ dyadicIco (k + 1) n := by + rw [hLdef, zero_add, zero_add, mul_one_div, mul_one_div] at hx + exact Ioo_subset_Ico_self hx + rw [ppFun_eq_of_mem Q hn' hmem] + simp only [Q, hn, ↓reduceIte] + have hright : ∀ n : ℕ, n < 2 ^ k → ∀ x ∈ Ioo (1 / 2 + n * L) (1 / 2 + (n + 1) * L), + ppFun (k + 1) Q x = polyFun (Qr n) x := fun n hn x hx => by + have hm : 2 ^ k + n < 2 ^ (k + 1) := by rw [pow_succ]; omega + have hmem : x ∈ dyadicIco (k + 1) (2 ^ k + n) := by + have e1 : (1 / 2 : ℝ) + n * L = ((2 ^ k + n : ℕ) : ℝ) / 2 ^ (k + 1) := by + rw [hLdef]; push_cast; rw [pow_succ]; field_simp + have e2 : (1 / 2 : ℝ) + (n + 1) * L = (((2 ^ k + n : ℕ) : ℝ) + 1) / 2 ^ (k + 1) := by + rw [hLdef]; push_cast; rw [pow_succ]; field_simp; ring + rw [e1, e2] at hx + exact Ioo_subset_Ico_self hx + rw [ppFun_eq_of_mem Q hm hmem] + simp only [Q, show ¬ (2 ^ k + n < 2 ^ k) by omega, ↓reduceIte, Nat.add_sub_cancel_left] + have hL' := hl _ hSm hleft + have hR' := hrt _ hSm hright + have hsplit : ∀ {a b : ℝ} {g : ℝ → ℂ}, Measurable g → + eLpNorm (fun x => u x - ppFun (k + 1) Q x) p (volume.restrict (Icc a b)) ≤ + eLpNorm (fun x => u x - g x) p (volume.restrict (Icc a b)) + + eLpNorm (fun x => g x - ppFun (k + 1) Q x) p (volume.restrict (Icc a b)) := + fun {a b g} _ => by + calc eLpNorm (fun x => u x - ppFun (k + 1) Q x) p (volume.restrict (Icc a b)) + = eLpNorm ((fun x => u x - g x) + fun x => g x - ppFun (k + 1) Q x) p + (volume.restrict (Icc a b)) := by congr 1; funext x; simp + _ ≤ _ := eLpNorm_add_le hp + calc eLpNorm (fun x => u x - ppFun (k + 1) Q x) p unitVol + ≤ eLpNorm (fun x => u x - ppFun (k + 1) Q x) p (volume.restrict (Icc 0 (1 / 2))) + + eLpNorm (fun x => u x - ppFun (k + 1) Q x) p (volume.restrict (Icc (1 / 2) 1)) := + eLpNorm_Icc_split (hu.sub hSm) hp hp' (by norm_num) (by norm_num) + _ ≤ _ := add_le_add ((hsplit hgL).trans (add_le_add le_rfl hL')) + ((hsplit hgR).trans (add_le_add le_rfl hR')) + +/-- **Jackson's estimate for continuous functions**: for continuous `F` and `k ≥ 0` there is a +piecewise polynomial `S` of level `k + 1` and degree `< r` with +`‖F - S‖_{L_p[0,1]} ≤ 2 (1 + 2^r r^(2r)) ω_r(F, 2^(-(k+1)), [0, 1])_p`. The smoothings of +`Interval.exists_left_smoothing` and `Interval.exists_right_smoothing` with `L = 2^(-(k+1))` +enter `Interval.exists_ppFun_approx_of_taylor`. -/ +theorem exists_ppFun_approx {F : ℝ → ℂ} (hF : Continuous F) {r : ℕ} (hr : 1 ≤ r) {p : ℝ≥0∞} + (hp : 1 ≤ p) (hp' : p ≠ ∞) (k : ℕ) : + ∃ Q : ℕ → ℂ[X], (∀ n, Q n ∈ degreeLT ℂ r) ∧ + eLpNorm (fun x => F x - ppFun (k + 1) Q x) p unitVol ≤ + 2 * jacksonConst r * modulus r p 0 1 F (1 / 2 ^ (k + 1)) := by + have hL : (0 : ℝ) < 1 / 2 ^ (k + 1) := by positivity + obtain ⟨gL, DL, hgL, hDL, h1L, h2L, hTL⟩ := + exists_left_smoothing hF hr hp hp' hL (one_half_add_le_one k) + obtain ⟨gR, DR, hgR, hDR, h1R, h2R, hTR⟩ := + exists_right_smoothing hF hr hp hp' hL (one_half_add_le_one k) + rw [show (1 : ℝ) - 1 / 2 = 1 / 2 by norm_num] at h1R h2R + obtain ⟨Q, hQ, hbound⟩ := + exists_ppFun_approx_of_taylor hF.measurable hgL hDL hgR hDR hp hp' hTL hTR k + refine ⟨Q, hQ, hbound.trans ?_⟩ + rw [two_mul, add_mul] + exact add_le_add (add_ofReal_pow_mul_le_jacksonConst hL r h1L h2L) + (add_ofReal_pow_mul_le_jacksonConst hL r h1R h2R) + +variable (p) in +/-- The modulus of an element of `L_p[0, 1]` at the dyadic scale `2^(-k)`, +`ω_r(f, 2^(-k), [0, 1])_p`. -/ +noncomputable def lpModulus (r : ℕ) (f : Lp ℂ p unitVol) (k : ℕ) : ℝ≥0∞ := + modulus r p 0 1 (f : ℝ → ℂ) (1 / 2 ^ k) + +/-- The modulus of elements of `L_p[0, 1]` is subadditive. -/ +theorem lpModulus_add_le (r : ℕ) (f g : Lp ℂ p unitVol) (k : ℕ) : + lpModulus p r (f + g) k ≤ lpModulus p r f k + lpModulus p r g k := by + rw [lpModulus, modulus_congr_ae (Lp.coeFn_add f g)] + exact modulus_add_le Fact.out r 0 1 _ _ _ + +/-- `ω_r(f, t) ≤ 2^r ‖f‖_p` in `L_p[0, 1]`. -/ +theorem lpModulus_le (r : ℕ) (f : Lp ℂ p unitVol) (k : ℕ) : + lpModulus p r f k ≤ 2 ^ r * ‖f‖ₑ := by + rw [Lp.eNorm_def] + exact modulus_le (Lp.stronglyMeasurable f).measurable Fact.out r 0 1 _ + +omit [Fact (1 ≤ p)] in +/-- The modulus at the dyadic scales decreases with the level. -/ +theorem lpModulus_anti (r : ℕ) (f : Lp ℂ p unitVol) : Antitone (lpModulus p r f) := fun _ _ hjk => + modulus_mono r p 0 1 _ (one_div_le_one_div_of_le (by positivity) + (pow_le_pow_right₀ (by norm_num) hjk)) + +/-- **From continuous functions to `L_p` by density**: a bound `E_n(g) ≤ C ω_r(g, 2^(-k))_p` +for every bounded continuous `g`, given by an approximant `u ∈ A_n` of `g`, holds for every +`f ∈ L_p[0, 1]`, `p < ∞`. The bounded continuous functions are dense in `L_p` (Mathlib's +`BoundedContinuousFunction.toLp_denseRange`), so `ApproximationScheme.approxError_le_of_dense` +applies. -/ +theorem approxError_le_of_continuous {A : ApproximationScheme (Lp ℂ p unitVol)} (hp : p ≠ ∞) + {r n k : ℕ} {C : ℝ≥0∞} (hC : C ≠ ∞) + (h : ∀ g : ℝ →ᵇ ℂ, ∃ u : ℝ → ℂ, (∃ a ∈ A n, (a : ℝ → ℂ) =ᵐ[unitVol] u) ∧ + eLpNorm (fun x => g x - u x) p unitVol ≤ C * modulus r p 0 1 g (1 / 2 ^ k)) + (f : Lp ℂ p unitVol) : A.approxError f n ≤ C * lpModulus p r f k := by + refine ApproximationScheme.approxError_le_of_dense + (BoundedContinuousFunction.toLp_denseRange ℂ unitVol ℝ hp) + (fun f g => lpModulus_add_le r f g k) (C0 := 2 ^ r) (by simp) (fun f => lpModulus_le r f k) hC + ?_ f + rintro _ ⟨g, rfl⟩ + obtain ⟨u, ⟨a, ha, hau⟩, hbound⟩ := h g + have hg := BoundedContinuousFunction.coeFn_toLp (E := ℂ) p unitVol ℝ g + refine (A.approxError_le_of_mem ha _).trans ?_ + rw [Lp.eNorm_def, eLpNorm_congr_ae ((Lp.coeFn_sub _ _).trans (hg.sub hau)), lpModulus, + modulus_congr_ae hg] + exact hbound + +/-- **Jackson's inequality for dyadic piecewise polynomials**: for `1 ≤ p < ∞`, `r ≥ 1` and +`k ≥ 1`, `E_{2^k}(f)_p ≤ 2 (1 + 2^r r^(2r)) ω_r(f, 2^(-k), [0, 1])_p`; first for continuous +functions (`Interval.exists_ppFun_approx`), then by density +(`Interval.approxError_le_of_continuous`). -/ +theorem approxError_ppScheme_le {r : ℕ} (hr : 1 ≤ r) (hp : p ≠ ∞) (f : Lp ℂ p unitVol) {k : ℕ} + (hk : 1 ≤ k) : + (ppScheme p r).approxError f (2 ^ k) ≤ 2 * jacksonConst r * lpModulus p r f k := by + obtain ⟨k, rfl⟩ := Nat.exists_eq_add_of_le' hk + refine approxError_le_of_continuous hp (ENNReal.mul_ne_top (by norm_num) (jacksonConst_ne_top r)) + (fun g => ?_) f + obtain ⟨Q, hQ, hbound⟩ := exists_ppFun_approx g.continuous hr Fact.out hp k + exact ⟨ppFun (k + 1) Q, ⟨(memLp_ppFun (k + 1) Q p).toLp _, + mem_ppScheme_two_pow.2 ⟨Q, hQ, MemLp.coeFn_toLp _⟩, MemLp.coeFn_toLp _⟩, hbound⟩ + +/-- **Whitney's inequality in `L_p[0, 1]`**: for `1 ≤ p < ∞`, `r ≥ 1` and `m ≥ 2` there is +`W < ∞` with `E_1(f)_p ≤ W ω_r(f, 2^(-m), [0, 1])_p` for every `f ∈ L_p[0, 1]`, where `E_1` is the +error of best approximation by the polynomials of degree `< r` (the approximants of +complexity `1`). -/ +theorem exists_approxError_ppScheme_one_le {r : ℕ} (hr : 1 ≤ r) (hp : p ≠ ∞) {m : ℕ} (hm : 2 ≤ m) : + ∃ W : ℝ≥0∞, W ≠ ∞ ∧ ∀ f : Lp ℂ p unitVol, + (ppScheme p r).approxError f 1 ≤ W * lpModulus p r f m := by + have ht : (0 : ℝ) < 1 / 2 ^ m := by positivity + have ht3 : (1 : ℝ) / 2 ^ m ≤ 1 / 3 := by + rw [div_le_div_iff₀ (by positivity) (by norm_num), one_mul, one_mul] + calc (3 : ℝ) ≤ 2 ^ 2 := by norm_num + _ ≤ 2 ^ m := pow_le_pow_right₀ (by norm_num) hm + obtain ⟨W, hW, hWb⟩ := exists_eLpNorm_sub_polyFun_le_modulus hr hp ht ht3 + refine ⟨W, hW, fun f => approxError_le_of_continuous hp hW (fun g => ?_) f⟩ + obtain ⟨P, hP, hbound⟩ := hWb g g.continuous + have hae : (fun x => g x - ppFun 0 (fun _ => P) x) =ᵐ[unitVol] fun x => g x - polyFun P x := by + filter_upwards [ae_mem_Ico_unitVol] with x hx + obtain ⟨hmem, hlt⟩ := mem_dyadicIco_floor (k := 0) hx + rw [ppFun_eq_of_mem _ hlt hmem] + refine ⟨ppFun 0 (fun _ => P), ⟨(memLp_ppFun 0 (fun _ => P) p).toLp _, ?_, MemLp.coeFn_toLp _⟩, + (eLpNorm_congr_ae hae).trans_le hbound⟩ + rw [mem_ppScheme one_ne_zero, Nat.log_one_right] + exact ⟨fun _ => P, fun _ => hP, MemLp.coeFn_toLp _⟩ + +/-- **Jackson's inequality for dyadic piecewise polynomials at every level**: for `1 ≤ p < ∞` and +`r ≥ 1` there is `C_J < ∞` with `E_{2^k}(f)_p ≤ C_J ω_r(f, 2^(-k), [0, 1])_p` for every +`f ∈ L_p[0, 1]` and every `k ≥ 0`; level `0` is Whitney's inequality. -/ +theorem exists_approxError_ppScheme_le {r : ℕ} (hr : 1 ≤ r) (hp : p ≠ ∞) : + ∃ CJ : ℝ≥0∞, CJ ≠ ∞ ∧ ∀ (f : Lp ℂ p unitVol) (k : ℕ), + (ppScheme p r).approxError f (2 ^ k) ≤ CJ * lpModulus p r f k := by + obtain ⟨W, hW, hWb⟩ := exists_approxError_ppScheme_one_le (p := p) hr hp (le_refl 2) + refine ⟨W + 2 * jacksonConst r, ENNReal.add_ne_top.2 ⟨hW, ENNReal.mul_ne_top (by norm_num) + (jacksonConst_ne_top r)⟩, fun f k => ?_⟩ + rcases Nat.eq_zero_or_pos k with rfl | hk + · rw [pow_zero] + exact (hWb f).trans (mul_le_mul' le_self_add (lpModulus_anti r f (Nat.zero_le 2))) + · exact (approxError_ppScheme_le hr hp f hk).trans (mul_le_mul' le_add_self le_rfl) + +end Interval + +/-! ### The modulus of elements of `L_p[0, 1]` for `0 < p ≤ 1` -/ + +namespace Interval + +variable {p : ℝ≥0∞} + +/-- The `p`-th power of the modulus of elements of `L_p[0, 1]`, `0 < p ≤ 1`, at the dyadic scale +`2^(-k)` is subadditive. -/ +theorem lpModulus_add_rpow_le (hp1 : p ≤ 1) (r : ℕ) (f g : Lp ℂ p unitVol) (k : ℕ) : + lpModulus p r (f + g) k ^ p.toReal ≤ + lpModulus p r f k ^ p.toReal + lpModulus p r g k ^ p.toReal := by + rw [lpModulus, modulus_congr_ae (Lp.coeFn_add f g)] + exact modulus_add_rpow_le hp1 r 0 1 _ _ _ + +/-- `ω_r(f, 2^(-k), [0, 1])_p ≤ 2^(r/p) ‖f‖_p` in `L_p[0, 1]`, `0 < p ≤ 1`. -/ +theorem lpModulus_le_of_le_one (hp1 : p ≤ 1) (r : ℕ) (f : Lp ℂ p unitVol) (k : ℕ) : + lpModulus p r f k ≤ 2 ^ ((r : ℝ) / p.toReal) * ‖f‖ₑ := by + rw [Lp.eNorm_def] + exact modulus_le_of_le_one (Lp.stronglyMeasurable f).measurable hp1 r 0 1 _ + +end Interval diff --git a/LeanPool/FunctionSpaces/Domains/Interval/PiecewisePeriodic.lean b/LeanPool/FunctionSpaces/Domains/Interval/PiecewisePeriodic.lean new file mode 100644 index 0000000000..a85f7e0702 --- /dev/null +++ b/LeanPool/FunctionSpaces/Domains/Interval/PiecewisePeriodic.lean @@ -0,0 +1,235 @@ +/- +Copyright (c) 2026 Mario Ullrich. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Mario Ullrich +-/ +module + +public import LeanPool.FunctionSpaces.Domains.Interval.PiecewiseInverse +public import LeanPool.FunctionSpaces.Domains.Interval.Periodic + +/- +Modified for Lean Pool: module names and imports adapted. +-/ + +/-! +# Piecewise polynomials on the circle + +On the circle `𝕋 = ℝ/ℤ`, identified with `[0, 1)` through the periodic extension +`f̃(x) = f(x - ⌊x⌋)`, the dyadic piecewise polynomials are the same functions as on `[0, 1)`, +so their scheme is `Interval.ppScheme` in `L_p[0, 1] = L_p(𝕋)`. Only the modulus changes: the +periodic modulus `ω_r^per(f, t)_p` of `FunctionSpaces.Domains.Interval.Periodic` also sees the knot +`0 = 1` of the circle. + +* **Jackson's inequality** `E_{2^k}(f)_p ≤ C ω_r^per(f, 2^(-k))_p` at every level follows from + the one on `[0, 1]`, since the periodic modulus is the larger one + (`Interval.exists_approxError_ppScheme_le_per`). +* **The inverse inequality** `ω_r^per(a, 2^(-k))_p ≤ C_B 2^(-(k-j)/p) ‖a‖_p` for `a ∈ V_j` + (`Interval.exists_inverse_ppScheme_per`) is the local inverse estimate for the periodic + extension, which is a piecewise polynomial on `[0, ∞)` (`Interval.isPiecewisePoly_perExt_ppFun`) + whose `2^j` consecutive pieces always make up one period + (`Interval.sum_localMass_perExt_le`). + +Hence for `1 ≤ p < ∞`, `1 ≤ q ≤ ∞`, `r ≥ 1` and `0 ≤ s < 1/p`, +`f ∈ A^s_q ↔ ‖f‖_p + ‖(2^(ks) ω_r^per(f, 2^(-k))_p)_k‖_{ℓ_q} < ∞` +(`Interval.memApprox_ppScheme_iff_per`): the approximation space is the Besov space +`B^s_{p,q}(𝕋)` for `0 < s < 1/p`. Comparing with `Interval.memApprox_ppScheme_iff`, the Besov +spaces `B^s_{p,q}[0, 1]` and `B^s_{p,q}(𝕋)` contain the same functions for `0 < s < 1/p` +(`Interval.lqNorm_modulus_lt_top_iff_perModulus`): below smoothness `1/p` a jump between the +ends of the interval does not count. +-/ + +@[expose] public section + +open MeasureTheory Set Polynomial +open scoped ENNReal +open ENNReal (dyadicWeight) + +namespace Interval + +variable {p : ℝ≥0∞} [Fact (1 ≤ p)] + +/-- The **pieces of the periodic extension** of a piecewise polynomial of level `k`: on `I_{k,m}` +with `m = m' + 2^k c`, `m' < 2^k`, the piece `Q_{m'}` shifted by `c`, `Q_{m'}(x - c)`. -/ +noncomputable def perPieces (k : ℕ) (Q : ℕ → ℂ[X]) (m : ℕ) : ℂ[X] := + (Q (m % 2 ^ k)).comp (X - C ((((m / 2 ^ k : ℕ) : ℝ) : ℝ) : ℂ)) + +/-- The pieces of the periodic extension in a given decomposition `m = m' + 2^k c`, `m' < 2^k`. -/ +theorem perPieces_eq (k : ℕ) (Q : ℕ → ℂ[X]) {m' : ℕ} (hm' : m' < 2 ^ k) (c : ℕ) : + perPieces k Q (m' + 2 ^ k * c) = (Q m').comp (X - C (((c : ℝ) : ℝ) : ℂ)) := by + have hpos : 0 < 2 ^ k := by positivity + rw [perPieces, Nat.add_mul_div_left _ _ hpos, Nat.div_eq_of_lt hm', zero_add, + Nat.add_mul_mod_self_left, Nat.mod_eq_of_lt hm'] + +/-- The pieces of the periodic extension have degree `< r`. -/ +theorem perPieces_mem {r : ℕ} {Q : ℕ → ℂ[X]} (hQ : ∀ n, Q n ∈ degreeLT ℂ r) (k m : ℕ) : + perPieces k Q m ∈ degreeLT ℂ r := by + have h : (X - C ((((m / 2 ^ k : ℕ) : ℝ) : ℝ) : ℂ) : ℂ[X]) = + C (-((((m / 2 ^ k : ℕ) : ℝ) : ℝ) : ℂ)) + C 1 * X := by + rw [C_neg, C_1, one_mul]; ring + rw [perPieces, h] + exact comp_affine_mem_degreeLT (hQ _) _ _ + +/-- **The periodic extension of a piecewise polynomial** of level `k` is the piece +`Interval.perPieces k Q m` on every `I_{k,m}`, `m ∈ ℕ`. -/ +theorem perExt_ppFun_eq (k : ℕ) (Q : ℕ → ℂ[X]) {m : ℕ} {x : ℝ} (hx : x ∈ dyadicIco k m) : + perExt (ppFun k Q) x = polyFun (perPieces k Q m) x := by + obtain ⟨c, m', hm', rfl⟩ : ∃ c m' : ℕ, m' < 2 ^ k ∧ m = m' + 2 ^ k * c := + ⟨m / 2 ^ k, m % 2 ^ k, Nat.mod_lt _ (by positivity), (Nat.mod_add_div m (2 ^ k)).symm⟩ + have hpos : (0 : ℝ) < 2 ^ k := by positivity + have hm'R : (m' : ℝ) + 1 ≤ 2 ^ k := by exact_mod_cast hm' + have hm'0 : (0 : ℝ) ≤ m' := Nat.cast_nonneg m' + rw [mem_dyadicIco] at hx + push_cast at hx + have hfl : ⌊x⌋ = (c : ℤ) := by + rw [Int.floor_eq_iff] + push_cast + constructor + · nlinarith + · nlinarith + have hfract : Int.fract x = x - c := by + rw [← Int.self_sub_floor, hfl] + push_cast + ring + have hmem : x - c ∈ dyadicIco k m' := by + rw [mem_dyadicIco] + constructor <;> nlinarith + rw [perExt, hfract, ppFun_eq_of_mem Q hm' hmem, perPieces_eq k Q hm' c] + simp only [polyFun, eval_comp, eval_sub, eval_X, eval_C] + push_cast + ring_nf + +/-- **The periodic extension of a piecewise polynomial** of level `k` is a piecewise polynomial +of level `k` on `[0, ∞)`, with the pieces `Interval.perPieces k Q`. -/ +theorem isPiecewisePoly_perExt_ppFun {r : ℕ} {Q : ℕ → ℂ[X]} (hQ : ∀ n, Q n ∈ degreeLT ℂ r) + (k : ℕ) : IsPiecewisePoly r k (perExt (ppFun k Q)) := fun m => + ⟨perPieces k Q m, perPieces_mem hQ k m, fun _ hx => perExt_ppFun_eq k Q hx⟩ + +/-- **The local masses of a periodic extension**: `2^k` consecutive pieces of the periodic +extension `ũ` make up one period, so `∑_{n < 2^k} ∫_{I_{k,n+l}} |ũ|^p ≤ ‖u‖_p^p`. -/ +theorem sum_localMass_perExt_le {u : ℝ → ℂ} (hu : Measurable u) (hp : p ≠ ∞) (k l : ℕ) : + ∑ n ∈ Finset.range (2 ^ k), localMass p k (perExt u) (n + l) ≤ + eLpNorm u p unitVol ^ p.toReal := by + have hp0 : p ≠ 0 := (lt_of_lt_of_le zero_lt_one (Fact.out : 1 ≤ p)).ne' + have hsum := sum_le_lintegral_Icc (G := fun x => ‖perExt u x‖ₑ ^ p.toReal) ((l : ℝ) / 2 ^ k) + (by positivity : (0 : ℝ) ≤ 1 / 2 ^ k) (2 ^ k) + have h1 : (l : ℝ) / 2 ^ k + ((2 ^ k : ℕ) : ℝ) * (1 / 2 ^ k) = l / 2 ^ k + 1 := by + push_cast + field_simp + rw [h1, lintegral_Icc_periodic (G := fun x => ‖perExt u x‖ₑ ^ p.toReal) + (fun x => by simp only [perExt_periodic u x])] at hsum + have hpieces : ∀ n : ℕ, localMass p k (perExt u) (n + l) = + ∫⁻ x in Icc ((l : ℝ) / 2 ^ k + n * (1 / 2 ^ k)) ((l : ℝ) / 2 ^ k + (n + 1) * (1 / 2 ^ k)), + ‖perExt u x‖ₑ ^ p.toReal := fun n => by + rw [localMass, ← setLIntegral_congr Ico_ae_eq_Icc, dyadicIco] + congr 2 + push_cast + ring_nf + rw [Finset.sum_congr rfl fun n _ => hpieces n] + refine hsum.trans (le_of_eq ?_) + rw [eLpNorm_rpow_eq hu.aestronglyMeasurable hp0 hp, ← setLIntegral_congr Ico_ae_eq_Icc] + rw [show (∫⁻ x, ‖u x‖ₑ ^ p.toReal ∂unitVol) = ∫⁻ x in Icc (0 : ℝ) 1, ‖u x‖ₑ ^ p.toReal from rfl, + ← setLIntegral_congr Ico_ae_eq_Icc] + exact setLIntegral_congr_fun measurableSet_Ico fun x hx => by rw [perExt_of_mem u hx] + +/-- **Bounded overlap on the circle**: `∑_{n < 2^k} ∑_{l ≤ r} ∫_{I_{k,n+l}} |ũ|^p ≤ (r + 1) ‖u‖_p^p` +for the periodic extension `ũ`. -/ +theorem sum_sum_localMass_perExt_le {u : ℝ → ℂ} (hu : Measurable u) (hp : p ≠ ∞) (k r : ℕ) : + ∑ n ∈ Finset.range (2 ^ k), ∑ l ∈ Finset.range (r + 1), localMass p k (perExt u) (n + l) ≤ + (r + 1) * eLpNorm u p unitVol ^ p.toReal := by + rw [Finset.sum_comm] + calc ∑ l ∈ Finset.range (r + 1), ∑ n ∈ Finset.range (2 ^ k), localMass p k (perExt u) (n + l) + ≤ ∑ _l ∈ Finset.range (r + 1), eLpNorm u p unitVol ^ p.toReal := + Finset.sum_le_sum fun l _ => sum_localMass_perExt_le hu hp k l + _ = (r + 1) * eLpNorm u p unitVol ^ p.toReal := by + rw [Finset.sum_const, Finset.card_range, nsmul_eq_mul] + push_cast + ring + +variable (p) in +/-- The periodic modulus of an element of `L_p[0, 1] = L_p(𝕋)` at the dyadic scale `2^(-k)`, +`ω_r^per(f, 2^(-k))_p`. -/ +noncomputable def lpPerModulus (r : ℕ) (f : Lp ℂ p unitVol) (k : ℕ) : ℝ≥0∞ := + perModulus r p (f : ℝ → ℂ) (1 / 2 ^ k) + +/-- The periodic modulus of elements of `L_p[0, 1]` is subadditive. -/ +theorem lpPerModulus_add_le (r : ℕ) (f g : Lp ℂ p unitVol) (k : ℕ) : + lpPerModulus p r (f + g) k ≤ lpPerModulus p r f k + lpPerModulus p r g k := by + rw [lpPerModulus, perModulus_congr_ae (Lp.coeFn_add f g)] + exact perModulus_add_le Fact.out r _ _ _ + +/-- `ω_r^per(f, t)_p ≤ 2^r ‖f‖_p` in `L_p[0, 1]`. -/ +theorem lpPerModulus_le (hp : p ≠ ∞) (r : ℕ) (f : Lp ℂ p unitVol) (k : ℕ) : + lpPerModulus p r f k ≤ 2 ^ r * ‖f‖ₑ := by + rw [Lp.eNorm_def] + exact perModulus_le (Lp.stronglyMeasurable f).measurable Fact.out hp r _ + +omit [Fact (1 ≤ p)] in +/-- The modulus on `[0, 1]` is at most the periodic modulus. -/ +theorem lpModulus_le_lpPerModulus (r : ℕ) (f : Lp ℂ p unitVol) (k : ℕ) : + lpModulus p r f k ≤ lpPerModulus p r f k := + modulus_le_perModulus r p _ _ + +/-- **Jackson's inequality on the circle**: for `1 ≤ p < ∞` and `r ≥ 1` there is `C_J < ∞` with +`E_{2^k}(f)_p ≤ C_J ω_r^per(f, 2^(-k))_p` for all `f` and all `k ≥ 0`, since the periodic modulus +dominates the modulus on `[0, 1]`. -/ +theorem exists_approxError_ppScheme_le_per {r : ℕ} (hr : 1 ≤ r) (hp : p ≠ ∞) : + ∃ CJ : ℝ≥0∞, CJ ≠ ∞ ∧ ∀ (f : Lp ℂ p unitVol) (k : ℕ), + (ppScheme p r).approxError f (2 ^ k) ≤ CJ * lpPerModulus p r f k := by + obtain ⟨CJ, hCJ, h⟩ := exists_approxError_ppScheme_le (p := p) hr hp + exact ⟨CJ, hCJ, fun f k => (h f k).trans (mul_le_mul' le_rfl (lpModulus_le_lpPerModulus r f k))⟩ + +/-- **The inverse inequality on the circle**, of order `1/p`: there is `C_B < ∞` with +`ω_r^per(a, 2^(-k))_p ≤ C_B 2^(-(k-j)/p) ‖a‖_p` for every piecewise polynomial `a` of level `j` +(and `k - j` truncated at `0`). -/ +theorem exists_inverse_ppScheme_per {r : ℕ} (hp : p ≠ ∞) : + ∃ CB : ℝ≥0∞, CB ≠ ∞ ∧ ∀ j k : ℕ, ∀ a ∈ ppScheme p r (2 ^ j), + lpPerModulus p r a k ≤ CB * dyadicWeight (-(1 / p.toReal)) (k - j) * ‖a‖ₑ := by + obtain ⟨K, hK, hKb⟩ := enorm_polyFun_le (p := p) r hp + refine ⟨ppInverseConst p r K, ppInverseConst_ne_top r hK, fun j k a ha => ?_⟩ + obtain ⟨Q, hQ, hae⟩ := mem_ppScheme_two_pow.1 ha + rcases lt_or_ge k j with hkj | hjk + · rw [Nat.sub_eq_zero_of_le hkj.le, ENNReal.dyadicWeight_zero_right, mul_one] + exact (lpPerModulus_le hp r a k).trans (by gcongr; exact two_pow_le_ppInverseConst r K) + · have hnorm : ‖a‖ₑ = eLpNorm (ppFun j Q) p unitVol := by + rw [Lp.eNorm_def] + exact eLpNorm_congr_ae hae + rw [lpPerModulus, perModulus_congr_ae hae, hnorm] + refine iSup₂_le fun h hh => ?_ + have hhj : h ≤ 1 / 2 ^ j := hh.2.trans (one_div_le_one_div_of_le (by positivity) + (pow_le_pow_right₀ (by norm_num) hjk)) + exact (eLpNorm_higherDiff_le_of_isPiecewisePoly (isPiecewisePoly_perExt_ppFun hQ j) + (measurable_perExt (measurable_ppFun j Q)) hKb hp hh.1 hhj + (sum_sum_localMass_perExt_le (measurable_ppFun j Q) hp j r)).trans + (le_ppInverseConst_mul hjk K hh.2 _) + +/-- The periodic modulus `ω_r^per(f, 2^(-k))_p` is compatible with the scheme of dyadic piecewise +polynomials of degree `< r`, with inverse order `θ = 1/p`. -/ +noncomputable def ppPerModulusData {r : ℕ} (hr : 1 ≤ r) (hp : p ≠ ∞) : + ApproximationScheme.ModulusData (ppScheme p r) (1 / p.toReal) := + .ofExists (lpPerModulus p r) (lpPerModulus_add_le r) (2 ^ r) (by simp) (lpPerModulus_le hp r) 0 + ((exists_approxError_ppScheme_le_per hr hp).imp fun _ h => ⟨h.1, fun f k _ => h.2 f k⟩) + (exists_inverse_ppScheme_per hp) + +/-- **Approximation by piecewise polynomials on the circle.** For `1 ≤ p < ∞`, `1 ≤ q ≤ ∞`, +`r ≥ 1` and `0 ≤ s < 1/p`, an `f ∈ L_p(𝕋) = L_p[0, 1]` lies in the approximation space `A^s_q` +of the dyadic piecewise polynomials of degree `< r` iff its periodic Besov quasi-norm +`‖f‖_p + ‖(2^(ks) ω_r^per(f, 2^(-k))_p)_k‖_{ℓ_q}` is finite. -/ +theorem memApprox_ppScheme_iff_per {r : ℕ} (hr : 1 ≤ r) (hp : p ≠ ∞) {s : ℝ} {q : ℝ≥0∞} + (hq : 1 ≤ q) (hs : 0 ≤ s) (hsp : s < 1 / p.toReal) (f : Lp ℂ p unitVol) : + (ppScheme p r).MemApprox s q f ↔ + ‖f‖ₑ + ENNReal.lqNorm q (fun k => dyadicWeight s k * lpPerModulus p r f k) < ∞ := + (ppPerModulusData hr hp).memApprox_iff_modNorm_lt_top hq hs hsp f + +/-- **Besov spaces on the interval and on the circle agree below smoothness `1/p`**: for +`1 ≤ p < ∞`, `1 ≤ q ≤ ∞`, `r ≥ 1` and `0 ≤ s < 1/p`, the Besov quasi-norm of `f ∈ L_p[0, 1]` +defined by the modulus on `[0, 1]` is finite iff the one defined by the periodic modulus is. +Both conditions describe the same approximation space. -/ +theorem lqNorm_modulus_lt_top_iff_perModulus {r : ℕ} (hr : 1 ≤ r) (hp : p ≠ ∞) {s : ℝ} + {q : ℝ≥0∞} (hq : 1 ≤ q) (hs : 0 ≤ s) (hsp : s < 1 / p.toReal) (f : Lp ℂ p unitVol) : + ‖f‖ₑ + ENNReal.lqNorm q (fun k => dyadicWeight s k * lpModulus p r f k) < ∞ ↔ + ‖f‖ₑ + ENNReal.lqNorm q (fun k => dyadicWeight s k * lpPerModulus p r f k) < ∞ := + (memApprox_ppScheme_iff hr hp hq hs hsp f).symm.trans + (memApprox_ppScheme_iff_per hr hp hq hs hsp f) + +end Interval diff --git a/LeanPool/FunctionSpaces/Domains/Interval/PiecewisePoly.lean b/LeanPool/FunctionSpaces/Domains/Interval/PiecewisePoly.lean new file mode 100644 index 0000000000..7ae28e4786 --- /dev/null +++ b/LeanPool/FunctionSpaces/Domains/Interval/PiecewisePoly.lean @@ -0,0 +1,469 @@ +/- +Copyright (c) 2026 Mario Ullrich. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Mario Ullrich +-/ +module + +public import LeanPool.FunctionSpaces.Analysis.Lp.LintegralForm +public import LeanPool.FunctionSpaces.Domains.Interval.Polynomials +public import Mathlib.MeasureTheory.Integral.IntervalIntegral.Basic +public import LeanPool.FunctionSpaces.ApproximationSpaces.Decompositions.Synthesis +public import Mathlib.Algebra.Order.Floor.Semifield + +/- +Modified for Lean Pool: module names and imports adapted. +-/ + +/-! +# Dyadic piecewise polynomials on `[0, 1]` + +A **piecewise polynomial of level `k` and degree `< r`** agrees on each dyadic interval +`I_{k,n} = [n 2^(-k), (n + 1) 2^(-k))` with a polynomial of degree `< r` +(`Interval.ppFun`). Their classes in `L_p[0, 1]` form subspaces `V_k` increasing in `k` +(`Interval.ppSpace`), and the scheme with approximants `V_{⌊log₂ n⌋}` of complexity `n` +(`Interval.ppScheme`, an `ApproximationScheme.ofMonotoneSubmodules`) has `V_k` as approximants +of complexity `2^k`. + +This file sets up the spaces, the bookkeeping for the pieces (on `I_{k,m}` a piecewise +polynomial is the polynomial `Q_m`, and `0` beyond `[0, 1)`, `Interval.ppFun_eq_polyFun`) and +for integrals over unions of dyadic intervals (`Interval.lintegral_Icc_le_sum`, +`Interval.lintegral_Icc_le_sum_dyadicIco`, `Interval.lintegral_unit_eq_sum_dyadicIco`); a dyadic +interval is the disjoint union of its two halves (`Interval.dyadicIco_eq_union`, +`Interval.disjoint_dyadicIco_halves`). A piecewise polynomial is bounded +(`Interval.exists_norm_ppFun_le`) and integrable on `[0, 1]` (`Interval.integrableOn_ppFun`). +Jackson's inequality is in `FunctionSpaces.Domains.Interval.PiecewiseJackson`, the inverse +inequality and the identification of the approximation spaces in +`FunctionSpaces.Domains.Interval.PiecewiseInverse`. +-/ + +@[expose] public section + +open MeasureTheory Set Polynomial +open scoped ENNReal BoundedContinuousFunction ComplexConjugate +open ENNReal (dyadicWeight) + +namespace Interval + +/-- Lebesgue measure on `[0, 1]`. -/ +noncomputable abbrev unitVol : Measure ℝ := volume.restrict (Icc (0 : ℝ) 1) + +/-- Lebesgue measure on `[0, 1]` is a probability measure. -/ +instance isProbabilityMeasure_unitVol : IsProbabilityMeasure unitVol := + ⟨by simp [unitVol, Real.volume_Icc]⟩ + +/-- Almost every point of `[0, 1]` lies in `[0, 1)`. -/ +theorem ae_mem_Ico_unitVol : ∀ᵐ x ∂unitVol, x ∈ Ico (0 : ℝ) 1 := by + rw [unitVol, ← Measure.restrict_congr_set Ico_ae_eq_Icc] + exact ae_restrict_mem measurableSet_Ico + +/-- The dyadic interval `I_{k,n} = [n 2^(-k), (n + 1) 2^(-k))`. -/ +noncomputable def dyadicIco (k n : ℕ) : Set ℝ := Ico ((n : ℝ) / 2 ^ k) ((n + 1) / 2 ^ k) + +/-- Dyadic intervals are measurable. -/ +theorem measurableSet_dyadicIco (k n : ℕ) : MeasurableSet (dyadicIco k n) := measurableSet_Ico + +/-- `x ∈ I_{k,n}` iff `n ≤ 2^k x < n + 1`. -/ +theorem mem_dyadicIco {k n : ℕ} {x : ℝ} : + x ∈ dyadicIco k n ↔ (n : ℝ) ≤ 2 ^ k * x ∧ 2 ^ k * x < n + 1 := by + have h : (0 : ℝ) < 2 ^ k := by positivity + rw [dyadicIco, mem_Ico, div_le_iff₀ h, lt_div_iff₀ h, mul_comm x] + +/-- Dyadic intervals of one level are disjoint. -/ +theorem eq_of_mem_dyadicIco {k n m : ℕ} {x : ℝ} (hn : x ∈ dyadicIco k n) + (hm : x ∈ dyadicIco k m) : n = m := by + rw [mem_dyadicIco] at hn hm + by_contra hne + rcases Nat.lt_or_gt_of_ne hne with h | h + · have : (n : ℝ) + 1 ≤ m := by exact_mod_cast h + linarith [hn.2, hm.1] + · have : (m : ℝ) + 1 ≤ n := by exact_mod_cast h + linarith [hm.2, hn.1] + +/-- A point of `[0, 1)` lies in the dyadic interval `I_{k, ⌊2^k x⌋}`, of index `< 2^k`. -/ +theorem mem_dyadicIco_floor {k : ℕ} {x : ℝ} (hx : x ∈ Ico (0 : ℝ) 1) : + x ∈ dyadicIco k ⌊2 ^ k * x⌋₊ ∧ ⌊2 ^ k * x⌋₊ < 2 ^ k := by + have h0 : 0 ≤ 2 ^ k * x := mul_nonneg (by positivity) hx.1 + refine ⟨mem_dyadicIco.2 ⟨Nat.floor_le h0, Nat.lt_floor_add_one _⟩, ?_⟩ + have : 2 ^ k * x < (2 ^ k : ℕ) := by + push_cast + exact mul_lt_of_lt_one_right (by positivity) hx.2 + exact (Nat.floor_lt h0).2 this + +/-- The parent dyadic interval: `⌊2^k x⌋ = ⌊2^(k+1) x⌋ / 2`. -/ +theorem floor_two_pow_succ_div (k : ℕ) (x : ℝ) : + ⌊2 ^ (k + 1) * x⌋₊ / 2 = ⌊2 ^ k * x⌋₊ := by + rw [← Nat.floor_div_natCast] + congr 1 + push_cast + ring + +/-- The **piecewise polynomial** `∑_n 1_{I_{k,n}} Q_n` of level `k`. -/ +noncomputable def ppFun (k : ℕ) (Q : ℕ → ℂ[X]) (x : ℝ) : ℂ := + ∑ n ∈ Finset.range (2 ^ k), (dyadicIco k n).indicator (polyFun (Q n)) x + +/-- On `I_{k,n}` the piecewise polynomial is `Q_n`. -/ +theorem ppFun_eq_of_mem {k n : ℕ} (Q : ℕ → ℂ[X]) {x : ℝ} (hn : n < 2 ^ k) + (hx : x ∈ dyadicIco k n) : ppFun k Q x = polyFun (Q n) x := by + rw [ppFun, Finset.sum_eq_single n (fun m _ hmn => indicator_of_notMem + (fun hm => hmn (eq_of_mem_dyadicIco hm hx)) _) + (fun h => absurd (Finset.mem_range.2 hn) h), indicator_of_mem hx] + +/-- Piecewise polynomials are measurable. -/ +theorem measurable_ppFun (k : ℕ) (Q : ℕ → ℂ[X]) : Measurable (ppFun k Q) := + Finset.measurable_sum _ fun n _ => + (measurable_polyFun (Q n)).indicator (measurableSet_dyadicIco k n) + +/-- Piecewise polynomials lie in `L_p[0, 1]`. -/ +theorem memLp_ppFun (k : ℕ) (Q : ℕ → ℂ[X]) (p : ℝ≥0∞) : MemLp (ppFun k Q) p unitVol := by + have : ppFun k Q = ∑ n ∈ Finset.range (2 ^ k), (dyadicIco k n).indicator (polyFun (Q n)) := by + funext x; rw [ppFun, Finset.sum_apply] + rw [this] + exact memLp_finsetSum' _ fun n _ => + (memLp_polyFun (Q n) p 0 1).indicator (measurableSet_dyadicIco k n).nullMeasurableSet + +/-- Piecewise polynomials are additive in the pieces. -/ +theorem ppFun_add (k : ℕ) (Q Q' : ℕ → ℂ[X]) : + ppFun k (Q + Q') = ppFun k Q + ppFun k Q' := by + funext x + simp only [ppFun, Pi.add_apply, ← Finset.sum_add_distrib] + refine Finset.sum_congr rfl fun n _ => ?_ + by_cases hx : x ∈ dyadicIco k n + · simp [indicator_of_mem hx, polyFun] + · simp [indicator_of_notMem hx] + +/-- Piecewise polynomials are homogeneous in the pieces. -/ +theorem ppFun_const_mul (k : ℕ) (c : ℂ) (Q : ℕ → ℂ[X]) : + ppFun k (fun n => C c * Q n) = fun x => c * ppFun k Q x := by + funext x + simp only [ppFun, Finset.mul_sum] + refine Finset.sum_congr rfl fun n _ => ?_ + by_cases hx : x ∈ dyadicIco k n + · simp [indicator_of_mem hx, polyFun] + · simp [indicator_of_notMem hx] + +/-- The zero polynomial. -/ +theorem polyFun_zero : polyFun 0 = 0 := funext fun x => by simp [polyFun] + +/-- The piecewise polynomials of level `k` with zero pieces vanish. -/ +theorem ppFun_zero (k : ℕ) : ppFun k 0 = 0 := by + funext x + simp [ppFun, polyFun_zero] + +/-- Piecewise polynomials are additive in the pieces, for finite sums. -/ +theorem ppFun_sum {ι : Type*} (k : ℕ) (s : Finset ι) (Q : ι → ℕ → ℂ[X]) : + ppFun k (∑ i ∈ s, Q i) = ∑ i ∈ s, ppFun k (Q i) := by + classical + induction s using Finset.induction_on with + | empty => simp [ppFun_zero] + | insert j s hj ih => rw [Finset.sum_insert hj, Finset.sum_insert hj, ppFun_add, ih] + +/-- The dyadic intervals `I_{k,n}`, `n < 2^k`, lie in `[0, 1)`. -/ +theorem dyadicIco_subset {k n : ℕ} (hn : n < 2 ^ k) : dyadicIco k n ⊆ Ico 0 1 := by + intro x hx + rw [mem_dyadicIco] at hx + have h2 : (0 : ℝ) < 2 ^ k := by positivity + have hn' : (n : ℝ) + 1 ≤ 2 ^ k := by exact_mod_cast Nat.succ_le_of_lt hn + have hn0 : (0 : ℝ) ≤ n := Nat.cast_nonneg n + constructor + · nlinarith + · nlinarith + +/-- A piecewise polynomial vanishes outside `[0, 1)`. -/ +theorem ppFun_eq_zero {k : ℕ} (Q : ℕ → ℂ[X]) {x : ℝ} (hx : x ∉ Ico (0 : ℝ) 1) : + ppFun k Q x = 0 := + Finset.sum_eq_zero fun _ hn => + indicator_of_notMem (fun h => hx (dyadicIco_subset (Finset.mem_range.1 hn) h)) _ + +/-- **Piecewise polynomials are bounded**: for every level `k` and pieces `Q` there is `M` with +`‖ppFun k Q x‖ ≤ M` for all `x ∈ ℝ`, since each piece is a polynomial on a subinterval of the +compact interval `[0, 1]`. -/ +theorem exists_norm_ppFun_le (k : ℕ) (Q : ℕ → ℂ[X]) : ∃ M : ℝ, ∀ x, ‖ppFun k Q x‖ ≤ M := by + choose M hM using fun n : ℕ => + (isCompact_Icc (a := (0 : ℝ)) (b := 1)).exists_bound_of_continuousOn + (continuous_polyFun (Q n)).continuousOn + refine ⟨∑ n ∈ Finset.range (2 ^ k), M n, fun x => ?_⟩ + rw [ppFun] + refine (norm_sum_le _ _).trans (Finset.sum_le_sum fun n hn => ?_) + by_cases hx : x ∈ dyadicIco k n + · rw [indicator_of_mem hx] + exact hM n x (Ico_subset_Icc_self (dyadicIco_subset (Finset.mem_range.1 hn) hx)) + · rw [indicator_of_notMem hx, norm_zero] + exact (norm_nonneg _).trans (hM n 0 ⟨le_rfl, zero_le_one⟩) + +/-- Piecewise polynomials are integrable on `[0, 1]`. -/ +theorem integrableOn_ppFun (k : ℕ) (Q : ℕ → ℂ[X]) : IntegrableOn (ppFun k Q) (Icc (0 : ℝ) 1) := + memLp_one_iff_integrable.1 (memLp_ppFun k Q 1) + +/-- **Refinement of piecewise polynomials, everywhere**: the pieces `Q_{⌊n/2⌋}` of level `k + 1` +give the same function as the pieces `Q_n` of level `k`, on all of `ℝ`. -/ +theorem ppFun_refine_eq (k : ℕ) (Q : ℕ → ℂ[X]) : + ppFun (k + 1) (fun n => Q (n / 2)) = ppFun k Q := by + funext x + by_cases hx : x ∈ Ico (0 : ℝ) 1 + · obtain ⟨h1, h1'⟩ := mem_dyadicIco_floor (k := k + 1) hx + obtain ⟨h2, h2'⟩ := mem_dyadicIco_floor (k := k) hx + rw [ppFun_eq_of_mem _ h1' h1, ppFun_eq_of_mem _ h2' h2, floor_two_pow_succ_div] + · rw [ppFun_eq_zero _ hx, ppFun_eq_zero _ hx] + +/-- **Refinement**: a piecewise polynomial of level `k` is one of level `k + 1` with the pieces +`Q_{⌊n/2⌋}`, almost everywhere on `[0, 1]` (`Interval.ppFun_refine_eq` holds everywhere). -/ +theorem ppFun_refine (k : ℕ) (Q : ℕ → ℂ[X]) : + ppFun (k + 1) (fun n => Q (n / 2)) =ᵐ[unitVol] ppFun k Q := + Filter.EventuallyEq.of_eq (ppFun_refine_eq k Q) + +variable {p : ℝ≥0∞} [Fact (1 ≤ p)] + +variable (p) in +/-- The space `V_k` of **piecewise polynomials of level `k` and degree `< r`** in `L_p[0, 1]`. -/ +noncomputable def ppSpace (r k : ℕ) : Submodule ℝ (Lp ℂ p unitVol) where + carrier := {g | ∃ Q : ℕ → ℂ[X], (∀ n, Q n ∈ degreeLT ℂ r) ∧ + (g : ℝ → ℂ) =ᵐ[unitVol] ppFun k Q} + add_mem' := by + rintro g g' ⟨Q, hQ, hg⟩ ⟨Q', hQ', hg'⟩ + refine ⟨Q + Q', fun n => Submodule.add_mem _ (hQ n) (hQ' n), ?_⟩ + filter_upwards [Lp.coeFn_add g g', hg, hg'] with x h1 h2 h3 + rw [h1, Pi.add_apply, h2, h3, ppFun_add, Pi.add_apply] + zero_mem' := ⟨0, fun n => Submodule.zero_mem _, by + filter_upwards [Lp.coeFn_zero ℂ p unitVol] with x hx + rw [hx, ppFun_zero]⟩ + smul_mem' := by + rintro c g ⟨Q, hQ, hg⟩ + refine ⟨fun n => C (c : ℂ) * Q n, fun n => ?_, ?_⟩ + · change C (c : ℂ) * Q n ∈ degreeLT ℂ r + rw [← smul_eq_C_mul]; exact Submodule.smul_mem _ _ (hQ n) + · filter_upwards [Lp.coeFn_smul c g, hg] with x h1 h2 + rw [h1, Pi.smul_apply, h2, ppFun_const_mul, Complex.real_smul] + +omit [Fact (1 ≤ p)] in +/-- The spaces of piecewise polynomials increase with the level. -/ +theorem ppSpace_mono (r : ℕ) : Monotone (ppSpace p r) := by + refine monotone_nat_of_le_succ fun k g hg => ?_ + obtain ⟨Q, hQ, hgQ⟩ := hg + exact ⟨fun n => Q (n / 2), fun n => hQ _, hgQ.trans (ppFun_refine k Q).symm⟩ + +variable (p) in +/-- The **scheme of dyadic piecewise polynomials** of degree `< r` in `L_p[0, 1]`: `{0}` at +complexity `0` and `V_{⌊log₂ n⌋}` at complexity `n ≥ 1`. -/ +noncomputable def ppScheme (r : ℕ) : ApproximationScheme (Lp ℂ p unitVol) := + ApproximationScheme.ofMonotoneSubmodules (ppSpace p r) (ppSpace_mono r) + +/-- The approximants of complexity `0` are `{0}`. -/ +theorem mem_ppScheme_zero {r : ℕ} {g : Lp ℂ p unitVol} : g ∈ ppScheme p r 0 ↔ g = 0 := + ApproximationScheme.mem_ofMonotoneSubmodules_zero + +/-- The approximants of complexity `n ≥ 1` are the piecewise polynomials of level `⌊log₂ n⌋`. -/ +theorem mem_ppScheme {r n : ℕ} (hn : n ≠ 0) {g : Lp ℂ p unitVol} : + g ∈ ppScheme p r n ↔ g ∈ ppSpace p r (Nat.log 2 n) := + ApproximationScheme.mem_ofMonotoneSubmodules hn + +/-- The approximants of complexity `2^k` are the piecewise polynomials of level `k`. -/ +theorem mem_ppScheme_two_pow {r k : ℕ} {g : Lp ℂ p unitVol} : + g ∈ ppScheme p r (2 ^ k) ↔ g ∈ ppSpace p r k := + ApproximationScheme.mem_ofMonotoneSubmodules_two_pow + +/-- The piecewise polynomial scheme is linear. -/ +theorem ppScheme_isLinear (r : ℕ) : (ppScheme p r).IsLinear := + ApproximationScheme.isLinear_ofMonotoneSubmodules _ _ + +/-- **Integrals over a union of intervals**: `∫_{[u, u + mL]} G ≤ ∑_{n < m} ∫_{[u + nL, u + +(n+1)L]} G` +for `L ≥ 0`. -/ +theorem lintegral_Icc_le_sum (G : ℝ → ℝ≥0∞) (u : ℝ) {L : ℝ} (hL : 0 ≤ L) (m : ℕ) : + ∫⁻ x in Icc u (u + m * L), G x ≤ + ∑ n ∈ Finset.range m, ∫⁻ x in Icc (u + n * L) (u + (n + 1) * L), G x := by + induction m with + | zero => + simp only [CharP.cast_eq_zero, zero_mul, add_zero, Finset.range_zero, Finset.sum_empty] + rw [Icc_self, setLIntegral_measure_zero _ _ (Real.volume_singleton)] + | succ m ih => + rw [Finset.sum_range_succ] + have hsplit : Icc u (u + ((m + 1 : ℕ) : ℝ) * L) = + Icc u (u + m * L) ∪ Icc (u + m * L) (u + (m + 1) * L) := by + push_cast + exact (Icc_union_Icc_eq_Icc (by nlinarith [Nat.cast_nonneg (α := ℝ) m]) + (by nlinarith)).symm + rw [hsplit] + exact (lintegral_union_le _ _ _).trans (add_le_add ih le_rfl) + +/-- **Integrals over a union of intervals, reverse inequality**: for measurable `G` and `L ≥ 0`, +`∑_{n < m} ∫_{[u + nL, u + (n+1)L]} G ≤ ∫_{[u, u + mL]} G`, the intervals meeting in single +points. -/ +theorem sum_le_lintegral_Icc {G : ℝ → ℝ≥0∞} (u : ℝ) {L : ℝ} (hL : 0 ≤ L) (m : ℕ) : + ∑ n ∈ Finset.range m, ∫⁻ x in Icc (u + n * L) (u + (n + 1) * L), G x ≤ + ∫⁻ x in Icc u (u + m * L), G x := by + have hIco : ∀ a b : ℝ, ∫⁻ x in Icc a b, G x = ∫⁻ x in Ico a b, G x := fun a b => + (setLIntegral_congr Ico_ae_eq_Icc).symm + simp_rw [hIco] + refine le_of_eq ?_ + induction m with + | zero => simp + | succ m ih => + rw [Finset.sum_range_succ, ih] + have hsplit : Ico u (u + ((m + 1 : ℕ) : ℝ) * L) = + Ico u (u + m * L) ∪ Ico (u + m * L) (u + (m + 1) * L) := by + push_cast + exact (Ico_union_Ico_eq_Ico (by nlinarith [Nat.cast_nonneg (α := ℝ) m]) + (by nlinarith)).symm + rw [hsplit, lintegral_union measurableSet_Ico (Ico_disjoint_Ico_same.mono_left + (fun _ h => h) |>.mono_right (fun _ h => h))] + +/-- The closed intervals `[0 + n 2^(-k), 0 + (n + 1) 2^(-k)]` of `Interval.lintegral_Icc_le_sum` +agree with the dyadic intervals up to a null set. -/ +theorem lintegral_Icc_eq_dyadicIco (G : ℝ → ℝ≥0∞) (k n : ℕ) : + ∫⁻ x in Icc ((0 : ℝ) + n * (1 / 2 ^ k)) ((0 : ℝ) + (n + 1) * (1 / 2 ^ k)), G x = + ∫⁻ x in dyadicIco k n, G x := by + have hIco : + Ico ((0 : ℝ) + n * (1 / 2 ^ k)) ((0 : ℝ) + (n + 1) * (1 / 2 ^ k)) = dyadicIco k n := by + rw [dyadicIco] + congr 1 <;> ring + rw [← setLIntegral_congr Ico_ae_eq_Icc, hIco] + +/-- `[0, 1]` is the union of the `2^k` intervals of length `2^(-k)` starting at `0`. -/ +theorem zero_add_two_pow_mul_eq_one (k : ℕ) : (0 : ℝ) + ((2 ^ k : ℕ) : ℝ) * (1 / 2 ^ k) = 1 := by + rw [zero_add]; push_cast; field_simp + +/-- **`[0, 1]` against the dyadic intervals**: `∫_{[0,1]} G ≤ ∑_{n < 2^k} ∫_{I_{k,n}} G`. -/ +theorem lintegral_Icc_le_sum_dyadicIco (G : ℝ → ℝ≥0∞) (k : ℕ) : + ∫⁻ x in Icc (0 : ℝ) 1, G x ≤ ∑ n ∈ Finset.range (2 ^ k), ∫⁻ x in dyadicIco k n, G x := by + have hsplit := lintegral_Icc_le_sum G 0 (by positivity : (0 : ℝ) ≤ 1 / 2 ^ k) (2 ^ k) + rw [zero_add_two_pow_mul_eq_one] at hsplit + exact hsplit.trans_eq (Finset.sum_congr rfl fun n _ => lintegral_Icc_eq_dyadicIco G k n) + +/-- **The dyadic intervals against `[0, 1]`**: `∑_{n < 2^k} ∫_{I_{k,n}} G ≤ ∫_{[0,1]} G`. -/ +theorem sum_lintegral_dyadicIco_le (G : ℝ → ℝ≥0∞) (k : ℕ) : + ∑ n ∈ Finset.range (2 ^ k), ∫⁻ x in dyadicIco k n, G x ≤ ∫⁻ x in Icc (0 : ℝ) 1, G x := by + have hsum := sum_le_lintegral_Icc (G := G) 0 (by positivity : (0 : ℝ) ≤ 1 / 2 ^ k) (2 ^ k) + rw [zero_add_two_pow_mul_eq_one] at hsum + exact (Finset.sum_congr rfl fun n _ => (lintegral_Icc_eq_dyadicIco G k n).symm).trans_le hsum + +/-- Continuous functions are integrable on the dyadic intervals. -/ +theorem integrableOn_dyadicIco_of_continuous {F : ℝ → ℂ} (hF : Continuous F) (k m : ℕ) : + IntegrableOn F (dyadicIco k m) := + hF.integrableOn_Icc.mono_set Ico_subset_Icc_self + +/-- Floor of `2^k x` on a dyadic interval: `x ∈ I_{k,n}` gives `⌊2^k x⌋ = n`. -/ +theorem floor_eq_of_mem_dyadicIco {k n : ℕ} {x : ℝ} (hx : x ∈ dyadicIco k n) : + ⌊2 ^ k * x⌋₊ = n := by + rw [mem_dyadicIco] at hx + exact (Nat.floor_eq_iff ((Nat.cast_nonneg n).trans hx.1)).2 hx + +/-- The dyadic intervals of one level are pairwise disjoint. -/ +theorem pairwise_disjoint_dyadicIco (k : ℕ) : Pairwise (Function.onFun Disjoint (dyadicIco k)) := + fun _ _ hnm => Set.disjoint_left.2 fun _ hn hm => hnm (eq_of_mem_dyadicIco hn hm) + +/-- On `I_{k,m}` a piecewise polynomial of level `k` is a polynomial: `Q_m` for `m < 2^k`, and +`0` for the intervals beyond `[0, 1)`. -/ +theorem ppFun_eq_polyFun {k m : ℕ} (Q : ℕ → ℂ[X]) {x : ℝ} (hx : x ∈ dyadicIco k m) : + ppFun k Q x = polyFun (if m < 2 ^ k then Q m else 0) x := by + split_ifs with hm + · exact ppFun_eq_of_mem Q hm hx + · rw [polyFun_zero, Pi.zero_apply] + exact Finset.sum_eq_zero fun n hn => indicator_of_notMem + (fun h => hm (eq_of_mem_dyadicIco h hx ▸ Finset.mem_range.1 hn)) _ + +/-- The piece `Q_m` (or `0` beyond `[0, 1)`) has degree `< r`. -/ +theorem ite_mem_degreeLT {r : ℕ} {Q : ℕ → ℂ[X]} (hQ : ∀ n, Q n ∈ degreeLT ℂ r) (k m : ℕ) : + (if m < 2 ^ k then Q m else 0) ∈ degreeLT ℂ r := by + split_ifs + · exact hQ m + · exact zero_mem _ + +/-! ### Halves, lengths and integrals of the dyadic intervals -/ + +/-- The integral over `[0, 1]` is the sum over the dyadic intervals of level `k`. -/ +theorem lintegral_unit_eq_sum_dyadicIco (G : ℝ → ℝ≥0∞) (k : ℕ) : + ∫⁻ x in Icc (0 : ℝ) 1, G x = ∑ n ∈ Finset.range (2 ^ k), ∫⁻ x in dyadicIco k n, G x := + le_antisymm (lintegral_Icc_le_sum_dyadicIco G k) (sum_lintegral_dyadicIco_le G k) + +/-- A function integrable on a measurable bounded set, times a polynomial, is integrable there. -/ +theorem integrableOn_mul_polyFun {g : ℝ → ℂ} {s : Set ℝ} (hg : IntegrableOn g s) + (hsm : MeasurableSet s) {a b : ℝ} (hs : s ⊆ Icc a b) (Q : ℂ[X]) : + IntegrableOn (fun x => g x * polyFun Q x) s := by + obtain ⟨M, hM⟩ := (isCompact_Icc (a := a) (b := b)).exists_bound_of_continuousOn + (continuous_polyFun Q).continuousOn + exact hg.mul_bdd (c := M) (continuous_polyFun Q).aestronglyMeasurable + ((ae_restrict_iff' hsm).2 (Filter.Eventually.of_forall fun x hx => hM x (hs hx))) + +/-- The dyadic interval `I_{k,m}` is the union of its halves `I_{k+1,2m}` and `I_{k+1,2m+1}`. -/ +theorem dyadicIco_eq_union (k m : ℕ) : + dyadicIco k m = dyadicIco (k + 1) (2 * m) ∪ dyadicIco (k + 1) (2 * m + 1) := by + have h2 : (2 : ℝ) ^ k ≠ 0 := by positivity + have e1 : ((2 * m : ℕ) : ℝ) / 2 ^ (k + 1) = (m : ℝ) / 2 ^ k := by + push_cast; rw [pow_succ]; field_simp + have e2 : (((2 * m + 1 : ℕ) : ℝ) + 1) / 2 ^ (k + 1) = ((m : ℝ) + 1) / 2 ^ k := by + push_cast; rw [pow_succ]; field_simp; ring + have e3 : ((2 * m : ℕ) : ℝ) + 1 = ((2 * m + 1 : ℕ) : ℝ) := by push_cast; ring + rw [dyadicIco, dyadicIco, dyadicIco, e1, e2, e3, Ico_union_Ico_eq_Ico] + · rw [← e1] + gcongr + exact_mod_cast Nat.le_succ _ + · rw [← e2] + gcongr + linarith + +/-- The halves of a dyadic interval are disjoint. -/ +theorem disjoint_dyadicIco_halves (k m : ℕ) : + Disjoint (dyadicIco (k + 1) (2 * m)) (dyadicIco (k + 1) (2 * m + 1)) := + pairwise_disjoint_dyadicIco (k + 1) (by omega) + +/-- `I_{j,m}` has length `2^(-j)`. -/ +theorem volume_dyadicIco (j m : ℕ) : volume (dyadicIco j m) = ENNReal.ofReal (1 / 2 ^ j) := by + rw [dyadicIco, Real.volume_Ico] + congr 1 + ring + +/-- `|I_{j,n}| = 2^(-j)`, written as an inverse in `[0, ∞]`. -/ +theorem volume_dyadicIco_eq_inv (j n : ℕ) : volume (dyadicIco j n) = ((2 : ℝ≥0∞) ^ j)⁻¹ := by + rw [volume_dyadicIco, one_div, ENNReal.ofReal_inv_of_pos (by positivity), + ENNReal.ofReal_pow zero_le_two, ENNReal.ofReal_ofNat] + +/-- **Change of variables** on a dyadic interval: +`2^j ∫_{I_{j,m}} φ = ∫_0^1 φ(t 2^(-j) + m 2^(-j))`. -/ +theorem integral_dyadicIco_eq (j m : ℕ) (φ : ℝ → ℂ) : + (((2 : ℝ) ^ j : ℝ) : ℂ) * ∫ y in dyadicIco j m, φ y = + ∫ t in Icc (0 : ℝ) 1, φ (t / 2 ^ j + m / 2 ^ j) := by + have h2 : (2 : ℝ) ^ j ≠ 0 := by positivity + have hle : (m : ℝ) / 2 ^ j ≤ (m + 1) / 2 ^ j := by + have : (0 : ℝ) < 2 ^ j := by positivity + rw [div_le_div_iff_of_pos_right this] + linarith + have hL : ∫ y in dyadicIco j m, φ y = ∫ y in ((m : ℝ) / 2 ^ j)..((m + 1) / 2 ^ j), φ y := by + rw [intervalIntegral.integral_of_le hle, dyadicIco, integral_Ico_eq_integral_Ioo, + integral_Ioc_eq_integral_Ioo] + have hR : ∫ t in Icc (0 : ℝ) 1, φ (t / 2 ^ j + m / 2 ^ j) = + ∫ t in (0 : ℝ)..1, φ (t / 2 ^ j + m / 2 ^ j) := by + rw [intervalIntegral.integral_of_le zero_le_one, integral_Icc_eq_integral_Ioc] + have hb1 : (0 : ℝ) / 2 ^ j + m / 2 ^ j = m / 2 ^ j := by rw [zero_div, zero_add] + have hb2 : (1 : ℝ) / 2 ^ j + m / 2 ^ j = (m + 1) / 2 ^ j := by ring + rw [hL, hR, intervalIntegral.integral_comp_div_add φ h2, hb1, hb2, Complex.real_smul] + +/-- Piecewise polynomials only depend on the pieces in `[0, 1)`. -/ +theorem ppFun_congr {k : ℕ} {Q Q' : ℕ → ℂ[X]} (h : ∀ n < 2 ^ k, polyFun (Q n) = polyFun (Q' n)) : + ppFun k Q = ppFun k Q' := by + funext x + exact Finset.sum_congr rfl fun n hn => by rw [h n (Finset.mem_range.1 hn)] + +/-- The conjugate of a piecewise polynomial is the piecewise polynomial with the conjugate +pieces. -/ +theorem conj_ppFun (k : ℕ) (Q : ℕ → ℂ[X]) (x : ℝ) : + conj (ppFun k Q x) = ppFun k (fun n => (Q n).map (starRingEnd ℂ)) x := by + simp only [ppFun, map_sum] + refine Finset.sum_congr rfl fun n _ => ?_ + by_cases hx : x ∈ dyadicIco k n + · rw [indicator_of_mem hx, indicator_of_mem hx, polyFun_map_conj] + · rw [indicator_of_notMem hx, indicator_of_notMem hx, map_zero] + +omit [Fact (1 ≤ p)] in +/-- Almost everywhere on `[0, 1]` gives almost everywhere on the dyadic intervals in `[0, 1)`. -/ +theorem ae_dyadicIco_of_unitVol {F G : ℝ → ℂ} (h : F =ᵐ[unitVol] G) {j m : ℕ} (hm : m < 2 ^ j) : + F =ᵐ[volume.restrict (dyadicIco j m)] G := + ae_restrict_of_ae_restrict_of_subset ((dyadicIco_subset hm).trans Ico_subset_Icc_self) h + +/-- Elements of `L_p[0, 1]` are integrable on the dyadic intervals in `[0, 1)`. -/ +theorem integrableOn_dyadicIco (f : Lp ℂ p unitVol) {j m : ℕ} (hm : m < 2 ^ j) : + IntegrableOn f (dyadicIco j m) := + IntegrableOn.mono_set ((Lp.memLp f).integrable Fact.out) + ((dyadicIco_subset hm).trans Ico_subset_Icc_self) + +end Interval diff --git a/LeanPool/FunctionSpaces/Domains/Interval/PolyDifferences.lean b/LeanPool/FunctionSpaces/Domains/Interval/PolyDifferences.lean new file mode 100644 index 0000000000..db3090b769 --- /dev/null +++ b/LeanPool/FunctionSpaces/Domains/Interval/PolyDifferences.lean @@ -0,0 +1,176 @@ +/- +Copyright (c) 2026 Mario Ullrich. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Mario Ullrich +-/ +module + +public import LeanPool.FunctionSpaces.Domains.Interval.Taylor +public import Mathlib.Analysis.Calculus.MeanValue + +/- +Modified for Lean Pool: module names and imports adapted. +-/ + +/-! +# Differences of polynomials of every order + +For a polynomial `P` of degree `< r` the difference of order `m ≥ r` vanishes +(`Interval.higherDiff_polynomial`); differences of lower order are small instead. If +`|P^(m)| ≤ M` on `[y, y + mσ]`, `σ ≥ 0`, then `|Δ_σ^m P(y)| ≤ σ^m M` +(`Interval.norm_higherDiff_polyFun_le`), by induction on `m` with the mean value theorem, since the +derivative of `Δ_σ^m P` is `Δ_σ^m P'` (`Interval.hasDerivAt_higherDiff_polyFun`). + +On the finite-dimensional space of polynomials of degree `< r` every linear map is bounded by +the `L_p` norm on an interval (`Interval.exists_enorm_linearMap_le_eLpNorm`, in +`FunctionSpaces.Domains.Interval.Polynomials`); for the `m`-th derivative this is a form of Markov's +inequality. After rescaling, the polynomials satisfy a +**difference bound** of order `m` (`Interval.DiffBound`, `Interval.exists_diffBound`): +`|Δ_t^m P(x)| ≤ K (t/L)^m L^(-1/p) ‖P‖_{L_p[u, u + L]}` for `x, x + mt ∈ [u, u + 2L]`. For `m = 0` +this is Nikolskii's bound (`Interval.NikolskiiBound`). +-/ + +@[expose] public section + +open MeasureTheory Set Polynomial +open Rd (higherDiff) +open scoped ENNReal + +namespace Interval + +/-- The derivatives of polynomials of degree `< r` have degree `< r`. -/ +theorem iterate_derivative_mem_degreeLT {r : ℕ} {P : ℂ[X]} (hP : P ∈ degreeLT ℂ r) (m : ℕ) : + derivative^[m] P ∈ degreeLT ℂ r := by + induction m with + | zero => exact hP + | succ m ih => + rw [Function.iterate_succ_apply'] + rw [mem_degreeLT] at ih ⊢ + exact degree_derivative_le.trans_lt ih + +variable {p : ℝ≥0∞} [Fact (1 ≤ p)] + +/-! ### Differences of polynomials and derivatives -/ + +/-- The derivative of a difference of a polynomial is the difference of its derivative: +`(Δ_σ^m P)' = Δ_σ^m P'`. -/ +theorem hasDerivAt_higherDiff_polyFun (m : ℕ) (σ : ℝ) (P : ℂ[X]) (z : ℝ) : + HasDerivAt (higherDiff m σ (polyFun P)) (higherDiff m σ (polyFun (derivative P)) z) z := by + have h : higherDiff m σ (polyFun P) = fun z => ∑ k ∈ Finset.range (m + 1), + ((-1 : ℂ) ^ (m - k) * (m.choose k : ℂ)) * polyFun P (z + k * σ) := + funext fun z => higherDiff_apply m σ _ z + rw [h, higherDiff_apply] + exact HasDerivAt.fun_sum fun k _ => + ((hasDerivAt_polyFun P (z + k * σ)).comp_add_const z (k * σ)).const_mul _ + +/-- **Differences of polynomials by derivatives**: if `|P^(m)| ≤ M` on `[y, y + mσ]` with +`σ ≥ 0`, then `|Δ_σ^m P(y)| ≤ σ^m M`. Induction on `m`: `Δ_σ^(m+1) P(y) = Δ_σ^m P(y + σ) - +Δ_σ^m P(y)`, and the mean value theorem (Mathlib's +`norm_image_sub_le_of_norm_deriv_le_segment'`) applies to `Δ_σ^m P` with derivative +`Δ_σ^m P'`. -/ +theorem norm_higherDiff_polyFun_le (m : ℕ) {σ : ℝ} (hσ : 0 ≤ σ) {M : ℝ} : + ∀ (P : ℂ[X]) (y : ℝ), (∀ z ∈ Icc y (y + m * σ), ‖polyFun (derivative^[m] P) z‖ ≤ M) → + ‖higherDiff m σ (polyFun P) y‖ ≤ σ ^ m * M := by + induction m with + | zero => + intro P y h + simpa using h y ⟨le_rfl, by simp⟩ + | succ m ih => + intro P y h + rw [higherDiff_succ] + have hd : ∀ z ∈ Icc y (y + σ), HasDerivWithinAt (higherDiff m σ (polyFun P)) + (higherDiff m σ (polyFun (derivative P)) z) (Icc y (y + σ)) z := + fun z _ => (hasDerivAt_higherDiff_polyFun m σ P z).hasDerivWithinAt + have hb : ∀ z ∈ Ico y (y + σ), ‖higherDiff m σ (polyFun (derivative P)) z‖ ≤ σ ^ m * M := + fun z hz => ih (derivative P) z fun w hw => by + have hw' : w ∈ Icc y (y + ((m + 1 : ℕ) : ℝ) * σ) := by + push_cast + constructor <;> nlinarith [hz.1, hz.2, hw.1, hw.2] + have := h w hw' + rwa [Function.iterate_succ_apply] at this + have hmvt := norm_image_sub_le_of_norm_deriv_le_segment' hd hb (y + σ) + ⟨by linarith, le_rfl⟩ + calc ‖higherDiff m σ (polyFun P) (y + σ) - higherDiff m σ (polyFun P) y‖ + ≤ σ ^ m * M * (y + σ - y) := hmvt + _ = σ ^ (m + 1) * M := by ring + +/-! ### The difference bound -/ + +variable (p) in +/-- The **difference bound** of order `m` with constant `K` for the polynomials of degree `< r`: +`|Δ_t^m P(x)| ≤ K (t/L)^m L^(-1/p) ‖P‖_{L_p[u, u + L]}` for `t ≥ 0` and `u ≤ x`, +`x + mt ≤ u + 2L`. For `m = 0` this is Nikolskii's bound `Interval.NikolskiiBound`. -/ +def DiffBound (r m : ℕ) (K : ℝ≥0∞) : Prop := + ∀ P ∈ degreeLT ℂ r, ∀ (u : ℝ) {L : ℝ}, 0 < L → ∀ {t : ℝ}, 0 ≤ t → ∀ x, u ≤ x → + x + m * t ≤ u + 2 * L → + ‖higherDiff m t (polyFun P) x‖ₑ ≤ K * ENNReal.ofReal (t / L) ^ m * + ENNReal.ofReal L⁻¹ ^ (1 / p.toReal) * + eLpNorm (polyFun P) p (volume.restrict (Icc u (u + L))) + +/-- **Differences of polynomials are small**: for `1 ≤ p < ∞` and every order `m` there is a +difference bound for the polynomials of degree `< r`. On `[0, 1]` the derivative `P^(m)` is +bounded by `K ‖P‖_{L_p[0, 1/2]}` (`Interval.exists_enorm_linearMap_le_eLpNorm`), so +`|Δ_σ^m P(y)| ≤ σ^m K ‖P‖_{L_p[0, 1/2]}` (`Interval.norm_higherDiff_polyFun_le`); the substitution +`x = u + 2L y` rescales. -/ +theorem exists_diffBound (r m : ℕ) (hp : p ≠ ∞) : ∃ K : ℝ≥0∞, K ≠ ∞ ∧ DiffBound p r m K := by + obtain ⟨K, hK, hKb⟩ := exists_enorm_linearMap_le_eLpNorm (p := p) r + ((derivative : ℂ[X] →ₗ[ℂ] ℂ[X]) ^ m) + (fun P hP => by rw [pow_apply_eq_iterate]; exact iterate_derivative_mem_degreeLT hP m) + (by norm_num : (0 : ℝ) < 1 / 2) + refine ⟨K, hK, fun P hPr u L hL t ht x hux hxu => ?_⟩ + have h2L : 0 < 2 * L := by positivity + set Q := P.comp (C (u : ℂ) + C ((2 * L : ℝ) : ℂ) * X) + have hQ : Q ∈ degreeLT ℂ r := comp_affine_mem_degreeLT hPr _ _ + set σ := t / (2 * L) + set y := (x - u) / (2 * L) + have hσ : 0 ≤ σ := div_nonneg ht h2L.le + -- the difference in the new variable + have hdiff : higherDiff m t (polyFun P) x = higherDiff m σ (polyFun Q) y := by + rw [higherDiff_apply, higherDiff_apply] + refine Finset.sum_congr rfl fun k _ => ?_ + rw [polyFun_comp_affine] + congr 2 + simp only [σ, y] + field_simp + ring + -- the bound of the derivative on `[0, 1]` + have hfin : eLpNorm (polyFun Q) p (volume.restrict (Icc 0 (1 / 2))) ≠ ∞ := + (memLp_polyFun Q p 0 (1 / 2)).eLpNorm_ne_top + have hKQ : K * eLpNorm (polyFun Q) p (volume.restrict (Icc 0 (1 / 2))) ≠ ∞ := + ENNReal.mul_ne_top hK hfin + have hder : ∀ z ∈ Icc y (y + m * σ), ‖polyFun (derivative^[m] Q) z‖ ≤ + (K * eLpNorm (polyFun Q) p (volume.restrict (Icc 0 (1 / 2)))).toReal := fun z hz => by + have hz01 : z ∈ Icc (0 : ℝ) 1 := by + have hy0 : 0 ≤ y := div_nonneg (by linarith) h2L.le + have hy1 : y + m * σ ≤ 1 := by + rw [show y + m * σ = (x - u + m * t) / (2 * L) by simp only [y, σ]; ring, + div_le_one h2L] + linarith + exact ⟨hy0.trans hz.1, hz.2.trans hy1⟩ + have h := hKb Q hQ z hz01 + rw [pow_apply_eq_iterate] at h + rw [← ofReal_norm] at h + exact (ENNReal.ofReal_le_iff_le_toReal hKQ).1 h + have hval := norm_higherDiff_polyFun_le m hσ Q y hder + -- the norm of `Q` on `[0, 1/2]` + have hnorm := eLpNorm_comp_affine (measurable_polyFun P) hp u h2L 0 (1 / 2) + rw [mul_zero, add_zero, show 2 * L * (1 / 2) = L by ring] at hnorm + have hQfun : (fun y => polyFun P (u + 2 * L * y)) = polyFun Q := + funext fun y => (polyFun_comp_affine P u (2 * L) y).symm + rw [hQfun] at hnorm + have hσL : σ ≤ t / L := div_le_div_of_nonneg_left ht hL (by linarith) + rw [hdiff, ← ofReal_norm] + calc ENNReal.ofReal ‖higherDiff m σ (polyFun Q) y‖ + ≤ ENNReal.ofReal (σ ^ m * (K * eLpNorm (polyFun Q) p + (volume.restrict (Icc 0 (1 / 2)))).toReal) := ENNReal.ofReal_le_ofReal hval + _ = ENNReal.ofReal σ ^ m * (K * eLpNorm (polyFun Q) p (volume.restrict (Icc 0 (1 / 2)))) := by + rw [ENNReal.ofReal_mul (by positivity), ENNReal.ofReal_pow hσ, ENNReal.ofReal_toReal hKQ] + _ = K * ENNReal.ofReal σ ^ m * ENNReal.ofReal (2 * L)⁻¹ ^ (1 / p.toReal) * + eLpNorm (polyFun P) p (volume.restrict (Icc u (u + L))) := by + rw [hnorm]; ring + _ ≤ K * ENNReal.ofReal (t / L) ^ m * ENNReal.ofReal L⁻¹ ^ (1 / p.toReal) * + eLpNorm (polyFun P) p (volume.restrict (Icc u (u + L))) := by + gcongr + linarith + +end Interval diff --git a/LeanPool/FunctionSpaces/Domains/Interval/Polynomials.lean b/LeanPool/FunctionSpaces/Domains/Interval/Polynomials.lean new file mode 100644 index 0000000000..9ebf4ef1b3 --- /dev/null +++ b/LeanPool/FunctionSpaces/Domains/Interval/Polynomials.lean @@ -0,0 +1,317 @@ +/- +Copyright (c) 2026 Mario Ullrich. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Mario Ullrich +-/ +module + +public import LeanPool.FunctionSpaces.Domains.Interval.Modulus +public import Mathlib.Analysis.Normed.Module.FiniteDimension +public import Mathlib.MeasureTheory.Function.LpSpace.Basic +public import Mathlib.Algebra.Polynomial.Roots +public import Mathlib.Topology.Algebra.Polynomial +public import Mathlib.RingTheory.Polynomial.DegreeLT + +/- +Modified for Lean Pool: module names and imports adapted. +-/ + +/-! +# Polynomials on intervals + +The polynomials of degree `< r` with complex coefficients, `Polynomial.degreeLT ℂ r`, evaluated +at real points (`Interval.polyFun`), form a space of dimension `r` (`Interval.finrank_degreeLT`, +from Mathlib's monomial basis `Polynomial.degreeLT.basis`). On such a space all norms are +equivalent, and with an affine change of variables this gives the **Nikolskii inequality for +polynomials on intervals** (`Interval.enorm_polyFun_le`): for `1 ≤ p < ∞` there is `K` with + +`|P(x)| ≤ K L^(-1/p) ‖P‖_{L_p[u, u + L]}` for `x ∈ [u, u + 2L]`, `P` of degree `< r` + +(`Interval.NikolskiiBound`). The bound reaches the doubled interval, so that one piece of a +piecewise polynomial also controls its values on the neighbouring interval. + +The equivalence of norms is Mathlib's `LinearMap.injective_iff_antilipschitz` for the injective +map from the coefficients to `L_p[α, β]` (a nonzero polynomial has only finitely many zeros, +`Polynomial.eq_zero_of_infinite_isRoot`). In coordinates every linear map `Φ` of the polynomials +of degree `< r` into themselves is a linear map of `ℂ^r`, so +`|Φ P(x)| ≤ K ‖P‖_{L_p[α, β]}` for `x ∈ [0, 1]` (`Interval.exists_enorm_linearMap_le_eLpNorm`); +`Φ = id` is the equivalence of norms (`Interval.exists_enorm_le_eLpNorm`). +-/ + +@[expose] public section + +open MeasureTheory Set Polynomial +open scoped ENNReal NNReal + +namespace Interval + +/-- The function `x ↦ P(x)` on `ℝ` of a complex polynomial `P`. -/ +noncomputable def polyFun (P : ℂ[X]) (x : ℝ) : ℂ := P.eval (x : ℂ) + +/-- Evaluation is additive. -/ +theorem polyFun_add (P Q : ℂ[X]) (x : ℝ) : polyFun (P + Q) x = polyFun P x + polyFun Q x := by + simp [polyFun] + +/-- Evaluation is homogeneous. -/ +theorem polyFun_smul (c : ℂ) (P : ℂ[X]) (x : ℝ) : polyFun (c • P) x = c * polyFun P x := by + simp [polyFun] + +/-- Polynomials are continuous. -/ +theorem continuous_polyFun (P : ℂ[X]) : Continuous (polyFun P) := + (Polynomial.continuous P).comp Complex.continuous_ofReal + +/-- Polynomials are measurable. -/ +theorem measurable_polyFun (P : ℂ[X]) : Measurable (polyFun P) := + (continuous_polyFun P).measurable + +/-- The polynomials of degree `< r` form a space of dimension `r` (with Mathlib's monomial basis +`Polynomial.degreeLT.basis`). -/ +theorem finrank_degreeLT (r : ℕ) : Module.finrank ℂ (degreeLT ℂ r) = r := by + rw [Module.finrank_eq_card_basis (degreeLT.basis ℂ r), Fintype.card_fin] + +/-- `(P ∘ (u + v X))(y) = P(u + v y)`. -/ +theorem polyFun_comp_affine (P : ℂ[X]) (u v y : ℝ) : + polyFun (P.comp (C (u : ℂ) + C (v : ℂ) * X)) y = polyFun P (u + v * y) := by + simp [polyFun, eval_comp] + +/-- A polynomial vanishing almost everywhere on an interval of positive length is zero. -/ +theorem eq_zero_of_ae_eq_zero {P : ℂ[X]} {α β : ℝ} (hαβ : α < β) + (h : polyFun P =ᵐ[volume.restrict (Icc α β)] 0) : P = 0 := by + by_contra hP + have hfin : {x : ℝ | P.eval (x : ℂ) = 0}.Finite := by + have hroots : {z : ℂ | P.IsRoot z}.Finite := by + by_contra hinf + exact hP (P.eq_zero_of_infinite_isRoot hinf) + exact (hroots.preimage (Complex.ofReal_injective.injOn)).subset fun x hx => hx + have h0 : volume.restrict (Icc α β) {x : ℝ | P.eval (x : ℂ) = 0}ᶜ = 0 := by + change volume.restrict (Icc α β) {x : ℝ | ¬ (P.eval (x : ℂ) = 0)} = 0 + rw [← ae_iff] + filter_upwards [h] with x hx + simpa [polyFun] using hx + have h1 : volume.restrict (Icc α β) {x : ℝ | P.eval (x : ℂ) = 0} = 0 := + le_antisymm ((Measure.restrict_apply_le _ _).trans (hfin.measure_zero volume).le) bot_le + have htot : volume.restrict (Icc α β) univ = 0 := by + rw [← union_compl_self {x : ℝ | P.eval (x : ℂ) = 0}] + exact le_antisymm ((measure_union_le _ _).trans (by rw [h0, h1, add_zero])) bot_le + rw [Measure.restrict_apply_univ, Real.volume_Icc, ENNReal.ofReal_eq_zero] at htot + linarith + +/-- Polynomials lie in `L_p` of a bounded interval. -/ +theorem memLp_polyFun (P : ℂ[X]) (p : ℝ≥0∞) (α β : ℝ) : + MemLp (polyFun P) p (volume.restrict (Icc α β)) := by + obtain ⟨C, hC⟩ := isCompact_Icc.exists_bound_of_continuousOn + (continuous_polyFun P).continuousOn + refine MemLp.of_bound (measurable_polyFun P).aestronglyMeasurable C ?_ + filter_upwards [ae_restrict_mem measurableSet_Icc] with x hx using hC x hx + +/-- The value of the polynomial with coefficients `c`: `∑_i c_i x^i` (Mathlib's +`Polynomial.eval_eq_sum_degreeLTEquiv`). -/ +theorem polyFun_degreeLTEquiv_symm (r : ℕ) (c : Fin r → ℂ) (x : ℝ) : + polyFun ((degreeLTEquiv ℂ r).symm c : ℂ[X]) x = ∑ i : Fin r, c i * (x : ℂ) ^ (i : ℕ) := by + rw [polyFun, eval_eq_sum_degreeLTEquiv ((degreeLTEquiv ℂ r).symm c).2, Subtype.coe_eta, + LinearEquiv.apply_symm_apply] + +variable {p : ℝ≥0∞} [Fact (1 ≤ p)] + +variable (p) in +/-- The map from the coefficients of a polynomial of degree `< r` to its class in +`L_p[α, β]`. -/ +noncomputable def coeffToLp (r : ℕ) (α β : ℝ) : + (Fin r → ℂ) →ₗ[ℂ] Lp ℂ p (volume.restrict (Icc α β)) where + toFun c := (memLp_polyFun ((degreeLTEquiv ℂ r).symm c : ℂ[X]) p α β).toLp _ + map_add' c d := by + ext1 + filter_upwards [MemLp.coeFn_toLp (memLp_polyFun ((degreeLTEquiv ℂ r).symm (c + d) : ℂ[X]) p + α β), Lp.coeFn_add ((memLp_polyFun ((degreeLTEquiv ℂ r).symm c : ℂ[X]) p α β).toLp _) + ((memLp_polyFun ((degreeLTEquiv ℂ r).symm d : ℂ[X]) p α β).toLp _), + MemLp.coeFn_toLp (memLp_polyFun ((degreeLTEquiv ℂ r).symm c : ℂ[X]) p α β), + MemLp.coeFn_toLp (memLp_polyFun ((degreeLTEquiv ℂ r).symm d : ℂ[X]) p α β)] + with x h1 h2 h3 h4 + rw [h1, h2, Pi.add_apply, h3, h4, polyFun_degreeLTEquiv_symm, polyFun_degreeLTEquiv_symm, + polyFun_degreeLTEquiv_symm, ← Finset.sum_add_distrib] + exact Finset.sum_congr rfl fun i _ => by rw [Pi.add_apply, add_mul] + map_smul' a c := by + ext1 + filter_upwards [MemLp.coeFn_toLp (memLp_polyFun ((degreeLTEquiv ℂ r).symm (a • c) : ℂ[X]) p + α β), Lp.coeFn_smul a ((memLp_polyFun ((degreeLTEquiv ℂ r).symm c : ℂ[X]) p α β).toLp _), + MemLp.coeFn_toLp (memLp_polyFun ((degreeLTEquiv ℂ r).symm c : ℂ[X]) p α β)] + with x h1 h2 h3 + rw [h1, RingHom.id_apply, h2, Pi.smul_apply, h3, polyFun_degreeLTEquiv_symm, + polyFun_degreeLTEquiv_symm, smul_eq_mul, Finset.mul_sum] + exact Finset.sum_congr rfl fun i _ => by rw [Pi.smul_apply, smul_eq_mul, mul_assoc] + +/-- The norm of `coeffToLp` is the `L_p` norm of the polynomial. -/ +theorem enorm_coeffToLp (r : ℕ) (α β : ℝ) (c : Fin r → ℂ) : + ‖coeffToLp p r α β c‖ₑ = + eLpNorm (polyFun ((degreeLTEquiv ℂ r).symm c : ℂ[X])) p (volume.restrict (Icc α β)) := by + rw [Lp.eNorm_def] + exact eLpNorm_congr_ae (MemLp.coeFn_toLp (memLp_polyFun _ p α β)) + +omit [Fact (1 ≤ p)] in +/-- `coeffToLp` is injective on an interval of positive length. -/ +theorem coeffToLp_injective (r : ℕ) {α β : ℝ} (hαβ : α < β) : + Function.Injective (coeffToLp p r α β) := by + rw [← LinearMap.ker_eq_bot, LinearMap.ker_eq_bot'] + intro c hc + have hae : polyFun ((degreeLTEquiv ℂ r).symm c : ℂ[X]) =ᵐ[volume.restrict (Icc α β)] 0 := by + have h := MemLp.coeFn_toLp (memLp_polyFun ((degreeLTEquiv ℂ r).symm c : ℂ[X]) p α β) + have h0 : (coeffToLp p r α β c : ℝ → ℂ) =ᵐ[volume.restrict (Icc α β)] 0 := by + rw [hc]; exact Lp.coeFn_zero _ _ _ + exact h.symm.trans h0 + have hP := eq_zero_of_ae_eq_zero hαβ hae + have : (degreeLTEquiv ℂ r).symm c = 0 := Subtype.ext hP + simpa using congrArg (degreeLTEquiv ℂ r) this + +/-- The value of a polynomial with coefficients `c` at `x ∈ [0, 1]` is at most `r ‖c‖`. -/ +theorem norm_polyFun_degreeLTEquiv_symm_le (r : ℕ) (c : Fin r → ℂ) {x : ℝ} + (hx : x ∈ Icc (0 : ℝ) 1) : + ‖polyFun ((degreeLTEquiv ℂ r).symm c : ℂ[X]) x‖ ≤ r * ‖c‖ := by + have hx1 : ‖(x : ℂ)‖ ≤ 1 := by + rw [Complex.norm_real, Real.norm_eq_abs, abs_of_nonneg hx.1]; exact hx.2 + rw [polyFun_degreeLTEquiv_symm] + refine (norm_sum_le _ _).trans ?_ + calc ∑ i : Fin r, ‖c i * (x : ℂ) ^ (i : ℕ)‖ ≤ ∑ _i : Fin r, ‖c‖ := + Finset.sum_le_sum fun i _ => by + rw [norm_mul, norm_pow] + exact mul_le_of_le_one_right (norm_nonneg _) (pow_le_one₀ (norm_nonneg _) hx1) + |>.trans (norm_le_pi_norm c i) + _ = r * ‖c‖ := by rw [Finset.sum_const, Finset.card_univ, Fintype.card_fin, nsmul_eq_mul] + +/-- **Linear maps of polynomials are bounded by the norm**: let `Φ` be a linear map of the +polynomials that preserves the degree bound `< r`, and `[α, β]` an interval of positive length. +There is `K` with `|Φ P(x)| ≤ K ‖P‖_{L_p[α, β]}` for all `x ∈ [0, 1]` and `P` of degree `< r`. In +coordinates `Φ` is a linear map of `ℂ^r`, hence bounded, and the coordinates are bounded by the +`L_p` norm, since `coeffToLp` is injective on a space of finite dimension. -/ +theorem exists_enorm_linearMap_le_eLpNorm (r : ℕ) (Φ : ℂ[X] →ₗ[ℂ] ℂ[X]) + (hΦ : ∀ P ∈ degreeLT ℂ r, Φ P ∈ degreeLT ℂ r) {α β : ℝ} (hαβ : α < β) : + ∃ K : ℝ≥0∞, K ≠ ∞ ∧ ∀ P ∈ degreeLT ℂ r, ∀ x ∈ Icc (0 : ℝ) 1, + ‖polyFun (Φ P) x‖ₑ ≤ K * eLpNorm (polyFun P) p (volume.restrict (Icc α β)) := by + obtain ⟨K, -, hK⟩ := (coeffToLp p r α β).injective_iff_antilipschitz.1 + (coeffToLp_injective r hαβ) + let T : (Fin r → ℂ) →ₗ[ℂ] (Fin r → ℂ) := (degreeLTEquiv ℂ r).toLinearMap ∘ₗ + (Φ.restrict hΦ) ∘ₗ (degreeLTEquiv ℂ r).symm.toLinearMap + let T' := LinearMap.toContinuousLinearMap T + refine ⟨r * (‖T'‖ₑ * K), ENNReal.mul_ne_top (ENNReal.natCast_ne_top r) + (ENNReal.mul_ne_top eNorm_ne_top ENNReal.coe_ne_top), fun P hP x hx => ?_⟩ + set c := degreeLTEquiv ℂ r ⟨P, hP⟩ + have hPc : ((degreeLTEquiv ℂ r).symm c : ℂ[X]) = P := by simp [c] + have hΦc : ((degreeLTEquiv ℂ r).symm (T c) : ℂ[X]) = Φ P := by + simp [T, c, LinearMap.restrict_apply] + have hbound : ‖c‖ ≤ K * ‖coeffToLp p r α β c‖ := + ZeroHomClass.bound_of_antilipschitz (coeffToLp p r α β) hK c + have hT : ‖T c‖ ≤ ‖T'‖ * ‖c‖ := T'.le_opNorm c + have hval : ‖polyFun (Φ P) x‖ ≤ r * (‖T'‖ * (K * ‖coeffToLp p r α β c‖)) := by + rw [← hΦc] + refine (norm_polyFun_degreeLTEquiv_symm_le r (T c) hx).trans ?_ + gcongr + exact hT.trans (by gcongr) + have hval' : ‖polyFun (Φ P) x‖ₑ ≤ r * (‖T'‖ₑ * (K * ‖coeffToLp p r α β c‖ₑ)) := by + rw [← ofReal_norm, ← ofReal_norm] + calc ENNReal.ofReal ‖polyFun (Φ P) x‖ + ≤ ENNReal.ofReal (r * (‖T'‖ * (K * ‖coeffToLp p r α β c‖))) := ENNReal.ofReal_le_ofReal hval + _ = _ := by + rw [ENNReal.ofReal_mul (Nat.cast_nonneg _), ENNReal.ofReal_mul (norm_nonneg _), + ENNReal.ofReal_mul (NNReal.coe_nonneg _), ENNReal.ofReal_natCast, + ENNReal.ofReal_coe_nnreal, ofReal_norm, ofReal_norm] + rw [enorm_coeffToLp, hPc] at hval' + calc ‖polyFun (Φ P) x‖ₑ ≤ r * (‖T'‖ₑ * (K * eLpNorm (polyFun P) p + (volume.restrict (Icc α β)))) := hval' + _ = _ := by ring + +/-- **Equivalence of norms on polynomials**: for an interval `[α, β]` of positive length there +is `K` with `|P(x)| ≤ K ‖P‖_{L_p[α, β]}` for all `x ∈ [0, 1]` and `P` of degree `< r`, the +case `Φ = id` of `Interval.exists_enorm_linearMap_le_eLpNorm`. -/ +theorem exists_enorm_le_eLpNorm (r : ℕ) {α β : ℝ} (hαβ : α < β) : + ∃ K : ℝ≥0∞, K ≠ ∞ ∧ ∀ P ∈ degreeLT ℂ r, ∀ x ∈ Icc (0 : ℝ) 1, + ‖polyFun P x‖ₑ ≤ K * eLpNorm (polyFun P) p (volume.restrict (Icc α β)) := + exists_enorm_linearMap_le_eLpNorm (p := p) r LinearMap.id (fun _ hP => hP) hαβ + +/-- **Affine change of variables in `L_p`**: for `L > 0` and `p ≠ ∞`, +`‖g(u + L ·)‖_{L_p[α, β]} = L^(-1/p) ‖g‖_{L_p[u + Lα, u + Lβ]}`. -/ +theorem eLpNorm_comp_affine {g : ℝ → ℂ} (hg : Measurable g) {q : ℝ≥0∞} (hq : q ≠ ∞) + (u : ℝ) {L : ℝ} (hL : 0 < L) (α β : ℝ) : + eLpNorm (fun y => g (u + L * y)) q (volume.restrict (Icc α β)) = + ENNReal.ofReal L⁻¹ ^ (1 / q.toReal) * + eLpNorm g q (volume.restrict (Icc (u + L * α) (u + L * β))) := by + set φ : ℝ → ℝ := fun y => u + L * y + have hφ : Measurable φ := (measurable_const_mul L).const_add u + have hmap : Measure.map φ volume = ENNReal.ofReal L⁻¹ • volume := by + have h1 : φ = (fun x => u + x) ∘ (fun y => L * y) := rfl + rw [h1, ← Measure.map_map (measurable_const_add u) (measurable_const_mul L), + Real.map_volume_mul_left hL.ne', Measure.map_smul, map_add_left_eq_self, + abs_of_pos (inv_pos.2 hL)] + exact (measurable_const_add u).aemeasurable + have hpre : φ ⁻¹' Icc (u + L * α) (u + L * β) = Icc α β := by + ext y + simp only [φ, mem_preimage, mem_Icc] + constructor + · intro h + exact ⟨by nlinarith [h.1], by nlinarith [h.2]⟩ + · intro h + exact ⟨by nlinarith [h.1], by nlinarith [h.2]⟩ + have hres : Measure.map φ (volume.restrict (Icc α β)) = + ENNReal.ofReal L⁻¹ • volume.restrict (Icc (u + L * α) (u + L * β)) := by + rw [← hpre, ← Measure.restrict_map hφ measurableSet_Icc, hmap, Measure.restrict_smul] + have h := eLpNorm_map_measure (g := g) (p := q) (f := φ) (μ := volume.restrict (Icc α β)) + hg.aestronglyMeasurable hφ.aemeasurable + rw [hres, eLpNorm_smul_measure_of_ne_top hq _ _ hg.aestronglyMeasurable, smul_eq_mul, + ENNReal.toReal_div, ENNReal.toReal_one] at h + exact h.symm + +omit [Fact (1 ≤ p)] in +variable (p) in +/-- **Nikolskii's bound** with constant `K` for the polynomials of degree `< r`: +`|P(x)| ≤ K L^(-1/p) ‖P‖_{L_p[u, u + L]}` for `x ∈ [u, u + 2L]`. -/ +def NikolskiiBound (r : ℕ) (K : ℝ≥0∞) : Prop := + ∀ P ∈ degreeLT ℂ r, ∀ (u : ℝ) {L : ℝ}, 0 < L → ∀ x ∈ Icc u (u + 2 * L), + ‖polyFun P x‖ₑ ≤ K * ENNReal.ofReal L⁻¹ ^ (1 / p.toReal) * + eLpNorm (polyFun P) p (volume.restrict (Icc u (u + L))) + +omit [Fact (1 ≤ p)] in +/-- Nikolskii's bound on the interval `[u, u + L]` itself. -/ +theorem NikolskiiBound.enorm_le {r : ℕ} {K : ℝ≥0∞} (hK : NikolskiiBound p r K) {P : ℂ[X]} + (hP : P ∈ degreeLT ℂ r) (u : ℝ) {L : ℝ} (hL : 0 < L) {x : ℝ} (hx : x ∈ Icc u (u + L)) : + ‖polyFun P x‖ₑ ≤ K * ENNReal.ofReal L⁻¹ ^ (1 / p.toReal) * + eLpNorm (polyFun P) p (volume.restrict (Icc u (u + L))) := + hK P hP u hL x ⟨hx.1, by linarith [hx.2]⟩ + +/-- **Nikolskii inequality for polynomials on intervals**: for `1 ≤ p < ∞` there is `K` with +`|P(x)| ≤ K L^(-1/p) ‖P‖_{L_p[u, u + L]}` for `x ∈ [u, u + 2L]` and `P` of degree `< r`. The values +on `[0, 1]` are bounded by the norm on `[0, 1/2]`, and `x ↦ u + 2L x` rescales. -/ +theorem enorm_polyFun_le (r : ℕ) (hp : p ≠ ∞) : ∃ K : ℝ≥0∞, K ≠ ∞ ∧ NikolskiiBound p r K := by + obtain ⟨K, hK, hP⟩ := exists_enorm_le_eLpNorm (p := p) r (by norm_num : (0 : ℝ) < 1 / 2) + refine ⟨K, hK, fun P hPr u L hL x hx => ?_⟩ + have h2L : 0 < 2 * L := by positivity + set Q := P.comp (C (u : ℂ) + C ((2 * L : ℝ) : ℂ) * X) + have hQ : Q ∈ degreeLT ℂ r := comp_affine_mem_degreeLT hPr _ _ + have hy : (x - u) / (2 * L) ∈ Icc (0 : ℝ) 1 := by + constructor + · exact div_nonneg (by linarith [hx.1]) h2L.le + · rw [div_le_one h2L]; linarith [hx.2] + have hQx : polyFun Q ((x - u) / (2 * L)) = polyFun P x := by + rw [polyFun_comp_affine]; congr 1; field_simp; ring + have hnorm := eLpNorm_comp_affine (measurable_polyFun P) hp u h2L 0 (1 / 2) + rw [mul_zero, add_zero, show 2 * L * (1 / 2) = L by ring] at hnorm + have hQfun : (fun y => polyFun P (u + 2 * L * y)) = polyFun Q := + funext fun y => (polyFun_comp_affine P u (2 * L) y).symm + rw [hQfun] at hnorm + calc ‖polyFun P x‖ₑ = ‖polyFun Q ((x - u) / (2 * L))‖ₑ := by rw [hQx] + _ ≤ K * eLpNorm (polyFun Q) p (volume.restrict (Icc 0 (1 / 2))) := hP Q hQ _ hy + _ = K * ENNReal.ofReal (2 * L)⁻¹ ^ (1 / p.toReal) * + eLpNorm (polyFun P) p (volume.restrict (Icc u (u + L))) := by + rw [hnorm, mul_assoc] + _ ≤ K * ENNReal.ofReal L⁻¹ ^ (1 / p.toReal) * + eLpNorm (polyFun P) p (volume.restrict (Icc u (u + L))) := by + gcongr + linarith + +/-- The polynomial `P̄` with conjugate coefficients takes the values `P̄(x) = conj P(x)` at real +points. -/ +theorem polyFun_map_conj (P : ℂ[X]) (x : ℝ) : + polyFun (P.map (starRingEnd ℂ)) x = starRingEnd ℂ (polyFun P x) := by + have h : (x : ℂ) = starRingEnd ℂ (x : ℂ) := (Complex.conj_ofReal x).symm + calc polyFun (P.map (starRingEnd ℂ)) x = P.eval₂ (starRingEnd ℂ) (starRingEnd ℂ (x : ℂ)) := by + rw [polyFun, eval_map, ← h] + _ = starRingEnd ℂ (polyFun P x) := eval₂_at_apply _ _ + +end Interval diff --git a/LeanPool/FunctionSpaces/Domains/Interval/QuasiInterp.lean b/LeanPool/FunctionSpaces/Domains/Interval/QuasiInterp.lean new file mode 100644 index 0000000000..44b476d9c3 --- /dev/null +++ b/LeanPool/FunctionSpaces/Domains/Interval/QuasiInterp.lean @@ -0,0 +1,422 @@ +/- +Copyright (c) 2026 Mario Ullrich. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Mario Ullrich +-/ +module + +public import LeanPool.FunctionSpaces.Domains.Interval.Splines +public import LeanPool.FunctionSpaces.Domains.Interval.LocalProjection + +/- +Modified for Lean Pool: module names and imports adapted. +-/ + +/-! +# A spline quasi-interpolant + +The **quasi-interpolant** of level `k` is `Q_k g = ∑_n λ_n(g) N_r(2^k x - n)`, summed over the +B-splines `-r < n < N` that meet `[0, N 2^(-k))` (`Interval.qiPieces`); on `[0, 1)` the index bound +is `N = 2^k`, and larger `N` serve periodic extensions. Its coefficient +`λ_n(g) = c_n(Π g(· 2^(-k)))` (`Interval.qiCoeff`) is the B-spline coefficient (Marsden's identity, +`Interval.polyFun_eq_sum_bsplineCoef`) of the local projection `Π g` of `g` on one interval +`J(n) = I_{k, max(n, 0)}` of the support of `N_r(2^k x - n)` in `[0, 1)`. + +* `Q_k g` is a spline, with joins at every knot (`Interval.qiPieces_join`). +* **Local reproduction**: if `g` is a polynomial `T` of degree `< r` on the intervals `J(n)`, + `i - r < n ≤ i`, then `Q_k g = T` on `I_{k,i}` (`Interval.polyFun_qiPieces_of_eq`): the local + projections reproduce `T`, so the coefficients are those of `T`, and Marsden's identity sums + them back to `T`. +* **Reproduction of splines**: `Q_k s = s` for every spline `s` of order `r` and level `k` + (`Interval.ppFun_qiPieces_ppFun`), since the pieces of `s` in the support of a B-spline have the + same coefficient for it (`Interval.bsplineCoef_comp_eq_of_splineJoins`). So the B-splines + `N_r(2^k x - n)`, `-r < n < 2^k`, span the splines on `[0, 1)` + (`Interval.ppFun_eq_sum_bsplinePieces`). +* **Local bounds**: `|λ_n(g)| ≤ C 2^(k/p) ‖g‖_{L_p(J(n))}` (`Interval.enorm_qiCoeff_le`), since the + coordinates in the B-spline basis are bounded functionals on the polynomials + (`Interval.exists_enorm_bcoord_le`) and the local projection is bounded, and hence + `‖Q_k g‖_{L_p(I_{k,i})} ≤ C ∑_{i - r < n ≤ i} ‖g‖_{L_p(J(n))}` (`Interval.eLpNorm_qiPieces_le`). +-/ + +@[expose] public section + +open MeasureTheory Set Polynomial +open scoped ENNReal + +namespace Interval + +/-- Two polynomials with the same values at all real points are equal. -/ +theorem eq_of_polyFun_eq {P Q : ℂ[X]} (h : ∀ x : ℝ, polyFun P x = polyFun Q x) : P = Q := by + refine Polynomial.eq_of_infinite_eval_eq P Q ?_ + refine Set.Infinite.mono ?_ (Set.infinite_range_of_injective Complex.ofReal_injective) + rintro _ ⟨x, rfl⟩ + exact h x + +/-- The local projection on `I_{k,m}` in the coordinate `y = 2^k x`. -/ +noncomputable def locProjScaled (r k : ℕ) (g : ℝ → ℂ) (m : ℕ) : ℂ[X] := + (locProj r k g m).comp (C (((0 : ℝ) : ℝ) : ℂ) + C (((1 / 2 ^ k : ℝ) : ℝ) : ℂ) * X) + +/-- The indices `-r < n < N` of the B-splines of level `k` that meet `[0, N 2^(-k))`. -/ +def qiIdx (r N : ℕ) : Finset ℤ := Finset.Ioo (-(r : ℤ)) N + +/-- The **quasi-interpolant coefficients** `λ_n(g) = c_n(Π_{k, J(n)} g(· 2^(-k)))`, with +`J(n) = I_{k, max(n, 0)}`. -/ +noncomputable def qiCoeff {r : ℕ} (hr : 1 ≤ r) (k : ℕ) (g : ℝ → ℂ) (n : ℤ) : ℂ := + bsplineCoef hr (locProjScaled r k g n.toNat) n + +/-- The pieces of the **quasi-interpolant** `Q_k g = ∑_n λ_n(g) N_r(2^k x - n)`. -/ +noncomputable def qiPieces {r : ℕ} (hr : 1 ≤ r) (k N : ℕ) (g : ℝ → ℂ) : ℕ → ℂ[X] := + ∑ n ∈ qiIdx r N, fun m => C (qiCoeff hr k g n) * bsplinePieces r k n m + +/-- The pieces of the quasi-interpolant. -/ +theorem qiPieces_apply {r : ℕ} (hr : 1 ≤ r) (k N : ℕ) (g : ℝ → ℂ) (m : ℕ) : + qiPieces hr k N g m = ∑ n ∈ qiIdx r N, C (qiCoeff hr k g n) * bsplinePieces r k n m := by + rw [qiPieces, Finset.sum_apply] + +/-- The quasi-interpolant has pieces of degree `< r`. -/ +theorem qiPieces_mem {r : ℕ} (hr : 1 ≤ r) (k N : ℕ) (g : ℝ → ℂ) (m : ℕ) : + qiPieces hr k N g m ∈ degreeLT ℂ r := by + rw [qiPieces_apply] + exact Submodule.sum_mem _ fun n _ => by + rw [← smul_eq_C_mul] + exact Submodule.smul_mem _ _ (bsplinePieces_mem hr k n m) + +/-- **The quasi-interpolant has spline joins at every knot** `m 2^(-k)`, `m ≥ 1`. -/ +theorem qiPieces_join {r : ℕ} (hr : 1 ≤ r) (k N : ℕ) (g : ℝ → ℂ) {m : ℕ} (hm : 0 < m) : + ∃ c : ℂ, qiPieces hr k N g m - qiPieces hr k N g (m - 1) = + C c * (X - C ((((m : ℝ) / 2 ^ k : ℝ)) : ℂ)) ^ (r - 1) := by + choose c hc using fun n : ℤ => bsplinePieces_join hr k n hm + refine ⟨∑ n ∈ qiIdx r N, qiCoeff hr k g n * c n, ?_⟩ + rw [qiPieces_apply, qiPieces_apply, ← Finset.sum_sub_distrib, map_sum, Finset.sum_mul] + refine Finset.sum_congr rfl fun n _ => ?_ + rw [← mul_sub, hc n, C_mul] + ring + +/-- **The quasi-interpolant is a spline.** -/ +theorem splineJoins_qiPieces {r : ℕ} (hr : 1 ≤ r) (k N : ℕ) (g : ℝ → ℂ) : + SplineJoins r k (qiPieces hr k N g) := fun _ hm _ => qiPieces_join hr k N g hm + +/-- The values of the quasi-interpolant on `I_{k,m}`: `Q_k g(x) = ∑_n λ_n(g) N_r(2^k x - n)`. -/ +theorem polyFun_qiPieces {r : ℕ} (hr : 1 ≤ r) (k N : ℕ) (g : ℝ → ℂ) {m : ℕ} {x : ℝ} + (hx : x ∈ dyadicIco k m) : + polyFun (qiPieces hr k N g m) x = + ∑ n ∈ qiIdx r N, qiCoeff hr k g n * bspline r (2 ^ k * x - n) := by + rw [qiPieces_apply, polyFun, eval_finsetSum] + refine Finset.sum_congr rfl fun n _ => ?_ + rw [eval_mul, eval_C, ← polyFun, polyFun_bsplinePieces hr k n hx] + +/-- On `I_{k,i}` only the B-splines `i - r < n ≤ i` are nonzero. -/ +theorem bspline_eq_zero_of_not_mem {r k i : ℕ} {x : ℝ} (hx : x ∈ dyadicIco k i) {n : ℤ} + (hn : ¬ ((i : ℤ) - r < n ∧ n ≤ i)) : bspline r (2 ^ k * x - n) = 0 := by + rw [mem_dyadicIco] at hx + rcases not_and_or.1 hn with h | h + · apply bspline_eq_zero_of_ge + have : (n : ℝ) ≤ (i : ℝ) - r := by exact_mod_cast (by omega : n ≤ (i : ℤ) - r) + linarith [hx.1] + · apply bspline_eq_zero_of_lt + have : (i : ℝ) + 1 ≤ n := by exact_mod_cast (by omega : (i : ℤ) + 1 ≤ n) + linarith [hx.2] + +/-- **The quasi-interpolant from its coefficients**: if the coefficients `λ_n(g)`, +`i - r < n ≤ i`, are the B-spline coefficients `c_n` of `T(· 2^(-k))` for a polynomial `T` of +degree `< r`, then `Q_k g = T` on `I_{k,i}`, by Marsden's identity for `T(· 2^(-k))` on +`[i, i + 1)`. -/ +theorem polyFun_qiPieces_of_coeff {r : ℕ} (hr : 1 ≤ r) {k N : ℕ} {g : ℝ → ℂ} {T : ℂ[X]} + (hT : T ∈ degreeLT ℂ r) {i : ℕ} (hi : i < N) + (hcoeff : ∀ n : ℤ, (i : ℤ) - r < n → n ≤ i → qiCoeff hr k g n = + bsplineCoef hr (T.comp (C (((0 : ℝ) : ℝ) : ℂ) + C (((1 / 2 ^ k : ℝ) : ℝ) : ℂ) * X)) n) + {x : ℝ} (hx : x ∈ dyadicIco k i) : polyFun (qiPieces hr k N g i) x = polyFun T x := by + set Ts := T.comp (C (((0 : ℝ) : ℝ) : ℂ) + C (((1 / 2 ^ k : ℝ) : ℝ) : ℂ) * X) + have hTs : Ts ∈ degreeLT ℂ r := comp_affine_mem_degreeLT hT _ _ + have hik : (i : ℤ) < N := by exact_mod_cast hi + rw [polyFun_qiPieces hr k N g hx] + -- only the B-splines `i - r < n ≤ i` contribute + have hsub : ∑ n ∈ qiIdx r N, qiCoeff hr k g n * bspline r (2 ^ k * x - n) = + ∑ n ∈ Finset.Ioc ((i : ℤ) - r) i, bsplineCoef hr Ts n * bspline r (2 ^ k * x - n) := by + rw [← Finset.sum_subset (s₁ := Finset.Ioc ((i : ℤ) - r) i) (fun n hn => by + rw [Finset.mem_Ioc] at hn + rw [qiIdx, Finset.mem_Ioo] + constructor <;> omega) + (fun n _ hn => by + rw [Finset.mem_Ioc] at hn + simp [bspline_eq_zero_of_not_mem hx hn])] + exact Finset.sum_congr rfl fun n hn => by + rw [Finset.mem_Ioc] at hn + rw [hcoeff n hn.1 hn.2] + -- Marsden's identity for `T(· 2^(-k))` at `y = 2^k x ∈ [i, i + 1)` + have hy : 2 ^ k * x ∈ Set.Ico ((i : ℤ) : ℝ) ((i : ℤ) + 1) := by + rw [mem_dyadicIco] at hx + push_cast + exact hx + have hM := polyFun_eq_sum_bsplineCoef hr hTs hy + have hval : polyFun Ts (2 ^ k * x) = polyFun T x := by + rw [polyFun_comp_affine, show (0 : ℝ) + 1 / 2 ^ k * (2 ^ k * x) = x by + rw [zero_add]; field_simp] + rw [hsub, ← hval, hM] + -- reindex `n = i - j` + refine Finset.sum_nbij' (fun n : ℤ => ((i : ℤ) - n).toNat) (fun j : ℕ => (i : ℤ) - j) + ?_ ?_ ?_ ?_ ?_ + · intro n hn + simp only [Finset.mem_Ioc, Finset.mem_range] at hn ⊢ + omega + · intro j hj + simp only [Finset.mem_Ioc, Finset.mem_range] at hj ⊢ + omega + · intro n hn + simp only [Finset.mem_Ioc] at hn + omega + · intro j _ + simp + · intro n hn + simp only [Finset.mem_Ioc] at hn + rw [show (i : ℤ) - (((i : ℤ) - n).toNat : ℤ) = n by omega] + +/-- **Local reproduction of polynomials**: if `g = T` on the intervals `J(n)`, `i - r < n ≤ i`, +for a polynomial `T` of degree `< r`, then `Q_k g = T` on `I_{k,i}`: the local projections +reproduce `T`, so the coefficients are those of `T`. -/ +theorem polyFun_qiPieces_of_eq {r : ℕ} (hr : 1 ≤ r) {k N : ℕ} {g : ℝ → ℂ} {T : ℂ[X]} + (hT : T ∈ degreeLT ℂ r) {i : ℕ} (hi : i < N) + (hg : ∀ n : ℤ, (i : ℤ) - r < n → n ≤ i → ∀ y ∈ dyadicIco k n.toNat, g y = polyFun T y) + {x : ℝ} (hx : x ∈ dyadicIco k i) : polyFun (qiPieces hr k N g i) x = polyFun T x := + polyFun_qiPieces_of_coeff hr hT hi (fun n hn1 hn2 => by + have hloc : locProj r k g n.toNat = T := eq_of_polyFun_eq fun y => + polyFun_locProj_of_eqOn hT (hg n hn1 hn2) y + rw [qiCoeff, locProjScaled, hloc]) hx + +/-! ### Reproduction of splines -/ + +/-- **The quasi-interpolant reproduces splines, piece by piece**: for a spline with pieces `Q_m` of +degree `< r`, `Q_k s = Q_i` on `I_{k,i}`. The coefficient `λ_n(s)` is `c_n` of the piece of `s` on +`J(n)`, and this is `c_n` of `Q_i` (`Interval.bsplineCoef_comp_eq_of_splineJoins`), since the +pieces between `J(n)` and `I_{k,i}` differ by powers `(x - m 2^(-k))^(r-1)` with `n < m < n + r`. -/ +theorem polyFun_qiPieces_ppFun {r : ℕ} (hr : 1 ≤ r) {k : ℕ} {Q : ℕ → ℂ[X]} + (hQ : ∀ m, Q m ∈ degreeLT ℂ r) (hJ : SplineJoins r k Q) {i : ℕ} (hi : i < 2 ^ k) {x : ℝ} + (hx : x ∈ dyadicIco k i) : + polyFun (qiPieces hr k (2 ^ k) (ppFun k Q) i) x = polyFun (Q i) x := by + refine polyFun_qiPieces_of_coeff hr (hQ i) hi (fun n hn1 hn2 => ?_) hx + have hn : n.toNat ≤ i := by omega + have hloc : locProj r k (ppFun k Q) n.toNat = Q n.toNat := eq_of_polyFun_eq fun y => + polyFun_locProj_of_eqOn (hQ _) (fun z hz => ppFun_eq_of_mem Q (hn.trans_lt hi) hz) y + rw [qiCoeff, locProjScaled, hloc] + exact (bsplineCoef_comp_eq_of_splineJoins hr hQ hJ hn hi (Int.self_le_toNat n) + (by omega)).symm + +/-- **The quasi-interpolant is a projection onto the splines**: `Q_k s = s` for every spline `s` of +order `r` and level `k` on `[0, 1)`. -/ +theorem ppFun_qiPieces_ppFun {r : ℕ} (hr : 1 ≤ r) {k : ℕ} {Q : ℕ → ℂ[X]} + (hQ : ∀ m, Q m ∈ degreeLT ℂ r) (hJ : SplineJoins r k Q) : + ppFun k (qiPieces hr k (2 ^ k) (ppFun k Q)) = ppFun k Q := by + funext x + by_cases hx : x ∈ Ico (0 : ℝ) 1 + · obtain ⟨h1, h1'⟩ := mem_dyadicIco_floor (k := k) hx + rw [ppFun_eq_of_mem _ h1' h1, ppFun_eq_of_mem _ h1' h1, polyFun_qiPieces_ppFun hr hQ hJ h1' h1] + · rw [ppFun_eq_zero _ hx, ppFun_eq_zero _ hx] + +/-- **The B-splines span the splines**: every spline of order `r` and level `k` on `[0, 1)` is +`∑_n λ_n N_r(2^k x - n)`, summed over the B-splines `-r < n < 2^k` that meet `[0, 1)`, with the +quasi-interpolant coefficients `λ_n`. -/ +theorem ppFun_eq_sum_bsplinePieces {r : ℕ} (hr : 1 ≤ r) {k : ℕ} {Q : ℕ → ℂ[X]} + (hQ : ∀ m, Q m ∈ degreeLT ℂ r) (hJ : SplineJoins r k Q) : + ppFun k Q = ∑ n ∈ qiIdx r (2 ^ k), + fun x => qiCoeff hr k (ppFun k Q) n * ppFun k (bsplinePieces r k n) x := by + conv_lhs => rw [← ppFun_qiPieces_ppFun hr hQ hJ] + rw [qiPieces, ppFun_sum] + exact Finset.sum_congr rfl fun n _ => ppFun_const_mul k _ _ + +/-! ### Bounds -/ + +/-- The B-spline is bounded. -/ +theorem exists_enorm_bspline_le (r : ℕ) : ∃ M : ℝ≥0∞, M ≠ ∞ ∧ ∀ y, ‖bspline r y‖ₑ ≤ M := by + obtain ⟨M, hM, hMb⟩ := exists_enorm_polyFun_le_of_fintype + (fun j : Fin r => bsplineLocal r j) + refine ⟨M, hM, fun y => ?_⟩ + by_cases hy : 0 ≤ y ∧ y < r + · have hj : ⌊y⌋₊ < r := (Nat.floor_lt hy.1).2 hy.2 + have hmem : y ∈ Ico (⌊y⌋₊ : ℝ) (⌊y⌋₊ + 1) := ⟨Nat.floor_le hy.1, Nat.lt_floor_add_one y⟩ + rw [bspline_eq_piece hj hmem] + have h := hMb ⟨⌊y⌋₊, hj⟩ (y - ⌊y⌋₊) ⟨by linarith [hmem.1], by linarith [hmem.2]⟩ + simp only [bsplineLocal, polyFun, eval_comp, eval_add, eval_X, eval_C] at h + simp only [polyFun] + convert h using 2 + push_cast + ring_nf + · simp only [bspline, hy, ↓reduceIte, eNorm_zero, zero_le] + +variable {p : ℝ≥0∞} [Fact (1 ≤ p)] + +variable (p) in +/-- **The B-spline coordinates are bounded functionals**: there is `C` with +`|a_j(R)| ≤ C ‖R‖_{L_p[0,1]}` for every polynomial `R` of degree `< r` (finite dimension). -/ +theorem exists_enorm_bcoord_le {r : ℕ} (hr : 1 ≤ r) : + ∃ Cb : ℝ≥0∞, Cb ≠ ∞ ∧ ∀ R ∈ degreeLT ℂ r, ∀ j : ℕ, + ‖bcoord hr R j‖ₑ ≤ Cb * eLpNorm (polyFun R) p (volume.restrict (Icc 0 1)) := by + obtain ⟨K, -, hK⟩ := (coeffToLp p r 0 1).injective_iff_antilipschitz.1 + (coeffToLp_injective r zero_lt_one) + let T : (Fin r → ℂ) →ₗ[ℂ] (Fin r → ℂ) := + (bsplineBasis hr).equivFun.toLinearMap ∘ₗ (degreeLTEquiv ℂ r).symm.toLinearMap + let T' := LinearMap.toContinuousLinearMap T + refine ⟨‖T'‖ₑ * K, ENNReal.mul_ne_top eNorm_ne_top ENNReal.coe_ne_top, fun R hR j => ?_⟩ + by_cases hj : j < r + · set c := degreeLTEquiv ℂ r ⟨R, hR⟩ + have hRc : (degreeLTEquiv ℂ r).symm c = ⟨R, hR⟩ := by simp [c] + have hbc : bcoord hr R j = T c ⟨j, hj⟩ := by + have h : R ∈ degreeLT ℂ r ∧ j < r := ⟨hR, hj⟩ + simp only [bcoord, h, and_self, ↓reduceDIte, T, LinearMap.coe_comp, LinearEquiv.coe_coe, + Function.comp_apply, hRc, Module.Basis.equivFun_apply] + have h1 : ‖T c ⟨j, hj⟩‖ ≤ ‖T c‖ := norm_le_pi_norm _ _ + have h2 : ‖T c‖ ≤ ‖T'‖ * ‖c‖ := T'.le_opNorm c + have h3 : ‖c‖ ≤ K * ‖coeffToLp p r 0 1 c‖ := ZeroHomClass.bound_of_antilipschitz _ hK c + have hreal : ‖bcoord hr R j‖ ≤ ‖T'‖ * (K * ‖coeffToLp p r 0 1 c‖) := by + rw [hbc] + exact h1.trans (h2.trans (by gcongr)) + have hnorm : ‖coeffToLp p r 0 1 c‖ₑ = eLpNorm (polyFun R) p (volume.restrict (Icc 0 1)) := by + rw [enorm_coeffToLp, hRc] + rw [← hnorm, ← ofReal_norm, ← ofReal_norm, ← ofReal_norm] + calc ENNReal.ofReal ‖bcoord hr R j‖ + ≤ ENNReal.ofReal (‖T'‖ * (K * ‖coeffToLp p r 0 1 c‖)) := ENNReal.ofReal_le_ofReal hreal + _ = _ := by + rw [ENNReal.ofReal_mul (norm_nonneg _), ENNReal.ofReal_mul (NNReal.coe_nonneg _), + ENNReal.ofReal_coe_nnreal] + ring + · have h : ¬ (R ∈ degreeLT ℂ r ∧ j < r) := fun h => hj h.2 + simp only [bcoord, h, ↓reduceDIte, eNorm_zero, zero_le] + +/-- The quasi-interpolant coefficient as a coordinate on the unit interval of `J(n)`: +`λ_n(g) = a_{max(n,0) - n}(Π g((· + max(n, 0)) 2^(-k)))`. -/ +theorem qiCoeff_eq_bcoord {r : ℕ} (hr : 1 ≤ r) (k : ℕ) (g : ℝ → ℂ) {n : ℤ} (hn : -(r : ℤ) < n) : + qiCoeff hr k g n = bcoord hr ((locProjScaled r k g n.toNat).comp + (X + C (((n.toNat : ℤ) : ℂ)))) ((n.toNat : ℤ) - n).toNat := by + have hmem : locProjScaled r k g n.toNat ∈ degreeLT ℂ r := + comp_affine_mem_degreeLT (locProj_mem r k g _) _ _ + rw [bcoord_comp_eq_bsplineCoef hr hmem _ (by omega), qiCoeff] + congr 1 + omega + +/-- **The quasi-interpolant coefficients are bounded by the local `L_p` norm**: +`|λ_n(g)| ≤ C_b r M² 2^(k/p) ‖g‖_{L_p(J(n))}`. -/ +theorem enorm_qiCoeff_le {r : ℕ} (hr : 1 ≤ r) {Cb : ℝ≥0∞} + (hCb : ∀ R ∈ degreeLT ℂ r, ∀ j : ℕ, + ‖bcoord hr R j‖ₑ ≤ Cb * eLpNorm (polyFun R) p (volume.restrict (Icc 0 1))) + (hp : p ≠ ∞) (k : ℕ) {g : ℝ → ℂ} {n : ℤ} (hn : -(r : ℤ) < n) + (hg : AEStronglyMeasurable g (volume.restrict (dyadicIco k n.toNat))) : + ‖qiCoeff hr k g n‖ₑ ≤ Cb * ppProjConst r * ENNReal.ofReal (2 ^ k) ^ (1 / p.toReal) * + eLpNorm g p (volume.restrict (dyadicIco k n.toNat)) := by + have hL : (0 : ℝ) < 1 / 2 ^ k := by positivity + set m := n.toNat + set R := (locProjScaled r k g m).comp (X + C (((m : ℤ) : ℂ))) + have hR : R ∈ degreeLT ℂ r := comp_X_add_C_mem + (comp_affine_mem_degreeLT (locProj_mem r k g _) _ _) _ + have hRfun : polyFun R = fun t => polyFun (locProj r k g m) ((m : ℝ) / 2 ^ k + 1 / 2 ^ k * t) + := by + funext t + simp only [R, locProjScaled, polyFun, eval_comp, eval_add, eval_mul, eval_X, eval_C] + congr 1 + push_cast + ring + have hnorm : eLpNorm (polyFun R) p (volume.restrict (Icc 0 1)) = + ENNReal.ofReal (2 ^ k) ^ (1 / p.toReal) * + eLpNorm (polyFun (locProj r k g m)) p (volume.restrict (dyadicIco k m)) := by + rw [hRfun, eLpNorm_comp_affine (measurable_polyFun _) hp _ hL, mul_zero, add_zero, mul_one, + one_div ((2 : ℝ) ^ k), inv_inv, dyadicIco] + congr 2 + rw [show (m : ℝ) / 2 ^ k + (2 ^ k)⁻¹ = (m + 1) / 2 ^ k by field_simp] + exact (Measure.restrict_congr_set Ico_ae_eq_Icc).symm + rw [qiCoeff_eq_bcoord hr k g hn] + refine (hCb R hR _).trans ?_ + rw [hnorm] + calc Cb * (ENNReal.ofReal (2 ^ k) ^ (1 / p.toReal) * + eLpNorm (polyFun (locProj r k g m)) p (volume.restrict (dyadicIco k m))) + ≤ Cb * (ENNReal.ofReal (2 ^ k) ^ (1 / p.toReal) * + (ppProjConst r * eLpNorm g p (volume.restrict (dyadicIco k m)))) := by + gcongr + exact eLpNorm_locProj_le (enorm_monoBasis_le r) (enorm_dualPoly_le r) Fact.out k m hg + _ = _ := by ring + +/-- On `I_{k,m}` only the B-splines `m - r < n ≤ m` have nonzero pieces; the piece with +`m - n = r` is `B_r = 0` (`Interval.bsplinePiece_top`). -/ +theorem bsplinePieces_eq_zero_of_not_mem {r : ℕ} (hr : 1 ≤ r) (k : ℕ) {n : ℤ} {m : ℕ} + (hn : ¬ ((m : ℤ) - r < n ∧ n ≤ m)) : bsplinePieces r k n m = 0 := by + unfold bsplinePieces + split_ifs with h + · rw [show ((m : ℤ) - n).toNat = r by omega, bsplinePiece_top hr, zero_comp] + · rfl + +/-- The pieces of the quasi-interpolant on `I_{k,i}`, `i < N`, as the sum over the B-splines +`i - r < n ≤ i`. -/ +theorem qiPieces_eq_sum_Ioc {r : ℕ} (hr : 1 ≤ r) (k : ℕ) {N i : ℕ} (hi : i < N) (g : ℝ → ℂ) : + qiPieces hr k N g i = + ∑ n ∈ Finset.Ioc ((i : ℤ) - r) i, C (qiCoeff hr k g n) * bsplinePieces r k n i := by + have hik : (i : ℤ) < N := by exact_mod_cast hi + rw [qiPieces_apply] + exact (Finset.sum_subset (fun n hn => by + rw [Finset.mem_Ioc] at hn + rw [qiIdx, Finset.mem_Ioo] + constructor <;> omega) + (fun n _ hn => by + rw [Finset.mem_Ioc] at hn + rw [bsplinePieces_eq_zero_of_not_mem hr k hn, mul_zero])).symm + +/-- On `I_{k,i}` the quasi-interpolant is the sum over the B-splines `i - r < n ≤ i`. -/ +theorem polyFun_qiPieces_eq_sum_Ioc {r : ℕ} (hr : 1 ≤ r) {k N i : ℕ} (hi : i < N) + (g : ℝ → ℂ) {x : ℝ} (hx : x ∈ dyadicIco k i) : + polyFun (qiPieces hr k N g i) x = + ∑ n ∈ Finset.Ioc ((i : ℤ) - r) i, qiCoeff hr k g n * bspline r (2 ^ k * x - n) := by + have hik : (i : ℤ) < N := by exact_mod_cast hi + rw [polyFun_qiPieces hr k N g hx] + exact (Finset.sum_subset (fun n hn => by + rw [Finset.mem_Ioc] at hn + rw [qiIdx, Finset.mem_Ioo] + constructor <;> omega) + (fun n _ hn => by + rw [Finset.mem_Ioc] at hn + simp [bspline_eq_zero_of_not_mem hx hn])).symm + +/-- **The quasi-interpolant is locally bounded**: on `I_{k,i}`, +`‖Q_k g‖_{L_p(I_{k,i})} ≤ M_N C_b r M² ∑_{i - r < n ≤ i} ‖g‖_{L_p(J(n))}`, with `M_N` a bound of +the B-spline. -/ +theorem eLpNorm_qiPieces_le {r : ℕ} (hr : 1 ≤ r) {Cb : ℝ≥0∞} + (hCb : ∀ R ∈ degreeLT ℂ r, ∀ j : ℕ, + ‖bcoord hr R j‖ₑ ≤ Cb * eLpNorm (polyFun R) p (volume.restrict (Icc 0 1))) + {MN : ℝ≥0∞} (hMN : ∀ y, ‖bspline r y‖ₑ ≤ MN) (hp : p ≠ ∞) {k N i : ℕ} (hi : i < N) + {g : ℝ → ℂ} (hg : AEStronglyMeasurable g volume) : + eLpNorm (polyFun (qiPieces hr k N g i)) p (volume.restrict (dyadicIco k i)) ≤ + MN * (Cb * ppProjConst r) * ∑ n ∈ Finset.Ioc ((i : ℤ) - r) i, + eLpNorm g p (volume.restrict (dyadicIco k n.toNat)) := by + have hθ : 0 ≤ 1 / p.toReal := by positivity + have hθ' : 1 / p.toReal = p.toReal⁻¹ := one_div _ + have hgI : ∀ n ∈ Finset.Ioc ((i : ℤ) - r) i, + AEStronglyMeasurable g (volume.restrict (dyadicIco k n.toNat)) := fun _ _ => hg.restrict + have hpt : ∀ x ∈ dyadicIco k i, ‖polyFun (qiPieces hr k N g i) x‖ₑ ≤ + MN * (Cb * ppProjConst r) * ENNReal.ofReal (2 ^ k) ^ (1 / p.toReal) * + ∑ n ∈ Finset.Ioc ((i : ℤ) - r) i, eLpNorm g p (volume.restrict (dyadicIco k n.toNat)) := + fun x hx => by + rw [polyFun_qiPieces_eq_sum_Ioc hr hi g hx] + refine (eNorm_sum_le _ _).trans ?_ + rw [Finset.mul_sum] + refine Finset.sum_le_sum fun n hn => ?_ + have hn' := (Finset.mem_Ioc.1 hn).1 + rw [eNorm_mul] + calc ‖qiCoeff hr k g n‖ₑ * ‖bspline r (2 ^ k * x - n)‖ₑ + ≤ (Cb * ppProjConst r * ENNReal.ofReal (2 ^ k) ^ (1 / p.toReal) * + eLpNorm g p (volume.restrict (dyadicIco k n.toNat))) * MN := + mul_le_mul' (enorm_qiCoeff_le hr hCb hp k (by omega) (hgI n hn)) (hMN _) + _ = _ := by ring + refine (eLpNorm_le_of_ae_eNorm_bound (measurable_polyFun _).aestronglyMeasurable + ((ae_restrict_iff' (measurableSet_dyadicIco k i)).2 (Filter.Eventually.of_forall + hpt))).trans_eq ?_ + rw [Measure.restrict_apply_univ, volume_dyadicIco, smul_eq_mul, ← hθ'] + have h1 : ENNReal.ofReal (2 ^ k) ^ (1 / p.toReal) * ENNReal.ofReal (1 / 2 ^ k) ^ (1 / p.toReal) = + 1 := by + rw [← ENNReal.mul_rpow_of_nonneg _ _ hθ, ← ENNReal.ofReal_mul (by positivity), + mul_one_div_cancel (by positivity), ENNReal.ofReal_one, ENNReal.one_rpow] + calc MN * (Cb * ppProjConst r) * ENNReal.ofReal (2 ^ k) ^ (1 / p.toReal) * + (∑ n ∈ Finset.Ioc ((i : ℤ) - r) i, eLpNorm g p (volume.restrict (dyadicIco k n.toNat))) * + ENNReal.ofReal (1 / 2 ^ k) ^ (1 / p.toReal) + = MN * (Cb * ppProjConst r) * (ENNReal.ofReal (2 ^ k) ^ (1 / p.toReal) * + ENNReal.ofReal (1 / 2 ^ k) ^ (1 / p.toReal)) * + ∑ n ∈ Finset.Ioc ((i : ℤ) - r) i, eLpNorm g p (volume.restrict (dyadicIco k n.toNat)) + := by + ring + _ = _ := by rw [h1, mul_one] + +end Interval diff --git a/LeanPool/FunctionSpaces/Domains/Interval/Smoothing.lean b/LeanPool/FunctionSpaces/Domains/Interval/Smoothing.lean new file mode 100644 index 0000000000..f6f2675a0b --- /dev/null +++ b/LeanPool/FunctionSpaces/Domains/Interval/Smoothing.lean @@ -0,0 +1,518 @@ +/- +Copyright (c) 2026 Mario Ullrich. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Mario Ullrich +-/ +module + +public import LeanPool.FunctionSpaces.Analysis.Lp.Young +public import LeanPool.FunctionSpaces.Domains.Interval.Steklov +public import Mathlib.MeasureTheory.Integral.Prod + +/- +Modified for Lean Pool: module names and imports adapted. +-/ + +/-! +# Smoothing by Steklov averages + +For continuous `f`, `r ≥ 1` and `δ > 0` the **Steklov smoothing** + +`S_δ f = ∑_{k=1}^r (-1)^(k+1) C(r,k) M_{kδ}^r f` (`Interval.smooth`) + +is `r` times continuously differentiable, and it is close to `f` in terms of differences: + +* `f - S_δ f = (-1)^r avg_{v ∈ [0, δ]^r} Δ^r_{v_1 + ⋯ + v_r} f`, so + `‖f - S_δ f‖_{L_p(J)} ≤ sup_{0 ≤ h ≤ rδ} ‖Δ_h^r f‖_{L_p(J)}` (`Interval.eLpNorm_sub_smooth_le`); +* `(S_δ f)^(r) = ∑_{k=1}^r (-1)^(k+1) C(r,k) (kδ)^(-r) Δ_{kδ}^r f` + (`Interval.iteratedDeriv_smooth_eq_sum_smul`), so + `‖(S_δ f)^(r)‖_{L_p(J)} ≤ 2^r δ^(-r) sup_{0 ≤ h ≤ rδ} ‖Δ_h^r f‖_{L_p(J)}` + (`Interval.eLpNorm_iteratedDeriv_smooth_le`). + +The derivative bound holds for any measure and any family `D_h` with `‖D_h‖_{L_p(μ)} ≤ B` +(`Interval.eLpNorm_sum_smoothCoeff_smul_le`); the cube and the whole line use it. + +The average over the cube `[0, δ]^r` is built as the `r`-fold average in the step, +`Interval.avgStepIter`, and the `L_p` bound for averages is Minkowski's inequality in the form +`‖δ^(-1) ∫_0^δ K(t, ·) dt‖_p ≤ sup_t ‖K(t, ·)‖_p` (`Interval.eLpNorm_avg_le`), the weighted +average with the weight `δ^(-1) 1_{(0, δ]}` (`MeasureTheory.eLpNorm_integral_kernel_le_of_bound`). +Here `1 ≤ p < ∞`. + +With `δ = L / r²` the smoothing at `x` looks at `[x, x + L]`. On a left part `[0, w]` of `[0, b]` +with `w + L ≤ b` this gives `‖f - S_δ f‖_p ≤ ω_r(f, L, [0, b])_p` and +`‖(S_δ f)^(r)‖_p ≤ L^(-r) 2^r r^(2r) ω_r(f, L, [0, b])_p`, and Taylor's theorem gives polynomial +approximations of `S_δ f` on all subintervals (`Interval.exists_left_smoothing`). The reflection +`x ↦ b - x` gives the same on a right part `[b - w, b]` (`Interval.exists_right_smoothing`). These +are the local estimates behind Jackson's and Whitney's inequalities. +-/ + +@[expose] public section + +open MeasureTheory Set Polynomial +open Rd (higherDiff) +open scoped ENNReal + +namespace Interval + +variable {α : Type*} + +/-- Averaging a function of `(h, x)` in the step: `δ^(-1) ∫_0^δ G(σ + t, x) dt`. The point `x` +lies in any space `α`: the real line for the interval, the cube for slices in one coordinate. -/ +noncomputable def avgStep (δ : ℝ) (G : ℝ → α → ℂ) (σ : ℝ) (x : α) : ℂ := + ((δ : ℂ))⁻¹ * ∫ t in (0 : ℝ)..δ, G (σ + t) x + +/-- The `m`-fold average in the step. -/ +noncomputable def avgStepIter (m : ℕ) (δ : ℝ) (G : ℝ → α → ℂ) : ℝ → α → ℂ := (avgStep δ)^[m] G + +/-- `avgStepIter (m+1) = avgStep ∘ avgStepIter m`. -/ +theorem avgStepIter_succ (m : ℕ) (δ : ℝ) (G : ℝ → α → ℂ) : + avgStepIter (m + 1) δ G = avgStep δ (avgStepIter m δ G) := by + rw [avgStepIter, Function.iterate_succ_apply'] + rfl + +/-- The iterated average at a point only sees the values at that point: if `G(h, x) = G'(h, x')` +for all steps `h`, the averages at `x` and at `x'` agree. -/ +theorem avgStepIter_congr_point {β : Type*} {G : ℝ → α → ℂ} {G' : ℝ → β → ℂ} {x : α} {x' : β} + (h : ∀ s, G s x = G' s x') (m : ℕ) (δ σ : ℝ) : + avgStepIter m δ G σ x = avgStepIter m δ G' σ x' := by + induction m generalizing σ with + | zero => exact h σ + | succ m ih => + rw [avgStepIter_succ, avgStepIter_succ] + simp only [avgStep, ih] + +/-- Averages of jointly continuous functions are jointly continuous. -/ +theorem continuous_avgStep [TopologicalSpace α] {G : ℝ → α → ℂ} + (hG : Continuous (Function.uncurry G)) (δ : ℝ) : + Continuous (Function.uncurry (avgStep δ G)) := by + have hc : Continuous (Function.uncurry fun (q : ℝ × α) (t : ℝ) => G (q.1 + t) q.2) := + hG.comp (by fun_prop : Continuous fun p : (ℝ × α) × ℝ => (p.1.1 + p.2, p.1.2)) + have h : Continuous fun q : ℝ × α => ∫ t in (0 : ℝ)..δ, G (q.1 + t) q.2 := + intervalIntegral.continuous_parametric_intervalIntegral_of_continuous' hc 0 δ + exact continuous_const.mul h + +/-- Iterated averages of jointly continuous functions are jointly continuous. -/ +theorem continuous_avgStepIter [TopologicalSpace α] {G : ℝ → α → ℂ} + (hG : Continuous (Function.uncurry G)) (m : ℕ) (δ : ℝ) : + Continuous (Function.uncurry (avgStepIter m δ G)) := by + induction m with + | zero => exact hG + | succ m ih => rw [avgStepIter_succ]; exact continuous_avgStep ih δ + +/-- **Minkowski's inequality for averages**: for jointly continuous `K`, `δ > 0`, +`1 ≤ p < ∞` and an s-finite measure `μ` on the point space, +`‖δ^(-1) ∫_0^δ K(t, ·) dt‖_{L_p(μ)} ≤ sup_{0 ≤ t ≤ δ} ‖K(t, ·)‖_{L_p(μ)}`: the weighted average +with the weight `Φ = δ^(-1) 1_{(0, δ]}` of total mass `1` +(`MeasureTheory.eLpNorm_integral_kernel_le_of_bound`). -/ +theorem eLpNorm_avg_le [TopologicalSpace α] [MeasurableSpace α] [OpensMeasurableSpace α] + [SecondCountableTopology α] {K : ℝ → α → ℂ} (hK : Continuous (Function.uncurry K)) {δ : ℝ} + (hδ : 0 < δ) {p : ℝ≥0∞} (hp : 1 ≤ p) (hp' : p ≠ ∞) (μ : Measure α) [SFinite μ] : + eLpNorm (fun x => ((δ : ℂ))⁻¹ * ∫ t in (0 : ℝ)..δ, K t x) p μ ≤ + ⨆ t ∈ Icc 0 δ, eLpNorm (K t) p μ := by + set Φ : ℝ → ℂ := (Ioc 0 δ).indicator fun _ => ((δ : ℂ))⁻¹ + have hΦ : ∫⁻ t, ‖Φ t‖ₑ = 1 := by + simp only [Φ, eNorm_indicator_eq_indicator_eNorm] + rw [lintegral_indicator measurableSet_Ioc, setLIntegral_const, Real.volume_Ioc, sub_zero, + ← ofReal_norm, norm_inv, Complex.norm_real, Real.norm_eq_abs, abs_of_pos hδ, + ENNReal.ofReal_inv_of_pos hδ, + ENNReal.inv_mul_cancel (by simpa using hδ) ENNReal.ofReal_ne_top] + have heq : (fun x => ((δ : ℂ))⁻¹ * ∫ t in (0 : ℝ)..δ, K t x) = + fun x => ∫ t, Φ t * K t x := by + funext x + have h : ∀ t, Φ t * K t x = + (Ioc 0 δ).indicator (fun t => ((δ : ℂ))⁻¹ * K t x) t := fun t => by + by_cases ht : t ∈ Ioc 0 δ + · simp only [Φ, indicator_of_mem ht] + · simp only [Φ, indicator_of_notMem ht, zero_mul] + simp_rw [h] + rw [integral_indicator measurableSet_Ioc, integral_const_mul, + intervalIntegral.integral_of_le hδ.le] + have hG : Continuous (Function.uncurry fun (x : α) (t : ℝ) => K t x) := + hK.comp (by fun_prop : Continuous fun q : α × ℝ => (q.2, q.1)) + have hΦm : AEStronglyMeasurable Φ volume := + (measurable_const.indicator measurableSet_Ioc).aestronglyMeasurable + rw [heq] + refine (eLpNorm_integral_kernel_le_of_bound hp hp' hΦm (by rw [hΦ]; exact one_ne_zero) + (by rw [hΦ]; exact ENNReal.one_ne_top) hG.measurable fun t ht => ?_).trans_eq + (by rw [hΦ, one_mul]) + exact le_iSup₂ (f := fun t (_ : t ∈ Icc 0 δ) => eLpNorm (K t) p μ) t + (Ioc_subset_Icc_self (mem_of_indicator_ne_zero ht)) + +/-- **Iterated averages are bounded by the sup over the steps**: +`‖avg^m G(σ, ·)‖_{L_p(μ)} ≤ sup_{σ ≤ h ≤ σ + mδ} ‖G(h, ·)‖_{L_p(μ)}`. -/ +theorem eLpNorm_avgStepIter_le [TopologicalSpace α] [MeasurableSpace α] [OpensMeasurableSpace α] + [SecondCountableTopology α] {G : ℝ → α → ℂ} (hG : Continuous (Function.uncurry G)) {δ : ℝ} + (hδ : 0 < δ) {p : ℝ≥0∞} (hp : 1 ≤ p) (hp' : p ≠ ∞) (μ : Measure α) [SFinite μ] (m : ℕ) + (σ : ℝ) : + eLpNorm (avgStepIter m δ G σ) p μ ≤ ⨆ h ∈ Icc σ (σ + m * δ), eLpNorm (G h) p μ := by + induction m generalizing σ with + | zero => + exact le_iSup₂ (f := fun h (_ : h ∈ Icc σ (σ + (0 : ℕ) * δ)) => eLpNorm (G h) p μ) σ + ⟨le_rfl, by simp⟩ + | succ m ih => + rw [avgStepIter_succ] + have hK : Continuous (Function.uncurry fun t x => avgStepIter m δ G (σ + t) x) := + (continuous_avgStepIter hG m δ).comp + (by fun_prop : Continuous fun p : ℝ × α => (σ + p.1, p.2)) + refine (eLpNorm_avg_le hK hδ hp hp' μ).trans (iSup₂_le fun t ht => (ih (σ + t)).trans ?_) + refine iSup₂_le fun h hh => le_iSup₂_of_le h ⟨?_, ?_⟩ le_rfl + · linarith [ht.1, hh.1] + · have := hh.2; push_cast at this ⊢; nlinarith [ht.2] + +/-- Averaging a function of `x` alone changes nothing. -/ +theorem avgStepIter_const (g : ℝ → ℂ) {δ : ℝ} (hδ : δ ≠ 0) (m : ℕ) : + avgStepIter m δ (fun _ x => g x) = fun _ x => g x := by + induction m with + | zero => rfl + | succ m ih => + rw [avgStepIter_succ, ih] + funext σ x + have hδ' : (δ : ℂ) ≠ 0 := by exact_mod_cast hδ + simp only [avgStep, intervalIntegral.integral_const, sub_zero, Complex.real_smul] + field_simp + +/-- **Averaged translates are Steklov averages**: averaging `g(x + k h)` `m` times in the step +gives `M_{kδ}^m g(x + kσ)`, for `k ≥ 1`. -/ +theorem avgStepIter_shift (g : ℝ → ℂ) {k : ℕ} (hk : 1 ≤ k) (δ : ℝ) (m : ℕ) : + avgStepIter m δ (fun h x => g (x + k * h)) = + fun σ x => steklovIter m (k * δ) g (x + k * σ) := by + have hk0 : (k : ℝ) ≠ 0 := by exact_mod_cast (show k ≠ 0 by omega) + induction m with + | zero => rfl + | succ m ih => + rw [avgStepIter_succ, ih] + funext σ x + rw [steklovIter_succ, steklov] + simp only [avgStep] + have hsub : ∫ t in (0 : ℝ)..δ, steklovIter m (k * δ) g (x + k * (σ + t)) = + (k : ℝ)⁻¹ • ∫ τ in (0 : ℝ)..k * δ, steklovIter m (k * δ) g (x + k * σ + τ) := by + calc ∫ t in (0 : ℝ)..δ, steklovIter m (k * δ) g (x + k * (σ + t)) + = ∫ t in (0 : ℝ)..δ, (fun τ => steklovIter m (k * δ) g (x + k * σ + τ)) (k * t) := by + congr 1 + funext t + simp only + congr 1 + ring + _ = (k : ℝ)⁻¹ • ∫ τ in (k : ℝ) * 0..(k : ℝ) * δ, + steklovIter m (k * δ) g (x + k * σ + τ) := + intervalIntegral.integral_comp_mul_left + (fun τ => steklovIter m (k * δ) g (x + k * σ + τ)) hk0 + _ = _ := by rw [mul_zero] + rw [hsub, Complex.real_smul] + push_cast + field_simp + +/-- Averages of finite linear combinations. -/ +theorem avgStepIter_sum {ι : Type*} (s : Finset ι) {G : ι → ℝ → ℝ → ℂ} + (hG : ∀ i ∈ s, Continuous (Function.uncurry (G i))) (c : ι → ℂ) (δ : ℝ) (m : ℕ) : + avgStepIter m δ (fun h x => ∑ i ∈ s, c i * G i h x) = + fun σ x => ∑ i ∈ s, c i * avgStepIter m δ (G i) σ x := by + induction m with + | zero => rfl + | succ m ih => + rw [avgStepIter_succ, ih] + funext σ x + simp only [avgStep, avgStepIter_succ] + have hint : ∀ i ∈ s, IntervalIntegrable (fun t => c i * avgStepIter m δ (G i) (σ + t) x) + volume 0 δ := fun i hi => by + have hcI : Continuous fun t => avgStepIter m δ (G i) (σ + t) x := + (continuous_avgStepIter (hG i hi) m δ).comp + (by fun_prop : Continuous fun t : ℝ => (σ + t, x)) + exact (hcI.const_mul (c i)).intervalIntegrable _ _ + rw [intervalIntegral.integral_finsetSum hint] + rw [Finset.mul_sum] + refine Finset.sum_congr rfl fun i hi => ?_ + rw [intervalIntegral.integral_const_mul] + ring + +/-- The **Steklov smoothing** `S_δ f = ∑_{k=1}^r (-1)^(k+1) C(r,k) M_{kδ}^r f`. -/ +noncomputable def smooth (r : ℕ) (δ : ℝ) (f : ℝ → ℂ) (x : ℝ) : ℂ := + ∑ k ∈ Finset.range r, ((-1 : ℂ) ^ (k + 2) * (r.choose (k + 1) : ℂ)) * + steklovIter r ((k + 1 : ℕ) * δ) f x + +/-- **`f - S_δ f` is an averaged difference**: +`f - S_δ f = (-1)^r avg^r_{h} Δ_h^r f` at step `0`. -/ +theorem sub_smooth_eq {f : ℝ → ℂ} (hf : Continuous f) (r : ℕ) {δ : ℝ} (hδ : δ ≠ 0) (x : ℝ) : + f x - smooth r δ f x = + (-1 : ℂ) ^ r * avgStepIter r δ (fun h y => higherDiff r h f y) 0 x := by + have hrepr : (fun h y => higherDiff r h f y) = fun h y => ∑ k ∈ Finset.range (r + 1), + ((-1 : ℂ) ^ (r - k) * (r.choose k : ℂ)) * f (y + k * h) := + funext fun h => funext fun y => higherDiff_apply r h f y + have hcont : ∀ k ∈ Finset.range (r + 1), + Continuous (Function.uncurry fun (h y : ℝ) => f (y + k * h)) := fun k _ => + hf.comp (by fun_prop) + rw [hrepr, avgStepIter_sum _ hcont] + simp only + rw [Finset.sum_range_succ', mul_add, Finset.mul_sum] + have h0 : avgStepIter r δ (fun (h y : ℝ) => f (y + ((0 : ℕ) : ℝ) * h)) 0 x = f x := by + have : (fun (h y : ℝ) => f (y + ((0 : ℕ) : ℝ) * h)) = fun _ y => f y := by + funext h y; simp + rw [this, avgStepIter_const f hδ] + rw [h0] + have hk : ∀ k ∈ Finset.range r, avgStepIter r δ (fun (h y : ℝ) => f (y + ((k + 1 : ℕ) : ℝ) * h)) + 0 x = steklovIter r ((k + 1 : ℕ) * δ) f x := fun k _ => by + rw [avgStepIter_shift f (by omega) δ] + simp + rw [Finset.sum_congr rfl fun k hk' => by rw [hk k hk'], smooth] + have hsign : ∀ k ∈ Finset.range r, (-1 : ℂ) ^ r * (((-1 : ℂ) ^ (r - (k + 1)) * + (r.choose (k + 1) : ℂ)) * steklovIter r ((k + 1 : ℕ) * δ) f x) = + -(((-1 : ℂ) ^ (k + 2) * (r.choose (k + 1) : ℂ)) * steklovIter r ((k + 1 : ℕ) * δ) f x) := + fun k hk' => by + have hkr : k + 1 ≤ r := Finset.mem_range.1 hk' + have : (-1 : ℂ) ^ r = (-1) ^ (r - (k + 1)) * (-1) ^ (k + 1) := by + rw [← pow_add, Nat.sub_add_cancel hkr] + rw [this] + have h2 : ((-1 : ℂ) ^ (r - (k + 1))) * (-1) ^ (r - (k + 1)) = 1 := by + rw [← pow_add, ← two_mul, pow_mul]; simp + calc (-1 : ℂ) ^ (r - (k + 1)) * (-1) ^ (k + 1) * ((-1) ^ (r - (k + 1)) * + ↑(r.choose (k + 1)) * steklovIter r (↑(k + 1) * δ) f x) + = ((-1 : ℂ) ^ (r - (k + 1)) * (-1) ^ (r - (k + 1))) * (-1) ^ (k + 1) * + (↑(r.choose (k + 1)) * steklovIter r (↑(k + 1) * δ) f x) := by ring + _ = _ := by rw [h2, pow_succ (-1 : ℂ) (k + 1)]; ring + rw [Finset.sum_congr rfl hsign, Finset.sum_neg_distrib] + have hr0 : (-1 : ℂ) ^ r * ((-1 : ℂ) ^ (r - 0) * (r.choose 0 : ℂ) * f x) = f x := by + rw [Nat.sub_zero, Nat.choose_zero_right, Nat.cast_one, mul_one, ← mul_assoc, ← pow_add, + ← two_mul, pow_mul] + simp + rw [hr0] + ring + +/-- The Steklov smoothing of a continuous function lies in `C^r`. -/ +theorem contDiff_smooth {f : ℝ → ℂ} (hf : Continuous f) (r : ℕ) (δ : ℝ) : + ContDiff ℝ r (smooth r δ f) := by + change ContDiff ℝ r fun x => ∑ k ∈ Finset.range r, + ((-1 : ℂ) ^ (k + 2) * (r.choose (k + 1) : ℂ)) * steklovIter r ((k + 1 : ℕ) * δ) f x + exact ContDiff.sum fun k _ => contDiff_const.mul (contDiff_steklovIter hf r _) + +/-- **The derivative of order `r` of the smoothing is a combination of differences**: +`(S_δ f)^(r) = ∑_{k=1}^r (-1)^(k+1) C(r,k) (kδ)^(-r) Δ_{kδ}^r f`. -/ +theorem iteratedDeriv_smooth {f : ℝ → ℂ} (hf : Continuous f) (r : ℕ) (δ : ℝ) : + iteratedDeriv r (smooth r δ f) = fun x => ∑ k ∈ Finset.range r, + ((-1 : ℂ) ^ (k + 2) * (r.choose (k + 1) : ℂ)) * + ((((k + 1 : ℕ) * δ : ℝ) : ℂ)⁻¹ ^ r * higherDiff r ((k + 1 : ℕ) * δ) f x) := by + have : smooth r δ f = ∑ k ∈ Finset.range r, fun x => + ((-1 : ℂ) ^ (k + 2) * (r.choose (k + 1) : ℂ)) * steklovIter r ((k + 1 : ℕ) * δ) f x := by + funext x; simp [smooth, Finset.sum_apply] + rw [this] + funext x + rw [iteratedDeriv_sum fun k _ => + (contDiff_const.mul (contDiff_steklovIter hf r _)).contDiffAt] + refine Finset.sum_congr rfl fun k _ => ?_ + rw [iteratedDeriv_const_mul_field, iteratedDeriv_steklovIter hf] + +/-- Differences of a continuous function are jointly continuous in the step and the point. -/ +theorem continuous_higherDiff_uncurry {f : ℝ → ℂ} (hf : Continuous f) (r : ℕ) : + Continuous (Function.uncurry fun (h y : ℝ) => higherDiff r h f y) := by + have : (Function.uncurry fun (h y : ℝ) => higherDiff r h f y) = fun q : ℝ × ℝ => + ∑ k ∈ Finset.range (r + 1), ((-1 : ℂ) ^ (r - k) * (r.choose k : ℂ)) * f (q.2 + k * q.1) := + funext fun q => higherDiff_apply r q.1 f q.2 + rw [this] + exact continuous_finsetSum _ fun k _ => continuous_const.mul (hf.comp (by fun_prop)) + +/-- **Differences on a subinterval are bounded by the modulus**: for `a ≤ u`, `w + r (rδ) ≤ b` and +`0 ≤ h ≤ rδ`, `‖Δ_h^r f‖_{L_p[u, w]} ≤ ω_r(f, rδ, [a, b])_p`, since `[u, w]` lies in +`[a, b - rh]`. -/ +theorem eLpNorm_higherDiff_Icc_le_modulus {f : ℝ → ℂ} {r : ℕ} {δ : ℝ} {p : ℝ≥0∞} + {a b u w h : ℝ} (hau : a ≤ u) (hwb : w + r * (r * δ) ≤ b) (h0 : 0 ≤ h) (hh : h ≤ r * δ) : + eLpNorm (higherDiff r h f) p (volume.restrict (Icc u w)) ≤ modulus r p a b f (r * δ) := by + refine (eLpNorm_Icc_mono _ p hau ?_).trans (eLpNorm_higherDiff_le_modulus ⟨h0, hh⟩) + have : (r : ℝ) * h ≤ r * (r * δ) := mul_le_mul_of_nonneg_left hh (Nat.cast_nonneg r) + linarith + +/-- **The smoothing is close to `f`**: for `[u, w]` with `a ≤ u` and `w + r² δ ≤ b`, +`‖f - S_δ f‖_{L_p[u, w]} ≤ ω_r(f, rδ, [a, b])_p`. -/ +theorem eLpNorm_sub_smooth_le {f : ℝ → ℂ} (hf : Continuous f) (r : ℕ) {δ : ℝ} (hδ : 0 < δ) + {p : ℝ≥0∞} (hp : 1 ≤ p) (hp' : p ≠ ∞) {a b u w : ℝ} (hau : a ≤ u) + (hwb : w + r * (r * δ) ≤ b) : + eLpNorm (fun x => f x - smooth r δ f x) p (volume.restrict (Icc u w)) ≤ + modulus r p a b f (r * δ) := by + have heq : (fun x => f x - smooth r δ f x) = ((-1 : ℂ) ^ r) • + avgStepIter r δ (fun h y => higherDiff r h f y) 0 := by + funext x + rw [sub_smooth_eq hf r hδ.ne' x] + rfl + rw [heq, eLpNorm_const_smul, eNorm_pow, eNorm_neg, eNorm_one, one_pow, one_mul] + refine (eLpNorm_avgStepIter_le (continuous_higherDiff_uncurry hf r) hδ hp hp' _ r 0).trans ?_ + refine iSup₂_le fun h hh => ?_ + rw [zero_add] at hh + exact eLpNorm_higherDiff_Icc_le_modulus hau hwb hh.1 hh.2 + +/-- **The derivative of the smoothing as a sum of functions**: for continuous `f : ℝ → ℂ`, +`(S_δ f)^(r) = ∑_{k=1}^r (-1)^(k+1) C(r, k) (kδ)^(-r) Δ_{kδ}^r f` +as an identity of functions `ℝ → ℂ` (`Interval.iteratedDeriv_smooth` at every point), written +with the index `k + 1` for `k < r` and as a sum `∑_k c_k • g_k`, the form to which the triangle +inequality in `L_p` applies. -/ +theorem iteratedDeriv_smooth_eq_sum_smul {f : ℝ → ℂ} (hf : Continuous f) (r : ℕ) (δ : ℝ) : + iteratedDeriv r (smooth r δ f) = ∑ k ∈ Finset.range r, + (((-1 : ℂ) ^ (k + 2) * (r.choose (k + 1) : ℂ)) * + (((k + 1 : ℕ) * δ : ℝ) : ℂ)⁻¹ ^ r) • higherDiff r ((k + 1 : ℕ) * δ) f := by + rw [iteratedDeriv_smooth hf r δ] + funext x + rw [Finset.sum_apply] + refine Finset.sum_congr rfl fun k _ => ?_ + rw [Pi.smul_apply, smul_eq_mul] + ring + +/-- `∑_{k=1}^r C(r, k) ≤ 2^r`, written with the index `k + 1` for `k < r`: the full sum +`∑_{k=0}^r C(r, k)` is `2^r` (Mathlib's `Nat.sum_range_choose`). -/ +theorem sum_range_choose_succ_le (r : ℕ) : + ∑ k ∈ Finset.range r, (r.choose (k + 1) : ℝ≥0∞) ≤ 2 ^ r := by + have h := Nat.sum_range_choose r + rw [Finset.sum_range_succ'] at h + have h' : ∑ k ∈ Finset.range r, r.choose (k + 1) ≤ 2 ^ r := by omega + exact_mod_cast h' + +/-- **One term of the derivative of the smoothing**: for `k ≥ 1` (written `k + 1`), `δ > 0`, a +measure `μ` and `g` with `‖g‖_{L_p(μ)} ≤ B`, +`‖(-1)^(k+1) C(r, k) (kδ)^(-r) g‖_{L_p(μ)} ≤ C(r, k) δ^(-r) B`, since `(kδ)^(-r) ≤ δ^(-r)`. -/ +theorem eLpNorm_smoothCoeff_smul_le [MeasurableSpace α] {μ : Measure α} {r k : ℕ} {δ : ℝ} + (hδ : 0 < δ) {p : ℝ≥0∞} {g : α → ℂ} {B : ℝ≥0∞} (hg : eLpNorm g p μ ≤ B) : + eLpNorm ((((-1 : ℂ) ^ (k + 2) * (r.choose (k + 1) : ℂ)) * + (((k + 1 : ℕ) * δ : ℝ) : ℂ)⁻¹ ^ r) • g) p μ ≤ + (r.choose (k + 1) : ℝ≥0∞) * ((ENNReal.ofReal δ)⁻¹ ^ r * B) := by + have hk1 : (1 : ℝ) ≤ ((k + 1 : ℕ) : ℝ) := by exact_mod_cast Nat.succ_le_succ (Nat.zero_le k) + rw [eLpNorm_const_smul, eNorm_mul, eNorm_mul, eNorm_pow, eNorm_neg, eNorm_one, one_pow, + one_mul, mul_assoc] + refine mul_le_mul' ?_ (mul_le_mul' ?_ hg) + · rw [← ofReal_norm, Complex.norm_natCast, ENNReal.ofReal_natCast] + · rw [eNorm_pow, ← ofReal_norm, norm_inv, Complex.norm_real, Real.norm_eq_abs, + abs_of_pos (by positivity), ENNReal.ofReal_inv_of_pos (by positivity)] + gcongr + exact le_mul_of_one_le_left hδ.le hk1 + +/-- **The derivative bound of the smoothing, for any measure and any family**: for `δ > 0`, +`1 ≤ p ≤ ∞`, a measure `μ` and functions `D_h` with `‖D_h‖_{L_p(μ)} ≤ B` for `0 ≤ h ≤ rδ`, +`‖∑_{k=1}^r (-1)^(k+1) C(r, k) (kδ)^(-r) D_{kδ}‖_{L_p(μ)} ≤ 2^r δ^(-r) B`, by the triangle +inequality and `∑_{k=1}^r C(r, k) ≤ 2^r`. With `D_h = Δ_h^r f` this bounds `(S_δ f)^(r)` +(`Interval.iteratedDeriv_smooth_eq_sum_smul`) on an interval, on a region of the cube and on the +whole line. -/ +theorem eLpNorm_sum_smoothCoeff_smul_le [MeasurableSpace α] {μ : Measure α} {r : ℕ} {δ : ℝ} + (hδ : 0 < δ) {p : ℝ≥0∞} (hp : 1 ≤ p) {D : ℝ → α → ℂ} {B : ℝ≥0∞} + (hD : ∀ h, 0 ≤ h → h ≤ r * δ → eLpNorm (D h) p μ ≤ B) : + eLpNorm (∑ k ∈ Finset.range r, (((-1 : ℂ) ^ (k + 2) * (r.choose (k + 1) : ℂ)) * + (((k + 1 : ℕ) * δ : ℝ) : ℂ)⁻¹ ^ r) • D ((k + 1 : ℕ) * δ)) p μ ≤ + 2 ^ r * (ENNReal.ofReal δ)⁻¹ ^ r * B := by + have hk : ∀ k ∈ Finset.range r, eLpNorm ((((-1 : ℂ) ^ (k + 2) * (r.choose (k + 1) : ℂ)) * + (((k + 1 : ℕ) * δ : ℝ) : ℂ)⁻¹ ^ r) • D ((k + 1 : ℕ) * δ)) p μ ≤ + (r.choose (k + 1) : ℝ≥0∞) * ((ENNReal.ofReal δ)⁻¹ ^ r * B) := fun k hk => + eLpNorm_smoothCoeff_smul_le hδ (hD _ (by positivity) + (mul_le_mul_of_nonneg_right (by exact_mod_cast Finset.mem_range.1 hk) hδ.le)) + refine ((eLpNorm_sum_le hp).trans (Finset.sum_le_sum hk)).trans ?_ + rw [← Finset.sum_mul, mul_assoc] + gcongr + exact sum_range_choose_succ_le r + +/-- **The derivative of order `r` of the smoothing**: for `[u, w]` with `a ≤ u` and +`w + r² δ ≤ b`, `‖(S_δ f)^(r)‖_{L_p[u, w]} ≤ 2^r δ^(-r) ω_r(f, rδ, [a, b])_p`. -/ +theorem eLpNorm_iteratedDeriv_smooth_le {f : ℝ → ℂ} (hf : Continuous f) (r : ℕ) {δ : ℝ} + (hδ : 0 < δ) {p : ℝ≥0∞} (hp : 1 ≤ p) {a b u w : ℝ} (hau : a ≤ u) + (hwb : w + r * (r * δ) ≤ b) : + eLpNorm (iteratedDeriv r (smooth r δ f)) p (volume.restrict (Icc u w)) ≤ + 2 ^ r * (ENNReal.ofReal δ)⁻¹ ^ r * modulus r p a b f (r * δ) := by + rw [iteratedDeriv_smooth_eq_sum_smul hf r δ] + exact eLpNorm_sum_smoothCoeff_smul_le (D := fun h => higherDiff r h f) hδ hp + fun h h0 hh => eLpNorm_higherDiff_Icc_le_modulus hau hwb h0 hh + +/-- **The step `δ = L / r²` of the smoothing**: for `r ≥ 1` and `L > 0`, `δ > 0`, `rδ ≤ L` and +`r (rδ) = L`. -/ +theorem step_div_sq_bounds {r : ℕ} (hr : 1 ≤ r) {L : ℝ} (hL : 0 < L) : + 0 < L / r ^ 2 ∧ (r : ℝ) * (L / r ^ 2) ≤ L ∧ (r : ℝ) * (r * (L / r ^ 2)) = L := by + have hr' : (0 : ℝ) < r := by exact_mod_cast hr + refine ⟨by positivity, ?_, by field_simp⟩ + rw [show (r : ℝ) * (L / r ^ 2) = L / r by field_simp] + exact div_le_self hL.le (by exact_mod_cast hr) + +/-- **The constant of the derivative at the step `δ = L / r²`**: for `r ≥ 1`, `L > 0` and +`a ≤ b`, `2^r δ^(-r) a ≤ L^(-r) 2^r r^(2r) b`, since `δ^(-1) = r² L^(-1)`. -/ +theorem two_pow_mul_inv_div_sq_pow_mul_le {r : ℕ} (hr : 1 ≤ r) {L : ℝ} (hL : 0 < L) + {a b : ℝ≥0∞} (hab : a ≤ b) : + 2 ^ r * (ENNReal.ofReal (L / r ^ 2))⁻¹ ^ r * a ≤ + ENNReal.ofReal L⁻¹ ^ r * (2 ^ r * (r : ℝ≥0∞) ^ (2 * r)) * b := by + have hr' : (0 : ℝ) < r := by exact_mod_cast hr + have hinv : (ENNReal.ofReal (L / r ^ 2))⁻¹ = (r : ℝ≥0∞) ^ 2 * ENNReal.ofReal L⁻¹ := by + rw [← ENNReal.ofReal_inv_of_pos (by positivity), show (L / (r : ℝ) ^ 2)⁻¹ = (r : ℝ) ^ 2 * L⁻¹ by + field_simp, ENNReal.ofReal_mul (by positivity), ENNReal.ofReal_pow (Nat.cast_nonneg r), + ENNReal.ofReal_natCast] + rw [hinv, mul_pow, ← pow_mul] + calc 2 ^ r * ((r : ℝ≥0∞) ^ (2 * r) * ENNReal.ofReal L⁻¹ ^ r) * a + ≤ 2 ^ r * ((r : ℝ≥0∞) ^ (2 * r) * ENNReal.ofReal L⁻¹ ^ r) * b := mul_le_mul' le_rfl hab + _ = _ := by ring + +/-- **Taylor polynomials of a reflected function**: if `g` has a polynomial `T` of degree `< r` +with `‖g - T‖_{L_p[c - v, c - u]} ≤ (v - u)^r ‖D‖_{L_p[c - v, c - u]}`, then `T(c - ·)` does the +same for `g(c - ·)` on `[u, v]`, with `D(c - ·)` in place of `D`. -/ +theorem exists_eLpNorm_sub_polyFun_reflect_le {g D : ℝ → ℂ} (hg : Measurable g) + (hD : Measurable D) {r : ℕ} {p : ℝ≥0∞} {c u v : ℝ} + (h : ∃ T ∈ degreeLT ℂ r, eLpNorm (fun x => g x - polyFun T x) p + (volume.restrict (Icc (c - v) (c - u))) ≤ ENNReal.ofReal ((c - u) - (c - v)) ^ r * + eLpNorm D p (volume.restrict (Icc (c - v) (c - u)))) : + ∃ T ∈ degreeLT ℂ r, eLpNorm (fun x => g (c - x) - polyFun T x) p (volume.restrict (Icc u v)) ≤ + ENNReal.ofReal (v - u) ^ r * eLpNorm (fun x => D (c - x)) p (volume.restrict (Icc u v)) := by + obtain ⟨T, hT, hTb⟩ := h + refine ⟨T.comp (C ((c : ℝ) : ℂ) + C ((-1 : ℝ) : ℂ) * X), + comp_affine_mem_degreeLT hT _ _, ?_⟩ + have hfun : (fun x => g (c - x) - polyFun (T.comp (C ((c : ℝ) : ℂ) + + C ((-1 : ℝ) : ℂ) * X)) x) = fun x => (fun y => g y - polyFun T y) (c - x) := by + funext x + rw [polyFun_comp_affine] + congr 2 + ring + rw [hfun, eLpNorm_comp_sub_Icc (f := fun y => g y - polyFun T y) + (hg.sub (measurable_polyFun T)) p c u v, eLpNorm_comp_sub_Icc hD p c u v] + rw [show (c - u) - (c - v) = v - u by ring] at hTb + exact hTb + +/-- **Smoothing on a left part**: for continuous `F`, `r ≥ 1`, a scale `L > 0` and `w + L ≤ b`, +the Steklov smoothing `g = S_δ F`, `δ = L/r²`, and its derivative `D = g^(r)` satisfy +`‖F - g‖_{L_p[0,w]} ≤ ω_r(F, L, [0, b])_p` and +`‖D‖_{L_p[0,w]} ≤ L^(-r) 2^r r^(2r) ω_r(F, L, [0, b])_p`, and for every `u ≤ v` there is `T` of +degree `< r` with `‖g - T‖_{L_p[u,v]} ≤ (v - u)^r ‖D‖_{L_p[u,v]}` (Taylor). -/ +theorem exists_left_smoothing {F : ℝ → ℂ} (hF : Continuous F) {r : ℕ} (hr : 1 ≤ r) + {p : ℝ≥0∞} (hp : 1 ≤ p) (hp' : p ≠ ∞) {b L w : ℝ} (hL : 0 < L) (hwL : w + L ≤ b) : + ∃ g D : ℝ → ℂ, Measurable g ∧ Measurable D ∧ + eLpNorm (fun x => F x - g x) p (volume.restrict (Icc 0 w)) ≤ modulus r p 0 b F L ∧ + eLpNorm D p (volume.restrict (Icc 0 w)) ≤ + ENNReal.ofReal L⁻¹ ^ r * (2 ^ r * (r : ℝ≥0∞) ^ (2 * r)) * modulus r p 0 b F L ∧ + ∀ u v : ℝ, u ≤ v → ∃ T ∈ degreeLT ℂ r, + eLpNorm (fun x => g x - polyFun T x) p (volume.restrict (Icc u v)) ≤ + ENNReal.ofReal (v - u) ^ r * eLpNorm D p (volume.restrict (Icc u v)) := by + obtain ⟨hδ, hrδ, hrrδ⟩ := step_div_sq_bounds hr hL + have hwb : w + r * (r * (L / r ^ 2)) ≤ b := by rw [hrrδ]; exact hwL + have hg := contDiff_smooth hF r (L / r ^ 2) + refine ⟨smooth r (L / r ^ 2) F, iteratedDeriv r (smooth r (L / r ^ 2) F), + hg.continuous.measurable, (hg.continuous_iteratedDeriv r le_rfl).measurable, ?_, ?_, + fun u v huv => exists_eLpNorm_sub_polyFun_le hp r hg huv⟩ + · exact (eLpNorm_sub_smooth_le hF r hδ hp hp' le_rfl hwb).trans (modulus_mono r p 0 b F hrδ) + · exact (eLpNorm_iteratedDeriv_smooth_le hF r hδ hp le_rfl hwb).trans + (two_pow_mul_inv_div_sq_pow_mul_le hr hL (modulus_mono r p 0 b F hrδ)) + +/-- **Smoothing on a right part**: the same on `[b - w, b]`, by the reflection `x ↦ b - x`, which +preserves the modulus on `[0, b]` (`Interval.modulus_reflect`). -/ +theorem exists_right_smoothing {F : ℝ → ℂ} (hF : Continuous F) {r : ℕ} (hr : 1 ≤ r) + {p : ℝ≥0∞} (hp : 1 ≤ p) (hp' : p ≠ ∞) {b L w : ℝ} (hL : 0 < L) (hwL : w + L ≤ b) : + ∃ g D : ℝ → ℂ, Measurable g ∧ Measurable D ∧ + eLpNorm (fun x => F x - g x) p (volume.restrict (Icc (b - w) b)) ≤ modulus r p 0 b F L ∧ + eLpNorm D p (volume.restrict (Icc (b - w) b)) ≤ + ENNReal.ofReal L⁻¹ ^ r * (2 ^ r * (r : ℝ≥0∞) ^ (2 * r)) * modulus r p 0 b F L ∧ + ∀ u v : ℝ, u ≤ v → ∃ T ∈ degreeLT ℂ r, + eLpNorm (fun x => g x - polyFun T x) p (volume.restrict (Icc u v)) ≤ + ENNReal.ofReal (v - u) ^ r * eLpNorm D p (volume.restrict (Icc u v)) := by + have hF' : Continuous fun x => F (b - x) := hF.comp (continuous_const.sub continuous_id) + obtain ⟨G, DG, hGm, hDm, h1, h2, h3⟩ := exists_left_smoothing hF' hr hp hp' hL hwL + have hmod : modulus r p 0 b (fun x => F (b - x)) L = modulus r p 0 b F L := by + simpa using modulus_reflect hF.measurable r p 0 b L + rw [hmod] at h1 h2 + refine ⟨fun x => G (b - x), fun x => DG (b - x), hGm.comp (measurable_const.sub measurable_id), + hDm.comp (measurable_const.sub measurable_id), ?_, ?_, fun u v huv => ?_⟩ + · have h := eLpNorm_comp_sub_Icc (f := fun y => F (b - y) - G y) + ((hF'.measurable).sub hGm) p b (b - w) b + simp only [sub_sub_cancel, sub_self] at h + rw [h] + exact h1 + · have h := eLpNorm_comp_sub_Icc hDm p b (b - w) b + simp only [sub_sub_cancel, sub_self] at h + rw [h] + exact h2 + · exact exists_eLpNorm_sub_polyFun_reflect_le hGm hDm (h3 (b - v) (b - u) (by linarith)) + +end Interval diff --git a/LeanPool/FunctionSpaces/Domains/Interval/SplineInverse.lean b/LeanPool/FunctionSpaces/Domains/Interval/SplineInverse.lean new file mode 100644 index 0000000000..d27ce42fc2 --- /dev/null +++ b/LeanPool/FunctionSpaces/Domains/Interval/SplineInverse.lean @@ -0,0 +1,456 @@ +/- +Copyright (c) 2026 Mario Ullrich. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Mario Ullrich +-/ +module + +public import LeanPool.FunctionSpaces.Domains.Interval.PiecewiseInverse +public import LeanPool.FunctionSpaces.Domains.Interval.Splines + +/- +Modified for Lean Pool: module names and imports adapted. +-/ + +/-! +# The inverse inequality for dyadic splines + +For a spline `a` of order `r` and level `j` and every `k`, +`ω_r(a, 2^(-k), [0, 1])_p ≤ C_B 2^(-(k-j)(r-1+1/p)) ‖a‖_p` (`k - j` truncated at `0`). The +order `r - 1 + 1/p` comes from the jumps of the `(r-1)`-th derivative at the knots. + +For `0 ≤ h ≤ 2^(-k)` the difference `Δ_h^r a(x)` vanishes when `x, …, x + rh` lie in one +interval. Otherwise, on `[x, x + rh]` the spline is `Q(y) + ∑_m c_m (y - ξ_m)_+^(r-1)`, with `Q` the +piece at `x` and `ξ_m` the knots in reach (`Interval.polyFun_eq_add_sum_jumps`). The polynomial +part has `Δ_h^r Q = 0`, and `|Δ_h^r (· - ξ)_+^(r-1)(x)| ≤ 2^r (rh)^(r-1)` for `x < ξ` +(`Interval.enorm_higherDiff_truncPow_le`). The jump `c_m L^(r-1) = Q_m(ξ_m + L) - Q_{m-1}(ξ_m + L)`, +`L = 2^(-j)`, is bounded by Nikolskii's inequality on the two neighbouring pieces, which reaches +the doubled interval (`Interval.NikolskiiBound`, `Interval.enorm_jumpCoeff_le`). These steps hold +for differences of every order `m`, the piece then contributing `Δ_h^m Q` +(`Interval.enorm_higherDiff_truncPow_le_of_lt`, `Interval.higherDiff_eq_add_sum_jumps`, +`Interval.enorm_jumpCoeff_mul_higherDiff_truncPow_le_any_order`); the lower orders `m < r` use +them in `FunctionSpaces.Domains.Interval.LowerDifferences`. The strip integral of the piecewise +polynomials turns this pointwise bound into the `L_p` bound +(`Interval.eLpNorm_higherDiff_le_of_pointwise`). +-/ + +@[expose] public section + +open MeasureTheory Set Polynomial +open Rd (higherDiff) +open scoped ENNReal +open ENNReal (dyadicWeight) + +namespace Interval + +variable {p : ℝ≥0∞} [Fact (1 ≤ p)] + +/-- The **truncated power** `(y - ξ)_+^(r-1)`. -/ +noncomputable def truncPow (r : ℕ) (ξ : ℝ) (y : ℝ) : ℂ := + if ξ ≤ y then (((y - ξ) ^ (r - 1) : ℝ) : ℂ) else 0 + +/-- **Differences of any order of a truncated power left of its knot**: for `x < ξ` and +`h ≥ 0`, `|Δ_h^m (· - ξ)_+^(r-1)(x)| ≤ 2^m (mh)^(r-1)`, since `0 ≤ (x + ih - ξ)_+ ≤ mh`. -/ +theorem enorm_higherDiff_truncPow_le_of_lt (r m : ℕ) {ξ h x : ℝ} (hh : 0 ≤ h) (hx : x < ξ) : + ‖higherDiff m h (truncPow r ξ) x‖ₑ ≤ 2 ^ m * ENNReal.ofReal (m * h) ^ (r - 1) := by + refine enorm_higherDiff_le_of_forall fun i hi => ?_ + have hi' : (i : ℝ) ≤ m := by exact_mod_cast Nat.lt_succ_iff.1 (Finset.mem_range.1 hi) + unfold truncPow + split_ifs with hξ + · rw [← ofReal_norm, Complex.norm_real, Real.norm_eq_abs, abs_pow, + abs_of_nonneg (by linarith), ← ENNReal.ofReal_pow (by positivity)] + refine ENNReal.ofReal_le_ofReal (pow_le_pow_left₀ (by linarith) ?_ _) + nlinarith [mul_le_mul_of_nonneg_right hi' hh] + · simp + +/-- **Differences of a truncated power left of its knot**: for `x < ξ` and `h ≥ 0`, +`|Δ_h^r (· - ξ)_+^(r-1)(x)| ≤ 2^r (rh)^(r-1)`, since `0 ≤ (x + ih - ξ)_+ ≤ rh`. -/ +theorem enorm_higherDiff_truncPow_le (r : ℕ) {ξ h x : ℝ} (hh : 0 ≤ h) (hx : x < ξ) : + ‖higherDiff r h (truncPow r ξ) x‖ₑ ≤ 2 ^ r * ENNReal.ofReal (r * h) ^ (r - 1) := + enorm_higherDiff_truncPow_le_of_lt r r hh hx + +/-! ### Splines across the knots -/ + +/-- **Telescoping**: `f b = f a + ∑_{a < m ≤ b} (f m - f (m - 1))` for `a ≤ b`. -/ +theorem eq_add_sum_Ioc_sub {G : Type*} [AddCommGroup G] (f : ℕ → G) {a b : ℕ} (hab : a ≤ b) : + f b = f a + ∑ m ∈ Finset.Ioc a b, (f m - f (m - 1)) := by + induction b, hab using Nat.le_induction with + | base => simp + | succ b hab ih => + rw [Finset.sum_Ioc_succ_top hab, Nat.add_sub_cancel, ← add_assoc, ← ih] + abel + +/-- The **jump coefficients** of pieces `P`: the coefficient of `X^(r-1)` in `P_m - P_{m-1}` at +the knots `0 < m < N`, and `0` elsewhere. With spline joins below `N`, +`P_m - P_{m-1} = c_m (X - ξ_m)^(r-1)` (`Interval.sub_eq_jumpCoeff`). -/ +noncomputable def jumpCoeff (r N : ℕ) (P : ℕ → ℂ[X]) (m : ℕ) : ℂ := + if 0 < m ∧ m < N then (P m - P (m - 1)).coeff (r - 1) else 0 + +/-- The jump at a knot: `P_m - P_{m-1} = c_m (X - ξ_m)^(r-1)`, since `(X - ξ)^(r-1)` is monic of +degree `r - 1`. -/ +theorem sub_eq_jumpCoeff {r j N : ℕ} {P : ℕ → ℂ[X]} (hJ : SplineJoinsBelow r j N P) {m : ℕ} + (h0 : 0 < m) (hm : m < N) : + P m - P (m - 1) = C (jumpCoeff r N P m) * (X - C ((((m : ℝ) / 2 ^ j : ℝ)) : ℂ)) ^ (r - 1) := by + obtain ⟨c, hc⟩ := hJ m h0 hm + have hmon : ((X - C ((((m : ℝ) / 2 ^ j : ℝ)) : ℂ)) ^ (r - 1)).coeff (r - 1) = 1 := by + have h := ((monic_X_sub_C ((((m : ℝ) / 2 ^ j : ℝ)) : ℂ)).pow (r - 1)).coeff_natDegree + rwa [natDegree_pow, natDegree_X_sub_C, mul_one] at h + have h : 0 < m ∧ m < N := ⟨h0, hm⟩ + simp only [jumpCoeff, h, and_self, ↓reduceIte] + rw [hc, coeff_C_mul, hmon, mul_one] + +/-- **A spline across the knots**: let `u` be the polynomial `P_m` on `I_{j,m}` for `m < N`, with +spline joins below `N`. For `0 ≤ x ≤ y < N 2^(-j)` with `⌊2^j y⌋ ≤ ⌊2^j x⌋ + r`, +`u(y) = P_{n₀}(y) + ∑_{n₀ < m ≤ n₀ + r} c_m (y - ξ_m)_+^(r-1)`, `n₀ = ⌊2^j x⌋`. -/ +theorem polyFun_eq_add_sum_jumps {r j N : ℕ} {P : ℕ → ℂ[X]} (hJ : SplineJoinsBelow r j N P) + {u : ℝ → ℂ} (hu : ∀ m < N, ∀ x ∈ dyadicIco j m, u x = polyFun (P m) x) {x y : ℝ} + (hx : 0 ≤ x) (hxy : x ≤ y) (hyN : y < N / 2 ^ j) (hyr : ⌊2 ^ j * y⌋₊ ≤ ⌊2 ^ j * x⌋₊ + r) : + u y = polyFun (P ⌊2 ^ j * x⌋₊) y + ∑ m ∈ Finset.Ioc ⌊2 ^ j * x⌋₊ (⌊2 ^ j * x⌋₊ + r), + jumpCoeff r N P m * truncPow r ((m : ℝ) / 2 ^ j) y := by + have hpos : (0 : ℝ) < 2 ^ j := by positivity + have hy0 : 0 ≤ y := hx.trans hxy + have hmem : y ∈ dyadicIco j ⌊2 ^ j * y⌋₊ := + mem_dyadicIco.2 ⟨Nat.floor_le (by positivity), Nat.lt_floor_add_one _⟩ + have hlt : ⌊2 ^ j * y⌋₊ < N := by + refine (Nat.floor_lt (by positivity)).2 ?_ + rw [lt_div_iff₀ hpos] at hyN + linarith + have hnn : ⌊2 ^ j * x⌋₊ ≤ ⌊2 ^ j * y⌋₊ := Nat.floor_mono (by nlinarith) + rw [hu _ hlt y hmem, eq_add_sum_Ioc_sub P hnn, polyFun_add, + ← Finset.sum_Ioc_consecutive _ hnn hyr] + have hzero : ∑ m ∈ Finset.Ioc ⌊2 ^ j * y⌋₊ (⌊2 ^ j * x⌋₊ + r), + jumpCoeff r N P m * truncPow r ((m : ℝ) / 2 ^ j) y = 0 := + Finset.sum_eq_zero fun m hm => by + have hm' := (Finset.mem_Ioc.1 hm).1 + have : y < (m : ℝ) / 2 ^ j := by + rw [lt_div_iff₀ hpos] + have h1 : (⌊2 ^ j * y⌋₊ : ℝ) + 1 ≤ m := by exact_mod_cast hm' + linarith [Nat.lt_floor_add_one (2 ^ j * y)] + simp [truncPow, not_le.2 this] + rw [hzero, add_zero] + congr 1 + rw [polyFun, eval_finsetSum] + refine Finset.sum_congr rfl fun m hm => ?_ + obtain ⟨hm1, hm2⟩ := Finset.mem_Ioc.1 hm + rw [sub_eq_jumpCoeff hJ (by omega) (by omega), eval_mul, eval_C, eval_pow, eval_sub, eval_X, + eval_C] + have hξ : (m : ℝ) / 2 ^ j ≤ y := by + rw [div_le_iff₀ hpos] + have : (m : ℝ) ≤ ⌊2 ^ j * y⌋₊ := by exact_mod_cast hm2 + nlinarith [Nat.floor_le (by positivity : (0 : ℝ) ≤ 2 ^ j * y)] + simp only [truncPow, hξ, ↓reduceIte] + push_cast + ring + +/-- **Differences of a spline: the piece plus the jumps**: for `m ≤ r`, `0 ≤ h ≤ 2^(-j)`, +`x ≥ 0` and `x + mh < N 2^(-j)`, +`Δ_h^m u(x) = Δ_h^m P_{n₀}(x) + ∑_{n₀ < l ≤ n₀ + r} c_l Δ_h^m (· - ξ_l)_+^(r-1)(x)`, with +`n₀ = ⌊2^j x⌋` (`Interval.polyFun_eq_add_sum_jumps` at every point `x + ih`). -/ +theorem higherDiff_eq_add_sum_jumps {r j N m : ℕ} (hmr : m ≤ r) {P : ℕ → ℂ[X]} + (hJ : SplineJoinsBelow r j N P) {u : ℝ → ℂ} + (hu : ∀ n < N, ∀ x ∈ dyadicIco j n, u x = polyFun (P n) x) {h x : ℝ} (hh0 : 0 ≤ h) + (hh : h ≤ 1 / 2 ^ j) (hx : 0 ≤ x) (hxm : x + m * h < N / 2 ^ j) : + higherDiff m h u x = higherDiff m h (polyFun (P ⌊2 ^ j * x⌋₊)) x + + ∑ l ∈ Finset.Ioc ⌊2 ^ j * x⌋₊ (⌊2 ^ j * x⌋₊ + r), + jumpCoeff r N P l * higherDiff m h (truncPow r ((l : ℝ) / 2 ^ j)) x := by + have hkh : (2 : ℝ) ^ j * h ≤ 1 := by + rw [le_div_iff₀ (by positivity)] at hh + linarith + have hdec : ∀ i ∈ Finset.range (m + 1), u (x + i * h) = + polyFun (P ⌊2 ^ j * x⌋₊) (x + i * h) + ∑ l ∈ Finset.Ioc ⌊2 ^ j * x⌋₊ (⌊2 ^ j * x⌋₊ + r), + jumpCoeff r N P l * truncPow r ((l : ℝ) / 2 ^ j) (x + i * h) := fun i hi => by + have hi' : i ≤ m := Nat.lt_succ_iff.1 (Finset.mem_range.1 hi) + have hih : (i : ℝ) * h ≤ m * h := mul_le_mul_of_nonneg_right (by exact_mod_cast hi') hh0 + exact polyFun_eq_add_sum_jumps hJ hu hx (le_add_of_nonneg_right (mul_nonneg + (Nat.cast_nonneg i) hh0)) (by linarith) (floor_add_mul_le hx hh0 hkh (hi'.trans hmr)) + rw [higherDiff_apply, Finset.sum_congr rfl fun i hi => by rw [hdec i hi] ] + simp only [mul_add, Finset.sum_add_distrib, Finset.mul_sum] + congr 1 + · exact (higherDiff_apply _ _ _ _).symm + · rw [Finset.sum_comm] + refine Finset.sum_congr rfl fun l _ => ?_ + rw [higherDiff_apply, Finset.mul_sum] + exact Finset.sum_congr rfl fun i _ => by ring + +/-- **Differences of a spline are differences of its jumps**: on `[x, x + rh]` with +`x + rh < N 2^(-j)` and `h ≤ 2^(-j)`, +`Δ_h^r u(x) = ∑_{n₀ < m ≤ n₀ + r} c_m Δ_h^r (· - ξ_m)_+^(r-1)(x)`, since the piece has +`Δ_h^r P_{n₀} = 0` (`Interval.higherDiff_eq_add_sum_jumps` with `m = r`). -/ +theorem higherDiff_eq_sum_jumps {r j N : ℕ} {P : ℕ → ℂ[X]} (hP : ∀ m, P m ∈ degreeLT ℂ r) + (hJ : SplineJoinsBelow r j N P) {u : ℝ → ℂ} + (hu : ∀ m < N, ∀ x ∈ dyadicIco j m, u x = polyFun (P m) x) {h x : ℝ} (hh0 : 0 ≤ h) + (hh : h ≤ 1 / 2 ^ j) (hx : 0 ≤ x) (hxr : x + r * h < N / 2 ^ j) : + higherDiff r h u x = ∑ m ∈ Finset.Ioc ⌊2 ^ j * x⌋₊ (⌊2 ^ j * x⌋₊ + r), + jumpCoeff r N P m * higherDiff r h (truncPow r ((m : ℝ) / 2 ^ j)) x := by + have hpoly : higherDiff r h (polyFun (P ⌊2 ^ j * x⌋₊)) x = 0 := + congrFun (higherDiff_polynomial (hP _) h) x + rw [higherDiff_eq_add_sum_jumps le_rfl hJ hu hh0 hh hx hxr, hpoly, zero_add] + +/-! ### The local estimate -/ + +/-- **The jumps are bounded by the neighbouring pieces**: for `0 < m < N` and `L = 2^(-j)`, +`|c_m| L^(r-1) ≤ K 2^(j/p) (m_m^(1/p) + m_{m-1}^(1/p))`, from +`c_m L^(r-1) = P_m(ξ_m + L) - P_{m-1}(ξ_m + L)` and Nikolskii's inequality, for `P_{m-1}` on the +doubled interval. -/ +theorem enorm_jumpCoeff_le {r j N : ℕ} {P : ℕ → ℂ[X]} (hP : ∀ m, P m ∈ degreeLT ℂ r) + (hJ : SplineJoinsBelow r j N P) {u : ℝ → ℂ} + (hu : ∀ m < N, ∀ x ∈ dyadicIco j m, u x = polyFun (P m) x) {K : ℝ≥0∞} + (hK : NikolskiiBound p r K) (hp : p ≠ ∞) {m : ℕ} (h0 : 0 < m) (hm : m < N) : + ‖jumpCoeff r N P m‖ₑ * ENNReal.ofReal (1 / 2 ^ j) ^ (r - 1) ≤ + K * ENNReal.ofReal (2 ^ j) ^ (1 / p.toReal) * (localMass p j u m ^ (1 / p.toReal) + + localMass p j u (m - 1) ^ (1 / p.toReal)) := by + have hL : (0 : ℝ) < 1 / 2 ^ j := by positivity + have hinv : (1 / (2 : ℝ) ^ j)⁻¹ = 2 ^ j := by rw [one_div, inv_inv] + have hval : polyFun (P m) ((m : ℝ) / 2 ^ j + 1 / 2 ^ j) - + polyFun (P (m - 1)) ((m : ℝ) / 2 ^ j + 1 / 2 ^ j) = + jumpCoeff r N P m * (((1 / 2 ^ j : ℝ) ^ (r - 1) : ℝ) : ℂ) := by + have h := congrArg (fun P => polyFun P ((m : ℝ) / 2 ^ j + 1 / 2 ^ j)) + (sub_eq_jumpCoeff hJ h0 hm) + simp only [polyFun, eval_sub, eval_mul, eval_C, eval_pow, eval_X] at h ⊢ + rw [h] + congr 1 + push_cast + ring + have h1 : ‖polyFun (P m) ((m : ℝ) / 2 ^ j + 1 / 2 ^ j)‖ₑ ≤ + K * ENNReal.ofReal (2 ^ j) ^ (1 / p.toReal) * localMass p j u m ^ (1 / p.toReal) := by + have := hK.enorm_le (hP m) ((m : ℝ) / 2 ^ j) hL + (x := (m : ℝ) / 2 ^ j + 1 / 2 ^ j) ⟨by linarith, le_rfl⟩ + rwa [hinv, eLpNorm_piece_eq_localMass hp (hu m hm)] at this + have h2 : ‖polyFun (P (m - 1)) ((m : ℝ) / 2 ^ j + 1 / 2 ^ j)‖ₑ ≤ + K * ENNReal.ofReal (2 ^ j) ^ (1 / p.toReal) * localMass p j u (m - 1) ^ (1 / p.toReal) := by + have hξ : (m : ℝ) / 2 ^ j - 1 / 2 ^ j = ((m - 1 : ℕ) : ℝ) / 2 ^ j := by + rw [Nat.cast_sub h0, Nat.cast_one, sub_div] + have := hK _ (hP (m - 1)) ((m : ℝ) / 2 ^ j - 1 / 2 ^ j) hL ((m : ℝ) / 2 ^ j + 1 / 2 ^ j) + ⟨by linarith, by linarith⟩ + rwa [hinv, hξ, eLpNorm_piece_eq_localMass hp (hu (m - 1) (by omega))] at this + calc ‖jumpCoeff r N P m‖ₑ * ENNReal.ofReal (1 / 2 ^ j) ^ (r - 1) + = ‖polyFun (P m) ((m : ℝ) / 2 ^ j + 1 / 2 ^ j) - + polyFun (P (m - 1)) ((m : ℝ) / 2 ^ j + 1 / 2 ^ j)‖ₑ := by + rw [hval, eNorm_mul, ← ofReal_norm (((1 / 2 ^ j : ℝ) ^ (r - 1) : ℝ) : ℂ), + Complex.norm_real, Real.norm_eq_abs, abs_of_nonneg (by positivity), + ENNReal.ofReal_pow hL.le] + _ ≤ ‖polyFun (P m) ((m : ℝ) / 2 ^ j + 1 / 2 ^ j)‖ₑ + + ‖polyFun (P (m - 1)) ((m : ℝ) / 2 ^ j + 1 / 2 ^ j)‖ₑ := + eNorm_sub_le + _ ≤ _ := by rw [mul_add]; exact add_le_add h1 h2 + +/-- **A jump term of a spline, for every order**: for `h ≥ 0` and a knot `l 2^(-j)` with +`n₀ < l ≤ n₀ + r`, `n₀ = ⌊2^j x⌋`, the term `c_l Δ_h^m (· - l 2^(-j))_+^(r-1)(x)` is at most +`2 · 2^m m^(r-1) K (2^j h)^(r-1) 2^(j/p) (∑_{l' ≤ r} M_{n₀+l'})^(1/p)`: the jump coefficient is +bounded by `Interval.enorm_jumpCoeff_le` and the difference of the truncated power by +`2^m (mh)^(r-1)`. -/ +theorem enorm_jumpCoeff_mul_higherDiff_truncPow_le_any_order {r j N : ℕ} (m : ℕ) {P : ℕ → ℂ[X]} + (hP : ∀ n, P n ∈ degreeLT ℂ r) (hJ : SplineJoinsBelow r j N P) {u : ℝ → ℂ} + (hu : ∀ n < N, ∀ x ∈ dyadicIco j n, u x = polyFun (P n) x) {K : ℝ≥0∞} + (hK : NikolskiiBound p r K) (hp : p ≠ ∞) {h x : ℝ} (hh0 : 0 ≤ h) + {l : ℕ} (hl : l ∈ Finset.Ioc ⌊2 ^ j * x⌋₊ (⌊2 ^ j * x⌋₊ + r)) : + ‖jumpCoeff r N P l * higherDiff m h (truncPow r ((l : ℝ) / 2 ^ j)) x‖ₑ ≤ + 2 * 2 ^ m * (m : ℝ≥0∞) ^ (r - 1) * K * ENNReal.ofReal (2 ^ j * h) ^ (r - 1) * + ENNReal.ofReal (2 ^ j) ^ (1 / p.toReal) * + (∑ l' ∈ Finset.range (r + 1), localMass p j u (⌊2 ^ j * x⌋₊ + l')) ^ (1 / p.toReal) := by + have hpos : (0 : ℝ) < 2 ^ j := by positivity + have hL : (0 : ℝ) < 1 / 2 ^ j := by positivity + set n₀ := ⌊2 ^ j * x⌋₊ + set S := ∑ l ∈ Finset.range (r + 1), localMass p j u (n₀ + l) + set σ := ENNReal.ofReal (2 ^ j * h) + have hmass : ∀ l ≤ r, localMass p j u (n₀ + l) ^ (1 / p.toReal) ≤ S ^ (1 / p.toReal) := + fun l hl => by + gcongr + exact localMass_le_sum_range j _ n₀ hl + have hfl' : 2 ^ j * x < (n₀ : ℝ) + 1 := Nat.lt_floor_add_one _ + have hscale : ENNReal.ofReal (m * h) ^ (r - 1) = + ENNReal.ofReal (1 / 2 ^ j) ^ (r - 1) * ((m : ℝ≥0∞) ^ (r - 1) * σ ^ (r - 1)) := by + rw [← mul_pow, ← mul_pow, ← ENNReal.ofReal_natCast, ← ENNReal.ofReal_mul (Nat.cast_nonneg _), + ← ENNReal.ofReal_mul hL.le] + congr 2 + field_simp + obtain ⟨hl1, hl2⟩ := Finset.mem_Ioc.1 hl + have hxl : x < (l : ℝ) / 2 ^ j := by + rw [lt_div_iff₀ hpos] + have : (n₀ : ℝ) + 1 ≤ l := by exact_mod_cast hl1 + linarith + rw [eNorm_mul] + refine (mul_le_mul' le_rfl (enorm_higherDiff_truncPow_le_of_lt r m hh0 hxl)).trans ?_ + rcases lt_or_ge l N with hlN | hlN + · have hc := enorm_jumpCoeff_le hP hJ hu hK hp (by omega) hlN + have hS : localMass p j u l ^ (1 / p.toReal) + localMass p j u (l - 1) ^ (1 / p.toReal) ≤ + 2 * S ^ (1 / p.toReal) := by + rw [two_mul] + refine add_le_add ?_ ?_ + · rw [show l = n₀ + (l - n₀) by omega]; exact hmass _ (by omega) + · rw [show l - 1 = n₀ + (l - 1 - n₀) by omega]; exact hmass _ (by omega) + calc ‖jumpCoeff r N P l‖ₑ * (2 ^ m * ENNReal.ofReal (m * h) ^ (r - 1)) + = 2 ^ m * (m : ℝ≥0∞) ^ (r - 1) * σ ^ (r - 1) * + (‖jumpCoeff r N P l‖ₑ * ENNReal.ofReal (1 / 2 ^ j) ^ (r - 1)) := by + rw [hscale]; ring + _ ≤ 2 ^ m * (m : ℝ≥0∞) ^ (r - 1) * σ ^ (r - 1) * + (K * ENNReal.ofReal (2 ^ j) ^ (1 / p.toReal) * (2 * S ^ (1 / p.toReal))) := + mul_le_mul' le_rfl (hc.trans (mul_le_mul' le_rfl hS)) + _ = _ := by ring + · have h0 : jumpCoeff r N P l = 0 := by + simp only [jumpCoeff, show ¬ (0 < l ∧ l < N) by omega, ↓reduceIte] + rw [h0, eNorm_zero, zero_mul] + exact zero_le + +/-- The constant of the pointwise bound, +`G = 2 r 2^r K (r 2^j h)^(r-1) 2^(j/p)`. -/ +noncomputable def splineStripConst (r j : ℕ) (K : ℝ≥0∞) (h : ℝ) (p : ℝ≥0∞) : ℝ≥0∞ := + 2 * r * 2 ^ r * K * ENNReal.ofReal (r * (2 ^ j * h)) ^ (r - 1) * + ENNReal.ofReal (2 ^ j) ^ (1 / p.toReal) + +/-- **Pointwise bound for differences of splines**: on the strips left of the knots, +`|Δ_h^r u(x)| ≤ G (∑_{l ≤ r} m_{n₀+l})^(1/p)` for `x + rh < N 2^(-j)`. -/ +theorem enorm_higherDiff_spline_le {r j N : ℕ} {P : ℕ → ℂ[X]} (hP : ∀ m, P m ∈ degreeLT ℂ r) + (hJ : SplineJoinsBelow r j N P) {u : ℝ → ℂ} + (hu : ∀ m < N, ∀ x ∈ dyadicIco j m, u x = polyFun (P m) x) {K : ℝ≥0∞} + (hK : NikolskiiBound p r K) (hp : p ≠ ∞) {h x : ℝ} (hh0 : 0 ≤ h) (hh : h ≤ 1 / 2 ^ j) + (hx : 0 ≤ x) (hxr : x + r * h < N / 2 ^ j) : + ‖higherDiff r h u x‖ₑ ≤ splineStripConst r j K h p * + (∑ l ∈ Finset.range (r + 1), localMass p j u (⌊2 ^ j * x⌋₊ + l)) ^ (1 / p.toReal) := by + -- each jump contributes at most `2 · 2^r K (r 2^j h)^(r-1) 2^(j/p)` times the local masses + have hterm : ∀ m ∈ Finset.Ioc ⌊2 ^ j * x⌋₊ (⌊2 ^ j * x⌋₊ + r), ‖jumpCoeff r N P m * + higherDiff r h (truncPow r ((m : ℝ) / 2 ^ j)) x‖ₑ ≤ + 2 * 2 ^ r * K * ENNReal.ofReal (r * (2 ^ j * h)) ^ (r - 1) * + ENNReal.ofReal (2 ^ j) ^ (1 / p.toReal) * + (∑ l ∈ Finset.range (r + 1), localMass p j u (⌊2 ^ j * x⌋₊ + l)) ^ (1 / p.toReal) := + fun m hm => (enorm_jumpCoeff_mul_higherDiff_truncPow_le_any_order r hP hJ hu hK hp hh0 + hm).trans_eq + (by rw [ENNReal.ofReal_mul (Nat.cast_nonneg r), ENNReal.ofReal_natCast, mul_pow]; ring) + rw [higherDiff_eq_sum_jumps hP hJ hu hh0 hh hx hxr] + refine (eNorm_sum_le _ _).trans ((Finset.sum_le_sum hterm).trans ?_) + rw [Finset.sum_const, Nat.card_Ioc, Nat.add_sub_cancel_left, nsmul_eq_mul, splineStripConst] + exact le_of_eq (by ring) + +/-! ### The inverse inequality -/ + +/-- **The local inverse estimate for splines**: let `u` be a spline of level `j` below `N`, a +piecewise polynomial on `[0, ∞)`, and `0 ≤ h ≤ 2^(-j)`. On a measurable `S ⊆ [0, 1]` with +`x + rh < N 2^(-j)` for almost every `x ∈ S`, and if the local masses of `r + 1` consecutive +pieces add up to at most `(r + 1) B^p`, then `‖Δ_h^r u‖_{L_p(S)} ≤ G (rh (r + 1))^(1/p) B`. -/ +theorem eLpNorm_higherDiff_spline_le {r j N : ℕ} {P : ℕ → ℂ[X]} (hP : ∀ m, P m ∈ degreeLT ℂ r) + (hJ : SplineJoinsBelow r j N P) {u : ℝ → ℂ} + (hu : ∀ m < N, ∀ x ∈ dyadicIco j m, u x = polyFun (P m) x) (hpp : IsPiecewisePoly r j u) + (hum : Measurable u) {K : ℝ≥0∞} (hK : NikolskiiBound p r K) (hp : p ≠ ∞) {h : ℝ} + (hh0 : 0 ≤ h) (hh : h ≤ 1 / 2 ^ j) {S : Set ℝ} (hSm : MeasurableSet S) (hS : S ⊆ Icc 0 1) + (hSN : ∀ᵐ x ∂volume.restrict S, x + r * h < N / 2 ^ j) {B : ℝ≥0∞} + (hB : ∑ n ∈ Finset.range (2 ^ j), ∑ l ∈ Finset.range (r + 1), localMass p j u (n + l) ≤ + (r + 1) * B ^ p.toReal) : + eLpNorm (higherDiff r h u) p (volume.restrict S) ≤ + splineStripConst r j K h p * (ENNReal.ofReal (r * h) * (r + 1)) ^ (1 / p.toReal) * B := by + refine eLpNorm_higherDiff_le_of_pointwise hp hpp hum hSm hS hh0 ?_ hB + filter_upwards [hSN, ae_restrict_mem hSm] with x hxN hxS _ + exact enorm_higherDiff_spline_le hP hJ hu hK hp hh0 hh (hS hxS).1 hxN + +/-- The constant of the inverse inequality for splines, +`2 r 2^r K r^(r-1) (r (r + 1))^(1/p)`. -/ +noncomputable def splineInverseConst (r : ℕ) (K p : ℝ≥0∞) : ℝ≥0∞ := + 2 * r * 2 ^ r * K * (r : ℝ≥0∞) ^ (r - 1) * ((r * (r + 1) : ℕ) : ℝ≥0∞) ^ (1 / p.toReal) + +omit [Fact (1 ≤ p)] in +/-- The constant of the inverse inequality for splines is finite. -/ +theorem splineInverseConst_ne_top (r : ℕ) {K : ℝ≥0∞} (hK : K ≠ ∞) : + splineInverseConst r K p ≠ ∞ := by + unfold splineInverseConst + refine ENNReal.mul_ne_top (ENNReal.mul_ne_top (ENNReal.mul_ne_top (ENNReal.mul_ne_top + (ENNReal.mul_ne_top (by simp) (ENNReal.natCast_ne_top r)) (by simp)) hK) + (ENNReal.pow_ne_top (ENNReal.natCast_ne_top r))) ?_ + exact ENNReal.rpow_ne_top_of_nonneg (by positivity) (ENNReal.natCast_ne_top _) + +omit [Fact (1 ≤ p)] in +/-- The bound of the local estimate in terms of `2^j h`: +`G (rh (r + 1))^(1/p) = C (2^j h)^(r - 1 + 1/p)`. -/ +theorem splineStripConst_mul_eq (r j : ℕ) (K : ℝ≥0∞) (h : ℝ) : + splineStripConst r j K h p * (ENNReal.ofReal (r * h) * (r + 1)) ^ (1 / p.toReal) = + splineInverseConst r K p * + ENNReal.ofReal (2 ^ j * h) ^ (((r - 1 : ℕ) : ℝ) + 1 / p.toReal) := by + have hθ : (0 : ℝ) ≤ 1 / p.toReal := by positivity + have h1 : ENNReal.ofReal (r * (2 ^ j * h)) = (r : ℝ≥0∞) * ENNReal.ofReal (2 ^ j * h) := by + rw [ENNReal.ofReal_mul (Nat.cast_nonneg r), ENNReal.ofReal_natCast] + rw [ENNReal.rpow_add_of_nonneg _ _ (Nat.cast_nonneg _) hθ, ENNReal.rpow_natCast] + calc splineStripConst r j K h p * (ENNReal.ofReal (r * h) * (r + 1)) ^ (1 / p.toReal) + = 2 * r * 2 ^ r * K * ENNReal.ofReal (r * (2 ^ j * h)) ^ (r - 1) * + (ENNReal.ofReal (2 ^ j) ^ (1 / p.toReal) * + (ENNReal.ofReal (r * h) * (r + 1)) ^ (1 / p.toReal)) := by + rw [splineStripConst]; ring + _ = _ := by + rw [ofReal_two_pow_rpow_mul_eq r j h hθ, ENNReal.mul_rpow_of_nonneg _ _ hθ, h1, mul_pow, + splineInverseConst] + ring + +omit [Fact (1 ≤ p)] in +/-- The local estimate for splines in dyadic form: for `j ≤ k` and `0 ≤ h ≤ 2^(-k)`, +`G (rh (r + 1))^(1/p) B ≤ C 2^(-(k-j)(r - 1 + 1/p)) B`. -/ +theorem splineStripConst_mul_le {r j k : ℕ} (hjk : j ≤ k) (K : ℝ≥0∞) {h : ℝ} + (hh : h ≤ 1 / 2 ^ k) (B : ℝ≥0∞) : + splineStripConst r j K h p * (ENNReal.ofReal (r * h) * (r + 1)) ^ (1 / p.toReal) * B ≤ + splineInverseConst r K p * dyadicWeight (-(((r - 1 : ℕ) : ℝ) + 1 / p.toReal)) (k - j) * + B := by + rw [splineStripConst_mul_eq r j K h] + exact mul_le_mul' (mul_le_mul' le_rfl (ENNReal.ofReal_two_pow_mul_rpow_le hjk hh (by positivity))) + le_rfl + +omit [Fact (1 ≤ p)] in +/-- The constant of the inverse inequality is at least `2^r`. -/ +theorem two_pow_le_two_pow_mul_one_add (r : ℕ) (c : ℝ≥0∞) : (2 : ℝ≥0∞) ^ r ≤ 2 ^ r * (1 + c) := + le_mul_of_one_le_right zero_le le_self_add + +omit [Fact (1 ≤ p)] in +/-- The constant of the inverse inequality dominates the local constant. -/ +theorem le_two_pow_mul_one_add (r : ℕ) (c : ℝ≥0∞) : c ≤ 2 ^ r * (1 + c) := + le_add_self.trans (le_mul_of_one_le_left zero_le (one_le_pow₀ one_le_two)) + +/-- **The local inverse estimate for splines on `[0, 1]`**: for the pieces `Q` of a spline of +level `j` and `0 ≤ h ≤ 2^(-j)`, +`‖Δ_h^r (ppFun j Q)‖_{L_p[0, 1 - rh]} ≤ S_j(h) (r h (r + 1))^(1/p) ‖ppFun j Q‖_{L_p[0,1]}` with the +strip constant `S_j(h)` of `Interval.splineStripConst`. -/ +theorem eLpNorm_higherDiff_ppFun_spline_le {r j : ℕ} {Q : ℕ → ℂ[X]} + (hQ : ∀ n, Q n ∈ degreeLT ℂ r) (hJ : SplineJoins r j Q) {K : ℝ≥0∞} + (hKb : NikolskiiBound p r K) (hp : p ≠ ∞) {h : ℝ} (hh0 : 0 ≤ h) (hhj : h ≤ 1 / 2 ^ j) : + eLpNorm (higherDiff r h (ppFun j Q)) p (volume.restrict (Icc 0 (1 - r * h))) ≤ + splineStripConst r j K h p * (ENNReal.ofReal (r * h) * (r + 1)) ^ (1 / p.toReal) * + eLpNorm (ppFun j Q) p unitVol := by + have hrh : (0 : ℝ) ≤ r * h := mul_nonneg (Nat.cast_nonneg r) hh0 + have hSN : ∀ᵐ x ∂volume.restrict (Icc 0 (1 - r * h)), x + r * h < (2 ^ j : ℕ) / 2 ^ j := by + rw [← Measure.restrict_congr_set Ico_ae_eq_Icc] + filter_upwards [ae_restrict_mem measurableSet_Ico] with x hx + rw [show ((2 ^ j : ℕ) : ℝ) / 2 ^ j = 1 by push_cast; field_simp] + linarith [hx.2] + exact eLpNorm_higherDiff_spline_le hQ hJ.below (fun m hm x hx => ppFun_eq_of_mem Q hm hx) + (isPiecewisePoly_ppFun hQ j) (measurable_ppFun j Q) hKb hp hh0 hhj measurableSet_Icc + (Icc_subset_Icc le_rfl (by linarith)) hSN (sum_sum_localMass_le hp j r Q) + +/-- **The inverse inequality for dyadic splines**, of order `θ = r - 1 + 1/p`: there is +`C_B < ∞` with `ω_r(a, 2^(-k), [0, 1])_p ≤ C_B 2^(-(k-j)θ) ‖a‖_p` for every spline `a` of order `r` +and level `j` (and `k - j` truncated at `0`). -/ +theorem exists_inverse_splineScheme {r : ℕ} (hp : p ≠ ∞) : + ∃ CB : ℝ≥0∞, CB ≠ ∞ ∧ ∀ j k : ℕ, ∀ a ∈ splineScheme p r (2 ^ j), + lpModulus p r a k ≤ + CB * dyadicWeight (-(((r - 1 : ℕ) : ℝ) + 1 / p.toReal)) (k - j) * ‖a‖ₑ := by + obtain ⟨K, hK, hKb⟩ := enorm_polyFun_le (p := p) r hp + refine ⟨2 ^ r * (1 + splineInverseConst r K p), + ENNReal.mul_ne_top (by simp) (ENNReal.add_ne_top.2 ⟨ENNReal.one_ne_top, + splineInverseConst_ne_top r hK⟩), fun j k a ha => ?_⟩ + obtain ⟨Q, hQ, hJ, hae⟩ := mem_splineScheme_two_pow.1 ha + rcases lt_or_ge k j with hkj | hjk + · rw [Nat.sub_eq_zero_of_le hkj.le, ENNReal.dyadicWeight_zero_right, mul_one] + exact (lpModulus_le r a k).trans (by gcongr; exact two_pow_le_two_pow_mul_one_add r _) + · have hnorm : ‖a‖ₑ = eLpNorm (ppFun j Q) p unitVol := by + rw [Lp.eNorm_def] + exact eLpNorm_congr_ae hae + rw [lpModulus, modulus_congr_ae hae, hnorm, modulus_eq_iSup_nonneg] + refine iSup₂_le fun h hh => ?_ + have hhj : h ≤ 1 / 2 ^ j := hh.2.trans (one_div_le_one_div_of_le (by positivity) + (pow_le_pow_right₀ (by norm_num) hjk)) + calc eLpNorm (higherDiff r h (ppFun j Q)) p (volume.restrict (Icc 0 (1 - r * h))) + ≤ splineStripConst r j K h p * (ENNReal.ofReal (r * h) * (r + 1)) ^ + (1 / p.toReal) * eLpNorm (ppFun j Q) p unitVol := + eLpNorm_higherDiff_ppFun_spline_le hQ hJ hKb hp hh.1 hhj + _ ≤ splineInverseConst r K p * dyadicWeight (-(((r - 1 : ℕ) : ℝ) + 1 / p.toReal)) (k - j) * + eLpNorm (ppFun j Q) p unitVol := splineStripConst_mul_le hjk K hh.2 _ + _ ≤ 2 ^ r * (1 + splineInverseConst r K p) * + dyadicWeight (-(((r - 1 : ℕ) : ℝ) + 1 / p.toReal)) (k - j) * + eLpNorm (ppFun j Q) p unitVol := by + gcongr + exact le_two_pow_mul_one_add r _ + +end Interval diff --git a/LeanPool/FunctionSpaces/Domains/Interval/SplineJackson.lean b/LeanPool/FunctionSpaces/Domains/Interval/SplineJackson.lean new file mode 100644 index 0000000000..44ea2413ab --- /dev/null +++ b/LeanPool/FunctionSpaces/Domains/Interval/SplineJackson.lean @@ -0,0 +1,647 @@ +/- +Copyright (c) 2026 Mario Ullrich. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Mario Ullrich +-/ +module + +public import LeanPool.FunctionSpaces.Domains.Interval.QuasiInterp +public import LeanPool.FunctionSpaces.Domains.Interval.SplineInverse +public import LeanPool.FunctionSpaces.Domains.Interval.PiecewiseJackson + +/- +Modified for Lean Pool: module names and imports adapted. +-/ + +/-! +# Jackson's inequality for dyadic splines and the coincidence theorem + +For `1 ≤ p < ∞`, `r ≥ 1` and every level `k`, the error of best approximation in `L_p[0, 1]` by +splines of order `r` and level `k` is bounded by the modulus of smoothness, +`E_{2^k}(f)_p ≤ C ω_r(f, 2^(-k), [0, 1])_p` (`Interval.exists_approxError_splineScheme_le`). + +The approximant is the quasi-interpolant `Q_k f` of `FunctionSpaces.Domains.Interval.QuasiInterp`. +On `I_{k,i}` it reproduces every polynomial `T_i` of degree `< r` and is bounded by the `L_p` norm +on the window `W_i = [(i + 1 - r) 2^(-k), (i + 1) 2^(-k)]` of `r` intervals, so +`‖f - Q_k f‖_{L_p(I_{k,i})} ≤ C ‖f - T_i‖_{L_p(W_i)}`. For continuous `f`, `T_i` is a Taylor +polynomial of the Steklov smoothing of `f`, forward on `[0, 3/4]` and backward on `[1/4, 1]` +(`Interval.exists_left_smoothing`, `Interval.exists_right_smoothing` with `L = 2^(-k)`); every +window lies in one of the two parts, and the windows overlap at most `r` times +(`Interval.sum_lintegral_window_le`). This works for `k ≥ r + 2`; general `f ∈ L_p` follow by +density (`Interval.approxError_le_of_continuous`). The coarse levels `k ≤ r + 1` need Whitney's +inequality: +`E_{2^k}(f) ≤ E_1(f)`, and the splines of level `0` are the polynomials of degree `< r` +(`Interval.approxError_splineScheme_one`), so `E_1(f) ≤ W ω_r(f, 2^(-(r+1)))_p ≤ W ω_r(f, 2^(-k))_p` +(`Interval.exists_approxError_ppScheme_one_le`). + +With the inverse inequality of order `r - 1 + 1/p` (`Interval.exists_inverse_splineScheme`) this +is a modulus compatible with the spline scheme (`Interval.splineModulusData`), and for +`1 ≤ q ≤ ∞` and `0 ≤ s < r - 1 + 1/p`, +`f ∈ A^s_q ↔ ‖f‖_p + ‖(2^(ks) ω_r(f, 2^(-k), [0, 1])_p)_k‖_{ℓ_q} < ∞` +(`Interval.memApprox_splineScheme_iff`): the approximation space of splines of order `r` is +`B^s_{p,q}[0, 1]` for `0 < s < r - 1 + 1/p`, beyond smoothness `1` for `r ≥ 2`. +-/ + +@[expose] public section + +open MeasureTheory Set Polynomial +open scoped ENNReal BoundedContinuousFunction +open ENNReal (dyadicWeight) + +namespace Interval + +/-- **Bounded overlap of the windows**: the windows `[(i + 1 - r) 2^(-k), (i + 1) 2^(-k)]`, +`i < N`, cover every point at most `r` times: `∑_i ∫_{W_i} G ≤ r ∫ G`. -/ +theorem sum_lintegral_window_le (r k N : ℕ) (G : ℝ → ℝ≥0∞) : + ∑ i ∈ Finset.range N, ∫⁻ x in Icc (((i : ℝ) + 1 - r) / 2 ^ k) (((i : ℝ) + 1) / 2 ^ k), + G x ≤ r * ∫⁻ x, G x := by + have hL : (0 : ℝ) ≤ 1 / 2 ^ k := by positivity + have hwin : ∀ i : ℕ, ∫⁻ x in Icc (((i : ℝ) + 1 - r) / 2 ^ k) (((i : ℝ) + 1) / 2 ^ k), G x ≤ + ∑ n ∈ Finset.range r, ∫⁻ x in Icc ((1 - (r : ℝ) + n) / 2 ^ k + i * (1 / 2 ^ k)) + ((1 - (r : ℝ) + n) / 2 ^ k + (i + 1) * (1 / 2 ^ k)), G x := fun i => by + have h := lintegral_Icc_le_sum G (((i : ℝ) + 1 - r) / 2 ^ k) hL r + rw [show ((i : ℝ) + 1 - r) / 2 ^ k + r * (1 / 2 ^ k) = ((i : ℝ) + 1) / 2 ^ k by + field_simp; ring] at h + refine h.trans_eq (Finset.sum_congr rfl fun n _ => ?_) + congr 2 + field_simp + ring_nf + calc ∑ i ∈ Finset.range N, ∫⁻ x in Icc (((i : ℝ) + 1 - r) / 2 ^ k) + (((i : ℝ) + 1) / 2 ^ k), G x + ≤ ∑ i ∈ Finset.range N, ∑ n ∈ Finset.range r, + ∫⁻ x in Icc ((1 - (r : ℝ) + n) / 2 ^ k + i * (1 / 2 ^ k)) + ((1 - (r : ℝ) + n) / 2 ^ k + (i + 1) * (1 / 2 ^ k)), G x := + Finset.sum_le_sum fun i _ => hwin i + _ = ∑ n ∈ Finset.range r, ∑ i ∈ Finset.range N, + ∫⁻ x in Icc ((1 - (r : ℝ) + n) / 2 ^ k + i * (1 / 2 ^ k)) + ((1 - (r : ℝ) + n) / 2 ^ k + (i + 1) * (1 / 2 ^ k)), G x := Finset.sum_comm + _ ≤ ∑ _n ∈ Finset.range r, ∫⁻ x, G x := + Finset.sum_le_sum fun n _ => + (sum_le_lintegral_Icc _ hL N).trans (setLIntegral_le_lintegral _ _) + _ = r * ∫⁻ x, G x := by rw [Finset.sum_const, Finset.card_range, nsmul_eq_mul] + +/-! ### Linearity of the quasi-interpolant -/ + +/-- The rescaled local projections have degree `< r`. -/ +theorem locProjScaled_mem (r k : ℕ) (g : ℝ → ℂ) (m : ℕ) : locProjScaled r k g m ∈ degreeLT ℂ r := + comp_affine_mem_degreeLT (locProj_mem r k g m) _ _ + +/-- The dual polynomial `d_i` of the interval `I_{k,m}` in the coordinate `y = 2^k x`, so that +the rescaled local projection is `∑_i c_i(g) d_i(y - m)` (`Interval.locProjScaled_eq_sum`). -/ +noncomputable def qiBasisPoly (r k m : ℕ) (i : Fin r) : ℂ[X] := + ((dualPoly r i : ℂ[X]).comp (C ((-(m : ℝ) : ℝ) : ℂ) + C (((2 : ℝ) ^ k : ℝ) : ℂ) * X)).comp + (C (((0 : ℝ) : ℝ) : ℂ) + C (((1 / 2 ^ k : ℝ) : ℝ) : ℂ) * X) + +/-- These polynomials have degree `< r`. -/ +theorem qiBasisPoly_mem (r k m : ℕ) (i : Fin r) : qiBasisPoly r k m i ∈ degreeLT ℂ r := + comp_affine_mem_degreeLT (comp_affine_mem_degreeLT (dualPoly r i).2 _ _) _ _ + +/-- The rescaled local projection in terms of the local coefficients. -/ +theorem locProjScaled_eq_sum (r k : ℕ) (g : ℝ → ℂ) (m : ℕ) : + locProjScaled r k g m = ∑ i, locCoeff r k g m i • qiBasisPoly r k m i := by + rw [locProjScaled, locProj, Polynomial.sum_comp] + refine Finset.sum_congr rfl fun i _ => ?_ + rw [Polynomial.smul_comp, qiBasisPoly] + +/-- **The quasi-interpolant coefficients are combinations of the local coefficients**: +`λ_n(g) = ∑_i c_i(g) β_{n,i}` with the coefficients `c_i(g)` of the local projection on `J(n)` and +the B-spline coefficients `β_{n,i}` of the rescaled dual polynomials. -/ +theorem qiCoeff_eq_sum {r : ℕ} (hr : 1 ≤ r) (k : ℕ) (g : ℝ → ℂ) (n : ℤ) : + qiCoeff hr k g n = + ∑ i, locCoeff r k g n.toNat i * bsplineCoef hr (qiBasisPoly r k n.toNat i) n := by + rw [qiCoeff, locProjScaled_eq_sum, bsplineCoef_sum hr _ _ fun i _ => qiBasisPoly_mem r k _ i] + +/-- **The quasi-interpolant coefficients are linear** on functions integrable on `J(n)`. -/ +theorem qiCoeff_add_const_mul {r : ℕ} (hr : 1 ≤ r) (k : ℕ) {g₁ g₂ : ℝ → ℂ} (c : ℂ) {n : ℤ} + (h₁ : IntegrableOn g₁ (dyadicIco k n.toNat)) (h₂ : IntegrableOn g₂ (dyadicIco k n.toNat)) : + qiCoeff hr k (fun y => g₁ y + c * g₂ y) n = qiCoeff hr k g₁ n + c * qiCoeff hr k g₂ n := by + have h₂' : IntegrableOn (fun y => c * g₂ y) (dyadicIco k n.toNat) := h₂.const_mul c + have hloc : locProjScaled r k (fun y => g₁ y + c * g₂ y) n.toNat = + locProjScaled r k g₁ n.toNat + C c * locProjScaled r k g₂ n.toNat := by + rw [locProjScaled, show (fun y => g₁ y + c * g₂ y) = g₁ + fun y => c * g₂ y from rfl, + locProj_add h₁ h₂', locProj_const_mul, add_comp, mul_comp, C_comp] + rfl + rw [qiCoeff, hloc, bsplineCoef_add hr (locProjScaled_mem r k _ _) + (by rw [← smul_eq_C_mul]; exact Submodule.smul_mem _ _ (locProjScaled_mem r k _ _)), + bsplineCoef_C_mul hr c (locProjScaled_mem r k _ _)] + rfl + +/-- **The error of the quasi-interpolant through a polynomial**: on `I_{k,i}`, +`g - Q_k g = (g - T) - Q_k(g - T)` for every polynomial `T` of degree `< r`. -/ +theorem polyFun_qiPieces_sub {r : ℕ} (hr : 1 ≤ r) {k N i : ℕ} (hi : i < N) {g : ℝ → ℂ} + (hg : ∀ m < N, IntegrableOn g (dyadicIco k m)) {T : ℂ[X]} (hT : T ∈ degreeLT ℂ r) {x : ℝ} + (hx : x ∈ dyadicIco k i) : + polyFun (qiPieces hr k N (fun y => g y - polyFun T y) i) x = + polyFun (qiPieces hr k N g i) x - polyFun T x := by + have hT' := polyFun_qiPieces_of_eq hr (g := polyFun T) hT hi (fun _ _ _ _ _ => rfl) hx + rw [← hT', polyFun_qiPieces_eq_sum_Ioc hr hi _ hx, polyFun_qiPieces_eq_sum_Ioc hr hi _ hx, + polyFun_qiPieces_eq_sum_Ioc hr hi _ hx, ← Finset.sum_sub_distrib] + refine Finset.sum_congr rfl fun n hn => ?_ + rw [Finset.mem_Ioc] at hn + have h := qiCoeff_add_const_mul hr k (-1) (n := n) (hg n.toNat (by omega)) + (integrableOn_dyadicIco_of_continuous (continuous_polyFun T) k n.toNat) + simp only [neg_one_mul, ← sub_eq_add_neg] at h + rw [h, sub_mul] + +variable {p : ℝ≥0∞} [Fact (1 ≤ p)] + +/-- The window `W_i = [(i + 1 - r) 2^(-k), (i + 1) 2^(-k)]` (truncated at `0`) of the +quasi-interpolant on `I_{k,i}`. -/ +noncomputable def qiWindow (r k i : ℕ) : Set ℝ := Icc (((i + 1 - r : ℕ) : ℝ) / 2 ^ k) (((i : ℝ) + + 1) / 2 ^ k) + +/-- The intervals `J(n)`, `i - r < n ≤ i`, lie in the window of `I_{k,i}`. -/ +theorem dyadicIco_subset_qiWindow {r k i : ℕ} {n : ℤ} (hn : (i : ℤ) - r < n ∧ n ≤ i) : + dyadicIco k n.toNat ⊆ qiWindow r k i := by + intro x hx + rw [dyadicIco, mem_Ico] at hx + have hpos : (0 : ℝ) < 2 ^ k := by positivity + have h1 : ((i + 1 - r : ℕ) : ℝ) ≤ (n.toNat : ℝ) := by exact_mod_cast (by omega : i + 1 - r ≤ + n.toNat) + have h2 : (n.toNat : ℝ) + 1 ≤ (i : ℝ) + 1 := by exact_mod_cast (by omega : n.toNat + 1 ≤ i + 1) + constructor + · exact (div_le_div_of_nonneg_right h1 hpos.le).trans hx.1 + · exact hx.2.le.trans (div_le_div_of_nonneg_right h2 hpos.le) + +/-- `I_{k,i}` lies in its window. -/ +theorem dyadicIco_subset_qiWindow_self {r : ℕ} (hr : 1 ≤ r) (k i : ℕ) : + dyadicIco k i ⊆ qiWindow r k i := by + intro x hx + rw [dyadicIco, mem_Ico] at hx + have hpos : (0 : ℝ) < 2 ^ k := by positivity + have h1 : ((i + 1 - r : ℕ) : ℝ) ≤ (i : ℝ) := by exact_mod_cast (by omega : i + 1 - r ≤ i) + exact ⟨(div_le_div_of_nonneg_right h1 hpos.le).trans hx.1, hx.2.le⟩ + +/-- `i + 1 - r ≤ (i + 1 - r : ℕ)` in `ℝ`, the natural subtraction truncating at `0`. -/ +theorem natCast_add_one_sub_le (i r : ℕ) : (i : ℝ) + 1 - r ≤ ((i + 1 - r : ℕ) : ℝ) := by + rcases le_or_gt r (i + 1) with h | h + · rw [Nat.cast_sub h]; push_cast; rfl + · have : ((i + 1 : ℕ) : ℝ) < r := by exact_mod_cast h + push_cast at this + linarith [(Nat.cast_nonneg (i + 1 - r) : (0 : ℝ) ≤ _)] + +/-- The window lies in `[(i + 1 - r) 2^(-k), (i + 1) 2^(-k)]`, with real subtraction. -/ +theorem qiWindow_subset (r k i : ℕ) : + qiWindow r k i ⊆ Icc (((i : ℝ) + 1 - r) / 2 ^ k) (((i : ℝ) + 1) / 2 ^ k) := + Icc_subset_Icc (div_le_div_of_nonneg_right (natCast_add_one_sub_le i r) (by positivity)) le_rfl + +/-- **The local error of the quasi-interpolant**: for every polynomial `T` of degree `< r`, +`‖g - Q_k g‖_{L_p(I_{k,i})} ≤ (1 + r M_N C_b r M²) ‖g - T‖_{L_p(W_i)}`. -/ +theorem eLpNorm_sub_qiPieces_le {r : ℕ} (hr : 1 ≤ r) {Cb : ℝ≥0∞} + (hCb : ∀ R ∈ degreeLT ℂ r, ∀ j : ℕ, + ‖bcoord hr R j‖ₑ ≤ Cb * eLpNorm (polyFun R) p (volume.restrict (Icc 0 1))) + {MN : ℝ≥0∞} (hMN : ∀ y, ‖bspline r y‖ₑ ≤ MN) (hp : p ≠ ∞) {k N i : ℕ} (hi : i < N) + {g : ℝ → ℂ} (hgm : Measurable g) (hg : ∀ m < N, IntegrableOn g (dyadicIco k m)) {T : ℂ[X]} + (hT : T ∈ degreeLT ℂ r) : + eLpNorm (fun x => g x - polyFun (qiPieces hr k N g i) x) p (volume.restrict (dyadicIco k i)) ≤ + (1 + r * (MN * (Cb * ppProjConst r))) * + eLpNorm (fun x => g x - polyFun T x) p (volume.restrict (qiWindow r k i)) := by + have hp1 : 1 ≤ p := Fact.out + set h : ℝ → ℂ := fun y => g y - polyFun T y + have hhm : Measurable h := hgm.sub (measurable_polyFun T) + have hfun : (fun x => g x - polyFun (qiPieces hr k N g i) x) =ᵐ[volume.restrict (dyadicIco k i)] + fun x => h x - polyFun (qiPieces hr k N h i) x := by + filter_upwards [ae_restrict_mem (measurableSet_dyadicIco k i)] with x hx + simp only [h] + rw [polyFun_qiPieces_sub hr hi hg hT hx] + ring + have hloc := eLpNorm_qiPieces_le hr hCb hMN hp (k := k) hi (g := h) hhm.aestronglyMeasurable + have hcard : (Finset.Ioc ((i : ℤ) - r) i).card = r := by + rw [Int.card_Ioc]; omega + rw [eLpNorm_congr_ae hfun] + calc eLpNorm (fun x => h x - polyFun (qiPieces hr k N h i) x) p (volume.restrict (dyadicIco k i)) + ≤ eLpNorm h p (volume.restrict (dyadicIco k i)) + + eLpNorm (polyFun (qiPieces hr k N h i)) p (volume.restrict (dyadicIco k i)) := + eLpNorm_sub_le hp1 + _ ≤ eLpNorm h p (volume.restrict (qiWindow r k i)) + MN * (Cb * ppProjConst r) * + ∑ _n ∈ Finset.Ioc ((i : ℤ) - r) i, eLpNorm h p (volume.restrict (qiWindow r k i)) := by + gcongr + · exact dyadicIco_subset_qiWindow_self hr k i + · exact hloc.trans (by + gcongr with n hn + exact dyadicIco_subset_qiWindow (Finset.mem_Ioc.1 hn)) + _ = _ := by + rw [Finset.sum_const, hcard, nsmul_eq_mul] + ring + +/-- **Summing the local errors of the quasi-interpolant**: let `F` be measurable and integrable on +the intervals `I_{k,m}`, `m < N`, and let `s ⊆ {0, …, N - 1}`. If on the window `W_i` of every +`i ∈ s` some polynomial `T` of degree `< r` has `‖F - T‖_{L_p(W_i)}^p ≤ ∫_{W_i} H`, then +`∑_{i ∈ s} ‖F - Q_k F‖_{L_p(I_{k,i})}^p ≤ C_q^p r ∫ H` with `C_q = 1 + r M_N C_b r M²`, since the +windows overlap at most `r` times (`Interval.sum_lintegral_window_le`). -/ +theorem sum_eLpNorm_sub_qiPieces_le {r : ℕ} (hr : 1 ≤ r) {Cb : ℝ≥0∞} + (hCb : ∀ R ∈ degreeLT ℂ r, ∀ j : ℕ, + ‖bcoord hr R j‖ₑ ≤ Cb * eLpNorm (polyFun R) p (volume.restrict (Icc 0 1))) + {MN : ℝ≥0∞} (hMN : ∀ y, ‖bspline r y‖ₑ ≤ MN) (hp : p ≠ ∞) {k N : ℕ} {F : ℝ → ℂ} + (hFm : Measurable F) (hF : ∀ m < N, IntegrableOn F (dyadicIco k m)) {s : Finset ℕ} + (hs : s ⊆ Finset.range N) (H : ℝ → ℝ≥0∞) + (hT : ∀ i ∈ s, ∃ T ∈ degreeLT ℂ r, eLpNorm (fun x => F x - polyFun T x) p + (volume.restrict (qiWindow r k i)) ^ p.toReal ≤ ∫⁻ x in qiWindow r k i, H x) : + ∑ i ∈ s, eLpNorm (fun x => F x - polyFun (qiPieces hr k N F i) x) p + (volume.restrict (dyadicIco k i)) ^ p.toReal ≤ + (1 + r * (MN * (Cb * ppProjConst r))) ^ p.toReal * (r * ∫⁻ x, H x) := by + have hp0 : p ≠ 0 := (lt_of_lt_of_le zero_lt_one (Fact.out : 1 ≤ p)).ne' + have hq : 0 < p.toReal := ENNReal.toReal_pos hp0 hp + set Cq := 1 + r * (MN * (Cb * ppProjConst r)) + have hloc : ∀ i ∈ s, eLpNorm (fun x => F x - polyFun (qiPieces hr k N F i) x) p + (volume.restrict (dyadicIco k i)) ^ p.toReal ≤ Cq ^ p.toReal * + ∫⁻ x in Icc (((i : ℝ) + 1 - r) / 2 ^ k) (((i : ℝ) + 1) / 2 ^ k), H x := by + intro i hi + obtain ⟨T, hTm, hTb⟩ := hT i hi + calc eLpNorm (fun x => F x - polyFun (qiPieces hr k N F i) x) p + (volume.restrict (dyadicIco k i)) ^ p.toReal + ≤ (Cq * eLpNorm (fun x => F x - polyFun T x) p + (volume.restrict (qiWindow r k i))) ^ p.toReal := + ENNReal.rpow_le_rpow (eLpNorm_sub_qiPieces_le hr hCb hMN hp + (Finset.mem_range.1 (hs hi)) hFm hF hTm) hq.le + _ = Cq ^ p.toReal * eLpNorm (fun x => F x - polyFun T x) p + (volume.restrict (qiWindow r k i)) ^ p.toReal := ENNReal.mul_rpow_of_nonneg _ _ hq.le + _ ≤ Cq ^ p.toReal * ∫⁻ x in qiWindow r k i, H x := mul_le_mul' le_rfl hTb + _ ≤ _ := mul_le_mul' le_rfl (lintegral_mono_set (qiWindow_subset r k i)) + calc ∑ i ∈ s, eLpNorm (fun x => F x - polyFun (qiPieces hr k N F i) x) p + (volume.restrict (dyadicIco k i)) ^ p.toReal + ≤ ∑ i ∈ s, Cq ^ p.toReal * + ∫⁻ x in Icc (((i : ℝ) + 1 - r) / 2 ^ k) (((i : ℝ) + 1) / 2 ^ k), H x := + Finset.sum_le_sum hloc + _ ≤ ∑ i ∈ Finset.range N, Cq ^ p.toReal * + ∫⁻ x in Icc (((i : ℝ) + 1 - r) / 2 ^ k) (((i : ℝ) + 1) / 2 ^ k), H x := + Finset.sum_le_sum_of_subset hs + _ = Cq ^ p.toReal * ∑ i ∈ Finset.range N, + ∫⁻ x in Icc (((i : ℝ) + 1 - r) / 2 ^ k) (((i : ℝ) + 1) / 2 ^ k), H x := by + rw [Finset.mul_sum] + _ ≤ Cq ^ p.toReal * (r * ∫⁻ x, H x) := mul_le_mul' le_rfl (sum_lintegral_window_le r k N H) + +/-! ### Jackson's inequality for continuous functions -/ + +/-- **Approximation on a window**: if `‖g - T₀‖_{L_p[a,b]} ≤ (b - a)^r ‖D‖_{L_p[a,b]}` for some +polynomial `T₀` and `(b - a)^r ≤ c`, then +`‖F - T₀‖^p ≤ 2^(p-1) ∫_{[a,b]} (|F - g|^p + c^p |D|^p)`. -/ +theorem exists_window_poly {F g D : ℝ → ℂ} (hFm : Measurable F) (hgm : Measurable g) + (hDm : Measurable D) (hp : p ≠ ∞) {r : ℕ} {a b : ℝ} {c : ℝ≥0∞} + (hT : ∃ T ∈ degreeLT ℂ r, eLpNorm (fun x => g x - polyFun T x) p (volume.restrict (Icc a b)) ≤ + ENNReal.ofReal (b - a) ^ r * eLpNorm D p (volume.restrict (Icc a b))) + (hc : ENNReal.ofReal (b - a) ^ r ≤ c) : + ∃ T ∈ degreeLT ℂ r, eLpNorm (fun x => F x - polyFun T x) p (volume.restrict (Icc a b)) ^ + p.toReal ≤ 2 ^ (p.toReal - 1) * ∫⁻ x in Icc a b, + (‖F x - g x‖ₑ ^ p.toReal + c ^ p.toReal * ‖D x‖ₑ ^ p.toReal) := by + have hp1 : 1 ≤ p := Fact.out + have hp0 : p ≠ 0 := (lt_of_lt_of_le zero_lt_one hp1).ne' + have hq : 0 < p.toReal := ENNReal.toReal_pos hp0 hp + have hq1 : 1 ≤ p.toReal := ENNReal.one_le_toReal_of_one_le hp1 hp + obtain ⟨T, hTm, hTb⟩ := hT + refine ⟨T, hTm, ?_⟩ + have htri : eLpNorm (fun x => F x - polyFun T x) p (volume.restrict (Icc a b)) ≤ + eLpNorm (fun x => F x - g x) p (volume.restrict (Icc a b)) + + c * eLpNorm D p (volume.restrict (Icc a b)) := by + calc eLpNorm (fun x => F x - polyFun T x) p (volume.restrict (Icc a b)) + = eLpNorm ((fun x => F x - g x) + fun x => g x - polyFun T x) p + (volume.restrict (Icc a b)) := by congr 1; funext x; simp + _ ≤ eLpNorm (fun x => F x - g x) p (volume.restrict (Icc a b)) + + eLpNorm (fun x => g x - polyFun T x) p (volume.restrict (Icc a b)) := + eLpNorm_add_le hp1 + _ ≤ _ := add_le_add le_rfl (hTb.trans (by gcongr)) + calc eLpNorm (fun x => F x - polyFun T x) p (volume.restrict (Icc a b)) ^ p.toReal + ≤ (eLpNorm (fun x => F x - g x) p (volume.restrict (Icc a b)) + + c * eLpNorm D p (volume.restrict (Icc a b))) ^ p.toReal := + ENNReal.rpow_le_rpow htri hq.le + _ ≤ 2 ^ (p.toReal - 1) * (eLpNorm (fun x => F x - g x) p (volume.restrict (Icc a b)) ^ + p.toReal + (c * eLpNorm D p (volume.restrict (Icc a b))) ^ p.toReal) := + ENNReal.rpow_add_le_mul_rpow_add_rpow _ _ hq1 + _ = _ := by + have hm1 : Measurable fun x => ‖F x - g x‖ₑ ^ p.toReal := + ((hFm.sub hgm).eNorm).pow_const _ + have hm2 : Measurable fun x => ‖D x‖ₑ ^ p.toReal := hDm.eNorm.pow_const _ + rw [ENNReal.mul_rpow_of_nonneg _ _ hq.le, + eLpNorm_rpow_eq (g := fun x => F x - g x) ((hFm.sub hgm).aestronglyMeasurable) hp0 hp, + eLpNorm_rpow_eq hDm.aestronglyMeasurable hp0 hp, lintegral_add_left hm1, + lintegral_const_mul _ hm2] + +/-- **A polynomial on a window from a smoothing**: if `g` has the Taylor polynomials +`‖g - T‖_{L_p[u,v]} ≤ (v - u)^r ‖D‖_{L_p[u,v]}` on all intervals, then on the window `W_i` some +polynomial `T` of degree `< r` satisfies +`‖F - T‖_{L_p(W_i)}^p ≤ 2^(p-1) ∫_{W_i} (|F - g|^p + c^p |D|^p)` with `c = (r 2^(-k))^r`, since +`W_i` has length at most `r 2^(-k)`. -/ +theorem exists_qiWindow_poly {F g D : ℝ → ℂ} (hFm : Measurable F) (hgm : Measurable g) + (hDm : Measurable D) (hp : p ≠ ∞) {r : ℕ} + (hT : ∀ u v : ℝ, u ≤ v → ∃ T ∈ degreeLT ℂ r, + eLpNorm (fun x => g x - polyFun T x) p (volume.restrict (Icc u v)) ≤ + ENNReal.ofReal (v - u) ^ r * eLpNorm D p (volume.restrict (Icc u v))) (k i : ℕ) : + ∃ T ∈ degreeLT ℂ r, eLpNorm (fun x => F x - polyFun T x) p + (volume.restrict (qiWindow r k i)) ^ p.toReal ≤ 2 ^ (p.toReal - 1) * + ∫⁻ x in qiWindow r k i, (‖F x - g x‖ₑ ^ p.toReal + + (ENNReal.ofReal ((r : ℝ) / 2 ^ k) ^ r) ^ p.toReal * ‖D x‖ₑ ^ p.toReal) := by + have hpos : (0 : ℝ) < 2 ^ k := by positivity + have hab : ((i + 1 - r : ℕ) : ℝ) / 2 ^ k ≤ ((i : ℝ) + 1) / 2 ^ k := by + have : ((i + 1 - r : ℕ) : ℝ) ≤ (i : ℝ) + 1 := by + exact_mod_cast (by omega : i + 1 - r ≤ i + 1) + exact div_le_div_of_nonneg_right this hpos.le + have hlen : ((i : ℝ) + 1) / 2 ^ k - ((i + 1 - r : ℕ) : ℝ) / 2 ^ k ≤ (r : ℝ) / 2 ^ k := by + rw [← sub_div] + exact div_le_div_of_nonneg_right (by linarith [natCast_add_one_sub_le i r]) hpos.le + exact exists_window_poly hFm hgm hDm hp (hT _ _ hab) + (pow_le_pow_left₀ zero_le (ENNReal.ofReal_le_ofReal hlen) r) + +/-- **Jackson's estimate for splines from one smoothing**: there is `A < ∞` such that for every +level `k`, every `N`, every set `s ⊆ {0, …, N - 1}` of cells whose windows lie in `[a, b]`, every +measurable `u` integrable on the dyadic intervals `I_{k,m}`, `m < N`, and all measurable `g, D` +such that `g` has the Taylor polynomials `‖g - T‖_{L_p[v,w]} ≤ (w - v)^r ‖D‖_{L_p[v,w]}`, +`∑_{i ∈ s} ‖u - Q_k u‖_{L_p(I_{k,i})}^p ≤ (A (‖u - g‖_{L_p[a,b]} + c ‖D‖_{L_p[a,b]}))^p` with +`c = (r 2^(-k))^r`. On every window a Taylor polynomial of `g` approximates `u` +(`Interval.exists_qiWindow_poly`), the windows overlap at most `r` times +(`Interval.sum_eLpNorm_sub_qiPieces_le`), and `a^p + b^p ≤ (a + b)^p`. -/ +theorem exists_sum_eLpNorm_sub_qiPieces_le_of_taylor {r : ℕ} (hr : 1 ≤ r) (hp : p ≠ ∞) : + ∃ A : ℝ≥0∞, A ≠ ∞ ∧ ∀ {k N : ℕ} {s : Finset ℕ}, s ⊆ Finset.range N → ∀ {a b : ℝ}, + (∀ i ∈ s, qiWindow r k i ⊆ Icc a b) → ∀ {u g D : ℝ → ℂ}, Measurable u → + (∀ m < N, IntegrableOn u (dyadicIco k m)) → Measurable g → Measurable D → + (∀ v w : ℝ, v ≤ w → ∃ T ∈ degreeLT ℂ r, + eLpNorm (fun x => g x - polyFun T x) p (volume.restrict (Icc v w)) ≤ + ENNReal.ofReal (w - v) ^ r * eLpNorm D p (volume.restrict (Icc v w))) → + ∑ i ∈ s, eLpNorm (fun x => u x - polyFun (qiPieces hr k N u i) x) p + (volume.restrict (dyadicIco k i)) ^ p.toReal ≤ + (A * (eLpNorm (fun x => u x - g x) p (volume.restrict (Icc a b)) + + ENNReal.ofReal ((r : ℝ) / 2 ^ k) ^ r * eLpNorm D p (volume.restrict (Icc a b)))) ^ + p.toReal := by + obtain ⟨Cb, hCb, hCbb⟩ := exists_enorm_bcoord_le p hr + obtain ⟨MN, hMN, hMNb⟩ := exists_enorm_bspline_le r + have hp1 : 1 ≤ p := Fact.out + have hp0 : p ≠ 0 := (lt_of_lt_of_le zero_lt_one hp1).ne' + have hq : 0 < p.toReal := ENNReal.toReal_pos hp0 hp + have hq1 : 1 ≤ p.toReal := ENNReal.one_le_toReal_of_one_le hp1 hp + have h2top : (2 : ℝ≥0∞) ^ (p.toReal - 1) ≠ ∞ := + ENNReal.two_rpow_ne_top _ + set Cq := 1 + r * (MN * (Cb * ppProjConst r)) + have hCq : Cq ≠ ∞ := ENNReal.add_ne_top.2 ⟨ENNReal.one_ne_top, ENNReal.mul_ne_top + (ENNReal.natCast_ne_top r) (ENNReal.mul_ne_top hMN (ENNReal.mul_ne_top hCb + (ppProjConst_ne_top r)))⟩ + refine ⟨Cq * ((r : ℝ≥0∞) * 2 ^ (p.toReal - 1)) ^ (1 / p.toReal), ENNReal.mul_ne_top hCq + (ENNReal.rpow_ne_top_of_nonneg (by positivity) + (ENNReal.mul_ne_top (ENNReal.natCast_ne_top r) h2top)), + fun {k N s} hs {a b} hW {u g D} hum hui hg hD hT => ?_⟩ + set H : ℝ → ℝ≥0∞ := fun x => ‖u x - g x‖ₑ ^ p.toReal + + (ENNReal.ofReal ((r : ℝ) / 2 ^ k) ^ r) ^ p.toReal * ‖D x‖ₑ ^ p.toReal + -- a Taylor polynomial of `g` on every window + have hwin : ∀ i ∈ s, ∃ T ∈ degreeLT ℂ r, eLpNorm (fun x => u x - polyFun T x) p + (volume.restrict (qiWindow r k i)) ^ p.toReal ≤ + ∫⁻ x in qiWindow r k i, 2 ^ (p.toReal - 1) * (Icc a b).indicator H x := by + intro i hi + obtain ⟨T, hT', h⟩ := exists_qiWindow_poly hum hg hD hp hT k i + refine ⟨T, hT', h.trans (le_of_eq ?_)⟩ + rw [lintegral_const_mul' _ _ h2top] + congr 1 + exact setLIntegral_congr_fun measurableSet_Icc fun x hx => by + simp only [H, indicator_of_mem (hW i hi hx)] + -- the integral of the dominating function is a `p`-th power of norms + have hH : ∫⁻ x, 2 ^ (p.toReal - 1) * (Icc a b).indicator H x = + 2 ^ (p.toReal - 1) * (eLpNorm (fun x => u x - g x) p (volume.restrict (Icc a b)) ^ + p.toReal + (ENNReal.ofReal ((r : ℝ) / 2 ^ k) ^ r * + eLpNorm D p (volume.restrict (Icc a b))) ^ p.toReal) := by + rw [lintegral_const_mul' _ _ h2top, lintegral_indicator measurableSet_Icc, + lintegral_add_left (f := fun x => ‖u x - g x‖ₑ ^ p.toReal) + ((hum.sub hg).eNorm.pow_const _), lintegral_const_mul _ (hD.eNorm.pow_const _), + ← eLpNorm_rpow_eq (g := fun x => u x - g x) ((hum.sub hg).aestronglyMeasurable) hp0 hp, + ← eLpNorm_rpow_eq hD.aestronglyMeasurable hp0 hp, ENNReal.mul_rpow_of_nonneg _ _ hq.le] + calc ∑ i ∈ s, eLpNorm (fun x => u x - polyFun (qiPieces hr k N u i) x) p + (volume.restrict (dyadicIco k i)) ^ p.toReal + ≤ Cq ^ p.toReal * (r * ∫⁻ x, 2 ^ (p.toReal - 1) * (Icc a b).indicator H x) := + sum_eLpNorm_sub_qiPieces_le hr hCbb hMNb hp hum hui hs _ hwin + _ ≤ Cq ^ p.toReal * (r * (2 ^ (p.toReal - 1) * + (eLpNorm (fun x => u x - g x) p (volume.restrict (Icc a b)) + + ENNReal.ofReal ((r : ℝ) / 2 ^ k) ^ r * eLpNorm D p (volume.restrict (Icc a b))) ^ + p.toReal)) := by + rw [hH] + gcongr + exact ENNReal.add_rpow_le_rpow_add _ _ hq1 + _ = _ := by + rw [ENNReal.mul_rpow_of_nonneg _ _ hq.le, ENNReal.mul_rpow_of_nonneg Cq _ hq.le, + ← ENNReal.rpow_mul, one_div_mul_cancel hq.ne', ENNReal.rpow_one] + ring + +/-- The `p`-th power of the error over `[0, 1]` is the sum over the dyadic intervals. -/ +theorem lintegral_sub_ppFun_le_sum (hp : p ≠ ∞) {F : ℝ → ℂ} (hFm : Measurable F) (k : ℕ) + (Q : ℕ → ℂ[X]) : + ∫⁻ x in Icc (0 : ℝ) 1, ‖F x - ppFun k Q x‖ₑ ^ p.toReal ≤ + ∑ i ∈ Finset.range (2 ^ k), eLpNorm (fun x => F x - polyFun (Q i) x) p + (volume.restrict (dyadicIco k i)) ^ p.toReal := by + have hp0 : p ≠ 0 := (lt_of_lt_of_le zero_lt_one (Fact.out : 1 ≤ p)).ne' + refine (lintegral_Icc_le_sum_dyadicIco _ k).trans (Finset.sum_le_sum fun i hi => le_of_eq ?_) + rw [eLpNorm_rpow_eq (g := fun x => F x - polyFun (Q i) x) + ((hFm.sub (measurable_polyFun _)).aestronglyMeasurable) hp0 hp] + exact setLIntegral_congr_fun (measurableSet_dyadicIco k i) fun x hx => by + rw [ppFun_eq_of_mem Q (Finset.mem_range.1 hi) hx] + +/-- At the scale `L = 2^(-k)` the factor `c = (r 2^(-k))^r` of the Taylor remainders on the +windows and the bound `L^(-r) 2^r r^(2r)` of the derivative combine to `r^r 2^r r^(2r)`: +`a ≤ ω` and `b ≤ L^(-r) 2^r r^(2r) ω` give `a + c b ≤ (1 + r^r 2^r r^(2r)) ω`. -/ +theorem add_ofReal_div_pow_mul_le (r k : ℕ) {a b ω : ℝ≥0∞} (ha : a ≤ ω) + (hb : b ≤ ENNReal.ofReal (1 / 2 ^ k : ℝ)⁻¹ ^ r * (2 ^ r * (r : ℝ≥0∞) ^ (2 * r)) * ω) : + a + ENNReal.ofReal ((r : ℝ) / 2 ^ k) ^ r * b ≤ + (1 + (r : ℝ≥0∞) ^ r * (2 ^ r * (r : ℝ≥0∞) ^ (2 * r))) * ω := by + have hcc : ENNReal.ofReal ((r : ℝ) / 2 ^ k) ^ r * ENNReal.ofReal (1 / 2 ^ k : ℝ)⁻¹ ^ r = + (r : ℝ≥0∞) ^ r := by + rw [← mul_pow, ← ENNReal.ofReal_mul (by positivity), + show (r : ℝ) / 2 ^ k * (1 / 2 ^ k)⁻¹ = r by field_simp, ENNReal.ofReal_natCast] + calc a + ENNReal.ofReal ((r : ℝ) / 2 ^ k) ^ r * b + ≤ ω + ENNReal.ofReal ((r : ℝ) / 2 ^ k) ^ r * + (ENNReal.ofReal (1 / 2 ^ k : ℝ)⁻¹ ^ r * (2 ^ r * (r : ℝ≥0∞) ^ (2 * r)) * ω) := + add_le_add ha (mul_le_mul' le_rfl hb) + _ = ω + (ENNReal.ofReal ((r : ℝ) / 2 ^ k) ^ r * ENNReal.ofReal (1 / 2 ^ k : ℝ)⁻¹ ^ r) * + (2 ^ r * (r : ℝ≥0∞) ^ (2 * r)) * ω := by ring + _ = _ := by rw [hcc]; ring + +/-- `r 2^(-k) ≤ 1/4` for `k ≥ r + 2`: the windows of the quasi-interpolant have length at most +`1/4`. -/ +theorem natCast_div_two_pow_le {r k : ℕ} (hk : r + 2 ≤ k) : (r : ℝ) / 2 ^ k ≤ 1 / 4 := by + have hpos : (0 : ℝ) < 2 ^ k := by positivity + have h1 : (r : ℝ) < 2 ^ r := by exact_mod_cast Nat.lt_two_pow_self + have h2 : (2 : ℝ) ^ (r + 2) ≤ 2 ^ k := pow_le_pow_right₀ (by norm_num) hk + rw [div_le_div_iff₀ hpos (by norm_num), pow_add] at * + nlinarith + +/-- **Jackson's estimate for splines from two smoothings**: there is `A < ∞` such that for +`k ≥ r + 2`, every measurable `u` integrable on the dyadic intervals of level `k`, and measurable +`g₁, D₁` and `g₂, D₂` such that `g_ν` has Taylor polynomials +`‖g_ν - T‖_{L_p[a,b]} ≤ (b - a)^r ‖D_ν‖_{L_p[a,b]}` on all intervals, +`‖u - Q_k u‖_{L_p[0,1]} ≤ A ((‖u - g₁‖_{L_p[0,3/4]} + c ‖D₁‖_{L_p[0,3/4]}) + (‖u - +g₂‖_{L_p[1/4,1]} + c ‖D₂‖_{L_p[1/4,1]}))` +with `c = (r 2^(-k))^r`. Every window of the quasi-interpolant has length at most `1/4`, so it +lies in `[0, 3/4]` or in `[1/4, 1]`, and `Interval.exists_sum_eLpNorm_sub_qiPieces_le_of_taylor` +applies to the two sets of cells. -/ +theorem exists_eLpNorm_sub_qi_le_of_taylor {r : ℕ} (hr : 1 ≤ r) (hp : p ≠ ∞) : + ∃ A : ℝ≥0∞, A ≠ ∞ ∧ ∀ {k : ℕ}, r + 2 ≤ k → ∀ {u g₁ D₁ g₂ D₂ : ℝ → ℂ}, Measurable u → + (∀ m < 2 ^ k, IntegrableOn u (dyadicIco k m)) → Measurable g₁ → Measurable D₁ → + Measurable g₂ → Measurable D₂ → + (∀ a b : ℝ, a ≤ b → ∃ T ∈ degreeLT ℂ r, + eLpNorm (fun x => g₁ x - polyFun T x) p (volume.restrict (Icc a b)) ≤ + ENNReal.ofReal (b - a) ^ r * eLpNorm D₁ p (volume.restrict (Icc a b))) → + (∀ a b : ℝ, a ≤ b → ∃ T ∈ degreeLT ℂ r, + eLpNorm (fun x => g₂ x - polyFun T x) p (volume.restrict (Icc a b)) ≤ + ENNReal.ofReal (b - a) ^ r * eLpNorm D₂ p (volume.restrict (Icc a b))) → + eLpNorm (fun x => u x - ppFun k (qiPieces hr k (2 ^ k) u) x) p unitVol ≤ + A * ((eLpNorm (fun x => u x - g₁ x) p (volume.restrict (Icc 0 (3 / 4))) + + ENNReal.ofReal ((r : ℝ) / 2 ^ k) ^ r * + eLpNorm D₁ p (volume.restrict (Icc 0 (3 / 4)))) + + (eLpNorm (fun x => u x - g₂ x) p (volume.restrict (Icc (1 / 4) 1)) + + ENNReal.ofReal ((r : ℝ) / 2 ^ k) ^ r * + eLpNorm D₂ p (volume.restrict (Icc (1 / 4) 1)))) := by + obtain ⟨A, hA, hAb⟩ := exists_sum_eLpNorm_sub_qiPieces_le_of_taylor (p := p) hr hp + have hp1 : 1 ≤ p := Fact.out + have hp0 : p ≠ 0 := (lt_of_lt_of_le zero_lt_one hp1).ne' + have hq1 : 1 ≤ p.toReal := ENNReal.one_le_toReal_of_one_le hp1 hp + refine ⟨A, hA, fun {k} hk {u g₁ D₁ g₂ D₂} hum hui hg₁ hD₁ hg₂ hD₂ hT₁ hT₂ => ?_⟩ + have hpos : (0 : ℝ) < 2 ^ k := by positivity + -- the cells whose windows lie in `[0, 3/4]`, and the others, whose windows lie in `[1/4, 1]` + have hW₁ : ∀ i ∈ (Finset.range (2 ^ k)).filter (fun i : ℕ => ((i : ℝ) + 1) / 2 ^ k ≤ 3 / 4), + qiWindow r k i ⊆ Icc 0 (3 / 4) := fun i hi x hx => + ⟨(by positivity : (0 : ℝ) ≤ ((i + 1 - r : ℕ) : ℝ) / 2 ^ k).trans hx.1, + hx.2.trans (Finset.mem_filter.1 hi).2⟩ + have hW₂ : ∀ i ∈ (Finset.range (2 ^ k)).filter (fun i : ℕ => ¬((i : ℝ) + 1) / 2 ^ k ≤ 3 / 4), + qiWindow r k i ⊆ Icc (1 / 4) 1 := fun i hi x hx => by + obtain ⟨hi', hleft⟩ := Finset.mem_filter.1 hi + push Not at hleft + have ha : 1 / 4 ≤ ((i + 1 - r : ℕ) : ℝ) / 2 ^ k := by + have h1 := div_le_div_of_nonneg_right (natCast_add_one_sub_le i r) hpos.le + have : ((i : ℝ) + 1 - r) / 2 ^ k = ((i : ℝ) + 1) / 2 ^ k - (r : ℝ) / 2 ^ k := by ring + linarith [natCast_div_two_pow_le hk] + have hb : ((i : ℝ) + 1) / 2 ^ k ≤ 1 := by + rw [div_le_one hpos] + have : ((i + 1 : ℕ) : ℝ) ≤ 2 ^ k := by exact_mod_cast Finset.mem_range.1 hi' + push_cast at this; linarith + exact ⟨ha.trans hx.1, hx.2.trans hb⟩ + have h₁ := hAb (Finset.filter_subset _ _) hW₁ hum hui hg₁ hD₁ hT₁ + have h₂ := hAb (Finset.filter_subset _ _) hW₂ hum hui hg₂ hD₂ hT₂ + refine eLpNorm_le_of_lintegral_le ((hum.sub (measurable_ppFun _ _)).aestronglyMeasurable) + hp0 hp ((lintegral_sub_ppFun_le_sum hp hum k _).trans ?_) + rw [← Finset.sum_filter_add_sum_filter_not (Finset.range (2 ^ k)) + (fun i : ℕ => ((i : ℝ) + 1) / 2 ^ k ≤ 3 / 4), mul_add] + exact (add_le_add h₁ h₂).trans (ENNReal.add_rpow_le_rpow_add _ _ hq1) + +/-- **Jackson's inequality for splines, continuous functions**: there is `C` with +`‖F - Q_k F‖_{L_p[0,1]} ≤ C ω_r(F, 2^(-k), [0, 1])_p` for every continuous `F` and `k ≥ r + 2`: +the smoothings of `F` from the left on `[0, 3/4]` and from the right on `[1/4, 1]` enter +`Interval.exists_eLpNorm_sub_qi_le_of_taylor`. -/ +theorem exists_eLpNorm_sub_qi_le {r : ℕ} (hr : 1 ≤ r) (hp : p ≠ ∞) : + ∃ C : ℝ≥0∞, C ≠ ∞ ∧ ∀ F : ℝ → ℂ, Continuous F → ∀ k : ℕ, r + 2 ≤ k → + eLpNorm (fun x => F x - ppFun k (qiPieces hr k (2 ^ k) F) x) p unitVol ≤ + C * modulus r p 0 1 F (1 / 2 ^ k) := by + obtain ⟨A, hA, hAb⟩ := exists_eLpNorm_sub_qi_le_of_taylor (p := p) hr hp + have hJ : 1 + (r : ℝ≥0∞) ^ r * (2 ^ r * (r : ℝ≥0∞) ^ (2 * r)) ≠ ∞ := + ENNReal.add_ne_top.2 ⟨ENNReal.one_ne_top, ENNReal.mul_ne_top + (ENNReal.pow_ne_top (ENNReal.natCast_ne_top r)) + (ENNReal.mul_ne_top (by simp) (ENNReal.pow_ne_top (ENNReal.natCast_ne_top r)))⟩ + refine ⟨A * (2 * (1 + (r : ℝ≥0∞) ^ r * (2 ^ r * (r : ℝ≥0∞) ^ (2 * r)))), + ENNReal.mul_ne_top hA (ENNReal.mul_ne_top (by simp) hJ), fun F hF k hk => ?_⟩ + have hp1 : 1 ≤ p := Fact.out + have hL : (0 : ℝ) < 1 / 2 ^ k := by positivity + have hk2 : 2 ≤ k := by omega + have hwL : (3 / 4 : ℝ) + 1 / 2 ^ k ≤ 1 := by + have : (1 : ℝ) / 2 ^ k ≤ 1 / 4 := by + rw [div_le_div_iff₀ (by positivity) (by norm_num), one_mul, one_mul] + calc (4 : ℝ) = 2 ^ 2 := by norm_num + _ ≤ 2 ^ k := pow_le_pow_right₀ (by norm_num) hk2 + linarith + obtain ⟨gl, Dl, hglm, hDlm, hl1, hl2, hl3⟩ := exists_left_smoothing hF hr hp1 hp hL hwL + obtain ⟨gr, Dr, hgrm, hDrm, hr1, hr2, hr3⟩ := exists_right_smoothing hF hr hp1 hp hL hwL + rw [show (1 : ℝ) - 3 / 4 = 1 / 4 by norm_num] at hr1 hr2 + refine (hAb hk hF.measurable (fun m _ => integrableOn_dyadicIco_of_continuous hF k m) hglm + hDlm hgrm hDrm hl3 hr3).trans ?_ + rw [mul_assoc] + refine mul_le_mul' le_rfl ?_ + rw [two_mul, add_mul] + exact add_le_add (add_ofReal_div_pow_mul_le r k hl1 hl2) (add_ofReal_div_pow_mul_le r k hr1 hr2) + +/-- **The quasi-interpolant is bounded on `L_p[0, 1]`**: there is `C < ∞` with +`‖Q_k u‖_{L_p[0,1]} ≤ C ‖u‖_{L_p[0,1]}` for every level `k` and every measurable `u` integrable +on the dyadic intervals, from `Interval.exists_sum_eLpNorm_sub_qiPieces_le_of_taylor` with the +smoothing `0`. -/ +theorem exists_eLpNorm_qi_le {r : ℕ} (hr : 1 ≤ r) (hp : p ≠ ∞) : + ∃ C : ℝ≥0∞, C ≠ ∞ ∧ ∀ (k : ℕ) {u : ℝ → ℂ}, Measurable u → + (∀ m < 2 ^ k, IntegrableOn u (dyadicIco k m)) → + eLpNorm (ppFun k (qiPieces hr k (2 ^ k) u)) p unitVol ≤ C * eLpNorm u p unitVol := by + obtain ⟨A, hA, hAb⟩ := exists_sum_eLpNorm_sub_qiPieces_le_of_taylor (p := p) hr hp + have hp1 : 1 ≤ p := Fact.out + have hp0 : p ≠ 0 := (lt_of_lt_of_le zero_lt_one hp1).ne' + refine ⟨1 + A, ENNReal.add_ne_top.2 ⟨ENNReal.one_ne_top, hA⟩, fun k {u} hum hui => ?_⟩ + -- the windows lie in `[0, 1]`, and the smoothing `0` has the Taylor polynomial `0` + have hW : ∀ i ∈ Finset.range (2 ^ k), qiWindow r k i ⊆ Icc 0 1 := fun i hi x hx => by + refine ⟨(by positivity : (0 : ℝ) ≤ ((i + 1 - r : ℕ) : ℝ) / 2 ^ k).trans hx.1, hx.2.trans ?_⟩ + rw [div_le_one (by positivity)] + have : ((i + 1 : ℕ) : ℝ) ≤ 2 ^ k := by exact_mod_cast Finset.mem_range.1 hi + push_cast at this; linarith + have hT0 : ∀ v w : ℝ, v ≤ w → ∃ T ∈ degreeLT ℂ r, + eLpNorm (fun x => (0 : ℝ → ℂ) x - polyFun T x) p (volume.restrict (Icc v w)) ≤ + ENNReal.ofReal (w - v) ^ r * eLpNorm (0 : ℝ → ℂ) p (volume.restrict (Icc v w)) := + fun _ _ _ => ⟨0, Submodule.zero_mem _, by simp [polyFun_zero]⟩ + have h := hAb subset_rfl hW hum hui measurable_zero measurable_zero hT0 + simp only [Pi.zero_apply, sub_zero, eLpNorm_zero, mul_zero, add_zero] at h + have herr : eLpNorm (fun x => u x - ppFun k (qiPieces hr k (2 ^ k) u) x) p unitVol ≤ + A * eLpNorm u p unitVol := + eLpNorm_le_of_lintegral_le ((hum.sub (measurable_ppFun _ _)).aestronglyMeasurable) + hp0 hp ((lintegral_sub_ppFun_le_sum hp hum k _).trans h) + calc eLpNorm (ppFun k (qiPieces hr k (2 ^ k) u)) p unitVol + = eLpNorm (u - fun x => u x - ppFun k (qiPieces hr k (2 ^ k) u) x) p unitVol := by + congr 1; funext x; simp + _ ≤ eLpNorm u p unitVol + + eLpNorm (fun x => u x - ppFun k (qiPieces hr k (2 ^ k) u) x) p unitVol := + eLpNorm_sub_le hp1 + _ ≤ eLpNorm u p unitVol + A * eLpNorm u p unitVol := add_le_add le_rfl herr + _ = (1 + A) * eLpNorm u p unitVol := by ring + +/-! ### Jackson's inequality in `L_p` and the coincidence theorem -/ + +/-- At complexity `1` the spline scheme and the piecewise polynomial scheme have the same error: +both approximate by the polynomials of degree `< r` (`Interval.splineSpace_zero`). -/ +theorem approxError_splineScheme_one (r : ℕ) (f : Lp ℂ p unitVol) : + (splineScheme p r).approxError f 1 = (ppScheme p r).approxError f 1 := by + have h : (splineScheme p r) 1 = (ppScheme p r) 1 := by + ext g + rw [mem_splineScheme one_ne_zero, mem_ppScheme one_ne_zero, Nat.log_one_right, + splineSpace_zero] + rw [ApproximationScheme.approxError, ApproximationScheme.approxError, h] + +/-- **Jackson's inequality for dyadic splines**: for `1 ≤ p < ∞` and `r ≥ 1` there is `C_J` with +`E_{2^k}(f)_p ≤ C_J ω_r(f, 2^(-k), [0, 1])_p` for all `f ∈ L_p[0, 1]` and all `k ≥ 0`: the +quasi-interpolant for `k ≥ r + 2`, Whitney's inequality for `k ≤ r + 1`. -/ +theorem exists_approxError_splineScheme_le {r : ℕ} (hr : 1 ≤ r) (hp : p ≠ ∞) : + ∃ CJ : ℝ≥0∞, CJ ≠ ∞ ∧ ∀ (f : Lp ℂ p unitVol) (k : ℕ), + (splineScheme p r).approxError f (2 ^ k) ≤ CJ * lpModulus p r f k := by + obtain ⟨C, hC, hCb⟩ := exists_eLpNorm_sub_qi_le hr hp + obtain ⟨W, hW, hWb⟩ := exists_approxError_ppScheme_one_le (p := p) hr hp (m := r + 1) (by omega) + refine ⟨W + C, ENNReal.add_ne_top.2 ⟨hW, hC⟩, fun f k => ?_⟩ + rcases lt_or_ge k (r + 2) with hk | hk + · -- the coarse levels: Whitney's inequality + calc (splineScheme p r).approxError f (2 ^ k) + ≤ (splineScheme p r).approxError f 1 := + ApproximationScheme.approxError_anti f Nat.one_le_two_pow + _ = (ppScheme p r).approxError f 1 := approxError_splineScheme_one r f + _ ≤ W * lpModulus p r f (r + 1) := hWb f + _ ≤ (W + C) * lpModulus p r f k := + mul_le_mul' le_self_add (lpModulus_anti r f (by omega)) + · -- the fine levels: the quasi-interpolant + refine (approxError_le_of_continuous hp hC (fun g => ?_) f).trans + (mul_le_mul' le_add_self le_rfl) + exact ⟨ppFun k (qiPieces hr k (2 ^ k) g), ⟨(memLp_ppFun k (qiPieces hr k (2 ^ k) g) p).toLp _, + mem_splineScheme_two_pow.2 ⟨qiPieces hr k (2 ^ k) g, qiPieces_mem hr k (2 ^ k) g, + splineJoins_qiPieces hr k (2 ^ k) g, MemLp.coeFn_toLp _⟩, MemLp.coeFn_toLp _⟩, + hCb g g.continuous k hk⟩ + +/-- The modulus `ω_r(f, 2^(-k), [0, 1])_p` is compatible with the scheme of dyadic splines of +order `r`, with inverse order `θ = r - 1 + 1/p` and Jackson's inequality at every level. -/ +noncomputable def splineModulusData {r : ℕ} (hr : 1 ≤ r) (hp : p ≠ ∞) : + ApproximationScheme.ModulusData (splineScheme p r) (((r - 1 : ℕ) : ℝ) + 1 / p.toReal) := + .ofExists (lpModulus p r) (lpModulus_add_le r) (2 ^ r) (by simp) (lpModulus_le r) 0 + ((exists_approxError_splineScheme_le hr hp).imp fun _ h => ⟨h.1, fun f k _ => h.2 f k⟩) + (exists_inverse_splineScheme hp) + +/-- **Approximation by dyadic splines.** For `1 ≤ p < ∞`, `1 ≤ q ≤ ∞`, `r ≥ 1` and +`0 ≤ s < r - 1 + 1/p`, an `f ∈ L_p[0, 1]` lies in the approximation space `A^s_q` of the splines +of order `r` (degree `< r`, `C^(r-2)`) on dyadic partitions iff its Besov quasi-norm +`‖f‖_p + ‖(2^(ks) ω_r(f, 2^(-k), [0, 1])_p)_k‖_{ℓ_q}` is finite. -/ +theorem memApprox_splineScheme_iff {r : ℕ} (hr : 1 ≤ r) (hp : p ≠ ∞) {s : ℝ} {q : ℝ≥0∞} + (hq : 1 ≤ q) (hs : 0 ≤ s) (hsr : s < (r : ℝ) - 1 + 1 / p.toReal) (f : Lp ℂ p unitVol) : + (splineScheme p r).MemApprox s q f ↔ + ‖f‖ₑ + ENNReal.lqNorm q (fun k => dyadicWeight s k * lpModulus p r f k) < ∞ := by + have hθ : (r : ℝ) - 1 + 1 / p.toReal = ((r - 1 : ℕ) : ℝ) + 1 / p.toReal := by + rw [Nat.cast_sub hr, Nat.cast_one] + exact (splineModulusData hr hp).memApprox_iff_modNorm_lt_top hq hs (hθ ▸ hsr) f + +end Interval diff --git a/LeanPool/FunctionSpaces/Domains/Interval/SplinePeriodic.lean b/LeanPool/FunctionSpaces/Domains/Interval/SplinePeriodic.lean new file mode 100644 index 0000000000..99f220bc2b --- /dev/null +++ b/LeanPool/FunctionSpaces/Domains/Interval/SplinePeriodic.lean @@ -0,0 +1,262 @@ +/- +Copyright (c) 2026 Mario Ullrich. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Mario Ullrich +-/ +module + +public import LeanPool.FunctionSpaces.Domains.Interval.SplineInverse +public import LeanPool.FunctionSpaces.Domains.Interval.PiecewisePeriodic + +/- +Modified for Lean Pool: module names and imports adapted. +-/ + +/-! +# Splines on the circle and their inverse inequality + +On the circle `𝕋 = ℝ/ℤ`, identified with `[0, 1)` through the periodic extension +`f̃(x) = f(x - ⌊x⌋)`, a **periodic spline of order `r` and level `k`** is a spline on `[0, 1]` +(`Interval.SplineJoins`) whose last piece also joins the first one across the point `0 = 1` of +the circle (`Interval.PerJoin`): the first piece moved to `[1, 1 + 2^(-k))` and the last piece +differ by a multiple of `(x - 1)^(r-1)`. The periodic splines form subspaces `S_k(𝕋)` of +`L_p(𝕋) = L_p[0, 1]` increasing in `k` (`Interval.perSplineSpace`), and the scheme +`Interval.perSplineScheme` has them as approximants of complexity `2^k`. + +The periodic extension of a periodic spline is a spline on `[0, ∞)`, with spline joins at every +knot (`Interval.perPieces_join`). So the local estimate for splines of +`FunctionSpaces.Domains.Interval.SplineInverse` applies to it on `[0, 1]`, and its masses on `r + 1` +consecutive intervals are controlled by one period (`Interval.sum_sum_localMass_perExt_le`). This +gives the **inverse inequality** `ω_r^per(a, 2^(-k))_p ≤ C_B 2^(-(k-j)(r-1+1/p)) ‖a‖_p` for +`a ∈ S_j(𝕋)` (`Interval.exists_inverse_perSplineScheme`). +-/ + +@[expose] public section + +open MeasureTheory Set Polynomial +open Rd (higherDiff) +open scoped ENNReal +open ENNReal (dyadicWeight) + +namespace Interval + +/-- The pieces `Q` of level `k` have a **spline join of order `r` across the point `0 = 1` of the +circle**: the first piece moved to `[1, 1 + 2^(-k))` and the last piece differ by a multiple of +`(x - 1)^(r-1)`. -/ +def PerJoin (r k : ℕ) (Q : ℕ → ℂ[X]) : Prop := + ∃ c : ℂ, (Q 0).comp (X - C 1) - Q (2 ^ k - 1) = C c * (X - C 1) ^ (r - 1) + +/-- The zero pieces join across `0 = 1`. -/ +theorem perJoin_zero (r k : ℕ) : PerJoin r k 0 := ⟨0, by simp⟩ + +/-- Joins across `0 = 1` are preserved by sums. -/ +theorem PerJoin.add {r k : ℕ} {Q Q' : ℕ → ℂ[X]} (h : PerJoin r k Q) (h' : PerJoin r k Q') : + PerJoin r k (Q + Q') := by + obtain ⟨c, hc⟩ := h + obtain ⟨c', hc'⟩ := h' + refine ⟨c + c', ?_⟩ + simp only [Pi.add_apply] + rw [add_comp, show (Q 0).comp (X - C 1) + (Q' 0).comp (X - C 1) - + (Q (2 ^ k - 1) + Q' (2 ^ k - 1)) = ((Q 0).comp (X - C 1) - Q (2 ^ k - 1)) + + ((Q' 0).comp (X - C 1) - Q' (2 ^ k - 1)) by ring, hc, hc', C_add] + ring + +/-- Joins across `0 = 1` are preserved by constant multiples. -/ +theorem PerJoin.const_mul {r k : ℕ} {Q : ℕ → ℂ[X]} (h : PerJoin r k Q) (a : ℂ) : + PerJoin r k (fun n => C a * Q n) := by + obtain ⟨c, hc⟩ := h + refine ⟨a * c, ?_⟩ + rw [mul_comp, C_comp, ← mul_sub, hc, C_mul] + ring + +/-- Joins across `0 = 1` of level `k` are joins of level `k + 1`: the first and the last piece +stay the same. -/ +theorem PerJoin.refine {r k : ℕ} {Q : ℕ → ℂ[X]} (h : PerJoin r k Q) : + PerJoin r (k + 1) (fun m => Q (m / 2)) := by + obtain ⟨c, hc⟩ := h + refine ⟨c, ?_⟩ + have h1 : (2 ^ (k + 1) - 1) / 2 = 2 ^ k - 1 := by + have := Nat.one_le_two_pow (n := k) + rw [pow_succ] + omega + simp only [Nat.zero_div, h1] + exact hc + +/-! ### The periodic extension of a periodic spline -/ + +/-- **The periodic extension of a periodic spline is a spline on `[0, ∞)`**: its pieces have +spline joins at every knot `m 2^(-k)`, `m ≥ 1`, from the joins inside `[0, 1)` at the knots of a +period and from the join across `0 = 1` at the integers. -/ +theorem perPieces_join {r k : ℕ} {Q : ℕ → ℂ[X]} (hJ : SplineJoins r k Q) (hP : PerJoin r k Q) + {m : ℕ} (hm : 0 < m) : + ∃ c : ℂ, perPieces k Q m - perPieces k Q (m - 1) = + C c * (X - C ((((m : ℝ) / 2 ^ k : ℝ)) : ℂ)) ^ (r - 1) := by + obtain ⟨d, e, he, rfl⟩ : ∃ d e : ℕ, e < 2 ^ k ∧ m = e + 2 ^ k * d := + ⟨m / 2 ^ k, m % 2 ^ k, Nat.mod_lt _ (by positivity), (Nat.mod_add_div m (2 ^ k)).symm⟩ + have hpos : (0 : ℝ) < 2 ^ k := by positivity + rcases Nat.eq_zero_or_pos e with rfl | he0 + · -- an integer knot `d ≥ 1`: the join across `0 = 1`, shifted by `d - 1` + have hd : 1 ≤ d := Nat.pos_of_ne_zero fun h => by simp [h] at hm + obtain ⟨c, hc⟩ := hP + refine ⟨c, ?_⟩ + have h1 : 0 + 2 ^ k * d - 1 = (2 ^ k - 1) + 2 ^ k * (d - 1) := by + obtain ⟨d', rfl⟩ := Nat.exists_eq_add_of_le' hd + have := Nat.one_le_two_pow (n := k) + rw [Nat.add_sub_cancel, mul_add, mul_one] + generalize 2 ^ k * d' = A + omega + have hshift : (X - C (((d : ℝ) : ℝ) : ℂ) : ℂ[X]) = + (X - C 1 : ℂ[X]).comp (X - C ((((d - 1 : ℕ) : ℝ) : ℝ) : ℂ)) := by + refine Polynomial.funext fun z => ?_ + simp only [eval_comp, eval_sub, eval_X, eval_C] + push_cast [Nat.cast_sub hd] + ring + rw [h1, perPieces_eq k Q (by positivity) d, + perPieces_eq k Q (Nat.sub_lt (by positivity) one_pos) (d - 1), hshift, ← comp_assoc, + ← sub_comp, hc, mul_comp, C_comp] + congr 1 + refine Polynomial.funext fun z => ?_ + simp only [eval_comp, eval_pow, eval_sub, eval_X, eval_C] + congr 1 + push_cast [Nat.cast_sub hd] + field_simp + ring + · -- a knot inside a period: the join inside `[0, 1)`, shifted by `d` + obtain ⟨c, hc⟩ := hJ e he0 he + refine ⟨c, ?_⟩ + have h1 : e + 2 ^ k * d - 1 = (e - 1) + 2 ^ k * d := by + generalize 2 ^ k * d = A + omega + rw [h1, perPieces_eq k Q he d, perPieces_eq k Q (by omega) d, ← sub_comp, hc, mul_comp, + C_comp] + congr 1 + refine Polynomial.funext fun z => ?_ + simp only [eval_comp, eval_pow, eval_sub, eval_X, eval_C] + congr 1 + push_cast + field_simp + ring + +/-- The periodic extension of a periodic spline is a spline below every `N`. -/ +theorem splineJoinsBelow_perPieces {r k : ℕ} {Q : ℕ → ℂ[X]} (hJ : SplineJoins r k Q) + (hP : PerJoin r k Q) (N : ℕ) : SplineJoinsBelow r k N (perPieces k Q) := + fun _ hm _ => perPieces_join hJ hP hm + +/-! ### The space and the scheme -/ + +variable {p : ℝ≥0∞} [Fact (1 ≤ p)] + +variable (p) in +/-- The space `S_k(𝕋)` of **periodic splines of order `r`** on the dyadic grid of level `k` in +`L_p(𝕋) = L_p[0, 1]`: the classes of splines on `[0, 1]` whose pieces also join across +`0 = 1`. -/ +noncomputable def perSplineSpace (r k : ℕ) : Submodule ℝ (Lp ℂ p unitVol) where + carrier := {g | ∃ Q : ℕ → ℂ[X], (∀ n, Q n ∈ degreeLT ℂ r) ∧ SplineJoins r k Q ∧ + PerJoin r k Q ∧ (g : ℝ → ℂ) =ᵐ[unitVol] ppFun k Q} + add_mem' := by + rintro g g' ⟨Q, hQ, hj, hP, hg⟩ ⟨Q', hQ', hj', hP', hg'⟩ + refine ⟨Q + Q', fun n => Submodule.add_mem _ (hQ n) (hQ' n), hj.add hj', hP.add hP', ?_⟩ + filter_upwards [Lp.coeFn_add g g', hg, hg'] with x h1 h2 h3 + rw [h1, Pi.add_apply, h2, h3, ppFun_add, Pi.add_apply] + zero_mem' := ⟨0, fun n => Submodule.zero_mem _, splineJoins_zero r k, perJoin_zero r k, by + filter_upwards [Lp.coeFn_zero ℂ p unitVol] with x hx + rw [hx, ppFun_zero]⟩ + smul_mem' := by + rintro c g ⟨Q, hQ, hj, hP, hg⟩ + refine ⟨fun n => C (c : ℂ) * Q n, fun n => ?_, hj.const_mul _, hP.const_mul _, ?_⟩ + · change C (c : ℂ) * Q n ∈ degreeLT ℂ r + rw [← smul_eq_C_mul]; exact Submodule.smul_mem _ _ (hQ n) + · filter_upwards [Lp.coeFn_smul c g, hg] with x h1 h2 + rw [h1, Pi.smul_apply, h2, ppFun_const_mul, Complex.real_smul] + +omit [Fact (1 ≤ p)] in +/-- Periodic splines are splines. -/ +theorem perSplineSpace_le_splineSpace (r k : ℕ) : perSplineSpace p r k ≤ splineSpace p r k := + fun _ ⟨Q, hQ, hj, _, hg⟩ => ⟨Q, hQ, hj, hg⟩ + +omit [Fact (1 ≤ p)] in +/-- The periodic spline spaces increase with the level. -/ +theorem perSplineSpace_mono (r : ℕ) : Monotone (perSplineSpace p r) := by + refine monotone_nat_of_le_succ fun k g hg => ?_ + obtain ⟨Q, hQ, hj, hP, hgQ⟩ := hg + exact ⟨fun n => Q (n / 2), fun n => hQ _, hj.refine, hP.refine, + hgQ.trans (ppFun_refine k Q).symm⟩ + +variable (p) in +/-- The **scheme of periodic dyadic splines** of order `r` in `L_p(𝕋) = L_p[0, 1]`: `{0}` at +complexity `0` and `S_{⌊log₂ n⌋}(𝕋)` at complexity `n ≥ 1`. -/ +noncomputable def perSplineScheme (r : ℕ) : ApproximationScheme (Lp ℂ p unitVol) := + ApproximationScheme.ofMonotoneSubmodules (perSplineSpace p r) (perSplineSpace_mono r) + +/-- The approximants of complexity `0` are `{0}`. -/ +theorem mem_perSplineScheme_zero {r : ℕ} {g : Lp ℂ p unitVol} : + g ∈ perSplineScheme p r 0 ↔ g = 0 := + ApproximationScheme.mem_ofMonotoneSubmodules_zero + +/-- The approximants of complexity `n ≥ 1` are the periodic splines of level `⌊log₂ n⌋`. -/ +theorem mem_perSplineScheme {r n : ℕ} (hn : n ≠ 0) {g : Lp ℂ p unitVol} : + g ∈ perSplineScheme p r n ↔ g ∈ perSplineSpace p r (Nat.log 2 n) := + ApproximationScheme.mem_ofMonotoneSubmodules hn + +/-- The approximants of complexity `2^k` are the periodic splines of level `k`. -/ +theorem mem_perSplineScheme_two_pow {r k : ℕ} {g : Lp ℂ p unitVol} : + g ∈ perSplineScheme p r (2 ^ k) ↔ g ∈ perSplineSpace p r k := + ApproximationScheme.mem_ofMonotoneSubmodules_two_pow + +/-- The periodic spline scheme is linear. -/ +theorem perSplineScheme_isLinear (r : ℕ) : (perSplineScheme p r).IsLinear := + ApproximationScheme.isLinear_ofMonotoneSubmodules _ _ + +/-! ### The inverse inequality -/ + +/-- **The inverse inequality for periodic splines**, of order `θ = r - 1 + 1/p`: there is +`C_B < ∞` with `ω_r^per(a, 2^(-k))_p ≤ C_B 2^(-(k-j)θ) ‖a‖_p` for every periodic spline `a` of +order `r` and level `j` (and `k - j` truncated at `0`). The periodic extension is a spline below +`N = 2^j + r + 1`, and `[0, N 2^(-j))` contains `[0, 1 + rh]` for `h ≤ 2^(-j)`. -/ +theorem exists_inverse_perSplineScheme {r : ℕ} (hp : p ≠ ∞) : + ∃ CB : ℝ≥0∞, CB ≠ ∞ ∧ ∀ j k : ℕ, ∀ a ∈ perSplineScheme p r (2 ^ j), + lpPerModulus p r a k ≤ + CB * dyadicWeight (-(((r - 1 : ℕ) : ℝ) + 1 / p.toReal)) (k - j) * ‖a‖ₑ := by + obtain ⟨K, hK, hKb⟩ := enorm_polyFun_le (p := p) r hp + refine ⟨2 ^ r * (1 + splineInverseConst r K p), + ENNReal.mul_ne_top (by simp) (ENNReal.add_ne_top.2 ⟨ENNReal.one_ne_top, + splineInverseConst_ne_top r hK⟩), fun j k a ha => ?_⟩ + obtain ⟨Q, hQ, hJ, hP, hae⟩ := mem_perSplineScheme_two_pow.1 ha + rcases lt_or_ge k j with hkj | hjk + · rw [Nat.sub_eq_zero_of_le hkj.le, ENNReal.dyadicWeight_zero_right, mul_one] + exact (lpPerModulus_le hp r a k).trans (by gcongr; exact two_pow_le_two_pow_mul_one_add r _) + · have hnorm : ‖a‖ₑ = eLpNorm (ppFun j Q) p unitVol := by + rw [Lp.eNorm_def] + exact eLpNorm_congr_ae hae + rw [lpPerModulus, perModulus_congr_ae hae, hnorm] + refine iSup₂_le fun h hh => ?_ + have hhj : h ≤ 1 / 2 ^ j := hh.2.trans (one_div_le_one_div_of_le (by positivity) + (pow_le_pow_right₀ (by norm_num) hjk)) + have hSN : ∀ᵐ x ∂volume.restrict (Icc (0 : ℝ) 1), + x + r * h < ((2 ^ j + r + 1 : ℕ) : ℝ) / 2 ^ j := by + filter_upwards [ae_restrict_mem measurableSet_Icc] with x hx + have hrh : (r : ℝ) * h ≤ r / 2 ^ j := by + rw [div_eq_mul_one_div] + exact mul_le_mul_of_nonneg_left hhj (Nat.cast_nonneg r) + have hN : ((2 ^ j + r + 1 : ℕ) : ℝ) / 2 ^ j = 1 + r / 2 ^ j + 1 / 2 ^ j := by + push_cast + field_simp + have h0 : (0 : ℝ) < 1 / 2 ^ j := by positivity + rw [hN] + linarith [hx.2] + calc eLpNorm (higherDiff r h (perExt (ppFun j Q))) p (volume.restrict (Icc 0 1)) + ≤ splineStripConst r j K h p * (ENNReal.ofReal (r * h) * (r + 1)) ^ + (1 / p.toReal) * eLpNorm (ppFun j Q) p unitVol := + eLpNorm_higherDiff_spline_le (perPieces_mem hQ j) (splineJoinsBelow_perPieces hJ hP _) + (fun _ _ _ hx => perExt_ppFun_eq j Q hx) (isPiecewisePoly_perExt_ppFun hQ j) + (measurable_perExt (measurable_ppFun j Q)) hKb hp hh.1 hhj measurableSet_Icc + subset_rfl hSN (sum_sum_localMass_perExt_le (measurable_ppFun j Q) hp j r) + _ ≤ splineInverseConst r K p * dyadicWeight (-(((r - 1 : ℕ) : ℝ) + 1 / p.toReal)) (k - j) * + eLpNorm (ppFun j Q) p unitVol := splineStripConst_mul_le hjk K hh.2 _ + _ ≤ 2 ^ r * (1 + splineInverseConst r K p) * + dyadicWeight (-(((r - 1 : ℕ) : ℝ) + 1 / p.toReal)) (k - j) * + eLpNorm (ppFun j Q) p unitVol := by + gcongr + exact le_two_pow_mul_one_add r _ + +end Interval diff --git a/LeanPool/FunctionSpaces/Domains/Interval/SplinePeriodicJackson.lean b/LeanPool/FunctionSpaces/Domains/Interval/SplinePeriodicJackson.lean new file mode 100644 index 0000000000..b270c63e36 --- /dev/null +++ b/LeanPool/FunctionSpaces/Domains/Interval/SplinePeriodicJackson.lean @@ -0,0 +1,480 @@ +/- +Copyright (c) 2026 Mario Ullrich. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Mario Ullrich +-/ +module + +public import LeanPool.FunctionSpaces.Domains.Interval.SplinePeriodic +public import LeanPool.FunctionSpaces.Domains.Interval.SplineJackson + +/- +Modified for Lean Pool: module names and imports adapted. +-/ + +/-! +# Jackson's inequality for splines on the circle and the coincidence theorem + +For `1 ≤ p < ∞` and `r ≥ 1`, the error of best approximation in `L_p(𝕋) = L_p[0, 1]` by periodic +splines of order `r` and level `k ≥ r` is bounded by the periodic modulus of smoothness, +`E_{2^k}(f)_p ≤ C ω_r^per(f, 2^(-k))_p` (`Interval.exists_approxError_perSplineScheme_le`). + +* **The periodic quasi-interpolant.** For a `1`-periodic `G`, the quasi-interpolant of + `FunctionSpaces.Domains.Interval.QuasiInterp` on `[0, 2)` repeats itself away from `0`: its + coefficients repeat (`Interval.qiCoeff_add_two_pow`), since the local projections of `G` on + `I_{k,m}` and on `I_{k,m+2^k} = I_{k,m} + 1` are translates, and so do its pieces + (`Interval.qiPieces_add_two_pow_comp`). Its pieces on `[1, 2)`, moved to `[0, 1)` + (`Interval.perQiPieces`), form a periodic spline once `r ≤ 2^k` + (`Interval.perJoin_perQiPieces`). +* **Jackson's inequality for continuous periodic functions.** On `[1, 2)` the quasi-interpolant + has the local error estimates of the interval case (`Interval.eLpNorm_sub_perQiPieces_eq`), on + windows inside `[0, 2]` (`Interval.qiWindow_subset_Icc_zero_two`). One Steklov + smoothing of `G` on `[0, 2]`, with the modulus on `[0, 3]`, gives polynomials on all windows, + and `ω_r(G, t, [0, 3])_p ≤ 3^(1/p) ω_r^per(G, t)_p` (`Interval.modulus_perExt_le`). Hence + `‖G - Q_k^per G‖_p ≤ C ω_r^per(G, 2^(-k))_p` (`Interval.exists_eLpNorm_sub_perQi_le`). +* **Density.** The continuous periodic functions are dense in `L_p[0, 1]`, `p < ∞` + (`Interval.dense_periodic`): a bounded continuous function, cut off near `0` and `1`, extends + periodically. + +With the inverse inequality of order `r - 1 + 1/p` (`Interval.exists_inverse_perSplineScheme`) +the periodic modulus is compatible with the periodic spline scheme +(`Interval.perSplineModulusData`), and for `1 ≤ q ≤ ∞` and `0 ≤ s < r - 1 + 1/p`, +`f ∈ A^s_q ↔ ‖f‖_p + ‖(2^(ks) ω_r^per(f, 2^(-k))_p)_k‖_{ℓ_q} < ∞` +(`Interval.memApprox_perSplineScheme_iff`): the approximation space of the periodic splines of +order `r` is `B^s_{p,q}(𝕋)` for `0 < s < r - 1 + 1/p`. +-/ + +@[expose] public section + +open MeasureTheory Set Polynomial +open scoped ENNReal BoundedContinuousFunction +open ENNReal (dyadicWeight) + +namespace Interval + +/-! ### Shifts by one period -/ + +/-- **The local coefficients of a periodic function repeat**: for `1`-periodic `g`, the +coefficients of the local projections on `I_{j,m+2^j} = I_{j,m} + 1` and on `I_{j,m}` agree. -/ +theorem locCoeff_add_two_pow {g : ℝ → ℂ} (hg : Function.Periodic g 1) (r j m : ℕ) (i : Fin r) : + locCoeff r j g (m + 2 ^ j) i = locCoeff r j g m i := by + rw [locCoeff, locCoeff, integral_dyadicIco_eq, integral_dyadicIco_eq] + refine setIntegral_congr_fun measurableSet_Icc fun t _ => ?_ + have h2 : (2 : ℝ) ^ j ≠ 0 := by positivity + have e1 : t / 2 ^ j + ((m + 2 ^ j : ℕ) : ℝ) / 2 ^ j = t / 2 ^ j + (m : ℝ) / 2 ^ j + 1 := by + push_cast + field_simp + ring + have e2 : -((m + 2 ^ j : ℕ) : ℝ) + 2 ^ j * (t / 2 ^ j + (m : ℝ) / 2 ^ j + 1) = + -(m : ℝ) + 2 ^ j * (t / 2 ^ j + (m : ℝ) / 2 ^ j) := by + push_cast + ring + simp only [e1, hg (t / 2 ^ j + (m : ℝ) / 2 ^ j), e2] + +/-- **The local projections of a periodic function are translates**: for `1`-periodic `g`, +`Π_{I_{j,m+2^j}} g = (Π_{I_{j,m}} g)(· - 1)`. -/ +theorem locProj_add_two_pow {g : ℝ → ℂ} (hg : Function.Periodic g 1) (r j m : ℕ) : + locProj r j g (m + 2 ^ j) = (locProj r j g m).comp (X - C 1) := by + rw [locProj, locProj, sum_comp] + refine Finset.sum_congr rfl fun i _ => ?_ + rw [locCoeff_add_two_pow hg, smul_comp, comp_assoc] + congr 2 + refine Polynomial.funext fun z => ?_ + simp only [eval_comp, eval_add, eval_mul, eval_sub, eval_C, eval_X] + push_cast + ring + +/-- The rescaled local projections of a periodic function are translates by `2^k`. -/ +theorem locProjScaled_add_two_pow {g : ℝ → ℂ} (hg : Function.Periodic g 1) (r k m : ℕ) : + locProjScaled r k g (m + 2 ^ k) = + (locProjScaled r k g m).comp (X - C (((2 ^ k : ℤ) : ℤ) : ℂ)) := by + rw [locProjScaled, locProjScaled, locProj_add_two_pow hg, comp_assoc, comp_assoc] + congr 1 + refine Polynomial.funext fun z => ?_ + have h2 : (2 : ℂ) ^ k ≠ 0 := pow_ne_zero _ two_ne_zero + simp only [eval_comp, eval_add, eval_mul, eval_sub, eval_C, eval_X] + push_cast + field_simp + ring + +/-- **B-spline coefficients of translates**: `c_{n+a}(P(· - a)) = c_n(P)` for `a ∈ ℤ`. -/ +theorem bsplineCoef_comp_sub {r : ℕ} (hr : 1 ≤ r) (P : ℂ[X]) (n a : ℤ) : + bsplineCoef hr (P.comp (X - C (a : ℂ))) (n + a) = bsplineCoef hr P n := by + rw [bsplineCoef, bsplineCoef, comp_assoc] + congr 2 + refine Polynomial.funext fun z => ?_ + simp only [eval_comp, eval_add, eval_sub, eval_C, eval_X] + push_cast + ring + +/-- **The quasi-interpolant coefficients of a periodic function repeat**: for `1`-periodic `g` +and `n ≥ 0`, `λ_{n+2^k}(g) = λ_n(g)`. -/ +theorem qiCoeff_add_two_pow {r : ℕ} (hr : 1 ≤ r) {g : ℝ → ℂ} (hg : Function.Periodic g 1) + (k : ℕ) {n : ℤ} (hn : 0 ≤ n) : qiCoeff hr k g (n + 2 ^ k) = qiCoeff hr k g n := by + have htoNat : (n + 2 ^ k).toNat = n.toNat + 2 ^ k := by + rw [show ((2 : ℤ) ^ k) = ((2 ^ k : ℕ) : ℤ) by push_cast; ring] + generalize 2 ^ k = M + omega + rw [qiCoeff, qiCoeff, htoNat, locProjScaled_add_two_pow hg, bsplineCoef_comp_sub] + +/-- **Translates of the B-spline pieces**: the pieces of `N_r(2^k x - (n + 2^k))` on +`I_{k,m+2^k}`, moved by `1`, are those of `N_r(2^k x - n)` on `I_{k,m}`. -/ +theorem bsplinePieces_add_two_pow_comp (r k : ℕ) (n : ℤ) (m : ℕ) : + (bsplinePieces r k (n + 2 ^ k) (m + 2 ^ k)).comp (X + C 1) = bsplinePieces r k n m := by + have h : ((m + 2 ^ k : ℕ) : ℤ) - (n + 2 ^ k) = (m : ℤ) - n := by push_cast; ring + unfold bsplinePieces + rw [h] + split_ifs + · rw [comp_assoc] + congr 1 + refine Polynomial.funext fun z => ?_ + simp only [eval_comp, eval_add, eval_mul, eval_C, eval_X] + push_cast + ring + · rw [zero_comp] + +/-- **The pieces of the quasi-interpolant of a periodic function repeat**: for `1`-periodic `g`, +`r ≤ i + 1` and `i + 2^k < N`, `Q_{i+2^k}(· + 1) = Q_i`, since only the coefficients `λ_n`, +`n > i - r ≥ -1`, enter. -/ +theorem qiPieces_add_two_pow_comp {r : ℕ} (hr : 1 ≤ r) {g : ℝ → ℂ} (hg : Function.Periodic g 1) + {k N i : ℕ} (hri : r ≤ i + 1) (hiN : i + 2 ^ k < N) : + (qiPieces hr k N g (i + 2 ^ k)).comp (X + C 1) = qiPieces hr k N g i := by + rw [qiPieces_eq_sum_Ioc hr k hiN, qiPieces_eq_sum_Ioc hr k (lt_of_le_of_lt (Nat.le_add_right i + _) hiN), + sum_comp] + have hIoc : Finset.Ioc (((i + 2 ^ k : ℕ) : ℤ) - r) ((i + 2 ^ k : ℕ) : ℤ) = + (Finset.Ioc ((i : ℤ) - r) i).map (addRightEmbedding (2 ^ k)) := by + rw [Finset.map_add_right_Ioc] + congr 1 + push_cast + ring + rw [hIoc, Finset.sum_map] + refine Finset.sum_congr rfl fun n hn => ?_ + rw [Finset.mem_Ioc] at hn + rw [addRightEmbedding_apply, mul_comp, C_comp, qiCoeff_add_two_pow hr hg k (by omega), + bsplinePieces_add_two_pow_comp] + +/-! ### The periodic quasi-interpolant -/ + +/-- The pieces of the **periodic quasi-interpolant** of level `k`: the pieces on `[1, 2)` of the +quasi-interpolant on `[0, 2)` (`N = 2^(k+1)`), moved to `[0, 1)`. -/ +noncomputable def perQiPieces {r : ℕ} (hr : 1 ≤ r) (k : ℕ) (g : ℝ → ℂ) (m : ℕ) : ℂ[X] := + (qiPieces hr k (2 ^ (k + 1)) g (m + 2 ^ k)).comp (X + C 1) + +/-- The periodic quasi-interpolant has pieces of degree `< r`. -/ +theorem perQiPieces_mem {r : ℕ} (hr : 1 ≤ r) (k : ℕ) (g : ℝ → ℂ) (m : ℕ) : + perQiPieces hr k g m ∈ degreeLT ℂ r := + comp_X_add_C_mem (qiPieces_mem hr k _ g _) 1 + +/-- The values of the periodic quasi-interpolant: `Q_k^per g(x) = Q_k g(x + 1)`. -/ +theorem polyFun_perQiPieces {r : ℕ} (hr : 1 ≤ r) (k : ℕ) (g : ℝ → ℂ) (m : ℕ) (x : ℝ) : + polyFun (perQiPieces hr k g m) x = + polyFun (qiPieces hr k (2 ^ (k + 1)) g (m + 2 ^ k)) (x + 1) := by + simp only [perQiPieces, polyFun, eval_comp, eval_add, eval_X, eval_C] + push_cast + rfl + +/-- **The periodic quasi-interpolant is a spline on `[0, 1]`**: its joins are those of the +quasi-interpolant at the knots of `[1, 2)`. -/ +theorem splineJoins_perQiPieces {r : ℕ} (hr : 1 ≤ r) (k : ℕ) (g : ℝ → ℂ) : + SplineJoins r k (perQiPieces hr k g) := fun m hm _ => by + obtain ⟨c, hc⟩ := qiPieces_join hr k (2 ^ (k + 1)) g (m := m + 2 ^ k) (by omega) + refine ⟨c, ?_⟩ + rw [perQiPieces, perQiPieces, show m - 1 + 2 ^ k = m + 2 ^ k - 1 by omega, ← sub_comp, hc, + mul_comp, C_comp] + congr 1 + refine Polynomial.funext fun z => ?_ + simp only [eval_comp, eval_pow, eval_sub, eval_add, eval_X, eval_C] + congr 1 + push_cast + field_simp + ring + +/-- **The periodic quasi-interpolant joins across `0 = 1`** for `1`-periodic `g` and `r ≤ 2^k`: +its last piece is the piece of the quasi-interpolant on `[1 - 2^(-k), 1)`, by the periodicity of +the pieces, and its first piece, moved back to `[1, 1 + 2^(-k))`, the piece there. -/ +theorem perJoin_perQiPieces {r : ℕ} (hr : 1 ≤ r) {g : ℝ → ℂ} (hg : Function.Periodic g 1) + {k : ℕ} (hrk : r ≤ 2 ^ k) : PerJoin r k (perQiPieces hr k g) := by + have h1 : 1 ≤ 2 ^ k := Nat.one_le_two_pow + obtain ⟨c, hc⟩ := qiPieces_join hr k (2 ^ (k + 1)) g (m := 2 ^ k) (by positivity) + refine ⟨c, ?_⟩ + have hlast : perQiPieces hr k g (2 ^ k - 1) = qiPieces hr k (2 ^ (k + 1)) g (2 ^ k - 1) := + qiPieces_add_two_pow_comp hr hg (by omega) (by rw [pow_succ]; omega) + have hfirst : (perQiPieces hr k g 0).comp (X - C 1) = qiPieces hr k (2 ^ (k + 1)) g (2 ^ k) := by + rw [perQiPieces, zero_add, comp_assoc, + show (X + C 1 : ℂ[X]).comp (X - C 1) = X by simp, comp_X] + rw [hlast, hfirst, hc] + congr 3 + push_cast + field_simp + +/-! ### Jackson's inequality for continuous periodic functions -/ + +variable {p : ℝ≥0∞} [Fact (1 ≤ p)] + +/-- **Translation of a local norm by one period**: `‖f(· + 1)‖_{L_p(I_{k,m})} = +‖f‖_{L_p(I_{k,m+2^k})}`. -/ +theorem eLpNorm_comp_add_one_dyadicIco {f : ℝ → ℂ} (hf : Measurable f) (p : ℝ≥0∞) (k m : ℕ) : + eLpNorm (fun x => f (x + 1)) p (volume.restrict (dyadicIco k m)) = + eLpNorm f p (volume.restrict (dyadicIco k (m + 2 ^ k))) := by + rw [dyadicIco, dyadicIco, Measure.restrict_congr_set Ico_ae_eq_Icc, + Measure.restrict_congr_set Ico_ae_eq_Icc, eLpNorm_comp_add_Icc hf] + have h2 : (2 : ℝ) ^ k ≠ 0 := by positivity + congr 3 + · push_cast + field_simp + · push_cast + field_simp + ring + +/-- **The windows of the cells of `[0, 2)` lie in `[0, 2]`**: `W_{k,i} ⊆ [0, 2]` for +`i < 2^(k+1)`. -/ +theorem qiWindow_subset_Icc_zero_two {r k i : ℕ} (hi : i < 2 ^ (k + 1)) : + qiWindow r k i ⊆ Icc 0 2 := fun x hx => by + have hpos : (0 : ℝ) < 2 ^ k := by positivity + refine ⟨(by positivity : (0 : ℝ) ≤ ((i + 1 - r : ℕ) : ℝ) / 2 ^ k).trans hx.1, hx.2.trans ?_⟩ + rw [div_le_iff₀ hpos] + have : ((i + 1 : ℕ) : ℝ) ≤ 2 ^ (k + 1) := by exact_mod_cast hi + push_cast at this + rw [pow_succ] at this + linarith + +/-- **The periodic quasi-interpolant is the quasi-interpolant one period to the right**: for +continuous `1`-periodic `G`, the error of `Q_k^per G` on `I_{k,m}` equals the error of the +quasi-interpolant on `[0, 2)` on `I_{k,m+2^k} = I_{k,m} + 1`. -/ +theorem eLpNorm_sub_perQiPieces_eq {r : ℕ} (hr : 1 ≤ r) {G : ℝ → ℂ} (hG : Continuous G) + (hGp : Function.Periodic G 1) (p : ℝ≥0∞) (k m : ℕ) : + eLpNorm (fun x => G x - polyFun (perQiPieces hr k G m) x) p + (volume.restrict (dyadicIco k m)) = + eLpNorm (fun x => G x - polyFun (qiPieces hr k (2 ^ (k + 1)) G (m + 2 ^ k)) x) p + (volume.restrict (dyadicIco k (m + 2 ^ k))) := by + rw [← eLpNorm_comp_add_one_dyadicIco (f := fun x => G x - + polyFun (qiPieces hr k (2 ^ (k + 1)) G (m + 2 ^ k)) x) + (hG.measurable.sub (measurable_polyFun _)) p k m] + congr 1 + funext x + simp only [polyFun_perQiPieces] + rw [hGp x] + +/-- **Jackson's inequality for periodic splines, continuous functions**: there is `C` with +`‖G - Q_k^per G‖_{L_p[0,1]} ≤ C ω_r^per(G, 2^(-k))_p` for every continuous `1`-periodic `G` and +every `k`. -/ +theorem exists_eLpNorm_sub_perQi_le {r : ℕ} (hr : 1 ≤ r) (hp : p ≠ ∞) : + ∃ C : ℝ≥0∞, C ≠ ∞ ∧ ∀ G : ℝ → ℂ, Continuous G → Function.Periodic G 1 → ∀ k : ℕ, + eLpNorm (fun x => G x - ppFun k (perQiPieces hr k G) x) p unitVol ≤ + C * perModulus r p G (1 / 2 ^ k) := by + obtain ⟨A, hA, hAb⟩ := exists_sum_eLpNorm_sub_qiPieces_le_of_taylor (p := p) hr hp + have hp1 : 1 ≤ p := Fact.out + have hp0 : p ≠ 0 := (lt_of_lt_of_le zero_lt_one hp1).ne' + set J := 1 + (r : ℝ≥0∞) ^ r * (2 ^ r * (r : ℝ≥0∞) ^ (2 * r)) + have hJ : J ≠ ∞ := ENNReal.add_ne_top.2 ⟨ENNReal.one_ne_top, ENNReal.mul_ne_top + (ENNReal.pow_ne_top (ENNReal.natCast_ne_top r)) + (ENNReal.mul_ne_top (by simp) (ENNReal.pow_ne_top (ENNReal.natCast_ne_top r)))⟩ + refine ⟨A * J * 3 ^ (1 / p.toReal), ENNReal.mul_ne_top (ENNReal.mul_ne_top hA hJ) + (ENNReal.rpow_ne_top_of_nonneg (by positivity) (by simp)), fun G hG hGp k => ?_⟩ + set ω := modulus r p 0 3 G (1 / 2 ^ k) + have hpos : (0 : ℝ) < 2 ^ k := by positivity + have hL : (0 : ℝ) < 1 / 2 ^ k := by positivity + have hwL : (2 : ℝ) + 1 / 2 ^ k ≤ 3 := by + have : (1 : ℝ) / 2 ^ k ≤ 1 := by + rw [div_le_one hpos] + exact one_le_pow₀ (by norm_num) + linarith + obtain ⟨g, D, hgm, hDm, h1, h2, h3⟩ := exists_left_smoothing hG hr hp1 hp hL hwL + set s := (Finset.range (2 ^ k)).map (addRightEmbedding (2 ^ k)) + have hs : s ⊆ Finset.range (2 ^ (k + 1)) := by + intro i hi + obtain ⟨m, hm, rfl⟩ := Finset.mem_map.1 hi + rw [Finset.mem_range] at hm ⊢ + rw [addRightEmbedding_apply, pow_succ] + omega + have hmain : eLpNorm (fun x => G x - ppFun k (perQiPieces hr k G) x) p unitVol ≤ + A * (J * ω) := by + refine eLpNorm_le_of_lintegral_le ((hG.measurable.sub + (measurable_ppFun _ _)).aestronglyMeasurable) hp0 hp ?_ + calc ∫⁻ x, ‖G x - ppFun k (perQiPieces hr k G) x‖ₑ ^ p.toReal ∂unitVol + ≤ ∑ m ∈ Finset.range (2 ^ k), eLpNorm (fun x => G x - + polyFun (perQiPieces hr k G m) x) p (volume.restrict (dyadicIco k m)) ^ p.toReal := + lintegral_sub_ppFun_le_sum hp hG.measurable k _ + _ = ∑ i ∈ s, eLpNorm (fun x => G x - polyFun (qiPieces hr k (2 ^ (k + 1)) G i) x) p + (volume.restrict (dyadicIco k i)) ^ p.toReal := by + rw [Finset.sum_map] + exact Finset.sum_congr rfl fun m _ => + congrArg (· ^ p.toReal) (eLpNorm_sub_perQiPieces_eq hr hG hGp p k m) + _ ≤ (A * (eLpNorm (fun x => G x - g x) p (volume.restrict (Icc 0 2)) + + ENNReal.ofReal ((r : ℝ) / 2 ^ k) ^ r * eLpNorm D p (volume.restrict (Icc 0 2)))) ^ + p.toReal := + hAb hs (fun i hi => qiWindow_subset_Icc_zero_two (Finset.mem_range.1 (hs hi))) + hG.measurable (fun m _ => integrableOn_dyadicIco_of_continuous hG k m) hgm hDm h3 + _ ≤ (A * (J * ω)) ^ p.toReal := by + gcongr + exact add_ofReal_div_pow_mul_le r k h1 h2 + have hω : ω ≤ 3 ^ (1 / p.toReal) * perModulus r p G (1 / 2 ^ k) := by + have h := modulus_perExt_le hG.measurable hp0 hp r 3 (1 / 2 ^ k) + rw [perExt_eq_of_periodic hGp] at h + simp only [Nat.cast_ofNat] at h + exact h + calc eLpNorm (fun x => G x - ppFun k (perQiPieces hr k G) x) p unitVol + ≤ A * (J * ω) := hmain + _ ≤ A * (J * (3 ^ (1 / p.toReal) * perModulus r p G (1 / 2 ^ k))) := by gcongr + _ = _ := by ring + +/-! ### Density of the continuous periodic functions -/ + +/-- A continuous **cut-off** vanishing at `0` and `1`, `φ_δ(x) = min(1, max(0, min(x, 1 - x)/δ))`, +with values in `[0, 1]` and equal to `1` on `[δ, 1 - δ]`. -/ +noncomputable def cutoff (δ x : ℝ) : ℝ := min 1 (max 0 (min x (1 - x) / δ)) + +/-- The cut-off is continuous. -/ +theorem continuous_cutoff (δ : ℝ) : Continuous (cutoff δ) := + continuous_const.min (continuous_const.max + ((continuous_id.min (continuous_const.sub continuous_id)).div_const δ)) + +/-- The cut-off vanishes at `0`. -/ +theorem cutoff_zero (δ : ℝ) : cutoff δ 0 = 0 := by simp [cutoff] + +/-- The cut-off vanishes at `1`. -/ +theorem cutoff_one (δ : ℝ) : cutoff δ 1 = 0 := by simp [cutoff] + +/-- The cut-off is nonnegative. -/ +theorem cutoff_nonneg (δ x : ℝ) : 0 ≤ cutoff δ x := le_min zero_le_one (le_max_left _ _) + +/-- The cut-off is at most `1`. -/ +theorem cutoff_le_one (δ x : ℝ) : cutoff δ x ≤ 1 := min_le_left _ _ + +/-- The cut-off is `1` on `[δ, 1 - δ]`. -/ +theorem cutoff_eq_one {δ x : ℝ} (hδ : 0 < δ) (h1 : δ ≤ x) (h2 : x ≤ 1 - δ) : cutoff δ x = 1 := by + have h : 1 ≤ min x (1 - x) / δ := by + rw [le_div_iff₀ hδ, one_mul] + exact le_min h1 (by linarith) + exact min_eq_left (h.trans (le_max_right _ _)) + +/-- **Continuous periodic functions are dense in `L_p[0, 1]`**, `p < ∞`: for a bounded continuous +`G` (dense by Mathlib's `BoundedContinuousFunction.toLp_denseRange`), the cut-off `φ_δ G` vanishes +at `0` and `1` and so extends to a continuous periodic function (`ContinuousOn.comp_fract''`), and +`‖G - φ_δ G‖_p ≤ ‖‖G‖_∞ 1_{[0, δ] ∪ [1 - δ, 1]}‖_p`, which is small for small `δ` +(`MeasureTheory.exists_eLpNorm_indicator_le`). -/ +theorem dense_periodic (hp : p ≠ ∞) : + Dense {f : Lp ℂ p unitVol | ∃ G : ℝ → ℂ, Continuous G ∧ Function.Periodic G 1 ∧ + (f : ℝ → ℂ) =ᵐ[unitVol] G} := by + refine Metric.dense_iff.2 fun f ε hε => ?_ + obtain ⟨G, hG⟩ := Metric.denseRange_iff.1 + (BoundedContinuousFunction.toLp_denseRange ℂ unitVol ℝ hp) f (ε / 2) (by positivity) + obtain ⟨η, hη0, hη⟩ := exists_eLpNorm_indicator_le (μ := unitVol) hp (‖G‖ : ℝ) + (ε := ENNReal.ofReal (ε / 4)) (ENNReal.ofReal_pos.2 (by positivity)).ne' + set δ : ℝ := min ((η : ℝ) / 2) (1 / 2) + have hδ : 0 < δ := lt_min (by positivity) (by norm_num) + set F : ℝ → ℂ := fun x => (cutoff δ x : ℂ) * G x + have hFc : Continuous F := + (Complex.continuous_ofReal.comp (continuous_cutoff δ)).mul G.continuous + set Gp : ℝ → ℂ := F ∘ Int.fract + have hGpc : Continuous Gp := + ContinuousOn.comp_fract'' hFc.continuousOn (by simp [F, cutoff_zero, cutoff_one]) + have hGpp : Function.Periodic Gp 1 := fun x => by simp [Gp, Int.fract_add_one] + have hbound : ∀ x, ‖Gp x‖ ≤ ‖G‖ := fun x => by + simp only [Gp, F, Function.comp, norm_mul, Complex.norm_real, Real.norm_eq_abs, + abs_of_nonneg (cutoff_nonneg _ _)] + exact (mul_le_of_le_one_left (norm_nonneg _) (cutoff_le_one _ _)).trans + (G.norm_coe_le_norm _) + have hmem : MemLp Gp p unitVol := + MemLp.of_bound hGpc.aestronglyMeasurable ‖G‖ (Filter.Eventually.of_forall hbound) + refine ⟨hmem.toLp Gp, ?_, ⟨Gp, hGpc, hGpp, hmem.coeFn_toLp⟩⟩ + -- the cut-off changes `G` only near `0` and `1` + set S : Set ℝ := Icc (0 : ℝ) δ ∪ Icc (1 - δ) 1 + have hS : MeasurableSet S := measurableSet_Icc.union measurableSet_Icc + have hSμ : unitVol S ≤ η := by + calc unitVol S ≤ volume S := Measure.restrict_apply_le _ _ + _ ≤ volume (Icc (0 : ℝ) δ) + volume (Icc (1 - δ) 1) := measure_union_le _ _ + _ = ENNReal.ofReal (2 * δ) := by + rw [Real.volume_Icc, Real.volume_Icc, ← ENNReal.ofReal_add (by linarith) + (by linarith)] + congr 1 + ring + _ ≤ η := by + rw [← ENNReal.ofReal_coe_nnreal] + exact ENNReal.ofReal_le_ofReal (by linarith [min_le_left ((η : ℝ) / 2) (1 / 2)]) + have hpt : ∀ᵐ x ∂unitVol, ‖(G : ℝ → ℂ) x - Gp x‖ ≤ ‖S.indicator (fun _ => ‖G‖) x‖ := by + filter_upwards [ae_mem_Ico_unitVol] with x hx + have hsub : (G : ℝ → ℂ) x - Gp x = ((1 - cutoff δ x : ℝ) : ℂ) * G x := by + simp only [Gp, F, Function.comp, Int.fract_eq_self.2 hx] + push_cast + ring + rw [hsub, norm_mul, Complex.norm_real, Real.norm_eq_abs, + abs_of_nonneg (by linarith [cutoff_le_one δ x])] + by_cases hxS : x ∈ S + · rw [indicator_of_mem hxS, norm_norm] + calc (1 - cutoff δ x) * ‖G x‖ ≤ 1 * ‖G‖ := + mul_le_mul (by linarith [cutoff_nonneg δ x]) (G.norm_coe_le_norm x) (norm_nonneg _) + zero_le_one + _ = ‖G‖ := one_mul _ + · have h1 : δ < x := by + by_contra h + exact hxS (Or.inl ⟨hx.1, not_lt.1 h⟩) + have h2 : x < 1 - δ := by + by_contra h + exact hxS (Or.inr ⟨not_lt.1 h, hx.2.le⟩) + rw [cutoff_eq_one hδ h1.le h2.le, sub_self, zero_mul] + exact norm_nonneg _ + have hdist : dist (BoundedContinuousFunction.toLp (E := ℂ) p unitVol ℝ G) (hmem.toLp Gp) ≤ + ε / 4 := by + rw [Lp.dist_def] + refine ENNReal.toReal_le_of_le_ofReal (by positivity) ?_ + rw [eLpNorm_congr_ae ((BoundedContinuousFunction.coeFn_toLp (E := ℂ) p unitVol ℝ G).sub + hmem.coeFn_toLp)] + exact (eLpNorm_mono_ae (G.continuous.sub hGpc).aestronglyMeasurable hpt).trans + (hη S hSμ hS.nullMeasurableSet) + rw [Metric.mem_ball] + calc dist (hmem.toLp Gp) f + ≤ dist (hmem.toLp Gp) (BoundedContinuousFunction.toLp (E := ℂ) p unitVol ℝ G) + + dist (BoundedContinuousFunction.toLp (E := ℂ) p unitVol ℝ G) f := dist_triangle _ _ _ + _ < ε / 4 + ε / 2 := by + rw [dist_comm (hmem.toLp Gp), dist_comm _ f] + exact add_lt_add_of_le_of_lt hdist hG + _ ≤ ε := by linarith + +/-! ### Jackson's inequality in `L_p` and the coincidence theorem -/ + +/-- **Jackson's inequality for periodic splines**: for `1 ≤ p < ∞` and `r ≥ 1` there is `C_J` +with `E_{2^k}(f)_p ≤ C_J ω_r^per(f, 2^(-k))_p` for all `f ∈ L_p(𝕋)` and all `k ≥ r`; the levels +`k ≥ r` have `r ≤ 2^k`, so that the periodic quasi-interpolant is a periodic spline. General `f` +follow by density of the continuous periodic functions +(`ApproximationScheme.approxError_le_of_dense`). -/ +theorem exists_approxError_perSplineScheme_le {r : ℕ} (hr : 1 ≤ r) (hp : p ≠ ∞) : + ∃ CJ : ℝ≥0∞, CJ ≠ ∞ ∧ ∀ (f : Lp ℂ p unitVol) (k : ℕ), r ≤ k → + (perSplineScheme p r).approxError f (2 ^ k) ≤ CJ * lpPerModulus p r f k := by + obtain ⟨C, hC, hCb⟩ := exists_eLpNorm_sub_perQi_le hr hp + refine ⟨C, hC, fun f k hk => ?_⟩ + have hrk : r ≤ 2 ^ k := hk.trans Nat.lt_two_pow_self.le + refine ApproximationScheme.approxError_le_of_dense (dense_periodic hp) + (fun f g => lpPerModulus_add_le r f g k) (C0 := 2 ^ r) (by simp) + (fun f => lpPerModulus_le hp r f k) hC ?_ f + rintro g ⟨G, hGc, hGp, hgG⟩ + have ha : (memLp_ppFun k (perQiPieces hr k G) p).toLp _ ∈ perSplineScheme p r (2 ^ k) := + mem_perSplineScheme_two_pow.2 ⟨perQiPieces hr k G, perQiPieces_mem hr k G, + splineJoins_perQiPieces hr k G, perJoin_perQiPieces hr hGp hrk, MemLp.coeFn_toLp _⟩ + refine (ApproximationScheme.approxError_le_of_mem ha g).trans ?_ + rw [Lp.eNorm_def, eLpNorm_congr_ae ((Lp.coeFn_sub _ _).trans (hgG.sub (MemLp.coeFn_toLp _))), + lpPerModulus, perModulus_congr_ae hgG] + exact hCb G hGc hGp k + +/-- The periodic modulus `ω_r^per(f, 2^(-k))_p` is compatible with the scheme of periodic dyadic +splines of order `r`, with inverse order `θ = r - 1 + 1/p` and Jackson's inequality from level `r` +on. -/ +noncomputable def perSplineModulusData {r : ℕ} (hr : 1 ≤ r) (hp : p ≠ ∞) : + ApproximationScheme.ModulusData (perSplineScheme p r) (((r - 1 : ℕ) : ℝ) + 1 / p.toReal) := + .ofExists (lpPerModulus p r) (lpPerModulus_add_le r) (2 ^ r) (by simp) (lpPerModulus_le hp r) r + (exists_approxError_perSplineScheme_le hr hp) (exists_inverse_perSplineScheme hp) + +/-- **Approximation by periodic dyadic splines.** For `1 ≤ p < ∞`, `1 ≤ q ≤ ∞`, `r ≥ 1` and +`0 ≤ s < r - 1 + 1/p`, an `f ∈ L_p(𝕋) = L_p[0, 1]` lies in the approximation space `A^s_q` of the +periodic splines of order `r` on dyadic partitions iff its periodic Besov quasi-norm +`‖f‖_p + ‖(2^(ks) ω_r^per(f, 2^(-k))_p)_k‖_{ℓ_q}` is finite. -/ +theorem memApprox_perSplineScheme_iff {r : ℕ} (hr : 1 ≤ r) (hp : p ≠ ∞) {s : ℝ} {q : ℝ≥0∞} + (hq : 1 ≤ q) (hs : 0 ≤ s) (hsr : s < (r : ℝ) - 1 + 1 / p.toReal) (f : Lp ℂ p unitVol) : + (perSplineScheme p r).MemApprox s q f ↔ + ‖f‖ₑ + ENNReal.lqNorm q (fun k => dyadicWeight s k * lpPerModulus p r f k) < ∞ := by + have hθ : (r : ℝ) - 1 + 1 / p.toReal = ((r - 1 : ℕ) : ℝ) + 1 / p.toReal := by + rw [Nat.cast_sub hr, Nat.cast_one] + exact (perSplineModulusData hr hp).memApprox_iff_modNorm_lt_top hq hs (hθ ▸ hsr) f + +end Interval diff --git a/LeanPool/FunctionSpaces/Domains/Interval/Splines.lean b/LeanPool/FunctionSpaces/Domains/Interval/Splines.lean new file mode 100644 index 0000000000..c2e751583f --- /dev/null +++ b/LeanPool/FunctionSpaces/Domains/Interval/Splines.lean @@ -0,0 +1,392 @@ +/- +Copyright (c) 2026 Mario Ullrich. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Mario Ullrich +-/ +module + +public import LeanPool.FunctionSpaces.Domains.Interval.PiecewisePoly +public import LeanPool.FunctionSpaces.Domains.Interval.BSpline +public import Mathlib.Algebra.Polynomial.FieldDivision + +/- +Modified for Lean Pool: module names and imports adapted. +-/ + +/-! +# Dyadic splines on `[0, 1]` + +A **spline of order `r`** on the dyadic grid of level `k` is a piecewise polynomial of degree +`< r` on the intervals `I_{k,n}` whose consecutive pieces differ by a multiple of `(x - ξ)^(r-1)` +at every interior knot `ξ = n 2^(-k)` (`Interval.SplineJoins`). For polynomials of degree `< r` +this is the same as agreeing to order `r - 2` at `ξ` (`Interval.exists_eq_C_mul_pow_iff`), so the +splines of order `r` are the `C^(r-2)` piecewise polynomials; for `r = 1` they are the step +functions, for `r = 2` the continuous piecewise linear functions. The jump form is what the inverse +inequality uses: across a knot a spline is a polynomial plus `c (x - ξ)_+^(r-1)`. + +The classes of splines in `L_p[0, 1]` form subspaces `S_k` increasing in `k` +(`Interval.splineSpace`), and the scheme `Interval.splineScheme` (an +`ApproximationScheme.ofMonotoneSubmodules`) has them as approximants of complexity `2^k`. The +B-splines `N_r(2^k x - n)` (`Interval.bsplinePieces`) have spline joins +(`Interval.splineJoins_bsplinePieces`), so their combinations are splines. Conversely, the pieces +`Q_j` of a spline with `n ≤ j < n + r` have the same B-spline coefficient `c_n` in the coordinate +`2^k x` (`Interval.bsplineCoef_comp_eq_of_splineJoins`), which makes the quasi-interpolant a +projection onto the splines (`Interval.ppFun_qiPieces_ppFun`). +-/ + +@[expose] public section + +open MeasureTheory Set Polynomial +open scoped ENNReal + +namespace Interval + +/-- **Splines in jump form are `C^(r-2)`**: a polynomial `P` of degree `< r` is a multiple of +`(X - ξ)^(r-1)` iff `P` and its derivatives up to order `r - 2` vanish at `ξ`. The vanishing +derivatives give the root multiplicity `≥ r - 1` +(`Polynomial.lt_rootMultiplicity_of_isRoot_iterate_derivative`), hence divisibility +(`Polynomial.le_rootMultiplicity_iff`), and a monic divisor of the same degree leaves only the +leading coefficient (`Polynomial.eq_leadingCoeff_mul_of_monic_of_dvd_of_natDegree_le`). -/ +theorem exists_eq_C_mul_pow_iff {r : ℕ} (hr : 1 ≤ r) {P : ℂ[X]} (hP : P ∈ degreeLT ℂ r) + (ξ : ℂ) : + (∃ c, P = C c * (X - C ξ) ^ (r - 1)) ↔ ∀ i < r - 1, (derivative^[i] P).eval ξ = 0 := by + constructor + · rintro ⟨c, rfl⟩ i hi + rw [iterate_derivative_C_mul, iterate_derivative_X_sub_pow] + simp [Nat.sub_ne_zero_of_lt hi] + · intro h + rcases eq_or_ne P 0 with rfl | hP0 + · exact ⟨0, by simp⟩ + have hmult : r - 1 ≤ P.rootMultiplicity ξ := by + rcases Nat.lt_or_ge r 2 with hr2 | hr2 + · omega + · have : r - 2 < P.rootMultiplicity ξ := + lt_rootMultiplicity_of_isRoot_iterate_derivative hP0 fun m hm => h m (by omega) + omega + have hdeg : P.natDegree ≤ ((X - C ξ) ^ (r - 1)).natDegree := by + rw [natDegree_pow, natDegree_X_sub_C, mul_one] + have := (natDegree_lt_iff_degree_lt hP0).2 (mem_degreeLT.1 hP) + omega + exact ⟨P.leadingCoeff, eq_leadingCoeff_mul_of_monic_of_dvd_of_natDegree_le + ((monic_X_sub_C ξ).pow _) ((le_rootMultiplicity_iff hP0).1 hmult) hdeg⟩ + +/-- The pieces `Q` have **spline joins of order `r`** at the interior knots of level `k`: at +`ξ = n 2^(-k)`, `0 < n < 2^k`, consecutive pieces differ by a multiple of `(x - ξ)^(r-1)`. -/ +def SplineJoins (r k : ℕ) (Q : ℕ → ℂ[X]) : Prop := + ∀ n, 0 < n → n < 2 ^ k → ∃ c : ℂ, + Q n - Q (n - 1) = C c * (X - C ((((n : ℝ) / 2 ^ k : ℝ)) : ℂ)) ^ (r - 1) + +/-- The pieces `P` have **spline joins of order `r` below `N`** at the knots of level `k`: at +`ξ = n 2^(-k)`, `0 < n < N`, consecutive pieces differ by a multiple of `(x - ξ)^(r-1)`. With +`N = 2^k` these are the interior knots of `[0, 1]`; larger `N` describe splines on +`[0, N 2^(-k))`, such as periodic extensions. -/ +def SplineJoinsBelow (r k N : ℕ) (P : ℕ → ℂ[X]) : Prop := + ∀ n, 0 < n → n < N → ∃ c : ℂ, + P n - P (n - 1) = C c * (X - C ((((n : ℝ) / 2 ^ k : ℝ)) : ℂ)) ^ (r - 1) + +/-- Spline joins at the interior knots of `[0, 1]` are spline joins below `2^k`. -/ +theorem SplineJoins.below {r k : ℕ} {Q : ℕ → ℂ[X]} (h : SplineJoins r k Q) : + SplineJoinsBelow r k (2 ^ k) Q := h + +/-- The zero pieces have spline joins. -/ +theorem splineJoins_zero (r k : ℕ) : SplineJoins r k 0 := fun _ _ _ => ⟨0, by simp⟩ + +/-- Spline joins are preserved by sums. -/ +theorem SplineJoins.add {r k : ℕ} {Q Q' : ℕ → ℂ[X]} (h : SplineJoins r k Q) + (h' : SplineJoins r k Q') : SplineJoins r k (Q + Q') := fun n hn hnk => by + obtain ⟨c, hc⟩ := h n hn hnk + obtain ⟨c', hc'⟩ := h' n hn hnk + refine ⟨c + c', ?_⟩ + simp only [Pi.add_apply] + rw [show Q n + Q' n - (Q (n - 1) + Q' (n - 1)) = (Q n - Q (n - 1)) + (Q' n - Q' (n - 1)) by + ring, hc, hc', C_add] + ring + +/-- Spline joins are preserved by constant multiples. -/ +theorem SplineJoins.const_mul {r k : ℕ} {Q : ℕ → ℂ[X]} (h : SplineJoins r k Q) (a : ℂ) : + SplineJoins r k (fun n => C a * Q n) := fun n hn hnk => by + obtain ⟨c, hc⟩ := h n hn hnk + refine ⟨a * c, ?_⟩ + rw [← mul_sub, hc, C_mul] + ring + +/-- Spline joins are preserved by finite sums. -/ +theorem SplineJoins.sum {r k : ℕ} {ι : Type*} (s : Finset ι) {Q : ι → ℕ → ℂ[X]} + (h : ∀ i ∈ s, SplineJoins r k (Q i)) : SplineJoins r k (∑ i ∈ s, Q i) := by + classical + induction s using Finset.induction_on with + | empty => simpa using splineJoins_zero r k + | insert i s hi ih => + rw [Finset.sum_insert hi] + exact (h i (Finset.mem_insert_self i s)).add (ih fun j hj => h j (Finset.mem_insert_of_mem hj)) + +/-- Spline joins of level `k` are spline joins of level `k + 1`: the new knots lie inside the +pieces, where the jump is `0`. -/ +theorem SplineJoins.refine {r k : ℕ} {Q : ℕ → ℂ[X]} (h : SplineJoins r k Q) : + SplineJoins r (k + 1) (fun m => Q (m / 2)) := fun m hm hmk => by + rcases Nat.even_or_odd' m with ⟨n, rfl | rfl⟩ + · have hn : 0 < n := by omega + have hnk : n < 2 ^ k := by rw [pow_succ] at hmk; omega + obtain ⟨c, hc⟩ := h n hn hnk + refine ⟨c, ?_⟩ + simp only + rw [show 2 * n / 2 = n by omega, show (2 * n - 1) / 2 = n - 1 by omega, hc] + congr 4 + push_cast + rw [pow_succ] + field_simp + · refine ⟨0, ?_⟩ + simp only + rw [show (2 * n + 1) / 2 = n by omega, show (2 * n + 1 - 1) / 2 = n by omega] + simp + +/-- The jumps in the coordinate `y = 2^k x`: `(x - m 2^(-k))^(r-1)` becomes +`2^(-k(r-1)) (y - m)^(r-1)`. -/ +theorem X_sub_C_pow_comp_scale (r k m : ℕ) : + ((X - C ((((m : ℝ) / 2 ^ k : ℝ)) : ℂ)) ^ (r - 1)).comp + (C (((0 : ℝ) : ℝ) : ℂ) + C (((1 / 2 ^ k : ℝ) : ℝ) : ℂ) * X) = + C ((((1 / 2 ^ k : ℝ) : ℝ) : ℂ) ^ (r - 1)) * (X - C (((m : ℤ) : ℂ))) ^ (r - 1) := by + rw [pow_comp, sub_comp, X_comp, C_comp, C_pow, ← mul_pow] + congr 1 + have hm : ((((m : ℝ) / 2 ^ k : ℝ)) : ℂ) = (((1 / 2 ^ k : ℝ) : ℝ) : ℂ) * ((m : ℤ) : ℂ) := by + push_cast + ring + rw [hm, C_mul, Complex.ofReal_zero, C_0, zero_add] + ring + +/-- **The B-spline coefficients of the pieces of a spline agree near the knots**: in the +coordinate `y = 2^k x` consecutive pieces differ by multiples of `(y - m)^(r-1)`, whose +coefficient `c_n` vanishes for `n < m < n + r` (`Interval.bsplineCoef_X_sub_C_pow`). So all pieces +`Q_j`, `n ≤ j < n + r`, have the same coefficient `c_n`. -/ +theorem bsplineCoef_comp_eq_of_splineJoins {r k : ℕ} (hr : 1 ≤ r) {Q : ℕ → ℂ[X]} + (hQ : ∀ m, Q m ∈ degreeLT ℂ r) (hJ : SplineJoins r k Q) {n : ℤ} {j i : ℕ} (hji : j ≤ i) + (hi : i < 2 ^ k) (hnj : n ≤ j) (hin : (i : ℤ) < n + r) : + bsplineCoef hr ((Q i).comp (C (((0 : ℝ) : ℝ) : ℂ) + C (((1 / 2 ^ k : ℝ) : ℝ) : ℂ) * X)) n = + bsplineCoef hr ((Q j).comp (C (((0 : ℝ) : ℝ) : ℂ) + C (((1 / 2 ^ k : ℝ) : ℝ) : ℂ) * X)) + n := by + induction i, hji using Nat.le_induction with + | base => rfl + | succ i hji ih => + obtain ⟨c, hc⟩ := hJ (i + 1) (Nat.succ_pos i) hi + rw [Nat.add_sub_cancel] at hc + have hpow : (X - C ((((i + 1 : ℕ) : ℤ) : ℂ))) ^ (r - 1) ∈ degreeLT ℂ r := + pow_mem_degreeLT hr (natDegree_X_sub_C_le _) + have hstep : (Q (i + 1)).comp (C (((0 : ℝ) : ℝ) : ℂ) + C (((1 / 2 ^ k : ℝ) : ℝ) : ℂ) * X) = + (Q i).comp (C (((0 : ℝ) : ℝ) : ℂ) + C (((1 / 2 ^ k : ℝ) : ℝ) : ℂ) * X) + + C (c * (((1 / 2 ^ k : ℝ) : ℝ) : ℂ) ^ (r - 1)) * + (X - C ((((i + 1 : ℕ) : ℤ) : ℂ))) ^ (r - 1) := by + rw [show Q (i + 1) = Q i + (Q (i + 1) - Q i) by ring, hc, add_comp, mul_comp, C_comp, + X_sub_C_pow_comp_scale, ← mul_assoc, ← C_mul] + rw [hstep, bsplineCoef_add hr (comp_affine_mem_degreeLT (hQ i) _ _) + (by rw [← smul_eq_C_mul]; exact Submodule.smul_mem _ _ hpow), + bsplineCoef_C_mul hr _ hpow, bsplineCoef_X_sub_C_pow hr (by push_cast; omega) hin, + mul_zero, add_zero] + exact ih (by omega) (by omega) + +variable {p : ℝ≥0∞} [Fact (1 ≤ p)] + +variable (p) in +/-- The space `S_k` of **splines of order `r`** on the dyadic grid of level `k` in `L_p[0, 1]`: +the classes of piecewise polynomials of level `k` and degree `< r` with spline joins. -/ +noncomputable def splineSpace (r k : ℕ) : Submodule ℝ (Lp ℂ p unitVol) where + carrier := {g | ∃ Q : ℕ → ℂ[X], (∀ n, Q n ∈ degreeLT ℂ r) ∧ SplineJoins r k Q ∧ + (g : ℝ → ℂ) =ᵐ[unitVol] ppFun k Q} + add_mem' := by + rintro g g' ⟨Q, hQ, hj, hg⟩ ⟨Q', hQ', hj', hg'⟩ + refine ⟨Q + Q', fun n => Submodule.add_mem _ (hQ n) (hQ' n), hj.add hj', ?_⟩ + filter_upwards [Lp.coeFn_add g g', hg, hg'] with x h1 h2 h3 + rw [h1, Pi.add_apply, h2, h3, ppFun_add, Pi.add_apply] + zero_mem' := ⟨0, fun n => Submodule.zero_mem _, splineJoins_zero r k, by + filter_upwards [Lp.coeFn_zero ℂ p unitVol] with x hx + rw [hx, ppFun_zero]⟩ + smul_mem' := by + rintro c g ⟨Q, hQ, hj, hg⟩ + refine ⟨fun n => C (c : ℂ) * Q n, fun n => ?_, hj.const_mul _, ?_⟩ + · change C (c : ℂ) * Q n ∈ degreeLT ℂ r + rw [← smul_eq_C_mul]; exact Submodule.smul_mem _ _ (hQ n) + · filter_upwards [Lp.coeFn_smul c g, hg] with x h1 h2 + rw [h1, Pi.smul_apply, h2, ppFun_const_mul, Complex.real_smul] + +omit [Fact (1 ≤ p)] in +/-- Splines are piecewise polynomials. -/ +theorem splineSpace_le_ppSpace (r k : ℕ) : splineSpace p r k ≤ ppSpace p r k := + fun _ ⟨Q, hQ, _, hg⟩ => ⟨Q, hQ, hg⟩ + +omit [Fact (1 ≤ p)] in +/-- **At level `0` the splines are the polynomials of degree `< r`**: there are no interior +knots. -/ +theorem splineSpace_zero (r : ℕ) : splineSpace p r 0 = ppSpace p r 0 := + le_antisymm (splineSpace_le_ppSpace r 0) fun _ ⟨Q, hQ, hg⟩ => + ⟨Q, hQ, fun n hn hn1 => by rw [pow_zero] at hn1; exact absurd hn1 (by omega), hg⟩ + +omit [Fact (1 ≤ p)] in +/-- The spline spaces increase with the level. -/ +theorem splineSpace_mono (r : ℕ) : Monotone (splineSpace p r) := by + refine monotone_nat_of_le_succ fun k g hg => ?_ + obtain ⟨Q, hQ, hj, hgQ⟩ := hg + exact ⟨fun n => Q (n / 2), fun n => hQ _, hj.refine, hgQ.trans (ppFun_refine k Q).symm⟩ + +variable (p) in +/-- The **scheme of dyadic splines** of order `r` in `L_p[0, 1]`: `{0}` at complexity `0` and +`S_{⌊log₂ n⌋}` at complexity `n ≥ 1`. -/ +noncomputable def splineScheme (r : ℕ) : ApproximationScheme (Lp ℂ p unitVol) := + ApproximationScheme.ofMonotoneSubmodules (splineSpace p r) (splineSpace_mono r) + +/-- The approximants of complexity `0` are `{0}`. -/ +theorem mem_splineScheme_zero {r : ℕ} {g : Lp ℂ p unitVol} : g ∈ splineScheme p r 0 ↔ g = 0 := + ApproximationScheme.mem_ofMonotoneSubmodules_zero + +/-- The approximants of complexity `n ≥ 1` are the splines of level `⌊log₂ n⌋`. -/ +theorem mem_splineScheme {r n : ℕ} (hn : n ≠ 0) {g : Lp ℂ p unitVol} : + g ∈ splineScheme p r n ↔ g ∈ splineSpace p r (Nat.log 2 n) := + ApproximationScheme.mem_ofMonotoneSubmodules hn + +/-- The approximants of complexity `2^k` are the splines of level `k`. -/ +theorem mem_splineScheme_two_pow {r k : ℕ} {g : Lp ℂ p unitVol} : + g ∈ splineScheme p r (2 ^ k) ↔ g ∈ splineSpace p r k := + ApproximationScheme.mem_ofMonotoneSubmodules_two_pow + +/-- The spline scheme is linear. -/ +theorem splineScheme_isLinear (r : ℕ) : (splineScheme p r).IsLinear := + ApproximationScheme.isLinear_ofMonotoneSubmodules _ _ + +/-! ### B-splines on the dyadic grid -/ + +/-- The pieces of the B-spline `N_r(2^k x - n)` on the dyadic intervals `I_{k,m}`: +`B_{m-n}(2^k x - n)` for `0 ≤ m - n ≤ r`, and `0` otherwise. -/ +noncomputable def bsplinePieces (r k : ℕ) (n : ℤ) (m : ℕ) : ℂ[X] := + if 0 ≤ (m : ℤ) - n ∧ (m : ℤ) - n ≤ r then + (bsplinePiece r ((m : ℤ) - n).toNat).comp + (C ((-(n : ℝ) : ℝ) : ℂ) + C (((2 : ℝ) ^ k : ℝ) : ℂ) * X) + else 0 + +/-- The B-spline pieces have degree `< r`. -/ +theorem bsplinePieces_mem {r : ℕ} (hr : 1 ≤ r) (k : ℕ) (n : ℤ) (m : ℕ) : + bsplinePieces r k n m ∈ degreeLT ℂ r := by + unfold bsplinePieces + split_ifs + · exact comp_affine_mem_degreeLT (bsplinePiece_mem hr _) _ _ + · exact Submodule.zero_mem _ + +/-- The affine change of variables of the powers: +`(2^k x - n - d)^(r-1) = 2^(k(r-1)) (x - (n + d) 2^(-k))^(r-1)`. -/ +theorem X_sub_C_pow_comp_affine (r k : ℕ) (n : ℝ) (d : ℂ) : + ((X - C d) ^ (r - 1)).comp (C ((-n : ℝ) : ℂ) + C (((2 : ℝ) ^ k : ℝ) : ℂ) * X) = + C ((((2 : ℝ) ^ k : ℝ) : ℂ) ^ (r - 1)) * + (X - C (((n : ℂ) + d) / (((2 : ℝ) ^ k : ℝ) : ℂ))) ^ (r - 1) := by + have h2 : ((((2 : ℝ) ^ k : ℝ)) : ℂ) ≠ 0 := by + rw [Complex.ofReal_ne_zero]; positivity + rw [pow_comp, sub_comp, X_comp, C_comp, C_pow, ← mul_pow] + congr 1 + rw [mul_sub, ← C_mul, mul_div_cancel₀ _ h2, C_add, Complex.ofReal_neg, C_neg] + ring + +/-- **The B-splines have spline joins at every knot**: at the knot `m 2^(-k)`, `m ≥ 1`, the pieces +of `N_r(2^k x - n)` jump by `(-1)^d C(r, d)/(r-1)! 2^(k(r-1)) (x - m 2^(-k))^(r-1)`, `d = m - n`. -/ +theorem bsplinePieces_join {r : ℕ} (hr : 1 ≤ r) (k : ℕ) (n : ℤ) {m : ℕ} (hm : 0 < m) : + ∃ c : ℂ, bsplinePieces r k n m - bsplinePieces r k n (m - 1) = + C c * (X - C ((((m : ℝ) / 2 ^ k : ℝ)) : ℂ)) ^ (r - 1) := by + have hm1 : ((m - 1 : ℕ) : ℤ) = (m : ℤ) - 1 := by rw [Nat.cast_sub hm]; rfl + have hknot : ∀ e : ℕ, (m : ℤ) - n = e → + ((n : ℝ) : ℂ) + (e : ℂ) = (((m : ℝ)) : ℂ) := fun e he => by + have : ((n : ℤ) : ℝ) + (e : ℝ) = (m : ℝ) := by + have := congrArg (fun z : ℤ => (z : ℝ)) he + push_cast at this + linarith + exact_mod_cast this + have hcast : (((m : ℝ)) : ℂ) / (((2 : ℝ) ^ k : ℝ) : ℂ) = (((m : ℝ) / 2 ^ k : ℝ) : ℂ) := by + push_cast; ring + rcases lt_or_ge ((m : ℤ) - n) 0 with hd | hd + · -- both pieces vanish + refine ⟨0, ?_⟩ + simp only [bsplinePieces, hm1, not_le.2 hd, false_and, ↓reduceIte, + show ¬ (0 ≤ (m : ℤ) - 1 - n) by omega, sub_zero, C_0, zero_mul] + rcases lt_or_ge (r : ℤ) ((m : ℤ) - n) with hdr | hdr + · -- right of the support: both pieces vanish (the second one is `B_r = 0`) + refine ⟨0, ?_⟩ + have h1 : bsplinePieces r k n m = 0 := by + simp only [bsplinePieces, not_le.2 hdr, and_false, ↓reduceIte] + have h2 : bsplinePieces r k n (m - 1) = 0 := by + unfold bsplinePieces + rw [hm1] + split_ifs with h + · rw [show ((m : ℤ) - 1 - n).toNat = r by omega, bsplinePiece_top hr, zero_comp] + · rfl + rw [h1, h2, sub_zero, C_0, zero_mul] + obtain ⟨e, he⟩ : ∃ e : ℕ, (m : ℤ) - n = e := ⟨((m : ℤ) - n).toNat, (Int.toNat_of_nonneg hd).symm⟩ + have hpm : bsplinePieces r k n m = (bsplinePiece r e).comp + (C ((-(n : ℝ) : ℝ) : ℂ) + C (((2 : ℝ) ^ k : ℝ) : ℂ) * X) := by + unfold bsplinePieces + simp only [show 0 ≤ (m : ℤ) - n ∧ (m : ℤ) - n ≤ r from ⟨hd, hdr⟩, and_self, ↓reduceIte] + rw [he, Int.toNat_natCast] + rcases Nat.eq_zero_or_pos e with he0 | he0 + · -- `m = n`: the first piece starts + subst he0 + refine ⟨bsplineCoeff r 0 * ((((2 : ℝ) ^ k : ℝ) : ℂ)) ^ (r - 1), ?_⟩ + have h2 : bsplinePieces r k n (m - 1) = 0 := by + simp only [bsplinePieces, hm1, show ¬ (0 ≤ (m : ℤ) - 1 - n) by omega, false_and, + ↓reduceIte] + have hnm : (((n : ℤ) : ℝ) : ℂ) = (((m : ℝ)) : ℂ) := by + have := hknot 0 (by simpa using he) + simpa using this + rw [h2, sub_zero, hpm, bsplinePiece_zero, mul_comp, C_comp, X_sub_C_pow_comp_affine, + add_zero, hnm, hcast, C_mul] + ring + · -- inside the support: consecutive pieces differ by the new term + refine ⟨bsplineCoeff r e * ((((2 : ℝ) ^ k : ℝ) : ℂ)) ^ (r - 1), ?_⟩ + have h2 : bsplinePieces r k n (m - 1) = (bsplinePiece r (e - 1)).comp + (C ((-(n : ℝ) : ℝ) : ℂ) + C (((2 : ℝ) ^ k : ℝ) : ℂ) * X) := by + unfold bsplinePieces + rw [hm1] + simp only [show 0 ≤ (m : ℤ) - 1 - n ∧ (m : ℤ) - 1 - n ≤ r from ⟨by omega, by omega⟩, and_self, + ↓reduceIte] + rw [show ((m : ℤ) - 1 - n).toNat = e - 1 by omega] + have hsucc := bsplinePiece_succ r (e - 1) + rw [Nat.sub_add_cancel he0] at hsucc + rw [hpm, h2, hsucc, add_comp, add_sub_cancel_left, mul_comp, C_comp, + X_sub_C_pow_comp_affine, hknot e he, hcast, C_mul] + ring + +/-- **The B-splines have spline joins** at the interior knots of `[0, 1]`. -/ +theorem splineJoins_bsplinePieces {r : ℕ} (hr : 1 ≤ r) (k : ℕ) (n : ℤ) : + SplineJoins r k (bsplinePieces r k n) := fun _ hm _ => bsplinePieces_join hr k n hm + +/-- On `I_{k,m}` the pieces are the B-spline: `Q_m(x) = N_r(2^k x - n)`. -/ +theorem polyFun_bsplinePieces {r : ℕ} (hr : 1 ≤ r) (k : ℕ) (n : ℤ) {m : ℕ} {x : ℝ} + (hx : x ∈ dyadicIco k m) : polyFun (bsplinePieces r k n m) x = bspline r (2 ^ k * x - n) := by + rw [mem_dyadicIco] at hx + have hy : 2 ^ k * x - n ∈ Ico (((m : ℤ) - n : ℤ) : ℝ) ((((m : ℤ) - n : ℤ) : ℝ) + 1) := by + push_cast + constructor <;> linarith [hx.1, hx.2] + unfold bsplinePieces + split_ifs with h + · rw [polyFun_comp_affine] + obtain ⟨e, he⟩ : ∃ e : ℕ, (m : ℤ) - n = e := ⟨((m : ℤ) - n).toNat, (Int.toNat_of_nonneg + h.1).symm⟩ + rw [he, Int.toNat_natCast] + rw [he] at hy + push_cast at hy + rcases lt_or_eq_of_le (show e ≤ r by omega) with her | her + · rw [bspline_eq_piece her hy] + congr 1 + ring + · subst her + rw [bsplinePiece_top hr, bspline_eq_zero_of_ge hy.1] + simp [polyFun] + · push Not at h + by_cases h0 : 0 ≤ (m : ℤ) - n + · have h1 := h h0 + have : (r : ℝ) ≤ 2 ^ k * x - n := by + have : ((r : ℤ) : ℝ) < (((m : ℤ) - n : ℤ) : ℝ) := by exact_mod_cast h1 + push_cast at this hy + linarith [hy.1] + rw [bspline_eq_zero_of_ge this] + simp [polyFun] + · have : 2 ^ k * x - n < 0 := by + have : (((m : ℤ) - n : ℤ) : ℝ) ≤ -1 := by exact_mod_cast (by omega : (m : ℤ) - n ≤ -1) + push_cast at this hy + linarith [hy.2] + rw [bspline_eq_zero_of_lt r this] + simp [polyFun] + +end Interval diff --git a/LeanPool/FunctionSpaces/Domains/Interval/Steklov.lean b/LeanPool/FunctionSpaces/Domains/Interval/Steklov.lean new file mode 100644 index 0000000000..1e033f87d3 --- /dev/null +++ b/LeanPool/FunctionSpaces/Domains/Interval/Steklov.lean @@ -0,0 +1,183 @@ +/- +Copyright (c) 2026 Mario Ullrich. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Mario Ullrich +-/ +module + +public import LeanPool.FunctionSpaces.Domains.Interval.Taylor +public import Mathlib.MeasureTheory.Integral.DominatedConvergence + +/- +Modified for Lean Pool: module names and imports adapted. +-/ + +/-! +# Steklov averages + +The **Steklov average** of `g : ℝ → ℂ` with step `η` is the forward mean + +`M_η g(x) = η^(-1) ∫_0^η g(x + τ) dτ` (`Interval.steklov`). + +For continuous `g` it is differentiable with `(M_η g)' = η^(-1) Δ_η g` +(`Interval.hasDerivAt_steklov`): averaging gains one derivative. Steklov averages commute with +translations and differences, so the `m`-fold average `M_η^m g` of a continuous `g` lies in +`C^m` (`Interval.contDiff_steklovIter`) with + +`(M_η^r g)^(r) = η^(-r) Δ_η^r g` (`Interval.iteratedDeriv_steklovIter`). + +The derivative of order `r` of a smoothed function is therefore a difference of order `r` of the +original function, which is how moduli of smoothness control the approximation of smooth +functions in Jackson's inequality. +-/ + +@[expose] public section + +open MeasureTheory Set Polynomial +open Rd (higherDiff) +open scoped ENNReal + +namespace Interval + +/-- The **Steklov average** `M_η g(x) = η^(-1) ∫_0^η g(x + τ) dτ`. -/ +noncomputable def steklov (η : ℝ) (g : ℝ → ℂ) (x : ℝ) : ℂ := + ((η : ℂ))⁻¹ * ∫ τ in (0 : ℝ)..η, g (x + τ) + +/-- `M_η g(x) = η^(-1) ∫_x^{x+η} g`. -/ +theorem steklov_eq (η : ℝ) (g : ℝ → ℂ) (x : ℝ) : + steklov η g x = ((η : ℂ))⁻¹ * ∫ t in x..x + η, g t := by + rw [steklov, intervalIntegral.integral_comp_add_left, add_zero] + +/-- **Steklov averages gain a derivative**: `(M_η g)' = η^(-1) (g(· + η) - g)` for continuous +`g`. -/ +theorem hasDerivAt_steklov {g : ℝ → ℂ} (hg : Continuous g) (η x : ℝ) : + HasDerivAt (steklov η g) (((η : ℂ))⁻¹ * (g (x + η) - g x)) x := by + have hF : ∀ y, HasDerivAt (fun u => ∫ t in (0 : ℝ)..u, g t) (g y) y := fun y => + (hg.integral_hasStrictDerivAt 0 y).hasDerivAt + have hrepr : steklov η g = fun y => ((η : ℂ))⁻¹ * + ((∫ t in (0 : ℝ)..y + η, g t) - ∫ t in (0 : ℝ)..y, g t) := by + funext y + rw [steklov_eq, intervalIntegral.integral_interval_sub_left + (hg.intervalIntegrable _ _) (hg.intervalIntegrable _ _)] + rw [hrepr] + exact (((hF (x + η)).comp_add_const x η).sub (hF x)).const_mul _ + +/-- Steklov averages of continuous functions are differentiable. -/ +theorem differentiable_steklov {g : ℝ → ℂ} (hg : Continuous g) (η : ℝ) : + Differentiable ℝ (steklov η g) := + fun x => (hasDerivAt_steklov hg η x).differentiableAt + +/-- The derivative of a Steklov average. -/ +theorem deriv_steklov {g : ℝ → ℂ} (hg : Continuous g) (η : ℝ) : + deriv (steklov η g) = fun x => ((η : ℂ))⁻¹ * fwdDiff η g x := + funext fun x => (hasDerivAt_steklov hg η x).deriv + +/-- Steklov averages commute with translations. -/ +theorem steklov_comp_add (η : ℝ) (g : ℝ → ℂ) (c : ℝ) : + steklov η (fun y => g (y + c)) = fun x => steklov η g (x + c) := by + funext x + simp only [steklov] + congr 1 + exact intervalIntegral.integral_congr fun τ _ => by + show g (x + τ + c) = g (x + c + τ) + rw [add_right_comm] + +/-- Steklov averages are additive on continuous functions. -/ +theorem steklov_sub {g₁ g₂ : ℝ → ℂ} (h₁ : Continuous g₁) (h₂ : Continuous g₂) (η : ℝ) : + steklov η (fun y => g₁ y - g₂ y) = fun x => steklov η g₁ x - steklov η g₂ x := by + funext x + simp only [steklov] + have c₁ : Continuous fun τ => g₁ (x + τ) := h₁.comp (continuous_const.add continuous_id) + have c₂ : Continuous fun τ => g₂ (x + τ) := h₂.comp (continuous_const.add continuous_id) + rw [intervalIntegral.integral_sub (c₁.intervalIntegrable _ _) (c₂.intervalIntegrable _ _), + mul_sub] + +/-- Steklov averages commute with forward differences. -/ +theorem steklov_fwdDiff {g : ℝ → ℂ} (hg : Continuous g) (η h : ℝ) : + steklov η (fwdDiff h g) = fwdDiff h (steklov η g) := by + have : fwdDiff h g = fun y => g (y + h) - g y := rfl + have c : Continuous fun y => g (y + h) := hg.comp (continuous_id.add continuous_const) + rw [this, steklov_sub c hg, steklov_comp_add] + rfl + +/-- Steklov averages of continuous functions are continuous. -/ +theorem continuous_steklov {g : ℝ → ℂ} (hg : Continuous g) (η : ℝ) : + Continuous (steklov η g) := + (differentiable_steklov hg η).continuous + +/-- Forward differences of continuous functions are continuous. -/ +theorem continuous_fwdDiff {g : ℝ → ℂ} (hg : Continuous g) (h : ℝ) : Continuous (fwdDiff h g) := + (hg.comp (continuous_id.add continuous_const)).sub hg + +/-- Forward differences keep smoothness. -/ +theorem contDiff_fwdDiff {k : ℕ} {g : ℝ → ℂ} (hg : ContDiff ℝ k g) (h : ℝ) : + ContDiff ℝ k (fwdDiff h g) := + (hg.comp (contDiff_id.add contDiff_const)).sub hg + +/-- **Averaging gains one derivative**: `g ∈ C^k` implies `M_η g ∈ C^(k+1)`. -/ +theorem contDiff_steklov {k : ℕ} {g : ℝ → ℂ} (hg : ContDiff ℝ k g) (η : ℝ) : + ContDiff ℝ (k + 1) (steklov η g) := by + have hc : Continuous g := hg.continuous + have h1 : ContDiff ℝ ((k : WithTop ℕ∞) + 1) (steklov η g) := by + refine contDiff_succ_iff_deriv.2 ⟨differentiable_steklov hc η, fun h => ?_, ?_⟩ + · exact absurd h (by simp) + · rw [deriv_steklov hc] + exact contDiff_const.mul (contDiff_fwdDiff hg η) + exact_mod_cast h1 + +/-- The `m`-fold Steklov average `M_η^m g`. -/ +noncomputable def steklovIter (m : ℕ) (η : ℝ) (g : ℝ → ℂ) : ℝ → ℂ := (steklov η)^[m] g + +/-- `M_η^(m+1) = M_η ∘ M_η^m`. -/ +theorem steklovIter_succ (m : ℕ) (η : ℝ) (g : ℝ → ℂ) : + steklovIter (m + 1) η g = steklov η (steklovIter m η g) := by + rw [steklovIter, Function.iterate_succ_apply'] + rfl + +/-- **The `m`-fold Steklov average of a continuous function lies in `C^m`**. -/ +theorem contDiff_steklovIter {g : ℝ → ℂ} (hg : Continuous g) (m : ℕ) (η : ℝ) : + ContDiff ℝ m (steklovIter m η g) := by + induction m with + | zero => exact contDiff_zero.2 hg + | succ m ih => + rw [steklovIter_succ] + exact_mod_cast contDiff_steklov ih η + +/-- Iterated Steklov averages of continuous functions are continuous. -/ +theorem continuous_steklovIter {g : ℝ → ℂ} (hg : Continuous g) (m : ℕ) (η : ℝ) : + Continuous (steklovIter m η g) := + (contDiff_steklovIter hg m η).continuous + +/-- Iterated Steklov averages commute with forward differences. -/ +theorem steklovIter_fwdDiff {g : ℝ → ℂ} (hg : Continuous g) (m : ℕ) (η h : ℝ) : + steklovIter m η (fwdDiff h g) = fwdDiff h (steklovIter m η g) := by + induction m with + | zero => rfl + | succ m ih => + rw [steklovIter_succ, steklovIter_succ, ih, + steklov_fwdDiff (continuous_steklovIter hg m η)] + +/-- **The derivative of order `k` of an iterated Steklov average**: +`(M_η^(m+k) g)^(k) = η^(-k) M_η^m (Δ_η^k g)` for continuous `g`. -/ +theorem iteratedDeriv_steklovIter_add {g : ℝ → ℂ} (hg : Continuous g) (m k : ℕ) (η : ℝ) : + iteratedDeriv k (steklovIter (m + k) η g) = + fun x => ((η : ℂ))⁻¹ ^ k * steklovIter m η (higherDiff k η g) x := by + induction k generalizing g with + | zero => funext x; simp [higherDiff] + | succ k ih => + rw [iteratedDeriv_succ', show m + (k + 1) = m + k + 1 by ring, steklovIter_succ, + deriv_steklov (continuous_steklovIter hg (m + k) η), + ← steklovIter_fwdDiff hg (m + k) η η] + funext x + rw [iteratedDeriv_const_mul_field, ih (continuous_fwdDiff hg η), higherDiff_succ', pow_succ] + ring + +/-- **`(M_η^r g)^(r) = η^(-r) Δ_η^r g`** for continuous `g`. -/ +theorem iteratedDeriv_steklovIter {g : ℝ → ℂ} (hg : Continuous g) (r : ℕ) (η : ℝ) : + iteratedDeriv r (steklovIter r η g) = fun x => ((η : ℂ))⁻¹ ^ r * higherDiff r η g x := by + have h := iteratedDeriv_steklovIter_add hg 0 r η + rw [zero_add] at h + rw [h] + rfl + +end Interval diff --git a/LeanPool/FunctionSpaces/Domains/Interval/Taylor.lean b/LeanPool/FunctionSpaces/Domains/Interval/Taylor.lean new file mode 100644 index 0000000000..aa08f9521b --- /dev/null +++ b/LeanPool/FunctionSpaces/Domains/Interval/Taylor.lean @@ -0,0 +1,132 @@ +/- +Copyright (c) 2026 Mario Ullrich. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Mario Ullrich +-/ +module + +public import LeanPool.FunctionSpaces.Domains.Interval.Polynomials +public import Mathlib.Analysis.Calculus.Deriv.Polynomial +public import Mathlib.Analysis.Complex.RealDeriv +public import Mathlib.Analysis.Calculus.ContDiff.Deriv +public import Mathlib.Analysis.Calculus.IteratedDeriv.Lemmas +public import Mathlib.MeasureTheory.Integral.IntervalIntegral.FundThmCalculus +public import Mathlib.MeasureTheory.Function.LpSeminorm.CompareExp + +/- +Modified for Lean Pool: module names and imports adapted. +-/ + +/-! +# Polynomial approximation of smooth functions on intervals + +For `g ∈ C^r(ℝ)`, `1 ≤ p ≤ ∞` and `u ≤ v` there is a polynomial `Q` of degree `< r` with + +`‖g - Q‖_{L_p[u, v]} ≤ (v - u)^r ‖g^(r)‖_{L_p[u, v]}` (`Interval.exists_eLpNorm_sub_polyFun_le`). + +The proof is by induction on `r`: approximate `g'` by `Q'` of degree `< r - 1`, take an +antiderivative `Q` of `Q'` with `Q(u) = g(u)` (`Interval.exists_derivative_eq`), and bound +`g - Q` by the fundamental theorem of calculus and Hölder's inequality, +`|(g - Q)(x)| ≤ ∫_u^v |g' - Q'| ≤ (v - u)^(1 - 1/p) ‖g' - Q'‖_{L_p}`. This is Taylor's theorem in +the form needed for approximation in `L_p`; the constant `1` is not optimal. +-/ + +@[expose] public section + +open MeasureTheory Set Polynomial +open scoped ENNReal + +namespace Interval + +/-- **Antiderivatives of polynomials**: every polynomial of degree `< r` is the derivative of a +polynomial of degree `< r + 1`. -/ +theorem exists_derivative_eq {r : ℕ} {Q : ℂ[X]} (hQ : Q ∈ degreeLT ℂ r) : + ∃ R ∈ degreeLT ℂ (r + 1), derivative R = Q := by + rcases eq_or_ne Q 0 with rfl | hQ0 + · exact ⟨0, Submodule.zero_mem _, by simp⟩ + have hdeg : Q.natDegree < r := (natDegree_lt_iff_degree_lt hQ0).2 (mem_degreeLT.1 hQ) + refine ⟨∑ i ∈ Finset.range r, C (Q.coeff i / (i + 1)) * X ^ (i + 1), ?_, ?_⟩ + · refine Submodule.sum_mem _ fun i hi => ?_ + rw [mem_degreeLT] + refine (degree_C_mul_X_pow_le _ _).trans_lt ?_ + have := Finset.mem_range.1 hi + exact_mod_cast (by omega : i + 1 < r + 1) + · rw [derivative_sum] + conv_rhs => rw [Q.as_sum_range' r hdeg] + refine Finset.sum_congr rfl fun i _ => ?_ + rw [derivative_C_mul_X_pow, Nat.add_sub_cancel, ← C_mul_X_pow_eq_monomial] + congr 2 + push_cast + field_simp + +/-- The derivative of a polynomial along the real line. -/ +theorem hasDerivAt_polyFun (P : ℂ[X]) (x : ℝ) : + HasDerivAt (polyFun P) (polyFun (derivative P) x) x := + (P.hasDerivAt (x : ℂ)).comp_ofReal + +/-- **Taylor's theorem in `L_p`**: for `g ∈ C^r` and `u ≤ v` there is `Q` of degree `< r` with +`‖g - Q‖_{L_p[u, v]} ≤ (v - u)^r ‖g^(r)‖_{L_p[u, v]}`. -/ +theorem exists_eLpNorm_sub_polyFun_le {p : ℝ≥0∞} (hp : 1 ≤ p) (r : ℕ) {g : ℝ → ℂ} + (hg : ContDiff ℝ r g) {u v : ℝ} (huv : u ≤ v) : + ∃ Q ∈ degreeLT ℂ r, eLpNorm (fun x => g x - polyFun Q x) p (volume.restrict (Icc u v)) ≤ + ENNReal.ofReal (v - u) ^ r * eLpNorm (iteratedDeriv r g) p (volume.restrict (Icc u v)) := by + induction r generalizing g with + | zero => exact ⟨0, Submodule.zero_mem _, by simp [polyFun]⟩ + | succ r ih => + have hg1 : ContDiff ℝ ((r : WithTop ℕ∞) + 1) g := by exact_mod_cast hg + obtain ⟨hdiff, -, hg'⟩ := contDiff_succ_iff_deriv.1 hg1 + obtain ⟨Q', hQ', hQ'bound⟩ := ih hg' + obtain ⟨R, hR, hRQ⟩ := exists_derivative_eq hQ' + set Q := R + C (g u - polyFun R u) + have hQ : Q ∈ degreeLT ℂ (r + 1) := by + refine Submodule.add_mem _ hR ?_ + rw [mem_degreeLT] + exact (degree_C_le).trans_lt (by exact_mod_cast Nat.succ_pos r) + refine ⟨Q, hQ, ?_⟩ + rw [iteratedDeriv_succ'] + rcases huv.eq_or_lt with rfl | huv' + · simp + set h := fun x => g x - polyFun Q x + set h' := fun x => deriv g x - polyFun Q' x + have hderiv : ∀ x, HasDerivAt h (h' x) x := fun x => by + have hQd : polyFun (derivative Q) x = polyFun Q' x := by + simp [Q, derivative_add, derivative_C, hRQ] + have := (hdiff x).hasDerivAt.sub (hasDerivAt_polyFun Q x) + rwa [hQd] at this + have hcont : Continuous h' := + hg'.continuous.sub (continuous_polyFun Q') + have hu : h u = 0 := by simp [h, Q, polyFun] + set μ := volume.restrict (Icc u v) + set M := eLpNorm h' p μ * volume (Icc u v) ^ (1 / (1 : ℝ≥0∞).toReal - 1 / p.toReal) + have hpt : ∀ x ∈ Icc u v, ‖h x‖ₑ ≤ M := fun x hx => by + have hftc : ∫ t in u..x, h' t = h x - h u := + intervalIntegral.integral_eq_sub_of_hasDerivAt (fun t _ => hderiv t) + (hcont.intervalIntegrable _ _) + rw [hu, sub_zero] at hftc + rw [← hftc, intervalIntegral.integral_of_le hx.1] + calc ‖∫ t in Ioc u x, h' t‖ₑ ≤ ∫⁻ t in Ioc u x, ‖h' t‖ₑ := eNorm_integral_le_lintegral_eNorm _ + _ ≤ ∫⁻ t in Icc u v, ‖h' t‖ₑ := + lintegral_mono_set (Ioc_subset_Icc_self.trans (Icc_subset_Icc le_rfl hx.2)) + _ = eLpNorm h' 1 μ := (eLpNorm_one_eq_lintegral_eNorm hcont.aestronglyMeasurable).symm + _ ≤ M := by + have := eLpNorm_le_eLpNorm_mul_rpow_measure_univ (μ := μ) (p := 1) (q := p) hp + hcont.aestronglyMeasurable + rwa [Measure.restrict_apply_univ] at this + have hbound := eLpNorm_le_of_ae_eNorm_bound (p := p) (μ := μ) + ((hdiff.continuous.sub (continuous_polyFun Q)).aestronglyMeasurable) + (by filter_upwards [ae_restrict_mem measurableSet_Icc] with x hx using hpt x hx) + rw [Measure.restrict_apply_univ, Real.volume_Icc] at hbound + have hL0 : ENNReal.ofReal (v - u) ≠ 0 := by + rw [ne_eq, ENNReal.ofReal_eq_zero, not_le]; linarith + have hexp : ENNReal.ofReal (v - u) ^ (1 / (1 : ℝ≥0∞).toReal - 1 / p.toReal) * + ENNReal.ofReal (v - u) ^ p.toReal⁻¹ = ENNReal.ofReal (v - u) := by + rw [← ENNReal.rpow_add _ _ hL0 ENNReal.ofReal_ne_top, ENNReal.toReal_one, div_one, + one_div, sub_add_cancel, ENNReal.rpow_one] + calc eLpNorm h p μ ≤ M • ENNReal.ofReal (v - u) ^ p.toReal⁻¹ := hbound + _ = eLpNorm h' p μ * ENNReal.ofReal (v - u) := by + rw [smul_eq_mul, mul_assoc, Real.volume_Icc, hexp] + _ ≤ ENNReal.ofReal (v - u) ^ r * eLpNorm (iteratedDeriv r (deriv g)) p μ * + ENNReal.ofReal (v - u) := by gcongr + _ = _ := by ring + +end Interval diff --git a/LeanPool/FunctionSpaces/Domains/Interval/Whitney.lean b/LeanPool/FunctionSpaces/Domains/Interval/Whitney.lean new file mode 100644 index 0000000000..fd5a655007 --- /dev/null +++ b/LeanPool/FunctionSpaces/Domains/Interval/Whitney.lean @@ -0,0 +1,179 @@ +/- +Copyright (c) 2026 Mario Ullrich. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Mario Ullrich +-/ +module + +public import LeanPool.FunctionSpaces.Domains.Interval.Smoothing + +/- +Modified for Lean Pool: module names and imports adapted. +-/ + +/-! +# Whitney's inequality on `[0, 1]` + +**Whitney's inequality**: for `1 ≤ p < ∞`, `r ≥ 1` and `0 < t ≤ 1/3` there is `W < ∞` such +that every continuous `F` has a polynomial `P` of degree `< r` with + +`‖F - P‖_{L_p[0, 1]} ≤ W ω_r(F, t, [0, 1])_p` + +(`Interval.exists_eLpNorm_sub_polyFun_le_modulus`). The best approximation by polynomials on +the whole interval is controlled by the modulus at a single scale `t`. + +The proof uses two one-sided smoothings with `L = t` (`Interval.exists_left_smoothing`, +`Interval.exists_right_smoothing`). Together with Taylor's theorem they give polynomials `T₁` +and `T₂` with `‖F - T₁‖ ≤ A ω` on `[0, 1 - t]` and `‖F - T₂‖ ≤ A ω` on `[t, 1]`, +`A = 1 + t^(-r) 2^r r^(2r)` (`Interval.eLpNorm_sub_polyFun_le_of_smoothing`). Both parts contain +`[1/3, 2/3]`, where `T₁` and `T₂` differ by at most `2A ω`; since all norms on the polynomials of +degree `< r` are equivalent, they differ by at most `2K A ω` on `[0, 1]` +(`Interval.exists_eLpNorm_le_middle`). Splitting `[0, 1]` at `1/2` gives `W = (1 + K) 2A`. The +gluing step is stated for any function and any two polynomials +(`Interval.exists_eLpNorm_sub_polyFun_le_glue`), so that the slices of functions on the cube use +it too. + +For the dyadic piecewise polynomials and splines of level `0`, the approximants are exactly the +polynomials of degree `< r`, so Whitney's inequality is their Jackson inequality at level `0`. +-/ + +@[expose] public section + +open MeasureTheory Set Polynomial +open scoped ENNReal + +namespace Interval + +variable {p : ℝ≥0∞} [Fact (1 ≤ p)] + +/-- **Polynomials are controlled by their middle third**: there is `K'` with +`‖P‖_{L_p[0, 1]} ≤ K' ‖P‖_{L_p[1/3, 2/3]}` for every polynomial `P` of degree `< r`, by the +equivalence of norms on the polynomials of degree `< r`. -/ +theorem exists_eLpNorm_le_middle (r : ℕ) : + ∃ K : ℝ≥0∞, K ≠ ∞ ∧ ∀ P ∈ degreeLT ℂ r, + eLpNorm (polyFun P) p (volume.restrict (Icc 0 1)) ≤ + K * eLpNorm (polyFun P) p (volume.restrict (Icc (1 / 3) (2 / 3))) := by + obtain ⟨K, hK, hKb⟩ := exists_enorm_le_eLpNorm (p := p) r (by norm_num : (1 / 3 : ℝ) < 2 / 3) + refine ⟨K, hK, fun P hP => ?_⟩ + refine (eLpNorm_le_of_ae_eNorm_bound (measurable_polyFun P).aestronglyMeasurable + ((ae_restrict_iff' measurableSet_Icc).2 + (Filter.Eventually.of_forall fun x hx => hKb P hP x hx))).trans_eq ?_ + rw [Measure.restrict_apply_univ, Real.volume_Icc, sub_zero, ENNReal.ofReal_one, ENNReal.one_rpow, + smul_eq_mul, mul_one] + +/-- **Taylor approximation on one part**: if `‖g - T‖_{L_p[a,b]} ≤ (b - a)^r ‖D‖_{L_p[a,b]}` and +`b - a ≤ 1`, then `‖F - T‖_{L_p[a,b]} ≤ ‖F - g‖_{L_p[a,b]} + ‖D‖_{L_p[a,b]}`. -/ +theorem eLpNorm_sub_polyFun_le_add {F g D : ℝ → ℂ} {r : ℕ} {a b : ℝ} (hab : b - a ≤ 1) + {T : ℂ[X]} + (h3 : eLpNorm (fun x => g x - polyFun T x) p (volume.restrict (Icc a b)) ≤ + ENNReal.ofReal (b - a) ^ r * eLpNorm D p (volume.restrict (Icc a b))) : + eLpNorm (fun x => F x - polyFun T x) p (volume.restrict (Icc a b)) ≤ + eLpNorm (fun x => F x - g x) p (volume.restrict (Icc a b)) + + eLpNorm D p (volume.restrict (Icc a b)) := by + have hp1 : 1 ≤ p := Fact.out + have hle : ENNReal.ofReal (b - a) ^ r ≤ 1 := pow_le_one₀ zero_le (ENNReal.ofReal_le_one.2 hab) + calc eLpNorm (fun x => F x - polyFun T x) p (volume.restrict (Icc a b)) + = eLpNorm ((fun x => F x - g x) + fun x => g x - polyFun T x) p + (volume.restrict (Icc a b)) := by congr 1; funext x; simp + _ ≤ eLpNorm (fun x => F x - g x) p (volume.restrict (Icc a b)) + + eLpNorm (fun x => g x - polyFun T x) p (volume.restrict (Icc a b)) := eLpNorm_add_le hp1 + _ ≤ _ := add_le_add le_rfl (h3.trans (mul_le_of_le_one_left zero_le hle)) + +/-- **Smoothing and Taylor on one part**: if `‖F - g‖_{L_p[a,b]} ≤ ω`, `‖D‖_{L_p[a,b]} ≤ c ω`, +`‖g - T‖_{L_p[a,b]} ≤ (b - a)^r ‖D‖_{L_p[a,b]}` and `b - a ≤ 1`, then +`‖F - T‖_{L_p[a,b]} ≤ (1 + c) ω`. -/ +theorem eLpNorm_sub_polyFun_le_of_smoothing {F g D : ℝ → ℂ} {r : ℕ} {a b : ℝ} (hab : b - a ≤ 1) + {T : ℂ[X]} {ω c : ℝ≥0∞} + (h1 : eLpNorm (fun x => F x - g x) p (volume.restrict (Icc a b)) ≤ ω) + (h2 : eLpNorm D p (volume.restrict (Icc a b)) ≤ c * ω) + (h3 : eLpNorm (fun x => g x - polyFun T x) p (volume.restrict (Icc a b)) ≤ + ENNReal.ofReal (b - a) ^ r * eLpNorm D p (volume.restrict (Icc a b))) : + eLpNorm (fun x => F x - polyFun T x) p (volume.restrict (Icc a b)) ≤ (1 + c) * ω := + (eLpNorm_sub_polyFun_le_add hab h3).trans ((add_le_add h1 h2).trans_eq (by ring)) + +/-- **Gluing two polynomial approximations**: there is `K < ∞` such that for measurable `u` and +polynomials `T₁`, `T₂` of degree `< r`, +`‖u - T₁‖_{L_p[0, 1]} ≤ (1 + K) (‖u - T₁‖_{L_p[0, 2/3]} + ‖u - T₂‖_{L_p[1/3, 1]})`. On the +middle third `T₁` and `T₂` are close, hence on all of `[0, 1]` +(`Interval.exists_eLpNorm_le_middle`). -/ +theorem exists_eLpNorm_sub_polyFun_le_glue (r : ℕ) (hp : p ≠ ∞) : + ∃ K : ℝ≥0∞, K ≠ ∞ ∧ ∀ {u : ℝ → ℂ}, Measurable u → ∀ {T₁ T₂ : ℂ[X]}, + T₁ ∈ degreeLT ℂ r → T₂ ∈ degreeLT ℂ r → + eLpNorm (fun x => u x - polyFun T₁ x) p (volume.restrict (Icc 0 1)) ≤ + (1 + K) * (eLpNorm (fun x => u x - polyFun T₁ x) p (volume.restrict (Icc 0 (2 / 3))) + + eLpNorm (fun x => u x - polyFun T₂ x) p (volume.restrict (Icc (1 / 3) 1))) := by + have hp1 : 1 ≤ p := Fact.out + obtain ⟨K, hK, hKb⟩ := exists_eLpNorm_le_middle (p := p) r + refine ⟨K, hK, fun {u} hu {T₁ T₂} hT₁ hT₂ => ?_⟩ + set E₁ := eLpNorm (fun x => u x - polyFun T₁ x) p (volume.restrict (Icc 0 (2 / 3))) + set E₂ := eLpNorm (fun x => u x - polyFun T₂ x) p (volume.restrict (Icc (1 / 3) 1)) + have hmid : eLpNorm (polyFun (T₁ - T₂)) p (volume.restrict (Icc (1 / 3) (2 / 3))) ≤ + E₂ + E₁ := by + calc eLpNorm (polyFun (T₁ - T₂)) p (volume.restrict (Icc (1 / 3) (2 / 3))) + = eLpNorm ((fun x => u x - polyFun T₂ x) - fun x => u x - polyFun T₁ x) p + (volume.restrict (Icc (1 / 3) (2 / 3))) := by + congr 1; funext x; simp only [Pi.sub_apply, polyFun, eval_sub]; ring + _ ≤ eLpNorm (fun x => u x - polyFun T₂ x) p (volume.restrict (Icc (1 / 3) (2 / 3))) + + eLpNorm (fun x => u x - polyFun T₁ x) p (volume.restrict (Icc (1 / 3) (2 / 3))) := + eLpNorm_sub_le hp1 + _ ≤ E₂ + E₁ := add_le_add (eLpNorm_Icc_mono _ p le_rfl (by norm_num)) + (eLpNorm_Icc_mono _ p (by norm_num) le_rfl) + have hdiff : eLpNorm (polyFun (T₁ - T₂)) p (volume.restrict (Icc 0 1)) ≤ K * (E₂ + E₁) := + (hKb _ (Submodule.sub_mem _ hT₁ hT₂)).trans (mul_le_mul' le_rfl hmid) + have hL : eLpNorm (fun x => u x - polyFun T₁ x) p (volume.restrict (Icc 0 (1 / 2))) ≤ E₁ := + eLpNorm_Icc_mono _ p le_rfl (by norm_num) + have hR : eLpNorm (fun x => u x - polyFun T₁ x) p (volume.restrict (Icc (1 / 2) 1)) ≤ + E₂ + K * (E₂ + E₁) := by + calc eLpNorm (fun x => u x - polyFun T₁ x) p (volume.restrict (Icc (1 / 2) 1)) + = eLpNorm ((fun x => u x - polyFun T₂ x) - polyFun (T₁ - T₂)) p + (volume.restrict (Icc (1 / 2) 1)) := by + congr 1; funext x; simp only [Pi.sub_apply, polyFun, eval_sub]; ring + _ ≤ eLpNorm (fun x => u x - polyFun T₂ x) p (volume.restrict (Icc (1 / 2) 1)) + + eLpNorm (polyFun (T₁ - T₂)) p (volume.restrict (Icc (1 / 2) 1)) := eLpNorm_sub_le hp1 + _ ≤ E₂ + K * (E₂ + E₁) := add_le_add (eLpNorm_Icc_mono _ p (by norm_num) le_rfl) + ((eLpNorm_Icc_mono _ p (by norm_num) le_rfl).trans hdiff) + calc eLpNorm (fun x => u x - polyFun T₁ x) p (volume.restrict (Icc 0 1)) + ≤ eLpNorm (fun x => u x - polyFun T₁ x) p (volume.restrict (Icc 0 (1 / 2))) + + eLpNorm (fun x => u x - polyFun T₁ x) p (volume.restrict (Icc (1 / 2) 1)) := + eLpNorm_Icc_split (hu.sub (measurable_polyFun _)) hp1 hp (by norm_num) (by norm_num) + _ ≤ E₁ + (E₂ + K * (E₂ + E₁)) := add_le_add hL hR + _ = (1 + K) * (E₁ + E₂) := by ring + +/-- **Whitney's inequality for continuous functions**: for `1 ≤ p < ∞`, `r ≥ 1` and +`0 < t ≤ 1/3` there is `W < ∞` such that every continuous `F` has a polynomial `P` of degree +`< r` with `‖F - P‖_{L_p[0, 1]} ≤ W ω_r(F, t, [0, 1])_p`. -/ +theorem exists_eLpNorm_sub_polyFun_le_modulus {r : ℕ} (hr : 1 ≤ r) (hp : p ≠ ∞) {t : ℝ} + (ht : 0 < t) (ht3 : t ≤ 1 / 3) : + ∃ W : ℝ≥0∞, W ≠ ∞ ∧ ∀ F : ℝ → ℂ, Continuous F → ∃ P ∈ degreeLT ℂ r, + eLpNorm (fun x => F x - polyFun P x) p (volume.restrict (Icc 0 1)) ≤ + W * modulus r p 0 1 F t := by + have hp1 : 1 ≤ p := Fact.out + obtain ⟨K, hK, hKb⟩ := exists_eLpNorm_sub_polyFun_le_glue (p := p) r hp + set c : ℝ≥0∞ := ENNReal.ofReal t⁻¹ ^ r * (2 ^ r * (r : ℝ≥0∞) ^ (2 * r)) + have hc : c ≠ ∞ := ENNReal.mul_ne_top (ENNReal.pow_ne_top ENNReal.ofReal_ne_top) + (ENNReal.mul_ne_top (by simp) (ENNReal.pow_ne_top (ENNReal.natCast_ne_top r))) + refine ⟨(1 + K) * (2 * (1 + c)), ENNReal.mul_ne_top (ENNReal.add_ne_top.2 + ⟨ENNReal.one_ne_top, hK⟩) (ENNReal.mul_ne_top (by simp) + (ENNReal.add_ne_top.2 ⟨ENNReal.one_ne_top, hc⟩)), fun F hF => ?_⟩ + set ω := modulus r p 0 1 F t + have hwL : (1 - t) + t ≤ 1 := by linarith + -- the left polynomial, on `[0, 1 - t] ⊇ [0, 2/3]` + obtain ⟨gl, Dl, -, -, hl1, hl2, hl3⟩ := exists_left_smoothing hF hr hp1 hp ht hwL + obtain ⟨T₁, hT₁, hT₁b⟩ := hl3 0 (1 - t) (by linarith) + have hE₁ : eLpNorm (fun x => F x - polyFun T₁ x) p (volume.restrict (Icc 0 (2 / 3))) ≤ + (1 + c) * ω := (eLpNorm_Icc_mono _ p le_rfl (by linarith)).trans + (eLpNorm_sub_polyFun_le_of_smoothing (by linarith) hl1 hl2 hT₁b) + -- the right polynomial, on `[t, 1] ⊇ [1/3, 1]` + obtain ⟨gr, Dr, -, -, hr1, hr2, hr3⟩ := exists_right_smoothing hF hr hp1 hp ht hwL + rw [sub_sub_cancel] at hr1 hr2 + obtain ⟨T₂, hT₂, hT₂b⟩ := hr3 t 1 (by linarith) + have hE₂ : eLpNorm (fun x => F x - polyFun T₂ x) p (volume.restrict (Icc (1 / 3) 1)) ≤ + (1 + c) * ω := (eLpNorm_Icc_mono _ p ht3 le_rfl).trans + (eLpNorm_sub_polyFun_le_of_smoothing (by linarith) hr1 hr2 hT₂b) + refine ⟨T₁, hT₁, (hKb hF.measurable hT₁ hT₂).trans ?_⟩ + calc (1 + K) * (eLpNorm (fun x => F x - polyFun T₁ x) p (volume.restrict (Icc 0 (2 / 3))) + + eLpNorm (fun x => F x - polyFun T₂ x) p (volume.restrict (Icc (1 / 3) 1))) + ≤ (1 + K) * ((1 + c) * ω + (1 + c) * ω) := mul_le_mul' le_rfl (add_le_add hE₁ hE₂) + _ = (1 + K) * (2 * (1 + c)) * ω := by ring + +end Interval diff --git a/LeanPool/FunctionSpaces/Domains/Lipschitz/BesovDomainLocalisation.lean b/LeanPool/FunctionSpaces/Domains/Lipschitz/BesovDomainLocalisation.lean new file mode 100644 index 0000000000..8e64e85d37 --- /dev/null +++ b/LeanPool/FunctionSpaces/Domains/Lipschitz/BesovDomainLocalisation.lean @@ -0,0 +1,225 @@ +/- +Copyright (c) 2026 Mario Ullrich. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Mario Ullrich +-/ +module + +public import LeanPool.FunctionSpaces.Domains.Lipschitz.BesovDomains +public import LeanPool.FunctionSpaces.Domains.Sobolev.LipschitzDomainW1p +public import LeanPool.FunctionSpaces.Rd.Differences.PointwiseMultipliers +public import LeanPool.FunctionSpaces.Rd.Sobolev.WeakDerivativeChangeOfVariables + +/- +Modified for Lean Pool: module names and imports adapted. +-/ + +/-! +# Compactly supported functions on Besov domains + +Let `Ω` be a Besov domain (`Rd.BesovDomain`) in a finite-dimensional real inner product space `V` +with Lebesgue measure, and `O = interior Ω`. Functions that vanish outside a ball `B(0, R)` are +described on the bounded convex pieces `D = O ∩ B(0, R')`, `R < R'` +(`Rd.BesovDomain.ballDomain`), which are bounded Lipschitz domains. + +* `O` agrees with `Ω` up to a null set (`Rd.BesovDomain.interior_ae_eq`), since the frontier of a + convex set is a null set. +* **Localisation** (`Rd.BesovDomain.modNormOn_lt_top_iff_ballDomain`): for such functions the + intrinsic quasi-norm `N_Ω` is finite iff `N_D` is finite. One direction is the monotonicity in + the set (`Rd.modNormOn_mono_set`); for the other, extend from `D`, multiply by a cutoff equal to + `1` on `B̄(0, R)` and supported in `B(0, R')`, and restrict to `Ω`. Multiplication by a smooth + `χ` with compact support is bounded in the Besov quasi-norm by differences on `V`: + `N(χ F) ≤ C N(F)` (`Rd.exists_mul_modNorm_le`). +* **`W^1_2 = B^1_{2,2}`** (`Rd.BesovDomain.exists_hasWeakLineDeriv_iff_modNormOn_lt_top`): such a + function has a weak gradient on `O` with values in `L_2(O)` iff its intrinsic quasi-norm on `Ω` + with `p = q = 2`, `s = 1` and moduli of any order `r ≥ 2` is finite: through + `H^1(D) = W^1_2(D)` on the pieces in one direction, and through the extension property of `Ω` + and `W^1_2(V) = B^1_{2,2}(V)` in the other. +-/ + +@[expose] public section + +open MeasureTheory Filter Topology Metric Set TopologicalSpace Module +open scoped ENNReal + +open ENNReal (lqNorm dyadicWeight) + +namespace Rd + +variable {V : Type*} [NormedAddCommGroup V] [InnerProductSpace ℝ V] [FiniteDimensional ℝ V] + [MeasurableSpace V] [BorelSpace V] + +/-! ### Bounded convex pieces of a Besov domain -/ + +namespace BesovDomain + +variable (Ω : Set V) [BesovDomain Ω] + +/-- **A Besov domain is its interior up to a null set**: the frontier of the convex set `Ω` is a +null set (Mathlib's `Convex.addHaar_frontier`, `interior_ae_eq_of_null_frontier`). -/ +theorem interior_ae_eq : interior Ω =ᵐ[volume] Ω := + interior_ae_eq_of_null_frontier ((convex (Ω := Ω)).addHaar_frontier volume) + +/-- Lebesgue measure restricted to the interior of a Besov domain is Lebesgue measure restricted +to the domain (`Rd.BesovDomain.interior_ae_eq`). -/ +theorem restrict_interior : volume.restrict (interior Ω) = volume.restrict Ω := + Measure.restrict_congr_set (interior_ae_eq Ω) + +/-- **The bounded convex piece** `O ∩ B(0, R)` of a Besov domain `Ω`, `O = interior Ω`, as a +bounded Lipschitz domain: it is open, bounded and convex +(`Rd.BoundedLipschitzDomain.ofConvex`). -/ +noncomputable def ballDomain (R : ℝ) : BoundedLipschitzDomain V := + BoundedLipschitzDomain.ofConvex ((convex (Ω := Ω)).interior.inter (convex_ball 0 R)) + (isOpen_interior.inter isOpen_ball) (isBounded_ball.subset inter_subset_right) + +/-- The carrier of the piece `Rd.BesovDomain.ballDomain Ω R` is `interior Ω ∩ B(0, R)`. -/ +@[simp] +theorem carrier_ballDomain (R : ℝ) : (ballDomain Ω R).carrier = interior Ω ∩ ball 0 R := + rfl + +/-- The piece `O ∩ B(0, R)` lies in `O = interior Ω`, as open sets. -/ +theorem toOpens_ballDomain_le (R : ℝ) : (ballDomain Ω R).toOpens ≤ Opens.interior Ω := + fun _ hx => hx.1 + +/-- The piece `O ∩ B(0, R)` lies in `O = interior Ω`. -/ +theorem ballDomain_subset_interior (R : ℝ) : (ballDomain Ω R).carrier ⊆ interior Ω := + fun _ hx => hx.1 + +/-- The piece `O ∩ B(0, R)` lies in `Ω`. -/ +theorem ballDomain_subset (R : ℝ) : (ballDomain Ω R).carrier ⊆ Ω := + (ballDomain_subset_interior Ω R).trans interior_subset + +/-! ### Localisation of the intrinsic quasi-norm -/ + +variable {Ω} + +/-- **The cutoff identity**: let `g = 0` almost everywhere outside `B(0, R)`, `F = g` almost +everywhere on `D = O ∩ B(0, R')`, and let `χ` be `1` on `B̄(0, R)` with closed support in +`B(0, R')`. Then `χ F = g` almost everywhere on `Ω`: on `D` because `χ g = g`, outside +`B(0, R')` because both sides vanish, and `Ω \ O` is a null set +(`Rd.BesovDomain.restrict_interior`). -/ +theorem mul_ae_eq_of_ballDomain {p : ℝ≥0∞} {R R' : ℝ} (hR : R ≤ R') + {g F : Lp ℂ p (volume : Measure V)} (hg : ∀ᵐ y ∂volume, y ∉ ball (0 : V) R → g y = 0) + (hFg : (F : V → ℂ) =ᵐ[volume.restrict (ballDomain Ω R').carrier] g) {χ : V → ℝ} + (hχU : tsupport χ ⊆ ball 0 R') (hχ1 : ∀ x ∈ Metric.closedBall (0 : V) R, χ x = 1) : + (fun x => (χ x : ℂ) * F x) =ᵐ[volume.restrict Ω] g := by + rw [← restrict_interior Ω] + refine (ae_restrict_iff' measurableSet_interior).2 ?_ + have hF := (ae_restrict_iff' (ballDomain Ω R').measurableSet).1 hFg + filter_upwards [hF, hg] with y h2 h3 hy + by_cases hyR' : y ∈ ball (0 : V) R' + · rw [h2 (by rw [carrier_ballDomain]; exact ⟨hy, hyR'⟩)] + by_cases hyR : y ∈ ball (0 : V) R + · rw [hχ1 y (ball_subset_closedBall hyR), Complex.ofReal_one, one_mul] + · rw [h3 hyR, mul_zero] + · have h0 : χ y = 0 := image_eq_zero_of_notMem_tsupport fun h => hyR' (hχU h) + rw [h0, Complex.ofReal_zero, zero_mul, h3 fun h => hyR' (ball_subset_ball hR h)] + +/-- **From a bounded convex piece to the Besov domain**: for `1 ≤ p < ∞`, `0 < s < r`, +`1 ≤ q ≤ ∞`, `R < R'` and `g ∈ L_p(V)` vanishing almost everywhere outside `B(0, R)`, if the +intrinsic quasi-norm `N_D(g)` on the piece `D = O ∩ B(0, R')` is finite, so is `N_Ω(g)`. The piece +has the extension property (`Rd.BoundedLipschitzDomain.hasBesovExtension`), which gives `F` on `V` +with `F = g` on `D`; for a smooth cutoff `χ` equal to `1` on `B̄(0, R)` with compact support in +`B(0, R')` (`Rd.exists_contDiff_eventuallyEq_one`), `χ F` has finite quasi-norm on `V` +(`Rd.exists_mul_modNorm_le`) and agrees with `g` on `Ω` (`Rd.BesovDomain.mul_ae_eq_of_ballDomain`), +so `N_Ω(g)` is finite (`Rd.modNormOn_le_modNorm_of_indicatorLp`). -/ +theorem modNormOn_lt_top_of_ballDomain {p : ℝ≥0∞} [Fact (1 ≤ p)] (hp : p ≠ ∞) {r : ℕ} {s : ℝ} + (hs : 0 < s) (hsr : s < r) {q : ℝ≥0∞} (hq : 1 ≤ q) {R R' : ℝ} (hR : R < R') + {g : Lp ℂ p (volume : Measure V)} (hg : ∀ᵐ y ∂volume, y ∉ ball (0 : V) R → g y = 0) + (hD : modNormOn (ballDomain Ω R').measurableSet r s q g < ∞) : + modNormOn (measurableSet Ω) r s q g < ∞ := by + obtain ⟨C, hC, hext⟩ := (ballDomain Ω R').hasBesovExtension p hp r s hs hsr q hq + obtain ⟨F, hFg, hFle⟩ := hext g hD + obtain ⟨χ, hχ, hχc, hχU, -, hχ1⟩ := exists_contDiff_eventuallyEq_one + (isCompact_closedBall (0 : V) R) isOpen_ball (closedBall_subset_ball hR) + obtain ⟨C', hC', hmul⟩ := exists_mul_modNorm_le hp (Complex.ofRealCLM.contDiff.comp hχ) + (hχc.comp_left Complex.ofReal_zero) hsr hq + obtain ⟨G, hG, hGle⟩ := hmul F + have hG' : (G : V → ℂ) =ᵐ[volume.restrict Ω] fun x => (χ x : ℂ) * F x := + ae_restrict_of_ae hG + have hGg : indicatorLp (measurableSet Ω) G = indicatorLp (measurableSet Ω) g := + (indicatorLp_eq_iff_ae_eq_restrict _).2 (hG'.trans (mul_ae_eq_of_ballDomain hR.le hg + ((indicatorLp_eq_iff_ae_eq_restrict _).1 hFg) hχU (Eventually.self_of_nhdsSet hχ1))) + exact (modNormOn_le_modNorm_of_indicatorLp (measurableSet Ω) r s q hGg).trans_lt + (hGle.trans_lt (ENNReal.mul_lt_top hC'.lt_top + (hFle.trans_lt (ENNReal.mul_lt_top hC.lt_top hD)))) + +/-- **Localisation on Besov domains**: for `1 ≤ p < ∞`, `0 < s < r`, `1 ≤ q ≤ ∞`, `R < R'` and +every `g ∈ L_p(V)` vanishing almost everywhere outside `B(0, R)`, the intrinsic quasi-norm of `g` +on `Ω` is finite iff the one on the bounded convex piece `D = O ∩ B(0, R')` is finite: +`N_D(g) ≤ N_Ω(g)` (`Rd.modNormOn_mono_set`), and +`Rd.BesovDomain.modNormOn_lt_top_of_ballDomain`. -/ +theorem modNormOn_lt_top_iff_ballDomain {p : ℝ≥0∞} [Fact (1 ≤ p)] (hp : p ≠ ∞) {r : ℕ} {s : ℝ} + (hs : 0 < s) (hsr : s < r) {q : ℝ≥0∞} (hq : 1 ≤ q) {R R' : ℝ} (hR : R < R') + {g : Lp ℂ p (volume : Measure V)} (hg : ∀ᵐ y ∂volume, y ∉ ball (0 : V) R → g y = 0) : + modNormOn (measurableSet Ω) r s q g < ∞ ↔ + modNormOn (ballDomain Ω R').measurableSet r s q g < ∞ := + ⟨fun h => (modNormOn_mono_set _ _ (ballDomain_subset Ω R') r s q g).trans_lt h, + modNormOn_lt_top_of_ballDomain hp hs hsr hq hR hg⟩ + +/-! ### The weak gradient on the interior -/ + +/-- **A finite intrinsic `B^1_{2,2}` quasi-norm gives a weak gradient**: if `g ∈ L_2(V)` has +`‖g‖_{L_2(Ω)} + ‖(2^k ω_r(g, 2^(-k), Ω)_2)_k‖_{ℓ_2} < ∞` for an order `r ≥ 2`, then `g` has +weak derivatives `∂_{e_j} g ∈ L_2(O)` on `O = interior Ω` along the basis vectors +`e_j = Rd.gridBasis V j`. The extension property of `Ω` gives `F` on `V` with `F = g` on `Ω` +and finite `B^1_{2,2}(V)` quasi-norm, so `F ∈ W^1_2(V)` (`Rd.memSobolev_one_iff_modulus`); its +weak derivatives restrict to `O` (`Rd.HasWeakLineDeriv.mono`, `Rd.HasWeakLineDeriv.congr_ae`). -/ +theorem exists_hasWeakLineDeriv_of_modNormOn_lt_top {r : ℕ} (hr : 2 ≤ r) + {g : Lp ℂ 2 (volume : Measure V)} (hg : modNormOn (measurableSet Ω) r 1 2 g < ∞) : + ∃ g' : Fin (finrank ℝ V) → Lp ℂ 2 (volume.restrict (interior Ω)), + ∀ j, HasWeakLineDeriv (Opens.interior Ω) (fun _ : Fin 1 => gridBasis V j) g (g' j) := by + have hr' : (1 : ℝ) < r := by exact_mod_cast Nat.lt_of_lt_of_le one_lt_two hr + obtain ⟨C, hC, hext⟩ := hasBesovExtension Ω 2 two_ne_top r 1 one_pos hr' 2 one_le_two + obtain ⟨F, hFg, hFle⟩ := hext g hg + have hF : MemSobolev 1 F := (memSobolev_one_iff_modulus hr F).2 + (hFle.trans_lt (ENNReal.mul_lt_top hC.lt_top hg)) + have hFg' : (F : V → ℂ) =ᵐ[volume.restrict (interior Ω)] g := + ae_mono (Measure.restrict_mono interior_subset le_rfl) + ((indicatorLp_eq_iff_ae_eq_restrict _).1 hFg) + choose G hG hFG using fun j : Fin (finrank ℝ V) => hF.2 1 le_rfl fun _ => gridBasis V j + have hG' : ∀ j, MemLp (G j) 2 (volume.restrict (interior Ω)) := fun j => + (hG j).mono_measure (by rw [volume_restrict_top]; exact Measure.restrict_le_self) + exact ⟨fun j => (hG' j).toLp _, fun j => + ((hFG j).mono le_top).congr_ae hFg' (hG' j).coeFn_toLp.symm⟩ + +/-- **A weak gradient gives a finite intrinsic `B^1_{2,2}` quasi-norm**: if `g ∈ L_2(V)` vanishes +almost everywhere outside `B(0, R)` and has weak derivatives `g'_j = ∂_{e_j} g ∈ L_2(O)` on +`O = interior Ω` along the basis vectors `e_j`, then +`‖g‖_{L_2(Ω)} + ‖(2^k ω_r(g, 2^(-k), Ω)_2)_k‖_{ℓ_2} < ∞` for every order `r ≥ 2`. On the piece +`D = O ∩ B(0, R + 1)`, `g ∈ W^1_2(D) = H^1(D)` (`Rd.memWeakSobolev_one_of_forall_gridBasis`, +`Rd.BoundedLipschitzDomain.memSobolevOn_iff_memWeakSobolev`), whose intrinsic quasi-norm is finite +(`Rd.BoundedLipschitzDomain.memSobolevOn_iff_modulusOn`); localisation passes to `Ω` +(`Rd.BesovDomain.modNormOn_lt_top_of_ballDomain`). -/ +theorem modNormOn_lt_top_of_hasWeakLineDeriv {r : ℕ} (hr : 2 ≤ r) {R : ℝ} + {g : Lp ℂ 2 (volume : Measure V)} (hg : ∀ᵐ y ∂volume, y ∉ ball (0 : V) R → g y = 0) + {g' : Fin (finrank ℝ V) → Lp ℂ 2 (volume.restrict (interior Ω))} + (h : ∀ j, HasWeakLineDeriv (Opens.interior Ω) (fun _ : Fin 1 => gridBasis V j) g (g' j)) : + modNormOn (measurableSet Ω) r 1 2 g < ∞ := by + have hW : MemWeakSobolev (ballDomain Ω (R + 1)).toOpens 1 2 g := + memWeakSobolev_one_of_forall_gridBasis one_le_two ((Lp.memLp g).restrict _) + (fun j => (Lp.memLp (g' j)).mono_measure + (Measure.restrict_mono (ballDomain_subset_interior Ω _) le_rfl)) + fun j => (h j).mono (toOpens_ballDomain_le Ω _) + have hD := ((ballDomain Ω (R + 1)).memSobolevOn_iff_modulusOn hr g).1 + (((ballDomain Ω (R + 1)).memSobolevOn_iff_memWeakSobolev g).2 hW) + exact modNormOn_lt_top_of_ballDomain (r := r) (s := 1) two_ne_top one_pos + (by exact_mod_cast Nat.lt_of_lt_of_le one_lt_two hr) one_le_two (lt_add_one R) hg hD + +/-- **`W^1_2 = B^1_{2,2}` for compactly supported functions on a Besov domain**: for every +`g ∈ L_2(V)` vanishing almost everywhere outside a ball `B(0, R)`, `g` has weak derivatives +`∂_{e_j} g ∈ L_2(O)` on `O = interior Ω` along the basis vectors `e_j = Rd.gridBasis V j` iff +`‖g‖_{L_2(Ω)} + ‖(2^k ω_r(g, 2^(-k), Ω)_2)_k‖_{ℓ_2} < ∞`, for every order `r ≥ 2` +(`Rd.BesovDomain.modNormOn_lt_top_of_hasWeakLineDeriv`, +`Rd.BesovDomain.exists_hasWeakLineDeriv_of_modNormOn_lt_top`). -/ +theorem exists_hasWeakLineDeriv_iff_modNormOn_lt_top {r : ℕ} (hr : 2 ≤ r) {R : ℝ} + {g : Lp ℂ 2 (volume : Measure V)} (hg : ∀ᵐ y ∂volume, y ∉ ball (0 : V) R → g y = 0) : + (∃ g' : Fin (finrank ℝ V) → Lp ℂ 2 (volume.restrict (interior Ω)), + ∀ j, HasWeakLineDeriv (Opens.interior Ω) (fun _ : Fin 1 => gridBasis V j) g (g' j)) ↔ + modNormOn (measurableSet Ω) r 1 2 g < ∞ := + ⟨fun ⟨_, h⟩ => modNormOn_lt_top_of_hasWeakLineDeriv hr hg h, + exists_hasWeakLineDeriv_of_modNormOn_lt_top hr⟩ + +end BesovDomain + +end Rd diff --git a/LeanPool/FunctionSpaces/Domains/Lipschitz/BesovDomains.lean b/LeanPool/FunctionSpaces/Domains/Lipschitz/BesovDomains.lean new file mode 100644 index 0000000000..5905a13f8c --- /dev/null +++ b/LeanPool/FunctionSpaces/Domains/Lipschitz/BesovDomains.lean @@ -0,0 +1,356 @@ +/- +Copyright (c) 2026 Mario Ullrich. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Mario Ullrich +-/ +module + +public import LeanPool.FunctionSpaces.Domains.Lipschitz.HalfSpace +public import LeanPool.FunctionSpaces.Domains.Lipschitz.GraphStraightening +public import LeanPool.FunctionSpaces.Domains.Traces.GraphTraceCharts +public import LeanPool.FunctionSpaces.Domains.Lipschitz.SurfaceMeasure +public import LeanPool.FunctionSpaces.Domains.Lipschitz.ConvexDomains +public import Mathlib.Analysis.Convex.Measure + +/- +Modified for Lean Pool: module names and imports adapted. +-/ + +/-! +# Besov domains: graph domains, the quadrant, bounded domains + +The results rest on the extension property (`Rd.HasBesovExtension`) of Lipschitz graph domains +(`Rd.LipschitzGraph.hasBesovExtension`) and on Besov domains up to null sets +(`Rd.BesovDomain.of_ae_eq`). + +**Lipschitz graph domains.** Their graph `{φ = ⟪·, e⟫}` is a null set +(`Rd.LipschitzGraph.volume_graph`): it lies in the image of the hyperplane `e^⊥` under the +Lipschitz map `y ↦ y + φ(y) e`. So is their frontier (`Rd.LipschitzGraph.volume_frontier_domain`). +Hence the closure of a graph domain with convex `φ` is a Besov domain +(`Rd.BesovDomain.closure_lipschitzGraph`). + +**The quadrant** `{y : ∀ i, 0 < y_i}` in `ℝ^n` is a single Lipschitz graph domain, near the corner +as well, in the diagonal direction (`Rd.LipschitzGraph.quadrant`): with the diagonal unit vector +`e = (1, …, 1)/√n` (`Rd.quadrantDir`) and the smallest coordinate `m(y) = min_i y_i` +(`Rd.quadrantMin`), the graph function `φ(y) = ⟪y, e⟫ - √n m(y)` is `(1 + √n)`-Lipschitz and +constant along `e`, and `φ(y) < ⟪y, e⟫` exactly when `m(y) > 0`. The closed quadrant differs from +the open one by its frontier, a null set (Mathlib's `Convex.addHaar_frontier`), so the range of +Mathlib's model with corners `modelWithCornersEuclideanQuadrant n` is a Besov domain +(`Rd.BesovDomain.range_euclideanQuadrant`). The results on Besov spaces on compact manifolds +therefore hold for manifolds with corners. + +**Bounded Lipschitz domains** have the property (`Rd.BoundedLipschitzDomain.hasBesovExtension`), +by the extension with a bound (`Rd.BoundedLipschitzDomain.exists_besov_extension_le`), so the order +of the differences does not matter on them (`Rd.BoundedLipschitzDomain.modNormOn_order_le`). Their +frontier is a null set, so their closure agrees with them up to a null set +(`Rd.BoundedLipschitzDomain.closure_ae_eq`), and the closure of a nonempty convex one is a Besov +domain (`Rd.BesovDomain.closure_boundedLipschitzDomain`). Bounded open convex sets are bounded +Lipschitz domains, so the closure of every nonempty bounded open convex set is a Besov domain +(`Rd.BesovDomain.closure_of_convex`): closed balls of positive radius +(`Rd.BesovDomain.closedBall`) and the closed unit cube `[0, 1]^n` +(`Rd.BesovDomain.closedUnitCube`) are examples. +-/ + +@[expose] public section + +open MeasureTheory Filter Topology Module Metric Set +open scoped ENNReal NNReal + +open ENNReal (lqNorm dyadicWeight) + +namespace Rd + +variable {V : Type*} [NormedAddCommGroup V] [InnerProductSpace ℝ V] [FiniteDimensional ℝ V] + [MeasurableSpace V] [BorelSpace V] + +/-! ### Lipschitz graph domains -/ + +namespace LipschitzGraph + +variable (G : LipschitzGraph V) + +/-- **The graph of a Lipschitz graph domain is a null set**: `{x : φ(x) = ⟪x, e⟫}` lies in a +Lipschitz image of the null hyperplane `e^⊥` (`Rd.LipschitzGraph.graph_subset_image_unflatten`, +`Rd.volume_image_eq_zero_of_lipschitzWith`). -/ +theorem volume_graph : volume {x | G.phi x = inner ℝ x G.e} = 0 := + measure_mono_null G.graph_subset_image_unflatten + (volume_image_eq_zero_of_lipschitzWith rfl G.lipschitzWith_unflatten + (volume_orthogonal_singleton_eq_zero G.e_ne_zero)) + +/-- **The boundary of a Lipschitz graph domain is a null set**: the frontier of +`{x : φ(x) < ⟪x, e⟫}` lies in the graph (Mathlib's `frontier_lt_subset_eq`), a null set +(`Rd.LipschitzGraph.volume_graph`). -/ +theorem volume_frontier_domain : volume (frontier G.domain) = 0 := + measure_mono_null (frontier_lt_subset_eq G.continuous_phi (continuous_id.inner continuous_const)) + G.volume_graph + +/-- **The closure of a Lipschitz graph domain is the domain up to a null set**, since the frontier +is a null set (`Rd.LipschitzGraph.volume_frontier_domain`, Mathlib's +`closure_ae_eq_of_null_frontier`). -/ +theorem closure_domain_ae_eq : closure G.domain =ᵐ[volume] G.domain := + closure_ae_eq_of_null_frontier G.volume_frontier_domain + +omit [FiniteDimensional ℝ V] [MeasurableSpace V] [BorelSpace V] in +/-- **A graph domain with convex graph function is convex**: `{x : φ(x) < ⟪x, e⟫}` is a strict +sublevel set of the convex function `φ - ⟪e, ·⟫` (Mathlib's `ConvexOn.convex_lt`), convex since +`⟪e, ·⟫` is linear (Mathlib's `LinearMap.concaveOn`). -/ +theorem convex_domain (hφ : ConvexOn ℝ univ G.phi) : Convex ℝ G.domain := by + have h := (hφ.sub ((innerₛₗ ℝ G.e).concaveOn convex_univ)).convex_lt 0 + convert h using 1 + ext x + simp [LipschitzGraph.domain, real_inner_comm, sub_neg] + +omit [FiniteDimensional ℝ V] [MeasurableSpace V] [BorelSpace V] in +/-- **A Lipschitz graph domain is nonempty**: it contains `(φ(0) + 1) e`, since `φ` is constant +along `e`. -/ +theorem domain_nonempty : G.domain.Nonempty := by + refine ⟨(G.phi 0 + 1) • G.e, ?_⟩ + change G.phi ((G.phi 0 + 1) • G.e) < inner ℝ ((G.phi 0 + 1) • G.e) G.e + have h := G.const 0 (G.phi 0 + 1) + rw [zero_add] at h + rw [h, real_inner_smul_left, real_inner_self_eq_norm_sq, G.norm_e] + linarith + +end LipschitzGraph + +/-- **The closure of a convex Lipschitz graph domain is a Besov domain**: for a convex graph +function `φ` the closure of `{x : φ(x) < ⟪x, e⟫}` is closed and convex, contains the open domain in +its interior, and agrees with the domain up to the null graph. Examples are half-spaces, the +quadrant (`Rd.LipschitzGraph.quadrant`), the circular cones `{x : M ‖x - ⟪x, e⟫ e‖ < ⟪x, e⟫}` and +the epigraphs of convex Lipschitz functions. -/ +theorem BesovDomain.closure_lipschitzGraph (G : LipschitzGraph V) + (hφ : ConvexOn ℝ Set.univ G.phi) : BesovDomain (closure G.domain) := + of_ae_eq (G.convex_domain hφ).closure isClosed_closure + (G.domain_nonempty.mono G.isOpen_domain.subset_interior_closure) G.hasBesovExtension + G.closure_domain_ae_eq + +/-! ### The quadrant -/ + +section Quadrant + +variable (n : ℕ) + +/-- The **diagonal direction** `(1, …, 1)/√n` of `ℝ^n`. -/ +noncomputable def quadrantDir : EuclideanSpace ℝ (Fin n) := + WithLp.toLp 2 fun _ => (Real.sqrt n)⁻¹ + +/-- Each coordinate of the diagonal direction is `1/√n`. -/ +theorem quadrantDir_apply (i : Fin n) : quadrantDir n i = (Real.sqrt n)⁻¹ := rfl + +/-- `⟪y, (1, …, 1)/√n⟫ = (y_1 + … + y_n)/√n`. -/ +theorem inner_quadrantDir (y : EuclideanSpace ℝ (Fin n)) : + inner ℝ y (quadrantDir n) = (Real.sqrt n)⁻¹ * ∑ i, y i := by + rw [PiLp.inner_apply, Finset.mul_sum] + simp [quadrantDir_apply] + +section Positive + +variable [NeZero n] + +/-- The diagonal direction is a unit vector. -/ +theorem norm_quadrantDir : ‖quadrantDir n‖ = 1 := by + have hn : (n : ℝ) ≠ 0 := Nat.cast_ne_zero.2 (NeZero.ne n) + rw [EuclideanSpace.norm_eq] + simp [quadrantDir_apply, inv_pow, Real.sq_sqrt (Nat.cast_nonneg n), hn] + +/-- The **smallest coordinate** `min_i y_i` of `y ∈ ℝ^n`, for `n ≥ 1`. -/ +noncomputable def quadrantMin (y : EuclideanSpace ℝ (Fin n)) : ℝ := + Finset.univ.inf' Finset.univ_nonempty fun i => y i + +/-- The smallest coordinate is at most every coordinate. -/ +theorem quadrantMin_le (y : EuclideanSpace ℝ (Fin n)) (i : Fin n) : quadrantMin n y ≤ y i := + Finset.inf'_le _ (Finset.mem_univ i) + +/-- `c ≤ min_i y_i` iff `c ≤ y_i` for every `i`. -/ +theorem le_quadrantMin_iff {y : EuclideanSpace ℝ (Fin n)} {c : ℝ} : + c ≤ quadrantMin n y ↔ ∀ i, c ≤ y i := by + simp [quadrantMin, Finset.le_inf'_iff] + +/-- `c < min_i y_i` iff `c < y_i` for every `i`. -/ +theorem lt_quadrantMin_iff {y : EuclideanSpace ℝ (Fin n)} {c : ℝ} : + c < quadrantMin n y ↔ ∀ i, c < y i := by + simp [quadrantMin, Finset.lt_inf'_iff] + +/-- **The smallest coordinate along the diagonal**: `m(y + t e) = m(y) + t/√n`, since every +coordinate grows by `t/√n`. -/ +theorem quadrantMin_add_smul (y : EuclideanSpace ℝ (Fin n)) (t : ℝ) : + quadrantMin n (y + t • quadrantDir n) = quadrantMin n y + t / Real.sqrt n := by + have hc : ∀ i, (y + t • quadrantDir n) i = y i + t / Real.sqrt n := fun i => by + rw [PiLp.add_apply, PiLp.smul_apply, quadrantDir_apply, smul_eq_mul, div_eq_mul_inv] + refine le_antisymm ?_ ((le_quadrantMin_iff n).2 fun i => ?_) + · have h : quadrantMin n (y + t • quadrantDir n) - t / Real.sqrt n ≤ quadrantMin n y := + (le_quadrantMin_iff n).2 fun i => by + linarith [quadrantMin_le n (y + t • quadrantDir n) i, hc i] + linarith + · rw [hc i] + linarith [quadrantMin_le n y i] + +/-- `min_i y_i ≤ min_i z_i + ‖y - z‖`, since `y_i ≤ z_i + |y_i - z_i|` and every coordinate is +at most the Euclidean norm (Mathlib's `PiLp.norm_apply_le`). -/ +theorem quadrantMin_le_add_norm (y z : EuclideanSpace ℝ (Fin n)) : + quadrantMin n y ≤ quadrantMin n z + ‖y - z‖ := by + have h : quadrantMin n y - ‖y - z‖ ≤ quadrantMin n z := (le_quadrantMin_iff n).2 fun i => by + have h1 : |y i - z i| ≤ ‖y - z‖ := by + simpa [Real.norm_eq_abs] using PiLp.norm_apply_le (y - z) i + linarith [quadrantMin_le n y i, le_abs_self (y i - z i)] + linarith + +/-- **The smallest coordinate is `1`-Lipschitz**: `|m(y) - m(z)| ≤ ‖y - z‖`. -/ +theorem abs_quadrantMin_sub_le (y z : EuclideanSpace ℝ (Fin n)) : + |quadrantMin n y - quadrantMin n z| ≤ ‖y - z‖ := + abs_sub_le_iff.2 ⟨by linarith [quadrantMin_le_add_norm n y z], + by linarith [quadrantMin_le_add_norm n z y, norm_sub_rev y z]⟩ + +/-- **The smallest coordinate is concave**, as a minimum of linear functions. -/ +theorem concaveOn_quadrantMin : ConcaveOn ℝ univ (quadrantMin n) := by + refine ⟨convex_univ, fun y _ z _ a b ha hb _ => (le_quadrantMin_iff n).2 fun i => ?_⟩ + rw [PiLp.add_apply, PiLp.smul_apply, PiLp.smul_apply, smul_eq_mul, smul_eq_mul, smul_eq_mul, + smul_eq_mul] + exact add_le_add (mul_le_mul_of_nonneg_left (quadrantMin_le n y i) ha) + (mul_le_mul_of_nonneg_left (quadrantMin_le n z i) hb) + +/-- **The quadrant as a Lipschitz graph domain**: the direction is the diagonal +`e = (1, …, 1)/√n`, the graph function `φ(y) = ⟪y, e⟫ - √n min_i y_i` is `(1 + √n)`-Lipschitz and +constant along `e`. Its domain is the open quadrant (`Rd.LipschitzGraph.quadrant_domain`). -/ +noncomputable def LipschitzGraph.quadrant : LipschitzGraph (EuclideanSpace ℝ (Fin n)) where + e := quadrantDir n + norm_e := norm_quadrantDir n + M := 1 + Real.sqrt n + M_nonneg := by positivity + phi y := inner ℝ y (quadrantDir n) - Real.sqrt n * quadrantMin n y + lipschitz y z := by + have h1 : |inner ℝ (y - z) (quadrantDir n)| ≤ ‖y - z‖ := by + simpa [norm_quadrantDir] using abs_real_inner_le_norm (y - z) (quadrantDir n) + have h2 : Real.sqrt n * |quadrantMin n y - quadrantMin n z| ≤ Real.sqrt n * ‖y - z‖ := + mul_le_mul_of_nonneg_left (abs_quadrantMin_sub_le n y z) (Real.sqrt_nonneg _) + rw [inner_sub_left] at h1 + calc |inner ℝ y (quadrantDir n) - Real.sqrt n * quadrantMin n y - + (inner ℝ z (quadrantDir n) - Real.sqrt n * quadrantMin n z)| + = |(inner ℝ y (quadrantDir n) - inner ℝ z (quadrantDir n)) - + Real.sqrt n * (quadrantMin n y - quadrantMin n z)| := by ring_nf + _ ≤ |inner ℝ y (quadrantDir n) - inner ℝ z (quadrantDir n)| + + |Real.sqrt n * (quadrantMin n y - quadrantMin n z)| := abs_sub _ _ + _ ≤ (1 + Real.sqrt n) * ‖y - z‖ := by + rw [abs_mul, abs_of_nonneg (Real.sqrt_nonneg _)] + linarith + const y t := by + have hn : Real.sqrt n ≠ 0 := Real.sqrt_ne_zero'.2 (Nat.cast_pos.2 (NeZero.pos n)) + rw [quadrantMin_add_smul, inner_add_left, real_inner_smul_left, real_inner_self_eq_norm_sq, + norm_quadrantDir, mul_add, mul_div_cancel₀ t hn] + ring + +/-- **The domain of the quadrant graph is the open quadrant** `{y : ∀ i, 0 < y_i}`: +`φ(y) < ⟪y, e⟫` iff `√n min_i y_i > 0`. -/ +theorem LipschitzGraph.quadrant_domain : + (LipschitzGraph.quadrant n).domain = {y | ∀ i, 0 < y i} := by + have hn : 0 < Real.sqrt n := Real.sqrt_pos.2 (Nat.cast_pos.2 (NeZero.pos n)) + ext y + change inner ℝ y (quadrantDir n) - Real.sqrt n * quadrantMin n y < inner ℝ y (quadrantDir n) ↔ _ + rw [sub_lt_self_iff, mul_pos_iff_of_pos_left hn, lt_quadrantMin_iff] + rfl + +/-- **The graph function of the quadrant is convex**: it is a linear function, convex by Mathlib's +`LinearMap.convexOn`, minus `√n` times the concave smallest coordinate +(`Rd.concaveOn_quadrantMin`). -/ +theorem LipschitzGraph.convexOn_quadrant_phi : ConvexOn ℝ univ (LipschitzGraph.quadrant n).phi := by + have hlin : ConvexOn ℝ univ fun y : EuclideanSpace ℝ (Fin n) => inner ℝ y (quadrantDir n) := by + convert (innerₛₗ ℝ (quadrantDir n)).convexOn convex_univ using 1 + funext y + simp [real_inner_comm] + exact hlin.sub ((concaveOn_quadrantMin n).smul (Real.sqrt_nonneg _)) + +end Positive + +/-- **The closed quadrant is the open quadrant up to a null set**: the open quadrant is the interior +of the closed one (Mathlib's `interior_quadrant`), and the frontier of a convex set is a +null set (Mathlib's `Convex.addHaar_frontier`). -/ +theorem quadrant_ae_eq : + {y : EuclideanSpace ℝ (Fin n) | ∀ i, 0 ≤ y i} =ᵐ[volume] {y | ∀ i, 0 < y i} := by + rw [← interior_quadrant (n := n) 2 0] + exact (interior_ae_eq_of_null_frontier (EuclideanQuadrant.convex.addHaar_frontier volume)).symm + +/-- **The quadrant model of manifolds with corners is a Besov domain**: the range +`{y : ∀ i, 0 ≤ y_i}` of `modelWithCornersEuclideanQuadrant n` agrees up to a null set with the open +quadrant, a Lipschitz graph domain (`Rd.LipschitzGraph.quadrant`). For `n = 0` the range is the +whole (one-point) space. -/ +instance BesovDomain.range_euclideanQuadrant : + BesovDomain (range (modelWithCornersEuclideanQuadrant n)) := by + have hrange : range (modelWithCornersEuclideanQuadrant n) = {y | ∀ i, 0 ≤ y i} := + _root_.range_euclideanQuadrant n + rcases Nat.eq_zero_or_pos n with rfl | hn + · have h : {y : EuclideanSpace ℝ (Fin 0) | ∀ i, 0 ≤ y i} = Set.univ := + eq_univ_of_forall fun _ i => Fin.elim0 i + rw [hrange, h] + exact BesovDomain.univ + · have : NeZero n := ⟨hn.ne'⟩ + refine BesovDomain.range_of_ae_eq _ (LipschitzGraph.quadrant n).hasBesovExtension ?_ + rw [hrange, LipschitzGraph.quadrant_domain] + exact quadrant_ae_eq n + +end Quadrant + +/-! ### Bounded Lipschitz domains -/ + +namespace BoundedLipschitzDomain + +variable (Ω : BoundedLipschitzDomain V) + +/-- **Bounded Lipschitz domains have the extension property** +(`Rd.BoundedLipschitzDomain.exists_besov_extension_le`). -/ +theorem hasBesovExtension : HasBesovExtension Ω.measurableSet := by + intro p _ hp r s hs hsr q hq + exact Ω.exists_besov_extension_le hp hs hsr hq + +/-- **The closure of a bounded Lipschitz domain is the domain up to a null set**, since the +frontier is a null set (`Rd.BoundedLipschitzDomain.volume_frontier`, Mathlib's +`closure_ae_eq_of_null_frontier`). -/ +theorem closure_ae_eq : closure Ω.carrier =ᵐ[volume] Ω.carrier := + closure_ae_eq_of_null_frontier Ω.volume_frontier + +/-- **The order of the differences does not matter on a bounded Lipschitz domain** +(DeVore–Sharpley): for `1 ≤ p < ∞`, `0 < s < r`, `s < r'` and `1 ≤ q ≤ ∞` there is `C < ∞` with +`N_Ω(f; r') ≤ C N_Ω(f; r)` whenever `N_Ω(f; r) < ∞`, where +`N_Ω(f; r) = ‖1_Ω f‖_p + ‖(2^(ks) ω_r(f, 2^(-k), Ω)_p)_k‖_{ℓ_q}`. This holds for every bounded +Lipschitz domain, convex or not (`Rd.HasBesovExtension.modNormOn_order_le`). -/ +theorem modNormOn_order_le {p : ℝ≥0∞} [Fact (1 ≤ p)] (hp : p ≠ ∞) {r r' : ℕ} {s : ℝ} + (hs : 0 < s) (hsr : s < r) (hsr' : s < r') {q : ℝ≥0∞} (hq : 1 ≤ q) : + ∃ C : ℝ≥0∞, C ≠ ∞ ∧ ∀ f : Lp ℂ p (volume : Measure V), + modNormOn Ω.measurableSet r s q f < ∞ → + modNormOn Ω.measurableSet r' s q f ≤ C * modNormOn Ω.measurableSet r s q f := + Ω.hasBesovExtension.modNormOn_order_le hp hs hsr hsr' hq + +end BoundedLipschitzDomain + +/-- **The closure of a nonempty convex bounded Lipschitz domain is a Besov domain**: it is closed +and convex, contains the nonempty open domain in its interior, and agrees with the domain up to the +null frontier (`Rd.BoundedLipschitzDomain.closure_ae_eq`). -/ +theorem BesovDomain.closure_boundedLipschitzDomain (Ω : BoundedLipschitzDomain V) + (hc : Convex ℝ Ω.carrier) (hne : Ω.carrier.Nonempty) : BesovDomain (closure Ω.carrier) := + of_ae_eq hc.closure isClosed_closure (hne.mono Ω.isOpen.subset_interior_closure) + Ω.hasBesovExtension Ω.closure_ae_eq + +/-- **The closure of a nonempty bounded open convex set is a Besov domain**: for every nonempty +bounded open convex set `U`, the closure `Ū` is a Besov domain, since `U` is a bounded Lipschitz +domain (`Rd.BoundedLipschitzDomain.ofConvex`; Grisvard, Corollary 1.2.2.3). -/ +theorem BesovDomain.closure_of_convex {U : Set V} (hc : Convex ℝ U) (ho : IsOpen U) + (hb : Bornology.IsBounded U) (hne : U.Nonempty) : BesovDomain (closure U) := + closure_boundedLipschitzDomain (BoundedLipschitzDomain.ofConvex hc ho hb) hc hne + +/-- **Closed balls are Besov domains**: for every `c` and `R > 0` the closed ball `B̄(c, R)` is +the closure of the open ball (Mathlib's `closure_ball`), a nonempty bounded open convex set +(`Rd.BesovDomain.closure_of_convex`). -/ +theorem BesovDomain.closedBall (c : V) {R : ℝ} (hR : 0 < R) : + BesovDomain (Metric.closedBall c R) := by + rw [← closure_ball c hR.ne'] + exact closure_of_convex (convex_ball c R) isOpen_ball isBounded_ball (nonempty_ball.2 hR) + +/-- **The closed unit cube is a Besov domain**: `[0, 1]^n ⊆ ℝ^n` is the closure of the open unit +cube (`Rd.closure_unitCube`), a nonempty bounded open convex set +(`Rd.BoundedLipschitzDomain.unitCube`, `Rd.BesovDomain.closure_boundedLipschitzDomain`). -/ +instance BesovDomain.closedUnitCube (n : ℕ) : + BesovDomain {x : EuclideanSpace ℝ (Fin n) | ∀ i, x i ∈ Icc (0 : ℝ) 1} := by + rw [← closure_unitCube n] + exact closure_boundedLipschitzDomain (BoundedLipschitzDomain.unitCube n) (convex_unitCube n) + (nonempty_unitCube n) + +end Rd diff --git a/LeanPool/FunctionSpaces/Domains/Lipschitz/BoundedLipschitz.lean b/LeanPool/FunctionSpaces/Domains/Lipschitz/BoundedLipschitz.lean new file mode 100644 index 0000000000..c2944dadd9 --- /dev/null +++ b/LeanPool/FunctionSpaces/Domains/Lipschitz/BoundedLipschitz.lean @@ -0,0 +1,715 @@ +/- +Copyright (c) 2026 Mario Ullrich. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Mario Ullrich +-/ +module + +public import LeanPool.FunctionSpaces.Domains.Extension.LocalExtension +public import LeanPool.FunctionSpaces.Rd.Differences.PointwiseMultipliers +public import Mathlib.Geometry.Manifold.PartitionOfUnity + +/- +Modified for Lean Pool: module names and imports adapted. +-/ + +/-! +# Bounded Lipschitz domains + +A **bounded Lipschitz domain** (Stein; Schneider–Vybíral, Remark 3.2) is a bounded open +set `Ω ⊆ V` whose boundary `Γ` is covered by finitely many open balls `B_j`, centred on `Γ`, with +`B_j ∩ Ω = B_j ∩ Ω_j` for Lipschitz graph domains `Ω_j` (`Rd.BoundedLipschitzDomain`); the free +direction of each graph domain replaces the rotations of the usual definition. + +**Restrictions by intrinsic differences** +(`Rd.BoundedLipschitzDomain.exists_besov_extension_iff_modulusOn`): for `1 ≤ p < ∞`, +`0 < s < r` and `1 ≤ q ≤ ∞`, `f` agrees on `Ω` with some `F ∈ L_p(V)` with +`‖F‖_p + ‖(2^(ks) ω_r(F, 2^(-k))_p)_k‖_{ℓ_q} < ∞` iff +`‖f‖_{L_p(Ω)} + ‖(2^(ks) ω_r(f, 2^(-k), Ω)_p)_k‖_{ℓ_q} < ∞`; likewise with the band-limited +approximation spaces (`Rd.BoundedLipschitzDomain.exists_memApprox_extension_iff`). The extension +comes with a bound: its quasi-norm on `V` is at most `C` times the intrinsic one, with `C` +depending only on `Ω`, `p`, `r`, `s` and `q` +(`Rd.BoundedLipschitzDomain.exists_besov_extension_le`). + +The proof follows Schneider–Vybíral §3: a covering `Ω̄ ⊆ K_0 ∪ ⋃_j K_j` with an inner domain +`K_0`, a smooth resolution of unity, and pointwise multipliers. + +* The balls shrink: `Γ ⊆ ⋃_j B(c_j, ρ_j - 2ε)` for some `ε > 0` + (`Rd.BoundedLipschitzDomain.exists_shrink`), and the points of `Ω` outside these balls keep a + distance `> 2δ` from `Ωᶜ` (`Rd.BoundedLipschitzDomain.exists_interior_margin`), both by + compactness; `Ωᶜ` is nonempty in dimension `n ≥ 1` + (`Rd.BoundedLipschitzDomain.nonempty_compl`). The shrunk balls and the inner patch are bounded + open sets that cover `Ω̄` (`Rd.BoundedLipschitzDomain.patch`, + `Rd.BoundedLipschitzDomain.closure_subset_iUnion_patch`). A property that pastes over finite + covers of `Ω̄` thus passes from the patches to `Ω` + (`Rd.BoundedLipschitzDomain.exists_of_patches`). +* Local extensions with a bound (`Rd.LocalMeansBump.exists_local_extension_le`) on the boundary + patches `Ω ∩ B(c_j, ρ_j - 2ε)`, with the cone bump of `Ω_j` rescaled to radius `≤ ε / r`, and on + the inner patch `{infDist(·, Ωᶜ) > 2δ}`, with a centred bump of radius `≤ δ / r` + (`Rd.BoundedLipschitzDomain.exists_local_extension_boundary_le`, + `Rd.BoundedLipschitzDomain.exists_local_extension_interior_le`). +* A smooth resolution of unity subordinate to these patches (Mathlib's + `SmoothPartitionOfUnity.exists_isSubordinate`, `Rd.exists_smooth_partition`) pastes the local + extensions (`Rd.exists_pasting_le`, `Rd.indicatorLp_sum_eq_of_partition`, `Rd.ae_sum_mul_eq`), + by the pointwise multipliers of `Rd.modNorm_mulLp_le` and the triangle inequality + `Rd.modNorm_finsetSum_le`. The quasi-norm by differences is subadditive and homogeneous + (`Rd.modNorm_add_le`, `Rd.modNorm_const_smul`). + +For a compact set, the smooth resolutions of unity can be chosen equal to `1` on a neighbourhood +of it (`Rd.exists_smooth_partition_nhds`). +-/ + +@[expose] public section + +open MeasureTheory Filter Topology Module Metric +open scoped ENNReal Manifold + +open ENNReal (lqNorm dyadicWeight) + +namespace Rd + +/-! ### Resolutions of unity -/ + +section Partition + +variable {V : Type*} [NormedAddCommGroup V] [NormedSpace ℝ V] [FiniteDimensional ℝ V] + +/-- **Smooth resolutions of unity**: for a closed set `s` and a finite open cover `(U_i)` of `s` +there are smooth `ψ_i ≥ 0` with `tsupport ψ_i ⊆ U_i`, `∑_i ψ_i = 1` on `s` and `∑_i ψ_i ≤ 1` +everywhere (Mathlib's `SmoothPartitionOfUnity.exists_isSubordinate`). -/ +theorem exists_smooth_partition {ι : Type*} [Fintype ι] {s : Set V} (hs : IsClosed s) + (U : ι → Set V) (hU : ∀ i, IsOpen (U i)) (hcov : s ⊆ ⋃ i, U i) : + ∃ ψ : ι → V → ℝ, (∀ i, ContDiff ℝ ((⊤ : ℕ∞) : WithTop ℕ∞) (ψ i)) ∧ + (∀ i, tsupport (ψ i) ⊆ U i) ∧ (∀ x ∈ s, ∑ i, ψ i x = 1) ∧ (∀ i x, 0 ≤ ψ i x) ∧ + ∀ x, ∑ i, ψ i x ≤ 1 := by + obtain ⟨f, hf⟩ := SmoothPartitionOfUnity.exists_isSubordinate 𝓘(ℝ, V) hs U hU hcov + refine ⟨fun i => f i, fun i => contMDiff_iff_contDiff.1 (f i).contMDiff, hf, fun x hx => ?_, + fun i x => f.nonneg i x, fun x => ?_⟩ + · rw [← finsum_eq_sum_of_fintype] + exact f.sum_eq_one hx + · rw [← finsum_eq_sum_of_fintype] + exact f.sum_le_one x + +/-- **Smooth resolutions of unity equal to one near a compact set**: for a compact set `s` and a +finite open cover `(U_i)` of `s` there are smooth `ψ_i ≥ 0` with `tsupport ψ_i ⊆ U_i`, +`∑_i ψ_i = 1` on a neighbourhood of `s` and `∑_i ψ_i ≤ 1` everywhere: `Rd.exists_smooth_partition` +for a compact `L` with `s ⊆ interior L ⊆ L ⊆ ⋃_i U_i` (Mathlib's `exists_compact_between`). -/ +theorem exists_smooth_partition_nhds {ι : Type*} [Fintype ι] {s : Set V} (hs : IsCompact s) + (U : ι → Set V) (hU : ∀ i, IsOpen (U i)) (hcov : s ⊆ ⋃ i, U i) : + ∃ ψ : ι → V → ℝ, (∀ i, ContDiff ℝ ((⊤ : ℕ∞) : WithTop ℕ∞) (ψ i)) ∧ + (∀ i, tsupport (ψ i) ⊆ U i) ∧ (∀ᶠ x in 𝓝ˢ s, ∑ i, ψ i x = 1) ∧ (∀ i x, 0 ≤ ψ i x) ∧ + ∀ x, ∑ i, ψ i x ≤ 1 := by + obtain ⟨L, hL, hsL, hLU⟩ := exists_compact_between hs (isOpen_iUnion hU) hcov + obtain ⟨ψ, hψ, hψU, hψ1, hψ0, hψle⟩ := exists_smooth_partition hL.isClosed U hU hLU + exact ⟨ψ, hψ, hψU, eventually_of_mem (isOpen_interior.mem_nhdsSet.2 hsL) fun x hx => + hψ1 x (interior_subset hx), hψ0, hψle⟩ + +end Partition + +/-! ### Pasting local extensions -/ + +section Pasting + +variable {V : Type*} [NormedAddCommGroup V] [InnerProductSpace ℝ V] [FiniteDimensional ℝ V] + [MeasurableSpace V] [BorelSpace V] {p : ℝ≥0∞} [Fact (1 ≤ p)] + +/-- The modulus of a finite sum is at most the sum of the moduli. -/ +theorem lpModulus_finsetSum_le {ι : Type*} (t : Finset ι) + (G : ι → Lp ℂ p (volume : Measure V)) (r k : ℕ) : + lpModulus p r (∑ i ∈ t, G i) k ≤ ∑ i ∈ t, lpModulus p r (G i) k := by + classical + induction t using Finset.induction_on with + | empty => simp [lpModulus_zero] + | insert i t hi ih => + rw [Finset.sum_insert hi, Finset.sum_insert hi] + exact (lpModulus_add_le r _ _ k).trans (add_le_add le_rfl ih) + +/-- **The Besov quasi-norm by differences of a finite sum** is at most the sum of the quasi-norms: +`‖∑_i G_i‖_p + ‖(2^(ks) ω_r(∑_i G_i, 2^(-k))_p)_k‖_{ℓ_q} ≤ +∑_i (‖G_i‖_p + ‖(2^(ks) ω_r(G_i, 2^(-k))_p)_k‖_{ℓ_q})` for `q ≥ 1` +(`Rd.lpModulus_finsetSum_le`, `ENNReal.lqNorm_sum_le`). -/ +theorem modNorm_finsetSum_le {ι : Type*} (t : Finset ι) + (G : ι → Lp ℂ p (volume : Measure V)) (r : ℕ) (s : ℝ) {q : ℝ≥0∞} (hq : 1 ≤ q) : + ‖∑ i ∈ t, G i‖ₑ + + lqNorm q (fun k => dyadicWeight s k * lpModulus p r (∑ i ∈ t, G i) k) ≤ + ∑ i ∈ t, (‖G i‖ₑ + lqNorm q (fun k => dyadicWeight s k * lpModulus p r (G i) k)) := by + have h1 : ‖∑ i ∈ t, G i‖ₑ ≤ ∑ i ∈ t, ‖G i‖ₑ := eNorm_sum_le _ _ + have h2 : lqNorm q (fun k => dyadicWeight s k * lpModulus p r (∑ i ∈ t, G i) k) ≤ + ∑ i ∈ t, lqNorm q (fun k => dyadicWeight s k * lpModulus p r (G i) k) := + (ENNReal.lqNorm_mono fun k => (mul_le_mul' le_rfl (lpModulus_finsetSum_le t G r k)).trans_eq + (Finset.mul_sum _ _ _)).trans (ENNReal.lqNorm_sum_le hq _ _) + rw [Finset.sum_add_distrib] + exact add_le_add h1 h2 + +/-- **The Besov quasi-norm by differences is subadditive**: +`‖G + H‖_p + ‖(2^(ks) ω_r(G + H, 2^(-k))_p)_k‖_{ℓ_q} ≤ +(‖G‖_p + ‖(2^(ks) ω_r(G, 2^(-k))_p)_k‖_{ℓ_q}) + (‖H‖_p + ‖(2^(ks) ω_r(H, 2^(-k))_p)_k‖_{ℓ_q})` +for `q ≥ 1` (`Rd.lpModulus_add_le`, `ENNReal.lqNorm_add_le`). -/ +theorem modNorm_add_le (G H : Lp ℂ p (volume : Measure V)) (r : ℕ) (s : ℝ) {q : ℝ≥0∞} + (hq : 1 ≤ q) : + ‖G + H‖ₑ + lqNorm q (fun k => dyadicWeight s k * lpModulus p r (G + H) k) ≤ + (‖G‖ₑ + lqNorm q (fun k => dyadicWeight s k * lpModulus p r G k)) + + (‖H‖ₑ + lqNorm q (fun k => dyadicWeight s k * lpModulus p r H k)) := by + have h2 : lqNorm q (fun k => dyadicWeight s k * lpModulus p r (G + H) k) ≤ + lqNorm q (fun k => dyadicWeight s k * lpModulus p r G k) + + lqNorm q (fun k => dyadicWeight s k * lpModulus p r H k) := + (ENNReal.lqNorm_mono fun k => (mul_le_mul' le_rfl (lpModulus_add_le r G H k)).trans_eq + (mul_add _ _ _)).trans (ENNReal.lqNorm_add_le hq _ _) + rw [add_add_add_comm] + exact add_le_add (eNorm_add_le G H) h2 + +/-- **The Besov quasi-norm by differences is homogeneous**: +`‖c G‖_p + ‖(2^(ks) ω_r(c G, 2^(-k))_p)_k‖_{ℓ_q} = +|c| (‖G‖_p + ‖(2^(ks) ω_r(G, 2^(-k))_p)_k‖_{ℓ_q})` +(`Rd.lpModulus_const_smul`, `ENNReal.lqNorm_const_mul`). -/ +theorem modNorm_const_smul (c : ℂ) (G : Lp ℂ p (volume : Measure V)) (r : ℕ) (s : ℝ) + (q : ℝ≥0∞) : + ‖c • G‖ₑ + lqNorm q (fun k => dyadicWeight s k * lpModulus p r (c • G) k) = + ‖c‖ₑ * (‖G‖ₑ + lqNorm q (fun k => dyadicWeight s k * lpModulus p r G k)) := by + simp_rw [lpModulus_const_smul, mul_left_comm (dyadicWeight s _) ‖c‖ₑ] + rw [ENNReal.lqNorm_const_mul, eNorm_smul, mul_add] + +/-- **Finite sums keep the Besov spaces by differences** (`Rd.modNorm_finsetSum_le`). -/ +theorem modNorm_finsetSum_lt_top {ι : Type*} (t : Finset ι) + (G : ι → Lp ℂ p (volume : Measure V)) {r : ℕ} {s : ℝ} {q : ℝ≥0∞} (hq : 1 ≤ q) + (hG : ∀ i ∈ t, ‖G i‖ₑ + lqNorm q (fun k => dyadicWeight s k * lpModulus p r (G i) k) < ∞) : + ‖∑ i ∈ t, G i‖ₑ + + lqNorm q (fun k => dyadicWeight s k * lpModulus p r (∑ i ∈ t, G i) k) < ∞ := + (modNorm_finsetSum_le t G r s hq).trans_lt (ENNReal.sum_lt_top.2 hG) + +/-- **The pasted functions agree with `f`**: if `∑_i ψ_i = 1` on `O`, `tsupport ψ_i ⊆ U_i` and +`F_i = f` almost everywhere on `O ∩ U_i`, then `∑_i ψ_i F_i = f` almost everywhere on `O`. -/ +theorem ae_sum_mul_eq {ι : Type*} [Fintype ι] {O : Set V} {U : ι → Set V} {ψ : ι → V → ℝ} + (hψU : ∀ i, tsupport (ψ i) ⊆ U i) (hψ1 : ∀ x ∈ O, ∑ i, ψ i x = 1) {F : ι → V → ℂ} + {f : V → ℂ} (hFf : ∀ i, ∀ᵐ x ∂volume, x ∈ O ∩ U i → F i x = f x) : + ∀ᵐ x ∂volume, x ∈ O → ∑ i, (ψ i x : ℂ) * F i x = f x := by + filter_upwards [ae_all_iff.2 hFf] with x h2 hxO + have hterm : ∀ i, (ψ i x : ℂ) * F i x = (ψ i x : ℂ) * f x := fun i => by + by_cases hψx : ψ i x = 0 + · simp [hψx] + · rw [h2 i ⟨hxO, hψU i (subset_tsupport _ hψx)⟩] + simp_rw [hterm] + rw [← Finset.sum_mul, ← Complex.ofReal_sum, hψ1 x hxO, Complex.ofReal_one, one_mul] + +/-- **Pasting with a resolution of unity agrees with `f` on `O`**: if `∑_i ψ_i = 1` on `O`, +`ψ_i` vanishes outside `U_i`, `G_i = ψ_i F_i` almost everywhere and `F_i = f` almost everywhere +on `O ∩ U_i`, then `∑_i G_i = f` almost everywhere on `O`. -/ +theorem indicatorLp_sum_eq_of_partition {ι : Type*} [Fintype ι] {O : Set V} + (hO : MeasurableSet O) (U : ι → Set V) (ψ : ι → V → ℝ) (hψU : ∀ i, Function.support (ψ i) ⊆ U i) + (hψ1 : ∀ x ∈ O, ∑ i, ψ i x = 1) (f : Lp ℂ p (volume : Measure V)) + (F G : ι → Lp ℂ p (volume : Measure V)) + (hG : ∀ i, G i =ᵐ[volume] fun x => ((ψ i x : ℝ) : ℂ) * F i x) + (hFf : ∀ i, ∀ᵐ x ∂(volume : Measure V), x ∈ O → x ∈ U i → F i x = f x) : + indicatorLp hO (∑ i, G i) = indicatorLp hO f := by + refine Lp.ext ?_ + have hall : ∀ᵐ x ∂(volume : Measure V), ∀ i, (x ∈ O → x ∈ U i → F i x = f x) ∧ + G i x = ((ψ i x : ℝ) : ℂ) * F i x := + ae_all_iff.2 fun i => (hFf i).and (hG i) + filter_upwards [indicatorLp_apply_ae hO (∑ i, G i), indicatorLp_apply_ae hO f, + Lp.coeFn_fun_finsetSum Finset.univ G, hall] with x h1 h2 h3 h4 + rw [h1, h2] + by_cases hx : x ∈ O + · rw [Set.indicator_of_mem hx, Set.indicator_of_mem hx, h3] + have hterm : ∀ i, G i x = ((ψ i x : ℝ) : ℂ) * f x := fun i => by + rw [(h4 i).2] + by_cases hψx : ψ i x = 0 + · simp [hψx] + · rw [(h4 i).1 hx (hψU i hψx)] + simp_rw [hterm] + rw [← Finset.sum_mul, ← Complex.ofReal_sum, hψ1 x hx, Complex.ofReal_one, one_mul] + · rw [Set.indicator_of_notMem hx, Set.indicator_of_notMem hx] + +/-- **Pasting local extensions with a bound**: let `(U_i)` be a finite cover of `Ō` by bounded +open sets. There is `C < ∞` such that for all `f` and all `F_i` that agree with `f` almost +everywhere on `O ∩ U_i`, `f` agrees on `O` with some `G` with +`‖G‖_p + ‖(2^(ks) ω_r(G, 2^(-k))_p)_k‖_{ℓ_q} ≤` +`C ∑_i (‖F_i‖_p + ‖(2^(ks) ω_r(F_i, 2^(-k))_p)_k‖_{ℓ_q})`. +The resolution of unity `(ψ_i)` subordinate to `(U_i)` (`Rd.exists_smooth_partition`) and the +bounds on its derivatives (`Rd.exists_iteratedFDeriv_bound`) are fixed before `f`; `G = ∑_i ψ_i F_i` +and `C` is the sum of the multiplier constants of `Rd.modNorm_mulLp_le` (`Rd.multiplierTotal`). -/ +theorem exists_pasting_le {ι : Type*} [Fintype ι] (hp : p ≠ ∞) {r : ℕ} {s : ℝ} (hsr : s < r) + {q : ℝ≥0∞} (hq : 1 ≤ q) {O : Set V} (hO : MeasurableSet O) (U : ι → Set V) + (hUo : ∀ i, IsOpen (U i)) (hUb : ∀ i, Bornology.IsBounded (U i)) + (hcov : closure O ⊆ ⋃ i, U i) : + ∃ C : ℝ≥0∞, C ≠ ∞ ∧ ∀ (f : Lp ℂ p (volume : Measure V)) + (F : ι → Lp ℂ p (volume : Measure V)), + (∀ i, ∀ᵐ x ∂(volume : Measure V), x ∈ O → x ∈ U i → F i x = f x) → + ∃ G : Lp ℂ p (volume : Measure V), indicatorLp hO G = indicatorLp hO f ∧ + ‖G‖ₑ + lqNorm q (fun k => dyadicWeight s k * lpModulus p r G k) ≤ + C * ∑ i, (‖F i‖ₑ + lqNorm q (fun k => dyadicWeight s k * lpModulus p r (F i) k)) := by + obtain ⟨ψ, hψ, hψU, hψ1, -⟩ := exists_smooth_partition isClosed_closure U hUo hcov + set ψC : ι → V → ℂ := fun i x => ((ψ i x : ℝ) : ℂ) + have hψC : ∀ i, ContDiff ℝ ((⊤ : ℕ∞) : WithTop ℕ∞) (ψC i) := fun i => + Complex.ofRealCLM.contDiff.comp (hψ i) + have hcs : ∀ i, HasCompactSupport (ψC i) := fun i => + (isCompact_of_isClosed_isBounded (isClosed_tsupport _) + ((hUb i).subset (hψU i))).of_isClosed_subset (isClosed_tsupport _) + (tsupport_comp_subset Complex.ofReal_zero _) + choose C hC using fun i => exists_iteratedFDeriv_bound (hψC i) (hcs i) r + refine ⟨∑ i, multiplierTotal (V := V) hp r s (C i), + ENNReal.sum_ne_top.2 fun i _ => multiplierTotal_ne_top hp hsr (C i), fun f F hFf => ?_⟩ + set G : ι → Lp ℂ p (volume : Measure V) := fun i => + mulLp (hψC i).continuous (norm_le_of_iteratedFDeriv_le (hC i)) (F i) + refine ⟨∑ i, G i, indicatorLp_sum_eq_of_partition hO U ψ + (fun i => (subset_tsupport _).trans (hψU i)) (fun x hx => hψ1 x (subset_closure hx)) f F G + (fun i => mulLp_apply_ae _ _ (F i)) hFf, + (modNorm_finsetSum_le _ G r s hq).trans ?_⟩ + rw [Finset.mul_sum] + exact Finset.sum_le_sum fun i _ => (modNorm_mulLp_le hp (hψC i) (hC i) hsr hq (F i)).trans + (mul_le_mul' (Finset.single_le_sum (f := fun i => multiplierTotal (V := V) hp r s (C i)) + (fun _ _ => zero_le) (Finset.mem_univ i)) le_rfl) + +/-- **Pasting local extensions**: let `(U_i)` be a finite cover of `Ō` by bounded open sets and +`F_i` functions with finite Besov quasi-norms by differences that agree with `f` almost everywhere +on `O ∩ U_i`. Then `f` agrees on `O` with a function with a finite Besov quasi-norm: `∑_i ψ_i F_i` +for a smooth resolution of unity `(ψ_i)` subordinate to `(U_i)` (`Rd.exists_pasting_le`). -/ +theorem exists_pasting {ι : Type*} [Finite ι] (hp : p ≠ ∞) {r : ℕ} {s : ℝ} (hsr : s < r) + {q : ℝ≥0∞} (hq : 1 ≤ q) {O : Set V} (hO : MeasurableSet O) (U : ι → Set V) + (hUo : ∀ i, IsOpen (U i)) (hUb : ∀ i, Bornology.IsBounded (U i)) + (hcov : closure O ⊆ ⋃ i, U i) (f : Lp ℂ p (volume : Measure V)) + (F : ι → Lp ℂ p (volume : Measure V)) + (hF : ∀ i, ‖F i‖ₑ + lqNorm q (fun k => dyadicWeight s k * lpModulus p r (F i) k) < ∞) + (hFf : ∀ i, ∀ᵐ x ∂(volume : Measure V), x ∈ O → x ∈ U i → F i x = f x) : + ∃ G : Lp ℂ p (volume : Measure V), indicatorLp hO G = indicatorLp hO f ∧ + ‖G‖ₑ + lqNorm q (fun k => dyadicWeight s k * lpModulus p r G k) < ∞ := by + let := Fintype.ofFinite ι + obtain ⟨C, hC, h⟩ := exists_pasting_le hp hsr hq hO U hUo hUb hcov + obtain ⟨G, hG, hle⟩ := h f F hFf + exact ⟨G, hG, hle.trans_lt (ENNReal.mul_lt_top hC.lt_top (ENNReal.sum_lt_top.2 fun i _ => hF i))⟩ + +end Pasting + +/-! ### Bounded Lipschitz domains -/ + +variable {V : Type*} [NormedAddCommGroup V] [InnerProductSpace ℝ V] + +/-- In finite dimension the **frontier of a bounded set is compact**: it is a closed subset of the +compact closure (Mathlib's `Bornology.IsBounded.isCompact_closure`). -/ +theorem isCompact_frontier_of_isBounded [FiniteDimensional ℝ V] {s : Set V} + (hs : Bornology.IsBounded s) : IsCompact (frontier s) := + hs.isCompact_closure.of_isClosed_subset isClosed_frontier frontier_subset_closure + +variable (V) in +/-- A **bounded Lipschitz domain** (Stein; Schneider–Vybíral, Remark 3.2): a bounded open +set whose boundary is covered by finitely many open balls `B_j`, centred on the boundary, with +`B_j ∩ Ω = B_j ∩ Ω_j` for Lipschitz graph domains `Ω_j`; the free direction of each graph domain +replaces the rotations of the usual definition. The structure carries the balls and the graph +domains as data; in finite dimension every set satisfying the usual definition +(`Rd.IsBoundedLipschitzDomain`) is the carrier of one +(`Rd.BoundedLipschitzDomain.ofIsBoundedLipschitzDomain`, `Rd.isBoundedLipschitzDomain_iff_exists`), +every open ball and every bounded open convex set among them (`Rd.BoundedLipschitzDomain.ball`, +`Rd.BoundedLipschitzDomain.ofConvex`, from `Rd.isBoundedLipschitzDomain_of_convex`). -/ +structure BoundedLipschitzDomain where + /-- The domain. -/ + carrier : Set V + isOpen : IsOpen carrier + isBounded : Bornology.IsBounded carrier + /-- The number of boundary balls. -/ + N : ℕ + /-- The centres of the boundary balls. -/ + center : Fin N → V + /-- The radii of the boundary balls. -/ + radius : Fin N → ℝ + radius_pos : ∀ j, 0 < radius j + center_mem : ∀ j, center j ∈ frontier carrier + /-- The Lipschitz graph domains of the boundary balls. -/ + graph : Fin N → LipschitzGraph V + frontier_subset : frontier carrier ⊆ ⋃ j, ball (center j) (radius j) + ball_inter : ∀ j, ball (center j) (radius j) ∩ carrier = + ball (center j) (radius j) ∩ (graph j).domain + +namespace BoundedLipschitzDomain + +variable (Ω : BoundedLipschitzDomain V) + +/-- On a concentric ball of smaller radius the domain is the graph domain. -/ +theorem inter_ball_eq (j : Fin Ω.N) {ρ : ℝ} (hρ : ρ ≤ Ω.radius j) : + Ω.carrier ∩ ball (Ω.center j) ρ = (Ω.graph j).domain ∩ ball (Ω.center j) ρ := by + ext x + constructor + · rintro ⟨hx, hxb⟩ + have h : x ∈ ball (Ω.center j) (Ω.radius j) ∩ Ω.carrier := ⟨ball_subset_ball hρ hxb, hx⟩ + rw [Ω.ball_inter j] at h + exact ⟨h.2, hxb⟩ + · rintro ⟨hx, hxb⟩ + have h : x ∈ ball (Ω.center j) (Ω.radius j) ∩ (Ω.graph j).domain := + ⟨ball_subset_ball hρ hxb, hx⟩ + rw [← Ω.ball_inter j] at h + exact ⟨h.2, hxb⟩ + +variable [FiniteDimensional ℝ V] + +/-- The closure of a bounded Lipschitz domain is compact. -/ +theorem isCompact_closure : IsCompact (closure Ω.carrier) := Ω.isBounded.isCompact_closure + +/-- The boundary of a bounded Lipschitz domain is compact. -/ +theorem isCompact_frontier : IsCompact (frontier Ω.carrier) := + isCompact_frontier_of_isBounded Ω.isBounded + +/-- **Shrinking the boundary balls**: `Γ ⊆ ⋃_j B(c_j, ρ_j - 2ε)` for some `ε > 0`, by +compactness of `Γ`. -/ +theorem exists_shrink : + ∃ ε : ℝ, 0 < ε ∧ frontier Ω.carrier ⊆ ⋃ j, ball (Ω.center j) (Ω.radius j - 2 * ε) := by + set O : ℕ → Set V := fun n => ⋃ j, ball (Ω.center j) (Ω.radius j - 1 / ((n : ℝ) + 1)) + have hmono : Monotone O := fun m n hmn => Set.iUnion_mono fun j => ball_subset_ball (by + have : (1 : ℝ) / ((n : ℝ) + 1) ≤ 1 / ((m : ℝ) + 1) := + one_div_le_one_div_of_le (by positivity) (by exact_mod_cast Nat.succ_le_succ hmn) + linarith) + have hcover : frontier Ω.carrier ⊆ ⋃ n, O n := fun x hx => by + obtain ⟨j, hj⟩ := Set.mem_iUnion.1 (Ω.frontier_subset hx) + rw [mem_ball] at hj + obtain ⟨n, hn⟩ := exists_nat_one_div_lt (sub_pos.2 hj) + exact Set.mem_iUnion.2 ⟨n, Set.mem_iUnion.2 ⟨j, by rw [mem_ball]; linarith⟩⟩ + obtain ⟨n, hn⟩ := Ω.isCompact_frontier.elim_directed_cover O + (fun n => isOpen_iUnion fun j => isOpen_ball) hcover hmono.directed_le + refine ⟨1 / (2 * ((n : ℝ) + 1)), by positivity, hn.trans fun x hx => ?_⟩ + have h2 : 2 * (1 / (2 * ((n : ℝ) + 1))) = 1 / ((n : ℝ) + 1) := by field_simp + rw [h2] + exact hx + +omit [FiniteDimensional ℝ V] in +/-- In dimension `n ≥ 1` the complement of a bounded Lipschitz domain is nonempty, since `V` is +unbounded (Mathlib's `NormedSpace.unbounded_univ`). -/ +theorem nonempty_compl [Nontrivial V] : (Ω.carrierᶜ).Nonempty := by + by_contra h + rw [Set.not_nonempty_iff_eq_empty, Set.compl_empty_iff] at h + exact NormedSpace.unbounded_univ ℝ V (h ▸ Ω.isBounded) + +/-- **The interior margin**: if `Ωᶜ` is nonempty and `Γ ⊆ ⋃_j B(c_j, ρ_j - 2ε)`, the points of +`Ω` outside these balls have distance `> 2δ` from `Ωᶜ` for some `δ > 0`, by compactness. -/ +theorem exists_interior_margin (hc : (Ω.carrierᶜ).Nonempty) {ε : ℝ} + (hε : frontier Ω.carrier ⊆ ⋃ j, ball (Ω.center j) (Ω.radius j - 2 * ε)) : + ∃ δ : ℝ, 0 < δ ∧ ∀ x ∈ Ω.carrier, (∀ j, x ∉ ball (Ω.center j) (Ω.radius j - 2 * ε)) → + 2 * δ < infDist x Ω.carrierᶜ := by + set K := closure Ω.carrier \ ⋃ j, ball (Ω.center j) (Ω.radius j - 2 * ε) + have hK : IsCompact K := Ω.isCompact_closure.diff (isOpen_iUnion fun j => isOpen_ball) + have hKΩ : K ⊆ Ω.carrier := fun x ⟨hx, hxb⟩ => by + have hxf : x ∉ frontier Ω.carrier := fun h => hxb (hε h) + have : x ∈ closure Ω.carrier \ frontier Ω.carrier := ⟨hx, hxf⟩ + rwa [closure_sdiff_frontier, Ω.isOpen.interior_eq] at this + have hpos : ∀ x ∈ Ω.carrier, 0 < infDist x Ω.carrierᶜ := fun x hx => + (Ω.isOpen.isClosed_compl.notMem_iff_infDist_pos hc).1 fun h => h hx + rcases K.eq_empty_or_nonempty with hK0 | hKne + · refine ⟨1, one_pos, fun x hx hxb => ?_⟩ + have : x ∈ K := ⟨subset_closure hx, by simpa using hxb⟩ + rw [hK0] at this + exact this.elim + · obtain ⟨x₀, hx₀, hmin⟩ := hK.exists_isMinOn hKne (continuous_infDist_pt _).continuousOn + refine ⟨infDist x₀ Ω.carrierᶜ / 4, by linarith [hpos x₀ (hKΩ hx₀)], fun x hx hxb => ?_⟩ + have hxK : x ∈ K := ⟨subset_closure hx, by simpa using hxb⟩ + have h1 := hmin hxK + have h2 := hpos x₀ (hKΩ hx₀) + simp only [Set.mem_ofPred_eq] at h1 + linarith + +/-- The **patches** of `Ω` for `ε, δ`: the inner patch `{infDist(·, Ωᶜ) > 2δ}` (index `none`) and +the shrunk boundary balls `B(c_j, ρ_j - 2ε)` (index `some j`). -/ +def patch (ε δ : ℝ) (i : Option (Fin Ω.N)) : Set V := + i.elim {x : V | 2 * δ < infDist x Ω.carrierᶜ} fun j => ball (Ω.center j) (Ω.radius j - 2 * ε) + +omit [FiniteDimensional ℝ V] in +/-- The patches are open. -/ +theorem isOpen_patch (ε δ : ℝ) (i : Option (Fin Ω.N)) : IsOpen (Ω.patch ε δ i) := by + cases i with + | none => exact isOpen_lt continuous_const (continuous_infDist_pt _) + | some j => exact isOpen_ball + +omit [FiniteDimensional ℝ V] in +/-- The patches are bounded for `δ ≥ 0`: the inner patch lies in `Ω` +(`Rd.setOf_lt_infDist_compl_subset`). -/ +theorem isBounded_patch (ε : ℝ) {δ : ℝ} (hδ : 0 ≤ δ) (i : Option (Fin Ω.N)) : + Bornology.IsBounded (Ω.patch ε δ i) := by + cases i with + | none => exact Ω.isBounded.subset (setOf_lt_infDist_compl_subset _ (by positivity)) + | some j => exact isBounded_ball + +omit [FiniteDimensional ℝ V] in +/-- **The patches cover `Ω̄`** if the shrunk balls cover `Γ` and the points of `Ω` outside them +have distance `> 2δ` from `Ωᶜ` (`Rd.BoundedLipschitzDomain.exists_shrink`, +`Rd.BoundedLipschitzDomain.exists_interior_margin`). -/ +theorem closure_subset_iUnion_patch {ε δ : ℝ} + (hε : frontier Ω.carrier ⊆ ⋃ j, ball (Ω.center j) (Ω.radius j - 2 * ε)) + (hδ : ∀ x ∈ Ω.carrier, (∀ j, x ∉ ball (Ω.center j) (Ω.radius j - 2 * ε)) → + 2 * δ < infDist x Ω.carrierᶜ) : + closure Ω.carrier ⊆ ⋃ i, Ω.patch ε δ i := by + intro x hx + by_cases hxf : x ∈ frontier Ω.carrier + · obtain ⟨j, hj⟩ := Set.mem_iUnion.1 (hε hxf) + exact Set.mem_iUnion.2 ⟨some j, hj⟩ + · have hxΩ : x ∈ Ω.carrier := by + have : x ∈ closure Ω.carrier \ frontier Ω.carrier := ⟨hx, hxf⟩ + rwa [closure_sdiff_frontier, Ω.isOpen.interior_eq] at this + by_cases hxb : ∃ j, x ∈ ball (Ω.center j) (Ω.radius j - 2 * ε) + · obtain ⟨j, hj⟩ := hxb + exact Set.mem_iUnion.2 ⟨some j, hj⟩ + · push Not at hxb + exact Set.mem_iUnion.2 ⟨none, hδ x hxΩ hxb⟩ + +/-- **Pasting over the patches**: let `P U C` be a property of a set `U ⊆ V` and a constant +`C ∈ [0, ∞]` that passes from the sets `Ω ∩ U_i` of every cover `(U_i)_{i ∈ {0, …, N}}` of `Ω̄` by +`N + 1` bounded open sets, one for each boundary ball and one inner set (indexed by +`Option (Fin Ω.N)`), with finite constants, to `Ω`, with a finite constant. If `P` holds with a +finite constant for every boundary patch `Ω ∩ B(c_j, ρ_j - 2ε)`, `ε > 0`, and for every inner +patch `Ω ∩ {infDist(·, Ωᶜ) > 2δ}`, `δ > 0`, then it holds for `Ω` with a finite constant: for +suitable `ε` and `δ` the patches `Rd.BoundedLipschitzDomain.patch` cover `Ω̄` +(`Rd.BoundedLipschitzDomain.exists_shrink`, `Rd.BoundedLipschitzDomain.exists_interior_margin`, +`Rd.BoundedLipschitzDomain.closure_subset_iUnion_patch`). -/ +theorem exists_of_patches [Nontrivial V] (P : Set V → ℝ≥0∞ → Prop) + (hcover : ∀ U : Option (Fin Ω.N) → Set V, (∀ i, IsOpen (U i)) → + (∀ i, Bornology.IsBounded (U i)) → closure Ω.carrier ⊆ ⋃ i, U i → + ∀ C : Option (Fin Ω.N) → ℝ≥0∞, (∀ i, C i ≠ ∞) → (∀ i, P (Ω.carrier ∩ U i) (C i)) → + ∃ C' : ℝ≥0∞, C' ≠ ∞ ∧ P Ω.carrier C') + (hbd : ∀ ε : ℝ, 0 < ε → ∀ j : Fin Ω.N, ∃ C : ℝ≥0∞, C ≠ ∞ ∧ + P (Ω.carrier ∩ ball (Ω.center j) (Ω.radius j - 2 * ε)) C) + (hin : ∀ δ : ℝ, 0 < δ → ∃ C : ℝ≥0∞, C ≠ ∞ ∧ + P (Ω.carrier ∩ {x : V | 2 * δ < infDist x Ω.carrierᶜ}) C) : + ∃ C : ℝ≥0∞, C ≠ ∞ ∧ P Ω.carrier C := by + obtain ⟨ε, hε0, hε⟩ := Ω.exists_shrink + obtain ⟨δ, hδ0, hδ⟩ := Ω.exists_interior_margin Ω.nonempty_compl hε + choose Cb hCb hb using hbd ε hε0 + obtain ⟨C0, hC0, h0⟩ := hin δ hδ0 + refine hcover (Ω.patch ε δ) (Ω.isOpen_patch ε δ) (Ω.isBounded_patch ε hδ0.le) + (Ω.closure_subset_iUnion_patch hε hδ) (fun i => i.elim C0 Cb) (fun i => ?_) (fun i => ?_) + · cases i with + | none => exact hC0 + | some j => exact hCb j + · cases i with + | none => exact h0 + | some j => exact hb j + +variable [MeasurableSpace V] [BorelSpace V] {p : ℝ≥0∞} [Fact (1 ≤ p)] + +omit [FiniteDimensional ℝ V] in +/-- A bounded Lipschitz domain is measurable. -/ +theorem measurableSet : MeasurableSet Ω.carrier := Ω.isOpen.measurableSet + +/-- The intrinsic quasi-norm of `f` on a measurable `T ⊆ Ω` is at most that on `Ω` +(`Rd.modNormOn_mono_set`). -/ +theorem modNormOn_mono_set {T : Set V} (hT : MeasurableSet T) (hTΩ : T ⊆ Ω.carrier) (r : ℕ) + (s : ℝ) (q : ℝ≥0∞) (f : Lp ℂ p (volume : Measure V)) : + modNormOn hT r s q f ≤ modNormOn Ω.measurableSet r s q f := + Rd.modNormOn_mono_set hT Ω.measurableSet hTΩ r s q f + +/-- **The boundary patches with a bound**: there is `C < ∞` such that on `Ω ∩ B(c_j, ρ_j - 2ε)` +every `f` with `N_Ω(f) = ‖f‖_{L_p(Ω)} + ‖(2^(ks) ω_r(f, 2^(-k), Ω)_p)_k‖_{ℓ_q} < ∞` agrees with a +function `F` with `‖F‖_p + ‖(2^(ks) ω_r(F, 2^(-k))_p)_k‖_{ℓ_q} ≤ C N_Ω(f)`, by the local extension +with the cone bump of `Ω_j` rescaled to radius `≤ ε / r` +(`Rd.LipschitzGraph.exists_coneBump_radius_le`, `Rd.LocalMeansBump.exists_local_extension_le`); +the bump and `C` depend only on `ε`, `r`, `s` and `j`. -/ +theorem exists_local_extension_boundary_le (hp : p ≠ ∞) {r : ℕ} (hr : 1 ≤ r) {s : ℝ} + (hs : 0 < s) (hsr : s < r) {q : ℝ≥0∞} (hq : 1 ≤ q) {ε : ℝ} (hε : 0 < ε) (j : Fin Ω.N) : + ∃ C : ℝ≥0∞, C ≠ ∞ ∧ ∀ f : Lp ℂ p (volume : Measure V), + modNormOn Ω.measurableSet r s q f < ∞ → + ∃ F : Lp ℂ p (volume : Measure V), + ‖F‖ₑ + lqNorm q (fun k => dyadicWeight s k * lpModulus p r F k) ≤ + C * modNormOn Ω.measurableSet r s q f ∧ + ∀ᵐ x ∂(volume : Measure V), x ∈ Ω.carrier → + x ∈ ball (Ω.center j) (Ω.radius j - 2 * ε) → F x = f x := by + set G := Ω.graph j + set c := Ω.center j + set ρ := Ω.radius j + obtain ⟨b, hb, hR, hLR⟩ := G.exists_coneBump_radius_le (Nat.cast_nonneg r) hε + have hU : MeasurableSet (G.domain ∩ ball c (ρ - 2 * ε)) := + (G.isOpen_domain.inter isOpen_ball).measurableSet + have hW : MeasurableSet (G.domain ∩ ball c (ρ - ε)) := + (G.isOpen_domain.inter isOpen_ball).measurableSet + have hT : MeasurableSet (G.domain ∩ ball c ρ) := + (G.isOpen_domain.inter isOpen_ball).measurableSet + have hTΩ : G.domain ∩ ball c ρ ⊆ Ω.carrier := by + rw [← Ω.inter_ball_eq j le_rfl] + exact Set.inter_subset_left + refine ⟨b.localExtConst r s, b.localExtConst_ne_top hs hsr, fun f hf => ?_⟩ + obtain ⟨F, hF, hFf⟩ := b.exists_local_extension_le hp hr hs hq hU hW hT + (Set.inter_subset_inter_right _ (ball_subset_ball (by linarith))) (G.patch_support hb hLR) + (G.patch_step hb hLR) hR f ((Ω.modNormOn_mono_set hT hTΩ r s q f).trans_lt hf) + refine ⟨F, hF.trans (mul_le_mul' le_rfl (Ω.modNormOn_mono_set hT hTΩ r s q f)), ?_⟩ + filter_upwards [Lp.ext_iff.1 hFf, indicatorLp_apply_ae hU F, indicatorLp_apply_ae hU f] + with x h1 h2 h3 hxΩ hxb + have hxU : x ∈ G.domain ∩ ball c (ρ - 2 * ε) := by + rw [← Ω.inter_ball_eq j (by linarith)] + exact ⟨hxΩ, hxb⟩ + rw [h2, h3, Set.indicator_of_mem hxU, Set.indicator_of_mem hxU] at h1 + exact h1 + +/-- **The boundary patches**: on `Ω ∩ B(c_j, ρ_j - 2ε)`, `f` agrees with a function with a finite +Besov quasi-norm on `V`, by the local extension with the cone bump of `Ω_j` rescaled to radius +`≤ ε / r` (`Rd.BoundedLipschitzDomain.exists_local_extension_boundary_le`). -/ +theorem exists_local_extension_boundary (hp : p ≠ ∞) {r : ℕ} (hr : 1 ≤ r) {s : ℝ} (hs : 0 < s) + (hsr : s < r) {q : ℝ≥0∞} (hq : 1 ≤ q) {ε : ℝ} (hε : 0 < ε) (j : Fin Ω.N) + (f : Lp ℂ p (volume : Measure V)) + (hf : modNormOn Ω.measurableSet r s q f < ∞) : + ∃ F : Lp ℂ p (volume : Measure V), + ‖F‖ₑ + lqNorm q (fun k => dyadicWeight s k * lpModulus p r F k) < ∞ ∧ + ∀ᵐ x ∂(volume : Measure V), x ∈ Ω.carrier → + x ∈ ball (Ω.center j) (Ω.radius j - 2 * ε) → F x = f x := by + obtain ⟨C, hC, h⟩ := Ω.exists_local_extension_boundary_le hp hr hs hsr hq hε j + obtain ⟨F, hF, hFf⟩ := h f hf + exact ⟨F, hF.trans_lt (ENNReal.mul_lt_top hC.lt_top hf), hFf⟩ + +/-- **The inner patch with a bound**: there is `C < ∞` such that on `{infDist(·, Ωᶜ) > 2δ}` every +`f` with `N_Ω(f) = ‖f‖_{L_p(Ω)} + ‖(2^(ks) ω_r(f, 2^(-k), Ω)_p)_k‖_{ℓ_q} < ∞` agrees with a +function `F` with `‖F‖_p + ‖(2^(ks) ω_r(F, 2^(-k))_p)_k‖_{ℓ_q} ≤ C N_Ω(f)`, by the local extension +with a centred bump of radius `≤ δ / r` (`Rd.LocalMeansBump.exists_local_extension_le`); the bump +and `C` depend only on `δ`, `r` and `s`. -/ +theorem exists_local_extension_interior_le (hp : p ≠ ∞) {r : ℕ} (hr : 1 ≤ r) {s : ℝ} + (hs : 0 < s) (hsr : s < r) {q : ℝ≥0∞} (hq : 1 ≤ q) {δ : ℝ} (hδ : 0 < δ) : + ∃ C : ℝ≥0∞, C ≠ ∞ ∧ ∀ f : Lp ℂ p (volume : Measure V), + modNormOn Ω.measurableSet r s q f < ∞ → + ∃ F : Lp ℂ p (volume : Measure V), + ‖F‖ₑ + lqNorm q (fun k => dyadicWeight s k * lpModulus p r F k) ≤ + C * modNormOn Ω.measurableSet r s q f ∧ + ∀ᵐ x ∂(volume : Measure V), x ∈ Ω.carrier → + x ∈ {x : V | 2 * δ < infDist x Ω.carrierᶜ} → F x = f x := by + have hR0 : 0 < min (1 / 2 : ℝ) (δ / ((r : ℝ) + 1)) := lt_min (by norm_num) (by positivity) + set b := LocalMeansBump.centered (V := V) hR0 + have hR : b.radius ≤ 1 / 2 := min_le_left _ _ + have hLR : (r : ℝ) * b.radius ≤ δ := by + calc (r : ℝ) * b.radius ≤ r * (δ / ((r : ℝ) + 1)) := + mul_le_mul_of_nonneg_left (min_le_right _ _) (Nat.cast_nonneg r) + _ ≤ δ := by + rw [← mul_div_assoc, div_le_iff₀ (by positivity)] + nlinarith + have hU := measurableSet_infDist_gt Ω.carrier (2 * δ) + have hW := measurableSet_infDist_gt Ω.carrier δ + refine ⟨b.localExtConst r s, b.localExtConst_ne_top hs hsr, fun f hf => ?_⟩ + obtain ⟨F, hF, hFf⟩ := b.exists_local_extension_le hp hr hs hq hU hW Ω.measurableSet + (setOf_lt_infDist_compl_subset _ (by positivity)) + (fun x hx j y hy => interior_patch_support Ω.carrier + (fun y hy => (not_lt.1 fun h => hy (b.dual_eq_zero r j h)).trans hLR) x hx y hy) + (fun c hc z hz => interior_patch_step Ω.carrier (by + have hz' : ‖z‖ ≤ b.radius := not_lt.1 fun h => hz (b.eq_zero z h) + have hc0 : 0 < c := zero_lt_one.trans_le hc + have hnorm : ‖-c⁻¹ • z‖ ≤ b.radius := by + rw [norm_smul, norm_neg, norm_inv, Real.norm_of_nonneg hc0.le] + calc c⁻¹ * ‖z‖ ≤ 1 * ‖z‖ := + mul_le_mul_of_nonneg_right (inv_le_one_of_one_le₀ hc) (norm_nonneg z) + _ ≤ b.radius := by rw [one_mul]; exact hz' + exact (mul_le_mul_of_nonneg_left hnorm (Nat.cast_nonneg r)).trans hLR)) + hR f hf + refine ⟨F, hF, ?_⟩ + filter_upwards [Lp.ext_iff.1 hFf, indicatorLp_apply_ae hU F, indicatorLp_apply_ae hU f] + with x h1 h2 h3 _ hxU + have hxU' : x ∈ {x : V | 2 * δ < infDist x Ω.carrierᶜ} := hxU + rw [h2, h3, Set.indicator_of_mem hxU', Set.indicator_of_mem hxU'] at h1 + exact h1 + +/-- **The inner patch**: on `{infDist(·, Ωᶜ) > 2δ}`, `f` agrees with a function with a finite +Besov quasi-norm on `V`, by the local extension with a centred bump of radius `≤ δ / r` +(`Rd.BoundedLipschitzDomain.exists_local_extension_interior_le`). -/ +theorem exists_local_extension_interior (hp : p ≠ ∞) {r : ℕ} (hr : 1 ≤ r) {s : ℝ} (hs : 0 < s) + (hsr : s < r) {q : ℝ≥0∞} (hq : 1 ≤ q) {δ : ℝ} (hδ : 0 < δ) (f : Lp ℂ p (volume : Measure V)) + (hf : modNormOn Ω.measurableSet r s q f < ∞) : + ∃ F : Lp ℂ p (volume : Measure V), + ‖F‖ₑ + lqNorm q (fun k => dyadicWeight s k * lpModulus p r F k) < ∞ ∧ + ∀ᵐ x ∂(volume : Measure V), x ∈ Ω.carrier → + x ∈ {x : V | 2 * δ < infDist x Ω.carrierᶜ} → F x = f x := by + obtain ⟨C, hC, h⟩ := Ω.exists_local_extension_interior_le hp hr hs hsr hq hδ + obtain ⟨F, hF, hFf⟩ := h f hf + exact ⟨F, hF.trans_lt (ENNReal.mul_lt_top hC.lt_top hf), hFf⟩ + +/-- **On the whole space the intrinsic quasi-norm is the quasi-norm on `V`**: if `Ω = V` +(possible only for `V = {0}`, since `Ω` is bounded), then +`‖f‖_p + ‖(2^(ks) ω_r(f, 2^(-k))_p)_k‖_{ℓ_q}` +`= ‖f‖_{L_p(Ω)} + ‖(2^(ks) ω_r(f, 2^(-k), Ω)_p)_k‖_{ℓ_q}` (`Rd.modNormOn_univ`). -/ +theorem modNorm_eq_modNormOn_of_carrier_eq_univ (hu : Ω.carrier = Set.univ) (r : ℕ) (s : ℝ) + (q : ℝ≥0∞) (f : Lp ℂ p (volume : Measure V)) : + ‖f‖ₑ + lqNorm q (fun k => dyadicWeight s k * lpModulus p r f k) = + modNormOn Ω.measurableSet r s q f := + (modNormOn_univ r s q f).symm.trans + (modNormOn_congr_set MeasurableSet.univ Ω.measurableSet (by rw [hu]) r s q f) + +/-- **The extension for bounded Lipschitz domains with a bound** (Rychkov): for `1 ≤ p < ∞`, +`0 < s < r` and `1 ≤ q ≤ ∞` there is `C < ∞` such that every `f` with +`N_Ω(f) = ‖f‖_{L_p(Ω)} + ‖(2^(ks) ω_r(f, 2^(-k), Ω)_p)_k‖_{ℓ_q} < ∞` agrees on +`Ω` with some `F` with `‖F‖_p + ‖(2^(ks) ω_r(F, 2^(-k))_p)_k‖_{ℓ_q} ≤ C N_Ω(f)`. The patches, the +bumps of the local extensions and the resolution of unity depend only on `Ω` and `r`, so `C` +is fixed before `f`: it is the pasting constant times the sum of the local constants +(`Rd.exists_pasting_le`, `Rd.BoundedLipschitzDomain.exists_local_extension_boundary_le`, +`Rd.BoundedLipschitzDomain.exists_local_extension_interior_le`; for `V = {0}`, where `Ω = V`, +`C = 1`). Every step is linear in `f`, so for fixed `r` the construction is a bounded linear +operator, as in Rychkov; this theorem records its bound for each `f`. -/ +theorem exists_besov_extension_le (hp : p ≠ ∞) {r : ℕ} {s : ℝ} (hs : 0 < s) (hsr : s < r) + {q : ℝ≥0∞} (hq : 1 ≤ q) : + ∃ C : ℝ≥0∞, C ≠ ∞ ∧ ∀ f : Lp ℂ p (volume : Measure V), + modNormOn Ω.measurableSet r s q f < ∞ → + ∃ F : Lp ℂ p (volume : Measure V), indicatorLp Ω.measurableSet F = + indicatorLp Ω.measurableSet f ∧ + ‖F‖ₑ + lqNorm q (fun k => dyadicWeight s k * lpModulus p r F k) ≤ + C * modNormOn Ω.measurableSet r s q f := by + have hr : 1 ≤ r := Nat.one_le_iff_ne_zero.2 (Nat.cast_pos.1 (hs.trans hsr)).ne' + rcases (Ω.carrierᶜ).eq_empty_or_nonempty with hc | hc + · -- `Ω = V` + refine ⟨1, ENNReal.one_ne_top, fun f _ => ⟨f, rfl, ?_⟩⟩ + rw [one_mul, Ω.modNorm_eq_modNormOn_of_carrier_eq_univ (Set.compl_empty_iff.1 hc)] + obtain ⟨ε, hε0, hε⟩ := Ω.exists_shrink + obtain ⟨δ, hδ0, hδ⟩ := Ω.exists_interior_margin hc hε + choose Cb hCb hextb using fun j => Ω.exists_local_extension_boundary_le hp hr hs hsr hq hε0 j + obtain ⟨C0, hC0, hext0⟩ := Ω.exists_local_extension_interior_le hp hr hs hsr hq hδ0 + obtain ⟨Cp, hCp, hpaste⟩ := exists_pasting_le (ι := Option (Fin Ω.N)) hp hsr hq + Ω.measurableSet (Ω.patch ε δ) (Ω.isOpen_patch ε δ) (Ω.isBounded_patch ε hδ0.le) + (Ω.closure_subset_iUnion_patch hε hδ) + set Cl : Option (Fin Ω.N) → ℝ≥0∞ := fun i => i.elim C0 Cb + have hCl : ∀ i, Cl i ≠ ∞ := fun i => by + cases i with + | none => exact hC0 + | some j => exact hCb j + refine ⟨Cp * ∑ i, Cl i, ENNReal.mul_ne_top hCp (ENNReal.sum_ne_top.2 fun i _ => hCl i), + fun f hf => ?_⟩ + choose Fb hFb hFbf using fun j => hextb j f hf + obtain ⟨F0, hF0, hF0f⟩ := hext0 f hf + obtain ⟨G, hG, hGle⟩ := hpaste f (fun i => i.elim F0 Fb) fun i => by + cases i with + | none => exact hF0f + | some j => exact hFbf j + refine ⟨G, hG, hGle.trans ?_⟩ + rw [mul_assoc, Finset.sum_mul] + refine mul_le_mul' le_rfl (Finset.sum_le_sum fun i _ => ?_) + cases i with + | none => exact hF0 + | some j => exact hFb j + +/-- **The extension for bounded Lipschitz domains**: for `1 ≤ p < ∞`, `0 < s < r` and +`1 ≤ q ≤ ∞`, if `‖f‖_{L_p(Ω)} + ‖(2^(ks) ω_r(f, 2^(-k), Ω)_p)_k‖_{ℓ_q} < ∞`, then `f` agrees on +`Ω` with a function with a finite Besov quasi-norm by differences on `V` +(`Rd.BoundedLipschitzDomain.exists_besov_extension_le`). -/ +theorem exists_besov_extension_of_modulusOn (hp : p ≠ ∞) {r : ℕ} {s : ℝ} (hs : 0 < s) + (hsr : s < r) {q : ℝ≥0∞} (hq : 1 ≤ q) {f : Lp ℂ p (volume : Measure V)} + (hf : modNormOn Ω.measurableSet r s q f < ∞) : + ∃ F : Lp ℂ p (volume : Measure V), indicatorLp Ω.measurableSet F = + indicatorLp Ω.measurableSet f ∧ + ‖F‖ₑ + lqNorm q (fun k => dyadicWeight s k * lpModulus p r F k) < ∞ := by + obtain ⟨C, hC, h⟩ := Ω.exists_besov_extension_le hp hs hsr hq + obtain ⟨F, hFf, hF⟩ := h f hf + exact ⟨F, hFf, hF.trans_lt (ENNReal.mul_lt_top hC.lt_top hf)⟩ + +/-- **Restrictions of Besov spaces to bounded Lipschitz domains, by intrinsic differences**: for +`1 ≤ p < ∞`, `0 < s < r` and `1 ≤ q ≤ ∞`, `f` agrees on `Ω` with some `F ∈ L_p(V)` with +`‖F‖_p + ‖(2^(ks) ω_r(F, 2^(-k))_p)_k‖_{ℓ_q} < ∞` iff +`‖f‖_{L_p(Ω)} + ‖(2^(ks) ω_r(f, 2^(-k), Ω)_p)_k‖_{ℓ_q} < ∞`. -/ +theorem exists_besov_extension_iff_modulusOn (hp : p ≠ ∞) {r : ℕ} {s : ℝ} (hs : 0 < s) + (hsr : s < r) {q : ℝ≥0∞} (hq : 1 ≤ q) (f : Lp ℂ p (volume : Measure V)) : + (∃ F : Lp ℂ p (volume : Measure V), indicatorLp Ω.measurableSet F = + indicatorLp Ω.measurableSet f ∧ + ‖F‖ₑ + lqNorm q (fun k => dyadicWeight s k * lpModulus p r F k) < ∞) ↔ + modNormOn Ω.measurableSet r s q f < ∞ := by + constructor + · rintro ⟨F, hFf, hF⟩ + exact (modNormOn_le_modNorm_of_indicatorLp Ω.measurableSet r s q hFf).trans_lt hF + · exact Ω.exists_besov_extension_of_modulusOn hp hs hsr hq + +/-- **Restrictions of band-limited approximation spaces to bounded Lipschitz domains**: for +`1 ≤ p < ∞`, `0 < s < r` and `1 ≤ q ≤ ∞`, `f` agrees on `Ω` with some `F` in the approximation +space `A^s_q(L_p(V))` of band-limited functions iff +`‖f‖_{L_p(Ω)} + ‖(2^(ks) ω_r(f, 2^(-k), Ω)_p)_k‖_{ℓ_q} < ∞`. -/ +theorem exists_memApprox_extension_iff (hp : p ≠ ∞) {r : ℕ} {s : ℝ} (hs : 0 < s) (hsr : s < r) + {q : ℝ≥0∞} (hq : 1 ≤ q) (f : Lp ℂ p (volume : Measure V)) : + (∃ F : Lp ℂ p (volume : Measure V), indicatorLp Ω.measurableSet F = + indicatorLp Ω.measurableSet f ∧ (bandScheme hp).MemApprox s q F) ↔ + modNormOn Ω.measurableSet r s q f < ∞ := by + rw [← Ω.exists_besov_extension_iff_modulusOn hp hs hsr hq f] + exact exists_congr fun F => + and_congr_right fun _ => memApprox_bandScheme_iff_modulus hp hs.le hsr hq F + +end BoundedLipschitzDomain + +end Rd diff --git a/LeanPool/FunctionSpaces/Domains/Lipschitz/ConvexDomains.lean b/LeanPool/FunctionSpaces/Domains/Lipschitz/ConvexDomains.lean new file mode 100644 index 0000000000..edf41fc959 --- /dev/null +++ b/LeanPool/FunctionSpaces/Domains/Lipschitz/ConvexDomains.lean @@ -0,0 +1,374 @@ +/- +Copyright (c) 2026 Mario Ullrich. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Mario Ullrich +-/ +module + +public import LeanPool.FunctionSpaces.Domains.Lipschitz.LocalLipschitzGraphs + +/- +Modified for Lean Pool: module names and imports adapted. +-/ + +/-! +# Bounded open convex sets are bounded Lipschitz domains + +Let `Ω` be a bounded open convex set with `‖x‖ ≤ C` on `Ω`, let `B(a, δ) ⊆ Ω` and let `ν` be a +unit vector. The **ray length** `ℓ(y) = sup {s : a + y - s ν ∈ Ω}` (`Rd.rayLength`) is the length +of the ray from `a + y` in the direction `-ν` inside `Ω`. + +* For `a + y ∈ Ω` and `s ≥ 0`, the point `a + y - s ν` lies in `Ω` iff `s < ℓ(y)` + (`Rd.mem_iff_lt_rayLength`), by openness and convexity. +* The cone estimate: on the ball of radius `δ/4`, `ℓ` is `4C/δ`-Lipschitz + (`Rd.rayLength_le_rayLength_add`, `Rd.lipschitzOnWith_rayLength`), since the convex hull of a ray + and the ball `B(a, δ)` contains the shortened rays from nearby starting points. +* At a frontier point `z`, with `ν = (a - z)/‖a - z‖`, the set `Ω` agrees near `z` with the region + above the graph of `y ↦ ‖a - z‖ - ℓ(y)` over `ν^⊥` (`Rd.mem_iff_sub_rayLength_lt`). McShane's + extension (`Rd.isLipschitzDomainAt_of_lipschitzOnWith`) then makes `Ω` Lipschitz near `z` + (`Rd.isLipschitzDomainAt_of_convex`). Every open convex set, bounded or not, is Lipschitz near + each frontier point, since it agrees near `z` with its intersection with `B(z, 1)` + (`Rd.isLipschitzDomainAt_of_convex_of_isOpen`). + +Hence every bounded open convex set is a bounded Lipschitz set +(`Rd.isBoundedLipschitzDomain_of_convex`; Grisvard, Corollary 1.2.2.3) and, in finite +dimension, the carrier of a `Rd.BoundedLipschitzDomain` (`Rd.BoundedLipschitzDomain.ofConvex`); +the open unit cube `(0, 1)^n` is an example (`Rd.isBoundedLipschitzDomain_unitCube`, +`Rd.BoundedLipschitzDomain.unitCube`). It is convex and nonempty (`Rd.convex_unitCube`, +`Rd.nonempty_unitCube`), and its closure is the closed unit cube `[0, 1]^n` +(`Rd.closure_unitCube`). +-/ + +@[expose] public section + +open Metric Set + +namespace Rd + +variable {V : Type*} [NormedAddCommGroup V] [InnerProductSpace ℝ V] + +/-! ### The ray length -/ + +/-- The **ray length** `ℓ(y) = sup {s ∈ ℝ : a + y - s ν ∈ Ω}`: for a bounded convex open set `Ω`, a +point `a + y ∈ Ω` and a unit vector `ν`, the length of the ray from `a + y` in the direction `-ν` +inside `Ω` (`Rd.mem_iff_lt_rayLength`). Lean's supremum of a set that is empty or unbounded above +is `0`. -/ +noncomputable def rayLength (Ω : Set V) (a ν y : V) : ℝ := + sSup {s : ℝ | a + y - s • ν ∈ Ω} + +variable {Ω : Set V} {a ν : V} {C : ℝ} + +/-- **The ray from a point of `Ω` meets `Ω`**: if `a + y ∈ Ω`, the set of parameters `s` with +`a + y - s ν ∈ Ω` contains `s = 0`. -/ +theorem nonempty_raySet {y : V} (hy : a + y ∈ Ω) : {s : ℝ | a + y - s • ν ∈ Ω}.Nonempty := + ⟨0, by simpa using hy⟩ + +/-- **Points of a ray in a bounded set**: if `‖x‖ ≤ C` on `Ω`, `‖ν‖ = 1` and `a + y - s ν ∈ Ω`, then +`s ≤ ‖a + y‖ + C`, by the triangle inequality for `s ν = (a + y) - (a + y - s ν)`. -/ +theorem le_norm_add_of_sub_smul_mem (hC : ∀ x ∈ Ω, ‖x‖ ≤ C) (hν : ‖ν‖ = 1) {y : V} {s : ℝ} + (hs : a + y - s • ν ∈ Ω) : s ≤ ‖a + y‖ + C := by + have h : ‖s • ν‖ ≤ ‖a + y‖ + ‖a + y - s • ν‖ := by + simpa only [sub_sub_cancel] using norm_sub_le (a + y) (a + y - s • ν) + rw [norm_smul, hν, mul_one, Real.norm_eq_abs] at h + linarith [le_abs_self s, hC _ hs] + +/-- In a bounded set `Ω` and for a unit vector `ν`, the parameters `s` with `a + y - s ν ∈ Ω` are +bounded above (`Rd.le_norm_add_of_sub_smul_mem`), so the supremum in `Rd.rayLength` is a genuine +one. -/ +theorem bddAbove_rayLength (hC : ∀ x ∈ Ω, ‖x‖ ≤ C) (hν : ‖ν‖ = 1) (y : V) : + BddAbove {s : ℝ | a + y - s • ν ∈ Ω} := + ⟨‖a + y‖ + C, fun _ hs => le_norm_add_of_sub_smul_mem hC hν hs⟩ + +/-- In a bounded set `Ω` and for a unit vector `ν`, every `s` with `a + y - s ν ∈ Ω` is at most +the ray length. -/ +theorem le_rayLength (hC : ∀ x ∈ Ω, ‖x‖ ≤ C) (hν : ‖ν‖ = 1) {y : V} {s : ℝ} + (hs : a + y - s • ν ∈ Ω) : s ≤ rayLength Ω a ν y := + le_csSup (bddAbove_rayLength hC hν y) hs + +/-- **The ray length is at most `2C`** when `a + y ∈ Ω`, `‖x‖ ≤ C` on `Ω` and `ν` is a unit +vector: every admissible `s` satisfies `s ≤ ‖a + y‖ + C ≤ 2C`. -/ +theorem rayLength_le (hC : ∀ x ∈ Ω, ‖x‖ ≤ C) (hν : ‖ν‖ = 1) {y : V} (hy : a + y ∈ Ω) : + rayLength Ω a ν y ≤ 2 * C := + csSup_le (nonempty_raySet hy) fun _ hs => by + linarith [le_norm_add_of_sub_smul_mem hC hν hs, hC _ hy] + +/-- **The ray inside a convex open set**: if `Ω` is convex, open and bounded, `‖ν‖ = 1`, +`a + y ∈ Ω` and `s ≥ 0`, then `a + y - s ν ∈ Ω` iff `s < ℓ(y)`. Openness moves a little further +along the ray; convexity fills the segment between `a + y` and a point `a + y - b ν ∈ Ω` with +`b > s` (Mathlib's `exists_lt_of_lt_csSup`). -/ +theorem mem_iff_lt_rayLength (hΩ : Convex ℝ Ω) (ho : IsOpen Ω) (hC : ∀ x ∈ Ω, ‖x‖ ≤ C) + (hν : ‖ν‖ = 1) {y : V} (hy : a + y ∈ Ω) {s : ℝ} (hs : 0 ≤ s) : + a + y - s • ν ∈ Ω ↔ s < rayLength Ω a ν y := by + constructor + · intro h + have hcont : Continuous fun t : ℝ => a + y - t • ν := by fun_prop + obtain ⟨ε, hε, hball⟩ := Metric.isOpen_iff.1 (ho.preimage hcont) s h + have hmem : a + y - (s + ε / 2) • ν ∈ Ω := hball (by + rw [mem_ball, Real.dist_eq, add_sub_cancel_left, abs_of_pos (half_pos hε)] + linarith) + linarith [le_rayLength hC hν hmem] + · intro h + obtain ⟨b, hb, hsb⟩ := + exists_lt_of_lt_csSup (nonempty_raySet hy) h + have hb0 : 0 < b := hs.trans_lt hsb + have heq : a + y - s • ν = (1 - s / b) • (a + y) + (s / b) • (a + y - b • ν) := by + rw [smul_sub (s / b), smul_smul, div_mul_cancel₀ s hb0.ne'] + module + rw [heq] + exact hΩ hy hb (by rw [sub_nonneg, div_le_one hb0]; exact hsb.le) (div_nonneg hs hb0.le) + (by ring) + +/-! ### The cone estimate -/ + +/-- **The cone estimate for convex sets**: let `Ω` be convex with `B(a, δ) ⊆ Ω`, +`‖y₁‖, ‖y₂‖ < δ/4` and `μ = 2‖y₁ - y₂‖/δ`. If `a + y₁ - s ν ∈ Ω`, then +`a + y₂ - (1 - μ) s ν ∈ Ω`: it is the convex combination +`(1 - μ)(a + y₁ - s ν) + μ (a + b)` with `b = y₁ + μ⁻¹ (y₂ - y₁)`, and `‖b‖ < δ/4 + δ/2 < δ`. -/ +theorem sub_smul_mem_of_norm_lt (hΩ : Convex ℝ Ω) {δ : ℝ} (hδ : 0 < δ) (hball : ball a δ ⊆ Ω) + {y₁ y₂ : V} (h₁ : ‖y₁‖ < δ / 4) (h₂ : ‖y₂‖ < δ / 4) {s : ℝ} (hs : a + y₁ - s • ν ∈ Ω) : + a + y₂ - ((1 - 2 * ‖y₁ - y₂‖ / δ) * s) • ν ∈ Ω := by + rcases eq_or_ne y₁ y₂ with rfl | hne + · simpa using hs + have hn : 0 < ‖y₁ - y₂‖ := norm_pos_iff.2 (sub_ne_zero.2 hne) + have hμ : 0 < 2 * ‖y₁ - y₂‖ / δ := by positivity + have hμ1 : 2 * ‖y₁ - y₂‖ / δ ≤ 1 := by + rw [div_le_one hδ] + linarith [norm_sub_le y₁ y₂] + have hb : a + (y₁ + (2 * ‖y₁ - y₂‖ / δ)⁻¹ • (y₂ - y₁)) ∈ Ω := by + refine hball (add_mem_ball_iff_norm.2 ?_) + calc ‖y₁ + (2 * ‖y₁ - y₂‖ / δ)⁻¹ • (y₂ - y₁)‖ + ≤ ‖y₁‖ + (2 * ‖y₁ - y₂‖ / δ)⁻¹ * ‖y₁ - y₂‖ := by + refine (norm_add_le _ _).trans ?_ + rw [norm_smul, norm_inv, Real.norm_of_nonneg hμ.le, norm_sub_rev] + _ = ‖y₁‖ + δ / 2 := by field_simp + _ < δ := by linarith + have heq : a + y₂ - ((1 - 2 * ‖y₁ - y₂‖ / δ) * s) • ν = + (1 - 2 * ‖y₁ - y₂‖ / δ) • (a + y₁ - s • ν) + + (2 * ‖y₁ - y₂‖ / δ) • (a + (y₁ + (2 * ‖y₁ - y₂‖ / δ)⁻¹ • (y₂ - y₁))) := by + match_scalars <;> field_simp <;> ring + rw [heq] + exact hΩ hs hb (sub_nonneg.2 hμ1) hμ.le (by ring) + +/-- **The ray length varies in a Lipschitz way near `a`**: for `Ω` convex with `‖x‖ ≤ C` on `Ω` and +`B(a, δ) ⊆ Ω`, `‖ν‖ = 1` and `‖y₁‖, ‖y₂‖ < δ/4`, +`ℓ(y₁) ≤ ℓ(y₂) + (4C/δ) ‖y₁ - y₂‖`. Every admissible `s` for `y₁` gives the admissible `(1 - μ) s` +for `y₂` (`Rd.sub_smul_mem_of_norm_lt`), and `μ s ≤ 2μC = (4C/δ) ‖y₁ - y₂‖` +(`Rd.rayLength_le`). -/ +theorem rayLength_le_rayLength_add (hΩ : Convex ℝ Ω) (hC : ∀ x ∈ Ω, ‖x‖ ≤ C) (hν : ‖ν‖ = 1) + {δ : ℝ} (hδ : 0 < δ) (hball : ball a δ ⊆ Ω) {y₁ y₂ : V} (h₁ : ‖y₁‖ < δ / 4) + (h₂ : ‖y₂‖ < δ / 4) : + rayLength Ω a ν y₁ ≤ rayLength Ω a ν y₂ + 4 * C / δ * ‖y₁ - y₂‖ := by + have hy₁ : a + y₁ ∈ Ω := hball (add_mem_ball_iff_norm.2 (by linarith)) + refine csSup_le (nonempty_raySet hy₁) fun s hs => ?_ + have h1 := le_rayLength hC hν (sub_smul_mem_of_norm_lt hΩ hδ hball h₁ h₂ hs) + have h2 : s ≤ 2 * C := (le_rayLength hC hν hs).trans (rayLength_le hC hν hy₁) + have h3 := mul_le_mul_of_nonneg_left h2 (by positivity : 0 ≤ 2 * ‖y₁ - y₂‖ / δ) + have h4 : 2 * ‖y₁ - y₂‖ / δ * (2 * C) = 4 * C / δ * ‖y₁ - y₂‖ := by ring + linarith + +omit [InnerProductSpace ℝ V] in +/-- The constant `4C/δ` of the cone estimate is nonnegative when `a ∈ Ω`, `‖x‖ ≤ C` on `Ω` and +`δ ≥ 0`. -/ +theorem cone_const_nonneg (hC : ∀ x ∈ Ω, ‖x‖ ≤ C) (ha : a ∈ Ω) {δ : ℝ} (hδ : 0 ≤ δ) : + 0 ≤ 4 * C / δ := + div_nonneg (mul_nonneg zero_le_four ((norm_nonneg a).trans (hC a ha))) hδ + +/-- **The ray length is `4C/δ`-Lipschitz on the ball `B(0, δ/4)`**, for `Ω` convex with +`‖x‖ ≤ C` on `Ω`, `B(a, δ) ⊆ Ω` and `‖ν‖ = 1` (`Rd.rayLength_le_rayLength_add`). -/ +theorem lipschitzOnWith_rayLength (hΩ : Convex ℝ Ω) (hC : ∀ x ∈ Ω, ‖x‖ ≤ C) (hν : ‖ν‖ = 1) + {δ : ℝ} (hδ : 0 < δ) (hball : ball a δ ⊆ Ω) : + LipschitzOnWith (4 * C / δ).toNNReal (rayLength Ω a ν) (ball 0 (δ / 4)) := + LipschitzOnWith.of_le_add_mul _ fun y₁ h₁ y₂ h₂ => by + rw [Real.coe_toNNReal _ (cone_const_nonneg hC (hball (mem_ball_self hδ)) hδ.le), + dist_eq_norm] + exact rayLength_le_rayLength_add hΩ hC hν hδ hball (mem_ball_zero_iff.1 h₁) + (mem_ball_zero_iff.1 h₂) + +/-- **The graph function of a convex set**: for `Ω` convex with `‖x‖ ≤ C` on `Ω`, `B(a, δ) ⊆ Ω`, +`δ > 0` and `‖ν‖ = 1`, and for every `d ∈ ℝ`, the function `y ↦ d - ℓ(y)` on the hyperplane `ν^⊥` +is `4C/δ`-Lipschitz on the ball `B(0, δ/4)` of `ν^⊥` (`Rd.rayLength_le_rayLength_add` with the +roles of `y₁` and `y₂` exchanged). -/ +theorem lipschitzOnWith_sub_rayLength (hΩ : Convex ℝ Ω) (hC : ∀ x ∈ Ω, ‖x‖ ≤ C) (hν : ‖ν‖ = 1) + {δ : ℝ} (hδ : 0 < δ) (hball : ball a δ ⊆ Ω) (d : ℝ) : + LipschitzOnWith (4 * C / δ).toNNReal (fun y : (ℝ ∙ ν)ᗮ => d - rayLength Ω a ν y) + (ball 0 (δ / 4)) := + LipschitzOnWith.of_le_add_mul _ fun y₁ h₁ y₂ h₂ => by + rw [Real.coe_toNNReal _ (cone_const_nonneg hC (hball (mem_ball_self hδ)) hδ.le), + dist_comm, Subtype.dist_eq, dist_eq_norm] + have h := rayLength_le_rayLength_add hΩ hC hν hδ hball (mem_ball_zero_iff.1 h₂) + (mem_ball_zero_iff.1 h₁) + linarith + +/-! ### Convex sets near a frontier point -/ + +/-- **A convex set near a frontier point is the region above a graph**: let `Ω` be convex, open, +with `‖x‖ ≤ C` on `Ω` and `B(a, δ) ⊆ Ω`, let `‖ν‖ = 1`, `a - z = d ν` with `δ ≤ d`, and +`‖x - z‖ < δ/4`. Then `x ∈ Ω` iff `d - ℓ(P(x - z)) < ⟪ν, x - z⟫`, `P` the orthogonal projection +onto `ν^⊥`. Indeed `x = a + P(x - z) - (d - ⟪ν, x - z⟫) ν` +(`Rd.coe_orthogonalProjectionOnto_orthogonalComplement_singleton`), `a + P(x - z) ∈ B(a, δ)`, +`d - ⟪ν, x - z⟫ ≥ 0`, and `Rd.mem_iff_lt_rayLength` applies. -/ +theorem mem_iff_sub_rayLength_lt (hΩ : Convex ℝ Ω) (ho : IsOpen Ω) (hC : ∀ x ∈ Ω, ‖x‖ ≤ C) + {δ : ℝ} (hball : ball a δ ⊆ Ω) {z : V} {d : ℝ} (hν : ‖ν‖ = 1) (hd : a - z = d • ν) + (hδd : δ ≤ d) {x : V} (hx : ‖x - z‖ < δ / 4) : + x ∈ Ω ↔ d - rayLength Ω a ν ((ℝ ∙ ν)ᗮ.orthogonalProjectionOnto (x - z) : V) < + inner ℝ ν (x - z) := by + have hP := coe_orthogonalProjectionOnto_orthogonalComplement_singleton hν (x - z) + have hPn : ‖((ℝ ∙ ν)ᗮ.orthogonalProjectionOnto (x - z) : V)‖ < δ / 4 := + (Submodule.norm_orthogonalProjectionOnto_apply_le _ _).trans_lt hx + have hy : a + ((ℝ ∙ ν)ᗮ.orthogonalProjectionOnto (x - z) : V) ∈ Ω := + hball (add_mem_ball_iff_norm.2 (by linarith [norm_nonneg (x - z)])) + have ht : inner ℝ ν (x - z) ≤ ‖x - z‖ := by + simpa only [hν, one_mul] using real_inner_le_norm ν (x - z) + have hx' : x = a + ((ℝ ∙ ν)ᗮ.orthogonalProjectionOnto (x - z) : V) - + (d - inner ℝ ν (x - z)) • ν := by + rw [hP, show a = z + d • ν by rw [← hd]; abel] + module + rw [sub_lt_comm] + conv_lhs => rw [hx'] + exact mem_iff_lt_rayLength hΩ ho hC hν hy (by linarith [norm_nonneg (x - z)]) + +/-- **A bounded open convex set is Lipschitz near each frontier point**: pick `a ∈ Ω` with +`B(a, δ) ⊆ Ω` (the frontier point `z` lies in the closure, so `Ω` is nonempty); then +`d = ‖a - z‖ ≥ δ` since `z ∉ Ω`, and with `ν = (a - z)/d`, radius `δ/4` and the graph function +`y ↦ d - ℓ(y)` (`Rd.mem_iff_sub_rayLength_lt`, `Rd.lipschitzOnWith_sub_rayLength`), McShane's +extension (`Rd.isLipschitzDomainAt_of_lipschitzOnWith`) gives the local condition. -/ +theorem isLipschitzDomainAt_of_convex (hΩ : Convex ℝ Ω) (ho : IsOpen Ω) + (hb : Bornology.IsBounded Ω) {z : V} (hz : z ∈ frontier Ω) : IsLipschitzDomainAt Ω z := by + obtain ⟨a, ha⟩ : Ω.Nonempty := closure_nonempty_iff.1 ⟨z, frontier_subset_closure hz⟩ + obtain ⟨δ, hδ, hball⟩ := Metric.isOpen_iff.1 ho a ha + obtain ⟨C, hC⟩ := isBounded_iff_forall_norm_le.1 hb + have hzΩ : z ∉ Ω := ((ho.frontier_eq ▸ hz) : z ∈ closure Ω \ Ω).2 + have hδd : δ ≤ ‖a - z‖ := by + by_contra h + exact hzΩ (hball (by rw [mem_ball, dist_eq_norm, norm_sub_rev]; linarith)) + have hd : 0 < ‖a - z‖ := hδ.trans_le hδd + have hν : ‖‖a - z‖⁻¹ • (a - z)‖ = 1 := by + simpa using norm_smul_inv_norm (𝕜 := ℝ) (norm_pos_iff.1 hd) + have had : a - z = ‖a - z‖ • (‖a - z‖⁻¹ • (a - z)) := (smul_inv_smul₀ hd.ne' (a - z)).symm + refine isLipschitzDomainAt_of_lipschitzOnWith (by positivity) hν + (lipschitzOnWith_sub_rayLength hΩ hC hν hδ hball ‖a - z‖) ?_ + ext x + refine ⟨fun ⟨hx, hxb⟩ => ⟨?_, hxb⟩, fun ⟨hx, hxb⟩ => ⟨?_, hxb⟩⟩ + · exact (mem_iff_sub_rayLength_lt hΩ ho hC hball hν had hδd (mem_ball_iff_norm.1 hxb)).1 hx + · exact (mem_iff_sub_rayLength_lt hΩ ho hC hball hν had hδd (mem_ball_iff_norm.1 hxb)).2 hx + +/-- **Every open convex set is Lipschitz near each frontier point**, bounded or not: near `z` the +set `Ω` agrees with the bounded open convex set `Ω ∩ B(z, 1)`, which has `z` on its frontier +(Mathlib's `IsOpen.closure_inter`), so `Rd.isLipschitzDomainAt_of_convex` and +`Rd.IsLipschitzDomainAt.congr_ball` apply. Half-spaces and epigraphs of convex functions are +examples. -/ +theorem isLipschitzDomainAt_of_convex_of_isOpen (hΩ : Convex ℝ Ω) (ho : IsOpen Ω) {z : V} + (hz : z ∈ frontier Ω) : IsLipschitzDomainAt Ω z := by + have hzΩ : z ∉ Ω := ((ho.frontier_eq ▸ hz) : z ∈ closure Ω \ Ω).2 + have hz' : z ∈ frontier (Ω ∩ ball z 1) := by + rw [(ho.inter isOpen_ball).frontier_eq] + exact ⟨isOpen_ball.closure_inter ⟨frontier_subset_closure hz, mem_ball_self one_pos⟩, + fun h => hzΩ h.1⟩ + refine IsLipschitzDomainAt.congr_ball one_pos ?_ + (isLipschitzDomainAt_of_convex (hΩ.inter (convex_ball z 1)) (ho.inter isOpen_ball) + (isBounded_ball.subset inter_subset_right) hz') + rw [inter_comm Ω, ← inter_assoc, inter_self] + +/-- **Every bounded open convex set is a bounded Lipschitz set** +(`Rd.isLipschitzDomainAt_of_convex` at each frontier point). -/ +theorem isBoundedLipschitzDomain_of_convex (hΩ : Convex ℝ Ω) (ho : IsOpen Ω) + (hb : Bornology.IsBounded Ω) : IsBoundedLipschitzDomain Ω := + ⟨ho, hb, fun _ hz => isLipschitzDomainAt_of_convex hΩ ho hb hz⟩ + +/-- **A bounded open convex set as a bounded Lipschitz domain**, in finite dimension +(`Rd.isBoundedLipschitzDomain_of_convex` and +`Rd.BoundedLipschitzDomain.ofIsBoundedLipschitzDomain`). -/ +noncomputable def BoundedLipschitzDomain.ofConvex [FiniteDimensional ℝ V] (hΩ : Convex ℝ Ω) + (ho : IsOpen Ω) (hb : Bornology.IsBounded Ω) : BoundedLipschitzDomain V := + BoundedLipschitzDomain.ofIsBoundedLipschitzDomain (isBoundedLipschitzDomain_of_convex hΩ ho hb) + +/-- The carrier of `Rd.BoundedLipschitzDomain.ofConvex hΩ ho hb` is `Ω`. -/ +@[simp] +theorem BoundedLipschitzDomain.carrier_ofConvex [FiniteDimensional ℝ V] (hΩ : Convex ℝ Ω) + (ho : IsOpen Ω) (hb : Bornology.IsBounded Ω) : + (BoundedLipschitzDomain.ofConvex hΩ ho hb).carrier = Ω := + rfl + +/-! ### The open unit cube -/ + +/-- **The open unit cube is convex**: `(0, 1)^n ⊆ ℝ^n` is convex coordinatewise +(Mathlib's `convex_Ioo`). -/ +theorem convex_unitCube (n : ℕ) : + Convex ℝ {x : EuclideanSpace ℝ (Fin n) | ∀ i, x i ∈ Ioo (0 : ℝ) 1} := by + intro x hx y hy s t hs ht hst i + simp only [PiLp.add_apply, PiLp.smul_apply] + exact convex_Ioo (0 : ℝ) 1 (hx i) (hy i) hs ht hst + +/-- **The open unit cube is nonempty**: it contains the centre `(1/2, …, 1/2)`. -/ +theorem nonempty_unitCube (n : ℕ) : + {x : EuclideanSpace ℝ (Fin n) | ∀ i, x i ∈ Ioo (0 : ℝ) 1}.Nonempty := + ⟨WithLp.toLp 2 fun _ => 1 / 2, fun _ => show (1 / 2 : ℝ) ∈ Ioo 0 1 by norm_num⟩ + +/-- The closed unit cube `[0, 1]^n ⊆ ℝ^n` is the preimage of the product `∏_i [0, 1]` under +Mathlib's homeomorphism `PiLp.homeomorph` between `ℝ^n` and the product space. -/ +theorem closedUnitCube_eq_preimage (n : ℕ) : + {x : EuclideanSpace ℝ (Fin n) | ∀ i, x i ∈ Icc (0 : ℝ) 1} = + PiLp.homeomorph 2 _ ⁻¹' univ.pi (fun _ => Icc (0 : ℝ) 1) := by + ext + simp [PiLp.homeomorph, -pi_univ_Icc] + +/-- The open unit cube `(0, 1)^n ⊆ ℝ^n` is the preimage of the product `∏_i (0, 1)` under +Mathlib's homeomorphism `PiLp.homeomorph` between `ℝ^n` and the product space. -/ +theorem unitCube_eq_preimage (n : ℕ) : + {x : EuclideanSpace ℝ (Fin n) | ∀ i, x i ∈ Ioo (0 : ℝ) 1} = + PiLp.homeomorph 2 _ ⁻¹' univ.pi (fun _ => Ioo (0 : ℝ) 1) := by + ext + simp [PiLp.homeomorph] + +/-- **The closed unit cube is closed**: `[0, 1]^n ⊆ ℝ^n` is the preimage of a product of closed +intervals under a homeomorphism (`Rd.closedUnitCube_eq_preimage`, Mathlib's `isClosed_set_pi`). -/ +theorem isClosed_closedUnitCube (n : ℕ) : + IsClosed {x : EuclideanSpace ℝ (Fin n) | ∀ i, x i ∈ Icc (0 : ℝ) 1} := by + rw [closedUnitCube_eq_preimage] + exact (isClosed_set_pi fun _ _ => isClosed_Icc).preimage (PiLp.homeomorph 2 _).continuous + +/-- **The closure of the open unit cube is the closed unit cube**: closures commute with +homeomorphisms and with products (`Rd.unitCube_eq_preimage`, Mathlib's +`Homeomorph.preimage_closure`, `closure_pi_set`), and the closure of `(0, 1)` is `[0, 1]` +(Mathlib's `closure_Ioo`). -/ +theorem closure_unitCube (n : ℕ) : + closure {x : EuclideanSpace ℝ (Fin n) | ∀ i, x i ∈ Ioo (0 : ℝ) 1} = + {x | ∀ i, x i ∈ Icc (0 : ℝ) 1} := by + rw [unitCube_eq_preimage, ← Homeomorph.preimage_closure, closure_pi_set, + closure_Ioo zero_ne_one, closedUnitCube_eq_preimage] + +/-- **The open unit cube is a bounded Lipschitz set**: `(0, 1)^n ⊆ ℝ^n` is convex +(`Rd.convex_unitCube`), open (an intersection of finitely many open slabs) and bounded +(`‖x‖ ≤ √n` on it, `EuclideanSpace.norm_eq`), so `Rd.isBoundedLipschitzDomain_of_convex` +applies. -/ +theorem isBoundedLipschitzDomain_unitCube (n : ℕ) : + IsBoundedLipschitzDomain {x : EuclideanSpace ℝ (Fin n) | ∀ i, x i ∈ Ioo (0 : ℝ) 1} := by + refine isBoundedLipschitzDomain_of_convex (convex_unitCube n) ?_ ?_ + · have h : {x : EuclideanSpace ℝ (Fin n) | ∀ i, x i ∈ Ioo (0 : ℝ) 1} = + ⋂ i, (fun x : EuclideanSpace ℝ (Fin n) => x i) ⁻¹' Ioo 0 1 := by + ext x + simp + rw [h] + exact isOpen_iInter_of_finite fun i => isOpen_Ioo.preimage (by fun_prop) + · refine isBounded_iff_forall_norm_le.2 ⟨Real.sqrt n, fun x hx => ?_⟩ + rw [EuclideanSpace.norm_eq] + refine Real.sqrt_le_sqrt ?_ + calc ∑ i, ‖x i‖ ^ 2 ≤ ∑ _i : Fin n, (1 : ℝ) := Finset.sum_le_sum fun i _ => by + rw [Real.norm_eq_abs, sq_abs] + exact pow_le_one₀ (hx i).1.le (hx i).2.le + _ = n := by simp + +/-- **The open unit cube as a bounded Lipschitz domain** in `ℝ^n` +(`Rd.isBoundedLipschitzDomain_unitCube`). -/ +protected noncomputable def BoundedLipschitzDomain.unitCube (n : ℕ) : + BoundedLipschitzDomain (EuclideanSpace ℝ (Fin n)) := + BoundedLipschitzDomain.ofIsBoundedLipschitzDomain (isBoundedLipschitzDomain_unitCube n) + +/-- The carrier of `Rd.BoundedLipschitzDomain.unitCube n` is the open unit cube `(0, 1)^n`. -/ +@[simp] +theorem BoundedLipschitzDomain.carrier_unitCube (n : ℕ) : + (BoundedLipschitzDomain.unitCube n).carrier = + {x : EuclideanSpace ℝ (Fin n) | ∀ i, x i ∈ Ioo (0 : ℝ) 1} := + rfl + +end Rd diff --git a/LeanPool/FunctionSpaces/Domains/Lipschitz/GraphParametrization.lean b/LeanPool/FunctionSpaces/Domains/Lipschitz/GraphParametrization.lean new file mode 100644 index 0000000000..11baa9345c --- /dev/null +++ b/LeanPool/FunctionSpaces/Domains/Lipschitz/GraphParametrization.lean @@ -0,0 +1,285 @@ +/- +Copyright (c) 2026 Mario Ullrich. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Mario Ullrich +-/ +module + +public import LeanPool.FunctionSpaces.Rd.Atoms.AtomAnalysis +public import LeanPool.FunctionSpaces.Domains.Lipschitz.LipschitzGraph + +/- +Modified for Lean Pool: module names and imports adapted. +-/ + +/-! +# The boundary of a Lipschitz graph domain as a graph over a hyperplane + +For a Lipschitz graph domain `Ω = {x : φ(x) < ⟪x, e⟫}` (`Rd.LipschitzGraph`), the boundary is the +graph of `φ` over the hyperplane `H = e^⊥` (`Rd.LipschitzGraph.hyperplane`), of dimension `n - 1` +(`Rd.LipschitzGraph.finrank_hyperplane_add_one`), with `H^⊥ = ℝ e` +(`Rd.LipschitzGraph.orthogonal_hyperplane`) and the Lebesgue measure of its inner product. +The **graph map** `γ(x') = x' + φ(x') e` (`Rd.LipschitzGraph.graphMap`) satisfies `P(γ x') = x'` +for the orthogonal projection `Px = x - ⟪x, e⟫ e` onto `H` (`Rd.LipschitzGraph.proj`, from the +formula for the projection onto the hyperplane of any unit vector, +`Rd.coe_orthogonalProjectionOnto_orthogonalComplement_singleton`), and it is Lipschitz with +constant `1 + M` (`Rd.LipschitzGraph.norm_graphMap_sub_le`), and the graph function `φ|_H` +(`Rd.LipschitzGraph.phiH`) is `M`-Lipschitz (`Rd.LipschitzGraph.lipschitzWith_phiH`). The +boundary of `Ω` is the graph: `y ∈ ∂Ω` iff `γ(Py) = y` iff `⟪y, e⟫ = φ(y)` +(`Rd.LipschitzGraph.mem_frontier_domain_iff`, `Rd.LipschitzGraph.graphMap_proj_eq_iff`), so `∂Ω` +is the range of `γ` (`Rd.LipschitzGraph.range_graphMap`). + +**Traces of atoms** (`Rd.LipschitzGraph.isRegularAtom_comp_graphMap`): a continuous `a` on `V` +that vanishes outside `B̄(c, d 2^(-j))`, with `|a| ≤ A` and `|a(x + h) - a(x)| ≤ A min(1, 2^j ‖h‖)`, +restricts to `a ∘ γ`, which vanishes outside `B̄(Pc, d 2^(-j))` in `H`, with `|a ∘ γ| ≤ A` and +`|a ∘ γ(x' + h') - a ∘ γ(x')| ≤ (1 + M) A min(1, 2^j ‖h'‖)`: a regular atom of order and exponent +`1` on `H`, as in the proof of Schneider–Vybíral, Theorem 4.2. Only sup bounds enter. +-/ + +@[expose] public section + +open MeasureTheory Module Metric +open scoped ENNReal + +open ENNReal (lqNorm dyadicWeight) + +namespace Rd + +/-- `min(1, K t) ≤ K min(1, t)` for `K ≥ 1`. -/ +theorem min_one_mul_le {K : ℝ≥0∞} (hK : 1 ≤ K) (t : ℝ≥0∞) : min 1 (K * t) ≤ K * min 1 t := by + rcases le_total t 1 with ht | ht + · rw [min_eq_right ht] + exact min_le_right _ _ + · rw [min_eq_left ht, mul_one] + exact (min_le_left _ _).trans hK + +/-- The orthogonal projection onto the hyperplane `ν^⊥` of a unit vector `ν` is +`P w = w - ⟪ν, w⟫ ν`: the identity minus Mathlib's projection onto the line `ℝ ν` +(`Submodule.starProjection_unit_singleton`). -/ +theorem coe_orthogonalProjectionOnto_orthogonalComplement_singleton {V : Type*} + [NormedAddCommGroup V] [InnerProductSpace ℝ V] {ν : V} (hν : ‖ν‖ = 1) (w : V) : + ((ℝ ∙ ν)ᗮ.orthogonalProjectionOnto w : V) = w - inner ℝ ν w • ν := by + rw [Submodule.orthogonalProjectionOnto_orthogonal, Submodule.coe_mk, + Submodule.starProjection_unit_singleton ℝ hν] + +namespace LipschitzGraph + +variable {V : Type*} [NormedAddCommGroup V] [InnerProductSpace ℝ V] (Ω : LipschitzGraph V) + +/-! ### The hyperplane and the graph map -/ + +/-- The **hyperplane** `H = e^⊥` over which the boundary of `Ω` is a graph. -/ +noncomputable abbrev hyperplane : Submodule ℝ V := (ℝ ∙ Ω.e)ᗮ + +/-- The orthogonal complement of the hyperplane is the line `ℝ e` (Mathlib's +`Submodule.orthogonal_orthogonal`). -/ +theorem orthogonal_hyperplane : Ω.hyperplaneᗮ = ℝ ∙ Ω.e := Submodule.orthogonal_orthogonal _ + +/-- The upward direction is nonzero. -/ +theorem e_ne_zero : Ω.e ≠ 0 := fun h => by simpa [h] using Ω.norm_e + +/-- `⟪e, e⟫ = 1`. -/ +theorem inner_e_self : inner ℝ Ω.e Ω.e = 1 := by + rw [real_inner_self_eq_norm_sq, Ω.norm_e, one_pow] + +/-- The points of `H` are orthogonal to `e`. -/ +theorem inner_coe_e (x' : Ω.hyperplane) : inner ℝ (x' : V) Ω.e = 0 := by + rw [real_inner_comm] + exact Submodule.mem_orthogonal_singleton_iff_inner_right.1 x'.2 + +/-- `x - ⟪x, e⟫ e ∈ H`. -/ +theorem sub_inner_smul_mem (x : V) : x - inner ℝ x Ω.e • Ω.e ∈ Ω.hyperplane := by + rw [Submodule.mem_orthogonal_singleton_iff_inner_right, inner_sub_right, real_inner_smul_right, + Ω.inner_e_self, mul_one, real_inner_comm, sub_self] + +/-- `H` has dimension `n - 1`. -/ +theorem finrank_hyperplane_add_one [FiniteDimensional ℝ V] : + finrank ℝ Ω.hyperplane + 1 = finrank ℝ V := by + have h := Submodule.finrank_add_finrank_orthogonal (ℝ ∙ Ω.e) + rw [finrank_span_singleton Ω.e_ne_zero] at h + change finrank ℝ ↥(ℝ ∙ Ω.e)ᗮ + 1 = finrank ℝ V + omega + +/-- `dim H = n - 1`, with the subtraction of natural numbers. -/ +theorem finrank_hyperplane_eq_sub_one [FiniteDimensional ℝ V] : + finrank ℝ Ω.hyperplane = finrank ℝ V - 1 := by + have h := Ω.finrank_hyperplane_add_one + omega + +/-- The **orthogonal projection** onto `H`. -/ +noncomputable def proj : V →L[ℝ] Ω.hyperplane := Ω.hyperplane.orthogonalProjectionOnto + +/-- `Px = x - ⟪x, e⟫ e`. -/ +theorem coe_proj (x : V) : (Ω.proj x : V) = x - inner ℝ x Ω.e • Ω.e := by + rw [proj, coe_orthogonalProjectionOnto_orthogonalComplement_singleton Ω.norm_e, real_inner_comm] + +/-- For `a ∈ H`, `⟪a, v⟫ = ⟪a, Pv⟫`: Mathlib's +`Submodule.inner_orthogonalProjectionOnto_eq_of_mem_left`. -/ +theorem inner_coe_eq_inner_proj (a : Ω.hyperplane) (v : V) : + inner ℝ (a : V) v = inner ℝ a (Ω.proj v) := + (Ω.hyperplane.inner_orthogonalProjectionOnto_eq_of_mem_left a v).symm + +/-- `‖Px‖ ≤ ‖x‖`. -/ +theorem norm_proj_le (x : V) : ‖Ω.proj x‖ ≤ ‖x‖ := + Submodule.norm_orthogonalProjectionOnto_apply_le _ x + +/-- `P x' = x'` on `H`. -/ +theorem proj_coe (x' : Ω.hyperplane) : Ω.proj x' = x' := + Submodule.orthogonalProjectionOnto_mem_subspace_eq_self x' + +/-- `P e = 0`. -/ +theorem proj_e : Ω.proj Ω.e = 0 := by + apply Subtype.ext + rw [coe_proj, Ω.inner_e_self, one_smul, sub_self] + rfl + +/-- The **graph map** `γ(x') = x' + φ(x') e`. -/ +noncomputable def graphMap (x' : Ω.hyperplane) : V := (x' : V) + Ω.phi x' • Ω.e + +/-- `P(γ x') = x'`. -/ +theorem proj_graphMap (x' : Ω.hyperplane) : Ω.proj (Ω.graphMap x') = x' := by + rw [graphMap, map_add, map_smul, Ω.proj_e, smul_zero, add_zero, Ω.proj_coe] + +/-- `⟪γ x', e⟫ = φ(x')`: the graph map lands on the boundary. -/ +theorem inner_graphMap (x' : Ω.hyperplane) : inner ℝ (Ω.graphMap x') Ω.e = Ω.phi x' := by + rw [graphMap, inner_add_left, Ω.inner_coe_e, real_inner_smul_left, Ω.inner_e_self, mul_one, + zero_add] + +/-- `φ(γ x') = φ(x')`. -/ +theorem phi_graphMap (x' : Ω.hyperplane) : Ω.phi (Ω.graphMap x') = Ω.phi x' := + Ω.const _ _ + +/-- **The graph map is Lipschitz**: `‖γ x' - γ y'‖ ≤ (1 + M) ‖x' - y'‖`. -/ +theorem norm_graphMap_sub_le (x' y' : Ω.hyperplane) : + ‖Ω.graphMap x' - Ω.graphMap y'‖ ≤ (1 + Ω.M) * ‖x' - y'‖ := by + have hsub : Ω.graphMap x' - Ω.graphMap y' = + ((x' - y' : Ω.hyperplane) : V) + (Ω.phi x' - Ω.phi y') • Ω.e := by + simp only [graphMap, Submodule.coe_sub, sub_smul] + abel + have hlip : |Ω.phi x' - Ω.phi y'| ≤ Ω.M * ‖x' - y'‖ := by + have h := Ω.lipschitz x' y' + rwa [← Submodule.coe_sub, Submodule.norm_coe] at h + rw [hsub] + calc ‖((x' - y' : Ω.hyperplane) : V) + (Ω.phi x' - Ω.phi y') • Ω.e‖ + ≤ ‖((x' - y' : Ω.hyperplane) : V)‖ + ‖(Ω.phi x' - Ω.phi y') • Ω.e‖ := norm_add_le _ _ + _ = ‖x' - y'‖ + |Ω.phi x' - Ω.phi y'| := by + rw [norm_smul, Ω.norm_e, mul_one, Real.norm_eq_abs, Submodule.norm_coe] + _ ≤ ‖x' - y'‖ + Ω.M * ‖x' - y'‖ := add_le_add le_rfl hlip + _ = (1 + Ω.M) * ‖x' - y'‖ := by ring + +/-- The graph map is continuous. -/ +theorem continuous_graphMap : Continuous Ω.graphMap := + continuous_subtype_val.add ((Ω.continuous_phi.comp continuous_subtype_val).smul continuous_const) + +/-- The graph function on the hyperplane, `φ|_H`. -/ +noncomputable def phiH (x' : Ω.hyperplane) : ℝ := Ω.phi x' + +/-- `φ|_H` is `M`-Lipschitz. -/ +theorem lipschitzWith_phiH : LipschitzWith ⟨Ω.M, Ω.M_nonneg⟩ Ω.phiH := + LipschitzWith.of_dist_le_mul fun x' y' => by + rw [Real.dist_eq, dist_eq_norm, ← Submodule.norm_coe, Submodule.coe_sub] + exact Ω.lipschitz x' y' + +/-- `φ|_H` is continuous. -/ +theorem continuous_phiH : Continuous Ω.phiH := Ω.lipschitzWith_phiH.continuous + +/-- **Steps into the cone from the boundary stay in the domain**: `γ x' + K ⊆ Ω`, since +`φ(γ x') = ⟪γ x', e⟫` and a step `y` into the cone raises `⟪·, e⟫` faster than `φ` +(`Rd.LipschitzGraph.phi_add_le`). -/ +theorem graphMap_add_mem (x' : Ω.hyperplane) {y : V} (hy : y ∈ Ω.cone) : + Ω.graphMap x' + y ∈ Ω.domain := by + have h := Ω.phi_add_le (Ω.graphMap x') y + have hy' : Ω.M * ‖y - inner ℝ y Ω.e • Ω.e‖ < inner ℝ y Ω.e := hy + rw [Ω.phi_graphMap] at h + change Ω.phi (Ω.graphMap x' + y) < inner ℝ (Ω.graphMap x' + y) Ω.e + rw [inner_add_left, Ω.inner_graphMap] + linarith + +/-- `‖x' - Pc‖ ≤ ‖γ x' - c‖`: the projection is a contraction. -/ +theorem norm_sub_proj_le (x' : Ω.hyperplane) (c : V) : ‖x' - Ω.proj c‖ ≤ ‖Ω.graphMap x' - c‖ := by + calc ‖x' - Ω.proj c‖ = ‖Ω.proj (Ω.graphMap x' - c)‖ := by rw [map_sub, Ω.proj_graphMap] + _ ≤ ‖Ω.graphMap x' - c‖ := Ω.norm_proj_le _ + +/-! ### The boundary of a graph domain -/ + +/-- `φ(Py) = φ(y)`: `φ` is constant in the direction `e`. -/ +theorem phi_proj (y : V) : Ω.phi (Ω.proj y) = Ω.phi y := by + have h := Ω.const (Ω.proj y) (inner ℝ y Ω.e) + rw [coe_proj, sub_add_cancel] at h + rw [coe_proj] + exact h.symm + +/-- **The graph** `γ(Py) = y` consists of the points with `⟪y, e⟫ = φ(y)`. -/ +theorem graphMap_proj_eq_iff (y : V) : + Ω.graphMap (Ω.proj y) = y ↔ inner ℝ y Ω.e = Ω.phi y := by + constructor + · intro h + have h1 := Ω.inner_graphMap (Ω.proj y) + rw [h, phi_proj] at h1 + exact h1 + · intro h + rw [graphMap, phi_proj, coe_proj, ← h, sub_add_cancel] + +/-- **The boundary of a graph domain is the graph**: `y ∈ ∂Ω` iff `γ(Py) = y`, since the +closure of `Ω` is `{φ ≤ ⟪·, e⟫}` (`Rd.LipschitzGraph.closure_domain`) and `Ω` is open. -/ +theorem mem_frontier_domain_iff (y : V) : + y ∈ frontier Ω.domain ↔ Ω.graphMap (Ω.proj y) = y := by + rw [graphMap_proj_eq_iff, frontier, Ω.isOpen_domain.interior_eq, Ω.closure_domain] + exact ⟨fun h => (le_antisymm h.1 (not_lt.1 h.2)).symm, fun h => ⟨h.ge, h.not_gt⟩⟩ + +/-- **The range of the graph map is the boundary** of the graph domain. -/ +theorem range_graphMap : Set.range Ω.graphMap = frontier Ω.domain := by + ext y + rw [Ω.mem_frontier_domain_iff] + constructor + · rintro ⟨x', rfl⟩ + rw [Ω.proj_graphMap] + · intro h + exact ⟨_, h⟩ + +/-! ### Traces of atoms -/ + +variable [FiniteDimensional ℝ V] [MeasurableSpace V] [BorelSpace V] + +/-- **Traces of atoms** (as in the proof of Schneider–Vybíral, Theorem 4.2): if `a` is continuous, +vanishes outside `B̄(c, d 2^(-j))`, `|a| ≤ A` and `|a(x + h) - a(x)| ≤ A min(1, 2^j ‖h‖)`, then +`a ∘ γ` is a regular atom of order and exponent `1` on `H` with centre `Pc`, radius factor `d` and +constant `(1 + M) A (2 d^(n-1) |B_1|)^(1/p)`, since `γ` is Lipschitz with constant `1 + M`. -/ +theorem isRegularAtom_comp_graphMap {p : ℝ≥0∞} {d : ℝ} (hd : 0 ≤ d) {A : ℝ≥0∞} {j : ℕ} {c : V} + {a : V → ℂ} (hac : Continuous a) (h0 : ∀ x, d / 2 ^ j < ‖x - c‖ → a x = 0) + (hle : ∀ x, ‖a x‖ₑ ≤ A) + (hdiff : ∀ h x, ‖a (x + h) - a x‖ₑ ≤ A * min 1 (ENNReal.ofReal (2 ^ j * ‖h‖))) : + IsRegularAtom p 1 1 d (ENNReal.ofReal (1 + Ω.M) * A * (((1 + 1 : ℕ) : ℝ≥0∞) * + (ENNReal.ofReal (d ^ finrank ℝ Ω.hyperplane) * volume (ball (0 : Ω.hyperplane) 1))) ^ + (1 / p.toReal)) j (Ω.proj c) (a ∘ Ω.graphMap) := by + have hK : 1 ≤ ENNReal.ofReal (1 + Ω.M) := by + rw [← ENNReal.ofReal_one] + exact ENNReal.ofReal_le_ofReal (by linarith [Ω.M_nonneg]) + refine isRegularAtom_of_pointwise hd (hac.comp Ω.continuous_graphMap).aestronglyMeasurable + (fun x' hx' => ?_) (fun x' => ?_) (fun h' x' => ?_) + · exact h0 _ (hx'.trans_le (Ω.norm_sub_proj_le x' c)) + · exact (hle _).trans (le_mul_of_one_le_left' hK) + · simp only [Function.iterate_one, fwdDiff, Function.comp_apply, ENNReal.rpow_one] + set v := Ω.graphMap (x' + h') - Ω.graphMap x' + have hv : ‖v‖ ≤ (1 + Ω.M) * ‖h'‖ := by + have h := Ω.norm_graphMap_sub_le (x' + h') x' + rwa [add_sub_cancel_left] at h + have h1 := hdiff v (Ω.graphMap x') + rw [add_sub_cancel] at h1 + have h2 : 2 ^ j * ‖v‖ ≤ (1 + Ω.M) * (2 ^ j * ‖h'‖) := by + calc 2 ^ j * ‖v‖ ≤ 2 ^ j * ((1 + Ω.M) * ‖h'‖) := + mul_le_mul_of_nonneg_left hv (by positivity) + _ = (1 + Ω.M) * (2 ^ j * ‖h'‖) := by ring + calc ‖a (Ω.graphMap (x' + h')) - a (Ω.graphMap x')‖ₑ + ≤ A * min 1 (ENNReal.ofReal (2 ^ j * ‖v‖)) := h1 + _ ≤ A * min 1 (ENNReal.ofReal (1 + Ω.M) * ENNReal.ofReal (2 ^ j * ‖h'‖)) := by + gcongr + rw [← ENNReal.ofReal_mul (by linarith [Ω.M_nonneg])] + exact ENNReal.ofReal_le_ofReal h2 + _ ≤ A * (ENNReal.ofReal (1 + Ω.M) * min 1 (ENNReal.ofReal (2 ^ j * ‖h'‖))) := + mul_le_mul' le_rfl (min_one_mul_le hK _) + _ = ENNReal.ofReal (1 + Ω.M) * A * min 1 (ENNReal.ofReal (2 ^ j * ‖h'‖)) := by ring + +end LipschitzGraph + +end Rd diff --git a/LeanPool/FunctionSpaces/Domains/Lipschitz/GraphStraightening.lean b/LeanPool/FunctionSpaces/Domains/Lipschitz/GraphStraightening.lean new file mode 100644 index 0000000000..79b6b20d13 --- /dev/null +++ b/LeanPool/FunctionSpaces/Domains/Lipschitz/GraphStraightening.lean @@ -0,0 +1,277 @@ +/- +Copyright (c) 2026 Mario Ullrich. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Mario Ullrich +-/ +module + +public import LeanPool.FunctionSpaces.Domains.Lipschitz.GraphParametrization +public import Mathlib.Geometry.Euclidean.Volume.Measure +public import Mathlib.LinearAlgebra.Transvection.Basic + +/- +Modified for Lean Pool: module names and imports adapted. +-/ + +/-! +# Flattening a graph domain + +For a Lipschitz graph domain `Ω = {x : φ(x) < ⟪x, e⟫}` the **flattening** +`F(x) = x - φ(x) e` (`Rd.LipschitzGraph.flatten`) maps `Ω` onto the half-space `{⟪y, e⟫ > 0}` +(`Rd.LipschitzGraph.inner_flatten`): it is a bijection of `V` with inverse `y ↦ y + φ(y) e` +(`Rd.LipschitzGraph.unflatten`), because `φ` is constant along `e`. Both maps are +`(1 + M)`-Lipschitz (`Rd.LipschitzGraph.lipschitzWith_flatten`, +`Rd.LipschitzGraph.lipschitzWith_unflatten`), and the image of the hyperplane +`e^⊥` under it contains the graph (`Rd.LipschitzGraph.graph_subset_image_unflatten`). For smooth +`φ` both maps are smooth, and the derivative `id - e ⊗ Dφ(x)` of the flattening is a +transvection, since `Dφ(x) e = 0`, so its determinant is `1` +(`Rd.LipschitzGraph.det_fderiv_flatten`, Mathlib's `LinearMap.transvection.det`). + +Over `H = e^⊥` the **product coordinates** `(x', t) ↦ x' + t e` and the **graph coordinates** +`(x', t) ↦ γ(x') + t e` with `γ(x') = x' + φ(x') e` (`Rd.LipschitzGraph.prodEquiv`, +`Rd.LipschitzGraph.graphEquiv`) preserve the Lebesgue measure, and the inverse flattening is the +graph coordinates after the inverse of the product coordinates (`Rd.LipschitzGraph.unflatten_eq`). +So both maps preserve the Lebesgue measure for every Lipschitz graph +(`Rd.LipschitzGraph.measurePreserving_flatten`, +`Rd.LipschitzGraph.measurePreserving_unflatten`). +-/ + +@[expose] public section + +open MeasureTheory Set Filter Topology +open scoped ENNReal ContDiff + +namespace Rd + +namespace LipschitzGraph + +variable {V : Type*} [NormedAddCommGroup V] [InnerProductSpace ℝ V] (Ω : LipschitzGraph V) + +/-- The **flattening** `x ↦ x - φ(x) e`. -/ +def flatten (x : V) : V := x - Ω.phi x • Ω.e + +/-- The inverse of the flattening, `y ↦ y + φ(y) e`. -/ +def unflatten (y : V) : V := y + Ω.phi y • Ω.e + +/-- `φ` is constant along `e`, also backwards: `φ(x - t e) = φ(x)`. -/ +theorem phi_sub_smul (x : V) (t : ℝ) : Ω.phi (x - t • Ω.e) = Ω.phi x := by + rw [sub_eq_add_neg, ← neg_smul, Ω.const] + +/-- The inverse undoes the flattening. -/ +theorem unflatten_flatten (x : V) : Ω.unflatten (Ω.flatten x) = x := by + rw [unflatten, flatten, Ω.phi_sub_smul, sub_add_cancel] + +/-- The flattening undoes the inverse. -/ +theorem flatten_unflatten (y : V) : Ω.flatten (Ω.unflatten y) = y := by + rw [flatten, unflatten, Ω.const, add_sub_cancel_right] + +/-- **The flattening lowers the height by the graph**: `⟪F(x), e⟫ = ⟪x, e⟫ - φ(x)`. -/ +theorem inner_flatten (x : V) : inner ℝ (Ω.flatten x) Ω.e = inner ℝ x Ω.e - Ω.phi x := by + rw [flatten, inner_sub_left, real_inner_smul_left, real_inner_self_eq_norm_sq, Ω.norm_e] + ring + +/-- The flattening is a bijection of `V`. -/ +noncomputable def flattenEquiv : V ≃ V where + toFun := Ω.flatten + invFun := Ω.unflatten + left_inv := Ω.unflatten_flatten + right_inv := Ω.flatten_unflatten + +/-- The flattening is continuous. -/ +theorem continuous_flatten : Continuous Ω.flatten := + continuous_id.sub (Ω.continuous_phi.smul continuous_const) + +/-- The inverse of the flattening is continuous. -/ +theorem continuous_unflatten : Continuous Ω.unflatten := + continuous_id.add (Ω.continuous_phi.smul continuous_const) + +/-- **The inverse flattening is Lipschitz**: `y ↦ y + φ(y) e` is `(1 + M)`-Lipschitz, since `φ` +is `M`-Lipschitz and `‖e‖ = 1`. On the hyperplane `e^⊥` this is +`Rd.LipschitzGraph.norm_graphMap_sub_le`. -/ +theorem lipschitzWith_unflatten : + LipschitzWith ⟨1 + Ω.M, add_nonneg zero_le_one Ω.M_nonneg⟩ Ω.unflatten := by + refine LipschitzWith.of_dist_le_mul fun x y => ?_ + rw [dist_eq_norm, dist_eq_norm] + change _ ≤ (1 + Ω.M) * _ + calc ‖Ω.unflatten x - Ω.unflatten y‖ = ‖(x - y) + (Ω.phi x - Ω.phi y) • Ω.e‖ := by + rw [unflatten, unflatten, sub_smul] + congr 1 + abel + _ ≤ ‖x - y‖ + |Ω.phi x - Ω.phi y| := by + refine (norm_add_le _ _).trans_eq ?_ + rw [norm_smul, Ω.norm_e, mul_one, Real.norm_eq_abs] + _ ≤ (1 + Ω.M) * ‖x - y‖ := by linarith [Ω.lipschitz x y] + +/-- **The flattening is Lipschitz**: `x ↦ x - φ(x) e` is `(1 + M)`-Lipschitz, since `φ` is +`M`-Lipschitz and `‖e‖ = 1`. -/ +theorem lipschitzWith_flatten : + LipschitzWith ⟨1 + Ω.M, add_nonneg zero_le_one Ω.M_nonneg⟩ Ω.flatten := by + refine LipschitzWith.of_dist_le_mul fun x y => ?_ + rw [dist_eq_norm, dist_eq_norm] + change _ ≤ (1 + Ω.M) * _ + calc ‖Ω.flatten x - Ω.flatten y‖ = ‖(x - y) - (Ω.phi x - Ω.phi y) • Ω.e‖ := by + rw [flatten, flatten, sub_smul] + congr 1 + abel + _ ≤ ‖x - y‖ + |Ω.phi x - Ω.phi y| := by + refine (norm_sub_le _ _).trans_eq ?_ + rw [norm_smul, Ω.norm_e, mul_one, Real.norm_eq_abs] + _ ≤ (1 + Ω.M) * ‖x - y‖ := by linarith [Ω.lipschitz x y] + +/-- **The graph lies in the image of the hyperplane** `e^⊥` under `y ↦ y + φ(y) e`: a point `x` +of the graph is the image of its flattening `x - φ(x) e`, which lies in `e^⊥` +(`Rd.LipschitzGraph.inner_flatten`). -/ +theorem graph_subset_image_unflatten : + {x | Ω.phi x = inner ℝ x Ω.e} ⊆ Ω.unflatten '' ((ℝ ∙ Ω.e)ᗮ : Set V) := by + intro x (hx : Ω.phi x = inner ℝ x Ω.e) + refine ⟨Ω.flatten x, ?_, Ω.unflatten_flatten x⟩ + rw [SetLike.mem_coe, Submodule.mem_orthogonal_singleton_iff_inner_right, real_inner_comm, + Ω.inner_flatten, hx, sub_self] + +/-- For smooth `φ`, the flattening is smooth. -/ +theorem contDiff_flatten {n : WithTop ℕ∞} (hφ : ContDiff ℝ n Ω.phi) : ContDiff ℝ n Ω.flatten := + contDiff_id.sub (hφ.smul contDiff_const) + +/-- For smooth `φ`, the inverse of the flattening is smooth. -/ +theorem contDiff_unflatten {n : WithTop ℕ∞} (hφ : ContDiff ℝ n Ω.phi) : + ContDiff ℝ n Ω.unflatten := + contDiff_id.add (hφ.smul contDiff_const) + +/-- **`φ` does not change along `e`**: `Dφ(x) e = 0`. -/ +theorem fderiv_phi_e {x : V} (hφ : DifferentiableAt ℝ Ω.phi x) : fderiv ℝ Ω.phi x Ω.e = 0 := by + rw [← hφ.lineDeriv_eq_fderiv, lineDeriv] + simp only [Ω.const, deriv_const] + +/-- The derivative of the flattening, `id - e ⊗ Dφ(x)`. -/ +theorem hasFDerivAt_flatten {x : V} (hφ : DifferentiableAt ℝ Ω.phi x) : + HasFDerivAt Ω.flatten (ContinuousLinearMap.id ℝ V - (fderiv ℝ Ω.phi x).smulRight Ω.e) x := + (hasFDerivAt_id x).sub (hφ.hasFDerivAt.smul_const Ω.e) + +/-- **The derivative of the flattening has determinant `1`**: it is the transvection +`y ↦ y + (-Dφ(x) y) e` with `Dφ(x) e = 0`. -/ +theorem det_fderiv_flatten [FiniteDimensional ℝ V] {x : V} (hφ : DifferentiableAt ℝ Ω.phi x) : + (ContinuousLinearMap.id ℝ V - (fderiv ℝ Ω.phi x).smulRight Ω.e).det = 1 := by + have h : ((ContinuousLinearMap.id ℝ V - (fderiv ℝ Ω.phi x).smulRight Ω.e : V →L[ℝ] V) : + V →ₗ[ℝ] V) = LinearMap.transvection (-(fderiv ℝ Ω.phi x : V →ₗ[ℝ] ℝ)) Ω.e := by + ext y + simp [LinearMap.transvection, sub_eq_add_neg] + rw [ContinuousLinearMap.det, h, LinearMap.transvection.det] + simp [Ω.fderiv_phi_e hφ] + +/-! ### Product and graph coordinates -/ + +section Coordinates + +variable [FiniteDimensional ℝ V] [MeasurableSpace V] [BorelSpace V] + +omit [MeasurableSpace V] [BorelSpace V] in +/-- The isometry `t ↦ t e` of `ℝ` onto the orthogonal complement `H^⊥ = ℝ e` of the hyperplane +(Mathlib's `LinearIsometryEquiv.toSpanUnitSingleton`). -/ +noncomputable def lineEquiv : ℝ ≃ₗᵢ[ℝ] Ω.hyperplaneᗮ := + (LinearIsometryEquiv.toSpanUnitSingleton Ω.e Ω.norm_e).trans + (LinearIsometryEquiv.ofEq _ _ Ω.orthogonal_hyperplane.symm) + +omit [FiniteDimensional ℝ V] [MeasurableSpace V] [BorelSpace V] in +/-- `lineEquiv t = t e`. -/ +theorem coe_lineEquiv (t : ℝ) : (Ω.lineEquiv t : V) = t • Ω.e := rfl + +/-- The **product coordinates** `(x', t) ↦ x' + t e` of `V = H ⊕ ℝ e`, as a measurable +equivalence (Mathlib's `Submodule.measurableEquivProd`). -/ +noncomputable def prodEquiv : Ω.hyperplane × ℝ ≃ᵐ V := + (MeasurableEquiv.prodCongr (MeasurableEquiv.refl _) + Ω.lineEquiv.toHomeomorph.toMeasurableEquiv).trans + (Ω.hyperplane.measurableEquivProd (0 : V)).symm + +/-- `prodEquiv (x', t) = x' + t e`. -/ +theorem prodEquiv_apply (p : Ω.hyperplane × ℝ) : Ω.prodEquiv p = (p.1 : V) + p.2 • Ω.e := by + simp [prodEquiv] + rfl + +/-- **The product coordinates preserve the Lebesgue measure**: `(x', t) ↦ x' + t e` carries the +product of the Lebesgue measures of `H` and `ℝ` to the Lebesgue measure of `V` (Mathlib's +`Submodule.measurePreserving_measurableEquivProd`, +`InnerProductSpace.euclideanHausdorffMeasure_eq_volume` and +`LinearIsometryEquiv.measurePreserving`). -/ +theorem measurePreserving_prodEquiv : + MeasurePreserving Ω.prodEquiv (volume.prod volume) volume := by + have h1 := (Ω.hyperplane.measurePreserving_measurableEquivProd (0 : V)).symm + rw [InnerProductSpace.euclideanHausdorffMeasure_eq_volume] at h1 + exact h1.comp ((MeasurePreserving.id volume).prod Ω.lineEquiv.measurePreserving) + +/-- The **shear** `(x', t) ↦ (x', t + φ(x'))` of `H × ℝ`, as a measurable equivalence. -/ +noncomputable def graphShear : Ω.hyperplane × ℝ ≃ᵐ Ω.hyperplane × ℝ where + toFun p := (p.1, p.2 + Ω.phiH p.1) + invFun p := (p.1, p.2 - Ω.phiH p.1) + left_inv p := by simp + right_inv p := by simp + measurable_toFun := + measurable_fst.prodMk (measurable_snd.add (Ω.continuous_phiH.measurable.comp measurable_fst)) + measurable_invFun := + measurable_fst.prodMk (measurable_snd.sub (Ω.continuous_phiH.measurable.comp measurable_fst)) + +/-- The shear preserves the Lebesgue measure of `H × ℝ`: it translates each vertical line +(Mathlib's `MeasurePreserving.skew_product`). -/ +theorem measurePreserving_graphShear : + MeasurePreserving Ω.graphShear (volume.prod volume) (volume.prod volume) := + (MeasurePreserving.id volume).skew_product (g := fun x' t => t + Ω.phiH x') + (measurable_snd.add (Ω.continuous_phiH.measurable.comp measurable_fst)) + (ae_of_all _ fun _ => map_add_right_eq_self volume _) + +/-- The **graph coordinates** `(x', t) ↦ γ(x') + t e`, the product coordinates after the shear. -/ +noncomputable def graphEquiv : Ω.hyperplane × ℝ ≃ᵐ V := Ω.graphShear.trans Ω.prodEquiv + +/-- `graphEquiv (x', t) = γ(x') + t e`. -/ +theorem graphEquiv_apply (p : Ω.hyperplane × ℝ) : + Ω.graphEquiv p = Ω.graphMap p.1 + p.2 • Ω.e := by + simp only [graphEquiv, MeasurableEquiv.trans_apply, prodEquiv_apply] + change (p.1 : V) + (p.2 + Ω.phi p.1) • Ω.e = (p.1 : V) + Ω.phi p.1 • Ω.e + p.2 • Ω.e + rw [add_smul] + abel + +/-- The graph coordinates preserve the Lebesgue measure. -/ +theorem measurePreserving_graphEquiv : + MeasurePreserving Ω.graphEquiv (volume.prod volume) volume := + Ω.measurePreserving_prodEquiv.comp Ω.measurePreserving_graphShear + +/-! ### The flattening preserves the Lebesgue measure -/ + +/-- **The inverse flattening in coordinates**: `y ↦ y + φ(y) e` is the graph coordinates +`(x', t) ↦ γ(x') + t e` after the inverse of the product coordinates `(x', t) ↦ x' + t e`, since +`φ` is constant along `e`. -/ +theorem unflatten_eq : Ω.unflatten = Ω.graphEquiv ∘ Ω.prodEquiv.symm := by + funext y + have hy : y = ((Ω.prodEquiv.symm y).1 : V) + (Ω.prodEquiv.symm y).2 • Ω.e := by + rw [← prodEquiv_apply, MeasurableEquiv.apply_symm_apply] + rw [Function.comp_apply, graphEquiv_apply, graphMap, unflatten] + conv_lhs => rw [hy, Ω.const] + abel + +/-- **The flattening in coordinates**: `x ↦ x - φ(x) e` is the product coordinates after the +inverse of the graph coordinates (`Rd.LipschitzGraph.unflatten_eq`). -/ +theorem flatten_eq : Ω.flatten = Ω.prodEquiv ∘ Ω.graphEquiv.symm := by + funext x + have h : Ω.unflatten (Ω.prodEquiv (Ω.graphEquiv.symm x)) = x := by + rw [unflatten_eq, Function.comp_apply, MeasurableEquiv.symm_apply_apply, + MeasurableEquiv.apply_symm_apply] + conv_lhs => rw [← h] + rw [Function.comp_apply, flatten_unflatten] + +/-- **The inverse flattening preserves the Lebesgue measure** for every Lipschitz graph +(`Rd.LipschitzGraph.measurePreserving_graphEquiv`, `Rd.LipschitzGraph.measurePreserving_prodEquiv`): +it is a shear along `e` in the product coordinates. -/ +theorem measurePreserving_unflatten : MeasurePreserving Ω.unflatten volume volume := by + rw [unflatten_eq] + exact Ω.measurePreserving_graphEquiv.comp Ω.measurePreserving_prodEquiv.symm + +/-- **The flattening preserves the Lebesgue measure** for every Lipschitz graph, the inverse of +`Rd.LipschitzGraph.measurePreserving_unflatten`: it is the product coordinates after the inverse of +the graph coordinates (`Rd.LipschitzGraph.flatten_eq`). -/ +theorem measurePreserving_flatten : MeasurePreserving Ω.flatten volume volume := by + rw [flatten_eq] + exact Ω.measurePreserving_prodEquiv.comp Ω.measurePreserving_graphEquiv.symm + +end Coordinates + +end LipschitzGraph + +end Rd diff --git a/LeanPool/FunctionSpaces/Domains/Lipschitz/HalfSpace.lean b/LeanPool/FunctionSpaces/Domains/Lipschitz/HalfSpace.lean new file mode 100644 index 0000000000..080d0225f6 --- /dev/null +++ b/LeanPool/FunctionSpaces/Domains/Lipschitz/HalfSpace.lean @@ -0,0 +1,198 @@ +/- +Copyright (c) 2026 Mario Ullrich. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Mario Ullrich +-/ +module + +public import LeanPool.FunctionSpaces.Rd.Atoms.DiffeoInvariance +public import LeanPool.FunctionSpaces.Domains.Lipschitz.BoundedLipschitz +public import Mathlib.Geometry.Manifold.Instances.Real + +/- +Modified for Lean Pool: module names and imports adapted. +-/ + +/-! +# The half-space as a Besov domain + +Lipschitz graph domains have the extension property (`Rd.LipschitzGraph.hasBesovExtension`): +Rychkov's extension agrees with `f` on the domain and is bounded by a constant times the intrinsic +quasi-norm (`Rd.LipschitzGraph.modNorm_extension_le_modNormOn`). + +The closed half-space `{x : 0 ≤ ⟪x, e⟫}` for a unit vector `e` (`Rd.closedHalfSpace`) is a Besov +domain (`Rd.BesovDomain.closedHalfSpace`): it differs from the flat Lipschitz graph domain +`{x : 0 < ⟪x, e⟫}` (`Rd.LipschitzGraph.flat`) by the null set `e^⊥` +(`Rd.volume_orthogonal_singleton_eq_zero`, `Rd.closedHalfSpace_ae_eq`), and the extension property +is the same for sets that agree up to a null set (`Rd.HasBesovExtension.congr_set`, +`Rd.BesovDomain.of_ae_eq`). + +The models of manifolds are Besov domains: the range of a model with corners is one if it agrees +up to a null set with a set with the extension property (`Rd.BesovDomain.range_of_ae_eq`); the +range of the model with corners of the Euclidean half-space is the closed half-space +`{y : 0 ≤ ⟪y, e₀⟫}` for the unit vector `e₀ = (1, 0, …, 0)` (`Rd.e0`, `Rd.norm_e0`, +`Manifold.range_eq_closedHalfSpace`, `Rd.BesovDomain.range_euclideanHalfSpace`), and the range `V` +of a model without boundary is the whole space (`Rd.BesovDomain.range_of_boundaryless`). The first +coordinate is `⟪y, e₀⟫` (`Rd.coord_zero_eq_inner`). +-/ + +@[expose] public section + +open MeasureTheory Filter Topology Module Metric Set +open scoped ENNReal NNReal + +open ENNReal (lqNorm dyadicWeight) + +namespace Rd + +variable {V : Type*} [NormedAddCommGroup V] [InnerProductSpace ℝ V] [FiniteDimensional ℝ V] + [MeasurableSpace V] [BorelSpace V] + +/-! ### Hyperplanes are null sets -/ + +omit [FiniteDimensional ℝ V] [MeasurableSpace V] [BorelSpace V] in +/-- For `e ≠ 0` the orthogonal complement `e^⊥` is a proper subspace: `Kᗮ = ⊤` only for `K = ⊥` +(Mathlib's `Submodule.orthogonal_eq_top_iff`), and `ℝ e = ⊥` only for `e = 0` (Mathlib's +`Submodule.span_singleton_eq_bot`). -/ +theorem orthogonal_singleton_ne_top {e : V} (he : e ≠ 0) : (ℝ ∙ e)ᗮ ≠ ⊤ := by + simpa using he + +/-- **A hyperplane is a null set**: `e^⊥` has Lebesgue measure zero for `e ≠ 0` (Mathlib's +`MeasureTheory.Measure.addHaar_submodule`). -/ +theorem volume_orthogonal_singleton_eq_zero {e : V} (he : e ≠ 0) : + volume ((ℝ ∙ e)ᗮ : Set V) = 0 := + Measure.addHaar_submodule volume _ (orthogonal_singleton_ne_top he) + +/-! ### The extension property of Lipschitz graph domains -/ + +/-- **Lipschitz graph domains have the extension property**: Rychkov's extension agrees with `f` +on the domain (`Rd.LipschitzGraph.cutoff_extension_of_modNormOn`) and is bounded by a constant +times the intrinsic quasi-norm (`Rd.LipschitzGraph.modNorm_extension_le_modNormOn`); the proof +takes `C = G.coneBump.synthConst r s * G.intrinsicConst r`. -/ +theorem LipschitzGraph.hasBesovExtension (G : LipschitzGraph V) : + HasBesovExtension G.measurableSet_domain := by + intro p _ hp r s hs hsr q hq + have hr : 1 ≤ r := Nat.one_le_iff_ne_zero.2 (Nat.cast_pos.1 (hs.trans hsr)).ne' + exact ⟨G.coneBump.synthConst r s * G.intrinsicConst r, ENNReal.mul_ne_top + (G.coneBump.synthConst_ne_top hs hsr) (G.intrinsicConst_ne_top r), fun f hf => + ⟨G.extension hp r f, G.cutoff_extension_of_modNormOn hp hr hs hq hf, + G.modNorm_extension_le_modNormOn hp r hs hq hf⟩⟩ + +/-! ### The half-space -/ + +/-- The **closed half-space** `{x : 0 ≤ ⟪x, e⟫}`. -/ +def closedHalfSpace (e : V) : Set V := {x | 0 ≤ inner ℝ x e} + +omit [FiniteDimensional ℝ V] [MeasurableSpace V] [BorelSpace V] in +/-- The closed half-space is closed. -/ +theorem isClosed_closedHalfSpace (e : V) : IsClosed (closedHalfSpace e) := + isClosed_le continuous_const (continuous_id.inner continuous_const) + +omit [FiniteDimensional ℝ V] [MeasurableSpace V] [BorelSpace V] in +/-- The closed half-space is convex. -/ +theorem convex_closedHalfSpace (e : V) : Convex ℝ (closedHalfSpace e) := by + intro x hx y hy a b ha hb _ + change 0 ≤ inner ℝ (a • x + b • y) e + rw [inner_add_left, real_inner_smul_left, real_inner_smul_left] + exact add_nonneg (mul_nonneg ha hx) (mul_nonneg hb hy) + +omit [FiniteDimensional ℝ V] [MeasurableSpace V] [BorelSpace V] in +/-- A nonzero `e` lies in the interior of its closed half-space. -/ +theorem mem_interior_closedHalfSpace {e : V} (he : e ≠ 0) : e ∈ interior (closedHalfSpace e) := by + refine mem_interior.2 ⟨{x | 0 < inner ℝ x e}, fun x (hx : 0 < inner ℝ x e) => hx.le, + isOpen_lt continuous_const (continuous_id.inner continuous_const), ?_⟩ + change 0 < inner ℝ e e + rw [real_inner_self_eq_norm_sq] + exact pow_pos (norm_pos_iff.2 he) 2 + +omit [FiniteDimensional ℝ V] [MeasurableSpace V] [BorelSpace V] in +/-- The **flat Lipschitz graph domain**: the open half-space `{x : 0 < ⟪x, e⟫}` for a unit +vector `e`, with graph function `0`. -/ +def LipschitzGraph.flat (e : V) (he : ‖e‖ = 1) : LipschitzGraph V where + e := e + norm_e := he + M := 0 + M_nonneg := le_rfl + phi := 0 + lipschitz _ _ := by simp + const _ _ := rfl + +omit [FiniteDimensional ℝ V] [MeasurableSpace V] [BorelSpace V] in +/-- The flat domain is the open half-space. -/ +theorem LipschitzGraph.flat_domain (e : V) (he : ‖e‖ = 1) : + (LipschitzGraph.flat e he).domain = {x | 0 < inner ℝ x e} := rfl + +/-- **The closed half-space is the open one up to a null set**: they differ by the hyperplane +`e^⊥`, a proper subspace. -/ +theorem closedHalfSpace_ae_eq {e : V} (he : ‖e‖ = 1) : + closedHalfSpace e =ᵐ[volume] (LipschitzGraph.flat e he).domain := by + have he0 : e ≠ 0 := fun h => by simp [h] at he + have hnull := volume_orthogonal_singleton_eq_zero he0 + refine ae_eq_set.2 ⟨measure_mono_null (fun x hx => ?_) hnull, ?_⟩ + · have h1 : 0 ≤ inner ℝ x e := hx.1 + have h2 : ¬ 0 < inner ℝ x e := hx.2 + rw [SetLike.mem_coe, Submodule.mem_orthogonal_singleton_iff_inner_right, real_inner_comm] + exact le_antisymm (not_lt.1 h2) h1 + · have hsub : (LipschitzGraph.flat e he).domain ⊆ closedHalfSpace e := + fun x (hx : 0 < inner ℝ x e) => hx.le + rw [sdiff_eq_empty.2 hsub, measure_empty] + +/-- **The closed half-space is a Besov domain**: it agrees up to a null set with the flat Lipschitz +graph domain (`Rd.closedHalfSpace_ae_eq`), which has the extension property +(`Rd.LipschitzGraph.hasBesovExtension`). -/ +theorem BesovDomain.closedHalfSpace {e : V} (he : ‖e‖ = 1) : BesovDomain (closedHalfSpace e) := + of_ae_eq (convex_closedHalfSpace e) (isClosed_closedHalfSpace e) + ⟨e, mem_interior_closedHalfSpace fun h => by simp [h] at he⟩ + (LipschitzGraph.flat e he).hasBesovExtension (closedHalfSpace_ae_eq he) + +/-! ### The models of manifolds -/ + +section FirstAxis + +variable {n : ℕ} [NeZero n] + +/-- The unit vector `e₀ = (1, 0, …, 0)` of `ℝ^n`. -/ +noncomputable def e0 : EuclideanSpace ℝ (Fin n) := EuclideanSpace.single 0 1 + +/-- `‖e₀‖ = 1`. -/ +theorem norm_e0 : ‖(e0 : EuclideanSpace ℝ (Fin n))‖ = 1 := by + simp [e0] + +/-- The first coordinate is the inner product with `e₀`. -/ +theorem coord_zero_eq_inner (y : EuclideanSpace ℝ (Fin n)) : y 0 = inner ℝ y e0 := by + simp [e0, EuclideanSpace.inner_single_right] + +open scoped Manifold in +/-- The range of the half-space model is the closed half-space `{y : 0 ≤ ⟪y, e₀⟫}`. -/ +theorem _root_.Manifold.range_eq_closedHalfSpace : + range (𝓡∂ n) = Rd.closedHalfSpace (Rd.e0 : EuclideanSpace ℝ (Fin n)) := by + rw [range_modelWithCornersEuclideanHalfSpace] + ext y + simp [Rd.closedHalfSpace, Rd.e0, EuclideanSpace.inner_single_right] + +end FirstAxis + +/-- **Models of manifolds as Besov domains**: the range of a model with corners is a Besov domain +if it agrees up to a null set with a set with the extension property. The range is closed, convex +and has nonempty interior for every real model with corners (Mathlib's +`ModelWithCorners.isClosed_range`, `ModelWithCorners.convex_range`, +`ModelWithCorners.nonempty_interior`). -/ +theorem BesovDomain.range_of_ae_eq {H : Type*} [TopologicalSpace H] (I : ModelWithCorners ℝ V H) + {U : Set V} {hU : MeasurableSet U} (h : HasBesovExtension hU) (hae : range I =ᵐ[volume] U) : + BesovDomain (range I) := + of_ae_eq I.convex_range I.isClosed_range I.nonempty_interior h hae + +/-- **The Euclidean half-space model is a Besov domain**: the range of the model with corners +`𝓡∂ n` is the closed half-space `{y : 0 ≤ ⟪y, e₀⟫}` (`Manifold.range_eq_closedHalfSpace`). -/ +instance BesovDomain.range_euclideanHalfSpace (n : ℕ) [NeZero n] : + BesovDomain (Set.range (modelWithCornersEuclideanHalfSpace n)) := by + rw [Manifold.range_eq_closedHalfSpace] + exact BesovDomain.closedHalfSpace norm_e0 + +/-- **A model without boundary is a Besov domain**: its range is the whole space. -/ +instance BesovDomain.range_of_boundaryless {H : Type*} [TopologicalSpace H] + (I : ModelWithCorners ℝ V H) [I.Boundaryless] : BesovDomain (Set.range I) := by + rw [I.range_eq_univ] + infer_instance + +end Rd diff --git a/LeanPool/FunctionSpaces/Domains/Lipschitz/LipschitzGraph.lean b/LeanPool/FunctionSpaces/Domains/Lipschitz/LipschitzGraph.lean new file mode 100644 index 0000000000..ffe427c01d --- /dev/null +++ b/LeanPool/FunctionSpaces/Domains/Lipschitz/LipschitzGraph.lean @@ -0,0 +1,478 @@ +/- +Copyright (c) 2026 Mario Ullrich. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Mario Ullrich +-/ +module + +public import LeanPool.FunctionSpaces.Rd.LocalMeans.LocalMeans +public import LeanPool.FunctionSpaces.Analysis.Lp.IndicatorOperator +public import Mathlib.Analysis.Calculus.BumpFunction.Normed + +/- +Modified for Lean Pool: module names and imports adapted. +-/ + +/-! +# Lipschitz graph domains + +A **Lipschitz graph domain** in `V` is `Ω = {x : φ(x) < ⟪x, e⟫}` for a unit vector `e` and an +`M`-Lipschitz function `φ` that is constant along `e` (`Rd.LipschitzGraph`); for `V = ℝ^d` and +`e = e_d` this is `{x_d > φ(x_1, …, x_(d-1))}`. The function `φ` is Lipschitz in Mathlib's sense +(`Rd.LipschitzGraph.lipschitzWith_phi`), `Ω` is open (`Rd.LipschitzGraph.toOpens`), and its +closure is `{x : φ(x) ≤ ⟪x, e⟫}` (`Rd.LipschitzGraph.closure_domain`). With the +cone `K = {y : M ‖y - ⟪y, e⟫ e‖ < ⟪y, e⟫}` (`Rd.LipschitzGraph.cone`), `Ω + K ⊆ Ω` +(`Rd.LipschitzGraph.add_mem`): a step into the cone raises `⟪·, e⟫` faster than `φ`. The cone is +closed under positive scaling and contains a ball around `e/4` +(`Rd.LipschitzGraph.ball_subset_cone`). The closed cone `K̄ = {y : M ‖y - ⟪y, e⟫ e‖ ≤ ⟪y, e⟫}` +(`Rd.LipschitzGraph.closedCone`) is closed under nonnegative scaling, and still `Ω + K̄ ⊆ Ω` +(`Rd.LipschitzGraph.add_mem_of_mem_closedCone`); for the closure, `Ω̄ + K ⊆ Ω` +(`Rd.LipschitzGraph.add_mem_of_mem_closure`). Both rest on `φ(x + y) ≤ φ(x) + M ‖y - ⟪y, e⟫ e‖` +(`Rd.LipschitzGraph.phi_add_le`). If the closed support of `η` lies in `K`, so does that of every +dilate `η_c`, `c > 0` (`Rd.LipschitzGraph.mem_cone_of_mem_tsupport_dilate`). + +The **cone bump** (`Rd.LipschitzGraph.coneBump`) is a bump for local means supported in +`-K ∩ B(0, 1/2)`: the bump of the smooth bump function around `-e/4` of radius `ρ` +(`Rd.LocalMeansBump.ofContDiffBump`). A kernel `k` is **supported in `-K`** if `k(y) ≠ 0` implies +`-y ∈ K` (`Rd.LipschitzGraph.ConeSupported`); this passes to sums, differences and dilations, so +the moment kernels and the dual kernels of every bump supported in `-K` are supported in `-K` +(`Rd.LipschitzGraph.coneSupported_momentKernel_of`, `Rd.LipschitzGraph.coneSupported_dual_of`), +and so are the local means kernels of the cone bump (`Rd.LipschitzGraph.coneSupported_kernel`). + +**Support principle** (`Rd.LipschitzGraph.conv_indicator_eq`): for a kernel supported in `-K` and +`x ∈ Ω`, `(k ⋆ f)(x)` depends only on `f` on `Ω`, since `x - y ∈ x + K ⊆ Ω` whenever `k(y) ≠ 0`. +This is the support principle for two sets, `(k ⋆ 1_W f)(x) = (k ⋆ f)(x)` if `x - y ∈ W` whenever +`k(y) ≠ 0` (`Rd.conv_indicator_eq_of_forall`, `Rd.indicatorLp_convLp_indicatorLp`), for `W = Ω`. +On `L_p`, with the cut-off `f ↦ 1_Ω f` (`Rd.LipschitzGraph.cutoff`, from `Rd.indicatorLp`): +`1_Ω (k ⋆ (1_Ω h)) = 1_Ω (k ⋆ h)` (`Rd.LipschitzGraph.cutoff_convLp_cutoff`). +Two classes have the same cut-off iff they agree almost everywhere on the set +(`Rd.indicatorLp_eq_iff_ae_eq_restrict`). +-/ + +@[expose] public section + +open MeasureTheory Filter Topology Module +open scoped ENNReal + +namespace Rd + +variable {V : Type*} [NormedAddCommGroup V] [InnerProductSpace ℝ V] + +/-! ### The support principle for two sets -/ + +section SupportPrincipleTwoSets + +variable [MeasurableSpace V] + +omit [InnerProductSpace ℝ V] in +/-- **The support principle for two sets**: if `x - y ∈ W` whenever `k(y) ≠ 0`, then +`(k ⋆ 1_W f)(x) = (k ⋆ f)(x)`. -/ +theorem conv_indicator_eq_of_forall {k : V → ℂ} {W : Set V} (f : V → ℂ) {x : V} + (hx : ∀ y, k y ≠ 0 → x - y ∈ W) (μ : Measure V) : + conv k (W.indicator f) μ x = conv k f μ x := by + rw [conv_apply, conv_apply] + congr 1 + funext y + by_cases hy : k y = 0 + · simp [hy] + · rw [Set.indicator_of_mem (hx y hy)] + +variable [FiniteDimensional ℝ V] [BorelSpace V] {p : ℝ≥0∞} [Fact (1 ≤ p)] + +/-- **The support principle for two sets on `L_p`**: `1_U (k ⋆ (1_W h)) = 1_U (k ⋆ h)` if +`x - y ∈ W` for `x ∈ U` and `k(y) ≠ 0`. -/ +theorem indicatorLp_convLp_indicatorLp (hp : p ≠ ∞) {k : V → ℂ} (hk : Integrable k) + {U W : Set V} (hU : MeasurableSet U) (hW : MeasurableSet W) + (hUW : ∀ x ∈ U, ∀ y, k y ≠ 0 → x - y ∈ W) (h : Lp ℂ p (volume : Measure V)) : + indicatorLp hU (convLp hp hk (indicatorLp hW h)) = indicatorLp hU (convLp hp hk h) := by + refine Lp.ext ?_ + have h3 : conv k (indicatorLp hW h : V → ℂ) volume = conv k (W.indicator h) volume := + conv_congr_ae (indicatorLp_apply_ae hW h) + filter_upwards [indicatorLp_apply_ae hU (convLp hp hk (indicatorLp hW h)), + convLp_apply_ae hp hk (indicatorLp hW h), indicatorLp_apply_ae hU (convLp hp hk h), + convLp_apply_ae hp hk h] with x hx1 hx2 hx4 hx5 + rw [hx1, hx4] + by_cases hx : x ∈ U + · rw [Set.indicator_of_mem hx, Set.indicator_of_mem hx, hx2, hx5, h3, + conv_indicator_eq_of_forall _ (hUW x hx) volume] + · rw [Set.indicator_of_notMem hx, Set.indicator_of_notMem hx] + +end SupportPrincipleTwoSets + +/-! ### Lipschitz graph domains and their cones -/ + +variable (V) in +/-- A **Lipschitz graph domain** `{x : φ(x) < ⟪x, e⟫}`, given by a unit vector `e` and a function +`φ` that is `M`-Lipschitz and constant along `e`. -/ +structure LipschitzGraph where + /-- The upward direction. -/ + e : V + norm_e : ‖e‖ = 1 + /-- The Lipschitz constant. -/ + M : ℝ + M_nonneg : 0 ≤ M + /-- The graph function. -/ + phi : V → ℝ + lipschitz : ∀ x y, |phi x - phi y| ≤ M * ‖x - y‖ + const : ∀ (x : V) (t : ℝ), phi (x + t • e) = phi x + +namespace LipschitzGraph + +variable (Ω : LipschitzGraph V) + +/-- The domain `{x : φ(x) < ⟪x, e⟫}`. -/ +def domain : Set V := {x | Ω.phi x < inner ℝ x Ω.e} + +/-- The cone `K = {y : M ‖y - ⟪y, e⟫ e‖ < ⟪y, e⟫}`. -/ +def cone : Set V := {y | Ω.M * ‖y - inner ℝ y Ω.e • Ω.e‖ < inner ℝ y Ω.e} + +/-- The closed cone `K̄ = {y : M ‖y - ⟪y, e⟫ e‖ ≤ ⟪y, e⟫}`, which contains `K`. -/ +def closedCone : Set V := {y | Ω.M * ‖y - inner ℝ y Ω.e • Ω.e‖ ≤ inner ℝ y Ω.e} + +/-- The cone lies in the closed cone. -/ +theorem cone_subset_closedCone : Ω.cone ⊆ Ω.closedCone := fun y hy => by + have hy' : Ω.M * ‖y - inner ℝ y Ω.e • Ω.e‖ < inner ℝ y Ω.e := hy + exact hy'.le + +/-- **The graph function along a step**: `φ(x + y) ≤ φ(x) + M ‖y - ⟪y, e⟫ e‖`, since `φ` is +constant along `e` and `M`-Lipschitz. -/ +theorem phi_add_le (x y : V) : Ω.phi (x + y) ≤ Ω.phi x + Ω.M * ‖y - inner ℝ y Ω.e • Ω.e‖ := by + set d := y - inner ℝ y Ω.e • Ω.e + have h1 : Ω.phi (x + y) = Ω.phi (x + d) := by + rw [← Ω.const (x + d) (inner ℝ y Ω.e)] + congr 1 + simp only [d] + abel + have h := Ω.lipschitz (x + d) x + rw [add_sub_cancel_left] at h + rw [h1] + linarith [le_abs_self (Ω.phi (x + d) - Ω.phi x)] + +/-- **Steps into the closed cone stay in the domain**: `Ω + K̄ ⊆ Ω`, since the domain is defined by +a strict inequality (`Rd.LipschitzGraph.phi_add_le`). -/ +theorem add_mem_of_mem_closedCone {x y : V} (hx : x ∈ Ω.domain) (hy : y ∈ Ω.closedCone) : + x + y ∈ Ω.domain := by + have hx' : Ω.phi x < inner ℝ x Ω.e := hx + have hy' : Ω.M * ‖y - inner ℝ y Ω.e • Ω.e‖ ≤ inner ℝ y Ω.e := hy + change Ω.phi (x + y) < inner ℝ (x + y) Ω.e + rw [inner_add_left] + linarith [Ω.phi_add_le x y] + +/-- **Steps into the cone stay in the domain**: `Ω + K ⊆ Ω`, the case `K ⊆ K̄` of +`Rd.LipschitzGraph.add_mem_of_mem_closedCone`. -/ +theorem add_mem {x y : V} (hx : x ∈ Ω.domain) (hy : y ∈ Ω.cone) : x + y ∈ Ω.domain := + Ω.add_mem_of_mem_closedCone hx (Ω.cone_subset_closedCone hy) + +/-- The cone is closed under positive scaling. -/ +theorem smul_mem_cone {c : ℝ} (hc : 0 < c) {y : V} (hy : y ∈ Ω.cone) : c • y ∈ Ω.cone := by + have hy' : Ω.M * ‖y - inner ℝ y Ω.e • Ω.e‖ < inner ℝ y Ω.e := hy + change Ω.M * ‖c • y - inner ℝ (c • y) Ω.e • Ω.e‖ < inner ℝ (c • y) Ω.e + rw [real_inner_smul_left, ← smul_smul, ← smul_sub, norm_smul, Real.norm_of_nonneg hc.le] + nlinarith + +/-- Multiples of a step in the cone stay in the domain: `x + l h ∈ Ω`. -/ +theorem add_nsmul_mem {x h : V} (hx : x ∈ Ω.domain) (hh : h ∈ Ω.cone) (l : ℕ) : + x + (l : ℝ) • h ∈ Ω.domain := by + rcases Nat.eq_zero_or_pos l with rfl | hl + · simpa using hx + · exact Ω.add_mem hx (Ω.smul_mem_cone (by exact_mod_cast hl) hh) + +/-- The closed cone is closed. -/ +theorem isClosed_closedCone : IsClosed Ω.closedCone := + isClosed_le (continuous_const.mul ((continuous_id.sub ((continuous_id.inner continuous_const).smul + continuous_const)).norm)) (continuous_id.inner continuous_const) + +/-- The closed cone is closed under nonnegative scaling. -/ +theorem smul_mem_closedCone {c : ℝ} (hc : 0 ≤ c) {y : V} (hy : y ∈ Ω.closedCone) : + c • y ∈ Ω.closedCone := by + have hy' : Ω.M * ‖y - inner ℝ y Ω.e • Ω.e‖ ≤ inner ℝ y Ω.e := hy + change Ω.M * ‖c • y - inner ℝ (c • y) Ω.e • Ω.e‖ ≤ inner ℝ (c • y) Ω.e + rw [real_inner_smul_left, ← smul_smul, ← smul_sub, norm_smul, Real.norm_of_nonneg hc] + nlinarith + +/-- The graph function `φ` is `M`-Lipschitz, in the form of Mathlib's `LipschitzWith`. -/ +theorem lipschitzWith_phi : LipschitzWith ⟨Ω.M, Ω.M_nonneg⟩ Ω.phi := + LipschitzWith.of_dist_le_mul fun x y => by + rw [Real.dist_eq, dist_eq_norm] + exact Ω.lipschitz x y + +/-- The graph function is continuous. -/ +theorem continuous_phi : Continuous Ω.phi := + Ω.lipschitzWith_phi.continuous + +/-- **Steps into the open cone from the closure stay in the domain**: `Ω̄ + K ⊆ Ω`, since +`φ(x) ≤ ⟪x, e⟫` on the closure of `Ω` and the cone is defined by a strict inequality +(`Rd.LipschitzGraph.phi_add_le`). -/ +theorem add_mem_of_mem_closure {x y : V} (hx : x ∈ closure Ω.domain) (hy : y ∈ Ω.cone) : + x + y ∈ Ω.domain := by + have hx' : Ω.phi x ≤ inner ℝ x Ω.e := + closure_lt_subset_le Ω.continuous_phi (continuous_id.inner continuous_const) hx + have hy' : Ω.M * ‖y - inner ℝ y Ω.e • Ω.e‖ < inner ℝ y Ω.e := hy + change Ω.phi (x + y) < inner ℝ (x + y) Ω.e + rw [inner_add_left] + linarith [Ω.phi_add_le x y] + +/-- The domain is open. -/ +theorem isOpen_domain : IsOpen Ω.domain := + isOpen_lt Ω.continuous_phi (continuous_id.inner continuous_const) + +/-- **The closure of a graph domain** is `{x : φ(x) ≤ ⟪x, e⟫}`: the points with `φ(x) = ⟪x, e⟫` +are limits of `x + t e`, `t ↓ 0`. -/ +theorem closure_domain : closure Ω.domain = {x | Ω.phi x ≤ inner ℝ x Ω.e} := by + refine Set.Subset.antisymm + (closure_lt_subset_le Ω.continuous_phi (continuous_id.inner continuous_const)) fun x hx => ?_ + have hlim : Tendsto (fun t : ℝ => x + t • Ω.e) (𝓝[>] 0) (𝓝 x) := + ((continuous_const.add (continuous_id.smul continuous_const)).tendsto' (0 : ℝ) x + (by simp)).mono_left nhdsWithin_le_nhds + refine mem_closure_of_tendsto hlim (eventually_nhdsWithin_of_forall fun t (ht : 0 < t) => ?_) + change Ω.phi (x + t • Ω.e) < inner ℝ (x + t • Ω.e) Ω.e + rw [Ω.const, inner_add_left, real_inner_smul_left, real_inner_self_eq_norm_sq, Ω.norm_e] + have hx' : Ω.phi x ≤ inner ℝ x Ω.e := hx + linarith + +/-- The graph domain `Ω = {x : φ(x) < ⟪x, e⟫}` as an element of Mathlib's `Opens V`, the form in +which open sets carry weak derivatives. -/ +def toOpens : TopologicalSpace.Opens V := ⟨Ω.domain, Ω.isOpen_domain⟩ + +/-- The points of `Ω.toOpens` are the points of the graph domain. -/ +@[simp] +theorem coe_toOpens : (Ω.toOpens : Set V) = Ω.domain := + rfl + +/-- The radius `1/(8(M + 1))` of a ball around `e/4` inside the cone. -/ +noncomputable def coneRadius : ℝ := 1 / (8 * (Ω.M + 1)) + +/-- The radius is positive. -/ +theorem coneRadius_pos : 0 < Ω.coneRadius := by + have := Ω.M_nonneg + unfold coneRadius + positivity + +/-- `ρ ≤ 1/8`. -/ +theorem coneRadius_le : Ω.coneRadius ≤ 1 / 8 := by + have := Ω.M_nonneg + unfold coneRadius + rw [div_le_div_iff₀ (by positivity) (by norm_num)] + nlinarith + +/-- `(2M + 1) ρ ≤ 1/4`. -/ +theorem two_mul_add_one_mul_coneRadius_le : (2 * Ω.M + 1) * Ω.coneRadius ≤ 1 / 4 := by + have := Ω.M_nonneg + unfold coneRadius + rw [mul_one_div, div_le_div_iff₀ (by positivity) (by norm_num)] + nlinarith + +/-- **A ball inside the cone**: `B(e/4, ρ) ⊆ K`, since the component orthogonal to `e` of a point +of the ball is at most `2ρ` and its component along `e` at least `1/4 - ρ`. -/ +theorem ball_subset_cone : Metric.ball ((1 / 4 : ℝ) • Ω.e) Ω.coneRadius ⊆ Ω.cone := by + intro w hw + rw [Metric.mem_ball, dist_eq_norm] at hw + set d := w - (1 / 4 : ℝ) • Ω.e with hd + have hwd : w = (1 / 4 : ℝ) • Ω.e + d := by rw [hd]; abel + have hee : inner ℝ Ω.e Ω.e = (1 : ℝ) := by + rw [real_inner_self_eq_norm_sq, Ω.norm_e, one_pow] + have hde : |inner ℝ d Ω.e| ≤ ‖d‖ := by + have h := abs_real_inner_le_norm d Ω.e + rwa [Ω.norm_e, mul_one] at h + have hinner : inner ℝ w Ω.e = 1 / 4 + inner ℝ d Ω.e := by + rw [hwd, inner_add_left, real_inner_smul_left, hee, mul_one] + have hperp : w - inner ℝ w Ω.e • Ω.e = d - inner ℝ d Ω.e • Ω.e := by + rw [hinner, add_smul] + rw [hwd] + abel + have hnorm : ‖d - inner ℝ d Ω.e • Ω.e‖ ≤ 2 * ‖d‖ := by + calc ‖d - inner ℝ d Ω.e • Ω.e‖ ≤ ‖d‖ + ‖inner ℝ d Ω.e • Ω.e‖ := norm_sub_le _ _ + _ = ‖d‖ + |inner ℝ d Ω.e| := by rw [norm_smul, Real.norm_eq_abs, Ω.norm_e, mul_one] + _ ≤ 2 * ‖d‖ := by linarith + have hM := Ω.M_nonneg + have h1 : Ω.M * ‖d - inner ℝ d Ω.e • Ω.e‖ ≤ Ω.M * (2 * ‖d‖) := + mul_le_mul_of_nonneg_left hnorm hM + have h2 : (2 * Ω.M + 1) * ‖d‖ < (2 * Ω.M + 1) * Ω.coneRadius := + mul_lt_mul_of_pos_left hw (by positivity) + have h3 := Ω.two_mul_add_one_mul_coneRadius_le + have h4 : -‖d‖ ≤ inner ℝ d Ω.e := (abs_le.1 hde).1 + change Ω.M * ‖w - inner ℝ w Ω.e • Ω.e‖ < inner ℝ w Ω.e + rw [hperp, hinner] + nlinarith + +/-! ### Kernels supported in `-K` -/ + +/-- A kernel `k` is **supported in `-K`** if `k(y) ≠ 0` implies `-y ∈ K`. -/ +def ConeSupported (k : V → ℂ) : Prop := ∀ y, k y ≠ 0 → -y ∈ Ω.cone + +variable {Ω} + +/-- Sums of kernels supported in `-K` are supported in `-K`. -/ +theorem ConeSupported.add {k k' : V → ℂ} (hk : Ω.ConeSupported k) (hk' : Ω.ConeSupported k') : + Ω.ConeSupported (k + k') := fun y hy => by + by_cases h : k y = 0 + · exact hk' y fun h' => hy (by simp [h, h']) + · exact hk y h + +/-- Differences of kernels supported in `-K` are supported in `-K`. -/ +theorem ConeSupported.sub {k k' : V → ℂ} (hk : Ω.ConeSupported k) (hk' : Ω.ConeSupported k') : + Ω.ConeSupported (k - k') := fun y hy => by + by_cases h : k y = 0 + · exact hk' y fun h' => hy (by simp [h, h']) + · exact hk y h + +/-- Dilations of kernels supported in `-K` are supported in `-K`. -/ +theorem ConeSupported.dilate {k : V → ℂ} (hk : Ω.ConeSupported k) {c : ℝ} (hc : 0 < c) : + Ω.ConeSupported (Rd.dilate c k) := fun y hy => by + have hky : k (c • y) ≠ 0 := fun h => hy (by simp [Rd.dilate, h]) + have h := Ω.smul_mem_cone (inv_pos.2 hc) (hk (c • y) hky) + rwa [smul_neg, inv_smul_smul₀ hc.ne'] at h + +variable (Ω) in +/-- **Dilates of a cone kernel are cone kernels**: if the closed support of `η` lies in the cone +`K` and `c > 0`, so does the closed support of `η_c`, since `c x ∈ supp η` for `x ∈ supp η_c` +(`Rd.smul_mem_tsupport_of_mem_tsupport_dilate`) and `c⁻¹ K ⊆ K` +(`Rd.LipschitzGraph.smul_mem_cone`). -/ +theorem mem_cone_of_mem_tsupport_dilate {η : V → ℂ} (hη : tsupport η ⊆ Ω.cone) {c : ℝ} + (hc : 0 < c) {x : V} (hx : x ∈ tsupport (Rd.dilate c η)) : x ∈ Ω.cone := by + have h := Ω.smul_mem_cone (inv_pos.2 hc) + (hη (smul_mem_tsupport_of_mem_tsupport_dilate hc.ne' hx)) + rwa [inv_smul_smul₀ hc.ne'] at h + +/-- Finite combinations of kernels supported in `-K` are supported in `-K`. -/ +theorem ConeSupported.finsetSum {ι : Type*} (s : Finset ι) (a : ι → ℂ) {k : ι → V → ℂ} + (hk : ∀ i ∈ s, Ω.ConeSupported (k i)) : + Ω.ConeSupported (fun x => ∑ i ∈ s, a i * k i x) := fun y hy => by + obtain ⟨i, hi, hne⟩ := Finset.exists_ne_zero_of_sum_ne_zero hy + exact hk i hi y (right_ne_zero_of_mul hne) + +/-- **Kernels supported in `-K` look into `Ω` from points of `Ω`**: if `x ∈ Ω` and `k(y) ≠ 0`, +then `x - y ∈ x + K ⊆ Ω` (`Rd.LipschitzGraph.add_mem`). -/ +theorem ConeSupported.sub_mem {k : V → ℂ} (hk : Ω.ConeSupported k) {x y : V} + (hx : x ∈ Ω.domain) (hy : k y ≠ 0) : x - y ∈ Ω.domain := by + rw [sub_eq_add_neg] + exact Ω.add_mem hx (hk y hy) + +variable (Ω) + +/-! ### The cone bump -/ + +variable [FiniteDimensional ℝ V] [MeasurableSpace V] [BorelSpace V] + +/-- The smooth bump around `-e/4` with outer radius `ρ`. -/ +noncomputable def coneBumpBase : ContDiffBump (-((1 / 4 : ℝ) • Ω.e)) := + ⟨Ω.coneRadius / 2, Ω.coneRadius, by have := Ω.coneRadius_pos; positivity, + by have := Ω.coneRadius_pos; linarith⟩ + +/-- The **cone bump**: a bump for local means supported in `-K ∩ B(0, 1/2)`, the normalised +`ContDiffBump` around `-e/4` of radius `ρ` (`Rd.LocalMeansBump.ofContDiffBump`, since +`‖-e/4‖ + ρ ≤ 1/4 + 1/8 ≤ 1/2`). -/ +noncomputable def coneBump : LocalMeansBump V := + LocalMeansBump.ofContDiffBump Ω.coneBumpBase (R := 1 / 2) (by + have h : Ω.coneBumpBase.rOut = Ω.coneRadius := rfl + rw [h, norm_neg, norm_smul, Ω.norm_e, mul_one, Real.norm_of_nonneg (by norm_num)] + linarith [Ω.coneRadius_le]) + +/-- The cone bump vanishes outside the ball of radius `1/2`. -/ +theorem coneBump_radius : Ω.coneBump.radius = 1 / 2 := rfl + +/-- The cone bump is supported in `-K`. -/ +theorem coneSupported_coneBump : Ω.ConeSupported Ω.coneBump.toFun := fun y hy => by + have hy' : y ∈ Function.support (Ω.coneBumpBase.normed volume) := fun h => + hy (show ((Ω.coneBumpBase.normed volume y : ℝ) : ℂ) = 0 by rw [h, Complex.ofReal_zero]) + rw [Ω.coneBumpBase.support_normed_eq, Metric.mem_ball, dist_eq_norm] at hy' + refine Ω.ball_subset_cone ?_ + rw [Metric.mem_ball, dist_eq_norm, show -y - (1 / 4 : ℝ) • Ω.e = -(y - -((1 / 4 : ℝ) • Ω.e)) + by abel, norm_neg] + exact hy' + +/-- The moment kernels of a bump supported in `-K` are supported in `-K`. -/ +theorem coneSupported_momentKernel_of {b : LocalMeansBump V} (hb : Ω.ConeSupported b.toFun) + (L : ℕ) : Ω.ConeSupported (momentKernel b.toFun L) := + ConeSupported.finsetSum _ _ fun _ _ => hb.dilate (by positivity) + +/-- The dilated moment kernels of a bump supported in `-K` are supported in `-K`. -/ +theorem coneSupported_scaled_of {b : LocalMeansBump V} (hb : Ω.ConeSupported b.toFun) + (L j : ℕ) : Ω.ConeSupported (b.scaled L j) := + (Ω.coneSupported_momentKernel_of hb L).dilate (by positivity) + +/-- The dual kernels of a bump supported in `-K` are supported in `-K`. -/ +theorem coneSupported_dual_of {b : LocalMeansBump V} (hb : Ω.ConeSupported b.toFun) + (L j : ℕ) : Ω.ConeSupported (b.dual L j) := by + cases j with + | zero => exact Ω.coneSupported_scaled_of hb L 0 + | succ j => exact (Ω.coneSupported_scaled_of hb L (j + 1)).add (Ω.coneSupported_scaled_of hb L j) + +/-- The moment kernels of the cone bump are supported in `-K`. -/ +theorem coneSupported_momentKernel (L : ℕ) : + Ω.ConeSupported (momentKernel Ω.coneBump.toFun L) := + Ω.coneSupported_momentKernel_of Ω.coneSupported_coneBump L + +/-- The dilated moment kernels of the cone bump are supported in `-K`. -/ +theorem coneSupported_scaled (L j : ℕ) : Ω.ConeSupported (Ω.coneBump.scaled L j) := + Ω.coneSupported_scaled_of Ω.coneSupported_coneBump L j + +/-- The local means kernels of the cone bump are supported in `-K`. -/ +theorem coneSupported_kernel (L j : ℕ) : Ω.ConeSupported (Ω.coneBump.kernel L j) := by + cases j with + | zero => exact Ω.coneSupported_scaled L 0 + | succ j => exact (Ω.coneSupported_scaled L (j + 1)).sub (Ω.coneSupported_scaled L j) + +/-- The dual kernels of the cone bump are supported in `-K`. -/ +theorem coneSupported_dual (L j : ℕ) : Ω.ConeSupported (Ω.coneBump.dual L j) := + Ω.coneSupported_dual_of Ω.coneSupported_coneBump L j + +/-! ### The support principle -/ + +omit [FiniteDimensional ℝ V] in +/-- The domain is measurable. -/ +theorem measurableSet_domain : MeasurableSet Ω.domain := Ω.isOpen_domain.measurableSet + +omit [FiniteDimensional ℝ V] [BorelSpace V] in +/-- **The support principle**: for a kernel supported in `-K` and `x ∈ Ω`, +`(k ⋆ (1_Ω f))(x) = (k ⋆ f)(x)`. -/ +theorem conv_indicator_eq {k : V → ℂ} (hk : Ω.ConeSupported k) (f : V → ℂ) {x : V} + (hx : x ∈ Ω.domain) (μ : Measure V) : + conv k (Ω.domain.indicator f) μ x = conv k f μ x := + conv_indicator_eq_of_forall f (fun _ hy => hk.sub_mem hx hy) μ + +variable {p : ℝ≥0∞} [Fact (1 ≤ p)] + +/-- The **cut-off** `f ↦ 1_Ω f` on `L_p`. -/ +noncomputable def cutoff : Lp ℂ p (volume : Measure V) →L[ℂ] Lp ℂ p (volume : Measure V) := + indicatorLp Ω.measurableSet_domain + +/-- The cut-off is `1_Ω f` almost everywhere. -/ +theorem cutoff_apply_ae (f : Lp ℂ p (volume : Measure V)) : + Ω.cutoff f =ᵐ[volume] Ω.domain.indicator f := + indicatorLp_apply_ae Ω.measurableSet_domain f + +/-- `‖1_Ω f‖_p = ‖f‖_{L_p(Ω)}`. -/ +theorem enorm_cutoff (f : Lp ℂ p (volume : Measure V)) : + ‖Ω.cutoff f‖ₑ = eLpNorm (Ω.domain.indicator f) p volume := by + rw [Lp.eNorm_def, eLpNorm_congr_ae (Ω.cutoff_apply_ae f)] + +/-- `‖1_Ω f‖_p ≤ ‖f‖_p`. -/ +theorem enorm_cutoff_le (f : Lp ℂ p (volume : Measure V)) : ‖Ω.cutoff f‖ₑ ≤ ‖f‖ₑ := + enorm_indicatorLp_le _ f + +/-- Elements of `L_p` with the same cut-off agree almost everywhere on `Ω`. -/ +theorem indicator_ae_eq_of_cutoff_eq {F f : Lp ℂ p (volume : Measure V)} + (hFf : Ω.cutoff F = Ω.cutoff f) : Ω.domain.indicator F =ᵐ[volume] Ω.domain.indicator f := by + filter_upwards [Ω.cutoff_apply_ae F, Ω.cutoff_apply_ae f] with x h1 h2 + rw [← h1, ← h2, hFf] + +/-- **The support principle on `L_p`**: `1_Ω (k ⋆ (1_Ω h)) = 1_Ω (k ⋆ h)` for an integrable +kernel supported in `-K` (`Rd.indicatorLp_convLp_indicatorLp` for `U = W = Ω`). -/ +theorem cutoff_convLp_cutoff (hp : p ≠ ∞) {k : V → ℂ} (hk : Integrable k) + (hks : Ω.ConeSupported k) (h : Lp ℂ p (volume : Measure V)) : + Ω.cutoff (convLp hp hk (Ω.cutoff h)) = Ω.cutoff (convLp hp hk h) := + indicatorLp_convLp_indicatorLp hp hk Ω.measurableSet_domain Ω.measurableSet_domain + (fun _ hx _ hy => hks.sub_mem hx hy) h + +/-- **Convolutions of functions that agree on `Ω` agree on `Ω`**: if `1_Ω F = 1_Ω f`, then +`1_Ω (k ⋆ F) = 1_Ω (k ⋆ f)` for an integrable kernel supported in `-K`. -/ +theorem cutoff_convLp_eq (hp : p ≠ ∞) {k : V → ℂ} (hk : Integrable k) + (hks : Ω.ConeSupported k) {F f : Lp ℂ p (volume : Measure V)} + (hFf : Ω.cutoff F = Ω.cutoff f) : + Ω.cutoff (convLp hp hk F) = Ω.cutoff (convLp hp hk f) := by + rw [← Ω.cutoff_convLp_cutoff hp hk hks F, hFf, Ω.cutoff_convLp_cutoff hp hk hks f] + +end LipschitzGraph + +end Rd diff --git a/LeanPool/FunctionSpaces/Domains/Lipschitz/LipschitzGraphArea.lean b/LeanPool/FunctionSpaces/Domains/Lipschitz/LipschitzGraphArea.lean new file mode 100644 index 0000000000..0a0c8bdc3e --- /dev/null +++ b/LeanPool/FunctionSpaces/Domains/Lipschitz/LipschitzGraphArea.lean @@ -0,0 +1,892 @@ +/- +Copyright (c) 2026 Mario Ullrich. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Mario Ullrich +-/ +module + +public import LeanPool.FunctionSpaces.Domains.Lipschitz.GraphParametrization +public import Mathlib.Geometry.Euclidean.Volume.Measure +public import Mathlib.Analysis.Calculus.Rademacher +public import Mathlib.Analysis.Calculus.Gradient.Basic +public import Mathlib.LinearAlgebra.Transvection.Basic +public import Mathlib.MeasureTheory.Measure.Lebesgue.EqHaar +public import Mathlib.MeasureTheory.Function.SpecialFunctions.Inner +public import Mathlib.Analysis.InnerProductSpace.NormDet + +/- +Modified for Lean Pool: module names and imports adapted. +-/ + +/-! +# The area formula for Lipschitz graphs + +Let `Ω = {x : φ(x) < ⟪x, e⟫}` be a Lipschitz graph domain in `V`, `dim V = n`, with the graph map +`γ(x') = x' + φ(x') e` over the hyperplane `H = e^⊥` (`Rd.LipschitzGraph.graphMap`), whose range is +the boundary of `Ω`. By Rademacher's theorem `φ|_H` has a +gradient `∇φ(x') ∈ H` almost everywhere (`Rd.LipschitzGraph.gradPhi`). The **area formula** +(`Rd.LipschitzGraph.euclideanHausdorffMeasure_graphMap_image`) states, for every measurable +`A ⊆ H`, `μHE[n-1] (γ(A)) = ∫_A √(1 + ‖∇φ(x')‖²) dx'` for Mathlib's Euclidean Hausdorff measure +`μHE[n-1]`, normalised to be the volume on hyperplanes. In measure form, the image of the measure +with density `√(1 + ‖∇φ‖²)` (`Rd.LipschitzGraph.gram`) is `μHE[n-1]` on `γ(H)` +(`Rd.LipschitzGraph.map_graphMap_withDensity`), and in integral form +`∫_{γ(H)} F dμHE[n-1] = ∫_H F(γ x') √(1 + ‖∇φ(x')‖²) dx'` for every `F : V → [0, ∞]` and every +`F : V → ℂ` (`Rd.LipschitzGraph.lintegral_graphMap`, `Rd.LipschitzGraph.integral_graphMap`). + +The proof is the one of Federer, 3.2.3, and Evans–Gariepy, §3.3, for a graph, which is injective +and antilipschitz with constant `1`: + +* **Linear graphs** (`Rd.LipschitzGraph.euclideanHausdorffMeasure_linearGraph_image`): the linear + map `S_g x' = x' + ⟪g, x'⟫ e` satisfies `S_g* S_g x' = x' + ⟪g, x'⟫ g`, a transvection of + determinant `1 + ‖g‖²`, so its norm determinant is `√(1 + ‖g‖²)` + (`Rd.LipschitzGraph.normDet_linearGraph`), and Mathlib's area formula for linear maps + (`LinearMap.euclideanHausdorffMeasure_image_eq_normDet_mul_volume`) applies. Explicitly, `S_g` + is a stretch of `H` by `√(1 + ‖g‖²)` along `g` (`Rd.stretch`) followed by an isometry + (`Rd.LipschitzGraph.tilt`, `Rd.LipschitzGraph.linearGraph_eq_tilt_comp_stretch`). +* **Nearby graphs** (`Rd.LipschitzGraph.euclideanHausdorffMeasure_graphOver_image_le`): if the + increments of two functions on `P ⊆ H` differ by at most `δ ‖x' - y'‖`, the Hausdorff measures + of their graphs over `P` differ at most by the factor `(1 + δ)^(n-1)`, by the bound for + Lipschitz maps (`LipschitzOnWith.euclideanHausdorffMeasure_image_le`, from Mathlib's + `LipschitzOnWith.hausdorffMeasure_image_le`). +* **Good pieces** (`Rd.LipschitzGraph.exists_goodPartition`): for `ε > 0`, `H` is, up to a null + set, a countable disjoint union of measurable sets on which `φ` is `2ε`-close to an affine + function with gradient `g` and `‖∇φ - g‖ ≤ ε`. +* Summing over the pieces gives the formula up to the factor `(1 + 2ε)^(n-1) (1 + ε)` + (`Rd.areaFactor`), and `ε → 0`. + +The **outward unit normal** `ν = (∇φ - e)/√(1 + ‖∇φ‖²)` (`Rd.LipschitzGraph.normalAt`) is a +measurable unit vector with `⟪ν, y⟫ < 0` for every `y` in the cone of `Ω`. +-/ + +@[expose] public section + +open MeasureTheory Module Metric Filter Topology Function +open scoped ENNReal NNReal + +/-! ### Euclidean Hausdorff measures under Lipschitz maps -/ + +/-- **Lipschitz maps and the Euclidean Hausdorff measure**: a map that is `K`-Lipschitz on `s` +increases `μHE[d]` by at most the factor `K^d`, `μHE[d] (f '' s) ≤ K^d μHE[d] s`. This is +Mathlib's `LipschitzOnWith.hausdorffMeasure_image_le` for the normalised measure `μHE[d]`, a +fixed multiple of `μH[d]`. -/ +theorem LipschitzOnWith.euclideanHausdorffMeasure_image_le {X Y : Type*} [EMetricSpace X] + [MeasurableSpace X] [BorelSpace X] [EMetricSpace Y] [MeasurableSpace Y] [BorelSpace Y] + {K : ℝ≥0} {f : X → Y} {s : Set X} (h : LipschitzOnWith K f s) (d : ℕ) : + μHE[d] (f '' s) ≤ (K : ℝ≥0∞) ^ d * μHE[d] s := by + simp only [Measure.euclideanHausdorffMeasure_def, smul_apply, ENNReal.smul_def, + smul_eq_mul] + have h1 := h.hausdorffMeasure_image_le (d := d) (Nat.cast_nonneg d) + rw [ENNReal.rpow_natCast] at h1 + calc _ ≤ _ * ((K : ℝ≥0∞) ^ d * μH[d] s) := mul_le_mul' le_rfl h1 + _ = _ := by ring + +namespace Rd + +/-- **Hausdorff measures of nearby images**: let `f₂` satisfy `‖x - y‖ ≤ ‖f₂ x - f₂ y‖` on `P`, +and let the increments of `f₁` differ from those of `f₂` by at most `δ ‖x - y‖` on `P`. Then +`μHE[d] (f₁ '' P) ≤ (1 + δ)^d μHE[d] (f₂ '' P)`. Indeed `f₂` is injective on `P`, so it has a +left inverse `q` on `P` (Mathlib's `Function.invFunOn`), and `f₁ ∘ q` maps `f₂ '' P` onto +`f₁ '' P` and is `(1 + δ)`-Lipschitz there. -/ +theorem euclideanHausdorffMeasure_image_le_of_near {X Y : Type*} [NormedAddCommGroup X] + [MeasurableSpace X] [BorelSpace X] [NormedAddCommGroup Y] [MeasurableSpace Y] [BorelSpace Y] + {f₁ f₂ : X → Y} {P : Set X} {δ : ℝ} (hδ : 0 ≤ δ) + (h₂ : ∀ x ∈ P, ∀ y ∈ P, ‖x - y‖ ≤ ‖f₂ x - f₂ y‖) + (h : ∀ x ∈ P, ∀ y ∈ P, ‖(f₁ x - f₁ y) - (f₂ x - f₂ y)‖ ≤ δ * ‖x - y‖) (d : ℕ) : + μHE[d] (f₁ '' P) ≤ ENNReal.ofReal (1 + δ) ^ d * μHE[d] (f₂ '' P) := by + have hinj : Set.InjOn f₂ P := fun x hx y hy hxy => by + have hle := h₂ x hx y hy + rw [hxy, sub_self, norm_zero] at hle + exact sub_eq_zero.1 (norm_le_zero_iff.1 hle) + obtain ⟨q, hq⟩ : ∃ q : Y → X, ∀ x ∈ P, q (f₂ x) = x := + ⟨Function.invFunOn f₂ P, fun x hx => hinj.leftInvOn_invFunOn hx⟩ + have himg : (f₁ ∘ q) '' (f₂ '' P) = f₁ '' P := by + rw [Set.image_image] + exact Set.image_congr fun x hx => by simp only [Function.comp_apply, hq x hx] + have hlip : LipschitzOnWith (Real.toNNReal (1 + δ)) (f₁ ∘ q) (f₂ '' P) := by + refine LipschitzOnWith.of_dist_le_mul ?_ + rintro _ ⟨x, hx, rfl⟩ _ ⟨y, hy, rfl⟩ + simp only [Function.comp_apply, hq x hx, hq y hy, dist_eq_norm] + rw [Real.coe_toNNReal _ (by linarith)] + calc ‖f₁ x - f₁ y‖ ≤ ‖f₂ x - f₂ y‖ + ‖(f₁ x - f₁ y) - (f₂ x - f₂ y)‖ := + norm_le_norm_add_norm_sub' _ _ + _ ≤ ‖f₂ x - f₂ y‖ + δ * ‖f₂ x - f₂ y‖ := + add_le_add le_rfl ((h x hx y hy).trans (mul_le_mul_of_nonneg_left (h₂ x hx y hy) hδ)) + _ = (1 + δ) * ‖f₂ x - f₂ y‖ := by ring + rw [← himg] + exact hlip.euclideanHausdorffMeasure_image_le d + +/-- **The function `t ↦ √(1 + t²)` is `1`-Lipschitz**: +`|√(1 + a²) - √(1 + b²)| ≤ |a - b|`. -/ +theorem abs_sqrt_one_add_sq_sub_le (a b : ℝ) : |√(1 + a ^ 2) - √(1 + b ^ 2)| ≤ |a - b| := by + have ha : |a| ≤ √(1 + a ^ 2) := Real.abs_le_sqrt (by linarith) + have hb : |b| ≤ √(1 + b ^ 2) := Real.abs_le_sqrt (by linarith) + have hpos : 0 < √(1 + a ^ 2) + √(1 + b ^ 2) := by positivity + have hsq : (√(1 + a ^ 2) - √(1 + b ^ 2)) * (√(1 + a ^ 2) + √(1 + b ^ 2)) = (a - b) * (a + b) := by + have h1 := Real.sq_sqrt (show (0 : ℝ) ≤ 1 + a ^ 2 by positivity) + have h2 := Real.sq_sqrt (show (0 : ℝ) ≤ 1 + b ^ 2 by positivity) + linear_combination h1 - h2 + have key : |√(1 + a ^ 2) - √(1 + b ^ 2)| * (√(1 + a ^ 2) + √(1 + b ^ 2)) ≤ + |a - b| * (√(1 + a ^ 2) + √(1 + b ^ 2)) := by + rw [← abs_of_pos hpos, ← abs_mul, hsq, abs_mul, abs_of_pos hpos] + exact mul_le_mul_of_nonneg_left ((abs_add_le a b).trans (add_le_add ha hb)) (abs_nonneg _) + exact le_of_mul_le_mul_right key hpos + +/-- **Letting a factor tend to one**: if `a ≤ c(ε) b` for every `ε > 0` and `c(ε) → 1` as +`ε → 0+`, then `a ≤ b`. -/ +theorem le_of_forall_pos_le_ofReal_mul_of_tendsto {a b : ℝ≥0∞} {c : ℝ → ℝ} + (hc : Tendsto c (𝓝[>] 0) (𝓝 1)) (h : ∀ ε : ℝ, 0 < ε → a ≤ ENNReal.ofReal (c ε) * b) : + a ≤ b := by + have h1 := ENNReal.tendsto_ofReal hc + rw [ENNReal.ofReal_one] at h1 + have h2 := ENNReal.Tendsto.mul_const (b := b) h1 (Or.inl one_ne_zero) + rw [one_mul] at h2 + exact ge_of_tendsto h2 (eventually_nhdsWithin_of_forall fun ε hε => h ε hε) + +/-- The **area factor** `(1 + 2ε)^m (1 + ε)` of the area formula for the accuracy `ε`, with +`m = n - 1`: comparing a graph with a linear graph costs the factor `(1 + 2ε)^m`, and comparing +the Gram density with a constant costs `1 + ε`. -/ +noncomputable def areaFactor (m : ℕ) (ε : ℝ) : ℝ := (1 + 2 * ε) ^ m * (1 + ε) + +/-- The area factor tends to `1` as `ε → 0+`, by continuity. -/ +theorem tendsto_areaFactor (m : ℕ) : Tendsto (areaFactor m) (𝓝[>] 0) (𝓝 1) := by + have hc : Continuous (areaFactor m) := by + unfold areaFactor + fun_prop + have h0 := hc.tendsto 0 + simp only [areaFactor, mul_zero, add_zero, one_pow, one_mul] at h0 + exact h0.mono_left nhdsWithin_le_nhds + +/-! ### Stretches -/ + +section Stretch + +variable {E : Type*} [NormedAddCommGroup E] [InnerProductSpace ℝ E] + +/-- The **stretch** `D x = x + (c - 1) ⟪u, x⟫ u` by the factor `c` in the direction `u`: for a +unit vector `u` it multiplies `u` by `c` and fixes the vectors orthogonal to `u`. It is Mathlib's +`LinearMap.transvection` of the linear form `(c - 1) ⟪u, ·⟫` and the vector `u`. -/ +noncomputable def stretch (u : E) (c : ℝ) : E →ₗ[ℝ] E := + LinearMap.transvection ((c - 1) • (innerSL ℝ u).toLinearMap) u + +/-- `D x = x + (c - 1) ⟪u, x⟫ u`. -/ +theorem stretch_apply (u : E) (c : ℝ) (x : E) : + stretch u c x = x + ((c - 1) * inner ℝ u x) • u := by + rw [stretch, LinearMap.transvection.apply] + rfl + +/-- **The determinant of a stretch** by `c` along a unit vector is `c` (Mathlib's +`LinearMap.transvection.det`: `det = 1 + (c - 1) ⟪u, u⟫`). -/ +theorem det_stretch [FiniteDimensional ℝ E] {u : E} (hu : ‖u‖ = 1) (c : ℝ) : + LinearMap.det (stretch u c) = c := by + rw [stretch, LinearMap.transvection.det, LinearMap.smul_apply, ContinuousLinearMap.coe_coe, + innerSL_apply_apply, real_inner_self_eq_norm_sq, hu, smul_eq_mul] + ring + +end Stretch + +namespace LipschitzGraph + +variable {V : Type*} [NormedAddCommGroup V] [InnerProductSpace ℝ V] (Ω : LipschitzGraph V) + +/-! ### Graphs over the hyperplane -/ + +/-- The **graph over the hyperplane** of a function `h : H → ℝ`, the map `x' ↦ x' + h(x') e` +from `H` to `V`. The graph map of `Ω` is the graph of `φ`; the graphs of the linear functions +`⟪g, ·⟫` are linear maps. -/ +noncomputable def graphOver (h : Ω.hyperplane → ℝ) (x' : Ω.hyperplane) : V := + (x' : V) + h x' • Ω.e + +/-- `P(x' + h(x') e) = x'`. -/ +theorem proj_graphOver (h : Ω.hyperplane → ℝ) (x' : Ω.hyperplane) : + Ω.proj (Ω.graphOver h x') = x' := by + rw [graphOver, map_add, map_smul, Ω.proj_e, smul_zero, add_zero, Ω.proj_coe] + +/-- Graphs over the hyperplane are injective. -/ +theorem graphOver_injective (h : Ω.hyperplane → ℝ) : Function.Injective (Ω.graphOver h) := + fun x' y' hxy => by rw [← Ω.proj_graphOver h x', hxy, Ω.proj_graphOver] + +/-- **Pythagoras**: `‖x' + a e‖² = ‖x'‖² + a²` for `x' ∈ H`, since `x' ⊥ e`. -/ +theorem norm_coe_add_smul_e_sq (x' : Ω.hyperplane) (a : ℝ) : + ‖(x' : V) + a • Ω.e‖ ^ 2 = ‖x'‖ ^ 2 + a ^ 2 := by + rw [norm_add_sq_real, real_inner_smul_right, Ω.inner_coe_e, mul_zero, mul_zero, add_zero, + norm_smul, Ω.norm_e, mul_one, Real.norm_eq_abs, sq_abs, Submodule.norm_coe] + +/-- `‖x'‖ ≤ ‖x' + a e‖` for `x' ∈ H`, since `x'` is the projection of `x' + a e` onto `H`. -/ +theorem norm_le_norm_coe_add_smul_e (x' : Ω.hyperplane) (a : ℝ) : + ‖x'‖ ≤ ‖(x' : V) + a • Ω.e‖ := + calc ‖x'‖ = ‖Ω.proj (Ω.graphOver (fun _ => a) x')‖ := by rw [Ω.proj_graphOver] + _ ≤ ‖(x' : V) + a • Ω.e‖ := Ω.norm_proj_le _ + +/-- The increments of a graph over the hyperplane: +`γ_h x' - γ_h y' = (x' - y') + (h x' - h y') e`. -/ +theorem graphOver_sub (h : Ω.hyperplane → ℝ) (x' y' : Ω.hyperplane) : + Ω.graphOver h x' - Ω.graphOver h y' = + ((x' - y' : Ω.hyperplane) : V) + (h x' - h y') • Ω.e := by + simp only [graphOver, Submodule.coe_sub, sub_smul] + abel + +/-- **Graphs over the hyperplane are antilipschitz with constant `1`**: +`‖x' - y'‖ ≤ ‖γ_h x' - γ_h y'‖`, since `x' - y'` is the projection of `γ_h x' - γ_h y'` onto +`H`. -/ +theorem norm_sub_le_norm_graphOver_sub (h : Ω.hyperplane → ℝ) (x' y' : Ω.hyperplane) : + ‖x' - y'‖ ≤ ‖Ω.graphOver h x' - Ω.graphOver h y'‖ := + calc ‖x' - y'‖ = ‖Ω.proj (Ω.graphOver h x' - Ω.graphOver h y')‖ := by + rw [map_sub, Ω.proj_graphOver, Ω.proj_graphOver] + _ ≤ _ := Ω.norm_proj_le _ + +/-- The increments of two graphs differ by a multiple of `e`: +`(γ_{h₁} x' - γ_{h₁} y') - (γ_{h₂} x' - γ_{h₂} y') = ((h₁ x' - h₁ y') - (h₂ x' - h₂ y')) e`. -/ +theorem graphOver_sub_sub (h₁ h₂ : Ω.hyperplane → ℝ) (x' y' : Ω.hyperplane) : + (Ω.graphOver h₁ x' - Ω.graphOver h₁ y') - (Ω.graphOver h₂ x' - Ω.graphOver h₂ y') = + ((h₁ x' - h₁ y') - (h₂ x' - h₂ y')) • Ω.e := by + rw [Ω.graphOver_sub, Ω.graphOver_sub] + simp only [sub_smul] + abel + +/-- **Hausdorff measures of two nearby graphs**: if the increments of `h₁` and `h₂` differ by at +most `δ ‖x' - y'‖` on `P`, then `μHE[d] (γ_{h₁} '' P) ≤ (1 + δ)^d μHE[d] (γ_{h₂} '' P)`, since +`γ_{h₂}` is antilipschitz with constant `1`. -/ +theorem euclideanHausdorffMeasure_graphOver_image_le [MeasurableSpace V] [BorelSpace V] + (h₁ h₂ : Ω.hyperplane → ℝ) {P : Set Ω.hyperplane} {δ : ℝ} (hδ : 0 ≤ δ) + (hP : ∀ x' ∈ P, ∀ y' ∈ P, |(h₁ x' - h₁ y') - (h₂ x' - h₂ y')| ≤ δ * ‖x' - y'‖) (d : ℕ) : + μHE[d] (Ω.graphOver h₁ '' P) ≤ ENNReal.ofReal (1 + δ) ^ d * μHE[d] (Ω.graphOver h₂ '' P) := + euclideanHausdorffMeasure_image_le_of_near hδ + (fun x' _ y' _ => Ω.norm_sub_le_norm_graphOver_sub h₂ x' y') + (fun x' hx y' hy => by + rw [Ω.graphOver_sub_sub, norm_smul, Ω.norm_e, mul_one, Real.norm_eq_abs] + exact hP x' hx y' hy) d + +/-- The **linear graph** `S_g x' = x' + ⟪g, x'⟫ e` of `g ∈ H`, the graph of the linear function +`⟪g, ·⟫` over the hyperplane, as a linear map from `H` to `V`: the inclusion of `H` plus the +rank-one map `x' ↦ ⟪g, x'⟫ e`. -/ +noncomputable def linearGraph (g : Ω.hyperplane) : Ω.hyperplane →ₗ[ℝ] V := + Ω.hyperplane.subtype + (innerSL ℝ g).toLinearMap.smulRight Ω.e + +/-- The linear graph of `g` is the graph over the hyperplane of `⟪g, ·⟫`. -/ +theorem coe_linearGraph (g : Ω.hyperplane) : + ⇑(Ω.linearGraph g) = Ω.graphOver fun x' => inner ℝ g x' := + rfl + +/-- **Inner products of a linear graph**: +`⟪S_g x', S_g y'⟫ = ⟪x', y'⟫ + ⟪g, x'⟫ ⟪g, y'⟫`, since `x', y' ⊥ e` and `‖e‖ = 1`. -/ +theorem inner_linearGraph (g x' y' : Ω.hyperplane) : + inner ℝ (Ω.linearGraph g x') (Ω.linearGraph g y') = + inner ℝ x' y' + inner ℝ g x' * inner ℝ g y' := by + rw [coe_linearGraph, graphOver, graphOver] + simp only [inner_add_left, inner_add_right, real_inner_smul_left, real_inner_smul_right, + Ω.inner_coe_e, Ω.inner_e_self, Submodule.coe_inner] + rw [real_inner_comm (y' : V) Ω.e, Ω.inner_coe_e] + ring + +/-! ### The tilt of the hyperplane -/ + +/-- The **tilt** of `H` into `V` along a unit vector `u ∈ H` with slope `b`: +`J x' = x' + ⟪u, x'⟫ (c⁻¹ (u + b e) - u)` with `c = √(1 + b²)`. It maps `u` to the unit vector +`(u + b e)/c` and fixes the vectors of `H` orthogonal to `u`, so it preserves norms. -/ +noncomputable def tilt (u : Ω.hyperplane) (b : ℝ) (x' : Ω.hyperplane) : V := + (x' : V) + inner ℝ u x' • ((√(1 + b ^ 2))⁻¹ • ((u : V) + b • Ω.e) - u) + +/-- The tilt is additive in the sense `J (x' - y') = J x' - J y'`. -/ +theorem tilt_sub (u : Ω.hyperplane) (b : ℝ) (x' y' : Ω.hyperplane) : + Ω.tilt u b (x' - y') = Ω.tilt u b x' - Ω.tilt u b y' := by + simp only [tilt, Submodule.coe_sub, inner_sub_right, sub_smul] + abel + +/-- **The tilt preserves norms**: `‖J x'‖ = ‖x'‖` for a unit vector `u`. With `a = ⟪u, x'⟫` and +`w = c⁻¹ (u + b e) - u`, `⟪x', w⟫ = a (c⁻¹ - 1)` and `‖w‖² = 2 - 2c⁻¹`, so +`‖x' + a w‖² = ‖x'‖²`. -/ +theorem norm_tilt {u : Ω.hyperplane} (hu : ‖u‖ = 1) (b : ℝ) (x' : Ω.hyperplane) : + ‖Ω.tilt u b x'‖ = ‖x'‖ := by + have hc : 0 < √(1 + b ^ 2) := Real.sqrt_pos.2 (by positivity) + have hc2 : √(1 + b ^ 2) ^ 2 = 1 + b ^ 2 := Real.sq_sqrt (by positivity) + have hxu : inner ℝ (x' : V) (u : V) = inner ℝ u x' := by + rw [← Submodule.coe_inner, real_inner_comm] + have hux : inner ℝ (u : V) (x' : V) = inner ℝ u x' := by rw [← Submodule.coe_inner] + have huu : inner ℝ (u : V) (u : V) = 1 := by + rw [real_inner_self_eq_norm_sq, Submodule.norm_coe, hu, one_pow] + have hue : inner ℝ (u : V) Ω.e = 0 := Ω.inner_coe_e u + have heu : inner ℝ Ω.e (u : V) = 0 := by rw [real_inner_comm, hue] + have hxe : inner ℝ (x' : V) Ω.e = 0 := Ω.inner_coe_e x' + have hex : inner ℝ Ω.e (x' : V) = 0 := by rw [real_inner_comm, hxe] + have hee := Ω.inner_e_self + refine (sq_eq_sq₀ (norm_nonneg _) (norm_nonneg _)).1 ?_ + rw [tilt, ← real_inner_self_eq_norm_sq, ← Submodule.norm_coe, ← real_inner_self_eq_norm_sq] + simp only [inner_add_left, inner_add_right, inner_sub_left, inner_sub_right, + real_inner_smul_left, real_inner_smul_right, hxu, hux, huu, hue, heu, hxe, hex, hee] + field_simp + linear_combination (-inner ℝ u x' ^ 2) * hc2 + +/-- The tilt along a unit vector is an isometry of `H` into `V`. -/ +theorem isometry_tilt {u : Ω.hyperplane} (hu : ‖u‖ = 1) (b : ℝ) : Isometry (Ω.tilt u b) := + Isometry.of_dist_eq fun x' y' => by + rw [dist_eq_norm, dist_eq_norm, ← Ω.tilt_sub, Ω.norm_tilt hu] + +/-- **Tilt after stretch**: stretching by `c = √(1 + b²)` along the unit vector `u` and then +tilting gives the graph of the linear function `b ⟪u, ·⟫`: +`J (D x') = x' + b ⟪u, x'⟫ e`. -/ +theorem tilt_stretch {u : Ω.hyperplane} (hu : ‖u‖ = 1) (b : ℝ) (x' : Ω.hyperplane) : + Ω.tilt u b (stretch u √(1 + b ^ 2) x') = Ω.graphOver (fun y' => b * inner ℝ u y') x' := by + have hc : √(1 + b ^ 2) ≠ 0 := (Real.sqrt_pos.2 (by positivity)).ne' + have huu : inner ℝ u u = 1 := by rw [real_inner_self_eq_norm_sq, hu, one_pow] + have hinner : inner ℝ u (stretch u √(1 + b ^ 2) x') = √(1 + b ^ 2) * inner ℝ u x' := by + rw [stretch_apply, inner_add_right, real_inner_smul_right, huu] + ring + rw [tilt, hinner, stretch_apply, graphOver, Submodule.coe_add, Submodule.coe_smul, smul_sub, + smul_smul, show √(1 + b ^ 2) * inner ℝ u x' * (√(1 + b ^ 2))⁻¹ = inner ℝ u x' by + field_simp] + module + +/-- For `g ≠ 0` and `u = g/‖g‖`, the linear graph of `g` is the tilt of slope `‖g‖` after the +stretch by `√(1 + ‖g‖²)` along `u`. -/ +theorem linearGraph_eq_tilt_comp_stretch {g : Ω.hyperplane} (hg : g ≠ 0) : + ⇑(Ω.linearGraph g) = + Ω.tilt (‖g‖⁻¹ • g) ‖g‖ ∘ stretch (‖g‖⁻¹ • g) √(1 + ‖g‖ ^ 2) := by + have hu : ‖‖g‖⁻¹ • g‖ = 1 := by + rw [norm_smul, norm_inv, norm_norm, inv_mul_cancel₀ (norm_ne_zero_iff.2 hg)] + rw [coe_linearGraph] + funext x' + rw [Function.comp_apply, Ω.tilt_stretch hu] + congr 1 + funext y' + rw [real_inner_smul_left, ← mul_assoc, mul_inv_cancel₀ (norm_ne_zero_iff.2 hg), one_mul] + +/-! ### The graph map -/ + +/-- The graph map is the graph of `φ|_H` over the hyperplane. -/ +theorem graphMap_eq_graphOver : Ω.graphMap = Ω.graphOver Ω.phiH := rfl + +/-- The graph map is injective. -/ +theorem graphMap_injective : Function.Injective Ω.graphMap := Ω.graphOver_injective Ω.phiH + +/-- The graph map is Lipschitz with constant `1 + M`. -/ +theorem lipschitzWith_graphMap : + LipschitzWith ⟨1 + Ω.M, by linarith [Ω.M_nonneg]⟩ Ω.graphMap := + LipschitzWith.of_dist_le_mul fun x' y' => by + rw [dist_eq_norm, dist_eq_norm] + exact Ω.norm_graphMap_sub_le x' y' + +/-- The graph map is antilipschitz with constant `1`: `‖x' - y'‖ ≤ ‖γ x' - γ y'‖`. -/ +theorem antilipschitzWith_graphMap : AntilipschitzWith 1 Ω.graphMap := + AntilipschitzWith.of_le_mul_dist fun x' y' => by + rw [dist_eq_norm, dist_eq_norm, NNReal.coe_one, one_mul] + exact Ω.norm_sub_le_norm_graphOver_sub Ω.phiH x' y' + +/-- The graph map does not shrink distances: `|x' - y'| ≤ |γ x' - γ y'|` +(`Rd.LipschitzGraph.antilipschitzWith_graphMap`). -/ +theorem enorm_sub_le_enorm_graphMap_sub (x' y' : Ω.hyperplane) : + ‖x' - y'‖ₑ ≤ ‖Ω.graphMap x' - Ω.graphMap y'‖ₑ := by + simpa [eDist_eq_eNorm_sub] using Ω.antilipschitzWith_graphMap x' y' + +/-- The graph map is Lipschitz: `|γ x' - γ y'| ≤ (1 + M) |x' - y'|` +(`Rd.LipschitzGraph.lipschitzWith_graphMap`). -/ +theorem enorm_graphMap_sub_le (x' y' : Ω.hyperplane) : + ‖Ω.graphMap x' - Ω.graphMap y'‖ₑ ≤ ENNReal.ofReal (1 + Ω.M) * ‖x' - y'‖ₑ := by + have h := Ω.lipschitzWith_graphMap.edist_le_mul x' y' + rw [eDist_eq_eNorm_sub, eDist_eq_eNorm_sub] at h + rw [ENNReal.ofReal_eq_coe_nnreal (by linarith [Ω.M_nonneg])] + exact h + +variable [FiniteDimensional ℝ V] + +/-- The graph map is a measurable embedding: an antilipschitz uniformly continuous map from the +complete space `H` is a closed embedding. -/ +theorem measurableEmbedding_graphMap [MeasurableSpace V] [BorelSpace V] : + MeasurableEmbedding Ω.graphMap := + (Ω.antilipschitzWith_graphMap.isClosedEmbedding + Ω.lipschitzWith_graphMap.uniformContinuous).measurableEmbedding + +/-! ### The norm determinant of a linear graph -/ + +/-- `S_g* S_g x' = x' + ⟪g, x'⟫ g`: the Gram operator of the linear graph is Mathlib's +transvection of `⟪g, ·⟫` and `g`, by `inner_linearGraph`. -/ +theorem adjoint_comp_linearGraph (g : Ω.hyperplane) : + LinearMap.adjoint (Ω.linearGraph g) ∘ₗ Ω.linearGraph g = + LinearMap.transvection (innerSL ℝ g).toLinearMap g := by + refine LinearMap.ext fun x' => ext_inner_right ℝ fun y' => ?_ + rw [LinearMap.comp_apply, LinearMap.adjoint_inner_left, inner_linearGraph, + LinearMap.transvection.apply, inner_add_left, real_inner_smul_left] + rfl + +/-- **The norm determinant of a linear graph** is `√(1 + ‖g‖²)` (Mathlib's +`LinearMap.normDet`, the volume factor `√(det(S_g* S_g))` of a linear map between spaces of +different dimensions): `S_g* S_g` is a transvection of determinant `1 + ⟪g, g⟫` +(Mathlib's `LinearMap.normDet_sq` and `LinearMap.transvection.det`). -/ +theorem normDet_linearGraph (g : Ω.hyperplane) : + (Ω.linearGraph g).normDet = √(1 + ‖g‖ ^ 2) := by + have h := (Ω.linearGraph g).normDet_sq + rw [adjoint_comp_linearGraph, LinearMap.transvection.det, ContinuousLinearMap.coe_coe, + innerSL_apply_apply, real_inner_self_eq_norm_sq] at h + rw [← h] + exact (Real.sqrt_sq (LinearMap.normDet_nonneg _)).symm + +/-! ### The gradient and the Gram density -/ + +/-- The **gradient** `∇φ(x') ∈ H` of `φ|_H` (Mathlib's `gradient`; it is `0` where `φ|_H` is not +differentiable). -/ +noncomputable def gradPhi (x' : Ω.hyperplane) : Ω.hyperplane := gradient Ω.phiH x' + +/-- `⟪∇φ(x'), v⟫` is the derivative of `φ|_H` at `x'` in the direction `v` (Mathlib's +`inner_gradient_left`). -/ +theorem inner_gradPhi (x' v : Ω.hyperplane) : + inner ℝ (Ω.gradPhi x') v = fderiv ℝ Ω.phiH x' v := + inner_gradient_left + +/-- `‖∇φ(x')‖ ≤ M`. -/ +theorem norm_gradPhi_le (x' : Ω.hyperplane) : ‖Ω.gradPhi x'‖ ≤ Ω.M := by + rw [gradPhi, gradient, LinearIsometryEquiv.norm_map] + exact norm_fderiv_le_of_lipschitz ℝ Ω.lipschitzWith_phiH + +/-- The **Gram density** `√(1 + ‖∇φ(x')‖²)` of the graph map. Where `φ|_H` is differentiable, +the derivative of the graph map at `x'` is the linear graph of `∇φ(x')`, and the density is its +norm determinant in Mathlib's sense (`normDet_linearGraph`). -/ +noncomputable def gram (x' : Ω.hyperplane) : ℝ := √(1 + ‖Ω.gradPhi x'‖ ^ 2) + +/-- The Gram density is at least `1`. -/ +theorem one_le_gram (x' : Ω.hyperplane) : 1 ≤ Ω.gram x' := + Real.one_le_sqrt.2 (le_add_of_nonneg_right (sq_nonneg _)) + +/-- The Gram density is positive. -/ +theorem gram_pos (x' : Ω.hyperplane) : 0 < Ω.gram x' := one_pos.trans_le (Ω.one_le_gram x') + +/-- The Gram density `√(1 + ‖∇φ(x')‖²)` is at least `1`, as an element of `[0, ∞]`. -/ +theorem one_le_ofReal_gram (x' : Ω.hyperplane) : 1 ≤ ENNReal.ofReal (Ω.gram x') := + ENNReal.one_le_ofReal.2 (Ω.one_le_gram x') + +/-- The Gram density is at most `√(1 + M²)`. -/ +theorem gram_le (x' : Ω.hyperplane) : Ω.gram x' ≤ √(1 + Ω.M ^ 2) := by + refine Real.sqrt_le_sqrt (add_le_add le_rfl ?_) + exact pow_le_pow_left₀ (norm_nonneg _) (Ω.norm_gradPhi_le x') 2 + +/-- `|√(1 + ‖∇φ(x')‖²) - √(1 + ‖g‖²)| ≤ ‖∇φ(x') - g‖`. -/ +theorem abs_gram_sub_le (x' g : Ω.hyperplane) : + |Ω.gram x' - √(1 + ‖g‖ ^ 2)| ≤ ‖Ω.gradPhi x' - g‖ := + (abs_sqrt_one_add_sq_sub_le _ _).trans (abs_norm_sub_norm_le _ _) + +/-! ### The outward unit normal -/ + +/-- The **outward unit normal** at the boundary point `γ x'`: +`ν(x') = (∇φ(x') - e) / √(1 + ‖∇φ(x')‖²)`. Where `φ|_H` is differentiable, it is the +normalised gradient at `γ x'` of `x ↦ φ(Px) - ⟪x, e⟫`, a function that is negative on `Ω`. -/ +noncomputable def normalAt (x' : Ω.hyperplane) : V := + (Ω.gram x')⁻¹ • ((Ω.gradPhi x' : V) - Ω.e) + +/-- `‖∇φ(x') - e‖ = √(1 + ‖∇φ(x')‖²)`, by Pythagoras. -/ +theorem norm_gradPhi_sub_e (x' : Ω.hyperplane) : ‖(Ω.gradPhi x' : V) - Ω.e‖ = Ω.gram x' := by + have h := Ω.norm_coe_add_smul_e_sq (Ω.gradPhi x') (-1) + rw [neg_one_smul, ← sub_eq_add_neg, neg_one_sq, add_comm] at h + rw [gram, ← h, Real.sqrt_sq (norm_nonneg _)] + +/-- The normal is a unit vector. -/ +theorem norm_normalAt (x' : Ω.hyperplane) : ‖Ω.normalAt x'‖ = 1 := by + rw [normalAt, norm_smul, norm_inv, Real.norm_of_nonneg (Ω.gram_pos x').le, + Ω.norm_gradPhi_sub_e, inv_mul_cancel₀ (Ω.gram_pos x').ne'] + +/-- `⟪ν(x'), e⟫ = -1/√(1 + ‖∇φ(x')‖²) < 0`: the normal points downwards, out of `Ω`. -/ +theorem inner_normalAt_e (x' : Ω.hyperplane) : inner ℝ (Ω.normalAt x') Ω.e = -(Ω.gram x')⁻¹ := by + rw [normalAt, real_inner_smul_left, inner_sub_left, Ω.inner_coe_e, Ω.inner_e_self] + ring + +/-- **The normal points away from the cone**: `⟪ν(x'), y⟫ < 0` for every `y` in the cone `K`, +since `⟪∇φ(x'), y⟫ = ⟪∇φ(x'), Py⟫ ≤ M ‖Py‖ < ⟪y, e⟫`. -/ +theorem inner_normalAt_neg_of_mem_cone (x' : Ω.hyperplane) {y : V} (hy : y ∈ Ω.cone) : + inner ℝ (Ω.normalAt x') y < 0 := by + have hy' : Ω.M * ‖y - inner ℝ y Ω.e • Ω.e‖ < inner ℝ y Ω.e := hy + have hP : inner ℝ (Ω.gradPhi x' : V) y = + inner ℝ (Ω.gradPhi x' : V) (y - inner ℝ y Ω.e • Ω.e) := by + rw [inner_sub_right, real_inner_smul_right, Ω.inner_coe_e, mul_zero, sub_zero] + have hle : inner ℝ (Ω.gradPhi x' : V) y ≤ Ω.M * ‖y - inner ℝ y Ω.e • Ω.e‖ := by + rw [hP] + refine (real_inner_le_norm _ _).trans (mul_le_mul_of_nonneg_right ?_ (norm_nonneg _)) + rw [Submodule.norm_coe] + exact Ω.norm_gradPhi_le x' + have hneg : inner ℝ ((Ω.gradPhi x' : V) - Ω.e) y < 0 := by + rw [inner_sub_left, real_inner_comm y Ω.e] + linarith + rw [normalAt, real_inner_smul_left] + exact mul_neg_of_pos_of_neg (inv_pos.2 (Ω.gram_pos x')) hneg + +/-! ### Good pieces -/ + +/-- A **good piece** for the accuracy `ε` and the gradient value `g`: on `P` the increments of +`φ|_H` are within `2ε ‖x' - y'‖` of those of the linear function `⟪g, ·⟫`, and +`‖∇φ - g‖ ≤ ε`. -/ +def IsGoodPiece (ε : ℝ) (g : Ω.hyperplane) (P : Set Ω.hyperplane) : Prop := + (∀ x' ∈ P, ∀ y' ∈ P, + |(Ω.phiH x' - Ω.phiH y') - (inner ℝ g x' - inner ℝ g y')| ≤ 2 * ε * ‖x' - y'‖) ∧ + ∀ x' ∈ P, ‖Ω.gradPhi x' - g‖ ≤ ε + +variable {Ω} in +/-- Subsets of good pieces are good pieces. -/ +theorem IsGoodPiece.mono {ε : ℝ} {g : Ω.hyperplane} {P Q : Set Ω.hyperplane} + (h : Ω.IsGoodPiece ε g P) (hQ : Q ⊆ P) : Ω.IsGoodPiece ε g Q := + ⟨fun x' hx y' hy => h.1 x' (hQ hx) y' (hQ hy), fun x' hx => h.2 x' (hQ hx)⟩ + +variable {Ω} in +/-- On a good piece, `√(1 + ‖g‖²) ≤ (1 + ε) √(1 + ‖∇φ(x')‖²)`, since the Gram density is at +least `1` and within `ε` of `√(1 + ‖g‖²)`. -/ +theorem IsGoodPiece.sqrt_le_mul_gram {ε : ℝ} (hε : 0 ≤ ε) {g : Ω.hyperplane} + {P : Set Ω.hyperplane} (h : Ω.IsGoodPiece ε g P) {x' : Ω.hyperplane} (hx : x' ∈ P) : + √(1 + ‖g‖ ^ 2) ≤ (1 + ε) * Ω.gram x' := by + have h1 := (abs_sub_comm _ _).trans_le ((Ω.abs_gram_sub_le x' g).trans (h.2 x' hx)) + have h2 := Ω.one_le_gram x' + have h3 := (abs_le.1 h1).2 + nlinarith + +variable {Ω} in +/-- On a good piece, `√(1 + ‖∇φ(x')‖²) ≤ (1 + ε) √(1 + ‖g‖²)`. -/ +theorem IsGoodPiece.gram_le_mul_sqrt {ε : ℝ} (hε : 0 ≤ ε) {g : Ω.hyperplane} + {P : Set Ω.hyperplane} (h : Ω.IsGoodPiece ε g P) {x' : Ω.hyperplane} (hx : x' ∈ P) : + Ω.gram x' ≤ (1 + ε) * √(1 + ‖g‖ ^ 2) := by + have h1 := (Ω.abs_gram_sub_le x' g).trans (h.2 x' hx) + have h2 : 1 ≤ √(1 + ‖g‖ ^ 2) := Real.one_le_sqrt.2 (le_add_of_nonneg_right (sq_nonneg _)) + have h3 := (abs_le.1 h1).2 + nlinarith + +open TopologicalSpace in +/-- The **good sets**, for `ε > 0` and `i, k ∈ ℕ`: the points `x'` where `φ|_H` is +differentiable, `‖∇φ(x') - u_i‖ < ε`, and the first-order Taylor remainder at `x'` is at most +`ε ‖y' - x'‖` for every member `y' = u_l` of the dense sequence `(u_l)_l` of `H` +(Mathlib's `TopologicalSpace.denseSeq`) with `‖y' - x'‖ < 1/(k+1)`. -/ +def goodSet (ε : ℝ) (i k : ℕ) : Set Ω.hyperplane := + {x' | DifferentiableAt ℝ Ω.phiH x' ∧ ‖Ω.gradPhi x' - denseSeq Ω.hyperplane i‖ < ε ∧ + ∀ l, ‖denseSeq Ω.hyperplane l - x'‖ < 1 / (k + 1) → + |Ω.phiH (denseSeq Ω.hyperplane l) - Ω.phiH x' - + inner ℝ (Ω.gradPhi x') (denseSeq Ω.hyperplane l - x')| ≤ + ε * ‖denseSeq Ω.hyperplane l - x'‖} + +open TopologicalSpace in +/-- **The Taylor bound on a good set holds near `x'`**: for `x'` in a good set, +`|φ(y') - φ(x') - ⟪∇φ(x'), y' - x'⟫| ≤ ε ‖y' - x'‖` for every `y'` with `‖y' - x'‖ < 1/(k+1)`, +since the inequality is closed in `y'` and holds on the dense sequence. -/ +theorem abs_taylor_le_of_mem_goodSet {ε : ℝ} {i k : ℕ} {x' : Ω.hyperplane} + (hx : x' ∈ Ω.goodSet ε i k) (y' : Ω.hyperplane) (hy : ‖y' - x'‖ < 1 / (k + 1)) : + |Ω.phiH y' - Ω.phiH x' - inner ℝ (Ω.gradPhi x') (y' - x')| ≤ ε * ‖y' - x'‖ := by + refine (denseRange_denseSeq Ω.hyperplane).induction_on + (p := fun y' => ‖y' - x'‖ < 1 / (k + 1) → + |Ω.phiH y' - Ω.phiH x' - inner ℝ (Ω.gradPhi x') (y' - x')| ≤ ε * ‖y' - x'‖) y' ?_ + hx.2.2 hy + exact isClosed_imp (isOpen_lt (continuous_id.sub continuous_const).norm continuous_const) + (isClosed_le (((Ω.continuous_phiH.sub continuous_const).sub + (continuous_const.inner (continuous_id.sub continuous_const))).abs) + (continuous_const.mul (continuous_id.sub continuous_const).norm)) + +open TopologicalSpace in +/-- **Good sets cut into small balls are good pieces**: on `goodSet ε i k ∩ B(c, 1/(2(k+1)))` +the increments of `φ|_H` are within `2ε ‖x' - y'‖` of those of `⟪u_i, ·⟫`: the Taylor bound at +`y'` and `‖∇φ(y') - u_i‖ < ε`. -/ +theorem isGoodPiece_goodSet_inter_ball (ε : ℝ) (i k : ℕ) (c : Ω.hyperplane) : + Ω.IsGoodPiece ε (denseSeq Ω.hyperplane i) + (Ω.goodSet ε i k ∩ ball c (1 / (2 * (k + 1)))) := by + refine ⟨fun x' hx y' hy => ?_, fun x' hx => hx.1.2.1.le⟩ + have hxy : ‖x' - y'‖ < 1 / (k + 1) := by + rw [← dist_eq_norm] + calc dist x' y' ≤ dist x' c + dist y' c := dist_triangle_right _ _ _ + _ < 1 / (2 * (k + 1)) + 1 / (2 * (k + 1)) := add_lt_add hx.2 hy.2 + _ = 1 / (k + 1) := by field_simp; ring + have ht := Ω.abs_taylor_le_of_mem_goodSet hy.1 x' hxy + have hin : |inner ℝ (Ω.gradPhi y' - denseSeq Ω.hyperplane i) (x' - y')| ≤ ε * ‖x' - y'‖ := + (abs_real_inner_le_norm _ _).trans + (mul_le_mul_of_nonneg_right hy.1.2.1.le (norm_nonneg _)) + have heq : (Ω.phiH x' - Ω.phiH y') - + (inner ℝ (denseSeq Ω.hyperplane i) x' - inner ℝ (denseSeq Ω.hyperplane i) y') = + (Ω.phiH x' - Ω.phiH y' - inner ℝ (Ω.gradPhi y') (x' - y')) + + inner ℝ (Ω.gradPhi y' - denseSeq Ω.hyperplane i) (x' - y') := by + simp only [inner_sub_left, inner_sub_right] + ring + rw [heq] + calc _ ≤ _ := abs_add_le _ _ + _ ≤ ε * ‖x' - y'‖ + ε * ‖x' - y'‖ := add_le_add ht hin + _ = 2 * ε * ‖x' - y'‖ := by ring + +open TopologicalSpace in +/-- **The good sets cover the differentiability points**: if `φ|_H` is differentiable at `x'`, +then `x' ∈ goodSet ε i k ∩ B(u_j, 1/(2(k+1)))` for some `i`, `k`, `j`: `k` from the definition +of the derivative, `i` and `j` by density. -/ +theorem exists_mem_goodSet_inter_ball {ε : ℝ} (hε : 0 < ε) {x' : Ω.hyperplane} + (hx : DifferentiableAt ℝ Ω.phiH x') : + ∃ i k j, x' ∈ Ω.goodSet ε i k ∩ ball (denseSeq Ω.hyperplane j) (1 / (2 * (k + 1))) := by + obtain ⟨δ, hδ, hball⟩ := Metric.eventually_nhds_iff.1 (hx.hasFDerivAt.isLittleO.def hε) + obtain ⟨k, hk⟩ := exists_nat_one_div_lt hδ + obtain ⟨i, hi⟩ := (denseRange_denseSeq Ω.hyperplane).exists_dist_lt (Ω.gradPhi x') hε + obtain ⟨j, hj⟩ := (denseRange_denseSeq Ω.hyperplane).exists_dist_lt x' + (by positivity : (0 : ℝ) < 1 / (2 * (k + 1))) + refine ⟨i, k, j, ⟨hx, by rwa [← dist_eq_norm], fun l hl => ?_⟩, ?_⟩ + · have h := hball (y := denseSeq Ω.hyperplane l) (by rw [dist_eq_norm]; exact hl.trans hk) + rwa [Real.norm_eq_abs, ← Ω.inner_gradPhi] at h + · rw [mem_ball] + exact hj + +variable [MeasurableSpace V] [BorelSpace V] + +/-- The gradient is measurable (Mathlib's `measurable_fderiv`). -/ +theorem measurable_gradPhi : Measurable Ω.gradPhi := + (InnerProductSpace.toDual ℝ Ω.hyperplane).symm.continuous.measurable.comp + (measurable_fderiv ℝ Ω.phiH) + +/-- The Gram density is measurable. -/ +theorem measurable_gram : Measurable Ω.gram := + ((Ω.measurable_gradPhi.norm.pow_const 2).const_add 1).sqrt + +/-- The outward unit normal is measurable. -/ +theorem measurable_normalAt : Measurable Ω.normalAt := + (Ω.measurable_gram.inv).smul + ((continuous_subtype_val.measurable.comp Ω.measurable_gradPhi).sub measurable_const) + +/-- **Rademacher's theorem** for `φ|_H`: it is differentiable almost everywhere on `H`. -/ +theorem ae_differentiableAt_phiH : + ∀ᵐ x' ∂(volume : Measure Ω.hyperplane), DifferentiableAt ℝ Ω.phiH x' := + Ω.lipschitzWith_phiH.ae_differentiableAt + +/-! ### The linear case -/ + +/-- **The area formula for linear graphs**: for the linear graph `S_g x' = x' + ⟪g, x'⟫ e` and +every `P ⊆ H`, `μHE[m] (S_g '' P) = √(1 + ‖g‖²) vol(P)`, `m = dim H`: Mathlib's area formula +for linear maps (`LinearMap.euclideanHausdorffMeasure_image_eq_normDet_mul_volume`) with the +norm determinant `√(1 + ‖g‖²)` (`normDet_linearGraph`). -/ +theorem euclideanHausdorffMeasure_linearGraph_image (g : Ω.hyperplane) (P : Set Ω.hyperplane) : + μHE[finrank ℝ Ω.hyperplane] (Ω.linearGraph g '' P) = + ENNReal.ofReal √(1 + ‖g‖ ^ 2) * volume P := by + rw [LinearMap.euclideanHausdorffMeasure_image_eq_normDet_mul_volume, normDet_linearGraph] + +/-! ### The graph map on null sets and on good pieces -/ + +/-- **The graph map keeps null sets**: `μHE[m] (γ '' N) = 0` for every null set `N ⊆ H`, since +`γ` is Lipschitz and `μHE[m]` is the volume on `H`. -/ +theorem euclideanHausdorffMeasure_graphMap_image_eq_zero {N : Set Ω.hyperplane} + (hN : volume N = 0) : μHE[finrank ℝ Ω.hyperplane] (Ω.graphMap '' N) = 0 := by + have h := Ω.lipschitzWith_graphMap.lipschitzOnWith.euclideanHausdorffMeasure_image_le + (s := N) (finrank ℝ Ω.hyperplane) + rw [InnerProductSpace.euclideanHausdorffMeasure_eq_volume (V := Ω.hyperplane), hN, + mul_zero] at h + exact le_antisymm h zero_le + +variable {Ω} in +/-- **Upper bound on a good piece**: +`μHE[m] (γ '' P) ≤ C_ε ∫_P √(1 + ‖∇φ‖²)` with the area factor `C_ε = (1 + 2ε)^m (1 + ε)`, from +the comparison with the linear graph of `g` (`euclideanHausdorffMeasure_graphOver_image_le` with +`δ = 2ε`) and its area. -/ +theorem IsGoodPiece.euclideanHausdorffMeasure_image_le {ε : ℝ} (hε : 0 ≤ ε) + {g : Ω.hyperplane} {P : Set Ω.hyperplane} (h : Ω.IsGoodPiece ε g P) : + μHE[finrank ℝ Ω.hyperplane] (Ω.graphMap '' P) ≤ + ENNReal.ofReal (areaFactor (finrank ℝ Ω.hyperplane) ε) * + ∫⁻ x' in P, ENNReal.ofReal (Ω.gram x') := by + have h1 : μHE[finrank ℝ Ω.hyperplane] (Ω.graphMap '' P) ≤ + ENNReal.ofReal (1 + 2 * ε) ^ finrank ℝ Ω.hyperplane * + μHE[finrank ℝ Ω.hyperplane] (Ω.linearGraph g '' P) := + Ω.euclideanHausdorffMeasure_graphOver_image_le Ω.phiH (fun x' => inner ℝ g x') + (by positivity) h.1 _ + have h2 : ENNReal.ofReal √(1 + ‖g‖ ^ 2) * volume P ≤ + ENNReal.ofReal (1 + ε) * ∫⁻ x' in P, ENNReal.ofReal (Ω.gram x') := by + rw [← setLIntegral_const, ← lintegral_const_mul _ Ω.measurable_gram.ennreal_ofReal] + refine setLIntegral_mono (measurable_const.mul Ω.measurable_gram.ennreal_ofReal) + fun x' hx => ?_ + rw [← ENNReal.ofReal_mul (by linarith)] + exact ENNReal.ofReal_le_ofReal (h.sqrt_le_mul_gram hε hx) + rw [Ω.euclideanHausdorffMeasure_linearGraph_image] at h1 + calc _ ≤ _ := h1 + _ ≤ ENNReal.ofReal (1 + 2 * ε) ^ finrank ℝ Ω.hyperplane * + (ENNReal.ofReal (1 + ε) * ∫⁻ x' in P, ENNReal.ofReal (Ω.gram x')) := + mul_le_mul' le_rfl h2 + _ = _ := by + rw [areaFactor, ENNReal.ofReal_mul (by positivity), ENNReal.ofReal_pow (by linarith), + mul_assoc] + +variable {Ω} in +/-- **Lower bound on a good piece**: +`∫_P √(1 + ‖∇φ‖²) ≤ C_ε μHE[m] (γ '' P)` with the area factor `C_ε = (1 + 2ε)^m (1 + ε)`. -/ +theorem IsGoodPiece.lintegral_gram_le {ε : ℝ} (hε : 0 ≤ ε) {g : Ω.hyperplane} + {P : Set Ω.hyperplane} (h : Ω.IsGoodPiece ε g P) : + ∫⁻ x' in P, ENNReal.ofReal (Ω.gram x') ≤ + ENNReal.ofReal (areaFactor (finrank ℝ Ω.hyperplane) ε) * + μHE[finrank ℝ Ω.hyperplane] (Ω.graphMap '' P) := by + have h1 : μHE[finrank ℝ Ω.hyperplane] (Ω.linearGraph g '' P) ≤ + ENNReal.ofReal (1 + 2 * ε) ^ finrank ℝ Ω.hyperplane * + μHE[finrank ℝ Ω.hyperplane] (Ω.graphMap '' P) := + Ω.euclideanHausdorffMeasure_graphOver_image_le (fun x' => inner ℝ g x') Ω.phiH + (by positivity) + (fun x' hx y' hy => by rw [abs_sub_comm]; exact h.1 x' hx y' hy) _ + have h2 : ∫⁻ x' in P, ENNReal.ofReal (Ω.gram x') ≤ + ENNReal.ofReal (1 + ε) * (ENNReal.ofReal √(1 + ‖g‖ ^ 2) * volume P) := by + rw [← mul_assoc, ← ENNReal.ofReal_mul (by linarith), ← setLIntegral_const] + exact setLIntegral_mono measurable_const fun x' hx => + ENNReal.ofReal_le_ofReal (h.gram_le_mul_sqrt hε hx) + rw [← Ω.euclideanHausdorffMeasure_linearGraph_image] at h2 + calc _ ≤ _ := h2 + _ ≤ ENNReal.ofReal (1 + ε) * (ENNReal.ofReal (1 + 2 * ε) ^ finrank ℝ Ω.hyperplane * + μHE[finrank ℝ Ω.hyperplane] (Ω.graphMap '' P)) := mul_le_mul' le_rfl h1 + _ = _ := by + rw [areaFactor, ENNReal.ofReal_mul (by positivity), ENNReal.ofReal_pow (by linarith)] + ring + +/-! ### A countable partition into good pieces -/ + +open TopologicalSpace in +/-- The good sets are measurable: the differentiability set is measurable (Mathlib's +`measurableSet_of_differentiableAt`), the gradient is measurable, and the Taylor condition +quantifies over the countable dense sequence only. -/ +theorem measurableSet_goodSet (ε : ℝ) (i k : ℕ) : MeasurableSet (Ω.goodSet ε i k) := by + have hset : Ω.goodSet ε i k = {x' | DifferentiableAt ℝ Ω.phiH x'} ∩ + ({x' | ‖Ω.gradPhi x' - denseSeq Ω.hyperplane i‖ < ε} ∩ + ⋂ l, {x' | ‖denseSeq Ω.hyperplane l - x'‖ < 1 / (k + 1) → + |Ω.phiH (denseSeq Ω.hyperplane l) - Ω.phiH x' - + inner ℝ (Ω.gradPhi x') (denseSeq Ω.hyperplane l - x')| ≤ + ε * ‖denseSeq Ω.hyperplane l - x'‖}) := by + ext x' + simp only [goodSet, Set.mem_ofPred_eq, Set.mem_inter_iff, Set.mem_iInter] + rw [hset] + refine (measurableSet_of_differentiableAt ℝ Ω.phiH).inter + ((measurableSet_lt (Ω.measurable_gradPhi.sub_const _).norm measurable_const).inter + (MeasurableSet.iInter fun l => MeasurableSet.imp + (measurableSet_lt (measurable_const.sub measurable_id).norm measurable_const) + (measurableSet_le ?_ (measurable_const.mul (measurable_const.sub measurable_id).norm)))) + exact continuous_abs.measurable.comp ((measurable_const.sub Ω.continuous_phiH.measurable).sub + (Measurable.inner Ω.measurable_gradPhi (measurable_const.sub measurable_id))) + +open TopologicalSpace in +/-- **A countable partition into good pieces**: for `ε > 0` there are disjoint measurable sets +`Q_n ⊆ H` covering `H` up to a null set, and gradient values `g_n`, such that each `Q_n` is a +good piece for `ε` and `g_n`. The sets `goodSet ε i k ∩ B(u_j, 1/(2(k+1)))` cover the +differentiability points of `φ|_H`, whose complement is null by Rademacher's theorem; Mathlib's +`disjointed` makes them disjoint. -/ +theorem exists_goodPartition {ε : ℝ} (hε : 0 < ε) : + ∃ (Q : ℕ → Set Ω.hyperplane) (g : ℕ → Ω.hyperplane), (∀ n, MeasurableSet (Q n)) ∧ + Pairwise (Disjoint on Q) ∧ volume (⋃ n, Q n)ᶜ = 0 ∧ ∀ n, Ω.IsGoodPiece ε (g n) (Q n) := by + let e := (Denumerable.eqv (ℕ × ℕ × ℕ)).symm + let f : ℕ → Set Ω.hyperplane := fun n => Ω.goodSet ε (e n).1 (e n).2.1 ∩ + ball (denseSeq Ω.hyperplane (e n).2.2) (1 / (2 * ((e n).2.1 + 1))) + refine ⟨disjointed f, fun n => denseSeq Ω.hyperplane (e n).1, + MeasurableSet.disjointed fun n => (Ω.measurableSet_goodSet _ _ _).inter measurableSet_ball, + disjoint_disjointed f, ?_, + fun n => (Ω.isGoodPiece_goodSet_inter_ball _ _ _ _).mono (disjointed_le f n)⟩ + rw [iUnion_disjointed] + refine measure_mono_null ?_ (ae_iff.1 Ω.ae_differentiableAt_phiH) + intro x' hx hd + obtain ⟨i, k, j, hmem⟩ := Ω.exists_mem_goodSet_inter_ball hε hd + refine hx (Set.mem_iUnion.2 ⟨e.symm (i, k, j), ?_⟩) + simpa only [f, Equiv.apply_symm_apply] using hmem + +/-! ### The area formula -/ + +/-- **Upper bound for a fixed accuracy**: for `ε > 0` and measurable `A ⊆ H`, +`μHE[m] (γ '' A) ≤ C_ε ∫_A √(1 + ‖∇φ‖²)` with the area factor `C_ε = (1 + 2ε)^m (1 + ε)`: sum +the bounds on the good pieces +`A ∩ Q_n`; the rest of `A` is null and so is its image. -/ +theorem euclideanHausdorffMeasure_graphMap_image_le_mul {ε : ℝ} (hε : 0 < ε) + {A : Set Ω.hyperplane} (hA : MeasurableSet A) : + μHE[finrank ℝ Ω.hyperplane] (Ω.graphMap '' A) ≤ + ENNReal.ofReal (areaFactor (finrank ℝ Ω.hyperplane) ε) * + ∫⁻ x' in A, ENNReal.ofReal (Ω.gram x') := by + obtain ⟨Q, g, hQm, hQd, hQnull, hQg⟩ := Ω.exists_goodPartition hε + have hsplit : Ω.graphMap '' A ⊆ + (⋃ n, Ω.graphMap '' (A ∩ Q n)) ∪ Ω.graphMap '' (A \ ⋃ n, Q n) := by + rintro _ ⟨x', hx, rfl⟩ + by_cases h : x' ∈ ⋃ n, Q n + · obtain ⟨n, hn⟩ := Set.mem_iUnion.1 h + exact Or.inl (Set.mem_iUnion.2 ⟨n, x', ⟨hx, hn⟩, rfl⟩) + · exact Or.inr ⟨x', ⟨hx, h⟩, rfl⟩ + have hnull : μHE[finrank ℝ Ω.hyperplane] (Ω.graphMap '' (A \ ⋃ n, Q n)) = 0 := + Ω.euclideanHausdorffMeasure_graphMap_image_eq_zero + (measure_mono_null (fun x' hx => hx.2) hQnull) + have hdisj : Pairwise (Disjoint on fun n => A ∩ Q n) := fun i j hij => + (hQd hij).mono Set.inter_subset_right Set.inter_subset_right + calc μHE[finrank ℝ Ω.hyperplane] (Ω.graphMap '' A) + ≤ μHE[finrank ℝ Ω.hyperplane] (⋃ n, Ω.graphMap '' (A ∩ Q n)) := by + refine (measure_mono hsplit).trans ((measure_union_le _ _).trans ?_) + rw [hnull, add_zero] + _ ≤ ∑' n, μHE[finrank ℝ Ω.hyperplane] (Ω.graphMap '' (A ∩ Q n)) := measure_iUnion_le _ + _ ≤ ∑' n, ENNReal.ofReal (areaFactor (finrank ℝ Ω.hyperplane) ε) * + ∫⁻ x' in A ∩ Q n, ENNReal.ofReal (Ω.gram x') := tsum_le_tsum fun n => + ((hQg n).mono Set.inter_subset_right).euclideanHausdorffMeasure_image_le hε.le + _ = ENNReal.ofReal (areaFactor (finrank ℝ Ω.hyperplane) ε) * + ∫⁻ x' in ⋃ n, A ∩ Q n, ENNReal.ofReal (Ω.gram x') := by + rw [ENNReal.tsum_mul_left, lintegral_iUnion (fun n => hA.inter (hQm n)) hdisj] + _ ≤ _ := mul_le_mul' le_rfl (lintegral_mono_set (Set.iUnion_subset fun n => + Set.inter_subset_left)) + +/-- **Lower bound for a fixed accuracy**: for `ε > 0` and measurable `A ⊆ H`, +`∫_A √(1 + ‖∇φ‖²) ≤ C_ε μHE[m] (γ '' A)` with the area factor `C_ε = (1 + 2ε)^m (1 + ε)`: the +integral over the null rest of `A` vanishes, and the images `γ '' (A ∩ Q_n)` are disjoint and +measurable, since `γ` is an injective measurable embedding. -/ +theorem lintegral_gram_le_mul {ε : ℝ} (hε : 0 < ε) {A : Set Ω.hyperplane} + (hA : MeasurableSet A) : + ∫⁻ x' in A, ENNReal.ofReal (Ω.gram x') ≤ + ENNReal.ofReal (areaFactor (finrank ℝ Ω.hyperplane) ε) * + μHE[finrank ℝ Ω.hyperplane] (Ω.graphMap '' A) := by + obtain ⟨Q, g, hQm, hQd, hQnull, hQg⟩ := Ω.exists_goodPartition hε + have hdisj : Pairwise (Disjoint on fun n => A ∩ Q n) := fun i j hij => + (hQd hij).mono Set.inter_subset_right Set.inter_subset_right + have hA' : ∫⁻ x' in A, ENNReal.ofReal (Ω.gram x') = + ∫⁻ x' in ⋃ n, A ∩ Q n, ENNReal.ofReal (Ω.gram x') := by + have hzero : ∫⁻ x' in A \ ⋃ n, Q n, ENNReal.ofReal (Ω.gram x') = 0 := + setLIntegral_measure_zero _ _ (measure_mono_null (fun x' hx => hx.2) hQnull) + rw [← lintegral_inter_add_sdiff _ A (MeasurableSet.iUnion hQm), hzero, add_zero, + Set.inter_iUnion] + have himg : Pairwise (Disjoint on fun n => Ω.graphMap '' (A ∩ Q n)) := fun i j hij => + (Set.disjoint_image_iff Ω.graphMap_injective).2 (hdisj hij) + calc ∫⁻ x' in A, ENNReal.ofReal (Ω.gram x') + = ∑' n, ∫⁻ x' in A ∩ Q n, ENNReal.ofReal (Ω.gram x') := by + rw [hA', lintegral_iUnion (fun n => hA.inter (hQm n)) hdisj] + _ ≤ ∑' n, ENNReal.ofReal (areaFactor (finrank ℝ Ω.hyperplane) ε) * + μHE[finrank ℝ Ω.hyperplane] (Ω.graphMap '' (A ∩ Q n)) := tsum_le_tsum fun n => + ((hQg n).mono Set.inter_subset_right).lintegral_gram_le hε.le + _ = ENNReal.ofReal (areaFactor (finrank ℝ Ω.hyperplane) ε) * + μHE[finrank ℝ Ω.hyperplane] (⋃ n, Ω.graphMap '' (A ∩ Q n)) := by + rw [ENNReal.tsum_mul_left, measure_iUnion himg fun n => + Ω.measurableEmbedding_graphMap.measurableSet_image.2 (hA.inter (hQm n))] + _ ≤ _ := mul_le_mul' le_rfl (measure_mono (Set.iUnion_subset fun n => + Set.image_mono Set.inter_subset_left)) + +/-- **The area formula for Lipschitz graphs**: for every measurable `A ⊆ H`, +`μHE[n-1] (γ '' A) = ∫_A √(1 + ‖∇φ(x')‖²) dx'`, where `n = dim V`, `μHE[n-1]` is Mathlib's +`(n-1)`-dimensional Euclidean Hausdorff measure on `V`, normalised to be the volume on +hyperplanes, and `γ x' = x' + φ(x') e` is the graph map. The two bounds for a fixed `ε > 0` +(`euclideanHausdorffMeasure_graphMap_image_le_mul`, `lintegral_gram_le_mul`) carry the area +factor `(1 + 2ε)^(n-1) (1 + ε)` (`Rd.areaFactor`), which tends to `1` as `ε → 0` +(`Rd.tendsto_areaFactor`, `Rd.le_of_forall_pos_le_ofReal_mul_of_tendsto`). -/ +theorem euclideanHausdorffMeasure_graphMap_image {A : Set Ω.hyperplane} (hA : MeasurableSet A) : + μHE[finrank ℝ V - 1] (Ω.graphMap '' A) = ∫⁻ x' in A, ENNReal.ofReal (Ω.gram x') := by + rw [← Ω.finrank_hyperplane_eq_sub_one] + exact le_antisymm + (le_of_forall_pos_le_ofReal_mul_of_tendsto (tendsto_areaFactor _) fun _ hε => + Ω.euclideanHausdorffMeasure_graphMap_image_le_mul hε hA) + (le_of_forall_pos_le_ofReal_mul_of_tendsto (tendsto_areaFactor _) fun _ hε => + Ω.lintegral_gram_le_mul hε hA) + +/-- **The area formula in measure form**: the image under the graph map of the measure on `H` +with density `√(1 + ‖∇φ‖²)` is `μHE[n-1]` restricted to the graph `γ(H)`. -/ +theorem map_graphMap_withDensity : + Measure.map Ω.graphMap + ((volume : Measure Ω.hyperplane).withDensity fun x' => ENNReal.ofReal (Ω.gram x')) = + (μHE[finrank ℝ V - 1] : Measure V).restrict (Set.range Ω.graphMap) := by + ext B hB + have hpre := Ω.measurableEmbedding_graphMap.measurable hB + rw [Measure.map_apply Ω.measurableEmbedding_graphMap.measurable hB, withDensity_apply _ hpre, + Measure.restrict_apply hB, ← Set.image_preimage_eq_inter_range, + Ω.euclideanHausdorffMeasure_graphMap_image hpre] + +/-- **The area formula in integral form**: for every `F : V → [0, ∞]`, +`∫_{γ(H)} F dμHE[n-1] = ∫_H F(γ x') √(1 + ‖∇φ(x')‖²) dx'`. The formula holds for every `F`, +measurable or not, since `γ` is a measurable embedding and the density is finite. -/ +theorem lintegral_graphMap (F : V → ℝ≥0∞) : + ∫⁻ y in Set.range Ω.graphMap, F y ∂(μHE[finrank ℝ V - 1] : Measure V) = + ∫⁻ x', F (Ω.graphMap x') * ENNReal.ofReal (Ω.gram x') := by + rw [← Ω.map_graphMap_withDensity, Ω.measurableEmbedding_graphMap.lintegral_map, + lintegral_withDensity_eq_lintegral_mul_non_measurable _ Ω.measurable_gram.ennreal_ofReal + (ae_of_all _ fun _ => ENNReal.ofReal_lt_top)] + simp only [Pi.mul_apply, mul_comm] + +/-- **The area formula for complex integrals**: for every `F : V → ℂ`, +`∫_{γ(H)} F dμHE[n-1] = ∫_H F(γ x') √(1 + ‖∇φ(x')‖²) dx'`. It holds for every `F`, since `γ` is a +measurable embedding and the density is finite (`Rd.LipschitzGraph.map_graphMap_withDensity`). -/ +theorem integral_graphMap (F : V → ℂ) : + ∫ y in Set.range Ω.graphMap, F y ∂(μHE[finrank ℝ V - 1] : Measure V) = + ∫ x', F (Ω.graphMap x') * (Ω.gram x' : ℂ) := by + rw [← Ω.map_graphMap_withDensity, Ω.measurableEmbedding_graphMap.integral_map, + integral_withDensity_eq_integral_toReal_smul Ω.measurable_gram.ennreal_ofReal + (ae_of_all _ fun _ => ENNReal.ofReal_lt_top)] + refine integral_congr_ae (ae_of_all _ fun x' => ?_) + simp only [ENNReal.toReal_ofReal (Ω.gram_pos x').le, Complex.real_smul, mul_comm] + +end LipschitzGraph + +end Rd diff --git a/LeanPool/FunctionSpaces/Domains/Lipschitz/LocalLipschitzGraphs.lean b/LeanPool/FunctionSpaces/Domains/Lipschitz/LocalLipschitzGraphs.lean new file mode 100644 index 0000000000..c532eabf89 --- /dev/null +++ b/LeanPool/FunctionSpaces/Domains/Lipschitz/LocalLipschitzGraphs.lean @@ -0,0 +1,547 @@ +/- +Copyright (c) 2026 Mario Ullrich. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Mario Ullrich +-/ +module + +public import LeanPool.FunctionSpaces.Domains.Lipschitz.BoundedLipschitz +public import LeanPool.FunctionSpaces.Domains.Lipschitz.GraphParametrization + +/- +Modified for Lean Pool: module names and imports adapted. +-/ + +/-! +# Bounded Lipschitz domains from local Lipschitz graphs + +The usual definition of a bounded Lipschitz domain is a condition on a set. A set `Ω ⊆ V` is +**Lipschitz near `z`** (`Rd.IsLipschitzDomainAt`) if there are `r > 0`, a unit vector `ν` and a +Lipschitz function `φ` on the hyperplane `ν^⊥` with +`Ω ∩ B(z, r) = {x : φ(P(x - z)) < ⟪ν, x - z⟫} ∩ B(z, r)`, `P` the orthogonal projection onto +`ν^⊥`; `Ω` is a **bounded Lipschitz set** (`Rd.IsBoundedLipschitzDomain`) if it is open, bounded +and Lipschitz near each point of its frontier. + +* A local graph is a Lipschitz graph domain (`Rd.LipschitzGraph.ofLocal`, + `Rd.LipschitzGraph.domain_ofLocal`), and every Lipschitz graph domain is a local graph around + every point (`Rd.LipschitzGraph.domain_eq_localPhi`), so being Lipschitz near `z` means agreeing + with a Lipschitz graph domain on a ball around `z` (`Rd.isLipschitzDomainAt_iff`); this depends + only on the set near `z` (`Rd.IsLipschitzDomainAt.congr_ball`). Both constructions keep the + graph functions `C^n` (`Rd.LipschitzGraph.contDiff_phi_ofLocal`, + `Rd.LipschitzGraph.contDiff_localPhi`). A function + that is Lipschitz only on the ball of radius `r` of `ν^⊥` suffices, by McShane's extension + (`Rd.isLipschitzDomainAt_of_lipschitzOnWith`). +* In finite dimension, compactness of the frontier gives finitely many balls out of any family + of charts at the frontier points, and these charts form a `Rd.BoundedLipschitzDomain` with + carrier `Ω` (`Rd.BoundedLipschitzDomain.ofCharts`, whose graph domains belong to the family); + for the chosen charts of a bounded Lipschitz set this is + `Rd.BoundedLipschitzDomain.ofIsBoundedLipschitzDomain`. Conversely the carrier of every + `Rd.BoundedLipschitzDomain` is a bounded Lipschitz set + (`Rd.BoundedLipschitzDomain.isBoundedLipschitzDomain`, `Rd.isBoundedLipschitzDomain_iff_exists`). +* Every open ball `B(c, R)` is a bounded Lipschitz set (`Rd.isBoundedLipschitzDomain_ball`): near + a point `z` of the sphere, with the inward normal `ν = (c - z)/R`, it lies above the graph of the + `1`-Lipschitz function `y ↦ R - √(R² - min(‖y‖, R/2)²)` (`Rd.sphereProfile`) on the ball of + radius `R/2`, the proof of the `quadratic-forms-sobolev-lean` project + (https://github.com/dbenbenn/quadratic-forms-sobolev-lean). Hence + `Rd.BoundedLipschitzDomain.ball`. +-/ + +@[expose] public section + +open Metric Set +open scoped NNReal + +namespace Rd + +variable {V : Type*} [NormedAddCommGroup V] [InnerProductSpace ℝ V] + +/-! ### The local condition -/ + +/-- A set `Ω` is **Lipschitz near the point `z`** if there are a radius `r > 0`, a unit vector `ν` +and an `L`-Lipschitz function `φ` on the hyperplane `ν^⊥` with +`Ω ∩ B(z, r) = {x : φ(P(x - z)) < ⟪ν, x - z⟫} ∩ B(z, r)`, where `P` is the orthogonal projection +onto `ν^⊥`: near `z`, `Ω` is the region above the graph of `φ` in the direction `ν`. This is the +local condition of Grisvard, Definition 1.2.1.1, with the rotation of coordinates replaced by the +direction `ν` and balls in place of hypercubes. Charts in cylinders, as in TauCeti's +`Set.IsLipschitzChart`, give the same sets: at a boundary point `φ(0) = 0`, so a small cylinder +around `z` lies in the ball and a small ball lies in each cylinder. -/ +def IsLipschitzDomainAt (Ω : Set V) (z : V) : Prop := + ∃ r : ℝ, 0 < r ∧ ∃ ν : V, ‖ν‖ = 1 ∧ ∃ (L : ℝ≥0) (φ : (ℝ ∙ ν)ᗮ → ℝ), LipschitzWith L φ ∧ + Ω ∩ ball z r = + {x | φ ((ℝ ∙ ν)ᗮ.orthogonalProjectionOnto (x - z)) < inner ℝ ν (x - z)} ∩ ball z r + +/-- A **bounded Lipschitz set**: an open bounded set that is Lipschitz near each point of its +frontier (`Rd.IsLipschitzDomainAt`), the usual definition of a bounded Lipschitz domain. In +finite dimension these are exactly the carriers of `Rd.BoundedLipschitzDomain` +(`Rd.isBoundedLipschitzDomain_iff_exists`). -/ +def IsBoundedLipschitzDomain (Ω : Set V) : Prop := + IsOpen Ω ∧ Bornology.IsBounded Ω ∧ ∀ z ∈ frontier Ω, IsLipschitzDomainAt Ω z + +/-! ### The projection onto a hyperplane -/ + +/-- **Pythagoras along `ν`**: for a unit vector `ν`, `w ∈ V` and `a ∈ ℝ`, +`‖w - a ν‖² = ‖P w‖² + (⟪ν, w⟫ - a)²` for the projection `P` onto `ν^⊥`, since +`w - a ν = P w + (⟪ν, w⟫ - a) ν` with `P w = w - ⟪ν, w⟫ ν ⊥ ν` +(`Rd.coe_orthogonalProjectionOnto_orthogonalComplement_singleton`). -/ +theorem norm_sub_smul_sq_eq_norm_orthogonalProjectionOnto_sq_add {ν : V} (hν : ‖ν‖ = 1) (w : V) + (a : ℝ) : + ‖w - a • ν‖ ^ 2 = + ‖((ℝ ∙ ν)ᗮ.orthogonalProjectionOnto w : V)‖ ^ 2 + (inner ℝ ν w - a) ^ 2 := by + rw [coe_orthogonalProjectionOnto_orthogonalComplement_singleton hν] + have hνν : inner ℝ ν ν = (1 : ℝ) := by rw [real_inner_self_eq_norm_sq, hν, one_pow] + have horth : inner ℝ (w - inner ℝ ν w • ν) ((inner ℝ ν w - a) • ν) = (0 : ℝ) := by + rw [real_inner_smul_right, inner_sub_left, real_inner_smul_left, hνν, real_inner_comm] + ring + have hdec : w - a • ν = (w - inner ℝ ν w • ν) + (inner ℝ ν w - a) • ν := by + rw [sub_smul] + abel + rw [hdec, norm_add_sq_real, horth, norm_smul, hν, Real.norm_eq_abs, mul_one, sq_abs] + ring + +/-! ### Local graphs and Lipschitz graph domains -/ + +namespace LipschitzGraph + +/-- **A local graph as a Lipschitz graph domain**: for a point `z`, a unit vector `ν` and an +`L`-Lipschitz `φ` on `ν^⊥`, the Lipschitz graph domain with direction `ν`, constant `L` and graph +function `x ↦ ⟪z, ν⟫ + φ(P(x - z))`. It is constant along `ν` since `P ν = 0` (Mathlib's +`Submodule.orthogonalProjectionOnto_orthogonalComplement_singleton_eq_zero`), and `L`-Lipschitz +since `‖P y‖ ≤ ‖y‖`. -/ +noncomputable def ofLocal (z ν : V) (hν : ‖ν‖ = 1) {L : ℝ≥0} (φ : (ℝ ∙ ν)ᗮ → ℝ) + (hφ : LipschitzWith L φ) : LipschitzGraph V where + e := ν + norm_e := hν + M := L + M_nonneg := L.2 + phi x := inner ℝ z ν + φ ((ℝ ∙ ν)ᗮ.orthogonalProjectionOnto (x - z)) + lipschitz x y := by + have h := hφ.dist_le_mul ((ℝ ∙ ν)ᗮ.orthogonalProjectionOnto (x - z)) + ((ℝ ∙ ν)ᗮ.orthogonalProjectionOnto (y - z)) + rw [Real.dist_eq, dist_eq_norm, ← map_sub, sub_sub_sub_cancel_right] at h + rw [add_sub_add_left_eq_sub] + exact h.trans (mul_le_mul_of_nonneg_left + (Submodule.norm_orthogonalProjectionOnto_apply_le _ _) L.2) + const x t := by + rw [add_sub_right_comm, map_add, map_smul, + Submodule.orthogonalProjectionOnto_orthogonalComplement_singleton_eq_zero, smul_zero, + add_zero] + +/-- The Lipschitz graph domain of a local graph is `{x : φ(P(x - z)) < ⟪ν, x - z⟫}`. -/ +theorem domain_ofLocal (z ν : V) (hν : ‖ν‖ = 1) {L : ℝ≥0} (φ : (ℝ ∙ ν)ᗮ → ℝ) + (hφ : LipschitzWith L φ) : + (ofLocal z ν hν φ hφ).domain = + {x | φ ((ℝ ∙ ν)ᗮ.orthogonalProjectionOnto (x - z)) < inner ℝ ν (x - z)} := by + ext x + change inner ℝ z ν + φ _ < inner ℝ x ν ↔ _ + rw [Set.mem_ofPred_eq, inner_sub_right, real_inner_comm ν x, real_inner_comm ν z] + constructor <;> intro h <;> linarith + +/-- **A smooth local graph has a smooth graph function**: if `φ` is `C^n` on `ν^⊥`, then so is +the graph function `x ↦ ⟪z, ν⟫ + φ(P(x - z))` of `Rd.LipschitzGraph.ofLocal`, since the orthogonal +projection `P` is continuous linear. -/ +theorem contDiff_phi_ofLocal (z ν : V) (hν : ‖ν‖ = 1) {L : ℝ≥0} {φ : (ℝ ∙ ν)ᗮ → ℝ} + (hφ : LipschitzWith L φ) {n : WithTop ℕ∞} (hφn : ContDiff ℝ n φ) : + ContDiff ℝ n (ofLocal z ν hν φ hφ).phi := + contDiff_const.add (hφn.comp ((ℝ ∙ ν)ᗮ.orthogonalProjectionOnto.contDiff.comp + (contDiff_id.sub contDiff_const))) + +variable (G : LipschitzGraph V) + +/-- The graph function of a Lipschitz graph domain seen from the point `z`: +`φ_z(y) = φ(z + y) - ⟪z, e⟫` for `y` in the hyperplane `e^⊥`. -/ +def localPhi (z : V) (y : G.hyperplane) : ℝ := G.phi (z + y) - inner ℝ z G.e + +/-- The graph function seen from `z` is `M`-Lipschitz. -/ +theorem lipschitzWith_localPhi (z : V) : LipschitzWith ⟨G.M, G.M_nonneg⟩ (G.localPhi z) := + LipschitzWith.of_dist_le_mul fun y y' => by + rw [Real.dist_eq, localPhi, localPhi, sub_sub_sub_cancel_right, Subtype.dist_eq, + dist_eq_norm] + have h := G.lipschitz (z + y) (z + y') + rwa [add_sub_add_left_eq_sub] at h + +/-- If the graph function `φ` is `C^n`, then so is the graph function seen from `z`, +`y ↦ φ(z + y) - ⟪z, e⟫`. -/ +theorem contDiff_localPhi (z : V) {n : WithTop ℕ∞} (hG : ContDiff ℝ n G.phi) : + ContDiff ℝ n (G.localPhi z) := + (hG.comp (contDiff_const.add G.hyperplane.subtypeL.contDiff)).sub contDiff_const + +/-- **Every Lipschitz graph domain is a local graph around every point**: +`Ω = {x : φ_z(P(x - z)) < ⟪e, x - z⟫}`, since `φ(x) = φ(z + P(x - z))` by the constancy of `φ` +along `e`. -/ +theorem domain_eq_localPhi (z : V) : + G.domain = {x | G.localPhi z (G.proj (x - z)) < inner ℝ G.e (x - z)} := by + ext x + have hphi : G.phi (z + (G.proj (x - z) : V)) = G.phi x := by + rw [G.coe_proj, ← G.const (z + (x - z - inner ℝ (x - z) G.e • G.e)) (inner ℝ (x - z) G.e)] + congr 1 + abel + change G.phi x < inner ℝ x G.e ↔ G.phi (z + _) - inner ℝ z G.e < inner ℝ G.e (x - z) + rw [hphi, inner_sub_right, real_inner_comm G.e x, real_inner_comm G.e z] + constructor <;> intro h <;> linarith + +end LipschitzGraph + +/-- **Agreeing with a Lipschitz graph domain on a ball** around `z` makes a set Lipschitz near `z`, +by `Rd.LipschitzGraph.domain_eq_localPhi`. -/ +theorem isLipschitzDomainAt_of_ball_inter_eq {Ω : Set V} {z : V} {r : ℝ} (hr : 0 < r) + (G : LipschitzGraph V) (h : ball z r ∩ Ω = ball z r ∩ G.domain) : IsLipschitzDomainAt Ω z := by + refine ⟨r, hr, G.e, G.norm_e, ⟨G.M, G.M_nonneg⟩, G.localPhi z, G.lipschitzWith_localPhi z, ?_⟩ + rw [inter_comm, h, G.domain_eq_localPhi z, inter_comm] + rfl + +/-- **A set Lipschitz near `z` agrees with a Lipschitz graph domain on a ball** around `z`: the +graph domain of the local graph (`Rd.LipschitzGraph.ofLocal`). -/ +theorem IsLipschitzDomainAt.exists_ball_inter_eq {Ω : Set V} {z : V} + (h : IsLipschitzDomainAt Ω z) : + ∃ r : ℝ, 0 < r ∧ ∃ G : LipschitzGraph V, ball z r ∩ Ω = ball z r ∩ G.domain := by + obtain ⟨r, hr, ν, hν, L, φ, hφ, hΩ⟩ := h + refine ⟨r, hr, LipschitzGraph.ofLocal z ν hν φ hφ, ?_⟩ + rw [LipschitzGraph.domain_ofLocal, inter_comm, hΩ, inter_comm] + +/-- **Lipschitz near `z` means agreeing with a Lipschitz graph domain on a ball** around `z`. -/ +theorem isLipschitzDomainAt_iff {Ω : Set V} {z : V} : + IsLipschitzDomainAt Ω z ↔ + ∃ r : ℝ, 0 < r ∧ ∃ G : LipschitzGraph V, ball z r ∩ Ω = ball z r ∩ G.domain := + ⟨IsLipschitzDomainAt.exists_ball_inter_eq, fun ⟨_, hr, G, h⟩ => + isLipschitzDomainAt_of_ball_inter_eq hr G h⟩ + +/-- **Being Lipschitz near `z` depends only on the set near `z`**: if `Ω` and `Ω'` agree on a ball +`B(z, ρ)` with `ρ > 0` and `Ω'` is Lipschitz near `z`, then so is `Ω`, with the radius shrunk to +`min r ρ` (`Rd.isLipschitzDomainAt_iff`). -/ +theorem IsLipschitzDomainAt.congr_ball {Ω Ω' : Set V} {z : V} {ρ : ℝ} (hρ : 0 < ρ) + (h : ball z ρ ∩ Ω = ball z ρ ∩ Ω') (h' : IsLipschitzDomainAt Ω' z) : + IsLipschitzDomainAt Ω z := by + obtain ⟨r, hr, G, hG⟩ := h'.exists_ball_inter_eq + have h1 : ball z (min r ρ) ∩ ball z ρ = ball z (min r ρ) := + inter_eq_left.2 (ball_subset_ball (min_le_right _ _)) + have h2 : ball z (min r ρ) ∩ ball z r = ball z (min r ρ) := + inter_eq_left.2 (ball_subset_ball (min_le_left _ _)) + refine isLipschitzDomainAt_of_ball_inter_eq (lt_min hr hρ) G ?_ + calc ball z (min r ρ) ∩ Ω = ball z (min r ρ) ∩ (ball z ρ ∩ Ω) := by rw [← inter_assoc, h1] + _ = ball z (min r ρ) ∩ (ball z r ∩ Ω') := by rw [h, ← inter_assoc, h1, ← inter_assoc, h2] + _ = ball z (min r ρ) ∩ G.domain := by rw [hG, ← inter_assoc, h2] + +/-- **A local graph depends only on its function near the origin**: if `φ = ψ` on the ball of +radius `ρ` of `ν^⊥`, then the regions above the graphs of `φ` and `ψ` agree on `B(z, ρ)`, since +`‖P(x - z)‖ ≤ ‖x - z‖ < ρ` there (Mathlib's `Submodule.norm_orthogonalProjectionOnto_apply_le`). -/ +theorem localGraph_inter_ball_eq_of_eqOn {z ν : V} {ρ : ℝ} {φ ψ : (ℝ ∙ ν)ᗮ → ℝ} + (h : EqOn φ ψ (ball 0 ρ)) : + {x | φ ((ℝ ∙ ν)ᗮ.orthogonalProjectionOnto (x - z)) < inner ℝ ν (x - z)} ∩ ball z ρ = + {x | ψ ((ℝ ∙ ν)ᗮ.orthogonalProjectionOnto (x - z)) < inner ℝ ν (x - z)} ∩ ball z ρ := by + ext x + refine ⟨fun ⟨hx, hxb⟩ => ⟨?_, hxb⟩, fun ⟨hx, hxb⟩ => ⟨?_, hxb⟩⟩ + all_goals + have hP : (ℝ ∙ ν)ᗮ.orthogonalProjectionOnto (x - z) ∈ ball (0 : (ℝ ∙ ν)ᗮ) ρ := by + rw [mem_ball_zero_iff] + exact (Submodule.norm_orthogonalProjectionOnto_apply_le _ _).trans_lt + (by rwa [← dist_eq_norm, ← mem_ball]) + · change ψ _ < _ + rw [← h hP] + exact hx + · change φ _ < _ + rw [h hP] + exact hx + +/-- **A local graph that is Lipschitz only near the origin suffices**: if `φ` is `L`-Lipschitz on +the ball of radius `r` of `ν^⊥` (the image of `B(z, r)` under `x ↦ P(x - z)`) and +`Ω ∩ B(z, r) = {x : φ(P(x - z)) < ⟪ν, x - z⟫} ∩ B(z, r)`, then `Ω` is Lipschitz near `z`: McShane's +extension (Mathlib's `LipschitzOnWith.extend_real`) gives an `L`-Lipschitz function on `ν^⊥` that +agrees with `φ` on that ball (`Rd.localGraph_inter_ball_eq_of_eqOn`). -/ +theorem isLipschitzDomainAt_of_lipschitzOnWith {Ω : Set V} {z ν : V} {r : ℝ} (hr : 0 < r) + (hν : ‖ν‖ = 1) {L : ℝ≥0} {φ : (ℝ ∙ ν)ᗮ → ℝ} (hφ : LipschitzOnWith L φ (ball 0 r)) + (hΩ : Ω ∩ ball z r = + {x | φ ((ℝ ∙ ν)ᗮ.orthogonalProjectionOnto (x - z)) < inner ℝ ν (x - z)} ∩ ball z r) : + IsLipschitzDomainAt Ω z := by + obtain ⟨ψ, hψ, heq⟩ := hφ.extend_real + exact ⟨r, hr, ν, hν, L, ψ, hψ, by rw [hΩ, localGraph_inter_ball_eq_of_eqOn heq]⟩ + +/-! ### The constructor from a family of charts -/ + +section Charts + +variable [FiniteDimensional ℝ V] {Ω : Set V} + +/-- **Finitely many chart balls cover the frontier**: for a bounded set `Ω` and radii `r(z) > 0` at +its frontier points, finitely many of the balls `B(z, r(z))` cover the frontier, which is compact +in finite dimension (`Rd.isCompact_frontier_of_isBounded`, `IsCompact.elim_finite_subcover`). -/ +theorem exists_finset_cover_frontier (hb : Bornology.IsBounded Ω) (r : frontier Ω → ℝ) + (hr : ∀ z, 0 < r z) : ∃ t : Finset (frontier Ω), frontier Ω ⊆ ⋃ z ∈ t, ball (z : V) (r z) := + (isCompact_frontier_of_isBounded hb).elim_finite_subcover + (fun z : frontier Ω => ball (z : V) (r z)) (fun _ => isOpen_ball) + fun x hx => mem_iUnion.2 ⟨⟨x, hx⟩, mem_ball_self (hr _)⟩ + +/-- A chosen finite set of frontier points whose balls `B(z, r(z))` cover the frontier +(`Rd.exists_finset_cover_frontier`). -/ +noncomputable def frontierCenters (hb : Bornology.IsBounded Ω) (r : frontier Ω → ℝ) + (hr : ∀ z, 0 < r z) : Finset (frontier Ω) := + Classical.choose (exists_finset_cover_frontier hb r hr) + +/-- The balls `B(z, r(z))` of the chosen centres cover the frontier. -/ +theorem frontier_subset_frontierCenters (hb : Bornology.IsBounded Ω) (r : frontier Ω → ℝ) + (hr : ∀ z, 0 < r z) : frontier Ω ⊆ ⋃ z ∈ frontierCenters hb r hr, ball (z : V) (r z) := + Classical.choose_spec (exists_finset_cover_frontier hb r hr) + +/-- The `j`-th chosen centre, for the numbering `Fin N` of the chosen centres +(`Finset.equivFin`). -/ +noncomputable def frontierCenterAt (hb : Bornology.IsBounded Ω) (r : frontier Ω → ℝ) + (hr : ∀ z, 0 < r z) (j : Fin (frontierCenters hb r hr).card) : frontier Ω := + ((frontierCenters hb r hr).equivFin.symm j : frontier Ω) + +/-- **The bounded Lipschitz domain of a family of charts**: let `Ω` be open and bounded, and let +each frontier point `z` carry a radius `r(z) > 0` and a Lipschitz graph domain `G(z)` that agrees +with `Ω` on `B(z, r(z))`. The charts at the finitely many chosen centres +(`Rd.frontierCenters`) form a `Rd.BoundedLipschitzDomain` with carrier `Ω`, and each of its graph +domains is one of the `G(z)` (`Rd.BoundedLipschitzDomain.exists_graph_ofCharts_eq`). -/ +noncomputable def BoundedLipschitzDomain.ofCharts (ho : IsOpen Ω) (hb : Bornology.IsBounded Ω) + (r : frontier Ω → ℝ) (hr : ∀ z, 0 < r z) (G : frontier Ω → LipschitzGraph V) + (hG : ∀ z : frontier Ω, ball (z : V) (r z) ∩ Ω = ball (z : V) (r z) ∩ (G z).domain) : + BoundedLipschitzDomain V where + carrier := Ω + isOpen := ho + isBounded := hb + N := (frontierCenters hb r hr).card + center j := (frontierCenterAt hb r hr j : V) + radius j := r (frontierCenterAt hb r hr j) + radius_pos j := hr _ + center_mem j := (frontierCenterAt hb r hr j).2 + graph j := G (frontierCenterAt hb r hr j) + frontier_subset x hx := by + obtain ⟨z, hz, hxz⟩ := mem_iUnion₂.1 (frontier_subset_frontierCenters hb r hr hx) + refine mem_iUnion.2 ⟨(frontierCenters hb r hr).equivFin ⟨z, hz⟩, ?_⟩ + simp only [frontierCenterAt, Equiv.symm_apply_apply] + exact hxz + ball_inter j := hG _ + +/-- The carrier of `Rd.BoundedLipschitzDomain.ofCharts` is `Ω`. -/ +@[simp] +theorem BoundedLipschitzDomain.carrier_ofCharts (ho : IsOpen Ω) (hb : Bornology.IsBounded Ω) + (r : frontier Ω → ℝ) (hr : ∀ z, 0 < r z) (G : frontier Ω → LipschitzGraph V) + (hG : ∀ z : frontier Ω, ball (z : V) (r z) ∩ Ω = ball (z : V) (r z) ∩ (G z).domain) : + (BoundedLipschitzDomain.ofCharts ho hb r hr G hG).carrier = Ω := + rfl + +/-- **The graph domains of `Rd.BoundedLipschitzDomain.ofCharts` come from the family**: each is +`G(z)` for some frontier point `z`, so every property shared by all `G(z)`, such as smoothness +of the graph functions, passes to the bounded Lipschitz domain. -/ +theorem BoundedLipschitzDomain.exists_graph_ofCharts_eq (ho : IsOpen Ω) + (hb : Bornology.IsBounded Ω) (r : frontier Ω → ℝ) (hr : ∀ z, 0 < r z) + (G : frontier Ω → LipschitzGraph V) + (hG : ∀ z : frontier Ω, ball (z : V) (r z) ∩ Ω = ball (z : V) (r z) ∩ (G z).domain) + (j : Fin (BoundedLipschitzDomain.ofCharts ho hb r hr G hG).N) : + ∃ z, (BoundedLipschitzDomain.ofCharts ho hb r hr G hG).graph j = G z := + ⟨_, rfl⟩ + +end Charts + +/-! ### The constructor from the set-level definition -/ + +namespace IsBoundedLipschitzDomain + +variable {Ω : Set V} + +/-- **A chart at each frontier point**: a radius `r > 0` and a Lipschitz graph domain that agrees +with `Ω` on `B(z, r)` (`Rd.IsLipschitzDomainAt.exists_ball_inter_eq`). -/ +theorem exists_chart (h : IsBoundedLipschitzDomain Ω) (z : frontier Ω) : + ∃ q : ℝ × LipschitzGraph V, 0 < q.1 ∧ ball (z : V) q.1 ∩ Ω = ball (z : V) q.1 ∩ q.2.domain := by + obtain ⟨r, hr, G, hG⟩ := (h.2.2 z z.2).exists_ball_inter_eq + exact ⟨(r, G), hr, hG⟩ + +/-- A chosen chart at the frontier point `z`: its radius and its Lipschitz graph domain. -/ +noncomputable def chart (h : IsBoundedLipschitzDomain Ω) (z : frontier Ω) : ℝ × LipschitzGraph V := + Classical.choose (h.exists_chart z) + +/-- The radius of the chosen chart is positive. -/ +theorem chart_fst_pos (h : IsBoundedLipschitzDomain Ω) (z : frontier Ω) : 0 < (h.chart z).1 := + (Classical.choose_spec (h.exists_chart z)).1 + +/-- On the ball of the chosen chart, `Ω` is its Lipschitz graph domain. -/ +theorem ball_inter_chart (h : IsBoundedLipschitzDomain Ω) (z : frontier Ω) : + ball (z : V) (h.chart z).1 ∩ Ω = ball (z : V) (h.chart z).1 ∩ (h.chart z).2.domain := + (Classical.choose_spec (h.exists_chart z)).2 + +end IsBoundedLipschitzDomain + +namespace BoundedLipschitzDomain + +variable [FiniteDimensional ℝ V] {Ω : Set V} + +/-- **The bounded Lipschitz domain of a bounded Lipschitz set**: the chosen charts at the frontier +points (`Rd.IsBoundedLipschitzDomain.chart`) form a family of charts, and +`Rd.BoundedLipschitzDomain.ofCharts` gives a `Rd.BoundedLipschitzDomain` with carrier `Ω`. -/ +noncomputable def ofIsBoundedLipschitzDomain (h : IsBoundedLipschitzDomain Ω) : + BoundedLipschitzDomain V := + ofCharts h.1 h.2.1 (fun z => (h.chart z).1) h.chart_fst_pos (fun z => (h.chart z).2) + h.ball_inter_chart + +/-- The carrier of `Rd.BoundedLipschitzDomain.ofIsBoundedLipschitzDomain h` is `Ω`. -/ +@[simp] +theorem carrier_ofIsBoundedLipschitzDomain (h : IsBoundedLipschitzDomain Ω) : + (ofIsBoundedLipschitzDomain h).carrier = Ω := + rfl + +omit [FiniteDimensional ℝ V] in +/-- **A bounded Lipschitz domain is a graph domain near each frontier point**: a frontier point `z` +lies in some chart ball `B(c_j, ρ_j)`, the smaller ball `B(z, ρ_j - ‖z - c_j‖)` lies inside it, +and there the domain is the graph domain `Ω_j`. -/ +theorem exists_ball_inter_eq_graph (D : BoundedLipschitzDomain V) {z : V} + (hz : z ∈ frontier D.carrier) : + ∃ j : Fin D.N, ∃ ρ : ℝ, 0 < ρ ∧ ball z ρ ∩ D.carrier = ball z ρ ∩ (D.graph j).domain := by + obtain ⟨j, hj⟩ := mem_iUnion.1 (D.frontier_subset hz) + have hr : 0 < D.radius j - dist z (D.center j) := sub_pos.2 hj + have hsub : ball z (D.radius j - dist z (D.center j)) ⊆ ball (D.center j) (D.radius j) := + ball_subset_ball' (by linarith) + refine ⟨j, _, hr, ?_⟩ + rw [← inter_eq_left.2 hsub, inter_assoc, D.ball_inter j, ← inter_assoc] + +omit [FiniteDimensional ℝ V] in +/-- **A bounded Lipschitz domain is Lipschitz near each frontier point**, by +`Rd.BoundedLipschitzDomain.exists_ball_inter_eq_graph`. -/ +theorem isLipschitzDomainAt (D : BoundedLipschitzDomain V) {z : V} + (hz : z ∈ frontier D.carrier) : IsLipschitzDomainAt D.carrier z := by + obtain ⟨j, ρ, hρ, h⟩ := D.exists_ball_inter_eq_graph hz + exact isLipschitzDomainAt_of_ball_inter_eq hρ (D.graph j) h + +omit [FiniteDimensional ℝ V] in +/-- **The carrier of a bounded Lipschitz domain is a bounded Lipschitz set.** -/ +theorem isBoundedLipschitzDomain (D : BoundedLipschitzDomain V) : + IsBoundedLipschitzDomain D.carrier := + ⟨D.isOpen, D.isBounded, fun _ hz => D.isLipschitzDomainAt hz⟩ + +end BoundedLipschitzDomain + +/-- **The set-level definition and the structure agree**: in finite dimension a set is a bounded +Lipschitz set iff it is the carrier of some `Rd.BoundedLipschitzDomain`. -/ +theorem isBoundedLipschitzDomain_iff_exists [FiniteDimensional ℝ V] {Ω : Set V} : + IsBoundedLipschitzDomain Ω ↔ ∃ D : BoundedLipschitzDomain V, D.carrier = Ω := + ⟨fun h => ⟨BoundedLipschitzDomain.ofIsBoundedLipschitzDomain h, rfl⟩, + fun ⟨D, hD⟩ => hD ▸ D.isBoundedLipschitzDomain⟩ + +/-! ### The ball -/ + +/-- The **sphere profile**, the profile of the sphere of radius `R` seen from one of its points: +`g_R(s) = R - √(R² - min(s, R/2)²)`. Near a point `z` of the sphere `‖x - c‖ = R`, the ball is the +region above the graph of `y ↦ g_R(‖y‖)` over the tangent hyperplane. -/ +noncomputable def sphereProfile (R s : ℝ) : ℝ := R - Real.sqrt (R ^ 2 - min s (R / 2) ^ 2) + +/-- For `R > 0`, on `[0, R/2]` the function `s ↦ √(R² - s²)` is `1`-Lipschitz: with `a, b` the two +square roots, `a, b ≥ R/2` and `|a - b| (a + b) = |s₁ - s₂| (s₁ + s₂) ≤ R |s₁ - s₂|`; dividing by +`a + b ≥ R` gives the bound (the argument of the `quadratic-forms-sobolev-lean` project). -/ +theorem abs_sqrt_sq_sub_sq_sub_le {R s₁ s₂ : ℝ} (hR : 0 < R) (h₁ : 0 ≤ s₁) (h₁' : s₁ ≤ R / 2) + (h₂ : 0 ≤ s₂) (h₂' : s₂ ≤ R / 2) : + |Real.sqrt (R ^ 2 - s₁ ^ 2) - Real.sqrt (R ^ 2 - s₂ ^ 2)| ≤ |s₁ - s₂| := by + have ha : R / 2 ≤ Real.sqrt (R ^ 2 - s₁ ^ 2) := Real.le_sqrt_of_sq_le (by nlinarith) + have hb : R / 2 ≤ Real.sqrt (R ^ 2 - s₂ ^ 2) := Real.le_sqrt_of_sq_le (by nlinarith) + have ha2 : Real.sqrt (R ^ 2 - s₁ ^ 2) ^ 2 = R ^ 2 - s₁ ^ 2 := Real.sq_sqrt (by nlinarith) + have hb2 : Real.sqrt (R ^ 2 - s₂ ^ 2) ^ 2 = R ^ 2 - s₂ ^ 2 := Real.sq_sqrt (by nlinarith) + generalize Real.sqrt (R ^ 2 - s₁ ^ 2) = a at ha ha2 ⊢ + generalize Real.sqrt (R ^ 2 - s₂ ^ 2) = b at hb hb2 ⊢ + have hab : 0 < a + b := by linarith + have key : |a - b| * (a + b) = |s₁ - s₂| * (s₁ + s₂) := by + rw [← abs_of_pos hab, ← abs_mul, + show (a - b) * (a + b) = -((s₁ - s₂) * (s₁ + s₂)) by linear_combination ha2 - hb2, + abs_neg, abs_mul, abs_of_nonneg (by linarith : (0 : ℝ) ≤ s₁ + s₂)] + by_contra hcon + have hlt : |s₁ - s₂| < |a - b| := lt_of_not_ge hcon + nlinarith [abs_nonneg (s₁ - s₂)] + +/-- For `R > 0` the sphere profile is `1`-Lipschitz on `[0, ∞)`: +`|g_R(s₁) - g_R(s₂)| ≤ |s₁ - s₂|` for `s₁, s₂ ≥ 0`, by `Rd.abs_sqrt_sq_sub_sq_sub_le` and since +`s ↦ min(s, R/2)` is `1`-Lipschitz. -/ +theorem abs_sphereProfile_sub_le {R s₁ s₂ : ℝ} (hR : 0 < R) (h₁ : 0 ≤ s₁) (h₂ : 0 ≤ s₂) : + |sphereProfile R s₁ - sphereProfile R s₂| ≤ |s₁ - s₂| := by + have h := abs_sqrt_sq_sub_sq_sub_le hR (le_min h₁ (by positivity)) (min_le_right _ _) + (le_min h₂ (by positivity)) (min_le_right s₂ (R / 2)) + have hmin : |min s₁ (R / 2) - min s₂ (R / 2)| ≤ |s₁ - s₂| := by + refine (abs_min_sub_min_le_max _ _ _ _).trans ?_ + rw [sub_self, abs_zero, max_eq_left (abs_nonneg _)] + rw [sphereProfile, sphereProfile, sub_sub_sub_cancel_left, abs_sub_comm] + exact h.trans hmin + +/-- For `R > 0` and on any normed group, `y ↦ g_R(‖y‖)` is `1`-Lipschitz +(`Rd.abs_sphereProfile_sub_le` and the reverse triangle inequality). -/ +theorem lipschitzWith_sphereProfile_norm {E : Type*} [SeminormedAddCommGroup E] {R : ℝ} + (hR : 0 < R) : LipschitzWith 1 (fun y : E => sphereProfile R ‖y‖) := + LipschitzWith.of_dist_le_mul fun y y' => by + rw [Real.dist_eq, NNReal.coe_one, one_mul, dist_eq_norm] + exact (abs_sphereProfile_sub_le hR (norm_nonneg y) (norm_nonneg y')).trans + (abs_norm_sub_norm_le y y') + +/-- **The ball near a point of its sphere is the region above the profile**: let `‖ν‖ = 1`, +`c - z = R ν` and `‖x - z‖ < R/2`. Then `x ∈ B(c, R)` iff `g_R(‖P(x - z)‖) < ⟪ν, x - z⟫`, since +`‖x - c‖² = ‖P(x - z)‖² + (⟪ν, x - z⟫ - R)²` +(`Rd.norm_sub_smul_sq_eq_norm_orthogonalProjectionOnto_sq_add`) and both `‖P(x - z)‖ < R/2` and +`⟪ν, x - z⟫ < R/2`. -/ +theorem mem_ball_iff_sphereProfile_lt {R : ℝ} (hR : 0 < R) {ν c z x : V} (hν : ‖ν‖ = 1) + (hc : c - z = R • ν) (hxz : ‖x - z‖ < R / 2) : + x ∈ ball c R ↔ + sphereProfile R ‖((ℝ ∙ ν)ᗮ.orthogonalProjectionOnto (x - z) : V)‖ < inner ℝ ν (x - z) := by + have hxc : x - c = (x - z) - R • ν := by rw [← hc]; abel + have hnx := norm_sub_smul_sq_eq_norm_orthogonalProjectionOnto_sq_add hν (x - z) R + have hnw := norm_sub_smul_sq_eq_norm_orthogonalProjectionOnto_sq_add hν (x - z) 0 + rw [← hxc] at hnx + rw [zero_smul, sub_zero, sub_zero] at hnw + generalize ((ℝ ∙ ν)ᗮ.orthogonalProjectionOnto (x - z) : V) = p at hnx hnw ⊢ + generalize inner ℝ ν (x - z) = t at hnx hnw ⊢ + have hw2 : ‖x - z‖ ^ 2 < (R / 2) ^ 2 := pow_lt_pow_left₀ hxz (norm_nonneg _) two_ne_zero + have hp : ‖p‖ < R / 2 := by nlinarith [norm_nonneg p, sq_nonneg t] + have ht : t < R / 2 := by nlinarith [sq_nonneg ‖p‖, sq_nonneg (t - R / 2)] + have hRt : 0 ≤ R - t := by linarith + rw [sphereProfile, min_eq_left hp.le, mem_ball, dist_eq_norm, sub_lt_comm, + Real.lt_sqrt hRt, ← sq_lt_sq₀ (norm_nonneg _) hR.le] + constructor <;> intro h <;> nlinarith + +/-- **The inward unit normal of a sphere**: for `R > 0` and a point `z` with `‖z - c‖ = R`, the +vector `(c - z)/R` has norm `1`. -/ +theorem norm_inv_smul_sub_eq_one {c z : V} {R : ℝ} (hR : 0 < R) (hz : dist z c = R) : + ‖R⁻¹ • (c - z)‖ = 1 := by + rw [norm_smul, norm_inv, Real.norm_eq_abs, abs_of_pos hR, ← dist_eq_norm, dist_comm, hz, + inv_mul_cancel₀ hR.ne'] + +/-- **The ball near a point of its sphere, as a set**: for `R > 0` and `‖z - c‖ = R`, with the +inward normal `ν = (c - z)/R`, +`B(c, R) ∩ B(z, R/2) = {x : g_R(‖P(x - z)‖) < ⟪ν, x - z⟫} ∩ B(z, R/2)` +(`Rd.mem_ball_iff_sphereProfile_lt`). -/ +theorem inter_ball_eq_sphereProfile (c : V) {R : ℝ} (hR : 0 < R) {z : V} (hz : dist z c = R) : + ball c R ∩ ball z (R / 2) = + {x | sphereProfile R ‖((ℝ ∙ R⁻¹ • (c - z))ᗮ.orthogonalProjectionOnto (x - z) : V)‖ < + inner ℝ (R⁻¹ • (c - z)) (x - z)} ∩ ball z (R / 2) := by + have hνn := norm_inv_smul_sub_eq_one hR hz + have hc : c - z = R • (R⁻¹ • (c - z)) := by rw [smul_smul, mul_inv_cancel₀ hR.ne', one_smul] + ext x + refine ⟨fun ⟨hx, hxb⟩ => ⟨?_, hxb⟩, fun ⟨hx, hxb⟩ => ⟨?_, hxb⟩⟩ + · exact (mem_ball_iff_sphereProfile_lt hR hνn hc (by rwa [← dist_eq_norm, ← mem_ball])).1 hx + · exact (mem_ball_iff_sphereProfile_lt hR hνn hc (by rwa [← dist_eq_norm, ← mem_ball])).2 hx + +/-- **The ball is Lipschitz near each point of its sphere**: at `z` with `‖z - c‖ = R`, with the +inward normal `ν = (c - z)/R`, radius `R/2` and the `1`-Lipschitz function +`y ↦ g_R(‖y‖)` (`Rd.inter_ball_eq_sphereProfile`). -/ +theorem isLipschitzDomainAt_ball (c : V) {R : ℝ} (hR : 0 < R) {z : V} (hz : dist z c = R) : + IsLipschitzDomainAt (ball c R) z := + ⟨R / 2, by positivity, R⁻¹ • (c - z), norm_inv_smul_sub_eq_one hR hz, 1, + fun y => sphereProfile R ‖(y : V)‖, lipschitzWith_sphereProfile_norm hR, + inter_ball_eq_sphereProfile c hR hz⟩ + +/-- **Every open ball is a bounded Lipschitz set**: for `R > 0` by `Rd.isLipschitzDomainAt_ball` +at the points of the sphere, which contains the frontier (Mathlib's +`Metric.frontier_ball_subset_sphere`); for `R ≤ 0` the ball is empty. -/ +theorem isBoundedLipschitzDomain_ball (c : V) (R : ℝ) : IsBoundedLipschitzDomain (ball c R) := by + rcases le_or_gt R 0 with hR | hR + · rw [ball_eq_empty.2 hR] + exact ⟨isOpen_empty, Bornology.isBounded_empty, fun _ hz => by simp at hz⟩ + · exact ⟨isOpen_ball, isBounded_ball, fun _ hz => + isLipschitzDomainAt_ball c hR (mem_sphere.1 (frontier_ball_subset_sphere hz))⟩ + +/-- **The ball as a bounded Lipschitz domain**: `B(c, R)`, from +`Rd.isBoundedLipschitzDomain_ball`. The name is protected, so that `ball` keeps meaning +`Metric.ball` inside the namespace `Rd.BoundedLipschitzDomain`. -/ +protected noncomputable def BoundedLipschitzDomain.ball [FiniteDimensional ℝ V] (c : V) (R : ℝ) : + BoundedLipschitzDomain V := + BoundedLipschitzDomain.ofIsBoundedLipschitzDomain (isBoundedLipschitzDomain_ball c R) + +/-- The carrier of `Rd.BoundedLipschitzDomain.ball c R` is the ball `B(c, R)`. -/ +@[simp] +theorem BoundedLipschitzDomain.carrier_ball [FiniteDimensional ℝ V] (c : V) (R : ℝ) : + (BoundedLipschitzDomain.ball c R).carrier = ball c R := + rfl + +end Rd diff --git a/LeanPool/FunctionSpaces/Domains/Lipschitz/SurfaceMeasure.lean b/LeanPool/FunctionSpaces/Domains/Lipschitz/SurfaceMeasure.lean new file mode 100644 index 0000000000..c9d295eb5a --- /dev/null +++ b/LeanPool/FunctionSpaces/Domains/Lipschitz/SurfaceMeasure.lean @@ -0,0 +1,579 @@ +/- +Copyright (c) 2026 Mario Ullrich. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Mario Ullrich +-/ +module + +public import LeanPool.FunctionSpaces.Domains.Traces.BoundaryTraceSpace +public import LeanPool.FunctionSpaces.Domains.Lipschitz.LipschitzGraphArea + +/- +Modified for Lean Pool: module names and imports adapted. +-/ + +/-! +# The surface measure of a bounded Lipschitz domain + +Let `Ω` be a bounded Lipschitz domain with boundary `Γ` in a finite-dimensional real inner +product space `V`, `dim V = n`, such as `ℝ^d`, with the boundary balls `B_j` and the Lipschitz +graphs `γ_j(x') = x' + φ_j(x') e_j` over the hyperplanes `H_j`. + +* **The surface measure** `σ` (`Rd.BoundedLipschitzDomain.surfaceMeasure`) is Mathlib's + `(n-1)`-dimensional Euclidean Hausdorff measure `μHE[n-1]` restricted to `Γ`, defined without + charts. By the area formula for Lipschitz graphs, in each chart it is the measure with density + `√(1 + ‖∇φ_j‖²)` on `H_j` (`Rd.BoundedLipschitzDomain.lintegral_surfaceMeasure_of_support`, + `Rd.BoundedLipschitzDomain.integral_surfaceMeasure_of_support`), so two charts give the same + integrals (`Rd.BoundedLipschitzDomain.lintegral_chart_eq`), the density between `1` and + `√(1 + M_j²)` compares the integrals in a chart with those over `Γ` + (`Rd.BoundedLipschitzDomain.lintegral_chart_le`, `Rd.BoundedLipschitzDomain.lintegral_le_chart`), + and a resolution of unity splits every integral over `Γ` into chart integrals, since + `g = ∑_j ψ_j g` on `Γ` (`Rd.BoundedLipschitzDomain.ae_eq_sum_mul`, + `Rd.BoundedLipschitzDomain.lintegral_surfaceMeasure`, + `Rd.BoundedLipschitzDomain.integral_surfaceMeasure`). It is finite, its null sets are those of + the charts (`Rd.BoundedLipschitzDomain.ae_surfaceMeasure_iff_aeBoundary`), and `Γ` is a null + set of the volume (`Rd.BoundedLipschitzDomain.volume_frontier`). +* **The trace in `L_2(Γ)`**: the boundary trace of the trace theorem lies in `L_p(σ)` + (`Rd.BoundedLipschitzDomain.memLp_boundaryTrace`); for `p = 2` it gives bounded operators + `H^1(V) → L_2(Γ)` (`Rd.BoundedLipschitzDomain.ambientTraceL2`), the injective + `H^{1/2}(Γ) → L_2(Γ)` (`Rd.BoundedLipschitzDomain.traceL2`) and `γ_{L_2} : H^1(Ω) → L_2(Γ)` + (`Rd.BoundedLipschitzDomain.boundaryTraceL2`), the first one on `H^1(Ω)` + (`Rd.BoundedLipschitzDomain.boundaryTraceL2_eq_ambientTraceL2`), whose kernel is the trace + kernel (`Rd.BoundedLipschitzDomain.ker_boundaryTraceL2`); `B^{1/2}_{2,2}(Γ) ⊆ L_2(Γ)` + (`Rd.BoundedLipschitzDomain.memLp_of_memBoundaryBesov`). +* **The outward unit normal** `ν(y) = ∑_j ψ_j(y) ν_j(P_j y)` + (`Rd.BoundedLipschitzDomain.normal`) is pasted from the chart normals `ν_j` with the fixed + resolution of unity `ψ = Rd.BoundedLipschitzDomain.boundaryPartition`, which is nonnegative; it is + measurable with `‖ν‖ ≤ 1`. +-/ + +@[expose] public section + +open MeasureTheory Module Metric Filter Topology Set +open scoped ENNReal NNReal BesselPotentialSpace Manifold +open ENNReal (lqNorm dyadicWeight) + +namespace Rd + +namespace BoundedLipschitzDomain + +variable {V : Type*} [NormedAddCommGroup V] [InnerProductSpace ℝ V] (Ω : BoundedLipschitzDomain V) + +/-! ### The boundary in a ball is the graph -/ + +/-- **In a boundary ball the boundary is the graph**: `Γ ∩ B_j = γ_j(H_j) ∩ B_j` +(`Rd.BoundedLipschitzDomain.mem_frontier_iff`). -/ +theorem frontier_inter_ball_eq (j : Fin Ω.N) : + frontier Ω.carrier ∩ ball (Ω.center j) (Ω.radius j) = + range (Ω.graph j).graphMap ∩ ball (Ω.center j) (Ω.radius j) := by + ext y + refine ⟨fun ⟨hy, hb⟩ => ⟨⟨_, (Ω.mem_frontier_iff j hb).1 hy⟩, hb⟩, ?_⟩ + rintro ⟨⟨x', rfl⟩, hb⟩ + exact ⟨Ω.graphMap_mem_frontier j hb, hb⟩ + +variable [MeasurableSpace V] [BorelSpace V] + +/-! ### The surface measure -/ + +/-- **The surface measure** `σ` of the boundary `Γ` of a bounded Lipschitz domain in `V`, +`dim V = n`: the `(n-1)`-dimensional Hausdorff measure restricted to `Γ`, normalised as Mathlib's +`μHE[n-1]`, so that it is the volume on hyperplanes. In each chart it is the measure with density +`√(1 + ‖∇φ_j‖²)` on the hyperplane +(`Rd.BoundedLipschitzDomain.lintegral_surfaceMeasure_of_support`). -/ +noncomputable def surfaceMeasure : Measure V := + (μHE[finrank ℝ V - 1] : Measure V).restrict (frontier Ω.carrier) + +/-- The surface measure is carried by the boundary: almost every point lies on `Γ`. -/ +theorem ae_mem_frontier : ∀ᵐ y ∂Ω.surfaceMeasure, y ∈ frontier Ω.carrier := + ae_restrict_mem isClosed_frontier.measurableSet + +/-- The complement of the boundary is a null set of the surface measure. -/ +theorem surfaceMeasure_compl_frontier : Ω.surfaceMeasure (frontier Ω.carrier)ᶜ = 0 := + ae_iff.1 Ω.ae_mem_frontier + +/-- **The surface measure in a boundary ball**: on `B_j` the surface measure is `μHE[n-1]` on the +graph `γ_j(H_j)` (`Rd.BoundedLipschitzDomain.frontier_inter_ball_eq`). -/ +theorem surfaceMeasure_restrict_ball (j : Fin Ω.N) : + Ω.surfaceMeasure.restrict (ball (Ω.center j) (Ω.radius j)) = + ((μHE[finrank ℝ V - 1] : Measure V).restrict (range (Ω.graph j).graphMap)).restrict + (ball (Ω.center j) (Ω.radius j)) := by + rw [surfaceMeasure, Measure.restrict_restrict measurableSet_ball, + Measure.restrict_restrict measurableSet_ball, inter_comm, Ω.frontier_inter_ball_eq, + inter_comm] + +variable [FiniteDimensional ℝ V] + +/-- **Integrals over a boundary ball in the chart**: for every `F : V → [0, ∞]` vanishing outside +`B_j`, `∫_Γ F dσ = ∫_{H_j} F(γ_j x') √(1 + ‖∇φ_j(x')‖²) dx'`, by the area formula for the graph +of `φ_j` (`Rd.LipschitzGraph.lintegral_graphMap`). -/ +theorem lintegral_surfaceMeasure_of_support (j : Fin Ω.N) (F : V → ℝ≥0∞) + (hF : ∀ y, F y ≠ 0 → y ∈ ball (Ω.center j) (Ω.radius j)) : + ∫⁻ y, F y ∂Ω.surfaceMeasure = + ∫⁻ x', F ((Ω.graph j).graphMap x') * ENNReal.ofReal ((Ω.graph j).gram x') := by + have hs : Function.support F ⊆ ball (Ω.center j) (Ω.radius j) := fun y hy => hF y hy + rw [← setLIntegral_eq_of_support_subset hs, surfaceMeasure_restrict_ball, + setLIntegral_eq_of_support_subset hs, LipschitzGraph.lintegral_graphMap] + +/-- **Integrals in the chart are at most those over `Γ`**: for every `F : V → [0, ∞]` vanishing +outside `B_j`, `∫_{H_j} F(γ_j x') dx' ≤ ∫_Γ F dσ`, since the density `√(1 + ‖∇φ_j‖²)` is at least +`1` (`Rd.LipschitzGraph.one_le_ofReal_gram`). -/ +theorem lintegral_chart_le (j : Fin Ω.N) (F : V → ℝ≥0∞) + (hF : ∀ y, F y ≠ 0 → y ∈ ball (Ω.center j) (Ω.radius j)) : + ∫⁻ x', F ((Ω.graph j).graphMap x') ≤ ∫⁻ y, F y ∂Ω.surfaceMeasure := by + rw [Ω.lintegral_surfaceMeasure_of_support j F hF] + exact lintegral_mono fun x' => le_mul_of_one_le_right' ((Ω.graph j).one_le_ofReal_gram x') + +/-- **Integrals over `Γ` by the chart**: for every `F : V → [0, ∞]` vanishing outside `B_j`, +`∫_Γ F dσ ≤ √(1 + M_j²) ∫_{H_j} F(γ_j x') dx'` (`Rd.LipschitzGraph.gram_le`). -/ +theorem lintegral_le_chart (j : Fin Ω.N) (F : V → ℝ≥0∞) + (hF : ∀ y, F y ≠ 0 → y ∈ ball (Ω.center j) (Ω.radius j)) : + ∫⁻ y, F y ∂Ω.surfaceMeasure ≤ + ENNReal.ofReal √(1 + (Ω.graph j).M ^ 2) * ∫⁻ x', F ((Ω.graph j).graphMap x') := by + rw [Ω.lintegral_surfaceMeasure_of_support j F hF, + ← lintegral_const_mul' _ _ ENNReal.ofReal_ne_top] + refine lintegral_mono fun x' => ?_ + rw [mul_comm] + exact mul_le_mul' (ENNReal.ofReal_le_ofReal ((Ω.graph j).gram_le x')) le_rfl + +/-- **Complex integrals over a boundary ball in the chart**: for every `F : V → ℂ` vanishing outside +`B_j`, `∫_Γ F dσ = ∫_{H_j} F(γ_j x') √(1 + ‖∇φ_j(x')‖²) dx'`, by the area formula for the graph of +`φ_j` (`Rd.LipschitzGraph.integral_graphMap`). -/ +theorem integral_surfaceMeasure_of_support (j : Fin Ω.N) (F : V → ℂ) + (hF : ∀ y, F y ≠ 0 → y ∈ ball (Ω.center j) (Ω.radius j)) : + ∫ y, F y ∂Ω.surfaceMeasure = + ∫ x', F ((Ω.graph j).graphMap x') * ((Ω.graph j).gram x' : ℂ) := by + have h : ∀ y, y ∉ ball (Ω.center j) (Ω.radius j) → F y = 0 := fun y hy => + by_contra fun h => hy (hF y h) + rw [← setIntegral_eq_integral_of_forall_compl_eq_zero h, surfaceMeasure_restrict_ball, + setIntegral_eq_integral_of_forall_compl_eq_zero h, LipschitzGraph.integral_graphMap] + +/-- **Two charts give the same integral**: for every `F : V → [0, ∞]` vanishing outside +`B_j ∩ B_k`, `∫_{H_j} F(γ_j x') √(1 + ‖∇φ_j‖²) dx' = ∫_{H_k} F(γ_k y') √(1 + ‖∇φ_k‖²) dy'`; both +are `∫_Γ F dσ`. -/ +theorem lintegral_chart_eq (j k : Fin Ω.N) (F : V → ℝ≥0∞) + (hF : ∀ y, F y ≠ 0 → + y ∈ ball (Ω.center j) (Ω.radius j) ∩ ball (Ω.center k) (Ω.radius k)) : + ∫⁻ x', F ((Ω.graph j).graphMap x') * ENNReal.ofReal ((Ω.graph j).gram x') = + ∫⁻ y', F ((Ω.graph k).graphMap y') * ENNReal.ofReal ((Ω.graph k).gram y') := by + rw [← Ω.lintegral_surfaceMeasure_of_support j F fun y hy => (hF y hy).1, + Ω.lintegral_surfaceMeasure_of_support k F fun y hy => (hF y hy).2] + +omit [FiniteDimensional ℝ V] in +/-- **The surface measure as a sum over the charts**: for every resolution of unity `ψ` with +`ψ_j ≥ 0` on `Γ`, `σ = ∑_j ψ_j σ`, the sum of the measures with the densities `ψ_j`, since +`∑_j ψ_j = 1` on `Γ` and `σ` is carried by `Γ`. -/ +theorem surfaceMeasure_eq_sum_withDensity (ψ : Ω.BoundaryPartition) + (hψ : ∀ j, ∀ y ∈ frontier Ω.carrier, 0 ≤ ψ.toFun j y) : + Ω.surfaceMeasure = + Measure.sum fun j => Ω.surfaceMeasure.withDensity fun y => ENNReal.ofReal (ψ.toFun j y) := by + rw [← withDensity_tsum fun j => (ψ.contDiff j).continuous.measurable.ennreal_ofReal] + conv_lhs => rw [← withDensity_one (μ := Ω.surfaceMeasure)] + refine withDensity_congr_ae (Ω.ae_mem_frontier.mono fun y hy => ?_) + rw [ENNReal.tsum_apply, tsum_fintype, ← ENNReal.ofReal_sum_of_nonneg fun j _ => hψ j y hy, + ψ.sum_eq_one y hy, ENNReal.ofReal_one, Pi.one_apply] + +/-- **The surface measure in the charts**: for every resolution of unity `ψ` on the boundary with +`ψ_j ≥ 0` on `Γ` and every `F : V → [0, ∞]`, +`∫_Γ F dσ = ∑_j ∫_{H_j} ψ_j(γ_j x') F(γ_j x') √(1 + ‖∇φ_j(x')‖²) dx'`. By +`Rd.BoundedLipschitzDomain.surfaceMeasure_eq_sum_withDensity`, `∫_Γ F dσ = ∑_j ∫_Γ ψ_j F dσ`, and +`ψ_j F` vanishes outside `B_j` (`Rd.BoundedLipschitzDomain.lintegral_surfaceMeasure_of_support`). +It holds for every `F`, measurable or not. -/ +theorem lintegral_surfaceMeasure (ψ : Ω.BoundaryPartition) + (hψ : ∀ j, ∀ y ∈ frontier Ω.carrier, 0 ≤ ψ.toFun j y) (F : V → ℝ≥0∞) : + ∫⁻ y, F y ∂Ω.surfaceMeasure = ∑ j, ∫⁻ x', ENNReal.ofReal (ψ.toFun j ((Ω.graph j).graphMap x')) * + F ((Ω.graph j).graphMap x') * ENNReal.ofReal ((Ω.graph j).gram x') := by + conv_lhs => rw [Ω.surfaceMeasure_eq_sum_withDensity ψ hψ] + rw [lintegral_sum_measure, tsum_fintype] + refine Finset.sum_congr rfl fun j _ => ?_ + rw [lintegral_withDensity_eq_lintegral_mul_non_measurable _ + (ψ.contDiff j).continuous.measurable.ennreal_ofReal + (ae_of_all _ fun _ => ENNReal.ofReal_lt_top)] + refine Ω.lintegral_surfaceMeasure_of_support j _ fun y hy => ψ.mem_ball_of_ne_zero fun h => hy ?_ + rw [Pi.mul_apply, h, ENNReal.ofReal_zero, zero_mul] + +omit [FiniteDimensional ℝ V] in +/-- On `Γ`, `g = ∑_j ψ_j g` almost everywhere for the surface measure, since `∑_j ψ_j = 1` on `Γ` +and `σ` is carried by `Γ`. -/ +theorem ae_eq_sum_mul (ψ : Ω.BoundaryPartition) (g : V → ℂ) : + g =ᵐ[Ω.surfaceMeasure] fun y => ∑ j, ψ.toComplex j y * g y := + Ω.ae_mem_frontier.mono fun y hy => by + dsimp only + rw [← Finset.sum_mul, ψ.sum_toComplex_eq_one hy, one_mul] + +/-- **The surface measure in the charts, for complex integrals**: for every resolution of unity `ψ` +on the boundary, of any sign, and every `σ`-integrable `f : V → ℂ`, +`∫_Γ f dσ = ∑_j ∫_{H_j} ψ_j(γ_j x') f(γ_j x') √(1 + ‖∇φ_j(x')‖²) dx'`. On `Γ`, `f = ∑_j ψ_j f`; +each `ψ_j f` is integrable since `ψ_j` is bounded, and vanishes outside `B_j` +(`Rd.BoundedLipschitzDomain.integral_surfaceMeasure_of_support`). -/ +theorem integral_surfaceMeasure (ψ : Ω.BoundaryPartition) {f : V → ℂ} + (hf : Integrable f Ω.surfaceMeasure) : + ∫ y, f y ∂Ω.surfaceMeasure = ∑ j, ∫ x', ψ.toComplex j ((Ω.graph j).graphMap x') * + f ((Ω.graph j).graphMap x') * ((Ω.graph j).gram x' : ℂ) := by + have hsum : ∫ y, f y ∂Ω.surfaceMeasure = + ∫ y, ∑ j, ψ.toComplex j y * f y ∂Ω.surfaceMeasure := + integral_congr_ae (Ω.ae_eq_sum_mul ψ f) + rw [hsum, integral_finsetSum _ fun j _ => hf.bdd_mul + (ψ.contDiff_toComplex j).continuous.aestronglyMeasurable + (ae_of_all _ (norm_le_of_iteratedFDeriv_le (ψ.derivBound_spec j)))] + refine Finset.sum_congr rfl fun j _ => ?_ + exact Ω.integral_surfaceMeasure_of_support j (fun y => ψ.toComplex j y * f y) fun y hy => + ψ.mem_ball_of_ne_zero fun h => hy (by simp [BoundaryPartition.toComplex, h]) + +/-- **Integrals over the boundary are at most the sum of the chart integrals**: for every +`F : V → [0, ∞]`, `∫_Γ F dσ ≤ ∑_j ∫_{H_j} (1_{B_j} F)(γ_j x') √(1 + ‖∇φ_j(x')‖²) dx'`, since the +balls `B_j` cover `Γ`. It holds for every `F`, measurable or not. -/ +theorem lintegral_surfaceMeasure_le_sum (F : V → ℝ≥0∞) : + ∫⁻ y, F y ∂Ω.surfaceMeasure ≤ ∑ j, ∫⁻ x', (ball (Ω.center j) (Ω.radius j)).indicator F + ((Ω.graph j).graphMap x') * ENNReal.ofReal ((Ω.graph j).gram x') := by + have hcov : Ω.surfaceMeasure.restrict (⋃ j, ball (Ω.center j) (Ω.radius j)) = + Ω.surfaceMeasure := + Measure.restrict_eq_self_of_ae_mem (Ω.ae_mem_frontier.mono fun _ hy => Ω.frontier_subset hy) + calc ∫⁻ y, F y ∂Ω.surfaceMeasure + = ∫⁻ y in ⋃ j, ball (Ω.center j) (Ω.radius j), F y ∂Ω.surfaceMeasure := by rw [hcov] + _ ≤ ∑' j, ∫⁻ y in ball (Ω.center j) (Ω.radius j), F y ∂Ω.surfaceMeasure := + lintegral_iUnion_le _ _ + _ = ∑ j, ∫⁻ y, (ball (Ω.center j) (Ω.radius j)).indicator F y ∂Ω.surfaceMeasure := by + rw [tsum_fintype] + exact Finset.sum_congr rfl fun j _ => (lintegral_indicator measurableSet_ball F).symm + _ = _ := Finset.sum_congr rfl fun j _ => + Ω.lintegral_surfaceMeasure_of_support j _ fun _ hy => mem_of_indicator_ne_zero hy + +/-- **The surface measure is finite**: `σ(Γ) ≤ ∑_j √(1 + M_j²) |γ_j⁻¹(B_j)|`, and the sets +`γ_j⁻¹(B_j) ⊆ H_j` are bounded since the graph maps are antilipschitz. -/ +instance isFiniteMeasure_surfaceMeasure : IsFiniteMeasure Ω.surfaceMeasure := by + refine ⟨(lintegral_one.symm.trans_le (Ω.lintegral_surfaceMeasure_le_sum 1)).trans_lt + (ENNReal.sum_lt_top.2 fun j _ => ?_)⟩ + set A := (Ω.graph j).graphMap ⁻¹' ball (Ω.center j) (Ω.radius j) + have hA : MeasurableSet A := + (Ω.graph j).measurableEmbedding_graphMap.measurable measurableSet_ball + calc ∫⁻ x', (ball (Ω.center j) (Ω.radius j)).indicator 1 ((Ω.graph j).graphMap x') * + ENNReal.ofReal ((Ω.graph j).gram x') + ≤ ∫⁻ x', A.indicator (fun _ => ENNReal.ofReal √(1 + (Ω.graph j).M ^ 2)) x' := by + refine lintegral_mono fun x' => ?_ + by_cases hx : x' ∈ A + · rw [indicator_of_mem hx, indicator_of_mem (show (Ω.graph j).graphMap x' ∈ _ from hx), + Pi.one_apply, one_mul] + exact ENNReal.ofReal_le_ofReal ((Ω.graph j).gram_le x') + · rw [indicator_of_notMem (show (Ω.graph j).graphMap x' ∉ _ from hx), zero_mul] + exact zero_le + _ = ENNReal.ofReal √(1 + (Ω.graph j).M ^ 2) * volume A := lintegral_indicator_const hA _ + _ < ∞ := ENNReal.mul_lt_top ENNReal.ofReal_lt_top + ((Ω.graph j).antilipschitzWith_graphMap.isBounded_preimage isBounded_ball).measure_lt_top + +/-- **Almost everywhere on a boundary ball, in the chart**: a property holds for `σ`-almost every +`y ∈ B_j` iff it holds at `γ_j(x')` for almost every `x' ∈ H_j` with `γ_j(x') ∈ B_j`. The image of +the measure with the density `√(1 + ‖∇φ_j‖²) ≥ 1` under `γ_j` is `μHE[n-1]` on the graph +(`Rd.LipschitzGraph.map_graphMap_withDensity`), and this density has the null sets of the volume. -/ +theorem ae_surfaceMeasure_ball_iff (j : Fin Ω.N) {P : V → Prop} : + (∀ᵐ y ∂Ω.surfaceMeasure, y ∈ ball (Ω.center j) (Ω.radius j) → P y) ↔ + ∀ᵐ x' ∂(volume : Measure (Ω.graph j).hyperplane), + (Ω.graph j).graphMap x' ∈ ball (Ω.center j) (Ω.radius j) → P ((Ω.graph j).graphMap x') := by + rw [← ae_restrict_iff' measurableSet_ball, surfaceMeasure_restrict_ball, + ae_restrict_iff' measurableSet_ball, ← LipschitzGraph.map_graphMap_withDensity, + (Ω.graph j).measurableEmbedding_graphMap.ae_map_iff] + have hac := withDensity_absolutelyContinuous' (μ := (volume : Measure (Ω.graph j).hyperplane)) + (Ω.graph j).measurable_gram.ennreal_ofReal.aemeasurable + (ae_of_all _ fun x' => (ENNReal.ofReal_pos.2 ((Ω.graph j).gram_pos x')).ne') + exact ⟨fun h => hac.ae_le h, fun h => (withDensity_absolutelyContinuous _ _).ae_le h⟩ + +/-- **`σ`-almost everywhere statements in a chart**: if `P` holds `σ`-almost everywhere, then +`P(γ_j x')` holds for almost every `x' ∈ H_j` with `γ_j(x') ∈ B_j` +(`Rd.BoundedLipschitzDomain.ae_surfaceMeasure_ball_iff`). -/ +theorem ae_graphMap_of_ae_surfaceMeasure (j : Fin Ω.N) {P : V → Prop} + (h : ∀ᵐ y ∂Ω.surfaceMeasure, P y) : + ∀ᵐ x' ∂(volume : Measure (Ω.graph j).hyperplane), + (Ω.graph j).graphMap x' ∈ ball (Ω.center j) (Ω.radius j) → P ((Ω.graph j).graphMap x') := + (Ω.ae_surfaceMeasure_ball_iff j).1 (h.mono fun _ hy _ => hy) + +/-- **The null sets of the surface measure are those of the charts**: a property holds +`σ`-almost everywhere iff it holds almost everywhere on the boundary in the sense of the charts +(`Rd.BoundedLipschitzDomain.aeBoundary`), since the balls `B_j` cover `Γ`. -/ +theorem ae_surfaceMeasure_iff_aeBoundary {P : V → Prop} : + (∀ᵐ y ∂Ω.surfaceMeasure, P y) ↔ ∀ᶠ y in Ω.aeBoundary, P y := by + rw [eventually_aeBoundary_iff] + simp_rw [← ae_surfaceMeasure_ball_iff] + refine ⟨fun h j => h.mono fun y hy _ => hy, fun h => ?_⟩ + filter_upwards [ae_all_iff.2 h, Ω.ae_mem_frontier] with y hy hΓ + obtain ⟨j, hj⟩ := mem_iUnion.1 (Ω.frontier_subset hΓ) + exact hy j hj + +/-- **The boundary of a bounded Lipschitz domain is a null set**: `|Γ| = 0`. The set `Γ` has +finite `μHE[n-1]`-measure, hence `μHE[n]`-measure zero (Mathlib's +`MeasureTheory.Measure.euclideanHausdorffMeasure_zero_or_top`), and `μHE[n]` is the volume. -/ +theorem volume_frontier : volume (frontier Ω.carrier) = 0 := by + rcases (frontier Ω.carrier).eq_empty_or_nonempty with h | ⟨y, hy⟩ + · rw [h, measure_empty] + · obtain ⟨j, -⟩ := mem_iUnion.1 (Ω.frontier_subset hy) + have : Nontrivial V := nontrivial_of_ne _ 0 (Ω.graph j).e_ne_zero + have hfin : (μHE[finrank ℝ V - 1] : Measure V) (frontier Ω.carrier) ≠ ∞ := by + have h := measure_ne_top Ω.surfaceMeasure (frontier Ω.carrier) + rwa [surfaceMeasure, Measure.restrict_apply_self] at h + have hlt : finrank ℝ V - 1 < finrank ℝ V := Nat.sub_lt finrank_pos one_pos + rw [← InnerProductSpace.euclideanHausdorffMeasure_eq_volume] + exact ((Measure.euclideanHausdorffMeasure_zero_or_top hlt _).resolve_right hfin) + +/-! ### The boundary trace in `L_p(Γ)` -/ + +section BoundaryLp + +variable {p : ℝ≥0∞} [Fact (1 ≤ p)] + +/-- **The boundary trace is measurable**: `Tr_Γ F = ∑_k ψ_k (Tr_k F ∘ P_k)` is a finite sum of +products of continuous functions with measurable representatives composed with the continuous +projections `P_k`. -/ +theorem stronglyMeasurable_boundaryTrace (ψ : Ω.BoundaryPartition) (hp : p ≠ ∞) (L : ℕ) + (F : Lp ℂ p (volume : Measure V)) : StronglyMeasurable (Ω.boundaryTrace ψ hp L F) := + Finset.stronglyMeasurable_fun_sum _ fun k _ => + (ψ.contDiff_toComplex k).continuous.stronglyMeasurable.mul + ((Lp.stronglyMeasurable _).comp_measurable (Ω.graph k).proj.continuous.measurable) + +/-- **The `L_p(Γ)` bound of the boundary trace**: under the hypotheses of the trace theorem, +`∫_Γ |Tr_Γ F|^p dσ ≤ ∑_j √(1 + M_j²) ‖Tr_j F‖_{L_p(H_j)}^p`, with the Lipschitz constants `M_j` +of the charts. In the chart `j`, `Tr_Γ F ∘ γ_j = Tr_j F` almost everywhere on `γ_j⁻¹(B_j)` +(`Rd.BoundedLipschitzDomain.boundaryTrace_graphMap`) and the Gram density is at most +`√(1 + M_j²)` (`Rd.LipschitzGraph.gram_le`). -/ +theorem lintegral_enorm_boundaryTrace_le (ψ : Ω.BoundaryPartition) (hp : p ≠ ∞) {L : ℕ} + (hL : 1 ≤ L) {s : ℝ} (hs : 0 < s) (hsL : s + 1 / p.toReal < L) {q : ℝ≥0∞} (hq : 1 ≤ q) + {F : Lp ℂ p (volume : Measure V)} + (hF : ‖F‖ₑ + lqNorm q (fun k => + dyadicWeight (s + 1 / p.toReal) k * lpModulus p L F k) < ∞) : + ∫⁻ y, ‖Ω.boundaryTrace ψ hp L F y‖ₑ ^ p.toReal ∂Ω.surfaceMeasure ≤ + ∑ j, ENNReal.ofReal √(1 + (Ω.graph j).M ^ 2) * + ∫⁻ x', ‖(Ω.graph j).trace hp L F x'‖ₑ ^ p.toReal := by + refine (Ω.lintegral_surfaceMeasure_le_sum _).trans (Finset.sum_le_sum fun j _ => ?_) + rw [← lintegral_const_mul' _ _ ENNReal.ofReal_ne_top] + refine lintegral_mono_ae ((Ω.boundaryTrace_graphMap ψ hp hL hs hsL hq hF j).mono + fun x' hx => ?_) + by_cases hb : (Ω.graph j).graphMap x' ∈ ball (Ω.center j) (Ω.radius j) + · rw [indicator_of_mem hb, hx hb, mul_comm] + exact mul_le_mul' (ENNReal.ofReal_le_ofReal ((Ω.graph j).gram_le x')) le_rfl + · rw [indicator_of_notMem hb, zero_mul] + exact zero_le + +/-- **The boundary trace lies in `L_p(Γ)`**: under the hypotheses of the trace theorem, +`Tr_Γ F ∈ L_p(σ)` (`Rd.BoundedLipschitzDomain.lintegral_enorm_boundaryTrace_le`, and +`Tr_j F ∈ L_p(H_j)`). -/ +theorem memLp_boundaryTrace (ψ : Ω.BoundaryPartition) (hp : p ≠ ∞) {L : ℕ} + (hL : 1 ≤ L) {s : ℝ} (hs : 0 < s) (hsL : s + 1 / p.toReal < L) {q : ℝ≥0∞} (hq : 1 ≤ q) + {F : Lp ℂ p (volume : Measure V)} + (hF : ‖F‖ₑ + lqNorm q (fun k => + dyadicWeight (s + 1 / p.toReal) k * lpModulus p L F k) < ∞) : + MemLp (Ω.boundaryTrace ψ hp L F) p Ω.surfaceMeasure := by + have hp0 : p ≠ 0 := (zero_lt_one.trans_le (Fact.out : 1 ≤ p)).ne' + refine memLp_iff.2 ((eLpNorm_lt_top_iff_lintegral_rpow_eNorm_lt_top hp0 hp + (Ω.stronglyMeasurable_boundaryTrace ψ hp L F).aestronglyMeasurable).2 + ((Ω.lintegral_enorm_boundaryTrace_le ψ hp hL hs hsL hq hF).trans_lt + (ENNReal.sum_lt_top.2 fun j _ => ENNReal.mul_lt_top ENNReal.ofReal_lt_top ?_))) + exact lintegral_rpow_eNorm_lt_top_of_eLpNorm_lt_top hp0 hp (Lp.memLp _).eLpNorm_lt_top + +end BoundaryLp + +/-! ### `L_2(Γ)` and the trace of `H^1` -/ + +/-- **The space `L_2(Γ)`** of square integrable functions on the boundary with respect to the +surface measure. -/ +noncomputable abbrev BoundaryL2 := Lp ℂ 2 Ω.surfaceMeasure + +/-- **The boundary trace of `H^1(V)` lies in `L_2(Γ)`**: for every resolution of unity `ψ` and +`U ∈ H^1(V)`, `Tr_Γ ι U ∈ L_2(σ)` (`Rd.BoundedLipschitzDomain.memLp_boundaryTrace` at +`s = 1/2`, `p = q = 2`, `L = 2`). -/ +theorem memLp_boundaryTrace_toL2 (ψ : Ω.BoundaryPartition) (U : H^{1}(V)) : + MemLp (Ω.boundaryTrace ψ two_ne_top 2 (toL2 U)) 2 Ω.surfaceMeasure := + Ω.memLp_boundaryTrace ψ two_ne_top one_le_two (s := 1 / 2) (by norm_num) (by norm_num) + one_le_two (modNorm_toL2_lt_top U) + +/-- **The `L_2(Γ)` bound of the trace of `H^1(V)`**: `‖Tr_Γ ι U‖_{L_2(Γ)} ≤ C ‖U‖` for every +resolution of unity and every `U ∈ H^1(V)`, with +`C = (∑_j √(1 + M_j²) K_j²)^(1/2)` for the constants `K_j` of the chart traces +(`Rd.LipschitzGraph.exists_enorm_trace_toL2_le`, +`Rd.BoundedLipschitzDomain.lintegral_enorm_boundaryTrace_le`). -/ +theorem exists_eLpNorm_boundaryTrace_toL2_le : + ∃ C : ℝ≥0∞, C ≠ ∞ ∧ ∀ (ψ : Ω.BoundaryPartition) (U : H^{1}(V)), + eLpNorm (Ω.boundaryTrace ψ two_ne_top 2 (toL2 U)) 2 Ω.surfaceMeasure ≤ C * ‖U‖ₑ := by + choose K hK hle using fun j => (Ω.graph j).exists_enorm_trace_toL2_le + refine ⟨(∑ j, ENNReal.ofReal √(1 + (Ω.graph j).M ^ 2) * K j ^ (2 : ℝ)) ^ (1 / 2 : ℝ), + ENNReal.rpow_ne_top_of_nonneg (by norm_num) (ENNReal.sum_ne_top.2 fun j _ => + ENNReal.mul_ne_top ENNReal.ofReal_ne_top + (ENNReal.rpow_ne_top_of_nonneg (by norm_num) (hK j))), fun ψ U => ?_⟩ + have hj : ∀ j, ∫⁻ x', ‖(Ω.graph j).trace two_ne_top 2 (toL2 U) x'‖ₑ ^ (2 : ℝ≥0∞).toReal ≤ + K j ^ (2 : ℝ) * ‖U‖ₑ ^ (2 : ℝ) := fun j => by + rw [ENNReal.toReal_ofNat, lintegral_rpow_eNorm_eq_rpow_eLpNorm' two_pos, + ← ENNReal.mul_rpow_of_nonneg _ _ (by norm_num)] + refine ENNReal.rpow_le_rpow ((le_of_eq ?_).trans (hle j U)) (by norm_num) + rw [Lp.eNorm_def, eLpNorm_eq_eLpNorm' two_ne_zero two_ne_top (Lp.aestronglyMeasurable _), + ENNReal.toReal_ofNat] + have hsum := (Ω.lintegral_enorm_boundaryTrace_le ψ two_ne_top one_le_two (s := 1 / 2) + (by norm_num) (by norm_num) one_le_two (modNorm_toL2_lt_top U)).trans + (Finset.sum_le_sum fun j _ => mul_le_mul' le_rfl (hj j)) + rw [eLpNorm_eq_lintegral_rpow_eNorm_toReal two_ne_zero two_ne_top + (Ω.stronglyMeasurable_boundaryTrace ψ two_ne_top 2 _).aestronglyMeasurable] + calc (∫⁻ y, ‖Ω.boundaryTrace ψ two_ne_top 2 (toL2 U) y‖ₑ ^ (2 : ℝ≥0∞).toReal + ∂Ω.surfaceMeasure) ^ (1 / (2 : ℝ≥0∞).toReal) + ≤ (∑ j, ENNReal.ofReal √(1 + (Ω.graph j).M ^ 2) * (K j ^ (2 : ℝ) * ‖U‖ₑ ^ (2 : ℝ))) ^ + (1 / 2 : ℝ) := by + rw [ENNReal.toReal_ofNat] + exact ENNReal.rpow_le_rpow hsum (by norm_num) + _ = _ := by + simp_rw [← mul_assoc] + rw [← Finset.sum_mul, ENNReal.mul_rpow_of_nonneg _ _ (by norm_num), + ← ENNReal.rpow_mul] + norm_num + +/-- `Tr_Γ ι (U + W) = Tr_Γ ι U + Tr_Γ ι W` almost everywhere on `Γ`, for every resolution of unity +(`Rd.BoundedLipschitzDomain.boundaryTrace_toL2_sub`). -/ +theorem boundaryTrace_toL2_add (ψ : Ω.BoundaryPartition) (U W : H^{1}(V)) : + Ω.boundaryTrace ψ two_ne_top 2 (toL2 (U + W)) =ᶠ[Ω.aeBoundary] + Ω.boundaryTrace ψ two_ne_top 2 (toL2 U) + Ω.boundaryTrace ψ two_ne_top 2 (toL2 W) := by + have h := Ω.boundaryTrace_toL2_sub ψ (U + W) W + rw [add_sub_cancel_right] at h + filter_upwards [h] with y hy + rw [Pi.add_apply, hy, Pi.sub_apply, sub_add_cancel] + +/-- `Tr_Γ ι (c U) = c Tr_Γ ι U` almost everywhere on `Γ`, for every resolution of unity: in each +chart the boundary trace is the trace of the graph domain +(`Rd.BoundedLipschitzDomain.boundaryTrace_graphMap`), which is homogeneous +(`Rd.LipschitzGraph.trace_smul`). -/ +theorem boundaryTrace_toL2_smul (ψ : Ω.BoundaryPartition) (c : ℂ) (U : H^{1}(V)) : + Ω.boundaryTrace ψ two_ne_top 2 (toL2 (c • U)) =ᶠ[Ω.aeBoundary] + c • Ω.boundaryTrace ψ two_ne_top 2 (toL2 U) := by + refine Ω.eventually_aeBoundary_iff.2 fun j => ?_ + have hG := fun G : H^{1}(V) => Ω.boundaryTrace_graphMap ψ two_ne_top one_le_two (s := 1 / 2) + (by norm_num) (by norm_num) one_le_two (modNorm_toL2_lt_top G) j + filter_upwards [hG (c • U), hG U, + Lp.coeFn_smul c ((Ω.graph j).trace two_ne_top 2 (toL2 U))] with x' h1 h2 h3 hj + rw [Pi.smul_apply, h1 hj, h2 hj, map_smul, (Ω.graph j).trace_smul, h3, Pi.smul_apply] + +/-- **The trace of `H^1(V)` in `L_2(Γ)` as a linear map**: `U ↦ Tr_Γ ι U`, with the canonical +resolution of unity. -/ +noncomputable def ambientTraceLinear : H^{1}(V) →ₗ[ℂ] Ω.BoundaryL2 where + toFun U := (Ω.memLp_boundaryTrace_toL2 Ω.boundaryPartition U).toLp _ + map_add' U W := by + rw [← MemLp.toLp_add, MemLp.toLp_eq_toLp_iff] + exact Ω.ae_surfaceMeasure_iff_aeBoundary.2 (Ω.boundaryTrace_toL2_add _ U W) + map_smul' c U := by + rw [RingHom.id_apply, ← MemLp.toLp_const_smul, MemLp.toLp_eq_toLp_iff] + exact Ω.ae_surfaceMeasure_iff_aeBoundary.2 (Ω.boundaryTrace_toL2_smul _ c U) + +/-- **The trace of `H^1(V)` on `Γ`** as a bounded operator `H^1(V) → L_2(Γ)`, `U ↦ Tr_Γ ι U` +(`Rd.BoundedLipschitzDomain.exists_eLpNorm_boundaryTrace_toL2_le`). -/ +noncomputable def ambientTraceL2 : H^{1}(V) →L[ℂ] Ω.BoundaryL2 := + Ω.ambientTraceLinear.mkContinuousOfExistsBound (by + obtain ⟨C, hC, hle⟩ := Ω.exists_eLpNorm_boundaryTrace_toL2_le + refine ⟨C.toReal, fun U => ?_⟩ + change ‖(Ω.memLp_boundaryTrace_toL2 Ω.boundaryPartition U).toLp _‖ ≤ _ + rw [Lp.norm_toLp, ← toReal_eNorm U, ← ENNReal.toReal_mul] + exact ENNReal.toReal_mono (ENNReal.mul_ne_top hC eNorm_ne_top) (hle _ U)) + +/-- The trace of `U ∈ H^1(V)` in `L_2(Γ)` is the boundary trace `Tr_Γ ι U` almost everywhere on +`Γ`, for every resolution of unity (`Rd.BoundedLipschitzDomain.boundaryTrace_eventuallyEq`). -/ +theorem ambientTraceL2_apply_ae (ψ : Ω.BoundaryPartition) (U : H^{1}(V)) : + (Ω.ambientTraceL2 U : V → ℂ) =ᵐ[Ω.surfaceMeasure] + Ω.boundaryTrace ψ two_ne_top 2 (toL2 U) := + (MemLp.coeFn_toLp (Ω.memLp_boundaryTrace_toL2 Ω.boundaryPartition U)).trans + (Ω.ae_surfaceMeasure_iff_aeBoundary.2 + (Ω.boundaryTrace_eventuallyEq Ω.boundaryPartition ψ two_ne_top one_le_two (s := 1 / 2) + (by norm_num) (by norm_num) one_le_two (modNorm_toL2_lt_top U))) + +/-- **The trace `H^{1/2}(Γ) → L_2(Γ)`**: an element `t` of the trace space goes to the boundary +trace of its extension `E t ∈ H^1(Ω)`. It is injective +(`Rd.BoundedLipschitzDomain.traceL2_injective`). -/ +noncomputable def traceL2 : Ω.TraceSpace →L[ℂ] Ω.BoundaryL2 := + Ω.ambientTraceL2 ∘L (vanishOn 1 Ω.toOpens)ᗮ.subtypeL ∘L Ω.extend + +/-- `traceL2 t = Tr_Γ ι (E t)` almost everywhere on `Γ`, for every resolution of unity. -/ +theorem traceL2_apply_ae (ψ : Ω.BoundaryPartition) (t : Ω.TraceSpace) : + (Ω.traceL2 t : V → ℂ) =ᵐ[Ω.surfaceMeasure] + Ω.boundaryTrace ψ two_ne_top 2 (toL2 ((Ω.extend t : Ω.SobolevOne) : H^{1}(V))) := + Ω.ambientTraceL2_apply_ae ψ _ + +/-- **The trace `H^{1/2}(Γ) → L_2(Γ)` is injective**: elements of the trace space with the same +boundary trace almost everywhere on `Γ` are equal +(`Rd.BoundedLipschitzDomain.boundaryTrace_extend_eventuallyEq_iff`), and `σ`-null sets are the +null sets of the charts (`Rd.BoundedLipschitzDomain.ae_surfaceMeasure_iff_aeBoundary`). -/ +theorem traceL2_injective : Function.Injective Ω.traceL2 := by + intro t t' h + have h1 := Ω.traceL2_apply_ae Ω.boundaryPartition t + rw [h] at h1 + exact (Ω.boundaryTrace_extend_eventuallyEq_iff Ω.boundaryPartition t t').1 + (Ω.ae_surfaceMeasure_iff_aeBoundary.1 (h1.symm.trans (Ω.traceL2_apply_ae _ t'))) + +/-- **The trace `γ_{L_2} : H^1(Ω) → L_2(Γ)`**: the trace `γ` onto `H^{1/2}(Γ)` followed by the +trace `H^{1/2}(Γ) → L_2(Γ)`. Its kernel is the trace kernel +(`Rd.BoundedLipschitzDomain.ker_boundaryTraceL2`). -/ +noncomputable def boundaryTraceL2 : Ω.SobolevOne →L[ℂ] Ω.BoundaryL2 := + Ω.traceL2 ∘L Ω.trace + +/-- **`γ_{L_2} u` is the boundary trace of `u`**: `γ_{L_2} u = Tr_Γ ι u` almost everywhere on `Γ`, +for every resolution of unity (`Rd.BoundedLipschitzDomain.boundaryTrace_extend_trace`). -/ +theorem boundaryTraceL2_apply_ae (ψ : Ω.BoundaryPartition) (u : Ω.SobolevOne) : + (Ω.boundaryTraceL2 u : V → ℂ) =ᵐ[Ω.surfaceMeasure] + Ω.boundaryTrace ψ two_ne_top 2 (toL2 (u : H^{1}(V))) := + (Ω.traceL2_apply_ae ψ (Ω.trace u)).trans + (Ω.ae_surfaceMeasure_iff_aeBoundary.2 (Ω.boundaryTrace_extend_trace ψ u)) + +/-- **`γ_{L_2} u` is the trace of `u` read in `H^1(V)`**: `boundaryTraceL2 u = ambientTraceL2 u` +for every `u ∈ H^1(Ω)`; both are the boundary trace `Tr_Γ ι u` almost everywhere on `Γ` +(`Rd.BoundedLipschitzDomain.boundaryTraceL2_apply_ae`, +`Rd.BoundedLipschitzDomain.ambientTraceL2_apply_ae`). -/ +theorem boundaryTraceL2_eq_ambientTraceL2 (u : Ω.SobolevOne) : + Ω.boundaryTraceL2 u = Ω.ambientTraceL2 (u : H^{1}(V)) := + Lp.ext ((Ω.boundaryTraceL2_apply_ae Ω.boundaryPartition u).trans + (Ω.ambientTraceL2_apply_ae Ω.boundaryPartition _).symm) + +/-- **The kernel of `γ_{L_2} : H^1(Ω) → L_2(Γ)` is the trace kernel**: `γ_{L_2} u = 0` in +`L_2(Γ)` iff the boundary trace of `u` vanishes almost everywhere on `Γ` +(`Rd.BoundedLipschitzDomain.mem_traceKer_iff`). -/ +theorem ker_boundaryTraceL2 : (Ω.boundaryTraceL2).ker = Ω.traceKer := by + ext u + rw [LinearMap.mem_ker, Lp.eq_zero_iff_ae_eq_zero, Ω.mem_traceKer_iff Ω.boundaryPartition] + have h := Ω.boundaryTraceL2_apply_ae Ω.boundaryPartition u + exact ⟨fun h0 => Ω.ae_surfaceMeasure_iff_aeBoundary.1 (h.symm.trans h0), + fun h0 => h.trans (Ω.ae_surfaceMeasure_iff_aeBoundary.2 h0)⟩ + +/-- **The functions of `B^{1/2}_{2,2}(Γ)` are traces in `L_2(Γ)`**: for every resolution of unity +`ψ` and `g ∈ B^{1/2}_{2,2}(Γ)` there is `t ∈ H^{1/2}(Γ)` with `traceL2 t = g` almost everywhere on +`Γ` (`Rd.BoundedLipschitzDomain.exists_traceSpace_of_memBoundaryBesov`). -/ +theorem exists_traceL2_ae_eq (ψ : Ω.BoundaryPartition) {g : V → ℂ} + (hg : Ω.MemBoundaryBesov 2 ψ (1 / 2) 2 g) : + ∃ t : Ω.TraceSpace, (Ω.traceL2 t : V → ℂ) =ᵐ[Ω.surfaceMeasure] g := by + obtain ⟨t, ht⟩ := Ω.exists_traceSpace_of_memBoundaryBesov ψ hg + exact ⟨t, (Ω.traceL2_apply_ae ψ t).trans (Ω.ae_surfaceMeasure_iff_aeBoundary.2 ht)⟩ + +/-- **`B^{1/2}_{2,2}(Γ) ⊆ L_2(Γ)`**: every `g ∈ B^{1/2}_{2,2}(Γ)` is square integrable with respect +to the surface measure (`Rd.BoundedLipschitzDomain.exists_traceL2_ae_eq`). -/ +theorem memLp_of_memBoundaryBesov (ψ : Ω.BoundaryPartition) {g : V → ℂ} + (hg : Ω.MemBoundaryBesov 2 ψ (1 / 2) 2 g) : MemLp g 2 Ω.surfaceMeasure := by + obtain ⟨t, ht⟩ := Ω.exists_traceL2_ae_eq ψ hg + exact (Lp.memLp _).ae_eq ht + +/-! ### The unit normal -/ + +/-- **The outward unit normal field** `ν(y) = ∑_j ψ_j(y) ν_j(P_j y)` of `Ω`, pasted from the +outward unit normals `ν_j` of the charts (`Rd.LipschitzGraph.normalAt`) with the canonical +resolution of unity `ψ = Rd.BoundedLipschitzDomain.boundaryPartition`, which is nonnegative. It +is defined on all of `V`, measurable and of norm at most `1`; for `y ∈ Γ` it is a convex +combination of the chart normals `ν_j(P_j y)` with `ψ_j(y) > 0`. On each boundary ball `B_j` it +is the chart normal `ν_j(P_j y)` for `σ`-almost every `y`, by the Gauss–Green theorem in two +charts (`Rd.BoundedLipschitzDomain.normal_ae_eq_normalAt`). -/ +noncomputable def normal (y : V) : V := + ∑ j, Ω.boundaryPartition.toFun j y • (Ω.graph j).normalAt ((Ω.graph j).proj y) + +/-- The unit normal field is measurable. -/ +theorem measurable_normal : Measurable Ω.normal := + Finset.measurable_fun_sum _ fun j _ => + (Ω.boundaryPartition.contDiff j).continuous.measurable.smul + ((Ω.graph j).measurable_normalAt.comp (Ω.graph j).proj.continuous.measurable) + +omit [MeasurableSpace V] [BorelSpace V] in +/-- The unit normal field has norm at most `1`: `‖ν(y)‖ ≤ ∑_j ψ_j(y) ≤ 1`. -/ +theorem norm_normal_le (y : V) : ‖Ω.normal y‖ ≤ 1 := by + calc ‖Ω.normal y‖ ≤ ∑ j, ‖Ω.boundaryPartition.toFun j y • (Ω.graph j).normalAt + ((Ω.graph j).proj y)‖ := norm_sum_le _ _ + _ = ∑ j, Ω.boundaryPartition.toFun j y := Finset.sum_congr rfl fun j _ => by + rw [norm_smul, (Ω.graph j).norm_normalAt, mul_one] + exact Real.norm_of_nonneg (Ω.boundaryPartition_nonneg j y) + _ ≤ 1 := Ω.sum_boundaryPartition_le_one y + +end BoundedLipschitzDomain + +end Rd diff --git a/LeanPool/FunctionSpaces/Domains/Manifolds/Besov.lean b/LeanPool/FunctionSpaces/Domains/Manifolds/Besov.lean new file mode 100644 index 0000000000..30ba28968f --- /dev/null +++ b/LeanPool/FunctionSpaces/Domains/Manifolds/Besov.lean @@ -0,0 +1,438 @@ +/- +Copyright (c) 2026 Mario Ullrich. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Mario Ullrich +-/ +module + +public import LeanPool.FunctionSpaces.Domains.Manifolds.BesovAtlas + +/- +Modified for Lean Pool: module names and imports adapted. +-/ + +/-! +# Besov spaces on compact manifolds + +Let `M` be a compact manifold with model `I` whose range `Ω = range I` is a Besov domain (the +half-space for manifolds with boundary, the quadrant `{y : ∀ i, 0 ≤ y_i}` for manifolds with +corners, `E` for manifolds without boundary), `μ` a smooth measure and `1 ≤ p < ∞`. For a +Besov atlas `A` with charts `κ_i` and partition of unity `ψ_i`, the **Besov quasi-norm** of +`f ∈ L_p(μ)` is the sum of the intrinsic quasi-norms of the chart pieces +(`Manifold.BesovAtlas.besovNorm`): + +`‖f‖_{A, r, s, q} = ∑_i N_Ω((ψ_i f) ∘ κ_i⁻¹)`, +`N_Ω(G) = ‖1_Ω G‖_p + ‖(2^(ks) ω_r(G, 2^(-k), Ω)_p)_k‖_{ℓ_q}`. + +Each term `N_Ω((ψ_i f) ∘ κ_i⁻¹)` is at most `‖f‖_{A, r, s, q}` +(`Manifold.BesovAtlas.modNormOn_pieceLp_le_besovNorm`). + +**Independence of the atlas** (`Manifold.BesovAtlas.besovNorm_le_besovNorm`): for two Besov +atlases and `0 < s < r` there is `C < ∞` with `‖f‖_{A} ≤ C ‖f‖_{A'}`. The pieces of `A` are +finite sums of the pieces of `A'` transported by the changes of charts with cut-offs +(`Manifold.BesovAtlas.pieceLp_eq_sum`), the intrinsic quasi-norm is subadditive +(`Rd.modNormOn_finsetSum_le`), and the changes of charts are bounded on the Besov domain `Ω` +(`Rd.CutoffDiffeo.modNormOn_applyLp_le_modNormOn`). The order `r > s` does not matter either +(`Manifold.BesovAtlas.memBesov_iff_besovNorm_lt_top`), so the **Besov space** +`B^s_{p,q}(M) = {f : ‖f‖_{A, ⌊s⌋+1, s, q} < ∞}` (`Manifold.MemBesov`) depends on no choice +(`Manifold.memBesov_iff`). + +Membership is a condition on each piece: `f ∈ B^s_{p,q}` for `A` iff every piece has a finite +intrinsic quasi-norm (`Manifold.BesovAtlas.memBesov_iff_forall_modNormOn_lt_top`). + +**Lifts from a chart**: the lift `L_k F = θ_k · F ∘ κ_k` is linear on `L_p(E)` +(`Manifold.BesovAtlas.chartLiftLp_add`, `Manifold.BesovAtlas.chartLiftLp_smul`), and for +`F ∈ B^s_{p,q}(E)` it lies in `B^s_{p,q}(M)` (`Manifold.BesovAtlas.memBesov_chartLiftLp`), since +its pieces are the images `T_{ik} F` under the changes of charts +(`Manifold.BesovAtlas.pieceLp_chartLiftLp`). + +**Manifolds with corners**: the range of Mathlib's model `modelWithCornersEuclideanQuadrant n` is a +Besov domain (`Rd.BesovDomain.range_euclideanQuadrant` in +`FunctionSpaces.Domains.Lipschitz.BesovDomains`), so all of this holds for compact manifolds with +corners modelled on the quadrant. +-/ + +@[expose] public section + +open MeasureTheory Set Filter Topology +open scoped ENNReal Manifold ContDiff + +open ENNReal (lqNorm dyadicWeight) + +namespace Manifold + +variable {E : Type*} [NormedAddCommGroup E] [InnerProductSpace ℝ E] [FiniteDimensional ℝ E] + [MeasurableSpace E] [BorelSpace E] {H : Type*} [TopologicalSpace H] + {I : ModelWithCorners ℝ E H} {M : Type*} [TopologicalSpace M] [ChartedSpace H M] + [MeasurableSpace M] [BorelSpace M] [CompactSpace M] {μ : Measure M} [IsSmoothMeasure I μ] + [hB : Rd.BesovDomain (range I)] {p : ℝ≥0∞} [Fact (1 ≤ p)] (hp : p ≠ ⊤) + +namespace BesovAtlas + +variable (A : BesovAtlas I M) + +/-! ### Linearity of the pieces -/ + +omit [FiniteDimensional ℝ E] [MeasurableSpace E] [BorelSpace E] [MeasurableSpace M] + [BorelSpace M] [CompactSpace M] hB in +/-- The pieces are additive. -/ +theorem piece_add (i : Fin A.n) (g₁ g₂ : M → ℂ) : + A.piece i (g₁ + g₂) = A.piece i g₁ + A.piece i g₂ := by + funext y + by_cases hy : y ∈ (A.ext i).target + · simp only [piece, indicator_of_mem hy, Pi.add_apply, mul_add] + · simp only [piece, indicator_of_notMem hy, Pi.add_apply, add_zero] + +omit [FiniteDimensional ℝ E] [MeasurableSpace E] [BorelSpace E] [MeasurableSpace M] + [BorelSpace M] [CompactSpace M] hB in +/-- The pieces are homogeneous. -/ +theorem piece_smul (i : Fin A.n) (c : ℂ) (g : M → ℂ) : A.piece i (c • g) = c • A.piece i g := by + funext y + by_cases hy : y ∈ (A.ext i).target + · simp only [piece, indicator_of_mem hy, Pi.smul_apply, smul_eq_mul] + ring + · simp only [piece, indicator_of_notMem hy, Pi.smul_apply, smul_zero] + +omit hB in +/-- **The pieces see only classes**: if `g₁ = g₂` `μ`-almost everywhere, their pieces agree +almost everywhere, by the `L_1` bound of the pieces of `g₁ - g₂`. -/ +theorem piece_ae_eq (i : Fin A.n) {g₁ g₂ : M → ℂ} (h₁ : StronglyMeasurable g₁) + (h₂ : StronglyMeasurable g₂) (h : g₁ =ᵐ[μ] g₂) : A.piece i g₁ =ᵐ[volume] A.piece i g₂ := by + obtain ⟨C, -, hle⟩ := A.exists_eLpNorm_piece_le μ i one_ne_zero ENNReal.one_ne_top + have hsub : A.piece i (g₁ + (-1 : ℂ) • g₂) = A.piece i g₁ + (-1 : ℂ) • A.piece i g₂ := by + rw [piece_add, piece_smul] + have h0 : eLpNorm (g₁ + (-1 : ℂ) • g₂) 1 μ = 0 := by + rw [eLpNorm_congr_ae (g := 0) (by filter_upwards [h] with x hx; simp [hx]), eLpNorm_zero] + have hm : StronglyMeasurable (g₁ + (-1 : ℂ) • g₂) := h₁.add (h₂.const_smul _) + have hz : A.piece i (g₁ + (-1 : ℂ) • g₂) =ᵐ[volume] 0 := + (eLpNorm_eq_zero_iff one_ne_zero).1 + (le_antisymm ((hle _ hm).trans_eq (by rw [h0, mul_zero])) zero_le) + filter_upwards [hz] with y hy + rw [hsub, Pi.add_apply, Pi.smul_apply, Pi.zero_apply] at hy + linear_combination hy + +omit hB in +/-- The pieces in `L_p` are additive. -/ +theorem pieceLp_add (i : Fin A.n) (f g : Lp ℂ p μ) : + A.pieceLp μ hp i (f + g) = A.pieceLp μ hp i f + A.pieceLp μ hp i g := by + refine Lp.ext ?_ + have h := A.piece_ae_eq i (Lp.stronglyMeasurable (f + g)) + ((Lp.stronglyMeasurable f).add (Lp.stronglyMeasurable g)) (Lp.coeFn_add f g) + filter_upwards [A.pieceLp_ae μ hp i (f + g), A.pieceLp_ae μ hp i f, A.pieceLp_ae μ hp i g, + Lp.coeFn_add (A.pieceLp μ hp i f) (A.pieceLp μ hp i g), h] with y h1 h2 h3 h4 h5 + rw [h1, h4, Pi.add_apply, h2, h3, h5, piece_add, Pi.add_apply] + +omit hB in +/-- The pieces in `L_p` are homogeneous. -/ +theorem pieceLp_smul (i : Fin A.n) (c : ℂ) (f : Lp ℂ p μ) : + A.pieceLp μ hp i (c • f) = c • A.pieceLp μ hp i f := by + refine Lp.ext ?_ + have h := A.piece_ae_eq i (Lp.stronglyMeasurable (c • f)) + ((Lp.stronglyMeasurable f).const_smul c) (Lp.coeFn_smul c f) + filter_upwards [A.pieceLp_ae μ hp i (c • f), A.pieceLp_ae μ hp i f, + Lp.coeFn_smul c (A.pieceLp μ hp i f), h] with y h1 h2 h3 h4 + rw [h1, h3, Pi.smul_apply, h2, h4, piece_smul, Pi.smul_apply] + +omit hB in +/-- The pieces of `0` vanish. -/ +theorem pieceLp_zero (i : Fin A.n) : A.pieceLp μ hp i 0 = 0 := by + simpa using A.pieceLp_smul hp i 0 0 + +omit hB in +/-- The pieces in `L_p` of a finite sum are the sums of the pieces. -/ +theorem pieceLp_finsetSum (i : Fin A.n) {ι : Type*} (t : Finset ι) (f : ι → Lp ℂ p μ) : + A.pieceLp μ hp i (∑ j ∈ t, f j) = ∑ j ∈ t, A.pieceLp μ hp i (f j) := by + classical + induction t using Finset.induction_on with + | empty => rw [Finset.sum_empty, Finset.sum_empty, A.pieceLp_zero hp i] + | insert j t hj ih => rw [Finset.sum_insert hj, Finset.sum_insert hj, A.pieceLp_add hp i, ih] + +/-- The **Besov quasi-norm of a Besov atlas**: the sum over the charts of the intrinsic +quasi-norms on `range I` of the chart pieces `(ψ_i f) ∘ κ_i⁻¹`, with differences of order `r`. -/ +noncomputable def besovNorm (r : ℕ) (s : ℝ) (q : ℝ≥0∞) (f : Lp ℂ p μ) : ℝ≥0∞ := + ∑ i, Rd.modNormOn (Rd.BesovDomain.measurableSet (range I)) r s q (A.pieceLp μ hp i f) + +/-- **One piece is at most the whole**: the intrinsic quasi-norm of the `i`-th chart piece is at +most the Besov quasi-norm of the atlas, one term of its sum (Mathlib's `Finset.single_le_sum`). -/ +theorem modNormOn_pieceLp_le_besovNorm (r : ℕ) (s : ℝ) (q : ℝ≥0∞) (f : Lp ℂ p μ) (i : Fin A.n) : + Rd.modNormOn (Rd.BesovDomain.measurableSet (range I)) r s q (A.pieceLp μ hp i f) ≤ + A.besovNorm hp r s q f := + Finset.single_le_sum (f := fun i => + Rd.modNormOn (Rd.BesovDomain.measurableSet (range I)) r s q (A.pieceLp μ hp i f)) + (fun _ _ => zero_le) (Finset.mem_univ i) + +/-- **Independence of the atlas**: for two Besov atlases `A, A'`, `0 < s < r` and `1 ≤ q ≤ ∞` +there is `C < ∞` with `‖f‖_{A, r, s, q} ≤ C ‖f‖_{A', r, s, q}` for all `f ∈ L_p(μ)`. -/ +theorem besovNorm_le_besovNorm [IsManifold I ∞ M] (A' : BesovAtlas I M) {r : ℕ} (hr : 1 ≤ r) + {s : ℝ} (hs : 0 < s) (hsr : s < r) {q : ℝ≥0∞} (hq : 1 ≤ q) : + ∃ C : ℝ≥0∞, C ≠ ⊤ ∧ ∀ f : Lp ℂ p μ, + A.besovNorm hp r s q f ≤ C * A'.besovNorm hp r s q f := by + set Ω := range I + set hΩ := Rd.BesovDomain.measurableSet Ω + choose C hC hT using fun ij : Fin A.n × Fin A'.n => + (A.transition A' ij.1 ij.2).modNormOn_applyLp_le_modNormOn hp hr hs hsr hq + set S := ∑ ij, C ij + have hS : S ≠ ⊤ := ENNReal.sum_ne_top.2 fun ij _ => hC ij + have hCS : ∀ ij, C ij ≤ S := fun ij => + Finset.single_le_sum (f := C) (fun _ _ => zero_le) (Finset.mem_univ ij) + refine ⟨1 + A.n * S, ENNReal.add_ne_top.2 ⟨ENNReal.one_ne_top, + ENNReal.mul_ne_top (ENNReal.natCast_ne_top _) hS⟩, fun f => ?_⟩ + by_cases hfin : A'.besovNorm hp r s q f = ⊤ + · rw [hfin, ENNReal.mul_top (by simp)] + exact le_top + set N : Fin A'.n → ℝ≥0∞ := fun j => Rd.modNormOn hΩ r s q (A'.pieceLp μ hp j f) + have hN : ∀ j, N j < ⊤ := fun j => (Finset.single_le_sum (f := N) (fun _ _ => zero_le) + (Finset.mem_univ j)).trans_lt (lt_top_iff_ne_top.2 hfin) + have hterm : ∀ i j, Rd.modNormOn hΩ r s q ((A.transition A' i j).applyLp hB.convex + hB.interior_nonempty hΩ hp (A'.pieceLp μ hp j f)) ≤ S * N j := fun i j => + (hT (i, j) _ (hN j)).trans (mul_le_mul' (hCS (i, j)) le_rfl) + calc A.besovNorm hp r s q f + = ∑ i, Rd.modNormOn hΩ r s q (∑ j, (A.transition A' i j).applyLp hB.convex + hB.interior_nonempty hΩ hp (A'.pieceLp μ hp j f)) := by + simp only [besovNorm] + exact Finset.sum_congr rfl fun i _ => by rw [A.pieceLp_eq_sum A' μ hp i f] + _ ≤ ∑ i : Fin A.n, ∑ j, S * N j := Finset.sum_le_sum fun i _ => + (Rd.modNormOn_finsetSum_le hΩ r s hq _ _).trans (Finset.sum_le_sum fun j _ => hterm i j) + _ = A.n * S * A'.besovNorm hp r s q f := by + rw [Finset.sum_const, Finset.card_univ, Fintype.card_fin, nsmul_eq_mul, ← Finset.mul_sum, + mul_assoc] + rfl + _ ≤ (1 + A.n * S) * A'.besovNorm hp r s q f := mul_le_mul' le_add_self le_rfl + +/-- **The Besov quasi-norm is subadditive** for `q ≥ 1`. -/ +theorem besovNorm_add_le (r : ℕ) (s : ℝ) {q : ℝ≥0∞} (hq : 1 ≤ q) (f g : Lp ℂ p μ) : + A.besovNorm hp r s q (f + g) ≤ A.besovNorm hp r s q f + A.besovNorm hp r s q g := by + simp only [besovNorm, pieceLp_add, ← Finset.sum_add_distrib] + exact Finset.sum_le_sum fun i _ => Rd.modNormOn_add_le _ r s hq _ _ + +/-- **The Besov quasi-norm is homogeneous**: `‖c f‖ = |c| ‖f‖`. -/ +theorem besovNorm_const_smul (r : ℕ) (s : ℝ) (q : ℝ≥0∞) (c : ℂ) (f : Lp ℂ p μ) : + A.besovNorm hp r s q (c • f) = ‖c‖ₑ * A.besovNorm hp r s q f := by + simp only [besovNorm, pieceLp_smul, Rd.modNormOn_const_smul, Finset.mul_sum] + +/-- **The Besov quasi-norm bounds the `L_p` norm**: `‖f‖_{L_p(μ)} ≤ C ‖f‖_{A, r, s, q}`, since +`f = ∑_i ψ_i f`, the `L_p` norms of `ψ_i f` on `M` and of its piece in the chart are comparable, +and the pieces live on `range I`. -/ +theorem exists_enorm_le_besovNorm (r : ℕ) (s : ℝ) (q : ℝ≥0∞) : + ∃ C : ℝ≥0∞, C ≠ ⊤ ∧ ∀ f : Lp ℂ p μ, ‖f‖ₑ ≤ C * A.besovNorm hp r s q f := by + have hp1 : 1 ≤ p := Fact.out + have hp0 : p ≠ 0 := (zero_lt_one.trans_le hp1).ne' + have hΩ := Rd.BesovDomain.measurableSet (range I) + -- the chart bound for each piece + have hchart : ∀ i, ∃ C : ℝ≥0∞, C ≠ ⊤ ∧ ∀ g : M → ℂ, StronglyMeasurable g → + eLpNorm (fun x => (A.psi i x : ℂ) * g x) p μ ≤ C * eLpNorm (A.piece i g) p volume := by + intro i + obtain ⟨_, C, -, hC, hcmp⟩ := IsSmoothMeasure.exists_eLpNorm_chart_le (I := I) μ + (A.chart_mem i) (isClosed_tsupport _).isCompact (A.tsupport_psi_subset i) hp0 hp (F := ℂ) + exact ⟨C, hC, fun g hg => (hcmp (fun x => (A.psi i x : ℂ) * g x) + ((A.contMDiff_psi i).continuous.measurable.complex_ofReal.mul + hg.measurable).stronglyMeasurable + fun x hx => by rw [image_eq_zero_of_notMem_tsupport hx, Complex.ofReal_zero, zero_mul]).2⟩ + choose C hC hle using hchart + set Cmax := ∑ i, C i + have hCmax : ∀ i, C i ≤ Cmax := fun i => + Finset.single_le_sum (f := C) (fun _ _ => zero_le) (Finset.mem_univ i) + refine ⟨Cmax, ENNReal.sum_ne_top.2 fun i _ => hC i, fun f => ?_⟩ + -- `f = ∑_i ψ_i f` + have hsum : (f : M → ℂ) = ∑ i, fun x => (A.psi i x : ℂ) * f x := by + funext x + rw [Finset.sum_apply, ← Finset.sum_mul, ← Complex.ofReal_sum, A.sum_psi, Complex.ofReal_one, + one_mul] + -- the pieces live on `range I` + have hpiece : ∀ i, eLpNorm (A.piece i f) p volume ≤ + Rd.modNormOn hΩ r s q (A.pieceLp μ hp i f) := fun i => by + have h : eLpNorm (A.piece i f) p volume = ‖Rd.indicatorLp hΩ (A.pieceLp μ hp i f)‖ₑ := by + rw [Lp.eNorm_def] + refine eLpNorm_congr_ae ?_ + filter_upwards [Rd.indicatorLp_apply_ae hΩ (A.pieceLp μ hp i f), A.pieceLp_ae μ hp i f] + with y h1 h2 + rw [h1] + by_cases hy : y ∈ range I + · rw [indicator_of_mem hy, h2] + · rw [indicator_of_notMem hy, piece, indicator_of_notMem fun h => + hy ((A.chart i).extend_target_subset_range h)] + rw [h] + exact le_add_right le_rfl + calc ‖f‖ₑ = eLpNorm (∑ i, fun x => (A.psi i x : ℂ) * f x) p μ := by + rw [Lp.eNorm_def, ← hsum] + _ ≤ ∑ i, eLpNorm (fun x => (A.psi i x : ℂ) * f x) p μ := + eLpNorm_sum_le hp1 + _ ≤ ∑ i, Cmax * Rd.modNormOn hΩ r s q (A.pieceLp μ hp i f) := + Finset.sum_le_sum fun i _ => (hle i f (Lp.stronglyMeasurable f)).trans + (mul_le_mul' (hCmax i) (hpiece i)) + _ = Cmax * A.besovNorm hp r s q f := by rw [← Finset.mul_sum]; rfl + +/-- The **Besov space of a Besov atlas**: `f ∈ L_p(μ)` with a finite Besov quasi-norm of order +`⌊s⌋ + 1`. -/ +def MemBesov (s : ℝ) (q : ℝ≥0∞) (f : Lp ℂ p μ) : Prop := + A.besovNorm hp (⌊s⌋₊ + 1) s q f < ⊤ + +/-- **The order does not matter**: for `0 < s < r`, `f ∈ B^s_{p,q}` iff its Besov quasi-norm of +order `r` is finite (`Rd.BesovDomain.modNormOn_order_le` piece by piece). -/ +theorem memBesov_iff_besovNorm_lt_top {r : ℕ} {s : ℝ} (hs : 0 < s) (hsr : s < r) {q : ℝ≥0∞} + (hq : 1 ≤ q) (f : Lp ℂ p μ) : + A.MemBesov hp s q f ↔ A.besovNorm hp r s q f < ⊤ := by + set Ω := range I + set hΩ := Rd.BesovDomain.measurableSet Ω + have hs1 : s < ((⌊s⌋₊ + 1 : ℕ) : ℝ) := by + push_cast + exact Nat.lt_floor_add_one s + -- the comparison of two orders, piece by piece + have hcmp : ∀ {r₁ r₂ : ℕ}, s < r₁ → s < r₂ → A.besovNorm hp r₁ s q f < ⊤ → + A.besovNorm hp r₂ s q f < ⊤ := fun {r₁ r₂} h1 h2 hfin => by + refine ENNReal.sum_lt_top.2 fun i _ => ?_ + obtain ⟨C, hC, hle⟩ := Rd.BesovDomain.modNormOn_order_le (Ω := Ω) hp hs h1 h2 hq + have hi : Rd.modNormOn hΩ r₁ s q (A.pieceLp μ hp i f) < ⊤ := + (A.modNormOn_pieceLp_le_besovNorm hp r₁ s q f i).trans_lt hfin + exact (hle _ hi).trans_lt (ENNReal.mul_lt_top hC.lt_top hi) + exact ⟨hcmp hs1 hsr, hcmp hsr hs1⟩ + +/-- **The pieces of `f ∈ B^s_{p,q}` have finite intrinsic quasi-norms** of every order `r > s` on +`range I`. -/ +theorem MemBesov.modNormOn_pieceLp_lt_top {r : ℕ} {s : ℝ} (hs : 0 < s) (hsr : s < r) {q : ℝ≥0∞} + (hq : 1 ≤ q) {f : Lp ℂ p μ} (hf : A.MemBesov hp s q f) (i : Fin A.n) : + Rd.modNormOn (Rd.BesovDomain.measurableSet (range I)) r s q (A.pieceLp μ hp i f) < ⊤ := + (A.modNormOn_pieceLp_le_besovNorm hp r s q f i).trans_lt + ((A.memBesov_iff_besovNorm_lt_top hp hs hsr hq f).1 hf) + +/-- **`B^s_{p,q}` of an atlas by the pieces**: for `0 < s < r` and `1 ≤ q ≤ ∞`, `f ∈ B^s_{p,q}` +for the atlas `A` iff every piece `P_i f` has a finite intrinsic quasi-norm of order `r` on +`range I` (`Manifold.BesovAtlas.memBesov_iff_besovNorm_lt_top`, Mathlib's `ENNReal.sum_lt_top`). -/ +theorem memBesov_iff_forall_modNormOn_lt_top {r : ℕ} {s : ℝ} (hs : 0 < s) (hsr : s < r) + {q : ℝ≥0∞} (hq : 1 ≤ q) (f : Lp ℂ p μ) : + A.MemBesov hp s q f ↔ ∀ i, + Rd.modNormOn (Rd.BesovDomain.measurableSet (range I)) r s q (A.pieceLp μ hp i f) < ⊤ := by + rw [A.memBesov_iff_besovNorm_lt_top hp hs hsr hq, besovNorm, ENNReal.sum_lt_top] + simp only [Finset.mem_univ, forall_const] + +/-- **The Besov space does not depend on the atlas**: `f ∈ B^s_{p,q}` for `A` iff for `A'`. -/ +theorem memBesov_iff_memBesov [IsManifold I ∞ M] (A' : BesovAtlas I M) {s : ℝ} (hs : 0 < s) + {q : ℝ≥0∞} (hq : 1 ≤ q) (f : Lp ℂ p μ) : + A.MemBesov hp s q f ↔ A'.MemBesov hp s q f := by + have hr : 1 ≤ ⌊s⌋₊ + 1 := Nat.le_add_left 1 _ + have hs1 : s < ((⌊s⌋₊ + 1 : ℕ) : ℝ) := by + push_cast + exact Nat.lt_floor_add_one s + obtain ⟨C, hC, hle⟩ := A.besovNorm_le_besovNorm (μ := μ) hp A' hr hs hs1 hq + obtain ⟨C', hC', hle'⟩ := A'.besovNorm_le_besovNorm (μ := μ) hp A hr hs hs1 hq + exact ⟨fun h => (hle' f).trans_lt (ENNReal.mul_lt_top hC'.lt_top h), + fun h => (hle f).trans_lt (ENNReal.mul_lt_top hC.lt_top h)⟩ + +/-- `B^s_{p,q}` of an atlas is closed under addition. -/ +theorem MemBesov.add {s : ℝ} {q : ℝ≥0∞} (hq : 1 ≤ q) {f g : Lp ℂ p μ} (hf : A.MemBesov hp s q f) + (hg : A.MemBesov hp s q g) : A.MemBesov hp s q (f + g) := + (A.besovNorm_add_le hp _ s hq f g).trans_lt (ENNReal.add_lt_top.2 ⟨hf, hg⟩) + +/-- `B^s_{p,q}` of an atlas is closed under scalar multiplication. -/ +theorem MemBesov.const_smul {s : ℝ} {q : ℝ≥0∞} (c : ℂ) {f : Lp ℂ p μ} + (hf : A.MemBesov hp s q f) : A.MemBesov hp s q (c • f) := by + rw [MemBesov, besovNorm_const_smul] + exact ENNReal.mul_lt_top eNorm_lt_top hf + +/-- `0 ∈ B^s_{p,q}`. -/ +theorem MemBesov.zero (s : ℝ) (q : ℝ≥0∞) : A.MemBesov hp s q (0 : Lp ℂ p μ) := by + have h := A.besovNorm_const_smul hp (⌊s⌋₊ + 1) s q 0 (0 : Lp ℂ p μ) + rw [zero_smul, eNorm_zero, zero_mul] at h + rw [MemBesov, h] + exact ENNReal.zero_lt_top + +/-- `B^s_{p,q}` of an atlas is closed under finite sums. -/ +theorem MemBesov.finsetSum {s : ℝ} {q : ℝ≥0∞} (hq : 1 ≤ q) {ι : Type*} (t : Finset ι) + {f : ι → Lp ℂ p μ} (hf : ∀ i ∈ t, A.MemBesov hp s q (f i)) : + A.MemBesov hp s q (∑ i ∈ t, f i) := by + classical + induction t using Finset.induction_on with + | empty => + rw [Finset.sum_empty] + exact MemBesov.zero hp A s q + | insert i t hi ih => + rw [Finset.sum_insert hi] + exact MemBesov.add hp A hq (hf i (Finset.mem_insert_self i t)) + (ih fun j hj => hf j (Finset.mem_insert_of_mem hj)) + +/-! ### Functions from a chart -/ + +omit hB in +variable (μ) in +/-- The **lift from the `k`-th chart** of `F ∈ L_p(E)` to `L_p(μ)`: `θ_k · F ∘ κ_k` +(`Manifold.chartLift`). -/ +noncomputable def chartLiftLp (k : Fin A.n) (F : Lp ℂ p (volume : Measure E)) : Lp ℂ p μ := + (memLp_chartLift (I := I) μ (A.chart_mem k) (A.contMDiff_theta k).continuous + (A.tsupport_theta_subset k) (zero_lt_one.trans_le (Fact.out : 1 ≤ p)).ne' hp + (Lp.stronglyMeasurable F) (Lp.memLp F)).toLp _ + +omit hB in +/-- The lift from the `k`-th chart in `L_p(μ)` is `θ_k · F ∘ κ_k` almost everywhere. -/ +theorem chartLiftLp_ae (k : Fin A.n) (F : Lp ℂ p (volume : Measure E)) : + A.chartLiftLp μ hp k F =ᵐ[μ] chartLift I (A.chart k) (A.theta k) F := + MemLp.coeFn_toLp _ + +omit hB in +/-- The lifts from a chart are additive. -/ +theorem chartLiftLp_add (k : Fin A.n) (F G : Lp ℂ p (volume : Measure E)) : + A.chartLiftLp μ hp k (F + G) = A.chartLiftLp μ hp k F + A.chartLiftLp μ hp k G := by + refine Lp.ext ?_ + filter_upwards [A.chartLiftLp_ae hp k (F + G), A.chartLiftLp_ae hp k F, + A.chartLiftLp_ae hp k G, Lp.coeFn_add (A.chartLiftLp μ hp k F) (A.chartLiftLp μ hp k G), + chartLift_ae_eq (I := I) (μ := μ) (A.chart_mem k) (A.tsupport_theta_subset k) + (Lp.coeFn_add F G)] + with x h1 h2 h3 h4 h5 + rw [h1, h4, Pi.add_apply, h2, h3, h5, chartLift_add, Pi.add_apply] + +omit hB in +/-- The lifts from a chart are homogeneous. -/ +theorem chartLiftLp_smul (k : Fin A.n) (c : ℂ) (F : Lp ℂ p (volume : Measure E)) : + A.chartLiftLp μ hp k (c • F) = c • A.chartLiftLp μ hp k F := by + refine Lp.ext ?_ + filter_upwards [A.chartLiftLp_ae hp k (c • F), A.chartLiftLp_ae hp k F, + Lp.coeFn_smul c (A.chartLiftLp μ hp k F), + chartLift_ae_eq (I := I) (μ := μ) (A.chart_mem k) (A.tsupport_theta_subset k) + (Lp.coeFn_smul c F)] + with x h1 h2 h3 h4 + rw [h1, h3, Pi.smul_apply, h2, h4, chartLift_smul, Pi.smul_apply] + +/-- **The pieces of a lift from a chart in `L_p`**: `piece_i (θ_k · F ∘ κ_k) = T_{ik} F`. -/ +theorem pieceLp_chartLiftLp [IsManifold I ∞ M] (i k : Fin A.n) + (F : Lp ℂ p (volume : Measure E)) : + A.pieceLp μ hp i (A.chartLiftLp μ hp k F) = (A.transition A i k).applyLp hB.convex + hB.interior_nonempty (Rd.BesovDomain.measurableSet (range I)) hp F := by + refine Lp.ext ?_ + have h := A.piece_ae_eq i (Lp.stronglyMeasurable _) (stronglyMeasurable_chartLift (A.chart k) + (A.contMDiff_theta k).continuous (Lp.stronglyMeasurable F)) + (A.chartLiftLp_ae (μ := μ) hp k F) + filter_upwards [A.pieceLp_ae μ hp i (A.chartLiftLp μ hp k F), h, + (A.transition A i k).applyLp_ae hB.convex hB.interior_nonempty + (Rd.BesovDomain.measurableSet (range I)) hp F] with y h1 h2 h3 + rw [h1, h2, h3, piece_chartLift] + +/-- **Lifts from a chart are in `B^σ_{p,q}(M)`**: for `F ∈ L_p(E)` with +`‖F‖_p + ‖(2^(kσ) ω_r(F, 2^(-k))_p)_k‖_{ℓ_q} < ∞`, `0 < σ < r`, the lift `θ_k · F ∘ κ_k` lies in +`B^σ_{p,q}(M)`: its pieces are `T_{ik} F`, bounded on `range I` +(`Rd.CutoffDiffeo.modNormOn_applyLp_le`). -/ +theorem memBesov_chartLiftLp [IsManifold I ∞ M] (k : Fin A.n) {r : ℕ} (hr : 1 ≤ r) {σ : ℝ} + (hσ : 0 < σ) (hσr : σ < r) {q : ℝ≥0∞} (hq : 1 ≤ q) {F : Lp ℂ p (volume : Measure E)} + (hF : ‖F‖ₑ + lqNorm q (fun j => dyadicWeight σ j * Rd.lpModulus p r F j) < ⊤) : + A.MemBesov hp σ q (A.chartLiftLp μ hp k F) := by + rw [A.memBesov_iff_besovNorm_lt_top hp hσ hσr hq] + refine ENNReal.sum_lt_top.2 fun i _ => ?_ + obtain ⟨C, hC, hle⟩ := (A.transition A i k).modNormOn_applyLp_le hB.convex + hB.interior_nonempty (Rd.BesovDomain.measurableSet (range I)) hp hr hσ hσr hq + rw [A.pieceLp_chartLiftLp hp i k F] + exact (hle F).trans_lt (ENNReal.mul_lt_top hC.lt_top hF) + +end BesovAtlas + +variable (I μ) [T2Space M] [IsManifold I ∞ M] + +/-- The **Besov space** `B^s_{p,q}(M)` of a compact manifold with a smooth measure: `f ∈ L_p(μ)` +with a finite Besov quasi-norm for a chosen Besov atlas. For `s > 0` and `1 ≤ q ≤ ∞` every Besov +atlas gives the same space (`Manifold.memBesov_iff`). -/ +def MemBesov (s : ℝ) (q : ℝ≥0∞) (f : Lp ℂ p μ) : Prop := + (Classical.choice (BesovAtlas.nonempty I M)).MemBesov hp s q f + +/-- **Every Besov atlas describes `B^s_{p,q}(M)`**: for `s > 0` and `1 ≤ q ≤ ∞`. -/ +theorem memBesov_iff (A : BesovAtlas I M) {s : ℝ} (hs : 0 < s) {q : ℝ≥0∞} (hq : 1 ≤ q) + (f : Lp ℂ p μ) : MemBesov I μ hp s q f ↔ A.MemBesov hp s q f := + BesovAtlas.memBesov_iff_memBesov hp _ A hs hq f + +end Manifold diff --git a/LeanPool/FunctionSpaces/Domains/Manifolds/BesovAtlas.lean b/LeanPool/FunctionSpaces/Domains/Manifolds/BesovAtlas.lean new file mode 100644 index 0000000000..622e835ffe --- /dev/null +++ b/LeanPool/FunctionSpaces/Domains/Manifolds/BesovAtlas.lean @@ -0,0 +1,681 @@ +/- +Copyright (c) 2026 Mario Ullrich. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Mario Ullrich +-/ +module + +public import LeanPool.FunctionSpaces.Domains.Manifolds.SmoothMeasure +public import LeanPool.FunctionSpaces.Domains.Lipschitz.HalfSpace +public import Mathlib.Geometry.Manifold.Algebra.Structures +public import Mathlib.Geometry.Manifold.PartitionOfUnity +public import Mathlib.Algebra.Order.Chebyshev + +/- +Modified for Lean Pool: module names and imports adapted. +-/ + +/-! +# Besov atlases + +A **Besov atlas** of a manifold `M` (`Manifold.BesovAtlas`) consists of finitely many charts +`e_i` of the atlas, a smooth partition of unity `(ψ_i)` with `tsupport ψ_i ⊆ e_i.source`, and +smooth cut-offs `θ_i` with `θ_i = 1` on `tsupport ψ_i` and `tsupport θ_i ⊆ e_i.source`. Every +compact manifold has one (`Manifold.BesovAtlas.nonempty`): finitely many chart sources cover `M`, +Mathlib's smooth partitions of unity are subordinate to them +(`SmoothPartitionOfUnity.exists_isSubordinate`), and smooth cut-offs exist for every compact set +inside an open set (`Manifold.exists_contMDiff_eq_one_tsupport_subset`). + +The squares of the partition of unity satisfy `∑_i ψ_i² ≥ 1/N` for `N` charts +(`Manifold.BesovAtlas.inv_card_le_sum_sq_psi`). The **chart piece** `(ψ_i g) ∘ κ_i⁻¹` vanishes +outside the carrier `κ_i(tsupport ψ_i)`, compact on a compact manifold +(`Manifold.BesovAtlas.isCompact_pieceCarrier`, `Manifold.BesovAtlas.piece_eq_zero_of_notMem`), and +is continuous on `range I` for continuous `g` (`Manifold.BesovAtlas.continuousOn_piece`). + +A smooth function on `M` read in an extended chart is smooth within the target of the chart +(`Manifold.contDiffOn_comp_extend_symm`). Conversely, a function `F` on `E` gives the **lift from +a chart** `θ · F ∘ κ` on `M` (`Manifold.chartLift`). It is linear in `F`, depends only on the +class of `F` (`Manifold.chartLift_ae_eq`), is bounded from `L_p(E)` to `L_p(μ)` +(`Manifold.exists_eLpNorm_chartLift_le`, `Manifold.memLp_chartLift`), and its pieces are the images +of `F` under the changes of charts (`Manifold.BesovAtlas.piece_chartLift`). + +A change of charts `κ' ∘ κ⁻¹` has a measurable source (`Manifold.measurableSet_coordChange_source`) +and maps the part of a set `B` inside its source onto the points `y` of the target of `κ'` with +`κ'⁻¹ y ∈ e.source` and `κ(κ'⁻¹ y) ∈ B` (`Manifold.image_coordChange_inter`). + +The change of charts `T_{ij}` acts at `y = κ_i x` with `x` in the source of `κ'_j` by +`T_{ij} G (y) = ψ_i(x) θ'_j(x) G(κ'_j x)` and vanishes at other points +(`Manifold.BesovAtlas.transition_apply_of_mem`, `Manifold.BesovAtlas.transition_apply_of_notMem`). +The pieces of one atlas are sums of the pieces of another transported by the changes of charts +(`Manifold.BesovAtlas.pieceLp_eq_sum`) for every real model `I` whose range is a Besov domain: the +half-space, `E`, and the quadrant of manifolds with corners +(`Rd.BesovDomain.range_euclideanQuadrant` in `FunctionSpaces.Domains.Lipschitz.BesovDomains`). +-/ + +@[expose] public section + +open MeasureTheory Set Filter Topology +open scoped ENNReal Manifold ContDiff + +namespace Manifold + +variable {E : Type*} [NormedAddCommGroup E] [InnerProductSpace ℝ E] [FiniteDimensional ℝ E] + {H : Type*} [TopologicalSpace H] (I : ModelWithCorners ℝ E H) + (M : Type*) [TopologicalSpace M] [ChartedSpace H M] + +/-- A **Besov atlas**: finitely many charts of the atlas, a smooth partition of unity `(ψ_i)` +subordinate to their sources, and smooth cut-offs `θ_i` with `θ_i = 1` on `tsupport ψ_i` and +`tsupport θ_i` inside the source of the `i`-th chart. -/ +structure BesovAtlas where + /-- The number of charts. -/ + n : ℕ + /-- The charts. -/ + chart : Fin n → OpenPartialHomeomorph M H + chart_mem : ∀ i, chart i ∈ atlas H M + /-- The partition of unity. -/ + psi : Fin n → M → ℝ + contMDiff_psi : ∀ i, ContMDiff I 𝓘(ℝ, ℝ) ∞ (psi i) + nonneg_psi : ∀ i x, 0 ≤ psi i x + tsupport_psi_subset : ∀ i, tsupport (psi i) ⊆ (chart i).source + sum_psi : ∀ x, ∑ i, psi i x = 1 + /-- The cut-offs. -/ + theta : Fin n → M → ℝ + contMDiff_theta : ∀ i, ContMDiff I 𝓘(ℝ, ℝ) ∞ (theta i) + theta_eq_one : ∀ i, ∀ x ∈ tsupport (psi i), theta i x = 1 + tsupport_theta_subset : ∀ i, tsupport (theta i) ⊆ (chart i).source + +variable {M} in +/-- **Smooth cut-offs**: for a compact set `K` inside an open set `U` of a σ-compact Hausdorff +manifold there is a smooth `θ : M → ℝ` with `θ = 1` on `K` and `tsupport θ ⊆ U`: Mathlib's +smooth function with support an open `V` and equal to `1` exactly on `K` +(`exists_contMDiff_support_eq_eq_one_iff`), for `K ⊆ V` and `closure V ⊆ U` +(`exists_open_between_and_isCompact_closure`). -/ +theorem exists_contMDiff_eq_one_tsupport_subset [T2Space M] [SigmaCompactSpace M] + [IsManifold I ∞ M] {K U : Set M} (hK : IsCompact K) (hU : IsOpen U) (hKU : K ⊆ U) : + ∃ θ : M → ℝ, ContMDiff I 𝓘(ℝ, ℝ) ∞ θ ∧ (∀ x ∈ K, θ x = 1) ∧ tsupport θ ⊆ U := by + have := Manifold.locallyCompact_of_finiteDimensional (M := M) I + obtain ⟨V, hVo, hKV, hVU, -⟩ := exists_open_between_and_isCompact_closure hK hU hKU + obtain ⟨θ, hθ, -, hsupp, h1⟩ := + exists_contMDiff_support_eq_eq_one_iff I (n := ⊤) hVo hK.isClosed hKV + exact ⟨θ, hθ, fun x hx => (h1 x).1 hx, by rw [tsupport, hsupp]; exact hVU⟩ + +/-- **Every compact manifold has a Besov atlas**: finitely many chart sources cover `M`, a smooth +partition of unity is subordinate to them, and the cut-off `θ_i` is a smooth function equal to +`1` on `tsupport ψ_i` with `tsupport θ_i ⊆ e_i.source` +(`Manifold.exists_contMDiff_eq_one_tsupport_subset`). -/ +theorem BesovAtlas.nonempty [CompactSpace M] [T2Space M] [IsManifold I ∞ M] : + Nonempty (BesovAtlas I M) := by + obtain ⟨t, ht⟩ := isCompact_univ.elim_finite_subcover (fun x : M => (chartAt H x).source) + (fun x => (chartAt H x).open_source) (fun x _ => mem_iUnion.2 ⟨x, mem_chart_source H x⟩) + set pt : Fin t.card → M := fun i => (t.equivFin.symm i : M) + have hcover : (univ : Set M) ⊆ ⋃ i, (chartAt H (pt i)).source := fun x hx => by + obtain ⟨y, hy, hxy⟩ := mem_iUnion₂.1 (ht hx) + refine mem_iUnion.2 ⟨t.equivFin ⟨y, hy⟩, ?_⟩ + simpa [pt] using hxy + obtain ⟨f, hf⟩ := SmoothPartitionOfUnity.exists_isSubordinate I isClosed_univ + (fun i => (chartAt H (pt i)).source) (fun i => (chartAt H (pt i)).open_source) hcover + have hθ : ∀ i, ∃ θ : M → ℝ, ContMDiff I 𝓘(ℝ, ℝ) ∞ θ ∧ (∀ x ∈ tsupport (f i), θ x = 1) ∧ + tsupport θ ⊆ (chartAt H (pt i)).source := fun i => + exists_contMDiff_eq_one_tsupport_subset I (isClosed_tsupport _).isCompact + (chartAt H (pt i)).open_source (hf i) + choose θ hθs hθ1 hθsub using hθ + exact ⟨{ n := t.card + chart := fun i => chartAt H (pt i) + chart_mem := fun i => chart_mem_atlas H _ + psi := fun i => f i + contMDiff_psi := fun i => (f i).contMDiff + nonneg_psi := fun i x => f.nonneg i x + tsupport_psi_subset := hf + sum_psi := fun x => by + have h := f.sum_eq_one (mem_univ x) + rwa [finsum_eq_sum_of_fintype] at h + theta := θ + contMDiff_theta := hθs + theta_eq_one := hθ1 + tsupport_theta_subset := hθsub }⟩ + +variable {I M} + +omit [FiniteDimensional ℝ E] in +/-- **Smooth functions in a chart**: for a chart `e` of the atlas and a smooth `g : M → ℝ`, +`g ∘ κ⁻¹` is smooth within the target of the extended chart `κ = e.extend I`. -/ +theorem contDiffOn_comp_extend_symm [IsManifold I ∞ M] {e : OpenPartialHomeomorph M H} + (he : e ∈ atlas H M) {g : M → ℝ} (hg : ContMDiff I 𝓘(ℝ, ℝ) ∞ g) : + ContDiffOn ℝ ∞ (g ∘ (e.extend I).symm) (e.extend I).target := by + have h := (contMDiffOn_iff_of_mem_maximalAtlas' (IsManifold.subset_maximalAtlas he) + (IsManifold.chart_mem_maximalAtlas (I := 𝓘(ℝ, ℝ)) (0 : ℝ)) subset_rfl + (fun x _ => by simp [chartAt_self_eq])).1 hg.contMDiffOn + rw [← e.extend_target_eq_image_source] at h + simpa [chartAt_self_eq, Function.comp_def] using h + +/-! ### Changes of charts -/ + +section CoordChange + +omit [FiniteDimensional ℝ E] [ChartedSpace H M] + +variable (e e' : OpenPartialHomeomorph M H) + +/-- The source of the change of charts is the relatively open set `range I ∩ U`. -/ +theorem range_inter_coordChange_source : + range I ∩ I.symm ⁻¹' (e.symm ≫ₕ e').source = (I.extendCoordChange e e').source := by + rw [I.extendCoordChange_source, I.image_eq, inter_comm] + +/-- The target of the change of charts is the relatively open set `range I ∩ U'`. -/ +theorem range_inter_coordChange_target : + range I ∩ I.symm ⁻¹' (e.symm ≫ₕ e').target = (I.extendCoordChange e e').target := by + rw [I.extendCoordChange_target, I.image_eq, inter_comm] + +/-- `y` lies in the source of the change of charts iff it lies in the target of `e.extend I` +and its preimage lies in the source of `e'`. -/ +theorem mem_coordChange_source {y : E} : + y ∈ (I.extendCoordChange e e').source ↔ + y ∈ (e.extend I).target ∧ (e.extend I).symm y ∈ e'.source := by + rw [ModelWithCorners.extendCoordChange, PartialEquiv.trans_source, PartialEquiv.symm_source, + e'.extend_source] + rfl + +/-- The target of the change of charts is the image of `e.source ∩ e'.source` under +`e'.extend I`. -/ +theorem coordChange_target_eq_image : + (I.extendCoordChange e e').target = e'.extend I '' (e'.source ∩ e.source) := by + rw [← PartialEquiv.symm_source, ModelWithCorners.extendCoordChange_symm, + OpenPartialHomeomorph.extend_image_source_inter] + +/-- The change of charts is `e'.extend I ∘ (e.extend I).symm`. -/ +theorem coordChange_apply (y : E) : + I.extendCoordChange e e' y = e'.extend I ((e.extend I).symm y) := rfl + +/-- **The image of a set under a change of charts**: for charts `e`, `e'` with extended charts +`κ`, `κ'` and the change of charts `Φ = κ' ∘ κ⁻¹`, the image of `B ∩ source Φ` under `Φ` is the set +of points `y` of the target of `κ'` with `κ'⁻¹ y ∈ e.source` and `κ(κ'⁻¹ y) ∈ B` (Mathlib's +`PartialEquiv.image_source_inter_eq'`, with `Φ⁻¹` the change of charts from `e'` to `e`). -/ +theorem image_coordChange_inter (B : Set E) : + I.extendCoordChange e e' '' (B ∩ (I.extendCoordChange e e').source) = + (e'.extend I).target ∩ (e'.extend I).symm ⁻¹' (e.source ∩ e.extend I ⁻¹' B) := by + rw [inter_comm, PartialEquiv.image_source_inter_eq', ← (I.extendCoordChange e e').symm_source, + ModelWithCorners.extendCoordChange_symm] + ext y + simp only [mem_inter_iff, mem_preimage, mem_coordChange_source, coordChange_apply, and_assoc] + +/-- The source of a change of charts is measurable: it is the intersection of the closed range +of `I` with an open set (`Manifold.range_inter_coordChange_source`). -/ +theorem measurableSet_coordChange_source [MeasurableSpace E] [BorelSpace E] : + MeasurableSet (I.extendCoordChange e e').source := by + rw [← range_inter_coordChange_source] + exact I.isClosed_range.measurableSet.inter + (I.continuous_symm.isOpen_preimage _ (OpenPartialHomeomorph.open_source _)).measurableSet + +end CoordChange + +namespace BesovAtlas + +variable (A : BesovAtlas I M) + +/-- The extended chart `κ_i = e_i.extend I`. -/ +noncomputable abbrev ext (i : Fin A.n) : PartialEquiv M E := (A.chart i).extend I + +omit [FiniteDimensional ℝ E] in +/-- `ψ_i ≤ 1`. -/ +theorem psi_le_one (i : Fin A.n) (x : M) : A.psi i x ≤ 1 := by + rw [← A.sum_psi x] + exact Finset.single_le_sum (fun j _ => A.nonneg_psi j x) (Finset.mem_univ i) + +omit [FiniteDimensional ℝ E] in +/-- `θ_i ψ_i = ψ_i`, since `θ_i = 1` on `tsupport ψ_i`. -/ +theorem theta_mul_psi (i : Fin A.n) (x : M) : A.theta i x * A.psi i x = A.psi i x := by + by_cases hx : x ∈ tsupport (A.psi i) + · rw [A.theta_eq_one i x hx, one_mul] + · rw [image_eq_zero_of_notMem_tsupport hx, mul_zero] + +omit [FiniteDimensional ℝ E] in +/-- **The squares of the partition of unity are bounded below**: `∑_i ψ_i(x)² ≥ 1/N` at every +point `x`, for the `N` charts of the atlas, since `1 = (∑_i ψ_i(x))² ≤ N ∑_i ψ_i(x)²` by the +Cauchy–Schwarz inequality (Mathlib's `sq_sum_le_card_mul_sum_sq`). This bounds the weights +of the principal part `∑_i (ψ_i ∘ κ_i⁻¹)² |∇(u ∘ κ_i⁻¹)|²` of the chart form from below. -/ +theorem inv_card_le_sum_sq_psi (x : M) : (A.n : ℝ)⁻¹ ≤ ∑ i, A.psi i x ^ 2 := by + have h : (∑ i, A.psi i x) ^ 2 ≤ (Finset.univ.card : ℝ) * ∑ i, A.psi i x ^ 2 := + sq_sum_le_card_mul_sum_sq + rw [A.sum_psi x, one_pow, Finset.card_univ, Fintype.card_fin] at h + have hn : (A.n : ℝ) ≠ 0 := fun h0 => by + rw [h0, zero_mul] at h + exact absurd h (by norm_num) + exact (inv_le_iff_one_le_mul₀' ((Nat.cast_nonneg _).lt_of_ne (Ne.symm hn))).2 h + +/-- The **chart piece** `(ψ_i g) ∘ κ_i⁻¹` on the target of `κ_i`, `0` outside. -/ +noncomputable def piece (i : Fin A.n) (g : M → ℂ) : E → ℂ := + (A.ext i).target.indicator fun y => (A.psi i ((A.ext i).symm y) : ℂ) * g ((A.ext i).symm y) + +/-- **The carrier of the `i`-th piece**: the set `κ_i(tsupport ψ_i) ⊆ range I`, outside which +the piece `(ψ_i g) ∘ κ_i⁻¹` vanishes; it is compact on a compact manifold. -/ +noncomputable def pieceCarrier (i : Fin A.n) : Set E := + A.ext i '' tsupport (A.psi i) + +omit [FiniteDimensional ℝ E] in +/-- The carrier of a piece is compact, the image of the compact `tsupport ψ_i` under the chart. -/ +theorem isCompact_pieceCarrier [CompactSpace M] (i : Fin A.n) : IsCompact (A.pieceCarrier i) := + (isClosed_tsupport _).isCompact.image_of_continuousOn ((A.chart i).continuousOn_extend.mono + (by rw [OpenPartialHomeomorph.extend_source]; exact A.tsupport_psi_subset i)) + +omit [FiniteDimensional ℝ E] in +/-- The carrier of a piece lies in `range I`, since the extended charts take values there. -/ +theorem pieceCarrier_subset_range (i : Fin A.n) : A.pieceCarrier i ⊆ range I := by + rintro _ ⟨x, -, rfl⟩ + exact ⟨A.chart i x, rfl⟩ + +omit [FiniteDimensional ℝ E] in +/-- **The piece vanishes off its carrier** (pointwise): `piece_i g (y) = 0` for +`y ∉ κ_i(tsupport ψ_i)`. -/ +theorem piece_eq_zero_of_notMem (i : Fin A.n) (g : M → ℂ) {y : E} (hy : y ∉ A.pieceCarrier i) : + A.piece i g y = 0 := by + by_cases hyt : y ∈ (A.ext i).target + · have hψ : A.psi i ((A.ext i).symm y) = 0 := + image_eq_zero_of_notMem_tsupport fun h => hy ⟨_, h, (A.ext i).right_inv hyt⟩ + rw [piece, indicator_of_mem hyt, hψ, Complex.ofReal_zero, zero_mul] + · rw [piece, indicator_of_notMem hyt] + +omit [FiniteDimensional ℝ E] in +/-- **Pieces of continuous functions are continuous on the model range**: on a compact manifold, +for continuous `g : M → ℂ` the piece `(ψ_i g) ∘ κ_i⁻¹`, extended by `0`, is continuous on +`range I`. Near a point of the carrier it is `(ψ_i g) ∘ κ_i⁻¹` on the target of the extended +chart, a neighbourhood within `range I` (Mathlib's +`OpenPartialHomeomorph.extend_target_mem_nhdsWithin`); off the compact carrier it vanishes +(`Manifold.BesovAtlas.piece_eq_zero_of_notMem`). -/ +theorem continuousOn_piece [CompactSpace M] (i : Fin A.n) {g : M → ℂ} (hg : Continuous g) : + ContinuousOn (A.piece i g) (range I) := by + intro y _ + by_cases hyK : y ∈ A.pieceCarrier i + · obtain ⟨x, hx, rfl⟩ := hyK + have hxs : x ∈ (A.chart i).source := A.tsupport_psi_subset i hx + have hU := (A.chart i).extend_target_mem_nhdsWithin (I := I) hxs + have hyt : A.ext i x ∈ (A.ext i).target := + (A.ext i).map_source (by rw [OpenPartialHomeomorph.extend_source]; exact hxs) + have hcont : ContinuousOn (fun y => (A.psi i ((A.ext i).symm y) : ℂ) * g ((A.ext i).symm y)) + (A.ext i).target := + (Complex.continuous_ofReal.comp_continuousOn ((A.contMDiff_psi i).continuous.comp_continuousOn + (A.chart i).continuousOn_extend_symm)).mul + (hg.comp_continuousOn (A.chart i).continuousOn_extend_symm) + refine ((hcont _ hyt).mono_of_mem_nhdsWithin hU).congr_of_eventuallyEq ?_ ?_ + · filter_upwards [hU] with z hz + rw [piece, indicator_of_mem hz] + · rw [piece, indicator_of_mem hyt] + · have hev : A.piece i g =ᶠ[𝓝 y] fun _ => 0 := by + filter_upwards [(A.isCompact_pieceCarrier i).isClosed.isOpen_compl.mem_nhds hyK] with z hz + exact A.piece_eq_zero_of_notMem i g hz + exact (continuousAt_const.congr hev.symm).continuousWithinAt + +/-! ### Pieces in `L_p` -/ + +section Lp + +variable [MeasurableSpace E] [BorelSpace E] [MeasurableSpace M] [BorelSpace M] + +/-- The pieces of strongly measurable functions are almost everywhere strongly measurable. -/ +theorem aestronglyMeasurable_piece (i : Fin A.n) {g : M → ℂ} (hg : StronglyMeasurable g) : + AEStronglyMeasurable (A.piece i g) volume := by + have hT := measurableSet_extend_target I (A.chart i) + refine (aestronglyMeasurable_indicator_iff hT).2 ?_ + have hκ : AEMeasurable (A.ext i).symm (volume.restrict (A.ext i).target) := + ((A.chart i).continuousOn_extend_symm (I := I)).aemeasurable hT + have hψ : ContinuousOn (fun y => (A.psi i ((A.ext i).symm y) : ℂ)) (A.ext i).target := + Complex.continuous_ofReal.comp_continuousOn ((A.contMDiff_psi i).continuous.comp_continuousOn + (A.chart i).continuousOn_extend_symm) + exact (hψ.aestronglyMeasurable hT).mul (hg.aestronglyMeasurable.comp_aemeasurable hκ) + +variable [CompactSpace M] (μ : Measure M) [IsSmoothMeasure I μ] + +/-- **The pieces are bounded in `L_p`**: `‖piece_i g‖_{L_p(E)} ≤ C ‖g‖_{L_p(μ)}`, since +`0 ≤ ψ_i ≤ 1` and the `L_p` norms on `M` and in the chart are comparable on `tsupport ψ_i` +(`Manifold.IsSmoothMeasure.exists_eLpNorm_chart_le`). -/ +theorem exists_eLpNorm_piece_le (i : Fin A.n) {p : ℝ≥0∞} (hp0 : p ≠ 0) (hp : p ≠ ⊤) : + ∃ C : ℝ≥0∞, C ≠ ⊤ ∧ ∀ g : M → ℂ, StronglyMeasurable g → + eLpNorm (A.piece i g) p volume ≤ C * eLpNorm g p μ := by + obtain ⟨c, _, hc, -, hcmp⟩ := IsSmoothMeasure.exists_eLpNorm_chart_le (I := I) μ (A.chart_mem i) + (isClosed_tsupport _).isCompact (A.tsupport_psi_subset i) hp0 hp (F := ℂ) + refine ⟨c, hc, fun g hg => ?_⟩ + have hψg : StronglyMeasurable fun x => (A.psi i x : ℂ) * g x := + ((A.contMDiff_psi i).continuous.measurable.complex_ofReal.mul hg.measurable).stronglyMeasurable + refine (hcmp _ hψg fun x hx => by + rw [image_eq_zero_of_notMem_tsupport hx, Complex.ofReal_zero, zero_mul]).1.trans + (mul_le_mul' le_rfl (eLpNorm_mono hψg.aestronglyMeasurable fun x => ?_)) + rw [norm_mul, Complex.norm_real, Real.norm_of_nonneg (A.nonneg_psi i x)] + exact mul_le_of_le_one_left (norm_nonneg _) (A.psi_le_one i x) + +variable {p : ℝ≥0∞} [Fact (1 ≤ p)] (hp : p ≠ ⊤) + +include hp in +/-- The pieces of `f ∈ L_p(μ)` are in `L_p(E)`. -/ +theorem memLp_piece (i : Fin A.n) (f : Lp ℂ p μ) : MemLp (A.piece i f) p volume := by + have hp0 : p ≠ 0 := (zero_lt_one.trans_le (Fact.out : 1 ≤ p)).ne' + obtain ⟨C, hC, hle⟩ := A.exists_eLpNorm_piece_le μ i hp0 hp + exact memLp_iff.2 ((hle f (Lp.stronglyMeasurable f)).trans_lt + (ENNReal.mul_lt_top hC.lt_top (Lp.eLpNorm_lt_top f))) + +/-- The **chart piece** of `f ∈ L_p(μ)` as an element of `L_p(E)`. -/ +noncomputable def pieceLp (i : Fin A.n) (f : Lp ℂ p μ) : Lp ℂ p (volume : Measure E) := + (A.memLp_piece μ hp i f).toLp _ + +/-- The chart piece in `L_p(E)` agrees with `(ψ_i f) ∘ κ_i⁻¹` almost everywhere. -/ +theorem pieceLp_ae (i : Fin A.n) (f : Lp ℂ p μ) : A.pieceLp μ hp i f =ᵐ[volume] A.piece i f := + MemLp.coeFn_toLp _ + +end Lp + +/-! ### The change of charts with a cut-off -/ + +section Transition + +variable [IsManifold I ∞ M] [CompactSpace M] + +omit [FiniteDimensional ℝ E] in +/-- **The change of charts with a cut-off** from a chart `e` to a chart `e'` of the atlas, with a +smooth cut-off `c` on `M` whose support lies in both sources: `Φ = κ' ∘ κ⁻¹` with +`χ = c ∘ κ'⁻¹`, as a smooth change of variables with a cut-off on `range I`. -/ +noncomputable def chartChange {e e' : OpenPartialHomeomorph M H} (he : e ∈ atlas H M) + (he' : e' ∈ atlas H M) (c : M → ℝ) (hc : ContMDiff I 𝓘(ℝ, ℝ) ∞ c) + (hcs : tsupport c ⊆ e.source ∩ e'.source) : Rd.CutoffDiffeo (range I) where + U := I.symm ⁻¹' (e.symm ≫ₕ e').source + U' := I.symm ⁻¹' (e.symm ≫ₕ e').target + isOpen_U := I.continuous_symm.isOpen_preimage _ (OpenPartialHomeomorph.open_source _) + isOpen_U' := I.continuous_symm.isOpen_preimage _ (OpenPartialHomeomorph.open_target _) + Phi := I.extendCoordChange e e' + Psi := (I.extendCoordChange e e').symm + chi := (e'.extend I).target.indicator fun y => (c ((e'.extend I).symm y) : ℂ) + K0 := e'.extend I '' tsupport c + contDiffOn_Phi := by + rw [range_inter_coordChange_source] + exact I.contDiffOn_extendCoordChange (IsManifold.subset_maximalAtlas he) + (IsManifold.subset_maximalAtlas he') + contDiffOn_Psi := by + rw [range_inter_coordChange_target] + exact I.contDiffOn_extendCoordChange_symm (IsManifold.subset_maximalAtlas he) + (IsManifold.subset_maximalAtlas he') + contDiffOn_chi := by + rw [range_inter_coordChange_target] + have hsub : (I.extendCoordChange e e').target ⊆ (e'.extend I).target := by + rw [coordChange_target_eq_image] + rintro _ ⟨x, hx, rfl⟩ + exact (e'.extend I).map_source (by rw [OpenPartialHomeomorph.extend_source]; exact hx.1) + have hsm := Complex.ofRealCLM.contDiff.comp_contDiffOn (contDiffOn_comp_extend_symm he' hc) + refine (hsm.mono hsub).congr fun y hy => ?_ + rw [indicator_of_mem (hsub hy)] + rfl + mapsTo_Phi := by + rw [range_inter_coordChange_source, range_inter_coordChange_target] + exact (I.extendCoordChange e e').mapsTo + mapsTo_Psi := by + rw [range_inter_coordChange_source, range_inter_coordChange_target] + exact (I.extendCoordChange e e').mapsTo_symm + left_inv x hx := by + rw [range_inter_coordChange_source] at hx + exact (I.extendCoordChange e e').left_inv hx + right_inv y hy := by + rw [range_inter_coordChange_target] at hy + exact (I.extendCoordChange e e').right_inv hy + isCompact_K0 := (isClosed_tsupport c).isCompact.image_of_continuousOn + (e'.continuousOn_extend.mono (by + rw [OpenPartialHomeomorph.extend_source] + exact hcs.trans inter_subset_right)) + K0_subset := by + rw [range_inter_coordChange_target, coordChange_target_eq_image] + exact image_mono fun x hx => ⟨(hcs hx).2, (hcs hx).1⟩ + chi_eq_zero y _ hyK := by + by_cases hy : y ∈ (e'.extend I).target + · rw [indicator_of_mem hy] + by_contra h + have hne : c ((e'.extend I).symm y) ≠ 0 := fun h0 => h (by rw [h0, Complex.ofReal_zero]) + exact hyK ⟨(e'.extend I).symm y, subset_tsupport _ hne, (e'.extend I).right_inv hy⟩ + · exact indicator_of_notMem hy _ + +omit [FiniteDimensional ℝ E] in +/-- The change of charts with a cut-off acts on the source of the change of charts: +`T G = 1_{κ(s ∩ s')} (χ G) ∘ Φ`. -/ +theorem chartChange_apply {e e' : OpenPartialHomeomorph M H} (he : e ∈ atlas H M) + (he' : e' ∈ atlas H M) (c : M → ℝ) (hc : ContMDiff I 𝓘(ℝ, ℝ) ∞ c) + (hcs : tsupport c ⊆ e.source ∩ e'.source) (G : E → ℂ) (y : E) : + (chartChange he he' c hc hcs).apply G y = (I.extendCoordChange e e').source.indicator + (fun y => (chartChange he he' c hc hcs).chi (I.extendCoordChange e e' y) * + G (I.extendCoordChange e e' y)) y := by + rw [Rd.CutoffDiffeo.apply, ← range_inter_coordChange_source] + rfl + +variable (A' : BesovAtlas I M) + +omit [FiniteDimensional ℝ E] [IsManifold I ∞ M] [CompactSpace M] in +/-- The cut-off `ψ_i θ'_j` of two atlases has its support in both sources. -/ +theorem tsupport_psi_mul_theta_subset (i : Fin A.n) (j : Fin A'.n) : + tsupport (fun x => A.psi i x * A'.theta j x) ⊆ (A.chart i).source ∩ (A'.chart j).source := + subset_inter (tsupport_mul_subset_left.trans (A.tsupport_psi_subset i)) + (tsupport_mul_subset_right.trans (A'.tsupport_theta_subset j)) + +/-- The **change of charts** from the `i`-th chart of `A` to the `j`-th chart of `A'`, with the +cut-off `(ψ_i θ'_j) ∘ κ'_j⁻¹`, as a smooth change of variables with a cut-off on `range I`. -/ +noncomputable def transition (i : Fin A.n) (j : Fin A'.n) : Rd.CutoffDiffeo (range I) := + chartChange (A.chart_mem i) (A'.chart_mem j) (fun x => A.psi i x * A'.theta j x) + ((A.contMDiff_psi i).mul (A'.contMDiff_theta j)) (A.tsupport_psi_mul_theta_subset A' i j) + +omit [FiniteDimensional ℝ E] in +/-- The change of charts acts on the source of the change of charts: +`T_{ij} G = 1_{κ_i(s_i ∩ s'_j)} (χ G) ∘ Φ`. -/ +theorem transition_apply (i : Fin A.n) (j : Fin A'.n) (G : E → ℂ) (y : E) : + (A.transition A' i j).apply G y = + (I.extendCoordChange (A.chart i) (A'.chart j)).source.indicator + (fun y => (A.transition A' i j).chi (I.extendCoordChange (A.chart i) (A'.chart j) y) * + G (I.extendCoordChange (A.chart i) (A'.chart j) y)) y := by + exact chartChange_apply _ _ _ _ _ G y + +omit [FiniteDimensional ℝ E] in +/-- **The change of charts at a point of both sources**: for `y = κ_i x` with `x` in the source +of `κ'_j`, `T_{ij} G (y) = ψ_i(x) θ'_j(x) G(κ'_j x)`. -/ +theorem transition_apply_of_mem (i : Fin A.n) (j : Fin A'.n) (G : E → ℂ) {y : E} + (hy : y ∈ (A.ext i).target) (hx : (A.ext i).symm y ∈ (A'.chart j).source) : + (A.transition A' i j).apply G y = ((A.psi i ((A.ext i).symm y) * + A'.theta j ((A.ext i).symm y) : ℝ) : ℂ) * G (A'.ext j ((A.ext i).symm y)) := by + have hx' : (A.ext i).symm y ∈ (A'.ext j).source := by rwa [OpenPartialHomeomorph.extend_source] + rw [transition_apply, indicator_of_mem ((mem_coordChange_source _ _).2 ⟨hy, hx⟩), + coordChange_apply] + simp only [transition, chartChange] + rw [indicator_of_mem ((A'.ext j).map_source hx'), (A'.ext j).left_inv hx'] + +omit [FiniteDimensional ℝ E] in +/-- **The change of charts off the common sources**: `T_{ij} G (y) = 0` unless `y = κ_i x` with `x` +in the source of `κ'_j`. -/ +theorem transition_apply_of_notMem (i : Fin A.n) (j : Fin A'.n) (G : E → ℂ) {y : E} + (h : y ∈ (A.ext i).target → (A.ext i).symm y ∉ (A'.chart j).source) : + (A.transition A' i j).apply G y = 0 := by + rw [transition_apply, indicator_of_notMem fun h' => ?_] + obtain ⟨h1, h2⟩ := (mem_coordChange_source _ _).1 h' + exact h h1 h2 + +omit [FiniteDimensional ℝ E] in +/-- **The pieces of two atlases** (pointwise): `piece_i g = ∑_j T_{ij}(piece'_j g)`, since +`ψ_i g = ∑_j ψ_i ψ'_j g` and `θ'_j ψ'_j = ψ'_j` (`Manifold.BesovAtlas.transition_apply_of_mem`). -/ +theorem piece_eq_sum_apply (i : Fin A.n) (g : M → ℂ) (y : E) : + A.piece i g y = ∑ j, (A.transition A' i j).apply (A'.piece j g) y := by + by_cases hy : y ∈ (A.ext i).target + · set x := (A.ext i).symm y + have hterm : ∀ j, (A.transition A' i j).apply (A'.piece j g) y = + (A.psi i x : ℂ) * (A'.psi j x : ℂ) * g x := fun j => by + by_cases hxj : x ∈ (A'.chart j).source + · have hxj' : x ∈ (A'.ext j).source := by rwa [OpenPartialHomeomorph.extend_source] + rw [A.transition_apply_of_mem A' i j _ hy hxj, piece, + indicator_of_mem ((A'.ext j).map_source hxj'), (A'.ext j).left_inv hxj'] + push_cast + have h := congrArg (fun t : ℝ => (t : ℂ)) (A'.theta_mul_psi j x) + push_cast at h + linear_combination (A.psi i x : ℂ) * g x * h + · have hψ : A'.psi j x = 0 := + image_eq_zero_of_notMem_tsupport fun h => hxj (A'.tsupport_psi_subset j h) + rw [A.transition_apply_of_notMem A' i j _ fun _ => hxj, hψ, Complex.ofReal_zero, mul_zero, + zero_mul] + rw [Finset.sum_congr rfl fun j _ => hterm j, ← Finset.sum_mul, ← Finset.mul_sum, + ← Complex.ofReal_sum, A'.sum_psi, Complex.ofReal_one, mul_one, piece, indicator_of_mem hy] + · rw [piece, indicator_of_notMem hy] + exact (Finset.sum_eq_zero fun j _ => + A.transition_apply_of_notMem A' i j _ fun h => (hy h).elim).symm + +variable [MeasurableSpace E] [BorelSpace E] [MeasurableSpace M] [BorelSpace M] (μ : Measure M) + [IsSmoothMeasure I μ] [hB : Rd.BesovDomain (range I)] {p : ℝ≥0∞} [Fact (1 ≤ p)] (hp : p ≠ ⊤) + +/-- **The pieces of two atlases in `L_p`**: `piece_i f = ∑_j T_{ij}(piece'_j f)`, with the changes +of charts acting on `L_p(E)`. -/ +theorem pieceLp_eq_sum (i : Fin A.n) (f : Lp ℂ p μ) : + A.pieceLp μ hp i f = ∑ j, (A.transition A' i j).applyLp hB.convex hB.interior_nonempty + (Rd.BesovDomain.measurableSet (range I)) hp (A'.pieceLp μ hp j f) := by + refine Lp.ext ?_ + have h3 : ∀ᵐ y ∂volume, ∀ j, (A.transition A' i j).applyLp hB.convex hB.interior_nonempty + (Rd.BesovDomain.measurableSet (range I)) hp (A'.pieceLp μ hp j f) y = + (A.transition A' i j).apply (A'.piece j f) y := + ae_all_iff.2 fun j => ((A.transition A' i j).applyLp_ae hB.convex hB.interior_nonempty + (Rd.BesovDomain.measurableSet (range I)) hp _).trans + ((A.transition A' i j).apply_ae_eq ((A'.pieceLp_ae μ hp j f).mono fun y hy _ => hy)) + filter_upwards [A.pieceLp_ae μ hp i f, Lp.coeFn_fun_finsetSum Finset.univ + (fun j => (A.transition A' i j).applyLp hB.convex hB.interior_nonempty + (Rd.BesovDomain.measurableSet (range I)) hp (A'.pieceLp μ hp j f)), h3] with y hy1 hy2 hy3 + rw [hy1, hy2, A.piece_eq_sum_apply A' i f y] + exact Finset.sum_congr rfl fun j _ => (hy3 j).symm + +end Transition + +end BesovAtlas + +/-! ### Functions from a chart -/ + +section ChartLift + +variable (I) in +/-- The **lift from a chart**: `θ · F ∘ κ` on the source of the chart `e`, `0` outside, for a +cut-off `θ` on `M` and `F : E → ℂ`. -/ +noncomputable def chartLift (e : OpenPartialHomeomorph M H) (θ : M → ℝ) (F : E → ℂ) : M → ℂ := + e.source.indicator fun x => (θ x : ℂ) * F (e.extend I x) + +omit [FiniteDimensional ℝ E] [ChartedSpace H M] in +/-- The lift from a chart is additive in the function on `E`. -/ +theorem chartLift_add (e : OpenPartialHomeomorph M H) (θ : M → ℝ) (F G : E → ℂ) : + chartLift I e θ (F + G) = chartLift I e θ F + chartLift I e θ G := by + funext x + by_cases hx : x ∈ e.source + · simp only [chartLift, indicator_of_mem hx, Pi.add_apply, mul_add] + · simp only [chartLift, indicator_of_notMem hx, Pi.add_apply, add_zero] + +omit [FiniteDimensional ℝ E] [ChartedSpace H M] in +/-- The lift from a chart is homogeneous in the function on `E`. -/ +theorem chartLift_smul (e : OpenPartialHomeomorph M H) (θ : M → ℝ) (c : ℂ) (F : E → ℂ) : + chartLift I e θ (c • F) = c • chartLift I e θ F := by + funext x + by_cases hx : x ∈ e.source + · simp only [chartLift, indicator_of_mem hx, Pi.smul_apply, smul_eq_mul] + ring + · simp only [chartLift, indicator_of_notMem hx, Pi.smul_apply, smul_zero] + +variable [MeasurableSpace E] [BorelSpace E] [MeasurableSpace M] [BorelSpace M] + +omit [FiniteDimensional ℝ E] [ChartedSpace H M] in +/-- The lift from a chart is strongly measurable for continuous `θ` and strongly measurable `F`, +since `κ`, set to `0` off the open source, is measurable +(`Manifold.measurable_piecewise_extend`). -/ +theorem stronglyMeasurable_chartLift (e : OpenPartialHomeomorph M H) {θ : M → ℝ} + (hθ : Continuous θ) {F : E → ℂ} (hF : StronglyMeasurable F) : + StronglyMeasurable (chartLift I e θ F) := by + classical + have h : chartLift I e θ F = e.source.indicator fun x => + (θ x : ℂ) * F (e.source.piecewise (e.extend I) (fun _ => (0 : E)) x) := by + funext x + by_cases hx : x ∈ e.source + · rw [chartLift, indicator_of_mem hx, indicator_of_mem hx, piecewise_eq_of_mem _ _ _ hx] + · rw [chartLift, indicator_of_notMem hx, indicator_of_notMem hx] + rw [h] + exact ((Complex.continuous_ofReal.comp hθ).stronglyMeasurable.mul + (hF.comp_measurable (measurable_piecewise_extend I e))).indicator + e.open_source.measurableSet + +/-- **The lift from a chart sees only classes**: if `F = G` almost everywhere on `E`, then +`θ · F ∘ κ = θ · G ∘ κ` `μ`-almost everywhere, for every `θ` with `tsupport θ ⊆ e.source` +(`Manifold.IsSmoothMeasure.ae_comp_extend` on `tsupport θ`). -/ +theorem chartLift_ae_eq [CompactSpace M] {μ : Measure M} [IsSmoothMeasure I μ] + {e : OpenPartialHomeomorph M H} (he : e ∈ atlas H M) {θ : M → ℝ} + (hθs : tsupport θ ⊆ e.source) {F G : E → ℂ} (h : F =ᵐ[volume] G) : + chartLift I e θ F =ᵐ[μ] chartLift I e θ G := by + filter_upwards [IsSmoothMeasure.ae_comp_extend (I := I) (μ := μ) he (isClosed_tsupport θ) hθs h] + with x hx + by_cases hxs : x ∈ e.source + · simp only [chartLift, indicator_of_mem hxs] + by_cases hxt : x ∈ tsupport θ + · rw [hx hxt] + · rw [image_eq_zero_of_notMem_tsupport hxt, Complex.ofReal_zero, zero_mul, zero_mul] + · simp only [chartLift, indicator_of_notMem hxs] + +/-- **The lift from a chart is bounded in `L_p`**: for a chart `e` of the atlas, a continuous +cut-off `θ` with `tsupport θ ⊆ e.source`, a smooth measure `μ` and `0 < p < ∞` there is `C < ∞` +with `‖θ · F ∘ κ‖_{L_p(μ)} ≤ C ‖F‖_{L_p(E)}` for every strongly measurable `F`. The `L_p` norms on +`M` and in the chart are comparable on `tsupport θ` +(`Manifold.IsSmoothMeasure.exists_eLpNorm_chart_le`), and `|θ| ≤ B` on the compact `M`. -/ +theorem exists_eLpNorm_chartLift_le [CompactSpace M] (μ : Measure M) [IsSmoothMeasure I μ] + {e : OpenPartialHomeomorph M H} (he : e ∈ atlas H M) {θ : M → ℝ} (hθ : Continuous θ) + (hθs : tsupport θ ⊆ e.source) {p : ℝ≥0∞} (hp0 : p ≠ 0) (hp : p ≠ ⊤) : + ∃ C : ℝ≥0∞, C ≠ ⊤ ∧ ∀ F : E → ℂ, StronglyMeasurable F → + eLpNorm (chartLift I e θ F) p μ ≤ C * eLpNorm F p volume := by + obtain ⟨_, C, -, hC, hle⟩ := IsSmoothMeasure.exists_eLpNorm_chart_le (I := I) μ he + (isClosed_tsupport θ).isCompact hθs hp0 hp (F := ℂ) + obtain ⟨B, hB⟩ := isCompact_univ.exists_bound_of_continuousOn hθ.continuousOn + refine ⟨C * ENNReal.ofReal (max B 0), ENNReal.mul_ne_top hC ENNReal.ofReal_ne_top, + fun F hF => ?_⟩ + have hm := stronglyMeasurable_chartLift (I := I) e hθ hF + have hT := measurableSet_extend_target I e + have hmT : AEStronglyMeasurable ((e.extend I).target.indicator + fun y => chartLift I e θ F ((e.extend I).symm y)) volume := + (aestronglyMeasurable_indicator_iff hT).2 (hm.aestronglyMeasurable.comp_aemeasurable + ((e.continuousOn_extend_symm (I := I)).aemeasurable hT)) + refine (hle _ hm fun x hx => ?_).2.trans ?_ + · by_cases hxs : x ∈ e.source + · rw [chartLift, indicator_of_mem hxs, image_eq_zero_of_notMem_tsupport hx, + Complex.ofReal_zero, zero_mul] + · rw [chartLift, indicator_of_notMem hxs] + rw [mul_assoc] + refine mul_le_mul' le_rfl (eLpNorm_le_mul_eLpNorm_of_ae_le_mul hmT (ae_of_all _ fun y => ?_) p) + by_cases hy : y ∈ (e.extend I).target + · have hx : (e.extend I).symm y ∈ e.source := by + simpa only [e.extend_source] using (e.extend I).map_target hy + rw [indicator_of_mem hy, chartLift, indicator_of_mem hx, (e.extend I).right_inv hy, + norm_mul, Complex.norm_real] + exact mul_le_mul_of_nonneg_right ((hB _ (mem_univ _)).trans (le_max_left B 0)) + (norm_nonneg _) + · rw [indicator_of_notMem hy, norm_zero] + exact mul_nonneg (le_max_right B 0) (norm_nonneg _) + +/-- **The lift from a chart is in `L_p(μ)`** for `F ∈ L_p(E)`, a continuous cut-off `θ` with +`tsupport θ ⊆ e.source` and a smooth measure `μ`, by the `L_p` bound +(`Manifold.exists_eLpNorm_chartLift_le`). -/ +theorem memLp_chartLift [CompactSpace M] (μ : Measure M) [IsSmoothMeasure I μ] + {e : OpenPartialHomeomorph M H} (he : e ∈ atlas H M) {θ : M → ℝ} (hθ : Continuous θ) + (hθs : tsupport θ ⊆ e.source) {p : ℝ≥0∞} (hp0 : p ≠ 0) (hp : p ≠ ⊤) {F : E → ℂ} + (hFm : StronglyMeasurable F) (hF : MemLp F p volume) : MemLp (chartLift I e θ F) p μ := by + obtain ⟨C, hC, hle⟩ := exists_eLpNorm_chartLift_le (I := I) μ he hθ hθs hp0 hp + exact memLp_iff.2 ((hle F hFm).trans_lt (ENNReal.mul_lt_top hC.lt_top hF.eLpNorm_lt_top)) + +end ChartLift + +namespace BesovAtlas + +variable (A : BesovAtlas I M) [IsManifold I ∞ M] [CompactSpace M] + +omit [FiniteDimensional ℝ E] in +/-- **The pieces of a lift from a chart**: `piece_i (θ_k · F ∘ κ_k) = T_{ik} F` pointwise, for the +change of charts `T_{ik}` with the cut-off `ψ_i θ_k` (`Manifold.BesovAtlas.transition_apply_of_mem`, +`Manifold.BesovAtlas.transition_apply_of_notMem`). -/ +theorem piece_chartLift (i k : Fin A.n) (F : E → ℂ) : + A.piece i (chartLift I (A.chart k) (A.theta k) F) = (A.transition A i k).apply F := by + funext y + by_cases hy : y ∈ (A.ext i).target + · by_cases hxk : (A.ext i).symm y ∈ (A.chart k).source + · rw [A.transition_apply_of_mem A i k F hy hxk, piece, indicator_of_mem hy, chartLift, + indicator_of_mem hxk] + push_cast + ring + · rw [A.transition_apply_of_notMem A i k F fun _ => hxk, piece, indicator_of_mem hy, chartLift, + indicator_of_notMem hxk, mul_zero] + · rw [A.transition_apply_of_notMem A i k F fun h => (hy h).elim, piece, indicator_of_notMem hy] + +end BesovAtlas + +end Manifold diff --git a/LeanPool/FunctionSpaces/Domains/Manifolds/BoundaryBesov.lean b/LeanPool/FunctionSpaces/Domains/Manifolds/BoundaryBesov.lean new file mode 100644 index 0000000000..0e63552221 --- /dev/null +++ b/LeanPool/FunctionSpaces/Domains/Manifolds/BoundaryBesov.lean @@ -0,0 +1,347 @@ +/- +Copyright (c) 2026 Mario Ullrich. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Mario Ullrich +-/ +module + +public import LeanPool.FunctionSpaces.Domains.Manifolds.SmoothDomain +public import LeanPool.FunctionSpaces.Domains.Traces.HalfSpaceTrace +public import Mathlib.Geometry.Manifold.IsManifold.InteriorBoundary + +/- +Modified for Lean Pool: module names and imports adapted. +-/ + +/-! +# Besov spaces on the boundary of a compact manifold + +Let `M` be a compact manifold with boundary modelled on the half-space `𝓡∂ n`. The boundary of +the half-space is the hyperplane `H₀ = {y : y_0 = 0}` (`Manifold.bdry`), and the changes of charts +map `H₀` into itself (`Manifold.coordChange_mem_bdry`): a point is mapped to the interior of the +half-space by one chart iff by every chart (Mathlib's +`ModelWithCorners.mem_interior_range_iff_of_mem_atlas`). Restricted to `H₀`, a change of charts +with a cut-off is a smooth change of variables with a cut-off on the whole hyperplane +(`Manifold.boundaryChartChange`). + +The **boundary pieces** of `g : M → ℂ` are the restrictions of the chart pieces to `H₀` +(`Manifold.BesovAtlas.boundaryPiece`), and `g ∈ B^s_{p,q}(∂M)` if every boundary piece agrees +almost everywhere with a function of finite Besov quasi-norm on `H₀` +(`Manifold.BesovAtlas.MemBoundaryBesov`). This does not depend on the atlas +(`Manifold.BesovAtlas.memBoundaryBesov_iff_memBoundaryBesov`): the boundary pieces of two atlases +are related by the boundary changes of charts, which are bounded on `B^s_{p,q}(H₀)`. +-/ + +@[expose] public section + +open MeasureTheory Set Filter Topology +open scoped ENNReal Manifold ContDiff + +open ENNReal (lqNorm dyadicWeight) + +namespace Manifold + +variable {n : ℕ} [NeZero n] + +/-! ### The boundary hyperplane -/ + +/-- The flat graph domain `{y : y_0 > 0}` of `ℝ^n`. -/ +noncomputable abbrev flatDomain (n : ℕ) [NeZero n] : + Rd.LipschitzGraph (EuclideanSpace ℝ (Fin n)) := + Rd.LipschitzGraph.flat Rd.e0 Rd.norm_e0 + +/-- The **boundary hyperplane** `H₀ = e₀^⊥ = {y : y_0 = 0}` of the half-space. -/ +noncomputable abbrev bdry (n : ℕ) [NeZero n] : Submodule ℝ (EuclideanSpace ℝ (Fin n)) := + (flatDomain n).hyperplane + +/-- `y ∈ H₀ ↔ y_0 = 0`. -/ +theorem mem_bdry_iff {y : EuclideanSpace ℝ (Fin n)} : y ∈ bdry n ↔ y 0 = 0 := by + rw [Submodule.mem_orthogonal_singleton_iff_inner_right, real_inner_comm, + Rd.coord_zero_eq_inner] + rfl + +/-- The boundary hyperplane lies in the half-space. -/ +theorem bdry_subset_range : + ((bdry n : Set (EuclideanSpace ℝ (Fin n)))) ⊆ range (𝓡∂ n) := fun y hy => by + rw [range_modelWithCornersEuclideanHalfSpace] + exact (mem_bdry_iff.1 hy).ge + +/-- The projection onto `H₀` is the identity on `H₀`. -/ +theorem coe_proj_of_mem_bdry {y : EuclideanSpace ℝ (Fin n)} (hy : y ∈ bdry n) : + ((flatDomain n).proj y : EuclideanSpace ℝ (Fin n)) = y := by + have h := (flatDomain n).proj_coe ⟨y, hy⟩ + rw [show ((⟨y, hy⟩ : bdry n) : EuclideanSpace ℝ (Fin n)) = y from rfl] at h + rw [h] + +variable {M : Type*} [TopologicalSpace M] [ChartedSpace (EuclideanHalfSpace n) M] + +omit [ChartedSpace (EuclideanHalfSpace n) M] in +/-- **Interior points of a chart target**: a point of the target of an extended chart lies in its +interior iff its first coordinate is positive. -/ +theorem mem_interior_extend_target_iff {e : OpenPartialHomeomorph M (EuclideanHalfSpace n)} + {y : EuclideanSpace ℝ (Fin n)} (hy : y ∈ (e.extend (𝓡∂ n)).target) : + y ∈ interior (e.extend (𝓡∂ n)).target ↔ 0 < y 0 := by + constructor + · intro h + have h1 := interior_mono e.extend_target_subset_range h + rw [interior_range_modelWithCornersEuclideanHalfSpace] at h1 + exact h1 + · intro h + rw [e.extend_target] at hy ⊢ + refine mem_interior.2 ⟨{w | 0 < w 0} ∩ (𝓡∂ n).symm ⁻¹' e.target, fun w hw => ⟨hw.2, ?_⟩, + (isOpen_lt continuous_const ((PiLp.continuous_apply 2 _ 0))).inter + ((𝓡∂ n).continuous_symm.isOpen_preimage _ e.open_target), h, hy.1⟩ + rw [range_modelWithCornersEuclideanHalfSpace] + exact le_of_lt (show (0 : ℝ) < w 0 from hw.1) + +/-- **Changes of charts preserve the boundary hyperplane**: if `y_0 = 0` in the source of the +change of charts from `e` to `e'`, the image has first coordinate `0`. -/ +theorem coordChange_mem_bdry [IsManifold (𝓡∂ n) ∞ M] + {e e' : OpenPartialHomeomorph M (EuclideanHalfSpace n)} (he : e ∈ atlas _ M) + (he' : e' ∈ atlas _ M) {y : EuclideanSpace ℝ (Fin n)} + (hy : y ∈ ((𝓡∂ n).extendCoordChange e e').source) (hyb : y ∈ bdry n) : + (𝓡∂ n).extendCoordChange e e' y ∈ bdry n := by + obtain ⟨hy1, hy2⟩ := (mem_coordChange_source e e').1 hy + set x := (e.extend (𝓡∂ n)).symm y + have hx : x ∈ e.source := by + have := (e.extend (𝓡∂ n)).map_target hy1 + rwa [e.extend_source] at this + have hxy : e.extend (𝓡∂ n) x = y := (e.extend (𝓡∂ n)).right_inv hy1 + have hx' : e'.extend (𝓡∂ n) x ∈ (e'.extend (𝓡∂ n)).target := + (e'.extend (𝓡∂ n)).map_source (by rwa [e'.extend_source]) + have hiff := (𝓡∂ n).mem_interior_range_iff_of_mem_atlas (n := ∞) (by simp) he he' hx hy2 + rw [hxy, mem_interior_extend_target_iff hy1, mem_interior_extend_target_iff hx'] at hiff + have h0 : ¬ 0 < y 0 := by rw [mem_bdry_iff.1 hyb]; exact lt_irrefl 0 + have hge : 0 ≤ e'.extend (𝓡∂ n) x 0 := by + have := (e'.extend_target_subset_range (I := 𝓡∂ n)) hx' + rwa [range_modelWithCornersEuclideanHalfSpace] at this + rw [coordChange_apply, mem_bdry_iff] + exact le_antisymm (not_lt.1 fun h => h0 (hiff.2 h)) hge + +/-! ### Changes of charts on the boundary -/ + +section BoundaryChange + +variable [IsManifold (𝓡∂ n) ∞ M] [CompactSpace M] + {e e' : OpenPartialHomeomorph M (EuclideanHalfSpace n)} (he : e ∈ atlas _ M) + (he' : e' ∈ atlas _ M) (c : M → ℝ) (hc : ContMDiff (𝓡∂ n) 𝓘(ℝ, ℝ) ∞ c) + (hcs : tsupport c ⊆ e.source ∩ e'.source) + +omit [ChartedSpace (EuclideanHalfSpace n) M] [IsManifold (𝓡∂ n) ∞ M] [CompactSpace M] in +/-- A point of `H₀` lies in `range I ∩ U` iff it lies in the source of the change of charts. -/ +theorem mem_coordChange_source_iff_of_bdry (x' : bdry n) : + (x' : EuclideanSpace ℝ (Fin n)) ∈ (𝓡∂ n).symm ⁻¹' (e.symm ≫ₕ e').source ↔ + (x' : EuclideanSpace ℝ (Fin n)) ∈ ((𝓡∂ n).extendCoordChange e e').source := by + rw [← range_inter_coordChange_source] + exact ⟨fun h => ⟨bdry_subset_range x'.2, h⟩, fun h => h.2⟩ + +omit [ChartedSpace (EuclideanHalfSpace n) M] [IsManifold (𝓡∂ n) ∞ M] [CompactSpace M] in +/-- A point of `H₀` lies in `range I ∩ U'` iff it lies in the target of the change of charts. -/ +theorem mem_coordChange_target_iff_of_bdry (y' : bdry n) : + (y' : EuclideanSpace ℝ (Fin n)) ∈ (𝓡∂ n).symm ⁻¹' (e.symm ≫ₕ e').target ↔ + (y' : EuclideanSpace ℝ (Fin n)) ∈ ((𝓡∂ n).extendCoordChange e e').target := by + rw [← range_inter_coordChange_target] + exact ⟨fun h => ⟨bdry_subset_range y'.2, h⟩, fun h => h.2⟩ + +omit [CompactSpace M] in +include he he' in +/-- The change of charts maps the boundary part of its source into `H₀`. -/ +theorem coe_proj_coordChange {x' : bdry n} + (hx : (x' : EuclideanSpace ℝ (Fin n)) ∈ ((𝓡∂ n).extendCoordChange e e').source) : + ((flatDomain n).proj ((𝓡∂ n).extendCoordChange e e' x') : EuclideanSpace ℝ (Fin n)) = + (𝓡∂ n).extendCoordChange e e' x' := + coe_proj_of_mem_bdry (coordChange_mem_bdry he he' hx x'.2) + +omit [CompactSpace M] in +include he he' in +/-- The inverse change of charts maps the boundary part of its target into `H₀`. -/ +theorem coe_proj_coordChange_symm {y' : bdry n} + (hy : (y' : EuclideanSpace ℝ (Fin n)) ∈ ((𝓡∂ n).extendCoordChange e e').target) : + ((flatDomain n).proj (((𝓡∂ n).extendCoordChange e e').symm y') : + EuclideanSpace ℝ (Fin n)) = ((𝓡∂ n).extendCoordChange e e').symm y' := by + have hy' : (y' : EuclideanSpace ℝ (Fin n)) ∈ ((𝓡∂ n).extendCoordChange e' e).source := hy + exact coe_proj_coordChange he' he hy' + +/-- The boundary hyperplane is closed. -/ +theorem isClosed_bdry : IsClosed ((bdry n : Set (EuclideanSpace ℝ (Fin n)))) := + Submodule.isClosed_of_finiteDimensional _ + +/-- The **boundary change of charts with a cut-off**: the restriction of the change of charts with +a cut-off to the boundary hyperplane `H₀`, a smooth change of variables with a cut-off on all of +`H₀`. -/ +noncomputable def boundaryChartChange : Rd.CutoffDiffeo (Set.univ : Set (bdry n)) where + U := (fun x' : bdry n => (x' : EuclideanSpace ℝ (Fin n))) ⁻¹' + ((𝓡∂ n).symm ⁻¹' (e.symm ≫ₕ e').source) + U' := (fun y' : bdry n => (y' : EuclideanSpace ℝ (Fin n))) ⁻¹' + ((𝓡∂ n).symm ⁻¹' (e.symm ≫ₕ e').target) + isOpen_U := (BesovAtlas.chartChange he he' c hc hcs).isOpen_U.preimage continuous_subtype_val + isOpen_U' := (BesovAtlas.chartChange he he' c hc hcs).isOpen_U'.preimage continuous_subtype_val + Phi x' := (flatDomain n).proj ((𝓡∂ n).extendCoordChange e e' x') + Psi y' := (flatDomain n).proj (((𝓡∂ n).extendCoordChange e e').symm y') + chi y' := (BesovAtlas.chartChange he he' c hc hcs).chi y' + K0 := (fun y' : bdry n => (y' : EuclideanSpace ℝ (Fin n))) ⁻¹' + (BesovAtlas.chartChange he he' c hc hcs).K0 + contDiffOn_Phi := by + refine (flatDomain n).proj.contDiff.comp_contDiffOn + ((BesovAtlas.chartChange he he' c hc hcs).contDiffOn_Phi.comp + (bdry n).subtypeL.contDiff.contDiffOn fun x' hx' => ?_) + exact ⟨bdry_subset_range x'.2, hx'.2⟩ + contDiffOn_Psi := by + refine (flatDomain n).proj.contDiff.comp_contDiffOn + ((BesovAtlas.chartChange he he' c hc hcs).contDiffOn_Psi.comp + (bdry n).subtypeL.contDiff.contDiffOn fun y' hy' => ?_) + exact ⟨bdry_subset_range y'.2, hy'.2⟩ + contDiffOn_chi := by + refine (BesovAtlas.chartChange he he' c hc hcs).contDiffOn_chi.comp + (bdry n).subtypeL.contDiff.contDiffOn fun y' hy' => ?_ + exact ⟨bdry_subset_range y'.2, hy'.2⟩ + mapsTo_Phi x' hx' := by + have hx : (x' : EuclideanSpace ℝ (Fin n)) ∈ ((𝓡∂ n).extendCoordChange e e').source := + (mem_coordChange_source_iff_of_bdry x').1 hx'.2 + refine ⟨mem_univ _, ?_⟩ + change (((flatDomain n).proj ((𝓡∂ n).extendCoordChange e e' x') : bdry n) : + EuclideanSpace ℝ (Fin n)) ∈ (𝓡∂ n).symm ⁻¹' (e.symm ≫ₕ e').target + rw [coe_proj_coordChange he he' hx] + have := (BesovAtlas.chartChange he he' c hc hcs).mapsTo_Phi ⟨bdry_subset_range x'.2, hx'.2⟩ + exact this.2 + mapsTo_Psi y' hy' := by + have hy : (y' : EuclideanSpace ℝ (Fin n)) ∈ ((𝓡∂ n).extendCoordChange e e').target := + (mem_coordChange_target_iff_of_bdry y').1 hy'.2 + refine ⟨mem_univ _, ?_⟩ + change (((flatDomain n).proj (((𝓡∂ n).extendCoordChange e e').symm y') : bdry n) : + EuclideanSpace ℝ (Fin n)) ∈ (𝓡∂ n).symm ⁻¹' (e.symm ≫ₕ e').source + rw [coe_proj_coordChange_symm he he' hy] + have := (BesovAtlas.chartChange he he' c hc hcs).mapsTo_Psi ⟨bdry_subset_range y'.2, hy'.2⟩ + exact this.2 + left_inv x' hx' := by + have hx : (x' : EuclideanSpace ℝ (Fin n)) ∈ ((𝓡∂ n).extendCoordChange e e').source := + (mem_coordChange_source_iff_of_bdry x').1 hx'.2 + apply Subtype.ext + have h1 := coe_proj_coordChange he he' hx + have hmem : ((𝓡∂ n).extendCoordChange e e' x') ∈ ((𝓡∂ n).extendCoordChange e e').target := + ((𝓡∂ n).extendCoordChange e e').map_source hx + have h2 := coe_proj_coordChange_symm he he' + (y' := (flatDomain n).proj ((𝓡∂ n).extendCoordChange e e' x')) (by rw [h1]; exact hmem) + change (((flatDomain n).proj (((𝓡∂ n).extendCoordChange e e').symm + (((flatDomain n).proj ((𝓡∂ n).extendCoordChange e e' x') : bdry n) : + EuclideanSpace ℝ (Fin n))) : bdry n) : EuclideanSpace ℝ (Fin n)) = x' + rw [h2, h1, ((𝓡∂ n).extendCoordChange e e').left_inv hx] + right_inv y' hy' := by + have hy : (y' : EuclideanSpace ℝ (Fin n)) ∈ ((𝓡∂ n).extendCoordChange e e').target := + (mem_coordChange_target_iff_of_bdry y').1 hy'.2 + apply Subtype.ext + have h1 := coe_proj_coordChange_symm he he' hy + have hmem : ((𝓡∂ n).extendCoordChange e e').symm y' ∈ + ((𝓡∂ n).extendCoordChange e e').source := + ((𝓡∂ n).extendCoordChange e e').map_target hy + have h2 := coe_proj_coordChange he he' + (x' := (flatDomain n).proj (((𝓡∂ n).extendCoordChange e e').symm y')) (by rw [h1]; exact hmem) + change (((flatDomain n).proj ((𝓡∂ n).extendCoordChange e e' + (((flatDomain n).proj (((𝓡∂ n).extendCoordChange e e').symm y') : bdry n) : + EuclideanSpace ℝ (Fin n))) : bdry n) : EuclideanSpace ℝ (Fin n)) = y' + rw [h2, h1, ((𝓡∂ n).extendCoordChange e e').right_inv hy] + isCompact_K0 := + (isClosed_bdry.isClosedEmbedding_subtypeVal).isCompact_preimage + (BesovAtlas.chartChange he he' c hc hcs).isCompact_K0 + K0_subset y' hy' := by + have h := (BesovAtlas.chartChange he he' c hc hcs).K0_subset hy' + exact ⟨mem_univ _, h.2⟩ + chi_eq_zero y' _ hy' := + (BesovAtlas.chartChange he he' c hc hcs).chi_eq_zero _ (bdry_subset_range y'.2) hy' + +/-- **The change of charts on the boundary**: on `H₀`, the change of charts with a cut-off acts as +its restriction to `H₀`. -/ +theorem chartChange_apply_coe (G : EuclideanSpace ℝ (Fin n) → ℂ) (x' : bdry n) : + (BesovAtlas.chartChange he he' c hc hcs).apply G x' = + (boundaryChartChange he he' c hc hcs).apply (fun y' => G y') x' := by + by_cases hx : (x' : EuclideanSpace ℝ (Fin n)) ∈ ((𝓡∂ n).extendCoordChange e e').source + · rw [BesovAtlas.chartChange_apply, indicator_of_mem hx, Rd.CutoffDiffeo.apply, + indicator_of_mem] + swap + · exact ⟨mem_univ _, (mem_coordChange_source_iff_of_bdry x').2 hx⟩ + change _ = (BesovAtlas.chartChange he he' c hc hcs).chi + (((flatDomain n).proj ((𝓡∂ n).extendCoordChange e e' x') : bdry n) : + EuclideanSpace ℝ (Fin n)) * G (((flatDomain n).proj + ((𝓡∂ n).extendCoordChange e e' x') : bdry n) : EuclideanSpace ℝ (Fin n)) + rw [coe_proj_coordChange he he' hx] + · rw [BesovAtlas.chartChange_apply, indicator_of_notMem hx, Rd.CutoffDiffeo.apply, + indicator_of_notMem fun h : x' ∈ univ ∩ (boundaryChartChange he he' c hc hcs).U => + hx ((mem_coordChange_source_iff_of_bdry x').1 h.2)] + +end BoundaryChange + +/-! ### Boundary pieces and the Besov space of the boundary -/ + +namespace BesovAtlas + +variable (A : BesovAtlas (𝓡∂ n) M) + +/-- The **boundary pieces** of `g : M → ℂ`: the restrictions of the chart pieces to `H₀`. -/ +noncomputable def boundaryPiece (i : Fin A.n) (g : M → ℂ) : bdry n → ℂ := + fun x' => A.piece i g x' + +variable [IsManifold (𝓡∂ n) ∞ M] [CompactSpace M] (A' : BesovAtlas (𝓡∂ n) M) + +/-- The **boundary change of charts** from the `i`-th chart of `A` to the `j`-th chart of `A'`. -/ +noncomputable def boundaryTransition (i : Fin A.n) (j : Fin A'.n) : + Rd.CutoffDiffeo (Set.univ : Set (bdry n)) := + boundaryChartChange (A.chart_mem i) (A'.chart_mem j) (fun x => A.psi i x * A'.theta j x) + ((A.contMDiff_psi i).mul (A'.contMDiff_theta j)) (A.tsupport_psi_mul_theta_subset A' i j) + +/-- **The boundary pieces of two atlases**: `∂piece_i g = ∑_j T^∂_{ij}(∂piece'_j g)`. -/ +theorem boundaryPiece_eq_sum (i : Fin A.n) (g : M → ℂ) (x' : bdry n) : + A.boundaryPiece i g x' = + ∑ j, (A.boundaryTransition A' i j).apply (A'.boundaryPiece j g) x' := by + rw [boundaryPiece, A.piece_eq_sum_apply A' i g x'] + exact Finset.sum_congr rfl fun j _ => chartChange_apply_coe _ _ _ _ _ _ x' + +/-- The **Besov space of the boundary** for a Besov atlas: `g : M → ℂ` whose boundary pieces agree +almost everywhere with functions on `H₀` of finite Besov quasi-norm of order `⌊s⌋ + 1`. -/ +def MemBoundaryBesov (p : ℝ≥0∞) [Fact (1 ≤ p)] (s : ℝ) (q : ℝ≥0∞) (g : M → ℂ) : Prop := + ∀ i, ∃ G : Lp ℂ p (volume : Measure (bdry n)), (G : bdry n → ℂ) =ᵐ[volume] A.boundaryPiece i g ∧ + ‖G‖ₑ + lqNorm q (fun k => dyadicWeight s k * Rd.lpModulus p (⌊s⌋₊ + 1) G k) < ⊤ + +/-- The whole hyperplane has nonempty interior in itself. -/ +theorem interior_univ_bdry_nonempty : (interior (Set.univ : Set (bdry n))).Nonempty := by + rw [interior_univ] + exact univ_nonempty + +/-- **The Besov space of the boundary does not depend on the atlas**: the boundary pieces of `A` +are sums of boundary changes of charts of those of `A'`, which are bounded on `B^s_{p,q}(H₀)`. -/ +theorem MemBoundaryBesov.of_atlas {p : ℝ≥0∞} [Fact (1 ≤ p)] (hp : p ≠ ⊤) {s : ℝ} (hs : 0 < s) + {q : ℝ≥0∞} (hq : 1 ≤ q) {g : M → ℂ} (h : A'.MemBoundaryBesov p s q g) : + A.MemBoundaryBesov p s q g := by + intro i + choose G' hG'ae hG'fin using h + set r := ⌊s⌋₊ + 1 + have hr : 1 ≤ r := Nat.le_add_left 1 _ + have hsr : s < r := by + push_cast [r] + exact Nat.lt_floor_add_one s + set T := fun j => A.boundaryTransition A' i j + choose C hC hT using fun j => (T j).modNormOn_applyLp_le convex_univ + interior_univ_bdry_nonempty MeasurableSet.univ hp hr hs hsr hq + refine ⟨∑ j, (T j).applyLp convex_univ interior_univ_bdry_nonempty MeasurableSet.univ hp (G' j), + ?_, ?_⟩ + · filter_upwards [Lp.coeFn_fun_finsetSum Finset.univ (fun j => (T j).applyLp convex_univ + interior_univ_bdry_nonempty MeasurableSet.univ hp (G' j)), + ae_all_iff.2 fun j => ((T j).applyLp_ae convex_univ interior_univ_bdry_nonempty + MeasurableSet.univ hp (G' j)).trans ((T j).apply_ae_eq ((hG'ae j).mono fun y hy _ => hy))] + with x' h1 h2 + rw [h1, A.boundaryPiece_eq_sum A' i g x'] + exact Finset.sum_congr rfl fun j _ => h2 j + · rw [← Rd.modNormOn_univ] + refine (Rd.modNormOn_finsetSum_le MeasurableSet.univ r s hq _ _).trans_lt + (ENNReal.sum_lt_top.2 fun j _ => ?_) + exact (hT j (G' j)).trans_lt (ENNReal.mul_lt_top (hC j).lt_top (hG'fin j)) + +/-- **The Besov space of the boundary does not depend on the atlas**. -/ +theorem memBoundaryBesov_iff_memBoundaryBesov {p : ℝ≥0∞} [Fact (1 ≤ p)] (hp : p ≠ ⊤) {s : ℝ} + (hs : 0 < s) {q : ℝ≥0∞} (hq : 1 ≤ q) (g : M → ℂ) : + A.MemBoundaryBesov p s q g ↔ A'.MemBoundaryBesov p s q g := + ⟨fun h => MemBoundaryBesov.of_atlas A' A hp hs hq h, + fun h => MemBoundaryBesov.of_atlas A A' hp hs hq h⟩ + +end BesovAtlas + +end Manifold diff --git a/LeanPool/FunctionSpaces/Domains/Manifolds/BoundaryTrace.lean b/LeanPool/FunctionSpaces/Domains/Manifolds/BoundaryTrace.lean new file mode 100644 index 0000000000..45c2f0b814 --- /dev/null +++ b/LeanPool/FunctionSpaces/Domains/Manifolds/BoundaryTrace.lean @@ -0,0 +1,550 @@ +/- +Copyright (c) 2026 Mario Ullrich. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Mario Ullrich +-/ +module + +public import LeanPool.FunctionSpaces.Domains.Manifolds.BoundaryBesov +public import LeanPool.FunctionSpaces.Domains.Manifolds.Besov + +/- +Modified for Lean Pool: module names and imports adapted. +-/ + +/-! +# The trace theorem on a compact manifold with boundary + +Let `M` be a compact manifold with boundary modelled on the half-space `𝓡∂ n`, `μ` a smooth +measure, `A` a Besov atlas, and `Tr` the trace of order `L` of the half-space +(`Rd.LipschitzGraph.trace` for the flat domain `Manifold.flatDomain n`). + +**The trace commutes with the changes of charts** (`Manifold.trace_chartChange_applyLp`): for a +change of charts with a cut-off `T` and its restriction `T^∂` to the boundary hyperplane `H₀`, +`Tr (T G) = T^∂ (Tr G)`. For the continuous partial sums `G_J` of the reproducing formula both +sides are restrictions to `H₀` of `T G_J`, which is continuous on the closed half-space +(`Rd.trace_ae_eq_of_continuousOn`), and both sides are continuous in `G` for the norm of +`B^{1/p}_{p,1}` (`Rd.LipschitzGraph.enorm_trace_le_modNormOn`). + +**The trace on the boundary** of `f ∈ L_p(μ)` is `Tr_A f = ∑_i θ_i · Tr(piece_i f) ∘ P ∘ κ_i` +(`Manifold.BesovAtlas.boundaryTrace`). For `s > 0` and `f ∈ B^{s+1/p}_{p,q}(M)` its boundary +pieces are the traces of the pieces of `f` (`Manifold.BesovAtlas.boundaryPiece_boundaryTrace`), +for the boundary pieces of every atlas (`Manifold.BesovAtlas.boundaryPiece_boundaryTrace_of_atlas`). +Hence: + +* **the trace is bounded**: the boundary pieces of `Tr_A f` have Besov quasi-norms at most `C` + times the Besov quasi-norm of `f` (`Manifold.BesovAtlas.exists_boundaryTrace_norm_le`), so + `Tr_A f ∈ B^s_{p,q}(∂M)` (`Manifold.BesovAtlas.memBoundaryBesov_boundaryTrace`); +* **the trace is onto**: every `g ∈ B^s_{p,q}(∂M)` is the trace of `f = ∑_k θ_k · (E G_k) ∘ κ_k`, + with the extensions `E G_k` of the boundary pieces of `g` + (`Manifold.BesovAtlas.exists_boundaryTrace_eq`). + +So `B^s_{p,q}(∂M)` is the trace space of `B^{s+1/p}_{p,q}(M)` for every `s > 0` +(`Manifold.BesovAtlas.memBoundaryBesov_iff_exists_boundaryTrace`). For `f` with a continuous +representative `g`, the boundary pieces of `Tr_A f` are those of `g`: the trace is the restriction +to the boundary (`Manifold.BesovAtlas.boundaryPiece_boundaryTrace_of_continuous`). + +The closure of a smooth bounded domain is such a manifold (`Rd.SmoothDomain.isManifold`); there +both statements hold for the Lebesgue measure +(`Rd.SmoothDomain.memBoundaryBesov_iff_exists_boundaryTrace`, +`Rd.SmoothDomain.boundaryPiece_boundaryTrace_of_continuous`). +-/ + +@[expose] public section + +open MeasureTheory Set Filter Topology +open scoped ENNReal Manifold ContDiff + +open ENNReal (lqNorm dyadicWeight) + +namespace Manifold + +variable {n : ℕ} [NeZero n] + +/-! ### The closed and the open half-space -/ + +/-- The range of the half-space model is the flat domain up to the null set `H₀`. -/ +theorem range_ae_eq_domain : range (𝓡∂ n) =ᵐ[volume] (flatDomain n).domain := by + rw [range_eq_closedHalfSpace] + exact Rd.closedHalfSpace_ae_eq Rd.norm_e0 + +variable {p : ℝ≥0∞} [Fact (1 ≤ p)] + +/-- The cut-off to the open half-space is the cut-off to the closed half-space. -/ +theorem cutoff_eq_indicatorLp (hΩm : MeasurableSet (range (𝓡∂ n))) + (G : Lp ℂ p (volume : Measure (EuclideanSpace ℝ (Fin n)))) : + (flatDomain n).cutoff G = Rd.indicatorLp hΩm G := + (Rd.indicatorLp_congr_set hΩm (flatDomain n).measurableSet_domain range_ae_eq_domain G).symm + +/-- **The intrinsic quasi-norms of the closed and of the open half-space agree**: the two sets +differ by the null set `H₀`. -/ +theorem modNormOn_range_eq (hΩm : MeasurableSet (range (𝓡∂ n))) (r : ℕ) (σ : ℝ) (q : ℝ≥0∞) + (G : Lp ℂ p (volume : Measure (EuclideanSpace ℝ (Fin n)))) : + Rd.modNormOn hΩm r σ q G = Rd.modNormOn (flatDomain n).measurableSet_domain r σ q G := + Rd.modNormOn_congr_set hΩm (flatDomain n).measurableSet_domain range_ae_eq_domain r σ q G + +/-! ### The trace commutes with the changes of charts -/ + +section Commutation + +variable {M : Type*} [TopologicalSpace M] [ChartedSpace (EuclideanHalfSpace n) M] + [IsManifold (𝓡∂ n) ∞ M] [CompactSpace M] + {e e' : OpenPartialHomeomorph M (EuclideanHalfSpace n)} (he : e ∈ atlas _ M) + (he' : e' ∈ atlas _ M) (c : M → ℝ) (hc : ContMDiff (𝓡∂ n) 𝓘(ℝ, ℝ) ∞ c) + (hcs : tsupport c ⊆ e.source ∩ e'.source) (hp : p ≠ ⊤) + +/-- **The trace commutes with a change of charts, for continuous functions**: if `G` has a finite +`B^{s+1/p}_{p,q}`-norm of order `L > s + 1/p` and a continuous representative `g`, then +`Tr (T G) = T^∂ (Tr G)`: both are the restriction of `T g` to `H₀`. -/ +theorem trace_chartChange_applyLp_of_continuous {L : ℕ} (hL : 1 ≤ L) {s : ℝ} (hs : 0 < s) + (hsL : s + 1 / p.toReal < L) {q : ℝ≥0∞} (hq : 1 ≤ q) + {G : Lp ℂ p (volume : Measure (EuclideanSpace ℝ (Fin n)))} + (hG : ‖G‖ₑ + lqNorm q (fun k => dyadicWeight (s + 1 / p.toReal) k * Rd.lpModulus p L G k) < ⊤) + {g : EuclideanSpace ℝ (Fin n) → ℂ} (hgc : Continuous g) (hGg : (G : _ → ℂ) =ᵐ[volume] g) : + (flatDomain n).trace hp L ((BesovAtlas.chartChange he he' c hc hcs).applyLp + Rd.BesovDomain.convex Rd.BesovDomain.interior_nonempty + (Rd.BesovDomain.measurableSet _) hp G) = + (boundaryChartChange he he' c hc hcs).applyLp convex_univ + BesovAtlas.interior_univ_bdry_nonempty MeasurableSet.univ hp + ((flatDomain n).trace hp L G) := by + have hσ0 : 0 < s + 1 / p.toReal := by positivity + set Ω := flatDomain n + set T := BesovAtlas.chartChange he he' c hc hcs + set T' := boundaryChartChange he he' c hc hcs + set hΩm := Rd.BesovDomain.measurableSet (range (𝓡∂ n)) + obtain ⟨C, hC, hTle⟩ := T.modNormOn_applyLp_le Rd.BesovDomain.convex + Rd.BesovDomain.interior_nonempty hΩm hp hL hσ0 hsL hq + have hfin := (hTle G).trans_lt (ENNReal.mul_lt_top hC.lt_top hG) + rw [modNormOn_range_eq hΩm] at hfin + have h1 : (T.applyLp Rd.BesovDomain.convex Rd.BesovDomain.interior_nonempty hΩm hp G : + _ → ℂ) =ᵐ[volume] T.apply g := + (T.applyLp_ae _ _ hΩm hp G).trans (T.apply_ae_eq (hGg.mono fun y hy _ => hy)) + have htr1 := Rd.trace_ae_eq_of_continuousOn Rd.norm_e0 hp hL hs hq hfin + (by rw [← range_eq_closedHalfSpace]; exact T.continuousOn_apply hgc) T.isCompact_carrier + (fun x _ hx => T.apply_eq_zero_of_notMem _ hx) (h1.mono fun x hx _ => hx) + have htr2 : Ω.trace hp L G =ᵐ[volume] fun x' => g x' := by + filter_upwards [Ω.trace_ae_eq_comp_graphMap hp hL hs hq + (Ω.intrinsicNorm_lt_top_of_modNorm hp L hq hG).1 hgc hGg] with x' hx' + rw [hx', Function.comp_apply, Rd.LipschitzGraph.flat_graphMap] + refine Lp.ext ?_ + filter_upwards [htr1, T'.applyLp_ae convex_univ BesovAtlas.interior_univ_bdry_nonempty + MeasurableSet.univ hp (Ω.trace hp L G), T'.apply_ae_eq (htr2.mono fun x' hx' _ => hx')] + with x' h1 h2 h3 + rw [h1, h2, h3] + exact chartChange_apply_coe he he' c hc hcs g x' + +/-- **The trace commutes with a change of charts**: for `F ∈ L_p(ℝ^n)` with a finite +`B^{s+1/p}_{p,q}`-norm of order `L > s + 1/p`, `Tr (T F) = T^∂ (Tr F)` on `H₀`. The partial sums +`G_J` of the reproducing formula are continuous, so the identity holds for them +(`Manifold.trace_chartChange_applyLp_of_continuous`); they converge to `F` in `B^{1/p}_{p,1}`, +where `T` and the trace are bounded, and `Tr G_J → Tr F` in `L_p(H₀)`, where `T^∂` is bounded. -/ +theorem trace_chartChange_applyLp_of_modNorm {L : ℕ} (hL : 1 ≤ L) {s : ℝ} (hs : 0 < s) + (hsL : s + 1 / p.toReal < L) {q : ℝ≥0∞} (hq : 1 ≤ q) + {F : Lp ℂ p (volume : Measure (EuclideanSpace ℝ (Fin n)))} + (hF : ‖F‖ₑ + lqNorm q (fun k => dyadicWeight (s + 1 / p.toReal) k * Rd.lpModulus p L F k) < ⊤) : + (flatDomain n).trace hp L ((BesovAtlas.chartChange he he' c hc hcs).applyLp + Rd.BesovDomain.convex Rd.BesovDomain.interior_nonempty + (Rd.BesovDomain.measurableSet _) hp F) = + (boundaryChartChange he he' c hc hcs).applyLp convex_univ + BesovAtlas.interior_univ_bdry_nonempty MeasurableSet.univ hp + ((flatDomain n).trace hp L F) := by + have hp1 : 1 ≤ p := Fact.out + have hpr : 1 ≤ p.toReal := ENNReal.one_le_toReal_of_one_le hp1 hp + have hpinv0 : 0 < 1 / p.toReal := by positivity + have hpL : 1 / p.toReal < L := by linarith + have hσ0 : 0 < s + 1 / p.toReal := by positivity + set Ω := flatDomain n + set T := BesovAtlas.chartChange he he' c hc hcs + set hΩm := Rd.BesovDomain.measurableSet (range (𝓡∂ n)) + set TL := T.applyLp Rd.BesovDomain.convex Rd.BesovDomain.interior_nonempty hΩm hp + set TL' := (boundaryChartChange he he' c hc hcs).applyLp convex_univ + BesovAtlas.interior_univ_bdry_nonempty MeasurableSet.univ hp + set b := Ω.coneBump + have hGfin : ∀ J, ‖b.partialSum hp L J F‖ₑ + lqNorm q (fun k => + dyadicWeight (s + 1 / p.toReal) k * Rd.lpModulus p L (b.partialSum hp L J F) k) < ⊤ := + fun J => b.modNorm_partialSum_lt_top hp L J hσ0 hsL hq F + -- intrinsic norms of the images + obtain ⟨C, hC, hTle⟩ := T.modNormOn_applyLp_le Rd.BesovDomain.convex + Rd.BesovDomain.interior_nonempty hΩm hp hL hσ0 hsL hq + have hint : ∀ {H : Lp ℂ p (volume : Measure (EuclideanSpace ℝ (Fin n)))}, + ‖H‖ₑ + lqNorm q (fun k => dyadicWeight (s + 1 / p.toReal) k * Rd.lpModulus p L H k) < ⊤ → + Ω.intrinsicNorm hp L (s + 1 / p.toReal) q (TL H) < ⊤ := fun {H} hH => by + have h := (hTle H).trans_lt (ENNReal.mul_lt_top hC.lt_top hH) + rw [modNormOn_range_eq hΩm] at h + exact Ω.intrinsicNorm_lt_top hp L _ hq h + -- the left sides converge + obtain ⟨C1, hC1, hT1⟩ := T.modNormOn_applyLp_le Rd.BesovDomain.convex + Rd.BesovDomain.interior_nonempty hΩm hp hL hpinv0 hpL le_rfl + obtain ⟨K, hK, hKle⟩ := Ω.enorm_trace_le_modNormOn hp L + have happ := b.tendsto_modNorm_sub_partialSum hp hL hpinv0 (by linarith) hpL hq hF + have hb : Tendsto (fun J => K * (C1 * (‖F - b.partialSum hp L J F‖ₑ + lqNorm 1 (fun k => + dyadicWeight (1 / p.toReal) k * Rd.lpModulus p L (F - b.partialSum hp L J F) k)))) + atTop (𝓝 0) := by + simpa using ENNReal.Tendsto.const_mul (ENNReal.Tendsto.const_mul happ (Or.inr hC1)) + (Or.inr hK) + have hleft : Tendsto (fun J => Ω.trace hp L (TL (b.partialSum hp L J F))) atTop + (𝓝 (Ω.trace hp L (TL F))) := by + rw [tendsto_iff_edist_tendsto_0] + refine tendsto_of_tendsto_of_tendsto_of_le_of_le tendsto_const_nhds hb (fun _ => zero_le) + fun J => ?_ + rw [edist_comm, eDist_eq_eNorm_sub, ← Ω.trace_sub hp L hs hq (hint hF) (hint (hGfin J)), + ← map_sub TL F (b.partialSum hp L J F)] + refine (hKle _).trans (mul_le_mul' le_rfl ?_) + rw [← modNormOn_range_eq hΩm] + exact hT1 _ + -- the right sides converge + have hright : Tendsto (fun J => TL' (Ω.trace hp L (b.partialSum hp L J F))) atTop + (𝓝 (TL' (Ω.trace hp L F))) := + (TL'.continuous.tendsto _).comp (Ω.tendsto_trace_partialSum b hp hL hs hsL hq hF) + have hpart : ∀ J, Ω.trace hp L (TL (b.partialSum hp L J F)) = + TL' (Ω.trace hp L (b.partialSum hp L J F)) := fun J => + trace_chartChange_applyLp_of_continuous he he' c hc hcs hp hL hs hsL hq (hGfin J) + (b.continuous_partialSum_rep hp L J F) (b.partialSum_ae hp L J F) + simp_rw [hpart] at hleft + exact tendsto_nhds_unique hleft hright + +/-- **The trace commutes with a change of charts** for `G` with a finite intrinsic +`B^{s+1/p}_{p,q}`-norm of order `L > s + 1/p` on the closed half-space: extend `G` to `ℝ^n` +(the half-space is a Besov domain); neither side sees the extension. -/ +theorem trace_chartChange_applyLp {L : ℕ} (hL : 1 ≤ L) {s : ℝ} (hs : 0 < s) + (hsL : s + 1 / p.toReal < L) {q : ℝ≥0∞} (hq : 1 ≤ q) + {G : Lp ℂ p (volume : Measure (EuclideanSpace ℝ (Fin n)))} + (hG : Rd.modNormOn (Rd.BesovDomain.measurableSet (range (𝓡∂ n))) L (s + 1 / p.toReal) q + G < ⊤) : + (flatDomain n).trace hp L ((BesovAtlas.chartChange he he' c hc hcs).applyLp + Rd.BesovDomain.convex Rd.BesovDomain.interior_nonempty + (Rd.BesovDomain.measurableSet _) hp G) = + (boundaryChartChange he he' c hc hcs).applyLp convex_univ + BesovAtlas.interior_univ_bdry_nonempty MeasurableSet.univ hp + ((flatDomain n).trace hp L G) := by + have hσ0 : 0 < s + 1 / p.toReal := by positivity + obtain ⟨C, hC, hext⟩ := Rd.BesovDomain.exists_extension (Ω := range (𝓡∂ n)) p hp L + (s + 1 / p.toReal) hσ0 hsL q hq + obtain ⟨F, hFG, hFle⟩ := hext G hG + have hF := hFle.trans_lt (ENNReal.mul_lt_top hC.lt_top hG) + have hcut : (flatDomain n).cutoff F = (flatDomain n).cutoff G := by + rw [cutoff_eq_indicatorLp (Rd.BesovDomain.measurableSet _), + cutoff_eq_indicatorLp (Rd.BesovDomain.measurableSet _)] + exact hFG + rw [← (BesovAtlas.chartChange he he' c hc hcs).applyLp_eq_of_indicatorLp_eq hp hFG, + ← (flatDomain n).trace_congr hp L hcut] + exact trace_chartChange_applyLp_of_modNorm he he' c hc hcs hp hL hs hsL hq hF + +end Commutation + +/-! ### Extensions from the boundary hyperplane -/ + +/-- **Extensions from the boundary hyperplane**: for `G ∈ L_p(H₀)` with +`‖G‖_p + ‖(2^(ks) ω_r(G, 2^(-k))_p)_k‖_{ℓ_q} < ∞`, `r = ⌊s⌋ + 1`, the extension `E G` of moment +order `r` (`Rd.LipschitzGraph.graphExtension` of the flat graph) has a finite +`B^{s+1/p}_{p,q}`-norm of order `L` and the trace `Tr (E G) = G` +(`Rd.LipschitzGraph.trace_flatExtension`). -/ +theorem exists_flatGraphExtension (hp : p ≠ ⊤) {L : ℕ} (hL : 2 ≤ L) {s : ℝ} (hs : 0 < s) + (hsL : s + 1 / p.toReal < L) {q : ℝ≥0∞} (hq : 1 ≤ q) + {G : Lp ℂ p (volume : Measure (bdry n))} + (hG : ‖G‖ₑ + lqNorm q (fun k => dyadicWeight s k * Rd.lpModulus p (⌊s⌋₊ + 1) G k) < ⊤) : + ∃ F : Lp ℂ p (volume : Measure (EuclideanSpace ℝ (Fin n))), + ‖F‖ₑ + lqNorm q (fun k => + dyadicWeight (s + 1 / p.toReal) k * Rd.lpModulus p L F k) < ⊤ ∧ + (flatDomain n).trace hp L F = G := by + have hr : 1 ≤ ⌊s⌋₊ + 1 := Nat.le_add_left 1 _ + have hX : (flatDomain n).graphBump.localMeansNorm hp (⌊s⌋₊ + 1) s q G < ⊤ := + ((flatDomain n).graphBump.localMeansNorm_le hp _ s hq G).trans_lt + (ENNReal.mul_lt_top ((flatDomain n).graphBump.upperConst_ne_top _ s).lt_top hG) + obtain ⟨K, hK, hle⟩ := Rd.LipschitzGraph.modNorm_flatExtension_le_localMeansNorm + (Rd.e0 : EuclideanSpace ℝ (Fin n)) Rd.norm_e0 hp (⌊s⌋₊ + 1) hs hsL hq + exact ⟨_, (hle G hX).trans_lt (ENNReal.mul_lt_top hK.lt_top hX), + Rd.LipschitzGraph.trace_flatExtension _ _ hp hL hr hs hsL hq hX⟩ + +/-! ### The trace on the boundary -/ + +namespace BesovAtlas + +variable {M : Type*} [TopologicalSpace M] [ChartedSpace (EuclideanHalfSpace n) M] + [IsManifold (𝓡∂ n) ∞ M] [CompactSpace M] [MeasurableSpace M] [BorelSpace M] + (A : BesovAtlas (𝓡∂ n) M) (μ : Measure M) [IsSmoothMeasure (𝓡∂ n) μ] (hp : p ≠ ⊤) + +/-- The **trace on the boundary** of `f ∈ L_p(μ)` in the atlas `A`: +`Tr_A f = ∑_i θ_i · Tr(piece_i f) ∘ P ∘ κ_i` on the chart sources, with the trace `Tr` of order +`L` of the half-space and the projection `P` onto `H₀`. On `∂M` the points `κ_i x` lie in `H₀`. -/ +noncomputable def boundaryTrace (L : ℕ) (f : Lp ℂ p μ) (x : M) : ℂ := + ∑ i, (A.chart i).source.indicator (fun x => (A.theta i x : ℂ) * + (flatDomain n).trace hp L (A.pieceLp μ hp i f) ((flatDomain n).proj (A.ext i x))) x + +/-- **The boundary pieces of the trace**, pointwise on `H₀`: the `k`-th boundary piece of +`Tr_A f` is `∑_i T^∂_{ki} (Tr (piece_i f))`, since `ψ_k θ_i` is the cut-off of `T^∂_{ki}`. -/ +theorem boundaryPiece_boundaryTrace_eq_sum (L : ℕ) (f : Lp ℂ p μ) (k : Fin A.n) (x' : bdry n) : + A.boundaryPiece k (A.boundaryTrace μ hp L f) x' = + ∑ i, (A.boundaryTransition A k i).apply + ((flatDomain n).trace hp L (A.pieceLp μ hp i f)) x' := by + rw [boundaryPiece, piece] + by_cases hx : (x' : EuclideanSpace ℝ (Fin n)) ∈ (A.ext k).target + · rw [indicator_of_mem hx, boundaryTrace, Finset.mul_sum] + refine Finset.sum_congr rfl fun i _ => ?_ + by_cases hz : (A.ext k).symm x' ∈ (A.chart i).source + · have hU : (x' : EuclideanSpace ℝ (Fin n)) ∈ + ((𝓡∂ n).extendCoordChange (A.chart k) (A.chart i)).source := + (mem_coordChange_source _ _).2 ⟨hx, hz⟩ + have hΦ := coe_proj_coordChange (A.chart_mem k) (A.chart_mem i) hU + have hmem : A.ext i ((A.ext k).symm x') ∈ (A.ext i).target := + (A.ext i).map_source (by rw [OpenPartialHomeomorph.extend_source]; exact hz) + rw [indicator_of_mem hz, Rd.CutoffDiffeo.apply, indicator_of_mem] + swap + · exact ⟨mem_univ _, (mem_coordChange_source_iff_of_bdry (e := A.chart k) + (e' := A.chart i) x').2 hU⟩ + change _ = (A.transition A k i).chi + (((flatDomain n).proj ((𝓡∂ n).extendCoordChange (A.chart k) (A.chart i) x') : bdry n) : + EuclideanSpace ℝ (Fin n)) * (flatDomain n).trace hp L (A.pieceLp μ hp i f) + ((flatDomain n).proj ((𝓡∂ n).extendCoordChange (A.chart k) (A.chart i) x')) + rw [hΦ, coordChange_apply] + change _ = (A.ext i).target.indicator (fun y => ((A.psi k ((A.ext i).symm y) * + A.theta i ((A.ext i).symm y) : ℝ) : ℂ)) (A.ext i ((A.ext k).symm x')) * _ + rw [indicator_of_mem hmem, (A.ext i).left_inv + (by rw [OpenPartialHomeomorph.extend_source]; exact hz)] + push_cast + ring + · rw [indicator_of_notMem hz, mul_zero, Rd.CutoffDiffeo.apply, indicator_of_notMem] + intro h + exact hz ((mem_coordChange_source _ _).1 ((mem_coordChange_source_iff_of_bdry + (e := A.chart k) (e' := A.chart i) x').1 h.2)).2 + · rw [indicator_of_notMem hx] + symm + refine Finset.sum_eq_zero fun i _ => ?_ + rw [Rd.CutoffDiffeo.apply, indicator_of_notMem] + intro h + exact hx ((mem_coordChange_source _ _).1 ((mem_coordChange_source_iff_of_bdry + (e := A.chart k) (e' := A.chart i) x').1 h.2)).1 + +/-- **The traces of the pieces of two atlases**: for `s > 0`, `L > s + 1/p` and +`f ∈ B^{s+1/p}_{p,q}(M)`, `Tr (piece_i f) = ∑_j T^∂_{ij} (Tr (piece'_j f))`. The pieces satisfy +`piece_i f = ∑_j T_{ij} (piece'_j f)`, and the trace commutes with the changes of charts +(`Manifold.trace_chartChange_applyLp`). -/ +theorem trace_pieceLp_eq_sum (A' : BesovAtlas (𝓡∂ n) M) {L : ℕ} (hL : 1 ≤ L) {s : ℝ} + (hs : 0 < s) (hsL : s + 1 / p.toReal < L) {q : ℝ≥0∞} (hq : 1 ≤ q) {f : Lp ℂ p μ} + (hf : A'.MemBesov hp (s + 1 / p.toReal) q f) (i : Fin A.n) : + (flatDomain n).trace hp L (A.pieceLp μ hp i f) = ∑ j, (A.boundaryTransition A' i j).applyLp + convex_univ interior_univ_bdry_nonempty MeasurableSet.univ hp + ((flatDomain n).trace hp L (A'.pieceLp μ hp j f)) := by + have hσ0 : 0 < s + 1 / p.toReal := by positivity + set Ω := flatDomain n + set hΩm := Rd.BesovDomain.measurableSet (range (𝓡∂ n)) + have hG := fun j => hf.modNormOn_pieceLp_lt_top hp A' hσ0 hsL hq j + have hint : ∀ j, Ω.intrinsicNorm hp L (s + 1 / p.toReal) q ((A.transition A' i j).applyLp + Rd.BesovDomain.convex Rd.BesovDomain.interior_nonempty hΩm hp (A'.pieceLp μ hp j f)) < ⊤ := + fun j => by + obtain ⟨C, hC, hle⟩ := + (A.transition A' i j).modNormOn_applyLp_le_modNormOn hp hL hσ0 hsL hq + have h := (hle _ (hG j)).trans_lt (ENNReal.mul_lt_top hC.lt_top (hG j)) + rw [modNormOn_range_eq hΩm] at h + exact Ω.intrinsicNorm_lt_top hp L _ hq h + rw [A.pieceLp_eq_sum A' μ hp i f, + Ω.trace_finsetSum_of_intrinsicNorm hp L hs hq _ fun j _ => hint j] + exact Finset.sum_congr rfl fun j _ => + trace_chartChange_applyLp _ _ _ _ _ hp hL hs hsL hq (hG j) + +/-- **The boundary pieces of the trace are the traces of the pieces**: for `s > 0`, `L > s + 1/p` +and `f ∈ B^{s+1/p}_{p,q}(M)`, the `k`-th boundary piece of `Tr_A f` is `Tr (piece_k f)` almost +everywhere on `H₀`: both are `∑_i T^∂_{ki} (Tr (piece_i f))`. -/ +theorem boundaryPiece_boundaryTrace {L : ℕ} (hL : 1 ≤ L) {s : ℝ} (hs : 0 < s) + (hsL : s + 1 / p.toReal < L) {q : ℝ≥0∞} (hq : 1 ≤ q) {f : Lp ℂ p μ} + (hf : A.MemBesov hp (s + 1 / p.toReal) q f) (k : Fin A.n) : + A.boundaryPiece k (A.boundaryTrace μ hp L f) =ᵐ[volume] + (flatDomain n).trace hp L (A.pieceLp μ hp k f) := by + set Ω := flatDomain n + rw [A.trace_pieceLp_eq_sum μ hp A hL hs hsL hq hf k] + filter_upwards [Lp.coeFn_fun_finsetSum Finset.univ (fun i => (A.boundaryTransition A k i).applyLp + convex_univ interior_univ_bdry_nonempty MeasurableSet.univ hp + (Ω.trace hp L (A.pieceLp μ hp i f))), + ae_all_iff.2 fun i => (A.boundaryTransition A k i).applyLp_ae convex_univ + interior_univ_bdry_nonempty MeasurableSet.univ hp (Ω.trace hp L (A.pieceLp μ hp i f))] + with x' h1 h2 + rw [h1, A.boundaryPiece_boundaryTrace_eq_sum μ hp L f k x'] + exact Finset.sum_congr rfl fun i _ => (h2 i).symm + +/-- **The trace does not depend on the atlas**: for two Besov atlases `A, A'` and +`f ∈ B^{s+1/p}_{p,q}(M)`, the boundary pieces for `A` of `Tr_{A'} f` are the traces of the pieces +of `f` for `A`, as for `Tr_A f`. -/ +theorem boundaryPiece_boundaryTrace_of_atlas (A' : BesovAtlas (𝓡∂ n) M) {L : ℕ} (hL : 1 ≤ L) + {s : ℝ} (hs : 0 < s) (hsL : s + 1 / p.toReal < L) {q : ℝ≥0∞} (hq : 1 ≤ q) {f : Lp ℂ p μ} + (hf : A'.MemBesov hp (s + 1 / p.toReal) q f) (i : Fin A.n) : + A.boundaryPiece i (A'.boundaryTrace μ hp L f) =ᵐ[volume] + (flatDomain n).trace hp L (A.pieceLp μ hp i f) := by + set Ω := flatDomain n + rw [A.trace_pieceLp_eq_sum μ hp A' hL hs hsL hq hf i] + filter_upwards [Lp.coeFn_fun_finsetSum Finset.univ (fun j => + (A.boundaryTransition A' i j).applyLp convex_univ interior_univ_bdry_nonempty + MeasurableSet.univ hp (Ω.trace hp L (A'.pieceLp μ hp j f))), + ae_all_iff.2 fun j => ((A.boundaryTransition A' i j).applyLp_ae convex_univ + interior_univ_bdry_nonempty MeasurableSet.univ hp _).trans + ((A.boundaryTransition A' i j).apply_ae_eq + ((A'.boundaryPiece_boundaryTrace μ hp hL hs hsL hq hf j).mono fun y hy _ => hy.symm))] + with x' h1 h2 + rw [h1, A.boundaryPiece_eq_sum A' i _ x'] + exact Finset.sum_congr rfl fun j _ => (h2 j).symm + +/-- **The trace is bounded**: for `s > 0`, `1 ≤ q ≤ ∞` and `L > s + 1/p` there is `C < ∞` such +that for every `f ∈ B^{s+1/p}_{p,q}(M)` each boundary piece of `Tr_A f` agrees almost everywhere +with some `G ∈ L_p(H₀)` of Besov quasi-norm +`‖G‖_p + ‖(2^(js) ω_{⌊s⌋+1}(G, 2^(-j))_p)_j‖_{ℓ_q} ≤ C ‖f‖_{A, L, s+1/p, q}`, with the Besov +quasi-norm of the atlas with differences of order `L` (`Manifold.BesovAtlas.besovNorm`). `G` is +the trace of the piece of `f` (`Manifold.BesovAtlas.boundaryPiece_boundaryTrace`), bounded by the +trace theorem of the half-space (`Rd.LipschitzGraph.modNorm_trace_le_flat`); the piece is one +term of the sum `‖f‖_{A, L, s+1/p, q}`. -/ +theorem exists_boundaryTrace_norm_le {L : ℕ} {s : ℝ} (hs : 0 < s) + (hsL : s + 1 / p.toReal < L) {q : ℝ≥0∞} (hq : 1 ≤ q) : + ∃ C : ℝ≥0∞, C ≠ ⊤ ∧ ∀ f : Lp ℂ p μ, A.MemBesov hp (s + 1 / p.toReal) q f → ∀ k, + ∃ G : Lp ℂ p (volume : Measure (bdry n)), + (G : bdry n → ℂ) =ᵐ[volume] A.boundaryPiece k (A.boundaryTrace μ hp L f) ∧ + ‖G‖ₑ + lqNorm q (fun j => dyadicWeight s j * Rd.lpModulus p (⌊s⌋₊ + 1) G j) ≤ + C * A.besovNorm hp L (s + 1 / p.toReal) q f := by + have hσ0 : 0 < s + 1 / p.toReal := by positivity + have hL : 1 ≤ L := Nat.cast_pos.1 (hσ0.trans hsL) + have hr : 1 ≤ ⌊s⌋₊ + 1 := Nat.le_add_left 1 _ + have hsr : s < ((⌊s⌋₊ + 1 : ℕ) : ℝ) := by + push_cast + exact Nat.lt_floor_add_one s + obtain ⟨K, hK, hle⟩ := Rd.LipschitzGraph.modNorm_trace_le_flat + (Rd.e0 : EuclideanSpace ℝ (Fin n)) Rd.norm_e0 hp L hr hs hsr hq + refine ⟨K, hK, fun f hf k => + ⟨_, (A.boundaryPiece_boundaryTrace μ hp hL hs hsL hq hf k).symm, ?_⟩⟩ + have hG := hf.modNormOn_pieceLp_lt_top hp A hσ0 hsL hq k + have hk := A.modNormOn_pieceLp_le_besovNorm hp L (s + 1 / p.toReal) q f k + rw [modNormOn_range_eq] at hG hk + exact (hle _ hG).trans (mul_le_mul' le_rfl hk) + +/-- **The trace maps into the boundary space**: for `s > 0`, `1 ≤ q ≤ ∞`, `L > s + 1/p` and +`f ∈ B^{s+1/p}_{p,q}(M)`, the trace `Tr_A f` lies in `B^s_{p,q}(∂M)`: the quasi-norm bound +`Manifold.BesovAtlas.exists_boundaryTrace_norm_le`, with `‖f‖_{A, L, s+1/p, q} < ∞` +(`Manifold.BesovAtlas.memBesov_iff_besovNorm_lt_top`). -/ +theorem memBoundaryBesov_boundaryTrace {L : ℕ} {s : ℝ} (hs : 0 < s) + (hsL : s + 1 / p.toReal < L) {q : ℝ≥0∞} (hq : 1 ≤ q) {f : Lp ℂ p μ} + (hf : A.MemBesov hp (s + 1 / p.toReal) q f) : + A.MemBoundaryBesov p s q (A.boundaryTrace μ hp L f) := by + obtain ⟨C, hC, h⟩ := A.exists_boundaryTrace_norm_le μ hp hs hsL hq + have hfin := (A.memBesov_iff_besovNorm_lt_top hp (by positivity) hsL hq f).1 hf + intro k + obtain ⟨G, hG, hle⟩ := h f hf k + exact ⟨G, hG, hle.trans_lt (ENNReal.mul_lt_top hC.lt_top hfin)⟩ + +/-- **The trace of a continuous function is its restriction to the boundary**: for `s > 0`, +`1 ≤ q ≤ ∞`, `L > s + 1/p` and `f ∈ B^{s+1/p}_{p,q}(M)` with a continuous representative +`g : M → ℂ`, every boundary piece of `Tr_A f` agrees almost everywhere with the boundary piece of +`g`, the restriction of `(ψ_k g) ∘ κ_k⁻¹` to `H₀`. The boundary pieces of `Tr_A f` are the traces +of the pieces of `f` (`Manifold.BesovAtlas.boundaryPiece_boundaryTrace`); the piece +`(ψ_k g) ∘ κ_k⁻¹` is continuous on the closed half-space and vanishes off a compact set +(`Manifold.BesovAtlas.continuousOn_piece`), so its trace is its restriction to `H₀` +(`Rd.trace_ae_eq_of_continuousOn`). -/ +theorem boundaryPiece_boundaryTrace_of_continuous {L : ℕ} {s : ℝ} (hs : 0 < s) + (hsL : s + 1 / p.toReal < L) {q : ℝ≥0∞} (hq : 1 ≤ q) {f : Lp ℂ p μ} + (hf : A.MemBesov hp (s + 1 / p.toReal) q f) {g : M → ℂ} (hg : Continuous g) + (hfg : (f : M → ℂ) =ᵐ[μ] g) (k : Fin A.n) : + A.boundaryPiece k (A.boundaryTrace μ hp L f) =ᵐ[volume] A.boundaryPiece k g := by + have hσ0 : 0 < s + 1 / p.toReal := by positivity + have hL : 1 ≤ L := Nat.cast_pos.1 (hσ0.trans hsL) + have hG := hf.modNormOn_pieceLp_lt_top hp A hσ0 hsL hq k + rw [modNormOn_range_eq] at hG + have hpg : A.pieceLp μ hp k f =ᵐ[volume] A.piece k g := + (A.pieceLp_ae μ hp k f).trans + (A.piece_ae_eq k (Lp.stronglyMeasurable f) hg.stronglyMeasurable hfg) + refine (A.boundaryPiece_boundaryTrace μ hp hL hs hsL hq hf k).trans ?_ + exact Rd.trace_ae_eq_of_continuousOn Rd.norm_e0 hp hL hs hq hG + (by rw [← range_eq_closedHalfSpace]; exact A.continuousOn_piece k hg) + (A.isCompact_pieceCarrier k) (fun x _ hx => A.piece_eq_zero_of_notMem k g hx) + (hpg.mono fun x hx _ => hx) + +/-- **The trace is onto**: for `s > 0` and `L ≥ 2` with `L > s + 1/p`, every +`g ∈ B^s_{p,q}(∂M)` is the trace of some `f ∈ B^{s+1/p}_{p,q}(M)`, in the sense that the boundary +pieces of `Tr_A f` and of `g` agree almost everywhere. The function is +`f = ∑_k θ_k · (E G_k) ∘ κ_k` with the extensions `E G_k` of the boundary pieces of `g` +(`Manifold.exists_flatGraphExtension`); its pieces are `piece_i f = ∑_k T_{ik} (E G_k)`, whose +traces are `∑_k T^∂_{ik} G_k`, the `i`-th boundary piece of `g`. -/ +theorem exists_boundaryTrace_eq {L : ℕ} (hL : 2 ≤ L) {s : ℝ} (hs : 0 < s) + (hsL : s + 1 / p.toReal < L) {q : ℝ≥0∞} (hq : 1 ≤ q) {g : M → ℂ} + (hg : A.MemBoundaryBesov p s q g) : + ∃ f : Lp ℂ p μ, A.MemBesov hp (s + 1 / p.toReal) q f ∧ + ∀ i, A.boundaryPiece i (A.boundaryTrace μ hp L f) =ᵐ[volume] A.boundaryPiece i g := by + have hσ0 : 0 < s + 1 / p.toReal := by positivity + have hL1 : 1 ≤ L := by omega + set Ω := flatDomain n + set hΩm := Rd.BesovDomain.measurableSet (range (𝓡∂ n)) + choose G hGae hGfin using hg + choose F hFfin hFtr using fun k => exists_flatGraphExtension hp hL hs hsL hq (hGfin k) + set f := ∑ k, A.chartLiftLp μ hp k (F k) + have hf : A.MemBesov hp (s + 1 / p.toReal) q f := + MemBesov.finsetSum hp A hq _ fun k _ => A.memBesov_chartLiftLp hp k hL1 hσ0 hsL hq (hFfin k) + refine ⟨f, hf, fun i => ?_⟩ + have hint : ∀ k, Ω.intrinsicNorm hp L (s + 1 / p.toReal) q ((A.transition A i k).applyLp + Rd.BesovDomain.convex Rd.BesovDomain.interior_nonempty hΩm hp (F k)) < ⊤ := fun k => by + obtain ⟨C, hC, hle⟩ := (A.transition A i k).modNormOn_applyLp_le Rd.BesovDomain.convex + Rd.BesovDomain.interior_nonempty hΩm hp hL1 hσ0 hsL hq + have h := (hle (F k)).trans_lt (ENNReal.mul_lt_top hC.lt_top (hFfin k)) + rw [modNormOn_range_eq hΩm] at h + exact Ω.intrinsicNorm_lt_top hp L _ hq h + have htr : Ω.trace hp L (A.pieceLp μ hp i f) = ∑ k, (A.boundaryTransition A i k).applyLp + convex_univ interior_univ_bdry_nonempty MeasurableSet.univ hp (G k) := by + rw [A.pieceLp_finsetSum hp i] + simp_rw [A.pieceLp_chartLiftLp hp i] + rw [Ω.trace_finsetSum_of_intrinsicNorm hp L hs hq _ fun k _ => hint k] + refine Finset.sum_congr rfl fun k _ => ?_ + rw [← hFtr k] + exact trace_chartChange_applyLp_of_modNorm _ _ _ _ _ hp hL1 hs hsL hq (hFfin k) + refine (A.boundaryPiece_boundaryTrace μ hp hL1 hs hsL hq hf i).trans ?_ + rw [htr] + filter_upwards [Lp.coeFn_fun_finsetSum Finset.univ (fun k => (A.boundaryTransition A i k).applyLp + convex_univ interior_univ_bdry_nonempty MeasurableSet.univ hp (G k)), + ae_all_iff.2 fun k => ((A.boundaryTransition A i k).applyLp_ae convex_univ + interior_univ_bdry_nonempty MeasurableSet.univ hp (G k)).trans + ((A.boundaryTransition A i k).apply_ae_eq ((hGae k).mono fun y hy _ => hy))] + with x' h1 h2 + rw [h1, A.boundaryPiece_eq_sum A i g x'] + exact Finset.sum_congr rfl fun k _ => h2 k + +/-- **The trace theorem on a compact manifold with boundary**: for `1 ≤ p < ∞`, `s > 0`, +`1 ≤ q ≤ ∞` and an order `L ≥ 2` of the trace with `L > s + 1/p`, `B^s_{p,q}(∂M)` is the trace +space of `B^{s+1/p}_{p,q}(M)`: `g ∈ B^s_{p,q}(∂M)` iff the boundary pieces of `g` agree almost +everywhere with those of `Tr_A f` for some `f ∈ B^{s+1/p}_{p,q}(M)`. -/ +theorem memBoundaryBesov_iff_exists_boundaryTrace {L : ℕ} (hL : 2 ≤ L) {s : ℝ} (hs : 0 < s) + (hsL : s + 1 / p.toReal < L) {q : ℝ≥0∞} (hq : 1 ≤ q) (g : M → ℂ) : + A.MemBoundaryBesov p s q g ↔ ∃ f : Lp ℂ p μ, A.MemBesov hp (s + 1 / p.toReal) q f ∧ + ∀ i, A.boundaryPiece i (A.boundaryTrace μ hp L f) =ᵐ[volume] A.boundaryPiece i g := by + refine ⟨A.exists_boundaryTrace_eq μ hp hL hs hsL hq, fun ⟨f, hf, htr⟩ i => ?_⟩ + obtain ⟨G, hG, hGfin⟩ := A.memBoundaryBesov_boundaryTrace μ hp hs hsL hq hf i + exact ⟨G, hG.trans (htr i), hGfin⟩ + +end BesovAtlas + +end Manifold + +/-! ### The boundary of a smooth bounded domain -/ + +namespace Rd.SmoothDomain + +open Manifold + +variable {n : ℕ} [NeZero n] (Ω : SmoothDomain n) {p : ℝ≥0∞} [Fact (1 ≤ p)] + (A : Manifold.BesovAtlas (𝓡∂ n) (closure Ω.carrier)) (hp : p ≠ ⊤) + +/-- **The trace theorem on the boundary of a smooth bounded domain**: for the closure of a smooth +bounded domain `Ω`, a compact manifold with boundary (`Rd.SmoothDomain.isManifold`) with the +Lebesgue measure (`Rd.SmoothDomain.volumeOn`), a Besov atlas `A`, `1 ≤ p < ∞`, `s > 0`, +`1 ≤ q ≤ ∞` and an order `L ≥ 2` with `L > s + 1/p`, the chart-defined space `B^s_{p,q}(∂Ω)` is the +trace space of `B^{s+1/p}_{p,q}(closure Ω)` +(`Manifold.BesovAtlas.memBoundaryBesov_iff_exists_boundaryTrace`). -/ +theorem memBoundaryBesov_iff_exists_boundaryTrace {L : ℕ} (hL : 2 ≤ L) {s : ℝ} (hs : 0 < s) + (hsL : s + 1 / p.toReal < L) {q : ℝ≥0∞} (hq : 1 ≤ q) (g : closure Ω.carrier → ℂ) : + A.MemBoundaryBesov p s q g ↔ ∃ f : Lp ℂ p Ω.volumeOn, A.MemBesov hp (s + 1 / p.toReal) q f ∧ + ∀ i, A.boundaryPiece i (A.boundaryTrace Ω.volumeOn hp L f) =ᵐ[volume] A.boundaryPiece i g := + A.memBoundaryBesov_iff_exists_boundaryTrace Ω.volumeOn hp hL hs hsL hq g + +/-- **The trace of a continuous function on the closure of a smooth bounded domain** is its +restriction to the boundary: for `f ∈ B^{s+1/p}_{p,q}(closure Ω)` with a continuous representative +`g`, `s > 0`, `1 ≤ q ≤ ∞` and `L > s + 1/p`, every boundary piece of `Tr_A f` agrees almost +everywhere with that of `g` (`Manifold.BesovAtlas.boundaryPiece_boundaryTrace_of_continuous`). -/ +theorem boundaryPiece_boundaryTrace_of_continuous {L : ℕ} {s : ℝ} (hs : 0 < s) + (hsL : s + 1 / p.toReal < L) {q : ℝ≥0∞} (hq : 1 ≤ q) {f : Lp ℂ p Ω.volumeOn} + (hf : A.MemBesov hp (s + 1 / p.toReal) q f) {g : closure Ω.carrier → ℂ} (hg : Continuous g) + (hfg : (f : closure Ω.carrier → ℂ) =ᵐ[Ω.volumeOn] g) (k : Fin A.n) : + A.boundaryPiece k (A.boundaryTrace Ω.volumeOn hp L f) =ᵐ[volume] A.boundaryPiece k g := + A.boundaryPiece_boundaryTrace_of_continuous Ω.volumeOn hp hs hsL hq hf hg hfg k + +end Rd.SmoothDomain diff --git a/LeanPool/FunctionSpaces/Domains/Manifolds/ChartSobolev.lean b/LeanPool/FunctionSpaces/Domains/Manifolds/ChartSobolev.lean new file mode 100644 index 0000000000..e2e6149d50 --- /dev/null +++ b/LeanPool/FunctionSpaces/Domains/Manifolds/ChartSobolev.lean @@ -0,0 +1,433 @@ +/- +Copyright (c) 2026 Mario Ullrich. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Mario Ullrich +-/ +module + +public import LeanPool.FunctionSpaces.Domains.Manifolds.Besov +public import LeanPool.FunctionSpaces.Domains.Lipschitz.BesovDomainLocalisation +public import Mathlib.Analysis.InnerProductSpace.ProdL2 +public import Mathlib.Analysis.InnerProductSpace.PiL2 +public import Mathlib.Geometry.Manifold.Instances.Real + +/- +Modified for Lean Pool: module names and imports adapted. +-/ + +/-! +# The chart Sobolev space of a compact manifold + +Let `M` be a compact manifold with model `I` whose range `Ω_I = range I` is a Besov domain (no +boundary, the half-space, the quadrant), `μ` a smooth measure and `A` a Besov atlas with charts +`κ_i`, partition of unity `ψ_i` and cut-offs `θ_i`. Write `O_I = interior Ω_I` +(`Manifold.modelInterior`): all of `E` for manifolds without boundary +(`Manifold.modelInterior_eq_top`), the open half-space `{y_0 > 0}` for manifolds with boundary +(`Manifold.modelInterior_euclideanHalfSpace`); `Ω_I \ O_I` is a null set +(`Manifold.modelInterior_ae_eq_range`). + +* **Pieces and lifts as operators**: `P_i f = (ψ_i f) ∘ κ_i⁻¹` and `L_k F = θ_k · F ∘ κ_k` are + bounded linear operators `L_p(μ) → L_p(E)` and `L_p(E) → L_p(μ)` (`Manifold.BesovAtlas.pieceCLM`, + `Manifold.BesovAtlas.chartLiftCLM`), and `∑_k L_k P_k = id` + (`Manifold.BesovAtlas.sum_chartLiftCLM_comp_pieceCLM`). The lift `L_k F` sees `F` only on + `κ_k(tsupport θ_k) ∩ O_I`, where `κ_k(tsupport θ_k)` is compact + (`Manifold.BesovAtlas.isCompact_liftCarrier`, `Manifold.BesovAtlas.chartLiftLp_eq_of_ae_eq_on`), + and `P_i f` vanishes outside the compact `κ_i(tsupport ψ_i) ⊆ Ω_I` + (`Manifold.BesovAtlas.pieceLp_eq_zero_off`), hence outside a ball `B(0, R_i)` + (`Manifold.BesovAtlas.pieceRadius`, `Manifold.BesovAtlas.pieceLp_eq_zero_off_ball`). +* **The chart Sobolev space** `H^1_A(M)` (`Manifold.BesovAtlas.chartSobolev`) is the graph space of + the pairs `(f, g)` in `L_2(μ) × ∏_{i,j} L_2(O_I)` with `g_{ij} = ∂_{b_j} P_i f` weakly on `O_I` + for the basis `b_j = Rd.gridBasis E j`. It is a closed subspace + (`Manifold.BesovAtlas.isClosed_chartSobolev`), with the inner product + `⟨f, f'⟩_{L_2(μ)} + a_A(u, u')` of the **chart form** `a_A(u, u') = ∑_{i,j} ⟨g_{ij}, g'_{ij}⟩` + (`Manifold.BesovAtlas.chartForm`, `Manifold.BesovAtlas.inner_chartSobolev`), and + `J (f, g) = f` (`Manifold.BesovAtlas.chartSobolevEmbedding`) is injective of norm at most `1` + (`Manifold.BesovAtlas.chartSobolevEmbedding_injective`, + `Manifold.BesovAtlas.norm_chartSobolevEmbedding_le`). +* **`H^1_A(M) = B^1_{2,2}(M)`**: the range of `J` is the Besov space `B^1_{2,2}(M)` + (`Manifold.BesovAtlas.mem_range_chartSobolevEmbedding_iff`), piece by piece through + `W^1_2 = B^1_{2,2}` for compactly supported functions on the Besov domain `Ω_I` + (`Rd.BesovDomain.exists_hasWeakLineDeriv_iff_modNormOn_lt_top`); so it is the same for every + Besov atlas (`Manifold.BesovAtlas.range_chartSobolevEmbedding_eq`). +-/ + +@[expose] public section + +open MeasureTheory Set Filter Topology TopologicalSpace Module Metric +open scoped ENNReal Manifold ContDiff InnerProductSpace + +namespace Manifold + +/-! ### The open model set -/ + +section ModelInterior + +variable {E : Type*} [NormedAddCommGroup E] [InnerProductSpace ℝ E] [FiniteDimensional ℝ E] + {H : Type*} [TopologicalSpace H] (I : ModelWithCorners ℝ E H) + +/-- The **open model set** `O_I = interior (range I)`, as an open set of `E`: the open half-space +for manifolds with boundary, the open quadrant for manifolds with corners, `E` for manifolds without +boundary. -/ +noncomputable abbrev modelInterior : Opens E := + Opens.interior (range I) + +omit [FiniteDimensional ℝ E] in +/-- **Without boundary the open model set is `E`**, since `range I = E`. -/ +theorem modelInterior_eq_top [I.Boundaryless] : modelInterior I = ⊤ := + Opens.ext (by simp [ModelWithCorners.Boundaryless.range_eq_univ]) + +/-- **The open model set is the range up to a null set** when the range is a Besov domain: the +frontier of a convex set is a null set (`Rd.BesovDomain.interior_ae_eq`). -/ +theorem modelInterior_ae_eq_range [MeasurableSpace E] [BorelSpace E] [Rd.BesovDomain (range I)] : + (modelInterior I : Set E) =ᵐ[volume] range I := + Rd.BesovDomain.interior_ae_eq (range I) + +end ModelInterior + +/-- **The open model set of the half-space** `𝓡∂ n` is the open half-space `{y | 0 < y 0}` +(Mathlib's `interior_range_modelWithCornersEuclideanHalfSpace`). -/ +theorem modelInterior_euclideanHalfSpace (n : ℕ) [NeZero n] : + (modelInterior (𝓡∂ n) : Set (EuclideanSpace ℝ (Fin n))) = {y | 0 < y 0} := + interior_range_modelWithCornersEuclideanHalfSpace n + +variable {E : Type*} [NormedAddCommGroup E] [InnerProductSpace ℝ E] [FiniteDimensional ℝ E] + [MeasurableSpace E] [BorelSpace E] {H : Type*} [TopologicalSpace H] + {I : ModelWithCorners ℝ E H} {M : Type*} [TopologicalSpace M] [ChartedSpace H M] + [MeasurableSpace M] [BorelSpace M] [CompactSpace M] + +namespace BesovAtlas + +variable (A : BesovAtlas I M) {μ : Measure M} [IsSmoothMeasure I μ] {p : ℝ≥0∞} [Fact (1 ≤ p)] + (hp : p ≠ ⊤) + +/-! ### Pieces and lifts as bounded operators -/ + +variable (μ) in +/-- **The `i`-th piece as a bounded operator** `L_p(μ) → L_p(E)`, `f ↦ (ψ_i f) ∘ κ_i⁻¹`: linear +(`Manifold.BesovAtlas.pieceLp_add`, `Manifold.BesovAtlas.pieceLp_smul`) and bounded +(`Manifold.BesovAtlas.exists_eLpNorm_piece_le`). -/ +noncomputable def pieceCLM (i : Fin A.n) : Lp ℂ p μ →L[ℂ] Lp ℂ p (volume : Measure E) := + LinearMap.mkContinuousOfExistsBound + { toFun := A.pieceLp μ hp i + map_add' := A.pieceLp_add hp i + map_smul' := A.pieceLp_smul hp i } (by + obtain ⟨C, hC, hle⟩ := A.exists_eLpNorm_piece_le μ i + (zero_lt_one.trans_le (Fact.out : 1 ≤ p)).ne' hp + refine ⟨C.toReal, fun f => ?_⟩ + have h : ‖A.pieceLp μ hp i f‖ₑ ≤ C * ‖f‖ₑ := by + rw [Lp.eNorm_def, Lp.eNorm_def, eLpNorm_congr_ae (A.pieceLp_ae μ hp i f)] + exact hle f (Lp.stronglyMeasurable f) + change ‖A.pieceLp μ hp i f‖ ≤ _ + rw [← toReal_eNorm, ← toReal_eNorm f, ← ENNReal.toReal_mul] + exact ENNReal.toReal_mono (ENNReal.mul_ne_top hC eNorm_ne_top) h) + +/-- `pieceCLM i f` is the piece `(ψ_i f) ∘ κ_i⁻¹`. -/ +theorem pieceCLM_apply (i : Fin A.n) (f : Lp ℂ p μ) : A.pieceCLM μ hp i f = A.pieceLp μ hp i f := + rfl + +variable (μ) in +/-- **The lift from the `k`-th chart as a bounded operator** `L_p(E) → L_p(μ)`, +`F ↦ θ_k · F ∘ κ_k` (`Manifold.exists_eLpNorm_chartLift_le`). -/ +noncomputable def chartLiftCLM (k : Fin A.n) : Lp ℂ p (volume : Measure E) →L[ℂ] Lp ℂ p μ := + LinearMap.mkContinuousOfExistsBound + { toFun := A.chartLiftLp μ hp k + map_add' := A.chartLiftLp_add hp k + map_smul' := A.chartLiftLp_smul hp k } (by + obtain ⟨C, hC, hle⟩ := exists_eLpNorm_chartLift_le (I := I) μ (A.chart_mem k) + (A.contMDiff_theta k).continuous (A.tsupport_theta_subset k) + (zero_lt_one.trans_le (Fact.out : 1 ≤ p)).ne' hp + refine ⟨C.toReal, fun F => ?_⟩ + have h : ‖A.chartLiftLp μ hp k F‖ₑ ≤ C * ‖F‖ₑ := by + rw [Lp.eNorm_def, Lp.eNorm_def, eLpNorm_congr_ae (A.chartLiftLp_ae hp k F)] + exact hle F (Lp.stronglyMeasurable F) + change ‖A.chartLiftLp μ hp k F‖ ≤ _ + rw [← toReal_eNorm, ← toReal_eNorm F, ← ENNReal.toReal_mul] + exact ENNReal.toReal_mono (ENNReal.mul_ne_top hC eNorm_ne_top) h) + +/-- `chartLiftCLM k F` is the lift `θ_k · F ∘ κ_k`. -/ +theorem chartLiftCLM_apply (k : Fin A.n) (F : Lp ℂ p (volume : Measure E)) : + A.chartLiftCLM μ hp k F = A.chartLiftLp μ hp k F := + rfl + +/-! ### The retract identity -/ + +omit [FiniteDimensional ℝ E] [MeasurableSpace E] [BorelSpace E] [MeasurableSpace M] + [BorelSpace M] [CompactSpace M] in +/-- **The lift of a piece** (pointwise): `θ_k · (piece_k g) ∘ κ_k = ψ_k g`, since +`κ_k⁻¹ ∘ κ_k = id` on the source and `θ_k ψ_k = ψ_k`. -/ +theorem chartLift_piece (k : Fin A.n) (g : M → ℂ) : + chartLift I (A.chart k) (A.theta k) (A.piece k g) = fun x => (A.psi k x : ℂ) * g x := by + funext x + by_cases hx : x ∈ (A.chart k).source + · have hx' : x ∈ (A.ext k).source := by rwa [OpenPartialHomeomorph.extend_source] + rw [chartLift, indicator_of_mem hx, piece, indicator_of_mem ((A.ext k).map_source hx'), + (A.ext k).left_inv hx', ← mul_assoc, ← Complex.ofReal_mul, A.theta_mul_psi] + · have hψ : A.psi k x = 0 := + image_eq_zero_of_notMem_tsupport fun h => hx (A.tsupport_psi_subset k h) + rw [chartLift, indicator_of_notMem hx, hψ, Complex.ofReal_zero, zero_mul] + +/-- **The retract identity**: `∑_k θ_k · (P_k f) ∘ κ_k = f` for every `f ∈ L_p(μ)`, since the lift +of the `k`-th piece is `ψ_k f` (`Manifold.BesovAtlas.chartLift_piece`) and `∑_k ψ_k = 1`. -/ +theorem sum_chartLiftLp_pieceLp (f : Lp ℂ p μ) : + ∑ k, A.chartLiftLp μ hp k (A.pieceLp μ hp k f) = f := by + refine Lp.ext ?_ + have h : ∀ k, (A.chartLiftLp μ hp k (A.pieceLp μ hp k f) : M → ℂ) =ᵐ[μ] + fun x => (A.psi k x : ℂ) * f x := fun k => + (A.chartLiftLp_ae hp k _).trans ((chartLift_ae_eq (I := I) (μ := μ) (A.chart_mem k) + (A.tsupport_theta_subset k) (A.pieceLp_ae μ hp k f)).trans + (EventuallyEq.of_eq (A.chartLift_piece k f))) + filter_upwards [Lp.coeFn_fun_finsetSum Finset.univ + (fun k => A.chartLiftLp μ hp k (A.pieceLp μ hp k f)), ae_all_iff.2 h] with x h1 h2 + rw [h1, Finset.sum_congr rfl fun k _ => h2 k, ← Finset.sum_mul, ← Complex.ofReal_sum, + A.sum_psi, Complex.ofReal_one, one_mul] + +/-- **The retract identity for operators**: `∑_k L_k ∘ P_k = id` on `L_p(μ)` +(`Manifold.BesovAtlas.sum_chartLiftLp_pieceLp`). -/ +theorem sum_chartLiftCLM_comp_pieceCLM : + ∑ k, (A.chartLiftCLM μ hp k).comp (A.pieceCLM μ hp k) = + ContinuousLinearMap.id ℂ (Lp ℂ p μ) := by + ext1 f + simp only [FunLike.coe_sum, Finset.sum_apply, ContinuousLinearMap.comp_apply, + chartLiftCLM_apply, pieceCLM_apply, ContinuousLinearMap.id_apply] + exact A.sum_chartLiftLp_pieceLp hp f + +/-! ### Where lifts and pieces live -/ + +/-- **The carrier of the `k`-th lift**: the compact set `κ_k(tsupport θ_k) ⊆ range I`, the only +part of `E` that the lift `θ_k · F ∘ κ_k` sees. -/ +noncomputable def liftCarrier (k : Fin A.n) : Set E := + A.ext k '' tsupport (A.theta k) + +omit [FiniteDimensional ℝ E] [MeasurableSpace E] [BorelSpace E] [MeasurableSpace M] + [BorelSpace M] in +/-- The carrier of a lift is compact, the image of the compact `tsupport θ_k` under the chart. -/ +theorem isCompact_liftCarrier (k : Fin A.n) : IsCompact (A.liftCarrier k) := + (isClosed_tsupport _).isCompact.image_of_continuousOn ((A.chart k).continuousOn_extend.mono + (by rw [OpenPartialHomeomorph.extend_source]; exact A.tsupport_theta_subset k)) + +omit [FiniteDimensional ℝ E] [MeasurableSpace E] [BorelSpace E] [MeasurableSpace M] + [BorelSpace M] [CompactSpace M] in +/-- The carrier of a lift lies in `range I`, since the extended charts take values there. -/ +theorem liftCarrier_subset_range (k : Fin A.n) : A.liftCarrier k ⊆ range I := by + rintro _ ⟨x, -, rfl⟩ + exact ⟨A.chart k x, rfl⟩ + +/-- **Lifts are local**: if `F = G` almost everywhere on `κ_k(tsupport θ_k) ∩ O_I`, then the lifts +`θ_k · F ∘ κ_k` and `θ_k · G ∘ κ_k` agree in `L_p(μ)`; the points of `range I \ O_I` form a null +set (`Manifold.modelInterior_ae_eq_range`), whose preimage is `μ`-null +(`Manifold.IsSmoothMeasure.ae_comp_extend`). -/ +theorem chartLiftLp_eq_of_ae_eq_on [Rd.BesovDomain (range I)] (k : Fin A.n) + {F G : Lp ℂ p (volume : Measure E)} + (h : ∀ᵐ y ∂volume, y ∈ A.liftCarrier k ∩ interior (range I) → F y = G y) : + A.chartLiftLp μ hp k F = A.chartLiftLp μ hp k G := by + have hO : ∀ᵐ y ∂(volume : Measure E), y ∈ range I → y ∈ interior (range I) := + (modelInterior_ae_eq_range I).mem_iff.mono fun y hy h => hy.2 h + refine Lp.ext ?_ + filter_upwards [A.chartLiftLp_ae hp k F, A.chartLiftLp_ae hp k G, + IsSmoothMeasure.ae_comp_extend (I := I) (μ := μ) (A.chart_mem k) (isClosed_tsupport (A.theta k)) + (A.tsupport_theta_subset k) (h.and hO)] with x h1 h2 h3 + rw [h1, h2] + by_cases hxs : x ∈ (A.chart k).source + · simp only [chartLift, indicator_of_mem hxs] + by_cases hxt : x ∈ tsupport (A.theta k) + · have hy : A.ext k x ∈ A.liftCarrier k := mem_image_of_mem _ hxt + rw [(h3 hxt).1 ⟨hy, (h3 hxt).2 (A.liftCarrier_subset_range k hy)⟩] + · rw [image_eq_zero_of_notMem_tsupport hxt, Complex.ofReal_zero, zero_mul, zero_mul] + · simp only [chartLift, indicator_of_notMem hxs] + +/-- **The piece in `L_p` vanishes off its carrier**: `P_i f = 0` almost everywhere outside the +compact `κ_i(tsupport ψ_i)`. -/ +theorem pieceLp_eq_zero_off (i : Fin A.n) (f : Lp ℂ p μ) : + ∀ᵐ y ∂volume, y ∉ A.pieceCarrier i → A.pieceLp μ hp i f y = 0 := + (A.pieceLp_ae μ hp i f).mono fun y hy hy' => by + rw [hy] + exact A.piece_eq_zero_of_notMem i _ hy' + +/-- **The radius of the `i`-th piece**: a radius `R_i` with `κ_i(tsupport ψ_i) ⊆ B(0, R_i)`, which +exists as the carrier of the piece is compact (`Manifold.BesovAtlas.isCompact_pieceCarrier`). -/ +noncomputable def pieceRadius (i : Fin A.n) : ℝ := + Classical.choose ((A.isCompact_pieceCarrier i).isBounded.subset_ball (0 : E)) + +omit [FiniteDimensional ℝ E] [MeasurableSpace E] [BorelSpace E] [MeasurableSpace M] + [BorelSpace M] in +/-- The carrier `κ_i(tsupport ψ_i)` of the `i`-th piece lies in the ball `B(0, R_i)`. -/ +theorem pieceCarrier_subset_ball (i : Fin A.n) : A.pieceCarrier i ⊆ ball 0 (A.pieceRadius i) := + Classical.choose_spec ((A.isCompact_pieceCarrier i).isBounded.subset_ball (0 : E)) + +/-- **The pieces vanish outside the ball of radius `R_i`**: `P_i f = 0` almost everywhere outside +`B(0, R_i)`, for every `f ∈ L_p(μ)` (`Manifold.BesovAtlas.pieceLp_eq_zero_off`). -/ +theorem pieceLp_eq_zero_off_ball (i : Fin A.n) (f : Lp ℂ p μ) : + ∀ᵐ y ∂volume, y ∉ ball (0 : E) (A.pieceRadius i) → A.pieceLp μ hp i f y = 0 := + (A.pieceLp_eq_zero_off hp i f).mono fun _ hy hyR => + hy fun h => hyR (A.pieceCarrier_subset_ball i h) + +/-- **The pieces vanish outside a ball**: there is `R` with `P_i f = 0` almost everywhere outside +`B(0, R)` for every `f ∈ L_p(μ)`, for example `R = R_i` +(`Manifold.BesovAtlas.pieceLp_eq_zero_off_ball`). -/ +theorem exists_pieceLp_eq_zero_off_ball (i : Fin A.n) : + ∃ R : ℝ, ∀ f : Lp ℂ p μ, ∀ᵐ y ∂volume, y ∉ ball (0 : E) R → A.pieceLp μ hp i f y = 0 := + ⟨A.pieceRadius i, A.pieceLp_eq_zero_off_ball hp i⟩ + +/-! ### The chart Sobolev space -/ + +variable (μ) in +/-- **Values and chart gradients**: the Hilbert space `L_2(μ) × ∏_{(i,j)} L_2(O_I)` of pairs +`(f, g)`, `i` over the charts and `j < dim E`, with the inner product +`⟨f, f'⟩_{L_2(μ)} + ∑_{i,j} ⟨g_{ij}, g'_{ij}⟩_{L_2(O_I)}`. -/ +abbrev chartValueGradientL2 : Type _ := + WithLp 2 (Lp ℂ 2 μ × PiLp 2 (fun _ : Fin A.n × Fin (finrank ℝ E) => + Lp ℂ 2 (volume.restrict (interior (range I))))) + +variable (μ) in +/-- **The chart Sobolev space** `H^1_A(M)`: the pairs `(f, g)` in `L_2(μ) × ∏_{(i,j)} L_2(O_I)` +with `g_{ij} = ∂_{b_j} P_i f` weakly on the open model set `O_I` for the basis +`b_j = Rd.gridBasis E j`, where `P_i f = (ψ_i f) ∘ κ_i⁻¹`. For manifolds with boundary `O_I` is the +open half-space (`Manifold.modelInterior_euclideanHalfSpace`). -/ +noncomputable def chartSobolev : Submodule ℂ (A.chartValueGradientL2 μ) where + carrier := {u | ∀ ij : Fin A.n × Fin (finrank ℝ E), Rd.HasWeakLineDeriv (modelInterior I) + (fun _ : Fin 1 => Rd.gridBasis E ij.2) (A.pieceLp μ Rd.two_ne_top ij.1 u.fst) (u.snd ij)} + zero_mem' := fun ij => by + rw [WithLp.zero_fst, A.pieceLp_zero, WithLp.zero_snd, PiLp.zero_apply] + exact Rd.hasWeakLineDeriv_zero.congr_ae (ae_restrict_of_ae (Lp.coeFn_zero ..).symm) + (Lp.coeFn_zero ..).symm + add_mem' := fun {u w} hu hw ij => by + rw [WithLp.add_fst, A.pieceLp_add, WithLp.add_snd, PiLp.add_apply] + exact ((hu ij).add (hw ij)).congr_ae (ae_restrict_of_ae (Lp.coeFn_add ..).symm) + (Lp.coeFn_add ..).symm + smul_mem' := fun c u hu ij => by + rw [WithLp.smul_fst, A.pieceLp_smul, WithLp.smul_snd, PiLp.smul_apply] + exact ((hu ij).smul c).congr_ae (ae_restrict_of_ae (Lp.coeFn_smul ..).symm) + (Lp.coeFn_smul ..).symm + +/-- Membership in the chart Sobolev space: `g_{ij} = ∂_{b_j} P_i f` weakly on `O_I` for all +`i, j`. -/ +theorem mem_chartSobolev {u : A.chartValueGradientL2 μ} : + u ∈ A.chartSobolev μ ↔ ∀ ij : Fin A.n × Fin (finrank ℝ E), + Rd.HasWeakLineDeriv (modelInterior I) (fun _ : Fin 1 => Rd.gridBasis E ij.2) + (A.pieceLp μ Rd.two_ne_top ij.1 u.fst) (u.snd ij) := + Iff.rfl + +variable (μ) in +/-- **The chart Sobolev space is closed**: the pieces depend continuously on `f` +(`Manifold.BesovAtlas.pieceCLM`), and weak derivatives pass to limits in `L_2(O_I)` +(`Rd.HasWeakLineDeriv.of_tendsto`). -/ +theorem isClosed_chartSobolev : IsClosed (A.chartSobolev μ : Set (A.chartValueGradientL2 μ)) := by + refine IsSeqClosed.isClosed fun {u u₀} hu hlim ij => ?_ + have h0 : Tendsto (fun n => (u n).fst) atTop (𝓝 u₀.fst) := + ((WithLp.fstL 2 ℂ _ _).continuous.tendsto u₀).comp hlim + have h1 : Tendsto (fun n => A.pieceLp μ Rd.two_ne_top ij.1 (u n).fst) atTop + (𝓝 (A.pieceLp μ Rd.two_ne_top ij.1 u₀.fst)) := + ((A.pieceCLM μ Rd.two_ne_top ij.1).continuous.tendsto _).comp h0 + have h2 : Tendsto (fun n => (u n).snd ij) atTop (𝓝 (u₀.snd ij)) := + ((PiLp.continuous_apply 2 _ ij).tendsto _).comp + (((WithLp.sndL 2 ℂ _ _).continuous.tendsto u₀).comp hlim) + refine Rd.HasWeakLineDeriv.of_tendsto one_le_two one_le_two (fun n => hu n ij) + ((Lp.memLp _).restrict _) (Lp.memLp _) ?_ ((Lp.tendsto_Lp_iff_tendsto_eLpNorm' _ _).1 h2) + exact tendsto_of_tendsto_of_tendsto_of_le_of_le tendsto_const_nhds + ((Lp.tendsto_Lp_iff_tendsto_eLpNorm' _ _).1 h1) (fun n => zero_le) + fun n => eLpNorm_mono_measure _ Measure.restrict_le_self + +/-- The chart Sobolev space is a Hilbert space, as a closed subspace +(`Manifold.BesovAtlas.isClosed_chartSobolev`). -/ +instance completeSpace_chartSobolev : CompleteSpace (A.chartSobolev μ) := + (A.isClosed_chartSobolev μ).completeSpace_coe + +variable (μ) in +/-- **The chart form** `a_A(u, w) = ∑_{i,j} ⟨g_{ij}, g'_{ij}⟩_{L_2(O_I)}` for `u = (f, g)` and +`w = (f', g')` in the chart Sobolev space: the sum over the charts of the gradient forms +`∑_j ∫_{O_I} conj (∂_{b_j} P_i f) · ∂_{b_j} P_i f'`. -/ +noncomputable def chartForm (u w : A.chartSobolev μ) : ℂ := + ∑ ij, ⟪(u : A.chartValueGradientL2 μ).snd ij, (w : A.chartValueGradientL2 μ).snd ij⟫_ℂ + +/-- **The inner product of the chart Sobolev space**: `⟨u, w⟩ = ⟨f, f'⟩_{L_2(μ)} + a_A(u, w)` for +`u = (f, g)` and `w = (f', g')`. -/ +theorem inner_chartSobolev (u w : A.chartSobolev μ) : + ⟪u, w⟫_ℂ = + ⟪(u : A.chartValueGradientL2 μ).fst, (w : A.chartValueGradientL2 μ).fst⟫_ℂ + + A.chartForm μ u w := by + rw [Submodule.coe_inner, WithLp.prod_inner_apply, PiLp.inner_apply] + rfl + +variable (μ) in +/-- **The chart Sobolev embedding** `J : H^1_A(M) → L_2(μ)`, `(f, g) ↦ f`. -/ +noncomputable def chartSobolevEmbedding : A.chartSobolev μ →L[ℂ] Lp ℂ 2 μ := + WithLp.fstL 2 ℂ _ _ ∘L (A.chartSobolev μ).subtypeL + +/-- `J u` is the value `f` of `u = (f, g)`. -/ +theorem chartSobolevEmbedding_apply (u : A.chartSobolev μ) : + A.chartSobolevEmbedding μ u = (u : A.chartValueGradientL2 μ).fst := + rfl + +/-- The chart Sobolev embedding has norm at most `1`. -/ +theorem norm_chartSobolevEmbedding_le : ‖A.chartSobolevEmbedding μ‖ ≤ 1 := + ContinuousLinearMap.opNorm_le_bound _ zero_le_one fun u => by + rw [one_mul] + exact WithLp.norm_fst_le _ (u : A.chartValueGradientL2 μ) + +/-- **The chart Sobolev embedding is injective**: the weak derivatives of the pieces are determined +by `f` (`Rd.HasWeakLineDeriv.unique`). -/ +theorem chartSobolevEmbedding_injective : Function.Injective (A.chartSobolevEmbedding μ) := by + intro u w h + have hs : ∀ ij, + (u : A.chartValueGradientL2 μ).snd ij = (w : A.chartValueGradientL2 μ).snd ij := by + intro ij + have hw := w.2 ij + rw [← (show (u : A.chartValueGradientL2 μ).fst = (w : A.chartValueGradientL2 μ).fst + from h)] at hw + exact Lp.ext ((u.2 ij).unique hw) + exact Subtype.ext (WithLp.ofLp_injective 2 (Prod.ext h (WithLp.ofLp_injective 2 (funext hs)))) + +/-! ### The range of the chart Sobolev embedding -/ + +/-- **The range by the pieces**: `f ∈ L_2(μ)` is a value of the chart Sobolev embedding iff every +piece `P_i f` has weak derivatives `∂_{b_j} P_i f ∈ L_2(O_I)` on `O_I` along the basis vectors +`b_j = Rd.gridBasis E j`. -/ +theorem mem_range_chartSobolevEmbedding_iff_forall_piece (f : Lp ℂ 2 μ) : + f ∈ range (A.chartSobolevEmbedding μ) ↔ ∀ i, ∃ g : Fin (finrank ℝ E) → + Lp ℂ 2 (volume.restrict (interior (range I))), ∀ j, Rd.HasWeakLineDeriv (modelInterior I) + (fun _ : Fin 1 => Rd.gridBasis E j) (A.pieceLp μ Rd.two_ne_top i f) (g j) := by + constructor + · rintro ⟨u, rfl⟩ i + exact ⟨fun j => (u : A.chartValueGradientL2 μ).snd (i, j), fun j => u.2 (i, j)⟩ + · intro h + choose g hg using h + exact ⟨⟨WithLp.toLp 2 (f, WithLp.toLp 2 fun ij => g ij.1 ij.2), fun ij => hg ij.1 ij.2⟩, rfl⟩ + +/-- **`H^1_A(M) = B^1_{2,2}(M)` for one atlas**: `f ∈ L_2(μ)` is a value of the chart Sobolev +embedding iff `f ∈ B^1_{2,2}` for the atlas `A`. Each piece vanishes outside a ball +(`Manifold.BesovAtlas.exists_pieceLp_eq_zero_off_ball`), so it has a weak gradient in `L_2(O_I)` +iff its intrinsic `B^1_{2,2}` quasi-norm on `range I` of order `2` is finite +(`Rd.BesovDomain.exists_hasWeakLineDeriv_iff_modNormOn_lt_top`). -/ +theorem mem_range_chartSobolevEmbedding_iff_memBesov [Rd.BesovDomain (range I)] + (f : Lp ℂ 2 μ) : + f ∈ range (A.chartSobolevEmbedding μ) ↔ A.MemBesov Rd.two_ne_top 1 2 f := by + rw [A.mem_range_chartSobolevEmbedding_iff_forall_piece, + A.memBesov_iff_forall_modNormOn_lt_top Rd.two_ne_top (r := 2) one_pos (by norm_num) one_le_two] + refine forall_congr' fun i => ?_ + obtain ⟨R, hR⟩ := A.exists_pieceLp_eq_zero_off_ball (μ := μ) Rd.two_ne_top i + exact Rd.BesovDomain.exists_hasWeakLineDeriv_iff_modNormOn_lt_top le_rfl (hR f) + +/-- **The chart Sobolev space is the same for every atlas**: two Besov atlases `A, A'` give the +same range `J(H^1_A(M)) = J(H^1_{A'}(M))` in `L_2(μ)`, since both are `B^1_{2,2}(M)` +(`Manifold.BesovAtlas.memBesov_iff_memBesov`). -/ +theorem range_chartSobolevEmbedding_eq [Rd.BesovDomain (range I)] [IsManifold I ∞ M] + (A' : BesovAtlas I M) : + range (A.chartSobolevEmbedding μ) = range (A'.chartSobolevEmbedding μ) := by + ext f + rw [A.mem_range_chartSobolevEmbedding_iff_memBesov, + A'.mem_range_chartSobolevEmbedding_iff_memBesov] + exact A.memBesov_iff_memBesov Rd.two_ne_top A' one_pos one_le_two f + +/-- **`H^1_A(M) = B^1_{2,2}(M)`**: for every Besov atlas `A` of a compact manifold whose model range +is a Besov domain, `f ∈ L_2(μ)` is a value of the chart Sobolev embedding iff `f` lies in the Besov +space `B^1_{2,2}(M)` (`Manifold.BesovAtlas.mem_range_chartSobolevEmbedding_iff_memBesov`, +`Manifold.memBesov_iff`). -/ +theorem mem_range_chartSobolevEmbedding_iff [Rd.BesovDomain (range I)] [T2Space M] + [IsManifold I ∞ M] (f : Lp ℂ 2 μ) : + f ∈ range (A.chartSobolevEmbedding μ) ↔ Manifold.MemBesov I μ Rd.two_ne_top 1 2 f := by + rw [Manifold.memBesov_iff I μ Rd.two_ne_top A one_pos one_le_two f] + exact A.mem_range_chartSobolevEmbedding_iff_memBesov f + +end BesovAtlas + +end Manifold diff --git a/LeanPool/FunctionSpaces/Domains/Manifolds/SmoothDomain.lean b/LeanPool/FunctionSpaces/Domains/Manifolds/SmoothDomain.lean new file mode 100644 index 0000000000..65555b44cf --- /dev/null +++ b/LeanPool/FunctionSpaces/Domains/Manifolds/SmoothDomain.lean @@ -0,0 +1,420 @@ +/- +Copyright (c) 2026 Mario Ullrich. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Mario Ullrich +-/ +module + +public import LeanPool.FunctionSpaces.Domains.Lipschitz.GraphStraightening +public import LeanPool.FunctionSpaces.Domains.Manifolds.Besov + +/- +Modified for Lean Pool: module names and imports adapted. +-/ + +/-! +# Smooth bounded domains as manifolds with boundary + +A **smooth bounded domain** in `ℝ^n` (`Rd.SmoothDomain`) is a bounded Lipschitz domain whose graph +functions are smooth. Its closure is a compact smooth manifold with boundary modelled on the +half-space `𝓡∂ n`: + +* **Boundary charts.** For the `j`-th boundary ball, the straightening + `σ_j(x) = A_j (x - φ_j(x) e_j)` (`Rd.SmoothDomain.straighten`) flattens the graph and turns the + upward direction `e_j` into `e₀ = (1, 0, …, 0)` by a reflection `A_j` (`Rd.alignTo`); on the + ball, `x ∈ closure Ω ↔ 0 ≤ σ_j(x)_0`. +* **Interior charts.** Around a point `x₀` of `Ω` with `B(x₀, ρ) ⊆ Ω`, the translation + `x ↦ x - x₀ + 2ρ e₀` maps the ball into the open half-space. + +Both are instances of a **straightener** (`Rd.SmoothDomain.Straightener`): a smooth, +measure-preserving bijection `σ` of `ℝ^n` with smooth inverse and an open set `B` on which the +closure of `Ω` is `{0 ≤ σ(x)_0}`. Each straightener gives a chart of the closure +(`Rd.SmoothDomain.Straightener.chart`); the changes of charts are restrictions of the smooth maps +`σ' ∘ τ`, so the closure is a smooth manifold (`Rd.SmoothDomain.isManifold`). +-/ + +@[expose] public section + +open MeasureTheory Set Filter Topology Metric +open scoped ENNReal Manifold ContDiff + +namespace Rd + +variable {n : ℕ} [NeZero n] + +/-! ### Aligning a unit vector with the first axis -/ + +/-- The **alignment** of a vector `e` with `e₀`: the reflection in `(e - e₀)^⊥`. -/ +noncomputable def alignTo (e : EuclideanSpace ℝ (Fin n)) : + EuclideanSpace ℝ (Fin n) ≃ₗᵢ[ℝ] EuclideanSpace ℝ (Fin n) := + (ℝ ∙ (e - e0))ᗮ.reflection + +/-- The alignment maps a unit vector `e` to `e₀`. -/ +theorem alignTo_apply_self {e : EuclideanSpace ℝ (Fin n)} (he : ‖e‖ = 1) : alignTo e e = e0 := + Submodule.reflection_sub (by rw [he, norm_e0]) + +/-! ### Closures -/ + +omit [NeZero n] in +/-- **Closures agree on open sets where the sets agree**: if `B ∩ S = B ∩ T` for an open `B`, then +`closure S` and `closure T` have the same points in `B`, since near `x ∈ B` the neighbourhoods +within `S` and within `T` are those within `B ∩ S = B ∩ T` (Mathlib's +`mem_closure_iff_nhdsWithin_neBot`, `nhdsWithin_restrict`). -/ +theorem mem_closure_iff_of_inter_eq {V : Type*} [TopologicalSpace V] {S T B : Set V} + (hB : IsOpen B) (h : B ∩ S = B ∩ T) {x : V} (hx : x ∈ B) : + x ∈ closure S ↔ x ∈ closure T := by + rw [mem_closure_iff_nhdsWithin_neBot, mem_closure_iff_nhdsWithin_neBot, + nhdsWithin_restrict S hx hB, nhdsWithin_restrict T hx hB, inter_comm S, inter_comm T, h] + +/-! ### Smooth domains and their straighteners -/ + +/-- A **smooth bounded domain** in `ℝ^n`: a bounded Lipschitz domain whose graph functions are +smooth. It carries its charts as data; every bounded open set with smooth local graphs +(`Rd.IsBoundedSmoothDomain`) is the carrier of one (`Rd.SmoothDomain.ofIsBoundedSmoothDomain`, +`Rd.isBoundedSmoothDomain_iff_exists`), every open ball among them (`Rd.SmoothDomain.ball`). -/ +structure SmoothDomain (n : ℕ) [NeZero n] extends BoundedLipschitzDomain (EuclideanSpace ℝ (Fin n)) + where + contDiff_phi : ∀ j, ContDiff ℝ ((⊤ : ℕ∞) : WithTop ℕ∞) (graph j).phi + +namespace SmoothDomain + +variable (Ω : SmoothDomain n) + +/-- A **straightener** of the closure of `Ω`: a smooth, measure-preserving bijection `σ` of `ℝ^n` +with smooth inverse `τ`, and an open set `B` on which `closure Ω = {0 ≤ σ(x)_0}`, with a base point +of `closure Ω ∩ B`. -/ +structure Straightener where + /-- The straightening map. -/ + sigma : EuclideanSpace ℝ (Fin n) → EuclideanSpace ℝ (Fin n) + /-- Its inverse. -/ + tau : EuclideanSpace ℝ (Fin n) → EuclideanSpace ℝ (Fin n) + contDiff_sigma : ContDiff ℝ ((⊤ : ℕ∞) : WithTop ℕ∞) sigma + contDiff_tau : ContDiff ℝ ((⊤ : ℕ∞) : WithTop ℕ∞) tau + sigma_tau : ∀ y, sigma (tau y) = y + tau_sigma : ∀ x, tau (sigma x) = x + measurePreserving_sigma : MeasurePreserving sigma volume volume + /-- The open set where the straightener describes the closure. -/ + B : Set (EuclideanSpace ℝ (Fin n)) + isOpen_B : IsOpen B + isBounded_B : Bornology.IsBounded B + mem_closure_iff : ∀ x ∈ B, x ∈ closure Ω.carrier ↔ 0 ≤ sigma x 0 + mem_iff : ∀ x ∈ B, x ∈ Ω.carrier ↔ 0 < sigma x 0 + /-- A base point. -/ + base : EuclideanSpace ℝ (Fin n) + base_mem : base ∈ closure Ω.carrier + +namespace Straightener + +variable {Ω} (S : Straightener Ω) + +/-- The inverse of a straightener stays in the closure on the half-space part of `σ(B)`. -/ +theorem tau_mem_closure {y : EuclideanSpace ℝ (Fin n)} (hy : 0 ≤ y 0) (hyB : S.tau y ∈ S.B) : + S.tau y ∈ closure Ω.carrier := + (S.mem_closure_iff _ hyB).2 (by rwa [S.sigma_tau]) + +/-- The chart map `x ↦ σ(x)`, with values in the half-space. -/ +noncomputable def toMap (x : closure Ω.carrier) : EuclideanHalfSpace n := (𝓡∂ n).symm (S.sigma x) + +/-- On `B` the chart map is `σ`, read in `ℝ^n`. -/ +theorem coe_toMap {x : closure Ω.carrier} (hx : (x : EuclideanSpace ℝ (Fin n)) ∈ S.B) : + (𝓡∂ n) (S.toMap x) = S.sigma x := by + have h0 : 0 ≤ S.sigma x 0 := (S.mem_closure_iff _ hx).1 x.2 + rw [toMap, modelWithCornersEuclideanHalfSpace_symm_apply_of_le h0, + modelWithCornersEuclideanHalfSpace_apply] + +open Classical in +/-- The inverse chart map `y ↦ τ(y)`, with values in the closure (the base point elsewhere). -/ +noncomputable def invMap (y : EuclideanHalfSpace n) : closure Ω.carrier := + if h : S.tau ((𝓡∂ n) y) ∈ closure Ω.carrier then ⟨S.tau ((𝓡∂ n) y), h⟩ else ⟨S.base, S.base_mem⟩ + +/-- On the half-space part of `σ(B)` the inverse chart map is `τ`. -/ +theorem coe_invMap {y : EuclideanHalfSpace n} (hy : S.tau ((𝓡∂ n) y) ∈ S.B) : + (S.invMap y : EuclideanSpace ℝ (Fin n)) = S.tau ((𝓡∂ n) y) := by + have hcl : S.tau ((𝓡∂ n) y) ∈ closure Ω.carrier := S.tau_mem_closure y.2 hy + rw [invMap, dite_eq_left hcl] + +/-- The **chart** of the closure given by a straightener: `x ↦ σ(x)` on `closure Ω ∩ B`, with +values in the half-space. -/ +noncomputable def chart : + OpenPartialHomeomorph (closure Ω.carrier) (EuclideanHalfSpace n) where + toFun := S.toMap + invFun := S.invMap + source := {x | (x : EuclideanSpace ℝ (Fin n)) ∈ S.B} + target := {y | S.tau ((𝓡∂ n) y) ∈ S.B} + map_source' x hx := by + change S.tau ((𝓡∂ n) (S.toMap x)) ∈ S.B + rw [S.coe_toMap hx, S.tau_sigma] + exact hx + map_target' y hy := by + change (S.invMap y : EuclideanSpace ℝ (Fin n)) ∈ S.B + rw [S.coe_invMap hy] + exact hy + left_inv' x hx := by + apply Subtype.ext + have hI := S.coe_toMap hx + rw [S.coe_invMap (by rw [hI, S.tau_sigma]; exact hx), hI, S.tau_sigma] + right_inv' y hy := by + have h1 := S.coe_invMap hy + have hB : (S.invMap y : EuclideanSpace ℝ (Fin n)) ∈ S.B := by rw [h1]; exact hy + apply (𝓡∂ n).injective + rw [S.coe_toMap hB, h1, S.sigma_tau] + open_source := S.isOpen_B.preimage continuous_subtype_val + open_target := S.isOpen_B.preimage (S.contDiff_tau.continuous.comp (𝓡∂ n).continuous) + continuousOn_toFun := ((𝓡∂ n).continuous_symm.comp + (S.contDiff_sigma.continuous.comp continuous_subtype_val)).continuousOn + continuousOn_invFun := by + rw [Topology.IsInducing.subtypeVal.continuousOn_iff] + exact (S.contDiff_tau.continuous.comp (𝓡∂ n).continuous).continuousOn.congr fun y hy => + S.coe_invMap hy + +/-- The source of the chart is `closure Ω ∩ B`. -/ +theorem mem_chart_source {x : closure Ω.carrier} : + x ∈ S.chart.source ↔ (x : EuclideanSpace ℝ (Fin n)) ∈ S.B := Iff.rfl + +/-- The target of the chart. -/ +theorem mem_chart_target {y : EuclideanHalfSpace n} : + y ∈ S.chart.target ↔ S.tau ((𝓡∂ n) y) ∈ S.B := Iff.rfl + +/-- On its source the chart is `σ`, read in `ℝ^n`. -/ +theorem chart_apply_coe {x : closure Ω.carrier} (hx : (x : EuclideanSpace ℝ (Fin n)) ∈ S.B) : + (𝓡∂ n) (S.chart x) = S.sigma x := + S.coe_toMap hx + +/-- On its target the inverse chart is `τ`, read in `ℝ^n`. -/ +theorem chart_symm_coe {y : EuclideanHalfSpace n} (hy : S.tau ((𝓡∂ n) y) ∈ S.B) : + ((S.chart.symm y : closure Ω.carrier) : EuclideanSpace ℝ (Fin n)) = S.tau ((𝓡∂ n) y) := + S.coe_invMap hy + +end Straightener + +/-! ### Boundary and interior straighteners -/ + +/-- The **straightening** of the `j`-th boundary patch: `σ_j(x) = A_j (x - φ_j(x) e_j)`. -/ +noncomputable def straighten (j : Fin Ω.N) (x : EuclideanSpace ℝ (Fin n)) : + EuclideanSpace ℝ (Fin n) := + alignTo (Ω.graph j).e ((Ω.graph j).flatten x) + +/-- The inverse of the straightening. -/ +noncomputable def unstraighten (j : Fin Ω.N) (y : EuclideanSpace ℝ (Fin n)) : + EuclideanSpace ℝ (Fin n) := + (Ω.graph j).unflatten ((alignTo (Ω.graph j).e).symm y) + +/-- **The first coordinate of the straightening** is the height above the graph: +`σ_j(x)_0 = ⟪x, e_j⟫ - φ_j(x)`. -/ +theorem straighten_coord (j : Fin Ω.N) (x : EuclideanSpace ℝ (Fin n)) : + Ω.straighten j x 0 = inner ℝ x (Ω.graph j).e - (Ω.graph j).phi x := by + rw [coord_zero_eq_inner, straighten, ← alignTo_apply_self (Ω.graph j).norm_e, + LinearIsometryEquiv.inner_map_map, LipschitzGraph.inner_flatten] + +/-- The straightener of the `j`-th boundary patch, on the `j`-th boundary ball. -/ +noncomputable def boundaryStraightener (j : Fin Ω.N) : Ω.Straightener where + sigma := Ω.straighten j + tau := Ω.unstraighten j + contDiff_sigma := (alignTo (Ω.graph j).e).toContinuousLinearEquiv.contDiff.comp + ((Ω.graph j).contDiff_flatten (Ω.contDiff_phi j)) + contDiff_tau := ((Ω.graph j).contDiff_unflatten (Ω.contDiff_phi j)).comp + (alignTo (Ω.graph j).e).symm.toContinuousLinearEquiv.contDiff + sigma_tau y := by + simp only [straighten, unstraighten, LipschitzGraph.flatten_unflatten, + LinearIsometryEquiv.apply_symm_apply] + tau_sigma x := by + simp only [straighten, unstraighten, LinearIsometryEquiv.symm_apply_apply, + LipschitzGraph.unflatten_flatten] + measurePreserving_sigma := (alignTo (Ω.graph j).e).measurePreserving.comp + (Ω.graph j).measurePreserving_flatten + B := ball (Ω.center j) (Ω.radius j) + isOpen_B := isOpen_ball + isBounded_B := isBounded_ball + mem_closure_iff x hx := by + rw [mem_closure_iff_of_inter_eq isOpen_ball (Ω.ball_inter j) hx, + LipschitzGraph.closure_domain, straighten_coord, sub_nonneg] + rfl + mem_iff x hx := by + have h : x ∈ ball (Ω.center j) (Ω.radius j) ∩ Ω.carrier ↔ + x ∈ ball (Ω.center j) (Ω.radius j) ∩ (Ω.graph j).domain := by rw [Ω.ball_inter j] + rw [straighten_coord, sub_pos] + exact ⟨fun h1 => (h.1 ⟨hx, h1⟩).2, fun h1 => (h.2 ⟨hx, h1⟩).2⟩ + base := Ω.center j + base_mem := frontier_subset_closure (Ω.center_mem j) + +/-- A radius `ρ > 0` with `B(x₀, ρ) ⊆ Ω` around a point of `Ω`. -/ +noncomputable def interiorRadius {x₀ : EuclideanSpace ℝ (Fin n)} (hx₀ : x₀ ∈ Ω.carrier) : ℝ := + (Metric.isOpen_iff.1 Ω.isOpen x₀ hx₀).choose + +/-- The interior radius is positive. -/ +theorem interiorRadius_pos {x₀ : EuclideanSpace ℝ (Fin n)} (hx₀ : x₀ ∈ Ω.carrier) : + 0 < Ω.interiorRadius hx₀ := + (Metric.isOpen_iff.1 Ω.isOpen x₀ hx₀).choose_spec.1 + +/-- The ball of the interior radius lies in `Ω`. -/ +theorem ball_interiorRadius_subset {x₀ : EuclideanSpace ℝ (Fin n)} (hx₀ : x₀ ∈ Ω.carrier) : + ball x₀ (Ω.interiorRadius hx₀) ⊆ Ω.carrier := + (Metric.isOpen_iff.1 Ω.isOpen x₀ hx₀).choose_spec.2 + +/-- Around an interior point, the translated first coordinate is positive: +`(x - x₀ + 2ρ e₀)_0 > 0` for `‖x - x₀‖ < ρ`. -/ +theorem interior_coord_pos {x₀ x : EuclideanSpace ℝ (Fin n)} {ρ : ℝ} (hx : x ∈ ball x₀ ρ) : + 0 < (x - x₀ + (2 * ρ) • e0 : EuclideanSpace ℝ (Fin n)) 0 := by + have h1 : |(x - x₀) 0| ≤ ‖x - x₀‖ := by + have := PiLp.norm_apply_le (x - x₀) 0 + rwa [Real.norm_eq_abs] at this + have h2 : ‖x - x₀‖ < ρ := by rwa [← dist_eq_norm] + have he : (e0 : EuclideanSpace ℝ (Fin n)) 0 = 1 := by simp [e0] + simp only [PiLp.add_apply, PiLp.smul_apply, smul_eq_mul, he, mul_one] + linarith [neg_abs_le ((x - x₀) 0), norm_nonneg (x - x₀)] + +/-- The straightener at an interior point `x₀`: the translation `x ↦ x - x₀ + 2ρ e₀` on +`B(x₀, ρ) ⊆ Ω`, which lands in the open half-space. -/ +noncomputable def interiorStraightener {x₀ : EuclideanSpace ℝ (Fin n)} (hx₀ : x₀ ∈ Ω.carrier) : + Ω.Straightener where + sigma x := x - x₀ + (2 * Ω.interiorRadius hx₀) • e0 + tau y := y - (2 * Ω.interiorRadius hx₀) • e0 + x₀ + contDiff_sigma := (contDiff_id.sub contDiff_const).add contDiff_const + contDiff_tau := (contDiff_id.sub contDiff_const).add contDiff_const + sigma_tau y := by abel + tau_sigma x := by abel + measurePreserving_sigma := (measurePreserving_add_right volume _).comp + (measurePreserving_sub_right volume _) + B := ball x₀ (Ω.interiorRadius hx₀) + isOpen_B := isOpen_ball + isBounded_B := isBounded_ball + mem_closure_iff x hx := + ⟨fun _ => (interior_coord_pos hx).le, fun _ => subset_closure (Ω.ball_interiorRadius_subset + hx₀ hx)⟩ + mem_iff x hx := ⟨fun _ => interior_coord_pos hx, fun _ => Ω.ball_interiorRadius_subset hx₀ hx⟩ + base := x₀ + base_mem := subset_closure hx₀ + +/-- A boundary ball containing a point of `closure Ω` outside `Ω`. -/ +noncomputable def boundaryIndex {x : EuclideanSpace ℝ (Fin n)} (hx : x ∈ closure Ω.carrier) + (hx' : x ∉ Ω.carrier) : Fin Ω.N := + (mem_iUnion.1 (Ω.frontier_subset ⟨hx, by rwa [Ω.isOpen.interior_eq]⟩)).choose + +/-- The point lies in its boundary ball. -/ +theorem mem_ball_boundaryIndex {x : EuclideanSpace ℝ (Fin n)} (hx : x ∈ closure Ω.carrier) + (hx' : x ∉ Ω.carrier) : + x ∈ ball (Ω.center (Ω.boundaryIndex hx hx')) (Ω.radius (Ω.boundaryIndex hx hx')) := + (mem_iUnion.1 (Ω.frontier_subset ⟨hx, by rwa [Ω.isOpen.interior_eq]⟩)).choose_spec + +open Classical in +/-- The straightener at a point of the closure: interior or boundary. -/ +noncomputable def straightenerAt (x : closure Ω.carrier) : Ω.Straightener := + if h : (x : EuclideanSpace ℝ (Fin n)) ∈ Ω.carrier then Ω.interiorStraightener h + else Ω.boundaryStraightener (Ω.boundaryIndex x.2 h) + +/-- A point lies in the set of its straightener. -/ +theorem mem_straightenerAt (x : closure Ω.carrier) : + (x : EuclideanSpace ℝ (Fin n)) ∈ (Ω.straightenerAt x).B := by + by_cases h : (x : EuclideanSpace ℝ (Fin n)) ∈ Ω.carrier + · rw [straightenerAt, dite_eq_left h] + exact mem_ball_self (Ω.interiorRadius_pos h) + · rw [straightenerAt, dite_eq_right h] + exact Ω.mem_ball_boundaryIndex x.2 h + +/-! ### The closure as a manifold with boundary -/ + +/-- **The closure of a smooth domain is a charted space** over the half-space: its atlas consists +of the charts of all straighteners. -/ +noncomputable instance chartedSpace : ChartedSpace (EuclideanHalfSpace n) (closure Ω.carrier) where + atlas := {e | ∃ S : Ω.Straightener, e = S.chart} + chartAt x := (Ω.straightenerAt x).chart + mem_chart_source x := Ω.mem_straightenerAt x + chart_mem_atlas _ := ⟨_, rfl⟩ + +/-- **The closure of a smooth domain is a smooth manifold with boundary**: the change of charts +from `S` to `S'` is the restriction of the smooth map `σ' ∘ τ`. -/ +instance isManifold : IsManifold (𝓡∂ n) ∞ (closure Ω.carrier) := by + apply isManifold_of_contDiffOn + rintro e e' ⟨S, rfl⟩ ⟨S', rfl⟩ + refine (S'.contDiff_sigma.comp S.contDiff_tau).contDiffOn.congr fun z hz => ?_ + obtain ⟨⟨hz1, hz2⟩, hzI⟩ := hz + have hzz : (𝓡∂ n) ((𝓡∂ n).symm z) = z := (𝓡∂ n).right_inv hzI + have hτ : S.tau z ∈ S.B := by + have h := S.mem_chart_target.1 hz1 + rwa [hzz] at h + have hsymm := S.chart_symm_coe (y := (𝓡∂ n).symm z) (by rw [hzz]; exact hτ) + rw [hzz] at hsymm + have hB' : ((S.chart.symm ((𝓡∂ n).symm z) : closure Ω.carrier) : EuclideanSpace ℝ (Fin n)) ∈ + S'.B := S'.mem_chart_source.1 hz2 + simp only [Function.comp_apply, OpenPartialHomeomorph.coe_trans] + rw [S'.chart_apply_coe hB', hsymm] + +/-- **The inclusion of the closure into `ℝ^n` is smooth**: in the chart of a straightener it is +`τ`. -/ +theorem contMDiff_subtype_val : + ContMDiff (𝓡∂ n) 𝓘(ℝ, EuclideanSpace ℝ (Fin n)) ∞ + (Subtype.val : closure Ω.carrier → EuclideanSpace ℝ (Fin n)) := by + intro x + rw [contMDiffAt_iff] + refine ⟨continuous_subtype_val.continuousAt, ?_⟩ + set S := Ω.straightenerAt x + have hev : (extChartAt 𝓘(ℝ, EuclideanSpace ℝ (Fin n)) (x : EuclideanSpace ℝ (Fin n)) ∘ + Subtype.val ∘ (extChartAt (𝓡∂ n) x).symm) =ᶠ[𝓝[range (𝓡∂ n)] (extChartAt (𝓡∂ n) x x)] + S.tau := by + filter_upwards [extChartAt_target_mem_nhdsWithin (I := 𝓡∂ n) x] with z hz + have hzI : z ∈ range (𝓡∂ n) := extChartAt_target_subset_range x hz + have hzz : (𝓡∂ n) ((𝓡∂ n).symm z) = z := (𝓡∂ n).right_inv hzI + rw [extChartAt_target] at hz + have hzt : S.tau ((𝓡∂ n) ((𝓡∂ n).symm z)) ∈ S.B := S.mem_chart_target.1 hz.1 + have hcomp : (extChartAt 𝓘(ℝ, EuclideanSpace ℝ (Fin n)) (x : EuclideanSpace ℝ (Fin n)) ∘ + Subtype.val ∘ (extChartAt (𝓡∂ n) x).symm) z = + ((S.chart.symm ((𝓡∂ n).symm z) : closure Ω.carrier) : EuclideanSpace ℝ (Fin n)) := by + rw [extChartAt_model_space_eq_id] + rfl + rw [hcomp, S.chart_symm_coe hzt, hzz] + exact (S.contDiff_tau.contDiffAt.contDiffWithinAt).congr_of_eventuallyEq hev + (hev.self_of_nhdsWithin (extChartAt_target_subset_range x (mem_extChartAt_target x))) + +/-- The closure of a smooth domain is compact. -/ +instance compactSpace : CompactSpace (closure Ω.carrier) := + isCompact_iff_compactSpace.1 Ω.isCompact_closure + +/-! ### The Lebesgue measure as a smooth measure -/ + +/-- The **Lebesgue measure on the closure** of `Ω`. -/ +noncomputable def volumeOn : Measure (closure Ω.carrier) := + (volume : Measure (EuclideanSpace ℝ (Fin n))).comap Subtype.val + +/-- The image of the target of the chart of a straightener is `σ(closure Ω ∩ B)`. -/ +theorem Straightener.extend_target (S : Ω.Straightener) : + (S.chart.extend (𝓡∂ n)).target = S.sigma '' (closure Ω.carrier ∩ S.B) := by + rw [OpenPartialHomeomorph.extend_target'] + ext z + constructor + · rintro ⟨y, hy, rfl⟩ + have hτ : S.tau ((𝓡∂ n) y) ∈ S.B := hy + exact ⟨S.tau ((𝓡∂ n) y), ⟨S.tau_mem_closure y.2 hτ, hτ⟩, S.sigma_tau _⟩ + · rintro ⟨x, ⟨hxcl, hxB⟩, rfl⟩ + refine ⟨S.chart ⟨x, hxcl⟩, S.chart.map_source hxB, ?_⟩ + exact S.chart_apply_coe (x := ⟨x, hxcl⟩) hxB + +/-- **The Lebesgue measure is a smooth measure** on the closure, with density `1` in every chart: +the straighteners preserve the Lebesgue measure. -/ +instance isSmoothMeasure_volumeOn : Manifold.IsSmoothMeasure (𝓡∂ n) Ω.volumeOn where + exists_density e he := by + obtain ⟨S, rfl⟩ := he + refine ⟨1, continuousOn_const, fun _ _ => ⟨zero_lt_one, ENNReal.one_lt_top⟩, ?_⟩ + have hcl : MeasurableSet (closure Ω.carrier) := isClosed_closure.measurableSet + have hemb := MeasurableEmbedding.subtype_coe hcl + have hσemb : MeasurableEmbedding S.sigma := + (Homeomorph.mk ⟨S.sigma, S.tau, S.tau_sigma, S.sigma_tau⟩ S.contDiff_sigma.continuous + S.contDiff_tau.continuous).measurableEmbedding + have hsrc : MeasurableSet S.chart.source := S.chart.open_source.measurableSet + -- the extended chart is `σ` on the source + have hcongr : Measure.map (S.chart.extend (𝓡∂ n)) (Ω.volumeOn.restrict S.chart.source) = + Measure.map (S.sigma ∘ Subtype.val) (Ω.volumeOn.restrict S.chart.source) := by + refine Measure.map_congr ((ae_restrict_iff' hsrc).2 (Eventually.of_forall fun x hx => ?_)) + rw [OpenPartialHomeomorph.extend_coe, Function.comp_apply, S.chart_apply_coe hx] + rfl + rw [withDensity_one, hcongr, ← Measure.map_map S.contDiff_sigma.continuous.measurable + measurable_subtype_coe, S.extend_target] + have hval : Measure.map Subtype.val (Ω.volumeOn.restrict S.chart.source) = + (volume : Measure (EuclideanSpace ℝ (Fin n))).restrict (S.B ∩ closure Ω.carrier) := by + rw [show S.chart.source = Subtype.val ⁻¹' S.B from rfl, ← hemb.restrict_map, volumeOn, + hemb.map_comap, Subtype.range_coe, Measure.restrict_restrict S.isOpen_B.measurableSet] + rw [hval, inter_comm] + exact (S.measurePreserving_sigma.restrict_image_emb hσemb _).map_eq + +end SmoothDomain + +end Rd diff --git a/LeanPool/FunctionSpaces/Domains/Manifolds/SmoothDomainBesov.lean b/LeanPool/FunctionSpaces/Domains/Manifolds/SmoothDomainBesov.lean new file mode 100644 index 0000000000..13d20323e2 --- /dev/null +++ b/LeanPool/FunctionSpaces/Domains/Manifolds/SmoothDomainBesov.lean @@ -0,0 +1,510 @@ +/- +Copyright (c) 2026 Mario Ullrich. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Mario Ullrich +-/ +module + +public import LeanPool.FunctionSpaces.Domains.Manifolds.SmoothDomain + +/- +Modified for Lean Pool: module names and imports adapted. +-/ + +/-! +# Besov spaces of smooth domains by charts + +For a smooth bounded domain `Ω ⊆ ℝ^n` the Besov space of the compact manifold `closure Ω` with +the Lebesgue measure, defined by charts, is the space of functions on `Ω` with finite intrinsic +Besov quasi-norm (`Rd.SmoothDomain.memBesov_iff_modNormOn_lt_top`): + +`f ∈ B^s_{p,q}(closure Ω) ↔ ‖f‖_{L_p(Ω)} + ‖(2^(ks) ω_r(f, 2^(-k), Ω)_p)_k‖_{ℓ_q} < ∞` + +for `0 < s < r`, with `f` extended by `0` to `ℝ^n` (`Rd.SmoothDomain.extLp`). + +The proof uses a **global atlas** (`Rd.SmoothDomain.GlobalAtlas`): finitely many straighteners +and a partition of unity and cut-offs that are smooth functions on `ℝ^n` +(`Rd.SmoothDomain.GlobalAtlas.nonempty`). Its pieces are the global functions +`(ψ_i f) ∘ τ_i` on the half-space (`Rd.SmoothDomain.GlobalAtlas.indicator_piece`). If `f` agrees +on `Ω` with some `F ∈ B^s_{p,q}(ℝ^n)` (Rychkov's extension, for finite intrinsic quasi-norm), the +pieces are the changes of variables `(ψ_i F) ∘ τ_i` of `F` on the half-space, which are bounded. +Conversely, the pieces extend from the half-space to `G_i ∈ B^s_{p,q}(ℝ^n)`, and +`F = ∑_i θ_i (G_i ∘ σ_i)` agrees with `f` on `Ω`. +-/ + +@[expose] public section + +open MeasureTheory Set Filter Topology Metric +open scoped ENNReal Manifold ContDiff + +open ENNReal (lqNorm dyadicWeight) + +namespace Rd + +namespace SmoothDomain + +variable {n : ℕ} [NeZero n] (Ω : SmoothDomain n) + +/-! ### The global atlas -/ + +/-- A **global atlas** of the closure of a smooth domain: finitely many straighteners whose sets +cover the closure, a smooth partition of unity on `ℝ^n` subordinate to them on the closure, and +smooth cut-offs `θ_i = 1` on `tsupport ψ_i`, all with supports inside the sets. -/ +structure GlobalAtlas where + /-- The number of charts. -/ + N : ℕ + /-- The straighteners. -/ + S : Fin N → Ω.Straightener + /-- The partition of unity. -/ + psi : Fin N → EuclideanSpace ℝ (Fin n) → ℝ + contDiff_psi : ∀ i, ContDiff ℝ ∞ (psi i) + nonneg_psi : ∀ i x, 0 ≤ psi i x + tsupport_psi_subset : ∀ i, tsupport (psi i) ⊆ (S i).B + sum_psi : ∀ x ∈ closure Ω.carrier, ∑ i, psi i x = 1 + /-- The cut-offs. -/ + theta : Fin N → EuclideanSpace ℝ (Fin n) → ℝ + contDiff_theta : ∀ i, ContDiff ℝ ∞ (theta i) + theta_eq_one : ∀ i, ∀ x ∈ tsupport (psi i), theta i x = 1 + tsupport_theta_subset : ∀ i, tsupport (theta i) ⊆ (S i).B + +/-- **Every smooth domain has a global atlas**: finitely many sets of straighteners cover the +compact closure, Mathlib's smooth partitions of unity on `ℝ^n` are subordinate to them, and smooth +cut-offs exist for every compact set inside an open set +(`Manifold.exists_contMDiff_eq_one_tsupport_subset`). -/ +theorem GlobalAtlas.nonempty : Nonempty Ω.GlobalAtlas := by + obtain ⟨t, ht⟩ := Ω.isCompact_closure.elim_finite_subcover + (fun x : closure Ω.carrier => (Ω.straightenerAt x).B) (fun x => (Ω.straightenerAt x).isOpen_B) + (fun x hx => mem_iUnion.2 ⟨⟨x, hx⟩, Ω.mem_straightenerAt ⟨x, hx⟩⟩) + set pt : Fin t.card → closure Ω.carrier := fun i => (t.equivFin.symm i : closure Ω.carrier) + have hcover : closure Ω.carrier ⊆ ⋃ i, (Ω.straightenerAt (pt i)).B := fun x hx => by + obtain ⟨y, hy, hxy⟩ := mem_iUnion₂.1 (ht hx) + refine mem_iUnion.2 ⟨t.equivFin ⟨y, hy⟩, ?_⟩ + simpa [pt] using hxy + obtain ⟨f, hf⟩ := SmoothPartitionOfUnity.exists_isSubordinate 𝓘(ℝ, EuclideanSpace ℝ (Fin n)) + isClosed_closure (fun i => (Ω.straightenerAt (pt i)).B) + (fun i => (Ω.straightenerAt (pt i)).isOpen_B) hcover + have hθ : ∀ i, ∃ θ : EuclideanSpace ℝ (Fin n) → ℝ, ContDiff ℝ ∞ θ ∧ + (∀ x ∈ tsupport (f i), θ x = 1) ∧ tsupport θ ⊆ (Ω.straightenerAt (pt i)).B := fun i => by + obtain ⟨θ, hθs, hθ1, hθsub⟩ := Manifold.exists_contMDiff_eq_one_tsupport_subset + 𝓘(ℝ, EuclideanSpace ℝ (Fin n)) (Metric.isCompact_of_isClosed_isBounded + (isClosed_tsupport _) ((Ω.straightenerAt (pt i)).isBounded_B.subset (hf i))) + (Ω.straightenerAt (pt i)).isOpen_B (hf i) + exact ⟨θ, contMDiff_iff_contDiff.1 hθs, hθ1, hθsub⟩ + choose θ hθs hθ1 hθsub using hθ + exact ⟨{ N := t.card + S := fun i => Ω.straightenerAt (pt i) + psi := fun i => f i + contDiff_psi := fun i => contMDiff_iff_contDiff.1 (f i).contMDiff + nonneg_psi := fun i x => f.nonneg i x + tsupport_psi_subset := hf + sum_psi := fun x hx => by + have h := f.sum_eq_one hx + rwa [finsum_eq_sum_of_fintype] at h + theta := θ + contDiff_theta := hθs + theta_eq_one := hθ1 + tsupport_theta_subset := hθsub }⟩ + +variable {Ω} + +/-- **The Besov atlas of a global atlas**: the charts of the straighteners and the restrictions of +the partition of unity and of the cut-offs to the closure. -/ +noncomputable def GlobalAtlas.toBesovAtlas (G : Ω.GlobalAtlas) : + Manifold.BesovAtlas (𝓡∂ n) (closure Ω.carrier) where + n := G.N + chart i := (G.S i).chart + chart_mem i := ⟨G.S i, rfl⟩ + psi i x := G.psi i x + contMDiff_psi i := + (contMDiff_iff_contDiff.2 (G.contDiff_psi i)).comp Ω.contMDiff_subtype_val + nonneg_psi i x := G.nonneg_psi i x + tsupport_psi_subset i := + (tsupport_comp_subset_preimage (G.psi i) continuous_subtype_val).trans + (preimage_mono (G.tsupport_psi_subset i)) + sum_psi x := G.sum_psi x x.2 + theta i x := G.theta i x + contMDiff_theta i := + (contMDiff_iff_contDiff.2 (G.contDiff_theta i)).comp Ω.contMDiff_subtype_val + theta_eq_one i x hx := + G.theta_eq_one i x (tsupport_comp_subset_preimage (G.psi i) continuous_subtype_val hx) + tsupport_theta_subset i := + (tsupport_comp_subset_preimage (G.theta i) continuous_subtype_val).trans + (preimage_mono (G.tsupport_theta_subset i)) + +/-! ### Extension by zero -/ + +variable (Ω) + +/-- The **extension by `0`** of a function on the closure to `ℝ^n`. -/ +noncomputable def extend (g : closure Ω.carrier → ℂ) : EuclideanSpace ℝ (Fin n) → ℂ := + Function.extend Subtype.val g 0 + +variable {Ω} + +/-- The extension agrees with the function on the closure. -/ +theorem extend_coe (g : closure Ω.carrier → ℂ) (x : closure Ω.carrier) : + Ω.extend g x = g x := + Subtype.val_injective.extend_apply g 0 x + +/-- The extension vanishes outside the closure. -/ +theorem extend_eq_zero (g : closure Ω.carrier → ℂ) {x : EuclideanSpace ℝ (Fin n)} + (hx : x ∉ closure Ω.carrier) : Ω.extend g x = 0 := + Function.extend_val_apply' hx + +/-- The extension of a strongly measurable function is strongly measurable. -/ +theorem stronglyMeasurable_extend {g : closure Ω.carrier → ℂ} (hg : StronglyMeasurable g) : + StronglyMeasurable (Ω.extend g) := + (MeasurableEmbedding.subtype_coe isClosed_closure.measurableSet).stronglyMeasurable_extend hg + stronglyMeasurable_const + +/-- **The extension preserves `L_p` norms**: `‖ext g‖_{L_p(ℝ^n)} = ‖g‖_{L_p(closure Ω)}`. -/ +theorem eLpNorm_extend {g : closure Ω.carrier → ℂ} (hg : StronglyMeasurable g) {p : ℝ≥0∞} + (hp0 : p ≠ 0) (hp : p ≠ ⊤) : eLpNorm (Ω.extend g) p volume = eLpNorm g p Ω.volumeOn := by + have he : 0 < p.toReal := ENNReal.toReal_pos hp0 hp + have hcl : MeasurableSet (closure Ω.carrier) := isClosed_closure.measurableSet + refine ENNReal.rpow_left_injective he.ne' ?_ + simp only + rw [eLpNorm_rpow_eq (Ω.stronglyMeasurable_extend hg).aestronglyMeasurable hp0 hp, + eLpNorm_rpow_eq hg.aestronglyMeasurable hp0 hp] + have hsupp : Function.support (fun x => ‖Ω.extend g x‖ₑ ^ p.toReal) ⊆ closure Ω.carrier := + fun x hx => by + by_contra h + exact hx (by simp only [extend_eq_zero g h, eNorm_zero, ENNReal.zero_rpow_of_pos he]) + rw [← setLIntegral_eq_of_support_subset hsupp, ← lintegral_subtype_comap hcl] + simp only [extend_coe] + rfl + +/-! ### The pieces of the global atlas -/ + +omit [NeZero n] in +/-- `{y : y_0 = 0}` is a null set: it is the hyperplane `e₀^⊥` +(`Rd.volume_orthogonal_singleton_eq_zero`). -/ +theorem volume_coord_zero_eq_zero [NeZero n] : + volume {y : EuclideanSpace ℝ (Fin n) | y 0 = 0} = 0 := by + have h : {y : EuclideanSpace ℝ (Fin n) | y 0 = 0} = + ((ℝ ∙ (e0 : EuclideanSpace ℝ (Fin n)))ᗮ : Set (EuclideanSpace ℝ (Fin n))) := by + ext y + rw [SetLike.mem_coe, Submodule.mem_orthogonal_singleton_iff_inner_right, real_inner_comm, + ← coord_zero_eq_inner] + rfl + rw [h] + exact volume_orthogonal_singleton_eq_zero (norm_ne_zero_iff.1 (by simp [norm_e0])) + +namespace Straightener + +variable (S : Ω.Straightener) + +/-- The image `σ(closure Ω ∩ B)` is `{y : 0 ≤ y_0, τ(y) ∈ B}`. -/ +theorem mem_image_iff {y : EuclideanSpace ℝ (Fin n)} : + y ∈ S.sigma '' (closure Ω.carrier ∩ S.B) ↔ 0 ≤ y 0 ∧ S.tau y ∈ S.B := by + constructor + · rintro ⟨x, ⟨hxcl, hxB⟩, rfl⟩ + exact ⟨(S.mem_closure_iff x hxB).1 hxcl, by rwa [S.tau_sigma]⟩ + · rintro ⟨hy, hyB⟩ + exact ⟨S.tau y, ⟨S.tau_mem_closure hy hyB, hyB⟩, S.sigma_tau y⟩ + +/-- The homeomorphism `σ` of `ℝ^n`. -/ +noncomputable def homeomorph : EuclideanSpace ℝ (Fin n) ≃ₜ EuclideanSpace ℝ (Fin n) := + Homeomorph.mk ⟨S.sigma, S.tau, S.tau_sigma, S.sigma_tau⟩ S.contDiff_sigma.continuous + S.contDiff_tau.continuous + +/-- `τ` preserves the Lebesgue measure. -/ +theorem measurePreserving_tau : MeasurePreserving S.tau volume volume := + MeasurePreserving.symm S.homeomorph.toMeasurableEquiv S.measurePreserving_sigma + +end Straightener + +namespace GlobalAtlas + +variable (G : Ω.GlobalAtlas) + +/-- The partition of unity has compact supports. -/ +theorem hasCompactSupport_psi (i : Fin G.N) : HasCompactSupport (G.psi i) := + Metric.isCompact_of_isClosed_isBounded (isClosed_tsupport _) + ((G.S i).isBounded_B.subset (G.tsupport_psi_subset i)) + +/-- The cut-offs have compact supports. -/ +theorem hasCompactSupport_theta (i : Fin G.N) : HasCompactSupport (G.theta i) := + Metric.isCompact_of_isClosed_isBounded (isClosed_tsupport _) + ((G.S i).isBounded_B.subset (G.tsupport_theta_subset i)) + +/-- `ψ_i = 0` outside `B_i`. -/ +theorem psi_eq_zero (i : Fin G.N) {x : EuclideanSpace ℝ (Fin n)} (hx : x ∉ (G.S i).B) : + G.psi i x = 0 := + image_eq_zero_of_notMem_tsupport fun h => hx (G.tsupport_psi_subset i h) + +/-- `θ_i = 0` outside `B_i`. -/ +theorem theta_eq_zero (i : Fin G.N) {x : EuclideanSpace ℝ (Fin n)} (hx : x ∉ (G.S i).B) : + G.theta i x = 0 := + image_eq_zero_of_notMem_tsupport fun h => hx (G.tsupport_theta_subset i h) + +/-- `θ_i ψ_i = ψ_i`. -/ +theorem theta_mul_psi (i : Fin G.N) (x : EuclideanSpace ℝ (Fin n)) : + G.theta i x * G.psi i x = G.psi i x := by + by_cases hx : x ∈ tsupport (G.psi i) + · rw [G.theta_eq_one i x hx, one_mul] + · rw [image_eq_zero_of_notMem_tsupport hx, mul_zero] + +/-- **The pieces of the global atlas**: `piece_i g = 1_{σ_i(closure Ω ∩ B_i)} (ψ_i ext g) ∘ τ_i`. -/ +theorem piece_apply (i : Fin G.N) (g : closure Ω.carrier → ℂ) (y : EuclideanSpace ℝ (Fin n)) : + G.toBesovAtlas.piece i g y = ((G.S i).sigma '' (closure Ω.carrier ∩ (G.S i).B)).indicator + (fun y => (G.psi i ((G.S i).tau y) : ℂ) * Ω.extend g ((G.S i).tau y)) y := by + have ht : (G.toBesovAtlas.ext i).target = (G.S i).sigma '' (closure Ω.carrier ∩ (G.S i).B) := + (G.S i).extend_target + unfold Manifold.BesovAtlas.piece + rw [ht] + by_cases hy : y ∈ (G.S i).sigma '' (closure Ω.carrier ∩ (G.S i).B) + · rw [indicator_of_mem hy, indicator_of_mem hy] + obtain ⟨hy0, hyB⟩ := (G.S i).mem_image_iff.1 hy + have hyI : y ∈ range (𝓡∂ n) := by + rw [range_modelWithCornersEuclideanHalfSpace] + exact hy0 + have hyy : (𝓡∂ n) ((𝓡∂ n).symm y) = y := (𝓡∂ n).right_inv hyI + have hcoe : (((G.toBesovAtlas.ext i).symm y : closure Ω.carrier) : + EuclideanSpace ℝ (Fin n)) = (G.S i).tau y := by + rw [OpenPartialHomeomorph.extend_coe_symm, Function.comp_apply] + have h := (G.S i).chart_symm_coe (y := (𝓡∂ n).symm y) (by rw [hyy]; exact hyB) + rw [hyy] at h + exact h + rw [← hcoe, extend_coe] + rfl + · rw [indicator_of_notMem hy, indicator_of_notMem hy] + +/-- **The pieces on the half-space**: `1_{y_0 ≥ 0} piece_i g = 1_{y_0 ≥ 0} (ψ_i ext g) ∘ τ_i`. -/ +theorem indicator_piece (i : Fin G.N) (g : closure Ω.carrier → ℂ) : + (range (𝓡∂ n)).indicator (G.toBesovAtlas.piece i g) = (range (𝓡∂ n)).indicator + (fun y => (G.psi i ((G.S i).tau y) : ℂ) * Ω.extend g ((G.S i).tau y)) := by + funext y + by_cases hyI : y ∈ range (𝓡∂ n) + · rw [indicator_of_mem hyI, indicator_of_mem hyI, G.piece_apply] + have hy0 : 0 ≤ y 0 := by rwa [range_modelWithCornersEuclideanHalfSpace] at hyI + by_cases hyB : (G.S i).tau y ∈ (G.S i).B + · rw [indicator_of_mem ((G.S i).mem_image_iff.2 ⟨hy0, hyB⟩)] + · rw [indicator_of_notMem fun h => hyB ((G.S i).mem_image_iff.1 h).2, + G.psi_eq_zero i hyB, Complex.ofReal_zero, zero_mul] + · rw [indicator_of_notMem hyI, indicator_of_notMem hyI] + +end GlobalAtlas + +/-! ### The `L_p` bridge -/ + +variable {p : ℝ≥0∞} [Fact (1 ≤ p)] (hp : p ≠ ⊤) + +include hp in +/-- The extension of `f ∈ L_p(closure Ω)` is in `L_p(ℝ^n)`. -/ +theorem memLp_extend (f : Lp ℂ p Ω.volumeOn) : MemLp (Ω.extend f) p volume := by + have hp0 : p ≠ 0 := (zero_lt_one.trans_le (Fact.out : 1 ≤ p)).ne' + rw [memLp_iff, eLpNorm_extend (Lp.stronglyMeasurable f) hp0 hp] + exact Lp.eLpNorm_lt_top f + +variable (Ω) in +/-- The **extension by `0`** of `f ∈ L_p(closure Ω)` as an element of `L_p(ℝ^n)`. -/ +noncomputable def extLp (f : Lp ℂ p Ω.volumeOn) : + Lp ℂ p (volume : Measure (EuclideanSpace ℝ (Fin n))) := + (memLp_extend hp f).toLp _ + +/-- The extension in `L_p` is the extension by `0`, almost everywhere. -/ +theorem extLp_ae (f : Lp ℂ p Ω.volumeOn) : Ω.extLp hp f =ᵐ[volume] Ω.extend f := + MemLp.coeFn_toLp _ + +/-! ### The changes of variables between the domain and the charts -/ + +namespace GlobalAtlas + +variable (G : Ω.GlobalAtlas) + +/-- The change of variables `F ↦ (ψ_i F) ∘ τ_i` from `ℝ^n` to the `i`-th chart. -/ +noncomputable def toChart (i : Fin G.N) : + CutoffDiffeo (Set.univ : Set (EuclideanSpace ℝ (Fin n))) := + CutoffDiffeo.global (G.S i).tau (G.S i).sigma (G.S i).contDiff_tau (G.S i).contDiff_sigma + (G.S i).sigma_tau (G.S i).tau_sigma (fun x => (G.psi i x : ℂ)) + (Complex.ofRealCLM.contDiff.comp (G.contDiff_psi i)) + ((G.hasCompactSupport_psi i).comp_left Complex.ofReal_zero) + +/-- `T_i F = (ψ_i F) ∘ τ_i`. -/ +theorem toChart_apply (i : Fin G.N) (F : EuclideanSpace ℝ (Fin n) → ℂ) + (y : EuclideanSpace ℝ (Fin n)) : + (G.toChart i).apply F y = (G.psi i ((G.S i).tau y) : ℂ) * F ((G.S i).tau y) := + CutoffDiffeo.global_apply _ _ _ _ _ _ _ _ _ F y + +/-- The change of variables `G ↦ θ_i (G ∘ σ_i)` from the `i`-th chart to `ℝ^n`. -/ +noncomputable def fromChart (i : Fin G.N) : + CutoffDiffeo (Set.univ : Set (EuclideanSpace ℝ (Fin n))) := + CutoffDiffeo.global (G.S i).sigma (G.S i).tau (G.S i).contDiff_sigma (G.S i).contDiff_tau + (G.S i).tau_sigma (G.S i).sigma_tau (fun y => (G.theta i ((G.S i).tau y) : ℂ)) + (Complex.ofRealCLM.contDiff.comp ((G.contDiff_theta i).comp (G.S i).contDiff_tau)) + (((G.hasCompactSupport_theta i).comp_left Complex.ofReal_zero).comp_homeomorph + (G.S i).homeomorph.symm) + +/-- `T'_i G = θ_i (G ∘ σ_i)`. -/ +theorem fromChart_apply (i : Fin G.N) (F : EuclideanSpace ℝ (Fin n) → ℂ) + (x : EuclideanSpace ℝ (Fin n)) : + (G.fromChart i).apply F x = (G.theta i x : ℂ) * F ((G.S i).sigma x) := by + rw [CutoffDiffeo.apply, Set.indicator_of_mem] + · change ((G.theta i ((G.S i).tau ((G.S i).sigma x)) : ℝ) : ℂ) * F ((G.S i).sigma x) = _ + rw [(G.S i).tau_sigma] + · exact ⟨Set.mem_univ x, Set.mem_univ x⟩ + +end GlobalAtlas + +/-! ### The Besov space of the closure -/ + +variable [Rd.BesovDomain (range (𝓡∂ n))] + +omit [NeZero n] [Rd.BesovDomain (range (𝓡∂ n))] in +/-- The whole space has nonempty interior. -/ +theorem interior_univ_nonempty : + (interior (Set.univ : Set (EuclideanSpace ℝ (Fin n)))).Nonempty := by + rw [interior_univ] + exact univ_nonempty + +/-- **From the domain to the charts**: if `f` has a finite intrinsic Besov quasi-norm on `Ω`, its +pieces have finite intrinsic Besov quasi-norms on the half-space: `f` agrees on `Ω` with some +`F ∈ B^s_{p,q}(ℝ^n)`, and on the half-space the piece `(ψ_i f) ∘ τ_i` agrees with `(ψ_i F) ∘ τ_i`, +since `τ_i` maps the open half-space into `Ω` near `tsupport ψ_i` and preserves null sets. -/ +theorem GlobalAtlas.modNormOn_pieceLp_lt_top (G : Ω.GlobalAtlas) {r : ℕ} {s : ℝ} (hs : 0 < s) + (hsr : s < r) {q : ℝ≥0∞} (hq : 1 ≤ q) (f : Lp ℂ p Ω.volumeOn) + (hf : modNormOn Ω.measurableSet r s q (Ω.extLp hp f) < ⊤) (i : Fin G.N) : + modNormOn (BesovDomain.measurableSet (range (𝓡∂ n))) r s q + (G.toBesovAtlas.pieceLp Ω.volumeOn hp i f) < ⊤ := by + have hr : 1 ≤ r := Nat.one_le_iff_ne_zero.2 (Nat.cast_pos.1 (hs.trans hsr)).ne' + set hΩh := BesovDomain.measurableSet (range (𝓡∂ n)) + obtain ⟨F, hFf, hF⟩ := + (Ω.exists_besov_extension_iff_modulusOn hp hs hsr hq (Ω.extLp hp f)).2 hf + set T := G.toChart i + obtain ⟨C, hC, hT⟩ := T.modNormOn_applyLp_le convex_univ interior_univ_nonempty + MeasurableSet.univ hp hr hs hsr hq + -- `f = F` on `Ω` + have hΩf : ∀ᵐ x ∂volume, x ∈ Ω.carrier → Ω.extend f x = F x := by + filter_upwards [(ae_restrict_iff' Ω.measurableSet).1 + ((indicatorLp_eq_iff_ae_eq_restrict Ω.measurableSet).1 hFf), Ω.extLp_ae hp f] + with x h1 h3 hx + rw [h1 hx, h3] + -- the piece agrees with `(ψ_i F) ∘ τ_i` on the half-space + have hgood : ∀ᵐ y ∂volume, y ∈ range (𝓡∂ n) → + (G.psi i ((G.S i).tau y) : ℂ) * Ω.extend f ((G.S i).tau y) = + (G.psi i ((G.S i).tau y) : ℂ) * F ((G.S i).tau y) := by + have h0 : ∀ᵐ y ∂(volume : Measure (EuclideanSpace ℝ (Fin n))), + y ∉ {y : EuclideanSpace ℝ (Fin n) | y 0 = 0} := + measure_eq_zero_iff_ae_notMem.1 volume_coord_zero_eq_zero + filter_upwards [(G.S i).measurePreserving_tau.quasiMeasurePreserving.ae hΩf, h0] + with y h1 h2 hy + by_cases hB : (G.S i).tau y ∈ (G.S i).B + · have hy0 : 0 < y 0 := lt_of_le_of_ne + (by rwa [range_modelWithCornersEuclideanHalfSpace] at hy) (fun h => h2 h.symm) + have hΩ : (G.S i).tau y ∈ Ω.carrier := + ((G.S i).mem_iff _ hB).2 (by rwa [(G.S i).sigma_tau]) + rw [h1 hΩ] + · rw [G.psi_eq_zero i hB, Complex.ofReal_zero, zero_mul, zero_mul] + have hind : indicatorLp hΩh (G.toBesovAtlas.pieceLp Ω.volumeOn hp i f) = + indicatorLp hΩh (T.applyLp convex_univ interior_univ_nonempty MeasurableSet.univ hp F) := by + refine Lp.ext ?_ + filter_upwards [indicatorLp_apply_ae hΩh (G.toBesovAtlas.pieceLp Ω.volumeOn hp i f), + indicatorLp_apply_ae hΩh (T.applyLp convex_univ interior_univ_nonempty MeasurableSet.univ + hp F), G.toBesovAtlas.pieceLp_ae Ω.volumeOn hp i f, + T.applyLp_ae convex_univ interior_univ_nonempty MeasurableSet.univ hp F, hgood] + with y h1 h2 h3 h4 h5 + rw [h1, h2] + by_cases hy : y ∈ range (𝓡∂ n) + · have hp' := congrFun (G.indicator_piece i f) y + rw [indicator_of_mem hy, indicator_of_mem hy] at hp' ⊢ + rw [h3, h4, G.toChart_apply, hp', h5 hy] + · rw [indicator_of_notMem hy, indicator_of_notMem hy] + rw [modNormOn_congr hΩh hind] + calc modNormOn hΩh r s q (T.applyLp convex_univ interior_univ_nonempty MeasurableSet.univ hp F) + ≤ ‖T.applyLp convex_univ interior_univ_nonempty MeasurableSet.univ hp F‖ₑ + lqNorm q + (fun k => dyadicWeight s k * lpModulus p r + (T.applyLp convex_univ interior_univ_nonempty MeasurableSet.univ hp F) k) := + modNormOn_le_modNorm_of_indicatorLp hΩh r s q rfl + _ = modNormOn MeasurableSet.univ r s q + (T.applyLp convex_univ interior_univ_nonempty MeasurableSet.univ hp F) := + (modNormOn_univ r s q _).symm + _ ≤ C * (‖F‖ₑ + lqNorm q (fun k => dyadicWeight s k * lpModulus p r F k)) := hT F + _ < ⊤ := ENNReal.mul_lt_top hC.lt_top hF + +/-- **From the charts to the domain**: if the pieces of `f` have finite intrinsic Besov +quasi-norms on the half-space, they extend to `G_i ∈ B^s_{p,q}(ℝ^n)`, and +`F = ∑_i θ_i (G_i ∘ σ_i) ∈ B^s_{p,q}(ℝ^n)` agrees with `f` on `Ω`, since +`θ_i ψ_i = ψ_i` and `∑_i ψ_i = 1` on the closure. -/ +theorem GlobalAtlas.modNormOn_extLp_lt_top (G : Ω.GlobalAtlas) {r : ℕ} {s : ℝ} (hs : 0 < s) + (hsr : s < r) {q : ℝ≥0∞} (hq : 1 ≤ q) (f : Lp ℂ p Ω.volumeOn) + (hf : ∀ i, modNormOn (BesovDomain.measurableSet (range (𝓡∂ n))) r s q + (G.toBesovAtlas.pieceLp Ω.volumeOn hp i f) < ⊤) : + modNormOn Ω.measurableSet r s q (Ω.extLp hp f) < ⊤ := by + have hr : 1 ≤ r := Nat.one_le_iff_ne_zero.2 (Nat.cast_pos.1 (hs.trans hsr)).ne' + set hΩh := BesovDomain.measurableSet (range (𝓡∂ n)) + obtain ⟨Cext, hCext, hext⟩ := + BesovDomain.exists_extension (Ω := range (𝓡∂ n)) p hp r s hs hsr q hq + choose Gi hGif hGile using fun i => hext _ (hf i) + set T := fun i => G.fromChart i + choose C hC hT using fun i => (T i).modNormOn_applyLp_le convex_univ interior_univ_nonempty + MeasurableSet.univ hp hr hs hsr hq + set F := ∑ i, (T i).applyLp convex_univ interior_univ_nonempty MeasurableSet.univ hp (Gi i) + -- `F` has a finite quasi-norm on `ℝ^n` + have hF : modNormOn MeasurableSet.univ r s q F < ⊤ := by + refine (modNormOn_finsetSum_le MeasurableSet.univ r s hq _ _).trans_lt + (ENNReal.sum_lt_top.2 fun i _ => ?_) + have hGi : ‖Gi i‖ₑ + lqNorm q (fun k => dyadicWeight s k * lpModulus p r (Gi i) k) < ⊤ := + (hGile i).trans_lt (ENNReal.mul_lt_top hCext.lt_top (hf i)) + exact (hT i _).trans_lt (ENNReal.mul_lt_top (hC i).lt_top hGi) + -- `θ_i (G_i ∘ σ_i) = ψ_i f` on `Ω` + have hpiece : ∀ i, ∀ᵐ x ∂volume, x ∈ Ω.carrier → + (G.theta i x : ℂ) * Gi i ((G.S i).sigma x) = (G.psi i x : ℂ) * Ω.extend f x := fun i => by + have h1 : ∀ᵐ y ∂volume, y ∈ range (𝓡∂ n) → Gi i y = G.toBesovAtlas.piece i f y := by + filter_upwards [(ae_restrict_iff' hΩh).1 + ((indicatorLp_eq_iff_ae_eq_restrict hΩh).1 (hGif i)), + G.toBesovAtlas.pieceLp_ae Ω.volumeOn hp i f] with y a1 a3 hy + rw [a1 hy, a3] + filter_upwards [(G.S i).measurePreserving_sigma.quasiMeasurePreserving.ae h1] with x hx hxΩ + by_cases hB : x ∈ (G.S i).B + · have hσ0 : 0 < (G.S i).sigma x 0 := ((G.S i).mem_iff x hB).1 hxΩ + have hσI : (G.S i).sigma x ∈ range (𝓡∂ n) := by + rw [range_modelWithCornersEuclideanHalfSpace] + exact hσ0.le + rw [hx hσI, G.piece_apply, indicator_of_mem ((G.S i).mem_image_iff.2 + ⟨hσ0.le, by rwa [(G.S i).tau_sigma]⟩), (G.S i).tau_sigma] + have h := congrArg (fun t : ℝ => (t : ℂ)) (G.theta_mul_psi i x) + push_cast at h + linear_combination Ω.extend f x * h + · rw [G.theta_eq_zero i hB, G.psi_eq_zero i hB, Complex.ofReal_zero, zero_mul, zero_mul] + -- `F = f` on `Ω` + have hFΩ : indicatorLp Ω.measurableSet F = indicatorLp Ω.measurableSet (Ω.extLp hp f) := by + refine Lp.ext ?_ + filter_upwards [indicatorLp_apply_ae Ω.measurableSet F, + indicatorLp_apply_ae Ω.measurableSet (Ω.extLp hp f), Ω.extLp_ae hp f, + Lp.coeFn_fun_finsetSum Finset.univ (fun i => (T i).applyLp convex_univ + interior_univ_nonempty MeasurableSet.univ hp (Gi i)), + ae_all_iff.2 fun i => (T i).applyLp_ae convex_univ interior_univ_nonempty + MeasurableSet.univ hp (Gi i), ae_all_iff.2 hpiece] with x h1 h2 h3 h4 h5 h6 + rw [h1, h2] + by_cases hx : x ∈ Ω.carrier + · rw [indicator_of_mem hx, indicator_of_mem hx, h3, h4] + simp only [h5, T, G.fromChart_apply] + rw [Finset.sum_congr rfl fun i _ => h6 i hx, ← Finset.sum_mul, ← Complex.ofReal_sum, + G.sum_psi x (subset_closure hx), Complex.ofReal_one, one_mul] + · rw [indicator_of_notMem hx, indicator_of_notMem hx] + rw [← modNormOn_congr Ω.measurableSet hFΩ] + calc modNormOn Ω.measurableSet r s q F + ≤ ‖F‖ₑ + lqNorm q (fun k => dyadicWeight s k * lpModulus p r F k) := + modNormOn_le_modNorm_of_indicatorLp Ω.measurableSet r s q rfl + _ = modNormOn MeasurableSet.univ r s q F := (modNormOn_univ r s q F).symm + _ < ⊤ := hF + +/-- **The Besov space of a smooth domain by charts is the intrinsic Besov space**: for a smooth +bounded domain `Ω ⊆ ℝ^n`, `1 ≤ p < ∞`, `0 < s < r` and `1 ≤ q ≤ ∞`, `f ∈ L_p(closure Ω)` lies in +the Besov space `B^s_{p,q}` of the compact manifold `closure Ω` with the Lebesgue measure iff +`‖f‖_{L_p(Ω)} + ‖(2^(ks) ω_r(f, 2^(-k), Ω)_p)_k‖_{ℓ_q} < ∞`. -/ +theorem memBesov_iff_modNormOn_lt_top {s : ℝ} (hs : 0 < s) {r : ℕ} (hsr : s < r) {q : ℝ≥0∞} + (hq : 1 ≤ q) (f : Lp ℂ p Ω.volumeOn) : + Manifold.MemBesov (𝓡∂ n) Ω.volumeOn hp s q f ↔ + modNormOn Ω.measurableSet r s q (Ω.extLp hp f) < ⊤ := by + obtain ⟨G⟩ := GlobalAtlas.nonempty Ω + rw [Manifold.memBesov_iff (I := 𝓡∂ n) (μ := Ω.volumeOn) hp G.toBesovAtlas hs hq f, + G.toBesovAtlas.memBesov_iff_besovNorm_lt_top hp hs hsr hq f, + Manifold.BesovAtlas.besovNorm, ENNReal.sum_lt_top] + exact ⟨fun h => G.modNormOn_extLp_lt_top hp hs hsr hq f fun i => h i (Finset.mem_univ i), + fun h i _ => G.modNormOn_pieceLp_lt_top hp hs hsr hq f h i⟩ + +end SmoothDomain + +end Rd diff --git a/LeanPool/FunctionSpaces/Domains/Manifolds/SmoothLocalGraphs.lean b/LeanPool/FunctionSpaces/Domains/Manifolds/SmoothLocalGraphs.lean new file mode 100644 index 0000000000..815a6c0f6c --- /dev/null +++ b/LeanPool/FunctionSpaces/Domains/Manifolds/SmoothLocalGraphs.lean @@ -0,0 +1,316 @@ +/- +Copyright (c) 2026 Mario Ullrich. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Mario Ullrich +-/ +module + +public import LeanPool.FunctionSpaces.Domains.Lipschitz.LocalLipschitzGraphs +public import LeanPool.FunctionSpaces.Domains.Manifolds.SmoothDomainBesov + +/- +Modified for Lean Pool: module names and imports adapted. +-/ + +/-! +# Smooth bounded domains from smooth local graphs + +A set `Ω ⊆ V` is **smooth near `z`** (`Rd.IsSmoothDomainAt`) if there are `r > 0`, a unit vector +`ν` and a function `φ` on the hyperplane `ν^⊥`, smooth on its ball of radius `r`, with +`Ω ∩ B(z, r) = {x : φ(P(x - z)) < ⟪ν, x - z⟫} ∩ B(z, r)`, `P` the orthogonal projection onto +`ν^⊥`; `Ω` is a **bounded smooth set** (`Rd.IsBoundedSmoothDomain`) if it is open, bounded and +smooth near each point of its frontier. + +* A set smooth near `z` is Lipschitz near `z`, since a smooth function is Lipschitz near the + origin (`Rd.IsSmoothDomainAt.isLipschitzDomainAt`); so bounded smooth sets are bounded + Lipschitz sets. +* In finite dimension, a function smooth on a ball agrees on the ball of a quarter of the radius + with a smooth Lipschitz function on the whole space, its product with a smooth bump + (`Rd.exists_contDiff_lipschitzWith_eqOn_ball`, through `Rd.contDiff_mul_of_tsupport_subset`). + So being smooth near `z` means agreeing on a ball around `z` with a Lipschitz graph domain with + smooth graph function (`Rd.isSmoothDomainAt_iff`). +* The charts at the frontier points of a bounded smooth set in `ℝ^n` form a smooth domain with + carrier `Ω` (`Rd.SmoothDomain.ofIsBoundedSmoothDomain`, through + `Rd.BoundedLipschitzDomain.ofCharts`), and the carrier of every smooth domain is a bounded + smooth set (`Rd.isBoundedSmoothDomain_iff_exists`). +* Every open ball is a bounded smooth set (`Rd.isBoundedSmoothDomain_ball`): near a point of its + sphere it lies above the graph of `y ↦ R - √(R² - ‖y‖²)`, smooth for `‖y‖ < R/2` + (`Rd.contDiffOn_sphereProfile_norm`). Hence the smooth domain `Rd.SmoothDomain.ball`, whose + closure is a compact manifold with boundary, with the Besov spaces of + `Rd.SmoothDomain.memBesov_ball_iff`. +-/ + +@[expose] public section + +open MeasureTheory Set Filter Topology Metric +open scoped ENNReal NNReal Manifold ContDiff + +namespace Rd + +variable {V : Type*} [NormedAddCommGroup V] [InnerProductSpace ℝ V] + +/-! ### The local condition -/ + +/-- A set `Ω` is **smooth near the point `z`** if there are a radius `r > 0`, a unit vector `ν` +and a function `φ` on the hyperplane `ν^⊥`, smooth on the ball of radius `r` of `ν^⊥`, with +`Ω ∩ B(z, r) = {x : φ(P(x - z)) < ⟪ν, x - z⟫} ∩ B(z, r)`, where `P` is the orthogonal projection +onto `ν^⊥`: near `z`, `Ω` is the region above the graph of `φ` in the direction `ν`. This is the +local condition of Grisvard, Definition 1.2.1.1, with `φ` of class `C^∞`, the rotation of +coordinates replaced by the direction `ν` and balls in place of hypercubes. -/ +def IsSmoothDomainAt (Ω : Set V) (z : V) : Prop := + ∃ r : ℝ, 0 < r ∧ ∃ ν : V, ‖ν‖ = 1 ∧ ∃ φ : (ℝ ∙ ν)ᗮ → ℝ, + ContDiffOn ℝ ((⊤ : ℕ∞) : WithTop ℕ∞) φ (ball 0 r) ∧ + Ω ∩ ball z r = + {x | φ ((ℝ ∙ ν)ᗮ.orthogonalProjectionOnto (x - z)) < inner ℝ ν (x - z)} ∩ ball z r + +/-- A **bounded smooth set**: an open bounded set that is smooth near each point of its frontier +(`Rd.IsSmoothDomainAt`), the usual definition of a bounded domain with smooth boundary. In `ℝ^n` +these are exactly the carriers of `Rd.SmoothDomain` (`Rd.isBoundedSmoothDomain_iff_exists`). -/ +def IsBoundedSmoothDomain (Ω : Set V) : Prop := + IsOpen Ω ∧ Bornology.IsBounded Ω ∧ ∀ z ∈ frontier Ω, IsSmoothDomainAt Ω z + +/-! ### The smooth cut-off -/ + +/-- The product of a `C^n` function `b` with a function `φ` that is `C^n` on an open set +containing the closed support `tsupport b` is `C^n` on the whole space: near the points of +`tsupport b` both factors are `C^n`, and near the other points the product vanishes (Mathlib's +`notMem_tsupport_iff_eventuallyEq`). This is the flat analogue of Mathlib's +`ContMDiffOn.smul_section_of_tsupport`. -/ +theorem contDiff_mul_of_tsupport_subset {E : Type*} [NormedAddCommGroup E] [NormedSpace ℝ E] + {n : WithTop ℕ∞} {b φ : E → ℝ} {U : Set E} (hb : ContDiff ℝ n b) (hU : IsOpen U) + (hbU : tsupport b ⊆ U) (hφ : ContDiffOn ℝ n φ U) : ContDiff ℝ n (fun x => b x * φ x) := by + rw [contDiff_iff_contDiffAt] + intro x + by_cases hx : x ∈ tsupport b + · exact hb.contDiffAt.mul (hφ.contDiffAt (hU.mem_nhds (hbU hx))) + · have hev : (fun x => b x * φ x) =ᶠ[𝓝 x] fun _ => (0 : ℝ) := by + filter_upwards [notMem_tsupport_iff_eventuallyEq.1 hx] with y hy + simp only [hy, Pi.zero_apply, zero_mul] + exact contDiffAt_const.congr_of_eventuallyEq hev + +/-- **The smooth cut-off**: a function `φ` smooth on the ball `B(0, r)` of a finite-dimensional +real inner product space agrees on `B(0, r/4)` with a smooth Lipschitz function `ψ` on the whole +space, namely `ψ = b φ` for a smooth bump `b` equal to `1` on `B̄(0, r/4)` and supported in +`B̄(0, r/2)`. `ψ` is smooth by `Rd.contDiff_mul_of_tsupport_subset` and has compact support, so +it is Lipschitz (Mathlib's `ContDiff.lipschitzWith_of_hasCompactSupport`). -/ +theorem exists_contDiff_lipschitzWith_eqOn_ball {E : Type*} [NormedAddCommGroup E] + [InnerProductSpace ℝ E] [FiniteDimensional ℝ E] {φ : E → ℝ} {r : ℝ} (hr : 0 < r) + (hφ : ContDiffOn ℝ ((⊤ : ℕ∞) : WithTop ℕ∞) φ (ball 0 r)) : + ∃ (L : ℝ≥0) (ψ : E → ℝ), ContDiff ℝ ((⊤ : ℕ∞) : WithTop ℕ∞) ψ ∧ LipschitzWith L ψ ∧ + EqOn ψ φ (ball 0 (r / 4)) := by + let b : ContDiffBump (0 : E) := ⟨r / 4, r / 2, by positivity, by linarith⟩ + have hbU : tsupport b ⊆ ball 0 r := by + rw [b.tsupport_eq] + exact closedBall_subset_ball (by change r / 2 < r; linarith) + have hsmooth := contDiff_mul_of_tsupport_subset b.contDiff isOpen_ball hbU hφ + obtain ⟨L, hL⟩ := ContDiff.lipschitzWith_of_hasCompactSupport + (b.hasCompactSupport.mul_right (f' := φ)) hsmooth (by simp) + refine ⟨L, _, hsmooth, hL, fun x hx => ?_⟩ + change b x * φ x = φ x + rw [b.one_of_mem_closedBall (ball_subset_closedBall hx), one_mul] + +/-! ### Smooth local graphs and smooth graph domains -/ + +/-- **A set smooth near `z` agrees with a smooth Lipschitz graph domain on a ball** around `z`: +cut off the local graph function with `Rd.exists_contDiff_lipschitzWith_eqOn_ball` and take the +graph domain of the local graph (`Rd.LipschitzGraph.ofLocal`) on the ball of a quarter of the +radius (`Rd.localGraph_inter_ball_eq_of_eqOn`), whose graph function is smooth +(`Rd.LipschitzGraph.contDiff_phi_ofLocal`). -/ +theorem IsSmoothDomainAt.exists_ball_inter_eq [FiniteDimensional ℝ V] {Ω : Set V} {z : V} + (h : IsSmoothDomainAt Ω z) : + ∃ r : ℝ, 0 < r ∧ ∃ G : LipschitzGraph V, ContDiff ℝ ((⊤ : ℕ∞) : WithTop ℕ∞) G.phi ∧ + ball z r ∩ Ω = ball z r ∩ G.domain := by + obtain ⟨r, hr, ν, hν, φ, hφ, hΩ⟩ := h + obtain ⟨L, ψ, hψ, hψL, heq⟩ := exists_contDiff_lipschitzWith_eqOn_ball hr hφ + have hsub : ball z (r / 4) ⊆ ball z r := ball_subset_ball (by linarith) + refine ⟨r / 4, by positivity, LipschitzGraph.ofLocal z ν hν ψ hψL, ?_, ?_⟩ + · exact LipschitzGraph.contDiff_phi_ofLocal z ν hν hψL hψ + · calc ball z (r / 4) ∩ Ω = Ω ∩ ball z r ∩ ball z (r / 4) := by + rw [inter_assoc, inter_eq_right.2 hsub, inter_comm] + _ = {x | φ ((ℝ ∙ ν)ᗮ.orthogonalProjectionOnto (x - z)) < inner ℝ ν (x - z)} ∩ + ball z (r / 4) := by rw [hΩ, inter_assoc, inter_eq_right.2 hsub] + _ = {x | ψ ((ℝ ∙ ν)ᗮ.orthogonalProjectionOnto (x - z)) < inner ℝ ν (x - z)} ∩ + ball z (r / 4) := localGraph_inter_ball_eq_of_eqOn heq.symm + _ = ball z (r / 4) ∩ (LipschitzGraph.ofLocal z ν hν ψ hψL).domain := by + rw [LipschitzGraph.domain_ofLocal, inter_comm] + +/-- **Agreeing with a smooth Lipschitz graph domain on a ball** around `z` makes a set smooth near +`z`: the graph function seen from `z` (`Rd.LipschitzGraph.localPhi`) is smooth on the whole +hyperplane (`Rd.LipschitzGraph.contDiff_localPhi`), and `Rd.LipschitzGraph.domain_eq_localPhi` +describes the graph domain. -/ +theorem isSmoothDomainAt_of_ball_inter_eq {Ω : Set V} {z : V} {r : ℝ} (hr : 0 < r) + (G : LipschitzGraph V) (hG : ContDiff ℝ ((⊤ : ℕ∞) : WithTop ℕ∞) G.phi) + (h : ball z r ∩ Ω = ball z r ∩ G.domain) : IsSmoothDomainAt Ω z := by + refine ⟨r, hr, G.e, G.norm_e, G.localPhi z, ?_, ?_⟩ + · exact (G.contDiff_localPhi z hG).contDiffOn + · rw [inter_comm, h, G.domain_eq_localPhi z, inter_comm] + rfl + +/-- **Smooth near `z` means agreeing with a smooth Lipschitz graph domain on a ball** around `z`, +in finite dimension. -/ +theorem isSmoothDomainAt_iff [FiniteDimensional ℝ V] {Ω : Set V} {z : V} : + IsSmoothDomainAt Ω z ↔ + ∃ r : ℝ, 0 < r ∧ ∃ G : LipschitzGraph V, ContDiff ℝ ((⊤ : ℕ∞) : WithTop ℕ∞) G.phi ∧ + ball z r ∩ Ω = ball z r ∩ G.domain := + ⟨IsSmoothDomainAt.exists_ball_inter_eq, fun ⟨_, hr, G, hG, h⟩ => + isSmoothDomainAt_of_ball_inter_eq hr G hG h⟩ + +/-- **Smooth near a point implies Lipschitz near it**: the local graph function `φ` is `C^1` at +the origin, hence `K`-Lipschitz on a ball `B(0, ε)` (Mathlib's `ContDiffAt.exists_lipschitzOnWith`), +and `Rd.isLipschitzDomainAt_of_lipschitzOnWith` applies with the radius `min ε r`. -/ +theorem IsSmoothDomainAt.isLipschitzDomainAt {Ω : Set V} {z : V} + (h : IsSmoothDomainAt Ω z) : IsLipschitzDomainAt Ω z := by + obtain ⟨r, hr, ν, hν, φ, hφ, hΩ⟩ := h + obtain ⟨K, t, ht, hK⟩ := ((hφ.contDiffAt (isOpen_ball.mem_nhds (mem_ball_self hr))).of_le + (by exact_mod_cast le_top)).exists_lipschitzOnWith + obtain ⟨ε, hε, hεt⟩ := Metric.mem_nhds_iff.1 ht + have hsub : ball z (min ε r) ⊆ ball z r := ball_subset_ball (min_le_right _ _) + refine isLipschitzDomainAt_of_lipschitzOnWith (lt_min hε hr) hν + (hK.mono ((ball_subset_ball (min_le_left _ _)).trans hεt)) ?_ + rw [← inter_eq_right.2 hsub, ← inter_assoc, hΩ, inter_assoc] + +/-- **Every bounded smooth set is a bounded Lipschitz set** +(`Rd.IsSmoothDomainAt.isLipschitzDomainAt`). -/ +theorem IsBoundedSmoothDomain.isBoundedLipschitzDomain {Ω : Set V} + (h : IsBoundedSmoothDomain Ω) : IsBoundedLipschitzDomain Ω := + ⟨h.1, h.2.1, fun z hz => (h.2.2 z hz).isLipschitzDomainAt⟩ + +/-! ### The constructor from the set-level definition -/ + +namespace IsBoundedSmoothDomain + +variable [FiniteDimensional ℝ V] {Ω : Set V} + +/-- **A smooth chart at each frontier point**: a radius `r > 0` and a Lipschitz graph domain with +smooth graph function that agrees with `Ω` on `B(z, r)` +(`Rd.IsSmoothDomainAt.exists_ball_inter_eq`). -/ +theorem exists_chart (h : IsBoundedSmoothDomain Ω) (z : frontier Ω) : + ∃ q : ℝ × LipschitzGraph V, 0 < q.1 ∧ ContDiff ℝ ((⊤ : ℕ∞) : WithTop ℕ∞) q.2.phi ∧ + ball (z : V) q.1 ∩ Ω = ball (z : V) q.1 ∩ q.2.domain := by + obtain ⟨r, hr, G, hG, h'⟩ := (h.2.2 z z.2).exists_ball_inter_eq + exact ⟨(r, G), hr, hG, h'⟩ + +/-- A chosen smooth chart at the frontier point `z`: its radius and its graph domain. -/ +noncomputable def chart (h : IsBoundedSmoothDomain Ω) (z : frontier Ω) : ℝ × LipschitzGraph V := + Classical.choose (h.exists_chart z) + +/-- The radius of the chosen smooth chart is positive. -/ +theorem chart_fst_pos (h : IsBoundedSmoothDomain Ω) (z : frontier Ω) : 0 < (h.chart z).1 := + (Classical.choose_spec (h.exists_chart z)).1 + +/-- The graph function of the chosen smooth chart is smooth. -/ +theorem contDiff_chart_phi (h : IsBoundedSmoothDomain Ω) (z : frontier Ω) : + ContDiff ℝ ((⊤ : ℕ∞) : WithTop ℕ∞) (h.chart z).2.phi := + (Classical.choose_spec (h.exists_chart z)).2.1 + +/-- On the ball of the chosen smooth chart, `Ω` is its graph domain. -/ +theorem ball_inter_chart (h : IsBoundedSmoothDomain Ω) (z : frontier Ω) : + ball (z : V) (h.chart z).1 ∩ Ω = ball (z : V) (h.chart z).1 ∩ (h.chart z).2.domain := + (Classical.choose_spec (h.exists_chart z)).2.2 + +end IsBoundedSmoothDomain + +namespace SmoothDomain + +variable {n : ℕ} [NeZero n] {Ω : Set (EuclideanSpace ℝ (Fin n))} + +/-- **The smooth domain of a bounded smooth set** in `ℝ^n`: the chosen smooth charts at the +frontier points (`Rd.IsBoundedSmoothDomain.chart`) give a bounded Lipschitz domain with carrier +`Ω` (`Rd.BoundedLipschitzDomain.ofCharts`), whose graph functions are smooth since each graph +domain is one of the charts (`Rd.BoundedLipschitzDomain.exists_graph_ofCharts_eq`). -/ +noncomputable def ofIsBoundedSmoothDomain (h : IsBoundedSmoothDomain Ω) : SmoothDomain n where + toBoundedLipschitzDomain := BoundedLipschitzDomain.ofCharts h.1 h.2.1 (fun z => (h.chart z).1) + h.chart_fst_pos (fun z => (h.chart z).2) h.ball_inter_chart + contDiff_phi j := by + obtain ⟨z, hz⟩ := BoundedLipschitzDomain.exists_graph_ofCharts_eq h.1 h.2.1 _ + h.chart_fst_pos _ h.ball_inter_chart j + rw [hz] + exact h.contDiff_chart_phi z + +/-- The carrier of `Rd.SmoothDomain.ofIsBoundedSmoothDomain h` is `Ω`. -/ +@[simp] +theorem carrier_ofIsBoundedSmoothDomain (h : IsBoundedSmoothDomain Ω) : + (ofIsBoundedSmoothDomain h).carrier = Ω := + rfl + +/-- **The carrier of a smooth domain is a bounded smooth set**: near a frontier point it agrees +with one of its graph domains (`Rd.BoundedLipschitzDomain.exists_ball_inter_eq_graph`), whose +graph function is smooth. -/ +theorem isBoundedSmoothDomain (D : SmoothDomain n) : IsBoundedSmoothDomain D.carrier := + ⟨D.isOpen, D.isBounded, fun _ hz => by + obtain ⟨j, ρ, hρ, h⟩ := D.toBoundedLipschitzDomain.exists_ball_inter_eq_graph hz + exact isSmoothDomainAt_of_ball_inter_eq hρ (D.graph j) (D.contDiff_phi j) h⟩ + +end SmoothDomain + +/-- **The set-level definition and the structure agree**: a set in `ℝ^n` is a bounded smooth set +iff it is the carrier of some `Rd.SmoothDomain`. -/ +theorem isBoundedSmoothDomain_iff_exists {n : ℕ} [NeZero n] {Ω : Set (EuclideanSpace ℝ (Fin n))} : + IsBoundedSmoothDomain Ω ↔ ∃ D : SmoothDomain n, D.carrier = Ω := + ⟨fun h => ⟨SmoothDomain.ofIsBoundedSmoothDomain h, rfl⟩, + fun ⟨D, hD⟩ => hD ▸ D.isBoundedSmoothDomain⟩ + +/-! ### The ball -/ + +/-- For `R > 0` the function `y ↦ g_R(‖y‖)` (`Rd.sphereProfile`) is smooth on the ball of radius +`R/2` of any real inner product space: there it equals `R - √(R² - ‖y‖²)`, since +`min(‖y‖, R/2) = ‖y‖`; `y ↦ ‖y‖²` is smooth (Mathlib's `contDiff_norm_sq`), and the square root +is smooth away from `0` (`ContDiffOn.sqrt`). -/ +theorem contDiffOn_sphereProfile_norm {E : Type*} [NormedAddCommGroup E] [InnerProductSpace ℝ E] + {R : ℝ} (hR : 0 < R) : + ContDiffOn ℝ ((⊤ : ℕ∞) : WithTop ℕ∞) (fun y : E => sphereProfile R ‖y‖) (ball 0 (R / 2)) := by + have hpos : ∀ y ∈ ball (0 : E) (R / 2), R ^ 2 - ‖y‖ ^ 2 ≠ 0 := fun y hy => by + rw [mem_ball_zero_iff] at hy + nlinarith [norm_nonneg y] + refine ((contDiffOn_const (c := R)).sub + ((contDiff_const.sub (contDiff_norm_sq ℝ)).contDiffOn.sqrt hpos)).congr fun y hy => ?_ + rw [mem_ball_zero_iff] at hy + rw [sphereProfile, min_eq_left hy.le] + +/-- **The ball is smooth near each point of its sphere**: at `z` with `‖z - c‖ = R`, with the +inward normal `ν = (c - z)/R`, radius `R/2` and the function `y ↦ g_R(‖y‖)`, smooth on the ball of +radius `R/2` (`Rd.contDiffOn_sphereProfile_norm`, `Rd.inter_ball_eq_sphereProfile`). -/ +theorem isSmoothDomainAt_ball (c : V) {R : ℝ} (hR : 0 < R) {z : V} (hz : dist z c = R) : + IsSmoothDomainAt (ball c R) z := + ⟨R / 2, by positivity, R⁻¹ • (c - z), norm_inv_smul_sub_eq_one hR hz, + fun y => sphereProfile R ‖(y : V)‖, contDiffOn_sphereProfile_norm hR, + inter_ball_eq_sphereProfile c hR hz⟩ + +/-- **Every open ball is a bounded smooth set**: for `R > 0` by `Rd.isSmoothDomainAt_ball` at the +points of the sphere, which contains the frontier (Mathlib's `Metric.frontier_ball_subset_sphere`); +for `R ≤ 0` the ball is empty. -/ +theorem isBoundedSmoothDomain_ball (c : V) (R : ℝ) : IsBoundedSmoothDomain (ball c R) := by + rcases le_or_gt R 0 with hR | hR + · rw [ball_eq_empty.2 hR] + exact ⟨isOpen_empty, Bornology.isBounded_empty, fun _ hz => by simp at hz⟩ + · exact ⟨isOpen_ball, isBounded_ball, fun _ hz => + isSmoothDomainAt_ball c hR (mem_sphere.1 (frontier_ball_subset_sphere hz))⟩ + +/-- **The ball as a smooth domain**: `B(c, R) ⊆ ℝ^n`, from `Rd.isBoundedSmoothDomain_ball`. Its +closure is a compact smooth manifold with boundary (`Rd.SmoothDomain.isManifold`) with the +Lebesgue measure as a smooth measure. The name is protected, so that `ball` keeps meaning +`Metric.ball` inside the namespace `Rd.SmoothDomain`. -/ +protected noncomputable def SmoothDomain.ball {n : ℕ} [NeZero n] (c : EuclideanSpace ℝ (Fin n)) + (R : ℝ) : SmoothDomain n := + SmoothDomain.ofIsBoundedSmoothDomain (isBoundedSmoothDomain_ball c R) + +/-- The carrier of `Rd.SmoothDomain.ball c R` is the ball `B(c, R)`. -/ +@[simp] +theorem SmoothDomain.carrier_ball {n : ℕ} [NeZero n] (c : EuclideanSpace ℝ (Fin n)) (R : ℝ) : + (SmoothDomain.ball c R).carrier = ball c R := + rfl + +/-- **The Besov spaces of the closed ball**: for `1 ≤ p < ∞`, `0 < s < r` and `1 ≤ q ≤ ∞`, a +function `f ∈ L_p` of the closure of the ball `B(c, R)`, a compact manifold with boundary with the +Lebesgue measure, lies in its Besov space `B^s_{p,q}` iff +`‖f‖_{L_p(B(c, R))} + ‖(2^(ks) ω_r(f, 2^(-k), B(c, R))_p)_k‖_{ℓ_q} < ∞`, with `f` extended by `0` +(`Rd.SmoothDomain.memBesov_iff_modNormOn_lt_top` for `Rd.SmoothDomain.ball`). -/ +theorem SmoothDomain.memBesov_ball_iff {n : ℕ} [NeZero n] (c : EuclideanSpace ℝ (Fin n)) (R : ℝ) + {p : ℝ≥0∞} [Fact (1 ≤ p)] (hp : p ≠ ⊤) {s : ℝ} (hs : 0 < s) {r : ℕ} (hsr : s < r) + {q : ℝ≥0∞} (hq : 1 ≤ q) (f : Lp ℂ p (SmoothDomain.ball c R).volumeOn) : + Manifold.MemBesov (𝓡∂ n) (SmoothDomain.ball c R).volumeOn hp s q f ↔ + modNormOn (measurableSet_ball : MeasurableSet (ball c R)) r s q + ((SmoothDomain.ball c R).extLp hp f) < ⊤ := + memBesov_iff_modNormOn_lt_top hp hs hsr hq f + +end Rd diff --git a/LeanPool/FunctionSpaces/Domains/Manifolds/SmoothMeasure.lean b/LeanPool/FunctionSpaces/Domains/Manifolds/SmoothMeasure.lean new file mode 100644 index 0000000000..6e134b97ac --- /dev/null +++ b/LeanPool/FunctionSpaces/Domains/Manifolds/SmoothMeasure.lean @@ -0,0 +1,318 @@ +/- +Copyright (c) 2026 Mario Ullrich. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Mario Ullrich +-/ +module + +public import Mathlib.Geometry.Manifold.IsManifold.ExtChartAt +public import Mathlib.MeasureTheory.Measure.Haar.InnerProductSpace +public import Mathlib.MeasureTheory.Measure.WithDensity +public import Mathlib.MeasureTheory.Function.LpSeminorm.Basic +public import Mathlib.MeasureTheory.Integral.IntegrableOn + +/- +Modified for Lean Pool: module names and imports adapted. +-/ + +/-! +# Smooth measures on manifolds + +A measure `μ` on a manifold `M` modelled on `E` with corners `I` is **smooth** +(`Manifold.IsSmoothMeasure`) if in every chart `e` of the atlas the image of `μ` on the source of +`e` under the extended chart `κ = e.extend I` has a continuous density `ρ_e` with `0 < ρ_e < ∞` +with respect to the Lebesgue measure on the target `κ(e.source) ⊆ range I`: + +`κ_* (μ|_{e.source}) = ρ_e · vol|_{κ(e.source)}`. + +So a smooth measure in this project is a measure with a continuous positive density in every +chart; the results use the continuity of the densities and the bounds `0 < ρ_e < ∞`, and no +differentiability. + +The extended chart is almost everywhere measurable on its source +(`Manifold.aemeasurable_extend_restrict`), and the parts inside the source of preimages of +measurable sets are measurable (`Manifold.measurableSet_source_inter_extend_preimage`). + +The Lebesgue measure of a smooth bounded domain is a smooth measure on its closure +(`Rd.SmoothDomain.isSmoothMeasure_volumeOn`). + +**Integrals in a chart** (`Manifold.IsSmoothMeasure.lintegral_source_eq`): +`∫_{e.source} F dμ = ∫_{κ(e.source)} ρ_e(y) F(κ⁻¹ y) dy`. For functions that vanish outside a +compact subset `K` of the source, the density is bounded above and below on `κ(K)`, so the +integrals over `M` and over the chart are comparable +(`Manifold.IsSmoothMeasure.exists_lintegral_chart_le`): the `L_p` norms on `M` and in the chart +are equivalent for such functions (`Manifold.IsSmoothMeasure.exists_eLpNorm_chart_le`). + +**Null sets in charts**: on a closed subset `K` of the source, the extended chart (set to `0` off +the source, `Manifold.measurable_piecewise_extend`) is quasi-measure-preserving from `μ|_K` to the +Lebesgue measure (`Manifold.IsSmoothMeasure.quasiMeasurePreserving_piecewise_extend`), so a +property of almost every point of `E` holds at `κ x` for `μ`-almost every `x ∈ K` +(`Manifold.IsSmoothMeasure.ae_comp_extend`). +-/ + +@[expose] public section + +open MeasureTheory Set Filter Topology +open scoped ENNReal + +namespace Manifold + +variable {E : Type*} [NormedAddCommGroup E] [InnerProductSpace ℝ E] [FiniteDimensional ℝ E] + [MeasurableSpace E] [BorelSpace E] {H : Type*} [TopologicalSpace H] + (I : ModelWithCorners ℝ E H) {M : Type*} [TopologicalSpace M] [ChartedSpace H M] + [MeasurableSpace M] [BorelSpace M] + +/-- A **smooth measure** on `M`, here a measure with a continuous positive density in every chart: +in every chart `e` of the atlas, the image of `μ` on the source of `e` under the extended chart is +a measure with a continuous density `ρ_e` with `0 < ρ_e < ∞` on the target, with respect to the +Lebesgue measure on the target. -/ +class IsSmoothMeasure (μ : Measure M) : Prop where + exists_density : ∀ e ∈ atlas H M, ∃ ρ : E → ℝ≥0∞, ContinuousOn ρ (e.extend I).target ∧ + (∀ y ∈ (e.extend I).target, 0 < ρ y ∧ ρ y < ∞) ∧ + Measure.map (e.extend I) (μ.restrict e.source) = + (volume.restrict (e.extend I).target).withDensity ρ + +omit [FiniteDimensional ℝ E] [ChartedSpace H M] [MeasurableSpace M] [BorelSpace M] in +/-- The target of an extended chart is measurable: it is the intersection of an open set with the +closed range of `I`. -/ +theorem measurableSet_extend_target (e : OpenPartialHomeomorph M H) : + MeasurableSet (e.extend I).target := by + rw [e.extend_target] + exact (I.continuous_symm.isOpen_preimage _ e.open_target).measurableSet.inter + I.isClosed_range.measurableSet + +omit [FiniteDimensional ℝ E] [ChartedSpace H M] in +/-- **The extended chart, set to `0` off the source, is measurable**: `κ = e.extend I` is +continuous on the open source (Mathlib's `ContinuousOn.measurable_piecewise`). -/ +theorem measurable_piecewise_extend (e : OpenPartialHomeomorph M H) + [∀ x, Decidable (x ∈ e.source)] : + Measurable (e.source.piecewise (e.extend I) fun _ => (0 : E)) := by + refine ContinuousOn.measurable_piecewise ?_ continuousOn_const e.open_source.measurableSet + have h := e.continuousOn_extend (I := I) + rwa [e.extend_source] at h + +omit [FiniteDimensional ℝ E] [ChartedSpace H M] in +/-- **The extended chart is almost everywhere measurable on its source**: for every measure `μ` on +`M`, `κ = e.extend I` is almost everywhere measurable for `μ` restricted to the open source, on +which `κ` is continuous. -/ +theorem aemeasurable_extend_restrict (e : OpenPartialHomeomorph M H) (μ : Measure M) : + AEMeasurable (e.extend I) (μ.restrict e.source) := by + have h := (e.continuousOn_extend (I := I)).aemeasurable (μ := μ) + (by rw [e.extend_source]; exact e.open_source.measurableSet) + rwa [e.extend_source] at h + +omit [FiniteDimensional ℝ E] [ChartedSpace H M] in +/-- **Preimages under the extended chart within its source are measurable**: for a measurable +`B ⊆ E`, the set `e.source ∩ κ⁻¹(B)`, `κ = e.extend I`, is measurable. It is the part inside the +source of the preimage of `B` under the measurable map `Manifold.measurable_piecewise_extend` +(Mathlib's `Set.piecewise_preimage`). -/ +theorem measurableSet_source_inter_extend_preimage (e : OpenPartialHomeomorph M H) {B : Set E} + (hB : MeasurableSet B) : MeasurableSet (e.source ∩ e.extend I ⁻¹' B) := by + classical + have h := (measurable_piecewise_extend I e hB).inter e.open_source.measurableSet + rwa [piecewise_preimage, ite_inter_self, inter_comm] at h + +namespace IsSmoothMeasure + +variable {I} {μ : Measure M} [IsSmoothMeasure I μ] + +omit [ChartedSpace H M] [IsSmoothMeasure I μ] in +/-- **Integrals in a chart**: for a chart `e` of the atlas with density `ρ` and a measurable +`F ≥ 0`, `∫_{e.source} F dμ = ∫_{κ(e.source)} ρ(y) F(κ⁻¹ y) dy`. -/ +theorem lintegral_source_eq {e : OpenPartialHomeomorph M H} {ρ : E → ℝ≥0∞} + (hρc : ContinuousOn ρ (e.extend I).target) + (hmap : Measure.map (e.extend I) (μ.restrict e.source) = + (volume.restrict (e.extend I).target).withDensity ρ) + {F : M → ℝ≥0∞} (hF : Measurable F) : + ∫⁻ x in e.source, F x ∂μ = + ∫⁻ y in (e.extend I).target, ρ y * F ((e.extend I).symm y) := by + have hT := measurableSet_extend_target I e + have hsrc : MeasurableSet e.source := e.open_source.measurableSet + have hκ := aemeasurable_extend_restrict I e μ + have hFs : AEMeasurable (fun y => F ((e.extend I).symm y)) + (volume.restrict (e.extend I).target) := + hF.comp_aemeasurable ((e.continuousOn_extend_symm (I := I)).aemeasurable hT) + have hFs' : AEMeasurable (fun y => F ((e.extend I).symm y)) + (Measure.map (e.extend I) (μ.restrict e.source)) := by + rw [hmap] + exact hFs.mono_ac (withDensity_absolutelyContinuous _ _) + calc ∫⁻ x in e.source, F x ∂μ + = ∫⁻ x in e.source, F ((e.extend I).symm (e.extend I x)) ∂μ := + setLIntegral_congr_fun hsrc fun x hx => by rw [e.extend_left_inv hx] + _ = ∫⁻ y, F ((e.extend I).symm y) ∂(Measure.map (e.extend I) (μ.restrict e.source)) := + (lintegral_map' hFs' hκ).symm + _ = ∫⁻ y, F ((e.extend I).symm y) ∂((volume.restrict (e.extend I).target).withDensity ρ) := by + rw [hmap] + _ = ∫⁻ y in (e.extend I).target, ρ y * F ((e.extend I).symm y) := + lintegral_withDensity_eq_lintegral_mul₀ (hρc.aemeasurable hT) hFs + +omit [InnerProductSpace ℝ E] [FiniteDimensional ℝ E] [MeasurableSpace E] [BorelSpace E] in +/-- **The density is bounded above and below on compact sets**: on a compact `K'` inside the +target, `c ≤ ρ ≤ C` with `0 < c` and `C < ∞`, since `ρ` is continuous with values in `(0, ∞)`. -/ +theorem exists_density_bounds {T : Set E} {ρ : E → ℝ≥0∞} (hρc : ContinuousOn ρ T) + (hρ : ∀ y ∈ T, 0 < ρ y ∧ ρ y < ∞) {K' : Set E} (hK' : IsCompact K') (hK'T : K' ⊆ T) : + ∃ c C : ℝ≥0∞, c ≠ 0 ∧ C ≠ ∞ ∧ ∀ y ∈ K', c ≤ ρ y ∧ ρ y ≤ C := by + rcases K'.eq_empty_or_nonempty with h | hne + · exact ⟨1, 1, one_ne_zero, ENNReal.one_ne_top, by simp [h]⟩ + obtain ⟨y₀, hy₀, hmin⟩ := hK'.exists_isMinOn hne (hρc.mono hK'T) + obtain ⟨y₁, hy₁, hmax⟩ := hK'.exists_isMaxOn hne (hρc.mono hK'T) + exact ⟨ρ y₀, ρ y₁, (hρ y₀ (hK'T hy₀)).1.ne', (hρ y₁ (hK'T hy₁)).2.ne, + fun y hy => ⟨hmin hy, hmax hy⟩⟩ + +variable (μ) in +/-- **Integrals on `M` and in a chart are comparable** for functions that vanish outside a compact +subset `K` of the source of a chart `e` of the atlas: there are `c > 0` and `C < ∞` with +`∫_{κ(e.source)} F ∘ κ⁻¹ ≤ c⁻¹ ∫_M F dμ` and `∫_M F dμ ≤ C ∫_{κ(e.source)} F ∘ κ⁻¹`. -/ +theorem exists_lintegral_chart_le {e : OpenPartialHomeomorph M H} (he : e ∈ atlas H M) + {K : Set M} (hK : IsCompact K) (hKs : K ⊆ e.source) : + ∃ c C : ℝ≥0∞, c ≠ 0 ∧ C ≠ ∞ ∧ ∀ F : M → ℝ≥0∞, Measurable F → (∀ x ∉ K, F x = 0) → + (∫⁻ y in (e.extend I).target, F ((e.extend I).symm y) ≤ c⁻¹ * ∫⁻ x, F x ∂μ) ∧ + ∫⁻ x, F x ∂μ ≤ C * ∫⁻ y in (e.extend I).target, F ((e.extend I).symm y) := by + obtain ⟨ρ, hρc, hρ, hmap⟩ := IsSmoothMeasure.exists_density (I := I) (μ := μ) e he + set T := (e.extend I).target + have hK' : IsCompact (e.extend I '' K) := + hK.image_of_continuousOn ((e.continuousOn_extend (I := I)).mono (by rwa [e.extend_source])) + have hK'T : e.extend I '' K ⊆ T := by + rintro _ ⟨x, hx, rfl⟩ + exact (e.extend I).map_source (by rw [e.extend_source]; exact hKs hx) + obtain ⟨c, C, hc, hC, hbd⟩ := exists_density_bounds hρc hρ hK' hK'T + refine ⟨c, C, hc, hC, fun F hF hFK => ⟨?_, ?_⟩⟩ + · -- where `F ∘ κ⁻¹ ≠ 0`, the density is at least `c` + have hsupp : ∀ y ∈ T, F ((e.extend I).symm y) ≠ 0 → c ≤ ρ y := fun y hy hne => by + have hx : (e.extend I).symm y ∈ K := by + by_contra h + exact hne (hFK _ h) + have hyK : y ∈ e.extend I '' K := ⟨_, hx, (e.extend I).right_inv hy⟩ + exact (hbd y hyK).1 + calc ∫⁻ y in T, F ((e.extend I).symm y) + ≤ ∫⁻ y in T, c⁻¹ * (ρ y * F ((e.extend I).symm y)) := by + refine setLIntegral_mono' (measurableSet_extend_target I e) fun y hy => ?_ + by_cases hne : F ((e.extend I).symm y) = 0 + · rw [hne] + exact zero_le + · rw [← mul_assoc] + calc F ((e.extend I).symm y) = 1 * F ((e.extend I).symm y) := (one_mul _).symm + _ ≤ c⁻¹ * ρ y * F ((e.extend I).symm y) := by + gcongr + calc (1 : ℝ≥0∞) = c⁻¹ * c := (ENNReal.inv_mul_cancel hc (ne_top_of_le_ne_top + (hρ y hy).2.ne (hsupp y hy hne))).symm + _ ≤ c⁻¹ * ρ y := mul_le_mul' le_rfl (hsupp y hy hne) + _ = c⁻¹ * ∫⁻ y in T, ρ y * F ((e.extend I).symm y) := lintegral_const_mul' _ _ + (ENNReal.inv_ne_top.2 hc) + _ = c⁻¹ * ∫⁻ x in e.source, F x ∂μ := by rw [lintegral_source_eq hρc hmap hF] + _ ≤ c⁻¹ * ∫⁻ x, F x ∂μ := mul_le_mul' le_rfl (setLIntegral_le_lintegral _ _) + · -- `F` lives in the source, where the density is at most `C` + have hsupp : Function.support F ⊆ e.source := fun x hx => hKs (by + by_contra h + exact hx (hFK x h)) + calc ∫⁻ x, F x ∂μ = ∫⁻ x in e.source, F x ∂μ := (setLIntegral_eq_of_support_subset hsupp).symm + _ = ∫⁻ y in T, ρ y * F ((e.extend I).symm y) := lintegral_source_eq hρc hmap hF + _ ≤ ∫⁻ y in T, C * F ((e.extend I).symm y) := by + refine setLIntegral_mono' (measurableSet_extend_target I e) fun y hy => ?_ + by_cases hne : F ((e.extend I).symm y) = 0 + · rw [hne, mul_zero, mul_zero] + · have hx : (e.extend I).symm y ∈ K := by + by_contra h + exact hne (hFK _ h) + exact mul_le_mul' (hbd y ⟨_, hx, (e.extend I).right_inv hy⟩).2 le_rfl + _ = C * ∫⁻ y in T, F ((e.extend I).symm y) := lintegral_const_mul' _ _ hC + +variable (μ) in +/-- **`L_p` norms on `M` and in a chart are comparable** for strongly measurable functions that +vanish outside a compact subset `K` of the source of a chart `e` of the atlas: for `0 < p < ∞` +there are `c, C < ∞` with `‖1_{κ(e.source)} (G ∘ κ⁻¹)‖_p ≤ c ‖G‖_{L_p(μ)}` and +`‖G‖_{L_p(μ)} ≤ C ‖1_{κ(e.source)} (G ∘ κ⁻¹)‖_p` +(`Manifold.IsSmoothMeasure.exists_lintegral_chart_le` for `‖G‖^p`, with Mathlib's +`MeasureTheory.eLpNorm_indicator_eq_eLpNorm_restrict` for the indicator). -/ +theorem exists_eLpNorm_chart_le {e : OpenPartialHomeomorph M H} (he : e ∈ atlas H M) + {K : Set M} (hK : IsCompact K) (hKs : K ⊆ e.source) {p : ℝ≥0∞} (hp0 : p ≠ 0) (hp : p ≠ ∞) + {F : Type*} [NormedAddCommGroup F] : + ∃ c C : ℝ≥0∞, c ≠ ∞ ∧ C ≠ ∞ ∧ ∀ G : M → F, StronglyMeasurable G → (∀ x ∉ K, G x = 0) → + eLpNorm ((e.extend I).target.indicator fun y => G ((e.extend I).symm y)) p volume ≤ + c * eLpNorm G p μ ∧ + eLpNorm G p μ ≤ + C * eLpNorm ((e.extend I).target.indicator fun y => G ((e.extend I).symm y)) p + volume := by + obtain ⟨c, C, hc, hC, hcmp⟩ := exists_lintegral_chart_le (I := I) μ he hK hKs + have hr : 0 < p.toReal := ENNReal.toReal_pos hp0 hp + refine ⟨c⁻¹ ^ (1 / p.toReal), C ^ (1 / p.toReal), + ENNReal.rpow_ne_top_of_nonneg (by positivity) (ENNReal.inv_ne_top.2 hc), + ENNReal.rpow_ne_top_of_nonneg (by positivity) hC, fun G hG hGK => ?_⟩ + have hT := measurableSet_extend_target I e + have hκ : AEMeasurable (e.extend I).symm (volume.restrict (e.extend I).target) := + (e.continuousOn_extend_symm (I := I)).aemeasurable hT + have hFK : ∀ x ∉ K, ‖G x‖ₑ ^ p.toReal = 0 := fun x hx => by + rw [hGK x hx, eNorm_zero, ENNReal.zero_rpow_of_pos hr] + obtain ⟨h1, h2⟩ := hcmp _ (hG.eNorm.pow_const _) hFK + rw [eLpNorm_indicator_eq_eLpNorm_restrict hT.nullMeasurableSet, + eLpNorm_eq_lintegral_rpow_eNorm_toReal hp0 hp (f := fun y => G ((e.extend I).symm y)) + (hG.aestronglyMeasurable.comp_aemeasurable hκ), + eLpNorm_eq_lintegral_rpow_eNorm_toReal hp0 hp hG.aestronglyMeasurable, + ← ENNReal.mul_rpow_of_nonneg _ _ (by positivity : (0 : ℝ) ≤ 1 / p.toReal), + ← ENNReal.mul_rpow_of_nonneg _ _ (by positivity : (0 : ℝ) ≤ 1 / p.toReal)] + exact ⟨ENNReal.rpow_le_rpow h1 (by positivity), ENNReal.rpow_le_rpow h2 (by positivity)⟩ + +omit [ChartedSpace H M] [MeasurableSpace M] [BorelSpace M] in +/-- **A chart integral of the indicator of a pulled-back set**: for `K ⊆ e.source` and a set `N` +of `E`, the integral over the target of `1_S ∘ κ⁻¹`, `S = K ∩ κ⁻¹(N)`, is at most `|N|`, where +`κ = e.extend I` is set to `0` off the source. -/ +theorem setLIntegral_indicator_preimage_le {e : OpenPartialHomeomorph M H} {K : Set M} + (hKs : K ⊆ e.source) [∀ x, Decidable (x ∈ e.source)] (N : Set E) : + ∫⁻ y in (e.extend I).target, + (K ∩ (e.source.piecewise (e.extend I) fun _ => (0 : E)) ⁻¹' N).indicator 1 + ((e.extend I).symm y) ≤ volume N := by + set S := K ∩ (e.source.piecewise (e.extend I) fun _ => (0 : E)) ⁻¹' N + calc ∫⁻ y in (e.extend I).target, S.indicator 1 ((e.extend I).symm y) + ≤ ∫⁻ y in (e.extend I).target, (toMeasurable volume N).indicator 1 y := by + refine setLIntegral_mono' (measurableSet_extend_target I e) fun y hy => ?_ + by_cases hyS : (e.extend I).symm y ∈ S + · have hyN : y ∈ N := by + have h := hyS.2 + rwa [mem_preimage, piecewise_eq_of_mem _ _ _ (hKs hyS.1), + (e.extend I).right_inv hy] at h + rw [indicator_of_mem hyS, indicator_of_mem (subset_toMeasurable _ _ hyN)] + exact le_rfl + · rw [indicator_of_notMem hyS] + exact zero_le + _ ≤ ∫⁻ y, (toMeasurable volume N).indicator 1 y := setLIntegral_le_lintegral _ _ + _ = volume N := by + rw [lintegral_indicator_one (measurableSet_toMeasurable _ _), measure_toMeasurable] + +variable (μ) in +/-- **Charts pull null sets back to null sets**: for a chart `e` of the atlas and a closed +`K ⊆ e.source`, the extended chart `κ = e.extend I`, set to `0` off the source, is +quasi-measure-preserving from `μ|_K` to the Lebesgue measure. For a null set `N`, +`μ(K ∩ κ⁻¹(N)) ≤ C ∫_{κ(e.source)} 1_{K ∩ κ⁻¹(N)} ∘ κ⁻¹ ≤ C |N| = 0` +(`Manifold.IsSmoothMeasure.exists_lintegral_chart_le`). -/ +theorem quasiMeasurePreserving_piecewise_extend [CompactSpace M] {e : OpenPartialHomeomorph M H} + (he : e ∈ atlas H M) {K : Set M} (hK : IsClosed K) (hKs : K ⊆ e.source) + [∀ x, Decidable (x ∈ e.source)] : + QuasiMeasurePreserving (e.source.piecewise (e.extend I) fun _ => (0 : E)) + (μ.restrict K) volume := by + have hκ := measurable_piecewise_extend I e + refine ⟨hκ.aemeasurable, Measure.AbsolutelyContinuous.mk fun N hN hN0 => ?_⟩ + obtain ⟨c, C, -, -, hcmp⟩ := exists_lintegral_chart_le (I := I) μ he hK.isCompact hKs + have hS : MeasurableSet (K ∩ (e.source.piecewise (e.extend I) fun _ => (0 : E)) ⁻¹' N) := + hK.measurableSet.inter (hκ hN) + have h := (hcmp _ (measurable_one.indicator hS) + fun x hx => indicator_of_notMem (fun h : x ∈ K ∩ _ => hx h.1) _).2 + rw [lintegral_indicator_one hS] at h + rw [Measure.map_apply hκ hN, Measure.restrict_apply (hκ hN), inter_comm] + exact le_antisymm (h.trans ((mul_le_mul' le_rfl (setLIntegral_indicator_preimage_le hKs N)).trans + (by rw [hN0, mul_zero]))) zero_le + +/-- **Null sets in a chart are null on `M`**: for a chart `e` of the atlas, a closed set +`K ⊆ e.source` and a property `P` of almost every point of `E`, `P (κ x)` holds for `μ`-almost every +`x ∈ K`, `κ = e.extend I` (`Manifold.IsSmoothMeasure.quasiMeasurePreserving_piecewise_extend` and +Mathlib's `MeasureTheory.QuasiMeasurePreserving.ae`). -/ +theorem ae_comp_extend [CompactSpace M] {e : OpenPartialHomeomorph M H} (he : e ∈ atlas H M) + {K : Set M} (hK : IsClosed K) (hKs : K ⊆ e.source) {P : E → Prop} + (hP : ∀ᵐ y ∂volume, P y) : ∀ᵐ x ∂μ, x ∈ K → P (e.extend I x) := by + classical + have h := (quasiMeasurePreserving_piecewise_extend (I := I) μ he hK hKs).ae hP + filter_upwards [(ae_restrict_iff' hK.measurableSet).1 h] with x hx hxK + simpa only [piecewise_eq_of_mem _ _ _ (hKs hxK)] using hx hxK + +end IsSmoothMeasure + +end Manifold diff --git a/LeanPool/FunctionSpaces/Domains/Manifolds/SmoothMeasureExistence.lean b/LeanPool/FunctionSpaces/Domains/Manifolds/SmoothMeasureExistence.lean new file mode 100644 index 0000000000..5ea445ea9a --- /dev/null +++ b/LeanPool/FunctionSpaces/Domains/Manifolds/SmoothMeasureExistence.lean @@ -0,0 +1,303 @@ +/- +Copyright (c) 2026 Mario Ullrich. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Mario Ullrich +-/ +module + +public import LeanPool.FunctionSpaces.Domains.Manifolds.BesovAtlas +public import Mathlib.MeasureTheory.Function.Jacobian +public import Mathlib.Geometry.Manifold.Instances.Sphere + +/- +Modified for Lean Pool: module names and imports adapted. +-/ + +/-! +# Smooth measures exist + +Let `M` be a smooth manifold modelled on `E` with corners `I` and `A` a Besov atlas with charts +`κ_k` and partition of unity `(ψ_k)`. The **chart measure** of `A` +(`Manifold.BesovAtlas.chartMeasure`) transports the Lebesgue measure with weight `ψ_k ∘ κ_k⁻¹` +from the target of `κ_k` to `M` and sums over `k`: + +`μ_A = ∑_k (κ_k⁻¹)_* (ψ_k ∘ κ_k⁻¹ · vol|_{κ_k(e_k.source)})`. + +In every chart `e` of the atlas of `M` (`e ∈ atlas H M`) with extended chart `κ`, the change of +variables `Φ_k = κ_k ∘ κ⁻¹` (Mathlib's `lintegral_image_eq_lintegral_abs_det_fderiv_mul`) gives +`κ_* (μ_A|_{e.source}) = ρ_e · vol|_{κ(e.source)}` with the density +`ρ_e(y) = ∑_k |det DΦ_k(y)| ψ_k(κ⁻¹ y)` (`Manifold.BesovAtlas.chartDensity`, +`Manifold.BesovAtlas.map_extend_chartMeasure`), where `DΦ_k` is the derivative within the source of +`Φ_k`, a relatively open subset of `range I`. The density is continuous, because each term vanishes +near the points where `κ⁻¹ y` leaves the source of `κ_k`, and positive, because some `ψ_k(κ⁻¹ y)` +is positive and `DΦ_k(y)` is invertible. So `μ_A` is a finite smooth measure, that is, a measure +with a continuous positive density in every chart +(`Manifold.BesovAtlas.isSmoothMeasure_chartMeasure`, +`Manifold.BesovAtlas.isFiniteMeasure_chartMeasure`) for every model, with or without boundary, +and every compact Hausdorff manifold carries one (`Manifold.exists_isSmoothMeasure`); for example +the sphere `S^n ⊆ ℝ^(n+1)`, a compact manifold without boundary +(`Manifold.exists_isSmoothMeasure_sphere`). +-/ + +@[expose] public section + +open MeasureTheory Set Filter Topology Metric +open scoped ENNReal Manifold ContDiff + +namespace Manifold + +variable {E : Type*} [NormedAddCommGroup E] [InnerProductSpace ℝ E] [FiniteDimensional ℝ E] + [MeasurableSpace E] [BorelSpace E] {H : Type*} [TopologicalSpace H] {I : ModelWithCorners ℝ E H} + {M : Type*} [TopologicalSpace M] [ChartedSpace H M] [MeasurableSpace M] [BorelSpace M] + +namespace BesovAtlas + +variable (A : BesovAtlas I M) + +/-! ### The chart measure -/ + +/-- The **chart measure** of a Besov atlas: `μ_A = ∑_k (κ_k⁻¹)_* (ψ_k ∘ κ_k⁻¹ · vol|_{T_k})`, +`T_k` the target of the extended chart `κ_k`. -/ +noncomputable def chartMeasure : Measure M := + ∑ k, Measure.map (A.ext k).symm ((volume.restrict (A.ext k).target).withDensity + fun y => ENNReal.ofReal (A.psi k ((A.ext k).symm y))) + +/-- **The chart measure of a measurable set**: `μ_A(S) = ∑_k ∫_{S_k} ψ_k(κ_k⁻¹ y) dy`, where +`S_k` is the set of `y ∈ T_k` with `κ_k⁻¹ y ∈ S`. -/ +theorem chartMeasure_apply {S : Set M} (hS : MeasurableSet S) : + A.chartMeasure S = ∑ k, ∫⁻ y in (A.ext k).target ∩ (A.ext k).symm ⁻¹' S, + ENNReal.ofReal (A.psi k ((A.ext k).symm y)) := by + rw [chartMeasure, FunLike.coe_sum, Finset.sum_apply] + refine Finset.sum_congr rfl fun k _ => ?_ + have hT := measurableSet_extend_target I (A.chart k) + have hκ : AEMeasurable (A.ext k).symm ((volume.restrict (A.ext k).target).withDensity + fun y => ENNReal.ofReal (A.psi k ((A.ext k).symm y))) := + (((A.chart k).continuousOn_extend_symm (I := I)).aemeasurable hT).mono_ac + (withDensity_absolutelyContinuous _ _) + rw [Measure.map_apply_of_aemeasurable hκ hS, withDensity_apply' _ _, + Measure.restrict_restrict' hT, inter_comm] + +/-- **The chart measure is finite**: the `k`-th term has total mass at most the volume of the +compact set `κ_k(tsupport ψ_k)`, since `0 ≤ ψ_k ≤ 1` and `M` is compact. -/ +instance isFiniteMeasure_chartMeasure [CompactSpace M] : IsFiniteMeasure A.chartMeasure := by + refine ⟨?_⟩ + rw [A.chartMeasure_apply MeasurableSet.univ] + refine ENNReal.sum_lt_top.2 fun k _ => ?_ + have hT := measurableSet_extend_target I (A.chart k) + have hK : IsCompact (A.ext k '' tsupport (A.psi k)) := + (isClosed_tsupport _).isCompact.image_of_continuousOn ((A.chart k).continuousOn_extend.mono + (by rw [OpenPartialHomeomorph.extend_source]; exact A.tsupport_psi_subset k)) + rw [preimage_univ, inter_univ] + calc ∫⁻ y in (A.ext k).target, ENNReal.ofReal (A.psi k ((A.ext k).symm y)) + ≤ ∫⁻ y in (A.ext k).target, (A.ext k '' tsupport (A.psi k)).indicator 1 y := by + refine setLIntegral_mono' hT fun y hy => ?_ + by_cases h0 : A.psi k ((A.ext k).symm y) = 0 + · rw [h0, ENNReal.ofReal_zero] + exact zero_le + · have hyK : y ∈ A.ext k '' tsupport (A.psi k) := + ⟨_, subset_tsupport _ h0, (A.ext k).right_inv hy⟩ + rw [indicator_of_mem hyK, Pi.one_apply, ← ENNReal.ofReal_one] + exact ENNReal.ofReal_le_ofReal (A.psi_le_one k _) + _ ≤ ∫⁻ y, (A.ext k '' tsupport (A.psi k)).indicator 1 y := setLIntegral_le_lintegral _ _ + _ = volume (A.ext k '' tsupport (A.psi k)) := lintegral_indicator_one hK.measurableSet + _ < ⊤ := hK.measure_lt_top + +/-! ### The density in a chart -/ + +/-- The `k`-th **term of the density** in the chart `e`: `|det DΦ_k(y)| ψ_k(κ⁻¹ y)`, with the +change of charts `Φ_k = κ_k ∘ κ⁻¹` and its derivative within its source. -/ +noncomputable def densityTerm (e : OpenPartialHomeomorph M H) (k : Fin A.n) (y : E) : ℝ := + |(fderivWithin ℝ (I.extendCoordChange e (A.chart k)) + (I.extendCoordChange e (A.chart k)).source y).det| * A.psi k ((e.extend I).symm y) + +/-- The **density of the chart measure** in the chart `e`: +`ρ_e(y) = ∑_k |det DΦ_k(y)| ψ_k(κ⁻¹ y)`. -/ +noncomputable def chartDensity (e : OpenPartialHomeomorph M H) (y : E) : ℝ := + ∑ k, A.densityTerm e k y + +omit [FiniteDimensional ℝ E] [MeasurableSpace E] [BorelSpace E] [MeasurableSpace M] + [BorelSpace M] in +/-- The terms of the density are nonnegative. -/ +theorem densityTerm_nonneg (e : OpenPartialHomeomorph M H) (k : Fin A.n) (y : E) : + 0 ≤ A.densityTerm e k y := + mul_nonneg (abs_nonneg _) (A.nonneg_psi k _) + +omit [FiniteDimensional ℝ E] [MeasurableSpace E] [BorelSpace E] [MeasurableSpace M] + [BorelSpace M] in +/-- The `k`-th term of the density vanishes where `κ⁻¹ y` lies outside the source of `κ_k`, since +`tsupport ψ_k` lies in that source. -/ +theorem densityTerm_eq_zero (e : OpenPartialHomeomorph M H) (k : Fin A.n) {y : E} + (hy : (e.extend I).symm y ∉ (A.chart k).source) : A.densityTerm e k y = 0 := by + rw [densityTerm, image_eq_zero_of_notMem_tsupport fun h => hy (A.tsupport_psi_subset k h), + mul_zero] + +variable [IsManifold I ∞ M] + +omit [FiniteDimensional ℝ E] [MeasurableSpace E] [BorelSpace E] [MeasurableSpace M] + [BorelSpace M] in +/-- The `k`-th term of the density is continuous on the source of the change of charts `Φ_k`: +`Φ_k` is smooth there, so its derivative within the source is continuous +(Mathlib's `ContDiffOn.continuousOn_fderivWithin`). -/ +theorem continuousOn_densityTerm_source {e : OpenPartialHomeomorph M H} (he : e ∈ atlas H M) + (k : Fin A.n) : + ContinuousOn (A.densityTerm e k) (I.extendCoordChange e (A.chart k)).source := by + have hd := (I.contDiffOn_extendCoordChange (n := ∞) (IsManifold.subset_maximalAtlas he) + (IsManifold.subset_maximalAtlas (A.chart_mem k))).continuousOn_fderivWithin + I.uniqueDiffOn_extendCoordChange_source (by simp) + refine (continuous_abs.comp_continuousOn + (ContinuousLinearMap.continuous_det.comp_continuousOn hd)).mul ?_ + exact ((A.contMDiff_psi k).continuous.comp_continuousOn + (e.continuousOn_extend_symm (I := I))).mono fun w hw => ((mem_coordChange_source _ _).1 hw).1 + +omit [FiniteDimensional ℝ E] [MeasurableSpace E] [BorelSpace E] [MeasurableSpace M] + [BorelSpace M] in +/-- **The terms of the density are continuous on the target** of the chart `e`: on the +relatively open source of `Φ_k` by `Manifold.BesovAtlas.continuousOn_densityTerm_source`; near a +point `y` with `κ⁻¹ y` outside the source of `κ_k`, `κ⁻¹ w` stays outside the closed +`tsupport ψ_k`, so the term vanishes near `y`. -/ +theorem continuousOn_densityTerm {e : OpenPartialHomeomorph M H} (he : e ∈ atlas H M) + (k : Fin A.n) : ContinuousOn (A.densityTerm e k) (e.extend I).target := by + intro z hz + have hsymm : ContinuousWithinAt (e.extend I).symm (e.extend I).target z := + e.continuousOn_extend_symm (I := I) z hz + by_cases hzs : (e.extend I).symm z ∈ (A.chart k).source + · have hnhds : (I.extendCoordChange e (A.chart k)).source ∈ 𝓝[(e.extend I).target] z := by + filter_upwards [hsymm.preimage_mem_nhdsWithin ((A.chart k).open_source.mem_nhds hzs), + self_mem_nhdsWithin] with w hw hwt + exact (mem_coordChange_source _ _).2 ⟨hwt, hw⟩ + exact (A.continuousOn_densityTerm_source he k z + ((mem_coordChange_source _ _).2 ⟨hz, hzs⟩)).mono_of_mem_nhdsWithin hnhds + · have hnot : (e.extend I).symm z ∉ tsupport (A.psi k) := fun h => + hzs (A.tsupport_psi_subset k h) + have hev : A.densityTerm e k =ᶠ[𝓝[(e.extend I).target] z] fun _ => 0 := by + filter_upwards [hsymm.preimage_mem_nhdsWithin + ((isClosed_tsupport _).isOpen_compl.mem_nhds hnot)] with w hw + rw [densityTerm, image_eq_zero_of_notMem_tsupport hw, mul_zero] + exact continuousWithinAt_const.congr_of_eventuallyEq hev (hev.eq_of_nhdsWithin hz) + +omit [FiniteDimensional ℝ E] [MeasurableSpace E] [BorelSpace E] [MeasurableSpace M] + [BorelSpace M] in +/-- **The density is positive on the target** of the chart `e`: some `ψ_k(κ⁻¹ y)` is positive, +since the `ψ_k` sum to `1`; then `κ⁻¹ y` lies in the source of `κ_k` and the derivative of the +change of charts `Φ_k` at `y` is invertible (Mathlib's +`ModelWithCorners.isInvertible_fderivWithin_extendCoordChange`), so its determinant is +nonzero. -/ +theorem chartDensity_pos {e : OpenPartialHomeomorph M H} (he : e ∈ atlas H M) {y : E} + (hy : y ∈ (e.extend I).target) : 0 < A.chartDensity e y := by + obtain ⟨k, -, hk⟩ : ∃ k ∈ Finset.univ, (0 : ℝ) < A.psi k ((e.extend I).symm y) := + Finset.exists_lt_of_sum_lt (by rw [Finset.sum_const_zero, A.sum_psi]; exact one_pos) + have hys : (e.extend I).symm y ∈ (A.chart k).source := + A.tsupport_psi_subset k (subset_tsupport _ hk.ne') + obtain ⟨L, hL⟩ := I.isInvertible_fderivWithin_extendCoordChange (n := ∞) (by simp) + (IsManifold.subset_maximalAtlas he) (IsManifold.subset_maximalAtlas (A.chart_mem k)) + ((mem_coordChange_source _ _).2 ⟨hy, hys⟩) + refine Finset.sum_pos' (fun j _ => A.densityTerm_nonneg e j y) ⟨k, Finset.mem_univ _, ?_⟩ + refine mul_pos (abs_pos.2 ?_) hk + rw [← hL] + exact (LinearEquiv.isUnit_det' L.toLinearEquiv).ne_zero + +omit [MeasurableSpace M] [BorelSpace M] in +/-- **The change of variables for one term**: for every chart `e` of the atlas of `M` +(`e ∈ atlas H M`) and a measurable +`B ⊆ E`, `∫_{B ∩ κ(e.source)} |det DΦ_k| ψ_k ∘ κ⁻¹ = ∫_{S_k} ψ_k ∘ κ_k⁻¹`, where `S_k` is the +set of `y ∈ T_k` with `κ_k⁻¹ y ∈ e.source` and `κ(κ_k⁻¹ y) ∈ B`. The integrand on the left +vanishes off the source of `Φ_k` (`Manifold.BesovAtlas.densityTerm_eq_zero`), and `Φ_k` maps +`B ∩ source Φ_k` onto `S_k` (`Manifold.image_coordChange_inter`); Mathlib's +`lintegral_image_eq_lintegral_abs_det_fderiv_mul` with the derivatives within the source. -/ +theorem setLIntegral_densityTerm {e : OpenPartialHomeomorph M H} (he : e ∈ atlas H M) + (k : Fin A.n) {B : Set E} (hB : MeasurableSet B) : + ∫⁻ z in B ∩ (e.extend I).target, ENNReal.ofReal (A.densityTerm e k z) = + ∫⁻ y in (A.ext k).target ∩ (A.ext k).symm ⁻¹' (e.source ∩ e.extend I ⁻¹' B), + ENNReal.ofReal (A.psi k ((A.ext k).symm y)) := by + set Φ := I.extendCoordChange e (A.chart k) + have hΦm : MeasurableSet Φ.source := measurableSet_coordChange_source e (A.chart k) + have hT := measurableSet_extend_target I e + have hsub : Φ.source ⊆ (e.extend I).target := fun z hz => ((mem_coordChange_source _ _).1 hz).1 + have hd := (I.contDiffOn_extendCoordChange (n := ∞) (IsManifold.subset_maximalAtlas he) + (IsManifold.subset_maximalAtlas (A.chart_mem k))).differentiableOn (by simp) + have hset : Φ.source ∩ (B ∩ (e.extend I).target) = B ∩ Φ.source := by + ext z + exact ⟨fun h => ⟨h.2.1, h.1⟩, fun h => ⟨h.2, h.1, hsub h.2⟩⟩ + rw [← image_coordChange_inter, lintegral_image_eq_lintegral_abs_det_fderiv_mul volume + (hB.inter hΦm) (fun z hz => (hd z hz.2).hasFDerivWithinAt.mono inter_subset_right) + (Φ.injOn.mono inter_subset_right)] + calc ∫⁻ z in B ∩ (e.extend I).target, ENNReal.ofReal (A.densityTerm e k z) + = ∫⁻ z in B ∩ (e.extend I).target, + Φ.source.indicator (fun z => ENNReal.ofReal (A.densityTerm e k z)) z := by + refine setLIntegral_congr_fun (hB.inter hT) fun z hz => ?_ + by_cases hzΦ : z ∈ Φ.source + · rw [indicator_of_mem hzΦ] + · rw [indicator_of_notMem hzΦ, A.densityTerm_eq_zero e k + fun h => hzΦ ((mem_coordChange_source _ _).2 ⟨hz.2, h⟩), ENNReal.ofReal_zero] + _ = ∫⁻ z in B ∩ Φ.source, ENNReal.ofReal (A.densityTerm e k z) := by + rw [lintegral_indicator hΦm, Measure.restrict_restrict hΦm, hset] + _ = _ := by + refine setLIntegral_congr_fun (hB.inter hΦm) fun z hz => ?_ + obtain ⟨-, hzs⟩ := (mem_coordChange_source _ _).1 hz.2 + have hzs' : (e.extend I).symm z ∈ (A.ext k).source := by + rwa [OpenPartialHomeomorph.extend_source] + rw [densityTerm, ENNReal.ofReal_mul (abs_nonneg _), coordChange_apply, + (A.ext k).left_inv hzs'] + +/-- **The chart measure in a chart**: for every chart `e` of the atlas of `M` (`e ∈ atlas H M`), +with extended chart `κ`, +`κ_* (μ_A|_{e.source}) = ρ_e · vol|_{κ(e.source)}` with the density `ρ_e` of +`Manifold.BesovAtlas.chartDensity`. Both sides are compared on a measurable `B`: the left side is +`μ_A(e.source ∩ κ⁻¹(B))` (`Manifold.BesovAtlas.chartMeasure_apply`), the right side the sum over +`k` of the integrals of the terms (`Manifold.BesovAtlas.setLIntegral_densityTerm`). -/ +theorem map_extend_chartMeasure {e : OpenPartialHomeomorph M H} (he : e ∈ atlas H M) : + Measure.map (e.extend I) (A.chartMeasure.restrict e.source) = + (volume.restrict (e.extend I).target).withDensity + fun y => ENNReal.ofReal (A.chartDensity e y) := by + have hsrc : MeasurableSet e.source := e.open_source.measurableSet + have hT := measurableSet_extend_target I e + have hκ := aemeasurable_extend_restrict I e A.chartMeasure + ext B hB + have hS := measurableSet_source_inter_extend_preimage I e hB + have hsum : ∀ y, ENNReal.ofReal (A.chartDensity e y) = + ∑ k, ENNReal.ofReal (A.densityTerm e k y) := fun y => + ENNReal.ofReal_sum_of_nonneg fun k _ => A.densityTerm_nonneg e k y + rw [Measure.map_apply_of_aemeasurable hκ hB, Measure.restrict_apply' hsrc, inter_comm, + A.chartMeasure_apply hS, withDensity_apply _ hB, Measure.restrict_restrict hB] + simp_rw [hsum] + rw [lintegral_finsetSum' (f := fun k z => ENNReal.ofReal (A.densityTerm e k z)) _ + fun k _ => ENNReal.measurable_ofReal.comp_aemeasurable + (((A.continuousOn_densityTerm he k).aemeasurable hT).mono_set inter_subset_right)] + exact Finset.sum_congr rfl fun k _ => (A.setLIntegral_densityTerm he k hB).symm + +/-- **The chart measure is smooth**: in every chart `e` of the atlas of `M` (`e ∈ atlas H M`) its +image has the density +`ρ_e = ∑_k |det DΦ_k| ψ_k ∘ κ⁻¹` (`Manifold.BesovAtlas.map_extend_chartMeasure`), continuous +(`Manifold.BesovAtlas.continuousOn_densityTerm`) and positive +(`Manifold.BesovAtlas.chartDensity_pos`) on the target. This holds for every model `I`, with or +without boundary. -/ +instance isSmoothMeasure_chartMeasure : IsSmoothMeasure I A.chartMeasure where + exists_density e he := ⟨fun y => ENNReal.ofReal (A.chartDensity e y), + ENNReal.continuous_ofReal.comp_continuousOn + (continuousOn_finsetSum _ fun k _ => A.continuousOn_densityTerm he k), + fun _ hy => ⟨ENNReal.ofReal_pos.2 (A.chartDensity_pos he hy), ENNReal.ofReal_lt_top⟩, + A.map_extend_chartMeasure he⟩ + +end BesovAtlas + +/-! ### Existence -/ + +/-- **Smooth measures exist**: every compact Hausdorff smooth manifold, with or without boundary, +carries a finite smooth measure (a continuous positive density in every chart), the chart +measure of a Besov atlas +(`Manifold.BesovAtlas.nonempty`, `Manifold.BesovAtlas.isSmoothMeasure_chartMeasure`, +`Manifold.BesovAtlas.isFiniteMeasure_chartMeasure`). -/ +theorem exists_isSmoothMeasure [CompactSpace M] [T2Space M] [IsManifold I ∞ M] : + ∃ μ : Measure M, IsSmoothMeasure I μ ∧ IsFiniteMeasure μ := by + obtain ⟨A⟩ := BesovAtlas.nonempty I M + exact ⟨A.chartMeasure, inferInstance, inferInstance⟩ + +/-- **The sphere carries a smooth measure**: the unit sphere `S^n ⊆ ℝ^(n+1)`, with Mathlib's +stereographic charts modelled on `ℝ^n`, is a compact manifold without boundary, and it carries a +finite smooth measure, the chart measure of a Besov atlas (`Manifold.exists_isSmoothMeasure`). -/ +theorem exists_isSmoothMeasure_sphere (n : ℕ) : + ∃ μ : Measure (sphere (0 : EuclideanSpace ℝ (Fin (n + 1))) 1), + IsSmoothMeasure (𝓡 n) μ ∧ IsFiniteMeasure μ := + exists_isSmoothMeasure + +end Manifold diff --git a/LeanPool/FunctionSpaces/Domains/Sobolev/LipschitzDomainGreen.lean b/LeanPool/FunctionSpaces/Domains/Sobolev/LipschitzDomainGreen.lean new file mode 100644 index 0000000000..9bef6da92d --- /dev/null +++ b/LeanPool/FunctionSpaces/Domains/Sobolev/LipschitzDomainGreen.lean @@ -0,0 +1,917 @@ +/- +Copyright (c) 2026 Mario Ullrich. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Mario Ullrich +-/ +module + +public import LeanPool.FunctionSpaces.Domains.Sobolev.LipschitzGraphGreen +public import LeanPool.FunctionSpaces.Rd.Sobolev.WeakDerivativeLeibniz + +/- +Modified for Lean Pool: module names and imports adapted. +-/ + +/-! +# Green's formula on bounded Lipschitz domains + +Let `Ω` be a bounded Lipschitz domain with boundary `Γ` in a finite-dimensional real inner product +space `V`, such as `ℝ^d`, with the boundary balls `B_j`, the Lipschitz graph domains `Ω_j` over the +hyperplanes `H_j`, the graph maps `γ_j`, the traces `Tr_j`, the normal weights +`n^j_v = ⟪∇φ_j, v⟫ - ⟪v, e_j⟫`, the surface measure `σ` and the outward unit normal `ν`. + +* **Integration by parts in `H^1(V)`**: `∫_V (∂_v U) W + U ∂_v W = 0` for `U, W ∈ H^1(V)` + (`Rd.integral_weakDeriv_mul_add_eq_zero`), by density of the Schwartz functions, and likewise + for `f, g ∈ W^1_2(V)` (`Rd.integral_mul_add_eq_zero_of_hasWeakLineDeriv`). +* **Green's formula in chart form** (`Rd.BoundedLipschitzDomain.setIntegral_green_of_nhds`): for a + resolution of unity `ψ` equal to one near `Γ` + (`Rd.BoundedLipschitzDomain.exists_boundaryPartition_nhds`), + `∫_Ω (∂_v U) W + U ∂_v W = ∑_j ∫_{H_j} ψ_j(γ_j x') Tr_j U Tr_j W n^j_v dx'`. The pieces `ψ_j W` + give Green's formula on the graph domains, and the interior piece `χ W` with the smooth + `χ = 1_Ω (1 - ∑_j ψ_j)` of compact support in `Ω` + (`Rd.BoundedLipschitzDomain.exists_interior_cutoff`) integrates to zero. +* **The unit normal** (`Rd.BoundedLipschitzDomain.normal_ae_eq_normalAt`): on every ball `B_j`, + `ν = ν_j ∘ P_j` `σ`-almost everywhere, so `‖ν‖ = 1` and `ν` points out of `Ω` almost everywhere + (`Rd.BoundedLipschitzDomain.norm_normal_ae`, `Rd.BoundedLipschitzDomain.inner_normal_neg_ae`). + Gauss–Green for `C^1` functions in two charts gives the same boundary integrals, and test + functions on `H_j` are restrictions of test functions on `V` + (`Rd.LipschitzGraph.exists_contDiff_comp_graphMap_eq`). +* **Green's formula** (`Rd.BoundedLipschitzDomain.setIntegral_green_surface`, + `Rd.BoundedLipschitzDomain.setIntegral_green_sobolevOne`): + `∫_Ω (∂_v u) w + u ∂_v w = ∫_Γ γ u · γ w ⟪v, ν⟫ dσ` for `u, w ∈ H^1(Ω)`, also with weak + derivatives on `Ω` + (`Rd.BoundedLipschitzDomain.setIntegral_green_sobolevOne_of_hasWeakLineDeriv`), and in chart + form for every resolution of unity (`Rd.BoundedLipschitzDomain.setIntegral_green`). +* **The zero extension** (`Rd.BoundedLipschitzDomain.memSobolev_indicatorLp_iff_mem_traceKer`): for + `u ∈ H^1(Ω)`, `1_Ω u ∈ W^1_2(V)` iff the trace of `u` vanishes, and then + `∂_v (1_Ω u) = 1_Ω ∂_v u`. One direction is Green's formula without boundary term, the other + compares the traces from both sides of each graph, with the lower graph domain + `{x : ⟪x, e⟫ < φ(x)}` (`Rd.LipschitzGraph.lower`). +-/ + +@[expose] public section + +open MeasureTheory Module Metric Filter Topology Set +open scoped ENNReal NNReal SchwartzMap BesselPotentialSpace LineDeriv + +namespace Rd + +variable {V : Type*} [NormedAddCommGroup V] [InnerProductSpace ℝ V] [FiniteDimensional ℝ V] + [MeasurableSpace V] [BorelSpace V] + +/-! ### Integration by parts in `H^1(V)` -/ + +/-- **The weak derivatives of `H^1(V)` are local**: if the `L_2` function of `U ∈ H^1(V)` +vanishes almost everywhere on an open set `O`, so does its weak derivative `∂_v U` +(`Rd.HasWeakLineDeriv.ae_eq_zero_of_ae_eq_zero`). -/ +theorem weakDerivL2_ae_eq_zero_of_ae_eq_zero {O : Set V} (hO : IsOpen O) (v : V) + {U : H^{1}(V)} (hU : (toL2 U : V → ℂ) =ᵐ[volume.restrict O] 0) : + (weakDerivL2 v U : V → ℂ) =ᵐ[volume.restrict O] 0 := + (hasWeakLineDeriv_weakDerivL2 v U).ae_eq_zero_of_ae_eq_zero (O := ⟨O, hO⟩) le_top hU + +/-- **Weak derivatives of functions that agree on an open set agree there**: if the `L_2` +functions of `U, W ∈ H^1(V)` agree almost everywhere on an open set `O`, so do `∂_v U` and +`∂_v W` (`Rd.weakDerivL2_ae_eq_zero_of_ae_eq_zero` for `U - W`). -/ +theorem weakDerivL2_ae_eq_of_ae_eq {O : Set V} (hO : IsOpen O) (v : V) {U W : H^{1}(V)} + (h : (toL2 U : V → ℂ) =ᵐ[volume.restrict O] toL2 W) : + (weakDerivL2 v U : V → ℂ) =ᵐ[volume.restrict O] weakDerivL2 v W := by + have h0 := weakDerivL2_ae_eq_zero_of_ae_eq_zero hO v (U := U - W) (by + filter_upwards [h, ae_restrict_of_ae (Lp.coeFn_sub (toL2 U) (toL2 W))] with x hx hs + rw [map_sub, hs, Pi.sub_apply, hx, sub_self, Pi.zero_apply]) + filter_upwards [h0, ae_restrict_of_ae (Lp.coeFn_sub (weakDerivL2 v U) (weakDerivL2 v W))] + with x hx hs + rw [map_sub, hs, Pi.sub_apply, Pi.zero_apply, sub_eq_zero] at hx + exact hx + +/-- The integrand `(∂_v U) W + U ∂_v W` of Green's formula is integrable for `U, W ∈ H^1(V)`, a +sum of products of `L_2` functions. -/ +theorem integrable_weakDeriv_mul_add (v : V) (U W : H^{1}(V)) : + Integrable fun x => weakDerivL2 v U x * toL2 W x + toL2 U x * weakDerivL2 v W x := + ((Lp.memLp _).integrable_mul (Lp.memLp _)).add ((Lp.memLp _).integrable_mul (Lp.memLp _)) + +/-- **Green's integrand is linear in the second function**: for a measurable set `s` and a finite +family `W_i ∈ H^1(V)`, `∫_s (∂_v U) ∑_i W_i + U ∂_v ∑_i W_i` is the sum of the integrals +(`Rd.setIntegral_weakDeriv_mul_add_eq`). -/ +theorem setIntegral_weakDeriv_mul_add_sum {s : Set V} (hs : MeasurableSet s) (v : V) + (U : H^{1}(V)) {ι : Type*} (t : Finset ι) (W : ι → H^{1}(V)) : + ∫ x in s, weakDerivL2 v U x * toL2 (∑ i ∈ t, W i) x + + toL2 U x * weakDerivL2 v (∑ i ∈ t, W i) x = + ∑ i ∈ t, ∫ x in s, weakDerivL2 v U x * toL2 (W i) x + toL2 U x * weakDerivL2 v (W i) x := by + rw [setIntegral_weakDeriv_mul_add_eq hs] + simp only [setIntegral_weakDeriv_mul_add_eq hs, map_sum, Finset.sum_add_distrib] + +/-- **Green's integrand is additive in the second function**: for a measurable set `s`, +`∫_s (∂_v U)(W₁ + W₂) + U ∂_v (W₁ + W₂)` is the sum of the two integrals +(`Rd.setIntegral_weakDeriv_mul_add_eq`). -/ +theorem setIntegral_weakDeriv_mul_add_add {s : Set V} (hs : MeasurableSet s) (v : V) + (U W₁ W₂ : H^{1}(V)) : + ∫ x in s, weakDerivL2 v U x * toL2 (W₁ + W₂) x + toL2 U x * weakDerivL2 v (W₁ + W₂) x = + (∫ x in s, weakDerivL2 v U x * toL2 W₁ x + toL2 U x * weakDerivL2 v W₁ x) + + ∫ x in s, weakDerivL2 v U x * toL2 W₂ x + toL2 U x * weakDerivL2 v W₂ x := by + rw [setIntegral_weakDeriv_mul_add_eq hs, setIntegral_weakDeriv_mul_add_eq hs, + setIntegral_weakDeriv_mul_add_eq hs, map_add, map_add, map_add, map_add] + ring + +/-- The left side of Green's formula on `V`, `(U, W) ↦ ∫ (∂_v U) W + U ∂_v W`, is continuous on +`H^1(V) × H^1(V)` (`Rd.continuous_setIntegral_weakDeriv_mul_add` on `s = V`). -/ +theorem continuous_integral_weakDeriv_mul_add (v : V) : Continuous fun p : H^{1}(V) × H^{1}(V) => + ∫ x, weakDerivL2 v p.1 x * toL2 p.2 x + toL2 p.1 x * weakDerivL2 v p.2 x := by + simpa only [Measure.restrict_univ] using + continuous_setIntegral_weakDeriv_mul_add (V := V) MeasurableSet.univ v + +/-- **Integration by parts for Schwartz functions**: `∫ (∂_v w₁) w₂ + w₁ ∂_v w₂ = 0` for Schwartz +functions `w₁, w₂` (Mathlib's `SchwartzMap.integral_mul_lineDerivOp_right_eq_neg_left`). -/ +theorem integral_lineDerivOp_mul_add_eq_zero (v : V) (w₁ w₂ : 𝓢(V, ℂ)) : + ∫ x, (∂_{v} w₁) x * w₂ x + w₁ x * (∂_{v} w₂) x = 0 := by + have i1 : Integrable fun x => (∂_{v} w₁) x * w₂ x := + ((∂_{v} w₁).memLp 2 volume).integrable_mul (w₂.memLp 2 volume) + have i2 : Integrable fun x => w₁ x * (∂_{v} w₂) x := + (w₁.memLp 2 volume).integrable_mul ((∂_{v} w₂).memLp 2 volume) + rw [integral_add i1 i2, SchwartzMap.integral_mul_lineDerivOp_right_eq_neg_left w₁ w₂ v, + add_neg_cancel] + +/-- **Integration by parts in `H^1(V)`**: for `U, W ∈ H^1(V)` and every direction `v`, +`∫ (∂_v U) W + U ∂_v W = 0`. Both sides are continuous on `H^1(V) × H^1(V)` +(`Rd.continuous_integral_weakDeriv_mul_add`) and the identity holds for Schwartz functions +(`Rd.integral_lineDerivOp_mul_add_eq_zero`), which are dense (`Rd.denseRange_ofSchwartz`). -/ +theorem integral_weakDeriv_mul_add_eq_zero (v : V) (U W : H^{1}(V)) : + ∫ x, weakDerivL2 v U x * toL2 W x + toL2 U x * weakDerivL2 v W x = 0 := by + refine (denseRange_ofSchwartz (V := V) 1).induction_on₂ + (p := fun U W : H^{1}(V) => + ∫ x, weakDerivL2 v U x * toL2 W x + toL2 U x * weakDerivL2 v W x = 0) + (isClosed_eq (continuous_integral_weakDeriv_mul_add v) continuous_const) (fun w₁ w₂ => ?_) U W + rw [← integral_lineDerivOp_mul_add_eq_zero v w₁ w₂] + refine integral_congr_ae ?_ + rw [weakDerivL2_ofSchwartz, weakDerivL2_ofSchwartz, toL2_ofSchwartz, toL2_ofSchwartz] + filter_upwards [(∂_{v} w₁).coeFn_toLp 2 volume, (∂_{v} w₂).coeFn_toLp 2 volume, + w₁.coeFn_toLp 2 volume, w₂.coeFn_toLp 2 volume] with x h1 h2 h3 h4 + rw [h1, h2, h3, h4] + +/-- **Integration by parts for `W^1_2(V)` functions**: for `f, g ∈ L_2(V)` with +`f, g ∈ W^1_2(V)`, every direction `v` and the weak derivatives `f_v = ∂_v f`, `g_v = ∂_v g` in +`L_2(V)`, `∫ f_v g + f g_v = 0`. Here `f = ι U`, `g = ι W` for `U, W ∈ H^1(V)` +(`Rd.exists_toL2_eq_of_memSobolev`), so this is `Rd.integral_weakDeriv_mul_add_eq_zero`. -/ +theorem integral_mul_add_eq_zero_of_hasWeakLineDeriv (f g : Lp ℂ 2 (volume : Measure V)) + (hf : MemSobolev 1 f) (hg : MemSobolev 1 g) (v : V) {fv gv : Lp ℂ 2 (volume : Measure V)} + (hfv : HasWeakLineDeriv ⊤ (fun _ : Fin 1 => v) f fv) + (hgv : HasWeakLineDeriv ⊤ (fun _ : Fin 1 => v) g gv) : + ∫ x, fv x * g x + f x * gv x = 0 := by + obtain ⟨U, rfl⟩ := exists_toL2_eq_of_memSobolev hf + obtain ⟨W, rfl⟩ := exists_toL2_eq_of_memSobolev hg + rw [← weakDerivL2_eq hfv, ← weakDerivL2_eq hgv] + exact integral_weakDeriv_mul_add_eq_zero v U W + +/-! ### Localisation -/ + +/-- **Sets that agree inside `B`**: if `s ∩ B = t ∩ B` and `F` vanishes almost everywhere outside +`B`, then `∫_s F = ∫_t F`. -/ +theorem setIntegral_eq_of_inter_eq {α E : Type*} [MeasurableSpace α] {μ : Measure α} + [NormedAddCommGroup E] [NormedSpace ℝ E] {s t B : Set α} (hs : MeasurableSet s) + (ht : MeasurableSet t) (h : s ∩ B = t ∩ B) {F : α → E} (hF : ∀ᵐ x ∂μ, x ∉ B → F x = 0) : + ∫ x in s, F x ∂μ = ∫ x in t, F x ∂μ := by + rw [← integral_indicator hs, ← integral_indicator ht] + refine integral_congr_ae ?_ + filter_upwards [hF] with x hx + by_cases hB : x ∈ B + · have hst : x ∈ s ↔ x ∈ t := by simpa [hB] using Set.ext_iff.1 h x + by_cases hxs : x ∈ s + · rw [indicator_of_mem hxs, indicator_of_mem (hst.1 hxs)] + · rw [indicator_of_notMem hxs, indicator_of_notMem (fun h' => hxs (hst.2 h'))] + · rw [indicator_apply_eq_zero.2 fun _ => hx hB, indicator_apply_eq_zero.2 fun _ => hx hB] + +/-- **Testing a zero extension**: for a measurable `s ⊆ V`, `F ∈ L_p(V)`, a real function `φ` and +a function `h` equal to `φ` almost everywhere, `∫_V φ · 1_s F = ∫_s F h`. -/ +theorem integral_smul_indicatorLp_eq_setIntegral_mul {p : ℝ≥0∞} [Fact (1 ≤ p)] {s : Set V} + (hs : MeasurableSet s) + (F : Lp ℂ p (volume : Measure V)) {φ : V → ℝ} {h : V → ℂ} + (hh : h =ᵐ[volume] fun x => (φ x : ℂ)) : + ∫ x, φ x • (indicatorLp hs F : V → ℂ) x = ∫ x in s, F x * h x := by + rw [← integral_indicator hs] + refine integral_congr_ae ?_ + filter_upwards [indicatorLp_apply_ae hs F, hh] with x h1 h2 + rw [h1] + by_cases hx : x ∈ s + · rw [indicator_of_mem hx, indicator_of_mem hx, h2, Complex.real_smul] + ring + · rw [indicator_of_notMem hx, indicator_of_notMem hx, smul_zero] + +/-- **Smooth multipliers keep `H^1(V)`**: for a smooth real `χ` with compact support and +`W ∈ H^1(V)` there is `W' ∈ H^1(V)` whose `L_2` function is `χ ι W` (`Rd.MemSobolev.mulLp`). -/ +theorem exists_toL2_eq_mulLp {χ : V → ℝ} (hχ : ContDiff ℝ ((⊤ : ℕ∞) : WithTop ℕ∞) χ) + (hcs : HasCompactSupport χ) {C : ℝ} (hc : Continuous fun x => (χ x : ℂ)) + (hC : ∀ x, ‖(χ x : ℂ)‖ ≤ C) (W : H^{1}(V)) : + ∃ W' : H^{1}(V), toL2 W' = mulLp hc hC (toL2 W) := + exists_toL2_eq_of_memSobolev ((memSobolev_toL2 W).mulLp hχ hcs hc hC) + +/-- **Green's integrand of a product vanishes outside the multiplier**: if the `L_2` function of +`W' ∈ H^1(V)` is `χ ι W` for a continuous bounded `χ`, then `(∂_v U) W' + U ∂_v W' = 0` almost +everywhere outside the closed support of `χ` (`Rd.weakDerivL2_ae_eq_zero_of_ae_eq_zero`). -/ +theorem ae_weakDeriv_mul_add_eq_zero_of_mulLp {χ : V → ℝ} {C : ℝ} + (hc : Continuous fun x => (χ x : ℂ)) (hC : ∀ x, ‖(χ x : ℂ)‖ ≤ C) {W W' : H^{1}(V)} + (hW' : toL2 W' = mulLp hc hC (toL2 W)) (v : V) (U : H^{1}(V)) : + ∀ᵐ x ∂volume, x ∉ tsupport χ → + weakDerivL2 v U x * toL2 W' x + toL2 U x * weakDerivL2 v W' x = 0 := by + have hO : IsOpen (tsupport χ)ᶜ := (isClosed_tsupport χ).isOpen_compl + have h0 : (toL2 W' : V → ℂ) =ᵐ[volume.restrict (tsupport χ)ᶜ] 0 := by + rw [hW'] + filter_upwards [ae_restrict_of_ae (mulLp_apply_ae hc hC (toL2 W)), + ae_restrict_mem hO.measurableSet] with x hx hxO + rw [hx, image_eq_zero_of_notMem_tsupport hxO, Complex.ofReal_zero, zero_mul, Pi.zero_apply] + have h1 := weakDerivL2_ae_eq_zero_of_ae_eq_zero hO v h0 + rw [EventuallyEq, ae_restrict_iff' hO.measurableSet] at h0 h1 + filter_upwards [h0, h1] with x hx0 hx1 hx + rw [hx0 hx, hx1 hx] + simp only [Pi.zero_apply, mul_zero, add_zero] + +omit [FiniteDimensional ℝ V] [MeasurableSpace V] [BorelSpace V] in +/-- **Line derivatives vanish outside the closed support**: `∂_v g(x) = 0` for `x ∉ tsupport g`, +since `g` vanishes on a neighbourhood of `x`. -/ +theorem lineDeriv_eq_zero_of_notMem_tsupport {g : V → ℂ} {x : V} (hx : x ∉ tsupport g) (v : V) : + lineDeriv ℝ g x v = 0 := by + rw [((notMem_tsupport_iff_eventuallyEq).1 hx).lineDeriv_eq] + simp [lineDeriv] + +namespace LipschitzGraph + +variable (Ω : LipschitzGraph V) + +/-! ### Test functions on the hyperplane as restrictions -/ + +omit [MeasurableSpace V] [BorelSpace V] in +/-- **Test functions on the hyperplane are restrictions to the graph**: for an open `W ⊆ V` and a +smooth `φ : H → ℝ` with compact support in `γ⁻¹(W)` there is a smooth `g : V → ℝ` with compact +support in `W` and `g ∘ γ = φ`, namely `g(x) = φ(Px) χ(x)` for a smooth `χ` with support in the +bounded open set `W ∩ {dist(·, γ(supp φ)) < 1}` equal to `1` near the compact set `γ(supp φ)` +(`Rd.exists_smooth_partition_nhds`). -/ +theorem exists_contDiff_comp_graphMap_eq {W : Set V} (hW : IsOpen W) {φ : Ω.hyperplane → ℝ} + (hφ : ContDiff ℝ ((⊤ : ℕ∞) : WithTop ℕ∞) φ) (hφc : HasCompactSupport φ) + (hφW : tsupport φ ⊆ Ω.graphMap ⁻¹' W) : + ∃ g : V → ℝ, ContDiff ℝ ((⊤ : ℕ∞) : WithTop ℕ∞) g ∧ HasCompactSupport g ∧ + tsupport g ⊆ W ∧ ∀ x', g (Ω.graphMap x') = φ x' := by + have hK : IsCompact (Ω.graphMap '' tsupport φ) := hφc.isCompact.image Ω.continuous_graphMap + obtain ⟨χ, hχ, hχW, hχ1, -, -⟩ := exists_smooth_partition_nhds (ι := Unit) hK + (fun _ => W ∩ thickening 1 (Ω.graphMap '' tsupport φ)) (fun _ => hW.inter isOpen_thickening) + (by + rintro _ ⟨x', hx', rfl⟩ + exact mem_iUnion.2 ⟨(), hφW hx', self_subset_thickening one_pos _ ⟨x', hx', rfl⟩⟩) + have hχc : HasCompactSupport (χ ()) := + isCompact_of_isClosed_isBounded (isClosed_tsupport _) + (hK.isBounded.thickening.subset ((hχW ()).trans inter_subset_right)) + refine ⟨fun x => φ (Ω.proj x) * χ () x, (hφ.comp Ω.proj.contDiff).mul (hχ ()), + hχc.mul_left, tsupport_mul_subset_right.trans ((hχW ()).trans inter_subset_left), + fun x' => ?_⟩ + simp only [Ω.proj_graphMap] + by_cases hx : x' ∈ tsupport φ + · have h1 := hχ1.self_of_nhdsSet _ ⟨x', hx, rfl⟩ + rw [Fintype.sum_unique] at h1 + rw [show (default : Unit) = () from rfl] at h1 + rw [h1, mul_one] + · rw [image_eq_zero_of_notMem_tsupport hx, zero_mul] + +/-! ### The graph domain below the graph -/ + +/-- **The lower graph domain** `{x : ⟪x, e⟫ < φ(x)}` below the graph of `φ`, as a Lipschitz graph +domain with the direction `-e` and the function `-φ`; it has the same graph +(`Rd.LipschitzGraph.lower_graphMap_proj_graphMap`) and lies in the complement of `Ω` +(`Rd.LipschitzGraph.notMem_domain_of_mem_lower_domain`). -/ +def lower : LipschitzGraph V where + e := -Ω.e + norm_e := by rw [norm_neg, Ω.norm_e] + M := Ω.M + M_nonneg := Ω.M_nonneg + phi x := -Ω.phi x + lipschitz x y := by + rw [show -Ω.phi x - -Ω.phi y = Ω.phi y - Ω.phi x by ring, norm_sub_rev] + exact Ω.lipschitz y x + const x t := by rw [smul_neg, ← neg_smul, Ω.const] + +omit [FiniteDimensional ℝ V] [MeasurableSpace V] [BorelSpace V] in +/-- The lower graph domain is `{x : ⟪x, e⟫ < φ(x)}`. -/ +theorem mem_lower_domain_iff (x : V) : x ∈ Ω.lower.domain ↔ inner ℝ x Ω.e < Ω.phi x := by + change -Ω.phi x < inner ℝ x (-Ω.e) ↔ _ + rw [inner_neg_right, neg_lt_neg_iff] + +omit [FiniteDimensional ℝ V] [MeasurableSpace V] [BorelSpace V] in +/-- The lower graph domain lies in the complement of `Ω`. -/ +theorem notMem_domain_of_mem_lower_domain {x : V} (hx : x ∈ Ω.lower.domain) : + x ∉ Ω.domain := fun h => lt_asymm h ((Ω.mem_lower_domain_iff x).1 hx) + +omit [FiniteDimensional ℝ V] [MeasurableSpace V] [BorelSpace V] in +/-- **The two domains have the same graph**: every point `γ(x')` of the graph of `Ω` is the point +`γ_-(P_- γ(x'))` of the graph of the lower domain. -/ +theorem lower_graphMap_proj_graphMap (x' : Ω.hyperplane) : + Ω.lower.graphMap (Ω.lower.proj (Ω.graphMap x')) = Ω.graphMap x' := by + rw [Ω.lower.graphMap_proj_eq_iff] + change inner ℝ (Ω.graphMap x') (-Ω.e) = -Ω.phi (Ω.graphMap x') + rw [inner_neg_right, Ω.inner_graphMap, Ω.phi_graphMap] + +/-- **The traces from above and from below agree**: for `U ∈ H^1(V)`, the trace of `U` on the +graph from `Ω` and from the lower domain agree, `Tr U(x') = Tr_- U(P_- γ(x'))` for almost every +`x' ∈ H` (`Rd.LipschitzGraph.trace_ae_eq_trace_comp`). -/ +theorem traceH1_ae_eq_traceH1_lower (U : H^{1}(V)) : + ∀ᵐ x' ∂(volume : Measure Ω.hyperplane), + Ω.traceH1 U x' = Ω.lower.traceH1 U (Ω.lower.proj (Ω.graphMap x')) := by + filter_upwards [Ω.trace_ae_eq_trace_comp Ω.lower two_ne_top one_le_two (s := 1 / 2) + (by norm_num) (by norm_num) one_le_two (modNorm_toL2_lt_top U)] with x' hx' + exact hx' (Ω.lower_graphMap_proj_graphMap x') + +/-- **Functions vanishing below the graph have zero trace**: if `U ∈ H^1(V)` vanishes almost +everywhere on the part of the lower domain inside an open set `O`, then `Tr U(x') = 0` for almost +every `x'` with `γ(x') ∈ O`: the trace from below vanishes there +(`Rd.LipschitzGraph.trace_ae_eq_zero_of_ae_eq_zero`) and equals the trace from above +(`Rd.LipschitzGraph.traceH1_ae_eq_traceH1_lower`, with the null sets carried over by +`Rd.LipschitzGraph.ae_proj_graphMap`). -/ +theorem traceH1_ae_eq_zero_of_lower {U : H^{1}(V)} {O : Set V} (hO : IsOpen O) + (hU : ∀ᵐ x ∂(volume : Measure V), x ∈ Ω.lower.domain → x ∈ O → toL2 U x = 0) : + ∀ᵐ x' ∂(volume : Measure Ω.hyperplane), Ω.graphMap x' ∈ O → Ω.traceH1 U x' = 0 := by + have h0 := Ω.lower.trace_ae_eq_zero_of_ae_eq_zero two_ne_top 2 (s := 1 / 2) (by norm_num) + one_le_two (Ω.lower.intrinsicNorm_toL2_lt_top U) hO hU + filter_upwards [Ω.traceH1_ae_eq_traceH1_lower U, Ω.ae_proj_graphMap Ω.lower h0] with x' h1 h2 hx' + rw [h1] + exact h2 (Ω.lower_graphMap_proj_graphMap x') (by rw [Ω.lower_graphMap_proj_graphMap]; exact hx') + +end LipschitzGraph + +namespace BoundedLipschitzDomain + +variable (Ω : BoundedLipschitzDomain V) + +/-! ### The interior cut-off -/ + +variable {Ω} + +omit [FiniteDimensional ℝ V] [MeasurableSpace V] [BorelSpace V] in +/-- **The interior remainder vanishes near the complement**: if `∑_j ψ_j = 1` on a neighbourhood +of `Γ`, the function `1_Ω (1 - ∑_j ψ_j)` vanishes on a neighbourhood of every point outside `Ω`. -/ +theorem indicator_one_sub_sum_eventuallyEq_zero (ψ : Ω.BoundaryPartition) + (hψ : ∀ᶠ y in 𝓝ˢ (frontier Ω.carrier), ∑ j, ψ.toFun j y = 1) {x : V} (hx : x ∉ Ω.carrier) : + Ω.carrier.indicator (fun y => 1 - ∑ j, ψ.toFun j y) =ᶠ[𝓝 x] 0 := by + by_cases hc : x ∈ closure Ω.carrier + · have hf : x ∈ frontier Ω.carrier := ⟨hc, by rwa [Ω.isOpen.interior_eq]⟩ + filter_upwards [hψ.filter_mono (nhds_le_nhdsSet hf)] with y hy + by_cases hyΩ : y ∈ Ω.carrier + · rw [indicator_of_mem hyΩ, hy, sub_self, Pi.zero_apply] + · rw [indicator_of_notMem hyΩ, Pi.zero_apply] + · filter_upwards [isClosed_closure.isOpen_compl.mem_nhds hc] with y hy + rw [indicator_of_notMem (fun h => hy (subset_closure h)), Pi.zero_apply] + +omit [MeasurableSpace V] [BorelSpace V] in +/-- **The interior cut-off**: if `∑_j ψ_j = 1` on a neighbourhood of `Γ`, there is a smooth real +`χ` with compact support in `Ω` and `χ + ∑_j ψ_j = 1` on `Ω`, namely `χ = 1_Ω (1 - ∑_j ψ_j)`, +smooth because it vanishes near every point outside `Ω` +(`Rd.BoundedLipschitzDomain.indicator_one_sub_sum_eventuallyEq_zero`). -/ +theorem exists_interior_cutoff (ψ : Ω.BoundaryPartition) + (hψ : ∀ᶠ y in 𝓝ˢ (frontier Ω.carrier), ∑ j, ψ.toFun j y = 1) : + ∃ χ : V → ℝ, ContDiff ℝ ((⊤ : ℕ∞) : WithTop ℕ∞) χ ∧ HasCompactSupport χ ∧ + tsupport χ ⊆ Ω.carrier ∧ ∀ x ∈ Ω.carrier, χ x + ∑ j, ψ.toFun j x = 1 := by + set χ := Ω.carrier.indicator (fun y => 1 - ∑ j, ψ.toFun j y) + have hsm : ContDiff ℝ ((⊤ : ℕ∞) : WithTop ℕ∞) (fun y => 1 - ∑ j, ψ.toFun j y) := + contDiff_const.sub (ContDiff.sum fun j _ => ψ.contDiff j) + have hts : tsupport χ ⊆ Ω.carrier := fun x hx => by + by_contra h + exact (notMem_tsupport_iff_eventuallyEq.2 + (indicator_one_sub_sum_eventuallyEq_zero ψ hψ h)) hx + refine ⟨χ, contDiff_iff_contDiffAt.2 fun x => ?_, isCompact_of_isClosed_isBounded + (isClosed_tsupport _) (Ω.isBounded.subset hts), hts, fun x hx => ?_⟩ + · by_cases hx : x ∈ Ω.carrier + · exact hsm.contDiffAt.congr_of_eventuallyEq (eventually_of_mem (Ω.isOpen.mem_nhds hx) + fun y hy => indicator_of_mem hy _) + · exact contDiff_zero_fun.contDiffAt.congr_of_eventuallyEq + (indicator_one_sub_sum_eventuallyEq_zero ψ hψ hx) + · simp only [χ, indicator_of_mem hx] + ring + +/-- **Localised `H^1(V)` functions**: for every resolution of unity `ψ`, every chart `j` and +`W ∈ H^1(V)` there is `W' ∈ H^1(V)` whose `L_2` function is `ψ_j ι W` +(`Rd.exists_toL2_eq_mulLp`). -/ +theorem BoundaryPartition.exists_toL2_eq_localize (ψ : Ω.BoundaryPartition) (j : Fin Ω.N) + (W : H^{1}(V)) : ∃ W' : H^{1}(V), toL2 W' = ψ.localize j (toL2 W) := + exists_toL2_eq_mulLp (ψ.contDiff j) (ψ.hasCompactSupport j) _ _ W + +/-! ### Green's formula in chart form -/ + +/-- **The chart pieces of Green's formula**: if the `L_2` function of `W' ∈ H^1(V)` is `ψ_j ι W`, +then `∫_Ω (∂_v U) W' + U ∂_v W' = ∫_{H_j} ψ_j(γ_j x') Tr_j U Tr_j W n^j_v dx'`. The integrand +vanishes outside `B_j`, where `Ω` agrees with the graph domain `Ω_j`, so this is Green's formula +on `Ω_j` (`Rd.LipschitzGraph.setIntegral_green_besselPotentialSpace`) with +`Tr_j (ψ_j W) = (ψ_j ∘ γ_j) Tr_j W` (`Rd.LipschitzGraph.trace_mulLp_ae`). -/ +theorem setIntegral_weakDeriv_mul_add_localize (ψ : Ω.BoundaryPartition) (j : Fin Ω.N) + (U : H^{1}(V)) {W W' : H^{1}(V)} (hW' : toL2 W' = ψ.localize j (toL2 W)) (v : V) : + ∫ x in Ω.carrier, weakDerivL2 v U x * toL2 W' x + toL2 U x * weakDerivL2 v W' x = + ∫ x', ψ.toComplex j ((Ω.graph j).graphMap x') * (Ω.graph j).traceH1 U x' * + (Ω.graph j).traceH1 W x' * ((Ω.graph j).normalWeight v x' : ℂ) := by + have hz := ae_weakDeriv_mul_add_eq_zero_of_mulLp (χ := ψ.toFun j) + (ψ.contDiff_toComplex j).continuous (norm_le_of_iteratedFDeriv_le (ψ.derivBound_spec j)) hW' + v U + have hB : Ω.carrier ∩ ball (Ω.center j) (Ω.radius j) = + (Ω.graph j).domain ∩ ball (Ω.center j) (Ω.radius j) := Ω.inter_ball_eq j le_rfl + rw [setIntegral_eq_of_inter_eq Ω.measurableSet (Ω.graph j).measurableSet_domain hB + (hz.mono fun x hx hxB => hx fun h => hxB (ψ.tsupport_subset j h)), + (Ω.graph j).setIntegral_green_besselPotentialSpace U W' v] + refine integral_congr_ae ?_ + have htr := (Ω.graph j).trace_mulLp_ae two_ne_top one_le_two (s := 1 / 2) (by norm_num) + (by norm_num) one_le_two (ψ.contDiff_toComplex j) (ψ.derivBound_spec j) + (modNorm_toL2_lt_top W) + filter_upwards [htr] with x' hx' + rw [(Ω.graph j).traceH1_apply W', hW', BoundaryPartition.localize, hx', + (Ω.graph j).traceH1_apply W] + ring + +/-- **The interior piece of Green's formula vanishes**: if the `L_2` function of `W' ∈ H^1(V)` is +`χ ι W` for a continuous bounded `χ` with closed support in `Ω`, then +`∫_Ω (∂_v U) W' + U ∂_v W' = ∫_V (∂_v U) W' + U ∂_v W' = 0` +(`Rd.integral_weakDeriv_mul_add_eq_zero`). -/ +theorem setIntegral_weakDeriv_mul_add_mulLp_eq_zero {χ : V → ℝ} (hχΩ : tsupport χ ⊆ Ω.carrier) + {C : ℝ} (hc : Continuous fun x => (χ x : ℂ)) (hC : ∀ x, ‖(χ x : ℂ)‖ ≤ C) (U : H^{1}(V)) + {W W' : H^{1}(V)} (hW' : toL2 W' = mulLp hc hC (toL2 W)) (v : V) : + ∫ x in Ω.carrier, weakDerivL2 v U x * toL2 W' x + toL2 U x * weakDerivL2 v W' x = 0 := by + rw [setIntegral_eq_integral_of_ae_compl_eq_zero ((ae_weakDeriv_mul_add_eq_zero_of_mulLp hc hC + hW' v U).mono fun x hx hxΩ => hx fun h => hxΩ (hχΩ h))] + exact integral_weakDeriv_mul_add_eq_zero v U W' + +/-- **The decomposition on `Ω`**: if `χ + ∑_j ψ_j = 1` on `Ω`, the `L_2` functions of `W_j` are +`ψ_j ι W` and that of `W_0` is `χ ι W`, then `ι W = ι (∑_j W_j + W_0)` almost everywhere on +`Ω`. -/ +theorem toL2_ae_eq_sum_add (ψ : Ω.BoundaryPartition) {χ : V → ℝ} + (hχ1 : ∀ x ∈ Ω.carrier, χ x + ∑ j, ψ.toFun j x = 1) {C : ℝ} + (hc : Continuous fun x => (χ x : ℂ)) (hC : ∀ x, ‖(χ x : ℂ)‖ ≤ C) (W : H^{1}(V)) + {Wj : Fin Ω.N → H^{1}(V)} (hWj : ∀ j, toL2 (Wj j) = ψ.localize j (toL2 W)) + {W0 : H^{1}(V)} (hW0 : toL2 W0 = mulLp hc hC (toL2 W)) : + (toL2 W : V → ℂ) =ᵐ[volume.restrict Ω.carrier] toL2 (∑ j, Wj j + W0) := by + have h0 : (toL2 W0 : V → ℂ) =ᵐ[volume] fun x => (χ x : ℂ) * toL2 W x := by + rw [hW0] + exact mulLp_apply_ae hc hC _ + have hloc : ∀ᵐ x ∂(volume : Measure V), ∀ j, + (toL2 (Wj j) : V → ℂ) x = ψ.toComplex j x * toL2 W x := ae_all_iff.2 fun j => by + rw [hWj j] + exact mulLp_apply_ae _ _ _ + filter_upwards [ae_restrict_mem Ω.measurableSet, ae_restrict_of_ae hloc, + ae_restrict_of_ae (Lp.coeFn_add (∑ j, toL2 (Wj j)) (toL2 W0)), + ae_restrict_of_ae (Lp.coeFn_fun_finsetSum Finset.univ fun j => toL2 (Wj j)), + ae_restrict_of_ae h0] with x hx h1 h2 h3 h4 + rw [map_add, map_sum, h2, Pi.add_apply, h3, h4] + simp only [h1] + rw [← Finset.sum_mul, ← add_mul] + have h5 : ∑ j, ψ.toComplex j x + (χ x : ℂ) = 1 := by + simp only [BoundaryPartition.toComplex] + rw [← Complex.ofReal_sum, ← Complex.ofReal_add, add_comm, hχ1 x hx, Complex.ofReal_one] + rw [h5, one_mul] + +/-- **Green's formula on a bounded Lipschitz domain, chart form, for a resolution of unity equal +to one near the boundary**: if `∑_j ψ_j = 1` on a neighbourhood of `Γ`, then for all +`U, W ∈ H^1(V)` and every direction `v`, +`∫_Ω (∂_v U) W + U ∂_v W = ∑_j ∫_{H_j} ψ_j(γ_j x') Tr_j U Tr_j W n^j_v dx'`. Split +`W = ∑_j ψ_j W + χ W` on `Ω` with the interior cut-off `χ` +(`Rd.BoundedLipschitzDomain.exists_interior_cutoff`): the chart pieces are Green's formula on the +graph domains (`Rd.BoundedLipschitzDomain.setIntegral_weakDeriv_mul_add_localize`), and the +interior piece vanishes +(`Rd.BoundedLipschitzDomain.setIntegral_weakDeriv_mul_add_mulLp_eq_zero`). -/ +theorem setIntegral_green_of_nhds (ψ : Ω.BoundaryPartition) + (hψ : ∀ᶠ y in 𝓝ˢ (frontier Ω.carrier), ∑ j, ψ.toFun j y = 1) (U W : H^{1}(V)) (v : V) : + ∫ x in Ω.carrier, weakDerivL2 v U x * toL2 W x + toL2 U x * weakDerivL2 v W x = + ∑ j, ∫ x', ψ.toComplex j ((Ω.graph j).graphMap x') * (Ω.graph j).traceH1 U x' * + (Ω.graph j).traceH1 W x' * ((Ω.graph j).normalWeight v x' : ℂ) := by + obtain ⟨χ, hχ, hcs, hχΩ, hχ1⟩ := exists_interior_cutoff ψ hψ + have hc : Continuous fun x => (χ x : ℂ) := Complex.continuous_ofReal.comp hχ.continuous + obtain ⟨C, hC⟩ := hc.bounded_above_of_compact_support (hcs.comp_left Complex.ofReal_zero) + choose Wj hWj using fun j => ψ.exists_toL2_eq_localize j W + obtain ⟨W0, hW0⟩ := exists_toL2_eq_mulLp hχ hcs hc hC W + have hae := toL2_ae_eq_sum_add ψ hχ1 hc hC W hWj hW0 + have hint : ∫ x in Ω.carrier, weakDerivL2 v U x * toL2 W x + toL2 U x * weakDerivL2 v W x = + ∫ x in Ω.carrier, weakDerivL2 v U x * toL2 (∑ j, Wj j + W0) x + + toL2 U x * weakDerivL2 v (∑ j, Wj j + W0) x := by + refine integral_congr_ae ?_ + filter_upwards [hae, weakDerivL2_ae_eq_of_ae_eq Ω.isOpen v hae] with x h1 h2 + rw [h1, h2] + rw [hint, setIntegral_weakDeriv_mul_add_add Ω.measurableSet, + setIntegral_weakDeriv_mul_add_sum Ω.measurableSet, + setIntegral_weakDeriv_mul_add_mulLp_eq_zero hχΩ hc hC U hW0, add_zero] + exact Finset.sum_congr rfl fun j _ => setIntegral_weakDeriv_mul_add_localize ψ j U (hWj j) v + +/-! ### The unit normal is the chart normal -/ + +variable (Ω) + +/-- **Gauss–Green on `Ω` in one chart**: for a `C^1` function `g` with compact support in the +boundary ball `B_j` and every direction `v`, `∫_Ω ∂_v g = ∫_Γ g ⟪v, ν_j ∘ P_j⟫ dσ`. Inside `B_j` +the domain is the graph domain `Ω_j`, so this is Gauss–Green on `Ω_j` +(`Rd.LipschitzGraph.setIntegral_lineDeriv_eq_normal`) with the surface measure in the chart +(`Rd.BoundedLipschitzDomain.integral_surfaceMeasure_of_support`). -/ +theorem setIntegral_lineDeriv_eq_chart (j : Fin Ω.N) {g : V → ℂ} (hg : ContDiff ℝ 1 g) + (hgB : tsupport g ⊆ ball (Ω.center j) (Ω.radius j)) (v : V) : + ∫ x in Ω.carrier, lineDeriv ℝ g x v = ∫ y, g y * + (inner ℝ v ((Ω.graph j).normalAt ((Ω.graph j).proj y)) : ℂ) ∂Ω.surfaceMeasure := by + have hgc : HasCompactSupport g := + isCompact_of_isClosed_isBounded (isClosed_tsupport g) (isBounded_ball.subset hgB) + rw [setIntegral_eq_of_inter_eq Ω.measurableSet (Ω.graph j).measurableSet_domain + (Ω.inter_ball_eq j le_rfl) (ae_of_all _ fun x hx => + lineDeriv_eq_zero_of_notMem_tsupport (fun h => hx (hgB h)) v), + (Ω.graph j).setIntegral_lineDeriv_eq_normal hg hgc v, + Ω.integral_surfaceMeasure_of_support j _ fun y hy => + hgB (subset_tsupport _ (left_ne_zero_of_mul hy))] + simp only [LipschitzGraph.proj_graphMap] + +/-- For a continuous `g` with compact support, `y ↦ g(y) ⟪v, ν_j(P_j y)⟫` is integrable with +respect to the finite surface measure: it is bounded and measurable. -/ +theorem integrable_mul_inner_normalAt (j : Fin Ω.N) {g : V → ℂ} (hg : Continuous g) + (hgc : HasCompactSupport g) (v : V) : + Integrable (fun y => g y * (inner ℝ v ((Ω.graph j).normalAt ((Ω.graph j).proj y)) : ℂ)) + Ω.surfaceMeasure := by + obtain ⟨C, hC⟩ := hg.bounded_above_of_compact_support hgc + have hm : Measurable fun y => (inner ℝ v ((Ω.graph j).normalAt ((Ω.graph j).proj y)) : ℂ) := + Complex.measurable_ofReal.comp (measurable_const.inner + ((Ω.graph j).measurable_normalAt.comp (Ω.graph j).proj.continuous.measurable)) + refine Integrable.of_bound (hg.aestronglyMeasurable.mul hm.aestronglyMeasurable) (C * ‖v‖) + (ae_of_all _ fun y => ?_) + rw [norm_mul, Complex.norm_real, Real.norm_eq_abs] + refine mul_le_mul (hC y) ((abs_real_inner_le_norm _ _).trans ?_) (abs_nonneg _) + ((norm_nonneg _).trans (hC y)) + rw [(Ω.graph j).norm_normalAt, mul_one] + +/-- **The chart normals give the same boundary integrals**: for a `C^1` function `g` with compact +support in `B_j ∩ B_k` and every `v`, `∫_Γ g ⟪v, ν_j ∘ P_j - ν_k ∘ P_k⟫ dσ = 0`, since both +chart integrals are `∫_Ω ∂_v g` (`Rd.BoundedLipschitzDomain.setIntegral_lineDeriv_eq_chart`). -/ +theorem integral_mul_inner_normalAt_sub_eq_zero (j k : Fin Ω.N) {g : V → ℂ} + (hg : ContDiff ℝ 1 g) + (hgB : tsupport g ⊆ ball (Ω.center j) (Ω.radius j) ∩ ball (Ω.center k) (Ω.radius k)) + (v : V) : + ∫ y, g y * (inner ℝ v ((Ω.graph j).normalAt ((Ω.graph j).proj y) - + (Ω.graph k).normalAt ((Ω.graph k).proj y)) : ℂ) ∂Ω.surfaceMeasure = 0 := by + have hgc : HasCompactSupport g := isCompact_of_isClosed_isBounded (isClosed_tsupport g) + (isBounded_ball.subset (hgB.trans inter_subset_left)) + have hj := Ω.setIntegral_lineDeriv_eq_chart j hg (hgB.trans inter_subset_left) v + have hk := Ω.setIntegral_lineDeriv_eq_chart k hg (hgB.trans inter_subset_right) v + simp only [inner_sub_right, Complex.ofReal_sub, mul_sub] + rw [integral_sub (Ω.integrable_mul_inner_normalAt j hg.continuous hgc v) + (Ω.integrable_mul_inner_normalAt k hg.continuous hgc v), ← hj, ← hk, sub_self] + +/-- **The chart identity in the chart**: for a `C^1` function `g` with compact support in +`B_j ∩ B_k` and every `v`, +`∫_{H_j} g(γ_j x') ⟪v, ν_j(x') - ν_k(P_k γ_j x')⟫ √(1 + ‖∇φ_j(x')‖²) dx' = 0` +(`Rd.BoundedLipschitzDomain.integral_mul_inner_normalAt_sub_eq_zero` and the surface measure in the +chart). -/ +theorem integral_graphMap_mul_inner_normalAt_sub_eq_zero (j k : Fin Ω.N) {g : V → ℂ} + (hg : ContDiff ℝ 1 g) + (hgB : tsupport g ⊆ ball (Ω.center j) (Ω.radius j) ∩ ball (Ω.center k) (Ω.radius k)) + (v : V) : + ∫ x', g ((Ω.graph j).graphMap x') * ((inner ℝ v ((Ω.graph j).normalAt x' - + (Ω.graph k).normalAt ((Ω.graph k).proj ((Ω.graph j).graphMap x'))) * + (Ω.graph j).gram x' : ℝ) : ℂ) = 0 := by + rw [← Ω.integral_mul_inner_normalAt_sub_eq_zero j k hg hgB v, + Ω.integral_surfaceMeasure_of_support j _ fun y hy => + (hgB (subset_tsupport _ (left_ne_zero_of_mul hy))).1] + refine integral_congr_ae (ae_of_all _ fun x' => ?_) + simp only [LipschitzGraph.proj_graphMap, Complex.ofReal_mul] + ring + +/-- The density `x' ↦ ⟪v, ν_j(x') - ν_k(P_k γ_j x')⟫ √(1 + ‖∇φ_j(x')‖²)` is locally integrable on +`H_j`: it is measurable and bounded by `2 ‖v‖ √(1 + M_j²)`. -/ +theorem locallyIntegrable_inner_normalAt_sub_mul_gram (j k : Fin Ω.N) (v : V) : + LocallyIntegrable (fun x' => inner ℝ v ((Ω.graph j).normalAt x' - + (Ω.graph k).normalAt ((Ω.graph k).proj ((Ω.graph j).graphMap x'))) * (Ω.graph j).gram x') + (volume : Measure (Ω.graph j).hyperplane) := by + have hm : Measurable fun x' => inner ℝ v ((Ω.graph j).normalAt x' - + (Ω.graph k).normalAt ((Ω.graph k).proj ((Ω.graph j).graphMap x'))) * (Ω.graph j).gram x' := + (measurable_const.inner ((Ω.graph j).measurable_normalAt.sub + ((Ω.graph k).measurable_normalAt.comp ((Ω.graph k).proj.continuous.comp + (Ω.graph j).continuous_graphMap).measurable))).mul (Ω.graph j).measurable_gram + refine (memLp_top_of_bound hm.aestronglyMeasurable (‖v‖ * 2 * √(1 + (Ω.graph j).M ^ 2)) + (ae_of_all _ fun x' => ?_)).locallyIntegrable le_top + have hn : ‖(Ω.graph j).normalAt x' - + (Ω.graph k).normalAt ((Ω.graph k).proj ((Ω.graph j).graphMap x'))‖ ≤ 2 := by + refine (norm_sub_le _ _).trans ?_ + rw [(Ω.graph j).norm_normalAt, (Ω.graph k).norm_normalAt] + norm_num + rw [norm_mul, Real.norm_eq_abs, Real.norm_of_nonneg ((Ω.graph j).gram_pos x').le] + exact mul_le_mul ((abs_real_inner_le_norm _ _).trans (mul_le_mul_of_nonneg_left hn + (norm_nonneg _))) ((Ω.graph j).gram_le x') ((Ω.graph j).gram_pos x').le (by positivity) + +/-- **The chart normals agree on the overlaps, in the chart**: for almost every `x' ∈ H_j` with +`γ_j(x') ∈ B_j ∩ B_k`, `ν_j(x') = ν_k(P_k γ_j x')`. The density +`⟪v, ν_j - ν_k ∘ P_k ∘ γ_j⟫ √(1 + ‖∇φ_j‖²)` integrates to zero against every test function `φ` on +the open set `γ_j⁻¹(B_j ∩ B_k)`, which is `g ∘ γ_j` for a test function `g` with support in +`B_j ∩ B_k` (`Rd.LipschitzGraph.exists_contDiff_comp_graphMap_eq`, +`Rd.BoundedLipschitzDomain.integral_graphMap_mul_inner_normalAt_sub_eq_zero`); so it vanishes +almost everywhere there (Mathlib's `IsOpen.ae_eq_zero_of_integral_contDiff_smul_eq_zero`), for each +vector `v` of an orthonormal basis. -/ +theorem normalAt_graphMap_ae_eq (j k : Fin Ω.N) : + ∀ᵐ x' ∂(volume : Measure (Ω.graph j).hyperplane), + (Ω.graph j).graphMap x' ∈ ball (Ω.center j) (Ω.radius j) ∩ ball (Ω.center k) (Ω.radius k) → + (Ω.graph j).normalAt x' = + (Ω.graph k).normalAt ((Ω.graph k).proj ((Ω.graph j).graphMap x')) := by + set W := ball (Ω.center j) (Ω.radius j) ∩ ball (Ω.center k) (Ω.radius k) + have hW : IsOpen W := isOpen_ball.inter isOpen_ball + have hO : IsOpen ((Ω.graph j).graphMap ⁻¹' W) := hW.preimage (Ω.graph j).continuous_graphMap + set b := stdOrthonormalBasis ℝ V + have hi : ∀ i, ∀ᵐ x' ∂(volume : Measure (Ω.graph j).hyperplane), + x' ∈ (Ω.graph j).graphMap ⁻¹' W → inner ℝ (b i) ((Ω.graph j).normalAt x' - + (Ω.graph k).normalAt ((Ω.graph k).proj ((Ω.graph j).graphMap x'))) * + (Ω.graph j).gram x' = 0 := fun i => + hO.ae_eq_zero_of_integral_contDiff_smul_eq_zero + ((Ω.locallyIntegrable_inner_normalAt_sub_mul_gram j k (b i)).locallyIntegrableOn _) + fun φ hφ hφc hφO => by + obtain ⟨g, hg, -, hgW, hgφ⟩ := (Ω.graph j).exists_contDiff_comp_graphMap_eq hW hφ hφc hφO + have h := Ω.integral_graphMap_mul_inner_normalAt_sub_eq_zero j k (g := fun y => (g y : ℂ)) + ((Complex.ofRealCLM.contDiff.comp hg).of_le (by exact_mod_cast le_top)) + ((tsupport_comp_subset Complex.ofReal_zero g).trans hgW) (b i) + simp only [hgφ, ← Complex.ofReal_mul] at h + rw [integral_complex_ofReal, Complex.ofReal_eq_zero] at h + simpa only [smul_eq_mul] using h + filter_upwards [ae_all_iff.2 hi] with x' hx' hxW + rw [← sub_eq_zero, ← b.sum_repr' ((Ω.graph j).normalAt x' - + (Ω.graph k).normalAt ((Ω.graph k).proj ((Ω.graph j).graphMap x')))] + refine Finset.sum_eq_zero fun i _ => ?_ + rw [(mul_eq_zero.1 (hx' i hxW)).resolve_right ((Ω.graph j).gram_pos x').ne', zero_smul] + +/-- **The chart normals agree on the overlaps**: for `σ`-almost every `y ∈ B_j ∩ B_k`, +`ν_j(P_j y) = ν_k(P_k y)` (`Rd.BoundedLipschitzDomain.normalAt_graphMap_ae_eq` and the null sets +of `σ` in the chart, `Rd.BoundedLipschitzDomain.ae_surfaceMeasure_ball_iff`). -/ +theorem normalAt_proj_ae_eq (j k : Fin Ω.N) : + ∀ᵐ y ∂Ω.surfaceMeasure, y ∈ ball (Ω.center j) (Ω.radius j) → + y ∈ ball (Ω.center k) (Ω.radius k) → + (Ω.graph j).normalAt ((Ω.graph j).proj y) = (Ω.graph k).normalAt ((Ω.graph k).proj y) := by + refine (Ω.ae_surfaceMeasure_ball_iff j).2 ?_ + filter_upwards [Ω.normalAt_graphMap_ae_eq j k] with x' hx' hj hk + rw [LipschitzGraph.proj_graphMap] + exact hx' ⟨hj, hk⟩ + +/-- **The unit normal is the chart normal**: for every chart `j` and `σ`-almost every `y ∈ B_j`, +`ν(y) = ν_j(P_j y)`. On `Γ`, `ν(y) = ∑_k ψ_k(y) ν_k(P_k y)` is a combination with weights +summing to `1` of chart normals that all agree with `ν_j(P_j y)` +(`Rd.BoundedLipschitzDomain.normalAt_proj_ae_eq`). -/ +theorem normal_ae_eq_normalAt (j : Fin Ω.N) : + ∀ᵐ y ∂Ω.surfaceMeasure, y ∈ ball (Ω.center j) (Ω.radius j) → + Ω.normal y = (Ω.graph j).normalAt ((Ω.graph j).proj y) := by + filter_upwards [ae_all_iff.2 fun k => Ω.normalAt_proj_ae_eq j k, Ω.ae_mem_frontier] + with y hy hΓ hj + have hterm : ∀ k, Ω.boundaryPartition.toFun k y • (Ω.graph k).normalAt ((Ω.graph k).proj y) = + Ω.boundaryPartition.toFun k y • (Ω.graph j).normalAt ((Ω.graph j).proj y) := fun k => by + by_cases h : Ω.boundaryPartition.toFun k y = 0 + · rw [h, zero_smul, zero_smul] + · rw [hy k hj (Ω.boundaryPartition.mem_ball_of_ne_zero h)] + rw [normal, Finset.sum_congr rfl fun k _ => hterm k, ← Finset.sum_smul, + Ω.boundaryPartition.sum_eq_one y hΓ, one_smul] + +/-- **The unit normal is a unit vector**: `‖ν(y)‖ = 1` for `σ`-almost every `y` +(`Rd.BoundedLipschitzDomain.normal_ae_eq_normalAt`, `Rd.LipschitzGraph.norm_normalAt`). -/ +theorem norm_normal_ae : ∀ᵐ y ∂Ω.surfaceMeasure, ‖Ω.normal y‖ = 1 := by + filter_upwards [ae_all_iff.2 Ω.normal_ae_eq_normalAt, Ω.ae_mem_frontier] with y hy hΓ + obtain ⟨j, hj⟩ := mem_iUnion.1 (Ω.frontier_subset hΓ) + rw [hy j hj, (Ω.graph j).norm_normalAt] + +/-- **The unit normal points out of `Ω`**: for every chart `j`, `σ`-almost every `y ∈ B_j` and +every `w` in the cone `K_j` of `Ω_j`, `⟪ν(y), w⟫ < 0` +(`Rd.LipschitzGraph.inner_normalAt_neg_of_mem_cone`). -/ +theorem inner_normal_neg_ae (j : Fin Ω.N) : + ∀ᵐ y ∂Ω.surfaceMeasure, y ∈ ball (Ω.center j) (Ω.radius j) → + ∀ w ∈ (Ω.graph j).cone, inner ℝ (Ω.normal y) w < 0 := by + filter_upwards [Ω.normal_ae_eq_normalAt j] with y hy hj w hw + rw [hy hj] + exact (Ω.graph j).inner_normalAt_neg_of_mem_cone _ hw + +/-! ### Green's formula with the surface measure -/ + +/-- **The trace in `L_2(Γ)` in a chart**: for `U ∈ H^1(V)`, `(γ_{L_2} U)(γ_j x') = Tr_j U(x')` for +almost every `x' ∈ H_j` with `γ_j(x') ∈ B_j` (`Rd.BoundedLipschitzDomain.ambientTraceL2_apply_ae`, +`Rd.BoundedLipschitzDomain.boundaryTrace_graphMap`). -/ +theorem ambientTraceL2_graphMap_ae (j : Fin Ω.N) (U : H^{1}(V)) : + ∀ᵐ x' ∂(volume : Measure (Ω.graph j).hyperplane), + (Ω.graph j).graphMap x' ∈ ball (Ω.center j) (Ω.radius j) → + Ω.ambientTraceL2 U ((Ω.graph j).graphMap x') = (Ω.graph j).traceH1 U x' := by + filter_upwards [Ω.ae_graphMap_of_ae_surfaceMeasure j + (Ω.ambientTraceL2_apply_ae Ω.boundaryPartition U), + Ω.boundaryTrace_graphMap Ω.boundaryPartition two_ne_top one_le_two (s := 1 / 2) (by norm_num) + (by norm_num) one_le_two (modNorm_toL2_lt_top U) j] with x' h1 h2 hj + rw [h1 hj, h2 hj, (Ω.graph j).traceH1_apply] + +/-- **The unit normal in a chart**: `ν(γ_j x') = ν_j(x')` for almost every `x' ∈ H_j` with +`γ_j(x') ∈ B_j` (`Rd.BoundedLipschitzDomain.normal_ae_eq_normalAt`). -/ +theorem normal_graphMap_ae (j : Fin Ω.N) : + ∀ᵐ x' ∂(volume : Measure (Ω.graph j).hyperplane), + (Ω.graph j).graphMap x' ∈ ball (Ω.center j) (Ω.radius j) → + Ω.normal ((Ω.graph j).graphMap x') = (Ω.graph j).normalAt x' := by + filter_upwards [(Ω.ae_surfaceMeasure_ball_iff j).1 (Ω.normal_ae_eq_normalAt j)] with x' hx' hj + rw [hx' hj, LipschitzGraph.proj_graphMap] + +/-- The boundary integrand `γ_{L_2} U · γ_{L_2} W ⟪v, ν⟫` of Green's formula is integrable with +respect to the surface measure: a product of two `L_2(Γ)` functions and a bounded one. -/ +theorem integrable_ambientTraceL2_mul_inner_normal (U W : H^{1}(V)) (v : V) : + Integrable (fun y => Ω.ambientTraceL2 U y * Ω.ambientTraceL2 W y * + (inner ℝ v (Ω.normal y) : ℂ)) Ω.surfaceMeasure := + ((Lp.memLp _).integrable_mul (Lp.memLp _)).mul_bdd + (Complex.measurable_ofReal.comp + (measurable_const.inner Ω.measurable_normal)).aestronglyMeasurable + (ae_of_all _ fun y => by + rw [Complex.norm_real, Real.norm_eq_abs] + exact (abs_real_inner_le_norm _ _).trans + (mul_le_of_le_one_right (norm_nonneg _) (Ω.norm_normal_le y))) + +/-- **The boundary integral of Green's formula in the charts**: for every resolution of unity `ψ`, +`U, W ∈ H^1(V)` and every direction `v`, +`∫_Γ γ_{L_2} U · γ_{L_2} W ⟪v, ν⟫ dσ = ∑_j ∫_{H_j} ψ_j(γ_j x') Tr_j U Tr_j W n^j_v dx'`, by the +surface measure in the charts (`Rd.BoundedLipschitzDomain.integral_surfaceMeasure`), the traces and +the normal in the charts, and `⟪v, ν_j⟫ √(1 + ‖∇φ_j‖²) = n^j_v` +(`Rd.LipschitzGraph.inner_normalAt_mul_gram`). -/ +theorem integral_ambientTraceL2_mul_inner_normal_eq (ψ : Ω.BoundaryPartition) (U W : H^{1}(V)) + (v : V) : + ∫ y, Ω.ambientTraceL2 U y * Ω.ambientTraceL2 W y * (inner ℝ v (Ω.normal y) : ℂ) + ∂Ω.surfaceMeasure = + ∑ j, ∫ x', ψ.toComplex j ((Ω.graph j).graphMap x') * (Ω.graph j).traceH1 U x' * + (Ω.graph j).traceH1 W x' * ((Ω.graph j).normalWeight v x' : ℂ) := by + rw [Ω.integral_surfaceMeasure ψ (Ω.integrable_ambientTraceL2_mul_inner_normal U W v)] + refine Finset.sum_congr rfl fun j _ => integral_congr_ae ?_ + filter_upwards [Ω.ambientTraceL2_graphMap_ae j U, Ω.ambientTraceL2_graphMap_ae j W, + Ω.normal_graphMap_ae j] with x' h1 h2 h3 + by_cases hψ : ψ.toFun j ((Ω.graph j).graphMap x') = 0 + · simp only [ψ.toComplex_of_eq_zero hψ, zero_mul] + · have hj := ψ.mem_ball_of_ne_zero hψ + rw [h1 hj, h2 hj, h3 hj, ← (Ω.graph j).inner_normalAt_mul_gram, Complex.ofReal_mul] + ring + +/-- **Green's formula on a bounded Lipschitz domain** (Grisvard, Theorem 1.5.3.1): for all +`U, W ∈ H^1(V)` and every direction `v`, +`∫_Ω (∂_v U) W + U ∂_v W = ∫_Γ γ U · γ W ⟪v, ν⟫ dσ` with the traces `γ U, γ W ∈ L_2(Γ)` +(`Rd.BoundedLipschitzDomain.ambientTraceL2`), the outward unit normal `ν` and the surface measure +`σ`. The chart form for a resolution of unity equal to one near `Γ` +(`Rd.BoundedLipschitzDomain.setIntegral_green_of_nhds`) is the boundary integral in the charts +(`Rd.BoundedLipschitzDomain.integral_ambientTraceL2_mul_inner_normal_eq`). -/ +theorem setIntegral_green_surface (U W : H^{1}(V)) (v : V) : + ∫ x in Ω.carrier, weakDerivL2 v U x * toL2 W x + toL2 U x * weakDerivL2 v W x = + ∫ y, Ω.ambientTraceL2 U y * Ω.ambientTraceL2 W y * (inner ℝ v (Ω.normal y) : ℂ) + ∂Ω.surfaceMeasure := by + obtain ⟨ψ, -, -, hψ⟩ := Ω.exists_boundaryPartition_nhds + rw [setIntegral_green_of_nhds ψ hψ, Ω.integral_ambientTraceL2_mul_inner_normal_eq ψ] + +/-- **Green's formula on `H^1(Ω)`**: for all `u, w ∈ H^1(Ω)` and every direction `v`, +`∫_Ω (∂_v u) w + u ∂_v w = ∫_Γ γ u · γ w ⟪v, ν⟫ dσ` with the trace +`γ = Rd.BoundedLipschitzDomain.boundaryTraceL2 : H^1(Ω) → L_2(Γ)`; the left side uses the +representatives of `u, w` in `H^1(V)` (`Rd.BoundedLipschitzDomain.setIntegral_green_surface`, +`Rd.BoundedLipschitzDomain.boundaryTraceL2_eq_ambientTraceL2`). -/ +theorem setIntegral_green_sobolevOne (u w : Ω.SobolevOne) (v : V) : + ∫ x in Ω.carrier, weakDerivL2 v (u : H^{1}(V)) x * toL2 (w : H^{1}(V)) x + + toL2 (u : H^{1}(V)) x * weakDerivL2 v (w : H^{1}(V)) x = + ∫ y, Ω.boundaryTraceL2 u y * Ω.boundaryTraceL2 w y * (inner ℝ v (Ω.normal y) : ℂ) + ∂Ω.surfaceMeasure := by + rw [Ω.boundaryTraceL2_eq_ambientTraceL2, Ω.boundaryTraceL2_eq_ambientTraceL2] + exact Ω.setIntegral_green_surface _ _ v + +/-- **Green's formula on `H^1(Ω)` with weak derivatives on `Ω`**: for all `u, w ∈ H^1(Ω)`, every +direction `v` and weak derivatives `u_v = ∂_v u`, `w_v = ∂_v w` on `Ω`, +`∫_Ω u_v w + u w_v = ∫_Γ γ u · γ w ⟪v, ν⟫ dσ` with the trace `γ : H^1(Ω) → L_2(Γ)`. On `Ω`, `u_v` +and `w_v` agree almost everywhere with the weak derivatives on `V` of the representatives in +`H^1(V)` (`Rd.HasWeakLineDeriv.mono`, `Rd.HasWeakLineDeriv.unique`), so this is +`Rd.BoundedLipschitzDomain.setIntegral_green_sobolevOne`. -/ +theorem setIntegral_green_sobolevOne_of_hasWeakLineDeriv (u w : Ω.SobolevOne) (v : V) + {uv wv : V → ℂ} + (huv : HasWeakLineDeriv Ω.toOpens (fun _ : Fin 1 => v) (toL2 (u : H^{1}(V))) uv) + (hwv : HasWeakLineDeriv Ω.toOpens (fun _ : Fin 1 => v) (toL2 (w : H^{1}(V))) wv) : + ∫ x in Ω.carrier, uv x * toL2 (w : H^{1}(V)) x + toL2 (u : H^{1}(V)) x * wv x = + ∫ y, Ω.boundaryTraceL2 u y * Ω.boundaryTraceL2 w y * (inner ℝ v (Ω.normal y) : ℂ) + ∂Ω.surfaceMeasure := by + rw [← Ω.setIntegral_green_sobolevOne u w v] + have h1 := ((hasWeakLineDeriv_weakDerivL2 v (u : H^{1}(V))).mono le_top).unique huv + have h2 := ((hasWeakLineDeriv_weakDerivL2 v (w : H^{1}(V))).mono le_top).unique hwv + rw [Ω.coe_toOpens] at h1 h2 + refine integral_congr_ae ?_ + filter_upwards [h1, h2] with x hx1 hx2 + rw [hx1, hx2] + +/-- **Green's formula in chart form**: for every resolution of unity `ψ` on the boundary, all +`U, W ∈ H^1(V)` and every direction `v`, +`∫_Ω (∂_v U) W + U ∂_v W = ∑_j ∫_{H_j} ψ_j(γ_j x') Tr_j U Tr_j W n^j_v dx'` with the traces `Tr_j` +of the graph domains and the normal weights `n^j_v = ⟪∇φ_j, v⟫ - ⟪v, e_j⟫` +(`Rd.BoundedLipschitzDomain.setIntegral_green_surface`, +`Rd.BoundedLipschitzDomain.integral_ambientTraceL2_mul_inner_normal_eq`). -/ +theorem setIntegral_green_besselPotentialSpace (ψ : Ω.BoundaryPartition) (U W : H^{1}(V)) + (v : V) : + ∫ x in Ω.carrier, weakDerivL2 v U x * toL2 W x + toL2 U x * weakDerivL2 v W x = + ∑ j, ∫ x', ψ.toComplex j ((Ω.graph j).graphMap x') * (Ω.graph j).traceH1 U x' * + (Ω.graph j).traceH1 W x' * ((Ω.graph j).normalWeight v x' : ℂ) := by + rw [Ω.setIntegral_green_surface, Ω.integral_ambientTraceL2_mul_inner_normal_eq ψ] + +/-- **Green's formula on a bounded Lipschitz domain, for `W^1_2(V)` functions**: for every +resolution of unity `ψ`, all `f, g ∈ L_2(V)` with `f, g ∈ W^1_2(V)`, every direction `v` and the +weak derivatives `f_v = ∂_v f`, `g_v = ∂_v g` in `L_2(V)`, +`∫_Ω f_v g + f g_v = ∑_j ∫_{H_j} ψ_j(γ_j x') Tr_j f Tr_j g n^j_v dx'` +(`Rd.BoundedLipschitzDomain.setIntegral_green_besselPotentialSpace`). -/ +theorem setIntegral_green (ψ : Ω.BoundaryPartition) (f g : Lp ℂ 2 (volume : Measure V)) + (hf : MemSobolev 1 f) (hg : MemSobolev 1 g) (v : V) {fv gv : Lp ℂ 2 (volume : Measure V)} + (hfv : HasWeakLineDeriv ⊤ (fun _ : Fin 1 => v) f fv) + (hgv : HasWeakLineDeriv ⊤ (fun _ : Fin 1 => v) g gv) : + ∫ x in Ω.carrier, fv x * g x + f x * gv x = + ∑ j, ∫ x', ψ.toComplex j ((Ω.graph j).graphMap x') * + (Ω.graph j).trace two_ne_top 2 f x' * (Ω.graph j).trace two_ne_top 2 g x' * + ((Ω.graph j).normalWeight v x' : ℂ) := by + obtain ⟨U, rfl⟩ := exists_toL2_eq_of_memSobolev hf + obtain ⟨W, rfl⟩ := exists_toL2_eq_of_memSobolev hg + rw [← weakDerivL2_eq hfv, ← weakDerivL2_eq hgv] + exact Ω.setIntegral_green_besselPotentialSpace ψ U W v + +/-! ### The zero extension of functions with vanishing trace -/ + +/-- **Functions with vanishing trace have no boundary term**: for `u` in the trace kernel, +`W ∈ H^1(V)` and every direction `v`, `∫_Ω (∂_v u) W + u ∂_v W = 0` +(`Rd.BoundedLipschitzDomain.setIntegral_green_surface`, `γ_{L_2} u = 0` by +`Rd.BoundedLipschitzDomain.ker_boundaryTraceL2`). -/ +theorem setIntegral_green_of_mem_traceKer {u : Ω.SobolevOne} (hu : u ∈ Ω.traceKer) + (W : H^{1}(V)) (v : V) : + ∫ x in Ω.carrier, weakDerivL2 v (u : H^{1}(V)) x * toL2 W x + + toL2 (u : H^{1}(V)) x * weakDerivL2 v W x = 0 := by + have h0 : Ω.ambientTraceL2 (u : H^{1}(V)) = 0 := by + have hk : u ∈ (Ω.boundaryTraceL2).ker := by + rw [Ω.ker_boundaryTraceL2] + exact hu + rw [← Ω.boundaryTraceL2_eq_ambientTraceL2] + exact LinearMap.mem_ker.1 hk + rw [Ω.setIntegral_green_surface, h0] + refine integral_eq_zero_of_ae ?_ + filter_upwards [Lp.coeFn_zero (E := ℂ) (p := 2) (μ := Ω.surfaceMeasure)] with y hy + rw [hy] + simp + +/-- **The weak derivatives of the zero extension**: for `u` in the trace kernel and every +direction `v`, the zero extension `1_Ω ∂_v u` of the weak derivative is the weak derivative of the +zero extension `1_Ω u` on `V`. Tested against `φ`, this is +`∫_Ω (∂_v u) φ = -∫_Ω u ∂_v φ`, Green's formula without boundary term +(`Rd.BoundedLipschitzDomain.setIntegral_green_of_mem_traceKer`). -/ +theorem hasWeakLineDeriv_indicatorLp_of_mem_traceKer {u : Ω.SobolevOne} (hu : u ∈ Ω.traceKer) + (v : V) : + HasWeakLineDeriv ⊤ (fun _ : Fin 1 => v) (indicatorLp Ω.measurableSet (toL2 (u : H^{1}(V)))) + (indicatorLp Ω.measurableSet (weakDerivL2 v (u : H^{1}(V)))) := by + refine (hasWeakLineDeriv_iff_integral (locallyIntegrableOn_top_Lp _) + (locallyIntegrableOn_top_Lp _)).2 fun φ => ?_ + obtain ⟨W, hWdef⟩ : ∃ W : H^{1}(V), W = ofSchwartz 1 (testSchwartz φ) := ⟨_, rfl⟩ + have hW : (toL2 W : V → ℂ) =ᵐ[volume] fun x => (φ x : ℂ) := by + rw [hWdef, toL2_ofSchwartz] + filter_upwards [(testSchwartz φ).coeFn_toLp 2 volume] with x hx + rw [hx, testSchwartz_apply] + have hdW : (weakDerivL2 v W : V → ℂ) =ᵐ[volume] fun x => ((∂_{v} φ) x : ℂ) := by + rw [hWdef, weakDerivL2_ofSchwartz, lineDerivOp_testSchwartz] + filter_upwards [(testSchwartz (∂_{v} φ)).coeFn_toLp 2 volume] with x hx + rw [hx, testSchwartz_apply] + have h0 := Ω.setIntegral_green_of_mem_traceKer hu W v + have i1 : Integrable (fun x => weakDerivL2 v (u : H^{1}(V)) x * toL2 W x) + (volume.restrict Ω.carrier) := ((Lp.memLp _).integrable_mul (Lp.memLp _)).restrict + have i2 : Integrable (fun x => toL2 (u : H^{1}(V)) x * weakDerivL2 v W x) + (volume.restrict Ω.carrier) := ((Lp.memLp _).integrable_mul (Lp.memLp _)).restrict + rw [integral_add i1 i2, add_eq_zero_iff_eq_neg] at h0 + have e1 := integral_smul_indicatorLp_eq_setIntegral_mul Ω.measurableSet + (weakDerivL2 v (u : H^{1}(V))) hW + have e2 := integral_smul_indicatorLp_eq_setIntegral_mul Ω.measurableSet + (toL2 (u : H^{1}(V))) hdW + simp only [LineDeriv.iteratedLineDerivOp_one] + rw [e1, e2, h0, pow_one, neg_one_smul] + +/-- **The zero extension of a function with vanishing trace lies in `W^1_2(V)`**: for `u` in the +trace kernel, `1_Ω u ∈ W^1_2(V)`, with the weak derivatives `1_Ω ∂_v u` +(`Rd.BoundedLipschitzDomain.hasWeakLineDeriv_indicatorLp_of_mem_traceKer`, +`Rd.memSobolev_one_of_forall_hasWeakLineDeriv`). -/ +theorem memSobolev_indicatorLp_of_mem_traceKer {u : Ω.SobolevOne} (hu : u ∈ Ω.traceKer) : + MemSobolev 1 (indicatorLp Ω.measurableSet (toL2 (u : H^{1}(V)))) := + memSobolev_one_of_forall_hasWeakLineDeriv fun v => + ⟨_, Ω.hasWeakLineDeriv_indicatorLp_of_mem_traceKer hu v⟩ + +/-- **A function whose zero extension lies in `W^1_2(V)` has vanishing trace**: if +`1_Ω u ∈ W^1_2(V)` for `u ∈ H^1(Ω)`, then `u` lies in the trace kernel. In the chart `j`, the +trace of `u` is the trace of `F = 1_Ω u` (they agree on `Ω_j ∩ B_j`, +`Rd.LipschitzGraph.trace_ae_eq_of_ae_eq`), and `F` vanishes on the part of the lower domain in +`B_j`, which lies outside `Ω`, so its trace vanishes +(`Rd.LipschitzGraph.traceH1_ae_eq_zero_of_lower`). -/ +theorem mem_traceKer_of_memSobolev_indicatorLp {u : Ω.SobolevOne} + (hu : MemSobolev 1 (indicatorLp Ω.measurableSet (toL2 (u : H^{1}(V))))) : u ∈ Ω.traceKer := by + obtain ⟨F, hF⟩ := exists_toL2_eq_of_memSobolev hu + have hFe : (toL2 F : V → ℂ) =ᵐ[volume] Ω.carrier.indicator (toL2 (u : H^{1}(V))) := by + rw [hF] + exact indicatorLp_apply_ae _ _ + rw [Ω.mem_traceKer_iff Ω.boundaryPartition, EventuallyEq, Ω.eventually_aeBoundary_iff] + intro j + have hB := Ω.inter_ball_eq j le_rfl + have h1 := (Ω.graph j).trace_ae_eq_of_ae_eq two_ne_top 2 (s := 1 / 2) (by norm_num) one_le_two + ((Ω.graph j).intrinsicNorm_toL2_lt_top (u : H^{1}(V))) + ((Ω.graph j).intrinsicNorm_toL2_lt_top F) isOpen_ball (by + filter_upwards [hFe] with x hx hxd hxB + have hxΩ : x ∈ Ω.carrier := ((Set.ext_iff.1 hB x).2 ⟨hxd, hxB⟩).1 + rw [hx, indicator_of_mem hxΩ]) + have h2 := (Ω.graph j).traceH1_ae_eq_zero_of_lower (U := F) isOpen_ball (by + filter_upwards [hFe] with x hx hxd hxB + have hxΩ : x ∉ Ω.carrier := fun h => (Ω.graph j).notMem_domain_of_mem_lower_domain hxd + ((Set.ext_iff.1 hB x).1 ⟨h, hxB⟩).1 + rw [hx, indicator_of_notMem hxΩ]) + filter_upwards [h1, h2, Ω.boundaryTrace_graphMap Ω.boundaryPartition two_ne_top one_le_two + (s := 1 / 2) (by norm_num) (by norm_num) one_le_two (modNorm_toL2_lt_top (u : H^{1}(V))) j] + with x' a b c hj + rw [c hj, a hj, Pi.zero_apply] + exact b hj + +/-- **Zero extension and vanishing trace**: for `u ∈ H^1(Ω)`, the zero extension `1_Ω u` lies in +`W^1_2(V)` iff `u` lies in the trace kernel, that is, iff its trace vanishes almost everywhere on +`Γ` +(`Rd.BoundedLipschitzDomain.memSobolev_indicatorLp_of_mem_traceKer`, +`Rd.BoundedLipschitzDomain.mem_traceKer_of_memSobolev_indicatorLp`). -/ +theorem memSobolev_indicatorLp_iff_mem_traceKer (u : Ω.SobolevOne) : + MemSobolev 1 (indicatorLp Ω.measurableSet (toL2 (u : H^{1}(V)))) ↔ u ∈ Ω.traceKer := + ⟨Ω.mem_traceKer_of_memSobolev_indicatorLp, Ω.memSobolev_indicatorLp_of_mem_traceKer⟩ + +end BoundedLipschitzDomain + +end Rd diff --git a/LeanPool/FunctionSpaces/Domains/Sobolev/LipschitzDomainH1.lean b/LeanPool/FunctionSpaces/Domains/Sobolev/LipschitzDomainH1.lean new file mode 100644 index 0000000000..e149175ecf --- /dev/null +++ b/LeanPool/FunctionSpaces/Domains/Sobolev/LipschitzDomainH1.lean @@ -0,0 +1,293 @@ +/- +Copyright (c) 2026 Mario Ullrich. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Mario Ullrich +-/ +module + +public import LeanPool.FunctionSpaces.Rd.Sobolev.SobolevTwoLittlewoodPaley +public import LeanPool.FunctionSpaces.Domains.Traces.LipschitzBoundaryTrace +public import LeanPool.FunctionSpaces.Domains.Sobolev.SobolevRestrictionSpaces + +/- +Modified for Lean Pool: module names and imports adapted. +-/ + +/-! +# `H^1` on bounded Lipschitz domains + +Let `Ω` be a bounded Lipschitz domain with boundary `Γ` in a finite-dimensional real inner product +space `V`, such as `ℝ^d`, with Lebesgue measure. The Sobolev space `H^1(Ω)` is the space of +restrictions of `H^1(V) = W^1_2(V)` (`Rd.BoundedLipschitzDomain.MemSobolevOn`): `f ∈ L_2(V)` lies +in `H^1(Ω)` if it agrees almost everywhere on `Ω` with some `F ∈ W^1_2(V)`; membership depends +only on the values of `f` on `Ω` (`Rd.BoundedLipschitzDomain.MemSobolevOn.congr_ae`). The open +set `Ω` has finite measure (`Rd.BoundedLipschitzDomain.isFiniteMeasure_volume_restrict`). + +* **The intrinsic description** (`Rd.BoundedLipschitzDomain.memSobolevOn_iff_modulusOn`): + `f ∈ H^1(Ω)` iff `‖f‖_{L_2(Ω)} + ‖(2^k ω_r(f, 2^(-k), Ω)_2)_k‖_{ℓ_2} < ∞`, for every order + `r ≥ 2`, by `W^1_2(V) = B^1_{2,2}(V)` and the extension theorem for bounded Lipschitz domains. + This quantity is at most `‖F‖_2 + ‖(2^k ω_r(F, 2^(-k))_2)_k‖_{ℓ_2}` for every `F` with `F = f` + on `Ω` (`Rd.BoundedLipschitzDomain.modNormOn_le_modNorm_of_ae_eq`). +* **The Hilbert space** (`Rd.BoundedLipschitzDomain.memSobolevOn_iff_exists_restrictL2`): + `f ∈ H^1(Ω)` iff its restriction to `Ω` is `u|_Ω` for some `u` in the Hilbert space `H^1(Ω)` + of restrictions of Mathlib's `H^1(V)` (`Rd.RestrictionSpace`). +* **The weak gradient** (`Rd.BoundedLipschitzDomain.MemSobolevOn.memWeakSobolev`): every + `f ∈ H^1(Ω)` lies in `W^1_2(Ω)`, so its weak derivatives on `Ω` exist and lie in `L_2(Ω)`. + This direction holds by the definition through extensions; the converse is the extension + theorem (`Rd.BoundedLipschitzDomain.memSobolevOn_iff_memWeakSobolev`). +* **The trace**: every `f ∈ H^1(Ω)` has a boundary trace in `B^{1/2}_{2,2}(Γ)`, unique almost + everywhere on `Γ` (`Rd.BoundedLipschitzDomain.exists_isBoundaryTrace_of_memSobolevOn`, + `Rd.BoundedLipschitzDomain.MemSobolevOn.isBoundaryTrace_unique`), and the boundary traces of the + functions of `H^1(Ω)` are the functions of `B^{1/2}_{2,2}(Γ)` + (`Rd.BoundedLipschitzDomain.memBoundaryBesov_iff_exists_memSobolevOn`). The extensions in the + definition of the boundary trace are the `F ∈ W^1_2(V)` with `F = f` on `Ω` + (`Rd.BoundedLipschitzDomain.isBoundaryTrace_iff_forall_memSobolev`), and `f` has the boundary + trace `g` with a finite intrinsic norm iff `f ∈ H^1(Ω)` and `g` is its boundary trace + (`Rd.BoundedLipschitzDomain.hasBoundaryTrace_iff_memSobolevOn`). +-/ + +@[expose] public section + +open MeasureTheory TopologicalSpace +open scoped ENNReal + +open ENNReal (lqNorm dyadicWeight) + +namespace Rd + +variable {V : Type*} [NormedAddCommGroup V] [InnerProductSpace ℝ V] + +/-- The open set of a bounded Lipschitz domain, as an element of Mathlib's `Opens V`, the form +in which open sets carry distributions and weak derivatives. -/ +def BoundedLipschitzDomain.toOpens (Ω : BoundedLipschitzDomain V) : Opens V := + ⟨Ω.carrier, Ω.isOpen⟩ + +/-- The points of `Ω.toOpens` are the points of `Ω`. -/ +@[simp] +theorem BoundedLipschitzDomain.coe_toOpens (Ω : BoundedLipschitzDomain V) : + (Ω.toOpens : Set V) = Ω.carrier := + rfl + +variable [FiniteDimensional ℝ V] [MeasurableSpace V] [BorelSpace V] + +/-- Lebesgue measure restricted to a bounded Lipschitz domain is finite, as the domain is +bounded. -/ +instance BoundedLipschitzDomain.isFiniteMeasure_volume_restrict (Ω : BoundedLipschitzDomain V) : + IsFiniteMeasure (volume.restrict (Ω.toOpens : Set V)) := + isFiniteMeasure_restrict.2 Ω.isBounded.measure_lt_top.ne + +/-! ### The restriction space `H^1(Ω)` -/ + +namespace BoundedLipschitzDomain + +variable (Ω : BoundedLipschitzDomain V) + +/-- **The Sobolev space `H^1(Ω)`** of a bounded Lipschitz domain, as the space of restrictions: +`f ∈ L_2(V)` lies in `H^1(Ω)` if `f = F` almost everywhere on `Ω` for some `F ∈ W^1_2(V)`, which is +Mathlib's `H^1(V)` (`Rd.memSobolev_one_iff`). Only the values of `f` on `Ω` matter +(`Rd.BoundedLipschitzDomain.MemSobolevOn.congr_ae`). By this definition every such `f` lies in +the Sobolev space `W^1_2(Ω)` of weak derivatives on `Ω` +(`Rd.BoundedLipschitzDomain.MemSobolevOn.memWeakSobolev`); the converse is the extension theorem +of Calderón and Stein (Stein 1970, Chapter VI; +`Rd.BoundedLipschitzDomain.memSobolevOn_iff_memWeakSobolev`). -/ +def MemSobolevOn (f : Lp ℂ 2 (volume : Measure V)) : Prop := + ∃ F : Lp ℂ 2 (volume : Measure V), MemSobolev 1 F ∧ + (F : V → ℂ) =ᵐ[volume.restrict Ω.carrier] f + +variable {Ω} + +/-- Every `f ∈ W^1_2(V)` lies in `H^1(Ω)`. -/ +theorem memSobolevOn_of_memSobolev {f : Lp ℂ 2 (volume : Measure V)} (hf : MemSobolev 1 f) : + Ω.MemSobolevOn f := + ⟨f, hf, Filter.EventuallyEq.rfl⟩ + +/-- The zero class lies in `H^1(Ω)`. -/ +theorem zero_memSobolevOn : Ω.MemSobolevOn 0 := + memSobolevOn_of_memSobolev zero_memSobolev + +/-- `H^1(Ω)` only sees `f` almost everywhere on `Ω`. -/ +theorem MemSobolevOn.congr_ae {f f' : Lp ℂ 2 (volume : Measure V)} (hf : Ω.MemSobolevOn f) + (h : (f : V → ℂ) =ᵐ[volume.restrict Ω.carrier] f') : Ω.MemSobolevOn f' := by + obtain ⟨F, hF, hFf⟩ := hf + exact ⟨F, hF, hFf.trans h⟩ + +/-- `H^1(Ω)` is closed under addition. -/ +theorem MemSobolevOn.add {f f' : Lp ℂ 2 (volume : Measure V)} (hf : Ω.MemSobolevOn f) + (hf' : Ω.MemSobolevOn f') : Ω.MemSobolevOn (f + f') := by + obtain ⟨F, hF, hFf⟩ := hf + obtain ⟨F', hF', hFf'⟩ := hf' + have h1 : ⇑(F + F') =ᵐ[volume.restrict Ω.carrier] ⇑F + ⇑F' := + ae_restrict_of_ae (Lp.coeFn_add F F') + have h2 : ⇑(f + f') =ᵐ[volume.restrict Ω.carrier] ⇑f + ⇑f' := + ae_restrict_of_ae (Lp.coeFn_add f f') + exact ⟨F + F', hF.add hF', h1.trans ((hFf.add hFf').trans h2.symm)⟩ + +/-- `H^1(Ω)` is closed under multiplication by complex scalars. -/ +theorem MemSobolevOn.smul {f : Lp ℂ 2 (volume : Measure V)} (hf : Ω.MemSobolevOn f) (c : ℂ) : + Ω.MemSobolevOn (c • f) := by + obtain ⟨F, hF, hFf⟩ := hf + have h1 : ⇑(c • F) =ᵐ[volume.restrict Ω.carrier] c • ⇑F := + ae_restrict_of_ae (Lp.coeFn_smul c F) + have h2 : ⇑(c • f) =ᵐ[volume.restrict Ω.carrier] c • ⇑f := + ae_restrict_of_ae (Lp.coeFn_smul c f) + exact ⟨c • F, hF.smul c, h1.trans ((hFf.const_smul c).trans h2.symm)⟩ + +variable (Ω) + +/-- **`H^1(Ω)` by restrictions of `B^1_{2,2}(V)`**: `f ∈ H^1(Ω)` iff `f` agrees on `Ω` with some +`F` in the approximation space `A^1_2` of the band-limited functions on `V` +(`Rd.memSobolev_one_iff_memApprox`). -/ +theorem memSobolevOn_iff_exists_memApprox (f : Lp ℂ 2 (volume : Measure V)) : + Ω.MemSobolevOn f ↔ ∃ F : Lp ℂ 2 (volume : Measure V), + indicatorLp Ω.measurableSet F = indicatorLp Ω.measurableSet f ∧ + (bandScheme two_ne_top).MemApprox 1 2 F := by + refine exists_congr fun F => ?_ + rw [memSobolev_one_iff_memApprox, indicatorLp_eq_iff_ae_eq_restrict, and_comm] + +/-- **`H^1(Ω)` by intrinsic differences**: for every order `r ≥ 2`, `f ∈ L_2(V)` lies in `H^1(Ω)` +iff `‖f‖_{L_2(Ω)} + ‖(2^k ω_r(f, 2^(-k), Ω)_2)_k‖_{ℓ_2} < ∞`, with the moduli of smoothness of `f` +inside `Ω`. This is the extension theorem for bounded Lipschitz domains +(`Rd.BoundedLipschitzDomain.exists_memApprox_extension_iff`) at `p = q = 2`, `s = 1`. -/ +theorem memSobolevOn_iff_modulusOn {r : ℕ} (hr : 2 ≤ r) (f : Lp ℂ 2 (volume : Measure V)) : + Ω.MemSobolevOn f ↔ modNormOn Ω.measurableSet r 1 2 f < ∞ := by + have hr' : (1 : ℝ) < r := by exact_mod_cast Nat.lt_of_lt_of_le one_lt_two hr + rw [memSobolevOn_iff_exists_memApprox, + Ω.exists_memApprox_extension_iff two_ne_top one_pos hr' one_le_two f] + +/-- **The intrinsic norm is at most the norm of every extension**: for every order `r` and all +`F, f ∈ L_2(V)` with `F = f` almost everywhere on `Ω`, +`‖f‖_{L_2(Ω)} + ‖(2^k ω_r(f, 2^(-k), Ω)_2)_k‖_{ℓ_2} ≤ ‖F‖_2 + ‖(2^k ω_r(F, 2^(-k))_2)_k‖_{ℓ_2}` +(`Rd.modNormOn_le_modNorm_of_indicatorLp`). For `F ∈ W^1_2(V)` this bounds the intrinsic +quantity of `f ∈ H^1(Ω)` by the `B^1_{2,2}(V)` quantity of its extension `F`, with constant `1`. -/ +theorem modNormOn_le_modNorm_of_ae_eq (r : ℕ) {F f : Lp ℂ 2 (volume : Measure V)} + (hFf : (F : V → ℂ) =ᵐ[volume.restrict Ω.carrier] f) : + modNormOn Ω.measurableSet r 1 2 f ≤ + ‖F‖ₑ + lqNorm 2 (fun k => dyadicWeight 1 k * lpModulus 2 r F k) := + modNormOn_le_modNorm_of_indicatorLp Ω.measurableSet r 1 2 + ((indicatorLp_eq_iff_ae_eq_restrict _).2 hFf) + +variable {Ω} + +/-- **Extensions with finite Besov norm**: for every order `r ≥ 2`, every `f ∈ H^1(Ω)` agrees on +`Ω` with some `F ∈ L_2(V)` with `‖F‖_2 + ‖(2^k ω_r(F, 2^(-k))_2)_k‖_{ℓ_2} < ∞`. -/ +theorem MemSobolevOn.exists_modNorm_lt_top {r : ℕ} (hr : 2 ≤ r) + {f : Lp ℂ 2 (volume : Measure V)} (hf : Ω.MemSobolevOn f) : + ∃ F : Lp ℂ 2 (volume : Measure V), + indicatorLp Ω.measurableSet F = indicatorLp Ω.measurableSet f ∧ + ‖F‖ₑ + lqNorm 2 (fun k => dyadicWeight 1 k * lpModulus 2 r F k) < ∞ := by + obtain ⟨F, hF, hFf⟩ := hf + exact ⟨F, (indicatorLp_eq_iff_ae_eq_restrict _).2 hFf, (memSobolev_one_iff_modulus hr F).1 hF⟩ + +/-! ### The weak gradient -/ + +/-- **Functions of `H^1(Ω)` are weakly differentiable on `Ω`**: every `f ∈ H^1(Ω)` lies in the +Sobolev space `W^1_2(Ω)`, that is, `f ∈ L_2(Ω)` and every weak derivative `∂_v f` exists on `Ω` +and lies in `L_2(Ω)`. The extension `F ∈ W^1_2(V)` has these weak derivatives on `V`; they restrict +to `Ω` (`Rd.MemWeakSobolev.mono_set`), and `F = f` on `Ω`. -/ +theorem MemSobolevOn.memWeakSobolev {f : Lp ℂ 2 (volume : Measure V)} (hf : Ω.MemSobolevOn f) : + MemWeakSobolev Ω.toOpens 1 2 f := by + obtain ⟨F, hF, hFf⟩ := hf + exact (MemWeakSobolev.mono_set hF le_top).congr_ae hFf + +/-! ### The trace -/ + +variable (Ω) + +/-- **Boundary traces of `H^1` functions**: for `L = 2`, `σ = 1` and `q = 2`, the functions `F` in +the definition of a boundary trace (`Rd.BoundedLipschitzDomain.IsBoundaryTrace`) are the +`F ∈ W^1_2(V)` with `F = f` almost everywhere on `Ω` (`Rd.memSobolev_one_iff_modulus` with +`r = 2`): `g` is the boundary trace of `f` iff `Tr_Γ F = g` almost everywhere on `Γ` for every such +`F`. -/ +theorem isBoundaryTrace_iff_forall_memSobolev (ψ : Ω.BoundaryPartition) + (f : Lp ℂ 2 (volume : Measure V)) (g : V → ℂ) : + Ω.IsBoundaryTrace ψ two_ne_top 2 1 2 f g ↔ ∀ F : Lp ℂ 2 (volume : Measure V), MemSobolev 1 F → + (F : V → ℂ) =ᵐ[volume.restrict Ω.carrier] f → + Ω.boundaryTrace ψ two_ne_top 2 F =ᶠ[Ω.aeBoundary] g := by + unfold IsBoundaryTrace + refine forall_congr' fun F => ?_ + rw [memSobolev_one_iff_modulus le_rfl F, indicatorLp_eq_iff_ae_eq_restrict] + exact ⟨fun h hF hFf => h hFf hF, fun h hFf hF => h hF hFf⟩ + +/-- **Boundary traces of `H^1` functions with a finite intrinsic norm**: for `L = 2`, `σ = 1` and +`q = 2`, `f` has the boundary trace `g` (`Rd.BoundedLipschitzDomain.HasBoundaryTrace`) iff +`f ∈ H^1(Ω)` and `g` is the boundary trace of `f`, since the finite intrinsic norm describes +`H^1(Ω)` (`Rd.BoundedLipschitzDomain.memSobolevOn_iff_modulusOn` with `r = 2`). -/ +theorem hasBoundaryTrace_iff_memSobolevOn (ψ : Ω.BoundaryPartition) + (f : Lp ℂ 2 (volume : Measure V)) (g : V → ℂ) : + Ω.HasBoundaryTrace ψ two_ne_top 2 1 2 f g ↔ + Ω.MemSobolevOn f ∧ Ω.IsBoundaryTrace ψ two_ne_top 2 1 2 f g := by + rw [hasBoundaryTrace_iff, Ω.memSobolevOn_iff_modulusOn le_rfl f] + +/-- **The trace space of `H^1(Ω)`**: for every resolution of unity `ψ` on the boundary `Γ`, a +function `g` on `Γ` lies in `B^{1/2}_{2,2}(Γ)` iff it is the boundary trace of some `f ∈ H^1(Ω)`. +This is the trace space of bounded Lipschitz domains +(`Rd.BoundedLipschitzDomain.memBoundaryBesov_iff_exists_isBoundaryTrace`) at `p = q = 2`, +`s = 1/2`, where `s + 1/p = 1`, with the intrinsic description of `H^1(Ω)`. -/ +theorem memBoundaryBesov_iff_exists_memSobolevOn (ψ : Ω.BoundaryPartition) (g : V → ℂ) : + Ω.MemBoundaryBesov 2 ψ (1 / 2) 2 g ↔ ∃ f : Lp ℂ 2 (volume : Measure V), + Ω.MemSobolevOn f ∧ Ω.IsBoundaryTrace ψ two_ne_top 2 1 2 f g := by + have hσ : (1 / 2 : ℝ) + 1 / (2 : ℝ≥0∞).toReal = 1 := by norm_num + rw [Ω.memBoundaryBesov_iff_exists_isBoundaryTrace ψ two_ne_top le_rfl (s := 1 / 2) + (by norm_num) (by norm_num) one_le_two g, hσ] + exact exists_congr fun f => and_congr_left' (Ω.memSobolevOn_iff_modulusOn le_rfl f).symm + +variable {Ω} + +/-- **The boundary trace of a function of `H^1(Ω)`**: for every resolution of unity `ψ` on the +boundary `Γ`, every `f ∈ H^1(Ω)` has a boundary trace `g ∈ B^{1/2}_{2,2}(Γ)` +(`Rd.BoundedLipschitzDomain.exists_isBoundaryTrace_of_modNormOn_lt_top` at `p = q = 2`, +`s = 1/2`, where `s + 1/p = 1`, with the intrinsic description of `H^1(Ω)`). -/ +theorem exists_isBoundaryTrace_of_memSobolevOn (ψ : Ω.BoundaryPartition) + {f : Lp ℂ 2 (volume : Measure V)} (hf : Ω.MemSobolevOn f) : + ∃ g : V → ℂ, Ω.MemBoundaryBesov 2 ψ (1 / 2) 2 g ∧ + Ω.IsBoundaryTrace ψ two_ne_top 2 1 2 f g := by + have hσ : (1 / 2 : ℝ) + 1 / (2 : ℝ≥0∞).toReal = 1 := by norm_num + obtain ⟨g, hg, hfg⟩ := Ω.exists_isBoundaryTrace_of_modNormOn_lt_top ψ two_ne_top le_rfl + (s := 1 / 2) (by norm_num) (by norm_num) one_le_two + (by rw [hσ]; exact (Ω.memSobolevOn_iff_modulusOn le_rfl f).1 hf) + rw [hσ] at hfg + exact ⟨g, hg, hfg⟩ + +/-- **Every function of `B^{1/2}_{2,2}(Γ)` is the boundary trace of a function of `H^1(Ω)`**: for +every resolution of unity `ψ` on `Γ` and every `g ∈ B^{1/2}_{2,2}(Γ)` there is `f ∈ H^1(Ω)` with +boundary trace `g` (`Rd.BoundedLipschitzDomain.memBoundaryBesov_iff_exists_memSobolevOn`). -/ +theorem exists_memSobolevOn_of_memBoundaryBesov (ψ : Ω.BoundaryPartition) {g : V → ℂ} + (hg : Ω.MemBoundaryBesov 2 ψ (1 / 2) 2 g) : + ∃ f : Lp ℂ 2 (volume : Measure V), Ω.MemSobolevOn f ∧ + Ω.IsBoundaryTrace ψ two_ne_top 2 1 2 f g := + (Ω.memBoundaryBesov_iff_exists_memSobolevOn ψ g).1 hg + +/-- **The boundary trace of a function of `H^1(Ω)` is unique** up to null sets of the boundary: +for every resolution of unity `ψ` on `Γ`, two boundary traces `g`, `g'` of `f ∈ H^1(Ω)` agree +almost everywhere on `Γ` (`Rd.BoundedLipschitzDomain.IsBoundaryTrace.unique` with the intrinsic +description of `H^1(Ω)`). -/ +theorem MemSobolevOn.isBoundaryTrace_unique (ψ : Ω.BoundaryPartition) + {f : Lp ℂ 2 (volume : Measure V)} (hf : Ω.MemSobolevOn f) {g g' : V → ℂ} + (hg : Ω.IsBoundaryTrace ψ two_ne_top 2 1 2 f g) + (hg' : Ω.IsBoundaryTrace ψ two_ne_top 2 1 2 f g') : g =ᶠ[Ω.aeBoundary] g' := + hg.unique one_pos (by norm_num) one_le_two ((Ω.memSobolevOn_iff_modulusOn le_rfl f).1 hf) hg' + +open scoped BesselPotentialSpace in +/-- **The predicate and the type agree**: for a bounded Lipschitz domain `Ω`, `f ∈ L_2(V)` lies +in `H^1(Ω)` in the sense of `Rd.BoundedLipschitzDomain.MemSobolevOn` iff its restriction to `Ω` +is `u|_Ω` for some `u` in the Hilbert space `H^1(Ω)`. -/ +theorem memSobolevOn_iff_exists_restrictL2 (Ω : BoundedLipschitzDomain V) + (f : Lp ℂ 2 (volume : Measure V)) : + Ω.MemSobolevOn f ↔ ∃ u : RestrictionSpace 1 Ω.toOpens, + restrictL2 Ω.toOpens u = LpToLpRestrictCLM V ℂ ℂ volume 2 Ω.carrier f := by + constructor + · rintro ⟨F, hF, hFf⟩ + have hS := (memSobolev_one_iff F).1 hF + have hU : toL2 hS.toBesselPotentialSpace = F := + toL2_eq_of_toDistr_eq _ hS.toBesselPotentialSpace_toDistr.symm + refine ⟨restrictProj 1 Ω.toOpens hS.toBesselPotentialSpace, ?_⟩ + rw [restrictL2_restrictProj, hU] + exact Lp.ext ((LpToLpRestrictCLM_coeFn ℂ _ _).trans + (hFf.trans (LpToLpRestrictCLM_coeFn ℂ _ _).symm)) + · rintro ⟨u, hu⟩ + refine ⟨toL2 (u : H^{1}(V)), memSobolev_toL2 _, ?_⟩ + exact (restrictL2_eq_iff_ae_eq u f).1 hu + +end BoundedLipschitzDomain + +end Rd diff --git a/LeanPool/FunctionSpaces/Domains/Sobolev/LipschitzDomainW1p.lean b/LeanPool/FunctionSpaces/Domains/Sobolev/LipschitzDomainW1p.lean new file mode 100644 index 0000000000..16fec8a282 --- /dev/null +++ b/LeanPool/FunctionSpaces/Domains/Sobolev/LipschitzDomainW1p.lean @@ -0,0 +1,156 @@ +/- +Copyright (c) 2026 Mario Ullrich. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Mario Ullrich +-/ +module + +public import LeanPool.FunctionSpaces.Domains.Extension.ReflectionExtensionOperator + +/- +Modified for Lean Pool: module names and imports adapted. +-/ + +/-! +# `W^1_p` on bounded Lipschitz domains as the space of restrictions + +Let `Ω` be a bounded Lipschitz domain in a finite-dimensional real inner product space `V` of +dimension `n`. By the extension theorem, every `f ∈ W^1_p(Ω)` (weak derivatives on `Ω`) +agrees on `Ω` with some `F ∈ W^1_p(V)`, for every `1 ≤ p ≤ ∞`, by reflection +(`Rd.BoundedLipschitzDomain.memWeakSobolev_iff_exists_memSobolev`). For `p = 2` this gives: + +* `H^1(Ω) = W^1_2(Ω)`: the restriction space `H^1(Ω)` is the weak-derivative space + (`Rd.BoundedLipschitzDomain.memSobolevOn_iff_memWeakSobolev`, + `Rd.BoundedLipschitzDomain.memWeakSobolev_iff_exists_restrictL2`); +* Rellich's theorem in `W^1_2(Ω)` + (`Rd.BoundedLipschitzDomain.exists_subseq_tendsto_of_memWeakSobolev`), from the bounded + extensions of `Rd.BoundedLipschitzDomain.exists_extendsSobolev`; +* the quotient norm of `H^1(Ω)` is bounded by the `W^1_2(Ω)` norm + (`Rd.BoundedLipschitzDomain.exists_norm_le_restrictL2`), so the two norms are equivalent; +* the boundary traces of `H^1(Ω)` serve for `W^1_2(Ω)` + (`Rd.BoundedLipschitzDomain.exists_isBoundaryTrace_of_memWeakSobolev`, + `Rd.BoundedLipschitzDomain.isBoundaryTrace_unique_of_memWeakSobolev`). +-/ + +@[expose] public section + +open MeasureTheory Filter Topology Module Metric TopologicalSpace +open scoped ENNReal SchwartzMap FourierTransform LineDeriv Real BesselPotentialSpace + +namespace Rd + +variable {V : Type*} [NormedAddCommGroup V] [InnerProductSpace ℝ V] [FiniteDimensional ℝ V] + [MeasurableSpace V] [BorelSpace V] {p : ℝ≥0∞} + +namespace BoundedLipschitzDomain + +variable (Ω : BoundedLipschitzDomain V) + +/-- **`H^1(Ω) = W^1_2(Ω)`**: for a bounded Lipschitz domain `Ω`, `f ∈ L_2(V)` +lies in the restriction space `H^1(Ω)` iff it lies in the Sobolev space +`W^1_2(Ω)` of weak derivatives on `Ω`. -/ +theorem memSobolevOn_iff_memWeakSobolev (f : Lp ℂ 2 (volume : Measure V)) : + Ω.MemSobolevOn f ↔ MemWeakSobolev Ω.toOpens 1 2 f := + (Ω.memWeakSobolev_iff_exists_memSobolev one_le_two f).symm + +/-- **Rellich's theorem in `W^1_2(Ω)`**, the form with weak derivatives: for a bounded +Lipschitz domain `Ω` in dimension `n ≥ 1`, every sequence `f_n ∈ L_2(Ω)` with weak derivatives +`g_{n,i} = ∂_{e_i} f_n ∈ L_2(Ω)` and `‖f_n‖_{L_2(Ω)} + ∑_i ‖g_{n,i}‖_{L_2(Ω)} ≤ M` has a +subsequence converging in `L_2(Ω)`: the bounded extensions +(`Rd.BoundedLipschitzDomain.exists_extendsSobolev`) are bounded in `W^1_2(V)`, and Rellich's +compactness on `V` (`Rd.exists_subseq_tendsto_restr_of_hasWeakLineDeriv`) gives the subsequence. +-/ +theorem exists_subseq_tendsto_of_memWeakSobolev [Nontrivial V] {f : ℕ → V → ℂ} + {g : ℕ → Fin (finrank ℝ V) → V → ℂ} (hf : ∀ n, MemLp (f n) 2 (volume.restrict Ω.carrier)) + (hg : ∀ n i, MemLp (g n i) 2 (volume.restrict Ω.carrier)) + (hfg : ∀ n i, HasWeakLineDeriv Ω.toOpens (fun _ : Fin 1 => gridBasis V i) (f n) (g n i)) + {M : ℝ≥0∞} (hM : M ≠ ∞) (hb : ∀ n, eLpNorm (f n) 2 (volume.restrict Ω.carrier) + + ∑ i, eLpNorm (g n i) 2 (volume.restrict Ω.carrier) ≤ M) : + ∃ φ : ℕ → ℕ, StrictMono φ ∧ ∃ u : Lp ℂ 2 (volume.restrict Ω.carrier), + Tendsto (fun k => eLpNorm (f (φ k) - (u : V → ℂ)) 2 (volume.restrict Ω.carrier)) atTop + (𝓝 0) := by + obtain ⟨C, hC, hext⟩ := Ω.exists_extendsSobolev (p := 2) ENNReal.one_lt_two ENNReal.ofNat_ne_top + choose F hF hFf G hG hFG using fun n => hext (f n) (g n) (hf n) (hg n) (hfg n) + have hK : C * M ≠ ∞ := ENNReal.mul_ne_top hC hM + obtain ⟨φ, hφ, u, hu⟩ := exists_subseq_tendsto_restr_of_hasWeakLineDeriv Ω.isBounded + (gridBasis V) hG (M := (C * M).toReal) fun n => + sq_norm_add_sum_sq_le hK ((hFG n).trans (mul_le_mul_right (hb n) _)) + refine ⟨φ, hφ, u, ((Lp.tendsto_Lp_iff_tendsto_eLpNorm' _ _).1 hu).congr fun k => ?_⟩ + refine eLpNorm_congr_ae (EventuallyEq.sub ?_ EventuallyEq.rfl) + exact (LpToLpRestrictCLM_coeFn ℂ _ _).trans ((ae_restrict_iff' Ω.measurableSet).2 (hFf (φ k))) + +/-- **The quotient norm of `H^1(Ω)` is bounded by the `W^1_2(Ω)` norm**: for a bounded Lipschitz +domain `Ω` in dimension `n ≥ 1` there is a constant `C` such that every `u ∈ H^1(Ω)` and all +`g_i ∈ L_2(Ω)` with `g_i = ∂_{e_i} u` weakly on `Ω` (`u` read as its `L_2` function) satisfy +`‖u‖_{H^1(Ω)} ≤ C (‖u|_Ω‖_{L_2(Ω)} + ∑_i ‖g_i‖_{L_2(Ω)})`. With +`Rd.sq_norm_restrictL2_add_sum_le`, the quotient norm of `H^1(Ω)` and the `W^1_2(Ω)` norm are +equivalent. The bounded extension `F` of `u|_Ω` (`Rd.BoundedLipschitzDomain.exists_extendsSobolev`) +is an element of `H^1(V)` whose restriction is `u` (`Rd.restrictProj_eq_of_ae_eq`). -/ +theorem exists_norm_le_restrictL2 [Nontrivial V] : + ∃ C : ℝ, ∀ (u : RestrictionSpace 1 Ω.toOpens) + (g : Fin (finrank ℝ V) → Lp ℂ 2 (volume.restrict Ω.carrier)), + (∀ i, HasWeakLineDeriv Ω.toOpens (fun _ : Fin 1 => gridBasis V i) + (toL2 (u : H^{1}(V))) (g i)) → + ‖u‖ ≤ C * (‖restrictL2 Ω.toOpens u‖ + ∑ i, ‖g i‖) := by + obtain ⟨C, hC, hext⟩ := Ω.exists_extendsSobolev (p := 2) ENNReal.one_lt_two ENNReal.ofNat_ne_top + refine ⟨C.toReal, fun u g hg => ?_⟩ + have hf : MemLp (toL2 (u : H^{1}(V)) : V → ℂ) 2 (volume.restrict Ω.carrier) := + (Lp.memLp _).restrict _ + obtain ⟨F, hF, hFf, G, hG, hb⟩ := hext _ (fun i => g i) hf (fun i => Lp.memLp (g i)) hg + have hS := (memSobolev_one_iff F).1 hF + have hU : toL2 hS.toBesselPotentialSpace = F := + toL2_eq_of_toDistr_eq _ hS.toBesselPotentialSpace_toDistr.symm + have hproj : restrictProj 1 Ω.toOpens hS.toBesselPotentialSpace = u := + restrictProj_eq_of_ae_eq (by rw [hU]; exact (ae_restrict_iff' Ω.measurableSet).2 hFf) + have hY : eLpNorm (toL2 (u : H^{1}(V)) : V → ℂ) 2 (volume.restrict (Ω.toOpens : Set V)) + + ∑ i, eLpNorm (g i : V → ℂ) 2 (volume.restrict (Ω.toOpens : Set V)) = + ENNReal.ofReal (‖restrictL2 Ω.toOpens u‖ + ∑ i, ‖g i‖) := by + rw [ENNReal.ofReal_add (norm_nonneg _) (Finset.sum_nonneg fun i _ => norm_nonneg _), + ENNReal.ofReal_sum_of_nonneg fun i _ => norm_nonneg _, ofReal_norm, restrictL2_apply, + Lp.eNorm_def, eLpNorm_congr_ae (LpToLpRestrictCLM_coeFn ℂ _ _)] + simp_rw [ofReal_norm, Lp.eNorm_def] + rfl + rw [hY] at hb + have hFG : ‖F‖ + ∑ i, ‖G i‖ ≤ C.toReal * (‖restrictL2 Ω.toOpens u‖ + ∑ i, ‖g i‖) := by + have h1 := ENNReal.toReal_mono (ENNReal.mul_ne_top hC ENNReal.ofReal_ne_top) hb + rwa [toReal_enorm_add_sum, ENNReal.toReal_mul, ENNReal.toReal_ofReal (by positivity)] at h1 + calc ‖u‖ = ‖restrictProj 1 Ω.toOpens hS.toBesselPotentialSpace‖ := by rw [hproj] + _ ≤ ‖hS.toBesselPotentialSpace‖ := norm_restrictProj_apply_le _ + _ ≤ ‖toL2 hS.toBesselPotentialSpace‖ + ∑ i, ‖G i‖ := + norm_le_norm_toL2_add_sum (gridBasis V) _ fun i => by rw [hU]; exact hG i + _ ≤ _ := by rw [hU]; exact hFG + +/-- **`W^1_2(Ω)` and the Hilbert space `H^1(Ω)`**: for a bounded Lipschitz domain `Ω`, +`f ∈ L_2(V)` lies in `W^1_2(Ω)` iff its restriction to `Ω` is `u|_Ω` for some `u` in +the Hilbert space `H^1(Ω)` (`Rd.BoundedLipschitzDomain.memSobolevOn_iff_memWeakSobolev`, +`Rd.BoundedLipschitzDomain.memSobolevOn_iff_exists_restrictL2`). -/ +theorem memWeakSobolev_iff_exists_restrictL2 (f : Lp ℂ 2 (volume : Measure V)) : + MemWeakSobolev Ω.toOpens 1 2 f ↔ ∃ u : RestrictionSpace 1 Ω.toOpens, + restrictL2 Ω.toOpens u = LpToLpRestrictCLM V ℂ ℂ volume 2 Ω.carrier f := by + rw [← Ω.memSobolevOn_iff_memWeakSobolev f, Ω.memSobolevOn_iff_exists_restrictL2 f] + +/-- **The boundary trace of a function of `W^1_2(Ω)`**: for a bounded Lipschitz domain `Ω`, every +resolution of unity `ψ` on the boundary `Γ` and every `f ∈ L_2(V)` whose restriction lies in +`W^1_2(Ω)`, `f` has a boundary trace `g ∈ B^{1/2}_{2,2}(Γ)` +(`Rd.BoundedLipschitzDomain.exists_isBoundaryTrace_of_memSobolevOn` through +`Rd.BoundedLipschitzDomain.memSobolevOn_iff_memWeakSobolev`). -/ +theorem exists_isBoundaryTrace_of_memWeakSobolev (ψ : Ω.BoundaryPartition) + {f : Lp ℂ 2 (volume : Measure V)} (hf : MemWeakSobolev Ω.toOpens 1 2 f) : + ∃ g : V → ℂ, Ω.MemBoundaryBesov 2 ψ (1 / 2) 2 g ∧ + Ω.IsBoundaryTrace ψ two_ne_top 2 1 2 f g := + exists_isBoundaryTrace_of_memSobolevOn ψ ((Ω.memSobolevOn_iff_memWeakSobolev f).2 hf) + +/-- **The boundary trace of a function of `W^1_2(Ω)` is unique** up to null sets of the boundary: +for every resolution of unity `ψ` on `Γ` and every `f ∈ L_2(V)` whose restriction lies in +`W^1_2(Ω)`, two boundary traces `g`, `g'` of `f` agree almost everywhere on `Γ` +(`Rd.BoundedLipschitzDomain.MemSobolevOn.isBoundaryTrace_unique` through +`Rd.BoundedLipschitzDomain.memSobolevOn_iff_memWeakSobolev`). -/ +theorem isBoundaryTrace_unique_of_memWeakSobolev (ψ : Ω.BoundaryPartition) + {f : Lp ℂ 2 (volume : Measure V)} (hf : MemWeakSobolev Ω.toOpens 1 2 f) {g g' : V → ℂ} + (hg : Ω.IsBoundaryTrace ψ two_ne_top 2 1 2 f g) + (hg' : Ω.IsBoundaryTrace ψ two_ne_top 2 1 2 f g') : g =ᶠ[Ω.aeBoundary] g' := + MemSobolevOn.isBoundaryTrace_unique ψ ((Ω.memSobolevOn_iff_memWeakSobolev f).2 hf) hg hg' + +end BoundedLipschitzDomain + +end Rd diff --git a/LeanPool/FunctionSpaces/Domains/Sobolev/LipschitzGraphGreen.lean b/LeanPool/FunctionSpaces/Domains/Sobolev/LipschitzGraphGreen.lean new file mode 100644 index 0000000000..ddc3635ecf --- /dev/null +++ b/LeanPool/FunctionSpaces/Domains/Sobolev/LipschitzGraphGreen.lean @@ -0,0 +1,766 @@ +/- +Copyright (c) 2026 Mario Ullrich. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Mario Ullrich +-/ +module + +public import LeanPool.FunctionSpaces.Domains.Lipschitz.GraphStraightening +public import LeanPool.FunctionSpaces.Domains.Lipschitz.SurfaceMeasure +public import LeanPool.FunctionSpaces.Rd.Sobolev.WeakDerivativeChangeOfVariables +public import Mathlib.MeasureTheory.Integral.IntegralEqImproper +public import Mathlib.MeasureTheory.Function.Holder +public import Mathlib.Analysis.Calculus.ParametricIntegral + +/- +Modified for Lean Pool: module names and imports adapted. +-/ + +/-! +# Gauss–Green on Lipschitz graph domains + +Let `Ω = {x : φ(x) < ⟪x, e⟫}` be a Lipschitz graph domain in `V`, `dim V = n`, with the graph map +`γ(x') = x' + φ(x') e` over the hyperplane `H = e^⊥`, the gradient `∇φ` of `φ|_H`, the Gram density +`√(1 + ‖∇φ‖²)` and the outward unit normal `ν` of +`FunctionSpaces.Domains.Lipschitz.LipschitzGraphArea`. + +* **Fubini in product coordinates**: the coordinates `(x', t) ↦ x' + t e` and + `(x', t) ↦ γ(x') + t e` of `FunctionSpaces.Domains.Lipschitz.GraphStraightening` carry the + Lebesgue measure of `H × ℝ` to that of `V`, so + `∫_Ω F = ∫_H ∫_{φ(x')}^∞ F(x' + t e) dt dx' = ∫_H ∫_0^∞ F(γ(x') + t e) dt dx'` + (`Rd.LipschitzGraph.setIntegral_domain_eq`, `Rd.LipschitzGraph.setIntegral_domain_eq_graphMap`). +* **Gauss–Green for `C^1` functions** (`Rd.LipschitzGraph.setIntegral_lineDeriv_eq`): for + `g ∈ C^1` with compact support and every direction `v`, `∫_Ω ∂_v g = ∫_H g(γ x') n_v(x') dx'` + with the normal weight `n_v = ⟪∇φ, v⟫ - ⟪v, e⟫ = ⟪v, ν⟫ √(1 + ‖∇φ‖²)` + (`Rd.LipschitzGraph.normalWeight`, `Rd.LipschitzGraph.inner_normalAt_mul_gram`); with the area + formula, `∫_Ω ∂_v g = ∫_Γ g ⟪v, ν⟫ dμHE[n-1]` + (`Rd.LipschitzGraph.setIntegral_lineDeriv_eq_surface`). The proof uses the ray integral + `Ψ(y) = ∫_0^∞ g(y + t e) dt` (`Rd.rayIntegral`), a differentiable function with + `∂_e Ψ = -g` and bounded derivative, and the compactly supported Lipschitz function `Ψ ∘ γ` on + `H` (`Rd.LipschitzGraph.graphRayIntegral`): the integral of its line derivative vanishes + (`Rd.integral_lineDeriv_eq_zero_complex`, from Mathlib's integration by parts for Lipschitz + functions), and the chain rule at the points where `φ|_H` is differentiable gives the + horizontal directions (`Rd.LipschitzGraph.integral_fderiv_rayIntegral_graphMap`). +* **Green's formula for `W^1_2(V)`** (`Rd.LipschitzGraph.setIntegral_green`): for + `f, g ∈ W^1_2(V)` with weak derivatives `∂_v f`, `∂_v g` in `L_2(V)`, + `∫_Ω (∂_v f) g + f ∂_v g = ∫_H Tr f · Tr g · n_v`, with the product rule + (`Rd.lineDeriv_mul`), the trace operator `H^1(V) → L_2(H)` (`Rd.LipschitzGraph.traceH1`), the + density of compactly supported Schwartz functions in `H^1(V)` + (`Rd.dense_ofSchwartz_hasCompactSupport`) and the continuity of both sides; in surface form + the right side is `∫_Γ Tr f · Tr g ⟪v, ν⟫ dμHE[n-1]` + (`Rd.LipschitzGraph.setIntegral_green_surface`). +-/ + +@[expose] public section + +open MeasureTheory Module Metric Filter Topology Set +open scoped ENNReal NNReal SchwartzMap BesselPotentialSpace LineDeriv + +namespace Rd + +/-! ### Bounded functions with bounded support -/ + +/-- **Bounded functions vanishing outside a ball are integrable**: on a proper normed group with +a measure that is finite on compact sets, an a.e. strongly measurable `f` with `‖f x‖ ≤ C` for +every `x` and `f x = 0` for `‖x‖ > R` is integrable. -/ +theorem integrable_of_norm_le_of_forall_norm_gt_eq_zero {F E : Type*} [NormedAddCommGroup F] + [MeasurableSpace F] [ProperSpace F] {μ : Measure F} [IsFiniteMeasureOnCompacts μ] + [NormedAddCommGroup E] + {f : F → E} (hf : AEStronglyMeasurable f μ) {C R : ℝ} (hC : ∀ x, ‖f x‖ ≤ C) + (hR : ∀ x, R < ‖x‖ → f x = 0) : Integrable f μ := by + have hi : IntegrableOn f (closedBall 0 R) μ := + Measure.integrableOn_of_bounded (isCompact_closedBall 0 R).measure_ne_top hf + (ae_of_all _ hC) + refine (integrableOn_iff_integrable_of_support_subset fun x hx => ?_).1 hi + rw [mem_closedBall_zero_iff] + by_contra h + exact hx (hR x (lt_of_not_ge h)) + +/-! ### Ray integrals -/ + +section RayIntegral + +variable {V : Type*} [NormedAddCommGroup V] [InnerProductSpace ℝ V] + {E : Type*} [NormedAddCommGroup E] [NormedSpace ℝ E] + +/-- The **ray integral** `Ψ(y) = ∫_0^∞ g(y + t w) dt` of `g` along the ray from `y` in the +direction `w`. -/ +noncomputable def rayIntegral (g : V → E) (w y : V) : E := ∫ t in Ioi (0 : ℝ), g (y + t • w) + +omit [NormedSpace ℝ E] in +/-- On a line in the direction of a unit vector `w`: if `‖y + t w‖ ≤ R`, then +`|t + ⟪y, w⟫| ≤ R`, since `t + ⟪y, w⟫ = ⟪y + t w, w⟫`. -/ +theorem abs_add_inner_le_of_norm_add_smul_le {w : V} (hw : ‖w‖ = 1) {y : V} {t R : ℝ} + (h : ‖y + t • w‖ ≤ R) : |t + inner ℝ y w| ≤ R := by + have he : inner ℝ (y + t • w) w = t + inner ℝ y w := by + rw [inner_add_left, real_inner_smul_left, real_inner_self_eq_norm_sq, hw] + ring + calc |t + inner ℝ y w| = |inner ℝ (y + t • w) w| := by rw [he] + _ ≤ ‖y + t • w‖ * ‖w‖ := abs_real_inner_le_norm _ _ + _ ≤ R := by rw [hw, mul_one]; exact h + +/-- **A function supported in a ball, along a line**: if `tsupport h ⊆ B̄(0, R)` and `w` is a unit +vector, then `h(y + t w) = 0` for every `t` outside `[-⟪y, w⟫ - R, -⟪y, w⟫ + R]`. -/ +theorem apply_add_smul_eq_zero_of_notMem_Icc {F : Type*} [Zero F] {h : V → F} {R : ℝ} + (hR : tsupport h ⊆ closedBall 0 R) {w : V} (hw : ‖w‖ = 1) (y : V) {t : ℝ} + (ht : t ∉ Icc (-inner ℝ y w - R) (-inner ℝ y w + R)) : h (y + t • w) = 0 := by + by_contra h0 + have hmem := hR (subset_tsupport _ h0) + rw [mem_closedBall_zero_iff] at hmem + have := abs_le.1 (abs_add_inner_le_of_norm_add_smul_le hw hmem) + exact ht ⟨by linarith, by linarith⟩ + +/-- A compactly supported function restricted to a line in the direction of a unit vector is +compactly supported. -/ +theorem hasCompactSupport_comp_add_smul {F : Type*} [NormedAddCommGroup F] {h : V → F} + (hh : HasCompactSupport h) {w : V} (hw : ‖w‖ = 1) (y : V) : + HasCompactSupport fun t : ℝ => h (y + t • w) := by + obtain ⟨R, hR⟩ := hh.isCompact.isBounded.subset_closedBall 0 + exact HasCompactSupport.intro isCompact_Icc fun t ht => + apply_add_smul_eq_zero_of_notMem_Icc hR hw y ht + +/-- A continuous compactly supported function restricted to a line in the direction of a unit +vector is integrable on `ℝ`. -/ +theorem integrable_comp_add_smul {F : Type*} [NormedAddCommGroup F] {h : V → F} + (hh : Continuous h) (hhc : HasCompactSupport h) {w : V} (hw : ‖w‖ = 1) (y : V) : + Integrable fun t : ℝ => h (y + t • w) := + (hh.comp (continuous_const.add (continuous_id.smul continuous_const)) + ).integrable_of_hasCompactSupport (hasCompactSupport_comp_add_smul hhc hw y) + +variable {g : V → E} + +/-- **Differentiation under the ray integral**: for `g ∈ C^1` with compact support and a unit +vector `w`, the ray integral is differentiable with `DΨ(y) = ∫_0^∞ Dg(y + t w) dt` (Mathlib's +`hasFDerivAt_integral_of_dominated_of_fderiv_le`, with the bound `sup ‖Dg‖` on an interval of `t` +that contains the parameters of the line meeting the support of `g`). -/ +theorem hasFDerivAt_rayIntegral (hg : ContDiff ℝ 1 g) (hgc : HasCompactSupport g) {w : V} + (hw : ‖w‖ = 1) (y₀ : V) : + HasFDerivAt (rayIntegral g w) (∫ t in Ioi (0 : ℝ), fderiv ℝ g (y₀ + t • w)) y₀ := by + obtain ⟨R, hR⟩ := hgc.isCompact.isBounded.subset_closedBall 0 + obtain ⟨C, hC⟩ := (hg.continuous_fderiv one_ne_zero).bounded_above_of_compact_support + (hgc.fderiv (𝕜 := ℝ)) + have hd : ∀ z, HasFDerivAt g (fderiv ℝ g z) z := fun z => + ((hg.differentiable one_ne_zero) z).hasFDerivAt + set T := ‖y₀‖ + 1 + R + refine hasFDerivAt_integral_of_dominated_of_fderiv_le (F := fun y t => g (y + t • w)) + (F' := fun y t => fderiv ℝ g (y + t • w)) (bound := (Icc (-T) T).indicator + fun _ => C) (ball_mem_nhds y₀ one_pos) (Eventually.of_forall fun y => + (hg.continuous.comp (continuous_const.add (continuous_id.smul continuous_const)) + ).aestronglyMeasurable) + (integrable_comp_add_smul hg.continuous hgc hw y₀).restrict + ((hg.continuous_fderiv one_ne_zero).comp + (continuous_const.add (continuous_id.smul continuous_const))).aestronglyMeasurable + (ae_of_all _ fun t y hy => ?_) + ((integrableOn_const (by simp)).integrable_indicator measurableSet_Icc).restrict + (ae_of_all _ fun t y _ => (hasFDerivAt_comp_add_right (t • w)).2 (hd _)) + by_cases ht : t ∈ Icc (-T) T + · rw [indicator_of_mem ht] + exact hC _ + · rw [indicator_of_notMem ht, + apply_add_smul_eq_zero_of_notMem_Icc ((tsupport_fderiv_subset ℝ).trans hR) hw y, norm_zero] + intro hmem + have h1 := abs_le.1 (abs_real_inner_le_norm y w) + have h2 : ‖y‖ < ‖y₀‖ + 1 := by + have := norm_le_norm_add_norm_sub' y y₀ + rw [mem_ball, dist_eq_norm] at hy + linarith + rw [hw, mul_one] at h1 + exact ht ⟨by linarith [hmem.1], by linarith [hmem.2]⟩ + +/-- The derivative of the ray integral in a direction `v`: +`DΨ(y) v = ∫_0^∞ Dg(y + t w) v dt` (Mathlib's `ContinuousLinearMap.integral_apply`). -/ +theorem fderiv_rayIntegral_apply [CompleteSpace E] (hg : ContDiff ℝ 1 g) + (hgc : HasCompactSupport g) {w : V} (hw : ‖w‖ = 1) (y v : V) : + fderiv ℝ (rayIntegral g w) y v = ∫ t in Ioi (0 : ℝ), fderiv ℝ g (y + t • w) v := by + rw [(hasFDerivAt_rayIntegral hg hgc hw y).fderiv, ContinuousLinearMap.integral_apply + (integrable_comp_add_smul (hg.continuous_fderiv one_ne_zero) (hgc.fderiv (𝕜 := ℝ)) hw + y).restrict] + +omit [InnerProductSpace ℝ V] in +/-- The chain rule along a line: `t ↦ g(y + t w)` has the derivative `Dg(y + t w) w`. -/ +theorem hasDerivAt_comp_add_smul [NormedSpace ℝ V] (hg : ContDiff ℝ 1 g) (y w : V) (t : ℝ) : + HasDerivAt (fun t : ℝ => g (y + t • w)) (fderiv ℝ g (y + t • w) w) t := by + have h := ((hg.differentiable one_ne_zero) (y + t • w)).hasFDerivAt.comp_hasDerivAt t + (((hasDerivAt_id t).smul_const w).const_add y) + simp only [one_smul] at h + exact h + +/-- **The ray integral differentiated along its ray**: `DΨ(y) w = -g(y)`. This is the +fundamental theorem of calculus on `(0, ∞)`, since `g(y + t w) = 0` for large `t` (Mathlib's +`integral_Ioi_of_hasDerivAt_of_tendsto`). -/ +theorem fderiv_rayIntegral_self [CompleteSpace E] (hg : ContDiff ℝ 1 g) + (hgc : HasCompactSupport g) {w : V} (hw : ‖w‖ = 1) (y : V) : + fderiv ℝ (rayIntegral g w) y w = -g y := by + rw [fderiv_rayIntegral_apply hg hgc hw] + have hlim : Tendsto (fun t : ℝ => g (y + t • w)) atTop (𝓝 0) := by + obtain ⟨R, hR⟩ := hgc.isCompact.isBounded.subset_closedBall 0 + refine tendsto_const_nhds.congr' ?_ + filter_upwards [eventually_gt_atTop (-inner ℝ y w + R)] with t ht + exact (apply_add_smul_eq_zero_of_notMem_Icc hR hw y fun h => (not_le.2 ht) h.2).symm + have hint := ((integrable_comp_add_smul (hg.continuous_fderiv one_ne_zero) + (hgc.fderiv (𝕜 := ℝ)) hw y).apply_continuousLinearMap w).integrableOn (s := Ioi (0 : ℝ)) + have h := integral_Ioi_of_hasDerivAt_of_tendsto (a := 0) + (hasDerivAt_comp_add_smul hg y w 0).continuousAt.continuousWithinAt + (fun t _ => hasDerivAt_comp_add_smul hg y w t) hint hlim + rw [h, zero_smul, add_zero, zero_sub] + +/-- **The derivative of the ray integral is bounded**: there is `K` with `‖DΨ(y)‖ ≤ K` for every +`y`; the proof takes `K = C max(2R, 0)` for `‖Dg‖ ≤ C` and `tsupport g ⊆ B̄(0, R)`, since each line +meets the support of `g` in an interval of length at most `2R`. -/ +theorem exists_norm_fderiv_rayIntegral_le (hg : ContDiff ℝ 1 g) (hgc : HasCompactSupport g) + {w : V} (hw : ‖w‖ = 1) : ∃ K : ℝ, ∀ y, ‖fderiv ℝ (rayIntegral g w) y‖ ≤ K := by + obtain ⟨R, hR⟩ := hgc.isCompact.isBounded.subset_closedBall 0 + obtain ⟨C, hC⟩ := (hg.continuous_fderiv one_ne_zero).bounded_above_of_compact_support + (hgc.fderiv (𝕜 := ℝ)) + have hC0 : 0 ≤ C := (norm_nonneg _).trans (hC 0) + refine ⟨C * max (2 * R) 0, fun y => ?_⟩ + set a := -inner ℝ y w + rw [(hasFDerivAt_rayIntegral hg hgc hw y).fderiv] + have hb : Integrable ((Icc (a - R) (a + R)).indicator fun _ => C) := + (integrableOn_const (by simp)).integrable_indicator measurableSet_Icc + calc ‖∫ t in Ioi (0 : ℝ), fderiv ℝ g (y + t • w)‖ + ≤ ∫ t in Ioi (0 : ℝ), (Icc (a - R) (a + R)).indicator (fun _ => C) t := by + refine norm_integral_le_of_norm_le hb.restrict (ae_of_all _ fun t => ?_) + by_cases ht : t ∈ Icc (a - R) (a + R) + · rw [indicator_of_mem ht] + exact hC _ + · rw [indicator_of_notMem ht, apply_add_smul_eq_zero_of_notMem_Icc + ((tsupport_fderiv_subset ℝ).trans hR) hw y ht, norm_zero] + _ ≤ ∫ t, (Icc (a - R) (a + R)).indicator (fun _ => C) t := + setIntegral_le_integral hb (ae_of_all _ fun t => indicator_nonneg (fun _ _ => hC0) t) + _ = C * max (2 * R) 0 := by + rw [integral_indicator_const _ measurableSet_Icc, Real.volume_real_Icc, smul_eq_mul, + mul_comm] + ring_nf + +/-- **The ray integral is Lipschitz**, since its derivative is bounded +(`Rd.exists_norm_fderiv_rayIntegral_le`, Mathlib's `lipschitzWith_of_nnNorm_fderiv_le`). -/ +theorem exists_lipschitzWith_rayIntegral (hg : ContDiff ℝ 1 g) (hgc : HasCompactSupport g) + {w : V} (hw : ‖w‖ = 1) : ∃ K : ℝ≥0, LipschitzWith K (rayIntegral g w) := by + obtain ⟨K, hK⟩ := exists_norm_fderiv_rayIntegral_le hg hgc hw + refine ⟨K.toNNReal, lipschitzWith_of_nnNorm_fderiv_le + (fun y => (hasFDerivAt_rayIntegral hg hgc hw y).differentiableAt) fun y => ?_⟩ + rw [← NNReal.coe_le_coe, coe_nnNorm] + exact (hK y).trans (Real.le_coe_toNNReal K) + +end RayIntegral + +/-! ### The product rule -/ + +section ProductRule + +variable {V : Type*} [NormedAddCommGroup V] [NormedSpace ℝ V] + +/-- **The product rule for line derivatives**: for `f, g : V → ℂ` differentiable at `x`, +`∂_v (f g)(x) = ∂_v f(x) g(x) + f(x) ∂_v g(x)` (Mathlib's `fderiv_fun_mul` and +`DifferentiableAt.lineDeriv_eq_fderiv`). -/ +theorem lineDeriv_mul {f g : V → ℂ} {x : V} (hf : DifferentiableAt ℝ f x) + (hg : DifferentiableAt ℝ g x) (v : V) : + lineDeriv ℝ (fun y => f y * g y) x v = lineDeriv ℝ f x v * g x + f x * lineDeriv ℝ g x v := by + have hfg : DifferentiableAt ℝ (fun y => f y * g y) x := hf.mul hg + rw [hfg.lineDeriv_eq_fderiv, fderiv_fun_mul hf hg, hf.lineDeriv_eq_fderiv, + hg.lineDeriv_eq_fderiv] + simp only [add_apply, smul_apply, smul_eq_mul] + ring + +/-- The product rule for Schwartz functions: `∂_v (w₁ w₂) = (∂_v w₁) w₂ + w₁ ∂_v w₂` +(`Rd.lineDeriv_mul`, Mathlib's `SchwartzMap.lineDerivOp_apply`). -/ +theorem lineDeriv_mul_schwartz (w₁ w₂ : 𝓢(V, ℂ)) (v x : V) : + lineDeriv ℝ (fun y => w₁ y * w₂ y) x v = (∂_{v} w₁) x * w₂ x + w₁ x * (∂_{v} w₂) x := by + rw [lineDeriv_mul w₁.differentiableAt w₂.differentiableAt, SchwartzMap.lineDerivOp_apply, + SchwartzMap.lineDerivOp_apply] + +end ProductRule + +/-! ### Green's integrand -/ + +section GreenIntegrand + +variable {V : Type*} [NormedAddCommGroup V] [InnerProductSpace ℝ V] [FiniteDimensional ℝ V] + [MeasurableSpace V] [BorelSpace V] + +/-- **The integral of Green's integrand as a pairing**: for a measurable set `s` and +`U, W ∈ H^1(V)`, `∫_s (∂_v U) W + U ∂_v W = ⟨1_s ∂_v U, W⟩ + ⟨1_s U, ∂_v W⟩` with the bilinear +pairing of `L_2(V)` with itself (`Rd.setIntegral_mul_eq_lpPairing`). -/ +theorem setIntegral_weakDeriv_mul_add_eq {s : Set V} (hs : MeasurableSet s) (v : V) + (U W : H^{1}(V)) : + ∫ x in s, weakDerivL2 v U x * toL2 W x + toL2 U x * weakDerivL2 v W x = + (ContinuousLinearMap.mul ℂ ℂ).lpPairing volume 2 2 (indicatorLp hs (weakDerivL2 v U)) + (toL2 W) + + (ContinuousLinearMap.mul ℂ ℂ).lpPairing volume 2 2 (indicatorLp hs (toL2 U)) + (weakDerivL2 v W) := by + rw [← setIntegral_mul_eq_lpPairing, ← setIntegral_mul_eq_lpPairing, integral_add] + · exact ((Lp.memLp _).integrable_mul (Lp.memLp _)).restrict + · exact ((Lp.memLp _).integrable_mul (Lp.memLp _)).restrict + +/-- The left side of Green's formula on a measurable set `s`, +`(U, W) ↦ ∫_s (∂_v U) W + U ∂_v W`, is continuous on `H^1(V) × H^1(V)`: a sum of bounded +bilinear pairings (`Rd.setIntegral_weakDeriv_mul_add_eq`). -/ +theorem continuous_setIntegral_weakDeriv_mul_add {s : Set V} (hs : MeasurableSet s) (v : V) : + Continuous fun p : H^{1}(V) × H^{1}(V) => + ∫ x in s, weakDerivL2 v p.1 x * toL2 p.2 x + toL2 p.1 x * weakDerivL2 v p.2 x := by + set P := (ContinuousLinearMap.mul ℂ ℂ).lpPairing (volume : Measure V) 2 2 + set I := indicatorLp (p := 2) (μ := (volume : Measure V)) hs + simp only [setIntegral_weakDeriv_mul_add_eq hs] + have h1 : Continuous fun p : H^{1}(V) × H^{1}(V) => I (weakDerivL2 v p.1) := + I.continuous.comp ((weakDerivL2 v).continuous.comp continuous_fst) + have h2 : Continuous fun p : H^{1}(V) × H^{1}(V) => I (toL2 p.1) := + I.continuous.comp (toL2.continuous.comp continuous_fst) + have h3 : Continuous fun p : H^{1}(V) × H^{1}(V) => toL2 p.2 := + toL2.continuous.comp continuous_snd + have h4 : Continuous fun p : H^{1}(V) × H^{1}(V) => weakDerivL2 v p.2 := + (weakDerivL2 v).continuous.comp continuous_snd + exact ((P.continuous.comp h1).clm_apply h3).add ((P.continuous.comp h2).clm_apply h4) + +end GreenIntegrand + +namespace LipschitzGraph + +variable {V : Type*} [NormedAddCommGroup V] [InnerProductSpace ℝ V] [FiniteDimensional ℝ V] + [MeasurableSpace V] [BorelSpace V] (Ω : LipschitzGraph V) + +/-! ### Fubini in product coordinates -/ + +/-- **Integrals over `Ω` in coordinates**: if `T : H × ℝ → V` preserves the Lebesgue measures and +`T(x', t) ∈ Ω` iff `a(x') < t`, then `∫_Ω F = ∫_H ∫_{a(x')}^∞ F(T(x', t)) dt dx'` for every `F` +integrable on `Ω` (Fubini's theorem, Mathlib's `integral_prod`). -/ +theorem setIntegral_domain_eq_of_measurePreserving {E : Type*} [NormedAddCommGroup E] + [NormedSpace ℝ E] (T : Ω.hyperplane × ℝ ≃ᵐ V) + (hT : MeasurePreserving T (volume.prod volume) volume) (a : Ω.hyperplane → ℝ) + (ha : ∀ p, T p ∈ Ω.domain ↔ a p.1 < p.2) {F : V → E} (hF : IntegrableOn F Ω.domain) : + ∫ x in Ω.domain, F x = ∫ x', ∫ t in Ioi (a x'), F (T (x', t)) := by + rw [← integral_indicator Ω.measurableSet_domain, ← hT.integral_comp' (Ω.domain.indicator F)] + have hint : Integrable (fun p => Ω.domain.indicator F (T p)) (volume.prod volume) := + (hT.integrable_comp_emb T.measurableEmbedding).2 + (hF.integrable_indicator Ω.measurableSet_domain) + rw [integral_prod _ hint] + refine integral_congr_ae (ae_of_all _ fun x' => ?_) + dsimp only + rw [← integral_indicator measurableSet_Ioi] + refine integral_congr_ae (ae_of_all _ fun t => ?_) + dsimp only + by_cases h : a x' < t + · rw [indicator_of_mem ((ha (x', t)).2 h), indicator_of_mem (show t ∈ Ioi (a x') from h)] + · rw [indicator_of_notMem (fun hm => h ((ha (x', t)).1 hm)), + indicator_of_notMem (show t ∉ Ioi (a x') from h)] + +/-- `x' + t e ∈ Ω` iff `φ(x') < t`. -/ +theorem prodEquiv_mem_domain_iff (p : Ω.hyperplane × ℝ) : + Ω.prodEquiv p ∈ Ω.domain ↔ Ω.phi p.1 < p.2 := by + rw [prodEquiv_apply] + change Ω.phi ((p.1 : V) + p.2 • Ω.e) < inner ℝ ((p.1 : V) + p.2 • Ω.e) Ω.e ↔ _ + rw [Ω.const, inner_add_left, Ω.inner_coe_e, real_inner_smul_left, Ω.inner_e_self, mul_one, + zero_add] + +omit [FiniteDimensional ℝ V] [MeasurableSpace V] [BorelSpace V] in +/-- `γ(x') + t e ∈ Ω` iff `0 < t`: the domain lies above the graph. -/ +theorem graphMap_add_smul_mem_domain_iff (x' : Ω.hyperplane) (t : ℝ) : + Ω.graphMap x' + t • Ω.e ∈ Ω.domain ↔ 0 < t := by + change Ω.phi (Ω.graphMap x' + t • Ω.e) < inner ℝ (Ω.graphMap x' + t • Ω.e) Ω.e ↔ _ + rw [Ω.const, Ω.phi_graphMap, inner_add_left, Ω.inner_graphMap, real_inner_smul_left, + Ω.inner_e_self, mul_one, lt_add_iff_pos_right] + +/-- **Fubini on a Lipschitz graph domain**: `∫_Ω F = ∫_H ∫_{φ(x')}^∞ F(x' + t e) dt dx'` for every +`F` integrable on `Ω`. -/ +theorem setIntegral_domain_eq {E : Type*} [NormedAddCommGroup E] [NormedSpace ℝ E] {F : V → E} + (hF : IntegrableOn F Ω.domain) : + ∫ x in Ω.domain, F x = ∫ x' : Ω.hyperplane, ∫ t in Ioi (Ω.phi x'), F (x' + t • Ω.e) := by + rw [Ω.setIntegral_domain_eq_of_measurePreserving Ω.prodEquiv Ω.measurePreserving_prodEquiv + (fun x' => Ω.phi x') Ω.prodEquiv_mem_domain_iff hF] + simp only [prodEquiv_apply] + +/-- **Fubini in graph coordinates**: `∫_Ω F = ∫_H ∫_0^∞ F(γ(x') + t e) dt dx'` for every `F` +integrable on `Ω`. -/ +theorem setIntegral_domain_eq_graphMap {E : Type*} [NormedAddCommGroup E] [NormedSpace ℝ E] + {F : V → E} (hF : IntegrableOn F Ω.domain) : + ∫ x in Ω.domain, F x = ∫ x', ∫ t in Ioi (0 : ℝ), F (Ω.graphMap x' + t • Ω.e) := by + rw [Ω.setIntegral_domain_eq_of_measurePreserving Ω.graphEquiv Ω.measurePreserving_graphEquiv + (fun _ => 0) (fun p => by rw [graphEquiv_apply, graphMap_add_smul_mem_domain_iff]) hF] + simp only [graphEquiv_apply] + +/-! ### The normal weight -/ + +/-- The **normal weight** `n_v(x') = ⟪∇φ(x'), v⟫ - ⟪v, e⟫` of the direction `v` in the chart: the +boundary term of `∫_Ω ∂_v g` is `∫_H g(γ x') n_v(x') dx'`, and +`n_v = ⟪v, ν⟫ √(1 + ‖∇φ‖²)` (`Rd.LipschitzGraph.inner_normalAt_mul_gram`). -/ +noncomputable def normalWeight (v : V) (x' : Ω.hyperplane) : ℝ := + inner ℝ (Ω.gradPhi x' : V) v - inner ℝ v Ω.e + +omit [MeasurableSpace V] [BorelSpace V] in +/-- **The normal weight by the unit normal**: `⟪v, ν(x')⟫ √(1 + ‖∇φ(x')‖²) = n_v(x')`, since +`ν = (∇φ - e)/√(1 + ‖∇φ‖²)`. -/ +theorem inner_normalAt_mul_gram (v : V) (x' : Ω.hyperplane) : + inner ℝ v (Ω.normalAt x') * Ω.gram x' = Ω.normalWeight v x' := by + rw [normalAt, real_inner_smul_right, inner_sub_right, normalWeight, real_inner_comm v, + mul_comm, ← mul_assoc, mul_inv_cancel₀ (Ω.gram_pos x').ne', one_mul] + +omit [MeasurableSpace V] [BorelSpace V] in +/-- The normal weight is bounded: `|n_v| ≤ (M + 1) ‖v‖`, since `‖∇φ‖ ≤ M`. -/ +theorem abs_normalWeight_le (v : V) (x' : Ω.hyperplane) : + |Ω.normalWeight v x'| ≤ (Ω.M + 1) * ‖v‖ := by + have h1 : |inner ℝ (Ω.gradPhi x' : V) v| ≤ Ω.M * ‖v‖ := + (abs_real_inner_le_norm _ _).trans (mul_le_mul_of_nonneg_right + ((Submodule.norm_coe _).trans_le (Ω.norm_gradPhi_le x')) (norm_nonneg _)) + have h2 : |inner ℝ v Ω.e| ≤ ‖v‖ := by + simpa [Ω.norm_e] using abs_real_inner_le_norm v Ω.e + calc |Ω.normalWeight v x'| ≤ |inner ℝ (Ω.gradPhi x' : V) v| + |inner ℝ v Ω.e| := + abs_sub _ _ + _ ≤ (Ω.M + 1) * ‖v‖ := by linarith + +/-- The normal weight is measurable. -/ +theorem measurable_normalWeight (v : V) : Measurable (Ω.normalWeight v) := + ((continuous_subtype_val.measurable.comp Ω.measurable_gradPhi).inner measurable_const).sub + measurable_const + +/-! ### The ray integral from the graph -/ + +variable {g : V → ℂ} + +/-- The **ray integral from the graph** `Ψ(γ x') = ∫_{φ(x')}^∞ g(x' + t e) dt`, the ray integral +of `g` from the boundary point `γ x'` upwards. -/ +noncomputable def graphRayIntegral (g : V → ℂ) (x' : Ω.hyperplane) : ℂ := + rayIntegral g Ω.e (Ω.graphMap x') + +omit [FiniteDimensional ℝ V] [MeasurableSpace V] [BorelSpace V] in +/-- `‖x'‖ ≤ ‖γ(x') + t e‖`: `x'` is the projection of `γ(x') + t e` onto `H`. -/ +theorem norm_le_norm_graphMap_add_smul (x' : Ω.hyperplane) (t : ℝ) : + ‖x'‖ ≤ ‖Ω.graphMap x' + t • Ω.e‖ := by + have h : Ω.graphMap x' + t • Ω.e = (x' : V) + (Ω.phi x' + t) • Ω.e := by + rw [graphMap, add_smul, add_assoc] + rw [h] + exact Ω.norm_le_norm_coe_add_smul_e x' _ + +omit [FiniteDimensional ℝ V] [MeasurableSpace V] [BorelSpace V] in +/-- If `tsupport h ⊆ B̄(0, R)` and `‖x'‖ > R`, then `h` vanishes on the vertical line through +`γ(x')`. -/ +theorem apply_graphMap_add_smul_eq_zero_of_norm_lt {F : Type*} [Zero F] {h : V → F} {R : ℝ} + (hR : tsupport h ⊆ closedBall 0 R) {x' : Ω.hyperplane} (hx : R < ‖x'‖) (t : ℝ) : + h (Ω.graphMap x' + t • Ω.e) = 0 := by + refine image_eq_zero_of_notMem_tsupport fun hm => ?_ + have := hR hm + rw [mem_closedBall_zero_iff] at this + linarith [Ω.norm_le_norm_graphMap_add_smul x' t] + +omit [MeasurableSpace V] [BorelSpace V] in +/-- The ray integral from the graph of a compactly supported `g` has compact support in `H`. -/ +theorem hasCompactSupport_graphRayIntegral (hgc : HasCompactSupport g) : + HasCompactSupport (Ω.graphRayIntegral g) := by + obtain ⟨R, hR⟩ := hgc.isCompact.isBounded.subset_closedBall 0 + refine HasCompactSupport.intro (isCompact_closedBall (0 : Ω.hyperplane) R) fun x' hx' => ?_ + rw [mem_closedBall_zero_iff, not_le] at hx' + exact integral_eq_zero_of_ae (ae_of_all _ fun t => + Ω.apply_graphMap_add_smul_eq_zero_of_norm_lt hR hx' t) + +omit [FiniteDimensional ℝ V] [MeasurableSpace V] [BorelSpace V] in +/-- The ray integral from the graph of `g ∈ C^1` with compact support is Lipschitz: the ray +integral is Lipschitz (`Rd.exists_lipschitzWith_rayIntegral`) and so is the graph map. -/ +theorem exists_lipschitzWith_graphRayIntegral (hg : ContDiff ℝ 1 g) (hgc : HasCompactSupport g) : + ∃ K : ℝ≥0, LipschitzWith K (Ω.graphRayIntegral g) := by + obtain ⟨K, hK⟩ := exists_lipschitzWith_rayIntegral hg hgc Ω.norm_e + exact ⟨_, hK.comp Ω.lipschitzWith_graphMap⟩ + +omit [FiniteDimensional ℝ V] [MeasurableSpace V] [BorelSpace V] in +variable {Ω} in +/-- **The derivative of the graph map**: where `φ|_H` is differentiable, +`Dγ(x') v' = v' + Dφ(x') v' e`. -/ +theorem hasFDerivAt_graphMap {x' : Ω.hyperplane} (hd : DifferentiableAt ℝ Ω.phiH x') : + HasFDerivAt Ω.graphMap (Ω.hyperplane.subtypeL + (fderiv ℝ Ω.phiH x').smulRight Ω.e) x' := + Ω.hyperplane.subtypeL.hasFDerivAt.add (hd.hasFDerivAt.smul_const Ω.e) + +omit [MeasurableSpace V] [BorelSpace V] in +variable {Ω} in +/-- **The line derivative of the ray integral from the graph**: where `φ|_H` is differentiable, +the chain rule and `DΨ e = -g` (`Rd.fderiv_rayIntegral_self`) give +`∂_{v'}(Ψ ∘ γ)(x') = DΨ(γ x') v' - ⟪∇φ(x'), v'⟫ g(γ x')` for `v' ∈ H`. -/ +theorem lineDeriv_graphRayIntegral (hg : ContDiff ℝ 1 g) (hgc : HasCompactSupport g) + {x' : Ω.hyperplane} (hd : DifferentiableAt ℝ Ω.phiH x') (v' : Ω.hyperplane) : + lineDeriv ℝ (Ω.graphRayIntegral g) x' v' = + fderiv ℝ (rayIntegral g Ω.e) (Ω.graphMap x') v' - + (inner ℝ (Ω.gradPhi x') v' : ℂ) * g (Ω.graphMap x') := by + have hL := hasFDerivAt_rayIntegral hg hgc Ω.norm_e (Ω.graphMap x') + have h := hL.comp x' (hasFDerivAt_graphMap hd) + have hfun : Ω.graphRayIntegral g = rayIntegral g Ω.e ∘ Ω.graphMap := rfl + rw [hfun, h.differentiableAt.lineDeriv_eq_fderiv, h.fderiv, ← hL.fderiv] + simp only [ContinuousLinearMap.comp_apply, add_apply, + Submodule.subtypeL_apply, ContinuousLinearMap.smulRight_apply, map_add, map_smul, + fderiv_rayIntegral_self hg hgc Ω.norm_e, ← Ω.inner_gradPhi, Complex.real_smul] + ring + +/-- `x' ↦ h(γ x')` is integrable on `H` for continuous compactly supported `h`. -/ +theorem integrable_comp_graphMap {h : V → ℂ} (hh : Continuous h) (hhc : HasCompactSupport h) : + Integrable fun x' => h (Ω.graphMap x') := by + obtain ⟨R, hR⟩ := hhc.isCompact.isBounded.subset_closedBall 0 + obtain ⟨C, hC⟩ := hh.bounded_above_of_compact_support hhc + refine integrable_of_norm_le_of_forall_norm_gt_eq_zero + (hh.comp Ω.continuous_graphMap).aestronglyMeasurable (fun x' => hC _) (R := R) fun x' hx' => ?_ + simpa using Ω.apply_graphMap_add_smul_eq_zero_of_norm_lt hR hx' 0 + +/-- `x' ↦ DΨ(γ x') v` is integrable on `H`: it is bounded (`Rd.exists_norm_fderiv_rayIntegral_le`) +and vanishes for `‖x'‖ > R` when `tsupport g ⊆ B̄(0, R)`. -/ +theorem integrable_fderiv_rayIntegral (hg : ContDiff ℝ 1 g) (hgc : HasCompactSupport g) + (v : V) : Integrable fun x' => fderiv ℝ (rayIntegral g Ω.e) (Ω.graphMap x') v := by + obtain ⟨R, hR⟩ := hgc.isCompact.isBounded.subset_closedBall 0 + obtain ⟨K, hK⟩ := exists_norm_fderiv_rayIntegral_le hg hgc Ω.norm_e + have hm : Measurable fun x' => fderiv ℝ (rayIntegral g Ω.e) (Ω.graphMap x') v := + (ContinuousLinearMap.apply ℝ ℂ v).continuous.measurable.comp + ((measurable_fderiv ℝ (rayIntegral g Ω.e)).comp Ω.continuous_graphMap.measurable) + refine integrable_of_norm_le_of_forall_norm_gt_eq_zero hm.aestronglyMeasurable + (fun x' => ((fderiv ℝ (rayIntegral g Ω.e) (Ω.graphMap x')).le_opNorm v).trans + (mul_le_mul_of_nonneg_right (hK _) (norm_nonneg v))) (R := R) fun x' hx' => ?_ + rw [fderiv_rayIntegral_apply hg hgc Ω.norm_e] + refine integral_eq_zero_of_ae (ae_of_all _ fun t => ?_) + dsimp only + rw [Pi.zero_apply, + Ω.apply_graphMap_add_smul_eq_zero_of_norm_lt ((tsupport_fderiv_subset ℝ).trans hR) hx' t, + zero_apply] + +/-- `x' ↦ ⟪∇φ(x'), v'⟫ g(γ x')` is integrable on `H` for continuous compactly supported `g`. -/ +theorem integrable_inner_gradPhi_mul (hg : Continuous g) (hgc : HasCompactSupport g) + (v' : Ω.hyperplane) : + Integrable fun x' => (inner ℝ (Ω.gradPhi x') v' : ℂ) * g (Ω.graphMap x') := by + obtain ⟨R, hR⟩ := hgc.isCompact.isBounded.subset_closedBall 0 + obtain ⟨C, hC⟩ := hg.bounded_above_of_compact_support hgc + have hm : Measurable fun x' => (inner ℝ (Ω.gradPhi x') v' : ℂ) := + Complex.measurable_ofReal.comp (Ω.measurable_gradPhi.inner measurable_const) + refine integrable_of_norm_le_of_forall_norm_gt_eq_zero + (hm.aestronglyMeasurable.mul (hg.comp Ω.continuous_graphMap).aestronglyMeasurable) + (C := Ω.M * ‖v'‖ * C) (fun x' => ?_) (R := R) fun x' hx' => ?_ + · rw [norm_mul, Complex.norm_real, Real.norm_eq_abs] + refine mul_le_mul ((abs_real_inner_le_norm _ _).trans (mul_le_mul_of_nonneg_right + (Ω.norm_gradPhi_le x') (norm_nonneg _))) (hC _) (norm_nonneg _) + (mul_nonneg Ω.M_nonneg (norm_nonneg _)) + · have h0 := Ω.apply_graphMap_add_smul_eq_zero_of_norm_lt hR hx' 0 + rw [zero_smul, add_zero] at h0 + rw [h0, mul_zero] + +/-- **The horizontal directions**: for `g ∈ C^1` with compact support and `v' ∈ H`, +`∫_H DΨ(γ x') v' dx' = ∫_H ⟪∇φ(x'), v'⟫ g(γ x') dx'`. The ray integral from the graph `Ψ ∘ γ` is +Lipschitz with compact support, so its line derivative integrates to zero +(`Rd.integral_lineDeriv_eq_zero_complex`), and almost everywhere it is the difference of the +two integrands (`Rd.LipschitzGraph.lineDeriv_graphRayIntegral`, Rademacher's theorem for `φ|_H`). -/ +theorem integral_fderiv_rayIntegral_graphMap (hg : ContDiff ℝ 1 g) (hgc : HasCompactSupport g) + (v' : Ω.hyperplane) : + ∫ x', fderiv ℝ (rayIntegral g Ω.e) (Ω.graphMap x') v' = + ∫ x', (inner ℝ (Ω.gradPhi x') v' : ℂ) * g (Ω.graphMap x') := by + have hA := Ω.integrable_fderiv_rayIntegral hg hgc v' + have hB := Ω.integrable_inner_gradPhi_mul hg.continuous hgc v' + have hae : (fun x' => lineDeriv ℝ (Ω.graphRayIntegral g) x' v') =ᵐ[volume] fun x' => + fderiv ℝ (rayIntegral g Ω.e) (Ω.graphMap x') v' - + (inner ℝ (Ω.gradPhi x') v' : ℂ) * g (Ω.graphMap x') := by + filter_upwards [Ω.ae_differentiableAt_phiH] with x' hx' + exact lineDeriv_graphRayIntegral hg hgc hx' v' + obtain ⟨K, hK⟩ := Ω.exists_lipschitzWith_graphRayIntegral hg hgc + have h0 := integral_lineDeriv_eq_zero_complex (μ := volume) hK + (Ω.hasCompactSupport_graphRayIntegral hgc) v' + rw [integral_congr_ae hae, integral_sub hA hB, sub_eq_zero] at h0 + exact h0 + +/-! ### Gauss–Green for smooth functions -/ + +/-- **Gauss–Green on a Lipschitz graph domain, in chart form**: for `g ∈ C^1` with compact support +and every direction `v`, `∫_Ω ∂_v g = ∫_H g(γ x') n_v(x') dx'` with the normal weight +`n_v = ⟪∇φ, v⟫ - ⟪v, e⟫` (`Rd.LipschitzGraph.normalWeight`). By Fubini in graph coordinates the +left side is `∫_H DΨ(γ x') v dx'` for the ray integral `Ψ` of `g` +(`Rd.fderiv_rayIntegral_apply`); write `v = Pv + ⟪v, e⟫ e`, use `DΨ e = -g` and the horizontal +identity (`Rd.LipschitzGraph.integral_fderiv_rayIntegral_graphMap`). With the surface measure it +reads `∫_Ω ∂_v g = ∫_Γ g ⟪v, ν⟫ dσ` (`Rd.LipschitzGraph.setIntegral_lineDeriv_eq_surface`). -/ +theorem setIntegral_lineDeriv_eq (hg : ContDiff ℝ 1 g) (hgc : HasCompactSupport g) (v : V) : + ∫ x in Ω.domain, lineDeriv ℝ g x v = ∫ x', g (Ω.graphMap x') * Ω.normalWeight v x' := by + have hdv : ∀ x, lineDeriv ℝ g x v = fderiv ℝ g x v := fun x => + ((hg.differentiable one_ne_zero) x).lineDeriv_eq_fderiv + have hint : IntegrableOn (fun x => fderiv ℝ g x v) Ω.domain := + (((hg.continuous_fderiv one_ne_zero).clm_apply continuous_const + ).integrable_of_hasCompactSupport + ((hgc.fderiv (𝕜 := ℝ)).comp_left (g := fun L : V →L[ℝ] ℂ => L v) rfl)).integrableOn + have hG := Ω.integrable_comp_graphMap hg.continuous hgc + have hA := Ω.integrable_fderiv_rayIntegral hg hgc (Ω.proj v) + have hB := Ω.integrable_inner_gradPhi_mul hg.continuous hgc (Ω.proj v) + have hv : v = (Ω.proj v : V) + inner ℝ v Ω.e • Ω.e := by rw [coe_proj]; abel + simp only [hdv] + rw [Ω.setIntegral_domain_eq_graphMap hint] + calc ∫ x', ∫ t in Ioi (0 : ℝ), fderiv ℝ g (Ω.graphMap x' + t • Ω.e) v + = ∫ x', (fderiv ℝ (rayIntegral g Ω.e) (Ω.graphMap x') (Ω.proj v) - + (inner ℝ v Ω.e : ℂ) * g (Ω.graphMap x')) := by + refine integral_congr_ae (ae_of_all _ fun x' => ?_) + simp only + rw [← fderiv_rayIntegral_apply hg hgc Ω.norm_e] + conv_lhs => rw [hv] + rw [map_add, map_smul, fderiv_rayIntegral_self hg hgc Ω.norm_e, Complex.real_smul] + ring + _ = (∫ x', fderiv ℝ (rayIntegral g Ω.e) (Ω.graphMap x') (Ω.proj v)) - + ∫ x', (inner ℝ v Ω.e : ℂ) * g (Ω.graphMap x') := integral_sub hA (hG.const_mul _) + _ = (∫ x', (inner ℝ (Ω.gradPhi x') (Ω.proj v) : ℂ) * g (Ω.graphMap x')) - + ∫ x', (inner ℝ v Ω.e : ℂ) * g (Ω.graphMap x') := by + rw [Ω.integral_fderiv_rayIntegral_graphMap hg hgc] + _ = ∫ x', ((inner ℝ (Ω.gradPhi x') (Ω.proj v) : ℂ) * g (Ω.graphMap x') - + (inner ℝ v Ω.e : ℂ) * g (Ω.graphMap x')) := (integral_sub hB (hG.const_mul _)).symm + _ = _ := by + refine integral_congr_ae (ae_of_all _ fun x' => ?_) + simp only [normalWeight, Ω.inner_coe_eq_inner_proj, Complex.ofReal_sub] + ring + +/-- **Gauss–Green with the unit normal**: `∫_Ω ∂_v g = ∫_H g(γ x') ⟪v, ν(x')⟫ √(1 + ‖∇φ(x')‖²) dx'` +(`Rd.LipschitzGraph.inner_normalAt_mul_gram`). -/ +theorem setIntegral_lineDeriv_eq_normal (hg : ContDiff ℝ 1 g) (hgc : HasCompactSupport g) + (v : V) : + ∫ x in Ω.domain, lineDeriv ℝ g x v = + ∫ x', g (Ω.graphMap x') * (inner ℝ v (Ω.normalAt x') : ℂ) * (Ω.gram x' : ℂ) := by + rw [Ω.setIntegral_lineDeriv_eq hg hgc] + refine integral_congr_ae (ae_of_all _ fun x' => ?_) + simp only [← Ω.inner_normalAt_mul_gram, Complex.ofReal_mul] + ring + +/-- **The vertical direction**: `∫_Ω ∂_e g = -∫_H g(γ x') dx'`, the fundamental theorem of calculus +on each vertical line above the graph. -/ +theorem setIntegral_lineDeriv_e (hg : ContDiff ℝ 1 g) (hgc : HasCompactSupport g) : + ∫ x in Ω.domain, lineDeriv ℝ g x Ω.e = -∫ x', g (Ω.graphMap x') := by + rw [Ω.setIntegral_lineDeriv_eq hg hgc, ← integral_neg] + refine integral_congr_ae (ae_of_all _ fun x' => ?_) + simp [normalWeight, Ω.inner_coe_e, Ω.norm_e] + +/-- **The horizontal directions**: `∫_Ω ∂_{v'} g = ∫_H g(γ x') ⟪∇φ(x'), v'⟫ dx'` for `v' ∈ H`, +a Leibniz rule for the integral above the graph in integrated form. -/ +theorem setIntegral_lineDeriv_hyperplane (hg : ContDiff ℝ 1 g) (hgc : HasCompactSupport g) + (v' : Ω.hyperplane) : + ∫ x in Ω.domain, lineDeriv ℝ g x v' = + ∫ x', g (Ω.graphMap x') * (inner ℝ (Ω.gradPhi x') v' : ℂ) := by + rw [Ω.setIntegral_lineDeriv_eq hg hgc] + refine integral_congr_ae (ae_of_all _ fun x' => ?_) + simp [normalWeight, Ω.inner_coe_e, Submodule.coe_inner] + +/-- **Gauss–Green on a Lipschitz graph domain, surface form**: for `g ∈ C^1` with compact +support and every direction `v`, `∫_Ω ∂_v g = ∫_Γ g ⟪v, ν⟫ dμHE[n-1]` over the boundary +`Γ = γ(H)`, with the outward unit normal `ν(y) = ν(Py)` (the area formula +`Rd.LipschitzGraph.integral_graphMap`). -/ +theorem setIntegral_lineDeriv_eq_surface (hg : ContDiff ℝ 1 g) (hgc : HasCompactSupport g) + (v : V) : + ∫ x in Ω.domain, lineDeriv ℝ g x v = ∫ y in range Ω.graphMap, + g y * (inner ℝ v (Ω.normalAt (Ω.proj y)) : ℂ) ∂(μHE[finrank ℝ V - 1] : Measure V) := by + rw [Ω.integral_graphMap, Ω.setIntegral_lineDeriv_eq_normal hg hgc] + simp only [proj_graphMap] + +/-! ### Green's formula -/ + +/-- The normal weight is a bounded function, an element of `L_∞(H)` +(`Rd.LipschitzGraph.abs_normalWeight_le`). -/ +theorem memLp_top_normalWeight (v : V) : + MemLp (fun x' => (Ω.normalWeight v x' : ℂ)) ∞ volume := + memLp_top_of_bound + (Complex.measurable_ofReal.comp (Ω.measurable_normalWeight v)).aestronglyMeasurable + ((Ω.M + 1) * ‖v‖) (ae_of_all _ fun x' => by + rw [Complex.norm_real, Real.norm_eq_abs] + exact Ω.abs_normalWeight_le v x') + +/-- `∫_H a b n_v = ⟨a, n_v b⟩` for `a, b ∈ L_2(H)`, with the pairing of `L_2` with `L_2` and the +product of `L_∞` with `L_2` (Mathlib's `ContinuousLinearMap.holderL`). -/ +theorem integral_mul_mul_normalWeight_eq (v : V) (a b : Lp ℂ 2 (volume : Measure Ω.hyperplane)) : + ∫ x', a x' * b x' * (Ω.normalWeight v x' : ℂ) = + (ContinuousLinearMap.mul ℂ ℂ).lpPairing volume 2 2 a + ((ContinuousLinearMap.mul ℂ ℂ).holderL volume ∞ 2 2 + ((Ω.memLp_top_normalWeight v).toLp _) b) := by + rw [ContinuousLinearMap.lpPairing_eq_integral] + refine integral_congr_ae ?_ + filter_upwards [ContinuousLinearMap.coeFn_holder (ContinuousLinearMap.mul ℂ ℂ) (r := 2) + ((Ω.memLp_top_normalWeight v).toLp _) b, (Ω.memLp_top_normalWeight v).coeFn_toLp] with x' h1 h2 + rw [ContinuousLinearMap.holderL_apply_apply, ContinuousLinearMap.mul_apply', h1, + ContinuousLinearMap.mul_apply', h2] + ring + +/-- The left side of Green's formula, `(U, W) ↦ ∫_Ω (∂_v U) W + U ∂_v W`, is continuous on +`H^1(V) × H^1(V)` (`Rd.continuous_setIntegral_weakDeriv_mul_add`). -/ +theorem continuous_setIntegral_weakDeriv_mul_add (v : V) : Continuous fun p : H^{1}(V) × H^{1}(V) => + ∫ x in Ω.domain, weakDerivL2 v p.1 x * toL2 p.2 x + toL2 p.1 x * weakDerivL2 v p.2 x := + Rd.continuous_setIntegral_weakDeriv_mul_add Ω.measurableSet_domain v + +/-- The right side of Green's formula, `(U, W) ↦ ∫_H Tr U · Tr W · n_v`, is continuous on +`H^1(V) × H^1(V)`. -/ +theorem continuous_integral_traceH1_mul_normalWeight (v : V) : + Continuous fun p : H^{1}(V) × H^{1}(V) => + ∫ x', Ω.traceH1 p.1 x' * Ω.traceH1 p.2 x' * (Ω.normalWeight v x' : ℂ) := by + set P := (ContinuousLinearMap.mul ℂ ℂ).lpPairing (volume : Measure Ω.hyperplane) 2 2 + set N := (ContinuousLinearMap.mul ℂ ℂ).holderL (volume : Measure Ω.hyperplane) ∞ 2 2 + ((Ω.memLp_top_normalWeight v).toLp _) + have he : ∀ p : H^{1}(V) × H^{1}(V), + ∫ x', Ω.traceH1 p.1 x' * Ω.traceH1 p.2 x' * (Ω.normalWeight v x' : ℂ) = + P (Ω.traceH1 p.1) (N (Ω.traceH1 p.2)) := fun p => + Ω.integral_mul_mul_normalWeight_eq v _ _ + simp only [he] + have h1 : Continuous fun p : H^{1}(V) × H^{1}(V) => Ω.traceH1 p.1 := + Ω.traceH1.continuous.comp continuous_fst + have h2 : Continuous fun p : H^{1}(V) × H^{1}(V) => N (Ω.traceH1 p.2) := + N.continuous.comp (Ω.traceH1.continuous.comp continuous_snd) + exact (P.continuous.comp h1).clm_apply h2 + +/-- **Green's formula for Schwartz functions**: for Schwartz functions `w₁`, `w₂`, the first with +compact support, `∫_Ω (∂_v w₁) w₂ + w₁ ∂_v w₂ = ∫_H Tr w₁ · Tr w₂ · n_v`, Gauss–Green for the +product `w₁ w₂` (`Rd.LipschitzGraph.setIntegral_lineDeriv_eq`). -/ +theorem setIntegral_green_ofSchwartz {w₁ : 𝓢(V, ℂ)} (hw₁ : HasCompactSupport w₁) + (w₂ : 𝓢(V, ℂ)) (v : V) : + ∫ x in Ω.domain, weakDerivL2 v (ofSchwartz 1 w₁) x * toL2 (ofSchwartz 1 w₂) x + + toL2 (ofSchwartz 1 w₁) x * weakDerivL2 v (ofSchwartz 1 w₂) x = + ∫ x', Ω.traceH1 (ofSchwartz 1 w₁) x' * Ω.traceH1 (ofSchwartz 1 w₂) x' * + (Ω.normalWeight v x' : ℂ) := by + have hL : ∫ x in Ω.domain, weakDerivL2 v (ofSchwartz 1 w₁) x * toL2 (ofSchwartz 1 w₂) x + + toL2 (ofSchwartz 1 w₁) x * weakDerivL2 v (ofSchwartz 1 w₂) x = + ∫ x in Ω.domain, lineDeriv ℝ (fun y => w₁ y * w₂ y) x v := by + refine integral_congr_ae (ae_restrict_of_ae ?_) + rw [weakDerivL2_ofSchwartz, weakDerivL2_ofSchwartz, toL2_ofSchwartz, toL2_ofSchwartz] + filter_upwards [(∂_{v} w₁).coeFn_toLp 2 volume, (∂_{v} w₂).coeFn_toLp 2 volume, + w₁.coeFn_toLp 2 volume, w₂.coeFn_toLp 2 volume] with x h1 h2 h3 h4 + rw [h1, h2, h3, h4, lineDeriv_mul_schwartz] + have hg : ContDiff ℝ 1 fun y => w₁ y * w₂ y := + ((w₁.smooth ⊤).mul (w₂.smooth ⊤)).of_le (by exact_mod_cast le_top) + rw [hL, Ω.setIntegral_lineDeriv_eq hg hw₁.mul_right] + refine integral_congr_ae ?_ + filter_upwards [Ω.traceH1_ofSchwartz_ae w₁, Ω.traceH1_ofSchwartz_ae w₂] with x' h1 h2 + rw [h1, h2] + +/-- **Green's formula for `H^1(V)` on a Lipschitz graph domain**: for `U, W ∈ H^1(V)` and every +direction `v`, `∫_Ω (∂_v U) W + U ∂_v W = ∫_H Tr U · Tr W · n_v` with the normal weight +`n_v = ⟪∇φ, v⟫ - ⟪v, e⟫`. Both sides are continuous on `H^1(V) × H^1(V)` and agree on the dense set +of pairs of compactly supported Schwartz functions (`Rd.dense_ofSchwartz_hasCompactSupport`). -/ +theorem setIntegral_green_besselPotentialSpace (U W : H^{1}(V)) (v : V) : + ∫ x in Ω.domain, weakDerivL2 v U x * toL2 W x + toL2 U x * weakDerivL2 v W x = + ∫ x', Ω.traceH1 U x' * Ω.traceH1 W x' * (Ω.normalWeight v x' : ℂ) := by + have hd := (dense_ofSchwartz_hasCompactSupport (V := V) 1).prod + (dense_ofSchwartz_hasCompactSupport (V := V) 1) + refine hd.induction (P := fun p : H^{1}(V) × H^{1}(V) => + ∫ x in Ω.domain, weakDerivL2 v p.1 x * toL2 p.2 x + toL2 p.1 x * weakDerivL2 v p.2 x = + ∫ x', Ω.traceH1 p.1 x' * Ω.traceH1 p.2 x' * (Ω.normalWeight v x' : ℂ)) ?_ + (isClosed_eq (Ω.continuous_setIntegral_weakDeriv_mul_add v) + (Ω.continuous_integral_traceH1_mul_normalWeight v)) (U, W) + rintro ⟨_, _⟩ ⟨⟨w₁, hw₁, rfl⟩, ⟨w₂, -, rfl⟩⟩ + exact Ω.setIntegral_green_ofSchwartz hw₁ w₂ v + +/-- **Green's formula on a Lipschitz graph domain**: for `f, g ∈ W^1_2(V)` with weak derivatives +`f_v = ∂_v f`, `g_v = ∂_v g` in `L_2(V)`, +`∫_Ω f_v g + f g_v = ∫_H Tr f · Tr g · n_v` with the traces of the trace theorem at `s = 1/2` and +the normal weight `n_v = ⟪∇φ, v⟫ - ⟪v, e⟫` +(`Rd.LipschitzGraph.setIntegral_green_besselPotentialSpace`). -/ +theorem setIntegral_green (f g : Lp ℂ 2 (volume : Measure V)) (hf : MemSobolev 1 f) + (hg : MemSobolev 1 g) (v : V) {fv gv : Lp ℂ 2 (volume : Measure V)} + (hfv : HasWeakLineDeriv ⊤ (fun _ : Fin 1 => v) f fv) + (hgv : HasWeakLineDeriv ⊤ (fun _ : Fin 1 => v) g gv) : + ∫ x in Ω.domain, fv x * g x + f x * gv x = + ∫ x', Ω.trace two_ne_top 2 f x' * Ω.trace two_ne_top 2 g x' * (Ω.normalWeight v x' : ℂ) := by + obtain ⟨U, rfl⟩ := exists_toL2_eq_of_memSobolev hf + obtain ⟨W, rfl⟩ := exists_toL2_eq_of_memSobolev hg + rw [← weakDerivL2_eq hfv, ← weakDerivL2_eq hgv] + exact Ω.setIntegral_green_besselPotentialSpace U W v + +/-- **Green's formula, surface form**: for `U, W ∈ H^1(V)` and every direction `v`, +`∫_Ω (∂_v U) W + U ∂_v W = ∫_Γ Tr U · Tr W ⟪v, ν⟫ dμHE[n-1]` over the boundary `Γ = γ(H)`, with +the traces and the normal read through the projection `P` (the area formula +`Rd.LipschitzGraph.integral_graphMap`). -/ +theorem setIntegral_green_surface (U W : H^{1}(V)) (v : V) : + ∫ x in Ω.domain, weakDerivL2 v U x * toL2 W x + toL2 U x * weakDerivL2 v W x = + ∫ y in range Ω.graphMap, Ω.traceH1 U (Ω.proj y) * Ω.traceH1 W (Ω.proj y) * + (inner ℝ v (Ω.normalAt (Ω.proj y)) : ℂ) ∂(μHE[finrank ℝ V - 1] : Measure V) := by + rw [Ω.setIntegral_green_besselPotentialSpace, Ω.integral_graphMap] + refine integral_congr_ae (ae_of_all _ fun x' => ?_) + simp only [proj_graphMap, ← Ω.inner_normalAt_mul_gram, Complex.ofReal_mul] + ring + +end LipschitzGraph + +end Rd diff --git a/LeanPool/FunctionSpaces/Domains/Sobolev/SobolevDuality.lean b/LeanPool/FunctionSpaces/Domains/Sobolev/SobolevDuality.lean new file mode 100644 index 0000000000..418d96082b --- /dev/null +++ b/LeanPool/FunctionSpaces/Domains/Sobolev/SobolevDuality.lean @@ -0,0 +1,573 @@ +/- +Copyright (c) 2026 Mario Ullrich. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Mario Ullrich +-/ +module + +public import LeanPool.FunctionSpaces.Domains.Sobolev.SobolevRestrictionSpaces +public import Mathlib.Analysis.InnerProductSpace.Dual + +/- +Modified for Lean Pool: module names and imports adapted. +-/ + +/-! +# Duality of Sobolev spaces on open sets + +Let `V` be a finite-dimensional real inner product space, such as `ℝ^d`, with Lebesgue measure, +`Ω ⊆ V` open and `s` real. The Hilbert spaces `H̃^s(Ω)` and `H^{-s}(Ω)` of +`FunctionSpaces/Domains/Sobolev/SobolevRestrictionSpaces.lean` are dual to each other, as in +Chandler-Wilde, Hewett and Moiola (Theorem 3.3), for every open set and every real `s`. + +* **The Bessel potential on Schwartz functions**: `J_t u = 𝓕⁻(⟨ξ⟩^t 𝓕u)` (`Rd.besselSchwartz`, in + `FunctionSpaces.Rd.Sobolev.SobolevTwoLittlewoodPaley`) is real for real `u` + (`Rd.conj_besselSchwartz_apply`); for `g ∈ L_2(V)`, `(J_t g)(u) = ∫ J_t u · g` + (`Rd.besselPotential_toLp_apply`). +* **`J_{2s}` as an isometry**: `Rd.besselShift s : H^s(V) ≃ₗᵢ[ℂ] H^{-s}(V)` keeps the `L_2` + function `J_s U` and acts on distributions as `J_{2s}` (`Rd.toDistr_besselShift`). +* **The pairing** `[W, U] = ⟪J_{-s} W, J_s U⟫_{L_2}` of `W ∈ H^{-s}(V)` and `U ∈ H^s(V)` + (`Rd.pairing`, bundled in `U` as `Rd.pairingCLM`) has `|[W, U]| ≤ ‖W‖ ‖U‖` and extends `U(φ)` + and `conj (W(φ))` for test functions `φ` (`Rd.pairing_ofTest_left`, `Rd.pairing_ofTest_right`); + at `s = 1` and for Schwartz `W` it is the `L_2` inner product (`Rd.pairing_one_toLp`). +* **Orthogonal complements**: `⟪U, φ⟫_{H^s} = conj ((J_{2s} U)(φ))` for test functions `φ` + (`Rd.inner_ofTest_eq`), so `U ⊥ H̃^s(Ω)` iff `J_{2s} U` vanishes on `Ω` + (`Rd.mem_orthogonal_tildeSpace_iff`), and `J_{2s}` maps `H̃^s(Ω)` onto `H^{-s}(Ω)` + (`Rd.tildeEquivRestriction`) and `H^s(Ω)` onto `H̃^{-s}(Ω)` (`Rd.restrictionEquivTilde`). + Elements vanishing on `Ω` pair to zero with `H̃^s(Ω)` (`Rd.pairing_eq_zero_of_mem_vanishOn_left`, + `Rd.pairing_eq_zero_of_mem_vanishOn_right`). +* **Duality**: `(H̃^s(Ω))^* ≅ H^{-s}(Ω)` (`Rd.dualEquiv`), `(H^s(Ω))^* ≅ H̃^{-s}(Ω)` + (`Rd.dualRestrictionEquiv`) and `(H^1_0(Ω))^* ≅ H^{-1}(Ω)` (`Rd.dualZeroBoundaryEquiv`), each + through the pairing, conjugate-linear and isometric; the pairing may use every extension of the + representing element (`Rd.dualEquiv_apply_of_restrictProj_eq`, + `Rd.dualRestrictionEquiv_apply_restrictProj`). +-/ + +@[expose] public section + +open MeasureTheory Filter TopologicalSpace ComplexConjugate +open scoped ENNReal SchwartzMap Real BesselPotentialSpace FourierTransform InnerProductSpace + Distributions +open TemperedDistribution (besselPotential) + +namespace Rd + +variable {V : Type*} [NormedAddCommGroup V] [InnerProductSpace ℝ V] [FiniteDimensional ℝ V] + [MeasurableSpace V] [BorelSpace V] + +/-! ### The Bessel potential on Schwartz functions -/ + +/-- **`J_t` keeps real functions real**: for a Schwartz function `u` with real values, +`conj (J_t u(x)) = J_t u(x)` (`Rd.conj_fourierInv_apply`, `Rd.conj_fourier_apply`, +`Rd.besselSchwartz_apply_eq_fourier`). -/ +theorem conj_besselSchwartz_apply (t : ℝ) {u : 𝓢(V, ℂ)} (hu : ∀ x, conj (u x) = u x) (x : V) : + conj (besselSchwartz t u x) = besselSchwartz t u x := by + conv_rhs => rw [besselSchwartz_apply_eq_fourier] + rw [besselSchwartz_apply, conj_fourierInv_apply] + refine congrFun (congrArg _ (funext fun ξ => ?_)) x + rw [map_mul, Complex.conj_ofReal, conj_fourier_apply] + simp only [hu] + +omit [FiniteDimensional ℝ V] [MeasurableSpace V] [BorelSpace V] in +/-- **A test function is real**: `conj (φ(x)) = φ(x)` for the Schwartz function of a real test +function `φ`. -/ +theorem conj_testSchwartz {Ω : Opens V} (φ : 𝓓(Ω, ℝ)) (x : V) : + conj (testSchwartz φ x) = testSchwartz φ x := by + simp + +/-- **The Bessel potential of an `L_2` function at a Schwartz function**: for `g ∈ L_2(V)` and a +Schwartz function `u`, `(J_t g)(u) = ∫ J_t u · g`, since Mathlib's `J_t` acts by the transpose +(`Rd.besselPotential_apply_apply`). -/ +theorem besselPotential_toLp_apply (t : ℝ) (g : Lp ℂ 2 (volume : Measure V)) (u : 𝓢(V, ℂ)) : + besselPotential V ℂ t (g : 𝓢'(V, ℂ)) u = ∫ x, besselSchwartz t u x * g x := by + rw [besselPotential_apply_apply, Lp.toTemperedDistribution_apply] + simp only [smul_eq_mul] + +/-- **`J_t` of a real Schwartz function against `L_2`**: for a Schwartz function `u` with real +values and `g ∈ L_2(V)`, `⟪J_t u, g⟫_{L_2} = (J_t g)(u)`: the inner product is +`∫ conj (J_t u) · g`, and `J_t u` is real (`Rd.conj_besselSchwartz_apply`, +`Rd.besselPotential_toLp_apply`). -/ +theorem inner_toLp_besselSchwartz (t : ℝ) {u : 𝓢(V, ℂ)} (hu : ∀ x, conj (u x) = u x) + (g : Lp ℂ 2 (volume : Measure V)) : + ⟪(besselSchwartz t u).toLp 2, g⟫_ℂ = besselPotential V ℂ t (g : 𝓢'(V, ℂ)) u := by + rw [MeasureTheory.L2.inner_def, besselPotential_toLp_apply] + refine integral_congr_ae ?_ + filter_upwards [(besselSchwartz t u).coeFn_toLp 2 volume] with x hx + rw [hx, RCLike.inner_apply', conj_besselSchwartz_apply t hu] + +/-! ### The inner product of `H^t(V)` and Schwartz functions -/ + +/-- **The inner product of `H^t(V)` is that of the `L_2` functions**: +`⟪U, W⟫_{H^t} = ⟪J_t U, J_t W⟫_{L_2}`, which is how Mathlib defines the inner product of +`BesselPotentialSpace`. -/ +theorem inner_toLp_toLp {t : ℝ} (U W : H^{t}(V)) : ⟪U.toLp, W.toLp⟫_ℂ = ⟪U, W⟫_ℂ := + rfl + +/-- **The `L_2` function of a Schwartz function in `H^t(V)`**: for a Schwartz function `u`, the +element `u ∈ H^t(V)` (Mathlib's `SchwartzMap.memSobolev`) has `J_t u` as its `L_2` function, since +`L_2` functions are determined by their distributions (`Rd.eq_of_toTemperedDistribution_eq`). -/ +theorem toLp_schwartz (t : ℝ) (u : 𝓢(V, ℂ)) : + (u.memSobolev (s := t) (p := 2)).toBesselPotentialSpace.toLp = + (besselSchwartz t u).toLp 2 := by + have h : (((u.memSobolev (s := t) (p := 2)).toBesselPotentialSpace.toLp : + Lp ℂ 2 (volume : Measure V)) : 𝓢'(V, ℂ)) = + (((besselSchwartz t u).toLp 2 : Lp ℂ 2 (volume : Measure V)) : 𝓢'(V, ℂ)) := by + rw [← BesselPotentialSpace.bessel_toDistr_eq_toLp, + TemperedDistribution.MemSobolev.toBesselPotentialSpace_toDistr, besselPotential_schwartz, + Lp.toTemperedDistribution_toLp_eq] + exact eq_of_toTemperedDistribution_eq h + +/-- The `L_2` function of a test function `φ` in `H^t(V)` is `J_t φ` (`Rd.toLp_schwartz`). -/ +theorem toLp_ofTest {Ω : Opens V} (t : ℝ) (φ : 𝓓(Ω, ℝ)) : + (ofTest t φ).toLp = (besselSchwartz t (testSchwartz φ)).toLp 2 := + toLp_schwartz t (testSchwartz φ) + +/-- **Test functions against `L_2`**: for a test function `φ` of `Ω`, as an element of `H^t(V)`, +and `g ∈ L_2(V)`, `⟪J_t φ, g⟫_{L_2} = (J_t g)(φ)` (`Rd.inner_toLp_besselSchwartz`). -/ +theorem inner_ofTest_toLp {Ω : Opens V} (t : ℝ) (φ : 𝓓(Ω, ℝ)) + (g : Lp ℂ 2 (volume : Measure V)) : + ⟪(ofTest t φ).toLp, g⟫_ℂ = besselPotential V ℂ t (g : 𝓢'(V, ℂ)) (testSchwartz φ) := by + rw [toLp_ofTest] + exact inner_toLp_besselSchwartz t (conj_testSchwartz φ) g + +/-- **Inner products with a test function in the left slot**: for a test function `φ` of `Ω` and +`U ∈ H^t(V)`, `⟪φ, U⟫_{H^t} = (J_t (J_t U))(φ)`, the distribution `J_t` of the `L_2` function +`J_t U` at `φ` (`Rd.inner_ofTest_toLp`). -/ +theorem inner_ofTest_left {Ω : Opens V} (t : ℝ) (φ : 𝓓(Ω, ℝ)) (U : H^{t}(V)) : + ⟪ofTest t φ, U⟫_ℂ = besselPotential V ℂ t (U.toLp : 𝓢'(V, ℂ)) (testSchwartz φ) := by + rw [← inner_toLp_toLp, inner_ofTest_toLp] + +/-! ### `J_{2s}` as an isometry -/ + +variable (s : ℝ) in +/-- **`J_{2s}` as an isometry of `H^s(V)` onto `H^{-s}(V)`**: both spaces are isometric to +`L_2(V)` (Mathlib's `BesselPotentialSpace.toLpₗᵢ`), and `besselShift s U` is the element of +`H^{-s}(V)` with the same `L_2` function `J_s U` as `U`; on distributions it is `J_{2s}` +(`Rd.toDistr_besselShift`). -/ +noncomputable def besselShift : H^{s}(V) ≃ₗᵢ[ℂ] H^{-s}(V) := + (BesselPotentialSpace.toLpₗᵢ V ℂ s 2).trans (BesselPotentialSpace.toLpₗᵢ V ℂ (-s) 2).symm + +variable {s : ℝ} {Ω : Opens V} + +/-- An element of `H^t(V)` built from an `L_2` function `f` by the inverse of Mathlib's isometry +`BesselPotentialSpace.toLpₗᵢ` has `f` as its `L_2` function. -/ +theorem toLp_toLpLinearIsometry_symm_apply (t : ℝ) (f : Lp ℂ 2 (volume : Measure V)) : + ((BesselPotentialSpace.toLpₗᵢ V ℂ t 2).symm f).toLp = f := by + rw [← BesselPotentialSpace.toLpₗᵢ_apply, LinearIsometryEquiv.apply_symm_apply] + +/-- `besselShift s U` has the same `L_2` function as `U`. -/ +@[simp] +theorem toLp_besselShift (U : H^{s}(V)) : (besselShift s U).toLp = U.toLp := by + rw [besselShift, LinearIsometryEquiv.trans_apply, BesselPotentialSpace.toLpₗᵢ_apply, + toLp_toLpLinearIsometry_symm_apply] + +/-- The distribution of `besselShift s U` is `J_s` of the `L_2` function `J_s U`. -/ +theorem toDistr_besselShift_eq_besselPotential_toLp (U : H^{s}(V)) : + (besselShift s U).toDistr = besselPotential V ℂ s (U.toLp : 𝓢'(V, ℂ)) := by + rw [besselShift, LinearIsometryEquiv.trans_apply, BesselPotentialSpace.toLpₗᵢ_apply, + BesselPotentialSpace.toLpₗᵢ_symm_apply, neg_neg] + +/-- **Inner products with test functions through `besselShift`**: for `U ∈ H^s(V)` and a test +function `φ` of `Ω`, `⟪U, φ⟫_{H^s} = conj ((J_{2s} U)(φ))`, the conjugate of the distribution +`besselShift s U` at `φ` (`Rd.inner_ofTest_left`, +`Rd.toDistr_besselShift_eq_besselPotential_toLp`). -/ +theorem inner_ofTest_eq (U : H^{s}(V)) (φ : 𝓓(Ω, ℝ)) : + ⟪U, ofTest s φ⟫_ℂ = conj ((besselShift s U).toDistr (testSchwartz φ)) := by + rw [← inner_conj_symm, inner_ofTest_left, toDistr_besselShift_eq_besselPotential_toLp] + +/-- **`besselShift s` is `J_{2s}` on distributions**: the distribution of `besselShift s U` is +`J_{2s} U`, since `J_s U` is the `L_2` function of `U` and `J_s J_s = J_{2s}` (Mathlib's +`TemperedDistribution.besselPotential_besselPotential_apply`). -/ +theorem toDistr_besselShift (U : H^{s}(V)) : + (besselShift s U).toDistr = besselPotential V ℂ (2 * s) U.toDistr := by + rw [toDistr_besselShift_eq_besselPotential_toLp, ← U.bessel_toDistr_eq_toLp, + TemperedDistribution.besselPotential_besselPotential_apply, two_mul] + +/-- **The inverse of `besselShift s`** is `besselShift (-s)`, read in `H^s(V)` through +`-(-s) = s` (Mathlib's `BesselPotentialSpace.copy`): both keep the `L_2` function. -/ +theorem besselShift_symm_apply (W : H^{-s}(V)) : + (besselShift s).symm W = (besselShift (-s) W).copy s (neg_neg s) := by + refine BesselPotentialSpace.injective_toLp V ℂ s 2 ?_ + rw [BesselPotentialSpace.toLp_copy _ (neg_neg s), toLp_besselShift, besselShift, + LinearIsometryEquiv.symm_trans, LinearIsometryEquiv.trans_apply, + LinearIsometryEquiv.symm_symm, BesselPotentialSpace.toLpₗᵢ_apply, + toLp_toLpLinearIsometry_symm_apply] + +/-- The inverse of `besselShift s` keeps the `L_2` function. -/ +@[simp] +theorem toLp_besselShift_symm (W : H^{-s}(V)) : ((besselShift s).symm W).toLp = W.toLp := by + rw [besselShift_symm_apply, BesselPotentialSpace.toLp_copy _ (neg_neg s), toLp_besselShift] + +/-- The distribution of `(besselShift s)⁻¹ W` is `J_{-s}` of the `L_2` function of `W`. -/ +theorem toDistr_besselShift_symm (W : H^{-s}(V)) : + ((besselShift s).symm W).toDistr = besselPotential V ℂ (-s) (W.toLp : 𝓢'(V, ℂ)) := by + rw [besselShift, LinearIsometryEquiv.symm_trans, LinearIsometryEquiv.trans_apply, + LinearIsometryEquiv.symm_symm, BesselPotentialSpace.toLpₗᵢ_apply, + BesselPotentialSpace.toLpₗᵢ_symm_apply] + +/-! ### The pairing of `H^{-s}(V)` and `H^s(V)` -/ + +variable (s) in +/-- **The pairing of `H^{-s}(V)` and `H^s(V)`**: `[W, U] = ⟪J_{-s} W, J_s U⟫_{L_2}`, the `L_2` +inner product of the `L_2` functions of `W` and `U`. It is conjugate-linear in `W` +(`Rd.pairing_add_left`, `Rd.pairing_smul_left`) and linear in `U` (`Rd.pairing_add_right`, +`Rd.pairing_smul_right`, `Rd.pairingCLM`), Mathlib's convention for inner products. For test +functions it is the distributional pairing (`Rd.pairing_ofTest_left`, `Rd.pairing_ofTest_right`). -/ +noncomputable def pairing (W : H^{-s}(V)) (U : H^{s}(V)) : ℂ := + ⟪W.toLp, U.toLp⟫_ℂ + +/-- The pairing is additive in `W`: `[W + W', U] = [W, U] + [W', U]`. -/ +theorem pairing_add_left (W W' : H^{-s}(V)) (U : H^{s}(V)) : + pairing s (W + W') U = pairing s W U + pairing s W' U := by + simp only [pairing, BesselPotentialSpace.toLp_add, inner_add_left] + +/-- The pairing respects differences in `W`: `[W - W', U] = [W, U] - [W', U]`. -/ +theorem pairing_sub_left (W W' : H^{-s}(V)) (U : H^{s}(V)) : + pairing s (W - W') U = pairing s W U - pairing s W' U := by + simp only [pairing, BesselPotentialSpace.toLp_sub, inner_sub_left] + +/-- The pairing is conjugate-homogeneous in `W`: `[c W, U] = conj c · [W, U]`. -/ +theorem pairing_smul_left (c : ℂ) (W : H^{-s}(V)) (U : H^{s}(V)) : + pairing s (c • W) U = conj c * pairing s W U := by + simp only [pairing, BesselPotentialSpace.toLp_smul, inner_smul_left] + +/-- The pairing is additive in `U`: `[W, U + U'] = [W, U] + [W, U']`. -/ +theorem pairing_add_right (W : H^{-s}(V)) (U U' : H^{s}(V)) : + pairing s W (U + U') = pairing s W U + pairing s W U' := by + simp only [pairing, BesselPotentialSpace.toLp_add, inner_add_right] + +/-- The pairing respects differences in `U`: `[W, U - U'] = [W, U] - [W, U']`. -/ +theorem pairing_sub_right (W : H^{-s}(V)) (U U' : H^{s}(V)) : + pairing s W (U - U') = pairing s W U - pairing s W U' := by + simp only [pairing, BesselPotentialSpace.toLp_sub, inner_sub_right] + +/-- The pairing is homogeneous in `U`: `[W, c U] = c · [W, U]`. -/ +theorem pairing_smul_right (W : H^{-s}(V)) (c : ℂ) (U : H^{s}(V)) : + pairing s W (c • U) = c * pairing s W U := by + simp only [pairing, BesselPotentialSpace.toLp_smul, inner_smul_right] + +variable (s) in +/-- **The pairing as a bounded functional**: for `W ∈ H^{-s}(V)`, `U ↦ [W, U]` as a continuous +linear map `H^s(V) → ℂ`, the inner product with `J_{-s} W` (Mathlib's `innerSL`) after the +isometry `U ↦ J_s U` onto `L_2(V)`. -/ +noncomputable def pairingCLM (W : H^{-s}(V)) : H^{s}(V) →L[ℂ] ℂ := + (innerSL ℂ W.toLp).comp + (BesselPotentialSpace.toLpₗᵢ V ℂ s 2).toContinuousLinearEquiv.toContinuousLinearMap + +/-- `pairingCLM s W U = [W, U]`. -/ +@[simp] +theorem pairingCLM_apply (W : H^{-s}(V)) (U : H^{s}(V)) : pairingCLM s W U = pairing s W U := by + simp only [pairingCLM, pairing, ContinuousLinearMap.comp_apply, ContinuousLinearEquiv.coe_coe, + LinearIsometryEquiv.coe_toContinuousLinearEquiv, BesselPotentialSpace.toLpₗᵢ_apply, + innerSL_apply_apply] + +/-- **The pairing is bounded**: `|[W, U]| ≤ ‖W‖ ‖U‖` (Cauchy–Schwarz in `L_2`). -/ +theorem norm_pairing_le (W : H^{-s}(V)) (U : H^{s}(V)) : ‖pairing s W U‖ ≤ ‖W‖ * ‖U‖ := by + rw [← BesselPotentialSpace.norm_toLp_eq W, ← BesselPotentialSpace.norm_toLp_eq U] + exact norm_inner_le_norm _ _ + +/-- **The pairing through `besselShift`**: `[J_{2s} U', U] = ⟪U', U⟫_{H^s}`. -/ +theorem pairing_besselShift (U' U : H^{s}(V)) : pairing s (besselShift s U') U = ⟪U', U⟫_ℂ := by + rw [pairing, toLp_besselShift, inner_toLp_toLp] + +/-- **The pairing extends the distribution in the first slot**: for a test function `φ` of `Ω` +and `U ∈ H^s(V)`, `[φ, U] = U(φ)`, since `[φ, U] = (J_{-s}(J_s U))(φ)` +(`Rd.inner_ofTest_toLp`). -/ +theorem pairing_ofTest_left (φ : 𝓓(Ω, ℝ)) (U : H^{s}(V)) : + pairing s (ofTest (-s) φ) U = U.toDistr (testSchwartz φ) := by + rw [pairing, inner_ofTest_toLp, U.besselPotential_neg_toLp_eq] + +/-- **The pairing extends the distribution in the second slot**: for `W ∈ H^{-s}(V)` and a test +function `φ` of `Ω`, `[W, φ] = conj (W(φ))`. -/ +theorem pairing_ofTest_right (W : H^{-s}(V)) (φ : 𝓓(Ω, ℝ)) : + pairing s W (ofTest s φ) = conj (W.toDistr (testSchwartz φ)) := by + have hW := W.besselPotential_neg_toLp_eq + rw [neg_neg] at hW + rw [pairing, ← inner_conj_symm, inner_ofTest_toLp, hW] + +/-- **The pairing at `s = 1` is the `L_2` inner product**: for a Schwartz function `ψ` as an +element of `H^{-1}(V)` and `U ∈ H^1(V)`, `[ψ, U] = ⟪ψ, U⟫_{L_2}`. By Plancherel both sides are +integrals of Fourier transforms, `∫ conj (⟨ξ⟩⁻¹ 𝓕ψ) 𝓕(J_1 U)` and `∫ conj (𝓕ψ) ⟨ξ⟩⁻¹ 𝓕(J_1 U)` +(`Rd.fourier_toL2_ae_eq`), and the weight is real. -/ +theorem pairing_one_toLp (ψ : 𝓢(V, ℂ)) (U : H^{1}(V)) : + pairing 1 (ψ.memSobolev (s := -1) (p := 2)).toBesselPotentialSpace U = + ⟪ψ.toLp 2, toL2 U⟫_ℂ := by + rw [pairing, toLp_schwartz, ← Lp.inner_fourier_eq] + conv_rhs => rw [← Lp.inner_fourier_eq] + rw [SchwartzMap.toLp_fourier_eq, SchwartzMap.toLp_fourier_eq, MeasureTheory.L2.inner_def, + MeasureTheory.L2.inner_def] + refine integral_congr_ae ?_ + filter_upwards [(𝓕 (besselSchwartz (-1) ψ)).coeFn_toLp 2 volume, (𝓕 ψ).coeFn_toLp 2 volume, + fourier_toL2_ae_eq U] with ξ h1 h2 h3 + rw [h1, h2, h3, RCLike.inner_apply', RCLike.inner_apply', besselSchwartz, + SchwartzMap.fourierMultiplierCLM_apply, FourierTransform.fourier_fourierInv_eq, + SchwartzMap.smulLeftCLM_apply_apply (hasTemperateGrowth_besselWeight (-1)), smul_eq_mul, + map_mul, Complex.conj_ofReal] + ring + +/-! ### Orthogonal complements of `H̃^t(Ω)` -/ + +/-- **The orthogonal complement of `H̃^t(Ω)`**: `U ∈ H^t(V)` is orthogonal to `H̃^t(Ω)` iff the +distribution `J_t (J_t U)` vanishes on every test function of `Ω`. The orthogonal complement of a +closure is that of the set (Mathlib's `Submodule.orthogonal_closure`), orthogonality to a span is +orthogonality to its generators, and `⟪φ, U⟫ = (J_t (J_t U))(φ)` (`Rd.inner_ofTest_left`). -/ +theorem mem_orthogonal_tildeSpace_iff_toLp {t : ℝ} (U : H^{t}(V)) : + U ∈ (tildeSpace t Ω)ᗮ ↔ + ∀ φ : 𝓓(Ω, ℝ), besselPotential V ℂ t (U.toLp : 𝓢'(V, ℂ)) (testSchwartz φ) = 0 := by + rw [tildeSpace, Submodule.orthogonal_closure, testSpan, Submodule.mem_orthogonal] + constructor + · intro h φ + rw [← inner_ofTest_left] + exact h _ (Submodule.subset_span ⟨φ, rfl⟩) + · intro h u hu + induction hu using Submodule.span_induction with + | mem x hx => + obtain ⟨φ, rfl⟩ := hx + exact (inner_ofTest_left t φ U).trans (h φ) + | zero => exact inner_zero_left _ + | add x y _ _ hx hy => rw [inner_add_left, hx, hy, add_zero] + | smul c x _ hx => rw [inner_smul_left, hx, mul_zero] + +/-- **The orthogonal complement of `H̃^t(Ω)` as a preimage**: for a linear isometry `e` of +`H^t(V)` onto `H^{t'}(V)` whose values are the distributions `J_t (J_t U)`, `H̃^t(Ω)^⊥` is the +preimage under `e` of the elements of `H^{t'}(V)` vanishing on `Ω` +(`Rd.mem_orthogonal_tildeSpace_iff_toLp`). The hypothesis determines `e`, and such an `e` exists +only for `t' = -t`; the lemma is stated with `t'` free so that it applies to both +`Rd.besselShift s` and its inverse. -/ +theorem orthogonal_tildeSpace_eq_comap {t t' : ℝ} (e : H^{t}(V) ≃ₗᵢ[ℂ] H^{t'}(V)) + (he : ∀ U, (e U).toDistr = besselPotential V ℂ t (U.toLp : 𝓢'(V, ℂ))) : + (tildeSpace t Ω)ᗮ = (vanishOn t' Ω).comap (e.toLinearEquiv : H^{t}(V) →ₗ[ℂ] H^{t'}(V)) := by + ext U + rw [mem_orthogonal_tildeSpace_iff_toLp, Submodule.mem_comap, mem_vanishOn_iff] + simp only [LinearEquiv.coe_coe, LinearIsometryEquiv.coe_toLinearEquiv, he] + +/-- **The image of `H̃^t(Ω)`**: for `e` as in `Rd.orthogonal_tildeSpace_eq_comap`, `e(H̃^t(Ω))` +is `H^{t'}(Ω)`, the orthogonal complement of the elements of `H^{t'}(V)` vanishing on `Ω`. Since +`H̃^t(Ω)` is closed it is its double orthogonal complement, and `e` maps orthogonal complements +to orthogonal complements (Mathlib's `Submodule.map_orthogonal_equiv`). As there, `t'` is free +only so that the lemma applies to both `Rd.besselShift s` and its inverse. -/ +theorem map_tildeSpace_eq_orthogonal {t t' : ℝ} (e : H^{t}(V) ≃ₗᵢ[ℂ] H^{t'}(V)) + (he : ∀ U, (e U).toDistr = besselPotential V ℂ t (U.toLp : 𝓢'(V, ℂ))) : + (tildeSpace t Ω).map (e.toLinearEquiv : H^{t}(V) →ₗ[ℂ] H^{t'}(V)) = (vanishOn t' Ω)ᗮ := by + calc (tildeSpace t Ω).map (e.toLinearEquiv : H^{t}(V) →ₗ[ℂ] H^{t'}(V)) + = ((tildeSpace t Ω)ᗮᗮ).map (e.toLinearEquiv : H^{t}(V) →ₗ[ℂ] H^{t'}(V)) := by + rw [Submodule.orthogonal_orthogonal] + _ = (((tildeSpace t Ω)ᗮ).map (e.toLinearEquiv : H^{t}(V) →ₗ[ℂ] H^{t'}(V)))ᗮ := + Submodule.map_orthogonal_equiv _ e + _ = (vanishOn t' Ω)ᗮ := by + rw [orthogonal_tildeSpace_eq_comap e he, + Submodule.map_comap_eq_of_surjective e.toLinearEquiv.surjective] + +/-- **The orthogonal complement of `H̃^s(Ω)`**: `U ∈ H^s(V)` is orthogonal to `H̃^s(Ω)` iff +`J_{2s} U ∈ H^{-s}(V)` vanishes on `Ω`. -/ +theorem mem_orthogonal_tildeSpace_iff (U : H^{s}(V)) : + U ∈ (tildeSpace s Ω)ᗮ ↔ besselShift s U ∈ vanishOn (-s) Ω := by + rw [orthogonal_tildeSpace_eq_comap (besselShift s) toDistr_besselShift_eq_besselPotential_toLp] + rfl + +/-- **`J_{2s}` maps `H̃^s(Ω)` onto `H^{-s}(Ω)`**: the image of `H̃^s(Ω)` under `besselShift s` is +the orthogonal complement of the elements of `H^{-s}(V)` vanishing on `Ω`. -/ +theorem map_tildeSpace_besselShift : + (tildeSpace s Ω).map ((besselShift (V := V) s).toLinearEquiv : H^{s}(V) →ₗ[ℂ] H^{-s}(V)) = + (vanishOn (-s) Ω)ᗮ := + map_tildeSpace_eq_orthogonal (besselShift s) toDistr_besselShift_eq_besselPotential_toLp + +/-- **`J_{-2s}` maps `H̃^{-s}(Ω)` onto `H^s(Ω)`**: the image of `H̃^{-s}(Ω)` under the inverse of +`besselShift s` is the orthogonal complement of the elements of `H^s(V)` vanishing on `Ω`. -/ +theorem map_tildeSpace_besselShift_symm : + (tildeSpace (-s) Ω).map + ((besselShift (V := V) s).symm.toLinearEquiv : H^{-s}(V) →ₗ[ℂ] H^{s}(V)) = + (vanishOn s Ω)ᗮ := + map_tildeSpace_eq_orthogonal (besselShift s).symm toDistr_besselShift_symm + +/-- **Elements vanishing on `Ω` pair to zero with `H̃^s(Ω)`**: for `W ∈ H^{-s}(V)` vanishing on +`Ω` and `U ∈ H̃^s(Ω)`, `[W, U] = 0`. With `U' = (besselShift s)⁻¹ W`, `[W, U] = ⟪U', U⟫_{H^s}`, +and `U'` is orthogonal to `H̃^s(Ω)` (`Rd.mem_orthogonal_tildeSpace_iff`). -/ +theorem pairing_eq_zero_of_mem_vanishOn_left {W : H^{-s}(V)} (hW : W ∈ vanishOn (-s) Ω) + {U : H^{s}(V)} (hU : U ∈ tildeSpace s Ω) : pairing s W U = 0 := by + have h : (besselShift s).symm W ∈ (tildeSpace s Ω)ᗮ := by + rw [mem_orthogonal_tildeSpace_iff, LinearIsometryEquiv.apply_symm_apply] + exact hW + rw [pairing, ← toLp_besselShift_symm W, inner_toLp_toLp] + exact Submodule.inner_left_of_mem_orthogonal hU h + +/-- **`H̃^{-s}(Ω)` pairs to zero with the elements vanishing on `Ω`**: for `W ∈ H̃^{-s}(Ω)` and +`U ∈ H^s(V)` vanishing on `Ω`, `[W, U] = 0`, since `(besselShift s)⁻¹ W` lies in the orthogonal +complement of the elements vanishing on `Ω` (`Rd.map_tildeSpace_besselShift_symm`). -/ +theorem pairing_eq_zero_of_mem_vanishOn_right {W : H^{-s}(V)} (hW : W ∈ tildeSpace (-s) Ω) + {U : H^{s}(V)} (hU : U ∈ vanishOn s Ω) : pairing s W U = 0 := by + have h : (besselShift s).symm W ∈ (vanishOn s Ω)ᗮ := by + rw [← map_tildeSpace_besselShift_symm] + exact Submodule.mem_map_of_mem hW + rw [pairing, ← toLp_besselShift_symm W, inner_toLp_toLp] + exact Submodule.inner_left_of_mem_orthogonal hU h + +/-! ### `H̃^s(Ω) ≅ H^{-s}(Ω)` -/ + +variable (s Ω) in +/-- **`H̃^s(Ω) ≅ H^{-s}(Ω)` by `J_{2s}`**: for every open set `Ω` and every real `s`, +`besselShift s` restricts to an isometric isomorphism of `H̃^s(Ω)` onto `H^{-s}(Ω)` +(`Rd.map_tildeSpace_besselShift`, Mathlib's `LinearIsometryEquiv.submoduleMap`). -/ +noncomputable def tildeEquivRestriction : tildeSpace s Ω ≃ₗᵢ[ℂ] RestrictionSpace (-s) Ω := + ((besselShift s).submoduleMap (tildeSpace s Ω)).trans + (LinearIsometryEquiv.ofEq _ _ map_tildeSpace_besselShift) + +/-- `tildeEquivRestriction s Ω U` is `besselShift s U`. -/ +theorem coe_tildeEquivRestriction_apply (U : tildeSpace s Ω) : + (tildeEquivRestriction s Ω U : H^{-s}(V)) = besselShift s U := + rfl + +variable (s Ω) in +/-- **`H^s(Ω) ≅ H̃^{-s}(Ω)` by `J_{2s}`**: for every open set `Ω` and every real `s`, +`besselShift s` restricts to an isometric isomorphism of `H^s(Ω)` onto `H̃^{-s}(Ω)`, the inverse +of the restriction of `(besselShift s)⁻¹` to `H̃^{-s}(Ω)` (`Rd.map_tildeSpace_besselShift_symm`). -/ +noncomputable def restrictionEquivTilde : RestrictionSpace s Ω ≃ₗᵢ[ℂ] tildeSpace (-s) Ω := + (((besselShift s).symm.submoduleMap (tildeSpace (-s) Ω)).trans + (LinearIsometryEquiv.ofEq _ _ map_tildeSpace_besselShift_symm)).symm + +/-- `restrictionEquivTilde s Ω u` is `besselShift s u`. -/ +theorem coe_restrictionEquivTilde_apply (u : RestrictionSpace s Ω) : + (restrictionEquivTilde s Ω u : H^{-s}(V)) = besselShift s u := by + have h : ((restrictionEquivTilde s Ω).symm (restrictionEquivTilde s Ω u) : H^{s}(V)) = + (besselShift s).symm (restrictionEquivTilde s Ω u) := + rfl + rw [LinearIsometryEquiv.symm_apply_apply] at h + rw [h, LinearIsometryEquiv.apply_symm_apply] + +/-! ### The dual of `H̃^s(Ω)` -/ + +variable (s Ω) in +/-- **The dual of `H̃^s(Ω)` is `H^{-s}(Ω)`**: for every open set `Ω` and every real `s`, every +bounded functional `ℓ` on `H̃^s(Ω)` is `U ↦ [W, U]` for exactly one `W ∈ H^{-s}(Ω)` +(`Rd.dualEquiv_apply`, `Rd.dualEquiv_eq_iff`), with `‖W‖ = ‖ℓ‖`, and every extension of `W` to +`V` gives the same pairing (`Rd.dualEquiv_apply_of_restrictProj_eq`); this is Theorem 3.3 of +Chandler-Wilde, Hewett and Moiola with the sesquilinear pairing. The map `ℓ ↦ W` is Riesz's +representation (Mathlib's `InnerProductSpace.toDual`) followed by `Rd.tildeEquivRestriction`, +conjugate-linear and isometric. -/ +noncomputable def dualEquiv : StrongDual ℂ (tildeSpace s Ω) ≃ₗᵢ⋆[ℂ] RestrictionSpace (-s) Ω := + (InnerProductSpace.toDual ℂ (tildeSpace s Ω)).symm.trans (tildeEquivRestriction s Ω) + +/-- **`ℓ` is the pairing with `dualEquiv s Ω ℓ`**: `ℓ(U) = [W, U]` for `W = dualEquiv s Ω ℓ` and +every `U ∈ H̃^s(Ω)` (Mathlib's `InnerProductSpace.toDual_symm_apply`, +`Rd.pairing_besselShift`). -/ +theorem dualEquiv_apply (ℓ : StrongDual ℂ (tildeSpace s Ω)) (U : tildeSpace s Ω) : + ℓ U = pairing s (dualEquiv s Ω ℓ : H^{-s}(V)) (U : H^{s}(V)) := by + rw [← InnerProductSpace.toDual_symm_apply, Submodule.coe_inner, dualEquiv, + LinearIsometryEquiv.trans_apply, coe_tildeEquivRestriction_apply, pairing_besselShift] + +/-- The functional of `W ∈ H^{-s}(Ω)` is `U ↦ [W, U]`. -/ +theorem dualEquiv_symm_apply (W : RestrictionSpace (-s) Ω) (U : tildeSpace s Ω) : + (dualEquiv s Ω).symm W U = pairing s (W : H^{-s}(V)) (U : H^{s}(V)) := by + rw [dualEquiv_apply, LinearIsometryEquiv.apply_symm_apply] + +/-- **Uniqueness of the representing element**: `dualEquiv s Ω ℓ = W` iff `ℓ(U) = [W, U]` for +every `U ∈ H̃^s(Ω)` (Mathlib's `LinearIsometryEquiv.eq_symm_apply`). -/ +theorem dualEquiv_eq_iff (ℓ : StrongDual ℂ (tildeSpace s Ω)) (W : RestrictionSpace (-s) Ω) : + dualEquiv s Ω ℓ = W ↔ + ∀ U : tildeSpace s Ω, ℓ U = pairing s (W : H^{-s}(V)) (U : H^{s}(V)) := by + rw [← LinearIsometryEquiv.eq_symm_apply, ContinuousLinearMap.ext_iff] + simp only [dualEquiv_symm_apply] + +/-- `‖dualEquiv s Ω ℓ‖ = ‖ℓ‖`. -/ +theorem norm_dualEquiv (ℓ : StrongDual ℂ (tildeSpace s Ω)) : ‖dualEquiv s Ω ℓ‖ = ‖ℓ‖ := + LinearIsometryEquiv.norm_map _ _ + +/-- **Every extension represents `ℓ`**: if `W ∈ H^{-s}(V)` restricts to `dualEquiv s Ω ℓ`, then +`ℓ(U) = [W, U]` for every `U ∈ H̃^s(Ω)`. `W` and its restriction differ by an element vanishing +on `Ω` (`Rd.sub_restrictProj_mem`), which pairs to zero with `H̃^s(Ω)` +(`Rd.pairing_eq_zero_of_mem_vanishOn_left`). -/ +theorem dualEquiv_apply_of_restrictProj_eq (ℓ : StrongDual ℂ (tildeSpace s Ω)) + (U : tildeSpace s Ω) {W : H^{-s}(V)} (hW : restrictProj (-s) Ω W = dualEquiv s Ω ℓ) : + ℓ U = pairing s W (U : H^{s}(V)) := by + have h := pairing_eq_zero_of_mem_vanishOn_left (sub_restrictProj_mem W) U.2 + rw [pairing_sub_left, sub_eq_zero, hW] at h + rw [dualEquiv_apply, h] + +/-! ### The duals of `H^s(Ω)` and `H^1_0(Ω)` -/ + +variable (s Ω) in +/-- **The dual of `H^s(Ω)` is `H̃^{-s}(Ω)`**: for every open set `Ω` and every real `s`, every +bounded functional `ℓ` on `H^s(Ω)` is `u ↦ [W, u]` for exactly one `W ∈ H̃^{-s}(Ω)` +(`Rd.dualRestrictionEquiv_apply`, `Rd.dualRestrictionEquiv_eq_iff`), with `‖W‖ = ‖ℓ‖`, and +`ℓ(U|_Ω) = [W, U]` for every `U ∈ H^s(V)` (`Rd.dualRestrictionEquiv_apply_restrictProj`): +Riesz's representation followed by `Rd.restrictionEquivTilde`, conjugate-linear and isometric. -/ +noncomputable def dualRestrictionEquiv : + StrongDual ℂ (RestrictionSpace s Ω) ≃ₗᵢ⋆[ℂ] tildeSpace (-s) Ω := + (InnerProductSpace.toDual ℂ (RestrictionSpace s Ω)).symm.trans (restrictionEquivTilde s Ω) + +/-- **`ℓ` is the pairing with `dualRestrictionEquiv s Ω ℓ`**: `ℓ(u) = [W, u]` for +`W = dualRestrictionEquiv s Ω ℓ` and every `u ∈ H^s(Ω)`. -/ +theorem dualRestrictionEquiv_apply (ℓ : StrongDual ℂ (RestrictionSpace s Ω)) + (u : RestrictionSpace s Ω) : + ℓ u = pairing s (dualRestrictionEquiv s Ω ℓ : H^{-s}(V)) (u : H^{s}(V)) := by + rw [← InnerProductSpace.toDual_symm_apply, Submodule.coe_inner, dualRestrictionEquiv, + LinearIsometryEquiv.trans_apply, coe_restrictionEquivTilde_apply, pairing_besselShift] + +/-- The functional of `W ∈ H̃^{-s}(Ω)` is `u ↦ [W, u]`. -/ +theorem dualRestrictionEquiv_symm_apply (W : tildeSpace (-s) Ω) (u : RestrictionSpace s Ω) : + (dualRestrictionEquiv s Ω).symm W u = pairing s (W : H^{-s}(V)) (u : H^{s}(V)) := by + rw [dualRestrictionEquiv_apply, LinearIsometryEquiv.apply_symm_apply] + +/-- **Uniqueness of the representing element**: `dualRestrictionEquiv s Ω ℓ = W` iff +`ℓ(u) = [W, u]` for every `u ∈ H^s(Ω)`. -/ +theorem dualRestrictionEquiv_eq_iff (ℓ : StrongDual ℂ (RestrictionSpace s Ω)) + (W : tildeSpace (-s) Ω) : + dualRestrictionEquiv s Ω ℓ = W ↔ + ∀ u : RestrictionSpace s Ω, ℓ u = pairing s (W : H^{-s}(V)) (u : H^{s}(V)) := by + rw [← LinearIsometryEquiv.eq_symm_apply, ContinuousLinearMap.ext_iff] + simp only [dualRestrictionEquiv_symm_apply] + +/-- **The pairing with every extension**: `ℓ(U|_Ω) = [W, U]` for `W = dualRestrictionEquiv s Ω ℓ` +and every `U ∈ H^s(V)`. `U` and its restriction differ by an element vanishing on `Ω` +(`Rd.sub_restrictProj_mem`), which pairs to zero with `H̃^{-s}(Ω)` +(`Rd.pairing_eq_zero_of_mem_vanishOn_right`). -/ +theorem dualRestrictionEquiv_apply_restrictProj (ℓ : StrongDual ℂ (RestrictionSpace s Ω)) + (U : H^{s}(V)) : + ℓ (restrictProj s Ω U) = pairing s (dualRestrictionEquiv s Ω ℓ : H^{-s}(V)) U := by + have h := pairing_eq_zero_of_mem_vanishOn_right (dualRestrictionEquiv s Ω ℓ).2 + (sub_restrictProj_mem (Ω := Ω) U) + rw [pairing_sub_right, sub_eq_zero] at h + rw [dualRestrictionEquiv_apply, h] + +variable (Ω) in +/-- **The dual of `H^1_0(Ω)` is `H^{-1}(Ω)`**: for every open set `Ω`, every bounded functional `ℓ` +on `H^1_0(Ω)` is `u ↦ [W, u]` for exactly one `W ∈ H^{-1}(Ω)` (`Rd.dualZeroBoundaryEquiv_apply`, +`Rd.dualZeroBoundaryEquiv_eq_iff`), with `‖W‖ = ‖ℓ‖`. Inside `H^1(V)`, `H^1_0(Ω)` is `H̃^1(Ω)` +(`Rd.coe_tildeEquivZeroBoundary_symm_apply`), so `W` is paired with `u` itself. -/ +noncomputable def dualZeroBoundaryEquiv : + StrongDual ℂ (zeroBoundarySpace 1 Ω) ≃ₗᵢ⋆[ℂ] RestrictionSpace (-1) Ω := + (InnerProductSpace.toDual ℂ (zeroBoundarySpace 1 Ω)).symm.trans + ((tildeEquivZeroBoundary Ω).symm.trans (tildeEquivRestriction 1 Ω)) + +/-- **`ℓ` is the pairing with `dualZeroBoundaryEquiv Ω ℓ`**: `ℓ(u) = [W, u]` for +`W = dualZeroBoundaryEquiv Ω ℓ` and every `u ∈ H^1_0(Ω)`, read as an element of `H^1(V)`. The +isometry `Rd.tildeEquivZeroBoundary` preserves inner products, and its inverse is the identity +inside `H^1(V)` (`Rd.coe_tildeEquivZeroBoundary_symm_apply`). -/ +theorem dualZeroBoundaryEquiv_apply (ℓ : StrongDual ℂ (zeroBoundarySpace 1 Ω)) + (u : zeroBoundarySpace 1 Ω) : + ℓ u = pairing 1 (dualZeroBoundaryEquiv Ω ℓ : H^{-1}(V)) + ((u : RestrictionSpace 1 Ω) : H^{1}(V)) := by + have h := InnerProductSpace.toDual_symm_apply (𝕜 := ℂ) (E := zeroBoundarySpace 1 Ω) (x := u) + (y := ℓ) + rw [← h, ← LinearIsometryEquiv.inner_map_map (tildeEquivZeroBoundary Ω).symm, + Submodule.coe_inner, dualZeroBoundaryEquiv, LinearIsometryEquiv.trans_apply, + LinearIsometryEquiv.trans_apply, coe_tildeEquivRestriction_apply, pairing_besselShift, + coe_tildeEquivZeroBoundary_symm_apply u] + +/-- The functional of `W ∈ H^{-1}(Ω)` on `H^1_0(Ω)` is `u ↦ [W, u]`. -/ +theorem dualZeroBoundaryEquiv_symm_apply (W : RestrictionSpace (-1) Ω) + (u : zeroBoundarySpace 1 Ω) : + (dualZeroBoundaryEquiv Ω).symm W u = + pairing 1 (W : H^{-1}(V)) ((u : RestrictionSpace 1 Ω) : H^{1}(V)) := by + rw [dualZeroBoundaryEquiv_apply, LinearIsometryEquiv.apply_symm_apply] + +/-- **Uniqueness of the representing element**: `dualZeroBoundaryEquiv Ω ℓ = W` iff +`ℓ(u) = [W, u]` for every `u ∈ H^1_0(Ω)`. -/ +theorem dualZeroBoundaryEquiv_eq_iff (ℓ : StrongDual ℂ (zeroBoundarySpace 1 Ω)) + (W : RestrictionSpace (-1) Ω) : + dualZeroBoundaryEquiv Ω ℓ = W ↔ ∀ u : zeroBoundarySpace 1 Ω, + ℓ u = pairing 1 (W : H^{-1}(V)) ((u : RestrictionSpace 1 Ω) : H^{1}(V)) := by + rw [← LinearIsometryEquiv.eq_symm_apply, ContinuousLinearMap.ext_iff] + simp only [dualZeroBoundaryEquiv_symm_apply] + +end Rd diff --git a/LeanPool/FunctionSpaces/Domains/Sobolev/SobolevRestrictionSpaces.lean b/LeanPool/FunctionSpaces/Domains/Sobolev/SobolevRestrictionSpaces.lean new file mode 100644 index 0000000000..e8a487e2c1 --- /dev/null +++ b/LeanPool/FunctionSpaces/Domains/Sobolev/SobolevRestrictionSpaces.lean @@ -0,0 +1,916 @@ +/- +Copyright (c) 2026 Mario Ullrich. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Mario Ullrich +-/ +module + +public import LeanPool.FunctionSpaces.Rd.Sobolev.RellichCompactness +public import Mathlib.Analysis.InnerProductSpace.ProdL2 +public import Mathlib.Analysis.InnerProductSpace.Projection.Submodule +public import Mathlib.Topology.Algebra.Module.Basic + +/- +Modified for Lean Pool: module names and imports adapted. +-/ + +/-! +# Sobolev spaces on open sets as Hilbert spaces + +Let `V` be a finite-dimensional real inner product space, such as `ℝ^d`, with Lebesgue measure, +`Ω ⊆ V` open and `s` real. Mathlib's Sobolev space `H^s(V) = H^{s,2}(V, ℂ)` is a Hilbert space; +the Sobolev spaces on `Ω` are built inside it, as in Chandler-Wilde, Hewett and Moiola (§3.1) +and McLean (Chapter 3), and are Hilbert spaces as well. + +* **Vanishing on `Ω`**: `Rd.vanishOn s Ω` is the closed subspace of the `U ∈ H^s(V)` with + `U(φ) = 0` for every test function `φ` of `Ω` (evaluation `Rd.besselEvalCLM` is continuous); + for `s = 1` it consists of the `U` vanishing almost everywhere on `Ω` + (`Rd.mem_vanishOn_one_iff`). +* **`H^s(Ω)`**: `Rd.RestrictionSpace s Ω` is the orthogonal complement of `Rd.vanishOn s Ω`, + with the restriction `Rd.restrictProj`, the orthogonal projection. It is isometric to the + quotient `H^s(V) ⧸ vanishOn s Ω` (`Rd.quotientEquivRestrictionSpace`), so its norm is the + minimum of the norms of the extensions. +* **`H^1(Ω)` in `L_2(Ω)`**: `Rd.restrictL2` is injective, has norm at most `1`, and is compact + for bounded `Ω` (Rellich's theorem, `Rd.isCompactOperator_restrictL2`); `U|_Ω = u` whenever + `U ∈ H^1(V)` agrees with `u ∈ H^1(Ω)` on `Ω` (`Rd.restrictProj_eq_of_ae_eq`). +* **Weak derivatives**: the `L_2` function of `U ∈ H^1(V)` lies in `W^1_2(V)` and in `W^1_2(Ω)` + for every open `Ω` (`Rd.memSobolev_toL2`, `Rd.memWeakSobolev_toL2`), every function of + `W^1_2(V)` is one (`Rd.exists_toL2_eq_of_memSobolev`), with + `‖U‖² = ‖U‖_2² + (2π)⁻² ∑_i ‖∂_{e_i} U‖_2²` (`Rd.sq_norm_eq_of_hasWeakLineDeriv`), so + `‖U‖ ≤ ‖U‖_2 + ∑_i ‖∂_{e_i} U‖_2` (`Rd.norm_le_norm_toL2_add_sum`); the weak derivative + `∂_v` is a bounded operator `H^1(V) → L_2(V)` of norm at most `2π ‖v‖` (`Rd.weakDerivL2`, + `Rd.norm_weakDerivL2_le`); the weak derivatives of an element vanishing on `Ω` vanish on `Ω`. + For `u ∈ H^1(Ω)`, the `L_2(Ω)` norm of `u` and `(2π)⁻¹` times the `L_2(Ω)` norm of its weak + gradient are bounded by the norm of `H^1(Ω)`: + `‖u|_Ω‖_2² + (2π)⁻² ∑_i ‖(∂_{e_i} u)|_Ω‖_2² ≤ ‖u‖²` (`Rd.sq_norm_restr_add_sum_le`, + `Rd.sq_norm_restrictL2_add_sum_le`). +* **Schwartz functions are dense**: the Schwartz functions form a dense subspace of every + `H^s(V)` (`Rd.ofSchwartz`, a continuous linear map, `Rd.denseRange_ofSchwartz`), and so do the + compactly supported ones (`Rd.dense_ofSchwartz_hasCompactSupport`). +* **Differences in `H^1(V)`**: `‖Δ_v ι U‖_2 ≤ 2π ‖v‖ ‖U‖` (`Rd.norm_fwdDiffL2_toL2_le`), first + for Schwartz functions, then by density; hence `ω_r(ι U, 2^(-k))_2 ≤ 2^(r-1) 2π 2^(-k) ‖U‖` + for `r ≥ 1` (`Rd.lpModulus_toL2_le`). +* **`H̃^s(Ω)` and `H^s_0(Ω)`**: every test function of `Ω` lies in every `H^s(V)` (`Rd.ofTest`), + and every Schwartz function with compact support in `Ω` lies in the span of the test functions + (`Rd.ofSchwartz_mem_testSpan`). + `Rd.tildeSpace s Ω` is the closure of the test functions of `Ω` in `H^s(V)`, + `Rd.zeroBoundarySpace s Ω` the closure of their restrictions in `H^s(Ω)`. For `s = 1` and every + open `Ω`, restriction is an isometry of `H̃^1(Ω)` onto `H^1_0(Ω)` (`Rd.tildeEquivZeroBoundary`), + and inside `H^1(V)` the two are the same subspace (`Rd.tildeSpace_one_le_orthogonal`, + `Rd.coe_tildeEquivZeroBoundary_symm_apply`); the elements of `H̃^1(Ω)` vanish outside `Ω` + (`Rd.toL2_ae_eq_zero_of_mem_tildeSpace`). On the whole space, `H̃^s(V) = H^s(V)` + (`Rd.tildeSpace_top`). +-/ + +@[expose] public section + +open MeasureTheory Filter Topology TopologicalSpace +open scoped ENNReal SchwartzMap Real BesselPotentialSpace Distributions LineDeriv +open TemperedDistribution (besselPotential) + +namespace Rd + +variable {V : Type*} [NormedAddCommGroup V] [InnerProductSpace ℝ V] [FiniteDimensional ℝ V] + [MeasurableSpace V] [BorelSpace V] + +/-! ### Evaluation at a Schwartz function -/ + +/-- **Evaluation at a Schwartz function is a bounded functional on `H^s(V)`**: for a Schwartz +function `φ`, the map `U ↦ U(φ)`, which evaluates the tempered distribution of `U ∈ H^s(V)` at +`φ`, as a continuous linear functional. It is the composition `U ↦ J_s U ∈ L_2(V)`, +`g ↦ J_{-s} g ∈ 𝓢'(V, ℂ)`, and evaluation at `φ`, all continuous +(Mathlib's `PointwiseConvergenceCLM.evalCLM`). -/ +noncomputable def besselEvalCLM (s : ℝ) (φ : 𝓢(V, ℂ)) : H^{s}(V) →L[ℂ] ℂ := + PointwiseConvergenceCLM.evalCLM (RingHom.id ℂ) ℂ φ ∘L besselPotential V ℂ (-s) ∘L + Lp.toTemperedDistributionCLM ℂ (volume : Measure V) 2 ∘L + (BesselPotentialSpace.toLpₗᵢ V ℂ s 2).toLinearIsometry.toContinuousLinearMap + +/-- `besselEvalCLM s φ U = U(φ)`, the tempered distribution of `U` evaluated at `φ`, since +`J_{-s}(J_s U) = U` (Mathlib's `BesselPotentialSpace.besselPotential_neg_toLp_eq`). -/ +@[simp] +theorem besselEvalCLM_apply (s : ℝ) (φ : 𝓢(V, ℂ)) (U : H^{s}(V)) : + besselEvalCLM s φ U = U.toDistr φ := by + simp only [besselEvalCLM, ContinuousLinearMap.comp_apply, + LinearIsometry.coe_toContinuousLinearMap, LinearIsometryEquiv.coe_toLinearIsometry, + BesselPotentialSpace.toLpₗᵢ_apply, Lp.toTemperedDistributionCLM_apply, + BesselPotentialSpace.besselPotential_neg_toLp_eq, PointwiseConvergenceCLM.evalCLM_apply] + -- `U φ = U φ`: Mathlib's `evalCLM_apply` applies `U` through another coercion to functions + rfl + +/-- For every Schwartz function `φ`, `U ↦ U(φ)` is continuous on `H^s(V)`. -/ +theorem continuous_toDistr_apply (s : ℝ) (φ : 𝓢(V, ℂ)) : + Continuous fun U : H^{s}(V) => U.toDistr φ := + (besselEvalCLM s φ).continuous.congr fun U => besselEvalCLM_apply s φ U + +/-! ### Distributions vanishing on `Ω` -/ + +/-- **The elements of `H^s(V)` vanishing on `Ω`**: the `U ∈ H^s(V)` whose tempered distribution +vanishes on every real test function of the open set `Ω`, `U(φ) = 0` for all `φ ∈ 𝓓(Ω)` +(`Rd.mem_vanishOn_iff`). It is a closed subspace (`Rd.isClosed_vanishOn`); for `s = 1` it +consists of the `U` that vanish almost everywhere on `Ω` (`Rd.mem_vanishOn_one_iff`). -/ +noncomputable def vanishOn (s : ℝ) (Ω : Opens V) : Submodule ℂ H^{s}(V) := + ⨅ φ : 𝓓(Ω, ℝ), (besselEvalCLM s (testSchwartz φ)).ker + +/-- `U` vanishes on `Ω` iff `U(φ) = 0` for every real test function `φ` of `Ω`. -/ +theorem mem_vanishOn_iff {s : ℝ} {Ω : Opens V} (U : H^{s}(V)) : + U ∈ vanishOn s Ω ↔ ∀ φ : 𝓓(Ω, ℝ), U.toDistr (testSchwartz φ) = 0 := by + simp [vanishOn, Submodule.mem_iInf] + +/-- The elements of `H^s(V)` vanishing on `Ω` form a closed subspace: an intersection of kernels +of the continuous functionals `U ↦ U(φ)` (Mathlib's `ContinuousLinearMap.isClosed_ker`). -/ +theorem isClosed_vanishOn (s : ℝ) (Ω : Opens V) : IsClosed (vanishOn s Ω : Set H^{s}(V)) := by + rw [vanishOn, Submodule.coe_iInf] + exact isClosed_iInter fun φ => ContinuousLinearMap.isClosed_ker _ + +/-- The subspace `Rd.vanishOn s Ω` is complete, as a closed subspace of the complete space +`H^s(V)`; hence it has an orthogonal projection. -/ +instance completeSpace_vanishOn (s : ℝ) (Ω : Opens V) : CompleteSpace (vanishOn s Ω) := + (isClosed_vanishOn s Ω).completeSpace_coe + +/-- For `U ∈ H^1(V)` and a real test function `φ` of `Ω`, `U(φ) = ∫ φ · U`, the integral of `φ` +against the `L_2` function of `U` (`Rd.toTemperedDistribution_toL2`). -/ +theorem toDistr_testSchwartz_eq_integral {Ω : Opens V} (U : H^{1}(V)) (φ : 𝓓(Ω, ℝ)) : + U.toDistr (testSchwartz φ) = ∫ x, ((φ x : ℝ) : ℂ) * toL2 U x := by + rw [← toTemperedDistribution_toL2, Lp.toTemperedDistribution_apply] + simp [smul_eq_mul] + +/-- **Vanishing on `Ω` for `s = 1`**: `U ∈ H^1(V)` vanishes on the open set `Ω` iff its `L_2` +function vanishes almost everywhere on `Ω`. `⇐`: the integrand `φ · U` vanishes almost +everywhere; `⇒`: a locally integrable function on `Ω` with vanishing integrals against all +smooth compactly supported real functions in `Ω` vanishes almost everywhere on `Ω` (Mathlib's +`IsOpen.ae_eq_zero_of_integral_contDiff_smul_eq_zero`). -/ +theorem mem_vanishOn_one_iff {Ω : Opens V} (U : H^{1}(V)) : + U ∈ vanishOn 1 Ω ↔ (toL2 U : V → ℂ) =ᵐ[volume.restrict (Ω : Set V)] 0 := by + rw [mem_vanishOn_iff, Filter.EventuallyEq, ae_restrict_iff' Ω.isOpen.measurableSet] + constructor + · intro hU + refine Ω.isOpen.ae_eq_zero_of_integral_contDiff_smul_eq_zero + (((Lp.memLp (toL2 U)).locallyIntegrable (by norm_num)).locallyIntegrableOn _) + fun g hg hgc hgs => ?_ + have h := hU ⟨g, hg, hgc, hgs⟩ + rw [toDistr_testSchwartz_eq_integral] at h + simpa [Complex.real_smul] using h + · intro hU φ + rw [toDistr_testSchwartz_eq_integral] + refine integral_eq_zero_of_ae ?_ + filter_upwards [hU] with x hx + by_cases hxΩ : x ∈ (Ω : Set V) + · simp [hx hxΩ] + · simp [image_eq_zero_of_notMem_tsupport fun h => hxΩ (φ.tsupport_subset h)] + +/-- For `s = 1`, `U` vanishes on `Ω` iff the restriction to `L_2(Ω)` of the `L_2` function of +`U` is zero. -/ +theorem mem_vanishOn_one_iff_restrict_eq_zero {Ω : Opens V} (U : H^{1}(V)) : + U ∈ vanishOn 1 Ω ↔ LpToLpRestrictCLM V ℂ ℂ volume 2 (Ω : Set V) (toL2 U) = 0 := by + rw [mem_vanishOn_one_iff, Lp.eq_zero_iff_ae_eq_zero] + constructor <;> intro h + · exact (LpToLpRestrictCLM_coeFn ℂ _ _).trans h + · exact (LpToLpRestrictCLM_coeFn ℂ _ _).symm.trans h + +/-- For `s = 1`, the elements vanishing on `Ω` form the kernel of `U ↦ U|_Ω`, the restriction of +the `L_2` function of `U` to `L_2(Ω)`. -/ +theorem vanishOn_one_eq_ker (Ω : Opens V) : + vanishOn 1 Ω = (LpToLpRestrictCLM V ℂ ℂ volume 2 (Ω : Set V) ∘L toL2).ker := by + ext U + rw [mem_vanishOn_one_iff_restrict_eq_zero, LinearMap.mem_ker] + rfl + +/-! ### The restriction space `H^s(Ω)` -/ + +/-- **The Sobolev space `H^s(Ω)`** on an open set `Ω`, for every real `s`, as a Hilbert space: +the orthogonal complement in `H^s(V)` of the elements vanishing on `Ω`. It is isometric to the +quotient of `H^s(V)` by them (`Rd.quotientEquivRestrictionSpace`), so its norm is the infimum +of the norms of all extensions (`Rd.norm_restrictProj_le_of_mem`, +`Rd.exists_norm_restrictProj_eq`); this is the space `H^s(Ω)` of Chandler-Wilde, Hewett and +Moiola (§3.1.4) and of McLean (Chapter 3). -/ +abbrev RestrictionSpace (s : ℝ) (Ω : Opens V) := ↥(vanishOn s Ω)ᗮ + +/-- **Restriction to `Ω`**: the orthogonal projection of `H^s(V)` onto `H^s(Ω)`, an operator of +norm at most `1` whose kernel is `Rd.vanishOn s Ω` (`Rd.restrictProj_eq_zero_iff`). -/ +noncomputable def restrictProj (s : ℝ) (Ω : Opens V) : H^{s}(V) →L[ℂ] RestrictionSpace s Ω := + (vanishOn s Ω)ᗮ.orthogonalProjectionOnto + +variable {s : ℝ} {Ω : Opens V} + +/-- The restriction has norm at most `1`: `‖U|_Ω‖ ≤ ‖U‖`. -/ +theorem norm_restrictProj_apply_le (U : H^{s}(V)) : ‖restrictProj s Ω U‖ ≤ ‖U‖ := + Submodule.norm_orthogonalProjectionOnto_apply_le _ U + +/-- The kernel of the restriction consists of the elements vanishing on `Ω` (Mathlib's +`Submodule.orthogonalProjectionOnto_eq_zero_iff`, `Submodule.orthogonal_orthogonal`). -/ +theorem restrictProj_eq_zero_iff (U : H^{s}(V)) : restrictProj s Ω U = 0 ↔ U ∈ vanishOn s Ω := by + rw [restrictProj, Submodule.orthogonalProjectionOnto_eq_zero_iff, + Submodule.orthogonal_orthogonal] + +/-- The restriction is the identity on `H^s(Ω)`. -/ +@[simp] +theorem restrictProj_coe (u : RestrictionSpace s Ω) : restrictProj s Ω (u : H^{s}(V)) = u := + Submodule.orthogonalProjectionOnto_mem_subspace_eq_self u + +/-- Every element of `H^s(Ω)` is the restriction of an element of `H^s(V)`. -/ +theorem restrictProj_surjective : Function.Surjective (restrictProj s Ω) := + fun u => ⟨u, restrictProj_coe u⟩ + +/-- `U` and its restriction differ by an element vanishing on `Ω`. -/ +theorem sub_restrictProj_mem (U : H^{s}(V)) : + U - (restrictProj s Ω U : H^{s}(V)) ∈ vanishOn s Ω := by + have h := Submodule.sub_starProjection_mem_orthogonal (K := (vanishOn s Ω)ᗮ) U + rwa [Submodule.orthogonal_orthogonal] at h + +/-- **`H^s(Ω)` as a quotient**: `H^s(V) ⧸ vanishOn s Ω` is isometrically isomorphic to +`H^s(Ω)`. This holds by the definition of `H^s(Ω)` as an orthogonal complement (Mathlib's +`Submodule.quotientEquivOrthogonal`). -/ +noncomputable def quotientEquivRestrictionSpace (s : ℝ) (Ω : Opens V) : + (H^{s}(V) ⧸ vanishOn s Ω) ≃ₗᵢ[ℂ] RestrictionSpace s Ω := + Submodule.quotientEquivOrthogonal _ + +/-- The class of `U` corresponds to the restriction of `U`. -/ +theorem quotientEquivRestrictionSpace_mk (U : H^{s}(V)) : + quotientEquivRestrictionSpace s Ω (Submodule.Quotient.mk U) = restrictProj s Ω U := by + have h : (Submodule.Quotient.mk U : H^{s}(V) ⧸ vanishOn s Ω) = + Submodule.Quotient.mk (restrictProj s Ω U : H^{s}(V)) := + (Submodule.Quotient.eq _).2 (sub_restrictProj_mem U) + rw [quotientEquivRestrictionSpace, h, + Submodule.quotientEquivOrthogonal_mk _ _ (restrictProj s Ω U).2] + +/-- **The norm of `H^s(Ω)` is at most that of every extension**: `‖U|_Ω‖ ≤ ‖U + W‖` for every +`W` vanishing on `Ω` (Mathlib's `Submodule.Quotient.norm_mk_le`). -/ +theorem norm_restrictProj_le_of_mem (U : H^{s}(V)) {W : H^{s}(V)} (hW : W ∈ vanishOn s Ω) : + ‖restrictProj s Ω U‖ ≤ ‖U + W‖ := by + have h : (Submodule.Quotient.mk U : H^{s}(V) ⧸ vanishOn s Ω) = Submodule.Quotient.mk (U + W) := + (Submodule.Quotient.eq _).2 (by simpa using neg_mem hW) + rw [← quotientEquivRestrictionSpace_mk, LinearIsometryEquiv.norm_map, h] + exact Submodule.Quotient.norm_mk_le _ _ + +/-- **The infimum is attained**: for every `U ∈ H^s(V)` some `W` vanishing on `Ω` has +`‖U|_Ω‖ = ‖U + W‖`, namely `W = U|_Ω - U`. -/ +theorem exists_norm_restrictProj_eq (U : H^{s}(V)) : + ∃ W ∈ vanishOn s Ω, ‖restrictProj s Ω U‖ = ‖U + W‖ := + ⟨(restrictProj s Ω U : H^{s}(V)) - U, by simpa using neg_mem (sub_restrictProj_mem U), + by simp⟩ + +/-! ### Restriction to `L_2(Ω)` and Rellich's theorem -/ + +variable (Ω) in +/-- **`H^1(Ω)` in `L_2(Ω)`**: the bounded operator `u ↦ u|_Ω` from `H^1(Ω)` to `L_2(Ω)`, the +restriction of the `L_2` function of `u ∈ H^1(V)` to `Ω`. It is injective +(`Rd.restrictL2_injective`), has norm at most `1` (`Rd.norm_restrictL2_apply_le`), and is compact +for bounded `Ω` (`Rd.isCompactOperator_restrictL2`). -/ +noncomputable def restrictL2 : RestrictionSpace 1 Ω →L[ℂ] Lp ℂ 2 (volume.restrict (Ω : Set V)) := + (LpToLpRestrictCLM V ℂ ℂ volume 2 (Ω : Set V) ∘L toL2) ∘L (vanishOn 1 Ω)ᗮ.subtypeL + +/-- `restrictL2 Ω u` is the restriction to `Ω` of the `L_2` function of `u`. -/ +theorem restrictL2_apply (u : RestrictionSpace 1 Ω) : + restrictL2 Ω u = LpToLpRestrictCLM V ℂ ℂ volume 2 (Ω : Set V) (toL2 (u : H^{1}(V))) := + rfl + +/-- **`u|_Ω = f|_Ω` as an equation of functions**: for `u ∈ H^1(Ω)` and `f ∈ L_2(V)`, +`restrictL2 Ω u` is the restriction of `f` to `Ω` iff the `L_2` function of `u` equals `f` almost +everywhere on `Ω` (Mathlib's `LpToLpRestrictCLM_coeFn`). -/ +theorem restrictL2_eq_iff_ae_eq (u : RestrictionSpace 1 Ω) (f : Lp ℂ 2 (volume : Measure V)) : + restrictL2 Ω u = LpToLpRestrictCLM V ℂ ℂ volume 2 (Ω : Set V) f ↔ + (toL2 (u : H^{1}(V)) : V → ℂ) =ᵐ[volume.restrict (Ω : Set V)] f := by + rw [restrictL2_apply, Lp.ext_iff] + exact ⟨fun h => (LpToLpRestrictCLM_coeFn ℂ _ _).symm.trans + (h.trans (LpToLpRestrictCLM_coeFn ℂ _ _)), + fun h => (LpToLpRestrictCLM_coeFn ℂ _ _).trans + (h.trans (LpToLpRestrictCLM_coeFn ℂ _ _).symm)⟩ + +/-- **An element of `H^1(Ω)` is determined by its values on `Ω`**: `u ↦ u|_Ω` is injective, +since its kernel lies in `vanishOn 1 Ω ⊓ (vanishOn 1 Ω)ᗮ = ⊥` +(`Rd.mem_vanishOn_one_iff_restrict_eq_zero`, Mathlib's +`Submodule.inf_orthogonal_eq_bot`). -/ +theorem restrictL2_injective : Function.Injective (restrictL2 Ω) := by + refine (injective_iff_map_eq_zero _).2 fun u hu => ?_ + have h1 : (u : H^{1}(V)) ∈ vanishOn 1 Ω := (mem_vanishOn_one_iff_restrict_eq_zero _).2 hu + have h2 : (u : H^{1}(V)) ∈ vanishOn 1 Ω ⊓ (vanishOn 1 Ω)ᗮ := ⟨h1, u.2⟩ + rw [Submodule.inf_orthogonal_eq_bot, Submodule.mem_bot] at h2 + exact Subtype.ext h2 + +/-- `‖u|_Ω‖_{L_2(Ω)} ≤ ‖u‖_{H^1(Ω)}` (`Rd.norm_toL2_le` and Mathlib's +`norm_Lp_toLp_restrict_le`). -/ +theorem norm_restrictL2_apply_le (u : RestrictionSpace 1 Ω) : ‖restrictL2 Ω u‖ ≤ ‖u‖ := + (norm_Lp_toLp_restrict_le _ _).trans (norm_toL2_le _) + +/-- The restriction to `L_2(Ω)` of `U|_Ω ∈ H^1(Ω)` is the restriction of the `L_2` function of +`U`, because `U - U|_Ω` vanishes on `Ω` (`Rd.sub_restrictProj_mem`). -/ +theorem restrictL2_restrictProj (U : H^{1}(V)) : + restrictL2 Ω (restrictProj 1 Ω U) = LpToLpRestrictCLM V ℂ ℂ volume 2 (Ω : Set V) (toL2 U) := by + have h := (mem_vanishOn_one_iff_restrict_eq_zero _).1 (sub_restrictProj_mem (s := 1) (Ω := Ω) U) + rw [map_sub, map_sub, sub_eq_zero] at h + exact h.symm + +/-- **The restriction of an element that agrees with `u` on `Ω`**: if `U ∈ H^1(V)` and +`u ∈ H^1(Ω)` agree almost everywhere on `Ω`, then `U|_Ω = u`, since both have the restriction +`(ι U)|_Ω` in `L_2(Ω)` (`Rd.restrictL2_restrictProj`, `Rd.restrictL2_eq_iff_ae_eq`) and +`u ↦ u|_Ω` is injective (`Rd.restrictL2_injective`). -/ +theorem restrictProj_eq_of_ae_eq {U : H^{1}(V)} {u : RestrictionSpace 1 Ω} + (h : (toL2 U : V → ℂ) =ᵐ[volume.restrict (Ω : Set V)] toL2 (u : H^{1}(V))) : + restrictProj 1 Ω U = u := + restrictL2_injective ((restrictL2_restrictProj U).trans + ((restrictL2_eq_iff_ae_eq u (toL2 U)).2 h.symm).symm) + +/-- **Rellich's theorem for `H^1(Ω)`**: for every bounded open set `Ω ⊆ V`, the embedding +`H^1(Ω) → L_2(Ω)` is a compact operator. For the restriction space `H^1(Ω)`, this is the +compactness that Assumption F of Hiptmair, Pauly and Schulz asks for; on bounded Lipschitz +domains the restriction space is the weak-derivative space by the extension theorem. The proof +is Rellich's theorem for `H^1(V)` (`Rd.isCompactOperator_restr_toL2`) composed with the +bounded inclusion of `H^1(Ω)` into `H^1(V)` (Mathlib's `IsCompactOperator.comp_clm`). -/ +theorem isCompactOperator_restrictL2 (hΩ : Bornology.IsBounded (Ω : Set V)) : + IsCompactOperator (restrictL2 Ω) := + (isCompactOperator_restr_toL2 hΩ).comp_clm _ + +/-! ### Weak derivatives of `H^1(V)` functions -/ + +/-- **`H^1(V) ⊆ W^1_2(V)`**: the `L_2` function of every `U ∈ H^1(V)` lies in the Sobolev space +`W^1_2(V)` of weak derivatives (`Rd.memSobolev_one_iff`). -/ +theorem memSobolev_toL2 (U : H^{1}(V)) : MemSobolev 1 (toL2 U) := by + rw [memSobolev_one_iff, toTemperedDistribution_toL2] + exact U.memSobolev_toDistr + +/-- **`W^1_2(V)` functions are elements of `H^1(V)`**: for `f ∈ L_2(V)` with `f ∈ W^1_2(V)` there +is `U ∈ H^1(V)` whose `L_2` function is `f` (`Rd.memSobolev_one_iff`, `Rd.toL2_eq_of_toDistr_eq`); +the converse of `Rd.memSobolev_toL2`. -/ +theorem exists_toL2_eq_of_memSobolev {f : Lp ℂ 2 (volume : Measure V)} (hf : MemSobolev 1 f) : + ∃ U : H^{1}(V), toL2 U = f := + ⟨_, toL2_eq_of_toDistr_eq ((memSobolev_one_iff f).1 hf).toBesselPotentialSpace + (TemperedDistribution.MemSobolev.toBesselPotentialSpace_toDistr _).symm⟩ + +variable (Ω) in +/-- **`H^1(V) ⊆ W^1_2(Ω)`**: for every open `Ω`, the `L_2` function of `U ∈ H^1(V)` lies in the +Sobolev space `W^1_2(Ω)` of weak derivatives on `Ω` (`Rd.memSobolev_toL2`, restricted by +`Rd.MemWeakSobolev.mono_set`); in particular so does every `u ∈ H^1(Ω)`. -/ +theorem memWeakSobolev_toL2 (U : H^{1}(V)) : MemWeakSobolev Ω 1 2 (toL2 U) := + MemWeakSobolev.mono_set (memSobolev_toL2 U) le_top + +/-- For `U ∈ H^1(V)` and every direction `v`, the `L_2` function of `U` has a weak derivative +`∂_v` on `V` in `L_2(V)`. -/ +theorem exists_hasWeakLineDeriv_toL2 (U : H^{1}(V)) (v : V) : + ∃ g : Lp ℂ 2 (volume : Measure V), HasWeakLineDeriv ⊤ (fun _ : Fin 1 => v) (toL2 U) g := by + obtain ⟨g, hg⟩ := (memSobolev_iff_tempered _).1 (memSobolev_toL2 U) 1 le_rfl fun _ => v + exact ⟨g, hasWeakLineDeriv_top_iff.2 hg⟩ + +/-- **The weak derivatives of `H^1(V)` are bounded**: if `g ∈ L_2(V)` is the weak derivative +`∂_v` on `V` of the `L_2` function of `U ∈ H^1(V)`, then `‖g‖_2 ≤ 2π ‖v‖ ‖U‖` +(`Rd.enorm_le_of_hasWeakLineDeriv` with `J_1 f = U`). -/ +theorem norm_le_of_hasWeakLineDeriv_toL2 {v : V} {U : H^{1}(V)} + {g : Lp ℂ 2 (volume : Measure V)} (h : HasWeakLineDeriv ⊤ (fun _ : Fin 1 => v) (toL2 U) g) : + ‖g‖ ≤ 2 * π * ‖v‖ * ‖U‖ := by + have hfh : besselPotential V ℂ 1 ((toL2 U : Lp ℂ 2 (volume : Measure V)) : 𝓢'(V, ℂ)) = + (U.toLp : 𝓢'(V, ℂ)) := by + rw [toTemperedDistribution_toL2] + exact U.bessel_toDistr_eq_toLp + have he := enorm_le_of_hasWeakLineDeriv h hfh + rw [← ofReal_norm, ← ofReal_norm, ← ofReal_norm, ← ENNReal.ofReal_mul (by positivity), + ← ENNReal.ofReal_mul (by positivity), ENNReal.ofReal_le_ofReal_iff (by positivity), + BesselPotentialSpace.norm_toLp_eq] at he + exact he + +/-- The weak derivative `∂_v` of the `L_2` functions of `H^1(V)` as a linear map: `U` goes to the +weak derivative chosen in `Rd.exists_hasWeakLineDeriv_toL2`, which is linear in `U` because weak +derivatives on `V` are unique classes (`Rd.HasWeakLineDeriv.eq_of_top`). -/ +noncomputable def weakDerivL2Linear (v : V) : H^{1}(V) →ₗ[ℂ] Lp ℂ 2 (volume : Measure V) where + toFun U := (exists_hasWeakLineDeriv_toL2 U v).choose + map_add' U W := by + refine HasWeakLineDeriv.eq_of_top (exists_hasWeakLineDeriv_toL2 (U + W) v).choose_spec ?_ + refine ((exists_hasWeakLineDeriv_toL2 U v).choose_spec.add + (exists_hasWeakLineDeriv_toL2 W v).choose_spec).congr_ae ?_ ?_ + · rw [map_add] + exact ae_restrict_of_ae (Lp.coeFn_add _ _).symm + · exact ae_restrict_of_ae (Lp.coeFn_add _ _).symm + map_smul' c U := by + refine HasWeakLineDeriv.eq_of_top (exists_hasWeakLineDeriv_toL2 (c • U) v).choose_spec ?_ + refine ((exists_hasWeakLineDeriv_toL2 U v).choose_spec.smul c).congr_ae ?_ ?_ + · rw [map_smul] + exact ae_restrict_of_ae (Lp.coeFn_smul _ _).symm + · exact ae_restrict_of_ae (Lp.coeFn_smul _ _).symm + +/-- `weakDerivL2Linear v U` is the weak derivative `∂_v` of the `L_2` function of `U`. -/ +theorem hasWeakLineDeriv_weakDerivL2Linear (v : V) (U : H^{1}(V)) : + HasWeakLineDeriv ⊤ (fun _ : Fin 1 => v) (toL2 U) (weakDerivL2Linear v U) := + (exists_hasWeakLineDeriv_toL2 U v).choose_spec + +/-- **The weak derivative `∂_v` as an operator** `H^1(V) → L_2(V)`, of norm at most `2π ‖v‖` +(`Rd.norm_le_of_hasWeakLineDeriv_toL2`): `∂_v U` is the weak derivative on `V` of the `L_2` +function of `U` (`Rd.hasWeakLineDeriv_weakDerivL2`). -/ +noncomputable def weakDerivL2 (v : V) : H^{1}(V) →L[ℂ] Lp ℂ 2 (volume : Measure V) := + (weakDerivL2Linear v).mkContinuous (2 * π * ‖v‖) fun U => + norm_le_of_hasWeakLineDeriv_toL2 (hasWeakLineDeriv_weakDerivL2Linear v U) + +/-- **The operator norm of the weak derivative**: `‖∂_v‖ ≤ 2π ‖v‖` as an operator +`H^1(V) → L_2(V)` (Mathlib's `LinearMap.mkContinuous_norm_le`). -/ +theorem norm_weakDerivL2_le (v : V) : ‖weakDerivL2 v‖ ≤ 2 * π * ‖v‖ := + LinearMap.mkContinuous_norm_le _ (by positivity) _ + +/-- `weakDerivL2 v U` is the weak derivative `∂_v` on `V` of the `L_2` function of `U`. -/ +theorem hasWeakLineDeriv_weakDerivL2 (v : V) (U : H^{1}(V)) : + HasWeakLineDeriv ⊤ (fun _ : Fin 1 => v) (toL2 U) (weakDerivL2 v U) := + hasWeakLineDeriv_weakDerivL2Linear v U + +/-- Every weak derivative `g ∈ L_2(V)` of the `L_2` function of `U` along `v` is +`weakDerivL2 v U`. -/ +theorem weakDerivL2_eq {v : V} {U : H^{1}(V)} {g : Lp ℂ 2 (volume : Measure V)} + (h : HasWeakLineDeriv ⊤ (fun _ : Fin 1 => v) (toL2 U) g) : weakDerivL2 v U = g := + (hasWeakLineDeriv_weakDerivL2 v U).eq_of_top h + +/-- **The `H^1(V)` norm by the weak gradient, in `ℝ`**: let `(e_i)` be an orthonormal basis of +`V`, `f` the `L_2` function of `U ∈ H^1(V)`, and `g_i ∈ L_2(V)` the weak derivatives +`∂_{e_i} f` on `V`. Then `‖U‖² = ‖f‖_2² + (2π)⁻² ∑_i ‖g_i‖_2²` +(`Rd.sq_norm_besselPotential_one_eq` with `J_1 f = U`). -/ +theorem sq_norm_eq_of_hasWeakLineDeriv {ι : Type*} [Fintype ι] (b : OrthonormalBasis ι ℝ V) + (U : H^{1}(V)) {g : ι → Lp ℂ 2 (volume : Measure V)} + (hg : ∀ i, HasWeakLineDeriv ⊤ (fun _ : Fin 1 => b i) (toL2 U) (g i)) : + ‖U‖ ^ 2 = ‖toL2 U‖ ^ 2 + (2 * π)⁻¹ ^ 2 * ∑ i, ‖g i‖ ^ 2 := by + have hfh : besselPotential V ℂ 1 ((toL2 U : Lp ℂ 2 (volume : Measure V)) : 𝓢'(V, ℂ)) = + (U.toLp : 𝓢'(V, ℂ)) := by + rw [toTemperedDistribution_toL2] + exact U.bessel_toDistr_eq_toLp + have hreal := sq_norm_besselPotential_one_eq b hg hfh + rw [BesselPotentialSpace.norm_toLp_eq] at hreal + have hpi : (2 * π) ^ 2 ≠ 0 := by positivity + rw [inv_pow] + field_simp + linarith + +/-- **The norm of `H^1(V)` by `W^1_2(V)` norms**: for an orthonormal basis `(e_i)` of `V` and +`U ∈ H^1(V)` whose `L_2` function has the weak derivatives `G_i = ∂_{e_i}` on `V`, +`‖U‖ ≤ ‖U‖_2 + ∑_i ‖G_i‖_2`, since `‖U‖² = ‖U‖_2² + (2π)⁻² ∑_i ‖G_i‖_2²` +(`Rd.sq_norm_eq_of_hasWeakLineDeriv`). -/ +theorem norm_le_norm_toL2_add_sum {ι : Type*} [Fintype ι] (b : OrthonormalBasis ι ℝ V) + (U : H^{1}(V)) {G : ι → Lp ℂ 2 (volume : Measure V)} + (hG : ∀ i, HasWeakLineDeriv ⊤ (fun _ : Fin 1 => b i) (toL2 U) (G i)) : + ‖U‖ ≤ ‖toL2 U‖ + ∑ i, ‖G i‖ := by + have h := sq_norm_eq_of_hasWeakLineDeriv b U hG + have hπ : (2 * π)⁻¹ ^ 2 ≤ 1 := pow_le_one₀ (by positivity) + (inv_le_one_of_one_le₀ (by linarith [Real.two_le_pi])) + have hs := Finset.sum_sq_le_sq_sum_of_nonneg (s := Finset.univ) fun i _ => norm_nonneg (G i) + have h0 : 0 ≤ ∑ i, ‖G i‖ := Finset.sum_nonneg fun i _ => norm_nonneg _ + have hsum : 0 ≤ ∑ i, ‖G i‖ ^ 2 := Finset.sum_nonneg fun i _ => sq_nonneg _ + refine (pow_le_pow_iff_left₀ (norm_nonneg U) (by positivity) two_ne_zero).1 ?_ + rw [h] + nlinarith [norm_nonneg (toL2 U)] + +/-- **The weak gradient on `Ω` is bounded by the `H^1(Ω)` norm**: let `(e_i)` be an orthonormal +basis of `V`, `u ∈ H^1(Ω)`, and `g_i ∈ L_2(V)` the weak derivatives `∂_{e_i}` on `V` of the `L_2` +function of `u`. Then `‖u|_Ω‖_2² + (2π)⁻² ∑_i ‖g_i|_Ω‖_2² ≤ ‖u‖_{H^1(Ω)}²`, since the left side +without the restrictions is `‖u‖²` (`Rd.sq_norm_eq_of_hasWeakLineDeriv`). For the unweighted +`W^1_2(Ω)` norm the constant is `2π`. -/ +theorem sq_norm_restr_add_sum_le {ι : Type*} [Fintype ι] (b : OrthonormalBasis ι ℝ V) + (u : RestrictionSpace 1 Ω) {g : ι → Lp ℂ 2 (volume : Measure V)} + (hg : ∀ i, HasWeakLineDeriv ⊤ (fun _ : Fin 1 => b i) (toL2 (u : H^{1}(V))) (g i)) : + ‖restrictL2 Ω u‖ ^ 2 + (2 * π)⁻¹ ^ 2 * + ∑ i, ‖LpToLpRestrictCLM V ℂ ℂ volume 2 (Ω : Set V) (g i)‖ ^ 2 ≤ ‖u‖ ^ 2 := by + rw [show ‖u‖ = ‖(u : H^{1}(V))‖ from rfl, sq_norm_eq_of_hasWeakLineDeriv b _ hg] + gcongr with i + · exact norm_Lp_toLp_restrict_le _ _ + · exact norm_Lp_toLp_restrict_le _ _ + +/-- **The weak gradient on `Ω` is bounded by the `H^1(Ω)` norm, with weak derivatives on `Ω`**: +let `(e_i)` be an orthonormal basis of `V`, `u ∈ H^1(Ω)`, and `g_i ∈ L_2(Ω)` weak derivatives +`∂_{e_i}` on `Ω` of the `L_2` function of `u`. Then `‖u|_Ω‖_2² + (2π)⁻² ∑_i ‖g_i‖_2² ≤ ‖u‖²`: +the `g_i` agree almost everywhere on `Ω` with the weak derivatives on `V` +(`Rd.HasWeakLineDeriv.unique`), and `Rd.sq_norm_restr_add_sum_le` applies. -/ +theorem sq_norm_restrictL2_add_sum_le {ι : Type*} [Fintype ι] (b : OrthonormalBasis ι ℝ V) + (u : RestrictionSpace 1 Ω) {g : ι → Lp ℂ 2 (volume.restrict (Ω : Set V))} + (hg : ∀ i, HasWeakLineDeriv Ω (fun _ : Fin 1 => b i) (toL2 (u : H^{1}(V))) (g i)) : + ‖restrictL2 Ω u‖ ^ 2 + (2 * π)⁻¹ ^ 2 * ∑ i, ‖g i‖ ^ 2 ≤ ‖u‖ ^ 2 := by + choose G hG using fun i => exists_hasWeakLineDeriv_toL2 (u : H^{1}(V)) (b i) + have hGg : ∀ i, LpToLpRestrictCLM V ℂ ℂ volume 2 (Ω : Set V) (G i) = g i := fun i => + Lp.ext ((LpToLpRestrictCLM_coeFn ℂ _ _).trans (((hG i).mono le_top).unique (hg i))) + simpa only [hGg] using sq_norm_restr_add_sum_le b u hG + +/-- **Weak derivatives of an element vanishing on `Ω`**: for `W ∈ H^1(V)` vanishing on `Ω`, every +weak derivative on `V` of the `L_2` function of `W` vanishes almost everywhere on `Ω`. -/ +theorem weakDeriv_ae_zero_of_mem_vanishOn {W : H^{1}(V)} (hW : W ∈ vanishOn 1 Ω) {k : ℕ} + {v : Fin k → V} {g : V → ℂ} (hg : HasWeakLineDeriv ⊤ v (toL2 W) g) : + g =ᵐ[volume.restrict (Ω : Set V)] 0 := + hg.ae_eq_zero_of_ae_eq_zero le_top ((mem_vanishOn_one_iff W).1 hW) + +/-! ### Test functions, `H̃^s(Ω)` and `H^s_0(Ω)` -/ + +variable (s) in +/-- **A test function as an element of `H^s(V)`**: a real test function `φ` of `Ω`, as the +complex Schwartz function `Rd.testSchwartz φ`, lies in every `H^s(V)` (Mathlib's +`SchwartzMap.memSobolev`). -/ +noncomputable def ofTest (φ : 𝓓(Ω, ℝ)) : H^{s}(V) := + ((testSchwartz φ).memSobolev (s := s) (p := 2)).toBesselPotentialSpace + +/-- The tempered distribution of `ofTest s φ` is the Schwartz function `φ`. -/ +@[simp] +theorem toDistr_ofTest (φ : 𝓓(Ω, ℝ)) : + (ofTest s φ).toDistr = (testSchwartz φ : 𝓢'(V, ℂ)) := + TemperedDistribution.MemSobolev.toBesselPotentialSpace_toDistr _ + +/-- **A test function in `H^1(V)` as an `L_2` function**: the `L_2` function of `ofTest 1 φ` is +`φ` almost everywhere (`Rd.toL2_eq_of_toDistr_eq`). -/ +theorem toL2_ofTest_ae (φ : 𝓓(Ω, ℝ)) : + (toL2 (ofTest 1 φ) : V → ℂ) =ᵐ[volume] testSchwartz φ := by + rw [toL2_eq_of_toDistr_eq _ (f := (testSchwartz φ).toLp 2 (volume : Measure V)) + (by rw [Lp.toTemperedDistribution_toLp_eq]; exact (toDistr_ofTest φ).symm)] + exact (testSchwartz φ).coeFn_toLp 2 volume + +variable (s Ω) in +/-- **The test functions of `Ω` in `H^s(V)`**: the complex linear span of the `ofTest s φ`, +`φ` a real test function of `Ω`. -/ +noncomputable def testSpan : Submodule ℂ H^{s}(V) := + Submodule.span ℂ (Set.range (ofTest s : 𝓓(Ω, ℝ) → H^{s}(V))) + +variable (s Ω) in +/-- **The space `H̃^s(Ω)`** of Chandler-Wilde, Hewett and Moiola: the closure in `H^s(V)` of the +test functions of `Ω`, a Hilbert space. -/ +noncomputable def tildeSpace : Submodule ℂ H^{s}(V) := + (testSpan s Ω).topologicalClosure + +variable (s Ω) in +/-- `H̃^s(Ω)` is closed in `H^s(V)`. -/ +theorem isClosed_tildeSpace : IsClosed (tildeSpace s Ω : Set H^{s}(V)) := + Submodule.isClosed_topologicalClosure _ + +/-- `H̃^s(Ω)` is complete, as a closed subspace of `H^s(V)`. -/ +instance completeSpace_tildeSpace (s : ℝ) (Ω : Opens V) : CompleteSpace (tildeSpace s Ω) := + (isClosed_tildeSpace s Ω).completeSpace_coe + +/-! ### Schwartz functions are dense in `H^s(V)` -/ + +variable (s) in +/-- **Schwartz functions in `H^s(V)`, continuously**: `w ↦ w ∈ H^s(V)` as a continuous linear +map from the Schwartz space: `w` is the element of `H^s(V)` whose Bessel potential `J_s w ∈ L_2(V)` +(Mathlib's `BesselPotentialSpace.toLp`) is the Schwartz function `Rd.besselSchwartz s w` +(`Rd.toDistr_ofSchwartz`). -/ +noncomputable def ofSchwartz : 𝓢(V, ℂ) →L[ℂ] H^{s}(V) := + (BesselPotentialSpace.toLpₗᵢ V ℂ s 2).symm.toLinearIsometry.toContinuousLinearMap ∘L + SchwartzMap.toLpCLM ℂ ℂ 2 volume ∘L besselSchwartz s + +variable (s) in +/-- The tempered distribution of `ofSchwartz s w` is the Schwartz function `w`, since +`J_{-s} J_s = J_0 = id` (Mathlib's `TemperedDistribution.besselPotential_besselPotential_apply`). -/ +@[simp] +theorem toDistr_ofSchwartz (w : 𝓢(V, ℂ)) : (ofSchwartz s w).toDistr = (w : 𝓢'(V, ℂ)) := by + simp only [ofSchwartz, ContinuousLinearMap.coe_comp, Function.comp_apply, + LinearIsometry.coe_toContinuousLinearMap, LinearIsometryEquiv.coe_toLinearIsometry, + BesselPotentialSpace.toLpₗᵢ_symm_apply, SchwartzMap.toLpCLM_apply] + rw [Lp.toTemperedDistribution_toLp_eq, ← besselPotential_schwartz] + have h := TemperedDistribution.besselPotential_besselPotential_apply (E := V) (F := ℂ) s (-s) + (w : 𝓢'(V, ℂ)) + rw [show s + -s = 0 by ring, TemperedDistribution.besselPotential_zero] at h + exact h + +variable (s) in +/-- `ofSchwartz s w` is the element of `H^s(V)` given by Mathlib's `SchwartzMap.memSobolev`. -/ +theorem ofSchwartz_eq (w : 𝓢(V, ℂ)) : + ofSchwartz s w = (w.memSobolev (s := s) (p := 2)).toBesselPotentialSpace := + BesselPotentialSpace.ext (by simp) + +variable (s) in +/-- A test function of `Ω` in `H^s(V)` is its Schwartz function: `ofTest s φ = ofSchwartz s φ`. -/ +theorem ofTest_eq_ofSchwartz (φ : 𝓓(Ω, ℝ)) : ofTest s φ = ofSchwartz s (testSchwartz φ) := + BesselPotentialSpace.ext (by simp) + +/-- The `L_2` function of a Schwartz function `w` in `H^1(V)` is `w` +(`Rd.toL2_eq_of_toDistr_eq`). -/ +theorem toL2_ofSchwartz (w : 𝓢(V, ℂ)) : toL2 (ofSchwartz 1 w) = w.toLp 2 := + toL2_eq_of_toDistr_eq _ (by rw [Lp.toTemperedDistribution_toLp_eq, toDistr_ofSchwartz]) + +/-- **The weak derivative of a Schwartz function in `H^1(V)`** is its classical derivative: +`∂_v (ofSchwartz 1 w) = ∂_v w` in `L_2(V)` (`Rd.hasWeakLineDeriv_schwartz`). -/ +theorem weakDerivL2_ofSchwartz (v : V) (w : 𝓢(V, ℂ)) : + weakDerivL2 v (ofSchwartz 1 w) = (∂_{v} w).toLp 2 := by + refine weakDerivL2_eq ?_ + have h := hasWeakLineDeriv_schwartz ⊤ w (fun _ : Fin 1 => v) + rw [LineDeriv.iteratedLineDerivOp_one] at h + refine h.congr_ae ?_ ?_ + · rw [volume_restrict_top, toL2_ofSchwartz] + exact (w.coeFn_toLp 2 volume).symm + · rw [volume_restrict_top] + exact ((∂_{v} w).coeFn_toLp 2 volume).symm + +variable (s) in +/-- **The Schwartz functions are dense in `H^s(V)`**, for every real `s`: `J_s` is an isometry of +`H^s(V)` onto `L_2(V)` (Mathlib's `BesselPotentialSpace.toLpₗᵢ`), it maps the Schwartz functions +onto the Schwartz functions (`Rd.besselSchwartz_besselSchwartz_neg`), and these are dense in +`L_2(V)` (Mathlib's `SchwartzMap.denseRange_toLpCLM`). -/ +theorem denseRange_ofSchwartz : DenseRange (ofSchwartz (V := V) s) := by + have hJ : Function.Surjective (besselSchwartz (V := V) s) := + fun w => ⟨_, besselSchwartz_besselSchwartz_neg s w⟩ + have h1 : DenseRange fun w : 𝓢(V, ℂ) => + SchwartzMap.toLpCLM ℂ ℂ 2 volume (besselSchwartz s w) := + (SchwartzMap.denseRange_toLpCLM (F := ℂ) (μ := (volume : Measure V)) two_ne_top).comp + hJ.denseRange (SchwartzMap.toLpCLM ℂ ℂ 2 volume).continuous + exact (BesselPotentialSpace.toLpₗᵢ V ℂ s 2).symm.surjective.denseRange.comp h1 + (BesselPotentialSpace.toLpₗᵢ V ℂ s 2).symm.continuous + +variable (s) in +/-- **Compactly supported Schwartz functions are dense in `H^s(V)`**, for every real `s`: the +cut-offs `χ_n w` of a Schwartz function converge to `w` in the Schwartz space +(`Rd.tendsto_cutoffMul`), hence in `H^s(V)`, and the Schwartz functions are dense +(`Rd.denseRange_ofSchwartz`). -/ +theorem dense_ofSchwartz_hasCompactSupport : + Dense (ofSchwartz (V := V) s '' {w | HasCompactSupport w}) := by + refine dense_closure.1 ((denseRange_ofSchwartz s).mono ?_) + rintro _ ⟨w, rfl⟩ + exact mem_closure_of_tendsto (((ofSchwartz s).continuous.tendsto w).comp (tendsto_cutoffMul w)) + (Eventually.of_forall fun n => ⟨_, hasCompactSupport_cutoffMul n w, rfl⟩) + +variable (s) in +/-- **Compactly supported Schwartz functions in `Ω` lie in the span of the test functions**: a +Schwartz function `w` with compact support in the open set `Ω` is `Re w + i Im w` with real test +functions of `Ω` (`Rd.exists_testSchwartz_eq_of_tsupport_subset`), so `w ∈ testSpan s Ω` for every +real `s`. -/ +theorem ofSchwartz_mem_testSpan {w : 𝓢(V, ℂ)} (hw : HasCompactSupport w) + (hwΩ : tsupport w ⊆ Ω) : ofSchwartz s w ∈ testSpan s Ω := by + obtain ⟨a, b, rfl⟩ := exists_testSchwartz_eq_of_tsupport_subset w hw hwΩ + rw [map_add, map_smul, ← ofTest_eq_ofSchwartz, ← ofTest_eq_ofSchwartz] + exact (testSpan s Ω).add_mem (Submodule.subset_span ⟨a, rfl⟩) + ((testSpan s Ω).smul_mem _ (Submodule.subset_span ⟨b, rfl⟩)) + +variable (s) in +/-- **`H̃^s(V) = H^s(V)`**: on the whole space, the test functions are dense in `H^s(V)` for every +real `s`, since the compactly supported Schwartz functions are dense +(`Rd.dense_ofSchwartz_hasCompactSupport`) and lie in the span of the test functions +(`Rd.ofSchwartz_mem_testSpan`). -/ +theorem tildeSpace_top : tildeSpace s (⊤ : Opens V) = ⊤ := by + rw [tildeSpace, ← Submodule.dense_iff_topologicalClosure_eq_top] + refine (dense_ofSchwartz_hasCompactSupport s).mono ?_ + rintro _ ⟨w, hw, rfl⟩ + exact ofSchwartz_mem_testSpan s hw (by simp) + +/-! ### Differences in `H^1(V)` -/ + +/-- **Differences in `H^1(V)`**: `‖Δ_v ι U‖_2 ≤ 2π ‖v‖ ‖U‖` for every `U ∈ H^1(V)`, with the +difference operator `Δ_v` on `L_2(V)` (`Rd.fwdDiffL2`). For a Schwartz function `G` this is +`‖Δ_v G‖_2 ≤ ‖∂_v G‖_2 ≤ 2π ‖v‖ ‖G‖_{H^1}` (`Rd.enorm_fwdDiffL2_toLp_le`, +`Rd.norm_weakDerivL2_le`); both sides are continuous in `U`, and the Schwartz functions are dense +in `H^1(V)` (`Rd.denseRange_ofSchwartz`). -/ +theorem norm_fwdDiffL2_toL2_le (v : V) (U : H^{1}(V)) : + ‖fwdDiffL2 V v (toL2 U)‖ ≤ 2 * π * ‖v‖ * ‖U‖ := by + refine DenseRange.induction_on (denseRange_ofSchwartz (V := V) 1) U + (isClosed_le ((fwdDiffL2 V v).continuous.comp toL2.continuous).norm + (continuous_const.mul continuous_norm)) fun w => ?_ + have h1 : ‖fwdDiffL2 V v (toL2 (ofSchwartz 1 w))‖ ≤ ‖(∂_{v} w : 𝓢(V, ℂ)).toLp 2‖ := by + rw [toL2_ofSchwartz, ← toReal_eNorm, ← toReal_eNorm] + exact ENNReal.toReal_mono eNorm_ne_top (enorm_fwdDiffL2_toLp_le v w) + have h2 : ‖(∂_{v} w : 𝓢(V, ℂ)).toLp 2‖ ≤ 2 * π * ‖v‖ * ‖ofSchwartz 1 w‖ := by + rw [← weakDerivL2_ofSchwartz] + exact ((weakDerivL2 v).le_opNorm _).trans + (mul_le_mul_of_nonneg_right (norm_weakDerivL2_le v) (norm_nonneg _)) + exact h1.trans h2 + +/-- **The first-order modulus in `H^1(V)`**: `ω_1(ι U, 2^(-k))_2 ≤ 2π 2^(-k) ‖U‖` for every +`U ∈ H^1(V)` (`Rd.norm_fwdDiffL2_toL2_le`, and `ENNReal.ofReal_one_div_two_pow_pow` for the +scale `2^(-k)`). -/ +theorem lpModulus_one_toL2_le (U : H^{1}(V)) (k : ℕ) : + lpModulus 2 1 (toL2 U) k ≤ + ENNReal.ofReal (2 * π) * ENNReal.dyadicWeight (-1) k * ‖U‖ₑ := by + have hk : ENNReal.ofReal (1 / 2 ^ k) = ENNReal.dyadicWeight (-1) k := by + simpa using ENNReal.ofReal_one_div_two_pow_pow k 1 + refine iSup₂_le fun h hh => ?_ + rw [Function.iterate_one, ← enorm_fwdDiffL2, ← ofReal_norm, ← ofReal_norm, + ← hk, ← ENNReal.ofReal_mul (by positivity), + ← ENNReal.ofReal_mul (by positivity)] + refine ENNReal.ofReal_le_ofReal ((norm_fwdDiffL2_toL2_le h U).trans ?_) + gcongr + +/-- **The modulus of an `H^1(V)` function**: for every order `r ≥ 1`, +`ω_r(ι U, 2^(-k))_2 ≤ 2^(r-1) 2π 2^(-k) ‖U‖` for `U ∈ H^1(V)` +(`Rd.lpModulus_one_toL2_le` and `ω_{1+l} ≤ 2^l ω_1`, `Rd.lpModulus_add_order_le`). -/ +theorem lpModulus_toL2_le {r : ℕ} (hr : 1 ≤ r) (U : H^{1}(V)) (k : ℕ) : + lpModulus 2 r (toL2 U) k ≤ + 2 ^ (r - 1) * ENNReal.ofReal (2 * π) * ENNReal.dyadicWeight (-1) k * ‖U‖ₑ := by + obtain ⟨l, rfl⟩ := Nat.exists_eq_add_of_le hr + rw [Nat.add_sub_cancel_left, mul_assoc, mul_assoc, ← mul_assoc (ENNReal.ofReal (2 * π))] + exact (lpModulus_add_order_le 1 l (toL2 U) k).trans + (mul_le_mul' le_rfl (lpModulus_one_toL2_le U k)) + +variable (s Ω) in +/-- **The space `H^s_0(Ω)`**: the closure in `H^s(Ω)` of the restrictions of the test functions +of `Ω`, a Hilbert space. -/ +noncomputable def zeroBoundarySpace : Submodule ℂ (RestrictionSpace s Ω) := + ((testSpan s Ω).map (restrictProj s Ω : H^{s}(V) →ₗ[ℂ] RestrictionSpace s Ω)).topologicalClosure + +variable (s Ω) in +/-- `H^s_0(Ω)` is closed in `H^s(Ω)`. -/ +theorem isClosed_zeroBoundarySpace : + IsClosed (zeroBoundarySpace s Ω : Set (RestrictionSpace s Ω)) := + Submodule.isClosed_topologicalClosure _ + +/-- `H^s_0(Ω)` is complete, as a closed subspace of `H^s(Ω)`. -/ +instance completeSpace_zeroBoundarySpace (s : ℝ) (Ω : Opens V) : + CompleteSpace (zeroBoundarySpace s Ω) := + (isClosed_zeroBoundarySpace s Ω).completeSpace_coe + +variable (s Ω) in +/-- **From `H̃^s(Ω)` to `H^s(Ω)`**: the restriction of the elements of `H̃^s(Ω)` to `Ω`, an +operator of norm at most `1` with values in `H^s_0(Ω)` (`Rd.range_tildeToRestrictionL_le`). -/ +noncomputable def tildeToRestrictionL : tildeSpace s Ω →L[ℂ] RestrictionSpace s Ω := + restrictProj s Ω ∘L (tildeSpace s Ω).subtypeL + +/-- The restriction maps `H̃^s(Ω)` into `H^s_0(Ω)`, by continuity of the restriction (Mathlib's +`map_mem_closure`). -/ +theorem range_tildeToRestrictionL_le : + (tildeToRestrictionL s Ω).range ≤ zeroBoundarySpace s Ω := by + rintro _ ⟨U, rfl⟩ + change restrictProj s Ω (U : H^{s}(V)) ∈ _ + have hU : (U : H^{s}(V)) ∈ closure (testSpan s Ω : Set H^{s}(V)) := by + rw [← Submodule.topologicalClosure_coe] + exact U.2 + rw [← SetLike.mem_coe, zeroBoundarySpace, Submodule.topologicalClosure_coe] + exact map_mem_closure (restrictProj s Ω).continuous hU fun W hW => Submodule.mem_map_of_mem hW + +/-- `H^s_0(Ω)` is the closure of the image of `H̃^s(Ω)` under the restriction. -/ +theorem closure_range_tildeToRestrictionL : + (tildeToRestrictionL s Ω).range.topologicalClosure = zeroBoundarySpace s Ω := by + refine le_antisymm (Submodule.topologicalClosure_minimal _ range_tildeToRestrictionL_le + (isClosed_zeroBoundarySpace s Ω)) (Submodule.topologicalClosure_mono ?_) + rintro _ ⟨U, hU, rfl⟩ + exact ⟨⟨U, Submodule.le_topologicalClosure _ hU⟩, rfl⟩ + +/-- **The elements of the span of the test functions are Schwartz functions supported in `Ω`**: +every `U ∈ testSpan s Ω` is the tempered distribution of a Schwartz function `w` whose closed +support lies in `Ω`. -/ +theorem exists_schwartz_of_mem_testSpan {U : H^{s}(V)} (hU : U ∈ testSpan s Ω) : + ∃ w : 𝓢(V, ℂ), tsupport w ⊆ Ω ∧ U.toDistr = (w : 𝓢'(V, ℂ)) := by + induction hU using Submodule.span_induction with + | mem x hx => + obtain ⟨φ, rfl⟩ := hx + exact ⟨testSchwartz φ, (tsupport_comp_subset Complex.ofReal_zero φ).trans φ.tsupport_subset, + toDistr_ofTest φ⟩ + | zero => exact ⟨0, by simp, by simp⟩ + | add x y _ _ hx hy => + obtain ⟨w, hw, hxw⟩ := hx + obtain ⟨w', hw', hyw⟩ := hy + exact ⟨w + w', (tsupport_add _ _).trans (Set.union_subset hw hw'), by + rw [BesselPotentialSpace.toDistr_add, hxw, hyw, map_add]⟩ + | smul c x _ hx => + obtain ⟨w, hw, hxw⟩ := hx + have hs : tsupport (c • w : 𝓢(V, ℂ)) ⊆ tsupport w := by + rw [FunLike.coe_smul] + exact tsupport_smul_subset_right (fun _ : V => c) w + exact ⟨c • w, hs.trans hw, by rw [BesselPotentialSpace.toDistr_smul, hxw, map_smul]⟩ + +/-- **Elements of the span of the test functions vanish near the complement of `Ω`**: for +`U ∈ testSpan 1 Ω`, the `L_2` function of `U` vanishes almost everywhere on an open set +containing `V \ Ω`, the complement of the closed support of its Schwartz function. -/ +theorem exists_opens_toL2_ae_eq_zero {U : H^{1}(V)} (hU : U ∈ testSpan 1 Ω) : + ∃ O : Opens V, (Ω : Set V)ᶜ ⊆ O ∧ (toL2 U : V → ℂ) =ᵐ[volume.restrict (O : Set V)] 0 := by + obtain ⟨w, hw, hUw⟩ := exists_schwartz_of_mem_testSpan hU + have h : toL2 U = w.toLp 2 (volume : Measure V) := + toL2_eq_of_toDistr_eq U (by rw [Lp.toTemperedDistribution_toLp_eq]; exact hUw.symm) + refine ⟨⟨(tsupport w)ᶜ, (isClosed_tsupport w).isOpen_compl⟩, Set.compl_subset_compl.2 hw, ?_⟩ + rw [h] + filter_upwards [ae_restrict_of_ae (w.coeFn_toLp 2 volume), + ae_restrict_mem (isClosed_tsupport w).isOpen_compl.measurableSet] with x hx hxO + rw [hx] + exact image_eq_zero_of_notMem_tsupport hxO + +/-- **The elements of `H̃^1(Ω)` vanish outside `Ω`**: for every open `Ω` and `U ∈ H̃^1(Ω)`, the +`L_2` function of `U` vanishes almost everywhere outside `Ω`. The `U` with this property form the +kernel of `U ↦ (ι U)|_{V \ Ω}`, a closed subspace containing the test functions of `Ω` +(`Rd.exists_opens_toL2_ae_eq_zero`). -/ +theorem toL2_ae_eq_zero_of_mem_tildeSpace {Ω : Opens V} {U : H^{1}(V)} + (hU : U ∈ tildeSpace 1 Ω) : ∀ᵐ x ∂volume, x ∉ (Ω : Set V) → toL2 U x = 0 := by + have hker : tildeSpace 1 Ω ≤ + (LpToLpRestrictCLM V ℂ ℂ volume 2 (Ω : Set V)ᶜ ∘L toL2).ker := by + refine Submodule.topologicalClosure_minimal _ (fun W hW => ?_) + (ContinuousLinearMap.isClosed_ker _) + obtain ⟨O, hO, hWO⟩ := exists_opens_toL2_ae_eq_zero hW + rw [LinearMap.mem_ker] + change LpToLpRestrictCLM V ℂ ℂ volume 2 (Ω : Set V)ᶜ (toL2 W) = 0 + rw [Lp.eq_zero_iff_ae_eq_zero] + exact (LpToLpRestrictCLM_coeFn ℂ _ _).trans (ae_restrict_of_ae_restrict_of_subset hO hWO) + have h := hker hU + rw [LinearMap.mem_ker] at h + change LpToLpRestrictCLM V ℂ ℂ volume 2 (Ω : Set V)ᶜ (toL2 U) = 0 at h + rw [Lp.eq_zero_iff_ae_eq_zero] at h + have h' := (LpToLpRestrictCLM_coeFn ℂ _ _).symm.trans h + rw [EventuallyEq, ae_restrict_iff' Ω.isOpen.measurableSet.compl] at h' + exact h' + +/-- **Functions with disjoint supports**: in every `L_p(μ)` with values in a normed group, if +`a` vanishes almost everywhere outside a measurable set `S` and `b` vanishes almost everywhere on +`S`, then `‖a‖_p ≤ ‖a + b‖_p`, since `|a + b| ≥ |a|` almost everywhere (Mathlib's +`Lp.norm_le_norm_of_ae_le`). -/ +theorem norm_le_norm_add_of_ae_eq_zero {α E : Type*} [MeasurableSpace α] {μ : Measure α} + [NormedAddCommGroup E] {p : ℝ≥0∞} {S : Set α} (hS : MeasurableSet S) {a b : Lp E p μ} + (ha : (a : α → E) =ᵐ[μ.restrict Sᶜ] 0) (hb : (b : α → E) =ᵐ[μ.restrict S] 0) : + ‖a‖ ≤ ‖a + b‖ := by + refine Lp.norm_le_norm_of_ae_le ?_ + filter_upwards [(ae_restrict_iff' hS.compl).1 ha, (ae_restrict_iff' hS).1 hb, + Lp.coeFn_add a b] with x hax hbx hx + rw [hx, Pi.add_apply] + by_cases hxS : x ∈ S + · simp [hbx hxS] + · simp [hax hxS] + +/-- **The `H^1(V)` norm of a test function of `Ω` is at most that of its sum with a function +vanishing on `Ω`**: for `U ∈ testSpan 1 Ω` and `W` vanishing on `Ω`, `‖U‖ ≤ ‖U + W‖`. With an +orthonormal basis `(e_i)`, `‖U‖² = ‖U‖_2² + (2π)⁻² ∑_i ‖∂_{e_i} U‖_2²` +(`Rd.sq_norm_eq_of_hasWeakLineDeriv`), and the same for `U + W`. `U` and its weak gradient vanish +near `V \ Ω` (`Rd.exists_opens_toL2_ae_eq_zero`), `W` and its weak gradient vanish on `Ω` +(`Rd.mem_vanishOn_one_iff`, `Rd.weakDeriv_ae_zero_of_mem_vanishOn`), so each `L_2` norm grows +(`Rd.norm_le_norm_add_of_ae_eq_zero`). -/ +theorem norm_le_norm_add_of_mem_testSpan {U W : H^{1}(V)} (hU : U ∈ testSpan 1 Ω) + (hW : W ∈ vanishOn 1 Ω) : ‖U‖ ≤ ‖U + W‖ := by + obtain ⟨O, hO, hUO⟩ := exists_opens_toL2_ae_eq_zero hU + let b := stdOrthonormalBasis ℝ V + choose gU hgU using fun i => exists_hasWeakLineDeriv_toL2 U (b i) + choose gW hgW using fun i => exists_hasWeakLineDeriv_toL2 W (b i) + have hUW : ∀ i, HasWeakLineDeriv ⊤ (fun _ : Fin 1 => b i) (toL2 (U + W)) + ((gU i + gW i : Lp ℂ 2 (volume : Measure V)) : V → ℂ) := + fun i => ((hgU i).add (hgW i)).congr_ae + (by rw [volume_restrict_top, map_add]; exact (Lp.coeFn_add _ _).symm) + (by rw [volume_restrict_top]; exact (Lp.coeFn_add _ _).symm) + have h1 : ‖toL2 U‖ ≤ ‖toL2 (U + W)‖ := by + rw [map_add] + exact norm_le_norm_add_of_ae_eq_zero Ω.isOpen.measurableSet + (ae_restrict_of_ae_restrict_of_subset hO hUO) ((mem_vanishOn_one_iff W).1 hW) + have h2 : ∀ i, ‖gU i‖ ≤ ‖gU i + gW i‖ := fun i => + norm_le_norm_add_of_ae_eq_zero Ω.isOpen.measurableSet + (ae_restrict_of_ae_restrict_of_subset hO ((hgU i).ae_eq_zero_of_ae_eq_zero le_top hUO)) + (weakDeriv_ae_zero_of_mem_vanishOn hW (hgW i)) + rw [← sq_le_sq₀ (norm_nonneg _) (norm_nonneg _), sq_norm_eq_of_hasWeakLineDeriv b U hgU, + sq_norm_eq_of_hasWeakLineDeriv b (U + W) hUW] + gcongr with i + exact h2 i + +/-- **Restriction preserves the norm of test functions**: for `U ∈ testSpan 1 Ω`, +`‖U|_Ω‖_{H^1(Ω)} = ‖U‖_{H^1(V)}`. The norm of `U|_Ω` is `‖U + W‖` for some `W` vanishing on `Ω` +(`Rd.exists_norm_restrictProj_eq`), which is at least `‖U‖` +(`Rd.norm_le_norm_add_of_mem_testSpan`). -/ +theorem norm_restrictProj_of_mem_testSpan {U : H^{1}(V)} (hU : U ∈ testSpan 1 Ω) : + ‖restrictProj 1 Ω U‖ = ‖U‖ := by + refine le_antisymm (norm_restrictProj_apply_le U) ?_ + obtain ⟨W, hW, h⟩ := exists_norm_restrictProj_eq (Ω := Ω) U + rw [h] + exact norm_le_norm_add_of_mem_testSpan hU hW + +/-- **Restriction is isometric on `H̃^1(Ω)`**: for `U ∈ H̃^1(Ω)`, `‖U|_Ω‖ = ‖U‖`, by continuity +from the test functions (`Rd.norm_restrictProj_of_mem_testSpan`). -/ +theorem norm_restrictProj_of_mem_tildeSpace {U : H^{1}(V)} (hU : U ∈ tildeSpace 1 Ω) : + ‖restrictProj 1 Ω U‖ = ‖U‖ := by + have hc : IsClosed {U : H^{1}(V) | ‖restrictProj 1 Ω U‖ = ‖U‖} := + isClosed_eq (continuous_norm.comp (restrictProj 1 Ω).continuous) continuous_norm + refine closure_minimal (fun U hU => norm_restrictProj_of_mem_testSpan hU) hc ?_ + rw [← Submodule.topologicalClosure_coe] + exact hU + +variable (Ω) in +/-- **Restriction as an isometry of `H̃^1(Ω)` into `H^1(Ω)`**: for every open set `Ω`, the +restriction `H̃^1(Ω) → H^1(Ω)` as a linear isometry (`Rd.norm_restrictProj_of_mem_tildeSpace`), +the case `s = 1` of `H̃^s(Ω) = H^s_0(Ω)`. -/ +noncomputable def tildeToRestriction : tildeSpace 1 Ω →ₗᵢ[ℂ] RestrictionSpace 1 Ω where + toLinearMap := (tildeToRestrictionL 1 Ω).toLinearMap + norm_map' U := norm_restrictProj_of_mem_tildeSpace U.2 + +/-- `tildeToRestriction Ω U` is the restriction of `U` to `Ω`. -/ +theorem tildeToRestriction_apply (U : tildeSpace 1 Ω) : + tildeToRestriction Ω U = restrictProj 1 Ω U := + rfl + +/-- **The image of `H̃^1(Ω)` is `H^1_0(Ω)`**: the range of the isometry `tildeToRestriction` is +closed, since `H̃^1(Ω)` is complete (Mathlib's `Isometry.isClosedEmbedding`), and its closure is +`H^1_0(Ω)` (`Rd.closure_range_tildeToRestrictionL`). -/ +theorem range_tildeToRestriction : + (tildeToRestriction Ω).toLinearMap.range = zeroBoundarySpace 1 Ω := by + have hc : IsClosed ((tildeToRestriction Ω).toLinearMap.range : Set (RestrictionSpace 1 Ω)) := + (tildeToRestriction Ω).isometry.isClosedEmbedding.isClosed_range + rw [← closure_range_tildeToRestrictionL] + exact (IsClosed.submodule_topologicalClosure_eq hc).symm + +variable (Ω) in +/-- **`H̃^1(Ω) ≅ H^1_0(Ω)` isometrically, for every open set `Ω`**: the identity +`H̃^s(Ω) = H^s_0(Ω)` at `s = 1`, with equal norms. McLean (Theorem 3.33) proves +`H̃^s(Ω) = H^s_0(Ω)` on Lipschitz domains for `s ≥ 0` with `s - 1/2 ∉ ℤ`, in particular for +`s = 1`, up to equivalence of norms; for `s = 1` restriction is an isometry of `H̃^1(Ω)` onto +`H^1_0(Ω)` for every open `Ω` (`Rd.tildeToRestriction`, `Rd.range_tildeToRestriction`, Mathlib's +`LinearIsometry.equivRange`). -/ +noncomputable def tildeEquivZeroBoundary : tildeSpace 1 Ω ≃ₗᵢ[ℂ] zeroBoundarySpace 1 Ω := + (tildeToRestriction Ω).equivRange.trans (LinearIsometryEquiv.ofEq _ _ range_tildeToRestriction) + +/-- `tildeEquivZeroBoundary Ω U` is the restriction of `U` to `Ω`. -/ +theorem coe_tildeEquivZeroBoundary_apply (U : tildeSpace 1 Ω) : + (tildeEquivZeroBoundary Ω U : RestrictionSpace 1 Ω) = restrictProj 1 Ω U := + rfl + +/-- **`H̃^1(Ω)` lies in `H^1(Ω)`**: every element of `H̃^1(Ω)` is orthogonal to the elements +vanishing on `Ω`. Restriction is the orthogonal projection onto `H^1(Ω)` and keeps the norm of +`U ∈ H̃^1(Ω)` (`Rd.norm_restrictProj_of_mem_tildeSpace`), and a vector whose orthogonal +projection has the same norm lies in the subspace (Mathlib's +`Submodule.mem_iff_norm_starProjection`). -/ +theorem tildeSpace_one_le_orthogonal : tildeSpace 1 Ω ≤ (vanishOn 1 Ω)ᗮ := fun U hU => + ((vanishOn 1 Ω)ᗮ.mem_iff_norm_starProjection U).2 (norm_restrictProj_of_mem_tildeSpace hU) + +/-- **The element of `H̃^1(Ω)` with restriction `u ∈ H^1_0(Ω)` is `u` itself**: inside `H^1(V)`, +`H̃^1(Ω)` and `H^1_0(Ω)` are the same subspace, and the inverse of `Rd.tildeEquivZeroBoundary` +is the identity (`Rd.tildeSpace_one_le_orthogonal`, `Rd.restrictProj_coe`). -/ +theorem coe_tildeEquivZeroBoundary_symm_apply (u : zeroBoundarySpace 1 Ω) : + (((tildeEquivZeroBoundary Ω).symm u : tildeSpace 1 Ω) : H^{1}(V)) = + ((u : RestrictionSpace 1 Ω) : H^{1}(V)) := by + have h := congrArg (fun v : zeroBoundarySpace 1 Ω => ((v : RestrictionSpace 1 Ω) : H^{1}(V))) + ((tildeEquivZeroBoundary Ω).apply_symm_apply u) + have h' := restrictProj_coe (⟨_, tildeSpace_one_le_orthogonal + ((tildeEquivZeroBoundary Ω).symm u).2⟩ : RestrictionSpace 1 Ω) + simp only [coe_tildeEquivZeroBoundary_apply] at h + rw [← h] + exact (congrArg Subtype.val h').symm + +end Rd diff --git a/LeanPool/FunctionSpaces/Domains/Spectral/ChartFormEigenbasis.lean b/LeanPool/FunctionSpaces/Domains/Spectral/ChartFormEigenbasis.lean new file mode 100644 index 0000000000..e48fa6f2bb --- /dev/null +++ b/LeanPool/FunctionSpaces/Domains/Spectral/ChartFormEigenbasis.lean @@ -0,0 +1,413 @@ +/- +Copyright (c) 2026 Mario Ullrich. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Mario Ullrich +-/ +module + +public import LeanPool.FunctionSpaces.Domains.Manifolds.ChartSobolev +public import LeanPool.FunctionSpaces.Domains.Spectral.NeumannEigenbasis + +/- +Modified for Lean Pool: module names and imports adapted. +-/ + +/-! +# The eigenbasis of the chart form on a compact manifold + +Let `M` be a compact manifold with model `I` whose range `Ω_I = range I` is a Besov domain, of +dimension `n = dim E ≥ 1`, with a smooth measure `μ` and a Besov atlas `A`; `O_I = interior Ω_I` +is the open model set, `P_k` the pieces, `L_k` the lifts and `J : H^1_A(M) → L_2(μ)` the chart +Sobolev embedding (`Manifold.BesovAtlas.chartSobolevEmbedding`). Inner products are +conjugate-linear in the first argument, as in Mathlib. + +* **Bounded convex pieces**: the piece `P_k f` vanishes outside the ball `B(0, R_k)` of + `Manifold.BesovAtlas.pieceRadius`, so it lives on the bounded convex Lipschitz domain + `D_k = O_I ∩ B(0, R_k + 1)` (`Manifold.BesovAtlas.pieceDomain`): it is the zero extension of its + restriction to `D_k` (`Manifold.BesovAtlas.indicatorExtendLp_neumannEmbedding_toNeumann`). + Restricting the jets of `u ∈ H^1_A(M)` to `D_k` (`Rd.restrictSubsetLp`) maps `H^1_A(M)` into + the Neumann space of `D_k` (`Manifold.BesovAtlas.toNeumann`). +* **Rellich's theorem**: `J = ∑_k L_k E_k J^N_k T_k` with the Neumann embeddings `J^N_k` of the + `D_k` and the zero extensions `E_k` (`Manifold.BesovAtlas.chartSobolevEmbedding_eq_sum`), so `J` + is compact (`Manifold.BesovAtlas.isCompactOperator_chartSobolevEmbedding`). +* **Density**: lifts of `H^1(E)` functions lie in the range of `J` + (`Manifold.BesovAtlas.chartLiftLp_toL2_mem_range`), and with `∑_k L_k P_k = id` the range of `J` + is dense (`Manifold.BesovAtlas.denseRange_chartSobolevEmbedding`). +* **The eigenbasis**: `J` is a compact dense embedding + (`Manifold.BesovAtlas.chartCompactEmbedding`) with the spectral scheme + `Manifold.BesovAtlas.chartScheme`, a Hilbert basis `(e_i)` of `L_2(μ)` with eigenvalues + `λ_i = σ_i⁻² - 1 ≥ 0`, levels `⌊√(1 + λ_i)⌋₊`, only finitely many eigenvalues below each bound + (`Manifold.BesovAtlas.finite_setOf_chartEigenvalue_le`), and eigenfunctions `φ_i ∈ H^1_A(M)` + with `J φ_i = e_i`. The eigenfunctions satisfy `a_A(φ_i, w) = λ_i ⟨e_i, J w⟩` for every + `w ∈ H^1_A(M)` (`Manifold.BesovAtlas.chartForm_eigenfunction`, in integrals + `Manifold.BesovAtlas.chartForm_eigenfunction_integral`), the weak eigenvalue equation of the + chart form with the natural boundary condition. +* **`H^1(M)` in the eigenbasis**: `f ∈ B^1_{2,2}(M)` iff + `∑_i (1 + ⌊√(1 + λ_i)⌋₊)² |⟨e_i, f⟩|² < ∞` (`Manifold.BesovAtlas.memBesov_one_two_iff_spectral`). +-/ + +@[expose] public section + +open MeasureTheory Set Filter Topology TopologicalSpace Module Metric +open scoped ENNReal Manifold ContDiff InnerProductSpace BesselPotentialSpace ComplexConjugate + +namespace Manifold + +variable {E : Type*} [NormedAddCommGroup E] [InnerProductSpace ℝ E] [FiniteDimensional ℝ E] + [MeasurableSpace E] [BorelSpace E] {H : Type*} [TopologicalSpace H] + {I : ModelWithCorners ℝ E H} {M : Type*} [TopologicalSpace M] [ChartedSpace H M] + [MeasurableSpace M] [BorelSpace M] [CompactSpace M] + +namespace BesovAtlas + +variable (A : BesovAtlas I M) {μ : Measure M} [IsSmoothMeasure I μ] + +/-! ### The bounded convex piece of a chart -/ + +variable [Rd.BesovDomain (range I)] + +/-- **The bounded convex piece of the `k`-th chart**: `D_k = O_I ∩ B(0, R_k + 1)`, a bounded convex +Lipschitz domain (`Rd.BesovDomain.ballDomain`), which contains the points of the carrier of the +`k`-th piece in the open model set. -/ +noncomputable abbrev pieceDomain (k : Fin A.n) : Rd.BoundedLipschitzDomain E := + Rd.BesovDomain.ballDomain (range I) (A.pieceRadius k + 1) + +omit [MeasurableSpace M] [BorelSpace M] [IsSmoothMeasure I μ] in +/-- The piece `D_k` lies in the open model set `O_I`. -/ +theorem pieceDomain_subset_interior (k : Fin A.n) : + ((A.pieceDomain k).toOpens : Set E) ⊆ interior (range I) := + Rd.BesovDomain.ballDomain_subset_interior (range I) _ + +/-- **The pieces vanish outside `D_k`**: `P_k f = 0` almost everywhere outside +`D_k = O_I ∩ B(0, R_k + 1)`. Outside the carrier `κ_k(tsupport ψ_k) ⊆ range I ∩ B(0, R_k)` the +piece vanishes (`Manifold.BesovAtlas.pieceLp_eq_zero_off`), and `range I \ O_I` is a null set +(`Manifold.modelInterior_ae_eq_range`). -/ +theorem pieceLp_eq_zero_off_pieceDomain {p : ℝ≥0∞} [Fact (1 ≤ p)] (hp : p ≠ ⊤) (k : Fin A.n) + (f : Lp ℂ p μ) : + ∀ᵐ y ∂volume, y ∉ ((A.pieceDomain k).toOpens : Set E) → A.pieceLp μ hp k f y = 0 := by + filter_upwards [A.pieceLp_eq_zero_off hp k f, (modelInterior_ae_eq_range I).mem_iff] + with y h1 h2 hy + refine h1 fun hc => hy ?_ + exact ⟨h2.2 (A.pieceCarrier_subset_range k hc), + ball_subset_ball (le_add_of_nonneg_right zero_le_one) (A.pieceCarrier_subset_ball k hc)⟩ + +/-! ### From the chart Sobolev space to the Neumann spaces of the pieces -/ + +variable (μ) in +/-- **The jets of the `k`-th piece on `D_k`**: `u = (f, g) ↦ ((P_k f)|_{D_k}, (g_{kj}|_{D_k})_j)`, +a bounded linear operator from the chart Sobolev space to `L_2(D_k) × L_2(D_k)^n`. -/ +noncomputable def toNeumannValueGradient (k : Fin A.n) : + A.chartSobolev μ →L[ℂ] Rd.ValueGradientL2 (A.pieceDomain k).toOpens := + (WithLp.prodContinuousLinearEquiv 2 ℂ _ _).symm.toContinuousLinearMap ∘L + ((LpToLpRestrictCLM E ℂ ℂ volume 2 ((A.pieceDomain k).toOpens : Set E) ∘L + A.pieceCLM μ Rd.two_ne_top k ∘L A.chartSobolevEmbedding μ).prod + ((PiLp.continuousLinearEquiv 2 ℂ _).symm.toContinuousLinearMap ∘L + ContinuousLinearMap.pi fun j : Fin (finrank ℝ E) => + Rd.restrictSubsetLp (A.pieceDomain k).toOpens.isOpen.measurableSet + (A.pieceDomain_subset_interior k) ∘L + PiLp.proj 2 (𝕜 := ℂ) (fun _ : Fin A.n × Fin (finrank ℝ E) => + Lp ℂ 2 (volume.restrict (interior (range I)))) (k, j) ∘L + WithLp.sndL 2 ℂ _ _ ∘L (A.chartSobolev μ).subtypeL)) + +/-- The jets of the `k`-th piece on `D_k` lie in the Neumann space of `D_k`: weak derivatives on +`O_I` are weak derivatives on `D_k ⊆ O_I` (`Rd.HasWeakLineDeriv.mono`). -/ +theorem toNeumannValueGradient_mem (k : Fin A.n) (u : A.chartSobolev μ) : + A.toNeumannValueGradient μ k u ∈ Rd.neumannSpace (A.pieceDomain k).toOpens := fun j => + ((u.2 (k, j)).mono (Rd.BesovDomain.toOpens_ballDomain_le (range I) _)).congr_ae + (LpToLpRestrictCLM_coeFn ℂ _ _).symm (Rd.restrictSubsetLp_ae _ _ _).symm + +variable (μ) in +/-- **From the chart Sobolev space to the Neumann space of `D_k`**: `u = (f, g) ↦ +((P_k f)|_{D_k}, (g_{kj}|_{D_k})_j)`, a bounded linear operator into `W^1_2(D_k)`. -/ +noncomputable def toNeumann (k : Fin A.n) : + A.chartSobolev μ →L[ℂ] Rd.neumannSpace (A.pieceDomain k).toOpens := + (A.toNeumannValueGradient μ k).codRestrict _ (A.toNeumannValueGradient_mem k) + +/-- The value of `toNeumann k u` is the restriction to `D_k` of the piece `P_k (J u)`. -/ +theorem neumannEmbedding_toNeumann (k : Fin A.n) (u : A.chartSobolev μ) : + Rd.neumannEmbedding (A.pieceDomain k).toOpens (A.toNeumann μ k u) = + LpToLpRestrictCLM E ℂ ℂ volume 2 ((A.pieceDomain k).toOpens : Set E) + (A.pieceLp μ Rd.two_ne_top k (A.chartSobolevEmbedding μ u)) := + rfl + +/-- **The piece is the zero extension of its restriction to `D_k`**: `E_k J^N_k T_k u = P_k (J u)`, +since `P_k (J u)` vanishes outside `D_k` (`Manifold.BesovAtlas.pieceLp_eq_zero_off_pieceDomain`, +`Rd.indicatorExtendLp_restrict_of_ae_eq_zero`). -/ +theorem indicatorExtendLp_neumannEmbedding_toNeumann (k : Fin A.n) (u : A.chartSobolev μ) : + Rd.indicatorExtendLp (A.pieceDomain k).toOpens.isOpen.measurableSet subset_rfl + (Rd.neumannEmbedding (A.pieceDomain k).toOpens (A.toNeumann μ k u)) = + A.pieceLp μ Rd.two_ne_top k (A.chartSobolevEmbedding μ u) := by + rw [neumannEmbedding_toNeumann] + exact Rd.indicatorExtendLp_restrict_of_ae_eq_zero _ + (A.pieceLp_eq_zero_off_pieceDomain Rd.two_ne_top k _) + +/-! ### Rellich's theorem -/ + +/-- **The chart Sobolev embedding through the Neumann spaces of the pieces**: +`J = ∑_k L_k ∘ E_k ∘ J^N_k ∘ T_k`, with `T_k` the restriction of the jets to `D_k` +(`Manifold.BesovAtlas.toNeumann`), `J^N_k` the Neumann embedding of `D_k` and `E_k` the zero +extension; by the retract identity `∑_k L_k P_k = id` +(`Manifold.BesovAtlas.sum_chartLiftLp_pieceLp`) and +`Manifold.BesovAtlas.indicatorExtendLp_neumannEmbedding_toNeumann`. -/ +theorem chartSobolevEmbedding_eq_sum : + A.chartSobolevEmbedding μ = ∑ k, A.chartLiftCLM μ Rd.two_ne_top k ∘L + (Rd.indicatorExtendLp (A.pieceDomain k).toOpens.isOpen.measurableSet subset_rfl ∘L + (Rd.neumannEmbedding (A.pieceDomain k).toOpens ∘L A.toNeumann μ k)) := by + ext1 u + rw [FunLike.coe_sum, Finset.sum_apply] + conv_lhs => rw [← A.sum_chartLiftLp_pieceLp Rd.two_ne_top (A.chartSobolevEmbedding μ u)] + refine Finset.sum_congr rfl fun k _ => ?_ + rw [ContinuousLinearMap.comp_apply, ContinuousLinearMap.comp_apply, + ContinuousLinearMap.comp_apply, A.indicatorExtendLp_neumannEmbedding_toNeumann k u] + rfl + +/-- **Rellich's theorem for the chart Sobolev space**: for a compact manifold whose model range is +a Besov domain in dimension `n ≥ 1`, the embedding `J : H^1_A(M) → L_2(μ)` is compact. Each +summand of `J = ∑_k L_k E_k J^N_k T_k` (`Manifold.BesovAtlas.chartSobolevEmbedding_eq_sum`) +contains the Neumann embedding `J^N_k` of the bounded convex Lipschitz domain `D_k`, which is +compact (`Rd.BoundedLipschitzDomain.isCompactOperator_neumannEmbedding`); compact operators form a +subspace (Mathlib's `compactOperator`, `IsCompactOperator.comp_clm`, `IsCompactOperator.clm_comp`). +The same proof covers manifolds with and without boundary. -/ +theorem isCompactOperator_chartSobolevEmbedding [Nontrivial E] : + IsCompactOperator (A.chartSobolevEmbedding μ) := by + rw [A.chartSobolevEmbedding_eq_sum] + refine (compactOperator (RingHom.id ℂ) (A.chartSobolev μ) (Lp ℂ 2 μ)).sum_mem fun k _ => ?_ + change IsCompactOperator _ + exact ((((A.pieceDomain k).isCompactOperator_neumannEmbedding).comp_clm + (A.toNeumann μ k)).clm_comp + (Rd.indicatorExtendLp (A.pieceDomain k).toOpens.isOpen.measurableSet subset_rfl)).clm_comp + (A.chartLiftCLM μ Rd.two_ne_top k) + +/-! ### Density -/ + +/-- **Lifts of `H^1(E)` functions are values of the chart Sobolev embedding**: for every +`U ∈ H^1(E)` and every chart index `k`, `L_k (ι U) = J u` for some `u ∈ H^1_A(M)`. The function +`ι U` has finite `B^1_{2,2}(E)` quasi-norm (`Rd.memSobolev_toL2`, `Rd.memSobolev_one_iff_modulus`), +so its lift lies in `B^1_{2,2}(M)` (`Manifold.BesovAtlas.memBesov_chartLiftLp`), which is the range +of `J` (`Manifold.BesovAtlas.mem_range_chartSobolevEmbedding_iff_memBesov`). -/ +theorem chartLiftLp_toL2_mem_range [IsManifold I ∞ M] (k : Fin A.n) (U : H^{1}(E)) : + A.chartLiftLp μ Rd.two_ne_top k (Rd.toL2 U) ∈ range (A.chartSobolevEmbedding μ) := by + rw [A.mem_range_chartSobolevEmbedding_iff_memBesov] + exact A.memBesov_chartLiftLp Rd.two_ne_top k (r := 2) one_le_two one_pos (by norm_num) + one_le_two ((Rd.memSobolev_one_iff_modulus le_rfl _).1 (Rd.memSobolev_toL2 U)) + +/-- **The chart Sobolev embedding has dense range**: every `f ∈ L_2(μ)` is `∑_k L_k P_k f` +(`Manifold.BesovAtlas.sum_chartLiftLp_pieceLp`); the Schwartz functions are dense in `L_2(E)` +(Mathlib's `SchwartzMap.denseRange_toLpCLM`), they lie in `H^1(E)` (`Rd.toL2_ofSchwartz`), and +their lifts are values of `J` (`Manifold.BesovAtlas.chartLiftLp_toL2_mem_range`). So each +`L_k P_k f` lies in the closure of the range of `J`, and so does their sum. -/ +theorem denseRange_chartSobolevEmbedding [IsManifold I ∞ M] : + DenseRange (A.chartSobolevEmbedding μ) := by + intro f + set W := LinearMap.range (A.chartSobolevEmbedding μ : A.chartSobolev μ →ₗ[ℂ] Lp ℂ 2 μ) + have hW : ∀ k, A.chartLiftLp μ Rd.two_ne_top k (A.pieceLp μ Rd.two_ne_top k f) ∈ + W.topologicalClosure := fun k => by + refine DenseRange.induction_on (SchwartzMap.denseRange_toLpCLM (F := ℂ) + (μ := (volume : Measure E)) Rd.two_ne_top) (A.pieceLp μ Rd.two_ne_top k f) + (W.isClosed_topologicalClosure.preimage (A.chartLiftCLM μ Rd.two_ne_top k).continuous) + fun φ => W.le_topologicalClosure ?_ + have h := A.chartLiftLp_toL2_mem_range (μ := μ) k (Rd.ofSchwartz 1 φ) + rw [Rd.toL2_ofSchwartz] at h + rw [SchwartzMap.toLpCLM_apply] + exact h + have hsum := W.topologicalClosure.sum_mem fun k (_ : k ∈ Finset.univ) => hW k + rw [A.sum_chartLiftLp_pieceLp] at hsum + rwa [← SetLike.mem_coe, Submodule.topologicalClosure_coe, LinearMap.coe_range] at hsum + +/-! ### The eigenbasis of the chart form -/ + +variable [Nontrivial E] [IsManifold I ∞ M] + +variable (μ) in +/-- **`H^1_A(M) ↪ L_2(μ)` as a compact dense embedding**, for a compact manifold whose model range +is a Besov domain in dimension `n ≥ 1` +(`Manifold.BesovAtlas.isCompactOperator_chartSobolevEmbedding`, +`Manifold.BesovAtlas.chartSobolevEmbedding_injective`, +`Manifold.BesovAtlas.denseRange_chartSobolevEmbedding`). -/ +noncomputable def chartCompactEmbedding : CompactDenseEmbedding (A.chartSobolev μ) (Lp ℂ 2 μ) where + toCLM := A.chartSobolevEmbedding μ + isCompact := A.isCompactOperator_chartSobolevEmbedding + injective := A.chartSobolevEmbedding_injective + denseRange := A.denseRange_chartSobolevEmbedding + +/-- The embedding of `Manifold.BesovAtlas.chartCompactEmbedding` is the chart Sobolev +embedding. -/ +@[simp] +theorem chartCompactEmbedding_toCLM : + (A.chartCompactEmbedding μ).toCLM = A.chartSobolevEmbedding μ := + rfl + +variable (μ) in +/-- **The eigenbasis of the chart form as a spectral scheme**: the Hilbert basis `(e_i)` of +`L_2(μ)` of eigenvectors of `J J†`, `J` the chart Sobolev embedding, with the levels `⌊σ_i⁻¹⌋₊` of +the singular values (`CompactDenseEmbedding.spectralScheme`). With the chart form in the inner +product of `H^1_A(M)`, `σ_i⁻² = 1 + λ_i` for the eigenvalue `λ_i` of the chart form +(`Manifold.BesovAtlas.one_add_chartEigenvalue`), so the level is `⌊√(1 + λ_i)⌋₊` +(`Manifold.BesovAtlas.chartScheme_level`). -/ +noncomputable def chartScheme : + SpectralScheme (A.chartCompactEmbedding μ).index (Lp ℂ 2 μ) := + (A.chartCompactEmbedding μ).spectralScheme + +/-- The singular values of the chart Sobolev embedding are at most `1` +(`Manifold.BesovAtlas.norm_chartSobolevEmbedding_le`). -/ +theorem singularValue_chartCompactEmbedding_le_one (i : (A.chartCompactEmbedding μ).index) : + (A.chartCompactEmbedding μ).singularValue i ≤ 1 := + ((A.chartCompactEmbedding μ).singularValue_le_norm i).trans A.norm_chartSobolevEmbedding_le + +variable (μ) in +/-- **The eigenvalue of the chart form** `λ_i = σ_i⁻² - 1` of the index `i`, `σ_i` the singular +value of the chart Sobolev embedding; `a_A(φ_i, w) = λ_i ⟨e_i, J w⟩` for every `w` +(`Manifold.BesovAtlas.chartForm_eigenfunction`). -/ +noncomputable def chartEigenvalue (i : (A.chartCompactEmbedding μ).index) : ℝ := + ((A.chartCompactEmbedding μ).singularValue i)⁻¹ ^ 2 - 1 + +/-- The eigenvalues of the chart form are nonnegative, since `σ_i ≤ 1` +(`Manifold.BesovAtlas.singularValue_chartCompactEmbedding_le_one`). -/ +theorem chartEigenvalue_nonneg (i : (A.chartCompactEmbedding μ).index) : + 0 ≤ A.chartEigenvalue μ i := by + have h1 : 1 ≤ ((A.chartCompactEmbedding μ).singularValue i)⁻¹ := + one_le_inv_iff₀.2 ⟨(A.chartCompactEmbedding μ).singularValue_pos i, + A.singularValue_chartCompactEmbedding_le_one i⟩ + have h2 : 1 ≤ ((A.chartCompactEmbedding μ).singularValue i)⁻¹ ^ 2 := one_le_pow₀ h1 + unfold chartEigenvalue + linarith + +/-- `1 + λ_i = σ_i⁻²`. -/ +theorem one_add_chartEigenvalue (i : (A.chartCompactEmbedding μ).index) : + 1 + A.chartEigenvalue μ i = ((A.chartCompactEmbedding μ).singularValue i)⁻¹ ^ 2 := by + unfold chartEigenvalue + ring + +/-- `σ_i⁻¹ = √(1 + λ_i)`. -/ +theorem inv_singularValue_eq_sqrt (i : (A.chartCompactEmbedding μ).index) : + ((A.chartCompactEmbedding μ).singularValue i)⁻¹ = Real.sqrt (1 + A.chartEigenvalue μ i) := by + rw [one_add_chartEigenvalue, Real.sqrt_sq + (inv_nonneg.2 ((A.chartCompactEmbedding μ).singularValue_pos i).le)] + +/-- **The level of an eigenfunction of the chart form** is `⌊√(1 + λ_i)⌋₊`. -/ +theorem chartScheme_level (i : (A.chartCompactEmbedding μ).index) : + (A.chartScheme μ).level i = ⌊Real.sqrt (1 + A.chartEigenvalue μ i)⌋₊ := by + rw [← inv_singularValue_eq_sqrt] + rfl + +/-- **Finitely many eigenvalues below each bound**: for every `Λ`, only finitely many indices have +`λ_i ≤ Λ`, since then the level `⌊√(1 + λ_i)⌋₊` is at most `⌊√(1 + Λ)⌋₊` +(`Manifold.BesovAtlas.chartScheme_level`, `SpectralScheme.finite_level`). -/ +theorem finite_setOf_chartEigenvalue_le (Λ : ℝ) : + {i | A.chartEigenvalue μ i ≤ Λ}.Finite := + ((A.chartScheme μ).finite_level (⌊Real.sqrt (1 + Λ)⌋₊ + 1)).subset fun i hi => by + change (A.chartScheme μ).level i < _ + rw [A.chartScheme_level i] + exact Nat.lt_succ_of_le (Nat.floor_mono (Real.sqrt_le_sqrt (by linarith [hi.out]))) + +variable (μ) in +/-- **The eigenfunction of the chart form** `φ_i = σ_i⁻¹ v_i ∈ H^1_A(M)`, `v_i` the singular basis +of the chart Sobolev embedding; its value is the basis vector `e_i` of `L_2(μ)` +(`Manifold.BesovAtlas.chartSobolevEmbedding_chartEigenfunction`). -/ +noncomputable def chartEigenfunction (i : (A.chartCompactEmbedding μ).index) : A.chartSobolev μ := + ((((A.chartCompactEmbedding μ).singularValue i)⁻¹ : ℝ) : ℂ) • + (A.chartCompactEmbedding μ).singularBasis i + +/-- **`J φ_i = e_i`**: the chart Sobolev embedding maps the eigenfunction `φ_i` to the basis vector +`e_i` of the chart scheme, since `J v_i = σ_i e_i` (`CompactDenseEmbedding.apply_singularBasis`). -/ +theorem chartSobolevEmbedding_chartEigenfunction (i : (A.chartCompactEmbedding μ).index) : + A.chartSobolevEmbedding μ (A.chartEigenfunction μ i) = (A.chartScheme μ).basis i := by + have h := (A.chartCompactEmbedding μ).apply_singularBasis i + rw [chartCompactEmbedding_toCLM] at h + rw [chartEigenfunction, map_smul, h, smul_smul, ← Complex.ofReal_mul, + inv_mul_cancel₀ ((A.chartCompactEmbedding μ).singularValue_pos i).ne', Complex.ofReal_one, + one_smul] + rfl + +/-! ### The weak eigenvalue equation of the chart form -/ + +/-- **The weak eigenvalue equation of the chart form**: for every index `i` and every +`w ∈ H^1_A(M)`, `a_A(φ_i, w) = λ_i ⟨e_i, J w⟩_{L_2(μ)}`, with the chart form `a_A` +(`Manifold.BesovAtlas.chartForm`). It is the weak eigenvalue equation +`⟨v_i, w⟩ = σ_i⁻² ⟨J v_i, J w⟩` of the singular basis +(`CompactDenseEmbedding.inner_singularBasis`) with the inner product +`⟨u, w⟩ = ⟨J u, J w⟩ + a_A(u, w)` of `H^1_A(M)` (`Manifold.BesovAtlas.inner_chartSobolev`). The +test functions `w` are arbitrary near the boundary of `M`, so the boundary condition is the natural +one. -/ +theorem chartForm_eigenfunction (i : (A.chartCompactEmbedding μ).index) (w : A.chartSobolev μ) : + A.chartForm μ (A.chartEigenfunction μ i) w = + (A.chartEigenvalue μ i : ℂ) * ⟪(A.chartScheme μ).basis i, A.chartSobolevEmbedding μ w⟫_ℂ := by + have hφ : ⟪A.chartEigenfunction μ i, w⟫_ℂ = + ((((A.chartCompactEmbedding μ).singularValue i)⁻¹ ^ 2 : ℝ) : ℂ) * + ⟪A.chartSobolevEmbedding μ (A.chartEigenfunction μ i), A.chartSobolevEmbedding μ w⟫_ℂ := by + -- the scalar multiplication of the subspace matches `inner_smul_left` up to unfolding + -- instances, so the lemma is applied by unification instead of rewriting + refine (inner_smul_left (𝕜 := ℂ) (E := A.chartSobolev μ) + ((A.chartCompactEmbedding μ).singularBasis i) w _).trans ?_ + rw [chartEigenfunction, map_smul, inner_smul_left, + (A.chartCompactEmbedding μ).inner_singularBasis i w, chartCompactEmbedding_toCLM] + ring + rw [A.inner_chartSobolev] at hφ + rw [← A.chartSobolevEmbedding_chartEigenfunction i] + change _ = _ * ⟪A.chartSobolevEmbedding μ (A.chartEigenfunction μ i), + A.chartSobolevEmbedding μ w⟫_ℂ + rw [chartSobolevEmbedding_apply, chartSobolevEmbedding_apply] at hφ ⊢ + unfold chartEigenvalue + push_cast at hφ ⊢ + linear_combination hφ + +omit [Rd.BesovDomain (range I)] [Nontrivial E] [IsManifold I ∞ M] in +/-- **The chart form as a sum of integrals**: for `u = (f, g)` and `w = (f', g')` in the chart +Sobolev space, `a_A(u, w) = ∑_{k,j} ∫_{O_I} conj (g_{kj}) g'_{kj}` (Mathlib's +`MeasureTheory.L2.inner_def`, `RCLike.inner_apply'`). -/ +theorem chartForm_eq_sum_integral (u w : A.chartSobolev μ) : + A.chartForm μ u w = ∑ ij, ∫ y in interior (range I), + conj ((u : A.chartValueGradientL2 μ).snd ij y) * (w : A.chartValueGradientL2 μ).snd ij y := by + simp only [chartForm, MeasureTheory.L2.inner_def, RCLike.inner_apply'] + +/-- **The weak eigenvalue equation in integrals**: for every index `i` and every +`w = (f', g') ∈ H^1_A(M)`, with `φ_i = (e_i, g)`, +`∑_{k,j} ∫_{O_I} conj (g_{kj}) g'_{kj} = λ_i ∫_M conj (e_i) f' dμ`, where +`g_{kj} = ∂_{b_j} P_k e_i` weakly on `O_I` (`Manifold.BesovAtlas.chartForm_eigenfunction`, +`Manifold.BesovAtlas.chartForm_eq_sum_integral`). -/ +theorem chartForm_eigenfunction_integral (i : (A.chartCompactEmbedding μ).index) + (w : A.chartSobolev μ) : + ∑ ij, ∫ y in interior (range I), + conj ((A.chartEigenfunction μ i : A.chartValueGradientL2 μ).snd ij y) * + (w : A.chartValueGradientL2 μ).snd ij y = + (A.chartEigenvalue μ i : ℂ) * + ∫ x, conj ((A.chartScheme μ).basis i x) * A.chartSobolevEmbedding μ w x ∂μ := by + rw [← chartForm_eq_sum_integral, chartForm_eigenfunction, MeasureTheory.L2.inner_def] + simp only [RCLike.inner_apply'] + +/-! ### `H^1(M)` in the eigenbasis -/ + +/-- **The chart Sobolev space in the eigenbasis**: `f ∈ L_2(μ)` is a value of the chart Sobolev +embedding iff `∑_i (1 + ⌊√(1 + λ_i)⌋₊)² |⟨e_i, f⟩|² < ∞`. This is the Sobolev space of order `1` +of the chart scheme (`CompactDenseEmbedding.range_eq_range_sobolevEmbed`, +`SpectralScheme.mem_range_sobolevEmbed_iff`), whose levels are `⌊√(1 + λ_i)⌋₊` +(`Manifold.BesovAtlas.chartScheme_level`). -/ +theorem mem_range_chartSobolevEmbedding_iff_spectral (f : Lp ℂ 2 μ) : + f ∈ range (A.chartSobolevEmbedding μ) ↔ + Memℓp (fun i => ((1 + ⌊Real.sqrt (1 + A.chartEigenvalue μ i)⌋₊ : ℕ) : ℂ) * + (A.chartScheme μ).basis.repr f i) 2 := by + simp only [← A.chartScheme_level] + -- unfolding the scheme first keeps the definitional unfolding in the rewrites cheap + unfold chartScheme + have hw : ∀ i, (((A.chartCompactEmbedding μ).spectralScheme.weight 1 i : ℝ) : ℂ) = + ((1 + (A.chartCompactEmbedding μ).spectralScheme.level i : ℕ) : ℂ) := fun i => by + simp [SpectralScheme.weight] + refine ((Set.ext_iff.1 (A.chartCompactEmbedding μ).range_eq_range_sobolevEmbed f).trans + ((A.chartCompactEmbedding μ).spectralScheme.mem_range_sobolevEmbed_iff 1 zero_le_one f)).trans + ?_ + simp only [hw] + +/-- **`H^1(M) = B^1_{2,2}(M)` in the eigenbasis of the chart form**: `f ∈ B^1_{2,2}(M)` iff +`∑_i (1 + ⌊√(1 + λ_i)⌋₊)² |⟨e_i, f⟩|² < ∞` +(`Manifold.BesovAtlas.mem_range_chartSobolevEmbedding_iff`, +`Manifold.BesovAtlas.mem_range_chartSobolevEmbedding_iff_spectral`). -/ +theorem memBesov_one_two_iff_spectral [T2Space M] (f : Lp ℂ 2 μ) : + Manifold.MemBesov I μ Rd.two_ne_top 1 2 f ↔ + Memℓp (fun i => ((1 + ⌊Real.sqrt (1 + A.chartEigenvalue μ i)⌋₊ : ℕ) : ℂ) * + (A.chartScheme μ).basis.repr f i) 2 := + (A.mem_range_chartSobolevEmbedding_iff f).symm.trans + (A.mem_range_chartSobolevEmbedding_iff_spectral f) + +end BesovAtlas + +end Manifold diff --git a/LeanPool/FunctionSpaces/Domains/Spectral/DirichletEigenbasis.lean b/LeanPool/FunctionSpaces/Domains/Spectral/DirichletEigenbasis.lean new file mode 100644 index 0000000000..df654e94fa --- /dev/null +++ b/LeanPool/FunctionSpaces/Domains/Spectral/DirichletEigenbasis.lean @@ -0,0 +1,392 @@ +/- +Copyright (c) 2026 Mario Ullrich. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Mario Ullrich +-/ +module + +public import LeanPool.FunctionSpaces.MeasureSpaces.Spectral.CompactEmbedding +public import LeanPool.FunctionSpaces.Domains.Sobolev.SobolevRestrictionSpaces + +/- +Modified for Lean Pool: module names and imports adapted. +-/ + +/-! +# The Dirichlet Laplacian on bounded open sets + +Let `V` be a finite-dimensional real inner product space, such as `ℝ^d`, with Lebesgue measure, +and `Ω ⊆ V` a bounded open set. The embedding `H^1_0(Ω) ↪ L_2(Ω)` is a compact dense embedding +of Hilbert spaces, so its spectral scheme is a Hilbert basis of `L_2(Ω)` of eigenfunctions of the +Dirichlet Laplacian, in weak form. + +* **Polarization**: a norm identity `‖x‖² = ‖T x‖² + c ∑_i ‖S_i x‖²` for linear maps `T`, `S_i` + between inner product spaces gives the same identity for the inner products + (`inner_eq_of_forall_sq_norm_eq`). +* **The inner product of `H^1(V)`** is + `⟨U, W⟩ = ⟨ι U, ι W⟩_2 + (2π)⁻² ∑_k ⟨∂_{b_k} ι U, ∂_{b_k} ι W⟩_2` for every orthonormal basis + `(b_k)` of `V`, by polarization of the norm identity (`inner_eq_of_forall_sq_norm_eq`, + `Rd.inner_eq_of_hasWeakLineDeriv`). +* **The Dirichlet embedding** `Rd.dirichletEmbedding Ω : H^1_0(Ω) → L_2(Ω)` is injective, of norm + at most `1`, has dense range since the test functions of `Ω` are dense in `L_2(Ω)` + (`Rd.orthogonal_range_dirichletEmbedding`), and is compact for bounded `Ω` (Rellich's theorem); + for `u, w ∈ H^1_0(Ω)` the inner product of `L_2(Ω)` is that of `L_2(V)` + (`Rd.inner_dirichletEmbedding`). +* **The Dirichlet eigenbasis**: `Rd.dirichletScheme hΩ` is the spectral scheme of this embedding, + a Hilbert basis `(e_i)` of `L_2(Ω)` with levels `⌊√(1 + λ_i/(4π²))⌋₊` + (`Rd.dirichletScheme_level`), where `λ_i ≥ 0` is the Dirichlet eigenvalue + (`Rd.dirichletEigenvalue`). The eigenfunction `φ_i ∈ H^1_0(Ω)` with `φ_i = e_i` on `Ω` + (`Rd.dirichletEigenfunction`) satisfies `∑_k ⟨∂_{b_k} φ_i, ∂_{b_k} w⟩_2 = λ_i ⟨φ_i, w⟩_2` for + every `w ∈ H^1_0(Ω)`, inner products conjugate-linear in the first argument as in Mathlib + (`Rd.dirichletEigenfunction_weak`), the weak form of `-Δ φ_i = λ_i φ_i`, `φ_i = 0` on `∂Ω`. +* **`H^1_0(Ω)` as a spectral Sobolev space**: `f ∈ L_2(Ω)` lies in `H^1_0(Ω)` iff + `∑_i (1 + ⌊σ_i⁻¹⌋₊)² |⟨e_i, f⟩|² < ∞` (`Rd.exists_dirichletEmbedding_eq_iff`), and the real + interpolation spaces `(L_2(Ω), H^1_0(Ω))_{θ,q}` are the approximation spaces of the Dirichlet + scheme (`Rd.memKMethod_dirichlet_iff`, `Rd.memKMethod_dirichlet_iff_blockNorm_lt_top`). +-/ + +@[expose] public section + +open MeasureTheory Filter Topology TopologicalSpace +open scoped ENNReal Real InnerProductSpace BesselPotentialSpace Distributions + +/-! ### Polarization of a norm identity -/ + +section Polarization + +variable {𝕜 E : Type*} [RCLike 𝕜] [NormedAddCommGroup E] [InnerProductSpace 𝕜 E] + +/-- **Polarization of a norm identity**: let `T : E → F` and `S_i : E → G` (`i` in a finite +index set) be linear maps between inner product spaces over `𝕜 = ℝ` or `ℂ`, and `c` real with +`‖x‖² = ‖T x‖² + c ∑_i ‖S_i x‖²` for every `x`. Then +`⟨x, y⟩ = ⟨T x, T y⟩ + c ∑_i ⟨S_i x, S_i y⟩` for all `x, y`, as both sides are given by the +polarization identity (Mathlib's `inner_eq_sum_norm_sq_div_four`). -/ +theorem inner_eq_of_forall_sq_norm_eq {F G ι : Type*} [Fintype ι] + [NormedAddCommGroup F] [InnerProductSpace 𝕜 F] + [NormedAddCommGroup G] [InnerProductSpace 𝕜 G] (T : E →ₗ[𝕜] F) (S : ι → E →ₗ[𝕜] G) (c : ℝ) + (h : ∀ x, ‖x‖ ^ 2 = ‖T x‖ ^ 2 + c * ∑ i, ‖S i x‖ ^ 2) (x y : E) : + ⟪x, y⟫_𝕜 = ⟪T x, T y⟫_𝕜 + (c : 𝕜) * ∑ i, ⟪S i x, S i y⟫_𝕜 := by + have key : ∀ z, (‖z‖ : 𝕜) ^ 2 = (‖T z‖ : 𝕜) ^ 2 + (c : 𝕜) * ∑ i, (‖S i z‖ : 𝕜) ^ 2 := + fun z => by + have hz := congrArg (fun r : ℝ => (r : 𝕜)) (h z) + push_cast at hz + exact hz + rw [inner_eq_sum_norm_sq_div_four x y, inner_eq_sum_norm_sq_div_four (T x) (T y)] + simp only [inner_eq_sum_norm_sq_div_four (S _ x) (S _ y)] + rw [key, key, key, key] + simp only [map_add, map_sub, map_smul, ← Finset.sum_div, Finset.sum_add_distrib, + Finset.sum_sub_distrib, ← Finset.sum_mul] + ring + +end Polarization + +namespace Rd + +variable {V : Type*} [NormedAddCommGroup V] [InnerProductSpace ℝ V] [FiniteDimensional ℝ V] + [MeasurableSpace V] [BorelSpace V] + +/-! ### The inner product of `H^1(V)` -/ + +/-- **The inner product of `H^1(V)` by the weak gradient**: let `(b_k)` be an orthonormal basis +of `V` and `U, W ∈ H^1(V)` whose `L_2` functions have the weak derivatives `g_k = ∂_{b_k} ι U` +and `h_k = ∂_{b_k} ι W` on `V`. Then `⟨U, W⟩ = ⟨ι U, ι W⟩_2 + (2π)⁻² ∑_k ⟨g_k, h_k⟩_2`, the +polarization (`inner_eq_of_forall_sq_norm_eq`) of +`‖U‖² = ‖ι U‖_2² + (2π)⁻² ∑_k ‖∂_{b_k} ι U‖_2²` (`Rd.sq_norm_eq_of_hasWeakLineDeriv`). -/ +theorem inner_eq_of_hasWeakLineDeriv {ι : Type*} [Fintype ι] (b : OrthonormalBasis ι ℝ V) + {U W : H^{1}(V)} {g h : ι → Lp ℂ 2 (volume : Measure V)} + (hg : ∀ i, HasWeakLineDeriv ⊤ (fun _ : Fin 1 => b i) (toL2 U) (g i)) + (hh : ∀ i, HasWeakLineDeriv ⊤ (fun _ : Fin 1 => b i) (toL2 W) (h i)) : + ⟪U, W⟫_ℂ = ⟪toL2 U, toL2 W⟫_ℂ + (((2 * π)⁻¹ ^ 2 : ℝ) : ℂ) * ∑ i, ⟪g i, h i⟫_ℂ := by + have hgU : g = fun i => weakDerivL2 (b i) U := funext fun i => (weakDerivL2_eq (hg i)).symm + have hhW : h = fun i => weakDerivL2 (b i) W := funext fun i => (weakDerivL2_eq (hh i)).symm + subst hgU hhW + exact inner_eq_of_forall_sq_norm_eq (toL2 : H^{1}(V) →L[ℂ] _).toLinearMap + (fun i => (weakDerivL2 (b i)).toLinearMap) _ + (fun x => sq_norm_eq_of_hasWeakLineDeriv b x fun i => hasWeakLineDeriv_weakDerivL2 _ _) U W + +/-! ### The Dirichlet embedding -/ + +variable {Ω : Opens V} + +variable (Ω) in +/-- **The Dirichlet embedding** `H^1_0(Ω) → L_2(Ω)`, `u ↦ u|_Ω`: the restriction to `L_2(Ω)` +(`Rd.restrictL2`) on the closed subspace `H^1_0(Ω)` of `H^1(Ω)`. -/ +noncomputable def dirichletEmbedding : + zeroBoundarySpace 1 Ω →L[ℂ] Lp ℂ 2 (volume.restrict (Ω : Set V)) := + restrictL2 Ω ∘L (zeroBoundarySpace 1 Ω).subtypeL + +/-- `dirichletEmbedding Ω u` is the restriction to `Ω` of the `L_2` function of `u`. -/ +theorem dirichletEmbedding_apply (u : zeroBoundarySpace 1 Ω) : + dirichletEmbedding Ω u = restrictL2 Ω u := + rfl + +/-- The Dirichlet embedding is injective (`Rd.restrictL2_injective`). -/ +theorem dirichletEmbedding_injective : Function.Injective (dirichletEmbedding Ω) := + restrictL2_injective.comp Subtype.val_injective + +/-- The Dirichlet embedding has norm at most `1` (`Rd.norm_restrictL2_apply_le`). -/ +theorem norm_dirichletEmbedding_le : ‖dirichletEmbedding Ω‖ ≤ 1 := + ContinuousLinearMap.opNorm_le_bound _ zero_le_one fun u => by + rw [one_mul] + exact norm_restrictL2_apply_le _ + +/-- **Rellich's theorem for `H^1_0(Ω)`**: for every bounded open set `Ω`, the Dirichlet embedding +is compact, as the restriction of the compact embedding `H^1(Ω) → L_2(Ω)` +(`Rd.isCompactOperator_restrictL2`). -/ +theorem isCompactOperator_dirichletEmbedding (hΩ : Bornology.IsBounded (Ω : Set V)) : + IsCompactOperator (dirichletEmbedding Ω) := + (isCompactOperator_restrictL2 hΩ).comp_clm _ + +/-- The elements of `H^1_0(Ω)` vanish outside `Ω`: inside `H^1(V)` they are elements of +`H̃^1(Ω)` (`Rd.coe_tildeEquivZeroBoundary_symm_apply`), whose `L_2` functions vanish almost +everywhere outside `Ω` (`Rd.toL2_ae_eq_zero_of_mem_tildeSpace`). -/ +theorem toL2_ae_eq_zero_of_mem_zeroBoundarySpace (u : zeroBoundarySpace 1 Ω) : + ∀ᵐ x ∂volume, x ∉ (Ω : Set V) → toL2 ((u : RestrictionSpace 1 Ω) : H^{1}(V)) x = 0 := by + rw [← coe_tildeEquivZeroBoundary_symm_apply] + exact toL2_ae_eq_zero_of_mem_tildeSpace ((tildeEquivZeroBoundary Ω).symm u).2 + +/-- **The `L_2(Ω)` inner product of elements of `H^1_0(Ω)`** is the `L_2(V)` inner product of +their `L_2` functions, since these vanish outside `Ω` +(`Rd.toL2_ae_eq_zero_of_mem_zeroBoundarySpace`). -/ +theorem inner_dirichletEmbedding (u w : zeroBoundarySpace 1 Ω) : + ⟪dirichletEmbedding Ω u, dirichletEmbedding Ω w⟫_ℂ = + ⟪toL2 ((u : RestrictionSpace 1 Ω) : H^{1}(V)), + toL2 ((w : RestrictionSpace 1 Ω) : H^{1}(V))⟫_ℂ := by + rw [L2.inner_def, L2.inner_def] + have hu := LpToLpRestrictCLM_coeFn ℂ (Ω : Set V) (toL2 ((u : RestrictionSpace 1 Ω) : H^{1}(V))) + have hw := LpToLpRestrictCLM_coeFn ℂ (Ω : Set V) (toL2 ((w : RestrictionSpace 1 Ω) : H^{1}(V))) + rw [dirichletEmbedding_apply, dirichletEmbedding_apply, restrictL2_apply, restrictL2_apply] + rw [integral_congr_ae (hu.mono fun x hx => by rw [hx]), integral_congr_ae + (hw.mono fun x hx => by rw [hx])] + refine setIntegral_eq_integral_of_ae_compl_eq_zero ?_ + filter_upwards [toL2_ae_eq_zero_of_mem_zeroBoundarySpace u] with x hx hxΩ + rw [hx hxΩ, inner_zero_left] + +/-- The restriction of a test function `φ` of `Ω` lies in `H^1_0(Ω)`. -/ +theorem restrictProj_ofTest_mem (φ : 𝓓(Ω, ℝ)) : + restrictProj 1 Ω (ofTest 1 φ) ∈ zeroBoundarySpace 1 Ω := + Submodule.le_topologicalClosure _ (Submodule.mem_map_of_mem (Submodule.subset_span ⟨φ, rfl⟩)) + +/-- **Integrals against test functions as inner products**: for a real test function `φ` of `Ω` +and `f ∈ L_2(Ω)`, `⟨φ|_Ω, f⟩_{L_2(Ω)} = ∫_Ω φ f`, where `φ|_Ω ∈ H^1_0(Ω)` +(`Rd.restrictProj_ofTest_mem`, `Rd.restrictL2_restrictProj`, `Rd.toL2_ofTest_ae`). -/ +theorem inner_dirichletEmbedding_ofTest (φ : 𝓓(Ω, ℝ)) + (f : Lp ℂ 2 (volume.restrict (Ω : Set V))) : + ⟪dirichletEmbedding Ω ⟨_, restrictProj_ofTest_mem φ⟩, f⟫_ℂ = + ∫ x, φ x • f x ∂volume.restrict (Ω : Set V) := by + rw [L2.inner_def, dirichletEmbedding_apply] + change ∫ x, ⟪restrictL2 Ω (restrictProj 1 Ω (ofTest 1 φ)) x, f x⟫_ℂ ∂_ = _ + rw [restrictL2_restrictProj] + refine integral_congr_ae ?_ + filter_upwards [LpToLpRestrictCLM_coeFn ℂ (Ω : Set V) (toL2 (ofTest 1 φ)), + ae_restrict_of_ae (toL2_ofTest_ae φ)] with x hx hφ + rw [hx, hφ, testSchwartz_apply, RCLike.inner_apply, Complex.conj_ofReal, Complex.real_smul, + mul_comm] + +/-- **The test functions are dense in `L_2(Ω)`**: the range of the Dirichlet embedding has trivial +orthogonal complement. If `f ∈ L_2(Ω)` is orthogonal to all `φ|_Ω`, then `∫_Ω φ f = 0` for every +real test function `φ` of `Ω` (`Rd.inner_dirichletEmbedding_ofTest`), so `f = 0` almost everywhere +on `Ω` (Mathlib's `IsOpen.ae_eq_zero_of_integral_contDiff_smul_eq_zero`). -/ +theorem orthogonal_range_dirichletEmbedding : + (LinearMap.range (dirichletEmbedding Ω : + zeroBoundarySpace 1 Ω →ₗ[ℂ] Lp ℂ 2 (volume.restrict (Ω : Set V))))ᗮ = ⊥ := by + refine le_antisymm (fun f hf => ?_) bot_le + have h0 : ∀ φ : 𝓓(Ω, ℝ), ∫ x, φ x • f x ∂volume.restrict (Ω : Set V) = 0 := fun φ => by + rw [← inner_dirichletEmbedding_ofTest] + exact (Submodule.mem_orthogonal _ f).1 hf _ (LinearMap.mem_range_self _ _) + have hae := Ω.isOpen.ae_eq_zero_of_integral_contDiff_smul_eq_zero + (μ := volume.restrict (Ω : Set V)) + (((Lp.memLp f).locallyIntegrable (by norm_num)).locallyIntegrableOn _) + fun g hg hgc hgs => h0 ⟨g, hg, hgc, hgs⟩ + rw [Submodule.mem_bot, Lp.eq_zero_iff_ae_eq_zero] + filter_upwards [hae, ae_restrict_mem Ω.isOpen.measurableSet] with x hx hxΩ + exact hx hxΩ + +/-- The Dirichlet embedding has dense range (`Rd.orthogonal_range_dirichletEmbedding`). -/ +theorem denseRange_dirichletEmbedding : DenseRange (dirichletEmbedding Ω) := by + have h := Submodule.topologicalClosure_eq_top_iff.2 + (orthogonal_range_dirichletEmbedding (Ω := Ω)) + rw [← Submodule.dense_iff_topologicalClosure_eq_top, LinearMap.coe_range] at h + exact h + +/-! ### The Dirichlet eigenbasis -/ + +/-- **`H^1_0(Ω) ↪ L_2(Ω)` as a compact dense embedding**, for every bounded open set `Ω` +(`Rd.isCompactOperator_dirichletEmbedding`, `Rd.dirichletEmbedding_injective`, +`Rd.denseRange_dirichletEmbedding`). -/ +noncomputable def dirichletCompactEmbedding (hΩ : Bornology.IsBounded (Ω : Set V)) : + CompactDenseEmbedding (zeroBoundarySpace 1 Ω) (Lp ℂ 2 (volume.restrict (Ω : Set V))) where + toCLM := dirichletEmbedding Ω + isCompact := isCompactOperator_dirichletEmbedding hΩ + injective := dirichletEmbedding_injective + denseRange := denseRange_dirichletEmbedding + +variable (hΩ : Bornology.IsBounded (Ω : Set V)) + +/-- The embedding of `Rd.dirichletCompactEmbedding` is the Dirichlet embedding. -/ +@[simp] +theorem dirichletCompactEmbedding_toCLM : + (dirichletCompactEmbedding hΩ).toCLM = dirichletEmbedding Ω := + rfl + +/-- **The Dirichlet eigenbasis as a spectral scheme**: for a bounded open set `Ω`, the Hilbert +basis `(e_i)` of `L_2(Ω)` of eigenvectors of `J J†`, `J` the Dirichlet embedding, with the levels +`⌊σ_i⁻¹⌋₊` of the singular values (`CompactDenseEmbedding.spectralScheme`). With Mathlib's inner +product of `H^1`, `σ_i⁻² = 1 + λ_i/(4π²)` for the Dirichlet eigenvalue `λ_i` +(`Rd.one_add_dirichletEigenvalue_div`), so the level is `⌊√(1 + λ_i/(4π²))⌋₊` +(`Rd.dirichletScheme_level`), the frequency in the units of the Fourier scheme of the torus. The +factor `2π` rescales the levels only and changes no approximation space. -/ +noncomputable def dirichletScheme : + SpectralScheme (dirichletCompactEmbedding hΩ).index (Lp ℂ 2 (volume.restrict (Ω : Set V))) := + (dirichletCompactEmbedding hΩ).spectralScheme + +/-- The singular values of the Dirichlet embedding are at most `1` +(`Rd.norm_dirichletEmbedding_le`). -/ +theorem singularValue_dirichletCompactEmbedding_le_one + (i : (dirichletCompactEmbedding hΩ).index) : + (dirichletCompactEmbedding hΩ).singularValue i ≤ 1 := + ((dirichletCompactEmbedding hΩ).singularValue_le_norm i).trans norm_dirichletEmbedding_le + +/-- **The Dirichlet eigenvalue** `λ_i = 4π² (σ_i⁻² - 1)` of the index `i`, `σ_i` the singular value +of the Dirichlet embedding; `-Δ φ_i = λ_i φ_i` weakly (`Rd.dirichletEigenfunction_weak`). These +are the eigenvalues `λ_n` of Brezis (Theorem 9.31). -/ +noncomputable def dirichletEigenvalue (i : (dirichletCompactEmbedding hΩ).index) : ℝ := + 4 * π ^ 2 * (((dirichletCompactEmbedding hΩ).singularValue i)⁻¹ ^ 2 - 1) + +/-- The Dirichlet eigenvalues are nonnegative, since `σ_i ≤ 1` +(`Rd.singularValue_dirichletCompactEmbedding_le_one`). -/ +theorem dirichletEigenvalue_nonneg (i : (dirichletCompactEmbedding hΩ).index) : + 0 ≤ dirichletEigenvalue hΩ i := by + have hσ := (dirichletCompactEmbedding hΩ).singularValue_pos i + have h1 : 1 ≤ ((dirichletCompactEmbedding hΩ).singularValue i)⁻¹ := + one_le_inv_iff₀.2 ⟨hσ, singularValue_dirichletCompactEmbedding_le_one hΩ i⟩ + have h2 : 1 ≤ ((dirichletCompactEmbedding hΩ).singularValue i)⁻¹ ^ 2 := one_le_pow₀ h1 + unfold dirichletEigenvalue + have : 0 ≤ ((dirichletCompactEmbedding hΩ).singularValue i)⁻¹ ^ 2 - 1 := by linarith + positivity + +/-- `1 + λ_i/(4π²) = σ_i⁻²`. -/ +theorem one_add_dirichletEigenvalue_div (i : (dirichletCompactEmbedding hΩ).index) : + 1 + dirichletEigenvalue hΩ i / (4 * π ^ 2) = + ((dirichletCompactEmbedding hΩ).singularValue i)⁻¹ ^ 2 := by + unfold dirichletEigenvalue + field_simp + ring + +/-- **The level of a Dirichlet eigenfunction** is `⌊√(1 + λ_i/(4π²))⌋₊`. -/ +theorem dirichletScheme_level (i : (dirichletCompactEmbedding hΩ).index) : + (dirichletScheme hΩ).level i = ⌊Real.sqrt (1 + dirichletEigenvalue hΩ i / (4 * π ^ 2))⌋₊ := by + rw [one_add_dirichletEigenvalue_div, Real.sqrt_sq + (inv_nonneg.2 ((dirichletCompactEmbedding hΩ).singularValue_pos i).le)] + rfl + +/-- **The Dirichlet eigenfunction** `φ_i = σ_i⁻¹ v_i ∈ H^1_0(Ω)`, `v_i` the singular basis of the +Dirichlet embedding; its restriction to `Ω` is the basis vector `e_i` of `L_2(Ω)` +(`Rd.dirichletEmbedding_dirichletEigenfunction`). -/ +noncomputable def dirichletEigenfunction (i : (dirichletCompactEmbedding hΩ).index) : + zeroBoundarySpace 1 Ω := + ((((dirichletCompactEmbedding hΩ).singularValue i)⁻¹ : ℝ) : ℂ) • + (dirichletCompactEmbedding hΩ).singularBasis i + +/-- **`φ_i = e_i` on `Ω`**: the Dirichlet embedding maps the eigenfunction `φ_i` to the basis +vector `e_i` of the Dirichlet scheme, since `J v_i = σ_i e_i` +(`CompactDenseEmbedding.apply_singularBasis`). -/ +theorem dirichletEmbedding_dirichletEigenfunction + (i : (dirichletCompactEmbedding hΩ).index) : + dirichletEmbedding Ω (dirichletEigenfunction hΩ i) = (dirichletScheme hΩ).basis i := by + have h := (dirichletCompactEmbedding hΩ).apply_singularBasis i + rw [dirichletCompactEmbedding_toCLM] at h + rw [dirichletEigenfunction, map_smul, h, smul_smul, ← Complex.ofReal_mul, + inv_mul_cancel₀ ((dirichletCompactEmbedding hΩ).singularValue_pos i).ne', Complex.ofReal_one, + one_smul] + rfl + +/-! ### The weak Dirichlet eigenvalue equation -/ + +/-- **The inner product of `H^1_0(Ω)`**: for an orthonormal basis `(b_k)` of `V` and +`u, w ∈ H^1_0(Ω)`, +`⟨u, w⟩ = ⟨J u, J w⟩_{L_2(Ω)} + (2π)⁻² ∑_k ⟨∂_{b_k} ι u, ∂_{b_k} ι w⟩_{L_2(V)}` +(`Rd.inner_eq_of_hasWeakLineDeriv`, `Rd.inner_dirichletEmbedding`). -/ +theorem inner_zeroBoundarySpace_eq {ι : Type*} [Fintype ι] (b : OrthonormalBasis ι ℝ V) + (u w : zeroBoundarySpace 1 Ω) : + ⟪u, w⟫_ℂ = ⟪dirichletEmbedding Ω u, dirichletEmbedding Ω w⟫_ℂ + + (((2 * π)⁻¹ ^ 2 : ℝ) : ℂ) * ∑ k, ⟪weakDerivL2 (b k) ((u : RestrictionSpace 1 Ω) : H^{1}(V)), + weakDerivL2 (b k) ((w : RestrictionSpace 1 Ω) : H^{1}(V))⟫_ℂ := by + rw [inner_dirichletEmbedding] + exact inner_eq_of_hasWeakLineDeriv b (fun k => hasWeakLineDeriv_weakDerivL2 _ _) + (fun k => hasWeakLineDeriv_weakDerivL2 _ _) + +/-- **The weak Dirichlet eigenvalue equation**: for every bounded open `Ω`, every orthonormal +basis `(b_k)` of `V`, every index `i` and every `w ∈ H^1_0(Ω)`, +`∑_k ⟨∂_{b_k} ι φ_i, ∂_{b_k} ι w⟩_{L_2(V)} = λ_i ⟨ι φ_i, ι w⟩_{L_2(V)}`, the weak form of +`-Δ φ_i = λ_i φ_i` with `φ_i = 0` on `∂Ω`. It is the weak eigenvalue equation +`⟨v_i, w⟩ = σ_i⁻² ⟨J v_i, J w⟩` of the singular basis +(`CompactDenseEmbedding.inner_singularBasis`) with the inner product of `H^1_0(Ω)` +(`Rd.inner_zeroBoundarySpace_eq`). -/ +theorem dirichletEigenfunction_weak {ι : Type*} [Fintype ι] (b : OrthonormalBasis ι ℝ V) + (i : (dirichletCompactEmbedding hΩ).index) (w : zeroBoundarySpace 1 Ω) : + ∑ k, ⟪weakDerivL2 (b k) ((dirichletEigenfunction hΩ i : RestrictionSpace 1 Ω) : H^{1}(V)), + weakDerivL2 (b k) ((w : RestrictionSpace 1 Ω) : H^{1}(V))⟫_ℂ = + (dirichletEigenvalue hΩ i : ℂ) * + ⟪toL2 ((dirichletEigenfunction hΩ i : RestrictionSpace 1 Ω) : H^{1}(V)), + toL2 ((w : RestrictionSpace 1 Ω) : H^{1}(V))⟫_ℂ := by + have hφ : ⟪dirichletEigenfunction hΩ i, w⟫_ℂ = + ((((dirichletCompactEmbedding hΩ).singularValue i)⁻¹ ^ 2 : ℝ) : ℂ) * + ⟪dirichletEmbedding Ω (dirichletEigenfunction hΩ i), dirichletEmbedding Ω w⟫_ℂ := by + -- the scalar multiplication of the subspace `H^1_0(Ω)` matches `inner_smul_left` up to + -- unfolding instances, so the lemma is applied by unification instead of rewriting + refine (inner_smul_left (𝕜 := ℂ) (E := zeroBoundarySpace 1 Ω) + ((dirichletCompactEmbedding hΩ).singularBasis i) w _).trans ?_ + rw [dirichletEigenfunction, map_smul, inner_smul_left, + (dirichletCompactEmbedding hΩ).inner_singularBasis i w, + dirichletCompactEmbedding_toCLM] + ring + rw [inner_zeroBoundarySpace_eq b, inner_dirichletEmbedding] at hφ + have hσ := (dirichletCompactEmbedding hΩ).ofReal_singularValue_ne_zero i + have hπ : (π : ℂ) ≠ 0 := Complex.ofReal_ne_zero.2 Real.pi_ne_zero + unfold dirichletEigenvalue + push_cast at hφ ⊢ + field_simp at hφ ⊢ + linear_combination hφ + +/-! ### `H^1_0(Ω)` as a spectral Sobolev space -/ + +/-- **`H^1_0(Ω)` in the Dirichlet eigenbasis**: `f ∈ L_2(Ω)` is the restriction of some +`w ∈ H^1_0(Ω)` iff `∑_i (1 + ⌊σ_i⁻¹⌋₊)² |⟨e_i, f⟩|² < ∞`, the Sobolev space of order `1` of the +Dirichlet scheme (`CompactDenseEmbedding.range_eq_range_sobolevEmbed`, +`SpectralScheme.mem_range_sobolevEmbed_iff`). -/ +theorem exists_dirichletEmbedding_eq_iff (f : Lp ℂ 2 (volume.restrict (Ω : Set V))) : + (∃ w, dirichletEmbedding Ω w = f) ↔ + Memℓp (fun i => ((1 + (dirichletScheme hΩ).level i : ℕ) : ℂ) * + (dirichletScheme hΩ).basis.repr f i) 2 := by + have h : (∃ w, dirichletEmbedding Ω w = f) ↔ f ∈ Set.range (dirichletCompactEmbedding hΩ).toCLM := + Iff.rfl + rw [h, (dirichletCompactEmbedding hΩ).range_eq_range_sobolevEmbed, + SpectralScheme.mem_range_sobolevEmbed_iff] + have hw : ∀ i, (((dirichletCompactEmbedding hΩ).spectralScheme.weight 1 i : ℝ) : ℂ) = + ((1 + (dirichletScheme hΩ).level i : ℕ) : ℂ) := fun i => by + simp [SpectralScheme.weight, dirichletScheme] + simp only [hw] + rfl + +/-- **The interpolation spaces between `L_2(Ω)` and `H^1_0(Ω)`**: for every bounded open `Ω`, +`0 < θ < 1` and `1 ≤ q ≤ ∞`, `(L_2(Ω), H^1_0(Ω))_{θ,q}` is the approximation space `A^θ_q` of the +Dirichlet scheme (`CompactDenseEmbedding.memKMethod_iff_memApprox`). -/ +theorem memKMethod_dirichlet_iff {θ : ℝ} {q : ℝ≥0∞} (hθ : 0 < θ) (hθ' : θ < 1) (hq : 1 ≤ q) + {f : Lp ℂ 2 (volume.restrict (Ω : Set V))} : + (InterpCouple.ofMap ((dirichletEmbedding Ω).restrictScalars ℝ)).MemKMethod θ q f ↔ + (dirichletScheme hΩ).toScheme.MemApprox θ q f := + (dirichletCompactEmbedding hΩ).memKMethod_iff_memApprox hθ hθ' hq + +/-- **The interpolation spaces between `L_2(Ω)` and `H^1_0(Ω)` by dyadic blocks**: for every +bounded open `Ω`, `0 < θ < 1` and `1 ≤ q ≤ ∞`, `f ∈ (L_2(Ω), H^1_0(Ω))_{θ,q}` iff the dyadic +blocks of the expansion of `f` in the Dirichlet eigenbasis have finite `B^θ_{2,q}` norm +(`Rd.memKMethod_dirichlet_iff`, `SpectralScheme.memApprox_iff_blockNorm_lt_top`). -/ +theorem memKMethod_dirichlet_iff_blockNorm_lt_top {θ : ℝ} {q : ℝ≥0∞} (hθ : 0 < θ) (hθ' : θ < 1) + (hq : 1 ≤ q) {f : Lp ℂ 2 (volume.restrict (Ω : Set V))} : + (InterpCouple.ofMap ((dirichletEmbedding Ω).restrictScalars ℝ)).MemKMethod θ q f ↔ + (dirichletScheme hΩ).projectionScheme.blockNorm θ q f < ∞ := by + rw [memKMethod_dirichlet_iff hΩ hθ hθ' hq, + (dirichletScheme hΩ).memApprox_iff_blockNorm_lt_top hθ hq] + +end Rd diff --git a/LeanPool/FunctionSpaces/Domains/Spectral/ManifoldSpectralBesov.lean b/LeanPool/FunctionSpaces/Domains/Spectral/ManifoldSpectralBesov.lean new file mode 100644 index 0000000000..83c98e4568 --- /dev/null +++ b/LeanPool/FunctionSpaces/Domains/Spectral/ManifoldSpectralBesov.lean @@ -0,0 +1,330 @@ +/- +Copyright (c) 2026 Mario Ullrich. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Mario Ullrich +-/ +module + +public import LeanPool.FunctionSpaces.Domains.Spectral.ChartFormEigenbasis +public import LeanPool.FunctionSpaces.Domains.Spectral.SpectralBesov +public import LeanPool.FunctionSpaces.Domains.Manifolds.SmoothLocalGraphs +public import LeanPool.FunctionSpaces.Domains.Manifolds.SmoothMeasureExistence + +/- +Modified for Lean Pool: module names and imports adapted. +-/ + +/-! +# Besov spaces on compact manifolds by eigenfunction expansions + +Let `M` be a compact manifold with model `I` whose range `Ω_I = range I` is a Besov domain, of +dimension `n = dim E ≥ 1`, with a smooth measure `μ` and a Besov atlas `A`; `P_k` are the pieces, +`L_k` the lifts, `J : H^1_A(M) → L_2(μ)` the chart Sobolev embedding and `(e_i)` the eigenbasis of +the chart form (`Manifold.BesovAtlas.chartScheme`). Let `0 < θ < 1` and `1 ≤ q ≤ ∞`. + +* **The pieces of interpolation functions**: `P_k` followed by the restriction to the bounded + convex piece `D_k` maps the couple `(L_2(μ), J(H^1_A(M)))` into the Neumann couple of `D_k` + (`Manifold.BesovAtlas.memKMethod_neumann_pieceLp_of_memKMethod`), so every piece of + `f ∈ (L_2(μ), H^1_A(M))_{θ,q}` has a finite intrinsic `B^θ_{2,q}(Ω_I)` quasi-norm + (`Manifold.BesovAtlas.modNormOn_pieceLp_lt_top_of_memKMethod`). +* **Lifts map couples**: `U ↦ J⁻¹ (L_k ι U)` is a bounded linear operator `H^1(E) → H^1_A(M)` + by the closed graph theorem (`Manifold.BesovAtlas.chartLiftSobolev`), so `L_k` maps + `(L_2(E), H^1(E))_{θ,q}` into `(L_2(μ), H^1_A(M))_{θ,q}` + (`Manifold.BesovAtlas.memKMethod_chartLiftLp`). +* **The couple by the pieces**: `f ∈ (L_2(μ), H^1_A(M))_{θ,q}` iff every piece has a finite + intrinsic quasi-norm (`Manifold.BesovAtlas.memKMethod_chartSobolev_iff`); the converse extends + the pieces to `E`, lifts them and sums with `∑_k L_k P_k = id`. +* **The main theorem** (`Manifold.BesovAtlas.memApprox_chartScheme_iff`): `f ∈ B^θ_{2,q}(M)` iff + `f` lies in the approximation space `A^θ_q` of the eigenbasis of the chart form; equivalently + `‖P_1 f‖_2 + ‖(2^(kθ) ‖Δ_k f‖_2)_k‖_{ℓ_q} < ∞` for the dyadic blocks `Δ_k f` of its + eigenfunction expansion (`Manifold.BesovAtlas.memBesov_iff_blockNorm_lt_top`), and for `q = 2`, + `∑_i (1 + λ_i)^θ |⟨e_i, f⟩|² < ∞` (`Manifold.BesovAtlas.memBesov_two_iff_chartEigenvalue`). +* **Smooth domains**: on the closure of a bounded smooth domain `Ω ⊆ ℝ^n`, the approximation + spaces of the chart scheme are the intrinsic `B^θ_{2,q}(Ω)` + (`Rd.SmoothDomain.memApprox_chartScheme_iff_modNormOn`), for example on the closed ball + (`Rd.SmoothDomain.memApprox_chartScheme_ball_iff`). +* **The sphere**: on the sphere `S^n`, `n ≥ 1`, a compact manifold without boundary, with the + chart measure of a Besov atlas, the approximation spaces of the chart scheme are + `B^θ_{2,q}(S^n)` (`Manifold.memApprox_chartScheme_sphere_iff`). +-/ + +@[expose] public section + +open MeasureTheory Set Filter Topology TopologicalSpace Module Metric +open scoped ENNReal Manifold ContDiff BesselPotentialSpace + +namespace Manifold + +variable {E : Type*} [NormedAddCommGroup E] [InnerProductSpace ℝ E] [FiniteDimensional ℝ E] + [MeasurableSpace E] [BorelSpace E] [Nontrivial E] {H : Type*} [TopologicalSpace H] + {I : ModelWithCorners ℝ E H} [Rd.BesovDomain (range I)] {M : Type*} [TopologicalSpace M] + [ChartedSpace H M] [IsManifold I ∞ M] [MeasurableSpace M] [BorelSpace M] [CompactSpace M] + +namespace BesovAtlas + +variable (A : BesovAtlas I M) {μ : Measure M} [IsSmoothMeasure I μ] {θ : ℝ} {q : ℝ≥0∞} + +/-! ### The pieces of interpolation functions -/ + +omit [Nontrivial E] [IsManifold I ∞ M] in +/-- **The pieces map the chart couple into the Neumann couples**: if `f ∈ L_2(μ)` lies in +`(L_2(μ), H^1_A(M))_{θ,q}`, then `(P_k f)|_{D_k}` lies in `(L_2(D_k), W^1_2(D_k))_{θ,q}`. The +operators `f ↦ (P_k f)|_{D_k}` on `L_2(μ)` and `T_k` (`Manifold.BesovAtlas.toNeumann`) on +`H^1_A(M)` are compatible with the embeddings (`Manifold.BesovAtlas.neumannEmbedding_toNeumann`), +so the interpolation property applies (`ApproximationScheme.MemKMethod.map`). -/ +theorem memKMethod_neumann_pieceLp_of_memKMethod {f : Lp ℂ 2 μ} + (hf : (InterpCouple.ofMap ((A.chartSobolevEmbedding μ).restrictScalars ℝ)).MemKMethod θ q f) + (k : Fin A.n) : + (InterpCouple.ofMap + ((Rd.neumannEmbedding (A.pieceDomain k).toOpens).restrictScalars ℝ)).MemKMethod θ q + (LpToLpRestrictCLM E ℂ ℂ volume 2 ((A.pieceDomain k).toOpens : Set E) + (A.pieceLp μ Rd.two_ne_top k f)) := by + refine InterpCouple.memKMethod_ofMap_iff.2 (ApproximationScheme.MemKMethod.map + ((LpToLpRestrictCLM E ℂ ℂ volume 2 ((A.pieceDomain k).toOpens : Set E) ∘L + A.pieceCLM μ Rd.two_ne_top k).restrictScalars ℝ) + ((A.toNeumann μ k).restrictScalars ℝ) ?_ (InterpCouple.memKMethod_ofMap_iff.1 hf)) + ext1 u + exact (A.neumannEmbedding_toNeumann k u).symm + +omit [IsManifold I ∞ M] in +/-- **The pieces of interpolation functions are Besov on `Ω_I`**: for `0 < θ < 1`, `1 ≤ q ≤ ∞`, +every order `r ≥ 1` and every `f ∈ (L_2(μ), H^1_A(M))_{θ,q}`, every piece `P_k f` has a finite +intrinsic quasi-norm `N_{Ω_I}(P_k f)` with moduli of order `r`. The restriction of `P_k f` to +`D_k` lies in the Neumann approximation space +(`Manifold.BesovAtlas.memKMethod_neumann_pieceLp_of_memKMethod`, +`Rd.BoundedLipschitzDomain.memKMethod_neumann_iff`), so `N_{D_k}(P_k f) < ∞` +(`Rd.BoundedLipschitzDomain.memApprox_neumannScheme_iff`), and `P_k f` vanishes outside +`B(0, R_k)` (`Rd.BesovDomain.modNormOn_lt_top_iff_ballDomain`). -/ +theorem modNormOn_pieceLp_lt_top_of_memKMethod (hθ : 0 < θ) (hθ' : θ < 1) (hq : 1 ≤ q) + {r : ℕ} (hr : 1 ≤ r) {f : Lp ℂ 2 μ} + (hf : (InterpCouple.ofMap ((A.chartSobolevEmbedding μ).restrictScalars ℝ)).MemKMethod θ q f) + (k : Fin A.n) : + Rd.modNormOn (Rd.BesovDomain.measurableSet (range I)) r θ q (A.pieceLp μ Rd.two_ne_top k f) < + ⊤ := by + have h1 := ((A.pieceDomain k).memKMethod_neumann_iff hθ hθ' hq).1 + (A.memKMethod_neumann_pieceLp_of_memKMethod hf k) + have h2 := ((A.pieceDomain k).memApprox_neumannScheme_iff hθ hθ' hq hr _).1 h1 + exact (Rd.BesovDomain.modNormOn_lt_top_iff_ballDomain (Ω := range I) Rd.two_ne_top hθ + (hθ'.trans_le (Nat.one_le_cast.2 hr)) hq (lt_add_one _) + (A.pieceLp_eq_zero_off_ball Rd.two_ne_top k f)).2 h2 + +/-! ### Lifts map couples -/ + +variable (μ) in +/-- **The lift on `H^1(E)` as a linear map into the chart Sobolev space**: `U ↦ J⁻¹ (L_k ι U)`, +well defined since `L_k ι U` lies in the range of the injective `J` +(`Manifold.BesovAtlas.chartLiftLp_toL2_mem_range`, Mathlib's `LinearEquiv.ofInjective`). -/ +noncomputable def chartLiftSobolevLinear (k : Fin A.n) : H^{1}(E) →ₗ[ℂ] A.chartSobolev μ := + (LinearEquiv.ofInjective (A.chartSobolevEmbedding μ : A.chartSobolev μ →ₗ[ℂ] Lp ℂ 2 μ) + A.chartSobolevEmbedding_injective).symm.toLinearMap ∘ₗ + ((A.chartLiftCLM μ Rd.two_ne_top k ∘L Rd.toL2 : H^{1}(E) →L[ℂ] Lp ℂ 2 μ) : + H^{1}(E) →ₗ[ℂ] Lp ℂ 2 μ).codRestrict _ + fun U => LinearMap.mem_range.2 (A.chartLiftLp_toL2_mem_range k U) + +omit [Nontrivial E] in +/-- `J (chartLiftSobolevLinear k U) = L_k ι U`. -/ +theorem chartSobolevEmbedding_chartLiftSobolevLinear (k : Fin A.n) (U : H^{1}(E)) : + A.chartSobolevEmbedding μ (A.chartLiftSobolevLinear μ k U) = + A.chartLiftLp μ Rd.two_ne_top k (Rd.toL2 U) := by + have h := LinearEquiv.ofInjective_apply + (A.chartSobolevEmbedding μ : A.chartSobolev μ →ₗ[ℂ] Lp ℂ 2 μ) + (h := A.chartSobolevEmbedding_injective) (A.chartLiftSobolevLinear μ k U) + rw [chartLiftSobolevLinear, LinearMap.comp_apply, LinearEquiv.coe_coe, + LinearEquiv.apply_symm_apply] at h + exact h.symm + +omit [Nontrivial E] in +/-- **The graph of the lift is closed**: `u = J⁻¹ (L_k ι U)` iff `J u = L_k ι U`, a closed +condition in `(U, u)` since `J`, `L_k` and `ι` are continuous. -/ +theorem isClosed_graph_chartLiftSobolevLinear (k : Fin A.n) : + IsClosed ((A.chartLiftSobolevLinear μ k).graph : Set (H^{1}(E) × A.chartSobolev μ)) := by + have hset : ((A.chartLiftSobolevLinear μ k).graph : Set (H^{1}(E) × A.chartSobolev μ)) = + {x | A.chartSobolevEmbedding μ x.2 = (A.chartLiftCLM μ Rd.two_ne_top k ∘L Rd.toL2) x.1} := by + ext x + rw [SetLike.mem_coe, LinearMap.mem_graph_iff, mem_ofPred_eq, ContinuousLinearMap.comp_apply, + chartLiftCLM_apply, ← A.chartSobolevEmbedding_chartLiftSobolevLinear k x.1] + exact (A.chartSobolevEmbedding_injective.eq_iff).symm + rw [hset] + exact isClosed_eq ((A.chartSobolevEmbedding μ).continuous.comp continuous_snd) + ((A.chartLiftCLM μ Rd.two_ne_top k ∘L Rd.toL2).continuous.comp continuous_fst) + +variable (μ) in +/-- **The lift `H^1(E) → H^1_A(M)`**: `U ↦ J⁻¹ (L_k ι U)` is a bounded linear operator, by the +closed graph theorem (Mathlib's `ContinuousLinearMap.ofIsClosedGraph`, +`Manifold.BesovAtlas.isClosed_graph_chartLiftSobolevLinear`). -/ +noncomputable def chartLiftSobolev (k : Fin A.n) : H^{1}(E) →L[ℂ] A.chartSobolev μ := + ContinuousLinearMap.ofIsClosedGraph (A.isClosed_graph_chartLiftSobolevLinear k) + +omit [Nontrivial E] in +/-- **`J ∘ S_k = L_k ∘ ι`**: the chart Sobolev embedding of the lift of `U ∈ H^1(E)` is the lift +`L_k ι U` of its `L_2` function. -/ +theorem chartSobolevEmbedding_chartLiftSobolev (k : Fin A.n) (U : H^{1}(E)) : + A.chartSobolevEmbedding μ (A.chartLiftSobolev μ k U) = + A.chartLiftLp μ Rd.two_ne_top k (Rd.toL2 U) := + A.chartSobolevEmbedding_chartLiftSobolevLinear k U + +omit [Nontrivial E] in +/-- **Lifts map the whole-space couple into the chart couple**: for every chart index `k` and every +`F ∈ (L_2(E), H^1(E))_{θ,q}`, the lift `L_k F` lies in `(L_2(μ), H^1_A(M))_{θ,q}`. The bounded +operators `L_k` and `S_k` (`Manifold.BesovAtlas.chartLiftSobolev`) satisfy `L_k ι = J S_k`, so the +interpolation property applies (`ApproximationScheme.MemKMethod.map`). -/ +theorem memKMethod_chartLiftLp {F : Lp ℂ 2 (volume : Measure E)} + (hF : (InterpCouple.ofMap + ((Rd.toL2 : H^{1}(E) →L[ℂ] Lp ℂ 2 (volume : Measure E)).restrictScalars ℝ)).MemKMethod + θ q F) (k : Fin A.n) : + (InterpCouple.ofMap ((A.chartSobolevEmbedding μ).restrictScalars ℝ)).MemKMethod θ q + (A.chartLiftLp μ Rd.two_ne_top k F) := by + refine InterpCouple.memKMethod_ofMap_iff.2 (ApproximationScheme.MemKMethod.map + ((A.chartLiftCLM μ Rd.two_ne_top k).restrictScalars ℝ) + ((A.chartLiftSobolev μ k).restrictScalars ℝ) ?_ (InterpCouple.memKMethod_ofMap_iff.1 hF)) + ext1 U + exact (A.chartSobolevEmbedding_chartLiftSobolev k U).symm + +/-! ### The chart couple by the pieces -/ + +/-- **Lifts of extended pieces**: if every piece `P_k f` has a finite intrinsic quasi-norm on +`Ω_I` with moduli of an order `r > θ`, then `L_k P_k f ∈ (L_2(μ), H^1_A(M))_{θ,q}`. The extension +property of `Ω_I` (`Rd.BesovDomain.hasBesovExtension`) gives `F ∈ L_2(E)` with `F = P_k f` on +`Ω_I` and finite whole-space quasi-norm, so `F ∈ (L_2(E), H^1(E))_{θ,q}` +(`Rd.memKMethod_ofMap_toL2_iff`); `L_k F = L_k P_k f` +(`Manifold.BesovAtlas.chartLiftLp_eq_of_ae_eq_on`), and `Manifold.BesovAtlas.memKMethod_chartLiftLp` +applies. -/ +theorem memKMethod_chartLiftLp_pieceLp (hθ : 0 < θ) (hθ' : θ < 1) (hq : 1 ≤ q) {r : ℕ} + (hθr : θ < r) {f : Lp ℂ 2 μ} (k : Fin A.n) + (hf : Rd.modNormOn (Rd.BesovDomain.measurableSet (range I)) r θ q + (A.pieceLp μ Rd.two_ne_top k f) < ⊤) : + (InterpCouple.ofMap ((A.chartSobolevEmbedding μ).restrictScalars ℝ)).MemKMethod θ q + (A.chartLiftLp μ Rd.two_ne_top k (A.pieceLp μ Rd.two_ne_top k f)) := by + obtain ⟨C, hC, hext⟩ := Rd.BesovDomain.hasBesovExtension (range I) 2 Rd.two_ne_top r θ hθ hθr + q hq + obtain ⟨F, hFf, hF⟩ := hext _ hf + have hFK := (Rd.memKMethod_ofMap_toL2_iff hθ hθ' hq hθr F).2 + (hF.trans_lt (ENNReal.mul_lt_top hC.lt_top hf)) + have hae := (Rd.indicatorLp_eq_iff_ae_eq_restrict (Rd.BesovDomain.measurableSet (range I))).1 hFf + rw [← A.chartLiftLp_eq_of_ae_eq_on Rd.two_ne_top k + (((ae_restrict_iff' (Rd.BesovDomain.measurableSet (range I))).1 hae).mono + fun y hy hy' => hy (A.liftCarrier_subset_range k hy'.1))] + exact A.memKMethod_chartLiftLp hFK k + +/-- **The chart couple by the pieces**: for `0 < θ < 1`, `1 ≤ q ≤ ∞`, every order `r ≥ 1` and +every `f ∈ L_2(μ)`, `f ∈ (L_2(μ), H^1_A(M))_{θ,q}` iff every piece `P_k f` has a finite intrinsic +quasi-norm `N_{Ω_I}(P_k f)` with moduli of order `r`. +`⇒` is `Manifold.BesovAtlas.modNormOn_pieceLp_lt_top_of_memKMethod`; for `⇐`, +`f = ∑_k L_k P_k f` (`Manifold.BesovAtlas.sum_chartLiftLp_pieceLp`), each term lies in the +interpolation space (`Manifold.BesovAtlas.memKMethod_chartLiftLp_pieceLp`), which is a linear +subspace (`InterpCouple.kMethodSpace`). -/ +theorem memKMethod_chartSobolev_iff (hθ : 0 < θ) (hθ' : θ < 1) (hq : 1 ≤ q) {r : ℕ} + (hr : 1 ≤ r) (f : Lp ℂ 2 μ) : + (InterpCouple.ofMap ((A.chartSobolevEmbedding μ).restrictScalars ℝ)).MemKMethod θ q f ↔ + ∀ k, Rd.modNormOn (Rd.BesovDomain.measurableSet (range I)) r θ q + (A.pieceLp μ Rd.two_ne_top k f) < ⊤ := by + refine ⟨fun hf k => A.modNormOn_pieceLp_lt_top_of_memKMethod hθ hθ' hq hr hf k, fun hf => ?_⟩ + have hsum := (InterpCouple.kMethodSpace InterpCouple.isQuasiNormed_ofMap + InterpCouple.isHomogeneous_ofMap θ q).sum_mem fun k (_ : k ∈ Finset.univ) => + A.memKMethod_chartLiftLp_pieceLp hθ hθ' hq (hθ'.trans_le (Nat.one_le_cast.2 hr)) k (hf k) + rwa [A.sum_chartLiftLp_pieceLp] at hsum + +/-! ### Besov spaces by the eigenbasis of the chart form -/ + +/-- **Besov spaces on compact manifolds by eigenfunction expansions**: for a compact manifold +whose model range is a Besov domain in dimension `n ≥ 1`, with a smooth measure `μ` and a Besov +atlas `A`, for `0 < θ < 1`, `1 ≤ q ≤ ∞` and every `f ∈ L_2(μ)`, `f` lies in the approximation +space `A^θ_q` of the eigenbasis of the chart form iff `f ∈ B^θ_{2,q}(M)`. The approximation space +is `(L_2(μ), H^1_A(M))_{θ,q}` (`CompactDenseEmbedding.memKMethod_iff_memApprox`), described by +the pieces (`Manifold.BesovAtlas.memKMethod_chartSobolev_iff` with `r = 1`), and so is +`B^θ_{2,q}(M)` (`Manifold.BesovAtlas.memBesov_iff_forall_modNormOn_lt_top`, +`Manifold.memBesov_iff`). -/ +theorem memApprox_chartScheme_iff [T2Space M] (hθ : 0 < θ) (hθ' : θ < 1) (hq : 1 ≤ q) + (f : Lp ℂ 2 μ) : + (A.chartScheme μ).toScheme.MemApprox θ q f ↔ Manifold.MemBesov I μ Rd.two_ne_top θ q f := by + rw [Manifold.memBesov_iff I μ Rd.two_ne_top A hθ hq, + A.memBesov_iff_forall_modNormOn_lt_top Rd.two_ne_top hθ (r := 1) (by exact_mod_cast hθ') hq, + ← A.memKMethod_chartSobolev_iff hθ hθ' hq le_rfl f] + exact ((A.chartCompactEmbedding μ).memKMethod_iff_memApprox hθ hθ' hq).symm + +/-- **`B^θ_{2,q}(M)` by dyadic blocks of the eigenfunction expansion**: for `0 < θ < 1`, +`1 ≤ q ≤ ∞` and every `f ∈ L_2(μ)`, `f ∈ B^θ_{2,q}(M)` iff +`‖P_1 f‖ + ‖(2^(kθ) ‖Δ_k f‖)_k‖_{ℓ_q} < ∞` for the dyadic blocks `Δ_k f` of the expansion of `f` +in the eigenbasis of the chart form (`Manifold.BesovAtlas.memApprox_chartScheme_iff`, +`SpectralScheme.memApprox_iff_blockNorm_lt_top`). -/ +theorem memBesov_iff_blockNorm_lt_top [T2Space M] (hθ : 0 < θ) (hθ' : θ < 1) (hq : 1 ≤ q) + (f : Lp ℂ 2 μ) : + Manifold.MemBesov I μ Rd.two_ne_top θ q f ↔ + (A.chartScheme μ).projectionScheme.blockNorm θ q f < ⊤ := by + rw [← A.memApprox_chartScheme_iff hθ hθ' hq, + (A.chartScheme μ).memApprox_iff_blockNorm_lt_top hθ hq] + +/-- **`B^θ_{2,2}(M)` by the eigenvalues of the chart form**: for `0 < θ < 1` and every +`f ∈ L_2(μ)`, `f ∈ B^θ_{2,2}(M)` iff `∑_i (1 + λ_i)^θ |⟨e_i, f⟩|² < ∞`, that is, the sequence +`((1 + λ_i)^(θ/2) ⟨e_i, f⟩)_i` lies in `ℓ_2` (`Manifold.BesovAtlas.memApprox_chartScheme_iff`, +`CompactDenseEmbedding.memApprox_two_iff` and `1 + λ_i = σ_i⁻²`). -/ +theorem memBesov_two_iff_chartEigenvalue [T2Space M] (hθ : 0 < θ) (hθ' : θ < 1) + (f : Lp ℂ 2 μ) : + Manifold.MemBesov I μ Rd.two_ne_top θ 2 f ↔ + Memℓp (fun i => (((1 + A.chartEigenvalue μ i) ^ (θ / 2) : ℝ) : ℂ) * + (A.chartScheme μ).basis.repr f i) 2 := by + have h : ∀ i, (1 + A.chartEigenvalue μ i) ^ (θ / 2) = + ((A.chartCompactEmbedding μ).singularValue i)⁻¹ ^ θ := fun i => by + rw [one_add_chartEigenvalue, ← Real.rpow_natCast, + ← Real.rpow_mul (inv_nonneg.2 ((A.chartCompactEmbedding μ).singularValue_pos i).le)] + congr 1 + push_cast + ring + rw [← A.memApprox_chartScheme_iff hθ hθ' one_le_two] + simp only [h] + exact (A.chartCompactEmbedding μ).memApprox_two_iff hθ _ + +end BesovAtlas + +/-- **The sphere by the chart eigenbasis**: for `n ≥ 1`, every Besov atlas `A` of the sphere +`S^n ⊆ ℝ^(n+1)`, a compact manifold without boundary modelled on `ℝ^n`, with its chart measure +`μ_A` (`Manifold.BesovAtlas.isSmoothMeasure_chartMeasure`), for `0 < θ < 1`, `1 ≤ q ≤ ∞` and every +`f ∈ L_2(μ_A)`, `f` lies in the approximation space `A^θ_q` of the eigenbasis of the chart form iff +`f ∈ B^θ_{2,q}(S^n)` (`Manifold.BesovAtlas.memApprox_chartScheme_iff`). -/ +theorem memApprox_chartScheme_sphere_iff {n : ℕ} [NeZero n] + (A : BesovAtlas (𝓡 n) (sphere (0 : EuclideanSpace ℝ (Fin (n + 1))) 1)) {θ : ℝ} {q : ℝ≥0∞} + (hθ : 0 < θ) (hθ' : θ < 1) (hq : 1 ≤ q) (f : Lp ℂ 2 A.chartMeasure) : + (A.chartScheme A.chartMeasure).toScheme.MemApprox θ q f ↔ + Manifold.MemBesov (𝓡 n) A.chartMeasure Rd.two_ne_top θ q f := + A.memApprox_chartScheme_iff hθ hθ' hq f + +end Manifold + +namespace Rd + +namespace SmoothDomain + +variable {n : ℕ} [NeZero n] {θ : ℝ} {q : ℝ≥0∞} + +/-- **Smooth domains by the chart eigenbasis**: for a bounded smooth domain `Ω ⊆ ℝ^n`, `n ≥ 1`, +and every Besov atlas `A` of the compact manifold with boundary `closure Ω` with the Lebesgue +measure, for `0 < θ < 1`, `1 ≤ q ≤ ∞`, every order `r ≥ 1` and every `f ∈ L_2(closure Ω)`, `f` +lies in the approximation space `A^θ_q` of the eigenbasis of the chart form iff +`‖f‖_{L_2(Ω)} + ‖(2^(kθ) ω_r(f, 2^(-k), Ω)_2)_k‖_{ℓ_q} < ∞` +(`Manifold.BesovAtlas.memApprox_chartScheme_iff`, +`Rd.SmoothDomain.memBesov_iff_modNormOn_lt_top`). -/ +theorem memApprox_chartScheme_iff_modNormOn (Ω : SmoothDomain n) + (A : Manifold.BesovAtlas (𝓡∂ n) (closure Ω.carrier)) (hθ : 0 < θ) (hθ' : θ < 1) (hq : 1 ≤ q) + {r : ℕ} (hr : 1 ≤ r) (f : Lp ℂ 2 Ω.volumeOn) : + (A.chartScheme Ω.volumeOn).toScheme.MemApprox θ q f ↔ + modNormOn Ω.measurableSet r θ q (Ω.extLp two_ne_top f) < ⊤ := + (A.memApprox_chartScheme_iff hθ hθ' hq f).trans + (memBesov_iff_modNormOn_lt_top two_ne_top hθ (hθ'.trans_le (Nat.one_le_cast.2 hr)) hq f) + +/-- **The closed ball by the chart eigenbasis**: for the ball `B(c, R) ⊆ ℝ^n`, `n ≥ 1`, and every +Besov atlas `A` of its closure with the Lebesgue measure, for `0 < θ < 1`, `1 ≤ q ≤ ∞`, every order +`r ≥ 1` and every `f`, `f` lies in the approximation space `A^θ_q` of the eigenbasis of the chart +form iff `‖f‖_{L_2(B)} + ‖(2^(kθ) ω_r(f, 2^(-k), B)_2)_k‖_{ℓ_q} < ∞` +(`Manifold.BesovAtlas.memApprox_chartScheme_iff`, `Rd.SmoothDomain.memBesov_ball_iff`). -/ +theorem memApprox_chartScheme_ball_iff (c : EuclideanSpace ℝ (Fin n)) (R : ℝ) + (A : Manifold.BesovAtlas (𝓡∂ n) (closure (SmoothDomain.ball c R).carrier)) (hθ : 0 < θ) + (hθ' : θ < 1) (hq : 1 ≤ q) {r : ℕ} (hr : 1 ≤ r) (f : Lp ℂ 2 (SmoothDomain.ball c R).volumeOn) : + (A.chartScheme (SmoothDomain.ball c R).volumeOn).toScheme.MemApprox θ q f ↔ + modNormOn (measurableSet_ball : MeasurableSet (ball c R)) r θ q + ((SmoothDomain.ball c R).extLp two_ne_top f) < ⊤ := + (A.memApprox_chartScheme_iff hθ hθ' hq f).trans + (memBesov_ball_iff c R two_ne_top hθ (hθ'.trans_le (Nat.one_le_cast.2 hr)) hq f) + +end SmoothDomain + +end Rd diff --git a/LeanPool/FunctionSpaces/Domains/Spectral/NeumannEigenbasis.lean b/LeanPool/FunctionSpaces/Domains/Spectral/NeumannEigenbasis.lean new file mode 100644 index 0000000000..aab0d2cd91 --- /dev/null +++ b/LeanPool/FunctionSpaces/Domains/Spectral/NeumannEigenbasis.lean @@ -0,0 +1,561 @@ +/- +Copyright (c) 2026 Mario Ullrich. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Mario Ullrich +-/ +module + +public import LeanPool.FunctionSpaces.Domains.Spectral.DirichletEigenbasis +public import LeanPool.FunctionSpaces.Domains.Sobolev.LipschitzDomainW1p + +/- +Modified for Lean Pool: module names and imports adapted. +-/ + +/-! +# The Neumann Laplacian on bounded Lipschitz domains + +Let `V` be a finite-dimensional real inner product space of dimension `n`, such as `ℝ^n`, with +Lebesgue measure and the orthonormal basis `b_k = Rd.gridBasis V k`, and `O ⊆ V` open. Inner +products are conjugate-linear in the first argument, as in Mathlib. + +* **The Neumann space** `Rd.neumannSpace O` is `W^1_2(O)` as the graph of the weak gradient: the + pairs `(f, g)` in `L_2(O) × L_2(O)^n` (`Rd.ValueGradientL2`) with `g_k = ∂_{b_k} f` weakly on + `O`. It is closed (`Rd.isClosed_neumannSpace`), carries the inner product + `⟨f, f'⟩_2 + ∑_k ⟨g_k, g'_k⟩_2` of the plain gradient (`Rd.inner_neumannSpace`), and its norm is + equivalent to the norm of the jets of `W^1_2(O)` (`Rd.neumannSpace.toJet`, + `Rd.neumannSpace.norm_toJet_le`, `Rd.neumannSpace.norm_le_norm_toJet`). +* **The Neumann embedding** `Rd.neumannEmbedding O : (f, g) ↦ f` is injective, has norm at most + `1`, and has dense range, since its range contains that of the Dirichlet embedding + (`Rd.range_dirichletEmbedding_le_range_neumannEmbedding`, through `Rd.restrictNeumann`). +* **Rellich's theorem**: on a bounded Lipschitz domain `Ω` in dimension `n ≥ 1`, every `(f, g)` in + the Neumann space has `f = u|_Ω` for some `u ∈ H^1(Ω)` with `‖u‖ ≤ C ‖(f, g)‖` + (`Rd.BoundedLipschitzDomain.exists_restrictionSpace_of_neumannSpace`), so the Neumann embedding + is compact (`Rd.BoundedLipschitzDomain.isCompactOperator_neumannEmbedding`). +* **The Neumann eigenbasis**: `Rd.BoundedLipschitzDomain.neumannScheme` is the spectral scheme of + this compact dense embedding, a Hilbert basis `(e_i)` of `L_2(Ω)` with levels `⌊√(1 + λ_i)⌋₊`, + where `λ_i = σ_i⁻² - 1 ≥ 0` is the Neumann eigenvalue. The eigenfunction `φ_i` with value `e_i` + satisfies `∑_k ⟨∂_k φ_i, g_k⟩_2 = λ_i ⟨φ_i, f⟩_2` for every `(f, g)` in the Neumann space + (`Rd.BoundedLipschitzDomain.neumannEigenfunction_weak`), the weak form of `-Δ φ_i = λ_i φ_i` with + `∂_ν φ_i = 0` on `∂Ω`; the constants give the eigenvalue `0` + (`Rd.BoundedLipschitzDomain.exists_neumannEigenvalue_eq_zero`). +* **`W^1_2(Ω)` as a spectral Sobolev space**: `f ∈ L_2(Ω)` lies in `W^1_2(Ω)` iff + `∑_i (1 + ⌊σ_i⁻¹⌋₊)² |⟨e_i, f⟩|² < ∞` + (`Rd.BoundedLipschitzDomain.exists_neumannEmbedding_eq_iff`), and the real interpolation spaces + `(L_2(Ω), W^1_2(Ω))_{θ,q}` are the approximation spaces of the Neumann scheme + (`Rd.BoundedLipschitzDomain.memKMethod_neumann_iff`, + `Rd.BoundedLipschitzDomain.memKMethod_neumann_iff_blockNorm_lt_top`). +-/ + +@[expose] public section + +open MeasureTheory Filter Topology TopologicalSpace Module Metric +open scoped ENNReal Real InnerProductSpace BesselPotentialSpace + +namespace Rd + +variable {V : Type*} [NormedAddCommGroup V] [InnerProductSpace ℝ V] [FiniteDimensional ℝ V] + [MeasurableSpace V] [BorelSpace V] + +/-! ### The graph space of the weak gradient -/ + +/-- **Values and gradients in `L_2(O)`**: the Hilbert space `L_2(O) × L_2(O)^n`, `n = dim V`, with +the inner product `⟨(f, g), (f', g')⟩ = ⟨f, f'⟩_2 + ∑_i ⟨g_i, g'_i⟩_2`; the pairs `(u, ∇u)` of +the Neumann space lie in it. -/ +abbrev ValueGradientL2 (O : Opens V) : Type _ := + WithLp 2 (Lp ℂ 2 (volume.restrict (O : Set V)) × + PiLp 2 (fun _ : Fin (finrank ℝ V) => Lp ℂ 2 (volume.restrict (O : Set V)))) + +/-- **The Neumann space** `W^1_2(O)` as the graph of the weak gradient: the pairs `(f, g)` in +`L_2(O) × L_2(O)^n` with `g_k = ∂_{b_k} f` weakly on `O` for the basis `b_k = Rd.gridBasis V k` +(the carrier of `Rd.weakSobolevJet 2 O`), with the inner product +`⟨f, f'⟩_2 + ∑_k ⟨g_k, g'_k⟩_2` of the plain gradient. -/ +noncomputable def neumannSpace (O : Opens V) : Submodule ℂ (ValueGradientL2 O) where + carrier := {u | ∀ i, HasWeakLineDeriv O (fun _ : Fin 1 => gridBasis V i) u.fst (u.snd i)} + zero_mem' := fun _ => + hasWeakLineDeriv_zero.congr_ae (Lp.coeFn_zero ..).symm (Lp.coeFn_zero ..).symm + add_mem' := fun hu hv i => + ((hu i).add (hv i)).congr_ae (Lp.coeFn_add ..).symm (Lp.coeFn_add ..).symm + smul_mem' := fun c _ hu i => + ((hu i).smul c).congr_ae (Lp.coeFn_smul ..).symm (Lp.coeFn_smul ..).symm + +variable {O : Opens V} + +/-- Membership in the Neumann space: `g_k = ∂_{b_k} f` weakly on `O` for every `k`. -/ +theorem mem_neumannSpace {u : ValueGradientL2 O} : + u ∈ neumannSpace O ↔ + ∀ i, HasWeakLineDeriv O (fun _ : Fin 1 => gridBasis V i) u.fst (u.snd i) := + Iff.rfl + +variable (O) in +/-- **The Neumann space is closed**: weak derivatives pass to limits in `L_2(O)` +(`Rd.HasWeakLineDeriv.of_tendsto`). -/ +theorem isClosed_neumannSpace : IsClosed (neumannSpace O : Set (ValueGradientL2 O)) := by + refine IsSeqClosed.isClosed fun {u u₀} hu hlim i => ?_ + have h1 : Tendsto (fun n => (u n).fst) atTop (𝓝 u₀.fst) := + ((WithLp.fstL 2 ℂ _ _).continuous.tendsto u₀).comp hlim + have h2 : Tendsto (fun n => (u n).snd i) atTop (𝓝 (u₀.snd i)) := + ((PiLp.continuous_apply 2 _ i).tendsto _).comp + (((WithLp.sndL 2 ℂ _ _).continuous.tendsto u₀).comp hlim) + exact HasWeakLineDeriv.of_tendsto one_le_two one_le_two (fun n => hu n i) (Lp.memLp _) + (Lp.memLp _) ((Lp.tendsto_Lp_iff_tendsto_eLpNorm' _ _).1 h1) + ((Lp.tendsto_Lp_iff_tendsto_eLpNorm' _ _).1 h2) + +/-- The Neumann space is a Hilbert space, as a closed subspace (`Rd.isClosed_neumannSpace`). -/ +instance completeSpace_neumannSpace : CompleteSpace (neumannSpace O) := + (isClosed_neumannSpace O).completeSpace_coe + +/-- **The inner product of the Neumann space**: `⟨u, w⟩ = ⟨f, f'⟩_2 + ∑_i ⟨g_i, g'_i⟩_2` for +`u = (f, g)` and `w = (f', g')`. -/ +theorem inner_neumannSpace (u w : neumannSpace O) : + ⟪u, w⟫_ℂ = ⟪(u : ValueGradientL2 O).fst, (w : ValueGradientL2 O).fst⟫_ℂ + + ∑ i, ⟪(u : ValueGradientL2 O).snd i, (w : ValueGradientL2 O).snd i⟫_ℂ := by + rw [Submodule.coe_inner, WithLp.prod_inner_apply, PiLp.inner_apply] + rfl + +/-- **The norm of `L_2(O) × L_2(O)^n`**: `‖(f, g)‖² = ‖f‖_2² + ∑_i ‖g_i‖_2²`. -/ +theorem ValueGradientL2.sq_norm_eq (u : ValueGradientL2 O) : + ‖u‖ ^ 2 = ‖u.fst‖ ^ 2 + ∑ i, ‖u.snd i‖ ^ 2 := by + rw [WithLp.prod_norm_sq_eq_of_L2, PiLp.norm_sq_eq_of_L2] + +/-- `‖(f, g)‖ ≤ ‖f‖_2 + ∑_i ‖g_i‖_2` in `L_2(O) × L_2(O)^n`, from +`Rd.ValueGradientL2.sq_norm_eq`. -/ +theorem ValueGradientL2.norm_le_norm_fst_add_sum (u : ValueGradientL2 O) : + ‖u‖ ≤ ‖u.fst‖ + ∑ i, ‖u.snd i‖ := by + have hs := Finset.sum_sq_le_sq_sum_of_nonneg (s := Finset.univ) + fun i _ => norm_nonneg (u.snd i) + have h0 : 0 ≤ ∑ i, ‖u.snd i‖ := Finset.sum_nonneg fun i _ => norm_nonneg _ + refine (pow_le_pow_iff_left₀ (norm_nonneg _) (by positivity) two_ne_zero).1 ?_ + rw [ValueGradientL2.sq_norm_eq] + nlinarith [norm_nonneg u.fst] + +/-- `‖f‖_2 + ∑_i ‖g_i‖_2 ≤ (n + 1) ‖(f, g)‖` in `L_2(O) × L_2(O)^n`, `n = dim V`, since each +coordinate has norm at most `‖(f, g)‖` (Mathlib's `WithLp.norm_fst_le`, `WithLp.norm_snd_le`, +`PiLp.norm_apply_le`). -/ +theorem ValueGradientL2.norm_fst_add_sum_le (u : ValueGradientL2 O) : + ‖u.fst‖ + ∑ i, ‖u.snd i‖ ≤ (finrank ℝ V + 1) * ‖u‖ := by + have h : ∑ i, ‖u.snd i‖ ≤ ∑ _i : Fin (finrank ℝ V), ‖u‖ := + Finset.sum_le_sum fun i _ => (PiLp.norm_apply_le _ i).trans (WithLp.norm_snd_le _ u) + rw [Finset.sum_const, Finset.card_univ, Fintype.card_fin, nsmul_eq_mul] at h + linarith [WithLp.norm_fst_le _ u] + +/-! ### The Neumann space and the jets of `W^1_2(O)` -/ + +/-- **The sup norm is at most the Hilbert norm**: `max(‖f‖_2, max_k ‖g_k‖_2) ≤ ‖(f, g)‖` for +`(f, g)` in `L_2(O) × L_2(O)^n`, since each coordinate has norm at most `‖(f, g)‖` (Mathlib's +`norm_prod_le_iff`, `pi_norm_le_iff_of_nonneg`, `WithLp.norm_fst_le`, `WithLp.norm_snd_le`, +`PiLp.norm_apply_le`). -/ +theorem ValueGradientL2.norm_pair_le (u : ValueGradientL2 O) : + ‖((u.fst, fun k => u.snd k) : Lp ℂ 2 (volume.restrict (O : Set V)) × + (Fin (finrank ℝ V) → Lp ℂ 2 (volume.restrict (O : Set V))))‖ ≤ ‖u‖ := + norm_prod_le_iff.2 ⟨WithLp.norm_fst_le _ u, (pi_norm_le_iff_of_nonneg (norm_nonneg _)).2 + fun k => (PiLp.norm_apply_le _ k).trans (WithLp.norm_snd_le _ u)⟩ + +variable (O) in +/-- **The Neumann space as jets**: `(f, g) ↦ (f, (g_k)_k)` from the Neumann space to the jets of +`W^1_2(O)` (`Rd.weakSobolevJet 2 O`, with the sup norm), a bounded linear operator of norm at most +`1` (`Rd.ValueGradientL2.norm_pair_le`). -/ +noncomputable def neumannSpace.toJet : neumannSpace O →L[ℂ] weakSobolevJet 2 O := + LinearMap.mkContinuous + { toFun := fun u => ⟨((u : ValueGradientL2 O).fst, fun k => (u : ValueGradientL2 O).snd k), + u.2⟩ + map_add' := fun _ _ => rfl + map_smul' := fun _ _ => rfl } + 1 fun u => by + rw [one_mul] + exact ValueGradientL2.norm_pair_le (u : ValueGradientL2 O) + +/-- The value of `toJet u` is the value of `u`. -/ +@[simp] +theorem neumannSpace.toJet_fst (u : neumannSpace O) : + (neumannSpace.toJet O u).1.1 = (u : ValueGradientL2 O).fst := + rfl + +/-- The derivatives of `toJet u` are those of `u`. -/ +@[simp] +theorem neumannSpace.toJet_snd (u : neumannSpace O) (i : Fin (finrank ℝ V)) : + (neumannSpace.toJet O u).1.2 i = (u : ValueGradientL2 O).snd i := + rfl + +/-- **The jet norm is at most the norm of the Neumann space**: `‖toJet u‖ ≤ ‖u‖` +(`Rd.ValueGradientL2.norm_pair_le`). -/ +theorem neumannSpace.norm_toJet_le (u : neumannSpace O) : ‖neumannSpace.toJet O u‖ ≤ ‖u‖ := + ValueGradientL2.norm_pair_le (u : ValueGradientL2 O) + +/-- **The two norms are equivalent**: `‖u‖ ≤ (n + 1) ‖toJet u‖`, the converse of +`Rd.neumannSpace.norm_toJet_le` (`Rd.ValueGradientL2.norm_le_norm_fst_add_sum`, +`Rd.norm_fst_add_sum_le`). -/ +theorem neumannSpace.norm_le_norm_toJet (u : neumannSpace O) : + ‖u‖ ≤ (finrank ℝ V + 1) * ‖neumannSpace.toJet O u‖ := by + have h := norm_fst_add_sum_le (neumannSpace.toJet O u).1 + rw [Fintype.card_fin] at h + exact (ValueGradientL2.norm_le_norm_fst_add_sum (u : ValueGradientL2 O)).trans h + +/-! ### The Neumann embedding -/ + +variable (O) in +/-- **The Neumann embedding** `(f, g) ↦ f` from the Neumann space to `L_2(O)`. -/ +noncomputable def neumannEmbedding : neumannSpace O →L[ℂ] Lp ℂ 2 (volume.restrict (O : Set V)) := + WithLp.fstL 2 ℂ _ _ ∘L (neumannSpace O).subtypeL + +/-- `neumannEmbedding O u` is the value `f` of `u = (f, g)`. -/ +theorem neumannEmbedding_apply (u : neumannSpace O) : + neumannEmbedding O u = (u : ValueGradientL2 O).fst := + rfl + +/-- The Neumann embedding has norm at most `1`. -/ +theorem norm_neumannEmbedding_le : ‖neumannEmbedding O‖ ≤ 1 := + ContinuousLinearMap.opNorm_le_bound _ zero_le_one fun u => by + rw [one_mul] + exact WithLp.norm_fst_le _ (u : ValueGradientL2 O) + +/-- **The Neumann embedding is injective**: the weak derivatives of `f` are determined by `f` +(`Rd.HasWeakLineDeriv.unique`). -/ +theorem neumannEmbedding_injective : Function.Injective (neumannEmbedding O) := by + intro u w h + have hs : ∀ i, (u : ValueGradientL2 O).snd i = (w : ValueGradientL2 O).snd i := fun i => by + have hw := w.2 i + rw [← (show (u : ValueGradientL2 O).fst = (w : ValueGradientL2 O).fst from h)] at hw + exact Lp.ext ((u.2 i).unique hw) + exact Subtype.ext (WithLp.ofLp_injective 2 (Prod.ext h (WithLp.ofLp_injective 2 (funext hs)))) + +variable (O) in +/-- **`H^1(V)` in `L_2(O) × L_2(O)^n`**: `U ↦ (ι U|_O, ((∂_{b_k} ι U)|_O)_k)`, a bounded linear +operator. -/ +noncomputable def toValueGradientL2 : H^{1}(V) →L[ℂ] ValueGradientL2 O := + (WithLp.prodContinuousLinearEquiv 2 ℂ _ _).symm.toContinuousLinearMap ∘L + ((LpToLpRestrictCLM V ℂ ℂ volume 2 (O : Set V) ∘L toL2).prod + ((PiLp.continuousLinearEquiv 2 ℂ _).symm.toContinuousLinearMap ∘L + ContinuousLinearMap.pi fun i => + LpToLpRestrictCLM V ℂ ℂ volume 2 (O : Set V) ∘L weakDerivL2 (gridBasis V i))) + +/-- The pair `(ι U|_O, ((∂_{b_k} ι U)|_O)_k)` lies in the Neumann space, since weak derivatives on +`V` restrict to `O` (`Rd.HasWeakLineDeriv.mono`). -/ +theorem toValueGradientL2_mem (U : H^{1}(V)) : toValueGradientL2 O U ∈ neumannSpace O := fun i => + ((hasWeakLineDeriv_weakDerivL2 (gridBasis V i) U).mono le_top).congr_ae + (LpToLpRestrictCLM_coeFn ℂ (O : Set V) _).symm (LpToLpRestrictCLM_coeFn ℂ (O : Set V) _).symm + +variable (O) in +/-- **`H^1(V)` in the Neumann space**: `U ↦ (ι U|_O, ((∂_{b_k} ι U)|_O)_k)`. -/ +noncomputable def restrictNeumann : H^{1}(V) →L[ℂ] neumannSpace O := + (toValueGradientL2 O).codRestrict (neumannSpace O) toValueGradientL2_mem + +/-- The value of `restrictNeumann O U` is the restriction to `O` of `ι U`. -/ +theorem neumannEmbedding_restrictNeumann (U : H^{1}(V)) : + neumannEmbedding O (restrictNeumann O U) = + LpToLpRestrictCLM V ℂ ℂ volume 2 (O : Set V) (toL2 U) := + rfl + +/-- **`H^1_0(O)` lies in the Neumann space**: every value `J u` of the Dirichlet embedding is a +value of the Neumann embedding, namely of `Rd.restrictNeumann O u`. -/ +theorem range_dirichletEmbedding_le_range_neumannEmbedding : + LinearMap.range (dirichletEmbedding O : + zeroBoundarySpace 1 O →ₗ[ℂ] Lp ℂ 2 (volume.restrict (O : Set V))) ≤ + LinearMap.range (neumannEmbedding O : + neumannSpace O →ₗ[ℂ] Lp ℂ 2 (volume.restrict (O : Set V))) := by + rintro _ ⟨u, rfl⟩ + exact ⟨restrictNeumann O ((u : RestrictionSpace 1 O) : H^{1}(V)), rfl⟩ + +/-- **The range of the Neumann embedding is dense**: its orthogonal complement lies in that of the +range of the Dirichlet embedding (`Rd.range_dirichletEmbedding_le_range_neumannEmbedding`), which +is trivial (`Rd.orthogonal_range_dirichletEmbedding`). -/ +theorem orthogonal_range_neumannEmbedding : + (LinearMap.range (neumannEmbedding O : + neumannSpace O →ₗ[ℂ] Lp ℂ 2 (volume.restrict (O : Set V))))ᗮ = ⊥ := + eq_bot_iff.2 ((Submodule.orthogonal_le range_dirichletEmbedding_le_range_neumannEmbedding).trans + orthogonal_range_dirichletEmbedding.le) + +/-- The Neumann embedding has dense range (`Rd.orthogonal_range_neumannEmbedding`). -/ +theorem denseRange_neumannEmbedding : DenseRange (neumannEmbedding O) := by + have h := Submodule.topologicalClosure_eq_top_iff.2 + (orthogonal_range_neumannEmbedding (O := O)) + rw [← Submodule.dense_iff_topologicalClosure_eq_top, LinearMap.coe_range] at h + exact h + +/-! ### The constant functions -/ + +namespace BoundedLipschitzDomain + +variable (Ω : BoundedLipschitzDomain V) + +/-- **The constant function `1` in the Neumann space**: the pair `(1, 0)`, since the weak +gradient of a constant vanishes (`Rd.hasWeakLineDeriv_const`); `1 ∈ L_2(Ω)` as `Ω` has finite +measure (`Rd.BoundedLipschitzDomain.isFiniteMeasure_volume_restrict`). -/ +noncomputable def constNeumann : neumannSpace Ω.toOpens := + ⟨WithLp.toLp 2 (Lp.const 2 (volume.restrict (Ω.toOpens : Set V)) (1 : ℂ), 0), fun i => + (hasWeakLineDeriv_const Ω.toOpens (gridBasis V i) 1).congr_ae + (Lp.coeFn_const ..).symm (Lp.coeFn_zero ..).symm⟩ + +/-- **The constant `1` has no gradient term**: `⟨(1, 0), w⟩ = ⟨1, f⟩_{L_2(Ω)}` for every +`w = (f, g)` in the Neumann space, the weak eigenvalue equation `⟨u, w⟩ = σ⁻² ⟨J u, J w⟩` with +`σ = 1`. -/ +theorem inner_constNeumann (w : neumannSpace Ω.toOpens) : + ⟪Ω.constNeumann, w⟫_ℂ = + ⟪neumannEmbedding Ω.toOpens Ω.constNeumann, neumannEmbedding Ω.toOpens w⟫_ℂ := by + have h0 : ∀ i, (Ω.constNeumann : ValueGradientL2 Ω.toOpens).snd i = 0 := fun _ => rfl + rw [inner_neumannSpace] + simp only [h0, inner_zero_left, Finset.sum_const_zero, add_zero] + rfl + +/-- **The constant `1` is a nonzero element of `L_2(Ω)`** for a nonempty bounded Lipschitz domain +`Ω`, as `Ω` has positive measure. -/ +theorem neumannEmbedding_constNeumann_ne_zero (hΩ : Ω.carrier.Nonempty) : + neumannEmbedding Ω.toOpens Ω.constNeumann ≠ 0 := by + intro h + have hμ : volume.restrict (Ω.toOpens : Set V) ≠ 0 := by + rw [Ne, Measure.restrict_eq_zero] + exact (Ω.isOpen.measure_pos volume hΩ).ne' + have : (ae (volume.restrict (Ω.toOpens : Set V))).NeBot := ae_neBot.2 hμ + have hc := Lp.coeFn_const 2 (volume.restrict (Ω.toOpens : Set V)) (1 : ℂ) + have h0 : Lp.const 2 (volume.restrict (Ω.toOpens : Set V)) (1 : ℂ) = 0 := h + rw [h0] at hc + obtain ⟨x, hx1, hx2⟩ := + (hc.and (Lp.coeFn_zero ℂ 2 (volume.restrict (Ω.toOpens : Set V)))).exists + exact one_ne_zero (hx1.symm.trans hx2) + +/-! ### Rellich's theorem for the Neumann space -/ + +variable [Nontrivial V] + +/-- **Every value of the Neumann space comes from `H^1(Ω)`**: for a bounded Lipschitz domain `Ω` +in dimension `n ≥ 1` and every `u = (f, g)` in the Neumann space, `f = u_R|_Ω` for some +`u_R ∈ H^1(Ω)`. The extension operator maps the jet of `u` to a jet `(F, G)` of `W^1_2(V)` with +`F = f` on `Ω` (`Rd.BoundedLipschitzDomain.memSobolev_sobolevExtensionL`, +`Rd.BoundedLipschitzDomain.sobolevExtensionL_fst_ae_eq`), and `u_R = F|_Ω`. -/ +theorem exists_restrictL2_eq_neumannEmbedding (u : neumannSpace Ω.toOpens) : + ∃ uR : RestrictionSpace 1 Ω.toOpens, + restrictL2 Ω.toOpens uR = neumannEmbedding Ω.toOpens u := by + have hF := Ω.memSobolev_sobolevExtensionL (neumannSpace.toJet Ω.toOpens u) + have hFf := Ω.sobolevExtensionL_fst_ae_eq (neumannSpace.toJet Ω.toOpens u) + set F := (Ω.sobolevExtensionL 2 (neumannSpace.toJet Ω.toOpens u)).1.1 + have hS := (memSobolev_one_iff F).1 hF + have hU : toL2 hS.toBesselPotentialSpace = F := + toL2_eq_of_toDistr_eq _ hS.toBesselPotentialSpace_toDistr.symm + refine ⟨restrictProj 1 Ω.toOpens hS.toBesselPotentialSpace, ?_⟩ + rw [restrictL2_restrictProj, hU] + exact Lp.ext ((LpToLpRestrictCLM_coeFn ℂ _ _).trans hFf) + +/-- **The Neumann space inside `H^1(Ω)`, with a bound**: for a bounded Lipschitz domain `Ω` in +dimension `n ≥ 1` there is a constant `C ≥ 0` such that every `u = (f, g)` in the Neumann space +has some `u_R ∈ H^1(Ω)` with `u_R|_Ω = f` and `‖u_R‖ ≤ C ‖u‖` +(`Rd.BoundedLipschitzDomain.exists_restrictL2_eq_neumannEmbedding`, and the bound of the quotient +norm of `H^1(Ω)` by the `W^1_2(Ω)` norm, `Rd.BoundedLipschitzDomain.exists_norm_le_restrictL2`). +As an element of `H^1(V)`, `u_R` is an extension of `f` to `V`. -/ +theorem exists_restrictionSpace_of_neumannSpace : + ∃ C : ℝ, 0 ≤ C ∧ ∀ u : neumannSpace Ω.toOpens, ∃ uR : RestrictionSpace 1 Ω.toOpens, + restrictL2 Ω.toOpens uR = neumannEmbedding Ω.toOpens u ∧ ‖uR‖ ≤ C * ‖u‖ := by + obtain ⟨C, hC⟩ := Ω.exists_norm_le_restrictL2 + refine ⟨max C 0 * (finrank ℝ V + 1), by positivity, fun u => ?_⟩ + obtain ⟨uR, huR⟩ := Ω.exists_restrictL2_eq_neumannEmbedding u + refine ⟨uR, huR, ?_⟩ + have hae : (toL2 (uR : H^{1}(V)) : V → ℂ) =ᵐ[volume.restrict (Ω.toOpens : Set V)] + neumannEmbedding Ω.toOpens u := by + rw [← huR, restrictL2_apply] + exact (LpToLpRestrictCLM_coeFn ℂ _ _).symm + have h := hC uR (fun i => (u : ValueGradientL2 Ω.toOpens).snd i) + fun i => (u.2 i).congr_ae hae.symm EventuallyEq.rfl + rw [huR, neumannEmbedding_apply] at h + have h2 := ValueGradientL2.norm_fst_add_sum_le (u : ValueGradientL2 Ω.toOpens) + have h0 : 0 ≤ ‖(u : ValueGradientL2 Ω.toOpens).fst‖ + + ∑ i, ‖(u : ValueGradientL2 Ω.toOpens).snd i‖ := by positivity + calc ‖uR‖ ≤ C * (‖(u : ValueGradientL2 Ω.toOpens).fst‖ + + ∑ i, ‖(u : ValueGradientL2 Ω.toOpens).snd i‖) := h + _ ≤ max C 0 * (‖(u : ValueGradientL2 Ω.toOpens).fst‖ + + ∑ i, ‖(u : ValueGradientL2 Ω.toOpens).snd i‖) := + mul_le_mul_of_nonneg_right (le_max_left _ _) h0 + _ ≤ max C 0 * ((finrank ℝ V + 1) * ‖u‖) := mul_le_mul_of_nonneg_left h2 (le_max_right _ _) + _ = max C 0 * (finrank ℝ V + 1) * ‖u‖ := by ring + +/-- **Rellich's theorem for the Neumann space**: for a bounded Lipschitz domain `Ω` in dimension +`n ≥ 1`, the Neumann embedding `W^1_2(Ω) → L_2(Ω)` is compact. The image of the unit ball lies in +the image of a ball of `H^1(Ω)` under `u ↦ u|_Ω` +(`Rd.BoundedLipschitzDomain.exists_restrictionSpace_of_neumannSpace`), which has compact closure +(`Rd.isCompactOperator_restrictL2`). -/ +theorem isCompactOperator_neumannEmbedding : IsCompactOperator (neumannEmbedding Ω.toOpens) := by + obtain ⟨C, hC, h⟩ := Ω.exists_restrictionSpace_of_neumannSpace + refine (isCompactOperator_iff_isCompact_closure_image_closedBall + (neumannEmbedding Ω.toOpens).toLinearMap zero_lt_one).2 ?_ + refine ((isCompactOperator_restrictL2 Ω.isBounded).isCompact_closure_image_closedBall + C).of_isClosed_subset isClosed_closure (closure_mono ?_) + rintro _ ⟨u, hu, rfl⟩ + obtain ⟨uR, h1, h2⟩ := h u + refine ⟨uR, mem_closedBall_zero_iff.2 (h2.trans ?_), h1⟩ + exact mul_le_of_le_one_right hC (mem_closedBall_zero_iff.1 hu) + +/-! ### The Neumann eigenbasis -/ + +/-- **`W^1_2(Ω) ↪ L_2(Ω)` as a compact dense embedding**, for every bounded Lipschitz domain `Ω` in +dimension `n ≥ 1` (`Rd.BoundedLipschitzDomain.isCompactOperator_neumannEmbedding`, +`Rd.neumannEmbedding_injective`, `Rd.denseRange_neumannEmbedding`). -/ +noncomputable def neumannCompactEmbedding : + CompactDenseEmbedding (neumannSpace Ω.toOpens) + (Lp ℂ 2 (volume.restrict (Ω.toOpens : Set V))) where + toCLM := neumannEmbedding Ω.toOpens + isCompact := Ω.isCompactOperator_neumannEmbedding + injective := neumannEmbedding_injective + denseRange := denseRange_neumannEmbedding + +/-- The embedding of `Rd.BoundedLipschitzDomain.neumannCompactEmbedding` is the Neumann +embedding. -/ +@[simp] +theorem neumannCompactEmbedding_toCLM : + Ω.neumannCompactEmbedding.toCLM = neumannEmbedding Ω.toOpens := + rfl + +/-- **The Neumann eigenbasis as a spectral scheme**: for a bounded Lipschitz domain `Ω` in +dimension `n ≥ 1`, the Hilbert basis `(e_i)` of `L_2(Ω)` of eigenvectors of `J J†`, `J` the Neumann +embedding, with the levels `⌊σ_i⁻¹⌋₊` of the singular values +(`CompactDenseEmbedding.spectralScheme`). With the plain gradient in the inner product of the +Neumann space, `σ_i⁻² = 1 + λ_i` for the Neumann eigenvalue `λ_i` +(`Rd.BoundedLipschitzDomain.one_add_neumannEigenvalue`), so the level is `⌊√(1 + λ_i)⌋₊` +(`Rd.BoundedLipschitzDomain.neumannScheme_level`). -/ +noncomputable def neumannScheme : + SpectralScheme Ω.neumannCompactEmbedding.index + (Lp ℂ 2 (volume.restrict (Ω.toOpens : Set V))) := + Ω.neumannCompactEmbedding.spectralScheme + +/-- The singular values of the Neumann embedding are at most `1` +(`Rd.norm_neumannEmbedding_le`). -/ +theorem singularValue_neumannCompactEmbedding_le_one (i : Ω.neumannCompactEmbedding.index) : + Ω.neumannCompactEmbedding.singularValue i ≤ 1 := + (Ω.neumannCompactEmbedding.singularValue_le_norm i).trans norm_neumannEmbedding_le + +/-- **The Neumann eigenvalue** `λ_i = σ_i⁻² - 1` of the index `i`, `σ_i` the singular value of the +Neumann embedding; `-Δ φ_i = λ_i φ_i` weakly with the natural boundary condition +(`Rd.BoundedLipschitzDomain.neumannEigenfunction_weak`). -/ +noncomputable def neumannEigenvalue (i : Ω.neumannCompactEmbedding.index) : ℝ := + (Ω.neumannCompactEmbedding.singularValue i)⁻¹ ^ 2 - 1 + +/-- The Neumann eigenvalues are nonnegative, since `σ_i ≤ 1` +(`Rd.BoundedLipschitzDomain.singularValue_neumannCompactEmbedding_le_one`). -/ +theorem neumannEigenvalue_nonneg (i : Ω.neumannCompactEmbedding.index) : + 0 ≤ Ω.neumannEigenvalue i := by + have h1 : 1 ≤ (Ω.neumannCompactEmbedding.singularValue i)⁻¹ := + one_le_inv_iff₀.2 ⟨Ω.neumannCompactEmbedding.singularValue_pos i, + Ω.singularValue_neumannCompactEmbedding_le_one i⟩ + have h2 : 1 ≤ (Ω.neumannCompactEmbedding.singularValue i)⁻¹ ^ 2 := one_le_pow₀ h1 + unfold neumannEigenvalue + linarith + +/-- `1 + λ_i = σ_i⁻²`. -/ +theorem one_add_neumannEigenvalue (i : Ω.neumannCompactEmbedding.index) : + 1 + Ω.neumannEigenvalue i = (Ω.neumannCompactEmbedding.singularValue i)⁻¹ ^ 2 := by + unfold neumannEigenvalue + ring + +/-- **The level of a Neumann eigenfunction** is `⌊√(1 + λ_i)⌋₊`. -/ +theorem neumannScheme_level (i : Ω.neumannCompactEmbedding.index) : + Ω.neumannScheme.level i = ⌊Real.sqrt (1 + Ω.neumannEigenvalue i)⌋₊ := by + rw [one_add_neumannEigenvalue, Real.sqrt_sq + (inv_nonneg.2 (Ω.neumannCompactEmbedding.singularValue_pos i).le)] + rfl + +/-- **The Neumann eigenfunction** `φ_i = σ_i⁻¹ v_i` in the Neumann space, `v_i` the singular basis +of the Neumann embedding; its value is the basis vector `e_i` of `L_2(Ω)` +(`Rd.BoundedLipschitzDomain.neumannEmbedding_neumannEigenfunction`). -/ +noncomputable def neumannEigenfunction (i : Ω.neumannCompactEmbedding.index) : + neumannSpace Ω.toOpens := + (((Ω.neumannCompactEmbedding.singularValue i)⁻¹ : ℝ) : ℂ) • + Ω.neumannCompactEmbedding.singularBasis i + +/-- **`φ_i = e_i` on `Ω`**: the Neumann embedding maps the eigenfunction `φ_i` to the basis vector +`e_i` of the Neumann scheme, since `J v_i = σ_i e_i` (`CompactDenseEmbedding.apply_singularBasis`). +-/ +theorem neumannEmbedding_neumannEigenfunction (i : Ω.neumannCompactEmbedding.index) : + neumannEmbedding Ω.toOpens (Ω.neumannEigenfunction i) = Ω.neumannScheme.basis i := by + have h := Ω.neumannCompactEmbedding.apply_singularBasis i + rw [neumannCompactEmbedding_toCLM] at h + rw [neumannEigenfunction, map_smul, h, smul_smul, ← Complex.ofReal_mul, + inv_mul_cancel₀ (Ω.neumannCompactEmbedding.singularValue_pos i).ne', Complex.ofReal_one, + one_smul] + rfl + +/-! ### The weak Neumann eigenvalue equation -/ + +/-- **The weak Neumann eigenvalue equation**: for a bounded Lipschitz domain `Ω` in dimension +`n ≥ 1`, every index `i` and every `w = (f, g)` in the Neumann space, the eigenfunction +`φ_i = (φ_i, ∇φ_i)` satisfies `∑_k ⟨∂_k φ_i, g_k⟩_{L_2(Ω)} = λ_i ⟨φ_i, f⟩_{L_2(Ω)}`, the weak +form of `-Δ φ_i = λ_i φ_i` in `Ω` with `∂_ν φ_i = 0` on `∂Ω`. It is the weak eigenvalue equation +`⟨v_i, w⟩ = σ_i⁻² ⟨J v_i, J w⟩` of the singular basis +(`CompactDenseEmbedding.inner_singularBasis`) with the inner product of the Neumann space +(`Rd.inner_neumannSpace`). -/ +theorem neumannEigenfunction_weak (i : Ω.neumannCompactEmbedding.index) + (w : neumannSpace Ω.toOpens) : + ∑ k, ⟪(Ω.neumannEigenfunction i : ValueGradientL2 Ω.toOpens).snd k, + (w : ValueGradientL2 Ω.toOpens).snd k⟫_ℂ = + (Ω.neumannEigenvalue i : ℂ) * + ⟪(Ω.neumannEigenfunction i : ValueGradientL2 Ω.toOpens).fst, + (w : ValueGradientL2 Ω.toOpens).fst⟫_ℂ := by + have hφ : ⟪Ω.neumannEigenfunction i, w⟫_ℂ = + (((Ω.neumannCompactEmbedding.singularValue i)⁻¹ ^ 2 : ℝ) : ℂ) * + ⟪neumannEmbedding Ω.toOpens (Ω.neumannEigenfunction i), + neumannEmbedding Ω.toOpens w⟫_ℂ := by + -- the scalar multiplication of the subspace matches `inner_smul_left` up to unfolding + -- instances, so the lemma is applied by unification instead of rewriting + refine (inner_smul_left (𝕜 := ℂ) (E := neumannSpace Ω.toOpens) + (Ω.neumannCompactEmbedding.singularBasis i) w _).trans ?_ + rw [neumannEigenfunction, map_smul, inner_smul_left, + Ω.neumannCompactEmbedding.inner_singularBasis i w, neumannCompactEmbedding_toCLM] + ring + rw [inner_neumannSpace, neumannEmbedding_apply, neumannEmbedding_apply] at hφ + unfold neumannEigenvalue + push_cast at hφ ⊢ + linear_combination hφ + +/-! ### The eigenvalue `0` -/ + +/-- **`0` is a Neumann eigenvalue**: for a nonempty bounded Lipschitz domain `Ω` in dimension +`n ≥ 1`, some index `i` has `λ_i = 0`. The constant function `1` satisfies +`⟨(1, 0), w⟩ = ⟨1, J w⟩_{L_2(Ω)}` (`Rd.BoundedLipschitzDomain.inner_constNeumann`), so some +singular value is `1` (`CompactDenseEmbedding.exists_singularValue_eq_one`). -/ +theorem exists_neumannEigenvalue_eq_zero (hΩ : Ω.carrier.Nonempty) : + ∃ i, Ω.neumannEigenvalue i = 0 := by + have hc0 : Ω.constNeumann ≠ 0 := fun h => + Ω.neumannEmbedding_constNeumann_ne_zero hΩ (by rw [h, map_zero]) + obtain ⟨i, hi⟩ := Ω.neumannCompactEmbedding.exists_singularValue_eq_one hc0 Ω.inner_constNeumann + exact ⟨i, by rw [neumannEigenvalue, hi]; norm_num⟩ + +/-! ### The Neumann space as a spectral Sobolev space -/ + +/-- **The Neumann space in the Neumann eigenbasis**: `f ∈ L_2(Ω)` is the value of some `w` in the +Neumann space, that is `f ∈ W^1_2(Ω)`, iff `∑_i (1 + ⌊σ_i⁻¹⌋₊)² |⟨e_i, f⟩|² < ∞`, the Sobolev +space of order `1` of the Neumann scheme (`CompactDenseEmbedding.range_eq_range_sobolevEmbed`, +`SpectralScheme.mem_range_sobolevEmbed_iff`). -/ +theorem exists_neumannEmbedding_eq_iff (f : Lp ℂ 2 (volume.restrict (Ω.toOpens : Set V))) : + (∃ w, neumannEmbedding Ω.toOpens w = f) ↔ + Memℓp (fun i => ((1 + Ω.neumannScheme.level i : ℕ) : ℂ) * + Ω.neumannScheme.basis.repr f i) 2 := by + -- unfolding the scheme first keeps the definitional unfolding in the rewrites cheap + unfold neumannScheme + have hw : ∀ i, ((Ω.neumannCompactEmbedding.spectralScheme.weight 1 i : ℝ) : ℂ) = + ((1 + Ω.neumannCompactEmbedding.spectralScheme.level i : ℕ) : ℂ) := fun i => by + simp [SpectralScheme.weight] + refine ((Set.ext_iff.1 Ω.neumannCompactEmbedding.range_eq_range_sobolevEmbed f).trans + (Ω.neumannCompactEmbedding.spectralScheme.mem_range_sobolevEmbed_iff 1 zero_le_one f)).trans + ?_ + simp only [hw] + +/-- **The interpolation spaces between `L_2(Ω)` and `W^1_2(Ω)`**: for a bounded Lipschitz domain +`Ω` in dimension `n ≥ 1`, `0 < θ < 1` and `1 ≤ q ≤ ∞`, `(L_2(Ω), W^1_2(Ω))_{θ,q}` is the +approximation space `A^θ_q` of the Neumann scheme +(`CompactDenseEmbedding.memKMethod_iff_memApprox`). -/ +theorem memKMethod_neumann_iff {θ : ℝ} {q : ℝ≥0∞} (hθ : 0 < θ) (hθ' : θ < 1) (hq : 1 ≤ q) + {f : Lp ℂ 2 (volume.restrict (Ω.toOpens : Set V))} : + (InterpCouple.ofMap ((neumannEmbedding Ω.toOpens).restrictScalars ℝ)).MemKMethod θ q f ↔ + Ω.neumannScheme.toScheme.MemApprox θ q f := + Ω.neumannCompactEmbedding.memKMethod_iff_memApprox hθ hθ' hq + +/-- **The interpolation spaces between `L_2(Ω)` and `W^1_2(Ω)` by dyadic blocks**: for a bounded +Lipschitz domain `Ω` in dimension `n ≥ 1`, `0 < θ < 1` and `1 ≤ q ≤ ∞`, +`f ∈ (L_2(Ω), W^1_2(Ω))_{θ,q}` iff the dyadic blocks of the expansion of `f` in the Neumann +eigenbasis have finite `B^θ_{2,q}` norm (`Rd.BoundedLipschitzDomain.memKMethod_neumann_iff`, +`SpectralScheme.memApprox_iff_blockNorm_lt_top`). -/ +theorem memKMethod_neumann_iff_blockNorm_lt_top {θ : ℝ} {q : ℝ≥0∞} (hθ : 0 < θ) (hθ' : θ < 1) + (hq : 1 ≤ q) {f : Lp ℂ 2 (volume.restrict (Ω.toOpens : Set V))} : + (InterpCouple.ofMap ((neumannEmbedding Ω.toOpens).restrictScalars ℝ)).MemKMethod θ q f ↔ + Ω.neumannScheme.projectionScheme.blockNorm θ q f < ∞ := by + rw [Ω.memKMethod_neumann_iff hθ hθ' hq, Ω.neumannScheme.memApprox_iff_blockNorm_lt_top hθ hq] + +end BoundedLipschitzDomain + +end Rd diff --git a/LeanPool/FunctionSpaces/Domains/Spectral/SpectralBesov.lean b/LeanPool/FunctionSpaces/Domains/Spectral/SpectralBesov.lean new file mode 100644 index 0000000000..fd5d350e24 --- /dev/null +++ b/LeanPool/FunctionSpaces/Domains/Spectral/SpectralBesov.lean @@ -0,0 +1,365 @@ +/- +Copyright (c) 2026 Mario Ullrich. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Mario Ullrich +-/ +module + +public import LeanPool.FunctionSpaces.Domains.Spectral.NeumannEigenbasis +public import LeanPool.FunctionSpaces.Domains.Lipschitz.BoundedLipschitz +public import LeanPool.FunctionSpaces.Rd.Interpolation.BesselPotentialInterpolation +public import LeanPool.FunctionSpaces.Rd.Differences.BesovDifferences + +/- +Modified for Lean Pool: module names and imports adapted. +-/ + +/-! +# Besov spaces on domains by eigenfunction expansions + +Let `V` be a finite-dimensional real inner product space of dimension `n`, such as `ℝ^n`, with +Lebesgue measure, `0 < θ < 1` and `1 ≤ q ≤ ∞`. On a bounded Lipschitz domain `Ω` in dimension +`n ≥ 1`, the Besov space `B^θ_{2,q}(Ω)` of intrinsic moduli of smoothness is the approximation +space `A^θ_q` of the Neumann eigenbasis; on every bounded open set the Dirichlet eigenbasis gives +one inclusion. + +* **The modulus on `Ω` by the K-functional** of `(L_2(Ω), W^1_2(Ω))`: + `ω_r(f, 2^(-k), Ω)_2 ≤ C K(2^(-k), f|_Ω)`, since every element of `W^1_2(Ω)` extends to + `H^1(V)` with a bound and `ω_r(ι U, 2^(-k))_2 ≤ 2^(r-1) 2π 2^(-k) ‖U‖` for `U ∈ H^1(V)` + (`Rd.lpModulus_toL2_le`, `Rd.BoundedLipschitzDomain.exists_lpModulusOn_le_kFunctional`); so the + intrinsic quasi-norm is at most `C` times the interpolation norm + (`Rd.BoundedLipschitzDomain.exists_modNormOn_le_interpNorm`). +* **The restriction** maps `(L_2(V), H^1(V))_{θ,q} = B^θ_{2,q}(V)` into + `(L_2(Ω), W^1_2(Ω))_{θ,q}` (`Rd.memKMethod_neumann_restrict_of_memKMethod`), and the Besov + extension theorem extends `f|_Ω` to `V`. +* **The main theorem** (`Rd.BoundedLipschitzDomain.memApprox_neumannScheme_iff`): for every order + `r ≥ 1`, `f|_Ω` lies in the approximation space `A^θ_q` of the Neumann scheme iff + `‖f‖_{L_2(Ω)} + ‖(2^(kθ) ω_r(f, 2^(-k), Ω)_2)_k‖_{ℓ_q} < ∞`; equivalently the dyadic blocks of + the Neumann expansion of `f|_Ω` have finite `B^θ_{2,q}` norm + (`Rd.BoundedLipschitzDomain.modNormOn_lt_top_iff_blockNorm_lt_top`), and for `q = 2`, + `∑_i (1 + λ_i)^θ |⟨e_i, f|_Ω⟩|² < ∞` with the Neumann eigenvalues `λ_i` + (`Rd.BoundedLipschitzDomain.modNormOn_two_lt_top_iff`). +* **The Dirichlet inclusion**: elements of `H^1_0(Ω)` are the zero extensions of their values on + `Ω` (`Rd.indicatorExtendLp_dirichletEmbedding`), so the zero extension maps the approximation + space `A^θ_q` of the Dirichlet scheme into `B^θ_{2,q}(V)` + (`Rd.memApprox_bandScheme_extendByZero_of_memApprox_dirichletScheme`), and these functions + have finite intrinsic quasi-norm on `Ω` (`Rd.modNormOn_lt_top_of_memApprox_dirichletScheme`). +-/ + +@[expose] public section + +open MeasureTheory Filter Topology TopologicalSpace Module Metric +open scoped ENNReal Real InnerProductSpace BesselPotentialSpace SchwartzMap LineDeriv + +open ENNReal (lqNorm dyadicWeight) + +namespace Rd + +variable {V : Type*} [NormedAddCommGroup V] [InnerProductSpace ℝ V] [FiniteDimensional ℝ V] + [MeasurableSpace V] [BorelSpace V] + +/-! ### The modulus on a domain and the K-functional of the Neumann couple -/ + +namespace BoundedLipschitzDomain + +variable (Ω : BoundedLipschitzDomain V) [Nontrivial V] + +/-- **The intrinsic modulus by the K-functional of the Neumann couple**: for a bounded Lipschitz +domain `Ω` in dimension `n ≥ 1` and every order `r ≥ 1` there is a finite `C` such that +`ω_r(f, 2^(-k), Ω)_2 ≤ C K(2^(-k), f|_Ω)` for every `f ∈ L_2(V)` and every `k`, with the +K-functional of `(L_2(Ω), W^1_2(Ω))` for the Neumann embedding `J`. For `w` in the Neumann space +take `u ∈ H^1(Ω)` with `u|_Ω = J w` and `‖u‖ ≤ C₀ ‖w‖` +(`Rd.BoundedLipschitzDomain.exists_restrictionSpace_of_neumannSpace`); as an element of `H^1(V)` +it extends `J w`, so `Rd.lpModulusOn_le_add_lpModulus` and `Rd.lpModulus_toL2_le` give +`ω_r(f, 2^(-k), Ω)_2 ≤ 2^r ‖f|_Ω - J w‖ + 2^(r-1) 2π C₀ 2^(-k) ‖w‖`. -/ +theorem exists_lpModulusOn_le_kFunctional {r : ℕ} (hr : 1 ≤ r) : + ∃ C : ℝ≥0∞, C ≠ ∞ ∧ ∀ (f : Lp ℂ 2 (volume : Measure V)) (k : ℕ), + lpModulusOn 2 Ω.carrier r f k ≤ + C * ApproximationScheme.kFunctional ((neumannEmbedding Ω.toOpens).restrictScalars ℝ) + (dyadicWeight (-1) k) (LpToLpRestrictCLM V ℂ ℂ volume 2 (Ω.toOpens : Set V) f) := by + obtain ⟨C₀, hC₀, hN⟩ := Ω.exists_restrictionSpace_of_neumannSpace + have hM : max (2 ^ r) (2 ^ (r - 1) * ENNReal.ofReal (2 * π) * ENNReal.ofReal C₀) ≠ ∞ := + max_ne_top (by simp) (by finiteness) + have hM0 : max (2 ^ r) (2 ^ (r - 1) * ENNReal.ofReal (2 * π) * ENNReal.ofReal C₀) ≠ 0 := + (lt_max_of_lt_left (by positivity)).ne' + refine ⟨_, hM, fun f k => ?_⟩ + rw [ApproximationScheme.kFunctional, ENNReal.mul_iInf_of_ne hM0 hM] + refine le_iInf fun w => ?_ + obtain ⟨u, hu, hnorm⟩ := hN w + have h1 := lpModulusOn_le_add_lpModulus Ω.measurableSet r f (toL2 (u : H^{1}(V))) k + have h2 : ‖indicatorLp Ω.measurableSet (f - toL2 (u : H^{1}(V)))‖ₑ = + ‖LpToLpRestrictCLM V ℂ ℂ volume 2 (Ω.toOpens : Set V) f - + (neumannEmbedding Ω.toOpens).restrictScalars ℝ w‖ₑ := by + rw [enorm_indicatorLp_eq, map_sub] + change ‖LpToLpRestrictCLM V ℂ ℂ volume 2 (Ω.toOpens : Set V) f - restrictL2 Ω.toOpens u‖ₑ = _ + rw [hu] + rfl + have h3 : ‖(u : H^{1}(V))‖ₑ ≤ ENNReal.ofReal C₀ * ‖w‖ₑ := by + rw [← ofReal_norm, ← ofReal_norm, ← ENNReal.ofReal_mul hC₀] + exact ENNReal.ofReal_le_ofReal hnorm + have h4 := (lpModulus_toL2_le hr (u : H^{1}(V)) k).trans (mul_le_mul' le_rfl h3) + rw [h2] at h1 + refine (h1.trans (add_le_add le_rfl h4)).trans ?_ + rw [mul_add] + refine add_le_add (mul_le_mul' (le_max_left _ _) le_rfl) ?_ + calc 2 ^ (r - 1) * ENNReal.ofReal (2 * π) * dyadicWeight (-1) k * (ENNReal.ofReal C₀ * ‖w‖ₑ) + = 2 ^ (r - 1) * ENNReal.ofReal (2 * π) * ENNReal.ofReal C₀ * + (dyadicWeight (-1) k * ‖w‖ₑ) := by ring + _ ≤ _ := mul_le_mul' (le_max_right _ _) le_rfl + +/-- **The intrinsic quasi-norm by the interpolation norm of the Neumann couple**: for a bounded +Lipschitz domain `Ω` in dimension `n ≥ 1`, every order `r ≥ 1` and all `θ`, `q`, there is a finite +`C` such that every `f ∈ L_2(V)` satisfies +`N_Ω(f) ≤ C (‖f|_Ω‖_2 + ‖(2^(kθ) K(2^(-k), f|_Ω))_k‖_{ℓ_q})`, where `N_Ω` is the intrinsic Besov +quasi-norm with moduli of order `r` (`Rd.modNormOn`) and `K` the K-functional of +`(L_2(Ω), W^1_2(Ω))` (`Rd.BoundedLipschitzDomain.exists_lpModulusOn_le_kFunctional`). -/ +theorem exists_modNormOn_le_interpNorm {r : ℕ} (hr : 1 ≤ r) (θ : ℝ) (q : ℝ≥0∞) : + ∃ C : ℝ≥0∞, C ≠ ∞ ∧ ∀ f : Lp ℂ 2 (volume : Measure V), + modNormOn Ω.measurableSet r θ q f ≤ + C * ApproximationScheme.interpNorm ((neumannEmbedding Ω.toOpens).restrictScalars ℝ) θ 1 q + (LpToLpRestrictCLM V ℂ ℂ volume 2 (Ω.toOpens : Set V) f) := by + obtain ⟨C, hC, h⟩ := Ω.exists_lpModulusOn_le_kFunctional hr + refine ⟨max 1 C, max_ne_top ENNReal.one_ne_top hC, fun f => ?_⟩ + rw [modNormOn, ApproximationScheme.interpNorm, mul_add, enorm_indicatorLp_eq] + refine add_le_add (le_mul_of_one_le_left' (le_max_left _ _)) ?_ + rw [← ENNReal.lqNorm_const_mul] + refine ENNReal.lqNorm_mono fun k => ?_ + rw [ApproximationScheme.interpSeq, one_mul, mul_left_comm] + exact mul_le_mul' le_rfl ((h f k).trans (mul_le_mul' (le_max_right _ _) le_rfl)) + +/-- **The Neumann approximation spaces lie in the intrinsic Besov space**: for a bounded Lipschitz +domain `Ω` in dimension `n ≥ 1`, `0 < θ < 1`, `1 ≤ q ≤ ∞` and every order `r ≥ 1`, if `f|_Ω` +lies in the approximation space `A^θ_q` of the Neumann scheme, then the intrinsic quasi-norm +`N_Ω(f)` with moduli of order `r` is finite. `A^θ_q` is `(L_2(Ω), W^1_2(Ω))_{θ,q}` +(`Rd.BoundedLipschitzDomain.memKMethod_neumann_iff`), whose discrete norm on the grid `2^(-k)` +is finite (`InterpCouple.memKMethod_iff_interpNorm_lt_top`) and bounds `N_Ω(f)` +(`Rd.BoundedLipschitzDomain.exists_modNormOn_le_interpNorm`). -/ +theorem modNormOn_lt_top_of_memApprox_neumannScheme {θ : ℝ} {q : ℝ≥0∞} (hθ : 0 < θ) + (hθ' : θ < 1) (hq : 1 ≤ q) {r : ℕ} (hr : 1 ≤ r) {f : Lp ℂ 2 (volume : Measure V)} + (hf : Ω.neumannScheme.toScheme.MemApprox θ q + (LpToLpRestrictCLM V ℂ ℂ volume 2 (Ω.toOpens : Set V) f)) : + modNormOn Ω.measurableSet r θ q f < ∞ := by + have hK := (Ω.memKMethod_neumann_iff hθ hθ' hq).2 hf + have hI := (InterpCouple.memKMethod_iff_interpNorm_lt_top InterpCouple.isQuasiNormed_ofMap + (max_ne_top ENNReal.one_ne_top eNorm_ne_top) InterpCouple.norm0_ofMap_le hθ one_pos + (zero_lt_one.trans_le hq).ne').1 hK + rw [InterpCouple.interpNorm_ofMap] at hI + obtain ⟨C, hC, h⟩ := Ω.exists_modNormOn_le_interpNorm hr θ q + exact (h f).trans_lt (ENNReal.mul_lt_top hC.lt_top hI) + +end BoundedLipschitzDomain + +/-! ### Restriction of `(L_2(V), H^1(V))` to the Neumann couple -/ + +variable (O : Opens V) + +/-- **`H^1(V)` in the Neumann space, with norm at most `2π`**: for `U ∈ H^1(V)` and open `O`, +`‖(ι U|_O, ((∂_{b_k} ι U)|_O)_k)‖ ≤ 2π ‖U‖`, since +`‖ι U|_O‖_2² + ∑_k ‖(∂_{b_k} ι U)|_O‖_2² ≤ ‖ι U‖_2² + ∑_k ‖∂_{b_k} ι U‖_2² ≤ (2π)² ‖U‖²` +(`Rd.ValueGradientL2.sq_norm_eq`, `Rd.sq_norm_eq_of_hasWeakLineDeriv`). -/ +theorem norm_restrictNeumann_apply_le (U : H^{1}(V)) : + ‖restrictNeumann O U‖ ≤ 2 * π * ‖U‖ := by + have hU := sq_norm_eq_of_hasWeakLineDeriv (gridBasis V) U + (fun i => hasWeakLineDeriv_weakDerivL2 (gridBasis V i) U) + have hw : ‖restrictNeumann O U‖ ^ 2 = + ‖LpToLpRestrictCLM V ℂ ℂ volume 2 (O : Set V) (toL2 U)‖ ^ 2 + + ∑ i, ‖LpToLpRestrictCLM V ℂ ℂ volume 2 (O : Set V) (weakDerivL2 (gridBasis V i) U)‖ ^ 2 := + ValueGradientL2.sq_norm_eq (toValueGradientL2 O U) + have h1 : ‖restrictNeumann O U‖ ^ 2 ≤ + ‖toL2 U‖ ^ 2 + ∑ i, ‖weakDerivL2 (gridBasis V i) U‖ ^ 2 := by + rw [hw] + gcongr with i + · exact norm_Lp_toLp_restrict_le _ _ + · exact norm_Lp_toLp_restrict_le _ _ + have hπ : 1 ≤ (2 * π) ^ 2 := one_le_pow₀ (by linarith [Real.two_le_pi]) + have hs : 0 ≤ ∑ i, ‖weakDerivL2 (gridBasis V i) U‖ ^ 2 := + Finset.sum_nonneg fun i _ => sq_nonneg _ + have h2 : ‖toL2 U‖ ^ 2 + ∑ i, ‖weakDerivL2 (gridBasis V i) U‖ ^ 2 ≤ (2 * π * ‖U‖) ^ 2 := by + rw [mul_pow, hU, inv_pow, mul_add, ← mul_assoc, mul_inv_cancel₀ (by positivity), one_mul] + nlinarith [sq_nonneg ‖toL2 U‖] + exact (pow_le_pow_iff_left₀ (norm_nonneg _) (by positivity) two_ne_zero).1 (h1.trans h2) + +/-- **The restriction maps `(L_2(V), H^1(V))` into the Neumann couple**: for an open set `O`, if +`f ∈ L_2(V)` lies in the real interpolation space `(L_2(V), H^1(V))_{θ,q}` of the `L_2` norm and +the Bessel potential norm (`Rd.lpBesselPotentialCouple 1`), then `f|_O` lies in +`(L_2(O), W^1_2(O))_{θ,q}`. The couple is that of the embedding `H^1(V) → L_2(V)` +(`Rd.ofMap_toL2_eq_lpBesselPotentialCouple`), and the restriction maps `ι U` to the value of +`Rd.restrictNeumann O U`, so the interpolation property for compatible maps applies +(`ApproximationScheme.MemKMethod.map`). -/ +theorem memKMethod_neumann_restrict_of_memKMethod {θ : ℝ} {q : ℝ≥0∞} + {f : Lp ℂ 2 (volume : Measure V)} (hf : (lpBesselPotentialCouple (p := 2) 1).MemKMethod θ q f) : + (InterpCouple.ofMap ((neumannEmbedding O).restrictScalars ℝ)).MemKMethod θ q + (LpToLpRestrictCLM V ℂ ℂ volume 2 (O : Set V) f) := by + rw [← ofMap_toL2_eq_lpBesselPotentialCouple, InterpCouple.memKMethod_ofMap_iff] at hf + refine InterpCouple.memKMethod_ofMap_iff.2 (ApproximationScheme.MemKMethod.map + ((LpToLpRestrictCLM V ℂ ℂ volume 2 (O : Set V)).restrictScalars ℝ) + ((restrictNeumann O).restrictScalars ℝ) ?_ hf) + ext1 U + exact (neumannEmbedding_restrictNeumann U).symm + +namespace BoundedLipschitzDomain + +variable (Ω : BoundedLipschitzDomain V) [Nontrivial V] + +/-- **The intrinsic Besov space lies in the Neumann approximation spaces**: for a bounded +Lipschitz domain `Ω` in dimension `n ≥ 1`, `0 < θ < 1`, `1 ≤ q ≤ ∞` and every order `r > θ` +(for natural `r` and `θ > 0` this is `r ≥ 1`), if the intrinsic quasi-norm `N_Ω(f)` with moduli +of order `r` is finite, then `f|_Ω` lies in the approximation space `A^θ_q` of the Neumann +scheme. The Besov extension theorem gives `F` with `F = f` on `Ω` in `B^θ_{2,q}(V)` +(`Rd.BoundedLipschitzDomain.exists_memApprox_extension_iff`), that is in +`(L_2(V), H^1(V))_{θ,q}` (`Rd.memKMethod_lpBesselPotentialCouple_iff`); the restriction maps it +into `(L_2(Ω), W^1_2(Ω))_{θ,q}` (`Rd.memKMethod_neumann_restrict_of_memKMethod`), which is +`A^θ_q` (`Rd.BoundedLipschitzDomain.memKMethod_neumann_iff`). -/ +theorem memApprox_neumannScheme_of_modNormOn_lt_top {θ : ℝ} {q : ℝ≥0∞} (hθ : 0 < θ) + (hθ' : θ < 1) (hq : 1 ≤ q) {r : ℕ} (hθr : θ < r) {f : Lp ℂ 2 (volume : Measure V)} + (hf : modNormOn Ω.measurableSet r θ q f < ∞) : + Ω.neumannScheme.toScheme.MemApprox θ q + (LpToLpRestrictCLM V ℂ ℂ volume 2 (Ω.toOpens : Set V) f) := by + obtain ⟨F, hFf, hF⟩ := (Ω.exists_memApprox_extension_iff two_ne_top hθ hθr hq f).2 hf + have hK : (lpBesselPotentialCouple (p := 2) 1).MemKMethod θ q F := by + refine (memKMethod_lpBesselPotentialCouple_iff ENNReal.one_lt_two two_ne_top one_pos hθ hθ' + hq).2 ?_ + rwa [mul_one] + have hae := (indicatorLp_eq_iff_ae_eq_restrict Ω.measurableSet).1 hFf + have hR : LpToLpRestrictCLM V ℂ ℂ volume 2 (Ω.toOpens : Set V) F = + LpToLpRestrictCLM V ℂ ℂ volume 2 (Ω.toOpens : Set V) f := + Lp.ext ((LpToLpRestrictCLM_coeFn ℂ _ F).trans + (hae.trans (LpToLpRestrictCLM_coeFn ℂ _ f).symm)) + have h := memKMethod_neumann_restrict_of_memKMethod Ω.toOpens hK + rw [hR] at h + exact (Ω.memKMethod_neumann_iff hθ hθ' hq).1 h + +/-- **Besov spaces on Lipschitz domains by Neumann eigenfunction expansions**: for a bounded +Lipschitz domain `Ω` in dimension `n ≥ 1`, `0 < θ < 1`, `1 ≤ q ≤ ∞`, every order `r ≥ 1` and +every `f ∈ L_2(V)`, `f|_Ω` lies in the approximation space `A^θ_q` of the Neumann eigenbasis iff +`‖f‖_{L_2(Ω)} + ‖(2^(kθ) ω_r(f, 2^(-k), Ω)_2)_k‖_{ℓ_q} < ∞`, that is `f|_Ω ∈ B^θ_{2,q}(Ω)` +(`Rd.BoundedLipschitzDomain.modNormOn_lt_top_of_memApprox_neumannScheme`, +`Rd.BoundedLipschitzDomain.memApprox_neumannScheme_of_modNormOn_lt_top`). -/ +theorem memApprox_neumannScheme_iff {θ : ℝ} {q : ℝ≥0∞} (hθ : 0 < θ) (hθ' : θ < 1) (hq : 1 ≤ q) + {r : ℕ} (hr : 1 ≤ r) (f : Lp ℂ 2 (volume : Measure V)) : + Ω.neumannScheme.toScheme.MemApprox θ q + (LpToLpRestrictCLM V ℂ ℂ volume 2 (Ω.toOpens : Set V) f) ↔ + modNormOn Ω.measurableSet r θ q f < ∞ := + ⟨Ω.modNormOn_lt_top_of_memApprox_neumannScheme hθ hθ' hq hr, + Ω.memApprox_neumannScheme_of_modNormOn_lt_top hθ hθ' hq + (hθ'.trans_le (by exact_mod_cast hr))⟩ + +/-- **`B^θ_{2,q}(Ω)` by dyadic blocks of Neumann coefficients**: for a bounded Lipschitz domain +`Ω` in dimension `n ≥ 1`, `0 < θ < 1`, `1 ≤ q ≤ ∞`, every order `r ≥ 1` and every +`f ∈ L_2(V)`, the intrinsic quasi-norm `N_Ω(f)` is finite iff +`‖P_1 f‖ + ‖(2^(kθ) ‖Δ_k f‖)_k‖_{ℓ_q} < ∞` for the dyadic blocks `Δ_k f` of the expansion of +`f|_Ω` in the Neumann eigenbasis (`Rd.BoundedLipschitzDomain.memApprox_neumannScheme_iff`, +`SpectralScheme.memApprox_iff_blockNorm_lt_top`). -/ +theorem modNormOn_lt_top_iff_blockNorm_lt_top {θ : ℝ} {q : ℝ≥0∞} (hθ : 0 < θ) (hθ' : θ < 1) + (hq : 1 ≤ q) {r : ℕ} (hr : 1 ≤ r) (f : Lp ℂ 2 (volume : Measure V)) : + modNormOn Ω.measurableSet r θ q f < ∞ ↔ + Ω.neumannScheme.projectionScheme.blockNorm θ q + (LpToLpRestrictCLM V ℂ ℂ volume 2 (Ω.toOpens : Set V) f) < ∞ := by + rw [← Ω.memApprox_neumannScheme_iff hθ hθ' hq hr, + Ω.neumannScheme.memApprox_iff_blockNorm_lt_top hθ hq] + +/-- **`B^θ_{2,2}(Ω)` by Neumann eigenvalues**: for a bounded Lipschitz domain `Ω` in dimension +`n ≥ 1`, `0 < θ < 1`, every order `r ≥ 1` and every `f ∈ L_2(V)`, the intrinsic quasi-norm +`N_Ω(f)` with `q = 2` is finite iff `∑_i (1 + λ_i)^θ |⟨e_i, f|_Ω⟩|² < ∞`, that is, the sequence +`((1 + λ_i)^(θ/2) ⟨e_i, f|_Ω⟩)_i` lies in `ℓ_2`, with the Neumann eigenvalues `λ_i` and the +Neumann eigenbasis `(e_i)` +(`Rd.BoundedLipschitzDomain.memApprox_neumannScheme_iff`, `CompactDenseEmbedding.memApprox_two_iff` +and `1 + λ_i = σ_i⁻²`). -/ +theorem modNormOn_two_lt_top_iff {θ : ℝ} (hθ : 0 < θ) (hθ' : θ < 1) {r : ℕ} (hr : 1 ≤ r) + (f : Lp ℂ 2 (volume : Measure V)) : + modNormOn Ω.measurableSet r θ 2 f < ∞ ↔ + Memℓp (fun i => (((1 + Ω.neumannEigenvalue i) ^ (θ / 2) : ℝ) : ℂ) * + Ω.neumannScheme.basis.repr + (LpToLpRestrictCLM V ℂ ℂ volume 2 (Ω.toOpens : Set V) f) i) 2 := by + have h : ∀ i, (1 + Ω.neumannEigenvalue i) ^ (θ / 2) = + (Ω.neumannCompactEmbedding.singularValue i)⁻¹ ^ θ := fun i => by + rw [one_add_neumannEigenvalue, ← Real.rpow_natCast, + ← Real.rpow_mul (inv_nonneg.2 (Ω.neumannCompactEmbedding.singularValue_pos i).le)] + congr 1 + push_cast + ring + rw [← Ω.memApprox_neumannScheme_iff hθ hθ' one_le_two hr] + simp only [h] + exact Ω.neumannCompactEmbedding.memApprox_two_iff hθ _ + +end BoundedLipschitzDomain + +/-! ### The Dirichlet eigenbasis and the zero extension -/ + +section Dirichlet + +variable {Ω : Opens V} + +/-- **Elements of `H^1_0(Ω)` are the zero extensions of their values on `Ω`**: for +`w ∈ H^1_0(Ω)`, the zero extension of `J w ∈ L_2(Ω)` is the `L_2` function of `w ∈ H^1(V)`, +which vanishes outside `Ω` (`Rd.toL2_ae_eq_zero_of_mem_zeroBoundarySpace`, +`Rd.indicatorExtendLp_restrict_of_ae_eq_zero`). -/ +theorem indicatorExtendLp_dirichletEmbedding (w : zeroBoundarySpace 1 Ω) : + indicatorExtendLp Ω.isOpen.measurableSet subset_rfl (dirichletEmbedding Ω w) = + toL2 ((w : RestrictionSpace 1 Ω) : H^{1}(V)) := by + rw [dirichletEmbedding_apply, restrictL2_apply] + exact indicatorExtendLp_restrict_of_ae_eq_zero Ω.isOpen.measurableSet + (toL2_ae_eq_zero_of_mem_zeroBoundarySpace w) + +/-- **The zero extension maps the Dirichlet couple into `(L_2(V), H^1(V))`**: for an open set +`Ω`, if `g ∈ L_2(Ω)` lies in `(L_2(Ω), H^1_0(Ω))_{θ,q}`, then its zero extension lies in the real +interpolation space `(L_2(V), H^1(V))_{θ,q}` of the `L_2` norm and the Bessel potential norm +(`Rd.lpBesselPotentialCouple 1`). The couple is that of the embedding `H^1(V) → L_2(V)` +(`Rd.ofMap_toL2_eq_lpBesselPotentialCouple`), and the zero extension maps `J w` to `ι w` for +`w ∈ H^1_0(Ω)` (`Rd.indicatorExtendLp_dirichletEmbedding`), so the interpolation property for +compatible maps applies (`ApproximationScheme.MemKMethod.map`). -/ +theorem memKMethod_indicatorExtendLp_of_memKMethod_dirichlet {θ : ℝ} {q : ℝ≥0∞} + {g : Lp ℂ 2 (volume.restrict (Ω : Set V))} + (hg : (InterpCouple.ofMap ((dirichletEmbedding Ω).restrictScalars ℝ)).MemKMethod θ q g) : + (lpBesselPotentialCouple (p := 2) 1).MemKMethod θ q + (indicatorExtendLp Ω.isOpen.measurableSet subset_rfl g) := by + rw [← ofMap_toL2_eq_lpBesselPotentialCouple] + refine InterpCouple.memKMethod_ofMap_iff.2 (ApproximationScheme.MemKMethod.map + ((indicatorExtendLp (p := 2) (μ := volume) Ω.isOpen.measurableSet subset_rfl).restrictScalars ℝ) + ((((vanishOn 1 Ω)ᗮ.subtypeL).comp (zeroBoundarySpace 1 Ω).subtypeL).restrictScalars ℝ) + ?_ (InterpCouple.memKMethod_ofMap_iff.1 hg)) + ext1 w + exact indicatorExtendLp_dirichletEmbedding w + +variable [Nontrivial V] + +/-- **Dirichlet approximation spaces in `B^θ_{2,q}(V)`**: for a bounded open set `Ω` in +dimension `n ≥ 1`, `0 < θ < 1` and `1 ≤ q ≤ ∞`, if `g ∈ L_2(Ω)` lies in the approximation space +`A^θ_q` of the Dirichlet scheme, then its zero extension lies in the approximation space `A^θ_q` +of the band-limited functions, the Besov space `B^θ_{2,q}(V)`. `A^θ_q` is +`(L_2(Ω), H^1_0(Ω))_{θ,q}` (`Rd.memKMethod_dirichlet_iff`), the zero extension maps it into +`(L_2(V), H^1(V))_{θ,q}` (`Rd.memKMethod_indicatorExtendLp_of_memKMethod_dirichlet`), and this +is `B^θ_{2,q}(V)` (`Rd.memKMethod_lpBesselPotentialCouple_iff`). -/ +theorem memApprox_bandScheme_extendByZero_of_memApprox_dirichletScheme + (hΩ : Bornology.IsBounded (Ω : Set V)) {θ : ℝ} {q : ℝ≥0∞} (hθ : 0 < θ) (hθ' : θ < 1) + (hq : 1 ≤ q) {g : Lp ℂ 2 (volume.restrict (Ω : Set V))} + (hg : (dirichletScheme hΩ).toScheme.MemApprox θ q g) : + (bandScheme (V := V) two_ne_top).MemApprox θ q + (indicatorExtendLp Ω.isOpen.measurableSet subset_rfl g) := by + have h := (memKMethod_lpBesselPotentialCouple_iff ENNReal.one_lt_two two_ne_top one_pos hθ hθ' + hq).1 (memKMethod_indicatorExtendLp_of_memKMethod_dirichlet + ((memKMethod_dirichlet_iff hΩ hθ hθ' hq).2 hg)) + rwa [mul_one] at h + +/-- **Dirichlet approximation spaces lie in the intrinsic Besov space**: for a bounded open set +`Ω` in dimension `n ≥ 1`, `0 < θ < 1`, `1 ≤ q ≤ ∞` and every order `r > θ` (for natural `r` and +`θ > 0` this is `r ≥ 1`), if `f|_Ω` lies in the approximation space `A^θ_q` of the Dirichlet +scheme, then the intrinsic quasi-norm `N_Ω(f)` with moduli of order `r` is finite: the zero +extension of `f|_Ω` lies in `B^θ_{2,q}(V)` +(`Rd.memApprox_bandScheme_extendByZero_of_memApprox_dirichletScheme`, +`Rd.memApprox_bandScheme_iff_modulus`) and agrees with `f` on `Ω` +(`Rd.modNormOn_le_modNorm_of_indicatorLp`). -/ +theorem modNormOn_lt_top_of_memApprox_dirichletScheme (hΩ : Bornology.IsBounded (Ω : Set V)) + {θ : ℝ} {q : ℝ≥0∞} (hθ : 0 < θ) (hθ' : θ < 1) (hq : 1 ≤ q) {r : ℕ} (hθr : θ < r) + {f : Lp ℂ 2 (volume : Measure V)} + (hf : (dirichletScheme hΩ).toScheme.MemApprox θ q + (LpToLpRestrictCLM V ℂ ℂ volume 2 (Ω : Set V) f)) : + modNormOn Ω.isOpen.measurableSet r θ q f < ∞ := + (modNormOn_le_modNorm_of_indicatorLp Ω.isOpen.measurableSet r θ q + (indicatorLp_indicatorExtendLp_restrict Ω.isOpen.measurableSet f)).trans_lt + ((memApprox_bandScheme_iff_modulus two_ne_top hθ.le hθr hq _).1 + (memApprox_bandScheme_extendByZero_of_memApprox_dirichletScheme hΩ hθ hθ' hq hf)) + +end Dirichlet + +end Rd diff --git a/LeanPool/FunctionSpaces/Domains/Traces/BoundaryBesovNorm.lean b/LeanPool/FunctionSpaces/Domains/Traces/BoundaryBesovNorm.lean new file mode 100644 index 0000000000..de0ec5d695 --- /dev/null +++ b/LeanPool/FunctionSpaces/Domains/Traces/BoundaryBesovNorm.lean @@ -0,0 +1,371 @@ +/- +Copyright (c) 2026 Mario Ullrich. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Mario Ullrich +-/ +module + +public import LeanPool.FunctionSpaces.Domains.Traces.LipschitzBoundaryTrace + +/- +Modified for Lean Pool: module names and imports adapted. +-/ + +/-! +# Besov quasi-norms on the boundary of a bounded Lipschitz domain + +Let `Ω` be a bounded Lipschitz domain with boundary `Γ`, charts `γ_j : H_j → V` and a smooth +resolution of unity `(ψ_j)` on `Γ` (`Rd.BoundedLipschitzDomain.BoundaryPartition`). Let +`1 ≤ p < ∞`, `0 < s < 1` and `1 ≤ q ≤ ∞`. + +* **The quasi-norm** (`Rd.BoundedLipschitzDomain.boundaryBesovNorm`; Schneider–Vybíral, + Definition 3.3; Triebel 2002): `‖g‖_{B^s_{p,q}(Γ)}` is the sum over the charts of + `‖G_j‖_{L_p(H_j)} + ‖(2^(ks) ω_1(G_j, 2^(-k))_p)_k‖_{ℓ_q}` for the chart pieces + `G_j = (ψ_j g) ∘ γ_j` (`Rd.BoundedLipschitzDomain.boundaryBesovNorm_eq_sum`). It is finite + exactly on `B^s_{p,q}(Γ)` + (`Rd.BoundedLipschitzDomain.memBoundaryBesov_iff_boundaryBesovNorm_lt_top`), sees `g` only + almost everywhere on `Γ`, and it is subadditive and homogeneous. +* **The trace is bounded** (`Rd.BoundedLipschitzDomain.exists_boundaryBesovNorm_boundaryTrace_le`): + `‖Tr_Γ F‖_{B^s_{p,q}(Γ)} ≤ C (‖F‖_p + ‖(2^(k(s+1/p)) ω_L(F, 2^(-k))_p)_k‖_{ℓ_q})`, chart by chart + (`Rd.LipschitzGraph.exists_modNorm_trace_mulLp_le`). +* **The extension is bounded** (`Rd.BoundedLipschitzDomain.exists_boundaryTrace_eq_le`): every + `g ∈ B^s_{p,q}(Γ)` is `Tr_Γ F` almost everywhere on `Γ` for an `F` with + `‖F‖_p + ‖(2^(k(s+1/p)) ω_L(F, 2^(-k))_p)_k‖_{ℓ_q} ≤ C ‖g‖_{B^s_{p,q}(Γ)}`, namely + `F = ∑_j ζ_j E_j G_j` (`Rd.LipschitzGraph.exists_modNorm_mulLp_graphExtension_le`). +* **Independence of the resolution of unity** + (`Rd.BoundedLipschitzDomain.exists_boundaryBesovNorm_le_of_partition`): two resolutions + of unity give equivalent quasi-norms. + +The constants depend on `Ω`, `ψ`, `p`, `s`, `q` and `L` and are fixed before the functions; the +bounds follow Schneider–Vybíral, Theorem 4.11, for `p ≥ 1`. +-/ + +@[expose] public section + +open MeasureTheory Filter Metric +open scoped ENNReal + +open ENNReal (lqNorm dyadicWeight) + +namespace Rd + +/-! ### The extension in one chart -/ + +namespace LipschitzGraph + +variable {V : Type*} [NormedAddCommGroup V] [InnerProductSpace ℝ V] [FiniteDimensional ℝ V] + [MeasurableSpace V] [BorelSpace V] (Ω : LipschitzGraph V) {p : ℝ≥0∞} [Fact (1 ≤ p)] + +/-- **The localised extension is bounded**: for `1 ≤ p < ∞`, `0 < s < 1`, `1 ≤ q ≤ ∞`, `L ≥ 2` +and a smooth `ζ` with derivatives bounded by `M` up to order `L`, there is `K < ∞` with +`‖ζ E g‖_p + ‖(2^(k(s+1/p)) ω_L(ζ E g, 2^(-k))_p)_k‖_{ℓ_q} ≤ +K (‖g‖_p + ‖(2^(ks) ω_1(g, 2^(-k))_p)_k‖_{ℓ_q})` for every `g ∈ B^s_{p,q}(H)`, with +`K = M_ζ 2^(L-2) K_E`: the multiplier bound (`Rd.modNorm_mulLp_le`), the change of the order of the +differences (`Rd.modNorm_order_le_of_le`) and the bound of the extension +(`Rd.LipschitzGraph.modNorm_graphExtension_le`). -/ +theorem exists_modNorm_mulLp_graphExtension_le (hp : p ≠ ∞) {L : ℕ} (hL : 2 ≤ L) {s : ℝ} + (hs : 0 < s) (hs1 : s < 1) {q : ℝ≥0∞} (hq : 1 ≤ q) {ζ : V → ℂ} + (hζ : ContDiff ℝ ((⊤ : ℕ∞) : WithTop ℕ∞) ζ) {M : ℝ} + (hM : ∀ l ≤ L, ∀ x, ‖iteratedFDeriv ℝ l ζ x‖ ≤ M) : + ∃ K : ℝ≥0∞, K ≠ ∞ ∧ ∀ g : Lp ℂ p (volume : Measure Ω.hyperplane), + ‖g‖ₑ + lqNorm q (fun k => dyadicWeight s k * lpModulus p 1 g k) < ∞ → + ‖mulLp hζ.continuous (norm_le_of_iteratedFDeriv_le hM) (Ω.graphExtension hp 1 g)‖ₑ + + lqNorm q (fun k => dyadicWeight (s + 1 / p.toReal) k * lpModulus p L + (mulLp hζ.continuous (norm_le_of_iteratedFDeriv_le hM) (Ω.graphExtension hp 1 g)) k) ≤ + K * (‖g‖ₑ + lqNorm q (fun k => dyadicWeight s k * lpModulus p 1 g k)) := by + have hsL := add_one_div_toReal_lt hp hs1 hL + obtain ⟨K, hK, hle⟩ := Ω.modNorm_graphExtension_le hp hs hs1 hq + refine ⟨multiplierTotal (V := V) hp L (s + 1 / p.toReal) M * 2 ^ (L - 2) * K, + ENNReal.mul_ne_top (ENNReal.mul_ne_top (multiplierTotal_ne_top hp hsL M) (by simp)) hK, + fun g hg => ?_⟩ + calc _ ≤ multiplierTotal (V := V) hp L (s + 1 / p.toReal) M * + (‖Ω.graphExtension hp 1 g‖ₑ + lqNorm q (fun k => dyadicWeight (s + 1 / p.toReal) k * + lpModulus p L (Ω.graphExtension hp 1 g) k)) := modNorm_mulLp_le hp hζ hM hsL hq _ + _ ≤ multiplierTotal (V := V) hp L (s + 1 / p.toReal) M * + (2 ^ (L - 2) * (‖Ω.graphExtension hp 1 g‖ₑ + lqNorm q (fun k => + dyadicWeight (s + 1 / p.toReal) k * lpModulus p 2 (Ω.graphExtension hp 1 g) k))) := + mul_le_mul' le_rfl (modNorm_order_le_of_le hL _ q _) + _ ≤ multiplierTotal (V := V) hp L (s + 1 / p.toReal) M * (2 ^ (L - 2) * + (K * (‖g‖ₑ + lqNorm q (fun k => dyadicWeight s k * lpModulus p 1 g k)))) := + mul_le_mul' le_rfl (mul_le_mul' le_rfl (hle g hg)) + _ = _ := by ring + +end LipschitzGraph + +namespace BoundedLipschitzDomain + +variable {V : Type*} [NormedAddCommGroup V] [InnerProductSpace ℝ V] [FiniteDimensional ℝ V] + [MeasurableSpace V] [BorelSpace V] (Ω : BoundedLipschitzDomain V) {p : ℝ≥0∞} [Fact (1 ≤ p)] + +/-! ### The quasi-norm -/ + +variable (p) in +/-- **The Besov quasi-norm on the boundary** (Schneider–Vybíral, Definition 3.3; Triebel 2002, with +Lebesgue measure on the hyperplanes): for a resolution of unity `ψ`, +`‖g‖_{B^s_{p,q}(Γ)} = ∑_j (‖G_j‖_{L_p(H_j)} + ‖(2^(ks) ω_1(G_j, 2^(-k))_p)_k‖_{ℓ_q})` for the +chart pieces `G_j ∈ L_p(H_j)` with `G_j = (ψ_j g) ∘ γ_j` almost everywhere on `H_j`. Each infimum +runs over at most one element of `L_p(H_j)`, the class of the chart piece, and is `∞` if the chart +piece is not in `L_p(H_j)` (`Rd.BoundedLipschitzDomain.boundaryBesovNorm_eq_sum`). -/ +noncomputable def boundaryBesovNorm (ψ : Ω.BoundaryPartition) (s : ℝ) (q : ℝ≥0∞) (g : V → ℂ) : + ℝ≥0∞ := + ∑ j, ⨅ (G : Lp ℂ p (volume : Measure (Ω.graph j).hyperplane)) + (_ : (G : (Ω.graph j).hyperplane → ℂ) =ᵐ[volume] + fun x' => ψ.toComplex j ((Ω.graph j).graphMap x') * g ((Ω.graph j).graphMap x')), + (‖G‖ₑ + lqNorm q (fun k => dyadicWeight s k * lpModulus p 1 G k)) + +/-- **The quasi-norm is at most the sum for chart pieces**: for `G_j = (ψ_j g) ∘ γ_j` almost +everywhere on `H_j`, +`‖g‖_{B^s_{p,q}(Γ)} ≤ ∑_j (‖G_j‖_p + ‖(2^(ks) ω_1(G_j, 2^(-k))_p)_k‖_{ℓ_q})`. -/ +theorem boundaryBesovNorm_le_sum (ψ : Ω.BoundaryPartition) {s : ℝ} {q : ℝ≥0∞} {g : V → ℂ} + (G : ∀ j, Lp ℂ p (volume : Measure (Ω.graph j).hyperplane)) + (hG : ∀ j, (G j : (Ω.graph j).hyperplane → ℂ) =ᵐ[volume] + fun x' => ψ.toComplex j ((Ω.graph j).graphMap x') * g ((Ω.graph j).graphMap x')) : + Ω.boundaryBesovNorm p ψ s q g ≤ + ∑ j, (‖G j‖ₑ + lqNorm q (fun k => dyadicWeight s k * lpModulus p 1 (G j) k)) := + Finset.sum_le_sum fun j _ => iInf₂_le (G j) (hG j) + +/-- **The quasi-norm is the sum for chart pieces**: for `G_j = (ψ_j g) ∘ γ_j` almost everywhere on +`H_j`, `‖g‖_{B^s_{p,q}(Γ)} = ∑_j (‖G_j‖_p + ‖(2^(ks) ω_1(G_j, 2^(-k))_p)_k‖_{ℓ_q})`, since two +elements of `L_p(H_j)` that agree almost everywhere are equal. -/ +theorem boundaryBesovNorm_eq_sum (ψ : Ω.BoundaryPartition) {s : ℝ} {q : ℝ≥0∞} {g : V → ℂ} + (G : ∀ j, Lp ℂ p (volume : Measure (Ω.graph j).hyperplane)) + (hG : ∀ j, (G j : (Ω.graph j).hyperplane → ℂ) =ᵐ[volume] + fun x' => ψ.toComplex j ((Ω.graph j).graphMap x') * g ((Ω.graph j).graphMap x')) : + Ω.boundaryBesovNorm p ψ s q g = + ∑ j, (‖G j‖ₑ + lqNorm q (fun k => dyadicWeight s k * lpModulus p 1 (G j) k)) := by + refine le_antisymm (Ω.boundaryBesovNorm_le_sum ψ G hG) + (Finset.sum_le_sum fun j _ => le_iInf₂ fun G' hG' => ?_) + rw [Lp.ext ((hG j).trans hG'.symm)] + +/-- **The quasi-norm is finite exactly on `B^s_{p,q}(Γ)`**: `g ∈ B^s_{p,q}(Γ)` iff +`‖g‖_{B^s_{p,q}(Γ)} < ∞`. -/ +theorem memBoundaryBesov_iff_boundaryBesovNorm_lt_top (ψ : Ω.BoundaryPartition) {s : ℝ} + {q : ℝ≥0∞} (g : V → ℂ) : + Ω.MemBoundaryBesov p ψ s q g ↔ Ω.boundaryBesovNorm p ψ s q g < ∞ := by + constructor + · intro hg + choose G hG hGfin using hg + rw [Ω.boundaryBesovNorm_eq_sum ψ G hG] + exact ENNReal.sum_lt_top.2 fun j _ => hGfin j + · intro h j + obtain ⟨G, hG⟩ := iInf_lt_iff.1 (ENNReal.sum_lt_top.1 h j (Finset.mem_univ j)) + obtain ⟨hGg, hGfin⟩ := iInf_lt_iff.1 hG + exact ⟨G, hGg, hGfin⟩ + +/-- **The quasi-norm is infinite outside `B^s_{p,q}(Γ)`**: if `g ∉ B^s_{p,q}(Γ)`, then +`‖g‖_{B^s_{p,q}(Γ)} = ∞` +(`Rd.BoundedLipschitzDomain.memBoundaryBesov_iff_boundaryBesovNorm_lt_top`). -/ +theorem boundaryBesovNorm_eq_top_of_not_mem (ψ : Ω.BoundaryPartition) {s : ℝ} {q : ℝ≥0∞} + {g : V → ℂ} (hg : ¬ Ω.MemBoundaryBesov p ψ s q g) : Ω.boundaryBesovNorm p ψ s q g = ∞ := + not_lt_top_iff.1 fun h => hg ((Ω.memBoundaryBesov_iff_boundaryBesovNorm_lt_top ψ g).2 h) + +/-- **The quasi-norm sees `g` only almost everywhere on `Γ`**: if `g = h` almost everywhere on +`Γ`, then `‖g‖_{B^s_{p,q}(Γ)} = ‖h‖_{B^s_{p,q}(Γ)}`. -/ +theorem boundaryBesovNorm_congr (ψ : Ω.BoundaryPartition) {s : ℝ} {q : ℝ≥0∞} {g h : V → ℂ} + (hgh : g =ᶠ[Ω.aeBoundary] h) : + Ω.boundaryBesovNorm p ψ s q g = Ω.boundaryBesovNorm p ψ s q h := by + refine Finset.sum_congr rfl fun j _ => iInf_congr fun G => ?_ + have hj := chart_ae_eq_of_eventuallyEq ψ hgh j + exact iInf_congr_Prop ⟨fun hG => hG.trans hj, fun hG => hG.trans hj.symm⟩ fun _ => rfl + +/-- The quasi-norm of `0` vanishes. -/ +theorem boundaryBesovNorm_zero (ψ : Ω.BoundaryPartition) (s : ℝ) (q : ℝ≥0∞) : + Ω.boundaryBesovNorm p ψ s q 0 = 0 := by + rw [Ω.boundaryBesovNorm_eq_sum ψ (fun _ => 0) fun j => ?_] + · simp [lpModulus_zero, ENNReal.lqNorm_zero_right] + · exact (Lp.coeFn_zero ℂ p _).trans (Eventually.of_forall fun x' => by simp) + +/-- **The quasi-norm is subadditive on `B^s_{p,q}(Γ)`**: for `q ≥ 1` and +`g, h ∈ B^s_{p,q}(Γ)`, `‖g + h‖_{B^s_{p,q}(Γ)} ≤ ‖g‖_{B^s_{p,q}(Γ)} + ‖h‖_{B^s_{p,q}(Γ)}`; the +chart pieces of `g + h` are the sums of those of `g` and `h` (`Rd.modNorm_add_le`). -/ +theorem boundaryBesovNorm_add_le_of_mem (ψ : Ω.BoundaryPartition) {s : ℝ} {q : ℝ≥0∞} + (hq : 1 ≤ q) {g h : V → ℂ} (hg : Ω.MemBoundaryBesov p ψ s q g) + (hh : Ω.MemBoundaryBesov p ψ s q h) : + Ω.boundaryBesovNorm p ψ s q (g + h) ≤ + Ω.boundaryBesovNorm p ψ s q g + Ω.boundaryBesovNorm p ψ s q h := by + choose G hG _ using hg + choose H hH _ using hh + rw [Ω.boundaryBesovNorm_eq_sum ψ G hG, Ω.boundaryBesovNorm_eq_sum ψ H hH, + ← Finset.sum_add_distrib] + refine (Ω.boundaryBesovNorm_le_sum ψ (fun j => G j + H j) fun j => ?_).trans + (Finset.sum_le_sum fun j _ => modNorm_add_le (G j) (H j) 1 s hq) + filter_upwards [Lp.coeFn_add (G j) (H j), hG j, hH j] with x' h1 h2 h3 + rw [h1, Pi.add_apply, h2, h3, Pi.add_apply, mul_add] + +/-- **The quasi-norm is subadditive**: for `q ≥ 1` and all functions `g`, `h` on `V`, +`‖g + h‖_{B^s_{p,q}(Γ)} ≤ ‖g‖_{B^s_{p,q}(Γ)} + ‖h‖_{B^s_{p,q}(Γ)}`: for `g, h ∈ B^s_{p,q}(Γ)` by +`Rd.BoundedLipschitzDomain.boundaryBesovNorm_add_le_of_mem`; otherwise the right side is `∞` +(`Rd.BoundedLipschitzDomain.boundaryBesovNorm_eq_top_of_not_mem`). -/ +theorem boundaryBesovNorm_add_le (ψ : Ω.BoundaryPartition) {s : ℝ} {q : ℝ≥0∞} (hq : 1 ≤ q) + (g h : V → ℂ) : + Ω.boundaryBesovNorm p ψ s q (g + h) ≤ + Ω.boundaryBesovNorm p ψ s q g + Ω.boundaryBesovNorm p ψ s q h := by + by_cases hg : Ω.MemBoundaryBesov p ψ s q g + · by_cases hh : Ω.MemBoundaryBesov p ψ s q h + · exact Ω.boundaryBesovNorm_add_le_of_mem ψ hq hg hh + · rw [Ω.boundaryBesovNorm_eq_top_of_not_mem ψ hh, add_top] + exact le_top + · rw [Ω.boundaryBesovNorm_eq_top_of_not_mem ψ hg, top_add] + exact le_top + +variable {Ω} in +/-- `B^s_{p,q}(Γ)` is closed under addition, for `q ≥ 1` +(`Rd.BoundedLipschitzDomain.boundaryBesovNorm_add_le`). -/ +theorem MemBoundaryBesov.add {ψ : Ω.BoundaryPartition} {s : ℝ} {q : ℝ≥0∞} (hq : 1 ≤ q) + {g h : V → ℂ} (hg : Ω.MemBoundaryBesov p ψ s q g) (hh : Ω.MemBoundaryBesov p ψ s q h) : + Ω.MemBoundaryBesov p ψ s q (g + h) := + (Ω.memBoundaryBesov_iff_boundaryBesovNorm_lt_top ψ _).2 + ((Ω.boundaryBesovNorm_add_le ψ hq g h).trans_lt (ENNReal.add_lt_top.2 + ⟨(Ω.memBoundaryBesov_iff_boundaryBesovNorm_lt_top ψ g).1 hg, + (Ω.memBoundaryBesov_iff_boundaryBesovNorm_lt_top ψ h).1 hh⟩)) + +/-- **The quasi-norm is homogeneous on `B^s_{p,q}(Γ)`**: for `c ∈ ℂ` and +`g ∈ B^s_{p,q}(Γ)`, `‖c g‖_{B^s_{p,q}(Γ)} = |c| ‖g‖_{B^s_{p,q}(Γ)}`; the chart pieces of `c g` are +`c G_j` (`Rd.modNorm_const_smul`). -/ +theorem boundaryBesovNorm_const_smul_of_mem (ψ : Ω.BoundaryPartition) {s : ℝ} {q : ℝ≥0∞} + (c : ℂ) {g : V → ℂ} (hg : Ω.MemBoundaryBesov p ψ s q g) : + Ω.boundaryBesovNorm p ψ s q (c • g) = ‖c‖ₑ * Ω.boundaryBesovNorm p ψ s q g := by + choose G hG _ using hg + have hcG : ∀ j, ((c • G j : Lp ℂ p (volume : Measure (Ω.graph j).hyperplane)) : + (Ω.graph j).hyperplane → ℂ) =ᵐ[volume] fun x' => + ψ.toComplex j ((Ω.graph j).graphMap x') * (c • g) ((Ω.graph j).graphMap x') := fun j => by + filter_upwards [Lp.coeFn_smul c (G j), hG j] with x' h1 h2 + rw [h1, Pi.smul_apply, h2, Pi.smul_apply, smul_eq_mul, smul_eq_mul, mul_left_comm] + rw [Ω.boundaryBesovNorm_eq_sum ψ G hG, Finset.mul_sum, + Ω.boundaryBesovNorm_eq_sum ψ (fun j => c • G j) hcG] + exact Finset.sum_congr rfl fun j _ => modNorm_const_smul c (G j) 1 s q + +variable {Ω} in +/-- `B^s_{p,q}(Γ)` is closed under multiplication by constants +(`Rd.BoundedLipschitzDomain.boundaryBesovNorm_const_smul_of_mem`). -/ +theorem MemBoundaryBesov.const_smul {ψ : Ω.BoundaryPartition} {s : ℝ} {q : ℝ≥0∞} (c : ℂ) + {g : V → ℂ} (hg : Ω.MemBoundaryBesov p ψ s q g) : Ω.MemBoundaryBesov p ψ s q (c • g) := by + rw [memBoundaryBesov_iff_boundaryBesovNorm_lt_top, Ω.boundaryBesovNorm_const_smul_of_mem ψ c hg] + exact ENNReal.mul_lt_top eNorm_lt_top + ((Ω.memBoundaryBesov_iff_boundaryBesovNorm_lt_top ψ g).1 hg) + +/-- **The quasi-norm is homogeneous**: for `c ∈ ℂ` and every function `g` on `V`, +`‖c g‖_{B^s_{p,q}(Γ)} = |c| ‖g‖_{B^s_{p,q}(Γ)}`. For `c = 0` both sides vanish; for `c ≠ 0`, +`c g ∈ B^s_{p,q}(Γ)` iff `g ∈ B^s_{p,q}(Γ)`, since `g = c⁻¹ (c g)`, and outside the space both +sides are `∞` (`Rd.BoundedLipschitzDomain.boundaryBesovNorm_const_smul_of_mem`, +`Rd.BoundedLipschitzDomain.boundaryBesovNorm_eq_top_of_not_mem`). -/ +theorem boundaryBesovNorm_const_smul (ψ : Ω.BoundaryPartition) {s : ℝ} {q : ℝ≥0∞} (c : ℂ) + (g : V → ℂ) : + Ω.boundaryBesovNorm p ψ s q (c • g) = ‖c‖ₑ * Ω.boundaryBesovNorm p ψ s q g := by + by_cases hc : c = 0 + · rw [hc, zero_smul, eNorm_zero, zero_mul] + exact Ω.boundaryBesovNorm_zero ψ s q + by_cases hg : Ω.MemBoundaryBesov p ψ s q g + · exact Ω.boundaryBesovNorm_const_smul_of_mem ψ c hg + have hcg : ¬ Ω.MemBoundaryBesov p ψ s q (c • g) := fun h => hg (by + have h' := h.const_smul c⁻¹ + rwa [smul_smul, inv_mul_cancel₀ hc, one_smul] at h') + rw [Ω.boundaryBesovNorm_eq_top_of_not_mem ψ hcg, Ω.boundaryBesovNorm_eq_top_of_not_mem ψ hg, + ENNReal.mul_top (eNorm_ne_zero.2 hc)] + +/-- **Vanishing quasi-norm**: if `‖g‖_{B^s_{p,q}(Γ)} = 0`, then every chart piece +`(ψ_j g) ∘ γ_j` vanishes almost everywhere on `H_j`. -/ +theorem chart_ae_eq_zero_of_boundaryBesovNorm_eq_zero (ψ : Ω.BoundaryPartition) {s : ℝ} + {q : ℝ≥0∞} {g : V → ℂ} (h0 : Ω.boundaryBesovNorm p ψ s q g = 0) (j : Fin Ω.N) : + (fun x' => ψ.toComplex j ((Ω.graph j).graphMap x') * g ((Ω.graph j).graphMap x')) =ᵐ[volume] + 0 := by + have hg : Ω.MemBoundaryBesov p ψ s q g := + (Ω.memBoundaryBesov_iff_boundaryBesovNorm_lt_top ψ g).2 (h0 ▸ ENNReal.zero_lt_top) + choose G hG _ using hg + rw [Ω.boundaryBesovNorm_eq_sum ψ G hG, Finset.sum_eq_zero_iff] at h0 + have hG0 : G j = 0 := eNorm_eq_zero.1 (add_eq_zero.1 (h0 j (Finset.mem_univ j))).1 + refine (hG j).symm.trans ?_ + rw [hG0] + exact Lp.coeFn_zero ℂ p _ + +/-! ### The bounded trace and the bounded extension -/ + +/-- **The boundary trace is bounded** (following Schneider–Vybíral, Theorem 4.11, for `p ≥ 1`): for +`1 ≤ p < ∞`, `0 < s < 1`, `1 ≤ q ≤ ∞` and `s + 1/p < L` (so `L ≥ 1`), there is `C < ∞` with +`‖Tr_Γ F‖_{B^s_{p,q}(Γ)} ≤ C (‖F‖_p + ‖(2^(k(s+1/p)) ω_L(F, 2^(-k))_p)_k‖_{ℓ_q})` for every `F` +with a finite right side. The chart pieces of `Tr_Γ F` are the traces `Tr_j(ψ_j F)` +(`Rd.BoundedLipschitzDomain.trace_mulLp_ae_boundaryTrace`), bounded chart by chart +(`Rd.LipschitzGraph.exists_modNorm_trace_mulLp_le`); `C = ∑_j K_j`. -/ +theorem exists_boundaryBesovNorm_boundaryTrace_le (ψ : Ω.BoundaryPartition) (hp : p ≠ ∞) + {L : ℕ} {s : ℝ} (hs : 0 < s) (hs1 : s < 1) (hsL : s + 1 / p.toReal < L) + {q : ℝ≥0∞} (hq : 1 ≤ q) : + ∃ C : ℝ≥0∞, C ≠ ∞ ∧ ∀ F : Lp ℂ p (volume : Measure V), ‖F‖ₑ + lqNorm q (fun k => + dyadicWeight (s + 1 / p.toReal) k * lpModulus p L F k) < ∞ → + Ω.boundaryBesovNorm p ψ s q (Ω.boundaryTrace ψ hp L F) ≤ + C * (‖F‖ₑ + lqNorm q (fun k => dyadicWeight (s + 1 / p.toReal) k * lpModulus p L F k)) := by + have hL : 1 ≤ L := Nat.one_le_iff_ne_zero.2 + (Nat.cast_pos.1 ((show (0 : ℝ) < s + 1 / p.toReal by positivity).trans hsL)).ne' + choose M hM using fun j => exists_iteratedFDeriv_bound (ψ.contDiff_toComplex j) + (ψ.hasCompactSupport_toComplex j) L + choose K hK hle using fun j => + (Ω.graph j).exists_modNorm_trace_mulLp_le hp hs hs1 hsL hq (ψ.contDiff_toComplex j) (hM j) + refine ⟨∑ j, K j, ENNReal.sum_ne_top.2 fun j _ => hK j, fun F hF => ?_⟩ + rw [Finset.sum_mul] + exact (Ω.boundaryBesovNorm_le_sum ψ _ fun j => + Ω.trace_mulLp_ae_boundaryTrace ψ hp hL hs hsL hq hF j (hM j)).trans + (Finset.sum_le_sum fun j _ => hle j F hF) + +/-- **A bounded extension from the boundary** (following Schneider–Vybíral, Theorem 4.11, for +`p ≥ 1`): for `1 ≤ p < ∞`, `0 < s < 1`, `1 ≤ q ≤ ∞` and `L ≥ 2`, there is `C < ∞` such that every +`g ∈ B^s_{p,q}(Γ)` is `Tr_Γ F` almost everywhere on `Γ` for some `F` with +`‖F‖_p + ‖(2^(k(s+1/p)) ω_L(F, 2^(-k))_p)_k‖_{ℓ_q} ≤ C ‖g‖_{B^s_{p,q}(Γ)}`. The function is +`F = ∑_j ζ_j E_j G_j` for the chart pieces `G_j` and the cut-offs `ζ_j` +(`Rd.BoundedLipschitzDomain.boundaryTrace_extensionSum_eventuallyEq`), with the triangle inequality +`Rd.modNorm_finsetSum_le` and the chart bounds +`Rd.LipschitzGraph.exists_modNorm_mulLp_graphExtension_le`; `C = ∑_j K_j`. -/ +theorem exists_boundaryTrace_eq_le (ψ : Ω.BoundaryPartition) (hp : p ≠ ∞) {L : ℕ} (hL : 2 ≤ L) + {s : ℝ} (hs : 0 < s) (hs1 : s < 1) {q : ℝ≥0∞} (hq : 1 ≤ q) : + ∃ C : ℝ≥0∞, C ≠ ∞ ∧ ∀ g : V → ℂ, Ω.MemBoundaryBesov p ψ s q g → + ∃ F : Lp ℂ p (volume : Measure V), ‖F‖ₑ + lqNorm q (fun k => + dyadicWeight (s + 1 / p.toReal) k * lpModulus p L F k) ≤ + C * Ω.boundaryBesovNorm p ψ s q g ∧ + Ω.boundaryTrace ψ hp L F =ᶠ[Ω.aeBoundary] g := by + choose ζ hζs hζc hζB hζ1 using ψ.exists_cutoff + choose M hM using fun j => exists_iteratedFDeriv_bound (hζs j) (hζc j) L + choose K hK hle using fun j => + (Ω.graph j).exists_modNorm_mulLp_graphExtension_le hp hL hs hs1 hq (hζs j) (hM j) + refine ⟨∑ j, K j, ENNReal.sum_ne_top.2 fun j _ => hK j, fun g hg => ?_⟩ + choose G hG hGfin using hg + refine ⟨_, ?_, Ω.boundaryTrace_extensionSum_eventuallyEq ψ hp hL hs hs1 hq hζs hζB hζ1 hM G hG + hGfin⟩ + rw [Ω.boundaryBesovNorm_eq_sum ψ G hG, Finset.mul_sum] + refine (modNorm_finsetSum_le _ _ L _ hq).trans (Finset.sum_le_sum fun j _ => ?_) + exact (hle j (G j) (hGfin j)).trans + (mul_le_mul' (Finset.single_le_sum (fun _ _ => zero_le) (Finset.mem_univ j)) le_rfl) + +/-- **The quasi-norms of two resolutions of unity are equivalent**: for `1 ≤ p < ∞`, `0 < s < 1` +and `1 ≤ q ≤ ∞` and resolutions of unity `ψ`, `ψ'` there is `C < ∞` with +`‖g‖_{B^s_{p,q}(Γ), ψ'} ≤ C ‖g‖_{B^s_{p,q}(Γ), ψ}` for every `g`. For `g ∈ B^s_{p,q}(Γ)`, the +bounded extension for `ψ` (`Rd.BoundedLipschitzDomain.exists_boundaryTrace_eq_le`) gives `F` with +`Tr_Γ F = g`, the boundary traces of `ψ` and `ψ'` agree +(`Rd.BoundedLipschitzDomain.boundaryTrace_eventuallyEq`), and the trace bound for `ψ'` +(`Rd.BoundedLipschitzDomain.exists_boundaryBesovNorm_boundaryTrace_le`) finishes; otherwise the +right side is `∞`. -/ +theorem exists_boundaryBesovNorm_le_of_partition (ψ ψ' : Ω.BoundaryPartition) + (hp : p ≠ ∞) {s : ℝ} (hs : 0 < s) (hs1 : s < 1) {q : ℝ≥0∞} (hq : 1 ≤ q) : + ∃ C : ℝ≥0∞, C ≠ ∞ ∧ ∀ g : V → ℂ, + Ω.boundaryBesovNorm p ψ' s q g ≤ C * Ω.boundaryBesovNorm p ψ s q g := by + have hsL := add_one_div_toReal_lt hp hs1 (le_refl 2) + obtain ⟨C₁, hC₁, h₁⟩ := Ω.exists_boundaryTrace_eq_le ψ hp le_rfl hs hs1 hq + obtain ⟨C₂, hC₂, h₂⟩ := + Ω.exists_boundaryBesovNorm_boundaryTrace_le ψ' hp hs hs1 hsL hq + refine ⟨C₂ * C₁ + 1, ENNReal.add_ne_top.2 ⟨ENNReal.mul_ne_top hC₂ hC₁, ENNReal.one_ne_top⟩, + fun g => ?_⟩ + by_cases hg : Ω.MemBoundaryBesov p ψ s q g + · obtain ⟨F, hFle, hFg⟩ := h₁ g hg + have hF := hFle.trans_lt (ENNReal.mul_lt_top hC₁.lt_top + ((Ω.memBoundaryBesov_iff_boundaryBesovNorm_lt_top ψ g).1 hg)) + rw [← Ω.boundaryBesovNorm_congr ψ' + ((Ω.boundaryTrace_eventuallyEq ψ' ψ hp one_le_two hs hsL hq hF).trans hFg)] + calc _ ≤ C₂ * (‖F‖ₑ + lqNorm q (fun k => + dyadicWeight (s + 1 / (p.toReal)) k * lpModulus p 2 F k)) := h₂ F hF + _ ≤ C₂ * (C₁ * Ω.boundaryBesovNorm p ψ s q g) := mul_le_mul' le_rfl hFle + _ ≤ (C₂ * C₁ + 1) * Ω.boundaryBesovNorm p ψ s q g := by + rw [← mul_assoc] + exact mul_le_mul' le_self_add le_rfl + · rw [Ω.boundaryBesovNorm_eq_top_of_not_mem ψ hg, ENNReal.mul_top (by positivity)] + exact le_top + +end BoundedLipschitzDomain + +end Rd diff --git a/LeanPool/FunctionSpaces/Domains/Traces/BoundaryGagliardo.lean b/LeanPool/FunctionSpaces/Domains/Traces/BoundaryGagliardo.lean new file mode 100644 index 0000000000..5299fb8794 --- /dev/null +++ b/LeanPool/FunctionSpaces/Domains/Traces/BoundaryGagliardo.lean @@ -0,0 +1,942 @@ +/- +Copyright (c) 2026 Mario Ullrich. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Mario Ullrich +-/ +module + +public import LeanPool.FunctionSpaces.Domains.Traces.TraceSpaceNorm +public import LeanPool.FunctionSpaces.Rd.Differences.SobolevSlobodeckij + +/- +Modified for Lean Pool: module names and imports adapted. +-/ + +/-! +# The Sobolev–Slobodeckij norm on the boundary of a bounded Lipschitz domain + +Let `Ω` be a bounded Lipschitz domain in `V`, `dim V = n`, with boundary `Γ`, surface measure `σ`, +charts `γ_j : H_j → V` and a resolution of unity `(ψ_j)` on `Γ`. + +* **The Gagliardo form on `Γ`** (`Rd.BoundedLipschitzDomain.boundarySlobodeckijForm`; Gagliardo + 1957): `∫_Γ ∫_Γ |g(y) - g(x)|^p / |y - x|^(n-1+sp) dσ(y) dσ(x)`, chart-free. Double integrals + over a boundary ball are double integrals in the chart + (`Rd.BoundedLipschitzDomain.lintegral_lintegral_surfaceMeasure_of_support`). +* **The upper bound** (`Rd.BoundedLipschitzDomain.exists_boundarySlobodeckijForm_le`): for + `1 ≤ p < ∞` and `s > 0` the form is at most `C ‖g‖_{B^s_{p,p}(Γ)}^p` for the chart-wise norm + (`Rd.BoundedLipschitzDomain.boundaryBesovNorm`). The pieces `ψ_j g` are localised in the balls + `B_j`, and in the chart the Gagliardo form of `H_j` is bounded by the first-difference norm + (`Rd.slobodeckijForm_le`). +* **The lower bound** (`Rd.BoundedLipschitzDomain.exists_boundaryBesovNorm_rpow_le`): for + `0 < s < 1`, `‖g‖_{B^s_{p,p}(Γ)}^p ≤ C (‖g‖_{L_p(Γ)}^p + ∫_Γ ∫_Γ …)`. The Gagliardo form on + `H_j` of each chart piece `(ψ_j g) ∘ γ_j` is split into a part inside `B_j`, a part with the + Lipschitz differences of `ψ_j` and a tail + (`Rd.BoundedLipschitzDomain.slobodeckijForm_chartPiece_le`), and it bounds the first-difference + norm (`Rd.lqNorm_modulus_rpow_le_slobodeckijForm`). +* **Gagliardo's description of the boundary spaces**: for `g ∈ L_p(Γ)`, `g ∈ B^s_{p,p}(Γ)` iff + the form is finite + (`Rd.BoundedLipschitzDomain.memBoundaryBesov_iff_boundarySlobodeckijForm_lt_top`), so + `W^{s,p}(Γ) = B^s_{p,p}(Γ)`. For `p = 2`, `s = 1/2`, the norm of `H^{1/2}(Γ)` is equivalent to + `(‖τ t‖²_{L_2(Γ)} + ∫_Γ ∫_Γ |τ t(y) - τ t(x)|² / |y - x|^n dσ dσ)^(1/2)` + (`Rd.BoundedLipschitzDomain.exists_traceL2_norm_equiv_slobodeckij`), and the range of + `τ : H^{1/2}(Γ) → L_2(Γ)` is the set where the form is finite + (`Rd.BoundedLipschitzDomain.mem_range_traceL2_iff_slobodeckij`). + +The constants depend on `Ω`, `ψ`, `p` and `s` and are fixed before the functions. The results +hold in every dimension `n ≥ 1`; for `n = 1` the hyperplanes are points and `Γ` is finite. +-/ + +@[expose] public section + +open MeasureTheory Filter Metric Module Set +open scoped ENNReal + +open ENNReal (lqNorm dyadicWeight) + +namespace Rd + +/-! ### Gagliardo integrands and double integrals -/ + +section NormedGroup + +variable {E : Type*} [NormedAddCommGroup E] + +/-- **Points inside and outside two concentric balls are far apart**: for `y ∈ B(c, r)` and +`x ∉ B(c, R)`, `R - r ≤ |y - x|`, by the triangle inequality. -/ +theorem sub_le_norm_sub_of_mem_ball {c x y : E} {r R : ℝ} (hy : y ∈ ball c r) + (hx : x ∉ ball c R) : R - r ≤ ‖y - x‖ := by + rw [mem_ball] at hy hx + have h := dist_triangle x y c + rw [dist_eq_norm x y, norm_sub_rev] at h + linarith + +/-- **The Gagliardo integrand of a function supported in a ball**: if `f` vanishes outside +`B(c, r)` and `r ≤ R`, then for all `x, y`, `P > 0` and `a ≥ 0`, +`|f(y) - f(x)|^P / |y - x|^a ≤ 1_{B(c,R)²}(x, y) |f(y) - f(x)|^P / |y - x|^a + +|f(x)|^P / (R - r)^a + |f(y)|^P / (R - r)^a`. If one point lies outside `B(c, R)`, then `f` +vanishes there, and the other point is at distance at least `R - r` where `f` does not vanish +(`Rd.sub_le_norm_sub_of_mem_ball`). -/ +theorem slobodeckijIntegrand_le_of_support {c : E} {r R : ℝ} (hr : r ≤ R) {f : E → ℂ} + (hf0 : ∀ y, f y ≠ 0 → y ∈ ball c r) {P : ℝ} (hP : 0 < P) {a : ℝ} (ha : 0 ≤ a) (x y : E) : + ‖f y - f x‖ₑ ^ P / ‖y - x‖ₑ ^ a ≤ + (ball c R ×ˢ ball c R).indicator (fun z : E × E => ‖f z.2 - f z.1‖ₑ ^ P / ‖z.2 - z.1‖ₑ ^ a) + (x, y) + ‖f x‖ₑ ^ P / ENNReal.ofReal (R - r) ^ a + + ‖f y‖ₑ ^ P / ENNReal.ofReal (R - r) ^ a := by + have hfar : ∀ {u v : E}, f u ≠ 0 → v ∉ ball c R → + ‖f u‖ₑ ^ P / ‖u - v‖ₑ ^ a ≤ ‖f u‖ₑ ^ P / ENNReal.ofReal (R - r) ^ a := fun hu hv => by + refine ENNReal.div_le_div_left (ENNReal.rpow_le_rpow ?_ ha) _ + rw [← ofReal_norm] + exact ENNReal.ofReal_le_ofReal (sub_le_norm_sub_of_mem_ball (hf0 _ hu) hv) + have hzero : ∀ {u : E}, u ∉ ball c R → f u = 0 := fun hu => + by_contra fun h => hu (ball_subset_ball hr (hf0 _ h)) + by_cases hxy : (x, y) ∈ ball c R ×ˢ ball c R + · rw [indicator_of_mem hxy, add_assoc] + exact le_self_add + rw [indicator_of_notMem hxy, zero_add] + rcases not_and_or.1 (mem_prod.not.1 hxy) with hx | hy + · rw [hzero hx, sub_zero] + by_cases hfy : f y = 0 + · rw [hfy, eNorm_zero, ENNReal.zero_rpow_of_pos hP, ENNReal.zero_div] + exact zero_le + · exact (hfar hfy hx).trans le_add_self + · rw [hzero hy, zero_sub, eNorm_neg, eNorm_sub_rev] + by_cases hfx : f x = 0 + · rw [hfx, eNorm_zero, ENNReal.zero_rpow_of_pos hP, ENNReal.zero_div] + exact zero_le + · exact (hfar hfx hy).trans le_self_add + +end NormedGroup + +/-- **The difference of two products**: `|a b - c d| ≤ |a| |b - d| + |a - c| |d|` for complex +numbers, from `a b - c d = a (b - d) + (a - c) d`. -/ +theorem enorm_mul_sub_mul_le (a b c d : ℂ) : + ‖a * b - c * d‖ₑ ≤ ‖a‖ₑ * ‖b - d‖ₑ + ‖a - c‖ₑ * ‖d‖ₑ := by + rw [show a * b - c * d = a * (b - d) + (a - c) * d by ring, ← eNorm_mul, ← eNorm_mul] + exact eNorm_add_le _ _ + +namespace BoundedLipschitzDomain + +variable {V : Type*} [NormedAddCommGroup V] [InnerProductSpace ℝ V] [FiniteDimensional ℝ V] + [MeasurableSpace V] [BorelSpace V] (Ω : BoundedLipschitzDomain V) + +/-! ### The Gagliardo form on the boundary -/ + +/-- **The Gagliardo form on the boundary** `Γ` of a bounded Lipschitz domain in `V`, `dim V = n`: +`∫_Γ ∫_Γ |g(y) - g(x)|^p / |y - x|^(n - 1 + sp) dσ(y) dσ(x)` with the surface measure `σ`, for +`0 < p < ∞` the `p`-th power of the Gagliardo seminorm of the Sobolev–Slobodeckij space +`W^{s,p}(Γ)` of the `(n-1)`-dimensional surface `Γ` (Gagliardo 1957). For `p = 2`, `s = 1/2` the +exponent is `n`. -/ +noncomputable def boundarySlobodeckijForm (p : ℝ≥0∞) (s : ℝ) (g : V → ℂ) : ℝ≥0∞ := + ∫⁻ x, ∫⁻ y, ‖g y - g x‖ₑ ^ p.toReal / + ‖y - x‖ₑ ^ (((finrank ℝ V - 1 : ℕ) : ℝ) + s * p.toReal) ∂Ω.surfaceMeasure ∂Ω.surfaceMeasure + +omit [FiniteDimensional ℝ V] in +/-- The Gagliardo form on the boundary depends only on the class of `g` modulo null sets of the +surface measure. -/ +theorem boundarySlobodeckijForm_congr_ae {g h : V → ℂ} (hgh : g =ᵐ[Ω.surfaceMeasure] h) + (p : ℝ≥0∞) (s : ℝ) : Ω.boundarySlobodeckijForm p s g = Ω.boundarySlobodeckijForm p s h := + lintegral_congr_ae (hgh.mono fun x hx => lintegral_congr_ae (hgh.mono fun y hy => by + simp only [hx, hy])) + +/-- **Double integrals over a boundary ball in the chart**: for every `F : V → V → [0, ∞]` that +vanishes unless both points lie in `B_j`, +`∫_Γ ∫_Γ F(x, y) dσ(y) dσ(x) = ∫_{H_j} ∫_{H_j} F(γ_j x', γ_j y') w(y') w(x') dy' dx'` with the +density `w = √(1 + ‖∇φ_j‖²)`, by the chart formula +`Rd.BoundedLipschitzDomain.lintegral_surfaceMeasure_of_support` twice. It holds for every `F`, +measurable or not. -/ +theorem lintegral_lintegral_surfaceMeasure_of_support (j : Fin Ω.N) (F : V → V → ℝ≥0∞) + (hF : ∀ x y, F x y ≠ 0 → + x ∈ ball (Ω.center j) (Ω.radius j) ∧ y ∈ ball (Ω.center j) (Ω.radius j)) : + ∫⁻ x, ∫⁻ y, F x y ∂Ω.surfaceMeasure ∂Ω.surfaceMeasure = + ∫⁻ x', ∫⁻ y', F ((Ω.graph j).graphMap x') ((Ω.graph j).graphMap y') * + ENNReal.ofReal ((Ω.graph j).gram y') * ENNReal.ofReal ((Ω.graph j).gram x') := by + have hin : ∀ x, ∫⁻ y, F x y ∂Ω.surfaceMeasure = + ∫⁻ y', F x ((Ω.graph j).graphMap y') * ENNReal.ofReal ((Ω.graph j).gram y') := fun x => + Ω.lintegral_surfaceMeasure_of_support j (F x) fun y hy => (hF x y hy).2 + simp_rw [hin] + rw [Ω.lintegral_surfaceMeasure_of_support j _ fun x hx => by_contra fun hxB => hx (by + have h0 : ∀ y, F x y = 0 := fun y => by_contra fun h => hxB (hF x y h).1 + simp only [h0, zero_mul, lintegral_zero])] + exact lintegral_congr fun x' => (lintegral_mul_const' _ _ ENNReal.ofReal_ne_top).symm + +/-- **Double integrals in the chart are at most those over `Γ`**: for every `F : V → V → [0, ∞]` +that vanishes unless both points lie in `B_j`, +`∫_{H_j} ∫_{H_j} F(γ_j x', γ_j y') dy' dx' ≤ ∫_Γ ∫_Γ F dσ dσ`, since the density +`√(1 + ‖∇φ_j‖²)` is at least `1` (`Rd.LipschitzGraph.one_le_ofReal_gram`). -/ +theorem lintegral_lintegral_chart_le (j : Fin Ω.N) (F : V → V → ℝ≥0∞) + (hF : ∀ x y, F x y ≠ 0 → + x ∈ ball (Ω.center j) (Ω.radius j) ∧ y ∈ ball (Ω.center j) (Ω.radius j)) : + ∫⁻ x', ∫⁻ y', F ((Ω.graph j).graphMap x') ((Ω.graph j).graphMap y') ≤ + ∫⁻ x, ∫⁻ y, F x y ∂Ω.surfaceMeasure ∂Ω.surfaceMeasure := by + rw [Ω.lintegral_lintegral_surfaceMeasure_of_support j F hF] + exact lintegral_mono fun x' => lintegral_mono fun y' => + le_mul_of_one_le_right' ((Ω.graph j).one_le_ofReal_gram x') |>.trans' + (le_mul_of_one_le_right' ((Ω.graph j).one_le_ofReal_gram y')) + +variable {p : ℝ≥0∞} [Fact (1 ≤ p)] + +/-- **The functions of `B^s_{p,q}(Γ)` are measurable on `Γ`**: every `g ∈ B^s_{p,q}(Γ)` is +almost everywhere strongly measurable for the surface measure. On `B_j`, `ψ_j g` is +`σ`-almost everywhere the chart piece `G_j ∈ L_p(H_j)` composed with the projection `P_j` +(`Rd.BoundedLipschitzDomain.ae_surfaceMeasure_ball_iff`), it vanishes outside `B_j`, and +`g = ∑_j ψ_j g` on `Γ`. -/ +theorem aestronglyMeasurable_of_memBoundaryBesov (ψ : Ω.BoundaryPartition) {s : ℝ} {q : ℝ≥0∞} + {g : V → ℂ} (hg : Ω.MemBoundaryBesov p ψ s q g) : + AEStronglyMeasurable g Ω.surfaceMeasure := by + choose G hG _ using hg + have hj : ∀ j, (fun y => ψ.toComplex j y * g y) =ᵐ[Ω.surfaceMeasure] + (ball (Ω.center j) (Ω.radius j)).indicator fun y => G j ((Ω.graph j).proj y) := by + intro j + have h1 := (Ω.ae_surfaceMeasure_ball_iff j (P := fun y => ψ.toComplex j y * g y = + (ball (Ω.center j) (Ω.radius j)).indicator (fun y => G j ((Ω.graph j).proj y)) y)).2 + ((hG j).mono fun x' hx' hB => by + rw [indicator_of_mem hB, (Ω.graph j).proj_graphMap, hx']) + filter_upwards [h1] with y hy + by_cases hyB : y ∈ ball (Ω.center j) (Ω.radius j) + · exact hy hyB + · have hψ : ψ.toFun j y = 0 := by_contra fun h => hyB (ψ.mem_ball_of_ne_zero h) + rw [ψ.toComplex_of_eq_zero hψ, zero_mul, indicator_of_notMem hyB] + refine AEStronglyMeasurable.congr (f := fun y => ∑ j, (ball (Ω.center j) (Ω.radius j)).indicator + (fun y => G j ((Ω.graph j).proj y)) y) (Finset.stronglyMeasurable_fun_sum Finset.univ fun j _ => + ((Lp.stronglyMeasurable (G j)).comp_measurable + (Ω.graph j).proj.continuous.measurable).indicator measurableSet_ball).aestronglyMeasurable ?_ + filter_upwards [ae_all_iff.2 hj, Ω.ae_eq_sum_mul ψ g] with y h1 h2 + rw [h2] + exact Finset.sum_congr rfl fun j _ => (h1 j).symm + +/-- **The Gagliardo form of a finite sum**: for `1 ≤ p < ∞` and measurable `f_i`, the Gagliardo +form on `Γ` of `∑_{i ∈ t} f_i` is at most `(#t)^(p-1)` times the sum of the forms of the `f_i`, by +the triangle inequality and Hölder's inequality for finite sums (Mathlib's +`ENNReal.rpow_sum_le_const_mul_sum_rpow`). -/ +theorem boundarySlobodeckijForm_finsetSum_le (hp : p ≠ ∞) (s : ℝ) {ι : Type*} (t : Finset ι) + {f : ι → V → ℂ} (hf : ∀ i, Measurable (f i)) : + Ω.boundarySlobodeckijForm p s (fun y => ∑ i ∈ t, f i y) ≤ + (t.card : ℝ≥0∞) ^ (p.toReal - 1) * ∑ i ∈ t, Ω.boundarySlobodeckijForm p s (f i) := by + have hP1 : 1 ≤ p.toReal := ENNReal.one_le_toReal_of_one_le Fact.out hp + have hc : (t.card : ℝ≥0∞) ^ (p.toReal - 1) ≠ ∞ := + ENNReal.rpow_ne_top_of_nonneg (by linarith) (ENNReal.natCast_ne_top _) + have hpt : ∀ x y : V, ‖(∑ i ∈ t, f i y) - ∑ i ∈ t, f i x‖ₑ ^ p.toReal / + ‖y - x‖ₑ ^ (((finrank ℝ V - 1 : ℕ) : ℝ) + s * p.toReal) ≤ + (t.card : ℝ≥0∞) ^ (p.toReal - 1) * ∑ i ∈ t, ‖f i y - f i x‖ₑ ^ p.toReal / + ‖y - x‖ₑ ^ (((finrank ℝ V - 1 : ℕ) : ℝ) + s * p.toReal) := fun x y => by + rw [← Finset.sum_sub_distrib] + calc ‖∑ i ∈ t, (f i y - f i x)‖ₑ ^ p.toReal / + ‖y - x‖ₑ ^ (((finrank ℝ V - 1 : ℕ) : ℝ) + s * p.toReal) + ≤ ((t.card : ℝ≥0∞) ^ (p.toReal - 1) * ∑ i ∈ t, ‖f i y - f i x‖ₑ ^ p.toReal) / + ‖y - x‖ₑ ^ (((finrank ℝ V - 1 : ℕ) : ℝ) + s * p.toReal) := + ENNReal.div_le_div_right ((ENNReal.rpow_le_rpow (eNorm_sum_le _ _) (by linarith)).trans + (ENNReal.rpow_sum_le_const_mul_sum_rpow (s := t) + (f := fun i => ‖f i y - f i x‖ₑ) hP1)) _ + _ = _ := by simp only [div_eq_mul_inv, mul_assoc, Finset.sum_mul] + have hm := fun i => measurable_slobodeckijIntegrand (hf i) p.toReal + (((finrank ℝ V - 1 : ℕ) : ℝ) + s * p.toReal) + have hy : ∀ i (x : V), Measurable fun y : V => ‖f i y - f i x‖ₑ ^ p.toReal / + ‖y - x‖ₑ ^ (((finrank ℝ V - 1 : ℕ) : ℝ) + s * p.toReal) := fun i x => + (hm i).comp measurable_prodMk_left + have hx : ∀ i, Measurable fun x : V => ∫⁻ y, ‖f i y - f i x‖ₑ ^ p.toReal / + ‖y - x‖ₑ ^ (((finrank ℝ V - 1 : ℕ) : ℝ) + s * p.toReal) ∂Ω.surfaceMeasure := fun i => + (hm i).lintegral_prod_right' + calc Ω.boundarySlobodeckijForm p s (fun y => ∑ i ∈ t, f i y) + ≤ ∫⁻ x, ∫⁻ y, (t.card : ℝ≥0∞) ^ (p.toReal - 1) * ∑ i ∈ t, ‖f i y - f i x‖ₑ ^ p.toReal / + ‖y - x‖ₑ ^ (((finrank ℝ V - 1 : ℕ) : ℝ) + s * p.toReal) ∂Ω.surfaceMeasure + ∂Ω.surfaceMeasure := lintegral_mono fun x => lintegral_mono fun y => hpt x y + _ = _ := by + rw [lintegral_congr fun x => (lintegral_const_mul' _ _ hc).trans (congrArg _ + (lintegral_finsetSum t fun i _ => hy i x)), lintegral_const_mul' _ _ hc, + lintegral_finsetSum t fun i _ => hx i] + rfl + +/-! ### The upper bound by the chart-wise Besov norm -/ + +/-- **The part of the Gagliardo form inside one boundary ball**: for every `f : V → ℂ` and +`s ≥ 0`, `∫_Γ ∫_Γ 1_{B_j²}(x, y) |f(y) - f(x)|^p / |y - x|^(n-1+sp) dσ(y) dσ(x)` is at most +`(1 + M_j²)` times the Gagliardo form on `H_j` of `f ∘ γ_j`: the chart formula +(`Rd.BoundedLipschitzDomain.lintegral_lintegral_surfaceMeasure_of_support`), the bound +`√(1 + M_j²)` of the density, and `|y' - x'| ≤ |γ_j y' - γ_j x'|`. -/ +theorem lintegral_lintegral_indicator_le_slobodeckijForm (j : Fin Ω.N) (f : V → ℂ) (p : ℝ≥0∞) + {s : ℝ} (hs : 0 ≤ s) : + ∫⁻ x, ∫⁻ y, (ball (Ω.center j) (Ω.radius j) ×ˢ ball (Ω.center j) (Ω.radius j)).indicator + (fun z : V × V => ‖f z.2 - f z.1‖ₑ ^ p.toReal / + ‖z.2 - z.1‖ₑ ^ (((finrank ℝ V - 1 : ℕ) : ℝ) + s * p.toReal)) (x, y) + ∂Ω.surfaceMeasure ∂Ω.surfaceMeasure ≤ + ENNReal.ofReal √(1 + (Ω.graph j).M ^ 2) ^ 2 * + slobodeckijForm p s (fun x' => f ((Ω.graph j).graphMap x')) := by + have ha : 0 ≤ ((finrank ℝ V - 1 : ℕ) : ℝ) + s * p.toReal := by positivity + have hc : ENNReal.ofReal √(1 + (Ω.graph j).M ^ 2) ≠ ∞ := ENNReal.ofReal_ne_top + rw [Ω.lintegral_lintegral_surfaceMeasure_of_support j _ fun x y h => + mem_prod.1 (mem_of_indicator_ne_zero h), + slobodeckijForm, (Ω.graph j).finrank_hyperplane_eq_sub_one, sq, + ← lintegral_const_mul' _ _ (ENNReal.mul_ne_top hc hc)] + refine lintegral_mono fun x' => ?_ + rw [← lintegral_const_mul' _ _ (ENNReal.mul_ne_top hc hc)] + refine lintegral_mono fun y' => ?_ + have h1 := (Set.indicator_le_self (ball (Ω.center j) (Ω.radius j) ×ˢ + ball (Ω.center j) (Ω.radius j)) (fun z : V × V => ‖f z.2 - f z.1‖ₑ ^ p.toReal / + ‖z.2 - z.1‖ₑ ^ (((finrank ℝ V - 1 : ℕ) : ℝ) + s * p.toReal))) + ((Ω.graph j).graphMap x', (Ω.graph j).graphMap y') + have h2 := ENNReal.div_le_div_left (ENNReal.rpow_le_rpow + ((Ω.graph j).enorm_sub_le_enorm_graphMap_sub y' x') ha) + (‖f ((Ω.graph j).graphMap y') - f ((Ω.graph j).graphMap x')‖ₑ ^ p.toReal) + calc _ ≤ (‖f ((Ω.graph j).graphMap y') - f ((Ω.graph j).graphMap x')‖ₑ ^ p.toReal / + ‖y' - x'‖ₑ ^ (((finrank ℝ V - 1 : ℕ) : ℝ) + s * p.toReal)) * + ENNReal.ofReal √(1 + (Ω.graph j).M ^ 2) * ENNReal.ofReal √(1 + (Ω.graph j).M ^ 2) := + mul_le_mul' (mul_le_mul' (h1.trans h2) + (ENNReal.ofReal_le_ofReal ((Ω.graph j).gram_le y'))) + (ENNReal.ofReal_le_ofReal ((Ω.graph j).gram_le x')) + _ = _ := by ring + +omit [Fact (1 ≤ p)] in +/-- **The Gagliardo form of a function supported in a boundary ball**: let `f : V → ℂ` be +measurable and vanish outside `B(c_j, r)` with `r < r_j`, the radius of `B_j`. For `0 < p < ∞` +and `s ≥ 0`, `∫_Γ ∫_Γ |f(y) - f(x)|^p / |y - x|^(n-1+sp) dσ dσ` is at most +`(1 + M_j²) [f ∘ γ_j]_{W^{s,p}(H_j)}^p + 2 σ(Γ) (r_j - r)^(-(n-1+sp)) ∫_Γ |f|^p dσ`: the pairs in +`B_j²` go to the chart +(`Rd.BoundedLipschitzDomain.lintegral_lintegral_indicator_le_slobodeckijForm`), the other pairs +are at distance at least `r_j - r` (`Rd.slobodeckijIntegrand_le_of_support`). -/ +theorem boundarySlobodeckijForm_le_of_support (j : Fin Ω.N) {r : ℝ} (hr : r < Ω.radius j) + {f : V → ℂ} (hf : Measurable f) (hf0 : ∀ y, f y ≠ 0 → y ∈ ball (Ω.center j) r) + (hp0 : p ≠ 0) (hp : p ≠ ∞) {s : ℝ} (hs : 0 ≤ s) : + Ω.boundarySlobodeckijForm p s f ≤ ENNReal.ofReal √(1 + (Ω.graph j).M ^ 2) ^ 2 * + slobodeckijForm p s (fun x' => f ((Ω.graph j).graphMap x')) + + 2 * Ω.surfaceMeasure univ / + ENNReal.ofReal (Ω.radius j - r) ^ (((finrank ℝ V - 1 : ℕ) : ℝ) + s * p.toReal) * + ∫⁻ y, ‖f y‖ₑ ^ p.toReal ∂Ω.surfaceMeasure := by + have hP := ENNReal.toReal_pos hp0 hp + have ha : 0 ≤ ((finrank ℝ V - 1 : ℕ) : ℝ) + s * p.toReal := by positivity + have hm : Measurable fun x : V => ‖f x‖ₑ ^ p.toReal / + ENNReal.ofReal (Ω.radius j - r) ^ (((finrank ℝ V - 1 : ℕ) : ℝ) + s * p.toReal) := + (hf.eNorm.pow_const _).div_const _ + refine (lintegral_lintegral_le_add_two_mul hm fun x y => + slobodeckijIntegrand_le_of_support hr.le hf0 hP ha x y).trans + (add_le_add (Ω.lintegral_lintegral_indicator_le_slobodeckijForm j f p hs) (le_of_eq ?_)) + simp_rw [div_eq_mul_inv] + rw [lintegral_mul_const _ (hf.eNorm.pow_const _)] + ring + +/-- **The Gagliardo form of one localised piece, by its chart piece**: for `1 ≤ p < ∞`, `s > 0`, +a resolution of unity `ψ` and a chart `j` there is `C < ∞` such that for every measurable `g` and +every `G ∈ L_p(H_j)` with `G = (ψ_j g) ∘ γ_j` almost everywhere, +`[ψ_j g]_{W^{s,p}(Γ)}^p ≤ C (‖G‖_p + ‖(2^(ks) ω_1(G, 2^(-k))_p)_k‖_{ℓ_p})^p`, by +`Rd.BoundedLipschitzDomain.boundarySlobodeckijForm_le_of_support` and the bound of the Gagliardo +form on `H_j` (`Rd.slobodeckijForm_le`). -/ +theorem exists_boundarySlobodeckijForm_mul_le (ψ : Ω.BoundaryPartition) (j : Fin Ω.N) + (hp : p ≠ ∞) {s : ℝ} (hs : 0 < s) : + ∃ C : ℝ≥0∞, C ≠ ∞ ∧ ∀ g : V → ℂ, Measurable g → + ∀ G : Lp ℂ p (volume : Measure (Ω.graph j).hyperplane), + (G : (Ω.graph j).hyperplane → ℂ) =ᵐ[volume] + (fun x' => ψ.toComplex j ((Ω.graph j).graphMap x') * g ((Ω.graph j).graphMap x')) → + Ω.boundarySlobodeckijForm p s (fun y => ψ.toComplex j y * g y) ≤ + C * (‖G‖ₑ + lqNorm p (fun k => dyadicWeight s k * lpModulus p 1 G k)) ^ p.toReal := by + have hp0 : p ≠ 0 := (zero_lt_one.trans_le Fact.out).ne' + have hP := ENNReal.toReal_pos hp0 hp + have hP1 : 1 ≤ p.toReal := ENNReal.one_le_toReal_of_one_le Fact.out hp + obtain ⟨r, hr, hsub⟩ := exists_lt_subset_ball (isClosed_tsupport _) (ψ.tsupport_subset j) + have hf0 : ∀ g : V → ℂ, ∀ y, ψ.toComplex j y * g y ≠ 0 → y ∈ ball (Ω.center j) r := + fun g y hy => hsub (subset_tsupport _ fun h => + left_ne_zero_of_mul hy (ψ.toComplex_of_eq_zero h)) + have hδ : ENNReal.ofReal (Ω.radius j - r) ^ (((finrank ℝ V - 1 : ℕ) : ℝ) + s * p.toReal) ≠ 0 := + (ENNReal.rpow_pos (ENNReal.ofReal_pos.2 (sub_pos.2 hr)) ENNReal.ofReal_ne_top).ne' + refine ⟨ENNReal.ofReal √(1 + (Ω.graph j).M ^ 2) ^ 2 * + slobodeckijConstLower (Ω.graph j).hyperplane p s + + 2 * Ω.surfaceMeasure univ / + ENNReal.ofReal (Ω.radius j - r) ^ (((finrank ℝ V - 1 : ℕ) : ℝ) + s * p.toReal) * + ENNReal.ofReal √(1 + (Ω.graph j).M ^ 2), ENNReal.add_ne_top.2 ⟨ENNReal.mul_ne_top + (ENNReal.pow_ne_top ENNReal.ofReal_ne_top) (slobodeckijConstLower_ne_top hp0 hp hs), + ENNReal.mul_ne_top (ENNReal.div_ne_top (ENNReal.mul_ne_top ENNReal.ofNat_ne_top + (measure_ne_top _ _)) hδ) ENNReal.ofReal_ne_top⟩, fun g hg G hG => ?_⟩ + have hGP : ‖G‖ₑ ^ p.toReal = ∫⁻ x', ‖ψ.toComplex j ((Ω.graph j).graphMap x') * + g ((Ω.graph j).graphMap x')‖ₑ ^ p.toReal := by + rw [Lp.eNorm_def, eLpNorm_rpow_eq (Lp.aestronglyMeasurable G) hp0 hp] + exact lintegral_congr_ae (hG.mono fun x' hx' => by dsimp only; rw [hx']) + have hL : ∫⁻ y, ‖ψ.toComplex j y * g y‖ₑ ^ p.toReal ∂Ω.surfaceMeasure ≤ + ENNReal.ofReal √(1 + (Ω.graph j).M ^ 2) * ‖G‖ₑ ^ p.toReal := by + rw [hGP] + refine Ω.lintegral_le_chart j _ fun y hy => ball_subset_ball hr.le (hf0 g y fun h => hy ?_) + rw [h, eNorm_zero, ENNReal.zero_rpow_of_pos hP] + have hS : slobodeckijForm p s (fun x' => ψ.toComplex j ((Ω.graph j).graphMap x') * + g ((Ω.graph j).graphMap x')) ≤ slobodeckijConstLower (Ω.graph j).hyperplane p s * + (‖G‖ₑ ^ p.toReal + + lqNorm p (fun k => dyadicWeight s k * lpModulus p 1 G k) ^ p.toReal) := by + rw [← slobodeckijForm_congr_ae hG] + exact slobodeckijForm_le hp hs G + have hsum := ENNReal.add_rpow_le_rpow_add ‖G‖ₑ + (lqNorm p (fun k => dyadicWeight s k * lpModulus p 1 G k)) hP1 + have hone : ‖G‖ₑ ^ p.toReal ≤ + (‖G‖ₑ + lqNorm p (fun k => dyadicWeight s k * lpModulus p 1 G k)) ^ p.toReal := + ENNReal.rpow_le_rpow le_self_add hP.le + calc Ω.boundarySlobodeckijForm p s (fun y => ψ.toComplex j y * g y) + ≤ _ := Ω.boundarySlobodeckijForm_le_of_support j hr + ((ψ.contDiff_toComplex j).continuous.measurable.mul hg) (hf0 g) hp0 hp hs.le + _ ≤ _ := add_le_add (mul_le_mul' le_rfl (hS.trans (mul_le_mul' le_rfl hsum))) + (mul_le_mul' le_rfl (hL.trans (mul_le_mul' le_rfl hone))) + _ = _ := by ring + +/-- **The Gagliardo form by the chart-wise Besov norm** (the upper half of Gagliardo's description +of `B^s_{p,p}(Γ)`): for `1 ≤ p < ∞`, `s > 0` and a resolution of unity `ψ` there is `C < ∞` with +`∫_Γ ∫_Γ |g(y) - g(x)|^p / |y - x|^(n-1+sp) dσ dσ ≤ C ‖g‖_{B^s_{p,p}(Γ)}^p` for every `g`. For +`g ∈ B^s_{p,p}(Γ)`, `g` is measurable on `Γ` +(`Rd.BoundedLipschitzDomain.aestronglyMeasurable_of_memBoundaryBesov`), `g = ∑_j ψ_j g` on `Γ`, +the form of the sum is at most `N^(p-1)` times the sum of the forms +(`Rd.BoundedLipschitzDomain.boundarySlobodeckijForm_finsetSum_le`), and each piece is bounded by +its chart piece (`Rd.BoundedLipschitzDomain.exists_boundarySlobodeckijForm_mul_le`); otherwise the +right side is `∞`. -/ +theorem exists_boundarySlobodeckijForm_le (ψ : Ω.BoundaryPartition) (hp : p ≠ ∞) {s : ℝ} + (hs : 0 < s) : + ∃ C : ℝ≥0∞, C ≠ ∞ ∧ ∀ g : V → ℂ, + Ω.boundarySlobodeckijForm p s g ≤ C * Ω.boundaryBesovNorm p ψ s p g ^ p.toReal := by + have hp0 : p ≠ 0 := (zero_lt_one.trans_le Fact.out).ne' + have hP := ENNReal.toReal_pos hp0 hp + have hP1 : 1 ≤ p.toReal := ENNReal.one_le_toReal_of_one_le Fact.out hp + choose C hC hle using fun j => Ω.exists_boundarySlobodeckijForm_mul_le ψ j hp hs + refine ⟨((Finset.univ : Finset (Fin Ω.N)).card : ℝ≥0∞) ^ (p.toReal - 1) * ∑ j, C j + 1, + ENNReal.add_ne_top.2 ⟨ENNReal.mul_ne_top (ENNReal.rpow_ne_top_of_nonneg (by linarith) + (ENNReal.natCast_ne_top _)) (ENNReal.sum_ne_top.2 fun j _ => hC j), ENNReal.one_ne_top⟩, + fun g => ?_⟩ + by_cases hg : Ω.MemBoundaryBesov p ψ s p g + swap + · rw [Ω.boundaryBesovNorm_eq_top_of_not_mem ψ hg, ENNReal.top_rpow_of_pos hP, + ENNReal.mul_top (by positivity)] + exact le_top + have hm := Ω.aestronglyMeasurable_of_memBoundaryBesov ψ hg + have hae := Ω.ae_surfaceMeasure_iff_aeBoundary.1 hm.ae_eq_mk + have hmk : Measurable (hm.mk g) := hm.stronglyMeasurable_mk.measurable + rw [Ω.boundarySlobodeckijForm_congr_ae hm.ae_eq_mk, Ω.boundaryBesovNorm_congr ψ hae] + choose G hG _ using hg.congr hae + have hpiece : ∀ j, (‖G j‖ₑ + lqNorm p (fun k => dyadicWeight s k * lpModulus p 1 (G j) k)) ^ + p.toReal ≤ Ω.boundaryBesovNorm p ψ s p (hm.mk g) ^ p.toReal := fun j => by + rw [Ω.boundaryBesovNorm_eq_sum ψ G hG] + exact ENNReal.rpow_le_rpow (Finset.single_le_sum (f := fun j => + ‖G j‖ₑ + lqNorm p (fun k => dyadicWeight s k * lpModulus p 1 (G j) k)) + (fun _ _ => zero_le) (Finset.mem_univ j)) hP.le + calc Ω.boundarySlobodeckijForm p s (hm.mk g) + = Ω.boundarySlobodeckijForm p s (fun y => ∑ j, ψ.toComplex j y * hm.mk g y) := + Ω.boundarySlobodeckijForm_congr_ae (Ω.ae_eq_sum_mul ψ _) p s + _ ≤ ((Finset.univ : Finset (Fin Ω.N)).card : ℝ≥0∞) ^ (p.toReal - 1) * + ∑ j, Ω.boundarySlobodeckijForm p s (fun y => ψ.toComplex j y * hm.mk g y) := + Ω.boundarySlobodeckijForm_finsetSum_le hp s _ fun j => + (ψ.contDiff_toComplex j).continuous.measurable.mul hmk + _ ≤ ((Finset.univ : Finset (Fin Ω.N)).card : ℝ≥0∞) ^ (p.toReal - 1) * + ∑ j, C j * Ω.boundaryBesovNorm p ψ s p (hm.mk g) ^ p.toReal := + mul_le_mul' le_rfl (Finset.sum_le_sum fun j _ => + (hle j _ hmk (G j) (hG j)).trans (mul_le_mul' le_rfl (hpiece j))) + _ ≤ _ := by + rw [← Finset.sum_mul, ← mul_assoc] + exact mul_le_mul' le_self_add le_rfl + +/-! ### The lower bound by the Gagliardo form -/ + +/-- **The `L_p` norm of a chart piece**: for `P > 0`, +`∫_{H_j} |ψ_j(γ_j x') g(γ_j x')|^P dx' ≤ D_j^P ∫_Γ |g|^P dσ` with `D_j = ψ.derivBound j` +(`Rd.BoundedLipschitzDomain.lintegral_chart_le`). -/ +theorem lintegral_chartPiece_le (ψ : Ω.BoundaryPartition) (j : Fin Ω.N) {P : ℝ} (hP : 0 < P) + (g : V → ℂ) : + ∫⁻ x', ‖ψ.toComplex j ((Ω.graph j).graphMap x') * g ((Ω.graph j).graphMap x')‖ₑ ^ P ≤ + ENNReal.ofReal (ψ.derivBound j) ^ P * ∫⁻ y, ‖g y‖ₑ ^ P ∂Ω.surfaceMeasure := by + refine (Ω.lintegral_chart_le j (fun y => ‖ψ.toComplex j y * g y‖ₑ ^ P) fun y hy => + ψ.mem_ball_of_ne_zero fun h => hy ?_).trans ?_ + · rw [ψ.toComplex_of_eq_zero h, zero_mul, eNorm_zero, ENNReal.zero_rpow_of_pos hP] + · rw [← lintegral_const_mul' _ _ (ENNReal.rpow_ne_top_of_nonneg hP.le ENNReal.ofReal_ne_top)] + refine lintegral_mono fun y => ?_ + rw [eNorm_mul, ENNReal.mul_rpow_of_nonneg _ _ hP.le] + exact mul_le_mul' (ENNReal.rpow_le_rpow (ψ.enorm_toComplex_le j y) hP.le) le_rfl + +omit [MeasurableSpace V] [BorelSpace V] in +/-- **The integrand of a chart piece, by the product rule for differences**: for `P ≥ 1`, +`a ≥ 0`, the chart piece `G = (ψ_j g) ∘ γ_j` and all `x', y' ∈ H_j`, +`|G(y') - G(x')|^P / |y' - x'|^a ≤ 2^(P-1) (D_j^P (1 + M_j)^a |g(γ y') - g(γ x')|^P / +|γ y' - γ x'|^a + |g(γ x')|^P |ψ_j(γ y') - ψ_j(γ x')|^P / |y' - x'|^a)`, from +`G(y') - G(x') = ψ_j(γ y') (g(γ y') - g(γ x')) + (ψ_j(γ y') - ψ_j(γ x')) g(γ x')` and +`|γ y' - γ x'| ≤ (1 + M_j) |y' - x'|`. -/ +theorem chartPiece_integrand_le (ψ : Ω.BoundaryPartition) (j : Fin Ω.N) {P : ℝ} (hP1 : 1 ≤ P) + {a : ℝ} (ha : 0 ≤ a) (g : V → ℂ) (x' y' : (Ω.graph j).hyperplane) : + ‖ψ.toComplex j ((Ω.graph j).graphMap y') * g ((Ω.graph j).graphMap y') - + ψ.toComplex j ((Ω.graph j).graphMap x') * g ((Ω.graph j).graphMap x')‖ₑ ^ P / + ‖y' - x'‖ₑ ^ a ≤ + 2 ^ (P - 1) * (ENNReal.ofReal (ψ.derivBound j) ^ P * ENNReal.ofReal (1 + (Ω.graph j).M) ^ a * + (‖g ((Ω.graph j).graphMap y') - g ((Ω.graph j).graphMap x')‖ₑ ^ P / + ‖(Ω.graph j).graphMap y' - (Ω.graph j).graphMap x'‖ₑ ^ a) + + ‖g ((Ω.graph j).graphMap x')‖ₑ ^ P * + (‖ψ.toComplex j ((Ω.graph j).graphMap y') - + ψ.toComplex j ((Ω.graph j).graphMap x')‖ₑ ^ P / ‖y' - x'‖ₑ ^ a)) := by + have hP : 0 ≤ P := by linarith + have hM : 0 < 1 + (Ω.graph j).M := by linarith [(Ω.graph j).M_nonneg] + have h2 : ‖ψ.toComplex j ((Ω.graph j).graphMap y')‖ₑ ^ P * + (‖g ((Ω.graph j).graphMap y') - g ((Ω.graph j).graphMap x')‖ₑ ^ P / ‖y' - x'‖ₑ ^ a) ≤ + ENNReal.ofReal (ψ.derivBound j) ^ P * ENNReal.ofReal (1 + (Ω.graph j).M) ^ a * + (‖g ((Ω.graph j).graphMap y') - g ((Ω.graph j).graphMap x')‖ₑ ^ P / + ‖(Ω.graph j).graphMap y' - (Ω.graph j).graphMap x'‖ₑ ^ a) := by + rw [mul_assoc] + exact mul_le_mul' (ENNReal.rpow_le_rpow (ψ.enorm_toComplex_le j _) hP) + (ENNReal.div_rpow_le_rpow_mul_div_rpow (ENNReal.ofReal_pos.2 hM).ne' ENNReal.ofReal_ne_top + ((Ω.graph j).enorm_graphMap_sub_le y' x') ha) + calc _ ≤ 2 ^ (P - 1) * ((‖ψ.toComplex j ((Ω.graph j).graphMap y')‖ₑ * + ‖g ((Ω.graph j).graphMap y') - g ((Ω.graph j).graphMap x')‖ₑ) ^ P + + (‖ψ.toComplex j ((Ω.graph j).graphMap y') - ψ.toComplex j ((Ω.graph j).graphMap x')‖ₑ * + ‖g ((Ω.graph j).graphMap x')‖ₑ) ^ P) / ‖y' - x'‖ₑ ^ a := + ENNReal.div_le_div_right ((ENNReal.rpow_le_rpow (enorm_mul_sub_mul_le _ _ _ _) hP).trans + (ENNReal.rpow_add_le_mul_rpow_add_rpow _ _ hP1)) _ + _ = 2 ^ (P - 1) * (‖ψ.toComplex j ((Ω.graph j).graphMap y')‖ₑ ^ P * + (‖g ((Ω.graph j).graphMap y') - g ((Ω.graph j).graphMap x')‖ₑ ^ P / ‖y' - x'‖ₑ ^ a) + + ‖g ((Ω.graph j).graphMap x')‖ₑ ^ P * + (‖ψ.toComplex j ((Ω.graph j).graphMap y') - ψ.toComplex j ((Ω.graph j).graphMap x')‖ₑ ^ + P / ‖y' - x'‖ₑ ^ a)) := by + rw [ENNReal.mul_rpow_of_nonneg _ _ hP, ENNReal.mul_rpow_of_nonneg _ _ hP, mul_div_assoc, + ENNReal.add_div, mul_comm (‖ψ.toComplex j ((Ω.graph j).graphMap y') - + ψ.toComplex j ((Ω.graph j).graphMap x')‖ₑ ^ P), mul_div_assoc, mul_div_assoc] + _ ≤ _ := mul_le_mul' le_rfl (add_le_add h2 le_rfl) + +omit [FiniteDimensional ℝ V] [MeasurableSpace V] [BorelSpace V] in +/-- **The integrand of a chart piece, with one point outside the chart ball**: if `ψ_j` vanishes +outside `B(c_j, r)`, `r ≤ r_j`, and `γ_j x' ∉ B_j`, then for the chart piece +`G = (ψ_j g) ∘ γ_j`, `|G(y') - G(x')|^P / |y' - x'|^a ≤ |G(y')|^P 1_{|x' - y'| ≥ η} |x' - y'|^(-a)` +with `η = (r_j - r) / (1 + M_j)`: `G(x') = 0`, and `G(y') ≠ 0` puts `γ_j y'` in `B(c_j, r)`, at +distance at least `r_j - r` from `γ_j x'`. -/ +theorem chartPiece_integrand_le_of_notMem (ψ : Ω.BoundaryPartition) (j : Fin Ω.N) {r : ℝ} + (hr : r ≤ Ω.radius j) (hsub : ∀ y, ψ.toFun j y ≠ 0 → y ∈ ball (Ω.center j) r) {P : ℝ} + (hP : 0 < P) (a : ℝ) (g : V → ℂ) {x' y' : (Ω.graph j).hyperplane} + (hx : (Ω.graph j).graphMap x' ∉ ball (Ω.center j) (Ω.radius j)) : + ‖ψ.toComplex j ((Ω.graph j).graphMap y') * g ((Ω.graph j).graphMap y') - + ψ.toComplex j ((Ω.graph j).graphMap x') * g ((Ω.graph j).graphMap x')‖ₑ ^ P / + ‖y' - x'‖ₑ ^ a ≤ + ‖ψ.toComplex j ((Ω.graph j).graphMap y') * g ((Ω.graph j).graphMap y')‖ₑ ^ P * + (ball (0 : (Ω.graph j).hyperplane) ((Ω.radius j - r) / (1 + (Ω.graph j).M)))ᶜ.indicator + (fun z => ‖z‖ₑ ^ (-a)) (x' - y') := by + have hφx : ψ.toComplex j ((Ω.graph j).graphMap x') = 0 := + ψ.toComplex_of_eq_zero (by_contra fun h => hx (ball_subset_ball hr (hsub _ h))) + rw [hφx, zero_mul, sub_zero] + by_cases hφy : ψ.toFun j ((Ω.graph j).graphMap y') = 0 + · rw [ψ.toComplex_of_eq_zero hφy, zero_mul, eNorm_zero, ENNReal.zero_rpow_of_pos hP, + ENNReal.zero_div, zero_mul] + have hfar := sub_le_norm_sub_of_mem_ball (hsub _ hφy) hx + have hlip := (Ω.graph j).norm_graphMap_sub_le y' x' + have hM : 0 < 1 + (Ω.graph j).M := by linarith [(Ω.graph j).M_nonneg] + have hη : (Ω.radius j - r) / (1 + (Ω.graph j).M) ≤ ‖x' - y'‖ := by + rw [div_le_iff₀ hM, norm_sub_rev] + linarith + rw [indicator_of_mem (by simpa [mem_ball_zero_iff] using hη), ENNReal.rpow_neg, + ← div_eq_mul_inv, eNorm_sub_rev x' y'] + +omit [MeasurableSpace V] [BorelSpace V] in +/-- **The integrand of a chart piece, bounded by four parts**: if `ψ_j` vanishes outside +`B(c_j, r)` with `r ≤ r_j`, then for `P ≥ 1`, `a ≥ 0`, the chart piece `G = (ψ_j g) ∘ γ_j` and all +`x', y' ∈ H_j`, `|G(y') - G(x')|^P / |y' - x'|^a` is at most +`2^(P-1) (A(x', y') + B(x', y')) + |G(x')|^P k(y' - x') + |G(y')|^P k(x' - y')` with the kernel +`k(z) = 1_{|z| ≥ η} |z|^(-a)`, `η = (r_j - r) / (1 + M_j)`, the part +`A = D_j^P (1 + M_j)^a 1_{B_j²}(γ x', γ y') |g(γ y') - g(γ x')|^P / |γ y' - γ x'|^a` and the part +`B = 1_{B_j}(γ x') |g(γ x')|^P |ψ_j(γ y') - ψ_j(γ x')|^P / |y' - x'|^a` +(`Rd.BoundedLipschitzDomain.chartPiece_integrand_le`, +`Rd.BoundedLipschitzDomain.chartPiece_integrand_le_of_notMem`). -/ +theorem chartPiece_integrand_le_add (ψ : Ω.BoundaryPartition) (j : Fin Ω.N) {r : ℝ} + (hr : r ≤ Ω.radius j) (hsub : ∀ y, ψ.toFun j y ≠ 0 → y ∈ ball (Ω.center j) r) {P : ℝ} + (hP1 : 1 ≤ P) {a : ℝ} (ha : 0 ≤ a) (g : V → ℂ) (x' y' : (Ω.graph j).hyperplane) : + ‖ψ.toComplex j ((Ω.graph j).graphMap y') * g ((Ω.graph j).graphMap y') - + ψ.toComplex j ((Ω.graph j).graphMap x') * g ((Ω.graph j).graphMap x')‖ₑ ^ P / + ‖y' - x'‖ₑ ^ a ≤ + 2 ^ (P - 1) * (ENNReal.ofReal (ψ.derivBound j) ^ P * ENNReal.ofReal (1 + (Ω.graph j).M) ^ a * + (ball (Ω.center j) (Ω.radius j) ×ˢ ball (Ω.center j) (Ω.radius j)).indicator + (fun z : V × V => ‖g z.2 - g z.1‖ₑ ^ P / ‖z.2 - z.1‖ₑ ^ a) + ((Ω.graph j).graphMap x', (Ω.graph j).graphMap y') + + (ball (Ω.center j) (Ω.radius j)).indicator (fun y => ‖g y‖ₑ ^ P) ((Ω.graph j).graphMap x') * + (‖ψ.toComplex j ((Ω.graph j).graphMap y') - + ψ.toComplex j ((Ω.graph j).graphMap x')‖ₑ ^ P / ‖y' - x'‖ₑ ^ a)) + + ‖ψ.toComplex j ((Ω.graph j).graphMap x') * g ((Ω.graph j).graphMap x')‖ₑ ^ P * + (ball (0 : (Ω.graph j).hyperplane) ((Ω.radius j - r) / (1 + (Ω.graph j).M)))ᶜ.indicator + (fun z => ‖z‖ₑ ^ (-a)) (y' - x') + + ‖ψ.toComplex j ((Ω.graph j).graphMap y') * g ((Ω.graph j).graphMap y')‖ₑ ^ P * + (ball (0 : (Ω.graph j).hyperplane) ((Ω.radius j - r) / (1 + (Ω.graph j).M)))ᶜ.indicator + (fun z => ‖z‖ₑ ^ (-a)) (x' - y') := by + have hP : 0 < P := by linarith + by_cases hx : (Ω.graph j).graphMap x' ∈ ball (Ω.center j) (Ω.radius j) + · by_cases hy : (Ω.graph j).graphMap y' ∈ ball (Ω.center j) (Ω.radius j) + · rw [indicator_of_mem (mk_mem_prod hx hy), indicator_of_mem hx] + exact (Ω.chartPiece_integrand_le ψ j hP1 ha g x' y').trans (le_self_add.trans le_self_add) + · have h := Ω.chartPiece_integrand_le_of_notMem ψ j hr hsub hP a g (x' := y') (y' := x') hy + rw [eNorm_sub_rev, eNorm_sub_rev x' y'] at h + exact h.trans (le_add_right le_add_self) + · exact (Ω.chartPiece_integrand_le_of_notMem ψ j hr hsub hP a g hx).trans le_add_self + +/-- **The inside part of a chart piece**: for every `g`, +`∫_{H_j} ∫_{H_j} 1_{B_j²}(γ x', γ y') |g(γ y') - g(γ x')|^p / |γ y' - γ x'|^(n-1+sp) dy' dx'` is at +most the Gagliardo form of `g` on `Γ` (`Rd.BoundedLipschitzDomain.lintegral_lintegral_chart_le`). -/ +theorem lintegral_lintegral_inside_le (j : Fin Ω.N) (g : V → ℂ) (p : ℝ≥0∞) (s : ℝ) : + ∫⁻ x', ∫⁻ y', (ball (Ω.center j) (Ω.radius j) ×ˢ ball (Ω.center j) (Ω.radius j)).indicator + (fun z : V × V => ‖g z.2 - g z.1‖ₑ ^ p.toReal / + ‖z.2 - z.1‖ₑ ^ (((finrank ℝ V - 1 : ℕ) : ℝ) + s * p.toReal)) + ((Ω.graph j).graphMap x', (Ω.graph j).graphMap y') ≤ + Ω.boundarySlobodeckijForm p s g := + (Ω.lintegral_lintegral_chart_le j (fun x y => (ball (Ω.center j) (Ω.radius j) ×ˢ + ball (Ω.center j) (Ω.radius j)).indicator (fun z : V × V => ‖g z.2 - g z.1‖ₑ ^ p.toReal / + ‖z.2 - z.1‖ₑ ^ (((finrank ℝ V - 1 : ℕ) : ℝ) + s * p.toReal)) (x, y)) + fun _ _ h => mem_prod.1 (mem_of_indicator_ne_zero h)).trans + (lintegral_mono fun x => lintegral_mono fun y => Set.indicator_le_self _ _ (x, y)) + +/-- The constant `(D_j (1 + M_j))^p c_1 + (2 D_j)^p c_2` of the Lipschitz part of a chart piece, +with `c_1 = Rd.ballRpowConst H_j (n - 1 + sp - p)`, `c_2 = Rd.complBallRpowConst H_j (n - 1 + sp)` +and the derivative bound `D_j = ψ.derivBound j`. -/ +noncomputable def chartLipschitzConst (p : ℝ≥0∞) (ψ : Ω.BoundaryPartition) (j : Fin Ω.N) (s : ℝ) : + ℝ≥0∞ := + ENNReal.ofReal (ψ.derivBound j * (1 + (Ω.graph j).M)) ^ p.toReal * + ballRpowConst (Ω.graph j).hyperplane + (((finrank ℝ V - 1 : ℕ) : ℝ) + s * p.toReal - p.toReal) + + ENNReal.ofReal (2 * ψ.derivBound j) ^ p.toReal * + complBallRpowConst (Ω.graph j).hyperplane (((finrank ℝ V - 1 : ℕ) : ℝ) + s * p.toReal) + +omit [Fact (1 ≤ p)] in +/-- The constant `Rd.BoundedLipschitzDomain.chartLipschitzConst` is finite for `0 < p < ∞` and +`0 < s < 1`. -/ +theorem chartLipschitzConst_ne_top (ψ : Ω.BoundaryPartition) (j : Fin Ω.N) (hp0 : p ≠ 0) + (hp : p ≠ ∞) {s : ℝ} (hs : 0 < s) (hs1 : s < 1) : Ω.chartLipschitzConst p ψ j s ≠ ∞ := by + have hP := ENNReal.toReal_pos hp0 hp + have hm := (Ω.graph j).finrank_hyperplane_eq_sub_one + refine ENNReal.add_ne_top.2 ⟨ENNReal.mul_ne_top (ENNReal.rpow_ne_top_of_nonneg hP.le + ENNReal.ofReal_ne_top) (ballRpowConst_ne_top ?_), ENNReal.mul_ne_top + (ENNReal.rpow_ne_top_of_nonneg hP.le ENNReal.ofReal_ne_top) (complBallRpowConst_ne_top ?_)⟩ + · rw [hm] + nlinarith + · rw [hm] + nlinarith + +omit [Fact (1 ≤ p)] in +/-- **The Lipschitz part of a chart piece**: for `0 < p < ∞` and `0 < s < 1`, +`∫_{H_j} ∫_{H_j} 1_{B_j}(γ x') |g(γ x')|^p |ψ_j(γ y') - ψ_j(γ x')|^p / |y' - x'|^(n-1+sp) dy' dx'` +is at most `K ∫_Γ |g|^p dσ` with `K = Rd.BoundedLipschitzDomain.chartLipschitzConst p ψ j s`: the +inner integral is at most `K` (`Rd.lintegral_rpow_div_norm_rpow_le`, with +`|ψ_j(γ y') - ψ_j(γ x')| ≤ min(D_j (1 + M_j) |y' - x'|, 2 D_j)`). -/ +theorem lintegral_lintegral_lipschitz_le (ψ : Ω.BoundaryPartition) (j : Fin Ω.N) (hp0 : p ≠ 0) + (hp : p ≠ ∞) {s : ℝ} (hs : 0 < s) (hs1 : s < 1) (g : V → ℂ) : + ∫⁻ x', ∫⁻ y', (ball (Ω.center j) (Ω.radius j)).indicator (fun y => ‖g y‖ₑ ^ p.toReal) + ((Ω.graph j).graphMap x') * + (‖ψ.toComplex j ((Ω.graph j).graphMap y') - ψ.toComplex j ((Ω.graph j).graphMap x')‖ₑ ^ + p.toReal / ‖y' - x'‖ₑ ^ (((finrank ℝ V - 1 : ℕ) : ℝ) + s * p.toReal)) ≤ + Ω.chartLipschitzConst p ψ j s * ∫⁻ y, ‖g y‖ₑ ^ p.toReal ∂Ω.surfaceMeasure := by + have hP := ENNReal.toReal_pos hp0 hp + have hm := (Ω.graph j).finrank_hyperplane_eq_sub_one + have hφγ : Continuous fun y' => ψ.toComplex j ((Ω.graph j).graphMap y') := + (ψ.contDiff_toComplex j).continuous.comp (Ω.graph j).continuous_graphMap + have hin : ∀ x', ∫⁻ y', ‖ψ.toComplex j ((Ω.graph j).graphMap y') - + ψ.toComplex j ((Ω.graph j).graphMap x')‖ₑ ^ p.toReal / + ‖y' - x'‖ₑ ^ (((finrank ℝ V - 1 : ℕ) : ℝ) + s * p.toReal) ≤ + Ω.chartLipschitzConst p ψ j s := fun x' => by + rw [← lintegral_add_right_eq_self _ x'] + simp only [add_sub_cancel_right] + refine lintegral_rpow_div_norm_rpow_le (fun z => ?_) (fun z => ?_) hP ?_ ?_ + · refine (ψ.enorm_toComplex_sub_le j _ _).trans ?_ + rw [ENNReal.ofReal_mul (norm_nonneg _ |>.trans (norm_le_of_iteratedFDeriv_le + (ψ.derivBound_spec j) 0)), mul_assoc] + refine mul_le_mul' le_rfl ((Ω.graph j).enorm_graphMap_sub_le (z + x') x' |>.trans ?_) + rw [add_sub_cancel_right] + · refine eNorm_sub_le.trans ?_ + rw [ENNReal.ofReal_mul zero_le_two, ENNReal.ofReal_ofNat, two_mul] + exact add_le_add (ψ.enorm_toComplex_le j _) (ψ.enorm_toComplex_le j _) + · rw [hm] + nlinarith + · rw [hm] + nlinarith + have hK : Ω.chartLipschitzConst p ψ j s ≠ ∞ := Ω.chartLipschitzConst_ne_top ψ j hp0 hp hs hs1 + calc _ = ∫⁻ x', (ball (Ω.center j) (Ω.radius j)).indicator (fun y => ‖g y‖ₑ ^ p.toReal) + ((Ω.graph j).graphMap x') * ∫⁻ y', ‖ψ.toComplex j ((Ω.graph j).graphMap y') - + ψ.toComplex j ((Ω.graph j).graphMap x')‖ₑ ^ p.toReal / + ‖y' - x'‖ₑ ^ (((finrank ℝ V - 1 : ℕ) : ℝ) + s * p.toReal) := + lintegral_congr fun x' => lintegral_const_mul _ (((hφγ.measurable.sub + measurable_const).eNorm.pow_const _).div + ((measurable_id.sub measurable_const).eNorm.pow_const _)) + _ ≤ ∫⁻ x', (ball (Ω.center j) (Ω.radius j)).indicator (fun y => ‖g y‖ₑ ^ p.toReal) + ((Ω.graph j).graphMap x') * Ω.chartLipschitzConst p ψ j s := + lintegral_mono fun x' => mul_le_mul' le_rfl (hin x') + _ ≤ (∫⁻ y, ‖g y‖ₑ ^ p.toReal ∂Ω.surfaceMeasure) * Ω.chartLipschitzConst p ψ j s := by + rw [lintegral_mul_const' _ _ hK] + exact mul_le_mul' ((Ω.lintegral_chart_le j _ fun _ h => mem_of_indicator_ne_zero h).trans + (lintegral_mono (Set.indicator_le_self _ _))) le_rfl + _ = _ := mul_comm _ _ + +/-- **The Gagliardo form of a chart piece, split into its parts**: if `ψ_j` vanishes outside +`B(c_j, r)` with `r ≤ r_j` and `g` is measurable, then for `1 ≤ p < ∞` and `s ≥ 0` the Gagliardo +form on `H_j` of `G = (ψ_j g) ∘ γ_j` is at most `2^(p-1) (∫∫ A + ∫∫ B) + 2 ∫∫ |G(x')|^p k(y' - x')` +for the parts of `Rd.BoundedLipschitzDomain.chartPiece_integrand_le_add`; the last part appears +twice by Tonelli's theorem. -/ +theorem slobodeckijForm_chartPiece_le (ψ : Ω.BoundaryPartition) (j : Fin Ω.N) {r : ℝ} + (hr : r ≤ Ω.radius j) (hsub : ∀ y, ψ.toFun j y ≠ 0 → y ∈ ball (Ω.center j) r) (hp : p ≠ ∞) + {s : ℝ} (hs : 0 ≤ s) {g : V → ℂ} (hg : Measurable g) : + slobodeckijForm p s (fun x' => ψ.toComplex j ((Ω.graph j).graphMap x') * + g ((Ω.graph j).graphMap x')) ≤ + 2 ^ (p.toReal - 1) * (ENNReal.ofReal (ψ.derivBound j) ^ p.toReal * + ENNReal.ofReal (1 + (Ω.graph j).M) ^ (((finrank ℝ V - 1 : ℕ) : ℝ) + s * p.toReal) * + (∫⁻ x', ∫⁻ y', (ball (Ω.center j) (Ω.radius j) ×ˢ + ball (Ω.center j) (Ω.radius j)).indicator + (fun z : V × V => ‖g z.2 - g z.1‖ₑ ^ p.toReal / + ‖z.2 - z.1‖ₑ ^ (((finrank ℝ V - 1 : ℕ) : ℝ) + s * p.toReal)) + ((Ω.graph j).graphMap x', (Ω.graph j).graphMap y')) + + ∫⁻ x', ∫⁻ y', (ball (Ω.center j) (Ω.radius j)).indicator (fun y => ‖g y‖ₑ ^ p.toReal) + ((Ω.graph j).graphMap x') * + (‖ψ.toComplex j ((Ω.graph j).graphMap y') - ψ.toComplex j ((Ω.graph j).graphMap x')‖ₑ ^ + p.toReal / ‖y' - x'‖ₑ ^ (((finrank ℝ V - 1 : ℕ) : ℝ) + s * p.toReal))) + + 2 * ∫⁻ x', ∫⁻ y', ‖ψ.toComplex j ((Ω.graph j).graphMap x') * + g ((Ω.graph j).graphMap x')‖ₑ ^ p.toReal * + (ball (0 : (Ω.graph j).hyperplane) ((Ω.radius j - r) / (1 + (Ω.graph j).M)))ᶜ.indicator + (fun z => ‖z‖ₑ ^ (-(((finrank ℝ V - 1 : ℕ) : ℝ) + s * p.toReal))) (y' - x') := by + have hP1 : 1 ≤ p.toReal := ENNReal.one_le_toReal_of_one_le Fact.out hp + have ha : 0 ≤ ((finrank ℝ V - 1 : ℕ) : ℝ) + s * p.toReal := by positivity + have hγ := (Ω.graph j).continuous_graphMap.measurable + have hφγ : Measurable fun y' => ψ.toComplex j ((Ω.graph j).graphMap y') := + (ψ.contDiff_toComplex j).continuous.measurable.comp hγ + have hG : Measurable fun x' => ψ.toComplex j ((Ω.graph j).graphMap x') * + g ((Ω.graph j).graphMap x') := hφγ.mul (hg.comp hγ) + have hk : Measurable ((ball (0 : (Ω.graph j).hyperplane) + ((Ω.radius j - r) / (1 + (Ω.graph j).M)))ᶜ.indicator + fun z => ‖z‖ₑ ^ (-(((finrank ℝ V - 1 : ℕ) : ℝ) + s * p.toReal))) := + (measurable_eNorm.pow_const _).indicator measurableSet_ball.compl + have hT : Measurable (Function.uncurry fun x' y' : (Ω.graph j).hyperplane => + ‖ψ.toComplex j ((Ω.graph j).graphMap x') * g ((Ω.graph j).graphMap x')‖ₑ ^ p.toReal * + (ball (0 : (Ω.graph j).hyperplane) ((Ω.radius j - r) / (1 + (Ω.graph j).M)))ᶜ.indicator + (fun z => ‖z‖ₑ ^ (-(((finrank ℝ V - 1 : ℕ) : ℝ) + s * p.toReal))) (y' - x')) := + ((hG.comp measurable_fst).eNorm.pow_const p.toReal).mul + (hk.comp (measurable_snd.sub measurable_fst)) + have hT' : Measurable (Function.uncurry fun x' y' : (Ω.graph j).hyperplane => + ‖ψ.toComplex j ((Ω.graph j).graphMap y') * g ((Ω.graph j).graphMap y')‖ₑ ^ p.toReal * + (ball (0 : (Ω.graph j).hyperplane) ((Ω.radius j - r) / (1 + (Ω.graph j).M)))ᶜ.indicator + (fun z => ‖z‖ₑ ^ (-(((finrank ℝ V - 1 : ℕ) : ℝ) + s * p.toReal))) (x' - y')) := + ((hG.comp measurable_snd).eNorm.pow_const p.toReal).mul + (hk.comp (measurable_fst.sub measurable_snd)) + have hB : Measurable (Function.uncurry fun x' y' : (Ω.graph j).hyperplane => + (ball (Ω.center j) (Ω.radius j)).indicator (fun y => ‖g y‖ₑ ^ p.toReal) + ((Ω.graph j).graphMap x') * + (‖ψ.toComplex j ((Ω.graph j).graphMap y') - ψ.toComplex j ((Ω.graph j).graphMap x')‖ₑ ^ + p.toReal / ‖y' - x'‖ₑ ^ (((finrank ℝ V - 1 : ℕ) : ℝ) + s * p.toReal))) := + ((((hg.eNorm.pow_const p.toReal).indicator measurableSet_ball).comp hγ).comp + measurable_fst).mul ((((hφγ.comp measurable_snd).sub + (hφγ.comp measurable_fst)).eNorm.pow_const p.toReal).div + ((measurable_snd.sub measurable_fst).eNorm.pow_const _)) + rw [slobodeckijForm, (Ω.graph j).finrank_hyperplane_eq_sub_one] + refine (lintegral_mono fun x' => lintegral_mono fun y' => + Ω.chartPiece_integrand_le_add ψ j hr hsub hP1 ha g x' y').trans (le_of_eq ?_) + rw [lintegral_lintegral_add_right _ hT', lintegral_lintegral_add_right _ hT, + lintegral_lintegral_swap hT'.aemeasurable, + lintegral_lintegral_const_mul' (ENNReal.two_rpow_ne_top _), lintegral_lintegral_add_right _ hB, + lintegral_lintegral_const_mul' (ENNReal.mul_ne_top + (ENNReal.rpow_ne_top_of_nonneg (by linarith) ENNReal.ofReal_ne_top) + (ENNReal.rpow_ne_top_of_nonneg ha ENNReal.ofReal_ne_top)), add_assoc, ← two_mul] + +/-- **The Gagliardo form of a chart piece by the form on `Γ`**: for `1 ≤ p < ∞`, `0 < s < 1`, a +resolution of unity `ψ` and a chart `j` there is `K < ∞` such that for every measurable `g` the +Gagliardo form on `H_j` of `G = (ψ_j g) ∘ γ_j` is at most +`K (∫_Γ |g|^p dσ + ∫_Γ ∫_Γ |g(y) - g(x)|^p / |y - x|^(n-1+sp) dσ dσ)`. The parts of +`Rd.BoundedLipschitzDomain.slobodeckijForm_chartPiece_le` are bounded by +`Rd.BoundedLipschitzDomain.lintegral_lintegral_inside_le`, +`Rd.BoundedLipschitzDomain.lintegral_lintegral_lipschitz_le`, +`Rd.lintegral_lintegral_mul_indicator_le` and +`Rd.BoundedLipschitzDomain.lintegral_chartPiece_le`. -/ +theorem exists_slobodeckijForm_chartPiece_le (ψ : Ω.BoundaryPartition) (j : Fin Ω.N) + (hp : p ≠ ∞) {s : ℝ} (hs : 0 < s) (hs1 : s < 1) : + ∃ K : ℝ≥0∞, K ≠ ∞ ∧ ∀ g : V → ℂ, Measurable g → + slobodeckijForm p s (fun x' => ψ.toComplex j ((Ω.graph j).graphMap x') * + g ((Ω.graph j).graphMap x')) ≤ + K * (∫⁻ y, ‖g y‖ₑ ^ p.toReal ∂Ω.surfaceMeasure + Ω.boundarySlobodeckijForm p s g) := by + have hp0 : p ≠ 0 := (zero_lt_one.trans_le Fact.out).ne' + have hP := ENNReal.toReal_pos hp0 hp + have hP1 : 1 ≤ p.toReal := ENNReal.one_le_toReal_of_one_le Fact.out hp + have ha : 0 ≤ ((finrank ℝ V - 1 : ℕ) : ℝ) + s * p.toReal := by positivity + have hM : 0 < 1 + (Ω.graph j).M := by linarith [(Ω.graph j).M_nonneg] + obtain ⟨r, hr, hsub⟩ := exists_lt_subset_ball (isClosed_tsupport _) (ψ.tsupport_subset j) + have hη : 0 < (Ω.radius j - r) / (1 + (Ω.graph j).M) := div_pos (sub_pos.2 hr) hM + have hma : (finrank ℝ (Ω.graph j).hyperplane : ℝ) < + ((finrank ℝ V - 1 : ℕ) : ℝ) + s * p.toReal := by + rw [(Ω.graph j).finrank_hyperplane_eq_sub_one] + exact lt_add_of_pos_right _ (mul_pos hs hP) + have h2 : (2 : ℝ≥0∞) ^ (p.toReal - 1) ≠ ∞ := + ENNReal.two_rpow_ne_top _ + have hD : ENNReal.ofReal (ψ.derivBound j) ^ p.toReal ≠ ∞ := + ENNReal.rpow_ne_top_of_nonneg hP.le ENNReal.ofReal_ne_top + have hc : ENNReal.ofReal (1 + (Ω.graph j).M) ^ (((finrank ℝ V - 1 : ℕ) : ℝ) + s * p.toReal) ≠ ∞ := + ENNReal.rpow_ne_top_of_nonneg ha ENNReal.ofReal_ne_top + have hI : complBallRpowConst (Ω.graph j).hyperplane + (((finrank ℝ V - 1 : ℕ) : ℝ) + s * p.toReal) * + ENNReal.ofReal ((Ω.radius j - r) / (1 + (Ω.graph j).M)) ^ + ((finrank ℝ (Ω.graph j).hyperplane : ℝ) - + (((finrank ℝ V - 1 : ℕ) : ℝ) + s * p.toReal)) ≠ ∞ := + ENNReal.mul_ne_top (complBallRpowConst_ne_top hma) + (ENNReal.rpow_ne_top_of_ne_zero (ENNReal.ofReal_pos.2 hη).ne' ENNReal.ofReal_ne_top) + refine ⟨2 ^ (p.toReal - 1) * (ENNReal.ofReal (ψ.derivBound j) ^ p.toReal * + ENNReal.ofReal (1 + (Ω.graph j).M) ^ (((finrank ℝ V - 1 : ℕ) : ℝ) + s * p.toReal)) + + 2 ^ (p.toReal - 1) * Ω.chartLipschitzConst p ψ j s + + 2 * (complBallRpowConst (Ω.graph j).hyperplane (((finrank ℝ V - 1 : ℕ) : ℝ) + s * p.toReal) * + ENNReal.ofReal ((Ω.radius j - r) / (1 + (Ω.graph j).M)) ^ + ((finrank ℝ (Ω.graph j).hyperplane : ℝ) - (((finrank ℝ V - 1 : ℕ) : ℝ) + s * p.toReal))) * + ENNReal.ofReal (ψ.derivBound j) ^ p.toReal, + ENNReal.add_ne_top.2 ⟨ENNReal.add_ne_top.2 ⟨ENNReal.mul_ne_top h2 (ENNReal.mul_ne_top hD hc), + ENNReal.mul_ne_top h2 (Ω.chartLipschitzConst_ne_top ψ j hp0 hp hs hs1)⟩, + ENNReal.mul_ne_top (ENNReal.mul_ne_top ENNReal.ofNat_ne_top hI) hD⟩, fun g hg => ?_⟩ + have hT := (lintegral_lintegral_mul_indicator_le (fun x' => ‖ψ.toComplex j + ((Ω.graph j).graphMap x') * g ((Ω.graph j).graphMap x')‖ₑ ^ p.toReal) hη hma).trans + (mul_le_mul' le_rfl (Ω.lintegral_chartPiece_le ψ j hP g)) + refine (Ω.slobodeckijForm_chartPiece_le ψ j hr.le (fun y hy => hsub (subset_tsupport _ hy)) hp + hs.le hg).trans ?_ + calc _ ≤ 2 ^ (p.toReal - 1) * (ENNReal.ofReal (ψ.derivBound j) ^ p.toReal * + ENNReal.ofReal (1 + (Ω.graph j).M) ^ (((finrank ℝ V - 1 : ℕ) : ℝ) + s * p.toReal) * + Ω.boundarySlobodeckijForm p s g + + Ω.chartLipschitzConst p ψ j s * ∫⁻ y, ‖g y‖ₑ ^ p.toReal ∂Ω.surfaceMeasure) + + 2 * (complBallRpowConst (Ω.graph j).hyperplane + (((finrank ℝ V - 1 : ℕ) : ℝ) + s * p.toReal) * + ENNReal.ofReal ((Ω.radius j - r) / (1 + (Ω.graph j).M)) ^ + ((finrank ℝ (Ω.graph j).hyperplane : ℝ) - + (((finrank ℝ V - 1 : ℕ) : ℝ) + s * p.toReal)) * + (ENNReal.ofReal (ψ.derivBound j) ^ p.toReal * + ∫⁻ y, ‖g y‖ₑ ^ p.toReal ∂Ω.surfaceMeasure)) := + add_le_add (mul_le_mul' le_rfl (add_le_add + (mul_le_mul' le_rfl (Ω.lintegral_lintegral_inside_le j g p s)) + (Ω.lintegral_lintegral_lipschitz_le ψ j hp0 hp hs hs1 g))) (mul_le_mul' le_rfl hT) + _ ≤ _ := (le_of_eq (by ring)).trans (ENNReal.mul_add_mul_add_mul_le _ _ _ _ _) + +/-- **The chart-wise Besov norm by the Gagliardo form** (the lower half of Gagliardo's description +of `B^s_{p,p}(Γ)`): for `1 ≤ p < ∞`, `0 < s < 1` and a resolution of unity `ψ` there is `C < ∞` +with `‖g‖_{B^s_{p,p}(Γ)}^p ≤ C (‖g‖_{L_p(Γ)}^p + ∫_Γ ∫_Γ |g(y) - g(x)|^p / |y - x|^(n-1+sp) dσ dσ)` +for every `g` measurable on `Γ`. If `g ∈ L_p(Γ)`, every chart piece `G_j = (ψ_j g) ∘ γ_j` lies in +`L_p(H_j)` (`Rd.BoundedLipschitzDomain.lintegral_chartPiece_le`), its first-difference norm is +bounded by its Gagliardo form on `H_j` (`Rd.lqNorm_modulus_rpow_le_slobodeckijForm`), and that by +the form on `Γ` (`Rd.BoundedLipschitzDomain.exists_slobodeckijForm_chartPiece_le`). -/ +theorem exists_boundaryBesovNorm_rpow_le (ψ : Ω.BoundaryPartition) (hp : p ≠ ∞) {s : ℝ} + (hs : 0 < s) (hs1 : s < 1) : + ∃ C : ℝ≥0∞, C ≠ ∞ ∧ ∀ g : V → ℂ, AEStronglyMeasurable g Ω.surfaceMeasure → + Ω.boundaryBesovNorm p ψ s p g ^ p.toReal ≤ + C * (eLpNorm g p Ω.surfaceMeasure ^ p.toReal + Ω.boundarySlobodeckijForm p s g) := by + have hp0 : p ≠ 0 := (zero_lt_one.trans_le Fact.out).ne' + have hP := ENNReal.toReal_pos hp0 hp + have hP1 : 1 ≤ p.toReal := ENNReal.one_le_toReal_of_one_le Fact.out hp + choose K hK hle using fun j => Ω.exists_slobodeckijForm_chartPiece_le ψ j hp hs hs1 + refine ⟨((Finset.univ : Finset (Fin Ω.N)).card : ℝ≥0∞) ^ (p.toReal - 1) * + ∑ j, 2 ^ (p.toReal - 1) * (ENNReal.ofReal (ψ.derivBound j) ^ p.toReal + + slobodeckijConstUpper (Ω.graph j).hyperplane p s * K j) + 1, + ENNReal.add_ne_top.2 ⟨ENNReal.mul_ne_top (ENNReal.rpow_ne_top_of_nonneg (by linarith) + (ENNReal.natCast_ne_top _)) (ENNReal.sum_ne_top.2 fun j _ => ENNReal.mul_ne_top + (ENNReal.two_rpow_ne_top _) + (ENNReal.add_ne_top.2 ⟨ENNReal.rpow_ne_top_of_nonneg hP.le ENNReal.ofReal_ne_top, + ENNReal.mul_ne_top (slobodeckijConstUpper_ne_top hp0 hp hs) (hK j)⟩)), + ENNReal.one_ne_top⟩, fun g hg => ?_⟩ + have hgm : Measurable (hg.mk g) := hg.stronglyMeasurable_mk.measurable + rw [Ω.boundaryBesovNorm_congr ψ (Ω.ae_surfaceMeasure_iff_aeBoundary.1 hg.ae_eq_mk), + eLpNorm_congr_ae hg.ae_eq_mk, Ω.boundarySlobodeckijForm_congr_ae hg.ae_eq_mk, + eLpNorm_rpow_eq hgm.aestronglyMeasurable hp0 hp] + by_cases hX : ∫⁻ y, ‖hg.mk g y‖ₑ ^ p.toReal ∂Ω.surfaceMeasure = ∞ + · rw [hX, top_add, ENNReal.mul_top (by positivity)] + exact le_top + have hmem : ∀ j, MemLp (fun x' => ψ.toComplex j ((Ω.graph j).graphMap x') * + hg.mk g ((Ω.graph j).graphMap x')) p volume := fun j => + memLp_iff.2 ((eLpNorm_lt_top_iff_lintegral_rpow_eNorm_lt_top hp0 hp + ((((ψ.contDiff_toComplex j).continuous.comp (Ω.graph j).continuous_graphMap).measurable.mul + (hgm.comp (Ω.graph j).continuous_graphMap.measurable)).aestronglyMeasurable)).2 + ((Ω.lintegral_chartPiece_le ψ j hP _).trans_lt (ENNReal.mul_lt_top + (ENNReal.rpow_lt_top_of_nonneg hP.le ENNReal.ofReal_ne_top) (lt_top_iff_ne_top.2 hX)))) + have hj : ∀ j (G : Lp ℂ p (volume : Measure (Ω.graph j).hyperplane)), + (G : (Ω.graph j).hyperplane → ℂ) =ᵐ[volume] (fun x' => ψ.toComplex j + ((Ω.graph j).graphMap x') * hg.mk g ((Ω.graph j).graphMap x')) → + (‖G‖ₑ + lqNorm p (fun k => dyadicWeight s k * lpModulus p 1 G k)) ^ p.toReal ≤ + 2 ^ (p.toReal - 1) * ((ENNReal.ofReal (ψ.derivBound j) ^ p.toReal + + slobodeckijConstUpper (Ω.graph j).hyperplane p s * K j) * + (∫⁻ y, ‖hg.mk g y‖ₑ ^ p.toReal ∂Ω.surfaceMeasure + + Ω.boundarySlobodeckijForm p s (hg.mk g))) := by + intro j G hG + have hGP : ‖G‖ₑ ^ p.toReal ≤ ENNReal.ofReal (ψ.derivBound j) ^ p.toReal * + ∫⁻ y, ‖hg.mk g y‖ₑ ^ p.toReal ∂Ω.surfaceMeasure := by + have hGP' : ∫⁻ x', ‖G x'‖ₑ ^ p.toReal = ∫⁻ x', ‖ψ.toComplex j ((Ω.graph j).graphMap x') * + hg.mk g ((Ω.graph j).graphMap x')‖ₑ ^ p.toReal := + lintegral_congr_ae (hG.mono fun x' hx' => by dsimp only; rw [hx']) + rw [Lp.eNorm_def, eLpNorm_rpow_eq (Lp.aestronglyMeasurable G) hp0 hp, hGP'] + exact Ω.lintegral_chartPiece_le ψ j hP _ + have hL := (lqNorm_modulus_rpow_le_slobodeckijForm hp hs G).trans (mul_le_mul' le_rfl + ((slobodeckijForm_congr_ae hG p s).trans_le (hle j _ hgm))) + calc _ ≤ 2 ^ (p.toReal - 1) * (‖G‖ₑ ^ p.toReal + + lqNorm p (fun k => dyadicWeight s k * lpModulus p 1 G k) ^ p.toReal) := + ENNReal.rpow_add_le_mul_rpow_add_rpow _ _ hP1 + _ ≤ _ := mul_le_mul' le_rfl ((add_le_add hGP hL).trans (by + rw [add_mul, mul_assoc] + exact add_le_add (mul_le_mul' le_rfl le_self_add) le_rfl)) + rw [Ω.boundaryBesovNorm_eq_sum ψ (fun j => (hmem j).toLp _) fun j => (hmem j).coeFn_toLp] + calc _ ≤ ((Finset.univ : Finset (Fin Ω.N)).card : ℝ≥0∞) ^ (p.toReal - 1) * ∑ j, + (‖(hmem j).toLp _‖ₑ + lqNorm p (fun k => dyadicWeight s k * lpModulus p 1 + ((hmem j).toLp _) k)) ^ p.toReal := + ENNReal.rpow_sum_le_const_mul_sum_rpow (s := Finset.univ) (f := fun j => + ‖(hmem j).toLp _‖ₑ + lqNorm p (fun k => dyadicWeight s k * lpModulus p 1 + ((hmem j).toLp _) k)) hP1 + _ ≤ _ := mul_le_mul' le_rfl (Finset.sum_le_sum fun j _ => hj j _ (hmem j).coeFn_toLp) + _ = (((Finset.univ : Finset (Fin Ω.N)).card : ℝ≥0∞) ^ (p.toReal - 1) * + ∑ j, 2 ^ (p.toReal - 1) * (ENNReal.ofReal (ψ.derivBound j) ^ p.toReal + + slobodeckijConstUpper (Ω.graph j).hyperplane p s * K j)) * + (∫⁻ y, ‖hg.mk g y‖ₑ ^ p.toReal ∂Ω.surfaceMeasure + + Ω.boundarySlobodeckijForm p s (hg.mk g)) := by + simp only [← mul_assoc, ← Finset.sum_mul] + _ ≤ _ := mul_le_mul' le_self_add le_rfl + +/-! ### Gagliardo's description of `B^s_{p,p}(Γ)` and of the trace space -/ + +/-- **Gagliardo's description of `B^s_{p,p}(Γ)`** (Gagliardo 1957): for `1 ≤ p < ∞`, `0 < s < 1`, +a resolution of unity `ψ` and `g ∈ L_p(Γ)`, `g ∈ B^s_{p,p}(Γ)` iff +`∫_Γ ∫_Γ |g(y) - g(x)|^p / |y - x|^(n-1+sp) dσ(y) dσ(x) < ∞`, that is, the chart-wise space +`B^s_{p,p}(Γ)` is the Sobolev–Slobodeckij space `W^{s,p}(Γ)` defined by the surface measure +(`Rd.BoundedLipschitzDomain.exists_boundarySlobodeckijForm_le`, +`Rd.BoundedLipschitzDomain.exists_boundaryBesovNorm_rpow_le`). -/ +theorem memBoundaryBesov_iff_boundarySlobodeckijForm_lt_top (ψ : Ω.BoundaryPartition) + (hp : p ≠ ∞) {s : ℝ} (hs : 0 < s) (hs1 : s < 1) {g : V → ℂ} + (hg : MemLp g p Ω.surfaceMeasure) : + Ω.MemBoundaryBesov p ψ s p g ↔ Ω.boundarySlobodeckijForm p s g < ∞ := by + have hp0 : p ≠ 0 := (zero_lt_one.trans_le Fact.out).ne' + have hP := ENNReal.toReal_pos hp0 hp + obtain ⟨C₁, hC₁, h₁⟩ := Ω.exists_boundarySlobodeckijForm_le ψ hp hs + obtain ⟨C₂, hC₂, h₂⟩ := Ω.exists_boundaryBesovNorm_rpow_le ψ hp hs hs1 + rw [Ω.memBoundaryBesov_iff_boundaryBesovNorm_lt_top ψ] + refine ⟨fun h => (h₁ g).trans_lt (ENNReal.mul_lt_top hC₁.lt_top + (ENNReal.rpow_lt_top_of_nonneg hP.le h.ne)), fun h => ?_⟩ + rw [← ENNReal.rpow_lt_top_iff_of_pos hP] + exact (h₂ g hg.aestronglyMeasurable).trans_lt (ENNReal.mul_lt_top hC₂.lt_top + (ENNReal.add_lt_top.2 ⟨ENNReal.rpow_lt_top_of_nonneg hP.le hg.eLpNorm_lt_top.ne, h⟩)) + +/-- **The norm of `H^{1/2}(Γ)` by the Sobolev–Slobodeckij norm**: there is `C < ∞` with +`‖t‖² ≤ C (‖τ t‖²_{L_2(Γ)} + ∫_Γ ∫_Γ |τ t(y) - τ t(x)|² / |y - x|^n dσ(y) dσ(x))` and the reverse +bound `‖τ t‖²_{L_2(Γ)} + ∫_Γ ∫_Γ … ≤ C ‖t‖²` for every `t ∈ H^{1/2}(Γ)` and its trace +`τ t ∈ L_2(Γ)`, `n = dim V`: the norm of the trace space is equivalent to Gagliardo's norm of +`W^{1/2,2}(Γ)`. It combines the equivalence with the chart-wise norm of `B^{1/2}_{2,2}(Γ)` +(`Rd.BoundedLipschitzDomain.exists_traceL2_norm_equiv`) with +`Rd.BoundedLipschitzDomain.exists_boundarySlobodeckijForm_le`, +`Rd.BoundedLipschitzDomain.exists_boundaryBesovNorm_rpow_le` and the boundedness of `τ`. -/ +theorem exists_traceL2_norm_equiv_slobodeckij : + ∃ C : ℝ≥0∞, C ≠ ∞ ∧ ∀ t : Ω.TraceSpace, + ‖t‖ₑ ^ 2 ≤ C * (‖Ω.traceL2 t‖ₑ ^ 2 + Ω.boundarySlobodeckijForm 2 (1 / 2) (Ω.traceL2 t)) ∧ + ‖Ω.traceL2 t‖ₑ ^ 2 + Ω.boundarySlobodeckijForm 2 (1 / 2) (Ω.traceL2 t) ≤ + C * ‖t‖ₑ ^ 2 := by + obtain ⟨C₁, hC₁, h₁⟩ := Ω.exists_traceL2_norm_equiv Ω.boundaryPartition + obtain ⟨C₂, hC₂, h₂⟩ := Ω.exists_boundarySlobodeckijForm_le (p := 2) Ω.boundaryPartition + two_ne_top (s := 1 / 2) (by norm_num) + obtain ⟨C₃, hC₃, h₃⟩ := Ω.exists_boundaryBesovNorm_rpow_le (p := 2) Ω.boundaryPartition + two_ne_top (s := 1 / 2) (by norm_num) (by norm_num) + simp only [ENNReal.toReal_ofNat, ENNReal.rpow_two] at h₂ h₃ + refine ⟨C₁ ^ 2 * C₃ + (‖Ω.traceL2‖ₑ ^ 2 + C₂ * C₁ ^ 2), ENNReal.add_ne_top.2 + ⟨ENNReal.mul_ne_top (ENNReal.pow_ne_top hC₁) hC₃, ENNReal.add_ne_top.2 + ⟨ENNReal.pow_ne_top eNorm_ne_top, ENNReal.mul_ne_top hC₂ (ENNReal.pow_ne_top hC₁)⟩⟩, + fun t => ⟨?_, ?_⟩⟩ + · calc ‖t‖ₑ ^ 2 ≤ (C₁ * Ω.boundaryBesovNorm 2 Ω.boundaryPartition (1 / 2) 2 (Ω.traceL2 t)) ^ 2 := + pow_le_pow_left₀ zero_le (h₁ t).1 2 + _ ≤ C₁ ^ 2 * (C₃ * (‖Ω.traceL2 t‖ₑ ^ 2 + + Ω.boundarySlobodeckijForm 2 (1 / 2) (Ω.traceL2 t))) := by + rw [mul_pow, Lp.eNorm_def] + exact mul_le_mul' le_rfl (h₃ _ (Lp.aestronglyMeasurable _)) + _ ≤ _ := by + rw [← mul_assoc] + exact mul_le_mul' le_self_add le_rfl + · calc _ ≤ (‖Ω.traceL2‖ₑ * ‖t‖ₑ) ^ 2 + C₂ * (C₁ * ‖t‖ₑ) ^ 2 := + add_le_add (pow_le_pow_left₀ zero_le (Ω.traceL2.le_opENorm t) 2) + ((h₂ _).trans (mul_le_mul' le_rfl (pow_le_pow_left₀ zero_le (h₁ t).2 2))) + _ = (‖Ω.traceL2‖ₑ ^ 2 + C₂ * C₁ ^ 2) * ‖t‖ₑ ^ 2 := by ring + _ ≤ _ := mul_le_mul' le_add_self le_rfl + +/-- **The range of `H^{1/2}(Γ) → L_2(Γ)` by the Gagliardo form**: `g ∈ L_2(Γ)` is the trace `τ t` +of some `t ∈ H^{1/2}(Γ)` iff `∫_Γ ∫_Γ |g(y) - g(x)|² / |y - x|^n dσ(y) dσ(x) < ∞` +(`Rd.BoundedLipschitzDomain.mem_range_traceL2_iff`, +`Rd.BoundedLipschitzDomain.memBoundaryBesov_iff_boundarySlobodeckijForm_lt_top`). -/ +theorem mem_range_traceL2_iff_slobodeckij (g : Ω.BoundaryL2) : + g ∈ LinearMap.range (Ω.traceL2 : Ω.TraceSpace →ₗ[ℂ] Ω.BoundaryL2) ↔ + Ω.boundarySlobodeckijForm 2 (1 / 2) g < ∞ := by + rw [Ω.mem_range_traceL2_iff Ω.boundaryPartition] + exact Ω.memBoundaryBesov_iff_boundarySlobodeckijForm_lt_top _ two_ne_top (by norm_num) + (by norm_num) (Lp.memLp g) + +end BoundedLipschitzDomain + +end Rd diff --git a/LeanPool/FunctionSpaces/Domains/Traces/BoundaryTraceSpace.lean b/LeanPool/FunctionSpaces/Domains/Traces/BoundaryTraceSpace.lean new file mode 100644 index 0000000000..4ab7d84efc --- /dev/null +++ b/LeanPool/FunctionSpaces/Domains/Traces/BoundaryTraceSpace.lean @@ -0,0 +1,724 @@ +/- +Copyright (c) 2026 Mario Ullrich. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Mario Ullrich +-/ +module + +public import LeanPool.FunctionSpaces.Domains.Sobolev.LipschitzDomainH1 +public import Mathlib.Analysis.InnerProductSpace.Adjoint + +/- +Modified for Lean Pool: module names and imports adapted. +-/ + +/-! +# The trace space of a bounded Lipschitz domain + +Let `Ω` be a bounded Lipschitz domain with boundary `Γ` in a finite-dimensional real inner +product space `V`, such as `ℝ^d`, with Lebesgue measure, and `H^1(Ω)` the Hilbert space +`Rd.RestrictionSpace 1 Ω` (`Rd.BoundedLipschitzDomain.SobolevOne`). The trace space +`H^{1/2}(Γ)` is defined as the orthogonal complement of the trace kernel in `H^1(Ω)`, a Hilbert +space; the trace, the extension and the quotient isometry below hold by this definition. Its +norm is equivalent to the norm of `B^{1/2}_{2,2}(Γ)` +(`Rd.BoundedLipschitzDomain.exists_traceL2_norm_equiv`). + +* **`H^1(V)` in Besov spaces, with constants**: for `U ∈ H^1(V)` with `L_2` function `ι U` + (`Rd.toL2`), `‖ι U‖_2 + ‖(2^k ω_2(ι U, 2^(-k))_2)_k‖_{ℓ_2} ≤ C ‖U‖` with an explicit `C` + (`Rd.modNorm_two_le_norm`), and the `B^{1/2}_{2,1}` quantity is at most `√2` times the + `B^1_{2,2}` quantity (`Rd.modNorm_half_one_le`, by the Cauchy–Schwarz inequality + `ENNReal.lqNorm_one_mul_le` and `‖(2^(-k/2))_k‖_{ℓ_2} = √2`, + `ENNReal.lqNorm_two_dyadicWeight_neg_half`); together `H^1(V) ⊆ B^{1/2}_{2,1}(V)` with + constant `√2 C` (`Rd.modNorm_half_one_le_norm`). Conversely + `‖U‖ ≤ C' (‖ι U‖_2 + ‖(2^k ω_2(ι U, 2^(-k))_2)_k‖_{ℓ_2})` with an explicit `C'` + (`Rd.enorm_le_modNorm_two`). The trace of `H^1(V)` on one Lipschitz + graph is bounded (`Rd.LipschitzGraph.exists_enorm_trace_toL2_le`): a bounded operator + `H^1(V) → L_2(H)` (`Rd.LipschitzGraph.traceH1`), equal to `w ∘ γ` for Schwartz functions `w` + (`Rd.LipschitzGraph.traceH1_ofSchwartz_ae`). +* **Chart traces**: `u ↦ Tr_j(ψ_j u)` is a bounded operator from `H^1(Ω)` to `L_2` of the + hyperplane of the chart `j` (`Rd.BoundedLipschitzDomain.chartTrace`), for the canonical + resolution of unity `Rd.BoundedLipschitzDomain.boundaryPartition`. +* **The trace kernel**: `Rd.BoundedLipschitzDomain.traceKer` is the closed subspace of the + `u ∈ H^1(Ω)` whose boundary trace vanishes almost everywhere on `Γ`, for every resolution of + unity (`Rd.BoundedLipschitzDomain.mem_traceKer_iff`). +* **The trace space** `H^{1/2}(Γ)` is its orthogonal complement + (`Rd.BoundedLipschitzDomain.TraceSpace`), with the trace `Rd.BoundedLipschitzDomain.trace`, the + orthogonal projection, and the extension `Rd.BoundedLipschitzDomain.extend`, the inclusion: + `trace ∘ extend = id`, both have norm at most `1`, the kernel of the trace is the trace kernel, + and `H^1(Ω) ⧸ traceKer ≅ H^{1/2}(Γ)` isometrically + (`Rd.BoundedLipschitzDomain.quotientEquivTraceSpace`). Two elements of `H^1(Ω)` have the same + trace iff their boundary traces agree almost everywhere on `Γ` + (`Rd.BoundedLipschitzDomain.trace_eq_iff`), and the boundary traces of the elements of the trace + space are the functions of `B^{1/2}_{2,2}(Γ)` + (`Rd.BoundedLipschitzDomain.memBoundaryBesov_extend`, + `Rd.BoundedLipschitzDomain.exists_traceSpace_of_memBoundaryBesov`). +* **`H^{-1/2}(Γ)`** is the dual of the trace space (`Rd.BoundedLipschitzDomain.DualTraceSpace`), + conjugate-linearly isometric to it by Riesz (`Rd.BoundedLipschitzDomain.dualTraceEquiv`), and + the adjoint of the trace is the extension (`Rd.BoundedLipschitzDomain.adjoint_trace`). +-/ + +@[expose] public section + +open MeasureTheory Filter Topology TopologicalSpace Metric +open scoped ENNReal SchwartzMap BesselPotentialSpace InnerProductSpace +open TemperedDistribution (besselPotential) +open ENNReal (lqNorm dyadicWeight) + +/-! ### A sum of dyadic weights -/ + +namespace ENNReal + +/-- `‖(2^(-k/2))_k‖_{ℓ_2} = √2`, since `∑_k 2^(-k) = 2`. -/ +theorem lqNorm_two_dyadicWeight_neg_half : + lqNorm 2 (dyadicWeight (-(1 / 2))) = 2 ^ (1 / 2 : ℝ) := by + rw [ENNReal.lqNorm_eq_tsum two_ne_zero ENNReal.ofNat_ne_top, ENNReal.toReal_ofNat] + simp_rw [ENNReal.dyadicWeight_rpow] + norm_num [ENNReal.tsum_dyadicWeight_neg_one] + +end ENNReal + +namespace Rd + +variable {V : Type*} [NormedAddCommGroup V] [InnerProductSpace ℝ V] [FiniteDimensional ℝ V] + [MeasurableSpace V] [BorelSpace V] + +/-! ### `H^1(V)` in Besov spaces, with constants -/ + +/-- **`B^1_{2,2}(V) ⊆ B^{1/2}_{2,1}(V)` with constant `√2`**: for every `F ∈ L_2(V)`, +`‖F‖_2 + ∑_k 2^(k/2) ω_2(F, 2^(-k))_2 ≤ √2 (‖F‖_2 + ‖(2^k ω_2(F, 2^(-k))_2)_k‖_{ℓ_2})`, by the +Cauchy–Schwarz inequality `∑_k 2^(-k/2) (2^k ω_k) ≤ ‖(2^(-k/2))_k‖_{ℓ_2} ‖(2^k ω_k)_k‖_{ℓ_2}`. The +left side is the norm in which the trace on a Lipschitz graph domain is bounded +(`Rd.LipschitzGraph.enorm_trace_le`). -/ +theorem modNorm_half_one_le (F : Lp ℂ 2 (volume : Measure V)) : + ‖F‖ₑ + lqNorm 1 (fun k => dyadicWeight (1 / 2) k * lpModulus 2 2 F k) ≤ + 2 ^ (1 / 2 : ℝ) * (‖F‖ₑ + lqNorm 2 (fun k => dyadicWeight 1 k * lpModulus 2 2 F k)) := by + have hw : ∀ k, dyadicWeight (1 / 2) k * lpModulus 2 2 F k = + dyadicWeight (-(1 / 2)) k * (dyadicWeight 1 k * lpModulus 2 2 F k) := fun k => by + rw [← mul_assoc, ← ENNReal.dyadicWeight_add] + norm_num + have hcs : lqNorm 1 (fun k => dyadicWeight (1 / 2) k * lpModulus 2 2 F k) ≤ + 2 ^ (1 / 2 : ℝ) * lqNorm 2 (fun k => dyadicWeight 1 k * lpModulus 2 2 F k) := by + simp_rw [hw] + exact (ENNReal.lqNorm_one_mul_le _ _).trans_eq + (by rw [ENNReal.lqNorm_two_dyadicWeight_neg_half]) + have h1 : (1 : ℝ≥0∞) ≤ 2 ^ (1 / 2 : ℝ) := ENNReal.one_le_rpow (by norm_num) (by norm_num) + rw [mul_add] + exact add_le_add (le_mul_of_one_le_left bot_le h1) hcs + +variable (V) in +/-- **The constant of `H^1(V) ⊆ B^1_{2,2}(V)`**: `C_inv · 2 (1 - 2^(-1))⁻¹ · (2 · 4)^{1/2}`, the +product of the constants of the three inclusions behind `Rd.modNorm_two_le_norm`: the inverse +inequality for the moduli of order `2` (`ApproximationScheme.ModulusData.inverseConst` of +`Rd.bandModulusData`), `F^1_{2,2} ⊆ B^1_{2,2}` (`Rd.approxNormDyadic_le_triebelLizorkinNorm`) and +`H^1 ⊆ F^1_{2,2}` (`Rd.triebelLizorkinNorm_le_of_besselPotential_eq`). -/ +noncomputable def sobolevOneBesovConst : ℝ≥0∞ := + (bandModulusData (V := V) two_ne_top 2).inverseConst 1 * + (2 * (1 - (2 : ℝ≥0∞) ^ (-1 : ℝ))⁻¹) * (2 * 4 ^ (1 : ℝ)) ^ (1 / 2 : ℝ) + +/-- The constant of `H^1(V) ⊆ B^1_{2,2}(V)` is finite. -/ +theorem sobolevOneBesovConst_ne_top : sobolevOneBesovConst V ≠ ∞ := by + refine ENNReal.mul_ne_top (ENNReal.mul_ne_top + ((bandModulusData two_ne_top 2).inverseConst_ne_top (by norm_num)) + (ENNReal.mul_ne_top (by norm_num) (ENNReal.one_sub_two_rpow_neg_inv_ne_top one_pos))) + (ENNReal.rpow_ne_top_of_nonneg (by norm_num) + (ENNReal.mul_ne_top (by norm_num) (ENNReal.rpow_ne_top_of_nonneg zero_le_one (by norm_num)))) + +/-- **`H^1(V) ⊆ B^1_{2,2}(V)` with an explicit constant**: for every `U ∈ H^1(V)` with `L_2` +function `ι U`, `‖ι U‖_2 + ‖(2^k ω_2(ι U, 2^(-k))_2)_k‖_{ℓ_2} ≤ C ‖U‖` with +`C = Rd.sobolevOneBesovConst V`: the moduli are bounded by the band-limited approximation norm +(`ApproximationScheme.ModulusData.modNorm_le_approxNormDyadic`), which is bounded by the norm of +`F^1_{2,2}` (`Rd.approxNormDyadic_le_triebelLizorkinNorm`), which is at most +`(2 · 4)^{1/2} ‖J_1 ι U‖_2` (`Rd.triebelLizorkinNorm_le_of_besselPotential_eq`), and +`‖J_1 ι U‖_2 = ‖U‖` (`BesselPotentialSpace.enorm_toLp_eq`). -/ +theorem modNorm_two_le_norm (U : H^{1}(V)) : + ‖toL2 U‖ₑ + lqNorm 2 (fun k => dyadicWeight 1 k * lpModulus 2 2 (toL2 U) k) ≤ + sobolevOneBesovConst V * ‖U‖ₑ := by + have hfh : besselPotential V ℂ 1 ((toL2 U : Lp ℂ 2 (volume : Measure V)) : 𝓢'(V, ℂ)) = + (U.toLp : 𝓢'(V, ℂ)) := by + rw [toTemperedDistribution_toL2] + exact U.bessel_toDistr_eq_toLp + have h1 := (bandModulusData (V := V) two_ne_top 2).modNorm_le_approxNormDyadic one_le_two + zero_le_one (by norm_num) (toL2 U) + have h2 := approxNormDyadic_le_triebelLizorkinNorm two_ne_top one_pos one_le_two (toL2 U) + rw [max_self] at h2 + have h3 := triebelLizorkinNorm_le_of_besselPotential_eq zero_le_one hfh + rw [U.enorm_toLp_eq] at h3 + calc ‖toL2 U‖ₑ + lqNorm 2 (fun k => dyadicWeight 1 k * lpModulus 2 2 (toL2 U) k) + ≤ (bandModulusData (V := V) two_ne_top 2).inverseConst 1 * + (bandScheme two_ne_top).approxNormDyadic 1 2 (toL2 U) := h1 + _ ≤ (bandModulusData (V := V) two_ne_top 2).inverseConst 1 * + (2 * (1 - (2 : ℝ≥0∞) ^ (-1 : ℝ))⁻¹ * triebelLizorkinNorm 1 2 (toL2 U)) := by gcongr + _ ≤ (bandModulusData (V := V) two_ne_top 2).inverseConst 1 * + (2 * (1 - (2 : ℝ≥0∞) ^ (-1 : ℝ))⁻¹ * ((2 * 4 ^ (1 : ℝ)) ^ (1 / 2 : ℝ) * ‖U‖ₑ)) := by + gcongr + _ = sobolevOneBesovConst V * ‖U‖ₑ := by + rw [sobolevOneBesovConst] + ring + +variable (V) in +/-- **The constant of the bound of `H^1(V)` by `B^1_{2,2}(V)`**: +`(2 · 5)^{1/2} · 8 · 8 ‖Φ‖_1 · D`, the product of the constants of the three inclusions behind +`Rd.enorm_le_modNorm_two`: `F^1_{2,2} ⊆ H^1` (`Rd.enorm_besselPotential_le_triebelLizorkinNorm`), +`A^1_2 ⊆ F^1_{2,2}` for the band-limited approximation spaces, with the Littlewood–Paley kernel +`Φ = Rd.lpKernel` (`Rd.triebelLizorkinNorm_le_approxNormDyadic`), and Jackson's direction for the +moduli of order `2` (`ApproximationScheme.ModulusData.directConst` of `Rd.bandModulusData`). -/ +noncomputable def sobolevOneInvConst : ℝ≥0∞ := + (2 * 5 ^ (1 : ℝ)) ^ (1 / 2 : ℝ) * + (8 * dyadicWeight 1 3 * eLpNorm (lpKernel (V := V)) 1 volume) * + (bandModulusData (V := V) two_ne_top 2).directConst 1 + +/-- The constant of the bound of `H^1(V)` by `B^1_{2,2}(V)` is finite. -/ +theorem sobolevOneInvConst_ne_top : sobolevOneInvConst V ≠ ∞ := + ENNReal.mul_ne_top (ENNReal.mul_ne_top + (ENNReal.rpow_ne_top_of_nonneg (by norm_num) + (ENNReal.mul_ne_top (by norm_num) (ENNReal.rpow_ne_top_of_nonneg zero_le_one (by norm_num)))) + (ENNReal.mul_ne_top (ENNReal.mul_ne_top (by norm_num) (ENNReal.dyadicWeight_ne_top 1 3)) + eLpNorm_lpKernel_ne_top)) + ((bandModulusData two_ne_top 2).directConst_ne_top 1) + +/-- **The norm of `H^1(V)` by the `B^1_{2,2}(V)` quantity, with an explicit constant**, the +converse of `Rd.modNorm_two_le_norm`: for every `U ∈ H^1(V)` with `L_2` function `ι U`, +`‖U‖ ≤ C (‖ι U‖_2 + ‖(2^k ω_2(ι U, 2^(-k))_2)_k‖_{ℓ_2})` with `C = Rd.sobolevOneInvConst V`: +`‖U‖ = ‖J_1 ι U‖_2` (`BesselPotentialSpace.enorm_toLp_eq`) is at most `(2 · 5)^{1/2}` times the +norm of `F^1_{2,2}` (`Rd.enorm_besselPotential_le_triebelLizorkinNorm`), which is bounded by the +band-limited approximation norm (`Rd.triebelLizorkinNorm_le_approxNormDyadic`), which is bounded by +the moduli (`ApproximationScheme.ModulusData.approxNormDyadic_le_modNorm`). -/ +theorem enorm_le_modNorm_two (U : H^{1}(V)) : + ‖U‖ₑ ≤ sobolevOneInvConst V * + (‖toL2 U‖ₑ + lqNorm 2 (fun k => dyadicWeight 1 k * lpModulus 2 2 (toL2 U) k)) := by + have hfh : besselPotential V ℂ 1 ((toL2 U : Lp ℂ 2 (volume : Measure V)) : 𝓢'(V, ℂ)) = + (U.toLp : 𝓢'(V, ℂ)) := by + rw [toTemperedDistribution_toL2] + exact U.bessel_toDistr_eq_toLp + have h1 := enorm_besselPotential_le_triebelLizorkinNorm zero_le_one hfh + rw [U.enorm_toLp_eq] at h1 + have h2 := triebelLizorkinNorm_le_approxNormDyadic two_ne_top zero_le_one one_le_two (toL2 U) + rw [min_self] at h2 + have h3 := (bandModulusData (V := V) two_ne_top 2).approxNormDyadic_le_modNorm (s := 1) + one_le_two (toL2 U) + calc ‖U‖ₑ ≤ (2 * 5 ^ (1 : ℝ)) ^ (1 / 2 : ℝ) * triebelLizorkinNorm 1 2 (toL2 U) := h1 + _ ≤ (2 * 5 ^ (1 : ℝ)) ^ (1 / 2 : ℝ) * + (8 * dyadicWeight 1 3 * eLpNorm (lpKernel (V := V)) 1 volume * + (bandScheme two_ne_top).approxNormDyadic 1 2 (toL2 U)) := by gcongr + _ ≤ (2 * 5 ^ (1 : ℝ)) ^ (1 / 2 : ℝ) * + (8 * dyadicWeight 1 3 * eLpNorm (lpKernel (V := V)) 1 volume * + ((bandModulusData (V := V) two_ne_top 2).directConst 1 * + (‖toL2 U‖ₑ + lqNorm 2 (fun k => dyadicWeight 1 k * lpModulus 2 2 (toL2 U) k)))) := by + gcongr + exact h3 + _ = _ := by + rw [sobolevOneInvConst] + ring + +/-- **`H^1(V) ⊆ B^{1/2}_{2,1}(V)` with an explicit constant**: for every `U ∈ H^1(V)` with `L_2` +function `ι U`, `‖ι U‖_2 + ∑_k 2^(k/2) ω_2(ι U, 2^(-k))_2 ≤ √2 C ‖U‖` with +`C = Rd.sobolevOneBesovConst V` (`Rd.modNorm_half_one_le`, `Rd.modNorm_two_le_norm`). The left +side bounds the traces on Lipschitz graph domains (`Rd.LipschitzGraph.enorm_trace_le`). -/ +theorem modNorm_half_one_le_norm (U : H^{1}(V)) : + ‖toL2 U‖ₑ + lqNorm 1 (fun k => dyadicWeight (1 / 2) k * lpModulus 2 2 (toL2 U) k) ≤ + 2 ^ (1 / 2 : ℝ) * sobolevOneBesovConst V * ‖U‖ₑ := by + rw [mul_assoc] + exact (modNorm_half_one_le _).trans (mul_le_mul' le_rfl (modNorm_two_le_norm U)) + +/-- **The hypothesis of the trace theorems for `H^1(V)`**: for every `U ∈ H^1(V)`, +`‖ι U‖_2 + ‖(2^(k(1/2 + 1/2)) ω_2(ι U, 2^(-k))_2)_k‖_{ℓ_2} < ∞`, the finiteness that the boundary +traces at `s = 1/2`, `p = q = 2` and order `L = 2` ask for (`Rd.modNorm_two_le_norm`). -/ +theorem modNorm_toL2_lt_top (U : H^{1}(V)) : + ‖toL2 U‖ₑ + lqNorm 2 (fun k => dyadicWeight (1 / 2 + 1 / (2 : ℝ≥0∞).toReal) k * + lpModulus 2 2 (toL2 U) k) < ∞ := by + have hσ : (1 / 2 : ℝ) + 1 / (2 : ℝ≥0∞).toReal = 1 := by norm_num + rw [hσ] + exact (modNorm_two_le_norm U).trans_lt + (ENNReal.mul_lt_top sobolevOneBesovConst_ne_top.lt_top eNorm_lt_top) + +/-- **The trace of `H^1(V)` on a Lipschitz graph is bounded**: `‖Tr ι U‖_{L_2(H)} ≤ C ‖U‖` for every +`U ∈ H^1(V)` with `L_2` function `ι U` (`Rd.toL2`), with `C = K √2 Rd.sobolevOneBesovConst V` for +the constant `K` of the trace bound in the `B^{1/2}_{2,1}` quantity +(`Rd.LipschitzGraph.enorm_trace_le`, `Rd.modNorm_half_one_le_norm`). -/ +theorem LipschitzGraph.exists_enorm_trace_toL2_le (Ω : LipschitzGraph V) : + ∃ C : ℝ≥0∞, C ≠ ∞ ∧ ∀ U : H^{1}(V), ‖Ω.trace two_ne_top 2 (toL2 U)‖ₑ ≤ C * ‖U‖ₑ := by + obtain ⟨K, hK, hle⟩ := Ω.enorm_trace_le two_ne_top 2 + refine ⟨K * (2 ^ (1 / 2 : ℝ) * sobolevOneBesovConst V), ENNReal.mul_ne_top hK + (ENNReal.mul_ne_top (ENNReal.rpow_ne_top_of_nonneg (by norm_num) (by norm_num)) + sobolevOneBesovConst_ne_top), fun U => ?_⟩ + have hw : 1 / (2 : ℝ≥0∞).toReal = 1 / 2 := by norm_num + have h1 := hle (toL2 U) + rw [hw] at h1 + rw [mul_assoc] + exact h1.trans (mul_le_mul' le_rfl (modNorm_half_one_le_norm U)) + +/-! ### The trace of `H^1(V)` on a Lipschitz graph as an operator -/ + +namespace LipschitzGraph + +variable (Ω : LipschitzGraph V) + +/-- The `L_2` functions of `H^1(V)` satisfy the hypothesis of the trace theorem on `Ω` at +`s = 1/2`, `p = q = 2` and order `2` (`Rd.modNorm_toL2_lt_top`). -/ +theorem intrinsicNorm_toL2_lt_top (U : H^{1}(V)) : + Ω.intrinsicNorm two_ne_top 2 (1 / 2 + 1 / (2 : ℝ≥0∞).toReal) 2 (toL2 U) < ∞ := + (Ω.intrinsicNorm_lt_top_of_modNorm two_ne_top 2 one_le_two (modNorm_toL2_lt_top U)).2 + +/-- The trace of `H^1(V)` on the graph as a linear map, `U ↦ Tr(ι U)` for the `L_2` function +`ι U` (`Rd.LipschitzGraph.trace_sub`, `Rd.LipschitzGraph.trace_smul`). -/ +noncomputable def traceH1Linear : H^{1}(V) →ₗ[ℂ] Lp ℂ 2 (volume : Measure Ω.hyperplane) where + toFun U := Ω.trace two_ne_top 2 (toL2 U) + map_add' U W := by + have h := Ω.trace_sub two_ne_top 2 (s := 1 / 2) (by norm_num) one_le_two + (Ω.intrinsicNorm_toL2_lt_top (U + W)) (Ω.intrinsicNorm_toL2_lt_top W) + rw [map_add, add_sub_cancel_right] at h + rw [map_add, h, sub_add_cancel] + map_smul' c U := by + simp only [map_smul, RingHom.id_apply, LipschitzGraph.trace_smul] + +/-- **The trace of `H^1(V)` on a Lipschitz graph** as a bounded operator `H^1(V) → L_2(H)`, +`U ↦ Tr(ι U)` (`Rd.LipschitzGraph.exists_enorm_trace_toL2_le`). -/ +noncomputable def traceH1 : H^{1}(V) →L[ℂ] Lp ℂ 2 (volume : Measure Ω.hyperplane) := + (Ω.traceH1Linear).mkContinuousOfExistsBound (by + obtain ⟨C, hC, hle⟩ := Ω.exists_enorm_trace_toL2_le + refine ⟨C.toReal, fun U => ?_⟩ + rw [← toReal_eNorm, ← toReal_eNorm U, ← ENNReal.toReal_mul] + exact ENNReal.toReal_mono (ENNReal.mul_ne_top hC eNorm_ne_top) (hle U)) + +/-- `traceH1 U = Tr(ι U)`. -/ +theorem traceH1_apply (U : H^{1}(V)) : Ω.traceH1 U = Ω.trace two_ne_top 2 (toL2 U) := + rfl + +/-- **The trace of a Schwartz function** is its restriction to the graph: `Tr w = w ∘ γ` almost +everywhere on `H` (`Rd.LipschitzGraph.trace_ae_eq_comp_graphMap`). -/ +theorem traceH1_ofSchwartz_ae (w : 𝓢(V, ℂ)) : + (Ω.traceH1 (ofSchwartz 1 w) : Ω.hyperplane → ℂ) =ᵐ[volume] fun x' => w (Ω.graphMap x') := by + rw [traceH1_apply] + refine Ω.trace_ae_eq_comp_graphMap two_ne_top (L := 2) one_le_two (s := 1 / 2) (by norm_num) + one_le_two (Ω.intrinsicNorm_lt_top_of_modNorm two_ne_top 2 one_le_two + (modNorm_toL2_lt_top (ofSchwartz 1 w))).1 w.continuous ?_ + rw [toL2_ofSchwartz] + exact w.coeFn_toLp 2 volume + +end LipschitzGraph + +/-! ### The chart traces of `H^1(Ω)` -/ + +namespace BoundedLipschitzDomain + +/-- **The Sobolev space `H^1(Ω)`** of a bounded Lipschitz domain, as a Hilbert space: the +restriction space `Rd.RestrictionSpace 1 Ω` of the open set `Ω`. `Rd.restrictL2` identifies its +elements with the restrictions to `Ω` of the functions of `Rd.BoundedLipschitzDomain.MemSobolevOn` +(`Rd.BoundedLipschitzDomain.memSobolevOn_iff_exists_restrictL2`). -/ +abbrev SobolevOne (Ω : BoundedLipschitzDomain V) := RestrictionSpace 1 Ω.toOpens + +/-- **The canonical resolution of unity** on the boundary of `Ω`, a fixed choice among the +nonnegative resolutions of `Rd.BoundedLipschitzDomain.exists_boundaryPartition_nonneg`: `ψ_j ≥ 0` +and `∑_j ψ_j ≤ 1` everywhere. The trace kernel uses it and does not depend on it +(`Rd.BoundedLipschitzDomain.mem_traceKer_iff`); the surface measure and the unit normal use its +nonnegativity. -/ +noncomputable def boundaryPartition (Ω : BoundedLipschitzDomain V) : Ω.BoundaryPartition := + Ω.exists_boundaryPartition_nonneg.choose + +omit [MeasurableSpace V] [BorelSpace V] in +/-- The functions of the canonical resolution of unity are nonnegative. -/ +theorem boundaryPartition_nonneg (Ω : BoundedLipschitzDomain V) (j : Fin Ω.N) (y : V) : + 0 ≤ Ω.boundaryPartition.toFun j y := + Ω.exists_boundaryPartition_nonneg.choose_spec.1 j y + +omit [MeasurableSpace V] [BorelSpace V] in +/-- The functions of the canonical resolution of unity sum to at most `1` everywhere. -/ +theorem sum_boundaryPartition_le_one (Ω : BoundedLipschitzDomain V) (y : V) : + ∑ j, Ω.boundaryPartition.toFun j y ≤ 1 := + Ω.exists_boundaryPartition_nonneg.choose_spec.2 y + +namespace BoundaryPartition + +variable {Ω : BoundedLipschitzDomain V} (ψ : Ω.BoundaryPartition) + +/-- **A bound of the derivatives of `ψ_j`** up to order `2`, a choice among the bounds of +`Rd.exists_iteratedFDeriv_bound` (smooth functions with compact support). -/ +noncomputable def derivBound (j : Fin Ω.N) : ℝ := + (exists_iteratedFDeriv_bound (ψ.contDiff_toComplex j) (ψ.hasCompactSupport_toComplex j) 2).choose + +omit [MeasurableSpace V] [BorelSpace V] in +/-- The derivatives of `ψ_j` of order at most `2` are bounded by `ψ.derivBound j`. -/ +theorem derivBound_spec (j : Fin Ω.N) : + ∀ l ≤ 2, ∀ x, ‖iteratedFDeriv ℝ l (ψ.toComplex j) x‖ ≤ ψ.derivBound j := + (exists_iteratedFDeriv_bound (ψ.contDiff_toComplex j) (ψ.hasCompactSupport_toComplex j) + 2).choose_spec + +omit [MeasurableSpace V] [BorelSpace V] in +/-- `|ψ_j| ≤ D_j` for the derivative bound `D_j = ψ.derivBound j`. -/ +theorem enorm_toComplex_le (j : Fin Ω.N) (y : V) : + ‖ψ.toComplex j y‖ₑ ≤ ENNReal.ofReal (ψ.derivBound j) := by + rw [← ofReal_norm] + exact ENNReal.ofReal_le_ofReal (norm_le_of_iteratedFDeriv_le (ψ.derivBound_spec j) y) + +omit [MeasurableSpace V] [BorelSpace V] in +/-- `ψ_j` is Lipschitz: `|ψ_j(x) - ψ_j(y)| ≤ D_j |x - y|` for the derivative bound +`D_j = ψ.derivBound j` (`Rd.norm_higherDiff_le_of_iteratedFDeriv` with differences of order +`1`). -/ +theorem enorm_toComplex_sub_le (j : Fin Ω.N) (x y : V) : + ‖ψ.toComplex j x - ψ.toComplex j y‖ₑ ≤ ENNReal.ofReal (ψ.derivBound j) * ‖x - y‖ₑ := by + have h := norm_higherDiff_le_of_iteratedFDeriv (ψ.contDiff_toComplex j) (l := 1) + (fun z => ψ.derivBound_spec j 1 (by norm_num) z) (x - y) y + simp only [Function.iterate_one, fwdDiff, add_sub_cancel, pow_one] at h + have hD : 0 ≤ ψ.derivBound j := + (norm_nonneg _).trans (norm_le_of_iteratedFDeriv_le (ψ.derivBound_spec j) y) + rw [← ofReal_norm, ← ofReal_norm, ← ENNReal.ofReal_mul hD] + exact ENNReal.ofReal_le_ofReal h + +/-- **Localisation to the chart `j`**: `F ↦ ψ_j F` on `L_2(V)` (`Rd.mulLp`). -/ +noncomputable def localize (j : Fin Ω.N) (F : Lp ℂ 2 (volume : Measure V)) : + Lp ℂ 2 (volume : Measure V) := + mulLp (ψ.contDiff_toComplex j).continuous + (norm_le_of_iteratedFDeriv_le (ψ.derivBound_spec j)) F + +/-- **Localisations of `H^1(V)` functions satisfy the trace hypothesis**: for every resolution of +unity `ψ` and `U ∈ H^1(V)`, the intrinsic norm of `ψ_j ι U` of smoothness `1/2 + 1/2` on the graph +domain of every chart `k` is finite (`Rd.modNorm_mulLp_lt_top`, `Rd.modNorm_toL2_lt_top`). -/ +theorem intrinsicNorm_localize_lt_top (j k : Fin Ω.N) (U : H^{1}(V)) : + (Ω.graph k).intrinsicNorm two_ne_top 2 (1 / 2 + 1 / (2 : ℝ≥0∞).toReal) 2 + (ψ.localize j (toL2 U)) < ∞ := + ((Ω.graph k).intrinsicNorm_lt_top_of_modNorm two_ne_top 2 one_le_two + (modNorm_mulLp_lt_top two_ne_top (ψ.contDiff_toComplex j) + (ψ.derivBound_spec j) (by norm_num) one_le_two + (modNorm_toL2_lt_top U))).2 + +end BoundaryPartition + +variable (Ω : BoundedLipschitzDomain V) + +/-- **The chart trace as a linear map**: `u ↦ Tr_j(ψ_j u)` from `H^1(Ω)` to `L_2(H_j)`, with the +trace of the graph domain of the chart `j` and the canonical resolution of unity. It is additive by +`Rd.LipschitzGraph.trace_sub` on the localised `H^1(V)` functions and homogeneous by +`Rd.LipschitzGraph.trace_smul` and `Rd.mulLp_smul`. -/ +noncomputable def chartTraceLinear (j : Fin Ω.N) : + Ω.SobolevOne →ₗ[ℂ] Lp ℂ 2 (volume : Measure (Ω.graph j).hyperplane) where + toFun u := (Ω.graph j).trace two_ne_top 2 + (Ω.boundaryPartition.localize j (toL2 (u : H^{1}(V)))) + map_add' u w := by + have h := (Ω.graph j).trace_sub two_ne_top 2 (s := 1 / 2) (by norm_num) one_le_two + (Ω.boundaryPartition.intrinsicNorm_localize_lt_top j j ((u : H^{1}(V)) + w)) + (Ω.boundaryPartition.intrinsicNorm_localize_lt_top j j w) + have he : Ω.boundaryPartition.localize j (toL2 ((u : H^{1}(V)) + w)) - + Ω.boundaryPartition.localize j (toL2 (w : H^{1}(V))) = + Ω.boundaryPartition.localize j (toL2 (u : H^{1}(V))) := by + rw [BoundaryPartition.localize, BoundaryPartition.localize, ← mulLp_sub, map_add, + add_sub_cancel_right] + rfl + rw [he] at h + rw [Submodule.coe_add, h, sub_add_cancel] + map_smul' c u := by + simp only [Submodule.coe_smul, map_smul, RingHom.id_apply, BoundaryPartition.localize, + mulLp_smul, LipschitzGraph.trace_smul] + +/-- `chartTraceLinear Ω j u = Tr_j(ψ_j u)`. -/ +theorem chartTraceLinear_apply (j : Fin Ω.N) (u : Ω.SobolevOne) : + Ω.chartTraceLinear j u = (Ω.graph j).trace two_ne_top 2 + (Ω.boundaryPartition.localize j (toL2 (u : H^{1}(V)))) := + rfl + +/-- **The chart traces are bounded**: `‖Tr_j(ψ_j U)‖_{L_2(H_j)} ≤ C ‖U‖` for every `U ∈ H^1(V)`, for +every resolution of unity `ψ`, with `C = K M √2 Rd.sobolevOneBesovConst V`. The trace is at most +`K` times the `B^{1/2}_{2,1}` quantity of `ψ_j U` (`Rd.LipschitzGraph.enorm_trace_le`), which is at +most `M` times that of `U` (`Rd.modNorm_mulLp_le`, with the multiplier constant `M` of `ψ_j` for +differences of order `2` and smoothness `1/2`), and that is at most +`√2 Rd.sobolevOneBesovConst V ‖U‖` (`Rd.modNorm_half_one_le_norm`). -/ +theorem exists_enorm_trace_localize_le (ψ : Ω.BoundaryPartition) (j : Fin Ω.N) : + ∃ C : ℝ≥0∞, C ≠ ∞ ∧ ∀ U : H^{1}(V), + ‖(Ω.graph j).trace two_ne_top 2 (ψ.localize j (toL2 U))‖ₑ ≤ C * ‖U‖ₑ := by + obtain ⟨K, hK, hle⟩ := (Ω.graph j).enorm_trace_le two_ne_top 2 + -- the multiplier constant of `ψ_j` (`Rd.modNorm_mulLp_le` with `r = 2`, `s = 1/2`) + obtain ⟨M, hMdef⟩ : ∃ M : ℝ≥0∞, M = ENNReal.ofReal (ψ.derivBound j) + + ∑ l ∈ Finset.range (2 + 1), ((2 : ℕ).choose l : ℝ≥0∞) * ENNReal.ofReal (ψ.derivBound j) * + multiplierConst (V := V) two_ne_top 2 (1 / 2) l := ⟨_, rfl⟩ + have hM : M ≠ ∞ := hMdef ▸ multiplierTotal_ne_top two_ne_top (by norm_num) (ψ.derivBound j) + refine ⟨K * M * 2 ^ (1 / 2 : ℝ) * sobolevOneBesovConst V, ENNReal.mul_ne_top + (ENNReal.mul_ne_top (ENNReal.mul_ne_top hK hM) + (ENNReal.rpow_ne_top_of_nonneg (by norm_num) (by norm_num))) sobolevOneBesovConst_ne_top, + fun U => ?_⟩ + have hw : 1 / (2 : ℝ≥0∞).toReal = 1 / 2 := by norm_num + have h1 := hle (ψ.localize j (toL2 U)) + rw [hw] at h1 + have h2 : ‖ψ.localize j (toL2 U)‖ₑ + lqNorm 1 (fun k => dyadicWeight (1 / 2) k * + lpModulus 2 2 (ψ.localize j (toL2 U)) k) ≤ + M * (‖toL2 U‖ₑ + lqNorm 1 (fun k => dyadicWeight (1 / 2) k * lpModulus 2 2 (toL2 U) k)) := + hMdef ▸ modNorm_mulLp_le two_ne_top (ψ.contDiff_toComplex j) + (ψ.derivBound_spec j) (s := 1 / 2) (by norm_num) le_rfl (toL2 U) + calc ‖(Ω.graph j).trace two_ne_top 2 (ψ.localize j (toL2 U))‖ₑ + ≤ K * (‖ψ.localize j (toL2 U)‖ₑ + lqNorm 1 (fun k => dyadicWeight (1 / 2) k * + lpModulus 2 2 (ψ.localize j (toL2 U)) k)) := h1 + _ ≤ K * (M * (‖toL2 U‖ₑ + lqNorm 1 (fun k => dyadicWeight (1 / 2) k * + lpModulus 2 2 (toL2 U) k))) := mul_le_mul' le_rfl h2 + _ ≤ K * (M * (2 ^ (1 / 2 : ℝ) * sobolevOneBesovConst V * ‖U‖ₑ)) := by + gcongr; exact modNorm_half_one_le_norm U + _ = K * M * 2 ^ (1 / 2 : ℝ) * sobolevOneBesovConst V * ‖U‖ₑ := by ring + +/-- **The chart traces are bounded operators**: `u ↦ Tr_j(ψ_j u)` from `H^1(Ω)` to `L_2(H_j)`, with +the canonical resolution of unity (`Rd.BoundedLipschitzDomain.exists_enorm_trace_localize_le`). -/ +noncomputable def chartTrace (j : Fin Ω.N) : + Ω.SobolevOne →L[ℂ] Lp ℂ 2 (volume : Measure (Ω.graph j).hyperplane) := + (Ω.chartTraceLinear j).mkContinuousOfExistsBound (by + obtain ⟨C, hC, hle⟩ := Ω.exists_enorm_trace_localize_le Ω.boundaryPartition j + refine ⟨C.toReal, fun u => ?_⟩ + rw [← toReal_eNorm, ← toReal_eNorm u, ← ENNReal.toReal_mul] + exact ENNReal.toReal_mono (ENNReal.mul_ne_top hC eNorm_ne_top) (hle (u : H^{1}(V)))) + +/-- `chartTrace Ω j u = Tr_j(ψ_j u)`. -/ +theorem chartTrace_apply (j : Fin Ω.N) (u : Ω.SobolevOne) : + Ω.chartTrace j u = (Ω.graph j).trace two_ne_top 2 + (Ω.boundaryPartition.localize j (toL2 (u : H^{1}(V)))) := + rfl + +/-- **The chart trace is the localised boundary trace**: `Tr_j(ψ_j u) = (ψ_j Tr_Γ u) ∘ γ_j` +almost everywhere on `H_j`, with the canonical resolution of unity +(`Rd.BoundedLipschitzDomain.trace_mulLp_ae_boundaryTrace`). -/ +theorem chartTrace_ae_eq (j : Fin Ω.N) (u : Ω.SobolevOne) : + (Ω.chartTrace j u : (Ω.graph j).hyperplane → ℂ) =ᵐ[volume] fun x' => + Ω.boundaryPartition.toComplex j ((Ω.graph j).graphMap x') * + Ω.boundaryTrace Ω.boundaryPartition two_ne_top 2 (toL2 (u : H^{1}(V))) + ((Ω.graph j).graphMap x') := + Ω.trace_mulLp_ae_boundaryTrace Ω.boundaryPartition two_ne_top one_le_two (s := 1 / 2) + (by norm_num) (by norm_num) one_le_two (modNorm_toL2_lt_top _) j + (Ω.boundaryPartition.derivBound_spec j) + +/-! ### The trace kernel -/ + +/-- **Vanishing on the boundary, chart by chart**: for every resolution of unity `ψ`, a function +`T` vanishes almost everywhere on `Γ` iff `(ψ_j T) ∘ γ_j = 0` almost everywhere on `H_j` for every +`j`. `⇐`: the localised statements hold almost everywhere on `Γ ∩ B_j` +(`Rd.BoundedLipschitzDomain.eventually_aeBoundary_of_chart`), and `T = ∑_j ψ_j T` on `Γ`. -/ +theorem eventuallyEq_zero_iff_forall_chart (ψ : Ω.BoundaryPartition) (T : V → ℂ) : + T =ᶠ[Ω.aeBoundary] 0 ↔ ∀ j, (fun x' => ψ.toComplex j ((Ω.graph j).graphMap x') * + T ((Ω.graph j).graphMap x')) =ᵐ[(volume : Measure (Ω.graph j).hyperplane)] 0 := by + constructor + · intro h j + filter_upwards [Ω.eventually_aeBoundary_iff.1 h j] with x' hx + by_cases hψ : ψ.toFun j ((Ω.graph j).graphMap x') = 0 + · simp [ψ.toComplex_of_eq_zero hψ] + · simp [hx (ψ.mem_ball_of_ne_zero hψ)] + · intro h + have hk : ∀ k, ∀ᶠ y in Ω.aeBoundary, + y ∈ ball (Ω.center k) (Ω.radius k) → ψ.toComplex k y * T y = 0 := fun k => + Ω.eventually_aeBoundary_of_chart k ((h k).mono fun x' hx _ => hx) + have hΓ : ∀ᶠ y in Ω.aeBoundary, y ∈ frontier Ω.carrier := + Ω.eventually_aeBoundary_iff.2 fun j => + Eventually.of_forall fun x' hx => Ω.graphMap_mem_frontier j hx + filter_upwards [eventually_all.2 hk, hΓ] with y hy hyΓ + calc T y = ∑ k, ψ.toComplex k y * T y := by + rw [← Finset.sum_mul, ψ.sum_toComplex_eq_one hyΓ, one_mul] + _ = 0 := Finset.sum_eq_zero fun k _ => by + by_cases hψ : ψ.toFun k y = 0 + · rw [ψ.toComplex_of_eq_zero hψ, zero_mul] + · exact hy k (ψ.mem_ball_of_ne_zero hψ) + +/-- **The trace kernel** `ker γ ⊆ H^1(Ω)`: the `u` whose chart traces `Tr_j(ψ_j u)` all vanish, for +the canonical resolution of unity; equivalently, the `u` whose boundary trace vanishes almost +everywhere on `Γ`, for every resolution of unity (`Rd.BoundedLipschitzDomain.mem_traceKer_iff`). -/ +noncomputable def traceKer : Submodule ℂ Ω.SobolevOne := + ⨅ j, (Ω.chartTrace j).ker + +/-- The trace kernel is closed, an intersection of kernels of bounded operators. -/ +theorem isClosed_traceKer : IsClosed (Ω.traceKer : Set Ω.SobolevOne) := by + rw [traceKer, Submodule.coe_iInf] + exact isClosed_iInter fun j => ContinuousLinearMap.isClosed_ker _ + +/-- The trace kernel is complete, as a closed subspace of the Hilbert space `H^1(Ω)`; hence it +has an orthogonal projection. -/ +instance completeSpace_traceKer : CompleteSpace Ω.traceKer := + Ω.isClosed_traceKer.completeSpace_coe + +/-- **The trace kernel by the boundary trace**: for every resolution of unity `ψ`, `u ∈ H^1(Ω)` +lies in the trace kernel iff its boundary trace `Tr_Γ u` vanishes almost everywhere on `Γ`. In +particular the trace kernel does not depend on the resolution of unity in its definition. The +chart traces are the localised boundary traces (`Rd.BoundedLipschitzDomain.chartTrace_ae_eq`), +`Rd.BoundedLipschitzDomain.eventuallyEq_zero_iff_forall_chart` collects them, and the boundary +traces of two resolutions agree almost everywhere on `Γ` +(`Rd.BoundedLipschitzDomain.boundaryTrace_eventuallyEq`). -/ +theorem mem_traceKer_iff (ψ : Ω.BoundaryPartition) (u : Ω.SobolevOne) : + u ∈ Ω.traceKer ↔ + Ω.boundaryTrace ψ two_ne_top 2 (toL2 (u : H^{1}(V))) =ᶠ[Ω.aeBoundary] 0 := by + have hψ := Ω.boundaryTrace_eventuallyEq Ω.boundaryPartition ψ two_ne_top one_le_two + (s := 1 / 2) (by norm_num) (by norm_num) one_le_two (modNorm_toL2_lt_top (u : H^{1}(V))) + rw [traceKer, Submodule.mem_iInf, ← (Filter.EventuallyEq.congr_left hψ), + eventuallyEq_zero_iff_forall_chart Ω Ω.boundaryPartition] + refine forall_congr' fun j => ?_ + rw [LinearMap.mem_ker, Lp.eq_zero_iff_ae_eq_zero] + exact ⟨fun h => (Ω.chartTrace_ae_eq j u).symm.trans h, + fun h => (Ω.chartTrace_ae_eq j u).trans h⟩ + +/-- **The boundary trace of `H^1(V)` functions is linear**: for every resolution of unity `ψ` and +`U, W ∈ H^1(V)`, `Tr_Γ(U - W) = Tr_Γ U - Tr_Γ W` almost everywhere on `Γ`: in each chart the +boundary traces are traces of the graph domain (`Rd.BoundedLipschitzDomain.boundaryTrace_graphMap`), +which are linear (`Rd.LipschitzGraph.trace_sub`). -/ +theorem boundaryTrace_toL2_sub (ψ : Ω.BoundaryPartition) (U W : H^{1}(V)) : + Ω.boundaryTrace ψ two_ne_top 2 (toL2 (U - W)) =ᶠ[Ω.aeBoundary] + Ω.boundaryTrace ψ two_ne_top 2 (toL2 U) - Ω.boundaryTrace ψ two_ne_top 2 (toL2 W) := by + refine Ω.eventually_aeBoundary_iff.2 fun j => ?_ + have hG := fun G : H^{1}(V) => Ω.boundaryTrace_graphMap ψ two_ne_top one_le_two (s := 1 / 2) + (by norm_num) (by norm_num) one_le_two (modNorm_toL2_lt_top G) j + have hI := fun G : H^{1}(V) => ((Ω.graph j).intrinsicNorm_lt_top_of_modNorm two_ne_top 2 + one_le_two (modNorm_toL2_lt_top G)).2 + have hsub := (Ω.graph j).trace_sub two_ne_top 2 (s := 1 / 2) (by norm_num) one_le_two (hI U) + (hI W) + filter_upwards [hG (U - W), hG U, hG W, Lp.coeFn_sub ((Ω.graph j).trace two_ne_top 2 (toL2 U)) + ((Ω.graph j).trace two_ne_top 2 (toL2 W))] with x' h1 h2 h3 h4 hj + rw [Pi.sub_apply, h1 hj, h2 hj, h3 hj, map_sub, hsub, h4, Pi.sub_apply] + +/-! ### The trace space `H^{1/2}(Γ)` -/ + +/-- **The trace space `H^{1/2}(Γ)`** of a bounded Lipschitz domain, as a Hilbert space, defined +as the orthogonal complement of the trace kernel in `H^1(Ω)`. By the trace theorem of `H^1(Ω)`, +the boundary traces of its elements are the functions of `B^{1/2}_{2,2}(Γ)`, up to null sets of +`Γ` (`Rd.BoundedLipschitzDomain.memBoundaryBesov_extend`, +`Rd.BoundedLipschitzDomain.exists_traceSpace_of_memBoundaryBesov`, +`Rd.BoundedLipschitzDomain.boundaryTrace_extend_eventuallyEq_iff`), with equivalent norms +(`Rd.BoundedLipschitzDomain.exists_traceL2_norm_equiv`). -/ +abbrev TraceSpace := ↥(Ω.traceKer)ᗮ + +/-- **The trace** `γ : H^1(Ω) → H^{1/2}(Γ)`, the orthogonal projection onto the trace space. Two +elements of `H^1(Ω)` have the same trace iff their boundary traces agree almost everywhere on `Γ` +(`Rd.BoundedLipschitzDomain.trace_eq_iff`). -/ +noncomputable def trace : Ω.SobolevOne →L[ℂ] Ω.TraceSpace := + (Ω.traceKer)ᗮ.orthogonalProjectionOnto + +/-- **The extension** `H^{1/2}(Γ) → H^1(Ω)`, the inclusion of the trace space: a right inverse of +the trace (`Rd.BoundedLipschitzDomain.trace_extend`) and an isometry +(`Rd.BoundedLipschitzDomain.norm_extend_apply`). -/ +noncomputable def extend : Ω.TraceSpace →L[ℂ] Ω.SobolevOne := + (Ω.traceKer)ᗮ.subtypeL + +/-- **The extension is a right inverse of the trace**: `γ (E t) = t`. -/ +@[simp] +theorem trace_extend (t : Ω.TraceSpace) : Ω.trace (Ω.extend t) = t := + Submodule.orthogonalProjectionOnto_mem_subspace_eq_self t + +/-- The trace has norm at most `1`: `‖γ u‖ ≤ ‖u‖`. -/ +theorem norm_trace_apply_le (u : Ω.SobolevOne) : ‖Ω.trace u‖ ≤ ‖u‖ := + Submodule.norm_orthogonalProjectionOnto_apply_le _ u + +/-- The extension is an isometry: `‖E t‖ = ‖t‖`. -/ +theorem norm_extend_apply (t : Ω.TraceSpace) : ‖Ω.extend t‖ = ‖t‖ := + rfl + +/-- `γ u = 0` iff `u` lies in the trace kernel (Mathlib's +`Submodule.orthogonalProjectionOnto_eq_zero_iff`, `Submodule.orthogonal_orthogonal`). -/ +theorem trace_eq_zero_iff (u : Ω.SobolevOne) : Ω.trace u = 0 ↔ u ∈ Ω.traceKer := by + rw [trace, Submodule.orthogonalProjectionOnto_eq_zero_iff, Submodule.orthogonal_orthogonal] + +/-- **The kernel of the trace is the trace kernel**: the kernel of the orthogonal projection onto +`Kᗮ` is `Kᗮᗮ = K` (Mathlib's `Submodule.ker_orthogonalProjectionOnto`, +`Submodule.orthogonal_orthogonal`). -/ +theorem ker_trace : (Ω.trace).ker = Ω.traceKer := by + rw [trace, Submodule.ker_orthogonalProjectionOnto, Submodule.orthogonal_orthogonal] + +/-- `u` and the extension of its trace differ by an element of the trace kernel. -/ +theorem sub_extend_trace_mem (u : Ω.SobolevOne) : u - Ω.extend (Ω.trace u) ∈ Ω.traceKer := by + have h := Submodule.sub_starProjection_mem_orthogonal (K := (Ω.traceKer)ᗮ) u + rwa [Submodule.orthogonal_orthogonal] at h + +/-- **`H^{1/2}(Γ)` as a quotient**: `H^1(Ω) ⧸ ker γ` is isometrically isomorphic to the trace +space, by the definition of the trace space as an orthogonal complement (Mathlib's +`Submodule.quotientEquivOrthogonal`); the class of `u` corresponds to `γ u` +(`Rd.BoundedLipschitzDomain.quotientEquivTraceSpace_mk`). -/ +noncomputable def quotientEquivTraceSpace : (Ω.SobolevOne ⧸ Ω.traceKer) ≃ₗᵢ[ℂ] Ω.TraceSpace := + Submodule.quotientEquivOrthogonal _ + +/-- The class of `u` corresponds to its trace. -/ +theorem quotientEquivTraceSpace_mk (u : Ω.SobolevOne) : + Ω.quotientEquivTraceSpace (Submodule.Quotient.mk u) = Ω.trace u := by + have h : (Submodule.Quotient.mk u : Ω.SobolevOne ⧸ Ω.traceKer) = + Submodule.Quotient.mk (Ω.extend (Ω.trace u)) := + (Submodule.Quotient.eq _).2 (Ω.sub_extend_trace_mem u) + rw [quotientEquivTraceSpace, h] + exact Submodule.quotientEquivOrthogonal_mk _ _ (Ω.trace u).2 + +/-! ### The functions of `H^{1/2}(Γ)` -/ + +/-- **Equal traces are equal boundary traces**: for every resolution of unity `ψ`, `γ u = γ u'` +iff `Tr_Γ u = Tr_Γ u'` almost everywhere on `Γ` (`Rd.BoundedLipschitzDomain.mem_traceKer_iff` for +`u - u'`, `Rd.BoundedLipschitzDomain.boundaryTrace_toL2_sub`). -/ +theorem trace_eq_iff (ψ : Ω.BoundaryPartition) (u u' : Ω.SobolevOne) : + Ω.trace u = Ω.trace u' ↔ Ω.boundaryTrace ψ two_ne_top 2 (toL2 (u : H^{1}(V))) =ᶠ[Ω.aeBoundary] + Ω.boundaryTrace ψ two_ne_top 2 (toL2 (u' : H^{1}(V))) := by + rw [← sub_eq_zero, ← map_sub, trace_eq_zero_iff, mem_traceKer_iff Ω ψ, Submodule.coe_sub] + exact ⟨fun h => Filter.eventuallyEq_iff_sub.2 ((Ω.boundaryTrace_toL2_sub ψ _ _).symm.trans h), + fun h => (Ω.boundaryTrace_toL2_sub ψ _ _).trans (Filter.eventuallyEq_iff_sub.1 h)⟩ + +/-- **The extension of the trace has the same boundary trace**: `Tr_Γ (E γ u) = Tr_Γ u` almost +everywhere on `Γ`, for every resolution of unity. -/ +theorem boundaryTrace_extend_trace (ψ : Ω.BoundaryPartition) (u : Ω.SobolevOne) : + Ω.boundaryTrace ψ two_ne_top 2 (toL2 ((Ω.extend (Ω.trace u) : Ω.SobolevOne) : H^{1}(V))) + =ᶠ[Ω.aeBoundary] Ω.boundaryTrace ψ two_ne_top 2 (toL2 (u : H^{1}(V))) := + (Ω.trace_eq_iff ψ _ _).1 (Ω.trace_extend _) + +/-- **Elements of the trace space are determined by their boundary traces**: `Tr_Γ (E t)` and +`Tr_Γ (E t')` agree almost everywhere on `Γ` iff `t = t'`. -/ +theorem boundaryTrace_extend_eventuallyEq_iff (ψ : Ω.BoundaryPartition) (t t' : Ω.TraceSpace) : + Ω.boundaryTrace ψ two_ne_top 2 (toL2 ((Ω.extend t : Ω.SobolevOne) : H^{1}(V))) + =ᶠ[Ω.aeBoundary] Ω.boundaryTrace ψ two_ne_top 2 + (toL2 ((Ω.extend t' : Ω.SobolevOne) : H^{1}(V))) ↔ t = t' := by + rw [← Ω.trace_eq_iff ψ, trace_extend, trace_extend] + +/-- **The boundary trace of `H^1(V)` functions lies in `B^{1/2}_{2,2}(Γ)`**: for every resolution of +unity `ψ` and `U ∈ H^1(V)` (`Rd.BoundedLipschitzDomain.memBoundaryBesov_boundaryTrace` at +`s = 1/2`, `p = q = 2`, `L = 2`). -/ +theorem memBoundaryBesov_toL2 (ψ : Ω.BoundaryPartition) (U : H^{1}(V)) : + Ω.MemBoundaryBesov 2 ψ (1 / 2) 2 (Ω.boundaryTrace ψ two_ne_top 2 (toL2 U)) := + Ω.memBoundaryBesov_boundaryTrace ψ two_ne_top one_le_two (by norm_num) (by norm_num) + (by norm_num) one_le_two (modNorm_toL2_lt_top U) + +/-- **The boundary traces of the trace space lie in `B^{1/2}_{2,2}(Γ)`**: for every resolution of +unity `ψ` and `t ∈ H^{1/2}(Γ)`, `Tr_Γ (E t) ∈ B^{1/2}_{2,2}(Γ)`. -/ +theorem memBoundaryBesov_extend (ψ : Ω.BoundaryPartition) (t : Ω.TraceSpace) : + Ω.MemBoundaryBesov 2 ψ (1 / 2) 2 + (Ω.boundaryTrace ψ two_ne_top 2 (toL2 ((Ω.extend t : Ω.SobolevOne) : H^{1}(V)))) := + Ω.memBoundaryBesov_toL2 ψ _ + +/-- **Every function of `B^{1/2}_{2,2}(Γ)` is the boundary trace of an element of the trace +space**: for every resolution of unity `ψ` and `g ∈ B^{1/2}_{2,2}(Γ)` there is `t ∈ H^{1/2}(Γ)` +with `Tr_Γ (E t) = g` almost everywhere on `Γ`. The trace theorem of `H^1(Ω)` +(`Rd.BoundedLipschitzDomain.exists_memSobolevOn_of_memBoundaryBesov`) gives `f ∈ H^1(Ω)` with +boundary trace `g`, `f` is the restriction of some `u` in the Hilbert space `H^1(Ω)` +(`Rd.BoundedLipschitzDomain.memSobolevOn_iff_exists_restrictL2`), and `t = γ u`. -/ +theorem exists_traceSpace_of_memBoundaryBesov (ψ : Ω.BoundaryPartition) {g : V → ℂ} + (hg : Ω.MemBoundaryBesov 2 ψ (1 / 2) 2 g) : + ∃ t : Ω.TraceSpace, Ω.boundaryTrace ψ two_ne_top 2 + (toL2 ((Ω.extend t : Ω.SobolevOne) : H^{1}(V))) =ᶠ[Ω.aeBoundary] g := by + obtain ⟨f, hf, hfg⟩ := Ω.exists_memSobolevOn_of_memBoundaryBesov ψ hg + obtain ⟨u, hu⟩ := (Ω.memSobolevOn_iff_exists_restrictL2 f).1 hf + refine ⟨Ω.trace u, (Ω.boundaryTrace_extend_trace ψ u).trans ?_⟩ + exact (Ω.isBoundaryTrace_iff_forall_memSobolev ψ f g).1 hfg _ (memSobolev_toL2 _) + ((restrictL2_eq_iff_ae_eq u f).1 hu) + +/-! ### `H^{-1/2}(Γ)` -/ + +/-- **The space `H^{-1/2}(Γ)`**: the bounded linear functionals on the trace space `H^{1/2}(Γ)`. +Normal traces of vector fields on `Ω` pair with `H^{1/2}(Γ)` through this space. -/ +abbrev DualTraceSpace := StrongDual ℂ Ω.TraceSpace + +/-- **Riesz for `H^{-1/2}(Γ)`**: the conjugate-linear isometric isomorphism of `H^{-1/2}(Γ)` onto +`H^{1/2}(Γ)` that represents a functional by an element (Mathlib's `InnerProductSpace.toDual`): +`ℓ t = ⟪dualTraceEquiv Ω ℓ, t⟫` (`Rd.BoundedLipschitzDomain.dualTraceEquiv_apply`), and this +element is the only one with this property +(`Rd.BoundedLipschitzDomain.eq_dualTraceEquiv_of_forall`). -/ +noncomputable def dualTraceEquiv : Ω.DualTraceSpace ≃ₗᵢ⋆[ℂ] Ω.TraceSpace := + (InnerProductSpace.toDual ℂ Ω.TraceSpace).symm + +/-- Every functional of `H^{-1/2}(Γ)` is the inner product with its representing element. -/ +theorem dualTraceEquiv_apply (ℓ : Ω.DualTraceSpace) (t : Ω.TraceSpace) : + ℓ t = ⟪Ω.dualTraceEquiv ℓ, t⟫_ℂ := by + rw [dualTraceEquiv, InnerProductSpace.toDual_symm_apply] + +/-- **The representing element is unique**: if `ℓ t = ⟪t₀, t⟫` for every `t ∈ H^{1/2}(Γ)`, then +`t₀ = dualTraceEquiv Ω ℓ` (Mathlib's `ext_inner_right`). -/ +theorem eq_dualTraceEquiv_of_forall (ℓ : Ω.DualTraceSpace) {t₀ : Ω.TraceSpace} + (h : ∀ t, ℓ t = ⟪t₀, t⟫_ℂ) : t₀ = Ω.dualTraceEquiv ℓ := + ext_inner_right ℂ fun t => by rw [← h, dualTraceEquiv_apply] + +/-- **The adjoint of the trace is the extension**: `γ* = E`, the adjoint of an orthogonal +projection onto a closed subspace is its inclusion (Mathlib's +`Submodule.adjoint_orthogonalProjectionOnto`). -/ +theorem adjoint_trace : ContinuousLinearMap.adjoint Ω.trace = Ω.extend := + Submodule.adjoint_orthogonalProjectionOnto _ + +end BoundedLipschitzDomain + +end Rd diff --git a/LeanPool/FunctionSpaces/Domains/Traces/GraphTrace.lean b/LeanPool/FunctionSpaces/Domains/Traces/GraphTrace.lean new file mode 100644 index 0000000000..2ae24c605f --- /dev/null +++ b/LeanPool/FunctionSpaces/Domains/Traces/GraphTrace.lean @@ -0,0 +1,667 @@ +/- +Copyright (c) 2026 Mario Ullrich. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Mario Ullrich +-/ +module + +public import LeanPool.FunctionSpaces.Domains.Lipschitz.GraphParametrization +public import LeanPool.FunctionSpaces.Domains.Extension.LocalExtension + +/- +Modified for Lean Pool: module names and imports adapted. +-/ + +/-! +# Traces on Lipschitz graph domains + +The **trace** of `f` on the boundary `Γ` of a Lipschitz graph domain `Ω`, a function on the +hyperplane `H = e^⊥` through the graph map `γ`, is the series of the restrictions of the terms of +Rychkov's extension (`Rd.LipschitzGraph.trace`): + +`Tr f = ∑_j (η_j ⋆ h_j) ∘ γ`, `h_j = 1_Ω (k_j ⋆ f)`, + +with the local means `k_j` and dual kernels `η_j` of the cone bump; by the support principle only +`f` on `Ω` enters. More generally `Rd.LipschitzGraph.traceSeries` restricts `∑_j η_j ⋆ h_j` for +any `h_j ∈ L_p(V)`. + +**The trace theorem** (`Rd.LipschitzGraph.modNorm_trace_le`; Schneider–Vybíral, Theorem 4.2, +for `p ≥ 1`): for `1 ≤ p < ∞`, `0 < s < 1` and `1 ≤ q ≤ ∞`, + +`‖Tr f‖_{L_p(H)} + ‖(2^(ks) ω_1(Tr f, 2^(-k))_p)_k‖_{ℓ_q} + ≤ K (‖f‖_{L_p(Ω)} + ‖(2^(k(s+1/p)) ω_L(f, 2^(-k), Ω)_p)_k‖_{ℓ_q})`. + +The proof follows Schneider–Vybíral with atoms: the cell atoms `a_{j,m}` of `η_j ⋆ h_j` +(`Rd.cellAtom`) satisfy pointwise Lipschitz bounds, so their restrictions `a_{j,m} ∘ γ` are +regular atoms of order and exponent `1` on `H` (`Rd.LipschitzGraph.isRegularAtom_comp_graphMap`), +centred at the projections of the cell centres. Only the cells whose atoms meet the graph count +(`Rd.LipschitzGraph.traceCoef`); their centres lie within `ρ 2^(-j)` of `Γ`, so they have bounded +overlap on `H` (`Rd.LipschitzGraph.exists_trace_atoms`). With `‖λ_{j,·}‖_{ℓ_p} ≤ 2^(jn/p) ‖h_j‖_p` +the coefficient quasi-norm on `H` is at most `‖(2^(j(s+1/p)) ‖h_j‖_p)_j‖_{ℓ_q}`, since +`s - (n-1)/p = (s + 1/p) - n/p`, and the atomic synthesis on `H` (`Rd.modNorm_le_coeffNorm`) +concludes (`Rd.LipschitzGraph.modNorm_traceSeries_le`). This last step holds for trace atoms of +every order `r > s` (`Rd.LipschitzGraph.modNorm_traceSeries_le_of_atoms`), which gives the traces +of every order on the half-space. + +The trace is linear (`Rd.LipschitzGraph.trace_sub`, `Rd.LipschitzGraph.trace_smul`) and bounded +by the intrinsic norm of `B^{1/p}_{p,1}` on `Ω` (`Rd.LipschitzGraph.enorm_trace_le_modNormOn`), so +by the norm of `B^{1/p}_{p,1}` on `V` (`Rd.LipschitzGraph.enorm_trace_le`), hence continuous +along sequences that converge in this norm (`Rd.LipschitzGraph.tendsto_trace_of_modNorm_sub_le`). +-/ + +@[expose] public section + +open MeasureTheory Filter Topology Module Metric +open scoped ENNReal + +open ENNReal (lqNorm dyadicWeight) + +namespace Rd + +namespace LipschitzGraph + +variable {V : Type*} [NormedAddCommGroup V] [InnerProductSpace ℝ V] [FiniteDimensional ℝ V] + [MeasurableSpace V] [BorelSpace V] (Ω : LipschitzGraph V) + +/-! ### Traces of the terms -/ + +section Terms + +variable (b : LocalMeansBump V) + +/-- The **trace of a term**: `x' ↦ (η_j ⋆ h)(γ x')`. -/ +noncomputable def traceFun (L j : ℕ) (h : V → ℂ) (x' : Ω.hyperplane) : ℂ := + conv (b.dual L j) h volume (Ω.graphMap x') + +open Classical in +/-- The **coefficients of the trace atoms**: `λ_{j,m}` for the cells whose atoms meet the graph, +`0` for the others. -/ +noncomputable def traceCoef (p : ℝ≥0∞) (L j : ℕ) (h : V → ℂ) (m : Fin (finrank ℝ V) → ℤ) : ℂ := + if ∃ y', cellAtom p (b.dual L j) j h m (Ω.graphMap y') ≠ 0 then cellCoef p j h m else 0 + +/-- The trace of a term is continuous. -/ +theorem continuous_traceFun {p : ℝ≥0∞} (hp1 : 1 ≤ p) (L j : ℕ) {h : V → ℂ} + (hh : MemLp h p volume) : Continuous (Ω.traceFun b L j h) := + ((b.hasCompactSupport_dual L j).continuous_convolution_left (ContinuousLinearMap.mul ℂ ℂ) + (b.continuous_dual L j) (hh.locallyIntegrable hp1)).comp Ω.continuous_graphMap + +/-- **The trace of a term is the sum of the traces of its cell atoms**: +`(η_j ⋆ h)(γ x') = ∑_m λ'_{j,m} a_{j,m}(γ x')` with the coefficients of the cells meeting the +graph. -/ +theorem traceFun_eq_tsum {p : ℝ≥0∞} (hp1 : 1 ≤ p) (L j : ℕ) {h : V → ℂ} + (hh : MemLp h p volume) (x' : Ω.hyperplane) : + Ω.traceFun b L j h x' = + ∑' m, Ω.traceCoef b p L j h m * (cellAtom p (b.dual L j) j h m ∘ Ω.graphMap) x' := by + have hρ : 0 ≤ 2 * (L : ℝ) * b.radius / 2 ^ j := + div_nonneg (mul_nonneg (mul_nonneg zero_le_two (Nat.cast_nonneg L)) b.radius_nonneg) + (by positivity) + rw [traceFun, conv_eq_tsum_cellAtom hp1 (b.continuous_dual L j) hρ + (fun y hy => b.dual_eq_zero_of_lt L j hy) hh j] + refine tsum_congr fun m => ?_ + rw [Function.comp_apply, traceCoef] + split_ifs with hm + · rfl + · push Not at hm + rw [hm x', mul_zero, mul_zero] + +/-- `|λ'_{j,m}| ≤ |λ_{j,m}|`. -/ +theorem enorm_traceCoef_le (p : ℝ≥0∞) (L j : ℕ) (h : V → ℂ) (m : Fin (finrank ℝ V) → ℤ) : + ‖Ω.traceCoef b p L j h m‖ₑ ≤ ‖cellCoef p j h m‖ₑ := by + rw [traceCoef] + split_ifs + · exact le_rfl + · rw [eNorm_zero] + exact zero_le + +/-- `‖λ'_{j,·}‖_{ℓ_p} ≤ 2^(jn/p) ‖h‖_p`. -/ +theorem levelNorm_traceCoef_le {p : ℝ≥0∞} (hp0 : p ≠ 0) (hp : p ≠ ∞) (L j : ℕ) {h : V → ℂ} + (hh : MemLp h p volume) : + levelNorm p (Ω.traceCoef b p L j h) ≤ + dyadicWeight (finrank ℝ V / p.toReal) j * eLpNorm h p volume := + (levelNorm_mono p (Ω.enorm_traceCoef_le b p L j h)).trans_eq (levelNorm_cellCoef hp0 hp hh j) + +/-- **The centres of the trace atoms lie near the graph**: if the cell atom `a_{j,m}` of `K ⋆ g`, +`K = 0` outside `B(0, ρ 2^(-j))`, does not vanish on the graph and the projection of its centre lies +within `(d + t) 2^(-j)` of `x'`, `d = ρ + n`, then the centre lies within +`(d + (1 + M)(2d + t)) 2^(-j)` of `γ x'`. -/ +theorem norm_graphMap_sub_cellCenter_le {p : ℝ≥0∞} {K g : V → ℂ} {ρ t : ℝ} {j : ℕ} + (hK : ∀ y, ρ / 2 ^ j < ‖y‖ → K y = 0) {m : Fin (finrank ℝ V) → ℤ} + (hne : ∃ y', cellAtom p K j g m (Ω.graphMap y') ≠ 0) {x' : Ω.hyperplane} + (hdist : ‖x' - Ω.proj (cellCenter j m)‖ ≤ (ρ + finrank ℝ V + t) / 2 ^ j) : + ‖Ω.graphMap x' - cellCenter j m‖ ≤ + (ρ + finrank ℝ V + (1 + Ω.M) * (2 * (ρ + finrank ℝ V) + t)) / 2 ^ j := by + set d := ρ + finrank ℝ V + obtain ⟨y', hy'⟩ := hne + have h1 : ‖Ω.graphMap y' - cellCenter j m‖ ≤ d / 2 ^ j := + not_lt.1 fun hlt => hy' (cellAtom_eq_zero hK m hlt) + have h2 : ‖y' - Ω.proj (cellCenter j m)‖ ≤ d / 2 ^ j := (Ω.norm_sub_proj_le y' _).trans h1 + have h3 : ‖x' - y'‖ ≤ (2 * d + t) / 2 ^ j := by + calc ‖x' - y'‖ = ‖(x' - Ω.proj (cellCenter j m)) - (y' - Ω.proj (cellCenter j m))‖ := by + congr 1 + abel + _ ≤ ‖x' - Ω.proj (cellCenter j m)‖ + ‖y' - Ω.proj (cellCenter j m)‖ := norm_sub_le _ _ + _ ≤ (d + t) / 2 ^ j + d / 2 ^ j := add_le_add hdist h2 + _ = (2 * d + t) / 2 ^ j := by ring + calc ‖Ω.graphMap x' - cellCenter j m‖ + = ‖(Ω.graphMap x' - Ω.graphMap y') + (Ω.graphMap y' - cellCenter j m)‖ := by + congr 1 + abel + _ ≤ ‖Ω.graphMap x' - Ω.graphMap y'‖ + ‖Ω.graphMap y' - cellCenter j m‖ := norm_add_le _ _ + _ ≤ (1 + Ω.M) * ((2 * d + t) / 2 ^ j) + d / 2 ^ j := + add_le_add ((Ω.norm_graphMap_sub_le x' y').trans + (mul_le_mul_of_nonneg_left h3 (by linarith [Ω.M_nonneg]))) h1 + _ = (d + (1 + Ω.M) * (2 * d + t)) / 2 ^ j := by ring + +/-- **The trace atoms**: there are a radius factor `d`, a constant `C < ∞` and an overlap bound +`N` such that for every level `j` and `h ∈ L_p` the restrictions `a_{j,m} ∘ γ` of the cell atoms +of `η_j ⋆ h` are regular atoms of order and exponent `1` on `H` centred at `P c_{j,m}`, and the +centres of the cells meeting the graph have overlap at most `N`: such a centre lies within +`(d + (1 + M)(2d + 1)) 2^(-j)` of `γ x'` whenever its projection lies within `(d + 1) 2^(-j)` of +`x'`. -/ +theorem exists_trace_atoms {p : ℝ≥0∞} (hp1 : 1 ≤ p) (L : ℕ) : + ∃ (d : ℝ) (C : ℝ≥0∞) (N : ℕ), 0 ≤ d ∧ C ≠ ∞ ∧ ∀ (j : ℕ) {h : V → ℂ}, MemLp h p volume → + (∀ m, IsRegularAtom p 1 1 d C j (Ω.proj (cellCenter j m)) + (cellAtom p (b.dual L j) j h m ∘ Ω.graphMap)) ∧ + ∀ x' (S : Finset (Fin (finrank ℝ V) → ℤ)), + (∀ m ∈ S, Ω.traceCoef b p L j h m ≠ 0 ∧ ‖x' - Ω.proj (cellCenter j m)‖ ≤ (d + 1) / 2 ^ j) → + S.card ≤ N := by + obtain ⟨A, hA, hb⟩ := b.exists_higherDiff_dual_bound L 1 + have ht : 0 ≤ 1 - 1 / p.toReal := one_sub_one_div_toReal_nonneg hp1 + set ρ := 2 * (L : ℝ) * b.radius + have hρ : 0 ≤ ρ := mul_nonneg (mul_nonneg zero_le_two (Nat.cast_nonneg L)) b.radius_nonneg + set d := ρ + finrank ℝ V + have hd : 0 ≤ d := add_nonneg hρ (Nat.cast_nonneg _) + set A1 := 2 ^ (1 : ℕ) * A * (ENNReal.ofReal ((ρ + 1) ^ finrank ℝ V) * + volume (ball (0 : V) 1)) ^ (1 - 1 / p.toReal) + have hA1 : A1 ≠ ∞ := ENNReal.mul_ne_top (ENNReal.mul_ne_top (by simp) hA) + (ENNReal.rpow_ne_top_of_nonneg ht (ENNReal.mul_ne_top ENNReal.ofReal_ne_top + measure_ball_lt_top.ne)) + set ρ' := d + (1 + Ω.M) * (2 * d + 1) + have hρ' : 0 ≤ ρ' := add_nonneg hd (mul_nonneg (by linarith [Ω.M_nonneg]) (by linarith)) + have hKρ : ∀ j y, ρ / 2 ^ j < ‖y‖ → b.dual L j y = 0 := fun j y hy => b.dual_eq_zero_of_lt L j hy + refine ⟨d, ENNReal.ofReal (1 + Ω.M) * A1 * (((1 + 1 : ℕ) : ℝ≥0∞) * + (ENNReal.ofReal (d ^ finrank ℝ Ω.hyperplane) * volume (ball (0 : Ω.hyperplane) 1))) ^ + (1 / p.toReal), ⌈(2 * ρ' + 2) ^ finrank ℝ V⌉₊, hd, ?_, fun j h hh => ⟨fun m => ?_, + fun x' S hS => ?_⟩⟩ + · exact ENNReal.mul_ne_top (ENNReal.mul_ne_top ENNReal.ofReal_ne_top hA1) + (ENNReal.rpow_ne_top_of_nonneg (div_nonneg zero_le_one ENNReal.toReal_nonneg) + (ENNReal.mul_ne_top (ENNReal.natCast_ne_top _) + (ENNReal.mul_ne_top ENNReal.ofReal_ne_top measure_ball_lt_top.ne))) + · have hK : ∀ y, ‖b.dual L j y‖ₑ ≤ A * dyadicWeight (finrank ℝ V) j := fun y => by + simpa using hb 0 (Nat.zero_le 1) j 0 y + refine Ω.isRegularAtom_comp_graphMap hd (continuous_cellAtom hp1 (b.continuous_dual L j) + (b.hasCompactSupport_dual L j) hh j m) (fun x hx => cellAtom_eq_zero (hKρ j) m hx) + (fun x => ?_) (fun v x => ?_) + · refine (enorm_cellAtom_le hp1 hh m hK hρ (hKρ j) x).trans ?_ + have hXY : (ENNReal.ofReal (ρ ^ finrank ℝ V) * volume (ball (0 : V) 1)) ^ + (1 - 1 / p.toReal) ≤ (ENNReal.ofReal ((ρ + 1) ^ finrank ℝ V) * + volume (ball (0 : V) 1)) ^ (1 - 1 / p.toReal) := + ENNReal.rpow_le_rpow (mul_le_mul' (ENNReal.ofReal_le_ofReal + (pow_le_pow_left₀ hρ (by linarith) _)) le_rfl) ht + calc A * (ENNReal.ofReal (ρ ^ finrank ℝ V) * volume (ball (0 : V) 1)) ^ (1 - 1 / p.toReal) + ≤ 1 * (A * (ENNReal.ofReal ((ρ + 1) ^ finrank ℝ V) * volume (ball (0 : V) 1)) ^ + (1 - 1 / p.toReal)) := by + rw [one_mul] + exact mul_le_mul' le_rfl hXY + _ ≤ A1 := by + simp only [A1] + rw [mul_assoc] + exact mul_le_mul' (by norm_num) le_rfl + · have h1 := enorm_higherDiff_cellAtom_le hp1 (b.continuous_dual L j) hh m hK + (hb 1 le_rfl j) hρ (hKρ j) v x + rw [Nat.cast_one, ENNReal.rpow_one] at h1 + simpa only [Function.iterate_one, fwdDiff] using h1 + · refine card_le_of_norm_sub_cellCenter_le j hρ' (Ω.graphMap x') S fun m hm => ?_ + obtain ⟨hcoef, hdist⟩ := hS m hm + have hex : ∃ y', cellAtom p (b.dual L j) j h m (Ω.graphMap y') ≠ 0 := by + by_contra hcon + exact hcoef (by simp [traceCoef, hcon]) + exact Ω.norm_graphMap_sub_cellCenter_le (hKρ j) hex hdist + +omit [MeasurableSpace V] [BorelSpace V] in +/-- `dim H = n - 1` as a real number. -/ +theorem finrank_hyperplane_eq : (finrank ℝ Ω.hyperplane : ℝ) = finrank ℝ V - 1 := by + have h := Ω.finrank_hyperplane_add_one + rw [← h] + push_cast + ring + +/-- **The traces of the terms are in `L_p(H)`**: `‖(η_j ⋆ h) ∘ γ‖_{L_p(H)} ≤ K 2^(j/p) ‖h‖_p`, by +the level sums of the trace atoms (`Rd.eLpNorm_levelSum_le` on `H`). -/ +theorem eLpNorm_traceFun_le {p : ℝ≥0∞} (hp1 : 1 ≤ p) (hp : p ≠ ∞) (L : ℕ) : + ∃ K : ℝ≥0∞, K ≠ ∞ ∧ ∀ j {h : V → ℂ}, MemLp h p volume → + eLpNorm (Ω.traceFun b L j h) p (volume : Measure Ω.hyperplane) ≤ + K * dyadicWeight (1 / p.toReal) j * eLpNorm h p volume := by + have hp0 : p ≠ 0 := (zero_lt_one.trans_le hp1).ne' + obtain ⟨d, C, N, hd, hC, hatoms⟩ := Ω.exists_trace_atoms b hp1 L + have hexp : 0 ≤ 1 - 1 / p.toReal := one_sub_one_div_toReal_nonneg hp1 + refine ⟨(N : ℝ≥0∞) ^ (1 - 1 / p.toReal) * C, ENNReal.mul_ne_top + (ENNReal.rpow_ne_top_of_nonneg hexp (ENNReal.natCast_ne_top N)) hC, fun j h hh => ?_⟩ + obtain ⟨hat, hN⟩ := hatoms j hh + have hlev := eLpNorm_levelSum_le hp1 hp (fun m => Ω.proj (cellCenter j m)) + (fun m => cellAtom p (b.dual L j) j h m ∘ Ω.graphMap) (Ω.traceCoef b p L j h) + (fun x' S hS => hN x' S fun m hm => ⟨(hS m hm).1, by simpa only [Nat.cast_one] using (hS m + hm).2⟩) + hat + (Ω.continuous_traceFun b hp1 L j hh).aestronglyMeasurable + (Eventually.of_forall (Ω.traceFun_eq_tsum b hp1 L j hh)) + refine hlev.trans ?_ + calc (N : ℝ≥0∞) ^ (1 - 1 / p.toReal) * + (C * dyadicWeight (-(finrank ℝ Ω.hyperplane / p.toReal)) j) * + levelNorm p (Ω.traceCoef b p L j h) + ≤ (N : ℝ≥0∞) ^ (1 - 1 / p.toReal) * + (C * dyadicWeight (-(finrank ℝ Ω.hyperplane / p.toReal)) j) * + (dyadicWeight (finrank ℝ V / p.toReal) j * eLpNorm h p volume) := + mul_le_mul' le_rfl (Ω.levelNorm_traceCoef_le b hp0 hp L j hh) + _ = (N : ℝ≥0∞) ^ (1 - 1 / p.toReal) * C * + (dyadicWeight (-(finrank ℝ Ω.hyperplane / p.toReal)) j * + dyadicWeight (finrank ℝ V / p.toReal) j) * eLpNorm h p volume := by ring + _ = (N : ℝ≥0∞) ^ (1 - 1 / p.toReal) * C * dyadicWeight (1 / p.toReal) j * + eLpNorm h p volume := by + rw [← ENNReal.dyadicWeight_add, Ω.finrank_hyperplane_eq] + congr 3 + ring + +/-- The traces of the terms are in `L_p(H)`. -/ +theorem memLp_traceFun {p : ℝ≥0∞} (hp1 : 1 ≤ p) (hp : p ≠ ∞) (L j : ℕ) {h : V → ℂ} + (hh : MemLp h p volume) : MemLp (Ω.traceFun b L j h) p (volume : Measure Ω.hyperplane) := by + obtain ⟨K, hK, hle⟩ := Ω.eLpNorm_traceFun_le b hp1 hp L + exact memLp_iff.2 ((hle j hh).trans_lt + (ENNReal.mul_lt_top (ENNReal.mul_lt_top hK.lt_top (ENNReal.dyadicWeight_lt_top _ _)) + hh.eLpNorm_lt_top)) + +end Terms + +/-! ### The trace of a series -/ + +section Series + +variable (b : LocalMeansBump V) {p : ℝ≥0∞} [Fact (1 ≤ p)] + +/-- The trace of the `j`-th term `η_j ⋆ h` in `L_p(H)`. -/ +noncomputable def traceTerm (hp : p ≠ ∞) (L j : ℕ) (h : Lp ℂ p (volume : Measure V)) : + Lp ℂ p (volume : Measure Ω.hyperplane) := + (Ω.memLp_traceFun b Fact.out hp L j (Lp.memLp h)).toLp _ + +/-- The trace of a term agrees with `(η_j ⋆ h) ∘ γ` almost everywhere. -/ +theorem traceTerm_ae (hp : p ≠ ∞) (L j : ℕ) (h : Lp ℂ p (volume : Measure V)) : + Ω.traceTerm b hp L j h =ᵐ[volume] Ω.traceFun b L j h := + MemLp.coeFn_toLp _ + +/-- The **trace of a series** `∑_j η_j ⋆ h_j`: `∑_j (η_j ⋆ h_j) ∘ γ` in `L_p(H)`. -/ +noncomputable def traceSeries (hp : p ≠ ∞) (L : ℕ) (h : ℕ → Lp ℂ p (volume : Measure V)) : + Lp ℂ p (volume : Measure Ω.hyperplane) := + ∑' j, Ω.traceTerm b hp L j (h j) + +/-- **The trace series converges absolutely** for `s > 0` and +`X = ‖(2^(j(s+1/p)) ‖h_j‖_p)_j‖_{ℓ_q} < ∞`: `‖(η_j ⋆ h_j) ∘ γ‖_{L_p(H)} ≤ K 2^(j/p) ‖h_j‖_p ≤ +K X 2^(-js)`. -/ +theorem summable_traceTerm (hp : p ≠ ∞) (L : ℕ) {s : ℝ} (hs : 0 < s) {q : ℝ≥0∞} (hq : 1 ≤ q) + {h : ℕ → Lp ℂ p (volume : Measure V)} + (hX : lqNorm q (fun j => dyadicWeight (s + 1 / p.toReal) j * ‖h j‖ₑ) < ∞) : + Summable fun j => Ω.traceTerm b hp L j (h j) := by + have hp1 : 1 ≤ p := Fact.out + obtain ⟨K, hK, hle⟩ := Ω.eLpNorm_traceFun_le b hp1 hp L + set X := lqNorm q (fun j => dyadicWeight (s + 1 / p.toReal) j * ‖h j‖ₑ) + have hterm : ∀ j, ‖Ω.traceTerm b hp L j (h j)‖ₑ ≤ K * X * dyadicWeight (-s) j := fun j => by + have hXj : dyadicWeight (s + 1 / p.toReal) j * ‖h j‖ₑ ≤ X := + ENNReal.le_lqNorm (zero_lt_one.trans_le hq).ne' + (fun j => dyadicWeight (s + 1 / p.toReal) j * ‖h j‖ₑ) j + have hw : dyadicWeight (1 / p.toReal) j = + dyadicWeight (s + 1 / p.toReal) j * dyadicWeight (-s) j := by + rw [← ENNReal.dyadicWeight_add] + congr 1 + ring + rw [Lp.eNorm_def, eLpNorm_congr_ae (Ω.traceTerm_ae b hp L j (h j))] + refine (hle j (Lp.memLp (h j))).trans ?_ + rw [← Lp.eNorm_def, hw] + calc K * (dyadicWeight (s + 1 / p.toReal) j * dyadicWeight (-s) j) * ‖h j‖ₑ + = K * (dyadicWeight (s + 1 / p.toReal) j * ‖h j‖ₑ) * dyadicWeight (-s) j := by ring + _ ≤ K * X * dyadicWeight (-s) j := by gcongr + refine Summable.of_eNorm (ne_top_of_le_ne_top ?_ (tsum_le_tsum hterm)) + rw [ENNReal.tsum_mul_left, ENNReal.tsum_dyadicWeight_neg] + exact ENNReal.mul_ne_top (ENNReal.mul_ne_top hK hX.ne) + (ENNReal.one_sub_two_rpow_neg_inv_ne_top hs) + +/-- The partial sums of the trace series converge to it. -/ +theorem tendsto_sum_traceTerm (hp : p ≠ ∞) (L : ℕ) {s : ℝ} (hs : 0 < s) {q : ℝ≥0∞} (hq : 1 ≤ q) + {h : ℕ → Lp ℂ p (volume : Measure V)} + (hX : lqNorm q (fun j => dyadicWeight (s + 1 / p.toReal) j * ‖h j‖ₑ) < ∞) : + Tendsto (fun J => ∑ j ∈ Finset.range (J + 1), Ω.traceTerm b hp L j (h j)) atTop + (𝓝 (Ω.traceSeries b hp L h)) := + ((Ω.summable_traceTerm b hp L hs hq hX).hasSum.tendsto_sum_nat).comp (tendsto_add_atTop_nat 1) + +/-- **The trace of a series from trace atoms of order `r`**: let `0 < s < r`, and let the +restrictions `a_{j,m} ∘ γ` of the cell atoms of `η_j ⋆ h`, for every level `j` and `h ∈ L_p`, be +regular atoms on `H` of order and exponent `r` with radius factor `d` and constant `C < ∞`, +centred at `P c_{j,m}`, and for every `x' ∈ H` let at most `N` of the centres `P c_{j,m}` with +nonzero coefficient `λ'_{j,m}` lie within `(d + r) 2^(-j)` of `x'`. Then +there is `K < ∞` such that the trace `Tr = ∑_j (η_j ⋆ h_j) ∘ γ` has +`‖Tr‖_{L_p(H)} + ‖(2^(ks) ω_r(Tr, 2^(-k))_p)_k‖_{ℓ_q} ≤ K ‖(2^(j(s+1/p)) ‖h_j‖_p)_j‖_{ℓ_q}`, +by the atomic synthesis on `H` (`Rd.modNorm_le_coeffNorm`) and +`2^(j(s-(n-1)/p)) ‖λ'_{j,·}‖_{ℓ_p} ≤ 2^(j(s+1/p)) ‖h_j‖_p`. -/ +theorem modNorm_traceSeries_le_of_atoms (hp : p ≠ ∞) (L : ℕ) {r : ℕ} {s : ℝ} (hs : 0 < s) + (hsr : s < r) {q : ℝ≥0∞} (hq : 1 ≤ q) {d : ℝ} {C : ℝ≥0∞} {N : ℕ} (hC : C ≠ ∞) + (hatoms : ∀ (j : ℕ) {h : V → ℂ}, MemLp h p volume → + (∀ m, IsRegularAtom p r r d C j (Ω.proj (cellCenter j m)) + (cellAtom p (b.dual L j) j h m ∘ Ω.graphMap)) ∧ + ∀ x' (S : Finset (Fin (finrank ℝ V) → ℤ)), + (∀ m ∈ S, Ω.traceCoef b p L j h m ≠ 0 ∧ ‖x' - Ω.proj (cellCenter j m)‖ ≤ (d + r) / 2 ^ j) → + S.card ≤ N) : + ∃ K : ℝ≥0∞, K ≠ ∞ ∧ ∀ h : ℕ → Lp ℂ p (volume : Measure V), + lqNorm q (fun j => dyadicWeight (s + 1 / p.toReal) j * ‖h j‖ₑ) < ∞ → + ‖Ω.traceSeries b hp L h‖ₑ + + lqNorm q (fun k => dyadicWeight s k * lpModulus p r (Ω.traceSeries b hp L h) k) ≤ + K * lqNorm q (fun j => dyadicWeight (s + 1 / p.toReal) j * ‖h j‖ₑ) := by + have hp1 : 1 ≤ p := Fact.out + have hp0 : p ≠ 0 := (zero_lt_one.trans_le hp1).ne' + refine ⟨atomSynthConst p N C r s r, atomSynthConst_ne_top hp1 N hC r hs hsr, fun h hX => ?_⟩ + have hsyn := modNorm_le_coeffNorm hp (fun j m => Ω.proj (cellCenter j m)) + (fun j m => cellAtom p (b.dual L j) j (h j) m ∘ Ω.graphMap) + (fun j => Ω.traceCoef b p L j (h j)) + (fun j x' S hS => (hatoms j (Lp.memLp (h j))).2 x' S hS) + (fun j m => (hatoms j (Lp.memLp (h j))).1 m) + (fun j => (Ω.traceTerm_ae b hp L j (h j)).mono fun x' hx' => + hx'.trans (Ω.traceFun_eq_tsum b hp1 L j (Lp.memLp (h j)) x')) + (Ω.tendsto_sum_traceTerm b hp L hs hq hX) hs hsr hq + refine hsyn.trans (mul_le_mul' le_rfl ?_) + rw [coeffNorm] + refine ENNReal.lqNorm_mono fun j => ?_ + calc dyadicWeight (s - finrank ℝ Ω.hyperplane / p.toReal) j * + levelNorm p (Ω.traceCoef b p L j (h j)) + ≤ dyadicWeight (s - finrank ℝ Ω.hyperplane / p.toReal) j * + (dyadicWeight (finrank ℝ V / p.toReal) j * eLpNorm (h j) p volume) := + mul_le_mul' le_rfl (Ω.levelNorm_traceCoef_le b hp0 hp L j (Lp.memLp (h j))) + _ = dyadicWeight (s + 1 / p.toReal) j * ‖h j‖ₑ := by + rw [← mul_assoc, ← ENNReal.dyadicWeight_add, Lp.eNorm_def, Ω.finrank_hyperplane_eq] + congr 2 + ring + +/-- **The trace of a series** (Schneider–Vybíral, Theorem 4.2): for `0 < s < 1` +there is `K < ∞` such that the trace `Tr = ∑_j (η_j ⋆ h_j) ∘ γ` has +`‖Tr‖_{L_p(H)} + ‖(2^(ks) ω_1(Tr, 2^(-k))_p)_k‖_{ℓ_q} ≤ K ‖(2^(j(s+1/p)) ‖h_j‖_p)_j‖_{ℓ_q}`, +by the atomic synthesis on `H` with the trace atoms of order `1` +(`Rd.LipschitzGraph.exists_trace_atoms`, `Rd.LipschitzGraph.modNorm_traceSeries_le_of_atoms`). -/ +theorem modNorm_traceSeries_le (hp : p ≠ ∞) (L : ℕ) {s : ℝ} (hs : 0 < s) (hs1 : s < 1) + {q : ℝ≥0∞} (hq : 1 ≤ q) : + ∃ K : ℝ≥0∞, K ≠ ∞ ∧ ∀ h : ℕ → Lp ℂ p (volume : Measure V), + lqNorm q (fun j => dyadicWeight (s + 1 / p.toReal) j * ‖h j‖ₑ) < ∞ → + ‖Ω.traceSeries b hp L h‖ₑ + + lqNorm q (fun k => dyadicWeight s k * lpModulus p 1 (Ω.traceSeries b hp L h) k) ≤ + K * lqNorm q (fun j => dyadicWeight (s + 1 / p.toReal) j * ‖h j‖ₑ) := by + obtain ⟨d, C, N, -, hC, hatoms⟩ := Ω.exists_trace_atoms b (Fact.out : 1 ≤ p) L + exact Ω.modNorm_traceSeries_le_of_atoms b hp L (r := 1) hs (by exact_mod_cast hs1) hq hC + fun j h hh => ⟨fun m => by simpa only [Nat.cast_one] using (hatoms j hh).1 m, + fun x' S hS => (hatoms j hh).2 x' S fun m hm => + ⟨(hS m hm).1, by simpa only [Nat.cast_one] using (hS m hm).2⟩⟩ + +end Series + +/-! ### The trace on a Lipschitz graph domain -/ + +variable {p : ℝ≥0∞} [Fact (1 ≤ p)] + +/-- The **trace** on the boundary of the Lipschitz graph domain `Ω`, a function on `H`: +`Tr f = ∑_j (η_j ⋆ 1_Ω (k_j ⋆ f)) ∘ γ` with the kernels of the cone bump; only `f` on `Ω` +enters. -/ +noncomputable def trace (hp : p ≠ ∞) (L : ℕ) (f : Lp ℂ p (volume : Measure V)) : + Lp ℂ p (volume : Measure Ω.hyperplane) := + Ω.traceSeries Ω.coneBump hp L fun j => Ω.cutoff (Ω.coneBump.localMean hp L j f) + +/-- **The trace theorem on Lipschitz graph domains** (Schneider–Vybíral, Theorem 4.2, +for `p ≥ 1`): for `1 ≤ p < ∞`, `0 < s < 1` and `1 ≤ q ≤ ∞` there is `K < ∞` with +`‖Tr f‖_{L_p(H)} + ‖(2^(ks) ω_1(Tr f, 2^(-k))_p)_k‖_{ℓ_q} ≤ +K (‖f‖_{L_p(Ω)} + ‖(2^(k(s+1/p)) ω_L(f, 2^(-k), Ω)_p)_k‖_{ℓ_q})`. -/ +theorem modNorm_trace_le (hp : p ≠ ∞) (L : ℕ) {s : ℝ} (hs : 0 < s) (hs1 : s < 1) {q : ℝ≥0∞} + (hq : 1 ≤ q) : + ∃ K : ℝ≥0∞, K ≠ ∞ ∧ ∀ f : Lp ℂ p (volume : Measure V), + modNormOn Ω.measurableSet_domain L (s + 1 / p.toReal) q f < ∞ → + ‖Ω.trace hp L f‖ₑ + lqNorm q (fun k => dyadicWeight s k * lpModulus p 1 (Ω.trace hp L f) k) ≤ + K * modNormOn Ω.measurableSet_domain L (s + 1 / p.toReal) q f := by + obtain ⟨K, hK, hle⟩ := Ω.modNorm_traceSeries_le Ω.coneBump hp L hs hs1 hq + refine ⟨K * Ω.intrinsicConst L, ENNReal.mul_ne_top hK (Ω.intrinsicConst_ne_top L), + fun f hf => ?_⟩ + have hX := Ω.intrinsicNorm_lt_top hp L (s + 1 / p.toReal) hq hf + rw [mul_assoc] + exact (hle (fun j => Ω.cutoff (Ω.coneBump.localMean hp L j f)) hX).trans + (mul_le_mul' le_rfl (Ω.intrinsicNorm_le hp L (s + 1 / p.toReal) hq f)) + +/-! ### The trace of continuous functions -/ + +/-- **The partial sums of the trace at a boundary point**: +`∑_{j ≤ J} (η_j ⋆ 1_Ω (k_j ⋆ f))(γ x') = (m_{2^J} ⋆ (m_{2^J} ⋆ f))(γ x')`: at boundary points the +cut-off does not matter (the kernels are supported in `-K` and `γ x' + K ⊆ Ω`), and the partial +sums of the reproducing formula are `m_{2^J} ⋆ m_{2^J} ⋆ f` at every point. -/ +theorem sum_traceFun_eq_conv (hp : p ≠ ∞) (L J : ℕ) (f : Lp ℂ p (volume : Measure V)) + (x' : Ω.hyperplane) : + ∑ j ∈ Finset.range (J + 1), + Ω.traceFun Ω.coneBump L j (Ω.cutoff (Ω.coneBump.localMean hp L j f)) x' = + conv (Ω.coneBump.scaled L J) (convLp hp (Ω.coneBump.integrable_scaled L J) f) volume + (Ω.graphMap x') := by + have hcut : ∀ j, Ω.traceFun Ω.coneBump L j (Ω.cutoff (Ω.coneBump.localMean hp L j f)) x' = + conv (Ω.coneBump.dual L j) (Ω.coneBump.localMean hp L j f) volume (Ω.graphMap x') := + fun j => by + rw [traceFun, conv_congr_ae (Ω.cutoff_apply_ae _), + conv_indicator_eq_of_forall _ (fun z hz => ?_) volume] + rw [sub_eq_add_neg] + exact Ω.graphMap_add_mem x' (Ω.coneSupported_dual L j z hz) + simp_rw [hcut] + rw [Ω.coneBump.sum_conv_dual_localMean_apply hp L J f] + +/-- The partial sums of the trace for a representative `G` of `f`: +`(m_{2^J} ⋆ (m_{2^J} ⋆ G))(γ x')`. -/ +theorem sum_traceFun_eq (hp : p ≠ ∞) (L J : ℕ) {f : Lp ℂ p (volume : Measure V)} {G : V → ℂ} + (hfG : (f : V → ℂ) =ᵐ[volume] G) (x' : Ω.hyperplane) : + ∑ j ∈ Finset.range (J + 1), + Ω.traceFun Ω.coneBump L j (Ω.cutoff (Ω.coneBump.localMean hp L j f)) x' = + conv (Ω.coneBump.scaled L J) (conv (Ω.coneBump.scaled L J) G volume) volume + (Ω.graphMap x') := by + rw [Ω.sum_traceFun_eq_conv hp L J f] + have hG : ⇑(convLp hp (Ω.coneBump.integrable_scaled L J) f) =ᵐ[volume] + conv (Ω.coneBump.scaled L J) G volume := + (convLp_apply_ae hp _ f).trans (Filter.EventuallyEq.of_eq (conv_congr_ae hfG)) + rw [conv_congr_ae hG] + +/-- **The trace is an almost everywhere limit of mollified restrictions**: for a finite intrinsic +norm of smoothness `s + 1/p`, `s > 0`, a subsequence of `(m_{2^J} ⋆ (m_{2^J} ⋆ f))(γ x')` converges +to `Tr f(x')` for almost every `x'`, since the partial sums of the trace series converge in +`L_p(H)`. -/ +theorem exists_subseq_tendsto_trace (hp : p ≠ ∞) (L : ℕ) {s : ℝ} (hs : 0 < s) {q : ℝ≥0∞} + (hq : 1 ≤ q) {f : Lp ℂ p (volume : Measure V)} + (hX : Ω.intrinsicNorm hp L (s + 1 / p.toReal) q f < ∞) : + ∃ ns : ℕ → ℕ, StrictMono ns ∧ ∀ᵐ x' ∂(volume : Measure Ω.hyperplane), + Tendsto (fun k => conv (Ω.coneBump.scaled L (ns k)) + (convLp hp (Ω.coneBump.integrable_scaled L (ns k)) f) volume (Ω.graphMap x')) atTop + (𝓝 (Ω.trace hp L f x')) := by + have hp0 : p ≠ 0 := (zero_lt_one.trans_le (Fact.out : 1 ≤ p)).ne' + have hS := Ω.tendsto_sum_traceTerm Ω.coneBump hp L hs hq + (h := fun j => Ω.cutoff (Ω.coneBump.localMean hp L j f)) hX + have hSae : ∀ᵐ x' ∂(volume : Measure Ω.hyperplane), ∀ J, + (∑ j ∈ Finset.range (J + 1), Ω.traceTerm Ω.coneBump hp L j + (Ω.cutoff (Ω.coneBump.localMean hp L j f))) x' = + conv (Ω.coneBump.scaled L J) (convLp hp (Ω.coneBump.integrable_scaled L J) f) volume + (Ω.graphMap x') := by + rw [ae_all_iff] + intro J + have h1 := Lp.coeFn_fun_finsetSum (Finset.range (J + 1)) + (fun j => Ω.traceTerm Ω.coneBump hp L j (Ω.cutoff (Ω.coneBump.localMean hp L j f))) + have h2 : ∀ᵐ x' ∂(volume : Measure Ω.hyperplane), ∀ j, + Ω.traceTerm Ω.coneBump hp L j (Ω.cutoff (Ω.coneBump.localMean hp L j f)) x' = + Ω.traceFun Ω.coneBump L j (Ω.cutoff (Ω.coneBump.localMean hp L j f)) x' := + ae_all_iff.2 fun j => Ω.traceTerm_ae Ω.coneBump hp L j _ + filter_upwards [h1, h2] with x' hx1 hx2 + rw [hx1, ← Ω.sum_traceFun_eq_conv hp L J f x'] + exact Finset.sum_congr rfl fun j _ => hx2 j + obtain ⟨ns, hns, hns_ae⟩ := (tendstoInMeasure_of_tendsto_eLpNorm hp0 + ((Lp.tendsto_Lp_iff_tendsto_eLpNorm' _ _).1 hS)).exists_seq_tendsto_ae + refine ⟨ns, hns, ?_⟩ + filter_upwards [hSae, hns_ae] with x' hx1 hx2 + simp only [hx1] at hx2 + exact hx2 + +/-- **The trace of continuous functions**: if `f ∈ L_p(V)` has a continuous representative `G` +and a finite intrinsic `B^{s+1/p}_{p,q}`-norm on `Ω`, then `Tr f = G ∘ γ` almost everywhere on +`H`: the mollified restrictions converge at every point to `G(γ x')` +(`Rd.conv_dilate_near`, twice), and a subsequence converges almost everywhere to `Tr f`. -/ +theorem trace_ae_eq_comp_graphMap (hp : p ≠ ∞) {L : ℕ} (hL : 1 ≤ L) {s : ℝ} (hs : 0 < s) + {q : ℝ≥0∞} (hq : 1 ≤ q) {f : Lp ℂ p (volume : Measure V)} + (hf : modNormOn Ω.measurableSet_domain L (s + 1 / p.toReal) q f < ∞) + {G : V → ℂ} (hG : Continuous G) (hfG : (f : V → ℂ) =ᵐ[volume] G) : + Ω.trace hp L f =ᵐ[volume] G ∘ Ω.graphMap := by + obtain ⟨ns, hns, hae⟩ := Ω.exists_subseq_tendsto_trace hp L hs hq + (Ω.intrinsicNorm_lt_top hp L (s + 1 / p.toReal) hq hf) + have hΦ := integrable_momentKernel Ω.coneBump.integrable L + have hone := integral_momentKernel Ω.coneBump.integrable Ω.coneBump.integral_eq_one hL + have hR : 0 ≤ (L : ℝ) * Ω.coneBump.radius := + mul_nonneg (Nat.cast_nonneg L) Ω.coneBump.radius_nonneg + have hΦR : ∀ w, L * Ω.coneBump.radius < ‖w‖ → momentKernel Ω.coneBump.toFun L w = 0 := + fun w hw => Ω.coneBump.momentKernel_eq_zero L hw + have hlim : ∀ y : V, Tendsto (fun J => conv (Ω.coneBump.scaled L J) + (conv (Ω.coneBump.scaled L J) G volume) volume y) atTop (𝓝 (G y)) := fun y => by + have hG1 := conv_dilate_near hΦ hone hR hΦR (F := fun _ => G) + (fun _ => hG.aestronglyMeasurable) (y := y) (z₀ := G y) fun ε hε => by + obtain ⟨δ, hδ, hδG⟩ := Metric.continuousAt_iff.1 hG.continuousAt ε hε + exact ⟨0, δ, hδ, fun J _ z hz => by + rw [← dist_eq_norm] + exact hδG (by rwa [dist_eq_norm])⟩ + have hG2 := conv_dilate_near hΦ hone hR hΦR + (F := fun J => conv (Ω.coneBump.scaled L J) G volume) + (fun J => ((Ω.coneBump.hasCompactSupport_scaled L J).continuous_convolution_left + (ContinuousLinearMap.mul ℂ ℂ) (Ω.coneBump.continuous_scaled L J) + hG.locallyIntegrable).aestronglyMeasurable) hG1 + rw [Metric.tendsto_atTop] + intro ε hε + obtain ⟨J₀, δ, hδ, hJ⟩ := hG2 ε hε + exact ⟨J₀, fun J hJ0 => by + rw [dist_eq_norm] + exact hJ J hJ0 y (by simpa using hδ)⟩ + filter_upwards [hae] with x' hx + refine tendsto_nhds_unique hx ?_ + have hJ : ∀ J, conv (Ω.coneBump.scaled L J) (convLp hp (Ω.coneBump.integrable_scaled L J) f) + volume (Ω.graphMap x') = conv (Ω.coneBump.scaled L J) + (conv (Ω.coneBump.scaled L J) G volume) volume (Ω.graphMap x') := fun J => by + rw [conv_congr_ae ((convLp_apply_ae hp _ f).trans + (Filter.EventuallyEq.of_eq (conv_congr_ae hfG)))] + simp_rw [hJ] + exact (hlim (Ω.graphMap x')).comp hns.tendsto_atTop + +/-! ### Linearity and continuity of the trace -/ + +/-- The traces of the terms are linear in `h`. -/ +theorem traceTerm_sub (b : LocalMeansBump V) (hp : p ≠ ∞) (L j : ℕ) + (h₁ h₂ : Lp ℂ p (volume : Measure V)) : + Ω.traceTerm b hp L j (h₁ - h₂) = Ω.traceTerm b hp L j h₁ - Ω.traceTerm b hp L j h₂ := by + have hp1 : 1 ≤ p := Fact.out + have hint : ∀ (h : Lp ℂ p (volume : Measure V)) (y : V), + Integrable (fun z => b.dual L j z * h (y - z)) volume := fun h y => by + simpa using integrable_translate_mul_of_locallyIntegrable (b.continuous_dual L j) + (b.hasCompactSupport_dual L j) ((Lp.memLp h).locallyIntegrable hp1) 0 y + refine Lp.ext ?_ + filter_upwards [Ω.traceTerm_ae b hp L j (h₁ - h₂), Ω.traceTerm_ae b hp L j h₁, + Ω.traceTerm_ae b hp L j h₂, Lp.coeFn_sub (Ω.traceTerm b hp L j h₁) + (Ω.traceTerm b hp L j h₂)] with x' hx hx₁ hx₂ hxs + rw [hx, hxs, Pi.sub_apply, hx₁, hx₂, traceFun, traceFun, traceFun, + conv_congr_ae (Lp.coeFn_sub h₁ h₂), conv_apply, conv_apply, conv_apply, + ← integral_sub (hint h₁ _) (hint h₂ _)] + congr 1 + funext z + simp only [Pi.sub_apply] + ring + +/-- **The trace is linear** on the functions with a finite intrinsic norm of smoothness `> 1/p`. -/ +theorem trace_sub (hp : p ≠ ∞) (L : ℕ) {s : ℝ} (hs : 0 < s) {q : ℝ≥0∞} (hq : 1 ≤ q) + {f₁ f₂ : Lp ℂ p (volume : Measure V)} + (h₁ : Ω.intrinsicNorm hp L (s + 1 / p.toReal) q f₁ < ∞) + (h₂ : Ω.intrinsicNorm hp L (s + 1 / p.toReal) q f₂ < ∞) : + Ω.trace hp L (f₁ - f₂) = Ω.trace hp L f₁ - Ω.trace hp L f₂ := by + simp only [trace, traceSeries, map_sub] + simp_rw [Ω.traceTerm_sub] + exact Summable.tsum_sub (Ω.summable_traceTerm Ω.coneBump hp L hs hq + (h := fun j => Ω.cutoff (Ω.coneBump.localMean hp L j f₁)) h₁) + (Ω.summable_traceTerm Ω.coneBump hp L hs hq + (h := fun j => Ω.cutoff (Ω.coneBump.localMean hp L j f₂)) h₂) + +/-- The traces of the terms commute with complex scalars, since convolution does +(`Rd.conv_smul`). -/ +theorem traceTerm_smul (b : LocalMeansBump V) (hp : p ≠ ∞) (L j : ℕ) (c : ℂ) + (h : Lp ℂ p (volume : Measure V)) : + Ω.traceTerm b hp L j (c • h) = c • Ω.traceTerm b hp L j h := by + refine Lp.ext ?_ + filter_upwards [Ω.traceTerm_ae b hp L j (c • h), Ω.traceTerm_ae b hp L j h, + Lp.coeFn_smul c (Ω.traceTerm b hp L j h)] with x' h1 h2 h3 + rw [h1, h3, Pi.smul_apply, h2, traceFun, traceFun, conv_congr_ae (Lp.coeFn_smul c h), conv_smul] + rfl + +/-- **The trace commutes with complex scalars**: `Tr (c f) = c Tr f` for every `f ∈ L_p(V)`, since +every term of the trace series does and `∑' j, c x_j = c ∑' j, x_j` (Mathlib's +`tsum_const_smul''`). With `Rd.LipschitzGraph.trace_sub` the trace is linear on the functions of +finite intrinsic norm. -/ +theorem trace_smul (hp : p ≠ ∞) (L : ℕ) (c : ℂ) (f : Lp ℂ p (volume : Measure V)) : + Ω.trace hp L (c • f) = c • Ω.trace hp L f := by + simp only [trace, traceSeries, map_smul] + simp_rw [Ω.traceTerm_smul] + exact tsum_const_smul'' c + +/-- **The trace is bounded by the intrinsic norm of `B^{1/p}_{p,1}`**: +`‖Tr f‖_{L_p(H)} ≤ K (‖f‖_{L_p(Ω)} + ∑_k 2^(k/p) ω_L(f, 2^(-k), Ω)_p)`, by the bounds of the terms +(`Rd.LipschitzGraph.eLpNorm_traceFun_le`) and the comparison of the intrinsic local means with the +moduli on `Ω`. -/ +theorem enorm_trace_le_modNormOn (hp : p ≠ ∞) (L : ℕ) : + ∃ K : ℝ≥0∞, K ≠ ∞ ∧ ∀ f : Lp ℂ p (volume : Measure V), + ‖Ω.trace hp L f‖ₑ ≤ K * modNormOn Ω.measurableSet_domain L (1 / p.toReal) 1 f := by + obtain ⟨K, hK, hle⟩ := Ω.eLpNorm_traceFun_le Ω.coneBump Fact.out hp L + refine ⟨K * Ω.intrinsicConst L, ENNReal.mul_ne_top hK (Ω.intrinsicConst_ne_top L), + fun f => ?_⟩ + calc ‖Ω.trace hp L f‖ₑ ≤ ∑' j, ‖Ω.traceTerm Ω.coneBump hp L j + (Ω.cutoff (Ω.coneBump.localMean hp L j f))‖ₑ := eNorm_tsum_le_tsum_eNorm + _ ≤ ∑' j, K * (dyadicWeight (1 / p.toReal) j * + ‖Ω.cutoff (Ω.coneBump.localMean hp L j f)‖ₑ) := + tsum_le_tsum fun j => by + rw [Lp.eNorm_def, eLpNorm_congr_ae (Ω.traceTerm_ae Ω.coneBump hp L j _)] + refine (hle j (Lp.memLp _)).trans ?_ + rw [← Lp.eNorm_def, mul_assoc] + _ = K * Ω.intrinsicNorm hp L (1 / p.toReal) 1 f := by + rw [ENNReal.tsum_mul_left, intrinsicNorm_def, ENNReal.lqNorm_one] + _ ≤ K * (Ω.intrinsicConst L * modNormOn Ω.measurableSet_domain L (1 / p.toReal) 1 f) := + mul_le_mul' le_rfl (Ω.intrinsicNorm_le hp L _ le_rfl f) + _ = _ := by ring + +/-- **The trace in `L_p(H)` is bounded by the `B^{1/p}_{p,1}`-norm**: +`‖Tr f‖_{L_p(H)} ≤ K (‖f‖_p + ∑_k 2^(k/p) ω_L(f, 2^(-k))_p)`, since the intrinsic quantity of +`Rd.LipschitzGraph.enorm_trace_le_modNormOn` is at most this one +(`Rd.LipschitzGraph.modNormOn_le_modNorm`). -/ +theorem enorm_trace_le (hp : p ≠ ∞) (L : ℕ) : + ∃ K : ℝ≥0∞, K ≠ ∞ ∧ ∀ f : Lp ℂ p (volume : Measure V), + ‖Ω.trace hp L f‖ₑ ≤ + K * (‖f‖ₑ + lqNorm 1 (fun k => dyadicWeight (1 / p.toReal) k * lpModulus p L f k)) := by + obtain ⟨K, hK, hle⟩ := Ω.enorm_trace_le_modNormOn hp L + exact ⟨K, hK, fun f => (hle f).trans (mul_le_mul' le_rfl (Ω.modNormOn_le_modNorm L _ 1 rfl))⟩ + +/-- **The trace along a convergent sequence**: if `F` and the `F_J` have finite intrinsic norms of +smoothness `s + 1/p`, `s > 0`, and `‖F - F_J‖_p + ‖(2^(k/p) ω_L(F - F_J, 2^(-k))_p)_k‖_{ℓ_1} ≤ b_J` +with `b_J < ∞` and `b_J → 0`, then `Tr F_J → Tr F`: the trace is linear +(`Rd.LipschitzGraph.trace_sub`) and bounded by the norm of `B^{1/p}_{p,1}` +(`Rd.LipschitzGraph.enorm_trace_le`). -/ +theorem tendsto_trace_of_modNorm_sub_le (hp : p ≠ ∞) (L : ℕ) {s : ℝ} (hs : 0 < s) {q : ℝ≥0∞} + (hq : 1 ≤ q) {F : Lp ℂ p (volume : Measure V)} {FJ : ℕ → Lp ℂ p (volume : Measure V)} + (hF : Ω.intrinsicNorm hp L (s + 1 / p.toReal) q F < ∞) + (hFJ : ∀ J, Ω.intrinsicNorm hp L (s + 1 / p.toReal) q (FJ J) < ∞) {b : ℕ → ℝ≥0∞} + (hb : Tendsto b atTop (𝓝 0)) (hbtop : ∀ J, b J ≠ ∞) + (hle : ∀ J, ‖F - FJ J‖ₑ + + lqNorm 1 (fun k => dyadicWeight (1 / p.toReal) k * lpModulus p L (F - FJ J) k) ≤ b J) : + Tendsto (fun J => Ω.trace hp L (FJ J)) atTop (𝓝 (Ω.trace hp L F)) := by + obtain ⟨KT, hKT, hTle⟩ := Ω.enorm_trace_le hp L + have hKb0 : Tendsto (fun J => KT * b J) atTop (𝓝 0) := by + simpa using ENNReal.Tendsto.const_mul hb (Or.inr hKT) + have hKb : Tendsto (fun J => (KT * b J).toReal) atTop (𝓝 0) := by + have h := (ENNReal.tendsto_toReal ENNReal.zero_ne_top).comp hKb0 + rwa [ENNReal.toReal_zero] at h + rw [tendsto_iff_norm_sub_tendsto_zero] + refine squeeze_zero (fun J => norm_nonneg _) (fun J => ?_) hKb + rw [norm_sub_rev, ← Ω.trace_sub hp L hs hq hF (hFJ J), ← toReal_eNorm] + exact ENNReal.toReal_mono (ENNReal.mul_ne_top hKT (hbtop J)) + ((hTle _).trans (mul_le_mul' le_rfl (hle J))) + +end LipschitzGraph + +end Rd diff --git a/LeanPool/FunctionSpaces/Domains/Traces/GraphTraceCharts.lean b/LeanPool/FunctionSpaces/Domains/Traces/GraphTraceCharts.lean new file mode 100644 index 0000000000..587c9103f4 --- /dev/null +++ b/LeanPool/FunctionSpaces/Domains/Traces/GraphTraceCharts.lean @@ -0,0 +1,604 @@ +/- +Copyright (c) 2026 Mario Ullrich. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Mario Ullrich +-/ +module + +public import LeanPool.FunctionSpaces.Domains.Traces.GraphTraceExtension +public import Mathlib.MeasureTheory.Measure.Hausdorff + +/- +Modified for Lean Pool: module names and imports adapted. +-/ + +/-! +# Traces in charts: locality, approximation and change of chart + +Three properties of the trace on a Lipschitz graph domain that make it a function on the boundary, +independent of the graph that describes it: + +* **Locality** (`Rd.LipschitzGraph.trace_ae_eq_zero_of_ae_eq_zero`): if `f = 0` on `Ω ∩ U` for an + open set `U`, then `Tr f = 0` almost everywhere on `γ⁻¹(U)`. The trace is the almost everywhere + limit of mollified restrictions `(m_{2^J} ⋆ (m_{2^J} ⋆ f))(γ x')` + (`Rd.LipschitzGraph.exists_subseq_tendsto_trace`), which only see `f` on + `Ω ∩ B(γ x', 2LR 2^(-J))`. Hence two functions that agree on `Ω ∩ U` have the same trace on + `γ⁻¹(U)` (`Rd.LipschitzGraph.trace_ae_eq_of_ae_eq`). +* **Approximation by continuous functions** (`Rd.LocalMeansBump.tendsto_modNorm_sub_partialSum`): + the partial sums `G_J = ∑_{j ≤ J} η_j ⋆ (k_j ⋆ f)` of the reproducing formula are continuous and + converge to `f` in `B^{σ'}_{p,1}` for `σ' < σ`, by the synthesis with the dual kernels. +* **Change of chart** (`Rd.LipschitzGraph.trace_ae_eq_trace_comp`): if the boundaries of two graph + domains `Ω₁`, `Ω₂` agree near `γ₁(x')`, then `Tr₁ F(x') = Tr₂ F(P₂ γ₁ x')` for almost every such + `x'`. Both traces are limits of the restrictions of the same continuous `G_J`, and the change of + chart `P₁ ∘ γ₂` is Lipschitz between spaces of the same dimension, so it maps null sets to null + sets (`Rd.volume_image_eq_zero_of_lipschitzWith`, through Mathlib's Hausdorff measures, which are + Haar measures in finite dimension); hence almost everywhere statements pass from one chart to the + other (`Rd.LipschitzGraph.ae_proj_graphMap`). +* **Products with smooth functions** (`Rd.LipschitzGraph.trace_mulLp_ae`): `Tr(ψ F) = (ψ ∘ γ) Tr F`, + and the trace of `ψ F` is bounded in `B^s_{p,q}(H)` by the norm of `F` + (`Rd.LipschitzGraph.exists_modNorm_trace_mulLp_le`). +* **Finite sums** (`Rd.LipschitzGraph.trace_finsetSum`): the trace of a finite sum is the sum of the + traces. + +The trace depends only on `1_Ω f` (`Rd.LipschitzGraph.trace_congr`). +-/ + +@[expose] public section + +open MeasureTheory Filter Topology Module Metric +open scoped ENNReal NNReal + +open ENNReal (lqNorm dyadicWeight) + +namespace Rd + +/-! ### Lipschitz images of null sets -/ + +/-- **Lipschitz maps keep null sets** between finite-dimensional inner product spaces of the same +dimension: `μ_H^k (f '' N) ≤ K^k μ_H^k N` for the Hausdorff measure `μ_H^k`, a Haar measure in +dimension `k` (Mathlib's `isAddHaarMeasure_hausdorffMeasure`), and Haar measures have the same null +sets. -/ +theorem volume_image_eq_zero_of_lipschitzWith {E F : Type*} [NormedAddCommGroup E] + [InnerProductSpace ℝ E] [FiniteDimensional ℝ E] [MeasurableSpace E] [BorelSpace E] + [NormedAddCommGroup F] [InnerProductSpace ℝ F] [FiniteDimensional ℝ F] [MeasurableSpace F] + [BorelSpace F] (hEF : finrank ℝ E = finrank ℝ F) {f : E → F} {K : ℝ≥0} + (hf : LipschitzWith K f) {N : Set E} (hN : volume N = 0) : volume (f '' N) = 0 := by + have h1 : (μH[finrank ℝ E] : Measure E) N = 0 := + (Measure.absolutelyContinuous_isAddHaarMeasure μH[finrank ℝ E] (volume : Measure E)) hN + have h2 : (μH[finrank ℝ F] : Measure F) (f '' N) = 0 := by + have h := hf.hausdorffMeasure_image_le (d := finrank ℝ E) (Nat.cast_nonneg _) N + rw [h1, mul_zero, hEF] at h + exact le_antisymm h zero_le + exact (Measure.absolutelyContinuous_isAddHaarMeasure (volume : Measure F) μH[finrank ℝ F]) h2 + +namespace LocalMeansBump + +variable {V : Type*} [NormedAddCommGroup V] [InnerProductSpace ℝ V] [FiniteDimensional ℝ V] + [MeasurableSpace V] [BorelSpace V] (b : LocalMeansBump V) {p : ℝ≥0∞} [Fact (1 ≤ p)] + +/-- The partial sums of the reproducing formula, `G_J = ∑_{j ≤ J} η_j ⋆ (k_j ⋆ f)`. -/ +noncomputable def partialSum (hp : p ≠ ∞) (L J : ℕ) (f : Lp ℂ p (volume : Measure V)) : + Lp ℂ p (volume : Measure V) := + ∑ j ∈ Finset.range (J + 1), convLp hp (b.integrable_dual L j) (b.localMean hp L j f) + +/-- The partial sums have the continuous representatives `∑_{j ≤ J} η_j ⋆ (k_j ⋆ f)`. -/ +theorem partialSum_ae (hp : p ≠ ∞) (L J : ℕ) (f : Lp ℂ p (volume : Measure V)) : + b.partialSum hp L J f =ᵐ[volume] + fun x => ∑ j ∈ Finset.range (J + 1), conv (b.dual L j) (b.localMean hp L j f) volume x := by + filter_upwards [Lp.coeFn_fun_finsetSum (Finset.range (J + 1)) + (fun j => convLp hp (b.integrable_dual L j) (b.localMean hp L j f)), + ae_all_iff.2 fun j => convLp_apply_ae hp (b.integrable_dual L j) (b.localMean hp L j f)] + with x h1 h2 + rw [partialSum, h1] + exact Finset.sum_congr rfl fun j _ => h2 j + +/-- The representatives of the partial sums are continuous. -/ +theorem continuous_partialSum_rep (hp : p ≠ ∞) (L J : ℕ) (f : Lp ℂ p (volume : Measure V)) : + Continuous fun x => ∑ j ∈ Finset.range (J + 1), + conv (b.dual L j) (b.localMean hp L j f) volume x := + continuous_finsetSum _ fun j _ => (b.hasCompactSupport_dual L j).continuous_convolution_left + (ContinuousLinearMap.mul ℂ ℂ) (b.continuous_dual L j) ((Lp.memLp _).locallyIntegrable Fact.out) + +omit [InnerProductSpace ℝ V] [FiniteDimensional ℝ V] [MeasurableSpace V] [BorelSpace V] in +/-- `∑_{j ≤ I} [J < j] u_j = ∑_{j ≤ I} u_j - ∑_{j ≤ J} u_j` for `J ≤ I`. -/ +theorem sum_range_ite_lt {E : Type*} [AddCommGroup E] (u : ℕ → E) {I J : ℕ} (hJI : J ≤ I) : + ∑ j ∈ Finset.range (I + 1), (if J < j then u j else 0) = + ∑ j ∈ Finset.range (I + 1), u j - ∑ j ∈ Finset.range (J + 1), u j := by + rw [Finset.sum_ite, Finset.sum_const_zero, add_zero, eq_sub_iff_add_eq, + ← Finset.sum_filter_add_sum_filter_not (Finset.range (I + 1)) (fun j => J < j)] + congr 1 + apply Finset.sum_congr _ fun _ _ => rfl + ext j + simp only [Finset.mem_filter, Finset.mem_range, not_lt] + omega + +/-- **The reproducing formula in `B^{σ'}_{p,1}`** (approximation by continuous functions): if +`‖f‖_p + ‖(2^(kσ) ω_L(f, 2^(-k))_p)_k‖_{ℓ_q} < ∞` and `0 < σ' < σ`, `σ' < L`, then +`‖f - G_J‖_p + ∑_k 2^(kσ') ω_L(f - G_J, 2^(-k))_p → 0`: the tail +`f - G_J = ∑_{j > J} η_j ⋆ (k_j ⋆ f)` is bounded by the synthesis with the dual kernels +(`Rd.LocalMeansBump.modNorm_le_of_tendsto`) by +`∑_{j > J} 2^(jσ') ‖k_j ⋆ f‖_p ≤ ∑_{j > J} 2^(-j(σ - σ')) ‖(2^(iσ) ‖k_i ⋆ f‖_p)_i‖_{ℓ_q}`. -/ +theorem tendsto_modNorm_sub_partialSum (hp : p ≠ ∞) {L : ℕ} (hL : 1 ≤ L) {σ σ' : ℝ} + (hσ' : 0 < σ') (hσσ' : σ' < σ) (hσ'L : σ' < L) {q : ℝ≥0∞} (hq : 1 ≤ q) + {f : Lp ℂ p (volume : Measure V)} + (hf : ‖f‖ₑ + lqNorm q (fun k => dyadicWeight σ k * lpModulus p L f k) < ∞) : + Tendsto (fun J => ‖f - b.partialSum hp L J f‖ₑ + lqNorm 1 (fun k => + dyadicWeight σ' k * lpModulus p L (f - b.partialSum hp L J f) k)) atTop (𝓝 0) := by + set Y := b.localMeansNorm hp L σ q f + have hY : Y < ∞ := (b.localMeansNorm_le hp L σ hq f).trans_lt + (ENNReal.mul_lt_top (b.upperConst_ne_top L σ).lt_top hf) + set a : ℕ → ℝ≥0∞ := fun j => dyadicWeight σ' j * ‖b.localMean hp L j f‖ₑ + have ha : ∀ j, a j ≤ Y * dyadicWeight (-(σ - σ')) j := fun j => by + have hYj : dyadicWeight σ j * ‖b.localMean hp L j f‖ₑ ≤ Y := + ENNReal.le_lqNorm (zero_lt_one.trans_le hq).ne' + (fun j => dyadicWeight σ j * ‖b.localMean hp L j f‖ₑ) j + calc a j = dyadicWeight (-(σ - σ')) j * (dyadicWeight σ j * ‖b.localMean hp L j f‖ₑ) := by + simp only [a] + rw [← mul_assoc, ← ENNReal.dyadicWeight_add] + congr 2 + ring + _ ≤ dyadicWeight (-(σ - σ')) j * Y := mul_le_mul' le_rfl hYj + _ = Y * dyadicWeight (-(σ - σ')) j := mul_comm _ _ + have hasum : ∑' j, a j ≠ ∞ := by + refine ne_top_of_le_ne_top ?_ (tsum_le_tsum ha) + rw [ENNReal.tsum_mul_left, ENNReal.tsum_dyadicWeight_neg] + exact ENNReal.mul_ne_top hY.ne (ENNReal.one_sub_two_rpow_neg_inv_ne_top (by linarith)) + have hbound : ∀ J, ‖f - b.partialSum hp L J f‖ₑ + lqNorm 1 (fun k => + dyadicWeight σ' k * lpModulus p L (f - b.partialSum hp L J f) k) ≤ + b.synthConst L σ' * ∑' i, a (i + (J + 1)) := fun J => by + set h' : ℕ → Lp ℂ p (volume : Measure V) := fun j => if J < j then b.localMean hp L j f else 0 + have hrep : Tendsto (fun I => ∑ j ∈ Finset.range (I + 1), + convLp hp (b.integrable_dual L j) (h' j)) atTop (𝓝 (f - b.partialSum hp L J f)) := by + have h0 := (b.tendsto_sum_dual_localMean hp hL f).sub_const (b.partialSum hp L J f) + refine h0.congr' ?_ + filter_upwards [eventually_ge_atTop J] with I hI + have hite : ∀ j, convLp hp (b.integrable_dual L j) (h' j) = + if J < j then convLp hp (b.integrable_dual L j) (b.localMean hp L j f) else 0 := + fun j => by + simp only [h'] + split_ifs <;> simp + simp_rw [hite] + rw [sum_range_ite_lt _ hI, partialSum] + refine (b.modNorm_le_of_tendsto hp L σ' le_rfl hrep).trans (mul_le_mul' le_rfl ?_) + rw [ENNReal.lqNorm_one] + have hsplit : ∑' j, dyadicWeight σ' j * ‖h' j‖ₑ = ∑' i, a (i + (J + 1)) := by + rw [← (CompleteLattice.summable).sum_add_tsum_nat_add' (k := J + 1)] + have hzero : ∑ j ∈ Finset.range (J + 1), dyadicWeight σ' j * ‖h' j‖ₑ = 0 := + Finset.sum_eq_zero fun j hj => by + have : ¬ J < j := by + have := Finset.mem_range.1 hj + omega + simp [h', this] + rw [hzero, zero_add] + refine tsum_congr fun i => ?_ + simp [h', a, show J < i + (J + 1) by omega] + exact hsplit.le + have htail : Tendsto (fun J => b.synthConst L σ' * ∑' i, a (i + (J + 1))) atTop (𝓝 0) := by + have h := ((ENNReal.tendsto_sum_nat_add a hasum).comp (tendsto_add_atTop_nat 1)) + simpa using ENNReal.Tendsto.const_mul h (Or.inr (b.synthConst_ne_top hσ' hσ'L)) + exact tendsto_of_tendsto_of_tendsto_of_le_of_le tendsto_const_nhds htail + (fun J => zero_le) hbound + +/-- **The partial sums have finite norms**: `‖G_J‖_p + ‖(2^(kσ) ω_L(G_J, 2^(-k))_p)_k‖_{ℓ_q} < ∞` +for `0 < σ < L`, by the synthesis with the dual kernels for finitely many terms. -/ +theorem modNorm_partialSum_lt_top (hp : p ≠ ∞) (L J : ℕ) {σ : ℝ} (hσ : 0 < σ) (hσL : σ < L) + {q : ℝ≥0∞} (hq : 1 ≤ q) (f : Lp ℂ p (volume : Measure V)) : + ‖b.partialSum hp L J f‖ₑ + lqNorm q (fun k => + dyadicWeight σ k * lpModulus p L (b.partialSum hp L J f) k) < ∞ := by + set h' : ℕ → Lp ℂ p (volume : Measure V) := fun j => if j ≤ J then b.localMean hp L j f else 0 + have hrep : Tendsto (fun I => ∑ j ∈ Finset.range (I + 1), + convLp hp (b.integrable_dual L j) (h' j)) atTop (𝓝 (b.partialSum hp L J f)) := by + refine tendsto_atTop_of_eventually_const (i₀ := J) fun I hI => ?_ + have hite : ∀ j, convLp hp (b.integrable_dual L j) (h' j) = + if j ≤ J then convLp hp (b.integrable_dual L j) (b.localMean hp L j f) else 0 := + fun j => by + simp only [h'] + split_ifs <;> simp + simp_rw [hite] + rw [Finset.sum_ite, Finset.sum_const_zero, add_zero, partialSum] + apply Finset.sum_congr _ fun _ _ => rfl + ext j + simp only [Finset.mem_filter, Finset.mem_range] + omega + refine (b.modNorm_le_of_tendsto hp L σ hq hrep).trans_lt (ENNReal.mul_lt_top + (b.synthConst_ne_top hσ hσL).lt_top ?_) + refine (ENNReal.lqNorm_le_lqNorm_one hq _).trans_lt ?_ + rw [tsum_eq_sum (s := Finset.range (J + 1)) fun j hj => by + have : ¬ j ≤ J := fun h => hj (Finset.mem_range.2 (Nat.lt_succ_of_le h)) + simp [h', this]] + exact ENNReal.sum_lt_top.2 fun j _ => ENNReal.mul_lt_top (ENNReal.dyadicWeight_lt_top _ _) + eNorm_lt_top + +end LocalMeansBump + +namespace LipschitzGraph + +variable {V : Type*} [NormedAddCommGroup V] [InnerProductSpace ℝ V] [FiniteDimensional ℝ V] + [MeasurableSpace V] [BorelSpace V] (Ω : LipschitzGraph V) {p : ℝ≥0∞} [Fact (1 ≤ p)] + +/-! ### Locality -/ + +/-- **The mollified restrictions vanish where `f` does**: if `f = 0` almost everywhere on +`Ω ∩ B(γ x', δ)` and `2 L R 2^(-J) < δ`, then `(m_{2^J} ⋆ (m_{2^J} ⋆ f))(γ x') = 0`, since the cone +kernels only see `f` on `Ω ∩ B(γ x', 2 L R 2^(-J))`. -/ +theorem conv_scaled_convLp_eq_zero (hp : p ≠ ∞) (L J : ℕ) {f : Lp ℂ p (volume : Measure V)} + (x' : Ω.hyperplane) {δ : ℝ} (hJ : 2 * L * Ω.coneBump.radius / 2 ^ J < δ) + (hf : ∀ᵐ x ∂volume, x ∈ Ω.domain → x ∈ ball (Ω.graphMap x') δ → f x = 0) : + conv (Ω.coneBump.scaled L J) (convLp hp (Ω.coneBump.integrable_scaled L J) f) volume + (Ω.graphMap x') = 0 := by + set y := Ω.graphMap x' + have hLR : 0 ≤ (L : ℝ) * Ω.coneBump.radius := + mul_nonneg (Nat.cast_nonneg L) Ω.coneBump.radius_nonneg + have hsmall : ∀ z, Ω.coneBump.scaled L J z ≠ 0 → ‖z‖ ≤ L * Ω.coneBump.radius / 2 ^ J := + fun z hz => not_lt.1 fun h => hz (Ω.coneBump.scaled_eq_zero_of_lt L J h) + rw [conv_congr_ae (convLp_apply_ae hp _ f), conv_apply] + refine integral_eq_zero_of_ae (Eventually.of_forall fun z => ?_) + by_cases hz : Ω.coneBump.scaled L J z = 0 + · simp [hz] + have hw : y - z ∈ Ω.domain := by + rw [sub_eq_add_neg] + exact Ω.graphMap_add_mem x' (Ω.coneSupported_scaled L J z hz) + have hinner : conv (Ω.coneBump.scaled L J) f volume (y - z) = 0 := by + rw [conv_apply] + have hf' := (Measure.measurePreserving_sub_left volume (y - z)).quasiMeasurePreserving.ae hf + refine integral_eq_zero_of_ae (hf'.mono fun z' hz' => ?_) + by_cases hz'0 : Ω.coneBump.scaled L J z' = 0 + · simp [hz'0] + have hdom : y - z - z' ∈ Ω.domain := by + rw [sub_eq_add_neg] + exact Ω.add_mem hw (Ω.coneSupported_scaled L J z' hz'0) + have hball : y - z - z' ∈ ball y δ := by + rw [mem_ball, dist_eq_norm] + calc ‖y - z - z' - y‖ = ‖z + z'‖ := by rw [show y - z - z' - y = -(z + z') by abel, norm_neg] + _ ≤ ‖z‖ + ‖z'‖ := norm_add_le _ _ + _ ≤ L * Ω.coneBump.radius / 2 ^ J + L * Ω.coneBump.radius / 2 ^ J := + add_le_add (hsmall z hz) (hsmall z' hz'0) + _ = 2 * L * Ω.coneBump.radius / 2 ^ J := by ring + _ < δ := hJ + simp [hz' hdom hball] + simp [hinner] + +/-- **Locality of the trace**: if `f = 0` almost everywhere on `Ω ∩ U` for an open set `U`, then +`Tr f = 0` almost everywhere on `γ⁻¹(U)`. -/ +theorem trace_ae_eq_zero_of_ae_eq_zero (hp : p ≠ ∞) (L : ℕ) {s : ℝ} (hs : 0 < s) {q : ℝ≥0∞} + (hq : 1 ≤ q) {f : Lp ℂ p (volume : Measure V)} + (hX : Ω.intrinsicNorm hp L (s + 1 / p.toReal) q f < ∞) {U : Set V} (hU : IsOpen U) + (hfU : ∀ᵐ x ∂volume, x ∈ Ω.domain → x ∈ U → f x = 0) : + ∀ᵐ x' ∂(volume : Measure Ω.hyperplane), Ω.graphMap x' ∈ U → Ω.trace hp L f x' = 0 := by + obtain ⟨ns, hns, hae⟩ := Ω.exists_subseq_tendsto_trace hp L hs hq hX + filter_upwards [hae] with x' hx hxU + obtain ⟨δ, hδ, hball⟩ := Metric.isOpen_iff.1 hU _ hxU + obtain ⟨J₀, hJ₀⟩ := pow_unbounded_of_one_lt (2 * L * Ω.coneBump.radius / δ) + (one_lt_two : (1 : ℝ) < 2) + have hev : ∀ᶠ k in atTop, conv (Ω.coneBump.scaled L (ns k)) + (convLp hp (Ω.coneBump.integrable_scaled L (ns k)) f) volume (Ω.graphMap x') = 0 := by + filter_upwards [hns.tendsto_atTop.eventually_ge_atTop J₀] with k hk + refine Ω.conv_scaled_convLp_eq_zero hp L (ns k) x' ?_ (hfU.mono fun x hx hxd hxb => + hx hxd (hball hxb)) + have h2 : (2 : ℝ) ^ J₀ ≤ 2 ^ ns k := pow_le_pow_right₀ one_le_two hk + rw [div_lt_iff₀ (by positivity)] + rw [div_lt_iff₀ hδ] at hJ₀ + nlinarith + exact tendsto_nhds_unique hx (tendsto_const_nhds.congr' (hev.mono fun k hk => hk.symm)) + +/-- The intrinsic quasi-norm of a difference is at most the sum of the intrinsic quasi-norms. -/ +theorem intrinsicNorm_sub_le (hp : p ≠ ∞) (L : ℕ) (σ : ℝ) {q : ℝ≥0∞} (hq : 1 ≤ q) + (f₁ f₂ : Lp ℂ p (volume : Measure V)) : + Ω.intrinsicNorm hp L σ q (f₁ - f₂) ≤ + Ω.intrinsicNorm hp L σ q f₁ + Ω.intrinsicNorm hp L σ q f₂ := by + simp only [intrinsicNorm_def] + refine (ENNReal.lqNorm_mono fun j => ?_).trans (ENNReal.lqNorm_add_le hq _ _) + rw [map_sub, map_sub, ← mul_add] + exact mul_le_mul' le_rfl (eNorm_sub_le) + +/-- **Locality for two functions**: if `f₁ = f₂` almost everywhere on `Ω ∩ U` for an open set `U`, +then `Tr f₁ = Tr f₂` almost everywhere on `γ⁻¹(U)`. -/ +theorem trace_ae_eq_of_ae_eq (hp : p ≠ ∞) (L : ℕ) {s : ℝ} (hs : 0 < s) {q : ℝ≥0∞} (hq : 1 ≤ q) + {f₁ f₂ : Lp ℂ p (volume : Measure V)} + (h₁ : Ω.intrinsicNorm hp L (s + 1 / p.toReal) q f₁ < ∞) + (h₂ : Ω.intrinsicNorm hp L (s + 1 / p.toReal) q f₂ < ∞) {U : Set V} (hU : IsOpen U) + (hfU : ∀ᵐ x ∂volume, x ∈ Ω.domain → x ∈ U → f₁ x = f₂ x) : + ∀ᵐ x' ∂(volume : Measure Ω.hyperplane), Ω.graphMap x' ∈ U → + Ω.trace hp L f₁ x' = Ω.trace hp L f₂ x' := by + have h0 := Ω.trace_ae_eq_zero_of_ae_eq_zero hp L hs hq + ((Ω.intrinsicNorm_sub_le hp L _ hq f₁ f₂).trans_lt (ENNReal.add_lt_top.2 ⟨h₁, h₂⟩)) hU + (by + filter_upwards [hfU, Lp.coeFn_sub f₁ f₂] with x hx hsub hxd hxU + rw [hsub, Pi.sub_apply, hx hxd hxU, sub_self]) + rw [Ω.trace_sub hp L hs hq h₁ h₂] at h0 + filter_upwards [h0, Lp.coeFn_sub (Ω.trace hp L f₁) (Ω.trace hp L f₂)] with x' h0' hsub hxU + have h := h0' hxU + rw [hsub, Pi.sub_apply, sub_eq_zero] at h + exact h + +/-- **The trace depends only on `f` on `Ω`**: `1_Ω F = 1_Ω f` gives `Tr F = Tr f`, since the +trace is built from the cut-offs `1_Ω (k_j ⋆ f)` and the kernels `k_j` are supported in `-K`. -/ +theorem trace_congr (hp : p ≠ ∞) (L : ℕ) {F f : Lp ℂ p (volume : Measure V)} + (hFf : Ω.cutoff F = Ω.cutoff f) : Ω.trace hp L F = Ω.trace hp L f := by + unfold trace + congr 1 + funext j + exact Ω.cutoff_convLp_eq hp (Ω.coneBump.integrable_kernel L j) (Ω.coneSupported_kernel L j) hFf + +/-! ### Change of chart -/ + +omit [FiniteDimensional ℝ V] [MeasurableSpace V] [BorelSpace V] in +/-- The change of chart `P₁ ∘ γ₂` is Lipschitz with constant `1 + M₂`. -/ +theorem lipschitzWith_proj_graphMap (Ω₁ Ω₂ : LipschitzGraph V) : + LipschitzWith ⟨1 + Ω₂.M, by linarith [Ω₂.M_nonneg]⟩ + (fun y' : Ω₂.hyperplane => Ω₁.proj (Ω₂.graphMap y')) := + LipschitzWith.of_dist_le_mul fun y' z' => by + rw [dist_eq_norm, dist_eq_norm, ← map_sub] + exact (Ω₁.norm_proj_le _).trans (Ω₂.norm_graphMap_sub_le y' z') + +omit [MeasurableSpace V] [BorelSpace V] in +/-- All the hyperplanes have dimension `n - 1`. -/ +theorem finrank_hyperplane_eq_finrank (Ω₁ Ω₂ : LipschitzGraph V) : + finrank ℝ Ω₁.hyperplane = finrank ℝ Ω₂.hyperplane := by + have h1 := Ω₁.finrank_hyperplane_add_one + have h2 := Ω₂.finrank_hyperplane_add_one + omega + +/-- **Null sets under the change of chart**: a property of almost every point of `H₂` holds at +`P₂ γ₁ x'` for almost every `x' ∈ H₁` whose boundary point `γ₁ x'` lies on the boundary of `Ω₂`: +the exceptional `x'` lie in the image of a null set under the Lipschitz map `P₁ ∘ γ₂` +(`Rd.volume_image_eq_zero_of_lipschitzWith`). -/ +theorem ae_proj_graphMap (Ω₁ Ω₂ : LipschitzGraph V) {P : Ω₂.hyperplane → Prop} + (hP : ∀ᵐ y' ∂(volume : Measure Ω₂.hyperplane), P y') : + ∀ᵐ x' ∂(volume : Measure Ω₁.hyperplane), + Ω₂.graphMap (Ω₂.proj (Ω₁.graphMap x')) = Ω₁.graphMap x' → P (Ω₂.proj (Ω₁.graphMap x')) := by + have hσ : volume ((fun y' : Ω₂.hyperplane => Ω₁.proj (Ω₂.graphMap y')) '' {y' | ¬ P y'}) = 0 := + volume_image_eq_zero_of_lipschitzWith (Ω₂.finrank_hyperplane_eq_finrank Ω₁) + (Ω₁.lipschitzWith_proj_graphMap Ω₂) (ae_iff.1 hP) + filter_upwards [measure_eq_zero_iff_ae_notMem.1 hσ] with x' hx hA + by_contra hcon + exact hx ⟨_, hcon, by simp only; rw [hA, Ω₁.proj_graphMap]⟩ + +/-- **The traces of the partial sums converge**: for `F` with a finite `B^{s+1/p}_{p,q}`-norm of +order `L > s + 1/p` on `V`, `Tr G_J → Tr F` in `L_p(H)`, by the approximation in `B^{1/p}_{p,1}` +and the continuity of the trace there. -/ +theorem tendsto_trace_partialSum (b : LocalMeansBump V) (hp : p ≠ ∞) {L : ℕ} (hL : 1 ≤ L) + {s : ℝ} (hs : 0 < s) (hsL : s + 1 / p.toReal < L) {q : ℝ≥0∞} (hq : 1 ≤ q) + {F : Lp ℂ p (volume : Measure V)} + (hF : ‖F‖ₑ + lqNorm q (fun k => + dyadicWeight (s + 1 / p.toReal) k * lpModulus p L F k) < ∞) : + Tendsto (fun J => Ω.trace hp L (b.partialSum hp L J F)) atTop (𝓝 (Ω.trace hp L F)) := by + have hp1 : 1 ≤ p := Fact.out + have hpr : 1 ≤ p.toReal := ENNReal.one_le_toReal_of_one_le hp1 hp + have hpinv0 : 0 < 1 / p.toReal := by positivity + have happ := b.tendsto_modNorm_sub_partialSum hp hL hpinv0 (by linarith) (by linarith) hq hF + -- from some `J₀` on, the norms of `F - G_J` are finite + obtain ⟨J₀, hJ₀⟩ := eventually_atTop.1 + (happ.eventually (gt_mem_nhds (zero_lt_one : (0 : ℝ≥0∞) < 1))) + rw [← tendsto_add_atTop_iff_nat J₀] + exact Ω.tendsto_trace_of_modNorm_sub_le hp L hs hq + (Ω.intrinsicNorm_lt_top_of_modNorm hp L hq hF).2 + (fun J => (Ω.intrinsicNorm_lt_top_of_modNorm hp L hq + (b.modNorm_partialSum_lt_top hp L (J + J₀) (by positivity) hsL hq F)).2) + (happ.comp (tendsto_add_atTop_nat J₀)) + (fun J => ((hJ₀ (J + J₀) (Nat.le_add_left J₀ J)).trans ENNReal.one_lt_top).ne) + fun _ => le_rfl + +/-- **Change of chart for traces**: let `Ω₁`, `Ω₂` be Lipschitz graph domains and `F ∈ L_p(V)` with +a finite `B^{s+1/p}_{p,q}`-norm of order `L > s + 1/p`. For almost every `x' ∈ H₁` whose boundary +point `γ₁(x')` lies on the boundary of `Ω₂`, `Tr₁ F(x') = Tr₂ F(P₂ γ₁ x')`. -/ +theorem trace_ae_eq_trace_comp (Ω₁ Ω₂ : LipschitzGraph V) (hp : p ≠ ∞) {L : ℕ} (hL : 1 ≤ L) + {s : ℝ} (hs : 0 < s) (hsL : s + 1 / p.toReal < L) {q : ℝ≥0∞} (hq : 1 ≤ q) + {F : Lp ℂ p (volume : Measure V)} + (hF : ‖F‖ₑ + lqNorm q (fun k => + dyadicWeight (s + 1 / p.toReal) k * lpModulus p L F k) < ∞) : + ∀ᵐ x' ∂(volume : Measure Ω₁.hyperplane), + Ω₂.graphMap (Ω₂.proj (Ω₁.graphMap x')) = Ω₁.graphMap x' → + Ω₁.trace hp L F x' = Ω₂.trace hp L F (Ω₂.proj (Ω₁.graphMap x')) := by + have hp0 : p ≠ 0 := (zero_lt_one.trans_le (Fact.out : 1 ≤ p)).ne' + set b := Ω₁.coneBump + set g : ℕ → V → ℂ := fun J x => ∑ j ∈ Finset.range (J + 1), + conv (b.dual L j) (b.localMean hp L j F) volume x + have hGfin : ∀ J, ‖b.partialSum hp L J F‖ₑ + lqNorm q (fun k => + dyadicWeight (s + 1 / p.toReal) k * lpModulus p L (b.partialSum hp L J F) k) < ∞ := + fun J => b.modNorm_partialSum_lt_top hp L J (by positivity) hsL hq F + have htr : ∀ (Ω' : LipschitzGraph V) J, + Ω'.trace hp L (b.partialSum hp L J F) =ᵐ[volume] g J ∘ Ω'.graphMap := fun Ω' J => + Ω'.trace_ae_eq_comp_graphMap hp hL hs hq (Ω'.intrinsicNorm_lt_top_of_modNorm hp L hq + (hGfin J)).1 (b.continuous_partialSum_rep hp L J F) (b.partialSum_ae hp L J F) + obtain ⟨ns, hns, h2⟩ := (tendstoInMeasure_of_tendsto_eLpNorm hp0 + ((Lp.tendsto_Lp_iff_tendsto_eLpNorm' _ _).1 + (Ω₂.tendsto_trace_partialSum b hp hL hs hsL hq hF))).exists_seq_tendsto_ae + obtain ⟨ms, hms, h1⟩ := (tendstoInMeasure_of_tendsto_eLpNorm hp0 + ((Lp.tendsto_Lp_iff_tendsto_eLpNorm' _ _).1 + ((Ω₁.tendsto_trace_partialSum b hp hL hs hsL hq hF).comp + hns.tendsto_atTop))).exists_seq_tendsto_ae + have hae2 : ∀ᵐ y' ∂(volume : Measure Ω₂.hyperplane), Tendsto (fun k => + g (ns (ms k)) (Ω₂.graphMap y')) atTop (𝓝 (Ω₂.trace hp L F y')) := by + filter_upwards [h2, ae_all_iff.2 fun J => htr Ω₂ J] with y' hy hy' + have h := hy.comp hms.tendsto_atTop + refine h.congr fun k => ?_ + simp only [Function.comp_apply] + exact hy' _ + have hae1 : ∀ᵐ x' ∂(volume : Measure Ω₁.hyperplane), Tendsto (fun k => + g (ns (ms k)) (Ω₁.graphMap x')) atTop (𝓝 (Ω₁.trace hp L F x')) := by + filter_upwards [h1, ae_all_iff.2 fun J => htr Ω₁ J] with x' hx hx' + refine hx.congr fun k => ?_ + simp only [Function.comp_apply] + exact hx' _ + filter_upwards [hae1, Ω₁.ae_proj_graphMap Ω₂ hae2] with x' hx1 hx2 hA + have h := hx2 hA + rw [hA] at h + exact tendsto_nhds_unique hx1 h + +/-! ### Traces of products with smooth functions -/ + +/-- **Traces of products with smooth functions**: for smooth `ψ` with bounded derivatives up to +order `L` and `F` with a finite `B^{s+1/p}_{p,q}`-norm of order `L > s + 1/p`, +`Tr(ψ F) = (ψ ∘ γ) Tr F` almost everywhere: both are limits of the restrictions of the continuous +`ψ G_J` and `G_J`, and multiplication by `ψ` is bounded in `B^{1/p}_{p,1}`. -/ +theorem trace_mulLp_ae (hp : p ≠ ∞) {L : ℕ} (hL : 1 ≤ L) {s : ℝ} (hs : 0 < s) + (hsL : s + 1 / p.toReal < L) {q : ℝ≥0∞} (hq : 1 ≤ q) {ψ : V → ℂ} + (hψ : ContDiff ℝ ((⊤ : ℕ∞) : WithTop ℕ∞) ψ) {C : ℝ} + (hC : ∀ l ≤ L, ∀ x, ‖iteratedFDeriv ℝ l ψ x‖ ≤ C) {F : Lp ℂ p (volume : Measure V)} + (hF : ‖F‖ₑ + lqNorm q (fun k => + dyadicWeight (s + 1 / p.toReal) k * lpModulus p L F k) < ∞) : + Ω.trace hp L (mulLp hψ.continuous (norm_le_of_iteratedFDeriv_le hC) F) =ᵐ[volume] + fun x' => ψ (Ω.graphMap x') * Ω.trace hp L F x' := by + have hp1 : 1 ≤ p := Fact.out + have hp0 : p ≠ 0 := (zero_lt_one.trans_le hp1).ne' + have hpr : 1 ≤ p.toReal := ENNReal.one_le_toReal_of_one_le hp1 hp + have hpinv0 : 0 < 1 / p.toReal := by positivity + have hpL : 1 / p.toReal < L := by linarith + have hψC := norm_le_of_iteratedFDeriv_le hC + set b := Ω.coneBump + set G : ℕ → Lp ℂ p (volume : Measure V) := fun J => b.partialSum hp L J F + set g : ℕ → V → ℂ := fun J x => ∑ j ∈ Finset.range (J + 1), + conv (b.dual L j) (b.localMean hp L j F) volume x + set M := ENNReal.ofReal C + ∑ l ∈ Finset.range (L + 1), + (L.choose l : ℝ≥0∞) * ENNReal.ofReal C * multiplierConst (V := V) hp L (1 / p.toReal) l + have hM : M ≠ ∞ := multiplierTotal_ne_top hp hpL C + have hGfin : ∀ J, ‖G J‖ₑ + lqNorm q (fun k => + dyadicWeight (s + 1 / p.toReal) k * lpModulus p L (G J) k) < ∞ := + fun J => b.modNorm_partialSum_lt_top hp L J (by positivity) hsL hq F + -- the products have finite intrinsic norms + have hψfin : ∀ {H : Lp ℂ p (volume : Measure V)}, ‖H‖ₑ + lqNorm q (fun k => + dyadicWeight (s + 1 / p.toReal) k * lpModulus p L H k) < ∞ → + Ω.intrinsicNorm hp L (s + 1 / p.toReal) q (mulLp hψ.continuous hψC H) < ∞ := fun hH => + (Ω.intrinsicNorm_lt_top_of_modNorm hp L hq (modNorm_mulLp_lt_top hp hψ hC hsL hq hH)).2 + -- convergence of the traces of the products, from some `J₀` on + have happ := b.tendsto_modNorm_sub_partialSum hp hL hpinv0 (by linarith) hpL hq hF + have hMb : Tendsto (fun J => M * (‖F - G J‖ₑ + lqNorm 1 (fun k => + dyadicWeight (1 / p.toReal) k * lpModulus p L (F - G J) k))) atTop (𝓝 0) := by + simpa only [mul_zero] using ENNReal.Tendsto.const_mul happ (Or.inr hM) + obtain ⟨J₀, hJ₀⟩ := eventually_atTop.1 + (happ.eventually (gt_mem_nhds (zero_lt_one : (0 : ℝ≥0∞) < 1))) + have hconvψ : Tendsto (fun J => Ω.trace hp L (mulLp hψ.continuous hψC (G J))) atTop + (𝓝 (Ω.trace hp L (mulLp hψ.continuous hψC F))) := by + rw [← tendsto_add_atTop_iff_nat J₀] + refine Ω.tendsto_trace_of_modNorm_sub_le hp L hs hq (hψfin hF) + (fun J => hψfin (hGfin (J + J₀))) (hMb.comp (tendsto_add_atTop_nat J₀)) + (fun J => ENNReal.mul_ne_top hM + ((hJ₀ (J + J₀) (Nat.le_add_left J₀ J)).trans ENNReal.one_lt_top).ne) fun J => ?_ + rw [← mulLp_sub] + exact modNorm_mulLp_le hp hψ hC hpL le_rfl (F - G (J + J₀)) + have hconv := Ω.tendsto_trace_partialSum b hp hL hs hsL hq hF + -- the restrictions + have htrψ : ∀ J, Ω.trace hp L (mulLp hψ.continuous hψC (G J)) =ᵐ[volume] + (fun x => ψ x * g J x) ∘ Ω.graphMap := fun J => + Ω.trace_ae_eq_comp_graphMap hp hL hs hq (Ω.intrinsicNorm_lt_top_of_modNorm hp L hq + (modNorm_mulLp_lt_top hp hψ hC hsL hq (hGfin J))).1 + (hψ.continuous.mul (b.continuous_partialSum_rep hp L J F)) + ((mulLp_apply_ae hψ.continuous hψC (G J)).trans + ((b.partialSum_ae hp L J F).mono fun x hx => congrArg (ψ x * ·) hx)) + have htr : ∀ J, Ω.trace hp L (G J) =ᵐ[volume] g J ∘ Ω.graphMap := fun J => + Ω.trace_ae_eq_comp_graphMap hp hL hs hq (Ω.intrinsicNorm_lt_top_of_modNorm hp L hq + (hGfin J)).1 (b.continuous_partialSum_rep hp L J F) (b.partialSum_ae hp L J F) + -- subsequences converging almost everywhere + obtain ⟨ns, hns, h1⟩ := (tendstoInMeasure_of_tendsto_eLpNorm hp0 + ((Lp.tendsto_Lp_iff_tendsto_eLpNorm' _ _).1 hconvψ)).exists_seq_tendsto_ae + obtain ⟨ms, hms, h2⟩ := (tendstoInMeasure_of_tendsto_eLpNorm hp0 + ((Lp.tendsto_Lp_iff_tendsto_eLpNorm' _ _).1 + (hconv.comp hns.tendsto_atTop))).exists_seq_tendsto_ae + filter_upwards [h1, h2, ae_all_iff.2 htrψ, ae_all_iff.2 htr] with x' hx1 hx2 hx3 hx4 + have hlim1 := hx1.comp hms.tendsto_atTop + have hlim2 : Tendsto (fun k => ψ (Ω.graphMap x') * + Ω.trace hp L (G (ns (ms k))) x') atTop (𝓝 (ψ (Ω.graphMap x') * Ω.trace hp L F x')) := + hx2.const_mul _ + refine tendsto_nhds_unique hlim1 (hlim2.congr fun k => ?_) + simp only [Function.comp_apply] + rw [hx3, hx4] + rfl + +/-- **The trace of a localised function is bounded**: for `1 ≤ p < ∞`, `0 < s < 1`, `1 ≤ q ≤ ∞`, +`s + 1/p < L` and a smooth `ψ` with derivatives bounded by `M` up to order `L`, there is `K < ∞` +with `‖Tr(ψ F)‖_p + ‖(2^(ks) ω_1(Tr(ψ F), 2^(-k))_p)_k‖_{ℓ_q} ≤ +K (‖F‖_p + ‖(2^(k(s+1/p)) ω_L(F, 2^(-k))_p)_k‖_{ℓ_q})` for every `F ∈ L_p(V)` with a finite right +side: the trace bound by the intrinsic norm (`Rd.LipschitzGraph.modNorm_trace_le`), the intrinsic +norm by the norm on `V` (`Rd.LipschitzGraph.modNormOn_le_modNorm`) and the multiplier bound +(`Rd.modNorm_mulLp_le`). -/ +theorem exists_modNorm_trace_mulLp_le (hp : p ≠ ∞) {L : ℕ} {s : ℝ} (hs : 0 < s) (hs1 : s < 1) + (hsL : s + 1 / p.toReal < L) {q : ℝ≥0∞} (hq : 1 ≤ q) {ψ : V → ℂ} + (hψ : ContDiff ℝ ((⊤ : ℕ∞) : WithTop ℕ∞) ψ) {M : ℝ} + (hM : ∀ l ≤ L, ∀ x, ‖iteratedFDeriv ℝ l ψ x‖ ≤ M) : + ∃ K : ℝ≥0∞, K ≠ ∞ ∧ ∀ F : Lp ℂ p (volume : Measure V), ‖F‖ₑ + lqNorm q (fun k => + dyadicWeight (s + 1 / p.toReal) k * lpModulus p L F k) < ∞ → + ‖Ω.trace hp L (mulLp hψ.continuous (norm_le_of_iteratedFDeriv_le hM) F)‖ₑ + + lqNorm q (fun k => dyadicWeight s k * + lpModulus p 1 (Ω.trace hp L (mulLp hψ.continuous (norm_le_of_iteratedFDeriv_le hM) F)) + k) ≤ + K * (‖F‖ₑ + lqNorm q (fun k => + dyadicWeight (s + 1 / p.toReal) k * lpModulus p L F k)) := by + obtain ⟨K, hK, hle⟩ := Ω.modNorm_trace_le hp L hs hs1 hq + refine ⟨K * multiplierTotal (V := V) hp L (s + 1 / p.toReal) M, + ENNReal.mul_ne_top hK (multiplierTotal_ne_top hp hsL M), fun F hF => ?_⟩ + have hX := (Ω.intrinsicNorm_lt_top_of_modNorm hp L hq + (modNorm_mulLp_lt_top hp hψ hM hsL hq hF)).1 + rw [mul_assoc] + exact (hle _ hX).trans (mul_le_mul' le_rfl ((Ω.modNormOn_le_modNorm L _ q rfl).trans + (modNorm_mulLp_le hp hψ hM hsL hq F))) + +/-! ### Finite sums -/ + +/-- The trace of `0` is `0`. -/ +theorem trace_zero (hp : p ≠ ∞) (L : ℕ) : Ω.trace hp L 0 = 0 := by + have h0 : ∀ j, Ω.traceTerm Ω.coneBump hp L j 0 = 0 := fun j => by + simpa using Ω.traceTerm_sub Ω.coneBump hp L j 0 0 + simp only [trace, traceSeries, map_zero, h0, tsum_zero] + +/-- The intrinsic quasi-norm of a sum is at most the sum of the intrinsic quasi-norms. -/ +theorem intrinsicNorm_add_le (hp : p ≠ ∞) (L : ℕ) (σ : ℝ) {q : ℝ≥0∞} (hq : 1 ≤ q) + (f₁ f₂ : Lp ℂ p (volume : Measure V)) : + Ω.intrinsicNorm hp L σ q (f₁ + f₂) ≤ + Ω.intrinsicNorm hp L σ q f₁ + Ω.intrinsicNorm hp L σ q f₂ := by + simp only [intrinsicNorm_def] + refine (ENNReal.lqNorm_mono fun j => ?_).trans (ENNReal.lqNorm_add_le hq _ _) + rw [map_add, map_add, ← mul_add] + exact mul_le_mul' le_rfl (eNorm_add_le _ _) + +/-- Finite sums of functions with finite intrinsic quasi-norms have finite intrinsic +quasi-norms. -/ +theorem intrinsicNorm_finsetSum_lt_top (hp : p ≠ ∞) (L : ℕ) (σ : ℝ) {q : ℝ≥0∞} (hq : 1 ≤ q) + {ι : Type*} (t : Finset ι) {F : ι → Lp ℂ p (volume : Measure V)} + (hF : ∀ i ∈ t, Ω.intrinsicNorm hp L σ q (F i) < ∞) : + Ω.intrinsicNorm hp L σ q (∑ i ∈ t, F i) < ∞ := by + classical + induction t using Finset.induction_on with + | empty => + simp only [Finset.sum_empty, intrinsicNorm_def, map_zero, eNorm_zero, mul_zero, + ENNReal.lqNorm_zero_right] + exact ENNReal.zero_lt_top + | insert i t hi ih => + rw [Finset.sum_insert hi] + exact (Ω.intrinsicNorm_add_le hp L σ hq _ _).trans_lt (ENNReal.add_lt_top.2 + ⟨hF i (Finset.mem_insert_self i t), ih fun j hj => hF j (Finset.mem_insert_of_mem hj)⟩) + +/-- **The trace of a finite sum** is the sum of the traces, for summands with finite intrinsic +quasi-norms of smoothness `s + 1/p`. -/ +theorem trace_finsetSum_of_intrinsicNorm (hp : p ≠ ∞) (L : ℕ) {s : ℝ} (hs : 0 < s) + {q : ℝ≥0∞} (hq : 1 ≤ q) {ι : Type*} (t : Finset ι) {F : ι → Lp ℂ p (volume : Measure V)} + (hF : ∀ i ∈ t, Ω.intrinsicNorm hp L (s + 1 / p.toReal) q (F i) < ∞) : + Ω.trace hp L (∑ i ∈ t, F i) = ∑ i ∈ t, Ω.trace hp L (F i) := by + classical + induction t using Finset.induction_on with + | empty => simp only [Finset.sum_empty, Ω.trace_zero hp L] + | insert i t hi ih => + have hS := Ω.intrinsicNorm_finsetSum_lt_top hp L _ hq t fun j hj => + hF j (Finset.mem_insert_of_mem hj) + have hiS := Ω.intrinsicNorm_finsetSum_lt_top hp L _ hq (insert i t) hF + rw [Finset.sum_insert hi] at hiS + have h := Ω.trace_sub hp L hs hq hiS hS + rw [add_sub_cancel_right] at h + rw [Finset.sum_insert hi, Finset.sum_insert hi, + ← ih fun j hj => hF j (Finset.mem_insert_of_mem hj), h, sub_add_cancel] + +/-- **The trace of a finite sum** is the sum of the traces, for summands with finite +`B^{s+1/p}_{p,q}`-norms of order `L` on `V`: these have finite intrinsic quasi-norms +(`Rd.LipschitzGraph.intrinsicNorm_lt_top_of_modNorm`), so +`Rd.LipschitzGraph.trace_finsetSum_of_intrinsicNorm` applies. -/ +theorem trace_finsetSum (hp : p ≠ ∞) (L : ℕ) {s : ℝ} (hs : 0 < s) {q : ℝ≥0∞} (hq : 1 ≤ q) + {ι : Type*} (t : Finset ι) {F : ι → Lp ℂ p (volume : Measure V)} + (hF : ∀ i ∈ t, ‖F i‖ₑ + lqNorm q (fun k => + dyadicWeight (s + 1 / p.toReal) k * lpModulus p L (F i) k) < ∞) : + Ω.trace hp L (∑ i ∈ t, F i) = ∑ i ∈ t, Ω.trace hp L (F i) := + Ω.trace_finsetSum_of_intrinsicNorm hp L hs hq t fun i hi => + (Ω.intrinsicNorm_lt_top_of_modNorm hp L hq (hF i hi)).2 + +end LipschitzGraph + +end Rd diff --git a/LeanPool/FunctionSpaces/Domains/Traces/GraphTraceExtension.lean b/LeanPool/FunctionSpaces/Domains/Traces/GraphTraceExtension.lean new file mode 100644 index 0000000000..6a6202f2b8 --- /dev/null +++ b/LeanPool/FunctionSpaces/Domains/Traces/GraphTraceExtension.lean @@ -0,0 +1,775 @@ +/- +Copyright (c) 2026 Mario Ullrich. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Mario Ullrich +-/ +module + +public import LeanPool.FunctionSpaces.Domains.Traces.MollifiedGraph +public import LeanPool.FunctionSpaces.Domains.Lipschitz.BoundedLipschitz + +/- +Modified for Lean Pool: module names and imports adapted. +-/ + +/-! +# Extension from the boundary of a Lipschitz graph domain + +Every `g ∈ B^s_{p,q}(H)`, `0 < s < 1`, `1 ≤ p < ∞`, is a trace (Schneider–Vybíral, Theorems 4.10 +and 4.11, for `p ≥ 1`). The atoms `a` of `g` on the hyperplane `H` (the cell atoms of the terms +`g_j = η_j ⋆ (k_j ⋆ g)` of the reproducing formula on `H`) are extended by + +`A(x) = a(Px) v_j(x)` (`Rd.LipschitzGraph.extendAtom`) + +with the vertical cut-off `v_j` of the mollified graph (`Rd.LipschitzGraph.vertCutoff`): +`A ∘ γ = a`, and by Leibniz's rule for differences `|Δ_h^2 A| ≤ 4 A_0 B min(1, (2^j ‖h‖)^2)` +(`Rd.LipschitzGraph.enorm_higherDiff_two_extendAtom_le`), so the extended atoms are regular atoms of +order and exponent `2` on `V` (`Rd.LipschitzGraph.isRegularAtom_extendAtom`). With the terms +`g_j` of moment order `Lh`, the levels of the extension are `F_j(x) = g_j(Px) v_j(x)` +(`Rd.LipschitzGraph.extLevel`) and `E g = ∑_j F_j` (`Rd.LipschitzGraph.graphExtension`). + +The order-dependent bounds are stated once for a **package of extended atoms** of order `r` +(`Rd.LipschitzGraph.HasExtensionAtoms`). For `s > 0`, `s + 1/p < r`, `C < ∞` and `g` with a finite +local means quasi-norm, `E g` has a finite `B^{s+1/p}_{p,q}`-norm with differences of order `r` +(`Rd.LipschitzGraph.modNorm_graphExtension_le_of_atoms`), since the coefficient quasi-norm with +smoothness `s + 1/p` on `V` is the one with smoothness `s` on `H`: +`(s + 1/p) - n/p = s - (n-1)/p`. Its trace is `g` +(`Rd.LipschitzGraph.trace_graphExtension_of_atoms`): the partial sums `∑_{j ≤ J} F_j` are +continuous with traces `∑_{j ≤ J} g_j → g` (`Rd.LipschitzGraph.trace_sum_traceExtTerm`), and they +converge to `E g` in `B^{1/p}_{p,1}`, where the trace is linear and continuous +(`Rd.LipschitzGraph.trace_sub`, `Rd.LipschitzGraph.enorm_trace_le`). + +On a Lipschitz graph the extended atoms form a package of order `2` +(`Rd.LipschitzGraph.exists_extension_atoms`). This gives the bound for `0 < s < 1` +(`Rd.LipschitzGraph.modNorm_graphExtension_le`, `Rd.LipschitzGraph.modNorm_graphExtension_lt_top`), +`Tr (E g) = g` (`Rd.LipschitzGraph.trace_graphExtension`), and with the boundedness of the trace +the trace space (`Rd.LipschitzGraph.exists_trace_eq_iff`; Schneider–Vybíral, Theorem 4.11 for +graph domains and `p ≥ 1`): `g` is the trace of a function with finite intrinsic +`B^{s+1/p}_{p,q}`-norm on `Ω` iff `g ∈ B^s_{p,q}(H)`. On the half-space the extended atoms form +packages of every order (`FunctionSpaces.Domains.Traces.HalfSpaceTrace`). + +Schneider–Vybíral extend Lip atoms by Whitney's extension and interpolate through `p < 1` +(their Lemma 4.9); for `p ≥ 1` the mollified graph replaces this. +-/ + +@[expose] public section + +open MeasureTheory Filter Topology Module Metric +open scoped ENNReal + +open ENNReal (lqNorm dyadicWeight) + +namespace Rd + +/-- `min(1, s^a) min(1, s^b) ≤ min(1, s^(a+b))` for `a, b ≥ 0`. -/ +theorem min_one_rpow_mul_le (s : ℝ≥0∞) {a b : ℝ} (ha : 0 ≤ a) (hb : 0 ≤ b) : + min 1 (s ^ a) * min 1 (s ^ b) ≤ min 1 (s ^ (a + b)) := by + rcases le_total s 1 with hs | hs + · have hsa : s ^ a ≤ 1 := ENNReal.rpow_le_one hs ha + have hsb : s ^ b ≤ 1 := ENNReal.rpow_le_one hs hb + have hsab : s ^ (a + b) ≤ 1 := ENNReal.rpow_le_one hs (add_nonneg ha hb) + rw [min_eq_right hsa, min_eq_right hsb, min_eq_right hsab, + ENNReal.rpow_add_of_nonneg a b ha hb] + · have hsab : 1 ≤ s ^ (a + b) := + (ENNReal.one_rpow _).symm.le.trans (ENNReal.rpow_le_rpow hs (add_nonneg ha hb)) + rw [min_eq_left hsab] + exact (mul_le_mul' (min_le_left _ _) (min_le_left _ _)).trans_eq (one_mul 1) + +/-- `s + 1/p < L` for `s < 1`, `1 ≤ p < ∞` and `L ≥ 2`. -/ +theorem add_one_div_toReal_lt {p : ℝ≥0∞} [Fact (1 ≤ p)] (hp : p ≠ ∞) {s : ℝ} (hs1 : s < 1) {L : ℕ} + (hL : 2 ≤ L) : s + 1 / p.toReal < L := by + have hpr : 1 ≤ p.toReal := ENNReal.one_le_toReal_of_one_le Fact.out hp + have h1 : 1 / p.toReal ≤ 1 := by + rw [div_le_one (by linarith)] + exact hpr + have h2 : (2 : ℝ) ≤ L := by exact_mod_cast hL + linarith + +/-- `0 < 1/p` for `1 ≤ p < ∞`. -/ +theorem one_div_toReal_pos {p : ℝ≥0∞} [Fact (1 ≤ p)] (hp : p ≠ ∞) : 0 < 1 / p.toReal := + one_div_pos.2 (ENNReal.toReal_pos (zero_lt_one.trans_le Fact.out).ne' hp) + +/-- `1 ≤ r` for `s > 0` and `s + 1/p < r`. -/ +theorem one_le_of_add_one_div_toReal_lt {p : ℝ≥0∞} {s : ℝ} (hs : 0 < s) {r : ℕ} + (hsr : s + 1 / p.toReal < r) : 1 ≤ r := + Nat.cast_pos.1 ((by positivity : (0 : ℝ) < s + 1 / p.toReal).trans hsr) + +namespace LipschitzGraph + +variable {V : Type*} [NormedAddCommGroup V] [InnerProductSpace ℝ V] [FiniteDimensional ℝ V] + [MeasurableSpace V] [BorelSpace V] (Ω : LipschitzGraph V) + +/-! ### Extended atoms -/ + +/-- The **extension of a function on `H`** at level `j`: `A(x) = a(Px) v_j(x)`. -/ +noncomputable def extendAtom (j : ℕ) (a : Ω.hyperplane → ℂ) (x : V) : ℂ := + a (Ω.proj x) * Ω.vertCutoff j x + +/-- `A(γ x') = a(x')`. -/ +theorem extendAtom_graphMap (j : ℕ) (a : Ω.hyperplane → ℂ) (x' : Ω.hyperplane) : + Ω.extendAtom j a (Ω.graphMap x') = a x' := by + rw [extendAtom, Ω.proj_graphMap, Ω.vertCutoff_graphMap, mul_one] + +/-- The extension of a continuous function is continuous. -/ +theorem continuous_extendAtom (j : ℕ) {a : Ω.hyperplane → ℂ} (hac : Continuous a) : + Continuous (Ω.extendAtom j a) := + (hac.comp Ω.proj.continuous).mul (Ω.continuous_vertCutoff j) + +omit [FiniteDimensional ℝ V] [MeasurableSpace V] [BorelSpace V] in +/-- `Δ_h^l (a ∘ P)(x) = Δ_{Ph}^l a(Px)`. -/ +theorem higherDiff_comp_proj (l : ℕ) (h : V) (a : Ω.hyperplane → ℂ) (x : V) : + (fwdDiff h)^[l] (fun y => a (Ω.proj y)) x = (fwdDiff (Ω.proj h))^[l] a (Ω.proj x) := by + rw [higherDiff_apply, higherDiff_apply] + refine Finset.sum_congr rfl fun i _ => ?_ + rw [map_add, map_smul] + +/-- `||A| ≤ A_0` for `|a| ≤ A_0`. -/ +theorem enorm_extendAtom_le (j : ℕ) {a : Ω.hyperplane → ℂ} {A : ℝ≥0∞} + (ha : ∀ y, ‖a y‖ₑ ≤ A) (x : V) : ‖Ω.extendAtom j a x‖ₑ ≤ A := by + rw [extendAtom, eNorm_mul] + refine (mul_le_mul' (ha _) ?_).trans_eq (mul_one A) + rw [← ofReal_norm, ← ENNReal.ofReal_one] + exact ENNReal.ofReal_le_ofReal (Ω.norm_vertCutoff_le j x) + +/-- **Second differences of extended atoms**: if `|Δ_h^l a| ≤ A_0 min(1, (2^j ‖h‖)^l)` for +`l ≤ 2`, then `|Δ_h^2 A| ≤ 4 A_0 B min(1, (2^j ‖h‖)^2)`, by Leibniz's rule for differences +(`Rd.higherDiff_mul`) and the bounds of the vertical cut-off. -/ +theorem enorm_higherDiff_two_extendAtom_le (j : ℕ) {a : Ω.hyperplane → ℂ} {A : ℝ≥0∞} + (ha : ∀ l ≤ 2, ∀ h y, ‖(fwdDiff h)^[l] a y‖ₑ ≤ + A * min 1 (ENNReal.ofReal (2 ^ j * ‖h‖) ^ (l : ℝ))) (h x : V) : + ‖(fwdDiff h)^[2] (Ω.extendAtom j a) x‖ₑ ≤ + 4 * A * ENNReal.ofReal Ω.vertCutoffConst * + min 1 (ENNReal.ofReal (2 ^ j * ‖h‖) ^ (2 : ℝ)) := by + set t := ENNReal.ofReal (2 ^ j * ‖h‖) + set B := ENNReal.ofReal Ω.vertCutoffConst + have hu : ∀ l ≤ 2, ‖(fwdDiff h)^[l] (fun y => a (Ω.proj y)) x‖ₑ ≤ + A * min 1 (t ^ (l : ℝ)) := fun l hl => by + rw [Ω.higherDiff_comp_proj] + refine (ha l hl _ _).trans (mul_le_mul' le_rfl (min_le_min le_rfl + (ENNReal.rpow_le_rpow (ENNReal.ofReal_le_ofReal ?_) (Nat.cast_nonneg l)))) + exact mul_le_mul_of_nonneg_left (Ω.norm_proj_le h) (by positivity) + have hv : ∀ m ≤ 2, ∀ y, ‖(fwdDiff h)^[m] (Ω.vertCutoff j) y‖ₑ ≤ B * min 1 (t ^ (m : ℝ)) := + fun m hm y => Ω.enorm_higherDiff_vertCutoff_le j hm h y + have hterm : ∀ l ∈ Finset.range (2 + 1), ‖(Nat.choose 2 l : ℂ) * + ((fwdDiff h)^[l] (fun y => a (Ω.proj y)) x * + (fwdDiff h)^[2 - l] (Ω.vertCutoff j) (x + (l : ℝ) • h))‖ₑ ≤ + (Nat.choose 2 l : ℝ≥0∞) * (A * B * min 1 (t ^ (2 : ℝ))) := fun l hl => by + have hl2 : l ≤ 2 := Nat.lt_succ_iff.1 (Finset.mem_range.1 hl) + rw [eNorm_mul, eNorm_mul, ← ofReal_norm, Complex.norm_natCast, ENNReal.ofReal_natCast] + refine mul_le_mul' le_rfl ?_ + calc ‖(fwdDiff h)^[l] (fun y => a (Ω.proj y)) x‖ₑ * + ‖(fwdDiff h)^[2 - l] (Ω.vertCutoff j) (x + (l : ℝ) • h)‖ₑ + ≤ (A * min 1 (t ^ (l : ℝ))) * (B * min 1 (t ^ ((2 - l : ℕ) : ℝ))) := + mul_le_mul' (hu l hl2) (hv (2 - l) (Nat.sub_le 2 l) _) + _ = A * B * (min 1 (t ^ (l : ℝ)) * min 1 (t ^ ((2 - l : ℕ) : ℝ))) := by ring + _ ≤ A * B * min 1 (t ^ (2 : ℝ)) := by + refine mul_le_mul' le_rfl ((min_one_rpow_mul_le t (Nat.cast_nonneg _) + (Nat.cast_nonneg _)).trans_eq ?_) + congr 2 + rw [Nat.cast_sub hl2] + ring + have hsum : ∑ l ∈ Finset.range (2 + 1), (Nat.choose 2 l : ℝ≥0∞) = 4 := by + simp [Finset.sum_range_succ] + norm_num + rw [show Ω.extendAtom j a = fun y => a (Ω.proj y) * Ω.vertCutoff j y from rfl, higherDiff_mul] + calc ‖∑ l ∈ Finset.range (2 + 1), (Nat.choose 2 l : ℂ) * + ((fwdDiff h)^[l] (fun y => a (Ω.proj y)) x * + (fwdDiff h)^[2 - l] (Ω.vertCutoff j) (x + (l : ℝ) • h))‖ₑ + ≤ ∑ l ∈ Finset.range (2 + 1), (Nat.choose 2 l : ℝ≥0∞) * (A * B * min 1 (t ^ (2 : ℝ))) := + (eNorm_sum_le _ _).trans (Finset.sum_le_sum hterm) + _ = 4 * A * B * min 1 (t ^ (2 : ℝ)) := by + rw [← Finset.sum_mul, hsum] + ring + +/-- The radius factor `d (1 + M ‖ρ‖_1) + c + 1` of the extended atoms. -/ +noncomputable def extendRadius (d : ℝ) : ℝ := + d * (1 + Ω.M * Ω.graphBumpNorm) + Ω.cutoffLevel + 1 + +/-- The radius factor of the extended atoms is nonnegative for `d ≥ 0`. -/ +theorem extendRadius_nonneg {d : ℝ} (hd : 0 ≤ d) : 0 ≤ Ω.extendRadius d := by + have := Ω.cutoffLevel_pos + have := mul_nonneg hd (add_nonneg zero_le_one (mul_nonneg Ω.M_nonneg Ω.graphBumpNorm_nonneg)) + rw [extendRadius] + linarith + +/-- The centre `c' + φ_j(c') e` in `V` of the extension of an atom centred at `c' ∈ H`. -/ +noncomputable def extendCenter (j : ℕ) (c' : Ω.hyperplane) : V := + (c' : V) + Ω.smoothGraph j c' • Ω.e + +/-- The projection of the extended centre is the centre. -/ +theorem proj_extendCenter (j : ℕ) (c' : Ω.hyperplane) : Ω.proj (Ω.extendCenter j c') = c' := by + rw [extendCenter, map_add, map_smul, Ω.proj_e, smul_zero, add_zero, Ω.proj_coe] + +/-- **The support of extended atoms**: if `a = 0` outside `B̄(c', d 2^(-j))`, then `A = 0` outside +`B̄(c' + φ_j(c') e, (d (1 + M ‖ρ‖_1) + c + 1) 2^(-j))`. -/ +theorem extendAtom_eq_zero (j : ℕ) {a : Ω.hyperplane → ℂ} {d : ℝ} {c' : Ω.hyperplane} + (h0 : ∀ y, d / 2 ^ j < ‖y - c'‖ → a y = 0) {x : V} + (hx : Ω.extendRadius d / 2 ^ j < ‖x - Ω.extendCenter j c'‖) : Ω.extendAtom j a x = 0 := by + by_contra hne + have ha : a (Ω.proj x) ≠ 0 := left_ne_zero_of_mul hne + have hv : Ω.vertCutoff j x ≠ 0 := right_ne_zero_of_mul hne + have h1 : ‖Ω.proj x - c'‖ ≤ d / 2 ^ j := not_lt.1 fun h => ha (h0 _ h) + have h2 : |inner ℝ x Ω.e - Ω.smoothGraph j (Ω.proj x)| ≤ (Ω.cutoffLevel + 1) / 2 ^ j := + le_of_lt (not_le.1 fun h => hv (Ω.vertCutoff_eq_zero j h)) + have h3 : |Ω.smoothGraph j (Ω.proj x) - Ω.smoothGraph j c'| ≤ + Ω.M * Ω.graphBumpNorm * (d / 2 ^ j) := + (Ω.abs_smoothGraph_sub_le j _ _).trans (mul_le_mul_of_nonneg_left h1 + (mul_nonneg Ω.M_nonneg Ω.graphBumpNorm_nonneg)) + have hdecomp : x - Ω.extendCenter j c' = ((Ω.proj x - c' : Ω.hyperplane) : V) + + (inner ℝ x Ω.e - Ω.smoothGraph j c') • Ω.e := by + have hx' : x = (Ω.proj x : V) + inner ℝ x Ω.e • Ω.e := by rw [coe_proj, sub_add_cancel] + conv_lhs => rw [hx'] + rw [extendCenter, Submodule.coe_sub, sub_smul] + abel + have hle : ‖x - Ω.extendCenter j c'‖ ≤ Ω.extendRadius d / 2 ^ j := by + rw [hdecomp] + calc ‖((Ω.proj x - c' : Ω.hyperplane) : V) + (inner ℝ x Ω.e - Ω.smoothGraph j c') • Ω.e‖ + ≤ ‖Ω.proj x - c'‖ + |inner ℝ x Ω.e - Ω.smoothGraph j c'| := by + refine (norm_add_le _ _).trans (le_of_eq ?_) + rw [norm_smul, Ω.norm_e, mul_one, Real.norm_eq_abs, Submodule.norm_coe] + _ ≤ ‖Ω.proj x - c'‖ + (|inner ℝ x Ω.e - Ω.smoothGraph j (Ω.proj x)| + + |Ω.smoothGraph j (Ω.proj x) - Ω.smoothGraph j c'|) := by + gcongr + exact abs_sub_le _ _ _ + _ ≤ d / 2 ^ j + ((Ω.cutoffLevel + 1) / 2 ^ j + Ω.M * Ω.graphBumpNorm * (d / 2 ^ j)) := + add_le_add h1 (add_le_add h2 h3) + _ = Ω.extendRadius d / 2 ^ j := by + rw [extendRadius] + ring + exact absurd hle (not_le.2 hx) + +/-- **Extended atoms are regular atoms** of order and exponent `2` on `V`: if `a` is continuous, +vanishes outside `B̄(c', d 2^(-j))` and `|Δ_h^l a| ≤ A_0 min(1, (2^j ‖h‖)^l)` for `l ≤ 2`, then +`A = (a ∘ P) v_j` is a regular atom of level `j` with centre `c' + φ_j(c') e`. -/ +theorem isRegularAtom_extendAtom {p : ℝ≥0∞} (j : ℕ) {a : Ω.hyperplane → ℂ} (hac : Continuous a) + {d : ℝ} (hd : 0 ≤ d) {c' : Ω.hyperplane} (h0 : ∀ y, d / 2 ^ j < ‖y - c'‖ → a y = 0) + {A : ℝ≥0∞} + (ha : ∀ l ≤ 2, ∀ h y, ‖(fwdDiff h)^[l] a y‖ₑ ≤ + A * min 1 (ENNReal.ofReal (2 ^ j * ‖h‖) ^ (l : ℝ))) : + IsRegularAtom p 2 2 (Ω.extendRadius d) + (4 * A * ENNReal.ofReal Ω.vertCutoffConst * (((2 + 1 : ℕ) : ℝ≥0∞) * + (ENNReal.ofReal (Ω.extendRadius d ^ finrank ℝ V) * volume (ball (0 : V) 1))) ^ + (1 / p.toReal)) j (Ω.extendCenter j c') (Ω.extendAtom j a) := by + have hR := Ω.extendRadius_nonneg hd + have hB : 1 ≤ 4 * ENNReal.ofReal Ω.vertCutoffConst := by + have h4 : (1 : ℝ≥0∞) ≤ ENNReal.ofReal Ω.vertCutoffConst := by + rw [← ENNReal.ofReal_one] + exact ENNReal.ofReal_le_ofReal (by linarith [Ω.four_le_vertCutoffConst]) + calc (1 : ℝ≥0∞) = 1 * 1 := (one_mul 1).symm + _ ≤ 4 * ENNReal.ofReal Ω.vertCutoffConst := mul_le_mul' (by norm_num) h4 + refine isRegularAtom_of_pointwise hR (Ω.continuous_extendAtom j hac).aestronglyMeasurable + (fun x hx => Ω.extendAtom_eq_zero j h0 hx) (fun x => ?_) (fun h x => ?_) + · refine (Ω.enorm_extendAtom_le j (fun y => by simpa using ha 0 (Nat.zero_le 2) 0 y) x).trans ?_ + calc A = 1 * A := (one_mul A).symm + _ ≤ 4 * ENNReal.ofReal Ω.vertCutoffConst * A := mul_le_mul' hB le_rfl + _ = 4 * A * ENNReal.ofReal Ω.vertCutoffConst := by ring + · have h2 := Ω.enorm_higherDiff_two_extendAtom_le j ha h x + simpa using h2 + +/-! ### Packages of extended atoms -/ + +/-- **A package of extended atoms of order `r`**: for every level `j` and `h ∈ L_p(H)`, the +extensions `A_{j,m}` of the cell atoms of `η_j ⋆ h` (dual kernels of moment order `Lh`) are +regular atoms on `V` of order and exponent `r` with radius factor `d` and constant `C`, centred at +`c_{j,m} + φ_j(c_{j,m}) e`, and for every `x ∈ V` at most `N` of these centres with nonzero +coefficient lie within `(d + r) 2^(-j)` of `x`. The order-dependent bounds of the extension are +stated once for such a package. -/ +def HasExtensionAtoms (p : ℝ≥0∞) (Lh r : ℕ) (d : ℝ) (C : ℝ≥0∞) (N : ℕ) : Prop := + ∀ (j : ℕ) {h : Ω.hyperplane → ℂ}, MemLp h p volume → + (∀ m, IsRegularAtom p r r d C j (Ω.extendCenter j (cellCenter j m)) + (Ω.extendAtom j (cellAtom p (Ω.graphBump.dual Lh j) j h m))) ∧ + ∀ x (S : Finset (Fin (finrank ℝ Ω.hyperplane) → ℤ)), + (∀ m ∈ S, cellCoef p j h m ≠ 0 ∧ ‖x - Ω.extendCenter j (cellCenter j m)‖ ≤ (d + r) / 2 ^ j) → + S.card ≤ N + +/-! ### The extension operator -/ + +section Extension + +variable {p : ℝ≥0∞} [Fact (1 ≤ p)] + +/-- The terms of the reproducing formula on `H`: `g_j = η_j ⋆ (k_j ⋆ g)`, with the mollifier bump of +`H` and moment order `Lh`. -/ +noncomputable def extLevelH (hp : p ≠ ∞) (Lh j : ℕ) (g : Lp ℂ p (volume : Measure Ω.hyperplane)) + (x' : Ω.hyperplane) : ℂ := + conv (Ω.graphBump.dual Lh j) (Ω.graphBump.localMean hp Lh j g) volume x' + +/-- The terms on `H` are continuous. -/ +theorem continuous_extLevelH (hp : p ≠ ∞) (Lh j : ℕ) + (g : Lp ℂ p (volume : Measure Ω.hyperplane)) : Continuous (Ω.extLevelH hp Lh j g) := + (Ω.graphBump.hasCompactSupport_dual Lh j).continuous_convolution_left + (ContinuousLinearMap.mul ℂ ℂ) (Ω.graphBump.continuous_dual Lh j) + ((Lp.memLp _).locallyIntegrable Fact.out) + +/-- The radius factor `2 Lh + (n - 1)` of the cell atoms on `H` of moment order `Lh` (the +mollifier has radius `1`). -/ +noncomputable def extRadiusH (Lh : ℕ) : ℝ := + 2 * (Lh : ℝ) * Ω.graphBump.radius + finrank ℝ Ω.hyperplane + +/-- The radius factor of the cell atoms on `H` is nonnegative. -/ +theorem extRadiusH_nonneg (Lh : ℕ) : 0 ≤ Ω.extRadiusH Lh := + add_nonneg (mul_nonneg (mul_nonneg zero_le_two (Nat.cast_nonneg _)) + Ω.graphBump.radius_nonneg) (Nat.cast_nonneg _) + +/-- **The extended atoms of order `2`**: for every moment order `Lh` there are `C < ∞` and an +overlap bound `N` such that the extensions of the cell atoms on `H` form a package of extended +atoms of order `2` (`Rd.LipschitzGraph.HasExtensionAtoms`) with radius factor +`extendRadius (extRadiusH Lh)`: their centres project to the cell centres of `H`. -/ +theorem exists_extension_atoms (Lh : ℕ) : + ∃ (C : ℝ≥0∞) (N : ℕ), C ≠ ∞ ∧ + Ω.HasExtensionAtoms p Lh 2 (Ω.extendRadius (Ω.extRadiusH Lh)) C N := by + have hp1 : 1 ≤ p := Fact.out + obtain ⟨A, hA, hb⟩ := Ω.graphBump.exists_cellAtom_pointwise_bound hp1 Lh 2 + have hd := Ω.extendRadius_nonneg (Ω.extRadiusH_nonneg Lh) + refine ⟨4 * A * ENNReal.ofReal Ω.vertCutoffConst * (((2 + 1 : ℕ) : ℝ≥0∞) * + (ENNReal.ofReal (Ω.extendRadius (Ω.extRadiusH Lh) ^ finrank ℝ V) * + volume (ball (0 : V) 1))) ^ (1 / p.toReal), + ⌈(2 * (Ω.extendRadius (Ω.extRadiusH Lh) + 2) + 2) ^ finrank ℝ Ω.hyperplane⌉₊, ?_, + fun j h hh => ⟨fun m => ?_, fun x S hS => ?_⟩⟩ + · exact ENNReal.mul_ne_top (ENNReal.mul_ne_top (ENNReal.mul_ne_top (by simp) hA) + ENNReal.ofReal_ne_top) (ENNReal.rpow_ne_top_of_nonneg + (div_nonneg zero_le_one ENNReal.toReal_nonneg) (ENNReal.mul_ne_top + (ENNReal.natCast_ne_top _) (ENNReal.mul_ne_top ENNReal.ofReal_ne_top + measure_ball_lt_top.ne))) + · simpa only [Nat.cast_ofNat] using Ω.isRegularAtom_extendAtom j (continuous_cellAtom hp1 + (Ω.graphBump.continuous_dual Lh j) (Ω.graphBump.hasCompactSupport_dual Lh j) hh j m) + (Ω.extRadiusH_nonneg Lh) + (fun y hy => cellAtom_eq_zero (fun z hz => Ω.graphBump.dual_eq_zero_of_lt Lh j hz) m hy) + (fun l hl h' y => hb j hh m l hl h' y) + · refine card_le_of_norm_sub_cellCenter_le j (by linarith) (Ω.proj x) S fun m hm => ?_ + calc ‖Ω.proj x - cellCenter j m‖ = ‖Ω.proj (x - Ω.extendCenter j (cellCenter j m))‖ := by + rw [map_sub, Ω.proj_extendCenter] + _ ≤ ‖x - Ω.extendCenter j (cellCenter j m)‖ := Ω.norm_proj_le _ + _ ≤ (Ω.extendRadius (Ω.extRadiusH Lh) + 2) / 2 ^ j := by + simpa only [Nat.cast_ofNat] using (hS m hm).2 + +/-- The levels of the extension: `F_j(x) = g_j(Px) v_j(x)`. -/ +noncomputable def extLevel (hp : p ≠ ∞) (Lh j : ℕ) (g : Lp ℂ p (volume : Measure Ω.hyperplane)) : + V → ℂ := + Ω.extendAtom j (Ω.extLevelH hp Lh j g) + +/-- **The levels are sums of extended atoms**: `F_j = ∑_m λ_{j,m} A_{j,m}` at every point. -/ +theorem extLevel_eq_tsum (hp : p ≠ ∞) (Lh j : ℕ) (g : Lp ℂ p (volume : Measure Ω.hyperplane)) + (x : V) : + Ω.extLevel hp Lh j g x = ∑' m, cellCoef p j (Ω.graphBump.localMean hp Lh j g) m * + Ω.extendAtom j (cellAtom p (Ω.graphBump.dual Lh j) j (Ω.graphBump.localMean hp Lh j g) m) + x := by + have hρ : 0 ≤ 2 * (Lh : ℝ) * Ω.graphBump.radius / 2 ^ j := + div_nonneg (mul_nonneg (mul_nonneg zero_le_two (Nat.cast_nonneg _)) + Ω.graphBump.radius_nonneg) (by positivity) + rw [extLevel, extendAtom, extLevelH, conv_eq_tsum_cellAtom Fact.out + (Ω.graphBump.continuous_dual Lh j) hρ (fun y hy => Ω.graphBump.dual_eq_zero_of_lt Lh j hy) + (Lp.memLp _) j, ← tsum_mul_right] + refine tsum_congr fun m => ?_ + rw [extendAtom, mul_assoc] + +/-- The levels of the extension are continuous. -/ +theorem continuous_extLevel (hp : p ≠ ∞) (Lh j : ℕ) + (g : Lp ℂ p (volume : Measure Ω.hyperplane)) : Continuous (Ω.extLevel hp Lh j g) := + Ω.continuous_extendAtom j (Ω.continuous_extLevelH hp Lh j g) + +/-- **The levels of the extension in `L_p`**: `‖F_j‖_p ≤ K 2^(-j/p) ‖k_j ⋆ g‖_p`, from the +extended atoms of order `2` (`Rd.LipschitzGraph.exists_extension_atoms`). -/ +theorem eLpNorm_extLevel_le (hp : p ≠ ∞) (Lh : ℕ) : + ∃ K : ℝ≥0∞, K ≠ ∞ ∧ ∀ j (g : Lp ℂ p (volume : Measure Ω.hyperplane)), + eLpNorm (Ω.extLevel hp Lh j g) p volume ≤ + K * dyadicWeight (-(1 / p.toReal)) j * ‖Ω.graphBump.localMean hp Lh j g‖ₑ := by + have hp1 : 1 ≤ p := Fact.out + have hp0 : p ≠ 0 := (zero_lt_one.trans_le hp1).ne' + obtain ⟨C, N, hC, hatoms⟩ := Ω.exists_extension_atoms (p := p) Lh + have hexp : 0 ≤ 1 - 1 / p.toReal := one_sub_one_div_toReal_nonneg hp1 + refine ⟨(N : ℝ≥0∞) ^ (1 - 1 / p.toReal) * C, ENNReal.mul_ne_top + (ENNReal.rpow_ne_top_of_nonneg hexp (ENNReal.natCast_ne_top N)) hC, fun j g => ?_⟩ + obtain ⟨hat, hN⟩ := hatoms j (Lp.memLp (Ω.graphBump.localMean hp Lh j g)) + have hlev := eLpNorm_levelSum_le hp1 hp (fun m => Ω.extendCenter j (cellCenter j m)) + (fun m => Ω.extendAtom j (cellAtom p (Ω.graphBump.dual Lh j) j + (Ω.graphBump.localMean hp Lh j g) m)) + (cellCoef p j (Ω.graphBump.localMean hp Lh j g)) hN hat + (Ω.continuous_extLevel hp Lh j g).aestronglyMeasurable + (Eventually.of_forall (Ω.extLevel_eq_tsum hp Lh j g)) + refine hlev.trans_eq ?_ + rw [levelNorm_cellCoef hp0 hp (Lp.memLp _) j, ← Lp.eNorm_def] + have hw : dyadicWeight (-(finrank ℝ V / p.toReal)) j * + dyadicWeight (finrank ℝ Ω.hyperplane / p.toReal) j = dyadicWeight (-(1 / p.toReal)) j := by + rw [← ENNReal.dyadicWeight_add, Ω.finrank_hyperplane_eq] + congr 1 + ring + calc (N : ℝ≥0∞) ^ (1 - 1 / p.toReal) * (C * dyadicWeight (-(finrank ℝ V / p.toReal)) j) * + (dyadicWeight (finrank ℝ Ω.hyperplane / p.toReal) j * + ‖Ω.graphBump.localMean hp Lh j g‖ₑ) + = (N : ℝ≥0∞) ^ (1 - 1 / p.toReal) * C * (dyadicWeight (-(finrank ℝ V / p.toReal)) j * + dyadicWeight (finrank ℝ Ω.hyperplane / p.toReal) j) * + ‖Ω.graphBump.localMean hp Lh j g‖ₑ := by ring + _ = _ := by rw [hw] + +/-- The levels of the extension are in `L_p`. -/ +theorem memLp_extLevel (hp : p ≠ ∞) (Lh j : ℕ) (g : Lp ℂ p (volume : Measure Ω.hyperplane)) : + MemLp (Ω.extLevel hp Lh j g) p volume := by + obtain ⟨K, hK, hle⟩ := Ω.eLpNorm_extLevel_le hp Lh + exact memLp_iff.2 ((hle j g).trans_lt (ENNReal.mul_lt_top (ENNReal.mul_lt_top hK.lt_top + (ENNReal.dyadicWeight_lt_top _ _)) eNorm_lt_top)) + +/-- The level `F_j` of the extension in `L_p(V)`. -/ +noncomputable def traceExtTerm (hp : p ≠ ∞) (Lh j : ℕ) + (g : Lp ℂ p (volume : Measure Ω.hyperplane)) : Lp ℂ p (volume : Measure V) := + (Ω.memLp_extLevel hp Lh j g).toLp _ + +/-- The level in `L_p` agrees with `F_j` almost everywhere. -/ +theorem traceExtTerm_ae (hp : p ≠ ∞) (Lh j : ℕ) (g : Lp ℂ p (volume : Measure Ω.hyperplane)) : + Ω.traceExtTerm hp Lh j g =ᵐ[volume] Ω.extLevel hp Lh j g := + MemLp.coeFn_toLp _ + +/-- The **extension** `E g = ∑_j F_j` of `g` from the boundary, with moment order `Lh` on `H`. -/ +noncomputable def graphExtension (hp : p ≠ ∞) (Lh : ℕ) + (g : Lp ℂ p (volume : Measure Ω.hyperplane)) : Lp ℂ p (volume : Measure V) := + ∑' j, Ω.traceExtTerm hp Lh j g + +/-- **The extension converges absolutely** for `s > 0` and a finite local means quasi-norm +`X = ‖(2^(js) ‖k_j ⋆ g‖_p)_j‖_{ℓ_q}`: `‖F_j‖_p ≤ K X 2^(-js)`. -/ +theorem summable_traceExtTerm (hp : p ≠ ∞) (Lh : ℕ) {s : ℝ} (hs : 0 < s) {q : ℝ≥0∞} (hq : 1 ≤ q) + {g : Lp ℂ p (volume : Measure Ω.hyperplane)} + (hX : Ω.graphBump.localMeansNorm hp Lh s q g < ∞) : + Summable fun j => Ω.traceExtTerm hp Lh j g := by + obtain ⟨K, hK, hle⟩ := Ω.eLpNorm_extLevel_le hp Lh + set X := Ω.graphBump.localMeansNorm hp Lh s q g + have hterm : ∀ j, ‖Ω.traceExtTerm hp Lh j g‖ₑ ≤ K * X * dyadicWeight (-s) j := fun j => by + have hXj : dyadicWeight s j * ‖Ω.graphBump.localMean hp Lh j g‖ₑ ≤ X := + ENNReal.le_lqNorm (zero_lt_one.trans_le hq).ne' + (fun j => dyadicWeight s j * ‖Ω.graphBump.localMean hp Lh j g‖ₑ) j + rw [Lp.eNorm_def, eLpNorm_congr_ae (Ω.traceExtTerm_ae hp Lh j g)] + refine (hle j g).trans ?_ + have hw : dyadicWeight (-(1 / p.toReal)) j * ‖Ω.graphBump.localMean hp Lh j g‖ₑ ≤ + dyadicWeight (-s) j * (dyadicWeight s j * ‖Ω.graphBump.localMean hp Lh j g‖ₑ) := by + rw [← mul_assoc, ← ENNReal.dyadicWeight_add, neg_add_cancel, ENNReal.dyadicWeight_zero_left, + one_mul] + calc dyadicWeight (-(1 / p.toReal)) j * ‖Ω.graphBump.localMean hp Lh j g‖ₑ + ≤ 1 * ‖Ω.graphBump.localMean hp Lh j g‖ₑ := by + refine mul_le_mul' ?_ le_rfl + have := ENNReal.dyadicWeight_anti (s := -(1 / p.toReal)) + (by have := ENNReal.toReal_nonneg (a := p); simp only [neg_nonpos]; positivity) + (Nat.zero_le j) + simpa using this + _ = ‖Ω.graphBump.localMean hp Lh j g‖ₑ := one_mul _ + calc K * dyadicWeight (-(1 / p.toReal)) j * ‖Ω.graphBump.localMean hp Lh j g‖ₑ + = K * (dyadicWeight (-(1 / p.toReal)) j * ‖Ω.graphBump.localMean hp Lh j g‖ₑ) := by ring + _ ≤ K * (dyadicWeight (-s) j * X) := + mul_le_mul' le_rfl (hw.trans (mul_le_mul' le_rfl hXj)) + _ = K * X * dyadicWeight (-s) j := by ring + refine Summable.of_eNorm (ne_top_of_le_ne_top ?_ (tsum_le_tsum hterm)) + rw [ENNReal.tsum_mul_left, ENNReal.tsum_dyadicWeight_neg] + exact ENNReal.mul_ne_top (ENNReal.mul_ne_top hK hX.ne) + (ENNReal.one_sub_two_rpow_neg_inv_ne_top hs) + +/-- The coefficient quasi-norm of the cell coefficients on `H` with smoothness `s + 1/p` in +dimension `n` is the local means quasi-norm of `g` with smoothness `s`, since +`(s + 1/p) - n/p = s - (n-1)/p`. -/ +theorem coeffNorm_cellCoef_eq (hp : p ≠ ∞) (Lh : ℕ) (s : ℝ) (q : ℝ≥0∞) + (g : Lp ℂ p (volume : Measure Ω.hyperplane)) : + coeffNorm p (finrank ℝ V) (s + 1 / p.toReal) q + (fun j => cellCoef p j (Ω.graphBump.localMean hp Lh j g)) = + Ω.graphBump.localMeansNorm hp Lh s q g := by + have hp0 : p ≠ 0 := (zero_lt_one.trans_le (Fact.out : 1 ≤ p)).ne' + rw [coeffNorm, LocalMeansBump.localMeansNorm] + congr 1 + funext j + rw [levelNorm_cellCoef hp0 hp (Lp.memLp _) j, ← Lp.eNorm_def, ← mul_assoc, + ← ENNReal.dyadicWeight_add, Ω.finrank_hyperplane_eq] + congr 2 + ring + +/-- **The extension is bounded by the local means**: for a package of extended atoms of order `r` +(`Rd.LipschitzGraph.HasExtensionAtoms`), `s > 0`, `s + 1/p < r` and every `g` with a finite local +means quasi-norm, +`‖E g‖_p + ‖(2^(k(s+1/p)) ω_r(E g, 2^(-k))_p)_k‖_{ℓ_q} ≤ K ‖(2^(js) ‖k_j ⋆ g‖_p)_j‖_{ℓ_q}` with +`K = Rd.atomSynthConst p N C r (s + 1/p) r`, by the atomic synthesis on `V` +(`Rd.modNorm_le_coeffNorm`). -/ +theorem modNorm_graphExtension_le_localMeansNorm (hp : p ≠ ∞) (Lh : ℕ) {r : ℕ} {d : ℝ} + {C : ℝ≥0∞} {N : ℕ} (hat : Ω.HasExtensionAtoms p Lh r d C N) {s : ℝ} (hs : 0 < s) + (hsr : s + 1 / p.toReal < r) {q : ℝ≥0∞} (hq : 1 ≤ q) + {g : Lp ℂ p (volume : Measure Ω.hyperplane)} + (hX : Ω.graphBump.localMeansNorm hp Lh s q g < ∞) : + ‖Ω.graphExtension hp Lh g‖ₑ + lqNorm q (fun k => + dyadicWeight (s + 1 / p.toReal) k * lpModulus p r (Ω.graphExtension hp Lh g) k) ≤ + atomSynthConst p N C r (s + 1 / p.toReal) r * Ω.graphBump.localMeansNorm hp Lh s q g := by + have hσ0 : 0 < s + 1 / p.toReal := by positivity + have hsyn := modNorm_le_coeffNorm hp (fun j m => Ω.extendCenter j (cellCenter j m)) + (fun j m => Ω.extendAtom j (cellAtom p (Ω.graphBump.dual Lh j) j + (Ω.graphBump.localMean hp Lh j g) m)) + (fun j => cellCoef p j (Ω.graphBump.localMean hp Lh j g)) + (fun j x S hS => (hat j (Lp.memLp _)).2 x S hS) + (fun j m => (hat j (Lp.memLp _)).1 m) + (fun j => (Ω.traceExtTerm_ae hp Lh j g).mono fun x hx => + hx.trans (Ω.extLevel_eq_tsum hp Lh j g x)) + (((Ω.summable_traceExtTerm hp Lh hs hq hX).hasSum.tendsto_sum_nat).comp + (tendsto_add_atTop_nat 1)) hσ0 hsr hq + rwa [coeffNorm_cellCoef_eq] at hsyn + +/-- **The extension is bounded by the moduli of `g`**: for a package of extended atoms of order +`r`, `s > 0`, `s + 1/p < r` and every `g` with a finite right side, +`‖E g‖_p + ‖(2^(k(s+1/p)) ω_r(E g, 2^(-k))_p)_k‖_{ℓ_q} ≤ +K (‖g‖_{L_p(H)} + ‖(2^(ks) ω_{Lh}(g, 2^(-k))_p)_k‖_{ℓ_q})` with +`K = Rd.atomSynthConst p N C r (s + 1/p) r · upperConst Lh s` +(`Rd.LipschitzGraph.modNorm_graphExtension_le_localMeansNorm`, +`Rd.LocalMeansBump.localMeansNorm_le`). -/ +theorem modNorm_graphExtension_le_of_atoms (hp : p ≠ ∞) (Lh : ℕ) {r : ℕ} {d : ℝ} + {C : ℝ≥0∞} {N : ℕ} (hat : Ω.HasExtensionAtoms p Lh r d C N) {s : ℝ} (hs : 0 < s) + (hsr : s + 1 / p.toReal < r) {q : ℝ≥0∞} (hq : 1 ≤ q) + {g : Lp ℂ p (volume : Measure Ω.hyperplane)} + (hg : ‖g‖ₑ + lqNorm q (fun k => dyadicWeight s k * lpModulus p Lh g k) < ∞) : + ‖Ω.graphExtension hp Lh g‖ₑ + lqNorm q (fun k => + dyadicWeight (s + 1 / p.toReal) k * lpModulus p r (Ω.graphExtension hp Lh g) k) ≤ + atomSynthConst p N C r (s + 1 / p.toReal) r * Ω.graphBump.upperConst Lh s * + (‖g‖ₑ + lqNorm q (fun k => dyadicWeight s k * lpModulus p Lh g k)) := by + have hLM := Ω.graphBump.localMeansNorm_le hp Lh s hq g + rw [mul_assoc] + exact (Ω.modNorm_graphExtension_le_localMeansNorm hp Lh hat hs hsr hq (hLM.trans_lt + (ENNReal.mul_lt_top (Ω.graphBump.upperConst_ne_top Lh s).lt_top hg))).trans + (mul_le_mul' le_rfl hLM) + +/-- **The extension is bounded** (Schneider–Vybíral, Theorem 4.10, for `p ≥ 1`): for `0 < s < 1` +there is `K < ∞` with +`‖E g‖_p + ‖(2^(k(s+1/p)) ω_2(E g, 2^(-k))_p)_k‖_{ℓ_q} ≤ +K (‖g‖_{L_p(H)} + ‖(2^(ks) ω_1(g, 2^(-k))_p)_k‖_{ℓ_q})` for the extension of moment order `1`, by +the atomic synthesis on `V` with the extended atoms of order `2`. -/ +theorem modNorm_graphExtension_le (hp : p ≠ ∞) {s : ℝ} (hs : 0 < s) (hs1 : s < 1) {q : ℝ≥0∞} + (hq : 1 ≤ q) : + ∃ K : ℝ≥0∞, K ≠ ∞ ∧ ∀ g : Lp ℂ p (volume : Measure Ω.hyperplane), + ‖g‖ₑ + lqNorm q (fun k => dyadicWeight s k * lpModulus p 1 g k) < ∞ → + ‖Ω.graphExtension hp 1 g‖ₑ + lqNorm q (fun k => + dyadicWeight (s + 1 / p.toReal) k * lpModulus p 2 (Ω.graphExtension hp 1 g) k) ≤ + K * (‖g‖ₑ + lqNorm q (fun k => dyadicWeight s k * lpModulus p 1 g k)) := by + obtain ⟨C, N, hC, hat⟩ := Ω.exists_extension_atoms (p := p) 1 + have hsr := add_one_div_toReal_lt hp hs1 (le_refl 2) + exact ⟨_, ENNReal.mul_ne_top (atomSynthConst_ne_top Fact.out N hC 2 (by positivity) hsr) + (Ω.graphBump.upperConst_ne_top 1 s), + fun g hg => Ω.modNorm_graphExtension_le_of_atoms hp 1 hat hs hsr hq hg⟩ + +end Extension + +/-! ### The trace of the extension -/ + +section TraceExtension + +variable {p : ℝ≥0∞} [Fact (1 ≤ p)] + +/-- A finite norm of order `L` on `V` gives a finite intrinsic norm of order `L` on `Ω`. -/ +theorem intrinsicNorm_lt_top_of_modNorm (hp : p ≠ ∞) (L : ℕ) {σ : ℝ} {q : ℝ≥0∞} (hq : 1 ≤ q) + {G : Lp ℂ p (volume : Measure V)} + (hG : ‖G‖ₑ + lqNorm q (fun k => dyadicWeight σ k * lpModulus p L G k) < ∞) : + modNormOn Ω.measurableSet_domain L σ q G < ∞ ∧ + Ω.intrinsicNorm hp L σ q G < ∞ := by + have h1 := (Ω.modNormOn_le_modNorm L σ q rfl).trans_lt hG + exact ⟨h1, Ω.intrinsicNorm_lt_top hp L σ hq h1⟩ + +/-- **The extension has a finite norm of every order `L ≥ 2`**: for `1 ≤ p < ∞`, `0 < s < 1`, +`1 ≤ q ≤ ∞` and `g ∈ B^s_{p,q}(H)`, the extension of moment order `1` has +`‖E g‖_p + ‖(2^(k(s+1/p)) ω_L(E g, 2^(-k))_p)_k‖_{ℓ_q} < ∞` +(`Rd.LipschitzGraph.modNorm_graphExtension_le`, `Rd.modNorm_order_le_of_le`). -/ +theorem modNorm_graphExtension_lt_top (hp : p ≠ ∞) {L : ℕ} (hL : 2 ≤ L) {s : ℝ} (hs : 0 < s) + (hs1 : s < 1) {q : ℝ≥0∞} (hq : 1 ≤ q) {g : Lp ℂ p (volume : Measure Ω.hyperplane)} + (hg : ‖g‖ₑ + lqNorm q (fun k => dyadicWeight s k * lpModulus p 1 g k) < ∞) : + ‖Ω.graphExtension hp 1 g‖ₑ + lqNorm q (fun k => + dyadicWeight (s + 1 / p.toReal) k * lpModulus p L (Ω.graphExtension hp 1 g) k) < ∞ := by + obtain ⟨K, hK, hle⟩ := Ω.modNorm_graphExtension_le hp hs hs1 hq + exact (modNorm_order_le_of_le hL _ q _).trans_lt (ENNReal.mul_lt_top (by simp) + ((hle g hg).trans_lt (ENNReal.mul_lt_top hK.lt_top hg))) + +/-- **One level of the extension**: for a package of extended atoms of order `r`, `0 < σ < r`, +`1 ≤ q ≤ ∞`, `g ∈ L_p(H)` and every level `j`, +`‖F_j‖_p + ‖(2^(kσ) ω_r(F_j, 2^(-k))_p)_k‖_{ℓ_q} ≤ K_σ 2^(j(σ - 1/p)) ‖k_j ⋆ g‖_p` with +`K_σ = Rd.atomSynthConst p N C r σ r`: the level is a sum of the extended atoms +(`Rd.modNorm_level_le`). -/ +theorem modNorm_traceExtTerm_le (hp : p ≠ ∞) (Lh : ℕ) {r : ℕ} {d : ℝ} {C : ℝ≥0∞} {N : ℕ} + (hat : Ω.HasExtensionAtoms p Lh r d C N) {σ : ℝ} (hσ : 0 < σ) (hσr : σ < r) {q : ℝ≥0∞} + (hq : 1 ≤ q) (g : Lp ℂ p (volume : Measure Ω.hyperplane)) (j : ℕ) : + ‖Ω.traceExtTerm hp Lh j g‖ₑ + lqNorm q (fun k => + dyadicWeight σ k * lpModulus p r (Ω.traceExtTerm hp Lh j g) k) ≤ + atomSynthConst p N C r σ r * + (dyadicWeight (σ - 1 / p.toReal) j * ‖Ω.graphBump.localMean hp Lh j g‖ₑ) := by + have hp0 : p ≠ 0 := (zero_lt_one.trans_le (Fact.out : 1 ≤ p)).ne' + obtain ⟨hat, hN⟩ := hat j (Lp.memLp (Ω.graphBump.localMean hp Lh j g)) + refine (modNorm_level_le hp j (fun m => Ω.extendCenter j (cellCenter j m)) + (fun m => Ω.extendAtom j (cellAtom p (Ω.graphBump.dual Lh j) j + (Ω.graphBump.localMean hp Lh j g) m)) (cellCoef p j (Ω.graphBump.localMean hp Lh j g)) + hN hat ((Ω.traceExtTerm_ae hp Lh j g).mono fun x hx => + hx.trans (Ω.extLevel_eq_tsum hp Lh j g x)) hσ hσr hq).trans_eq ?_ + rw [levelNorm_cellCoef hp0 hp (Lp.memLp _) j, ← Lp.eNorm_def] + congr 1 + rw [← mul_assoc, ← ENNReal.dyadicWeight_add, Ω.finrank_hyperplane_eq] + congr 2 + ring + +/-- **The traces of the partial sums of the extension** are the partial sums of the reproducing +formula on `H`: for `L ≥ 1`, `s > 0` and partial sums with a finite norm with moduli of order `L` +and smoothness `s + 1/p`, `Tr (∑_{j ≤ J} F_j) = ∑_{j ≤ J} η_j ⋆ (k_j ⋆ g)`, since the partial sums +are continuous with the values `∑_{j ≤ J} (η_j ⋆ (k_j ⋆ g))(x')` on the graph +(`Rd.LipschitzGraph.trace_ae_eq_comp_graphMap`). -/ +theorem trace_sum_traceExtTerm (hp : p ≠ ∞) {L : ℕ} (hL : 1 ≤ L) (Lh : ℕ) {s : ℝ} (hs : 0 < s) + {q : ℝ≥0∞} (hq : 1 ≤ q) (g : Lp ℂ p (volume : Measure Ω.hyperplane)) (J : ℕ) + (hFJ : ‖∑ j ∈ Finset.range (J + 1), Ω.traceExtTerm hp Lh j g‖ₑ + lqNorm q (fun k => + dyadicWeight (s + 1 / p.toReal) k * + lpModulus p L (∑ j ∈ Finset.range (J + 1), Ω.traceExtTerm hp Lh j g) k) < ∞) : + Ω.trace hp L (∑ j ∈ Finset.range (J + 1), Ω.traceExtTerm hp Lh j g) = + ∑ j ∈ Finset.range (J + 1), + convLp hp (Ω.graphBump.integrable_dual Lh j) (Ω.graphBump.localMean hp Lh j g) := by + have hcont : Continuous fun x => ∑ j ∈ Finset.range (J + 1), Ω.extLevel hp Lh j g x := + continuous_finsetSum _ fun j _ => Ω.continuous_extLevel hp Lh j g + have hae : ((∑ j ∈ Finset.range (J + 1), Ω.traceExtTerm hp Lh j g : + Lp ℂ p (volume : Measure V)) : V → ℂ) =ᵐ[volume] + fun x => ∑ j ∈ Finset.range (J + 1), Ω.extLevel hp Lh j g x := by + filter_upwards [Lp.coeFn_fun_finsetSum (Finset.range (J + 1)) + (fun j => Ω.traceExtTerm hp Lh j g), ae_all_iff.2 fun j => Ω.traceExtTerm_ae hp Lh j g] + with x hx1 hx2 + rw [hx1] + exact Finset.sum_congr rfl fun j _ => hx2 j + have htr := Ω.trace_ae_eq_comp_graphMap hp hL hs hq + (Ω.intrinsicNorm_lt_top_of_modNorm hp L hq hFJ).1 hcont hae + refine Lp.ext ?_ + filter_upwards [htr, Lp.coeFn_fun_finsetSum (Finset.range (J + 1)) + (fun j => convLp hp (Ω.graphBump.integrable_dual Lh j) (Ω.graphBump.localMean hp Lh j g)), + ae_all_iff.2 fun j => convLp_apply_ae hp (Ω.graphBump.integrable_dual Lh j) + (Ω.graphBump.localMean hp Lh j g)] with x' h1 h2 h3 + rw [h1, h2, Function.comp_apply] + refine Finset.sum_congr rfl fun j _ => ?_ + rw [h3 j, extLevel, Ω.extendAtom_graphMap] + rfl + +/-- **One level of the extension in `B^{1/p}_{p,1}` of order `L`**: for a package of extended +atoms of order `r ≤ L`, `s > 0` with `s + 1/p < r` and every level `j`, +`‖F_j‖_p + ‖(2^(k/p) ω_L(F_j, 2^(-k))_p)_k‖_{ℓ_1} ≤ 2^(L-r) K_{1/p} ‖k_j ⋆ g‖_p` with +`K_{1/p} = Rd.atomSynthConst p N C r (1/p) r` (`Rd.LipschitzGraph.modNorm_traceExtTerm_le`, +`Rd.modNorm_order_le_of_le`). -/ +theorem modNorm_one_traceExtTerm_le (hp : p ≠ ∞) (Lh : ℕ) {r L : ℕ} (hrL : r ≤ L) {d : ℝ} + {C : ℝ≥0∞} {N : ℕ} (hat : Ω.HasExtensionAtoms p Lh r d C N) {s : ℝ} (hs : 0 < s) + (hsr : s + 1 / p.toReal < r) (g : Lp ℂ p (volume : Measure Ω.hyperplane)) (j : ℕ) : + ‖Ω.traceExtTerm hp Lh j g‖ₑ + lqNorm 1 (fun k => dyadicWeight (1 / p.toReal) k * + lpModulus p L (Ω.traceExtTerm hp Lh j g) k) ≤ + 2 ^ (L - r) * atomSynthConst p N C r (1 / p.toReal) r * + ‖Ω.graphBump.localMean hp Lh j g‖ₑ := by + refine (modNorm_order_le_of_le hrL _ 1 _).trans ?_ + rw [mul_assoc] + refine mul_le_mul' le_rfl ((Ω.modNorm_traceExtTerm_le hp Lh hat (one_div_toReal_pos hp) + (by linarith) le_rfl g j).trans_eq ?_) + rw [sub_self, ENNReal.dyadicWeight_zero_left, one_mul] + +/-- **The finite norms along the extension**: for a package of extended atoms of order `r ≤ L` +with constant `C < ∞`, `s > 0` with `s + 1/p < r` and a finite local means quasi-norm of `g`, the +extension and its partial sums have finite norms with moduli of order `L` and smoothness `s + 1/p` +(`Rd.LipschitzGraph.modNorm_graphExtension_le_localMeansNorm`, +`Rd.LipschitzGraph.modNorm_traceExtTerm_le`, `Rd.modNorm_order_le_of_le`). -/ +theorem modNorm_graphExtension_lt_top_of_atoms (hp : p ≠ ∞) (Lh : ℕ) {r L : ℕ} (hrL : r ≤ L) + {d : ℝ} {C : ℝ≥0∞} {N : ℕ} (hC : C ≠ ∞) (hat : Ω.HasExtensionAtoms p Lh r d C N) {s : ℝ} + (hs : 0 < s) (hsr : s + 1 / p.toReal < r) {q : ℝ≥0∞} (hq : 1 ≤ q) + {g : Lp ℂ p (volume : Measure Ω.hyperplane)} + (hX : Ω.graphBump.localMeansNorm hp Lh s q g < ∞) : + (‖Ω.graphExtension hp Lh g‖ₑ + lqNorm q (fun k => + dyadicWeight (s + 1 / p.toReal) k * lpModulus p L (Ω.graphExtension hp Lh g) k) < ∞) ∧ + ∀ J, ‖∑ j ∈ Finset.range (J + 1), Ω.traceExtTerm hp Lh j g‖ₑ + lqNorm q (fun k => + dyadicWeight (s + 1 / p.toReal) k * + lpModulus p L (∑ j ∈ Finset.range (J + 1), Ω.traceExtTerm hp Lh j g) k) < ∞ := by + have hp1 : 1 ≤ p := Fact.out + have hσ0 : 0 < s + 1 / p.toReal := by positivity + have hfinT : ∀ j, ‖Ω.traceExtTerm hp Lh j g‖ₑ + lqNorm q (fun k => + dyadicWeight (s + 1 / p.toReal) k * lpModulus p r (Ω.traceExtTerm hp Lh j g) k) < ∞ := + fun j => (Ω.modNorm_traceExtTerm_le hp Lh hat hσ0 hsr hq g j).trans_lt (ENNReal.mul_lt_top + (atomSynthConst_ne_top hp1 N hC r hσ0 hsr).lt_top (ENNReal.mul_lt_top + (ENNReal.dyadicWeight_lt_top _ _) eNorm_lt_top)) + exact ⟨(modNorm_order_le_of_le hrL _ q _).trans_lt (ENNReal.mul_lt_top (by simp) + ((Ω.modNorm_graphExtension_le_localMeansNorm hp Lh hat hs hsr hq hX).trans_lt + (ENNReal.mul_lt_top (atomSynthConst_ne_top hp1 N hC r hσ0 hsr).lt_top hX))), + fun J => (modNorm_order_le_of_le hrL _ q _).trans_lt (ENNReal.mul_lt_top (by simp) + (modNorm_finsetSum_lt_top (Finset.range (J + 1)) (fun j => Ω.traceExtTerm hp Lh j g) hq + fun j _ => hfinT j))⟩ + +/-- **The trace of the extension, from a package of extended atoms**: for a package of extended +atoms of order `r ≤ L` with constant `C < ∞` (`Rd.LipschitzGraph.HasExtensionAtoms`), `Lh ≥ 1`, +`s > 0` with `s + 1/p < r` and `g ∈ L_p(H)` with a finite local means quasi-norm +`‖(2^(js) ‖k_j ⋆ g‖_p)_j‖_{ℓ_q}`, `Tr (E g) = g`. The partial sums `∑_{j ≤ J} F_j` are continuous +with traces `∑_{j ≤ J} η_j ⋆ (k_j ⋆ g) → g` (`Rd.LipschitzGraph.trace_sum_traceExtTerm`), and they +converge to `E g` in `B^{1/p}_{p,1}` with order `L`, where the trace is continuous +(`Rd.LipschitzGraph.tendsto_trace_of_modNorm_sub_le`). -/ +theorem trace_graphExtension_of_atoms (hp : p ≠ ∞) {Lh : ℕ} (hLh : 1 ≤ Lh) {r L : ℕ} + (hrL : r ≤ L) {d : ℝ} {C : ℝ≥0∞} {N : ℕ} (hC : C ≠ ∞) (hat : Ω.HasExtensionAtoms p Lh r d C N) + {s : ℝ} (hs : 0 < s) (hsr : s + 1 / p.toReal < r) {q : ℝ≥0∞} (hq : 1 ≤ q) + {g : Lp ℂ p (volume : Measure Ω.hyperplane)} + (hX : Ω.graphBump.localMeansNorm hp Lh s q g < ∞) : + Ω.trace hp L (Ω.graphExtension hp Lh g) = g := by + have hL : 1 ≤ L := (one_le_of_add_one_div_toReal_lt hs hsr).trans hrL + set T : ℕ → Lp ℂ p (volume : Measure V) := fun j => Ω.traceExtTerm hp Lh j g + have hsum : Summable T := Ω.summable_traceExtTerm hp Lh hs hq hX + obtain ⟨hF, hFJ⟩ := Ω.modNorm_graphExtension_lt_top_of_atoms hp Lh hrL hC hat hs hsr hq hX + set K1 := 2 ^ (L - r) * atomSynthConst p N C r (1 / p.toReal) r + have hK1 : K1 ≠ ∞ := ENNReal.mul_ne_top (by simp) (atomSynthConst_ne_top Fact.out N hC r + (one_div_toReal_pos hp) (by linarith)) + -- the tails tend to `0` + have hhsum : ∑' j, K1 * ‖Ω.graphBump.localMean hp Lh j g‖ₑ ≠ ∞ := by + rw [ENNReal.tsum_mul_left] + exact ENNReal.mul_ne_top hK1 (ne_top_of_le_ne_top + (ENNReal.mul_ne_top (ENNReal.one_sub_two_rpow_neg_inv_ne_top hs) hX.ne) + (ENNReal.tsum_le_lqNorm_dyadicWeight hq s _)) + have htail : Tendsto (fun J => ∑' i, K1 * ‖Ω.graphBump.localMean hp Lh (i + (J + 1)) g‖ₑ) + atTop (𝓝 0) := (ENNReal.tendsto_sum_nat_add _ hhsum).comp (tendsto_add_atTop_nat 1) + -- the traces of the partial sums converge to the trace of the extension + have hsplit : ∀ J, Ω.graphExtension hp Lh g - ∑ j ∈ Finset.range (J + 1), T j = + ∑' i, T (i + (J + 1)) := fun J => by + rw [graphExtension, ← hsum.sum_add_tsum_nat_add (J + 1)] + abel + have hconv := Ω.tendsto_trace_of_modNorm_sub_le hp L hs hq + (Ω.intrinsicNorm_lt_top_of_modNorm hp L hq hF).2 + (fun J => (Ω.intrinsicNorm_lt_top_of_modNorm hp L hq (hFJ J)).2) htail + (fun J => ne_top_of_le_ne_top hhsum (tsum_comp_le_tsum_of_injective + (add_left_injective (J + 1)) fun j => K1 * ‖Ω.graphBump.localMean hp Lh j g‖ₑ)) + fun J => by + rw [hsplit J] + exact (modNorm_one_tsum_le L (1 / p.toReal) ((summable_nat_add_iff (J + 1)).2 hsum)).trans + (tsum_le_tsum fun i => + Ω.modNorm_one_traceExtTerm_le hp Lh hrL hat hs hsr g (i + (J + 1))) + -- the traces of the partial sums are the partial sums of the reproducing formula on `H` + have hpart : ∀ J, Ω.trace hp L (∑ j ∈ Finset.range (J + 1), T j) = + ∑ j ∈ Finset.range (J + 1), + convLp hp (Ω.graphBump.integrable_dual Lh j) (Ω.graphBump.localMean hp Lh j g) := fun J => + Ω.trace_sum_traceExtTerm hp hL Lh hs hq g J (hFJ J) + have hlim := Ω.graphBump.tendsto_sum_dual_localMean hp hLh g + simp_rw [← hpart] at hlim + exact tendsto_nhds_unique hconv hlim + +/-- **The trace of the extension** (Schneider–Vybíral, Theorem 4.11, for `p ≥ 1`): for +`0 < s < 1`, `L ≥ 2` and `g ∈ L_p(H)` with `‖g‖_p + ‖(2^(ks) ω_1(g, 2^(-k))_p)_k‖_{ℓ_q} < ∞`, +the extension of moment order `1` has `Tr (E g) = g`, from the extended atoms of order `2` +(`Rd.LipschitzGraph.exists_extension_atoms`, `Rd.LipschitzGraph.trace_graphExtension_of_atoms`). -/ +theorem trace_graphExtension (hp : p ≠ ∞) {L : ℕ} (hL : 2 ≤ L) {s : ℝ} (hs : 0 < s) (hs1 : s < 1) + {q : ℝ≥0∞} (hq : 1 ≤ q) {g : Lp ℂ p (volume : Measure Ω.hyperplane)} + (hg : ‖g‖ₑ + lqNorm q (fun k => dyadicWeight s k * lpModulus p 1 g k) < ∞) : + Ω.trace hp L (Ω.graphExtension hp 1 g) = g := by + obtain ⟨C, N, hC, hat⟩ := Ω.exists_extension_atoms (p := p) 1 + exact Ω.trace_graphExtension_of_atoms hp le_rfl hL hC hat hs + (add_one_div_toReal_lt hp hs1 (le_refl 2)) hq + ((Ω.graphBump.localMeansNorm_le hp 1 s hq g).trans_lt + (ENNReal.mul_lt_top (Ω.graphBump.upperConst_ne_top 1 s).lt_top hg)) + +/-- **The trace space of a Lipschitz graph domain** (Schneider–Vybíral, Theorem 4.11, for +`p ≥ 1`): for `1 ≤ p < ∞`, `0 < s < 1`, `1 ≤ q ≤ ∞` and `L ≥ 2`, `g ∈ L_p(H)` is the trace of some +`f` with `‖f‖_{L_p(Ω)} + ‖(2^(k(s+1/p)) ω_L(f, 2^(-k), Ω)_p)_k‖_{ℓ_q} < ∞` iff +`‖g‖_p + ‖(2^(ks) ω_1(g, 2^(-k))_p)_k‖_{ℓ_q} < ∞`. The trace is bounded +(`Rd.LipschitzGraph.modNorm_trace_le`), and `E g` is such an `f` +(`Rd.LipschitzGraph.trace_graphExtension`). -/ +theorem exists_trace_eq_iff (hp : p ≠ ∞) {L : ℕ} (hL : 2 ≤ L) {s : ℝ} (hs : 0 < s) (hs1 : s < 1) + {q : ℝ≥0∞} (hq : 1 ≤ q) (g : Lp ℂ p (volume : Measure Ω.hyperplane)) : + (∃ f : Lp ℂ p (volume : Measure V), + modNormOn Ω.measurableSet_domain L (s + 1 / p.toReal) q f < ∞ ∧ Ω.trace hp L f = g) ↔ + ‖g‖ₑ + lqNorm q (fun k => dyadicWeight s k * lpModulus p 1 g k) < ∞ := by + constructor + · rintro ⟨f, hf, rfl⟩ + obtain ⟨K, hK, hle⟩ := Ω.modNorm_trace_le hp L hs hs1 hq + exact (hle f hf).trans_lt (ENNReal.mul_lt_top hK.lt_top hf) + · intro hg + obtain ⟨K, hK, hle⟩ := Ω.modNorm_graphExtension_le hp hs hs1 hq + exact ⟨Ω.graphExtension hp 1 g, (Ω.intrinsicNorm_lt_top_of_modNorm hp L hq + (Ω.modNorm_graphExtension_lt_top hp hL hs hs1 hq hg)).1, + Ω.trace_graphExtension hp hL hs hs1 hq hg⟩ + +end TraceExtension + +end LipschitzGraph + +end Rd diff --git a/LeanPool/FunctionSpaces/Domains/Traces/HalfSpaceTrace.lean b/LeanPool/FunctionSpaces/Domains/Traces/HalfSpaceTrace.lean new file mode 100644 index 0000000000..9b9d3ce691 --- /dev/null +++ b/LeanPool/FunctionSpaces/Domains/Traces/HalfSpaceTrace.lean @@ -0,0 +1,493 @@ +/- +Copyright (c) 2026 Mario Ullrich. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Mario Ullrich +-/ +module + +public import LeanPool.FunctionSpaces.Domains.Lipschitz.HalfSpace +public import LeanPool.FunctionSpaces.Domains.Traces.GraphTraceCharts + +/- +Modified for Lean Pool: module names and imports adapted. +-/ + +/-! +# Traces of every order on the half-space + +For the flat graph domain `Ω = {x : 0 < ⟪x, e⟫}` (`Rd.LipschitzGraph.flat`) the graph map is the +inclusion of `H = e^⊥` (`Rd.LipschitzGraph.flat_graphMap`), so the restrictions of smooth atoms +to `H` are smooth atoms of the same order (`Rd.LipschitzGraph.isSmoothAtom_comp_graphMap_flat`). +The trace atoms are therefore regular atoms of every order and exponent +(`Rd.LipschitzGraph.exists_trace_atoms_flat`), and the trace theorem holds for every `s > 0`: + +`‖Tr f‖_{L_p(H)} + ‖(2^(ks) ω_r(Tr f, 2^(-k))_p)_k‖_{ℓ_q} + ≤ K (‖f‖_{L_p(Ω)} + ‖(2^(k(s+1/p)) ω_L(f, 2^(-k), Ω)_p)_k‖_{ℓ_q})` (`r > s`) + +(`Rd.LipschitzGraph.modNorm_trace_le_flat`), where the Lipschitz case allows only `s < 1`. + +**The extension of every order.** The extension `A(x) = a(Px) χ(2^j ⟪x, e⟫)` of a smooth atom on +`H` is a smooth atom on `V` of the same order +(`Rd.LipschitzGraph.exists_isSmoothAtom_extendAtom_flat`; for the flat graph the vertical cut-off +is `χ(2^j ⟪x, e⟫)`, `Rd.LipschitzGraph.vertCutoff_flat`). +The extended atoms therefore form packages of extended atoms of every order +(`Rd.LipschitzGraph.exists_flat_extension_atoms`). With the terms `g_j = η_j ⋆ (k_j ⋆ g)` of the +reproducing formula on `H` of moment order `Lh`, the extension of the graph domain +(`Rd.LipschitzGraph.graphExtension`) is `E g = ∑_j g_j(Px) χ(2^j ⟪x, e⟫)` and satisfies, for +`s > 0` and `s + 1/p < r`, + +`‖E g‖_p + ‖(2^(k(s+1/p)) ω_r(E g, 2^(-k))_p)_k‖_{ℓ_q} + ≤ K (‖g‖_{L_p(H)} + ‖(2^(ks) ω_{Lh}(g, 2^(-k))_p)_k‖_{ℓ_q})` + +(`Rd.LipschitzGraph.modNorm_flatExtension_le`), and `Tr (E g) = g` +(`Rd.LipschitzGraph.trace_flatExtension`). Hence `B^s_{p,q}(H)` is the trace space of +`B^{s+1/p}_{p,q}` of the half-space for every `s > 0` +(`Rd.LipschitzGraph.exists_trace_eq_iff_flat`). The extension of the Lipschitz case uses moment +order `1` on `H` and reaches only `s < 1`; here the moment order `Lh > s` matches the smoothness. + +**Functions continuous on the closed half-space** have their restrictions as traces +(`Rd.trace_ae_eq_of_continuousOn`): the folding `x ↦ x + (|⟪x, e⟫| - ⟪x, e⟫) e` +(`Rd.foldHalfSpace`) extends them continuously to `V`. +-/ + +@[expose] public section + +open MeasureTheory Filter Topology Module Metric Set +open scoped ENNReal NNReal + +open ENNReal (lqNorm dyadicWeight) + +namespace Rd + +/-- **Derivatives of a composition with a linear map**: +`‖D^i (f ∘ L)(x)‖ ≤ ‖D^i f(L x)‖ ‖L‖^i`. -/ +theorem norm_iteratedFDeriv_comp_clm_le {E F G : Type*} [NormedAddCommGroup E] [NormedSpace ℝ E] + [NormedAddCommGroup F] [NormedSpace ℝ F] [NormedAddCommGroup G] [NormedSpace ℝ G] + (L : G →L[ℝ] E) {f : E → F} {n : WithTop ℕ∞} (hf : ContDiff ℝ n f) (x : G) {i : ℕ} + (hi : (i : WithTop ℕ∞) ≤ n) : + ‖iteratedFDeriv ℝ i (f ∘ L) x‖ ≤ ‖iteratedFDeriv ℝ i f (L x)‖ * ‖L‖ ^ i := by + rw [L.iteratedFDeriv_comp_right hf x hi] + refine (ContinuousMultilinearMap.norm_compContinuousLinearMap_le _ _).trans_eq ?_ + rw [Finset.prod_const, Finset.card_univ, Fintype.card_fin] + +namespace LipschitzGraph + +variable {V : Type*} [NormedAddCommGroup V] [InnerProductSpace ℝ V] [FiniteDimensional ℝ V] + [MeasurableSpace V] [BorelSpace V] (e : V) (he : ‖e‖ = 1) + +/-! ### Restrictions of smooth atoms to the hyperplane -/ + +omit [FiniteDimensional ℝ V] [MeasurableSpace V] [BorelSpace V] in +/-- The graph map of the flat graph is the inclusion of `H = e^⊥`. -/ +theorem flat_graphMap (x' : (flat e he).hyperplane) : (flat e he).graphMap x' = x' := by + simp [graphMap, flat] + +/-- **Restrictions of smooth atoms to the hyperplane**: for the flat graph, a smooth atom on `V` +of order `K` with centre `c` restricts to a smooth atom on `H` of order `K` with centre `P c`, +the same radius factor and the same constant. -/ +theorem isSmoothAtom_comp_graphMap_flat {K : ℕ} {d A : ℝ} {j : ℕ} {c : V} + {a : V → ℂ} (ha : IsSmoothAtom Set.univ K d A j c a) : + IsSmoothAtom Set.univ K d A j ((flat e he).proj c) (a ∘ (flat e he).graphMap) := by + set Ω := flat e he + set ι : Ω.hyperplane →L[ℝ] V := Ω.hyperplane.subtypeL + have hγ : Ω.graphMap = ι := funext (flat_graphMap e he) + have hι : ‖ι‖ ≤ 1 := ContinuousLinearMap.opNorm_le_bound _ zero_le_one fun x => by simp [ι] + have hac : ContDiff ℝ K a := contDiffOn_univ.1 ha.contDiffOn + have hc : ContDiff ℝ K (a ∘ Ω.graphMap) := by + rw [hγ] + exact hac.comp ι.contDiff + refine ⟨hc.continuous.aestronglyMeasurable, + fun x' hx' => ha.eq_zero _ (hx'.trans_le (Ω.norm_sub_proj_le x' c)), hc.contDiffOn, + fun l hl y _ => ?_⟩ + rw [iteratedFDerivWithin_univ, hγ] + refine (norm_iteratedFDeriv_comp_clm_le ι hac y (by exact_mod_cast hl)).trans ?_ + have h1 := ha.norm_iteratedFDerivWithin_le l hl (ι y) (mem_univ _) + rw [iteratedFDerivWithin_univ] at h1 + calc ‖iteratedFDeriv ℝ l a (ι y)‖ * ‖ι‖ ^ l ≤ (A * 2 ^ (j * l)) * 1 := + mul_le_mul h1 (pow_le_one₀ (ContinuousLinearMap.opNorm_nonneg ι) hι) (by positivity) + ((norm_nonneg _).trans h1) + _ = A * 2 ^ (j * l) := mul_one _ + +/-! ### The trace of every order -/ + +/-- **The trace atoms of every order** on the flat graph: for every order `r ≥ 1` there are a +radius factor `d`, a constant `C < ∞` and an overlap bound `N` such that the restrictions +`a_{j,m} ∘ γ` of the cell atoms of `η_j ⋆ h` are regular atoms on `H` of order and exponent `r` +centred at `P c_{j,m}`, and the centres of the cells meeting `H` have overlap at most `N` +(`Rd.LipschitzGraph.norm_graphMap_sub_cellCenter_le` with `t = r`). -/ +theorem exists_trace_atoms_flat (b : LocalMeansBump V) {p : ℝ≥0∞} (hp1 : 1 ≤ p) (L : ℕ) {r : ℕ} + (hr : 1 ≤ r) : + ∃ (d : ℝ) (C : ℝ≥0∞) (N : ℕ), 0 ≤ d ∧ C ≠ ∞ ∧ ∀ (j : ℕ) {h : V → ℂ}, MemLp h p volume → + (∀ m, IsRegularAtom p r r d C j ((flat e he).proj (cellCenter j m)) + (cellAtom p (b.dual L j) j h m ∘ (flat e he).graphMap)) ∧ + ∀ x' (S : Finset (Fin (finrank ℝ V) → ℤ)), + (∀ m ∈ S, (flat e he).traceCoef b p L j h m ≠ 0 ∧ + ‖x' - (flat e he).proj (cellCenter j m)‖ ≤ (d + r) / 2 ^ j) → S.card ≤ N := by + set Ω := flat e he + obtain ⟨A, hA, hsm⟩ := b.exists_isSmoothAtom_cellAtom hp1 L r + set d := 2 * (L : ℝ) * b.radius + finrank ℝ V with hd_def + have hd : 0 ≤ d := + add_nonneg (mul_nonneg (mul_nonneg zero_le_two (Nat.cast_nonneg L)) b.radius_nonneg) + (Nat.cast_nonneg _) + have hint : (interior (Set.univ : Set Ω.hyperplane)).Nonempty := by + rw [interior_univ] + exact univ_nonempty + refine ⟨d, ENNReal.ofReal (2 ^ r * (r : ℝ) ^ (r + 1) * A) * + (((r + 1 : ℕ) : ℝ≥0∞) * (ENNReal.ofReal (d ^ finrank ℝ Ω.hyperplane) * + volume (ball (0 : Ω.hyperplane) 1))) ^ (1 / p.toReal), + ⌈(2 * (d + (1 + Ω.M) * (2 * d + r)) + 2) ^ finrank ℝ V⌉₊, hd, ?_, + fun j h hh => ⟨fun m => ?_, fun x' S hS => ?_⟩⟩ + · exact ENNReal.mul_ne_top ENNReal.ofReal_ne_top (ENNReal.rpow_ne_top_of_nonneg (by positivity) + (ENNReal.mul_ne_top (ENNReal.natCast_ne_top _) + (ENNReal.mul_ne_top ENNReal.ofReal_ne_top measure_ball_lt_top.ne))) + · exact isRegularAtomOn_of_isSmoothAtom convex_univ MeasurableSet.univ hint hr le_rfl hd hA + (isSmoothAtom_comp_graphMap_flat e he (hsm j hh m)) + · refine card_le_of_norm_sub_cellCenter_le j + (add_nonneg hd (mul_nonneg (by linarith [Ω.M_nonneg]) (by positivity))) (Ω.graphMap x') S + fun m hm => ?_ + obtain ⟨hcoef, hdist⟩ := hS m hm + have hex : ∃ y', cellAtom p (b.dual L j) j h m (Ω.graphMap y') ≠ 0 := by + by_contra hcon + exact hcoef (by simp [traceCoef, hcon]) + exact Ω.norm_graphMap_sub_cellCenter_le (fun y hy => b.dual_eq_zero_of_lt L j hy) hex hdist + +/-- **The trace of a series, of every order**: on the flat graph, for `0 < s < r` there is +`K < ∞` with `‖Tr‖_{L_p(H)} + ‖(2^(ks) ω_r(Tr, 2^(-k))_p)_k‖_{ℓ_q} ≤ +K ‖(2^(j(s+1/p)) ‖h_j‖_p)_j‖_{ℓ_q}` for the trace `Tr = ∑_j (η_j ⋆ h_j) ∘ γ`, from the trace +atoms of order `r` (`Rd.LipschitzGraph.exists_trace_atoms_flat`, +`Rd.LipschitzGraph.modNorm_traceSeries_le_of_atoms`). -/ +theorem modNorm_traceSeries_le_flat (b : LocalMeansBump V) {p : ℝ≥0∞} [Fact (1 ≤ p)] + (hp : p ≠ ∞) (L : ℕ) {r : ℕ} (hr : 1 ≤ r) {s : ℝ} (hs : 0 < s) (hsr : s < r) {q : ℝ≥0∞} + (hq : 1 ≤ q) : + ∃ K : ℝ≥0∞, K ≠ ∞ ∧ ∀ h : ℕ → Lp ℂ p (volume : Measure V), + lqNorm q (fun j => dyadicWeight (s + 1 / p.toReal) j * ‖h j‖ₑ) < ∞ → + ‖(flat e he).traceSeries b hp L h‖ₑ + lqNorm q (fun k => + dyadicWeight s k * lpModulus p r ((flat e he).traceSeries b hp L h) k) ≤ + K * lqNorm q (fun j => dyadicWeight (s + 1 / p.toReal) j * ‖h j‖ₑ) := by + obtain ⟨d, C, N, -, hC, hatoms⟩ := exists_trace_atoms_flat e he b (Fact.out : 1 ≤ p) L hr + exact (flat e he).modNorm_traceSeries_le_of_atoms b hp L hs hsr hq hC hatoms + +/-- **The trace theorem of every order on the half-space**: for `1 ≤ p < ∞`, `0 < s < r` and +`1 ≤ q ≤ ∞` there is `K < ∞` with +`‖Tr f‖_{L_p(H)} + ‖(2^(ks) ω_r(Tr f, 2^(-k))_p)_k‖_{ℓ_q} ≤ +K (‖f‖_{L_p(Ω)} + ‖(2^(k(s+1/p)) ω_L(f, 2^(-k), Ω)_p)_k‖_{ℓ_q})`. -/ +theorem modNorm_trace_le_flat {p : ℝ≥0∞} [Fact (1 ≤ p)] (hp : p ≠ ∞) (L : ℕ) {r : ℕ} + (hr : 1 ≤ r) {s : ℝ} (hs : 0 < s) (hsr : s < r) {q : ℝ≥0∞} (hq : 1 ≤ q) : + ∃ K : ℝ≥0∞, K ≠ ∞ ∧ ∀ f : Lp ℂ p (volume : Measure V), + modNormOn (flat e he).measurableSet_domain L (s + 1 / p.toReal) q f < ∞ → + ‖(flat e he).trace hp L f‖ₑ + + lqNorm q (fun k => dyadicWeight s k * lpModulus p r ((flat e he).trace hp L f) k) ≤ + K * modNormOn (flat e he).measurableSet_domain L (s + 1 / p.toReal) q f := by + set Ω := flat e he + obtain ⟨K, hK, hle⟩ := modNorm_traceSeries_le_flat e he Ω.coneBump hp L hr hs hsr hq + refine ⟨K * Ω.intrinsicConst L, ENNReal.mul_ne_top hK (Ω.intrinsicConst_ne_top L), + fun f hf => ?_⟩ + have hX := Ω.intrinsicNorm_lt_top hp L (s + 1 / p.toReal) hq hf + rw [mul_assoc] + exact (hle (fun j => Ω.cutoff (Ω.coneBump.localMean hp L j f)) hX).trans + (mul_le_mul' le_rfl (Ω.intrinsicNorm_le hp L (s + 1 / p.toReal) hq f)) + +/-! ### Extended atoms of every order -/ + +/-- The mollified graph of the flat graph vanishes. -/ +theorem smoothGraph_flat (j : ℕ) (x' : (flat e he).hyperplane) : + (flat e he).smoothGraph j x' = 0 := by + have h : (flat e he).graphFun = 0 := funext fun x' => by simp [graphFun, flat] + simp [smoothGraph, h, conv, convolution_zero] + +/-- The vertical cut-off of the flat graph is `v_j(x) = χ(2^j ⟪x, e⟫)`. -/ +theorem vertCutoff_flat (j : ℕ) (x : V) : + (flat e he).vertCutoff j x = (flat e he).profile (2 ^ j * inner ℝ x e) := by + rw [vertCutoff, vertCoord, smoothGraph_flat, sub_zero] + rfl + +/-- **Extended atoms of every order**: for the flat graph and every order `K` there is `B ≥ 0` +such that the extension `A(x) = a(Px) χ(2^j ⟪x, e⟫)` of a smooth atom `a` on `H` of order `K`, +level `j`, radius factor `d` and constant `A` is a smooth atom on `V` of order `K` with radius +factor `extendRadius d`, constant `2^K B A` and centre `c'`, by Leibniz's rule. -/ +theorem exists_isSmoothAtom_extendAtom_flat (K : ℕ) : + ∃ B : ℝ, 0 ≤ B ∧ ∀ {d A : ℝ} {j : ℕ} {c' : (flat e he).hyperplane} + {a : (flat e he).hyperplane → ℂ}, 0 ≤ A → IsSmoothAtom Set.univ K d A j c' a → + IsSmoothAtom Set.univ K ((flat e he).extendRadius d) (2 ^ K * B * A) j + ((flat e he).extendCenter j c') ((flat e he).extendAtom j a) := by + set Ω := flat e he + obtain ⟨B₀, hB₀⟩ := exists_iteratedFDeriv_bound Ω.contDiff_profile Ω.hasCompactSupport_profile K + refine ⟨|B₀|, abs_nonneg _, fun {d A j c' a} hA ha => ?_⟩ + set P : V →L[ℝ] Ω.hyperplane := Ω.proj + set ℓ : V →L[ℝ] ℝ := (2 ^ j : ℝ) • innerSL ℝ e + have hℓx : ∀ x, ℓ x = 2 ^ j * inner ℝ x e := fun x => by + simp [ℓ, real_inner_comm] + have hext : Ω.extendAtom j a = fun x => (a ∘ P) x * (Ω.profile ∘ ℓ) x := funext fun x => by + rw [extendAtom, vertCutoff_flat, Function.comp_apply, Function.comp_apply, hℓx] + have hP : ‖P‖ ≤ 1 := ContinuousLinearMap.opNorm_le_bound _ zero_le_one fun x => by + rw [one_mul] + exact Ω.norm_proj_le x + have hℓ : ‖ℓ‖ ≤ 2 ^ j := ContinuousLinearMap.opNorm_le_bound _ (by positivity) fun x => by + rw [hℓx, norm_mul, Real.norm_of_nonneg (by positivity)] + gcongr + exact (norm_inner_le_norm x e).trans (by rw [he, mul_one]) + have hac : ContDiff ℝ K a := contDiffOn_univ.1 ha.contDiffOn + have h1 : ContDiff ℝ K (a ∘ P) := hac.comp P.contDiff + have h2 : ContDiff ℝ K (Ω.profile ∘ ℓ) := + (Ω.contDiff_profile.of_le (by exact_mod_cast le_top)).comp ℓ.contDiff + have hc : ContDiff ℝ K (Ω.extendAtom j a) := by + rw [hext] + exact h1.mul h2 + refine ⟨hc.continuous.aestronglyMeasurable, fun x hx => Ω.extendAtom_eq_zero j ha.eq_zero hx, + hc.contDiffOn, fun l hl y _ => ?_⟩ + have hu : ∀ i ≤ K, ‖iteratedFDeriv ℝ i (a ∘ P) y‖ ≤ A * 2 ^ (j * i) := fun i hi => by + refine (norm_iteratedFDeriv_comp_clm_le P hac y (by exact_mod_cast hi)).trans ?_ + have h := ha.norm_iteratedFDerivWithin_le i hi (P y) (mem_univ _) + rw [iteratedFDerivWithin_univ] at h + calc ‖iteratedFDeriv ℝ i a (P y)‖ * ‖P‖ ^ i ≤ (A * 2 ^ (j * i)) * 1 := + mul_le_mul h (pow_le_one₀ (ContinuousLinearMap.opNorm_nonneg P) hP) (by positivity) + ((norm_nonneg _).trans h) + _ = A * 2 ^ (j * i) := mul_one _ + have hv : ∀ i ≤ K, ‖iteratedFDeriv ℝ i (Ω.profile ∘ ℓ) y‖ ≤ |B₀| * 2 ^ (j * i) := fun i hi => by + refine (norm_iteratedFDeriv_comp_clm_le ℓ Ω.contDiff_profile y + (by exact_mod_cast le_top)).trans ?_ + rw [pow_mul] + exact mul_le_mul ((hB₀ i hi (ℓ y)).trans (le_abs_self _)) + (pow_le_pow_left₀ (ContinuousLinearMap.opNorm_nonneg ℓ) hℓ i) (by positivity) + (abs_nonneg _) + rw [iteratedFDerivWithin_univ, hext] + refine (norm_iteratedFDeriv_mul_le h1 h2 y (by exact_mod_cast hl)).trans ?_ + calc ∑ i ∈ Finset.range (l + 1), (l.choose i : ℝ) * ‖iteratedFDeriv ℝ i (a ∘ P) y‖ * + ‖iteratedFDeriv ℝ (l - i) (Ω.profile ∘ ℓ) y‖ + ≤ ∑ i ∈ Finset.range (l + 1), (l.choose i : ℝ) * (A * |B₀| * 2 ^ (j * l)) := by + refine Finset.sum_le_sum fun i hi => ?_ + have hil : i ≤ l := Nat.lt_succ_iff.1 (Finset.mem_range.1 hi) + rw [mul_assoc] + refine mul_le_mul_of_nonneg_left ?_ (Nat.cast_nonneg _) + calc ‖iteratedFDeriv ℝ i (a ∘ P) y‖ * ‖iteratedFDeriv ℝ (l - i) (Ω.profile ∘ ℓ) y‖ + ≤ (A * 2 ^ (j * i)) * (|B₀| * 2 ^ (j * (l - i))) := + mul_le_mul (hu i (hil.trans hl)) (hv (l - i) ((Nat.sub_le l i).trans hl)) + (norm_nonneg _) (by positivity) + _ = A * |B₀| * 2 ^ (j * l) := by + rw [show j * l = j * i + j * (l - i) by rw [← Nat.mul_add, Nat.add_sub_cancel' hil], + pow_add] + ring + _ = 2 ^ l * (A * |B₀| * 2 ^ (j * l)) := by + rw [← Finset.sum_mul] + have hsum : ∑ i ∈ Finset.range (l + 1), (l.choose i : ℝ) = 2 ^ l := by + exact_mod_cast Nat.sum_range_choose l + rw [hsum] + _ ≤ 2 ^ K * (A * |B₀| * 2 ^ (j * l)) := + mul_le_mul_of_nonneg_right (pow_le_pow_right₀ one_le_two hl) (by positivity) + _ = 2 ^ K * |B₀| * A * 2 ^ (j * l) := by ring + +/-! ### The extension of every order -/ + +section Extension + +variable {p : ℝ≥0∞} [Fact (1 ≤ p)] + +/-- **The extended atoms of every order**: for the flat graph, every moment order `Lh` and every +order `r ≥ 1` there are a radius factor `d`, a constant `C < ∞` and an overlap bound `N` such that +the extensions of the cell atoms on `H` form a package of extended atoms of order `r` +(`Rd.LipschitzGraph.HasExtensionAtoms`): the cell atoms are smooth of order `r`, and so are their +extensions (`Rd.LipschitzGraph.exists_isSmoothAtom_extendAtom_flat`). -/ +theorem exists_flat_extension_atoms (Lh : ℕ) {r : ℕ} (hr : 1 ≤ r) : + ∃ (d : ℝ) (C : ℝ≥0∞) (N : ℕ), C ≠ ∞ ∧ (flat e he).HasExtensionAtoms p Lh r d C N := by + set Ω := flat e he + have hp1 : 1 ≤ p := Fact.out + obtain ⟨A, hA, hsm⟩ := Ω.graphBump.exists_isSmoothAtom_cellAtom hp1 Lh r + obtain ⟨B, hB, hext⟩ := exists_isSmoothAtom_extendAtom_flat e he r + set d := Ω.extendRadius (Ω.extRadiusH Lh) + have hd : 0 ≤ d := Ω.extendRadius_nonneg (Ω.extRadiusH_nonneg Lh) + have hBA : 0 ≤ 2 ^ r * B * A := by positivity + have hint : (interior (Set.univ : Set V)).Nonempty := by + rw [interior_univ] + exact univ_nonempty + refine ⟨d, ENNReal.ofReal (2 ^ r * (r : ℝ) ^ (r + 1) * (2 ^ r * B * A)) * + (((r + 1 : ℕ) : ℝ≥0∞) * (ENNReal.ofReal (d ^ finrank ℝ V) * volume (ball (0 : V) 1))) ^ + (1 / p.toReal), ⌈(2 * (d + r) + 2) ^ finrank ℝ Ω.hyperplane⌉₊, + ENNReal.mul_ne_top ENNReal.ofReal_ne_top (ENNReal.rpow_ne_top_of_nonneg (by positivity) + (ENNReal.mul_ne_top (ENNReal.natCast_ne_top _) + (ENNReal.mul_ne_top ENNReal.ofReal_ne_top measure_ball_lt_top.ne))), + fun j h hh => ⟨fun m => ?_, fun x S hS => ?_⟩⟩ + · exact isRegularAtomOn_of_isSmoothAtom convex_univ MeasurableSet.univ hint hr le_rfl hd hBA + (hext hA (hsm j hh m)) + · refine card_le_of_norm_sub_cellCenter_le j (by positivity) (Ω.proj x) S fun m hm => ?_ + calc ‖Ω.proj x - cellCenter j m‖ = ‖Ω.proj (x - Ω.extendCenter j (cellCenter j m))‖ := by + rw [map_sub, Ω.proj_extendCenter] + _ ≤ ‖x - Ω.extendCenter j (cellCenter j m)‖ := Ω.norm_proj_le _ + _ ≤ (d + r) / 2 ^ j := (hS m hm).2 + +/-- **The extension of every order is bounded by the local means**: for the flat graph, `s > 0` +and `s + 1/p < r` there is `K < ∞` with +`‖E g‖_p + ‖(2^(k(s+1/p)) ω_r(E g, 2^(-k))_p)_k‖_{ℓ_q} ≤ K ‖(2^(js) ‖k_j ⋆ g‖_p)_j‖_{ℓ_q}` for the +extension `E g` of moment order `Lh` (`Rd.LipschitzGraph.graphExtension`), from the extended atoms +of order `r` (`Rd.LipschitzGraph.modNorm_graphExtension_le_localMeansNorm`). -/ +theorem modNorm_flatExtension_le_localMeansNorm (hp : p ≠ ∞) (Lh : ℕ) {r : ℕ} {s : ℝ} + (hs : 0 < s) (hsr : s + 1 / p.toReal < r) {q : ℝ≥0∞} (hq : 1 ≤ q) : + ∃ K : ℝ≥0∞, K ≠ ∞ ∧ ∀ g : Lp ℂ p (volume : Measure (flat e he).hyperplane), + (flat e he).graphBump.localMeansNorm hp Lh s q g < ∞ → + ‖(flat e he).graphExtension hp Lh g‖ₑ + lqNorm q (fun k => dyadicWeight (s + 1 / p.toReal) k * + lpModulus p r ((flat e he).graphExtension hp Lh g) k) ≤ + K * (flat e he).graphBump.localMeansNorm hp Lh s q g := by + obtain ⟨d, C, N, hC, hat⟩ := exists_flat_extension_atoms e he (p := p) Lh + (one_le_of_add_one_div_toReal_lt hs hsr) + exact ⟨_, atomSynthConst_ne_top Fact.out N hC r (by positivity) hsr, fun g hX => + (flat e he).modNorm_graphExtension_le_localMeansNorm hp Lh hat hs hsr hq hX⟩ + +/-- **The extension of every order, bounded by the moduli of `g`**: for the flat graph, `s > 0` +and `s + 1/p < r` there is `K < ∞` with +`‖E g‖_p + ‖(2^(k(s+1/p)) ω_r(E g, 2^(-k))_p)_k‖_{ℓ_q} ≤ +K (‖g‖_{L_p(H)} + ‖(2^(ks) ω_{Lh}(g, 2^(-k))_p)_k‖_{ℓ_q})` for the extension of moment order `Lh` +(`Rd.LipschitzGraph.modNorm_graphExtension_le_of_atoms`). -/ +theorem modNorm_flatExtension_le (hp : p ≠ ∞) (Lh : ℕ) {r : ℕ} {s : ℝ} (hs : 0 < s) + (hsr : s + 1 / p.toReal < r) {q : ℝ≥0∞} (hq : 1 ≤ q) : + ∃ K : ℝ≥0∞, K ≠ ∞ ∧ ∀ g : Lp ℂ p (volume : Measure (flat e he).hyperplane), + ‖g‖ₑ + lqNorm q (fun k => dyadicWeight s k * lpModulus p Lh g k) < ∞ → + ‖(flat e he).graphExtension hp Lh g‖ₑ + lqNorm q (fun k => dyadicWeight (s + 1 / p.toReal) k * + lpModulus p r ((flat e he).graphExtension hp Lh g) k) ≤ + K * (‖g‖ₑ + lqNorm q (fun k => dyadicWeight s k * lpModulus p Lh g k)) := by + obtain ⟨d, C, N, hC, hat⟩ := exists_flat_extension_atoms e he (p := p) Lh + (one_le_of_add_one_div_toReal_lt hs hsr) + exact ⟨_, ENNReal.mul_ne_top (atomSynthConst_ne_top Fact.out N hC r (by positivity) hsr) + ((flat e he).graphBump.upperConst_ne_top Lh s), fun g hg => + (flat e he).modNorm_graphExtension_le_of_atoms hp Lh hat hs hsr hq hg⟩ + +/-- **The trace of the extension of every order**: for the flat graph, `L ≥ 2`, `Lh ≥ 1`, `s > 0` +with `s + 1/p < L` and `g ∈ L_p(H)` with a finite local means quasi-norm +`‖(2^(js) ‖k_j ⋆ g‖_p)_j‖_{ℓ_q}`, the extension of moment order `Lh` has `Tr (E g) = g`, from the +extended atoms of order `L` (`Rd.LipschitzGraph.trace_graphExtension_of_atoms`). -/ +theorem trace_flatExtension (hp : p ≠ ∞) {L : ℕ} (hL : 2 ≤ L) {Lh : ℕ} (hLh : 1 ≤ Lh) {s : ℝ} + (hs : 0 < s) (hsL : s + 1 / p.toReal < L) {q : ℝ≥0∞} (hq : 1 ≤ q) + {g : Lp ℂ p (volume : Measure (flat e he).hyperplane)} + (hX : (flat e he).graphBump.localMeansNorm hp Lh s q g < ∞) : + (flat e he).trace hp L ((flat e he).graphExtension hp Lh g) = g := by + obtain ⟨d, C, N, hC, hat⟩ := exists_flat_extension_atoms e he (p := p) Lh (r := L) (by omega) + exact (flat e he).trace_graphExtension_of_atoms hp hLh le_rfl hC hat hs hsL hq hX + +/-- **The trace space of the half-space, for every smoothness**: for `1 ≤ p < ∞`, `s > 0`, +`1 ≤ q ≤ ∞`, `L ≥ 2` with `s + 1/p < L`, and `r > s`, `g ∈ L_p(H)` is the trace of some `f` with +`‖f‖_{L_p(Ω)} + ‖(2^(k(s+1/p)) ω_L(f, 2^(-k), Ω)_p)_k‖_{ℓ_q} < ∞` iff +`‖g‖_p + ‖(2^(ks) ω_r(g, 2^(-k))_p)_k‖_{ℓ_q} < ∞`. The trace is bounded +(`Rd.LipschitzGraph.modNorm_trace_le_flat`), and the extension of moment order `r` is such an `f` +(`Rd.LipschitzGraph.trace_flatExtension`). -/ +theorem exists_trace_eq_iff_flat (hp : p ≠ ∞) {L : ℕ} (hL : 2 ≤ L) {r : ℕ} {s : ℝ} (hs : 0 < s) + (hsr : s < r) (hsL : s + 1 / p.toReal < L) {q : ℝ≥0∞} (hq : 1 ≤ q) + (g : Lp ℂ p (volume : Measure (flat e he).hyperplane)) : + (∃ f : Lp ℂ p (volume : Measure V), + modNormOn (flat e he).measurableSet_domain L (s + 1 / p.toReal) q f < ∞ ∧ + (flat e he).trace hp L f = g) ↔ + ‖g‖ₑ + lqNorm q (fun k => dyadicWeight s k * lpModulus p r g k) < ∞ := by + have hr : 1 ≤ r := Nat.cast_pos.1 (hs.trans hsr) + constructor + · rintro ⟨f, hf, rfl⟩ + obtain ⟨K, hK, hle⟩ := modNorm_trace_le_flat e he hp L hr hs hsr hq + exact (hle f hf).trans_lt (ENNReal.mul_lt_top hK.lt_top hf) + · intro hg + have hX : (flat e he).graphBump.localMeansNorm hp r s q g < ∞ := + ((flat e he).graphBump.localMeansNorm_le hp r s hq g).trans_lt + (ENNReal.mul_lt_top ((flat e he).graphBump.upperConst_ne_top r s).lt_top hg) + obtain ⟨K, hK, hle⟩ := modNorm_flatExtension_le_localMeansNorm e he hp r hs hsL hq + exact ⟨(flat e he).graphExtension hp r g, ((flat e he).intrinsicNorm_lt_top_of_modNorm hp L + hq ((hle g hX).trans_lt (ENNReal.mul_lt_top hK.lt_top hX))).1, + trace_flatExtension e he hp hL hr hs hsL hq hX⟩ + +end Extension + +end LipschitzGraph + +/-! ### Traces of functions continuous on the closed half-space -/ + +section Fold + +variable {V : Type*} [NormedAddCommGroup V] [InnerProductSpace ℝ V] (e : V) + +/-- The **folding** onto the closed half-space, `x ↦ x + (|⟪x, e⟫| - ⟪x, e⟫) e`: it reflects +`{x : ⟪x, e⟫ < 0}` in `e^⊥` and fixes the closed half-space. -/ +noncomputable def foldHalfSpace (x : V) : V := x + (|inner ℝ x e| - inner ℝ x e) • e + +/-- The folding is continuous. -/ +theorem continuous_foldHalfSpace : Continuous (foldHalfSpace e) := + continuous_id.add ((((continuous_id.inner continuous_const).abs).sub + (continuous_id.inner continuous_const)).smul continuous_const) + +/-- The folding fixes the closed half-space. -/ +theorem foldHalfSpace_of_nonneg {x : V} (hx : 0 ≤ inner ℝ x e) : foldHalfSpace e x = x := by + rw [foldHalfSpace, abs_of_nonneg hx, sub_self, zero_smul, add_zero] + +variable {e} (he : ‖e‖ = 1) +include he + +/-- `⟪F x, e⟫ = |⟪x, e⟫|` for the folding `F`. -/ +theorem inner_foldHalfSpace (x : V) : inner ℝ (foldHalfSpace e x) e = |inner ℝ x e| := by + rw [foldHalfSpace, inner_add_left, real_inner_smul_left, real_inner_self_eq_norm_sq, he] + ring + +/-- The folding maps into the closed half-space. -/ +theorem foldHalfSpace_mem (x : V) : foldHalfSpace e x ∈ closedHalfSpace e := by + change 0 ≤ inner ℝ (foldHalfSpace e x) e + rw [inner_foldHalfSpace he] + exact abs_nonneg _ + +/-- The folding preserves the norm: `‖x + c e‖² = ‖x‖² + c (2⟪x, e⟫ + c)` vanishes in the second +term for `c = |⟪x, e⟫| - ⟪x, e⟫`. -/ +theorem norm_foldHalfSpace (x : V) : ‖foldHalfSpace e x‖ = ‖x‖ := by + have h : ‖foldHalfSpace e x‖ ^ 2 = ‖x‖ ^ 2 := by + rw [foldHalfSpace, norm_add_sq_real, norm_smul, he, mul_one, real_inner_smul_right, + Real.norm_eq_abs, sq_abs] + rw [show ‖x‖ ^ 2 + 2 * ((|inner ℝ x e| - inner ℝ x e) * inner ℝ x e) + + (|inner ℝ x e| - inner ℝ x e) ^ 2 = ‖x‖ ^ 2 + (|inner ℝ x e| ^ 2 - inner ℝ x e ^ 2) by + ring, sq_abs, sub_self, add_zero] + exact (pow_left_inj₀ (norm_nonneg _) (norm_nonneg _) two_ne_zero).1 h + + +variable [FiniteDimensional ℝ V] [MeasurableSpace V] [BorelSpace V] {p : ℝ≥0∞} [Fact (1 ≤ p)] + +/-- **Traces of functions continuous on the closed half-space**: let `f ∈ L_p(V)` have a finite +intrinsic quasi-norm of smoothness `s + 1/p`, `s > 0`, on the open half-space, and let `G` be +continuous on the closed half-space, vanish there outside a compact set, and agree with `f` almost +everywhere on the open half-space. Then `Tr f = G` almost everywhere on `e^⊥`. The folded `G ∘ F` +is continuous with compact support and agrees with `f` on the half-space, and traces of continuous +functions are restrictions (`Rd.LipschitzGraph.trace_ae_eq_comp_graphMap`). -/ +theorem trace_ae_eq_of_continuousOn (hp : p ≠ ∞) {L : ℕ} (hL : 1 ≤ L) {s : ℝ} (hs : 0 < s) + {q : ℝ≥0∞} (hq : 1 ≤ q) {f : Lp ℂ p (volume : Measure V)} + (hf : modNormOn (LipschitzGraph.flat e he).measurableSet_domain L (s + 1 / p.toReal) q f < ∞) + {G : V → ℂ} (hG : ContinuousOn G (closedHalfSpace e)) {K : Set V} (hK : IsCompact K) + (hGK : ∀ x ∈ closedHalfSpace e, x ∉ K → G x = 0) + (hfG : ∀ᵐ x ∂volume, x ∈ (LipschitzGraph.flat e he).domain → f x = G x) : + (LipschitzGraph.flat e he).trace hp L f =ᵐ[volume] fun x' => G x' := by + set Ω := LipschitzGraph.flat e he + set G' := G ∘ foldHalfSpace e + have hG'c : Continuous G' := + hG.comp_continuous (continuous_foldHalfSpace e) (foldHalfSpace_mem he) + have hG's : HasCompactSupport G' := by + obtain ⟨R, hR⟩ := hK.isBounded.subset_closedBall 0 + refine HasCompactSupport.intro (isCompact_closedBall (0 : V) R) fun x hx => ?_ + have hfx : foldHalfSpace e x ∉ K := fun h => hx (by + have h' := hR h + rw [mem_closedBall_zero_iff, norm_foldHalfSpace he] at h' + exact mem_closedBall_zero_iff.2 h') + exact hGK _ (foldHalfSpace_mem he x) hfx + have hmem : MemLp G' p volume := hG'c.memLp_of_hasCompactSupport hG's + have hFG : (hmem.toLp G' : V → ℂ) =ᵐ[volume] G' := hmem.coeFn_toLp + have hcut : Ω.cutoff (hmem.toLp G') = Ω.cutoff f := by + refine Lp.ext ?_ + filter_upwards [Ω.cutoff_apply_ae (hmem.toLp G'), Ω.cutoff_apply_ae f, hFG, hfG] + with x h1 h2 h3 h4 + rw [h1, h2] + by_cases hx : x ∈ Ω.domain + · rw [indicator_of_mem hx, indicator_of_mem hx, h3, h4 hx] + change G (foldHalfSpace e x) = G x + rw [foldHalfSpace_of_nonneg e (le_of_lt (show 0 < inner ℝ x e from hx))] + · rw [indicator_of_notMem hx, indicator_of_notMem hx] + have hFfin : modNormOn Ω.measurableSet_domain L (s + 1 / p.toReal) q (hmem.toLp G') < ∞ := + (modNormOn_congr Ω.measurableSet_domain hcut).trans_lt hf + rw [← Ω.trace_congr hp L hcut] + filter_upwards [Ω.trace_ae_eq_comp_graphMap hp hL hs hq hFfin hG'c hFG] with x' hx' + have hx'0 : inner ℝ (x' : V) e = 0 := by + have h := x'.2 + rw [Submodule.mem_orthogonal_singleton_iff_inner_right, real_inner_comm] at h + exact h + rw [hx', Function.comp_apply, LipschitzGraph.flat_graphMap] + change G (foldHalfSpace e x') = G x' + rw [foldHalfSpace_of_nonneg e hx'0.ge] + +end Fold + +end Rd diff --git a/LeanPool/FunctionSpaces/Domains/Traces/LipschitzBoundaryTrace.lean b/LeanPool/FunctionSpaces/Domains/Traces/LipschitzBoundaryTrace.lean new file mode 100644 index 0000000000..d79537f217 --- /dev/null +++ b/LeanPool/FunctionSpaces/Domains/Traces/LipschitzBoundaryTrace.lean @@ -0,0 +1,677 @@ +/- +Copyright (c) 2026 Mario Ullrich. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Mario Ullrich +-/ +module + +public import LeanPool.FunctionSpaces.Domains.Traces.GraphTraceCharts +public import Mathlib.Topology.MetricSpace.ProperSpace.Lemmas + +/- +Modified for Lean Pool: module names and imports adapted. +-/ + +/-! +# Traces on the boundary of bounded Lipschitz domains + +Let `Ω` be a bounded Lipschitz domain with boundary `Γ`: finitely many balls `B_j` cover `Γ`, and +`B_j ∩ Ω = B_j ∩ Ω_j` for Lipschitz graph domains `Ω_j` over hyperplanes `H_j`, with graph maps +`γ_j` and projections `P_j` (`Rd.BoundedLipschitzDomain`). In `B_j` the boundary is the graph of +`Ω_j` (`Rd.BoundedLipschitzDomain.mem_frontier_iff`). + +* **Almost everywhere on the boundary** (`Rd.BoundedLipschitzDomain.aeBoundary`): a property holds + almost everywhere on `Γ` if, for every `j`, it holds at `γ_j(x')` for almost every `x' ∈ H_j` with + `γ_j(x') ∈ B_j`. The exceptional sets are the null sets of the surface measure, described in the + charts. +* **Besov spaces on the boundary** (`Rd.BoundedLipschitzDomain.MemBoundaryBesov`, + Schneider–Vybíral, Definition 3.3): for a smooth resolution of unity `(ψ_j)` on `Γ` subordinate to + `(B_j)` (`Rd.BoundedLipschitzDomain.BoundaryPartition`), `g ∈ B^s_{p,q}(Γ)` if every chart piece + `(ψ_j g) ∘ γ_j` lies in `B^s_{p,q}(H_j)`, with first differences for `0 < s < 1`. +* **The boundary trace** (`Rd.BoundedLipschitzDomain.boundaryTrace`): + `Tr_Γ F(y) = ∑_k ψ_k(y) Tr_k F(P_k y)` with the traces `Tr_k` of the graph domains. In each chart + it is the trace of the graph domain (`Rd.BoundedLipschitzDomain.boundaryTrace_graphMap`), by the + change of chart; hence it does not depend on the resolution of unity, and it is the restriction + for continuous functions. +* **The trace space** (Schneider–Vybíral, Theorem 4.11, for `p ≥ 1`): for `1 ≤ p < ∞`, `0 < s < 1`, + `1 ≤ q ≤ ∞` and `L ≥ 2`, `g ∈ B^s_{p,q}(Γ)` iff `g = Tr_Γ F` almost everywhere on `Γ` for some + `F ∈ L_p(V)` with `‖F‖_p + ‖(2^(k(s+1/p)) ω_L(F, 2^(-k))_p)_k‖_{ℓ_q} < ∞` + (`Rd.BoundedLipschitzDomain.exists_boundaryTrace_eq_iff`). The chart pieces of `Tr_Γ F` are the + traces of `ψ_j F` on the graph domains; conversely `F = ∑_j ζ_j E_j G_j` with the extensions `E_j` + of the graph domains and cut-offs `ζ_j` with `ζ_j ≠ 0` only in `B_j` and `ζ_j = 1` where + `ψ_j ≠ 0` (`Rd.BoundedLipschitzDomain.boundaryTrace_extensionSum_eventuallyEq`). +* The boundary trace depends only on `F` on `Ω` (`Rd.BoundedLipschitzDomain.boundaryTrace_congr`), + and the functions with a finite intrinsic norm on `Ω` are the restrictions of such `F` + (`Rd.BoundedLipschitzDomain.exists_besov_extension_of_modulusOn`): `B^s_{p,q}(Γ)` is the trace + space of `B^{s+1/p}_{p,q}(Ω)` + (`Rd.BoundedLipschitzDomain.memBoundaryBesov_iff_exists_isBoundaryTrace`); every such function + has a boundary trace, unique almost everywhere on `Γ` + (`Rd.BoundedLipschitzDomain.exists_isBoundaryTrace_of_modNormOn_lt_top`, + `Rd.BoundedLipschitzDomain.IsBoundaryTrace.unique`). In particular + `B^s_{p,q}(Γ)` does not depend on the resolution of unity + (`Rd.BoundedLipschitzDomain.memBoundaryBesov_iff_of_boundaryPartition`). +* **Boundary traces with a finite intrinsic norm** + (`Rd.BoundedLipschitzDomain.HasBoundaryTrace`): `f` has the boundary trace `g` if `f` has a + finite intrinsic norm on `Ω` and `g` is its boundary trace. The trace space, the existence and + the uniqueness of the trace hold in this form + (`Rd.BoundedLipschitzDomain.memBoundaryBesov_iff_exists_hasBoundaryTrace`, + `Rd.BoundedLipschitzDomain.HasBoundaryTrace.memBoundaryBesov`, + `Rd.BoundedLipschitzDomain.exists_hasBoundaryTrace_of_modNormOn_lt_top`, + `Rd.BoundedLipschitzDomain.HasBoundaryTrace.unique`). +-/ + +@[expose] public section + +open MeasureTheory Filter Topology Module Metric +open scoped ENNReal + +open ENNReal (lqNorm dyadicWeight) + +namespace Rd + +section Auxiliary + +variable {α : Type*} [MeasurableSpace α] {μ : Measure α} {p : ℝ≥0∞} [Fact (1 ≤ p)] + +/-- Elements of `L_p` with equal restrictions to `O` agree almost everywhere on `O` +(`Rd.indicatorLp_eq_iff_ae_eq_restrict` and Mathlib's `ae_restrict_iff'`). -/ +theorem ae_eq_of_indicatorLp_eq {O : Set α} (hO : MeasurableSet O) {F f : Lp ℂ p μ} + (h : indicatorLp hO F = indicatorLp hO f) : ∀ᵐ x ∂μ, x ∈ O → F x = f x := + (ae_restrict_iff' hO).1 ((indicatorLp_eq_iff_ae_eq_restrict hO).1 h) + +end Auxiliary + +namespace BoundedLipschitzDomain + +variable {V : Type*} [NormedAddCommGroup V] [InnerProductSpace ℝ V] + +/-! ### Resolutions of unity on the boundary -/ + +/-- A **resolution of unity on the boundary** subordinate to the boundary balls: smooth `ψ_j` with +`tsupport ψ_j ⊆ B_j` and `∑_j ψ_j = 1` on `Γ`. -/ +structure BoundaryPartition (Ω : BoundedLipschitzDomain V) where + /-- The functions `ψ_j`. -/ + toFun : Fin Ω.N → V → ℝ + contDiff : ∀ j, ContDiff ℝ ((⊤ : ℕ∞) : WithTop ℕ∞) (toFun j) + tsupport_subset : ∀ j, tsupport (toFun j) ⊆ ball (Ω.center j) (Ω.radius j) + sum_eq_one : ∀ y ∈ frontier Ω.carrier, ∑ j, toFun j y = 1 + +namespace BoundaryPartition + +variable {Ω : BoundedLipschitzDomain V} (ψ : Ω.BoundaryPartition) + +/-- The functions `ψ_j` with complex values. -/ +noncomputable def toComplex (j : Fin Ω.N) : V → ℂ := fun y => (ψ.toFun j y : ℂ) + +/-- The `ψ_j` are smooth. -/ +theorem contDiff_toComplex (j : Fin Ω.N) : + ContDiff ℝ ((⊤ : ℕ∞) : WithTop ℕ∞) (ψ.toComplex j) := + Complex.ofRealCLM.contDiff.comp (ψ.contDiff j) + +/-- `ψ_j ≠ 0` only in `B_j`. -/ +theorem mem_ball_of_ne_zero {j : Fin Ω.N} {y : V} (hy : ψ.toFun j y ≠ 0) : + y ∈ ball (Ω.center j) (Ω.radius j) := + ψ.tsupport_subset j (subset_tsupport _ hy) + +/-- `ψ_j(y) = 0` gives `ψ_j(y) = 0` in `ℂ`. -/ +theorem toComplex_of_eq_zero {j : Fin Ω.N} {y : V} (hy : ψ.toFun j y = 0) : + ψ.toComplex j y = 0 := by + simp [toComplex, hy] + +/-- `∑_j ψ_j = 1` on `Γ`. -/ +theorem sum_toComplex_eq_one {y : V} (hy : y ∈ frontier Ω.carrier) : + ∑ j, ψ.toComplex j y = 1 := by + simp only [toComplex] + rw [← Complex.ofReal_sum, ψ.sum_eq_one y hy, Complex.ofReal_one] + +variable [FiniteDimensional ℝ V] + +/-- The functions of a resolution of unity on the boundary have compact support: closed supports +inside the bounded balls `B_j`. -/ +theorem hasCompactSupport (j : Fin Ω.N) : HasCompactSupport (ψ.toFun j) := + isCompact_of_isClosed_isBounded (isClosed_tsupport _) + (isBounded_ball.subset (ψ.tsupport_subset j)) + +/-- The `ψ_j` have compact support. -/ +theorem hasCompactSupport_toComplex (j : Fin Ω.N) : HasCompactSupport (ψ.toComplex j) := + (ψ.hasCompactSupport j).comp_left Complex.ofReal_zero + +/-- **Cut-offs for the resolution of unity**: smooth `ζ_j` with compact support, `ζ_j ≠ 0` only in +`B_j` and `ζ_j = 1` where `ψ_j ≠ 0`; a bump function equal to `1` on a ball around `tsupport ψ_j` +inside `B_j` (Mathlib's `exists_lt_subset_ball` and `ContDiffBump`). -/ +theorem exists_cutoff (j : Fin Ω.N) : + ∃ ζ : V → ℂ, ContDiff ℝ ((⊤ : ℕ∞) : WithTop ℕ∞) ζ ∧ HasCompactSupport ζ ∧ + (∀ y, ζ y ≠ 0 → y ∈ ball (Ω.center j) (Ω.radius j)) ∧ ∀ y, ψ.toFun j y ≠ 0 → ζ y = 1 := by + obtain ⟨r, hr, hsub⟩ := exists_lt_subset_ball (isClosed_tsupport _) (ψ.tsupport_subset j) + have hρ := Ω.radius_pos j + let β : ContDiffBump (Ω.center j) := + ⟨max r (Ω.radius j / 2), Ω.radius j, lt_max_of_lt_right (by positivity), + max_lt hr (by linarith)⟩ + refine ⟨fun y => ((β y : ℝ) : ℂ), Complex.ofRealCLM.contDiff.comp β.contDiff, + β.hasCompactSupport.comp_left Complex.ofReal_zero, fun y hy => ?_, fun y hy => ?_⟩ + · have hs : y ∈ Function.support β := fun h => hy (by simp [h]) + rwa [β.support_eq] at hs + · change ((β y : ℝ) : ℂ) = 1 + rw [β.one_of_mem_closedBall, Complex.ofReal_one] + exact ball_subset_closedBall + (ball_subset_ball (le_max_left _ _) (hsub (subset_tsupport _ hy))) + +end BoundaryPartition + +variable (Ω : BoundedLipschitzDomain V) + +/-! ### The boundary in the charts -/ + +/-- **In a boundary ball the boundary is the graph**: for `y ∈ B_j`, `y ∈ Γ` iff `γ_j(P_j y) = y`, +since `Ω` and `Ω_j` agree on the open ball `B_j` (Mathlib's `frontier_inter_open_inter`). -/ +theorem mem_frontier_iff (j : Fin Ω.N) {y : V} (hy : y ∈ ball (Ω.center j) (Ω.radius j)) : + y ∈ frontier Ω.carrier ↔ (Ω.graph j).graphMap ((Ω.graph j).proj y) = y := by + have h := frontier_inter_open_inter (s := Ω.carrier) + (isOpen_ball : IsOpen (ball (Ω.center j) (Ω.radius j))) + rw [Ω.inter_ball_eq j le_rfl, frontier_inter_open_inter isOpen_ball] at h + rw [← (Ω.graph j).mem_frontier_domain_iff] + have h' := Set.ext_iff.1 h y + simp only [Set.mem_inter_iff, and_iff_left hy] at h' + exact h'.symm + +/-- The boundary meets `B_j` in the graph of `Ω_j`. -/ +theorem graphMap_mem_frontier (j : Fin Ω.N) {x' : (Ω.graph j).hyperplane} + (hx : (Ω.graph j).graphMap x' ∈ ball (Ω.center j) (Ω.radius j)) : + (Ω.graph j).graphMap x' ∈ frontier Ω.carrier := by + rw [Ω.mem_frontier_iff j hx, (Ω.graph j).proj_graphMap] + +/-- **Boundary points in two balls lie on both graphs**: if `γ_j(x') ∈ B_j ∩ B_k`, then +`γ_k(P_k γ_j x') = γ_j x'`. -/ +theorem graphMap_proj_graphMap (j k : Fin Ω.N) {x' : (Ω.graph j).hyperplane} + (hj : (Ω.graph j).graphMap x' ∈ ball (Ω.center j) (Ω.radius j)) + (hk : (Ω.graph j).graphMap x' ∈ ball (Ω.center k) (Ω.radius k)) : + (Ω.graph k).graphMap ((Ω.graph k).proj ((Ω.graph j).graphMap x')) = + (Ω.graph j).graphMap x' := + (Ω.mem_frontier_iff k hk).1 (Ω.graphMap_mem_frontier j hj) + +/-- **Resolutions of unity on the boundary exist** (`Rd.exists_smooth_partition`). -/ +theorem nonempty_boundaryPartition [FiniteDimensional ℝ V] : Nonempty Ω.BoundaryPartition := by + obtain ⟨ψ, hψ, hψU, hψ1, -⟩ := exists_smooth_partition isClosed_frontier + (fun j => ball (Ω.center j) (Ω.radius j)) (fun _ => isOpen_ball) Ω.frontier_subset + exact ⟨⟨ψ, hψ, hψU, hψ1⟩⟩ + +/-- **Nonnegative resolutions of unity on the boundary exist**: smooth `ψ_j ≥ 0` with +`tsupport ψ_j ⊆ B_j`, `∑_j ψ_j = 1` on `Γ` and `∑_j ψ_j ≤ 1` everywhere, a smooth resolution of +unity subordinate to the boundary balls (`Rd.exists_smooth_partition`). -/ +theorem exists_boundaryPartition_nonneg [FiniteDimensional ℝ V] : + ∃ ψ : Ω.BoundaryPartition, (∀ j y, 0 ≤ ψ.toFun j y) ∧ ∀ y, ∑ j, ψ.toFun j y ≤ 1 := by + obtain ⟨ψ, hψ, hψU, hψ1, hψ0, hψle⟩ := exists_smooth_partition isClosed_frontier + (fun j => ball (Ω.center j) (Ω.radius j)) (fun _ => isOpen_ball) Ω.frontier_subset + exact ⟨⟨ψ, hψ, hψU, hψ1⟩, hψ0, hψle⟩ + +/-- **Resolutions of unity equal to one near the boundary**: there is a resolution of unity `ψ` +on the boundary with `ψ_j ≥ 0`, `∑_j ψ_j ≤ 1` everywhere and `∑_j ψ_j = 1` on a neighbourhood of +`Γ` (`Rd.exists_smooth_partition_nhds` for the compact `Γ`). -/ +theorem exists_boundaryPartition_nhds [FiniteDimensional ℝ V] : + ∃ ψ : Ω.BoundaryPartition, (∀ j y, 0 ≤ ψ.toFun j y) ∧ (∀ y, ∑ j, ψ.toFun j y ≤ 1) ∧ + ∀ᶠ y in 𝓝ˢ (frontier Ω.carrier), ∑ j, ψ.toFun j y = 1 := by + obtain ⟨ψ, hψ, hψU, hψ1, hψ0, hψle⟩ := exists_smooth_partition_nhds Ω.isCompact_frontier + (fun j => ball (Ω.center j) (Ω.radius j)) (fun _ => isOpen_ball) Ω.frontier_subset + exact ⟨⟨ψ, hψ, hψU, hψ1.self_of_nhdsSet⟩, hψ0, hψle, hψ1⟩ + +variable [FiniteDimensional ℝ V] [MeasurableSpace V] [BorelSpace V] + +/-! ### Almost everywhere on the boundary -/ + +/-- **Almost everywhere on the boundary**: `∀ᶠ y in Ω.aeBoundary, P y` iff for every `j`, +`P(γ_j x')` holds for almost every `x' ∈ H_j` with `γ_j(x') ∈ B_j` +(`Rd.BoundedLipschitzDomain.eventually_aeBoundary_iff`). The exceptional sets are the null sets of +the surface measure on `Γ`, described in the charts. -/ +noncomputable def aeBoundary : Filter V := + ⨆ j, Filter.map (Ω.graph j).graphMap (ae (volume : Measure (Ω.graph j).hyperplane)) ⊓ + 𝓟 (ball (Ω.center j) (Ω.radius j)) + +/-- The statements that hold almost everywhere on the boundary. -/ +theorem eventually_aeBoundary_iff {P : V → Prop} : + (∀ᶠ y in Ω.aeBoundary, P y) ↔ ∀ j, ∀ᵐ x' ∂(volume : Measure (Ω.graph j).hyperplane), + (Ω.graph j).graphMap x' ∈ ball (Ω.center j) (Ω.radius j) → P ((Ω.graph j).graphMap x') := by + simp only [aeBoundary, eventually_iSup, eventually_inf_principal, eventually_map] + +/-- **Chart statements hold almost everywhere on the boundary**: if `P(γ_k x')` holds for almost +every `x' ∈ H_k` with `γ_k(x') ∈ B_k`, then `P` holds almost everywhere on `Γ ∩ B_k`, by the change +of chart (`Rd.LipschitzGraph.ae_proj_graphMap`). -/ +theorem eventually_aeBoundary_of_chart (k : Fin Ω.N) {P : V → Prop} + (h : ∀ᵐ x' ∂(volume : Measure (Ω.graph k).hyperplane), + (Ω.graph k).graphMap x' ∈ ball (Ω.center k) (Ω.radius k) → P ((Ω.graph k).graphMap x')) : + ∀ᶠ y in Ω.aeBoundary, y ∈ ball (Ω.center k) (Ω.radius k) → P y := by + rw [eventually_aeBoundary_iff] + intro j + filter_upwards [(Ω.graph j).ae_proj_graphMap (Ω.graph k) h] with x' hx hj hk + have hA := Ω.graphMap_proj_graphMap j k hj hk + have h' := hx hA + rw [hA] at h' + exact h' hk + +variable {p : ℝ≥0∞} [Fact (1 ≤ p)] + +/-! ### Besov spaces on the boundary -/ + +variable (p) in +/-- **Besov spaces on the boundary** (Schneider–Vybíral, Definition 3.3, with Lebesgue measure on +the hyperplanes): `g ∈ B^s_{p,q}(Γ)` if every chart piece `(ψ_j g) ∘ γ_j` agrees almost everywhere +on `H_j` with some `G_j ∈ L_p(H_j)` with `‖G_j‖_p + ‖(2^(ks) ω_1(G_j, 2^(-k))_p)_k‖_{ℓ_q} < ∞`. +First differences suffice for `0 < s < 1`, the range of the trace theorem. -/ +def MemBoundaryBesov (ψ : Ω.BoundaryPartition) (s : ℝ) (q : ℝ≥0∞) (g : V → ℂ) : Prop := + ∀ j, ∃ G : Lp ℂ p (volume : Measure (Ω.graph j).hyperplane), + (G : (Ω.graph j).hyperplane → ℂ) =ᵐ[volume] + (fun x' => ψ.toComplex j ((Ω.graph j).graphMap x') * g ((Ω.graph j).graphMap x')) ∧ + ‖G‖ₑ + lqNorm q (fun k => dyadicWeight s k * lpModulus p 1 G k) < ∞ + +variable {Ω} in +/-- **Chart pieces see `g` only almost everywhere on `Γ`**: if `g = h` almost everywhere on `Γ`, +then `(ψ_j g) ∘ γ_j = (ψ_j h) ∘ γ_j` almost everywhere on `H_j`, since `ψ_j ≠ 0` only in `B_j`. -/ +theorem chart_ae_eq_of_eventuallyEq (ψ : Ω.BoundaryPartition) {g h : V → ℂ} + (hgh : g =ᶠ[Ω.aeBoundary] h) (j : Fin Ω.N) : + (fun x' => ψ.toComplex j ((Ω.graph j).graphMap x') * g ((Ω.graph j).graphMap x')) =ᵐ[volume] + fun x' => ψ.toComplex j ((Ω.graph j).graphMap x') * h ((Ω.graph j).graphMap x') := by + filter_upwards [(Ω.eventually_aeBoundary_iff.1 hgh) j] with x' hx + by_cases hψ : ψ.toFun j ((Ω.graph j).graphMap x') = 0 + · rw [ψ.toComplex_of_eq_zero hψ, zero_mul, zero_mul] + · rw [hx (ψ.mem_ball_of_ne_zero hψ)] + +variable {Ω} in +/-- `B^s_{p,q}(Γ)` only sees `g` almost everywhere on `Γ` +(`Rd.BoundedLipschitzDomain.chart_ae_eq_of_eventuallyEq`). -/ +theorem MemBoundaryBesov.congr {ψ : Ω.BoundaryPartition} {s : ℝ} {q : ℝ≥0∞} {g h : V → ℂ} + (hg : Ω.MemBoundaryBesov p ψ s q g) (hgh : g =ᶠ[Ω.aeBoundary] h) : + Ω.MemBoundaryBesov p ψ s q h := fun j => + let ⟨G, hG, hGfin⟩ := hg j + ⟨G, hG.trans (chart_ae_eq_of_eventuallyEq ψ hgh j), hGfin⟩ + +/-! ### The boundary trace -/ + +/-- **The boundary trace** `Tr_Γ F(y) = ∑_k ψ_k(y) Tr_k F(P_k y)`, with the traces `Tr_k` of the +graph domains `Ω_k` (cone bumps, differences of order `L`). -/ +noncomputable def boundaryTrace (ψ : Ω.BoundaryPartition) (hp : p ≠ ∞) (L : ℕ) + (F : Lp ℂ p (volume : Measure V)) (y : V) : ℂ := + ∑ k, ψ.toComplex k y * (Ω.graph k).trace hp L F ((Ω.graph k).proj y) + +/-- **The boundary trace in a chart**: for `F` with a finite `B^{s+1/p}_{p,q}`-norm of order +`L > s + 1/p` on `V`, `Tr_Γ F(γ_j x') = Tr_j F(x')` for almost every `x' ∈ H_j` with +`γ_j(x') ∈ B_j`. If `ψ_k(γ_j x') ≠ 0`, then `γ_j x' ∈ B_k` lies on the graph of `Ω_k` and +`Tr_k F(P_k γ_j x') = Tr_j F(x')` by the change of chart; and `∑_k ψ_k = 1` on `Γ`. -/ +theorem boundaryTrace_graphMap (ψ : Ω.BoundaryPartition) (hp : p ≠ ∞) {L : ℕ} (hL : 1 ≤ L) + {s : ℝ} (hs : 0 < s) (hsL : s + 1 / p.toReal < L) {q : ℝ≥0∞} (hq : 1 ≤ q) + {F : Lp ℂ p (volume : Measure V)} + (hF : ‖F‖ₑ + lqNorm q (fun k => + dyadicWeight (s + 1 / p.toReal) k * lpModulus p L F k) < ∞) (j : Fin Ω.N) : + ∀ᵐ x' ∂(volume : Measure (Ω.graph j).hyperplane), + (Ω.graph j).graphMap x' ∈ ball (Ω.center j) (Ω.radius j) → + Ω.boundaryTrace ψ hp L F ((Ω.graph j).graphMap x') = (Ω.graph j).trace hp L F x' := by + have hcc := fun k => (Ω.graph j).trace_ae_eq_trace_comp (Ω.graph k) hp hL hs hsL hq hF + filter_upwards [ae_all_iff.2 hcc] with x' hx hj + have hterm : ∀ k, ψ.toComplex k ((Ω.graph j).graphMap x') * + (Ω.graph k).trace hp L F ((Ω.graph k).proj ((Ω.graph j).graphMap x')) = + ψ.toComplex k ((Ω.graph j).graphMap x') * (Ω.graph j).trace hp L F x' := fun k => by + by_cases hψ : ψ.toFun k ((Ω.graph j).graphMap x') = 0 + · rw [ψ.toComplex_of_eq_zero hψ, zero_mul, zero_mul] + · rw [← hx k (Ω.graphMap_proj_graphMap j k hj (ψ.mem_ball_of_ne_zero hψ))] + rw [boundaryTrace, Finset.sum_congr rfl fun k _ => hterm k, ← Finset.sum_mul, + ψ.sum_toComplex_eq_one (Ω.graphMap_mem_frontier j hj), one_mul] + +/-- **The boundary trace does not depend on the resolution of unity**: in every chart both are the +trace of the graph domain. -/ +theorem boundaryTrace_eventuallyEq (ψ ψ' : Ω.BoundaryPartition) (hp : p ≠ ∞) {L : ℕ} + (hL : 1 ≤ L) {s : ℝ} (hs : 0 < s) (hsL : s + 1 / p.toReal < L) {q : ℝ≥0∞} (hq : 1 ≤ q) + {F : Lp ℂ p (volume : Measure V)} + (hF : ‖F‖ₑ + lqNorm q (fun k => + dyadicWeight (s + 1 / p.toReal) k * lpModulus p L F k) < ∞) : + Ω.boundaryTrace ψ hp L F =ᶠ[Ω.aeBoundary] Ω.boundaryTrace ψ' hp L F := by + refine Ω.eventually_aeBoundary_iff.2 fun j => ?_ + filter_upwards [Ω.boundaryTrace_graphMap ψ hp hL hs hsL hq hF j, + Ω.boundaryTrace_graphMap ψ' hp hL hs hsL hq hF j] with x' h1 h2 hj + rw [h1 hj, h2 hj] + +/-- **The boundary trace of continuous functions is the restriction**: if `F` has a continuous +representative `G`, then `Tr_Γ F = G` almost everywhere on `Γ` +(`Rd.LipschitzGraph.trace_ae_eq_comp_graphMap`). -/ +theorem boundaryTrace_eventuallyEq_of_continuous (ψ : Ω.BoundaryPartition) (hp : p ≠ ∞) + {L : ℕ} (hL : 1 ≤ L) {s : ℝ} (hs : 0 < s) (hsL : s + 1 / p.toReal < L) {q : ℝ≥0∞} + (hq : 1 ≤ q) {F : Lp ℂ p (volume : Measure V)} + (hF : ‖F‖ₑ + lqNorm q (fun k => + dyadicWeight (s + 1 / p.toReal) k * lpModulus p L F k) < ∞) + {G : V → ℂ} (hG : Continuous G) (hFG : (F : V → ℂ) =ᵐ[volume] G) : + Ω.boundaryTrace ψ hp L F =ᶠ[Ω.aeBoundary] G := by + refine Ω.eventually_aeBoundary_iff.2 fun j => ?_ + filter_upwards [Ω.boundaryTrace_graphMap ψ hp hL hs hsL hq hF j, + (Ω.graph j).trace_ae_eq_comp_graphMap hp hL hs hq + ((Ω.graph j).intrinsicNorm_lt_top_of_modNorm hp L hq hF).1 hG hFG] with x' h1 h2 hj + rw [h1 hj, h2] + rfl + +/-- **The boundary trace depends only on `F` on `Ω`**: if `F₁ = F₂` almost everywhere on `Ω`, then +`Tr_Γ F₁ = Tr_Γ F₂` almost everywhere on `Γ`, since `Ω` agrees with `Ω_j` on `B_j` +(`Rd.LipschitzGraph.trace_ae_eq_of_ae_eq`). -/ +theorem boundaryTrace_congr (ψ : Ω.BoundaryPartition) (hp : p ≠ ∞) {L : ℕ} (hL : 1 ≤ L) + {s : ℝ} (hs : 0 < s) (hsL : s + 1 / p.toReal < L) {q : ℝ≥0∞} (hq : 1 ≤ q) + {F₁ F₂ : Lp ℂ p (volume : Measure V)} + (hF₁ : ‖F₁‖ₑ + lqNorm q (fun k => + dyadicWeight (s + 1 / p.toReal) k * lpModulus p L F₁ k) < ∞) + (hF₂ : ‖F₂‖ₑ + lqNorm q (fun k => + dyadicWeight (s + 1 / p.toReal) k * lpModulus p L F₂ k) < ∞) + (h : ∀ᵐ x ∂(volume : Measure V), x ∈ Ω.carrier → F₁ x = F₂ x) : + Ω.boundaryTrace ψ hp L F₁ =ᶠ[Ω.aeBoundary] Ω.boundaryTrace ψ hp L F₂ := by + refine Ω.eventually_aeBoundary_iff.2 fun j => ?_ + have hloc := (Ω.graph j).trace_ae_eq_of_ae_eq hp L hs hq + ((Ω.graph j).intrinsicNorm_lt_top_of_modNorm hp L hq hF₁).2 + ((Ω.graph j).intrinsicNorm_lt_top_of_modNorm hp L hq hF₂).2 + (isOpen_ball : IsOpen (ball (Ω.center j) (Ω.radius j))) + (h.mono fun x hx hxd hxb => hx (by + have hx' : x ∈ (Ω.graph j).domain ∩ ball (Ω.center j) (Ω.radius j) := ⟨hxd, hxb⟩ + rw [← Ω.inter_ball_eq j le_rfl] at hx' + exact hx'.1)) + filter_upwards [Ω.boundaryTrace_graphMap ψ hp hL hs hsL hq hF₁ j, + Ω.boundaryTrace_graphMap ψ hp hL hs hsL hq hF₂ j, hloc] with x' h1 h2 h3 hj + rw [h1 hj, h2 hj, h3 hj] + +/-! ### The trace space -/ + +/-- **The chart pieces of the boundary trace are traces**: `(ψ_j Tr_Γ F) ∘ γ_j = Tr_j(ψ_j F)` almost +everywhere on `H_j` (`Rd.LipschitzGraph.trace_mulLp_ae`). -/ +theorem trace_mulLp_ae_boundaryTrace (ψ : Ω.BoundaryPartition) (hp : p ≠ ∞) {L : ℕ} + (hL : 1 ≤ L) {s : ℝ} (hs : 0 < s) (hsL : s + 1 / p.toReal < L) {q : ℝ≥0∞} (hq : 1 ≤ q) + {F : Lp ℂ p (volume : Measure V)} + (hF : ‖F‖ₑ + lqNorm q (fun k => + dyadicWeight (s + 1 / p.toReal) k * lpModulus p L F k) < ∞) (j : Fin Ω.N) {C : ℝ} + (hC : ∀ l ≤ L, ∀ x, ‖iteratedFDeriv ℝ l (ψ.toComplex j) x‖ ≤ C) : + (Ω.graph j).trace hp L (mulLp (ψ.contDiff_toComplex j).continuous + (norm_le_of_iteratedFDeriv_le hC) F) =ᵐ[volume] fun x' => + ψ.toComplex j ((Ω.graph j).graphMap x') * + Ω.boundaryTrace ψ hp L F ((Ω.graph j).graphMap x') := by + filter_upwards [(Ω.graph j).trace_mulLp_ae hp hL hs hsL hq (ψ.contDiff_toComplex j) hC hF, + Ω.boundaryTrace_graphMap ψ hp hL hs hsL hq hF j] with x' h1 h2 + rw [h1] + by_cases hψ : ψ.toFun j ((Ω.graph j).graphMap x') = 0 + · rw [ψ.toComplex_of_eq_zero hψ, zero_mul, zero_mul] + · rw [h2 (ψ.mem_ball_of_ne_zero hψ)] + +/-- **The boundary trace lies in `B^s_{p,q}(Γ)`** (Schneider–Vybíral, Theorem 4.11, for `p ≥ 1`, +the bound): for `1 ≤ p < ∞`, `0 < s < 1`, `1 ≤ q ≤ ∞`, `s + 1/p < L` and `F` with +`‖F‖_p + ‖(2^(k(s+1/p)) ω_L(F, 2^(-k))_p)_k‖_{ℓ_q} < ∞`. The chart pieces are the traces of `ψ_j F` +on the graph domains (`Rd.LipschitzGraph.modNorm_trace_le`). -/ +theorem memBoundaryBesov_boundaryTrace (ψ : Ω.BoundaryPartition) (hp : p ≠ ∞) {L : ℕ} + (hL : 1 ≤ L) {s : ℝ} (hs : 0 < s) (hs1 : s < 1) (hsL : s + 1 / p.toReal < L) {q : ℝ≥0∞} + (hq : 1 ≤ q) {F : Lp ℂ p (volume : Measure V)} + (hF : ‖F‖ₑ + lqNorm q (fun k => + dyadicWeight (s + 1 / p.toReal) k * lpModulus p L F k) < ∞) : + Ω.MemBoundaryBesov p ψ s q (Ω.boundaryTrace ψ hp L F) := by + intro j + obtain ⟨C, hC⟩ := exists_iteratedFDeriv_bound (ψ.contDiff_toComplex j) + (ψ.hasCompactSupport_toComplex j) L + have hFj := modNorm_mulLp_lt_top hp (ψ.contDiff_toComplex j) hC hsL hq hF + obtain ⟨K, hK, hle⟩ := (Ω.graph j).modNorm_trace_le hp L hs hs1 hq + have hX := ((Ω.graph j).intrinsicNorm_lt_top_of_modNorm hp L hq hFj).1 + exact ⟨_, Ω.trace_mulLp_ae_boundaryTrace ψ hp hL hs hsL hq hF j hC, + (hle _ hX).trans_lt (ENNReal.mul_lt_top hK.lt_top hX)⟩ + +/-- **The localised extensions have a finite norm**: for `1 ≤ p < ∞`, `0 < s < 1`, `1 ≤ q ≤ ∞`, +`L ≥ 2`, smooth `ζ_j` with derivatives bounded up to order `L` and `G_j ∈ B^s_{p,q}(H_j)`, the sum +`F = ∑_j ζ_j E_j G_j` of the localised extensions has +`‖F‖_p + ‖(2^(k(s+1/p)) ω_L(F, 2^(-k))_p)_k‖_{ℓ_q} < ∞` +(`Rd.LipschitzGraph.modNorm_graphExtension_lt_top`, `Rd.modNorm_mulLp_lt_top`, +`Rd.modNorm_finsetSum_lt_top`). -/ +theorem modNorm_extensionSum_lt_top (hp : p ≠ ∞) {L : ℕ} (hL : 2 ≤ L) {s : ℝ} (hs : 0 < s) + (hs1 : s < 1) {q : ℝ≥0∞} (hq : 1 ≤ q) {ζ : Fin Ω.N → V → ℂ} + (hζs : ∀ j, ContDiff ℝ ((⊤ : ℕ∞) : WithTop ℕ∞) (ζ j)) {C : Fin Ω.N → ℝ} + (hC : ∀ j, ∀ l ≤ L, ∀ x, ‖iteratedFDeriv ℝ l (ζ j) x‖ ≤ C j) + (G : ∀ j, Lp ℂ p (volume : Measure (Ω.graph j).hyperplane)) + (hGfin : ∀ j, ‖G j‖ₑ + lqNorm q (fun k => dyadicWeight s k * lpModulus p 1 (G j) k) < ∞) : + ‖∑ j, mulLp (hζs j).continuous (norm_le_of_iteratedFDeriv_le (hC j)) + ((Ω.graph j).graphExtension hp 1 (G j))‖ₑ + lqNorm q (fun k => + dyadicWeight (s + 1 / p.toReal) k * lpModulus p L (∑ j, mulLp (hζs j).continuous + (norm_le_of_iteratedFDeriv_le (hC j)) ((Ω.graph j).graphExtension hp 1 (G j))) k) < ∞ := + modNorm_finsetSum_lt_top Finset.univ _ hq fun j _ => + modNorm_mulLp_lt_top hp (hζs j) (hC j) (add_one_div_toReal_lt hp hs1 hL) hq + ((Ω.graph j).modNorm_graphExtension_lt_top hp hL hs hs1 hq (hGfin j)) + +/-- **The boundary trace of the sum of the localised extensions**: for `1 ≤ p < ∞`, `0 < s < 1`, +`1 ≤ q ≤ ∞`, `L ≥ 2`, smooth `ζ_j` with derivatives bounded up to order `L`, `ζ_j ≠ 0` only in +`B_j` and `ζ_j = 1` where `ψ_j ≠ 0`, and chart pieces `G_j ∈ B^s_{p,q}(H_j)` of `g`, +`G_j = (ψ_j g) ∘ γ_j` almost everywhere on `H_j`, the function `F = ∑_j ζ_j E_j G_j` has +`Tr_Γ F = g` almost everywhere on `Γ`. In the chart of `Ω_k`, +`Tr_k(ζ_j E_j G_j) = ζ_j ψ_j g = ψ_j g` by the change of chart +(`Rd.LipschitzGraph.trace_mulLp_ae`, `Rd.LipschitzGraph.trace_ae_eq_trace_comp`, +`Rd.LipschitzGraph.trace_graphExtension`), and `∑_j ψ_j = 1` on `Γ`. -/ +theorem boundaryTrace_extensionSum_eventuallyEq (ψ : Ω.BoundaryPartition) (hp : p ≠ ∞) {L : ℕ} + (hL : 2 ≤ L) {s : ℝ} (hs : 0 < s) (hs1 : s < 1) {q : ℝ≥0∞} (hq : 1 ≤ q) + {ζ : Fin Ω.N → V → ℂ} (hζs : ∀ j, ContDiff ℝ ((⊤ : ℕ∞) : WithTop ℕ∞) (ζ j)) + (hζB : ∀ j y, ζ j y ≠ 0 → y ∈ ball (Ω.center j) (Ω.radius j)) + (hζ1 : ∀ j y, ψ.toFun j y ≠ 0 → ζ j y = 1) {C : Fin Ω.N → ℝ} + (hC : ∀ j, ∀ l ≤ L, ∀ x, ‖iteratedFDeriv ℝ l (ζ j) x‖ ≤ C j) {g : V → ℂ} + (G : ∀ j, Lp ℂ p (volume : Measure (Ω.graph j).hyperplane)) + (hG : ∀ j, (G j : (Ω.graph j).hyperplane → ℂ) =ᵐ[volume] + fun x' => ψ.toComplex j ((Ω.graph j).graphMap x') * g ((Ω.graph j).graphMap x')) + (hGfin : ∀ j, ‖G j‖ₑ + lqNorm q (fun k => dyadicWeight s k * lpModulus p 1 (G j) k) < ∞) : + Ω.boundaryTrace ψ hp L (∑ j, mulLp (hζs j).continuous (norm_le_of_iteratedFDeriv_le (hC j)) + ((Ω.graph j).graphExtension hp 1 (G j))) =ᶠ[Ω.aeBoundary] g := by + have hL1 : 1 ≤ L := le_trans one_le_two hL + have hsL := add_one_div_toReal_lt hp hs1 hL + have hEfin := fun j => (Ω.graph j).modNorm_graphExtension_lt_top hp hL hs hs1 hq (hGfin j) + have hFfin := fun j => modNorm_mulLp_lt_top hp (hζs j) (hC j) hsL hq (hEfin j) + have hsum := Ω.modNorm_extensionSum_lt_top hp hL hs hs1 hq hζs hC G hGfin + refine Ω.eventually_aeBoundary_iff.2 fun k => ?_ + -- the trace in the chart of `Ω_k` + have htr := (Ω.graph k).trace_finsetSum hp L hs hq Finset.univ + (F := fun j => mulLp (hζs j).continuous (norm_le_of_iteratedFDeriv_le (hC j)) + ((Ω.graph j).graphExtension hp 1 (G j))) fun j _ => hFfin j + have hmul := fun j => (Ω.graph k).trace_mulLp_ae hp hL1 hs hsL hq (hζs j) (hC j) (hEfin j) + have hcc := fun j => (Ω.graph k).trace_ae_eq_trace_comp (Ω.graph j) hp hL1 hs hsL hq (hEfin j) + have hGj := fun j => (Ω.graph k).ae_proj_graphMap (Ω.graph j) (hG j) + filter_upwards [Ω.boundaryTrace_graphMap ψ hp hL1 hs hsL hq hsum k, + Lp.coeFn_fun_finsetSum Finset.univ fun j => (Ω.graph k).trace hp L + (mulLp (hζs j).continuous (norm_le_of_iteratedFDeriv_le (hC j)) + ((Ω.graph j).graphExtension hp 1 (G j))), + ae_all_iff.2 hmul, ae_all_iff.2 hcc, ae_all_iff.2 hGj] with x' h1 h2 h3 h4 h5 hk + have hΓ := Ω.graphMap_mem_frontier k hk + have hterm : ∀ j, (Ω.graph k).trace hp L (mulLp (hζs j).continuous + (norm_le_of_iteratedFDeriv_le (hC j)) ((Ω.graph j).graphExtension hp 1 (G j))) x' = + ψ.toComplex j ((Ω.graph k).graphMap x') * g ((Ω.graph k).graphMap x') := fun j => by + rw [h3 j] + by_cases hζ : ζ j ((Ω.graph k).graphMap x') = 0 + · have hψ : ψ.toFun j ((Ω.graph k).graphMap x') = 0 := by + by_contra hψ + rw [hζ1 j _ hψ] at hζ + exact one_ne_zero hζ + rw [hζ, ψ.toComplex_of_eq_zero hψ, zero_mul, zero_mul] + · have hA := Ω.graphMap_proj_graphMap k j hk (hζB j _ hζ) + have h5' := h5 j hA + rw [hA] at h5' + rw [h4 j hA, (Ω.graph j).trace_graphExtension hp hL hs hs1 hq (hGfin j), h5'] + by_cases hψ : ψ.toFun j ((Ω.graph k).graphMap x') = 0 + · rw [ψ.toComplex_of_eq_zero hψ, zero_mul, mul_zero] + · rw [hζ1 j _ hψ, one_mul] + rw [h1 hk, htr, h2, Finset.sum_congr rfl fun j _ => hterm j, ← Finset.sum_mul, + ψ.sum_toComplex_eq_one hΓ, one_mul] + +/-- **Every function of `B^s_{p,q}(Γ)` is a boundary trace** (Schneider–Vybíral, Theorem 4.11, for +`p ≥ 1`, the extension): for `1 ≤ p < ∞`, `0 < s < 1`, `1 ≤ q ≤ ∞` and `L ≥ 2`, every +`g ∈ B^s_{p,q}(Γ)` is `Tr_Γ F` almost everywhere on `Γ` for some `F` with +`‖F‖_p + ‖(2^(k(s+1/p)) ω_L(F, 2^(-k))_p)_k‖_{ℓ_q} < ∞`. With the chart pieces `G_j` of `g`, +`F = ∑_j ζ_j E_j G_j` with the extensions `E_j` of the graph domains +(`Rd.LipschitzGraph.graphExtension`) and the cut-offs `ζ_j` +(`Rd.BoundedLipschitzDomain.BoundaryPartition.exists_cutoff`, +`Rd.BoundedLipschitzDomain.boundaryTrace_extensionSum_eventuallyEq`). -/ +theorem exists_boundaryTrace_eq (ψ : Ω.BoundaryPartition) (hp : p ≠ ∞) {L : ℕ} (hL : 2 ≤ L) + {s : ℝ} (hs : 0 < s) (hs1 : s < 1) {q : ℝ≥0∞} (hq : 1 ≤ q) {g : V → ℂ} + (hg : Ω.MemBoundaryBesov p ψ s q g) : + ∃ F : Lp ℂ p (volume : Measure V), ‖F‖ₑ + lqNorm q (fun k => + dyadicWeight (s + 1 / p.toReal) k * lpModulus p L F k) < ∞ ∧ + Ω.boundaryTrace ψ hp L F =ᶠ[Ω.aeBoundary] g := by + choose G hG hGfin using hg + choose ζ hζs hζc hζB hζ1 using ψ.exists_cutoff + choose C hC using fun j => exists_iteratedFDeriv_bound (hζs j) (hζc j) L + exact ⟨_, Ω.modNorm_extensionSum_lt_top hp hL hs hs1 hq hζs hC G hGfin, + Ω.boundaryTrace_extensionSum_eventuallyEq ψ hp hL hs hs1 hq hζs hζB hζ1 hC G hG hGfin⟩ + +/-- **The trace space of a bounded Lipschitz domain** (Schneider–Vybíral, Theorem 4.11, for +`p ≥ 1`): for `1 ≤ p < ∞`, `0 < s < 1`, `1 ≤ q ≤ ∞` and `L ≥ 2`, `g ∈ B^s_{p,q}(Γ)` iff +`g = Tr_Γ F` almost everywhere on `Γ` for some `F` with +`‖F‖_p + ‖(2^(k(s+1/p)) ω_L(F, 2^(-k))_p)_k‖_{ℓ_q} < ∞`. -/ +theorem exists_boundaryTrace_eq_iff (ψ : Ω.BoundaryPartition) (hp : p ≠ ∞) {L : ℕ} + (hL : 2 ≤ L) {s : ℝ} (hs : 0 < s) (hs1 : s < 1) {q : ℝ≥0∞} (hq : 1 ≤ q) (g : V → ℂ) : + (∃ F : Lp ℂ p (volume : Measure V), ‖F‖ₑ + lqNorm q (fun k => + dyadicWeight (s + 1 / p.toReal) k * lpModulus p L F k) < ∞ ∧ + Ω.boundaryTrace ψ hp L F =ᶠ[Ω.aeBoundary] g) ↔ Ω.MemBoundaryBesov p ψ s q g := by + refine ⟨fun ⟨F, hF, hFg⟩ => ?_, Ω.exists_boundaryTrace_eq ψ hp hL hs hs1 hq⟩ + exact (Ω.memBoundaryBesov_boundaryTrace ψ hp (le_trans one_le_two hL) hs hs1 + (add_one_div_toReal_lt hp hs1 hL) hq hF).congr hFg + +/-- **`B^s_{p,q}(Γ)` does not depend on the resolution of unity**: for two resolutions `ψ`, `ψ'`, +both spaces consist of the boundary traces, which agree almost everywhere on `Γ`. -/ +theorem memBoundaryBesov_iff_of_boundaryPartition (ψ ψ' : Ω.BoundaryPartition) (hp : p ≠ ∞) + {s : ℝ} (hs : 0 < s) (hs1 : s < 1) {q : ℝ≥0∞} (hq : 1 ≤ q) (g : V → ℂ) : + Ω.MemBoundaryBesov p ψ s q g ↔ Ω.MemBoundaryBesov p ψ' s q g := by + have hsL := add_one_div_toReal_lt hp hs1 (le_refl 2) + rw [← Ω.exists_boundaryTrace_eq_iff ψ hp le_rfl hs hs1 hq, + ← Ω.exists_boundaryTrace_eq_iff ψ' hp le_rfl hs hs1 hq] + exact exists_congr fun F => and_congr_right fun hF => + ⟨fun h => (Ω.boundaryTrace_eventuallyEq ψ' ψ hp one_le_two hs hsL hq hF).trans h, + fun h => (Ω.boundaryTrace_eventuallyEq ψ ψ' hp one_le_two hs hsL hq hF).trans h⟩ + +/-- `g` is **the boundary trace of `f`**: `Tr_Γ F = g` almost everywhere on `Γ` for every `F` with +`F = f` on `Ω` and `‖F‖_p + ‖(2^(kσ) ω_L(F, 2^(-k))_p)_k‖_{ℓ_q} < ∞`. For `f` with a finite +intrinsic norm on `Ω`, `0 < σ < L` and `1 ≤ q` such `F` exist +(`Rd.BoundedLipschitzDomain.exists_besov_extension_of_modulusOn`), and they all have the same +boundary trace (`Rd.BoundedLipschitzDomain.boundaryTrace_congr`). The predicate makes a statement +only when an admissible `F` exists; `Rd.BoundedLipschitzDomain.HasBoundaryTrace` adds the finite +intrinsic norm. -/ +def IsBoundaryTrace (ψ : Ω.BoundaryPartition) (hp : p ≠ ∞) (L : ℕ) (σ : ℝ) (q : ℝ≥0∞) + (f : Lp ℂ p (volume : Measure V)) (g : V → ℂ) : Prop := + ∀ F : Lp ℂ p (volume : Measure V), indicatorLp Ω.measurableSet F = indicatorLp Ω.measurableSet f → + ‖F‖ₑ + lqNorm q (fun k => dyadicWeight σ k * lpModulus p L F k) < ∞ → + Ω.boundaryTrace ψ hp L F =ᶠ[Ω.aeBoundary] g + +/-- **The trace space of `B^{s+1/p}_{p,q}(Ω)`** (Schneider–Vybíral, Theorem 4.11, for `p ≥ 1`): for +`1 ≤ p < ∞`, `0 < s < 1`, `1 ≤ q ≤ ∞` and `L ≥ 2`, `g ∈ B^s_{p,q}(Γ)` iff `g` is the boundary trace +of some `f` with `‖f‖_{L_p(Ω)} + ‖(2^(k(s+1/p)) ω_L(f, 2^(-k), Ω)_p)_k‖_{ℓ_q} < ∞`. -/ +theorem memBoundaryBesov_iff_exists_isBoundaryTrace (ψ : Ω.BoundaryPartition) (hp : p ≠ ∞) + {L : ℕ} (hL : 2 ≤ L) {s : ℝ} (hs : 0 < s) (hs1 : s < 1) {q : ℝ≥0∞} (hq : 1 ≤ q) + (g : V → ℂ) : + Ω.MemBoundaryBesov p ψ s q g ↔ ∃ f : Lp ℂ p (volume : Measure V), + modNormOn Ω.measurableSet L (s + 1 / p.toReal) q f < ∞ ∧ + Ω.IsBoundaryTrace ψ hp L (s + 1 / p.toReal) q f g := by + have hsL := add_one_div_toReal_lt hp hs1 hL + have hL1 : 1 ≤ L := le_trans one_le_two hL + constructor + · intro hg + obtain ⟨F, hF, hFg⟩ := Ω.exists_boundaryTrace_eq ψ hp hL hs hs1 hq hg + refine ⟨F, (modNormOn_le_modNorm_of_indicatorLp Ω.measurableSet L _ q rfl).trans_lt hF, + fun F' hF'F hF' => ?_⟩ + exact (Ω.boundaryTrace_congr ψ hp hL1 hs hsL hq hF' hF + (ae_eq_of_indicatorLp_eq Ω.measurableSet hF'F)).trans hFg + · rintro ⟨f, hf, hfg⟩ + obtain ⟨F, hFf, hF⟩ := Ω.exists_besov_extension_of_modulusOn hp (by positivity) hsL hq hf + exact (Ω.memBoundaryBesov_boundaryTrace ψ hp hL1 hs hs1 hsL hq hF).congr (hfg F hFf hF) + +/-- **Existence of the boundary trace**: for `1 ≤ p < ∞`, `0 < s < 1`, `1 ≤ q ≤ ∞` and `L ≥ 2`, +every `f` with `‖f‖_{L_p(Ω)} + ‖(2^(k(s+1/p)) ω_L(f, 2^(-k), Ω)_p)_k‖_{ℓ_q} < ∞` has a boundary +trace `g ∈ B^s_{p,q}(Γ)`, namely `Tr_Γ F` for an extension `F` of `f` +(`Rd.BoundedLipschitzDomain.exists_besov_extension_of_modulusOn`). -/ +theorem exists_isBoundaryTrace_of_modNormOn_lt_top (ψ : Ω.BoundaryPartition) (hp : p ≠ ∞) + {L : ℕ} (hL : 2 ≤ L) {s : ℝ} (hs : 0 < s) (hs1 : s < 1) {q : ℝ≥0∞} (hq : 1 ≤ q) + {f : Lp ℂ p (volume : Measure V)} + (hf : modNormOn Ω.measurableSet L (s + 1 / p.toReal) q f < ∞) : + ∃ g : V → ℂ, Ω.MemBoundaryBesov p ψ s q g ∧ + Ω.IsBoundaryTrace ψ hp L (s + 1 / p.toReal) q f g := by + have hsL := add_one_div_toReal_lt hp hs1 hL + have hL1 : 1 ≤ L := le_trans one_le_two hL + obtain ⟨F, hFf, hF⟩ := Ω.exists_besov_extension_of_modulusOn hp (by positivity) hsL hq hf + refine ⟨Ω.boundaryTrace ψ hp L F, Ω.memBoundaryBesov_boundaryTrace ψ hp hL1 hs hs1 hsL hq hF, + fun F' hF'f hF' => ?_⟩ + exact Ω.boundaryTrace_congr ψ hp hL1 hs hsL hq hF' hF + (ae_eq_of_indicatorLp_eq Ω.measurableSet (hF'f.trans hFf.symm)) + +variable {Ω} in +/-- **Uniqueness of the boundary trace**: for `1 ≤ p < ∞`, `0 < σ < L` and `1 ≤ q ≤ ∞`, two +boundary traces `g`, `g'` of an `f` with +`‖f‖_{L_p(Ω)} + ‖(2^(kσ) ω_L(f, 2^(-k), Ω)_p)_k‖_{ℓ_q} < ∞` agree almost everywhere on `Γ`: both +are `Tr_Γ F` for one extension `F` of `f` +(`Rd.BoundedLipschitzDomain.exists_besov_extension_of_modulusOn`). -/ +theorem IsBoundaryTrace.unique {ψ : Ω.BoundaryPartition} {hp : p ≠ ∞} {L : ℕ} {σ : ℝ} + (hσ : 0 < σ) (hσL : σ < L) {q : ℝ≥0∞} (hq : 1 ≤ q) {f : Lp ℂ p (volume : Measure V)} + (hf : modNormOn Ω.measurableSet L σ q f < ∞) {g g' : V → ℂ} + (hg : Ω.IsBoundaryTrace ψ hp L σ q f g) (hg' : Ω.IsBoundaryTrace ψ hp L σ q f g') : + g =ᶠ[Ω.aeBoundary] g' := by + obtain ⟨F, hFf, hF⟩ := Ω.exists_besov_extension_of_modulusOn hp hσ hσL hq hf + exact (hg F hFf hF).symm.trans (hg' F hFf hF) + +/-! ### Boundary traces of functions with a finite intrinsic norm -/ + +/-- `f` **has the boundary trace `g`**: `f` has a finite intrinsic norm on `Ω`, +`‖f‖_{L_p(Ω)} + ‖(2^(kσ) ω_L(f, 2^(-k), Ω)_p)_k‖_{ℓ_q} < ∞`, and `g` is the boundary trace of `f` +in the sense of `Rd.BoundedLipschitzDomain.IsBoundaryTrace`: `Tr_Γ F = g` almost everywhere on `Γ` +for every `F` with `F = f` on `Ω` and `‖F‖_p + ‖(2^(kσ) ω_L(F, 2^(-k))_p)_k‖_{ℓ_q} < ∞`. For +`0 < σ < L` and `1 ≤ q` the finite intrinsic norm provides such an `F` +(`Rd.BoundedLipschitzDomain.exists_besov_extension_of_modulusOn`), so the trace condition is a +statement about at least one extension. -/ +structure HasBoundaryTrace (ψ : Ω.BoundaryPartition) (hp : p ≠ ∞) (L : ℕ) (σ : ℝ) (q : ℝ≥0∞) + (f : Lp ℂ p (volume : Measure V)) (g : V → ℂ) : Prop where + /-- The intrinsic quasi-norm + `N_Ω(f) = ‖f‖_{L_p(Ω)} + ‖(2^(kσ) ω_L(f, 2^(-k), Ω)_p)_k‖_{ℓ_q}` of `f` on `Ω` + (`Rd.modNormOn`) is finite, as in the hypotheses of the `IsBoundaryTrace` theorems above. -/ + modNormOn_lt_top : modNormOn Ω.measurableSet L σ q f < ∞ + /-- `g` is the boundary trace of every admissible extension of `f`. -/ + isBoundaryTrace : Ω.IsBoundaryTrace ψ hp L σ q f g + +/-- `f` **has the boundary trace `g`** iff the intrinsic norm +`‖f‖_{L_p(Ω)} + ‖(2^(kσ) ω_L(f, 2^(-k), Ω)_p)_k‖_{ℓ_q}` is finite and `g` is the boundary trace of +`f` in the sense of `Rd.BoundedLipschitzDomain.IsBoundaryTrace`: the two fields of +`Rd.BoundedLipschitzDomain.HasBoundaryTrace`. -/ +theorem hasBoundaryTrace_iff {ψ : Ω.BoundaryPartition} {hp : p ≠ ∞} {L : ℕ} {σ : ℝ} {q : ℝ≥0∞} + {f : Lp ℂ p (volume : Measure V)} {g : V → ℂ} : + Ω.HasBoundaryTrace ψ hp L σ q f g ↔ + modNormOn Ω.measurableSet L σ q f < ∞ ∧ + Ω.IsBoundaryTrace ψ hp L σ q f g := + ⟨fun h => ⟨h.1, h.2⟩, fun h => ⟨h.1, h.2⟩⟩ + +/-- **The trace space of `B^{s+1/p}_{p,q}(Ω)`**, with `Rd.BoundedLipschitzDomain.HasBoundaryTrace`: +for `1 ≤ p < ∞`, `0 < s < 1`, `1 ≤ q ≤ ∞` and `L ≥ 2`, `g ∈ B^s_{p,q}(Γ)` iff some `f` with a +finite intrinsic norm of order `s + 1/p` on `Ω` has the boundary trace `g` +(`Rd.BoundedLipschitzDomain.memBoundaryBesov_iff_exists_isBoundaryTrace`). -/ +theorem memBoundaryBesov_iff_exists_hasBoundaryTrace (ψ : Ω.BoundaryPartition) (hp : p ≠ ∞) + {L : ℕ} (hL : 2 ≤ L) {s : ℝ} (hs : 0 < s) (hs1 : s < 1) {q : ℝ≥0∞} (hq : 1 ≤ q) + (g : V → ℂ) : + Ω.MemBoundaryBesov p ψ s q g ↔ ∃ f : Lp ℂ p (volume : Measure V), + Ω.HasBoundaryTrace ψ hp L (s + 1 / p.toReal) q f g := by + simp only [hasBoundaryTrace_iff] + exact Ω.memBoundaryBesov_iff_exists_isBoundaryTrace ψ hp hL hs hs1 hq g + +/-- **Boundary traces lie in `B^s_{p,q}(Γ)`**: for `1 ≤ p < ∞`, `0 < s < 1`, `1 ≤ q ≤ ∞` and +`L ≥ 2`, if `f` has the boundary trace `g` for the order `s + 1/p`, then `g ∈ B^s_{p,q}(Γ)`. -/ +theorem HasBoundaryTrace.memBoundaryBesov {ψ : Ω.BoundaryPartition} {hp : p ≠ ∞} {L : ℕ} + (hL : 2 ≤ L) {s : ℝ} (hs : 0 < s) (hs1 : s < 1) {q : ℝ≥0∞} (hq : 1 ≤ q) + {f : Lp ℂ p (volume : Measure V)} {g : V → ℂ} + (h : Ω.HasBoundaryTrace ψ hp L (s + 1 / p.toReal) q f g) : Ω.MemBoundaryBesov p ψ s q g := + (Ω.memBoundaryBesov_iff_exists_hasBoundaryTrace ψ hp hL hs hs1 hq g).2 ⟨f, h⟩ + +/-- **Existence of the boundary trace**, with `Rd.BoundedLipschitzDomain.HasBoundaryTrace`: for +`1 ≤ p < ∞`, `0 < s < 1`, `1 ≤ q ≤ ∞` and `L ≥ 2`, every `f` with +`‖f‖_{L_p(Ω)} + ‖(2^(k(s+1/p)) ω_L(f, 2^(-k), Ω)_p)_k‖_{ℓ_q} < ∞` has a boundary trace +`g ∈ B^s_{p,q}(Γ)` (`Rd.BoundedLipschitzDomain.exists_isBoundaryTrace_of_modNormOn_lt_top`). -/ +theorem exists_hasBoundaryTrace_of_modNormOn_lt_top (ψ : Ω.BoundaryPartition) (hp : p ≠ ∞) + {L : ℕ} (hL : 2 ≤ L) {s : ℝ} (hs : 0 < s) (hs1 : s < 1) {q : ℝ≥0∞} (hq : 1 ≤ q) + {f : Lp ℂ p (volume : Measure V)} + (hf : modNormOn Ω.measurableSet L (s + 1 / p.toReal) q f < ∞) : + ∃ g : V → ℂ, Ω.MemBoundaryBesov p ψ s q g ∧ + Ω.HasBoundaryTrace ψ hp L (s + 1 / p.toReal) q f g := by + obtain ⟨g, hg, hfg⟩ := Ω.exists_isBoundaryTrace_of_modNormOn_lt_top ψ hp hL hs hs1 hq hf + exact ⟨g, hg, hf, hfg⟩ + +variable {Ω} in +/-- **Uniqueness of the boundary trace**, with `Rd.BoundedLipschitzDomain.HasBoundaryTrace`: for +`1 ≤ p < ∞`, `0 < σ < L` and `1 ≤ q ≤ ∞`, two boundary traces `g`, `g'` of `f` agree almost +everywhere on `Γ` (`Rd.BoundedLipschitzDomain.IsBoundaryTrace.unique`). -/ +theorem HasBoundaryTrace.unique {ψ : Ω.BoundaryPartition} {hp : p ≠ ∞} {L : ℕ} {σ : ℝ} + (hσ : 0 < σ) (hσL : σ < L) {q : ℝ≥0∞} (hq : 1 ≤ q) {f : Lp ℂ p (volume : Measure V)} + {g g' : V → ℂ} (hg : Ω.HasBoundaryTrace ψ hp L σ q f g) + (hg' : Ω.HasBoundaryTrace ψ hp L σ q f g') : g =ᶠ[Ω.aeBoundary] g' := + hg.isBoundaryTrace.unique hσ hσL hq hg.modNormOn_lt_top hg'.isBoundaryTrace + +end BoundedLipschitzDomain + +end Rd diff --git a/LeanPool/FunctionSpaces/Domains/Traces/MollifiedGraph.lean b/LeanPool/FunctionSpaces/Domains/Traces/MollifiedGraph.lean new file mode 100644 index 0000000000..003294b00c --- /dev/null +++ b/LeanPool/FunctionSpaces/Domains/Traces/MollifiedGraph.lean @@ -0,0 +1,620 @@ +/- +Copyright (c) 2026 Mario Ullrich. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Mario Ullrich +-/ +module + +public import LeanPool.FunctionSpaces.Domains.Traces.GraphTrace + +/- +Modified for Lean Pool: module names and imports adapted. +-/ + +/-! +# The mollified graph and the vertical cut-off + +To extend functions from the boundary of a Lipschitz graph domain `Ω = {φ(x) < ⟪x, e⟫}` into `V` +with smoothness above `1`, the graph is replaced at each scale `2^(-j)` by a smoothed one: +`φ_j = Re (ρ_{2^j} ⋆ φ)` on the hyperplane `H` (`Rd.LipschitzGraph.smoothGraph`), with `ρ` the +moment kernel of order `2` of a bump of radius `1`. Only differences enter, no derivatives of +convolutions: + +* `φ_j` is Lipschitz with constant `M ‖ρ‖_1` (`Rd.LipschitzGraph.abs_smoothGraph_sub_le`); +* `|φ_j - φ| ≤ 2 M ‖ρ‖_1 2^(-j)` (`Rd.LipschitzGraph.abs_smoothGraph_sub_phi_le`); +* `|Δ_h^2 φ_j| ≤ 4 M ‖D^2 ρ‖_1 2^j ‖h‖^2` for `‖h‖ ≤ 2^(-j)` + (`Rd.LipschitzGraph.abs_second_smoothGraph_le`), since `Δ_h^2 (ρ_{2^j} ⋆ φ) = (Δ_h^2 ρ_{2^j}) ⋆ φ` + and `∫ Δ_h^2 ρ_{2^j} = 0`. + +The **vertical cut-off** `v_j(x) = χ(2^j (⟪x, e⟫ - φ_j(Px)))` (`Rd.LipschitzGraph.vertCutoff`), +with a smooth profile `χ` equal to `1` on `[-c, c]`, `c > 2 M ‖ρ‖_1`, equals `1` on the boundary +(`Rd.LipschitzGraph.vertCutoff_graphMap`), vanishes at distance `(c + 1) 2^(-j)` above or below the +smoothed graph, and has `|Δ_h^m v_j| ≤ B min(1, (2^j ‖h‖)^m)` for `m ≤ 2` +(`Rd.LipschitzGraph.enorm_higherDiff_vertCutoff_le`): by the chain rule for differences, +`Δ_h^2 (χ ∘ ψ) = [χ(ψ_2) - χ(2ψ_1 - ψ_0)] + Δ_t^2 χ(ψ_0)` with `t = ψ_1 - ψ_0`. +-/ + +@[expose] public section + +open MeasureTheory Filter Topology Module Metric +open scoped ENNReal + +open ENNReal (lqNorm dyadicWeight) + +namespace Rd + +/-! ### Differences of length one and two -/ + +section Differences + +variable {W : Type*} [NormedAddCommGroup W] [NormedSpace ℝ W] + +omit [NormedSpace ℝ W] in +/-- `Δ_h f(x) = f(x + h) - f(x)`. -/ +theorem higherDiff_one_apply (h : W) (f : W → ℂ) (x : W) : + (fwdDiff h)^[1] f x = f (x + h) - f x := by + rw [Function.iterate_one, fwdDiff_eq_sub, Pi.sub_apply] + +/-- `Δ_h^2 f(x) = f(x + 2h) - 2 f(x + h) + f(x)`. -/ +theorem higherDiff_two_apply (h : W) (f : W → ℂ) (x : W) : + (fwdDiff h)^[2] f x = f (x + (2 : ℝ) • h) - 2 * f (x + h) + f x := by + rw [higherDiff_apply] + simp [Finset.sum_range_succ] + ring + +end Differences + +/-! ### Convolution with Lipschitz functions -/ + +section Lipschitz + +variable {W : Type*} [NormedAddCommGroup W] [InnerProductSpace ℝ W] [FiniteDimensional ℝ W] + [MeasurableSpace W] [BorelSpace W] + +/-- `∫ Δ_h^r K = 0` for integrable `K` and `r ≥ 1`: a difference integrates to `0`. -/ +theorem integral_higherDiff_eq_zero {K : W → ℂ} (hK : Integrable K) {r : ℕ} (hr : 1 ≤ r) (h : W) : + ∫ x, (fwdDiff h)^[r] K x = 0 := by + obtain ⟨r', rfl⟩ : ∃ r', r = r' + 1 := ⟨r - 1, by omega⟩ + have hg := integrable_higherDiff hK r' h + have heq : ∀ x, (fwdDiff h)^[r' + 1] K x = + (fwdDiff h)^[r'] K (x + h) - (fwdDiff h)^[r'] K x := fun x => by + rw [Function.iterate_succ_apply', fwdDiff_eq_sub, Pi.sub_apply] + simp_rw [heq] + rw [integral_sub (hg.comp_add_right h) hg, integral_add_right_eq_self, sub_self] + +/-- **Convolution keeps Lipschitz bounds**: for `u` with `‖u(x) - u(y)‖ ≤ M ‖x - y‖`, +`‖(K ⋆ u)(x) - (K ⋆ u)(y)‖ ≤ M ‖K‖_1 ‖x - y‖`. -/ +theorem norm_conv_sub_conv_le {K u : W → ℂ} (hK : Integrable K) {M : ℝ} + (hu : ∀ x y, ‖u x - u y‖ ≤ M * ‖x - y‖) + (hint : ∀ x, Integrable (fun z => K z * u (x - z))) (x y : W) : + ‖conv K u volume x - conv K u volume y‖ ≤ M * (∫ z, ‖K z‖) * ‖x - y‖ := by + rw [conv_apply, conv_apply, ← integral_sub (hint x) (hint y)] + calc ‖∫ z, (K z * u (x - z) - K z * u (y - z))‖ ≤ ∫ z, ‖K z‖ * (M * ‖x - y‖) := + norm_integral_le_of_norm_le (hK.norm.mul_const _) (Eventually.of_forall fun z => by + rw [← mul_sub, norm_mul] + refine mul_le_mul_of_nonneg_left ?_ (norm_nonneg _) + have h := hu (x - z) (y - z) + rwa [sub_sub_sub_cancel_right] at h) + _ = M * (∫ z, ‖K z‖) * ‖x - y‖ := by + rw [integral_mul_const] + ring + +/-- **Convolution moves Lipschitz functions little**: for `∫ K = 1` and `K = 0` outside +`B̄(0, R)`, `‖(K ⋆ u)(x) - u(x)‖ ≤ M R ‖K‖_1`. -/ +theorem norm_conv_sub_self_le {K u : W → ℂ} (hK : Integrable K) (h1 : ∫ z, K z = 1) {R : ℝ} + (hKR : ∀ z, R < ‖z‖ → K z = 0) {M : ℝ} (hM : 0 ≤ M) (hu : ∀ x y, ‖u x - u y‖ ≤ M * ‖x - y‖) + {x : W} (hint : Integrable (fun z => K z * u (x - z))) : + ‖conv K u volume x - u x‖ ≤ M * R * ∫ z, ‖K z‖ := by + have hux : u x = ∫ z, K z * u x := by rw [integral_mul_const, h1, one_mul] + rw [conv_apply, hux, ← integral_sub hint (hK.mul_const _)] + calc ‖∫ z, (K z * u (x - z) - K z * u x)‖ ≤ ∫ z, ‖K z‖ * (M * R) := + norm_integral_le_of_norm_le (hK.norm.mul_const _) (Eventually.of_forall fun z => by + rw [← mul_sub, norm_mul] + by_cases hz : K z = 0 + · simp [hz] + refine mul_le_mul_of_nonneg_left ?_ (norm_nonneg _) + have hzR : ‖z‖ ≤ R := not_lt.1 fun h => hz (hKR z h) + calc ‖u (x - z) - u x‖ ≤ M * ‖x - z - x‖ := hu _ _ + _ = M * ‖z‖ := by rw [sub_sub_cancel_left, norm_neg] + _ ≤ M * R := mul_le_mul_of_nonneg_left hzR hM) + _ = M * R * ∫ z, ‖K z‖ := by + rw [integral_mul_const] + ring + +/-- **Second differences of convolutions with Lipschitz functions**: for `K = 0` outside +`B̄(0, R)`, `‖Δ_h^2 (K ⋆ u)(x)‖ ≤ M (R + 2‖h‖) ‖Δ_h^2 K‖_1`, since +`Δ_h^2 (K ⋆ u) = (Δ_h^2 K) ⋆ u` and `∫ Δ_h^2 K = 0`. -/ +theorem norm_higherDiff_two_conv_le {K u : W → ℂ} (hK : Integrable K) {R : ℝ} + (hKR : ∀ z, R < ‖z‖ → K z = 0) {M : ℝ} (hM : 0 ≤ M) + (hu : ∀ x y, ‖u x - u y‖ ≤ M * ‖x - y‖) + (htr : ∀ v x, Integrable (fun z => K (z + v) * u (x - z))) (h x : W) : + ‖(fwdDiff h)^[2] (conv K u volume) x‖ ≤ M * (R + 2 * ‖h‖) * ∫ z, ‖(fwdDiff h)^[2] K z‖ := by + rw [higherDiff_conv_apply htr 2 h x, conv_apply] + have hint2 : Integrable (fun z => (fwdDiff h)^[2] K z * u (x - z)) := by + simp_rw [higherDiff_apply, Finset.sum_mul] + exact integrable_finsetSum _ fun l _ => + ((htr ((l : ℝ) • h) x).const_mul ((-1 : ℂ) ^ (2 - l) * (Nat.choose 2 l : ℂ))).congr + (Eventually.of_forall fun z => by ring) + have h0 : ∫ z, (fwdDiff h)^[2] K z * u x = 0 := by + rw [integral_mul_const, integral_higherDiff_eq_zero hK (by norm_num), zero_mul] + rw [← sub_zero (∫ z, (fwdDiff h)^[2] K z * u (x - z)), ← h0, + ← integral_sub hint2 ((integrable_higherDiff hK 2 h).mul_const _)] + calc ‖∫ z, ((fwdDiff h)^[2] K z * u (x - z) - (fwdDiff h)^[2] K z * u x)‖ + ≤ ∫ z, ‖(fwdDiff h)^[2] K z‖ * (M * (R + 2 * ‖h‖)) := + norm_integral_le_of_norm_le ((integrable_higherDiff hK 2 h).norm.mul_const _) + (Eventually.of_forall fun z => by + rw [← mul_sub, norm_mul] + by_cases hz : (fwdDiff h)^[2] K z = 0 + · simp [hz] + refine mul_le_mul_of_nonneg_left ?_ (norm_nonneg _) + have hzR : ‖z‖ ≤ R + 2 * ‖h‖ := by + rw [higherDiff_apply] at hz + obtain ⟨l, hl, hl0⟩ : ∃ l ∈ Finset.range (2 + 1), K (z + (l : ℝ) • h) ≠ 0 := by + by_contra hcon + push Not at hcon + exact hz (Finset.sum_eq_zero fun l hl => by rw [hcon l hl, mul_zero]) + have h1 : ‖z + (l : ℝ) • h‖ ≤ R := not_lt.1 fun h' => hl0 (hKR _ h') + have hl' : (l : ℝ) ≤ 2 := by + exact_mod_cast Nat.lt_succ_iff.1 (Finset.mem_range.1 hl) + have h2 : ‖(l : ℝ) • h‖ ≤ 2 * ‖h‖ := by + rw [norm_smul, Real.norm_of_nonneg (Nat.cast_nonneg l)] + exact mul_le_mul_of_nonneg_right hl' (norm_nonneg h) + calc ‖z‖ = ‖(z + (l : ℝ) • h) - (l : ℝ) • h‖ := by rw [add_sub_cancel_right] + _ ≤ ‖z + (l : ℝ) • h‖ + ‖(l : ℝ) • h‖ := norm_sub_le _ _ + _ ≤ R + 2 * ‖h‖ := add_le_add h1 h2 + calc ‖u (x - z) - u x‖ ≤ M * ‖x - z - x‖ := hu _ _ + _ = M * ‖z‖ := by rw [sub_sub_cancel_left, norm_neg] + _ ≤ M * (R + 2 * ‖h‖) := mul_le_mul_of_nonneg_left hzR hM) + _ = M * (R + 2 * ‖h‖) * ∫ z, ‖(fwdDiff h)^[2] K z‖ := by + rw [integral_mul_const] + ring + +end Lipschitz + +namespace LocalMeansBump + +variable {W : Type*} [NormedAddCommGroup W] [InnerProductSpace ℝ W] [FiniteDimensional ℝ W] + [MeasurableSpace W] [BorelSpace W] (b : LocalMeansBump W) + +/-- `∫ |m_{2^j}| = ∫ |m|`. -/ +theorem integral_norm_scaled (L j : ℕ) : + ∫ z, ‖b.scaled L j z‖ = ∫ z, ‖momentKernel b.toFun L z‖ := by + have hm := integrable_momentKernel b.integrable L + rw [integral_norm_eq_lintegral_eNorm (b.integrable_scaled L j).aestronglyMeasurable, + integral_norm_eq_lintegral_eNorm hm.aestronglyMeasurable, + ← eLpNorm_one_eq_lintegral_eNorm (b.integrable_scaled L j).aestronglyMeasurable, + ← eLpNorm_one_eq_lintegral_eNorm hm.aestronglyMeasurable, b.eLpNorm_scaled_one] + +/-- `∫ |Δ_v^L m_{2^j}| ≤ (2^j ‖v‖)^L ‖D^L m‖_1`, as real numbers. -/ +theorem integral_norm_higherDiff_scaled_le (L j : ℕ) (v : W) : + ∫ z, ‖(fwdDiff v)^[L] (b.scaled L j) z‖ ≤ (2 ^ j * ‖v‖) ^ L * (b.derivNorm L).toReal := by + have hint := integrable_higherDiff (b.integrable_scaled L j) L v + have hD : b.derivNorm L ≠ ∞ := lintegral_enorm_iteratedFDeriv_ne_top L _ + rw [integral_norm_eq_lintegral_eNorm hint.aestronglyMeasurable, + ← eLpNorm_one_eq_lintegral_eNorm hint.aestronglyMeasurable] + have h := b.eLpNorm_higherDiff_scaled_le L j v + calc (eLpNorm ((fwdDiff v)^[L] (b.scaled L j)) 1 volume).toReal + ≤ (ENNReal.ofReal (2 ^ j * ‖v‖) ^ L * b.derivNorm L).toReal := + ENNReal.toReal_mono (ENNReal.mul_ne_top (ENNReal.pow_ne_top ENNReal.ofReal_ne_top) hD) h + _ = (2 ^ j * ‖v‖) ^ L * (b.derivNorm L).toReal := by + rw [ENNReal.toReal_mul, ENNReal.toReal_pow, ENNReal.toReal_ofReal (by positivity)] + +end LocalMeansBump + +namespace LipschitzGraph + +variable {V : Type*} [NormedAddCommGroup V] [InnerProductSpace ℝ V] [FiniteDimensional ℝ V] + [MeasurableSpace V] [BorelSpace V] (Ω : LipschitzGraph V) + +/-! ### The mollified graph -/ + +/-- The graph function on `H`, as a complex function. -/ +noncomputable def graphFun (x' : Ω.hyperplane) : ℂ := (Ω.phi x' : ℂ) + +omit [FiniteDimensional ℝ V] [MeasurableSpace V] [BorelSpace V] in +/-- The graph function is Lipschitz with constant `M` on `H`. -/ +theorem norm_graphFun_sub_le (x' y' : Ω.hyperplane) : + ‖Ω.graphFun x' - Ω.graphFun y'‖ ≤ Ω.M * ‖x' - y'‖ := by + rw [graphFun, graphFun, ← Complex.ofReal_sub, Complex.norm_real, Real.norm_eq_abs] + have h := Ω.lipschitz x' y' + rwa [← Submodule.coe_sub, Submodule.norm_coe] at h + +omit [FiniteDimensional ℝ V] [MeasurableSpace V] [BorelSpace V] in +/-- The graph function is continuous. -/ +theorem continuous_graphFun : Continuous Ω.graphFun := + Complex.continuous_ofReal.comp (Ω.continuous_phi.comp continuous_subtype_val) + +/-- The mollifier on `H`: the centred bump of radius `1`. -/ +noncomputable def graphBump : LocalMeansBump Ω.hyperplane := LocalMeansBump.centered one_pos + +/-- The radius of the mollifier is `1`. -/ +theorem graphBump_radius : Ω.graphBump.radius = 1 := rfl + +/-- The `L_1` norm `‖ρ‖_1` of the mollifier `ρ`, the moment kernel of order `2`. -/ +noncomputable def graphBumpNorm : ℝ := ∫ z, ‖momentKernel Ω.graphBump.toFun 2 z‖ + +/-- `‖ρ‖_1 ≥ 0`. -/ +theorem graphBumpNorm_nonneg : 0 ≤ Ω.graphBumpNorm := integral_nonneg fun _ => norm_nonneg _ + +/-- The constant `‖D^2 ρ‖_1` of the second differences of the mollifier. -/ +noncomputable def graphBumpDeriv : ℝ := (Ω.graphBump.derivNorm 2).toReal + +/-- `‖D^2 ρ‖_1 ≥ 0`. -/ +theorem graphBumpDeriv_nonneg : 0 ≤ Ω.graphBumpDeriv := ENNReal.toReal_nonneg + +/-- The mollifier vanishes outside `B̄(0, 2 · 2^(-j))`. -/ +theorem graphBump_scaled_eq_zero (j : ℕ) (z : Ω.hyperplane) (hz : 2 / 2 ^ j < ‖z‖) : + Ω.graphBump.scaled 2 j z = 0 := + Ω.graphBump.scaled_eq_zero_of_lt 2 j (by rw [graphBump_radius]; simpa using hz) + +/-- The convolution integrals of the mollifiers with the graph function converge absolutely. -/ +theorem integrable_graphBump_mul (j : ℕ) (v x : Ω.hyperplane) : + Integrable (fun z => Ω.graphBump.scaled 2 j (z + v) * Ω.graphFun (x - z)) volume := + integrable_translate_mul_of_locallyIntegrable (Ω.graphBump.continuous_scaled 2 j) + (Ω.graphBump.hasCompactSupport_scaled 2 j) Ω.continuous_graphFun.locallyIntegrable v x + +/-- The **mollified graph** `φ_j = Re (ρ_{2^j} ⋆ φ)` on `H`. -/ +noncomputable def smoothGraph (j : ℕ) (x' : Ω.hyperplane) : ℝ := + (conv (Ω.graphBump.scaled 2 j) Ω.graphFun volume x').re + +/-- **The mollified graph is Lipschitz**: `|φ_j(x') - φ_j(y')| ≤ M ‖ρ‖_1 ‖x' - y'‖`. -/ +theorem abs_smoothGraph_sub_le (j : ℕ) (x' y' : Ω.hyperplane) : + |Ω.smoothGraph j x' - Ω.smoothGraph j y'| ≤ Ω.M * Ω.graphBumpNorm * ‖x' - y'‖ := by + rw [smoothGraph, smoothGraph, ← Complex.sub_re, graphBumpNorm, + ← Ω.graphBump.integral_norm_scaled 2 j] + exact (Complex.abs_re_le_norm _).trans (norm_conv_sub_conv_le (Ω.graphBump.integrable_scaled 2 j) + Ω.norm_graphFun_sub_le (fun x => by simpa using Ω.integrable_graphBump_mul j 0 x) x' y') + +/-- **The mollified graph is close to the graph**: `|φ_j - φ| ≤ 2 M ‖ρ‖_1 2^(-j)`. -/ +theorem abs_smoothGraph_sub_phi_le (j : ℕ) (x' : Ω.hyperplane) : + |Ω.smoothGraph j x' - Ω.phi x'| ≤ 2 * Ω.M * Ω.graphBumpNorm / 2 ^ j := by + have h1 : ∫ z, Ω.graphBump.scaled 2 j z = 1 := by + rw [LocalMeansBump.scaled, integral_dilate _ (by positivity)] + exact integral_momentKernel Ω.graphBump.integrable Ω.graphBump.integral_eq_one (by norm_num) + have h := norm_conv_sub_self_le (Ω.graphBump.integrable_scaled 2 j) h1 + (Ω.graphBump_scaled_eq_zero j) Ω.M_nonneg Ω.norm_graphFun_sub_le + (x := x') (by simpa using Ω.integrable_graphBump_mul j 0 x') + rw [Ω.graphBump.integral_norm_scaled 2 j] at h + have hre : Ω.smoothGraph j x' - Ω.phi x' = + (conv (Ω.graphBump.scaled 2 j) Ω.graphFun volume x' - Ω.graphFun x').re := by + rw [Complex.sub_re, smoothGraph, graphFun, Complex.ofReal_re] + rw [hre] + calc |(conv (Ω.graphBump.scaled 2 j) Ω.graphFun volume x' - Ω.graphFun x').re| + ≤ Ω.M * (2 / 2 ^ j) * Ω.graphBumpNorm := (Complex.abs_re_le_norm _).trans h + _ = 2 * Ω.M * Ω.graphBumpNorm / 2 ^ j := by ring + +/-- **Second differences of the mollified graph**: for `‖h'‖ ≤ 2^(-j)`, +`|φ_j(x' + 2h') - 2 φ_j(x' + h') + φ_j(x')| ≤ 4 M ‖D^2 ρ‖_1 2^j ‖h'‖^2`. -/ +theorem abs_second_smoothGraph_le (j : ℕ) {h' : Ω.hyperplane} (hh : ‖h'‖ ≤ 1 / 2 ^ j) + (x' : Ω.hyperplane) : + |Ω.smoothGraph j (x' + (2 : ℝ) • h') - 2 * Ω.smoothGraph j (x' + h') + Ω.smoothGraph j x'| ≤ + 4 * Ω.M * Ω.graphBumpDeriv * 2 ^ j * ‖h'‖ ^ 2 := by + have h := norm_higherDiff_two_conv_le (Ω.graphBump.integrable_scaled 2 j) + (Ω.graphBump_scaled_eq_zero j) Ω.M_nonneg Ω.norm_graphFun_sub_le + (Ω.integrable_graphBump_mul j) h' x' + have hD := Ω.graphBump.integral_norm_higherDiff_scaled_le 2 j h' + have hre : Ω.smoothGraph j (x' + (2 : ℝ) • h') - 2 * Ω.smoothGraph j (x' + h') + + Ω.smoothGraph j x' = ((fwdDiff h')^[2] (conv (Ω.graphBump.scaled 2 j) Ω.graphFun volume) + x').re := by + rw [higherDiff_two_apply] + simp [smoothGraph] + rw [hre] + have hR : 2 / 2 ^ j + 2 * ‖h'‖ ≤ 4 / 2 ^ j := by + have h2 : 2 * ‖h'‖ ≤ 2 / 2 ^ j := by + calc 2 * ‖h'‖ ≤ 2 * (1 / 2 ^ j) := by gcongr + _ = 2 / 2 ^ j := by ring + have h4 : (4 : ℝ) / 2 ^ j = 2 / 2 ^ j + 2 / 2 ^ j := by ring + linarith + have hpos : (0 : ℝ) < 2 ^ j := by positivity + calc |((fwdDiff h')^[2] (conv (Ω.graphBump.scaled 2 j) Ω.graphFun volume) x').re| + ≤ Ω.M * (2 / 2 ^ j + 2 * ‖h'‖) * ∫ z, ‖(fwdDiff h')^[2] (Ω.graphBump.scaled 2 j) z‖ := + (Complex.abs_re_le_norm _).trans h + _ ≤ Ω.M * (4 / 2 ^ j) * ((2 ^ j * ‖h'‖) ^ 2 * Ω.graphBumpDeriv) := + mul_le_mul (mul_le_mul_of_nonneg_left hR Ω.M_nonneg) hD + (integral_nonneg fun _ => norm_nonneg _) (mul_nonneg Ω.M_nonneg (by positivity)) + _ = 4 * Ω.M * Ω.graphBumpDeriv * 2 ^ j * ‖h'‖ ^ 2 := by + field_simp + +/-- The mollified graph is continuous. -/ +theorem continuous_smoothGraph (j : ℕ) : Continuous (Ω.smoothGraph j) := by + refine (LipschitzWith.of_dist_le_mul (K := ⟨Ω.M * Ω.graphBumpNorm, mul_nonneg Ω.M_nonneg + Ω.graphBumpNorm_nonneg⟩) fun x' y' => ?_).continuous + rw [Real.dist_eq, dist_eq_norm] + exact Ω.abs_smoothGraph_sub_le j x' y' + +/-! ### The vertical cut-off -/ + +/-- The level `c = 2 M ‖ρ‖_1 + 1` of the profile, with `2^j |φ_j - φ| < c`. -/ +noncomputable def cutoffLevel : ℝ := 2 * Ω.M * Ω.graphBumpNorm + 1 + +/-- The level of the profile is positive. -/ +theorem cutoffLevel_pos : 0 < Ω.cutoffLevel := by + have h := mul_nonneg (mul_nonneg zero_le_two Ω.M_nonneg) Ω.graphBumpNorm_nonneg + rw [cutoffLevel] + linarith + +/-- The smooth bump of the profile: `1` on `[-c, c]`, `0` outside `(-(c + 1), c + 1)`. -/ +noncomputable def profileBump : ContDiffBump (0 : ℝ) := + ⟨Ω.cutoffLevel, Ω.cutoffLevel + 1, Ω.cutoffLevel_pos, by linarith⟩ + +/-- The **profile** `χ` of the vertical cut-off. -/ +noncomputable def profile (t : ℝ) : ℂ := ((Ω.profileBump t : ℝ) : ℂ) + +/-- The profile is smooth. -/ +theorem contDiff_profile : ContDiff ℝ ((⊤ : ℕ∞) : WithTop ℕ∞) Ω.profile := + Complex.ofRealCLM.contDiff.comp Ω.profileBump.contDiff + +/-- The profile has compact support. -/ +theorem hasCompactSupport_profile : HasCompactSupport Ω.profile := + Ω.profileBump.hasCompactSupport.comp_left Complex.ofReal_zero + +/-- `|χ| ≤ 1`. -/ +theorem norm_profile_le (t : ℝ) : ‖Ω.profile t‖ ≤ 1 := by + rw [profile, Complex.norm_real, Real.norm_of_nonneg Ω.profileBump.nonneg] + exact Ω.profileBump.le_one + +/-- `χ = 1` on `[-c, c]`. -/ +theorem profile_eq_one {t : ℝ} (ht : |t| ≤ Ω.cutoffLevel) : Ω.profile t = 1 := by + rw [profile, Ω.profileBump.one_of_mem_closedBall + (by rwa [mem_closedBall, Real.dist_eq, sub_zero])] + simp + +/-- `χ = 0` outside `(-(c + 1), c + 1)`. -/ +theorem profile_eq_zero {t : ℝ} (ht : Ω.cutoffLevel + 1 ≤ |t|) : Ω.profile t = 0 := by + have h : t ∉ Function.support Ω.profileBump := by + rw [Ω.profileBump.support_eq, mem_ball, Real.dist_eq, sub_zero, not_lt] + exact ht + rw [profile, Function.notMem_support.1 h, Complex.ofReal_zero] + +/-- The profile has bounded derivatives up to order `2`. -/ +theorem exists_profile_bound : + ∃ C : ℝ, ∀ l ≤ 2, ∀ t, ‖iteratedFDeriv ℝ l Ω.profile t‖ ≤ C := + exists_iteratedFDeriv_bound Ω.contDiff_profile Ω.hasCompactSupport_profile 2 + +/-- A bound `C` of the derivatives of the profile up to order `2`. -/ +noncomputable def profileConst : ℝ := Classical.choose Ω.exists_profile_bound + +/-- The derivatives of the profile up to order `2` are bounded by `C`. -/ +theorem norm_iteratedFDeriv_profile_le {l : ℕ} (hl : l ≤ 2) (t : ℝ) : + ‖iteratedFDeriv ℝ l Ω.profile t‖ ≤ Ω.profileConst := + Classical.choose_spec Ω.exists_profile_bound l hl t + +/-- `C ≥ 0`. -/ +theorem profileConst_nonneg : 0 ≤ Ω.profileConst := + (norm_nonneg _).trans (Ω.norm_iteratedFDeriv_profile_le (Nat.zero_le 2) 0) + +/-- `|χ(b) - χ(a)| ≤ C |b - a|`. -/ +theorem norm_profile_sub_le (a b : ℝ) : ‖Ω.profile b - Ω.profile a‖ ≤ Ω.profileConst * |b - a| := by + have h := norm_higherDiff_le_of_iteratedFDeriv Ω.contDiff_profile (l := 1) + (fun x => Ω.norm_iteratedFDeriv_profile_le (by norm_num) x) (b - a) a + rwa [higherDiff_one_apply, add_sub_cancel, pow_one, Real.norm_eq_abs] at h + +/-- `|χ(a + 2t) - 2 χ(a + t) + χ(a)| ≤ C t^2`. -/ +theorem norm_profile_second_le (a t : ℝ) : + ‖Ω.profile (a + 2 * t) - 2 * Ω.profile (a + t) + Ω.profile a‖ ≤ Ω.profileConst * t ^ 2 := by + have h := norm_higherDiff_le_of_iteratedFDeriv Ω.contDiff_profile (l := 2) + (fun x => Ω.norm_iteratedFDeriv_profile_le le_rfl x) t a + rw [higherDiff_two_apply, Real.norm_eq_abs, sq_abs, smul_eq_mul] at h + exact h + +/-- The **vertical coordinate** `ψ_j(x) = 2^j (⟪x, e⟫ - φ_j(Px))`. -/ +noncomputable def vertCoord (j : ℕ) (x : V) : ℝ := + 2 ^ j * (inner ℝ x Ω.e - Ω.smoothGraph j (Ω.proj x)) + +/-- The **vertical cut-off** `v_j = χ ∘ ψ_j`. -/ +noncomputable def vertCutoff (j : ℕ) (x : V) : ℂ := Ω.profile (Ω.vertCoord j x) + +/-- The vertical coordinate is Lipschitz: `|ψ_j(x + h) - ψ_j(x)| ≤ 2^j (1 + M ‖ρ‖_1) ‖h‖`. -/ +theorem abs_vertCoord_sub_le (j : ℕ) (x h : V) : + |Ω.vertCoord j (x + h) - Ω.vertCoord j x| ≤ 2 ^ j * (1 + Ω.M * Ω.graphBumpNorm) * ‖h‖ := by + have h1 : |inner ℝ (x + h) Ω.e - inner ℝ x Ω.e| ≤ ‖h‖ := by + rw [inner_add_left, add_sub_cancel_left] + exact (abs_real_inner_le_norm h Ω.e).trans (by rw [Ω.norm_e, mul_one]) + have h2 : |Ω.smoothGraph j (Ω.proj (x + h)) - Ω.smoothGraph j (Ω.proj x)| ≤ + Ω.M * Ω.graphBumpNorm * ‖h‖ := by + refine (Ω.abs_smoothGraph_sub_le j _ _).trans ?_ + rw [map_add, add_sub_cancel_left] + exact mul_le_mul_of_nonneg_left (Ω.norm_proj_le h) + (mul_nonneg Ω.M_nonneg Ω.graphBumpNorm_nonneg) + have heq : Ω.vertCoord j (x + h) - Ω.vertCoord j x = 2 ^ j * ((inner ℝ (x + h) Ω.e - + inner ℝ x Ω.e) - (Ω.smoothGraph j (Ω.proj (x + h)) - Ω.smoothGraph j (Ω.proj x))) := by + simp only [vertCoord] + ring + rw [heq, abs_mul, abs_of_pos (by positivity)] + calc 2 ^ j * |(inner ℝ (x + h) Ω.e - inner ℝ x Ω.e) - + (Ω.smoothGraph j (Ω.proj (x + h)) - Ω.smoothGraph j (Ω.proj x))| + ≤ 2 ^ j * (‖h‖ + Ω.M * Ω.graphBumpNorm * ‖h‖) := + mul_le_mul_of_nonneg_left ((abs_sub _ _).trans (add_le_add h1 h2)) (by positivity) + _ = 2 ^ j * (1 + Ω.M * Ω.graphBumpNorm) * ‖h‖ := by ring + +/-- **Second differences of the vertical coordinate**: for `‖h‖ ≤ 2^(-j)`, +`|ψ_j(x + 2h) - 2 ψ_j(x + h) + ψ_j(x)| ≤ 4 M ‖D^2 ρ‖_1 (2^j ‖h‖)^2`; the linear part `⟪x, e⟫` has +no second differences. -/ +theorem abs_second_vertCoord_le (j : ℕ) {h : V} (hh : ‖h‖ ≤ 1 / 2 ^ j) (x : V) : + |Ω.vertCoord j (x + (2 : ℝ) • h) - 2 * Ω.vertCoord j (x + h) + Ω.vertCoord j x| ≤ + 4 * Ω.M * Ω.graphBumpDeriv * (2 ^ j * ‖h‖) ^ 2 := by + have hP : ‖Ω.proj h‖ ≤ 1 / 2 ^ j := (Ω.norm_proj_le h).trans hh + have h1 := Ω.abs_second_smoothGraph_le j hP (Ω.proj x) + have heq : Ω.vertCoord j (x + (2 : ℝ) • h) - 2 * Ω.vertCoord j (x + h) + Ω.vertCoord j x = + -(2 ^ j * (Ω.smoothGraph j (Ω.proj x + (2 : ℝ) • Ω.proj h) - + 2 * Ω.smoothGraph j (Ω.proj x + Ω.proj h) + Ω.smoothGraph j (Ω.proj x))) := by + simp only [vertCoord, map_add, map_smul, inner_add_left, real_inner_smul_left] + ring + rw [heq, abs_neg, abs_mul, abs_of_pos (by positivity)] + have hP2 : ‖Ω.proj h‖ ^ 2 ≤ ‖h‖ ^ 2 := pow_le_pow_left₀ (norm_nonneg _) (Ω.norm_proj_le h) 2 + have hc : 0 ≤ 4 * Ω.M * Ω.graphBumpDeriv * 2 ^ j := + mul_nonneg (mul_nonneg (mul_nonneg (by norm_num) Ω.M_nonneg) Ω.graphBumpDeriv_nonneg) + (by positivity) + calc 2 ^ j * |Ω.smoothGraph j (Ω.proj x + (2 : ℝ) • Ω.proj h) - + 2 * Ω.smoothGraph j (Ω.proj x + Ω.proj h) + Ω.smoothGraph j (Ω.proj x)| + ≤ 2 ^ j * (4 * Ω.M * Ω.graphBumpDeriv * 2 ^ j * ‖Ω.proj h‖ ^ 2) := + mul_le_mul_of_nonneg_left h1 (by positivity) + _ ≤ 2 ^ j * (4 * Ω.M * Ω.graphBumpDeriv * 2 ^ j * ‖h‖ ^ 2) := by gcongr + _ = 4 * Ω.M * Ω.graphBumpDeriv * (2 ^ j * ‖h‖) ^ 2 := by ring + +/-- `|v_j| ≤ 1`. -/ +theorem norm_vertCutoff_le (j : ℕ) (x : V) : ‖Ω.vertCutoff j x‖ ≤ 1 := Ω.norm_profile_le _ + +/-- **The vertical cut-off is `1` on the boundary**: `v_j(γ x') = 1`, since +`|ψ_j(γ x')| = 2^j |φ(x') - φ_j(x')| ≤ 2 M ‖ρ‖_1 < c`. -/ +theorem vertCutoff_graphMap (j : ℕ) (x' : Ω.hyperplane) : Ω.vertCutoff j (Ω.graphMap x') = 1 := by + apply Ω.profile_eq_one + rw [vertCoord, Ω.inner_graphMap, Ω.proj_graphMap, abs_mul, abs_of_pos (by positivity), + abs_sub_comm] + have h := Ω.abs_smoothGraph_sub_phi_le j x' + have hpos : (0 : ℝ) < 2 ^ j := by positivity + calc 2 ^ j * |Ω.smoothGraph j x' - Ω.phi x'| ≤ 2 ^ j * (2 * Ω.M * Ω.graphBumpNorm / 2 ^ j) := + mul_le_mul_of_nonneg_left h hpos.le + _ = 2 * Ω.M * Ω.graphBumpNorm := by field_simp + _ ≤ Ω.cutoffLevel := by rw [cutoffLevel]; linarith + +/-- **The vertical cut-off vanishes far from the smoothed graph**: `v_j(x) = 0` if +`|⟪x, e⟫ - φ_j(Px)| ≥ (c + 1) 2^(-j)`. -/ +theorem vertCutoff_eq_zero (j : ℕ) {x : V} + (hx : (Ω.cutoffLevel + 1) / 2 ^ j ≤ |inner ℝ x Ω.e - Ω.smoothGraph j (Ω.proj x)|) : + Ω.vertCutoff j x = 0 := by + apply Ω.profile_eq_zero + rw [vertCoord, abs_mul, abs_of_pos (by positivity)] + rw [div_le_iff₀ (by positivity)] at hx + linarith + +/-- The vertical cut-off is continuous. -/ +theorem continuous_vertCutoff (j : ℕ) : Continuous (Ω.vertCutoff j) := + Ω.contDiff_profile.continuous.comp (continuous_const.mul ((continuous_id.inner + continuous_const).sub ((Ω.continuous_smoothGraph j).comp Ω.proj.continuous))) + +/-- The constant `B` of the differences of the vertical cut-off. -/ +noncomputable def vertCutoffConst : ℝ := + 4 + Ω.profileConst * ((1 + Ω.M * Ω.graphBumpNorm) + 4 * Ω.M * Ω.graphBumpDeriv + + (1 + Ω.M * Ω.graphBumpNorm) ^ 2) + +/-- The constant of the vertical cut-off is at least `4`. -/ +theorem four_le_vertCutoffConst : 4 ≤ Ω.vertCutoffConst := by + have h1 : 0 ≤ Ω.M * Ω.graphBumpNorm := mul_nonneg Ω.M_nonneg Ω.graphBumpNorm_nonneg + have h2 : 0 ≤ 4 * Ω.M * Ω.graphBumpDeriv := + mul_nonneg (mul_nonneg (by norm_num) Ω.M_nonneg) Ω.graphBumpDeriv_nonneg + have h3 : 0 ≤ Ω.profileConst * ((1 + Ω.M * Ω.graphBumpNorm) + 4 * Ω.M * Ω.graphBumpDeriv + + (1 + Ω.M * Ω.graphBumpNorm) ^ 2) := mul_nonneg Ω.profileConst_nonneg (by positivity) + rw [vertCutoffConst] + linarith + +/-- **First differences of the vertical cut-off**: `|v_j(x + h) - v_j(x)| ≤ B min(1, 2^j ‖h‖)`, +from the Lipschitz bounds of the profile and of the vertical coordinate. -/ +theorem norm_vertCutoff_add_sub_le (j : ℕ) (h x : V) : + ‖Ω.vertCutoff j (x + h) - Ω.vertCutoff j x‖ ≤ Ω.vertCutoffConst * min 1 (2 ^ j * ‖h‖) := by + have hB := Ω.four_le_vertCutoffConst + have hC := Ω.profileConst_nonneg + have hMD : 0 ≤ 4 * Ω.M * Ω.graphBumpDeriv := + mul_nonneg (mul_nonneg (by norm_num) Ω.M_nonneg) Ω.graphBumpDeriv_nonneg + set t := 2 ^ j * ‖h‖ with ht_def + have ht : 0 ≤ t := by positivity + rcases le_total t 1 with ht1 | ht1 + · rw [min_eq_right ht1] + calc ‖Ω.vertCutoff j (x + h) - Ω.vertCutoff j x‖ + ≤ Ω.profileConst * |Ω.vertCoord j (x + h) - Ω.vertCoord j x| := + Ω.norm_profile_sub_le _ _ + _ ≤ Ω.profileConst * ((1 + Ω.M * Ω.graphBumpNorm) * t) := by + refine mul_le_mul_of_nonneg_left ((Ω.abs_vertCoord_sub_le j x h).trans_eq ?_) hC + rw [ht_def] + ring + _ ≤ Ω.vertCutoffConst * t := by + rw [← mul_assoc] + refine mul_le_mul_of_nonneg_right ?_ ht + rw [vertCutoffConst] + nlinarith [mul_nonneg hC hMD, mul_nonneg hC (sq_nonneg (1 + Ω.M * Ω.graphBumpNorm))] + · rw [min_eq_left ht1, mul_one] + calc ‖Ω.vertCutoff j (x + h) - Ω.vertCutoff j x‖ + ≤ ‖Ω.vertCutoff j (x + h)‖ + ‖Ω.vertCutoff j x‖ := norm_sub_le _ _ + _ ≤ 1 + 1 := add_le_add (Ω.norm_vertCutoff_le j _) (Ω.norm_vertCutoff_le j x) + _ ≤ Ω.vertCutoffConst := by linarith + +/-- **Second differences of the vertical cut-off**: +`|v_j(x + 2h) - 2 v_j(x + h) + v_j(x)| ≤ B min(1, (2^j ‖h‖)^2)`. For `t = ψ_1 - ψ_0` with +`ψ_l = ψ_j(x + lh)`, `Δ_h^2 v_j(x) = [χ(ψ_2) - χ(2ψ_1 - ψ_0)] + Δ_t^2 χ(ψ_0)`. -/ +theorem norm_vertCutoff_second_le (j : ℕ) (h x : V) : + ‖Ω.vertCutoff j (x + (2 : ℝ) • h) - 2 * Ω.vertCutoff j (x + h) + Ω.vertCutoff j x‖ ≤ + Ω.vertCutoffConst * min 1 ((2 ^ j * ‖h‖) ^ 2) := by + have hB := Ω.four_le_vertCutoffConst + have hC := Ω.profileConst_nonneg + have hMK : 0 ≤ Ω.M * Ω.graphBumpNorm := mul_nonneg Ω.M_nonneg Ω.graphBumpNorm_nonneg + have hMD : 0 ≤ 4 * Ω.M * Ω.graphBumpDeriv := + mul_nonneg (mul_nonneg (by norm_num) Ω.M_nonneg) Ω.graphBumpDeriv_nonneg + set t := 2 ^ j * ‖h‖ with ht_def + have ht : 0 ≤ t := by positivity + rcases le_total t 1 with ht1 | ht1 + · rw [min_eq_right (pow_le_one₀ ht ht1)] + have hh : ‖h‖ ≤ 1 / 2 ^ j := by + rw [le_div_iff₀ (by positivity), mul_comm] + exact ht1 + set a₀ := Ω.vertCoord j x + set a₁ := Ω.vertCoord j (x + h) + set a₂ := Ω.vertCoord j (x + (2 : ℝ) • h) + have hsplit : Ω.vertCutoff j (x + (2 : ℝ) • h) - 2 * Ω.vertCutoff j (x + h) + + Ω.vertCutoff j x = (Ω.profile a₂ - Ω.profile (a₀ + 2 * (a₁ - a₀))) + + (Ω.profile (a₀ + 2 * (a₁ - a₀)) - 2 * Ω.profile (a₀ + (a₁ - a₀)) + + Ω.profile a₀) := by + simp only [vertCutoff, a₀, a₁, a₂, add_sub_cancel] + ring + have hfirst : ‖Ω.profile a₂ - Ω.profile (a₀ + 2 * (a₁ - a₀))‖ ≤ + Ω.profileConst * (4 * Ω.M * Ω.graphBumpDeriv * t ^ 2) := by + refine (Ω.norm_profile_sub_le _ _).trans (mul_le_mul_of_nonneg_left ?_ hC) + have h2 := Ω.abs_second_vertCoord_le j hh x + rw [show a₂ - (a₀ + 2 * (a₁ - a₀)) = a₂ - 2 * a₁ + a₀ by ring] + exact h2 + have hsecond : ‖Ω.profile (a₀ + 2 * (a₁ - a₀)) - 2 * Ω.profile (a₀ + (a₁ - a₀)) + + Ω.profile a₀‖ ≤ Ω.profileConst * ((1 + Ω.M * Ω.graphBumpNorm) ^ 2 * t ^ 2) := by + refine (Ω.norm_profile_second_le a₀ (a₁ - a₀)).trans (mul_le_mul_of_nonneg_left ?_ hC) + have h1 := Ω.abs_vertCoord_sub_le j x h + rw [← sq_abs] + calc |a₁ - a₀| ^ 2 ≤ (2 ^ j * (1 + Ω.M * Ω.graphBumpNorm) * ‖h‖) ^ 2 := + pow_le_pow_left₀ (abs_nonneg _) h1 2 + _ = (1 + Ω.M * Ω.graphBumpNorm) ^ 2 * t ^ 2 := by rw [ht_def]; ring + rw [hsplit] + calc ‖(Ω.profile a₂ - Ω.profile (a₀ + 2 * (a₁ - a₀))) + + (Ω.profile (a₀ + 2 * (a₁ - a₀)) - 2 * Ω.profile (a₀ + (a₁ - a₀)) + Ω.profile a₀)‖ + ≤ Ω.profileConst * (4 * Ω.M * Ω.graphBumpDeriv * t ^ 2) + + Ω.profileConst * ((1 + Ω.M * Ω.graphBumpNorm) ^ 2 * t ^ 2) := + (norm_add_le _ _).trans (add_le_add hfirst hsecond) + _ ≤ Ω.vertCutoffConst * t ^ 2 := by + rw [vertCutoffConst] + nlinarith [mul_nonneg hC hMK, sq_nonneg t, mul_nonneg hC (sq_nonneg t), + mul_nonneg (mul_nonneg hC (add_nonneg zero_le_one hMK)) (sq_nonneg t)] + · rw [min_eq_left (one_le_pow₀ ht1), mul_one] + calc ‖Ω.vertCutoff j (x + (2 : ℝ) • h) - 2 * Ω.vertCutoff j (x + h) + Ω.vertCutoff j x‖ + ≤ ‖Ω.vertCutoff j (x + (2 : ℝ) • h)‖ + ‖2 * Ω.vertCutoff j (x + h)‖ + + ‖Ω.vertCutoff j x‖ := + (norm_add_le _ _).trans (add_le_add_left (norm_sub_le _ _) _) + _ ≤ 1 + 2 * 1 + 1 := by + rw [norm_mul, Complex.norm_ofNat] + gcongr + · exact Ω.norm_vertCutoff_le j _ + · exact Ω.norm_vertCutoff_le j _ + · exact Ω.norm_vertCutoff_le j x + _ ≤ Ω.vertCutoffConst := by linarith + +/-- **Differences of the vertical cut-off**: `|Δ_h^m v_j| ≤ B min(1, (2^j ‖h‖)^m)` for +`m ≤ 2` (`Rd.LipschitzGraph.norm_vertCutoff_add_sub_le`, +`Rd.LipschitzGraph.norm_vertCutoff_second_le`). -/ +theorem norm_higherDiff_vertCutoff_le (j : ℕ) {m : ℕ} (hm : m ≤ 2) (h x : V) : + ‖(fwdDiff h)^[m] (Ω.vertCutoff j) x‖ ≤ Ω.vertCutoffConst * min 1 ((2 ^ j * ‖h‖) ^ m) := by + rcases (show m = 0 ∨ m = 1 ∨ m = 2 by omega) with rfl | rfl | rfl + · rw [Function.iterate_zero, id, pow_zero, min_self, mul_one] + exact (Ω.norm_vertCutoff_le j x).trans (by linarith [Ω.four_le_vertCutoffConst]) + · rw [higherDiff_one_apply, pow_one] + exact Ω.norm_vertCutoff_add_sub_le j h x + · rw [higherDiff_two_apply] + exact Ω.norm_vertCutoff_second_le j h x + +/-- The differences of the vertical cut-off in `ℝ≥0∞`. -/ +theorem enorm_higherDiff_vertCutoff_le (j : ℕ) {m : ℕ} (hm : m ≤ 2) (h x : V) : + ‖(fwdDiff h)^[m] (Ω.vertCutoff j) x‖ₑ ≤ + ENNReal.ofReal Ω.vertCutoffConst * min 1 (ENNReal.ofReal (2 ^ j * ‖h‖) ^ (m : ℝ)) := by + have hB : 0 ≤ Ω.vertCutoffConst := by linarith [Ω.four_le_vertCutoffConst] + rw [← ofReal_norm, ENNReal.ofReal_rpow_of_nonneg (by positivity) (Nat.cast_nonneg m), + Real.rpow_natCast, ← ENNReal.ofReal_one, ← ENNReal.ofReal_mono.map_min, + ← ENNReal.ofReal_mul hB] + exact ENNReal.ofReal_le_ofReal (Ω.norm_higherDiff_vertCutoff_le j hm h x) + +end LipschitzGraph + +end Rd diff --git a/LeanPool/FunctionSpaces/Domains/Traces/TraceKernel.lean b/LeanPool/FunctionSpaces/Domains/Traces/TraceKernel.lean new file mode 100644 index 0000000000..13044eb5e5 --- /dev/null +++ b/LeanPool/FunctionSpaces/Domains/Traces/TraceKernel.lean @@ -0,0 +1,483 @@ +/- +Copyright (c) 2026 Mario Ullrich. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Mario Ullrich +-/ +module + +public import LeanPool.FunctionSpaces.Domains.Sobolev.LipschitzDomainGreen +public import LeanPool.FunctionSpaces.Domains.Sobolev.SobolevDuality +public import LeanPool.FunctionSpaces.Rd.SingularIntegrals.ConvolutionAdjoint +public import LeanPool.FunctionSpaces.Rd.Atoms.SmoothAtoms + +/- +Modified for Lean Pool: module names and imports adapted. +-/ + +/-! +# The kernel of the trace + +Let `Ω` be a bounded Lipschitz domain with boundary `Γ` in a finite-dimensional real inner product +space `V`, such as `ℝ^d`, with Lebesgue measure, `H^1(Ω)` the Hilbert space of restrictions of +`H^1(V)`, `H̃^1(Ω)` the closure of the test functions of `Ω` in `H^1(V)` and `H^1_0(Ω)` the +closure of their restrictions in `H^1(Ω)`. + +* **Mollification in `H^1(V)`**: convergence of the `L_2` functions and of their weak + derivatives gives convergence in `H^1(V)` (`Rd.tendsto_of_tendsto_toL2`), so the mollified + `η_c ⋆ U` converge to `U` in `H^1(V)` as `c → ∞` (`Rd.tendsto_of_toL2_eq_convLp`). Mollifying a + function that vanishes outside a compact set `S` gives Schwartz functions supported in + `supp η_c + S` (`Rd.exists_schwartz_eq_conv`), hence elements of `H̃^1(Ω)` when these sets lie + in `Ω` (`Rd.mem_tildeSpace_of_dilate`, `Rd.mem_tildeSpace_of_isCompact`); the mollifiers are + normalised bump functions (`Rd.bumpMollifier`). +* **`H̃^1(Ω)` by supports**: for `U ∈ H^1(V)` vanishing outside an open set `Ω`, the zero + extension of `U|_Ω` is `U` (`Rd.indicatorLp_toL2_restrictProj`), and on a bounded Lipschitz + domain every `U ∈ H^1(V)` vanishing outside `Ω` lies in `H̃^1(Ω)` + (`Rd.BoundedLipschitzDomain.mem_tildeSpace_iff`). The + pieces of `U` near the boundary are pushed into `Ω` by a mollifier supported in the cone of the + chart (`Rd.LipschitzGraph.coneMollifier`, + `Rd.BoundedLipschitzDomain.mem_tildeSpace_of_mulLp_chart`). +* **`ker γ = H^1_0(Ω)`** (`Rd.BoundedLipschitzDomain.traceKer_eq_zeroBoundarySpace`, McLean, + Theorem 3.40): `u ∈ H^1(Ω)` has zero trace iff its zero extension lies in `H^1(V)` + (`Rd.BoundedLipschitzDomain.memSobolev_indicatorLp_iff_mem_traceKer`), iff the zero extension + lies in `H̃^1(Ω)`, iff `u ∈ H^1_0(Ω)`. +* **The quotient and the duals**: `H^1(Ω) ⧸ H^1_0(Ω) ≅ H^{1/2}(Γ)` isometrically + (`Rd.BoundedLipschitzDomain.quotientZeroBoundaryEquivTraceSpace`); its content is + `ker γ = H^1_0(Ω)`, and the isometry holds by the definition of `H^{1/2}(Γ)` as the orthogonal + complement of `ker γ`. Further `H̃^1(Ω) ≅ ker γ` + (`Rd.BoundedLipschitzDomain.tildeEquivTraceKer`) and `(ker γ)^* ≅ H^{-1}(Ω)` + (`Rd.BoundedLipschitzDomain.dualTraceKerEquiv`). +-/ + +@[expose] public section + +open MeasureTheory Module Metric Filter Topology Set TopologicalSpace +open scoped ENNReal NNReal SchwartzMap BesselPotentialSpace LineDeriv Pointwise + +namespace Rd + +variable {V : Type*} [NormedAddCommGroup V] [InnerProductSpace ℝ V] [FiniteDimensional ℝ V] + [MeasurableSpace V] [BorelSpace V] + +/-! ### Mollification in `H^1(V)` -/ + +/-- **Convergence in `H^1(V)`** from the convergence of the `L_2` functions and of all their weak +derivatives in `L_2(V)`: `‖W - U‖ ≤ ‖ι W - ι U‖_2 + ∑_i ‖∂_{e_i} W - ∂_{e_i} U‖_2` for an +orthonormal basis `(e_i)` (`Rd.norm_le_norm_toL2_add_sum`). -/ +theorem tendsto_of_tendsto_toL2 {ι : Type*} {l : Filter ι} {W : ι → H^{1}(V)} {U : H^{1}(V)} + (h0 : Tendsto (fun i => toL2 (W i)) l (𝓝 (toL2 U))) + (h1 : ∀ v : V, Tendsto (fun i => weakDerivL2 v (W i)) l (𝓝 (weakDerivL2 v U))) : + Tendsto W l (𝓝 U) := by + let b := stdOrthonormalBasis ℝ V + rw [tendsto_iff_norm_sub_tendsto_zero] at h0 ⊢ + have h2 := h0.add (tendsto_finsetSum Finset.univ fun i _ => + tendsto_iff_norm_sub_tendsto_zero.1 (h1 (b i))) + simp only [Finset.sum_const_zero, add_zero] at h2 + refine squeeze_zero (fun _ => norm_nonneg _) (fun i => ?_) h2 + refine (norm_le_norm_toL2_add_sum b (W i - U) + (G := fun k => weakDerivL2 (b k) (W i) - weakDerivL2 (b k) U) fun k => ?_).trans_eq (by + rw [map_sub]) + rw [← map_sub] + exact hasWeakLineDeriv_weakDerivL2 _ _ + +/-- **Mollification converges in `H^1(V)`**: let `η` be a Schwartz function with `∫ η = 1`, +`c_i ≠ 0` dilation factors with `c_i → ∞`, `η_c(x) = c^n η(c x)`, and `U ∈ H^1(V)`. If +`W_i ∈ H^1(V)` has the `L_2` function `η_{c_i} ⋆ ι U`, then `W_i → U` in `H^1(V)`. The weak +derivatives of `η_{c_i} ⋆ ι U` are `η_{c_i} ⋆ ∂_v U` (`Rd.hasWeakLineDeriv_convLp`), and +approximate identities converge in `L_2(V)` (`Rd.tendsto_convLp_dilate`). -/ +theorem tendsto_of_toL2_eq_convLp {η : 𝓢(V, ℂ)} (h1 : ∫ x, η x = 1) {ι : Type*} {l : Filter ι} + {c : ι → ℝ} (hc : ∀ i, c i ≠ 0) (hcl : Tendsto c l atTop) (U : H^{1}(V)) + {W : ι → H^{1}(V)} + (hW : ∀ i, toL2 (W i) = convLp two_ne_top (integrable_dilate η.integrable (hc i)) (toL2 U)) : + Tendsto W l (𝓝 U) := by + refine tendsto_of_tendsto_toL2 ?_ fun v => ?_ + · simp_rw [hW] + exact tendsto_convLp_dilate two_ne_top η.integrable h1 hc hcl _ + · have hd : ∀ i, weakDerivL2 v (W i) = + convLp two_ne_top (integrable_dilate η.integrable (hc i)) (weakDerivL2 v U) := fun i => + weakDerivL2_eq (by + rw [hW i] + exact hasWeakLineDeriv_convLp two_ne_top two_ne_top (schwartzDilate (c i) (hc i) η) _ + (coe_schwartzDilate _ _ _) (hasWeakLineDeriv_weakDerivL2 v U)) + simp_rw [hd] + exact tendsto_convLp_dilate two_ne_top η.integrable h1 hc hcl _ + +/-! ### Smooth functions supported in `Ω` -/ + +/-- **Smoothing a function that vanishes outside a compact set**: for a smooth kernel `K` with +compact support and a locally integrable `f` vanishing outside a compact set `S`, `K ⋆ f` is a +Schwartz function with compact support in `supp K + S` (Mathlib's +`HasCompactSupport.contDiff_convolution_left`, `HasCompactSupport.convolution`, +`support_convolution_subset`). -/ +theorem exists_schwartz_eq_conv {K f : V → ℂ} (hK : ContDiff ℝ ((⊤ : ℕ∞) : WithTop ℕ∞) K) + (hKc : HasCompactSupport K) + (hf : LocallyIntegrable f volume) {S : Set V} (hS : IsCompact S) (hfS : ∀ x ∉ S, f x = 0) : + ∃ w : 𝓢(V, ℂ), (w : V → ℂ) = conv K f volume ∧ HasCompactSupport w ∧ + tsupport w ⊆ tsupport K + S := by + have hfc : HasCompactSupport f := HasCompactSupport.intro hS hfS + have hsm : ContDiff ℝ ((⊤ : ℕ∞) : WithTop ℕ∞) (conv K f volume) := contDiff_conv hK hKc hf + have hcs : HasCompactSupport (conv K f volume) := + hKc.convolution (ContinuousLinearMap.mul ℂ ℂ) hfc + exact ⟨hcs.toSchwartzMap hsm, rfl, hcs, closure_minimal ((support_convolution_subset _).trans + (add_subset_add (subset_tsupport K) (Function.support_subset_iff'.2 hfS))) + (hKc.isCompact.add hS).isClosed⟩ + +/-- **Mollified functions in `H̃^1(Ω)`**: let `Ω` be open, `U ∈ H^1(V)` vanishing almost everywhere +outside a compact set `S`, and `η` a smooth function with compact support and `∫ η = 1`. If +`supp η_{2^n} + S ⊆ Ω` for all large `n`, then `U ∈ H̃^1(Ω)`: the functions `η_{2^n} ⋆ ι U` are +Schwartz functions with compact support in `Ω` (`Rd.exists_schwartz_eq_conv`), hence in the span +of the test functions (`Rd.ofSchwartz_mem_testSpan`), and they converge to `U` in `H^1(V)` +(`Rd.tendsto_of_toL2_eq_convLp`). -/ +theorem mem_tildeSpace_of_dilate {Ω : Opens V} {U : H^{1}(V)} {S : Set V} (hS : IsCompact S) + (hUS : ∀ᵐ x ∂volume, x ∉ S → toL2 U x = 0) {η : V → ℂ} + (hη : ContDiff ℝ ((⊤ : ℕ∞) : WithTop ℕ∞) η) + (hηc : HasCompactSupport η) (hη1 : ∫ x, η x = 1) + (hΩ : ∀ᶠ n : ℕ in atTop, tsupport (dilate ((2 : ℝ) ^ n) η) + S ⊆ Ω) : + U ∈ tildeSpace 1 Ω := by + have hGae : S.indicator (toL2 U : V → ℂ) =ᵐ[volume] toL2 U := by + filter_upwards [hUS] with x hx + by_cases hxS : x ∈ S + · rw [indicator_of_mem hxS] + · rw [indicator_of_notMem hxS, hx hxS] + have hloc : LocallyIntegrable (S.indicator (toL2 U : V → ℂ)) volume := + ((Lp.memLp (toL2 U)).locallyIntegrable (by norm_num)).indicator hS.isClosed.measurableSet + have hc : ∀ n : ℕ, (2 : ℝ) ^ n ≠ 0 := fun n => by positivity + choose w hw hwc hws using fun n : ℕ => exists_schwartz_eq_conv (contDiff_dilate hη _) + (hasCompactSupport_dilate hηc (hc n)) hloc hS fun x hx => indicator_of_notMem hx _ + have hW : ∀ n, toL2 (ofSchwartz 1 (w n)) = convLp two_ne_top + (integrable_dilate (hηc.toSchwartzMap hη).integrable (hc n)) (toL2 U) := fun n => by + rw [toL2_ofSchwartz] + refine Lp.ext ?_ + filter_upwards [(w n).coeFn_toLp 2 volume, convLp_apply_ae two_ne_top + (integrable_dilate (hηc.toSchwartzMap hη).integrable (hc n)) (toL2 U)] with x h1 h2 + rw [h1, h2, hw n, conv_congr_ae hGae] + rfl + have ht := tendsto_of_toL2_eq_convLp (η := hηc.toSchwartzMap hη) hη1 hc + (tendsto_pow_atTop_atTop_of_one_lt one_lt_two) U hW + rw [tildeSpace, ← SetLike.mem_coe, Submodule.topologicalClosure_coe] + exact mem_closure_of_tendsto ht (hΩ.mono fun n hn => + ofSchwartz_mem_testSpan 1 (hwc n) ((hws n).trans hn)) + +/-- **Mollified functions with compact support in `Ω`**: for an open set `Ω`, every `U ∈ H^1(V)` +vanishing almost everywhere outside a compact subset `S` of `Ω` lies in `H̃^1(Ω)`. Some +thickening `S_δ` lies in `Ω` (Mathlib's `IsCompact.exists_thickening_subset_open`), and for the +mollifier of the standard bump `Rd.stdBumpBase`, supported in `B̄(0, 1)`, eventually +`supp η_{2^n} + S ⊆ S_δ` (`Rd.eventually_tsupport_dilate_add_subset_thickening`, +`Rd.mem_tildeSpace_of_dilate`). -/ +theorem mem_tildeSpace_of_isCompact {Ω : Opens V} {U : H^{1}(V)} {S : Set V} (hS : IsCompact S) + (hSΩ : S ⊆ Ω) (hUS : ∀ᵐ x ∂volume, x ∉ S → toL2 U x = 0) : U ∈ tildeSpace 1 Ω := by + obtain ⟨δ, hδ, hδΩ⟩ := hS.exists_thickening_subset_open Ω.isOpen hSΩ + refine mem_tildeSpace_of_dilate hS hUS (contDiff_bumpMollifier (stdBumpBase (V := V))) + (hasCompactSupport_bumpMollifier _) (integral_bumpMollifier _) ?_ + exact (eventually_tsupport_dilate_add_subset_thickening (tsupport_bumpMollifier_subset _) hδ + S).mono fun n hn => hn.trans hδΩ + +/-! ### Mollifiers supported in the cone of a Lipschitz graph -/ + +namespace LipschitzGraph + +variable (Ω : LipschitzGraph V) + +/-- The bump function of the cone mollifier: centre `e/4`, radii `ρ/4` and `ρ/2` for the cone +radius `ρ = 1/(8(M + 1))`. -/ +noncomputable def coneMollifierBase : ContDiffBump ((1 / 4 : ℝ) • Ω.e) := + ⟨Ω.coneRadius / 4, Ω.coneRadius / 2, by have := Ω.coneRadius_pos; positivity, + by have := Ω.coneRadius_pos; linarith⟩ + +/-- **The cone mollifier**: a smooth function with integral `1` and compact support in the open +cone `K` of the graph and in `B̄(0, 1/2)` (`Rd.LipschitzGraph.tsupport_coneMollifier_subset`), the +mollifier of the bump `Rd.LipschitzGraph.coneMollifierBase`. Convolution with its dilates moves +the closure of the graph domain into the domain (`Rd.LipschitzGraph.add_mem_of_mem_closure`). -/ +noncomputable def coneMollifier : V → ℂ := bumpMollifier Ω.coneMollifierBase + +/-- The cone mollifier is supported in the open cone and in `B̄(0, 1/2)`: its closed support is +`B̄(e/4, ρ/2) ⊆ B(e/4, ρ) ⊆ K` (`Rd.LipschitzGraph.ball_subset_cone`), and +`‖e/4‖ + ρ/2 ≤ 1/2`. -/ +theorem tsupport_coneMollifier_subset : + tsupport Ω.coneMollifier ⊆ Ω.cone ∩ closedBall 0 (1 / 2) := by + intro z hz + have h := tsupport_bumpMollifier_subset Ω.coneMollifierBase hz + have hρ := Ω.coneRadius_pos + have hρ8 := Ω.coneRadius_le + have hr : Ω.coneMollifierBase.rOut = Ω.coneRadius / 2 := rfl + rw [hr] at h + refine ⟨Ω.ball_subset_cone (closedBall_subset_ball (by linarith) h), ?_⟩ + rw [mem_closedBall, dist_eq_norm] at h + have he : ‖(1 / 4 : ℝ) • Ω.e‖ = 1 / 4 := by + rw [norm_smul, Ω.norm_e, mul_one, Real.norm_of_nonneg (by norm_num)] + have hz' : ‖z‖ ≤ ‖z - (1 / 4 : ℝ) • Ω.e‖ + ‖(1 / 4 : ℝ) • Ω.e‖ := by + have := norm_add_le (z - (1 / 4 : ℝ) • Ω.e) ((1 / 4 : ℝ) • Ω.e) + rwa [sub_add_cancel] at this + rw [mem_closedBall_zero_iff] + linarith + +end LipschitzGraph + +/-! ### `H̃^1(Ω)` by supports -/ + +/-- **The zero extension of the restriction**: for an open `Ω` and `U ∈ H^1(V)` vanishing almost +everywhere outside `Ω`, the zero extension of the `L_2` function of `U|_Ω ∈ H^1(Ω)` is `ι U`, since +`U|_Ω = U` almost everywhere on `Ω` (`Rd.sub_restrictProj_mem`, `Rd.mem_vanishOn_one_iff`). -/ +theorem indicatorLp_toL2_restrictProj {Ω : Opens V} {U : H^{1}(V)} + (hU : ∀ᵐ x ∂volume, x ∉ (Ω : Set V) → toL2 U x = 0) : + indicatorLp Ω.isOpen.measurableSet (toL2 (restrictProj 1 Ω U : H^{1}(V))) = toL2 U := by + have h := (mem_vanishOn_one_iff _).1 (sub_restrictProj_mem (s := 1) (Ω := Ω) U) + rw [EventuallyEq, ae_restrict_iff' Ω.isOpen.measurableSet] at h + refine Lp.ext ?_ + filter_upwards [indicatorLp_apply_ae Ω.isOpen.measurableSet + (toL2 (restrictProj 1 Ω U : H^{1}(V))), h, hU, + Lp.coeFn_sub (toL2 U) (toL2 (restrictProj 1 Ω U : H^{1}(V)))] with x h1 h2 h3 h4 + rw [h1] + by_cases hx : x ∈ (Ω : Set V) + · have h5 := h2 hx + rw [map_sub, h4, Pi.sub_apply, Pi.zero_apply, sub_eq_zero] at h5 + rw [indicator_of_mem hx, h5] + · rw [indicator_of_notMem hx, h3 hx] + +namespace BoundedLipschitzDomain + +variable (Ω : BoundedLipschitzDomain V) + +/-- **The local lemma: chart pieces of functions vanishing outside `Ω` lie in `H̃^1(Ω)`**: let +`U ∈ H^1(V)` vanish almost everywhere outside `Ω`, and let `ζ` be a continuous bounded real +function with closed support in the boundary ball `B_j`. Every `W ∈ H^1(V)` with `ι W = ζ ι U` +lies in `H̃^1(Ω)`. `W` vanishes outside the compact set `S = Ω̄_j ∩ supp ζ`, since `Ω ∩ B_j` is +the graph domain `Ω_j` inside `B_j`; the cone mollifier of the chart moves `S` into `Ω_j` +(`Rd.LipschitzGraph.add_mem_of_mem_closure`, `Rd.LipschitzGraph.mem_cone_of_mem_tsupport_dilate`), +and its small dilates keep it inside `B_j` +(`Rd.eventually_tsupport_dilate_add_subset_thickening`, `Rd.mem_tildeSpace_of_dilate`). -/ +theorem mem_tildeSpace_of_mulLp_chart (j : Fin Ω.N) {U : H^{1}(V)} + (hU : ∀ᵐ x ∂volume, x ∉ Ω.carrier → toL2 U x = 0) {ζ : V → ℝ} + (hζ : tsupport ζ ⊆ ball (Ω.center j) (Ω.radius j)) {C : ℝ} + (hc : Continuous fun x => (ζ x : ℂ)) (hC : ∀ x, ‖(ζ x : ℂ)‖ ≤ C) {W : H^{1}(V)} + (hW : toL2 W = mulLp hc hC (toL2 U)) : W ∈ tildeSpace 1 Ω.toOpens := by + have hB := Ω.inter_ball_eq j le_rfl + have hK : IsCompact (tsupport ζ) := + isCompact_of_isClosed_isBounded (isClosed_tsupport _) (isBounded_ball.subset hζ) + have hS : IsCompact (closure (Ω.graph j).domain ∩ tsupport ζ) := hK.inter_left isClosed_closure + have hWS : ∀ᵐ x ∂volume, x ∉ closure (Ω.graph j).domain ∩ tsupport ζ → toL2 W x = 0 := by + rw [hW] + filter_upwards [mulLp_apply_ae hc hC (toL2 U), hU] with x h1 h2 hxS + rw [h1] + by_cases hxK : x ∈ tsupport ζ + · have hxΩ : x ∉ Ω.carrier := fun hxΩ => + hxS ⟨subset_closure ((Set.ext_iff.1 hB x).1 ⟨hxΩ, hζ hxK⟩).1, hxK⟩ + rw [h2 hxΩ, mul_zero] + · rw [image_eq_zero_of_notMem_tsupport hxK, Complex.ofReal_zero, zero_mul] + obtain ⟨δ, hδ, hδB⟩ := hK.exists_thickening_subset_open isOpen_ball hζ + have hη := (Ω.graph j).tsupport_coneMollifier_subset + refine mem_tildeSpace_of_dilate (η := (Ω.graph j).coneMollifier) hS hWS + (contDiff_bumpMollifier _) (hasCompactSupport_bumpMollifier _) (integral_bumpMollifier _) ?_ + filter_upwards [eventually_tsupport_dilate_add_subset_thickening (hη.trans inter_subset_right) + hδ (closure (Ω.graph j).domain ∩ tsupport ζ)] with n hn + rintro _ ⟨z, hz, y, hy, rfl⟩ + have hzK := (Ω.graph j).mem_cone_of_mem_tsupport_dilate (hη.trans inter_subset_left) + (by positivity) hz + have hzyB : z + y ∈ ball (Ω.center j) (Ω.radius j) := + hδB (thickening_subset_of_subset δ inter_subset_right (hn ⟨z, hz, y, hy, rfl⟩)) + have hzyD : z + y ∈ (Ω.graph j).domain := by + rw [add_comm] + exact (Ω.graph j).add_mem_of_mem_closure hy.1 hzK + rw [Ω.coe_toOpens] + exact ((Set.ext_iff.1 hB (z + y)).2 ⟨hzyD, hzyB⟩).1 + +/-- **The decomposition of a function vanishing outside `Ω`**: if `χ + ∑_j ψ_j = 1` on `Ω`, +`U ∈ H^1(V)` vanishes almost everywhere outside `Ω`, the `L_2` functions of `W_j` are `ψ_j ι U` +and that of `W_0` is `χ ι U`, then `U = ∑_j W_j + W_0` in `H^1(V)`: on `Ω` this is +`Rd.BoundedLipschitzDomain.toL2_ae_eq_sum_add`, outside `Ω` both sides vanish, and `ι` is +injective (`Rd.toL2_injective`). -/ +theorem eq_sum_add_of_ae_eq_zero (ψ : Ω.BoundaryPartition) {χ : V → ℝ} + (hχ1 : ∀ x ∈ Ω.carrier, χ x + ∑ j, ψ.toFun j x = 1) {C : ℝ} + (hc : Continuous fun x => (χ x : ℂ)) (hC : ∀ x, ‖(χ x : ℂ)‖ ≤ C) {U : H^{1}(V)} + (hU : ∀ᵐ x ∂volume, x ∉ Ω.carrier → toL2 U x = 0) + {Wj : Fin Ω.N → H^{1}(V)} (hWj : ∀ j, toL2 (Wj j) = ψ.localize j (toL2 U)) + {W0 : H^{1}(V)} (hW0 : toL2 W0 = mulLp hc hC (toL2 U)) : U = ∑ j, Wj j + W0 := by + refine toL2_injective (Lp.ext ?_) + have hΩ := (ae_restrict_iff' Ω.measurableSet).1 (toL2_ae_eq_sum_add ψ hχ1 hc hC U hWj hW0) + have h0 : (toL2 W0 : V → ℂ) =ᵐ[volume] fun x => (χ x : ℂ) * toL2 U x := by + rw [hW0] + exact mulLp_apply_ae hc hC _ + have hloc : ∀ᵐ x ∂(volume : Measure V), ∀ j, + (toL2 (Wj j) : V → ℂ) x = ψ.toComplex j x * toL2 U x := ae_all_iff.2 fun j => by + rw [hWj j] + exact mulLp_apply_ae _ _ _ + filter_upwards [hΩ, hU, hloc, h0, Lp.coeFn_add (∑ j, toL2 (Wj j)) (toL2 W0), + Lp.coeFn_fun_finsetSum Finset.univ fun j => toL2 (Wj j)] with x h1 h2 h3 h4 h5 h6 + by_cases hx : x ∈ Ω.carrier + · exact h1 hx + · rw [map_add, map_sum, h5, Pi.add_apply, h6, h4, h2 hx] + simp only [h3, h2 hx, mul_zero, Finset.sum_const_zero, add_zero] + +/-- **Functions vanishing outside `Ω` lie in `H̃^1(Ω)`**: on a bounded Lipschitz domain, every +`U ∈ H^1(V)` whose `L_2` function vanishes almost everywhere outside `Ω` lies in the closure of the +test functions of `Ω`. With a resolution of unity `ψ` equal to one near `Γ` +(`Rd.BoundedLipschitzDomain.exists_boundaryPartition_nhds`) and the interior cut-off `χ` +(`Rd.BoundedLipschitzDomain.exists_interior_cutoff`), `U = ∑_j ψ_j U + χ U` +(`Rd.BoundedLipschitzDomain.eq_sum_add_of_ae_eq_zero`); the chart pieces lie in `H̃^1(Ω)` by the +cone mollifiers (`Rd.BoundedLipschitzDomain.mem_tildeSpace_of_mulLp_chart`), the interior piece +since it vanishes outside a compact subset of `Ω` (`Rd.mem_tildeSpace_of_isCompact`). -/ +theorem mem_tildeSpace_of_ae_eq_zero {U : H^{1}(V)} + (hU : ∀ᵐ x ∂volume, x ∉ Ω.carrier → toL2 U x = 0) : U ∈ tildeSpace 1 Ω.toOpens := by + obtain ⟨ψ, -, -, hψ⟩ := Ω.exists_boundaryPartition_nhds + obtain ⟨χ, hχ, hcs, hχΩ, hχ1⟩ := exists_interior_cutoff ψ hψ + have hc : Continuous fun x => (χ x : ℂ) := Complex.continuous_ofReal.comp hχ.continuous + obtain ⟨C, hC⟩ := hc.bounded_above_of_compact_support (hcs.comp_left Complex.ofReal_zero) + choose Wj hWj using fun j => ψ.exists_toL2_eq_localize j U + obtain ⟨W0, hW0⟩ := exists_toL2_eq_mulLp hχ hcs hc hC U + rw [Ω.eq_sum_add_of_ae_eq_zero ψ hχ1 hc hC hU hWj hW0] + refine add_mem (Submodule.sum_mem _ fun j _ => + Ω.mem_tildeSpace_of_mulLp_chart j hU (ψ.tsupport_subset j) _ _ (hWj j)) ?_ + refine mem_tildeSpace_of_isCompact hcs.isCompact (by rw [Ω.coe_toOpens]; exact hχΩ) ?_ + rw [hW0] + filter_upwards [mulLp_apply_ae hc hC (toL2 U)] with x hx hxS + rw [hx, image_eq_zero_of_notMem_tsupport hxS, Complex.ofReal_zero, zero_mul] + +/-- **`H̃^1(Ω)` is the space of `H^1(V)` functions vanishing outside `Ω`**: on a bounded Lipschitz +domain, `U ∈ H^1(V)` lies in `H̃^1(Ω)` iff its `L_2` function vanishes almost everywhere outside +`Ω` (`Rd.toL2_ae_eq_zero_of_mem_tildeSpace`, +`Rd.BoundedLipschitzDomain.mem_tildeSpace_of_ae_eq_zero`). Since `Γ` is a null set +(`Rd.BoundedLipschitzDomain.volume_frontier`), this is `H̃^s(Ω) = H^s_{Ω̄}` of McLean +(Theorem 3.29) for `s = 1`. -/ +theorem mem_tildeSpace_iff (U : H^{1}(V)) : + U ∈ tildeSpace 1 Ω.toOpens ↔ ∀ᵐ x ∂volume, x ∉ Ω.carrier → toL2 U x = 0 := + ⟨toL2_ae_eq_zero_of_mem_tildeSpace, Ω.mem_tildeSpace_of_ae_eq_zero⟩ + +/-! ### `ker γ = H^1_0(Ω)` -/ + +/-- **`H^1_0(Ω) ⊆ ker γ`**: every element of `H^1_0(Ω)` is the restriction `U|_Ω` of some +`U ∈ H̃^1(Ω)` (`Rd.range_tildeToRestriction`); `U` vanishes outside `Ω` +(`Rd.toL2_ae_eq_zero_of_mem_tildeSpace`), so the zero extension of `U|_Ω` is `ι U ∈ W^1_2(V)` +(`Rd.indicatorLp_toL2_restrictProj`), and its trace vanishes +(`Rd.BoundedLipschitzDomain.memSobolev_indicatorLp_iff_mem_traceKer`). -/ +theorem zeroBoundarySpace_le_traceKer : zeroBoundarySpace 1 Ω.toOpens ≤ Ω.traceKer := by + intro u hu + rw [← range_tildeToRestriction] at hu + obtain ⟨U, rfl⟩ := hu + rw [← Ω.memSobolev_indicatorLp_iff_mem_traceKer] + have h := indicatorLp_toL2_restrictProj (toL2_ae_eq_zero_of_mem_tildeSpace U.2) + change MemSobolev 1 (indicatorLp Ω.toOpens.isOpen.measurableSet + (toL2 (restrictProj 1 Ω.toOpens U : H^{1}(V)))) + rw [h] + exact memSobolev_toL2 _ + +/-- **`ker γ ⊆ H^1_0(Ω)`**: for `u` in the trace kernel, the zero extension `1_Ω ι u` is the `L_2` +function of some `U ∈ H^1(V)` (`Rd.BoundedLipschitzDomain.memSobolev_indicatorLp_of_mem_traceKer`, +`Rd.exists_toL2_eq_of_memSobolev`). `U` vanishes outside `Ω`, so `U ∈ H̃^1(Ω)` +(`Rd.BoundedLipschitzDomain.mem_tildeSpace_of_ae_eq_zero`), and `u = U|_Ω` +(`Rd.restrictProj_eq_of_ae_eq`) lies in `H^1_0(Ω)` (`Rd.range_tildeToRestriction`). -/ +theorem traceKer_le_zeroBoundarySpace : Ω.traceKer ≤ zeroBoundarySpace 1 Ω.toOpens := by + intro u hu + obtain ⟨U, hU⟩ := exists_toL2_eq_of_memSobolev (Ω.memSobolev_indicatorLp_of_mem_traceKer hu) + have hUae : (toL2 U : V → ℂ) =ᵐ[volume] Ω.carrier.indicator (toL2 (u : H^{1}(V))) := by + rw [hU] + exact indicatorLp_apply_ae _ _ + have hU0 : ∀ᵐ x ∂volume, x ∉ Ω.carrier → toL2 U x = 0 := by + filter_upwards [hUae] with x hx hxΩ + rw [hx, indicator_of_notMem hxΩ] + have hUu : (toL2 U : V → ℂ) =ᵐ[volume.restrict (Ω.toOpens : Set V)] toL2 (u : H^{1}(V)) := by + rw [Ω.coe_toOpens] + filter_upwards [ae_restrict_of_ae hUae, ae_restrict_mem Ω.measurableSet] with x hx hxΩ + rw [hx, indicator_of_mem hxΩ] + rw [← restrictProj_eq_of_ae_eq hUu, ← range_tildeToRestriction] + exact ⟨⟨U, Ω.mem_tildeSpace_of_ae_eq_zero hU0⟩, rfl⟩ + +/-- **`ker γ = H^1_0(Ω)`** on a bounded Lipschitz domain (McLean, Theorem 3.40; Hiptmair, Pauly +and Schulz cite it for `ker γ = H^1_0(Ω)`): the elements of `H^1(Ω)` whose chart traces all vanish, +equivalently whose boundary trace vanishes almost everywhere on `Γ` +(`Rd.BoundedLipschitzDomain.mem_traceKer_iff`), are exactly the limits in `H^1(Ω)` of test +functions of `Ω` (`Rd.BoundedLipschitzDomain.zeroBoundarySpace_le_traceKer`, +`Rd.BoundedLipschitzDomain.traceKer_le_zeroBoundarySpace`). -/ +theorem traceKer_eq_zeroBoundarySpace : Ω.traceKer = zeroBoundarySpace 1 Ω.toOpens := + le_antisymm Ω.traceKer_le_zeroBoundarySpace Ω.zeroBoundarySpace_le_traceKer + +/-! ### The quotient and the duals -/ + +/-- **`H^1(Ω) ⧸ H^1_0(Ω) ≅ H^{1/2}(Γ)` isometrically**: the quotient of `H^1(Ω)` by `H^1_0(Ω)`, +with the quotient norm, is isometrically isomorphic to the trace space, the orthogonal complement +of `ker γ = H^1_0(Ω)` (Mathlib's `Submodule.quotientEquivOrthogonal`, +`Rd.BoundedLipschitzDomain.traceKer_eq_zeroBoundarySpace`); the class of `u` corresponds to `γ u` +(`Rd.BoundedLipschitzDomain.quotientZeroBoundaryEquivTraceSpace_mk`). The content is +`ker γ = H^1_0(Ω)`; the isometry holds by the definition of the trace space as the orthogonal +complement of `ker γ`. This is the trace space of Hiptmair, Pauly and Schulz for `k = 0`; its norm +is equivalent to the Sobolev–Slobodeckij norm of the classical `H^{1/2}(Γ)` +(`Rd.BoundedLipschitzDomain.exists_traceL2_norm_equiv_slobodeckij`). -/ +noncomputable def quotientZeroBoundaryEquivTraceSpace : + (Ω.SobolevOne ⧸ zeroBoundarySpace 1 Ω.toOpens) ≃ₗᵢ[ℂ] Ω.TraceSpace := + (Submodule.quotientEquivOrthogonal (zeroBoundarySpace 1 Ω.toOpens)).trans + (LinearIsometryEquiv.ofEq _ _ (by rw [Ω.traceKer_eq_zeroBoundarySpace])) + +/-- The class of `u` modulo `H^1_0(Ω)` corresponds to the trace `γ u`. -/ +theorem quotientZeroBoundaryEquivTraceSpace_mk (u : Ω.SobolevOne) : + Ω.quotientZeroBoundaryEquivTraceSpace (Submodule.Quotient.mk u) = Ω.trace u := by + have hK := Ω.traceKer_eq_zeroBoundarySpace + have hx : (Ω.trace u : Ω.SobolevOne) ∈ (zeroBoundarySpace 1 Ω.toOpens)ᗮ := by + rw [← hK] + exact (Ω.trace u).2 + have hm : u - Ω.extend (Ω.trace u) ∈ zeroBoundarySpace 1 Ω.toOpens := by + rw [← hK] + exact Ω.sub_extend_trace_mem u + have h : (Submodule.Quotient.mk u : Ω.SobolevOne ⧸ zeroBoundarySpace 1 Ω.toOpens) = + Submodule.Quotient.mk (Ω.trace u : Ω.SobolevOne) := (Submodule.Quotient.eq _).2 hm + rw [quotientZeroBoundaryEquivTraceSpace, LinearIsometryEquiv.trans_apply, h, + Submodule.quotientEquivOrthogonal_mk _ _ hx] + rfl + +/-- **`H̃^1(Ω) ≅ ker γ` isometrically**: restriction is an isometry of `H̃^1(Ω)` onto +`H^1_0(Ω) = ker γ` (`Rd.tildeEquivZeroBoundary`, +`Rd.BoundedLipschitzDomain.traceKer_eq_zeroBoundarySpace`). -/ +noncomputable def tildeEquivTraceKer : tildeSpace 1 Ω.toOpens ≃ₗᵢ[ℂ] Ω.traceKer := + (tildeEquivZeroBoundary Ω.toOpens).trans + (LinearIsometryEquiv.ofEq _ _ Ω.traceKer_eq_zeroBoundarySpace.symm) + +/-- `tildeEquivTraceKer Ω U` is the restriction of `U` to `Ω`. -/ +theorem coe_tildeEquivTraceKer_apply (U : tildeSpace 1 Ω.toOpens) : + (Ω.tildeEquivTraceKer U : Ω.SobolevOne) = restrictProj 1 Ω.toOpens U := + rfl + +/-- **The element of `H̃^1(Ω)` with restriction `u ∈ ker γ` is `u` itself**, read in `H^1(V)` +(`Rd.coe_tildeEquivZeroBoundary_symm_apply`). -/ +theorem coe_tildeEquivTraceKer_symm_apply (u : Ω.traceKer) : + ((Ω.tildeEquivTraceKer.symm u : tildeSpace 1 Ω.toOpens) : H^{1}(V)) = + ((u : Ω.SobolevOne) : H^{1}(V)) := by + rw [tildeEquivTraceKer, LinearIsometryEquiv.symm_trans, LinearIsometryEquiv.trans_apply, + LinearIsometryEquiv.ofEq_symm, + coe_tildeEquivZeroBoundary_symm_apply, LinearIsometryEquiv.coe_ofEq_apply] + +/-- **The dual of `ker γ` is `H^{-1}(Ω)`**: every bounded functional `ℓ` on the trace kernel is +`u ↦ [W, u]` for exactly one `W ∈ H^{-1}(Ω)`, with `‖W‖ = ‖ℓ‖` +(`Rd.BoundedLipschitzDomain.dualTraceKerEquiv_apply`, +`Rd.BoundedLipschitzDomain.dualTraceKerEquiv_eq_iff`); Riesz on `ker γ`, the isometry +`Rd.BoundedLipschitzDomain.tildeEquivTraceKer` and the duality `H̃^1(Ω) ≅ H^{-1}(Ω)` +(`Rd.tildeEquivRestriction`), as for `Rd.dualZeroBoundaryEquiv`. -/ +noncomputable def dualTraceKerEquiv : + StrongDual ℂ Ω.traceKer ≃ₗᵢ⋆[ℂ] RestrictionSpace (-1) Ω.toOpens := + (InnerProductSpace.toDual ℂ Ω.traceKer).symm.trans + (Ω.tildeEquivTraceKer.symm.trans (tildeEquivRestriction 1 Ω.toOpens)) + +/-- **`ℓ` is the pairing with `dualTraceKerEquiv Ω ℓ`**: `ℓ(u) = [W, u]` for +`W = dualTraceKerEquiv Ω ℓ` and every `u ∈ ker γ`, read as an element of `H^1(V)`. -/ +theorem dualTraceKerEquiv_apply (ℓ : StrongDual ℂ Ω.traceKer) (u : Ω.traceKer) : + ℓ u = pairing 1 (Ω.dualTraceKerEquiv ℓ : H^{-1}(V)) ((u : Ω.SobolevOne) : H^{1}(V)) := by + have h := InnerProductSpace.toDual_symm_apply (𝕜 := ℂ) (E := Ω.traceKer) (x := u) (y := ℓ) + rw [← h, ← LinearIsometryEquiv.inner_map_map Ω.tildeEquivTraceKer.symm, + Submodule.coe_inner, dualTraceKerEquiv, LinearIsometryEquiv.trans_apply, + LinearIsometryEquiv.trans_apply, coe_tildeEquivRestriction_apply, pairing_besselShift, + Ω.coe_tildeEquivTraceKer_symm_apply u] + +/-- The functional of `W ∈ H^{-1}(Ω)` on `ker γ` is `u ↦ [W, u]`. -/ +theorem dualTraceKerEquiv_symm_apply (W : RestrictionSpace (-1) Ω.toOpens) (u : Ω.traceKer) : + Ω.dualTraceKerEquiv.symm W u = + pairing 1 (W : H^{-1}(V)) ((u : Ω.SobolevOne) : H^{1}(V)) := by + rw [dualTraceKerEquiv_apply, LinearIsometryEquiv.apply_symm_apply] + +/-- **Uniqueness of the representing element**: `dualTraceKerEquiv Ω ℓ = W` iff +`ℓ(u) = [W, u]` for every `u ∈ ker γ`. -/ +theorem dualTraceKerEquiv_eq_iff (ℓ : StrongDual ℂ Ω.traceKer) + (W : RestrictionSpace (-1) Ω.toOpens) : + Ω.dualTraceKerEquiv ℓ = W ↔ ∀ u : Ω.traceKer, + ℓ u = pairing 1 (W : H^{-1}(V)) ((u : Ω.SobolevOne) : H^{1}(V)) := by + rw [← LinearIsometryEquiv.eq_symm_apply, ContinuousLinearMap.ext_iff] + simp only [dualTraceKerEquiv_symm_apply] + +end BoundedLipschitzDomain + +end Rd diff --git a/LeanPool/FunctionSpaces/Domains/Traces/TraceSpaceNorm.lean b/LeanPool/FunctionSpaces/Domains/Traces/TraceSpaceNorm.lean new file mode 100644 index 0000000000..6ea7497051 --- /dev/null +++ b/LeanPool/FunctionSpaces/Domains/Traces/TraceSpaceNorm.lean @@ -0,0 +1,538 @@ +/- +Copyright (c) 2026 Mario Ullrich. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Mario Ullrich +-/ +module + +public import LeanPool.FunctionSpaces.Domains.Lipschitz.SurfaceMeasure +public import LeanPool.FunctionSpaces.Domains.Traces.BoundaryBesovNorm + +/- +Modified for Lean Pool: module names and imports adapted. +-/ + +/-! +# The norm of the trace space of a bounded Lipschitz domain + +Let `Ω` be a bounded Lipschitz domain with boundary `Γ`, `H^1(Ω)` its Sobolev space, and +`H^{1/2}(Γ)` the trace space, the orthogonal complement of the trace kernel in `H^1(Ω)` +(`Rd.BoundedLipschitzDomain.TraceSpace`). For `U ∈ H^1(V)` with `L_2` function `ι U`, `Tr_Γ ι U` +is its boundary trace. + +* **The least extension norm** (`Rd.BoundedLipschitzDomain.enorm_eq_iInf`): the norm of + `t ∈ H^{1/2}(Γ)` is the least `H^1(V)` norm of a function with the boundary trace of `t`, the + quotient norm of `γ(H^1(Ω))`, which McLean, Theorem 3.37, shows to be equivalent to his chart + norm of `H^{1/2}(Γ)`. The restriction to `Ω` keeps the boundary trace + (`Rd.BoundedLipschitzDomain.boundaryTrace_restrictProj`) and does not increase the norm. +* **The norm equivalence** (`Rd.BoundedLipschitzDomain.exists_traceL2_norm_equiv`): for every + resolution of unity `ψ` there is `C < ∞` with `‖t‖ ≤ C ‖τ t‖_{B^{1/2}_{2,2}(Γ)}` and + `‖τ t‖_{B^{1/2}_{2,2}(Γ)} ≤ C ‖t‖` for the quasi-norm by chart pieces + (`Rd.BoundedLipschitzDomain.boundaryBesovNorm`): the trace bound for `p = q = L = 2`, + `s = 1/2`, with `H^1(V) ⊆ B^1_{2,2}(V)` (`Rd.modNorm_two_le_norm`), and the bounded extension + with the bound of `H^1(V)` by `B^1_{2,2}(V)` (`Rd.enorm_le_modNorm_two`). Every + `g ∈ B^{1/2}_{2,2}(Γ)` has a preimage under the trace of norm at most `C ‖g‖` + (`Rd.BoundedLipschitzDomain.exists_traceSpace_of_memBoundaryBesov_le`). +* **The range** of `τ : H^{1/2}(Γ) → L_2(Γ)` is `B^{1/2}_{2,2}(Γ)` + (`Rd.BoundedLipschitzDomain.mem_range_traceL2_iff`). +* **The Banach space `B^{1/2}_{2,2}(Γ)`** (`Rd.BoundedLipschitzDomain.BoundaryBesovHalf`): the + functions of `L_2(Γ)` in `B^{1/2}_{2,2}(Γ)`, for the canonical resolution of unity, with the + quasi-norm by chart pieces, a norm here; `τ` is an isomorphism of `H^{1/2}(Γ)` onto it + (`Rd.BoundedLipschitzDomain.traceSpaceEquivBoundaryBesovHalf`), so it is complete. The trace + `H^1(Ω) → B^{1/2}_{2,2}(Γ)` has a bounded linear right inverse, as in McLean's Theorem 3.37 + (`Rd.BoundedLipschitzDomain.traceRightInverse`). +-/ + +@[expose] public section + +open MeasureTheory Filter Metric +open scoped ENNReal BesselPotentialSpace + +open ENNReal (lqNorm dyadicWeight) + +namespace Rd + +namespace BoundedLipschitzDomain + +variable {V : Type*} [NormedAddCommGroup V] [InnerProductSpace ℝ V] [FiniteDimensional ℝ V] + [MeasurableSpace V] [BorelSpace V] (Ω : BoundedLipschitzDomain V) + +/-! ### The norm of the trace space as a least extension norm -/ + +/-- **The restriction to `Ω` keeps the boundary trace**: for every resolution of unity `ψ` and +`U ∈ H^1(V)`, `Tr_Γ ι(U|_Ω) = Tr_Γ ι U` almost everywhere on `Γ`, since `U - U|_Ω` vanishes on `Ω` +(`Rd.sub_restrictProj_mem`, `Rd.mem_vanishOn_one_iff`) and the boundary trace depends only on the +function on `Ω` (`Rd.BoundedLipschitzDomain.boundaryTrace_congr`). -/ +theorem boundaryTrace_restrictProj (ψ : Ω.BoundaryPartition) (U : H^{1}(V)) : + Ω.boundaryTrace ψ two_ne_top 2 + (toL2 ((restrictProj 1 Ω.toOpens U : Ω.SobolevOne) : H^{1}(V))) =ᶠ[Ω.aeBoundary] + Ω.boundaryTrace ψ two_ne_top 2 (toL2 U) := by + have h := (mem_vanishOn_one_iff _).1 (sub_restrictProj_mem (s := 1) (Ω := Ω.toOpens) U) + rw [Ω.coe_toOpens] at h + replace h := (ae_restrict_iff' Ω.measurableSet).1 h + refine Ω.boundaryTrace_congr ψ two_ne_top one_le_two (s := 1 / 2) (by norm_num) (by norm_num) + one_le_two (modNorm_toL2_lt_top _) (modNorm_toL2_lt_top U) ?_ + filter_upwards [h, Lp.coeFn_sub (toL2 U) + (toL2 ((restrictProj 1 Ω.toOpens U : Ω.SobolevOne) : H^{1}(V)))] with x hx hsub hxΩ + have hx' := hx hxΩ + rw [map_sub, hsub, Pi.sub_apply, Pi.zero_apply, sub_eq_zero] at hx' + exact hx'.symm + +/-- The trace of the restriction to `Ω` has norm at most that of `U ∈ H^1(V)`: +`‖γ(U|_Ω)‖ ≤ ‖U|_Ω‖ ≤ ‖U‖` (`Rd.BoundedLipschitzDomain.norm_trace_apply_le`, +`Rd.norm_restrictProj_apply_le`). -/ +theorem enorm_trace_restrictProj_le (U : H^{1}(V)) : + ‖Ω.trace (restrictProj 1 Ω.toOpens U)‖ₑ ≤ ‖U‖ₑ := + eNorm_le_iff_norm_le.2 ((Ω.norm_trace_apply_le _).trans (norm_restrictProj_apply_le U)) + +/-- **Functions with the boundary trace of `t` restrict to extensions of `t`**: for every +resolution of unity `ψ`, if `Tr_Γ ι U = Tr_Γ ι(E t)` almost everywhere on `Γ`, then `γ(U|_Ω) = t` +(`Rd.BoundedLipschitzDomain.trace_eq_iff`, `Rd.BoundedLipschitzDomain.trace_extend`). -/ +theorem trace_restrictProj_eq (ψ : Ω.BoundaryPartition) {U : H^{1}(V)} {t : Ω.TraceSpace} + (h : Ω.boundaryTrace ψ two_ne_top 2 (toL2 U) =ᶠ[Ω.aeBoundary] + Ω.boundaryTrace ψ two_ne_top 2 (toL2 ((Ω.extend t : Ω.SobolevOne) : H^{1}(V)))) : + Ω.trace (restrictProj 1 Ω.toOpens U) = t := + ((Ω.trace_eq_iff ψ _ _).2 ((Ω.boundaryTrace_restrictProj ψ U).trans h)).trans (Ω.trace_extend t) + +/-- `‖t‖ ≤ ‖U‖` for every `U ∈ H^1(V)` with the boundary trace of `t ∈ H^{1/2}(Γ)`, for every +resolution of unity (`Rd.BoundedLipschitzDomain.trace_restrictProj_eq`). -/ +theorem enorm_le_of_boundaryTrace_eventuallyEq (ψ : Ω.BoundaryPartition) {U : H^{1}(V)} + {t : Ω.TraceSpace} + (h : Ω.boundaryTrace ψ two_ne_top 2 (toL2 U) =ᶠ[Ω.aeBoundary] + Ω.boundaryTrace ψ two_ne_top 2 (toL2 ((Ω.extend t : Ω.SobolevOne) : H^{1}(V)))) : + ‖t‖ₑ ≤ ‖U‖ₑ := by + rw [← Ω.trace_restrictProj_eq ψ h] + exact Ω.enorm_trace_restrictProj_le U + +/-- **The norm of `H^{1/2}(Γ)` is the least extension norm** (the quotient norm of `γ(H^1(Ω))`, +which McLean, Theorem 3.37, shows to be equivalent to his chart norm of `H^{1/2}(Γ)`): for every +resolution of unity `ψ` and `t ∈ H^{1/2}(Γ)`, +`‖t‖ = inf {‖U‖ : U ∈ H^1(V), Tr_Γ ι U = Tr_Γ ι(E t) almost everywhere on Γ}`. Here `H^{1/2}(Γ)` +is defined by orthogonality; the infimum is attained at `U = E t`. -/ +theorem enorm_eq_iInf (ψ : Ω.BoundaryPartition) (t : Ω.TraceSpace) : + ‖t‖ₑ = ⨅ (U : H^{1}(V)) (_ : Ω.boundaryTrace ψ two_ne_top 2 (toL2 U) =ᶠ[Ω.aeBoundary] + Ω.boundaryTrace ψ two_ne_top 2 (toL2 ((Ω.extend t : Ω.SobolevOne) : H^{1}(V)))), ‖U‖ₑ := + le_antisymm (le_iInf₂ fun _ hU => Ω.enorm_le_of_boundaryTrace_eventuallyEq ψ hU) + ((iInf₂_le ((Ω.extend t : Ω.SobolevOne) : H^{1}(V)) EventuallyEq.rfl).trans_eq rfl) + +/-! ### The norm equivalence with `B^{1/2}_{2,2}(Γ)` -/ + +/-- **The boundary trace of `H^1(V)` is bounded into `B^{1/2}_{2,2}(Γ)`**: for every resolution of +unity `ψ` there is `C < ∞` with `‖Tr_Γ ι U‖_{B^{1/2}_{2,2}(Γ)} ≤ C ‖U‖` for every `U ∈ H^1(V)`: +the trace bound (`Rd.BoundedLipschitzDomain.exists_boundaryBesovNorm_boundaryTrace_le` at +`p = q = L = 2`, `s = 1/2`) and `H^1(V) ⊆ B^1_{2,2}(V)` (`Rd.modNorm_two_le_norm`). -/ +theorem exists_boundaryBesovNorm_toL2_le (ψ : Ω.BoundaryPartition) : + ∃ C : ℝ≥0∞, C ≠ ∞ ∧ ∀ U : H^{1}(V), + Ω.boundaryBesovNorm 2 ψ (1 / 2) 2 (Ω.boundaryTrace ψ two_ne_top 2 (toL2 U)) ≤ C * ‖U‖ₑ := by + obtain ⟨C, hC, hle⟩ := Ω.exists_boundaryBesovNorm_boundaryTrace_le ψ two_ne_top (L := 2) + (s := 1 / 2) (by norm_num) (by norm_num) (by norm_num) one_le_two + refine ⟨C * sobolevOneBesovConst V, ENNReal.mul_ne_top hC sobolevOneBesovConst_ne_top, + fun U => ?_⟩ + have hσ : (1 / 2 : ℝ) + 1 / (2 : ℝ≥0∞).toReal = 1 := by norm_num + have h := hle (toL2 U) (modNorm_toL2_lt_top U) + rw [hσ] at h + rw [mul_assoc] + exact h.trans (mul_le_mul' le_rfl (modNorm_two_le_norm U)) + +/-- **The trace of `H^{1/2}(Γ)` is bounded into `B^{1/2}_{2,2}(Γ)`**: for every resolution of +unity `ψ` there is `C < ∞` with `‖Tr_Γ ι(E t)‖_{B^{1/2}_{2,2}(Γ)} ≤ C ‖t‖` for every +`t ∈ H^{1/2}(Γ)` (`Rd.BoundedLipschitzDomain.exists_boundaryBesovNorm_toL2_le`, `‖E t‖ = ‖t‖`). -/ +theorem exists_boundaryBesovNorm_extend_le (ψ : Ω.BoundaryPartition) : + ∃ C : ℝ≥0∞, C ≠ ∞ ∧ ∀ t : Ω.TraceSpace, Ω.boundaryBesovNorm 2 ψ (1 / 2) 2 + (Ω.boundaryTrace ψ two_ne_top 2 (toL2 ((Ω.extend t : Ω.SobolevOne) : H^{1}(V)))) ≤ + C * ‖t‖ₑ := by + obtain ⟨C, hC, hle⟩ := Ω.exists_boundaryBesovNorm_toL2_le ψ + exact ⟨C, hC, fun t => hle _⟩ + +/-- **A bounded extension from `B^{1/2}_{2,2}(Γ)` into `H^1(V)`**: for every resolution of unity +`ψ` there is `C < ∞` such that every `g ∈ B^{1/2}_{2,2}(Γ)` is `Tr_Γ ι U` almost everywhere on `Γ` +for some `U ∈ H^1(V)` with `‖U‖ ≤ C ‖g‖_{B^{1/2}_{2,2}(Γ)}`: the bounded extension +(`Rd.BoundedLipschitzDomain.exists_boundaryTrace_eq_le` at `p = q = L = 2`, `s = 1/2`) gives +`F ∈ B^1_{2,2}(V)`, which is the `L_2` function of some `U ∈ H^1(V)` +(`Rd.memSobolev_one_iff_modulus`, `Rd.exists_toL2_eq_of_memSobolev`) with +`‖U‖ ≤ Rd.sobolevOneInvConst V ‖F‖_{B^1_{2,2}}` (`Rd.enorm_le_modNorm_two`). -/ +theorem exists_toL2_boundaryTrace_eq_le (ψ : Ω.BoundaryPartition) : + ∃ C : ℝ≥0∞, C ≠ ∞ ∧ ∀ g : V → ℂ, Ω.MemBoundaryBesov 2 ψ (1 / 2) 2 g → + ∃ U : H^{1}(V), ‖U‖ₑ ≤ C * Ω.boundaryBesovNorm 2 ψ (1 / 2) 2 g ∧ + Ω.boundaryTrace ψ two_ne_top 2 (toL2 U) =ᶠ[Ω.aeBoundary] g := by + obtain ⟨C, hC, hle⟩ := Ω.exists_boundaryTrace_eq_le ψ two_ne_top le_rfl (s := 1 / 2) + (by norm_num) (by norm_num) one_le_two + refine ⟨sobolevOneInvConst V * C, ENNReal.mul_ne_top sobolevOneInvConst_ne_top hC, + fun g hg => ?_⟩ + obtain ⟨F, hFle, hFg⟩ := hle g hg + have hσ : (1 / 2 : ℝ) + 1 / (2 : ℝ≥0∞).toReal = 1 := by norm_num + rw [hσ] at hFle + have hF := hFle.trans_lt (ENNReal.mul_lt_top hC.lt_top + ((Ω.memBoundaryBesov_iff_boundaryBesovNorm_lt_top ψ g).1 hg)) + obtain ⟨U, rfl⟩ := exists_toL2_eq_of_memSobolev ((memSobolev_one_iff_modulus le_rfl F).2 hF) + refine ⟨U, ?_, hFg⟩ + rw [mul_assoc] + exact (enorm_le_modNorm_two U).trans (mul_le_mul' le_rfl hFle) + +/-- **Bounded preimages under the trace**: for every resolution of unity `ψ` there is `C < ∞` +such that every `g ∈ B^{1/2}_{2,2}(Γ)` is `Tr_Γ ι(E t)` almost everywhere on `Γ` for some +`t ∈ H^{1/2}(Γ)` with `‖t‖ ≤ C ‖g‖_{B^{1/2}_{2,2}(Γ)}`; `t = γ(U|_Ω)` for the `U` of +`Rd.BoundedLipschitzDomain.exists_toL2_boundaryTrace_eq_le`. By uniqueness +(`Rd.BoundedLipschitzDomain.boundaryTrace_extend_eventuallyEq_iff`) `t` is determined by `g`; the +linear right inverse is `Rd.BoundedLipschitzDomain.traceRightInverse`. -/ +theorem exists_traceSpace_of_memBoundaryBesov_le (ψ : Ω.BoundaryPartition) : + ∃ C : ℝ≥0∞, C ≠ ∞ ∧ ∀ g : V → ℂ, Ω.MemBoundaryBesov 2 ψ (1 / 2) 2 g → + ∃ t : Ω.TraceSpace, Ω.boundaryTrace ψ two_ne_top 2 + (toL2 ((Ω.extend t : Ω.SobolevOne) : H^{1}(V))) =ᶠ[Ω.aeBoundary] g ∧ + ‖t‖ₑ ≤ C * Ω.boundaryBesovNorm 2 ψ (1 / 2) 2 g := by + obtain ⟨C, hC, hle⟩ := Ω.exists_toL2_boundaryTrace_eq_le ψ + refine ⟨C, hC, fun g hg => ?_⟩ + obtain ⟨U, hU, hUg⟩ := hle g hg + exact ⟨Ω.trace (restrictProj 1 Ω.toOpens U), (Ω.boundaryTrace_extend_trace ψ _).trans + ((Ω.boundaryTrace_restrictProj ψ U).trans hUg), (Ω.enorm_trace_restrictProj_le U).trans hU⟩ + +/-- **The norm of `H^{1/2}(Γ)` is bounded by the norm of the boundary trace**: for every +resolution of unity `ψ` there is `C < ∞` with `‖t‖ ≤ C ‖Tr_Γ ι(E t)‖_{B^{1/2}_{2,2}(Γ)}` for every +`t ∈ H^{1/2}(Γ)`: the bounded preimage +(`Rd.BoundedLipschitzDomain.exists_traceSpace_of_memBoundaryBesov_le`) is `t`, since elements +of the trace space are determined by their boundary traces +(`Rd.BoundedLipschitzDomain.boundaryTrace_extend_eventuallyEq_iff`). -/ +theorem exists_enorm_le_boundaryBesovNorm_extend (ψ : Ω.BoundaryPartition) : + ∃ C : ℝ≥0∞, C ≠ ∞ ∧ ∀ t : Ω.TraceSpace, ‖t‖ₑ ≤ C * Ω.boundaryBesovNorm 2 ψ (1 / 2) 2 + (Ω.boundaryTrace ψ two_ne_top 2 (toL2 ((Ω.extend t : Ω.SobolevOne) : H^{1}(V)))) := by + obtain ⟨C, hC, hle⟩ := Ω.exists_traceSpace_of_memBoundaryBesov_le ψ + refine ⟨C, hC, fun t => ?_⟩ + obtain ⟨t', ht', hle'⟩ := hle _ (Ω.memBoundaryBesov_extend ψ t) + rwa [(Ω.boundaryTrace_extend_eventuallyEq_iff ψ t' t).1 ht'] at hle' + +/-- **`H^{1/2}(Γ)` and `B^{1/2}_{2,2}(Γ)` have equivalent norms** (McLean, Theorem 3.37; +following Schneider–Vybíral, Theorem 4.11, for `p = q = 2`): for every resolution of unity `ψ` +there is +`C < ∞` with `‖t‖ ≤ C ‖τ t‖_{B^{1/2}_{2,2}(Γ)}` and `‖τ t‖_{B^{1/2}_{2,2}(Γ)} ≤ C ‖t‖` +for every `t ∈ H^{1/2}(Γ)`, with the trace `τ : H^{1/2}(Γ) → L_2(Γ)` +(`Rd.BoundedLipschitzDomain.traceL2`). -/ +theorem exists_traceL2_norm_equiv (ψ : Ω.BoundaryPartition) : + ∃ C : ℝ≥0∞, C ≠ ∞ ∧ ∀ t : Ω.TraceSpace, + ‖t‖ₑ ≤ C * Ω.boundaryBesovNorm 2 ψ (1 / 2) 2 (Ω.traceL2 t) ∧ + Ω.boundaryBesovNorm 2 ψ (1 / 2) 2 (Ω.traceL2 t) ≤ C * ‖t‖ₑ := by + obtain ⟨C₁, hC₁, h₁⟩ := Ω.exists_enorm_le_boundaryBesovNorm_extend ψ + obtain ⟨C₂, hC₂, h₂⟩ := Ω.exists_boundaryBesovNorm_extend_le ψ + refine ⟨max C₁ C₂, (max_lt hC₁.lt_top hC₂.lt_top).ne, fun t => ?_⟩ + rw [Ω.boundaryBesovNorm_congr ψ (Ω.ae_surfaceMeasure_iff_aeBoundary.1 (Ω.traceL2_apply_ae ψ t))] + exact ⟨(h₁ t).trans (mul_le_mul' (le_max_left _ _) le_rfl), + (h₂ t).trans (mul_le_mul' (le_max_right _ _) le_rfl)⟩ + +/-- **The range of `H^{1/2}(Γ) → L_2(Γ)` is `B^{1/2}_{2,2}(Γ)`**: for every resolution of unity +`ψ`, `g ∈ L_2(Γ)` is `τ t` for some `t ∈ H^{1/2}(Γ)` iff `g ∈ B^{1/2}_{2,2}(Γ)` +(`Rd.BoundedLipschitzDomain.memBoundaryBesov_extend`, +`Rd.BoundedLipschitzDomain.exists_traceL2_ae_eq`). -/ +theorem mem_range_traceL2_iff (ψ : Ω.BoundaryPartition) (g : Ω.BoundaryL2) : + g ∈ LinearMap.range (Ω.traceL2 : Ω.TraceSpace →ₗ[ℂ] Ω.BoundaryL2) ↔ + Ω.MemBoundaryBesov 2 ψ (1 / 2) 2 g := by + rw [LinearMap.mem_range] + constructor + · rintro ⟨t, rfl⟩ + exact (Ω.memBoundaryBesov_extend ψ t).congr + (EventuallyEq.symm (Ω.ae_surfaceMeasure_iff_aeBoundary.1 (Ω.traceL2_apply_ae ψ t))) + · intro hg + obtain ⟨t, ht⟩ := Ω.exists_traceL2_ae_eq ψ hg + exact ⟨t, Lp.ext ht⟩ + +/-! ### The Banach space `B^{1/2}_{2,2}(Γ)` -/ + +section BoundaryL2Ops + +variable {Ω} {p : ℝ≥0∞} [Fact (1 ≤ p)] + +/-- `B^s_{p,q}(Γ)` contains the class `0` of `L_2(Γ)`. -/ +theorem memBoundaryBesov_coe_zero (ψ : Ω.BoundaryPartition) (s : ℝ) (q : ℝ≥0∞) : + Ω.MemBoundaryBesov p ψ s q ((0 : Ω.BoundaryL2) : V → ℂ) := + ((Ω.memBoundaryBesov_iff_boundaryBesovNorm_lt_top ψ 0).2 + ((Ω.boundaryBesovNorm_zero ψ s q).trans_lt ENNReal.zero_lt_top)).congr + (EventuallyEq.symm (Ω.ae_surfaceMeasure_iff_aeBoundary.1 (Lp.coeFn_zero ℂ 2 Ω.surfaceMeasure))) + +/-- `B^s_{p,q}(Γ)` is closed under the addition of `L_2(Γ)`, for `q ≥ 1` +(`Rd.BoundedLipschitzDomain.MemBoundaryBesov.add`). -/ +theorem MemBoundaryBesov.coe_add {ψ : Ω.BoundaryPartition} {s : ℝ} {q : ℝ≥0∞} (hq : 1 ≤ q) + {f g : Ω.BoundaryL2} (hf : Ω.MemBoundaryBesov p ψ s q f) + (hg : Ω.MemBoundaryBesov p ψ s q g) : + Ω.MemBoundaryBesov p ψ s q ((f + g : Ω.BoundaryL2) : V → ℂ) := + (hf.add hq hg).congr + (EventuallyEq.symm (Ω.ae_surfaceMeasure_iff_aeBoundary.1 (Lp.coeFn_add f g))) + +/-- `B^s_{p,q}(Γ)` is closed under the scalar multiplication of `L_2(Γ)` +(`Rd.BoundedLipschitzDomain.MemBoundaryBesov.const_smul`). -/ +theorem MemBoundaryBesov.coe_smul {ψ : Ω.BoundaryPartition} {s : ℝ} {q : ℝ≥0∞} (c : ℂ) + {f : Ω.BoundaryL2} (hf : Ω.MemBoundaryBesov p ψ s q f) : + Ω.MemBoundaryBesov p ψ s q ((c • f : Ω.BoundaryL2) : V → ℂ) := + (hf.const_smul c).congr + (EventuallyEq.symm (Ω.ae_surfaceMeasure_iff_aeBoundary.1 (Lp.coeFn_smul c f))) + +/-- `B^s_{p,q}(Γ)` is closed under the negation of `L_2(Γ)`, the multiplication by `-1`. -/ +theorem MemBoundaryBesov.coe_neg {ψ : Ω.BoundaryPartition} {s : ℝ} {q : ℝ≥0∞} + {f : Ω.BoundaryL2} (hf : Ω.MemBoundaryBesov p ψ s q f) : + Ω.MemBoundaryBesov p ψ s q ((-f : Ω.BoundaryL2) : V → ℂ) := by + rw [← neg_one_smul ℂ f] + exact hf.coe_smul (-1) + +end BoundaryL2Ops + +/-- **The space `B^{1/2}_{2,2}(Γ)`** as a normed space: the elements `g ∈ L_2(Γ)` of +`B^{1/2}_{2,2}(Γ)` for the canonical resolution of unity +`Rd.BoundedLipschitzDomain.boundaryPartition`, with the norm `‖g‖_{B^{1/2}_{2,2}(Γ)}` by chart +pieces (`Rd.BoundedLipschitzDomain.boundaryBesovNorm`). A structure around `L_2(Γ)` that +carries the norm by chart pieces. It is a Banach space, isomorphic to `H^{1/2}(Γ)` +(`Rd.BoundedLipschitzDomain.traceSpaceEquivBoundaryBesovHalf`). -/ +@[ext] +structure BoundaryBesovHalf where + /-- The function in `L_2(Γ)`. -/ + toL2 : Ω.BoundaryL2 + /-- It lies in `B^{1/2}_{2,2}(Γ)`. -/ + mem : Ω.MemBoundaryBesov 2 Ω.boundaryPartition (1 / 2) 2 toL2 + +namespace BoundaryBesovHalf + +variable {Ω} + +/-- An element of `B^{1/2}_{2,2}(Γ)` is determined by its function in `L_2(Γ)`. -/ +theorem toL2_injective : Function.Injective (toL2 : Ω.BoundaryBesovHalf → Ω.BoundaryL2) := + fun _ _ h => BoundaryBesovHalf.ext h + +/-- The zero function. -/ +noncomputable instance instZero : Zero Ω.BoundaryBesovHalf := + ⟨⟨0, memBoundaryBesov_coe_zero _ _ _⟩⟩ + +/-- The sum of two functions of `B^{1/2}_{2,2}(Γ)`. -/ +noncomputable instance instAdd : Add Ω.BoundaryBesovHalf := + ⟨fun a b => ⟨a.toL2 + b.toL2, a.mem.coe_add one_le_two b.mem⟩⟩ + +/-- The negative of a function of `B^{1/2}_{2,2}(Γ)`. -/ +noncomputable instance instNeg : Neg Ω.BoundaryBesovHalf := ⟨fun a => ⟨-a.toL2, a.mem.coe_neg⟩⟩ + +/-- The difference of two functions of `B^{1/2}_{2,2}(Γ)`. -/ +noncomputable instance instSub : Sub Ω.BoundaryBesovHalf := + ⟨fun a b => ⟨a.toL2 - b.toL2, by + rw [sub_eq_add_neg] + exact a.mem.coe_add one_le_two b.mem.coe_neg⟩⟩ + +/-- Complex multiples of a function of `B^{1/2}_{2,2}(Γ)`. -/ +noncomputable instance instSMul : SMul ℂ Ω.BoundaryBesovHalf := + ⟨fun c a => ⟨c • a.toL2, a.mem.coe_smul c⟩⟩ + +/-- Natural multiples of a function of `B^{1/2}_{2,2}(Γ)`. -/ +noncomputable instance instSMulNat : SMul ℕ Ω.BoundaryBesovHalf := + ⟨fun n a => ⟨n • a.toL2, by + rw [← Nat.cast_smul_eq_nsmul ℂ] + exact a.mem.coe_smul _⟩⟩ + +/-- Integer multiples of a function of `B^{1/2}_{2,2}(Γ)`. -/ +noncomputable instance instSMulInt : SMul ℤ Ω.BoundaryBesovHalf := + ⟨fun n a => ⟨n • a.toL2, by + rw [← Int.cast_smul_eq_zsmul ℂ] + exact a.mem.coe_smul _⟩⟩ + +/-- `B^{1/2}_{2,2}(Γ)` is an additive group, a subgroup of `L_2(Γ)`. -/ +noncomputable instance instAddCommGroup : AddCommGroup Ω.BoundaryBesovHalf := + toL2_injective.addCommGroup _ rfl (fun _ _ => rfl) (fun _ => rfl) (fun _ _ => rfl) + (fun _ _ => rfl) (fun _ _ => rfl) + +/-- The inclusion `B^{1/2}_{2,2}(Γ) → L_2(Γ)` as an additive map. -/ +noncomputable def toL2AddMonoidHom : Ω.BoundaryBesovHalf →+ Ω.BoundaryL2 where + toFun := toL2 + map_zero' := rfl + map_add' _ _ := rfl + +/-- `B^{1/2}_{2,2}(Γ)` is a complex vector space, a subspace of `L_2(Γ)`. -/ +noncomputable instance instModule : Module ℂ Ω.BoundaryBesovHalf := + Function.Injective.module (R := ℂ) toL2AddMonoidHom toL2_injective fun _ _ => rfl + +/-- **The norm of `B^{1/2}_{2,2}(Γ)`**: `‖g‖_{B^{1/2}_{2,2}(Γ)}` by chart pieces, for the canonical +resolution of unity. -/ +noncomputable instance instNorm : Norm Ω.BoundaryBesovHalf := + ⟨fun a => (Ω.boundaryBesovNorm 2 Ω.boundaryPartition (1 / 2) 2 a.toL2).toReal⟩ + +/-- The norm of `B^{1/2}_{2,2}(Γ)` is `‖g‖_{B^{1/2}_{2,2}(Γ)}` by chart pieces. -/ +protected theorem norm_def (a : Ω.BoundaryBesovHalf) : + ‖a‖ = (Ω.boundaryBesovNorm 2 Ω.boundaryPartition (1 / 2) 2 a.toL2).toReal := + rfl + +/-- The quasi-norm of an element of `B^{1/2}_{2,2}(Γ)` is finite. -/ +theorem boundaryBesovNorm_lt_top (a : Ω.BoundaryBesovHalf) : + Ω.boundaryBesovNorm 2 Ω.boundaryPartition (1 / 2) 2 a.toL2 < ∞ := + (Ω.memBoundaryBesov_iff_boundaryBesovNorm_lt_top _ _).1 a.mem + +/-- The norm is homogeneous (`Rd.BoundedLipschitzDomain.boundaryBesovNorm_const_smul`). -/ +protected theorem norm_smul (c : ℂ) (a : Ω.BoundaryBesovHalf) : ‖c • a‖ = ‖c‖ * ‖a‖ := by + rw [BoundaryBesovHalf.norm_def, BoundaryBesovHalf.norm_def] + change (Ω.boundaryBesovNorm 2 Ω.boundaryPartition (1 / 2) 2 + ((c • a.toL2 : Ω.BoundaryL2) : V → ℂ)).toReal = _ + rw [Ω.boundaryBesovNorm_congr _ + (Ω.ae_surfaceMeasure_iff_aeBoundary.1 (Lp.coeFn_smul c a.toL2)), + Ω.boundaryBesovNorm_const_smul _ c _, ENNReal.toReal_mul, toReal_eNorm] + +/-- The triangle inequality (`Rd.BoundedLipschitzDomain.boundaryBesovNorm_add_le`). -/ +protected theorem norm_add_le (a b : Ω.BoundaryBesovHalf) : ‖a + b‖ ≤ ‖a‖ + ‖b‖ := by + rw [BoundaryBesovHalf.norm_def, BoundaryBesovHalf.norm_def, BoundaryBesovHalf.norm_def, + ← ENNReal.toReal_add a.boundaryBesovNorm_lt_top.ne b.boundaryBesovNorm_lt_top.ne] + refine ENNReal.toReal_mono (ENNReal.add_ne_top.2 + ⟨a.boundaryBesovNorm_lt_top.ne, b.boundaryBesovNorm_lt_top.ne⟩) ?_ + change Ω.boundaryBesovNorm 2 Ω.boundaryPartition (1 / 2) 2 + ((a.toL2 + b.toL2 : Ω.BoundaryL2) : V → ℂ) ≤ _ + rw [Ω.boundaryBesovNorm_congr _ + (Ω.ae_surfaceMeasure_iff_aeBoundary.1 (Lp.coeFn_add a.toL2 b.toL2))] + exact Ω.boundaryBesovNorm_add_le _ one_le_two _ _ + +/-- **The norm is definite**: `‖g‖_{B^{1/2}_{2,2}(Γ)} = 0` iff `g = 0`; a vanishing norm makes all +chart pieces vanish (`Rd.BoundedLipschitzDomain.chart_ae_eq_zero_of_boundaryBesovNorm_eq_zero`), +hence `g = 0` almost everywhere on `Γ` +(`Rd.BoundedLipschitzDomain.eventuallyEq_zero_iff_forall_chart`). -/ +protected theorem norm_eq_zero_iff (a : Ω.BoundaryBesovHalf) : ‖a‖ = 0 ↔ a = 0 := by + constructor + · intro h + rw [BoundaryBesovHalf.norm_def, ENNReal.toReal_eq_zero_iff] at h + have h0 := h.resolve_right a.boundaryBesovNorm_lt_top.ne + ext1 + change a.toL2 = 0 + rw [Lp.eq_zero_iff_ae_eq_zero] + exact Ω.ae_surfaceMeasure_iff_aeBoundary.2 + ((Ω.eventuallyEq_zero_iff_forall_chart Ω.boundaryPartition _).2 + (Ω.chart_ae_eq_zero_of_boundaryBesovNorm_eq_zero _ h0)) + · rintro rfl + rw [BoundaryBesovHalf.norm_def] + change (Ω.boundaryBesovNorm 2 Ω.boundaryPartition (1 / 2) 2 + ((0 : Ω.BoundaryL2) : V → ℂ)).toReal = 0 + rw [Ω.boundaryBesovNorm_congr _ + (Ω.ae_surfaceMeasure_iff_aeBoundary.1 (Lp.coeFn_zero ℂ 2 Ω.surfaceMeasure)), + Ω.boundaryBesovNorm_zero, ENNReal.toReal_zero] + +/-- The axioms of a normed space for `B^{1/2}_{2,2}(Γ)`. -/ +theorem normedSpaceCore : NormedSpace.Core ℂ Ω.BoundaryBesovHalf where + norm_nonneg _ := ENNReal.toReal_nonneg + norm_smul := BoundaryBesovHalf.norm_smul + norm_triangle := BoundaryBesovHalf.norm_add_le + norm_eq_zero_iff := BoundaryBesovHalf.norm_eq_zero_iff + +/-- `B^{1/2}_{2,2}(Γ)` is a normed group (Mathlib's `NormedAddCommGroup.ofCore`). -/ +noncomputable instance instNormedAddCommGroup : NormedAddCommGroup Ω.BoundaryBesovHalf := + NormedAddCommGroup.ofCore normedSpaceCore + +/-- `B^{1/2}_{2,2}(Γ)` is a complex normed space (Mathlib's `NormedSpace.ofCore`). -/ +noncomputable instance instNormedSpace : NormedSpace ℂ Ω.BoundaryBesovHalf := + NormedSpace.ofCore normedSpaceCore + +end BoundaryBesovHalf + +/-- The trace `t ↦ τ t` from `H^{1/2}(Γ)` into `B^{1/2}_{2,2}(Γ)` as a linear map +(`Rd.BoundedLipschitzDomain.mem_range_traceL2_iff`). -/ +noncomputable def traceSpaceToBoundaryBesovHalf : Ω.TraceSpace →ₗ[ℂ] Ω.BoundaryBesovHalf where + toFun t := ⟨Ω.traceL2 t, (Ω.mem_range_traceL2_iff Ω.boundaryPartition _).1 + (LinearMap.mem_range.2 ⟨t, rfl⟩)⟩ + map_add' t t' := BoundaryBesovHalf.ext (map_add Ω.traceL2 t t') + map_smul' c t := BoundaryBesovHalf.ext (map_smul Ω.traceL2 c t) + +/-- The trace `H^{1/2}(Γ) → B^{1/2}_{2,2}(Γ)` is bijective: injective by +`Rd.BoundedLipschitzDomain.traceL2_injective`, surjective by +`Rd.BoundedLipschitzDomain.mem_range_traceL2_iff`. -/ +theorem traceSpaceToBoundaryBesovHalf_bijective : + Function.Bijective Ω.traceSpaceToBoundaryBesovHalf := by + refine ⟨fun t t' h => Ω.traceL2_injective (congrArg BoundaryBesovHalf.toL2 h), fun b => ?_⟩ + obtain ⟨t, ht⟩ := LinearMap.mem_range.1 + ((Ω.mem_range_traceL2_iff Ω.boundaryPartition b.toL2).2 b.mem) + exact ⟨t, BoundaryBesovHalf.ext ht⟩ + +/-- The trace `H^{1/2}(Γ) → B^{1/2}_{2,2}(Γ)` as a linear isomorphism. -/ +noncomputable def traceSpaceLinearEquiv : + Ω.TraceSpace ≃ₗ[ℂ] Ω.BoundaryBesovHalf := + LinearEquiv.ofBijective _ Ω.traceSpaceToBoundaryBesovHalf_bijective + +/-- The linear isomorphism sends `t` to `τ t`. -/ +theorem toL2_traceSpaceLinearEquiv (t : Ω.TraceSpace) : + (Ω.traceSpaceLinearEquiv t).toL2 = Ω.traceL2 t := + rfl + +/-- **The constant of the norm equivalence** `H^{1/2}(Γ) ≅ B^{1/2}_{2,2}(Γ)` for the canonical +resolution of unity, a choice among the constants of +`Rd.BoundedLipschitzDomain.exists_traceL2_norm_equiv`. -/ +noncomputable def traceNormConst : ℝ≥0∞ := + (Ω.exists_traceL2_norm_equiv Ω.boundaryPartition).choose + +/-- The constant of the norm equivalence is finite. -/ +theorem traceNormConst_ne_top : Ω.traceNormConst ≠ ∞ := + (Ω.exists_traceL2_norm_equiv Ω.boundaryPartition).choose_spec.1 + +/-- The two bounds of the norm equivalence with the constant `Ω.traceNormConst`. -/ +theorem traceNormConst_spec (t : Ω.TraceSpace) : + ‖t‖ₑ ≤ Ω.traceNormConst * Ω.boundaryBesovNorm 2 Ω.boundaryPartition (1 / 2) 2 (Ω.traceL2 t) ∧ + Ω.boundaryBesovNorm 2 Ω.boundaryPartition (1 / 2) 2 (Ω.traceL2 t) ≤ + Ω.traceNormConst * ‖t‖ₑ := + (Ω.exists_traceL2_norm_equiv Ω.boundaryPartition).choose_spec.2 t + +/-- `‖τ t‖_{B^{1/2}_{2,2}(Γ)} ≤ C ‖t‖` with `C = Ω.traceNormConst`. -/ +theorem norm_traceSpaceLinearEquiv_le (t : Ω.TraceSpace) : + ‖Ω.traceSpaceLinearEquiv t‖ ≤ Ω.traceNormConst.toReal * ‖t‖ := by + rw [BoundaryBesovHalf.norm_def, toL2_traceSpaceLinearEquiv, ← toReal_eNorm t, + ← ENNReal.toReal_mul] + exact ENNReal.toReal_mono (ENNReal.mul_ne_top Ω.traceNormConst_ne_top eNorm_ne_top) + (Ω.traceNormConst_spec t).2 + +/-- `‖t‖ ≤ C ‖τ t‖_{B^{1/2}_{2,2}(Γ)}` with `C = Ω.traceNormConst`, for the inverse map. -/ +theorem norm_traceSpaceLinearEquiv_symm_le (b : Ω.BoundaryBesovHalf) : + ‖Ω.traceSpaceLinearEquiv.symm b‖ ≤ Ω.traceNormConst.toReal * ‖b‖ := by + have h := (Ω.traceNormConst_spec (Ω.traceSpaceLinearEquiv.symm b)).1 + have hb : Ω.traceL2 (Ω.traceSpaceLinearEquiv.symm b) = b.toL2 := + congrArg BoundaryBesovHalf.toL2 (Ω.traceSpaceLinearEquiv.apply_symm_apply b) + rw [hb] at h + rw [← toReal_eNorm (Ω.traceSpaceLinearEquiv.symm b), + BoundaryBesovHalf.norm_def, ← ENNReal.toReal_mul] + exact ENNReal.toReal_mono (ENNReal.mul_ne_top Ω.traceNormConst_ne_top + b.boundaryBesovNorm_lt_top.ne) h + +/-- **`H^{1/2}(Γ) ≅ B^{1/2}_{2,2}(Γ)`** (McLean, Theorem 3.37; following Schneider–Vybíral, +Theorem 4.11, for `p = q = 2`): the trace `t ↦ τ t` is an isomorphism of normed spaces from the +trace space +onto `B^{1/2}_{2,2}(Γ)` with the norm by chart pieces (Mathlib's +`LinearEquiv.toContinuousLinearEquivOfBounds`), with the bounds of +`Rd.BoundedLipschitzDomain.exists_traceL2_norm_equiv` in both directions. -/ +noncomputable def traceSpaceEquivBoundaryBesovHalf : Ω.TraceSpace ≃L[ℂ] Ω.BoundaryBesovHalf := + Ω.traceSpaceLinearEquiv.toContinuousLinearEquivOfBounds + Ω.traceNormConst.toReal Ω.traceNormConst.toReal + Ω.norm_traceSpaceLinearEquiv_le + Ω.norm_traceSpaceLinearEquiv_symm_le + +/-- The isomorphism of normed spaces sends `t` to `τ t`. -/ +theorem toL2_traceSpaceEquivBoundaryBesovHalf (t : Ω.TraceSpace) : + (Ω.traceSpaceEquivBoundaryBesovHalf t).toL2 = Ω.traceL2 t := + rfl + +/-- **`B^{1/2}_{2,2}(Γ)` is a Banach space**: it is isomorphic to the Hilbert space `H^{1/2}(Γ)` +(`Rd.BoundedLipschitzDomain.traceSpaceEquivBoundaryBesovHalf`; Mathlib's `completeSpace_congr`). -/ +instance completeSpace_boundaryBesovHalf : CompleteSpace Ω.BoundaryBesovHalf := + (completeSpace_congr (e := Ω.traceSpaceEquivBoundaryBesovHalf.toEquiv) + Ω.traceSpaceEquivBoundaryBesovHalf.isUniformEmbedding).1 inferInstance + +/-- **The bounded linear right inverse of the trace** (as in McLean, Theorem 3.37): the map +`B^{1/2}_{2,2}(Γ) → H^1(Ω)`, `g ↦ E τ⁻¹ g`, the inverse of the isomorphism +`Rd.BoundedLipschitzDomain.traceSpaceEquivBoundaryBesovHalf` followed by the extension `E`. -/ +noncomputable def traceRightInverse : Ω.BoundaryBesovHalf →L[ℂ] Ω.SobolevOne := + Ω.extend ∘L (Ω.traceSpaceEquivBoundaryBesovHalf.symm : Ω.BoundaryBesovHalf →L[ℂ] Ω.TraceSpace) + +/-- The trace of `E τ⁻¹ g` is `τ⁻¹ g` (`Rd.BoundedLipschitzDomain.trace_extend`). -/ +theorem trace_traceRightInverse (b : Ω.BoundaryBesovHalf) : + Ω.trace (Ω.traceRightInverse b) = Ω.traceSpaceEquivBoundaryBesovHalf.symm b := + Ω.trace_extend _ + +/-- **The right inverse inverts the trace**: `γ_{L_2}(E τ⁻¹ g) = g` in `L_2(Γ)` for every +`g ∈ B^{1/2}_{2,2}(Γ)`, with the trace `γ_{L_2} = τ ∘ γ : H^1(Ω) → L_2(Γ)` +(`Rd.BoundedLipschitzDomain.boundaryTraceL2`). -/ +theorem boundaryTraceL2_traceRightInverse (b : Ω.BoundaryBesovHalf) : + Ω.boundaryTraceL2 (Ω.traceRightInverse b) = b.toL2 := by + change Ω.traceL2 (Ω.trace (Ω.traceRightInverse b)) = b.toL2 + rw [Ω.trace_traceRightInverse, ← Ω.toL2_traceSpaceEquivBoundaryBesovHalf, + ContinuousLinearEquiv.apply_symm_apply] + +/-- **The right inverse is bounded**: `‖E τ⁻¹ g‖ ≤ C ‖g‖_{B^{1/2}_{2,2}(Γ)}` with +`C = Ω.traceNormConst`, since `E` is an isometry +(`Rd.BoundedLipschitzDomain.norm_extend_apply`, +`Rd.BoundedLipschitzDomain.norm_traceSpaceLinearEquiv_symm_le`). -/ +theorem norm_traceRightInverse_le (b : Ω.BoundaryBesovHalf) : + ‖Ω.traceRightInverse b‖ ≤ Ω.traceNormConst.toReal * ‖b‖ := + (Ω.norm_extend_apply _).trans_le (Ω.norm_traceSpaceLinearEquiv_symm_le b) + +end BoundedLipschitzDomain + +end Rd diff --git a/LeanPool/FunctionSpaces/Imports.lean b/LeanPool/FunctionSpaces/Imports.lean new file mode 100644 index 0000000000..d85e18bdb1 --- /dev/null +++ b/LeanPool/FunctionSpaces/Imports.lean @@ -0,0 +1,297 @@ +/- +Copyright (c) 2026 Lean Pool contributors. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Lean Pool contributors +-/ +module -- shake: keep-all --deprecated_module: ignore + +-- Generated project imports; run `lake exe mk_all`. +public import LeanPool.FunctionSpaces +public import LeanPool.FunctionSpaces.Analysis.Differences.Differences +public import LeanPool.FunctionSpaces.Analysis.Differences.DomainModuli +public import LeanPool.FunctionSpaces.Analysis.Differences.TranslationAlgebra +public import LeanPool.FunctionSpaces.Analysis.Fourier.ApproxIdentity +public import LeanPool.FunctionSpaces.Analysis.Fourier.Convolution +public import LeanPool.FunctionSpaces.Analysis.Fourier.LittlewoodPaleyKernels +public import LeanPool.FunctionSpaces.Analysis.Fourier.SchwartzCutoff +public import LeanPool.FunctionSpaces.Analysis.Lp.BoundedContinuous +public import LeanPool.FunctionSpaces.Analysis.Lp.Inclusion +public import LeanPool.FunctionSpaces.Analysis.Lp.IndicatorOperator +public import LeanPool.FunctionSpaces.Analysis.Lp.Interpolation +public import LeanPool.FunctionSpaces.Analysis.Lp.LayerCake +public import LeanPool.FunctionSpaces.Analysis.Lp.LintegralForm +public import LeanPool.FunctionSpaces.Analysis.Lp.Marcinkiewicz +public import LeanPool.FunctionSpaces.Analysis.Lp.MixedNorms +public import LeanPool.FunctionSpaces.Analysis.Lp.NormingFamily +public import LeanPool.FunctionSpaces.Analysis.Lp.WeakType +public import LeanPool.FunctionSpaces.Analysis.Lp.Young +public import LeanPool.FunctionSpaces.Analysis.Maximal.CalderonZygmund +public import LeanPool.FunctionSpaces.Analysis.Maximal.CalderonZygmundSigned +public import LeanPool.FunctionSpaces.Analysis.Maximal.DyadicCubes +public import LeanPool.FunctionSpaces.Analysis.Maximal.DyadicGrid +public import LeanPool.FunctionSpaces.Analysis.Maximal.FeffermanStein +public import LeanPool.FunctionSpaces.Analysis.Maximal.HardyLittlewoodMaximal +public import LeanPool.FunctionSpaces.ApproximationSpaces +public import LeanPool.FunctionSpaces.ApproximationSpaces.Decompositions.Atomic +public import LeanPool.FunctionSpaces.ApproximationSpaces.Decompositions.Blocks +public import LeanPool.FunctionSpaces.ApproximationSpaces.Decompositions.Projection +public import LeanPool.FunctionSpaces.ApproximationSpaces.Decompositions.Synthesis +public import LeanPool.FunctionSpaces.ApproximationSpaces.Dyadic +public import LeanPool.FunctionSpaces.ApproximationSpaces.Embedding +public import LeanPool.FunctionSpaces.ApproximationSpaces.Error +public import LeanPool.FunctionSpaces.ApproximationSpaces.Instances.NTerm +public import LeanPool.FunctionSpaces.ApproximationSpaces.Instances.NTermHilbertBasis +public import LeanPool.FunctionSpaces.ApproximationSpaces.Instances.Span +public import LeanPool.FunctionSpaces.ApproximationSpaces.Interpolation.ApproxSpaces +public import LeanPool.FunctionSpaces.ApproximationSpaces.Interpolation.Couple +public import LeanPool.FunctionSpaces.ApproximationSpaces.Interpolation.EFunctional +public import LeanPool.FunctionSpaces.ApproximationSpaces.Interpolation.EFunctionalModuli +public import LeanPool.FunctionSpaces.ApproximationSpaces.Interpolation.KFunctional +public import LeanPool.FunctionSpaces.ApproximationSpaces.Interpolation.KMethod +public import LeanPool.FunctionSpaces.ApproximationSpaces.Interpolation.Property +public import LeanPool.FunctionSpaces.ApproximationSpaces.Interpolation.Reiteration +public import LeanPool.FunctionSpaces.ApproximationSpaces.Interpolation.Representation +public import LeanPool.FunctionSpaces.ApproximationSpaces.Jackson +public import LeanPool.FunctionSpaces.ApproximationSpaces.Lift +public import LeanPool.FunctionSpaces.ApproximationSpaces.Moduli +public import LeanPool.FunctionSpaces.ApproximationSpaces.Nikolskii +public import LeanPool.FunctionSpaces.ApproximationSpaces.Norm +public import LeanPool.FunctionSpaces.ApproximationSpaces.Retract +public import LeanPool.FunctionSpaces.ApproximationSpaces.Scheme +public import LeanPool.FunctionSpaces.ApproximationSpaces.Sequences.Dyadic +public import LeanPool.FunctionSpaces.ApproximationSpaces.Sequences.Hardy +public import LeanPool.FunctionSpaces.ApproximationSpaces.Sequences.Lq +public import LeanPool.FunctionSpaces.ApproximationSpaces.Sequences.Rearrangement +public import LeanPool.FunctionSpaces.ApproximationSpaces.Space +public import LeanPool.FunctionSpaces.ApproximationSpaces.Trace +public import LeanPool.FunctionSpaces.ApproximationSpaces.Transfer +public import LeanPool.FunctionSpaces.Domains.Cube.Basic +public import LeanPool.FunctionSpaces.Domains.Cube.IsoCoincidence +public import LeanPool.FunctionSpaces.Domains.Cube.IsoDifferences +public import LeanPool.FunctionSpaces.Domains.Cube.IsoInverse +public import LeanPool.FunctionSpaces.Domains.Cube.IsoModulus +public import LeanPool.FunctionSpaces.Domains.Cube.Modulus +public import LeanPool.FunctionSpaces.Domains.Cube.PiecewiseInverse +public import LeanPool.FunctionSpaces.Domains.Cube.PiecewiseJackson +public import LeanPool.FunctionSpaces.Domains.Cube.PiecewisePoly +public import LeanPool.FunctionSpaces.Domains.Cube.SlicewiseOperators +public import LeanPool.FunctionSpaces.Domains.Cube.Smoothing +public import LeanPool.FunctionSpaces.Domains.Cube.SplineInverse +public import LeanPool.FunctionSpaces.Domains.Cube.SplineJackson +public import LeanPool.FunctionSpaces.Domains.Cube.Splines +public import LeanPool.FunctionSpaces.Domains.Extension.HalfSpaceReflection +public import LeanPool.FunctionSpaces.Domains.Extension.HigherDivergenceKernels +public import LeanPool.FunctionSpaces.Domains.Extension.HigherSobolevExtension +public import LeanPool.FunctionSpaces.Domains.Extension.LipschitzGraphBesov +public import LeanPool.FunctionSpaces.Domains.Extension.LocalExtension +public import LeanPool.FunctionSpaces.Domains.Extension.ReflectionExtension +public import LeanPool.FunctionSpaces.Domains.Extension.ReflectionExtensionOperator +public import LeanPool.FunctionSpaces.Domains.Extension.RychkovExtension +public import LeanPool.FunctionSpaces.Domains.Extension.SobolevExtension +public import LeanPool.FunctionSpaces.Domains.Extension.SobolevExtensionOperator +public import LeanPool.FunctionSpaces.Domains.Interval.BSpline +public import LeanPool.FunctionSpaces.Domains.Interval.Differences +public import LeanPool.FunctionSpaces.Domains.Interval.LocalProjection +public import LeanPool.FunctionSpaces.Domains.Interval.LowerDifferences +public import LeanPool.FunctionSpaces.Domains.Interval.Modulus +public import LeanPool.FunctionSpaces.Domains.Interval.Periodic +public import LeanPool.FunctionSpaces.Domains.Interval.PiecewiseInverse +public import LeanPool.FunctionSpaces.Domains.Interval.PiecewiseJackson +public import LeanPool.FunctionSpaces.Domains.Interval.PiecewisePeriodic +public import LeanPool.FunctionSpaces.Domains.Interval.PiecewisePoly +public import LeanPool.FunctionSpaces.Domains.Interval.PolyDifferences +public import LeanPool.FunctionSpaces.Domains.Interval.Polynomials +public import LeanPool.FunctionSpaces.Domains.Interval.QuasiInterp +public import LeanPool.FunctionSpaces.Domains.Interval.Smoothing +public import LeanPool.FunctionSpaces.Domains.Interval.SplineInverse +public import LeanPool.FunctionSpaces.Domains.Interval.SplineJackson +public import LeanPool.FunctionSpaces.Domains.Interval.SplinePeriodic +public import LeanPool.FunctionSpaces.Domains.Interval.SplinePeriodicJackson +public import LeanPool.FunctionSpaces.Domains.Interval.Splines +public import LeanPool.FunctionSpaces.Domains.Interval.Steklov +public import LeanPool.FunctionSpaces.Domains.Interval.Taylor +public import LeanPool.FunctionSpaces.Domains.Interval.Whitney +public import LeanPool.FunctionSpaces.Domains.Lipschitz.BesovDomainLocalisation +public import LeanPool.FunctionSpaces.Domains.Lipschitz.BesovDomains +public import LeanPool.FunctionSpaces.Domains.Lipschitz.BoundedLipschitz +public import LeanPool.FunctionSpaces.Domains.Lipschitz.ConvexDomains +public import LeanPool.FunctionSpaces.Domains.Lipschitz.GraphParametrization +public import LeanPool.FunctionSpaces.Domains.Lipschitz.GraphStraightening +public import LeanPool.FunctionSpaces.Domains.Lipschitz.HalfSpace +public import LeanPool.FunctionSpaces.Domains.Lipschitz.LipschitzGraph +public import LeanPool.FunctionSpaces.Domains.Lipschitz.LipschitzGraphArea +public import LeanPool.FunctionSpaces.Domains.Lipschitz.LocalLipschitzGraphs +public import LeanPool.FunctionSpaces.Domains.Lipschitz.SurfaceMeasure +public import LeanPool.FunctionSpaces.Domains.Manifolds.Besov +public import LeanPool.FunctionSpaces.Domains.Manifolds.BesovAtlas +public import LeanPool.FunctionSpaces.Domains.Manifolds.BoundaryBesov +public import LeanPool.FunctionSpaces.Domains.Manifolds.BoundaryTrace +public import LeanPool.FunctionSpaces.Domains.Manifolds.ChartSobolev +public import LeanPool.FunctionSpaces.Domains.Manifolds.SmoothDomain +public import LeanPool.FunctionSpaces.Domains.Manifolds.SmoothDomainBesov +public import LeanPool.FunctionSpaces.Domains.Manifolds.SmoothLocalGraphs +public import LeanPool.FunctionSpaces.Domains.Manifolds.SmoothMeasure +public import LeanPool.FunctionSpaces.Domains.Manifolds.SmoothMeasureExistence +public import LeanPool.FunctionSpaces.Domains.Sobolev.LipschitzDomainGreen +public import LeanPool.FunctionSpaces.Domains.Sobolev.LipschitzDomainH1 +public import LeanPool.FunctionSpaces.Domains.Sobolev.LipschitzDomainW1p +public import LeanPool.FunctionSpaces.Domains.Sobolev.LipschitzGraphGreen +public import LeanPool.FunctionSpaces.Domains.Sobolev.SobolevDuality +public import LeanPool.FunctionSpaces.Domains.Sobolev.SobolevRestrictionSpaces +public import LeanPool.FunctionSpaces.Domains.Spectral.ChartFormEigenbasis +public import LeanPool.FunctionSpaces.Domains.Spectral.DirichletEigenbasis +public import LeanPool.FunctionSpaces.Domains.Spectral.ManifoldSpectralBesov +public import LeanPool.FunctionSpaces.Domains.Spectral.NeumannEigenbasis +public import LeanPool.FunctionSpaces.Domains.Spectral.SpectralBesov +public import LeanPool.FunctionSpaces.Domains.Traces.BoundaryBesovNorm +public import LeanPool.FunctionSpaces.Domains.Traces.BoundaryGagliardo +public import LeanPool.FunctionSpaces.Domains.Traces.BoundaryTraceSpace +public import LeanPool.FunctionSpaces.Domains.Traces.GraphTrace +public import LeanPool.FunctionSpaces.Domains.Traces.GraphTraceCharts +public import LeanPool.FunctionSpaces.Domains.Traces.GraphTraceExtension +public import LeanPool.FunctionSpaces.Domains.Traces.HalfSpaceTrace +public import LeanPool.FunctionSpaces.Domains.Traces.LipschitzBoundaryTrace +public import LeanPool.FunctionSpaces.Domains.Traces.MollifiedGraph +public import LeanPool.FunctionSpaces.Domains.Traces.TraceKernel +public import LeanPool.FunctionSpaces.Domains.Traces.TraceSpaceNorm +public import LeanPool.FunctionSpaces.MeasureSpaces.Besov.Basic +public import LeanPool.FunctionSpaces.MeasureSpaces.Besov.ElementaryEmbeddings +public import LeanPool.FunctionSpaces.MeasureSpaces.Besov.Embeddings +public import LeanPool.FunctionSpaces.MeasureSpaces.Besov.Interpolation +public import LeanPool.FunctionSpaces.MeasureSpaces.Besov.Nikolskii +public import LeanPool.FunctionSpaces.MeasureSpaces.Martingales.Filtration +public import LeanPool.FunctionSpaces.MeasureSpaces.Martingales.Partition +public import LeanPool.FunctionSpaces.MeasureSpaces.Scheme +public import LeanPool.FunctionSpaces.MeasureSpaces.Sobolev.Embeddings +public import LeanPool.FunctionSpaces.MeasureSpaces.Spectral.Basic +public import LeanPool.FunctionSpaces.MeasureSpaces.Spectral.Blocks +public import LeanPool.FunctionSpaces.MeasureSpaces.Spectral.CompactEigenbasis +public import LeanPool.FunctionSpaces.MeasureSpaces.Spectral.CompactEmbedding +public import LeanPool.FunctionSpaces.MeasureSpaces.Spectral.ContinuousSpectralBasis +public import LeanPool.FunctionSpaces.MeasureSpaces.Spectral.LocalWeyl +public import LeanPool.FunctionSpaces.Rd.Approximation.BandInverse +public import LeanPool.FunctionSpaces.Rd.Approximation.BandJackson +public import LeanPool.FunctionSpaces.Rd.Approximation.BandLimited +public import LeanPool.FunctionSpaces.Rd.Atoms.AtomAnalysis +public import LeanPool.FunctionSpaces.Rd.Atoms.AtomComposition +public import LeanPool.FunctionSpaces.Rd.Atoms.AtomSynthesis +public import LeanPool.FunctionSpaces.Rd.Atoms.DiffeoInvariance +public import LeanPool.FunctionSpaces.Rd.Atoms.SmoothAtoms +public import LeanPool.FunctionSpaces.Rd.BesselPotentials.BesselPotentialDistributions +public import LeanPool.FunctionSpaces.Rd.BesselPotentials.BesselPotentialEmbedding +public import LeanPool.FunctionSpaces.Rd.BesselPotentials.BesselPotentialLifting +public import LeanPool.FunctionSpaces.Rd.BesselPotentials.UniformSchwartzFamilies +public import LeanPool.FunctionSpaces.Rd.Differences.BesovDifferences +public import LeanPool.FunctionSpaces.Rd.Differences.ConvexDifferences +public import LeanPool.FunctionSpaces.Rd.Differences.DilatedDifferences +public import LeanPool.FunctionSpaces.Rd.Differences.MomentKernels +public import LeanPool.FunctionSpaces.Rd.Differences.PointwiseMultipliers +public import LeanPool.FunctionSpaces.Rd.Differences.SobolevSlobodeckij +public import LeanPool.FunctionSpaces.Rd.FourierMultipliers.BesselPotentialMultipliers +public import LeanPool.FunctionSpaces.Rd.FourierMultipliers.MihlinMultipliers +public import LeanPool.FunctionSpaces.Rd.FourierMultipliers.SymbolKernels +public import LeanPool.FunctionSpaces.Rd.FourierMultipliers.TriebelLizorkinMultipliers +public import LeanPool.FunctionSpaces.Rd.Interpolation.BesovInterpolation +public import LeanPool.FunctionSpaces.Rd.Interpolation.BesselPotentialInterpolation +public import LeanPool.FunctionSpaces.Rd.Interpolation.SobolevInterpolation +public import LeanPool.FunctionSpaces.Rd.Interpolation.TriebelLizorkinInterpolation +public import LeanPool.FunctionSpaces.Rd.LittlewoodPaley.LittlewoodPaley +public import LeanPool.FunctionSpaces.Rd.LocalMeans.KernelMajorants +public import LeanPool.FunctionSpaces.Rd.LocalMeans.LocalMeans +public import LeanPool.FunctionSpaces.Rd.MixedSmoothness.HyperbolicCross +public import LeanPool.FunctionSpaces.Rd.MixedSmoothness.MixedAveragedDifferences +public import LeanPool.FunctionSpaces.Rd.MixedSmoothness.MixedDifferences +public import LeanPool.FunctionSpaces.Rd.MixedSmoothness.MixedLittlewoodPaley +public import LeanPool.FunctionSpaces.Rd.MixedSmoothness.MixedLocalMeans +public import LeanPool.FunctionSpaces.Rd.MixedSmoothness.MixedSequences +public import LeanPool.FunctionSpaces.Rd.MixedSmoothness.TensorKernels +public import LeanPool.FunctionSpaces.Rd.SingularIntegrals.ConvolutionAdjoint +public import LeanPool.FunctionSpaces.Rd.SingularIntegrals.DilationFamilies +public import LeanPool.FunctionSpaces.Rd.SingularIntegrals.PlancherelBounds +public import LeanPool.FunctionSpaces.Rd.SingularIntegrals.VectorValuedSingularIntegrals +public import LeanPool.FunctionSpaces.Rd.SingularIntegrals.VectorValuedWeakType +public import LeanPool.FunctionSpaces.Rd.Sobolev.CriticalSobolevEmbedding +public import LeanPool.FunctionSpaces.Rd.Sobolev.DerivativeKernels +public import LeanPool.FunctionSpaces.Rd.Sobolev.DivergenceKernels +public import LeanPool.FunctionSpaces.Rd.Sobolev.GagliardoNirenbergSobolev +public import LeanPool.FunctionSpaces.Rd.Sobolev.RellichCompactness +public import LeanPool.FunctionSpaces.Rd.Sobolev.SobolevEmbedding +public import LeanPool.FunctionSpaces.Rd.Sobolev.SobolevJets +public import LeanPool.FunctionSpaces.Rd.Sobolev.SobolevTriebelLizorkin +public import LeanPool.FunctionSpaces.Rd.Sobolev.SobolevTwoLittlewoodPaley +public import LeanPool.FunctionSpaces.Rd.Sobolev.WeakDerivativeChangeOfVariables +public import LeanPool.FunctionSpaces.Rd.Sobolev.WeakDerivativeLeibniz +public import LeanPool.FunctionSpaces.Rd.Sobolev.WeakDerivatives +public import LeanPool.FunctionSpaces.Rd.TriebelLizorkin.LittlewoodPaleyFamilies +public import LeanPool.FunctionSpaces.Rd.TriebelLizorkin.SquareFunction +public import LeanPool.FunctionSpaces.Rd.TriebelLizorkin.TriebelLizorkin +public import LeanPool.FunctionSpaces.Rd.TriebelLizorkin.TriebelLizorkinAtoms +public import LeanPool.FunctionSpaces.Rd.TriebelLizorkin.TriebelLizorkinDifferences +public import LeanPool.FunctionSpaces.Rd.TriebelLizorkin.TriebelLizorkinDistributions +public import LeanPool.FunctionSpaces.Rd.TriebelLizorkin.TriebelLizorkinLocalMeans +public import LeanPool.FunctionSpaces.Torus.BesovInterpolation +public import LeanPool.FunctionSpaces.Torus.BesovModuli +public import LeanPool.FunctionSpaces.Torus.Coefficients +public import LeanPool.FunctionSpaces.Torus.Embeddings +public import LeanPool.FunctionSpaces.Torus.EuclideanConvolution +public import LeanPool.FunctionSpaces.Torus.EuclideanConvolutionIdentities +public import LeanPool.FunctionSpaces.Torus.FeffermanStein +public import LeanPool.FunctionSpaces.Torus.FourierSpectralBasis +public import LeanPool.FunctionSpaces.Torus.HaarMeasure +public import LeanPool.FunctionSpaces.Torus.LittlewoodPaley +public import LeanPool.FunctionSpaces.Torus.LpBesovModuli +public import LeanPool.FunctionSpaces.Torus.LpFourierCoefficients +public import LeanPool.FunctionSpaces.Torus.LpJackson +public import LeanPool.FunctionSpaces.Torus.LpWeakDerivatives +public import LeanPool.FunctionSpaces.Torus.Modulus +public import LeanPool.FunctionSpaces.Torus.NTermFourier +public import LeanPool.FunctionSpaces.Torus.Nikolskii +public import LeanPool.FunctionSpaces.Torus.PeriodicDistributions +public import LeanPool.FunctionSpaces.Torus.PeriodicLift +public import LeanPool.FunctionSpaces.Torus.SingularIntegrals +public import LeanPool.FunctionSpaces.Torus.Sobolev +public import LeanPool.FunctionSpaces.Torus.SobolevEmbedding +public import LeanPool.FunctionSpaces.Torus.SobolevTriebelLizorkin +public import LeanPool.FunctionSpaces.Torus.SquareFunction +public import LeanPool.FunctionSpaces.Torus.Trace +public import LeanPool.FunctionSpaces.Torus.TraceContinuous +public import LeanPool.FunctionSpaces.Torus.Translation +public import LeanPool.FunctionSpaces.Torus.TriebelLizorkin +public import LeanPool.FunctionSpaces.Torus.TriebelLizorkinInterpolation +public import LeanPool.FunctionSpaces.Torus.TriebelLizorkinLocalMeans +public import LeanPool.FunctionSpaces.Torus.TrigPolynomials +public import LeanPool.FunctionSpaces.Torus.WeakDerivatives +public import LeanPool.FunctionSpaces.Wavelets.DyadicNormalisation +public import LeanPool.FunctionSpaces.Wavelets.Examples.Daubechies.Bernstein +public import LeanPool.FunctionSpaces.Wavelets.Examples.Daubechies.Besov +public import LeanPool.FunctionSpaces.Wavelets.Examples.Daubechies.Cascade +public import LeanPool.FunctionSpaces.Wavelets.Examples.Daubechies.D4 +public import LeanPool.FunctionSpaces.Wavelets.Examples.Daubechies.D4Besov +public import LeanPool.FunctionSpaces.Wavelets.Examples.Daubechies.DaubechiesPolynomial +public import LeanPool.FunctionSpaces.Wavelets.Examples.Daubechies.Expansion +public import LeanPool.FunctionSpaces.Wavelets.Examples.Daubechies.ExpansionScaling +public import LeanPool.FunctionSpaces.Wavelets.Examples.Daubechies.FejerRiesz +public import LeanPool.FunctionSpaces.Wavelets.Examples.Daubechies.FilterIdentities +public import LeanPool.FunctionSpaces.Wavelets.Examples.Daubechies.FourierIntegrable +public import LeanPool.FunctionSpaces.Wavelets.Examples.Daubechies.HolderRegularity +public import LeanPool.FunctionSpaces.Wavelets.Examples.Daubechies.Jackson +public import LeanPool.FunctionSpaces.Wavelets.Examples.Daubechies.JacksonSmoothing +public import LeanPool.FunctionSpaces.Wavelets.Examples.Daubechies.Mask +public import LeanPool.FunctionSpaces.Wavelets.Examples.Daubechies.MaskExistence +public import LeanPool.FunctionSpaces.Wavelets.Examples.Daubechies.MatrixMethod +public import LeanPool.FunctionSpaces.Wavelets.Examples.Daubechies.MatrixMethodD4 +public import LeanPool.FunctionSpaces.Wavelets.Examples.Daubechies.OrderThree +public import LeanPool.FunctionSpaces.Wavelets.Examples.Daubechies.Orthonormality +public import LeanPool.FunctionSpaces.Wavelets.Examples.Daubechies.PolynomialReproduction +public import LeanPool.FunctionSpaces.Wavelets.Examples.Daubechies.Projections +public import LeanPool.FunctionSpaces.Wavelets.Examples.Daubechies.ScalingFunction +public import LeanPool.FunctionSpaces.Wavelets.Examples.Daubechies.ScalingMoments +public import LeanPool.FunctionSpaces.Wavelets.Examples.Daubechies.SobolevRegularity +public import LeanPool.FunctionSpaces.Wavelets.Examples.Daubechies.SymbolDecay +public import LeanPool.FunctionSpaces.Wavelets.Examples.Daubechies.SymbolProduct +public import LeanPool.FunctionSpaces.Wavelets.Examples.Daubechies.TransferExamples +public import LeanPool.FunctionSpaces.Wavelets.Examples.Daubechies.TransferOperator +public import LeanPool.FunctionSpaces.Wavelets.Examples.Daubechies.Wavelet +public import LeanPool.FunctionSpaces.Wavelets.Examples.DyadicStepsQuasiBanach +public import LeanPool.FunctionSpaces.Wavelets.Examples.Haar +public import LeanPool.FunctionSpaces.Wavelets.Examples.HaarBesov diff --git a/LeanPool/FunctionSpaces/MeasureSpaces/Besov/Basic.lean b/LeanPool/FunctionSpaces/MeasureSpaces/Besov/Basic.lean new file mode 100644 index 0000000000..3e1c977afb --- /dev/null +++ b/LeanPool/FunctionSpaces/MeasureSpaces/Besov/Basic.lean @@ -0,0 +1,63 @@ +/- +Copyright (c) 2026 Mario Ullrich. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Mario Ullrich +-/ +module + +public import LeanPool.FunctionSpaces.MeasureSpaces.Scheme +public import LeanPool.FunctionSpaces.ApproximationSpaces.Space + +/- +Modified for Lean Pool: module names and imports adapted. +-/ + +/-! +# Besov spaces as approximation spaces + +Let `S` be a scheme of functions on `Ω` and `μ` a finite measure. The **Besov space** +`B^s_{p,q}(Ω, S)` is the approximation space of `L_p(μ)` for the scheme `S`: + +`B^s_{p,q} = A^s_q(L_p(μ), S)`, `‖f‖_{B^s_{p,q}} = ‖(n^(s-1/q) E_{n-1}(f)_p)_n‖_{ℓ_q}`, + +where `E_n(f)_p` is the error of best `L_p` approximation of `f` from `S n`, the +`ApproximationScheme.approxError` of the transported scheme `S.toLp μ p`. On the torus with +`S n` the trigonometric polynomials of degree `< n` these are the classical periodic Besov +spaces; for other schemes (splines, wavelets, eigenfunctions) one obtains the Besov spaces +adapted to the scheme. Whether they agree with a definition through moduli of smoothness is +a separate theorem for each scheme (Jackson and Bernstein inequalities). + +The names in this file are abbreviations for the general notions of `ApproximationSpaces`, so +every result proved there applies to Besov spaces directly. +-/ + +@[expose] public section + +open MeasureTheory +open scoped ENNReal BoundedContinuousFunction + +namespace FunctionScheme + +variable {Ω : Type*} [TopologicalSpace Ω] [MeasurableSpace Ω] [BorelSpace Ω] + (S : FunctionScheme Ω) (μ : Measure Ω) [IsFiniteMeasure μ] (p : ℝ≥0∞) [Fact (1 ≤ p)] + +/-- The **Besov quasi-norm** `‖f‖_{B^s_{p,q}}`, Pietsch's quasi-norm of `A^s_q(L_p(μ), S)`. -/ +noncomputable abbrev besovNorm (s : ℝ) (q : ℝ≥0∞) (f : Lp ℂ p μ) : ℝ≥0∞ := + (S.toLp μ p).approxNorm s q f + +/-- `f` belongs to the **Besov space** `B^s_{p,q}(Ω, S)`. -/ +abbrev MemBesov (s : ℝ) (q : ℝ≥0∞) (f : Lp ℂ p μ) : Prop := (S.toLp μ p).MemApprox s q f + +/-- The **Besov space** `B^s_{p,q}(Ω, S)` as a real subspace of `L_p(μ)`, for `s ≥ 0`, +`1 ≤ q ≤ ∞`. -/ +noncomputable abbrev besovSpace (s : ℝ) (q : ℝ≥0∞) (hs : 0 ≤ s) (hq : 1 ≤ q) : + Submodule ℝ (Lp ℂ p μ) := + (S.toLp μ p).approxSpace s q hs hq + +/-- The **uniform Besov space**: the approximation space of `S` in the sup norm, a space of +bounded continuous functions. -/ +noncomputable abbrev besovSpaceSup (s : ℝ) (q : ℝ≥0∞) (hs : 0 ≤ s) (hq : 1 ≤ q) : + Submodule ℝ (Ω →ᵇ ℂ) := + S.approxSpace s q hs hq + +end FunctionScheme diff --git a/LeanPool/FunctionSpaces/MeasureSpaces/Besov/ElementaryEmbeddings.lean b/LeanPool/FunctionSpaces/MeasureSpaces/Besov/ElementaryEmbeddings.lean new file mode 100644 index 0000000000..515b20c79b --- /dev/null +++ b/LeanPool/FunctionSpaces/MeasureSpaces/Besov/ElementaryEmbeddings.lean @@ -0,0 +1,71 @@ +/- +Copyright (c) 2026 Mario Ullrich. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Mario Ullrich +-/ +module + +public import LeanPool.FunctionSpaces.MeasureSpaces.Besov.Basic +public import LeanPool.FunctionSpaces.ApproximationSpaces.Transfer + +/- +Modified for Lean Pool: module names and imports adapted. +-/ + +/-! +# Elementary embeddings of Besov spaces + +Three embeddings follow from the abstract theory without any property of the scheme: + +* **in the smoothness and fine indices**: `B^s_{p,q} ⊆ B^t_{p,r}` for `0 ≤ t < s`, or `t = s` + and `q ≤ r` (`FunctionScheme.MemBesov.mono`), from `ApproximationScheme.MemApprox.mono`; +* **in the integrability**: for `p ≤ r`, `B^s_{r,q} ⊆ B^s_{p,q}` through the inclusion + `L_r ↪ L_p` (`FunctionScheme.MemBesov.inclusion`), with + `‖f‖_{B^s_{p,q}} ≤ ‖ι‖ ‖f‖_{B^s_{r,q}}`, by functoriality: the inclusion maps approximants + to approximants; +* **from the sup norm**: the uniform Besov space embeds into every `B^s_{p,q}` + (`FunctionScheme.MemBesov.of_sup`), again by functoriality, along `toLp`. + +The embeddings in the opposite direction, from `B^s_{p,q}` into `B^{s'}_{r,q}` with `r > p`, +cost smoothness and need a Nikolskii inequality for the scheme +(`FunctionSpaces.MeasureSpaces.Besov.Embeddings`). +-/ + +@[expose] public section + +open MeasureTheory +open scoped ENNReal BoundedContinuousFunction + +namespace FunctionScheme + +variable {Ω : Type*} [TopologicalSpace Ω] [MeasurableSpace Ω] [BorelSpace Ω] + {S : FunctionScheme Ω} {μ : Measure Ω} [IsFiniteMeasure μ] {p r : ℝ≥0∞} [Fact (1 ≤ p)] + [Fact (1 ≤ r)] {s t : ℝ} {q q' : ℝ≥0∞} + +/-- **Embeddings in the smoothness and fine indices**: for `0 ≤ t` and `t < s`, or `t = s` +and `q ≤ q'`, `B^s_{p,q} ⊆ B^t_{p,q'}`. -/ +theorem MemBesov.mono (hq : 1 ≤ q) (hq' : 1 ≤ q') (ht : 0 ≤ t) + (h : t < s ∨ (t = s ∧ q ≤ q')) {f : Lp ℂ p μ} (hf : S.MemBesov μ p s q f) : + S.MemBesov μ p t q' f := + ApproximationScheme.MemApprox.mono hq hq' ht h hf + +/-- **Embedding in the integrability**, norm form: for `p ≤ r`, +`‖ι f‖_{B^s_{p,q}} ≤ ‖ι‖ ‖f‖_{B^s_{r,q}}` with `ι : L_r ↪ L_p`. -/ +theorem besovNorm_inclusion_le (hpr : p ≤ r) (f : Lp ℂ r μ) : + S.besovNorm μ p s q (Lp.inclusionOfExponentLe (𝕜 := ℝ) μ hpr f) ≤ + ‖Lp.inclusionOfExponentLe (E := ℂ) (𝕜 := ℝ) μ hpr‖ₑ * S.besovNorm μ r s q f := + ApproximationScheme.approxNorm_map_le _ (fun _ _ hg => inclusion_mem_toLp hpr hg) f + +/-- **Embedding in the integrability**: for `p ≤ r`, `B^s_{r,q} ⊆ B^s_{p,q}` through the +inclusion `L_r ↪ L_p`. -/ +theorem MemBesov.inclusion (hpr : p ≤ r) {f : Lp ℂ r μ} (hf : S.MemBesov μ r s q f) : + S.MemBesov μ p s q (Lp.inclusionOfExponentLe (𝕜 := ℝ) μ hpr f) := + ApproximationScheme.MemApprox.map _ (fun _ _ hg => inclusion_mem_toLp hpr hg) hf + +/-- **Embedding of the uniform Besov space**: a bounded continuous function in the +approximation space of `S` in the sup norm lies in every `B^s_{p,q}`. -/ +theorem MemBesov.of_sup {a : Ω →ᵇ ℂ} (ha : S.MemApprox s q a) : + S.MemBesov μ p s q (BoundedContinuousFunction.toLp (E := ℂ) p μ ℝ a) := + ApproximationScheme.MemApprox.map _ (fun _ _ hb => toLp_mem_toLp hb) ha + +end FunctionScheme diff --git a/LeanPool/FunctionSpaces/MeasureSpaces/Besov/Embeddings.lean b/LeanPool/FunctionSpaces/MeasureSpaces/Besov/Embeddings.lean new file mode 100644 index 0000000000..bdc62c84e6 --- /dev/null +++ b/LeanPool/FunctionSpaces/MeasureSpaces/Besov/Embeddings.lean @@ -0,0 +1,111 @@ +/- +Copyright (c) 2026 Mario Ullrich. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Mario Ullrich +-/ +module + +public import LeanPool.FunctionSpaces.MeasureSpaces.Besov.Nikolskii +public import LeanPool.FunctionSpaces.ApproximationSpaces.Nikolskii + +/- +Modified for Lean Pool: module names and imports adapted. +-/ + +/-! +# Embedding theorems for Besov spaces + +Let `S` be a scheme of functions with the Nikolskii property of dimension `D ≥ 0` for a +finite measure `μ`, and write `α = D (1/p - 1/r)` for `1 ≤ p ≤ r ≤ ∞`. Then: + +* **the Besov embedding** (`MemBesov.exists_inclusion_eq_of_nikolskii`): for `s > α`, + every `f ∈ B^s_{p,q}` lies in `L_r` and belongs to `B^{s - α}_{r,q}`; with a norm bound + (`exists_inclusion_eq_of_nikolskii`); +* **into `L_∞`** (the case `r = ∞`, `α = D/p`), for `s > D/p`; +* **into bounded continuous functions** (`MemBesov.exists_boundedContinuous`): if moreover + `μ` charges every nonempty open set, every `f ∈ B^s_{p,q}` with `s > D/p` has a bounded + continuous representative. + +All three are the abstract Nikolskii transfer theorem +(`ApproximationScheme.exists_preimage_of_nikolskii`) for `X = L_p`, `Y = L_r` and the +inclusion `L_r ↪ L_p`; the pulled-back scheme is again `S` in `L_r` +(`FunctionScheme.comap_toLp_of_le`). For the last one, `f` in `L_∞` with positive smoothness +is a limit of approximants, which are continuous, and the continuous functions are closed in +`L_∞`. + +The limiting case `s = α` is not covered: the transfer theorem needs the strict inequality. +-/ + +@[expose] public section + +open MeasureTheory +open scoped ENNReal BoundedContinuousFunction + +namespace FunctionScheme + +variable {Ω : Type*} [TopologicalSpace Ω] [MeasurableSpace Ω] [BorelSpace Ω] + {S : FunctionScheme Ω} {μ : Measure Ω} [IsFiniteMeasure μ] {D : ℝ} {p r : ℝ≥0∞} + [Fact (1 ≤ p)] [Fact (1 ≤ r)] {s : ℝ} {q : ℝ≥0∞} + +/-- **The Besov embedding**, with a norm bound: for `1 ≤ p ≤ r ≤ ∞`, `α = D(1/p - 1/r) < s` +and `1 ≤ q ≤ ∞`, there is `K < ∞` such that every `f ∈ B^s_{p,q}` is the inclusion of some +`g ∈ L_r` with `‖g‖_{B^{s-α}_{r,q}} ≤ K ‖f‖_{B^s_{p,q}}` (dyadic quasi-norms). -/ +theorem exists_inclusion_eq_of_nikolskii (h : S.HasNikolskii μ D) (hD : 0 ≤ D) (hpr : p ≤ r) + (hs : nikolskiiExponent D p r < s) (hq : 1 ≤ q) : + ∃ K : ℝ≥0∞, K ≠ ∞ ∧ ∀ f : Lp ℂ p μ, S.MemBesov μ p s q f → + ∃ g : Lp ℂ r μ, Lp.inclusionOfExponentLe (𝕜 := ℝ) μ hpr g = f ∧ + (S.toLp μ r).approxNormDyadic (s - nikolskiiExponent D p r) q g ≤ + K * (S.toLp μ p).approxNormDyadic s q f := by + obtain ⟨C, hC, hN⟩ := h.liftBound hpr + have hα := nikolskiiExponent_nonneg hD (Fact.out : 1 ≤ p) hpr + refine ⟨ApproximationScheme.nikolskiiConst C (nikolskiiExponent D p r) s, + ApproximationScheme.nikolskiiConst_ne_top C hs, fun f hf => ?_⟩ + obtain ⟨g, hg, hle⟩ := ApproximationScheme.exists_preimage_of_nikolskii + (Lp.inclusionOfExponentLe_injective hpr) hN hC hα hs hq hf + refine ⟨g, hg, ?_⟩ + rwa [comap_toLp_of_le hpr] at hle + +/-- **The Besov embedding** `B^s_{p,q} ↪ B^{s - D(1/p - 1/r)}_{r,q}` for `p ≤ r` and +`s > D(1/p - 1/r)`: every `f ∈ B^s_{p,q}` is the inclusion of some `g ∈ L_r` lying in +`B^{s - D(1/p-1/r)}_{r,q}`. -/ +theorem MemBesov.exists_inclusion_eq_of_nikolskii (h : S.HasNikolskii μ D) (hD : 0 ≤ D) + (hpr : p ≤ r) (hs : nikolskiiExponent D p r < s) (hq : 1 ≤ q) {f : Lp ℂ p μ} + (hf : S.MemBesov μ p s q f) : + ∃ g : Lp ℂ r μ, Lp.inclusionOfExponentLe (𝕜 := ℝ) μ hpr g = f ∧ + S.MemBesov μ r (s - nikolskiiExponent D p r) q g := by + obtain ⟨C, hC, hN⟩ := h.liftBound hpr + have hα := nikolskiiExponent_nonneg hD (Fact.out : 1 ≤ p) hpr + obtain ⟨g, hg, hmem⟩ := ApproximationScheme.MemApprox.exists_preimage_of_nikolskii + (Lp.inclusionOfExponentLe_injective hpr) hN hC hα hs hq hf + refine ⟨g, hg, ?_⟩ + rwa [comap_toLp_of_le hpr] at hmem + +/-- **Embedding into `L_∞`**: for `s > D/p`, every `f ∈ B^s_{p,q}` is the inclusion of some +`g ∈ L_∞` lying in `B^{s - D/p}_{∞,q}`. -/ +theorem MemBesov.exists_inclusion_eq_top (h : S.HasNikolskii μ D) (hD : 0 ≤ D) + (hs : D * p.toReal⁻¹ < s) (hq : 1 ≤ q) {f : Lp ℂ p μ} (hf : S.MemBesov μ p s q f) : + ∃ g : Lp ℂ ∞ μ, Lp.inclusionOfExponentLe (𝕜 := ℝ) μ le_top g = f ∧ + S.MemBesov μ ∞ (s - D * p.toReal⁻¹) q g := by + have := hf.exists_inclusion_eq_of_nikolskii h hD (le_top : p ≤ ∞) + (by rwa [nikolskiiExponent_top]) hq + rwa [nikolskiiExponent_top] at this + +/-- **Embedding into bounded continuous functions**: if `μ` charges every nonempty open set +and `s > D/p`, every `f ∈ B^s_{p,q}` has a bounded continuous representative. -/ +theorem MemBesov.exists_boundedContinuous [μ.IsOpenPosMeasure] (h : S.HasNikolskii μ D) + (hD : 0 ≤ D) (hs : D * p.toReal⁻¹ < s) (hq : 1 ≤ q) {f : Lp ℂ p μ} + (hf : S.MemBesov μ p s q f) : + ∃ a : Ω →ᵇ ℂ, Lp.inclusionOfExponentLe (𝕜 := ℝ) μ le_top + (BoundedContinuousFunction.toLp (E := ℂ) ∞ μ ℝ a) = f := by + obtain ⟨g, hg, hmem⟩ := hf.exists_inclusion_eq_top h hD hs hq + have hcl : g ∈ closure (⋃ n, S.toLp μ ∞ n) := + ApproximationScheme.mem_closure_iUnion_of_memApprox hq (sub_pos.2 hs) hmem + have hsub : (⋃ n, S.toLp μ ∞ n) ⊆ + Set.range (BoundedContinuousFunction.toLp (E := ℂ) ∞ μ ℝ : (Ω →ᵇ ℂ) → Lp ℂ ∞ μ) := by + rintro _ ⟨_, ⟨n, rfl⟩, a, -, rfl⟩ + exact ⟨a, rfl⟩ + obtain ⟨a, ha⟩ := (BoundedContinuousFunction.isClosed_range_toLp_top (μ := μ) (𝕜 := ℝ) + (E := ℂ)).closure_subset_iff.2 hsub hcl + exact ⟨a, by rw [ha, hg]⟩ + +end FunctionScheme diff --git a/LeanPool/FunctionSpaces/MeasureSpaces/Besov/Interpolation.lean b/LeanPool/FunctionSpaces/MeasureSpaces/Besov/Interpolation.lean new file mode 100644 index 0000000000..c5ef37fdd4 --- /dev/null +++ b/LeanPool/FunctionSpaces/MeasureSpaces/Besov/Interpolation.lean @@ -0,0 +1,137 @@ +/- +Copyright (c) 2026 Mario Ullrich. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Mario Ullrich +-/ +module + +public import LeanPool.FunctionSpaces.MeasureSpaces.Besov.Basic +public import LeanPool.FunctionSpaces.ApproximationSpaces.Interpolation.ApproxSpaces + +/- +Modified for Lean Pool: module names and imports adapted. +-/ + +/-! +# Besov spaces as interpolation spaces + +Let `S` be a scheme of functions on `Ω`, `μ` a finite measure and `1 ≤ p ≤ ∞`. The couple +`(B^{s₀}_{p,q₀}, B^{s₁}_{p,q₁})` (`FunctionScheme.besovCouple`) carries the dyadic quasi-norms of +the two Besov spaces, and the couple `(L_p, B^{s₁}_{p,q₁})` (`FunctionScheme.lpBesovCouple`) the +norm of `L_p` and the dyadic quasi-norm of `B^{s₁}_{p,q₁}`. For `0 < s₀ < s₁`, `0 < η < 1` and +`1 ≤ q₀, q₁, q ≤ ∞` the real interpolation spaces of the continuous K-method are + +`(B^{s₀}_{p,q₀}, B^{s₁}_{p,q₁})_{η,q} = B^{(1-η)s₀+ηs₁}_{p,q}`, +`(L_p, B^{s₁}_{p,q₁})_{η,q} = B^{ηs₁}_{p,q}` + +(`FunctionScheme.memKMethod_besovCouple_iff`, `FunctionScheme.memKMethod_lpBesovCouple_iff`), +for every scheme. Both are also equalities of subspaces of `L_p(μ)` +(`FunctionScheme.kMethodSpace_besovCouple`, `FunctionScheme.kMethodSpace_lpBesovCouple`). Since +`B^s_{p,q}` is the approximation space `A^s_q(L_p(μ), S)`, they are the reiteration theorem for +approximation spaces and its endpoint case (`ApproximationScheme.memKMethod_approxCouple_iff`, +`ApproximationScheme.memKMethod_approxCouple_zero_iff`). The same interpolation spaces arise +from the couples of Pietsch's quasi-norms `FunctionScheme.besovNorm`, which are equivalent to the +dyadic ones (`FunctionScheme.memKMethod_besovNormCouple_iff`, +`FunctionScheme.memKMethod_lpBesovNormCouple_iff`). +-/ + +@[expose] public section + +open MeasureTheory +open scoped ENNReal + +namespace FunctionScheme + +variable {Ω : Type*} [TopologicalSpace Ω] [MeasurableSpace Ω] [BorelSpace Ω] + (S : FunctionScheme Ω) (μ : Measure Ω) [IsFiniteMeasure μ] (p : ℝ≥0∞) [Fact (1 ≤ p)] + +/-- The **couple `(B^{s₀}_{p,q₀}, B^{s₁}_{p,q₁})`** of two Besov spaces of the scheme, on +`L_p(μ)`, with the dyadic quasi-norms of the approximation spaces `A^{s_i}_{q_i}(L_p(μ), S)`. -/ +noncomputable abbrev besovCouple (s₀ : ℝ) (q₀ : ℝ≥0∞) (s₁ : ℝ) (q₁ : ℝ≥0∞) : + InterpCouple (Lp ℂ p μ) := + (S.toLp μ p).approxCouple s₀ q₀ s₁ q₁ + +/-- The **couple `(L_p, B^{s₁}_{p,q₁})`** of the scheme: the norm of `L_p(μ)` and the dyadic +quasi-norm of the Besov space `B^{s₁}_{p,q₁}`. -/ +noncomputable abbrev lpBesovCouple (s₁ : ℝ) (q₁ : ℝ≥0∞) : InterpCouple (Lp ℂ p μ) := + (S.toLp μ p).leftApproxCouple s₁ q₁ + +variable {S μ p} {s₀ s₁ η : ℝ} {q₀ q₁ q : ℝ≥0∞} + +/-- **Besov spaces interpolate**: for every scheme of functions, `1 ≤ p ≤ ∞`, `0 < s₀ < s₁`, +`0 < η < 1` and `1 ≤ q₀, q₁, q ≤ ∞`, `(B^{s₀}_{p,q₀}, B^{s₁}_{p,q₁})_{η,q} = B^{(1-η)s₀+ηs₁}_{p,q}` +(DeVore–Popov, Trans. AMS 305 (1988), for the classical Besov spaces). -/ +theorem memKMethod_besovCouple_iff (hs₀ : 0 < s₀) (hs : s₀ < s₁) (hη : 0 < η) (hη' : η < 1) + (hq₀ : 1 ≤ q₀) (hq₁ : 1 ≤ q₁) (hq : 1 ≤ q) {f : Lp ℂ p μ} : + (S.besovCouple μ p s₀ q₀ s₁ q₁).MemKMethod η q f ↔ + S.MemBesov μ p ((1 - η) * s₀ + η * s₁) q f := + ApproximationScheme.memKMethod_approxCouple_iff hs₀ hs hη hη' hq₀ hq₁ hq + +/-- **`L_p` and a Besov space interpolate**: for every scheme of functions, `1 ≤ p ≤ ∞`, +`s₁ > 0`, `0 < η < 1` and `1 ≤ q₁, q ≤ ∞`, `(L_p, B^{s₁}_{p,q₁})_{η,q} = B^{ηs₁}_{p,q}`. -/ +theorem memKMethod_lpBesovCouple_iff (hs₁ : 0 < s₁) (hη : 0 < η) (hη' : η < 1) (hq₁ : 1 ≤ q₁) + (hq : 1 ≤ q) {f : Lp ℂ p μ} : + (S.lpBesovCouple μ p s₁ q₁).MemKMethod η q f ↔ S.MemBesov μ p (η * s₁) q f := + ApproximationScheme.memKMethod_approxCouple_zero_iff hs₁ hη hη' hq₁ hq + +/-- **Besov spaces interpolate**, as an equality of subspaces of `L_p(μ)`: for `0 < s₀ < s₁`, +`0 < η < 1` and `1 ≤ q₀, q₁, q ≤ ∞`, the real interpolation space +`(B^{s₀}_{p,q₀}, B^{s₁}_{p,q₁})_{η,q}` is `B^{(1-η)s₀+ηs₁}_{p,q}`. -/ +theorem kMethodSpace_besovCouple (hs₀ : 0 < s₀) (hs : s₀ < s₁) (hη : 0 < η) (hη' : η < 1) + (hq₀ : 1 ≤ q₀) (hq₁ : 1 ≤ q₁) (hq : 1 ≤ q) : + InterpCouple.kMethodSpace + (ApproximationScheme.isQuasiNormed_approxCouple (A := S.toLp μ p) hs₀.le + (hs₀.trans hs).le hq₀ hq₁) + ApproximationScheme.isHomogeneous_approxCouple η q = + S.besovSpace μ p ((1 - η) * s₀ + η * s₁) q + (ApproximationScheme.reiterationExponent_pos hs₀ hs hη hη').le hq := + ApproximationScheme.kMethodSpace_approxCouple hs₀ hs hη hη' hq₀ hq₁ hq + +/-- **`L_p` and a Besov space interpolate**, as an equality of subspaces of `L_p(μ)`: for +`s₁ > 0`, `0 < η < 1` and `1 ≤ q₁, q ≤ ∞`, the real interpolation space +`(L_p, B^{s₁}_{p,q₁})_{η,q}` is `B^{ηs₁}_{p,q}`. -/ +theorem kMethodSpace_lpBesovCouple (hs₁ : 0 < s₁) (hη : 0 < η) (hη' : η < 1) (hq₁ : 1 ≤ q₁) + (hq : 1 ≤ q) : + InterpCouple.kMethodSpace + (ApproximationScheme.isQuasiNormed_leftApproxCouple (A := S.toLp μ p) hs₁.le hq₁) + ApproximationScheme.isHomogeneous_leftApproxCouple η q = + S.besovSpace μ p (η * s₁) q (mul_pos hη hs₁).le hq := + ApproximationScheme.kMethodSpace_approxCouple_zero hs₁ hη hη' hq₁ hq + +/-- **Besov spaces interpolate, with Pietsch's quasi-norms**: for `0 < s₀ < s₁`, `0 < η < 1` and +`1 ≤ q₀, q₁, q ≤ ∞`, the real interpolation space of the couple of the Besov quasi-norms +`FunctionScheme.besovNorm` of `B^{s₀}_{p,q₀}` and `B^{s₁}_{p,q₁}` is `B^{(1-η)s₀+ηs₁}_{p,q}`. +Pietsch's quasi-norm is at most `2^s` times the dyadic one, and the dyadic one at most `4 · 2^s` +times Pietsch's (`ApproximationScheme.approxNorm_le_approxNormDyadic`, +`ApproximationScheme.approxNormDyadic_le_approxNorm`), so the sandwich principle applies. -/ +theorem memKMethod_besovNormCouple_iff (hs₀ : 0 < s₀) (hs : s₀ < s₁) (hη : 0 < η) (hη' : η < 1) + (hq₀ : 1 ≤ q₀) (hq₁ : 1 ≤ q₁) (hq : 1 ≤ q) {f : Lp ℂ p μ} : + (⟨S.besovNorm μ p s₀ q₀, S.besovNorm μ p s₁ q₁⟩ : InterpCouple (Lp ℂ p μ)).MemKMethod η q f ↔ + S.MemBesov μ p ((1 - η) * s₀ + η * s₁) q f := + ApproximationScheme.memKMethod_iff_memApprox_of_two_sandwiches + (ENNReal.two_rpow_ne_top s₀) + (ENNReal.mul_ne_top (by norm_num) (ENNReal.two_rpow_ne_top s₀)) + (ENNReal.two_rpow_ne_top s₁) + (ENNReal.mul_ne_top (by norm_num) (ENNReal.two_rpow_ne_top s₁)) + hq₀ hq₀ hq₁ hq₁ hs₀ hs hη hη' hq + (ApproximationScheme.approxNorm_le_approxNormDyadic hq₀ hs₀.le) + (ApproximationScheme.approxNormDyadic_le_approxNorm hq₀ hs₀.le) + (ApproximationScheme.approxNorm_le_approxNormDyadic hq₁ (hs₀.trans hs).le) + (ApproximationScheme.approxNormDyadic_le_approxNorm hq₁ (hs₀.trans hs).le) + +/-- **`L_p` and a Besov space interpolate, with Pietsch's quasi-norm**: for `s₁ > 0`, +`0 < η < 1` and `1 ≤ q₁, q ≤ ∞`, the real interpolation space of the couple of the norm of +`L_p(μ)` and the Besov quasi-norm `FunctionScheme.besovNorm` of `B^{s₁}_{p,q₁}` is +`B^{ηs₁}_{p,q}`. -/ +theorem memKMethod_lpBesovNormCouple_iff (hs₁ : 0 < s₁) (hη : 0 < η) (hη' : η < 1) + (hq₁ : 1 ≤ q₁) (hq : 1 ≤ q) {f : Lp ℂ p μ} : + (⟨fun f => ‖f‖ₑ, S.besovNorm μ p s₁ q₁⟩ : InterpCouple (Lp ℂ p μ)).MemKMethod η q f ↔ + S.MemBesov μ p (η * s₁) q f := + ApproximationScheme.memKMethod_iff_memApprox_of_sandwich + (ENNReal.two_rpow_ne_top s₁) + (ENNReal.mul_ne_top (by norm_num) (ENNReal.two_rpow_ne_top s₁)) + hq₁ hq₁ hs₁ hη hη' hq + (ApproximationScheme.approxNorm_le_approxNormDyadic hq₁ hs₁.le) + (ApproximationScheme.approxNormDyadic_le_approxNorm hq₁ hs₁.le) + +end FunctionScheme diff --git a/LeanPool/FunctionSpaces/MeasureSpaces/Besov/Nikolskii.lean b/LeanPool/FunctionSpaces/MeasureSpaces/Besov/Nikolskii.lean new file mode 100644 index 0000000000..3d161752c0 --- /dev/null +++ b/LeanPool/FunctionSpaces/MeasureSpaces/Besov/Nikolskii.lean @@ -0,0 +1,287 @@ +/- +Copyright (c) 2026 Mario Ullrich. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Mario Ullrich +-/ +module + +public import LeanPool.FunctionSpaces.MeasureSpaces.Besov.ElementaryEmbeddings +public import LeanPool.FunctionSpaces.Analysis.Lp.Interpolation +public import LeanPool.FunctionSpaces.ApproximationSpaces.Lift + +/- +Modified for Lean Pool: module names and imports adapted. +-/ + +/-! +# The Nikolskii inequality of a scheme + +A scheme of functions `S` has the **Nikolskii property of dimension `D`** for the measure `μ` +if for every `1 ≤ p ≤ ∞` there is `C` with + +`‖a‖_∞ ≤ C n^(D/p) ‖a‖_p` for all `a ∈ S n`, `n ≥ 1` + +(`FunctionScheme.HasNikolskii`), a hypothesis on the scheme. For trigonometric polynomials of +degree `< n` on `𝕋^d` it holds with `D = d` (`Torus.trigScheme_hasNikolskii`, +`Torus.hasNikolskii_fourierEigenbasis`); these torus instances are the ones proved in this +library. The property is stated against the sup norm only; the general +**Nikolskii inequality** + +`‖a‖_r ≤ C' n^(D (1/p - 1/r)) ‖a‖_p`, `p ≤ r` + +follows by interpolation, `‖a‖_r ≤ ‖a‖_∞^(1 - p/r) ‖a‖_p^(p/r)` +(`HasNikolskii.eLpNorm_le`). The exponent `D (1/p - 1/r)` is `nikolskiiExponent D p r`; for +`D > 0`, `1 ≤ p < ∞` and `r > 0` it is positive iff `p < r` and nonnegative iff `p ≤ r` +(`nikolskiiExponent_pos`, `lt_of_nikolskiiExponent_pos`, `le_of_nikolskiiExponent_nonneg`). +With `θ = p₀/p₁` and `s₀ - s₁ = D(1/p₀ - 1/p₁)`, `θ s₀ + (1 - θ)(s₀ - D/p₀) = s₁` +(`nikolskiiExponent_interp_eq`). For the Gagliardo–Nirenberg–Sobolev inequality, +`D(1/p - 1/r) = 1` with `D ≥ 0` means `p < ∞` and `1/r = 1/p - 1/D` +(`toReal_inv_eq_of_nikolskiiExponent_eq_one`), which follows from `1/r + 1/n = 1/p` for `D = n` +(`nikolskiiExponent_eq_one_of_inv_add_inv`), and `n(1 - 1/r) = m ≥ 2` passes through the +conjugate exponent `n/(n - 1)` (`nikolskiiExponent_conjExponent_of_eq`). + +In the language of `ApproximationSpaces.Lift` this is a lifting bound for the inclusion +`L_r ↪ L_p` and the scheme in `L_p` (`HasNikolskii.liftBound`): the approximant `a` in `L_p` is +the inclusion of the same function in `L_r`, of norm at most `C' n^(D(1/p - 1/r)) ‖a‖_p`. + +The norms are written with `eLpNorm`, so that the hypothesis does not need an `L_p` space, and +hence no instance `Fact (1 ≤ p)`, for every `p` at once. +-/ + +@[expose] public section + +open MeasureTheory +open scoped ENNReal BoundedContinuousFunction + +/-- The **Nikolskii exponent** `D (1/p - 1/r)`. With `1/∞ = 0` (in Lean `∞.toReal = 0` and +`0⁻¹ = 0`) it is `D/p` for `r = ∞`. -/ +noncomputable def nikolskiiExponent (D : ℝ) (p r : ℝ≥0∞) : ℝ := D * (p.toReal⁻¹ - r.toReal⁻¹) + +/-- `D(1/p - 1/r) ≥ 0` for `D ≥ 0` and `1 ≤ p ≤ r`. -/ +theorem nikolskiiExponent_nonneg {D : ℝ} (hD : 0 ≤ D) {p r : ℝ≥0∞} (hp : 1 ≤ p) (hpr : p ≤ r) : + 0 ≤ nikolskiiExponent D p r := by + unfold nikolskiiExponent + refine mul_nonneg hD (sub_nonneg.2 ?_) + rcases eq_or_ne r ∞ with rfl | hr + · simp + have hp' : p ≠ ∞ := ne_top_of_le_ne_top hr hpr + exact inv_anti₀ (ENNReal.toReal_pos (zero_lt_one.trans_le hp).ne' hp') + (ENNReal.toReal_mono hr hpr) + +/-- A natural number `m` above the Nikolskii exponent is at least `1`: for `D ≥ 0`, +`1 ≤ p ≤ r` and `m ∈ ℕ` with `m > D(1/p - 1/r)`, `m ≥ 1`, since the exponent is nonnegative +(`nikolskiiExponent_nonneg`). -/ +theorem one_le_of_nikolskiiExponent_lt {D : ℝ} (hD : 0 ≤ D) {p r : ℝ≥0∞} (hp : 1 ≤ p) + (hpr : p ≤ r) {m : ℕ} (hm : nikolskiiExponent D p r < m) : 1 ≤ m := + Nat.one_le_iff_ne_zero.2 (Nat.cast_pos.1 ((nikolskiiExponent_nonneg hD hp hpr).trans_lt hm)).ne' + +/-- **The Nikolskii exponent is positive** for `D > 0` and `1 ≤ p < r ≤ ∞`, since then +`1/r < 1/p`. -/ +theorem nikolskiiExponent_pos {D : ℝ} (hD : 0 < D) {p r : ℝ≥0∞} (hp : 1 ≤ p) (hpr : p < r) : + 0 < nikolskiiExponent D p r := by + unfold nikolskiiExponent + refine mul_pos hD (sub_pos.2 ?_) + have hp0 : 0 < p.toReal := + ENNReal.toReal_pos (zero_lt_one.trans_le hp).ne' (hpr.trans_le le_top).ne + rcases eq_or_ne r ∞ with rfl | hr + · simpa using hp0 + exact inv_strictAnti₀ hp0 (ENNReal.toReal_strict_mono hr hpr) + +/-- **A positive Nikolskii exponent forces `p < r`**: for `D ≥ 0`, `p < ∞` and `r > 0`, if +`D(1/p - 1/r) > 0`, then `p < r`; for `r ≤ p` the exponent is `≤ 0`. -/ +theorem lt_of_nikolskiiExponent_pos {D : ℝ} (hD : 0 ≤ D) {p r : ℝ≥0∞} (hp : p ≠ ∞) (hr : 0 < r) + (h : 0 < nikolskiiExponent D p r) : p < r := by + by_contra hrp + rw [not_lt] at hrp + have hr' : r ≠ ∞ := ne_top_of_le_ne_top hp hrp + have hle : p.toReal⁻¹ ≤ r.toReal⁻¹ := + inv_anti₀ (ENNReal.toReal_pos hr.ne' hr') (ENNReal.toReal_mono hp hrp) + unfold nikolskiiExponent at h + nlinarith + +/-- **A nonnegative Nikolskii exponent forces `p ≤ r`**: for `D > 0`, `p < ∞` and `r > 0`, if +`D(1/p - 1/r) ≥ 0`, then `p ≤ r`; for `r < p` the exponent is `< 0`. -/ +theorem le_of_nikolskiiExponent_nonneg {D : ℝ} (hD : 0 < D) {p r : ℝ≥0∞} (hp : p ≠ ∞) + (hr : 0 < r) (h : 0 ≤ nikolskiiExponent D p r) : p ≤ r := by + by_contra hrp + rw [not_le] at hrp + have hr' : r ≠ ∞ := ne_top_of_lt hrp + have hlt : p.toReal⁻¹ < r.toReal⁻¹ := + inv_strictAnti₀ (ENNReal.toReal_pos hr.ne' hr') (ENNReal.toReal_strict_mono hp hrp) + unfold nikolskiiExponent at h + nlinarith + +/-- **The interpolation identity of the Nikolskii exponent**: for `0 < p₀ < ∞`, `θ = p₀/p₁` and +`s₀ - s₁ = D(1/p₀ - 1/p₁)`, `θ s₀ + (1 - θ)(s₀ - D/p₀) = s₁`, since `θ/p₀ = 1/p₁`. -/ +theorem nikolskiiExponent_interp_eq {D s₀ s₁ : ℝ} {p₀ p₁ : ℝ≥0∞} (hp₀0 : p₀ ≠ 0) (hp₀ : p₀ ≠ ∞) + (hs : s₀ - s₁ = nikolskiiExponent D p₀ p₁) : + p₀.toReal / p₁.toReal * s₀ + (1 - p₀.toReal / p₁.toReal) * (s₀ - D / p₀.toReal) = s₁ := by + have h0 : p₀.toReal ≠ 0 := (ENNReal.toReal_pos hp₀0 hp₀).ne' + unfold nikolskiiExponent at hs + rw [show s₁ = s₀ - D * (p₀.toReal⁻¹ - p₁.toReal⁻¹) by linarith] + field_simp + ring + +/-- `α(D, p, ∞) = D/p`. -/ +@[simp] +theorem nikolskiiExponent_top (D : ℝ) (p : ℝ≥0∞) : nikolskiiExponent D p ∞ = D * p.toReal⁻¹ := by + simp [nikolskiiExponent] + +/-- `α(D, p, p) = 0`. -/ +@[simp] +theorem nikolskiiExponent_self (D : ℝ) (p : ℝ≥0∞) : nikolskiiExponent D p p = 0 := by + simp [nikolskiiExponent] + +/-- **The Nikolskii exponent `1`**: for `D ≥ 0`, `D(1/p - 1/r) = 1` forces `D > 0`, `p < ∞` and +`1/r = 1/p - 1/D`; for `p = ∞` the exponent is `-D/r ≤ 0`. -/ +theorem toReal_inv_eq_of_nikolskiiExponent_eq_one {D : ℝ} (hD : 0 ≤ D) {p r : ℝ≥0∞} + (hs : nikolskiiExponent D p r = 1) : 0 < D ∧ p ≠ ∞ ∧ r.toReal⁻¹ = p.toReal⁻¹ - D⁻¹ := by + unfold nikolskiiExponent at hs + have hD0 : D ≠ 0 := by + rintro rfl + rw [zero_mul] at hs + exact zero_ne_one hs + refine ⟨lt_of_le_of_ne hD (Ne.symm hD0), fun hp => ?_, ?_⟩ + · rw [hp, ENNReal.toReal_top, inv_zero, zero_sub] at hs + have : 0 ≤ r.toReal⁻¹ := inv_nonneg.2 ENNReal.toReal_nonneg + nlinarith + · have h : p.toReal⁻¹ - r.toReal⁻¹ = D⁻¹ := eq_inv_of_mul_eq_one_right hs + linarith + +/-- **The exponents in the form `1/r + 1/n = 1/p`**: for `n ∈ ℕ`, `1 ≤ p` and +`r⁻¹ + n⁻¹ = p⁻¹` in `[0, ∞]` (where `1/0 = ∞`), `p < ∞` and `n(1/p - 1/r) = 1`. -/ +theorem nikolskiiExponent_eq_one_of_inv_add_inv {n : ℕ} {p r : ℝ≥0∞} (hp : 1 ≤ p) + (hexp : r⁻¹ + (n : ℝ≥0∞)⁻¹ = p⁻¹) : p ≠ ∞ ∧ nikolskiiExponent n p r = 1 := by + have hp1 : p⁻¹ ≤ 1 := ENNReal.inv_le_one.2 hp + have hr0 : r⁻¹ ≠ ∞ := (le_self_add.trans (hexp.le.trans hp1)).trans_lt ENNReal.one_lt_top |>.ne + have hn0 : (n : ℝ≥0∞)⁻¹ ≠ ∞ := + (le_add_self.trans (hexp.le.trans hp1)).trans_lt ENNReal.one_lt_top |>.ne + have hn : n ≠ 0 := by + rintro rfl + simp at hn0 + refine ⟨fun hpt => ?_, ?_⟩ + · rw [hpt, ENNReal.inv_top, add_eq_zero] at hexp + exact ENNReal.inv_ne_zero.2 (ENNReal.natCast_ne_top n) hexp.2 + have h := congrArg ENNReal.toReal hexp + rw [ENNReal.toReal_add hr0 hn0, ENNReal.toReal_inv, ENNReal.toReal_inv, ENNReal.toReal_inv, + ENNReal.toReal_natCast] at h + unfold nikolskiiExponent + rw [← h, add_sub_cancel_left, mul_inv_cancel₀ (Nat.cast_ne_zero.2 hn)] + +/-- For `m ≥ 2`, `n(1 - 1/r) = m` forces `n > 1`, since `1/r ≥ 0`. -/ +theorem one_lt_of_nikolskiiExponent_one_eq {n m : ℕ} (hm : 2 ≤ m) {r : ℝ≥0∞} + (hs : nikolskiiExponent n 1 r = m) : 1 < n := by + unfold nikolskiiExponent at hs + rw [ENNReal.toReal_one, inv_one] at hs + have ha : 0 ≤ r.toReal⁻¹ := inv_nonneg.2 ENNReal.toReal_nonneg + have hm2 : (2 : ℝ) ≤ m := by exact_mod_cast hm + have hn0 : (0 : ℝ) ≤ n := Nat.cast_nonneg n + have h : (1 : ℝ) < n := by nlinarith + exact_mod_cast h + +/-- **The intermediate exponent `q = n/(n - 1)`**: for `m ≥ 2`, every `r ∈ [0, ∞]` with +`n(1 - 1/r) = m` and the conjugate exponent `q = n/(n - 1)` of `n` (Mathlib's +`ENNReal.conjExponent`), `1 < q < ∞`, `n(1 - 1/q) = 1` and `n(1/q - 1/r) = m - 1`: Hölder +conjugacy gives `1/q + 1/n = 1` (`nikolskiiExponent_eq_one_of_inv_add_inv`), and +`n > 1` (`one_lt_of_nikolskiiExponent_one_eq`). -/ +theorem nikolskiiExponent_conjExponent_of_eq {n m : ℕ} (hm : 2 ≤ m) {r : ℝ≥0∞} + (hs : nikolskiiExponent n 1 r = m) : + 1 < ENNReal.conjExponent n ∧ ENNReal.conjExponent n ≠ ∞ ∧ + nikolskiiExponent n 1 (ENNReal.conjExponent n) = 1 ∧ + nikolskiiExponent n (ENNReal.conjExponent n) r = ((m - 1 : ℕ) : ℝ) := by + have hn : (1 : ℝ≥0∞) < n := by exact_mod_cast one_lt_of_nikolskiiExponent_one_eq hm hs + have : (n : ℝ≥0∞).HolderConjugate (ENNReal.conjExponent n) := .conjExponent hn.le + have h1 : nikolskiiExponent n 1 (ENNReal.conjExponent n) = 1 := + (nikolskiiExponent_eq_one_of_inv_add_inv le_rfl (by + rw [inv_one, add_comm] + exact ENNReal.HolderConjugate.inv_add_inv_eq_one _ _)).2 + refine ⟨(ENNReal.HolderConjugate.lt_top_iff_one_lt _ _).1 (ENNReal.natCast_lt_top n), + ((ENNReal.HolderConjugate.lt_top_iff_one_lt _ _).2 hn).ne, h1, ?_⟩ + obtain ⟨-, -, hq⟩ := toReal_inv_eq_of_nikolskiiExponent_eq_one (Nat.cast_nonneg n) h1 + have hn0 : (n : ℝ) ≠ 0 := + Nat.cast_ne_zero.2 (one_lt_of_nikolskiiExponent_one_eq hm hs).ne_bot + unfold nikolskiiExponent at hs ⊢ + rw [ENNReal.toReal_one, inv_one] at hs hq + rw [hq, Nat.cast_sub (by omega), Nat.cast_one, ← hs] + field_simp + ring + +namespace FunctionScheme + +variable {Ω : Type*} [TopologicalSpace Ω] [MeasurableSpace Ω] [BorelSpace Ω] + +/-- The **Nikolskii property of dimension `D`**: for every `1 ≤ p ≤ ∞`, +`‖a‖_∞ ≤ C n^(D/p) ‖a‖_p` for all approximants `a ∈ S n`, `n ≥ 1`. A hypothesis on the scheme; +the torus has it (`Torus.trigScheme_hasNikolskii`). -/ +structure HasNikolskii (S : FunctionScheme Ω) (μ : Measure Ω) (D : ℝ) : Prop where + exists_const : ∀ p : ℝ≥0∞, 1 ≤ p → ∃ C : ℝ, 0 ≤ C ∧ ∀ n : ℕ, 1 ≤ n → ∀ a ∈ S n, + ‖a‖ ≤ C * (n : ℝ) ^ (D * p.toReal⁻¹) * (eLpNorm a p μ).toReal + +variable {S : FunctionScheme Ω} {μ : Measure Ω} [IsFiniteMeasure μ] {D : ℝ} + +omit [IsFiniteMeasure μ] in +/-- The `L_∞` norm of a bounded continuous function is at most its sup norm. -/ +theorem toReal_eLpNorm_top_le_norm (a : Ω →ᵇ ℂ) : + (eLpNorm a ∞ μ).toReal ≤ ‖a‖ := by + have : eLpNorm a ∞ μ ≤ ‖a‖ₑ := by + rw [eLpNorm_exponent_top a.continuous.aestronglyMeasurable] + exact eLpNormEssSup_le_of_ae_eNorm_bound (Filter.Eventually.of_forall fun x => by + rw [← ofReal_norm, ← ofReal_norm]; exact ENNReal.ofReal_le_ofReal (a.norm_coe_le_norm x)) + rw [← toReal_eNorm] + exact ENNReal.toReal_mono eNorm_ne_top this + +/-- **The Nikolskii inequality**: under the Nikolskii property of dimension `D ≥ 0`, for +`1 ≤ p ≤ r ≤ ∞` there is `C` with `‖a‖_r ≤ C n^(D(1/p - 1/r)) ‖a‖_p` for all `a ∈ S n`, +`n ≥ 1`. -/ +theorem HasNikolskii.eLpNorm_le (h : S.HasNikolskii μ D) {p r : ℝ≥0∞} (hp : 1 ≤ p) + (hpr : p ≤ r) : ∃ C : ℝ, 0 ≤ C ∧ ∀ n : ℕ, 1 ≤ n → ∀ a ∈ S n, + (eLpNorm a r μ).toReal ≤ C * (n : ℝ) ^ nikolskiiExponent D p r * (eLpNorm a p μ).toReal := by + obtain ⟨C, hC, hCa⟩ := h.exists_const p hp + rcases eq_or_ne r ∞ with rfl | hr + · refine ⟨C, hC, fun n hn a ha => ?_⟩ + rw [nikolskiiExponent_top] + exact (toReal_eLpNorm_top_le_norm a).trans (hCa n hn a ha) + have hp0 : p ≠ 0 := (zero_lt_one.trans_le hp).ne' + have hp' : p ≠ ∞ := ne_top_of_le_ne_top hr hpr + have hr0 : r ≠ 0 := (zero_lt_one.trans_le (hp.trans hpr)).ne' + have hpp : 0 < p.toReal := ENNReal.toReal_pos hp0 hp' + have hrr : 0 < r.toReal := ENNReal.toReal_pos hr0 hr + set θ := p.toReal / r.toReal + have hθ1 : 0 ≤ 1 - θ := ENNReal.one_sub_toReal_div_nonneg hpr + refine ⟨C ^ (1 - θ), Real.rpow_nonneg hC _, fun n hn a ha => ?_⟩ + have hn0 : (0 : ℝ) ≤ n := Nat.cast_nonneg n + set Np := (eLpNorm a p μ).toReal + have hNp : 0 ≤ Np := ENNReal.toReal_nonneg + have hint := toReal_eLpNorm_le_rpow_mul (μ := μ) a.continuous.aestronglyMeasurable + (norm_nonneg a) (Filter.Eventually.of_forall a.norm_coe_le_norm) hp0 hpr hr + calc (eLpNorm a r μ).toReal ≤ ‖a‖ ^ (1 - θ) * Np ^ θ := hint + _ ≤ (C * (n : ℝ) ^ (D * p.toReal⁻¹) * Np) ^ (1 - θ) * Np ^ θ := by + gcongr; exact hCa n hn a ha + _ = C ^ (1 - θ) * (n : ℝ) ^ nikolskiiExponent D p r * (Np ^ (1 - θ) * Np ^ θ) := by + rw [Real.mul_rpow (by positivity) hNp, Real.mul_rpow hC (by positivity), + ← Real.rpow_mul hn0] + have : D * p.toReal⁻¹ * (1 - θ) = nikolskiiExponent D p r := by + simp only [nikolskiiExponent, θ]; field_simp + rw [this]; ring + _ = C ^ (1 - θ) * (n : ℝ) ^ nikolskiiExponent D p r * Np := by + rw [← Real.rpow_add' hNp (by norm_num), sub_add_cancel, Real.rpow_one] + +/-- **The Nikolskii inequality as a lifting bound** for the inclusion `L_r ↪ L_p`: every +approximant of the scheme in `L_p` is the inclusion of an approximant in `L_r` whose norm is at +most `C n^(D(1/p - 1/r))` times its `L_p` norm. -/ +theorem HasNikolskii.liftBound (h : S.HasNikolskii μ D) {p r : ℝ≥0∞} [Fact (1 ≤ p)] + [Fact (1 ≤ r)] (hpr : p ≤ r) : ∃ C : ℝ, 0 ≤ C ∧ + ApproximationScheme.LiftBound (Lp.inclusionOfExponentLe (E := ℂ) (𝕜 := ℝ) μ hpr) + (S.toLp μ p) (nikolskiiExponent D p r) C := by + obtain ⟨C, hC, hCa⟩ := h.eLpNorm_le (Fact.out : 1 ≤ p) hpr + refine ⟨C, hC, fun n hn g hg => ?_⟩ + obtain ⟨a, ha, rfl⟩ := hg + refine ⟨BoundedContinuousFunction.toLp (E := ℂ) r μ ℝ a, + BoundedContinuousFunction.inclusionOfExponentLe_toLp hpr a, ?_⟩ + change ‖BoundedContinuousFunction.toLp (E := ℂ) r μ ℝ a‖ ≤ + C * (n : ℝ) ^ nikolskiiExponent D p r * ‖BoundedContinuousFunction.toLp (E := ℂ) p μ ℝ a‖ + rw [BoundedContinuousFunction.norm_toLp_eq_toReal_eLpNorm, + BoundedContinuousFunction.norm_toLp_eq_toReal_eLpNorm] + exact hCa n hn a ha + +end FunctionScheme diff --git a/LeanPool/FunctionSpaces/MeasureSpaces/Martingales/Filtration.lean b/LeanPool/FunctionSpaces/MeasureSpaces/Martingales/Filtration.lean new file mode 100644 index 0000000000..f02c152162 --- /dev/null +++ b/LeanPool/FunctionSpaces/MeasureSpaces/Martingales/Filtration.lean @@ -0,0 +1,177 @@ +/- +Copyright (c) 2026 Mario Ullrich. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Mario Ullrich +-/ +module + +public import LeanPool.FunctionSpaces.ApproximationSpaces.Decompositions.Projection +public import LeanPool.FunctionSpaces.Analysis.Lp.Inclusion +public import Mathlib.MeasureTheory.Function.ConditionalExpectation.Real +public import Mathlib.MeasureTheory.Function.ConditionalExpectation.AEMeasurable +public import Mathlib.Probability.Process.Filtration + +/- +Modified for Lean Pool: module names and imports adapted. +-/ + +/-! +# Filtration schemes: Haar wavelets and martingale differences + +Let `ℱ_0 ≤ ℱ_1 ≤ ⋯` be a filtration of sub-σ-algebras on a finite measure space. The +**filtration scheme** in `L_p(μ)` (`MeasureTheory.Filtration.scheme`) is the dyadic scheme of +the subspaces `L_p(ℱ_k)`: its approximants of complexity `n ≥ 1` are the `ℱ_j`-measurable +functions, `j = ⌊log₂ n⌋`, so complexity `2^j` buys measurability at level `j`. For the +dyadic filtration of `[0, 1]` with Lebesgue measure, `ℱ_j` is generated by the dyadic intervals +of length `2^(-j)`, and the approximants of complexity `2^j` are the step functions on these +`2^j` intervals: the scheme of the **Haar system**. + +The conditional expectations `E[· | ℱ_j]` are projections onto the approximants, of norm at +most `1` on every `L_p`, `1 ≤ p ≤ ∞` (Mathlib's conditional Jensen inequality +`MeasureTheory.eLpNorm_condExp_le_eLpNorm`); `MeasureTheory.Lp.condExpLp` makes them bounded +linear operators. So the filtration scheme is a projection scheme with bound `1` +(`MeasureTheory.Filtration.projectionScheme`), its dyadic blocks are the **martingale +differences** `E[f | ℱ_{k+1}] - E[f | ℱ_k]`, and for `s > 0` (`memApprox_iff_martingale`): + +`f ∈ A^s_q(L_p, ℱ)` iff `‖E[f | ℱ_0]‖_p + ‖(2^(ks) ‖E[f | ℱ_{k+1}] - E[f | ℱ_k]‖_p)_k‖_{ℓ_q} < ∞`, + +provided the approximants are dense in `L_p` (for the dyadic filtration of `[0, 1]` with +Lebesgue measure and `p < ∞`, `Haar.closure_iUnion_scheme`). For the Haar system, +`E[f | ℱ_{k+1}] - E[f | ℱ_k]` is the part of the Haar expansion of `f` at level `k` +(`Haar.condExpLp_succ_sub_ae_eq`), and the characterisation becomes one by Haar coefficients +(`Haar.memApprox_iff_haarCoeff`). +-/ + +@[expose] public section + +open Filter Topology MeasureTheory +open scoped ENNReal + +namespace MeasureTheory + +variable {α : Type*} {m m0 : MeasurableSpace α} {p : ℝ≥0∞} [Fact (1 ≤ p)] {μ : Measure α} + [IsFiniteMeasure μ] + +namespace Lp + +variable (m) in +/-- The **conditional expectation** `E[· | m]` on `L_p(μ)`, as a real-linear map. -/ +noncomputable def condExpLpLinear : Lp ℂ p μ →ₗ[ℝ] Lp ℂ p μ where + toFun f := ((Lp.memLp f).condExp Fact.out).toLp (μ[(f : α → ℂ) | m]) + map_add' f g := by + ext1 + have hfi := (Lp.memLp f).integrable (Fact.out : 1 ≤ p) + have hgi := (Lp.memLp g).integrable (Fact.out : 1 ≤ p) + filter_upwards [MemLp.coeFn_toLp ((Lp.memLp (f + g)).condExp Fact.out), + condExp_congr_ae (m := m) (Lp.coeFn_add f g), condExp_add hfi hgi m, + Lp.coeFn_add (((Lp.memLp f).condExp Fact.out).toLp (μ[(f : α → ℂ) | m])) + (((Lp.memLp g).condExp Fact.out).toLp (μ[(g : α → ℂ) | m])), + MemLp.coeFn_toLp ((Lp.memLp f).condExp Fact.out), + MemLp.coeFn_toLp ((Lp.memLp g).condExp Fact.out)] with x h1 h2 h3 h4 h5 h6 + rw [h1, h2, h3, h4, Pi.add_apply, Pi.add_apply, h5, h6] + map_smul' c f := by + ext1 + filter_upwards [MemLp.coeFn_toLp ((Lp.memLp (c • f)).condExp Fact.out), + condExp_congr_ae (m := m) (Lp.coeFn_smul c f), condExp_smul c (f : α → ℂ) m, + Lp.coeFn_smul c (((Lp.memLp f).condExp Fact.out).toLp (μ[(f : α → ℂ) | m])), + MemLp.coeFn_toLp ((Lp.memLp f).condExp Fact.out)] with x h1 h2 h3 h4 h5 + rw [h1, h2, h3, RingHom.id_apply, h4, Pi.smul_apply, Pi.smul_apply, h5] + +/-- The linear conditional expectation agrees a.e. with Mathlib's `μ[f | m]`. -/ +theorem coeFn_condExpLpLinear (f : Lp ℂ p μ) : + condExpLpLinear m f =ᵐ[μ] μ[(f : α → ℂ) | m] := + MemLp.coeFn_toLp ((Lp.memLp f).condExp Fact.out) + +variable (m) in +/-- The **conditional expectation** `E[· | m]` on `L_p(μ)`, a contraction. -/ +noncomputable def condExpLp : Lp ℂ p μ →L[ℝ] Lp ℂ p μ := + LinearMap.mkContinuous (condExpLpLinear m) 1 fun f => by + rw [one_mul, Lp.norm_def, Lp.norm_def, eLpNorm_congr_ae (coeFn_condExpLpLinear f)] + exact ENNReal.toReal_mono (Lp.eLpNorm_ne_top f) + (eLpNorm_condExp_le_eLpNorm _ Fact.out) + +/-- `E[f | m]` on `L_p` agrees a.e. with Mathlib's `μ[f | m]`. -/ +theorem coeFn_condExpLp (f : Lp ℂ p μ) : + condExpLp m f =ᵐ[μ] μ[(f : α → ℂ) | m] := + coeFn_condExpLpLinear f + +variable (m) in +/-- **The conditional expectation is a contraction** on `L_p`. -/ +theorem norm_condExpLp_le : ‖(condExpLp (μ := μ) (p := p) m)‖ ≤ 1 := + LinearMap.mkContinuous_norm_le _ zero_le_one _ + +variable (m) in +/-- The conditional expectation is `m`-measurable. -/ +theorem condExpLp_mem_lpMeas (f : Lp ℂ p μ) : + condExpLp m f ∈ lpMeas ℂ ℝ m p μ := by + rw [mem_lpMeas_iff_aestronglyMeasurable] + exact stronglyMeasurable_condExp.aestronglyMeasurable.congr (coeFn_condExpLp f).symm + +/-- The conditional expectation fixes the `m`-measurable functions. -/ +theorem condExpLp_of_mem (hm : m ≤ m0) {f : Lp ℂ p μ} + (hf : f ∈ lpMeas ℂ ℝ m p μ) : condExpLp m f = f := by + ext1 + rw [mem_lpMeas_iff_aestronglyMeasurable] at hf + have : SigmaFinite (μ.trim hm) := inferInstance + exact (coeFn_condExpLp f).trans + (condExp_of_aestronglyMeasurable' hm hf ((Lp.memLp f).integrable Fact.out)) + +end Lp + +namespace Filtration + +omit [Fact (1 ≤ p)] [IsFiniteMeasure μ] in +/-- **The measurable subgroups of a filtration increase**: for `i ≤ j`, every `ℱ_i`-measurable +element of `L_p(μ)` is `ℱ_j`-measurable, for every `p` and every ordered index set. -/ +theorem monotone_lpMeasSubgroup {ι : Type*} [Preorder ι] (ℱ : Filtration ι m0) (F : Type*) + [NormedAddCommGroup F] : Monotone fun i => lpMeasSubgroup F (ℱ i) p μ := fun _ _ hij _ hf => + mem_lpMeasSubgroup_iff_aestronglyMeasurable.2 + ((mem_lpMeasSubgroup_iff_aestronglyMeasurable.1 hf).mono (ℱ.mono hij)) + +variable (ℱ : Filtration ℕ m0) + +variable (p μ) in +/-- The **filtration scheme** in `L_p(μ)`: the dyadic scheme +(`ApproximationScheme.ofMonotoneSubmodules`) of the increasing subspaces `L_p(ℱ_k)` of +`ℱ_k`-measurable functions, so `{0}` at complexity `0` and `L_p(ℱ_⌊log₂ n⌋)` at complexity +`n ≥ 1`. -/ +noncomputable def scheme : ApproximationScheme (Lp ℂ p μ) := + ApproximationScheme.ofMonotoneSubmodules (fun k => lpMeas ℂ ℝ (ℱ k) p μ) fun _ _ hab _ hf => by + rw [mem_lpMeas_iff_aestronglyMeasurable] at hf ⊢ + exact hf.mono (ℱ.mono hab) + +omit [IsFiniteMeasure μ] in +/-- The approximants of complexity `n ≥ 1` of the filtration scheme are the +`ℱ_⌊log₂ n⌋`-measurable functions in `L_p`. -/ +theorem mem_scheme {n : ℕ} (hn : n ≠ 0) {f : Lp ℂ p μ} : + f ∈ ℱ.scheme p μ n ↔ f ∈ lpMeas ℂ ℝ (ℱ (Nat.log 2 n)) p μ := + ApproximationScheme.mem_ofMonotoneSubmodules hn + +/-- **The filtration scheme is a projection scheme** with bound `1`: the conditional +expectations are contractive projections onto the approximants, `P_0 = 0` and +`P_n = E[· | ℱ_⌊log₂ n⌋]` for `n ≥ 1`, so `P_{2^k} = E[· | ℱ_k]` +(`ApproximationScheme.ProjectionScheme.ofMonotone_two_pow`). -/ +noncomputable def projectionScheme : (ℱ.scheme p μ).ProjectionScheme := + ApproximationScheme.ProjectionScheme.ofMonotone (fun k => lpMeas ℂ ℝ (ℱ k) p μ) _ + (fun k => Lp.condExpLp (ℱ k)) (fun _ => Lp.condExpLp_mem_lpMeas _) + (fun k _ ha => Lp.condExpLp_of_mem (ℱ.le k) ha) 1 fun _ => Lp.norm_condExpLp_le _ + +/-- **The martingale-difference characterisation**: for `s > 0`, `1 ≤ q ≤ ∞` and approximants +dense in `L_p`, `f ∈ A^s_q(L_p, ℱ)` iff +`‖E[f | ℱ_0]‖_p + ‖(2^(ks) ‖E[f | ℱ_{k+1}] - E[f | ℱ_k]‖_p)_k‖_{ℓ_q} < ∞`. -/ +theorem memApprox_iff_martingale (hd : closure (⋃ n, ℱ.scheme p μ n) = Set.univ) {s : ℝ} + (hs : 0 < s) {q : ℝ≥0∞} (hq : 1 ≤ q) {f : Lp ℂ p μ} : + (ℱ.scheme p μ).MemApprox s q f ↔ + ‖Lp.condExpLp (ℱ 0) f‖ₑ + ENNReal.lqNorm q (fun k => ENNReal.dyadicWeight s k * + ‖Lp.condExpLp (ℱ (k + 1)) f - Lp.condExpLp (ℱ k) f‖ₑ) < ∞ := by + rw [(ℱ.projectionScheme (p := p) (μ := μ)).memApprox_iff_blockNorm_lt_top hd hs hq] + have h2 : ∀ k, (ℱ.projectionScheme (p := p) (μ := μ)).P (2 ^ k) = Lp.condExpLp (ℱ k) := + fun k => ApproximationScheme.ProjectionScheme.ofMonotone_two_pow k + have h1 : (ℱ.projectionScheme (p := p) (μ := μ)).P 1 = Lp.condExpLp (ℱ 0) := by + simpa using h2 0 + simp only [ApproximationScheme.ProjectionScheme.blockNorm, + ApproximationScheme.ProjectionScheme.block, h1, h2] + +end Filtration + +end MeasureTheory diff --git a/LeanPool/FunctionSpaces/MeasureSpaces/Martingales/Partition.lean b/LeanPool/FunctionSpaces/MeasureSpaces/Martingales/Partition.lean new file mode 100644 index 0000000000..d4e8fca474 --- /dev/null +++ b/LeanPool/FunctionSpaces/MeasureSpaces/Martingales/Partition.lean @@ -0,0 +1,86 @@ +/- +Copyright (c) 2026 Mario Ullrich. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Mario Ullrich +-/ +module + +public import Mathlib.MeasureTheory.Function.ConditionalExpectation.Real + +/- +Modified for Lean Pool: module names and imports adapted. +-/ + +/-! +# Conditional expectation onto the σ-algebra of a countable partition + +Let `φ : α → ι` take values in a countable type and have measurable fibres `φ⁻¹{i}`. The +σ-algebra `MeasurableSpace.comap φ ⊤` consists of the unions of fibres: it is the σ-algebra of +the partition of `α` into the fibres of `φ`. For a finite measure the conditional expectation +onto it is the average over the cell (`MeasureTheory.condExp_comap_ae_eq`): + +`E[f | φ](x) = μ(φ⁻¹{φ x})⁻¹ ∫_{φ⁻¹{φ x}} f dμ` for almost every `x`. + +The dyadic σ-algebras of the Haar system are of this form, with `φ(x) = ⌊2^j x⌋`. +-/ + +@[expose] public section + +open MeasureTheory + +namespace MeasureTheory + +variable {α ι E : Type*} {m0 : MeasurableSpace α} {μ : Measure α} + [NormedAddCommGroup E] [NormedSpace ℝ E] [CompleteSpace E] + +/-- The σ-algebra of the fibres of `φ` lies below the ambient σ-algebra when the fibres are +measurable and `φ` takes countably many values. -/ +theorem comap_top_le [Countable ι] {φ : α → ι} (hφ : ∀ i, MeasurableSet (φ ⁻¹' {i})) : + MeasurableSpace.comap φ ⊤ ≤ m0 := by + rintro s ⟨T, -, rfl⟩ + rw [← Set.biUnion_preimage_singleton] + exact MeasurableSet.biUnion T.to_countable fun i _ => hφ i + +omit [NormedSpace ℝ E] [CompleteSpace E] in +/-- A function measurable for the σ-algebra of the fibres of `φ` is constant on every fibre. -/ +theorem StronglyMeasurable.eq_of_comap_top [MeasurableSpace E] [BorelSpace E] {φ : α → ι} + {g : α → E} (hg : StronglyMeasurable[MeasurableSpace.comap φ ⊤] g) {x y : α} + (hxy : φ y = φ x) : g y = g x := by + obtain ⟨T, -, hT⟩ := MeasurableSpace.measurableSet_comap.1 + (hg.measurable (measurableSet_singleton (g x))) + have hx : x ∈ φ ⁻¹' T := by rw [hT]; rfl + have hy : y ∈ φ ⁻¹' T := by rw [Set.mem_preimage, hxy]; exact hx + rw [hT] at hy + exact hy + +/-- **Conditional expectation onto a countable partition**: for a finite measure and an +integrable `f`, `E[f | φ](x)` is the average of `f` over the fibre of `φ` through `x`, for +almost every `x`. The fibres of measure `0` form a null set, which is why the formula holds +only almost everywhere. -/ +theorem condExp_comap_ae_eq [Countable ι] [IsFiniteMeasure μ] [MeasurableSpace E] [BorelSpace E] + {φ : α → ι} (hφ : ∀ i, MeasurableSet (φ ⁻¹' {i})) {f : α → E} (hf : Integrable f μ) : + μ[f | MeasurableSpace.comap φ ⊤] =ᵐ[μ] + fun x => (μ.real (φ ⁻¹' {φ x}))⁻¹ • ∫ y in φ ⁻¹' {φ x}, f y ∂μ := by + have hm : MeasurableSpace.comap φ ⊤ ≤ m0 := comap_top_le hφ + have hg : StronglyMeasurable[MeasurableSpace.comap φ ⊤] (μ[f | MeasurableSpace.comap φ ⊤]) := + stronglyMeasurable_condExp + have hnull : ∀ᵐ x ∂μ, μ (φ ⁻¹' {φ x}) ≠ 0 := by + rw [ae_iff] + simp only [ne_eq, not_not] + refine measure_mono_null (t := ⋃ i ∈ {i | μ (φ ⁻¹' {i}) = 0}, φ ⁻¹' {i}) ?_ + ((measure_biUnion_null_iff (Set.to_countable _)).2 fun i hi => hi) + intro x hx + simp only [Set.mem_iUnion] + exact ⟨φ x, hx, rfl⟩ + filter_upwards [hnull] with x hx + have hfib : MeasurableSet[MeasurableSpace.comap φ ⊤] (φ ⁻¹' {φ x}) := ⟨{φ x}, trivial, rfl⟩ + have hint := setIntegral_condExp hm hf hfib + have hconst : ∫ y in φ ⁻¹' {φ x}, (μ[f | MeasurableSpace.comap φ ⊤]) y ∂μ = + μ.real (φ ⁻¹' {φ x}) • (μ[f | MeasurableSpace.comap φ ⊤]) x := by + rw [← setIntegral_const] + exact setIntegral_congr_fun (hφ (φ x)) fun y hy => hg.eq_of_comap_top hy + have hreal : μ.real (φ ⁻¹' {φ x}) ≠ 0 := + ENNReal.toReal_ne_zero.2 ⟨hx, measure_ne_top μ _⟩ + rw [← hint, hconst, smul_smul, inv_mul_cancel₀ hreal, one_smul] + +end MeasureTheory diff --git a/LeanPool/FunctionSpaces/MeasureSpaces/Scheme.lean b/LeanPool/FunctionSpaces/MeasureSpaces/Scheme.lean new file mode 100644 index 0000000000..37489049fc --- /dev/null +++ b/LeanPool/FunctionSpaces/MeasureSpaces/Scheme.lean @@ -0,0 +1,109 @@ +/- +Copyright (c) 2026 Mario Ullrich. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Mario Ullrich +-/ +module + +public import LeanPool.FunctionSpaces.ApproximationSpaces.Scheme +public import LeanPool.FunctionSpaces.Analysis.Lp.BoundedContinuous +public import Mathlib.Analysis.Complex.Basic + +/- +Modified for Lean Pool: module names and imports adapted. +-/ + +/-! +# Approximation schemes of functions + +A **scheme of functions** on a topological space `Ω` is an approximation scheme in the Banach +space `Ω →ᵇ ℂ` of bounded continuous complex functions with the sup norm +(`FunctionScheme Ω`). Examples: trigonometric polynomials of degree `< n` on the torus, +algebraic polynomials on a compact set, splines, eigenfunctions of a Laplacian. + +For a finite measure `μ` on `Ω`, every bounded continuous function defines an element of +`L_p(μ)` for every `p`, and the scheme is transported to `L_p(μ)` by Mathlib's bounded linear +map `BoundedContinuousFunction.toLp` (`FunctionScheme.toLp`). One scheme thus yields a scheme +in every `L_p(μ)`, and these are compatible with the inclusions `L_r ↪ L_p`: the inclusion +maps the scheme in `L_r` onto the scheme in `L_p` (`image_toLp_of_le`), and the preimage of +the scheme in `L_p` is the scheme in `L_r` (`comap_toLp_of_le`). These two facts are the only +input the transfer theorems need. + +**Why bounded continuous functions.** The alternative, bounded measurable functions, would +add the proof obligation "bounded and measurable" to every element of every scheme, and +`C(Ω)` would restrict to compact `Ω`. Haar functions, which are not continuous, are handled by +a scheme directly in `L_p`. +-/ + +@[expose] public section + +open MeasureTheory +open scoped BoundedContinuousFunction +open scoped ENNReal + +/-- A **scheme of functions** on `Ω`: an approximation scheme of bounded continuous complex +functions. -/ +abbrev FunctionScheme (Ω : Type*) [TopologicalSpace Ω] := ApproximationScheme (Ω →ᵇ ℂ) + +namespace FunctionScheme + +variable {Ω : Type*} [TopologicalSpace Ω] [MeasurableSpace Ω] [BorelSpace Ω] + (S : FunctionScheme Ω) (μ : Measure Ω) [IsFiniteMeasure μ] + +/-- The scheme `S` transported to `L_p(μ)`: the `L_p` classes of the functions in `S n`. -/ +noncomputable def toLp (p : ℝ≥0∞) [Fact (1 ≤ p)] : ApproximationScheme (Lp ℂ p μ) := + S.map (BoundedContinuousFunction.toLp (E := ℂ) p μ ℝ).toLinearMap + +variable {S μ} {p r : ℝ≥0∞} [Fact (1 ≤ p)] [Fact (1 ≤ r)] + +/-- `g ∈ S^(p)_n` iff `g` is the class in `L_p` of some `a ∈ S_n`. -/ +theorem mem_toLp {n : ℕ} {g : Lp ℂ p μ} : + g ∈ S.toLp μ p n ↔ ∃ a ∈ S n, BoundedContinuousFunction.toLp (E := ℂ) p μ ℝ a = g := + Iff.rfl + +/-- The class in `L_p` of `a ∈ S_n` lies in `S^(p)_n`. -/ +theorem toLp_mem_toLp {n : ℕ} {a : Ω →ᵇ ℂ} (ha : a ∈ S n) : + BoundedContinuousFunction.toLp (E := ℂ) p μ ℝ a ∈ S.toLp μ p n := + ⟨a, ha, rfl⟩ + +/-- The inclusion `L_r ↪ L_p` maps the scheme in `L_r` into the scheme in `L_p`. -/ +theorem inclusion_mem_toLp (hpr : p ≤ r) {n : ℕ} {g : Lp ℂ r μ} (hg : g ∈ S.toLp μ r n) : + Lp.inclusionOfExponentLe (𝕜 := ℝ) μ hpr g ∈ S.toLp μ p n := by + obtain ⟨a, ha, rfl⟩ := hg + change Lp.inclusionOfExponentLe (𝕜 := ℝ) μ hpr + (BoundedContinuousFunction.toLp (E := ℂ) r μ ℝ a) ∈ _ + rw [BoundedContinuousFunction.inclusionOfExponentLe_toLp] + exact toLp_mem_toLp ha + +/-- The inclusion `L_r ↪ L_p` maps the scheme in `L_r` onto the scheme in `L_p`. -/ +theorem image_toLp_of_le (hpr : p ≤ r) (n : ℕ) : + Lp.inclusionOfExponentLe (𝕜 := ℝ) μ hpr '' S.toLp μ r n = S.toLp μ p n := by + ext g + constructor + · rintro ⟨g', hg', rfl⟩; exact inclusion_mem_toLp hpr hg' + · rintro ⟨a, ha, rfl⟩ + exact ⟨_, toLp_mem_toLp ha, BoundedContinuousFunction.inclusionOfExponentLe_toLp hpr a⟩ + +/-- An `L_r` function whose `L_p` class is an approximant is itself an approximant. -/ +theorem mem_toLp_of_inclusion_mem (hpr : p ≤ r) {n : ℕ} {g : Lp ℂ r μ} + (hg : Lp.inclusionOfExponentLe (𝕜 := ℝ) μ hpr g ∈ S.toLp μ p n) : g ∈ S.toLp μ r n := by + obtain ⟨a, ha, h⟩ := hg + have : g = BoundedContinuousFunction.toLp (E := ℂ) r μ ℝ a := + Lp.inclusionOfExponentLe_injective (𝕜 := ℝ) hpr + (by rw [BoundedContinuousFunction.inclusionOfExponentLe_toLp]; exact h.symm) + exact this ▸ toLp_mem_toLp ha + +/-- The preimage of the scheme in `L_p` under `L_r ↪ L_p` is the scheme in `L_r`. -/ +theorem comap_toLp_of_le (hpr : p ≤ r) : + (S.toLp μ p).comap (Lp.inclusionOfExponentLe (𝕜 := ℝ) μ hpr).toLinearMap + (Lp.inclusionOfExponentLe_injective hpr) = S.toLp μ r := by + ext n g + exact ⟨mem_toLp_of_inclusion_mem hpr, inclusion_mem_toLp hpr⟩ + +/-- Every approximant of the scheme in `L_p` is the inclusion of one in `L_r`. -/ +theorem exists_toLp_of_mem (hpr : p ≤ r) {n : ℕ} {g : Lp ℂ p μ} (hg : g ∈ S.toLp μ p n) : + ∃ g' ∈ S.toLp μ r n, Lp.inclusionOfExponentLe (𝕜 := ℝ) μ hpr g' = g := by + rw [← image_toLp_of_le hpr] at hg + exact hg + +end FunctionScheme diff --git a/LeanPool/FunctionSpaces/MeasureSpaces/Sobolev/Embeddings.lean b/LeanPool/FunctionSpaces/MeasureSpaces/Sobolev/Embeddings.lean new file mode 100644 index 0000000000..a52cceeab1 --- /dev/null +++ b/LeanPool/FunctionSpaces/MeasureSpaces/Sobolev/Embeddings.lean @@ -0,0 +1,100 @@ +/- +Copyright (c) 2026 Mario Ullrich. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Mario Ullrich +-/ +module + +public import LeanPool.FunctionSpaces.ApproximationSpaces.Jackson +public import LeanPool.FunctionSpaces.MeasureSpaces.Besov.Embeddings + +/- +Modified for Lean Pool: module names and imports adapted. +-/ + +/-! +# Embedding theorems for Sobolev spaces + +A **Sobolev space** of order `s` inside `L_p(μ)` is, for this library, a smoothness space for +the scheme `S` in `L_p`: a Banach space `W` with an injective bounded map `ι : W → L_p(μ)` and +Jackson's and Bernstein's inequalities of order `s` (`FunctionScheme.SobolevSpace`). It is a +hypothesis structure whose fields are the embedding, the order and Jackson's and Bernstein's +inequalities with their constants; its instances in this library are the spaces `H^s` with +`p = 2` on the torus (`Torus.sobolevSpace`) and for a continuous spectral basis +(`ContinuousSpectralBasis.sobolevSpace`). + +If the scheme has the Nikolskii property of dimension `D` (the hypothesis +`FunctionScheme.HasNikolskii`, proved on the torus), then: + +* **the Sobolev embedding** `W^s_p ↪ W^t_r` for `p ≤ r` and `t < s - D(1/p - 1/r)` + (`SobolevSpace.exists_eq_inclusion`): every element of `W` is, as an `L_p` function, the + inclusion of an element of `W'`; +* **the embedding into bounded continuous functions** for `s > D/p` + (`SobolevSpace.exists_boundedContinuous`), when `μ` charges every nonempty open set. + +The proof is the chain + +`W^s_p ⊆ B^s_{p,∞} ⊆ B^{s-α}_{r,∞} ⊆ B^t_{r,1} ⊆ W^t_r`, `α = D(1/p - 1/r)`, + +by Jackson, the Besov embedding, the embedding `A^{s-α}_∞ ⊆ A^t_1` for `t < s - α`, and +Bernstein. + +**Limiting cases.** The chain loses the fine index at both ends (`W ⊆ B_{·,∞}` and +`B_{·,1} ⊆ W`), and the Besov embedding needs a strict inequality. The sharp cases +`t = s - D(1/p - 1/r)` (for instance `W^1_1(𝕋^d) ↪ L_{d/(d-1)}`) and `s = D/p` for continuity +are therefore not provable by this method; they need tools of harmonic analysis. +-/ + +@[expose] public section + +open MeasureTheory ApproximationScheme +open scoped ENNReal BoundedContinuousFunction + +namespace FunctionScheme + +variable {Ω : Type*} [TopologicalSpace Ω] [MeasurableSpace Ω] [BorelSpace Ω] + {S : FunctionScheme Ω} {μ : Measure Ω} [IsFiniteMeasure μ] {D : ℝ} {p r : ℝ≥0∞} + [Fact (1 ≤ p)] [Fact (1 ≤ r)] + +variable (S μ p) in +/-- A **Sobolev space** inside `L_p(μ)` for the scheme `S`: a smoothness space for `S` in +`L_p(μ)`, that is, a normed space `W` with an injective bounded linear map into `L_p(μ)` and +Jackson's and Bernstein's inequalities of some order. It is a hypothesis structure; the instances +are `Torus.sobolevSpace` and `ContinuousSpectralBasis.sobolevSpace`, both for `p = 2`. -/ +abbrev SobolevSpace (W : Type*) [NormedAddCommGroup W] [NormedSpace ℝ W] := + SmoothnessSpace (S.toLp μ p) W + +variable {W W' : Type*} [NormedAddCommGroup W] [NormedSpace ℝ W] [NormedAddCommGroup W'] + [NormedSpace ℝ W'] [CompleteSpace W'] + +/-- **The Sobolev embedding** `W^s_p ↪ W^t_r`: for a scheme with the Nikolskii property of +dimension `D ≥ 0`, Sobolev spaces `V` of order `s` in `L_p` and `V'` of order `t` in `L_r`, +`p ≤ r`, and `t < s - D(1/p - 1/r)`, every element of `V` is, as an `L_p` function, the +inclusion of an element of `V'`. -/ +theorem SobolevSpace.exists_eq_inclusion (h : S.HasNikolskii μ D) (hD : 0 ≤ D) + (V : S.SobolevSpace μ p W) (V' : S.SobolevSpace μ r W') (hpr : p ≤ r) + (hst : V'.order < V.order - nikolskiiExponent D p r) (y : W) : + ∃ y' : W', Lp.inclusionOfExponentLe (𝕜 := ℝ) μ hpr (V'.incl y') = V.incl y := by + have hα : nikolskiiExponent D p r < V.order := by linarith [V'.order_pos] + obtain ⟨g, hg, hmem⟩ := + MemBesov.exists_inclusion_eq_of_nikolskii h hD hpr hα le_top (V.memApprox_top y) + obtain ⟨y', hy'⟩ := V'.exists_eq_of_lt hst le_top hmem + exact ⟨y', by rw [hy', hg]⟩ + +/-- **The Sobolev embedding** in the classical form of the exponents: `t - D/r < s - D/p`. -/ +theorem SobolevSpace.exists_eq_inclusion' (h : S.HasNikolskii μ D) (hD : 0 ≤ D) + (V : S.SobolevSpace μ p W) (V' : S.SobolevSpace μ r W') (hpr : p ≤ r) + (hst : V'.order - D * r.toReal⁻¹ < V.order - D * p.toReal⁻¹) (y : W) : + ∃ y' : W', Lp.inclusionOfExponentLe (𝕜 := ℝ) μ hpr (V'.incl y') = V.incl y := + V.exists_eq_inclusion h hD V' hpr (by unfold nikolskiiExponent; linarith) y + +/-- **Embedding of a Sobolev space into bounded continuous functions**: for `s > D/p` and a +measure charging every nonempty open set, every element of a Sobolev space of order `s` in +`L_p` has a bounded continuous representative. -/ +theorem SobolevSpace.exists_boundedContinuous [μ.IsOpenPosMeasure] (h : S.HasNikolskii μ D) + (hD : 0 ≤ D) (V : S.SobolevSpace μ p W) (hs : D * p.toReal⁻¹ < V.order) (y : W) : + ∃ a : Ω →ᵇ ℂ, Lp.inclusionOfExponentLe (𝕜 := ℝ) μ le_top + (BoundedContinuousFunction.toLp (E := ℂ) ∞ μ ℝ a) = V.incl y := + MemBesov.exists_boundedContinuous h hD hs le_top (V.memApprox_top y) + +end FunctionScheme diff --git a/LeanPool/FunctionSpaces/MeasureSpaces/Spectral/Basic.lean b/LeanPool/FunctionSpaces/MeasureSpaces/Spectral/Basic.lean new file mode 100644 index 0000000000..6b201d9f84 --- /dev/null +++ b/LeanPool/FunctionSpaces/MeasureSpaces/Spectral/Basic.lean @@ -0,0 +1,295 @@ +/- +Copyright (c) 2026 Mario Ullrich. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Mario Ullrich +-/ +module + +public import LeanPool.FunctionSpaces.ApproximationSpaces.Jackson +public import Mathlib.Analysis.InnerProductSpace.l2Space + +/- +Modified for Lean Pool: module names and imports adapted. +-/ + +/-! +# Spectral schemes and Sobolev spaces in a Hilbert space + +A **spectral scheme** in a complex Hilbert space `H` is a Hilbert basis `(e_i)_{i ∈ ι}` together +with a **level** `lvl : ι → ℕ` with finite level sets (`SpectralScheme`). The approximants of +complexity `n` are the combinations of the basis elements of level `< n`, + +`A n = span {e_i : lvl i < n}`. + +Examples: the Fourier basis of `L_2(𝕋^d)` with `lvl k = max_i |k_i|`; an eigenbasis of a +Laplacian on a compact manifold with `lvl` the integer part of the square root of the +eigenvalue. + +The **Sobolev space** of order `s ≥ 0` is the image of `ℓ²(ι)` under the diagonal operator + +`J_s c = ∑_i (1 + lvl i)^(-s) c_i e_i` (`SpectralScheme.sobolevEmbed`), + +with the norm of `ℓ²`: `f ∈ H^s` iff `∑_i (1 + lvl i)^(2s) |⟨e_i, f⟩|² < ∞` +(`mem_range_sobolevEmbed_iff`). This is the Bessel-potential description of `L_2` Sobolev +spaces; it needs no new normed space, since `ℓ²` already is one. + +By Parseval's identity both approximation inequalities hold with constant `1`: + +* **Jackson**: `E_n(J_s c) ≤ n^(-s) ‖c‖` (`jacksonBound`), since the error of the truncation to + levels `< n` involves only coefficients of level `≥ n`; +* **Bernstein**: every `a ∈ A n` is `J_s c` with `‖c‖ ≤ n^s ‖a‖` (`liftBound`), since `a` has + only coefficients of level `< n`. + +So `J_s` is a smoothness space of order `s` for the scheme (`toSmoothnessSpace`). +-/ + +@[expose] public section + +open scoped ENNReal InnerProductSpace lp + +/-- A **spectral scheme**: a Hilbert basis with a level function whose level sets are finite. -/ +structure SpectralScheme (ι H : Type*) [NormedAddCommGroup H] [InnerProductSpace ℂ H] where + /-- The Hilbert basis. -/ + basis : HilbertBasis ι ℂ H + /-- The level of a basis element. -/ + level : ι → ℕ + finite_level : ∀ n, {i | level i < n}.Finite + +namespace SpectralScheme + +variable {ι H : Type*} [NormedAddCommGroup H] [InnerProductSpace ℂ H] + (S : SpectralScheme ι H) + +/-- The approximants of complexity `n`: combinations of basis elements of level `< n`. -/ +noncomputable def span (n : ℕ) : Submodule ℂ H := Submodule.span ℂ (S.basis '' {i | S.level i < n}) + +/-- `A_0 = {0}`: no basis element has level `< 0`. -/ +@[simp] +theorem span_zero : S.span 0 = ⊥ := by simp [span] + +/-- The spans increase with `n`. -/ +theorem span_mono : Monotone S.span := fun _ _ h => + Submodule.span_mono (Set.image_mono fun _ hi => lt_of_lt_of_le hi h) + +/-- The spectral scheme as an approximation scheme. -/ +noncomputable def toScheme : ApproximationScheme H := + ApproximationScheme.ofSubmodules (fun n => (S.span n).restrictScalars ℝ) (by simp) + (fun _ _ h => S.span_mono h) + +/-- The approximants of the spectral scheme are the spans. -/ +@[simp] +theorem mem_toScheme {n : ℕ} {a : H} : a ∈ S.toScheme n ↔ a ∈ S.span n := Iff.rfl + +/-- An approximant of complexity `n` has no coefficients of level `≥ n`. -/ +theorem repr_eq_zero_of_mem_span {n : ℕ} {a : H} (ha : a ∈ S.span n) {i : ι} + (hi : n ≤ S.level i) : S.basis.repr a i = 0 := by + rw [S.basis.repr_apply_apply] + refine Submodule.span_induction ?_ ?_ ?_ ?_ ha + · rintro _ ⟨j, hj, rfl⟩ + have hij : i ≠ j := by + rintro rfl; exact absurd hj (not_lt.2 hi) + exact S.basis.orthonormal.2 hij + · simp + · intro x y _ _ hx hy; rw [inner_add_right, hx, hy, add_zero] + · intro c x _ hx; rw [inner_smul_right, hx, mul_zero] + +/-- The **truncation** of `f` to levels `< n`, `∑_{lvl i < n} ⟨e_i, f⟩ e_i`, an approximant. -/ +noncomputable def truncate (n : ℕ) (f : H) : H := + ∑ i ∈ (S.finite_level n).toFinset, S.basis.repr f i • S.basis i + +/-- The truncation `P_n f` lies in `A_n`. -/ +theorem truncate_mem_span (n : ℕ) (f : H) : S.truncate n f ∈ S.span n := + Submodule.sum_mem _ fun i hi => Submodule.smul_mem _ _ + (Submodule.subset_span ⟨i, by simpa using hi, rfl⟩) + +/-- The coefficients of `truncate n f` are those of `f` at levels `< n`. -/ +theorem repr_truncate (n : ℕ) (f : H) (i : ι) : + S.basis.repr (S.truncate n f) i = if S.level i < n then S.basis.repr f i else 0 := by + classical + rw [S.basis.repr_apply_apply, truncate] + simp only [inner_sum, inner_smul_right, orthonormal_iff_ite.mp S.basis.orthonormal, mul_ite, + mul_one, mul_zero, Finset.sum_ite_eq, Set.Finite.mem_toFinset, Set.mem_ofPred_eq] + +/-- The coefficients of `f - truncate n f` are those of `f` at levels `≥ n`. -/ +theorem repr_sub_truncate (n : ℕ) (f : H) (i : ι) : + S.basis.repr (f - S.truncate n f) i = if S.level i < n then 0 else S.basis.repr f i := by + rw [map_sub, lp.coeFn_sub, Pi.sub_apply, repr_truncate] + split_ifs <;> simp + +/-- The **weight** `(1 + lvl i)^s`. -/ +noncomputable def weight (s : ℝ) (i : ι) : ℝ := ((1 + S.level i : ℕ) : ℝ) ^ s + +/-- The weights `(1 + λ(i))^s` are positive. -/ +theorem weight_pos (s : ℝ) (i : ι) : 0 < S.weight s i := + Real.rpow_pos_of_pos (by positivity) s + +/-- For `s ≥ 0` the weights are at least `1`. -/ +theorem one_le_weight {s : ℝ} (hs : 0 ≤ s) (i : ι) : 1 ≤ S.weight s i := + Real.one_le_rpow (by simp) hs + +/-- The inverse weight as a complex number has modulus `(1 + λ(i))^(-s)`. -/ +theorem norm_ofReal_inv_weight (s : ℝ) (i : ι) : ‖((S.weight s i)⁻¹ : ℂ)‖ = (S.weight s i)⁻¹ := by + rw [← Complex.ofReal_inv, Complex.norm_real, Real.norm_eq_abs, + abs_of_pos (inv_pos.2 (S.weight_pos s i))] + +/-- The weight as a complex number has modulus `(1 + λ(i))^s`. -/ +theorem norm_ofReal_weight (s : ℝ) (i : ι) : ‖(S.weight s i : ℂ)‖ = S.weight s i := by + rw [Complex.norm_real, Real.norm_eq_abs, abs_of_pos (S.weight_pos s i)] + +/-- The weights are nonzero. -/ +theorem ofReal_weight_ne_zero (s : ℝ) (i : ι) : (S.weight s i : ℂ) ≠ 0 := by + simpa using (S.weight_pos s i).ne' + +/-- At level `≥ n` the inverse weight is at most `n^(-s)`. -/ +theorem inv_weight_le {s : ℝ} (hs : 0 ≤ s) {n : ℕ} (hn : 1 ≤ n) {i : ι} (hi : n ≤ S.level i) : + (S.weight s i)⁻¹ ≤ (n : ℝ) ^ (-s) := by + rw [weight, ← Real.rpow_neg (by positivity)] + exact Real.rpow_le_rpow_of_nonpos (by exact_mod_cast hn) + (by exact_mod_cast (show n ≤ 1 + S.level i by omega)) (neg_nonpos.2 hs) + +/-- At level `< n` the weight is at most `n^s`. -/ +theorem weight_le {s : ℝ} (hs : 0 ≤ s) {n : ℕ} {i : ι} (hi : S.level i < n) : + S.weight s i ≤ (n : ℝ) ^ s := + Real.rpow_le_rpow (by positivity) (by exact_mod_cast (show 1 + S.level i ≤ n by omega)) hs + +/-- The diagonal operator `c ↦ ((1 + lvl i)^(-s) c_i)_i` on `ℓ²`, a contraction for `s ≥ 0`. -/ +noncomputable def diagInvWeight (s : ℝ) (hs : 0 ≤ s) : ℓ²(ι, ℂ) →L[ℂ] ℓ²(ι, ℂ) := + LinearMap.mkContinuous + { toFun := fun c => ⟨fun i => ((S.weight s i)⁻¹ : ℂ) * c i, + ((lp.memℓp c).norm).mono fun i => by + rw [norm_mul, S.norm_ofReal_inv_weight] + exact mul_le_of_le_one_left (norm_nonneg _) + (inv_le_one_of_one_le₀ (S.one_le_weight hs i))⟩ + map_add' := fun c c' => by + ext i + change ((S.weight s i)⁻¹ : ℂ) * (c + c') i = + ((S.weight s i)⁻¹ : ℂ) * c i + ((S.weight s i)⁻¹ : ℂ) * c' i + rw [lp.coeFn_add, Pi.add_apply, mul_add] + map_smul' := fun a c => by + ext i + change ((S.weight s i)⁻¹ : ℂ) * (a • c) i = a * (((S.weight s i)⁻¹ : ℂ) * c i) + rw [lp.coeFn_smul, Pi.smul_apply, smul_eq_mul] + ring } + 1 fun c => by + rw [one_mul] + refine lp.norm_mono (by norm_num) fun i => ?_ + change ‖((S.weight s i)⁻¹ : ℂ) * c i‖ ≤ ‖c i‖ + rw [norm_mul, S.norm_ofReal_inv_weight] + exact mul_le_of_le_one_left (norm_nonneg _) (inv_le_one_of_one_le₀ (S.one_le_weight hs i)) + +/-- The diagonal operator multiplies the `i`-th coordinate by `(1 + λ(i))^(-s)`. -/ +theorem diagInvWeight_apply (s : ℝ) (hs : 0 ≤ s) (c : ℓ²(ι, ℂ)) (i : ι) : + S.diagInvWeight s hs c i = ((S.weight s i)⁻¹ : ℂ) * c i := rfl + +/-- The **Sobolev embedding** `J_s c = ∑_i (1 + lvl i)^(-s) c_i e_i` of `ℓ²` into `H`; its +range is the Sobolev space of order `s`. -/ +noncomputable def sobolevEmbed (s : ℝ) (hs : 0 ≤ s) : ℓ²(ι, ℂ) →L[ℂ] H := + (S.basis.repr.symm.toLinearIsometry.toContinuousLinearMap).comp (S.diagInvWeight s hs) + +/-- The coefficients of `J_s c` are `(1 + λ(i))^(-s) c_i`. -/ +theorem repr_sobolevEmbed (s : ℝ) (hs : 0 ≤ s) (c : ℓ²(ι, ℂ)) (i : ι) : + S.basis.repr (S.sobolevEmbed s hs c) i = ((S.weight s i)⁻¹ : ℂ) * c i := by + change S.basis.repr (S.basis.repr.symm (S.diagInvWeight s hs c)) i = _ + rw [LinearIsometryEquiv.apply_symm_apply, diagInvWeight_apply] + +/-- `J_s` is injective. -/ +theorem sobolevEmbed_injective (s : ℝ) (hs : 0 ≤ s) : + Function.Injective (S.sobolevEmbed s hs) := fun c c' h => by + ext i + have := congrArg (fun f => S.basis.repr f i) h + simp only [repr_sobolevEmbed] at this + exact mul_left_cancel₀ (inv_ne_zero (S.ofReal_weight_ne_zero s i)) (by simpa using this) + +/-- An element of `ℓ²` with prescribed weighted coefficients is mapped to `f`. -/ +theorem sobolevEmbed_weighted (s : ℝ) (hs : 0 ≤ s) {f : H} + (h : Memℓp (fun i => (S.weight s i : ℂ) * S.basis.repr f i) 2) : + S.sobolevEmbed s hs ⟨_, h⟩ = f := by + refine S.basis.repr.injective (lp.ext (funext fun i => ?_)) + rw [repr_sobolevEmbed] + change ((S.weight s i)⁻¹ : ℂ) * ((S.weight s i : ℂ) * S.basis.repr f i) = S.basis.repr f i + rw [← mul_assoc, inv_mul_cancel₀ (S.ofReal_weight_ne_zero s i), one_mul] + +/-- **The Sobolev space as a set**: `f = J_s c` for some `c ∈ ℓ²` exactly when +`∑_i (1 + lvl i)^(2s) |⟨e_i, f⟩|² < ∞`. -/ +theorem mem_range_sobolevEmbed_iff (s : ℝ) (hs : 0 ≤ s) (f : H) : + f ∈ Set.range (S.sobolevEmbed s hs) ↔ + Memℓp (fun i => (S.weight s i : ℂ) * S.basis.repr f i) 2 := by + constructor + · rintro ⟨c, rfl⟩ + convert lp.memℓp c using 1 + funext i + rw [repr_sobolevEmbed, ← mul_assoc, mul_inv_cancel₀ (S.ofReal_weight_ne_zero s i), one_mul] + · intro h + exact ⟨⟨_, h⟩, S.sobolevEmbed_weighted s hs h⟩ + +/-- **The truncation error of a Sobolev element**: `‖J_s c - P_n J_s c‖ ≤ n^(-s) ‖c‖` for +`n ≥ 1`, by Parseval's identity, since only the coefficients of level `≥ n` remain and +`(1 + lvl i)^(-s) ≤ n^(-s)` there. -/ +theorem norm_sub_truncate_le (s : ℝ) (hs : 0 ≤ s) {n : ℕ} (hn : 1 ≤ n) (c : ℓ²(ι, ℂ)) : + ‖S.sobolevEmbed s hs c - S.truncate n (S.sobolevEmbed s hs c)‖ ≤ (n : ℝ) ^ (-s) * ‖c‖ := by + set f := S.sobolevEmbed s hs c + rw [← S.basis.repr.norm_map] + calc ‖S.basis.repr (f - S.truncate n f)‖ ≤ ‖(((n : ℝ) ^ (-s) : ℝ) : ℂ) • c‖ := by + refine lp.norm_mono (by norm_num) fun i => ?_ + rw [repr_sub_truncate, lp.coeFn_smul, Pi.smul_apply, smul_eq_mul] + split_ifs with hi + · simp only [norm_zero]; positivity + · rw [repr_sobolevEmbed, norm_mul, norm_mul, S.norm_ofReal_inv_weight, Complex.norm_real, + Real.norm_eq_abs, abs_of_pos (by positivity)] + gcongr + exact S.inv_weight_le hs hn (not_lt.1 hi) + _ = (n : ℝ) ^ (-s) * ‖c‖ := by + rw [norm_smul, Complex.norm_real, Real.norm_eq_abs, abs_of_pos (by positivity)] + +/-- **Jackson's inequality** for the Sobolev space: `E_n(J_s c) ≤ n^(-s) ‖c‖`, with the +truncation as approximant (`SpectralScheme.norm_sub_truncate_le`). -/ +theorem jacksonBound (s : ℝ) (hs : 0 ≤ s) : + ApproximationScheme.JacksonBound ((S.sobolevEmbed s hs).restrictScalars ℝ) S.toScheme s 1 := by + intro n hn c + refine (ENNReal.toReal_mono eNorm_ne_top (ApproximationScheme.approxError_le_of_mem + (S.truncate_mem_span n (S.sobolevEmbed s hs c)) _)).trans ?_ + rw [toReal_eNorm, one_mul] + exact S.norm_sub_truncate_le s hs hn c + +/-- **Bernstein's inequality** for the Sobolev space: every `a ∈ A n` is `J_s c` with +`‖c‖ ≤ n^s ‖a‖`. -/ +theorem liftBound (s : ℝ) (hs : 0 ≤ s) : + ApproximationScheme.LiftBound ((S.sobolevEmbed s hs).restrictScalars ℝ) S.toScheme s 1 := by + intro n hn a ha + have hle : ∀ i, ‖(S.weight s i : ℂ) * S.basis.repr a i‖ ≤ + (n : ℝ) ^ s * ‖S.basis.repr a i‖ := fun i => by + rw [norm_mul, S.norm_ofReal_weight] + by_cases hi : S.level i < n + · gcongr; exact S.weight_le hs hi + · rw [S.repr_eq_zero_of_mem_span ha (not_lt.1 hi)]; simp + have hmem : Memℓp (fun i => (S.weight s i : ℂ) * S.basis.repr a i) 2 := + (((lp.memℓp (S.basis.repr a)).norm).const_mul ((n : ℝ) ^ s)).mono hle + refine ⟨⟨_, hmem⟩, S.sobolevEmbed_weighted s hs hmem, ?_⟩ + rw [one_mul, ← S.basis.repr.norm_map] + calc ‖(⟨_, hmem⟩ : ℓ²(ι, ℂ))‖ ≤ ‖(((n : ℝ) ^ s : ℝ) : ℂ) • S.basis.repr a‖ := by + refine lp.norm_mono (by norm_num) fun i => ?_ + change ‖(S.weight s i : ℂ) * S.basis.repr a i‖ ≤ + ‖((((n : ℝ) ^ s : ℝ) : ℂ) • S.basis.repr a) i‖ + have hn0 : (0 : ℝ) < (n : ℝ) ^ s := Real.rpow_pos_of_pos (by exact_mod_cast hn) s + rw [lp.coeFn_smul, Pi.smul_apply, smul_eq_mul, norm_mul (((n : ℝ) ^ s : ℝ) : ℂ), + Complex.norm_real, Real.norm_eq_abs, abs_of_pos hn0] + exact hle i + _ = (n : ℝ) ^ s * ‖S.basis.repr a‖ := by + rw [norm_smul, Complex.norm_real, Real.norm_eq_abs, abs_of_pos (by positivity)] + +/-- **The Sobolev space of order `s > 0` is a smoothness space** for the spectral scheme, with +Jackson and Bernstein constants `1`. -/ +noncomputable def toSmoothnessSpace (s : ℝ) (hs : 0 < s) : + ApproximationScheme.SmoothnessSpace S.toScheme ℓ²(ι, ℂ) where + incl := (S.sobolevEmbed s hs.le).restrictScalars ℝ + injective := S.sobolevEmbed_injective s hs.le + order := s + order_pos := hs + jacksonConst := 1 + jacksonConst_nonneg := zero_le_one + bernsteinConst := 1 + bernsteinConst_nonneg := zero_le_one + jackson := S.jacksonBound s hs.le + bernstein := S.liftBound s hs.le + +end SpectralScheme diff --git a/LeanPool/FunctionSpaces/MeasureSpaces/Spectral/Blocks.lean b/LeanPool/FunctionSpaces/MeasureSpaces/Spectral/Blocks.lean new file mode 100644 index 0000000000..54ecd59c78 --- /dev/null +++ b/LeanPool/FunctionSpaces/MeasureSpaces/Spectral/Blocks.lean @@ -0,0 +1,259 @@ +/- +Copyright (c) 2026 Mario Ullrich. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Mario Ullrich +-/ +module + +public import LeanPool.FunctionSpaces.MeasureSpaces.Spectral.Basic +public import LeanPool.FunctionSpaces.ApproximationSpaces.Decompositions.Projection + +/- +Modified for Lean Pool: module names and imports adapted. +-/ + +/-! +# Coefficient characterisation of Besov spaces for spectral schemes + +For a spectral scheme `(e_i, lvl)` in a Hilbert space `H`, the truncation +`P n f = ∑_{lvl i < n} ⟨e_i, f⟩ e_i` is the orthogonal projection onto the approximants, so +the scheme is a projection scheme with bound `1` (`SpectralScheme.projectionScheme`), and the +union of the approximants is dense. The dyadic block + +`Δ_k f = P (2^(k+1)) f - P (2^k) f = ∑_{2^k ≤ lvl i < 2^(k+1)} ⟨e_i, f⟩ e_i` + +has `‖Δ_k f‖² = ∑_{2^k ≤ lvl i < 2^(k+1)} |⟨e_i, f⟩|²`. The general block characterisation +of `ApproximationSpaces.Decompositions.Projection` then gives, for `s > 0`: + +* **the coefficient characterisation of `A^s_q`** (`memApprox_iff_blockNorm_lt_top`): + `f ∈ A^s_q` iff `(2^(ks) (∑_{2^k ≤ lvl i < 2^(k+1)} |⟨e_i, f⟩|²)^(1/2))_k ∈ ℓ_q`; on the + torus with the Fourier basis this is the Littlewood–Paley description of `B^s_{2,q}` with + sharp dyadic cut-offs; +* **`H^s = A^s_2`** (`memApprox_two_iff`): the Sobolev space of order `s` is the approximation + space with fine index `2`, i.e. `H^s = B^s_{2,2}`. +-/ + +@[expose] public section + +open Filter Topology Finset +open scoped ENNReal InnerProductSpace lp + +namespace SpectralScheme + +open ApproximationScheme ENNReal + +variable {ι H : Type*} [NormedAddCommGroup H] [InnerProductSpace ℂ H] (S : SpectralScheme ι H) + +/-- Truncation is additive. -/ +theorem truncate_add (n : ℕ) (f g : H) : S.truncate n (f + g) = S.truncate n f + S.truncate n g := +by + simp only [truncate, map_add, lp.coeFn_add, Pi.add_apply, add_smul, Finset.sum_add_distrib] + +/-- Truncation is homogeneous. -/ +theorem truncate_smul (n : ℕ) (c : ℂ) (f : H) : S.truncate n (c • f) = c • S.truncate n f := by + simp only [truncate, map_smul, lp.coeFn_smul, Pi.smul_apply, smul_eq_mul, mul_smul, + Finset.smul_sum] + +/-- Truncation does not increase the norm, by Bessel's inequality. -/ +theorem norm_truncate_le (n : ℕ) (f : H) : ‖S.truncate n f‖ ≤ ‖f‖ := by + rw [← S.basis.repr.norm_map, ← S.basis.repr.norm_map f] + refine lp.norm_mono (by norm_num) fun i => ?_ + rw [repr_truncate] + split_ifs <;> simp + +/-- The truncation as a bounded linear operator of norm at most `1`. -/ +noncomputable def truncateCLM (n : ℕ) : H →L[ℂ] H := + LinearMap.mkContinuous + { toFun := S.truncate n + map_add' := S.truncate_add n + map_smul' := S.truncate_smul n } + 1 fun f => by rw [one_mul]; exact S.norm_truncate_le n f + +/-- The bounded linear truncation is the truncation. -/ +theorem truncateCLM_apply (n : ℕ) (f : H) : S.truncateCLM n f = S.truncate n f := rfl + +/-- The truncation fixes the approximants. -/ +theorem truncate_of_mem {n : ℕ} {a : H} (ha : a ∈ S.span n) : S.truncate n a = a := by + refine S.basis.repr.injective (lp.ext (funext fun i => ?_)) + rw [repr_truncate] + split_ifs with hi + · rfl + · exact (S.repr_eq_zero_of_mem_span ha (not_lt.1 hi)).symm + +/-- **The spectral scheme as a projection scheme**, with the truncations as projections of +norm at most `1`. -/ +noncomputable def projectionScheme : S.toScheme.ProjectionScheme where + P n := (S.truncateCLM n).restrictScalars ℝ + mem n f := S.truncate_mem_span n f + proj n a ha := S.truncate_of_mem ha + bound := 1 + norm_le n := by + rw [ContinuousLinearMap.norm_restrictScalars] + exact LinearMap.mkContinuous_norm_le _ zero_le_one _ + +/-- The projections of the spectral projection scheme are the truncations. -/ +theorem projectionScheme_P (n : ℕ) (f : H) : S.projectionScheme.P n f = S.truncate n f := rfl + +/-- The approximants of all complexities span the span of the basis. -/ +theorem iUnion_span : (⋃ n, (S.span n : Set H)) = Submodule.span ℂ (Set.range S.basis) := by + apply le_antisymm + · exact Set.iUnion_subset fun n => Submodule.span_mono (Set.image_subset_range _ _) + · have hdir : Directed (· ≤ ·) S.span := S.span_mono.directed_le + have h : Submodule.span ℂ (Set.range S.basis) ≤ ⨆ n, S.span n := by + rw [Submodule.span_le] + rintro _ ⟨i, rfl⟩ + exact Submodule.mem_iSup_of_mem (S.level i + 1) + (Submodule.subset_span ⟨i, Nat.lt_succ_self _, rfl⟩) + intro x hx + have := h hx + rw [Submodule.mem_iSup_of_directed _ hdir] at this + exact Set.mem_iUnion.2 this + +/-- The union of the approximants is dense. -/ +theorem closure_iUnion_toScheme [CompleteSpace H] : closure (⋃ n, S.toScheme n) = Set.univ := by + have h : (⋃ n, S.toScheme n) = (Submodule.span ℂ (Set.range S.basis) : Set H) := S.iUnion_span + rw [h, ← Submodule.topologicalClosure_coe, S.basis.dense_span, Submodule.top_coe] + +/-- The coefficients of a dyadic block are those of `f` with `2^k ≤ lvl i < 2^(k+1)`. -/ +theorem repr_block (k : ℕ) (f : H) (i : ι) : + S.basis.repr (S.projectionScheme.block k f) i = + if 2 ^ k ≤ S.level i ∧ S.level i < 2 ^ (k + 1) then S.basis.repr f i else 0 := by + rw [ProjectionScheme.block, S.projectionScheme_P, S.projectionScheme_P, map_sub, lp.coeFn_sub, + Pi.sub_apply, repr_truncate, repr_truncate] + by_cases h1 : S.level i < 2 ^ k + · have h2 : S.level i < 2 ^ (k + 1) := h1.trans (Nat.pow_lt_pow_right one_lt_two + (Nat.lt_succ_self k)) + simp [h1, h2, not_le.2 h1] + · by_cases h2 : S.level i < 2 ^ (k + 1) + · simp [h1, h2, not_lt.1 h1] + · simp [h1, h2] + +/-- `‖Δ_k f‖² = ∑_{2^k ≤ lvl i < 2^(k+1)} |⟨e_i, f⟩|²`. -/ +theorem enorm_block_sq (k : ℕ) (f : H) : + ‖S.projectionScheme.block k f‖ₑ ^ 2 = ∑' i, + if 2 ^ k ≤ S.level i ∧ S.level i < 2 ^ (k + 1) then ‖S.basis.repr f i‖ₑ ^ 2 else 0 := by + rw [← S.basis.repr.eNorm_map, lp.enorm_sq_eq_tsum] + congr 1; funext i + rw [repr_block] + split_ifs <;> simp + +/-- **Coefficient characterisation of `A^s_q`** for a spectral scheme in a Hilbert space: for +`s > 0`, `f ∈ A^s_q` iff `‖P 1 f‖ + ‖(2^(ks) ‖Δ_k f‖)_k‖_q < ∞`, where +`‖Δ_k f‖² = ∑_{2^k ≤ lvl i < 2^(k+1)} |⟨e_i, f⟩|²` (`enorm_block_sq`). -/ +theorem memApprox_iff_blockNorm_lt_top [CompleteSpace H] {s : ℝ} (hs : 0 < s) {q : ℝ≥0∞} + (hq : 1 ≤ q) {f : H} : S.toScheme.MemApprox s q f ↔ S.projectionScheme.blockNorm s q f < ∞ := + S.projectionScheme.memApprox_iff_blockNorm_lt_top S.closure_iUnion_toScheme hs hq + +/-- Membership in `ℓ²` through the series of squares in `ℝ≥0∞`. -/ +theorem mem_l2_iff (g : ι → ℂ) : Memℓp g 2 ↔ ∑' i, ‖g i‖ₑ ^ 2 ≠ ∞ := by + rw [memℓp_gen_iff (by norm_num : 0 < (2 : ℝ≥0∞).toReal)] + have h : ∀ i, ‖g i‖ₑ ^ 2 = ((‖g i‖₊ ^ 2 : NNReal) : ℝ≥0∞) := fun i => by + rw [ENNReal.coe_pow]; rfl + simp_rw [h, ENNReal.tsum_coe_ne_top_iff_summable_coe] + simp + +/-- The squared Sobolev weight `(1 + lvl i)^(2s)` in `ℝ≥0∞`. -/ +theorem enorm_weight_mul_sq (s : ℝ) (i : ι) (z : ℂ) : + ‖(S.weight s i : ℂ) * z‖ₑ ^ 2 = ((1 + S.level i : ℕ) : ℝ≥0∞) ^ (2 * s) * ‖z‖ₑ ^ 2 := by + rw [eNorm_mul, mul_pow, ← ofReal_norm, S.norm_ofReal_weight, weight, + ← ENNReal.ofReal_rpow_of_pos (by positivity), ENNReal.ofReal_natCast, ← ENNReal.rpow_natCast, + ← ENNReal.rpow_mul] + congr 2 + push_cast; ring + +/-- The dyadic block containing a level `m ≥ 1` is the one with `k = ⌊log₂ m⌋`. -/ +theorem tsum_ite_block_eq (s : ℝ) (m : ℕ) : + (∑' k : ℕ, if 2 ^ k ≤ m ∧ m < 2 ^ (k + 1) then dyadicWeight (2 * s) k else 0) = + if m = 0 then 0 else dyadicWeight (2 * s) (Nat.log 2 m) := by + rcases Nat.eq_zero_or_pos m with rfl | hm + · simp + have hk0 : 2 ^ Nat.log 2 m ≤ m ∧ m < 2 ^ (Nat.log 2 m + 1) := + ⟨Nat.pow_log_le_self 2 hm.ne', Nat.lt_pow_succ_log_self Nat.one_lt_two m⟩ + rw [tsum_eq_single (Nat.log 2 m) fun k hk => ite_eq_right_iff.2 fun h => + absurd (Nat.log_eq_of_pow_le_of_lt_pow h.1 h.2).symm hk] + simp [hk0, hm.ne'] + +/-- **`H^s = B^s_{2,2}`** for a spectral scheme: for `s > 0`, `f ∈ A^s_2` if and only if +`∑_i (1 + lvl i)^(2s) |⟨e_i, f⟩|² < ∞`, i.e. `f` lies in the Sobolev space of order `s`. -/ +theorem memApprox_two_iff [CompleteSpace H] {s : ℝ} (hs : 0 < s) (f : H) : + S.toScheme.MemApprox s 2 f ↔ Memℓp (fun i => (S.weight s i : ℂ) * S.basis.repr f i) 2 := by + set e : ι → ℝ≥0∞ := fun i => ‖S.basis.repr f i‖ₑ ^ 2 + set Wt : ι → ℝ≥0∞ := fun i => ((1 + S.level i : ℕ) : ℝ≥0∞) ^ (2 * s) + set blk : ℕ → ι → Prop := fun k i => 2 ^ k ≤ S.level i ∧ S.level i < 2 ^ (k + 1) + set B : ℝ≥0∞ := ∑' k, dyadicWeight (2 * s) k * ‖S.projectionScheme.block k f‖ₑ ^ 2 + set T : ℝ≥0∞ := ∑' i, Wt i * e i + -- the block sum as a sum over the coefficients + have hB : B = ∑' i, (∑' k : ℕ, if blk k i then dyadicWeight (2 * s) k else 0) * e i := by + simp only [B, enorm_block_sq] + simp_rw [← ENNReal.tsum_mul_left] + rw [tsum_comm] + congr 1; funext i + rw [← ENNReal.tsum_mul_right] + congr 1; funext k + simp only [blk, e] + split_ifs <;> simp + -- the block weight against the Sobolev weight + have hle : ∀ i, (∑' k : ℕ, if blk k i then dyadicWeight (2 * s) k else 0) ≤ Wt i := fun i => by + simp only [blk, Wt] + rw [tsum_ite_block_eq] + split_ifs with h0 + · exact bot_le + · rw [← ENNReal.natCast_two_pow_rpow] + gcongr + exact (Nat.pow_log_le_self 2 h0).trans (Nat.le_add_left _ _) + have hge : ∀ i, Wt i ≤ (if S.level i = 0 then 1 else 0) + + 2 ^ (2 * s) * ∑' k : ℕ, if blk k i then dyadicWeight (2 * s) k else 0 := fun i => by + simp only [blk, Wt] + rw [tsum_ite_block_eq] + split_ifs with h0 + · simp [h0] + · rw [zero_add] + calc ((1 + S.level i : ℕ) : ℝ≥0∞) ^ (2 * s) + ≤ ((2 ^ (Nat.log 2 (S.level i) + 1) : ℕ) : ℝ≥0∞) ^ (2 * s) := by + gcongr + have := Nat.lt_pow_succ_log_self Nat.one_lt_two (S.level i) + omega + _ = 2 ^ (2 * s) * dyadicWeight (2 * s) (Nat.log 2 (S.level i)) := by + rw [ENNReal.natCast_two_pow_rpow, ENNReal.dyadicWeight_succ] + have hBT : B ≤ T := by + rw [hB]; exact tsum_le_tsum fun i => by gcongr; exact hle i + have hTB : T ≤ ‖f‖ₑ ^ 2 + 2 ^ (2 * s) * B := by + calc T ≤ ∑' i, ((if S.level i = 0 then 1 else 0) * e i + + 2 ^ (2 * s) * ((∑' k : ℕ, if blk k i then dyadicWeight (2 * s) k else 0) * e i)) := + tsum_le_tsum fun i => by + calc Wt i * e i ≤ ((if S.level i = 0 then 1 else 0) + + 2 ^ (2 * s) * ∑' k : ℕ, if blk k i then dyadicWeight (2 * s) k else 0) * e i := by + gcongr; exact hge i + _ = _ := by ring + _ = ∑' i, (if S.level i = 0 then 1 else 0) * e i + 2 ^ (2 * s) * B := by + rw [tsum_add, ENNReal.tsum_mul_left, hB] + _ ≤ ‖f‖ₑ ^ 2 + 2 ^ (2 * s) * B := by + gcongr + calc ∑' i, (if S.level i = 0 then 1 else 0) * e i ≤ ∑' i, e i := + tsum_le_tsum fun i => by split_ifs <;> simp + _ = ‖f‖ₑ ^ 2 := by rw [← S.basis.repr.eNorm_map, lp.enorm_sq_eq_tsum] + -- the block norm is finite iff `B` is + have hblk : S.projectionScheme.blockNorm s 2 f < ∞ ↔ B ≠ ∞ := by + rw [ProjectionScheme.blockNorm, ENNReal.add_lt_top, and_iff_right eNorm_lt_top] + have h2 := lqNorm_rpow (q := 2) (by norm_num) (by norm_num) + (fun k => dyadicWeight s k * ‖S.projectionScheme.block k f‖ₑ) + have hB' : (∑' k, (dyadicWeight s k * ‖S.projectionScheme.block k f‖ₑ) ^ (2 : ℝ≥0∞).toReal) = + B := by + simp only [B, ENNReal.toReal_ofNat] + congr 1; funext k + rw [ENNReal.mul_rpow_of_nonneg _ _ (by norm_num), ENNReal.dyadicWeight_rpow, mul_comm s, + ENNReal.rpow_two] + rw [hB'] at h2 + rw [← h2, ← lt_top_iff_ne_top, ENNReal.rpow_lt_top_iff_of_pos (by norm_num)] + rw [memApprox_iff_blockNorm_lt_top S hs one_le_two, hblk, mem_l2_iff] + simp_rw [S.enorm_weight_mul_sq] + change B ≠ ∞ ↔ T ≠ ∞ + constructor + · intro h + exact ne_top_of_le_ne_top (ENNReal.add_ne_top.2 ⟨ENNReal.pow_ne_top eNorm_ne_top, + ENNReal.mul_ne_top (ENNReal.two_rpow_ne_top _) h⟩) + hTB + · intro h + exact ne_top_of_le_ne_top h hBT + +end SpectralScheme diff --git a/LeanPool/FunctionSpaces/MeasureSpaces/Spectral/CompactEigenbasis.lean b/LeanPool/FunctionSpaces/MeasureSpaces/Spectral/CompactEigenbasis.lean new file mode 100644 index 0000000000..7981570e6f --- /dev/null +++ b/LeanPool/FunctionSpaces/MeasureSpaces/Spectral/CompactEigenbasis.lean @@ -0,0 +1,216 @@ +/- +Copyright (c) 2026 Mario Ullrich. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Mario Ullrich +-/ +module + +public import Mathlib.Analysis.InnerProductSpace.Spectrum +public import Mathlib.Analysis.InnerProductSpace.l2Space +public import Mathlib.LinearAlgebra.Eigenspace.ContinuousLinearMap +public import TauCeti.Analysis.InnerProductSpace.Spectrum + +/- +Modified for Lean Pool: module names and imports adapted. +-/ + +/-! +# Hilbert bases of eigenvectors of compact self-adjoint operators + +Mathlib's spectral theorem for a compact self-adjoint operator `T` on a Hilbert space `E` says +that the orthogonal complement of the sum of all eigenspaces of `T` is `{0}` +(`ContinuousLinearMap.orthogonalComplement_iSup_eigenspaces_eq_bot`). This file turns it into +a **Hilbert basis of eigenvectors**. + +Each eigenspace is closed, hence a Hilbert space. For every choice of Hilbert bases of the +eigenspaces, the family indexed by the pairs `⟨μ, j⟩` of a scalar `μ` and an index `j` of the +basis of the eigenspace of `μ` is a Hilbert basis of `E` +(`ContinuousLinearMap.hilbertBasisOfEigenspaces`), so the eigenvalue of `⟨μ, j⟩` is `μ` itself: +the eigenspaces are mutually orthogonal, so the union of their bases is orthonormal, and a vector +orthogonal to all of it is orthogonal to every eigenspace, hence zero. No separability is +assumed. For injective `T` the eigenspace of `0` has an empty basis +(`ContinuousLinearMap.isEmpty_hilbertBasis_eigenspace_zero`). The chosen bases +`ContinuousLinearMap.eigenspaceBasis` give the basis `ContinuousLinearMap.eigenHilbertBasis` +with the index `ContinuousLinearMap.eigenIndex`. + +The construction follows the proof of +`ContinuousLinearMap.exists_hilbertBasis_forall_hasEigenvector_of_dense_eigenspaces` in TauCeti +(`TauCeti/Analysis/InnerProductSpace/Spectrum.lean`), turned into definitions. The helper +`HilbertBasis.inner_eq_zero_of_forall_inner_eq_zero` (TauCeti +`Analysis/InnerProductSpace/HilbertBasis/Basic.lean`) is imported, along with +`ContinuousLinearMap.exists_hilbertBasis_forall_hasEigenvector_ne_zero` from `Spectrum.lean`. +Both were available at commit `463ab293` under Apache-2.0. +-/ + +@[expose] public section + +open Module.End +open scoped InnerProductSpace + +variable {𝕜 E : Type*} [RCLike 𝕜] [NormedAddCommGroup E] [InnerProductSpace 𝕜 E] + +namespace ContinuousLinearMap + +variable [CompleteSpace E] (T : E →L[𝕜] E) + +/-- An eigenspace of a bounded operator on a Hilbert space is complete, since it is closed. -/ +instance completeSpace_eigenspace (μ : 𝕜) : + CompleteSpace (eigenspace (T : Module.End 𝕜 E) μ) := + (isClosed_eigenspace T μ).completeSpace_coe + +/-- The index set of the chosen Hilbert basis of the eigenspace of `μ`: a set of vectors of the +eigenspace, as in Mathlib's `exists_hilbertBasis`. -/ +noncomputable def eigenspaceIndex (μ : 𝕜) : Set (eigenspace (T : Module.End 𝕜 E) μ) := + (exists_hilbertBasis 𝕜 (eigenspace (T : Module.End 𝕜 E) μ)).choose + +/-- A chosen Hilbert basis of the eigenspace of `μ` (the empty family if `μ` is no +eigenvalue). -/ +noncomputable def eigenspaceBasis (μ : 𝕜) : + HilbertBasis (T.eigenspaceIndex μ) 𝕜 (eigenspace (T : Module.End 𝕜 E) μ) := + (exists_hilbertBasis 𝕜 (eigenspace (T : Module.End 𝕜 E) μ)).choose_spec.choose + +/-- The index set of the eigenvector basis: pairs `⟨μ, j⟩` of a scalar `μ` and an index `j` of +the Hilbert basis of the eigenspace of `μ`. -/ +abbrev eigenIndex : Type _ := Σ μ : 𝕜, T.eigenspaceIndex μ + +/-- The eigenvector with index `⟨μ, j⟩`: the `j`-th vector of the basis of the eigenspace of +`μ`, as a vector of `E`. -/ +noncomputable def eigenvector (i : T.eigenIndex) : E := (T.eigenspaceBasis i.1 i.2 : E) + +/-- The eigenvector with index `⟨μ, j⟩` lies in the eigenspace of `μ`. -/ +theorem eigenvector_mem (i : T.eigenIndex) : + T.eigenvector i ∈ eigenspace (T : Module.End 𝕜 E) i.1 := + (T.eigenspaceBasis i.1 i.2).2 + +/-- `T e_{⟨μ, j⟩} = μ e_{⟨μ, j⟩}`. -/ +theorem apply_eigenvector (i : T.eigenIndex) : T (T.eigenvector i) = i.1 • T.eigenvector i := + mem_eigenspace_iff.1 (T.eigenvector_mem i) + +/-- The eigenvectors are unit vectors. -/ +theorem norm_eigenvector (i : T.eigenIndex) : ‖T.eigenvector i‖ = 1 := + (T.eigenspaceBasis i.1).orthonormal.1 i.2 + +/-- The eigenvector with index `⟨μ, j⟩` is an eigenvector of `T` for the eigenvalue `μ`. -/ +theorem hasEigenvector_eigenvector (i : T.eigenIndex) : + HasEigenvector (T : Module.End 𝕜 E) i.1 (T.eigenvector i) := + ⟨T.eigenvector_mem i, fun h => by simpa [h] using T.norm_eigenvector i⟩ + +variable {T} + +/-! ### Arbitrary Hilbert bases of the eigenspaces -/ + +omit [CompleteSpace E] in +/-- **For injective `T` the eigenspace of `0` has an empty Hilbert basis**: the eigenspace of `0` +is the kernel, which is `{0}`, while the members of a Hilbert basis are unit vectors. -/ +theorem isEmpty_hilbertBasis_eigenspace_zero (hker : LinearMap.ker (T : E →ₗ[𝕜] E) = ⊥) + {ι : Type*} (b : HilbertBasis ι 𝕜 (eigenspace (T : Module.End 𝕜 E) 0)) : IsEmpty ι := by + refine ⟨fun j => ?_⟩ + have h0 : T (b j : E) = 0 := by simpa using mem_eigenspace_iff.1 (b j).2 + have hmem : (b j : E) ∈ LinearMap.ker (T : E →ₗ[𝕜] E) := h0 + rw [hker, Submodule.mem_bot] at hmem + have h1 : ‖(b j : E)‖ = 1 := b.orthonormal.1 j + rw [hmem, norm_zero] at h1 + exact zero_ne_one h1 + +omit [CompleteSpace E] in +/-- For every choice of Hilbert bases `(b μ)` of the eigenspaces of a symmetric operator, the +family of all their vectors, indexed by the pairs `⟨μ, j⟩`, is orthonormal: each `b μ` is +orthonormal and the eigenspaces are mutually orthogonal. -/ +theorem orthonormal_sigma_eigenspaces (hT : (T : E →ₗ[𝕜] E).IsSymmetric) {w : 𝕜 → Type*} + (b : ∀ μ, HilbertBasis (w μ) 𝕜 (eigenspace (T : Module.End 𝕜 E) μ)) : + Orthonormal 𝕜 (fun i : Σ μ, w μ => (b i.1 i.2 : E)) := + hT.orthogonalFamily_eigenspaces.orthonormal_sigma_orthonormal fun μ => (b μ).orthonormal + +omit [CompleteSpace E] in +/-- If the orthogonal complement of the sum of all eigenspaces is `{0}`, then for every choice of +Hilbert bases `(b μ)` of the eigenspaces the orthogonal complement of the span of all their +vectors is `{0}`: a vector orthogonal to every `b μ j` is orthogonal to every eigenspace +(`HilbertBasis.inner_eq_zero_of_forall_inner_eq_zero`). -/ +theorem orthogonal_span_sigma_eigenspaces_eq_bot + (hspan : (⨆ μ, eigenspace (T : Module.End 𝕜 E) μ)ᗮ = ⊥) {w : 𝕜 → Type*} + (b : ∀ μ, HilbertBasis (w μ) 𝕜 (eigenspace (T : Module.End 𝕜 E) μ)) : + (Submodule.span 𝕜 (Set.range fun i : Σ μ, w μ => (b i.1 i.2 : E)))ᗮ = ⊥ := by + refine le_antisymm ?_ bot_le + rw [← hspan, ← Submodule.iInf_orthogonal] + intro x hx + have hx' : ∀ i : Σ μ, w μ, ⟪x, (b i.1 i.2 : E)⟫_𝕜 = 0 := fun i => + (Submodule.mem_orthogonal' _ x).mp hx _ (Submodule.subset_span ⟨i, rfl⟩) + simp only [Submodule.mem_iInf] + intro μ + rw [Submodule.mem_orthogonal'] + exact fun y hy => (b μ).inner_eq_zero_of_forall_inner_eq_zero (fun j => hx' ⟨μ, j⟩) hy + +/-- **The Hilbert basis of eigenvectors** of a symmetric operator such that the orthogonal +complement of the sum of all eigenspaces is `{0}`, for a given choice of Hilbert bases `(b μ)` of +the eigenspaces: the family of all vectors of all `b μ`, indexed by the pairs `⟨μ, j⟩`. For a +compact self-adjoint operator the hypothesis is Mathlib's spectral theorem +`ContinuousLinearMap.orthogonalComplement_iSup_eigenspaces_eq_bot`. The construction follows the +proof of `ContinuousLinearMap.exists_hilbertBasis_forall_hasEigenvector_of_dense_eigenspaces` in +TauCeti (`TauCeti/Analysis/InnerProductSpace/Spectrum.lean`, commit `463ab293`, Apache-2.0); +unlike Brezis 2011, Theorem 6.11, no separability is assumed. -/ +noncomputable def hilbertBasisOfEigenspaces (hT : (T : E →ₗ[𝕜] E).IsSymmetric) + {w : 𝕜 → Type*} (b : ∀ μ, HilbertBasis (w μ) 𝕜 (eigenspace (T : Module.End 𝕜 E) μ)) + (hspan : (⨆ μ, eigenspace (T : Module.End 𝕜 E) μ)ᗮ = ⊥) : HilbertBasis (Σ μ, w μ) 𝕜 E := + HilbertBasis.mkOfOrthogonalEqBot (orthonormal_sigma_eigenspaces hT b) + (orthogonal_span_sigma_eigenspaces_eq_bot hspan b) + +/-- The vector of `hilbertBasisOfEigenspaces` with index `⟨μ, j⟩` is the `j`-th vector of the +basis `b μ` of the eigenspace of `μ`. -/ +@[simp] +theorem coe_hilbertBasisOfEigenspaces (hT : (T : E →ₗ[𝕜] E).IsSymmetric) {w : 𝕜 → Type*} + (b : ∀ μ, HilbertBasis (w μ) 𝕜 (eigenspace (T : Module.End 𝕜 E) μ)) + (hspan : (⨆ μ, eigenspace (T : Module.End 𝕜 E) μ)ᗮ = ⊥) : + ⇑(hilbertBasisOfEigenspaces hT b hspan) = fun i => (b i.1 i.2 : E) := + HilbertBasis.coe_mkOfOrthogonalEqBot _ _ + +/-- The vector of `hilbertBasisOfEigenspaces` with index `⟨μ, j⟩` is an eigenvector for `μ`: +`T e_{⟨μ, j⟩} = μ e_{⟨μ, j⟩}`. -/ +theorem apply_hilbertBasisOfEigenspaces (hT : (T : E →ₗ[𝕜] E).IsSymmetric) {w : 𝕜 → Type*} + (b : ∀ μ, HilbertBasis (w μ) 𝕜 (eigenspace (T : Module.End 𝕜 E) μ)) + (hspan : (⨆ μ, eigenspace (T : Module.End 𝕜 E) μ)ᗮ = ⊥) (i : Σ μ, w μ) : + T (hilbertBasisOfEigenspaces hT b hspan i) = i.1 • hilbertBasisOfEigenspaces hT b hspan i := by + rw [coe_hilbertBasisOfEigenspaces] + exact mem_eigenspace_iff.1 (b i.1 i.2).2 + +/-! ### The chosen Hilbert bases of the eigenspaces -/ + +variable (T) in +/-- **For injective `T` every eigenvalue in the index is nonzero**, since the eigenspace of `0` +has an empty basis (`ContinuousLinearMap.isEmpty_hilbertBasis_eigenspace_zero`). -/ +theorem eigenIndex_fst_ne_zero (hker : LinearMap.ker (T : E →ₗ[𝕜] E) = ⊥) (i : T.eigenIndex) : + i.1 ≠ 0 := by + obtain ⟨μ, j⟩ := i + intro h0 + simp only at h0 + subst h0 + exact (isEmpty_hilbertBasis_eigenspace_zero hker (T.eigenspaceBasis 0)).false j + +/-- The eigenvectors of a symmetric operator form an orthonormal family +(`ContinuousLinearMap.orthonormal_sigma_eigenspaces` for the chosen bases). -/ +theorem orthonormal_eigenvector (hT : (T : E →ₗ[𝕜] E).IsSymmetric) : + Orthonormal 𝕜 T.eigenvector := + orthonormal_sigma_eigenspaces hT T.eigenspaceBasis + +/-- If the orthogonal complement of the sum of all eigenspaces is `{0}`, so is the orthogonal +complement of the span of the eigenvectors +(`ContinuousLinearMap.orthogonal_span_sigma_eigenspaces_eq_bot` for the chosen bases). -/ +theorem orthogonal_span_eigenvector_eq_bot + (hspan : (⨆ μ, eigenspace (T : Module.End 𝕜 E) μ)ᗮ = ⊥) : + (Submodule.span 𝕜 (Set.range T.eigenvector))ᗮ = ⊥ := + orthogonal_span_sigma_eigenspaces_eq_bot hspan T.eigenspaceBasis + +/-- **The Hilbert basis of eigenvectors** of a symmetric operator such that the orthogonal +complement of the sum of all eigenspaces is `{0}`, for the chosen bases of the eigenspaces +(`ContinuousLinearMap.eigenspaceBasis`), indexed by `T.eigenIndex`. -/ +noncomputable def eigenHilbertBasis (hT : (T : E →ₗ[𝕜] E).IsSymmetric) + (hspan : (⨆ μ, eigenspace (T : Module.End 𝕜 E) μ)ᗮ = ⊥) : HilbertBasis T.eigenIndex 𝕜 E := + hilbertBasisOfEigenspaces hT T.eigenspaceBasis hspan + +/-- The vectors of the eigenvector basis are the eigenvectors. -/ +@[simp] +theorem coe_eigenHilbertBasis (hT : (T : E →ₗ[𝕜] E).IsSymmetric) + (hspan : (⨆ μ, eigenspace (T : Module.End 𝕜 E) μ)ᗮ = ⊥) : + ⇑(eigenHilbertBasis hT hspan) = T.eigenvector := + coe_hilbertBasisOfEigenspaces hT T.eigenspaceBasis hspan + +end ContinuousLinearMap diff --git a/LeanPool/FunctionSpaces/MeasureSpaces/Spectral/CompactEmbedding.lean b/LeanPool/FunctionSpaces/MeasureSpaces/Spectral/CompactEmbedding.lean new file mode 100644 index 0000000000..06235d7b1c --- /dev/null +++ b/LeanPool/FunctionSpaces/MeasureSpaces/Spectral/CompactEmbedding.lean @@ -0,0 +1,566 @@ +/- +Copyright (c) 2026 Mario Ullrich. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Mario Ullrich +-/ +module + +public import LeanPool.FunctionSpaces.MeasureSpaces.Spectral.Blocks +public import LeanPool.FunctionSpaces.MeasureSpaces.Spectral.CompactEigenbasis +public import LeanPool.FunctionSpaces.ApproximationSpaces.Interpolation.ApproxSpaces +public import Mathlib.Analysis.InnerProductSpace.Positive + +/- +Modified for Lean Pool: module names and imports adapted. +-/ + +/-! +# Spectral schemes of compact dense embeddings + +Let `J : V → H` be a compact, injective linear map with dense range between complex Hilbert +spaces (`CompactDenseEmbedding`), the model being `H^1_0(Ω) ↪ L_2(Ω)`. The operator +`T = J J†` on `H` is compact, positive and injective (`CompactDenseEmbedding.gram`, +`CompactDenseEmbedding.isPositive_gram`), so it has a +Hilbert basis `(e_i)` of eigenvectors with eigenvalues `μ_i ≠ 0` +(`CompactDenseEmbedding.eigenBasis`, from `ContinuousLinearMap.eigenHilbertBasis`). With the +**singular values** `σ_i = ‖J† e_i‖ > 0` one has `σ_i² = μ_i`, and +`v_i = σ_i⁻¹ J† e_i` is a Hilbert basis of `V` with `J v_i = σ_i e_i` +(`CompactDenseEmbedding.singularBasis`). Consequently: + +* the coefficients satisfy `⟨e_i, J u⟩ = σ_i ⟨v_i, u⟩`, so `f ∈ J(V)` iff + `∑_i σ_i⁻² |⟨e_i, f⟩|² < ∞`, and `⟨v_i, w⟩_V = σ_i⁻² ⟨J v_i, J w⟩_H`, the weak form of the + eigenvalue problem of the form `⟨·, ·⟩_V`; +* for every `ε > 0` only finitely many `σ_i` are at least `ε`, by compactness; +* the level `⌊σ_i⁻¹⌋₊` makes `(e_i)` a spectral scheme in `H` + (`CompactDenseEmbedding.spectralScheme`), for which `J` satisfies Jackson's and Bernstein's + inequalities of order `1` with constant `1`; +* hence `(H, J(V))_{θ,q} = A^θ_q` for `0 < θ < 1`, and `J(V)` is the Sobolev space of order `1` + of the scheme; for `s > 0`, `f ∈ A^s_2` iff `∑_i σ_i^(-2s) |⟨e_i, f⟩|² < ∞` + (`CompactDenseEmbedding.memApprox_two_iff`). + +Every eigenvalue of `J J†` is some `μ_i`; in particular a nonzero `u ∈ V` with +`⟨u, w⟩_V = ⟨J u, J w⟩_H` for all `w` gives a singular value `1` +(`CompactDenseEmbedding.exists_singularValue_eq_one`). +-/ + +@[expose] public section + +open Module.End Filter Topology +open scoped InnerProductSpace lp ENNReal + +/-- A **compact dense embedding** of a complex Hilbert space `V` into a complex Hilbert space +`H`: a bounded linear map `V → H` that is compact, injective and has dense range, as +`H^1_0(Ω) ↪ L_2(Ω)` for a bounded open set `Ω`. -/ +structure CompactDenseEmbedding (V H : Type*) [NormedAddCommGroup V] [InnerProductSpace ℂ V] + [NormedAddCommGroup H] [InnerProductSpace ℂ H] where + /-- The embedding as a bounded linear map. -/ + toCLM : V →L[ℂ] H + /-- The embedding is a compact operator. -/ + isCompact : IsCompactOperator toCLM + /-- The embedding is injective. -/ + injective : Function.Injective toCLM + /-- The embedding has dense range. -/ + denseRange : DenseRange toCLM + +namespace CompactDenseEmbedding + +variable {V H : Type*} [NormedAddCommGroup V] [InnerProductSpace ℂ V] [CompleteSpace V] + [NormedAddCommGroup H] [InnerProductSpace ℂ H] [CompleteSpace H] + (J : CompactDenseEmbedding V H) + +/-- The adjoint `J†` of a bounded operator, written as a postfix. -/ +local postfix:max "†" => ContinuousLinearMap.adjoint + +omit [CompleteSpace V] in +/-- The range of a compact dense embedding has trivial orthogonal complement. -/ +theorem orthogonal_range_eq_bot : (LinearMap.range (J.toCLM : V →ₗ[ℂ] H))ᗮ = ⊥ := by + rw [← Submodule.topologicalClosure_eq_top_iff, ← Submodule.dense_iff_topologicalClosure_eq_top, + LinearMap.coe_range] + exact J.denseRange + +/-- The adjoint `J†` has trivial kernel, the orthogonal complement of the range of `J`. -/ +theorem ker_adjoint : LinearMap.ker ((J.toCLM)† : H →ₗ[ℂ] V) = ⊥ := by + rw [← J.toCLM.orthogonal_range, J.orthogonal_range_eq_bot] + +/-- The adjoint `J†` is injective. -/ +theorem adjoint_injective : Function.Injective (J.toCLM)† := by + simpa using LinearMap.ker_eq_bot.1 J.ker_adjoint + +/-! ### The operator `J J†` -/ + +/-- The operator `T = J J†` on `H`. -/ +noncomputable def gram : H →L[ℂ] H := J.toCLM ∘L (J.toCLM)† + +/-- `J J†` is compact, as `J` is. -/ +theorem isCompactOperator_gram : IsCompactOperator J.gram := + J.isCompact.comp_clm _ + +/-- `J J†` is a positive operator: `⟨J J† f, f⟩ = ‖J† f‖² ≥ 0` +(`ContinuousLinearMap.isPositive_self_comp_adjoint`). -/ +theorem isPositive_gram : J.gram.IsPositive := + ContinuousLinearMap.isPositive_self_comp_adjoint J.toCLM + +/-- `J J†` is symmetric, being positive. -/ +theorem isSymmetric_gram : (J.gram : H →ₗ[ℂ] H).IsSymmetric := + J.isPositive_gram.isSymmetric + +/-- `J J†` is injective: its kernel is the kernel of `J†`. -/ +theorem ker_gram : LinearMap.ker (J.gram : H →ₗ[ℂ] H) = ⊥ := by + have h := J.toCLM.ker_self_comp_adjoint + change LinearMap.ker (J.gram : H →ₗ[ℂ] H) = LinearMap.ker ((J.toCLM)† : H →ₗ[ℂ] V) at h + rw [h, LinearMap.ker_eq_bot] + exact J.adjoint_injective + +/-! ### The eigenvector basis of `J J†` -/ + +/-- The index set of the eigenvector basis of `J J†`: pairs `⟨μ, j⟩` of an eigenvalue and an +index of a Hilbert basis of its eigenspace. -/ +abbrev index : Type _ := J.gram.eigenIndex + +/-- **The Hilbert basis of `H` of eigenvectors of `J J†`**, from Mathlib's spectral theorem +for compact self-adjoint operators (`ContinuousLinearMap.eigenHilbertBasis`). -/ +noncomputable def eigenBasis : HilbertBasis J.index ℂ H := + ContinuousLinearMap.eigenHilbertBasis J.isSymmetric_gram + (ContinuousLinearMap.orthogonalComplement_iSup_eigenspaces_eq_bot J.isCompactOperator_gram + J.isSymmetric_gram) + +/-- The basis vectors are the eigenvectors of `J J†`. -/ +theorem coe_eigenBasis : ⇑J.eigenBasis = J.gram.eigenvector := + ContinuousLinearMap.coe_eigenHilbertBasis _ _ + +/-- `J J† e_i = μ_i e_i`, where the eigenvalue `μ_i` is the first component of the index. -/ +theorem gram_eigenBasis (i : J.index) : J.gram (J.eigenBasis i) = i.1 • J.eigenBasis i := by + rw [coe_eigenBasis] + exact J.gram.apply_eigenvector i + +/-- The eigenvalues of `J J†` in the index are nonzero, as `J J†` is injective. -/ +theorem index_fst_ne_zero (i : J.index) : i.1 ≠ 0 := + J.gram.eigenIndex_fst_ne_zero J.ker_gram i + +/-! ### Singular values and the singular basis -/ + +/-- The **singular value** `σ_i = ‖J† e_i‖`. -/ +noncomputable def singularValue (i : J.index) : ℝ := ‖(J.toCLM)† (J.eigenBasis i)‖ + +/-- `⟨J† e_i, J† e_j⟩ = μ_j ⟨e_i, e_j⟩`. -/ +theorem inner_adjoint_eigenBasis (i j : J.index) : + ⟪(J.toCLM)† (J.eigenBasis i), (J.toCLM)† (J.eigenBasis j)⟫_ℂ = + j.1 * ⟪J.eigenBasis i, J.eigenBasis j⟫_ℂ := by + rw [ContinuousLinearMap.adjoint_inner_left, ← inner_smul_right, ← J.gram_eigenBasis] + rfl + +/-- **`σ_i² = μ_i`**: the eigenvalues of `J J†` are the squares of the singular values; in +particular they are real and positive. -/ +theorem sq_singularValue (i : J.index) : (((J.singularValue i) ^ 2 : ℝ) : ℂ) = i.1 := by + have h := J.inner_adjoint_eigenBasis i i + rw [inner_self_eq_norm_sq_to_K, inner_self_eq_norm_sq_to_K, J.eigenBasis.orthonormal.1 i] at h + simpa [singularValue] using h + +/-- The singular values are positive. -/ +theorem singularValue_pos (i : J.index) : 0 < J.singularValue i := by + refine (norm_nonneg _).lt_of_ne fun h => J.index_fst_ne_zero i ?_ + rw [← J.sq_singularValue i, singularValue, ← h] + simp + +/-- The singular values are nonzero as complex numbers. -/ +theorem ofReal_singularValue_ne_zero (i : J.index) : ((J.singularValue i : ℝ) : ℂ) ≠ 0 := + Complex.ofReal_ne_zero.2 (J.singularValue_pos i).ne' + +/-- `‖σ_i⁻¹ z‖ = σ_i⁻¹ ‖z‖` for every complex number `z`. -/ +theorem norm_inv_singularValue_mul (i : J.index) (z : ℂ) : + ‖((J.singularValue i)⁻¹ : ℂ) * z‖ = (J.singularValue i)⁻¹ * ‖z‖ := by + rw [norm_mul, norm_inv, Complex.norm_real, Real.norm_eq_abs, abs_of_pos (J.singularValue_pos i)] + +/-- The singular values are at most `‖J‖`. -/ +theorem singularValue_le_norm (i : J.index) : J.singularValue i ≤ ‖J.toCLM‖ := by + refine ((J.toCLM)†.le_opNorm _).trans ?_ + rw [J.eigenBasis.orthonormal.1 i, mul_one, LinearIsometryEquiv.norm_map] + +/-- The singular vector `v_i = σ_i⁻¹ J† e_i` in `V`. -/ +noncomputable def singularVector (i : J.index) : V := + (((J.singularValue i)⁻¹ : ℝ) : ℂ) • (J.toCLM)† (J.eigenBasis i) + +/-- `J† e_i = σ_i v_i`. -/ +theorem adjoint_eigenBasis_eq (i : J.index) : + (J.toCLM)† (J.eigenBasis i) = ((J.singularValue i : ℝ) : ℂ) • J.singularVector i := by + rw [singularVector, smul_smul, ← Complex.ofReal_mul, mul_inv_cancel₀ (J.singularValue_pos i).ne', + Complex.ofReal_one, one_smul] + +/-- The singular vectors are orthonormal, since `⟨v_i, v_j⟩ = σ_i⁻¹ σ_j⁻¹ μ_j ⟨e_i, e_j⟩` and +`σ_i² = μ_i`. -/ +theorem orthonormal_singularVector : Orthonormal ℂ J.singularVector := by + classical + rw [orthonormal_iff_ite] + intro i j + simp only [singularVector, inner_smul_left, inner_smul_right, J.inner_adjoint_eigenBasis, + orthonormal_iff_ite.1 J.eigenBasis.orthonormal, Complex.conj_ofReal] + split_ifs with h + · subst h + rw [← J.sq_singularValue i] + have := J.ofReal_singularValue_ne_zero i + push_cast + field_simp + · simp + +/-- A vector `y ∈ H` orthogonal to every `e_i` is zero. -/ +theorem eq_zero_of_forall_inner_eigenBasis {y : H} (hy : ∀ i, ⟪J.eigenBasis i, y⟫_ℂ = 0) : + y = 0 := by + refine J.eigenBasis.repr.map_eq_zero_iff.1 (lp.ext (funext fun i => ?_)) + rw [J.eigenBasis.repr_apply_apply, hy] + rfl + +/-- The span of the singular vectors has trivial orthogonal complement: if `w ⊥ v_i` for all +`i`, then `⟨e_i, J w⟩ = σ_i ⟨v_i, w⟩ = 0` for all `i`, so `J w = 0` and `w = 0`. -/ +theorem orthogonal_span_singularVector_eq_bot : + (Submodule.span ℂ (Set.range J.singularVector))ᗮ = ⊥ := by + refine le_antisymm (fun w hw => ?_) bot_le + have hv : ∀ i, ⟪J.singularVector i, w⟫_ℂ = 0 := fun i => + (Submodule.mem_orthogonal _ w).1 hw _ (Submodule.subset_span ⟨i, rfl⟩) + have hJw : J.toCLM w = 0 := J.eq_zero_of_forall_inner_eigenBasis fun i => by + rw [← ContinuousLinearMap.adjoint_inner_left, J.adjoint_eigenBasis_eq, inner_smul_left, hv, + mul_zero] + rw [Submodule.mem_bot] + exact J.injective (by rw [hJw, map_zero]) + +/-- **The singular basis**: the Hilbert basis `v_i = σ_i⁻¹ J† e_i` of `V`. -/ +noncomputable def singularBasis : HilbertBasis J.index ℂ V := + HilbertBasis.mkOfOrthogonalEqBot J.orthonormal_singularVector + J.orthogonal_span_singularVector_eq_bot + +/-- The vectors of the singular basis are the singular vectors. -/ +theorem coe_singularBasis : ⇑J.singularBasis = J.singularVector := + HilbertBasis.coe_mkOfOrthogonalEqBot _ _ + +/-- `J† e_i = σ_i v_i`. -/ +theorem adjoint_eigenBasis (i : J.index) : + (J.toCLM)† (J.eigenBasis i) = ((J.singularValue i : ℝ) : ℂ) • J.singularBasis i := by + rw [coe_singularBasis, J.adjoint_eigenBasis_eq] + +/-- `J v_i = σ_i e_i`. -/ +theorem apply_singularBasis (i : J.index) : + J.toCLM (J.singularBasis i) = ((J.singularValue i : ℝ) : ℂ) • J.eigenBasis i := by + have h : J.toCLM ((J.toCLM)† (J.eigenBasis i)) = i.1 • J.eigenBasis i := J.gram_eigenBasis i + rw [J.adjoint_eigenBasis, map_smul, ← J.sq_singularValue i] at h + refine smul_right_injective H (J.ofReal_singularValue_ne_zero i) ?_ + simp only + rw [h, smul_smul, Complex.ofReal_pow, sq] + +/-- **Every eigenvalue of `J J†` occurs in the index**: if `J J† y = μ y` for some `y ≠ 0`, then +`μ = μ_i` for some `i`. Otherwise `y` is orthogonal to every `e_i`, since +`μ_i ⟨e_i, y⟩ = ⟨J J† e_i, y⟩ = ⟨e_i, J J† y⟩ = μ ⟨e_i, y⟩` with `μ_i = σ_i²` real. -/ +theorem exists_index_fst_eq_of_gram_apply_eq_smul {μ : ℂ} {y : H} (hy : J.gram y = μ • y) + (hy0 : y ≠ 0) : ∃ i : J.index, i.1 = μ := by + by_contra h + push Not at h + refine hy0 (J.eq_zero_of_forall_inner_eigenBasis fun i => ?_) + have hs : ⟪J.gram (J.eigenBasis i), y⟫_ℂ = ⟪J.eigenBasis i, J.gram y⟫_ℂ := + J.isSymmetric_gram (J.eigenBasis i) y + have hr : (starRingEnd ℂ) i.1 = i.1 := by rw [← J.sq_singularValue i, Complex.conj_ofReal] + rw [J.gram_eigenBasis, hy, inner_smul_left, inner_smul_right, hr] at hs + have h0 : (i.1 - μ) * ⟪J.eigenBasis i, y⟫_ℂ = 0 := by rw [sub_mul, hs, sub_self] + exact (mul_eq_zero.1 h0).resolve_left (sub_ne_zero.2 (h i)) + +/-- **A singular value `1`**: if some `u ≠ 0` in `V` satisfies `⟨u, w⟩_V = ⟨J u, J w⟩_H` for +every `w ∈ V`, then `σ_i = 1` for some `i`. Indeed `J† J u = u`, so `J u ≠ 0` is an eigenvector +of `J J†` with eigenvalue `1 = σ_i²` +(`CompactDenseEmbedding.exists_index_fst_eq_of_gram_apply_eq_smul`). -/ +theorem exists_singularValue_eq_one {u : V} (hu0 : u ≠ 0) + (hu : ∀ w, ⟪u, w⟫_ℂ = ⟪J.toCLM u, J.toCLM w⟫_ℂ) : ∃ i : J.index, J.singularValue i = 1 := by + have hadj : (J.toCLM)† (J.toCLM u) = u := + ext_inner_right ℂ fun w => by rw [ContinuousLinearMap.adjoint_inner_left, hu] + have hg : J.gram (J.toCLM u) = (1 : ℂ) • J.toCLM u := by + rw [one_smul] + exact congrArg J.toCLM hadj + have hJu : J.toCLM u ≠ 0 := fun h0 => hu0 (J.injective (by rw [h0, map_zero])) + obtain ⟨i, hi⟩ := J.exists_index_fst_eq_of_gram_apply_eq_smul hg hJu + refine ⟨i, (pow_eq_one_iff_of_nonneg (J.singularValue_pos i).le two_ne_zero).1 ?_⟩ + rw [← Complex.ofReal_eq_one, J.sq_singularValue i, hi] + +/-! ### Coefficients -/ + +/-- **`⟨e_i, J u⟩ = σ_i ⟨v_i, u⟩`**: the coefficients of `J u` in the eigenvector basis are +`σ_i` times those of `u` in the singular basis. -/ +theorem repr_apply (u : V) (i : J.index) : + J.eigenBasis.repr (J.toCLM u) i = (J.singularValue i : ℂ) * J.singularBasis.repr u i := by + rw [J.eigenBasis.repr_apply_apply, J.singularBasis.repr_apply_apply, + ← ContinuousLinearMap.adjoint_inner_left, J.adjoint_eigenBasis, inner_smul_left, + Complex.conj_ofReal] + +/-- The coefficients of `J (∑ c_i v_i)` are `σ_i c_i`. -/ +theorem repr_apply_repr_symm (c : ℓ²(J.index, ℂ)) (i : J.index) : + J.eigenBasis.repr (J.toCLM (J.singularBasis.repr.symm c)) i = + (J.singularValue i : ℂ) * c i := by + rw [repr_apply, LinearIsometryEquiv.apply_symm_apply] + +/-- The singular coefficients of a preimage: if `J u = f`, then +`⟨v_i, u⟩ = σ_i⁻¹ ⟨e_i, f⟩`. -/ +theorem repr_singularBasis_eq {u : V} {f : H} (h : J.toCLM u = f) (i : J.index) : + J.singularBasis.repr u i = ((J.singularValue i)⁻¹ : ℂ) * J.eigenBasis.repr f i := by + rw [← h, repr_apply, ← mul_assoc, inv_mul_cancel₀ (J.ofReal_singularValue_ne_zero i), one_mul] + +/-- **The range of `J`**: `f ∈ J(V)` if and only if `∑_i σ_i⁻² |⟨e_i, f⟩|² < ∞`. -/ +theorem mem_range_iff (f : H) : + f ∈ Set.range J.toCLM ↔ + Memℓp (fun i => ((J.singularValue i)⁻¹ : ℂ) * J.eigenBasis.repr f i) 2 := by + constructor + · rintro ⟨u, rfl⟩ + convert lp.memℓp (J.singularBasis.repr u) using 1 + funext i + exact (J.repr_singularBasis_eq rfl i).symm + · intro h + refine ⟨J.singularBasis.repr.symm ⟨_, h⟩, J.eigenBasis.repr.injective + (lp.ext (funext fun i => ?_))⟩ + rw [repr_apply_repr_symm] + change (J.singularValue i : ℂ) * (((J.singularValue i)⁻¹ : ℂ) * J.eigenBasis.repr f i) = _ + rw [← mul_assoc, mul_inv_cancel₀ (J.ofReal_singularValue_ne_zero i), one_mul] + +/-- **The norm of the preimage**: if `J u = f`, then `‖u‖² = ∑_i σ_i⁻² |⟨e_i, f⟩|²`. -/ +theorem norm_sq_eq_of_apply_eq {u : V} {f : H} (h : J.toCLM u = f) : + ‖u‖ ^ 2 = ∑' i, (J.singularValue i)⁻¹ ^ 2 * ‖J.eigenBasis.repr f i‖ ^ 2 := by + have hP := lp.norm_rpow_eq_tsum (p := 2) (by norm_num) (J.singularBasis.repr u) + simp only [ENNReal.toReal_ofNat, Real.rpow_two, LinearIsometryEquiv.norm_map] at hP + rw [hP] + congr 1; funext i + rw [← h, repr_apply, norm_mul, mul_pow, ← mul_assoc, Complex.norm_real, Real.norm_eq_abs, + sq_abs, ← mul_pow, inv_mul_cancel₀ (J.singularValue_pos i).ne', one_pow, one_mul] + +/-- **The weak eigenvalue equation**: `⟨v_i, w⟩_V = σ_i⁻² ⟨J v_i, J w⟩_H` for every `w ∈ V`. +For `V = H^1_0(Ω)` with the inner product `⟨u, w⟩ + (2π)⁻²⟨∇u, ∇w⟩` and `H = L_2(Ω)`, this is +the weak form of `-Δ v_i = λ_i v_i` for the Dirichlet eigenvalue `λ_i`, with +`σ_i⁻² = 1 + λ_i/(4π²)`. -/ +theorem inner_singularBasis (i : J.index) (w : V) : + ⟪J.singularBasis i, w⟫_ℂ = + (((J.singularValue i)⁻¹ ^ 2 : ℝ) : ℂ) * ⟪J.toCLM (J.singularBasis i), J.toCLM w⟫_ℂ := by + have := J.ofReal_singularValue_ne_zero i + rw [J.apply_singularBasis, inner_smul_left, Complex.conj_ofReal, + ← ContinuousLinearMap.adjoint_inner_left, J.adjoint_eigenBasis, inner_smul_left, + Complex.conj_ofReal] + push_cast + field_simp + +/-! ### Finitely many large singular values -/ + +/-- For `i ≠ j`, `‖J v_i - J v_j‖ ≥ σ_i`, since the coefficient of +`J v_i - J v_j = σ_i e_i - σ_j e_j` at `e_i` is `σ_i`. -/ +theorem singularValue_le_norm_sub {i j : J.index} (hij : i ≠ j) : + J.singularValue i ≤ ‖J.toCLM (J.singularBasis i) - J.toCLM (J.singularBasis j)‖ := by + have h := norm_inner_le_norm (𝕜 := ℂ) (J.eigenBasis i) + (J.toCLM (J.singularBasis i) - J.toCLM (J.singularBasis j)) + have hii : ⟪J.eigenBasis i, J.eigenBasis i⟫_ℂ = 1 := by + rw [inner_self_eq_norm_sq_to_K, J.eigenBasis.orthonormal.1 i]; simp + rw [inner_sub_right, J.apply_singularBasis, J.apply_singularBasis, inner_smul_right, + inner_smul_right, hii, J.eigenBasis.orthonormal.2 hij, mul_zero, sub_zero, mul_one, + Complex.norm_real, Real.norm_eq_abs, abs_of_pos (J.singularValue_pos i), + J.eigenBasis.orthonormal.1 i, one_mul] at h + rwa [J.apply_singularBasis, J.apply_singularBasis] + +/-- **Only finitely many singular values are at least `ε > 0`.** Otherwise there are +infinitely many `v_i` in the unit ball whose images `J v_i` are `ε`-separated +(`CompactDenseEmbedding.singularValue_le_norm_sub`), against the compactness of the closure of +the image of the unit ball (`IsCompactOperator.isCompact_closure_image_closedBall`, +`IsCompact.tendsto_subseq`). -/ +theorem finite_setOf_le_singularValue {ε : ℝ} (hε : 0 < ε) : + {i | ε ≤ J.singularValue i}.Finite := by + by_contra hinf + let e := Set.Infinite.natEmbedding _ hinf + obtain ⟨y, -, φ, hφ, hlim⟩ := (IsCompactOperator.isCompact_closure_image_closedBall + (f := (J.toCLM : V →ₗ[ℂ] H)) J.isCompact 1).tendsto_subseq + (x := fun n => J.toCLM (J.singularBasis (e n))) + (fun n => subset_closure ⟨J.singularBasis (e n), + mem_closedBall_zero_iff.2 (J.singularBasis.orthonormal.1 _).le, rfl⟩) + obtain ⟨N, hN⟩ := Metric.cauchySeq_iff'.1 hlim.cauchySeq ε hε + have h1 := hN (N + 1) (Nat.le_succ N) + rw [Function.comp_apply, Function.comp_apply, dist_eq_norm] at h1 + have hne : (e (φ (N + 1)) : J.index) ≠ e (φ N) := fun h => + Nat.succ_ne_self N (hφ.injective (e.injective (Subtype.ext h))) + exact absurd ((e (φ (N + 1))).2.trans (J.singularValue_le_norm_sub hne)) (not_le.2 h1) + +/-! ### The spectral scheme of the embedding -/ + +/-- The **level** `⌊σ_i⁻¹⌋₊` of the eigenvector `e_i`. -/ +noncomputable def level (i : J.index) : ℕ := ⌊(J.singularValue i)⁻¹⌋₊ + +/-- `⌊σ_i⁻¹⌋₊ ≤ σ_i⁻¹`. -/ +theorem level_le_inv_singularValue (i : J.index) : (J.level i : ℝ) ≤ (J.singularValue i)⁻¹ := + Nat.floor_le (inv_nonneg.2 (J.singularValue_pos i).le) + +/-- `σ_i⁻¹ < ⌊σ_i⁻¹⌋₊ + 1`. -/ +theorem inv_singularValue_lt_level_add_one (i : J.index) : + (J.singularValue i)⁻¹ < J.level i + 1 := + Nat.lt_floor_add_one _ + +/-- A level below `n` means `σ_i⁻¹ < n`. -/ +theorem inv_singularValue_lt_of_level_lt {n : ℕ} {i : J.index} (h : J.level i < n) : + (J.singularValue i)⁻¹ < n := + (Nat.floor_lt (inv_nonneg.2 (J.singularValue_pos i).le)).1 h + +/-- A level at least `n ≥ 1` means `σ_i ≤ n⁻¹`. -/ +theorem singularValue_le_of_le_level {n : ℕ} (hn : 1 ≤ n) {i : J.index} (h : n ≤ J.level i) : + J.singularValue i ≤ (n : ℝ)⁻¹ := by + have hle : (n : ℝ) ≤ (J.singularValue i)⁻¹ := + (Nat.cast_le.2 h).trans (J.level_le_inv_singularValue i) + exact (le_inv_comm₀ (by exact_mod_cast hn) (J.singularValue_pos i)).1 hle + +/-- The levels have finite level sets: `level i < n` gives `σ_i⁻¹ < n`, so +`σ_i ≥ (n + 1)⁻¹`, which holds for finitely many `i` +(`CompactDenseEmbedding.finite_setOf_le_singularValue`). -/ +theorem finite_level (n : ℕ) : {i | J.level i < n}.Finite := + (J.finite_setOf_le_singularValue (ε := ((n : ℝ) + 1)⁻¹) (by positivity)).subset fun i hi => by + have h := J.inv_singularValue_lt_of_level_lt hi + change ((n : ℝ) + 1)⁻¹ ≤ J.singularValue i + exact (inv_le_comm₀ (by positivity) (J.singularValue_pos i)).2 (by linarith) + +/-- **The spectral scheme of a compact dense embedding**: the eigenvector basis `(e_i)` of +`J J†` with the levels `⌊σ_i⁻¹⌋₊`. -/ +noncomputable def spectralScheme : SpectralScheme J.index H where + basis := J.eigenBasis + level := J.level + finite_level := J.finite_level + +/-- The basis of the spectral scheme is the eigenvector basis. -/ +@[simp] +theorem spectralScheme_basis : J.spectralScheme.basis = J.eigenBasis := rfl + +/-- The levels of the spectral scheme are `⌊σ_i⁻¹⌋₊`. -/ +@[simp] +theorem spectralScheme_level : J.spectralScheme.level = J.level := rfl + +/-- **The truncation error of `J u`**: `‖J u - P_n J u‖ ≤ n⁻¹ ‖u‖` for `n ≥ 1`, by Parseval's +identity, since only coefficients `σ_i ⟨v_i, u⟩` of level `≥ n` remain and `σ_i ≤ n⁻¹` +there. -/ +theorem norm_sub_truncate_le {n : ℕ} (hn : 1 ≤ n) (u : V) : + ‖J.toCLM u - J.spectralScheme.truncate n (J.toCLM u)‖ ≤ (n : ℝ)⁻¹ * ‖u‖ := by + rw [← J.eigenBasis.repr.norm_map, ← J.singularBasis.repr.norm_map u] + calc ‖J.eigenBasis.repr (J.toCLM u - J.spectralScheme.truncate n (J.toCLM u))‖ + ≤ ‖((((n : ℝ)⁻¹ : ℝ)) : ℂ) • J.singularBasis.repr u‖ := by + refine lp.norm_mono (by norm_num) fun i => ?_ + have h := J.spectralScheme.repr_sub_truncate n (J.toCLM u) i + rw [spectralScheme_basis, spectralScheme_level] at h + rw [h, lp.coeFn_smul, Pi.smul_apply, smul_eq_mul] + split_ifs with hi + · simp only [norm_zero]; positivity + · rw [repr_apply, norm_mul, norm_mul, Complex.norm_real, Complex.norm_real, + Real.norm_eq_abs, Real.norm_eq_abs, abs_of_pos (J.singularValue_pos i), + abs_of_pos (by positivity)] + gcongr + exact J.singularValue_le_of_le_level hn (not_lt.1 hi) + _ = (n : ℝ)⁻¹ * ‖J.singularBasis.repr u‖ := by + rw [norm_smul, Complex.norm_real, Real.norm_eq_abs, abs_of_pos (by positivity)] + +/-- **Jackson's inequality** for `J(V)`: `E_n(J u) ≤ n⁻¹ ‖u‖`, constant `1`. -/ +theorem jacksonBound : + ApproximationScheme.JacksonBound (J.toCLM.restrictScalars ℝ) J.spectralScheme.toScheme 1 1 := by + intro n hn u + refine (ENNReal.toReal_mono eNorm_ne_top (ApproximationScheme.approxError_le_of_mem + (J.spectralScheme.truncate_mem_span n (J.toCLM u)) _)).trans ?_ + rw [toReal_eNorm, one_mul, Real.rpow_neg_one] + exact J.norm_sub_truncate_le hn u + +/-- **Bernstein's inequality** for `J(V)`: every `a ∈ A_n` is `J u` with `‖u‖ ≤ n ‖a‖`, since +`a` has only coefficients of level `< n`, where `σ_i⁻¹ < n`. -/ +theorem liftBound : + ApproximationScheme.LiftBound (J.toCLM.restrictScalars ℝ) J.spectralScheme.toScheme 1 1 := by + intro n hn a ha + have hle : ∀ i, ‖((J.singularValue i)⁻¹ : ℂ) * J.eigenBasis.repr a i‖ ≤ + (n : ℝ) * ‖J.eigenBasis.repr a i‖ := fun i => by + rw [J.norm_inv_singularValue_mul] + by_cases hi : J.level i < n + · gcongr; exact (J.inv_singularValue_lt_of_level_lt hi).le + · have h0 := J.spectralScheme.repr_eq_zero_of_mem_span ha (i := i) (not_lt.1 hi) + rw [spectralScheme_basis] at h0 + rw [h0]; simp + have hmem : Memℓp (fun i => ((J.singularValue i)⁻¹ : ℂ) * J.eigenBasis.repr a i) 2 := + (((lp.memℓp (J.eigenBasis.repr a)).norm).const_mul (n : ℝ)).mono hle + obtain ⟨u, hu⟩ := (J.mem_range_iff a).2 hmem + refine ⟨u, hu, ?_⟩ + rw [Real.rpow_one, one_mul, ← J.singularBasis.repr.norm_map, ← J.eigenBasis.repr.norm_map a] + calc ‖J.singularBasis.repr u‖ ≤ ‖((n : ℝ) : ℂ) • J.eigenBasis.repr a‖ := by + refine lp.norm_mono (by norm_num) fun i => ?_ + change ‖J.singularBasis.repr u i‖ ≤ ‖(((n : ℝ) : ℂ) • J.eigenBasis.repr a) i‖ + rw [J.repr_singularBasis_eq hu, lp.coeFn_smul, Pi.smul_apply, smul_eq_mul, + norm_mul ((n : ℝ) : ℂ), Complex.norm_real, Real.norm_eq_abs, + abs_of_nonneg (Nat.cast_nonneg n)] + exact hle i + _ = (n : ℝ) * ‖J.eigenBasis.repr a‖ := by + rw [norm_smul, Complex.norm_real, Real.norm_eq_abs, abs_of_nonneg (Nat.cast_nonneg n)] + +/-! ### Interpolation and the Sobolev space of order one -/ + +/-- **The interpolation spaces of a compact dense embedding**: for `0 < θ < 1` and +`1 ≤ q ≤ ∞`, `(H, J(V))_{θ,q} = A^θ_q` for the spectral scheme, from Jackson's and Bernstein's +inequalities (`ApproximationScheme.memKMethod_ofMap_iff_memApprox`). -/ +theorem memKMethod_iff_memApprox {θ : ℝ} {q : ℝ≥0∞} (hθ : 0 < θ) (hθ' : θ < 1) (hq : 1 ≤ q) + {f : H} : + (InterpCouple.ofMap (J.toCLM.restrictScalars ℝ)).MemKMethod θ q f ↔ + J.spectralScheme.toScheme.MemApprox θ q f := by + have h := ApproximationScheme.memKMethod_ofMap_iff_memApprox J.jacksonBound zero_le_one + J.liftBound zero_le_one one_pos hθ hθ' hq (f := f) + rwa [mul_one] at h + +/-- `σ_i⁻¹ ≤ 1 + ⌊σ_i⁻¹⌋₊`. -/ +theorem inv_singularValue_le_one_add_level (i : J.index) : + (J.singularValue i)⁻¹ ≤ 1 + J.level i := by + linarith [J.inv_singularValue_lt_level_add_one i] + +/-- `1 + ⌊σ_i⁻¹⌋₊ ≤ (1 + ‖J‖) σ_i⁻¹`, since `1 = σ_i σ_i⁻¹ ≤ ‖J‖ σ_i⁻¹`. -/ +theorem one_add_level_le (i : J.index) : + 1 + (J.level i : ℝ) ≤ (1 + ‖J.toCLM‖) * (J.singularValue i)⁻¹ := by + have hσ := J.singularValue_pos i + have h1 : 1 ≤ ‖J.toCLM‖ * (J.singularValue i)⁻¹ := by + rw [← mul_inv_cancel₀ hσ.ne'] + exact mul_le_mul_of_nonneg_right (J.singularValue_le_norm i) (inv_nonneg.2 hσ.le) + linarith [J.level_le_inv_singularValue i] + +/-- **`J(V)` is the Sobolev space of order `1` of the spectral scheme**: +`J(V) = {f : ∑_i (1 + ⌊σ_i⁻¹⌋₊)² |⟨e_i, f⟩|² < ∞}`, by +`σ_i⁻¹ ≤ 1 + ⌊σ_i⁻¹⌋₊ ≤ (1 + ‖J‖) σ_i⁻¹` and `CompactDenseEmbedding.mem_range_iff`. -/ +theorem range_eq_range_sobolevEmbed : + Set.range J.toCLM = Set.range (J.spectralScheme.sobolevEmbed 1 zero_le_one) := by + ext f + have hw : ∀ i, J.spectralScheme.weight 1 i = 1 + J.level i := fun i => by + simp [SpectralScheme.weight] + rw [J.mem_range_iff, SpectralScheme.mem_range_sobolevEmbed_iff, spectralScheme_basis] + constructor + · intro h + refine ((h.norm).const_mul (1 + ‖J.toCLM‖)).mono fun i => ?_ + rw [J.norm_inv_singularValue_mul, norm_mul, hw, Complex.norm_real, Real.norm_eq_abs, + abs_of_pos (show (0 : ℝ) < 1 + J.level i by positivity), ← mul_assoc] + gcongr + exact J.one_add_level_le i + · intro h + refine h.mono' fun i => ?_ + rw [J.norm_inv_singularValue_mul, norm_mul, hw, Complex.norm_real, Real.norm_eq_abs, + abs_of_pos (show (0 : ℝ) < 1 + J.level i by positivity)] + gcongr + exact J.inv_singularValue_le_one_add_level i + +/-- **`A^s_2` by the singular values**: for `s > 0`, `f ∈ H` lies in the approximation space +`A^s_2` of the spectral scheme iff `∑_i σ_i^(-2s) |⟨e_i, f⟩|² < ∞`, that is, +`(σ_i^(-s) ⟨e_i, f⟩)_i ∈ ℓ_2`: by +`SpectralScheme.memApprox_two_iff` the weights are `(1 + ⌊σ_i⁻¹⌋₊)^s`, and +`σ_i⁻¹ ≤ 1 + ⌊σ_i⁻¹⌋₊ ≤ (1 + ‖J‖) σ_i⁻¹`. -/ +theorem memApprox_two_iff {s : ℝ} (hs : 0 < s) (f : H) : + J.spectralScheme.toScheme.MemApprox s 2 f ↔ + Memℓp (fun i => (((J.singularValue i)⁻¹ ^ s : ℝ) : ℂ) * J.eigenBasis.repr f i) 2 := by + have hw : ∀ i, J.spectralScheme.weight s i = (1 + J.level i) ^ s := fun i => by + simp [SpectralScheme.weight] + have hσ : ∀ i, 0 ≤ (J.singularValue i)⁻¹ := fun i => inv_nonneg.2 (J.singularValue_pos i).le + rw [J.spectralScheme.memApprox_two_iff hs f, spectralScheme_basis] + constructor + · intro h + refine h.mono' fun i => ?_ + rw [norm_mul, norm_mul, Complex.norm_real, Complex.norm_real, Real.norm_eq_abs, + Real.norm_eq_abs, abs_of_nonneg (Real.rpow_nonneg (hσ i) s), hw, + abs_of_nonneg (Real.rpow_nonneg (by positivity) s)] + exact mul_le_mul_of_nonneg_right + (Real.rpow_le_rpow (hσ i) (J.inv_singularValue_le_one_add_level i) hs.le) (norm_nonneg _) + · intro h + refine ((h.norm).const_mul ((1 + ‖J.toCLM‖) ^ s)).mono fun i => ?_ + rw [norm_mul, norm_mul, Complex.norm_real, Complex.norm_real, Real.norm_eq_abs, + Real.norm_eq_abs, abs_of_nonneg (Real.rpow_nonneg (hσ i) s), hw, + abs_of_nonneg (Real.rpow_nonneg (by positivity) s), ← mul_assoc, + ← Real.mul_rpow (by positivity) (hσ i)] + exact mul_le_mul_of_nonneg_right + (Real.rpow_le_rpow (by positivity) (J.one_add_level_le i) hs.le) (norm_nonneg _) + +end CompactDenseEmbedding diff --git a/LeanPool/FunctionSpaces/MeasureSpaces/Spectral/ContinuousSpectralBasis.lean b/LeanPool/FunctionSpaces/MeasureSpaces/Spectral/ContinuousSpectralBasis.lean new file mode 100644 index 0000000000..32239f9590 --- /dev/null +++ b/LeanPool/FunctionSpaces/MeasureSpaces/Spectral/ContinuousSpectralBasis.lean @@ -0,0 +1,183 @@ +/- +Copyright (c) 2026 Mario Ullrich. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Mario Ullrich +-/ +module + +public import LeanPool.FunctionSpaces.MeasureSpaces.Spectral.Blocks +public import LeanPool.FunctionSpaces.MeasureSpaces.Sobolev.Embeddings +public import Mathlib.MeasureTheory.Function.L2Space + +/- +Modified for Lean Pool: module names and imports adapted. +-/ + +/-! +# Continuous spectral bases + +Let `M` be a topological space with a finite Borel measure `μ`. A **continuous spectral basis** +of `L_2(μ)` (`ContinuousSpectralBasis`) is a spectral scheme in `L_2(μ)`, a Hilbert basis `(e_i)` +with a level `λ : ι → ℕ` and finitely many basis elements of each level, whose elements are the +`L_2` classes of bounded continuous functions `ẽ_i` (`ContinuousSpectralBasis.basisFun`). The +model is the eigenbasis of the Laplace–Beltrami operator of a compact Riemannian manifold, +continuous by elliptic regularity, with `λ(i) = ⌊√λ_i⌋`. The Dirichlet eigenbasis of a bounded +open set, the Neumann eigenbasis of a bounded Lipschitz domain and the eigenbasis of the chart +form of a compact manifold are spectral schemes (`Rd.dirichletScheme`, +`Rd.BoundedLipschitzDomain.neumannScheme`, `Manifold.BesovAtlas.chartScheme`); the boundedness +and continuity of their elements is elliptic regularity, a later goal. The Fourier basis of the +torus is a continuous spectral basis (`Torus.fourierEigenbasis`). + +The functions `ẽ_i` of level `< n` span the space `basisSpan n` of bounded continuous functions +(`ContinuousSpectralBasis.basisSpan`), and these spaces form a scheme of functions +(`ContinuousSpectralBasis.basisScheme`). Its classes in `L_2` are the spectral scheme +(`ContinuousSpectralBasis.toLp_basisScheme_eq`), so the spectral theory applies: + +* **`B^s_{2,2} = H^s`** (`ContinuousSpectralBasis.memBesov_two_two_iff`): for `s > 0`, + `f ∈ L_2(μ)` lies in `B^s_{2,2}` iff `∑_i (1 + λ(i))^(2s) |⟨e_i, f⟩|² < ∞`; +* **Littlewood–Paley blocks** (`ContinuousSpectralBasis.memBesov_two_iff_blockNorm_lt_top`) with + sharp cut-offs at the levels `2^k`; +* **the Sobolev space** `H^s` as a Sobolev space for the scheme in `L_2` + (`ContinuousSpectralBasis.sobolevSpace`), with Jackson's and Bernstein's inequalities of + constant `1`. + +The Besov spaces `B^s_{p,q}` of the scheme are defined for every `1 ≤ p ≤ ∞` by +`FunctionScheme.MemBesov`; their embeddings need the Nikolskii property +`FunctionScheme.HasNikolskii`, which the torus has (`Torus.hasNikolskii_fourierEigenbasis`). +-/ + +@[expose] public section + +open MeasureTheory FunctionScheme +open scoped ENNReal BoundedContinuousFunction lp + +variable {M : Type*} [TopologicalSpace M] [MeasurableSpace M] [BorelSpace M] + +/-- A **continuous spectral basis** of `L_2(μ)`: a Hilbert basis `(e_i)` of `L_2(μ)` with a level +`λ : ι → ℕ` that takes each value finitely often (a spectral scheme), together with bounded +continuous functions `ẽ_i` whose `L_2` classes are the `e_i`. The eigenfunctions of the +Laplace–Beltrami operator of a compact Riemannian manifold, with the level `⌊√λ⌋` of the +eigenvalue `λ`, are the model; their continuity is elliptic regularity. On a bounded open set of +`ℝ^d` the Dirichlet eigenbasis is a spectral scheme (`Rd.dirichletScheme`), and so are the Neumann +eigenbasis of a bounded Lipschitz domain (`Rd.BoundedLipschitzDomain.neumannScheme`) and the +eigenbasis of the chart form of a compact manifold (`Manifold.BesovAtlas.chartScheme`). The data of +the structure are the basis, its levels and its continuous representatives; it enters the +theorems as a hypothesis, and the Fourier basis of the torus is an instance +(`Torus.fourierEigenbasis`). -/ +structure ContinuousSpectralBasis (ι : Type*) (μ : Measure M) [IsFiniteMeasure μ] + extends SpectralScheme ι (Lp ℂ 2 μ) where + /-- The continuous representatives of the basis elements. -/ + basisFun : ι → (M →ᵇ ℂ) + /-- The `L_2` class of `ẽ_i` is the basis element `e_i`. -/ + toLp_basisFun : ∀ i, BoundedContinuousFunction.toLp (E := ℂ) 2 μ ℂ (basisFun i) = basis i + +namespace ContinuousSpectralBasis + +variable {ι : Type*} {μ : Measure M} [IsFiniteMeasure μ] (B : ContinuousSpectralBasis ι μ) + +/-- The **span of the continuous basis functions `ẽ_i` of level `< n`**, a space of bounded +continuous functions. -/ +noncomputable def basisSpan (n : ℕ) : Submodule ℂ (M →ᵇ ℂ) := + Submodule.span ℂ (B.basisFun '' {i | B.level i < n}) + +/-- No basis function has level `< 0`. -/ +@[simp] +theorem basisSpan_zero : B.basisSpan 0 = ⊥ := by simp [basisSpan] + +/-- The spans increase with the level. -/ +theorem basisSpan_mono : Monotone B.basisSpan := fun _ _ h => + Submodule.span_mono (Set.image_mono fun _ hi => lt_of_lt_of_le hi h) + +/-- A basis function `ẽ_i` of level `< n` lies in the span of level `< n`. -/ +theorem basisFun_mem_basisSpan {n : ℕ} {i : ι} (hi : B.level i < n) : + B.basisFun i ∈ B.basisSpan n := + Submodule.subset_span ⟨i, hi, rfl⟩ + +/-- The **scheme of the basis functions**: the approximants of complexity `n` are the +combinations of the continuous basis functions `ẽ_i` of level `< n`. -/ +noncomputable def basisScheme : FunctionScheme M := + ApproximationScheme.ofSubmodules (fun n => (B.basisSpan n).restrictScalars ℝ) + (by simp) (fun _ _ h => B.basisSpan_mono h) + +/-- The approximants of the scheme of the basis functions are their spans. -/ +@[simp] +theorem mem_basisScheme {n : ℕ} {a : M →ᵇ ℂ} : a ∈ B.basisScheme n ↔ a ∈ B.basisSpan n := + Iff.rfl + +/-- **The scheme in `L_2` is the spectral scheme**: the `L_2` classes of the combinations of +the continuous basis functions of level `< n` are the combinations of the basis elements of +level `< n`. -/ +theorem toLp_basisScheme_eq : B.basisScheme.toLp μ 2 = B.toScheme := by + ext n f + change f ∈ (BoundedContinuousFunction.toLp (E := ℂ) 2 μ ℝ) '' (B.basisSpan n : Set _) ↔ + f ∈ (B.span n : Set _) + have hmap : (BoundedContinuousFunction.toLp (E := ℂ) 2 μ ℝ : _ → _) '' (B.basisSpan n : Set _) + = SetLike.coe ((B.basisSpan n).map + (BoundedContinuousFunction.toLp (E := ℂ) 2 μ ℂ).toLinearMap) := by + rw [Submodule.map_coe]; rfl + rw [hmap, basisSpan, Submodule.map_span, ← Set.image_comp] + have hset : ((BoundedContinuousFunction.toLp (E := ℂ) 2 μ ℂ).toLinearMap ∘ B.basisFun) '' + {i | B.level i < n} = B.basis '' {i | B.level i < n} := by + ext g + simp only [Set.mem_image, Function.comp_apply, ContinuousLinearMap.coe_coe, B.toLp_basisFun] + rw [hset] + rfl + +/-! ### The spectral theory in `L_2` -/ + +variable {s : ℝ} {q : ℝ≥0∞} + +/-- **`B^s_{2,2} = H^s`** for a continuous spectral basis: for `s > 0`, `f ∈ L_2(μ)` lies in +`B^s_{2,2}` iff `∑_i (1 + λ(i))^(2s) |⟨e_i, f⟩|² < ∞`. -/ +theorem memBesov_two_two_iff (hs : 0 < s) (f : Lp ℂ 2 μ) : + B.basisScheme.MemBesov μ 2 s 2 f ↔ + Memℓp (fun i => ((((1 + B.level i : ℕ) : ℝ) ^ s : ℝ) : ℂ) * B.basis.repr f i) 2 := by + change (B.basisScheme.toLp μ 2).MemApprox s 2 f ↔ _ + rw [toLp_basisScheme_eq] + exact B.memApprox_two_iff hs f + +/-- **The Littlewood–Paley characterisation of `B^s_{2,q}`** for a continuous spectral basis, +with sharp cut-offs at the levels `2^k`: for `s > 0` and `1 ≤ q ≤ ∞`, `f ∈ B^s_{2,q}` iff +`‖P_1 f‖ + ‖(2^(ks) ‖Δ_k f‖_2)_k‖_{ℓ_q} < ∞`, with +`‖Δ_k f‖_2² = ∑_{2^k ≤ λ(i) < 2^(k+1)} |⟨e_i, f⟩|²`. -/ +theorem memBesov_two_iff_blockNorm_lt_top (hs : 0 < s) (hq : 1 ≤ q) (f : Lp ℂ 2 μ) : + B.basisScheme.MemBesov μ 2 s q f ↔ B.projectionScheme.blockNorm s q f < ∞ := by + change (B.basisScheme.toLp μ 2).MemApprox s q f ↔ _ + rw [toLp_basisScheme_eq] + exact B.memApprox_iff_blockNorm_lt_top hs hq + +/-- The **Sobolev space `H^s`** of a continuous spectral basis, `s > 0`, as a Sobolev space for +the scheme of the basis functions in `L_2`: the image of `ℓ²(ι)` under +`c ↦ ∑_i (1 + λ(i))^(-s) c_i e_i`, with Jackson's and Bernstein's inequalities of order `s` and +constant `1`. -/ +noncomputable def sobolevSpace (s : ℝ) (hs : 0 < s) : B.basisScheme.SobolevSpace μ 2 ℓ²(ι, ℂ) := + ApproximationScheme.SmoothnessSpace.congr B.toLp_basisScheme_eq.symm + (B.toSmoothnessSpace s hs) + +/-- `H^s` has order `s`. -/ +@[simp] +theorem sobolevSpace_order (hs : 0 < s) : (B.sobolevSpace s hs).order = s := rfl + +/-- The embedding of `H^s` is `J_s`. -/ +theorem sobolevSpace_incl (hs : 0 < s) (c : ℓ²(ι, ℂ)) : + (B.sobolevSpace s hs).incl c = B.sobolevEmbed s hs.le c := rfl + +/-- **Membership in `H^s`** through the coefficients: `f ∈ L_2(μ)` lies in the range of the +Sobolev embedding iff `∑_i (1 + λ(i))^(2s) |⟨e_i, f⟩|² < ∞`. -/ +theorem mem_range_sobolev_iff (hs : 0 < s) (f : Lp ℂ 2 μ) : + f ∈ Set.range (B.sobolevSpace s hs).incl ↔ + Memℓp (fun i => ((((1 + B.level i : ℕ) : ℝ) ^ s : ℝ) : ℂ) * B.basis.repr f i) 2 := + B.mem_range_sobolevEmbed_iff s hs.le f + +/-- **`H^s ⊆ B^s_{2,∞}`**, from Jackson's inequality. -/ +theorem sobolev_memBesov_top (hs : 0 < s) (c : ℓ²(ι, ℂ)) : + B.basisScheme.MemBesov μ 2 s ∞ ((B.sobolevSpace s hs).incl c) := + (B.sobolevSpace s hs).memApprox_top c + +/-- **`B^t_{2,q} ⊆ H^s` for `t > s`**, from Bernstein's inequality. -/ +theorem exists_sobolev_of_memBesov (hs : 0 < s) {t : ℝ} (hst : s < t) (hq : 1 ≤ q) + {f : Lp ℂ 2 μ} (hf : B.basisScheme.MemBesov μ 2 t q f) : + ∃ c : ℓ²(ι, ℂ), (B.sobolevSpace s hs).incl c = f := + (B.sobolevSpace s hs).exists_eq_of_lt hst hq hf + +end ContinuousSpectralBasis diff --git a/LeanPool/FunctionSpaces/MeasureSpaces/Spectral/LocalWeyl.lean b/LeanPool/FunctionSpaces/MeasureSpaces/Spectral/LocalWeyl.lean new file mode 100644 index 0000000000..a250716b7a --- /dev/null +++ b/LeanPool/FunctionSpaces/MeasureSpaces/Spectral/LocalWeyl.lean @@ -0,0 +1,304 @@ +/- +Copyright (c) 2026 Mario Ullrich. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Mario Ullrich +-/ +module + +public import LeanPool.FunctionSpaces.MeasureSpaces.Spectral.ContinuousSpectralBasis +public import LeanPool.FunctionSpaces.Analysis.Lp.Interpolation + +/- +Modified for Lean Pool: module names and imports adapted. +-/ + +/-! +# The local Weyl bound, the Nikolskii inequality and continuity + +A continuous spectral basis `(e_i)` on `M` (`ContinuousSpectralBasis`), with continuous basis +functions `ẽ_i`, satisfies the **local Weyl bound** of dimension `D` with constant `C` +(`ContinuousSpectralBasis.LocalWeylBound`) if + +`∑_{λ(i) < n} |ẽ_i(x)|² ≤ C n^D` for every `x ∈ M` and `n ≥ 1`. + +For the Laplace–Beltrami operator of a compact Riemannian manifold of dimension `d` this is +Hörmander's local Weyl law with `D = d`; on the torus `𝕋^d` it is the count of at most `(2n)^d` +frequencies of degree `< n` (`Torus.localWeylBound_fourierEigenbasis`). + +* **The Nikolskii inequality from `L_2` to `L_∞`** + (`ContinuousSpectralBasis.norm_sq_le_of_localWeyl`): for `a` in the span of the basis + functions of level `< n`, `‖a‖_∞² ≤ C n^D ‖a‖_2²`, by the Cauchy–Schwarz inequality in + `a(x) = ∑_i c_i ẽ_i(x)` and Parseval's identity `‖a‖_2² = ∑_i |c_i|²`. +* **The Nikolskii inequality for `1 ≤ p ≤ 2`** + (`ContinuousSpectralBasis.norm_rpow_le_of_localWeyl`): `‖a‖_∞^p ≤ C n^D ‖a‖_p^p`, since + `‖a‖_2² ≤ ‖a‖_∞^(2-p) ‖a‖_p^p`. For `p > 2` the inequality with `n^(D/p)` does not follow this + way: the proof on the torus raises trigonometric polynomials of degree `< n` to the power `m`, + which have degree `< mn`; for a general basis, products of functions of `basisSpan n` need not lie + in any `basisSpan m`. The embedding theorems of `FunctionSpaces.MeasureSpaces.Besov.Embeddings` + apply to the scheme of the basis functions under the hypothesis `FunctionScheme.HasNikolskii`. +* **Continuity of `H^s` for `s > D/2`** + (`ContinuousSpectralBasis.exists_continuous_of_localWeyl`): every `f ∈ L_2(μ)` with + `∑_i (1 + λ(i))^(2s) |⟨e_i, f⟩|² < ∞` has a bounded continuous representative. The partial + sums `S_n f = ∑_{λ(i) < n} ⟨e_i, f⟩ ẽ_i` are continuous + (`ContinuousSpectralBasis.partialSum`), and on the dyadic levels the Nikolskii inequality and + the truncation error `‖f - P_n f‖_2 ≤ n^(-s) ‖c‖` give + `‖S_{2^(k+1)} f - S_{2^k} f‖_∞ ≤ C^(1/2) 2^(D/2) ‖c‖ (2^(D/2 - s))^k`, a geometric series; the + uniform limit represents `f`. +-/ + +@[expose] public section + +open MeasureTheory Filter Topology +open scoped ENNReal BoundedContinuousFunction InnerProductSpace lp + +/-- `(2^k)^t = (2^t)^k` for real `t` (Mathlib's `Real.rpow_pow_comm`). -/ +theorem Real.natCast_two_pow_rpow (t : ℝ) (k : ℕ) : ((2 ^ k : ℕ) : ℝ) ^ t = ((2 : ℝ) ^ t) ^ k := by + rw [Nat.cast_pow, Nat.cast_ofNat] + exact (Real.rpow_pow_comm zero_le_two t k).symm + +variable {M : Type*} [TopologicalSpace M] [MeasurableSpace M] [BorelSpace M] + +namespace ContinuousSpectralBasis + +variable {ι : Type*} {μ : Measure M} [IsFiniteMeasure μ] (B : ContinuousSpectralBasis ι μ) + +/-- The finite set of the indices of level `< n`. -/ +noncomputable def levelSet (n : ℕ) : Finset ι := (B.finite_level n).toFinset + +/-- `i` lies in the level set `< n` iff `λ(i) < n`. -/ +@[simp] +theorem mem_levelSet {n : ℕ} {i : ι} : i ∈ B.levelSet n ↔ B.level i < n := by + simp [levelSet] + +/-- The **local Weyl bound** of dimension `D` with constant `C ≥ 0`: +`∑_{λ(i) < n} |ẽ_i(x)|² ≤ C n^D` for every point `x` and every `n ≥ 1`. A hypothesis on the +basis; the torus satisfies it (`Torus.localWeylBound_fourierEigenbasis`). -/ +structure LocalWeylBound (D C : ℝ) : Prop where + /-- The constant is nonnegative. -/ + nonneg : 0 ≤ C + /-- `∑_{λ(i) < n} |ẽ_i(x)|² ≤ C n^D` for every `n ≥ 1` and every `x`. -/ + le : ∀ n : ℕ, 1 ≤ n → ∀ x : M, ∑ i ∈ B.levelSet n, ‖B.basisFun i x‖ ^ 2 ≤ C * (n : ℝ) ^ D + +/-- An element of the span of level `< n` is a combination `∑_{λ(i) < n} c_i ẽ_i`. -/ +theorem exists_sum_of_mem_basisSpan {n : ℕ} {a : M →ᵇ ℂ} (ha : a ∈ B.basisSpan n) : + ∃ c : ι → ℂ, a = ∑ i ∈ B.levelSet n, c i • B.basisFun i := by + classical + obtain ⟨t, ht, c, hc⟩ := (Submodule.mem_span_image_iff_exists_fun ℂ).1 ha + have hsub : t ⊆ B.levelSet n := fun i hi => B.mem_levelSet.2 (ht hi) + refine ⟨fun i => if hi : i ∈ t then c ⟨i, hi⟩ else 0, ?_⟩ + calc a = ∑ i ∈ t, (if hi : i ∈ t then c ⟨i, hi⟩ else 0) • B.basisFun i := by + rw [← hc, ← Finset.sum_coe_sort t] + refine Finset.sum_congr rfl fun i _ => ?_ + simp + _ = _ := Finset.sum_subset hsub fun i _ hi => by simp [hi] + +/-- **Parseval's identity for combinations of the basis functions**: +`‖∑ c_i ẽ_i‖_2² = ∑ |c_i|²` (Mathlib's `OrthogonalFamily.norm_sum` for the orthonormal basis). -/ +theorem norm_toLp_sum_sq (t : Finset ι) (c : ι → ℂ) : + ‖BoundedContinuousFunction.toLp (E := ℂ) 2 μ ℂ (∑ i ∈ t, c i • B.basisFun i)‖ ^ 2 = + ∑ i ∈ t, ‖c i‖ ^ 2 := by + have hsum : BoundedContinuousFunction.toLp (E := ℂ) 2 μ ℂ (∑ i ∈ t, c i • B.basisFun i) = + ∑ i ∈ t, c i • B.basis i := by + rw [map_sum]; simp_rw [map_smul, B.toLp_basisFun] + rw [hsum] + exact B.basis.orthonormal.orthogonalFamily.norm_sum c t + +variable {B} + +/-- **The Nikolskii inequality from `L_2` to `L_∞`** under the local Weyl bound: for `a` in the +span of level `< n`, `n ≥ 1`, `‖a‖_∞² ≤ C n^D ‖a‖_2²`. -/ +theorem norm_sq_le_of_localWeyl {D C : ℝ} (hW : B.LocalWeylBound D C) {n : ℕ} (hn : 1 ≤ n) + {a : M →ᵇ ℂ} (ha : a ∈ B.basisSpan n) : + ‖a‖ ^ 2 ≤ C * (n : ℝ) ^ D * ‖BoundedContinuousFunction.toLp (E := ℂ) 2 μ ℂ a‖ ^ 2 := by + obtain ⟨c, rfl⟩ := B.exists_sum_of_mem_basisSpan ha + rw [B.norm_toLp_sum_sq] + set t := B.levelSet n + set N := ∑ i ∈ t, ‖c i‖ ^ 2 + have hK : 0 ≤ C * (n : ℝ) ^ D := mul_nonneg hW.nonneg (by positivity) + have hN : 0 ≤ N := Finset.sum_nonneg fun _ _ => by positivity + have hpt : ∀ x, ‖(∑ i ∈ t, c i • B.basisFun i) x‖ ≤ Real.sqrt (C * (n : ℝ) ^ D * N) := + fun x => by + rw [Real.le_sqrt (norm_nonneg _) (by positivity)] + calc ‖(∑ i ∈ t, c i • B.basisFun i) x‖ ^ 2 = ‖∑ i ∈ t, c i * B.basisFun i x‖ ^ 2 := by + simp + _ ≤ (∑ i ∈ t, ‖c i‖ * ‖B.basisFun i x‖) ^ 2 := by + gcongr + exact (norm_sum_le _ _).trans (Finset.sum_le_sum fun i _ => (norm_mul _ _).le) + _ ≤ N * ∑ i ∈ t, ‖B.basisFun i x‖ ^ 2 := Finset.sum_mul_sq_le_sq_mul_sq t _ _ + _ ≤ N * (C * (n : ℝ) ^ D) := by gcongr; exact hW.le n hn x + _ = C * (n : ℝ) ^ D * N := by ring + have hsup := (BoundedContinuousFunction.norm_le (Real.sqrt_nonneg _)).2 hpt + calc ‖∑ i ∈ t, c i • B.basisFun i‖ ^ 2 ≤ Real.sqrt (C * (n : ℝ) ^ D * N) ^ 2 := by gcongr + _ = C * (n : ℝ) ^ D * N := Real.sq_sqrt (by positivity) + +/-- The Nikolskii inequality from `L_2` to `L_∞`, unsquared: +`‖a‖_∞ ≤ (C n^D)^(1/2) ‖a‖_2`. -/ +theorem norm_le_sqrt_mul_of_localWeyl {D C : ℝ} (hW : B.LocalWeylBound D C) {n : ℕ} + (hn : 1 ≤ n) {a : M →ᵇ ℂ} (ha : a ∈ B.basisSpan n) : + ‖a‖ ≤ Real.sqrt (C * (n : ℝ) ^ D) * ‖BoundedContinuousFunction.toLp (E := ℂ) 2 μ ℂ a‖ := by + rw [← Real.sqrt_sq (norm_nonneg (BoundedContinuousFunction.toLp (E := ℂ) 2 μ ℂ a)), + ← Real.sqrt_mul (mul_nonneg hW.nonneg (by positivity))] + exact Real.le_sqrt_of_sq_le (norm_sq_le_of_localWeyl hW hn ha) + +/-- **The Nikolskii inequality for `1 ≤ p ≤ 2`** under the local Weyl bound: for `a` in the span +of level `< n`, `n ≥ 1`, `‖a‖_∞^p ≤ C n^D ‖a‖_p^p`. The case `p = 2` gives +`‖a‖_∞² ≤ C n^D ‖a‖_2²`, and `‖a‖_2² ≤ ‖a‖_∞^(2-p) ‖a‖_p^p` +(`MeasureTheory.toReal_eLpNorm_le_rpow_mul`). -/ +theorem norm_rpow_le_of_localWeyl {D C : ℝ} (hW : B.LocalWeylBound D C) {n : ℕ} (hn : 1 ≤ n) + {a : M →ᵇ ℂ} (ha : a ∈ B.basisSpan n) {p : ℝ≥0∞} (hp : 1 ≤ p) (hp2 : p ≤ 2) : + ‖a‖ ^ p.toReal ≤ C * (n : ℝ) ^ D * (eLpNorm a p μ).toReal ^ p.toReal := by + have hp' : p ≠ ∞ := ne_top_of_le_ne_top (by norm_num) hp2 + set P := p.toReal + have hP1 : 1 ≤ P := ENNReal.one_le_toReal_of_one_le hp hp' + have hP2 : P ≤ 2 := by + have h := ENNReal.toReal_mono (by norm_num) hp2 + simpa using h + set K := C * (n : ℝ) ^ D + have hK : 0 ≤ K := mul_nonneg hW.nonneg (by positivity) + set N := (eLpNorm a p μ).toReal + have hN : 0 ≤ N := ENNReal.toReal_nonneg + set X := (eLpNorm a 2 μ).toReal + -- interpolation between `L_p` and `L_∞` at the exponent `2` + have hint := toReal_eLpNorm_le_rpow_mul (μ := μ) a.continuous.aestronglyMeasurable + (norm_nonneg a) (Eventually.of_forall a.norm_coe_le_norm) + (zero_lt_one.trans_le hp).ne' hp2 (by norm_num) + simp only [ENNReal.toReal_ofNat] at hint + have hX : X ^ (2 : ℝ) ≤ ‖a‖ ^ (2 - P) * N ^ P := by + calc X ^ (2 : ℝ) ≤ (‖a‖ ^ (1 - P / 2) * N ^ (P / 2)) ^ (2 : ℝ) := + Real.rpow_le_rpow ENNReal.toReal_nonneg hint (by norm_num) + _ = ‖a‖ ^ (2 - P) * N ^ P := by + rw [Real.mul_rpow (by positivity) (by positivity), ← Real.rpow_mul (norm_nonneg _), + ← Real.rpow_mul hN] + congr 2 <;> ring + have hchain : ‖a‖ ^ (2 : ℝ) ≤ K * (‖a‖ ^ (2 - P) * N ^ P) := by + have h2 := norm_sq_le_of_localWeyl hW hn ha + rw [BoundedContinuousFunction.norm_toLp_eq_toReal_eLpNorm] at h2 + calc ‖a‖ ^ (2 : ℝ) = ‖a‖ ^ 2 := Real.rpow_two _ + _ ≤ K * X ^ 2 := h2 + _ = K * X ^ (2 : ℝ) := by rw [Real.rpow_two] + _ ≤ K * (‖a‖ ^ (2 - P) * N ^ P) := by gcongr + rcases (norm_nonneg a).eq_or_lt with h0 | hpos + · rw [← h0, Real.zero_rpow (by linarith)] + exact mul_nonneg hK (Real.rpow_nonneg hN _) + have hsplit : ‖a‖ ^ (2 : ℝ) = ‖a‖ ^ (2 - P) * ‖a‖ ^ P := by + rw [← Real.rpow_add hpos, sub_add_cancel] + rw [hsplit, mul_left_comm] at hchain + exact le_of_mul_le_mul_left hchain (Real.rpow_pos_of_pos hpos _) + +/-- **The Nikolskii inequality for `1 ≤ p ≤ 2`**, unpowered: +`‖a‖_∞ ≤ C^(1/p) n^(D/p) ‖a‖_p`. -/ +theorem norm_le_of_localWeyl {D C : ℝ} (hW : B.LocalWeylBound D C) {n : ℕ} (hn : 1 ≤ n) + {a : M →ᵇ ℂ} (ha : a ∈ B.basisSpan n) {p : ℝ≥0∞} (hp : 1 ≤ p) (hp2 : p ≤ 2) : + ‖a‖ ≤ C ^ p.toReal⁻¹ * (n : ℝ) ^ (D * p.toReal⁻¹) * (eLpNorm a p μ).toReal := by + have hp' : p ≠ ∞ := ne_top_of_le_ne_top (by norm_num) hp2 + set P := p.toReal + have hP0 : 0 < P := zero_lt_one.trans_le (ENNReal.one_le_toReal_of_one_le hp hp') + set N := (eLpNorm a p μ).toReal + have hN : 0 ≤ N := ENNReal.toReal_nonneg + have hC := hW.nonneg + have h := norm_rpow_le_of_localWeyl hW hn ha hp hp2 + calc ‖a‖ = (‖a‖ ^ P) ^ P⁻¹ := (Real.rpow_rpow_inv (norm_nonneg a) hP0.ne').symm + _ ≤ (C * (n : ℝ) ^ D * N ^ P) ^ P⁻¹ := Real.rpow_le_rpow (by positivity) h (by positivity) + _ = C ^ P⁻¹ * (n : ℝ) ^ (D * P⁻¹) * N := by + rw [Real.mul_rpow (by positivity) (by positivity), Real.rpow_rpow_inv hN hP0.ne', + Real.mul_rpow hC (by positivity), ← Real.rpow_mul (by positivity)] + +/-! ### Continuity of `H^s` for `s > D/2` -/ + +variable (B) + +/-- The **partial sum** `S_n f = ∑_{λ(i) < n} ⟨e_i, f⟩ ẽ_i`, a bounded continuous function. -/ +noncomputable def partialSum (n : ℕ) (f : Lp ℂ 2 μ) : M →ᵇ ℂ := + ∑ i ∈ B.levelSet n, B.basis.repr f i • B.basisFun i + +/-- The partial sum lies in the span of level `< n`. -/ +theorem partialSum_mem_basisSpan (n : ℕ) (f : Lp ℂ 2 μ) : B.partialSum n f ∈ B.basisSpan n := + Submodule.sum_mem _ fun _ hi => + Submodule.smul_mem _ _ (B.basisFun_mem_basisSpan (B.mem_levelSet.1 hi)) + +/-- The `L_2` class of the partial sum is the truncation `P_n f`. -/ +theorem toLp_partialSum (n : ℕ) (f : Lp ℂ 2 μ) : + BoundedContinuousFunction.toLp (E := ℂ) 2 μ ℂ (B.partialSum n f) = B.truncate n f := by + rw [partialSum, map_sum] + simp_rw [map_smul, B.toLp_basisFun] + rfl + +/-- For `m ≤ n`, `‖P_n f - P_m f‖_2 ≤ ‖f - P_m f‖_2`: the difference keeps the coefficients of +the levels in `[m, n)`. -/ +theorem norm_truncate_sub_truncate_le {m n : ℕ} (hmn : m ≤ n) (f : Lp ℂ 2 μ) : + ‖B.truncate n f - B.truncate m f‖ ≤ ‖f - B.truncate m f‖ := by + have hsub : B.truncate n f - B.truncate m f = B.truncate n (f - B.truncate m f) := by + rw [sub_eq_add_neg f, B.truncate_add, ← neg_one_smul ℂ (B.truncate m f), B.truncate_smul, + B.truncate_of_mem (B.span_mono hmn (B.truncate_mem_span m f)), neg_one_smul, + ← sub_eq_add_neg] + rw [hsub] + exact B.norm_truncate_le n _ + +variable {B} + +/-- **The dyadic steps of the partial sums** of a Sobolev element `f = J_s c` under the local +Weyl bound: `‖S_{2^(k+1)} f - S_{2^k} f‖_∞ ≤ C^(1/2) 2^(D/2) ‖c‖ (2^(D/2 - s))^k`. -/ +theorem norm_partialSum_succ_sub_le {D C : ℝ} (hW : B.LocalWeylBound D C) {s : ℝ} (hs : 0 ≤ s) + (c : ℓ²(ι, ℂ)) (k : ℕ) : + ‖B.partialSum (2 ^ (k + 1)) (B.sobolevEmbed s hs c) - + B.partialSum (2 ^ k) (B.sobolevEmbed s hs c)‖ ≤ + Real.sqrt C * (2 : ℝ) ^ (D / 2) * ‖c‖ * ((2 : ℝ) ^ (D / 2 - s)) ^ k := by + set f := B.sobolevEmbed s hs c + have hC := hW.nonneg + have hmem : B.partialSum (2 ^ (k + 1)) f - B.partialSum (2 ^ k) f ∈ B.basisSpan (2 ^ (k + 1)) := + Submodule.sub_mem _ (B.partialSum_mem_basisSpan _ f) + (B.basisSpan_mono (Nat.pow_le_pow_right two_pos (Nat.le_succ k)) + (B.partialSum_mem_basisSpan _ f)) + have hL2 : ‖BoundedContinuousFunction.toLp (E := ℂ) 2 μ ℂ + (B.partialSum (2 ^ (k + 1)) f - B.partialSum (2 ^ k) f)‖ ≤ + ((2 ^ k : ℕ) : ℝ) ^ (-s) * ‖c‖ := by + rw [map_sub, B.toLp_partialSum, B.toLp_partialSum] + exact (B.norm_truncate_sub_truncate_le + (Nat.pow_le_pow_right two_pos (Nat.le_succ k)) f).trans + (B.norm_sub_truncate_le s hs (Nat.one_le_two_pow) c) + have h2 : (0 : ℝ) < 2 := two_pos + calc _ ≤ Real.sqrt (C * ((2 ^ (k + 1) : ℕ) : ℝ) ^ D) * (((2 ^ k : ℕ) : ℝ) ^ (-s) * ‖c‖) := + (norm_le_sqrt_mul_of_localWeyl hW Nat.one_le_two_pow hmem).trans + (mul_le_mul_of_nonneg_left hL2 (Real.sqrt_nonneg _)) + _ = Real.sqrt C * (2 : ℝ) ^ (D / 2) * ‖c‖ * ((2 : ℝ) ^ (D / 2 - s)) ^ k := by + have hsq : ((2 : ℝ) ^ (D / 2)) ^ 2 = (2 : ℝ) ^ D := by + rw [sq, ← Real.rpow_add two_pos]; congr 1; ring + have ha : Real.sqrt (((2 ^ (k + 1) : ℕ) : ℝ) ^ D) = ((2 : ℝ) ^ (D / 2)) ^ (k + 1) := by + rw [show ((2 ^ (k + 1) : ℕ) : ℝ) ^ D = (((2 : ℝ) ^ (D / 2)) ^ (k + 1)) ^ 2 by + rw [Real.natCast_two_pow_rpow, ← pow_mul, mul_comm, pow_mul, hsq], + Real.sqrt_sq (by positivity)] + have hd : (2 : ℝ) ^ (D / 2 - s) = (2 : ℝ) ^ (D / 2) * (2 : ℝ) ^ (-s) := by + rw [← Real.rpow_add two_pos, ← sub_eq_add_neg] + rw [Real.sqrt_mul hC, ha, Real.natCast_two_pow_rpow, hd, mul_pow] + ring + +/-- **Sobolev elements of order `s > D/2` are continuous** under the local Weyl bound of +dimension `D`: every `f ∈ L_2(μ)` with `∑_i (1 + λ(i))^(2s) |⟨e_i, f⟩|² < ∞` is the `L_2` class +of a bounded continuous function, the uniform limit of the partial sums `S_{2^k} f`. -/ +theorem exists_continuous_of_localWeyl {D C : ℝ} (hW : B.LocalWeylBound D C) {s : ℝ} + (hs : 0 < s) (hsD : D < 2 * s) {f : Lp ℂ 2 μ} + (hf : Memℓp (fun i => ((((1 + B.level i : ℕ) : ℝ) ^ s : ℝ) : ℂ) * B.basis.repr f i) 2) : + ∃ g : M →ᵇ ℂ, BoundedContinuousFunction.toLp (E := ℂ) 2 μ ℂ g = f := by + obtain ⟨c, rfl⟩ := (B.mem_range_sobolevEmbed_iff s hs.le f).2 hf + set f := B.sobolevEmbed s hs.le c + set u : ℕ → M →ᵇ ℂ := fun k => B.partialSum (2 ^ k) f + have hr : (2 : ℝ) ^ (D / 2 - s) < 1 := Real.rpow_lt_one_of_one_lt_of_neg one_lt_two (by linarith) + have hcauchy : CauchySeq u := by + refine cauchySeq_of_le_geometric _ (Real.sqrt C * (2 : ℝ) ^ (D / 2) * ‖c‖) hr fun k => ?_ + rw [dist_comm, dist_eq_norm] + exact norm_partialSum_succ_sub_le hW hs.le c k + obtain ⟨g, hg⟩ := cauchySeq_tendsto_of_complete hcauchy + refine ⟨g, tendsto_nhds_unique + ((BoundedContinuousFunction.toLp (E := ℂ) 2 μ ℂ).continuous.tendsto g |>.comp hg) ?_⟩ + -- the truncations `P_{2^k} f` converge to `f` + have hlim : Tendsto (fun k : ℕ => ((2 ^ k : ℕ) : ℝ) ^ (-s) * ‖c‖) atTop (𝓝 0) := by + simp_rw [Real.natCast_two_pow_rpow] + simpa using (tendsto_pow_atTop_nhds_zero_of_lt_one (by positivity) + (Real.rpow_lt_one_of_one_lt_of_neg one_lt_two (neg_lt_zero.2 hs))).mul_const ‖c‖ + rw [tendsto_iff_norm_sub_tendsto_zero] + refine squeeze_zero (fun k => norm_nonneg _) (fun k => ?_) hlim + change ‖BoundedContinuousFunction.toLp (E := ℂ) 2 μ ℂ (B.partialSum (2 ^ k) f) - f‖ ≤ _ + rw [B.toLp_partialSum, norm_sub_rev] + exact B.norm_sub_truncate_le s hs.le Nat.one_le_two_pow c + +end ContinuousSpectralBasis diff --git a/LeanPool/FunctionSpaces/Rd/Approximation/BandInverse.lean b/LeanPool/FunctionSpaces/Rd/Approximation/BandInverse.lean new file mode 100644 index 0000000000..c983f4d0ea --- /dev/null +++ b/LeanPool/FunctionSpaces/Rd/Approximation/BandInverse.lean @@ -0,0 +1,346 @@ +/- +Copyright (c) 2026 Mario Ullrich. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Mario Ullrich +-/ +module + +public import LeanPool.FunctionSpaces.Rd.Differences.DilatedDifferences +public import LeanPool.FunctionSpaces.Rd.Approximation.BandLimited +public import LeanPool.FunctionSpaces.ApproximationSpaces.Sequences.Lq + +/- +Modified for Lean Pool: module names and imports adapted. +-/ + +/-! +# The inverse inequality for band-limited functions + +For a band-limited `a ∈ E_j`, `a = Θ_j ⋆ a`, so every difference of `a` is the convolution of `a` +with a difference of the kernel: `Δ_h^r a = (Δ_h^r Θ_j) ⋆ a` (`Rd.higherDiff_conv_ae`). By Young's +inequality and the dilation `Δ_h^r Θ_j = (Δ_{2^j h}^r Θ)_{2^j}` (`Rd.higherDiff_dilate`), + +`‖Δ_h^r a‖_p ≤ ‖Δ_{2^j h}^r Θ‖_1 ‖a‖_p`. + +**Differences of Schwartz functions in `L_p`** (`Rd.lintegral_enorm_fwdDiff_rpow_le`): +`‖Δ_v G‖_p ≤ ‖∂_v G‖_p` for `1 ≤ p < ∞`. The fundamental theorem of calculus along the segment +from `x` to `x + v` gives `G(x + v) - G(x) = ∫_0^1 ∂_v G(x + t v) dt` +(`Rd.fwdDiff_schwartz_eq_integral`); Jensen's inequality on `(0, 1]` (`Rd.rpow_lintegral_Ioc_le`) +and Tonelli's theorem with the translation invariance of Lebesgue measure +(`Rd.lintegral_lintegral_Ioc_add_smul`) give the bound, with the cases `p = 1` and `p = 2` +(`Rd.lintegral_enorm_fwdDiff_le`, `Rd.eLpNorm_fwdDiff_schwartz_le`). The difference +`Δ_v f = f(· + v) - f` is a bounded operator on `L_2` (`Rd.fwdDiffL2`). + +**Higher differences in `L_1`** (`Rd.lintegral_enorm_higherDiff_schwartz_le`): +`‖Δ_v^r G‖_1 ≤ ‖v‖^r ‖D^r G‖_1`. Differences commute with line derivatives +(`Rd.lineDerivOp_fwdDiffSchwartz`), so induction gives `‖Δ_v^r G‖_1 ≤ ‖∂_v^r G‖_1`, and +`|∂_v^r G(x)| ≤ ‖v‖^r ‖D^r G(x)‖`. Mathlib's Schwartz space provides the translations, the line +derivatives `∂_v` and the integrability of all derivatives. + +**The inverse inequality** (`Rd.lpModulus_le_of_mem_bandSpace`): for `a ∈ E_j`, +`ω_r(a, 2^(-k))_p ≤ C 2^(-(k-j) r) ‖a‖_p` with `C = 2^r + ‖D^r Θ‖_1` (for `k < j` the bound +`ω_r ≤ 2^r ‖a‖_p` is used). +-/ + +@[expose] public section + +open MeasureTheory Filter Topology Module +open scoped ENNReal SchwartzMap LineDeriv + +namespace Rd + +open ENNReal (dyadicWeight) + +variable {V : Type*} [NormedAddCommGroup V] [InnerProductSpace ℝ V] [FiniteDimensional ℝ V] + [MeasurableSpace V] [BorelSpace V] + +/-! ### Differences of Schwartz functions -/ + +/-- The forward difference `G ↦ G(· + v) - G` as an operator on Schwartz functions. -/ +noncomputable def fwdDiffSchwartz (v : V) : 𝓢(V, ℂ) →L[ℝ] 𝓢(V, ℂ) := + SchwartzMap.compSubConstCLM ℝ (-v) - ContinuousLinearMap.id ℝ _ + +omit [FiniteDimensional ℝ V] [MeasurableSpace V] [BorelSpace V] in +/-- The Schwartz forward difference is the forward difference. -/ +theorem coe_fwdDiffSchwartz (v : V) (G : 𝓢(V, ℂ)) : + (fwdDiffSchwartz v G : V → ℂ) = fwdDiff v G := by + funext x + simp [fwdDiffSchwartz, fwdDiff, sub_neg_eq_add] + +omit [FiniteDimensional ℝ V] [MeasurableSpace V] [BorelSpace V] in +/-- **Differences commute with line derivatives**: `∂_u (Δ_v G) = Δ_v (∂_u G)`. -/ +theorem lineDerivOp_fwdDiffSchwartz (u v : V) (G : 𝓢(V, ℂ)) : + ∂_{u} (fwdDiffSchwartz v G) = fwdDiffSchwartz v (∂_{u} G) := by + ext x + have hcoe : ((fwdDiffSchwartz v G : 𝓢(V, ℂ)) : V → ℂ) = fun y => G (y + v) - G y := + coe_fwdDiffSchwartz v G + have hd : DifferentiableAt ℝ (fun y => G (y + v)) x := + G.differentiableAt.comp x (differentiableAt_id.add_const v) + rw [SchwartzMap.lineDerivOp_apply_eq_fderiv, hcoe, fderiv_fun_sub hd G.differentiableAt, + fderiv_comp_add_right, coe_fwdDiffSchwartz, fwdDiff, SchwartzMap.lineDerivOp_apply_eq_fderiv, + SchwartzMap.lineDerivOp_apply_eq_fderiv] + rfl + +omit [FiniteDimensional ℝ V] [MeasurableSpace V] [BorelSpace V] in +/-- Iterated line derivatives commute with differences. -/ +theorem iteratedLineDerivOp_fwdDiffSchwartz (v : V) (r : ℕ) (G : 𝓢(V, ℂ)) : + ∂^{fun _ : Fin r => v} (fwdDiffSchwartz v G) = + fwdDiffSchwartz v (∂^{fun _ : Fin r => v} G) := by + induction r with + | zero => rfl + | succ r ih => + rw [LineDeriv.iteratedLineDerivOp_succ_left, LineDeriv.iteratedLineDerivOp_succ_left] + exact (congrArg _ ih).trans (lineDerivOp_fwdDiffSchwartz v v _) + +omit [FiniteDimensional ℝ V] [MeasurableSpace V] [BorelSpace V] in +/-- **The fundamental theorem of calculus along a segment**: for a Schwartz function `G`, +`G(x + v) - G(x) = ∫_0^1 ∂_v G(x + t v) dt` (Mathlib's +`intervalIntegral.integral_eq_sub_of_hasDerivAt`). -/ +theorem fwdDiff_schwartz_eq_integral (v : V) (G : 𝓢(V, ℂ)) (x : V) : + fwdDiff v (G : V → ℂ) x = ∫ t in (0 : ℝ)..1, (∂_{v} G : 𝓢(V, ℂ)) (x + t • v) := by + have hderiv : ∀ t ∈ Set.uIcc (0 : ℝ) 1, HasDerivAt (fun t : ℝ => G (x + t • v)) + ((∂_{v} G : 𝓢(V, ℂ)) (x + t • v)) t := fun t _ => by + rw [SchwartzMap.lineDerivOp_apply_eq_fderiv] + have h1 : HasDerivAt (fun t : ℝ => x + t • v) v t := by + simpa using ((hasDerivAt_id t).smul_const v).const_add x + exact (G.hasFDerivAt (x + t • v)).comp_hasDerivAt t h1 + have hcont : Continuous fun t : ℝ => (∂_{v} G : 𝓢(V, ℂ)) (x + t • v) := + (SchwartzMap.continuous _).comp (continuous_const.add (continuous_id.smul continuous_const)) + rw [intervalIntegral.integral_eq_sub_of_hasDerivAt hderiv (hcont.intervalIntegrable 0 1)] + simp [fwdDiff] + +omit [FiniteDimensional ℝ V] [MeasurableSpace V] [BorelSpace V] in +/-- **A difference by the line derivative, pointwise**: for a Schwartz function `G`, +`|G(x + v) - G(x)| ≤ ∫_0^1 |∂_v G(x + t v)| dt` (`Rd.fwdDiff_schwartz_eq_integral`). -/ +theorem enorm_fwdDiff_schwartz_le_lintegral (v : V) (G : 𝓢(V, ℂ)) (x : V) : + ‖fwdDiff v (G : V → ℂ) x‖ₑ ≤ + ∫⁻ t in Set.Ioc (0 : ℝ) 1, ‖(∂_{v} G : 𝓢(V, ℂ)) (x + t • v)‖ₑ := by + rw [fwdDiff_schwartz_eq_integral, intervalIntegral.integral_of_le zero_le_one] + exact eNorm_integral_le_lintegral_eNorm _ + +/-- **Averages of translates along a segment**: for a measurable `φ : V → [0, ∞]` and `v ∈ V`, +`∫_V ∫_0^1 φ(x + t v) dt dx = ∫_V φ`, by Tonelli's theorem (Mathlib's `lintegral_lintegral_swap`) +and the translation invariance of Lebesgue measure. -/ +theorem lintegral_lintegral_Ioc_add_smul {φ : V → ℝ≥0∞} (hφ : Measurable φ) (v : V) : + ∫⁻ x, ∫⁻ t in Set.Ioc (0 : ℝ) 1, φ (x + t • v) = ∫⁻ x, φ x := by + have hmeas : Measurable (Function.uncurry fun (x : V) (t : ℝ) => φ (x + t • v)) := + hφ.comp (continuous_fst.add (continuous_snd.smul continuous_const)).measurable + calc ∫⁻ x, ∫⁻ t in Set.Ioc (0 : ℝ) 1, φ (x + t • v) + = ∫⁻ t in Set.Ioc (0 : ℝ) 1, ∫⁻ x, φ (x + t • v) := + lintegral_lintegral_swap hmeas.aemeasurable + _ = ∫⁻ _t in Set.Ioc (0 : ℝ) 1, ∫⁻ x, φ x := + lintegral_congr fun t => lintegral_add_right_eq_self φ (t • v) + _ = ∫⁻ x, φ x := by + rw [lintegral_const, Measure.restrict_apply_univ, Real.volume_Ioc, sub_zero, + ENNReal.ofReal_one, mul_one] + +/-- **Jensen's inequality on the unit interval**: `(∫_0^1 φ)^p ≤ ∫_0^1 φ^p` for real `p ≥ 1` and +measurable `φ ≥ 0`. This is the weighted Jensen inequality `MeasureTheory.lintegral_mul_rpow_le` +with the weight `1`, since `(0, 1]` has length `1`. -/ +theorem rpow_lintegral_Ioc_le {p : ℝ} (hp : 1 ≤ p) {φ : ℝ → ℝ≥0∞} + (hφ : AEMeasurable φ (volume.restrict (Set.Ioc (0 : ℝ) 1))) : + (∫⁻ t in Set.Ioc (0 : ℝ) 1, φ t) ^ p ≤ ∫⁻ t in Set.Ioc (0 : ℝ) 1, φ t ^ p := by + have h := lintegral_mul_rpow_le (μ := volume.restrict (Set.Ioc (0 : ℝ) 1)) hp + (a := fun _ => 1) aemeasurable_const hφ + simpa only [one_mul, lintegral_const, Measure.restrict_apply_univ, Real.volume_Ioc, sub_zero, + ENNReal.ofReal_one, ENNReal.one_rpow] using h + +omit [FiniteDimensional ℝ V] [MeasurableSpace V] [BorelSpace V] in +/-- **A difference by the line derivative, pointwise, in `p`-th powers**: for a Schwartz function +`G` and real `p ≥ 1`, `|G(x + v) - G(x)|^p ≤ ∫_0^1 |∂_v G(x + t v)|^p dt` +(`Rd.enorm_fwdDiff_schwartz_le_lintegral` and Jensen's inequality `Rd.rpow_lintegral_Ioc_le`). -/ +theorem enorm_fwdDiff_schwartz_rpow_le {p : ℝ} (hp : 1 ≤ p) (v : V) (G : 𝓢(V, ℂ)) (x : V) : + ‖fwdDiff v (G : V → ℂ) x‖ₑ ^ p ≤ + ∫⁻ t in Set.Ioc (0 : ℝ) 1, ‖(∂_{v} G : 𝓢(V, ℂ)) (x + t • v)‖ₑ ^ p := by + have hcont : Continuous fun t : ℝ => (∂_{v} G : 𝓢(V, ℂ)) (x + t • v) := + (SchwartzMap.continuous _).comp (continuous_const.add (continuous_id.smul continuous_const)) + exact (ENNReal.rpow_le_rpow (enorm_fwdDiff_schwartz_le_lintegral v G x) (by linarith)).trans + (rpow_lintegral_Ioc_le hp hcont.eNorm.aemeasurable) + +/-- **A difference is bounded by the line derivative in `L_p`**: for a Schwartz function `G` and +real `p ≥ 1`, `∫ |Δ_v G|^p ≤ ∫ |∂_v G|^p`, that is `‖Δ_v G‖_p ≤ ‖∂_v G‖_p`. Integrate the +pointwise bound `Rd.enorm_fwdDiff_schwartz_rpow_le` over `x` and use +`Rd.lintegral_lintegral_Ioc_add_smul`. -/ +theorem lintegral_enorm_fwdDiff_rpow_le {p : ℝ} (hp : 1 ≤ p) (v : V) (G : 𝓢(V, ℂ)) : + ∫⁻ x, ‖fwdDiff v (G : V → ℂ) x‖ₑ ^ p ≤ ∫⁻ x, ‖(∂_{v} G : 𝓢(V, ℂ)) x‖ₑ ^ p := + (lintegral_mono fun x => enorm_fwdDiff_schwartz_rpow_le hp v G x).trans_eq + (lintegral_lintegral_Ioc_add_smul (φ := fun y => ‖(∂_{v} G : 𝓢(V, ℂ)) y‖ₑ ^ p) + ((SchwartzMap.continuous _).eNorm.measurable.pow_const p) v) + +/-- **A difference is bounded by the line derivative in `L_1`**: `‖Δ_v G‖_1 ≤ ‖∂_v G‖_1` for a +Schwartz function `G`, the case `p = 1` of `Rd.lintegral_enorm_fwdDiff_rpow_le`. -/ +theorem lintegral_enorm_fwdDiff_le (v : V) (G : 𝓢(V, ℂ)) : + ∫⁻ x, ‖fwdDiff v (G : V → ℂ) x‖ₑ ≤ ∫⁻ x, ‖(∂_{v} G : 𝓢(V, ℂ)) x‖ₑ := by + simpa using lintegral_enorm_fwdDiff_rpow_le le_rfl v G + +/-- **A difference is bounded by the line derivative in `L_2`**: `‖Δ_v G‖_2 ≤ ‖∂_v G‖_2` for a +Schwartz function `G`, the case `p = 2` of `Rd.lintegral_enorm_fwdDiff_rpow_le` (Mathlib's +`MeasureTheory.eLpNorm_le_of_lintegral_le` for the `L_2` norm). -/ +theorem eLpNorm_fwdDiff_schwartz_le (v : V) (G : 𝓢(V, ℂ)) : + eLpNorm (fwdDiff v (G : V → ℂ)) 2 volume ≤ + eLpNorm ((∂_{v} G : 𝓢(V, ℂ)) : V → ℂ) 2 volume := by + have hm : AEStronglyMeasurable (fwdDiff v (G : V → ℂ)) volume := + ((G.continuous.comp (continuous_id.add continuous_const)).sub G.continuous).aestronglyMeasurable + refine eLpNorm_le_of_lintegral_le hm two_ne_zero ENNReal.ofNat_ne_top ?_ + rw [eLpNorm_rpow_eq (SchwartzMap.continuous _).aestronglyMeasurable two_ne_zero + ENNReal.ofNat_ne_top] + simpa using lintegral_enorm_fwdDiff_rpow_le one_le_two v G + +/-! ### The difference operator on `L_2` -/ + +variable (V) in +/-- **The difference operator on `L_2(V)`**: `Δ_v f = f(· + v) - f`, a bounded linear operator, +the translation by `v` (Mathlib's `MeasureTheory.Lp.compMeasurePreservingₗᵢ`) minus the +identity. -/ +noncomputable def fwdDiffL2 (v : V) : + Lp ℂ 2 (volume : Measure V) →L[ℂ] Lp ℂ 2 (volume : Measure V) := + (Lp.compMeasurePreservingₗᵢ ℂ (· + v) + (measurePreserving_add_right volume v)).toContinuousLinearMap - ContinuousLinearMap.id ℂ _ + +/-- `Δ_v f` is the forward difference `f(· + v) - f` almost everywhere. -/ +theorem fwdDiffL2_ae_eq (v : V) (f : Lp ℂ 2 (volume : Measure V)) : + fwdDiffL2 V v f =ᵐ[volume] fwdDiff v (f : V → ℂ) := by + have h1 := Lp.coeFn_compMeasurePreserving f (measurePreserving_add_right volume v) + have h2 := Lp.coeFn_sub (Lp.compMeasurePreservingₗᵢ ℂ (· + v) + (measurePreserving_add_right volume v) f) f + filter_upwards [h1, h2] with x hx1 hx2 + change _ = (f : V → ℂ) (x + v) - f x + refine hx2.trans ?_ + rw [Pi.sub_apply] + exact congrArg (· - (f : V → ℂ) x) hx1 + +/-- `‖Δ_v f‖_2` is the `L_2` norm of the forward difference `f(· + v) - f` +(`Rd.fwdDiffL2_ae_eq`). -/ +theorem enorm_fwdDiffL2 (v : V) (f : Lp ℂ 2 (volume : Measure V)) : + ‖fwdDiffL2 V v f‖ₑ = eLpNorm (fwdDiff v (f : V → ℂ)) 2 volume := by + rw [Lp.eNorm_def, eLpNorm_congr_ae (fwdDiffL2_ae_eq v f)] + +/-- **Differences of Schwartz functions in `L_2(V)`**: `‖Δ_v G‖_2 ≤ ‖∂_v G‖_2` +(`Rd.eLpNorm_fwdDiff_schwartz_le`). -/ +theorem enorm_fwdDiffL2_toLp_le (v : V) (G : 𝓢(V, ℂ)) : + ‖fwdDiffL2 V v (G.toLp 2)‖ₑ ≤ ‖(∂_{v} G : 𝓢(V, ℂ)).toLp 2‖ₑ := by + have hG : fwdDiff v ((G.toLp 2 : Lp ℂ 2 (volume : Measure V)) : V → ℂ) =ᵐ[volume] + fwdDiff v (G : V → ℂ) := + higherDiff_congr_ae (G.coeFn_toLp 2 volume) 1 v + rw [enorm_fwdDiffL2, eLpNorm_congr_ae hG, Lp.eNorm_def, + eLpNorm_congr_ae ((∂_{v} G : 𝓢(V, ℂ)).coeFn_toLp 2 volume)] + exact eLpNorm_fwdDiff_schwartz_le v G + +/-! ### Higher differences of Schwartz functions -/ + +/-- **Differences of order `r` are bounded by line derivatives of order `r` in `L_1`**: +`‖Δ_v^r G‖_1 ≤ ‖∂_v^r G‖_1`. -/ +theorem lintegral_enorm_higherDiff_le (v : V) (r : ℕ) (G : 𝓢(V, ℂ)) : + ∫⁻ x, ‖(fwdDiff v)^[r] (G : V → ℂ) x‖ₑ ≤ + ∫⁻ x, ‖(∂^{fun _ : Fin r => v} G : 𝓢(V, ℂ)) x‖ₑ := by + induction r generalizing G with + | zero => exact le_rfl + | succ r ih => + calc ∫⁻ x, ‖(fwdDiff v)^[r + 1] (G : V → ℂ) x‖ₑ + = ∫⁻ x, ‖(fwdDiff v)^[r] (fwdDiffSchwartz v G : V → ℂ) x‖ₑ := by + rw [Function.iterate_succ_apply, ← coe_fwdDiffSchwartz] + _ ≤ ∫⁻ x, ‖(∂^{fun _ : Fin r => v} (fwdDiffSchwartz v G) : 𝓢(V, ℂ)) x‖ₑ := ih _ + _ = ∫⁻ x, ‖fwdDiff v ((∂^{fun _ : Fin r => v} G : 𝓢(V, ℂ)) : V → ℂ) x‖ₑ := by + rw [iteratedLineDerivOp_fwdDiffSchwartz, coe_fwdDiffSchwartz] + _ ≤ ∫⁻ x, ‖(∂_{v} (∂^{fun _ : Fin r => v} G) : 𝓢(V, ℂ)) x‖ₑ := + lintegral_enorm_fwdDiff_le v _ + _ = ∫⁻ x, ‖(∂^{fun _ : Fin (r + 1) => v} G : 𝓢(V, ℂ)) x‖ₑ := rfl + +omit [FiniteDimensional ℝ V] [MeasurableSpace V] [BorelSpace V] in +/-- `|∂_v^r G(x)| ≤ ‖v‖^r ‖D^r G(x)‖`. -/ +theorem enorm_iteratedLineDerivOp_le (v : V) (r : ℕ) (G : 𝓢(V, ℂ)) (x : V) : + ‖(∂^{fun _ : Fin r => v} G : 𝓢(V, ℂ)) x‖ₑ ≤ + ‖v‖ₑ ^ r * ‖iteratedFDeriv ℝ r (G : V → ℂ) x‖ₑ := by + rw [SchwartzMap.iteratedLineDerivOp_eq_iteratedFDeriv] + have h := (iteratedFDeriv ℝ r (G : V → ℂ) x).le_opNorm (fun _ => v) + rw [Finset.prod_const, Finset.card_univ, Fintype.card_fin] at h + calc ‖iteratedFDeriv ℝ r (G : V → ℂ) x (fun _ => v)‖ₑ + = ENNReal.ofReal ‖iteratedFDeriv ℝ r (G : V → ℂ) x (fun _ => v)‖ := (ofReal_norm _).symm + _ ≤ ENNReal.ofReal (‖v‖ ^ r * ‖iteratedFDeriv ℝ r (G : V → ℂ) x‖) := + ENNReal.ofReal_le_ofReal (h.trans_eq (mul_comm _ _)) + _ = ‖v‖ₑ ^ r * ‖iteratedFDeriv ℝ r (G : V → ℂ) x‖ₑ := by + rw [ENNReal.ofReal_mul (by positivity), ENNReal.ofReal_pow (norm_nonneg _), ofReal_norm, + ofReal_norm] + +/-- **`L_1` norms of differences of Schwartz functions**: `‖Δ_v^r G‖_1 ≤ ‖v‖^r ‖D^r G‖_1`. -/ +theorem lintegral_enorm_higherDiff_schwartz_le (v : V) (r : ℕ) (G : 𝓢(V, ℂ)) : + ∫⁻ x, ‖(fwdDiff v)^[r] (G : V → ℂ) x‖ₑ ≤ + ‖v‖ₑ ^ r * ∫⁻ x, ‖iteratedFDeriv ℝ r (G : V → ℂ) x‖ₑ := by + calc ∫⁻ x, ‖(fwdDiff v)^[r] (G : V → ℂ) x‖ₑ + ≤ ∫⁻ x, ‖(∂^{fun _ : Fin r => v} G : 𝓢(V, ℂ)) x‖ₑ := lintegral_enorm_higherDiff_le v r G + _ ≤ ∫⁻ x, ‖v‖ₑ ^ r * ‖iteratedFDeriv ℝ r (G : V → ℂ) x‖ₑ := + lintegral_mono fun x => enorm_iteratedLineDerivOp_le v r G x + _ = ‖v‖ₑ ^ r * ∫⁻ x, ‖iteratedFDeriv ℝ r (G : V → ℂ) x‖ₑ := + lintegral_const_mul' _ _ (ENNReal.pow_ne_top eNorm_ne_top) + +/-- The derivatives of a Schwartz function are integrable: `‖D^r G‖_1 < ∞`. -/ +theorem lintegral_enorm_iteratedFDeriv_ne_top (r : ℕ) (G : 𝓢(V, ℂ)) : + ∫⁻ x, ‖iteratedFDeriv ℝ r (G : V → ℂ) x‖ₑ ≠ ∞ := by + have h := (SchwartzMap.integrable_pow_mul_iteratedFDeriv volume G 0 r).2 + simp only [pow_zero, one_mul, HasFiniteIntegral, eNorm_norm] at h + exact h.ne + +/-! ### The inverse inequality -/ + +variable (V) in +/-- The constant of the inverse inequality, `2^r + ‖D^r Θ‖_1`. -/ +noncomputable def bandInverseConst (r : ℕ) : ℝ≥0∞ := + 2 ^ r + ∫⁻ x, ‖iteratedFDeriv ℝ r (bandKernelS (V := V) : V → ℂ) x‖ₑ + +/-- The constant of the inverse inequality is finite. -/ +theorem bandInverseConst_ne_top (r : ℕ) : bandInverseConst V r ≠ ∞ := + ENNReal.add_ne_top.2 ⟨by simp, lintegral_enorm_iteratedFDeriv_ne_top r _⟩ + +/-- **Differences of the band-limiting kernels in `L_1`**: `‖Δ_h^r Θ_j‖_1 ≤ (2^j ‖h‖)^r ‖D^r Θ‖_1`, +by the dilation `Δ_h^r Θ_j = (Δ_{2^j h}^r Θ)_{2^j}`. -/ +theorem eLpNorm_higherDiff_Theta_le (r j : ℕ) (h : V) : + eLpNorm ((fwdDiff h)^[r] (Theta (V := V) j)) 1 volume ≤ + ENNReal.ofReal (2 ^ j * ‖h‖) ^ r * + ∫⁻ x, ‖iteratedFDeriv ℝ r (bandKernelS (V := V) : V → ℂ) x‖ₑ := by + have hint : Integrable ((fwdDiff ((2 : ℝ) ^ j • h))^[r] (bandKernel (V := V))) := + integrable_higherDiff integrable_bandKernel r _ + rw [Theta, higherDiff_dilate, eLpNorm_dilate_one hint (by positivity), + eLpNorm_one_eq_lintegral_eNorm hint.aestronglyMeasurable] + refine (lintegral_enorm_higherDiff_schwartz_le _ r bandKernelS).trans_eq ?_ + rw [← ofReal_norm, norm_smul, Real.norm_of_nonneg (by positivity)] + +variable {p : ℝ≥0∞} [Fact (1 ≤ p)] + +/-- **The inverse inequality for band-limited functions**: for `a ∈ E_j`, +`ω_r(a, 2^(-k))_p ≤ C 2^(-(k-j) r) ‖a‖_p` with `C = 2^r + ‖D^r Θ‖_1` (and `k - j` truncated at +`0`). For `k ≥ j` and `‖h‖ ≤ 2^(-k)`, `Δ_h^r a = (Δ_h^r Θ_j) ⋆ a` and Young's inequality give +`‖Δ_h^r a‖_p ≤ (2^j ‖h‖)^r ‖D^r Θ‖_1 ‖a‖_p`. -/ +theorem lpModulus_le_of_mem_bandSpace (hp : p ≠ ∞) (r : ℕ) {j k : ℕ} + {a : Lp ℂ p (volume : Measure V)} (ha : a ∈ bandSpace hp j) : + lpModulus p r a k ≤ bandInverseConst V r * dyadicWeight (-(r : ℝ)) (k - j) * ‖a‖ₑ := by + rcases lt_or_ge k j with hkj | hjk + · rw [Nat.sub_eq_zero_of_le hkj.le, ENNReal.dyadicWeight_zero_right, mul_one] + exact (lpModulus_le r a k).trans (by gcongr; exact le_self_add) + · rw [mem_bandSpace] at ha + have hae : (a : V → ℂ) =ᵐ[volume] conv (Theta j) (a : V → ℂ) volume := by + have h1 := convLp_apply_ae hp (integrable_Theta (V := V) j) a + rw [ha] at h1 + exact h1 + set D := ∫⁻ x, ‖iteratedFDeriv ℝ r (bandKernelS (V := V) : V → ℂ) x‖ₑ + rw [lpModulus, modulus_congr_ae hae] + refine iSup₂_le fun h hh => ?_ + have h1 : eLpNorm ((fwdDiff h)^[r] (conv (Theta j) (a : V → ℂ) volume)) p volume ≤ + eLpNorm ((fwdDiff h)^[r] (Theta (V := V) j)) 1 volume * ‖a‖ₑ := by + rw [eLpNorm_congr_ae (higherDiff_conv_ae Fact.out hp (integrable_Theta j) (Lp.memLp a) r h), + Lp.eNorm_def] + exact eLpNorm_conv_le Fact.out hp + (integrable_higherDiff (integrable_Theta j) r h).aestronglyMeasurable + (Lp.aestronglyMeasurable a) + have h2 : ENNReal.ofReal (2 ^ j * ‖h‖) ^ r ≤ dyadicWeight (-(r : ℝ)) (k - j) := by + rw [← ENNReal.rpow_natCast] + exact ENNReal.ofReal_two_pow_mul_rpow_le hjk hh (Nat.cast_nonneg r) + calc eLpNorm ((fwdDiff h)^[r] (conv (Theta j) (a : V → ℂ) volume)) p volume + ≤ ENNReal.ofReal (2 ^ j * ‖h‖) ^ r * D * ‖a‖ₑ := + h1.trans (by gcongr; exact eLpNorm_higherDiff_Theta_le r j h) + _ ≤ dyadicWeight (-(r : ℝ)) (k - j) * D * ‖a‖ₑ := by gcongr + _ ≤ bandInverseConst V r * dyadicWeight (-(r : ℝ)) (k - j) * ‖a‖ₑ := by + rw [mul_comm (dyadicWeight _ _) D] + gcongr + exact le_add_self + +end Rd diff --git a/LeanPool/FunctionSpaces/Rd/Approximation/BandJackson.lean b/LeanPool/FunctionSpaces/Rd/Approximation/BandJackson.lean new file mode 100644 index 0000000000..88cc1054c5 --- /dev/null +++ b/LeanPool/FunctionSpaces/Rd/Approximation/BandJackson.lean @@ -0,0 +1,248 @@ +/- +Copyright (c) 2026 Mario Ullrich. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Mario Ullrich +-/ +module + +public import LeanPool.FunctionSpaces.Rd.Differences.MomentKernels +public import LeanPool.FunctionSpaces.Rd.Approximation.BandLimited +public import LeanPool.FunctionSpaces.ApproximationSpaces.Norm + +/- +Modified for Lean Pool: module names and imports adapted. +-/ + +/-! +# Jackson's inequality for band-limited approximation + +For `f ∈ L_p(V)`, `1 ≤ p < ∞`, and `r, k ∈ ℕ` the **Jackson approximant** is + +`J_k f = ∑_{l=1}^r (-1)^(l+1) C(r, l) Φ_{2^k/l} ⋆ f` + +(`Rd.jacksonApprox`), with the Littlewood–Paley kernel `Φ` of `Rd.lpKernel` and its dilations +`Φ_c = c^n Φ(c ·)`. The transform of `Φ_{2^k/l}` lives in the ball of radius `2^(k+1)/l`, where +`𝓕Θ_k = 1`, so `Θ_k ⋆ Φ_{2^k/l} = Φ_{2^k/l}` and `J_k f ∈ E_k` (`Rd.jacksonApprox_mem_bandSpace`). +Since `∫ Φ = 1`, the averaged differences of the moment kernels (`Rd.ae_sub_sum_conv_dilate_eq`) +give + +`f(x) - J_k f(x) = ∫ Φ(z) (-1)^r Δ^r_{-2^(-k) z} f(x) dz` + +for almost every `x` (`Rd.ae_sub_jacksonApprox_eq`). The weighted Jensen inequality +(`MeasureTheory.eLpNorm_integral_kernel_le`, `Rd.eLpNorm_integral_lpKernel_mul_le`) and +`ω_r(f, 2^(-k) |z|)_p ≤ (1 + |z|)^r ω_r(f, 2^(-k))_p` give +**Jackson's inequality** (`Rd.enorm_sub_jacksonApprox_le`, `Rd.approxError_bandScheme_le`) + +`E(f, E_k)_p ≤ ‖f - J_k f‖_p ≤ C ω_r(f, 2^(-k))_p`, +`C^p = ‖Φ‖_1^(p-1) ∫ |Φ(z)| (1 + |z|)^(rp) dz`, + +with `C` finite because `Φ` is a Schwartz function (`Rd.jacksonConst_ne_top`). +-/ + +@[expose] public section + +open MeasureTheory Filter Topology Module +open scoped ENNReal FourierTransform + +namespace Rd + +variable {V : Type*} [NormedAddCommGroup V] [InnerProductSpace ℝ V] [FiniteDimensional ℝ V] + [MeasurableSpace V] [BorelSpace V] + +/-! ### The kernels of the Jackson approximant -/ + +/-- **Band-limited dilations of the Littlewood–Paley kernel**: `Θ_k ⋆ Φ_c = Φ_c` for +`0 < c ≤ 2^k`, since `𝓕Φ_c = χ_{1,2}(c^(-1) ·)` lives in the ball of radius `2c ≤ 2^(k+1)`. -/ +theorem conv_Theta_dilate_lpKernel {k : ℕ} {c : ℝ} (hc : 0 < c) (hck : c ≤ 2 ^ k) : + conv (Theta (V := V) k) (dilate c lpKernel) volume = dilate c lpKernel := by + refine conv_eq_of_fourier (integrable_Theta k) (integrable_dilate integrable_lpKernel hc.ne') + (continuous_dilate continuous_lpKernel c) (bddAbove_dilate bddAbove_lpKernel c) + (integrable_dilate integrable_lpKernel hc.ne') (continuous_dilate continuous_lpKernel c) + (integrable_fourier_dilate integrable_fourier_lpKernel hc) fun ξ => ?_ + by_cases h : 𝓕 (dilate c (lpKernel (V := V))) ξ = 0 + · rw [h, mul_zero] + · have hξ : ‖ξ‖ ≤ 2 ^ (k + 1) := by + rw [fourier_dilate _ hc, fourier_lpKernel] at h + have h1 := norm_lt_of_cutoff_ne_zero _ _ h + rw [norm_smul, norm_inv, Real.norm_of_nonneg hc.le, inv_mul_lt_iff₀ hc] at h1 + rw [pow_succ] + linarith + rw [fourier_Theta_eq_one hξ, one_mul] + +/-- The scales `2^k / (l + 1)` of the Jackson approximant. -/ +noncomputable def jacksonScale (k l : ℕ) : ℝ := 2 ^ k / (l + 1) + +/-- The scales are positive. -/ +theorem jacksonScale_pos (k l : ℕ) : 0 < jacksonScale k l := by + unfold jacksonScale + positivity + +/-- The scales are at most `2^k`. -/ +theorem jacksonScale_le (k l : ℕ) : jacksonScale k l ≤ 2 ^ k := by + unfold jacksonScale + exact div_le_self (by positivity) (by linarith [(Nat.cast_nonneg l : (0 : ℝ) ≤ l)]) + +/-! ### The Jackson approximant -/ + +variable {p : ℝ≥0∞} [Fact (1 ≤ p)] + +/-- The **Jackson approximant** `J_k f = ∑_{l smul_mem_bandSpace _ ?_ + rw [mem_bandSpace] + exact convLp_convLp_of_eq hp _ _ _ + (conv_Theta_dilate_lpKernel (jacksonScale_pos k l) (jacksonScale_le k l)) f + +/-- **The Jackson approximant as an averaged difference**: for almost every `x`, +`f(x) - J_k f(x) = ∫ Φ(z) (-1)^r Δ^r_{-2^(-k) z} f(x) dz`. -/ +theorem ae_sub_jacksonApprox_eq (hp : p ≠ ∞) (r k : ℕ) (f : Lp ℂ p (volume : Measure V)) : + ⇑(f - jacksonApprox hp r k f) =ᵐ[volume] fun x => ∫ z, lpKernel z * + ((-1 : ℂ) ^ r * (fwdDiff (-((2 : ℝ) ^ k)⁻¹ • z))^[r] (f : V → ℂ) x) := by + have hJ : ⇑(jacksonApprox hp r k f) =ᵐ[volume] fun x => ∑ l ∈ Finset.range r, + jacksonCoeff r l * conv (dilate (jacksonScale k l) lpKernel) (f : V → ℂ) volume x := by + unfold jacksonApprox + refine (Lp.coeFn_finsetSum _ _).trans ((eventuallyEq_sum fun l _ => + (Lp.coeFn_smul _ _).trans ((convLp_apply_ae hp (integrable_dilate integrable_lpKernel + (jacksonScale_pos k l).ne') f).const_smul (jacksonCoeff r l))).trans (.of_eq ?_)) + funext x + rw [Finset.sum_apply] + exact Finset.sum_congr rfl fun l _ => by rw [Pi.smul_apply, smul_eq_mul] + filter_upwards [Lp.coeFn_sub f (jacksonApprox hp r k f), hJ, + ae_sub_sum_conv_dilate_eq Fact.out hp integrable_lpKernel integral_lpKernel (Lp.memLp f) r + (c := (2 : ℝ) ^ k) (by positivity)] with x h1 h2 h3 + rw [h1, Pi.sub_apply, h2] + exact h3 + +/-! ### Jackson's inequality -/ + +variable (V) in +/-- The **constant of Jackson's inequality**, +`C = (‖Φ‖_1^(p-1) ∫ |Φ(z)| (1 + |z|)^(rp) dz)^(1/p)`. -/ +noncomputable def jacksonConst (r : ℕ) (p : ℝ≥0∞) : ℝ≥0∞ := + ((∫⁻ z, ‖lpKernel (V := V) z‖ₑ) ^ (p.toReal - 1) * + ∫⁻ z, ‖lpKernel (V := V) z‖ₑ * ENNReal.ofReal (1 + ‖z‖) ^ ((r : ℝ) * p.toReal)) ^ + (1 / p.toReal) + +omit [Fact (1 ≤ p)] in +/-- **The constant of Jackson's inequality is finite**: `Φ` decays faster than every power, +`|Φ(z)| (1 + |z|)^(rp) ≤ 2^N (|Φ(z)| + |z|^N |Φ(z)|)` with `N = ⌈rp⌉`. -/ +theorem jacksonConst_ne_top (hp1 : 1 ≤ p) (hp : p ≠ ∞) (r : ℕ) : jacksonConst V r p ≠ ∞ := by + have hp0 : p ≠ 0 := (lt_of_lt_of_le zero_lt_one hp1).ne' + have hq : 0 < p.toReal := ENNReal.toReal_pos hp0 hp + have hq1 : 1 ≤ p.toReal := ENNReal.one_le_toReal_of_one_le hp1 hp + have h1 : ∫⁻ z, ‖lpKernel (V := V) z‖ₑ ≠ ∞ := integrable_lpKernel.2.ne + set N := ⌈(r : ℝ) * p.toReal⌉₊ + have hint : Integrable (fun z : V => 2 ^ N * (‖lpKernel z‖ + ‖z‖ ^ N * ‖lpKernel z‖)) := + (integrable_lpKernel.norm.add + (SchwartzMap.integrable_pow_mul volume (lpKernelS (V := V)) N)).const_mul _ + have h2 : ∫⁻ z, ‖lpKernel (V := V) z‖ₑ * ENNReal.ofReal (1 + ‖z‖) ^ ((r : ℝ) * p.toReal) ≠ + ∞ := by + refine ne_top_of_le_ne_top hint.lintegral_lt_top.ne (lintegral_mono fun z => ?_) + have hz : 0 ≤ (1 : ℝ) + ‖z‖ := by positivity + rw [← ofReal_norm, ENNReal.ofReal_rpow_of_nonneg hz (by positivity), + ← ENNReal.ofReal_mul (norm_nonneg _)] + refine ENNReal.ofReal_le_ofReal ?_ + have hpow : (1 + ‖z‖) ^ ((r : ℝ) * p.toReal) ≤ (1 + ‖z‖) ^ N := by + rw [← Real.rpow_natCast] + exact Real.rpow_le_rpow_of_exponent_le (by linarith [norm_nonneg z]) (Nat.le_ceil _) + calc ‖lpKernel z‖ * (1 + ‖z‖) ^ ((r : ℝ) * p.toReal) + ≤ ‖lpKernel z‖ * (2 ^ N * (1 + ‖z‖ ^ N)) := by + gcongr + exact hpow.trans (one_add_pow_le_two_pow_mul (norm_nonneg z) N) + _ = 2 ^ N * (‖lpKernel z‖ + ‖z‖ ^ N * ‖lpKernel z‖) := by ring + exact ENNReal.rpow_ne_top_of_nonneg (by positivity) + (ENNReal.mul_ne_top (ENNReal.rpow_ne_top_of_nonneg (by linarith) h1) h2) + +omit [Fact (1 ≤ p)] in +/-- **Weighted averages with the Jackson weight**: for `1 ≤ p < ∞`, `r ∈ ℕ`, an s-finite measure +space `(α, μ)`, `M < ∞` and a jointly measurable `G : α × V → ℂ` with +`‖G(·, z)‖_p ≤ (1 + |z|)^r M` for every `z`, `‖∫ Φ(z) G(·, z) dz‖_p ≤ C M` with the constant +`C = Rd.jacksonConst V r p` of Jackson's inequality, by the weighted averages of +`MeasureTheory.eLpNorm_integral_kernel_le`. It gives Jackson's inequality on `V` and on the +torus. -/ +theorem eLpNorm_integral_lpKernel_mul_le {α : Type*} [MeasurableSpace α] {μ : Measure α} + [SFinite μ] (hp1 : 1 ≤ p) (hp : p ≠ ∞) (r : ℕ) {G : α → V → ℂ} + (hG : Measurable (Function.uncurry G)) {M : ℝ≥0∞} (hM : M ≠ ∞) + (hbound : ∀ z, eLpNorm (fun x => G x z) p μ ≤ ENNReal.ofReal (1 + ‖z‖) ^ r * M) : + eLpNorm (fun x => ∫ z, lpKernel z * G x z) p μ ≤ jacksonConst V r p * M := by + have hq : 0 < p.toReal := ENNReal.toReal_pos (lt_of_lt_of_le zero_lt_one hp1).ne' hp + rw [← ENNReal.rpow_le_rpow_iff hq] + refine (eLpNorm_integral_kernel_le hp1 hp integrable_lpKernel.aestronglyMeasurable hG).trans ?_ + calc (∫⁻ z, ‖lpKernel (V := V) z‖ₑ) ^ (p.toReal - 1) * + ∫⁻ z, ‖lpKernel z‖ₑ * eLpNorm (fun x => G x z) p μ ^ p.toReal + ≤ (∫⁻ z, ‖lpKernel (V := V) z‖ₑ) ^ (p.toReal - 1) * + ∫⁻ z, ‖lpKernel z‖ₑ * (ENNReal.ofReal (1 + ‖z‖) ^ ((r : ℝ) * p.toReal) * + M ^ p.toReal) := by + gcongr with z + calc eLpNorm (fun x => G x z) p μ ^ p.toReal + ≤ (ENNReal.ofReal (1 + ‖z‖) ^ r * M) ^ p.toReal := + ENNReal.rpow_le_rpow (hbound z) hq.le + _ = ENNReal.ofReal (1 + ‖z‖) ^ ((r : ℝ) * p.toReal) * M ^ p.toReal := by + rw [ENNReal.mul_rpow_of_nonneg _ _ hq.le, ← ENNReal.rpow_natCast, + ← ENNReal.rpow_mul] + _ = (jacksonConst V r p * M) ^ p.toReal := by + rw [ENNReal.mul_rpow_of_nonneg _ _ hq.le, jacksonConst, ← ENNReal.rpow_mul, + one_div_mul_cancel hq.ne', ENNReal.rpow_one, mul_assoc] + congr 1 + rw [← lintegral_mul_const' _ _ (ENNReal.rpow_ne_top_of_nonneg hq.le hM)] + exact lintegral_congr fun z => by ring + +/-- **Jackson's inequality for band-limited approximation**: for `f ∈ L_p`, `1 ≤ p < ∞`, +`‖f - J_k f‖_p ≤ C ω_r(f, 2^(-k))_p`, from `‖Δ^r_{-2^(-k) z} f‖_p ≤ (1 + |z|)^r ω_r(f, 2^(-k))_p` +(`Rd.eLpNorm_integral_lpKernel_mul_le`). -/ +theorem enorm_sub_jacksonApprox_le (hp : p ≠ ∞) (r k : ℕ) (f : Lp ℂ p (volume : Measure V)) : + ‖f - jacksonApprox hp r k f‖ₑ ≤ jacksonConst V r p * lpModulus p r f k := by + have hp1 : 1 ≤ p := Fact.out + have hfm : Measurable (f : V → ℂ) := (Lp.stronglyMeasurable f).measurable + set w : V → V := fun z => -((2 : ℝ) ^ k)⁻¹ • z with hw + set G : V → V → ℂ := fun x z => (-1 : ℂ) ^ r * (fwdDiff (w z))^[r] (f : V → ℂ) x with hGdef + have hG : Measurable (Function.uncurry G) := by + have heq : Function.uncurry G = fun y : V × V => (-1 : ℂ) ^ r * ∑ l ∈ Finset.range (r + 1), + ((-1 : ℂ) ^ (r - l) * (r.choose l : ℂ)) * (f : V → ℂ) (y.1 + (l : ℝ) • w y.2) := by + funext y + exact congrArg _ (higherDiff_apply r (w y.2) _ y.1) + rw [heq] + exact measurable_const.mul (Finset.measurable_sum _ fun l _ => measurable_const.mul + (hfm.comp (measurable_fst.add ((measurable_snd.const_smul _).const_smul _)))) + have hω : lpModulus p r f k ≠ ∞ := + ne_top_of_le_ne_top (ENNReal.mul_ne_top (by simp) eNorm_ne_top) (lpModulus_le r f k) + -- the differences at the step `-2^(-k) z` + have hbound : ∀ z, eLpNorm (fun x => G x z) p volume ≤ + ENNReal.ofReal (1 + ‖z‖) ^ r * lpModulus p r f k := fun z => by + have hnorm : ‖w z‖ ≤ ‖z‖ * (1 / 2 ^ k) := by + change ‖-((2 : ℝ) ^ k)⁻¹ • z‖ ≤ _ + rw [norm_smul, norm_neg, norm_inv, Real.norm_of_nonneg (by positivity), one_div, + mul_comm] + have hD := aestronglyMeasurable_higherDiff (Lp.aestronglyMeasurable f) r (w z) + calc eLpNorm (fun x => G x z) p volume + = eLpNorm ((fwdDiff (w z))^[r] (f : V → ℂ)) p volume := by + refine eLpNorm_congr_norm_ae ((hG.comp measurable_prodMk_right).aestronglyMeasurable) + hD (Eventually.of_forall fun x => ?_) + simp [G] + _ ≤ modulus volume r p (f : V → ℂ) (‖z‖ * (1 / 2 ^ k)) := + eLpNorm_higherDiff_le_modulus hnorm + _ ≤ ENNReal.ofReal (1 + ‖z‖) ^ r * modulus volume r p (f : V → ℂ) (1 / 2 ^ k) := + modulus_mul_le (Lp.aestronglyMeasurable f) hp1 r (norm_nonneg z) (by positivity) + have hlhs : ‖f - jacksonApprox hp r k f‖ₑ = + eLpNorm (fun x => ∫ z, lpKernel z * G x z) p volume := by + rw [Lp.eNorm_def] + exact eLpNorm_congr_ae (ae_sub_jacksonApprox_eq hp r k f) + rw [hlhs] + exact eLpNorm_integral_lpKernel_mul_le hp1 hp r hG hω hbound + +/-- **Jackson's inequality for the band-limited scheme**: +`E(f, E_k)_p ≤ C ω_r(f, 2^(-k))_p`. -/ +theorem approxError_bandScheme_le (hp : p ≠ ∞) (r k : ℕ) (f : Lp ℂ p (volume : Measure V)) : + (bandScheme hp).approxError f (2 ^ k) ≤ jacksonConst V r p * lpModulus p r f k := + (ApproximationScheme.approxError_le_of_mem + (mem_bandScheme_two_pow.2 (jacksonApprox_mem_bandSpace hp r k f)) f).trans + (enorm_sub_jacksonApprox_le hp r k f) + +end Rd diff --git a/LeanPool/FunctionSpaces/Rd/Approximation/BandLimited.lean b/LeanPool/FunctionSpaces/Rd/Approximation/BandLimited.lean new file mode 100644 index 0000000000..86bb6fa8f4 --- /dev/null +++ b/LeanPool/FunctionSpaces/Rd/Approximation/BandLimited.lean @@ -0,0 +1,89 @@ +/- +Copyright (c) 2026 Mario Ullrich. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Mario Ullrich +-/ +module + +public import LeanPool.FunctionSpaces.Analysis.Fourier.LittlewoodPaleyKernels +public import LeanPool.FunctionSpaces.ApproximationSpaces.Scheme + +/- +Modified for Lean Pool: module names and imports adapted. +-/ + +/-! +# Band-limited functions + +For `1 ≤ p < ∞` the **band-limited class** of level `k` is +`E_k = {g ∈ L_p(V) : Θ_k ⋆ g = g}` (`Rd.bandSpace`), with the band-limiting kernel +`Θ_k = 2^(kn) Θ(2^k ·)` of `Rd.Theta`, whose Fourier transform is `1` on the ball of radius +`2^(k+1)` and vanishes outside the ball of radius `2^(k+2)`. On the Fourier side `Θ_k ⋆ g = g` +says `𝓕g = 𝓕Θ_k · 𝓕g`: the spectrum of `g` lies in the ball of radius `2^(k+2)`, and every `g` +with spectrum in the ball of radius `2^(k+1)` satisfies it. These are the functions of exponential +type of Nikol'skii's theory; the definition by the kernel works in every `L_p` without +distributions. + +The classes are closed subspaces (`Rd.isClosed_bandSpace`) and increase with `k`, since +`Θ_{k+1} ⋆ Θ_k = Θ_k` (`Rd.bandSpace_mono`). The **band-limited scheme** `Rd.bandScheme` has `E_k` +at complexity `2^k`. +-/ + +@[expose] public section + +open MeasureTheory +open scoped ENNReal + +namespace Rd + +variable {V : Type*} [NormedAddCommGroup V] [InnerProductSpace ℝ V] [FiniteDimensional ℝ V] + [MeasurableSpace V] [BorelSpace V] {p : ℝ≥0∞} [Fact (1 ≤ p)] + +/-- The **band-limited class** `E_k = {g ∈ L_p : Θ_k ⋆ g = g}`, a real subspace of `L_p(V)`. -/ +noncomputable def bandSpace (hp : p ≠ ∞) (k : ℕ) : Submodule ℝ (Lp ℂ p (volume : Measure V)) := + LinearMap.ker (((convLp hp (integrable_Theta (V := V) k)).restrictScalars ℝ).toLinearMap - + LinearMap.id) + +/-- `g ∈ E_k` iff `Θ_k ⋆ g = g`. -/ +theorem mem_bandSpace {hp : p ≠ ∞} {k : ℕ} {g : Lp ℂ p (volume : Measure V)} : + g ∈ bandSpace hp k ↔ convLp hp (integrable_Theta k) g = g := by + rw [bandSpace, LinearMap.mem_ker, LinearMap.sub_apply, sub_eq_zero] + rfl + +/-- The band-limited classes are closed under complex scalars. -/ +theorem smul_mem_bandSpace {hp : p ≠ ∞} {k : ℕ} (c : ℂ) {g : Lp ℂ p (volume : Measure V)} + (hg : g ∈ bandSpace hp k) : c • g ∈ bandSpace hp k := by + rw [mem_bandSpace] at hg ⊢ + rw [map_smul, hg] + +/-- The band-limited classes are closed in `L_p`. -/ +theorem isClosed_bandSpace (hp : p ≠ ∞) (k : ℕ) : + IsClosed (bandSpace (V := V) hp k : Set (Lp ℂ p (volume : Measure V))) := by + have h : (bandSpace (V := V) hp k : Set (Lp ℂ p (volume : Measure V))) = + {g | convLp hp (integrable_Theta k) g = g} := by + ext g + exact mem_bandSpace + rw [h] + exact isClosed_eq (convLp hp (integrable_Theta k)).continuous continuous_id + +/-- **The band-limited classes increase**: `E_k ⊆ E_{k+1}`, since `Θ_{k+1} ⋆ Θ_k = Θ_k`. -/ +theorem bandSpace_mono (hp : p ≠ ∞) : Monotone (bandSpace (V := V) hp) := by + refine monotone_nat_of_le_succ fun k g hg => ?_ + rw [mem_bandSpace] at hg ⊢ + calc convLp hp (integrable_Theta (k + 1)) g + = convLp hp (integrable_Theta (k + 1)) (convLp hp (integrable_Theta k) g) := by rw [hg] + _ = convLp hp (integrable_Theta k) g := + convLp_convLp_of_eq hp _ _ _ (conv_Theta_succ k) g + _ = g := hg + +/-- The **band-limited scheme**: `E_k` at complexity `2^k`, that is, `E_⌊log₂ n⌋` at complexity +`n ≥ 1`, and `{0}` at complexity `0` (`ApproximationScheme.ofMonotoneSubmodules`). -/ +noncomputable def bandScheme (hp : p ≠ ∞) : ApproximationScheme (Lp ℂ p (volume : Measure V)) := + ApproximationScheme.ofMonotoneSubmodules (bandSpace hp) (bandSpace_mono hp) + +/-- The level `2^k` of the band-limited scheme is `E_k`. -/ +theorem mem_bandScheme_two_pow {hp : p ≠ ∞} {k : ℕ} {g : Lp ℂ p (volume : Measure V)} : + g ∈ bandScheme hp (2 ^ k) ↔ g ∈ bandSpace hp k := + ApproximationScheme.mem_ofMonotoneSubmodules_two_pow + +end Rd diff --git a/LeanPool/FunctionSpaces/Rd/Atoms/AtomAnalysis.lean b/LeanPool/FunctionSpaces/Rd/Atoms/AtomAnalysis.lean new file mode 100644 index 0000000000..ee185823ab --- /dev/null +++ b/LeanPool/FunctionSpaces/Rd/Atoms/AtomAnalysis.lean @@ -0,0 +1,613 @@ +/- +Copyright (c) 2026 Mario Ullrich. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Mario Ullrich +-/ +module + +public import LeanPool.FunctionSpaces.Rd.Atoms.AtomSynthesis + +/- +Modified for Lean Pool: module names and imports adapted. +-/ + +/-! +# Atomic decompositions + +Every `F ∈ L_p(V)`, `1 ≤ p < ∞`, is a sum of atoms built from its local means +(Schneider–Vybíral, Theorem 2.6, direction ⇒). For a kernel `K` and `g ∈ L_p`, the dyadic cells +`P_{j,m}` split the convolution into **cell atoms** (`Rd.cellAtom`): + +`K ⋆ g = ∑_m λ_{j,m} a_{j,m}`, `λ_{j,m} = 2^(jn/p) ‖1_{P_{j,m}} g‖_p`, +`a_{j,m} = λ_{j,m}⁻¹ K ⋆ (1_{P_{j,m}} g)` + +(`Rd.conv_eq_tsum_cellAtom`), with `‖λ_{j,·}‖_{ℓ_p} = 2^(jn/p) ‖g‖_p`, since the cells partition +`V` (`Rd.levelNorm_cellCoef`). Coefficients and atoms of a cell depend only on `g` on that cell, +so the decomposition holds as soon as every `1_{P_{j,m}} g` lies in `L_p` +(`Rd.conv_eq_tsum_cellAtom_of_indicator`, from the termwise convolution of locally finite series +`Rd.conv_tsum_of_finset`); the cells have finite volume, so this holds with `p = 1` for every +`g ∈ L_p` (`Rd.memLp_one_indicator_cell`), and then the coefficients are at most the averages +`2^(jn) ∫_{P_{j,m}} |g|` (`Rd.enorm_cellCoef_one_le`). If `K` vanishes outside +`B(0, ρ 2^(-j))` and `|Δ_h^l K| ≤ A 2^(jn) min(1, (2^j ‖h‖)^l)` for `l ≤ r`, Hölder's +inequality on balls (`Rd.enorm_conv_le_of_bound`) and `Δ_h^r (K ⋆ g) = (Δ_h^r K) ⋆ g` +(`Rd.higherDiff_conv_apply`) give the pointwise bounds of atoms of order and exponent `r` +(`Rd.enorm_higherDiff_cellAtom_le`); by `Rd.isRegularAtom_of_pointwise` the cell atoms are +regular atoms (`Rd.isRegularAtom_cellAtom`). +The dual kernels `η_j` of a bump satisfy these bounds +(`Rd.LocalMeansBump.exists_higherDiff_dual_bound`). + +**Atomic characterisation** (`Rd.LocalMeansBump.besov_iff_atomic`; Schneider–Vybíral, +Corollary 2.8, for `p ≥ 1`): for `0 < s < L`, `F ∈ B^s_{p,q}(V)` iff `F = ∑_j ∑_m λ_{j,m} a_{j,m}` +with regular atoms of order and exponent `L`, centres of bounded overlap and +`‖λ‖_{b^s_{p,q}} < ∞`. The atoms of `F` are the cell atoms of `η_j ⋆ (k_j ⋆ F)` +(`Rd.LocalMeansBump.atomic_decomposition`); their coefficients have +`‖λ‖_{b^s_{p,q}} = ‖(2^(js) ‖k_j ⋆ F‖_p)_j‖_{ℓ_q}`, the local means quasi-norm. +-/ + +@[expose] public section + +open MeasureTheory Filter Topology Module Metric +open scoped ENNReal + +open ENNReal (lqNorm dyadicWeight) + +namespace Rd + +variable {V : Type*} [NormedAddCommGroup V] [InnerProductSpace ℝ V] [FiniteDimensional ℝ V] + [MeasurableSpace V] [BorelSpace V] + +/-! ### Cell atoms -/ + +/-- The **coefficient of a cell**, `λ_{j,m} = 2^(jn/p) ‖1_{P_{j,m}} g‖_p`. -/ +noncomputable def cellCoef (p : ℝ≥0∞) (j : ℕ) (g : V → ℂ) (m : Fin (finrank ℝ V) → ℤ) : ℂ := + ((dyadicWeight (finrank ℝ V / p.toReal) j * eLpNorm ((cell j m).indicator g) p volume).toReal : + ℂ) + +/-- The **cell atom** `a_{j,m} = λ_{j,m}⁻¹ K ⋆ (1_{P_{j,m}} g)` (zero if `λ_{j,m} = 0`). -/ +noncomputable def cellAtom (p : ℝ≥0∞) (K : V → ℂ) (j : ℕ) (g : V → ℂ) + (m : Fin (finrank ℝ V) → ℤ) (x : V) : ℂ := + (cellCoef p j g m)⁻¹ * conv K ((cell j m).indicator g) volume x + +/-- `|λ_{j,m}| = 2^(jn/p) ‖1_{P_{j,m}} g‖_p` for `g ∈ L_p`. -/ +theorem enorm_cellCoef {p : ℝ≥0∞} {g : V → ℂ} (hg : MemLp g p volume) (j : ℕ) + (m : Fin (finrank ℝ V) → ℤ) : + ‖cellCoef p j g m‖ₑ = + dyadicWeight (finrank ℝ V / p.toReal) j * eLpNorm ((cell j m).indicator g) p volume := by + have hfin : dyadicWeight (finrank ℝ V / p.toReal) j * + eLpNorm ((cell j m).indicator g) p volume ≠ ∞ := + ENNReal.mul_ne_top (ENNReal.dyadicWeight_ne_top _ _) + (hg.indicator (measurableSet_cell j m).nullMeasurableSet).eLpNorm_ne_top + rw [cellCoef, ← ofReal_norm, Complex.norm_real, Real.norm_eq_abs, + abs_of_nonneg ENNReal.toReal_nonneg, ENNReal.ofReal_toReal hfin] + +/-- The coefficients with exponent one are averages: `|λ_{j,m}| ≤ 2^(jn) ∫_{P_{j,m}} |g|` for the +coefficients `Rd.cellCoef 1` of an almost everywhere strongly measurable `g` (equality for +`g ∈ L_1` is `Rd.enorm_cellCoef`). -/ +theorem enorm_cellCoef_one_le (j : ℕ) {g : V → ℂ} (hg : AEStronglyMeasurable g volume) + (m : Fin (finrank ℝ V) → ℤ) : + ‖cellCoef 1 j g m‖ₑ ≤ dyadicWeight (finrank ℝ V : ℝ) j * ∫⁻ y in cell j m, ‖g y‖ₑ := by + rw [cellCoef, ← ofReal_norm, Complex.norm_real, Real.norm_eq_abs, + abs_of_nonneg ENNReal.toReal_nonneg] + refine ENNReal.ofReal_toReal_le.trans_eq ?_ + rw [ENNReal.toReal_one, div_one, eLpNorm_one_eq_lintegral_eNorm + (hg.indicator (measurableSet_cell j m))] + simp_rw [eNorm_indicator_eq_indicator_eNorm] + rw [lintegral_indicator (measurableSet_cell j m)] + +/-- `λ_{j,m} a_{j,m} = K ⋆ (1_{P_{j,m}} g)`. -/ +theorem cellCoef_mul_cellAtom {p : ℝ≥0∞} (hp0 : p ≠ 0) {g : V → ℂ} (hg : MemLp g p volume) + (K : V → ℂ) (j : ℕ) (m : Fin (finrank ℝ V) → ℤ) (x : V) : + cellCoef p j g m * cellAtom p K j g m x = conv K ((cell j m).indicator g) volume x := by + by_cases h0 : cellCoef p j g m = 0 + · have hn : eLpNorm ((cell j m).indicator g) p volume = 0 := by + have h1 := enorm_cellCoef hg j m + rw [h0, eNorm_zero, eq_comm, mul_eq_zero] at h1 + exact h1.resolve_left (ENNReal.dyadicWeight_ne_zero _ _) + have hae : (cell j m).indicator g =ᵐ[volume] 0 := + (eLpNorm_eq_zero_iff hp0).1 hn + rw [h0, zero_mul, conv_congr_ae hae, conv_apply] + simp + · rw [cellAtom, ← mul_assoc, mul_inv_cancel₀ h0, one_mul] + +/-- The cells have finite volume: `P_{j,m}` lies in the closed ball `B̄(c_{j,m}, n 2^(-j))`. -/ +theorem volume_cell_ne_top (j : ℕ) (m : Fin (finrank ℝ V) → ℤ) : volume (cell (V := V) j m) ≠ ∞ := + ne_top_of_le_ne_top measure_closedBall_lt_top.ne (measure_mono fun _ hx => by + rw [mem_closedBall, dist_eq_norm] + exact norm_sub_cellCenter_le hx) + +/-- The coefficient of a cell depends only on `g` on that cell: +`λ_{j,m}(1_{P_{j,m}} g) = λ_{j,m}(g)`. -/ +theorem cellCoef_indicator (p : ℝ≥0∞) (j : ℕ) (g : V → ℂ) (m : Fin (finrank ℝ V) → ℤ) : + cellCoef p j ((cell j m).indicator g) m = cellCoef p j g m := by + rw [cellCoef, cellCoef, Set.indicator_indicator, Set.inter_self] + +/-- The atom of a cell depends only on `g` on that cell: +`a_{j,m}(1_{P_{j,m}} g) = a_{j,m}(g)`. -/ +theorem cellAtom_indicator (p : ℝ≥0∞) (K : V → ℂ) (j : ℕ) (g : V → ℂ) + (m : Fin (finrank ℝ V) → ℤ) : + cellAtom p K j ((cell j m).indicator g) m = cellAtom p K j g m := by + funext x + rw [cellAtom, cellAtom, cellCoef_indicator, Set.indicator_indicator, Set.inter_self] + +/-- On a cell, `L_p` functions are integrable: `1_{P_{j,m}} g ∈ L_1` for `g ∈ L_p`, `p ≥ 1`, +since the cell has finite volume. -/ +theorem memLp_one_indicator_cell {p : ℝ≥0∞} (hp1 : 1 ≤ p) {g : V → ℂ} (hg : MemLp g p volume) + (j : ℕ) (m : Fin (finrank ℝ V) → ℤ) : MemLp ((cell j m).indicator g) 1 volume := + (hg.indicator (measurableSet_cell j m).nullMeasurableSet).mono_exponent_of_measure_support_ne_top + (fun _ hx => Set.indicator_of_notMem hx g) (volume_cell_ne_top j m) hp1 + +/-- `λ_{j,m} a_{j,m} = K ⋆ (1_{P_{j,m}} g)` as soon as `1_{P_{j,m}} g ∈ L_p`. -/ +theorem cellCoef_mul_cellAtom_of_indicator {p : ℝ≥0∞} (hp0 : p ≠ 0) {g : V → ℂ} {j : ℕ} + {m : Fin (finrank ℝ V) → ℤ} (hg : MemLp ((cell j m).indicator g) p volume) (K : V → ℂ) + (x : V) : + cellCoef p j g m * cellAtom p K j g m x = conv K ((cell j m).indicator g) volume x := by + have h := cellCoef_mul_cellAtom hp0 hg K j m x + rwa [cellCoef_indicator, cellAtom_indicator, Set.indicator_indicator, Set.inter_self] at h + +/-- **Convolution with a locally finite series, term by term**: for a continuous kernel `K` with +compact support and locally integrable `u_m`, if only the indices of a finite set `T` have +`u_m(x - y) ≠ 0` for some `y` with `K(y) ≠ 0`, then `K ⋆ (∑_m u_m)(x) = ∑_m (K ⋆ u_m)(x)`. -/ +theorem conv_tsum_of_finset {ι : Type*} {K : V → ℂ} (hKc : Continuous K) + (hKs : HasCompactSupport K) {u : ι → V → ℂ} (hu : ∀ m, LocallyIntegrable (u m) volume) + (x : V) (T : Finset ι) (hT : ∀ m ∉ T, ∀ y, K y ≠ 0 → u m (x - y) = 0) : + conv K (fun y => ∑' m, u m y) volume x = ∑' m, conv K (u m) volume x := by + have hvanish : ∀ m ∉ T, ∀ y, K y * u m (x - y) = 0 := fun m hm y => by + by_cases hy : K y = 0 + · rw [hy, zero_mul] + · rw [hT m hm y hy, mul_zero] + have hzero : ∀ m ∉ T, conv K (u m) volume x = 0 := fun m hm => by + rw [conv_apply] + simp only [hvanish m hm, integral_zero] + rw [tsum_eq_sum hzero, conv_apply] + have hpt : ∀ y, K y * ∑' m, u m (x - y) = ∑ m ∈ T, K y * u m (x - y) := fun y => by + by_cases hy : K y = 0 + · simp [hy] + · rw [tsum_eq_sum fun m hm => hT m hm y hy, Finset.mul_sum] + simp_rw [hpt] + rw [integral_finsetSum _ fun m _ => by + simpa using integrable_translate_mul_of_locallyIntegrable hKc hKs (hu m) 0 x] + exact Finset.sum_congr rfl fun m _ => (conv_apply _ _ _ _).symm + +omit [MeasurableSpace V] [BorelSpace V] in +/-- The cells split every function: `g(y) = ∑_m (1_{P_{j,m}} g)(y)`, where only the cell +containing `y` contributes. -/ +theorem tsum_indicator_cell (j : ℕ) (g : V → ℂ) (y : V) : + ∑' m, (cell j m).indicator g y = g y := by + rw [tsum_eq_single (f := fun m => (cell j m).indicator g y) (cellIndex j y) fun m hm => + Set.indicator_of_notMem (fun hy : y ∈ cell j m => hm (show cellIndex j y = m from hy).symm) _] + exact Set.indicator_of_mem (mem_cell_cellIndex j y) g + +/-- **Cell decomposition of a convolution, cellwise hypothesis**: `K ⋆ g = ∑_m λ_{j,m} a_{j,m}` at +every point, with finitely many nonzero terms, for a continuous `K` that vanishes outside +`B̄(0, ρ)`, as soon as `1_{P_{j,m}} g ∈ L_p` for every cell. -/ +theorem conv_eq_tsum_cellAtom_of_indicator {p : ℝ≥0∞} (hp1 : 1 ≤ p) {K g : V → ℂ} + (hKc : Continuous K) {ρ : ℝ} (hρ : 0 ≤ ρ) (hKρ : ∀ y, ρ < ‖y‖ → K y = 0) {j : ℕ} + (hg : ∀ m, MemLp ((cell j m).indicator g) p volume) (x : V) : + conv K g volume x = ∑' m, cellCoef p j g m * cellAtom p K j g m x := by + have hp0 : p ≠ 0 := (zero_lt_one.trans_le hp1).ne' + have hKs : HasCompactSupport K := HasCompactSupport.intro (isCompact_closedBall 0 ρ) + fun y hy => hKρ y (by simpa [mem_closedBall, dist_zero_right, not_le] using hy) + set R := ρ * 2 ^ j + finrank ℝ V + have hR : 0 ≤ R := by positivity + -- the cells near `x` + have hnear : ∀ m y, K y ≠ 0 → x - y ∈ cell j m → ‖x - cellCenter j m‖ ≤ R / 2 ^ j := + fun m y hy hxy => by + have h1 : ‖y‖ ≤ ρ := not_lt.1 fun h => hy (hKρ y h) + have h2 := norm_sub_cellCenter_le hxy + calc ‖x - cellCenter j m‖ ≤ ‖x - (x - y)‖ + ‖x - y - cellCenter j m‖ := + norm_sub_le_norm_sub_add_norm_sub _ _ _ + _ ≤ ρ + finrank ℝ V / 2 ^ j := by rw [sub_sub_cancel]; exact add_le_add h1 h2 + _ = R / 2 ^ j := by + simp only [R] + field_simp + obtain ⟨T, hT, -⟩ := exists_finset_of_card_le + (P := fun m => ‖x - cellCenter j m‖ ≤ R / 2 ^ j) + fun S hS => card_le_of_norm_sub_cellCenter_le j hR x S hS + calc conv K g volume x = conv K (fun y => ∑' m, (cell j m).indicator g y) volume x := by + simp only [tsum_indicator_cell] + _ = ∑' m, conv K ((cell j m).indicator g) volume x := + conv_tsum_of_finset hKc hKs (fun m => (hg m).locallyIntegrable hp1) x T + fun m hm y hy => Set.indicator_of_notMem (fun hxy => hm (hT m (hnear m y hy hxy))) _ + _ = _ := tsum_congr fun m => (cellCoef_mul_cellAtom_of_indicator hp0 (hg m) K x).symm + +/-- **Cell decomposition of a convolution**: `K ⋆ g = ∑_m λ_{j,m} a_{j,m}` at every point, with +finitely many nonzero terms, for a continuous `K` that vanishes outside `B̄(0, ρ)`. -/ +theorem conv_eq_tsum_cellAtom {p : ℝ≥0∞} (hp1 : 1 ≤ p) {K g : V → ℂ} (hKc : Continuous K) + {ρ : ℝ} (hρ : 0 ≤ ρ) (hKρ : ∀ y, ρ < ‖y‖ → K y = 0) (hg : MemLp g p volume) (j : ℕ) + (x : V) : + conv K g volume x = ∑' m, cellCoef p j g m * cellAtom p K j g m x := + conv_eq_tsum_cellAtom_of_indicator hp1 hKc hρ hKρ + (fun m => hg.indicator (measurableSet_cell j m).nullMeasurableSet) x + +/-- Cell atoms are continuous for a continuous kernel with compact support. -/ +theorem continuous_cellAtom {p : ℝ≥0∞} (hp1 : 1 ≤ p) {K g : V → ℂ} (hKc : Continuous K) + (hKs : HasCompactSupport K) (hg : MemLp g p volume) (j : ℕ) (m : Fin (finrank ℝ V) → ℤ) : + Continuous (cellAtom p K j g m) := + continuous_const.mul (hKs.continuous_convolution_left (ContinuousLinearMap.mul ℂ ℂ) hKc + ((hg.indicator (measurableSet_cell j m).nullMeasurableSet).locallyIntegrable hp1)) + +/-- Cell atoms vanish outside `B̄(c_{j,m}, (ρ + n) 2^(-j))` if `K` vanishes outside +`B̄(0, ρ 2^(-j))`. -/ +theorem cellAtom_eq_zero {p : ℝ≥0∞} {K g : V → ℂ} {ρ : ℝ} {j : ℕ} + (hKρ : ∀ y, ρ / 2 ^ j < ‖y‖ → K y = 0) (m : Fin (finrank ℝ V) → ℤ) {x : V} + (hx : (ρ + finrank ℝ V) / 2 ^ j < ‖x - cellCenter j m‖) : cellAtom p K j g m x = 0 := by + rw [cellAtom, conv_apply] + have : ∀ y, K y * (cell j m).indicator g (x - y) = 0 := fun y => by + by_cases hy : ρ / 2 ^ j < ‖y‖ + · rw [hKρ y hy, zero_mul] + · have hxy : x - y ∉ cell j m := fun hmem => by + have h1 := norm_sub_cellCenter_le hmem + have : ‖x - cellCenter j m‖ ≤ (ρ + finrank ℝ V) / 2 ^ j := by + calc ‖x - cellCenter j m‖ = ‖(x - y - cellCenter j m) + y‖ := by congr 1; abel + _ ≤ ‖x - y - cellCenter j m‖ + ‖y‖ := norm_add_le _ _ + _ ≤ finrank ℝ V / 2 ^ j + ρ / 2 ^ j := add_le_add h1 (not_lt.1 hy) + _ = (ρ + finrank ℝ V) / 2 ^ j := by ring + linarith + rw [Set.indicator_of_notMem hxy, mul_zero] + simp only [this, integral_zero, mul_zero] + +/-- `|B̄(0, ρ 2^(-j))|^t = (ρ^n |B_1|)^t 2^(-jnt)`. -/ +theorem volume_closedBall_div_two_pow_rpow {ρ : ℝ} (hρ : 0 ≤ ρ) (j : ℕ) {t : ℝ} (ht : 0 ≤ t) : + volume (closedBall (0 : V) (ρ / 2 ^ j)) ^ t = + (ENNReal.ofReal (ρ ^ finrank ℝ V) * volume (ball (0 : V) 1)) ^ t * + dyadicWeight (-(finrank ℝ V * t)) j := by + rw [volume_closedBall_div_two_pow hρ j, ENNReal.mul_rpow_of_nonneg _ _ ht, + ENNReal.dyadicWeight_rpow, neg_mul] + +/-- **The scaling of cell atoms**: if `K'` vanishes outside `B̄(0, ρ 2^(-j))` and +`|K'| ≤ A 2^(jn)`, then `|λ_{j,m}⁻¹ (K' ⋆ (1_{P_{j,m}} g))(x)| ≤ A (ρ^n |B_1|)^(1-1/p)`: +the factors `2^(jn)`, `2^(-jn(1-1/p))` and `2^(-jn/p)` cancel. -/ +theorem enorm_inv_cellCoef_mul_conv_le {p : ℝ≥0∞} (hp1 : 1 ≤ p) {g : V → ℂ} + (hg : MemLp g p volume) {j : ℕ} (m : Fin (finrank ℝ V) → ℤ) {K' : V → ℂ} {A : ℝ≥0∞} + (hK' : ∀ y, ‖K' y‖ₑ ≤ A * dyadicWeight (finrank ℝ V) j) {ρ : ℝ} (hρ : 0 ≤ ρ) + (hK'ρ : ∀ y, ρ / 2 ^ j < ‖y‖ → K' y = 0) (x : V) : + ‖(cellCoef p j g m)⁻¹ * conv K' ((cell j m).indicator g) volume x‖ₑ ≤ + A * (ENNReal.ofReal (ρ ^ finrank ℝ V) * volume (ball (0 : V) 1)) ^ (1 - 1 / p.toReal) := by + by_cases h0 : cellCoef p j g m = 0 + · rw [h0, inv_zero, zero_mul, eNorm_zero] + exact zero_le + have ht : 0 ≤ 1 - 1 / p.toReal := one_sub_one_div_toReal_nonneg hp1 + set e := eLpNorm ((cell j m).indicator g) p volume + set W := dyadicWeight (finrank ℝ V / p.toReal) j + set X := ENNReal.ofReal (ρ ^ finrank ℝ V) * volume (ball (0 : V) 1) + have he : e ≠ ∞ := (hg.indicator (measurableSet_cell j m).nullMeasurableSet).eLpNorm_ne_top + have he0 : e ≠ 0 := fun he0 => h0 (by simp [cellCoef, e, he0]) + have hconv := enorm_conv_le_of_bound hp1 + (hg.indicator (measurableSet_cell j m).nullMeasurableSet).aestronglyMeasurable hK' hK'ρ x + rw [volume_closedBall_div_two_pow_rpow hρ j ht] at hconv + have hW : W⁻¹ * dyadicWeight (finrank ℝ V) j * + dyadicWeight (-(finrank ℝ V * (1 - 1 / p.toReal))) j = 1 := by + rw [← ENNReal.dyadicWeight_neg, ← ENNReal.dyadicWeight_add, ← ENNReal.dyadicWeight_add] + convert ENNReal.dyadicWeight_zero_left j using 2 + ring + rw [eNorm_mul, eNorm_inv h0, enorm_cellCoef hg j m] + calc (W * e)⁻¹ * ‖conv K' ((cell j m).indicator g) volume x‖ₑ + ≤ (W * e)⁻¹ * (A * dyadicWeight (finrank ℝ V) j * + (X ^ (1 - 1 / p.toReal) * dyadicWeight (-(finrank ℝ V * (1 - 1 / p.toReal))) j) * e) := + mul_le_mul' le_rfl hconv + _ = A * X ^ (1 - 1 / p.toReal) * ((W⁻¹ * dyadicWeight (finrank ℝ V) j * + dyadicWeight (-(finrank ℝ V * (1 - 1 / p.toReal))) j) * (e⁻¹ * e)) := by + rw [ENNReal.mul_inv (Or.inl (ENNReal.dyadicWeight_ne_zero _ _)) + (Or.inl (ENNReal.dyadicWeight_ne_top _ _))] + ring + _ = A * X ^ (1 - 1 / p.toReal) := by + rw [hW, ENNReal.inv_mul_cancel he0 he, mul_one, mul_one] + +/-- **Cell atoms are bounded**: `|a_{j,m}| ≤ A (ρ^n |B_1|)^(1-1/p)` if `|K| ≤ A 2^(jn)` and `K` +vanishes outside `B̄(0, ρ 2^(-j))`. -/ +theorem enorm_cellAtom_le {p : ℝ≥0∞} (hp1 : 1 ≤ p) {K g : V → ℂ} (hg : MemLp g p volume) + {j : ℕ} (m : Fin (finrank ℝ V) → ℤ) {A : ℝ≥0∞} + (hK : ∀ y, ‖K y‖ₑ ≤ A * dyadicWeight (finrank ℝ V) j) {ρ : ℝ} (hρ : 0 ≤ ρ) + (hKρ : ∀ y, ρ / 2 ^ j < ‖y‖ → K y = 0) (x : V) : + ‖cellAtom p K j g m x‖ₑ ≤ + A * (ENNReal.ofReal (ρ ^ finrank ℝ V) * volume (ball (0 : V) 1)) ^ (1 - 1 / p.toReal) := + enorm_inv_cellCoef_mul_conv_le hp1 hg m hK hρ hKρ x + +/-- **Differences of cell atoms**: if `K` is continuous with `|K| ≤ A 2^(jn)`, +`|Δ_h^r K| ≤ A 2^(jn) min(1, (2^j ‖h‖)^r)` and `K = 0` outside `B̄(0, ρ 2^(-j))`, then +`|Δ_h^r a_{j,m}| ≤ 2^r A ((ρ + r)^n |B_1|)^(1-1/p) min(1, (2^j ‖h‖)^r)`. For `‖h‖ ≤ 2^(-j)` the +kernel `Δ_h^r K` of `Δ_h^r a_{j,m}` vanishes outside `B̄(0, (ρ + r) 2^(-j))`; for larger `h` the +bound `2^r sup |a_{j,m}|` suffices. -/ +theorem enorm_higherDiff_cellAtom_le {p : ℝ≥0∞} (hp1 : 1 ≤ p) {K g : V → ℂ} (hKc : Continuous K) + (hg : MemLp g p volume) {j : ℕ} (m : Fin (finrank ℝ V) → ℤ) {A : ℝ≥0∞} {r : ℕ} + (hK : ∀ y, ‖K y‖ₑ ≤ A * dyadicWeight (finrank ℝ V) j) + (hKr : ∀ h y, ‖(fwdDiff h)^[r] K y‖ₑ ≤ + A * dyadicWeight (finrank ℝ V) j * min 1 (ENNReal.ofReal (2 ^ j * ‖h‖) ^ (r : ℝ))) + {ρ : ℝ} (hρ : 0 ≤ ρ) (hKρ : ∀ y, ρ / 2 ^ j < ‖y‖ → K y = 0) (h x : V) : + ‖(fwdDiff h)^[r] (cellAtom p K j g m) x‖ₑ ≤ + 2 ^ r * A * (ENNReal.ofReal ((ρ + r) ^ finrank ℝ V) * volume (ball (0 : V) 1)) ^ + (1 - 1 / p.toReal) * min 1 (ENNReal.ofReal (2 ^ j * ‖h‖) ^ (r : ℝ)) := by + have hKs : HasCompactSupport K := HasCompactSupport.intro (isCompact_closedBall 0 (ρ / 2 ^ j)) + fun y hy => hKρ y (by simpa [mem_closedBall, dist_zero_right, not_le] using hy) + have ht : 0 ≤ 1 - 1 / p.toReal := one_sub_one_div_toReal_nonneg hp1 + have hρr : 0 ≤ ρ + r := add_nonneg hρ (Nat.cast_nonneg r) + set Y := ENNReal.ofReal ((ρ + r) ^ finrank ℝ V) * volume (ball (0 : V) 1) + set X := ENNReal.ofReal (ρ ^ finrank ℝ V) * volume (ball (0 : V) 1) + set M := min 1 (ENNReal.ofReal (2 ^ j * ‖h‖) ^ (r : ℝ)) + have hXY : X ^ (1 - 1 / p.toReal) ≤ Y ^ (1 - 1 / p.toReal) := + ENNReal.rpow_le_rpow (mul_le_mul' (ENNReal.ofReal_le_ofReal + (pow_le_pow_left₀ hρ (by linarith [(Nat.cast_nonneg r : (0 : ℝ) ≤ r)]) _)) le_rfl) ht + by_cases hh : ‖h‖ ≤ 1 / 2 ^ j + · have hconv : (fwdDiff h)^[r] (cellAtom p K j g m) x = (cellCoef p j g m)⁻¹ * + conv ((fwdDiff h)^[r] K) ((cell j m).indicator g) volume x := by + rw [show cellAtom p K j g m = + (cellCoef p j g m)⁻¹ • conv K ((cell j m).indicator g) volume from rfl, + fwdDiff_iter_const_smul, Pi.smul_apply, smul_eq_mul, + higherDiff_conv_apply (fun v x => integrable_translate_mul_of_locallyIntegrable hKc hKs + ((hg.indicator (measurableSet_cell j m).nullMeasurableSet).locallyIntegrable hp1) v x)] + have hsupp : ∀ y, (ρ + r) / 2 ^ j < ‖y‖ → (fwdDiff h)^[r] K y = 0 := fun y hy => by + rw [higherDiff_apply] + refine Finset.sum_eq_zero fun l hl => ?_ + rw [hKρ _ ?_, mul_zero] + have hl' : (l : ℝ) ≤ r := by exact_mod_cast Nat.lt_succ_iff.1 (Finset.mem_range.1 hl) + have h2 : ‖(l : ℝ) • h‖ ≤ r / 2 ^ j := by + rw [norm_smul, Real.norm_of_nonneg (Nat.cast_nonneg l)] + calc (l : ℝ) * ‖h‖ ≤ r * (1 / 2 ^ j) := + mul_le_mul hl' hh (norm_nonneg h) (Nat.cast_nonneg r) + _ = r / 2 ^ j := by ring + have h3 : ‖y‖ - ‖(l : ℝ) • h‖ ≤ ‖y + (l : ℝ) • h‖ := by + have := norm_sub_norm_le y (-((l : ℝ) • h)) + rw [sub_neg_eq_add, norm_neg] at this + linarith + have h4 : ρ / 2 ^ j = (ρ + r) / 2 ^ j - r / 2 ^ j := by ring + linarith + rw [hconv] + refine (enorm_inv_cellCoef_mul_conv_le hp1 hg m (A := A * M) + (fun y => (hKr h y).trans_eq (by ring)) hρr hsupp x).trans ?_ + calc A * M * Y ^ (1 - 1 / p.toReal) = 1 * A * Y ^ (1 - 1 / p.toReal) * M := by ring + _ ≤ 2 ^ r * A * Y ^ (1 - 1 / p.toReal) * M := by + gcongr + exact one_le_pow₀ one_le_two + · have hmin : M = 1 := by + refine min_eq_left ?_ + have h1 : 1 ≤ 2 ^ j * ‖h‖ := by + rw [not_le, div_lt_iff₀ (by positivity)] at hh + linarith + calc (1 : ℝ≥0∞) = 1 ^ (r : ℝ) := (ENNReal.one_rpow _).symm + _ ≤ ENNReal.ofReal (2 ^ j * ‖h‖) ^ (r : ℝ) := + ENNReal.rpow_le_rpow (by rw [← ENNReal.ofReal_one]; exact ENNReal.ofReal_le_ofReal h1) + (Nat.cast_nonneg r) + rw [hmin, mul_one] + refine (enorm_higherDiff_le_of_bound (fun y => enorm_cellAtom_le hp1 hg m hK hρ hKρ y) r h + x).trans ?_ + rw [mul_assoc] + exact mul_le_mul' le_rfl (mul_le_mul' le_rfl hXY) + +variable (V) in +/-- The constant of the cell atoms as regular atoms: +`2^r A ((ρ + r)^n |B_1|)^(1-1/p) ((r + 1) (ρ + n)^n |B_1|)^(1/p)`. -/ +noncomputable def cellAtomConst (p A : ℝ≥0∞) (ρ : ℝ) (r : ℕ) : ℝ≥0∞ := + 2 ^ r * A * (ENNReal.ofReal ((ρ + r) ^ finrank ℝ V) * volume (ball (0 : V) 1)) ^ + (1 - 1 / p.toReal) * (((r + 1 : ℕ) : ℝ≥0∞) * + (ENNReal.ofReal ((ρ + finrank ℝ V) ^ finrank ℝ V) * volume (ball (0 : V) 1))) ^ (1 / p.toReal) + +/-- The constant of the cell atoms is finite. -/ +theorem cellAtomConst_ne_top {p : ℝ≥0∞} (hp1 : 1 ≤ p) {A : ℝ≥0∞} (hA : A ≠ ∞) (ρ : ℝ) (r : ℕ) : + cellAtomConst V p A ρ r ≠ ∞ := by + have ht : 0 ≤ 1 - 1 / p.toReal := one_sub_one_div_toReal_nonneg hp1 + have hball : volume (ball (0 : V) 1) ≠ ∞ := measure_ball_lt_top.ne + refine ENNReal.mul_ne_top (ENNReal.mul_ne_top (ENNReal.mul_ne_top (by simp) hA) + (ENNReal.rpow_ne_top_of_nonneg ht (ENNReal.mul_ne_top ENNReal.ofReal_ne_top hball))) + (ENNReal.rpow_ne_top_of_nonneg (div_nonneg zero_le_one ENNReal.toReal_nonneg) + (ENNReal.mul_ne_top (ENNReal.natCast_ne_top _) + (ENNReal.mul_ne_top ENNReal.ofReal_ne_top hball))) + +/-- **Cell atoms are regular atoms** of order and exponent `r`, with radius factor `ρ + n` and the +constant `Rd.cellAtomConst`, for a continuous kernel `K` with `|Δ_h^l K| ≤ A 2^(jn) min(1, +(2^j ‖h‖)^l)` (`l = 0, r`) that vanishes outside `B̄(0, ρ 2^(-j))`. -/ +theorem isRegularAtom_cellAtom {p : ℝ≥0∞} (hp1 : 1 ≤ p) {K g : V → ℂ} (hKc : Continuous K) + (hg : MemLp g p volume) {j : ℕ} (m : Fin (finrank ℝ V) → ℤ) {A : ℝ≥0∞} {r : ℕ} + (hK : ∀ y, ‖K y‖ₑ ≤ A * dyadicWeight (finrank ℝ V) j) + (hKr : ∀ h y, ‖(fwdDiff h)^[r] K y‖ₑ ≤ + A * dyadicWeight (finrank ℝ V) j * min 1 (ENNReal.ofReal (2 ^ j * ‖h‖) ^ (r : ℝ))) + {ρ : ℝ} (hρ : 0 ≤ ρ) (hKρ : ∀ y, ρ / 2 ^ j < ‖y‖ → K y = 0) : + IsRegularAtom p r r (ρ + finrank ℝ V) (cellAtomConst V p A ρ r) j (cellCenter j m) + (cellAtom p K j g m) := by + have hKs : HasCompactSupport K := HasCompactSupport.intro (isCompact_closedBall 0 (ρ / 2 ^ j)) + fun y hy => hKρ y (by simpa [mem_closedBall, dist_zero_right, not_le] using hy) + have ht : 0 ≤ 1 - 1 / p.toReal := one_sub_one_div_toReal_nonneg hp1 + have hsup : ∀ x, ‖cellAtom p K j g m x‖ₑ ≤ 2 ^ r * A * + (ENNReal.ofReal ((ρ + r) ^ finrank ℝ V) * volume (ball (0 : V) 1)) ^ (1 - 1 / p.toReal) := + fun x => by + refine (enorm_cellAtom_le hp1 hg m hK hρ hKρ x).trans ?_ + rw [mul_assoc] + refine le_mul_of_one_le_of_le (one_le_pow₀ one_le_two) (mul_le_mul' le_rfl ?_) + exact ENNReal.rpow_le_rpow (mul_le_mul' (ENNReal.ofReal_le_ofReal + (pow_le_pow_left₀ hρ (by linarith [(Nat.cast_nonneg r : (0 : ℝ) ≤ r)]) _)) le_rfl) ht + unfold cellAtomConst + exact isRegularAtom_of_pointwise (add_nonneg hρ (Nat.cast_nonneg _)) + (continuous_cellAtom hp1 hKc hKs hg j m).aestronglyMeasurable + (fun x hx => cellAtom_eq_zero hKρ m hx) hsup + (fun h x => enorm_higherDiff_cellAtom_le hp1 hKc hg m hK hKr hρ hKρ h x) + +/-! ### The coefficients of the cells -/ + +/-- **The coefficients of one level**: `‖λ_{j,·}‖_{ℓ_p} = 2^(jn/p) ‖g‖_p`, since the cells +partition `V`. -/ +theorem levelNorm_cellCoef {p : ℝ≥0∞} (hp0 : p ≠ 0) (hp : p ≠ ∞) {g : V → ℂ} + (hg : MemLp g p volume) (j : ℕ) : + levelNorm p (cellCoef p j g) = dyadicWeight (finrank ℝ V / p.toReal) j * eLpNorm g p volume + := by + have hpos : 0 < p.toReal := ENNReal.toReal_pos hp0 hp + rw [levelNorm_eq_tsum hp0 hp] + simp_rw [enorm_cellCoef hg j, ENNReal.mul_rpow_of_nonneg _ _ hpos.le] + rw [ENNReal.tsum_mul_left, ← eLpNorm_rpow_eq_tsum_cell hp0 hp hg.aestronglyMeasurable j, + ← ENNReal.mul_rpow_of_nonneg _ _ hpos.le, one_div, ENNReal.rpow_rpow_inv hpos.ne'] + +/-- **The coefficient quasi-norm of cell coefficients**: +`‖λ‖_{b^s_{p,q}} = ‖(2^(js) ‖g_j‖_p)_j‖_{ℓ_q}` for the cell coefficients of `g_j ∈ L_p`. -/ +theorem coeffNorm_cellCoef {p : ℝ≥0∞} (hp0 : p ≠ 0) (hp : p ≠ ∞) {g : ℕ → V → ℂ} + (hg : ∀ j, MemLp (g j) p volume) (s : ℝ) (q : ℝ≥0∞) : + coeffNorm p (finrank ℝ V) s q (fun j => cellCoef p j (g j)) = + lqNorm q (fun j => dyadicWeight s j * eLpNorm (g j) p volume) := by + rw [coeffNorm] + congr 1 + funext j + rw [levelNorm_cellCoef hp0 hp (hg j) j, ← mul_assoc, ← ENNReal.dyadicWeight_add, sub_add_cancel] + +/-! ### The dual kernels -/ + +namespace LocalMeansBump + +variable (b : LocalMeansBump V) + +/-- **Pointwise bounds of the dual kernels**: for every order `r` there is `A < ∞` with +`|Δ_h^l η_j| ≤ A 2^(jn) min(1, (2^j ‖h‖)^l)` for `l ≤ r`, from the bounded derivatives of the +moment kernel (`Rd.enorm_higherDiff_le_of_iteratedFDeriv`) and the scaling of differences of +dilations (`Rd.higherDiff_dilate`). -/ +theorem exists_higherDiff_dual_bound (L r : ℕ) : ∃ A : ℝ≥0∞, A ≠ ∞ ∧ ∀ l ≤ r, ∀ j h y, + ‖(fwdDiff h)^[l] (b.dual L j) y‖ₑ ≤ + A * dyadicWeight (finrank ℝ V) j * min 1 (ENNReal.ofReal (2 ^ j * ‖h‖) ^ (l : ℝ)) := by + obtain ⟨C, hC⟩ := exists_iteratedFDeriv_bound (b.contDiff_momentKernel L) + (b.hasCompactSupport_momentKernel L) r + have hC0 : 0 ≤ C := (norm_nonneg _).trans (hC 0 (Nat.zero_le r) 0) + have hscaled : ∀ l ≤ r, ∀ i j : ℕ, i ≤ j → ∀ h y, ‖(fwdDiff h)^[l] (b.scaled L i) y‖ₑ ≤ + ENNReal.ofReal (2 ^ r * C) * dyadicWeight (finrank ℝ V) j * + min 1 (ENNReal.ofReal (2 ^ j * ‖h‖) ^ (l : ℝ)) := by + intro l hl i j hij h y + rw [scaled, higherDiff_dilate, dilate, eNorm_mul] + have h1 := enorm_higherDiff_le_of_iteratedFDeriv (b.contDiff_momentKernel L) (r := l) (j := 0) + hC0 (fun l' hl' x => by simpa using hC l' (hl'.trans hl) x) ((2 : ℝ) ^ i • h) + ((2 : ℝ) ^ i • y) + have h2 : ‖((((2 : ℝ) ^ i) ^ finrank ℝ V : ℝ) : ℂ)‖ₑ ≤ dyadicWeight (finrank ℝ V) j := by + rw [← ofReal_norm, Complex.norm_real, Real.norm_of_nonneg (by positivity), + ENNReal.ofReal_two_pow_pow] + exact ENNReal.dyadicWeight_mono (Nat.cast_nonneg _) hij + have h3 : min 1 (ENNReal.ofReal (2 ^ 0 * ‖(2 : ℝ) ^ i • h‖) ^ (l : ℝ)) ≤ + min 1 (ENNReal.ofReal (2 ^ j * ‖h‖) ^ (l : ℝ)) := by + refine min_le_min le_rfl (ENNReal.rpow_le_rpow (ENNReal.ofReal_le_ofReal ?_) + (Nat.cast_nonneg l)) + rw [pow_zero, one_mul, norm_smul, Real.norm_of_nonneg (by positivity)] + exact mul_le_mul_of_nonneg_right (pow_le_pow_right₀ one_le_two hij) (norm_nonneg h) + have h4 : ENNReal.ofReal (2 ^ l * C) ≤ ENNReal.ofReal (2 ^ r * C) := + ENNReal.ofReal_le_ofReal (mul_le_mul_of_nonneg_right + (pow_le_pow_right₀ one_le_two hl) hC0) + calc ‖((((2 : ℝ) ^ i) ^ finrank ℝ V : ℝ) : ℂ)‖ₑ * + ‖(fwdDiff ((2 : ℝ) ^ i • h))^[l] (momentKernel b.toFun L) ((2 : ℝ) ^ i • y)‖ₑ + ≤ dyadicWeight (finrank ℝ V) j * (ENNReal.ofReal (2 ^ r * C) * + min 1 (ENNReal.ofReal (2 ^ j * ‖h‖) ^ (l : ℝ))) := + mul_le_mul' h2 (h1.trans (mul_le_mul' h4 h3)) + _ = _ := by ring + refine ⟨2 * ENNReal.ofReal (2 ^ r * C), ENNReal.mul_ne_top (by simp) ENNReal.ofReal_ne_top, + fun l hl j h y => ?_⟩ + cases j with + | zero => + refine (hscaled l hl 0 0 le_rfl h y).trans ?_ + gcongr + exact le_mul_of_one_le_left' one_le_two + | succ j => + rw [show b.dual L (j + 1) = b.scaled L (j + 1) + b.scaled L j from rfl, fwdDiff_iter_add, + Pi.add_apply] + refine (eNorm_add_le _ _).trans ?_ + calc ‖(fwdDiff h)^[l] (b.scaled L (j + 1)) y‖ₑ + ‖(fwdDiff h)^[l] (b.scaled L j) y‖ₑ + ≤ ENNReal.ofReal (2 ^ r * C) * dyadicWeight (finrank ℝ V) (j + 1) * + min 1 (ENNReal.ofReal (2 ^ (j + 1) * ‖h‖) ^ (l : ℝ)) + + ENNReal.ofReal (2 ^ r * C) * dyadicWeight (finrank ℝ V) (j + 1) * + min 1 (ENNReal.ofReal (2 ^ (j + 1) * ‖h‖) ^ (l : ℝ)) := + add_le_add (hscaled l hl _ _ le_rfl h y) (hscaled l hl _ _ (Nat.le_succ j) h y) + _ = _ := by ring + +/-- **Uniform pointwise bounds of the cell atoms**: for every order `r` there is `A < ∞` such that +the cell atoms of `η_j ⋆ g`, `g ∈ L_p`, satisfy `|Δ_h^l a_{j,m}| ≤ A min(1, (2^j ‖h‖)^l)` for all +`l ≤ r`, `j`, `m`. -/ +theorem exists_cellAtom_pointwise_bound {p : ℝ≥0∞} (hp1 : 1 ≤ p) (L r : ℕ) : + ∃ A : ℝ≥0∞, A ≠ ∞ ∧ ∀ (j : ℕ) {g : V → ℂ}, MemLp g p volume → ∀ m, ∀ l ≤ r, ∀ h x, + ‖(fwdDiff h)^[l] (cellAtom p (b.dual L j) j g m) x‖ₑ ≤ + A * min 1 (ENNReal.ofReal (2 ^ j * ‖h‖) ^ (l : ℝ)) := by + obtain ⟨A, hA, hb⟩ := b.exists_higherDiff_dual_bound L r + have ht : 0 ≤ 1 - 1 / p.toReal := one_sub_one_div_toReal_nonneg hp1 + set ρ := 2 * (L : ℝ) * b.radius + have hρ : 0 ≤ ρ := mul_nonneg (mul_nonneg zero_le_two (Nat.cast_nonneg L)) b.radius_nonneg + refine ⟨2 ^ r * A * (ENNReal.ofReal ((ρ + r) ^ finrank ℝ V) * volume (ball (0 : V) 1)) ^ + (1 - 1 / p.toReal), ENNReal.mul_ne_top (ENNReal.mul_ne_top (by simp) hA) + (ENNReal.rpow_ne_top_of_nonneg ht (ENNReal.mul_ne_top ENNReal.ofReal_ne_top + measure_ball_lt_top.ne)), fun j g hg m l hl h x => ?_⟩ + have hK : ∀ y, ‖b.dual L j y‖ₑ ≤ A * dyadicWeight (finrank ℝ V) j := fun y => by + simpa using hb 0 (Nat.zero_le r) j 0 y + have h1 := enorm_higherDiff_cellAtom_le hp1 (b.continuous_dual L j) hg m hK (hb l hl j) hρ + (fun y hy => b.dual_eq_zero_of_lt L j hy) h x + refine h1.trans (mul_le_mul' ?_ le_rfl) + refine mul_le_mul' (mul_le_mul' (pow_le_pow_right₀ one_le_two hl) le_rfl) + (ENNReal.rpow_le_rpow (mul_le_mul' (ENNReal.ofReal_le_ofReal + (pow_le_pow_left₀ (add_nonneg hρ (Nat.cast_nonneg l)) ?_ _)) le_rfl) ht) + exact add_le_add_right (Nat.cast_le.2 hl) ρ + +variable {p : ℝ≥0∞} [Fact (1 ≤ p)] + +/-- **Atomic decomposition** (Schneider–Vybíral, Theorem 2.6, direction ⇒): for every order `r` +there is `C < ∞` such that for every `F ∈ L_p` the terms of the reproducing formula +`F = ∑_j η_j ⋆ (k_j ⋆ F)` (`Rd.LocalMeansBump.tendsto_sum_dual_localMean`) are +`η_j ⋆ (k_j ⋆ F) = ∑_m λ_{j,m} a_{j,m}` with the cell atoms, regular atoms of order and exponent +`r` with radius factor `2LR + n` and constant `C`; the coefficients have +`‖λ‖_{b^s_{p,q}} = ‖(2^(js) ‖k_j ⋆ F‖_p)_j‖_{ℓ_q}`, the local means quasi-norm. -/ +theorem atomic_decomposition (hp : p ≠ ∞) (L r : ℕ) : ∃ C : ℝ≥0∞, C ≠ ∞ ∧ + ∀ F : Lp ℂ p (volume : Measure V), + (∀ j m, IsRegularAtom p r r (2 * L * b.radius + finrank ℝ V) C j (cellCenter j m) + (cellAtom p (b.dual L j) j (b.localMean hp L j F) m)) ∧ + (∀ j, ∀ᵐ x ∂volume, convLp hp (b.integrable_dual L j) (b.localMean hp L j F) x = + ∑' m, cellCoef p j (b.localMean hp L j F) m * + cellAtom p (b.dual L j) j (b.localMean hp L j F) m x) ∧ + ∀ s q, coeffNorm p (finrank ℝ V) s q (fun j => cellCoef p j (b.localMean hp L j F)) = + b.localMeansNorm hp L s q F := by + have hp1 : 1 ≤ p := Fact.out + have hp0 : p ≠ 0 := (zero_lt_one.trans_le hp1).ne' + obtain ⟨A, hA, hb⟩ := b.exists_higherDiff_dual_bound L r + have hρ : 0 ≤ 2 * (L : ℝ) * b.radius := + mul_nonneg (mul_nonneg zero_le_two (Nat.cast_nonneg L)) b.radius_nonneg + have hK : ∀ j y, ‖b.dual L j y‖ₑ ≤ A * dyadicWeight (finrank ℝ V) j := fun j y => by + simpa using hb 0 (Nat.zero_le r) j 0 y + refine ⟨cellAtomConst V p A (2 * L * b.radius) r, cellAtomConst_ne_top hp1 hA _ r, + fun F => ⟨fun j m => ?_, fun j => ?_, fun s q => ?_⟩⟩ + · exact isRegularAtom_cellAtom hp1 (b.continuous_dual L j) (Lp.memLp _) m (hK j) + (hb r le_rfl j) hρ fun y hy => b.dual_eq_zero_of_lt L j hy + · filter_upwards [convLp_apply_ae hp (b.integrable_dual L j) (b.localMean hp L j F)] with x hx + rw [hx] + exact conv_eq_tsum_cellAtom hp1 (b.continuous_dual L j) (by positivity) + (fun y hy => b.dual_eq_zero_of_lt L j hy) (Lp.memLp _) j x + · rw [coeffNorm_cellCoef hp0 hp (fun j => Lp.memLp _), localMeansNorm] + simp_rw [Lp.eNorm_def] + +include b in +/-- **Atomic characterisation of Besov spaces** (Schneider–Vybíral, Corollary 2.8, for `p ≥ 1`): +for `1 ≤ p < ∞`, `0 < s < L` and `1 ≤ q ≤ ∞`, `F ∈ B^s_{p,q}(V)` iff `F = ∑_j f_j` in `L_p` with +`f_j = ∑_m λ_{j,m} a_{j,m}` for regular atoms of order and exponent `L` whose centres have +bounded overlap, and `‖λ‖_{b^s_{p,q}} < ∞`. The atoms of `F` are its cell atoms +(`Rd.LocalMeansBump.atomic_decomposition`); the converse is the synthesis +`Rd.modNorm_le_coeffNorm`. The bump `b` only enters the proof. -/ +theorem besov_iff_atomic (hp : p ≠ ∞) {L : ℕ} (hL : 1 ≤ L) {s : ℝ} (hs : 0 < s) (hsL : s < L) + {q : ℝ≥0∞} (hq : 1 ≤ q) (F : Lp ℂ p (volume : Measure V)) : + ‖F‖ₑ + lqNorm q (fun k => dyadicWeight s k * lpModulus p L F k) < ∞ ↔ + ∃ (d : ℝ) (C : ℝ≥0∞) (N : ℕ) (c : ℕ → (Fin (finrank ℝ V) → ℤ) → V) + (a : ℕ → (Fin (finrank ℝ V) → ℤ) → V → ℂ) (coef : ℕ → (Fin (finrank ℝ V) → ℤ) → ℂ) + (f : ℕ → Lp ℂ p (volume : Measure V)), C ≠ ∞ ∧ + (∀ j m, IsRegularAtom p L L d C j (c j m) (a j m)) ∧ + (∀ j x (S : Finset (Fin (finrank ℝ V) → ℤ)), + (∀ m ∈ S, coef j m ≠ 0 ∧ ‖x - c j m‖ ≤ (d + L) / 2 ^ j) → S.card ≤ N) ∧ + (∀ j, ∀ᵐ x ∂volume, f j x = ∑' m, coef j m * a j m x) ∧ + Tendsto (fun J => ∑ j ∈ Finset.range (J + 1), f j) atTop (𝓝 F) ∧ + coeffNorm p (finrank ℝ V) s q coef < ∞ := by + have hp1 : 1 ≤ p := Fact.out + constructor + · intro hF + obtain ⟨C, hC, hdec⟩ := b.atomic_decomposition hp L L + obtain ⟨hatom, hsum, hcoef⟩ := hdec F + have hd : 0 ≤ 2 * (L : ℝ) * b.radius + finrank ℝ V + L := + add_nonneg (add_nonneg (mul_nonneg (mul_nonneg zero_le_two (Nat.cast_nonneg L)) + b.radius_nonneg) (Nat.cast_nonneg _)) (Nat.cast_nonneg L) + refine ⟨2 * L * b.radius + finrank ℝ V, C, + ⌈(2 * (2 * L * b.radius + finrank ℝ V + L) + 2) ^ finrank ℝ V⌉₊, + fun j m => cellCenter j m, fun j => cellAtom p (b.dual L j) j (b.localMean hp L j F), + fun j => cellCoef p j (b.localMean hp L j F), + fun j => convLp hp (b.integrable_dual L j) (b.localMean hp L j F), hC, hatom, + fun j x S hS => card_le_of_norm_sub_cellCenter_le j hd x S fun m hm => (hS m hm).2, hsum, + b.tendsto_sum_dual_localMean hp hL F, ?_⟩ + rw [hcoef] + exact (b.localMeansNorm_le hp L s hq F).trans_lt + (ENNReal.mul_lt_top (b.upperConst_ne_top L s).lt_top hF) + · rintro ⟨d, C, N, c, a, coef, f, hC, ha, hN, hf, hFt, hcoef⟩ + exact (modNorm_le_coeffNorm hp c a coef hN ha hf hFt hs hsL hq).trans_lt + (ENNReal.mul_lt_top (atomSynthConst_ne_top hp1 N hC L hs hsL).lt_top hcoef) + +end LocalMeansBump + +end Rd diff --git a/LeanPool/FunctionSpaces/Rd/Atoms/AtomComposition.lean b/LeanPool/FunctionSpaces/Rd/Atoms/AtomComposition.lean new file mode 100644 index 0000000000..914fee3d67 --- /dev/null +++ b/LeanPool/FunctionSpaces/Rd/Atoms/AtomComposition.lean @@ -0,0 +1,424 @@ +/- +Copyright (c) 2026 Mario Ullrich. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Mario Ullrich +-/ +module + +public import LeanPool.FunctionSpaces.Rd.Atoms.SmoothAtoms + +/- +Modified for Lean Pool: module names and imports adapted. +-/ + +/-! +# Smooth atoms under smooth changes of variables + +Let `Ω` be a closed convex set with nonempty interior, the model being the closed half-space. A +**smooth change of variables with a cut-off** on `Ω` (`Rd.CutoffDiffeo`) consists of a map `Φ` +from a relatively open part `Ω ∩ U` onto another one `Ω ∩ U'`, smooth within `Ω` with smooth +inverse `Ψ`, and a function `χ` that is smooth within `Ω ∩ U'` and vanishes on `Ω` outside a +compact set `K₀ ⊆ Ω ∩ U'`. It acts on functions by + +`T f = 1_{Ω ∩ U} (χ f) ∘ Φ` (`Rd.CutoffDiffeo.apply`). + +The pieces of a function on a manifold in two overlapping charts are related in this way; on +`Ω = V`, `χ` a smooth cut-off and `Φ = id` it is a pointwise multiplier. `T f` vanishes outside +the compact set `Ψ(K₀)` and is continuous on `Ω` for continuous `f` +(`Rd.CutoffDiffeo.continuousOn_apply`). + +**Smooth atoms stay smooth atoms** (`Rd.CutoffDiffeo.isSmoothAtom_apply`): there are `L` and `A'`, +depending only on `T` and the order `K`, such that for a smooth atom `a` on `V` of level `j`, +radius factor `d` and constant `A`, and a point `y₀ ∈ K₀` within `d 2^(-j)` of its centre, +`T a` is a smooth atom on `Ω` with centre `Ψ y₀`, radius factor `2 L d` and constant `A' A`. +Only `Ψ(K₀)` carries `T a`; there the derivatives of `Φ` are bounded, `Ψ` is Lipschitz on `K₀` +(`Rd.exists_lipschitzOnWith_of_contDiffOn_inter`), and Leibniz's rule and the chain rule within +sets (Mathlib's `norm_iteratedFDerivWithin_mul_le`, `norm_iteratedFDerivWithin_comp_le`) give +`‖D^l (T a)‖ ≤ l! 2^l M_χ A D^l 2^(jl)`. +-/ + +@[expose] public section + +open MeasureTheory Filter Topology Module Metric Set +open scoped ENNReal NNReal + +namespace Rd + +/-! ### Calculus within a relatively open part of a convex set -/ + +section Within + +variable {E F : Type*} [NormedAddCommGroup E] [NormedSpace ℝ E] [NormedAddCommGroup F] + [NormedSpace ℝ F] + +/-- A map of class `C^1` within a relatively open part `Ω ∩ U` of a convex set `Ω` is locally +Lipschitz there. -/ +theorem locallyLipschitzOn_inter {Ω U : Set E} (hΩ : Convex ℝ Ω) (hU : IsOpen U) {f : E → F} + {n : WithTop ℕ∞} (hn : 1 ≤ n) (hf : ContDiffOn ℝ n f (Ω ∩ U)) : + LocallyLipschitzOn (Ω ∩ U) f := by + intro x hx + have h1 : ContDiffWithinAt ℝ 1 f Ω x := + (contDiffWithinAt_inter (hU.mem_nhds hx.2)).1 ((hf x hx).of_le hn) + obtain ⟨K, t, ht, hL⟩ := h1.exists_lipschitzOnWith hΩ + exact ⟨K, t, nhdsWithin_mono x inter_subset_left ht, hL⟩ + +/-- A map of class `C^1` within a relatively open part of a convex set is Lipschitz on its compact +subsets. -/ +theorem exists_lipschitzOnWith_of_contDiffOn_inter {Ω U : Set E} (hΩ : Convex ℝ Ω) + (hU : IsOpen U) {f : E → F} {n : WithTop ℕ∞} (hn : 1 ≤ n) (hf : ContDiffOn ℝ n f (Ω ∩ U)) + {K : Set E} (hK : IsCompact K) (hKs : K ⊆ Ω ∩ U) : ∃ L, LipschitzOnWith L f K := + ((locallyLipschitzOn_inter hΩ hU hn hf).mono hKs).exists_lipschitzOnWith_of_compact hK + +/-- **Derivatives of a function that vanishes near a point**: if `f = 0` on `s ∩ u` for an open +`u ∋ x`, then the derivatives of `f` within `s` vanish at `x ∈ s`. -/ +theorem iteratedFDerivWithin_eq_zero_of_eqOn {s u : Set E} (hu : IsOpen u) {x : E} (hxu : x ∈ u) + (hxs : x ∈ s) {f : E → F} (hf : ∀ y ∈ s ∩ u, f y = 0) (n : ℕ) : + iteratedFDerivWithin ℝ n f s x = 0 := by + have h : f =ᶠ[𝓝[s] x] fun _ => 0 := + mem_nhdsWithin.2 ⟨u, hu, hxu, fun y hy => hf y ⟨hy.2, hy.1⟩⟩ + rw [h.iteratedFDerivWithin_eq (hf x ⟨hxs, hxu⟩) n] + rcases Nat.eq_zero_or_pos n with rfl | hn + · ext; simp + · exact congrFun (iteratedFDerivWithin_const_of_ne (𝕜 := ℝ) hn.ne' (0 : F) s) x + +end Within + +/-! ### Smooth changes of variables with a cut-off -/ + +variable {V : Type*} [NormedAddCommGroup V] [NormedSpace ℝ V] + +/-- A **smooth change of variables with a cut-off** on `Ω`: a bijection `Φ : Ω ∩ U → Ω ∩ U'`, +smooth within `Ω` with smooth inverse `Ψ`, and a function `χ` that is smooth within `Ω ∩ U'` and +vanishes on `Ω` outside a compact set `K₀ ⊆ Ω ∩ U'`. -/ +structure CutoffDiffeo (Ω : Set V) where + /-- The open set cutting out the source. -/ + U : Set V + /-- The open set cutting out the target. -/ + U' : Set V + isOpen_U : IsOpen U + isOpen_U' : IsOpen U' + /-- The change of variables. -/ + Phi : V → V + /-- Its inverse. -/ + Psi : V → V + /-- The cut-off. -/ + chi : V → ℂ + /-- The compact set carrying the cut-off. -/ + K0 : Set V + contDiffOn_Phi : ContDiffOn ℝ ((⊤ : ℕ∞) : WithTop ℕ∞) Phi (Ω ∩ U) + contDiffOn_Psi : ContDiffOn ℝ ((⊤ : ℕ∞) : WithTop ℕ∞) Psi (Ω ∩ U') + contDiffOn_chi : ContDiffOn ℝ ((⊤ : ℕ∞) : WithTop ℕ∞) chi (Ω ∩ U') + mapsTo_Phi : MapsTo Phi (Ω ∩ U) (Ω ∩ U') + mapsTo_Psi : MapsTo Psi (Ω ∩ U') (Ω ∩ U) + left_inv : ∀ x ∈ Ω ∩ U, Psi (Phi x) = x + right_inv : ∀ y ∈ Ω ∩ U', Phi (Psi y) = y + isCompact_K0 : IsCompact K0 + K0_subset : K0 ⊆ Ω ∩ U' + chi_eq_zero : ∀ y ∈ Ω, y ∉ K0 → chi y = 0 + +namespace CutoffDiffeo + +variable {Ω : Set V} (T : CutoffDiffeo Ω) + +/-- The action on functions: `T f = 1_{Ω ∩ U} (χ f) ∘ Φ`. -/ +noncomputable def apply (f : V → ℂ) : V → ℂ := + (Ω ∩ T.U).indicator fun x => T.chi (T.Phi x) * f (T.Phi x) + +/-- The compact set `Ψ(K₀)` that carries the images. -/ +def carrier : Set V := T.Psi '' T.K0 + +/-- `Ψ(K₀)` is compact. -/ +theorem isCompact_carrier : IsCompact T.carrier := + T.isCompact_K0.image_of_continuousOn (T.contDiffOn_Psi.continuousOn.mono T.K0_subset) + +/-- `Ψ(K₀) ⊆ Ω ∩ U`. -/ +theorem carrier_subset : T.carrier ⊆ Ω ∩ T.U := by + rintro _ ⟨y, hy, rfl⟩ + exact T.mapsTo_Psi (T.K0_subset hy) + +/-- **`T f` vanishes on `Ω` outside `Ψ(K₀)`**: if `Φ x ∉ K₀`, the cut-off vanishes. -/ +theorem apply_eq_zero_of_notMem (f : V → ℂ) {x : V} (hx : x ∉ T.carrier) : T.apply f x = 0 := by + by_cases hxs : x ∈ Ω ∩ T.U + · rw [apply, Set.indicator_of_mem hxs] + have hΦ : T.Phi x ∉ T.K0 := fun h => hx ⟨T.Phi x, h, T.left_inv x hxs⟩ + rw [T.chi_eq_zero _ (T.mapsTo_Phi hxs).1 hΦ, zero_mul] + · rw [apply, Set.indicator_of_notMem hxs] + +/-- **`T` keeps continuity on `Ω`**: for continuous `f`, `T f` is continuous on `Ω`. Near a point +of `Ψ(K₀)` it is `(χ f) ∘ Φ`, and off the compact set `Ψ(K₀)` it vanishes. -/ +theorem continuousOn_apply {f : V → ℂ} (hf : Continuous f) : ContinuousOn (T.apply f) Ω := by + intro x hx + by_cases hxK : x ∈ T.carrier + · have hxU : x ∈ T.U := (T.carrier_subset hxK).2 + have hcont : ContinuousOn (fun y => T.chi (T.Phi y) * f (T.Phi y)) (Ω ∩ T.U) := + (T.contDiffOn_chi.continuousOn.comp T.contDiffOn_Phi.continuousOn T.mapsTo_Phi).mul + (hf.comp_continuousOn T.contDiffOn_Phi.continuousOn) + have hwithin := (continuousWithinAt_inter (T.isOpen_U.mem_nhds hxU)).1 (hcont x ⟨hx, hxU⟩) + refine hwithin.congr_of_eventuallyEq ?_ ?_ + · filter_upwards [mem_nhdsWithin_of_mem_nhds (T.isOpen_U.mem_nhds hxU), + self_mem_nhdsWithin] with y hyU hyΩ + rw [apply, Set.indicator_of_mem (Set.mem_inter hyΩ hyU)] + · rw [apply, Set.indicator_of_mem (Set.mem_inter hx hxU)] + · have hev : T.apply f =ᶠ[𝓝 x] fun _ => 0 := by + filter_upwards [T.isCompact_carrier.isClosed.isOpen_compl.mem_nhds hxK] with y hy + exact T.apply_eq_zero_of_notMem f hy + exact (continuousAt_const.congr hev.symm).continuousWithinAt + +/-- **`T a` vanishes if `a` lives far from `K₀`**: if `a = 0` outside `B(c, d 2^(-j))` and no +point of `K₀` lies in that ball, then `T a = 0`. -/ +theorem apply_eq_zero_of_forall_far {d : ℝ} {j : ℕ} {c : V} {a : V → ℂ} + (ha : ∀ x, d / 2 ^ j < ‖x - c‖ → a x = 0) (hfar : ∀ y ∈ T.K0, d / 2 ^ j < ‖y - c‖) (x : V) : + T.apply a x = 0 := by + by_cases hxs : x ∈ Ω ∩ T.U + · rw [apply, Set.indicator_of_mem hxs] + by_cases hΦ : T.Phi x ∈ T.K0 + · rw [ha _ (hfar _ hΦ), mul_zero] + · rw [T.chi_eq_zero _ (T.mapsTo_Phi hxs).1 hΦ, zero_mul] + · rw [apply, Set.indicator_of_notMem hxs] + +variable (hΩ : Convex ℝ Ω) (hint : (interior Ω).Nonempty) +include hΩ hint + +/-- Unique differentiability on the source. -/ +theorem uniqueDiffOn_source : UniqueDiffOn ℝ (Ω ∩ T.U) := + (uniqueDiffOn_convex hΩ hint).inter T.isOpen_U + +/-- Unique differentiability on the target. -/ +theorem uniqueDiffOn_target : UniqueDiffOn ℝ (Ω ∩ T.U') := + (uniqueDiffOn_convex hΩ hint).inter T.isOpen_U' + +omit hint in +/-- `Ψ` is Lipschitz on `K₀`. -/ +theorem exists_lipschitzOnWith_Psi : ∃ L : ℝ≥0, LipschitzOnWith L T.Psi T.K0 := + exists_lipschitzOnWith_of_contDiffOn_inter hΩ T.isOpen_U' (by exact_mod_cast le_top) + T.contDiffOn_Psi T.isCompact_K0 T.K0_subset + +omit hint in +/-- `Φ` is Lipschitz on `Ψ(K₀)`. -/ +theorem exists_lipschitzOnWith_Phi : ∃ L : ℝ≥0, LipschitzOnWith L T.Phi T.carrier := + exists_lipschitzOnWith_of_contDiffOn_inter hΩ T.isOpen_U (by exact_mod_cast le_top) + T.contDiffOn_Phi T.isCompact_carrier T.carrier_subset + +/-- **The derivatives of the cut-off are bounded**: `‖D^l χ‖ ≤ M` within `Ω ∩ U'` for `l ≤ K`; +on the compact `K₀` by continuity (`ContDiffOn.exists_norm_iteratedFDerivWithin_le`), elsewhere +they vanish. -/ +theorem exists_iteratedFDerivWithin_chi_bound (K : ℕ) : + ∃ M : ℝ, 0 ≤ M ∧ ∀ l ≤ K, ∀ y ∈ Ω ∩ T.U', ‖iteratedFDerivWithin ℝ l T.chi (Ω ∩ T.U') y‖ ≤ M + := by + obtain ⟨C, hC⟩ := T.contDiffOn_chi.exists_norm_iteratedFDerivWithin_le + (T.uniqueDiffOn_target hΩ hint) T.isCompact_K0 T.K0_subset K + refine ⟨max C 0, le_max_right _ _, fun l hl y hy => ?_⟩ + by_cases hyK : y ∈ T.K0 + · exact (hC l hl y hyK).trans (le_max_left _ _) + · have hzero : iteratedFDerivWithin ℝ l T.chi (Ω ∩ T.U') y = 0 := + iteratedFDerivWithin_eq_zero_of_eqOn T.isCompact_K0.isClosed.isOpen_compl hyK hy + (fun z hz => T.chi_eq_zero z hz.1.1 hz.2) l + rw [hzero, norm_zero] + exact le_max_right _ _ + +/-- **The derivatives of `Φ` are bounded on `Ψ(K₀)`**: `‖D^i Φ‖ ≤ D` within `Ω ∩ U` for +`i ≤ K`, with `D ≥ 1` (`ContDiffOn.exists_norm_iteratedFDerivWithin_le`). -/ +theorem exists_iteratedFDerivWithin_Phi_bound (K : ℕ) : + ∃ D : ℝ, 1 ≤ D ∧ ∀ i ≤ K, ∀ x ∈ T.carrier, + ‖iteratedFDerivWithin ℝ i T.Phi (Ω ∩ T.U) x‖ ≤ D := by + obtain ⟨C, hC⟩ := T.contDiffOn_Phi.exists_norm_iteratedFDerivWithin_le + (T.uniqueDiffOn_source hΩ hint) T.isCompact_carrier T.carrier_subset K + exact ⟨max 1 C, le_max_left _ _, fun i hi x hx => (hC i hi x hx).trans (le_max_right _ _)⟩ + +end CutoffDiffeo + +/-! ### Smooth atoms under the change of variables -/ + +section Atoms + +variable {V : Type*} [NormedAddCommGroup V] [InnerProductSpace ℝ V] [FiniteDimensional ℝ V] + [MeasurableSpace V] [BorelSpace V] + +omit [MeasurableSpace V] [BorelSpace V] in +/-- **Bounded overlap of transported centres**: let `Φ` be `L`-Lipschitz on `B`, and let the +points `z_m ∈ B` satisfy `‖Φ z_m - c_{j,m}‖ ≤ d 2^(-j)` for the centres `c_{j,m}` of the cells of +level `j`. Then at most `⌈(2 (2 L ρ + d) + 2)^n⌉` of the `z_m` lie in a ball of radius +`ρ 2^(-j)`. -/ +theorem card_le_of_lipschitz_centres {B : Set V} {Phi : V → V} {L : ℝ≥0} + (hΦ : LipschitzOnWith L Phi B) (j : ℕ) {d ρ : ℝ} (hd : 0 ≤ d) (hρ : 0 ≤ ρ) + {z : (Fin (finrank ℝ V) → ℤ) → V} (x : V) (S : Finset (Fin (finrank ℝ V) → ℤ)) + (hS : ∀ m ∈ S, z m ∈ B ∧ ‖Phi (z m) - cellCenter j m‖ ≤ d / 2 ^ j ∧ ‖x - z m‖ ≤ ρ / 2 ^ j) : + S.card ≤ ⌈(2 * (2 * L * ρ + d) + 2) ^ finrank ℝ V⌉₊ := by + rcases S.eq_empty_or_nonempty with hS0 | ⟨m₀, hm₀⟩ + · simp [hS0] + refine card_le_of_norm_sub_cellCenter_le j (by positivity) (Phi (z m₀)) S fun m hm => ?_ + obtain ⟨hz0, -, hx0⟩ := hS m₀ hm₀ + obtain ⟨hz, hc, hx⟩ := hS m hm + have h1 : ‖Phi (z m₀) - Phi (z m)‖ ≤ L * (2 * ρ / 2 ^ j) := by + have := hΦ.dist_le_mul (z m₀) hz0 (z m) hz + rw [dist_eq_norm, dist_eq_norm] at this + refine this.trans (mul_le_mul_of_nonneg_left ?_ L.coe_nonneg) + calc ‖z m₀ - z m‖ = ‖(x - z m) - (x - z m₀)‖ := by congr 1; abel + _ ≤ ‖x - z m‖ + ‖x - z m₀‖ := norm_sub_le _ _ + _ ≤ ρ / 2 ^ j + ρ / 2 ^ j := add_le_add hx hx0 + _ = 2 * ρ / 2 ^ j := by ring + calc ‖Phi (z m₀) - cellCenter j m‖ = ‖(Phi (z m₀) - Phi (z m)) + (Phi (z m) - cellCenter j m)‖ + := by + congr 1; abel + _ ≤ ‖Phi (z m₀) - Phi (z m)‖ + ‖Phi (z m) - cellCenter j m‖ := norm_add_le _ _ + _ ≤ L * (2 * ρ / 2 ^ j) + d / 2 ^ j := add_le_add h1 hc + _ = (2 * L * ρ + d) / 2 ^ j := by ring + +namespace CutoffDiffeo + +variable {Ω : Set V} (T : CutoffDiffeo Ω) + +/-- **Derivatives of `χ a`**: for a smooth atom `a` on `V` with constant `A` and `‖D^k χ‖ ≤ M` +within `Ω ∩ U'`, `‖D^i (χ a)‖ ≤ 2^i M A 2^(ji)` within `Ω ∩ U'` for `i ≤ K`. -/ +theorem norm_iteratedFDerivWithin_mul_atom_le (hΩ : Convex ℝ Ω) (hint : (interior Ω).Nonempty) + {K : ℕ} {M : ℝ} (hM : ∀ l ≤ K, ∀ y ∈ Ω ∩ T.U', ‖iteratedFDerivWithin ℝ l T.chi (Ω ∩ T.U') y‖ + ≤ M) + {d A : ℝ} (hA : 0 ≤ A) {j : ℕ} {c : V} {a : V → ℂ} (ha : IsSmoothAtom Set.univ K d A j c a) + {i : ℕ} (hi : i ≤ K) {y : V} (hy : y ∈ Ω ∩ T.U') : + ‖iteratedFDerivWithin ℝ i (fun z => T.chi z * a z) (Ω ∩ T.U') y‖ ≤ + 2 ^ i * M * A * 2 ^ (j * i) := by + have ht := T.uniqueDiffOn_target hΩ hint + have hac : ContDiff ℝ K a := contDiffOn_univ.1 ha.contDiffOn + have hM0 : 0 ≤ M := (norm_nonneg _).trans (hM 0 (Nat.zero_le K) y hy) + have ha' : ∀ k ≤ K, ‖iteratedFDerivWithin ℝ k a (Ω ∩ T.U') y‖ ≤ A * 2 ^ (j * k) := + fun k hk => by + rw [iteratedFDerivWithin_eq_iteratedFDeriv ht (hac.contDiffAt.of_le (by exact_mod_cast hk)) + hy, ← iteratedFDerivWithin_univ] + exact ha.norm_iteratedFDerivWithin_le k hk y (Set.mem_univ y) + refine (norm_iteratedFDerivWithin_mul_le (T.contDiffOn_chi.of_le (by exact_mod_cast le_top)) + hac.contDiffOn ht hy (by exact_mod_cast hi)).trans ?_ + calc ∑ k ∈ Finset.range (i + 1), (i.choose k : ℝ) * + ‖iteratedFDerivWithin ℝ k T.chi (Ω ∩ T.U') y‖ * + ‖iteratedFDerivWithin ℝ (i - k) a (Ω ∩ T.U') y‖ + ≤ ∑ k ∈ Finset.range (i + 1), (i.choose k : ℝ) * (M * A * 2 ^ (j * i)) := by + refine Finset.sum_le_sum fun k hk => ?_ + have hki : k ≤ i := Nat.lt_succ_iff.1 (Finset.mem_range.1 hk) + rw [mul_assoc] + refine mul_le_mul_of_nonneg_left ?_ (Nat.cast_nonneg _) + calc ‖iteratedFDerivWithin ℝ k T.chi (Ω ∩ T.U') y‖ * + ‖iteratedFDerivWithin ℝ (i - k) a (Ω ∩ T.U') y‖ + ≤ M * (A * 2 ^ (j * (i - k))) := + mul_le_mul (hM k (hki.trans hi) y hy) (ha' (i - k) ((Nat.sub_le i k).trans hi)) + (norm_nonneg _) hM0 + _ ≤ M * (A * 2 ^ (j * i)) := by + gcongr + · exact one_le_two + · exact Nat.sub_le i k + _ = M * A * 2 ^ (j * i) := by ring + _ = 2 ^ i * M * A * 2 ^ (j * i) := by + rw [← Finset.sum_mul] + have hsum : ∑ k ∈ Finset.range (i + 1), (i.choose k : ℝ) = 2 ^ i := by + exact_mod_cast Nat.sum_range_choose i + rw [hsum] + ring + +omit [FiniteDimensional ℝ V] [MeasurableSpace V] [BorelSpace V] in +/-- **The changed atom vanishes far from `Ψ(y₀)`**: if `a` vanishes outside `B(c, d 2^(-j))`, +`y₀ ∈ K₀` lies within `d 2^(-j)` of `c` and `Ψ` is `L`-Lipschitz on `K₀`, then `T a` vanishes +outside `B(Ψ y₀, 2 L d 2^(-j))`. -/ +theorem apply_eq_zero_of_far {L : ℝ≥0} (hL : LipschitzOnWith L T.Psi T.K0) {d : ℝ} {j : ℕ} {c : V} + {a : V → ℂ} (ha : ∀ x, d / 2 ^ j < ‖x - c‖ → a x = 0) {y₀ : V} (hy₀ : y₀ ∈ T.K0) + (hy₀c : ‖y₀ - c‖ ≤ d / 2 ^ j) {x : V} (hx : 2 * L * d / 2 ^ j < ‖x - T.Psi y₀‖) : + T.apply a x = 0 := by + by_contra hb + have hxs : x ∈ Ω ∩ T.U := by + by_contra hxs + exact hb (by rw [apply, Set.indicator_of_notMem hxs]) + rw [apply, Set.indicator_of_mem hxs] at hb + have hΦK : T.Phi x ∈ T.K0 := by + by_contra hΦK + exact hb (by rw [T.chi_eq_zero _ (T.mapsTo_Phi hxs).1 hΦK, zero_mul]) + have hΦc : ‖T.Phi x - c‖ ≤ d / 2 ^ j := not_lt.1 fun h => hb (by rw [ha _ h, mul_zero]) + have h1 : ‖x - T.Psi y₀‖ ≤ L * ‖T.Phi x - y₀‖ := by + have := hL.dist_le_mul (T.Phi x) hΦK y₀ hy₀ + rwa [T.left_inv x hxs, dist_eq_norm, dist_eq_norm] at this + have h2 : ‖T.Phi x - y₀‖ ≤ 2 * d / 2 ^ j := by + calc ‖T.Phi x - y₀‖ = ‖(T.Phi x - c) - (y₀ - c)‖ := by congr 1; abel + _ ≤ ‖T.Phi x - c‖ + ‖y₀ - c‖ := norm_sub_le _ _ + _ ≤ d / 2 ^ j + d / 2 ^ j := add_le_add hΦc hy₀c + _ = 2 * d / 2 ^ j := by ring + have h3 : ‖x - T.Psi y₀‖ ≤ 2 * L * d / 2 ^ j := by + calc ‖x - T.Psi y₀‖ ≤ L * (2 * d / 2 ^ j) := + h1.trans (mul_le_mul_of_nonneg_left h2 L.coe_nonneg) + _ = 2 * L * d / 2 ^ j := by ring + exact absurd hx (not_lt.2 h3) + +/-- **Smooth atoms stay smooth atoms** under a smooth change of variables with a cut-off: there are +`L` and `A'` such that for every smooth atom `a` on `V` of order `K`, level `j`, radius factor `d` +and constant `A`, and every `y₀ ∈ K₀` within `d 2^(-j)` of its centre, `T a` is a smooth atom on +`Ω` of order `K` with centre `Ψ y₀`, radius factor `2 L d` and constant `A' A`. -/ +theorem isSmoothAtom_apply (hΩ : Convex ℝ Ω) (hΩm : MeasurableSet Ω) + (hint : (interior Ω).Nonempty) (K : ℕ) : + ∃ L A' : ℝ, 0 ≤ L ∧ 0 ≤ A' ∧ ∀ {d A : ℝ} {j : ℕ} {c : V} {a : V → ℂ}, 0 ≤ A → + IsSmoothAtom Set.univ K d A j c a → ∀ y₀ ∈ T.K0, ‖y₀ - c‖ ≤ d / 2 ^ j → + IsSmoothAtom Ω K (2 * L * d) (A' * A) j (T.Psi y₀) (T.apply a) := by + obtain ⟨L, hL⟩ := T.exists_lipschitzOnWith_Psi hΩ + obtain ⟨M, hM0, hM⟩ := T.exists_iteratedFDerivWithin_chi_bound hΩ hint K + obtain ⟨D, hD1, hD⟩ := T.exists_iteratedFDerivWithin_Phi_bound hΩ hint K + refine ⟨L, K.factorial * 2 ^ K * M * D ^ K, L.coe_nonneg, by positivity, + fun {d A j c a} hA ha y₀ hy₀ hy₀c => ?_⟩ + set S := Ω ∩ T.U + have hs : UniqueDiffOn ℝ S := T.uniqueDiffOn_source hΩ hint + have ht := T.uniqueDiffOn_target hΩ hint + have hSm : MeasurableSet S := hΩm.inter T.isOpen_U.measurableSet + have hac : ContDiff ℝ K a := contDiffOn_univ.1 ha.contDiffOn + set g : V → ℂ := fun z => T.chi z * a z + have hg : ContDiffOn ℝ K g (Ω ∩ T.U') := + (T.contDiffOn_chi.of_le (by exact_mod_cast le_top)).mul hac.contDiffOn + have hgΦ : ContDiffOn ℝ K (g ∘ T.Phi) S := + hg.comp (T.contDiffOn_Phi.of_le (by exact_mod_cast le_top)) T.mapsTo_Phi + have hEq : ∀ x ∈ S, T.apply a x = (g ∘ T.Phi) x := fun x hx => by + rw [apply, Set.indicator_of_mem hx] + rfl + have hzero : ∀ x ∈ Ω ∩ T.carrierᶜ, T.apply a x = 0 := fun x hx => + T.apply_eq_zero_of_notMem a hx.2 + have hopen : IsOpen T.carrierᶜ := T.isCompact_carrier.isClosed.isOpen_compl + refine ⟨?_, fun x hx => T.apply_eq_zero_of_far hL ha.eq_zero hy₀ hy₀c hx, ?_, ?_⟩ + · -- measurability + refine (aestronglyMeasurable_indicator_iff hSm).2 ?_ + exact (hgΦ.continuousOn).aestronglyMeasurable hSm + · -- smoothness within `Ω` + intro x hx + by_cases hxc : x ∈ T.carrier + · have hxS : x ∈ S := T.carrier_subset hxc + refine (contDiffWithinAt_inter (T.isOpen_U.mem_nhds hxS.2)).1 ?_ + exact (hgΦ x hxS).congr hEq (hEq x hxS) + · have hev : T.apply a =ᶠ[𝓝[Ω] x] fun _ => 0 := + mem_nhdsWithin.2 ⟨T.carrierᶜ, hopen, hxc, fun y hy => hzero y ⟨hy.2, hy.1⟩⟩ + exact contDiffWithinAt_const.congr_of_eventuallyEq hev (hzero x ⟨hx, hxc⟩) + · -- the derivatives + intro l hl x hx + by_cases hxc : x ∈ T.carrier + · have hxS : x ∈ S := T.carrier_subset hxc + rw [← iteratedFDerivWithin_inter_open T.isOpen_U hxS.2, + iteratedFDerivWithin_congr hEq hxS] + have hC : ∀ i ≤ l, ‖iteratedFDerivWithin ℝ i g (Ω ∩ T.U') (T.Phi x)‖ ≤ + 2 ^ l * M * A * 2 ^ (j * l) := fun i hi => by + refine (T.norm_iteratedFDerivWithin_mul_atom_le hΩ hint hM hA ha (hi.trans hl) + (T.mapsTo_Phi hxS)).trans ?_ + have h2 : (2 : ℝ) ^ i ≤ 2 ^ l := pow_le_pow_right₀ one_le_two hi + have h3 : (2 : ℝ) ^ (j * i) ≤ 2 ^ (j * l) := + pow_le_pow_right₀ one_le_two (Nat.mul_le_mul_left j hi) + have := mul_le_mul (mul_le_mul_of_nonneg_right (mul_le_mul_of_nonneg_right h2 hM0) hA) h3 + (by positivity) (by positivity) + simpa [mul_assoc] using this + have hDi : ∀ i, 1 ≤ i → i ≤ l → ‖iteratedFDerivWithin ℝ i T.Phi S x‖ ≤ D ^ i := + fun i hi1 hil => (hD i (hil.trans hl) x hxc).trans (le_self_pow₀ hD1 (by omega)) + refine (norm_iteratedFDerivWithin_comp_le (N := (l : WithTop ℕ∞)) + (hg.of_le (by exact_mod_cast hl)) (T.contDiffOn_Phi.of_le (by exact_mod_cast le_top)) + le_rfl ht hs T.mapsTo_Phi hxS hC hDi).trans ?_ + have hfac : (l.factorial : ℝ) ≤ K.factorial := by exact_mod_cast Nat.factorial_le hl + have h2 : (2 : ℝ) ^ l ≤ 2 ^ K := pow_le_pow_right₀ one_le_two hl + have hDl : D ^ l ≤ D ^ K := pow_le_pow_right₀ hD1 hl + calc (l.factorial : ℝ) * (2 ^ l * M * A * 2 ^ (j * l)) * D ^ l + = ((l.factorial : ℝ) * 2 ^ l * M * D ^ l) * A * 2 ^ (j * l) := by ring + _ ≤ ((K.factorial : ℝ) * 2 ^ K * M * D ^ K) * A * 2 ^ (j * l) := by gcongr + _ = K.factorial * 2 ^ K * M * D ^ K * A * 2 ^ (j * l) := by ring + · rw [iteratedFDerivWithin_eq_zero_of_eqOn hopen hxc hx (fun y hy => hzero y hy) l, norm_zero] + positivity + +end CutoffDiffeo + +end Atoms + +end Rd diff --git a/LeanPool/FunctionSpaces/Rd/Atoms/AtomSynthesis.lean b/LeanPool/FunctionSpaces/Rd/Atoms/AtomSynthesis.lean new file mode 100644 index 0000000000..47a6798c4a --- /dev/null +++ b/LeanPool/FunctionSpaces/Rd/Atoms/AtomSynthesis.lean @@ -0,0 +1,661 @@ +/- +Copyright (c) 2026 Mario Ullrich. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Mario Ullrich +-/ +module + +public import LeanPool.FunctionSpaces.Analysis.Maximal.HardyLittlewoodMaximal +public import LeanPool.FunctionSpaces.Rd.LocalMeans.LocalMeans +public import LeanPool.FunctionSpaces.Rd.Differences.PointwiseMultipliers +public import LeanPool.FunctionSpaces.Analysis.Differences.DomainModuli + +/- +Modified for Lean Pool: module names and imports adapted. +-/ + +/-! +# Atomic synthesis + +Atomic decompositions in the sense of Schneider–Vybíral, for `1 ≤ p < ∞`. A **regular atom** of +level `j ∈ ℕ`, exponent `σ > 0` and order `r` with centre `c` (`Rd.IsRegularAtom`) vanishes +outside the ball `B(c, d 2^(-j))` and satisfies, with a constant `C`, + +`‖a‖_p ≤ C 2^(-jn/p)`, `‖Δ_h^r a‖_p ≤ C 2^(-jn/p) min(1, (2^j ‖h‖)^σ)`, + +`n = dim V`. Lip atoms (Schneider–Vybíral, Definition 2.1: `|a| ≤ 1`, `|a(x) - a(y)| ≤ 2^j |x - y|`) +are regular with `σ = r = 1`, smooth `K`-atoms (`|D^α a| ≤ 2^(j|α|)`, Definition 1.3) with +`σ = r = K`; both follow from pointwise bounds (`Rd.isRegularAtom_of_pointwise`). + +**Synthesis** (`Rd.modNorm_le_coeffNorm`; Schneider–Vybíral, Theorem 2.6 and Corollary 2.8, +direction ⇐): if the centres of each level have bounded overlap and `F = ∑_j f_j` with the level +sums `f_j = ∑_m λ_{j,m} a_{j,m}`, then for `0 < s < σ` + +`‖F‖_p + ‖(2^(ks) ω_r(F, 2^(-k))_p)_k‖_{ℓ_q} ≤ K ‖λ‖_{b^s_{p,q}}`, +`‖λ‖_{b^s_{p,q}} = ‖(2^(j(s - n/p)) ‖λ_{j,·}‖_{ℓ_p})_j‖_{ℓ_q}` (`Rd.coeffNorm`). + +The proof: by bounded overlap (`Rd.eLpNorm_rpow_le_of_overlap`), +`‖f_j‖_p ≲ 2^(-jn/p) ‖λ_{j,·}‖_{ℓ_p}` and +`ω_r(f_j, 2^(-k))_p ≲ 2^(-jn/p) ‖λ_{j,·}‖_{ℓ_p} min(1, 2^(-(k-j)σ))` +(`Rd.eLpNorm_levelSum_le`, `Rd.modulus_levelSum_le`); the almost diagonal lemma with exponent `σ` +sums the levels. Smooth functions with `‖D^l a‖ ≤ A 2^(jl)` for `l ≤ r` satisfy the pointwise +bounds with `σ = r` (`Rd.enorm_higherDiff_le_of_iteratedFDeriv`). + +**Atoms on a set.** A regular atom on a measurable set `Ω` (`Rd.IsRegularAtomOn`) satisfies the +bounds with `‖1_Ω a‖_p` and with the differences restricted to the step sets `Ω_{rh}`; regular +atoms are the regular atoms on `V`. The synthesis on `Ω` (`Rd.modNormOn_le_coeffNorm`) bounds +`‖1_Ω F‖_p + ‖(2^(ks) ω_r(F, 2^(-k), Ω)_p)_k‖_{ℓ_q}` in the same way, with the same proof. +-/ + +@[expose] public section + +open MeasureTheory Filter Topology Module Metric +open scoped ENNReal + +open ENNReal (lqNorm dyadicWeight) + +namespace Rd + +/-! ### Regular atoms -/ + +variable {V : Type*} [NormedAddCommGroup V] [InnerProductSpace ℝ V] [FiniteDimensional ℝ V] + [MeasurableSpace V] [BorelSpace V] + +/-- A **regular atom on `Ω`** of level `j`, exponent `σ` and order `r` with centre `c`, radius +factor `d` and constant `C`: `a = 0` outside `B(c, d 2^(-j))`, `‖a‖_{L_p(Ω)} ≤ C 2^(-jn/p)` and +`‖Δ_h^r a‖_{L_p(Ω_{rh})} ≤ C 2^(-jn/p) min(1, (2^j ‖h‖)^σ)`, where `Ω_{rh}` are the points whose +steps `x + l h`, `l ≤ r`, stay in `Ω` (`Rd.stepSet`). Only the values of `a` on `Ω` enter. -/ +structure IsRegularAtomOn (Ω : Set V) (p : ℝ≥0∞) (σ : ℝ) (r : ℕ) (d : ℝ) (C : ℝ≥0∞) (j : ℕ) + (c : V) (a : V → ℂ) : Prop where + aestronglyMeasurable : AEStronglyMeasurable a volume + eq_zero : ∀ x, d / 2 ^ j < ‖x - c‖ → a x = 0 + eLpNorm_le : eLpNorm (Ω.indicator a) p volume ≤ C * dyadicWeight (-(finrank ℝ V / p.toReal)) j + eLpNorm_higherDiff_le : ∀ h : V, eLpNorm ((stepSet Ω r h).indicator ((fwdDiff h)^[r] a)) p + volume ≤ + C * dyadicWeight (-(finrank ℝ V / p.toReal)) j * min 1 (ENNReal.ofReal (2 ^ j * ‖h‖) ^ σ) + +/-- A **regular atom** of level `j`, exponent `σ` and order `r` with centre `c`, radius factor `d` +and constant `C`: a regular atom on `V`, that is, `a = 0` outside `B(c, d 2^(-j))`, +`‖a‖_p ≤ C 2^(-jn/p)` and `‖Δ_h^r a‖_p ≤ C 2^(-jn/p) min(1, (2^j ‖h‖)^σ)`. -/ +abbrev IsRegularAtom (p : ℝ≥0∞) (σ : ℝ) (r : ℕ) (d : ℝ) (C : ℝ≥0∞) (j : ℕ) (c : V) + (a : V → ℂ) : Prop := + IsRegularAtomOn (Set.univ : Set V) p σ r d C j c a + +/-- The `ℓ_p`-norm `‖λ_{j,·}‖_{ℓ_p}` of the coefficients of one level. -/ +noncomputable def levelNorm (p : ℝ≥0∞) {ι : Type*} [MeasurableSpace ι] (coef : ι → ℂ) : ℝ≥0∞ := + lqNorm p fun m => ‖coef m‖ₑ + +/-- For `0 < p < ∞`, `‖λ_{j,·}‖_{ℓ_p} = (∑_m |λ_{j,m}|^p)^(1/p)`. -/ +theorem levelNorm_eq_tsum {p : ℝ≥0∞} (hp0 : p ≠ 0) (hp : p ≠ ∞) {ι : Type*} [MeasurableSpace ι] + [Countable ι] [MeasurableSingletonClass ι] (coef : ι → ℂ) : + levelNorm p coef = (∑' m, ‖coef m‖ₑ ^ p.toReal) ^ (1 / p.toReal) := + ENNReal.lqNorm_eq_tsum hp0 hp _ + +/-- The `ℓ_p`-norm of the coefficients is monotone in their moduli. -/ +theorem levelNorm_mono (p : ℝ≥0∞) {ι : Type*} [MeasurableSpace ι] [Countable ι] + [MeasurableSingletonClass ι] {coef coef' : ι → ℂ} (h : ∀ m, ‖coef m‖ₑ ≤ ‖coef' m‖ₑ) : + levelNorm p coef ≤ levelNorm p coef' := + ENNReal.lqNorm_mono h + +/-- The **coefficient quasi-norm** `‖λ‖_{b^s_{p,q}} = ‖(2^(j(s - n/p)) ‖λ_{j,·}‖_{ℓ_p})_j‖_{ℓ_q}`. +-/ +noncomputable def coeffNorm (p : ℝ≥0∞) (n : ℕ) (s : ℝ) (q : ℝ≥0∞) {ι : Type*} [MeasurableSpace ι] + (coef : ℕ → ι → ℂ) : ℝ≥0∞ := + lqNorm q (fun j => dyadicWeight (s - n / p.toReal) j * levelNorm p (coef j)) + +/-! ### Level sums -/ + +omit [InnerProductSpace ℝ V] [FiniteDimensional ℝ V] [MeasurableSpace V] [BorelSpace V] in +/-- Differences of a pointwise convergent sum are the sums of the differences, if the sums +converge at all the points of the difference. -/ +theorem higherDiff_tsum_apply [NormedSpace ℝ V] {ι : Type*} (g : ι → V → ℂ) + (hg : ∀ y, Summable fun m => g m y) (r : ℕ) (h x : V) : + (fwdDiff h)^[r] (fun y => ∑' m, g m y) x = ∑' m, (fwdDiff h)^[r] (g m) x := by + simp_rw [higherDiff_apply] + rw [Summable.tsum_finsetSum fun l _ => (hg _).mul_left _] + exact Finset.sum_congr rfl fun l _ => (tsum_mul_left).symm + +/-- From `X^p ≤ N^(p-1) ∑ (b_m |λ_m|)^p` with `b_m ≤ B` to `X ≤ N^(1-1/p) B ‖λ‖_{ℓ_p}`. -/ +theorem le_of_rpow_le_overlap {p : ℝ≥0∞} (hp1 : 1 ≤ p) (hp : p ≠ ∞) {ι : Type*} [MeasurableSpace ι] + [Countable ι] [MeasurableSingletonClass ι] {X B : ℝ≥0∞} + {N : ℕ} {b : ι → ℝ≥0∞} (hb : ∀ m, b m ≤ B) (coef : ι → ℂ) + (hX : X ^ p.toReal ≤ (N : ℝ≥0∞) ^ (p.toReal - 1) * ∑' m, (‖coef m‖ₑ * b m) ^ p.toReal) : + X ≤ (N : ℝ≥0∞) ^ (1 - 1 / p.toReal) * B * levelNorm p coef := by + have hp0 : p ≠ 0 := (zero_lt_one.trans_le hp1).ne' + have hpos : 0 < p.toReal := ENNReal.toReal_pos hp0 hp + rw [← ENNReal.rpow_le_rpow_iff hpos] + refine hX.trans ?_ + rw [levelNorm_eq_tsum hp0 hp, ENNReal.mul_rpow_of_nonneg _ _ hpos.le, + ENNReal.mul_rpow_of_nonneg _ _ hpos.le, + ← ENNReal.rpow_mul, ← ENNReal.rpow_mul, show (1 - 1 / p.toReal) * p.toReal = p.toReal - 1 by + field_simp, show 1 / p.toReal * p.toReal = 1 by field_simp, ENNReal.rpow_one, mul_assoc] + refine mul_le_mul' le_rfl ?_ + rw [← ENNReal.tsum_mul_left] + refine tsum_le_tsum fun m => ?_ + rw [ENNReal.mul_rpow_of_nonneg _ _ hpos.le, mul_comm] + exact mul_le_mul' (ENNReal.rpow_le_rpow (hb m) hpos.le) le_rfl + +/-- The pointwise sums of a level converge: at most `N` atoms of the level with nonzero +coefficients are nonzero at a point. -/ +theorem summable_levelSum {ι : Type*} {Ω : Set V} {p : ℝ≥0∞} {σ : ℝ} {r : ℕ} {d : ℝ} + {C : ℝ≥0∞} {j N : ℕ} (c : ι → V) (a : ι → V → ℂ) (coef : ι → ℂ) + (hN : ∀ x (S : Finset ι), (∀ m ∈ S, coef m ≠ 0 ∧ ‖x - c m‖ ≤ (d + r) / 2 ^ j) → S.card ≤ N) + (ha : ∀ m, IsRegularAtomOn Ω p σ r d C j (c m) (a m)) (y : V) : + Summable fun m => coef m * a m y := by + have hd : ∀ m, coef m * a m y ≠ 0 → coef m ≠ 0 ∧ ‖y - c m‖ ≤ (d + r) / 2 ^ j := fun m hm => by + have ha' : a m y ≠ 0 := right_ne_zero_of_mul hm + have h1 : ‖y - c m‖ ≤ d / 2 ^ j := not_lt.1 fun h => ha' ((ha m).eq_zero y h) + exact ⟨left_ne_zero_of_mul hm, h1.trans (div_le_div_of_nonneg_right + (by linarith [(Nat.cast_nonneg r : (0 : ℝ) ≤ r)]) (by positivity))⟩ + obtain ⟨T, hT, -⟩ := exists_finset_of_card_le (P := fun m => coef m * a m y ≠ 0) + fun S hS => hN y S fun m hm => hd m (hS m hm) + exact summable_of_ne_finset_zero fun m hm => by_contra fun h => hm (hT m h) + +/-- **The level sums in `L_p(Ω)`**: `‖∑_m λ_m a_m‖_{L_p(Ω)} ≤ N^(1-1/p) C 2^(-jn/p) ‖λ‖_{ℓ_p}` for +regular atoms on `Ω`. -/ +theorem eLpNorm_indicator_levelSum_le {p : ℝ≥0∞} (hp1 : 1 ≤ p) (hp : p ≠ ∞) {Ω : Set V} + (hΩ : MeasurableSet Ω) {ι : Type*} [Countable ι] [MeasurableSpace ι] + [MeasurableSingletonClass ι] {σ : ℝ} {r : ℕ} {d : ℝ} {C : ℝ≥0∞} {j N : ℕ} (c : ι → V) + (a : ι → V → ℂ) (coef : ι → ℂ) + (hN : ∀ x (S : Finset ι), (∀ m ∈ S, coef m ≠ 0 ∧ ‖x - c m‖ ≤ (d + r) / 2 ^ j) → S.card ≤ N) + (ha : ∀ m, IsRegularAtomOn Ω p σ r d C j (c m) (a m)) {F : V → ℂ} + (hF : AEStronglyMeasurable F volume) (hFa : ∀ᵐ x ∂volume, F x = ∑' m, coef m * a m x) : + eLpNorm (Ω.indicator F) p volume ≤ (N : ℝ≥0∞) ^ (1 - 1 / p.toReal) * + (C * dyadicWeight (-(finrank ℝ V / p.toReal)) j) * levelNorm p coef := by + have hg : ∀ m, AEStronglyMeasurable (fun x => coef m * Ω.indicator (a m) x) volume := fun m => + aestronglyMeasurable_const.mul ((ha m).aestronglyMeasurable.indicator hΩ) + have hover : ∀ x (S : Finset ι), (∀ m ∈ S, coef m * Ω.indicator (a m) x ≠ 0) → S.card ≤ N := + fun x S hS => hN x S fun m hm => by + have hne := hS m hm + have ha' : a m x ≠ 0 := fun h0 => + right_ne_zero_of_mul hne (Set.indicator_apply_eq_zero.2 fun _ => h0) + have h1 : ‖x - c m‖ ≤ d / 2 ^ j := not_lt.1 fun h => ha' ((ha m).eq_zero x h) + exact ⟨left_ne_zero_of_mul hne, h1.trans (div_le_div_of_nonneg_right + (by linarith [(Nat.cast_nonneg r : (0 : ℝ) ≤ r)]) (by positivity))⟩ + have hFa' : ∀ᵐ x ∂volume, Ω.indicator F x = ∑' m, coef m * Ω.indicator (a m) x := by + filter_upwards [hFa] with x hx + by_cases hxΩ : x ∈ Ω + · simp only [Set.indicator_of_mem hxΩ] + exact hx + · simp [Set.indicator_of_notMem hxΩ] + have h := eLpNorm_rpow_le_of_overlap hp1 hp hg hover (hF.indicator hΩ) hFa' + refine le_of_rpow_le_overlap hp1 hp (fun m => (ha m).eLpNorm_le) coef (h.trans_eq ?_) + congr 2 + funext m + rw [show (fun x => coef m * Ω.indicator (a m) x) = coef m • Ω.indicator (a m) from rfl, + eLpNorm_const_smul] + +/-- **The level sums in `L_p`**: `‖∑_m λ_m a_m‖_p ≤ N^(1-1/p) C 2^(-jn/p) ‖λ‖_{ℓ_p}`, the case +`Ω = V` of `Rd.eLpNorm_indicator_levelSum_le`. -/ +theorem eLpNorm_levelSum_le {p : ℝ≥0∞} (hp1 : 1 ≤ p) (hp : p ≠ ∞) {ι : Type*} [Countable ι] + [MeasurableSpace ι] [MeasurableSingletonClass ι] + {σ : ℝ} {r : ℕ} {d : ℝ} {C : ℝ≥0∞} {j N : ℕ} (c : ι → V) (a : ι → V → ℂ) (coef : ι → ℂ) + (hN : ∀ x (S : Finset ι), (∀ m ∈ S, coef m ≠ 0 ∧ ‖x - c m‖ ≤ (d + r) / 2 ^ j) → S.card ≤ N) + (ha : ∀ m, IsRegularAtom p σ r d C j (c m) (a m)) {F : V → ℂ} (hF : AEStronglyMeasurable F + volume) + (hFa : ∀ᵐ x ∂volume, F x = ∑' m, coef m * a m x) : + eLpNorm F p volume ≤ (N : ℝ≥0∞) ^ (1 - 1 / p.toReal) * + (C * dyadicWeight (-(finrank ℝ V / p.toReal)) j) * levelNorm p coef := by + simpa using eLpNorm_indicator_levelSum_le hp1 hp MeasurableSet.univ c a coef hN ha hF hFa + +omit [FiniteDimensional ℝ V] [MeasurableSpace V] [BorelSpace V] in +/-- **Bounded overlap of the differences of atoms**: if the atoms `a_m` vanish outside the balls +`B(c_m, d 2^(-j))` and at most `N` centres with `λ_m ≠ 0` lie in a ball of radius +`(d + r) 2^(-j)`, then for `‖h‖ ≤ 2^(-j)` at most `N` of the functions `λ_m Δ_h^r a_m` are nonzero +at any point, since `Δ_h^r a_m(x) ≠ 0` needs some `x + l h`, `l ≤ r`, in the ball of `a_m`. -/ +theorem card_le_of_higherDiff_ne_zero {ι : Type*} {r : ℕ} {d : ℝ} {j N : ℕ} (c : ι → V) + (a : ι → V → ℂ) (coef : ι → ℂ) + (hN : ∀ x (S : Finset ι), (∀ m ∈ S, coef m ≠ 0 ∧ ‖x - c m‖ ≤ (d + r) / 2 ^ j) → S.card ≤ N) + (ha : ∀ m x, d / 2 ^ j < ‖x - c m‖ → a m x = 0) {h : V} (hhk : ‖h‖ ≤ 1 / 2 ^ j) (x : V) + (S : Finset ι) (hS : ∀ m ∈ S, coef m * (fwdDiff h)^[r] (a m) x ≠ 0) : S.card ≤ N := by + refine hN x S fun m hm => ?_ + have hne : (fwdDiff h)^[r] (a m) x ≠ 0 := right_ne_zero_of_mul (hS m hm) + rw [higherDiff_apply] at hne + obtain ⟨l, hl, hl0⟩ : ∃ l ∈ Finset.range (r + 1), a m (x + (l : ℝ) • h) ≠ 0 := by + by_contra hcon + push Not at hcon + exact hne (Finset.sum_eq_zero fun l hl => by rw [hcon l hl, mul_zero]) + have h1 : ‖x + (l : ℝ) • h - c m‖ ≤ d / 2 ^ j := not_lt.1 fun h' => hl0 (ha m _ h') + have hl' : (l : ℝ) ≤ r := by exact_mod_cast Nat.lt_succ_iff.1 (Finset.mem_range.1 hl) + have h2 : ‖(l : ℝ) • h‖ ≤ r / 2 ^ j := by + rw [norm_smul, Real.norm_of_nonneg (Nat.cast_nonneg l)] + calc (l : ℝ) * ‖h‖ ≤ r * (1 / 2 ^ j) := + mul_le_mul hl' hhk (norm_nonneg h) (Nat.cast_nonneg r) + _ = r / 2 ^ j := by ring + refine ⟨left_ne_zero_of_mul (hS m hm), ?_⟩ + calc ‖x - c m‖ = ‖(x + (l : ℝ) • h - c m) - (l : ℝ) • h‖ := by congr 1; abel + _ ≤ ‖x + (l : ℝ) • h - c m‖ + ‖(l : ℝ) • h‖ := norm_sub_le _ _ + _ ≤ d / 2 ^ j + r / 2 ^ j := add_le_add h1 h2 + _ = (d + r) / 2 ^ j := by ring + +/-- **Moduli of the level sums on `Ω`**: `ω_r(∑_m λ_m a_m, 2^(-k), Ω)_p ≤ +2^r N^(1-1/p) C 2^(-jn/p) ‖λ‖_{ℓ_p} c_{kj}` with `c_{kj} = 2^(-(k-j)σ)` for `j ≤ k` and `1` +otherwise, for regular atoms on `Ω`. -/ +theorem modulusOn_levelSum_le {p : ℝ≥0∞} (hp1 : 1 ≤ p) (hp : p ≠ ∞) {Ω : Set V} + (hΩ : MeasurableSet Ω) {ι : Type*} [Countable ι] [MeasurableSpace ι] + [MeasurableSingletonClass ι] {σ : ℝ} (hσ : 0 ≤ σ) {r : ℕ} {d : ℝ} {C : ℝ≥0∞} {j N : ℕ} + (c : ι → V) (a : ι → V → ℂ) (coef : ι → ℂ) + (hN : ∀ x (S : Finset ι), (∀ m ∈ S, coef m ≠ 0 ∧ ‖x - c m‖ ≤ (d + r) / 2 ^ j) → S.card ≤ N) + (ha : ∀ m, IsRegularAtomOn Ω p σ r d C j (c m) (a m)) {F : V → ℂ} + (hF : AEStronglyMeasurable F volume) (hFa : ∀ᵐ x ∂volume, F x = ∑' m, coef m * a m x) + (k : ℕ) : + modulusOn volume Ω r p F (1 / 2 ^ k) ≤ 2 ^ r * ((N : ℝ≥0∞) ^ (1 - 1 / p.toReal) * + (C * dyadicWeight (-(finrank ℝ V / p.toReal)) j) * levelNorm p coef) * + (if j ≤ k then dyadicWeight (-σ) (k - j) else 1) := by + set B := (N : ℝ≥0∞) ^ (1 - 1 / p.toReal) * (C * dyadicWeight (-(finrank ℝ V / p.toReal)) j) * + levelNorm p coef + split_ifs with hjk + · refine iSup₂_le fun h hh => ?_ + set T := stepSet Ω r h + have hT : MeasurableSet T := measurableSet_stepSet hΩ r h + have hsum : ∀ y, Summable fun m => coef m * a m y := summable_levelSum c a coef hN ha + have hae : T.indicator ((fwdDiff h)^[r] F) =ᵐ[volume] + fun x => ∑' m, coef m * T.indicator ((fwdDiff h)^[r] (a m)) x := by + filter_upwards [higherDiff_congr_ae hFa r h] with x hx + by_cases hxT : x ∈ T + · simp only [Set.indicator_of_mem hxT] + rw [hx, higherDiff_tsum_apply _ hsum] + refine tsum_congr fun m => ?_ + rw [show (fun y => coef m * a m y) = coef m • a m from rfl, fwdDiff_iter_const_smul] + rfl + · simp [Set.indicator_of_notMem hxT] + have hg : ∀ m, AEStronglyMeasurable + (fun x => coef m * T.indicator ((fwdDiff h)^[r] (a m)) x) volume := fun m => + aestronglyMeasurable_const.mul + ((aestronglyMeasurable_higherDiff (ha m).aestronglyMeasurable r h).indicator hT) + have hhk : ‖h‖ ≤ 1 / 2 ^ j := hh.trans (one_div_le_one_div_of_le (by positivity) + (pow_le_pow_right₀ one_le_two hjk)) + have hover : ∀ x (S : Finset ι), (∀ m ∈ S, coef m * T.indicator ((fwdDiff h)^[r] (a m)) x ≠ 0) → + S.card ≤ N := fun x S hS => + card_le_of_higherDiff_ne_zero c a coef hN (fun m => (ha m).eq_zero) hhk x S fun m hm => by + have h1 := hS m hm + by_cases hxT : x ∈ T + · rwa [Set.indicator_of_mem hxT] at h1 + · rw [Set.indicator_of_notMem hxT, mul_zero] at h1 + exact absurd rfl h1 + have hbound := eLpNorm_rpow_le_of_overlap hp1 hp hg hover + ((aestronglyMeasurable_higherDiff hF r h).indicator hT) hae + have hmin : min 1 (ENNReal.ofReal (2 ^ j * ‖h‖) ^ σ) ≤ dyadicWeight (-σ) (k - j) := + (min_le_right _ _).trans (ENNReal.ofReal_two_pow_mul_rpow_le hjk hh hσ) + calc eLpNorm (T.indicator ((fwdDiff h)^[r] F)) p volume + ≤ (N : ℝ≥0∞) ^ (1 - 1 / p.toReal) * (C * dyadicWeight (-(finrank ℝ V / p.toReal)) j * + dyadicWeight (-σ) (k - j)) * levelNorm p coef := + le_of_rpow_le_overlap hp1 hp (fun m => ((ha m).eLpNorm_higherDiff_le h).trans + (mul_le_mul' le_rfl hmin)) coef (hbound.trans_eq (by + congr 2 + funext m + rw [show (fun x => coef m * T.indicator ((fwdDiff h)^[r] (a m)) x) = + coef m • T.indicator ((fwdDiff h)^[r] (a m)) from rfl, eLpNorm_const_smul])) + _ ≤ 2 ^ r * B * dyadicWeight (-σ) (k - j) := by + calc (N : ℝ≥0∞) ^ (1 - 1 / p.toReal) * (C * dyadicWeight (-(finrank ℝ V / p.toReal)) j * + dyadicWeight (-σ) (k - j)) * levelNorm p coef + = 1 * B * dyadicWeight (-σ) (k - j) := by + simp only [B] + ring + _ ≤ 2 ^ r * B * dyadicWeight (-σ) (k - j) := by + gcongr + exact one_le_pow₀ one_le_two + · rw [mul_one] + exact (modulusOn_le hF hΩ hp1 r _).trans (mul_le_mul' le_rfl + (eLpNorm_indicator_levelSum_le hp1 hp hΩ c a coef hN ha hF hFa)) + +/-- **Moduli of the level sums**: `ω_r(∑_m λ_m a_m, 2^(-k))_p ≤ +2^r N^(1-1/p) C 2^(-jn/p) ‖λ‖_{ℓ_p} c_{kj}` with `c_{kj} = 2^(-(k-j)σ)` for `j ≤ k` and `1` +otherwise, the case `Ω = V` of `Rd.modulusOn_levelSum_le`. -/ +theorem modulus_levelSum_le {p : ℝ≥0∞} (hp1 : 1 ≤ p) (hp : p ≠ ∞) {ι : Type*} [Countable ι] + [MeasurableSpace ι] [MeasurableSingletonClass ι] + {σ : ℝ} (hσ : 0 ≤ σ) {r : ℕ} {d : ℝ} {C : ℝ≥0∞} {j N : ℕ} (c : ι → V) (a : ι → V → ℂ) + (coef : ι → ℂ) + (hN : ∀ x (S : Finset ι), (∀ m ∈ S, coef m ≠ 0 ∧ ‖x - c m‖ ≤ (d + r) / 2 ^ j) → S.card ≤ N) + (ha : ∀ m, IsRegularAtom p σ r d C j (c m) (a m)) {F : V → ℂ} (hF : AEStronglyMeasurable F + volume) + (hFa : ∀ᵐ x ∂volume, F x = ∑' m, coef m * a m x) (k : ℕ) : + modulus volume r p F (1 / 2 ^ k) ≤ 2 ^ r * ((N : ℝ≥0∞) ^ (1 - 1 / p.toReal) * + (C * dyadicWeight (-(finrank ℝ V / p.toReal)) j) * levelNorm p coef) * + (if j ≤ k then dyadicWeight (-σ) (k - j) else 1) := by + rw [← modulusOn_univ] + exact modulusOn_levelSum_le hp1 hp MeasurableSet.univ hσ c a coef hN ha hF hFa k + +/-! ### The synthesis theorem -/ + +/-- The constant `N^(1-1/p) C ((1 - 2^(-s))⁻¹ + 2^r ((1 - 2^(-(σ-s)))⁻¹ + (1 - 2^(-s))⁻¹))` of the +atomic synthesis. -/ +noncomputable def atomSynthConst (p : ℝ≥0∞) (N : ℕ) (C : ℝ≥0∞) (r : ℕ) (s σ : ℝ) : ℝ≥0∞ := + (N : ℝ≥0∞) ^ (1 - 1 / p.toReal) * C * ((1 - (2 : ℝ≥0∞) ^ (-s))⁻¹ + + 2 ^ r * ((1 - (2 : ℝ≥0∞) ^ (-(σ - s)))⁻¹ + (1 - (2 : ℝ≥0∞) ^ (-s))⁻¹)) + +/-- The constant of the atomic synthesis is finite for `C < ∞` and `0 < s < σ`. -/ +theorem atomSynthConst_ne_top {p : ℝ≥0∞} (hp1 : 1 ≤ p) (N : ℕ) {C : ℝ≥0∞} + (hC : C ≠ ∞) (r : ℕ) {s σ : ℝ} (hs : 0 < s) (hsσ : s < σ) : + atomSynthConst p N C r s σ ≠ ∞ := by + have hexp : 0 ≤ 1 - 1 / p.toReal := one_sub_one_div_toReal_nonneg hp1 + refine ENNReal.mul_ne_top (ENNReal.mul_ne_top + (ENNReal.rpow_ne_top_of_nonneg hexp (ENNReal.natCast_ne_top N)) hC) + (ENNReal.add_ne_top.2 ⟨ENNReal.one_sub_two_rpow_neg_inv_ne_top hs, + ENNReal.mul_ne_top (by simp) (ENNReal.add_ne_top.2 + ⟨ENNReal.one_sub_two_rpow_neg_inv_ne_top (by linarith), + ENNReal.one_sub_two_rpow_neg_inv_ne_top hs⟩)⟩) + +/-- **The norm on `Ω` of a series**: if `∑_{j ≤ J} f_j → F` in `L_p`, then +`‖F‖_{L_p(Ω)} ≤ ∑_j ‖f_j‖_{L_p(Ω)}`. -/ +theorem eLpNorm_indicator_le_tsum {p : ℝ≥0∞} [Fact (1 ≤ p)] {Ω : Set V} (hΩ : MeasurableSet Ω) + {f : ℕ → Lp ℂ p (volume : Measure V)} {F : Lp ℂ p (volume : Measure V)} + (hF : Tendsto (fun J => ∑ j ∈ Finset.range (J + 1), f j) atTop (𝓝 F)) : + eLpNorm (Ω.indicator F) p volume ≤ ∑' j, eLpNorm (Ω.indicator (f j)) p volume := + ENNReal.le_tsum_of_tendsto_sum + (Q := fun G : Lp ℂ p (volume : Measure V) => eLpNorm (Ω.indicator G) p volume) (C := 1) + ENNReal.one_ne_top (fun x y => by + have hxy : Ω.indicator ⇑(x + y) =ᵐ[volume] Ω.indicator ⇑x + Ω.indicator ⇑y := by + filter_upwards [Lp.coeFn_add x y] with z hz + by_cases hzΩ : z ∈ Ω + · rw [Pi.add_apply, Set.indicator_of_mem hzΩ, Set.indicator_of_mem hzΩ, + Set.indicator_of_mem hzΩ, hz, Pi.add_apply] + · rw [Pi.add_apply, Set.indicator_of_notMem hzΩ, Set.indicator_of_notMem hzΩ, + Set.indicator_of_notMem hzΩ, add_zero] + rw [eLpNorm_congr_ae hxy] + exact eLpNorm_add_le Fact.out) + (fun x => by rw [one_mul, Lp.eNorm_def]; exact eLpNorm_indicator_le _ hΩ.nullMeasurableSet) hF + +/-- **The modulus on `Ω` of a series**: if `∑_{j ≤ J} f_j → F` in `L_p`, then +`ω_r(F, 2^(-k), Ω)_p ≤ ∑_j ω_r(f_j, 2^(-k), Ω)_p`. -/ +theorem lpModulusOn_le_tsum {p : ℝ≥0∞} [Fact (1 ≤ p)] {Ω : Set V} (hΩ : MeasurableSet Ω) + {f : ℕ → Lp ℂ p (volume : Measure V)} {F : Lp ℂ p (volume : Measure V)} + (hF : Tendsto (fun J => ∑ j ∈ Finset.range (J + 1), f j) atTop (𝓝 F)) (r k : ℕ) : + lpModulusOn p Ω r F k ≤ ∑' j, lpModulusOn p Ω r (f j) k := + ENNReal.le_tsum_of_tendsto_sum (C := 2 ^ r) (by simp) + (fun x y => lpModulusOn_add_le Ω r x y k) (fun x => lpModulusOn_le hΩ r x k) hF + +/-- **Atomic synthesis on `Ω`**: if the centres of the atoms with nonzero coefficients have overlap +at most `N` on balls of radius `(d + r) 2^(-j)` at every level `j`, `F = ∑_j f_j` in `L_p` with the +level sums `f_j = ∑_m λ_{j,m} a_{j,m}` of regular atoms on `Ω` of exponent `σ` and order `r`, and +`0 < s < σ`, then +`‖F‖_{L_p(Ω)} + ‖(2^(ks) ω_r(F, 2^(-k), Ω)_p)_k‖_{ℓ_q} ≤ K ‖λ‖_{b^s_{p,q}}`. -/ +theorem modNormOn_le_coeffNorm {p : ℝ≥0∞} [Fact (1 ≤ p)] (hp : p ≠ ∞) {Ω : Set V} + (hΩ : MeasurableSet Ω) {ι : Type*} [Countable ι] + [MeasurableSpace ι] [MeasurableSingletonClass ι] + {σ : ℝ} {r : ℕ} {d : ℝ} {C : ℝ≥0∞} {N : ℕ} (c : ℕ → ι → V) (a : ℕ → ι → V → ℂ) + (coef : ℕ → ι → ℂ) + (hN : ∀ j x (S : Finset ι), (∀ m ∈ S, coef j m ≠ 0 ∧ ‖x - c j m‖ ≤ (d + r) / 2 ^ j) → + S.card ≤ N) + (ha : ∀ j m, IsRegularAtomOn Ω p σ r d C j (c j m) (a j m)) + {f : ℕ → Lp ℂ p (volume : Measure V)} + (hf : ∀ j, ∀ᵐ x ∂volume, f j x = ∑' m, coef j m * a j m x) + {F : Lp ℂ p (volume : Measure V)} + (hF : Tendsto (fun J => ∑ j ∈ Finset.range (J + 1), f j) atTop (𝓝 F)) + {s : ℝ} (hs : 0 < s) (hsσ : s < σ) {q : ℝ≥0∞} (hq : 1 ≤ q) : + eLpNorm (Ω.indicator F) p volume + lqNorm q (fun k => dyadicWeight s k * lpModulusOn p Ω r F + k) ≤ + atomSynthConst p N C r s σ * coeffNorm p (finrank ℝ V) s q coef := by + have hp1 : 1 ≤ p := Fact.out + set K0 := (N : ℝ≥0∞) ^ (1 - 1 / p.toReal) * C + set b : ℕ → ℝ≥0∞ := fun j => dyadicWeight (-(finrank ℝ V / p.toReal)) j * levelNorm p (coef j) + set X := lqNorm q (fun j => dyadicWeight s j * b j) + have hX : coeffNorm p (finrank ℝ V) s q coef = X := by + simp only [coeffNorm, X, b] + congr 1 + funext j + rw [← mul_assoc, ← ENNReal.dyadicWeight_add, ← sub_eq_add_neg] + -- the level sums + have hlevel : ∀ j, eLpNorm (Ω.indicator (f j)) p volume ≤ K0 * b j := fun j => by + refine (eLpNorm_indicator_levelSum_le hp1 hp hΩ (c j) (a j) (coef j) (hN j) (ha j) + (Lp.aestronglyMeasurable (f j)) (hf j)).trans_eq ?_ + simp only [K0, b] + ring + have hlevelMod : ∀ j k, lpModulusOn p Ω r (f j) k ≤ + 2 ^ r * K0 * ((if j ≤ k then dyadicWeight (-σ) (k - j) else 1) * b j) := fun j k => by + rw [lpModulusOn] + refine (modulusOn_levelSum_le hp1 hp hΩ (hs.le.trans hsσ.le) (c j) (a j) (coef j) (hN j) + (ha j) (Lp.aestronglyMeasurable (f j)) (hf j) k).trans_eq ?_ + simp only [K0, b] + ring + -- the norm on `Ω` + have hnorm : eLpNorm (Ω.indicator F) p volume ≤ K0 * (1 - (2 : ℝ≥0∞) ^ (-s))⁻¹ * X := by + calc eLpNorm (Ω.indicator F) p volume ≤ ∑' j, K0 * b j := + (eLpNorm_indicator_le_tsum hΩ hF).trans (tsum_le_tsum hlevel) + _ = K0 * ∑' j, b j := ENNReal.tsum_mul_left + _ ≤ K0 * ((1 - (2 : ℝ≥0∞) ^ (-s))⁻¹ * X) := + mul_le_mul' le_rfl (ENNReal.tsum_le_lqNorm_dyadicWeight hq s b) + _ = _ := (mul_assoc _ _ _).symm + -- the moduli + have hmod : ∀ k, lpModulusOn p Ω r F k ≤ 2 ^ r * K0 * + ∑' j, (if j ≤ k then dyadicWeight (-σ) (k - j) else 1) * b j := fun k => by + refine (lpModulusOn_le_tsum hΩ hF r k).trans ?_ + rw [← ENNReal.tsum_mul_left] + exact tsum_le_tsum fun j => hlevelMod j k + have hlq : lqNorm q (fun k => dyadicWeight s k * lpModulusOn p Ω r F k) ≤ + 2 ^ r * K0 * ENNReal.almostDiagonalConst s σ * X := + ENNReal.lqNorm_le_almostDiagonalConst_mul_of_le hq s σ hmod + rw [hX] + calc eLpNorm (Ω.indicator F) p volume + + lqNorm q (fun k => dyadicWeight s k * lpModulusOn p Ω r F k) + ≤ K0 * (1 - (2 : ℝ≥0∞) ^ (-s))⁻¹ * X + + 2 ^ r * K0 * ENNReal.almostDiagonalConst s σ * X := + add_le_add hnorm hlq + _ = atomSynthConst p N C r s σ * X := by + simp only [atomSynthConst, K0, ENNReal.almostDiagonalConst] + ring + +/-- **Atomic synthesis** (Schneider–Vybíral, Theorem 2.6 and Corollary 2.8, direction ⇐): if the +centres of the atoms with nonzero coefficients have overlap at most `N` on balls of radius +`(d + r) 2^(-j)` at every level `j`, +`F = ∑_j f_j` in `L_p` with the level sums `f_j = ∑_m λ_{j,m} a_{j,m}` of regular atoms of +exponent `σ` and order `r`, and `0 < s < σ`, then +`‖F‖_p + ‖(2^(ks) ω_r(F, 2^(-k))_p)_k‖_{ℓ_q} ≤ K ‖λ‖_{b^s_{p,q}}`, the case `Ω = V` of +`Rd.modNormOn_le_coeffNorm`. -/ +theorem modNorm_le_coeffNorm {p : ℝ≥0∞} [Fact (1 ≤ p)] (hp : p ≠ ∞) {ι : Type*} [Countable ι] + [MeasurableSpace ι] [MeasurableSingletonClass ι] + {σ : ℝ} {r : ℕ} {d : ℝ} {C : ℝ≥0∞} {N : ℕ} (c : ℕ → ι → V) (a : ℕ → ι → V → ℂ) + (coef : ℕ → ι → ℂ) + (hN : ∀ j x (S : Finset ι), (∀ m ∈ S, coef j m ≠ 0 ∧ ‖x - c j m‖ ≤ (d + r) / 2 ^ j) → + S.card ≤ N) + (ha : ∀ j m, IsRegularAtom p σ r d C j (c j m) (a j m)) {f : ℕ → Lp ℂ p (volume : Measure V)} + (hf : ∀ j, ∀ᵐ x ∂volume, f j x = ∑' m, coef j m * a j m x) + {F : Lp ℂ p (volume : Measure V)} + (hF : Tendsto (fun J => ∑ j ∈ Finset.range (J + 1), f j) atTop (𝓝 F)) + {s : ℝ} (hs : 0 < s) (hsσ : s < σ) {q : ℝ≥0∞} (hq : 1 ≤ q) : + ‖F‖ₑ + lqNorm q (fun k => dyadicWeight s k * lpModulus p r F k) ≤ + atomSynthConst p N C r s σ * coeffNorm p (finrank ℝ V) s q coef := by + have h := modNormOn_le_coeffNorm hp MeasurableSet.univ c a coef hN ha hf hF hs hsσ hq + have e : ∀ k, lpModulusOn p Set.univ r F k = lpModulus p r F k := fun k => modulusOn_univ r p _ _ + simpa only [Set.indicator_univ, e, ← Lp.eNorm_def] using h + +/-- The zero function is a regular atom on every set at every level. -/ +theorem isRegularAtomOn_zero {Ω : Set V} {p : ℝ≥0∞} {σ : ℝ} {r : ℕ} {d : ℝ} {C : ℝ≥0∞} {j : ℕ} + {c : V} : IsRegularAtomOn Ω p σ r d C j c (0 : V → ℂ) where + aestronglyMeasurable := aestronglyMeasurable_const + eq_zero _ _ := rfl + eLpNorm_le := by simp + eLpNorm_higherDiff_le h := by + have h0 : (fwdDiff h)^[r] (0 : V → ℂ) = 0 := by + induction r with + | zero => rfl + | succ r ih => + rw [Function.iterate_succ_apply', ih, fwdDiff_eq_sub] + funext x + simp + simp [h0] + +/-- **Synthesis of one level**: for regular atoms of level `j` with overlap `N` and +`F = ∑_m λ_m a_m` in `L_p`, `0 < s < σ`: +`‖F‖_p + ‖(2^(ks) ω_r(F, 2^(-k))_p)_k‖_{ℓ_q} ≤ K 2^(j(s - n/p)) ‖λ‖_{ℓ_p}`, the case of +`Rd.modNorm_le_coeffNorm` with one nonzero level. -/ +theorem modNorm_level_le {p : ℝ≥0∞} [Fact (1 ≤ p)] (hp : p ≠ ∞) {ι : Type*} [Countable ι] + [MeasurableSpace ι] [MeasurableSingletonClass ι] + {σ : ℝ} {r : ℕ} {d : ℝ} {C : ℝ≥0∞} {N : ℕ} (j : ℕ) (c : ι → V) (a : ι → V → ℂ) + (coef : ι → ℂ) + (hN : ∀ x (S : Finset ι), (∀ m ∈ S, coef m ≠ 0 ∧ ‖x - c m‖ ≤ (d + r) / 2 ^ j) → S.card ≤ N) + (ha : ∀ m, IsRegularAtom p σ r d C j (c m) (a m)) {F : Lp ℂ p (volume : Measure V)} + (hF : ∀ᵐ x ∂volume, F x = ∑' m, coef m * a m x) {s : ℝ} (hs : 0 < s) (hsσ : s < σ) + {q : ℝ≥0∞} (hq : 1 ≤ q) : + ‖F‖ₑ + lqNorm q (fun k => dyadicWeight s k * lpModulus p r F k) ≤ + atomSynthConst p N C r s σ * + (dyadicWeight (s - finrank ℝ V / p.toReal) j * levelNorm p coef) := by + classical + have hp1 : 1 ≤ p := Fact.out + have hp0 : p ≠ 0 := (zero_lt_one.trans_le hp1).ne' + have hpos : 0 < p.toReal := ENNReal.toReal_pos hp0 hp + set coef' : ℕ → ι → ℂ := fun i m => if i = j then coef m else 0 + set a' : ℕ → ι → V → ℂ := fun i m => if i = j then a m else 0 + set f' : ℕ → Lp ℂ p (volume : Measure V) := fun i => if i = j then F else 0 + have hN' : ∀ i x (S : Finset ι), (∀ m ∈ S, coef' i m ≠ 0 ∧ ‖x - c m‖ ≤ (d + r) / 2 ^ i) → + S.card ≤ N := fun i x S hS => by + by_cases hij : i = j + · subst hij + exact hN x S fun m hm => by simpa [coef'] using hS m hm + · have hS0 : S = ∅ := Finset.eq_empty_of_forall_notMem fun m hm => + (hS m hm).1 (by simp [coef', hij]) + simp [hS0] + have ha' : ∀ i m, IsRegularAtom p σ r d C i (c m) (a' i m) := fun i m => by + by_cases hij : i = j + · subst hij + simpa [a'] using ha m + · simpa [a', hij] using (isRegularAtomOn_zero : IsRegularAtom p σ r d C i (c m) 0) + have hf' : ∀ i, ∀ᵐ x ∂volume, f' i x = ∑' m, coef' i m * a' i m x := fun i => by + by_cases hij : i = j + · subst hij + simpa [f', coef', a'] using hF + · filter_upwards [Lp.coeFn_zero ℂ p (volume : Measure V)] with x hx + simp [f', coef', a', hij] + have hF' : Tendsto (fun J => ∑ i ∈ Finset.range (J + 1), f' i) atTop (𝓝 F) := by + refine tendsto_atTop_of_eventually_const (i₀ := j) fun J hJ => ?_ + rw [Finset.sum_ite_eq' (Finset.range (J + 1)) j (fun _ => F)] + simp [Finset.mem_range, Nat.lt_succ_of_le hJ] + refine (modNorm_le_coeffNorm hp (fun _ => c) (fun i => a' i) coef' hN' ha' hf' hF' hs hsσ + hq).trans_eq ?_ + congr 1 + rw [coeffNorm] + have hseq : (fun i => dyadicWeight (s - finrank ℝ V / p.toReal) i * levelNorm p (coef' i)) = + fun i => if i = j then dyadicWeight (s - finrank ℝ V / p.toReal) j * levelNorm p coef + else 0 := funext fun i => by + by_cases hij : i = j + · subst hij + simp [coef'] + · have h0 : levelNorm p (coef' i) = 0 := by + simp [levelNorm, coef', hij] + simp [hij, h0] + rw [hseq, ENNReal.lqNorm_ite_eq (zero_lt_one.trans_le hq).ne'] + +/-! ### Atoms from pointwise bounds -/ + +omit [InnerProductSpace ℝ V] [FiniteDimensional ℝ V] [MeasurableSpace V] [BorelSpace V] in +/-- `‖g‖_p ≤ B μ(S)^(1/p)` for a function with `|g| ≤ B` that vanishes outside `S`. -/ +theorem eLpNorm_le_of_bound_of_support {α : Type*} [MeasurableSpace α] {μ : Measure α} + {p : ℝ≥0∞} {g : α → ℂ} (hg : AEStronglyMeasurable g μ) {S : Set α} + (hS : ∀ x ∉ S, g x = 0) {B : ℝ≥0∞} (hB : ∀ x, ‖g x‖ₑ ≤ B) : + eLpNorm g p μ ≤ B * μ S ^ (1 / p.toReal) := by + have hsupp : Function.support g ⊆ S := fun x hx => by + by_contra h + exact (Function.mem_support.1 hx) (hS x h) + rw [← eLpNorm_restrict_eq_of_support_subset hg hsupp] + refine (eLpNorm_le_of_ae_eNorm_bound hg.restrict (Eventually.of_forall hB)).trans_eq ?_ + rw [Measure.restrict_apply_univ, one_div, smul_eq_mul] + +/-- **Atoms on `Ω` from pointwise bounds**: a function that vanishes outside `B̄(c, d 2^(-j))` +with `|a| ≤ A` on `Ω` and `|Δ_h^r a(x)| ≤ A min(1, (2^j ‖h‖)^σ)` at the points `x` whose steps stay +in `Ω` is a regular atom on `Ω` with the constant `A ((r + 1) d^n |B_1|)^(1/p)`. The support of +`Δ_h^r a` lies in `r + 1` translated balls. -/ +theorem isRegularAtomOn_of_pointwise {p : ℝ≥0∞} {σ : ℝ} {r : ℕ} {d : ℝ} (hd : 0 ≤ d) + {A : ℝ≥0∞} {j : ℕ} {c : V} {a : V → ℂ} {Ω : Set V} (hΩ : MeasurableSet Ω) + (hm : AEStronglyMeasurable a volume) + (h0 : ∀ x, d / 2 ^ j < ‖x - c‖ → a x = 0) (hle : ∀ x ∈ Ω, ‖a x‖ₑ ≤ A) + (hdiff : ∀ h, ∀ x ∈ stepSet Ω r h, + ‖(fwdDiff h)^[r] a x‖ₑ ≤ A * min 1 (ENNReal.ofReal (2 ^ j * ‖h‖) ^ σ)) : + IsRegularAtomOn Ω p σ r d (A * (((r + 1 : ℕ) : ℝ≥0∞) * (ENNReal.ofReal (d ^ finrank ℝ V) * + volume (ball (0 : V) 1))) ^ (1 / p.toReal)) j c a := by + set K := ENNReal.ofReal (d ^ finrank ℝ V) * volume (ball (0 : V) 1) + have hexp : 0 ≤ 1 / p.toReal := div_nonneg zero_le_one ENNReal.toReal_nonneg + have hball : ∀ z : V, volume (closedBall z (d / 2 ^ j)) ^ (1 / p.toReal) ≤ + (((r + 1 : ℕ) : ℝ≥0∞) * K) ^ (1 / p.toReal) * dyadicWeight (-(finrank ℝ V / p.toReal)) j := + fun z => by + rw [volume_closedBall_div_two_pow hd j z, ← ENNReal.rpow_mul_dyadicWeight_neg] + refine ENNReal.rpow_le_rpow ?_ hexp + rw [mul_assoc (((r + 1 : ℕ) : ℝ≥0∞))] + exact le_mul_of_one_le_left' (by exact_mod_cast Nat.succ_pos r) + refine ⟨hm, h0, ?_, fun h => ?_⟩ + · refine (eLpNorm_le_of_bound_of_support (hm.indicator hΩ) (S := closedBall c (d / 2 ^ j)) + (B := A) (fun x hx => ?_) (fun x => ?_)).trans ?_ + · rw [mem_closedBall, dist_eq_norm, not_le] at hx + exact Set.indicator_apply_eq_zero.2 fun _ => h0 x hx + · by_cases hx : x ∈ Ω + · rw [Set.indicator_of_mem hx] + exact hle x hx + · rw [Set.indicator_of_notMem hx, eNorm_zero] + exact zero_le + · rw [mul_assoc] + exact mul_le_mul' le_rfl (hball c) + · set T := ⋃ l ∈ Finset.range (r + 1), closedBall (c - (l : ℝ) • h) (d / 2 ^ j) + have hT : ∀ x ∉ T, (fwdDiff h)^[r] a x = 0 := fun x hx => by + rw [higherDiff_apply] + refine Finset.sum_eq_zero fun l hl => ?_ + have hxl : x ∉ closedBall (c - (l : ℝ) • h) (d / 2 ^ j) := fun hx' => + hx (Set.mem_biUnion hl hx') + rw [mem_closedBall, dist_eq_norm, not_le] at hxl + rw [h0 _ (by rwa [show x + (l : ℝ) • h - c = x - (c - (l : ℝ) • h) by abel]), mul_zero] + have hvol : volume T ^ (1 / p.toReal) ≤ + (((r + 1 : ℕ) : ℝ≥0∞) * K) ^ (1 / p.toReal) * + dyadicWeight (-(finrank ℝ V / p.toReal)) j := by + rw [← ENNReal.rpow_mul_dyadicWeight_neg] + refine ENNReal.rpow_le_rpow ((measure_biUnion_finset_le _ _).trans_eq ?_) hexp + simp_rw [volume_closedBall_div_two_pow hd j] + rw [Finset.sum_const, Finset.card_range, nsmul_eq_mul] + simp only [K] + push_cast + ring + refine (eLpNorm_le_of_bound_of_support + ((aestronglyMeasurable_higherDiff hm r h).indicator (measurableSet_stepSet hΩ r h)) + (B := A * min 1 (ENNReal.ofReal (2 ^ j * ‖h‖) ^ σ)) + (fun x hx => Set.indicator_apply_eq_zero.2 fun _ => hT x hx) (fun x => ?_)).trans ?_ + · by_cases hx : x ∈ stepSet Ω r h + · rw [Set.indicator_of_mem hx] + exact hdiff h x hx + · rw [Set.indicator_of_notMem hx, eNorm_zero] + exact zero_le + calc A * min 1 (ENNReal.ofReal (2 ^ j * ‖h‖) ^ σ) * volume T ^ (1 / p.toReal) + ≤ A * min 1 (ENNReal.ofReal (2 ^ j * ‖h‖) ^ σ) * ((((r + 1 : ℕ) : ℝ≥0∞) * K) ^ + (1 / p.toReal) * dyadicWeight (-(finrank ℝ V / p.toReal)) j) := + mul_le_mul' le_rfl hvol + _ = _ := by ring + +/-- **Atoms from pointwise bounds**: a function that vanishes outside `B̄(c, d 2^(-j))` with +`|a| ≤ A` and `|Δ_h^r a| ≤ A min(1, (2^j ‖h‖)^σ)` is a regular atom with the constant +`A ((r + 1) d^n |B_1|)^(1/p)`, the case `Ω = V` of `Rd.isRegularAtomOn_of_pointwise`. -/ +theorem isRegularAtom_of_pointwise {p : ℝ≥0∞} {σ : ℝ} {r : ℕ} {d : ℝ} (hd : 0 ≤ d) + {A : ℝ≥0∞} {j : ℕ} {c : V} {a : V → ℂ} (hm : AEStronglyMeasurable a volume) + (h0 : ∀ x, d / 2 ^ j < ‖x - c‖ → a x = 0) (hle : ∀ x, ‖a x‖ₑ ≤ A) + (hdiff : ∀ h x, ‖(fwdDiff h)^[r] a x‖ₑ ≤ A * min 1 (ENNReal.ofReal (2 ^ j * ‖h‖) ^ σ)) : + IsRegularAtom p σ r d (A * (((r + 1 : ℕ) : ℝ≥0∞) * (ENNReal.ofReal (d ^ finrank ℝ V) * + volume (ball (0 : V) 1))) ^ (1 / p.toReal)) j c a := + isRegularAtomOn_of_pointwise hd MeasurableSet.univ hm h0 (fun x _ => hle x) + (fun h x _ => hdiff h x) + +omit [FiniteDimensional ℝ V] [MeasurableSpace V] [BorelSpace V] in +/-- **Smooth atoms**: a smooth function vanishing outside `B̄(c, d 2^(-j))` with +`‖D^l a‖ ≤ A 2^(jl)` for `l ≤ r` satisfies the pointwise bounds of `Rd.isRegularAtom_of_pointwise` +with exponent `σ = r` and the constant `2^r A`: `|Δ_h^r a| ≤ A (2^j ‖h‖)^r` by the +mean value theorem and `|Δ_h^r a| ≤ 2^r A`. -/ +theorem enorm_higherDiff_le_of_iteratedFDeriv {a : V → ℂ} + (ha : ContDiff ℝ ((⊤ : ℕ∞) : WithTop ℕ∞) a) {r j : ℕ} {A : ℝ} (hA : 0 ≤ A) + (hD : ∀ l ≤ r, ∀ x, ‖iteratedFDeriv ℝ l a x‖ ≤ A * 2 ^ (j * l)) (h x : V) : + ‖(fwdDiff h)^[r] a x‖ₑ ≤ + ENNReal.ofReal (2 ^ r * A) * min 1 (ENNReal.ofReal (2 ^ j * ‖h‖) ^ (r : ℝ)) := by + have h1 : ‖(fwdDiff h)^[r] a x‖ ≤ A * 2 ^ (j * r) * ‖h‖ ^ r := + norm_higherDiff_le_of_iteratedFDeriv ha (hD r le_rfl) h x + have h2 : ‖(fwdDiff h)^[r] a x‖ₑ ≤ ENNReal.ofReal (2 ^ r * A) := by + rw [ENNReal.ofReal_mul (by positivity), ENNReal.ofReal_pow zero_le_two, ENNReal.ofReal_ofNat] + refine enorm_higherDiff_le_of_bound (fun y => ?_) r h x + rw [← ofReal_norm] + exact ENNReal.ofReal_le_ofReal (by simpa using hD 0 (Nat.zero_le r) y) + rcases le_total 1 (ENNReal.ofReal (2 ^ j * ‖h‖) ^ (r : ℝ)) with hmin | hmin + · rwa [min_eq_left hmin, mul_one] + · rw [min_eq_right hmin, ← ofReal_norm, + ENNReal.ofReal_rpow_of_nonneg (by positivity) (Nat.cast_nonneg r), + Real.rpow_natCast, ← ENNReal.ofReal_mul (by positivity)] + refine ENNReal.ofReal_le_ofReal (h1.trans ?_) + rw [mul_pow, pow_mul] + have hr : (1 : ℝ) ≤ 2 ^ r := one_le_pow₀ one_le_two + calc A * (2 ^ j) ^ r * ‖h‖ ^ r = 1 * (A * ((2 ^ j) ^ r * ‖h‖ ^ r)) := by ring + _ ≤ 2 ^ r * (A * ((2 ^ j) ^ r * ‖h‖ ^ r)) := + mul_le_mul_of_nonneg_right hr (by positivity) + _ = 2 ^ r * A * ((2 ^ j) ^ r * ‖h‖ ^ r) := by ring + +end Rd diff --git a/LeanPool/FunctionSpaces/Rd/Atoms/DiffeoInvariance.lean b/LeanPool/FunctionSpaces/Rd/Atoms/DiffeoInvariance.lean new file mode 100644 index 0000000000..0fb5208ead --- /dev/null +++ b/LeanPool/FunctionSpaces/Rd/Atoms/DiffeoInvariance.lean @@ -0,0 +1,602 @@ +/- +Copyright (c) 2026 Mario Ullrich. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Mario Ullrich +-/ +module + +public import LeanPool.FunctionSpaces.Rd.Atoms.AtomComposition +public import LeanPool.FunctionSpaces.Analysis.Differences.DomainModuli + +/- +Modified for Lean Pool: module names and imports adapted. +-/ + +/-! +# Invariance of Besov spaces under smooth changes of variables + +Let `Ω` be a measurable convex set with nonempty interior and `T` a smooth change of variables with +a cut-off on `Ω` (`Rd.CutoffDiffeo`), acting by `T f = 1_{Ω ∩ U} (χ f) ∘ Φ`. + +* `T` respects null sets on `Ω` (`Rd.CutoffDiffeo.apply_ae_eq`): `Ψ` is differentiable on the + compact `K₀`, so it maps null sets to null sets (Mathlib's + `addHaar_image_eq_zero_of_differentiableOn_of_addHaar_eq_zero`). +* `T` is a bounded operator on `L_p` (`Rd.CutoffDiffeo.applyLp`), by the change of variables + `x = Ψ(y)` on `K₀` (Mathlib's `lintegral_image_eq_lintegral_abs_det_fderiv_mul`): + `∫ |T g|^p = ∫_{K₀} |det DΨ| |χ|^p |g|^p`. +* **Transport of smooth atoms** (`Rd.CutoffDiffeo.exists_transported_atoms`): the images of smooth + atoms on `V` centred at the cell centres are regular atoms on `Ω` whose new centres `Ψ(y)`, + `y ∈ K₀` near the old centre, have bounded overlap, because `Φ` is Lipschitz on `Ψ(K₀)`. +* **Invariance** (`Rd.CutoffDiffeo.modNormOn_applyLp_le`): for `1 ≤ p < ∞`, `0 < s < r` and + `1 ≤ q ≤ ∞`, + + `‖1_Ω T F‖_p + ‖(2^(ks) ω_r(T F, 2^(-k), Ω)_p)_k‖_{ℓ_q}` + ` ≤ C (‖F‖_p + ‖(2^(ks) ω_r(F, 2^(-k))_p)_k‖_{ℓ_q})`. + + Decompose `F` into smooth cell atoms of order `r` + (`Rd.LocalMeansBump.atomic_decomposition_smooth`), transport them, and synthesise on `Ω` + (`Rd.modNormOn_le_coeffNorm`). +* **The extension property** (`Rd.HasBesovExtension`): every function of finite intrinsic Besov + quasi-norm on a measurable set (`Rd.modNormOn`) extends to `V` with a bound. It is the same for + sets that agree up to a null set (`Rd.HasBesovExtension.congr_set`), and with it the order of + the differences does not matter (`Rd.HasBesovExtension.modNormOn_order_le`). +* **Besov domains** (`Rd.BesovDomain`): convex closed sets with nonempty interior with the + extension property (`Rd.BesovDomain.of_hasBesovExtension`, up to null sets + `Rd.BesovDomain.of_ae_eq`). On a Besov domain the intrinsic quasi-norm is invariant + (`Rd.CutoffDiffeo.modNormOn_applyLp_le_modNormOn`), and the order of the differences does not + matter (`Rd.BesovDomain.modNormOn_order_le`); `V` itself is a Besov domain, and so are the + closed half-space, the quadrant, closed balls of positive radius, the closed unit cube and the + closures of nonempty bounded open convex sets (`FunctionSpaces.Domains.Lipschitz.HalfSpace`, + `FunctionSpaces.Domains.Lipschitz.BesovDomains`). +-/ + +@[expose] public section + +open MeasureTheory Filter Topology Module Metric Set +open scoped ENNReal NNReal + +open ENNReal (lqNorm dyadicWeight) + +namespace Rd + +/-! ### Linearity -/ + +namespace CutoffDiffeo + +section Linear + +variable {V : Type*} [NormedAddCommGroup V] [NormedSpace ℝ V] {Ω : Set V} (T : CutoffDiffeo Ω) + +/-- `T (g₁ + g₂) = T g₁ + T g₂`. -/ +theorem apply_add (g₁ g₂ : V → ℂ) : T.apply (g₁ + g₂) = T.apply g₁ + T.apply g₂ := by + funext x + by_cases hx : x ∈ Ω ∩ T.U + · simp only [apply, Set.indicator_of_mem hx, Pi.add_apply, mul_add] + · simp only [apply, Set.indicator_of_notMem hx, Pi.add_apply, add_zero] + +/-- `T (c g) = c T g`. -/ +theorem apply_smul (c : ℂ) (g : V → ℂ) : T.apply (c • g) = c • T.apply g := by + funext x + by_cases hx : x ∈ Ω ∩ T.U + · simp only [apply, Set.indicator_of_mem hx, Pi.smul_apply, smul_eq_mul] + ring + · simp only [apply, Set.indicator_of_notMem hx, Pi.smul_apply, smul_zero] + +/-- **`T` commutes with series** whose terms it kills where the coefficients change: if for every +`m` either `λ'_m = λ_m` or `T a_m = 0`, then `T (∑_m λ_m a_m) = ∑_m λ'_m T a_m`. -/ +theorem apply_tsum {ι : Type*} (coef coef' : ι → ℂ) (a : ι → V → ℂ) + (h : ∀ m, coef' m = coef m ∨ T.apply (a m) = 0) (x : V) : + T.apply (fun y => ∑' m, coef m * a m y) x = ∑' m, coef' m * T.apply (a m) x := by + by_cases hx : x ∈ Ω ∩ T.U + · have e : ∀ m, T.apply (a m) x = T.chi (T.Phi x) * a m (T.Phi x) := fun m => by + rw [apply, Set.indicator_of_mem hx] + rw [apply, Set.indicator_of_mem hx, ← tsum_mul_left] + refine tsum_congr fun m => ?_ + rcases h m with h | h + · rw [h, e] + ring + · have h' := congrFun h x + rw [Pi.zero_apply, e] at h' + rw [e, h', mul_zero] + calc T.chi (T.Phi x) * (coef m * a m (T.Phi x)) = coef m * (T.chi (T.Phi x) * a m (T.Phi + x)) := by + ring + _ = 0 := by rw [h', mul_zero] + · rw [apply, Set.indicator_of_notMem hx] + symm + refine (tsum_congr fun m => ?_).trans tsum_zero + rw [apply, Set.indicator_of_notMem hx, mul_zero] + +end Linear + +/-! ### Null sets and the change of variables -/ + +variable {V : Type*} [NormedAddCommGroup V] [InnerProductSpace ℝ V] [FiniteDimensional ℝ V] + [MeasurableSpace V] [BorelSpace V] {Ω : Set V} (T : CutoffDiffeo Ω) + +/-- **`T` respects null sets on `Ω`**: if `g₁ = g₂` almost everywhere on `Ω`, then +`T g₁ = T g₂` almost everywhere, since `Ψ` maps the null set `K₀ ∩ {g₁ ≠ g₂}` to a null set. -/ +theorem apply_ae_eq {g₁ g₂ : V → ℂ} (h : ∀ᵐ y ∂volume, y ∈ Ω → g₁ y = g₂ y) : + T.apply g₁ =ᵐ[volume] T.apply g₂ := by + set N := {y | y ∈ Ω ∧ g₁ y ≠ g₂ y} + have hN : volume N = 0 := by + rw [ae_iff] at h + exact measure_mono_null (fun y hy => fun h' => hy.2 (h' hy.1)) h + have hΨN : volume (T.Psi '' (T.K0 ∩ N)) = 0 := + addHaar_image_eq_zero_of_differentiableOn_of_addHaar_eq_zero volume + ((T.contDiffOn_Psi.differentiableOn (by simp)).mono + (inter_subset_left.trans T.K0_subset)) + (measure_mono_null inter_subset_right hN) + refine ae_iff.2 (measure_mono_null (fun x hx => ?_) hΨN) + have hx' : T.apply g₁ x ≠ T.apply g₂ x := hx + by_cases hxs : x ∈ Ω ∩ T.U + · rw [apply, apply, Set.indicator_of_mem hxs, Set.indicator_of_mem hxs] at hx' + have hΦK : T.Phi x ∈ T.K0 := by + by_contra hΦK + rw [T.chi_eq_zero _ (T.mapsTo_Phi hxs).1 hΦK, zero_mul, zero_mul] at hx' + exact hx' rfl + have hne : g₁ (T.Phi x) ≠ g₂ (T.Phi x) := fun he => hx' (by rw [he]) + exact ⟨T.Phi x, ⟨hΦK, (T.mapsTo_Phi hxs).1, hne⟩, T.left_inv x hxs⟩ + · rw [apply, apply, Set.indicator_of_notMem hxs, Set.indicator_of_notMem hxs] at hx' + exact absurd rfl hx' + +/-- `T g` is almost everywhere strongly measurable with `g`. -/ +theorem aestronglyMeasurable_apply (hΩm : MeasurableSet Ω) {g : V → ℂ} + (hg : AEStronglyMeasurable g volume) : AEStronglyMeasurable (T.apply g) volume := by + have hSm : MeasurableSet (Ω ∩ T.U) := hΩm.inter T.isOpen_U.measurableSet + have h1 : AEStronglyMeasurable (T.apply hg.mk) volume := by + refine (aestronglyMeasurable_indicator_iff hSm).2 ?_ + have hΦ : AEMeasurable T.Phi (volume.restrict (Ω ∩ T.U)) := + T.contDiffOn_Phi.continuousOn.aemeasurable hSm + have hχ : ContinuousOn (fun x => T.chi (T.Phi x)) (Ω ∩ T.U) := + T.contDiffOn_chi.continuousOn.comp T.contDiffOn_Phi.continuousOn T.mapsTo_Phi + exact (hχ.aestronglyMeasurable hSm).mul + (hg.stronglyMeasurable_mk.aestronglyMeasurable.comp_aemeasurable hΦ) + exact h1.congr (T.apply_ae_eq (hg.ae_eq_mk.mono fun y hy _ => hy.symm)) + +variable (hΩ : Convex ℝ Ω) (hint : (interior Ω).Nonempty) +include hΩ hint + +omit hΩ hint in +/-- **The change of variables** `x = Ψ(y)`: for `e > 0`, +`∫ |T g|^e = ∫_{K₀} |det DΨ(y)| |χ(y)|^e |g(y)|^e dy`. -/ +theorem lintegral_apply_eq (g : V → ℂ) {e : ℝ} (he : 0 < e) : + ∫⁻ x, ‖T.apply g x‖ₑ ^ e = ∫⁻ y in T.K0, + ENNReal.ofReal |(fderivWithin ℝ T.Psi (Ω ∩ T.U') y).det| * (‖T.chi y‖ₑ ^ e * ‖g y‖ₑ ^ e) := by + have hderiv : ∀ y ∈ T.K0, + HasFDerivWithinAt T.Psi (fderivWithin ℝ T.Psi (Ω ∩ T.U') y) T.K0 y := fun y hy => + ((T.contDiffOn_Psi.differentiableOn (by simp) y + (T.K0_subset hy)).hasFDerivWithinAt).mono T.K0_subset + have hinj : InjOn T.Psi T.K0 := fun y₁ h₁ y₂ h₂ h => by + rw [← T.right_inv y₁ (T.K0_subset h₁), h, T.right_inv y₂ (T.K0_subset h₂)] + rw [← setLIntegral_eq_of_support_subset (s := T.carrier) fun x hx => ?_] + · rw [carrier, lintegral_image_eq_lintegral_abs_det_fderiv_mul volume + T.isCompact_K0.measurableSet hderiv hinj] + refine setLIntegral_congr_fun T.isCompact_K0.measurableSet fun y hy => ?_ + rw [apply, Set.indicator_of_mem (T.mapsTo_Psi (T.K0_subset hy)), T.right_inv y (T.K0_subset hy), + eNorm_mul, ENNReal.mul_rpow_of_nonneg _ _ he.le] + · by_contra hxc + exact hx (show ‖T.apply g x‖ₑ ^ e = 0 by + rw [T.apply_eq_zero_of_notMem g hxc, eNorm_zero, ENNReal.zero_rpow_of_pos he]) + +omit [FiniteDimensional ℝ V] [MeasurableSpace V] [BorelSpace V] in +/-- The Jacobian of `Ψ` is bounded on `K₀`. -/ +theorem exists_det_bound : + ∃ B : ℝ, 0 ≤ B ∧ ∀ y ∈ T.K0, |(fderivWithin ℝ T.Psi (Ω ∩ T.U') y).det| ≤ B := by + obtain ⟨B, hB⟩ := T.isCompact_K0.exists_bound_of_continuousOn + ((ContinuousLinearMap.continuous_det.comp_continuousOn + (T.contDiffOn_Psi.continuousOn_fderivWithin (T.uniqueDiffOn_target hΩ hint) + (by exact_mod_cast le_top))).mono T.K0_subset) + exact ⟨max B 0, le_max_right _ _, fun y hy => + ((Real.norm_eq_abs _).symm.trans_le (hB y hy)).trans (le_max_left _ _)⟩ + +/-- **`T` is bounded on `L_p`**: `‖T g‖_p ≤ C ‖g‖_p` for `0 < p < ∞`. -/ +theorem eLpNorm_apply_le (hΩm : MeasurableSet Ω) {p : ℝ≥0∞} (hp0 : p ≠ 0) (hp : p ≠ ∞) : + ∃ C : ℝ≥0∞, C ≠ ∞ ∧ ∀ g : V → ℂ, AEStronglyMeasurable g volume → + eLpNorm (T.apply g) p volume ≤ C * eLpNorm g p volume := by + obtain ⟨B, hB0, hB⟩ := T.exists_det_bound hΩ hint + obtain ⟨M, hM0, hM⟩ := T.exists_iteratedFDerivWithin_chi_bound hΩ hint 0 + set e := p.toReal + have he : 0 < e := ENNReal.toReal_pos hp0 hp + set D := ENNReal.ofReal B * ENNReal.ofReal M ^ e + have hD : D ≠ ∞ := ENNReal.mul_ne_top ENNReal.ofReal_ne_top + (ENNReal.rpow_ne_top_of_nonneg he.le ENNReal.ofReal_ne_top) + refine ⟨D ^ (1 / e), ENNReal.rpow_ne_top_of_nonneg (by positivity) hD, fun g hg => ?_⟩ + rw [← ENNReal.rpow_le_rpow_iff he, ENNReal.mul_rpow_of_nonneg _ _ he.le, ← ENNReal.rpow_mul, + one_div_mul_cancel he.ne', ENNReal.rpow_one, + eLpNorm_rpow_eq (T.aestronglyMeasurable_apply hΩm hg) hp0 hp, eLpNorm_rpow_eq hg hp0 hp, + T.lintegral_apply_eq g he] + calc ∫⁻ y in T.K0, ENNReal.ofReal |(fderivWithin ℝ T.Psi (Ω ∩ T.U') y).det| * + (‖T.chi y‖ₑ ^ e * ‖g y‖ₑ ^ e) + ≤ ∫⁻ y in T.K0, D * ‖g y‖ₑ ^ e := by + refine setLIntegral_mono' T.isCompact_K0.measurableSet fun y hy => ?_ + have hχ : ‖T.chi y‖ₑ ≤ ENNReal.ofReal M := by + have := hM 0 le_rfl y (T.K0_subset hy) + rw [norm_iteratedFDerivWithin_zero] at this + rw [← ofReal_norm] + exact ENNReal.ofReal_le_ofReal this + rw [← mul_assoc] + exact mul_le_mul' (mul_le_mul' (ENNReal.ofReal_le_ofReal (hB y hy)) + (ENNReal.rpow_le_rpow hχ he.le)) le_rfl + _ ≤ ∫⁻ y, D * ‖g y‖ₑ ^ e := setLIntegral_le_lintegral _ _ + _ = D * ∫⁻ y, ‖g y‖ₑ ^ e := lintegral_const_mul' _ _ hD + +/-! ### `T` as an operator on `L_p` -/ + +variable (hΩm : MeasurableSet Ω) {p : ℝ≥0∞} [Fact (1 ≤ p)] (hp : p ≠ ∞) +include hΩm hp + +/-- `T g ∈ L_p` for `g ∈ L_p`. -/ +theorem memLp_apply {g : V → ℂ} (hg : MemLp g p volume) : MemLp (T.apply g) p volume := by + have hp0 : p ≠ 0 := (zero_lt_one.trans_le (Fact.out : 1 ≤ p)).ne' + obtain ⟨C, hC, hle⟩ := T.eLpNorm_apply_le hΩ hint hΩm hp0 hp + exact (hle g hg.aestronglyMeasurable).trans_lt (ENNReal.mul_lt_top hC.lt_top hg) + +/-- **The change of variables with a cut-off as a bounded operator on `L_p`**. -/ +noncomputable def applyLp : Lp ℂ p (volume : Measure V) →L[ℂ] Lp ℂ p (volume : Measure V) := + LinearMap.mkContinuous + { toFun := fun g => (T.memLp_apply hΩ hint hΩm hp (Lp.memLp g)).toLp _ + map_add' := fun f g => by + refine Lp.ext ?_ + have e1 := MemLp.coeFn_toLp (T.memLp_apply hΩ hint hΩm hp (Lp.memLp (f + g))) + have e2 := MemLp.coeFn_toLp (T.memLp_apply hΩ hint hΩm hp (Lp.memLp f)) + have e3 := MemLp.coeFn_toLp (T.memLp_apply hΩ hint hΩm hp (Lp.memLp g)) + have e5 := Lp.coeFn_add ((T.memLp_apply hΩ hint hΩm hp (Lp.memLp f)).toLp _) + ((T.memLp_apply hΩ hint hΩm hp (Lp.memLp g)).toLp _) + have e6 := T.apply_ae_eq ((Lp.coeFn_add f g).mono fun y hy _ => hy) + filter_upwards [e1, e2, e3, e5, e6] with x h1 h2 h3 h5 h6 + rw [h1, h5, Pi.add_apply, h2, h3, h6, apply_add, Pi.add_apply] + map_smul' := fun c f => by + refine Lp.ext ?_ + have e1 := MemLp.coeFn_toLp (T.memLp_apply hΩ hint hΩm hp (Lp.memLp (c • f))) + have e2 := MemLp.coeFn_toLp (T.memLp_apply hΩ hint hΩm hp (Lp.memLp f)) + have e4 := Lp.coeFn_smul c ((T.memLp_apply hΩ hint hΩm hp (Lp.memLp f)).toLp _) + have e6 := T.apply_ae_eq ((Lp.coeFn_smul c f).mono fun y hy _ => hy) + filter_upwards [e1, e2, e4, e6] with x h1 h2 h4 h6 + rw [h1, RingHom.id_apply, h4, Pi.smul_apply, h2, h6, apply_smul, Pi.smul_apply] } + (Classical.choose (T.eLpNorm_apply_le hΩ hint hΩm + (zero_lt_one.trans_le (Fact.out : 1 ≤ p)).ne' hp)).toReal + (fun g => by + obtain ⟨hC, hle⟩ := Classical.choose_spec (T.eLpNorm_apply_le hΩ hint hΩm + (zero_lt_one.trans_le (Fact.out : 1 ≤ p)).ne' hp) + rw [LinearMap.coe_mk, AddHom.coe_mk, Lp.norm_toLp, Lp.norm_def, ← ENNReal.toReal_mul] + exact ENNReal.toReal_mono (ENNReal.mul_ne_top hC (Lp.eLpNorm_ne_top g)) + (hle g (Lp.aestronglyMeasurable g))) + +/-- The operator acts by `T`, almost everywhere. -/ +theorem applyLp_ae (g : Lp ℂ p (volume : Measure V)) : + T.applyLp hΩ hint hΩm hp g =ᵐ[volume] T.apply g := + MemLp.coeFn_toLp (T.memLp_apply hΩ hint hΩm hp (Lp.memLp g)) + +omit hp [Fact (1 ≤ p)] in +/-- **Transport of smooth atoms**: for smooth atoms on `V` of order `r ≥ 1`, radius factor `d` and +constant `A`, centred at the cell centres, there are `d'`, `C' < ∞` and `N` such that for all +coefficients `λ` the images `T a_{j,m}` are regular atoms on `Ω` of order and exponent `r` with +radius factor `d'`, constant `C'` and suitable centres, and coefficients `λ'` with `|λ'| ≤ |λ|`, +`λ' = λ` unless `T a_{j,m} = 0`, and at most `N` centres with `λ' ≠ 0` in each ball of radius +`(d' + r) 2^(-j)`. -/ +theorem exists_transported_atoms {r : ℕ} (hr : 1 ≤ r) {d A : ℝ} (hd : 0 ≤ d) (hA : 0 ≤ A) : + ∃ (d' : ℝ) (C' : ℝ≥0∞) (N : ℕ), C' ≠ ∞ ∧ + ∀ (a : ℕ → (Fin (finrank ℝ V) → ℤ) → V → ℂ) (coef : ℕ → (Fin (finrank ℝ V) → ℤ) → ℂ), + (∀ j m, IsSmoothAtom Set.univ r d A j (cellCenter j m) (a j m)) → + ∃ (c' : ℕ → (Fin (finrank ℝ V) → ℤ) → V) (coef' : ℕ → (Fin (finrank ℝ V) → ℤ) → ℂ), + (∀ j x (S : Finset (Fin (finrank ℝ V) → ℤ)), + (∀ m ∈ S, coef' j m ≠ 0 ∧ ‖x - c' j m‖ ≤ (d' + r) / 2 ^ j) → S.card ≤ N) ∧ + (∀ j m, IsRegularAtomOn Ω p r r d' C' j (c' j m) (T.apply (a j m))) ∧ + (∀ j m, ‖coef' j m‖ₑ ≤ ‖coef j m‖ₑ) ∧ + (∀ j m, coef' j m = coef j m ∨ T.apply (a j m) = 0) := by + classical + obtain ⟨L, A', hL, hA', hT⟩ := T.isSmoothAtom_apply hΩ hΩm hint r + obtain ⟨LΦ, hLΦ⟩ := T.exists_lipschitzOnWith_Phi hΩ + set d' := 2 * L * d + have hd' : 0 ≤ d' := by positivity + have hρ : 0 ≤ d' + r := by positivity + refine ⟨d', ENNReal.ofReal (2 ^ r * (r : ℝ) ^ (r + 1) * (A' * A)) * + (((r + 1 : ℕ) : ℝ≥0∞) * (ENNReal.ofReal (d' ^ finrank ℝ V) * volume (ball (0 : V) 1))) ^ + (1 / p.toReal), ⌈(2 * (2 * LΦ * (d' + r) + d) + 2) ^ finrank ℝ V⌉₊, + ENNReal.mul_ne_top ENNReal.ofReal_ne_top (ENNReal.rpow_ne_top_of_nonneg (by positivity) + (ENNReal.mul_ne_top (ENNReal.natCast_ne_top _) + (ENNReal.mul_ne_top ENNReal.ofReal_ne_top measure_ball_lt_top.ne))), + fun a coef ha => ?_⟩ + -- the cells that meet `K₀`, and a point of `K₀` near their centre + set near : ℕ → (Fin (finrank ℝ V) → ℤ) → Prop := + fun j m => ∃ y ∈ T.K0, ‖y - cellCenter j m‖ ≤ d / 2 ^ j + have hfar : ∀ j m, ¬ near j m → T.apply (a j m) = 0 := fun j m h => funext fun x => + T.apply_eq_zero_of_forall_far (ha j m).eq_zero + (fun y hy => lt_of_not_ge fun hle => h ⟨y, hy, hle⟩) x + refine ⟨fun j m => if h : near j m then T.Psi h.choose else 0, + fun j m => if near j m then coef j m else 0, fun j x S hS => ?_, fun j m => ?_, + fun j m => ?_, fun j m => ?_⟩ + · -- bounded overlap + have hnear : ∀ m ∈ S, near j m := fun m hm => by + by_contra h + exact (hS m hm).1 (ite_eq_right h) + refine card_le_of_lipschitz_centres hLΦ j hd hρ + (z := fun m => if h : near j m then T.Psi h.choose else 0) x S fun m hm => ?_ + have hS' := (hS m hm).2 + dsimp only at hS' ⊢ + rw [dite_eq_left (hnear m hm)] at hS' ⊢ + obtain ⟨hy, hyc⟩ := (hnear m hm).choose_spec + exact ⟨⟨_, hy, rfl⟩, by rwa [T.right_inv _ (T.K0_subset hy)], hS'⟩ + · -- the atoms + by_cases h : near j m + · dsimp only + rw [dite_eq_left h] + obtain ⟨hy, hyc⟩ := h.choose_spec + exact isRegularAtomOn_of_isSmoothAtom hΩ hΩm hint hr le_rfl hd' (mul_nonneg hA' hA) + (hT hA (ha j m) _ hy hyc) + · rw [hfar j m h] + exact isRegularAtomOn_of_isSmoothAtom hΩ hΩm hint hr le_rfl hd' (mul_nonneg hA' hA) + (isSmoothAtom_zero Ω r d' (mul_nonneg hA' hA) j _) + · dsimp only + by_cases h : near j m + · rw [ite_eq_left h] + · rw [ite_eq_right h, eNorm_zero] + exact zero_le + · by_cases h : near j m + · exact Or.inl (ite_eq_left h) + · exact Or.inr (hfar j m h) + +/-- **Invariance under a smooth change of variables with a cut-off**: for `1 ≤ p < ∞`, +`0 < s < r` and `1 ≤ q ≤ ∞` there is `C < ∞` such that for all `F ∈ L_p(V)` +`‖1_Ω T F‖_p + ‖(2^(ks) ω_r(T F, 2^(-k), Ω)_p)_k‖_{ℓ_q} ≤ +C (‖F‖_p + ‖(2^(ks) ω_r(F, 2^(-k))_p)_k‖_{ℓ_q})`. The smooth cell atoms of `F` +(`Rd.LocalMeansBump.atomic_decomposition_smooth`) are transported by `T` +(`Rd.CutoffDiffeo.exists_transported_atoms`) and synthesised on `Ω` +(`Rd.modNormOn_le_coeffNorm`). -/ +theorem modNormOn_applyLp_le {r : ℕ} (hr : 1 ≤ r) {s : ℝ} (hs : 0 < s) (hsr : s < r) {q : ℝ≥0∞} + (hq : 1 ≤ q) : ∃ C : ℝ≥0∞, C ≠ ∞ ∧ ∀ F : Lp ℂ p (volume : Measure V), + modNormOn hΩm r s q (T.applyLp hΩ hint hΩm hp F) ≤ + C * (‖F‖ₑ + lqNorm q (fun k => dyadicWeight s k * lpModulus p r F k)) := by + have hp1 : 1 ≤ p := Fact.out + set b := LocalMeansBump.std (V := V) + obtain ⟨A, hA, hdec⟩ := b.atomic_decomposition_smooth hp r r + have hd : 0 ≤ 2 * (r : ℝ) * b.radius + finrank ℝ V := + add_nonneg (mul_nonneg (mul_nonneg zero_le_two (Nat.cast_nonneg r)) b.radius_nonneg) + (Nat.cast_nonneg _) + obtain ⟨d', C', N, hC', htr⟩ := T.exists_transported_atoms hΩ hint hΩm hr hd hA (p := p) + refine ⟨atomSynthConst p N C' r s r * b.upperConst r s, ENNReal.mul_ne_top + (atomSynthConst_ne_top hp1 N hC' r hs hsr) (b.upperConst_ne_top r s), fun F => ?_⟩ + obtain ⟨ha, hsum, hcoef⟩ := hdec F + obtain ⟨c', coef', hN, ha', hle, hor⟩ := + htr _ (fun j => cellCoef p j (b.localMean hp r j F)) ha + -- the transported level sums + have hf : ∀ j, ∀ᵐ x ∂volume, T.applyLp hΩ hint hΩm hp + (convLp hp (b.integrable_dual r j) (b.localMean hp r j F)) x = + ∑' m, coef' j m * T.apply (cellAtom p (b.dual r j) j (b.localMean hp r j F) m) x := + fun j => by + filter_upwards [T.applyLp_ae hΩ hint hΩm hp _, + T.apply_ae_eq ((hsum j).mono fun y hy _ => hy)] with x h1 h2 + rw [h1, h2] + exact T.apply_tsum _ _ _ (hor j) x + have hF : Tendsto (fun J => ∑ j ∈ Finset.range (J + 1), T.applyLp hΩ hint hΩm hp + (convLp hp (b.integrable_dual r j) (b.localMean hp r j F))) atTop + (𝓝 (T.applyLp hΩ hint hΩm hp F)) := by + have h := ((T.applyLp hΩ hint hΩm hp).continuous.tendsto F).comp + (b.tendsto_sum_dual_localMean hp hr F) + simpa only [Function.comp_def, map_sum] using h + have hsyn := modNormOn_le_coeffNorm hp hΩm c' _ coef' hN ha' hf hF hs hsr hq + rw [modNormOn, Lp.eNorm_def, eLpNorm_congr_ae (indicatorLp_apply_ae hΩm _)] + refine hsyn.trans ?_ + rw [mul_assoc] + refine mul_le_mul' le_rfl ?_ + calc coeffNorm p (finrank ℝ V) s q coef' + ≤ coeffNorm p (finrank ℝ V) s q (fun j => cellCoef p j (b.localMean hp r j F)) := + ENNReal.lqNorm_mono fun j => mul_le_mul' le_rfl (levelNorm_mono p (hle j)) + _ = b.localMeansNorm hp r s q F := hcoef s q + _ ≤ _ := b.localMeansNorm_le hp r s hq F + +end CutoffDiffeo + +/-! ### Global changes of variables -/ + +namespace CutoffDiffeo + +section Global + +variable {V : Type*} [NormedAddCommGroup V] [NormedSpace ℝ V] + +/-- A **global change of variables with a cut-off**: a smooth bijection `Φ` of `V` with smooth +inverse `Ψ` and a smooth cut-off `χ` with compact support, as a change of variables on `V`. -/ +noncomputable def global (Phi Psi : V → V) (hPhi : ContDiff ℝ ((⊤ : ℕ∞) : WithTop ℕ∞) Phi) + (hPsi : ContDiff ℝ ((⊤ : ℕ∞) : WithTop ℕ∞) Psi) (hPsiPhi : ∀ x, Psi (Phi x) = x) + (hPhiPsi : ∀ y, Phi (Psi y) = y) (chi : V → ℂ) (hchi : ContDiff ℝ ((⊤ : ℕ∞) : WithTop ℕ∞) chi) + (hchic : HasCompactSupport chi) : CutoffDiffeo (Set.univ : Set V) where + U := Set.univ + U' := Set.univ + isOpen_U := isOpen_univ + isOpen_U' := isOpen_univ + Phi := Phi + Psi := Psi + chi := chi + K0 := tsupport chi + contDiffOn_Phi := hPhi.contDiffOn + contDiffOn_Psi := hPsi.contDiffOn + contDiffOn_chi := hchi.contDiffOn + mapsTo_Phi _ _ := ⟨Set.mem_univ _, Set.mem_univ _⟩ + mapsTo_Psi _ _ := ⟨Set.mem_univ _, Set.mem_univ _⟩ + left_inv x _ := hPsiPhi x + right_inv y _ := hPhiPsi y + isCompact_K0 := hchic + K0_subset _ _ := ⟨Set.mem_univ _, Set.mem_univ _⟩ + chi_eq_zero _ _ hy := image_eq_zero_of_notMem_tsupport hy + +/-- A global change of variables acts by `T f = (χ f) ∘ Φ`. -/ +theorem global_apply (Phi Psi : V → V) (hPhi : ContDiff ℝ ((⊤ : ℕ∞) : WithTop ℕ∞) Phi) + (hPsi : ContDiff ℝ ((⊤ : ℕ∞) : WithTop ℕ∞) Psi) (hPsiPhi : ∀ x, Psi (Phi x) = x) + (hPhiPsi : ∀ y, Phi (Psi y) = y) (chi : V → ℂ) (hchi : ContDiff ℝ ((⊤ : ℕ∞) : WithTop ℕ∞) chi) + (hchic : HasCompactSupport chi) (f : V → ℂ) (x : V) : + (global Phi Psi hPhi hPsi hPsiPhi hPhiPsi chi hchi hchic).apply f x = chi (Phi x) * f (Phi + x) := by + rw [apply, Set.indicator_of_mem] + · rfl + · exact ⟨Set.mem_univ _, Set.mem_univ _⟩ + +end Global + +end CutoffDiffeo + +variable {V : Type*} [NormedAddCommGroup V] [InnerProductSpace ℝ V] [FiniteDimensional ℝ V] + [MeasurableSpace V] [BorelSpace V] + +/-! ### The extension property -/ + +/-- The **extension property** of a measurable set `Ω`: for `1 ≤ p < ∞`, `0 < s < r` and +`1 ≤ q ≤ ∞` there is `C < ∞` such that every `f ∈ L_p(V)` with +`N_Ω(f) = ‖1_Ω f‖_p + ‖(2^(ks) ω_r(f, 2^(-k), Ω)_p)_k‖_{ℓ_q} < ∞` (`Rd.modNormOn`) agrees on `Ω` +with some `F ∈ L_p(V)` with `‖F‖_p + ‖(2^(ks) ω_r(F, 2^(-k))_p)_k‖_{ℓ_q} ≤ C N_Ω(f)`. -/ +def HasBesovExtension {Ω : Set V} (hΩ : MeasurableSet Ω) : Prop := + ∀ (p : ℝ≥0∞) [Fact (1 ≤ p)], p ≠ ∞ → ∀ (r : ℕ) (s : ℝ), 0 < s → s < r → + ∀ q : ℝ≥0∞, 1 ≤ q → ∃ C : ℝ≥0∞, C ≠ ∞ ∧ ∀ f : Lp ℂ p (volume : Measure V), + modNormOn hΩ r s q f < ∞ → ∃ F : Lp ℂ p (volume : Measure V), + indicatorLp hΩ F = indicatorLp hΩ f ∧ + ‖F‖ₑ + lqNorm q (fun k => dyadicWeight s k * lpModulus p r F k) ≤ + C * modNormOn hΩ r s q f + +/-- **The extension property is the same for sets that agree up to a null set**: if `U` has it and +`U'` agrees with `U` up to a null set, then `U'` has it; the proof keeps the constant `C`, since +the cut-offs and the intrinsic quasi-norms on `U` and `U'` agree (`Rd.indicatorLp_congr_set`, +`Rd.modNormOn_congr_set`). -/ +theorem HasBesovExtension.congr_set {U U' : Set V} {hU : MeasurableSet U} (hU' : MeasurableSet U') + (hUU' : U =ᵐ[volume] U') (h : HasBesovExtension hU) : HasBesovExtension hU' := by + intro p _ hp r s hs hsr q hq + obtain ⟨C, hC, hext⟩ := h p hp r s hs hsr q hq + refine ⟨C, hC, fun f hf => ?_⟩ + simp_rw [← modNormOn_congr_set hU hU' hUU', ← indicatorLp_congr_set hU hU' hUU'] at hf ⊢ + exact hext f hf + +/-- **The order of the differences does not matter on a set with the extension property**: for +`0 < s < r` and `s < r'` there is `C < ∞` with `N_Ω(f; r') ≤ C N_Ω(f; r)` whenever +`N_Ω(f; r) < ∞`, where `N_Ω(f; r) = ‖1_Ω f‖_p + ‖(2^(ks) ω_r(f, 2^(-k), Ω)_p)_k‖_{ℓ_q}`. Extend +`f` to `V`, change the order there (`Rd.modNorm_le_modNorm_of_lt`), and restrict. -/ +theorem HasBesovExtension.modNormOn_order_le {Ω : Set V} {hΩ : MeasurableSet Ω} + (h : HasBesovExtension hΩ) {p : ℝ≥0∞} [Fact (1 ≤ p)] (hp : p ≠ ∞) {r r' : ℕ} {s : ℝ} + (hs : 0 < s) (hsr : s < r) (hsr' : s < r') {q : ℝ≥0∞} (hq : 1 ≤ q) : + ∃ C : ℝ≥0∞, C ≠ ∞ ∧ ∀ f : Lp ℂ p (volume : Measure V), + modNormOn hΩ r s q f < ∞ → modNormOn hΩ r' s q f ≤ C * modNormOn hΩ r s q f := by + obtain ⟨C₁, hC₁, hext⟩ := h p hp r s hs hsr q hq + obtain ⟨C₂, hC₂, hord⟩ := modNorm_le_modNorm_of_lt (V := V) hp r hs.le hsr' hq + refine ⟨C₂ * C₁, ENNReal.mul_ne_top hC₂ hC₁, fun f hf => ?_⟩ + obtain ⟨F, hFf, hFle⟩ := hext f hf + rw [mul_assoc] + exact (modNormOn_le_modNorm_of_indicatorLp hΩ r' s q hFf).trans + ((hord F).trans (mul_le_mul' le_rfl hFle)) + +/-! ### Besov domains -/ + +/-- A **Besov domain**: a closed convex set with nonempty interior with the extension property +(`Rd.HasBesovExtension`): every function of finite intrinsic Besov quasi-norm agrees with a +function on `V` whose Besov quasi-norm is bounded by a constant times the intrinsic one, for +`1 ≤ p < ∞`, `0 < s < r` and `1 ≤ q ≤ ∞`. The extension is a field of the class, so the class is a +hypothesis; its instances are `univ`, the closed half-space, the models of manifolds with and +without boundary and the quadrant model of manifolds with corners (`Rd.BesovDomain.univ`, +`Rd.BesovDomain.closedHalfSpace`, `Rd.BesovDomain.range_euclideanHalfSpace`, +`Rd.BesovDomain.range_of_boundaryless`, `Rd.BesovDomain.range_euclideanQuadrant`) and the closed +unit cube (`Rd.BesovDomain.closedUnitCube`). The closure of a Lipschitz graph domain with convex +graph function, of a nonempty convex bounded Lipschitz domain and of a nonempty bounded open +convex set is a Besov domain (`Rd.BesovDomain.closure_lipschitzGraph`, +`Rd.BesovDomain.closure_boundedLipschitzDomain`, `Rd.BesovDomain.closure_of_convex`), and so is +every closed ball of positive radius (`Rd.BesovDomain.closedBall`). +The class consists of closed convex sets; every Lipschitz graph domain and every bounded Lipschitz +domain, convex or not, has the extension property (`Rd.HasBesovExtension`, +`Rd.LipschitzGraph.hasBesovExtension`, `Rd.BoundedLipschitzDomain.hasBesovExtension`). -/ +class BesovDomain (Ω : Set V) : Prop where + convex : Convex ℝ Ω + isClosed : IsClosed Ω + interior_nonempty : (interior Ω).Nonempty + exists_extension : HasBesovExtension isClosed.measurableSet + +/-- **`V` is a Besov domain**, with the extension `F = f`. -/ +instance BesovDomain.univ : BesovDomain (Set.univ : Set V) where + convex := convex_univ + isClosed := isClosed_univ + interior_nonempty := by + rw [interior_univ] + exact Set.univ_nonempty + exists_extension p _ _ r s _ _ q _ := ⟨1, ENNReal.one_ne_top, fun f _ => + ⟨f, rfl, by rw [one_mul, modNormOn_univ]⟩⟩ + +/-- **A closed convex set with nonempty interior and the extension property is a Besov +domain.** -/ +theorem BesovDomain.of_hasBesovExtension {Ω : Set V} (hc : Convex ℝ Ω) (hcl : IsClosed Ω) + (hint : (interior Ω).Nonempty) (h : HasBesovExtension hcl.measurableSet) : BesovDomain Ω := + ⟨hc, hcl, hint, h⟩ + +/-- **Besov domains up to null sets**: a closed convex set `Ω` with nonempty interior is a Besov +domain if it agrees up to a null set with a set `U` with the extension property +(`Rd.HasBesovExtension.congr_set`). -/ +theorem BesovDomain.of_ae_eq {Ω U : Set V} (hc : Convex ℝ Ω) (hcl : IsClosed Ω) + (hint : (interior Ω).Nonempty) {hU : MeasurableSet U} (h : HasBesovExtension hU) + (hae : Ω =ᵐ[volume] U) : BesovDomain Ω := + of_hasBesovExtension hc hcl hint (h.congr_set hcl.measurableSet hae.symm) + +namespace BesovDomain + +variable (Ω : Set V) [BesovDomain Ω] + +/-- A Besov domain is measurable. -/ +theorem measurableSet : MeasurableSet Ω := (isClosed (Ω := Ω)).measurableSet + +/-- **A Besov domain has the extension property.** -/ +theorem hasBesovExtension : HasBesovExtension (measurableSet Ω) := + exists_extension (Ω := Ω) + +variable {Ω} in +/-- **The order of the differences on a Besov domain does not matter**: for `0 < s < r` and +`s < r'` there is `C < ∞` with `N_Ω(f; r') ≤ C N_Ω(f; r)` whenever `N_Ω(f; r) < ∞`, where +`N_Ω(f; r) = ‖1_Ω f‖_p + ‖(2^(ks) ω_r(f, 2^(-k), Ω)_p)_k‖_{ℓ_q}` +(`Rd.HasBesovExtension.modNormOn_order_le`). -/ +theorem modNormOn_order_le {p : ℝ≥0∞} [Fact (1 ≤ p)] (hp : p ≠ ∞) + {r r' : ℕ} {s : ℝ} (hs : 0 < s) (hsr : s < r) (hsr' : s < r') {q : ℝ≥0∞} (hq : 1 ≤ q) : + ∃ C : ℝ≥0∞, C ≠ ∞ ∧ ∀ f : Lp ℂ p (volume : Measure V), + modNormOn (measurableSet Ω) r s q f < ∞ → + modNormOn (measurableSet Ω) r' s q f ≤ C * modNormOn (measurableSet Ω) r s q f := + (hasBesovExtension Ω).modNormOn_order_le hp hs hsr hsr' hq + +end BesovDomain + +namespace CutoffDiffeo + +variable {Ω : Set V} [hB : BesovDomain Ω] (T : CutoffDiffeo Ω) {p : ℝ≥0∞} [Fact (1 ≤ p)] + (hp : p ≠ ∞) + +/-- **`T` depends only on the values on `Ω`**: if `F = f` almost everywhere on `Ω`, then +`T F = T f` in `L_p`. -/ +theorem applyLp_eq_of_indicatorLp_eq {F f : Lp ℂ p (volume : Measure V)} + (hFf : indicatorLp (BesovDomain.measurableSet Ω) F = + indicatorLp (BesovDomain.measurableSet Ω) f) : + T.applyLp hB.convex hB.interior_nonempty (BesovDomain.measurableSet Ω) hp F = + T.applyLp hB.convex hB.interior_nonempty (BesovDomain.measurableSet Ω) hp f := by + have hae : ∀ᵐ y ∂volume, y ∈ Ω → F y = f y := by + filter_upwards [indicatorLp_apply_ae (BesovDomain.measurableSet Ω) F, + indicatorLp_apply_ae (BesovDomain.measurableSet Ω) f] with y h1 h2 hy + rw [← Set.indicator_of_mem hy (F : V → ℂ), ← Set.indicator_of_mem hy (f : V → ℂ), ← h1, ← h2, + hFf] + refine Lp.ext ?_ + filter_upwards [T.applyLp_ae hB.convex hB.interior_nonempty (BesovDomain.measurableSet Ω) hp F, + T.applyLp_ae hB.convex hB.interior_nonempty (BesovDomain.measurableSet Ω) hp f, + T.apply_ae_eq hae] with x h1 h2 h3 + rw [h1, h2, h3] + +/-- **Invariance of the intrinsic Besov quasi-norm on a Besov domain** under a smooth change of +variables with a cut-off: for `1 ≤ p < ∞`, `0 < s < r` and `1 ≤ q ≤ ∞` there is `C < ∞` with +`N_Ω(T f) ≤ C N_Ω(f)` for all `f` with `N_Ω(f) < ∞`, where +`N_Ω(f) = ‖1_Ω f‖_p + ‖(2^(ks) ω_r(f, 2^(-k), Ω)_p)_k‖_{ℓ_q}`. Extend `f` to `V` +(`Rd.BesovDomain.exists_extension`) and apply `Rd.CutoffDiffeo.modNormOn_applyLp_le`. -/ +theorem modNormOn_applyLp_le_modNormOn {r : ℕ} (hr : 1 ≤ r) {s : ℝ} (hs : 0 < s) (hsr : s < r) + {q : ℝ≥0∞} (hq : 1 ≤ q) : ∃ C : ℝ≥0∞, C ≠ ∞ ∧ ∀ f : Lp ℂ p (volume : Measure V), + modNormOn (BesovDomain.measurableSet Ω) r s q f < ∞ → + modNormOn (BesovDomain.measurableSet Ω) r s q + (T.applyLp hB.convex hB.interior_nonempty (BesovDomain.measurableSet Ω) hp f) ≤ + C * modNormOn (BesovDomain.measurableSet Ω) r s q f := by + obtain ⟨C₁, hC₁, hext⟩ := hB.exists_extension p hp r s hs hsr q hq + obtain ⟨C₂, hC₂, hT⟩ := T.modNormOn_applyLp_le hB.convex hB.interior_nonempty + (BesovDomain.measurableSet Ω) hp hr hs hsr hq + refine ⟨C₂ * C₁, ENNReal.mul_ne_top hC₂ hC₁, fun f hf => ?_⟩ + obtain ⟨F, hFf, hFle⟩ := hext f hf + rw [← T.applyLp_eq_of_indicatorLp_eq hp hFf, mul_assoc] + exact (hT F).trans (mul_le_mul' le_rfl hFle) + +end CutoffDiffeo + +end Rd diff --git a/LeanPool/FunctionSpaces/Rd/Atoms/SmoothAtoms.lean b/LeanPool/FunctionSpaces/Rd/Atoms/SmoothAtoms.lean new file mode 100644 index 0000000000..e4e1bb389d --- /dev/null +++ b/LeanPool/FunctionSpaces/Rd/Atoms/SmoothAtoms.lean @@ -0,0 +1,485 @@ +/- +Copyright (c) 2026 Mario Ullrich. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Mario Ullrich +-/ +module + +public import LeanPool.FunctionSpaces.Rd.Atoms.AtomAnalysis +public import LeanPool.FunctionSpaces.Rd.Differences.ConvexDifferences +public import Mathlib.Analysis.Calculus.ContDiff.Convolution + +/- +Modified for Lean Pool: module names and imports adapted. +-/ + +/-! +# Smooth atoms + +A **smooth atom on `Ω`** of level `j` and order `K` (`Rd.IsSmoothAtom`) vanishes outside +`B(c, d 2^(-j))`, is of class `C^K` within `Ω`, and satisfies `‖D^l a‖ ≤ A 2^(jl)` within `Ω` for +`l ≤ K` (Triebel's `K`-atoms, Schneider–Vybíral, Definition 1.3, on a set). On a convex set `Ω` +with nonempty interior, smooth atoms of order `K` are regular atoms on `Ω` of order and exponent +`r` for every `1 ≤ r ≤ K` (`Rd.isRegularAtomOn_of_isSmoothAtom`), by the bound of differences +through derivatives within `Ω` (`Rd.norm_higherDiff_le_of_iteratedFDerivWithin`). + +**The cell atoms are smooth atoms of every order** (`Rd.LocalMeansBump.isSmoothAtom_cellAtom`). +Derivatives fall on the kernel: for a smooth kernel `K` with compact support and a locally +integrable `g`, `D^l (K ⋆ g)(x)(v_1, …, v_l) = ((D^l K)(v_1, …, v_l) ⋆ g)(x)` +(`Rd.iteratedFDeriv_conv_apply`, from Mathlib's `HasCompactSupport.hasFDerivAt_convolution_left`). +The dual kernels are dilations, `‖D^l η_j‖ ≤ A 2^(j(n+l))` (`Rd.norm_iteratedFDeriv_dilate_le`), +with the explicit constant `A = 2 ∑_{l ≤ K} sup ‖D^l m‖` of the moment kernel `m` +(`Rd.LocalMeansBump.dualDerivConst`, `Rd.LocalMeansBump.norm_iteratedFDeriv_dual_le`), and the +cell coefficients cancel the factor `2^(jn)` as for the atoms themselves +(`Rd.enorm_inv_cellCoef_mul_conv_le`). The standard bump `Rd.LocalMeansBump.std`, the normalised +smooth bump of radius `1`, has `L_1` norm `1` (`Rd.LocalMeansBump.eLpNorm_std_one`). +-/ + +@[expose] public section + +open MeasureTheory Filter Topology Module Metric Set +open scoped ENNReal + +open ENNReal (lqNorm dyadicWeight) + +namespace Rd + +variable {V : Type*} [NormedAddCommGroup V] [InnerProductSpace ℝ V] [FiniteDimensional ℝ V] + [MeasurableSpace V] [BorelSpace V] + +/-! ### Derivatives of convolutions -/ + +omit [InnerProductSpace ℝ V] [FiniteDimensional ℝ V] [BorelSpace V] in +/-- The convolution of complex functions, with the multiplication of `ℂ` as a real bilinear map. -/ +theorem conv_eq_convolution_mul_real (K g : V → ℂ) (μ : Measure V) : + conv K g μ = MeasureTheory.convolution K g (ContinuousLinearMap.mul ℝ ℂ) μ := by + funext x + rw [conv_apply, convolution_def] + rfl + +/-- The convolution with a smooth kernel of compact support is smooth. -/ +theorem contDiff_conv {K g : V → ℂ} (hK : ContDiff ℝ ((⊤ : ℕ∞) : WithTop ℕ∞) K) + (hKs : HasCompactSupport K) (hg : LocallyIntegrable g volume) : + ContDiff ℝ ((⊤ : ℕ∞) : WithTop ℕ∞) (conv K g volume) := by + rw [conv_eq_convolution_mul_real] + exact hKs.contDiff_convolution_left _ hK hg + +/-- **Directional derivatives of a convolution**: for a `C^1` kernel `K` of compact support and a +locally integrable `g`, `D_v (K ⋆ g)(x) = ((D_v K) ⋆ g)(x)`. -/ +theorem fderiv_conv_apply {K g : V → ℂ} (hK : ContDiff ℝ 1 K) (hKs : HasCompactSupport K) + (hg : LocallyIntegrable g volume) (x v : V) : + fderiv ℝ (conv K g volume) x v = conv (fun y => fderiv ℝ K y v) g volume x := by + rw [conv_eq_convolution_mul_real, (hKs.hasFDerivAt_convolution_left _ hK hg x).fderiv, + conv_eq_convolution_mul_real, convolution_def, convolution_def, + ContinuousLinearMap.integral_apply ((hKs.fderiv ℝ).convolutionExists_left + ((ContinuousLinearMap.mul ℝ ℂ).precompL V) (hK.continuous_fderiv one_ne_zero) hg x)] + rfl + +/-- **Iterated derivatives of a convolution**: for a smooth kernel `K` of compact support and a +locally integrable `g`, `D^n (K ⋆ g)(x)(v) = ((D^n K)(·)(v) ⋆ g)(x)`. -/ +theorem iteratedFDeriv_conv_apply {K g : V → ℂ} (hK : ContDiff ℝ ((⊤ : ℕ∞) : WithTop ℕ∞) K) + (hKs : HasCompactSupport K) (hg : LocallyIntegrable g volume) (n : ℕ) (x : V) + (v : Fin n → V) : + iteratedFDeriv ℝ n (conv K g volume) x v = + conv (fun y => iteratedFDeriv ℝ n K y v) g volume x := by + induction n generalizing x with + | zero => simp [iteratedFDeriv_zero_apply, conv_apply] + | succ n ih => + have hF := contDiff_conv hK hKs hg + rw [DifferentiableAt.iteratedFDeriv_succ_apply_left' + ((hF.differentiable_iteratedFDeriv (by exact_mod_cast WithTop.coe_lt_top _)) x)] + have hfun : (fun y => iteratedFDeriv ℝ n (conv K g volume) y (Fin.tail v)) = + conv (fun z => iteratedFDeriv ℝ n K z (Fin.tail v)) g volume := + funext fun y => ih y (Fin.tail v) + have hKn : ContDiff ℝ ((⊤ : ℕ∞) : WithTop ℕ∞) fun z => iteratedFDeriv ℝ n K z (Fin.tail v) := + (ContinuousMultilinearMap.apply ℝ (fun _ : Fin n => V) ℂ (Fin.tail v)).contDiff.comp + (hK.iteratedFDeriv_right (by simp)) + have hKns : HasCompactSupport fun z => iteratedFDeriv ℝ n K z (Fin.tail v) := + HasCompactSupport.comp_left + (g := fun M : ContinuousMultilinearMap ℝ (fun _ : Fin n => V) ℂ => M (Fin.tail v)) + (hKs.iteratedFDeriv n) (zero_apply _) + rw [hfun, fderiv_conv_apply (hKn.of_le (by exact_mod_cast le_top)) hKns hg] + congr 1 + funext y + rw [DifferentiableAt.iteratedFDeriv_succ_apply_left' + ((hK.differentiable_iteratedFDeriv (by exact_mod_cast WithTop.coe_lt_top _)) y)] + +/-- **Bounds for the derivatives of a convolution**: if `‖D^n K‖ ≤ M` and `K = 0` outside +`B̄(0, ρ)`, the derivative of order `n` of `c (K ⋆ g)` is bounded through the convolutions with the +directional derivatives `(D^n K)(·)(v)`, which satisfy `|(D^n K)(·)(v)| ≤ M ∏ ‖v_i‖`. -/ +theorem norm_iteratedFDeriv_const_mul_conv_le {K g : V → ℂ} + (hK : ContDiff ℝ ((⊤ : ℕ∞) : WithTop ℕ∞) K) (hKs : HasCompactSupport K) + (hg : LocallyIntegrable g volume) (c : ℂ) (n : ℕ) (x : V) {B : ℝ} (hB : 0 ≤ B) + (hbound : ∀ v : Fin n → V, ‖c * conv (fun y => iteratedFDeriv ℝ n K y v) g volume x‖ ≤ + B * ∏ i, ‖v i‖) : + ‖iteratedFDeriv ℝ n (fun z => c * conv K g volume z) x‖ ≤ B := by + have hF := contDiff_conv hK hKs hg + rw [show (fun z => c * conv K g volume z) = c • conv K g volume from rfl, + iteratedFDeriv_const_smul_apply ((hF.of_le (by exact_mod_cast le_top)).contDiffAt)] + refine ContinuousMultilinearMap.opNorm_le_bound hB fun v => ?_ + rw [smul_apply, iteratedFDeriv_conv_apply hK hKs hg, smul_eq_mul] + exact hbound v + +/-! ### Derivatives of dilations -/ + +omit [FiniteDimensional ℝ V] [MeasurableSpace V] [BorelSpace V] in +/-- Dilations of smooth functions are smooth. -/ +theorem contDiff_dilate {Φ : V → ℂ} {n : WithTop ℕ∞} (hΦ : ContDiff ℝ n Φ) (c : ℝ) : + ContDiff ℝ n (dilate c Φ) := + contDiff_const.mul (hΦ.comp (contDiff_const_smul c)) + +/-- `2^(jn)` as an extended real is the dyadic weight `2^(jn)`, since `2^(jn) = (2^j)^n` +(`ENNReal.ofReal_two_pow_pow`). -/ +theorem ofReal_two_pow_mul (j n : ℕ) : + ENNReal.ofReal (2 ^ (j * n)) = dyadicWeight n j := by + rw [pow_mul, ENNReal.ofReal_two_pow_pow] + +omit [FiniteDimensional ℝ V] [MeasurableSpace V] [BorelSpace V] in +/-- **Derivatives of a dilation**: `‖D^l (Φ_c)(x)‖ ≤ c^(n+l) ‖D^l Φ(c x)‖` for `c ≥ 0`, since +`Φ_c = c^n Φ(c ·)`. -/ +theorem norm_iteratedFDeriv_dilate_le {Φ : V → ℂ} (hΦ : ContDiff ℝ ((⊤ : ℕ∞) : WithTop ℕ∞) Φ) + {c : ℝ} (hc : 0 ≤ c) (l : ℕ) (x : V) : + ‖iteratedFDeriv ℝ l (dilate c Φ) x‖ ≤ + c ^ (finrank ℝ V + l) * ‖iteratedFDeriv ℝ l Φ (c • x)‖ := by + set L : V →L[ℝ] V := c • ContinuousLinearMap.id ℝ V + have hL : ‖L‖ ≤ c := by + refine (norm_smul_le c (ContinuousLinearMap.id ℝ V)).trans ?_ + rw [Real.norm_of_nonneg hc] + exact mul_le_of_le_one_right hc ContinuousLinearMap.norm_id_le + have hd : dilate c Φ = ((c ^ finrank ℝ V : ℝ) : ℂ) • (Φ ∘ L) := by + funext y + simp [dilate, L] + rw [hd, iteratedFDeriv_const_smul_apply ((hΦ.comp L.contDiff).of_le + (by exact_mod_cast le_top)).contDiffAt, norm_smul, + L.iteratedFDeriv_comp_right hΦ x (by exact_mod_cast le_top)] + calc ‖((c ^ finrank ℝ V : ℝ) : ℂ)‖ * + ‖(iteratedFDeriv ℝ l Φ (L x)).compContinuousLinearMap fun _ => L‖ + ≤ c ^ finrank ℝ V * (‖iteratedFDeriv ℝ l Φ (L x)‖ * ∏ _i : Fin l, ‖L‖) := by + rw [Complex.norm_real, Real.norm_of_nonneg (by positivity)] + exact mul_le_mul_of_nonneg_left + (ContinuousMultilinearMap.norm_compContinuousLinearMap_le _ _) (by positivity) + _ ≤ c ^ finrank ℝ V * (‖iteratedFDeriv ℝ l Φ (L x)‖ * c ^ l) := by + rw [Finset.prod_const, Finset.card_univ, Fintype.card_fin] + gcongr + _ = c ^ (finrank ℝ V + l) * ‖iteratedFDeriv ℝ l Φ (c • x)‖ := by + simp only [L, smul_apply, ContinuousLinearMap.id_apply] + ring + +namespace LocalMeansBump + +variable (b : LocalMeansBump V) + +/-- The dilated moment kernels are smooth. -/ +theorem contDiff_scaled (L j : ℕ) : ContDiff ℝ ((⊤ : ℕ∞) : WithTop ℕ∞) (b.scaled L j) := by + rw [scaled] + exact contDiff_dilate (b.contDiff_momentKernel L) _ + +/-- The dual kernels are smooth. -/ +theorem contDiff_dual (L j : ℕ) : ContDiff ℝ ((⊤ : ℕ∞) : WithTop ℕ∞) (b.dual L j) := by + cases j with + | zero => exact b.contDiff_scaled L 0 + | succ j => exact (b.contDiff_scaled L (j + 1)).add (b.contDiff_scaled L j) + +/-- The constant `A = 2 ∑_{l ≤ K} sup ‖D^l m‖` of the derivatives of the dual kernels, where the +suprema of the derivatives of the moment kernel `m` are its Schwartz seminorms. -/ +noncomputable def dualDerivConst (L K : ℕ) : ℝ := + 2 * ∑ l ∈ Finset.range (K + 1), SchwartzMap.seminorm ℝ 0 l (b.momentSchwartz L) + +/-- The constant of the derivatives of the dual kernels is nonnegative. -/ +theorem dualDerivConst_nonneg (L K : ℕ) : 0 ≤ b.dualDerivConst L K := + mul_nonneg zero_le_two (Finset.sum_nonneg fun _ _ => apply_nonneg _ _) + +/-- The derivatives of order `l ≤ K` of the moment kernel `m` are bounded by the sum of the +suprema `∑_{i ≤ K} sup ‖D^i m‖`, its Schwartz seminorms. -/ +theorem norm_iteratedFDeriv_momentKernel_le (L K : ℕ) {l : ℕ} (hl : l ≤ K) (x : V) : + ‖iteratedFDeriv ℝ l (momentKernel b.toFun L) x‖ ≤ + ∑ i ∈ Finset.range (K + 1), SchwartzMap.seminorm ℝ 0 i (b.momentSchwartz L) := + (SchwartzMap.norm_iteratedFDeriv_le_seminorm ℝ (b.momentSchwartz L) l x).trans + (Finset.single_le_sum (f := fun i => SchwartzMap.seminorm ℝ 0 i (b.momentSchwartz L)) + (fun _ _ => apply_nonneg _ _) (Finset.mem_range.2 (Nat.lt_succ_of_le hl))) + +/-- **Derivatives of the dual kernels**: `‖D^l η_j‖ ≤ A 2^(j(n+l))` for `l ≤ K` and every level +`j`, with the explicit constant `A = Rd.LocalMeansBump.dualDerivConst L K`. -/ +theorem norm_iteratedFDeriv_dual_le (L K : ℕ) {l : ℕ} (hl : l ≤ K) (j : ℕ) (y : V) : + ‖iteratedFDeriv ℝ l (b.dual L j) y‖ ≤ + b.dualDerivConst L K * 2 ^ (j * (finrank ℝ V + l)) := by + set C := ∑ i ∈ Finset.range (K + 1), SchwartzMap.seminorm ℝ 0 i (b.momentSchwartz L) + have hs : ∀ j y, ‖iteratedFDeriv ℝ l (b.scaled L j) y‖ ≤ + C * 2 ^ (j * (finrank ℝ V + l)) := fun j y => by + refine (norm_iteratedFDeriv_dilate_le (b.contDiff_momentKernel L) (by positivity) l y).trans ?_ + rw [mul_comm C, ← pow_mul] + exact mul_le_mul_of_nonneg_left (b.norm_iteratedFDeriv_momentKernel_le L K hl _) + (by positivity) + have hC : b.dualDerivConst L K = 2 * C := rfl + have hC0 : 0 ≤ C := (norm_nonneg _).trans (b.norm_iteratedFDeriv_momentKernel_le L K hl 0) + rw [hC] + cases j with + | zero => + have h := hs 0 y + simp only [zero_mul, pow_zero, mul_one] at h ⊢ + change ‖iteratedFDeriv ℝ l (b.scaled L 0) y‖ ≤ 2 * C + linarith + | succ j => + change ‖iteratedFDeriv ℝ l (b.scaled L (j + 1) + b.scaled L j) y‖ ≤ _ + rw [iteratedFDeriv_add_apply (i := l) + (((b.contDiff_scaled L (j + 1)).of_le (by exact_mod_cast le_top)).contDiffAt) + (((b.contDiff_scaled L j).of_le (by exact_mod_cast le_top)).contDiffAt)] + refine (norm_add_le _ _).trans ?_ + have h1 := hs (j + 1) y + have h2 := hs j y + have hmono : (2 : ℝ) ^ (j * (finrank ℝ V + l)) ≤ 2 ^ ((j + 1) * (finrank ℝ V + l)) := + pow_le_pow_right₀ one_le_two (Nat.mul_le_mul_right _ (Nat.le_succ j)) + nlinarith + +/-- **Derivatives of the dual kernels**: for every order `K` there is `A` with +`‖D^l η_j‖ ≤ A 2^(j(n+l))` for `l ≤ K` and every level `j`. -/ +theorem exists_iteratedFDeriv_dual_bound (L K : ℕ) : + ∃ A : ℝ, 0 ≤ A ∧ ∀ l ≤ K, ∀ j y, + ‖iteratedFDeriv ℝ l (b.dual L j) y‖ ≤ A * 2 ^ (j * (finrank ℝ V + l)) := + ⟨b.dualDerivConst L K, b.dualDerivConst_nonneg L K, + fun _ hl j y => b.norm_iteratedFDeriv_dual_le L K hl j y⟩ + +end LocalMeansBump + +/-! ### Smooth atoms -/ + +/-- A **smooth atom on `Ω`** of level `j` and order `K` with centre `c`, radius factor `d` and +constant `A`: `a = 0` outside `B(c, d 2^(-j))`, `a` is of class `C^K` within `Ω`, and +`‖D^l a‖ ≤ A 2^(jl)` within `Ω` for `l ≤ K`. -/ +structure IsSmoothAtom (Ω : Set V) (K : ℕ) (d A : ℝ) (j : ℕ) (c : V) (a : V → ℂ) : Prop where + aestronglyMeasurable : AEStronglyMeasurable a volume + eq_zero : ∀ x, d / 2 ^ j < ‖x - c‖ → a x = 0 + contDiffOn : ContDiffOn ℝ K a Ω + norm_iteratedFDerivWithin_le : + ∀ l ≤ K, ∀ y ∈ Ω, ‖iteratedFDerivWithin ℝ l a Ω y‖ ≤ A * 2 ^ (j * l) + +/-- **Differences of smooth atoms**: for a smooth atom on the convex set `Ω` of order `K ≥ r ≥ 1`, +`|Δ_h^r a(x)| ≤ 2^r r^(r+1) A min(1, (2^j ‖h‖)^r)` at the points whose steps stay in `Ω`. -/ +theorem IsSmoothAtom.enorm_higherDiff_le {Ω : Set V} (hΩ : Convex ℝ Ω) + (hint : (interior Ω).Nonempty) {K : ℕ} {d A : ℝ} (hA : 0 ≤ A) {j : ℕ} {c : V} {a : V → ℂ} + (ha : IsSmoothAtom Ω K d A j c a) {r : ℕ} (hr : 1 ≤ r) (hrK : r ≤ K) {h x : V} + (hx : x ∈ stepSet Ω r h) : + ‖(fwdDiff h)^[r] a x‖ₑ ≤ ENNReal.ofReal (2 ^ r * (r : ℝ) ^ (r + 1) * A) * + min 1 (ENNReal.ofReal (2 ^ j * ‖h‖) ^ (r : ℝ)) := by + have hK1 : (1 : ℝ) ≤ 2 ^ r * (r : ℝ) ^ (r + 1) := + one_le_mul_of_one_le_of_one_le (one_le_pow₀ one_le_two) + (one_le_pow₀ (by exact_mod_cast hr)) + -- the bound through the derivatives + have h1 : ‖(fwdDiff h)^[r] a x‖ ≤ 2 ^ r * (r : ℝ) ^ (r + 1) * A * (2 ^ j * ‖h‖) ^ r := by + have hC : ∀ i ≤ r, ∀ y ∈ Ω, ‖iteratedFDerivWithin ℝ i a Ω y‖ ≤ A * 2 ^ (j * r) := + fun i hi y hy => (ha.norm_iteratedFDerivWithin_le i (hi.trans hrK) y hy).trans + (mul_le_mul_of_nonneg_left (pow_le_pow_right₀ one_le_two (Nat.mul_le_mul_left j hi)) hA) + refine (norm_higherDiff_le_of_iteratedFDerivWithin hΩ hint hr + (ha.contDiffOn.of_le (by exact_mod_cast hrK)) hC hx).trans_eq ?_ + rw [mul_pow, pow_mul] + ring + -- the bound through the values + have h2 : ‖(fwdDiff h)^[r] a x‖ₑ ≤ ENNReal.ofReal (2 ^ r * A) := by + rw [ENNReal.ofReal_mul (by positivity), ENNReal.ofReal_pow zero_le_two, ENNReal.ofReal_ofNat] + refine enorm_higherDiff_le_of_bound_steps fun l hl => ?_ + have hy := ha.norm_iteratedFDerivWithin_le 0 (Nat.zero_le K) _ (hx l hl) + rw [← ofReal_norm] + exact ENNReal.ofReal_le_ofReal (by simpa [norm_iteratedFDerivWithin_zero] using hy) + rcases le_total 1 (ENNReal.ofReal (2 ^ j * ‖h‖) ^ (r : ℝ)) with hmin | hmin + · rw [min_eq_left hmin, mul_one] + refine h2.trans (ENNReal.ofReal_le_ofReal ?_) + calc 2 ^ r * A = 1 * (2 ^ r * A) := (one_mul _).symm + _ ≤ (r : ℝ) ^ (r + 1) * (2 ^ r * A) := + mul_le_mul_of_nonneg_right (one_le_pow₀ (by exact_mod_cast hr)) (by positivity) + _ = 2 ^ r * (r : ℝ) ^ (r + 1) * A := by ring + · rw [min_eq_right hmin, ← ofReal_norm, + ENNReal.ofReal_rpow_of_nonneg (by positivity) (Nat.cast_nonneg r), + Real.rpow_natCast, ← ENNReal.ofReal_mul (by positivity)] + exact ENNReal.ofReal_le_ofReal h1 + +/-- **Differences of an atom vanish far from its centre**: for a smooth atom `a` with centre `c` +and radius factor `d` at level `j`, a step `h` with `‖h‖ ≤ ρ` and a point `x` with +`d 2^(-j) + r ρ < ‖x - c‖`, `Δ^r_h a(x) = 0`: every point `x + l h`, `l ≤ r`, has distance more +than `d 2^(-j)` from `c`, where `a` vanishes. -/ +theorem IsSmoothAtom.higherDiff_eq_zero_of_lt {Ω : Set V} {K : ℕ} {d A : ℝ} {j : ℕ} {c : V} + {a : V → ℂ} (ha : IsSmoothAtom Ω K d A j c a) (r : ℕ) {ρ : ℝ} {h x : V} (hh : ‖h‖ ≤ ρ) + (hx : d / 2 ^ j + r * ρ < ‖x - c‖) : + (fwdDiff h)^[r] a x = 0 := by + rw [higherDiff_apply] + refine Finset.sum_eq_zero fun l hl => ?_ + have hl' : (l : ℝ) ≤ r := by exact_mod_cast Nat.lt_succ_iff.1 (Finset.mem_range.1 hl) + have h2 : ‖(l : ℝ) • h‖ ≤ r * ρ := by + rw [norm_smul, Real.norm_of_nonneg (Nat.cast_nonneg l)] + exact mul_le_mul hl' hh (norm_nonneg _) (Nat.cast_nonneg r) + have h3 : ‖x - c‖ - ‖(l : ℝ) • h‖ ≤ ‖x + (l : ℝ) • h - c‖ := by + have hn := norm_sub_norm_le (x - c) (-((l : ℝ) • h)) + rwa [norm_neg, sub_neg_eq_add, sub_add_eq_add_sub] at hn + rw [ha.eq_zero _ (by linarith), mul_zero] + +/-- **Smooth atoms are regular atoms**: on a measurable convex set `Ω` with nonempty interior, a +smooth atom of order `K` is a regular atom on `Ω` of order and exponent `r` for `1 ≤ r ≤ K`, with +the constant `2^r r^(r+1) A ((r + 1) d^n |B_1|)^(1/p)`. -/ +theorem isRegularAtomOn_of_isSmoothAtom {Ω : Set V} (hΩ : Convex ℝ Ω) (hΩm : MeasurableSet Ω) + (hint : (interior Ω).Nonempty) {p : ℝ≥0∞} {K r : ℕ} (hr : 1 ≤ r) (hrK : r ≤ K) {d A : ℝ} + (hd : 0 ≤ d) (hA : 0 ≤ A) {j : ℕ} {c : V} {a : V → ℂ} (ha : IsSmoothAtom Ω K d A j c a) : + IsRegularAtomOn Ω p r r d (ENNReal.ofReal (2 ^ r * (r : ℝ) ^ (r + 1) * A) * + (((r + 1 : ℕ) : ℝ≥0∞) * (ENNReal.ofReal (d ^ finrank ℝ V) * volume (ball (0 : V) 1))) ^ + (1 / p.toReal)) j c a := by + refine isRegularAtomOn_of_pointwise hd hΩm ha.aestronglyMeasurable ha.eq_zero (fun x hx => ?_) + (fun h x hx => ha.enorm_higherDiff_le hΩ hint hA hr hrK hx) + have h0 := ha.norm_iteratedFDerivWithin_le 0 (Nat.zero_le K) x hx + rw [norm_iteratedFDerivWithin_zero, mul_zero, pow_zero, mul_one] at h0 + rw [← ofReal_norm] + refine ENNReal.ofReal_le_ofReal (h0.trans ?_) + have hK1 : (1 : ℝ) ≤ 2 ^ r * (r : ℝ) ^ (r + 1) := + one_le_mul_of_one_le_of_one_le (one_le_pow₀ one_le_two) (one_le_pow₀ (by exact_mod_cast hr)) + nlinarith + +/-- **Smooth atoms on `V` restrict to every set** of unique differentiability: the derivatives +within `Ω` are the derivatives. -/ +theorem IsSmoothAtom.of_univ {Ω : Set V} (hΩ : UniqueDiffOn ℝ Ω) {K : ℕ} {d A : ℝ} {j : ℕ} + {c : V} {a : V → ℂ} (ha : IsSmoothAtom Set.univ K d A j c a) : IsSmoothAtom Ω K d A j c a where + aestronglyMeasurable := ha.aestronglyMeasurable + eq_zero := ha.eq_zero + contDiffOn := ha.contDiffOn.mono (Set.subset_univ _) + norm_iteratedFDerivWithin_le l hl y hy := by + have hc : ContDiff ℝ K a := contDiffOn_univ.1 ha.contDiffOn + rw [iteratedFDerivWithin_eq_iteratedFDeriv hΩ (hc.contDiffAt.of_le (by exact_mod_cast hl)) hy, + ← iteratedFDerivWithin_univ] + exact ha.norm_iteratedFDerivWithin_le l hl y (Set.mem_univ y) + +/-- The zero function is a smooth atom. -/ +theorem isSmoothAtom_zero (Ω : Set V) (K : ℕ) (d : ℝ) {A : ℝ} (hA : 0 ≤ A) (j : ℕ) (c : V) : + IsSmoothAtom Ω K d A j c 0 where + aestronglyMeasurable := aestronglyMeasurable_zero + eq_zero _ _ := rfl + contDiffOn := contDiffOn_const + norm_iteratedFDerivWithin_le l _ y _ := by + rw [iteratedFDerivWithin_zero, Pi.zero_apply, norm_zero] + positivity + +/-! ### Smooth cell atoms -/ + +/-- **Derivatives of cell atoms**: if `K` is smooth, vanishes outside `B̄(0, ρ 2^(-j))` and +`‖D^l K‖ ≤ A 2^(j(n+l))`, then `‖D^l a_{j,m}‖ ≤ A 2^(jl) (ρ^n |B_1|)^(1-1/p)`. -/ +theorem norm_iteratedFDeriv_cellAtom_le {p : ℝ≥0∞} (hp1 : 1 ≤ p) {K g : V → ℂ} + (hK : ContDiff ℝ ((⊤ : ℕ∞) : WithTop ℕ∞) K) (hg : MemLp g p volume) {j : ℕ} + (m : Fin (finrank ℝ V) → ℤ) {ρ : ℝ} (hρ : 0 ≤ ρ) (hKρ : ∀ y, ρ / 2 ^ j < ‖y‖ → K y = 0) + {l : ℕ} {A : ℝ} (hA : 0 ≤ A) + (hKl : ∀ y, ‖iteratedFDeriv ℝ l K y‖ ≤ A * 2 ^ (j * (finrank ℝ V + l))) (x : V) : + ‖iteratedFDeriv ℝ l (cellAtom p K j g m) x‖ ≤ A * 2 ^ (j * l) * + ((ENNReal.ofReal (ρ ^ finrank ℝ V) * volume (ball (0 : V) 1)) ^ + (1 - 1 / p.toReal)).toReal := by + set X := (ENNReal.ofReal (ρ ^ finrank ℝ V) * volume (ball (0 : V) 1)) ^ (1 - 1 / p.toReal) + have hX : X ≠ ∞ := ENNReal.rpow_ne_top_of_nonneg (one_sub_one_div_toReal_nonneg hp1) + (ENNReal.mul_ne_top ENNReal.ofReal_ne_top measure_ball_lt_top.ne) + have hKs : HasCompactSupport K := HasCompactSupport.intro (isCompact_closedBall 0 (ρ / 2 ^ j)) + fun y hy => hKρ y (by simpa [mem_closedBall, dist_zero_right, not_le] using hy) + have hgl : LocallyIntegrable ((cell j m).indicator g) volume := + (hg.indicator (measurableSet_cell j m).nullMeasurableSet).locallyIntegrable hp1 + refine norm_iteratedFDeriv_const_mul_conv_le hK hKs hgl _ l x (by positivity) fun v => ?_ + set K' : V → ℂ := fun y => iteratedFDeriv ℝ l K y v + have hK'ρ : ∀ y, ρ / 2 ^ j < ‖y‖ → K' y = 0 := fun y hy => by + have hy' : y ∉ tsupport (iteratedFDeriv ℝ l K) := fun hmem => by + have hsub : tsupport K ⊆ closedBall 0 (ρ / 2 ^ j) := + closure_minimal (fun z hz => by + by_contra hz' + rw [mem_closedBall, dist_zero_right, not_le] at hz' + exact hz (hKρ z hz')) isClosed_closedBall + have := hsub (tsupport_iteratedFDeriv_subset l hmem) + rw [mem_closedBall, dist_zero_right] at this + linarith + simp [K', image_eq_zero_of_notMem_tsupport hy'] + have hK' : ∀ y, ‖K' y‖ₑ ≤ ENNReal.ofReal (A * 2 ^ (j * l) * ∏ i, ‖v i‖) * + dyadicWeight (finrank ℝ V) j := fun y => by + rw [← ofReal_norm, ← ofReal_two_pow_mul, ← ENNReal.ofReal_mul (by positivity)] + refine ENNReal.ofReal_le_ofReal (((iteratedFDeriv ℝ l K y).le_opNorm v).trans ?_) + calc ‖iteratedFDeriv ℝ l K y‖ * ∏ i, ‖v i‖ + ≤ A * 2 ^ (j * (finrank ℝ V + l)) * ∏ i, ‖v i‖ := + mul_le_mul_of_nonneg_right (hKl y) (by positivity) + _ = A * 2 ^ (j * l) * (∏ i, ‖v i‖) * 2 ^ (j * finrank ℝ V) := by + rw [Nat.mul_add, pow_add] + ring + have h := enorm_inv_cellCoef_mul_conv_le hp1 hg m hK' hρ hK'ρ x + have h' := ENNReal.toReal_mono (ENNReal.mul_ne_top ENNReal.ofReal_ne_top hX) h + rw [toReal_eNorm, ENNReal.toReal_mul, ENNReal.toReal_ofReal (by positivity)] at h' + calc ‖(cellCoef p j g m)⁻¹ * conv K' ((cell j m).indicator g) volume x‖ + ≤ A * 2 ^ (j * l) * (∏ i, ‖v i‖) * X.toReal := h' + _ = A * 2 ^ (j * l) * X.toReal * ∏ i, ‖v i‖ := by ring + +namespace LocalMeansBump + +variable (b : LocalMeansBump V) + +/-- **Cell atoms of the dual kernels are smooth atoms of every order**: every cell atom of +`η_j ⋆ g`, `g ∈ L_p`, is a smooth atom on `V` of order `K`, radius factor `2LR + n` and constant +`A ((2LR)^n |B_1|)^(1-1/p)` with `A = Rd.LocalMeansBump.dualDerivConst L K`. -/ +theorem isSmoothAtom_cellAtom {p : ℝ≥0∞} (hp1 : 1 ≤ p) (L K j : ℕ) {g : V → ℂ} + (hg : MemLp g p volume) (m : Fin (finrank ℝ V) → ℤ) : + IsSmoothAtom Set.univ K (2 * L * b.radius + finrank ℝ V) + (b.dualDerivConst L K * ((ENNReal.ofReal ((2 * L * b.radius) ^ finrank ℝ V) * + volume (ball (0 : V) 1)) ^ (1 - 1 / p.toReal)).toReal) j (cellCenter j m) + (cellAtom p (b.dual L j) j g m) := by + have hρ : 0 ≤ 2 * (L : ℝ) * b.radius := + mul_nonneg (mul_nonneg zero_le_two (Nat.cast_nonneg L)) b.radius_nonneg + have hKρ : ∀ y, 2 * L * b.radius / 2 ^ j < ‖y‖ → b.dual L j y = 0 := fun y hy => + b.dual_eq_zero_of_lt L j hy + have hKs := b.hasCompactSupport_dual L j + have hgl : LocallyIntegrable ((cell j m).indicator g) volume := + (hg.indicator (measurableSet_cell j m).nullMeasurableSet).locallyIntegrable hp1 + have hsmooth : ContDiff ℝ ((⊤ : ℕ∞) : WithTop ℕ∞) (cellAtom p (b.dual L j) j g m) := by + have := (contDiff_conv (b.contDiff_dual L j) hKs hgl).const_smul (cellCoef p j g m)⁻¹ + exact this + refine ⟨hsmooth.continuous.aestronglyMeasurable, fun x hx => cellAtom_eq_zero hKρ m hx, + (hsmooth.of_le (by exact_mod_cast le_top)).contDiffOn, fun l hl y _ => ?_⟩ + rw [iteratedFDerivWithin_univ] + refine (norm_iteratedFDeriv_cellAtom_le hp1 (b.contDiff_dual L j) hg m hρ hKρ + (b.dualDerivConst_nonneg L K) (fun z => b.norm_iteratedFDeriv_dual_le L K hl j z) y).trans_eq ?_ + ring + +/-- **Cell atoms of the dual kernels are smooth atoms of every order**: for every order `K` there +is `A` such that every cell atom of `η_j ⋆ g`, `g ∈ L_p`, is a smooth atom on `V` of order `K`, +radius factor `2LR + n` and constant `A`. -/ +theorem exists_isSmoothAtom_cellAtom {p : ℝ≥0∞} (hp1 : 1 ≤ p) (L K : ℕ) : + ∃ A : ℝ, 0 ≤ A ∧ ∀ (j : ℕ) {g : V → ℂ}, MemLp g p volume → ∀ m, + IsSmoothAtom Set.univ K (2 * L * b.radius + finrank ℝ V) A j (cellCenter j m) + (cellAtom p (b.dual L j) j g m) := + ⟨_, mul_nonneg (b.dualDerivConst_nonneg L K) ENNReal.toReal_nonneg, + fun j _ hg m => b.isSmoothAtom_cellAtom hp1 L K j hg m⟩ + +variable {p : ℝ≥0∞} [Fact (1 ≤ p)] + +/-- **Atomic decomposition into smooth atoms**: for every order `K` there is `A` such that for +every `F ∈ L_p` the terms of the reproducing formula are `η_j ⋆ (k_j ⋆ F) = ∑_m λ_{j,m} a_{j,m}` +with cell atoms that are smooth atoms on `V` of order `K`, radius factor `2LR + n` and +constant `A`, and `‖λ‖_{b^s_{p,q}}` is the local means quasi-norm. -/ +theorem atomic_decomposition_smooth (hp : p ≠ ∞) (L K : ℕ) : ∃ A : ℝ, 0 ≤ A ∧ + ∀ F : Lp ℂ p (volume : Measure V), + (∀ j m, IsSmoothAtom Set.univ K (2 * L * b.radius + finrank ℝ V) A j (cellCenter j m) + (cellAtom p (b.dual L j) j (b.localMean hp L j F) m)) ∧ + (∀ j, ∀ᵐ x ∂volume, convLp hp (b.integrable_dual L j) (b.localMean hp L j F) x = + ∑' m, cellCoef p j (b.localMean hp L j F) m * + cellAtom p (b.dual L j) j (b.localMean hp L j F) m x) ∧ + ∀ s q, coeffNorm p (finrank ℝ V) s q (fun j => cellCoef p j (b.localMean hp L j F)) = + b.localMeansNorm hp L s q F := by + obtain ⟨A, hA, ha⟩ := b.exists_isSmoothAtom_cellAtom (Fact.out : 1 ≤ p) L K + obtain ⟨C, -, hdec⟩ := b.atomic_decomposition hp L K + exact ⟨A, hA, fun F => ⟨fun j m => ha j (Lp.memLp _) m, (hdec F).2.1, (hdec F).2.2⟩⟩ + +end LocalMeansBump + +/-- The smooth bump around `0` with radii `1/2` and `1` (`Rd.centeredBumpBase` for `R = 1`). -/ +noncomputable def stdBumpBase : ContDiffBump (0 : V) := centeredBumpBase one_pos + +/-- The **standard bump for local means**: the normalised `ContDiffBump` around `0` with outer +radius `1`, the centred bump `Rd.LocalMeansBump.centered` of radius `1`. -/ +noncomputable def LocalMeansBump.std : LocalMeansBump V := LocalMeansBump.centered one_pos + +/-- The standard bump `Rd.LocalMeansBump.std`, a nonnegative function of integral `1`, has `L_1` +norm `1`. -/ +theorem LocalMeansBump.eLpNorm_std_one : + eLpNorm (LocalMeansBump.std (V := V)).toFun 1 volume = 1 := by + rw [eLpNorm_one_eq_lintegral_eNorm (LocalMeansBump.std (V := V)).integrable.aestronglyMeasurable, + ← ofReal_integral_norm_eq_lintegral_eNorm (LocalMeansBump.std (V := V)).integrable] + have hn : ∀ z, ‖(LocalMeansBump.std (V := V)).toFun z‖ = + (stdBumpBase (V := V)).normed volume z := fun z => by + change ‖(((stdBumpBase (V := V)).normed volume z : ℝ) : ℂ)‖ = _ + rw [Complex.norm_real, Real.norm_of_nonneg ((stdBumpBase (V := V)).nonneg_normed z)] + simp_rw [hn, ContDiffBump.integral_normed, ENNReal.ofReal_one] + +end Rd diff --git a/LeanPool/FunctionSpaces/Rd/BesselPotentials/BesselPotentialDistributions.lean b/LeanPool/FunctionSpaces/Rd/BesselPotentials/BesselPotentialDistributions.lean new file mode 100644 index 0000000000..8b53c084c7 --- /dev/null +++ b/LeanPool/FunctionSpaces/Rd/BesselPotentials/BesselPotentialDistributions.lean @@ -0,0 +1,214 @@ +/- +Copyright (c) 2026 Mario Ullrich. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Mario Ullrich +-/ +module + +public import LeanPool.FunctionSpaces.Rd.FourierMultipliers.TriebelLizorkinMultipliers +public import LeanPool.FunctionSpaces.Rd.BesselPotentials.BesselPotentialLifting + +/- +Modified for Lean Pool: module names and imports adapted. +-/ + +/-! +# Bessel potential spaces of tempered distributions `H^{s,p} = F^s_{p,2}` + +Let `V` have dimension `n ≥ 1` and `1 < p < ∞`. A tempered distribution `u` lies in Mathlib's +Bessel potential space `H^{s,p}(V)` (`TemperedDistribution.MemSobolev s p`) iff it lies in +`F^s_{p,2}` of tempered distributions (`Rd.MemTriebelLizorkinDistr`), for every real `s` +(`Rd.memSobolev_bessel_iff_memTriebelLizorkinDistr`), with existential constants in both +directions, also for Mathlib's bundled space. + +* **`H^{s,p} ⊆ F^s_{p,2}`**: if `J_s u = h ∈ L_p`, then `u = J_{-s} h` is the Fourier multiplier + of order `-s` applied to `h ∈ L_p = F^0_{p,2}`, so `‖u‖_{F^s_{p,2}} ≤ C ‖h‖_p` + (`Rd.exists_triebelLizorkinNormDistr_le_of_besselPotential_eq`). +* **`F^s_{p,2} ⊆ H^{s,p}`**: if the blocks of `u` are `L_p` functions `g_j`, the blocks of `J_s u` + are `(J_s ψ̃_j) ⋆ g_j` (`Rd.distribBlock_besselPotential`), whose partial sums converge in `L_p` + by the synthesis bound of the Calderón–Zygmund family of the dilated Bessel kernels + (`Rd.eLpNorm_sum_conv_besselSchwartz_le`, `Rd.exists_tendsto_sum_convLp`); their limit is + `J_s u` (`Rd.eq_of_tendsto_sum_distribBlock`), so + `‖J_s u‖_p ≤ C ‖u‖_{F^s_{p,2}}` (`Rd.exists_besselPotential_eq_of_memTriebelLizorkinDistr`). +-/ + +@[expose] public section + +open MeasureTheory Filter Module +open scoped ENNReal Topology SchwartzMap FourierTransform BesselPotentialSpace +open ENNReal (lqNorm dyadicWeight) +open TemperedDistribution (besselPotential) + +namespace Rd + +variable {V : Type*} [NormedAddCommGroup V] [InnerProductSpace ℝ V] [FiniteDimensional ℝ V] + [MeasurableSpace V] [BorelSpace V] {p : ℝ≥0∞} [Fact (1 ≤ p)] + +/-! ### Synthesis sums of families in `L_p` -/ + +/-- **Convergent synthesis sums of `L_p` families**: let `1 ≤ p < ∞`, `σ` real, `g_j ∈ L_p(V)` +with `‖ x ↦ ‖(2^{jσ} |g_j(x)|)_j‖_{ℓ_2} ‖_p < ∞`, and `K_j` Schwartz kernels with +`‖∑_{j ∈ t} K_j ⋆ g_j‖_p ≤ C ‖ x ↦ ‖(1_t(j) 2^{jσ} |g_j(x)|)_j‖_{ℓ_2} ‖_p` for every finite `t` and +some finite `C`. Then the partial sums `∑_{j < J} K_j ⋆ g_j` converge in `L_p(V)` to some `h` +with `‖h‖_p ≤ C ‖ x ↦ ‖(2^{jσ} |g_j(x)|)_j‖_{ℓ_2} ‖_p`. Their differences are bounded by the +tails of the weighted family, which tend to zero +(`MeasureTheory.cauchySeq_of_edist_le_lqNorm_ite`). This is the general form of +`Rd.exists_tendsto_sum_conv_blockFun`, whose families are the blocks `ψ_j ⋆ f`. -/ +theorem exists_tendsto_sum_convLp (hp : p ≠ ∞) {σ : ℝ} {K : ℕ → 𝓢(V, ℂ)} {C : ℝ≥0∞} + (hC : C ≠ ∞) {g : ℕ → Lp ℂ p (volume : Measure V)} + (hG : eLpNorm (fun x => lqNorm 2 fun j => dyadicWeight σ j * ‖g j x‖ₑ) p volume ≠ ∞) + (hK : ∀ t : Finset ℕ, eLpNorm (fun x => ∑ j ∈ t, conv (K j) (g j) volume x) p volume ≤ + C * eLpNorm (fun x => lqNorm 2 fun j => + if j ∈ t then dyadicWeight σ j * ‖g j x‖ₑ else 0) p volume) : + ∃ h : Lp ℂ p (volume : Measure V), + Tendsto (fun J => ∑ j ∈ Finset.range J, convLp hp (K j).integrable (g j)) atTop (𝓝 h) ∧ + ‖h‖ₑ ≤ C * eLpNorm (fun x => lqNorm 2 fun j => dyadicWeight σ j * ‖g j x‖ₑ) p volume := by + have hmeas : ∀ j, AEMeasurable (fun x => dyadicWeight σ j * ‖g j x‖ₑ) volume := fun j => + (Lp.aestronglyMeasurable (g j)).eNorm.const_mul _ + have hS : CauchySeq fun J => ∑ j ∈ Finset.range J, convLp hp (K j).integrable (g j) := by + refine cauchySeq_of_edist_le_lqNorm_ite (p := p) (q := 2) hC + (zero_lt_one.trans_le Fact.out).ne' hp two_ne_zero ENNReal.ofNat_ne_top hmeas hG + fun N N' hNN' => ?_ + have hd : edist (∑ j ∈ Finset.range N', convLp hp (K j).integrable (g j)) + (∑ j ∈ Finset.range N, convLp hp (K j).integrable (g j)) = + eLpNorm (fun x => ∑ j ∈ Finset.Ico N N', conv (K j) (g j) volume x) p volume := by + rw [eDist_eq_eNorm_sub, ← Finset.sum_Ico_eq_sub _ hNN', Lp.eNorm_def] + exact eLpNorm_congr_ae (coeFn_sum_convLp_ae hp K g _) + rw [hd] + exact (hK _).trans (mul_le_mul_of_nonneg_left (eLpNorm_lqNorm_ite_mono hmeas + fun j hj => (Finset.mem_Ico.1 hj).1) (zero_le (a := C))) + obtain ⟨h, hh⟩ := cauchySeq_tendsto_of_complete hS + refine ⟨h, hh, le_of_tendsto' hh.eNorm fun J => ?_⟩ + rw [Lp.eNorm_def, eLpNorm_congr_ae (coeFn_sum_convLp_ae hp K g _)] + exact (hK _).trans + (mul_le_mul_of_nonneg_left (eLpNorm_lqNorm_ite_le hmeas) (zero_le (a := C))) + +/-! ### The blocks of a Bessel potential -/ + +/-- **The blocks of a Bessel potential**: for `1 ≤ p < ∞`, real `s` and a tempered distribution +`u` whose block `Δ_j u` is an `L_p` function `g`, the block `Δ_j(J_s u)` is the `L_p` function +`(J_s ψ̃_j) ⋆ g` (`Rd.distribBlock_fourierMultiplierCLM_eq_convLp` for the Bessel weight). -/ +theorem distribBlock_besselPotential (hp : p ≠ ∞) (s : ℝ) {u : 𝓢'(V, ℂ)} {j : ℕ} + {g : Lp ℂ p (volume : Measure V)} (hg : distribBlock j u = (g : 𝓢'(V, ℂ))) : + distribBlock j (besselPotential V ℂ s u) = + (convLp hp (besselSchwartz s (psiDualS j)).integrable g : 𝓢'(V, ℂ)) := + distribBlock_fourierMultiplierCLM_eq_convLp hp (hasTemperateGrowth_besselWeight s) hg + +/-! ### `H^{s,p} ⊆ F^s_{p,2}` -/ + +/-- **`H^{s,p} ⊆ F^s_{p,2}` for tempered distributions, with norm bound**: in dimension `n ≥ 1`, +for `1 < p < ∞` and every real `s` there is a finite constant `C` such that +`‖u‖_{F^s_{p,2}} ≤ C ‖h‖_p` for every tempered distribution `u` and `h ∈ L_p(V)` with +`J_s u = h`; the constant is existential. Here `u = J_{-s} h` (Mathlib's +`TemperedDistribution.besselPotential_neg_apply_eq_iff`) is the Fourier multiplier with the +symbol `⟨ξ⟩^{-s}` of order `-s` (`Rd.hasSymbolGrowth_besselWeight`) applied to `h`, so +`Rd.exists_triebelLizorkinNormDistr_fourierMultiplier_le` with `s = 0` and the square function +bound `‖h‖_{F^0_{p,2}} ≤ Q_{V,p} ‖h‖_p` (`Rd.triebelLizorkinNorm_zero_two_le`) apply. -/ +theorem exists_triebelLizorkinNormDistr_le_of_besselPotential_eq [Nontrivial V] (hp1 : 1 < p) + (hp : p ≠ ∞) (s : ℝ) : + ∃ C : ℝ≥0∞, C ≠ ∞ ∧ ∀ (u : 𝓢'(V, ℂ)) (h : Lp ℂ p (volume : Measure V)), + besselPotential V ℂ s u = h → triebelLizorkinNormDistr p s 2 u ≤ C * ‖h‖ₑ := by + obtain ⟨C, hC, hCu⟩ := exists_triebelLizorkinNormDistr_fourierMultiplier_le (V := V) hp1 hp + ENNReal.one_lt_two (hasSymbolGrowth_besselWeight (-s)) 0 + refine ⟨C * squareFunctionConst V p, ENNReal.mul_ne_top hC (squareFunctionConst_ne_top hp1 hp), + fun u h huh => ?_⟩ + have hu : besselPotential V ℂ (-s) (h : 𝓢'(V, ℂ)) = u := + (TemperedDistribution.besselPotential_neg_apply_eq_iff s _ _).2 huh + have hb := hCu (h : 𝓢'(V, ℂ)) + rw [zero_sub, neg_neg, triebelLizorkinNormDistr_toTemperedDistribution hp] at hb + calc triebelLizorkinNormDistr p s 2 u = triebelLizorkinNormDistr p s 2 + (TemperedDistribution.fourierMultiplierCLM ℂ (fun ξ => (besselWeight (-s) ξ : ℂ)) + (h : 𝓢'(V, ℂ))) := by rw [← hu]; rfl + _ ≤ C * triebelLizorkinNorm 0 2 h := hb + _ ≤ C * (squareFunctionConst V p * ‖h‖ₑ) := by + exact mul_le_mul_of_nonneg_left (triebelLizorkinNorm_zero_two_le hp1 hp h) + (zero_le (a := C)) + _ = C * squareFunctionConst V p * ‖h‖ₑ := (mul_assoc _ _ _).symm + +/-! ### `F^s_{p,2} ⊆ H^{s,p}` -/ + +/-- **`F^s_{p,2} ⊆ H^{s,p}` for tempered distributions, with norm bound**: in dimension `n ≥ 1`, +for `1 < p < ∞` and every real `s` there is a finite constant `C` such that for every tempered +distribution `u ∈ F^s_{p,2}` the Bessel potential `J_s u` is an `L_p` function `h` with +`‖h‖_p ≤ C ‖u‖_{F^s_{p,2}}`; the constant is existential. If the blocks of `u` are the `L_p` +functions `g_j`, the blocks of `J_s u` are `(J_s ψ̃_j) ⋆ g_j` (`Rd.distribBlock_besselPotential`); +their partial sums converge in `L_p` (`Rd.exists_tendsto_sum_convLp`, with the synthesis bound +`Rd.eLpNorm_sum_conv_besselSchwartz_le` of the Calderón–Zygmund family +`Rd.exists_isCZFamily_besselBase_psiDualBase`), and the limit is `J_s u` +(`Rd.eq_of_tendsto_sum_distribBlock`). -/ +theorem exists_besselPotential_eq_of_memTriebelLizorkinDistr [Nontrivial V] (hp1 : 1 < p) + (hp : p ≠ ∞) (s : ℝ) : + ∃ C : ℝ≥0∞, C ≠ ∞ ∧ ∀ u : 𝓢'(V, ℂ), MemTriebelLizorkinDistr p s 2 u → + ∃ h : Lp ℂ p (volume : Measure V), besselPotential V ℂ s u = h ∧ + ‖h‖ₑ ≤ C * triebelLizorkinNormDistr p s 2 u := by + obtain ⟨B, H, hB, hH, hθ⟩ := exists_isCZFamily_besselBase_psiDualBase (V := V) s + refine ⟨czConst V p B H, czConst_ne_top hp1 hp hB hH, fun u hu => ?_⟩ + obtain ⟨g, hg⟩ := hu.exists_blocks + have hnorm := triebelLizorkinNormDistr_eq (s := s) (q := 2) hg + obtain ⟨h, hlim, hh⟩ := exists_tendsto_sum_convLp hp (K := fun j => besselSchwartz s (psiDualS j)) + (czConst_ne_top hp1 hp hB hH) (hnorm ▸ hu.ne) + fun t => eLpNorm_sum_conv_besselSchwartz_le hp1 hp hθ t fun j => Lp.memLp (g j) + exact ⟨h, eq_of_tendsto_sum_distribBlock (fun j => distribBlock_besselPotential hp s (hg j)) hlim, + hnorm ▸ hh⟩ + +/-- **`F^s_{p,2} ⊆ H^{s,p}`**: in dimension `n ≥ 1`, for `1 < p < ∞` and real `s`, every tempered +distribution `u ∈ F^s_{p,2}` lies in Mathlib's Bessel potential space: `J_s u ∈ L_p(V)` +(`Rd.exists_besselPotential_eq_of_memTriebelLizorkinDistr`). -/ +theorem memSobolev_bessel_of_memTriebelLizorkinDistr [Nontrivial V] (hp1 : 1 < p) (hp : p ≠ ∞) + {s : ℝ} {u : 𝓢'(V, ℂ)} (hu : MemTriebelLizorkinDistr p s 2 u) : + TemperedDistribution.MemSobolev s p u := by + obtain ⟨C, -, hC⟩ := exists_besselPotential_eq_of_memTriebelLizorkinDistr (V := V) hp1 hp s + obtain ⟨h, hh, -⟩ := hC u hu + exact ⟨h, hh⟩ + +/-! ### `H^{s,p} = F^s_{p,2}` -/ + +/-- **`H^{s,p} = F^s_{p,2}` for every real `s`**: in dimension `n ≥ 1`, for `1 < p < ∞`, real `s` +and every tempered distribution `u` on `V`, `u` lies in Mathlib's Bessel potential space +`H^{s,p}(V)` iff it lies in `F^s_{p,2}` of tempered distributions +(`Rd.exists_triebelLizorkinNormDistr_le_of_besselPotential_eq`, +`Rd.memSobolev_bessel_of_memTriebelLizorkinDistr`). -/ +theorem memSobolev_bessel_iff_memTriebelLizorkinDistr [Nontrivial V] (hp1 : 1 < p) (hp : p ≠ ∞) + (s : ℝ) (u : 𝓢'(V, ℂ)) : + TemperedDistribution.MemSobolev s p u ↔ MemTriebelLizorkinDistr p s 2 u := by + refine ⟨fun ⟨h, hh⟩ => ?_, memSobolev_bessel_of_memTriebelLizorkinDistr hp1 hp⟩ + obtain ⟨C, hC, hCu⟩ := exists_triebelLizorkinNormDistr_le_of_besselPotential_eq (V := V) hp1 hp s + exact (hCu u h hh).trans_lt (ENNReal.mul_lt_top hC.lt_top eNorm_lt_top) + +/-- **`H^{s,p} ⊆ F^s_{p,2}` in Mathlib's bundled space**: in dimension `n ≥ 1`, for `1 < p < ∞` +and every real `s` there is a finite constant `C` with `‖F‖_{F^s_{p,2}} ≤ C ‖F‖_{H^{s,p}}` for +every element `F` of Mathlib's `H^{s,p}(V)`, as a tempered distribution; the constant is +existential (`Rd.exists_triebelLizorkinNormDistr_le_of_besselPotential_eq`, +`BesselPotentialSpace.enorm_toLp_eq`). -/ +theorem exists_triebelLizorkinNormDistr_le_besselPotentialSpace [Nontrivial V] (hp1 : 1 < p) + (hp : p ≠ ∞) (s : ℝ) : + ∃ C : ℝ≥0∞, C ≠ ∞ ∧ ∀ F : H^{s, p}(V, ℂ), + triebelLizorkinNormDistr p s 2 F.toDistr ≤ C * ‖F‖ₑ := by + obtain ⟨C, hC, hCu⟩ := exists_triebelLizorkinNormDistr_le_of_besselPotential_eq (V := V) hp1 hp s + refine ⟨C, hC, fun F => ?_⟩ + rw [← BesselPotentialSpace.enorm_toLp_eq] + exact hCu F.toDistr F.toLp F.bessel_toDistr_eq_toLp + +/-- **`F^s_{p,2} ⊆ H^{s,p}` in Mathlib's bundled space**: in dimension `n ≥ 1`, for `1 < p < ∞` +and every real `s` there is a finite constant `C` such that every tempered distribution +`u ∈ F^s_{p,2}`, as an element of Mathlib's `H^{s,p}(V)`, has +`‖u‖_{H^{s,p}} ≤ C ‖u‖_{F^s_{p,2}}`; the constant is existential. The `L_p` function of the bundled +element is the function `h` of `Rd.exists_besselPotential_eq_of_memTriebelLizorkinDistr`, since +both represent `J_s u` (`Rd.eq_of_toTemperedDistribution_eq`, +`BesselPotentialSpace.enorm_toLp_eq`). -/ +theorem exists_enorm_besselPotentialSpace_le_triebelLizorkinNormDistr [Nontrivial V] + (hp1 : 1 < p) (hp : p ≠ ∞) (s : ℝ) : + ∃ C : ℝ≥0∞, C ≠ ∞ ∧ ∀ (u : 𝓢'(V, ℂ)) (hu : MemTriebelLizorkinDistr p s 2 u), + ‖(memSobolev_bessel_of_memTriebelLizorkinDistr hp1 hp hu).toBesselPotentialSpace‖ₑ ≤ + C * triebelLizorkinNormDistr p s 2 u := by + obtain ⟨C, hC, hCu⟩ := exists_besselPotential_eq_of_memTriebelLizorkinDistr (V := V) hp1 hp s + refine ⟨C, hC, fun u hu => ?_⟩ + obtain ⟨h, hh, hnorm⟩ := hCu u hu + set X := (memSobolev_bessel_of_memTriebelLizorkinDistr hp1 hp hu).toBesselPotentialSpace + have hX : X.toLp = h := eq_of_toTemperedDistribution_eq (by + rw [← X.bessel_toDistr_eq_toLp, ← hh, + TemperedDistribution.MemSobolev.toBesselPotentialSpace_toDistr]) + rw [← BesselPotentialSpace.enorm_toLp_eq, hX] + exact hnorm + +end Rd diff --git a/LeanPool/FunctionSpaces/Rd/BesselPotentials/BesselPotentialEmbedding.lean b/LeanPool/FunctionSpaces/Rd/BesselPotentials/BesselPotentialEmbedding.lean new file mode 100644 index 0000000000..90aa770f62 --- /dev/null +++ b/LeanPool/FunctionSpaces/Rd/BesselPotentials/BesselPotentialEmbedding.lean @@ -0,0 +1,88 @@ +/- +Copyright (c) 2026 Mario Ullrich. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Mario Ullrich +-/ +module + +public import LeanPool.FunctionSpaces.Rd.Sobolev.CriticalSobolevEmbedding +public import LeanPool.FunctionSpaces.Rd.BesselPotentials.BesselPotentialLifting + +/- +Modified for Lean Pool: module names and imports adapted. +-/ + +/-! +# Embeddings of Bessel potential spaces + +Let `V` have dimension `n ≥ 1`, `1 < p < ∞`, `p ≤ r < ∞` and `s ≥ n(1/p - 1/r)`. Every element of +Mathlib's Bessel potential space `H^{s,p}(V)` is an `L_r` function: as a tempered distribution it +is a function `g ∈ L_r(V)` (`Rd.exists_memLp_eq_of_memSobolev_bessel`), and in the bundled space +`‖g‖_r ≤ C ‖F‖_{H^{s,p}}` with an existential constant +(`Rd.exists_enorm_le_of_besselPotentialSpace`). The proof uses `H^{s,p} = F^s_{p,2}` for +`s ≥ 0` (`Rd.exists_memTriebelLizorkin_of_besselPotential_eq`) and the critical embedding +`F^α_{p,∞} ↪ L_r` (`Rd.exists_memLp_ae_eq_of_triebelLizorkinNorm_lt_top`); an `L_p` class and +an `L_r` class with almost everywhere equal representatives are the same tempered distribution +(`Rd.toTemperedDistribution_eq_of_ae_eq`). +-/ + +@[expose] public section + +open MeasureTheory Module +open scoped ENNReal SchwartzMap BesselPotentialSpace + +namespace Rd + +variable {V : Type*} [NormedAddCommGroup V] [InnerProductSpace ℝ V] [FiniteDimensional ℝ V] + [MeasurableSpace V] [BorelSpace V] {p r : ℝ≥0∞} [Fact (1 ≤ p)] [Fact (1 ≤ r)] + +/-- **`H^{s,p} ↪ L_r`**: let `n ≥ 1`, `1 < p < ∞`, `p ≤ r < ∞` and `s ≥ n(1/p - 1/r)`. Every +tempered distribution `f` in Mathlib's Bessel potential space `H^{s,p}(V)` is a function +`g ∈ L_r(V)`. Since `s ≥ 0`, `f` is an `L_p` function `g₀ ∈ F^s_{p,2}` +(`Rd.exists_memTriebelLizorkin_of_besselPotential_eq`), and `F^s_{p,2} ↪ L_r` +(`Rd.exists_memLp_ae_eq_of_memTriebelLizorkin_of_le`). The potential route through the +Hardy–Littlewood–Sobolev inequality is Stein's (1970, Chapter V). -/ +theorem exists_memLp_eq_of_memSobolev_bessel [Nontrivial V] (hp1 : 1 < p) (hp : p ≠ ∞) + (hpr : p ≤ r) (hr : r ≠ ∞) {s : ℝ} (hs : nikolskiiExponent (finrank ℝ V) p r ≤ s) + {f : 𝓢'(V, ℂ)} (hf : TemperedDistribution.MemSobolev s p f) : + ∃ g : Lp ℂ r (volume : Measure V), (g : 𝓢'(V, ℂ)) = f := by + have hs0 : 0 ≤ s := (nikolskiiExponent_nonneg (Nat.cast_nonneg _) Fact.out hpr).trans hs + obtain ⟨h, hh⟩ := hf + obtain ⟨C, -, hC⟩ := exists_memTriebelLizorkin_of_besselPotential_eq (V := V) hp1 hp hs0 + obtain ⟨g₀, hg₀, hmem, -⟩ := hC f h hh + obtain ⟨g, hg⟩ := exists_memLp_ae_eq_of_memTriebelLizorkin_of_le hpr hr hs one_le_two hmem + exact ⟨g, (toTemperedDistribution_eq_of_ae_eq hg).trans hg₀⟩ + +/-- **`H^{s,p} ↪ L_r` in Mathlib's bundled space**: let `n ≥ 1`, `1 < p < ∞`, `p ≤ r < ∞` and +`s ≥ n(1/p - 1/r)`. There is a finite constant `C` such that every element `F` of Mathlib's +`H^{s,p}(V)` is a function `g ∈ L_r(V)` with `‖g‖_r ≤ C ‖F‖_{H^{s,p}}`; the constant is +existential. For `r = p` it is `Q̃_{V,p} C₀`, from the lower square function bound +`‖g‖_p ≤ Q̃_{V,p} ‖g‖_{F^0_{p,2}}` (`Rd.enorm_le_triebelLizorkinNorm_zero_two`), and for `p < r` +it is `K_{V,p,r} C₀` (`Rd.exists_memLp_ae_eq_of_triebelLizorkinNorm_lt_top`), where `C₀` is the +constant of `H^{s,p} ⊆ F^s_{p,2}` (`Rd.exists_memTriebelLizorkin_toDistr`). -/ +theorem exists_enorm_le_of_besselPotentialSpace [Nontrivial V] (hp1 : 1 < p) (hp : p ≠ ∞) + (hpr : p ≤ r) (hr : r ≠ ∞) {s : ℝ} (hs : nikolskiiExponent (finrank ℝ V) p r ≤ s) : + ∃ C : ℝ≥0∞, C ≠ ∞ ∧ ∀ F : H^{s, p}(V, ℂ), ∃ g : Lp ℂ r (volume : Measure V), + (g : 𝓢'(V, ℂ)) = F.toDistr ∧ ‖g‖ₑ ≤ C * ‖F‖ₑ := by + have hs0 : 0 ≤ s := (nikolskiiExponent_nonneg (Nat.cast_nonneg _) Fact.out hpr).trans hs + obtain ⟨C₀, hC₀, hC⟩ := exists_memTriebelLizorkin_toDistr (V := V) hp1 hp hs0 + rcases hpr.eq_or_lt with rfl | hlt + · refine ⟨squareSynthesisConst V p * C₀, + ENNReal.mul_ne_top (squareSynthesisConst_ne_top hp1 hp) hC₀, fun F => ?_⟩ + obtain ⟨g₀, hg₀, -, hn⟩ := hC F + refine ⟨g₀, hg₀, (enorm_le_triebelLizorkinNorm_zero_two hp1 hp g₀).trans ?_⟩ + rw [mul_assoc] + exact mul_le_mul' le_rfl ((triebelLizorkinNorm_mono_smoothness hs0 2 g₀).trans hn) + refine ⟨criticalEmbeddingConst V p r * C₀, + ENNReal.mul_ne_top (criticalEmbeddingConst_ne_top hlt hr) hC₀, fun F => ?_⟩ + obtain ⟨g₀, hg₀, hmem, hn⟩ := hC F + have hle : triebelLizorkinNorm (nikolskiiExponent (finrank ℝ V) p r) ∞ g₀ ≤ C₀ * ‖F‖ₑ := + ((triebelLizorkinNorm_mono_exponent one_le_two le_top g₀).trans + (triebelLizorkinNorm_mono_smoothness hs 2 g₀)).trans hn + obtain ⟨g, hg, hgn⟩ := exists_memLp_ae_eq_of_triebelLizorkinNorm_lt_top hlt hr rfl + (hle.trans_lt (ENNReal.mul_lt_top hC₀.lt_top eNorm_lt_top)) + refine ⟨g, (toTemperedDistribution_eq_of_ae_eq hg).trans hg₀, hgn.trans ?_⟩ + rw [mul_assoc] + exact mul_le_mul' le_rfl hle + +end Rd diff --git a/LeanPool/FunctionSpaces/Rd/BesselPotentials/BesselPotentialLifting.lean b/LeanPool/FunctionSpaces/Rd/BesselPotentials/BesselPotentialLifting.lean new file mode 100644 index 0000000000..5b54add844 --- /dev/null +++ b/LeanPool/FunctionSpaces/Rd/BesselPotentials/BesselPotentialLifting.lean @@ -0,0 +1,534 @@ +/- +Copyright (c) 2026 Mario Ullrich. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Mario Ullrich +-/ +module + +public import LeanPool.FunctionSpaces.Rd.BesselPotentials.UniformSchwartzFamilies +public import LeanPool.FunctionSpaces.Rd.Sobolev.SobolevTriebelLizorkin + +/- +Modified for Lean Pool: module names and imports adapted. +-/ + +/-! +# Bessel potential spaces `H^{s,p} = F^s_{p,2}` + +Let `V` have dimension `n ≥ 1` and `1 < p < ∞`. Mathlib's Bessel potential `J_s` +(`TemperedDistribution.besselPotential`) multiplies the Fourier transform of a tempered +distribution by `⟨ξ⟩^s = (1 + ‖ξ‖²)^{s/2}`, and `f` lies in Mathlib's Bessel potential space +`H^{s,p}(V)` (`TemperedDistribution.MemSobolev s p`) iff `J_s f ∈ L_p(V)`. This file proves +`H^{s,p}(V) ∩ L_p(V) = F^s_{p,2}(V)` for every real `s` and `H^{s,p}(V) = F^s_{p,2}(V)` for +`s ≥ 0`, with existential constants, and hence `W^m_p(V) = H^{m,p}(V)` (Calderón). + +* **Even Fourier multipliers and convolutions**: for an even symbol `m` of temperate growth, + `m(D)` commutes with translations and reflections of Schwartz functions + (`Rd.fourierMultiplierCLM_compSubConstCLM`, `Rd.fourierMultiplierCLM_shiftReflect`), so + `((m(D) η) ⋆ h)(x) = (m(D) h)(y ↦ η(x - y))` for `h ∈ L_r` (`Rd.conv_fourierMultiplierCLM_eq`) + and `η ⋆ g = (m(D) η) ⋆ h` whenever `g = m(D) h` (`Rd.conv_eq_conv_fourierMultiplierCLM`); for + the Bessel weight, `Rd.conv_eq_conv_besselSchwartz`. Moreover `J_s (η ⋆ F) = (J_s η) ⋆ F` + (`Rd.besselPotential_toLp_conv`). +* **Bessel kernels of the Littlewood–Paley kernels**: `J_σ` maps the dilates of `psiBase j` + and `psiDualBase j` to dyadic multiples of dilated Bessel kernels (`Rd.besselBase`), which form + Calderón–Zygmund families (`Rd.exists_isCZFamily_besselBase_psiBase`, + `Rd.exists_isCZFamily_besselBase_psiDualBase`). +* **`F^s_{p,2} ⊆ H^{s,p}` for every real `s`** + (`Rd.exists_besselPotential_eq_of_memTriebelLizorkin`), also in Mathlib's bundled space + (`Rd.exists_enorm_toBesselPotentialSpace_le`): `J_s f` is the `L_p` limit of the synthesis + sums `∑_{j < J} (J_s ψ̃_j) ⋆ (ψ_j ⋆ f)` (`Rd.exists_tendsto_sum_conv_blockFun`, + `Rd.besselPotential_eq_of_tendsto`). +* **`H^{s,p} ⊆ F^s_{p,2}`**: `‖g‖_{F^s_{p,2}} ≤ C ‖J_s g‖_p` for `g ∈ L_p` and every real `s` + (`Rd.exists_triebelLizorkinNorm_le_of_besselPotential_eq`), and for `s ≥ 0` every `f` with + `J_s f ∈ L_p` is an `L_p` function (`Rd.exists_memTriebelLizorkin_of_besselPotential_eq`), also + for Mathlib's bundled space (`Rd.exists_memTriebelLizorkin_toDistr`). +* **The identities**: `Rd.memTriebelLizorkin_iff_memSobolev_bessel` (`f ∈ L_p`, every real `s`) + and `Rd.memSobolev_iff_memSobolev_bessel` (`W^m_p = H^{m,p}`). +-/ + +@[expose] public section + +open MeasureTheory Filter Module +open scoped ENNReal Topology SchwartzMap FourierTransform RealInnerProductSpace + BesselPotentialSpace +open ENNReal (lqNorm dyadicWeight) +open TemperedDistribution (besselPotential) + +namespace Rd + +variable {V : Type*} [NormedAddCommGroup V] [InnerProductSpace ℝ V] [FiniteDimensional ℝ V] + [MeasurableSpace V] [BorelSpace V] + +/-! ### Even Fourier multipliers on Schwartz functions -/ + +/-- `𝓕(J_t u)(ξ) = ⟨ξ⟩^t 𝓕u(ξ)` for Schwartz functions `u` +(`Rd.fourier_fourierMultiplierCLM_apply`). -/ +theorem fourier_besselSchwartz_apply (t : ℝ) (u : 𝓢(V, ℂ)) (ξ : V) : + 𝓕 (besselSchwartz t u) ξ = (besselWeight t ξ : ℂ) * 𝓕 u ξ := + fourier_fourierMultiplierCLM_apply (hasTemperateGrowth_besselWeight t) u ξ + +/-- **Translation becomes modulation**: `𝓕(φ(· - y))(ξ) = e^{-2πi⟨y, ξ⟩} 𝓕φ(ξ)` for Schwartz +functions `φ` (Mathlib's `VectorFourier.fourierIntegral_comp_add_right`). -/ +theorem fourier_compSubConstCLM_apply (φ : 𝓢(V, ℂ)) (y ξ : V) : + 𝓕 (φ.compSubConstCLM ℂ y) ξ = (𝐞 (-⟪y, ξ⟫) : ℂ) * 𝓕 φ ξ := by + have h := congrFun + (VectorFourier.fourierIntegral_comp_add_right 𝐞 volume (innerₗ V) (φ : V → ℂ) (-y)) ξ + have hφ : (φ.compSubConstCLM ℂ y : V → ℂ) = (φ : V → ℂ) ∘ fun v => v + -y := by + funext x + simp [sub_eq_add_neg] + rw [SchwartzMap.fourier_coe, SchwartzMap.fourier_coe, hφ] + refine h.trans ?_ + rw [Circle.smul_def, innerₗ_apply_apply, inner_neg_left, smul_eq_mul] + rfl + +/-- **Fourier multipliers commute with translations**: `m(D) (φ(· - y)) = (m(D) φ)(· - y)` for a +symbol `m` of temperate growth, since the Fourier transforms of both sides are +`m(ξ) e^{-2πi⟨y, ξ⟩} 𝓕φ(ξ)` and the Fourier transform is injective on Schwartz functions. -/ +theorem fourierMultiplierCLM_compSubConstCLM {m : V → ℂ} (hm : m.HasTemperateGrowth) + (φ : 𝓢(V, ℂ)) (y : V) : + SchwartzMap.fourierMultiplierCLM ℂ m (φ.compSubConstCLM ℂ y) = + (SchwartzMap.fourierMultiplierCLM ℂ m φ).compSubConstCLM ℂ y := by + apply (FourierTransform.fourierCLE ℂ 𝓢(V, ℂ)).injective + simp only [FourierTransform.fourierCLE_apply] + ext ξ + rw [fourier_fourierMultiplierCLM_apply hm, fourier_compSubConstCLM_apply, + fourier_compSubConstCLM_apply, fourier_fourierMultiplierCLM_apply hm] + ring + +/-- **`J_t` commutes with translations**: `J_t (φ(· - y)) = (J_t φ)(· - y)` +(`Rd.fourierMultiplierCLM_compSubConstCLM`). -/ +theorem besselSchwartz_compSubConstCLM (t : ℝ) (φ : 𝓢(V, ℂ)) (y : V) : + besselSchwartz t (φ.compSubConstCLM ℂ y) = (besselSchwartz t φ).compSubConstCLM ℂ y := + fourierMultiplierCLM_compSubConstCLM (hasTemperateGrowth_besselWeight t) φ y + +/-- **Even Fourier multipliers commute with the reflection** `φ ↦ φ(-·)`: for an even symbol `m` +of temperate growth, the Fourier transforms of both sides are `m(ξ) 𝓕φ(-ξ)` +(`Rd.fourier_reflect`). -/ +theorem fourierMultiplierCLM_schwartzReflect {m : V → ℂ} (hm : m.HasTemperateGrowth) + (heven : ∀ ξ, m (-ξ) = m ξ) (φ : 𝓢(V, ℂ)) : + SchwartzMap.fourierMultiplierCLM ℂ m (schwartzReflect φ) = + schwartzReflect (SchwartzMap.fourierMultiplierCLM ℂ m φ) := by + apply (FourierTransform.fourierCLE ℂ 𝓢(V, ℂ)).injective + simp only [FourierTransform.fourierCLE_apply] + ext ξ + have hr : ∀ G : 𝓢(V, ℂ), 𝓕 (schwartzReflect G) ξ = 𝓕 G (-ξ) := fun G => by + rw [SchwartzMap.fourier_coe, SchwartzMap.fourier_coe, coe_schwartzReflect] + exact fourier_reflect (G : V → ℂ) ξ + rw [fourier_fourierMultiplierCLM_apply hm, hr, hr, fourier_fourierMultiplierCLM_apply hm, + heven] + +/-- **Even Fourier multipliers commute with reflected translates**: for an even symbol `m` of +temperate growth, `m(D) (y ↦ η(x - y)) = (y ↦ (m(D) η)(x - y))` +(`Rd.fourierMultiplierCLM_compSubConstCLM`, `Rd.fourierMultiplierCLM_schwartzReflect`). -/ +theorem fourierMultiplierCLM_shiftReflect {m : V → ℂ} (hm : m.HasTemperateGrowth) + (heven : ∀ ξ, m (-ξ) = m ξ) (η : 𝓢(V, ℂ)) (x : V) : + SchwartzMap.fourierMultiplierCLM ℂ m (shiftReflect η x) = + shiftReflect (SchwartzMap.fourierMultiplierCLM ℂ m η) x := by + rw [shiftReflect, shiftReflect, fourierMultiplierCLM_compSubConstCLM hm, + fourierMultiplierCLM_schwartzReflect hm heven] + +/-! ### Even Fourier multipliers and convolutions -/ + +/-- **Convolution as a tempered distribution**: for `g ∈ L_r(V)` and a Schwartz function `η`, +`(η ⋆ g)(x)` is the tempered distribution of `g` at the reflected translate `y ↦ η(x - y)`. -/ +theorem conv_eq_toTemperedDistribution_shiftReflect {r : ℝ≥0∞} [Fact (1 ≤ r)] (η : 𝓢(V, ℂ)) + (g : Lp ℂ r (volume : Measure V)) (x : V) : + conv η g volume x = (g : 𝓢'(V, ℂ)) (shiftReflect η x) := by + rw [Lp.toTemperedDistribution_apply, conv_eq_integral_shiftReflect] + simp only [smul_eq_mul] + +/-- **Convolution with a multiplied kernel**: for an even symbol `m` of temperate growth, +`h ∈ L_r(V)`, a Schwartz function `η` and every `x`, `((m(D) η) ⋆ h)(x)` is the tempered +distribution `m(D) h` at the reflected translate `y ↦ η(x - y)` +(`Rd.fourierMultiplierCLM_apply_apply_of_even`, `Rd.fourierMultiplierCLM_shiftReflect`). -/ +theorem conv_fourierMultiplierCLM_eq {r : ℝ≥0∞} [Fact (1 ≤ r)] {m : V → ℂ} + (hm : m.HasTemperateGrowth) (heven : ∀ ξ, m (-ξ) = m ξ) (η : 𝓢(V, ℂ)) + (h : Lp ℂ r (volume : Measure V)) (x : V) : + conv (SchwartzMap.fourierMultiplierCLM ℂ m η) h volume x = + TemperedDistribution.fourierMultiplierCLM ℂ m (h : 𝓢'(V, ℂ)) (shiftReflect η x) := by + rw [fourierMultiplierCLM_apply_apply_of_even hm heven, + fourierMultiplierCLM_shiftReflect hm heven, conv_eq_toTemperedDistribution_shiftReflect] + +/-- **Blocks of a multiplied function**: for an even symbol `m` of temperate growth, if +`g ∈ L_q(V)` and `h ∈ L_r(V)` satisfy `g = m(D) h` as tempered distributions, then +`η ⋆ g = (m(D) η) ⋆ h` at every point, for every Schwartz function `η` +(`Rd.conv_eq_toTemperedDistribution_shiftReflect`, `Rd.conv_fourierMultiplierCLM_eq`). -/ +theorem conv_eq_conv_fourierMultiplierCLM {q r : ℝ≥0∞} [Fact (1 ≤ q)] [Fact (1 ≤ r)] + {m : V → ℂ} (hm : m.HasTemperateGrowth) (heven : ∀ ξ, m (-ξ) = m ξ) + {g : Lp ℂ q (volume : Measure V)} {h : Lp ℂ r (volume : Measure V)} + (hgh : (g : 𝓢'(V, ℂ)) = TemperedDistribution.fourierMultiplierCLM ℂ m (h : 𝓢'(V, ℂ))) + (η : 𝓢(V, ℂ)) (x : V) : + conv η g volume x = conv (SchwartzMap.fourierMultiplierCLM ℂ m η) h volume x := by + rw [conv_fourierMultiplierCLM_eq hm heven, ← hgh, conv_eq_toTemperedDistribution_shiftReflect] + +/-- **Blocks of a Bessel potential**: if `g ∈ L_q(V)` and `h ∈ L_r(V)` satisfy `g = J_t h` as +tempered distributions, then `η ⋆ g = (J_t η) ⋆ h` at every point, for every Schwartz function +`η` (`Rd.conv_eq_conv_fourierMultiplierCLM`, `Rd.besselWeight_neg`). -/ +theorem conv_eq_conv_besselSchwartz {q r : ℝ≥0∞} [Fact (1 ≤ q)] [Fact (1 ≤ r)] {t : ℝ} + {g : Lp ℂ q (volume : Measure V)} {h : Lp ℂ r (volume : Measure V)} + (hgh : (g : 𝓢'(V, ℂ)) = besselPotential V ℂ t (h : 𝓢'(V, ℂ))) (η : 𝓢(V, ℂ)) (x : V) : + conv η g volume x = conv (besselSchwartz t η) h volume x := + conv_eq_conv_fourierMultiplierCLM (hasTemperateGrowth_besselWeight t) + (fun ξ => by rw [besselWeight_neg]) hgh η x + +/-! ### Bessel potentials of convolutions -/ + +/-- **`J_t` moves through a convolution, tested**: for `F ∈ L_p(V)`, `1 ≤ p < ∞`, and Schwartz +functions `η`, `u`, `∫ J_t u · (η ⋆ F) = ∫ u · ((J_t η) ⋆ F)`. Both sides are pairings of `F` +with reflected convolutions (`Rd.integral_conv_mul`), and +`∫ η(z - y) J_t u(z) dz = ∫ (J_t η)(z - y) u(z) dz` by the symmetry of `J_t` and its commuting +with translations (`Rd.integral_besselSchwartz_mul`, `Rd.besselSchwartz_compSubConstCLM`). -/ +theorem integral_besselSchwartz_mul_conv {p : ℝ≥0∞} (hp1 : 1 ≤ p) (hp : p ≠ ∞) {F : V → ℂ} + (hF : MemLp F p volume) (t : ℝ) (η u : 𝓢(V, ℂ)) : + ∫ x, besselSchwartz t u x * conv η F volume x = + ∫ x, u x * conv (besselSchwartz t η) F volume x := by + have := ENNReal.HolderConjugate.conjExponent hp1 + have hL : ∫ x, besselSchwartz t u x * conv η F volume x = + ∫ x, conv η F volume x * besselSchwartz t u x := by + congr 1 + funext x + ring + have hR : ∫ x, u x * conv (besselSchwartz t η) F volume x = + ∫ x, conv (besselSchwartz t η) F volume x * u x := by + congr 1 + funext x + ring + rw [hL, hR, integral_conv_mul (q := p.conjExponent) hp η.integrable hF + ((besselSchwartz t u).memLp _), + integral_conv_mul (q := p.conjExponent) hp (besselSchwartz t η).integrable hF (u.memLp _)] + congr 1 + funext y + congr 1 + rw [conv_reflect_apply, conv_reflect_apply] + have h := integral_besselSchwartz_mul t (η.compSubConstCLM ℂ y) u + rw [besselSchwartz_compSubConstCLM] at h + simp only [SchwartzMap.compSubConstCLM_apply] at h + exact h.symm + +variable {p : ℝ≥0∞} [Fact (1 ≤ p)] + +/-- **`J_t` of a convolution**: for `F ∈ L_p(V)`, `1 ≤ p < ∞`, and a Schwartz function `η`, +Mathlib's Bessel potential maps the tempered distribution of `η ⋆ F` to that of `(J_t η) ⋆ F` +(`Rd.besselPotential_apply_apply`, `Rd.integral_besselSchwartz_mul_conv`). -/ +theorem besselPotential_toLp_conv (hp : p ≠ ∞) (t : ℝ) (η : 𝓢(V, ℂ)) {F : V → ℂ} + (hF : MemLp F p volume) : + besselPotential V ℂ t ((memLp_conv Fact.out hp η.integrable hF).toLp _ : 𝓢'(V, ℂ)) = + ((memLp_conv Fact.out hp (besselSchwartz t η).integrable hF).toLp _ : 𝓢'(V, ℂ)) := by + ext u + rw [besselPotential_apply_apply, Lp.toTemperedDistribution_apply, + Lp.toTemperedDistribution_apply] + calc ∫ x, besselSchwartz t u x • (memLp_conv Fact.out hp η.integrable hF).toLp _ x + = ∫ x, besselSchwartz t u x * conv η F volume x := by + refine integral_congr_ae ?_ + filter_upwards [MemLp.coeFn_toLp (memLp_conv Fact.out hp η.integrable hF)] with x hx + rw [hx, smul_eq_mul] + _ = ∫ x, u x * conv (besselSchwartz t η) F volume x := + integral_besselSchwartz_mul_conv Fact.out hp hF t η u + _ = ∫ x, u x • (memLp_conv Fact.out hp (besselSchwartz t η).integrable hF).toLp _ x := by + refine integral_congr_ae ?_ + filter_upwards [MemLp.coeFn_toLp (memLp_conv Fact.out hp (besselSchwartz t η).integrable + hF)] with x hx + rw [hx, smul_eq_mul] + +/-- **Limits of synthesis sums**: let `1 ≤ p < ∞`, let `η_j` be Schwartz functions and +`F_j ∈ L_p(V)`. If `∑_{j < J} η_j ⋆ F_j → f` and `∑_{j < J} (J_t η_j) ⋆ F_j → g` in `L_p(V)`, +then `J_t f = g` as tempered distributions. The partial sums satisfy this identity +(`Rd.besselPotential_toLp_conv`), `J_t` and the embedding of `L_p` into tempered distributions +are continuous, and limits in the tempered distributions are unique. -/ +theorem besselPotential_eq_of_tendsto (hp : p ≠ ∞) (t : ℝ) {η : ℕ → 𝓢(V, ℂ)} + {F : ℕ → V → ℂ} (hF : ∀ j, MemLp (F j) p volume) {f g : Lp ℂ p (volume : Measure V)} + (hT : Tendsto (fun J => eLpNorm ((fun x => ∑ j ∈ Finset.range J, + conv (η j) (F j) volume x) - ⇑f) p volume) atTop (𝓝 0)) + (hS : Tendsto (fun J => eLpNorm ((fun x => ∑ j ∈ Finset.range J, + conv (besselSchwartz t (η j)) (F j) volume x) - ⇑g) p volume) atTop (𝓝 0)) : + besselPotential V ℂ t (f : 𝓢'(V, ℂ)) = g := by + set P : (ℕ → 𝓢(V, ℂ)) → ℕ → Lp ℂ p (volume : Measure V) := fun K J => + ∑ j ∈ Finset.range J, (memLp_conv Fact.out hp (K j).integrable (hF j)).toLp _ with hPdef + have hcoe : ∀ (K : ℕ → 𝓢(V, ℂ)) (J : ℕ), + ⇑(P K J) =ᵐ[volume] fun x => ∑ j ∈ Finset.range J, conv (K j) (F j) volume x := by + intro K J + have h1 : ∀ᵐ x ∂volume, ∀ j, + (memLp_conv Fact.out hp (K j).integrable (hF j)).toLp _ x = conv (K j) (F j) volume x := + ae_all_iff.2 fun j => MemLp.coeFn_toLp _ + filter_upwards [h1, Lp.coeFn_fun_finsetSum (Finset.range J) fun j => + (memLp_conv Fact.out hp (K j).integrable (hF j)).toLp _] with x hx1 hx2 + rw [hPdef, hx2] + exact Finset.sum_congr rfl fun j _ => hx1 j + have hlim : ∀ (K : ℕ → 𝓢(V, ℂ)) (k : Lp ℂ p (volume : Measure V)), + Tendsto (fun J => eLpNorm ((fun x => ∑ j ∈ Finset.range J, + conv (K j) (F j) volume x) - ⇑k) p volume) atTop (𝓝 0) → + Tendsto (P K) atTop (𝓝 k) := fun K k hK => + (Lp.tendsto_Lp_iff_tendsto_eLpNorm' (P K) k).2 + (hK.congr fun J => (eLpNorm_congr_ae ((hcoe K J).sub EventuallyEq.rfl)).symm) + have hPJ : ∀ J, besselPotential V ℂ t (P η J : 𝓢'(V, ℂ)) = + (P (fun j => besselSchwartz t (η j)) J : 𝓢'(V, ℂ)) := fun J => by + rw [← Lp.toTemperedDistributionCLM_apply, ← Lp.toTemperedDistributionCLM_apply, hPdef] + simp only [map_sum, Lp.toTemperedDistributionCLM_apply] + exact Finset.sum_congr rfl fun j _ => besselPotential_toLp_conv hp t (η j) (hF j) + have h1 : Tendsto (fun J => besselPotential V ℂ t (P η J : 𝓢'(V, ℂ))) atTop + (𝓝 (besselPotential V ℂ t (f : 𝓢'(V, ℂ)))) := + ((besselPotential V ℂ t).continuous.comp + (Lp.toTemperedDistributionCLM ℂ volume p).continuous).continuousAt.tendsto.comp + (hlim η f hT) + have h2 : Tendsto (fun J => (P (fun j => besselSchwartz t (η j)) J : 𝓢'(V, ℂ))) atTop + (𝓝 (g : 𝓢'(V, ℂ))) := + (Lp.toTemperedDistributionCLM ℂ volume p).continuous.continuousAt.tendsto.comp + (hlim _ g hS) + exact tendsto_nhds_unique (h1.congr hPJ) h2 + +/-! ### The Bessel kernels of the Littlewood–Paley kernels -/ + +/-- The **Bessel kernels of a family** `(ω_j)` of Schwartz functions: +`K^σ_j = 𝓕⁻¹[(2^{-2j} + ‖ζ‖²)^{σ/2} 𝓕ω_j]`, the Bessel kernels of `𝓕ω_j` at the scale `j` +(`Rd.besselKernelFamily`), so that `J_σ (ω_j)_{2^j} = 2^{jσ} (K^σ_j)_{2^j}` +(`Rd.besselSchwartz_schwartzDilate`). -/ +noncomputable def besselBase (σ : ℝ) (ω : ℕ → 𝓢(V, ℂ)) (j : ℕ) : 𝓢(V, ℂ) := + besselKernelFamily (𝓕 (ω j)) σ j + +/-- **The dilated Bessel kernels of a family form a Calderón–Zygmund family** when the family +is constant from `M` on, `ω_j = ω_M` for `j ≥ M`, and `𝓕ω_M` vanishes outside the annulus +`{a ≤ ‖ζ‖ ≤ 2^N a}`, `a > 0`: for every real `σ` there are finite `B`, `H` such that +`((K^σ_j)_{2^j})_j` is a Calderón–Zygmund family with overlap `B` and Hörmander constant `H`. +From `M` on, the kernels are the Bessel kernels of `𝓕ω_M` +(`Rd.exists_isUniformSchwartz_besselKernelFamily`, +`Rd.tsum_fourier_dilate_besselKernelFamily_sq_le`); the first `M` kernels are exceptional +members (`Rd.IsCZFamily.of_dilation_of_forall_ge_eq`). -/ +theorem exists_isCZFamily_besselBase {ω : ℕ → 𝓢(V, ℂ)} {M N : ℕ} {a : ℝ} (ha : 0 < a) + (hω : ∀ j, M ≤ j → ω j = ω M) + (hann : ∀ ζ, 𝓕 (ω M) ζ ≠ 0 → a ≤ ‖ζ‖ ∧ ‖ζ‖ ≤ 2 ^ N * a) (σ : ℝ) : + ∃ B H : ℝ≥0∞, B ≠ ∞ ∧ H ≠ ∞ ∧ + IsCZFamily (fun j => dilate (2 ^ j) (besselBase σ ω j : V → ℂ)) B H := by + obtain ⟨A, hA⟩ := exists_isUniformSchwartz_besselKernelFamily ha hann σ + refine ⟨_, _, ?_, ?_, IsCZFamily.of_dilation_of_forall_ge_eq hA + (tsum_fourier_dilate_besselKernelFamily_sq_le ha hann σ) (N := M) fun j hj => ?_⟩ + · exact ENNReal.add_ne_top.2 ⟨besselOverlap_ne_top a N σ _, + ENNReal.sum_ne_top.2 fun i _ => ENNReal.pow_ne_top ENNReal.ofReal_ne_top⟩ + · exact ENNReal.mul_ne_top ENNReal.ofNat_ne_top (familyHormanderConst_ne_top _) + · rw [besselBase, hω j hj] + +/-- **The Bessel kernels of the synthesis kernels form a Calderón–Zygmund family**: for every +real `σ` there are finite `B`, `H` such that the dilated Bessel kernels of `psiDualBase` form a +Calderón–Zygmund family with overlap `B` and Hörmander constant `H`. The family `psiDualBase` is +constant from `2` on, with Fourier transform in `{1/4 ≤ ‖ζ‖ ≤ 2^4 · 1/4}` +(`Rd.mem_annulus_of_fourier_psiDualBase_ne_zero`). -/ +theorem exists_isCZFamily_besselBase_psiDualBase (σ : ℝ) : + ∃ B H : ℝ≥0∞, B ≠ ∞ ∧ H ≠ ∞ ∧ + IsCZFamily (fun j => dilate (2 ^ j) (besselBase σ (psiDualBase (V := V)) j : V → ℂ)) + B H := + exists_isCZFamily_besselBase (M := 2) (N := 4) (by norm_num : (0 : ℝ) < 4⁻¹) + (fun j hj => by + obtain ⟨k, rfl⟩ := Nat.exists_eq_add_of_le' hj + rfl) + (fun _ h => mem_annulus_of_fourier_psiDualBase_ne_zero (j := 0) h) σ + +/-- **The Bessel kernels of the blocks form a Calderón–Zygmund family**: for every real `σ` +there are finite `B`, `H` such that the dilated Bessel kernels of `psiBase` form a +Calderón–Zygmund family with overlap `B` and Hörmander constant `H`. The family `psiBase` is +constant from `1` on, with Fourier transform in `{1/2 ≤ ‖ζ‖ ≤ 2^2 · 1/2}` +(`Rd.mem_annulus_of_fourier_psiBase_ne_zero`). -/ +theorem exists_isCZFamily_besselBase_psiBase (σ : ℝ) : + ∃ B H : ℝ≥0∞, B ≠ ∞ ∧ H ≠ ∞ ∧ + IsCZFamily (fun j => dilate (2 ^ j) (besselBase σ (psiBase (V := V)) j : V → ℂ)) B H := + exists_isCZFamily_besselBase (M := 1) (N := 2) (by norm_num : (0 : ℝ) < 2⁻¹) + (fun j hj => by + obtain ⟨k, rfl⟩ := Nat.exists_eq_add_of_le' hj + rfl) + (fun _ h => mem_annulus_of_fourier_psiBase_ne_zero (j := 0) h) σ + +omit [Fact (1 ≤ p)] in +/-- **Convolution with the Bessel potential of a dilate**: for a family `(ω_j)` of Schwartz +functions, `(J_σ (ω_j)_{2^j}) ⋆ F = (K^σ_j)_{2^j} ⋆ ((2^j)^σ F)` at every point +(`Rd.besselSchwartz_schwartzDilate`). -/ +theorem conv_besselSchwartz_schwartzDilate (σ : ℝ) (ω : ℕ → 𝓢(V, ℂ)) (j : ℕ) (F : V → ℂ) + (x : V) : + conv (besselSchwartz σ (schwartzDilate (2 ^ j) (pow_ne_zero j two_ne_zero) (ω j))) F volume + x = + conv (dilate (2 ^ j) (besselBase σ ω j : V → ℂ)) (((((2 : ℝ) ^ j) ^ σ : ℝ) : ℂ) • F) + volume x := by + rw [besselSchwartz_schwartzDilate, FunLike.coe_smul, smul_conv, conv_smul, + coe_schwartzDilate, besselBase] + +omit [Fact (1 ≤ p)] in +/-- **The synthesis bound for Bessel potentials of dilates**: in dimension `n ≥ 1`, for +`1 < p < ∞`, real `σ`, a family `(ω_j)` of Schwartz functions whose dilated Bessel kernels +`((K^σ_j)_{2^j})_j` form a Calderón–Zygmund family with overlap `B` and Hörmander constant `H`, +every finite set `t ⊆ ℕ` and functions `g_j ∈ L_p(V)`, +`‖∑_{j ∈ t} (J_σ (ω_j)_{2^j}) ⋆ g_j‖_p ≤ S ‖ x ↦ ‖(1_t(j) 2^{jσ} |g_j(x)|)_j‖_{ℓ_2} ‖_p` +with `S = Rd.czConst V p B H` (`Rd.conv_besselSchwartz_schwartzDilate`, +`Rd.IsCZFamily.eLpNorm_sum_conv_smul_le` with the coefficients `(2^j)^σ`). For the blocks +`g_j = ψ_j ⋆ f` of `f ∈ L_p(V)` this bounds the synthesis sums of `F^σ_{p,2} ⊆ H^{σ,p}`. -/ +theorem eLpNorm_sum_conv_besselSchwartz_le [Nontrivial V] (hp1 : 1 < p) (hp : p ≠ ∞) + {σ : ℝ} {ω : ℕ → 𝓢(V, ℂ)} {B H : ℝ≥0∞} + (hθ : IsCZFamily (fun j => dilate (2 ^ j) (besselBase σ ω j : V → ℂ)) B H) + (t : Finset ℕ) {g : ℕ → V → ℂ} (hg : ∀ j, MemLp (g j) p volume) : + eLpNorm (fun x => ∑ j ∈ t, conv (besselSchwartz σ + (schwartzDilate (2 ^ j) (pow_ne_zero j two_ne_zero) (ω j))) (g j) volume x) + p volume ≤ + czConst V p B H * eLpNorm (fun x => lqNorm 2 fun j => + if j ∈ t then dyadicWeight σ j * ‖g j x‖ₑ else 0) p volume := by + have hsum : (fun x => ∑ j ∈ t, conv (besselSchwartz σ + (schwartzDilate (2 ^ j) (pow_ne_zero j two_ne_zero) (ω j))) (g j) volume x) = + fun x => ∑ j ∈ t, conv (dilate (2 ^ j) (besselBase σ ω j : V → ℂ)) + (((((2 : ℝ) ^ j) ^ σ : ℝ) : ℂ) • g j) volume x := by + funext x + exact Finset.sum_congr rfl fun j _ => conv_besselSchwartz_schwartzDilate σ ω j _ x + rw [hsum] + exact hθ.eLpNorm_sum_conv_smul_le hp1 hp + (c := fun j => ((((2 : ℝ) ^ j) ^ σ : ℝ) : ℂ)) (fun j => enorm_two_pow_rpow j σ) t hg + +/-! ### `F^s_{p,2} ⊆ H^{s,p}` -/ + +/-- **`F^s_{p,2} ⊆ H^{s,p}` with norm bound**: in dimension `n ≥ 1`, for `1 < p < ∞` and every +real `s` there is a finite constant `C` such that for every `f ∈ F^s_{p,2}(V)` the Bessel +potential `J_s f` is an `L_p` function `h` with `‖h‖_p ≤ C ‖f‖_{F^s_{p,2}}`; the constant is +existential. The function `h` is the limit of the synthesis sums +`∑_{j < J} (J_s ψ̃_j) ⋆ (ψ_j ⋆ f)`, which converge by the synthesis bound of the dilated Bessel +kernels of `psiDualBase` (`Rd.exists_isCZFamily_besselBase_psiDualBase`, +`Rd.eLpNorm_sum_conv_besselSchwartz_le`, `Rd.exists_tendsto_sum_conv_blockFun`); the sums +without `J_s` tend to `f` (`Rd.tendsto_eLpNorm_sum_conv_psiDual_blockFun_sub`), so +`J_s f = h` (`Rd.besselPotential_eq_of_tendsto`). -/ +theorem exists_besselPotential_eq_of_memTriebelLizorkin [Nontrivial V] (hp1 : 1 < p) + (hp : p ≠ ∞) (s : ℝ) : + ∃ C : ℝ≥0∞, C ≠ ∞ ∧ ∀ f : Lp ℂ p (volume : Measure V), MemTriebelLizorkin s 2 f → + ∃ h : Lp ℂ p (volume : Measure V), besselPotential V ℂ s (f : 𝓢'(V, ℂ)) = h ∧ + ‖h‖ₑ ≤ C * triebelLizorkinNorm s 2 f := by + obtain ⟨B, H, hB, hH, hθ⟩ := exists_isCZFamily_besselBase_psiDualBase (V := V) s + refine ⟨czConst V p B H, czConst_ne_top hp1 hp hB hH, fun f hf => ?_⟩ + obtain ⟨h, hlim, hnorm⟩ := exists_tendsto_sum_conv_blockFun hp + (K := fun j => besselSchwartz s (psiDualS j)) (czConst_ne_top hp1 hp hB hH) hf + fun t => eLpNorm_sum_conv_besselSchwartz_le hp1 hp hθ t fun j => memLp_blockFun hp j f + refine ⟨h, besselPotential_eq_of_tendsto hp s (η := psiDualS) + (fun j => memLp_blockFun hp j f) ?_ hlim, hnorm⟩ + simpa only [coe_psiDualS] using tendsto_eLpNorm_sum_conv_psiDual_blockFun_sub hp f + +/-- **`F^s_{p,2} ⊆ H^{s,p}`**: in dimension `n ≥ 1`, for `1 < p < ∞` and real `s`, every +`f ∈ F^s_{p,2}(V)` lies in Mathlib's Bessel potential space: `J_s f ∈ L_p(V)` +(`Rd.exists_besselPotential_eq_of_memTriebelLizorkin`). -/ +theorem memSobolev_bessel_of_memTriebelLizorkin [Nontrivial V] (hp1 : 1 < p) (hp : p ≠ ∞) + {s : ℝ} {f : Lp ℂ p (volume : Measure V)} (hf : MemTriebelLizorkin s 2 f) : + TemperedDistribution.MemSobolev s p (f : 𝓢'(V, ℂ)) := by + obtain ⟨C, -, hC⟩ := exists_besselPotential_eq_of_memTriebelLizorkin (V := V) hp1 hp s + obtain ⟨h, hh, -⟩ := hC f hf + exact ⟨h, hh⟩ + +/-! ### `H^{s,p} ⊆ F^s_{p,2}` -/ + +/-- **The blocks of a Bessel potential**: if `g ∈ L_q(V)` and `h ∈ L_r(V)` satisfy +`g = J_{-s} h` as tempered distributions, then for every `j` and `x`, +`2^{js} |(ψ_j ⋆ g)(x)| = |((K^{-s}_j)_{2^j} ⋆ h)(x)|` with the Bessel kernels `K^{-s}_j` of +`psiBase` (`Rd.conv_eq_conv_besselSchwartz`, `Rd.conv_besselSchwartz_schwartzDilate`). -/ +theorem dyadicWeight_mul_enorm_blockFun_eq {q r : ℝ≥0∞} [Fact (1 ≤ q)] [Fact (1 ≤ r)] {s : ℝ} + {g : Lp ℂ q (volume : Measure V)} {h : Lp ℂ r (volume : Measure V)} + (hgh : (g : 𝓢'(V, ℂ)) = besselPotential V ℂ (-s) (h : 𝓢'(V, ℂ))) (j : ℕ) (x : V) : + dyadicWeight s j * ‖blockFun j g x‖ₑ = + ‖conv (dilate (2 ^ j) (besselBase (-s) (psiBase (V := V)) j : V → ℂ)) h volume x‖ₑ := by + rw [blockFun, ← coe_psiS, psiS, conv_eq_conv_besselSchwartz hgh, + conv_besselSchwartz_schwartzDilate, conv_smul, Pi.smul_apply, smul_eq_mul, eNorm_mul, + enorm_two_pow_rpow, ← mul_assoc, ENNReal.dyadicWeight_neg, + ENNReal.mul_inv_cancel (ENNReal.dyadicWeight_ne_zero s j) (ENNReal.dyadicWeight_ne_top s j), + one_mul] + +/-- **`H^{s,p} ⊆ F^s_{p,2}` on `L_p`, with norm bound**: in dimension `n ≥ 1`, for `1 < p < ∞` +and every real `s` there is a finite constant `C` such that `‖g‖_{F^s_{p,2}} ≤ C ‖h‖_p` for all +`g, h ∈ L_p(V)` with `J_s g = h`; the constant is existential. Since `g = J_{-s} h` (Mathlib's +`TemperedDistribution.besselPotential_neg_apply_eq_iff`), the weighted blocks of `g` are the +convolutions of `h` with the dilated Bessel kernels of `psiBase` of order `-s` +(`Rd.dyadicWeight_mul_enorm_blockFun_eq`), a Calderón–Zygmund family +(`Rd.exists_isCZFamily_besselBase_psiBase`), and the analysis bound applies +(`Rd.IsCZFamily.eLpNorm_lqNorm_conv_le`). -/ +theorem exists_triebelLizorkinNorm_le_of_besselPotential_eq [Nontrivial V] (hp1 : 1 < p) + (hp : p ≠ ∞) (s : ℝ) : + ∃ C : ℝ≥0∞, C ≠ ∞ ∧ ∀ g h : Lp ℂ p (volume : Measure V), + besselPotential V ℂ s (g : 𝓢'(V, ℂ)) = h → triebelLizorkinNorm s 2 g ≤ C * ‖h‖ₑ := by + obtain ⟨B, H, hB, hH, hθ⟩ := exists_isCZFamily_besselBase_psiBase (V := V) (-s) + refine ⟨czConst V p B H, czConst_ne_top hp1 hp hB hH, fun g h hgh => ?_⟩ + have hg : (g : 𝓢'(V, ℂ)) = besselPotential V ℂ (-s) (h : 𝓢'(V, ℂ)) := + ((TemperedDistribution.besselPotential_neg_apply_eq_iff s _ _).2 hgh).symm + rw [triebelLizorkinNorm, Lp.eNorm_def] + simp_rw [dyadicWeight_mul_enorm_blockFun_eq hg] + exact hθ.eLpNorm_lqNorm_conv_le hp1 hp (Lp.memLp h) + +/-- **`H^{s,p} ⊆ F^s_{p,2}` for `s ≥ 0`**: in dimension `n ≥ 1`, for `1 < p < ∞` and real +`s ≥ 0` there is a finite constant `C` such that every tempered distribution `f` with +`J_s f = h ∈ L_p(V)` is an `L_p` function `g ∈ F^s_{p,2}(V)` with `‖g‖_{F^s_{p,2}} ≤ C ‖h‖_p`; the +constant is existential. Since `h ∈ L_p = F^0_{p,2} ⊆ F^{-s}_{p,2}` +(`Rd.memTriebelLizorkin_zero_two`), `J_{-s} h` is an `L_p` function `g` +(`Rd.exists_besselPotential_eq_of_memTriebelLizorkin` with `-s`), `J_{-s} h = f` (Mathlib's +`TemperedDistribution.besselPotential_neg_apply_eq_iff`), and +`Rd.exists_triebelLizorkinNorm_le_of_besselPotential_eq` bounds the norm of `g`. -/ +theorem exists_memTriebelLizorkin_of_besselPotential_eq [Nontrivial V] (hp1 : 1 < p) (hp : p ≠ ∞) + {s : ℝ} (hs : 0 ≤ s) : + ∃ C : ℝ≥0∞, C ≠ ∞ ∧ ∀ (f : 𝓢'(V, ℂ)) (h : Lp ℂ p (volume : Measure V)), + besselPotential V ℂ s f = h → ∃ g : Lp ℂ p (volume : Measure V), (g : 𝓢'(V, ℂ)) = f ∧ + MemTriebelLizorkin s 2 g ∧ triebelLizorkinNorm s 2 g ≤ C * ‖h‖ₑ := by + obtain ⟨C₁, -, hC₁⟩ := exists_besselPotential_eq_of_memTriebelLizorkin (V := V) hp1 hp (-s) + obtain ⟨C, hC, hC₂⟩ := exists_triebelLizorkinNorm_le_of_besselPotential_eq (V := V) hp1 hp s + refine ⟨C, hC, fun f h hfh => ?_⟩ + obtain ⟨g, hg, -⟩ := + hC₁ h ((memTriebelLizorkin_zero_two hp1 hp h).mono_smoothness (by linarith)) + have hgf : (g : 𝓢'(V, ℂ)) = f := + hg.symm.trans ((TemperedDistribution.besselPotential_neg_apply_eq_iff s _ _).2 hfh) + have hb := hC₂ g h (by rw [hgf, hfh]) + exact ⟨g, hgf, hb.trans_lt (ENNReal.mul_lt_top hC.lt_top eNorm_lt_top), hb⟩ + +/-! ### The bundled spaces and `W^m_p = H^{m,p}` -/ + +/-- **`F^s_{p,2} ⊆ H^{s,p}` in Mathlib's bundled space**: in dimension `n ≥ 1`, for `1 < p < ∞` +and every real `s` there is a finite constant `C` such that every `f ∈ F^s_{p,2}(V)`, as an element +of Mathlib's `H^{s,p}(V)`, has `‖f‖_{H^{s,p}} ≤ C ‖f‖_{F^s_{p,2}}`; the constant is existential. +The `L_p` function of the bundled element is the function `h` of +`Rd.exists_besselPotential_eq_of_memTriebelLizorkin`, since both represent `J_s f` +(`Rd.eq_of_toTemperedDistribution_eq`, `BesselPotentialSpace.enorm_toLp_eq`). -/ +theorem exists_enorm_toBesselPotentialSpace_le [Nontrivial V] (hp1 : 1 < p) (hp : p ≠ ∞) + (s : ℝ) : + ∃ C : ℝ≥0∞, C ≠ ∞ ∧ ∀ (f : Lp ℂ p (volume : Measure V)) (hf : MemTriebelLizorkin s 2 f), + ‖(memSobolev_bessel_of_memTriebelLizorkin hp1 hp hf).toBesselPotentialSpace‖ₑ ≤ + C * triebelLizorkinNorm s 2 f := by + obtain ⟨C, hC, hC₁⟩ := exists_besselPotential_eq_of_memTriebelLizorkin (V := V) hp1 hp s + refine ⟨C, hC, fun f hf => ?_⟩ + obtain ⟨h, hh, hnorm⟩ := hC₁ f hf + set X := (memSobolev_bessel_of_memTriebelLizorkin hp1 hp hf).toBesselPotentialSpace + have hX : X.toLp = h := eq_of_toTemperedDistribution_eq (by + rw [← X.bessel_toDistr_eq_toLp, ← hh, + TemperedDistribution.MemSobolev.toBesselPotentialSpace_toDistr]) + rw [← BesselPotentialSpace.enorm_toLp_eq, hX] + exact hnorm + +/-- **`H^{s,p} ⊆ F^s_{p,2}` in Mathlib's bundled space, for `s ≥ 0`**: in dimension `n ≥ 1`, for +`1 < p < ∞` and real `s ≥ 0` there is a finite constant `C` such that every element `F` of +Mathlib's `H^{s,p}(V)` is an `L_p` function `g ∈ F^s_{p,2}(V)` with +`‖g‖_{F^s_{p,2}} ≤ C ‖F‖_{H^{s,p}}`; the constant is existential +(`Rd.exists_memTriebelLizorkin_of_besselPotential_eq` for the distribution and the `L_p` function +of `F`, `BesselPotentialSpace.enorm_toLp_eq`). -/ +theorem exists_memTriebelLizorkin_toDistr [Nontrivial V] (hp1 : 1 < p) (hp : p ≠ ∞) {s : ℝ} + (hs : 0 ≤ s) : + ∃ C : ℝ≥0∞, C ≠ ∞ ∧ ∀ F : H^{s, p}(V, ℂ), ∃ g : Lp ℂ p (volume : Measure V), + (g : 𝓢'(V, ℂ)) = F.toDistr ∧ MemTriebelLizorkin s 2 g ∧ + triebelLizorkinNorm s 2 g ≤ C * ‖F‖ₑ := by + obtain ⟨C, hC, hC₂⟩ := exists_memTriebelLizorkin_of_besselPotential_eq (V := V) hp1 hp hs + refine ⟨C, hC, fun F => ?_⟩ + rw [← BesselPotentialSpace.enorm_toLp_eq] + exact hC₂ F.toDistr F.toLp F.bessel_toDistr_eq_toLp + +/-- **`F^s_{p,2} = H^{s,p} ∩ L_p` for every real `s`**: in dimension `n ≥ 1`, for `1 < p < ∞` +and real `s`, an `L_p` function `f` lies in `F^s_{p,2}(V)` iff it lies in Mathlib's Bessel +potential space, `J_s f ∈ L_p(V)` (`Rd.memSobolev_bessel_of_memTriebelLizorkin`, +`Rd.exists_triebelLizorkinNorm_le_of_besselPotential_eq`). -/ +theorem memTriebelLizorkin_iff_memSobolev_bessel [Nontrivial V] (hp1 : 1 < p) (hp : p ≠ ∞) + {s : ℝ} (f : Lp ℂ p (volume : Measure V)) : + MemTriebelLizorkin s 2 f ↔ TemperedDistribution.MemSobolev s p (f : 𝓢'(V, ℂ)) := by + refine ⟨memSobolev_bessel_of_memTriebelLizorkin hp1 hp, fun ⟨h, hh⟩ => ?_⟩ + obtain ⟨C, hC, hC₂⟩ := exists_triebelLizorkinNorm_le_of_besselPotential_eq (V := V) hp1 hp s + exact (hC₂ f h hh).trans_lt (ENNReal.mul_lt_top hC.lt_top eNorm_lt_top) + +/-- **`W^m_p = H^{m,p}` (Calderón)**: in dimension `n ≥ 1`, for `1 < p < ∞`, `m ∈ ℕ` and +`f ∈ L_p(V)`, `f` lies in the Sobolev space `W^m_p(V)` of weak derivatives iff it lies in +Mathlib's Bessel potential space `H^{m,p}(V)`: both are `F^m_{p,2}(V)` +(`Rd.memSobolev_iff_memTriebelLizorkin`, `Rd.memTriebelLizorkin_iff_memSobolev_bessel`). -/ +theorem memSobolev_iff_memSobolev_bessel [Nontrivial V] (hp1 : 1 < p) (hp : p ≠ ∞) {m : ℕ} + (f : Lp ℂ p (volume : Measure V)) : + MemSobolev m f ↔ TemperedDistribution.MemSobolev (m : ℝ) p (f : 𝓢'(V, ℂ)) := by + rw [memSobolev_iff_memTriebelLizorkin hp1 hp, + memTriebelLizorkin_iff_memSobolev_bessel hp1 hp] + +end Rd diff --git a/LeanPool/FunctionSpaces/Rd/BesselPotentials/UniformSchwartzFamilies.lean b/LeanPool/FunctionSpaces/Rd/BesselPotentials/UniformSchwartzFamilies.lean new file mode 100644 index 0000000000..ed3344c32e --- /dev/null +++ b/LeanPool/FunctionSpaces/Rd/BesselPotentials/UniformSchwartzFamilies.lean @@ -0,0 +1,528 @@ +/- +Copyright (c) 2026 Mario Ullrich. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Mario Ullrich +-/ +module + +public import LeanPool.FunctionSpaces.Rd.Sobolev.DerivativeKernels + +/- +Modified for Lean Pool: module names and imports adapted. +-/ + +/-! +# Uniform Schwartz families and the Bessel kernels + +On a finite-dimensional real inner product space `V` with Lebesgue measure, let `J_σ` be the +Bessel potential on Schwartz functions, the Fourier multiplier with the Bessel weight +`⟨ξ⟩^σ = (1 + ‖ξ‖²)^{σ/2}` (`Rd.besselSchwartz`, the restriction of Mathlib's +`TemperedDistribution.besselPotential`). For every Schwartz function `ω` it maps the dilate +`ω_{2^j}`, `ω_c(x) = c^n ω(c x)`, to `2^{jσ} (K_j)_{2^j}` with the **Bessel kernels** +`K_j = 𝓕⁻¹[(2^{-2j} + ‖ζ‖²)^{σ/2} ω̂]` (`Rd.besselKernelFamily`, +`Rd.besselSchwartz_schwartzDilate`, and `Rd.besselPotential_schwartzDilate` for Mathlib's +`J_σ` on tempered distributions); the factor has size `|(2^j)^σ| = 2^{jσ}` +(`Rd.enorm_two_pow_rpow`). + +* **Uniform families under continuous linear maps**: a family is uniformly Schwartz exactly + when its range is bounded in the Schwartz space + (`Rd.exists_isUniformSchwartz_iff_isVonNBounded`), so with `(G_j)` also `(T G_j)` is uniformly + Schwartz for every continuous linear map `T` of the Schwartz space + (`Rd.IsUniformSchwartz.exists_map`, from Mathlib's `Bornology.IsVonNBounded.image`); in + particular for `𝓕⁻¹` (`Rd.exists_isUniformSchwartz_fourierInv`). +* **The shifted Bessel symbols** `(ε + ‖ζ‖²)^{σ/2}` (`Rd.besselSymbol`) have derivatives of every + order bounded on an annulus `{a ≤ ‖ζ‖ ≤ b}`, `a > 0`, uniformly in `ε ∈ (0, 1]` + (`Rd.exists_norm_iteratedFDeriv_besselSymbol_le`), by the Faà di Bruno bound for compositions + and compactness (`ContDiffOn.exists_norm_iteratedFDerivWithin_le`). +* **The symbol and kernel families**: if `ω̂` vanishes outside such an annulus, then + `j ↦ (2^{-2j} + ‖ζ‖²)^{σ/2} ω̂` and `j ↦ K_j` are uniformly Schwartz + (`Rd.exists_isUniformSchwartz_besselSymbolFamily`, + `Rd.exists_isUniformSchwartz_besselKernelFamily`); the bounds are existential. +* **The dilated Bessel kernels form a Calderón–Zygmund family** when `b = 2^N a`, with the + explicit overlap `Rd.besselOverlap` and an existential Hörmander constant + (`Rd.exists_isCZFamily_besselKernelFamily`). At most `N + 1` of them see a frequency + (`ENNReal.tsum_le_of_dyadic_annulus`). The Fourier transforms of `ψ_1`, + `Rd.psiBase (j+1)` and `Rd.psiDualBase (j+2)` vanish outside such annuli. +-/ + +@[expose] public section + +open MeasureTheory Module Metric Filter Set +open scoped ENNReal SchwartzMap FourierTransform +open TemperedDistribution (besselPotential) + +namespace Rd + +variable {V : Type*} [NormedAddCommGroup V] [InnerProductSpace ℝ V] [FiniteDimensional ℝ V] + [MeasurableSpace V] [BorelSpace V] + +/-! ### Uniform families under continuous linear maps -/ + +omit [FiniteDimensional ℝ V] [MeasurableSpace V] [BorelSpace V] in +/-- **Uniform families are the bounded families**: a family `(G_j)` of Schwartz functions is +uniformly Schwartz for some bounds exactly when its range is a bounded set of the Schwartz space +in the sense of topological vector spaces (von Neumann bounded). Both say that every Schwartz +seminorm is bounded on the family (Mathlib's `WithSeminorms.isVonNBounded_iff_seminorm_bddAbove` +with `schwartz_withSeminorms`). -/ +theorem exists_isUniformSchwartz_iff_isVonNBounded (G : ℕ → 𝓢(V, ℂ)) : + (∃ A, IsUniformSchwartz G A) ↔ Bornology.IsVonNBounded ℝ (Set.range G) := by + rw [(schwartz_withSeminorms ℝ V ℂ).isVonNBounded_iff_seminorm_bddAbove] + constructor + · rintro ⟨A, hA⟩ ⟨k, l⟩ + refine ⟨A k l, ?_⟩ + rintro _ ⟨_, ⟨j, rfl⟩, rfl⟩ + exact hA j k l + · intro h + choose A hA using h + exact ⟨fun k l => A (k, l), fun j k l => hA (k, l) ⟨G j, ⟨j, rfl⟩, rfl⟩⟩ + +omit [FiniteDimensional ℝ V] [MeasurableSpace V] [BorelSpace V] in +/-- **Continuous linear maps preserve uniform families**: if `(G_j)` is uniformly Schwartz and +`T` is a continuous linear map of the Schwartz space, then `(T G_j)` is uniformly Schwartz. This +is the form for indexed families of Mathlib's `Bornology.IsVonNBounded.image`, since a family is +uniformly Schwartz exactly when its range is bounded in `𝓢(V, ℂ)` +(`Rd.exists_isUniformSchwartz_iff_isVonNBounded`). -/ +theorem IsUniformSchwartz.exists_map {G : ℕ → 𝓢(V, ℂ)} {A : ℕ → ℕ → ℝ} + (h : IsUniformSchwartz G A) (T : 𝓢(V, ℂ) →L[ℝ] 𝓢(V, ℂ)) : + ∃ A' : ℕ → ℕ → ℝ, IsUniformSchwartz (fun j => T (G j)) A' := by + rw [exists_isUniformSchwartz_iff_isVonNBounded, show Set.range (fun j => T (G j)) = + T '' Set.range G from Set.range_comp T G] + exact ((exists_isUniformSchwartz_iff_isVonNBounded G).1 ⟨A, h⟩).image T + +/-- **The inverse Fourier transform preserves uniform families**: `𝓕⁻` is a continuous linear +map of the Schwartz space (`Rd.IsUniformSchwartz.exists_map`). -/ +theorem exists_isUniformSchwartz_fourierInv {G : ℕ → 𝓢(V, ℂ)} {A : ℕ → ℕ → ℝ} + (h : IsUniformSchwartz G A) : ∃ A' : ℕ → ℕ → ℝ, IsUniformSchwartz (fun j => 𝓕⁻ (G j)) A' := + h.exists_map (FourierTransform.fourierInvCLM ℝ 𝓢(V, ℂ)) + +/-! ### The shifted Bessel symbols -/ + +omit [InnerProductSpace ℝ V] [FiniteDimensional ℝ V] [MeasurableSpace V] [BorelSpace V] in +/-- The **shifted Bessel symbol** `ζ ↦ (ε + ‖ζ‖²)^{σ/2}`, as a complex-valued function. For +`ε = 1` it is the symbol of Mathlib's Bessel potential `TemperedDistribution.besselPotential`. -/ +noncomputable def besselSymbol (ε σ : ℝ) (ζ : V) : ℂ := (((ε + ‖ζ‖ ^ 2) ^ (σ / 2) : ℝ) : ℂ) + +omit [InnerProductSpace ℝ V] [FiniteDimensional ℝ V] [MeasurableSpace V] [BorelSpace V] in +/-- The shifted Bessel symbol is `t ↦ t^{σ/2}` composed with `ζ ↦ ε + ‖ζ‖²`. -/ +theorem besselSymbol_eq_comp (ε σ : ℝ) : + besselSymbol (V := V) ε σ = (fun t : ℝ => ((t ^ (σ / 2) : ℝ) : ℂ)) ∘ fun ζ => ε + ‖ζ‖ ^ 2 := + rfl + +omit [InnerProductSpace ℝ V] [FiniteDimensional ℝ V] [MeasurableSpace V] [BorelSpace V] in +/-- For `ε = 1` the shifted Bessel symbol is the Bessel weight `⟨ξ⟩^σ = (1 + ‖ξ‖²)^{σ/2}` +(`Rd.besselWeight`), the symbol of Mathlib's Bessel potential. -/ +theorem besselSymbol_one (σ : ℝ) : besselSymbol (V := V) 1 σ = fun ξ => (besselWeight σ ξ : ℂ) := + rfl + +/-- The function `t ↦ t^τ`, as a complex-valued function, is smooth on `(0, ∞)`. -/ +theorem _root_.Complex.contDiffOn_ofReal_rpow_const (τ : ℝ) : + ContDiffOn ℝ ((⊤ : ℕ∞) : WithTop ℕ∞) (fun t : ℝ => ((t ^ τ : ℝ) : ℂ)) (Ioi 0) := + Complex.ofRealCLM.contDiff.comp_contDiffOn + (contDiffOn_fun_id.rpow_const_of_ne fun _ ht => (ne_of_gt ht)) + +omit [FiniteDimensional ℝ V] [MeasurableSpace V] [BorelSpace V] in +/-- For `ε > 0` the shifted Bessel symbol is smooth, since `ε + ‖ζ‖² > 0` everywhere. -/ +theorem contDiff_besselSymbol {ε : ℝ} (hε : 0 < ε) (σ : ℝ) : + ContDiff ℝ ((⊤ : ℕ∞) : WithTop ℕ∞) (besselSymbol (V := V) ε σ) := + Complex.ofRealCLM.contDiff.comp ((contDiff_const.add (contDiff_norm_sq ℝ)).rpow_const_of_ne + fun ζ => (add_pos_of_pos_of_nonneg hε (sq_nonneg ‖ζ‖)).ne') + +omit [FiniteDimensional ℝ V] [MeasurableSpace V] [BorelSpace V] in +/-- **The scaling identity of the symbols**: for `c > 0`, +`⟨ξ⟩^σ = (1 + ‖ξ‖²)^{σ/2} = c^σ (c^{-2} + ‖c^{-1} ξ‖²)^{σ/2}`, since +`c^{-2} + ‖c^{-1} ξ‖² = c^{-2} (1 + ‖ξ‖²)`. -/ +theorem besselWeight_eq_mul_besselSymbol {c : ℝ} (hc : 0 < c) (σ : ℝ) (ξ : V) : + (besselWeight σ ξ : ℂ) = ((c ^ σ : ℝ) : ℂ) * besselSymbol (c⁻¹ ^ 2) σ (c⁻¹ • ξ) := by + rw [besselWeight, besselSymbol, ← Complex.ofReal_mul] + congr 1 + have hX : 0 ≤ 1 + ‖ξ‖ ^ 2 := by positivity + rw [norm_smul, Real.norm_of_nonneg (inv_nonneg.2 hc.le), + show c⁻¹ ^ 2 + (c⁻¹ * ‖ξ‖) ^ 2 = c⁻¹ ^ 2 * (1 + ‖ξ‖ ^ 2) by ring, + Real.mul_rpow (sq_nonneg _) hX, ← Real.rpow_natCast_mul (inv_nonneg.2 hc.le), + show ((2 : ℕ) : ℝ) * (σ / 2) = σ by push_cast; ring, Real.inv_rpow hc.le, ← mul_assoc, + mul_inv_cancel₀ (Real.rpow_pos_of_pos hc σ).ne', one_mul] + +omit [FiniteDimensional ℝ V] [MeasurableSpace V] [BorelSpace V] in +/-- **Rescaling the shift**: `(ε + ‖ζ‖²)^{σ/2} = ε^{σ/2} ⟨ε^{-1/2} ζ⟩^σ` for `ε > 0`, the scaling +identity `Rd.besselWeight_eq_mul_besselSymbol` with `c = ε^{-1/2}`. -/ +theorem besselSymbol_eq_mul {ε : ℝ} (hε : 0 < ε) (σ : ℝ) (ζ : V) : + besselSymbol ε σ ζ = + ((ε ^ (σ / 2) : ℝ) : ℂ) * besselSymbol 1 σ ((Real.sqrt ε)⁻¹ • ζ) := by + have hs : 0 < Real.sqrt ε := Real.sqrt_pos.2 hε + have h := besselWeight_eq_mul_besselSymbol (inv_pos.2 hs) σ ((Real.sqrt ε)⁻¹ • ζ) + rw [inv_inv, Real.sq_sqrt hε.le, smul_inv_smul₀ hs.ne'] at h + rw [besselSymbol_one] + beta_reduce + rw [h, ← mul_assoc, ← Complex.ofReal_mul, Real.inv_rpow hs.le, + Real.sqrt_eq_rpow, ← Real.rpow_mul hε.le, show 1 / 2 * σ = σ / 2 by ring, + mul_inv_cancel₀ (Real.rpow_pos_of_pos hε _).ne', Complex.ofReal_one, one_mul] + +omit [FiniteDimensional ℝ V] [MeasurableSpace V] [BorelSpace V] in +/-- For `ε > 0` the shifted Bessel symbol has temperate growth: it is a constant times +Mathlib's Bessel symbol composed with a dilation (`Rd.besselSymbol_eq_mul`, +Mathlib's `Function.hasTemperateGrowth_one_add_norm_sq_rpow`). -/ +theorem hasTemperateGrowth_besselSymbol {ε : ℝ} (hε : 0 < ε) (σ : ℝ) : + (besselSymbol (V := V) ε σ).HasTemperateGrowth := by + have h1 : (fun ζ : V => besselSymbol 1 σ ((Real.sqrt ε)⁻¹ • ζ)).HasTemperateGrowth := + Complex.ofRealCLM.hasTemperateGrowth.comp + ((Function.hasTemperateGrowth_one_add_norm_sq_rpow V (σ / 2)).comp + ((Real.sqrt ε)⁻¹ • ContinuousLinearMap.id ℝ V).hasTemperateGrowth) + have h2 := (Function.HasTemperateGrowth.const ((ε ^ (σ / 2) : ℝ) : ℂ)).mul h1 + convert h2 using 1 + funext ζ + exact besselSymbol_eq_mul hε σ ζ + +omit [MeasurableSpace V] [BorelSpace V] in +/-- The derivatives of `ζ ↦ ε + ‖ζ‖²` of the orders `1 ≤ i ≤ r` are those of `ζ ↦ ‖ζ‖²`, so on +the ball of radius `b` they are at most `D^i` for one `D`, uniformly in `ε`. -/ +theorem exists_norm_iteratedFDeriv_add_norm_sq_le (b : ℝ) (r : ℕ) : + ∃ D : ℝ, ∀ ε : ℝ, ∀ i, 1 ≤ i → i ≤ r → ∀ ζ : V, ‖ζ‖ ≤ b → + ‖iteratedFDeriv ℝ i (fun ζ : V => ε + ‖ζ‖ ^ 2) ζ‖ ≤ D ^ i := by + obtain ⟨C, hC⟩ := (contDiff_norm_sq ℝ (E := V)).contDiffOn.exists_norm_iteratedFDerivWithin_le + uniqueDiffOn_univ (isCompact_closedBall (0 : V) b) (subset_univ _) r + refine ⟨max 1 C, fun ε i hi1 hir ζ hζ => ?_⟩ + have h := hC i hir ζ (mem_closedBall_zero_iff.2 hζ) + rw [iteratedFDerivWithin_univ] at h + rw [show (fun ζ : V => ε + ‖ζ‖ ^ 2) = (fun _ : V => ε) + fun ζ : V => ‖ζ‖ ^ 2 from rfl, + iteratedFDeriv_add_apply contDiffAt_const (contDiff_norm_sq ℝ).contDiffAt, + iteratedFDeriv_const_of_ne (by omega), Pi.zero_apply, zero_add] + calc _ ≤ C := h + _ ≤ max 1 C := le_max_right _ _ + _ ≤ max 1 C ^ i := le_self_pow₀ (le_max_left _ _) (by omega) + +omit [MeasurableSpace V] [BorelSpace V] in +/-- **Joint bounds for the shifted Bessel symbols**: for `0 < a`, `b`, `σ` and every order `r` +there is `C ≥ 0` with `‖D^r (ε + ‖·‖²)^{σ/2}(ζ)‖ ≤ C` for all `ε ∈ (0, 1]` and all `ζ` with +`a ≤ ‖ζ‖ ≤ b`. The symbol is `g ∘ f_ε` with `g(t) = t^{σ/2}`, smooth on `(0, ∞)`, and +`f_ε(ζ) = ε + ‖ζ‖² > 0`; the values `f_ε(ζ)` lie in the compact interval `[a², 1 + b²]`, where the +derivatives of `g` are bounded, the derivatives of `f_ε` of positive order are those of `‖·‖²`, +and Mathlib's Faà di Bruno bound `norm_iteratedFDeriv_comp_le'` combines the two. -/ +theorem exists_norm_iteratedFDeriv_besselSymbol_le {a : ℝ} (ha : 0 < a) (b σ : ℝ) (r : ℕ) : + ∃ C : ℝ, 0 ≤ C ∧ ∀ ε ∈ Ioc (0 : ℝ) 1, ∀ ζ : V, a ≤ ‖ζ‖ → ‖ζ‖ ≤ b → + ‖iteratedFDeriv ℝ r (besselSymbol ε σ) ζ‖ ≤ C := by + obtain ⟨C₁, hC₁⟩ := + (Complex.contDiffOn_ofReal_rpow_const (σ / 2)).exists_norm_iteratedFDerivWithin_le + isOpen_Ioi.uniqueDiffOn (isCompact_Icc (a := a ^ 2) (b := 1 + b ^ 2)) + (fun t ht => lt_of_lt_of_le (pow_pos ha 2) ht.1) r + obtain ⟨D, hD⟩ := exists_norm_iteratedFDeriv_add_norm_sq_le (V := V) b r + refine ⟨max 0 (r.factorial * C₁ * D ^ r), le_max_left _ _, fun ε hε ζ hζa hζb => ?_⟩ + have h2a : a ^ 2 ≤ ‖ζ‖ ^ 2 := pow_le_pow_left₀ ha.le hζa 2 + have h2b : ‖ζ‖ ^ 2 ≤ b ^ 2 := pow_le_pow_left₀ (norm_nonneg ζ) hζb 2 + rw [besselSymbol_eq_comp] + refine le_max_of_le_right (norm_iteratedFDeriv_comp_le' (t := Ioi 0) ?_ + isOpen_Ioi.uniqueDiffOn (Complex.contDiffOn_ofReal_rpow_const (σ / 2)) + (contDiff_const.add (contDiff_norm_sq ℝ)) (WithTop.coe_le_coe.2 le_top) ζ + (fun i hi => hC₁ i hi _ ⟨?_, ?_⟩) (fun i hi1 hir => hD ε i hi1 hir ζ hζb)) + · rintro _ ⟨y, rfl⟩ + exact add_pos_of_pos_of_nonneg hε.1 (sq_nonneg ‖y‖) + · linarith [hε.1] + · linarith [hε.2] + +omit [InnerProductSpace ℝ V] [FiniteDimensional ℝ V] [MeasurableSpace V] [BorelSpace V] in +/-- The bound `max((a²)^{σ/2}, (1 + b²)^{σ/2})` of the shifted Bessel symbols on the annulus +`{a ≤ ‖ζ‖ ≤ b}` for `ε ∈ [0, 1]` (`Rd.norm_besselSymbol_le`). -/ +noncomputable def besselSymbolBound (a b σ : ℝ) : ℝ := + max ((a ^ 2) ^ (σ / 2)) ((1 + b ^ 2) ^ (σ / 2)) + +/-- The bound `max((a²)^{σ/2}, (1 + b²)^{σ/2})` is nonnegative. -/ +theorem besselSymbolBound_nonneg (a b σ : ℝ) : 0 ≤ besselSymbolBound a b σ := + le_max_of_le_left (Real.rpow_nonneg (sq_nonneg a) _) + +omit [InnerProductSpace ℝ V] [FiniteDimensional ℝ V] [MeasurableSpace V] [BorelSpace V] in +/-- **Size of the shifted Bessel symbols on the annulus**: for `0 < a ≤ ‖ζ‖ ≤ b` and +`ε ∈ [0, 1]`, `|(ε + ‖ζ‖²)^{σ/2}| ≤ max((a²)^{σ/2}, (1 + b²)^{σ/2})`, since +`ε + ‖ζ‖² ∈ [a², 1 + b²]` and `t ↦ t^{σ/2}` is monotone. -/ +theorem norm_besselSymbol_le {a b ε σ : ℝ} (ha : 0 < a) (hε : ε ∈ Icc (0 : ℝ) 1) {ζ : V} + (h1 : a ≤ ‖ζ‖) (h2 : ‖ζ‖ ≤ b) : ‖besselSymbol ε σ ζ‖ ≤ besselSymbolBound a b σ := by + have h2a : a ^ 2 ≤ ε + ‖ζ‖ ^ 2 := by nlinarith [hε.1, pow_le_pow_left₀ ha.le h1 2] + have h2b : ε + ‖ζ‖ ^ 2 ≤ 1 + b ^ 2 := by + nlinarith [hε.2, pow_le_pow_left₀ (norm_nonneg ζ) h2 2] + have hpos : 0 < ε + ‖ζ‖ ^ 2 := lt_of_lt_of_le (pow_pos ha 2) h2a + rw [besselSymbol, Complex.norm_real, Real.norm_of_nonneg (Real.rpow_nonneg hpos.le _)] + by_cases hσ : 0 ≤ σ / 2 + · exact le_max_of_le_right (Real.rpow_le_rpow hpos.le h2b hσ) + · exact le_max_of_le_left (Real.rpow_le_rpow_of_nonpos (pow_pos ha 2) h2a (not_le.1 hσ).le) + +/-! ### The Bessel symbol and kernel families -/ + +/-- The **Bessel symbol family** of a Schwartz function `ω̂`: +`j ↦ (ζ ↦ (2^{-2j} + ‖ζ‖²)^{σ/2} ω̂(ζ))`, a Schwartz function since the symbol has temperate +growth (Mathlib's `SchwartzMap.smulLeftCLM`). -/ +noncomputable def besselSymbolFamily (ωhat : 𝓢(V, ℂ)) (σ : ℝ) (j : ℕ) : 𝓢(V, ℂ) := + SchwartzMap.smulLeftCLM ℂ (besselSymbol (((2 : ℝ) ^ j)⁻¹ ^ 2) σ) ωhat + +omit [FiniteDimensional ℝ V] [MeasurableSpace V] [BorelSpace V] in +/-- The Bessel symbol family is `ζ ↦ (2^{-2j} + ‖ζ‖²)^{σ/2} ω̂(ζ)`. -/ +theorem coe_besselSymbolFamily (ωhat : 𝓢(V, ℂ)) (σ : ℝ) (j : ℕ) : + (besselSymbolFamily ωhat σ j : V → ℂ) = + fun ζ => besselSymbol (((2 : ℝ) ^ j)⁻¹ ^ 2) σ ζ * ωhat ζ := by + rw [besselSymbolFamily, + SchwartzMap.smulLeftCLM_apply (hasTemperateGrowth_besselSymbol (by positivity) σ)] + rfl + +omit [FiniteDimensional ℝ V] [MeasurableSpace V] [BorelSpace V] in +/-- **The Leibniz bound against a Schwartz function**: if the derivatives of the smooth function +`g` at `x` of the orders `i ≤ l` are at most `C_i`, then +`‖D^l (g ω)(x)‖ ≤ ∑_{i ≤ l} C(l, i) C_i ‖ω‖_{0, l-i}` (Mathlib's `norm_iteratedFDeriv_mul_le`). -/ +theorem norm_iteratedFDeriv_mul_schwartz_le {g : V → ℂ} (hg : ContDiff ℝ ((⊤ : ℕ∞) : WithTop ℕ∞) g) + (ω : 𝓢(V, ℂ)) {l : ℕ} {C : ℕ → ℝ} {x : V} (hC : ∀ i ≤ l, ‖iteratedFDeriv ℝ i g x‖ ≤ C i) : + ‖iteratedFDeriv ℝ l (fun y => g y * ω y) x‖ ≤ + ∑ i ∈ Finset.range (l + 1), (l.choose i : ℝ) * C i * SchwartzMap.seminorm ℝ 0 (l - i) ω := by + refine (norm_iteratedFDeriv_mul_le hg (ω.smooth ⊤) x (WithTop.coe_le_coe.2 le_top)).trans ?_ + refine Finset.sum_le_sum fun i hi => ?_ + have hi' : i ≤ l := Nat.lt_succ_iff.1 (Finset.mem_range.1 hi) + have hCi : 0 ≤ C i := (norm_nonneg _).trans (hC i hi') + exact mul_le_mul (mul_le_mul_of_nonneg_left (hC i hi') (Nat.cast_nonneg _)) + (SchwartzMap.norm_iteratedFDeriv_le_seminorm ℝ ω (l - i) x) (norm_nonneg _) + (mul_nonneg (Nat.cast_nonneg _) hCi) + +omit [InnerProductSpace ℝ V] [FiniteDimensional ℝ V] [MeasurableSpace V] [BorelSpace V] in +/-- If a function vanishes outside the closed annulus `{a ≤ ‖ζ‖ ≤ b}`, the closure of its support +lies in that annulus. -/ +theorem mem_annulus_of_mem_tsupport {f : V → ℂ} {a b : ℝ} + (hf : ∀ ζ, f ζ ≠ 0 → a ≤ ‖ζ‖ ∧ ‖ζ‖ ≤ b) {x : V} (hx : x ∈ tsupport f) : + a ≤ ‖x‖ ∧ ‖x‖ ≤ b := by + have hclosed : IsClosed {ζ : V | a ≤ ‖ζ‖ ∧ ‖ζ‖ ≤ b} := + (isClosed_le continuous_const continuous_norm).inter + (isClosed_le continuous_norm continuous_const) + exact closure_minimal (fun ζ hζ => hf ζ hζ) hclosed hx + +omit [MeasurableSpace V] [BorelSpace V] in +/-- **The Bessel symbol families are uniformly Schwartz**: if `ω̂` vanishes outside the annulus +`{a ≤ ‖ζ‖ ≤ b}` with `a > 0`, then `j ↦ (2^{-2j} + ‖ζ‖²)^{σ/2} ω̂` is uniformly Schwartz. On the +annulus, `‖ζ‖^k ≤ |b|^k` and the Leibniz bound (`Rd.norm_iteratedFDeriv_mul_schwartz_le`) +combines the joint symbol bounds (`Rd.exists_norm_iteratedFDeriv_besselSymbol_le`) with the +seminorms of `ω̂`; outside the support of `ω̂` all derivatives vanish. The bounds are +existential. -/ +theorem exists_isUniformSchwartz_besselSymbolFamily {ωhat : 𝓢(V, ℂ)} {a b : ℝ} (ha : 0 < a) + (hω : ∀ ζ, ωhat ζ ≠ 0 → a ≤ ‖ζ‖ ∧ ‖ζ‖ ≤ b) (σ : ℝ) : + ∃ A : ℕ → ℕ → ℝ, IsUniformSchwartz (besselSymbolFamily ωhat σ) A := by + choose C hC0 hC using fun i => exists_norm_iteratedFDeriv_besselSymbol_le (V := V) ha b σ i + refine ⟨fun k l => |b| ^ k * ∑ i ∈ Finset.range (l + 1), + (l.choose i : ℝ) * C i * SchwartzMap.seminorm ℝ 0 (l - i) ωhat, fun j k l => ?_⟩ + have hsum : 0 ≤ ∑ i ∈ Finset.range (l + 1), + (l.choose i : ℝ) * C i * SchwartzMap.seminorm ℝ 0 (l - i) ωhat := + Finset.sum_nonneg fun i _ => mul_nonneg (mul_nonneg (Nat.cast_nonneg _) (hC0 i)) + (apply_nonneg _ _) + refine SchwartzMap.seminorm_le_bound ℝ k l _ (mul_nonneg (by positivity) hsum) fun x => ?_ + rw [coe_besselSymbolFamily] + have hε : ((2 : ℝ) ^ j)⁻¹ ^ 2 ∈ Ioc (0 : ℝ) 1 := + ⟨by positivity, pow_le_one₀ (by positivity) (inv_le_one_of_one_le₀ (one_le_pow₀ one_le_two))⟩ + by_cases hx : x ∈ tsupport ωhat + · obtain ⟨hxa, hxb⟩ := mem_annulus_of_mem_tsupport hω hx + exact mul_le_mul (pow_le_pow_left₀ (norm_nonneg x) (hxb.trans (le_abs_self b)) k) + (norm_iteratedFDeriv_mul_schwartz_le (contDiff_besselSymbol hε.1 σ) ωhat fun i _ => + hC i _ hε x hxa hxb) (norm_nonneg _) (by positivity) + · have hx' : x ∉ tsupport fun y => besselSymbol (((2 : ℝ) ^ j)⁻¹ ^ 2) σ y * ωhat y := + fun h => hx (tsupport_mul_subset_right h) + rw [Function.notMem_support.1 fun h => hx' (support_iteratedFDeriv_subset l h), norm_zero, + mul_zero] + exact mul_nonneg (by positivity) hsum + +/-- The **Bessel kernel family** `K_j = 𝓕⁻¹[(2^{-2j} + ‖ζ‖²)^{σ/2} ω̂]` of a Schwartz function +`ω̂`. -/ +noncomputable def besselKernelFamily (ωhat : 𝓢(V, ℂ)) (σ : ℝ) (j : ℕ) : 𝓢(V, ℂ) := + 𝓕⁻ (besselSymbolFamily ωhat σ j) + +/-- **The Bessel kernels are uniformly Schwartz** when `ω̂` vanishes outside an annulus +`{a ≤ ‖ζ‖ ≤ b}` with `a > 0` (`Rd.exists_isUniformSchwartz_besselSymbolFamily` and +`Rd.exists_isUniformSchwartz_fourierInv`); the bounds are existential. -/ +theorem exists_isUniformSchwartz_besselKernelFamily {ωhat : 𝓢(V, ℂ)} {a b : ℝ} (ha : 0 < a) + (hω : ∀ ζ, ωhat ζ ≠ 0 → a ≤ ‖ζ‖ ∧ ‖ζ‖ ≤ b) (σ : ℝ) : + ∃ A : ℕ → ℕ → ℝ, IsUniformSchwartz (besselKernelFamily ωhat σ) A := by + obtain ⟨A, hA⟩ := exists_isUniformSchwartz_besselSymbolFamily ha hω σ + exact exists_isUniformSchwartz_fourierInv hA + +/-- `𝓕K_j(ζ) = (2^{-2j} + ‖ζ‖²)^{σ/2} ω̂(ζ)`. -/ +theorem fourier_besselKernelFamily (ωhat : 𝓢(V, ℂ)) (σ : ℝ) (j : ℕ) (ζ : V) : + 𝓕 (besselKernelFamily ωhat σ j : V → ℂ) ζ = + besselSymbol (((2 : ℝ) ^ j)⁻¹ ^ 2) σ ζ * ωhat ζ := by + rw [← SchwartzMap.fourier_coe, besselKernelFamily, FourierInvPair.fourier_fourierInv_eq, + coe_besselSymbolFamily] + +/-- **The Bessel potential of a dilate**: for every Schwartz function `ω`, +`J_σ ω_{2^j} = 2^{jσ} (K_j)_{2^j}` with the Bessel kernels `K_j` of `ω̂ = 𝓕ω`, where `J_σ` is the +Bessel potential on Schwartz functions (`Rd.besselSchwartz`). Both sides have the Fourier +transform `⟨ξ⟩^σ ω̂(2^{-j} ξ)` (`Rd.besselWeight_eq_mul_besselSymbol`). -/ +theorem besselSchwartz_schwartzDilate (ω : 𝓢(V, ℂ)) (σ : ℝ) (j : ℕ) : + besselSchwartz σ (schwartzDilate (2 ^ j) (pow_ne_zero j two_ne_zero) ω) = + ((((2 : ℝ) ^ j) ^ σ : ℝ) : ℂ) • + schwartzDilate (2 ^ j) (pow_ne_zero j two_ne_zero) (besselKernelFamily (𝓕 ω) σ j) := by + have hc : (0 : ℝ) < 2 ^ j := by positivity + apply (FourierTransform.fourierCLE ℂ 𝓢(V, ℂ)).injective + simp only [besselSchwartz, FourierTransform.fourierCLE_apply, + SchwartzMap.fourierMultiplierCLM_apply, FourierInvPair.fourier_fourierInv_eq, + FourierTransform.fourier_smul] + ext ξ + rw [SchwartzMap.smulLeftCLM_apply_apply (hasTemperateGrowth_besselWeight σ), + smul_apply, SchwartzMap.fourier_coe, SchwartzMap.fourier_coe, coe_schwartzDilate, + coe_schwartzDilate, fourier_dilate _ hc, fourier_dilate _ hc, fourier_besselKernelFamily, + ← SchwartzMap.fourier_coe, besselWeight_eq_mul_besselSymbol hc σ ξ, smul_eq_mul, smul_eq_mul, + mul_assoc] + +/-- **Mathlib's Bessel potential of a dilate**: for every Schwartz function `ω`, Mathlib's +`J_σ = TemperedDistribution.besselPotential V ℂ σ` maps the tempered distribution of `ω_{2^j}` +to that of `2^{jσ} (K_j)_{2^j}` (`Rd.besselPotential_schwartz`, +`Rd.besselSchwartz_schwartzDilate`). -/ +theorem besselPotential_schwartzDilate (ω : 𝓢(V, ℂ)) (σ : ℝ) (j : ℕ) : + besselPotential V ℂ σ (schwartzDilate (2 ^ j) (pow_ne_zero j two_ne_zero) ω : 𝓢'(V, ℂ)) = + ((((2 : ℝ) ^ j) ^ σ : ℝ) : ℂ) • + (schwartzDilate (2 ^ j) (pow_ne_zero j two_ne_zero) (besselKernelFamily (𝓕 ω) σ j) : + 𝓢'(V, ℂ)) := by + rw [besselPotential_schwartz, besselSchwartz_schwartzDilate] + exact map_smul _ _ _ + +/-- The factor of a dilate has size `|(2^j)^σ| = 2^{jσ}`, the dyadic weight +`ENNReal.dyadicWeight σ j`. -/ +theorem enorm_two_pow_rpow (j : ℕ) (σ : ℝ) : + ‖((((2 : ℝ) ^ j) ^ σ : ℝ) : ℂ)‖ₑ = ENNReal.dyadicWeight σ j := by + rw [← ofReal_norm, Complex.norm_real, Real.norm_of_nonneg (by positivity), + ← ENNReal.ofReal_rpow_of_pos (by positivity), ENNReal.ofReal_pow (by norm_num), + ENNReal.ofReal_ofNat, ENNReal.dyadicWeight, ← ENNReal.rpow_natCast, ← ENNReal.rpow_mul] + +/-! ### The dilated Bessel kernels as a Calderón–Zygmund family -/ + +/-- `𝓕(K_j)_{2^j}(ξ) = (2^{-2j} + ‖ζ‖²)^{σ/2} ω̂(ζ)` with `ζ = 2^{-j} ξ`. -/ +theorem fourier_dilate_besselKernelFamily (ωhat : 𝓢(V, ℂ)) (σ : ℝ) (j : ℕ) (ξ : V) : + 𝓕 (dilate (2 ^ j) (besselKernelFamily ωhat σ j : V → ℂ)) ξ = + besselSymbol (((2 : ℝ) ^ j)⁻¹ ^ 2) σ (((2 : ℝ) ^ j)⁻¹ • ξ) * + ωhat (((2 : ℝ) ^ j)⁻¹ • ξ) := by + rw [fourier_dilate _ (by positivity), fourier_besselKernelFamily] + +/-- Where `𝓕(K_j)_{2^j}(ξ) ≠ 0`, the frequency `2^{-j} ξ` lies in the annulus +`{a ≤ ‖ζ‖ ≤ b}` outside which `ω̂` vanishes. -/ +theorem mem_annulus_of_fourier_dilate_besselKernelFamily_ne_zero {ωhat : 𝓢(V, ℂ)} {a b : ℝ} + (hω : ∀ ζ, ωhat ζ ≠ 0 → a ≤ ‖ζ‖ ∧ ‖ζ‖ ≤ b) {σ : ℝ} {j : ℕ} {ξ : V} + (h : 𝓕 (dilate (2 ^ j) (besselKernelFamily ωhat σ j : V → ℂ)) ξ ≠ 0) : + a ≤ ‖ξ‖ / 2 ^ j ∧ ‖ξ‖ / 2 ^ j ≤ b := by + rw [fourier_dilate_besselKernelFamily] at h + rw [← norm_two_pow_inv_smul] + exact hω _ (right_ne_zero_of_mul h) + +/-- **Size of the dilated Bessel kernels on the Fourier side**: if `ω̂` vanishes outside the +annulus `{a ≤ ‖ζ‖ ≤ b}`, `a > 0`, then +`|𝓕(K_j)_{2^j}(ξ)| ≤ max((a²)^{σ/2}, (1 + b²)^{σ/2}) sup |ω̂|` (`Rd.norm_besselSymbol_le`). -/ +theorem enorm_fourier_dilate_besselKernelFamily_le {ωhat : 𝓢(V, ℂ)} {a b : ℝ} (ha : 0 < a) + (hω : ∀ ζ, ωhat ζ ≠ 0 → a ≤ ‖ζ‖ ∧ ‖ζ‖ ≤ b) (σ : ℝ) (j : ℕ) (ξ : V) : + ‖𝓕 (dilate (2 ^ j) (besselKernelFamily ωhat σ j : V → ℂ)) ξ‖ₑ ≤ + ENNReal.ofReal (besselSymbolBound a b σ * SchwartzMap.seminorm ℝ 0 0 ωhat) := by + rw [← ofReal_norm] + refine ENNReal.ofReal_le_ofReal ?_ + rw [fourier_dilate_besselKernelFamily, norm_mul] + by_cases h0 : ωhat (((2 : ℝ) ^ j)⁻¹ • ξ) = 0 + · rw [h0, norm_zero, mul_zero] + exact mul_nonneg (besselSymbolBound_nonneg a b σ) (apply_nonneg _ _) + · obtain ⟨h1, h2⟩ := hω _ h0 + have hε : ((2 : ℝ) ^ j)⁻¹ ^ 2 ∈ Icc (0 : ℝ) 1 := + ⟨by positivity, pow_le_one₀ (by positivity) (inv_le_one_of_one_le₀ (one_le_pow₀ one_le_two))⟩ + exact mul_le_mul (norm_besselSymbol_le ha hε h1 h2) + (SchwartzMap.norm_le_seminorm ℝ ωhat _) (norm_nonneg _) + ((norm_nonneg _).trans (norm_besselSymbol_le ha hε h1 h2)) + +/-- The **overlap of the dilated Bessel kernels** +`(N + 1) (max((a²)^{σ/2}, (1 + (2^N a)²)^{σ/2}) sup |ω̂|)²` for `ω̂` vanishing outside the annulus +`{a ≤ ‖ζ‖ ≤ 2^N a}`: at most `N + 1` kernels see a frequency +(`Rd.tsum_fourier_dilate_besselKernelFamily_sq_le`). -/ +noncomputable def besselOverlap (a : ℝ) (N : ℕ) (σ : ℝ) (ωhat : 𝓢(V, ℂ)) : ℝ≥0∞ := + (N + 1) * ENNReal.ofReal (besselSymbolBound a (2 ^ N * a) σ * + SchwartzMap.seminorm ℝ 0 0 ωhat) ^ 2 + +omit [FiniteDimensional ℝ V] [MeasurableSpace V] [BorelSpace V] in +/-- The overlap of the dilated Bessel kernels is finite. -/ +theorem besselOverlap_ne_top (a : ℝ) (N : ℕ) (σ : ℝ) (ωhat : 𝓢(V, ℂ)) : + besselOverlap a N σ ωhat ≠ ∞ := + ENNReal.mul_ne_top (by simp) (ENNReal.pow_ne_top ENNReal.ofReal_ne_top) + +/-- **At most `N + 1` dilated Bessel kernels see a frequency**: if `ω̂` vanishes outside the +annulus `{a ≤ ‖ζ‖ ≤ 2^N a}`, `a > 0`, and `i₀` is the least index with `‖ξ‖ ≤ 2^{i₀+N} a`, then +`𝓕(K_j)_{2^j}(ξ) ≠ 0` forces `i₀ ≤ j ≤ i₀ + N` (`Nat.le_add_of_dyadic_annulus`). -/ +theorem mem_Icc_of_fourier_dilate_besselKernelFamily_ne_zero {ωhat : 𝓢(V, ℂ)} {a : ℝ} {N : ℕ} + (ha : 0 < a) (hω : ∀ ζ, ωhat ζ ≠ 0 → a ≤ ‖ζ‖ ∧ ‖ζ‖ ≤ 2 ^ N * a) {σ : ℝ} {ξ : V} {i₀ j : ℕ} + (hi₀ : ‖ξ‖ ≤ 2 ^ i₀ * (2 ^ N * a)) (hmin : ∀ i < i₀, ¬ ‖ξ‖ ≤ 2 ^ i * (2 ^ N * a)) + (h : 𝓕 (dilate (2 ^ j) (besselKernelFamily ωhat σ j : V → ℂ)) ξ ≠ 0) : + j ∈ Finset.Icc i₀ (i₀ + N) := by + obtain ⟨h1, h2⟩ := mem_annulus_of_fourier_dilate_besselKernelFamily_ne_zero hω h + rw [div_le_iff₀ (by positivity)] at h2 + have hlo : i₀ ≤ j := by + by_contra hlt + exact hmin j (not_le.1 hlt) (h2.trans_eq (by ring)) + have hi : ‖ξ‖ / 2 ^ i₀ ≤ 2 ^ N * a := by + rw [div_le_iff₀ (by positivity)] + exact hi₀.trans_eq (by ring) + exact Finset.mem_Icc.2 ⟨hlo, Nat.le_add_of_dyadic_annulus ha h1 hi⟩ + +/-- **Overlap of the dilated Bessel kernels**: if `ω̂` vanishes outside the annulus +`{a ≤ ‖ζ‖ ≤ 2^N a}`, `a > 0`, then `∑_j |𝓕(K_j)_{2^j}(ξ)|² ≤ Rd.besselOverlap a N σ ω̂` for every +`ξ`: a nonzero term needs `‖ξ‖ / 2^j ∈ [a, 2^N a]` +(`Rd.mem_annulus_of_fourier_dilate_besselKernelFamily_ne_zero`), so at most `N + 1` terms are +nonzero (`ENNReal.tsum_le_of_dyadic_annulus`), each bounded by +`Rd.enorm_fourier_dilate_besselKernelFamily_le`. -/ +theorem tsum_fourier_dilate_besselKernelFamily_sq_le {ωhat : 𝓢(V, ℂ)} {a : ℝ} {N : ℕ} + (ha : 0 < a) (hω : ∀ ζ, ωhat ζ ≠ 0 → a ≤ ‖ζ‖ ∧ ‖ζ‖ ≤ 2 ^ N * a) (σ : ℝ) (ξ : V) : + ∑' j, ‖𝓕 (dilate (2 ^ j) (besselKernelFamily ωhat σ j : V → ℂ)) ξ‖ₑ ^ 2 ≤ + besselOverlap a N σ ωhat := + ENNReal.tsum_le_of_dyadic_annulus ha + (fun j => by + gcongr + exact enorm_fourier_dilate_besselKernelFamily_le ha hω σ j ξ) + fun j hj => mem_annulus_of_fourier_dilate_besselKernelFamily_ne_zero (σ := σ) (ξ := ξ) hω + fun h => hj (by simp [h]) + +/-- **The dilated Bessel kernels form a Calderón–Zygmund family**: if `ω̂` is a Schwartz function +vanishing outside the annulus `{a ≤ ‖ζ‖ ≤ 2^N a}` with `a > 0`, then for every real `σ` the +family `j ↦ (K_j)_{2^j}`, `K_j = 𝓕⁻¹[(2^{-2j} + ‖ζ‖²)^{σ/2} ω̂]`, is a Calderón–Zygmund family +with the overlap `Rd.besselOverlap a N σ ω̂` and some finite Hörmander constant `H` (existential, +from the uniform Schwartz bounds of `Rd.exists_isUniformSchwartz_besselKernelFamily` and +`Rd.IsCZFamily.of_dilation`). -/ +theorem exists_isCZFamily_besselKernelFamily {ωhat : 𝓢(V, ℂ)} {a : ℝ} {N : ℕ} (ha : 0 < a) + (hω : ∀ ζ, ωhat ζ ≠ 0 → a ≤ ‖ζ‖ ∧ ‖ζ‖ ≤ 2 ^ N * a) (σ : ℝ) : + ∃ H : ℝ≥0∞, H ≠ ∞ ∧ IsCZFamily (fun j => dilate (2 ^ j) (besselKernelFamily ωhat σ j : V → ℂ)) + (besselOverlap a N σ ωhat) H := by + obtain ⟨A, hA⟩ := exists_isUniformSchwartz_besselKernelFamily ha hω σ + exact ⟨4 * familyHormanderConst V A, + ENNReal.mul_ne_top ENNReal.ofNat_ne_top (familyHormanderConst_ne_top A), + IsCZFamily.of_dilation hA (tsum_fourier_dilate_besselKernelFamily_sq_le ha hω σ)⟩ + +/-! ### Annuli of the Littlewood–Paley kernels -/ + +/-- `𝓕ψ_1` vanishes outside the annulus `{1 ≤ ‖ζ‖ ≤ 2^2 · 1}`. The bound is written as `2^2 · 1` +to match the hypothesis of `Rd.exists_isCZFamily_besselKernelFamily` with `a = 1`, `N = 2`. -/ +theorem mem_annulus_of_fourier_psiOneS_ne_zero {ζ : V} (h : 𝓕 (psiOneS (V := V)) ζ ≠ 0) : + 1 ≤ ‖ζ‖ ∧ ‖ζ‖ ≤ 2 ^ 2 * 1 := by + rw [fourier_psiOneS_apply] at h + have h4 := norm_lt_of_fourier_psi_ne_zero h + norm_num at h4 ⊢ + exact ⟨(one_lt_norm_of_fourier_psi_one_ne_zero h).le, h4.le⟩ + +/-- `𝓕(psiBase (j+1)) = 𝓕(Φ - δ_{1/2} Φ)` vanishes outside the annulus +`{1/2 ≤ ‖ζ‖ ≤ 2^2 · 1/2}`: `psiBase (j+1) = psiBase 1` and `ψ_1 = (psiBase 1)_2`, so +`𝓕(psiBase 1)(ζ) = 𝓕ψ_1(2ζ)` (`Rd.fourier_eq_fourier_dilate`) and `1 ≤ ‖2ζ‖ ≤ 4`. The bound is +written as `2^2 · 2⁻¹` to match the hypothesis of `Rd.exists_isCZFamily_besselKernelFamily` with +`a = 1/2`, `N = 2`. -/ +theorem mem_annulus_of_fourier_psiBase_ne_zero {j : ℕ} {ζ : V} + (h : 𝓕 (psiBase (V := V) (j + 1)) ζ ≠ 0) : 2⁻¹ ≤ ‖ζ‖ ∧ ‖ζ‖ ≤ 2 ^ 2 * 2⁻¹ := by + change 𝓕 (psiBase (V := V) 1) ζ ≠ 0 at h + have h' : 𝓕 (psiOneS (V := V)) ((2 : ℝ) • ζ) ≠ 0 := by + rw [SchwartzMap.fourier_coe] at h ⊢ + rwa [psiOneS, coe_schwartzDilate, ← fourier_eq_fourier_dilate _ two_pos] + obtain ⟨h1, h2⟩ := mem_annulus_of_fourier_psiOneS_ne_zero h' + rw [norm_smul, Real.norm_two] at h1 h2 + constructor <;> linarith + +/-- `𝓕(psiDualBase (j+2)) = 𝓕(δ_2 Φ - δ_{1/4} Φ)` vanishes outside the annulus +`{1/4 ≤ ‖ζ‖ ≤ 2^4 · 1/4}`: `psiDualBase (j+2) = psiDualBase 2` and +`psiDual_2 = (psiDualBase 2)_4`, whose Fourier transform vanishes outside `{1 < ‖ξ‖ < 16}`. The +bound is written as `2^4 · 4⁻¹` to match the hypothesis of +`Rd.exists_isCZFamily_besselKernelFamily` with `a = 1/4`, `N = 4`. -/ +theorem mem_annulus_of_fourier_psiDualBase_ne_zero {j : ℕ} {ζ : V} + (h : 𝓕 (psiDualBase (V := V) (j + 2)) ζ ≠ 0) : 4⁻¹ ≤ ‖ζ‖ ∧ ‖ζ‖ ≤ 2 ^ 4 * 4⁻¹ := by + change 𝓕 (psiDualBase (V := V) 2) ζ ≠ 0 at h + rw [SchwartzMap.fourier_coe, fourier_eq_fourier_dilate _ (pow_pos two_pos 2), + dilate_psiDualBase] at h + have h1 := lt_norm_of_fourier_psiDual_ne_zero (m := 0) h + have h2 := norm_lt_of_fourier_psiDual_ne_zero h + rw [norm_smul, Real.norm_of_nonneg (by positivity)] at h1 h2 + norm_num at h1 h2 ⊢ + constructor <;> linarith + +end Rd diff --git a/LeanPool/FunctionSpaces/Rd/Differences/BesovDifferences.lean b/LeanPool/FunctionSpaces/Rd/Differences/BesovDifferences.lean new file mode 100644 index 0000000000..e074a09f05 --- /dev/null +++ b/LeanPool/FunctionSpaces/Rd/Differences/BesovDifferences.lean @@ -0,0 +1,153 @@ +/- +Copyright (c) 2026 Mario Ullrich. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Mario Ullrich +-/ +module + +public import LeanPool.FunctionSpaces.Rd.Approximation.BandJackson +public import LeanPool.FunctionSpaces.Rd.Approximation.BandInverse +public import LeanPool.FunctionSpaces.Rd.LittlewoodPaley.LittlewoodPaley +public import LeanPool.FunctionSpaces.ApproximationSpaces.Moduli + +/- +Modified for Lean Pool: module names and imports adapted. +-/ + +/-! +# Besov spaces on `V` by differences + +For `1 ≤ p < ∞` and `r ≥ 1`, the modulus of smoothness `ω_r(f, t)_p` of `f ∈ L_p(V)` is +compatible with the band-limited scheme with inverse order `r` (`Rd.bandModulusData`): +Jackson's inequality `E(f, E_k)_p ≤ C_J ω_r(f, 2^(-k))_p` (`Rd.approxError_bandScheme_le`) and the +inverse inequality `ω_r(a, 2^(-k))_p ≤ C_B 2^(-(k-j) r) ‖a‖_p` for `a ∈ E_j` +(`Rd.lpModulus_le_of_mem_bandSpace`). Its classical quasi-norm is +`‖f‖_p + ‖(2^(ks) ω_r(f, 2^(-k))_p)_k‖_{ℓ_q}` (`Rd.modNorm_bandModulusData`). The +coincidence theorem for moduli (`ApproximationScheme.ModulusData.memApprox_iff_modNorm_lt_top`) +gives, for `0 ≤ s < r`: + +`f ∈ A^s_q(L_p, (E_k)) ⟺ ‖f‖_p + ‖(2^(ks) ω_r(f, 2^(-k))_p)_k‖_{ℓ_q} < ∞` + +(`Rd.memApprox_bandScheme_iff_modulus`). With the Littlewood–Paley characterisation +(`Rd.memApprox_bandScheme_iff`), the three descriptions of `B^s_{p,q}(V)` coincide for `0 < s < r`: +by approximation with band-limited functions, by Littlewood–Paley blocks, and by differences +(`Rd.littlewoodPaleyNorm_lt_top_iff_modulus`). Since `ω_{r+l} ≤ 2^l ω_r` +(`Rd.lpModulus_add_order_le`), the norm with moduli of order `L ≥ r` is at most `2^(L-r)` times +the norm with order `r` (`Rd.modNorm_order_le_of_le`), and the norm with moduli in `ℓ_1` is +countably subadditive (`Rd.modNorm_one_tsum_le`). +-/ + +@[expose] public section + +open MeasureTheory +open scoped ENNReal + +namespace Rd + +open ENNReal (lqNorm dyadicWeight) + +variable {V : Type*} [NormedAddCommGroup V] [InnerProductSpace ℝ V] [FiniteDimensional ℝ V] + [MeasurableSpace V] [BorelSpace V] {p : ℝ≥0∞} [Fact (1 ≤ p)] + +/-- **The modulus of smoothness is compatible with the band-limited scheme**, with inverse order +`r`: Jackson's inequality from level `0` on, and the inverse inequality for band-limited +functions. -/ +noncomputable def bandModulusData (hp : p ≠ ∞) (r : ℕ) : + ApproximationScheme.ModulusData (bandScheme (V := V) hp) r where + modulus f k := lpModulus p r f k + add_le f g k := lpModulus_add_le r f g k + C0 := 2 ^ r + C0_ne_top := by simp + le_enorm f k := lpModulus_le r f k + jacksonStart := 0 + CJ := jacksonConst V r p + CJ_ne_top := jacksonConst_ne_top Fact.out hp r + jackson f k _ := approxError_bandScheme_le hp r k f + CB := bandInverseConst V r + CB_ne_top := bandInverseConst_ne_top r + inverse _ _ _ ha := lpModulus_le_of_mem_bandSpace hp r (mem_bandScheme_two_pow.1 ha) + +/-- The classical quasi-norm of `Rd.bandModulusData hp r` is +`‖f‖_p + ‖(2^(ks) ω_r(f, 2^(-k))_p)_k‖_{ℓ_q}`. -/ +theorem modNorm_bandModulusData (hp : p ≠ ∞) (r : ℕ) (s : ℝ) (q : ℝ≥0∞) + (f : Lp ℂ p (volume : Measure V)) : + (bandModulusData hp r).modNorm s q f = + ‖f‖ₑ + lqNorm q (fun k => dyadicWeight s k * lpModulus p r f k) := rfl + +/-- **Band-limited approximation and moduli of smoothness**: for `1 ≤ p < ∞`, `0 ≤ s < r` and +`1 ≤ q ≤ ∞`, `f ∈ A^s_q(L_p, (E_k))` iff `‖f‖_p + ‖(2^(ks) ω_r(f, 2^(-k))_p)_k‖_{ℓ_q} < ∞`. -/ +theorem memApprox_bandScheme_iff_modulus (hp : p ≠ ∞) {r : ℕ} {s : ℝ} (hs : 0 ≤ s) + (hsr : s < r) {q : ℝ≥0∞} (hq : 1 ≤ q) (f : Lp ℂ p (volume : Measure V)) : + (bandScheme hp).MemApprox s q f ↔ + ‖f‖ₑ + lqNorm q (fun k => dyadicWeight s k * lpModulus p r f k) < ∞ := + (bandModulusData hp r).memApprox_iff_modNorm_lt_top hq hs hsr f + +/-- **Littlewood–Paley blocks and moduli of smoothness**: for `1 ≤ p < ∞`, `0 < s < r` and +`1 ≤ q ≤ ∞`, `(2^(js) ‖ψ_j ⋆ f‖_p)_j ∈ ℓ_q` iff +`‖f‖_p + ‖(2^(ks) ω_r(f, 2^(-k))_p)_k‖_{ℓ_q} < ∞`. -/ +theorem littlewoodPaleyNorm_lt_top_iff_modulus (hp : p ≠ ∞) {r : ℕ} {s : ℝ} (hs : 0 < s) + (hsr : s < r) {q : ℝ≥0∞} (hq : 1 ≤ q) (f : Lp ℂ p (volume : Measure V)) : + littlewoodPaleyNorm hp s q f < ∞ ↔ + ‖f‖ₑ + lqNorm q (fun k => dyadicWeight s k * lpModulus p r f k) < ∞ := by + rw [← memApprox_bandScheme_iff hp hs hq, memApprox_bandScheme_iff_modulus hp hs.le hsr hq f] + +/-- **The order of the differences does not matter**: for `0 ≤ s < r'` and every order `r`, +`‖F‖_p + ‖(2^(ks) ω_{r'}(F, 2^(-k))_p)_k‖_{ℓ_q} ≤ C (‖F‖_p + ‖(2^(ks) ω_r(F, 2^(-k))_p)_k‖_{ℓ_q})`, +through the band-limited approximation norm: the inverse direction of +`Rd.bandModulusData hp r'` and Jackson's direction of `Rd.bandModulusData hp r`. -/ +theorem modNorm_le_modNorm_of_lt (hp : p ≠ ∞) (r : ℕ) {r' : ℕ} {s : ℝ} (hs : 0 ≤ s) + (hsr' : s < r') {q : ℝ≥0∞} (hq : 1 ≤ q) : + ∃ C : ℝ≥0∞, C ≠ ∞ ∧ ∀ F : Lp ℂ p (volume : Measure V), + ‖F‖ₑ + lqNorm q (fun k => dyadicWeight s k * lpModulus p r' F k) ≤ + C * (‖F‖ₑ + lqNorm q (fun k => dyadicWeight s k * lpModulus p r F k)) := by + set M' := bandModulusData (V := V) hp r' + set M := bandModulusData (V := V) hp r + refine ⟨M'.inverseConst s * M.directConst s, + ENNReal.mul_ne_top (M'.inverseConst_ne_top hsr') (M.directConst_ne_top s), fun F => ?_⟩ + rw [mul_assoc] + exact (M'.modNorm_le_approxNormDyadic hq hs hsr' F).trans + (mul_le_mul' le_rfl (M.approxNormDyadic_le_modNorm hq F)) + +/-- The norm with moduli of order `L ≥ r` is at most `2^(L-r)` times that with order `r` +(`Rd.lpModulus_add_order_le`). -/ +theorem modNorm_order_le_of_le {r L : ℕ} (hrL : r ≤ L) (σ : ℝ) (q : ℝ≥0∞) + (G : Lp ℂ p (volume : Measure V)) : + ‖G‖ₑ + lqNorm q (fun k => dyadicWeight σ k * lpModulus p L G k) ≤ + 2 ^ (L - r) * (‖G‖ₑ + lqNorm q (fun k => dyadicWeight σ k * lpModulus p r G k)) := by + have hL' : L = r + (L - r) := by omega + rw [mul_add] + refine add_le_add (le_mul_of_one_le_left' (one_le_pow₀ one_le_two)) ?_ + rw [← ENNReal.lqNorm_const_mul] + refine ENNReal.lqNorm_mono fun k => ?_ + calc dyadicWeight σ k * lpModulus p L G k + ≤ dyadicWeight σ k * (2 ^ (L - r) * lpModulus p r G k) := by + refine mul_le_mul' le_rfl ?_ + conv_lhs => rw [hL'] + exact lpModulus_add_order_le r (L - r) G k + _ = 2 ^ (L - r) * (dyadicWeight σ k * lpModulus p r G k) := by ring + +/-- **The norm with moduli is countably subadditive in `ℓ_1`**: for a summable series in `L_p` +and `N(G) = ‖G‖ + ‖(2^(kσ) ω_L(G, 2^(-k)))_k‖_{ℓ_1}`, `N(∑ G_i) ≤ ∑_i N(G_i)`, by +`ENNReal.le_tsum_of_tendsto_sum` for the modulus at each scale. -/ +theorem modNorm_one_tsum_le (L : ℕ) (σ : ℝ) {G : ℕ → Lp ℂ p (volume : Measure V)} + (hG : Summable G) : + ‖∑' i, G i‖ₑ + lqNorm 1 (fun k => dyadicWeight σ k * lpModulus p L (∑' i, G i) k) ≤ + ∑' i, (‖G i‖ₑ + lqNorm 1 (fun k => dyadicWeight σ k * lpModulus p L (G i) k)) := by + have htend : Filter.Tendsto (fun I => ∑ i ∈ Finset.range (I + 1), G i) Filter.atTop + (nhds (∑' i, G i)) := + (hG.hasSum.tendsto_sum_nat).comp (Filter.tendsto_add_atTop_nat 1) + have hmod : ∀ k, lpModulus p L (∑' i, G i) k ≤ ∑' i, lpModulus p L (G i) k := fun k => + ENNReal.le_tsum_of_tendsto_sum (C := 2 ^ L) (by simp) (fun x y => lpModulus_add_le L x y k) + (fun x => lpModulus_le L x k) htend + calc ‖∑' i, G i‖ₑ + lqNorm 1 (fun k => dyadicWeight σ k * lpModulus p L (∑' i, G i) k) + ≤ ∑' i, ‖G i‖ₑ + ∑' i, lqNorm 1 (fun k => dyadicWeight σ k * lpModulus p L (G i) k) := by + refine add_le_add eNorm_tsum_le_tsum_eNorm ?_ + rw [ENNReal.lqNorm_one] + simp_rw [ENNReal.lqNorm_one] + rw [tsum_comm] + refine tsum_le_tsum fun k => ?_ + rw [ENNReal.tsum_mul_left] + exact mul_le_mul' le_rfl (hmod k) + _ = _ := (tsum_add).symm + +end Rd diff --git a/LeanPool/FunctionSpaces/Rd/Differences/ConvexDifferences.lean b/LeanPool/FunctionSpaces/Rd/Differences/ConvexDifferences.lean new file mode 100644 index 0000000000..3d6f457637 --- /dev/null +++ b/LeanPool/FunctionSpaces/Rd/Differences/ConvexDifferences.lean @@ -0,0 +1,197 @@ +/- +Copyright (c) 2026 Mario Ullrich. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Mario Ullrich +-/ +module + +public import LeanPool.FunctionSpaces.Analysis.Differences.DomainModuli +public import Mathlib.Analysis.Calculus.Taylor +public import Mathlib.Analysis.Calculus.ContDiff.Bounds + +/- +Modified for Lean Pool: module names and imports adapted. +-/ + +/-! +# Differences and derivatives within convex sets + +On a convex set `Ω` with nonempty interior, the differences of a function that is smooth *within* +`Ω` are controlled by its derivatives within `Ω`, at the points whose steps stay in `Ω`: if +`x, x + h, …, x + r h ∈ Ω` and `‖D^i a‖ ≤ C` on `Ω` for `i ≤ r`, then + +`|Δ_h^r a(x)| ≤ 2^r r^(r+1) C ‖h‖^r` (`Rd.norm_higherDiff_le_of_iteratedFDerivWithin`). + +The model is the closed half-space, where the derivatives of functions on the boundary are +one-sided; on `Ω = V` the bound is `Rd.norm_higherDiff_le_of_iteratedFDeriv` of +`FunctionSpaces.Rd.Differences.PointwiseMultipliers` up to the constant. + +The proof restricts `a` to the segment, `g(t) = a(x + t h)` on `[0, r]`, which lies in `Ω` by +convexity. Taylor's theorem on the interval (Mathlib's `taylor_mean_remainder_bound`) writes +`g = T + R` with a polynomial `T` of degree `< r` and `|R(t)| ≤ ‖g^(r)‖_∞ t^r / (r-1)!`; the +differences of order `r` of `T` vanish (`Rd.fwdDiff_iter_taylorWithinEval_eq_zero`, from Mathlib's +`fwdDiff_iter_sum_mul_pow_eq_zero`), so `|Δ_1^r g(0)| ≤ 2^r r^r ‖g^(r)‖_∞ / (r-1)!` +(`Rd.norm_fwdDiff_iter_le_of_iteratedDerivWithin`). The chain rule (Mathlib's +`norm_iteratedFDerivWithin_comp_le`) bounds `‖g^(r)‖_∞ ≤ r! C ‖h‖^r`. +-/ + +@[expose] public section + +open MeasureTheory Set +open scoped ENNReal Nat + +namespace Rd + +/-! ### One variable -/ + +/-- Forward differences commute with the inclusion `ℝ → ℂ`: +`Δ_1^m (F ∘ ofReal) = (Δ_1^m F) ∘ ofReal`. -/ +theorem fwdDiff_iter_comp_ofReal (F : ℂ → ℂ) (m : ℕ) : + (fwdDiff (1 : ℝ))^[m] (fun t : ℝ => F t) = fun t : ℝ => (fwdDiff (1 : ℂ))^[m] F t := by + induction m with + | zero => rfl + | succ m ih => + rw [Function.iterate_succ_apply', Function.iterate_succ_apply', ih] + funext t + simp only [fwdDiff] + push_cast + rfl + +/-- **The differences of order `n + 1` of a Taylor polynomial of degree `n` vanish**. -/ +theorem fwdDiff_iter_taylorWithinEval_eq_zero (g : ℝ → ℂ) (n : ℕ) (s : Set ℝ) : + (fwdDiff (1 : ℝ))^[n + 1] (taylorWithinEval g n s 0) = 0 := by + set F : ℂ → ℂ := fun z => ∑ k ∈ Finset.range (n + 1), + ((k ! : ℂ)⁻¹ * iteratedDerivWithin k g s 0) * z ^ k + have hT : taylorWithinEval g n s 0 = fun t : ℝ => F t := by + funext t + rw [taylor_within_apply] + refine Finset.sum_congr rfl fun k _ => ?_ + rw [Complex.real_smul] + push_cast + ring + rw [hT, fwdDiff_iter_comp_ofReal, fwdDiff_iter_sum_mul_pow_eq_zero] + rfl + +/-- **Differences of order `r` and the `r`-th derivative on an interval**: if `g` is of class +`C^r` on `[0, r]`, `r = n + 1`, and `‖g^(r)‖ ≤ C` there, then +`|Δ_1^r g(0)| ≤ 2^r r^r C / (r-1)!`. -/ +theorem norm_fwdDiff_iter_le_of_iteratedDerivWithin {g : ℝ → ℂ} {n : ℕ} + (hg : ContDiffOn ℝ (n + 1) g (Icc 0 (n + 1))) {C : ℝ} + (hC : ∀ y ∈ Icc (0 : ℝ) (n + 1), ‖iteratedDerivWithin (n + 1) g (Icc 0 (n + 1)) y‖ ≤ C) : + ‖(fwdDiff (1 : ℝ))^[n + 1] g 0‖ ≤ 2 ^ (n + 1) * ((n : ℝ) + 1) ^ (n + 1) / n ! * C := by + have hn : (0 : ℝ) ≤ n + 1 := by positivity + have hC0 : 0 ≤ C := (norm_nonneg _).trans (hC 0 ⟨le_rfl, hn⟩) + set T := taylorWithinEval g n (Icc 0 ((n : ℝ) + 1)) 0 + have hT := congrFun (fwdDiff_iter_taylorWithinEval_eq_zero g n (Icc 0 ((n : ℝ) + 1))) 0 + have hrem : ∀ l ∈ Finset.range (n + 2), ‖g l - T l‖ ≤ C * ((n : ℝ) + 1) ^ (n + 1) / n ! := + fun l hl => by + have hl' : (l : ℝ) ≤ n + 1 := by + exact_mod_cast Nat.lt_succ_iff.1 (Finset.mem_range.1 hl) + refine (taylor_mean_remainder_bound (by exact_mod_cast hg) ⟨Nat.cast_nonneg l, hl'⟩ + hC).trans ?_ + rw [sub_zero] + gcongr + have hsplit : (fwdDiff (1 : ℝ))^[n + 1] g 0 = ∑ l ∈ Finset.range (n + 2), + ((-1 : ℂ) ^ (n + 1 - l) * ((n + 1).choose l : ℂ)) * (g l - T l) := by + have h1 := higherDiff_apply (n + 1) (1 : ℝ) g 0 + have h2 := higherDiff_apply (n + 1) (1 : ℝ) T 0 + rw [hT, Pi.zero_apply] at h2 + simp only [smul_eq_mul, mul_one, zero_add] at h1 h2 + rw [h1, ← sub_zero (∑ l ∈ _, _), h2, ← Finset.sum_sub_distrib] + refine Finset.sum_congr rfl fun l _ => ?_ + ring + rw [hsplit] + calc ‖∑ l ∈ Finset.range (n + 2), ((-1 : ℂ) ^ (n + 1 - l) * ((n + 1).choose l : ℂ)) * + (g l - T l)‖ + ≤ ∑ l ∈ Finset.range (n + 2), ((n + 1).choose l : ℝ) * + (C * ((n : ℝ) + 1) ^ (n + 1) / n !) := by + refine (norm_sum_le _ _).trans (Finset.sum_le_sum fun l hl => ?_) + rw [norm_mul, norm_mul, norm_pow, norm_neg, norm_one, one_pow, one_mul, + Complex.norm_natCast] + exact mul_le_mul_of_nonneg_left (hrem l hl) (Nat.cast_nonneg _) + _ = 2 ^ (n + 1) * ((n : ℝ) + 1) ^ (n + 1) / n ! * C := by + rw [← Finset.sum_mul] + have hsum : ∑ l ∈ Finset.range (n + 2), ((n + 1).choose l : ℝ) = 2 ^ (n + 1) := by + exact_mod_cast Nat.sum_range_choose (n + 1) + rw [hsum] + ring + +/-! ### Lines in a convex set -/ + +variable {E : Type*} [NormedAddCommGroup E] [NormedSpace ℝ E] + +/-- **The line `t ↦ x + t h`**: its derivatives of order `i ≥ 1` have norm at most `‖h‖^i` +(the first derivative is `h`, the higher ones vanish). -/ +theorem norm_iteratedFDeriv_line_le (x h : E) {i : ℕ} (hi : 1 ≤ i) (t : ℝ) : + ‖iteratedFDeriv ℝ i (fun t : ℝ => x + t • h) t‖ ≤ ‖h‖ ^ i := by + obtain ⟨k, rfl⟩ := Nat.exists_eq_add_of_le' hi + rw [← norm_iteratedFDeriv_fderiv] + have hd : fderiv ℝ (fun t : ℝ => x + t • h) = fun _ => (ContinuousLinearMap.id ℝ ℝ).smulRight h := + funext fun t => (((hasFDerivAt_id t).smul_const h).const_add x).fderiv + rw [hd] + rcases Nat.eq_zero_or_pos k with rfl | hk + · rw [norm_iteratedFDeriv_zero, ContinuousLinearMap.norm_smulRight_apply, + ContinuousLinearMap.norm_id, one_mul, pow_one] + · rw [iteratedFDeriv_const_of_ne hk.ne', Pi.zero_apply, norm_zero] + positivity + +/-- **Steps in a convex set**: if `x` and `x + r h` lie in the convex set `Ω`, so does `x + t h` +for `0 ≤ t ≤ r`. -/ +theorem add_smul_mem_of_mem_stepSet {Ω : Set E} (hΩ : Convex ℝ Ω) {r : ℕ} {h x : E} + (hx : x ∈ stepSet Ω r h) {t : ℝ} (ht : t ∈ Icc (0 : ℝ) r) : x + t • h ∈ Ω := by + have hx0 : x ∈ Ω := by simpa using hx 0 (Nat.zero_le r) + rcases Nat.eq_zero_or_pos r with rfl | hr + · have : t = 0 := le_antisymm (by simpa using ht.2) ht.1 + simpa [this] using hx0 + have hr' : (0 : ℝ) < r := by exact_mod_cast hr + have hxr : x + (r : ℝ) • h ∈ Ω := hx r le_rfl + have h1 := hΩ.add_smul_mem hx0 (y := (r : ℝ) • h) (by simpa using hxr) + (t := t / r) ⟨div_nonneg ht.1 hr'.le, (div_le_one hr').2 ht.2⟩ + rwa [smul_smul, div_mul_cancel₀ t hr'.ne'] at h1 + +/-- **Differences of order `r ≥ 1` within a convex set**: if `a` is of class `C^r` within the +convex set `Ω` with nonempty interior and `‖D^i a‖ ≤ C` on `Ω` for `i ≤ r`, then +`|Δ_h^r a(x)| ≤ 2^r r^(r+1) C ‖h‖^r` whenever `x, x + h, …, x + r h ∈ Ω`. -/ +theorem norm_higherDiff_le_of_iteratedFDerivWithin {Ω : Set E} (hΩ : Convex ℝ Ω) + (hint : (interior Ω).Nonempty) {a : E → ℂ} {r : ℕ} (hr : 1 ≤ r) + (ha : ContDiffOn ℝ r a Ω) {C : ℝ} + (hC : ∀ i ≤ r, ∀ y ∈ Ω, ‖iteratedFDerivWithin ℝ i a Ω y‖ ≤ C) {h x : E} + (hx : x ∈ stepSet Ω r h) : + ‖(fwdDiff h)^[r] a x‖ ≤ 2 ^ r * (r : ℝ) ^ (r + 1) * C * ‖h‖ ^ r := by + obtain ⟨n, rfl⟩ := Nat.exists_eq_add_of_le' hr + set γ : ℝ → E := fun t => x + t • h + set I : Set ℝ := Icc 0 ((n : ℝ) + 1) + have hΩu : UniqueDiffOn ℝ Ω := uniqueDiffOn_convex hΩ hint + have hIu : UniqueDiffOn ℝ I := uniqueDiffOn_Icc (by positivity) + have hγ' : ContDiff ℝ ⊤ γ := contDiff_const.add (contDiff_id.smul contDiff_const) + have hγ : ContDiff ℝ (n + 1) γ := hγ'.of_le le_top + have hmaps : MapsTo γ I Ω := fun t ht => + add_smul_mem_of_mem_stepSet hΩ hx ⟨ht.1, by push_cast; exact ht.2⟩ + have ha' : ContDiffOn ℝ ((n + 1 : ℕ) : WithTop ℕ∞) a Ω := by exact_mod_cast ha + have hg : ContDiffOn ℝ (n + 1) (a ∘ γ) I := ha'.comp hγ.contDiffOn hmaps + -- the differences of `a` along `h` are those of `a ∘ γ` along `1` + have hdiff : (fwdDiff h)^[n + 1] a x = (fwdDiff (1 : ℝ))^[n + 1] (a ∘ γ) 0 := by + rw [higherDiff_apply, higherDiff_apply] + refine Finset.sum_congr rfl fun l _ => ?_ + simp [γ] + -- the derivative of order `n + 1` of `a ∘ γ` + have hder : ∀ t ∈ I, ‖iteratedDerivWithin (n + 1) (a ∘ γ) I t‖ ≤ + (n + 1) ! * C * ‖h‖ ^ (n + 1) := fun t ht => by + rw [iteratedDerivWithin_eq_iteratedFDerivWithin] + refine (ContinuousMultilinearMap.le_opNorm _ _).trans ?_ + simp only [norm_one, Finset.prod_const_one, mul_one] + refine norm_iteratedFDerivWithin_comp_le (N := (n + 1 : ℕ)) (by exact_mod_cast ha) + (by exact_mod_cast hγ.contDiffOn) le_rfl hΩu hIu hmaps ht + (fun i hi => hC i hi _ (hmaps ht)) fun i hi1 _ => ?_ + rw [iteratedFDerivWithin_eq_iteratedFDeriv hIu + (hγ'.contDiffAt.of_le (by exact_mod_cast le_top)) ht] + exact norm_iteratedFDeriv_line_le x h hi1 t + rw [hdiff] + refine (norm_fwdDiff_iter_le_of_iteratedDerivWithin hg hder).trans_eq ?_ + push_cast + rw [Nat.factorial_succ] + push_cast + field_simp + ring + +end Rd diff --git a/LeanPool/FunctionSpaces/Rd/Differences/DilatedDifferences.lean b/LeanPool/FunctionSpaces/Rd/Differences/DilatedDifferences.lean new file mode 100644 index 0000000000..25e9c9b7f8 --- /dev/null +++ b/LeanPool/FunctionSpaces/Rd/Differences/DilatedDifferences.lean @@ -0,0 +1,113 @@ +/- +Copyright (c) 2026 Mario Ullrich. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Mario Ullrich +-/ +module + +public import LeanPool.FunctionSpaces.Analysis.Fourier.ApproxIdentity +public import LeanPool.FunctionSpaces.Analysis.Differences.Differences + +/- +Modified for Lean Pool: module names and imports adapted. +-/ + +/-! +# Differences of convolutions and dilations + +Differences commute with convolution and dilation: `Δ_h^r (K ⋆ f) = (Δ_h^r K) ⋆ f` almost +everywhere for an integrable `K` and `f ∈ L_p` (`Rd.higherDiff_conv_ae`), pointwise where +the convolutions with the translates of `K` converge absolutely (`Rd.higherDiff_conv_apply`), and +`Δ_h^r (Φ_c) = (Δ_{ch}^r Φ)_c` (`Rd.higherDiff_dilate`). Young's inequality then bounds the modulus +of a convolution by the `L_1` norms of the differences of the kernel (`Rd.lpModulus_convLp_le`). +-/ + +@[expose] public section + +open MeasureTheory Filter +open scoped ENNReal + +namespace Rd + +variable {V : Type*} [NormedAddCommGroup V] [NormedSpace ℝ V] [FiniteDimensional ℝ V] + [MeasurableSpace V] [BorelSpace V] {μ : Measure V} [μ.IsAddHaarMeasure] + +omit [NormedSpace ℝ V] [FiniteDimensional ℝ V] in +/-- **Translates of convolutions**: `(K ⋆ f)(x + c) = (K(· + c) ⋆ f)(x)`, by the substitution +`y ↦ y + c`. -/ +theorem conv_comp_add (K f : V → ℂ) (c x : V) : + conv K f μ (x + c) = conv (fun y => K (y + c)) f μ x := by + rw [conv_apply, conv_apply, ← integral_add_right_eq_self (fun y => K y * f (x + c - y)) c] + congr 1 + funext y + rw [show x + c - (y + c) = x - y by abel] + +/-- **Differences of convolutions**: `Δ_h^r (K ⋆ f) = (Δ_h^r K) ⋆ f` almost everywhere, for an +integrable `K` and `f ∈ L_p`, `1 ≤ p < ∞`. -/ +theorem higherDiff_conv_ae {p : ℝ≥0∞} (hp1 : 1 ≤ p) (hp : p ≠ ∞) {K f : V → ℂ} + (hK : Integrable K μ) (hf : MemLp f p μ) (r : ℕ) (h : V) : + (fwdDiff h)^[r] (conv K f μ) =ᵐ[μ] conv ((fwdDiff h)^[r] K) f μ := by + induction r with + | zero => exact Filter.EventuallyEq.rfl + | succ r ih => + rw [Function.iterate_succ_apply', Function.iterate_succ_apply', fwdDiff_eq_sub, + fwdDiff_eq_sub] + have hKr : Integrable ((fwdDiff h)^[r] K) μ := integrable_higherDiff hK r h + have h1 : (fun x => (fwdDiff h)^[r] (conv K f μ) (x + h)) =ᵐ[μ] + conv (fun y => (fwdDiff h)^[r] K (y + h)) f μ := by + refine (ae_comp_add_right ih h).trans (Filter.EventuallyEq.of_eq ?_) + funext x + exact conv_comp_add _ _ h x + exact (h1.sub ih).trans (sub_conv_ae hp1 hp (hKr.comp_add_right h) hKr hf).symm + +omit [FiniteDimensional ℝ V] [MeasurableSpace V] [BorelSpace V] in +/-- **Differences of dilations**: `Δ_h^r (Φ_c) = (Δ_{ch}^r Φ)_c`. -/ +theorem higherDiff_dilate (r : ℕ) (c : ℝ) (h : V) (Φ : V → ℂ) : + (fwdDiff h)^[r] (dilate c Φ) = dilate c ((fwdDiff (c • h))^[r] Φ) := by + induction r with + | zero => rfl + | succ r ih => + rw [Function.iterate_succ_apply', Function.iterate_succ_apply', ih] + funext x + simp only [fwdDiff, dilate, smul_add] + ring + +variable {p : ℝ≥0∞} [Fact (1 ≤ p)] + +/-- **The modulus of a convolution**: if `‖Δ_v^r K‖_1 ≤ B` for `‖v‖ ≤ 2^(-k)`, then +`ω_r(K ⋆ h, 2^(-k))_p ≤ B ‖h‖_p`, since `Δ_v^r (K ⋆ h) = (Δ_v^r K) ⋆ h` (Young's inequality). -/ +theorem lpModulus_convLp_le (hp : p ≠ ∞) {K : V → ℂ} (hK : Integrable K μ) (r k : ℕ) + {B : ℝ≥0∞} (hB : ∀ v : V, ‖v‖ ≤ 1 / 2 ^ k → eLpNorm ((fwdDiff v)^[r] K) 1 μ ≤ B) + (h : Lp ℂ p μ) : lpModulus p r (convLp hp hK h) k ≤ B * ‖h‖ₑ := by + rw [lpModulus, modulus_congr_ae (convLp_apply_ae hp hK h)] + refine iSup₂_le fun v hv => ?_ + rw [eLpNorm_congr_ae (higherDiff_conv_ae Fact.out hp hK (Lp.memLp h) r v), Lp.eNorm_def] + exact (eLpNorm_conv_le Fact.out hp (integrable_higherDiff hK r v).aestronglyMeasurable + (Lp.aestronglyMeasurable h)).trans (by gcongr; exact hB v hv) + +end Rd + +namespace Rd + +variable {V : Type*} [NormedAddCommGroup V] [InnerProductSpace ℝ V] [FiniteDimensional ℝ V] + [MeasurableSpace V] [BorelSpace V] + +/-! ### Differences of convolutions, pointwise -/ + +/-- **Differences of convolutions**: `Δ_h^r (K ⋆ g) = (Δ_h^r K) ⋆ g` where the convolutions with +the translates of `K` converge absolutely. -/ +theorem higherDiff_conv_apply {K g : V → ℂ} + (hK : ∀ v x, Integrable (fun y => K (y + v) * g (x - y)) volume) (r : ℕ) (h x : V) : + (fwdDiff h)^[r] (conv K g volume) x = conv ((fwdDiff h)^[r] K) g volume x := by + rw [higherDiff_apply, conv_apply] + simp_rw [higherDiff_apply, Finset.sum_mul] + rw [integral_finsetSum _ fun l _ => ?_] + · refine Finset.sum_congr rfl fun l _ => ?_ + rw [conv_add_apply, ← integral_const_mul] + congr 1 + funext y + ring + · exact ((hK ((l : ℝ) • h) x).const_mul ((-1 : ℂ) ^ (r - l) * (r.choose l : ℂ))).congr + (Eventually.of_forall fun y => by ring) + +end Rd diff --git a/LeanPool/FunctionSpaces/Rd/Differences/MomentKernels.lean b/LeanPool/FunctionSpaces/Rd/Differences/MomentKernels.lean new file mode 100644 index 0000000000..d474f71a42 --- /dev/null +++ b/LeanPool/FunctionSpaces/Rd/Differences/MomentKernels.lean @@ -0,0 +1,381 @@ +/- +Copyright (c) 2026 Mario Ullrich. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Mario Ullrich +-/ +module + +public import LeanPool.FunctionSpaces.Rd.Differences.DilatedDifferences +public import LeanPool.FunctionSpaces.Analysis.Differences.DomainModuli + +/- +Modified for Lean Pool: module names and imports adapted. +-/ + +/-! +# Moment kernels + +For an integrable `g` with `∫ g = 1` and an order `L ≥ 1`, the **moment kernel** is + +`m = ∑_{l=1}^L (-1)^(l+1) C(L, l) g_{1/l}` + +(`Rd.momentKernel`), with the dilations `g_c = c^n g(c ·)` of `Rd.dilate`. Its dilations are +`m_c = ∑_l (-1)^(l+1) C(L, l) g_{c/l}` (`Rd.dilate_momentKernel`), and `∫ m = 1` +(`Rd.integral_momentKernel`), since `∑_{l=1}^L (-1)^(l+1) C(L, l) = 1` (`Rd.sum_jacksonCoeff`), +and `‖m‖_1 < ∞` for integrable `g` (`Rd.eLpNorm_momentKernel_ne_top`). The coefficients are +those of `-(-1)^L Δ^L` without the term `l = 0` (`Rd.neg_one_pow_mul_sum_higherDiff_coeff`), so +convolution with `m_c` averages differences of order `L`: + +`f(x) - (m_c ⋆ f)(x) = (-1)^L ∫ g(z) Δ^L_{-c^(-1) z} f(x) dz` + +for `f ∈ L_p` and almost every `x` (`Rd.ae_sub_conv_dilate_momentKernel_eq`; in absolute value +`Rd.ae_enorm_sub_conv_dilate_momentKernel_le`). If `g` has finite moments of the orders +`1, …, L - 1`, the moments of `m` of these orders vanish, since the coefficients satisfy +`∑_{l ?_ + have hl' : l + 1 ≤ r := Finset.mem_range.1 hl + rw [jacksonCoeff, ← mul_assoc, ← mul_assoc, neg_one_pow_mul_neg_one_pow_sub hl', pow_succ] + ring + · rw [← mul_assoc, ← mul_assoc, neg_one_pow_mul_neg_one_pow_sub (Nat.zero_le r)] + simp + +/-- **The coefficients add up to `1`**: `∑_{l by ring + have h := neg_one_pow_mul_sum_higherDiff_coeff r (fun _ => 1) + simp only [mul_one] at h + rw [h0, mul_zero] at h + linear_combination h + +/-- **Moments of the coefficients of the moment kernels**: `∑_{l (l : ℂ) ^ j + rw [hΔ, mul_zero, Nat.cast_zero, zero_pow (by omega), zero_sub] at h + push_cast at h + linear_combination h + +/-- The `L_1` norm of a function with integral `1` does not vanish. -/ +theorem lintegral_enorm_ne_zero_of_integral_eq_one {α : Type*} [MeasurableSpace α] + {ν : Measure α} {g : α → ℂ} (hg : Integrable g ν) (h1 : ∫ x, g x ∂ν = 1) : + ∫⁻ z, ‖g z‖ₑ ∂ν ≠ 0 := by + intro h0 + have hae : g =ᵐ[ν] 0 := by + have := (lintegral_eq_zero_iff' hg.aestronglyMeasurable.eNorm).1 h0 + filter_upwards [this] with z hz + simpa using hz + rw [integral_congr_ae hae] at h1 + simp at h1 + +/-! ### Moment kernels -/ + +variable {V : Type*} [NormedAddCommGroup V] [NormedSpace ℝ V] [FiniteDimensional ℝ V] + [MeasurableSpace V] [BorelSpace V] {μ : Measure V} [μ.IsAddHaarMeasure] + +omit [FiniteDimensional ℝ V] [MeasurableSpace V] [BorelSpace V] in +/-- Dilations compose: `(Φ_d)_c = Φ_{cd}`. -/ +theorem dilate_dilate (c d : ℝ) (Φ : V → ℂ) : dilate c (dilate d Φ) = dilate (c * d) Φ := by + funext x + simp only [dilate, smul_smul, mul_pow, Complex.ofReal_mul] + rw [mul_comm d c] + ring + +/-- The **moment kernel** of order `L`, `m = ∑_{l=1}^L (-1)^(l+1) C(L, l) g_{1/l}`. -/ +noncomputable def momentKernel (g : V → ℂ) (L : ℕ) (x : V) : ℂ := + ∑ l ∈ Finset.range L, jacksonCoeff L l * dilate (1 / ((l : ℝ) + 1)) g x + +omit [FiniteDimensional ℝ V] [MeasurableSpace V] [BorelSpace V] in +/-- The dilations of the moment kernel: `m_c = ∑_{l=1}^L (-1)^(l+1) C(L, l) g_{c/l}`. -/ +theorem dilate_momentKernel (c : ℝ) (g : V → ℂ) (L : ℕ) : + dilate c (momentKernel g L) = + fun x => ∑ l ∈ Finset.range L, jacksonCoeff L l * dilate (c / ((l : ℝ) + 1)) g x := by + funext x + have h : ∀ l : ℕ, dilate (c / ((l : ℝ) + 1)) g x = + dilate c (dilate (1 / ((l : ℝ) + 1)) g) x := fun l => by + rw [dilate_dilate, mul_one_div] + simp only [h] + simp only [dilate, momentKernel, Finset.mul_sum] + exact Finset.sum_congr rfl fun l _ => by ring + +/-- Moment kernels of integrable functions are integrable. -/ +theorem integrable_momentKernel {g : V → ℂ} (hg : Integrable g μ) (L : ℕ) : + Integrable (momentKernel g L) μ := + integrable_finsetSum _ fun l _ => (integrable_dilate hg (by positivity)).const_mul _ + +/-- **Moment kernels have a finite `L_1` norm**: `‖m‖_1 ≠ ∞` for the moment kernel `m` of an +integrable `g` (`Rd.integrable_momentKernel`). -/ +theorem eLpNorm_momentKernel_ne_top {g : V → ℂ} (hg : Integrable g μ) (L : ℕ) : + eLpNorm (momentKernel g L) 1 μ ≠ ∞ := + (memLp_one_iff_integrable.2 (integrable_momentKernel hg L)).eLpNorm_ne_top + +/-- `‖m‖_1 < ∞` for the moment kernel `m` of an integrable `g` +(`Rd.eLpNorm_momentKernel_ne_top`). -/ +theorem eLpNorm_momentKernel_lt_top {g : V → ℂ} (hg : Integrable g μ) (L : ℕ) : + eLpNorm (momentKernel g L) 1 μ < ∞ := + (eLpNorm_momentKernel_ne_top hg L).lt_top + +/-- **The moment kernel has integral `1`**: `∫ m = ∑_{l=1}^L (-1)^(l+1) C(L, l) ∫ g = 1`. -/ +theorem integral_momentKernel {g : V → ℂ} (hg : Integrable g μ) (h1 : ∫ x, g x ∂μ = 1) + {L : ℕ} (hL : 1 ≤ L) : ∫ x, momentKernel g L x ∂μ = 1 := by + simp only [momentKernel] + rw [integral_finsetSum _ fun l _ => (integrable_dilate hg (by positivity)).const_mul _] + rw [← sum_jacksonCoeff hL] + refine Finset.sum_congr rfl fun l _ => ?_ + rw [integral_const_mul, integral_dilate g (by positivity), h1, mul_one] + +/-- **Convolution is linear in the kernel** almost everywhere: +`(∑_i a_i K_i) ⋆ f = ∑_i a_i (K_i ⋆ f)` for integrable `K_i` and `f ∈ L_p`. -/ +theorem conv_finsetSum_kernel_ae {p : ℝ≥0∞} (hp1 : 1 ≤ p) (hp : p ≠ ∞) {ι : Type*} + (s : Finset ι) (a : ι → ℂ) {K : ι → V → ℂ} (hK : ∀ i ∈ s, Integrable (K i) μ) {f : V → ℂ} + (hf : MemLp f p μ) : + conv (fun x => ∑ i ∈ s, a i * K i x) f μ =ᵐ[μ] fun x => ∑ i ∈ s, a i * conv (K i) f μ x := by + classical + induction s using Finset.induction_on with + | empty => + refine Filter.EventuallyEq.of_eq (funext fun x => ?_) + simp [conv_apply] + | insert i s hi ih => + have hKi : Integrable (fun x => a i * K i x) μ := + (hK i (Finset.mem_insert_self i s)).const_mul _ + have hKs : Integrable (fun x => ∑ j ∈ s, a j * K j x) μ := + integrable_finsetSum _ fun j hj => (hK j (Finset.mem_insert_of_mem hj)).const_mul _ + have hsplit : (fun x => ∑ j ∈ insert i s, a j * K j x) = + (fun x => a i * K i x) + fun x => ∑ j ∈ s, a j * K j x := by + funext x + simp [Finset.sum_insert hi] + have hsm : conv (fun x => a i * K i x) f μ = fun x => a i * conv (K i) f μ x := + smul_conv (K i) f (a i) + rw [hsplit] + filter_upwards [add_conv_ae hp1 hp hKi hKs hf, + ih fun j hj => hK j (Finset.mem_insert_of_mem hj)] with x h1 h2 + rw [h1, Pi.add_apply, h2, hsm, Finset.sum_insert hi] + +/-- **Averaged differences** (the identity behind the moment kernels and the Jackson +approximant): for an integrable `g` with `∫ g = 1`, `f ∈ L_p`, `c > 0` and almost every `x`, +`f(x) - ∑_{l=1}^L (-1)^(l+1) C(L, l) (g_{c/l} ⋆ f)(x) = (-1)^L ∫ g(z) Δ^L_{-c^(-1) z} f(x) dz`. -/ +theorem ae_sub_sum_conv_dilate_eq {p : ℝ≥0∞} (hp1 : 1 ≤ p) (hp : p ≠ ∞) {g f : V → ℂ} + (hg : Integrable g μ) (h1 : ∫ x, g x ∂μ = 1) (hf : MemLp f p μ) (L : ℕ) {c : ℝ} + (hc : 0 < c) : + ∀ᵐ x ∂μ, f x - ∑ l ∈ Finset.range L, + jacksonCoeff L l * conv (dilate (c / ((l : ℝ) + 1)) g) f μ x = + ∫ z, g z * ((-1 : ℂ) ^ L * (fwdDiff (-c⁻¹ • z))^[L] f x) ∂μ := by + have hcl : ∀ l : ℕ, 0 < c / ((l : ℝ) + 1) := fun l => by positivity + have hint : ∀ᵐ x ∂μ, ∀ l ∈ Finset.range L, + Integrable (fun z => g z * f (x - (c / ((l : ℝ) + 1))⁻¹ • z)) μ := + (Filter.eventually_all_finset _).2 fun l _ => ae_integrable_dilate_mul hp1 hp hg hf (hcl l) + have hsmul : ∀ (z : V) (l : ℕ), ((l + 1 : ℕ) : ℝ) • (-c⁻¹ • z) = + -((c / ((l : ℝ) + 1))⁻¹ • z) := fun z l => by + rw [inv_div, smul_smul, mul_neg, neg_smul, div_eq_mul_inv, Nat.cast_succ] + filter_upwards [hint] with x h3 + have hexp : ∀ z, (-1 : ℂ) ^ L * (fwdDiff (-c⁻¹ • z))^[L] f x = + f x - ∑ l ∈ Finset.range L, jacksonCoeff L l * f (x - (c / ((l : ℝ) + 1))⁻¹ • z) := + fun z => by + rw [higherDiff_apply, neg_one_pow_mul_sum_higherDiff_coeff] + congr 1 + · simp + · refine Finset.sum_congr rfl fun l _ => ?_ + rw [hsmul z l, ← sub_eq_add_neg] + have hsum : ∑ l ∈ Finset.range L, + jacksonCoeff L l * conv (dilate (c / ((l : ℝ) + 1)) g) f μ x = + ∑ l ∈ Finset.range L, + ∫ z, jacksonCoeff L l * (g z * f (x - (c / ((l : ℝ) + 1))⁻¹ • z)) ∂μ := + Finset.sum_congr rfl fun l _ => by + rw [conv_dilate_apply _ _ (hcl l), integral_const_mul] + have hf0 : f x = ∫ z, g z * f x ∂μ := by rw [integral_mul_const, h1, one_mul] + rw [hsum, hf0, ← integral_finsetSum _ fun l hl => (h3 l hl).const_mul _, + ← integral_sub (hg.mul_const _) (integrable_finsetSum _ fun l hl => (h3 l hl).const_mul _)] + congr 1 + funext z + rw [hexp z, mul_sub, Finset.mul_sum] + congr 1 + exact Finset.sum_congr rfl fun l _ => by ring + +/-- **Convolution with a moment kernel averages differences**: for an integrable `g` with +`∫ g = 1`, `f ∈ L_p`, `c > 0` and almost every `x`, +`f(x) - (m_c ⋆ f)(x) = (-1)^L ∫ g(z) Δ^L_{-c^(-1) z} f(x) dz`. -/ +theorem ae_sub_conv_dilate_momentKernel_eq {p : ℝ≥0∞} (hp1 : 1 ≤ p) (hp : p ≠ ∞) {g f : V → ℂ} + (hg : Integrable g μ) (h1 : ∫ x, g x ∂μ = 1) (hf : MemLp f p μ) (L : ℕ) {c : ℝ} + (hc : 0 < c) : + ∀ᵐ x ∂μ, f x - conv (dilate c (momentKernel g L)) f μ x = + ∫ z, g z * ((-1 : ℂ) ^ L * (fwdDiff (-c⁻¹ • z))^[L] f x) ∂μ := by + rw [dilate_momentKernel] + filter_upwards [conv_finsetSum_kernel_ae hp1 hp (Finset.range L) (jacksonCoeff L) + (K := fun l => dilate (c / ((l : ℝ) + 1)) g) (fun l _ => integrable_dilate hg (by positivity)) + hf, + ae_sub_sum_conv_dilate_eq hp1 hp hg h1 hf L hc] with x h2 h3 + rw [h2] + exact h3 + +/-- **The averaged differences, in absolute value**: for an integrable `g` with `∫ g = 1`, +`f ∈ L_p` with `1 ≤ p < ∞`, `c > 0` and almost every `x`, +`|f(x) - (m_c ⋆ f)(x)| ≤ ∫ |g(z)| |Δ^L_{-c^(-1) z} f(x)| dz`, where `m` is the moment kernel of +order `L` of `g`. -/ +theorem ae_enorm_sub_conv_dilate_momentKernel_le {p : ℝ≥0∞} (hp1 : 1 ≤ p) (hp : p ≠ ∞) + {g f : V → ℂ} (hg : Integrable g μ) (h1 : ∫ x, g x ∂μ = 1) (hf : MemLp f p μ) (L : ℕ) + {c : ℝ} (hc : 0 < c) : + ∀ᵐ x ∂μ, ‖f x - conv (dilate c (momentKernel g L)) f μ x‖ₑ ≤ + ∫⁻ z, ‖g z‖ₑ * ‖(fwdDiff (-c⁻¹ • z))^[L] f x‖ₑ ∂μ := by + filter_upwards [ae_sub_conv_dilate_momentKernel_eq hp1 hp hg h1 hf L hc] with x hx + rw [hx] + refine (eNorm_integral_le_lintegral_eNorm _).trans (le_of_eq (lintegral_congr fun z => ?_)) + rw [eNorm_mul, eNorm_mul, eNorm_pow, eNorm_neg, eNorm_one, one_pow, one_mul] + +/-- **Moment kernels approximate with the modulus on a set**: let `g` have integral `1` and vanish +outside the ball of radius `R`, and let `U` be a measurable set that the steps of the averaged +differences take into a measurable set `T`, `U ⊆ T_{L h}` for `h = -c^(-1) z` and +`g(z) ≠ 0`. Then `‖1_U (f - m_c ⋆ f)‖_p ≤ ‖g‖_1 ω_L(f, R/c, T)_p`, by the averaged differences +and the weighted Jensen inequality. -/ +theorem eLpNorm_indicator_sub_convLp_momentKernel_le {p : ℝ≥0∞} [Fact (1 ≤ p)] (hp : p ≠ ∞) + {g : V → ℂ} (hg : Integrable g μ) (h1 : ∫ x, g x ∂μ = 1) {R : ℝ} + (hgR : ∀ z, R < ‖z‖ → g z = 0) (L : ℕ) {c : ℝ} (hc : 0 < c) {U : Set V} + (hU : MeasurableSet U) {T : Set V} (hstep : ∀ z, g z ≠ 0 → U ⊆ stepSet T L (-c⁻¹ • z)) + (f : Lp ℂ p μ) : + eLpNorm (U.indicator + ⇑(f - convLp hp (integrable_dilate (integrable_momentKernel hg L) hc.ne') f)) p μ ≤ + (∫⁻ z, ‖g z‖ₑ ∂μ) * modulusOn μ T L p (f : V → ℂ) (R / c) := by + have hp1 : 1 ≤ p := Fact.out + have hfm : Measurable (f : V → ℂ) := (Lp.stronglyMeasurable f).measurable + set ω := modulusOn μ T L p (f : V → ℂ) (R / c) + set G : V → V → ℂ := fun x z => + U.indicator (fun x => (-1 : ℂ) ^ L * (fwdDiff (-c⁻¹ • z))^[L] (f : V → ℂ) x) x with hGdef + have hG : Measurable (Function.uncurry G) := by + have heq : Function.uncurry G = (U ×ˢ Set.univ).indicator fun y : V × V => + (-1 : ℂ) ^ L * ∑ l ∈ Finset.range (L + 1), ((-1 : ℂ) ^ (L - l) * (L.choose l : ℂ)) * + (f : V → ℂ) (y.1 + (l : ℝ) • (-c⁻¹ • y.2)) := by + funext y + rcases y with ⟨x, z⟩ + by_cases hx : x ∈ U + · rw [Function.uncurry_apply_pair, + Set.indicator_of_mem (Set.mk_mem_prod hx (Set.mem_univ z))] + simp only [G, Set.indicator_of_mem hx] + exact congrArg _ (higherDiff_apply L (-c⁻¹ • z) _ x) + · rw [Function.uncurry_apply_pair, + Set.indicator_of_notMem fun h => hx (Set.mem_prod.1 h).1] + simp only [G, Set.indicator_of_notMem hx] + rw [heq] + exact (measurable_const.mul (Finset.measurable_sum _ fun l _ => measurable_const.mul + (hfm.comp (measurable_fst.add ((measurable_snd.const_smul _).const_smul _))))).indicator + (hU.prod MeasurableSet.univ) + have hae : U.indicator + ⇑(f - convLp hp (integrable_dilate (integrable_momentKernel hg L) hc.ne') f) =ᵐ[μ] + fun x => ∫ z, g z * G x z ∂μ := by + filter_upwards [Lp.coeFn_sub f (convLp hp (integrable_dilate (integrable_momentKernel hg L) + hc.ne') f), convLp_apply_ae hp (integrable_dilate (integrable_momentKernel hg L) + hc.ne') f, ae_sub_conv_dilate_momentKernel_eq hp1 hp hg h1 (Lp.memLp f) L hc] + with x h1' h2 h3 + by_cases hx : x ∈ U + · simp only [G, Set.indicator_of_mem hx] + rw [h1', Pi.sub_apply, h2] + exact h3 + · simp [G, Set.indicator_of_notMem hx] + have hbound : ∀ z, g z ≠ 0 → eLpNorm (fun x => G x z) p μ ≤ ω := fun z hz => by + have hzR : ‖z‖ ≤ R := not_lt.1 fun h => hz (hgR z h) + have hnorm : ‖-c⁻¹ • z‖ ≤ R / c := by + rw [norm_smul, norm_neg, norm_inv, Real.norm_of_nonneg hc.le, inv_mul_eq_div] + exact div_le_div_of_nonneg_right hzR hc.le + have hD := (aestronglyMeasurable_higherDiff (Lp.aestronglyMeasurable f) L + (-c⁻¹ • z)).indicator hU + have heq : eLpNorm (fun x => G x z) p μ = + eLpNorm (U.indicator ((fwdDiff (-c⁻¹ • z))^[L] (f : V → ℂ))) p μ := by + refine eLpNorm_congr_norm_ae ((hG.comp measurable_prodMk_right).aestronglyMeasurable) + hD (Eventually.of_forall fun x => ?_) + by_cases hx : x ∈ U + · simp [G, Set.indicator_of_mem hx] + · simp [G, Set.indicator_of_notMem hx] + calc eLpNorm (fun x => G x z) p μ + = eLpNorm (U.indicator ((fwdDiff (-c⁻¹ • z))^[L] (f : V → ℂ))) p μ := heq + _ ≤ eLpNorm ((stepSet T L (-c⁻¹ • z)).indicator + ((fwdDiff (-c⁻¹ • z))^[L] (f : V → ℂ))) p μ := + eLpNorm_mono hD fun x => norm_indicator_le_of_subset (hstep z hz) _ x + _ ≤ ω := eLpNorm_indicator_higherDiff_le_modulusOn hnorm + rw [eLpNorm_congr_ae hae] + exact eLpNorm_integral_kernel_le_of_bound hp1 hp hg.aestronglyMeasurable + (lintegral_enorm_ne_zero_of_integral_eq_one hg h1) hg.2.ne hG hbound + +/-- **Moment kernels approximate with the modulus of smoothness**: if `g` has integral `1` and +vanishes outside the ball of radius `R`, then `‖f - m_c ⋆ f‖_p ≤ ‖g‖_1 ω_L(f, R/c)_p` (the case +`U = V` of `Rd.eLpNorm_indicator_sub_convLp_momentKernel_le`). -/ +theorem enorm_sub_convLp_momentKernel_le {p : ℝ≥0∞} [Fact (1 ≤ p)] (hp : p ≠ ∞) {g : V → ℂ} + (hg : Integrable g μ) (h1 : ∫ x, g x ∂μ = 1) {R : ℝ} (hgR : ∀ z, R < ‖z‖ → g z = 0) + (L : ℕ) {c : ℝ} (hc : 0 < c) (f : Lp ℂ p μ) : + ‖f - convLp hp (integrable_dilate (integrable_momentKernel hg L) hc.ne') f‖ₑ ≤ + (∫⁻ z, ‖g z‖ₑ ∂μ) * modulus μ L p (f : V → ℂ) (R / c) := by + have h := eLpNorm_indicator_sub_convLp_momentKernel_le hp hg h1 hgR L hc MeasurableSet.univ + (T := Set.univ) (fun _ _ => by rw [stepSet_univ]) f + rwa [Set.indicator_univ, modulusOn_univ, ← Lp.eNorm_def] at h + +end Rd + +namespace Rd + +variable {V : Type*} [NormedAddCommGroup V] [InnerProductSpace ℝ V] [FiniteDimensional ℝ V] + [MeasurableSpace V] [BorelSpace V] {μ : Measure V} [μ.IsAddHaarMeasure] + +/-! ### First moments of the moment kernels of order two -/ + +/-- **The moment kernel of order two has vanishing first moments**: for +`m = 2 g - g_{1/2}` (`Rd.momentKernel g 2`) and every `w`, `∫ ⟪w, x⟫ m(x) dx = 0`, since the first +moment of `g_c` is `c⁻¹` times that of `g` (`Rd.integral_inner_mul_dilate`). -/ +theorem integral_inner_mul_momentKernel_two {g : V → ℂ} (w : V) + (hg : Integrable (fun x => (inner ℝ w x : ℂ) * g x) μ) : + ∫ x, (inner ℝ w x : ℂ) * momentKernel g 2 x ∂μ = 0 := by + have hint : ∀ {c : ℝ}, c ≠ 0 → Integrable (fun x => (inner ℝ w x : ℂ) * dilate c g x) μ := + fun hc => by + simp_rw [inner_mul_dilate_eq g w hc] + exact (integrable_dilate hg hc).const_mul _ + have hpt : ∀ x, (inner ℝ w x : ℂ) * momentKernel g 2 x = + 2 * ((inner ℝ w x : ℂ) * dilate 1 g x) - (inner ℝ w x : ℂ) * dilate (1 / 2) g x := + fun x => by + simp [momentKernel, Finset.sum_range_succ, jacksonCoeff, one_add_one_eq_two] + ring + simp_rw [hpt] + rw [integral_sub ((hint one_ne_zero).const_mul _) (hint (by norm_num)), integral_const_mul, + integral_inner_mul_dilate g w one_pos, + integral_inner_mul_dilate g w (by norm_num : (0 : ℝ) < 1 / 2)] + push_cast + ring + +end Rd diff --git a/LeanPool/FunctionSpaces/Rd/Differences/PointwiseMultipliers.lean b/LeanPool/FunctionSpaces/Rd/Differences/PointwiseMultipliers.lean new file mode 100644 index 0000000000..f95f6cfbad --- /dev/null +++ b/LeanPool/FunctionSpaces/Rd/Differences/PointwiseMultipliers.lean @@ -0,0 +1,550 @@ +/- +Copyright (c) 2026 Mario Ullrich. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Mario Ullrich +-/ +module + +public import LeanPool.FunctionSpaces.Rd.Differences.BesovDifferences + +/- +Modified for Lean Pool: module names and imports adapted. +-/ + +/-! +# Pointwise multipliers on `V` + +A smooth `ψ : V → ℂ` with bounded derivatives up to order `r` multiplies the Besov spaces by +differences into themselves (`Rd.modNorm_mulLp_le`): for `1 ≤ p < ∞`, `0 < s < r` and +`1 ≤ q ≤ ∞` there is `C < ∞` (`Rd.multiplierTotal`) with + +`‖ψ f‖_p + ‖(2^(ks) ω_r(ψ f, 2^(-k))_p)_k‖_{ℓ_q} ≤ C (‖f‖_p + ‖(2^(ks) ω_r(f, 2^(-k))_p)_k‖_{ℓ_q})`. + +The ingredients: + +* **bounded derivatives**: on a compact set, the derivatives of a smooth function up to order + `r` are bounded (`ContDiffOn.exists_norm_iteratedFDerivWithin_le` for derivatives within a + set, `Rd.exists_iteratedFDeriv_bound` with compact support); +* **differences of smooth functions**: for `G` of class `C^l`, `‖Δ_h^l G(x)‖ ≤ C ‖h‖^l` if + `‖D^l G‖ ≤ C` on the segment from `x` to `x + l h` (`Rd.norm_higherDiff_le_of_segment`), by the + mean value inequality, in particular if `‖D^l G‖ ≤ C` everywhere + (`Rd.norm_higherDiff_le_of_iteratedFDeriv`); +* **Leibniz's rule for differences** (`Rd.higherDiff_mul`): + `Δ_h^r(u v)(x) = ∑_{l ≤ r} C(r, l) Δ_h^l u(x) Δ_h^(r-l) v(x + l h)`, hence + `ω_r(ψ f, t)_p ≤ ∑_{l ≤ r} C(r, l) C t^l ω_(r-l)(f, t)_p` (`Rd.modulus_mul_smooth_le`); +* **moduli of lower order** (`Rd.lqNorm_lpModulus_sub_le`): for `1 ≤ l ≤ s`, the quasi-norm with + smoothness `s - l` and order `r - l` is bounded by the one with smoothness `s` and order `r`, + through band-limited approximation, which does not depend on the order of the modulus + (`Rd.bandModulusData`); for `l > s` the bound `ω_(r-l) ≤ 2^(r-l) ‖f‖_p` suffices. + +Multiplication by a bounded continuous function is a bounded linear operator on `L_p` +(`Rd.mulLpL`). In particular, multiplication by a smooth `χ` with compact support is bounded in +the Besov quasi-norm by differences (`Rd.exists_mul_modNorm_le`). +-/ + +@[expose] public section + +open MeasureTheory Filter +open scoped ENNReal + +open ENNReal (lqNorm dyadicWeight) + +namespace Rd + +section Smooth + +variable {V E : Type*} [NormedAddCommGroup V] [NormedSpace ℝ V] [NormedAddCommGroup E] + [NormedSpace ℝ E] + +/-- The derivative bound of one step of `Rd.norm_higherDiff_le_of_segment`: for `G` of class +`C^(l+1)`, if `‖D^(l+1) G‖ ≤ C` at the points `x + s h`, `0 ≤ s ≤ l + 1`, then +`‖D^l (Δ_h G)‖ ≤ C ‖h‖` at the points `x + t h`, `0 ≤ t ≤ l`, by the mean value inequality on the +segment from `x + t h` to `x + (t + 1) h`. -/ +theorem norm_iteratedFDeriv_fwdDiff_le_of_segment {G : V → E} (l : ℕ) + (hG : ContDiff ℝ (l + 1 : ℕ) G) (h x : V) {C : ℝ} + (hC : ∀ s ∈ Set.Icc (0 : ℝ) (l + 1 : ℕ), ‖iteratedFDeriv ℝ (l + 1) G (x + s • h)‖ ≤ C) + {t : ℝ} (ht : t ∈ Set.Icc (0 : ℝ) l) : + ‖iteratedFDeriv ℝ l (fwdDiff h G) (x + t • h)‖ ≤ C * ‖h‖ := by + have hGh : ContDiff ℝ (l + 1 : ℕ) fun z => G (z + h) := hG.comp (contDiff_id.add contDiff_const) + have hle : (l : WithTop ℕ∞) ≤ (l + 1 : ℕ) := by exact_mod_cast Nat.le_succ l + have hd : Differentiable ℝ (iteratedFDeriv ℝ l G) := + hG.differentiable_iteratedFDeriv (by exact_mod_cast Nat.lt_succ_self l) + have hsub : iteratedFDeriv ℝ l (fwdDiff h G) (x + t • h) = + iteratedFDeriv ℝ l G (x + t • h + h) - iteratedFDeriv ℝ l G (x + t • h) := by + rw [show fwdDiff h G = (fun z => G (z + h)) - G from rfl, + iteratedFDeriv_sub_apply (hGh.contDiffAt.of_le hle) (hG.contDiffAt.of_le hle), + iteratedFDeriv_comp_add_right] + have hder : ∀ z ∈ segment ℝ (x + t • h) (x + t • h + h), + ‖fderiv ℝ (iteratedFDeriv ℝ l G) z‖ ≤ C := by + intro z hz + rw [segment_eq_image'] at hz + obtain ⟨θ, hθ, rfl⟩ := hz + rw [add_sub_cancel_left, norm_fderiv_iteratedFDeriv] + have hmem : t + θ ∈ Set.Icc (0 : ℝ) (l + 1 : ℕ) := by + refine ⟨by linarith [ht.1, hθ.1], ?_⟩ + push_cast + linarith [ht.2, hθ.2] + have := hC (t + θ) hmem + rwa [add_smul, ← add_assoc] at this + have hmv := (convex_segment _ _).norm_image_sub_le_of_norm_fderiv_le + (fun z _ => hd z) hder (left_mem_segment ℝ _ _) (right_mem_segment ℝ _ _) + rw [add_sub_cancel_left] at hmv + rw [hsub] + exact hmv + +/-- **Differences along a segment**: for `G` of class `C^l`, if `‖D^l G‖ ≤ C` at the points +`x + t h`, `0 ≤ t ≤ l`, then `‖Δ_h^l G(x)‖ ≤ C ‖h‖^l`. By induction on `l`: the derivatives of +order `l` of `Δ_h G` at `x + t h` are differences of those of `G`, bounded by the mean value +inequality on the segment from `x + t h` to `x + (t + 1) h`. -/ +theorem norm_higherDiff_le_of_segment {G : V → E} (l : ℕ) (hG : ContDiff ℝ l G) (h x : V) + {C : ℝ} (hC : ∀ t ∈ Set.Icc (0 : ℝ) l, ‖iteratedFDeriv ℝ l G (x + t • h)‖ ≤ C) : + ‖(fwdDiff h)^[l] G x‖ ≤ C * ‖h‖ ^ l := by + induction l generalizing G C with + | zero => + have := hC 0 (by simp) + simpa [norm_iteratedFDeriv_zero] using this + | succ l ih => + have hG' : ContDiff ℝ l (fwdDiff h G) := + ((hG.comp (contDiff_id.add contDiff_const)).sub hG).of_le + (by exact_mod_cast Nat.le_succ l) + rw [Function.iterate_succ_apply] + calc ‖(fwdDiff h)^[l] (fwdDiff h G) x‖ ≤ C * ‖h‖ * ‖h‖ ^ l := + ih hG' fun t ht => norm_iteratedFDeriv_fwdDiff_le_of_segment l hG h x hC ht + _ = C * ‖h‖ ^ (l + 1) := by ring + +/-- **Differences of smooth functions**: if `‖D^l G‖ ≤ C` everywhere, then +`‖Δ_h^l G(x)‖ ≤ C ‖h‖^l`, the case of `Rd.norm_higherDiff_le_of_segment` with the bound on the +whole space. -/ +theorem norm_higherDiff_le_of_iteratedFDeriv {G : V → E} + (hG : ContDiff ℝ ((⊤ : ℕ∞) : WithTop ℕ∞) G) {l : ℕ} {C : ℝ} + (hC : ∀ x, ‖iteratedFDeriv ℝ l G x‖ ≤ C) (h x : V) : + ‖(fwdDiff h)^[l] G x‖ ≤ C * ‖h‖ ^ l := + norm_higherDiff_le_of_segment l (hG.of_le (WithTop.coe_le_coe.2 le_top)) h x fun _ _ => hC _ + +/-- The bound `‖ψ‖ ≤ C` from `‖D^0 ψ‖ ≤ C`. -/ +theorem norm_le_of_iteratedFDeriv_le {ψ : V → E} {r : ℕ} {C : ℝ} + (hC : ∀ l ≤ r, ∀ x, ‖iteratedFDeriv ℝ l ψ x‖ ≤ C) (x : V) : ‖ψ x‖ ≤ C := by + simpa [norm_iteratedFDeriv_zero] using hC 0 (Nat.zero_le r) x + +/-- **Smooth functions with compact support have bounded derivatives** up to every order. -/ +theorem exists_iteratedFDeriv_bound {G : V → E} (hG : ContDiff ℝ ((⊤ : ℕ∞) : WithTop ℕ∞) G) + (hcs : HasCompactSupport G) (r : ℕ) : + ∃ C : ℝ, ∀ l ≤ r, ∀ x, ‖iteratedFDeriv ℝ l G x‖ ≤ C := by + have hb : ∀ l : ℕ, ∃ C : ℝ, ∀ x, ‖iteratedFDeriv ℝ l G x‖ ≤ C := fun l => + (hG.continuous_iteratedFDeriv (WithTop.coe_le_coe.2 le_top)).bounded_above_of_compact_support + (hcs.iteratedFDeriv l) + choose C hC using hb + refine ⟨∑ l ∈ Finset.range (r + 1), |C l|, fun l hl x => (hC l x).trans ((le_abs_self _).trans + ?_)⟩ + exact Finset.single_le_sum (f := fun l => |C l|) (fun _ _ => abs_nonneg _) + (Finset.mem_range.2 (Nat.lt_succ_of_le hl)) + +/-- **Bounded derivatives on a compact set**: if `f` is smooth on a set `s` of unique +differentiability and `K ⊆ s` is compact, then the derivatives of `f` within `s` of the orders +`i ≤ r` are bounded on `K` by one constant (their norms are continuous on `K`). -/ +theorem _root_.ContDiffOn.exists_norm_iteratedFDerivWithin_le {E F : Type*} + [NormedAddCommGroup E] [NormedSpace ℝ E] [NormedAddCommGroup F] [NormedSpace ℝ F] + {f : E → F} {s K : Set E} (hf : ContDiffOn ℝ ((⊤ : ℕ∞) : WithTop ℕ∞) f s) + (hs : UniqueDiffOn ℝ s) (hK : IsCompact K) (hKs : K ⊆ s) (r : ℕ) : + ∃ C : ℝ, ∀ i ≤ r, ∀ x ∈ K, ‖iteratedFDerivWithin ℝ i f s x‖ ≤ C := by + have hcont : ContinuousOn + (fun x => ∑ i ∈ Finset.range (r + 1), ‖iteratedFDerivWithin ℝ i f s x‖) K := + continuousOn_finsetSum _ fun i _ => + ((hf.continuousOn_iteratedFDerivWithin (WithTop.coe_le_coe.2 le_top) hs).mono hKs).norm + obtain ⟨C, hC⟩ := hK.exists_bound_of_continuousOn hcont + refine ⟨C, fun i hi x hx => ?_⟩ + refine le_trans ?_ ((Real.le_norm_self _).trans (hC x hx)) + exact Finset.single_le_sum (f := fun i => ‖iteratedFDerivWithin ℝ i f s x‖) + (fun _ _ => norm_nonneg _) (Finset.mem_range.2 (Nat.lt_succ_of_le hi)) + +end Smooth + +section Leibniz + +/-- **Pascal's rule for sums**: +`∑_{l ≤ r} C(r, l) F(l + 1) + ∑_{l ≤ r} C(r, l) F(l) = ∑_{l ≤ r+1} C(r + 1, l) F(l)`. -/ +theorem sum_choose_mul_succ_add (r : ℕ) (F : ℕ → ℂ) : + ∑ l ∈ Finset.range (r + 1), (r.choose l : ℂ) * F (l + 1) + + ∑ l ∈ Finset.range (r + 1), (r.choose l : ℂ) * F l = + ∑ l ∈ Finset.range (r + 2), ((r + 1).choose l : ℂ) * F l := by + rw [Finset.sum_range_succ' _ (r + 1), Finset.sum_range_succ' (fun l => (r.choose l : ℂ) * F l) r] + simp only [Nat.choose_succ_succ', Nat.cast_add, add_mul, Finset.sum_add_distrib, + Nat.choose_zero_right, Nat.cast_one, one_mul] + rw [Finset.sum_range_succ (fun l => (r.choose (l + 1) : ℂ) * F (l + 1)) r, Nat.choose_succ_self, + Nat.cast_zero, zero_mul, add_zero] + ring + +variable {V : Type*} [NormedAddCommGroup V] [NormedSpace ℝ V] + +/-- **Leibniz's rule for differences**: +`Δ_h^r(u v)(x) = ∑_{l ≤ r} C(r, l) Δ_h^l u(x) Δ_h^(r-l) v(x + l h)`, by induction from +`Δ_h(u v)(x) = Δ_h u(x) v(x + h) + u(x) Δ_h v(x)` and Pascal's rule. -/ +theorem higherDiff_mul (r : ℕ) (h : V) (u v : V → ℂ) (x : V) : + (fwdDiff h)^[r] (fun y => u y * v y) x = ∑ l ∈ Finset.range (r + 1), + (r.choose l : ℂ) * ((fwdDiff h)^[l] u x * (fwdDiff h)^[r - l] v (x + (l : ℝ) • h)) := by + induction r generalizing u v x with + | zero => simp + | succ r ih => + have hstep : fwdDiff h (fun y => u y * v y) = + (fun y => fwdDiff h u y * v (y + h)) + fun y => u y * fwdDiff h v y := by + funext y + simp only [fwdDiff, Pi.add_apply] + ring + have hT1 : (fwdDiff h)^[r] (fun y => fwdDiff h u y * v (y + h)) x = + ∑ l ∈ Finset.range (r + 1), (r.choose l : ℂ) * ((fwdDiff h)^[l + 1] u x * + (fwdDiff h)^[r + 1 - (l + 1)] v (x + ((l + 1 : ℕ) : ℝ) • h)) := by + rw [ih] + refine Finset.sum_congr rfl fun l _ => ?_ + rw [Function.iterate_succ_apply, higherDiff_comp_add, Nat.add_sub_add_right] + congr 3 + push_cast + rw [add_smul, one_smul, add_assoc] + have hT2 : (fwdDiff h)^[r] (fun y => u y * fwdDiff h v y) x = + ∑ l ∈ Finset.range (r + 1), (r.choose l : ℂ) * ((fwdDiff h)^[l] u x * + (fwdDiff h)^[r + 1 - l] v (x + (l : ℝ) • h)) := by + rw [ih] + refine Finset.sum_congr rfl fun l hl => ?_ + have hlr : l ≤ r := Nat.lt_succ_iff.1 (Finset.mem_range.1 hl) + rw [← Function.iterate_succ_apply (fwdDiff h) (r - l) v, + show (r - l).succ = r + 1 - l by omega] + rw [Function.iterate_succ_apply, hstep, fwdDiff_iter_add, Pi.add_apply, hT1, hT2] + exact sum_choose_mul_succ_add r fun l => + (fwdDiff h)^[l] u x * (fwdDiff h)^[r + 1 - l] v (x + (l : ℝ) • h) + +end Leibniz + +section Lp + +variable {V : Type*} [NormedAddCommGroup V] [NormedSpace ℝ V] [MeasurableSpace V] [BorelSpace V] + {μ : Measure V} [μ.IsAddHaarMeasure] + +/-- **Differences of products**: for a smooth `ψ` with `‖D^l ψ‖ ≤ C` for `l ≤ r`, +`‖Δ_h^r(ψ F)‖_p ≤ ∑_{l ≤ r} C(r, l) C ‖h‖^l ‖Δ_h^(r-l) F‖_p`. -/ +theorem eLpNorm_higherDiff_mul_le {ψ F : V → ℂ} (hψ : ContDiff ℝ ((⊤ : ℕ∞) : WithTop ℕ∞) ψ) + {r : ℕ} {C : ℝ} (hC : ∀ l ≤ r, ∀ x, ‖iteratedFDeriv ℝ l ψ x‖ ≤ C) + (hF : AEStronglyMeasurable F μ) {p : ℝ≥0∞} (hp : 1 ≤ p) (h : V) : + eLpNorm ((fwdDiff h)^[r] (fun x => ψ x * F x)) p μ ≤ + ∑ l ∈ Finset.range (r + 1), (r.choose l : ℝ≥0∞) * ENNReal.ofReal (C * ‖h‖ ^ l) * + eLpNorm ((fwdDiff h)^[r - l] F) p μ := by + have hC0 : 0 ≤ C := (norm_nonneg _).trans (hC 0 (Nat.zero_le r) 0) + set g : ℕ → V → ℝ := fun l x => + (r.choose l : ℝ) * (C * ‖h‖ ^ l) * ‖(fwdDiff h)^[r - l] F (x + (l : ℝ) • h)‖ + have hmeas : ∀ l, AEStronglyMeasurable (fun x => (fwdDiff h)^[r - l] F (x + (l : ℝ) • h)) μ := + fun l => aestronglyMeasurable_comp_add (aestronglyMeasurable_higherDiff hF _ h) _ + have hpt : ∀ x, ‖(fwdDiff h)^[r] (fun x => ψ x * F x) x‖ ≤ ∑ l ∈ Finset.range (r + 1), g l x := + fun x => by + rw [higherDiff_mul] + refine (norm_sum_le _ _).trans (Finset.sum_le_sum fun l hl => ?_) + rw [norm_mul, norm_mul, Complex.norm_natCast, ← mul_assoc] + have hl' : l ≤ r := Nat.lt_succ_iff.1 (Finset.mem_range.1 hl) + have := norm_higherDiff_le_of_iteratedFDeriv hψ (hC l hl') h x + exact mul_le_mul_of_nonneg_right (mul_le_mul_of_nonneg_left this (by positivity)) + (norm_nonneg _) + have hmeasL : AEStronglyMeasurable ((fwdDiff h)^[r] (fun x => ψ x * F x)) μ := + aestronglyMeasurable_higherDiff (hψ.continuous.aestronglyMeasurable.mul hF) r h + calc eLpNorm ((fwdDiff h)^[r] (fun x => ψ x * F x)) p μ + ≤ eLpNorm (fun x => ∑ l ∈ Finset.range (r + 1), g l x) p μ := eLpNorm_mono_real hmeasL hpt + _ = eLpNorm (∑ l ∈ Finset.range (r + 1), g l) p μ := by + congr 1 + funext x + simp + _ ≤ ∑ l ∈ Finset.range (r + 1), eLpNorm (g l) p μ := + eLpNorm_sum_le hp + _ = ∑ l ∈ Finset.range (r + 1), (r.choose l : ℝ≥0∞) * ENNReal.ofReal (C * ‖h‖ ^ l) * + eLpNorm ((fwdDiff h)^[r - l] F) p μ := by + refine Finset.sum_congr rfl fun l _ => ?_ + have hc : 0 ≤ (r.choose l : ℝ) * (C * ‖h‖ ^ l) := by positivity + have : g l = ((r.choose l : ℝ) * (C * ‖h‖ ^ l)) • + fun x => ‖(fwdDiff h)^[r - l] F (x + (l : ℝ) • h)‖ := by + funext x + simp [g, smul_eq_mul] + rw [this, eLpNorm_const_smul, eLpNorm_norm _ (hmeas l), + eLpNorm_comp_add_right (aestronglyMeasurable_higherDiff hF _ h), Real.eNorm_eq_ofReal hc, + ENNReal.ofReal_mul (by positivity), ENNReal.ofReal_natCast] + +/-- **The modulus of a product**: +`ω_r(ψ F, t)_p ≤ ∑_{l ≤ r} C(r, l) C t^l ω_(r-l)(F, t)_p` for `t ≥ 0`. -/ +theorem modulus_mul_smooth_le {ψ F : V → ℂ} (hψ : ContDiff ℝ ((⊤ : ℕ∞) : WithTop ℕ∞) ψ) {r : ℕ} + {C : ℝ} (hC : ∀ l ≤ r, ∀ x, ‖iteratedFDeriv ℝ l ψ x‖ ≤ C) (hF : AEStronglyMeasurable F μ) + {p : ℝ≥0∞} (hp : 1 ≤ p) {t : ℝ} : + modulus μ r p (fun x => ψ x * F x) t ≤ ∑ l ∈ Finset.range (r + 1), + (r.choose l : ℝ≥0∞) * ENNReal.ofReal (C * t ^ l) * modulus μ (r - l) p F t := by + have hC0 : 0 ≤ C := (norm_nonneg _).trans (hC 0 (Nat.zero_le r) 0) + refine iSup₂_le fun h hh => (eLpNorm_higherDiff_mul_le hψ hC hF hp h).trans + (Finset.sum_le_sum fun l _ => ?_) + gcongr + exact eLpNorm_higherDiff_le_modulus hh + +end Lp + +section Multiplier + +variable {V : Type*} [NormedAddCommGroup V] [InnerProductSpace ℝ V] [FiniteDimensional ℝ V] + [MeasurableSpace V] [BorelSpace V] {p : ℝ≥0∞} [Fact (1 ≤ p)] + +omit [Fact (1 ≤ p)] in +/-- Multiplication by a continuous function bounded by `C` keeps `L_p`. -/ +theorem memLp_mul_of_bound {ψ : V → ℂ} (hψ : Continuous ψ) {C : ℝ} (hψC : ∀ x, ‖ψ x‖ ≤ C) + (F : Lp ℂ p (volume : Measure V)) : MemLp (fun x => ψ x * F x) p volume := + (Lp.memLp F).of_le_mul (hψ.aestronglyMeasurable.mul (Lp.aestronglyMeasurable F)) + (Eventually.of_forall fun x => by + rw [norm_mul] + exact mul_le_mul_of_nonneg_right (hψC x) (norm_nonneg _)) + +/-- The product `ψ F` of a bounded continuous function and an element of `L_p`. -/ +noncomputable def mulLp {ψ : V → ℂ} (hψ : Continuous ψ) {C : ℝ} (hψC : ∀ x, ‖ψ x‖ ≤ C) + (F : Lp ℂ p (volume : Measure V)) : Lp ℂ p (volume : Measure V) := + (memLp_mul_of_bound hψ hψC F).toLp _ + +omit [Fact (1 ≤ p)] in +/-- The product in `L_p` is `ψ F` almost everywhere. -/ +theorem mulLp_apply_ae {ψ : V → ℂ} (hψ : Continuous ψ) {C : ℝ} (hψC : ∀ x, ‖ψ x‖ ≤ C) + (F : Lp ℂ p (volume : Measure V)) : mulLp hψ hψC F =ᵐ[volume] fun x => ψ x * F x := + MemLp.coeFn_toLp _ + +omit [Fact (1 ≤ p)] in +/-- Multiplication by `ψ` is additive: `ψ (F - G) = ψ F - ψ G` in `L_p`. -/ +theorem mulLp_sub {ψ : V → ℂ} (hψ : Continuous ψ) {C : ℝ} (hψC : ∀ x, ‖ψ x‖ ≤ C) + (F G : Lp ℂ p (volume : Measure V)) : + mulLp hψ hψC (F - G) = mulLp hψ hψC F - mulLp hψ hψC G := by + refine Lp.ext ?_ + filter_upwards [mulLp_apply_ae hψ hψC (F - G), mulLp_apply_ae hψ hψC F, + mulLp_apply_ae hψ hψC G, Lp.coeFn_sub F G, + Lp.coeFn_sub (mulLp hψ hψC F) (mulLp hψ hψC G)] with x h1 h2 h3 h4 h5 + rw [h1, h5, Pi.sub_apply, h2, h3, h4, Pi.sub_apply, mul_sub] + +omit [Fact (1 ≤ p)] in +/-- Multiplication by `ψ` is additive: `ψ (F + G) = ψ F + ψ G` in `L_p`. -/ +theorem mulLp_add {ψ : V → ℂ} (hψ : Continuous ψ) {C : ℝ} (hψC : ∀ x, ‖ψ x‖ ≤ C) + (F G : Lp ℂ p (volume : Measure V)) : + mulLp hψ hψC (F + G) = mulLp hψ hψC F + mulLp hψ hψC G := by + refine Lp.ext ?_ + filter_upwards [mulLp_apply_ae hψ hψC (F + G), mulLp_apply_ae hψ hψC F, + mulLp_apply_ae hψ hψC G, Lp.coeFn_add F G, + Lp.coeFn_add (mulLp hψ hψC F) (mulLp hψ hψC G)] with x h1 h2 h3 h4 h5 + rw [h1, h5, Pi.add_apply, h2, h3, h4, Pi.add_apply, mul_add] + +omit [Fact (1 ≤ p)] in +/-- Multiplication by `ψ` commutes with complex scalars: `ψ (c F) = c (ψ F)` in `L_p`. -/ +theorem mulLp_smul {ψ : V → ℂ} (hψ : Continuous ψ) {C : ℝ} (hψC : ∀ x, ‖ψ x‖ ≤ C) (c : ℂ) + (F : Lp ℂ p (volume : Measure V)) : mulLp hψ hψC (c • F) = c • mulLp hψ hψC F := by + refine Lp.ext ?_ + filter_upwards [mulLp_apply_ae hψ hψC (c • F), mulLp_apply_ae hψ hψC F, Lp.coeFn_smul c F, + Lp.coeFn_smul c (mulLp hψ hψC F)] with x h1 h2 h3 h4 + rw [h1, h4, Pi.smul_apply, h2, h3, Pi.smul_apply, smul_eq_mul, smul_eq_mul] + ring + +/-- `‖ψ F‖_p ≤ C ‖F‖_p`. -/ +theorem enorm_mulLp_le {ψ : V → ℂ} (hψ : Continuous ψ) {C : ℝ} (hψC : ∀ x, ‖ψ x‖ ≤ C) + (F : Lp ℂ p (volume : Measure V)) : ‖mulLp hψ hψC F‖ₑ ≤ ENNReal.ofReal C * ‖F‖ₑ := by + rw [Lp.eNorm_def, Lp.eNorm_def, eLpNorm_congr_ae (mulLp_apply_ae hψ hψC F)] + exact eLpNorm_le_mul_eLpNorm_of_ae_le_mul + (hψ.aestronglyMeasurable.mul (Lp.aestronglyMeasurable F)) + (Eventually.of_forall fun x => by + rw [Pi.mul_apply, norm_mul] + exact mul_le_mul_of_nonneg_right (hψC x) (norm_nonneg _)) p + +/-- **Multiplication by a bounded continuous function** `ψ`, `‖ψ‖ ≤ C`, as a bounded linear +operator on `L_p` of norm at most `max C 0` (`Rd.mulLp`, `Rd.enorm_mulLp_le`). It is Mathlib's +`ContinuousLinearMap.holderL` with `q = ∞` and `B = ContinuousLinearMap.mul ℂ ℂ`, applied to the +`L_∞` class of `ψ`, packaged so that `Rd.mulLpL_apply` is `rfl` on the project's `Rd.mulLp`. -/ +noncomputable def mulLpL {ψ : V → ℂ} (hψ : Continuous ψ) {C : ℝ} (hψC : ∀ x, ‖ψ x‖ ≤ C) : + Lp ℂ p (volume : Measure V) →L[ℂ] Lp ℂ p (volume : Measure V) := + LinearMap.mkContinuous + { toFun := mulLp hψ hψC + map_add' := mulLp_add hψ hψC + map_smul' := mulLp_smul hψ hψC } + (ENNReal.ofReal C).toReal fun F => by + have h := ENNReal.toReal_mono (ENNReal.mul_ne_top ENNReal.ofReal_ne_top eNorm_ne_top) + (enorm_mulLp_le hψ hψC F) + rwa [ENNReal.toReal_mul, toReal_eNorm, toReal_eNorm] at h + +/-- The operator `Rd.mulLpL` is `Rd.mulLp`. -/ +theorem mulLpL_apply {ψ : V → ℂ} (hψ : Continuous ψ) {C : ℝ} (hψC : ∀ x, ‖ψ x‖ ≤ C) + (F : Lp ℂ p (volume : Measure V)) : mulLpL hψ hψC F = mulLp hψ hψC F := + rfl + +/-- **Moduli of lower order**: for `l ≤ s < r`, the quasi-norm with smoothness `s - l` and order +`r - l` is at most a constant times the one with smoothness `s` and order `r`, since both equal +band-limited approximation spaces (`Rd.bandModulusData`) and `A^s_q ⊆ A^(s-l)_q`. -/ +theorem lqNorm_lpModulus_sub_le (hp : p ≠ ∞) {r l : ℕ} {s : ℝ} (hl : (l : ℝ) ≤ s) (hsr : s < r) + {q : ℝ≥0∞} (hq : 1 ≤ q) (F : Lp ℂ p (volume : Measure V)) : + lqNorm q (fun k => dyadicWeight (s - l) k * lpModulus p (r - l) F k) ≤ + (bandModulusData (V := V) hp (r - l)).inverseConst (s - l) * + (1 - (2 : ℝ≥0∞) ^ (-(l : ℝ)))⁻¹ * (bandModulusData (V := V) hp r).directConst s * + (‖F‖ₑ + lqNorm q (fun k => dyadicWeight s k * lpModulus p r F k)) := by + have hlr : l ≤ r := by exact_mod_cast hl.trans hsr.le + set M' := bandModulusData (V := V) hp (r - l) + set M := bandModulusData (V := V) hp r + have hθ : s - l < ((r - l : ℕ) : ℝ) := by + rw [Nat.cast_sub hlr] + linarith + calc lqNorm q (fun k => dyadicWeight (s - l) k * lpModulus p (r - l) F k) + ≤ M'.modNorm (s - l) q F := le_add_self + _ ≤ M'.inverseConst (s - l) * (bandScheme hp).approxNormDyadic (s - l) q F := + M'.modNorm_le_approxNormDyadic hq (by linarith) hθ F + _ ≤ M'.inverseConst (s - l) * ((1 - (2 : ℝ≥0∞) ^ (-(s - (s - l))))⁻¹ * + (bandScheme hp).approxNormDyadic s q F) := + mul_le_mul' le_rfl (ApproximationScheme.approxNormDyadic_le_of_lt hq hq F) + _ ≤ M'.inverseConst (s - l) * ((1 - (2 : ℝ≥0∞) ^ (-(s - (s - l))))⁻¹ * + (M.directConst s * M.modNorm s q F)) := + mul_le_mul' le_rfl (mul_le_mul' le_rfl (M.approxNormDyadic_le_modNorm hq F)) + _ = M'.inverseConst (s - l) * (1 - (2 : ℝ≥0∞) ^ (-(l : ℝ)))⁻¹ * M.directConst s * + M.modNorm s q F := by + rw [sub_sub_cancel] + ring + +/-- The constant of the multiplier bound at the order `l`. -/ +noncomputable def multiplierConst (hp : p ≠ ∞) (r : ℕ) (s : ℝ) (l : ℕ) : ℝ≥0∞ := + if l = 0 then 1 else if (l : ℝ) ≤ s then + (bandModulusData (V := V) hp (r - l)).inverseConst (s - l) * + (1 - (2 : ℝ≥0∞) ^ (-(l : ℝ)))⁻¹ * (bandModulusData (V := V) hp r).directConst s + else 2 ^ (r - l) * (1 - (2 : ℝ≥0∞) ^ (-((l : ℝ) - s)))⁻¹ + +/-- The constants of the multiplier bound are finite for `s < r`. -/ +theorem multiplierConst_ne_top (hp : p ≠ ∞) {r : ℕ} {s : ℝ} (hsr : s < r) (l : ℕ) : + multiplierConst (V := V) hp r s l ≠ ∞ := by + unfold multiplierConst + split_ifs with h0 hls + · exact ENNReal.one_ne_top + · have hlr : l ≤ r := by exact_mod_cast hls.trans hsr.le + refine ENNReal.mul_ne_top (ENNReal.mul_ne_top + ((bandModulusData (V := V) hp (r - l)).inverseConst_ne_top ?_) + (ENNReal.one_sub_two_rpow_neg_inv_ne_top ?_)) + ((bandModulusData (V := V) hp r).directConst_ne_top s) + · rw [Nat.cast_sub hlr] + linarith + · exact_mod_cast Nat.pos_of_ne_zero h0 + · replace hls := not_le.1 hls + exact ENNReal.mul_ne_top (ENNReal.pow_ne_top ENNReal.ofNat_ne_top) + (ENNReal.one_sub_two_rpow_neg_inv_ne_top (by linarith)) + +/-- **The terms of order `l`**: `‖(2^(k(s-l)) ω_(r-l)(F, 2^(-k))_p)_k‖_{ℓ_q} ≤ K_l ‖F‖_{s,r}` for +`l ≤ r`. -/ +theorem lqNorm_lpModulus_le_multiplierConst (hp : p ≠ ∞) {r l : ℕ} (hlr : l ≤ r) {s : ℝ} + (hsr : s < r) {q : ℝ≥0∞} (hq : 1 ≤ q) (F : Lp ℂ p (volume : Measure V)) : + lqNorm q (fun k => dyadicWeight (s - l) k * lpModulus p (r - l) F k) ≤ + multiplierConst (V := V) hp r s l * + (‖F‖ₑ + lqNorm q (fun k => dyadicWeight s k * lpModulus p r F k)) := by + unfold multiplierConst + split_ifs with h0 hls + · subst h0 + simp only [Nat.cast_zero, sub_zero, Nat.sub_zero, one_mul] + exact le_add_self + · exact lqNorm_lpModulus_sub_le hp hls hsr hq F + · replace hls := not_le.1 hls + calc lqNorm q (fun k => dyadicWeight (s - l) k * lpModulus p (r - l) F k) + ≤ lqNorm q (fun k => (2 ^ (r - l) * ‖F‖ₑ) * dyadicWeight (-((l : ℝ) - s)) k) := + ENNReal.lqNorm_mono fun k => by + rw [show s - (l : ℝ) = -((l : ℝ) - s) by ring, mul_comm] + exact mul_le_mul' (lpModulus_le _ F k) le_rfl + _ = 2 ^ (r - l) * ‖F‖ₑ * lqNorm q (dyadicWeight (-((l : ℝ) - s))) := + ENNReal.lqNorm_const_mul _ _ + _ ≤ 2 ^ (r - l) * ‖F‖ₑ * (1 - (2 : ℝ≥0∞) ^ (-((l : ℝ) - s)))⁻¹ := + mul_le_mul' le_rfl (ENNReal.lqNorm_dyadicWeight_neg_le hq _) + _ ≤ 2 ^ (r - l) * (1 - (2 : ℝ≥0∞) ^ (-((l : ℝ) - s)))⁻¹ * + (‖F‖ₑ + lqNorm q (fun k => dyadicWeight s k * lpModulus p r F k)) := by + rw [mul_right_comm] + exact mul_le_mul' le_rfl le_self_add + +/-- The **constant of the multiplier bound** `K = C + ∑_{l ≤ r} C(r, l) C K_l` for a bound `C` of +the derivatives up to order `r`, with the constants `K_l` of `Rd.multiplierConst`. -/ +noncomputable def multiplierTotal (hp : p ≠ ∞) (r : ℕ) (s : ℝ) (C : ℝ) : ℝ≥0∞ := + ENNReal.ofReal C + ∑ l ∈ Finset.range (r + 1), + (r.choose l : ℝ≥0∞) * ENNReal.ofReal C * multiplierConst (V := V) hp r s l + +/-- **Pointwise multipliers**: for a smooth `ψ` with `‖D^l ψ‖ ≤ C` for `l ≤ r`, `1 ≤ p < ∞`, +`s < r` and `1 ≤ q ≤ ∞`, +`‖ψ F‖_p + ‖(2^(ks) ω_r(ψ F, 2^(-k))_p)_k‖_{ℓ_q} ≤ K (‖F‖_p + ‖(2^(ks) ω_r(F, 2^(-k))_p)_k‖_{ℓ_q})` +with `K = C + ∑_{l ≤ r} C(r, l) C K_l` (`Rd.multiplierTotal`, `Rd.multiplierConst`). -/ +theorem modNorm_mulLp_le (hp : p ≠ ∞) {ψ : V → ℂ} (hψ : ContDiff ℝ ((⊤ : ℕ∞) : WithTop ℕ∞) ψ) + {r : ℕ} {C : ℝ} (hC : ∀ l ≤ r, ∀ x, ‖iteratedFDeriv ℝ l ψ x‖ ≤ C) {s : ℝ} (hsr : s < r) + {q : ℝ≥0∞} (hq : 1 ≤ q) (F : Lp ℂ p (volume : Measure V)) : + ‖mulLp hψ.continuous (norm_le_of_iteratedFDeriv_le hC) F‖ₑ + + lqNorm q (fun k => dyadicWeight s k * + lpModulus p r (mulLp hψ.continuous (norm_le_of_iteratedFDeriv_le hC) F) k) ≤ + multiplierTotal (V := V) hp r s C * + (‖F‖ₑ + lqNorm q (fun k => dyadicWeight s k * lpModulus p r F k)) := by + set G := mulLp hψ.continuous (norm_le_of_iteratedFDeriv_le hC) F + set N := ‖F‖ₑ + lqNorm q (fun k => dyadicWeight s k * lpModulus p r F k) + have hC0 : 0 ≤ C := (norm_nonneg _).trans (hC 0 (Nat.zero_le r) 0) + have hmod : ∀ k, lpModulus p r G k ≤ ∑ l ∈ Finset.range (r + 1), (r.choose l : ℝ≥0∞) * + ENNReal.ofReal C * (dyadicWeight (-(l : ℝ)) k * lpModulus p (r - l) F k) := fun k => by + rw [lpModulus, modulus_congr_ae (mulLp_apply_ae _ _ F)] + refine (modulus_mul_smooth_le hψ hC (Lp.aestronglyMeasurable F) Fact.out).trans_eq ?_ + refine Finset.sum_congr rfl fun l _ => ?_ + rw [ENNReal.ofReal_mul hC0, ENNReal.ofReal_one_div_two_pow_pow, lpModulus] + ring + have hseq : lqNorm q (fun k => dyadicWeight s k * lpModulus p r G k) ≤ + ∑ l ∈ Finset.range (r + 1), (r.choose l : ℝ≥0∞) * ENNReal.ofReal C * + (multiplierConst (V := V) hp r s l * N) := by + calc lqNorm q (fun k => dyadicWeight s k * lpModulus p r G k) + ≤ lqNorm q (fun k => ∑ l ∈ Finset.range (r + 1), (r.choose l : ℝ≥0∞) * + ENNReal.ofReal C * (dyadicWeight (s - l) k * lpModulus p (r - l) F k)) := + ENNReal.lqNorm_mono fun k => by + refine (mul_le_mul' le_rfl (hmod k)).trans_eq ?_ + rw [Finset.mul_sum] + refine Finset.sum_congr rfl fun l _ => ?_ + rw [sub_eq_add_neg, ENNReal.dyadicWeight_add] + ring + _ ≤ ∑ l ∈ Finset.range (r + 1), lqNorm q (fun k => (r.choose l : ℝ≥0∞) * + ENNReal.ofReal C * (dyadicWeight (s - l) k * lpModulus p (r - l) F k)) := + ENNReal.lqNorm_sum_le hq _ _ + _ = ∑ l ∈ Finset.range (r + 1), (r.choose l : ℝ≥0∞) * ENNReal.ofReal C * + lqNorm q (fun k => dyadicWeight (s - l) k * lpModulus p (r - l) F k) := + Finset.sum_congr rfl fun l _ => ENNReal.lqNorm_const_mul _ _ + _ ≤ ∑ l ∈ Finset.range (r + 1), (r.choose l : ℝ≥0∞) * ENNReal.ofReal C * + (multiplierConst (V := V) hp r s l * N) := + Finset.sum_le_sum fun l hl => mul_le_mul' le_rfl + (lqNorm_lpModulus_le_multiplierConst hp (Nat.lt_succ_iff.1 (Finset.mem_range.1 hl)) + hsr hq F) + calc ‖G‖ₑ + lqNorm q (fun k => dyadicWeight s k * lpModulus p r G k) + ≤ ENNReal.ofReal C * N + ∑ l ∈ Finset.range (r + 1), (r.choose l : ℝ≥0∞) * + ENNReal.ofReal C * (multiplierConst (V := V) hp r s l * N) := + add_le_add ((enorm_mulLp_le _ _ F).trans (mul_le_mul' le_rfl le_self_add)) hseq + _ = multiplierTotal (V := V) hp r s C * N := by + rw [multiplierTotal, add_mul, Finset.sum_mul] + congr 1 + exact Finset.sum_congr rfl fun l _ => by ring + +/-- The constant of `Rd.modNorm_mulLp_le` is finite for `s < r`. -/ +theorem multiplierTotal_ne_top (hp : p ≠ ∞) {r : ℕ} {s : ℝ} (hsr : s < r) (C : ℝ) : + multiplierTotal (V := V) hp r s C ≠ ∞ := + ENNReal.add_ne_top.2 ⟨ENNReal.ofReal_ne_top, ENNReal.sum_ne_top.2 fun l _ => + ENNReal.mul_ne_top (ENNReal.mul_ne_top (ENNReal.natCast_ne_top _) ENNReal.ofReal_ne_top) + (multiplierConst_ne_top hp hsr l)⟩ + +/-- **Multipliers keep the Besov spaces by differences**: if `ψ` is smooth with bounded +derivatives up to order `r`, `s < r` and `F` has a finite `(s, r)`-quasi-norm, so has `ψ F`. -/ +theorem modNorm_mulLp_lt_top (hp : p ≠ ∞) {ψ : V → ℂ} + (hψ : ContDiff ℝ ((⊤ : ℕ∞) : WithTop ℕ∞) ψ) {r : ℕ} {C : ℝ} + (hC : ∀ l ≤ r, ∀ x, ‖iteratedFDeriv ℝ l ψ x‖ ≤ C) {s : ℝ} (hsr : s < r) {q : ℝ≥0∞} + (hq : 1 ≤ q) {F : Lp ℂ p (volume : Measure V)} + (hF : ‖F‖ₑ + lqNorm q (fun k => dyadicWeight s k * lpModulus p r F k) < ∞) : + ‖mulLp hψ.continuous (norm_le_of_iteratedFDeriv_le hC) F‖ₑ + + lqNorm q (fun k => dyadicWeight s k * + lpModulus p r (mulLp hψ.continuous (norm_le_of_iteratedFDeriv_le hC) F) k) < ∞ := + (modNorm_mulLp_le hp hψ hC hsr hq F).trans_lt + (ENNReal.mul_lt_top (multiplierTotal_ne_top hp hsr C).lt_top hF) + +/-- **Smooth cutoffs are Besov multipliers**: for a smooth `χ : V → ℂ` with compact support, +`1 ≤ p < ∞`, `s < r` and `1 ≤ q ≤ ∞` there is `C < ∞` such that for every `F ∈ L_p(V)` the class +`G` of `χ F` satisfies +`‖G‖_p + ‖(2^(ks) ω_r(G, 2^(-k))_p)_k‖_{ℓ_q} ≤ C (‖F‖_p + ‖(2^(ks) ω_r(F, 2^(-k))_p)_k‖_{ℓ_q})`. +The derivatives of `χ` up to order `r` are bounded (`Rd.exists_iteratedFDeriv_bound`), so the +pointwise multiplier theorem applies (`Rd.modNorm_mulLp_le`, with the constant +`Rd.multiplierTotal`). -/ +theorem exists_mul_modNorm_le (hp : p ≠ ∞) {χ : V → ℂ} + (hχ : ContDiff ℝ ((⊤ : ℕ∞) : WithTop ℕ∞) χ) (hχc : HasCompactSupport χ) {r : ℕ} {s : ℝ} + (hsr : s < r) {q : ℝ≥0∞} (hq : 1 ≤ q) : + ∃ C : ℝ≥0∞, C ≠ ∞ ∧ ∀ F : Lp ℂ p (volume : Measure V), ∃ G : Lp ℂ p (volume : Measure V), + (G : V → ℂ) =ᵐ[volume] (fun x => χ x * F x) ∧ + ‖G‖ₑ + lqNorm q (fun k => dyadicWeight s k * lpModulus p r G k) ≤ + C * (‖F‖ₑ + lqNorm q (fun k => dyadicWeight s k * lpModulus p r F k)) := by + obtain ⟨C, hC⟩ := exists_iteratedFDeriv_bound hχ hχc r + exact ⟨multiplierTotal (V := V) hp r s C, multiplierTotal_ne_top hp hsr C, fun F => + ⟨_, mulLp_apply_ae _ _ F, modNorm_mulLp_le hp hχ hC hsr hq F⟩⟩ + +end Multiplier + +end Rd diff --git a/LeanPool/FunctionSpaces/Rd/Differences/SobolevSlobodeckij.lean b/LeanPool/FunctionSpaces/Rd/Differences/SobolevSlobodeckij.lean new file mode 100644 index 0000000000..4fc02931cb --- /dev/null +++ b/LeanPool/FunctionSpaces/Rd/Differences/SobolevSlobodeckij.lean @@ -0,0 +1,954 @@ +/- +Copyright (c) 2026 Mario Ullrich. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Mario Ullrich +-/ +module + +public import LeanPool.FunctionSpaces.Analysis.Differences.Differences +public import LeanPool.FunctionSpaces.Analysis.Maximal.HardyLittlewoodMaximal +public import LeanPool.FunctionSpaces.Rd.Differences.BesovDifferences + +/- +Modified for Lean Pool: module names and imports adapted. +-/ + +/-! +# Sobolev–Slobodeckij norms by first differences + +On a finite-dimensional real inner product space `V` of dimension `n` with Lebesgue measure, the +**Gagliardo form** of `f : V → ℂ` with smoothness `s` and exponent `p` is +`∫∫ |f(y) - f(x)|^p / |y - x|^(n + sp) dy dx` (`Rd.slobodeckijForm`), the `p`-th power of the +Gagliardo seminorm of the Sobolev–Slobodeckij space `W^{s,p}(V)` (Gagliardo 1957). The +substitution `y = x + h` and Tonelli's theorem turn it into +`∫ ‖Δ_h f‖_p^p / |h|^(n + sp) dh` (`Rd.slobodeckijForm_eq_lintegral_eLpNorm`). + +For `1 ≤ p < ∞` and `s > 0` the form is equivalent to the first-difference Besov norm: +* `‖(2^(ks) ω_1(f, 2^(-k))_p)_k‖_{ℓ_p}^p ≤ C_1 ∫∫ …` (`Rd.lqNorm_modulus_rpow_le_slobodeckijForm`), + since `‖Δ_h f‖_p^p ≤ 2^p |B(0,t)|⁻¹ ∫_{|z| < 2t} ‖Δ_z f‖_p^p dz` for `|h| ≤ t` + (`Rd.eLpNorm_fwdDiff_rpow_le_average`), and Hardy's inequality sums the dyadic annuli; +* `∫∫ … ≤ C_2 (‖f‖_p^p + ‖(2^(ks) ω_1(f, 2^(-k))_p)_k‖_{ℓ_p}^p)` (`Rd.slobodeckijForm_le`), + from the dyadic annuli inside the unit ball and the radial integral + `∫_{|z| ≥ R} |z|^(-a) dz ≤ c R^(n-a)` for `a > n` (`Rd.lintegral_compl_ball_norm_rpow_neg_le`). + +The constants are explicit (`Rd.slobodeckijConstUpper`, `Rd.slobodeckijConstLower`). For +`0 < s < 1` the form is finite exactly on the Besov space `B^s_{p,p}(V)`, so +`W^{s,p}(V) = B^s_{p,p}(V)` (`Rd.slobodeckijForm_lt_top_iff_memApprox`). The radial integral +over balls, `∫_{|z| < R} |z|^(-a) dz ≤ c R^(n-a)` for `a < n`, is +`Rd.lintegral_ball_norm_rpow_neg_le`. Together they bound `∫ u(z)^p / |z|^a dz` for +`u(z) ≤ min(L |z|, S)` (`Rd.lintegral_rpow_div_norm_rpow_le`), and the integral outside a ball +bounds, after translation, the tail `∫∫ u(x) 1_{|y - x| ≥ η} |y - x|^(-a) dy dx` +(`Rd.lintegral_lintegral_mul_indicator_le`). Double integrals split over sums and take out finite +constants (`Rd.lintegral_lintegral_add_right`, `Rd.lintegral_lintegral_le_add_two_mul`, +`Rd.lintegral_lintegral_const_mul'`). +-/ + +@[expose] public section + +open MeasureTheory Metric Module Set +open scoped ENNReal + +namespace ENNReal + +/-! ### Powers in `[0, ∞]` -/ + +/-- A power of a number between `l` and `u` is at most `l^b + u^b`, whatever the sign of `b`. -/ +theorem rpow_le_rpow_add_rpow_of_le_of_le {x l u : ℝ≥0∞} (hl : l ≤ x) (hu : x ≤ u) (b : ℝ) : + x ^ b ≤ l ^ b + u ^ b := by + rcases le_total b 0 with hb | hb + · exact (ENNReal.rpow_le_rpow_of_nonpos hl hb).trans le_self_add + · exact (ENNReal.rpow_le_rpow hu hb).trans le_add_self + +end ENNReal + +namespace Rd + +open ENNReal (lqNorm dyadicWeight) + +variable {V : Type*} [NormedAddCommGroup V] [InnerProductSpace ℝ V] [FiniteDimensional ℝ V] + [MeasurableSpace V] [BorelSpace V] + +/-! ### The Gagliardo form -/ + +/-- The **Gagliardo form** `∫∫ |f(y) - f(x)|^p / |y - x|^(n + sp) dy dx` of `f : V → ℂ`, with +`n = dim V`: for `0 < p < ∞` the `p`-th power of the Gagliardo seminorm of the +Sobolev–Slobodeckij space `W^{s,p}(V)` (Gagliardo 1957). The exponent is the real number +`p.toReal`, which is `0` for `p = ∞`. For `p = 2`, `s = α/2` and measurable real-valued `f` it +agrees, by Tonelli's theorem, with the form `formHs univ α` of the Lean project +*quadratic-forms-sobolev-lean*, an integral for the product measure, with the same orientation +`f(y) - f(x)`. -/ +noncomputable def slobodeckijForm (p : ℝ≥0∞) (s : ℝ) (f : V → ℂ) : ℝ≥0∞ := + ∫⁻ x, ∫⁻ y, ‖f y - f x‖ₑ ^ p.toReal / ‖y - x‖ₑ ^ ((finrank ℝ V : ℝ) + s * p.toReal) + +/-- The Gagliardo form depends only on the class of `f` modulo null sets. -/ +theorem slobodeckijForm_congr_ae {f g : V → ℂ} (hfg : f =ᵐ[volume] g) (p : ℝ≥0∞) (s : ℝ) : + slobodeckijForm p s f = slobodeckijForm p s g := + lintegral_congr_ae (hfg.mono fun x hx => lintegral_congr_ae (hfg.mono fun y hy => by + simp only [hx, hy])) + +/-- On a space with one point the Gagliardo form vanishes for `0 < p < ∞`: every difference +`f(y) - f(x)` is `0`. -/ +theorem slobodeckijForm_of_subsingleton [Subsingleton V] {p : ℝ≥0∞} (hp0 : p ≠ 0) (hp : p ≠ ∞) + (s : ℝ) (f : V → ℂ) : slobodeckijForm p s f = 0 := by + have hP : 0 < p.toReal := ENNReal.toReal_pos hp0 hp + have h : ∀ x y : V, + ‖f y - f x‖ₑ ^ p.toReal / ‖y - x‖ₑ ^ ((finrank ℝ V : ℝ) + s * p.toReal) = 0 := + fun x y => by + rw [Subsingleton.elim y x, sub_self, eNorm_zero, ENNReal.zero_rpow_of_pos hP, + ENNReal.zero_div] + simp only [slobodeckijForm, h, lintegral_zero] + +/-- First differences of functions that agree almost everywhere agree almost everywhere. -/ +theorem fwdDiff_congr_ae {f g : V → ℂ} (hfg : f =ᵐ[volume] g) (h : V) : + fwdDiff h f =ᵐ[volume] fwdDiff h g := by + simpa using higherDiff_congr_ae hfg 1 h + +/-- `‖Δ_h f‖_p^p = ∫ |f(x + h) - f(x)|^p dx` for `0 < p < ∞` and a.e. strongly measurable `f` +(Mathlib's `eLpNorm_eq_lintegral_rpow_eNorm_toReal`). -/ +theorem eLpNorm_fwdDiff_rpow_eq {p : ℝ≥0∞} (hp0 : p ≠ 0) (hp : p ≠ ∞) {f : V → ℂ} + (hf : AEStronglyMeasurable f volume) (h : V) : + eLpNorm (fwdDiff h f) p volume ^ p.toReal = ∫⁻ x, ‖f (x + h) - f x‖ₑ ^ p.toReal := by + have hm : AEStronglyMeasurable (fwdDiff h f) volume := by + simpa using aestronglyMeasurable_higherDiff hf 1 h + rw [eLpNorm_eq_lintegral_rpow_eNorm_toReal hp0 hp hm, one_div, + ENNReal.rpow_inv_rpow (ENNReal.toReal_pos hp0 hp).ne'] + rfl + +/-- `‖Δ_0 f‖_p^p = 0` for `0 < p < ∞`, since `Δ_0 f = 0`. -/ +theorem eLpNorm_fwdDiff_zero_rpow {p : ℝ≥0∞} (hp0 : p ≠ 0) (hp : p ≠ ∞) (f : V → ℂ) : + eLpNorm (fwdDiff 0 f) p volume ^ p.toReal = 0 := by + have h0 : fwdDiff (0 : V) f = 0 := funext fun x => by simp [fwdDiff] + rw [h0, eLpNorm_zero, ENNReal.zero_rpow_of_pos (ENNReal.toReal_pos hp0 hp)] + +/-- For `0 < p < ∞` and a.e. strongly measurable `f`, the step function `h ↦ ‖Δ_h f‖_p^p` is +measurable, as the integral of a jointly measurable function of `(x, h)` (Mathlib's +`Measurable.lintegral_prod_left'`). -/ +theorem measurable_eLpNorm_fwdDiff_rpow {p : ℝ≥0∞} (hp0 : p ≠ 0) (hp : p ≠ ∞) {f : V → ℂ} + (hf : AEStronglyMeasurable f volume) : + Measurable fun h : V => eLpNorm (fwdDiff h f) p volume ^ p.toReal := by + have hg : Measurable (hf.mk f) := hf.stronglyMeasurable_mk.measurable + have heq : (fun h : V => eLpNorm (fwdDiff h f) p volume ^ p.toReal) = + fun h => ∫⁻ x, ‖hf.mk f (x + h) - hf.mk f x‖ₑ ^ p.toReal := by + funext h + rw [eLpNorm_congr_ae (fwdDiff_congr_ae hf.ae_eq_mk h), + eLpNorm_fwdDiff_rpow_eq hp0 hp hg.aestronglyMeasurable h] + rw [heq] + exact Measurable.lintegral_prod_left' (f := fun z : V × V => + ‖hf.mk f (z.1 + z.2) - hf.mk f z.1‖ₑ ^ p.toReal) + (((hg.comp (measurable_fst.add measurable_snd)).sub (hg.comp measurable_fst)).eNorm.pow_const _) + +/-- **The Gagliardo form by the step**, for measurable `f`: the substitution `y = x + h` +(Mathlib's `lintegral_add_left_eq_self`) and Tonelli's theorem (`lintegral_lintegral_swap`) give +`∫∫ |f(y) - f(x)|^p / |y - x|^(n + sp) dy dx = ∫ ‖Δ_h f‖_p^p / |h|^(n + sp) dh`. -/ +theorem slobodeckijForm_eq_lintegral_of_measurable {p : ℝ≥0∞} (hp0 : p ≠ 0) (hp : p ≠ ∞) + (s : ℝ) {f : V → ℂ} (hf : Measurable f) : + slobodeckijForm p s f = ∫⁻ h, eLpNorm (fwdDiff h f) p volume ^ p.toReal / + ‖h‖ₑ ^ ((finrank ℝ V : ℝ) + s * p.toReal) := by + have hshift : ∀ x : V, ∫⁻ y, ‖f y - f x‖ₑ ^ p.toReal / + ‖y - x‖ₑ ^ ((finrank ℝ V : ℝ) + s * p.toReal) = + ∫⁻ h, ‖f (x + h) - f x‖ₑ ^ p.toReal / ‖h‖ₑ ^ ((finrank ℝ V : ℝ) + s * p.toReal) := by + intro x + rw [← lintegral_add_left_eq_self _ x] + simp only [add_sub_cancel_left] + have hmeas : Measurable (Function.uncurry fun (x h : V) => + ‖f (x + h) - f x‖ₑ ^ p.toReal / ‖h‖ₑ ^ ((finrank ℝ V : ℝ) + s * p.toReal)) := + (((hf.comp (measurable_fst.add measurable_snd)).sub (hf.comp measurable_fst)).eNorm.pow_const + _).div (measurable_snd.eNorm.pow_const _) + rw [slobodeckijForm] + simp_rw [hshift] + rw [lintegral_lintegral_swap hmeas.aemeasurable] + refine lintegral_congr fun h => ?_ + rw [eLpNorm_fwdDiff_rpow_eq hp0 hp hf.aestronglyMeasurable h] + simp_rw [div_eq_mul_inv] + exact lintegral_mul_const _ + (((hf.comp (measurable_add_const h)).sub hf).eNorm.pow_const _) + +/-- **The Gagliardo form by the step**: for `0 < p < ∞` and a.e. strongly measurable `f`, +`∫∫ |f(y) - f(x)|^p / |y - x|^(n + sp) dy dx = ∫ ‖Δ_h f‖_p^p / |h|^(n + sp) dh`. -/ +theorem slobodeckijForm_eq_lintegral_eLpNorm {p : ℝ≥0∞} (hp0 : p ≠ 0) (hp : p ≠ ∞) (s : ℝ) + {f : V → ℂ} (hf : AEStronglyMeasurable f volume) : + slobodeckijForm p s f = ∫⁻ h, eLpNorm (fwdDiff h f) p volume ^ p.toReal / + ‖h‖ₑ ^ ((finrank ℝ V : ℝ) + s * p.toReal) := by + rw [slobodeckijForm_congr_ae hf.ae_eq_mk, + slobodeckijForm_eq_lintegral_of_measurable hp0 hp s hf.stronglyMeasurable_mk.measurable] + refine lintegral_congr fun h => ?_ + rw [eLpNorm_congr_ae (fwdDiff_congr_ae hf.ae_eq_mk h)] + +/-! ### Dyadic annuli -/ + +/-- The **dyadic annulus** `{z : ρ 2^(-(j+1)) < |z| ≤ ρ 2^(-j)}`. -/ +def dyadicAnnulus (ρ : ℝ) (j : ℕ) : Set V := + {z | ρ / 2 ^ (j + 1) < ‖z‖ ∧ ‖z‖ ≤ ρ / 2 ^ j} + +omit [InnerProductSpace ℝ V] [FiniteDimensional ℝ V] in +/-- The dyadic annuli are measurable. -/ +theorem measurableSet_dyadicAnnulus (ρ : ℝ) (j : ℕ) : + MeasurableSet (dyadicAnnulus (V := V) ρ j) := + (measurableSet_lt measurable_const measurable_norm).inter + (measurableSet_le measurable_norm measurable_const) + +omit [InnerProductSpace ℝ V] [FiniteDimensional ℝ V] [MeasurableSpace V] [BorelSpace V] in +/-- For `ρ ≥ 0` the dyadic annuli are pairwise disjoint. -/ +theorem pairwise_disjoint_dyadicAnnulus {ρ : ℝ} (hρ : 0 ≤ ρ) : + Pairwise (Function.onFun Disjoint (dyadicAnnulus (V := V) ρ)) := by + rw [pairwise_disjoint_on] + intro i j hij + rw [Set.disjoint_left] + rintro z ⟨hz1, -⟩ ⟨-, hz4⟩ + have hle : ρ / 2 ^ j ≤ ρ / 2 ^ (i + 1) := + div_le_div_of_nonneg_left hρ (by positivity) (pow_le_pow_right₀ one_le_two hij) + linarith + +omit [InnerProductSpace ℝ V] [FiniteDimensional ℝ V] [MeasurableSpace V] [BorelSpace V] in +/-- **The annuli cover the punctured ball**: every `z ≠ 0` with `|z| ≤ ρ 2^(-k)` lies in an +annulus `ρ 2^(-(k+i+1)) < |z| ≤ ρ 2^(-(k+i))`, with `2^i ≤ ρ 2^(-k)/|z| < 2^(i+1)`. -/ +theorem closedBall_subset_union_iUnion_dyadicAnnulus (ρ : ℝ) (k : ℕ) : + closedBall (0 : V) (ρ / 2 ^ k) ⊆ {0} ∪ ⋃ i, dyadicAnnulus ρ (k + i) := by + intro z hz + rw [mem_closedBall_zero_iff] at hz + rcases eq_or_ne z 0 with rfl | hz0 + · exact Or.inl rfl + refine Or.inr (mem_iUnion.2 ?_) + have hn : 0 < ‖z‖ := norm_pos_iff.2 hz0 + obtain ⟨i, hi1, hi2⟩ := exists_nat_pow_near ((one_le_div hn).2 hz) one_lt_two + rw [le_div_iff₀ hn] at hi1 + rw [div_lt_iff₀ hn] at hi2 + have h2k : (0 : ℝ) < 2 ^ k := by positivity + have h2i : (0 : ℝ) < 2 ^ i := by positivity + refine ⟨i, ?_, ?_⟩ + · rw [show k + i + 1 = k + (i + 1) by ring, pow_add, ← div_div, div_lt_iff₀ (by positivity)] + linarith + · rw [pow_add, ← div_div, le_div_iff₀ h2i] + linarith + +/-- **An integral over a ball by the annuli**: for every `G : V → [0, ∞]`, +`∫_{|z| ≤ ρ 2^(-k)} G ≤ G(0) |{0}| + ∑_i ∫_{annulus (k + i)} G`. -/ +theorem setLIntegral_closedBall_le_tsum_dyadicAnnulus (G : V → ℝ≥0∞) (ρ : ℝ) (k : ℕ) : + ∫⁻ z in closedBall (0 : V) (ρ / 2 ^ k), G z ≤ + G 0 * volume {(0 : V)} + ∑' i, ∫⁻ z in dyadicAnnulus ρ (k + i), G z := by + calc ∫⁻ z in closedBall (0 : V) (ρ / 2 ^ k), G z + ≤ ∫⁻ z in {0} ∪ ⋃ i, dyadicAnnulus ρ (k + i), G z := + lintegral_mono_set (closedBall_subset_union_iUnion_dyadicAnnulus ρ k) + _ ≤ (∫⁻ z in {(0 : V)}, G z) + ∫⁻ z in ⋃ i, dyadicAnnulus ρ (k + i), G z := + lintegral_union_le _ _ _ + _ ≤ _ := by + rw [lintegral_singleton] + gcongr + exact lintegral_iUnion_le _ _ + +/-- For `G(0) = 0`: `∫_{|z| ≤ ρ 2^(-k)} G ≤ ∑_i ∫_{annulus (k + i)} G`. -/ +theorem setLIntegral_closedBall_le_tsum_dyadicAnnulus_of_zero {G : V → ℝ≥0∞} (hG : G 0 = 0) + (ρ : ℝ) (k : ℕ) : + ∫⁻ z in closedBall (0 : V) (ρ / 2 ^ k), G z ≤ ∑' i, ∫⁻ z in dyadicAnnulus ρ (k + i), G z := by + simpa [hG] using setLIntegral_closedBall_le_tsum_dyadicAnnulus G ρ k + +/-- The integrals over the disjoint annuli sum to at most the integral over `V` +(Mathlib's `lintegral_iUnion`). -/ +theorem tsum_setLIntegral_dyadicAnnulus_le (G : V → ℝ≥0∞) {ρ : ℝ} (hρ : 0 ≤ ρ) : + ∑' j, ∫⁻ z in dyadicAnnulus ρ j, G z ≤ ∫⁻ z, G z := by + rw [← lintegral_iUnion (measurableSet_dyadicAnnulus ρ) (pairwise_disjoint_dyadicAnnulus hρ)] + exact setLIntegral_le_lintegral _ _ + +/-- The annulus `j` has volume at most `ρ^n 2^(-jn) |B_1|`, the volume of the closed ball of +radius `ρ 2^(-j)` (`Rd.volume_closedBall_div_two_pow`). -/ +theorem volume_dyadicAnnulus_le {ρ : ℝ} (hρ : 0 < ρ) (j : ℕ) : + volume (dyadicAnnulus (V := V) ρ j) ≤ ENNReal.ofReal ρ ^ (finrank ℝ V : ℝ) * + dyadicWeight (-(finrank ℝ V : ℝ)) j * volume (ball (0 : V) 1) := + (measure_mono fun z (hz : z ∈ dyadicAnnulus (V := V) ρ j) => + mem_closedBall_zero_iff.2 hz.2).trans_eq <| by + rw [volume_closedBall_div_two_pow hρ.le, ENNReal.ofReal_pow hρ.le, ← ENNReal.rpow_natCast] + ring + +/-! ### Radial integrals of powers -/ + +variable (V) in +/-- The constant `2^n |B_1| (1 - 2^(-(a-n)))⁻¹` of the radial integral +`∫_{|z| ≥ R} |z|^(-a) dz` for `a > n = dim V`. -/ +noncomputable def complBallRpowConst (a : ℝ) : ℝ≥0∞ := + 2 ^ (finrank ℝ V : ℝ) * volume (ball (0 : V) 1) * (1 - 2 ^ (-(a - finrank ℝ V)))⁻¹ + +/-- The constant of `∫_{|z| ≥ R} |z|^(-a) dz` is finite for `a > n`. -/ +theorem complBallRpowConst_ne_top {a : ℝ} (ha : (finrank ℝ V : ℝ) < a) : + complBallRpowConst V a ≠ ∞ := + ENNReal.mul_ne_top (ENNReal.mul_ne_top + (ENNReal.two_rpow_ne_top _) + (volume_ball_ne_top 1)) (ENNReal.one_sub_two_rpow_neg_inv_ne_top (sub_pos.2 ha)) + +/-- On the part of the dyadic shell `i` outside the ball of radius `R`, `|z|^(-a)` has the +integral at most `2^n |B_1| R^(n-a) 2^(-i(a-n))`, for `a ≥ 0`. -/ +theorem setLIntegral_compl_ball_inter_dyadicShell_le {a : ℝ} (ha : 0 ≤ a) {R : ℝ} + (hR : 0 < R) (i : ℕ) : + ∫⁻ z in (ball (0 : V) R)ᶜ ∩ dyadicShell R i, ‖z‖ₑ ^ (-a) ≤ + 2 ^ (finrank ℝ V : ℝ) * volume (ball (0 : V) 1) * + ENNReal.ofReal R ^ ((finrank ℝ V : ℝ) - a) * dyadicWeight (-(a - finrank ℝ V)) i := by + have hpt : ∀ z ∈ (ball (0 : V) R)ᶜ ∩ dyadicShell R i, + ‖z‖ₑ ^ (-a) ≤ ENNReal.ofReal (2 ^ i * R) ^ (-a) := by + rintro z ⟨hz1, hz2⟩ + have hle : 2 ^ i * R ≤ ‖z‖ := by + rcases hz2.2 with rfl | hi + · simpa [mem_ball_zero_iff] using hz1 + · exact hi + rw [← ofReal_norm] + exact ENNReal.rpow_le_rpow_of_nonpos (ENNReal.ofReal_le_ofReal hle) (neg_nonpos.2 ha) + have hR0 : ENNReal.ofReal R ≠ 0 := (ENNReal.ofReal_pos.2 hR).ne' + calc ∫⁻ z in (ball (0 : V) R)ᶜ ∩ dyadicShell R i, ‖z‖ₑ ^ (-a) + ≤ ∫⁻ _ in (ball (0 : V) R)ᶜ ∩ dyadicShell R i, ENNReal.ofReal (2 ^ i * R) ^ (-a) := + setLIntegral_mono measurable_const hpt + _ = ENNReal.ofReal (2 ^ i * R) ^ (-a) * volume ((ball (0 : V) R)ᶜ ∩ dyadicShell R i) := + setLIntegral_const _ _ + _ ≤ ENNReal.ofReal (2 ^ i * R) ^ (-a) * volume (ball (0 : V) (2 ^ (i + 1) * R)) := by + gcongr + exact fun z hz => mem_ball_zero_iff.2 hz.2.1 + _ = _ := by + rw [Measure.addHaar_ball_of_pos _ _ (by positivity), ENNReal.ofReal_pow (by positivity), + ← ENNReal.rpow_natCast, ENNReal.ofReal_two_pow_mul_rpow hR, + ENNReal.ofReal_two_pow_mul_rpow hR, + ENNReal.dyadicWeight_succ, show (finrank ℝ V : ℝ) - a = -a + finrank ℝ V by ring, + ENNReal.rpow_add _ _ hR0 ENNReal.ofReal_ne_top, + show -(a - (finrank ℝ V : ℝ)) = -a + finrank ℝ V by ring, ENNReal.dyadicWeight_add] + ring + +/-- **The radial integral outside a ball**: for `a > n = dim V` and `R > 0`, +`∫_{|z| ≥ R} |z|^(-a) dz ≤ 2^n |B_1| (1 - 2^(-(a-n)))⁻¹ R^(n-a)`, by the dyadic shells +`2^i R ≤ |z| < 2^(i+1) R` and a geometric series. -/ +theorem lintegral_compl_ball_norm_rpow_neg_le {a : ℝ} (ha : (finrank ℝ V : ℝ) < a) {R : ℝ} + (hR : 0 < R) : + ∫⁻ z in (ball (0 : V) R)ᶜ, ‖z‖ₑ ^ (-a) ≤ + complBallRpowConst V a * ENNReal.ofReal R ^ ((finrank ℝ V : ℝ) - a) := by + have ha0 : 0 ≤ a := (Nat.cast_nonneg _).trans ha.le + have hcover : (ball (0 : V) R)ᶜ ⊆ ⋃ i, (ball (0 : V) R)ᶜ ∩ dyadicShell R i := by + intro z hz + have hz' : z ∈ ⋃ i, dyadicShell (V := V) R i := by + rw [iUnion_dyadicShell hR] + exact mem_univ z + obtain ⟨i, hi⟩ := mem_iUnion.1 hz' + exact mem_iUnion.2 ⟨i, hz, hi⟩ + calc ∫⁻ z in (ball (0 : V) R)ᶜ, ‖z‖ₑ ^ (-a) + ≤ ∫⁻ z in ⋃ i, (ball (0 : V) R)ᶜ ∩ dyadicShell R i, ‖z‖ₑ ^ (-a) := lintegral_mono_set hcover + _ ≤ ∑' i, ∫⁻ z in (ball (0 : V) R)ᶜ ∩ dyadicShell R i, ‖z‖ₑ ^ (-a) := + lintegral_iUnion_le _ _ + _ ≤ ∑' i, 2 ^ (finrank ℝ V : ℝ) * volume (ball (0 : V) 1) * + ENNReal.ofReal R ^ ((finrank ℝ V : ℝ) - a) * dyadicWeight (-(a - finrank ℝ V)) i := + tsum_le_tsum fun i => setLIntegral_compl_ball_inter_dyadicShell_le ha0 hR i + _ = _ := by + rw [ENNReal.tsum_mul_left, ENNReal.tsum_dyadicWeight_neg, complBallRpowConst] + ring + +variable (V) in +/-- The constant `(1 + 2^a) |B_1| (1 - 2^(-(n-a)))⁻¹` of the radial integral +`∫_{|z| < R} |z|^(-a) dz` for `a < n = dim V`. -/ +noncomputable def ballRpowConst (a : ℝ) : ℝ≥0∞ := + (1 + 2 ^ a) * volume (ball (0 : V) 1) * (1 - 2 ^ (-((finrank ℝ V : ℝ) - a)))⁻¹ + +/-- The constant of `∫_{|z| < R} |z|^(-a) dz` is finite for `a < n`. -/ +theorem ballRpowConst_ne_top {a : ℝ} (ha : a < finrank ℝ V) : ballRpowConst V a ≠ ∞ := + ENNReal.mul_ne_top (ENNReal.mul_ne_top (ENNReal.add_ne_top.2 ⟨ENNReal.one_ne_top, + ENNReal.two_rpow_ne_top _⟩) (volume_ball_ne_top 1)) + (ENNReal.one_sub_two_rpow_neg_inv_ne_top (sub_pos.2 ha)) + +/-- On the annulus `R 2^(-(i+1)) < |z| ≤ R 2^(-i)`, `|z|^(-a)` has the integral at most +`(1 + 2^a) |B_1| R^(n-a) 2^(-i(n-a))`, for every real `a`. -/ +theorem setLIntegral_dyadicAnnulus_norm_rpow_neg_le (a : ℝ) {R : ℝ} (hR : 0 < R) (i : ℕ) : + ∫⁻ z in dyadicAnnulus (V := V) R i, ‖z‖ₑ ^ (-a) ≤ (1 + 2 ^ a) * volume (ball (0 : V) 1) * + ENNReal.ofReal R ^ ((finrank ℝ V : ℝ) - a) * dyadicWeight (-((finrank ℝ V : ℝ) - a)) i := by + have hpt : ∀ z ∈ dyadicAnnulus (V := V) R i, ‖z‖ₑ ^ (-a) ≤ + ENNReal.ofReal (R / 2 ^ (i + 1)) ^ (-a) + ENNReal.ofReal (R / 2 ^ i) ^ (-a) := by + rintro z ⟨hz1, hz2⟩ + rw [← ofReal_norm] + exact ENNReal.rpow_le_rpow_add_rpow_of_le_of_le (ENNReal.ofReal_le_ofReal hz1.le) + (ENNReal.ofReal_le_ofReal hz2) _ + have hR0 : ENNReal.ofReal R ≠ 0 := (ENNReal.ofReal_pos.2 hR).ne' + calc ∫⁻ z in dyadicAnnulus (V := V) R i, ‖z‖ₑ ^ (-a) + ≤ ∫⁻ _ in dyadicAnnulus (V := V) R i, + (ENNReal.ofReal (R / 2 ^ (i + 1)) ^ (-a) + ENNReal.ofReal (R / 2 ^ i) ^ (-a)) := + setLIntegral_mono measurable_const hpt + _ = (ENNReal.ofReal (R / 2 ^ (i + 1)) ^ (-a) + ENNReal.ofReal (R / 2 ^ i) ^ (-a)) * + volume (dyadicAnnulus (V := V) R i) := setLIntegral_const _ _ + _ ≤ (ENNReal.ofReal (R / 2 ^ (i + 1)) ^ (-a) + ENNReal.ofReal (R / 2 ^ i) ^ (-a)) * + (ENNReal.ofReal R ^ (finrank ℝ V : ℝ) * dyadicWeight (-(finrank ℝ V : ℝ)) i * + volume (ball (0 : V) 1)) := by + gcongr + exact volume_dyadicAnnulus_le hR i + _ = _ := by + rw [ENNReal.ofReal_div_two_pow_rpow hR, ENNReal.ofReal_div_two_pow_rpow hR, neg_neg, + ENNReal.dyadicWeight_succ, show (finrank ℝ V : ℝ) - a = -a + finrank ℝ V by ring, + ENNReal.rpow_add _ _ hR0 ENNReal.ofReal_ne_top, + show -(-a + (finrank ℝ V : ℝ)) = a + -(finrank ℝ V : ℝ) by ring, + ENNReal.dyadicWeight_add] + ring + +/-- **The radial integral over a ball**: for `a < n = dim V` and `R > 0`, +`∫_{|z| < R} |z|^(-a) dz ≤ (1 + 2^a) |B_1| (1 - 2^(-(n-a)))⁻¹ R^(n-a)`, by the dyadic annuli +`R 2^(-(i+1)) < |z| ≤ R 2^(-i)` and a geometric series; the centre is a null set for `n ≥ 1`, +and for `n = 0` the integrand vanishes. -/ +theorem lintegral_ball_norm_rpow_neg_le {a : ℝ} (ha : a < finrank ℝ V) {R : ℝ} (hR : 0 < R) : + ∫⁻ z in ball (0 : V) R, ‖z‖ₑ ^ (-a) ≤ + ballRpowConst V a * ENNReal.ofReal R ^ ((finrank ℝ V : ℝ) - a) := by + rcases subsingleton_or_nontrivial V with hV | hV + · have ha' : 0 < -a := by + rw [finrank_zero_of_subsingleton, Nat.cast_zero] at ha + linarith + have h0 : ∀ z : V, ‖z‖ₑ ^ (-a) = 0 := fun z => by + rw [Subsingleton.elim z 0, eNorm_zero, ENNReal.zero_rpow_of_pos ha'] + simp only [h0, lintegral_zero, zero_le] + calc ∫⁻ z in ball (0 : V) R, ‖z‖ₑ ^ (-a) + ≤ ∫⁻ z in closedBall (0 : V) (R / 2 ^ 0), ‖z‖ₑ ^ (-a) := by + rw [pow_zero, div_one] + exact lintegral_mono_set ball_subset_closedBall + _ ≤ ‖(0 : V)‖ₑ ^ (-a) * volume {(0 : V)} + + ∑' i, ∫⁻ z in dyadicAnnulus R (0 + i), ‖z‖ₑ ^ (-a) := + setLIntegral_closedBall_le_tsum_dyadicAnnulus _ R 0 + _ ≤ ∑' i, (1 + 2 ^ a) * volume (ball (0 : V) 1) * + ENNReal.ofReal R ^ ((finrank ℝ V : ℝ) - a) * + dyadicWeight (-((finrank ℝ V : ℝ) - a)) i := by + rw [measure_singleton, mul_zero, zero_add] + exact tsum_le_tsum fun i => by + simpa only [zero_add] using setLIntegral_dyadicAnnulus_norm_rpow_neg_le a hR i + _ = _ := by + rw [ENNReal.tsum_mul_left, ENNReal.tsum_dyadicWeight_neg, ballRpowConst] + ring + +/-- **A radial integral of Lipschitz differences**: if `u(z) ≤ L |z|` and `u(z) ≤ S` for all +`z ∈ V`, `dim V = n`, then `∫ u(z)^p / |z|^a dz ≤ L^p c_1 + S^p c_2` for `p > 0` and +`a - p < n < a`, with the constants `c_1 = Rd.ballRpowConst V (a - p)` of the unit ball, where +`u^p / |z|^a ≤ L^p |z|^(-(a-p))`, and `c_2 = Rd.complBallRpowConst V a` of its complement, where +`u^p / |z|^a ≤ S^p |z|^(-a)`. -/ +theorem lintegral_rpow_div_norm_rpow_le {u : V → ℝ≥0∞} {L S : ℝ≥0∞} + (huL : ∀ z, u z ≤ L * ‖z‖ₑ) (huS : ∀ z, u z ≤ S) {p a : ℝ} (hp : 0 < p) + (ha : (finrank ℝ V : ℝ) < a) (hap : a - p < finrank ℝ V) : + ∫⁻ z, u z ^ p / ‖z‖ₑ ^ a ≤ + L ^ p * ballRpowConst V (a - p) + S ^ p * complBallRpowConst V a := by + have hin : ∀ z, u z ^ p / ‖z‖ₑ ^ a ≤ L ^ p * ‖z‖ₑ ^ (-(a - p)) := fun z => by + rcases eq_or_ne z 0 with rfl | hz + · have h0 : u 0 = 0 := le_antisymm ((huL 0).trans (by rw [eNorm_zero, mul_zero])) zero_le + rw [h0, ENNReal.zero_rpow_of_pos hp, ENNReal.zero_div] + exact zero_le + · calc u z ^ p / ‖z‖ₑ ^ a ≤ (L * ‖z‖ₑ) ^ p / ‖z‖ₑ ^ a := + ENNReal.div_le_div_right (ENNReal.rpow_le_rpow (huL z) hp.le) _ + _ = L ^ p * ‖z‖ₑ ^ (-(a - p)) := by + rw [ENNReal.mul_rpow_of_nonneg _ _ hp.le, mul_div_assoc, neg_sub, + ENNReal.rpow_sub _ _ (eNorm_ne_zero.2 hz) eNorm_ne_top] + have hout : ∀ z, u z ^ p / ‖z‖ₑ ^ a ≤ S ^ p * ‖z‖ₑ ^ (-a) := fun z => by + rw [ENNReal.rpow_neg, ← div_eq_mul_inv] + exact ENNReal.div_le_div_right (ENNReal.rpow_le_rpow (huS z) hp.le) _ + calc ∫⁻ z, u z ^ p / ‖z‖ₑ ^ a + = ∫⁻ z in ball (0 : V) 1 ∪ (ball (0 : V) 1)ᶜ, u z ^ p / ‖z‖ₑ ^ a := by + rw [union_compl_self, Measure.restrict_univ] + _ ≤ (∫⁻ z in ball (0 : V) 1, u z ^ p / ‖z‖ₑ ^ a) + + ∫⁻ z in (ball (0 : V) 1)ᶜ, u z ^ p / ‖z‖ₑ ^ a := lintegral_union_le _ _ _ + _ ≤ (∫⁻ z in ball (0 : V) 1, L ^ p * ‖z‖ₑ ^ (-(a - p))) + + ∫⁻ z in (ball (0 : V) 1)ᶜ, S ^ p * ‖z‖ₑ ^ (-a) := + add_le_add (lintegral_mono hin) (lintegral_mono hout) + _ = L ^ p * (∫⁻ z in ball (0 : V) 1, ‖z‖ₑ ^ (-(a - p))) + + S ^ p * ∫⁻ z in (ball (0 : V) 1)ᶜ, ‖z‖ₑ ^ (-a) := by + rw [lintegral_const_mul _ (measurable_eNorm.pow_const _), + lintegral_const_mul _ (measurable_eNorm.pow_const _)] + _ ≤ L ^ p * ballRpowConst V (a - p) + S ^ p * complBallRpowConst V a := by + gcongr + · simpa using lintegral_ball_norm_rpow_neg_le hap one_pos + · simpa using lintegral_compl_ball_norm_rpow_neg_le ha one_pos + +/-- **The tail part of a Gagliardo form**: for `η > 0`, `a > n = dim V` and every +`u : V → [0, ∞]`, `∫∫ u(x) 1_{|y - x| ≥ η} |y - x|^(-a) dy dx ≤ c η^(n - a) ∫ u` with +`c = Rd.complBallRpowConst V a`: the inner integral is `∫_{|z| ≥ η} |z|^(-a) dz` by translation +(`Rd.lintegral_compl_ball_norm_rpow_neg_le`). -/ +theorem lintegral_lintegral_mul_indicator_le (u : V → ℝ≥0∞) {η a : ℝ} (hη : 0 < η) + (ha : (finrank ℝ V : ℝ) < a) : + ∫⁻ x, ∫⁻ y, u x * (ball (0 : V) η)ᶜ.indicator (fun z => ‖z‖ₑ ^ (-a)) (y - x) ≤ + complBallRpowConst V a * ENNReal.ofReal η ^ ((finrank ℝ V : ℝ) - a) * ∫⁻ x, u x := by + have hh : Measurable ((ball (0 : V) η)ᶜ.indicator fun z => ‖z‖ₑ ^ (-a)) := + (measurable_eNorm.pow_const _).indicator measurableSet_ball.compl + have hI : complBallRpowConst V a * ENNReal.ofReal η ^ ((finrank ℝ V : ℝ) - a) ≠ ∞ := + ENNReal.mul_ne_top (complBallRpowConst_ne_top ha) + (ENNReal.rpow_ne_top_of_ne_zero (ENNReal.ofReal_pos.2 hη).ne' ENNReal.ofReal_ne_top) + have hin : ∀ x, ∫⁻ y, u x * (ball (0 : V) η)ᶜ.indicator (fun z => ‖z‖ₑ ^ (-a)) (y - x) ≤ + u x * (complBallRpowConst V a * ENNReal.ofReal η ^ ((finrank ℝ V : ℝ) - a)) := fun x => by + have hm : Measurable fun y : V => (ball (0 : V) η)ᶜ.indicator (fun z => ‖z‖ₑ ^ (-a)) (y - x) := + hh.comp (measurable_id.sub measurable_const) + rw [lintegral_const_mul _ hm, + lintegral_sub_right_eq_self (fun z => (ball (0 : V) η)ᶜ.indicator + (fun z => ‖z‖ₑ ^ (-a)) z) x, lintegral_indicator measurableSet_ball.compl] + exact mul_le_mul' le_rfl (lintegral_compl_ball_norm_rpow_neg_le ha hη) + calc _ ≤ ∫⁻ x, u x * (complBallRpowConst V a * ENNReal.ofReal η ^ ((finrank ℝ V : ℝ) - a)) := + lintegral_mono hin + _ = _ := by rw [lintegral_mul_const' _ _ hI, mul_comm] + +/-- The integrand `(x, y) ↦ |f(y) - f(x)|^p / |y - x|^b` of a Gagliardo form is measurable for +measurable `f`. -/ +theorem measurable_slobodeckijIntegrand {f : V → ℂ} (hf : Measurable f) (p b : ℝ) : + Measurable (Function.uncurry fun x y : V => ‖f y - f x‖ₑ ^ p / ‖y - x‖ₑ ^ b) := + (((hf.comp measurable_snd).sub (hf.comp measurable_fst)).eNorm.pow_const _).div + ((measurable_snd.sub measurable_fst).eNorm.pow_const _) + +/-- **Splitting a double integral**: `∫∫ (F + G) = ∫∫ F + ∫∫ G` for an s-finite measure and `G` +jointly measurable, whatever `F` (Mathlib's `lintegral_add_right'` for the inner and the outer +integral, with `Measurable.lintegral_prod_right'`). -/ +theorem lintegral_lintegral_add_right {α : Type*} [MeasurableSpace α] {μ : Measure α} [SFinite μ] + (F : α → α → ℝ≥0∞) {G : α → α → ℝ≥0∞} (hG : Measurable (Function.uncurry G)) : + ∫⁻ x, ∫⁻ y, (F x y + G x y) ∂μ ∂μ = ∫⁻ x, ∫⁻ y, F x y ∂μ ∂μ + ∫⁻ x, ∫⁻ y, G x y ∂μ ∂μ := by + have hin : ∀ x, ∫⁻ y, (F x y + G x y) ∂μ = ∫⁻ y, F x y ∂μ + ∫⁻ y, G x y ∂μ := fun x => + lintegral_add_right' _ (hG.comp measurable_prodMk_left).aemeasurable + simp_rw [hin] + exact lintegral_add_right' _ hG.lintegral_prod_right'.aemeasurable + +/-- **A double integral by a pointwise bound with one-variable parts**: if +`F(x, y) ≤ T(x, y) + a(x) + a(y)` for measurable `a`, then +`∫∫ F ≤ ∫∫ T + 2 μ(univ) ∫ a` (`Rd.lintegral_lintegral_add_right`). -/ +theorem lintegral_lintegral_le_add_two_mul {α : Type*} [MeasurableSpace α] {μ : Measure α} + [SFinite μ] {F T : α → α → ℝ≥0∞} {a : α → ℝ≥0∞} (ha : Measurable a) + (hF : ∀ x y, F x y ≤ T x y + a x + a y) : + ∫⁻ x, ∫⁻ y, F x y ∂μ ∂μ ≤ ∫⁻ x, ∫⁻ y, T x y ∂μ ∂μ + 2 * μ univ * ∫⁻ x, a x ∂μ := by + calc ∫⁻ x, ∫⁻ y, F x y ∂μ ∂μ ≤ ∫⁻ x, ∫⁻ y, (T x y + a x + a y) ∂μ ∂μ := + lintegral_mono fun x => lintegral_mono fun y => hF x y + _ = (∫⁻ x, ∫⁻ y, T x y ∂μ ∂μ) + (∫⁻ x, ∫⁻ _, a x ∂μ ∂μ) + ∫⁻ _, ∫⁻ y, a y ∂μ ∂μ := by + rw [lintegral_lintegral_add_right (fun x y => T x y + a x) (G := fun _ y => a y) + (ha.comp measurable_snd), + lintegral_lintegral_add_right T (G := fun x _ => a x) (ha.comp measurable_fst)] + _ = _ := by + simp only [lintegral_const, lintegral_mul_const _ ha] + ring + +/-- `∫∫ c F = c ∫∫ F` for a finite constant `c`, measurable `F` or not (Mathlib's +`lintegral_const_mul'` twice). -/ +theorem lintegral_lintegral_const_mul' {α : Type*} [MeasurableSpace α] {μ : Measure α} + {c : ℝ≥0∞} (hc : c ≠ ∞) (F : α → α → ℝ≥0∞) : + ∫⁻ x, ∫⁻ y, c * F x y ∂μ ∂μ = c * ∫⁻ x, ∫⁻ y, F x y ∂μ ∂μ := by + rw [lintegral_congr fun x => lintegral_const_mul' c (F x) hc, lintegral_const_mul' _ _ hc] + +/-! ### Averaging the differences over a ball -/ + +/-- **Splitting a step**: `‖Δ_h f‖_p ≤ ‖Δ_{h-z} f‖_p + ‖Δ_z f‖_p`, from +`Δ_h f = (Δ_{h-z} f)(· + z) + Δ_z f` and the invariance of `L_p` norms under translations. -/ +theorem eLpNorm_fwdDiff_le_add {p : ℝ≥0∞} (hp1 : 1 ≤ p) {f : V → ℂ} + (hf : AEStronglyMeasurable f volume) (h z : V) : + eLpNorm (fwdDiff h f) p volume ≤ + eLpNorm (fwdDiff (h - z) f) p volume + eLpNorm (fwdDiff z f) p volume := by + have hm : AEStronglyMeasurable (fwdDiff (h - z) f) volume := by + simpa using aestronglyMeasurable_higherDiff hf 1 (h - z) + have heq : fwdDiff h f = (fun x => fwdDiff (h - z) f (x + z)) + fwdDiff z f := by + funext x + simp only [fwdDiff, Pi.add_apply] + rw [show x + z + (h - z) = x + h by abel] + ring + rw [heq] + refine (eLpNorm_add_le hp1).trans ?_ + rw [eLpNorm_comp_add_right hm p z] + +/-- The `p`-th power of the splitting: `‖Δ_h f‖_p^p ≤ 2^(p-1) (‖Δ_{h-z} f‖_p^p + ‖Δ_z f‖_p^p)` +for `1 ≤ p < ∞` (Mathlib's `ENNReal.rpow_add_le_mul_rpow_add_rpow`). -/ +theorem eLpNorm_fwdDiff_rpow_le {p : ℝ≥0∞} (hp1 : 1 ≤ p) (hp : p ≠ ∞) {f : V → ℂ} + (hf : AEStronglyMeasurable f volume) (h z : V) : + eLpNorm (fwdDiff h f) p volume ^ p.toReal ≤ 2 ^ (p.toReal - 1) * + (eLpNorm (fwdDiff (h - z) f) p volume ^ p.toReal + + eLpNorm (fwdDiff z f) p volume ^ p.toReal) := + (ENNReal.rpow_le_rpow (eLpNorm_fwdDiff_le_add hp1 hf h z) ENNReal.toReal_nonneg).trans + (ENNReal.rpow_add_le_mul_rpow_add_rpow _ _ (ENNReal.one_le_toReal_of_one_le hp1 hp)) + +/-- `∫_{|z| < t} G(h - z) dz ≤ ∫_{|z| < 2t} G(z) dz` for `|h| ≤ t` and every `G : V → [0, ∞]`: +the reflection `z ↦ h - z` preserves Lebesgue measure (Mathlib's `lintegral_sub_left_eq_self`) +and maps the ball of radius `t` into the ball of radius `2t`. -/ +theorem setLIntegral_ball_comp_sub_le (G : V → ℝ≥0∞) {h : V} {t : ℝ} (hh : ‖h‖ ≤ t) : + ∫⁻ z in ball (0 : V) t, G (h - z) ≤ ∫⁻ z in ball (0 : V) (2 * t), G z := by + rw [← lintegral_indicator measurableSet_ball, ← lintegral_indicator measurableSet_ball] + conv_lhs => rw [← lintegral_sub_left_eq_self _ h] + refine lintegral_mono fun w => ?_ + by_cases hw : h - w ∈ ball (0 : V) t + · have hw2 : w ∈ ball (0 : V) (2 * t) := by + rw [mem_ball_zero_iff] at hw ⊢ + calc ‖w‖ = ‖h - (h - w)‖ := by rw [sub_sub_cancel] + _ ≤ ‖h‖ + ‖h - w‖ := norm_sub_le _ _ + _ < 2 * t := by linarith + rw [indicator_of_mem hw, indicator_of_mem hw2, sub_sub_cancel] + · rw [indicator_of_notMem hw] + exact zero_le + +/-- **Averaging over a ball**: for `1 ≤ p < ∞`, `|h| ≤ t` and `t > 0`, +`‖Δ_h f‖_p^p ≤ 2^p |B(0,t)|⁻¹ ∫_{|z| < 2t} ‖Δ_z f‖_p^p dz`. The splitting +`‖Δ_h f‖_p^p ≤ 2^(p-1) (‖Δ_{h-z} f‖_p^p + ‖Δ_z f‖_p^p)` is averaged over `|z| < t`. -/ +theorem eLpNorm_fwdDiff_rpow_le_average {p : ℝ≥0∞} (hp1 : 1 ≤ p) (hp : p ≠ ∞) {f : V → ℂ} + (hf : AEStronglyMeasurable f volume) {h : V} {t : ℝ} (hh : ‖h‖ ≤ t) (ht : 0 < t) : + eLpNorm (fwdDiff h f) p volume ^ p.toReal ≤ 2 ^ p.toReal * (volume (ball (0 : V) t))⁻¹ * + ∫⁻ z in ball (0 : V) (2 * t), eLpNorm (fwdDiff z f) p volume ^ p.toReal := by + have hp0 : p ≠ 0 := (zero_lt_one.trans_le hp1).ne' + have hmeas := measurable_eLpNorm_fwdDiff_rpow hp0 hp hf + have hv0 : volume (ball (0 : V) t) ≠ 0 := volume_ball_ne_zero ht + have hvt : volume (ball (0 : V) t) ≠ ∞ := volume_ball_ne_top t + have h2 : (2 : ℝ≥0∞) ^ (p.toReal - 1) * 2 = 2 ^ p.toReal := by + have h := ENNReal.two_rpow_mul_two_rpow (p.toReal - 1) 1 + rwa [ENNReal.rpow_one, sub_add_cancel] at h + have hkey : volume (ball (0 : V) t) * eLpNorm (fwdDiff h f) p volume ^ p.toReal ≤ + 2 ^ p.toReal * ∫⁻ z in ball (0 : V) (2 * t), eLpNorm (fwdDiff z f) p volume ^ p.toReal := by + calc volume (ball (0 : V) t) * eLpNorm (fwdDiff h f) p volume ^ p.toReal + = ∫⁻ _ in ball (0 : V) t, eLpNorm (fwdDiff h f) p volume ^ p.toReal := by + rw [setLIntegral_const, mul_comm] + _ ≤ ∫⁻ z in ball (0 : V) t, 2 ^ (p.toReal - 1) * + (eLpNorm (fwdDiff (h - z) f) p volume ^ p.toReal + + eLpNorm (fwdDiff z f) p volume ^ p.toReal) := + lintegral_mono fun z => eLpNorm_fwdDiff_rpow_le hp1 hp hf h z + _ = 2 ^ (p.toReal - 1) * + ((∫⁻ z in ball (0 : V) t, eLpNorm (fwdDiff (h - z) f) p volume ^ p.toReal) + + ∫⁻ z in ball (0 : V) t, eLpNorm (fwdDiff z f) p volume ^ p.toReal) := by + rw [lintegral_const_mul' _ _ (ENNReal.two_rpow_ne_top _), lintegral_add_right _ hmeas] + _ ≤ 2 ^ (p.toReal - 1) * + ((∫⁻ z in ball (0 : V) (2 * t), eLpNorm (fwdDiff z f) p volume ^ p.toReal) + + ∫⁻ z in ball (0 : V) (2 * t), eLpNorm (fwdDiff z f) p volume ^ p.toReal) := by + exact mul_le_mul_right (add_le_add (setLIntegral_ball_comp_sub_le + (fun w => eLpNorm (fwdDiff w f) p volume ^ p.toReal) hh) + (lintegral_mono_set (ball_subset_ball (x := (0 : V)) (show t ≤ 2 * t by linarith)))) _ + _ = _ := by rw [← two_mul, ← mul_assoc, h2] + calc eLpNorm (fwdDiff h f) p volume ^ p.toReal + = (volume (ball (0 : V) t))⁻¹ * + (volume (ball (0 : V) t) * eLpNorm (fwdDiff h f) p volume ^ p.toReal) := + (ENNReal.inv_mul_cancel_left hv0 hvt).symm + _ ≤ (volume (ball (0 : V) t))⁻¹ * (2 ^ p.toReal * + ∫⁻ z in ball (0 : V) (2 * t), eLpNorm (fwdDiff z f) p volume ^ p.toReal) := by + gcongr + _ = _ := by ring + +/-! ### The modulus of smoothness by the Gagliardo form -/ + +variable {p : ℝ≥0∞} [Fact (1 ≤ p)] + +/-- **The dyadic modulus by an average**: for `1 ≤ p < ∞`, +`ω_1(f, 2^(-k))_p^p ≤ 2^p |B(0, 2^(-k))|⁻¹ ∫_{|z| < 2^(1-k)} ‖Δ_z f‖_p^p dz` +(`Rd.eLpNorm_fwdDiff_rpow_le_average` for every step of the supremum). -/ +theorem lpModulus_rpow_le_average (hp : p ≠ ∞) (f : Lp ℂ p (volume : Measure V)) (k : ℕ) : + lpModulus p 1 f k ^ p.toReal ≤ 2 ^ p.toReal * (volume (ball (0 : V) (1 / 2 ^ k)))⁻¹ * + ∫⁻ z in ball (0 : V) (2 * (1 / 2 ^ k)), + eLpNorm (fwdDiff z (f : V → ℂ)) p volume ^ p.toReal := by + have hP : 0 < p.toReal := ENNReal.toReal_pos (zero_lt_one.trans_le Fact.out).ne' hp + rw [← ENNReal.le_rpow_inv_iff hP] + change modulus volume 1 p (f : V → ℂ) (1 / 2 ^ k) ≤ _ + refine iSup₂_le fun h hh => ?_ + rw [ENNReal.le_rpow_inv_iff hP] + exact eLpNorm_fwdDiff_rpow_le_average Fact.out hp (Lp.aestronglyMeasurable f) hh + (by positivity) + +/-- `|B(0, 2^(-k))|⁻¹ = 2^(kn) |B_1|⁻¹`. -/ +theorem inv_volume_ball_one_div_two_pow (k : ℕ) : + (volume (ball (0 : V) (1 / 2 ^ k)))⁻¹ = + dyadicWeight (finrank ℝ V : ℝ) k * (volume (ball (0 : V) 1))⁻¹ := by + rw [volume_ball_div_two_pow one_pos k 0, one_pow, ENNReal.ofReal_one, one_mul, + ENNReal.mul_inv (Or.inl (volume_ball_ne_zero one_pos)) (Or.inl (volume_ball_ne_top 1)), + ENNReal.dyadicWeight_neg, inv_inv, mul_comm] + +/-- **The weighted dyadic modulus by an integral over a ball**: +`(2^(ks) ω_1(f, 2^(-k))_p)^p ≤ 2^p |B_1|⁻¹ 2^(k(n+sp)) ∫_{|z| ≤ 2^(1-k)} ‖Δ_z f‖_p^p dz`. -/ +theorem dyadicWeight_mul_lpModulus_rpow_le (hp : p ≠ ∞) (s : ℝ) + (f : Lp ℂ p (volume : Measure V)) (k : ℕ) : + (dyadicWeight s k * lpModulus p 1 f k) ^ p.toReal ≤ + 2 ^ p.toReal * (volume (ball (0 : V) 1))⁻¹ * + (dyadicWeight ((finrank ℝ V : ℝ) + s * p.toReal) k * + ∫⁻ z in closedBall (0 : V) (2 / 2 ^ k), + eLpNorm (fwdDiff z (f : V → ℂ)) p volume ^ p.toReal) := by + have hsub : ball (0 : V) (2 * (1 / 2 ^ k)) ⊆ closedBall (0 : V) (2 / 2 ^ k) := by + rw [show 2 * (1 / 2 ^ k : ℝ) = 2 / 2 ^ k by ring] + exact ball_subset_closedBall + rw [ENNReal.mul_rpow_of_nonneg _ _ ENNReal.toReal_nonneg, ENNReal.dyadicWeight_rpow] + calc dyadicWeight (s * p.toReal) k * lpModulus p 1 f k ^ p.toReal + ≤ dyadicWeight (s * p.toReal) k * (2 ^ p.toReal * + (volume (ball (0 : V) (1 / 2 ^ k)))⁻¹ * ∫⁻ z in closedBall (0 : V) (2 / 2 ^ k), + eLpNorm (fwdDiff z (f : V → ℂ)) p volume ^ p.toReal) := + mul_le_mul_right ((lpModulus_rpow_le_average hp f k).trans + (mul_le_mul_right (lintegral_mono_set hsub) _)) _ + _ = _ := by + rw [inv_volume_ball_one_div_two_pow, ENNReal.dyadicWeight_add] + ring + +/-- On the annulus `2^(-j) < |z| ≤ 2^(1-j)` the weight `2^(jb)` is at most `2^b |z|^(-b)`, so +`2^(jb) ∫_{annulus} G ≤ 2^b ∫_{annulus} G(z) / |z|^b` for `b ≥ 0`. -/ +theorem dyadicWeight_mul_setLIntegral_dyadicAnnulus_le (G : V → ℝ≥0∞) {b : ℝ} (hb : 0 ≤ b) + (j : ℕ) : dyadicWeight b j * ∫⁻ z in dyadicAnnulus 2 j, G z ≤ + 2 ^ b * ∫⁻ z in dyadicAnnulus 2 j, G z / ‖z‖ₑ ^ b := by + rw [← lintegral_const_mul' _ _ (ENNReal.dyadicWeight_ne_top b j), + ← lintegral_const_mul' _ _ (ENNReal.two_rpow_ne_top _)] + refine setLIntegral_mono' (measurableSet_dyadicAnnulus 2 j) fun z hz => ?_ + have hz0 : 0 < ‖z‖ := lt_of_le_of_lt (by positivity) hz.1 + have hn0 : ‖z‖ₑ ^ b ≠ 0 := + (ENNReal.rpow_pos (eNorm_pos.2 (norm_pos_iff.1 hz0)) eNorm_ne_top).ne' + have hnt : ‖z‖ₑ ^ b ≠ ∞ := ENNReal.rpow_ne_top_of_nonneg hb eNorm_ne_top + have hle : dyadicWeight b j * ‖z‖ₑ ^ b ≤ 2 ^ b := by + calc dyadicWeight b j * ‖z‖ₑ ^ b ≤ dyadicWeight b j * ENNReal.ofReal (2 / 2 ^ j) ^ b := by + gcongr + rw [← ofReal_norm] + exact ENNReal.ofReal_le_ofReal hz.2 + _ = 2 ^ b := by + rw [ENNReal.ofReal_div_two_pow_rpow two_pos, ENNReal.ofReal_ofNat, mul_left_comm, + ENNReal.dyadicWeight_mul_neg_self, mul_one] + have hdiv : dyadicWeight b j ≤ 2 ^ b / ‖z‖ₑ ^ b := + (ENNReal.le_div_iff_mul_le (Or.inl hn0) (Or.inl hnt)).2 hle + calc dyadicWeight b j * G z = G z * dyadicWeight b j := mul_comm _ _ + _ ≤ G z * (2 ^ b / ‖z‖ₑ ^ b) := by gcongr + _ = 2 ^ b * (G z / ‖z‖ₑ ^ b) := by + simp only [div_eq_mul_inv] + ring + +/-- **Hardy's inequality for the balls**: for `G : V → [0, ∞]` with `G(0) = 0` and `b > 0`, +`∑_k 2^(kb) ∫_{|z| ≤ 2^(1-k)} G ≤ (1 - 2^(-b))⁻¹ 2^b ∫ G(z) / |z|^b dz`: each ball is the union +of the annuli `2^(-j) < |z| ≤ 2^(1-j)`, `j ≥ k`, and `ENNReal.hardy_tail_le` sums the tails. -/ +theorem tsum_dyadicWeight_mul_setLIntegral_closedBall_le {G : V → ℝ≥0∞} (hG : G 0 = 0) {b : ℝ} + (hb : 0 < b) : ∑' k, dyadicWeight b k * ∫⁻ z in closedBall (0 : V) (2 / 2 ^ k), G z ≤ + (1 - 2 ^ (-b))⁻¹ * 2 ^ b * ∫⁻ z, G z / ‖z‖ₑ ^ b := by + calc ∑' k, dyadicWeight b k * ∫⁻ z in closedBall (0 : V) (2 / 2 ^ k), G z + ≤ ∑' k, dyadicWeight b k * ∑' i, ∫⁻ z in dyadicAnnulus 2 (k + i), G z := + tsum_le_tsum fun k => + mul_le_mul_right (setLIntegral_closedBall_le_tsum_dyadicAnnulus_of_zero hG 2 k) _ + _ = lqNorm 1 (fun k => dyadicWeight b k * + ∑' i, (fun j => ∫⁻ z in dyadicAnnulus (V := V) 2 j, G z) (k + i)) := + (ENNReal.lqNorm_one _).symm + _ ≤ (1 - 2 ^ (-b))⁻¹ * lqNorm 1 (fun k => dyadicWeight b k * + ∫⁻ z in dyadicAnnulus (V := V) 2 k, G z) := + ENNReal.hardy_tail_le (q := 1) le_rfl b (fun j => ∫⁻ z in dyadicAnnulus (V := V) 2 j, G z) + _ = (1 - 2 ^ (-b))⁻¹ * ∑' k, dyadicWeight b k * ∫⁻ z in dyadicAnnulus (V := V) 2 k, G z := by + rw [ENNReal.lqNorm_one] + _ ≤ (1 - 2 ^ (-b))⁻¹ * ∑' k, 2 ^ b * ∫⁻ z in dyadicAnnulus (V := V) 2 k, G z / ‖z‖ₑ ^ b := by + exact mul_le_mul_right (tsum_le_tsum fun k => + dyadicWeight_mul_setLIntegral_dyadicAnnulus_le G hb.le k) _ + _ = (1 - 2 ^ (-b))⁻¹ * 2 ^ b * + ∑' k, ∫⁻ z in dyadicAnnulus (V := V) 2 k, G z / ‖z‖ₑ ^ b := by + rw [ENNReal.tsum_mul_left, mul_assoc] + _ ≤ _ := by + gcongr + exact tsum_setLIntegral_dyadicAnnulus_le _ zero_le_two + +variable (V) in +/-- The constant `2^p |B_1|⁻¹ (1 - 2^(-(n+sp)))⁻¹ 2^(n+sp)` of +`‖(2^(ks) ω_1(f, 2^(-k))_p)_k‖_{ℓ_p}^p ≤ C ∫∫ |f(y) - f(x)|^p / |y - x|^(n+sp) dy dx`. -/ +noncomputable def slobodeckijConstUpper (p : ℝ≥0∞) (s : ℝ) : ℝ≥0∞ := + 2 ^ p.toReal * (volume (ball (0 : V) 1))⁻¹ * + (1 - 2 ^ (-((finrank ℝ V : ℝ) + s * p.toReal)))⁻¹ * 2 ^ ((finrank ℝ V : ℝ) + s * p.toReal) + +omit [Fact (1 ≤ p)] in +/-- The constant `Rd.slobodeckijConstUpper V p s` is finite for `0 < p < ∞` and `s > 0`. -/ +theorem slobodeckijConstUpper_ne_top (hp0 : p ≠ 0) (hp : p ≠ ∞) {s : ℝ} (hs : 0 < s) : + slobodeckijConstUpper V p s ≠ ∞ := by + have hb : 0 < (finrank ℝ V : ℝ) + s * p.toReal := + add_pos_of_nonneg_of_pos (Nat.cast_nonneg _) (mul_pos hs (ENNReal.toReal_pos hp0 hp)) + refine ENNReal.mul_ne_top (ENNReal.mul_ne_top (ENNReal.mul_ne_top ?_ ?_) + (ENNReal.one_sub_two_rpow_neg_inv_ne_top hb)) ?_ + · exact ENNReal.two_rpow_ne_top _ + · exact ENNReal.inv_ne_top.2 (volume_ball_ne_zero one_pos) + · exact ENNReal.two_rpow_ne_top _ + +/-- **The first-difference Besov norm by the Gagliardo form**: for `1 ≤ p < ∞`, `s > 0` and +`f ∈ L_p(V)`, +`‖(2^(ks) ω_1(f, 2^(-k))_p)_k‖_{ℓ_p}^p ≤ C ∫∫ |f(y) - f(x)|^p / |y - x|^(n+sp) dy dx` +with `C = Rd.slobodeckijConstUpper V p s`. -/ +theorem lqNorm_modulus_rpow_le_slobodeckijForm (hp : p ≠ ∞) {s : ℝ} (hs : 0 < s) + (f : Lp ℂ p (volume : Measure V)) : + lqNorm p (fun k => dyadicWeight s k * lpModulus p 1 f k) ^ p.toReal ≤ + slobodeckijConstUpper V p s * slobodeckijForm p s (f : V → ℂ) := by + have hp0 : p ≠ 0 := (zero_lt_one.trans_le Fact.out).ne' + have hb : 0 < (finrank ℝ V : ℝ) + s * p.toReal := + add_pos_of_nonneg_of_pos (Nat.cast_nonneg _) (mul_pos hs (ENNReal.toReal_pos hp0 hp)) + calc lqNorm p (fun k => dyadicWeight s k * lpModulus p 1 f k) ^ p.toReal + = ∑' k, (dyadicWeight s k * lpModulus p 1 f k) ^ p.toReal := ENNReal.lqNorm_rpow hp0 hp _ + _ ≤ ∑' k, 2 ^ p.toReal * (volume (ball (0 : V) 1))⁻¹ * + (dyadicWeight ((finrank ℝ V : ℝ) + s * p.toReal) k * + ∫⁻ z in closedBall (0 : V) (2 / 2 ^ k), + eLpNorm (fwdDiff z (f : V → ℂ)) p volume ^ p.toReal) := + tsum_le_tsum fun k => dyadicWeight_mul_lpModulus_rpow_le hp s f k + _ = 2 ^ p.toReal * (volume (ball (0 : V) 1))⁻¹ * + ∑' k, dyadicWeight ((finrank ℝ V : ℝ) + s * p.toReal) k * + ∫⁻ z in closedBall (0 : V) (2 / 2 ^ k), + eLpNorm (fwdDiff z (f : V → ℂ)) p volume ^ p.toReal := ENNReal.tsum_mul_left + _ ≤ 2 ^ p.toReal * (volume (ball (0 : V) 1))⁻¹ * + ((1 - 2 ^ (-((finrank ℝ V : ℝ) + s * p.toReal)))⁻¹ * + 2 ^ ((finrank ℝ V : ℝ) + s * p.toReal) * + ∫⁻ z, eLpNorm (fwdDiff z (f : V → ℂ)) p volume ^ p.toReal / + ‖z‖ₑ ^ ((finrank ℝ V : ℝ) + s * p.toReal)) := by + gcongr + exact tsum_dyadicWeight_mul_setLIntegral_closedBall_le + (eLpNorm_fwdDiff_zero_rpow hp0 hp _) hb + _ = _ := by + rw [slobodeckijForm_eq_lintegral_eLpNorm hp0 hp s (Lp.aestronglyMeasurable f), + slobodeckijConstUpper] + ring + +/-! ### The Gagliardo form by the modulus of smoothness -/ + +omit [Fact (1 ≤ p)] in +/-- **One annulus of the Gagliardo form**: for `s ≥ 0`, on `2^(-(i+1)) < |z| ≤ 2^(-i)`, +`∫ ‖Δ_z f‖_p^p / |z|^(n+sp) dz ≤ 2^(n+sp) |B_1| (2^(is) ω_1(f, 2^(-i))_p)^p`, since there +`‖Δ_z f‖_p ≤ ω_1(f, 2^(-i))_p` and `|z|^(-(n+sp)) ≤ 2^((i+1)(n+sp))`. -/ +theorem setLIntegral_dyadicAnnulus_le_lpModulus {s : ℝ} (hs : 0 ≤ s) + (f : Lp ℂ p (volume : Measure V)) (i : ℕ) : + ∫⁻ z in dyadicAnnulus 1 i, eLpNorm (fwdDiff z (f : V → ℂ)) p volume ^ p.toReal / + ‖z‖ₑ ^ ((finrank ℝ V : ℝ) + s * p.toReal) ≤ + 2 ^ ((finrank ℝ V : ℝ) + s * p.toReal) * volume (ball (0 : V) 1) * + (dyadicWeight s i * lpModulus p 1 f i) ^ p.toReal := by + have hP0 : 0 ≤ p.toReal := ENNReal.toReal_nonneg + have hb : 0 ≤ (finrank ℝ V : ℝ) + s * p.toReal := by positivity + have hpt : ∀ z ∈ dyadicAnnulus (V := V) 1 i, + eLpNorm (fwdDiff z (f : V → ℂ)) p volume ^ p.toReal / + ‖z‖ₑ ^ ((finrank ℝ V : ℝ) + s * p.toReal) ≤ lpModulus p 1 f i ^ p.toReal * + dyadicWeight ((finrank ℝ V : ℝ) + s * p.toReal) (i + 1) := by + intro z hz + have h1 : eLpNorm (fwdDiff z (f : V → ℂ)) p volume ^ p.toReal ≤ + lpModulus p 1 f i ^ p.toReal := + ENNReal.rpow_le_rpow (eLpNorm_higherDiff_le_modulus (μ := volume) (r := 1) hz.2) hP0 + have h2 : (‖z‖ₑ ^ ((finrank ℝ V : ℝ) + s * p.toReal))⁻¹ ≤ + dyadicWeight ((finrank ℝ V : ℝ) + s * p.toReal) (i + 1) := by + rw [← inv_inv (dyadicWeight _ (i + 1)), ← ENNReal.dyadicWeight_neg, ENNReal.inv_le_inv] + calc dyadicWeight (-((finrank ℝ V : ℝ) + s * p.toReal)) (i + 1) + = ENNReal.ofReal (1 / 2 ^ (i + 1)) ^ ((finrank ℝ V : ℝ) + s * p.toReal) := by + rw [ENNReal.ofReal_div_two_pow_rpow one_pos, ENNReal.ofReal_one, ENNReal.one_rpow, + one_mul] + _ ≤ ‖z‖ₑ ^ ((finrank ℝ V : ℝ) + s * p.toReal) := by + rw [← ofReal_norm] + exact ENNReal.rpow_le_rpow (ENNReal.ofReal_le_ofReal hz.1.le) hb + rw [div_eq_mul_inv] + exact mul_le_mul' h1 h2 + calc ∫⁻ z in dyadicAnnulus 1 i, eLpNorm (fwdDiff z (f : V → ℂ)) p volume ^ p.toReal / + ‖z‖ₑ ^ ((finrank ℝ V : ℝ) + s * p.toReal) + ≤ ∫⁻ _ in dyadicAnnulus (V := V) 1 i, lpModulus p 1 f i ^ p.toReal * + dyadicWeight ((finrank ℝ V : ℝ) + s * p.toReal) (i + 1) := + setLIntegral_mono' (measurableSet_dyadicAnnulus 1 i) hpt + _ = lpModulus p 1 f i ^ p.toReal * dyadicWeight ((finrank ℝ V : ℝ) + s * p.toReal) (i + 1) * + volume (dyadicAnnulus (V := V) 1 i) := setLIntegral_const _ _ + _ ≤ lpModulus p 1 f i ^ p.toReal * dyadicWeight ((finrank ℝ V : ℝ) + s * p.toReal) (i + 1) * + (ENNReal.ofReal 1 ^ (finrank ℝ V : ℝ) * dyadicWeight (-(finrank ℝ V : ℝ)) i * + volume (ball (0 : V) 1)) := by + gcongr + exact volume_dyadicAnnulus_le one_pos i + _ = _ := by + rw [ENNReal.ofReal_one, ENNReal.one_rpow, one_mul, ENNReal.dyadicWeight_succ, + ENNReal.mul_rpow_of_nonneg _ _ hP0, ENNReal.dyadicWeight_rpow, + show dyadicWeight (s * p.toReal) i = dyadicWeight ((finrank ℝ V : ℝ) + s * p.toReal) i * + dyadicWeight (-(finrank ℝ V : ℝ)) i by + rw [← ENNReal.dyadicWeight_add] + congr 1 + ring] + ring + +/-- **The tail of the Gagliardo form**: for `1 ≤ p < ∞` and `s > 0`, +`∫_{|z| ≥ 1} ‖Δ_z f‖_p^p / |z|^(n+sp) dz ≤ 2^p C ‖f‖_p^p` with +`C = Rd.complBallRpowConst V (n + sp)`, since `‖Δ_z f‖_p ≤ 2 ‖f‖_p`. -/ +theorem setLIntegral_compl_ball_le_enorm {s : ℝ} (hs : 0 < s) (hp : p ≠ ∞) + (f : Lp ℂ p (volume : Measure V)) : + ∫⁻ z in (ball (0 : V) 1)ᶜ, eLpNorm (fwdDiff z (f : V → ℂ)) p volume ^ p.toReal / + ‖z‖ₑ ^ ((finrank ℝ V : ℝ) + s * p.toReal) ≤ + 2 ^ p.toReal * complBallRpowConst V ((finrank ℝ V : ℝ) + s * p.toReal) * + ‖f‖ₑ ^ p.toReal := by + have hp0 : p ≠ 0 := (zero_lt_one.trans_le Fact.out).ne' + have hP0 : 0 ≤ p.toReal := ENNReal.toReal_nonneg + have hpt : ∀ z : V, eLpNorm (fwdDiff z (f : V → ℂ)) p volume ^ p.toReal / + ‖z‖ₑ ^ ((finrank ℝ V : ℝ) + s * p.toReal) ≤ + (2 * ‖f‖ₑ) ^ p.toReal * ‖z‖ₑ ^ (-((finrank ℝ V : ℝ) + s * p.toReal)) := fun z => by + rw [div_eq_mul_inv, ← ENNReal.rpow_neg] + gcongr + have h := eLpNorm_higherDiff_le (Lp.aestronglyMeasurable f) (Fact.out : 1 ≤ p) 1 z + rw [pow_one, ← Lp.eNorm_def] at h + exact h + have hlt : (finrank ℝ V : ℝ) < (finrank ℝ V : ℝ) + s * p.toReal := + lt_add_of_pos_right _ (mul_pos hs (ENNReal.toReal_pos hp0 hp)) + calc ∫⁻ z in (ball (0 : V) 1)ᶜ, eLpNorm (fwdDiff z (f : V → ℂ)) p volume ^ p.toReal / + ‖z‖ₑ ^ ((finrank ℝ V : ℝ) + s * p.toReal) + ≤ ∫⁻ z in (ball (0 : V) 1)ᶜ, + (2 * ‖f‖ₑ) ^ p.toReal * ‖z‖ₑ ^ (-((finrank ℝ V : ℝ) + s * p.toReal)) := + lintegral_mono hpt + _ = (2 * ‖f‖ₑ) ^ p.toReal * + ∫⁻ z in (ball (0 : V) 1)ᶜ, ‖z‖ₑ ^ (-((finrank ℝ V : ℝ) + s * p.toReal)) := + lintegral_const_mul _ (measurable_eNorm.pow_const _) + _ ≤ (2 * ‖f‖ₑ) ^ p.toReal * (complBallRpowConst V ((finrank ℝ V : ℝ) + s * p.toReal) * + ENNReal.ofReal 1 ^ ((finrank ℝ V : ℝ) - ((finrank ℝ V : ℝ) + s * p.toReal))) := by + gcongr + exact lintegral_compl_ball_norm_rpow_neg_le hlt one_pos + _ = _ := by + rw [ENNReal.ofReal_one, ENNReal.one_rpow, mul_one, ENNReal.mul_rpow_of_nonneg _ _ hP0] + ring + +variable (V) in +/-- The constant `2^(n+sp) |B_1| + 2^p Rd.complBallRpowConst V (n + sp)` of the bound of the +Gagliardo form by `‖f‖_p^p + ‖(2^(ks) ω_1(f, 2^(-k))_p)_k‖_{ℓ_p}^p` (`Rd.slobodeckijForm_le`). -/ +noncomputable def slobodeckijConstLower (p : ℝ≥0∞) (s : ℝ) : ℝ≥0∞ := + 2 ^ ((finrank ℝ V : ℝ) + s * p.toReal) * volume (ball (0 : V) 1) + + 2 ^ p.toReal * complBallRpowConst V ((finrank ℝ V : ℝ) + s * p.toReal) + +omit [Fact (1 ≤ p)] in +/-- The constant `Rd.slobodeckijConstLower V p s` is finite for `0 < p < ∞` and `s > 0`. -/ +theorem slobodeckijConstLower_ne_top (hp0 : p ≠ 0) (hp : p ≠ ∞) {s : ℝ} (hs : 0 < s) : + slobodeckijConstLower V p s ≠ ∞ := + ENNReal.add_ne_top.2 ⟨ENNReal.mul_ne_top + (ENNReal.two_rpow_ne_top _) (volume_ball_ne_top 1), + ENNReal.mul_ne_top (ENNReal.two_rpow_ne_top _) + (complBallRpowConst_ne_top + (lt_add_of_pos_right _ (mul_pos hs (ENNReal.toReal_pos hp0 hp))))⟩ + +/-- **The Gagliardo form by the first-difference Besov norm**: for `1 ≤ p < ∞`, `s > 0` and +`f ∈ L_p(V)`, +`∫∫ |f(y) - f(x)|^p / |y - x|^(n+sp) dy dx ≤ C (‖f‖_p^p + ‖(2^(ks) ω_1(f, 2^(-k))_p)_k‖_{ℓ_p}^p)` +with `C = Rd.slobodeckijConstLower V p s`: the steps `|z| ≤ 1` are sorted into the dyadic annuli, +and the steps `|z| ≥ 1` give the tail. -/ +theorem slobodeckijForm_le (hp : p ≠ ∞) {s : ℝ} (hs : 0 < s) (f : Lp ℂ p (volume : Measure V)) : + slobodeckijForm p s (f : V → ℂ) ≤ slobodeckijConstLower V p s * + (‖f‖ₑ ^ p.toReal + lqNorm p (fun k => dyadicWeight s k * lpModulus p 1 f k) ^ p.toReal) := by + have hp0 : p ≠ 0 := (zero_lt_one.trans_le Fact.out).ne' + have hF0 : eLpNorm (fwdDiff (0 : V) (f : V → ℂ)) p volume ^ p.toReal / + ‖(0 : V)‖ₑ ^ ((finrank ℝ V : ℝ) + s * p.toReal) = 0 := by + rw [eLpNorm_fwdDiff_zero_rpow hp0 hp, ENNReal.zero_div] + have huniv : closedBall (0 : V) 1 ∪ (ball (0 : V) 1)ᶜ = univ := + eq_univ_of_forall fun z => by + by_cases hz : z ∈ ball (0 : V) 1 + · exact Or.inl (ball_subset_closedBall hz) + · exact Or.inr hz + have hA : ∫⁻ z in closedBall (0 : V) 1, eLpNorm (fwdDiff z (f : V → ℂ)) p volume ^ p.toReal / + ‖z‖ₑ ^ ((finrank ℝ V : ℝ) + s * p.toReal) ≤ + 2 ^ ((finrank ℝ V : ℝ) + s * p.toReal) * volume (ball (0 : V) 1) * + lqNorm p (fun k => dyadicWeight s k * lpModulus p 1 f k) ^ p.toReal := by + calc ∫⁻ z in closedBall (0 : V) 1, eLpNorm (fwdDiff z (f : V → ℂ)) p volume ^ p.toReal / + ‖z‖ₑ ^ ((finrank ℝ V : ℝ) + s * p.toReal) + ≤ ∑' i, ∫⁻ z in dyadicAnnulus 1 i, eLpNorm (fwdDiff z (f : V → ℂ)) p volume ^ p.toReal / + ‖z‖ₑ ^ ((finrank ℝ V : ℝ) + s * p.toReal) := by + simpa only [pow_zero, div_one, zero_add] using + setLIntegral_closedBall_le_tsum_dyadicAnnulus_of_zero (G := fun z => + eLpNorm (fwdDiff z (f : V → ℂ)) p volume ^ p.toReal / + ‖z‖ₑ ^ ((finrank ℝ V : ℝ) + s * p.toReal)) hF0 1 0 + _ ≤ ∑' i, 2 ^ ((finrank ℝ V : ℝ) + s * p.toReal) * volume (ball (0 : V) 1) * + (dyadicWeight s i * lpModulus p 1 f i) ^ p.toReal := + tsum_le_tsum fun i => setLIntegral_dyadicAnnulus_le_lpModulus hs.le f i + _ = _ := by rw [ENNReal.tsum_mul_left, ENNReal.lqNorm_rpow hp0 hp] + rw [slobodeckijForm_eq_lintegral_eLpNorm hp0 hp s (Lp.aestronglyMeasurable f)] + calc ∫⁻ z, eLpNorm (fwdDiff z (f : V → ℂ)) p volume ^ p.toReal / + ‖z‖ₑ ^ ((finrank ℝ V : ℝ) + s * p.toReal) + = ∫⁻ z in closedBall (0 : V) 1 ∪ (ball (0 : V) 1)ᶜ, + eLpNorm (fwdDiff z (f : V → ℂ)) p volume ^ p.toReal / + ‖z‖ₑ ^ ((finrank ℝ V : ℝ) + s * p.toReal) := by rw [huniv, Measure.restrict_univ] + _ ≤ (∫⁻ z in closedBall (0 : V) 1, eLpNorm (fwdDiff z (f : V → ℂ)) p volume ^ p.toReal / + ‖z‖ₑ ^ ((finrank ℝ V : ℝ) + s * p.toReal)) + + ∫⁻ z in (ball (0 : V) 1)ᶜ, eLpNorm (fwdDiff z (f : V → ℂ)) p volume ^ p.toReal / + ‖z‖ₑ ^ ((finrank ℝ V : ℝ) + s * p.toReal) := lintegral_union_le _ _ _ + _ ≤ 2 ^ ((finrank ℝ V : ℝ) + s * p.toReal) * volume (ball (0 : V) 1) * + lqNorm p (fun k => dyadicWeight s k * lpModulus p 1 f k) ^ p.toReal + + 2 ^ p.toReal * complBallRpowConst V ((finrank ℝ V : ℝ) + s * p.toReal) * + ‖f‖ₑ ^ p.toReal := add_le_add hA (setLIntegral_compl_ball_le_enorm hs hp f) + _ ≤ _ := by + rw [slobodeckijConstLower, add_mul, mul_add, mul_add] + exact add_le_add le_add_self le_self_add + +/-! ### Sobolev–Slobodeckij spaces are Besov spaces -/ + +/-- **`W^{s,p} = B^s_{p,p}` for `0 < s < 1`**: for `1 ≤ p < ∞` and `f ∈ L_p(V)`, the Gagliardo +form `∫∫ |f(y) - f(x)|^p / |y - x|^(n+sp) dy dx` is finite if and only if `f` lies in the +approximation space `A^s_p` of the band-limited scheme, that is, in `B^s_{p,p}(V)` +(`Rd.memApprox_bandScheme_iff_modulus` with differences of order `1`). -/ +theorem slobodeckijForm_lt_top_iff_memApprox (hp : p ≠ ∞) {s : ℝ} (hs : 0 < s) (hs1 : s < 1) + (f : Lp ℂ p (volume : Measure V)) : + slobodeckijForm p s (f : V → ℂ) < ∞ ↔ (bandScheme hp).MemApprox s p f := by + have hp0 : p ≠ 0 := (zero_lt_one.trans_le Fact.out).ne' + have hP : 0 < p.toReal := ENNReal.toReal_pos hp0 hp + rw [memApprox_bandScheme_iff_modulus hp hs.le (r := 1) (by exact_mod_cast hs1) Fact.out f] + constructor + · intro h + refine ENNReal.add_lt_top.2 ⟨eNorm_lt_top, ?_⟩ + rw [← ENNReal.rpow_lt_top_iff_of_pos hP] + exact (lqNorm_modulus_rpow_le_slobodeckijForm hp hs f).trans_lt + (ENNReal.mul_lt_top (slobodeckijConstUpper_ne_top hp0 hp hs).lt_top h) + · intro h + have hL := (ENNReal.add_lt_top.1 h).2 + refine (slobodeckijForm_le hp hs f).trans_lt (ENNReal.mul_lt_top + (slobodeckijConstLower_ne_top hp0 hp hs).lt_top (ENNReal.add_lt_top.2 ⟨?_, ?_⟩)) + · exact ENNReal.rpow_lt_top_of_nonneg hP.le eNorm_ne_top + · exact ENNReal.rpow_lt_top_of_nonneg hP.le hL.ne + +end Rd diff --git a/LeanPool/FunctionSpaces/Rd/FourierMultipliers/BesselPotentialMultipliers.lean b/LeanPool/FunctionSpaces/Rd/FourierMultipliers/BesselPotentialMultipliers.lean new file mode 100644 index 0000000000..d7756dddaf --- /dev/null +++ b/LeanPool/FunctionSpaces/Rd/FourierMultipliers/BesselPotentialMultipliers.lean @@ -0,0 +1,158 @@ +/- +Copyright (c) 2026 Mario Ullrich. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Mario Ullrich +-/ +module + +public import LeanPool.FunctionSpaces.Rd.BesselPotentials.BesselPotentialDistributions +public import TauCeti.Analysis.Distribution.Sobolev + +/- +Modified for Lean Pool: module names and imports adapted. +-/ + +/-! +# Fourier multipliers on Bessel potential spaces + +For `1 < p < ∞`, a symbol `m` of order `σ` (`Rd.HasSymbolGrowth σ m`) maps Mathlib's Bessel +potential space `H^{s,p}` into `H^{s-σ,p}`, for every real `s` +(`TemperedDistribution.MemSobolev.fourierMultiplierCLM_of_hasSymbolGrowth`): in dimension +`n ≥ 1` by `H^{s,p} = F^s_{p,2}` (`Rd.memSobolev_bessel_iff_memTriebelLizorkinDistr`) and the +multiplier theorem on `F^s_{p,2}`, in dimension `0` since every symbol is constant there and +`J_s` is the identity (`Rd.besselPotential_of_subsingleton`). + +* **Mapping properties**: `H^{s,p} ⊆ H^{s',p}` for `s' ≤ s` + (`TemperedDistribution.MemSobolev.mono_of_one_lt`), so `L_p ⊆ H^{s,p}` for `s ≤ 0` + (`Rd.memSobolev_bessel_of_nonpos`); derivatives map `H^{s,p}` into `H^{s-1,p}` + (`TemperedDistribution.MemSobolev.lineDerivOp_of_one_lt`) and the Laplacian into `H^{s-2,p}` + (`TemperedDistribution.MemSobolev.laplacian_of_one_lt`). +* **The derivative characterisation**: `J_2 = 1 - (2π)^{-2} Δ` + (`TemperedDistribution.besselPotential_two_eq_sub_laplacian`), and `f ∈ H^{s+1,p}` iff + `f ∈ H^{s,p}` and `∂_v f ∈ H^{s,p}` for every direction `v` + (`TemperedDistribution.memSobolev_add_one_iff`). +* **The lifting property for every `q`**: for `g, J_σ g ∈ L_p` and `1 < q ≤ ∞`, + `‖J_σ g‖_{F^{s-σ}_{p,q}}` and `‖g‖_{F^s_{p,q}}` are equivalent + (`Rd.exists_triebelLizorkinNorm_besselPotential_le`, + `Rd.exists_triebelLizorkinNorm_le_besselPotential`; Triebel 1983, Theorem 2.3.8). + +The general Sobolev API and derivative characterizations are imported from Tau Ceti. +-/ + +@[expose] public section + +open MeasureTheory Module +open scoped ENNReal SchwartzMap Real Laplacian LineDeriv +open TemperedDistribution (besselPotential) + +namespace Rd + +variable {V : Type*} [NormedAddCommGroup V] [InnerProductSpace ℝ V] [FiniteDimensional ℝ V] + [MeasurableSpace V] [BorelSpace V] + +/-- **The Bessel potential in dimension `0`**: on a space with one point, `⟨ξ⟩^s = 1`, so `J_s` +is the identity (Mathlib's `TemperedDistribution.fourierMultiplierCLM_const`). -/ +theorem besselPotential_of_subsingleton [Subsingleton V] (s : ℝ) (u : 𝓢'(V, ℂ)) : + besselPotential V ℂ s u = u := by + have h : (fun x : V => ((((1 + ‖x‖ ^ 2) ^ (s / 2) : ℝ)) : ℂ)) = fun _ => 1 := by + funext x + rw [Subsingleton.elim x 0, norm_zero] + simp + rw [TemperedDistribution.besselPotential, h, TemperedDistribution.fourierMultiplierCLM_const, + one_smul, ContinuousLinearMap.id_apply] + +/-- **Fourier multipliers on `H^{s,p}` in dimension `0`**: on a space with one point every +function `m` is constant, `m(D) u = m(0) u`, and `H^{s,p} = H^{t,p}` for all `s`, `t` +(`Rd.besselPotential_of_subsingleton`). -/ +theorem memSobolev_fourierMultiplierCLM_of_subsingleton [Subsingleton V] {p : ℝ≥0∞} + [Fact (1 ≤ p)] {s t : ℝ} (m : V → ℂ) {u : 𝓢'(V, ℂ)} + (hu : TemperedDistribution.MemSobolev s p u) : + TemperedDistribution.MemSobolev t p (TemperedDistribution.fourierMultiplierCLM ℂ m u) := by + have hm : m = fun _ => m 0 := funext fun x => by rw [Subsingleton.elim x 0] + obtain ⟨f, hf⟩ := hu + rw [besselPotential_of_subsingleton] at hf + refine ⟨m 0 • f, ?_⟩ + rw [besselPotential_of_subsingleton, hm, TemperedDistribution.fourierMultiplierCLM_const, + smul_apply, ContinuousLinearMap.id_apply, hf, + ← Lp.toTemperedDistributionCLM_apply, ← Lp.toTemperedDistributionCLM_apply, map_smul] + +end Rd + +namespace TemperedDistribution + +variable {V : Type*} [NormedAddCommGroup V] [InnerProductSpace ℝ V] [FiniteDimensional ℝ V] + [MeasurableSpace V] [BorelSpace V] {p : ℝ≥0∞} [Fact (1 ≤ p)] + +/-- **Fourier multipliers on Bessel potential spaces**: for `1 < p < ∞`, a symbol `m` of order +`σ` and every real `s`, `m(D)` maps Mathlib's Bessel potential space `H^{s,p}(V)` into +`H^{s-σ,p}(V)`. In dimension `n ≥ 1`, `H^{s,p} = F^s_{p,2}` +(`Rd.memSobolev_bessel_iff_memTriebelLizorkinDistr`) and `m(D)` maps `F^s_{p,2}` into +`F^{s-σ}_{p,2}` (`Rd.MemTriebelLizorkinDistr.fourierMultiplierCLM`); dimension `0` is +`Rd.memSobolev_fourierMultiplierCLM_of_subsingleton`. -/ +theorem MemSobolev.fourierMultiplierCLM_of_hasSymbolGrowth (hp1 : 1 < p) (hp : p ≠ ∞) + {σ s : ℝ} {m : V → ℂ} (hm : Rd.HasSymbolGrowth σ m) {u : 𝓢'(V, ℂ)} + (hu : MemSobolev s p u) : MemSobolev (s - σ) p (fourierMultiplierCLM ℂ m u) := by + rcases subsingleton_or_nontrivial V with hV | hV + · exact Rd.memSobolev_fourierMultiplierCLM_of_subsingleton m hu + rw [Rd.memSobolev_bessel_iff_memTriebelLizorkinDistr hp1 hp] at hu ⊢ + exact hu.fourierMultiplierCLM hp1 hp ENNReal.one_lt_two hm + +/-- **The Laplacian on Bessel potential spaces**: for `1 < p < ∞`, the Laplacian maps `H^{s,p}` +into `H^{s-2,p}`, since `Δ = -(2π)^2 ‖ξ‖^2(D)` (Mathlib's +`TemperedDistribution.laplacian_eq_fourierMultiplierCLM`) with the symbol `‖ξ‖^2` of order `2` +(`Rd.hasSymbolGrowth_norm_sq`). For `p = 2` this is Mathlib's +`TemperedDistribution.MemSobolev.laplacian`. -/ +theorem MemSobolev.laplacian_of_one_lt (hp1 : 1 < p) (hp : p ≠ ∞) {s : ℝ} {f : 𝓢'(V, ℂ)} + (hf : MemSobolev s p f) : MemSobolev (s - 2) p (Δ f) := by + rw [laplacian_eq_fourierMultiplierCLM] + exact (hf.fourierMultiplierCLM_of_hasSymbolGrowth hp1 hp + Rd.hasSymbolGrowth_norm_sq).smul_of_tower _ + +end TemperedDistribution + +namespace Rd + +variable {V : Type*} [NormedAddCommGroup V] [InnerProductSpace ℝ V] [FiniteDimensional ℝ V] + [MeasurableSpace V] [BorelSpace V] {p : ℝ≥0∞} [Fact (1 ≤ p)] + +/-- **`L_p ⊆ H^{s,p}` for `s ≤ 0`**: for `1 < p < ∞`, real `s ≤ 0` and `f ∈ L_p(V)`, the tempered +distribution of `f` lies in Mathlib's `H^{s,p}(V)`, since it lies in `H^{0,p}` (Mathlib's +`TemperedDistribution.memSobolev_zero_iff`) and `H^{0,p} ⊆ H^{s,p}` +(`TemperedDistribution.MemSobolev.mono_of_one_lt`). -/ +theorem memSobolev_bessel_of_nonpos (hp1 : 1 < p) (hp : p ≠ ∞) {s : ℝ} (hs : s ≤ 0) + (f : Lp ℂ p (volume : Measure V)) : TemperedDistribution.MemSobolev s p (f : 𝓢'(V, ℂ)) := + (TemperedDistribution.memSobolev_zero_iff.2 ⟨f, rfl⟩).mono_of_one_lt hp1 hp hs + +/-- **The lifting property for every `q`, first half**: for `1 < p < ∞`, `1 < q ≤ ∞` and all +reals `σ`, `s` there is a finite constant `C` such that +`‖h‖_{F^{s-σ}_{p,q}} ≤ C ‖g‖_{F^s_{p,q}}` for all `g, h ∈ L_p(V)` with `J_σ g = h`; the constant is +existential. `J_σ` is the Fourier multiplier with the symbol `⟨ξ⟩^σ` of order `σ` +(`Rd.hasSymbolGrowth_besselWeight`, `Rd.exists_triebelLizorkinNorm_le_of_fourierMultiplier_eq`). -/ +theorem exists_triebelLizorkinNorm_besselPotential_le (hp1 : 1 < p) (hp : p ≠ ∞) {q : ℝ≥0∞} + (hq1 : 1 < q) (σ s : ℝ) : + ∃ C : ℝ≥0∞, C ≠ ∞ ∧ ∀ g h : Lp ℂ p (volume : Measure V), + besselPotential V ℂ σ (g : 𝓢'(V, ℂ)) = h → + triebelLizorkinNorm (s - σ) q h ≤ C * triebelLizorkinNorm s q g := by + obtain ⟨C, hC, hCu⟩ := exists_triebelLizorkinNorm_le_of_fourierMultiplier_eq (V := V) hp1 hp hq1 + (hasSymbolGrowth_besselWeight σ) s + exact ⟨C, hC, fun g h hgh => hCu g h hgh.symm⟩ + +/-- **The lifting property for every `q`, second half**: for `1 < p < ∞`, `1 < q ≤ ∞` and all +reals `σ`, `s` there is a finite constant `C` such that +`‖g‖_{F^s_{p,q}} ≤ C ‖h‖_{F^{s-σ}_{p,q}}` for all `g, h ∈ L_p(V)` with `J_σ g = h`; the constant is +existential. Here `g = J_{-σ} h` (Mathlib's +`TemperedDistribution.besselPotential_neg_apply_eq_iff`) with the symbol `⟨ξ⟩^{-σ}` of order +`-σ`. With `Rd.exists_triebelLizorkinNorm_besselPotential_le` this is Triebel's lifting property +(Triebel 1983, Theorem 2.3.8) for `1 < q ≤ ∞`. -/ +theorem exists_triebelLizorkinNorm_le_besselPotential (hp1 : 1 < p) (hp : p ≠ ∞) {q : ℝ≥0∞} + (hq1 : 1 < q) (σ s : ℝ) : + ∃ C : ℝ≥0∞, C ≠ ∞ ∧ ∀ g h : Lp ℂ p (volume : Measure V), + besselPotential V ℂ σ (g : 𝓢'(V, ℂ)) = h → + triebelLizorkinNorm s q g ≤ C * triebelLizorkinNorm (s - σ) q h := by + obtain ⟨C, hC, hCu⟩ := exists_triebelLizorkinNorm_le_of_fourierMultiplier_eq (V := V) hp1 hp hq1 + (hasSymbolGrowth_besselWeight (-σ)) (s - σ) + refine ⟨C, hC, fun g h hgh => ?_⟩ + have h' := hCu h g ((TemperedDistribution.besselPotential_neg_apply_eq_iff σ _ _).2 hgh).symm + rwa [sub_neg_eq_add, sub_add_cancel] at h' + +end Rd diff --git a/LeanPool/FunctionSpaces/Rd/FourierMultipliers/MihlinMultipliers.lean b/LeanPool/FunctionSpaces/Rd/FourierMultipliers/MihlinMultipliers.lean new file mode 100644 index 0000000000..3d64dd71cd --- /dev/null +++ b/LeanPool/FunctionSpaces/Rd/FourierMultipliers/MihlinMultipliers.lean @@ -0,0 +1,152 @@ +/- +Copyright (c) 2026 Mario Ullrich. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Mario Ullrich +-/ +module + +public import LeanPool.FunctionSpaces.Rd.BesselPotentials.BesselPotentialDistributions + +/- +Modified for Lean Pool: module names and imports adapted. +-/ + +/-! +# Mihlin's multiplier theorem for symbols of order `0` + +Let `V` have dimension `n ≥ 1` and `1 < p < ∞`. A symbol `m` of order `0` (`Rd.HasSymbolGrowth 0 m`, +Hörmander's class `S^0_{1,0}`) is a bounded Fourier multiplier on `L_p(V)`: for every `f ∈ L_p(V)` +the tempered distribution `m(D) f` is an `L_p` function `g` with `‖g‖_p ≤ C ‖f‖_p`, with an +existential constant (`Rd.exists_fourierMultiplier_eq_of_hasSymbolGrowth`). The symbols of order +`0` satisfy Mihlin's condition, so this is a case of Mihlin's theorem; TauCeti proves the theorem +for symbols satisfying Mihlin's condition with finitely many derivatives +(`TauCeti.exists_fourierMultiplierCLM_eq_and_norm_le_of_norm_iteratedFDeriv_le`). + +The proof uses `L_p = F^0_{p,2}`: `f` lies in `F^0_{p,2}` by the square function theorem, `m(D)` +maps `F^0_{p,2}` into itself (`Rd.exists_triebelLizorkinNormDistr_fourierMultiplier_le`), and +`F^0_{p,2} = H^{0,p} = L_p` (`Rd.exists_besselPotential_eq_of_memTriebelLizorkinDistr` with +`s = 0`). The multiplier is a bounded linear operator `Rd.symbolLp` on `L_p(V)`. +-/ + +@[expose] public section + +open MeasureTheory +open scoped ENNReal SchwartzMap +open TemperedDistribution (besselPotential) + +namespace Rd + +variable {V : Type*} [NormedAddCommGroup V] [InnerProductSpace ℝ V] [FiniteDimensional ℝ V] + [MeasurableSpace V] [BorelSpace V] [Nontrivial V] {p : ℝ≥0∞} [Fact (1 ≤ p)] {m : V → ℂ} + +/-- **Mihlin's multiplier theorem for symbols of order `0`**: in dimension `n ≥ 1`, for +`1 < p < ∞` and a symbol `m` of order `0` there is a finite constant `C` such that for every +`f ∈ L_p(V)` the tempered distribution `m(D) f` is an `L_p` function `g` with +`‖g‖_p ≤ C ‖f‖_p`; the constant is existential. By the square function theorem +`‖f‖_{F^0_{p,2}} ≤ Q_{V,p} ‖f‖_p` (`Rd.triebelLizorkinNorm_zero_two_le`), `m(D)` maps `F^0_{p,2}` +into itself (`Rd.exists_triebelLizorkinNormDistr_fourierMultiplier_le`), and every tempered +distribution in `F^0_{p,2}` is an `L_p` function +(`Rd.exists_besselPotential_eq_of_memTriebelLizorkinDistr` with `s = 0`, Mathlib's +`TemperedDistribution.besselPotential_zero`). -/ +theorem exists_fourierMultiplier_eq_of_hasSymbolGrowth (hp1 : 1 < p) (hp : p ≠ ∞) + (hm : HasSymbolGrowth 0 m) : + ∃ C : ℝ≥0∞, C ≠ ∞ ∧ ∀ f : Lp ℂ p (volume : Measure V), ∃ g : Lp ℂ p (volume : Measure V), + TemperedDistribution.fourierMultiplierCLM ℂ m (f : 𝓢'(V, ℂ)) = g ∧ ‖g‖ₑ ≤ C * ‖f‖ₑ := by + obtain ⟨C₁, hC₁, hm₁⟩ := exists_triebelLizorkinNormDistr_fourierMultiplier_le (p := p) hp1 hp + ENNReal.one_lt_two hm 0 + obtain ⟨C₂, hC₂, hb⟩ := exists_besselPotential_eq_of_memTriebelLizorkinDistr (V := V) hp1 hp 0 + refine ⟨C₂ * (C₁ * squareFunctionConst V p), ENNReal.mul_ne_top hC₂ + (ENNReal.mul_ne_top hC₁ (squareFunctionConst_ne_top hp1 hp)), fun f => ?_⟩ + have hf : triebelLizorkinNormDistr p 0 2 + (TemperedDistribution.fourierMultiplierCLM ℂ m (f : 𝓢'(V, ℂ))) ≤ + C₁ * squareFunctionConst V p * ‖f‖ₑ := by + have h := hm₁ (f : 𝓢'(V, ℂ)) + rw [sub_zero, triebelLizorkinNormDistr_toTemperedDistribution hp] at h + refine h.trans ?_ + rw [mul_assoc] + exact mul_le_mul_of_nonneg_left (triebelLizorkinNorm_zero_two_le hp1 hp f) (zero_le (a := C₁)) + obtain ⟨g, hg, hgn⟩ := hb _ (hf.trans_lt (ENNReal.mul_lt_top + (ENNReal.mul_lt_top hC₁.lt_top (squareFunctionConst_ne_top hp1 hp).lt_top) eNorm_lt_top)) + rw [TemperedDistribution.besselPotential_zero, ContinuousLinearMap.id_apply] at hg + refine ⟨g, hg, hgn.trans ?_⟩ + rw [mul_assoc C₂] + exact mul_le_mul_of_nonneg_left hf (zero_le (a := C₂)) + +/-- The **constant of Mihlin's theorem** for the symbol `m` of order `0`: a finite constant of +`Rd.exists_fourierMultiplier_eq_of_hasSymbolGrowth`, chosen once. -/ +noncomputable def symbolLpConst (hp1 : 1 < p) (hp : p ≠ ∞) (hm : HasSymbolGrowth 0 m) : ℝ≥0∞ := + (exists_fourierMultiplier_eq_of_hasSymbolGrowth (V := V) hp1 hp hm).choose + +/-- The constant `Rd.symbolLpConst hp1 hp hm` is finite. -/ +theorem symbolLpConst_ne_top (hp1 : 1 < p) (hp : p ≠ ∞) (hm : HasSymbolGrowth 0 m) : + symbolLpConst hp1 hp hm ≠ ∞ := + (exists_fourierMultiplier_eq_of_hasSymbolGrowth (V := V) hp1 hp hm).choose_spec.1 + +/-- For every `f ∈ L_p(V)`, `m(D) f` is an `L_p` function `g` with +`‖g‖_p ≤ Rd.symbolLpConst hp1 hp hm · ‖f‖_p`. -/ +theorem exists_fourierMultiplier_eq_symbolLpConst (hp1 : 1 < p) (hp : p ≠ ∞) + (hm : HasSymbolGrowth 0 m) (f : Lp ℂ p (volume : Measure V)) : + ∃ g : Lp ℂ p (volume : Measure V), + TemperedDistribution.fourierMultiplierCLM ℂ m (f : 𝓢'(V, ℂ)) = g ∧ + ‖g‖ₑ ≤ symbolLpConst hp1 hp hm * ‖f‖ₑ := + (exists_fourierMultiplier_eq_of_hasSymbolGrowth (V := V) hp1 hp hm).choose_spec.2 f + +/-- The **`L_p` function of `m(D) f`** for a symbol `m` of order `0`, `1 < p < ∞`, `n ≥ 1` and +`f ∈ L_p(V)`, chosen by `Rd.exists_fourierMultiplier_eq_symbolLpConst`. -/ +noncomputable def symbolLpFun (hp1 : 1 < p) (hp : p ≠ ∞) (hm : HasSymbolGrowth 0 m) + (f : Lp ℂ p (volume : Measure V)) : Lp ℂ p (volume : Measure V) := + (exists_fourierMultiplier_eq_symbolLpConst hp1 hp hm f).choose + +/-- The tempered distribution of `Rd.symbolLpFun hp1 hp hm f` is `m(D) f`, written with Mathlib's +embedding `MeasureTheory.Lp.toTemperedDistributionCLM` of `L_p` into `𝓢'`. -/ +theorem toTemperedDistributionCLM_symbolLpFun (hp1 : 1 < p) (hp : p ≠ ∞) + (hm : HasSymbolGrowth 0 m) (f : Lp ℂ p (volume : Measure V)) : + Lp.toTemperedDistributionCLM ℂ volume p (symbolLpFun hp1 hp hm f) = + TemperedDistribution.fourierMultiplierCLM ℂ m (Lp.toTemperedDistributionCLM ℂ volume p f) := + (exists_fourierMultiplier_eq_symbolLpConst hp1 hp hm f).choose_spec.1.symm + +/-- **The norm bound of `Rd.symbolLpFun`** in real norms: +`‖m(D) f‖_p ≤ (Rd.symbolLpConst hp1 hp hm) ‖f‖_p`. -/ +theorem norm_symbolLpFun_le (hp1 : 1 < p) (hp : p ≠ ∞) (hm : HasSymbolGrowth 0 m) + (f : Lp ℂ p (volume : Measure V)) : + ‖symbolLpFun hp1 hp hm f‖ ≤ (symbolLpConst hp1 hp hm).toReal * ‖f‖ := by + have h := ENNReal.toReal_mono (ENNReal.mul_ne_top (symbolLpConst_ne_top hp1 hp hm) eNorm_ne_top) + (exists_fourierMultiplier_eq_symbolLpConst hp1 hp hm f).choose_spec.2 + rwa [ENNReal.toReal_mul, toReal_eNorm, toReal_eNorm] at h + +/-- The **Fourier multiplier `m(D)` on `L_p(V)`** for a symbol `m` of order `0`, `1 < p < ∞`, +`n ≥ 1`: the `L_p` function of the tempered distribution `m(D) f` (`Rd.symbolLpFun`). It is +linear since `L_p` functions are determined by their tempered distributions +(`Rd.eq_of_toTemperedDistribution_eq`), and bounded with norm at most +`Rd.symbolLpConst hp1 hp hm` (Mathlib's `LinearMap.mkContinuous`). -/ +noncomputable def symbolLp (hp1 : 1 < p) (hp : p ≠ ∞) (hm : HasSymbolGrowth 0 m) : + Lp ℂ p (volume : Measure V) →L[ℂ] Lp ℂ p (volume : Measure V) := + LinearMap.mkContinuous + { toFun := symbolLpFun hp1 hp hm + map_add' := fun f g => eq_of_toTemperedDistribution_eq (by + change Lp.toTemperedDistributionCLM ℂ volume p _ = + Lp.toTemperedDistributionCLM ℂ volume p _ + rw [map_add, toTemperedDistributionCLM_symbolLpFun, toTemperedDistributionCLM_symbolLpFun, + toTemperedDistributionCLM_symbolLpFun, map_add, map_add]) + map_smul' := fun c f => eq_of_toTemperedDistribution_eq (by + change Lp.toTemperedDistributionCLM ℂ volume p _ = + Lp.toTemperedDistributionCLM ℂ volume p _ + rw [map_smul, toTemperedDistributionCLM_symbolLpFun, toTemperedDistributionCLM_symbolLpFun, + map_smul, map_smul, RingHom.id_apply]) } + (symbolLpConst hp1 hp hm).toReal (norm_symbolLpFun_le hp1 hp hm) + +/-- `Rd.symbolLp` is the Fourier multiplier `m(D)`: the tempered distribution of +`Rd.symbolLp hp1 hp hm f` is `m(D) f`. -/ +theorem toTemperedDistribution_symbolLp (hp1 : 1 < p) (hp : p ≠ ∞) (hm : HasSymbolGrowth 0 m) + (f : Lp ℂ p (volume : Measure V)) : + (symbolLp hp1 hp hm f : 𝓢'(V, ℂ)) = + TemperedDistribution.fourierMultiplierCLM ℂ m (f : 𝓢'(V, ℂ)) := + toTemperedDistributionCLM_symbolLpFun hp1 hp hm f + +/-- **The norm bound of `Rd.symbolLp`**: `‖m(D) f‖_p ≤ Rd.symbolLpConst hp1 hp hm · ‖f‖_p`. -/ +theorem enorm_symbolLp_le (hp1 : 1 < p) (hp : p ≠ ∞) (hm : HasSymbolGrowth 0 m) + (f : Lp ℂ p (volume : Measure V)) : + ‖symbolLp hp1 hp hm f‖ₑ ≤ symbolLpConst hp1 hp hm * ‖f‖ₑ := + (exists_fourierMultiplier_eq_symbolLpConst hp1 hp hm f).choose_spec.2 + +end Rd diff --git a/LeanPool/FunctionSpaces/Rd/FourierMultipliers/SymbolKernels.lean b/LeanPool/FunctionSpaces/Rd/FourierMultipliers/SymbolKernels.lean new file mode 100644 index 0000000000..d7f44d5f7f --- /dev/null +++ b/LeanPool/FunctionSpaces/Rd/FourierMultipliers/SymbolKernels.lean @@ -0,0 +1,540 @@ +/- +Copyright (c) 2026 Mario Ullrich. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Mario Ullrich +-/ +module + +public import LeanPool.FunctionSpaces.Rd.BesselPotentials.UniformSchwartzFamilies +public import TauCeti.Analysis.SpecialFunctions.JapaneseBracket.Deriv + +/- +Modified for Lean Pool: module names and imports adapted. +-/ + +/-! +# Symbols of order `σ` and their dilated kernel families + +A smooth function `m` on a real normed space has **symbol growth of order `σ`** +(`Rd.HasSymbolGrowth σ m`, Hörmander's class `S^σ_{1,0}`) if every derivative satisfies +`‖D^k m(ξ)‖ ≤ C_k (1 + ‖ξ‖²)^{(σ - k)/2}`: each derivative gains one power of the Japanese bracket +`⟨ξ⟩ = (1 + ‖ξ‖²)^{1/2}`. + +* **The class**: Schwartz functions have symbol growth of every order + (`Rd.hasSymbolGrowth_schwartz`), and symbols have temperate growth + (`Rd.HasSymbolGrowth.hasTemperateGrowth`), so they are Fourier multipliers of tempered + distributions. The orders increase (`Rd.HasSymbolGrowth.mono`) and add under products + (`Rd.HasSymbolGrowth.mul`). +* **Examples**: constants (order `0`), continuous linear maps (order `1`), the Bessel weight + `⟨ξ⟩^s` (order `s`, `Rd.hasSymbolGrowth_besselWeight`), `⟪ξ, v⟫` (order `1`) and `‖ξ‖²` + (order `2`). The Bessel weight is a symbol by the derivative bounds for powers of the Japanese + bracket (`TauCeti.exists_norm_iteratedFDeriv_one_add_norm_sq_rpow_le`), mirrored from TauCeti. +* **Rescaled symbols**: `ζ ↦ 2^{-jσ} m(2^j ζ)` (`Rd.scaledSymbol`) has derivatives bounded on + every annulus `{a ≤ ‖ζ‖ ≤ b}`, `a > 0`, uniformly in `j` + (`Rd.HasSymbolGrowth.exists_norm_iteratedFDeriv_scaledSymbol_le`). +* **Kernel families**: if `ω̂` vanishes outside such an annulus, the families + `j ↦ 2^{-jσ} m(2^j ·) ω̂` and their inverse Fourier transforms `K_j` are uniformly Schwartz + (`Rd.HasSymbolGrowth.exists_isUniformSchwartz_symbolKernelFamily`), and + `m(D) ω_{2^j} = 2^{jσ} (K_j)_{2^j}` with `ω = 𝓕⁻¹ ω̂` (`Rd.fourierMultiplierCLM_schwartzDilate`). + For a family `(ω_j)` that is constant from some `M` on, with `𝓕ω_M` vanishing outside such an + annulus, the kernels `K_j` of `𝓕ω_j` (`Rd.symbolBase`) are uniformly Schwartz + (`Rd.HasSymbolGrowth.exists_isUniformSchwartz_symbolBase`); for the synthesis kernels `ψ̃_j` + this gives `m(D) ψ̃_j = 2^{jσ} (G_j)_{2^j}` with a uniform family `(G_j)` + (`Rd.HasSymbolGrowth.exists_isUniformSchwartz_psiDualS`). +* **The maximal bound**: convolutions with the dilates `(G_j)_{2^j}` of a uniform family are + bounded by the Hardy–Littlewood maximal function, uniformly in `j`, with the finite constant + `C_{n,N} C_{A,0,N}` (`Rd.IsUniformSchwartz.enorm_conv_dilate_le_maximal`, + `Rd.decayMaximalConst_mul_familyDecayConst_ne_top`). +-/ + +@[expose] public section + +open MeasureTheory Module Set +open scoped ENNReal SchwartzMap FourierTransform + +/-! ### Derivatives of powers of the Japanese bracket -/ + +namespace Rd + +section Bracket + +variable {E : Type*} [NormedAddCommGroup E] [InnerProductSpace ℝ E] + +end Bracket + +/-! ### Symbols of order `σ` -/ + +section General + +variable {E F : Type*} [NormedAddCommGroup E] [NormedSpace ℝ E] [NormedAddCommGroup F] + [NormedSpace ℝ F] {σ τ : ℝ} {m m' : E → F} + +/-- A function `m` has **symbol growth of order `σ`**, or is a **symbol of order `σ`** +(Hörmander's class `S^σ_{1,0}`), if it is smooth and every derivative satisfies +`‖D^k m(ξ)‖ ≤ C_k (1 + ‖ξ‖²)^{(σ - k)/2}`: each derivative gains one power of the Japanese +bracket `⟨ξ⟩ = (1 + ‖ξ‖²)^{1/2}`. It strengthens Mathlib's `Function.HasTemperateGrowth` +(`Rd.HasSymbolGrowth.hasTemperateGrowth`); for `σ = 0` it is Mihlin's condition with every +derivative and the inhomogeneous weight. -/ +def HasSymbolGrowth (σ : ℝ) (m : E → F) : Prop := + ContDiff ℝ ((⊤ : ℕ∞) : WithTop ℕ∞) m ∧ + ∀ k : ℕ, ∃ C : ℝ, ∀ ξ, ‖iteratedFDeriv ℝ k m ξ‖ ≤ C * (1 + ‖ξ‖ ^ 2) ^ ((σ - k) / 2) + +/-- A symbol is smooth. -/ +theorem HasSymbolGrowth.contDiff (h : HasSymbolGrowth σ m) : + ContDiff ℝ ((⊤ : ℕ∞) : WithTop ℕ∞) m := + h.1 + +/-- The constants in the bounds of a symbol can be taken nonnegative. -/ +theorem HasSymbolGrowth.exists_bound (h : HasSymbolGrowth σ m) (k : ℕ) : + ∃ C : ℝ, 0 ≤ C ∧ ∀ ξ, ‖iteratedFDeriv ℝ k m ξ‖ ≤ C * (1 + ‖ξ‖ ^ 2) ^ ((σ - k) / 2) := by + obtain ⟨C, hC⟩ := h.2 k + exact ⟨max C 0, le_max_right _ _, fun ξ => (hC ξ).trans + (mul_le_mul_of_nonneg_right (le_max_left _ _) (by positivity))⟩ + +omit [NormedSpace ℝ E] in +/-- **The bracket below a polynomial weight**: `(1 + ‖ξ‖²)^{a/2} ≤ (1 + ‖ξ‖)^N` for `a ≤ N`, since +`1 + ‖ξ‖² ≥ 1` and `√(1 + ‖ξ‖²) ≤ 1 + ‖ξ‖` (Mathlib's `sqrt_one_add_norm_sq_le`). -/ +theorem one_add_norm_sq_rpow_le_one_add_norm_pow {a : ℝ} {N : ℕ} (h : a ≤ N) (ξ : E) : + (1 + ‖ξ‖ ^ 2) ^ (a / 2) ≤ (1 + ‖ξ‖) ^ N := by + have h1 : 1 ≤ 1 + ‖ξ‖ ^ 2 := le_add_of_nonneg_right (by positivity) + calc (1 + ‖ξ‖ ^ 2) ^ (a / 2) ≤ (1 + ‖ξ‖ ^ 2) ^ ((N : ℝ) / 2) := + Real.rpow_le_rpow_of_exponent_le h1 (by linarith) + _ = Real.sqrt (1 + ‖ξ‖ ^ 2) ^ N := by + rw [Real.sqrt_eq_rpow, ← Real.rpow_mul_natCast (by positivity)] + congr 1 + ring + _ ≤ (1 + ‖ξ‖) ^ N := pow_le_pow_left₀ (Real.sqrt_nonneg _) (sqrt_one_add_norm_sq_le ξ) N + +/-- **Symbols have temperate growth**: a symbol of any order is smooth with polynomially bounded +derivatives, `(1 + ‖ξ‖²)^{(σ-k)/2} ≤ (1 + ‖ξ‖)^N` for `N ≥ σ - k` +(`Rd.one_add_norm_sq_rpow_le_one_add_norm_pow`). Hence symbols are Fourier multipliers of +Schwartz functions and tempered distributions. -/ +theorem HasSymbolGrowth.hasTemperateGrowth (h : HasSymbolGrowth σ m) : m.HasTemperateGrowth := by + refine ⟨h.contDiff, fun k => ?_⟩ + obtain ⟨C, hC0, hC⟩ := h.exists_bound k + exact ⟨⌈σ - k⌉₊, C, fun ξ => (hC ξ).trans (mul_le_mul_of_nonneg_left + (one_add_norm_sq_rpow_le_one_add_norm_pow (Nat.le_ceil _) ξ) hC0)⟩ + +/-- **Schwartz functions are symbols of every order**: for a Schwartz function `φ` and every +real `σ`, `‖D^k φ(ξ)‖ ≤ C (1 + ‖ξ‖²)^{(σ-k)/2}`, since `(1 + ‖ξ‖)^N ‖D^k φ(ξ)‖` is bounded by +Schwartz seminorms (Mathlib's `SchwartzMap.one_add_le_sup_seminorm_apply`) and +`(1 + ‖ξ‖²)^{(k-σ)/2} ≤ (1 + ‖ξ‖)^N` for `N ≥ k - σ`. -/ +theorem hasSymbolGrowth_schwartz (φ : 𝓢(E, F)) (σ : ℝ) : HasSymbolGrowth σ φ := by + refine ⟨φ.smooth ⊤, fun k => ?_⟩ + set N := ⌈(k : ℝ) - σ⌉₊ + refine ⟨2 ^ N * (Finset.Iic (N, k)).sup (fun m => SchwartzMap.seminorm ℝ m.1 m.2) φ, + fun ξ => ?_⟩ + have hw : 0 < 1 + ‖ξ‖ ^ 2 := by positivity + have h1 := one_add_norm_sq_rpow_le_one_add_norm_pow (Nat.le_ceil ((k : ℝ) - σ)) ξ + have h2 := SchwartzMap.one_add_le_sup_seminorm_apply (𝕜 := ℝ) (m := (N, k)) le_rfl le_rfl φ ξ + have hinv : (1 + ‖ξ‖ ^ 2) ^ ((σ - k) / 2) * (1 + ‖ξ‖ ^ 2) ^ (((k : ℝ) - σ) / 2) = 1 := by + rw [← Real.rpow_add hw, show (σ - k) / 2 + ((k : ℝ) - σ) / 2 = 0 by ring, Real.rpow_zero] + calc ‖iteratedFDeriv ℝ k φ ξ‖ + = (1 + ‖ξ‖ ^ 2) ^ (((k : ℝ) - σ) / 2) * ‖iteratedFDeriv ℝ k φ ξ‖ * + (1 + ‖ξ‖ ^ 2) ^ ((σ - k) / 2) := by + rw [mul_comm _ ‖_‖, mul_assoc, mul_comm (_ ^ _), hinv, mul_one] + _ ≤ (1 + ‖ξ‖) ^ N * ‖iteratedFDeriv ℝ k φ ξ‖ * (1 + ‖ξ‖ ^ 2) ^ ((σ - k) / 2) := by + gcongr + _ ≤ _ := by gcongr + +/-- **The order of a symbol can be raised**: a symbol of order `σ` is a symbol of every order +`τ ≥ σ`, since `1 + ‖ξ‖² ≥ 1`. -/ +theorem HasSymbolGrowth.mono (h : HasSymbolGrowth σ m) (hστ : σ ≤ τ) : HasSymbolGrowth τ m := by + refine ⟨h.contDiff, fun k => ?_⟩ + obtain ⟨C, hC0, hC⟩ := h.exists_bound k + refine ⟨C, fun ξ => (hC ξ).trans (mul_le_mul_of_nonneg_left ?_ hC0)⟩ + exact Real.rpow_le_rpow_of_exponent_le (le_add_of_nonneg_right (by positivity)) (by linarith) + +/-- **Sums of symbols**: the sum of two symbols of order `σ` is a symbol of order `σ`. -/ +theorem HasSymbolGrowth.add (h : HasSymbolGrowth σ m) (h' : HasSymbolGrowth σ m') : + HasSymbolGrowth σ (m + m') := by + refine ⟨h.contDiff.add h'.contDiff, fun k => ?_⟩ + obtain ⟨C, hC⟩ := h.2 k + obtain ⟨C', hC'⟩ := h'.2 k + refine ⟨C + C', fun ξ => ?_⟩ + rw [iteratedFDeriv_add_apply (h.contDiff.contDiffAt.of_le (by exact_mod_cast le_top)) + (h'.contDiff.contDiffAt.of_le (by exact_mod_cast le_top)), add_mul] + exact (norm_add_le _ _).trans (add_le_add (hC ξ) (hC' ξ)) + +/-- **Negatives of symbols**: the negative of a symbol of order `σ` is a symbol of order `σ`. -/ +theorem HasSymbolGrowth.neg (h : HasSymbolGrowth σ m) : HasSymbolGrowth σ (-m) := by + refine ⟨h.contDiff.neg, fun k => ?_⟩ + obtain ⟨C, hC⟩ := h.2 k + refine ⟨C, fun ξ => ?_⟩ + rw [iteratedFDeriv_neg_apply, norm_neg] + exact hC ξ + +/-- **Differences of symbols**: the difference of two symbols of order `σ` is a symbol of order +`σ`. -/ +theorem HasSymbolGrowth.sub (h : HasSymbolGrowth σ m) (h' : HasSymbolGrowth σ m') : + HasSymbolGrowth σ (m - m') := by + rw [sub_eq_add_neg] + exact h.add h'.neg + +/-- **Constants are symbols of order `0`**: their derivatives of positive order vanish. -/ +theorem hasSymbolGrowth_const (c : F) : HasSymbolGrowth 0 (fun _ : E => c) := by + refine ⟨contDiff_const, fun k => ⟨‖c‖, fun ξ => ?_⟩⟩ + rcases k with _ | k + · rw [norm_iteratedFDeriv_zero, Nat.cast_zero, sub_zero, zero_div, Real.rpow_zero, mul_one] + · rw [iteratedFDeriv_const_of_ne (Nat.succ_ne_zero k), Pi.zero_apply, norm_zero] + positivity + +/-- **Continuous linear maps are symbols of order `1`** +(`ContinuousLinearMap.norm_iteratedFDeriv_le_one_add_norm_sq_rpow`). -/ +theorem hasSymbolGrowth_continuousLinearMap (L : E →L[ℝ] F) : HasSymbolGrowth 1 L := + ⟨L.contDiff, fun k => ⟨‖L‖, L.norm_iteratedFDeriv_le_one_add_norm_sq_rpow k⟩⟩ + +/-- **Products of symbols**: if `m` is a symbol of order `σ` and `m'` one of order `τ`, with +values in a normed algebra, then `m m'` is a symbol of order `σ + τ`. In the Leibniz rule +(Mathlib's `norm_iteratedFDeriv_mul_le`) the weights of `D^i m` and `D^{k-i} m'` multiply to +`(1 + ‖ξ‖²)^{(σ + τ - k)/2}`. -/ +theorem HasSymbolGrowth.mul {A : Type*} [NormedRing A] [NormedAlgebra ℝ A] {m m' : E → A} + (h : HasSymbolGrowth σ m) (h' : HasSymbolGrowth τ m') : HasSymbolGrowth (σ + τ) (m * m') := by + refine ⟨h.contDiff.mul h'.contDiff, fun k => ?_⟩ + choose C hC0 hC using h.exists_bound + choose C' hC'0 hC' using h'.exists_bound + refine ⟨∑ i ∈ Finset.range (k + 1), (k.choose i : ℝ) * C i * C' (k - i), fun ξ => ?_⟩ + have hw : 0 < 1 + ‖ξ‖ ^ 2 := by positivity + refine (norm_iteratedFDeriv_mul_le h.contDiff h'.contDiff ξ + (by exact_mod_cast le_top)).trans ?_ + rw [Finset.sum_mul] + refine Finset.sum_le_sum fun i hi => ?_ + have hik : i ≤ k := Nat.lt_succ_iff.mp (Finset.mem_range.mp hi) + have hexp : (1 + ‖ξ‖ ^ 2) ^ ((σ - i) / 2) * (1 + ‖ξ‖ ^ 2) ^ ((τ - (k - i : ℕ)) / 2) = + (1 + ‖ξ‖ ^ 2) ^ ((σ + τ - k) / 2) := by + rw [← Real.rpow_add hw, Nat.cast_sub hik] + ring_nf + calc (k.choose i : ℝ) * ‖iteratedFDeriv ℝ i m ξ‖ * ‖iteratedFDeriv ℝ (k - i) m' ξ‖ + ≤ k.choose i * (C i * (1 + ‖ξ‖ ^ 2) ^ ((σ - i) / 2)) * + (C' (k - i) * (1 + ‖ξ‖ ^ 2) ^ ((τ - (k - i : ℕ)) / 2)) := by + exact mul_le_mul (mul_le_mul_of_nonneg_left (hC i ξ) (Nat.cast_nonneg _)) (hC' (k - i) ξ) + (norm_nonneg _) (mul_nonneg (Nat.cast_nonneg _) (mul_nonneg (hC0 i) (by positivity))) + _ = k.choose i * C i * C' (k - i) * (1 + ‖ξ‖ ^ 2) ^ ((σ + τ - k) / 2) := by + rw [← hexp] + ring + +/-- **Constant multiples of symbols**: `c m` is a symbol of order `σ` with `m` +(`Rd.HasSymbolGrowth.mul` with the constant symbol of order `0`). -/ +theorem HasSymbolGrowth.const_mul {A : Type*} [NormedRing A] [NormedAlgebra ℝ A] {m : E → A} + (h : HasSymbolGrowth σ m) (c : A) : HasSymbolGrowth σ (fun ξ => c * m ξ) := by + have h' := (hasSymbolGrowth_const (E := E) c).mul h + rwa [zero_add] at h' + +/-- **Real symbols as complex symbols**: if `m` is a real symbol of order `σ`, then so is +`ξ ↦ (m(ξ) : ℂ)`, since the embedding `ℝ → ℂ` is a linear isometry (Mathlib's +`LinearIsometry.norm_iteratedFDeriv_comp_left`). -/ +theorem HasSymbolGrowth.ofReal {m : E → ℝ} (h : HasSymbolGrowth σ m) : + HasSymbolGrowth σ (fun ξ => (m ξ : ℂ)) := by + refine ⟨Complex.ofRealCLM.contDiff.comp h.contDiff, fun k => ?_⟩ + obtain ⟨C, hC⟩ := h.2 k + refine ⟨C, fun ξ => ?_⟩ + have he := Complex.ofRealLI.norm_iteratedFDeriv_comp_left h.contDiff.contDiffAt + (x := ξ) (i := k) (by exact_mod_cast le_top) + exact he.trans_le (hC ξ) + +end General + +section InnerProduct + +variable {V : Type*} [NormedAddCommGroup V] [InnerProductSpace ℝ V] + +/-- **Powers of the Japanese bracket are symbols**: `ξ ↦ (1 + ‖ξ‖²)^r` is a symbol of order +`2r` (`TauCeti.exists_norm_iteratedFDeriv_one_add_norm_sq_rpow_le`). -/ +theorem hasSymbolGrowth_one_add_norm_sq_rpow (r : ℝ) : + HasSymbolGrowth (2 * r) (fun ξ : V => (1 + ‖ξ‖ ^ 2) ^ r) := by + refine ⟨(contDiff_const.add (contDiff_norm_sq ℝ)).rpow_const_of_ne fun ξ => by positivity, + fun k => ?_⟩ + obtain ⟨C, hC⟩ := TauCeti.exists_norm_iteratedFDeriv_one_add_norm_sq_rpow_le (E := V) r k + refine ⟨C, fun ξ => (hC ξ).trans_eq ?_⟩ + congr 2 + ring + +/-- **The Bessel weight is a symbol**: `⟨ξ⟩^s = (1 + ‖ξ‖²)^{s/2}` (`Rd.besselWeight`), as a +complex function, is a symbol of order `s` for every real `s` +(`Rd.hasSymbolGrowth_one_add_norm_sq_rpow`). -/ +theorem hasSymbolGrowth_besselWeight (s : ℝ) : + HasSymbolGrowth s (fun ξ : V => (besselWeight s ξ : ℂ)) := by + have h := hasSymbolGrowth_one_add_norm_sq_rpow (V := V) (s / 2) + rw [show 2 * (s / 2) = s by ring] at h + exact h.ofReal + +/-- **Linear symbols**: `ξ ↦ ⟪ξ, v⟫`, as a complex function, is a symbol of order `1`; it is the +symbol of the derivative in the direction `v` up to the factor `2πi` (Mathlib's +`TemperedDistribution.lineDeriv_eq_fourierMultiplierCLM`). -/ +theorem hasSymbolGrowth_inner (v : V) : + HasSymbolGrowth 1 (fun ξ : V => ((inner ℝ ξ v : ℝ) : ℂ)) := by + have h := hasSymbolGrowth_continuousLinearMap (innerSL ℝ v) + have he : (fun ξ : V => inner ℝ ξ v) = ⇑(innerSL ℝ v) := by + funext ξ + rw [innerSL_apply_apply, real_inner_comm] + rw [← he] at h + exact h.ofReal + +/-- **The symbol of the Laplacian**: `ξ ↦ ‖ξ‖²`, as a complex function, is a symbol of order +`2`, since `‖ξ‖² = ⟨ξ⟩^2 - 1` (`Rd.hasSymbolGrowth_besselWeight`, Mathlib's +`TemperedDistribution.laplacian_eq_fourierMultiplierCLM`). -/ +theorem hasSymbolGrowth_norm_sq : HasSymbolGrowth 2 (fun ξ : V => ((‖ξ‖ ^ 2 : ℝ) : ℂ)) := by + have h := (hasSymbolGrowth_besselWeight (V := V) 2).sub + ((hasSymbolGrowth_const (E := V) (1 : ℂ)).mono zero_le_two) + convert h using 1 + funext ξ + rw [Pi.sub_apply, besselWeight, div_self two_ne_zero, Real.rpow_one] + push_cast + ring + +end InnerProduct + +/-! ### Rescaled symbols -/ + +section Scaled + +variable {V : Type*} [NormedAddCommGroup V] [InnerProductSpace ℝ V] [FiniteDimensional ℝ V] + [MeasurableSpace V] [BorelSpace V] {σ : ℝ} {m : V → ℂ} + +omit [FiniteDimensional ℝ V] [MeasurableSpace V] [BorelSpace V] in +/-- The **rescaled symbol** `ζ ↦ 2^{-jσ} m(2^j ζ)` of `m` at the dyadic level `j`. For a symbol +of order `σ` its derivatives are bounded on annuli uniformly in `j` +(`Rd.HasSymbolGrowth.exists_norm_iteratedFDeriv_scaledSymbol_le`). -/ +noncomputable def scaledSymbol (m : V → ℂ) (σ : ℝ) (j : ℕ) (ζ : V) : ℂ := + ((((2 : ℝ) ^ j) ^ (-σ) : ℝ) : ℂ) * m (((2 : ℝ) ^ j) • ζ) + +omit [FiniteDimensional ℝ V] [MeasurableSpace V] [BorelSpace V] in +/-- With `m`, every rescaled symbol has temperate growth: it is a constant times `m` composed +with the linear map `ζ ↦ 2^j ζ`. -/ +theorem hasTemperateGrowth_scaledSymbol (hm : m.HasTemperateGrowth) (σ : ℝ) (j : ℕ) : + (scaledSymbol m σ j).HasTemperateGrowth := by + have h := (Function.HasTemperateGrowth.const ((((2 : ℝ) ^ j) ^ (-σ) : ℝ) : ℂ)).mul + (hm.comp (((2 : ℝ) ^ j) • ContinuousLinearMap.id ℝ V).hasTemperateGrowth) + convert h using 1 + funext ζ + rfl + +omit [FiniteDimensional ℝ V] [MeasurableSpace V] [BorelSpace V] in +/-- **Derivatives of a rescaled symbol**: +`D^k (2^{-jσ} m(2^j ·))(ζ) = 2^{-jσ} 2^{jk} D^k m(2^j ζ)` (Mathlib's +`iteratedFDeriv_comp_const_smul` and `iteratedFDeriv_const_smul_apply'`). -/ +theorem iteratedFDeriv_scaledSymbol (hm : ContDiff ℝ ((⊤ : ℕ∞) : WithTop ℕ∞) m) (σ : ℝ) + (j k : ℕ) (ζ : V) : + iteratedFDeriv ℝ k (scaledSymbol m σ j) ζ = + ((((2 : ℝ) ^ j) ^ (-σ) : ℝ) : ℂ) • + (((2 : ℝ) ^ j) ^ k • iteratedFDeriv ℝ k m (((2 : ℝ) ^ j) • ζ)) := by + have hk : ContDiff ℝ k m := hm.of_le (by exact_mod_cast le_top) + have hs : scaledSymbol m σ j = + fun ζ => ((((2 : ℝ) ^ j) ^ (-σ) : ℝ) : ℂ) • m (((2 : ℝ) ^ j) • ζ) := rfl + rw [hs, iteratedFDeriv_const_smul_apply' (f := fun z => m (((2 : ℝ) ^ j) • z)) + ((hk.comp (contDiff_const_smul _)).contDiffAt), iteratedFDeriv_comp_const_smul _ hk] + +/-- **The dyadic weights of a rescaled symbol**: for `c > 0` and `x ≥ 0`, +`c^{-σ} c^k (1 + (c x)²)^{(σ-k)/2} = (c^{-2} + x²)^{(σ-k)/2}`, since +`c^{-2} + x² = c^{-2} (1 + (c x)²)` and `(c^{-2})^{(σ-k)/2} = c^{k-σ}`. -/ +theorem rpow_neg_mul_pow_mul_one_add_sq_rpow {c : ℝ} (hc : 0 < c) (σ : ℝ) (k : ℕ) (x : ℝ) : + c ^ (-σ) * c ^ k * (1 + (c * x) ^ 2) ^ ((σ - k) / 2) = (c⁻¹ ^ 2 + x ^ 2) ^ ((σ - k) / 2) := by + have hY : 0 ≤ 1 + (c * x) ^ 2 := by positivity + have hbase : c⁻¹ ^ 2 + x ^ 2 = c⁻¹ ^ 2 * (1 + (c * x) ^ 2) := by + field_simp + have hpow : (c⁻¹ ^ 2) ^ ((σ - k) / 2) = c ^ (-σ) * c ^ k := by + rw [← Real.rpow_natCast c k, ← Real.rpow_add hc, inv_pow, Real.inv_rpow (sq_nonneg c), + ← Real.rpow_natCast c 2, ← Real.rpow_mul hc.le, ← Real.rpow_neg hc.le] + congr 1 + push_cast + ring + rw [hbase, Real.mul_rpow (sq_nonneg _) hY, hpow] + +omit [FiniteDimensional ℝ V] [MeasurableSpace V] [BorelSpace V] in +/-- **Bounds of a rescaled symbol**: if `‖D^k m(ξ)‖ ≤ C (1 + ‖ξ‖²)^{(σ-k)/2}`, then +`‖D^k (2^{-jσ} m(2^j ·))(ζ)‖ ≤ C (2^{-2j} + ‖ζ‖²)^{(σ-k)/2}` +(`Rd.iteratedFDeriv_scaledSymbol`, `Rd.rpow_neg_mul_pow_mul_one_add_sq_rpow`). -/ +theorem norm_iteratedFDeriv_scaledSymbol_le (hm : ContDiff ℝ ((⊤ : ℕ∞) : WithTop ℕ∞) m) {k : ℕ} + {C : ℝ} + (hC : ∀ ξ, ‖iteratedFDeriv ℝ k m ξ‖ ≤ C * (1 + ‖ξ‖ ^ 2) ^ ((σ - k) / 2)) (j : ℕ) (ζ : V) : + ‖iteratedFDeriv ℝ k (scaledSymbol m σ j) ζ‖ ≤ + C * (((2 : ℝ) ^ j)⁻¹ ^ 2 + ‖ζ‖ ^ 2) ^ ((σ - k) / 2) := by + have hc : (0 : ℝ) < 2 ^ j := by positivity + rw [iteratedFDeriv_scaledSymbol hm, norm_smul, norm_smul, Complex.norm_real, norm_pow, + Real.norm_of_nonneg (Real.rpow_nonneg hc.le _), Real.norm_of_nonneg hc.le, + ← rpow_neg_mul_pow_mul_one_add_sq_rpow hc σ k ‖ζ‖] + have h := hC (((2 : ℝ) ^ j) • ζ) + rw [norm_smul, Real.norm_of_nonneg hc.le] at h + calc ((2 : ℝ) ^ j) ^ (-σ) * (((2 : ℝ) ^ j) ^ k * ‖iteratedFDeriv ℝ k m (((2 : ℝ) ^ j) • ζ)‖) + ≤ ((2 : ℝ) ^ j) ^ (-σ) * (((2 : ℝ) ^ j) ^ k * + (C * (1 + (2 ^ j * ‖ζ‖) ^ 2) ^ ((σ - k) / 2))) := by + gcongr + _ = _ := by ring + +omit [FiniteDimensional ℝ V] [MeasurableSpace V] [BorelSpace V] in +/-- **Rescaled symbols on an annulus**: for a symbol `m` of order `σ`, `0 < a` and `b`, every +order `k` has a constant `C ≥ 0` with `‖D^k (2^{-jσ} m(2^j ·))(ζ)‖ ≤ C` for all levels `j` and all +`ζ` with `a ≤ ‖ζ‖ ≤ b`. The weight `(2^{-2j} + ‖ζ‖²)^{(σ-k)/2}` of +`Rd.norm_iteratedFDeriv_scaledSymbol_le` is at most `max((a²)^{(σ-k)/2}, (1 + b²)^{(σ-k)/2})` +(`Rd.norm_besselSymbol_le`). -/ +theorem HasSymbolGrowth.exists_norm_iteratedFDeriv_scaledSymbol_le (hm : HasSymbolGrowth σ m) + {a : ℝ} (ha : 0 < a) (b : ℝ) (k : ℕ) : + ∃ C : ℝ, 0 ≤ C ∧ ∀ j : ℕ, ∀ ζ : V, a ≤ ‖ζ‖ → ‖ζ‖ ≤ b → + ‖iteratedFDeriv ℝ k (scaledSymbol m σ j) ζ‖ ≤ C := by + obtain ⟨C, hC0, hC⟩ := hm.exists_bound k + refine ⟨C * besselSymbolBound a b (σ - k), mul_nonneg hC0 (besselSymbolBound_nonneg _ _ _), + fun j ζ hζa hζb => (norm_iteratedFDeriv_scaledSymbol_le hm.contDiff hC j ζ).trans ?_⟩ + have hε : ((2 : ℝ) ^ j)⁻¹ ^ 2 ∈ Icc (0 : ℝ) 1 := + ⟨by positivity, pow_le_one₀ (by positivity) (inv_le_one_of_one_le₀ (one_le_pow₀ one_le_two))⟩ + have h := norm_besselSymbol_le (σ := σ - k) ha hε hζa hζb + rw [besselSymbol, Complex.norm_real, Real.norm_of_nonneg (Real.rpow_nonneg (by positivity) _)] + at h + exact mul_le_mul_of_nonneg_left h hC0 + +/-! ### The symbol and kernel families -/ + +/-- The **symbol family** of a Schwartz function `ω̂`: `j ↦ (ζ ↦ 2^{-jσ} m(2^j ζ) ω̂(ζ))`, a +Schwartz function when `m` has temperate growth (Mathlib's `SchwartzMap.smulLeftCLM`). -/ +noncomputable def symbolFamily (m : V → ℂ) (σ : ℝ) (ωhat : 𝓢(V, ℂ)) (j : ℕ) : 𝓢(V, ℂ) := + SchwartzMap.smulLeftCLM ℂ (scaledSymbol m σ j) ωhat + +omit [FiniteDimensional ℝ V] [MeasurableSpace V] [BorelSpace V] in +/-- The symbol family is `ζ ↦ 2^{-jσ} m(2^j ζ) ω̂(ζ)`. -/ +theorem coe_symbolFamily (hm : m.HasTemperateGrowth) (σ : ℝ) (ωhat : 𝓢(V, ℂ)) (j : ℕ) : + (symbolFamily m σ ωhat j : V → ℂ) = fun ζ => scaledSymbol m σ j ζ * ωhat ζ := by + rw [symbolFamily, SchwartzMap.smulLeftCLM_apply (hasTemperateGrowth_scaledSymbol hm σ j)] + rfl + +omit [FiniteDimensional ℝ V] [MeasurableSpace V] [BorelSpace V] in +/-- **The symbol families are uniformly Schwartz**: if `m` is a symbol of order `σ` and `ω̂` +vanishes outside the annulus `{a ≤ ‖ζ‖ ≤ b}` with `a > 0`, then +`j ↦ 2^{-jσ} m(2^j ·) ω̂` is uniformly Schwartz. On the annulus, `‖ζ‖^k ≤ |b|^k` and the Leibniz +bound (`Rd.norm_iteratedFDeriv_mul_schwartz_le`) combines the bounds of the rescaled symbols +(`Rd.HasSymbolGrowth.exists_norm_iteratedFDeriv_scaledSymbol_le`) with the seminorms of `ω̂`; +outside the support of `ω̂` all derivatives vanish. The bounds are existential. -/ +theorem HasSymbolGrowth.exists_isUniformSchwartz_symbolFamily (hm : HasSymbolGrowth σ m) + {ωhat : 𝓢(V, ℂ)} {a b : ℝ} (ha : 0 < a) (hω : ∀ ζ, ωhat ζ ≠ 0 → a ≤ ‖ζ‖ ∧ ‖ζ‖ ≤ b) : + ∃ A : ℕ → ℕ → ℝ, IsUniformSchwartz (symbolFamily m σ ωhat) A := by + choose C hC0 hC using fun i => hm.exists_norm_iteratedFDeriv_scaledSymbol_le ha b i + refine ⟨fun k l => |b| ^ k * ∑ i ∈ Finset.range (l + 1), + (l.choose i : ℝ) * C i * SchwartzMap.seminorm ℝ 0 (l - i) ωhat, fun j k l => ?_⟩ + have hsum : 0 ≤ ∑ i ∈ Finset.range (l + 1), + (l.choose i : ℝ) * C i * SchwartzMap.seminorm ℝ 0 (l - i) ωhat := + Finset.sum_nonneg fun i _ => mul_nonneg (mul_nonneg (Nat.cast_nonneg _) (hC0 i)) + (apply_nonneg _ _) + have hcd : ContDiff ℝ ((⊤ : ℕ∞) : WithTop ℕ∞) (scaledSymbol m σ j) := + (hasTemperateGrowth_scaledSymbol hm.hasTemperateGrowth σ j).1 + refine SchwartzMap.seminorm_le_bound ℝ k l _ (mul_nonneg (by positivity) hsum) fun x => ?_ + rw [coe_symbolFamily hm.hasTemperateGrowth] + by_cases hx : x ∈ tsupport ωhat + · obtain ⟨hxa, hxb⟩ := mem_annulus_of_mem_tsupport hω hx + exact mul_le_mul (pow_le_pow_left₀ (norm_nonneg x) (hxb.trans (le_abs_self b)) k) + (norm_iteratedFDeriv_mul_schwartz_le hcd ωhat fun i _ => hC i j x hxa hxb) (norm_nonneg _) + (by positivity) + · have hx' : x ∉ tsupport fun y => scaledSymbol m σ j y * ωhat y := + fun h => hx (tsupport_mul_subset_right h) + rw [Function.notMem_support.1 fun h => hx' (support_iteratedFDeriv_subset l h), norm_zero, + mul_zero] + exact mul_nonneg (by positivity) hsum + +/-- The **symbol kernel family** `K_j = 𝓕⁻¹[2^{-jσ} m(2^j ·) ω̂]` of a Schwartz function `ω̂`. -/ +noncomputable def symbolKernelFamily (m : V → ℂ) (σ : ℝ) (ωhat : 𝓢(V, ℂ)) (j : ℕ) : 𝓢(V, ℂ) := + 𝓕⁻ (symbolFamily m σ ωhat j) + +/-- **The symbol kernels are uniformly Schwartz** when `m` is a symbol of order `σ` and `ω̂` +vanishes outside an annulus `{a ≤ ‖ζ‖ ≤ b}` with `a > 0` +(`Rd.HasSymbolGrowth.exists_isUniformSchwartz_symbolFamily`, +`Rd.exists_isUniformSchwartz_fourierInv`); the bounds are existential. -/ +theorem HasSymbolGrowth.exists_isUniformSchwartz_symbolKernelFamily (hm : HasSymbolGrowth σ m) + {ωhat : 𝓢(V, ℂ)} {a b : ℝ} (ha : 0 < a) (hω : ∀ ζ, ωhat ζ ≠ 0 → a ≤ ‖ζ‖ ∧ ‖ζ‖ ≤ b) : + ∃ A : ℕ → ℕ → ℝ, IsUniformSchwartz (symbolKernelFamily m σ ωhat) A := by + obtain ⟨A, hA⟩ := hm.exists_isUniformSchwartz_symbolFamily ha hω + exact exists_isUniformSchwartz_fourierInv hA + +/-- `𝓕K_j(ζ) = 2^{-jσ} m(2^j ζ) ω̂(ζ)` for the symbol kernels. -/ +theorem fourier_symbolKernelFamily (hm : m.HasTemperateGrowth) (σ : ℝ) (ωhat : 𝓢(V, ℂ)) + (j : ℕ) (ζ : V) : + 𝓕 (symbolKernelFamily m σ ωhat j : V → ℂ) ζ = scaledSymbol m σ j ζ * ωhat ζ := by + rw [← SchwartzMap.fourier_coe, symbolKernelFamily, FourierInvPair.fourier_fourierInv_eq, + coe_symbolFamily hm] + +/-- **A Fourier multiplier of a dilate**: for a function `m` of temperate growth, a real `σ` and +a Schwartz function `ω`, `m(D) ω_{2^j} = 2^{jσ} (K_j)_{2^j}` with the symbol kernels `K_j` of +`ω̂ = 𝓕ω`. Both sides have the Fourier transform `m(ξ) ω̂(2^{-j} ξ)`, since +`2^{jσ} 2^{-jσ} m(2^j 2^{-j} ξ) = m(ξ)`. -/ +theorem fourierMultiplierCLM_schwartzDilate (hm : m.HasTemperateGrowth) (σ : ℝ) + (ω : 𝓢(V, ℂ)) (j : ℕ) : + SchwartzMap.fourierMultiplierCLM ℂ m (schwartzDilate (2 ^ j) (pow_ne_zero j two_ne_zero) ω) = + ((((2 : ℝ) ^ j) ^ σ : ℝ) : ℂ) • + schwartzDilate (2 ^ j) (pow_ne_zero j two_ne_zero) (symbolKernelFamily m σ (𝓕 ω) j) := by + have hc : (0 : ℝ) < 2 ^ j := by positivity + apply (FourierTransform.fourierCLE ℂ 𝓢(V, ℂ)).injective + simp only [FourierTransform.fourierCLE_apply, FourierTransform.fourier_smul] + ext ξ + rw [fourier_fourierMultiplierCLM_apply hm, smul_apply, SchwartzMap.fourier_coe, + SchwartzMap.fourier_coe, coe_schwartzDilate, coe_schwartzDilate, fourier_dilate _ hc, + fourier_dilate _ hc, fourier_symbolKernelFamily hm, ← SchwartzMap.fourier_coe, smul_eq_mul, + scaledSymbol, smul_inv_smul₀ hc.ne', ← mul_assoc, ← mul_assoc, + ← Complex.ofReal_mul, ← Real.rpow_add hc, add_neg_cancel, Real.rpow_zero, Complex.ofReal_one, + one_mul] + +/-- The **symbol kernels of a family** `(ω_j)` of Schwartz functions: +`K_j = 𝓕⁻¹[2^{-jσ} m(2^j ·) 𝓕ω_j]`, the symbol kernel of `𝓕ω_j` at the scale `j` +(`Rd.symbolKernelFamily`), so that `m(D) (ω_j)_{2^j} = 2^{jσ} (K_j)_{2^j}` +(`Rd.fourierMultiplierCLM_schwartzDilate`). -/ +noncomputable def symbolBase (m : V → ℂ) (σ : ℝ) (ω : ℕ → 𝓢(V, ℂ)) (j : ℕ) : 𝓢(V, ℂ) := + symbolKernelFamily m σ (𝓕 (ω j)) j + +/-- **Symbol kernels of a family that is constant from `M` on**: if `m` is a symbol of order +`σ`, `ω_j = ω_M` for `j ≥ M` and `𝓕ω_M` vanishes outside the annulus `{a ≤ ‖ζ‖ ≤ b}`, `a > 0`, +then the symbol kernels `j ↦ K_j` of the family (`Rd.symbolBase`) are uniformly Schwartz: from +`M` on they are the symbol kernels of `𝓕ω_M` +(`Rd.HasSymbolGrowth.exists_isUniformSchwartz_symbolKernelFamily`), and the first `M` are +exceptions (`Rd.IsUniformSchwartz.of_forall_ge_eq`). -/ +theorem HasSymbolGrowth.exists_isUniformSchwartz_symbolBase (hm : HasSymbolGrowth σ m) + {ω : ℕ → 𝓢(V, ℂ)} {M : ℕ} {a b : ℝ} (ha : 0 < a) (hω : ∀ j, M ≤ j → ω j = ω M) + (hann : ∀ ζ, 𝓕 (ω M) ζ ≠ 0 → a ≤ ‖ζ‖ ∧ ‖ζ‖ ≤ b) : + ∃ A : ℕ → ℕ → ℝ, IsUniformSchwartz (symbolBase m σ ω) A := by + obtain ⟨A, hA⟩ := hm.exists_isUniformSchwartz_symbolKernelFamily ha hann + exact ⟨_, hA.of_forall_ge_eq (N := M) fun j hj => by rw [symbolBase, hω j hj]⟩ + +/-- **Symbols applied to the synthesis kernels**: for a symbol `m` of order `σ` there is a +uniformly Schwartz family `(G_j)` with `m(D) ψ̃_j = 2^{jσ} (G_j)_{2^j}` for every `j`, where +`ψ̃_j = (psiDualBase j)_{2^j}` (`Rd.psiDualS`). The family `psiDualBase` is constant from `2` on, +with Fourier transform in `{1/4 ≤ ‖ζ‖ ≤ 4}` (`Rd.mem_annulus_of_fourier_psiDualBase_ne_zero`, +`Rd.HasSymbolGrowth.exists_isUniformSchwartz_symbolBase`, +`Rd.fourierMultiplierCLM_schwartzDilate`); the bounds are existential. -/ +theorem HasSymbolGrowth.exists_isUniformSchwartz_psiDualS (hm : HasSymbolGrowth σ m) : + ∃ (G : ℕ → 𝓢(V, ℂ)) (A : ℕ → ℕ → ℝ), IsUniformSchwartz G A ∧ ∀ j, + SchwartzMap.fourierMultiplierCLM ℂ m (psiDualS j) = + ((((2 : ℝ) ^ j) ^ σ : ℝ) : ℂ) • + schwartzDilate (2 ^ j) (pow_ne_zero j two_ne_zero) (G j) := by + obtain ⟨A, hA⟩ := hm.exists_isUniformSchwartz_symbolBase (ω := psiDualBase (V := V)) (M := 2) + (by norm_num : (0 : ℝ) < 4⁻¹) + (fun j hj => by + obtain ⟨k, rfl⟩ := Nat.exists_eq_add_of_le' hj + rfl) + (fun _ h => mem_annulus_of_fourier_psiDualBase_ne_zero (j := 0) h) + exact ⟨_, A, hA, fun j => + fourierMultiplierCLM_schwartzDilate hm.hasTemperateGrowth σ (psiDualBase j) j⟩ + +end Scaled + +/-! ### The maximal bound -/ + +variable {V : Type*} [NormedAddCommGroup V] [InnerProductSpace ℝ V] [FiniteDimensional ℝ V] + [MeasurableSpace V] [BorelSpace V] + +/-- **Uniform families below the maximal function**: if `(G_j)` is uniformly Schwartz with +bounds `A` and `N > n`, then for every level `j`, function `g` and point `x`, +`|((G_j)_{2^j} ⋆ g)(x)| ≤ C_{n,N} C_{A,0,N} M|g|(x)` with `C_{n,N} = Rd.decayMaximalConst V N` and +`C_{A,0,N} = Rd.familyDecayConst A 0 N`, both finite, independent of `j`. The dilates obey the +Peetre bound `|(G_j)_{2^j}(y)| ≤ C_{A,0,N} 2^{jn} (1 + 2^j ‖y‖)^{-N}` +(`Rd.enorm_dilate_schwartz_le`, `Rd.schwartzDecayConst_le_familyDecayConst`), and such kernels +lie below the maximal function (`Rd.enorm_conv_le_maximal_of_decay`). -/ +theorem IsUniformSchwartz.enorm_conv_dilate_le_maximal {G : ℕ → 𝓢(V, ℂ)} {A : ℕ → ℕ → ℝ} + (h : IsUniformSchwartz G A) {N : ℕ} (hN : finrank ℝ V < N) (j : ℕ) (g : V → ℂ) (x : V) : + ‖conv (dilate (2 ^ j) (G j : V → ℂ)) g volume x‖ₑ ≤ + decayMaximalConst V N * familyDecayConst A 0 N * maximal (fun y => ‖g y‖ₑ) x := + enorm_conv_le_maximal_of_decay hN (familyDecayConst_ne_top A 0 N) + (Filter.Eventually.of_forall fun y => (enorm_dilate_schwartz_le (G j) N j y).trans (by + gcongr + exact schwartzDecayConst_le_familyDecayConst h j 0 N)) g x + +/-- The constant `C_{n,N} C_{A,0,N}` of `Rd.IsUniformSchwartz.enorm_conv_dilate_le_maximal` is +finite for `N > n` (`Rd.decayMaximalConst_ne_top`, `Rd.familyDecayConst_ne_top`). -/ +theorem decayMaximalConst_mul_familyDecayConst_ne_top {N : ℕ} (hN : finrank ℝ V < N) + (A : ℕ → ℕ → ℝ) : decayMaximalConst V N * familyDecayConst A 0 N ≠ ∞ := + ENNReal.mul_ne_top (decayMaximalConst_ne_top hN) (familyDecayConst_ne_top A 0 N) + +end Rd diff --git a/LeanPool/FunctionSpaces/Rd/FourierMultipliers/TriebelLizorkinMultipliers.lean b/LeanPool/FunctionSpaces/Rd/FourierMultipliers/TriebelLizorkinMultipliers.lean new file mode 100644 index 0000000000..735114be5b --- /dev/null +++ b/LeanPool/FunctionSpaces/Rd/FourierMultipliers/TriebelLizorkinMultipliers.lean @@ -0,0 +1,194 @@ +/- +Copyright (c) 2026 Mario Ullrich. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Mario Ullrich +-/ +module + +public import LeanPool.FunctionSpaces.Rd.TriebelLizorkin.TriebelLizorkinDistributions +public import LeanPool.FunctionSpaces.Rd.FourierMultipliers.SymbolKernels +public import LeanPool.FunctionSpaces.Rd.TriebelLizorkin.TriebelLizorkinLocalMeans + +/- +Modified for Lean Pool: module names and imports adapted. +-/ + +/-! +# Fourier multipliers on Triebel–Lizorkin spaces + +A symbol `m` of order `σ` (`Rd.HasSymbolGrowth σ m`) maps `F^s_{p,q}` to `F^{s-σ}_{p,q}`, for +tempered distributions, every real `s`, `1 < p < ∞` and `1 < q ≤ ∞`, with an existential +constant (`Rd.exists_triebelLizorkinNormDistr_fourierMultiplier_le`); on `L_p` functions this is a +bound for the Triebel–Lizorkin quasi-norm +(`Rd.exists_triebelLizorkinNorm_le_of_fourierMultiplier_eq`). For a given uniform family `(G_j)` +with `m(D) ψ̃_j = 2^{jσ} (G_j)_{2^j}` the constant is `C_{n,N} C_{A,0,N} C_{FS}` +(`Rd.triebelLizorkinNormDistr_fourierMultiplier_le`), and `m(D)` maps `F^s_{p,q}` into +`F^{s-σ}_{p,q}` (`Rd.MemTriebelLizorkinDistr.fourierMultiplierCLM`). + +The proof is pointwise. Since `𝓕ψ̃_j 𝓕ψ_j = 𝓕ψ_j`, the block of `m(D) u` is the multiplier +`𝓕(m(D) ψ̃_j)` applied to the block of `u` (`Rd.distribBlock_fourierMultiplierCLM`), so when +`Δ_j u = g_j ∈ L_p` it is the convolution `(m(D) ψ̃_j) ⋆ g_j` +(`Rd.distribBlock_fourierMultiplierCLM_eq_convLp`). Here `m(D) ψ̃_j = 2^{jσ} (G_j)_{2^j}` with a +uniform family `(G_j)` (`Rd.HasSymbolGrowth.exists_isUniformSchwartz_psiDualS`), so +`2^{j(s-σ)} |Δ_j(m(D) u)| ≤ C M(2^{js} |g_j|)` (`Rd.dyadicWeight_mul_enorm_conv_le_maximal`), and +the Fefferman–Stein inequality (`Rd.eLpNorm_le_of_le_lqNorm_maximal`) finishes. +-/ + +@[expose] public section + +open MeasureTheory Module Filter +open scoped ENNReal SchwartzMap FourierTransform + +open ENNReal (lqNorm dyadicWeight) + +namespace Rd + +variable {V : Type*} [NormedAddCommGroup V] [InnerProductSpace ℝ V] [FiniteDimensional ℝ V] + [MeasurableSpace V] [BorelSpace V] {σ : ℝ} {m : V → ℂ} + +/-! ### The blocks of a Fourier multiplier -/ + +/-- **The blocks of a Fourier multiplier**: for `m` of temperate growth and every tempered +distribution `u`, `Δ_j(m(D) u) = 𝓕(m(D) ψ̃_j)(D) Δ_j u`. Both sides are Fourier multipliers of +`u` (Mathlib's `TemperedDistribution.fourierMultiplierCLM_fourierMultiplierCLM_apply`), with the +symbols `m 𝓕ψ_j` and `𝓕ψ_j m 𝓕ψ̃_j`, equal since `𝓕ψ̃_j 𝓕ψ_j = 𝓕ψ_j` +(`Rd.fourier_psiDual_mul_psi`). -/ +theorem distribBlock_fourierMultiplierCLM (hm : m.HasTemperateGrowth) (u : 𝓢'(V, ℂ)) (j : ℕ) : + distribBlock j (TemperedDistribution.fourierMultiplierCLM ℂ m u) = + TemperedDistribution.fourierMultiplierCLM ℂ + (𝓕 (SchwartzMap.fourierMultiplierCLM ℂ m (psiDualS (V := V) j)) : 𝓢(V, ℂ)) + (distribBlock j u) := by + rw [distribBlock, TemperedDistribution.fourierMultiplierCLM_fourierMultiplierCLM_apply hm + (𝓕 (psiS (V := V) j)).hasTemperateGrowth, + TemperedDistribution.fourierMultiplierCLM_fourierMultiplierCLM_apply + (𝓕 (psiS (V := V) j)).hasTemperateGrowth + (𝓕 (SchwartzMap.fourierMultiplierCLM ℂ m (psiDualS (V := V) j))).hasTemperateGrowth] + refine congrArg (fun f => TemperedDistribution.fourierMultiplierCLM ℂ f u) (funext fun ξ => ?_) + rw [Pi.mul_apply, Pi.mul_apply, fourier_fourierMultiplierCLM_apply hm, fourier_psiS_apply, + SchwartzMap.fourier_coe, coe_psiDualS] + linear_combination (-(m ξ)) * fourier_psiDual_mul_psi (V := V) j ξ + +/-- **The blocks of a Fourier multiplier as convolutions**: if `m` has temperate growth, +`1 ≤ p < ∞` and the block `Δ_j u` of a tempered distribution is an `L_p` function `g`, then +`Δ_j(m(D) u)` is the `L_p` function `(m(D) ψ̃_j) ⋆ g` (`Rd.distribBlock_fourierMultiplierCLM`, +`Rd.fourierMultiplierCLM_fourier_toLp_eq_conv`). -/ +theorem distribBlock_fourierMultiplierCLM_eq_convLp {p : ℝ≥0∞} [Fact (1 ≤ p)] (hp : p ≠ ∞) + (hm : m.HasTemperateGrowth) {u : 𝓢'(V, ℂ)} {j : ℕ} {g : Lp ℂ p (volume : Measure V)} + (hg : distribBlock j u = (g : 𝓢'(V, ℂ))) : + distribBlock j (TemperedDistribution.fourierMultiplierCLM ℂ m u) = + (convLp hp (SchwartzMap.fourierMultiplierCLM ℂ m (psiDualS (V := V) j)).integrable g : + 𝓢'(V, ℂ)) := by + rw [distribBlock_fourierMultiplierCLM hm, hg, fourierMultiplierCLM_fourier_toLp_eq_conv hp] + +/-! ### The pointwise bound -/ + +/-- **Weighted convolutions with a symbol kernel below the maximal function**: let `(G_j)` be +uniformly Schwartz with bounds `A`, `N > n` and `K = 2^{jσ} (G_j)_{2^j}`. Then for every real `s`, +function `g` and point `x`, +`2^{j(s-σ)} |(K ⋆ g)(x)| ≤ C_{n,N} C_{A,0,N} M(2^{js} |g|)(x)` +(`Rd.IsUniformSchwartz.enorm_conv_dilate_le_maximal`, `Rd.enorm_two_pow_rpow`, +`Rd.dyadicWeight_mul_maximal`). -/ +theorem dyadicWeight_mul_enorm_conv_le_maximal {G : ℕ → 𝓢(V, ℂ)} {A : ℕ → ℕ → ℝ} + (hG : IsUniformSchwartz G A) {N : ℕ} (hN : finrank ℝ V < N) {j : ℕ} {K : 𝓢(V, ℂ)} + (hK : K = ((((2 : ℝ) ^ j) ^ σ : ℝ) : ℂ) • + schwartzDilate (2 ^ j) (pow_ne_zero j two_ne_zero) (G j)) + (s : ℝ) (g : V → ℂ) (x : V) : + dyadicWeight (s - σ) j * ‖conv K g volume x‖ₑ ≤ + decayMaximalConst V N * familyDecayConst A 0 N * + maximal (fun y => dyadicWeight s j * ‖g y‖ₑ) x := by + rw [hK, FunLike.coe_smul, smul_conv, Pi.smul_apply, smul_eq_mul, eNorm_mul, + enorm_two_pow_rpow j σ, + coe_schwartzDilate, ← mul_assoc, ← ENNReal.dyadicWeight_add, sub_add_cancel, + ← dyadicWeight_mul_maximal] + calc dyadicWeight s j * ‖conv (dilate (2 ^ j) (G j : V → ℂ)) g volume x‖ₑ + ≤ dyadicWeight s j * (decayMaximalConst V N * familyDecayConst A 0 N * + maximal (fun y => ‖g y‖ₑ) x) := by + gcongr + exact hG.enorm_conv_dilate_le_maximal hN j g x + _ = _ := by ring + +/-! ### Fourier multipliers on `F^s_{p,q}` -/ + +variable {p : ℝ≥0∞} [Fact (1 ≤ p)] + +/-- **The multiplier bound for one family of blocks**: for a function `m` of temperate growth +with `m(D) ψ̃_j = 2^{jσ} (G_j)_{2^j}` and `(G_j)` uniformly Schwartz with bounds `A`, `1 < p < ∞`, +`1 < q ≤ ∞` and `N > n`, if the blocks of `u` are `L_p` functions `g_j`, then +`‖m(D) u‖_{F^{s-σ}_{p,q}} ≤ C_{n,N} C_{A,0,N} C_{FS} ‖ x ↦ ‖(2^{js} |g_j(x)|)_j‖_{ℓ_q} ‖_p` +with the Fefferman–Stein constant `C_{FS} = Rd.feffermanSteinConst V p q`. The blocks of +`m(D) u` are the convolutions `(m(D) ψ̃_j) ⋆ g_j` +(`Rd.distribBlock_fourierMultiplierCLM_eq_convLp`), bounded at almost every point by +`Rd.dyadicWeight_mul_enorm_conv_le_maximal`, and `Rd.eLpNorm_le_of_le_lqNorm_maximal` applies. -/ +theorem triebelLizorkinNormDistr_fourierMultiplier_le (hp1 : 1 < p) (hp : p ≠ ∞) {q : ℝ≥0∞} + (hq1 : 1 < q) (hm : m.HasTemperateGrowth) {G : ℕ → 𝓢(V, ℂ)} {A : ℕ → ℕ → ℝ} + (hG : IsUniformSchwartz G A) (hK : ∀ j, SchwartzMap.fourierMultiplierCLM ℂ m (psiDualS j) = + ((((2 : ℝ) ^ j) ^ σ : ℝ) : ℂ) • schwartzDilate (2 ^ j) (pow_ne_zero j two_ne_zero) (G j)) + {N : ℕ} (hN : finrank ℝ V < N) (s : ℝ) {u : 𝓢'(V, ℂ)} + {g : ℕ → Lp ℂ p (volume : Measure V)} (hg : ∀ j, distribBlock j u = (g j : 𝓢'(V, ℂ))) : + triebelLizorkinNormDistr p (s - σ) q (TemperedDistribution.fourierMultiplierCLM ℂ m u) ≤ + decayMaximalConst V N * familyDecayConst A 0 N * feffermanSteinConst V p q * + eLpNorm (fun x => lqNorm q fun j => dyadicWeight s j * ‖g j x‖ₑ) p volume := by + set K : ℕ → 𝓢(V, ℂ) := fun j => SchwartzMap.fourierMultiplierCLM ℂ m (psiDualS j) with hKdef + refine (triebelLizorkinNormDistr_le (g := fun j => convLp hp (K j).integrable (g j)) + fun j => distribBlock_fourierMultiplierCLM_eq_convLp hp hm (hg j)).trans ?_ + refine eLpNorm_le_of_le_lqNorm_maximal hp1 hp hq1 (aemeasurable_lqNorm_dyadicWeight_Lp _ q _) + (fun j => ((Lp.aestronglyMeasurable (g j)).eNorm.const_mul _)) ?_ + filter_upwards [ae_all_iff.2 fun j => convLp_apply_ae hp (K j).integrable (g j)] with x hx + simp_rw [hx, ← ENNReal.lqNorm_const_mul] + exact ENNReal.lqNorm_mono fun j => + dyadicWeight_mul_enorm_conv_le_maximal hG hN (hK j) s (g j) x + +/-- **Fourier multipliers on `F^s_{p,q}` of tempered distributions**: for `1 < p < ∞`, +`1 < q ≤ ∞`, a symbol `m` of order `σ` and every real `s` there is a finite constant `C` with +`‖m(D) u‖_{F^{s-σ}_{p,q}} ≤ C ‖u‖_{F^s_{p,q}}` for every tempered distribution `u`; the constant is +existential. In particular `m(D)` maps `F^s_{p,q}` into `F^{s-σ}_{p,q}`. The uniform family of +`Rd.HasSymbolGrowth.exists_isUniformSchwartz_psiDualS` and +`Rd.triebelLizorkinNormDistr_fourierMultiplier_le` give the bound for every family of `L_p` +blocks of `u` (`Rd.le_mul_triebelLizorkinNormDistr`). -/ +theorem exists_triebelLizorkinNormDistr_fourierMultiplier_le (hp1 : 1 < p) (hp : p ≠ ∞) + {q : ℝ≥0∞} (hq1 : 1 < q) (hm : HasSymbolGrowth σ m) (s : ℝ) : + ∃ C : ℝ≥0∞, C ≠ ∞ ∧ ∀ u : 𝓢'(V, ℂ), + triebelLizorkinNormDistr p (s - σ) q + (TemperedDistribution.fourierMultiplierCLM ℂ m u) ≤ + C * triebelLizorkinNormDistr p s q u := by + obtain ⟨G, A, hG, hK⟩ := hm.exists_isUniformSchwartz_psiDualS + have hN : finrank ℝ V < finrank ℝ V + 1 := Nat.lt_succ_self _ + refine ⟨max 1 (decayMaximalConst V (finrank ℝ V + 1) * familyDecayConst A 0 (finrank ℝ V + 1) * + feffermanSteinConst V p q), ?_, fun u => le_mul_triebelLizorkinNormDistr ?_ fun g hg => ?_⟩ + · exact max_ne_top ENNReal.one_ne_top (ENNReal.mul_ne_top + (decayMaximalConst_mul_familyDecayConst_ne_top hN A) (feffermanSteinConst_ne_top hp1 hp hq1)) + · exact (zero_lt_one.trans_le (le_max_left _ _)).ne' + · refine (triebelLizorkinNormDistr_fourierMultiplier_le hp1 hp hq1 hm.hasTemperateGrowth hG hK + hN s hg).trans ?_ + gcongr + exact le_max_right _ _ + +/-- **Fourier multipliers map `F^s_{p,q}` to `F^{s-σ}_{p,q}`**: for `1 < p < ∞`, `1 < q ≤ ∞` +and a symbol `m` of order `σ`, every tempered distribution `u ∈ F^s_{p,q}` has +`m(D) u ∈ F^{s-σ}_{p,q}` (`Rd.exists_triebelLizorkinNormDistr_fourierMultiplier_le`). -/ +theorem MemTriebelLizorkinDistr.fourierMultiplierCLM (hp1 : 1 < p) (hp : p ≠ ∞) {q : ℝ≥0∞} + (hq1 : 1 < q) (hm : HasSymbolGrowth σ m) {s : ℝ} {u : 𝓢'(V, ℂ)} + (hu : MemTriebelLizorkinDistr p s q u) : + MemTriebelLizorkinDistr p (s - σ) q (TemperedDistribution.fourierMultiplierCLM ℂ m u) := by + obtain ⟨C, hC, hCu⟩ := exists_triebelLizorkinNormDistr_fourierMultiplier_le hp1 hp hq1 hm s + exact (hCu u).trans_lt (ENNReal.mul_lt_top hC.lt_top hu) + +/-- **Fourier multipliers on `F^s_{p,q}` of `L_p` functions**: for `1 < p < ∞`, `1 < q ≤ ∞`, a +symbol `m` of order `σ` and every real `s` there is a finite constant `C` with +`‖g‖_{F^{s-σ}_{p,q}} ≤ C ‖f‖_{F^s_{p,q}}` for all `f, g ∈ L_p(V)` with `g = m(D) f` as tempered +distributions; the constant is existential +(`Rd.exists_triebelLizorkinNormDistr_fourierMultiplier_le`, +`Rd.triebelLizorkinNormDistr_toTemperedDistribution`). -/ +theorem exists_triebelLizorkinNorm_le_of_fourierMultiplier_eq (hp1 : 1 < p) (hp : p ≠ ∞) + {q : ℝ≥0∞} (hq1 : 1 < q) (hm : HasSymbolGrowth σ m) (s : ℝ) : + ∃ C : ℝ≥0∞, C ≠ ∞ ∧ ∀ f g : Lp ℂ p (volume : Measure V), + (g : 𝓢'(V, ℂ)) = TemperedDistribution.fourierMultiplierCLM ℂ m (f : 𝓢'(V, ℂ)) → + triebelLizorkinNorm (s - σ) q g ≤ C * triebelLizorkinNorm s q f := by + obtain ⟨C, hC, hCu⟩ := exists_triebelLizorkinNormDistr_fourierMultiplier_le (p := p) hp1 hp hq1 + hm s + refine ⟨C, hC, fun f g hfg => ?_⟩ + have h := hCu (f : 𝓢'(V, ℂ)) + rwa [← hfg, triebelLizorkinNormDistr_toTemperedDistribution hp, + triebelLizorkinNormDistr_toTemperedDistribution hp] at h + +end Rd diff --git a/LeanPool/FunctionSpaces/Rd/Interpolation/BesovInterpolation.lean b/LeanPool/FunctionSpaces/Rd/Interpolation/BesovInterpolation.lean new file mode 100644 index 0000000000..5288ab8806 --- /dev/null +++ b/LeanPool/FunctionSpaces/Rd/Interpolation/BesovInterpolation.lean @@ -0,0 +1,106 @@ +/- +Copyright (c) 2026 Mario Ullrich. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Mario Ullrich +-/ +module + +public import LeanPool.FunctionSpaces.Rd.Differences.BesovDifferences +public import LeanPool.FunctionSpaces.ApproximationSpaces.Interpolation.ApproxSpaces + +/- +Modified for Lean Pool: module names and imports adapted. +-/ + +/-! +# Besov spaces on `V` as interpolation spaces + +Let `1 ≤ p < ∞`, `0 < η < 1` and `1 ≤ q₀, q₁, q ≤ ∞`. For the band-limited scheme, the couple +of the dyadic quasi-norms of `A^{s₀}_{q₀}` and `A^{s₁}_{q₁}`, `0 < s₀ < s₁`, has the real +interpolation spaces `A^{(1-η)s₀+ηs₁}_q`, and `(L_p, A^{s₁}_{q₁})_{η,q} = A^{ηs₁}_q` +(`Rd.memKMethod_bandApproxCouple_iff`, `Rd.memKMethod_bandLeftApproxCouple_iff`). + +For **Besov spaces by differences** of order `r` the couple carries the quasi-norms +`‖f‖_p + ‖(2^(ks_i) ω_r(f, 2^(-k))_p)_k‖_{ℓ_{q_i}}` (the couple +`ApproximationScheme.ModulusData.modCouple` of `Rd.bandModulusData`). For `0 < s₀ < s₁ < r` +and `s = (1-η)s₀ + ηs₁`, + +`f ∈ (B^{s₀}_{p,q₀}, B^{s₁}_{p,q₁})_{η,q} ⟺ ‖f‖_p + ‖(2^(ks) ω_r(f, 2^(-k))_p)_k‖_{ℓ_q} < ∞` + +(Bergh–Löfström, Theorem 6.4.5(1); Triebel 1978, Section 2.4; `Rd.memKMethod_modCouple_iff`), +and equivalently `‖(2^(js) ‖ψ_j ⋆ f‖_p)_j‖_{ℓ_q} < ∞` +(`Rd.memKMethod_modCouple_iff_littlewoodPaley`). The endpoint +`(L_p, B^{s₁}_{p,q₁})_{η,q} = B^{ηs₁}_{p,q}` is `Rd.memKMethod_leftModCouple_iff`. +-/ + +@[expose] public section + +open MeasureTheory +open scoped ENNReal + +namespace Rd + +open ENNReal (lqNorm dyadicWeight) + +variable {V : Type*} [NormedAddCommGroup V] [InnerProductSpace ℝ V] [FiniteDimensional ℝ V] + [MeasurableSpace V] [BorelSpace V] {p : ℝ≥0∞} [Fact (1 ≤ p)] {s₀ s₁ η : ℝ} + {q₀ q₁ q : ℝ≥0∞} + +/-- **Band-limited approximation spaces interpolate**: for `1 ≤ p < ∞`, `0 < s₀ < s₁`, +`0 < η < 1` and `1 ≤ q₀, q₁, q ≤ ∞`, the real interpolation space +`(A^{s₀}_{q₀}, A^{s₁}_{q₁})_{η,q}` of the band-limited scheme in `L_p(V)` is +`A^{(1-η)s₀+ηs₁}_q`. -/ +theorem memKMethod_bandApproxCouple_iff (hp : p ≠ ∞) (hs₀ : 0 < s₀) (hs : s₀ < s₁) (hη : 0 < η) + (hη' : η < 1) (hq₀ : 1 ≤ q₀) (hq₁ : 1 ≤ q₁) (hq : 1 ≤ q) + {f : Lp ℂ p (volume : Measure V)} : + ((bandScheme hp).approxCouple s₀ q₀ s₁ q₁).MemKMethod η q f ↔ + (bandScheme hp).MemApprox ((1 - η) * s₀ + η * s₁) q f := + ApproximationScheme.memKMethod_approxCouple_iff hs₀ hs hη hη' hq₀ hq₁ hq + +/-- **`L_p` and a band-limited approximation space interpolate**: for `1 ≤ p < ∞`, `s₁ > 0`, +`0 < η < 1` and `1 ≤ q₁, q ≤ ∞`, the real interpolation space `(L_p, A^{s₁}_{q₁})_{η,q}` of the +band-limited scheme in `L_p(V)` is `A^{ηs₁}_q`. -/ +theorem memKMethod_bandLeftApproxCouple_iff (hp : p ≠ ∞) (hs₁ : 0 < s₁) (hη : 0 < η) + (hη' : η < 1) (hq₁ : 1 ≤ q₁) (hq : 1 ≤ q) {f : Lp ℂ p (volume : Measure V)} : + ((bandScheme hp).leftApproxCouple s₁ q₁).MemKMethod η q f ↔ + (bandScheme hp).MemApprox (η * s₁) q f := + ApproximationScheme.memKMethod_approxCouple_zero_iff hs₁ hη hη' hq₁ hq + +/-- **Besov spaces by differences interpolate** (Bergh–Löfström, Theorem 6.4.5(1); Triebel 1978, +Section 2.4): for `1 ≤ p < ∞`, an order `r`, `0 < s₀ < s₁ < r`, `0 < η < 1` and +`1 ≤ q₀, q₁, q ≤ ∞`, `f ∈ L_p(V)` lies in the real interpolation space of the couple of the +quasi-norms `‖f‖_p + ‖(2^(ks_i) ω_r(f, 2^(-k))_p)_k‖_{ℓ_{q_i}}` iff +`‖f‖_p + ‖(2^(ks) ω_r(f, 2^(-k))_p)_k‖_{ℓ_q} < ∞` with `s = (1-η)s₀ + ηs₁`. -/ +theorem memKMethod_modCouple_iff (hp : p ≠ ∞) {r : ℕ} (hs₀ : 0 < s₀) (hs : s₀ < s₁) + (hs₁ : s₁ < r) (hη : 0 < η) (hη' : η < 1) (hq₀ : 1 ≤ q₀) (hq₁ : 1 ≤ q₁) (hq : 1 ≤ q) + {f : Lp ℂ p (volume : Measure V)} : + ((bandModulusData hp r).modCouple s₀ q₀ s₁ q₁).MemKMethod η q f ↔ + ‖f‖ₑ + lqNorm q (fun k => dyadicWeight ((1 - η) * s₀ + η * s₁) k * lpModulus p r f k) < ∞ := + (bandModulusData hp r).memKMethod_modCouple_iff hs₀ hs hs₁ hη hη' hq₀ hq₁ hq + +/-- **Besov spaces by differences interpolate, in Littlewood–Paley form**: for `1 ≤ p < ∞`, an +order `r`, `0 < s₀ < s₁ < r`, `0 < η < 1` and `1 ≤ q₀, q₁, q ≤ ∞`, `f ∈ L_p(V)` lies in the real +interpolation space of the couple of the quasi-norms +`‖f‖_p + ‖(2^(ks_i) ω_r(f, 2^(-k))_p)_k‖_{ℓ_{q_i}}` iff `‖(2^(js) ‖ψ_j ⋆ f‖_p)_j‖_{ℓ_q} < ∞` +with `s = (1-η)s₀ + ηs₁`. -/ +theorem memKMethod_modCouple_iff_littlewoodPaley (hp : p ≠ ∞) {r : ℕ} (hs₀ : 0 < s₀) + (hs : s₀ < s₁) (hs₁ : s₁ < r) (hη : 0 < η) (hη' : η < 1) (hq₀ : 1 ≤ q₀) (hq₁ : 1 ≤ q₁) + (hq : 1 ≤ q) {f : Lp ℂ p (volume : Measure V)} : + ((bandModulusData hp r).modCouple s₀ q₀ s₁ q₁).MemKMethod η q f ↔ + littlewoodPaleyNorm hp ((1 - η) * s₀ + η * s₁) q f < ∞ := by + rw [memKMethod_modCouple_iff hp hs₀ hs hs₁ hη hη' hq₀ hq₁ hq, + littlewoodPaleyNorm_lt_top_iff_modulus hp + (ApproximationScheme.reiterationExponent_pos hs₀ hs hη hη') + (ApproximationScheme.reiterationExponent_lt hs hs₁ hη') hq f] + +/-- **`L_p` and a Besov space by differences interpolate**: for `1 ≤ p < ∞`, an order `r`, +`0 < s₁ < r`, `0 < η < 1` and `1 ≤ q₁, q ≤ ∞`, `f ∈ L_p(V)` lies in the real interpolation space +of the couple of `‖f‖_p` and `‖f‖_p + ‖(2^(ks₁) ω_r(f, 2^(-k))_p)_k‖_{ℓ_{q₁}}` iff +`‖f‖_p + ‖(2^(kηs₁) ω_r(f, 2^(-k))_p)_k‖_{ℓ_q} < ∞`. -/ +theorem memKMethod_leftModCouple_iff (hp : p ≠ ∞) {r : ℕ} (hs₁ : 0 < s₁) (hs₁r : s₁ < r) + (hη : 0 < η) (hη' : η < 1) (hq₁ : 1 ≤ q₁) (hq : 1 ≤ q) {f : Lp ℂ p (volume : Measure V)} : + ((bandModulusData hp r).leftModCouple s₁ q₁).MemKMethod η q f ↔ + ‖f‖ₑ + lqNorm q (fun k => dyadicWeight (η * s₁) k * lpModulus p r f k) < ∞ := + (bandModulusData hp r).memKMethod_leftModCouple_iff hs₁ hs₁r hη hη' hq₁ hq + +end Rd diff --git a/LeanPool/FunctionSpaces/Rd/Interpolation/BesselPotentialInterpolation.lean b/LeanPool/FunctionSpaces/Rd/Interpolation/BesselPotentialInterpolation.lean new file mode 100644 index 0000000000..4186aed083 --- /dev/null +++ b/LeanPool/FunctionSpaces/Rd/Interpolation/BesselPotentialInterpolation.lean @@ -0,0 +1,246 @@ +/- +Copyright (c) 2026 Mario Ullrich. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Mario Ullrich +-/ +module + +public import LeanPool.FunctionSpaces.Rd.BesselPotentials.BesselPotentialLifting +public import LeanPool.FunctionSpaces.Rd.Interpolation.TriebelLizorkinInterpolation +public import LeanPool.FunctionSpaces.Rd.Sobolev.RellichCompactness + +/- +Modified for Lean Pool: module names and imports adapted. +-/ + +/-! +# Bessel potential spaces on `V` and real interpolation + +The **Bessel potential norm** `‖J_s f‖_p` of `f ∈ L_p(V)` (`Rd.besselPotentialNorm`) is finite +exactly on Mathlib's Bessel potential space `H^{s,p}(V)` (`Rd.besselPotentialNorm_lt_top_iff`), +where it is the norm of the bundled space (`Rd.besselPotentialNorm_eq_enorm`). +In dimension `n ≥ 1` and for `1 < p < ∞` it is equivalent to the quasi-norm of `F^s_{p,2}`, with +existential constants (`Rd.exists_triebelLizorkinNorm_le_besselPotentialNorm`, +`Rd.exists_besselPotentialNorm_le_triebelLizorkinNorm`), so the interpolation theorem for +Triebel–Lizorkin spaces gives, for `0 < η < 1`, `1 ≤ q ≤ ∞`, `0 < s₀ < s₁` and +`s = (1-η)s₀ + ηs₁`, + +`(H^{s₀,p}, H^{s₁,p})_{η,q} = B^s_{p,q}` and `(L_p, H^{s₁,p})_{η,q} = B^{ηs₁}_{p,q}` + +in the Bessel potential norms (Bergh–Löfström, Theorem 6.4.5(4); +`Rd.memKMethod_besselPotentialCouple_iff`, `Rd.memKMethod_lpBesselPotentialCouple_iff`). + +For `p = 2` and `s₁ = 1` the couple `(L_2, H^1)` is the couple of the embedding +`H^1(V) → L_2(V)` (`Rd.ofMap_toL2_eq_lpBesselPotentialCouple`), so +`(L_2(V), H^1(V))_{θ,q} = B^θ_{2,q}(V)` for `0 < θ < 1`, with the Besov space by differences of +every order `r > θ` (`Rd.memKMethod_ofMap_toL2_iff`). +-/ + +@[expose] public section + +open MeasureTheory +open scoped ENNReal SchwartzMap BesselPotentialSpace +open TemperedDistribution (besselPotential) +open ENNReal (lqNorm dyadicWeight) + +namespace Rd + +variable {V : Type*} [NormedAddCommGroup V] [InnerProductSpace ℝ V] [FiniteDimensional ℝ V] + [MeasurableSpace V] [BorelSpace V] {p : ℝ≥0∞} [Fact (1 ≤ p)] {s₀ s₁ η : ℝ} + {q₀ q₁ q : ℝ≥0∞} + +/-- The **Bessel potential norm** `‖J_s f‖_p` of `f ∈ L_p(V)`: the infimum of `‖h‖_p` over the +`h ∈ L_p(V)` with `J_s f = h` as tempered distributions, where `J_s` is Mathlib's Bessel +potential. It is `‖J_s f‖_p` when `J_s f ∈ L_p(V)` (`Rd.besselPotentialNorm_eq`) and `∞` +otherwise. On Mathlib's Bessel potential space `H^{s,p}(V)` it is the norm of the bundled space +(`Rd.besselPotentialNorm_eq_enorm`, `Rd.besselPotentialNorm_eq_enorm_toBesselPotentialSpace`). -/ +noncomputable def besselPotentialNorm (s : ℝ) (f : Lp ℂ p (volume : Measure V)) : ℝ≥0∞ := + ⨅ (h : Lp ℂ p (volume : Measure V)) (_ : besselPotential V ℂ s (f : 𝓢'(V, ℂ)) = h), ‖h‖ₑ + +/-- The Bessel potential norm is at most `‖h‖_p` whenever `J_s f = h`. -/ +theorem besselPotentialNorm_le {s : ℝ} {f h : Lp ℂ p (volume : Measure V)} + (hh : besselPotential V ℂ s (f : 𝓢'(V, ℂ)) = h) : besselPotentialNorm s f ≤ ‖h‖ₑ := + iInf₂_le h hh + +/-- **The Bessel potential norm is `‖J_s f‖_p`**: if `J_s f = h ∈ L_p(V)`, the Bessel potential +norm of `f` is `‖h‖_p`, since `h` is determined by its tempered distribution +(`Rd.eq_of_toTemperedDistribution_eq`). -/ +theorem besselPotentialNorm_eq {s : ℝ} {f h : Lp ℂ p (volume : Measure V)} + (hh : besselPotential V ℂ s (f : 𝓢'(V, ℂ)) = h) : besselPotentialNorm s f = ‖h‖ₑ := + le_antisymm (besselPotentialNorm_le hh) (le_iInf₂ fun _ hh' => by + rw [eq_of_toTemperedDistribution_eq (hh.symm.trans hh')]) + +/-- **The Bessel potential norm is the norm of Mathlib's `H^{s,p}`**: if `f ∈ L_p(V)` is the +tempered distribution of an element `F` of Mathlib's bundled Bessel potential space +`H^{s,p}(V)`, then the Bessel potential norm of `f` is the norm of `F`, the `L_p` norm of its +function `J_s F` (`BesselPotentialSpace.enorm_toLp_eq`). -/ +theorem besselPotentialNorm_eq_enorm {s : ℝ} {f : Lp ℂ p (volume : Measure V)} + (F : H^{s, p}(V, ℂ)) (hF : (f : 𝓢'(V, ℂ)) = F.toDistr) : besselPotentialNorm s f = ‖F‖ₑ := + (besselPotentialNorm_eq (by rw [hF]; exact F.bessel_toDistr_eq_toLp)).trans F.enorm_toLp_eq + +/-- **The Bessel potential norm of `f ∈ H^{s,p}`**: for `f ∈ L_p(V)` in Mathlib's Bessel +potential space `H^{s,p}(V)`, the Bessel potential norm of `f` is the norm of `f` as an element +of the bundled space. -/ +theorem besselPotentialNorm_eq_enorm_toBesselPotentialSpace {s : ℝ} + {f : Lp ℂ p (volume : Measure V)} (hf : TemperedDistribution.MemSobolev s p (f : 𝓢'(V, ℂ))) : + besselPotentialNorm s f = ‖hf.toBesselPotentialSpace‖ₑ := + besselPotentialNorm_eq_enorm _ hf.toBesselPotentialSpace_toDistr.symm + +/-- **The Bessel potential norm is finite exactly on `H^{s,p}`**: for `f ∈ L_p(V)`, the Bessel +potential norm of `f` is finite iff `f` lies in Mathlib's Bessel potential space `H^{s,p}(V)`, +`J_s f ∈ L_p(V)`. -/ +theorem besselPotentialNorm_lt_top_iff {s : ℝ} {f : Lp ℂ p (volume : Measure V)} : + besselPotentialNorm s f < ∞ ↔ TemperedDistribution.MemSobolev s p (f : 𝓢'(V, ℂ)) := by + refine ⟨fun hf => ?_, fun ⟨h, hh⟩ => (besselPotentialNorm_le hh).trans_lt eNorm_lt_top⟩ + obtain ⟨h, hh⟩ := iInf_lt_iff.1 hf + exact ⟨h, (iInf_lt_iff.1 hh).choose⟩ + +/-- **`H^{s,p} ⊆ F^s_{p,2}` in the Bessel potential norm**: in dimension `n ≥ 1`, for +`1 < p < ∞` and real `s`, there is a finite `C` with `‖f‖_{F^s_{p,2}} ≤ C ‖J_s f‖_p` for every +`f ∈ L_p(V)` (`Rd.exists_triebelLizorkinNorm_le_of_besselPotential_eq`); the constant is +existential. -/ +theorem exists_triebelLizorkinNorm_le_besselPotentialNorm [Nontrivial V] (hp1 : 1 < p) + (hp : p ≠ ∞) (s : ℝ) : + ∃ C : ℝ≥0∞, C ≠ ∞ ∧ ∀ f : Lp ℂ p (volume : Measure V), + triebelLizorkinNorm s 2 f ≤ C * besselPotentialNorm s f := by + obtain ⟨C, hC, hC₂⟩ := exists_triebelLizorkinNorm_le_of_besselPotential_eq (V := V) hp1 hp s + have hC' : max C 1 ≠ ∞ := max_ne_top hC ENNReal.one_ne_top + have h0 : max C 1 ≠ 0 := (zero_lt_one.trans_le (le_max_right _ _)).ne' + refine ⟨max C 1, hC', fun f => ?_⟩ + rw [besselPotentialNorm, ENNReal.mul_iInf_of_ne h0 hC'] + refine le_iInf fun h => ?_ + rw [ENNReal.mul_iInf_of_ne h0 hC'] + exact le_iInf fun hh => (hC₂ f h hh).trans (mul_le_mul_left (le_max_left _ _) _) + +/-- **`F^s_{p,2} ⊆ H^{s,p}` in the Bessel potential norm**: in dimension `n ≥ 1`, for +`1 < p < ∞` and real `s`, there is a finite `C` with `‖J_s f‖_p ≤ C ‖f‖_{F^s_{p,2}}` for every +`f ∈ L_p(V)` (`Rd.exists_besselPotential_eq_of_memTriebelLizorkin`); the constant is +existential. -/ +theorem exists_besselPotentialNorm_le_triebelLizorkinNorm [Nontrivial V] (hp1 : 1 < p) + (hp : p ≠ ∞) (s : ℝ) : + ∃ C : ℝ≥0∞, C ≠ ∞ ∧ ∀ f : Lp ℂ p (volume : Measure V), + besselPotentialNorm s f ≤ C * triebelLizorkinNorm s 2 f := by + obtain ⟨C, hC, hC₁⟩ := exists_besselPotential_eq_of_memTriebelLizorkin (V := V) hp1 hp s + refine ⟨max C 1, max_ne_top hC ENNReal.one_ne_top, fun f => ?_⟩ + by_cases hf : MemTriebelLizorkin s 2 f + · obtain ⟨h, hh, hnorm⟩ := hC₁ f hf + exact (besselPotentialNorm_le hh).trans (hnorm.trans (mul_le_mul_left (le_max_left _ _) _)) + · rw [MemTriebelLizorkin, not_lt, top_le_iff] at hf + rw [hf, ENNReal.mul_top (zero_lt_one.trans_le (le_max_right _ _)).ne'] + exact le_top + +/-- The **couple `(H^{s₀,p}, H^{s₁,p})`** on `L_p(V)`: the Bessel potential norms `‖J_{s₀} f‖_p` +and `‖J_{s₁} f‖_p`. -/ +noncomputable def besselPotentialCouple (s₀ s₁ : ℝ) : + InterpCouple (Lp ℂ p (volume : Measure V)) := + ⟨besselPotentialNorm s₀, besselPotentialNorm s₁⟩ + +/-- The first norm of `(H^{s₀,p}, H^{s₁,p})` is the Bessel potential norm of order `s₀`. -/ +@[simp] +theorem besselPotentialCouple_norm0 (f : Lp ℂ p (volume : Measure V)) : + (besselPotentialCouple s₀ s₁).norm0 f = besselPotentialNorm s₀ f := rfl + +/-- The second norm of `(H^{s₀,p}, H^{s₁,p})` is the Bessel potential norm of order `s₁`. -/ +@[simp] +theorem besselPotentialCouple_norm1 (f : Lp ℂ p (volume : Measure V)) : + (besselPotentialCouple s₀ s₁).norm1 f = besselPotentialNorm s₁ f := rfl + +/-- The **couple `(L_p, H^{s₁,p})`** on `L_p(V)`: the `L_p` norm and the Bessel potential norm +`‖J_{s₁} f‖_p`. -/ +noncomputable def lpBesselPotentialCouple (s₁ : ℝ) : InterpCouple (Lp ℂ p (volume : Measure V)) := + ⟨fun f => ‖f‖ₑ, besselPotentialNorm s₁⟩ + +/-- The first norm of `(L_p, H^{s₁,p})` is the `L_p` norm. -/ +@[simp] +theorem lpBesselPotentialCouple_norm0 (f : Lp ℂ p (volume : Measure V)) : + (lpBesselPotentialCouple s₁).norm0 f = ‖f‖ₑ := rfl + +/-- The second norm of `(L_p, H^{s₁,p})` is the Bessel potential norm of order `s₁`. -/ +@[simp] +theorem lpBesselPotentialCouple_norm1 (f : Lp ℂ p (volume : Measure V)) : + (lpBesselPotentialCouple s₁).norm1 f = besselPotentialNorm s₁ f := rfl + +/-- **Bessel potential spaces interpolate to Besov spaces** (Bergh–Löfström, Theorem 6.4.5(4)): in +dimension `n ≥ 1`, for `1 < p < ∞`, `0 < s₀ < s₁`, `0 < η < 1` and `1 ≤ q ≤ ∞`, `f ∈ L_p(V)` +lies in the real interpolation space `(H^{s₀,p}, H^{s₁,p})_{η,q}` of the Bessel potential norms +iff `f` lies in the Besov space `B^{(1-η)s₀+ηs₁}_{p,q}(V)`. The Bessel potential norms are +equivalent to the quasi-norms of `F^{s_i}_{p,2}` +(`Rd.memKMethod_iff_memApprox_of_triebelLizorkin_equiv`). -/ +theorem memKMethod_besselPotentialCouple_iff [Nontrivial V] (hp1 : 1 < p) (hp : p ≠ ∞) + (hs₀ : 0 < s₀) (hs : s₀ < s₁) (hη : 0 < η) (hη' : η < 1) (hq : 1 ≤ q) + {f : Lp ℂ p (volume : Measure V)} : + (besselPotentialCouple s₀ s₁).MemKMethod η q f ↔ + (bandScheme hp).MemApprox ((1 - η) * s₀ + η * s₁) q f := by + obtain ⟨C₀, hC₀, h₀⟩ := exists_besselPotentialNorm_le_triebelLizorkinNorm (V := V) hp1 hp s₀ + obtain ⟨C₀', hC₀', h₀'⟩ := exists_triebelLizorkinNorm_le_besselPotentialNorm (V := V) hp1 hp s₀ + obtain ⟨C₁, hC₁, h₁⟩ := exists_besselPotentialNorm_le_triebelLizorkinNorm (V := V) hp1 hp s₁ + obtain ⟨C₁', hC₁', h₁'⟩ := exists_triebelLizorkinNorm_le_besselPotentialNorm (V := V) hp1 hp s₁ + exact memKMethod_iff_memApprox_of_triebelLizorkin_equiv hp hC₀ hC₀' hC₁ hC₁' hs₀ hs hη hη' + one_le_two one_le_two hq h₀ h₀' h₁ h₁' + +/-- **`L_p` and a Bessel potential space interpolate to Besov spaces**: in dimension `n ≥ 1`, for +`1 < p < ∞`, `s₁ > 0`, `0 < η < 1` and `1 ≤ q ≤ ∞`, `f ∈ L_p(V)` lies in the real interpolation +space `(L_p, H^{s₁,p})_{η,q}` of the `L_p` norm and the Bessel potential norm iff `f` lies in the +Besov space `B^{ηs₁}_{p,q}(V)`. -/ +theorem memKMethod_lpBesselPotentialCouple_iff [Nontrivial V] (hp1 : 1 < p) (hp : p ≠ ∞) + (hs₁ : 0 < s₁) (hη : 0 < η) (hη' : η < 1) (hq : 1 ≤ q) {f : Lp ℂ p (volume : Measure V)} : + (lpBesselPotentialCouple s₁).MemKMethod η q f ↔ (bandScheme hp).MemApprox (η * s₁) q f := by + obtain ⟨C₁, hC₁, h₁⟩ := exists_besselPotentialNorm_le_triebelLizorkinNorm (V := V) hp1 hp s₁ + obtain ⟨C₁', hC₁', h₁'⟩ := exists_triebelLizorkinNorm_le_besselPotentialNorm (V := V) hp1 hp s₁ + exact memKMethod_iff_memApprox_of_triebelLizorkin_equiv_left hp hC₁ hC₁' hs₁ hη hη' one_le_two hq + h₁ h₁' + +/-! ### The couple of the embedding `H^1(V) → L_2(V)` -/ + +/-- **The quotient norm of `H^1(V) → L_2(V)` is the Bessel potential norm**: for `f ∈ L_2(V)`, +`inf {‖U‖ : U ∈ H^1(V), ι U = f} = ‖J_1 f‖_2`, where `ι = Rd.toL2`. If `J_1 f ∈ L_2`, then `f` +is the `L_2` function of an element of `H^1(V)` with norm `‖J_1 f‖_2` +(`Rd.besselPotentialNorm_eq_enorm_toBesselPotentialSpace`, `Rd.toL2_eq_of_toDistr_eq`); every `U` +with `ι U = f` has norm `‖J_1 f‖_2` +(`Rd.besselPotentialNorm_eq_enorm`, `Rd.toTemperedDistribution_toL2`). -/ +theorem norm1_ofMap_toL2 (f : Lp ℂ 2 (volume : Measure V)) : + (InterpCouple.ofMap ((toL2 : H^{1, 2}(V, ℂ) →L[ℂ] Lp ℂ 2 (volume : Measure V)).restrictScalars + ℝ)).norm1 f = besselPotentialNorm 1 f := by + refine le_antisymm ?_ ?_ + · by_cases hf : besselPotentialNorm 1 f < ∞ + · have hS := besselPotentialNorm_lt_top_iff.1 hf + rw [besselPotentialNorm_eq_enorm_toBesselPotentialSpace hS] + exact InterpCouple.norm1_ofMap_le + (toL2_eq_of_toDistr_eq _ hS.toBesselPotentialSpace_toDistr.symm) + · rw [not_lt, top_le_iff] at hf + rw [hf] + exact le_top + · rw [InterpCouple.ofMap_norm1] + refine le_iInf fun y => ?_ + obtain ⟨y, hy⟩ := y + have hy' : toL2 y = f := hy + have hf : (f : 𝓢'(V, ℂ)) = y.toDistr := by rw [← hy', toTemperedDistribution_toL2] + exact (besselPotentialNorm_eq_enorm y hf).le + +/-- **`(L_2, H^1)` is the couple of the embedding `H^1(V) → L_2(V)`**: the couple +`(L_2(V), toL2(H^1(V)))` with the quotient norm (`InterpCouple.ofMap`) is the couple of the `L_2` +norm and the Bessel potential norm of order `1` (`Rd.norm1_ofMap_toL2`). -/ +theorem ofMap_toL2_eq_lpBesselPotentialCouple : + InterpCouple.ofMap ((toL2 : H^{1, 2}(V, ℂ) →L[ℂ] Lp ℂ 2 (volume : Measure V)).restrictScalars + ℝ) = lpBesselPotentialCouple (p := 2) 1 := by + unfold InterpCouple.ofMap lpBesselPotentialCouple + congr 1 + funext f + exact norm1_ofMap_toL2 f + +/-- **`(L_2(V), H^1(V))_{θ,q} = B^θ_{2,q}(V)`**: in dimension `n ≥ 1`, for `0 < θ < 1`, +`1 ≤ q ≤ ∞` and every order `r > θ`, `F ∈ L_2(V)` lies in the real interpolation space of the +couple of the embedding `H^1(V) → L_2(V)` iff +`‖F‖_2 + ‖(2^(kθ) ω_r(F, 2^(-k))_2)_k‖_{ℓ_q} < ∞` +(`Rd.ofMap_toL2_eq_lpBesselPotentialCouple`, `Rd.memKMethod_lpBesselPotentialCouple_iff`, +`Rd.memApprox_bandScheme_iff_modulus`). -/ +theorem memKMethod_ofMap_toL2_iff [Nontrivial V] {θ : ℝ} (hθ : 0 < θ) (hθ' : θ < 1) (hq : 1 ≤ q) + {r : ℕ} (hθr : θ < r) (F : Lp ℂ 2 (volume : Measure V)) : + (InterpCouple.ofMap ((toL2 : H^{1, 2}(V, ℂ) →L[ℂ] Lp ℂ 2 (volume : Measure V)).restrictScalars + ℝ)).MemKMethod θ q F ↔ + ‖F‖ₑ + lqNorm q (fun k => dyadicWeight θ k * lpModulus 2 r F k) < ∞ := by + rw [ofMap_toL2_eq_lpBesselPotentialCouple, memKMethod_lpBesselPotentialCouple_iff + ENNReal.one_lt_two two_ne_top one_pos hθ hθ' hq, mul_one] + exact memApprox_bandScheme_iff_modulus two_ne_top hθ.le hθr hq F + +end Rd diff --git a/LeanPool/FunctionSpaces/Rd/Interpolation/SobolevInterpolation.lean b/LeanPool/FunctionSpaces/Rd/Interpolation/SobolevInterpolation.lean new file mode 100644 index 0000000000..33c9521071 --- /dev/null +++ b/LeanPool/FunctionSpaces/Rd/Interpolation/SobolevInterpolation.lean @@ -0,0 +1,324 @@ +/- +Copyright (c) 2026 Mario Ullrich. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Mario Ullrich +-/ +module + +public import LeanPool.FunctionSpaces.Rd.Sobolev.SobolevTriebelLizorkin +public import LeanPool.FunctionSpaces.ApproximationSpaces.Interpolation.ApproxSpaces + +/- +Modified for Lean Pool: module names and imports adapted. +-/ + +/-! +# Sobolev spaces on `V` and real interpolation + +Let `V` have dimension `n ≥ 1`, `1 < p < ∞` and `m ≥ 1`. The **grid norm** of `W^m_p(V)` is +`‖f‖_p + inf ∑_α ‖g_α‖_p`, the infimum over the families of weak derivatives +`g_α = ∂_{e_{α_0}} ⋯ ∂_{e_{α_{m-1}}} f` along the basis `e` of `Rd.gridBasis` +(`Rd.sobolevGridNorm`). Weak derivatives are unique, so the grid norm is +`‖f‖_p + ∑_α ‖∂^{e_α} f‖_p` whenever these derivatives exist (`Rd.sobolevGridNorm_eq`), and it is +finite exactly on `W^m_p(V)` (`Rd.sobolevGridNorm_lt_top_iff`). It lies between the dyadic +quasi-norms of the Besov spaces `B^m_{p,max(p,2)}` and `B^m_{p,min(p,2)}`, with the named +constants `Rd.approxSobolevGridConst` and `Rd.sobolevGridApproxConst` +(`Rd.approxNormDyadic_le_sobolevGridNorm`, `Rd.sobolevGridNorm_le_approxNormDyadic`), so the +sandwich principle gives, for `0 < θ, η < 1` and `1 ≤ q ≤ ∞`, + +`(L_p, W^m_p)_{θ,q} = B^{θm}_{p,q}` (`Rd.memKMethod_lpSobolevCouple_iff`) and +`(W^{m₀}_p, W^{m₁}_p)_{η,q} = B^{(1-η)m₀+ηm₁}_{p,q}` for `1 ≤ m₀ < m₁` +(`Rd.memKMethod_sobolevCouple_iff`). + +By the interpolation property, an additive map bounded on `L_p` and on `W^m_p` is bounded on +`B^{θm}_{p,q}` (`Rd.kMethodNorm_map_le_of_bounded_lp_sobolev`, +`Rd.memApprox_map_of_bounded_lp_sobolev`). +-/ + +@[expose] public section + +open MeasureTheory Module +open scoped ENNReal +open ENNReal (dyadicWeight) + +namespace Rd + +variable {V : Type*} [NormedAddCommGroup V] [InnerProductSpace ℝ V] [FiniteDimensional ℝ V] + [MeasurableSpace V] [BorelSpace V] + +variable {p : ℝ≥0∞} [Fact (1 ≤ p)] + +/-! ### The grid norm of `W^m_p` -/ + +/-- The **grid norm of `W^m_p(V)`**: `‖f‖_p + inf ∑_α ‖g_α‖_p`, the infimum over all families +`(g_α)_α` in `L_p(V)`, indexed by the multi-indices `α = (α_0, …, α_{m-1})` with entries below +`n`, such that `g_α` is the weak derivative `∂_{e_{α_0}} ⋯ ∂_{e_{α_{m-1}}} f` along the basis `e` +of `Rd.gridBasis`. It is finite exactly when all these weak derivatives exist in `L_p(V)` +(`Rd.exists_hasWeakLineDeriv_of_sobolevGridNorm_lt_top`, `Rd.sobolevGridNorm_le`). -/ +noncomputable def sobolevGridNorm (m : ℕ) (f : Lp ℂ p (volume : Measure V)) : ℝ≥0∞ := + ‖f‖ₑ + ⨅ (g : (Fin m → Fin (finrank ℝ V)) → Lp ℂ p (volume : Measure V)) + (_ : ∀ i, HasWeakLineDeriv ⊤ (fun k => gridBasis V (i k)) f (g i)), ∑ i, ‖g i‖ₑ + +/-- The grid norm is at most `‖f‖_p + ∑_α ‖g_α‖_p` for every family `(g_α)` of weak derivatives +of `f` of order `m` along the basis vectors. -/ +theorem sobolevGridNorm_le {m : ℕ} {f : Lp ℂ p (volume : Measure V)} + {g : (Fin m → Fin (finrank ℝ V)) → Lp ℂ p (volume : Measure V)} + (hg : ∀ i, HasWeakLineDeriv ⊤ (fun k => gridBasis V (i k)) f (g i)) : + sobolevGridNorm m f ≤ ‖f‖ₑ + ∑ i, ‖g i‖ₑ := + add_le_add_right (iInf₂_le g hg) _ + +/-- **The grid norm is `‖f‖_p + ∑_α ‖∂^{e_α} f‖_p`**: if `(g_α)` is a family of weak derivatives +of `f` of order `m` along the basis vectors, then the grid norm of `f` equals +`‖f‖_p + ∑_α ‖g_α‖_p`. The infimum runs over one family only, since weak derivatives on `V` are +unique in `L_p(V)` (`Rd.HasWeakLineDeriv.eq_of_top`). -/ +theorem sobolevGridNorm_eq {m : ℕ} {f : Lp ℂ p (volume : Measure V)} + {g : (Fin m → Fin (finrank ℝ V)) → Lp ℂ p (volume : Measure V)} + (hg : ∀ i, HasWeakLineDeriv ⊤ (fun k => gridBasis V (i k)) f (g i)) : + sobolevGridNorm m f = ‖f‖ₑ + ∑ i, ‖g i‖ₑ := + le_antisymm (sobolevGridNorm_le hg) (add_le_add_right (le_iInf₂ fun g' hg' => by + rw [funext fun i => (hg i).eq_of_top (hg' i)]) _) + +/-- **A finite grid norm comes from weak derivatives**: if the grid norm of `f` is finite, then +`f` has weak derivatives `g_α ∈ L_p(V)` of order `m` along the basis vectors for every +multi-index `α`. -/ +theorem exists_hasWeakLineDeriv_of_sobolevGridNorm_lt_top {m : ℕ} + {f : Lp ℂ p (volume : Measure V)} (hf : sobolevGridNorm m f < ∞) : + ∃ g : (Fin m → Fin (finrank ℝ V)) → Lp ℂ p (volume : Measure V), + ∀ i, HasWeakLineDeriv ⊤ (fun k => gridBasis V (i k)) f (g i) := by + obtain ⟨g, hg⟩ := iInf_lt_iff.1 (lt_of_le_of_lt le_add_self hf) + exact ⟨g, (iInf_lt_iff.1 hg).choose⟩ + +/-- **Every `f ∈ W^m_p(V)` has finite grid norm**: the weak derivatives along the basis vectors +exist in `L_p(V)` (`Rd.memSobolev_iff_exists_hasWeakLineDeriv`). -/ +theorem sobolevGridNorm_lt_top_of_memSobolev {m : ℕ} {f : Lp ℂ p (volume : Measure V)} + (hf : MemSobolev m f) : sobolevGridNorm m f < ∞ := by + have hd : ∀ i : Fin m → Fin (finrank ℝ V), ∃ g : Lp ℂ p (volume : Measure V), + HasWeakLineDeriv ⊤ (fun k => gridBasis V (i k)) f g := fun i => + (memSobolev_iff_exists_hasWeakLineDeriv f).1 hf m le_rfl _ + choose g hg using hd + exact (sobolevGridNorm_le hg).trans_lt + (ENNReal.add_lt_top.2 ⟨eNorm_lt_top, ENNReal.sum_lt_top.2 fun _ _ => eNorm_lt_top⟩) + +/-- **The grid norm is finite exactly on `W^m_p(V)`**: in dimension `n ≥ 1`, for `1 < p < ∞`, +`m ∈ ℕ` and `f ∈ L_p(V)`, the grid norm of `f` is finite iff `f ∈ W^m_p(V)`. Weak derivatives +of order `m` along the basis vectors give `f ∈ F^m_{p,2}(V) = W^m_p(V)` +(`Rd.memTriebelLizorkin_of_hasWeakLineDeriv`, `Rd.memSobolev_iff_memTriebelLizorkin`). -/ +theorem sobolevGridNorm_lt_top_iff [Nontrivial V] (hp1 : 1 < p) (hp : p ≠ ∞) {m : ℕ} + {f : Lp ℂ p (volume : Measure V)} : sobolevGridNorm m f < ∞ ↔ MemSobolev m f := by + refine ⟨fun hf => ?_, sobolevGridNorm_lt_top_of_memSobolev⟩ + obtain ⟨g, hg⟩ := exists_hasWeakLineDeriv_of_sobolevGridNorm_lt_top hf + exact (memSobolev_iff_memTriebelLizorkin hp1 hp f).2 + (memTriebelLizorkin_of_hasWeakLineDeriv hp1 hp hg) + +/-! ### The grid norm between two Besov quasi-norms -/ + +variable (V p) in +/-- The constant `2 (1 - 2^{-m})⁻¹ (‖Φ‖_1 + 2^m ∑_α K_α)` of the bound of the Besov quasi-norm of +`B^m_{p,max(p,2)}` by the grid norm, with `K_α = Rd.sobolevToTLConst V p α`. -/ +noncomputable def approxSobolevGridConst (m : ℕ) : ℝ≥0∞ := + 2 * (1 - (2 : ℝ≥0∞) ^ (-(m : ℝ)))⁻¹ * + (eLpNorm (lpKernel (V := V)) 1 volume + 2 ^ m * ∑ i : Fin m → Fin (finrank ℝ V), + sobolevToTLConst V p i) + +omit [Fact (1 ≤ p)] in +/-- The constant `Rd.approxSobolevGridConst V p m` is finite for `1 < p < ∞` and `m ≥ 1`. -/ +theorem approxSobolevGridConst_ne_top (hp1 : 1 < p) (hp : p ≠ ∞) {m : ℕ} (hm : 1 ≤ m) : + approxSobolevGridConst V p m ≠ ∞ := + ENNReal.mul_ne_top (ENNReal.two_mul_one_sub_two_rpow_neg_inv_ne_top (Nat.cast_pos.2 hm)) + (ENNReal.add_ne_top.2 ⟨eLpNorm_lpKernel_ne_top, ENNReal.mul_ne_top + (ENNReal.pow_ne_top ENNReal.ofNat_ne_top) + (ENNReal.sum_ne_top.2 fun i _ => sobolevToTLConst_ne_top hp1 hp i)⟩) + +omit [Fact (1 ≤ p)] in +/-- The constant `Rd.approxSobolevGridConst V p m` is nonzero, since `‖Φ‖_1 ≥ 1` +(`Rd.one_le_eLpNorm_lpKernel`). -/ +theorem approxSobolevGridConst_ne_zero (m : ℕ) : approxSobolevGridConst V p m ≠ 0 := by + refine mul_ne_zero (mul_ne_zero two_ne_zero ?_) ?_ + · exact (zero_lt_one.trans_le (ENNReal.one_le_one_sub_two_rpow_neg_inv _)).ne' + · exact (zero_lt_one.trans_le (one_le_eLpNorm_lpKernel.trans le_self_add)).ne' + +/-- **The grid norm bounds `B^m_{p,max(p,2)}` for one family of derivatives**: under the +hypotheses of `Rd.approxNormDyadic_le_of_hasWeakLineDeriv`, the dyadic quasi-norm of `f` in +`A^m_{max(p,2)}` of the band-limited scheme is at most +`Rd.approxSobolevGridConst V p m · (‖f‖_p + ∑_α ‖g_α‖_p)`. -/ +theorem approxNormDyadic_le_of_hasWeakLineDeriv_sum [Nontrivial V] (hp1 : 1 < p) (hp : p ≠ ∞) + {m : ℕ} (hm : 1 ≤ m) {f : Lp ℂ p (volume : Measure V)} + {g : (Fin m → Fin (finrank ℝ V)) → Lp ℂ p (volume : Measure V)} + (hg : ∀ i, HasWeakLineDeriv ⊤ (fun k => gridBasis V (i k)) f (g i)) : + (bandScheme hp).approxNormDyadic (m : ℝ) (max p 2) f ≤ + approxSobolevGridConst V p m * (‖f‖ₑ + ∑ i, ‖g i‖ₑ) := by + have h : eLpNorm (lpKernel (V := V)) 1 volume * ‖f‖ₑ + + 2 ^ m * ∑ i, sobolevToTLConst V p i * ‖g i‖ₑ ≤ + (eLpNorm (lpKernel (V := V)) 1 volume + + 2 ^ m * ∑ i : Fin m → Fin (finrank ℝ V), sobolevToTLConst V p i) * + (‖f‖ₑ + ∑ i, ‖g i‖ₑ) := by + refine le_trans ?_ (ENNReal.mul_add_mul_le_add_mul_add _ _ _ _) + rw [mul_assoc] + exact add_le_add_right (mul_le_mul_right (ENNReal.sum_mul_le_sum_mul_sum _ _ _) _) _ + refine (approxNormDyadic_le_of_hasWeakLineDeriv hp1 hp hm hg).trans ?_ + rw [approxSobolevGridConst, mul_assoc _ (_ + _)] + exact mul_le_mul_right h _ + +/-- **`W^m_p ⊆ B^m_{p,max(p,2)}` for the grid norm**: in dimension `n ≥ 1`, for `1 < p < ∞`, +`m ≥ 1` and `f ∈ L_p(V)`, the dyadic quasi-norm of `f` in `A^m_{max(p,2)}` of the band-limited +scheme is at most `Rd.approxSobolevGridConst V p m` times the grid norm of `f`. -/ +theorem approxNormDyadic_le_sobolevGridNorm [Nontrivial V] (hp1 : 1 < p) (hp : p ≠ ∞) {m : ℕ} + (hm : 1 ≤ m) (f : Lp ℂ p (volume : Measure V)) : + (bandScheme hp).approxNormDyadic (m : ℝ) (max p 2) f ≤ + approxSobolevGridConst V p m * sobolevGridNorm m f := by + have hc0 := approxSobolevGridConst_ne_zero (V := V) (p := p) m + have hc := approxSobolevGridConst_ne_top (V := V) hp1 hp hm + rw [sobolevGridNorm, ENNReal.add_iInf₂, ENNReal.mul_iInf_of_ne hc0 hc] + refine le_iInf fun g => ?_ + rw [ENNReal.mul_iInf_of_ne hc0 hc] + exact le_iInf fun hg => approxNormDyadic_le_of_hasWeakLineDeriv_sum hp1 hp hm hg + +variable (V p) in +/-- The constant `1 + (∑_α C_α) · 8 · 2^{3m} ‖Φ‖_1` of the bound of the grid norm by the Besov +quasi-norm of `B^m_{p,min(p,2)}`, with `C_α = Rd.tlToSobolevConst p (e_{α_0}, …, e_{α_{m-1}})` +for the basis `e` of `Rd.gridBasis`. -/ +noncomputable def sobolevGridApproxConst (m : ℕ) : ℝ≥0∞ := + 1 + (∑ i : Fin m → Fin (finrank ℝ V), tlToSobolevConst p (fun k => gridBasis V (i k))) * + (8 * dyadicWeight (m : ℝ) 3 * eLpNorm (lpKernel (V := V)) 1 volume) + +omit [Fact (1 ≤ p)] in +/-- The constant `Rd.sobolevGridApproxConst V p m` is finite for `1 < p < ∞`. -/ +theorem sobolevGridApproxConst_ne_top (hp1 : 1 < p) (hp : p ≠ ∞) (m : ℕ) : + sobolevGridApproxConst V p m ≠ ∞ := + ENNReal.add_ne_top.2 ⟨ENNReal.one_ne_top, ENNReal.mul_ne_top + (ENNReal.sum_ne_top.2 fun _ _ => tlToSobolevConst_ne_top hp1 hp _) + (eight_mul_dyadicWeight_mul_eLpNorm_lpKernel_ne_top _)⟩ + +omit [Fact (1 ≤ p)] in +/-- The constant `Rd.sobolevGridApproxConst V p m` is nonzero: it is at least `1`. -/ +theorem sobolevGridApproxConst_ne_zero (m : ℕ) : sobolevGridApproxConst V p m ≠ 0 := + (zero_lt_one.trans_le (le_self_add : (1 : ℝ≥0∞) ≤ 1 + _)).ne' + +/-- **`B^m_{p,min(p,2)} ⊆ W^m_p` for the grid norm**: in dimension `n ≥ 1`, for `1 < p < ∞`, +`m ∈ ℕ` and `f ∈ L_p(V)`, the grid norm of `f` is at most `Rd.sobolevGridApproxConst V p m` times +the dyadic quasi-norm of `f` in `A^m_{min(p,2)}` of the band-limited scheme +(`Rd.exists_hasWeakLineDeriv_of_memApprox` for every multi-index). -/ +theorem sobolevGridNorm_le_approxNormDyadic [Nontrivial V] (hp1 : 1 < p) (hp : p ≠ ∞) (m : ℕ) + (f : Lp ℂ p (volume : Measure V)) : + sobolevGridNorm m f ≤ + sobolevGridApproxConst V p m * (bandScheme hp).approxNormDyadic (m : ℝ) (min p 2) f := by + by_cases hf : (bandScheme hp).MemApprox (m : ℝ) (min p 2) f + · have hd := fun i : Fin m → Fin (finrank ℝ V) => + exists_hasWeakLineDeriv_of_memApprox hp1 hp le_rfl (fun k => gridBasis V (i k)) hf + choose g hg hgn using hd + refine (sobolevGridNorm_le hg).trans ?_ + rw [sobolevGridApproxConst, add_mul, one_mul, mul_assoc, Finset.sum_mul] + gcongr with i + · exact (bandScheme hp).enorm_le_approxNormDyadic f + · exact hgn i + · have hN : (bandScheme hp).approxNormDyadic (m : ℝ) (min p 2) f = ∞ := by + by_contra h + exact hf ((ApproximationScheme.memApprox_iff_approxNormDyadic_lt_top + (le_min Fact.out one_le_two) (Nat.cast_nonneg m)).2 (lt_top_iff_ne_top.2 h)) + rw [hN, ENNReal.mul_top (sobolevGridApproxConst_ne_zero m)] + exact le_top + +/-! ### Real interpolation -/ + +/-- The **couple `(L_p, W^m_p)`** on `L_p(V)`: the `L_p` norm and the grid norm of `W^m_p(V)` +(`Rd.sobolevGridNorm`). -/ +noncomputable def lpSobolevCouple (m : ℕ) : InterpCouple (Lp ℂ p (volume : Measure V)) := + ⟨fun f => ‖f‖ₑ, sobolevGridNorm m⟩ + +/-- The first norm of `(L_p, W^m_p)` is the `L_p` norm. -/ +@[simp] +theorem lpSobolevCouple_norm0 {m : ℕ} (f : Lp ℂ p (volume : Measure V)) : + (lpSobolevCouple m).norm0 f = ‖f‖ₑ := rfl + +/-- The second norm of `(L_p, W^m_p)` is the grid norm of `W^m_p`. -/ +@[simp] +theorem lpSobolevCouple_norm1 {m : ℕ} (f : Lp ℂ p (volume : Measure V)) : + (lpSobolevCouple m).norm1 f = sobolevGridNorm m f := rfl + +/-- The **couple `(W^{m₀}_p, W^{m₁}_p)`** on `L_p(V)`: the grid norms of `W^{m₀}_p(V)` and +`W^{m₁}_p(V)`. -/ +noncomputable def sobolevCouple (m₀ m₁ : ℕ) : InterpCouple (Lp ℂ p (volume : Measure V)) := + ⟨sobolevGridNorm m₀, sobolevGridNorm m₁⟩ + +/-- The first norm of `(W^{m₀}_p, W^{m₁}_p)` is the grid norm of `W^{m₀}_p`. -/ +@[simp] +theorem sobolevCouple_norm0 {m₀ m₁ : ℕ} (f : Lp ℂ p (volume : Measure V)) : + (sobolevCouple m₀ m₁).norm0 f = sobolevGridNorm m₀ f := rfl + +/-- The second norm of `(W^{m₀}_p, W^{m₁}_p)` is the grid norm of `W^{m₁}_p`. -/ +@[simp] +theorem sobolevCouple_norm1 {m₀ m₁ : ℕ} (f : Lp ℂ p (volume : Measure V)) : + (sobolevCouple m₀ m₁).norm1 f = sobolevGridNorm m₁ f := rfl + +variable {θ η : ℝ} {q : ℝ≥0∞} + +/-- **`(L_p, W^m_p)_{θ,q} = B^{θm}_{p,q}`** (Bergh–Löfström, Theorem 6.4.5(4) with +`H^m_p = W^m_p` from Theorem 6.2.3): in dimension +`n ≥ 1`, for `1 < p < ∞`, `m ≥ 1`, `0 < θ < 1` and `1 ≤ q ≤ ∞`, `f ∈ L_p(V)` lies in the real +interpolation space of the couple `(L_p, W^m_p)` iff `f` lies in the approximation space +`A^{θm}_q` of the band-limited scheme, the Besov space `B^{θm}_{p,q}(V)`. The grid norm lies +between the quasi-norms of `B^m_{p,min(p,2)}` and `B^m_{p,max(p,2)}` +(`ApproximationScheme.memKMethod_iff_memApprox_of_sandwich`). -/ +theorem memKMethod_lpSobolevCouple_iff [Nontrivial V] (hp1 : 1 < p) (hp : p ≠ ∞) {m : ℕ} + (hm : 1 ≤ m) (hθ : 0 < θ) (hθ' : θ < 1) (hq : 1 ≤ q) {f : Lp ℂ p (volume : Measure V)} : + (lpSobolevCouple m).MemKMethod θ q f ↔ (bandScheme hp).MemApprox (θ * m) q f := + ApproximationScheme.memKMethod_iff_memApprox_of_sandwich (N₁ := sobolevGridNorm m) + (sobolevGridApproxConst_ne_top hp1 hp m) (approxSobolevGridConst_ne_top hp1 hp hm) + (le_min Fact.out one_le_two) (le_max_of_le_right one_le_two) (Nat.cast_pos.2 hm) hθ hθ' hq + (sobolevGridNorm_le_approxNormDyadic hp1 hp m) (approxNormDyadic_le_sobolevGridNorm hp1 hp hm) + +/-- **`(W^{m₀}_p, W^{m₁}_p)_{η,q} = B^{(1-η)m₀+ηm₁}_{p,q}`** (Bergh–Löfström, +Theorem 6.4.5(4) with `H^m_p = W^m_p` from Theorem 6.2.3): in dimension `n ≥ 1`, for +`1 < p < ∞`, orders `1 ≤ m₀ < m₁`, `0 < η < 1` and `1 ≤ q ≤ ∞`, `f ∈ L_p(V)` lies in the real +interpolation space of the couple `(W^{m₀}_p, W^{m₁}_p)` iff `f` lies in the Besov space +`B^{(1-η)m₀+ηm₁}_{p,q}(V)`, the approximation space of the band-limited scheme +(`ApproximationScheme.memKMethod_iff_memApprox_of_two_sandwiches`). -/ +theorem memKMethod_sobolevCouple_iff [Nontrivial V] (hp1 : 1 < p) (hp : p ≠ ∞) {m₀ m₁ : ℕ} + (hm₀ : 1 ≤ m₀) (hm : m₀ < m₁) (hη : 0 < η) (hη' : η < 1) (hq : 1 ≤ q) + {f : Lp ℂ p (volume : Measure V)} : + (sobolevCouple m₀ m₁).MemKMethod η q f ↔ + (bandScheme hp).MemApprox ((1 - η) * m₀ + η * m₁) q f := + ApproximationScheme.memKMethod_iff_memApprox_of_two_sandwiches (N₀ := sobolevGridNorm m₀) + (N₁ := sobolevGridNorm m₁) (sobolevGridApproxConst_ne_top hp1 hp m₀) + (approxSobolevGridConst_ne_top hp1 hp hm₀) (sobolevGridApproxConst_ne_top hp1 hp m₁) + (approxSobolevGridConst_ne_top hp1 hp (hm₀.trans hm.le)) (le_min Fact.out one_le_two) + (le_max_of_le_right one_le_two) (le_min Fact.out one_le_two) (le_max_of_le_right one_le_two) + (Nat.cast_pos.2 hm₀) (Nat.cast_lt.2 hm) hη hη' hq + (sobolevGridNorm_le_approxNormDyadic hp1 hp m₀) (approxNormDyadic_le_sobolevGridNorm hp1 hp hm₀) + (sobolevGridNorm_le_approxNormDyadic hp1 hp m₁) + (approxNormDyadic_le_sobolevGridNorm hp1 hp (hm₀.trans hm.le)) + +/-! ### Operators bounded on `L_p` and on `W^m_p` -/ + +/-- **An operator bounded on `L_p` and on `W^m_p` is bounded on the interpolation space** +(Bergh–Löfström, Theorem 3.1.2): if `T : L_p(V) → L_p(V)` is additive with `‖T f‖_p ≤ M₀ ‖f‖_p` +and `‖T f‖_{W^m_p} ≤ M₁ ‖f‖_{W^m_p}` in the grid norm for every `f`, and `0 < M₀, M₁ < ∞`, then +`‖T f‖_{K,θ,q} ≤ M₀^(1-θ) M₁^θ ‖f‖_{K,θ,q}` in the K-norm of `(L_p, W^m_p)`, whose space is +`B^{θm}_{p,q}` for `n ≥ 1`, `1 < p < ∞`, `m ≥ 1`, `0 < θ < 1` and `1 ≤ q ≤ ∞` +(`Rd.memKMethod_lpSobolevCouple_iff`). -/ +theorem kMethodNorm_map_le_of_bounded_lp_sobolev {m : ℕ} + (T : Lp ℂ p (volume : Measure V) →+ Lp ℂ p (volume : Measure V)) {M₀ M₁ : ℝ≥0∞} + (hM₀ : M₀ ≠ 0) (hM₀' : M₀ ≠ ∞) (hM₁ : M₁ ≠ 0) (hM₁' : M₁ ≠ ∞) + (h₀ : ∀ f, ‖T f‖ₑ ≤ M₀ * ‖f‖ₑ) (h₁ : ∀ f, sobolevGridNorm m (T f) ≤ M₁ * sobolevGridNorm m f) + (f : Lp ℂ p (volume : Measure V)) : + (lpSobolevCouple m).kMethodNorm θ q (T f) ≤ + M₀ ^ (1 - θ) * M₁ ^ θ * (lpSobolevCouple m).kMethodNorm θ q f := + InterpCouple.kMethodNorm_map_le T hM₀ hM₀' hM₁ hM₁' h₀ h₁ f + +/-- **An operator bounded on `L_p` and on `W^m_p` maps `B^{θm}_{p,q}` into itself**: in dimension +`n ≥ 1`, for `1 < p < ∞`, `m ≥ 1`, `0 < θ < 1` and `1 ≤ q ≤ ∞`, if `T : L_p(V) → L_p(V)` is +additive with `‖T f‖_p ≤ M₀ ‖f‖_p` and `‖T f‖_{W^m_p} ≤ M₁ ‖f‖_{W^m_p}` in the grid norm with +finite `M₀, M₁`, then `T f ∈ B^{θm}_{p,q}(V)` for every `f ∈ B^{θm}_{p,q}(V)` +(`InterpCouple.MemKMethod.map`, `Rd.memKMethod_lpSobolevCouple_iff`). -/ +theorem memApprox_map_of_bounded_lp_sobolev [Nontrivial V] (hp1 : 1 < p) (hp : p ≠ ∞) {m : ℕ} + (hm : 1 ≤ m) (hθ : 0 < θ) (hθ' : θ < 1) (hq : 1 ≤ q) + (T : Lp ℂ p (volume : Measure V) →+ Lp ℂ p (volume : Measure V)) {M₀ M₁ : ℝ≥0∞} + (hM₀ : M₀ ≠ ∞) (hM₁ : M₁ ≠ ∞) (h₀ : ∀ f, ‖T f‖ₑ ≤ M₀ * ‖f‖ₑ) + (h₁ : ∀ f, sobolevGridNorm m (T f) ≤ M₁ * sobolevGridNorm m f) + {f : Lp ℂ p (volume : Measure V)} (hf : (bandScheme hp).MemApprox (θ * m) q f) : + (bandScheme hp).MemApprox (θ * m) q (T f) := + (memKMethod_lpSobolevCouple_iff hp1 hp hm hθ hθ' hq).1 + (InterpCouple.MemKMethod.map (A := lpSobolevCouple m) (B := lpSobolevCouple m) T hM₀ hM₁ h₀ h₁ + ((memKMethod_lpSobolevCouple_iff hp1 hp hm hθ hθ' hq).2 hf)) + +end Rd diff --git a/LeanPool/FunctionSpaces/Rd/Interpolation/TriebelLizorkinInterpolation.lean b/LeanPool/FunctionSpaces/Rd/Interpolation/TriebelLizorkinInterpolation.lean new file mode 100644 index 0000000000..1828e60bb1 --- /dev/null +++ b/LeanPool/FunctionSpaces/Rd/Interpolation/TriebelLizorkinInterpolation.lean @@ -0,0 +1,149 @@ +/- +Copyright (c) 2026 Mario Ullrich. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Mario Ullrich +-/ +module + +public import LeanPool.FunctionSpaces.Rd.TriebelLizorkin.TriebelLizorkin +public import LeanPool.FunctionSpaces.ApproximationSpaces.Interpolation.ApproxSpaces + +/- +Modified for Lean Pool: module names and imports adapted. +-/ + +/-! +# Triebel–Lizorkin spaces on `V` and real interpolation + +Let `1 ≤ p < ∞`, `0 < η < 1` and `1 ≤ q₀, q₁, q ≤ ∞`. The Triebel–Lizorkin quasi-norm of +`F^s_{p,q}` lies between the dyadic quasi-norms of `B^s_{p,max(p,q)}` and `B^s_{p,min(p,q)}` +(`Rd.approxNormDyadic_le_triebelLizorkinNorm`, `Rd.triebelLizorkinNorm_le_approxNormDyadic`), +so the sandwich principle gives, for `0 < s₀ < s₁` and `s = (1-η)s₀ + ηs₁`, + +`(F^{s₀}_{p,q₀}, F^{s₁}_{p,q₁})_{η,q} = B^s_{p,q}` and `(L_p, F^{s₁}_{p,q₁})_{η,q} = B^{ηs₁}_{p,q}` + +(`Rd.memKMethod_triebelLizorkinCouple_iff`, `Rd.memKMethod_lpTriebelLizorkinCouple_iff`), and the +same for every couple of quasi-norms equivalent to these +(`Rd.memKMethod_iff_memApprox_of_triebelLizorkin_equiv`, +`Rd.memKMethod_iff_memApprox_of_triebelLizorkin_equiv_left`). +-/ + +@[expose] public section + +open MeasureTheory +open scoped ENNReal + +namespace Rd + +variable {V : Type*} [NormedAddCommGroup V] [InnerProductSpace ℝ V] [FiniteDimensional ℝ V] + [MeasurableSpace V] [BorelSpace V] {p : ℝ≥0∞} [Fact (1 ≤ p)] {s₀ s₁ η : ℝ} + {q₀ q₁ q : ℝ≥0∞} + +/-! ### Triebel–Lizorkin spaces -/ + +/-- The **couple `(F^{s₀}_{p,q₀}, F^{s₁}_{p,q₁})`** on `L_p(V)`: the two Triebel–Lizorkin +quasi-norms. -/ +noncomputable def triebelLizorkinCouple (s₀ : ℝ) (q₀ : ℝ≥0∞) (s₁ : ℝ) (q₁ : ℝ≥0∞) : + InterpCouple (Lp ℂ p (volume : Measure V)) := + ⟨triebelLizorkinNorm s₀ q₀, triebelLizorkinNorm s₁ q₁⟩ + +omit [Fact (1 ≤ p)] in +/-- The first norm of `(F^{s₀}_{p,q₀}, F^{s₁}_{p,q₁})` is the quasi-norm of `F^{s₀}_{p,q₀}`. -/ +@[simp] +theorem triebelLizorkinCouple_norm0 (f : Lp ℂ p (volume : Measure V)) : + (triebelLizorkinCouple s₀ q₀ s₁ q₁).norm0 f = triebelLizorkinNorm s₀ q₀ f := rfl + +omit [Fact (1 ≤ p)] in +/-- The second norm of `(F^{s₀}_{p,q₀}, F^{s₁}_{p,q₁})` is the quasi-norm of `F^{s₁}_{p,q₁}`. -/ +@[simp] +theorem triebelLizorkinCouple_norm1 (f : Lp ℂ p (volume : Measure V)) : + (triebelLizorkinCouple s₀ q₀ s₁ q₁).norm1 f = triebelLizorkinNorm s₁ q₁ f := rfl + +/-- The **couple `(L_p, F^{s₁}_{p,q₁})`** on `L_p(V)`: the `L_p` norm and the Triebel–Lizorkin +quasi-norm. -/ +noncomputable def lpTriebelLizorkinCouple (s₁ : ℝ) (q₁ : ℝ≥0∞) : + InterpCouple (Lp ℂ p (volume : Measure V)) := + ⟨fun f => ‖f‖ₑ, triebelLizorkinNorm s₁ q₁⟩ + +/-- The first norm of `(L_p, F^{s₁}_{p,q₁})` is the `L_p` norm. -/ +@[simp] +theorem lpTriebelLizorkinCouple_norm0 (f : Lp ℂ p (volume : Measure V)) : + (lpTriebelLizorkinCouple s₁ q₁).norm0 f = ‖f‖ₑ := rfl + +/-- The second norm of `(L_p, F^{s₁}_{p,q₁})` is the quasi-norm of `F^{s₁}_{p,q₁}`. -/ +@[simp] +theorem lpTriebelLizorkinCouple_norm1 (f : Lp ℂ p (volume : Measure V)) : + (lpTriebelLizorkinCouple s₁ q₁).norm1 f = triebelLizorkinNorm s₁ q₁ f := rfl + +/-- **Triebel–Lizorkin spaces interpolate to Besov spaces** (Triebel 1978, +Section 2.4): for `1 ≤ p < ∞`, `0 < s₀ < s₁`, `0 < η < 1` and +`1 ≤ q₀, q₁, q ≤ ∞`, `f ∈ L_p(V)` lies in the real interpolation space +`(F^{s₀}_{p,q₀}, F^{s₁}_{p,q₁})_{η,q}` iff `f` lies in the Besov space +`B^{(1-η)s₀+ηs₁}_{p,q}(V)`, the approximation space of the band-limited scheme. The +Triebel–Lizorkin quasi-norms lie between two Besov quasi-norms of the same smoothness +(`ApproximationScheme.memKMethod_iff_memApprox_of_two_sandwiches`). -/ +theorem memKMethod_triebelLizorkinCouple_iff (hp : p ≠ ∞) (hs₀ : 0 < s₀) (hs : s₀ < s₁) + (hη : 0 < η) (hη' : η < 1) (hq₀ : 1 ≤ q₀) (hq₁ : 1 ≤ q₁) (hq : 1 ≤ q) + {f : Lp ℂ p (volume : Measure V)} : + (triebelLizorkinCouple s₀ q₀ s₁ q₁).MemKMethod η q f ↔ + (bandScheme hp).MemApprox ((1 - η) * s₀ + η * s₁) q f := + ApproximationScheme.memKMethod_iff_memApprox_of_two_sandwiches + (N₀ := triebelLizorkinNorm s₀ q₀) (N₁ := triebelLizorkinNorm s₁ q₁) + (eight_mul_dyadicWeight_mul_eLpNorm_lpKernel_ne_top s₀) + (ENNReal.two_mul_one_sub_two_rpow_neg_inv_ne_top hs₀) + (eight_mul_dyadicWeight_mul_eLpNorm_lpKernel_ne_top s₁) + (ENNReal.two_mul_one_sub_two_rpow_neg_inv_ne_top (hs₀.trans hs)) (le_min Fact.out hq₀) + (le_max_of_le_right hq₀) (le_min Fact.out hq₁) (le_max_of_le_right hq₁) hs₀ hs hη hη' hq + (triebelLizorkinNorm_le_approxNormDyadic hp hs₀.le hq₀) + (approxNormDyadic_le_triebelLizorkinNorm hp hs₀ hq₀) + (triebelLizorkinNorm_le_approxNormDyadic hp (hs₀.trans hs).le hq₁) + (approxNormDyadic_le_triebelLizorkinNorm hp (hs₀.trans hs) hq₁) + +/-- **`L_p` and a Triebel–Lizorkin space interpolate to Besov spaces**: for `1 ≤ p < ∞`, +`s₁ > 0`, `0 < η < 1` and `1 ≤ q₁, q ≤ ∞`, `f ∈ L_p(V)` lies in the real interpolation space +`(L_p, F^{s₁}_{p,q₁})_{η,q}` iff `f` lies in the Besov space `B^{ηs₁}_{p,q}(V)` +(`ApproximationScheme.memKMethod_iff_memApprox_of_sandwich`). -/ +theorem memKMethod_lpTriebelLizorkinCouple_iff (hp : p ≠ ∞) (hs₁ : 0 < s₁) (hη : 0 < η) + (hη' : η < 1) (hq₁ : 1 ≤ q₁) (hq : 1 ≤ q) {f : Lp ℂ p (volume : Measure V)} : + (lpTriebelLizorkinCouple s₁ q₁).MemKMethod η q f ↔ (bandScheme hp).MemApprox (η * s₁) q f := + ApproximationScheme.memKMethod_iff_memApprox_of_sandwich (N₁ := triebelLizorkinNorm s₁ q₁) + (eight_mul_dyadicWeight_mul_eLpNorm_lpKernel_ne_top s₁) + (ENNReal.two_mul_one_sub_two_rpow_neg_inv_ne_top hs₁) (le_min Fact.out hq₁) + (le_max_of_le_right hq₁) hs₁ hη hη' hq (triebelLizorkinNorm_le_approxNormDyadic hp hs₁.le hq₁) + (approxNormDyadic_le_triebelLizorkinNorm hp hs₁ hq₁) + +/-- **Couples equivalent to Triebel–Lizorkin couples interpolate to Besov spaces**: for +`1 ≤ p < ∞`, `0 < s₀ < s₁`, `0 < η < 1` and `1 ≤ q₀, q₁, q ≤ ∞`, if `N₀` is equivalent to the +quasi-norm of `F^{s₀}_{p,q₀}` and `N₁` to that of `F^{s₁}_{p,q₁}`, with finite constants, then +`f ∈ (N₀, N₁)_{η,q}` iff `f ∈ B^{(1-η)s₀+ηs₁}_{p,q}(V)` (`InterpCouple.memKMethod_congr`). -/ +theorem memKMethod_iff_memApprox_of_triebelLizorkin_equiv (hp : p ≠ ∞) + {N₀ N₁ : Lp ℂ p (volume : Measure V) → ℝ≥0∞} {c₀ c₀' c₁ c₁' : ℝ≥0∞} (hc₀ : c₀ ≠ ∞) + (hc₀' : c₀' ≠ ∞) (hc₁ : c₁ ≠ ∞) (hc₁' : c₁' ≠ ∞) (hs₀ : 0 < s₀) (hs : s₀ < s₁) + (hη : 0 < η) (hη' : η < 1) (hq₀ : 1 ≤ q₀) (hq₁ : 1 ≤ q₁) (hq : 1 ≤ q) + (h₀ : ∀ f, N₀ f ≤ c₀ * triebelLizorkinNorm s₀ q₀ f) + (h₀' : ∀ f, triebelLizorkinNorm s₀ q₀ f ≤ c₀' * N₀ f) + (h₁ : ∀ f, N₁ f ≤ c₁ * triebelLizorkinNorm s₁ q₁ f) + (h₁' : ∀ f, triebelLizorkinNorm s₁ q₁ f ≤ c₁' * N₁ f) {f : Lp ℂ p (volume : Measure V)} : + (⟨N₀, N₁⟩ : InterpCouple (Lp ℂ p (volume : Measure V))).MemKMethod η q f ↔ + (bandScheme hp).MemApprox ((1 - η) * s₀ + η * s₁) q f := + (InterpCouple.memKMethod_congr (A := ⟨N₀, N₁⟩) (B := triebelLizorkinCouple s₀ q₀ s₁ q₁) + hc₀' hc₁' hc₀ hc₁ h₀' h₁' h₀ h₁).trans + (memKMethod_triebelLizorkinCouple_iff hp hs₀ hs hη hη' hq₀ hq₁ hq) + +/-- **Couples of `L_p` and a quasi-norm equivalent to a Triebel–Lizorkin quasi-norm interpolate to +Besov spaces**: for `1 ≤ p < ∞`, `s₁ > 0`, `0 < η < 1` and `1 ≤ q₁, q ≤ ∞`, if `N₁` is +equivalent to the quasi-norm of `F^{s₁}_{p,q₁}` with finite constants, then +`f ∈ (L_p, N₁)_{η,q}` iff `f ∈ B^{ηs₁}_{p,q}(V)`. -/ +theorem memKMethod_iff_memApprox_of_triebelLizorkin_equiv_left (hp : p ≠ ∞) + {N₁ : Lp ℂ p (volume : Measure V) → ℝ≥0∞} {c₁ c₁' : ℝ≥0∞} (hc₁ : c₁ ≠ ∞) (hc₁' : c₁' ≠ ∞) + (hs₁ : 0 < s₁) (hη : 0 < η) (hη' : η < 1) (hq₁ : 1 ≤ q₁) (hq : 1 ≤ q) + (h₁ : ∀ f, N₁ f ≤ c₁ * triebelLizorkinNorm s₁ q₁ f) + (h₁' : ∀ f, triebelLizorkinNorm s₁ q₁ f ≤ c₁' * N₁ f) {f : Lp ℂ p (volume : Measure V)} : + (⟨fun f => ‖f‖ₑ, N₁⟩ : InterpCouple (Lp ℂ p (volume : Measure V))).MemKMethod η q f ↔ + (bandScheme hp).MemApprox (η * s₁) q f := + (InterpCouple.memKMethod_congr (A := ⟨fun f => ‖f‖ₑ, N₁⟩) + (B := lpTriebelLizorkinCouple s₁ q₁) ENNReal.one_ne_top hc₁' ENNReal.one_ne_top hc₁ + (fun a => (one_mul ‖a‖ₑ).ge) h₁' (fun a => (one_mul ‖a‖ₑ).ge) h₁).trans + (memKMethod_lpTriebelLizorkinCouple_iff hp hs₁ hη hη' hq₁ hq) + +end Rd diff --git a/LeanPool/FunctionSpaces/Rd/LittlewoodPaley/LittlewoodPaley.lean b/LeanPool/FunctionSpaces/Rd/LittlewoodPaley/LittlewoodPaley.lean new file mode 100644 index 0000000000..ab1ac3a59a --- /dev/null +++ b/LeanPool/FunctionSpaces/Rd/LittlewoodPaley/LittlewoodPaley.lean @@ -0,0 +1,182 @@ +/- +Copyright (c) 2026 Mario Ullrich. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Mario Ullrich +-/ +module + +public import LeanPool.FunctionSpaces.Rd.Approximation.BandLimited +public import LeanPool.FunctionSpaces.ApproximationSpaces.Decompositions.Blocks + +/- +Modified for Lean Pool: module names and imports adapted. +-/ + +/-! +# The Littlewood–Paley decomposition and band-limited approximation + +For `f ∈ L_p(V)`, `1 ≤ p < ∞`, the **Littlewood–Paley blocks** are `Δ_j f = ψ_j ⋆ f` +(`Rd.lpBlock`), with `ψ_0 = Φ_0` and `ψ_j = Φ_j - Φ_{j-1}` (`Rd.psi`). They are bounded uniformly, +`‖Δ_j f‖_p ≤ 2 ‖Φ‖_1 ‖f‖_p` (`Rd.enorm_lpBlock_le`), their partial sums are `Φ_J ⋆ f` +(`Rd.sum_lpBlock`), and these converge to `f` in `L_p` (`Rd.tendsto_sum_lpBlock`, an approximate +identity). The **Littlewood–Paley quasi-norm** is `‖(2^(js) ‖Δ_j f‖_p)_j‖_{ℓ_q}` +(`Rd.littlewoodPaleyNorm`). + +**Band-limited approximation and Littlewood–Paley blocks** (`Rd.memApprox_bandScheme_iff`): for +`s > 0` and `1 ≤ q ≤ ∞`, `f ∈ A^s_q(L_p, (E_k))` iff its Littlewood–Paley quasi-norm is finite, +and the two quasi-norms are equivalent (`Rd.approxNormDyadic_bandScheme_le`, +`Rd.littlewoodPaleyNorm_le_approxNormDyadic`). Both directions come from the kernel identities: + +* the blocks are band-limited, `Δ_j f ∈ E_j`, since `Θ_j ⋆ ψ_j = ψ_j` + (`Rd.lpBlock_mem_bandSpace`); a finite quasi-norm makes `f = ∑ Δ_j f` absolutely convergent + (`Rd.hasSum_lpBlock`), a block decomposition in the sense of + `ApproximationScheme.blockDecompNorm`; +* high blocks of band-limited functions vanish, `Δ_j g = 0` for `g ∈ E_i` and `j ≥ i + 3`, since + `ψ_j ⋆ Θ_i = 0` (`Rd.lpBlock_eq_zero_of_mem`); hence `Δ_j f = Δ_j (f - g)` and + `‖Δ_j f‖_p ≤ 2 ‖Φ‖_1 E(f, E_i)_p` (`Rd.enorm_lpBlock_le_approxError`). +-/ + +@[expose] public section + +open MeasureTheory Filter Topology +open scoped ENNReal + +namespace Rd + +open ENNReal (lqNorm dyadicWeight) + +variable {V : Type*} [NormedAddCommGroup V] [InnerProductSpace ℝ V] [FiniteDimensional ℝ V] + [MeasurableSpace V] [BorelSpace V] {p : ℝ≥0∞} [Fact (1 ≤ p)] + +/-! ### The blocks -/ + +/-- The **Littlewood–Paley block** `Δ_j f = ψ_j ⋆ f` of `f ∈ L_p`. -/ +noncomputable def lpBlock (hp : p ≠ ∞) (j : ℕ) : + Lp ℂ p (volume : Measure V) →L[ℂ] Lp ℂ p (volume : Measure V) := + convLp hp (integrable_psi j) + +/-- **The blocks are bounded uniformly**: `‖Δ_j f‖_p ≤ 2 ‖Φ‖_1 ‖f‖_p`. -/ +theorem enorm_lpBlock_le (hp : p ≠ ∞) (j : ℕ) (f : Lp ℂ p (volume : Measure V)) : + ‖lpBlock hp j f‖ₑ ≤ 2 * eLpNorm (lpKernel (V := V)) 1 volume * ‖f‖ₑ := + (enorm_convLp_le hp (integrable_psi j) f).trans (by gcongr; exact eLpNorm_psi_one_le j) + +/-- `Δ_{j+1} f = Φ_{j+1} ⋆ f - Φ_j ⋆ f`. -/ +theorem lpBlock_succ (hp : p ≠ ∞) (j : ℕ) (f : Lp ℂ p (volume : Measure V)) : + lpBlock hp (j + 1) f = + convLp hp (integrable_Phi (j + 1)) f - convLp hp (integrable_Phi j) f := + convLp_sub_kernel hp (integrable_Phi (j + 1)) (integrable_Phi j) f + +/-- **The blocks telescope**: `∑_{j ≤ J} Δ_j f = Φ_J ⋆ f`. -/ +theorem sum_lpBlock (hp : p ≠ ∞) (J : ℕ) (f : Lp ℂ p (volume : Measure V)) : + ∑ j ∈ Finset.range (J + 1), lpBlock hp j f = convLp hp (integrable_Phi J) f := by + induction J with + | zero => + rw [Finset.sum_range_one] + rfl + | succ J ih => rw [Finset.sum_range_succ, ih, lpBlock_succ, add_sub_cancel] + +/-- **Reconstruction**: the partial sums of the blocks converge to `f` in `L_p`, since +`Φ_J ⋆ f → f` (`Rd.tendsto_convLp_dilate` with `∫ Φ = 1`). -/ +theorem tendsto_sum_lpBlock (hp : p ≠ ∞) (f : Lp ℂ p (volume : Measure V)) : + Tendsto (fun J => ∑ j ∈ Finset.range J, lpBlock hp j f) atTop (𝓝 f) := by + have h : Tendsto (fun J => convLp hp (integrable_Phi (V := V) J) f) atTop (𝓝 f) := + tendsto_convLp_dilate hp integrable_lpKernel integral_lpKernel + (c := fun J : ℕ => (2 : ℝ) ^ J) (fun J => pow_ne_zero J two_ne_zero) + (tendsto_pow_atTop_atTop_of_one_lt one_lt_two) f + rw [← tendsto_add_atTop_iff_nat 1] + simpa only [sum_lpBlock] using h + +/-! ### Blocks and band-limited functions -/ + +/-- **The blocks are band-limited**: `Δ_j f ∈ E_j`, since `Θ_j ⋆ ψ_j = ψ_j`. -/ +theorem lpBlock_mem_bandSpace (hp : p ≠ ∞) (j : ℕ) (f : Lp ℂ p (volume : Measure V)) : + lpBlock hp j f ∈ bandSpace hp j := by + rw [mem_bandSpace, lpBlock] + exact convLp_convLp_of_eq hp _ _ _ (conv_Theta_psi j) f + +/-- **High blocks of band-limited functions vanish**: `Δ_j g = 0` for `g ∈ E_i` and `j ≥ i + 3`, +since `ψ_j ⋆ Θ_i = 0`. -/ +theorem lpBlock_eq_zero_of_mem (hp : p ≠ ∞) {i j : ℕ} (hij : i + 3 ≤ j) + {g : Lp ℂ p (volume : Measure V)} (hg : g ∈ bandSpace hp i) : lpBlock hp j g = 0 := by + rw [mem_bandSpace] at hg + rw [lpBlock, ← hg, convLp_convLp_of_eq hp _ _ (integrable_zero _ _ _) (conv_psi_Theta hij) g] + exact convLp_of_eq_zero hp _ rfl g + +/-- **Blocks see only the error of band-limited approximation**: for `j ≥ i + 3`, +`‖Δ_j f‖_p ≤ 2 ‖Φ‖_1 E(f, E_i)_p`. -/ +theorem enorm_lpBlock_le_approxError (hp : p ≠ ∞) {i j : ℕ} (hij : i + 3 ≤ j) + (f : Lp ℂ p (volume : Measure V)) : + ‖lpBlock hp j f‖ₑ ≤ + 2 * eLpNorm (lpKernel (V := V)) 1 volume * (bandScheme hp).approxError f (2 ^ i) := by + refine ApproximationScheme.le_mul_approxError_of_forall_mem + (ENNReal.mul_ne_top (by norm_num) eLpNorm_lpKernel_ne_top) fun a ha => ?_ + have h0 : lpBlock hp j a = 0 := lpBlock_eq_zero_of_mem hp hij (mem_bandScheme_two_pow.1 ha) + rw [show lpBlock hp j f = lpBlock hp j (f - a) by rw [map_sub, h0, sub_zero]] + exact enorm_lpBlock_le hp j (f - a) + +/-! ### The Littlewood–Paley quasi-norm -/ + +/-- The **Littlewood–Paley quasi-norm** `‖(2^(js) ‖Δ_j f‖_p)_j‖_{ℓ_q}`. -/ +noncomputable def littlewoodPaleyNorm (hp : p ≠ ∞) (s : ℝ) (q : ℝ≥0∞) + (f : Lp ℂ p (volume : Measure V)) : ℝ≥0∞ := + lqNorm q (fun j => dyadicWeight s j * ‖lpBlock hp j f‖ₑ) + +/-- **A finite Littlewood–Paley quasi-norm gives an absolutely convergent decomposition**: for +`s > 0`, `‖Δ_j f‖_p ≤ 2^(-js) ‖f‖_{LP}`, so `f = ∑_j Δ_j f` converges absolutely in `L_p`. -/ +theorem hasSum_lpBlock (hp : p ≠ ∞) {s : ℝ} (hs : 0 < s) {q : ℝ≥0∞} (hq : 1 ≤ q) + {f : Lp ℂ p (volume : Measure V)} (hf : littlewoodPaleyNorm hp s q f < ∞) : + HasSum (fun j => lpBlock hp j f) f := + HasSum.of_tendsto_of_lqNorm_dyadicWeight_lt_top hs hq (tendsto_sum_lpBlock hp f) hf + +/-! ### Band-limited approximation and Littlewood–Paley blocks -/ + +/-- **The approximation norm is controlled by the Littlewood–Paley quasi-norm**: for `s > 0`, +`‖f‖^dyadic ≤ 2 (1 - 2^(-s))⁻¹ ‖(2^(js) ‖Δ_j f‖_p)_j‖_q`, with the band-limited scheme. The +blocks form a block decomposition (`ApproximationScheme.approxNormDyadic_le_of_hasSum`). -/ +theorem approxNormDyadic_bandScheme_le (hp : p ≠ ∞) {s : ℝ} (hs : 0 < s) {q : ℝ≥0∞} + (hq : 1 ≤ q) (f : Lp ℂ p (volume : Measure V)) : + (bandScheme hp).approxNormDyadic s q f ≤ + 2 * (1 - (2 : ℝ≥0∞) ^ (-s))⁻¹ * littlewoodPaleyNorm hp s q f := by + rcases eq_or_ne (littlewoodPaleyNorm hp s q f) ∞ with h | h + · rw [h, ENNReal.mul_top (mul_ne_zero two_ne_zero + (zero_lt_one.trans_le (ENNReal.one_le_one_sub_two_rpow_neg_inv s)).ne')] + exact le_top + · exact ApproximationScheme.approxNormDyadic_le_of_hasSum hq + (fun j => mem_bandScheme_two_pow.2 (lpBlock_mem_bandSpace hp j f)) + (hasSum_lpBlock hp hs hq h.lt_top) + +/-- **The Littlewood–Paley quasi-norm is controlled by the approximation norm**: for `s ≥ 0`, +`‖(2^(js) ‖Δ_j f‖_p)_j‖_q ≤ 8 · 2^(3s) ‖Φ‖_1 ‖f‖^dyadic`, with the band-limited scheme. The first +three blocks are bounded by `‖f‖`, the block `Δ_{j+3} f` by `E(f, E_j)`. -/ +theorem littlewoodPaleyNorm_le_approxNormDyadic (hp : p ≠ ∞) {s : ℝ} (hs : 0 ≤ s) {q : ℝ≥0∞} + (hq : 1 ≤ q) (f : Lp ℂ p (volume : Measure V)) : + littlewoodPaleyNorm hp s q f ≤ + 8 * dyadicWeight s 3 * eLpNorm (lpKernel (V := V)) 1 volume * + (bandScheme hp).approxNormDyadic s q f := by + calc littlewoodPaleyNorm hp s q f + ≤ ((3 : ℕ) : ℝ≥0∞) * dyadicWeight s 3 * (2 * eLpNorm (lpKernel (V := V)) 1 volume) * + (bandScheme hp).approxNormDyadic s q f := + ApproximationScheme.lqNorm_dyadicWeight_mul_enorm_le_approxNormDyadic hs hq (by norm_num) + (fun j _ => enorm_lpBlock_le hp j f) fun n => enorm_lpBlock_le_approxError hp le_rfl f + _ = 6 * (dyadicWeight s 3 * eLpNorm (lpKernel (V := V)) 1 volume * + (bandScheme hp).approxNormDyadic s q f) := by push_cast; ring + _ ≤ 8 * (dyadicWeight s 3 * eLpNorm (lpKernel (V := V)) 1 volume * + (bandScheme hp).approxNormDyadic s q f) := by gcongr; norm_num + _ = _ := by ring + +/-- **Band-limited approximation and Littlewood–Paley blocks**: for `s > 0` and `1 ≤ q ≤ ∞`, +`f ∈ A^s_q(L_p, (E_k))` iff `(2^(js) ‖Δ_j f‖_p)_j ∈ ℓ_q`. -/ +theorem memApprox_bandScheme_iff (hp : p ≠ ∞) {s : ℝ} (hs : 0 < s) {q : ℝ≥0∞} (hq : 1 ≤ q) + {f : Lp ℂ p (volume : Measure V)} : + (bandScheme hp).MemApprox s q f ↔ littlewoodPaleyNorm hp s q f < ∞ := by + rw [ApproximationScheme.memApprox_iff_approxNormDyadic_lt_top hq hs.le] + constructor + · intro h + refine (littlewoodPaleyNorm_le_approxNormDyadic hp hs.le hq f).trans_lt + (ENNReal.mul_lt_top (ENNReal.mul_lt_top (ENNReal.mul_lt_top (by norm_num) + (ENNReal.dyadicWeight_lt_top s 3)) eLpNorm_lpKernel_lt_top) h) + · intro h + exact (approxNormDyadic_bandScheme_le hp hs hq f).trans_lt (ENNReal.mul_lt_top + (ENNReal.mul_lt_top (by norm_num) (ENNReal.one_sub_two_rpow_neg_inv_ne_top hs).lt_top) h) + +end Rd diff --git a/LeanPool/FunctionSpaces/Rd/LocalMeans/KernelMajorants.lean b/LeanPool/FunctionSpaces/Rd/LocalMeans/KernelMajorants.lean new file mode 100644 index 0000000000..b094b43f5b --- /dev/null +++ b/LeanPool/FunctionSpaces/Rd/LocalMeans/KernelMajorants.lean @@ -0,0 +1,1455 @@ +/- +Copyright (c) 2026 Mario Ullrich. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Mario Ullrich +-/ +module + +public import LeanPool.FunctionSpaces.Rd.Atoms.SmoothAtoms +public import LeanPool.FunctionSpaces.Rd.Approximation.BandInverse +public import LeanPool.FunctionSpaces.Analysis.Maximal.HardyLittlewoodMaximal + +/- +Modified for Lean Pool: module names and imports adapted. +-/ + +/-! +# Kernel majorants + +Pointwise bounds of convolution kernels by Peetre weights `2^(kn) (1 + 2^k ‖y‖)^(-N)`, the input +of the maximal function bounds behind the local means characterisation of Triebel–Lizorkin +spaces. Every constant is explicit. + +* **Decay of Schwartz functions**: the segment bound for differences + (`Rd.norm_higherDiff_le_of_segment`) and Peetre's inequality along a segment + (`Rd.one_add_norm_le_mul_of_mem_Icc`) give the decay of differences of Schwartz functions + (`Rd.enorm_higherDiff_schwartz_le`, constant `Rd.schwartzDecayConst`), their tails + (`Rd.lintegral_tail_schwartz_le`, constant `Rd.tailConst`), and the convolution of two Peetre + bumps (`Rd.lintegral_peetre_mul_le`, with the mass `Rd.peetreIntegral` of the weight and the + change of scale `Rd.lintegral_comp_smul`). +* **The cross kernel `k_j ⋆ Θ_i`** of the local means kernels and the band-limiting kernels + (`Rd.LocalMeansBump.enorm_conv_kernel_Theta_le`): for `i < j` the averaged differences of the + moment kernels act on the smooth `Θ_i`, one scale at a time + (`Rd.LocalMeansBump.ae_enorm_conv_kernel_le_of_scaled`); for `i ≥ j` the kernel `k_j` is + bounded and of small support (`Rd.LocalMeansBump.norm_kernel_le`, + `Rd.LocalMeansBump.kernel_eq_zero_of_lt`). +* **The cross kernel `ψ_j ⋆ η_i`** of the Littlewood–Paley blocks and the dual kernels + (`Rd.LocalMeansBump.enorm_conv_psi_dual_le`): for `i ≤ j` and `j ≥ 2` the block `ψ_j` + annihilates the moment kernel `μ_{2^(j-2)}` of `Φ` (`Rd.conv_psi_lpMomentScaled`, through the + Fourier transforms `Rd.fourier_dilate_momentKernel`), so + `ψ_j ⋆ η_i = ψ_j ⋆ (η_i - μ_{2^(j-2)} ⋆ η_i)`, and `η_i - μ_{2^(j-2)} ⋆ η_i` averages + differences of `η_i` with short steps; the remaining cases use the small support of `η_i`. + +Both bounds have the shape `|K(y)| ≤ C c_{ji} 2^(mn) (1 + 2^m ‖y‖)^(-N)` with `m = min(i, j)` and +`c_{ji} = 1` for `i > j`; for `i ≤ j`, `c_{ji} = 2^(-(j-i)L)` for `k_j ⋆ Θ_i` and +`c_{ji} = 2^(-(j-i)L')` for `ψ_j ⋆ η_i`, with the free order `L'` of the moment kernel of `Φ`. +Such kernels act below the Hardy–Littlewood maximal function: `|K ⋆ h(x)| ≤ C_{n,N} C M|h|(x)` +for every function `h` (`Rd.enorm_conv_le_maximal_of_decay`). +-/ + +@[expose] public section + +open MeasureTheory Module Metric Filter Set +open scoped ENNReal SchwartzMap Pointwise FourierTransform + +open ENNReal (dyadicWeight) + +namespace ENNReal + +/-! ### Peetre weights in `[0, ∞]` -/ + +/-- `X⁻¹ ≤ c Y⁻¹` in `[0, ∞]` whenever `Y ≤ c X` with `0 < c < ∞`. -/ +theorem inv_le_mul_inv_of_le {X Y c : ℝ≥0∞} (hc0 : c ≠ 0) (hc : c ≠ ∞) + (h : Y ≤ c * X) : X⁻¹ ≤ c * Y⁻¹ := by + calc X⁻¹ = c * (c * X)⁻¹ := by + rw [ENNReal.mul_inv (Or.inl hc0) (Or.inl hc), ← mul_assoc, ENNReal.mul_inv_cancel hc0 hc, + one_mul] + _ ≤ c * Y⁻¹ := by gcongr + +/-- `1 + a ≠ 0` in `[0, ∞]`. -/ +theorem one_add_ne_zero (a : ℝ≥0∞) : 1 + a ≠ 0 := + (lt_of_lt_of_le one_pos le_self_add).ne' + +/-- **Peetre's inequality** for the weights `(1 + a ‖·‖)^(-N)` in `[0, ∞]`: if `u ≤ v + w` and +`a, w < ∞`, then `(1 + a v)^(-N) ≤ (1 + a w)^N (1 + a u)^(-N)`, from +`1 + a u ≤ (1 + a w)(1 + a v)`. -/ +theorem inv_one_add_mul_pow_le {a u v w : ℝ≥0∞} (ha : a ≠ ∞) (hw : w ≠ ∞) (h : u ≤ v + w) + (N : ℕ) : ((1 + a * v) ^ N)⁻¹ ≤ (1 + a * w) ^ N * ((1 + a * u) ^ N)⁻¹ := by + refine ENNReal.inv_le_mul_inv_of_le (pow_ne_zero _ (one_add_ne_zero _)) + (ENNReal.pow_ne_top (ENNReal.add_ne_top.2 ⟨ENNReal.one_ne_top, ENNReal.mul_ne_top ha hw⟩)) ?_ + rw [← mul_pow] + refine pow_le_pow_left' ?_ N + calc 1 + a * u ≤ 1 + (a * v + a * w) := by rw [← mul_add]; gcongr + _ ≤ 1 + (a * v + a * w) + a * w * (a * v) := le_self_add + _ = (1 + a * w) * (1 + a * v) := by ring + +/-- The Peetre weights decrease with the scale: `(1 + b u)^(-N) ≤ (1 + a u)^(-N)` for `a ≤ b`. -/ +theorem inv_one_add_mul_pow_anti {a b : ℝ≥0∞} (hab : a ≤ b) (u : ℝ≥0∞) (N : ℕ) : + ((1 + b * u) ^ N)⁻¹ ≤ ((1 + a * u) ^ N)⁻¹ := + ENNReal.inv_le_inv.2 (by gcongr) + +/-- Halving the scale costs `2^N`: `(1 + a u)^(-N) ≤ 2^N (1 + 2 a u)^(-N)`. -/ +theorem inv_one_add_mul_pow_le_two_pow (a u : ℝ≥0∞) (N : ℕ) : + ((1 + a * u) ^ N)⁻¹ ≤ 2 ^ N * ((1 + 2 * a * u) ^ N)⁻¹ := by + refine ENNReal.inv_le_mul_inv_of_le (pow_ne_zero _ two_ne_zero) + (ENNReal.pow_ne_top ENNReal.ofNat_ne_top) ?_ + rw [← mul_pow] + refine pow_le_pow_left' ?_ N + calc 1 + 2 * a * u ≤ 2 + 2 * a * u := by gcongr; exact one_le_two + _ = 2 * (1 + a * u) := by ring + +/-- `(1 + a)^(-(k + r + m)) a^r ≤ (1 + a)^(-k) (1 + a)^(-m)` for `a < ∞`. -/ +theorem inv_one_add_pow_mul_pow_le {a : ℝ≥0∞} (ha : a ≠ ∞) (k r m : ℕ) : + ((1 + a) ^ (k + r + m))⁻¹ * a ^ r ≤ ((1 + a) ^ k)⁻¹ * ((1 + a) ^ m)⁻¹ := by + have hX0 : 1 + a ≠ 0 := one_add_ne_zero a + have hXt : 1 + a ≠ ∞ := ENNReal.add_ne_top.2 ⟨ENNReal.one_ne_top, ha⟩ + have h1 : (1 + a)⁻¹ * a ≤ 1 := by + calc (1 + a)⁻¹ * a ≤ (1 + a)⁻¹ * (1 + a) := by gcongr; exact le_add_self + _ = 1 := ENNReal.inv_mul_cancel hX0 hXt + rw [ENNReal.inv_pow, ENNReal.inv_pow, ENNReal.inv_pow] + calc (1 + a)⁻¹ ^ (k + r + m) * a ^ r = (1 + a)⁻¹ ^ k * (1 + a)⁻¹ ^ m * ((1 + a)⁻¹ * a) ^ r := by + ring + _ ≤ (1 + a)⁻¹ ^ k * (1 + a)⁻¹ ^ m * 1 := by gcongr; exact pow_le_one₀ zero_le h1 + _ = (1 + a)⁻¹ ^ k * (1 + a)⁻¹ ^ m := mul_one _ + +/-- `(1 + a)^(-2N) (1 + a)^N = (1 + a)^(-N)` for `a < ∞`. -/ +theorem inv_one_add_pow_two_mul_mul_pow {a : ℝ≥0∞} (ha : a ≠ ∞) (N : ℕ) : + ((1 + a) ^ (2 * N))⁻¹ * (1 + a) ^ N = ((1 + a) ^ N)⁻¹ := by + have h0 : (1 + a) ^ N ≠ 0 := pow_ne_zero _ (one_add_ne_zero a) + have ht : (1 + a) ^ N ≠ ∞ := ENNReal.pow_ne_top (ENNReal.add_ne_top.2 ⟨ENNReal.one_ne_top, ha⟩) + rw [two_mul, pow_add, ENNReal.mul_inv (Or.inl h0) (Or.inl ht), mul_assoc, + ENNReal.inv_mul_cancel h0 ht, mul_one] + +/-- Near the origin the Peetre weight is bounded below: if `a ≤ t` with `0 ≤ t`, then +`1 ≤ (1 + t)^N (1 + a)^(-N)`. -/ +theorem one_le_ofReal_mul_inv_of_le {a : ℝ≥0∞} {t : ℝ} (ht : 0 ≤ t) (h : a ≤ ENNReal.ofReal t) + (N : ℕ) : 1 ≤ ENNReal.ofReal ((1 + t) ^ N) * ((1 + a) ^ N)⁻¹ := by + have ha : a ≠ ∞ := ne_top_of_le_ne_top ENNReal.ofReal_ne_top h + have hX0 : (1 + a) ^ N ≠ 0 := pow_ne_zero _ (one_add_ne_zero a) + have hXt : (1 + a) ^ N ≠ ∞ := ENNReal.pow_ne_top (ENNReal.add_ne_top.2 ⟨ENNReal.one_ne_top, ha⟩) + calc 1 = (1 + a) ^ N * ((1 + a) ^ N)⁻¹ := (ENNReal.mul_inv_cancel hX0 hXt).symm + _ ≤ ENNReal.ofReal ((1 + t) ^ N) * ((1 + a) ^ N)⁻¹ := by + rw [ENNReal.ofReal_pow (by positivity), ENNReal.ofReal_add zero_le_one ht, + ENNReal.ofReal_one] + gcongr + +end ENNReal + +namespace Rd + +variable {V : Type*} [NormedAddCommGroup V] [InnerProductSpace ℝ V] [FiniteDimensional ℝ V] + [MeasurableSpace V] [BorelSpace V] + +/-! ### Peetre weights -/ + +omit [InnerProductSpace ℝ V] [FiniteDimensional ℝ V] [MeasurableSpace V] [BorelSpace V] in +/-- Peetre's inequality for norms: `(1 + a ‖y - w‖)^(-N) ≤ (1 + a ‖w‖)^N (1 + a ‖y‖)^(-N)` for +`a < ∞`. -/ +theorem inv_one_add_mul_enorm_sub_pow_le {a : ℝ≥0∞} (ha : a ≠ ∞) (y w : V) (N : ℕ) : + ((1 + a * ‖y - w‖ₑ) ^ N)⁻¹ ≤ (1 + a * ‖w‖ₑ) ^ N * ((1 + a * ‖y‖ₑ) ^ N)⁻¹ := by + refine ENNReal.inv_one_add_mul_pow_le ha eNorm_ne_top ?_ N + calc ‖y‖ₑ = ‖(y - w) + w‖ₑ := by rw [sub_add_cancel] + _ ≤ ‖y - w‖ₑ + ‖w‖ₑ := eNorm_add_le _ _ + +omit [InnerProductSpace ℝ V] [FiniteDimensional ℝ V] [MeasurableSpace V] [BorelSpace V] in +/-- The bridge to Mathlib's `finite_integral_one_add_norm`: +`ofReal ((1 + ‖x‖)^(-N)) = (1 + ‖x‖)^(-N)` in `[0, ∞]`. -/ +theorem ofReal_one_add_norm_rpow_neg (x : V) (N : ℕ) : + ENNReal.ofReal ((1 + ‖x‖) ^ (-(N : ℝ))) = ((1 + ‖x‖ₑ) ^ N)⁻¹ := by + rw [Real.rpow_neg (by positivity), Real.rpow_natCast, ENNReal.ofReal_inv_of_pos (by positivity), + ENNReal.ofReal_pow (by positivity), ENNReal.ofReal_add zero_le_one (norm_nonneg _), + ENNReal.ofReal_one, ofReal_norm] + +omit [InnerProductSpace ℝ V] [FiniteDimensional ℝ V] [MeasurableSpace V] [BorelSpace V] in +/-- `ofReal ((1 + a ‖x‖)^(-N)) = (1 + a ‖x‖)^(-N)` in `[0, ∞]` for `a ≥ 0`. -/ +theorem ofReal_inv_one_add_mul_norm_pow {a : ℝ} (ha : 0 ≤ a) (x : V) (N : ℕ) : + ENNReal.ofReal (((1 + a * ‖x‖) ^ N)⁻¹) = ((1 + ENNReal.ofReal a * ‖x‖ₑ) ^ N)⁻¹ := by + rw [ENNReal.ofReal_inv_of_pos (by positivity), ENNReal.ofReal_pow (by positivity), + ENNReal.ofReal_add zero_le_one (by positivity), ENNReal.ofReal_one, ENNReal.ofReal_mul ha, + ofReal_norm] + +omit [InnerProductSpace ℝ V] [FiniteDimensional ℝ V] [MeasurableSpace V] [BorelSpace V] in +/-- A point of norm at most `ρ 2^(-k)` has `2^k ‖w‖ ≤ ρ`, in `[0, ∞]`. -/ +theorem two_pow_mul_enorm_le_ofReal {k : ℕ} {ρ : ℝ} {w : V} (h : ‖w‖ ≤ ρ / 2 ^ k) : + 2 ^ k * ‖w‖ₑ ≤ ENNReal.ofReal ρ := by + rw [← ENNReal.ofReal_ofNat 2, ← ENNReal.ofReal_pow zero_le_two, ← ofReal_norm, + ← ENNReal.ofReal_mul (by positivity)] + refine ENNReal.ofReal_le_ofReal ?_ + rw [le_div_iff₀ (by positivity)] at h + linarith + +/-! ### Decay of Schwartz functions and of their differences -/ + +/-- The constant `2^N (sup ‖D^r G‖ + sup ‖x‖^N ‖D^r G(x)‖)` of the decay of the derivatives of +order `r` of a Schwartz function `G`, through two of its seminorms. -/ +noncomputable def schwartzDecayConst (G : 𝓢(V, ℂ)) (r N : ℕ) : ℝ≥0∞ := + 2 ^ N * ENNReal.ofReal (SchwartzMap.seminorm ℝ 0 r G + SchwartzMap.seminorm ℝ N r G) + +omit [FiniteDimensional ℝ V] [MeasurableSpace V] [BorelSpace V] in +/-- The decay constant of a Schwartz function is finite. -/ +theorem schwartzDecayConst_ne_top (G : 𝓢(V, ℂ)) (r N : ℕ) : schwartzDecayConst G r N ≠ ∞ := + ENNReal.mul_ne_top (ENNReal.pow_ne_top ENNReal.ofNat_ne_top) ENNReal.ofReal_ne_top + +omit [FiniteDimensional ℝ V] [MeasurableSpace V] [BorelSpace V] in +/-- `(1 + ‖x‖)^N ‖D^r G(x)‖ ≤ 2^N (sup ‖D^r G‖ + sup ‖x‖^N ‖D^r G(x)‖)` for a Schwartz function +`G`, from `(1 + t)^N ≤ 2^N (1 + t^N)`. Mathlib's `SchwartzMap.one_add_le_sup_seminorm_apply` is +the same kind of bound with the supremum over a range of seminorms. -/ +theorem one_add_norm_pow_mul_le_schwartz (G : 𝓢(V, ℂ)) (r N : ℕ) (x : V) : + (1 + ‖x‖) ^ N * ‖iteratedFDeriv ℝ r G x‖ ≤ + 2 ^ N * (SchwartzMap.seminorm ℝ 0 r G + SchwartzMap.seminorm ℝ N r G) := by + have h0 := SchwartzMap.le_seminorm ℝ 0 r G x + have hN := SchwartzMap.le_seminorm ℝ N r G x + rw [pow_zero, one_mul] at h0 + calc (1 + ‖x‖) ^ N * ‖iteratedFDeriv ℝ r G x‖ + ≤ 2 ^ N * (1 + ‖x‖ ^ N) * ‖iteratedFDeriv ℝ r G x‖ := + mul_le_mul_of_nonneg_right (one_add_pow_le_two_pow_mul (norm_nonneg x) N) + (norm_nonneg _) + _ = 2 ^ N * (‖iteratedFDeriv ℝ r G x‖ + ‖x‖ ^ N * ‖iteratedFDeriv ℝ r G x‖) := by ring + _ ≤ _ := by gcongr + +omit [FiniteDimensional ℝ V] [MeasurableSpace V] [BorelSpace V] in +/-- **Peetre's inequality along a segment**: `1 + ‖y‖ ≤ (1 + ‖y + t v‖)(1 + r ‖v‖)` for +`0 ≤ t ≤ r`. -/ +theorem one_add_norm_le_mul_of_mem_Icc {r t : ℝ} (ht : t ∈ Set.Icc 0 r) (v y : V) : + 1 + ‖y‖ ≤ (1 + ‖y + t • v‖) * (1 + r * ‖v‖) := by + have h1 : ‖y‖ ≤ ‖y + t • v‖ + t * ‖v‖ := by + calc ‖y‖ = ‖(y + t • v) - t • v‖ := by rw [add_sub_cancel_right] + _ ≤ ‖y + t • v‖ + ‖t • v‖ := norm_sub_le _ _ + _ = ‖y + t • v‖ + t * ‖v‖ := by rw [norm_smul, Real.norm_of_nonneg ht.1] + have h2 : t * ‖v‖ ≤ r * ‖v‖ := mul_le_mul_of_nonneg_right ht.2 (norm_nonneg v) + have h3 : 0 ≤ ‖y + t • v‖ * (r * ‖v‖) := + mul_nonneg (norm_nonneg _) (mul_nonneg (ht.1.trans ht.2) (norm_nonneg v)) + nlinarith + +omit [FiniteDimensional ℝ V] [MeasurableSpace V] [BorelSpace V] in +/-- The derivatives of order `r` of a Schwartz function along the segment from `y` to `y + r v` +are at most `2^N (sup ‖D^r G‖ + sup ‖x‖^N ‖D^r G(x)‖) (1 + r ‖v‖)^N (1 + ‖y‖)^(-N)`. -/ +theorem norm_iteratedFDeriv_schwartz_le_of_mem_Icc (G : 𝓢(V, ℂ)) (r N : ℕ) (v y : V) {t : ℝ} + (ht : t ∈ Set.Icc (0 : ℝ) r) : + ‖iteratedFDeriv ℝ r G (y + t • v)‖ ≤ + 2 ^ N * (SchwartzMap.seminorm ℝ 0 r G + SchwartzMap.seminorm ℝ N r G) * + (1 + r * ‖v‖) ^ N / (1 + ‖y‖) ^ N := by + have hz := one_add_norm_pow_mul_le_schwartz G r N (y + t • v) + have hpeetre : (1 + ‖y‖) ^ N ≤ (1 + ‖y + t • v‖) ^ N * (1 + r * ‖v‖) ^ N := by + rw [← mul_pow] + exact pow_le_pow_left₀ (by positivity) (one_add_norm_le_mul_of_mem_Icc ht v y) N + rw [le_div_iff₀ (by positivity)] + calc ‖iteratedFDeriv ℝ r G (y + t • v)‖ * (1 + ‖y‖) ^ N + ≤ ‖iteratedFDeriv ℝ r G (y + t • v)‖ * ((1 + ‖y + t • v‖) ^ N * (1 + r * ‖v‖) ^ N) := by + gcongr + _ = (1 + ‖y + t • v‖) ^ N * ‖iteratedFDeriv ℝ r G (y + t • v)‖ * (1 + r * ‖v‖) ^ N := by + ring + _ ≤ _ := by gcongr + +omit [FiniteDimensional ℝ V] [MeasurableSpace V] [BorelSpace V] in +/-- **Differences of Schwartz functions with decay**: for a Schwartz function `G`, +`|Δ_v^r G(y)| ≤ C ‖v‖^r (1 + r ‖v‖)^N (1 + ‖y‖)^(-N)` with +`C = Rd.schwartzDecayConst G r N`, by the segment bound for differences and Peetre's +inequality. -/ +theorem enorm_higherDiff_schwartz_le (G : 𝓢(V, ℂ)) (r N : ℕ) (v y : V) : + ‖(fwdDiff v)^[r] (G : V → ℂ) y‖ₑ ≤ + schwartzDecayConst G r N * ‖v‖ₑ ^ r * (1 + r * ‖v‖ₑ) ^ N * ((1 + ‖y‖ₑ) ^ N)⁻¹ := by + set S := 2 ^ N * (SchwartzMap.seminorm ℝ 0 r G + SchwartzMap.seminorm ℝ N r G) with hS + have hS0 : 0 ≤ S := by positivity + have hreal := norm_higherDiff_le_of_segment r (G.smooth r) v y + (C := S * (1 + r * ‖v‖) ^ N / (1 + ‖y‖) ^ N) + fun t ht => norm_iteratedFDeriv_schwartz_le_of_mem_Icc G r N v y ht + rw [← ofReal_norm] + refine (ENNReal.ofReal_le_ofReal hreal).trans_eq ?_ + have e1 : ENNReal.ofReal S = schwartzDecayConst G r N := by + rw [hS, ENNReal.ofReal_mul (by positivity), ENNReal.ofReal_pow zero_le_two, + ENNReal.ofReal_ofNat, schwartzDecayConst] + have e2 : ENNReal.ofReal ((1 + r * ‖v‖) ^ N) = (1 + r * ‖v‖ₑ) ^ N := by + rw [ENNReal.ofReal_pow (by positivity), ENNReal.ofReal_add zero_le_one (by positivity), + ENNReal.ofReal_one, ENNReal.ofReal_mul (Nat.cast_nonneg r), ENNReal.ofReal_natCast, + ofReal_norm] + have e3 : ENNReal.ofReal (((1 + ‖y‖) ^ N)⁻¹) = ((1 + ‖y‖ₑ) ^ N)⁻¹ := by + have h := ofReal_inv_one_add_mul_norm_pow zero_le_one y N + rwa [one_mul, ENNReal.ofReal_one, one_mul] at h + have e4 : ENNReal.ofReal (‖v‖ ^ r) = ‖v‖ₑ ^ r := by + rw [ENNReal.ofReal_pow (norm_nonneg _), ofReal_norm] + rw [div_eq_mul_inv, ENNReal.ofReal_mul (by positivity), ENNReal.ofReal_mul (by positivity), + ENNReal.ofReal_mul hS0, e1, e2, e3, e4] + ring + +omit [FiniteDimensional ℝ V] [MeasurableSpace V] [BorelSpace V] in +/-- **Decay of Schwartz functions**: `|G(y)| ≤ C (1 + ‖y‖)^(-N)` with +`C = Rd.schwartzDecayConst G 0 N`. -/ +theorem enorm_schwartz_le (G : 𝓢(V, ℂ)) (N : ℕ) (y : V) : + ‖G y‖ₑ ≤ schwartzDecayConst G 0 N * ((1 + ‖y‖ₑ) ^ N)⁻¹ := by + simpa using enorm_higherDiff_schwartz_le G 0 N 0 y + +omit [InnerProductSpace ℝ V] [FiniteDimensional ℝ V] [MeasurableSpace V] [BorelSpace V] in +/-- `‖2^j v‖ = 2^j ‖v‖` in `[0, ∞]`. -/ +theorem enorm_two_pow_smul [NormedSpace ℝ V] (j : ℕ) (v : V) : + ‖((2 : ℝ) ^ j) • v‖ₑ = 2 ^ j * ‖v‖ₑ := by + rw [eNorm_smul, ← ofReal_norm, Real.norm_of_nonneg (by positivity), + ENNReal.ofReal_pow zero_le_two, ENNReal.ofReal_ofNat] + +omit [FiniteDimensional ℝ V] [MeasurableSpace V] [BorelSpace V] in +/-- `|Φ_{2^j}(y)| = 2^(jn) |Φ(2^j y)|`. -/ +theorem enorm_dilate_two_pow (Φ : V → ℂ) (j : ℕ) (y : V) : + ‖dilate (2 ^ j) Φ y‖ₑ = 2 ^ (j * finrank ℝ V) * ‖Φ (((2 : ℝ) ^ j) • y)‖ₑ := by + have hc : ‖(((((2 : ℝ) ^ j) ^ finrank ℝ V : ℝ)) : ℂ)‖ₑ = 2 ^ (j * finrank ℝ V) := by + rw [← ofReal_norm, Complex.norm_real, Real.norm_of_nonneg (by positivity), ← pow_mul, + ENNReal.ofReal_pow zero_le_two, ENNReal.ofReal_ofNat] + rw [dilate, eNorm_mul, hc] + +omit [FiniteDimensional ℝ V] [MeasurableSpace V] [BorelSpace V] in +/-- **Decay of dilated Schwartz functions**: +`|G_{2^j}(y)| ≤ C 2^(jn) (1 + 2^j ‖y‖)^(-N)` with `C = Rd.schwartzDecayConst G 0 N`. -/ +theorem enorm_dilate_schwartz_le (G : 𝓢(V, ℂ)) (N j : ℕ) (y : V) : + ‖dilate (2 ^ j) G y‖ₑ ≤ + schwartzDecayConst G 0 N * 2 ^ (j * finrank ℝ V) * ((1 + 2 ^ j * ‖y‖ₑ) ^ N)⁻¹ := by + have h := enorm_schwartz_le G N (((2 : ℝ) ^ j) • y) + rw [enorm_two_pow_smul] at h + rw [enorm_dilate_two_pow] + calc 2 ^ (j * finrank ℝ V) * ‖G (((2 : ℝ) ^ j) • y)‖ₑ + ≤ 2 ^ (j * finrank ℝ V) * (schwartzDecayConst G 0 N * ((1 + 2 ^ j * ‖y‖ₑ) ^ N)⁻¹) := by + gcongr + _ = _ := by ring + +/-! ### Tails -/ + +variable (V) in +/-- The integral `∫ (1 + ‖u‖)^(-M) du` of the Peetre weight, finite for `M > n`. -/ +noncomputable def peetreIntegral (M : ℕ) : ℝ≥0∞ := ∫⁻ u : V, ((1 + ‖u‖ₑ) ^ M)⁻¹ + +/-- The integral of the Peetre weight is finite for `M > n` (Mathlib's +`finite_integral_one_add_norm`). -/ +theorem peetreIntegral_ne_top {M : ℕ} (hM : finrank ℝ V < M) : peetreIntegral V M ≠ ∞ := by + have h := finite_integral_one_add_norm (E := V) (μ := (volume : Measure V)) (r := (M : ℝ)) + (by exact_mod_cast hM) + simp only [ofReal_one_add_norm_rpow_neg] at h + exact h.ne + +/-- The constant `schwartzDecayConst G 0 (N + r + n + 1) · ∫ (1 + ‖u‖)^(-(n+1)) du` of the +tails of a Schwartz function. -/ +noncomputable def tailConst (G : 𝓢(V, ℂ)) (r N : ℕ) : ℝ≥0∞ := + schwartzDecayConst G 0 (N + r + finrank ℝ V + 1) * peetreIntegral V (finrank ℝ V + 1) + +/-- The tail constant of a Schwartz function is finite. -/ +theorem tailConst_ne_top (G : 𝓢(V, ℂ)) (r N : ℕ) : tailConst G r N ≠ ∞ := + ENNReal.mul_ne_top (schwartzDecayConst_ne_top _ _ _) + (peetreIntegral_ne_top (Nat.lt_succ_self _)) + +omit [FiniteDimensional ℝ V] [MeasurableSpace V] [BorelSpace V] in +/-- The integrand of the tails: for `‖z‖ ≥ ρ`, +`|G(z)| ‖z‖^r ≤ C (1 + max(ρ, 0))^(-N) (1 + ‖z‖)^(-(n+1))` with +`C = Rd.schwartzDecayConst G 0 (N + r + n + 1)`. -/ +theorem enorm_mul_enorm_pow_le_of_le (G : 𝓢(V, ℂ)) (r N : ℕ) {ρ : ℝ} {z : V} + (hz : ρ ≤ ‖z‖) : + ‖G z‖ₑ * ‖z‖ₑ ^ r ≤ schwartzDecayConst G 0 (N + r + finrank ℝ V + 1) * + ((1 + ENNReal.ofReal ρ) ^ N)⁻¹ * ((1 + ‖z‖ₑ) ^ (finrank ℝ V + 1))⁻¹ := by + have h1 := enorm_schwartz_le G (N + r + finrank ℝ V + 1) z + have h2 := ENNReal.inv_one_add_pow_mul_pow_le (a := ‖z‖ₑ) eNorm_ne_top N r (finrank ℝ V + 1) + have h3 : ((1 + ‖z‖ₑ) ^ N)⁻¹ ≤ ((1 + ENNReal.ofReal ρ) ^ N)⁻¹ := by + have hρz : ENNReal.ofReal ρ ≤ ‖z‖ₑ := by + rw [← ofReal_norm] + exact ENNReal.ofReal_le_ofReal hz + exact ENNReal.inv_le_inv.2 (by gcongr) + rw [← add_assoc] at h2 + calc ‖G z‖ₑ * ‖z‖ₑ ^ r + ≤ schwartzDecayConst G 0 (N + r + finrank ℝ V + 1) * + ((1 + ‖z‖ₑ) ^ (N + r + finrank ℝ V + 1))⁻¹ * ‖z‖ₑ ^ r := by gcongr + _ ≤ schwartzDecayConst G 0 (N + r + finrank ℝ V + 1) * + (((1 + ‖z‖ₑ) ^ N)⁻¹ * ((1 + ‖z‖ₑ) ^ (finrank ℝ V + 1))⁻¹) := by + rw [mul_assoc]; gcongr + _ ≤ schwartzDecayConst G 0 (N + r + finrank ℝ V + 1) * + (((1 + ENNReal.ofReal ρ) ^ N)⁻¹ * ((1 + ‖z‖ₑ) ^ (finrank ℝ V + 1))⁻¹) := by gcongr + _ = _ := by ring + +/-- **Tails of Schwartz functions**: for every real `ρ`, +`∫_{‖z‖ ≥ ρ} |G(z)| ‖z‖^r dz ≤ C (1 + max(ρ, 0))^(-N)` with `C = Rd.tailConst G r N`. -/ +theorem lintegral_tail_schwartz_le (G : 𝓢(V, ℂ)) (r N : ℕ) (ρ : ℝ) : + ∫⁻ z in {z : V | ρ ≤ ‖z‖}, ‖G z‖ₑ * ‖z‖ₑ ^ r ≤ + tailConst G r N * ((1 + ENNReal.ofReal ρ) ^ N)⁻¹ := by + have hs : MeasurableSet {z : V | ρ ≤ ‖z‖} := measurableSet_le measurable_const measurable_norm + have hρ : ((1 + ENNReal.ofReal ρ) ^ N)⁻¹ ≠ ∞ := by + refine ENNReal.inv_ne_top.2 (pow_ne_zero _ ?_) + simp + have hc : schwartzDecayConst G 0 (N + r + finrank ℝ V + 1) * + ((1 + ENNReal.ofReal ρ) ^ N)⁻¹ ≠ ∞ := + ENNReal.mul_ne_top (schwartzDecayConst_ne_top _ _ _) hρ + calc ∫⁻ z in {z : V | ρ ≤ ‖z‖}, ‖G z‖ₑ * ‖z‖ₑ ^ r + ≤ ∫⁻ z in {z : V | ρ ≤ ‖z‖}, schwartzDecayConst G 0 (N + r + finrank ℝ V + 1) * + ((1 + ENNReal.ofReal ρ) ^ N)⁻¹ * ((1 + ‖z‖ₑ) ^ (finrank ℝ V + 1))⁻¹ := + setLIntegral_mono' hs fun z hz => enorm_mul_enorm_pow_le_of_le G r N hz + _ ≤ ∫⁻ z, schwartzDecayConst G 0 (N + r + finrank ℝ V + 1) * + ((1 + ENNReal.ofReal ρ) ^ N)⁻¹ * ((1 + ‖z‖ₑ) ^ (finrank ℝ V + 1))⁻¹ := + setLIntegral_le_lintegral _ _ + _ = schwartzDecayConst G 0 (N + r + finrank ℝ V + 1) * ((1 + ENNReal.ofReal ρ) ^ N)⁻¹ * + peetreIntegral V (finrank ℝ V + 1) := lintegral_const_mul' _ _ hc + _ = tailConst G r N * ((1 + ENNReal.ofReal ρ) ^ N)⁻¹ := by rw [tailConst]; ring + +/-- The mass of the dilated Peetre weight: +`∫ 2^(jn) (1 + 2^j ‖u‖)^(-N) du = ∫ (1 + ‖u‖)^(-N) du`. -/ +theorem lintegral_dilate_peetre (j N : ℕ) : + ∫⁻ u : V, 2 ^ (j * finrank ℝ V) * ((1 + 2 ^ j * ‖u‖ₑ) ^ N)⁻¹ = peetreIntegral V N := by + have h := lintegral_comp_two_pow_smul (V := V) (μ := volume) (fun u => ((1 + ‖u‖ₑ) ^ N)⁻¹) j + simp only [enorm_two_pow_smul] at h + rw [lintegral_const_mul' _ _ (ENNReal.pow_ne_top ENNReal.ofNat_ne_top), h, peetreIntegral, + ← mul_assoc, ENNReal.mul_inv_cancel (pow_ne_zero _ two_ne_zero) + (ENNReal.pow_ne_top ENNReal.ofNat_ne_top), one_mul] + +/-! ### Convolution of two Peetre bumps -/ + +omit [InnerProductSpace ℝ V] [FiniteDimensional ℝ V] [MeasurableSpace V] [BorelSpace V] in +/-- The integrand of the convolution of two Peetre bumps, pointwise: for `i ≤ j`, +`2^(jn) (1 + 2^j ‖y - w‖)^(-2N) 2^(in) (1 + 2^i ‖w‖)^(-N)` is at most +`2^(jn) (1 + 2^j ‖y - w‖)^(-N) 2^(in) (1 + 2^i ‖y‖)^(-N)`. -/ +theorem peetre_mul_peetre_le {i j : ℕ} (hij : i ≤ j) (N n : ℕ) (y w : V) : + 2 ^ (j * n) * ((1 + 2 ^ j * ‖y - w‖ₑ) ^ (2 * N))⁻¹ * + (2 ^ (i * n) * ((1 + 2 ^ i * ‖w‖ₑ) ^ N)⁻¹) ≤ + 2 ^ (j * n) * ((1 + 2 ^ j * ‖y - w‖ₑ) ^ N)⁻¹ * + (2 ^ (i * n) * ((1 + 2 ^ i * ‖y‖ₑ) ^ N)⁻¹) := by + have h2 : (2 : ℝ≥0∞) ^ i ≤ 2 ^ j := pow_le_pow_right₀ one_le_two hij + have hP : ((1 + 2 ^ i * ‖w‖ₑ) ^ N)⁻¹ ≤ + (1 + 2 ^ j * ‖y - w‖ₑ) ^ N * ((1 + 2 ^ i * ‖y‖ₑ) ^ N)⁻¹ := by + have hyw : ‖y‖ₑ ≤ ‖w‖ₑ + ‖y - w‖ₑ := by + calc ‖y‖ₑ = ‖w + (y - w)‖ₑ := by rw [add_sub_cancel] + _ ≤ ‖w‖ₑ + ‖y - w‖ₑ := eNorm_add_le _ _ + refine (ENNReal.inv_one_add_mul_pow_le (a := (2 : ℝ≥0∞) ^ i) + (ENNReal.pow_ne_top ENNReal.ofNat_ne_top) eNorm_ne_top hyw N).trans ?_ + gcongr + have hX := ENNReal.inv_one_add_pow_two_mul_mul_pow (a := (2 : ℝ≥0∞) ^ j * ‖y - w‖ₑ) + (ENNReal.mul_ne_top (ENNReal.pow_ne_top ENNReal.ofNat_ne_top) eNorm_ne_top) N + calc 2 ^ (j * n) * ((1 + 2 ^ j * ‖y - w‖ₑ) ^ (2 * N))⁻¹ * + (2 ^ (i * n) * ((1 + 2 ^ i * ‖w‖ₑ) ^ N)⁻¹) + ≤ 2 ^ (j * n) * ((1 + 2 ^ j * ‖y - w‖ₑ) ^ (2 * N))⁻¹ * + (2 ^ (i * n) * ((1 + 2 ^ j * ‖y - w‖ₑ) ^ N * ((1 + 2 ^ i * ‖y‖ₑ) ^ N)⁻¹)) := by + gcongr + _ = 2 ^ (j * n) * (((1 + 2 ^ j * ‖y - w‖ₑ) ^ (2 * N))⁻¹ * (1 + 2 ^ j * ‖y - w‖ₑ) ^ N) * + (2 ^ (i * n) * ((1 + 2 ^ i * ‖y‖ₑ) ^ N)⁻¹) := by ring + _ = _ := by rw [hX] + +/-- **Convolution of two Peetre bumps**: for `i ≤ j`, the integral +`∫ 2^(jn) (1 + 2^j ‖y - w‖)^(-2N) 2^(in) (1 + 2^i ‖w‖)^(-N) dw` is at most +`(∫ (1 + ‖u‖)^(-N) du) 2^(in) (1 + 2^i ‖y‖)^(-N)`, by Peetre's inequality and the substitution +`u = 2^j (y - w)`. -/ +theorem lintegral_peetre_mul_le {i j : ℕ} (hij : i ≤ j) (N : ℕ) (y : V) : + ∫⁻ w, 2 ^ (j * finrank ℝ V) * ((1 + 2 ^ j * ‖y - w‖ₑ) ^ (2 * N))⁻¹ * + (2 ^ (i * finrank ℝ V) * ((1 + 2 ^ i * ‖w‖ₑ) ^ N)⁻¹) ≤ + peetreIntegral V N * 2 ^ (i * finrank ℝ V) * ((1 + 2 ^ i * ‖y‖ₑ) ^ N)⁻¹ := by + have hc : 2 ^ (i * finrank ℝ V) * ((1 + 2 ^ i * ‖y‖ₑ) ^ N)⁻¹ ≠ ∞ := + ENNReal.mul_ne_top (ENNReal.pow_ne_top ENNReal.ofNat_ne_top) + (ENNReal.inv_ne_top.2 (pow_ne_zero _ (ENNReal.one_add_ne_zero _))) + calc _ ≤ ∫⁻ w, 2 ^ (j * finrank ℝ V) * ((1 + 2 ^ j * ‖y - w‖ₑ) ^ N)⁻¹ * + (2 ^ (i * finrank ℝ V) * ((1 + 2 ^ i * ‖y‖ₑ) ^ N)⁻¹) := + lintegral_mono fun w => peetre_mul_peetre_le hij N _ y w + _ = (∫⁻ w, 2 ^ (j * finrank ℝ V) * ((1 + 2 ^ j * ‖y - w‖ₑ) ^ N)⁻¹) * + (2 ^ (i * finrank ℝ V) * ((1 + 2 ^ i * ‖y‖ₑ) ^ N)⁻¹) := lintegral_mul_const' _ _ hc + _ = _ := by + rw [lintegral_sub_left_eq_self + (fun u => 2 ^ (j * finrank ℝ V) * ((1 + 2 ^ j * ‖u‖ₑ) ^ N)⁻¹) y, + lintegral_dilate_peetre, mul_assoc] + +/-! ### Dilations of Schwartz functions -/ + +omit [FiniteDimensional ℝ V] [MeasurableSpace V] [BorelSpace V] in +/-- **Differences of dilated Schwartz functions**: +`|Δ_h^r G_{2^j}(y)| ≤ C ‖2^j h‖^r (1 + r ‖2^j h‖)^N 2^(jn) (1 + 2^j ‖y‖)^(-N)` with +`C = Rd.schwartzDecayConst G r N`, since `Δ_h^r G_{2^j} = (Δ_{2^j h}^r G)_{2^j}`. -/ +theorem enorm_higherDiff_dilate_schwartz_le (G : 𝓢(V, ℂ)) (r N j : ℕ) (h y : V) : + ‖(fwdDiff h)^[r] (dilate (2 ^ j) G) y‖ₑ ≤ + schwartzDecayConst G r N * ‖((2 : ℝ) ^ j) • h‖ₑ ^ r * + (1 + r * ‖((2 : ℝ) ^ j) • h‖ₑ) ^ N * + (2 ^ (j * finrank ℝ V) * ((1 + 2 ^ j * ‖y‖ₑ) ^ N)⁻¹) := by + rw [higherDiff_dilate, enorm_dilate_two_pow] + have h1 := enorm_higherDiff_schwartz_le G r N (((2 : ℝ) ^ j) • h) (((2 : ℝ) ^ j) • y) + rw [enorm_two_pow_smul j y] at h1 + calc 2 ^ (j * finrank ℝ V) * + ‖(fwdDiff (((2 : ℝ) ^ j) • h))^[r] (G : V → ℂ) (((2 : ℝ) ^ j) • y)‖ₑ + ≤ 2 ^ (j * finrank ℝ V) * (schwartzDecayConst G r N * ‖((2 : ℝ) ^ j) • h‖ₑ ^ r * + (1 + r * ‖((2 : ℝ) ^ j) • h‖ₑ) ^ N * ((1 + 2 ^ j * ‖y‖ₑ) ^ N)⁻¹) := by gcongr + _ = _ := by ring + +/-- **Tails of dilated Schwartz functions**: for every real `a`, +`∫_{‖z‖ ≥ a} |G_{2^j}(z)| dz ≤ C (1 + max(2^j a, 0))^(-N)` with `C = Rd.tailConst G 0 N`, by the +substitution `u = 2^j z`. -/ +theorem setLIntegral_enorm_dilate_schwartz_le (G : 𝓢(V, ℂ)) (N j : ℕ) (a : ℝ) : + ∫⁻ z in {z : V | a ≤ ‖z‖}, ‖dilate (2 ^ j) G z‖ₑ ≤ + tailConst G 0 N * ((1 + ENNReal.ofReal (2 ^ j * a)) ^ N)⁻¹ := by + have hpos : (0 : ℝ) < 2 ^ j := by positivity + have h2 := lintegral_tail_schwartz_le G 0 N (2 ^ j * a) + simp only [pow_zero, mul_one] at h2 + simp_rw [enorm_dilate_two_pow] + rw [lintegral_const_mul' _ _ (ENNReal.pow_ne_top ENNReal.ofNat_ne_top), + setLIntegral_comp_smul (fun u => ‖G u‖ₑ) hpos.ne', smul_setOf_le_norm hpos, + abs_of_pos (by positivity), ← pow_mul, ENNReal.ofReal_inv_of_pos (by positivity), + ENNReal.ofReal_pow zero_le_two, ENNReal.ofReal_ofNat, ← mul_assoc, + ENNReal.mul_inv_cancel (pow_ne_zero _ two_ne_zero) (ENNReal.pow_ne_top ENNReal.ofNat_ne_top), + one_mul] + exact h2 + +/-! ### Explicit bounds for the local means kernels -/ + +namespace LocalMeansBump + +variable (b : LocalMeansBump V) + +/-- The constant `2 sup |m|` of the local means kernels, with the supremum of the moment kernel +`m` as its Schwartz seminorm. -/ +noncomputable def kernelSupConst (L : ℕ) : ℝ := + 2 * SchwartzMap.seminorm ℝ 0 0 (b.momentSchwartz L) + +/-- The constant of the local means kernels is nonnegative. -/ +theorem kernelSupConst_nonneg (L : ℕ) : 0 ≤ b.kernelSupConst L := + mul_nonneg zero_le_two (apply_nonneg _ _) + +/-- `|m_{2^j}(y)| ≤ 2^(jn) sup |m|`. -/ +theorem norm_scaled_le (L j : ℕ) (y : V) : + ‖b.scaled L j y‖ ≤ SchwartzMap.seminorm ℝ 0 0 (b.momentSchwartz L) * 2 ^ (j * finrank ℝ V) := by + have h := SchwartzMap.norm_le_seminorm ℝ (b.momentSchwartz L) (((2 : ℝ) ^ j) • y) + rw [scaled, dilate, norm_mul, Complex.norm_real, Real.norm_of_nonneg (by positivity), ← pow_mul, + mul_comm] + exact mul_le_mul_of_nonneg_right h (by positivity) + +/-- **The local means kernels are bounded**: `|k_j(y)| ≤ C 2^(jn)` with +`C = Rd.LocalMeansBump.kernelSupConst L`. -/ +theorem norm_kernel_le (L j : ℕ) (y : V) : + ‖b.kernel L j y‖ ≤ b.kernelSupConst L * 2 ^ (j * finrank ℝ V) := by + have hS : 0 ≤ SchwartzMap.seminorm ℝ 0 0 (b.momentSchwartz L) := apply_nonneg _ _ + cases j with + | zero => + have h := b.norm_scaled_le L 0 y + change ‖b.scaled L 0 y‖ ≤ 2 * SchwartzMap.seminorm ℝ 0 0 (b.momentSchwartz L) * + 2 ^ (0 * finrank ℝ V) + simp only [zero_mul, pow_zero, mul_one] at h ⊢ + linarith + | succ j => + change ‖b.scaled L (j + 1) y - b.scaled L j y‖ ≤ + 2 * SchwartzMap.seminorm ℝ 0 0 (b.momentSchwartz L) * 2 ^ ((j + 1) * finrank ℝ V) + have h1 := b.norm_scaled_le L (j + 1) y + have h2 := b.norm_scaled_le L j y + have hmono : (2 : ℝ) ^ (j * finrank ℝ V) ≤ 2 ^ ((j + 1) * finrank ℝ V) := + pow_le_pow_right₀ one_le_two (Nat.mul_le_mul_right _ (Nat.le_succ j)) + refine (norm_sub_le _ _).trans ?_ + nlinarith + +/-- The local means kernels vanish outside `B̄(0, 2 L R 2^(-j))`. -/ +theorem kernel_eq_zero_of_lt (L j : ℕ) {y : V} (hy : 2 * L * b.radius / 2 ^ j < ‖y‖) : + b.kernel L j y = 0 := by + have hLR : 0 ≤ (L : ℝ) * b.radius := mul_nonneg (Nat.cast_nonneg L) b.radius_nonneg + cases j with + | zero => + refine b.scaled_eq_zero_of_lt L 0 (lt_of_le_of_lt ?_ hy) + simp only [pow_zero, div_one] + linarith + | succ j => + change b.scaled L (j + 1) y - b.scaled L j y = 0 + have h1 : (L : ℝ) * b.radius / 2 ^ (j + 1) ≤ 2 * L * b.radius / 2 ^ (j + 1) := + div_le_div_of_nonneg_right (by linarith) (by positivity) + have h2 : 2 * (L : ℝ) * b.radius / 2 ^ (j + 1) = L * b.radius / 2 ^ j := by + rw [pow_succ, mul_comm ((2 : ℝ) ^ j) 2, mul_assoc, mul_div_mul_left _ _ two_ne_zero] + rw [b.scaled_eq_zero_of_lt L (j + 1) (h1.trans_lt hy), + b.scaled_eq_zero_of_lt L j (h2 ▸ hy), sub_zero] + +/-- `|k_j(y)| ≤ C 2^(jn)` in `[0, ∞]`, with `C = Rd.LocalMeansBump.kernelSupConst L`. -/ +theorem enorm_kernel_le (L j : ℕ) (y : V) : + ‖b.kernel L j y‖ₑ ≤ ENNReal.ofReal (b.kernelSupConst L) * 2 ^ (j * finrank ℝ V) := by + rw [← ofReal_norm] + refine (ENNReal.ofReal_le_ofReal (b.norm_kernel_le L j y)).trans_eq ?_ + rw [ENNReal.ofReal_mul (b.kernelSupConst_nonneg L), ENNReal.ofReal_pow zero_le_two, + ENNReal.ofReal_ofNat] + +end LocalMeansBump + +/-! ### Peetre weights at a dyadic scale -/ + +omit [InnerProductSpace ℝ V] [FiniteDimensional ℝ V] [MeasurableSpace V] [BorelSpace V] in +/-- `ofReal (1 + 2^j ‖y‖) = 1 + 2^j ‖y‖` in `[0, ∞]`. -/ +theorem ofReal_one_add_two_pow_mul_norm (j : ℕ) (y : V) : + ENNReal.ofReal (1 + 2 ^ j * ‖y‖) = 1 + 2 ^ j * ‖y‖ₑ := by + rw [ENNReal.ofReal_add zero_le_one (by positivity), ENNReal.ofReal_one, + ENNReal.ofReal_mul (by positivity), ENNReal.ofReal_pow zero_le_two, ENNReal.ofReal_ofNat, + ofReal_norm] + +omit [InnerProductSpace ℝ V] [FiniteDimensional ℝ V] [MeasurableSpace V] [BorelSpace V] in +/-- Far from the origin, for `j ≤ i`: +`(1 + 2^i ‖y‖ / 2)^(-N) ≤ 2^N (1 + 2^j ‖y‖)^(-N)`, from `1 + 2^j ‖y‖ ≤ 2 (1 + 2^i ‖y‖ / 2)`. -/ +theorem inv_one_add_ofReal_half_pow_le {i j : ℕ} (hji : j ≤ i) (y : V) (N : ℕ) : + ((1 + ENNReal.ofReal (2 ^ i * (‖y‖ / 2))) ^ N)⁻¹ ≤ 2 ^ N * ((1 + 2 ^ j * ‖y‖ₑ) ^ N)⁻¹ := by + refine ENNReal.inv_le_mul_inv_of_le (pow_ne_zero _ two_ne_zero) + (ENNReal.pow_ne_top ENNReal.ofNat_ne_top) ?_ + rw [← mul_pow] + refine pow_le_pow_left' ?_ N + have h2 : (2 : ℝ) ^ j ≤ 2 ^ i := pow_le_pow_right₀ one_le_two hji + have hy := norm_nonneg y + rw [← ofReal_one_add_two_pow_mul_norm, ← ENNReal.ofReal_one, + ← ENNReal.ofReal_add zero_le_one (by positivity), ← ENNReal.ofReal_ofNat 2, + ← ENNReal.ofReal_mul zero_le_two] + exact ENNReal.ofReal_le_ofReal (by nlinarith) + +namespace LocalMeansBump + +variable (b : LocalMeansBump V) + +/-! ### Local means kernels from one scale -/ + +/-- **Local means kernels from one scale**: for levels `j < i`, `f ∈ L_1` and a bound +`|f(x) - (m_{2^k} ⋆ f)(x)| ≤ C 2^(-(k-j)L) u(x)` almost everywhere at every scale `k ≥ j`, +almost everywhere `|k_i ⋆ f(x)| ≤ 2 · 2^L C 2^(-(i-j)L) u(x)`. The kernel +`k_i = m_{2^i} - m_{2^(i-1)}` is a difference of two moment kernels, so +`k_i ⋆ f = (f - m_{2^(i-1)} ⋆ f) - (f - m_{2^i} ⋆ f)`. -/ +theorem ae_enorm_conv_kernel_le_of_scaled (L : ℕ) {f : V → ℂ} (hf : MemLp f 1 volume) + {C : ℝ≥0∞} {u : V → ℝ≥0∞} {j : ℕ} + (hB : ∀ k, j ≤ k → ∀ᵐ x ∂volume, ‖f x - conv (b.scaled L k) f volume x‖ₑ ≤ + C * dyadicWeight (-(L : ℝ)) (k - j) * u x) {i : ℕ} (hji : j < i) : + ∀ᵐ x ∂volume, ‖conv (b.kernel L i) f volume x‖ₑ ≤ + 2 * 2 ^ L * C * dyadicWeight (-(L : ℝ)) (i - j) * u x := by + obtain ⟨i', rfl⟩ : ∃ i', i = i' + 1 := ⟨i - 1, by omega⟩ + have hji' : j ≤ i' := by omega + filter_upwards [sub_conv_ae le_rfl ENNReal.one_ne_top (b.integrable_scaled L (i' + 1)) + (b.integrable_scaled L i') hf, hB i' hji', hB (i' + 1) (hji'.trans (Nat.le_succ i'))] + with x h0 h1 h2 + have hsplit : conv (b.kernel L (i' + 1)) f volume x = + (f x - conv (b.scaled L i') f volume x) - (f x - conv (b.scaled L (i' + 1)) f volume x) := by + change conv (b.scaled L (i' + 1) - b.scaled L i') f volume x = _ + rw [h0, Pi.sub_apply] + ring + rw [hsplit] + refine eNorm_sub_le.trans ((add_le_add h1 h2).trans ?_) + have hw1 := ENNReal.dyadicWeight_neg_sub_le L hji' le_rfl + have hw2 := ENNReal.dyadicWeight_neg_sub_le L hji' (Nat.le_succ i') + calc C * dyadicWeight (-(L : ℝ)) (i' - j) * u x + + C * dyadicWeight (-(L : ℝ)) (i' + 1 - j) * u x + ≤ C * (2 ^ L * dyadicWeight (-(L : ℝ)) (i' + 1 - j)) * u x + + C * (2 ^ L * dyadicWeight (-(L : ℝ)) (i' + 1 - j)) * u x := by gcongr + _ = _ := by ring + +/-! ### The cross kernel `k_j ⋆ Θ_i` -/ + +/-- One step of the moment case, pointwise in `z`: for `i ≤ k`, +`|g(z)| |Δ^L_{-2^(-k) z} Θ_i(y)| ≤ |g(z)| C R^L 2^(-(k-i)L) (1 + L R)^N 2^(in) (1 + 2^i ‖y‖)^(-N)` +with `C = Rd.schwartzDecayConst bandKernelS L N`, since the step of the dilated difference has +length `2^(i-k) ‖z‖ ≤ 2^(i-k) R` on the support of the bump `g`. -/ +theorem enorm_mul_higherDiff_Theta_le (L N : ℕ) {i k : ℕ} (hik : i ≤ k) (z y : V) : + ‖b.toFun z‖ₑ * ‖(fwdDiff (-((2 : ℝ) ^ k)⁻¹ • z))^[L] (Theta i) y‖ₑ ≤ + ‖b.toFun z‖ₑ * (schwartzDecayConst (bandKernelS (V := V)) L N * + ENNReal.ofReal (b.radius ^ L) * dyadicWeight (-(L : ℝ)) (k - i) * + ENNReal.ofReal ((1 + L * b.radius) ^ N) * + (2 ^ (i * finrank ℝ V) * ((1 + 2 ^ i * ‖y‖ₑ) ^ N)⁻¹)) := by + by_cases hz : b.radius < ‖z‖ + · rw [b.eq_zero z hz, eNorm_zero, zero_mul, zero_mul] + push Not at hz + refine mul_le_mul_right ?_ _ + have hk : (2 : ℝ) ^ k = 2 ^ (k - i) * 2 ^ i := by rw [← pow_add, Nat.sub_add_cancel hik] + have hv : ‖((2 : ℝ) ^ i) • (-((2 : ℝ) ^ k)⁻¹ • z)‖ ≤ b.radius / 2 ^ (k - i) := by + rw [smul_smul, norm_smul, Real.norm_eq_abs, hk] + rw [show (2 : ℝ) ^ i * -(2 ^ (k - i) * 2 ^ i)⁻¹ = -(2 ^ (k - i))⁻¹ by field_simp, abs_neg, + abs_of_pos (by positivity), inv_mul_eq_div] + exact div_le_div_of_nonneg_right hz (by positivity) + have hvR : b.radius / 2 ^ (k - i) ≤ b.radius := + div_le_self b.radius_nonneg (one_le_pow₀ one_le_two) + have hve : ‖((2 : ℝ) ^ i) • (-((2 : ℝ) ^ k)⁻¹ • z)‖ₑ ≤ + ENNReal.ofReal b.radius * ((2 : ℝ≥0∞) ^ (k - i))⁻¹ := by + rw [← ofReal_norm, ← ENNReal.ofReal_ofNat 2, ← ENNReal.ofReal_pow zero_le_two, + ← ENNReal.ofReal_inv_of_pos (by positivity), ← ENNReal.ofReal_mul b.radius_nonneg, + ← div_eq_mul_inv] + exact ENNReal.ofReal_le_ofReal hv + have e1 : ‖((2 : ℝ) ^ i) • (-((2 : ℝ) ^ k)⁻¹ • z)‖ₑ ^ L ≤ + ENNReal.ofReal (b.radius ^ L) * dyadicWeight (-(L : ℝ)) (k - i) := by + rw [ENNReal.dyadicWeight_neg_natCast, ENNReal.ofReal_pow b.radius_nonneg, ← mul_pow] + gcongr + have e2 : (1 + L * ‖((2 : ℝ) ^ i) • (-((2 : ℝ) ^ k)⁻¹ • z)‖ₑ) ^ N ≤ + ENNReal.ofReal ((1 + L * b.radius) ^ N) := by + rw [ENNReal.ofReal_pow (by have := b.radius_nonneg; positivity), + ENNReal.ofReal_add zero_le_one (by have := b.radius_nonneg; positivity), ENNReal.ofReal_one, + ENNReal.ofReal_mul (Nat.cast_nonneg L), ENNReal.ofReal_natCast, ← ofReal_norm] + gcongr + exact hv.trans hvR + refine (enorm_higherDiff_dilate_schwartz_le (bandKernelS (V := V)) L N i _ y).trans ?_ + calc schwartzDecayConst (bandKernelS (V := V)) L N * + ‖((2 : ℝ) ^ i) • (-((2 : ℝ) ^ k)⁻¹ • z)‖ₑ ^ L * + (1 + L * ‖((2 : ℝ) ^ i) • (-((2 : ℝ) ^ k)⁻¹ • z)‖ₑ) ^ N * + (2 ^ (i * finrank ℝ V) * ((1 + 2 ^ i * ‖y‖ₑ) ^ N)⁻¹) + ≤ schwartzDecayConst (bandKernelS (V := V)) L N * + (ENNReal.ofReal (b.radius ^ L) * dyadicWeight (-(L : ℝ)) (k - i)) * + ENNReal.ofReal ((1 + L * b.radius) ^ N) * + (2 ^ (i * finrank ℝ V) * ((1 + 2 ^ i * ‖y‖ₑ) ^ N)⁻¹) := by gcongr + _ = _ := by ring + +/-- **One scale of the moment case**: for `i ≤ k` and almost every `y`, +`|Θ_i(y) - (m_{2^k} ⋆ Θ_i)(y)| ≤ ‖g‖_1 C R^L 2^(-(k-i)L) (1 + L R)^N 2^(in) +(1 + 2^i ‖y‖)^(-N)` with `C = Rd.schwartzDecayConst bandKernelS L N`, by the averaged +differences of the moment kernel. -/ +theorem ae_enorm_Theta_sub_conv_scaled_le (L N : ℕ) {i k : ℕ} (hik : i ≤ k) : + ∀ᵐ y ∂volume, ‖Theta i y - conv (b.scaled L k) (Theta i) volume y‖ₑ ≤ + (∫⁻ z, ‖b.toFun z‖ₑ) * (schwartzDecayConst (bandKernelS (V := V)) L N * + ENNReal.ofReal (b.radius ^ L) * dyadicWeight (-(L : ℝ)) (k - i) * + ENNReal.ofReal ((1 + L * b.radius) ^ N) * + (2 ^ (i * finrank ℝ V) * ((1 + 2 ^ i * ‖y‖ₑ) ^ N)⁻¹)) := by + filter_upwards [ae_enorm_sub_conv_dilate_momentKernel_le le_rfl ENNReal.one_ne_top b.integrable + b.integral_eq_one (memLp_one_iff_integrable.2 (integrable_Theta (V := V) i)) L + (c := (2 : ℝ) ^ k) (by positivity)] with y hy + refine hy.trans ((lintegral_mono fun z => b.enorm_mul_higherDiff_Theta_le L N hik z y).trans ?_) + rw [lintegral_mul_const'' _ b.contDiff.continuous.aestronglyMeasurable.eNorm] + +/-- The constant `2 ‖g‖_1 (2R)^L (1 + 2LR)^N C` of the moment case of `k_j ⋆ Θ_i`, with +`C = Rd.schwartzDecayConst bandKernelS L N`. -/ +noncomputable def kernelThetaMomentConst (L N : ℕ) : ℝ≥0∞ := + 2 * (∫⁻ z, ‖b.toFun z‖ₑ) * ENNReal.ofReal ((2 * b.radius) ^ L) * + ENNReal.ofReal ((1 + 2 * L * b.radius) ^ N) * schwartzDecayConst (bandKernelS (V := V)) L N + +/-- The constant of the moment case of `k_j ⋆ Θ_i` is finite. -/ +theorem kernelThetaMomentConst_ne_top (L N : ℕ) : b.kernelThetaMomentConst L N ≠ ∞ := + ENNReal.mul_ne_top (ENNReal.mul_ne_top (ENNReal.mul_ne_top + (ENNReal.mul_ne_top ENNReal.ofNat_ne_top b.integrable.hasFiniteIntegral.ne) + ENNReal.ofReal_ne_top) ENNReal.ofReal_ne_top) (schwartzDecayConst_ne_top _ _ _) + +/-- **The moment case**: for `i < j` and almost every `y`, +`|(k_j ⋆ Θ_i)(y)| ≤ C 2^(-(j-i)L) 2^(in) (1 + 2^i ‖y‖)^(-N)` with +`C = Rd.LocalMeansBump.kernelThetaMomentConst L N`. The kernel `k_j = m_{2^j} - m_{2^(j-1)}` is +a difference of two moment kernels (`Rd.LocalMeansBump.ae_enorm_conv_kernel_le_of_scaled`), and +`Θ_i - m_{2^k} ⋆ Θ_i` averages differences of order `L` of `Θ_i` with steps of length at most +`2^(-k) R`. -/ +theorem ae_enorm_conv_kernel_Theta_le_of_lt (L N : ℕ) {i j : ℕ} (hij : i < j) : + ∀ᵐ y ∂volume, ‖conv (b.kernel L j) (Theta i) volume y‖ₑ ≤ + b.kernelThetaMomentConst L N * dyadicWeight (-(L : ℝ)) (j - i) * + 2 ^ (i * finrank ℝ V) * ((1 + 2 ^ i * ‖y‖ₑ) ^ N)⁻¹ := by + have hR0 := b.radius_nonneg + have hR : ENNReal.ofReal ((1 + L * b.radius) ^ N) ≤ + ENNReal.ofReal ((1 + 2 * L * b.radius) ^ N) := + ENNReal.ofReal_le_ofReal (pow_le_pow_left₀ (by positivity) + (by nlinarith [mul_nonneg (Nat.cast_nonneg L : (0 : ℝ) ≤ L) hR0]) N) + have h2R : ENNReal.ofReal ((2 * b.radius) ^ L) = 2 ^ L * ENNReal.ofReal (b.radius ^ L) := by + rw [mul_pow, ENNReal.ofReal_mul (by positivity), ENNReal.ofReal_pow zero_le_two, + ENNReal.ofReal_ofNat] + filter_upwards [b.ae_enorm_conv_kernel_le_of_scaled L + (memLp_one_iff_integrable.2 (integrable_Theta (V := V) i)) + (C := (∫⁻ z, ‖b.toFun z‖ₑ) * (schwartzDecayConst (bandKernelS (V := V)) L N * + ENNReal.ofReal (b.radius ^ L) * ENNReal.ofReal ((1 + L * b.radius) ^ N))) + (u := fun y => 2 ^ (i * finrank ℝ V) * ((1 + 2 ^ i * ‖y‖ₑ) ^ N)⁻¹) + (fun k hik => (b.ae_enorm_Theta_sub_conv_scaled_le L N hik).mono fun y hy => + hy.trans_eq (by ring)) hij] with y hy + refine hy.trans ?_ + calc 2 * 2 ^ L * ((∫⁻ z, ‖b.toFun z‖ₑ) * (schwartzDecayConst (bandKernelS (V := V)) L N * + ENNReal.ofReal (b.radius ^ L) * ENNReal.ofReal ((1 + L * b.radius) ^ N))) * + dyadicWeight (-(L : ℝ)) (j - i) * + (2 ^ (i * finrank ℝ V) * ((1 + 2 ^ i * ‖y‖ₑ) ^ N)⁻¹) + ≤ 2 * 2 ^ L * ((∫⁻ z, ‖b.toFun z‖ₑ) * (schwartzDecayConst (bandKernelS (V := V)) L N * + ENNReal.ofReal (b.radius ^ L) * ENNReal.ofReal ((1 + 2 * L * b.radius) ^ N))) * + dyadicWeight (-(L : ℝ)) (j - i) * + (2 ^ (i * finrank ℝ V) * ((1 + 2 ^ i * ‖y‖ₑ) ^ N)⁻¹) := by gcongr + _ = _ := by rw [kernelThetaMomentConst, h2R]; ring + +/-- The constant `C (‖Θ‖_1 (1 + 4LR)^N + 2^N T)` of the support case of `k_j ⋆ Θ_i`, with +`C = Rd.LocalMeansBump.kernelSupConst L` and `T = Rd.tailConst bandKernelS 0 N`. -/ +noncomputable def kernelThetaSupportConst (L N : ℕ) : ℝ≥0∞ := + ENNReal.ofReal (b.kernelSupConst L) * (eLpNorm (bandKernel (V := V)) 1 volume * + ENNReal.ofReal ((1 + 4 * L * b.radius) ^ N) + 2 ^ N * tailConst (bandKernelS (V := V)) 0 N) + +/-- The constant of the support case of `k_j ⋆ Θ_i` is finite. -/ +theorem kernelThetaSupportConst_ne_top (L N : ℕ) : b.kernelThetaSupportConst L N ≠ ∞ := + ENNReal.mul_ne_top ENNReal.ofReal_ne_top (ENNReal.add_ne_top.2 + ⟨ENNReal.mul_ne_top eLpNorm_bandKernel_ne_top + ENNReal.ofReal_ne_top, + ENNReal.mul_ne_top (ENNReal.pow_ne_top ENNReal.ofNat_ne_top) (tailConst_ne_top _ _ _)⟩) + +/-- The support case near the origin: for `‖y‖ ≤ 4LR 2^(-j)`, +`∫ |Θ_i(z)| |k_j(y - z)| dz ≤ C ‖Θ‖_1 (1 + 4LR)^N 2^(jn) (1 + 2^j ‖y‖)^(-N)` with +`C = Rd.LocalMeansBump.kernelSupConst L`. -/ +theorem lintegral_Theta_mul_kernel_le_near (L N i j : ℕ) {y : V} + (hy : ‖y‖ ≤ 4 * L * b.radius / 2 ^ j) : + ∫⁻ z, ‖Theta i z‖ₑ * ‖b.kernel L j (y - z)‖ₑ ≤ + ENNReal.ofReal (b.kernelSupConst L) * (eLpNorm (bandKernel (V := V)) 1 volume * + ENNReal.ofReal ((1 + 4 * L * b.radius) ^ N)) * + 2 ^ (j * finrank ℝ V) * ((1 + 2 ^ j * ‖y‖ₑ) ^ N)⁻¹ := by + have hR0 := b.radius_nonneg + have h4 : 2 ^ j * ‖y‖ₑ ≤ ENNReal.ofReal (4 * L * b.radius) := two_pow_mul_enorm_le_ofReal hy + have h1 := ENNReal.one_le_ofReal_mul_inv_of_le (by positivity) h4 N + calc ∫⁻ z, ‖Theta i z‖ₑ * ‖b.kernel L j (y - z)‖ₑ + ≤ ∫⁻ z, ‖Theta i z‖ₑ * (ENNReal.ofReal (b.kernelSupConst L) * 2 ^ (j * finrank ℝ V)) := + lintegral_mono fun z => mul_le_mul_right (b.enorm_kernel_le L j (y - z)) _ + _ = eLpNorm (bandKernel (V := V)) 1 volume * + (ENNReal.ofReal (b.kernelSupConst L) * 2 ^ (j * finrank ℝ V)) := by + rw [lintegral_mul_const'' _ (continuous_Theta (V := V) i).measurable.eNorm.aemeasurable, + ← eLpNorm_one_eq_lintegral_eNorm (continuous_Theta (V := V) i).aestronglyMeasurable, + eLpNorm_Theta_one] + _ = eLpNorm (bandKernel (V := V)) 1 volume * + (ENNReal.ofReal (b.kernelSupConst L) * 2 ^ (j * finrank ℝ V)) * 1 := (mul_one _).symm + _ ≤ eLpNorm (bandKernel (V := V)) 1 volume * + (ENNReal.ofReal (b.kernelSupConst L) * 2 ^ (j * finrank ℝ V)) * + (ENNReal.ofReal ((1 + 4 * L * b.radius) ^ N) * ((1 + 2 ^ j * ‖y‖ₑ) ^ N)⁻¹) := by + gcongr + _ = _ := by ring + +/-- The support case far from the origin: for `j ≤ i` and `‖y‖ > 4LR 2^(-j)`, +`∫ |Θ_i(z)| |k_j(y - z)| dz ≤ C 2^N T 2^(jn) (1 + 2^j ‖y‖)^(-N)` with +`C = Rd.LocalMeansBump.kernelSupConst L` and `T = Rd.tailConst bandKernelS 0 N`: the integrand +vanishes unless `‖z‖ ≥ ‖y‖ / 2`, where the tail of `Θ_i` is small. -/ +theorem lintegral_Theta_mul_kernel_le_far (L N : ℕ) {i j : ℕ} (hji : j ≤ i) {y : V} + (hy : 4 * L * b.radius / 2 ^ j < ‖y‖) : + ∫⁻ z, ‖Theta i z‖ₑ * ‖b.kernel L j (y - z)‖ₑ ≤ + ENNReal.ofReal (b.kernelSupConst L) * (2 ^ N * tailConst (bandKernelS (V := V)) 0 N) * + 2 ^ (j * finrank ℝ V) * ((1 + 2 ^ j * ‖y‖ₑ) ^ N)⁻¹ := by + have hs : MeasurableSet {z : V | ‖y‖ / 2 ≤ ‖z‖} := + measurableSet_le measurable_const measurable_norm + have hc : ENNReal.ofReal (b.kernelSupConst L) * 2 ^ (j * finrank ℝ V) ≠ ∞ := + ENNReal.mul_ne_top ENNReal.ofReal_ne_top (ENNReal.pow_ne_top ENNReal.ofNat_ne_top) + have hpt : ∀ z, ‖Theta i z‖ₑ * ‖b.kernel L j (y - z)‖ₑ ≤ + {z : V | ‖y‖ / 2 ≤ ‖z‖}.indicator (fun z => ‖Theta i z‖ₑ) z * + (ENNReal.ofReal (b.kernelSupConst L) * 2 ^ (j * finrank ℝ V)) := fun z => by + by_cases hz : ‖y‖ / 2 ≤ ‖z‖ + · rw [Set.indicator_of_mem (show z ∈ {z : V | ‖y‖ / 2 ≤ ‖z‖} from hz)] + exact mul_le_mul_right (b.enorm_kernel_le L j (y - z)) _ + · have hyz : 2 * L * b.radius / 2 ^ j < ‖y - z‖ := by + have h1 := norm_sub_norm_le y z + have h2 : 2 * L * b.radius / 2 ^ j = (4 * L * b.radius / 2 ^ j) / 2 := by ring + push Not at hz + linarith + rw [b.kernel_eq_zero_of_lt L j hyz, eNorm_zero, mul_zero] + exact zero_le + have htail := setLIntegral_enorm_dilate_schwartz_le (bandKernelS (V := V)) N i (‖y‖ / 2) + calc ∫⁻ z, ‖Theta i z‖ₑ * ‖b.kernel L j (y - z)‖ₑ + ≤ ∫⁻ z, {z : V | ‖y‖ / 2 ≤ ‖z‖}.indicator (fun z => ‖Theta i z‖ₑ) z * + (ENNReal.ofReal (b.kernelSupConst L) * 2 ^ (j * finrank ℝ V)) := lintegral_mono hpt + _ = (∫⁻ z in {z : V | ‖y‖ / 2 ≤ ‖z‖}, ‖Theta i z‖ₑ) * + (ENNReal.ofReal (b.kernelSupConst L) * 2 ^ (j * finrank ℝ V)) := by + rw [lintegral_mul_const' _ _ hc, lintegral_indicator hs] + _ ≤ tailConst (bandKernelS (V := V)) 0 N * (2 ^ N * ((1 + 2 ^ j * ‖y‖ₑ) ^ N)⁻¹) * + (ENNReal.ofReal (b.kernelSupConst L) * 2 ^ (j * finrank ℝ V)) := by + gcongr + exact htail.trans (mul_le_mul_right (inv_one_add_ofReal_half_pow_le hji y N) _) + _ = _ := by ring + +/-- **The support case**: for `j ≤ i` and every `y`, +`|(k_j ⋆ Θ_i)(y)| ≤ C 2^(jn) (1 + 2^j ‖y‖)^(-N)` with +`C = Rd.LocalMeansBump.kernelThetaSupportConst L N`: `k_j` is bounded by `2^(jn)` and supported +in `B̄(0, 2LR 2^(-j))`, and `Θ_i` has small tails. -/ +theorem enorm_conv_kernel_Theta_le_of_le (L N : ℕ) {i j : ℕ} (hji : j ≤ i) (y : V) : + ‖conv (b.kernel L j) (Theta i) volume y‖ₑ ≤ + b.kernelThetaSupportConst L N * 2 ^ (j * finrank ℝ V) * ((1 + 2 ^ j * ‖y‖ₑ) ^ N)⁻¹ := by + rw [conv_comm] + refine (enorm_conv_le_lintegral _ _ y).trans ?_ + rw [kernelThetaSupportConst] + by_cases hy : ‖y‖ ≤ 4 * L * b.radius / 2 ^ j + · refine (b.lintegral_Theta_mul_kernel_le_near L N i j hy).trans ?_ + gcongr + exact le_self_add + · refine (b.lintegral_Theta_mul_kernel_le_far L N hji (not_le.1 hy)).trans ?_ + gcongr + exact le_add_self + +/-- The constant of the cross kernel `k_j ⋆ Θ_i`: the sum of the constants of the moment case +and of the support case. -/ +noncomputable def kernelThetaConst (L N : ℕ) : ℝ≥0∞ := + b.kernelThetaMomentConst L N + b.kernelThetaSupportConst L N + +/-- The constant of the cross kernel `k_j ⋆ Θ_i` is finite. -/ +theorem kernelThetaConst_ne_top (L N : ℕ) : b.kernelThetaConst L N ≠ ∞ := + ENNReal.add_ne_top.2 ⟨b.kernelThetaMomentConst_ne_top L N, b.kernelThetaSupportConst_ne_top L N⟩ + +/-- **The cross kernel `k_j ⋆ Θ_i`**: for all levels `i, j` and almost every `y`, +`|(k_j ⋆ Θ_i)(y)| ≤ C c_{ji} 2^(min(i,j) n) (1 + 2^min(i,j) ‖y‖)^(-N)` with +`c_{ji} = 2^(-(j-i)L)` for `i ≤ j`, `c_{ji} = 1` for `i > j`, and +`C = Rd.LocalMeansBump.kernelThetaConst L N`. -/ +theorem enorm_conv_kernel_Theta_le (L N i j : ℕ) : + ∀ᵐ y ∂volume, ‖conv (b.kernel L j) (Theta i) volume y‖ₑ ≤ + b.kernelThetaConst L N * (if i ≤ j then dyadicWeight (-(L : ℝ)) (j - i) else 1) * + 2 ^ (min i j * finrank ℝ V) * ((1 + 2 ^ (min i j) * ‖y‖ₑ) ^ N)⁻¹ := by + rcases lt_or_ge i j with hij | hji + · filter_upwards [b.ae_enorm_conv_kernel_Theta_le_of_lt L N hij] with y hy + simp only [hij.le, ↓reduceIte, min_eq_left hij.le] + refine hy.trans ?_ + gcongr + exact le_self_add + · refine Filter.Eventually.of_forall fun y => + (b.enorm_conv_kernel_Theta_le_of_le L N hji y).trans ?_ + rw [min_eq_right hji] + have hw : 1 ≤ (if i ≤ j then dyadicWeight (-(L : ℝ)) (j - i) else 1) := by + split_ifs with h + · rw [show j - i = 0 by omega, ENNReal.dyadicWeight_zero_right] + · exact le_rfl + calc b.kernelThetaSupportConst L N * 2 ^ (j * finrank ℝ V) * ((1 + 2 ^ j * ‖y‖ₑ) ^ N)⁻¹ + = b.kernelThetaSupportConst L N * 1 * 2 ^ (j * finrank ℝ V) * + ((1 + 2 ^ j * ‖y‖ₑ) ^ N)⁻¹ := by rw [mul_one] + _ ≤ _ := by + gcongr + exact le_add_self + +end LocalMeansBump + +/-! ### The vanishing of `ψ_j ⋆ μ_{2^(j-2)}` -/ + +/-- **The Fourier transform of a dilated moment kernel**: for an integrable `g` and `c > 0`, +`𝓕(m_c)(ξ) = ∑_{l < L} a_l 𝓕g(((l + 1)/c) ξ)` with the coefficients `a_l = Rd.jacksonCoeff L l`. -/ +theorem fourier_dilate_momentKernel {g : V → ℂ} (hg : Integrable g) (L : ℕ) {c : ℝ} (hc : 0 < c) + (ξ : V) : + 𝓕 (dilate c (momentKernel g L)) ξ = + ∑ l ∈ Finset.range L, jacksonCoeff L l * 𝓕 g ((((l : ℝ) + 1) / c) • ξ) := by + have hcl : ∀ l : ℕ, 0 < c / ((l : ℝ) + 1) := fun l => by positivity + have hint : ∀ l ∈ Finset.range L, Integrable (fun v : V => + 𝐞 (-inner ℝ v ξ) • (jacksonCoeff L l * dilate (c / ((l : ℝ) + 1)) g v)) := fun l _ => + (Real.fourierIntegral_convergent_iff ξ).2 ((integrable_dilate hg (hcl l).ne').const_mul _) + rw [dilate_momentKernel, Real.fourier_eq] + simp_rw [Finset.smul_sum] + rw [integral_finsetSum _ hint] + refine Finset.sum_congr rfl fun l _ => ?_ + have h : ∀ v : V, 𝐞 (-inner ℝ v ξ) • (jacksonCoeff L l * dilate (c / ((l : ℝ) + 1)) g v) = + jacksonCoeff L l * (𝐞 (-inner ℝ v ξ) • dilate (c / ((l : ℝ) + 1)) g v) := fun v => by + simp only [Circle.smul_def, smul_eq_mul] + ring + simp_rw [h] + rw [integral_const_mul, ← Real.fourier_eq, fourier_dilate g (hcl l), inv_div] + +omit [FiniteDimensional ℝ V] [MeasurableSpace V] [BorelSpace V] in +/-- Moment kernels of continuous functions are continuous. -/ +theorem continuous_momentKernel {g : V → ℂ} (hg : Continuous g) (L : ℕ) : + Continuous (momentKernel g L) := + continuous_finsetSum _ fun _ _ => continuous_const.mul (continuous_dilate hg _) + +omit [FiniteDimensional ℝ V] [MeasurableSpace V] [BorelSpace V] in +/-- Moment kernels of bounded functions are bounded. -/ +theorem bddAbove_momentKernel {g : V → ℂ} (hg : BddAbove (Set.range fun x => ‖g x‖)) (L : ℕ) : + BddAbove (Set.range fun x => ‖momentKernel g L x‖) := by + choose B hB using fun l : ℕ => bddAbove_dilate hg (1 / ((l : ℝ) + 1)) + refine ⟨∑ l ∈ Finset.range L, ‖jacksonCoeff L l‖ * B l, Set.forall_mem_range.2 fun x => ?_⟩ + refine (norm_sum_le _ _).trans (Finset.sum_le_sum fun l _ => ?_) + rw [norm_mul] + exact mul_le_mul_of_nonneg_left (hB l (Set.mem_range_self x)) (norm_nonneg _) + +/-- The moment kernel `μ = ∑_{l ‖lpMomentScaled (V := V) L k x‖) := + bddAbove_dilate (bddAbove_momentKernel bddAbove_lpKernel L) _ + +/-- `𝓕μ_{2^j}` vanishes outside the ball of radius `2^(j+1)`: every term has +`‖((l + 1)/2^j) ξ‖ ≥ 2`, where `𝓕Φ = χ_{1,2}` vanishes. -/ +theorem fourier_lpMomentScaled_eq_zero (L : ℕ) {j : ℕ} {ξ : V} (h : 2 ^ (j + 1) ≤ ‖ξ‖) : + 𝓕 (lpMomentScaled (V := V) L j) ξ = 0 := by + rw [lpMomentScaled, lpMoment, + fourier_dilate_momentKernel integrable_lpKernel L (by positivity : (0 : ℝ) < 2 ^ j)] + refine Finset.sum_eq_zero fun l _ => ?_ + rw [fourier_lpKernel, cutoff_eq_zero _ _ ?_, mul_zero] + rw [norm_smul, Real.norm_of_nonneg (by positivity), div_mul_eq_mul_div, + le_div_iff₀ (by positivity)] + have h1 : (1 : ℝ) ≤ (l : ℝ) + 1 := le_add_of_nonneg_left (Nat.cast_nonneg l) + calc (2 : ℝ) * 2 ^ j = 2 ^ (j + 1) := by ring + _ ≤ ‖ξ‖ := h + _ ≤ ((l : ℝ) + 1) * ‖ξ‖ := le_mul_of_one_le_left (norm_nonneg _) h1 + +/-- **High blocks annihilate the moment kernels of `Φ`**: `ψ_{j+2} ⋆ μ_{2^j} = 0`, since +`𝓕ψ_{j+2}` vanishes on the ball of radius `2^(j+1)` and `𝓕μ_{2^j}` outside it. -/ +theorem conv_psi_lpMomentScaled (L j : ℕ) : + conv (psi (V := V) (j + 2)) (lpMomentScaled L j) volume = 0 := by + have h0 : 𝓕 (0 : V → ℂ) = 0 := funext fun ξ => by simp [Real.fourier_eq] + refine conv_eq_of_fourier (integrable_psi _) (integrable_lpMomentScaled L j) + (continuous_lpMomentScaled L j) (bddAbove_lpMomentScaled L j) (integrable_zero _ _ _) + continuous_zero ?_ fun ξ => ?_ + · rw [h0] + exact integrable_zero _ _ _ + · rw [h0, Pi.zero_apply] + by_cases hξ : ‖ξ‖ ≤ 2 ^ (j + 1) + · rw [show j + 2 = j + 1 + 1 from rfl, fourier_psi_succ_eq_zero hξ, zero_mul] + · rw [fourier_lpMomentScaled_eq_zero L (not_le.1 hξ).le, mul_zero] + +/-! ### Decay of the Littlewood–Paley blocks -/ + +variable (V) in +/-- The constant `(1 + 2^N) C` of the decay of the blocks `ψ_j`, with +`C = Rd.schwartzDecayConst lpKernelS 0 N`. -/ +noncomputable def psiDecayConst (N : ℕ) : ℝ≥0∞ := + (1 + 2 ^ N) * schwartzDecayConst (lpKernelS (V := V)) 0 N + +/-- The decay constant of the blocks is finite. -/ +theorem psiDecayConst_ne_top (N : ℕ) : psiDecayConst V N ≠ ∞ := + ENNReal.mul_ne_top (ENNReal.add_ne_top.2 ⟨ENNReal.one_ne_top, + ENNReal.pow_ne_top ENNReal.ofNat_ne_top⟩) (schwartzDecayConst_ne_top _ _ _) + +/-- **Decay of the Littlewood–Paley blocks**: +`|ψ_j(y)| ≤ C 2^(jn) (1 + 2^j ‖y‖)^(-N)` with `C = Rd.psiDecayConst V N`; `ψ_j` is the +difference of the dilations of `Φ` at the scales `2^j` and `2^(j-1)`. -/ +theorem enorm_psi_le (j N : ℕ) (y : V) : + ‖psi j y‖ₑ ≤ psiDecayConst V N * 2 ^ (j * finrank ℝ V) * ((1 + 2 ^ j * ‖y‖ₑ) ^ N)⁻¹ := by + have hPhi : ∀ k, ‖Phi (V := V) k y‖ₑ ≤ schwartzDecayConst (lpKernelS (V := V)) 0 N * + 2 ^ (k * finrank ℝ V) * ((1 + 2 ^ k * ‖y‖ₑ) ^ N)⁻¹ := fun k => + enorm_dilate_schwartz_le (lpKernelS (V := V)) N k y + have hS : schwartzDecayConst (lpKernelS (V := V)) 0 N ≤ psiDecayConst V N := + le_mul_of_one_le_left zero_le le_self_add + cases j with + | zero => + refine (hPhi 0).trans ?_ + gcongr + | succ j => + change ‖Phi (V := V) (j + 1) y - Phi j y‖ₑ ≤ _ + have hW : ((1 + 2 ^ j * ‖y‖ₑ) ^ N)⁻¹ ≤ 2 ^ N * ((1 + 2 ^ (j + 1) * ‖y‖ₑ) ^ N)⁻¹ := by + have h := ENNReal.inv_one_add_mul_pow_le_two_pow (2 ^ j) ‖y‖ₑ N + rwa [← pow_succ'] at h + have hX : (2 : ℝ≥0∞) ^ (j * finrank ℝ V) ≤ 2 ^ ((j + 1) * finrank ℝ V) := + pow_le_pow_right₀ one_le_two (Nat.mul_le_mul_right _ (Nat.le_succ j)) + calc ‖Phi (V := V) (j + 1) y - Phi j y‖ₑ ≤ ‖Phi (V := V) (j + 1) y‖ₑ + ‖Phi (V := V) j y‖ₑ := + eNorm_sub_le + _ ≤ schwartzDecayConst (lpKernelS (V := V)) 0 N * 2 ^ ((j + 1) * finrank ℝ V) * + ((1 + 2 ^ (j + 1) * ‖y‖ₑ) ^ N)⁻¹ + + schwartzDecayConst (lpKernelS (V := V)) 0 N * 2 ^ ((j + 1) * finrank ℝ V) * + (2 ^ N * ((1 + 2 ^ (j + 1) * ‖y‖ₑ) ^ N)⁻¹) := by + gcongr + · exact hPhi (j + 1) + · exact (hPhi j).trans (by gcongr) + _ = psiDecayConst V N * 2 ^ ((j + 1) * finrank ℝ V) * + ((1 + 2 ^ (j + 1) * ‖y‖ₑ) ^ N)⁻¹ := by rw [psiDecayConst]; ring + +/-! ### The cross kernel `ψ_j ⋆ η_i` -/ + +/-- **Integrals against a kernel of small support**: if `η` vanishes outside +`B̄(0, ρ 2^(-k))` and `|ψ(z)| ≤ C 2^(kn) (1 + 2^k ‖z‖)^(-N)`, then +`∫ |η(w)| |ψ(y - w)| dw ≤ ‖η‖_1 C (1 + ρ)^N 2^(kn) (1 + 2^k ‖y‖)^(-N)`, by Peetre's inequality +`(1 + 2^k ‖y - w‖)^(-N) ≤ (1 + 2^k ‖w‖)^N (1 + 2^k ‖y‖)^(-N)`. -/ +theorem lintegral_mul_peetre_le_of_support {η ψ : V → ℂ} (hη : AEStronglyMeasurable η volume) + {k N : ℕ} {ρ : ℝ} (hρ : 0 ≤ ρ) (hηs : ∀ w, ρ / 2 ^ k < ‖w‖ → η w = 0) {C : ℝ≥0∞} + (hψ : ∀ z, ‖ψ z‖ₑ ≤ C * 2 ^ (k * finrank ℝ V) * ((1 + 2 ^ k * ‖z‖ₑ) ^ N)⁻¹) (y : V) : + ∫⁻ w, ‖η w‖ₑ * ‖ψ (y - w)‖ₑ ≤ (∫⁻ w, ‖η w‖ₑ) * (C * ENNReal.ofReal ((1 + ρ) ^ N) * + 2 ^ (k * finrank ℝ V) * ((1 + 2 ^ k * ‖y‖ₑ) ^ N)⁻¹) := by + rw [← lintegral_mul_const'' _ hη.eNorm] + refine lintegral_mono fun w => ?_ + by_cases hw : ρ / 2 ^ k < ‖w‖ + · rw [hηs w hw, eNorm_zero, zero_mul, zero_mul] + push Not at hw + refine mul_le_mul_right ((hψ (y - w)).trans ?_) _ + have hkw : 2 ^ k * ‖w‖ₑ ≤ ENNReal.ofReal ρ := two_pow_mul_enorm_le_ofReal hw + have hP := inv_one_add_mul_enorm_sub_pow_le (a := (2 : ℝ≥0∞) ^ k) + (ENNReal.pow_ne_top ENNReal.ofNat_ne_top) y w N + have hρ' : (1 + 2 ^ k * ‖w‖ₑ) ^ N ≤ ENNReal.ofReal ((1 + ρ) ^ N) := by + rw [ENNReal.ofReal_pow (by positivity), ENNReal.ofReal_add zero_le_one hρ, ENNReal.ofReal_one] + gcongr + calc C * 2 ^ (k * finrank ℝ V) * ((1 + 2 ^ k * ‖y - w‖ₑ) ^ N)⁻¹ + ≤ C * 2 ^ (k * finrank ℝ V) * ((1 + 2 ^ k * ‖w‖ₑ) ^ N * ((1 + 2 ^ k * ‖y‖ₑ) ^ N)⁻¹) := by + gcongr + _ ≤ C * 2 ^ (k * finrank ℝ V) * (ENNReal.ofReal ((1 + ρ) ^ N) * + ((1 + 2 ^ k * ‖y‖ₑ) ^ N)⁻¹) := by gcongr + _ = _ := by ring + +namespace LocalMeansBump + +variable (b : LocalMeansBump V) + +/-- The constant `C (1 + 2LR)^N 2 ‖m‖_1` of the support cases of `ψ_j ⋆ η_i`, with +`C = Rd.psiDecayConst V N`. -/ +noncomputable def psiDualSupportConst (L N : ℕ) : ℝ≥0∞ := + psiDecayConst V N * ENNReal.ofReal ((1 + 2 * L * b.radius) ^ N) * + (2 * eLpNorm (momentKernel b.toFun L) 1 volume) + +/-- The constant of the support cases of `ψ_j ⋆ η_i` is finite. -/ +theorem psiDualSupportConst_ne_top (L N : ℕ) : b.psiDualSupportConst L N ≠ ∞ := + ENNReal.mul_ne_top (ENNReal.mul_ne_top (psiDecayConst_ne_top N) ENNReal.ofReal_ne_top) + (ENNReal.mul_ne_top ENNReal.ofNat_ne_top + (eLpNorm_momentKernel_ne_top b.integrable L)) + +/-- `∫ |η_i| ≤ 2 ‖m‖_1`. -/ +theorem lintegral_enorm_dual_le (L i : ℕ) : + ∫⁻ w, ‖b.dual L i w‖ₑ ≤ 2 * eLpNorm (momentKernel b.toFun L) 1 volume := by + rw [← eLpNorm_one_eq_lintegral_eNorm (b.continuous_dual L i).aestronglyMeasurable] + exact b.eLpNorm_dual_one_le L i + +/-- **The case `i > j`**: `|(ψ_j ⋆ η_i)(y)| ≤ C 2^(jn) (1 + 2^j ‖y‖)^(-N)` with +`C = Rd.LocalMeansBump.psiDualSupportConst L N`: `η_i` is supported in `B̄(0, 2LR 2^(-i))`, where +the Peetre weight at the scale `2^j` changes by at most `(1 + 2LR)^N`. -/ +theorem enorm_conv_psi_dual_le_of_lt (L N : ℕ) {i j : ℕ} (hji : j < i) (y : V) : + ‖conv (psi j) (b.dual L i) volume y‖ₑ ≤ + b.psiDualSupportConst L N * 2 ^ (j * finrank ℝ V) * ((1 + 2 ^ j * ‖y‖ₑ) ^ N)⁻¹ := by + rw [conv_comm] + refine (enorm_conv_le_lintegral _ _ y).trans ?_ + have hρ : 0 ≤ 2 * (L : ℝ) * b.radius := by have := b.radius_nonneg; positivity + have hs : ∀ w, 2 * L * b.radius / 2 ^ j < ‖w‖ → b.dual L i w = 0 := fun w hw => + b.dual_eq_zero_of_lt L i (lt_of_le_of_lt (div_le_div_of_nonneg_left hρ (by positivity) + (pow_le_pow_right₀ one_le_two hji.le)) hw) + refine (lintegral_mul_peetre_le_of_support (b.continuous_dual L i).aestronglyMeasurable hρ hs + (fun z => enorm_psi_le j N z) y).trans ?_ + calc (∫⁻ w, ‖b.dual L i w‖ₑ) * (psiDecayConst V N * + ENNReal.ofReal ((1 + 2 * L * b.radius) ^ N) * 2 ^ (j * finrank ℝ V) * + ((1 + 2 ^ j * ‖y‖ₑ) ^ N)⁻¹) + ≤ (2 * eLpNorm (momentKernel b.toFun L) 1 volume) * (psiDecayConst V N * + ENNReal.ofReal ((1 + 2 * L * b.radius) ^ N) * 2 ^ (j * finrank ℝ V) * + ((1 + 2 ^ j * ‖y‖ₑ) ^ N)⁻¹) := by gcongr; exact b.lintegral_enorm_dual_le L i + _ = _ := by rw [psiDualSupportConst]; ring + +/-- **The case `i ≤ j ≤ 1`**: `|(ψ_j ⋆ η_i)(y)| ≤ 2^(n+L') C 2^(-(j-i)L') 2^(in) +(1 + 2^i ‖y‖)^(-N)` with `C = Rd.LocalMeansBump.psiDualSupportConst L N`, as in the case `i > j` +with the Peetre weight at the scale `2^i`. -/ +theorem enorm_conv_psi_dual_le_of_le_one (L N L' : ℕ) {i j : ℕ} (hij : i ≤ j) (hj : j ≤ 1) + (y : V) : + ‖conv (psi j) (b.dual L i) volume y‖ₑ ≤ + 2 ^ (finrank ℝ V + L') * b.psiDualSupportConst L N * dyadicWeight (-(L' : ℝ)) (j - i) * + 2 ^ (i * finrank ℝ V) * ((1 + 2 ^ i * ‖y‖ₑ) ^ N)⁻¹ := by + rw [conv_comm] + refine (enorm_conv_le_lintegral _ _ y).trans ?_ + have hρ : 0 ≤ 2 * (L : ℝ) * b.radius := by have := b.radius_nonneg; positivity + have hs : ∀ w, 2 * L * b.radius / 2 ^ i < ‖w‖ → b.dual L i w = 0 := fun w hw => + b.dual_eq_zero_of_lt L i hw + have hψ : ∀ z : V, ‖psi j z‖ₑ ≤ 2 ^ finrank ℝ V * psiDecayConst V N * 2 ^ (i * finrank ℝ V) * + ((1 + 2 ^ i * ‖z‖ₑ) ^ N)⁻¹ := fun z => by + have h2 : (2 : ℝ≥0∞) ^ (j * finrank ℝ V) ≤ 2 ^ finrank ℝ V * 2 ^ (i * finrank ℝ V) := by + rw [← pow_add] + exact pow_le_pow_right₀ one_le_two (by nlinarith) + refine (enorm_psi_le j N z).trans ?_ + calc psiDecayConst V N * 2 ^ (j * finrank ℝ V) * ((1 + 2 ^ j * ‖z‖ₑ) ^ N)⁻¹ + ≤ psiDecayConst V N * (2 ^ finrank ℝ V * 2 ^ (i * finrank ℝ V)) * + ((1 + 2 ^ i * ‖z‖ₑ) ^ N)⁻¹ := + mul_le_mul' (mul_le_mul_right h2 _) + (ENNReal.inv_one_add_mul_pow_anti (pow_le_pow_right₀ one_le_two hij) _ N) + _ = _ := by ring + refine (lintegral_mul_peetre_le_of_support (b.continuous_dual L i).aestronglyMeasurable hρ hs + hψ y).trans ?_ + have hw := ENNReal.one_le_two_pow_mul_dyadicWeight_neg L' (m := j - i) (by omega) + calc (∫⁻ w, ‖b.dual L i w‖ₑ) * (2 ^ finrank ℝ V * psiDecayConst V N * + ENNReal.ofReal ((1 + 2 * L * b.radius) ^ N) * 2 ^ (i * finrank ℝ V) * + ((1 + 2 ^ i * ‖y‖ₑ) ^ N)⁻¹) + ≤ (2 * eLpNorm (momentKernel b.toFun L) 1 volume) * (2 ^ finrank ℝ V * + psiDecayConst V N * ENNReal.ofReal ((1 + 2 * L * b.radius) ^ N) * + 2 ^ (i * finrank ℝ V) * ((1 + 2 ^ i * ‖y‖ₑ) ^ N)⁻¹) * 1 := by + rw [mul_one]; gcongr; exact b.lintegral_enorm_dual_le L i + _ ≤ (2 * eLpNorm (momentKernel b.toFun L) 1 volume) * (2 ^ finrank ℝ V * + psiDecayConst V N * ENNReal.ofReal ((1 + 2 * L * b.radius) ^ N) * + 2 ^ (i * finrank ℝ V) * ((1 + 2 ^ i * ‖y‖ₑ) ^ N)⁻¹) * + (2 ^ L' * dyadicWeight (-(L' : ℝ)) (j - i)) := by gcongr + _ = _ := by rw [psiDualSupportConst, pow_add]; ring + +end LocalMeansBump + +omit [InnerProductSpace ℝ V] [FiniteDimensional ℝ V] [MeasurableSpace V] [BorelSpace V] in +/-- For `L ≥ 1` and `i ≤ j' + 2`: `(1 + 2^j' ‖w‖ / (2L))^(-N) ≤ (8L)^N (1 + 2^i ‖w‖)^(-N)`, +from `1 + 2^i ‖w‖ ≤ 8L + 4 · 2^j' ‖w‖`. -/ +theorem inv_one_add_ofReal_div_pow_le {L i j' : ℕ} (hL : 1 ≤ L) (hij : i ≤ j' + 2) (w : V) + (N : ℕ) : + ((1 + ENNReal.ofReal (2 ^ j' * ‖w‖ / (2 * L))) ^ N)⁻¹ ≤ + (8 * (L : ℝ≥0∞)) ^ N * ((1 + 2 ^ i * ‖w‖ₑ) ^ N)⁻¹ := by + have hL0 : (8 * (L : ℝ≥0∞)) ≠ 0 := + mul_ne_zero (by norm_num) (Nat.cast_ne_zero.2 (by omega)) + refine ENNReal.inv_le_mul_inv_of_le (pow_ne_zero _ hL0) + (ENNReal.pow_ne_top (ENNReal.mul_ne_top (by norm_num) (ENNReal.natCast_ne_top L))) ?_ + rw [← mul_pow] + refine pow_le_pow_left' ?_ N + have hLr : (1 : ℝ) ≤ L := by exact_mod_cast hL + have h2 : (2 : ℝ) ^ i ≤ 4 * 2 ^ j' := by + calc (2 : ℝ) ^ i ≤ 2 ^ (j' + 2) := pow_le_pow_right₀ one_le_two hij + _ = 4 * 2 ^ j' := by ring + have hw := norm_nonneg w + rw [← ofReal_one_add_two_pow_mul_norm, ← ENNReal.ofReal_one, + ← ENNReal.ofReal_add zero_le_one (by positivity), ← ENNReal.ofReal_natCast, + ← ENNReal.ofReal_ofNat 8, ← ENNReal.ofReal_mul (by norm_num), + ← ENNReal.ofReal_mul (by positivity)] + refine ENNReal.ofReal_le_ofReal ?_ + have he : 8 * (L : ℝ) * (1 + 2 ^ j' * ‖w‖ / (2 * L)) = 8 * L + 4 * (2 ^ j' * ‖w‖) := by + field_simp + ring + rw [he] + nlinarith + +namespace LocalMeansBump + +variable (b : LocalMeansBump V) + +/-- **Differences of the dual kernels**, one step of the moment identity of `Φ`: +`|Δ^L'_{-2^(-j') z} η_i(w)| ≤ A 2^(in) 2^(iL') 2^(-j'L') ‖z‖^L'` with +`A = Rd.LocalMeansBump.dualDerivConst L L'`, by the bound of differences through derivatives. -/ +theorem enorm_higherDiff_dual_le (L L' i j' : ℕ) (z w : V) : + ‖(fwdDiff (-((2 : ℝ) ^ j')⁻¹ • z))^[L'] (b.dual L i) w‖ₑ ≤ + ENNReal.ofReal (b.dualDerivConst L L') * 2 ^ (i * finrank ℝ V) * dyadicWeight (L' : ℝ) i * + dyadicWeight (-(L' : ℝ)) j' * ‖z‖ₑ ^ L' := by + have hA := b.dualDerivConst_nonneg L L' + have h := norm_higherDiff_le_of_iteratedFDeriv (b.contDiff_dual L i) + (fun x => b.norm_iteratedFDeriv_dual_le L L' le_rfl i x) (-((2 : ℝ) ^ j')⁻¹ • z) w + have hh : ‖-((2 : ℝ) ^ j')⁻¹ • z‖ = ((2 : ℝ) ^ j')⁻¹ * ‖z‖ := by + rw [norm_smul, norm_neg, norm_inv, Real.norm_of_nonneg (by positivity)] + rw [hh, Nat.mul_add, pow_add, mul_pow] at h + rw [← ofReal_norm] + refine (ENNReal.ofReal_le_ofReal h).trans_eq ?_ + rw [mul_assoc (b.dualDerivConst L L'), ENNReal.ofReal_mul hA, + ENNReal.ofReal_mul (by positivity), ENNReal.ofReal_mul (by positivity), + ENNReal.ofReal_mul (by positivity), ofReal_two_pow_mul i L', + ENNReal.ofReal_pow (by positivity : (0 : ℝ) ≤ ((2 : ℝ) ^ j')⁻¹), + ENNReal.ofReal_inv_of_pos (by positivity : (0 : ℝ) < 2 ^ j'), + ENNReal.ofReal_pow (norm_nonneg z), ofReal_norm, ENNReal.ofReal_pow zero_le_two, + ENNReal.ofReal_pow zero_le_two, ENNReal.ofReal_ofNat, ← ENNReal.dyadicWeight_neg_natCast] + ring + +/-- **Support of the differences of the dual kernels**: `Δ^L'_h η_i(w) = 0` for +`‖w‖ > 2LR 2^(-i) + L' ‖h‖`, since all points `w + l h`, `l ≤ L'`, lie outside the support of +`η_i`. -/ +theorem higherDiff_dual_eq_zero (L L' i : ℕ) {h w : V} + (hw : 2 * L * b.radius / 2 ^ i + L' * ‖h‖ < ‖w‖) : + (fwdDiff h)^[L'] (b.dual L i) w = 0 := by + rw [higherDiff_apply] + refine Finset.sum_eq_zero fun l hl => ?_ + have hl' : (l : ℝ) ≤ L' := by exact_mod_cast Nat.lt_succ_iff.1 (Finset.mem_range.1 hl) + rw [b.dual_eq_zero_of_lt L i, mul_zero] + have h1 : ‖w‖ ≤ ‖w + (l : ℝ) • h‖ + l * ‖h‖ := by + calc ‖w‖ = ‖(w + (l : ℝ) • h) - (l : ℝ) • h‖ := by rw [add_sub_cancel_right] + _ ≤ ‖w + (l : ℝ) • h‖ + ‖(l : ℝ) • h‖ := norm_sub_le _ _ + _ = ‖w + (l : ℝ) • h‖ + l * ‖h‖ := by rw [norm_smul, Real.norm_of_nonneg (Nat.cast_nonneg l)] + have h2 : (l : ℝ) * ‖h‖ ≤ L' * ‖h‖ := mul_le_mul_of_nonneg_right hl' (norm_nonneg h) + linarith + +/-- **The averaged differences of `η_i`**, integrated: if the differences +`Δ^L'_{-2^(-j') z} η_i(w)` vanish for `‖z‖ < ρ`, then +`∫ |Φ(z)| |Δ^L'_{-2^(-j') z} η_i(w)| dz ≤ A 2^(in) 2^(iL') 2^(-j'L') T (1 + ρ)^(-N)` with +`A = Rd.LocalMeansBump.dualDerivConst L L'` and `T = Rd.tailConst lpKernelS L' N`. -/ +theorem lintegral_lpKernel_mul_higherDiff_dual_le (L L' i j' N : ℕ) (w : V) {ρ : ℝ} + (hsupp : ∀ z : V, ‖z‖ < ρ → (fwdDiff (-((2 : ℝ) ^ j')⁻¹ • z))^[L'] (b.dual L i) w = 0) : + ∫⁻ z, ‖lpKernel z‖ₑ * ‖(fwdDiff (-((2 : ℝ) ^ j')⁻¹ • z))^[L'] (b.dual L i) w‖ₑ ≤ + ENNReal.ofReal (b.dualDerivConst L L') * 2 ^ (i * finrank ℝ V) * + dyadicWeight (L' : ℝ) i * dyadicWeight (-(L' : ℝ)) j' * + tailConst (lpKernelS (V := V)) L' N * ((1 + ENNReal.ofReal ρ) ^ N)⁻¹ := by + set K0 := ENNReal.ofReal (b.dualDerivConst L L') * 2 ^ (i * finrank ℝ V) * + dyadicWeight (L' : ℝ) i * dyadicWeight (-(L' : ℝ)) j' with hK0def + have hK0 : K0 ≠ ∞ := ENNReal.mul_ne_top (ENNReal.mul_ne_top (ENNReal.mul_ne_top + ENNReal.ofReal_ne_top (ENNReal.pow_ne_top ENNReal.ofNat_ne_top)) + (ENNReal.dyadicWeight_ne_top _ _)) (ENNReal.dyadicWeight_ne_top _ _) + have hs : MeasurableSet {z : V | ρ ≤ ‖z‖} := measurableSet_le measurable_const measurable_norm + have hpt : ∀ z, ‖lpKernel z‖ₑ * ‖(fwdDiff (-((2 : ℝ) ^ j')⁻¹ • z))^[L'] (b.dual L i) w‖ₑ ≤ + {z : V | ρ ≤ ‖z‖}.indicator (fun z => ‖lpKernel z‖ₑ * ‖z‖ₑ ^ L') z * K0 := fun z => by + by_cases hz : ρ ≤ ‖z‖ + · rw [Set.indicator_of_mem (show z ∈ {z : V | ρ ≤ ‖z‖} from hz)] + calc ‖lpKernel z‖ₑ * ‖(fwdDiff (-((2 : ℝ) ^ j')⁻¹ • z))^[L'] (b.dual L i) w‖ₑ + ≤ ‖lpKernel z‖ₑ * (K0 * ‖z‖ₑ ^ L') := + mul_le_mul_right (b.enorm_higherDiff_dual_le L L' i j' z w) _ + _ = _ := by ring + · rw [hsupp z (not_le.1 hz), eNorm_zero, mul_zero] + exact zero_le + calc ∫⁻ z, ‖lpKernel z‖ₑ * ‖(fwdDiff (-((2 : ℝ) ^ j')⁻¹ • z))^[L'] (b.dual L i) w‖ₑ + ≤ ∫⁻ z, {z : V | ρ ≤ ‖z‖}.indicator (fun z => ‖lpKernel z‖ₑ * ‖z‖ₑ ^ L') z * K0 := + lintegral_mono hpt + _ = (∫⁻ z in {z : V | ρ ≤ ‖z‖}, ‖lpKernel z‖ₑ * ‖z‖ₑ ^ L') * K0 := by + rw [lintegral_mul_const' _ _ hK0, lintegral_indicator hs] + _ ≤ (tailConst (lpKernelS (V := V)) L' N * ((1 + ENNReal.ofReal ρ) ^ N)⁻¹) * K0 := by + gcongr + exact lintegral_tail_schwartz_le (lpKernelS (V := V)) L' N ρ + _ = _ := by rw [hK0def]; ring + +/-- The constant `A 4^L' (8L')^N (1 + 4LR)^N T` of the averaged differences of the dual kernels, +with `A = Rd.LocalMeansBump.dualDerivConst L L'` and `T = Rd.tailConst lpKernelS L' N`. -/ +noncomputable def dualTailConst (L L' N : ℕ) : ℝ≥0∞ := + ENNReal.ofReal (b.dualDerivConst L L') * 4 ^ L' * (8 * (L' : ℝ≥0∞)) ^ N * + ENNReal.ofReal ((1 + 4 * L * b.radius) ^ N) * tailConst (lpKernelS (V := V)) L' N + +/-- The constant of the averaged differences of the dual kernels is finite. -/ +theorem dualTailConst_ne_top (L L' N : ℕ) : b.dualTailConst L L' N ≠ ∞ := + ENNReal.mul_ne_top (ENNReal.mul_ne_top (ENNReal.mul_ne_top (ENNReal.mul_ne_top + ENNReal.ofReal_ne_top (ENNReal.pow_ne_top (by norm_num))) + (ENNReal.pow_ne_top (ENNReal.mul_ne_top (by norm_num) (ENNReal.natCast_ne_top L')))) + ENNReal.ofReal_ne_top) (tailConst_ne_top _ _ _) + +/-- For `L' ≥ 1` and `‖w‖ > 4LR 2^(-i)`, the difference `Δ^L'_{-2^(-j') z} η_i(w)` vanishes +whenever `‖z‖ < 2^j' ‖w‖ / (2L')`: all points `w - l 2^(-j') z`, `l ≤ L'`, then lie outside +`B̄(0, 2LR 2^(-i))`, where `η_i` vanishes. -/ +theorem higherDiff_dual_eq_zero_of_norm_lt (L L' i j' : ℕ) (hL' : 1 ≤ L') {w : V} + (hw : 4 * L * b.radius / 2 ^ i < ‖w‖) {z : V} (hz : ‖z‖ < 2 ^ j' * ‖w‖ / (2 * L')) : + (fwdDiff (-((2 : ℝ) ^ j')⁻¹ • z))^[L'] (b.dual L i) w = 0 := by + refine b.higherDiff_dual_eq_zero L L' i ?_ + have hLr : (0 : ℝ) < L' := by exact_mod_cast hL' + have hh : ‖-((2 : ℝ) ^ j')⁻¹ • z‖ = ‖z‖ / 2 ^ j' := by + rw [norm_smul, norm_neg, norm_inv, Real.norm_of_nonneg (by positivity), inv_mul_eq_div] + rw [hh] + have hz' : ‖z‖ * (2 * L') < 2 ^ j' * ‖w‖ := by rwa [lt_div_iff₀ (by positivity)] at hz + have h1 : L' * (‖z‖ / 2 ^ j') < ‖w‖ / 2 := by + rw [mul_div_assoc', div_lt_div_iff₀ (by positivity) two_pos] + nlinarith + have h2 : 2 * L * b.radius / 2 ^ i = (4 * L * b.radius / 2 ^ i) / 2 := by ring + linarith + +/-- **The averaged differences of the dual kernels**: for `L' ≥ 1`, `i ≤ j' + 2` and almost +every `w`, `|η_i(w) - (μ_{2^j'} ⋆ η_i)(w)| ≤ C 2^(-(j'+2-i)L') 2^(in) (1 + 2^i ‖w‖)^(-N)` with +`C = Rd.LocalMeansBump.dualTailConst L L' N`, where `μ` is the moment kernel of order `L'` of +`Φ`. -/ +theorem ae_enorm_dual_sub_conv_lpMomentScaled_le (L N : ℕ) {L' : ℕ} (hL' : 1 ≤ L') + {i j' : ℕ} (hij : i ≤ j' + 2) : + ∀ᵐ w ∂volume, ‖b.dual L i w - conv (lpMomentScaled L' j') (b.dual L i) volume w‖ₑ ≤ + b.dualTailConst L L' N * dyadicWeight (-(L' : ℝ)) (j' + 2 - i) * + 2 ^ (i * finrank ℝ V) * ((1 + 2 ^ i * ‖w‖ₑ) ^ N)⁻¹ := by + filter_upwards [ae_enorm_sub_conv_dilate_momentKernel_le le_rfl ENNReal.one_ne_top + integrable_lpKernel integral_lpKernel (memLp_one_iff_integrable.2 (b.integrable_dual L i)) L' + (c := (2 : ℝ) ^ j') (by positivity)] with w hw + refine hw.trans ?_ + have hR0 := b.radius_nonneg + have hfac := ENNReal.dyadicWeight_mul_dyadicWeight_neg_eq L' hij + have h8 : 1 ≤ (8 * (L' : ℝ≥0∞)) ^ N := + one_le_pow₀ (by exact_mod_cast (show 1 ≤ 8 * L' by omega)) + by_cases hsmall : ‖w‖ ≤ 4 * L * b.radius / 2 ^ i + · refine (b.lintegral_lpKernel_mul_higherDiff_dual_le L L' i j' N w (ρ := 0) + fun z hz => absurd hz (not_lt.2 (norm_nonneg z))).trans ?_ + have h4 : 2 ^ i * ‖w‖ₑ ≤ ENNReal.ofReal (4 * L * b.radius) := + two_pow_mul_enorm_le_ofReal hsmall + have h1 := ENNReal.one_le_ofReal_mul_inv_of_le (by positivity) h4 N + rw [ENNReal.ofReal_zero, add_zero, one_pow, inv_one, mul_one, mul_assoc _ (dyadicWeight _ i), + hfac, dualTailConst] + calc ENNReal.ofReal (b.dualDerivConst L L') * 2 ^ (i * finrank ℝ V) * + (4 ^ L' * dyadicWeight (-(L' : ℝ)) (j' + 2 - i)) * tailConst (lpKernelS (V := V)) L' N + = ENNReal.ofReal (b.dualDerivConst L L') * 2 ^ (i * finrank ℝ V) * + (4 ^ L' * dyadicWeight (-(L' : ℝ)) (j' + 2 - i)) * tailConst (lpKernelS (V := V)) L' N * + (1 * 1) := by rw [mul_one, mul_one] + _ ≤ ENNReal.ofReal (b.dualDerivConst L L') * 2 ^ (i * finrank ℝ V) * + (4 ^ L' * dyadicWeight (-(L' : ℝ)) (j' + 2 - i)) * tailConst (lpKernelS (V := V)) L' N * + ((8 * (L' : ℝ≥0∞)) ^ N * (ENNReal.ofReal ((1 + 4 * L * b.radius) ^ N) * + ((1 + 2 ^ i * ‖w‖ₑ) ^ N)⁻¹)) := by gcongr + _ = _ := by ring + · push Not at hsmall + refine (b.lintegral_lpKernel_mul_higherDiff_dual_le L L' i j' N w + (ρ := 2 ^ j' * ‖w‖ / (2 * L')) + fun z hz => b.higherDiff_dual_eq_zero_of_norm_lt L L' i j' hL' hsmall hz).trans ?_ + have hW := inv_one_add_ofReal_div_pow_le hL' hij w N + have h1 : 1 ≤ ENNReal.ofReal ((1 + 4 * L * b.radius) ^ N) := by + rw [← ENNReal.ofReal_one] + have hLR : 0 ≤ (L : ℝ) * b.radius := mul_nonneg (Nat.cast_nonneg L) hR0 + exact ENNReal.ofReal_le_ofReal (one_le_pow₀ (by nlinarith)) + rw [mul_assoc _ (dyadicWeight _ i), hfac, dualTailConst] + calc ENNReal.ofReal (b.dualDerivConst L L') * 2 ^ (i * finrank ℝ V) * + (4 ^ L' * dyadicWeight (-(L' : ℝ)) (j' + 2 - i)) * tailConst (lpKernelS (V := V)) L' N * + ((1 + ENNReal.ofReal (2 ^ j' * ‖w‖ / (2 * L'))) ^ N)⁻¹ + ≤ ENNReal.ofReal (b.dualDerivConst L L') * 2 ^ (i * finrank ℝ V) * + (4 ^ L' * dyadicWeight (-(L' : ℝ)) (j' + 2 - i)) * tailConst (lpKernelS (V := V)) L' N * + ((8 * (L' : ℝ≥0∞)) ^ N * (ENNReal.ofReal ((1 + 4 * L * b.radius) ^ N) * + ((1 + 2 ^ i * ‖w‖ₑ) ^ N)⁻¹)) := by + gcongr + refine hW.trans ?_ + gcongr + exact le_mul_of_one_le_left zero_le h1 + _ = _ := by ring + +/-- **The moment identity of `Φ` in the blocks**: +`ψ_{j'+2} ⋆ η_i = ψ_{j'+2} ⋆ (η_i - μ_{2^j'} ⋆ η_i)` almost everywhere, since +`ψ_{j'+2} ⋆ μ_{2^j'} = 0`. -/ +theorem conv_psi_dual_ae_eq (L L' i j' : ℕ) : + conv (psi (V := V) (j' + 2)) (b.dual L i) volume =ᵐ[volume] + conv (psi (j' + 2)) (b.dual L i - conv (lpMomentScaled L' j') (b.dual L i) volume) + volume := by + have hη : MemLp (b.dual L i) 1 volume := memLp_one_iff_integrable.2 (b.integrable_dual L i) + have hμη : MemLp (conv (lpMomentScaled L' j') (b.dual L i) volume) 1 volume := + memLp_one_iff_integrable.2 (integrable_conv (integrable_lpMomentScaled L' j') + (b.integrable_dual L i)) + have h0 : conv (psi (V := V) (j' + 2)) (conv (lpMomentScaled L' j') (b.dual L i) volume) + volume =ᵐ[volume] 0 := by + have h := conv_conv_ae le_rfl ENNReal.one_ne_top (integrable_psi (V := V) (j' + 2)) + (integrable_lpMomentScaled L' j') hη + rw [conv_psi_lpMomentScaled] at h + filter_upwards [h] with w hw + rw [← hw] + simp [conv_apply] + filter_upwards [conv_sub_ae le_rfl ENNReal.one_ne_top (integrable_psi (V := V) (j' + 2)) hη + hμη, h0] with y h1 h2 + rw [h1, Pi.sub_apply, h2, Pi.zero_apply, sub_zero] + +/-- **The case `i ≤ j`, `j ≥ 2`**: for `L' ≥ 1` and almost every `y`, +`|(ψ_j ⋆ η_i)(y)| ≤ C P I 2^(-(j-i)L') 2^(in) (1 + 2^i ‖y‖)^(-N)` with +`C = Rd.LocalMeansBump.dualTailConst L L' N`, `P = Rd.psiDecayConst V (2N)` and +`I = Rd.peetreIntegral V N`: by the moment identity of `Φ`, the averaged differences of `η_i` +and the convolution of two Peetre bumps. -/ +theorem ae_enorm_conv_psi_dual_le_of_two_le (L N : ℕ) {L' : ℕ} (hL' : 1 ≤ L') {i j : ℕ} + (hij : i ≤ j) (hj : 2 ≤ j) : + ∀ᵐ y ∂volume, ‖conv (psi j) (b.dual L i) volume y‖ₑ ≤ + b.dualTailConst L L' N * psiDecayConst V (2 * N) * peetreIntegral V N * + dyadicWeight (-(L' : ℝ)) (j - i) * 2 ^ (i * finrank ℝ V) * + ((1 + 2 ^ i * ‖y‖ₑ) ^ N)⁻¹ := by + obtain ⟨j', rfl⟩ : ∃ j', j = j' + 2 := ⟨j - 2, by omega⟩ + have hD := b.ae_enorm_dual_sub_conv_lpMomentScaled_le L N hL' hij + have hc : b.dualTailConst L L' N * dyadicWeight (-(L' : ℝ)) (j' + 2 - i) * + psiDecayConst V (2 * N) ≠ ∞ := + ENNReal.mul_ne_top (ENNReal.mul_ne_top (b.dualTailConst_ne_top L L' N) + (ENNReal.dyadicWeight_ne_top _ _)) (psiDecayConst_ne_top _) + filter_upwards [b.conv_psi_dual_ae_eq L L' i j'] with y hy + rw [hy, conv_comm] + refine (enorm_conv_le_lintegral _ _ y).trans ?_ + calc ∫⁻ w, ‖(b.dual L i - conv (lpMomentScaled L' j') (b.dual L i) volume) w‖ₑ * + ‖psi (j' + 2) (y - w)‖ₑ + ≤ ∫⁻ w, b.dualTailConst L L' N * dyadicWeight (-(L' : ℝ)) (j' + 2 - i) * + psiDecayConst V (2 * N) * (2 ^ ((j' + 2) * finrank ℝ V) * + ((1 + 2 ^ (j' + 2) * ‖y - w‖ₑ) ^ (2 * N))⁻¹ * + (2 ^ (i * finrank ℝ V) * ((1 + 2 ^ i * ‖w‖ₑ) ^ N)⁻¹)) := by + refine lintegral_mono_ae (hD.mono fun w hw => ?_) + calc ‖(b.dual L i - conv (lpMomentScaled L' j') (b.dual L i) volume) w‖ₑ * + ‖psi (j' + 2) (y - w)‖ₑ + ≤ (b.dualTailConst L L' N * dyadicWeight (-(L' : ℝ)) (j' + 2 - i) * + 2 ^ (i * finrank ℝ V) * ((1 + 2 ^ i * ‖w‖ₑ) ^ N)⁻¹) * + (psiDecayConst V (2 * N) * 2 ^ ((j' + 2) * finrank ℝ V) * + ((1 + 2 ^ (j' + 2) * ‖y - w‖ₑ) ^ (2 * N))⁻¹) := + mul_le_mul' hw (enorm_psi_le _ _ _) + _ = _ := by ring + _ = b.dualTailConst L L' N * dyadicWeight (-(L' : ℝ)) (j' + 2 - i) * + psiDecayConst V (2 * N) * ∫⁻ w, 2 ^ ((j' + 2) * finrank ℝ V) * + ((1 + 2 ^ (j' + 2) * ‖y - w‖ₑ) ^ (2 * N))⁻¹ * + (2 ^ (i * finrank ℝ V) * ((1 + 2 ^ i * ‖w‖ₑ) ^ N)⁻¹) := + lintegral_const_mul' _ _ hc + _ ≤ b.dualTailConst L L' N * dyadicWeight (-(L' : ℝ)) (j' + 2 - i) * + psiDecayConst V (2 * N) * (peetreIntegral V N * 2 ^ (i * finrank ℝ V) * + ((1 + 2 ^ i * ‖y‖ₑ) ^ N)⁻¹) := by + gcongr + exact lintegral_peetre_mul_le hij N y + _ = _ := by ring + +/-- The constant of the cross kernel `ψ_j ⋆ η_i`: the sum of the constants of the three cases, +`(1 + 2^(n+L')) C_s + C P I` with `C_s = Rd.LocalMeansBump.psiDualSupportConst L N`, +`C = Rd.LocalMeansBump.dualTailConst L L' N`, `P = Rd.psiDecayConst V (2N)` and +`I = Rd.peetreIntegral V N`. -/ +noncomputable def psiDualConst (L L' N : ℕ) : ℝ≥0∞ := + (1 + 2 ^ (finrank ℝ V + L')) * b.psiDualSupportConst L N + + b.dualTailConst L L' N * psiDecayConst V (2 * N) * peetreIntegral V N + +/-- The constant of the cross kernel `ψ_j ⋆ η_i` is finite for `N > n`. -/ +theorem psiDualConst_ne_top (L L' : ℕ) {N : ℕ} (hN : finrank ℝ V < N) : + b.psiDualConst L L' N ≠ ∞ := by + refine ENNReal.add_ne_top.2 ⟨ENNReal.mul_ne_top (ENNReal.add_ne_top.2 ⟨ENNReal.one_ne_top, + ENNReal.pow_ne_top ENNReal.ofNat_ne_top⟩) (b.psiDualSupportConst_ne_top L N), ?_⟩ + exact ENNReal.mul_ne_top (ENNReal.mul_ne_top (b.dualTailConst_ne_top L L' N) + (psiDecayConst_ne_top _)) (peetreIntegral_ne_top hN) + +/-- **The cross kernel `ψ_j ⋆ η_i`**: for every order `L`, every `L' ≥ 1`, all levels `i, j` and +almost every `y`, `|(ψ_j ⋆ η_i)(y)| ≤ C c_{ji} 2^(min(i,j) n) (1 + 2^min(i,j) ‖y‖)^(-N)` with +`c_{ji} = 2^(-(j-i)L')` for `i ≤ j`, `c_{ji} = 1` for `i > j`, and +`C = Rd.LocalMeansBump.psiDualConst L L' N`. -/ +theorem enorm_conv_psi_dual_le (L : ℕ) {L' : ℕ} (hL' : 1 ≤ L') (N i j : ℕ) : + ∀ᵐ y ∂volume, ‖conv (psi j) (b.dual L i) volume y‖ₑ ≤ + b.psiDualConst L L' N * (if i ≤ j then dyadicWeight (-(L' : ℝ)) (j - i) else 1) * + 2 ^ (min i j * finrank ℝ V) * ((1 + 2 ^ (min i j) * ‖y‖ₑ) ^ N)⁻¹ := by + have h1 : b.psiDualSupportConst L N ≤ b.psiDualConst L L' N := + (le_mul_of_one_le_left zero_le le_self_add).trans le_self_add + have h2 : 2 ^ (finrank ℝ V + L') * b.psiDualSupportConst L N ≤ b.psiDualConst L L' N := + (mul_le_mul_left le_add_self _).trans le_self_add + have h3 : b.dualTailConst L L' N * psiDecayConst V (2 * N) * peetreIntegral V N ≤ + b.psiDualConst L L' N := le_add_self + rcases lt_or_ge j i with hji | hij + · refine Filter.Eventually.of_forall fun y => (b.enorm_conv_psi_dual_le_of_lt L N hji y).trans ?_ + simp only [not_le.2 hji, ↓reduceIte, min_eq_right hji.le, mul_one] + gcongr + · simp only [hij, ↓reduceIte, min_eq_left hij] + rcases le_or_gt j 1 with hj | hj + · refine Filter.Eventually.of_forall fun y => + (b.enorm_conv_psi_dual_le_of_le_one L N L' hij hj y).trans ?_ + gcongr + · filter_upwards [b.ae_enorm_conv_psi_dual_le_of_two_le L N hL' hij hj] with y hy + refine hy.trans ?_ + gcongr + +end LocalMeansBump + +/-! ### Maximal function bounds of convolutions -/ + +/-- **Convolutions under a Peetre majorant**: if `|K(y)| ≤ C 2^(mn) (1 + 2^m ‖y‖)^(-N)` almost +everywhere with `C < ∞` and `N > n`, then `|K ⋆ h(x)| ≤ C_{n,N} C M|h|(x)` for every function +`h` and every `x`, with `C_{n,N} = Rd.decayMaximalConst V N`. -/ +theorem enorm_conv_le_maximal_of_decay {N m : ℕ} (hN : finrank ℝ V < N) {C : ℝ≥0∞} + (hC : C ≠ ∞) {K : V → ℂ} + (hK : ∀ᵐ y ∂volume, ‖K y‖ₑ ≤ C * 2 ^ (m * finrank ℝ V) * ((1 + 2 ^ m * ‖y‖ₑ) ^ N)⁻¹) + (h : V → ℂ) (x : V) : + ‖conv K h volume x‖ₑ ≤ decayMaximalConst V N * C * maximal (fun y => ‖h y‖ₑ) x := + (enorm_conv_le_lintegral K h x).trans ((lintegral_mono_ae (hK.mono fun _ hy => + mul_le_mul_left hy _)).trans + (lintegral_mul_le_maximal_of_one_add_norm (j := m) hN hC (fun _ => le_rfl) + (fun y => ‖h y‖ₑ) x)) + +end Rd diff --git a/LeanPool/FunctionSpaces/Rd/LocalMeans/LocalMeans.lean b/LeanPool/FunctionSpaces/Rd/LocalMeans/LocalMeans.lean new file mode 100644 index 0000000000..cfcaf28410 --- /dev/null +++ b/LeanPool/FunctionSpaces/Rd/LocalMeans/LocalMeans.lean @@ -0,0 +1,657 @@ +/- +Copyright (c) 2026 Mario Ullrich. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Mario Ullrich +-/ +module + +public import LeanPool.FunctionSpaces.Rd.Differences.MomentKernels +public import LeanPool.FunctionSpaces.Rd.Differences.BesovDifferences +public import Mathlib.Analysis.Calculus.BumpFunction.Normed + +/- +Modified for Lean Pool: module names and imports adapted. +-/ + +/-! +# Local means + +A **bump for local means** is a smooth `g : V → ℂ` with `∫ g = 1` that vanishes outside the ball +of radius `R` (`Rd.LocalMeansBump`). With the moment kernel `m` of order `L` +(`Rd.momentKernel`) and its dilations `m_{2^j}` (`Rd.LocalMeansBump.scaled`), the **local means** +of `f ∈ L_p(V)` are `k_j ⋆ f` (`Rd.LocalMeansBump.localMean`) with the kernels + +`k_0 = m`, `k_j = m_{2^j} - m_{2^(j-1)}` (`Rd.LocalMeansBump.kernel`), + +and the **local means quasi-norm** is `‖(2^(js) ‖k_j ⋆ f‖_p)_j‖_{ℓ_q}` +(`Rd.LocalMeansBump.localMeansNorm`). With the dual kernels `η_0 = m`, +`η_j = m_{2^j} + m_{2^(j-1)}` (`Rd.LocalMeansBump.dual`), the identity `a² - b² = (a - b)(a + b)` +in the commutative convolution algebra gives the **reproducing formula** +`∑_{j ≤ J} η_j ⋆ k_j ⋆ f = m_{2^J} ⋆ m_{2^J} ⋆ f → f` in `L_p` +(`Rd.LocalMeansBump.sum_dual_localMean`, `Rd.LocalMeansBump.tendsto_sum_dual_localMean`). + +**Local means and differences** (`Rd.LocalMeansBump.besov_iff_localMeans`): for `1 ≤ p < ∞`, +`0 < s < L` and `1 ≤ q ≤ ∞`, `‖f‖_p + ‖(2^(ks) ω_L(f, 2^(-k))_p)_k‖_{ℓ_q} < ∞` iff the local means +quasi-norm is finite, with equivalent quasi-norms: + +* `‖k_j ⋆ f‖_p ≤ 2 ‖g‖_1 (1 + R)^L ω_L(f, 2^(1-j))_p`, since `f - m_c ⋆ f` averages differences + of order `L` (`Rd.LocalMeansBump.localMeansNorm_le`); +* `ω_L(η_j ⋆ h, 2^(-i))_p ≤ C min(1, 2^((j-i)L)) ‖h‖_p` by the differences of the smooth kernels + in `L_1`; the reproducing formula and Hardy's inequalities in both directions + (`ENNReal.lqNorm_almostDiagonal_le`) bound the moduli by the local means + (`Rd.LocalMeansBump.modNorm_le_localMeansNorm`). + +Local means therefore describe the same spaces as band-limited approximation, Littlewood–Paley +blocks and differences (`Rd.LocalMeansBump.memApprox_bandScheme_iff_localMeans`). + +**Bumps from smooth bump functions**: the normalised smooth bump function around `c` with outer +radius `r` (Mathlib's `ContDiffBump.normed`), with complex values (`Rd.bumpMollifier`), is a bump +of every radius `R ≥ ‖c‖ + r` (`Rd.LocalMeansBump.ofContDiffBump`). Hence every radius `R > 0` has +a bump, the one around `0` (`Rd.LocalMeansBump.centered`). +-/ + +@[expose] public section + +open MeasureTheory Filter Topology Module +open scoped ENNReal SchwartzMap + +open ENNReal (lqNorm dyadicWeight) + +namespace Rd + +variable {V : Type*} [NormedAddCommGroup V] [InnerProductSpace ℝ V] [FiniteDimensional ℝ V] + [MeasurableSpace V] [BorelSpace V] + +/-! ### Bumps and their kernels -/ + +variable (V) in +/-- A **bump for local means**: a smooth function with integral `1` that vanishes outside the +ball of radius `radius`. -/ +structure LocalMeansBump where + /-- The function. -/ + toFun : V → ℂ + /-- The radius of the ball outside of which the bump vanishes. -/ + radius : ℝ + radius_nonneg : 0 ≤ radius + contDiff : ContDiff ℝ ((⊤ : ℕ∞) : WithTop ℕ∞) toFun + eq_zero : ∀ z, radius < ‖z‖ → toFun z = 0 + integral_eq_one : ∫ z, toFun z = 1 + +namespace LocalMeansBump + +variable (b : LocalMeansBump V) + +/-- A bump has compact support. -/ +theorem hasCompactSupport : HasCompactSupport b.toFun := + HasCompactSupport.intro (isCompact_closedBall 0 b.radius) fun x hx => + b.eq_zero x (by simpa [Metric.mem_closedBall, dist_zero_right, not_le] using hx) + +/-- A bump is integrable. -/ +theorem integrable : Integrable b.toFun := + b.contDiff.continuous.integrable_of_hasCompactSupport b.hasCompactSupport + +/-- The moment kernel of a bump is smooth. -/ +theorem contDiff_momentKernel (L : ℕ) : + ContDiff ℝ ((⊤ : ℕ∞) : WithTop ℕ∞) (momentKernel b.toFun L) := + ContDiff.sum fun _ _ => contDiff_const.mul + (contDiff_const.mul (b.contDiff.comp (contDiff_const_smul _))) + +/-- The moment kernel of a bump vanishes outside the ball of radius `L R`. -/ +theorem momentKernel_eq_zero (L : ℕ) {x : V} (hx : L * b.radius < ‖x‖) : + momentKernel b.toFun L x = 0 := by + refine Finset.sum_eq_zero fun l hl => ?_ + have hl' : (l : ℝ) + 1 ≤ L := by exact_mod_cast Finset.mem_range.1 hl + have hpos : (0 : ℝ) < (l : ℝ) + 1 := by positivity + rw [dilate, b.eq_zero _ ?_, mul_zero, mul_zero] + rw [norm_smul, Real.norm_of_nonneg (by positivity), one_div, inv_mul_eq_div, lt_div_iff₀ hpos] + calc b.radius * ((l : ℝ) + 1) ≤ b.radius * L := mul_le_mul_of_nonneg_left hl' b.radius_nonneg + _ = L * b.radius := mul_comm _ _ + _ < ‖x‖ := hx + +/-- The moment kernel of a bump has compact support. -/ +theorem hasCompactSupport_momentKernel (L : ℕ) : HasCompactSupport (momentKernel b.toFun L) := + HasCompactSupport.intro (isCompact_closedBall 0 (L * b.radius)) fun x hx => + b.momentKernel_eq_zero L (by simpa [Metric.mem_closedBall, dist_zero_right, not_le] using hx) + +/-- The moment kernel of a bump as a Schwartz function. -/ +noncomputable def momentSchwartz (L : ℕ) : 𝓢(V, ℂ) := + (b.hasCompactSupport_momentKernel L).toSchwartzMap (b.contDiff_momentKernel L) + +/-- The `L_1` norm of the derivatives of order `L` of the moment kernel. -/ +noncomputable def derivNorm (L : ℕ) : ℝ≥0∞ := + ∫⁻ x, ‖iteratedFDeriv ℝ L (b.momentSchwartz L : V → ℂ) x‖ₑ + +/-- The moment kernel at the dyadic scale `2^j`, `m_{2^j} = 2^(jn) m(2^j ·)`. -/ +noncomputable def scaled (L j : ℕ) : V → ℂ := dilate (2 ^ j) (momentKernel b.toFun L) + +/-- The **local means kernels** `k_0 = m`, `k_j = m_{2^j} - m_{2^(j-1)}`. -/ +noncomputable def kernel (L : ℕ) : ℕ → V → ℂ + | 0 => b.scaled L 0 + | j + 1 => b.scaled L (j + 1) - b.scaled L j + +/-- The **dual kernels** `η_0 = m`, `η_j = m_{2^j} + m_{2^(j-1)}`. -/ +noncomputable def dual (L : ℕ) : ℕ → V → ℂ + | 0 => b.scaled L 0 + | j + 1 => b.scaled L (j + 1) + b.scaled L j + +/-- The dilated moment kernels are integrable. -/ +theorem integrable_scaled (L j : ℕ) : Integrable (b.scaled L j) := + integrable_dilate (integrable_momentKernel b.integrable L) (by positivity) + +/-- The local means kernels are integrable. -/ +theorem integrable_kernel (L j : ℕ) : Integrable (b.kernel L j) := by + cases j with + | zero => exact b.integrable_scaled L 0 + | succ j => exact (b.integrable_scaled L (j + 1)).sub (b.integrable_scaled L j) + +/-- The dual kernels are integrable. -/ +theorem integrable_dual (L j : ℕ) : Integrable (b.dual L j) := by + cases j with + | zero => exact b.integrable_scaled L 0 + | succ j => exact (b.integrable_scaled L (j + 1)).add (b.integrable_scaled L j) + +/-- `‖m_{2^j}‖_1 = ‖m‖_1`. -/ +theorem eLpNorm_scaled_one (L j : ℕ) : + eLpNorm (b.scaled L j) 1 volume = eLpNorm (momentKernel b.toFun L) 1 volume := + eLpNorm_dilate_one (integrable_momentKernel b.integrable L) (by positivity) + +/-- `‖η_j‖_1 ≤ 2 ‖m‖_1`. -/ +theorem eLpNorm_dual_one_le (L j : ℕ) : + eLpNorm (b.dual L j) 1 volume ≤ 2 * eLpNorm (momentKernel b.toFun L) 1 volume := by + cases j with + | zero => + rw [two_mul] + exact (b.eLpNorm_scaled_one L 0).le.trans le_self_add + | succ j => + change eLpNorm (b.scaled L (j + 1) + b.scaled L j) 1 volume ≤ _ + calc eLpNorm (b.scaled L (j + 1) + b.scaled L j) 1 volume + ≤ eLpNorm (b.scaled L (j + 1)) 1 volume + eLpNorm (b.scaled L j) 1 volume := + eLpNorm_add_le le_rfl + _ = 2 * eLpNorm (momentKernel b.toFun L) 1 volume := by + rw [b.eLpNorm_scaled_one, b.eLpNorm_scaled_one, two_mul] + +/-- `‖k_j‖_1 ≤ 2 ‖m‖_1`. -/ +theorem eLpNorm_kernel_one_le (L j : ℕ) : + eLpNorm (b.kernel L j) 1 volume ≤ 2 * eLpNorm (momentKernel b.toFun L) 1 volume := by + cases j with + | zero => + rw [two_mul] + exact (b.eLpNorm_scaled_one L 0).le.trans le_self_add + | succ j => + change eLpNorm (b.scaled L (j + 1) - b.scaled L j) 1 volume ≤ _ + calc eLpNorm (b.scaled L (j + 1) - b.scaled L j) 1 volume + ≤ eLpNorm (b.scaled L (j + 1)) 1 volume + eLpNorm (b.scaled L j) 1 volume := + eLpNorm_sub_le le_rfl + _ = 2 * eLpNorm (momentKernel b.toFun L) 1 volume := by + rw [b.eLpNorm_scaled_one, b.eLpNorm_scaled_one, two_mul] + +/-- The dilated moment kernels vanish outside `B̄(0, L R 2^(-j))`. -/ +theorem scaled_eq_zero_of_lt (L j : ℕ) {y : V} (hy : L * b.radius / 2 ^ j < ‖y‖) : + b.scaled L j y = 0 := by + rw [scaled, dilate, b.momentKernel_eq_zero L, mul_zero] + rw [norm_smul, Real.norm_of_nonneg (by positivity)] + rw [div_lt_iff₀ (by positivity)] at hy + linarith + +/-- The dual kernels vanish outside `B̄(0, 2 L R 2^(-j))`. -/ +theorem dual_eq_zero_of_lt (L j : ℕ) {y : V} (hy : 2 * L * b.radius / 2 ^ j < ‖y‖) : + b.dual L j y = 0 := by + have hLR : 0 ≤ (L : ℝ) * b.radius := mul_nonneg (Nat.cast_nonneg L) b.radius_nonneg + cases j with + | zero => + refine b.scaled_eq_zero_of_lt L 0 (lt_of_le_of_lt ?_ hy) + simp only [pow_zero, div_one] + linarith + | succ j => + change b.scaled L (j + 1) y + b.scaled L j y = 0 + have h1 : (L : ℝ) * b.radius / 2 ^ (j + 1) ≤ 2 * L * b.radius / 2 ^ (j + 1) := + div_le_div_of_nonneg_right (by linarith) (by positivity) + have h2 : 2 * (L : ℝ) * b.radius / 2 ^ (j + 1) = L * b.radius / 2 ^ j := by + rw [pow_succ, mul_comm ((2 : ℝ) ^ j) 2, mul_assoc, mul_div_mul_left _ _ two_ne_zero] + rw [b.scaled_eq_zero_of_lt L (j + 1) (h1.trans_lt hy), + b.scaled_eq_zero_of_lt L j (h2 ▸ hy), add_zero] + +/-- The dual kernels have compact support. -/ +theorem hasCompactSupport_dual (L j : ℕ) : HasCompactSupport (b.dual L j) := + HasCompactSupport.intro (isCompact_closedBall 0 (2 * L * b.radius / 2 ^ j)) fun y hy => + b.dual_eq_zero_of_lt L j (by simpa [Metric.mem_closedBall, dist_zero_right, not_le] using hy) + +/-- The dual kernels are continuous. -/ +theorem continuous_dual (L j : ℕ) : Continuous (b.dual L j) := by + have hm : Continuous (momentKernel b.toFun L) := (b.contDiff_momentKernel L).continuous + cases j with + | zero => exact continuous_dilate hm _ + | succ j => exact (continuous_dilate hm _).add (continuous_dilate hm _) + +/-- The dilated moment kernels have compact support. -/ +theorem hasCompactSupport_scaled (L j : ℕ) : HasCompactSupport (b.scaled L j) := + HasCompactSupport.intro (isCompact_closedBall 0 (L * b.radius / 2 ^ j)) fun y hy => + b.scaled_eq_zero_of_lt L j (by simpa [Metric.mem_closedBall, dist_zero_right, not_le] using hy) + +/-- The dilated moment kernels are continuous. -/ +theorem continuous_scaled (L j : ℕ) : Continuous (b.scaled L j) := + continuous_dilate (b.contDiff_momentKernel L).continuous _ + +/-- The local means kernels have compact support. -/ +theorem hasCompactSupport_kernel (L j : ℕ) : HasCompactSupport (b.kernel L j) := by + cases j with + | zero => exact b.hasCompactSupport_scaled L 0 + | succ j => exact (b.hasCompactSupport_scaled L (j + 1)).sub (b.hasCompactSupport_scaled L j) + +/-- The local means kernels are continuous. -/ +theorem continuous_kernel (L j : ℕ) : Continuous (b.kernel L j) := by + cases j with + | zero => exact b.continuous_scaled L 0 + | succ j => exact (b.continuous_scaled L (j + 1)).sub (b.continuous_scaled L j) + +/-- **Differences of the dilated moment kernels in `L_1`**: +`‖Δ_v^L m_{2^j}‖_1 ≤ (2^j ‖v‖)^L ‖D^L m‖_1`. -/ +theorem eLpNorm_higherDiff_scaled_le (L j : ℕ) (v : V) : + eLpNorm ((fwdDiff v)^[L] (b.scaled L j)) 1 volume ≤ + ENNReal.ofReal (2 ^ j * ‖v‖) ^ L * b.derivNorm L := by + have hint : Integrable ((fwdDiff ((2 : ℝ) ^ j • v))^[L] (momentKernel b.toFun L)) := + integrable_higherDiff (integrable_momentKernel b.integrable L) L _ + rw [scaled, higherDiff_dilate, eLpNorm_dilate_one hint (by positivity), + eLpNorm_one_eq_lintegral_eNorm hint.aestronglyMeasurable] + refine (lintegral_enorm_higherDiff_schwartz_le _ L (b.momentSchwartz L)).trans_eq ?_ + rw [← ofReal_norm, norm_smul, Real.norm_of_nonneg (by positivity)] + rfl + +/-- `‖Δ_v^L m_{2^j}‖_1 ≤ 2^L ‖m‖_1`. -/ +theorem eLpNorm_higherDiff_scaled_le' (L j : ℕ) (v : V) : + eLpNorm ((fwdDiff v)^[L] (b.scaled L j)) 1 volume ≤ + 2 ^ L * eLpNorm (momentKernel b.toFun L) 1 volume := by + rw [← b.eLpNorm_scaled_one L j] + exact eLpNorm_higherDiff_le (b.integrable_scaled L j).aestronglyMeasurable le_rfl L v + +/-- The constant `2 (‖D^L m‖_1 + 2^L ‖m‖_1)` of the differences of the dual kernels. -/ +noncomputable def dualConst (L : ℕ) : ℝ≥0∞ := + 2 * (b.derivNorm L + 2 ^ L * eLpNorm (momentKernel b.toFun L) 1 volume) + +/-- The constant of the differences of the dual kernels is finite. -/ +theorem dualConst_ne_top (L : ℕ) : b.dualConst L ≠ ∞ := + ENNReal.mul_ne_top (by norm_num) (ENNReal.add_ne_top.2 + ⟨lintegral_enorm_iteratedFDeriv_ne_top L _, ENNReal.mul_ne_top (by simp) + (eLpNorm_momentKernel_ne_top b.integrable L)⟩) + +/-- One dilated kernel at a scale at most `2^j`: `‖Δ_v^L m_{2^l}‖_1 ≤ C 2^(-(i-j)L)` for +`l ≤ j ≤ i` and `‖v‖ ≤ 2^(-i)`, and `≤ C` always. -/ +theorem eLpNorm_higherDiff_scaled_le_dyadic (L : ℕ) {i j l : ℕ} (hlj : l ≤ j) {v : V} + (hv : ‖v‖ ≤ 1 / 2 ^ i) : + eLpNorm ((fwdDiff v)^[L] (b.scaled L l)) 1 volume ≤ + (b.derivNorm L + 2 ^ L * eLpNorm (momentKernel b.toFun L) 1 volume) * + (if j ≤ i then dyadicWeight (-(L : ℝ)) (i - j) else 1) := by + split_ifs with hji + · have hw : ENNReal.ofReal (2 ^ l * ‖v‖) ^ L ≤ dyadicWeight (-(L : ℝ)) (i - j) := by + rw [← ENNReal.rpow_natCast] + exact (ENNReal.ofReal_two_pow_mul_rpow_le (hlj.trans hji) hv (Nat.cast_nonneg L)).trans + (ENNReal.dyadicWeight_anti (by simp) (by omega)) + calc eLpNorm ((fwdDiff v)^[L] (b.scaled L l)) 1 volume + ≤ ENNReal.ofReal (2 ^ l * ‖v‖) ^ L * b.derivNorm L := b.eLpNorm_higherDiff_scaled_le L l v + _ ≤ dyadicWeight (-(L : ℝ)) (i - j) * b.derivNorm L := by gcongr + _ ≤ (b.derivNorm L + 2 ^ L * eLpNorm (momentKernel b.toFun L) 1 volume) * + dyadicWeight (-(L : ℝ)) (i - j) := by + rw [mul_comm] + gcongr + exact le_self_add + · rw [mul_one] + exact (b.eLpNorm_higherDiff_scaled_le' L l v).trans le_add_self + +/-- **Differences of the dual kernels in `L_1`**: for `‖v‖ ≤ 2^(-i)`, +`‖Δ_v^L η_j‖_1 ≤ C 2^(-(i-j)L)` if `j ≤ i`, and `‖Δ_v^L η_j‖_1 ≤ C` if `j > i`. -/ +theorem eLpNorm_higherDiff_dual_le (L : ℕ) {i j : ℕ} {v : V} (hv : ‖v‖ ≤ 1 / 2 ^ i) : + eLpNorm ((fwdDiff v)^[L] (b.dual L j)) 1 volume ≤ + b.dualConst L * (if j ≤ i then dyadicWeight (-(L : ℝ)) (i - j) else 1) := by + set B := (b.derivNorm L + 2 ^ L * eLpNorm (momentKernel b.toFun L) 1 volume) * + (if j ≤ i then dyadicWeight (-(L : ℝ)) (i - j) else 1) + have h2 : b.dualConst L * (if j ≤ i then dyadicWeight (-(L : ℝ)) (i - j) else 1) = B + B := by + rw [dualConst, ← two_mul, mul_assoc] + rw [h2] + cases j with + | zero => + exact (b.eLpNorm_higherDiff_scaled_le_dyadic L le_rfl hv).trans le_self_add + | succ j => + change eLpNorm ((fwdDiff v)^[L] (b.scaled L (j + 1) + b.scaled L j)) 1 volume ≤ B + B + rw [fwdDiff_iter_add] + exact (eLpNorm_add_le le_rfl).trans (add_le_add + (b.eLpNorm_higherDiff_scaled_le_dyadic L le_rfl hv) + (b.eLpNorm_higherDiff_scaled_le_dyadic L (Nat.le_succ j) hv)) + +/-! ### Local means and the reproducing formula -/ + +variable {p : ℝ≥0∞} [Fact (1 ≤ p)] + +/-- The **local means** `f ↦ k_j ⋆ f` on `L_p`. -/ +noncomputable def localMean (hp : p ≠ ∞) (L j : ℕ) : + Lp ℂ p (volume : Measure V) →L[ℂ] Lp ℂ p (volume : Measure V) := + convLp hp (b.integrable_kernel L j) + +/-- **The reproducing formula, partial sums**: `∑_{j ≤ J} η_j ⋆ k_j ⋆ f = m_{2^J} ⋆ m_{2^J} ⋆ f`, +from `a² - b² = (a - b)(a + b)` for the commuting operators `a = m_{2^(J+1)} ⋆`, +`b = m_{2^J} ⋆`. -/ +theorem sum_dual_localMean (hp : p ≠ ∞) (L J : ℕ) (f : Lp ℂ p (volume : Measure V)) : + ∑ j ∈ Finset.range (J + 1), convLp hp (b.integrable_dual L j) (b.localMean hp L j f) = + convLp hp (b.integrable_scaled L J) (convLp hp (b.integrable_scaled L J) f) := by + induction J with + | zero => + rw [Finset.sum_range_one] + rfl + | succ J ih => + have hk : b.localMean hp L (J + 1) f = convLp hp (b.integrable_scaled L (J + 1)) f - + convLp hp (b.integrable_scaled L J) f := + convLp_sub_kernel hp (b.integrable_scaled L (J + 1)) (b.integrable_scaled L J) f + have hd : convLp hp (b.integrable_dual L (J + 1)) (b.localMean hp L (J + 1) f) = + convLp hp (b.integrable_scaled L (J + 1)) (b.localMean hp L (J + 1) f) + + convLp hp (b.integrable_scaled L J) (b.localMean hp L (J + 1) f) := + convLp_add_kernel hp (b.integrable_scaled L (J + 1)) (b.integrable_scaled L J) _ + rw [Finset.sum_range_succ, ih, hd, hk, map_sub, map_sub, + convLp_comm hp (b.integrable_scaled L (J + 1)) (b.integrable_scaled L J)] + abel + +/-- **The reproducing formula at every point**: `∑_{j ≤ J} (η_j ⋆ (k_j ⋆ f))(y) = +(m_{2^J} ⋆ (m_{2^J} ⋆ f))(y)` for all `y`, since both sides are continuous and agree almost +everywhere (`Rd.LocalMeansBump.sum_dual_localMean`). -/ +theorem sum_conv_dual_localMean_apply (hp : p ≠ ∞) (L J : ℕ) + (f : Lp ℂ p (volume : Measure V)) (y : V) : + ∑ j ∈ Finset.range (J + 1), conv (b.dual L j) (b.localMean hp L j f) volume y = + conv (b.scaled L J) (convLp hp (b.integrable_scaled L J) f) volume y := by + have hp1 : 1 ≤ p := Fact.out + have hcont1 : Continuous fun y => + ∑ j ∈ Finset.range (J + 1), conv (b.dual L j) (b.localMean hp L j f) volume y := + continuous_finsetSum _ fun j _ => (b.hasCompactSupport_dual L j).continuous_convolution_left + (ContinuousLinearMap.mul ℂ ℂ) (b.continuous_dual L j) ((Lp.memLp _).locallyIntegrable hp1) + have hcont2 : Continuous (conv (b.scaled L J) (convLp hp (b.integrable_scaled L J) f) volume) := + (b.hasCompactSupport_scaled L J).continuous_convolution_left (ContinuousLinearMap.mul ℂ ℂ) + (b.continuous_scaled L J) ((Lp.memLp _).locallyIntegrable hp1) + have hae : (fun y => ∑ j ∈ Finset.range (J + 1), + conv (b.dual L j) (b.localMean hp L j f) volume y) =ᵐ[volume] + conv (b.scaled L J) (convLp hp (b.integrable_scaled L J) f) volume := by + have h1 := Lp.coeFn_fun_finsetSum (Finset.range (J + 1)) + (fun j => convLp hp (b.integrable_dual L j) (b.localMean hp L j f)) + rw [b.sum_dual_localMean hp L J f] at h1 + have h2 := convLp_apply_ae hp (b.integrable_scaled L J) + (convLp hp (b.integrable_scaled L J) f) + have h3 : ∀ᵐ y ∂volume, ∀ j, convLp hp (b.integrable_dual L j) (b.localMean hp L j f) y = + conv (b.dual L j) (b.localMean hp L j f) volume y := + ae_all_iff.2 fun j => convLp_apply_ae hp _ _ + filter_upwards [h1, h2, h3] with y hy1 hy2 hy3 + rw [← hy2, hy1] + exact Finset.sum_congr rfl fun j _ => (hy3 j).symm + exact congrFun ((Continuous.ae_eq_iff_eq volume hcont1 hcont2).1 hae) y + +/-- **The reproducing formula**: `∑_j η_j ⋆ k_j ⋆ f = f` in `L_p`, since +`m_{2^J} ⋆ m_{2^J} ⋆ f → f` (`m` is an approximate identity, `Rd.tendsto_convLp_dilate`, and the +operators `m_{2^J} ⋆` are uniformly bounded, `Rd.tendsto_apply_apply_of_tendsto`). -/ +theorem tendsto_sum_dual_localMean (hp : p ≠ ∞) {L : ℕ} (hL : 1 ≤ L) + (f : Lp ℂ p (volume : Measure V)) : + Tendsto (fun J => ∑ j ∈ Finset.range (J + 1), + convLp hp (b.integrable_dual L j) (b.localMean hp L j f)) atTop (𝓝 f) := by + simp_rw [b.sum_dual_localMean hp L] + have h : Tendsto (fun J => convLp hp (b.integrable_scaled L J) f) atTop (𝓝 f) := + tendsto_convLp_dilate hp (integrable_momentKernel b.integrable L) + (integral_momentKernel b.integrable b.integral_eq_one hL) (c := fun J : ℕ => (2 : ℝ) ^ J) + (fun J => pow_ne_zero J two_ne_zero) (tendsto_pow_atTop_atTop_of_one_lt one_lt_two) f + refine tendsto_apply_apply_of_tendsto (T := fun J => convLp hp (b.integrable_scaled L J)) + (C := (eLpNorm (momentKernel b.toFun L) 1 volume).toReal) (fun J g => ?_) h + have h1 := norm_convLp_le hp (b.integrable_scaled L J) g + rwa [b.eLpNorm_scaled_one] at h1 + +/-- The **local means quasi-norm** `‖(2^(js) ‖k_j ⋆ f‖_p)_j‖_{ℓ_q}`. -/ +noncomputable def localMeansNorm (hp : p ≠ ∞) (L : ℕ) (s : ℝ) (q : ℝ≥0∞) + (f : Lp ℂ p (volume : Measure V)) : ℝ≥0∞ := + lqNorm q (fun j => dyadicWeight s j * ‖b.localMean hp L j f‖ₑ) + +/-! ### Local means are bounded by the modulus -/ + +/-- `‖k_0 ⋆ f‖_p ≤ ‖m‖_1 ‖f‖_p`. -/ +theorem enorm_localMean_zero_le (hp : p ≠ ∞) (L : ℕ) (f : Lp ℂ p (volume : Measure V)) : + ‖b.localMean hp L 0 f‖ₑ ≤ eLpNorm (momentKernel b.toFun L) 1 volume * ‖f‖ₑ := + (enorm_convLp_le hp (b.integrable_kernel L 0) f).trans_eq + (congrArg (· * ‖f‖ₑ) (b.eLpNorm_scaled_one L 0)) + +/-- **Local means are bounded by the modulus**: +`‖k_{j+1} ⋆ f‖_p ≤ 2 ‖g‖_1 (1 + R)^L ω_L(f, 2^(-j))_p`, since +`k_{j+1} ⋆ f = (f - m_{2^j} ⋆ f) - (f - m_{2^(j+1)} ⋆ f)` and `f - m_c ⋆ f` averages differences +with steps of length at most `R/c`. -/ +theorem enorm_localMean_succ_le (hp : p ≠ ∞) (L j : ℕ) (f : Lp ℂ p (volume : Measure V)) : + ‖b.localMean hp L (j + 1) f‖ₑ ≤ + 2 * (∫⁻ z, ‖b.toFun z‖ₑ) * ENNReal.ofReal (1 + b.radius) ^ L * lpModulus p L f j := by + set A := ∫⁻ z, ‖b.toFun z‖ₑ + have hk : b.localMean hp L (j + 1) f = (f - convLp hp (b.integrable_scaled L j) f) - + (f - convLp hp (b.integrable_scaled L (j + 1)) f) := by + rw [show b.localMean hp L (j + 1) f = convLp hp (b.integrable_scaled L (j + 1)) f - + convLp hp (b.integrable_scaled L j) f from + convLp_sub_kernel hp (b.integrable_scaled L (j + 1)) (b.integrable_scaled L j) f] + abel + have hω : ∀ i, ‖f - convLp hp (b.integrable_scaled L i) f‖ₑ ≤ + A * modulus volume L p (f : V → ℂ) (b.radius / 2 ^ i) := fun i => + enorm_sub_convLp_momentKernel_le hp b.integrable b.integral_eq_one b.eq_zero L + (by positivity) f + have hmono : modulus volume L p (f : V → ℂ) (b.radius / 2 ^ (j + 1)) ≤ + modulus volume L p (f : V → ℂ) (b.radius / 2 ^ j) := + modulus_mono L p _ (div_le_div_of_nonneg_left b.radius_nonneg (by positivity) + (pow_le_pow_right₀ one_le_two (Nat.le_succ j))) + have hdil : modulus volume L p (f : V → ℂ) (b.radius / 2 ^ j) ≤ + ENNReal.ofReal (1 + b.radius) ^ L * lpModulus p L f j := by + rw [lpModulus, show b.radius / 2 ^ j = b.radius * (1 / 2 ^ j) by ring] + exact modulus_mul_le (Lp.aestronglyMeasurable f) Fact.out L b.radius_nonneg (by positivity) + calc ‖b.localMean hp L (j + 1) f‖ₑ + ≤ ‖f - convLp hp (b.integrable_scaled L j) f‖ₑ + + ‖f - convLp hp (b.integrable_scaled L (j + 1)) f‖ₑ := by + rw [hk] + exact eNorm_sub_le + _ ≤ A * modulus volume L p (f : V → ℂ) (b.radius / 2 ^ j) + + A * modulus volume L p (f : V → ℂ) (b.radius / 2 ^ j) := + add_le_add (hω j) ((hω (j + 1)).trans (by gcongr)) + _ ≤ A * (ENNReal.ofReal (1 + b.radius) ^ L * lpModulus p L f j) + + A * (ENNReal.ofReal (1 + b.radius) ^ L * lpModulus p L f j) := by gcongr + _ = 2 * A * ENNReal.ofReal (1 + b.radius) ^ L * lpModulus p L f j := by ring + +/-- The constant of the upper bound, `‖m‖_1 + 2^s · 2 ‖g‖_1 (1 + R)^L`. -/ +noncomputable def upperConst (L : ℕ) (s : ℝ) : ℝ≥0∞ := + eLpNorm (momentKernel b.toFun L) 1 volume + + 2 ^ s * (2 * (∫⁻ z, ‖b.toFun z‖ₑ) * ENNReal.ofReal (1 + b.radius) ^ L) + +/-- The constant of the upper bound is finite. -/ +theorem upperConst_ne_top (L : ℕ) (s : ℝ) : b.upperConst L s ≠ ∞ := + ENNReal.add_ne_top.2 + ⟨(eLpNorm_momentKernel_ne_top b.integrable L), + ENNReal.mul_ne_top (ENNReal.rpow_ne_top_of_nonneg' (by norm_num) (by simp)) + (ENNReal.mul_ne_top (ENNReal.mul_ne_top (by norm_num) b.integrable.2.ne) + (ENNReal.pow_ne_top ENNReal.ofReal_ne_top))⟩ + +/-- **The local means quasi-norm is bounded by the modulus**: +`‖(2^(js) ‖k_j ⋆ f‖_p)_j‖_{ℓ_q} ≤ C (‖f‖_p + ‖(2^(js) ω_L(f, 2^(-j))_p)_j‖_{ℓ_q})`. -/ +theorem localMeansNorm_le (hp : p ≠ ∞) (L : ℕ) (s : ℝ) {q : ℝ≥0∞} (hq : 1 ≤ q) + (f : Lp ℂ p (volume : Measure V)) : + b.localMeansNorm hp L s q f ≤ + b.upperConst L s * (‖f‖ₑ + lqNorm q (fun j => dyadicWeight s j * lpModulus p L f j)) := by + set C' := 2 * (∫⁻ z, ‖b.toFun z‖ₑ) * ENNReal.ofReal (1 + b.radius) ^ L + set M := eLpNorm (momentKernel b.toFun L) 1 volume + set Λ := lqNorm q (fun j => dyadicWeight s j * lpModulus p L f j) + have htail : lqNorm q (fun j => dyadicWeight s (j + 1) * ‖b.localMean hp L (j + 1) f‖ₑ) ≤ + 2 ^ s * C' * Λ := by + rw [← ENNReal.lqNorm_const_mul] + refine ENNReal.lqNorm_mono fun j => ?_ + rw [ENNReal.dyadicWeight_succ] + calc 2 ^ s * dyadicWeight s j * ‖b.localMean hp L (j + 1) f‖ₑ + ≤ 2 ^ s * dyadicWeight s j * (C' * lpModulus p L f j) := + mul_le_mul' le_rfl (b.enorm_localMean_succ_le hp L j f) + _ = 2 ^ s * C' * (dyadicWeight s j * lpModulus p L f j) := by ring + calc b.localMeansNorm hp L s q f + ≤ dyadicWeight s 0 * ‖b.localMean hp L 0 f‖ₑ + + lqNorm q (fun j => dyadicWeight s (j + 1) * ‖b.localMean hp L (j + 1) f‖ₑ) := + ENNReal.lqNorm_le_head_add_shift hq _ + _ ≤ M * ‖f‖ₑ + 2 ^ s * C' * Λ := by + rw [ENNReal.dyadicWeight_zero_right, one_mul] + exact add_le_add (b.enorm_localMean_zero_le hp L f) htail + _ ≤ b.upperConst L s * ‖f‖ₑ + b.upperConst L s * Λ := by + gcongr + · exact le_self_add + · exact le_add_self + _ = b.upperConst L s * (‖f‖ₑ + Λ) := by ring + +/-! ### The modulus is bounded by the local means -/ + +/-- **The moduli of the reproducing terms**: for `η_j ⋆ h`, +`ω_L(η_j ⋆ h, 2^(-i))_p ≤ C c_{ij} ‖h‖_p` with `c_{ij} = 2^(-(i-j)L)` for `j ≤ i` and `1` for +`j > i`. -/ +theorem lpModulus_dual_le (hp : p ≠ ∞) (L i j : ℕ) (h : Lp ℂ p (volume : Measure V)) : + lpModulus p L (convLp hp (b.integrable_dual L j) h) i ≤ + b.dualConst L * (if j ≤ i then dyadicWeight (-(L : ℝ)) (i - j) else 1) * ‖h‖ₑ := + lpModulus_convLp_le hp (b.integrable_dual L j) L i + (fun _ hv => b.eLpNorm_higherDiff_dual_le L hv) h + +/-- The constant of the synthesis estimate, +`2 ‖m‖_1 (1 - 2^(-s))⁻¹ + C_η ((1 - 2^(-(L-s)))⁻¹ + (1 - 2^(-s))⁻¹)`. -/ +noncomputable def synthConst (L : ℕ) (s : ℝ) : ℝ≥0∞ := + 2 * eLpNorm (momentKernel b.toFun L) 1 volume * (1 - (2 : ℝ≥0∞) ^ (-s))⁻¹ + + b.dualConst L * ((1 - (2 : ℝ≥0∞) ^ (-((L : ℝ) - s)))⁻¹ + (1 - (2 : ℝ≥0∞) ^ (-s))⁻¹) + +/-- The constant of the synthesis estimate is finite for `0 < s < L`. -/ +theorem synthConst_ne_top {L : ℕ} {s : ℝ} (hs : 0 < s) (hsL : s < L) : b.synthConst L s ≠ ∞ := + ENNReal.add_ne_top.2 ⟨ENNReal.mul_ne_top (ENNReal.mul_ne_top (by norm_num) + (eLpNorm_momentKernel_ne_top b.integrable L)) + (ENNReal.one_sub_two_rpow_neg_inv_ne_top hs), + ENNReal.mul_ne_top (b.dualConst_ne_top L) (ENNReal.add_ne_top.2 + ⟨ENNReal.one_sub_two_rpow_neg_inv_ne_top (by linarith), + ENNReal.one_sub_two_rpow_neg_inv_ne_top hs⟩)⟩ + +/-- **Synthesis with the dual kernels**: if `F = ∑_j η_j ⋆ h_j` in `L_p` (as the limit of the +partial sums), then for `0 < s < L`, +`‖F‖_p + ‖(2^(is) ω_L(F, 2^(-i))_p)_i‖_{ℓ_q} ≤ C ‖(2^(js) ‖h_j‖_p)_j‖_{ℓ_q}`, by the bound of a +convergent series by its weighted terms (`ENNReal.enorm_le_of_tendsto_sum`), the moduli of the +terms (`Rd.LocalMeansBump.lpModulus_dual_le`) and Hardy's inequalities. -/ +theorem modNorm_le_of_tendsto (hp : p ≠ ∞) (L : ℕ) (s : ℝ) {q : ℝ≥0∞} (hq : 1 ≤ q) + {F : Lp ℂ p (volume : Measure V)} {h : ℕ → Lp ℂ p (volume : Measure V)} + (hrep : Tendsto (fun J => ∑ j ∈ Finset.range (J + 1), + convLp hp (b.integrable_dual L j) (h j)) atTop (𝓝 F)) : + ‖F‖ₑ + lqNorm q (fun i => dyadicWeight s i * lpModulus p L F i) ≤ + b.synthConst L s * lqNorm q (fun j => dyadicWeight s j * ‖h j‖ₑ) := by + set a : ℕ → ℝ≥0∞ := fun j => ‖h j‖ₑ + set X := lqNorm q (fun j => dyadicWeight s j * a j) + set M := eLpNorm (momentKernel b.toFun L) 1 volume + -- the norm of `f` + have hnorm : ‖F‖ₑ ≤ 2 * M * (1 - (2 : ℝ≥0∞) ^ (-s))⁻¹ * X := + ENNReal.enorm_le_of_tendsto_sum hrep (K := 2 * M) (b := a) + (fun j => (enorm_convLp_le hp _ _).trans (mul_le_mul' (b.eLpNorm_dual_one_le L j) le_rfl)) + s hq + -- the moduli + have hmod : ∀ i, lpModulus p L F i ≤ b.dualConst L * + ∑' j, (if j ≤ i then dyadicWeight (-(L : ℝ)) (i - j) else 1) * a j := fun i => by + have h1 : lpModulus p L F i ≤ + ∑' j, lpModulus p L (convLp hp (b.integrable_dual L j) (h j)) i := + ENNReal.le_tsum_of_tendsto_sum (C := 2 ^ L) (by simp) (fun x y => lpModulus_add_le L x y i) + (fun x => lpModulus_le L x i) hrep + refine h1.trans ?_ + rw [← ENNReal.tsum_mul_left] + refine tsum_le_tsum fun j => ?_ + rw [← mul_assoc] + exact b.lpModulus_dual_le hp L i j _ + have hlq : lqNorm q (fun i => dyadicWeight s i * lpModulus p L F i) ≤ + b.dualConst L * ENNReal.almostDiagonalConst s L * X := + ENNReal.lqNorm_le_almostDiagonalConst_mul_of_le hq s L hmod + calc ‖F‖ₑ + lqNorm q (fun i => dyadicWeight s i * lpModulus p L F i) + ≤ 2 * M * (1 - (2 : ℝ≥0∞) ^ (-s))⁻¹ * X + + b.dualConst L * ENNReal.almostDiagonalConst s L * X := add_le_add hnorm hlq + _ = _ := by rw [synthConst, ENNReal.almostDiagonalConst]; ring + +/-- **The modulus is bounded by the local means**: for `0 < s < L`, +`‖f‖_p + ‖(2^(is) ω_L(f, 2^(-i))_p)_i‖_{ℓ_q} ≤ C ‖(2^(js) ‖k_j ⋆ f‖_p)_j‖_{ℓ_q}`, by the +reproducing formula and the synthesis estimate. -/ +theorem modNorm_le_localMeansNorm (hp : p ≠ ∞) {L : ℕ} (hL : 1 ≤ L) (s : ℝ) {q : ℝ≥0∞} + (hq : 1 ≤ q) (f : Lp ℂ p (volume : Measure V)) : + ‖f‖ₑ + lqNorm q (fun i => dyadicWeight s i * lpModulus p L f i) ≤ + b.synthConst L s * b.localMeansNorm hp L s q f := + b.modNorm_le_of_tendsto hp L s hq (b.tendsto_sum_dual_localMean hp hL f) + +/-! ### Local means and Besov spaces -/ + +/-- **Local means and differences**: for `1 ≤ p < ∞`, `0 < s < L` and `1 ≤ q ≤ ∞`, +`‖f‖_p + ‖(2^(ks) ω_L(f, 2^(-k))_p)_k‖_{ℓ_q} < ∞` iff `‖(2^(js) ‖k_j ⋆ f‖_p)_j‖_{ℓ_q} < ∞`. -/ +theorem besov_iff_localMeans (hp : p ≠ ∞) {L : ℕ} (hL : 1 ≤ L) {s : ℝ} (hs : 0 < s) + (hsL : s < L) {q : ℝ≥0∞} (hq : 1 ≤ q) (f : Lp ℂ p (volume : Measure V)) : + ‖f‖ₑ + lqNorm q (fun k => dyadicWeight s k * lpModulus p L f k) < ∞ ↔ + b.localMeansNorm hp L s q f < ∞ := by + constructor + · intro h + exact (b.localMeansNorm_le hp L s hq f).trans_lt + (ENNReal.mul_lt_top (b.upperConst_ne_top L s).lt_top h) + · intro h + exact (b.modNorm_le_localMeansNorm hp hL s hq f).trans_lt + (ENNReal.mul_lt_top (b.synthConst_ne_top hs hsL).lt_top h) + +/-- **Local means and band-limited approximation**: for `1 ≤ p < ∞`, `0 < s < L` and +`1 ≤ q ≤ ∞`, `f ∈ A^s_q(L_p, (E_k))` iff `‖(2^(js) ‖k_j ⋆ f‖_p)_j‖_{ℓ_q} < ∞`. -/ +theorem memApprox_bandScheme_iff_localMeans (hp : p ≠ ∞) {L : ℕ} (hL : 1 ≤ L) {s : ℝ} + (hs : 0 < s) (hsL : s < L) {q : ℝ≥0∞} (hq : 1 ≤ q) (f : Lp ℂ p (volume : Measure V)) : + (bandScheme hp).MemApprox s q f ↔ b.localMeansNorm hp L s q f < ∞ := by + rw [memApprox_bandScheme_iff_modulus hp hs.le hsL hq f, b.besov_iff_localMeans hp hL hs hsL hq f] + +end LocalMeansBump + +/-! ### Bumps from smooth bump functions -/ + +/-- **The mollifier of a bump function**: the normalised smooth bump `f` around `c` (Mathlib's +`ContDiffBump.normed`), with complex values; it is smooth with compact support in the closed ball +`B̄(c, r_out)` and has integral `1`. -/ +noncomputable def bumpMollifier {c : V} (f : ContDiffBump c) : V → ℂ := + fun z => ((f.normed volume z : ℝ) : ℂ) + +/-- The mollifier of a bump function is smooth. -/ +theorem contDiff_bumpMollifier {c : V} (f : ContDiffBump c) : + ContDiff ℝ ((⊤ : ℕ∞) : WithTop ℕ∞) (bumpMollifier f) := + Complex.ofRealCLM.contDiff.comp (f.contDiff_normed (n := ⊤)) + +/-- The mollifier of a bump function has its closed support in `B̄(c, r_out)`. -/ +theorem tsupport_bumpMollifier_subset {c : V} (f : ContDiffBump c) : + tsupport (bumpMollifier f) ⊆ Metric.closedBall c f.rOut := + (tsupport_comp_subset Complex.ofReal_zero _).trans (f.tsupport_normed_eq (μ := volume)).subset + +/-- The mollifier of a bump function has compact support, since the normalised bump has +(Mathlib's `ContDiffBump.hasCompactSupport_normed`). -/ +theorem hasCompactSupport_bumpMollifier {c : V} (f : ContDiffBump c) : + HasCompactSupport (bumpMollifier f) := + (f.hasCompactSupport_normed (μ := volume)).comp_left Complex.ofReal_zero + +/-- The mollifier of a bump function has integral `1` (Mathlib's `ContDiffBump.integral_normed`). -/ +theorem integral_bumpMollifier {c : V} (f : ContDiffBump c) : ∫ z, bumpMollifier f z = 1 := by + change ∫ z, ((f.normed volume z : ℝ) : ℂ) = 1 + rw [integral_complex_ofReal, f.integral_normed, Complex.ofReal_one] + +/-- **The bump for local means of a smooth bump function**: the mollifier of a smooth bump `f` +around `c` with outer radius `r_out` vanishes outside `B̄(c, r_out)`, hence outside the ball of +every radius `R ≥ ‖c‖ + r_out` around `0`, since `‖z‖ ≤ ‖z - c‖ + ‖c‖`. -/ +noncomputable def LocalMeansBump.ofContDiffBump {c : V} (f : ContDiffBump c) {R : ℝ} + (hR : ‖c‖ + f.rOut ≤ R) : LocalMeansBump V where + toFun := bumpMollifier f + radius := R + radius_nonneg := (add_nonneg (norm_nonneg c) f.rOut_pos.le).trans hR + contDiff := contDiff_bumpMollifier f + eq_zero z hz := image_eq_zero_of_notMem_tsupport fun h => by + have := mem_closedBall_iff_norm.1 (tsupport_bumpMollifier_subset f h) + linarith [norm_sub_norm_le z c] + integral_eq_one := integral_bumpMollifier f + +/-! ### The centred bump -/ + +section Centered + +variable {V : Type*} [NormedAddCommGroup V] [InnerProductSpace ℝ V] [FiniteDimensional ℝ V] + [MeasurableSpace V] [BorelSpace V] + +/-- The smooth bump around `0` with outer radius `R`. -/ +noncomputable def centeredBumpBase {R : ℝ} (hR : 0 < R) : ContDiffBump (0 : V) := + ⟨R / 2, R, by positivity, by linarith⟩ + +/-- The **centred bump** of radius `R > 0`: the normalised smooth bump function around `0`. -/ +noncomputable def LocalMeansBump.centered {R : ℝ} (hR : 0 < R) : LocalMeansBump V := + ofContDiffBump (centeredBumpBase hR) (R := R) (by simp [centeredBumpBase]) + +/-- The centred bump has radius `R`. -/ +theorem LocalMeansBump.centered_radius {R : ℝ} (hR : 0 < R) : + (LocalMeansBump.centered (V := V) hR).radius = R := rfl + +end Centered + +end Rd diff --git a/LeanPool/FunctionSpaces/Rd/MixedSmoothness/HyperbolicCross.lean b/LeanPool/FunctionSpaces/Rd/MixedSmoothness/HyperbolicCross.lean new file mode 100644 index 0000000000..2d3d7d97b9 --- /dev/null +++ b/LeanPool/FunctionSpaces/Rd/MixedSmoothness/HyperbolicCross.lean @@ -0,0 +1,332 @@ +/- +Copyright (c) 2026 Mario Ullrich. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Mario Ullrich +-/ +module + +public import LeanPool.FunctionSpaces.Rd.MixedSmoothness.MixedLittlewoodPaley +public import LeanPool.FunctionSpaces.Rd.Atoms.AtomSynthesis +public import Mathlib.Analysis.SpecificLimits.Normed + +/- +Modified for Lean Pool: module names and imports adapted. +-/ + +/-! +# Approximation on hyperbolic crosses + +The **level** of `k ∈ ℕ^d` is `|k|_1 = ∑_i k_i` (`Rd.level`), and the **hyperbolic cross** of level +`N` is `{k : |k|_1 ≤ N}` (`Rd.hyperbolicCross`). The partial sum +`S_N f = ∑_{|k|_1 ≤ N} δ_k ⋆ f` of the tensor Littlewood–Paley decomposition +(`Rd.hyperbolicSum`) is band-limited to the union of the dyadic rectangles of these blocks. + +* **The tail** (`Rd.enorm_sub_hyperbolicSum_le`): `‖f - S_N f‖_p ≤ ∑_{|k|_1 > N} ‖δ_k ⋆ f‖_p`, by + the tensor Littlewood–Paley decomposition. +* **Counting** (`Rd.card_levelSet_le`): `#{k ∈ ℕ^d : |k|_1 = n} ≤ (n + 1)^(d-1)`, since an index of + level `n` is determined by its first `d - 1` coordinates. +* **The rate** (`Rd.enorm_sub_hyperbolicSum_le_mixedLPNorm`): for real `s` and `1 ≤ q ≤ ∞`, + `‖f - S_N f‖_p ≤ C 2^(-sN) (N + 1)^((d-1)(1-1/q)) ‖(2^(s|k|_1) ‖δ_k ⋆ f‖_p)_k‖_{ℓ_q}` with + `C = ∑_l 2^(-sl) (l + 1)^((d-1)(1-1/q))` (`Rd.hyperbolicCrossConst`): on each level Hölder's + inequality costs `#{|k|_1 = n}^(1-1/q) ≤ (n + 1)^((d-1)(1-1/q))`, and + `∑_{n > N} 2^(-sn) (n + 1)^a ≤ C 2^(-sN) (N + 1)^a`. For `s > 0` the constant is finite + (`Rd.hyperbolicCrossConst_ne_top`, `Rd.enorm_sub_hyperbolicSum_le_of_pos`). +-/ + +@[expose] public section + +open MeasureTheory Filter Topology +open scoped ENNReal + +open ENNReal (dyadicWeight lqNorm) + +namespace Rd + +variable {d : ℕ} + +/-! ### Levels -/ + +/-- The **level** `|k|_1 = ∑_i k_i` of `k ∈ ℕ^d`. -/ +def level (k : Fin d → ℕ) : ℕ := ∑ i, k i + +/-- A coordinate is at most the level. -/ +theorem le_level (k : Fin d → ℕ) (i : Fin d) : k i ≤ level k := + Finset.single_le_sum (fun j _ => Nat.zero_le (k j)) (Finset.mem_univ i) + +/-- The indices of level `n`, `{k ∈ ℕ^d : |k|_1 = n}`: Mathlib's +`Finset.Nat.antidiagonalTuple d n`. -/ +def levelSet (n : ℕ) : Finset (Fin d → ℕ) := Finset.Nat.antidiagonalTuple d n + +/-- `k` lies in the level set of `n` iff `|k|_1 = n`. -/ +theorem mem_levelSet {n : ℕ} {k : Fin d → ℕ} : k ∈ levelSet n ↔ level k = n := + Finset.Nat.mem_antidiagonalTuple + +/-- **Counting**: `#{k ∈ ℕ^d : |k|_1 = n} ≤ (n + 1)^(d-1)`, since an index of level `n` is +determined by its first `d - 1` coordinates. -/ +theorem card_levelSet_le (n : ℕ) : (levelSet (d := d) n).card ≤ (n + 1) ^ (d - 1) := by + cases d with + | zero => + calc (levelSet (d := 0) n).card + ≤ (Fintype.piFinset fun _ : Fin 0 => Finset.range (n + 1)).card := + Finset.card_le_card fun k _ => Fintype.mem_piFinset.2 fun i => i.elim0 + _ = (n + 1) ^ (0 - 1) := by simp + | succ e => + refine (Finset.card_le_card_of_injOn (fun k : Fin (e + 1) → ℕ => fun i : Fin e => k i.castSucc) + (t := Fintype.piFinset fun _ : Fin e => Finset.range (n + 1)) (fun k hk => ?_) + (fun k hk k' hk' hkk' => ?_)).trans ?_ + · have hk' := mem_levelSet.1 hk + simp only [Finset.mem_coe, Fintype.mem_piFinset, Finset.mem_range] + exact fun i => Nat.lt_succ_of_le (hk' ▸ le_level k _) + · have h1 := mem_levelSet.1 hk + have h2 := mem_levelSet.1 hk' + have hcast : ∀ i : Fin e, k i.castSucc = k' i.castSucc := fun i => congr_fun hkk' i + simp only [level, Fin.sum_univ_castSucc] at h1 h2 + have hsum : ∑ i : Fin e, k i.castSucc = ∑ i : Fin e, k' i.castSucc := + Finset.sum_congr rfl fun i _ => hcast i + funext i + cases i using Fin.lastCases with + | last => omega + | cast i => exact hcast i + · simp [Fintype.card_piFinset] + +/-- `2^(s|k|_1) = ∏_i 2^(s k_i)`. -/ +theorem mixedWeight_eq_dyadicWeight_level (s : ℝ) (k : Fin d → ℕ) : + mixedWeight s k = dyadicWeight s (level k) := by + rw [mixedWeight, level] + induction (Finset.univ : Finset (Fin d)) using Finset.induction_on with + | empty => simp [ENNReal.dyadicWeight_zero_right] + | insert i t hi ih => + rw [Finset.prod_insert hi, Finset.sum_insert hi, ih, ENNReal.dyadicWeight_add_nat] + +/-- **Regrouping by levels**: `∑_k F_k ≤ ∑_n ∑_{|k|_1 = n} F_k`. -/ +theorem tsum_le_tsum_levelSet (F : (Fin d → ℕ) → ℝ≥0∞) : + ∑' k, F k ≤ ∑' n, ∑ k ∈ levelSet n, F k := by + rw [tsum_eq_iSup_sum] + refine iSup_le fun T => ?_ + calc ∑ k ∈ T, F k = ∑ n ∈ T.image level, ∑ k ∈ T.filter (fun k => level k = n), F k := + (Finset.sum_fiberwise_of_maps_to (fun k hk => Finset.mem_image_of_mem level hk) F).symm + _ ≤ ∑ n ∈ T.image level, ∑ k ∈ levelSet n, F k := + Finset.sum_le_sum fun n _ => Finset.sum_le_sum_of_subset fun k hk => + mem_levelSet.2 (Finset.mem_filter.1 hk).2 + _ ≤ ∑' n, ∑ k ∈ levelSet n, F k := sum_le_tsum _ + +/-- **Hölder's inequality on a finite set**: `∑_{k ∈ S} x_k ≤ #S^(1-1/q) ‖x‖_{ℓ_q}` for +`1 ≤ q ≤ ∞`. -/ +theorem sum_le_card_rpow_mul_lqNorm {q : ℝ≥0∞} (hq : 1 ≤ q) (S : Finset (Fin d → ℕ)) + (x : (Fin d → ℕ) → ℝ≥0∞) : + ∑ k ∈ S, x k ≤ (S.card : ℝ≥0∞) ^ (1 - 1 / q.toReal) * lqNorm q x := by + rcases eq_or_ne q ∞ with rfl | hq' + · simp only [ENNReal.toReal_top, div_zero, sub_zero, ENNReal.rpow_one, ENNReal.lqNorm_top] + calc ∑ k ∈ S, x k ≤ ∑ _k ∈ S, ⨆ k', x k' := Finset.sum_le_sum fun k _ => le_iSup x k + _ = (S.card : ℝ≥0∞) * ⨆ k', x k' := by rw [Finset.sum_const, nsmul_eq_mul] + have hq0 : q ≠ 0 := (zero_lt_one.trans_le hq).ne' + set r := q.toReal + have hr : 1 ≤ r := ENNReal.one_le_toReal_of_one_le hq hq' + have hr0 : 0 < r := by linarith + have hpow : (∑ k ∈ S, x k) ^ r ≤ (S.card : ℝ≥0∞) ^ (r - 1) * lqNorm q x ^ r := by + refine (ENNReal.rpow_sum_le_const_mul_sum_rpow (s := S) (f := x) hr).trans + (mul_le_mul' le_rfl ?_) + rw [ENNReal.lqNorm_rpow hq0 hq'] + exact sum_le_tsum _ + calc ∑ k ∈ S, x k = ((∑ k ∈ S, x k) ^ r) ^ (1 / r) := by + rw [← ENNReal.rpow_mul, mul_one_div_cancel hr0.ne', ENNReal.rpow_one] + _ ≤ ((S.card : ℝ≥0∞) ^ (r - 1) * lqNorm q x ^ r) ^ (1 / r) := + ENNReal.rpow_le_rpow hpow (by positivity) + _ = (S.card : ℝ≥0∞) ^ (1 - 1 / r) * lqNorm q x := by + rw [ENNReal.mul_rpow_of_nonneg _ _ (by positivity), ← ENNReal.rpow_mul, + ← ENNReal.rpow_mul, mul_one_div_cancel hr0.ne', ENNReal.rpow_one] + congr 2 + field_simp + +/-! ### The series of the rate -/ + +/-- **A polynomial times a geometric series converges**: +`∑_l 2^(-sl) (l + 1)^a < ∞` for `s > 0` and `a ≥ 0` (Mathlib's +`summable_pow_mul_geometric_of_norm_lt_one`). -/ +theorem tsum_dyadicWeight_mul_rpow_ne_top {s : ℝ} (hs : 0 < s) {a : ℝ} (ha : 0 ≤ a) : + ∑' l : ℕ, dyadicWeight (-s) l * ((l + 1 : ℕ) : ℝ≥0∞) ^ a ≠ ∞ := by + set K := ⌈a⌉₊ + set r : ℝ := (2 : ℝ) ^ (-s) + have hr0 : 0 < r := by positivity + have hr1 : r < 1 := Real.rpow_lt_one_of_one_lt_of_neg one_lt_two (by linarith) + have hsum : Summable fun l : ℕ => r ^ l * (((l + 1 : ℕ) : ℝ) ^ K) := by + have h := (summable_nat_add_iff 1).2 (summable_pow_mul_geometric_of_norm_lt_one K + (r := r) (by rw [Real.norm_eq_abs, abs_of_pos hr0]; exact hr1)) + refine (h.mul_left r⁻¹).congr fun l => ?_ + simp only [pow_succ] + field_simp + have hterm : ∀ l : ℕ, dyadicWeight (-s) l * ((l + 1 : ℕ) : ℝ≥0∞) ^ a ≤ + ENNReal.ofReal (r ^ l * (((l + 1 : ℕ) : ℝ) ^ K)) := fun l => by + have h1 : dyadicWeight (-s) l = ENNReal.ofReal (r ^ l) := by + rw [ENNReal.dyadicWeight_eq_pow, ENNReal.ofReal_pow hr0.le] + congr 1 + rw [show r = (2 : ℝ) ^ (-s) from rfl, ← ENNReal.ofReal_rpow_of_pos two_pos, + ENNReal.ofReal_ofNat] + have h2 : ((l + 1 : ℕ) : ℝ≥0∞) ^ a ≤ ENNReal.ofReal (((l + 1 : ℕ) : ℝ) ^ K) := by + rw [← ENNReal.ofReal_natCast, ENNReal.ofReal_rpow_of_nonneg (Nat.cast_nonneg _) ha] + refine ENNReal.ofReal_le_ofReal ?_ + rw [← Real.rpow_natCast] + exact Real.rpow_le_rpow_of_exponent_le (by exact_mod_cast Nat.succ_pos l) (Nat.le_ceil a) + rw [h1, ENNReal.ofReal_mul (by positivity)] + exact mul_le_mul' le_rfl h2 + refine ne_top_of_le_ne_top ?_ (tsum_le_tsum hterm) + rw [← ENNReal.ofReal_tsum_of_nonneg (fun l => by positivity) hsum] + exact ENNReal.ofReal_ne_top + +/-- **The tail of the rate series**: `∑_{n > N} 2^(-sn) (n + 1)^a ≤ C 2^(-sN) (N + 1)^a` with +`C = ∑_l 2^(-sl) (l + 1)^a`, from `n + 1 ≤ (n - N + 1)(N + 1)`. -/ +theorem tsum_tail_le (s : ℝ) {a : ℝ} (ha : 0 ≤ a) (N : ℕ) : + ∑' n : ℕ, (if N < n then dyadicWeight (-s) n * ((n + 1 : ℕ) : ℝ≥0∞) ^ a else 0) ≤ + (∑' l : ℕ, dyadicWeight (-s) l * ((l + 1 : ℕ) : ℝ≥0∞) ^ a) * + (dyadicWeight (-s) N * ((N + 1 : ℕ) : ℝ≥0∞) ^ a) := by + rw [← CompleteLattice.summable.sum_add_tsum_nat_add' (k := N)] + have hzero : ∑ i ∈ Finset.range N, + (if N < i then dyadicWeight (-s) i * ((i + 1 : ℕ) : ℝ≥0∞) ^ a else 0) = 0 := + Finset.sum_eq_zero fun i hi => by + have : ¬ N < i := by + have := Finset.mem_range.1 hi + omega + simp [this] + rw [hzero, zero_add, ← ENNReal.tsum_mul_right] + refine tsum_le_tsum fun l => ?_ + split_ifs with h + · rw [ENNReal.dyadicWeight_add_nat] + calc dyadicWeight (-s) l * dyadicWeight (-s) N * ((l + N + 1 : ℕ) : ℝ≥0∞) ^ a + ≤ dyadicWeight (-s) l * dyadicWeight (-s) N * + (((l + 1 : ℕ) : ℝ≥0∞) ^ a * ((N + 1 : ℕ) : ℝ≥0∞) ^ a) := by + refine mul_le_mul' le_rfl ?_ + rw [← ENNReal.mul_rpow_of_nonneg _ _ ha] + refine ENNReal.rpow_le_rpow ?_ ha + rw [← Nat.cast_mul] + exact_mod_cast (by nlinarith : l + N + 1 ≤ (l + 1) * (N + 1)) + _ = dyadicWeight (-s) l * ((l + 1 : ℕ) : ℝ≥0∞) ^ a * + (dyadicWeight (-s) N * ((N + 1 : ℕ) : ℝ≥0∞) ^ a) := by ring + · exact zero_le + +/-! ### Hyperbolic cross partial sums -/ + +/-- The **hyperbolic cross** `{k ∈ ℕ^d : |k|_1 ≤ N}`. -/ +def hyperbolicCross (N : ℕ) : Finset (Fin d → ℕ) := + (Fintype.piFinset fun _ => Finset.range (N + 1)).filter fun k => level k ≤ N + +/-- `k` lies in the hyperbolic cross of level `N` iff `|k|_1 ≤ N`. -/ +theorem mem_hyperbolicCross {N : ℕ} {k : Fin d → ℕ} : k ∈ hyperbolicCross N ↔ level k ≤ N := by + simp only [hyperbolicCross, Finset.mem_filter, Fintype.mem_piFinset, Finset.mem_range] + constructor + · exact fun h => h.2 + · intro h + exact ⟨fun i => Nat.lt_succ_of_le ((le_level k i).trans h), h⟩ + +variable {p : ℝ≥0∞} [Fact (1 ≤ p)] + +/-- The **hyperbolic cross partial sum** `S_N f = ∑_{|k|_1 ≤ N} δ_k ⋆ f`, band-limited to the union +of the dyadic rectangles of the blocks with `|k|_1 ≤ N`. -/ +noncomputable def hyperbolicSum (hp : p ≠ ∞) (N : ℕ) + (f : Lp ℂ p (volume : Measure (Fin d → ℝ))) : Lp ℂ p (volume : Measure (Fin d → ℝ)) := + ∑ k ∈ hyperbolicCross N, mixedBlock hp k f + +/-- **The tail of the hyperbolic cross**: `‖f - S_N f‖_p ≤ ∑_{|k|_1 > N} ‖δ_k ⋆ f‖_p`, by the tensor +Littlewood–Paley decomposition. -/ +theorem enorm_sub_hyperbolicSum_le (hp : p ≠ ∞) (N : ℕ) + (f : Lp ℂ p (volume : Measure (Fin d → ℝ))) : + ‖f - hyperbolicSum hp N f‖ₑ ≤ + ∑' k, if level k ≤ N then 0 else ‖mixedBlock hp k f‖ₑ := by + set u : (Fin d → ℕ) → Lp ℂ p (volume : Measure (Fin d → ℝ)) := fun k => + if level k ≤ N then 0 else mixedBlock hp k f + have hrep : Tendsto (fun J => ∑ k ∈ Fintype.piFinset (fun _ : Fin d => Finset.range (J + 1)), + u k) atTop (𝓝 (f - hyperbolicSum hp N f)) := by + refine ((tendsto_sum_mixedBlock hp f).sub_const (hyperbolicSum hp N f)).congr' ?_ + filter_upwards [eventually_ge_atTop N] with J hJ + have hcross : (Fintype.piFinset fun _ : Fin d => Finset.range (J + 1)).filter + (fun k => level k ≤ N) = hyperbolicCross N := by + ext k + simp only [Finset.mem_filter, Fintype.mem_piFinset, Finset.mem_range, mem_hyperbolicCross] + constructor + · exact fun h => h.2 + · intro h + exact ⟨fun i => Nat.lt_succ_of_le (((le_level k i).trans h).trans hJ), h⟩ + simp only [u, hyperbolicSum] + rw [Finset.sum_ite, Finset.sum_const_zero, zero_add, ← hcross, eq_comm, eq_sub_iff_add_eq, + add_comm, Finset.sum_filter_add_sum_filter_not] + refine (ENNReal.le_tsum_of_tendsto_finsetSum (Q := fun x : Lp ℂ p (volume : Measure (Fin d → + ℝ)) => + ‖x‖ₑ) (C := 1) ENNReal.one_ne_top (fun x y => eNorm_add_le x y) (fun x => (one_mul _).ge) + hrep).trans (le_of_eq ?_) + refine tsum_congr fun k => ?_ + by_cases h : level k ≤ N <;> simp [u, h] + +/-- The **constant of hyperbolic cross approximation**, +`C(d, s, q) = ∑_l 2^(-sl) (l + 1)^((d-1)(1-1/q)) ∈ [0, ∞]`. -/ +noncomputable def hyperbolicCrossConst (d : ℕ) (s : ℝ) (q : ℝ≥0∞) : ℝ≥0∞ := + ∑' l : ℕ, dyadicWeight (-s) l * ((l + 1 : ℕ) : ℝ≥0∞) ^ (((d - 1 : ℕ) : ℝ) * (1 - 1 / q.toReal)) + +/-- The constant of hyperbolic cross approximation is finite for `s > 0` and `1 ≤ q ≤ ∞` +(`Rd.tsum_dyadicWeight_mul_rpow_ne_top` with `a = (d-1)(1-1/q) ≥ 0`). -/ +theorem hyperbolicCrossConst_ne_top {s : ℝ} (hs : 0 < s) {q : ℝ≥0∞} (hq : 1 ≤ q) : + hyperbolicCrossConst d s q ≠ ∞ := + tsum_dyadicWeight_mul_rpow_ne_top hs + (mul_nonneg (Nat.cast_nonneg _) (one_sub_one_div_toReal_nonneg hq)) + +/-- **Hyperbolic cross approximation**: for `1 ≤ p < ∞`, `f ∈ L_p(ℝ^d)`, real `s`, `1 ≤ q ≤ ∞` +and `N ∈ ℕ`, +`‖f - S_N f‖_p ≤ C 2^(-sN) (N + 1)^((d-1)(1-1/q)) ‖(2^(s|k|_1) ‖δ_k ⋆ f‖_p)_k‖_{ℓ_q}` with +`C = Rd.hyperbolicCrossConst d s q ∈ [0, ∞]`. The constant is finite for `s > 0` and `∞` for +`s ≤ 0`; `Rd.enorm_sub_hyperbolicSum_le_of_pos` states the bound for `s > 0` with `C` as a real +number. -/ +theorem enorm_sub_hyperbolicSum_le_mixedLPNorm (hp : p ≠ ∞) (s : ℝ) {q : ℝ≥0∞} (hq : 1 ≤ q) + (N : ℕ) (f : Lp ℂ p (volume : Measure (Fin d → ℝ))) : + ‖f - hyperbolicSum hp N f‖ₑ ≤ hyperbolicCrossConst d s q * + (dyadicWeight (-s) N * ((N + 1 : ℕ) : ℝ≥0∞) ^ (((d - 1 : ℕ) : ℝ) * (1 - 1 / q.toReal))) * + mixedLPNorm hp s q f := by + unfold hyperbolicCrossConst + set a := ((d - 1 : ℕ) : ℝ) * (1 - 1 / q.toReal) + have hq1 := one_sub_one_div_toReal_nonneg hq + have ha : 0 ≤ a := mul_nonneg (Nat.cast_nonneg _) hq1 + set X := mixedLPNorm hp s q f + -- each level costs `2^(-sn) (n + 1)^a X` + have hlevel : ∀ n, ∑ k ∈ levelSet n, ‖mixedBlock hp k f‖ₑ ≤ + dyadicWeight (-s) n * ((n + 1 : ℕ) : ℝ≥0∞) ^ a * X := fun n => by + have hw : ∀ k ∈ levelSet n, ‖mixedBlock hp k f‖ₑ = + dyadicWeight (-s) n * (mixedWeight s k * ‖mixedBlock hp k f‖ₑ) := fun k hk => by + rw [mixedWeight_eq_dyadicWeight_level, mem_levelSet.1 hk, ← mul_assoc, + ENNReal.dyadicWeight_neg_mul_self, one_mul] + rw [Finset.sum_congr rfl hw, ← Finset.mul_sum, mul_assoc] + refine mul_le_mul' le_rfl ((sum_le_card_rpow_mul_lqNorm hq (levelSet n) + fun k => mixedWeight s k * ‖mixedBlock hp k f‖ₑ).trans (mul_le_mul' ?_ le_rfl)) + calc ((levelSet (d := d) n).card : ℝ≥0∞) ^ (1 - 1 / q.toReal) + ≤ (((n + 1) ^ (d - 1) : ℕ) : ℝ≥0∞) ^ (1 - 1 / q.toReal) := + ENNReal.rpow_le_rpow (by exact_mod_cast card_levelSet_le n) hq1 + _ = ((n + 1 : ℕ) : ℝ≥0∞) ^ a := by + rw [Nat.cast_pow, ← ENNReal.rpow_natCast, ← ENNReal.rpow_mul] + calc ‖f - hyperbolicSum hp N f‖ₑ + ≤ ∑' k, (if level k ≤ N then 0 else ‖mixedBlock hp k f‖ₑ) := + enorm_sub_hyperbolicSum_le hp N f + _ ≤ ∑' n, ∑ k ∈ levelSet n, (if level k ≤ N then 0 else ‖mixedBlock hp k f‖ₑ) := + tsum_le_tsum_levelSet _ + _ ≤ ∑' n : ℕ, (if N < n then dyadicWeight (-s) n * ((n + 1 : ℕ) : ℝ≥0∞) ^ a else 0) * X := by + refine tsum_le_tsum fun n => ?_ + have hk : ∀ k ∈ levelSet n, (if level k ≤ N then 0 else ‖mixedBlock hp k f‖ₑ) = + if N < n then ‖mixedBlock hp k f‖ₑ else 0 := fun k hk => by + rw [mem_levelSet.1 hk] + split_ifs <;> first | rfl | omega + rw [Finset.sum_congr rfl hk] + split_ifs with h + · exact hlevel n + · simp + _ = (∑' n : ℕ, (if N < n then dyadicWeight (-s) n * ((n + 1 : ℕ) : ℝ≥0∞) ^ a else 0)) * X := + ENNReal.tsum_mul_right + _ ≤ _ := mul_le_mul' (tsum_tail_le s ha N) le_rfl + +/-- **Hyperbolic cross approximation for `s > 0`**: for `1 ≤ p < ∞`, `f ∈ L_p(ℝ^d)`, `s > 0`, +`1 ≤ q ≤ ∞` and `N ∈ ℕ`, with the real constant `C = C(d, s, q) < ∞`, +`‖f - S_N f‖_p ≤ C 2^(-sN) (N + 1)^((d-1)(1-1/q)) ‖(2^(s|k|_1) ‖δ_k ⋆ f‖_p)_k‖_{ℓ_q}` +(`Rd.enorm_sub_hyperbolicSum_le_mixedLPNorm`, `Rd.hyperbolicCrossConst_ne_top`). -/ +theorem enorm_sub_hyperbolicSum_le_of_pos (hp : p ≠ ∞) {s : ℝ} (hs : 0 < s) {q : ℝ≥0∞} + (hq : 1 ≤ q) (N : ℕ) (f : Lp ℂ p (volume : Measure (Fin d → ℝ))) : + ‖f - hyperbolicSum hp N f‖ₑ ≤ ((hyperbolicCrossConst d s q).toNNReal : ℝ≥0∞) * + (dyadicWeight (-s) N * ((N + 1 : ℕ) : ℝ≥0∞) ^ (((d - 1 : ℕ) : ℝ) * (1 - 1 / q.toReal))) * + mixedLPNorm hp s q f := by + rw [ENNReal.coe_toNNReal (hyperbolicCrossConst_ne_top hs hq)] + exact enorm_sub_hyperbolicSum_le_mixedLPNorm hp s hq N f + +end Rd diff --git a/LeanPool/FunctionSpaces/Rd/MixedSmoothness/MixedAveragedDifferences.lean b/LeanPool/FunctionSpaces/Rd/MixedSmoothness/MixedAveragedDifferences.lean new file mode 100644 index 0000000000..92ecb5c002 --- /dev/null +++ b/LeanPool/FunctionSpaces/Rd/MixedSmoothness/MixedAveragedDifferences.lean @@ -0,0 +1,312 @@ +/- +Copyright (c) 2026 Mario Ullrich. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Mario Ullrich +-/ +module + +public import LeanPool.FunctionSpaces.Rd.MixedSmoothness.MixedDifferences +public import LeanPool.FunctionSpaces.Rd.Differences.MomentKernels + +/- +Modified for Lean Pool: module names and imports adapted. +-/ + +/-! +# Averaged mixed differences + +Convolutions with tensor products of dilated bumps average translates of `f`: for one-dimensional +kernels `κ_i = ∑_t q_i(t) g_{c_i/ν(t)}` with integers `ν(t) ≥ 1` and the steps +`Y_i = δ_{-z_i e_i / c_i}` of the algebra of translations, + +`((⊗κ) ⋆ f)(x) = ∫ (⊗g)(z) (∏_i ∑_t q_i(t) Y_i^{ν(t)}) f(x) dz` + +for almost every `x` (`Rd.conv_tensorKernel_sum_dilate_ae`): the product expands into translates +`f(x - (ν(n_i) z_i / c_i)_i)` (`Rd.diffAct_prod_sum_pow_apply`), and each of them integrates to a +convolution with an anisotropically dilated tensor product +(`Rd.integral_tensorKernel_mul_comp_eq_conv`). + +The moment kernels of `FunctionSpaces.Rd.Differences.MomentKernels` are of this form with the +polynomial `P(Y) = ∑_{l=1}^L (-1)^(l+1) C(L, l) Y^l = 1 - (-1)^L (Y - 1)^L` +(`Rd.sum_jacksonCoeff_smul_pow`), so polynomials in the translations factor through differences. +Their action on `L_p` is bounded through a small calculus (`Rd.ActsBounded`): translations act with +norm `1`, and sums, products and powers add and multiply the bounds. +-/ + +@[expose] public section + +open MeasureTheory Filter +open TranslationAlgebra (diffAct diffAct_single) +open scoped ENNReal + +namespace Rd + +variable {d : ℕ} + +/-! ### Bounded action of the algebra of translations -/ + +/-- An element `a` of the algebra of translations **acts boundedly on `L_p`** with constant `C`: +`a` keeps a.e. strong measurability and `‖a G‖_p ≤ C ‖G‖_p`. -/ +def ActsBounded (p : ℝ≥0∞) (a : AddMonoidAlgebra ℂ (Fin d → ℝ)) (C : ℝ≥0∞) : Prop := + ∀ G : (Fin d → ℝ) → ℂ, AEStronglyMeasurable G volume → + AEStronglyMeasurable (diffAct a G) volume ∧ + eLpNorm (diffAct a G) p volume ≤ C * eLpNorm G p volume + +namespace ActsBounded + +variable {p : ℝ≥0∞} {a b : AddMonoidAlgebra ℂ (Fin d → ℝ)} {C D : ℝ≥0∞} + +/-- The unit acts with norm `1`. -/ +theorem one : ActsBounded p (1 : AddMonoidAlgebra ℂ (Fin d → ℝ)) 1 := fun G hG => by + simp only [map_one, one_apply_eq_self, one_mul] + exact ⟨hG, le_rfl⟩ + +/-- `c δ_v` acts with norm `|c|`: translations preserve `L_p` norms. -/ +theorem single (v : Fin d → ℝ) (c : ℂ) : + ActsBounded p (AddMonoidAlgebra.single v c) ‖c‖ₑ := fun G hG => by + have h : diffAct (AddMonoidAlgebra.single v c) G = c • fun x => G (x + v) := + funext fun x => diffAct_single v c G x + rw [h, eLpNorm_const_smul, eLpNorm_comp_add_right hG] + exact ⟨(aestronglyMeasurable_comp_add hG v).const_smul c, le_rfl⟩ + +/-- Larger constants are bounds too. -/ +theorem mono (ha : ActsBounded p a C) (hCD : C ≤ D) : ActsBounded p a D := fun G hG => + ⟨(ha G hG).1, (ha G hG).2.trans (mul_le_mul' hCD le_rfl)⟩ + +/-- Sums act with the sum of the bounds. -/ +theorem add (hp : 1 ≤ p) (ha : ActsBounded p a C) (hb : ActsBounded p b D) : + ActsBounded p (a + b) (C + D) := fun G hG => by + obtain ⟨h1, h2⟩ := ha G hG + obtain ⟨h3, h4⟩ := hb G hG + rw [map_add, LinearMap.add_apply] + refine ⟨h1.add h3, (eLpNorm_add_le hp).trans ?_⟩ + rw [add_mul] + exact add_le_add h2 h4 + +/-- Products act with the product of the bounds. -/ +theorem mul (ha : ActsBounded p a C) (hb : ActsBounded p b D) : + ActsBounded p (a * b) (C * D) := fun G hG => by + obtain ⟨h1, h2⟩ := hb G hG + obtain ⟨h3, h4⟩ := ha _ h1 + rw [map_mul, mul_apply_eq_comp] + refine ⟨h3, h4.trans ?_⟩ + rw [mul_assoc] + exact mul_le_mul' le_rfl h2 + +/-- Scalar multiples act with the scaled bound. -/ +theorem smul (ha : ActsBounded p a C) (c : ℂ) : ActsBounded p (c • a) (‖c‖ₑ * C) := fun G hG => by + obtain ⟨h1, h2⟩ := ha G hG + rw [map_smul, LinearMap.smul_apply, eLpNorm_const_smul, mul_assoc] + exact ⟨h1.const_smul c, mul_le_mul' le_rfl h2⟩ + +/-- Negatives act with the same bound. -/ +theorem neg (ha : ActsBounded p a C) : ActsBounded p (-a) C := by + have h := ha.smul (-1) + rwa [neg_one_smul, eNorm_neg, eNorm_one, one_mul] at h + +/-- Differences act with the sum of the bounds. -/ +theorem sub (hp : 1 ≤ p) (ha : ActsBounded p a C) (hb : ActsBounded p b D) : + ActsBounded p (a - b) (C + D) := by + rw [sub_eq_add_neg] + exact ha.add hp hb.neg + +/-- Powers act with the power of the bound. -/ +theorem pow (ha : ActsBounded p a C) (n : ℕ) : ActsBounded p (a ^ n) (C ^ n) := by + induction n with + | zero => simpa using (one : ActsBounded p (1 : AddMonoidAlgebra ℂ (Fin d → ℝ)) 1) + | succ n ih => + rw [pow_succ, pow_succ] + exact ih.mul ha + +/-- Finite products act with the product of the bounds. -/ +theorem prod {ι : Type*} (s : Finset ι) {a : ι → AddMonoidAlgebra ℂ (Fin d → ℝ)} {C : ι → ℝ≥0∞} + (h : ∀ i ∈ s, ActsBounded p (a i) (C i)) : + ActsBounded p (∏ i ∈ s, a i) (∏ i ∈ s, C i) := by + classical + induction s using Finset.induction_on with + | empty => simpa using (one : ActsBounded p (1 : AddMonoidAlgebra ℂ (Fin d → ℝ)) 1) + | insert i s hi ih => + rw [Finset.prod_insert hi, Finset.prod_insert hi] + exact (h i (Finset.mem_insert_self i s)).mul (ih fun j hj => h j (Finset.mem_insert_of_mem hj)) + +end ActsBounded + +/-! ### The moment kernel polynomial -/ + +/-- **The polynomial of the moment kernels**: in a commutative `ℂ`-algebra, +`∑_{l by + obtain ⟨k, rfl⟩ := Nat.exists_eq_add_of_le hm + rw [Nat.add_sub_cancel_left, pow_add, mul_assoc, ← pow_add, ← two_mul, pow_mul, neg_one_sq, + one_pow, mul_one] + have hexp : (-1 : A) ^ L * (Y - 1) ^ L = + ∑ m ∈ Finset.range (L + 1), (-1 : A) ^ m * (L.choose m : A) * Y ^ m := by + rw [sub_eq_add_neg, add_pow, Finset.mul_sum] + refine Finset.sum_congr rfl fun m hm => ?_ + have hmL : m ≤ L := Nat.lt_succ_iff.1 (Finset.mem_range.1 hm) + rw [← hsign m hmL] + ring + rw [hexp, Finset.sum_range_succ'] + simp only [pow_zero, Nat.choose_zero_right, Nat.cast_one, mul_one, sub_add_cancel_right, + ← Finset.sum_neg_distrib] + refine Finset.sum_congr rfl fun l _ => ?_ + rw [jacksonCoeff, Algebra.smul_def, map_mul, map_pow, map_neg, map_one, map_natCast, pow_succ] + ring + +/-- The moment kernel polynomial `P(Y) = 1 - (-1)^L (Y - 1)^L` of a translation acts with norm at +most `1 + 2^L`. -/ +theorem actsBounded_momentPoly {p : ℝ≥0∞} (hp : 1 ≤ p) (L : ℕ) (v : Fin d → ℝ) : + ActsBounded p (1 - (-1) ^ L * (AddMonoidAlgebra.single v (1 : ℂ) - 1) ^ L) (1 + 2 ^ L) := by + have hY : ActsBounded p (AddMonoidAlgebra.single v (1 : ℂ) - 1) 2 := by + have h := (ActsBounded.single (p := p) v (1 : ℂ)).sub hp ActsBounded.one + rwa [eNorm_one, one_add_one_eq_two] at h + have hsign : ActsBounded p ((-1 : AddMonoidAlgebra ℂ (Fin d → ℝ)) ^ L) 1 := by + have h := (ActsBounded.one (p := p) (d := d)).neg.pow L + rwa [one_pow] at h + have h := ActsBounded.one.sub hp (hsign.mul (hY.pow L)) + rwa [one_mul] at h + +/-- The polynomial `(-1)^L ((Y + 1)^L - 1)` of a translation acts with norm at most `2^L + 1`. -/ +theorem actsBounded_addPoly {p : ℝ≥0∞} (hp : 1 ≤ p) (L : ℕ) (v : Fin d → ℝ) : + ActsBounded p ((-1) ^ L * ((AddMonoidAlgebra.single v (1 : ℂ) + 1) ^ L - 1)) (2 ^ L + 1) := by + have hY : ActsBounded p (AddMonoidAlgebra.single v (1 : ℂ) + 1) 2 := by + have h := (ActsBounded.single (p := p) v (1 : ℂ)).add hp ActsBounded.one + rwa [eNorm_one, one_add_one_eq_two] at h + have hsign : ActsBounded p ((-1 : AddMonoidAlgebra ℂ (Fin d → ℝ)) ^ L) 1 := by + have h := (ActsBounded.one (p := p) (d := d)).neg.pow L + rwa [one_pow] at h + have h := hsign.mul ((hY.pow L).sub hp ActsBounded.one) + rwa [one_mul] at h + +/-! ### Expanding products of polynomials in translations -/ + +/-- **Expansion**: `(∏_i ∑_t q_i(t) Y_i^{ν(t)}) f(x) = ∑_n (∏_i q_i(n_i)) f(x + (ν(n_i) w_i)_i)` for +the translations `Y_i = δ_{w_i e_i}`. -/ +theorem diffAct_prod_sum_pow_apply {τ : Type*} (T : Finset τ) (ν : τ → ℕ) (q : Fin d → τ → ℂ) + (w : Fin d → ℝ) (f : (Fin d → ℝ) → ℂ) (x : Fin d → ℝ) : + diffAct (∏ i, ∑ t ∈ T, + q i t • AddMonoidAlgebra.single (Pi.single i (w i)) (1 : ℂ) ^ ν t) f x = + ∑ n ∈ Fintype.piFinset fun _ => T, + (∏ i, q i (n i)) * f (x + fun i => (ν (n i) : ℝ) * w i) := by + have hterm : ∀ i t, q i t • AddMonoidAlgebra.single (Pi.single i (w i)) (1 : ℂ) ^ ν t = + AddMonoidAlgebra.single (Pi.single i ((ν t : ℝ) * w i) : Fin d → ℝ) (q i t) := fun i t => by + rw [AddMonoidAlgebra.single_pow, one_pow, AddMonoidAlgebra.smul_single', mul_one] + congr 1 + funext j + by_cases hj : j = i + · subst hj + simp + · simp [hj] + simp_rw [hterm] + rw [Finset.prod_univ_sum] + simp_rw [AddMonoidAlgebra.prod_single] + rw [map_sum, LinearMap.sum_apply, Finset.sum_apply] + refine Finset.sum_congr rfl fun n _ => ?_ + rw [diffAct_single] + congr 2 + funext j + simp [Finset.sum_apply, Pi.single_apply] + +/-! ### Convolution with tensor products of dilated bumps -/ + +/-- Diagonal changes of variables keep integrability. -/ +theorem integrable_comp_diag {a : Fin d → ℝ} (ha : ∀ i, 0 < a i) {F : (Fin d → ℝ) → ℂ} + (hF : Integrable F) : Integrable (fun z : Fin d → ℝ => F fun i => a i * z i) := by + have hdet : LinearMap.det (diagMap a) ≠ 0 := by + rw [det_diagMap] + exact Finset.prod_ne_zero_iff.2 fun i _ => (ha i).ne' + have hmap := Real.map_linearMap_volume_pi_eq_smul_volume_pi hdet + have he := (diagEquiv fun i => (ha i).ne').measurableEmbedding + have hcoe : ⇑(diagEquiv fun i => (ha i).ne') = ⇑(diagMap a) := by + funext z + rw [diagMap_apply, diagEquiv_apply] + have h1 : Integrable F (Measure.map (diagEquiv fun i => (ha i).ne') volume) := by + rw [hcoe, hmap] + exact hF.smul_measure ENNReal.ofReal_ne_top + have h2 := he.integrable_map_iff.1 h1 + simpa only [Function.comp_def, diagEquiv_apply] using h2 + +/-- **Convolution with tensor products of dilated bumps averages translates**: for +`κ_i = ∑_{t ∈ T} q_i(t) g_{c_i/ν(t)}` with `ν(t) ≥ 1`, `c_i > 0` and `f ∈ L_p`, +`((⊗κ) ⋆ f)(x) = ∫ (⊗g)(z) (∏_i ∑_t q_i(t) Y_i^{ν(t)}) f(x) dz` with `Y_i = δ_{-z_i e_i / c_i}`, for +almost every `x`. -/ +theorem conv_tensorKernel_sum_dilate_ae {p : ℝ≥0∞} (hp1 : 1 ≤ p) (hp : p ≠ ∞) {g : ℝ → ℂ} + (hg : Integrable g) {τ : Type*} (T : Finset τ) (ν : τ → ℕ) (hν : ∀ t ∈ T, 1 ≤ ν t) + (q : Fin d → τ → ℂ) {c : Fin d → ℝ} (hc : ∀ i, 0 < c i) {f : (Fin d → ℝ) → ℂ} + (hf : MemLp f p volume) : + conv (tensorKernel fun i => ∑ t ∈ T, q i t • dilate (c i / ν t) g) f volume =ᵐ[volume] + fun x => ∫ z, tensorKernel (fun _ => g) z * diffAct (∏ i, ∑ t ∈ T, + q i t • AddMonoidAlgebra.single (Pi.single i (-z i / c i)) (1 : ℂ) ^ ν t) f x := by + set S := Fintype.piFinset fun _ : Fin d => T + set K : (Fin d → τ) → (Fin d → ℝ) → ℂ := fun n => + tensorKernel fun i => dilate (c i / ν (n i)) g + have hνpos : ∀ n ∈ S, ∀ i, (0 : ℝ) < ν (n i) := fun n hn i => by + have := hν (n i) (Fintype.mem_piFinset.1 hn i) + exact_mod_cast this + have hK : ∀ n ∈ S, Integrable (K n) := fun n hn => + integrable_tensorKernel fun i => integrable_dilate hg + (div_pos (hc i) (hνpos n hn i)).ne' + -- the kernel as a sum of tensor products + have hker : (tensorKernel fun i => ∑ t ∈ T, q i t • dilate (c i / ν t) g) = + fun x => ∑ n ∈ S, (∏ i, q i (n i)) * K n x := by + rw [← sum_tensorKernel_piFinset (fun _ => T) fun i t => q i t • dilate (c i / ν t) g] + funext x + rw [Finset.sum_apply] + refine Finset.sum_congr rfl fun n _ => ?_ + simp only [K, tensorKernel, Pi.smul_apply, smul_eq_mul, Finset.prod_mul_distrib] + -- the convolutions exist almost everywhere + have hex : ∀ᵐ x ∂(volume : Measure (Fin d → ℝ)), ∀ n ∈ S, + ConvolutionExistsAt (K n) f x (ContinuousLinearMap.mul ℂ ℂ) volume := + (Filter.eventually_all_finset _).2 fun n hn => ae_convolutionExistsAt hp1 hp (hK n hn) hf + rw [hker] + filter_upwards [conv_finsetSum_kernel_ae hp1 hp S (fun n => ∏ i, q i (n i)) hK hf, hex] + with x h1 h2 + rw [h1] + -- each convolution is an integral of a translate + have hsub : ∀ n ∈ S, conv (K n) f volume x = + ∫ z, tensorKernel (fun _ => g) z * f (x - fun i => ν (n i) / c i * z i) := fun n hn => by + rw [integral_tensorKernel_mul_comp_eq_conv (fun _ => g) + (fun i => div_pos (hνpos n hn i) (hc i)) f x] + simp only [K, inv_div] + have hint : ∀ n ∈ S, Integrable (fun z : Fin d → ℝ => + tensorKernel (fun _ => g) z * f (x - fun i => (ν (n i) : ℝ) / c i * z i)) := fun n hn => by + have ha : ∀ i, (0 : ℝ) < ν (n i) / c i := fun i => div_pos (hνpos n hn i) (hc i) + have h := integrable_comp_diag ha (h2 n hn) + have hprod : (0 : ℝ) < ∏ i, c i / ν (n i) := + Finset.prod_pos fun i _ => div_pos (hc i) (hνpos n hn i) + have hKD : ∀ z : Fin d → ℝ, K n (fun i => (ν (n i) : ℝ) / c i * z i) = + ((∏ i, c i / ν (n i) : ℝ) : ℂ) * tensorKernel (fun _ => g) z := fun z => by + simp only [K, tensorKernel, dilate, Module.finrank_self, pow_one, smul_eq_mul] + rw [Complex.ofReal_prod, ← Finset.prod_mul_distrib] + refine Finset.prod_congr rfl fun i _ => ?_ + rw [show c i / (ν (n i) : ℝ) * ((ν (n i) : ℝ) / c i * z i) = z i by + field_simp [(hc i).ne', (hνpos n hn i).ne']] + refine (h.const_mul ((((∏ i, c i / ν (n i))⁻¹ : ℝ)) : ℂ)).congr + (Eventually.of_forall fun z => ?_) + simp only [ContinuousLinearMap.mul_apply'] + rw [hKD z, ← mul_assoc, ← mul_assoc, ← Complex.ofReal_mul, inv_mul_cancel₀ hprod.ne', + Complex.ofReal_one, one_mul] + calc ∑ n ∈ S, (∏ i, q i (n i)) * conv (K n) f volume x + = ∑ n ∈ S, ∫ z, (∏ i, q i (n i)) * + (tensorKernel (fun _ => g) z * f (x - fun i => ν (n i) / c i * z i)) := by + refine Finset.sum_congr rfl fun n hn => ?_ + rw [hsub n hn, integral_const_mul] + _ = ∫ z, ∑ n ∈ S, (∏ i, q i (n i)) * + (tensorKernel (fun _ => g) z * f (x - fun i => ν (n i) / c i * z i)) := + (integral_finsetSum _ fun n hn => (hint n hn).const_mul _).symm + _ = _ := by + refine integral_congr_ae (Eventually.of_forall fun z => ?_) + simp only + rw [diffAct_prod_sum_pow_apply, Finset.mul_sum] + refine Finset.sum_congr rfl fun n _ => ?_ + have hx : (x - fun i => (ν (n i) : ℝ) / c i * z i) = + x + fun i => (ν (n i) : ℝ) * (-z i / c i) := by + funext i + simp only [Pi.sub_apply, Pi.add_apply] + ring + rw [hx] + ring + +end Rd diff --git a/LeanPool/FunctionSpaces/Rd/MixedSmoothness/MixedDifferences.lean b/LeanPool/FunctionSpaces/Rd/MixedSmoothness/MixedDifferences.lean new file mode 100644 index 0000000000..6f4862801c --- /dev/null +++ b/LeanPool/FunctionSpaces/Rd/MixedSmoothness/MixedDifferences.lean @@ -0,0 +1,313 @@ +/- +Copyright (c) 2026 Mario Ullrich. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Mario Ullrich +-/ +module + +public import LeanPool.FunctionSpaces.Rd.MixedSmoothness.TensorKernels +public import LeanPool.FunctionSpaces.Rd.MixedSmoothness.MixedSequences +public import LeanPool.FunctionSpaces.Rd.Differences.DilatedDifferences +public import LeanPool.FunctionSpaces.Analysis.Differences.TranslationAlgebra + +/- +Modified for Lean Pool: module names and imports adapted. +-/ + +/-! +# Mixed differences and mixed moduli of smoothness on `ℝ^d` + +On `ℝ^d = Fin d → ℝ`, the **mixed difference** of order `L` in the coordinates of `e ⊆ {0, …, d-1}` +with steps `h_i` is + +`Δ^{L,e}_h f = (∏_{i ∈ e} Δ^L_{h_i e_i}) f` + +(`Rd.mixedDiff`), the action of `∏_{i ∈ e} (δ_{h_i e_i} - 1)^L` in the commutative algebra of +translations (`TranslationAlgebra.diffAct`), so the order of the coordinates does not matter. Adding +a coordinate applies one more difference (`Rd.mixedDiff_insert`). Mixed differences are linear, keep +measurability and integrability, satisfy `‖Δ^{L,e}_h f‖_p ≤ 2^(L|e|) ‖f‖_p`, act on each factor of a +tensor kernel (`Rd.mixedDiff_tensorKernel`) and move from a convolution onto its kernel, +`Δ^{L,e}_h (K ⋆ f) = (Δ^{L,e}_h K) ⋆ f` almost everywhere (`Rd.mixedDiff_conv_ae`). + +The **mixed modulus of smoothness** is `Ω^e_L(f, t)_p = sup_{|h_i| ≤ t_i, i ∈ e} ‖Δ^{L,e}_h f‖_p` +(`Rd.mixedModulus`; T. Ullrich), and for `f ∈ L_p` and `k ∈ ℕ^d` we use it in the coordinates +`e(k) = {i : k_i ≠ 0}` at the dyadic scale `2^(-k)`, `Ω^{e(k)}_L(f, 2^(-k))_p` +(`Rd.lpMixedModulus`); `k = 0` gives `‖f‖_p`. The **Besov quasi-norm of dominating mixed +smoothness by differences** is + +`‖(2^(s|k|_1) Ω^{e(k)}_L(f, 2^(-k))_p)_{k ∈ ℕ^d}‖_{ℓ_q(ℕ^d)}` + +(`Rd.mixedModNorm`), with one `ℓ_q` norm over `ℕ^d`, matching the indexing of the mixed local +means. +-/ + +@[expose] public section + +open MeasureTheory Filter +open TranslationAlgebra (coordElem diffAct higherDiff_eq_diffAct) +open scoped ENNReal + +open ENNReal (dyadicWeight lqNorm) + +namespace Rd + +variable {d : ℕ} + +/-! ### Mixed differences -/ + +/-- The **mixed difference** `Δ^{L,e}_h f = (∏_{i ∈ e} Δ^L_{h_i e_i}) f`, the action of +`∏_{i ∈ e} (δ_{h_i e_i} - 1)^L` in the algebra of translations. -/ +noncomputable def mixedDiff (L : ℕ) (e : Finset (Fin d)) (h : Fin d → ℝ) + (f : (Fin d → ℝ) → ℂ) : (Fin d → ℝ) → ℂ := + diffAct (∏ i ∈ e, coordElem h i ^ L) f + +/-- `(δ_{h_i e_i} - 1)^L` acts by the difference `Δ^L_{h_i e_i}`. -/ +theorem diffAct_coordElem_pow_eq_higherDiff (L : ℕ) (h : Fin d → ℝ) (i : Fin d) + (f : (Fin d → ℝ) → ℂ) : + diffAct (coordElem h i ^ L) f = (fwdDiff (Pi.single i (h i)))^[L] f := by + rw [coordElem, ← higherDiff_eq_diffAct] + rfl + +/-- The mixed difference in no coordinate is the function itself. -/ +theorem mixedDiff_empty (L : ℕ) (h : Fin d → ℝ) (f : (Fin d → ℝ) → ℂ) : + mixedDiff L ∅ h f = f := by + simp [mixedDiff] + +/-- **Adding a coordinate**: `Δ^{L, e ∪ {i}}_h = Δ^L_{h_i e_i} Δ^{L,e}_h` for `i ∉ e`. -/ +theorem mixedDiff_insert (L : ℕ) {e : Finset (Fin d)} {i : Fin d} (hi : i ∉ e) (h : Fin d → ℝ) + (f : (Fin d → ℝ) → ℂ) : + mixedDiff L (insert i e) h f = (fwdDiff (Pi.single i (h i)))^[L] (mixedDiff L e h f) := by + rw [mixedDiff, Finset.prod_insert hi, map_mul, mul_apply_eq_comp, + diffAct_coordElem_pow_eq_higherDiff] + rfl + +/-- Mixed differences are additive. -/ +theorem mixedDiff_add (L : ℕ) (e : Finset (Fin d)) (h : Fin d → ℝ) (f g : (Fin d → ℝ) → ℂ) : + mixedDiff L e h (f + g) = mixedDiff L e h f + mixedDiff L e h g := + map_add _ f g + +/-- Mixed differences are subtractive. -/ +theorem mixedDiff_sub (L : ℕ) (e : Finset (Fin d)) (h : Fin d → ℝ) (f g : (Fin d → ℝ) → ℂ) : + mixedDiff L e h (f - g) = mixedDiff L e h f - mixedDiff L e h g := + map_sub _ f g + +/-- Mixed differences of a.e. strongly measurable functions are a.e. strongly measurable. -/ +theorem aestronglyMeasurable_mixedDiff {f : (Fin d → ℝ) → ℂ} (hf : AEStronglyMeasurable f volume) + (L : ℕ) (e : Finset (Fin d)) (h : Fin d → ℝ) : + AEStronglyMeasurable (mixedDiff L e h f) volume := by + induction e using Finset.induction_on with + | empty => rwa [mixedDiff_empty] + | insert i e hi ih => + rw [mixedDiff_insert L hi] + exact aestronglyMeasurable_higherDiff ih L _ + +/-- Mixed differences of integrable functions are integrable. -/ +theorem integrable_mixedDiff {K : (Fin d → ℝ) → ℂ} (hK : Integrable K) (L : ℕ) + (e : Finset (Fin d)) (h : Fin d → ℝ) : Integrable (mixedDiff L e h K) := by + induction e using Finset.induction_on with + | empty => rwa [mixedDiff_empty] + | insert i e hi ih => + rw [mixedDiff_insert L hi] + exact integrable_higherDiff ih L _ + +/-- **Mixed differences depend only on the class modulo null sets.** -/ +theorem mixedDiff_congr_ae {f g : (Fin d → ℝ) → ℂ} (hfg : f =ᵐ[volume] g) (L : ℕ) + (e : Finset (Fin d)) (h : Fin d → ℝ) : + mixedDiff L e h f =ᵐ[volume] mixedDiff L e h g := by + induction e using Finset.induction_on with + | empty => rwa [mixedDiff_empty, mixedDiff_empty] + | insert i e hi ih => + rw [mixedDiff_insert L hi, mixedDiff_insert L hi] + exact higherDiff_congr_ae ih L _ + +/-- `‖Δ^{L,e}_h f‖_p ≤ 2^(L|e|) ‖f‖_p`. -/ +theorem eLpNorm_mixedDiff_le {f : (Fin d → ℝ) → ℂ} (hf : AEStronglyMeasurable f volume) + {p : ℝ≥0∞} (hp : 1 ≤ p) (L : ℕ) (e : Finset (Fin d)) (h : Fin d → ℝ) : + eLpNorm (mixedDiff L e h f) p volume ≤ 2 ^ (L * e.card) * eLpNorm f p volume := by + induction e using Finset.induction_on with + | empty => simp [mixedDiff_empty] + | insert i e hi ih => + rw [mixedDiff_insert L hi, Finset.card_insert_of_notMem hi] + calc eLpNorm ((fwdDiff (Pi.single i (h i)))^[L] (mixedDiff L e h f)) p volume + ≤ 2 ^ L * eLpNorm (mixedDiff L e h f) p volume := + eLpNorm_higherDiff_le (aestronglyMeasurable_mixedDiff hf L e h) hp L _ + _ ≤ 2 ^ L * (2 ^ (L * e.card) * eLpNorm f p volume) := mul_le_mul' le_rfl ih + _ = 2 ^ (L * (e.card + 1)) * eLpNorm f p volume := by + rw [← mul_assoc, ← pow_add] + ring_nf + +/-- **Mixed differences of convolutions** fall on the kernel: +`Δ^{L,e}_h (K ⋆ f) = (Δ^{L,e}_h K) ⋆ f` almost everywhere, for integrable `K` and `f ∈ L_p`. -/ +theorem mixedDiff_conv_ae {p : ℝ≥0∞} (hp1 : 1 ≤ p) (hp : p ≠ ∞) {K f : (Fin d → ℝ) → ℂ} + (hK : Integrable K) (hf : MemLp f p volume) (L : ℕ) (e : Finset (Fin d)) (h : Fin d → ℝ) : + mixedDiff L e h (conv K f volume) =ᵐ[volume] conv (mixedDiff L e h K) f volume := by + induction e using Finset.induction_on with + | empty => rw [mixedDiff_empty, mixedDiff_empty] + | insert i e hi ih => + rw [mixedDiff_insert L hi, mixedDiff_insert L hi] + exact (higherDiff_congr_ae ih L _).trans + (higherDiff_conv_ae hp1 hp (integrable_mixedDiff hK L e h) hf L _) + +/-! ### Mixed differences of tensor kernels -/ + +/-- **A difference in coordinate `i` of a tensor product** acts on the `i`-th factor: +`Δ_{t e_i} (⊗K) = ⊗K'` with `K'_i = Δ_t K_i` and `K'_j = K_j` otherwise. -/ +theorem fwdDiff_single_tensorKernel (K : Fin d → ℝ → ℂ) (i : Fin d) (t : ℝ) : + fwdDiff (Pi.single i t) (tensorKernel K) = + tensorKernel (Function.update K i (fwdDiff t (K i))) := by + funext x + simp only [fwdDiff, tensorKernel] + rw [Fintype.prod_eq_mul_prod_compl i, Fintype.prod_eq_mul_prod_compl i (fun j => K j (x j)), + Fintype.prod_eq_mul_prod_compl i (fun j => Function.update K i (fwdDiff t (K i)) j (x j))] + have h1 : ∏ j ∈ {i}ᶜ, K j ((x + Pi.single i t : Fin d → ℝ) j) = ∏ j ∈ {i}ᶜ, K j (x j) := + Finset.prod_congr rfl fun j hj => by + have hji : j ≠ i := by simpa using hj + simp [hji] + have h2 : ∏ j ∈ {i}ᶜ, Function.update K i (fwdDiff t (K i)) j (x j) = + ∏ j ∈ {i}ᶜ, K j (x j) := + Finset.prod_congr rfl fun j hj => by + have hji : j ≠ i := by simpa using hj + simp [hji] + rw [h1, h2] + simp only [Pi.add_apply, Pi.single_eq_same, Function.update_self, fwdDiff] + ring + +/-- **Differences of order `L` in coordinate `i` of a tensor product** act on the `i`-th +factor. -/ +theorem higherDiff_single_tensorKernel (L : ℕ) (K : Fin d → ℝ → ℂ) (i : Fin d) (t : ℝ) : + (fwdDiff (Pi.single i t))^[L] (tensorKernel K) = + tensorKernel (Function.update K i ((fwdDiff t)^[L] (K i))) := by + induction L with + | zero => simp + | succ L ih => + rw [Function.iterate_succ_apply', ih, fwdDiff_single_tensorKernel, Function.update_idem, + Function.update_self, Function.iterate_succ_apply'] + +/-- **Mixed differences of tensor products** act on the factors of the coordinates in `e`: +`Δ^{L,e}_h (⊗K) = ⊗K'` with `K'_i = Δ^L_{h_i} K_i` for `i ∈ e` and `K'_i = K_i` otherwise. -/ +theorem mixedDiff_tensorKernel (L : ℕ) (e : Finset (Fin d)) (h : Fin d → ℝ) + (K : Fin d → ℝ → ℂ) : + mixedDiff L e h (tensorKernel K) = + tensorKernel fun i => if i ∈ e then (fwdDiff (h i))^[L] (K i) else K i := by + induction e using Finset.induction_on with + | empty => simp [mixedDiff_empty] + | insert i e hi ih => + rw [mixedDiff_insert L hi, ih, higherDiff_single_tensorKernel] + congr 1 + funext j + by_cases hj : j = i + · subst hj + simp [hi] + · simp [Finset.mem_insert, hj] + +/-! ### Mixed moduli of smoothness -/ + +/-- The **mixed modulus of smoothness** `Ω^e_L(f, t)_p = sup ‖Δ^{L,e}_h f‖_p` over the steps with +`|h_i| ≤ t_i` for `i ∈ e`. -/ +noncomputable def mixedModulus (L : ℕ) (e : Finset (Fin d)) (p : ℝ≥0∞) (f : (Fin d → ℝ) → ℂ) + (t : Fin d → ℝ) : ℝ≥0∞ := + ⨆ (h : Fin d → ℝ) (_ : ∀ i ∈ e, |h i| ≤ t i), eLpNorm (mixedDiff L e h f) p volume + +/-- Each admissible step is bounded by the mixed modulus. -/ +theorem eLpNorm_mixedDiff_le_mixedModulus {L : ℕ} {e : Finset (Fin d)} {p : ℝ≥0∞} + {f : (Fin d → ℝ) → ℂ} {t h : Fin d → ℝ} (hh : ∀ i ∈ e, |h i| ≤ t i) : + eLpNorm (mixedDiff L e h f) p volume ≤ mixedModulus L e p f t := + le_iSup₂ (f := fun (h : Fin d → ℝ) (_ : ∀ i ∈ e, |h i| ≤ t i) => + eLpNorm (mixedDiff L e h f) p volume) h hh + +/-- The mixed modulus increases in `t`. -/ +theorem mixedModulus_mono (L : ℕ) (e : Finset (Fin d)) (p : ℝ≥0∞) (f : (Fin d → ℝ) → ℂ) + {t t' : Fin d → ℝ} (htt' : ∀ i ∈ e, t i ≤ t' i) : + mixedModulus L e p f t ≤ mixedModulus L e p f t' := + iSup₂_le fun _ hh => eLpNorm_mixedDiff_le_mixedModulus fun i hi => (hh i hi).trans (htt' i hi) + +/-- The mixed modulus in no coordinate is the norm. -/ +theorem mixedModulus_empty (L : ℕ) (p : ℝ≥0∞) (f : (Fin d → ℝ) → ℂ) (t : Fin d → ℝ) : + mixedModulus L ∅ p f t = eLpNorm f p volume := by + simp [mixedModulus, mixedDiff_empty] + +/-- The mixed modulus is subadditive. -/ +theorem mixedModulus_add_le {p : ℝ≥0∞} (hp : 1 ≤ p) (L : ℕ) (e : Finset (Fin d)) + (f g : (Fin d → ℝ) → ℂ) (t : Fin d → ℝ) : + mixedModulus L e p (f + g) t ≤ mixedModulus L e p f t + mixedModulus L e p g t := by + refine iSup₂_le fun h hh => ?_ + rw [mixedDiff_add] + exact (eLpNorm_add_le hp).trans + (add_le_add (eLpNorm_mixedDiff_le_mixedModulus hh) (eLpNorm_mixedDiff_le_mixedModulus hh)) + +/-- `Ω^e_L(f, t)_p ≤ 2^(L|e|) ‖f‖_p`. -/ +theorem mixedModulus_le {f : (Fin d → ℝ) → ℂ} (hf : AEStronglyMeasurable f volume) {p : ℝ≥0∞} + (hp : 1 ≤ p) (L : ℕ) (e : Finset (Fin d)) (t : Fin d → ℝ) : + mixedModulus L e p f t ≤ 2 ^ (L * e.card) * eLpNorm f p volume := + iSup₂_le fun h _ => eLpNorm_mixedDiff_le hf hp L e h + +/-- **The mixed modulus depends only on the class modulo null sets.** -/ +theorem mixedModulus_congr_ae {f g : (Fin d → ℝ) → ℂ} (hfg : f =ᵐ[volume] g) (L : ℕ) + (e : Finset (Fin d)) (p : ℝ≥0∞) (t : Fin d → ℝ) : + mixedModulus L e p f t = mixedModulus L e p g t := by + simp only [mixedModulus] + congr 1 + funext h + congr 1 + funext _ + exact eLpNorm_congr_ae (mixedDiff_congr_ae hfg L e h) + +/-! ### The mixed modulus on `L_p` at dyadic scales -/ + +/-- The coordinates `e(k) = {i : k_i ≠ 0}` in which the index `k ∈ ℕ^d` takes differences. -/ +def mixedSupp (k : Fin d → ℕ) : Finset (Fin d) := Finset.univ.filter fun i => k i ≠ 0 + +/-- The index `0` takes no differences. -/ +theorem mixedSupp_zero : mixedSupp (0 : Fin d → ℕ) = ∅ := by + simp [mixedSupp] + +variable {p : ℝ≥0∞} [Fact (1 ≤ p)] + +variable (p) in +/-- The **mixed modulus at the dyadic scale `2^(-k)`** of `f ∈ L_p`, +`Ω^{e(k)}_L(f, 2^(-k))_p` with `e(k) = {i : k_i ≠ 0}`. -/ +noncomputable def lpMixedModulus (L : ℕ) (f : Lp ℂ p (volume : Measure (Fin d → ℝ))) + (k : Fin d → ℕ) : ℝ≥0∞ := + mixedModulus L (mixedSupp k) p f fun i => 1 / 2 ^ k i + +/-- At `k = 0` the mixed modulus is the norm. -/ +theorem lpMixedModulus_zero (L : ℕ) (f : Lp ℂ p (volume : Measure (Fin d → ℝ))) : + lpMixedModulus p L f 0 = ‖f‖ₑ := by + rw [lpMixedModulus, mixedSupp_zero, mixedModulus_empty, Lp.eNorm_def] + +/-- The mixed modulus on `L_p` is subadditive. -/ +theorem lpMixedModulus_add_le (L : ℕ) (f g : Lp ℂ p (volume : Measure (Fin d → ℝ))) + (k : Fin d → ℕ) : + lpMixedModulus p L (f + g) k ≤ lpMixedModulus p L f k + lpMixedModulus p L g k := by + rw [lpMixedModulus, mixedModulus_congr_ae (Lp.coeFn_add f g)] + exact mixedModulus_add_le Fact.out L _ _ _ _ + +/-- `Ω^{e(k)}_L(f, 2^(-k))_p ≤ 2^(Ld) ‖f‖_p`. -/ +theorem lpMixedModulus_le (L : ℕ) (f : Lp ℂ p (volume : Measure (Fin d → ℝ))) (k : Fin d → ℕ) : + lpMixedModulus p L f k ≤ 2 ^ (L * d) * ‖f‖ₑ := by + rw [Lp.eNorm_def] + refine (mixedModulus_le (Lp.aestronglyMeasurable f) Fact.out L _ _).trans + (mul_le_mul' (pow_le_pow_right₀ one_le_two (Nat.mul_le_mul_left L ?_)) le_rfl) + exact (Finset.card_le_univ _).trans (Fintype.card_fin d).le + +/-- The mixed modulus of `0` vanishes. -/ +theorem lpMixedModulus_zero_left (L : ℕ) (k : Fin d → ℕ) : + lpMixedModulus p L (0 : Lp ℂ p (volume : Measure (Fin d → ℝ))) k = 0 := + le_antisymm ((lpMixedModulus_le L 0 k).trans (by simp)) bot_le + +variable (p) in +/-- The **Besov quasi-norm of dominating mixed smoothness by differences**, +`‖(2^(s|k|_1) Ω^{e(k)}_L(f, 2^(-k))_p)_{k ∈ ℕ^d}‖_{ℓ_q(ℕ^d)}`. -/ +noncomputable def mixedModNorm (L : ℕ) (s : ℝ) (q : ℝ≥0∞) + (f : Lp ℂ p (volume : Measure (Fin d → ℝ))) : ℝ≥0∞ := + lqNorm q fun k => mixedWeight s k * lpMixedModulus p L f k + +/-- The norm of `f` is bounded by the mixed quasi-norm (the term `k = 0`). -/ +theorem enorm_le_mixedModNorm (L : ℕ) (s : ℝ) {q : ℝ≥0∞} (hq : q ≠ 0) + (f : Lp ℂ p (volume : Measure (Fin d → ℝ))) : ‖f‖ₑ ≤ mixedModNorm p L s q f := by + have h := ENNReal.le_lqNorm hq (fun k => mixedWeight s k * lpMixedModulus p L f k) 0 + simp only [mixedWeight, Pi.zero_apply, ENNReal.dyadicWeight_zero_right, Finset.prod_const_one, + one_mul, lpMixedModulus_zero] at h + exact h + +end Rd diff --git a/LeanPool/FunctionSpaces/Rd/MixedSmoothness/MixedLittlewoodPaley.lean b/LeanPool/FunctionSpaces/Rd/MixedSmoothness/MixedLittlewoodPaley.lean new file mode 100644 index 0000000000..c75d9f944d --- /dev/null +++ b/LeanPool/FunctionSpaces/Rd/MixedSmoothness/MixedLittlewoodPaley.lean @@ -0,0 +1,392 @@ +/- +Copyright (c) 2026 Mario Ullrich. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Mario Ullrich +-/ +module + +public import LeanPool.FunctionSpaces.Rd.MixedSmoothness.MixedLocalMeans +public import LeanPool.FunctionSpaces.Rd.Approximation.BandJackson +public import LeanPool.FunctionSpaces.Rd.Approximation.BandInverse + +/- +Modified for Lean Pool: module names and imports adapted. +-/ + +/-! +# Tensor Littlewood–Paley blocks + +On `ℝ^d = Fin d → ℝ` the **tensor Littlewood–Paley blocks** of `f ∈ L_p` are `δ_k ⋆ f` with the +tensor kernels `δ_k = ⊗_i ψ_{k_i}` of the one-dimensional blocks `ψ_j` (`Rd.psi` on `ℝ`), +`k ∈ ℕ^d` (`Rd.mixedPsi`, `Rd.mixedBlock`). In Fourier terms `δ_k ⋆ f = 𝓕⁻¹(φ_k 𝓕f)` for the +tensor product `φ_k = ⊗_i 𝓕ψ_{k_i}` of the one-dimensional dyadic decomposition of unity, and +**Vybíral's quasi-norm** of the Besov spaces of dominating mixed smoothness is +`‖(2^(s|k|_1) ‖δ_k ⋆ f‖_p)_{k ∈ ℕ^d}‖_{ℓ_q(ℕ^d)}` (`Rd.mixedLPNorm`). Over the boxes +`{k : k_i ≤ J}` the blocks sum to the dilation `(⊗Φ)_{2^J}` of an approximate identity, so +`∑_k δ_k ⋆ f = f` in `L_p` (`Rd.tendsto_sum_mixedBlock`). + +**Littlewood–Paley blocks, local means and differences** (`Rd.mixedBesov_iff_mixedLP`): for +`1 ≤ p < ∞`, `0 < s < L` and `1 ≤ q ≤ ∞` the three quasi-norms are finite together. Both +comparisons with the mixed local means use a reproducing formula, a one-dimensional bound in +`L_1` in each coordinate, and the almost diagonal lemma on `ℕ^d`: + +* `‖ψ_m ⋆ η_k‖_1 ≤ C 2^(-(m-k)L)` for `k ≤ m` + (`Rd.LocalMeansBump.exists_eLpNorm_conv_psi_dual_le`): `ψ_m` annihilates the band-limited + Jackson approximant `J_{m-3} η_k` (`Rd.conv_psi_Theta`), and + `‖η_k - J_{m-3} η_k‖_1 ≤ C ω_L(η_k, 2^(-(m-3)))_1` (`Rd.enorm_sub_jacksonApprox_le`); +* `‖k_m ⋆ Θ_k‖_1 ≤ C 2^(-(m-k)L)` for `k < m` + (`Rd.LocalMeansBump.exists_eLpNorm_conv_kernel_Theta_le`): local means are bounded by the + modulus (`Rd.LocalMeansBump.enorm_localMean_succ_le`), and `Θ_k` is smooth at the scale `2^(-k)` + (`Rd.eLpNorm_higherDiff_Theta_le`). +-/ + +@[expose] public section + +open MeasureTheory Filter Topology +open scoped ENNReal + +open ENNReal (dyadicWeight lqNorm) + +namespace Rd + +variable {d : ℕ} + +/-! ### Tensor Littlewood–Paley blocks -/ + +/-- The **tensor Littlewood–Paley kernels** `δ_k = ⊗_i ψ_{k_i}`. -/ +noncomputable def mixedPsi (k : Fin d → ℕ) : (Fin d → ℝ) → ℂ := + tensorKernel fun i => psi (V := ℝ) (k i) + +/-- The **tensor band-limiting kernels** `⊗_i Θ_{k_i}`. -/ +noncomputable def mixedTheta (k : Fin d → ℕ) : (Fin d → ℝ) → ℂ := + tensorKernel fun i => Theta (V := ℝ) (k i) + +/-- The tensor Littlewood–Paley kernels are integrable. -/ +theorem integrable_mixedPsi (k : Fin d → ℕ) : Integrable (mixedPsi k) := + integrable_tensorKernel fun i => integrable_psi (k i) + +/-- The tensor band-limiting kernels are integrable. -/ +theorem integrable_mixedTheta (k : Fin d → ℕ) : Integrable (mixedTheta k) := + integrable_tensorKernel fun i => integrable_Theta (k i) + +/-- **The blocks are band-limited**: `(⊗Θ_{k_i}) ⋆ δ_k = δ_k` (`Rd.conv_Theta_psi` in every +coordinate). -/ +theorem conv_mixedTheta_mixedPsi (k : Fin d → ℕ) : + conv (mixedTheta k) (mixedPsi k) volume = mixedPsi k := by + rw [mixedTheta, mixedPsi, conv_tensorKernel] + congr 1 + funext i + exact conv_Theta_psi (k i) + +/-- **The blocks sum to an approximate identity**: over the boxes `{k : k_i ≤ J}`, +`∑_k δ_k = (⊗Φ)_{2^J}`. -/ +theorem sum_mixedPsi (J : ℕ) : + (fun x => ∑ k ∈ Fintype.piFinset (fun _ : Fin d => Finset.range (J + 1)), mixedPsi k x) = + dilate ((2 : ℝ) ^ J) (tensorKernel fun _ : Fin d => lpKernel (V := ℝ)) := by + have h := sum_tensorKernel_piFinset (fun _ : Fin d => Finset.range (J + 1)) + (fun _ j => psi (V := ℝ) j) + rw [dilate_tensorKernel] + funext x + rw [← Finset.sum_apply] + change (∑ k ∈ Fintype.piFinset (fun _ : Fin d => Finset.range (J + 1)), + tensorKernel fun i => psi (V := ℝ) (k i)) x = _ + rw [h] + simp only [sum_psi] + rfl + +variable {p : ℝ≥0∞} [Fact (1 ≤ p)] + +/-- The **tensor Littlewood–Paley blocks** `f ↦ δ_k ⋆ f` on `L_p(ℝ^d)`. -/ +noncomputable def mixedBlock (hp : p ≠ ∞) (k : Fin d → ℕ) : + Lp ℂ p (volume : Measure (Fin d → ℝ)) →L[ℂ] Lp ℂ p (volume : Measure (Fin d → ℝ)) := + convLp hp (integrable_mixedPsi k) + +/-- **Vybíral's quasi-norm** of the Besov spaces of dominating mixed smoothness, +`‖(2^(s|k|_1) ‖δ_k ⋆ f‖_p)_{k ∈ ℕ^d}‖_{ℓ_q(ℕ^d)}`. -/ +noncomputable def mixedLPNorm (hp : p ≠ ∞) (s : ℝ) (q : ℝ≥0∞) + (f : Lp ℂ p (volume : Measure (Fin d → ℝ))) : ℝ≥0∞ := + lqNorm q fun k => mixedWeight s k * ‖mixedBlock hp k f‖ₑ + +/-- **The tensor Littlewood–Paley decomposition**: `∑_{k ≤ J} δ_k ⋆ f → f` in `L_p` over the boxes +`{k : k_i ≤ J}`. -/ +theorem tendsto_sum_mixedBlock (hp : p ≠ ∞) (f : Lp ℂ p (volume : Measure (Fin d → ℝ))) : + Tendsto (fun J => ∑ k ∈ Fintype.piFinset (fun _ : Fin d => Finset.range (J + 1)), + mixedBlock hp k f) atTop (𝓝 f) := by + have hΦ : Integrable (tensorKernel fun _ : Fin d => lpKernel (V := ℝ)) := + integrable_tensorKernel fun _ => integrable_lpKernel + have hΦ1 : ∫ x, tensorKernel (fun _ : Fin d => lpKernel (V := ℝ)) x = 1 := by + rw [integral_tensorKernel] + simp [integral_lpKernel] + have hlim := tendsto_convLp_dilate hp hΦ hΦ1 (c := fun J : ℕ => (2 : ℝ) ^ J) + (fun J => pow_ne_zero J two_ne_zero) (tendsto_pow_atTop_atTop_of_one_lt one_lt_two) f + refine hlim.congr fun J => ?_ + symm + simp only [mixedBlock] + rw [convLp_finsetSum_kernel] + exact convLp_congr hp _ _ (sum_mixedPsi J) f + +/-! ### One-dimensional estimates in `L_1` -/ + +/-- The `L_1` norm of a convolution with `G` through the operator on `L_1`. -/ +theorem eLpNorm_conv_eq_enorm_convLp {K G : ℝ → ℂ} (hK : Integrable K) (hG : Integrable G) : + eLpNorm (conv K G volume) 1 volume = + ‖convLp ENNReal.one_ne_top hK ((memLp_one_iff_integrable.2 hG).toLp G)‖ₑ := by + rw [Lp.eNorm_def] + refine eLpNorm_congr_ae ?_ + exact ((convLp_apply_ae ENNReal.one_ne_top hK _).trans + (Filter.EventuallyEq.of_eq (conv_congr_ae (MemLp.coeFn_toLp _)))).symm + +/-- `1 ≤ 2^(3L) c(m, k)` for `m < k + 3`. -/ +theorem one_le_dyadicWeight_mul_almostDiagCoeff (L : ℕ) {m k : ℕ} (hmk : m < k + 3) : + 1 ≤ dyadicWeight L 3 * almostDiagCoeff L m k := by + rw [almostDiagCoeff] + split_ifs with hkm + · rw [mul_comm, ← ENNReal.dyadicWeight_neg_mul_self (L : ℝ) (m - k)] + exact mul_le_mul' le_rfl (ENNReal.dyadicWeight_mono (Nat.cast_nonneg L) (by omega)) + · rw [mul_one] + exact ENNReal.one_le_dyadicWeight (Nat.cast_nonneg L) 3 + +namespace LocalMeansBump + +variable (b : LocalMeansBump ℝ) + +/-- **Littlewood–Paley blocks against the dual kernels**: there is `C < ∞` with +`‖ψ_m ⋆ η_k‖_1 ≤ C c(m, k)`, `c(m, k) = 2^(-(m-k)L)` for `k ≤ m` and `1` for `k > m`. For +`k + 3 ≤ m`, `ψ_m` annihilates the band-limited Jackson approximant `J_{m-3} η_k`, and +`‖η_k - J_{m-3} η_k‖_1 ≤ C ω_L(η_k, 2^(-(m-3)))_1 ≤ C 2^(-(m-3-k)L)`. -/ +theorem exists_eLpNorm_conv_psi_dual_le (L : ℕ) : + ∃ C : ℝ≥0∞, C ≠ ∞ ∧ ∀ m k : ℕ, + eLpNorm (conv (psi (V := ℝ) m) (b.dual L k) volume) 1 volume ≤ + C * almostDiagCoeff L m k := by + have h1 : (1 : ℝ≥0∞) ≠ ∞ := ENNReal.one_ne_top + set Φ₁ := 2 * eLpNorm (lpKernel (V := ℝ)) 1 volume + set C₀ := Φ₁ * (2 * eLpNorm (momentKernel b.toFun L) 1 volume) + set C₁ := Φ₁ * (jacksonConst ℝ L 1 * b.dualConst L) + have hΦ₁ : Φ₁ ≠ ∞ := ENNReal.mul_ne_top (by norm_num) eLpNorm_lpKernel_ne_top + have hC₀ : C₀ ≠ ∞ := ENNReal.mul_ne_top hΦ₁ (ENNReal.mul_ne_top (by norm_num) + (eLpNorm_momentKernel_ne_top b.integrable L)) + have hC₁ : C₁ ≠ ∞ := ENNReal.mul_ne_top hΦ₁ (ENNReal.mul_ne_top + (jacksonConst_ne_top le_rfl h1 L) (b.dualConst_ne_top L)) + refine ⟨(C₀ + C₁) * dyadicWeight L 3, ENNReal.mul_ne_top (ENNReal.add_ne_top.2 ⟨hC₀, hC₁⟩) + (ENNReal.dyadicWeight_ne_top _ _), fun m k => ?_⟩ + have htriv : eLpNorm (conv (psi (V := ℝ) m) (b.dual L k) volume) 1 volume ≤ C₀ := + (eLpNorm_conv_le le_rfl h1 (integrable_psi m).aestronglyMeasurable + (b.integrable_dual L k).aestronglyMeasurable).trans + (mul_le_mul' (eLpNorm_psi_one_le m) (b.eLpNorm_dual_one_le L k)) + by_cases hkm : k + 3 ≤ m + · -- the Jackson approximant of `η_k` at the level `m - 3` + set η : Lp ℂ 1 (volume : Measure ℝ) := (memLp_one_iff_integrable.2 (b.integrable_dual L + k)).toLp _ + set P := jacksonApprox h1 L (m - 3) η + have hP : convLp h1 (integrable_psi (V := ℝ) m) P = 0 := by + have hmem : convLp h1 (integrable_Theta (V := ℝ) (m - 3)) P = P := + mem_bandSpace.1 (jacksonApprox_mem_bandSpace h1 L (m - 3) η) + rw [← hmem, convLp_convLp] + exact convLp_of_eq_zero h1 _ (conv_psi_Theta (by omega)) P + have hmod : lpModulus 1 L η (m - 3) ≤ b.dualConst L * almostDiagCoeff L (m - 3) k := by + rw [lpModulus, modulus_congr_ae (MemLp.coeFn_toLp _)] + exact iSup₂_le fun v hv => b.eLpNorm_higherDiff_dual_le L hv + have hc : almostDiagCoeff L (m - 3) k = almostDiagCoeff L m k * dyadicWeight L 3 := by + have hk : k ≤ m - 3 := by omega + have hk' : k ≤ m := by omega + simp only [almostDiagCoeff, hk, hk', ↓reduceIte] + rw [show m - k = (m - 3 - k) + 3 by omega, ENNReal.dyadicWeight_add_nat, mul_assoc, + ENNReal.dyadicWeight_neg_mul_self, mul_one] + rw [eLpNorm_conv_eq_enorm_convLp (integrable_psi m) (b.integrable_dual L k)] + have hsplit : convLp h1 (integrable_psi (V := ℝ) m) η = + convLp h1 (integrable_psi (V := ℝ) m) (η - P) := by + rw [map_sub, hP, sub_zero] + rw [hsplit] + calc ‖convLp h1 (integrable_psi (V := ℝ) m) (η - P)‖ₑ + ≤ eLpNorm (psi (V := ℝ) m) 1 volume * ‖η - P‖ₑ := enorm_convLp_le h1 _ _ + _ ≤ Φ₁ * (jacksonConst ℝ L 1 * lpModulus 1 L η (m - 3)) := + mul_le_mul' (eLpNorm_psi_one_le m) (enorm_sub_jacksonApprox_le h1 L (m - 3) η) + _ ≤ Φ₁ * (jacksonConst ℝ L 1 * (b.dualConst L * almostDiagCoeff L (m - 3) k)) := by + gcongr + _ = C₁ * (almostDiagCoeff L m k * dyadicWeight L 3) := by rw [hc]; ring + _ ≤ (C₀ + C₁) * dyadicWeight L 3 * almostDiagCoeff L m k := by + rw [mul_comm (almostDiagCoeff _ _ _), ← mul_assoc] + exact mul_le_mul' (mul_le_mul' le_add_self le_rfl) le_rfl + · calc eLpNorm (conv (psi (V := ℝ) m) (b.dual L k) volume) 1 volume + ≤ C₀ * (dyadicWeight L 3 * almostDiagCoeff L m k) := + htriv.trans (le_mul_of_one_le_right' (one_le_dyadicWeight_mul_almostDiagCoeff L + (by omega))) + _ ≤ (C₀ + C₁) * dyadicWeight L 3 * almostDiagCoeff L m k := by + rw [← mul_assoc] + exact mul_le_mul' (mul_le_mul' le_self_add le_rfl) le_rfl + +/-- **Local means kernels against the band-limiting kernels**: there is `C < ∞` with +`‖k_m ⋆ Θ_k‖_1 ≤ C c(m, k)`. For `k < m`, `‖k_m ⋆ Θ_k‖_1 ≤ C ω_L(Θ_k, 2^(1-m))_1` and the +differences of `Θ_k` give `2^(-(m-1-k)L)`. -/ +theorem exists_eLpNorm_conv_kernel_Theta_le (L : ℕ) : + ∃ C : ℝ≥0∞, C ≠ ∞ ∧ ∀ m k : ℕ, + eLpNorm (conv (b.kernel L m) (Theta (V := ℝ) k) volume) 1 volume ≤ + C * almostDiagCoeff L m k := by + have h1 : (1 : ℝ≥0∞) ≠ ∞ := ENNReal.one_ne_top + set C₀ := 2 * eLpNorm (momentKernel b.toFun L) 1 volume * eLpNorm (bandKernel (V := ℝ)) 1 volume + set D := ∫⁻ x, ‖iteratedFDeriv ℝ L (bandKernelS (V := ℝ) : ℝ → ℂ) x‖ₑ + set C₂ := 2 * (∫⁻ z, ‖b.toFun z‖ₑ) * ENNReal.ofReal (1 + b.radius) ^ L * (D * dyadicWeight L 1) + have hC₀ : C₀ ≠ ∞ := ENNReal.mul_ne_top (ENNReal.mul_ne_top (by norm_num) + (eLpNorm_momentKernel_ne_top b.integrable L)) + eLpNorm_bandKernel_ne_top + have hC₂ : C₂ ≠ ∞ := ENNReal.mul_ne_top (ENNReal.mul_ne_top (ENNReal.mul_ne_top (by norm_num) + b.integrable.2.ne) (ENNReal.pow_ne_top ENNReal.ofReal_ne_top)) + (ENNReal.mul_ne_top (lintegral_enorm_iteratedFDeriv_ne_top L _) + (ENNReal.dyadicWeight_ne_top _ _)) + refine ⟨C₀ + C₂, ENNReal.add_ne_top.2 ⟨hC₀, hC₂⟩, fun m k => ?_⟩ + by_cases hkm : k < m + · obtain ⟨j, rfl⟩ : ∃ j, m = j + 1 := ⟨m - 1, by omega⟩ + have hkj : k ≤ j := by omega + set Θ : Lp ℂ 1 (volume : Measure ℝ) := + (memLp_one_iff_integrable.2 (integrable_Theta (V := ℝ) k)).toLp _ + have hmod : lpModulus 1 L Θ j ≤ dyadicWeight (-(L : ℝ)) (j - k) * D := by + rw [lpModulus, modulus_congr_ae (MemLp.coeFn_toLp _)] + refine iSup₂_le fun v hv => ?_ + refine (eLpNorm_higherDiff_Theta_le L k v).trans (mul_le_mul' ?_ le_rfl) + rw [← ENNReal.rpow_natCast] + exact ENNReal.ofReal_two_pow_mul_rpow_le hkj hv (Nat.cast_nonneg L) + have hc : dyadicWeight (-(L : ℝ)) (j - k) = almostDiagCoeff L (j + 1) k * dyadicWeight L 1 := by + have hk' : k ≤ j + 1 := by omega + simp only [almostDiagCoeff, hk', ↓reduceIte] + rw [show j + 1 - k = (j - k) + 1 by omega, ENNReal.dyadicWeight_add_nat, mul_assoc, + ENNReal.dyadicWeight_neg_mul_self, mul_one] + rw [eLpNorm_conv_eq_enorm_convLp (b.integrable_kernel L (j + 1)) (integrable_Theta k)] + calc ‖convLp h1 (b.integrable_kernel L (j + 1)) Θ‖ₑ + ≤ 2 * (∫⁻ z, ‖b.toFun z‖ₑ) * ENNReal.ofReal (1 + b.radius) ^ L * lpModulus 1 L Θ j := + b.enorm_localMean_succ_le h1 L j Θ + _ ≤ 2 * (∫⁻ z, ‖b.toFun z‖ₑ) * ENNReal.ofReal (1 + b.radius) ^ L * + (dyadicWeight (-(L : ℝ)) (j - k) * D) := mul_le_mul' le_rfl hmod + _ = C₂ * almostDiagCoeff L (j + 1) k := by rw [hc]; ring + _ ≤ (C₀ + C₂) * almostDiagCoeff L (j + 1) k := mul_le_mul' le_add_self le_rfl + · have hc : almostDiagCoeff L m k = 1 := by + rw [almostDiagCoeff] + split_ifs with h + · rw [show m - k = 0 by omega, ENNReal.dyadicWeight_zero_right] + · rfl + rw [hc, mul_one] + refine (eLpNorm_conv_le le_rfl h1 (b.integrable_kernel L m).aestronglyMeasurable + (integrable_Theta k).aestronglyMeasurable).trans ?_ + rw [eLpNorm_Theta_one] + exact (mul_le_mul' (b.eLpNorm_kernel_one_le L m) le_rfl).trans le_self_add + +end LocalMeansBump + +/-! ### Littlewood–Paley blocks and mixed local means -/ + +namespace LocalMeansBump + +variable (b : LocalMeansBump ℝ) + +/-- One term of the comparison: `‖δ_m ⋆ η_k ⋆ h‖_p ≤ C^d ∏_i c(m_i, k_i) ‖h‖_p` if +`‖ψ_m ⋆ η_k‖_1 ≤ C c(m, k)` in one variable. -/ +theorem enorm_mixedBlock_convLp_mixedDual_le (hp : p ≠ ∞) (L : ℕ) {C : ℝ≥0∞} + (hC : ∀ m k : ℕ, eLpNorm (conv (psi (V := ℝ) m) (b.dual L k) volume) 1 volume ≤ + C * almostDiagCoeff L m k) + (m k : Fin d → ℕ) (h : Lp ℂ p (volume : Measure (Fin d → ℝ))) : + ‖mixedBlock hp m (convLp hp (b.integrable_mixedDual L k) h)‖ₑ ≤ + C ^ d * (∏ i, almostDiagCoeff L (m i) (k i)) * ‖h‖ₑ := by + rw [mixedBlock, convLp_convLp] + refine (enorm_convLp_le hp _ h).trans (mul_le_mul' ?_ le_rfl) + rw [mixedPsi, mixedDual, conv_tensorKernel, + eLpNorm_tensorKernel_one fun i => integrable_conv (integrable_psi _) (b.integrable_dual L _), + ← Fin.prod_const d C, ← Finset.prod_mul_distrib] + exact Finset.prod_le_prod fun i _ => hC (m i) (k i) + +/-- One term of the comparison: `‖k_m ⋆ δ_k ⋆ f‖_p ≤ C^d ∏_i c(m_i, k_i) ‖δ_k ⋆ f‖_p` if +`‖k_m ⋆ Θ_k‖_1 ≤ C c(m, k)` in one variable, since `δ_k = (⊗Θ_{k_i}) ⋆ δ_k`. -/ +theorem enorm_mixedLocalMean_mixedBlock_le (hp : p ≠ ∞) (L : ℕ) {C : ℝ≥0∞} + (hC : ∀ m k : ℕ, eLpNorm (conv (b.kernel L m) (Theta (V := ℝ) k) volume) 1 volume ≤ + C * almostDiagCoeff L m k) + (m k : Fin d → ℕ) (f : Lp ℂ p (volume : Measure (Fin d → ℝ))) : + ‖b.mixedLocalMean hp L m (mixedBlock hp k f)‖ₑ ≤ + C ^ d * (∏ i, almostDiagCoeff L (m i) (k i)) * ‖mixedBlock hp k f‖ₑ := by + have hΘ : mixedBlock hp k f = convLp hp (integrable_mixedTheta k) (mixedBlock hp k f) := by + rw [mixedBlock, convLp_convLp] + exact (convLp_congr hp _ _ (conv_mixedTheta_mixedPsi k) f).symm + conv_lhs => rw [hΘ, mixedLocalMean, convLp_convLp] + refine (enorm_convLp_le hp _ _).trans (mul_le_mul' ?_ le_rfl) + rw [mixedKernel, mixedTheta, conv_tensorKernel, + eLpNorm_tensorKernel_one fun i => integrable_conv (b.integrable_kernel L _) + (integrable_Theta _), + ← Fin.prod_const d C, ← Finset.prod_mul_distrib] + exact Finset.prod_le_prod fun i _ => hC (m i) (k i) + +/-- **Littlewood–Paley blocks are bounded by the mixed local means**: there is `C < ∞` with +`‖(2^(s|m|_1) ‖δ_m ⋆ f‖_p)_m‖_{ℓ_q} ≤ (C C_s)^d ‖(2^(s|k|_1) ‖k_k ⋆ f‖_p)_k‖_{ℓ_q}` for `0 ≤ s`, +`C_s` the constant of the almost diagonal lemma (`Rd.lqNorm_le_of_le_almostDiagonal_pi`). -/ +theorem exists_mixedLPNorm_le (hp : p ≠ ∞) {L : ℕ} (hL : 1 ≤ L) : + ∃ C : ℝ≥0∞, C ≠ ∞ ∧ ∀ {s : ℝ}, 0 ≤ s → ∀ {q : ℝ≥0∞}, 1 ≤ q → + ∀ f : Lp ℂ p (volume : Measure (Fin d → ℝ)), + mixedLPNorm hp s q f ≤ + (C * ENNReal.almostDiagonalConst s L) ^ d * b.mixedLocalMeansNorm hp L s q f := by + obtain ⟨C, hC, hE⟩ := b.exists_eLpNorm_conv_psi_dual_le L + refine ⟨C, hC, fun {s} hs {q} hq f => ?_⟩ + set h : (Fin d → ℕ) → Lp ℂ p (volume : Measure (Fin d → ℝ)) := fun k => b.mixedLocalMean hp L k f + have hblock : ∀ m, ‖mixedBlock hp m f‖ₑ ≤ + C ^ d * ∑' k, (∏ i, almostDiagCoeff L (m i) (k i)) * ‖h k‖ₑ := fun m => by + have hrep := ((mixedBlock hp m).continuous.tendsto f).comp + (b.tendsto_sum_mixedDual_mixedLocalMean hp hL f) + simp only [Function.comp_def, map_sum] at hrep + have h1 := ENNReal.le_tsum_of_tendsto_finsetSum (Q := fun x : Lp ℂ p (volume : Measure (Fin + d → ℝ)) => + ‖x‖ₑ) (C := 1) ENNReal.one_ne_top (fun x y => eNorm_add_le x y) (fun x => (one_mul _).ge) + hrep + refine h1.trans ?_ + rw [← ENNReal.tsum_mul_left] + refine tsum_le_tsum fun k => ?_ + rw [← mul_assoc] + exact b.enorm_mixedBlock_convLp_mixedDual_le hp L hE m k (h k) + exact lqNorm_le_of_le_almostDiagonal_pi hq hs hblock + +/-- **The mixed local means are bounded by the Littlewood–Paley blocks**: there is `C < ∞` with +`‖(2^(s|m|_1) ‖k_m ⋆ f‖_p)_m‖_{ℓ_q} ≤ (C C_s)^d ‖(2^(s|k|_1) ‖δ_k ⋆ f‖_p)_k‖_{ℓ_q}` for `0 ≤ s` +(`Rd.lqNorm_le_of_le_almostDiagonal_pi`). -/ +theorem exists_mixedLocalMeansNorm_le (hp : p ≠ ∞) (L : ℕ) : + ∃ C : ℝ≥0∞, C ≠ ∞ ∧ ∀ {s : ℝ}, 0 ≤ s → ∀ {q : ℝ≥0∞}, 1 ≤ q → + ∀ f : Lp ℂ p (volume : Measure (Fin d → ℝ)), + b.mixedLocalMeansNorm hp L s q f ≤ + (C * ENNReal.almostDiagonalConst s L) ^ d * mixedLPNorm hp s q f := by + obtain ⟨C, hC, hE⟩ := b.exists_eLpNorm_conv_kernel_Theta_le L + refine ⟨C, hC, fun {s} hs {q} hq f => ?_⟩ + set h : (Fin d → ℕ) → Lp ℂ p (volume : Measure (Fin d → ℝ)) := fun k => mixedBlock hp k f + have hmean : ∀ m, ‖b.mixedLocalMean hp L m f‖ₑ ≤ + C ^ d * ∑' k, (∏ i, almostDiagCoeff L (m i) (k i)) * ‖h k‖ₑ := fun m => by + have hrep := ((b.mixedLocalMean hp L m).continuous.tendsto f).comp + (tendsto_sum_mixedBlock hp f) + simp only [Function.comp_def, map_sum] at hrep + have h1 := ENNReal.le_tsum_of_tendsto_finsetSum (Q := fun x : Lp ℂ p (volume : Measure (Fin + d → ℝ)) => + ‖x‖ₑ) (C := 1) ENNReal.one_ne_top (fun x y => eNorm_add_le x y) (fun x => (one_mul _).ge) + hrep + refine h1.trans ?_ + rw [← ENNReal.tsum_mul_left] + refine tsum_le_tsum fun k => ?_ + rw [← mul_assoc] + exact b.enorm_mixedLocalMean_mixedBlock_le hp L hE m k f + exact lqNorm_le_of_le_almostDiagonal_pi hq hs hmean + +end LocalMeansBump + +/-- **Littlewood–Paley blocks, local means and differences** (Vybíral; T. Ullrich): for +`1 ≤ p < ∞`, `0 < s < L` and `1 ≤ q ≤ ∞`, +`‖(2^(s|k|_1) Ω^{e(k)}_L(f, 2^(-k))_p)_k‖_{ℓ_q(ℕ^d)} < ∞` iff +`‖(2^(s|k|_1) ‖δ_k ⋆ f‖_p)_k‖_{ℓ_q(ℕ^d)} < ∞`, through the mixed local means of the centred bump of +radius `1`. -/ +theorem mixedBesov_iff_mixedLP (hp : p ≠ ∞) {L : ℕ} (hL : 1 ≤ L) {s : ℝ} (hs : 0 < s) + (hsL : s < L) {q : ℝ≥0∞} (hq : 1 ≤ q) (f : Lp ℂ p (volume : Measure (Fin d → ℝ))) : + mixedModNorm p L s q f < ∞ ↔ mixedLPNorm hp s q f < ∞ := by + set b := LocalMeansBump.centered (V := ℝ) one_pos + have hR : b.radius ≤ 1 := (LocalMeansBump.centered_radius (V := ℝ) one_pos).le + rw [b.mixedBesov_iff_mixedLocalMeans hp hL hR hs hsL hq f] + obtain ⟨C₁, hC₁, h1⟩ := b.exists_mixedLPNorm_le (d := d) hp hL + obtain ⟨C₂, hC₂, h2⟩ := b.exists_mixedLocalMeansNorm_le (d := d) hp L + have hA := ENNReal.almostDiagonalConst_ne_top hs hsL + constructor + · intro h + exact (h1 hs.le hq f).trans_lt (ENNReal.mul_lt_top + (ENNReal.pow_lt_top (ENNReal.mul_lt_top hC₁.lt_top hA.lt_top)) h) + · intro h + exact (h2 hs.le hq f).trans_lt (ENNReal.mul_lt_top + (ENNReal.pow_lt_top (ENNReal.mul_lt_top hC₂.lt_top hA.lt_top)) h) + +end Rd diff --git a/LeanPool/FunctionSpaces/Rd/MixedSmoothness/MixedLocalMeans.lean b/LeanPool/FunctionSpaces/Rd/MixedSmoothness/MixedLocalMeans.lean new file mode 100644 index 0000000000..6e17ad2425 --- /dev/null +++ b/LeanPool/FunctionSpaces/Rd/MixedSmoothness/MixedLocalMeans.lean @@ -0,0 +1,552 @@ +/- +Copyright (c) 2026 Mario Ullrich. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Mario Ullrich +-/ +module + +public import LeanPool.FunctionSpaces.Rd.MixedSmoothness.MixedAveragedDifferences +public import LeanPool.FunctionSpaces.Rd.LocalMeans.LocalMeans + +/- +Modified for Lean Pool: module names and imports adapted. +-/ + +/-! +# Mixed local means + +Let `b` be a bump for local means on `ℝ` (`Rd.LocalMeansBump ℝ`) with the kernels `k_j` and the dual +kernels `η_j` of `FunctionSpaces.Rd.LocalMeans.LocalMeans`. On `ℝ^d = Fin d → ℝ` the **mixed local +means** of `f ∈ L_p` are `k_k ⋆ f` with the tensor kernels `k_k = ⊗_i k_{k_i}`, `k ∈ ℕ^d` +(`Rd.LocalMeansBump.mixedKernel`, `Rd.LocalMeansBump.mixedLocalMean`), and the **mixed local means +quasi-norm** is `‖(2^(s|k|_1) ‖k_k ⋆ f‖_p)_{k ∈ ℕ^d}‖_{ℓ_q(ℕ^d)}` +(`Rd.LocalMeansBump.mixedLocalMeansNorm`). + +**Local means are bounded by the mixed modulus** (`Rd.LocalMeansBump.enorm_mixedLocalMean_le`): +if the bump vanishes outside `[-1, 1]`, then +`‖k_k ⋆ f‖_p ≤ (‖g‖_1 (2^L + 1))^d Ω^{e(k)}_L(f, 2^(-k))_p`. In one variable +`k_j = ∑_l a_l (g_{2^j/(l+1)} - g_{2^j/(2(l+1))})` for `j ≥ 1` and `k_0 = ∑_l a_l g_{1/(l+1)}` +(`Rd.LocalMeansBump.kernel_eq_sum_dilate`), with the polynomials `P(Y) - P(Y²)` and `P(Y)` in the +translation `Y = δ_{-z/2^j}`, `P(Y) = 1 - (-1)^L (Y - 1)^L`. Since +`P(Y) - P(Y²) = (Y - 1)^L (-1)^L ((Y + 1)^L - 1)`, the tensor kernel averages the mixed differences +`Δ^{L,e(k)}_h f` with steps `|h_i| ≤ 2^(-k_i)` (`Rd.conv_tensorKernel_sum_dilate_ae`), and +Minkowski's inequality (`MeasureTheory.eLpNorm_integral_kernel_le`) gives the bound. +-/ + +@[expose] public section + +open MeasureTheory Filter Topology +open TranslationAlgebra (coordElem diffAct) +open scoped ENNReal + +open ENNReal (dyadicWeight lqNorm) + +namespace Rd + +/-! ### Convolution, dilation and sums of kernels -/ + +section Helpers + +variable {V : Type*} [NormedAddCommGroup V] [NormedSpace ℝ V] [FiniteDimensional ℝ V] + [MeasurableSpace V] [BorelSpace V] {μ : Measure V} [μ.IsAddHaarMeasure] + +/-- **Dilations commute with convolution**: `A_c ⋆ B_c = (A ⋆ B)_c` for `c > 0`. -/ +theorem conv_dilate_dilate (A B : V → ℂ) {c : ℝ} (hc : 0 < c) : + conv (dilate c A) (dilate c B) μ = dilate c (conv A B μ) := by + funext x + rw [conv_dilate_apply _ _ hc, dilate, conv_apply, ← integral_const_mul] + congr 1 + funext z + simp only [dilate, smul_sub, smul_inv_smul₀ hc.ne'] + ring + +variable {p : ℝ≥0∞} [Fact (1 ≤ p)] + +/-- Convolution operators with equal kernels are equal. -/ +theorem convLp_congr (hp : p ≠ ∞) {K K' : V → ℂ} (hK : Integrable K μ) (hK' : Integrable K' μ) + (h : K = K') (f : Lp ℂ p μ) : convLp hp hK f = convLp hp hK' f := by + subst h + rfl + +/-- **Convolution is linear in the kernel**: `∑_i K_i ⋆ f = (∑_i K_i) ⋆ f` on `L_p`. -/ +theorem convLp_finsetSum_kernel (hp : p ≠ ∞) {ι : Type*} (s : Finset ι) {K : ι → V → ℂ} + (hK : ∀ i, Integrable (K i) μ) (f : Lp ℂ p μ) : + ∑ i ∈ s, convLp hp (hK i) f = convLp hp (integrable_finsetSum s fun i _ => hK i) f := by + classical + induction s using Finset.induction_on with + | empty => + rw [Finset.sum_empty] + exact (convLp_of_eq_zero hp _ (by funext a; simp) f).symm + | insert i s hi ih => + rw [Finset.sum_insert hi, ih, + ← convLp_add_kernel hp (hK i) (integrable_finsetSum s fun i _ => hK i)] + exact convLp_congr hp _ _ (by funext a; simp [Finset.sum_insert hi]) f + +/-- `(A + B) ⋆ (A - B) = A ⋆ A - B ⋆ B` for continuous kernels with compact support. -/ +theorem conv_add_conv_sub {A B : ℝ → ℂ} (hA : Continuous A) (hAc : HasCompactSupport A) + (hB : Continuous B) (hBc : HasCompactSupport B) : + conv (A + B) (A - B) volume = conv A A volume - conv B B volume := by + have hex : ∀ {F G : ℝ → ℂ}, Continuous F → HasCompactSupport F → Continuous G → + ConvolutionExists F G (ContinuousLinearMap.mul ℂ ℂ) volume := fun hF hFc hG => + hFc.convolutionExists_left _ hF hG.locallyIntegrable + have hsub : A - B = A + (-1 : ℂ) • B := by + funext x + simp [sub_eq_add_neg] + have h1 : conv (A + B) (A - B) volume = conv A (A - B) volume + conv B (A - B) volume := + ConvolutionExists.add_distrib (hex hA hAc (hA.sub hB)) (hex hB hBc (hA.sub hB)) + have h2 : ∀ F : ℝ → ℂ, Continuous F → HasCompactSupport F → + conv F (A - B) volume = conv F A volume - conv F B volume := fun F hF hFc => by + have h := ConvolutionExists.distrib_add (hex hF hFc hA) (hex hF hFc (hB.const_smul (-1 : ℂ))) + have h' : conv F (A + (-1 : ℂ) • B) volume = conv F A volume + conv F ((-1 : ℂ) • B) volume := + h + rw [hsub, h', conv_smul, neg_one_smul, sub_eq_add_neg] + rw [h1, h2 A hA hAc, h2 B hB hBc, conv_comm B A] + abel + +end Helpers + +namespace LocalMeansBump + +variable {d : ℕ} (b : LocalMeansBump ℝ) + +/-! ### Mixed kernels -/ + +/-- The **mixed local means kernels** `k_k = ⊗_i k_{k_i}`. -/ +noncomputable def mixedKernel (L : ℕ) (k : Fin d → ℕ) : (Fin d → ℝ) → ℂ := + tensorKernel fun i => b.kernel L (k i) + +/-- The **mixed dual kernels** `η_k = ⊗_i η_{k_i}`. -/ +noncomputable def mixedDual (L : ℕ) (k : Fin d → ℕ) : (Fin d → ℝ) → ℂ := + tensorKernel fun i => b.dual L (k i) + +/-- The mixed kernels are integrable. -/ +theorem integrable_mixedKernel (L : ℕ) (k : Fin d → ℕ) : Integrable (b.mixedKernel L k) := + integrable_tensorKernel fun i => b.integrable_kernel L (k i) + +/-- The mixed dual kernels are integrable. -/ +theorem integrable_mixedDual (L : ℕ) (k : Fin d → ℕ) : Integrable (b.mixedDual L k) := + integrable_tensorKernel fun i => b.integrable_dual L (k i) + +variable {p : ℝ≥0∞} [Fact (1 ≤ p)] + +/-- The **mixed local means** `f ↦ k_k ⋆ f` on `L_p(ℝ^d)`. -/ +noncomputable def mixedLocalMean (hp : p ≠ ∞) (L : ℕ) (k : Fin d → ℕ) : + Lp ℂ p (volume : Measure (Fin d → ℝ)) →L[ℂ] Lp ℂ p (volume : Measure (Fin d → ℝ)) := + convLp hp (b.integrable_mixedKernel L k) + +/-- The **mixed local means quasi-norm** `‖(2^(s|k|_1) ‖k_k ⋆ f‖_p)_{k ∈ ℕ^d}‖_{ℓ_q(ℕ^d)}`. -/ +noncomputable def mixedLocalMeansNorm (hp : p ≠ ∞) (L : ℕ) (s : ℝ) (q : ℝ≥0∞) + (f : Lp ℂ p (volume : Measure (Fin d → ℝ))) : ℝ≥0∞ := + lqNorm q fun k => mixedWeight s k * ‖b.mixedLocalMean hp L k f‖ₑ + +/-! ### The local means kernels as sums of dilated bumps -/ + +/-- The exponents of the local means kernels: `l + 1` and `2(l + 1)`. -/ +def lmExp : Bool × ℕ → ℕ + | (true, l) => l + 1 + | (false, l) => 2 * (l + 1) + +/-- The coefficients of the local means kernel `k_j`: `a_l` at `Y^(l+1)`, and `-a_l` at +`Y^(2(l+1))` for `j ≥ 1`, with the coefficients `a_l = (-1)^l C(L, l + 1)` of the moment +kernels. -/ +noncomputable def lmCoeff (L j : ℕ) : Bool × ℕ → ℂ + | (true, l) => jacksonCoeff L l + | (false, l) => if j = 0 then 0 else -jacksonCoeff L l + +/-- The exponents are at least `1`. -/ +theorem one_le_lmExp (t : Bool × ℕ) : 1 ≤ lmExp t := by + rcases t with ⟨_ | _, l⟩ + · change 1 ≤ 2 * (l + 1) + omega + · change 1 ≤ l + 1 + omega + +/-- **The local means kernels are sums of dilated bumps**: +`k_j = ∑_l a_l (g_{2^j/(l+1)} - g_{2^j/(2(l+1))})` for `j ≥ 1` and `k_0 = ∑_l a_l g_{1/(l+1)}`. -/ +theorem kernel_eq_sum_dilate (L j : ℕ) : + b.kernel L j = ∑ t ∈ Finset.univ ×ˢ Finset.range L, + lmCoeff L j t • dilate ((2 : ℝ) ^ j / lmExp t) b.toFun := by + rw [Finset.sum_product, Fintype.sum_bool] + funext x + simp only [Finset.sum_apply, Pi.add_apply, Pi.smul_apply, smul_eq_mul, lmCoeff, lmExp] + cases j with + | zero => + simp only [↓reduceIte, zero_mul, Finset.sum_const_zero, add_zero] + change b.scaled L 0 x = _ + rw [scaled, dilate_momentKernel] + refine Finset.sum_congr rfl fun l _ => ?_ + push_cast + ring_nf + | succ j => + change (b.scaled L (j + 1) - b.scaled L j) x = _ + rw [Pi.sub_apply, scaled, scaled, dilate_momentKernel, dilate_momentKernel, + sub_eq_add_neg, ← Finset.sum_neg_distrib] + simp only [Nat.add_one_ne_zero, ↓reduceIte] + congr 1 + · refine Finset.sum_congr rfl fun l _ => ?_ + push_cast + ring_nf + · refine Finset.sum_congr rfl fun l _ => ?_ + have h : (2 : ℝ) ^ (j + 1) / ((2 * (l + 1) : ℕ) : ℝ) = 2 ^ j / ((l : ℝ) + 1) := by + push_cast + rw [pow_succ] + field_simp + rw [h] + ring + +/-! ### Local means are bounded by the mixed modulus -/ + +/-- **The polynomial of one coordinate factors through a difference**: for `j ≥ 1`, +`∑_t c_j(t) Y^{ν(t)} = (Y - 1)^L (-1)^L ((Y + 1)^L - 1)`, and for `j = 0` it is `P(Y)`. -/ +theorem sum_lmCoeff_smul_pow {A : Type*} [CommRing A] [Algebra ℂ A] (L j : ℕ) (Y : A) : + ∑ t ∈ Finset.univ ×ˢ Finset.range L, lmCoeff L j t • Y ^ lmExp t = + if j = 0 then 1 - (-1) ^ L * (Y - 1) ^ L + else (Y - 1) ^ L * ((-1) ^ L * ((Y + 1) ^ L - 1)) := by + rw [Finset.sum_product, Fintype.sum_bool] + simp only [lmCoeff, lmExp] + have hP := sum_jacksonCoeff_smul_pow L Y + have hP2 := sum_jacksonCoeff_smul_pow L (Y ^ 2) + simp_rw [← pow_mul] at hP2 + by_cases hj : j = 0 + · simp only [hj, ↓reduceIte, zero_smul, Finset.sum_const_zero, add_zero] + exact hP + · simp only [hj, ↓reduceIte, neg_smul, Finset.sum_neg_distrib] + rw [hP, hP2, show Y ^ 2 - 1 = (Y - 1) * (Y + 1) by ring, mul_pow] + ring + +/-- The **remaining polynomial** of the mixed local means at the steps `w`: +`∏_i b_i(δ_{w_i e_i})` with `b(Y) = 1 - (-1)^L (Y - 1)^L` in the coordinates with `k_i = 0` and +`b(Y) = (-1)^L ((Y + 1)^L - 1)` in the others. -/ +noncomputable def lmRemainder (L : ℕ) (k : Fin d → ℕ) (w : Fin d → ℝ) : + AddMonoidAlgebra ℂ (Fin d → ℝ) := + ∏ i, if k i = 0 then + 1 - (-1) ^ L * (AddMonoidAlgebra.single (Pi.single i (w i)) (1 : ℂ) - 1) ^ L + else (-1) ^ L * ((AddMonoidAlgebra.single (Pi.single i (w i)) (1 : ℂ) + 1) ^ L - 1) + +/-- **The polynomial of the mixed local means factors through the mixed difference**: +`∏_i ∑_t c_{k_i}(t) δ_{w_i e_i}^{ν(t)} = B ∏_{i ∈ e(k)} (δ_{w_i e_i} - 1)^L` with the remaining +polynomial `B` (`Rd.LocalMeansBump.sum_lmCoeff_smul_pow` in each coordinate). -/ +theorem prod_sum_lmCoeff_eq (L : ℕ) (k : Fin d → ℕ) (w : Fin d → ℝ) : + ∏ i, ∑ t ∈ Finset.univ ×ˢ Finset.range L, lmCoeff L (k i) t • + AddMonoidAlgebra.single (Pi.single i (w i)) (1 : ℂ) ^ lmExp t = + lmRemainder L k w * ∏ i ∈ mixedSupp k, coordElem w i ^ L := by + have hfac : ∀ i, ∑ t ∈ Finset.univ ×ˢ Finset.range L, lmCoeff L (k i) t • + AddMonoidAlgebra.single (Pi.single i (w i)) (1 : ℂ) ^ lmExp t = + (if k i = 0 then + 1 - (-1) ^ L * (AddMonoidAlgebra.single (Pi.single i (w i)) (1 : ℂ) - 1) ^ L + else (-1) ^ L * ((AddMonoidAlgebra.single (Pi.single i (w i)) (1 : ℂ) + 1) ^ L - 1)) * + (if k i = 0 then 1 else coordElem w i ^ L) := fun i => by + rw [sum_lmCoeff_smul_pow] + by_cases hk : k i = 0 + · simp [hk] + · simp only [hk, ↓reduceIte, coordElem] + ring + rw [Finset.prod_congr rfl fun i _ => hfac i, Finset.prod_mul_distrib, lmRemainder] + congr 1 + rw [Finset.prod_ite, Finset.prod_const_one, one_mul] + rfl + +/-- **The remaining polynomial acts boundedly**: it acts on `L_p` with norm at most `(2^L + 1)^d` +(`Rd.actsBounded_momentPoly`, `Rd.actsBounded_addPoly`). -/ +theorem actsBounded_lmRemainder (L : ℕ) (k : Fin d → ℕ) (w : Fin d → ℝ) : + ActsBounded p (lmRemainder L k w) ((2 ^ L + 1) ^ d) := by + have hp1 : 1 ≤ p := Fact.out + have h := ActsBounded.prod (p := p) (Finset.univ : Finset (Fin d)) + (a := fun i => if k i = 0 then + 1 - (-1) ^ L * (AddMonoidAlgebra.single (Pi.single i (w i)) (1 : ℂ) - 1) ^ L + else (-1) ^ L * ((AddMonoidAlgebra.single (Pi.single i (w i)) (1 : ℂ) + 1) ^ L - 1)) + (C := fun _ => (2 : ℝ≥0∞) ^ L + 1) fun i _ => by + by_cases hk : k i = 0 + · simp only [hk, ↓reduceIte] + exact (actsBounded_momentPoly hp1 L _).mono (add_comm _ _).le + · simp only [hk, ↓reduceIte] + exact actsBounded_addPoly hp1 L _ + rwa [Finset.prod_const, Finset.card_univ, Fintype.card_fin] at h + +/-- **Mixed local means average translates**: for almost every `x`, +`k_k ⋆ f(x) = ∫ (⊗g)(z) A(z) f(x) dz` with the polynomial +`A(z) = ∏_i ∑_t c_{k_i}(t) δ_{-z_i 2^(-k_i) e_i}^{ν(t)}` in the translations +(`Rd.LocalMeansBump.kernel_eq_sum_dilate`, `Rd.conv_tensorKernel_sum_dilate_ae`). -/ +theorem mixedLocalMean_ae_eq (hp : p ≠ ∞) (L : ℕ) (k : Fin d → ℕ) + (f : Lp ℂ p (volume : Measure (Fin d → ℝ))) : + (b.mixedLocalMean hp L k f : (Fin d → ℝ) → ℂ) =ᵐ[volume] fun x => + ∫ z, tensorKernel (fun _ => b.toFun) z * + diffAct (∏ i, ∑ t ∈ Finset.univ ×ˢ Finset.range L, lmCoeff L (k i) t • + AddMonoidAlgebra.single (Pi.single i (-z i / 2 ^ k i)) (1 : ℂ) ^ lmExp t) + (f : (Fin d → ℝ) → ℂ) x := by + have hp1 : 1 ≤ p := Fact.out + have hc : ∀ i, (0 : ℝ) < 2 ^ k i := fun i => by positivity + have hkernel : b.mixedKernel L k = tensorKernel fun i => + ∑ t ∈ Finset.univ ×ˢ Finset.range L, + lmCoeff L (k i) t • dilate ((2 : ℝ) ^ k i / lmExp t) b.toFun := by + simp only [mixedKernel] + congr 1 + funext i + exact b.kernel_eq_sum_dilate L (k i) + have h1 := convLp_apply_ae hp (b.integrable_mixedKernel L k) f + have h2 := conv_tensorKernel_sum_dilate_ae hp1 hp b.integrable (Finset.univ ×ˢ Finset.range L) + lmExp (fun t _ => one_le_lmExp t) (fun i => lmCoeff L (k i)) hc (Lp.memLp f) + rw [← hkernel] at h2 + exact h1.trans h2 + +/-- **Mixed local means are bounded by the mixed modulus**: if the bump `g` vanishes outside +`[-1, 1]`, then `‖k_k ⋆ f‖_p ≤ (‖g‖_1 (2^L + 1))^d Ω^{e(k)}_L(f, 2^(-k))_p`. The tensor kernel +averages `B(z) Δ^{L,e(k)}_{h(z)} f` with `h(z)_i = -z_i/2^(k_i)` over `(⊗g)(z) dz` +(`Rd.LocalMeansBump.mixedLocalMean_ae_eq`, `Rd.LocalMeansBump.prod_sum_lmCoeff_eq`), where the +remaining polynomials `B(z)` act with norm at most `(2^L + 1)^d` +(`Rd.LocalMeansBump.actsBounded_lmRemainder`). -/ +theorem enorm_mixedLocalMean_le (hp : p ≠ ∞) (L : ℕ) (hR : b.radius ≤ 1) (k : Fin d → ℕ) + (f : Lp ℂ p (volume : Measure (Fin d → ℝ))) : + ‖b.mixedLocalMean hp L k f‖ₑ ≤ + ((∫⁻ t, ‖b.toFun t‖ₑ) * (2 ^ L + 1)) ^ d * lpMixedModulus p L f k := by + have hp1 : 1 ≤ p := Fact.out + set e := mixedSupp k + set h : (Fin d → ℝ) → Fin d → ℝ := fun z i => -z i / 2 ^ k i + set G : (Fin d → ℝ) → (Fin d → ℝ) → ℂ := fun x z => + diffAct (∏ i, ∑ t ∈ Finset.univ ×ˢ Finset.range L, lmCoeff L (k i) t • + AddMonoidAlgebra.single (Pi.single i (h z i)) (1 : ℂ) ^ lmExp t) + (f : (Fin d → ℝ) → ℂ) x + set Φ : (Fin d → ℝ) → ℂ := tensorKernel fun _ => b.toFun + set ω := lpMixedModulus p L f k + -- the translates are jointly measurable + have hfm : Measurable (f : (Fin d → ℝ) → ℂ) := (Lp.stronglyMeasurable f).measurable + have hG : Measurable (Function.uncurry G) := by + have heq : Function.uncurry G = fun q : (Fin d → ℝ) × (Fin d → ℝ) => + ∑ n ∈ Fintype.piFinset (fun _ => Finset.univ ×ˢ Finset.range L), + (∏ i, lmCoeff L (k i) (n i)) * + (f : (Fin d → ℝ) → ℂ) (q.1 + fun i => (lmExp (n i) : ℝ) * (-q.2 i / 2 ^ k i)) := by + funext q + exact diffAct_prod_sum_pow_apply (Finset.univ ×ˢ Finset.range L) lmExp + (fun i => lmCoeff L (k i)) (fun i => -q.2 i / 2 ^ k i) _ q.1 + rw [heq] + refine Finset.measurable_sum _ fun n _ => measurable_const.mul (hfm.comp ?_) + exact measurable_fst.add (measurable_pi_iff.2 fun i => measurable_const.mul + (((measurable_pi_apply i).comp measurable_snd).neg.div_const _)) + -- the bound on the support of the weight + have hbound : ∀ z, Φ z ≠ 0 → + eLpNorm (fun x => G x z) p volume ≤ (2 ^ L + 1) ^ d * ω := fun z hz => by + have hzR : ∀ i, |z i| ≤ 1 := fun i => by + have hgi : b.toFun (z i) ≠ 0 := fun h0 => + hz (Finset.prod_eq_zero (Finset.mem_univ i) h0) + have := not_lt.1 fun hlt => hgi (b.eq_zero (z i) hlt) + exact (Real.norm_eq_abs _ ▸ this).trans hR + have hsteps : ∀ i ∈ e, |h z i| ≤ 1 / 2 ^ k i := fun i _ => by + simp only [h, abs_div, abs_neg, abs_of_pos (by positivity : (0 : ℝ) < 2 ^ k i)] + exact div_le_div_of_nonneg_right (hzR i) (by positivity) + have hGz : (fun x => G x z) = + diffAct (lmRemainder L k (h z)) (mixedDiff L e (h z) (f : (Fin d → ℝ) → ℂ)) := by + funext x + simp only [G] + rw [prod_sum_lmCoeff_eq, map_mul, mul_apply_eq_comp] + rfl + rw [hGz] + refine ((actsBounded_lmRemainder L k (h z)) _ (aestronglyMeasurable_mixedDiff + (Lp.aestronglyMeasurable f) L e (h z))).2.trans (mul_le_mul' le_rfl ?_) + exact eLpNorm_mixedDiff_le_mixedModulus hsteps + -- Minkowski's inequality + have hA₀ : ∫⁻ z, ‖Φ z‖ₑ = (∫⁻ t, ‖b.toFun t‖ₑ) ^ d := by + simp only [Φ] + rw [lintegral_enorm_tensorKernel fun _ => b.integrable, Finset.prod_const, Finset.card_univ, + Fintype.card_fin] + have hg0 : (∫⁻ t, ‖b.toFun t‖ₑ) ≠ 0 := + lintegral_enorm_ne_zero_of_integral_eq_one b.integrable b.integral_eq_one + rw [Lp.eNorm_def, eLpNorm_congr_ae (b.mixedLocalMean_ae_eq hp L k f)] + refine (eLpNorm_integral_kernel_le_of_bound hp1 hp + (integrable_tensorKernel fun _ => b.integrable).aestronglyMeasurable + (by rw [hA₀]; exact pow_ne_zero _ hg0) (by rw [hA₀]; exact ENNReal.pow_ne_top b.integrable.2.ne) + hG hbound).trans_eq ?_ + rw [hA₀, mul_pow, mul_assoc] + +/-- **Local means quasi-norm and differences**: +`‖(2^(s|k|_1) ‖k_k ⋆ f‖_p)_k‖_{ℓ_q} ≤ (‖g‖_1 (2^L + 1))^d ‖(2^(s|k|_1) Ω^{e(k)}_L(f, +2^(-k))_p)_k‖_{ℓ_q}` +for a bump vanishing outside `[-1, 1]`. -/ +theorem mixedLocalMeansNorm_le (hp : p ≠ ∞) (L : ℕ) (hR : b.radius ≤ 1) (s : ℝ) (q : ℝ≥0∞) + (f : Lp ℂ p (volume : Measure (Fin d → ℝ))) : + b.mixedLocalMeansNorm hp L s q f ≤ + ((∫⁻ t, ‖b.toFun t‖ₑ) * (2 ^ L + 1)) ^ d * mixedModNorm p L s q f := by + rw [mixedModNorm, ← ENNReal.lqNorm_const_mul] + refine ENNReal.lqNorm_mono fun k => ?_ + calc mixedWeight s k * ‖b.mixedLocalMean hp L k f‖ₑ + ≤ mixedWeight s k * (((∫⁻ t, ‖b.toFun t‖ₑ) * (2 ^ L + 1)) ^ d * lpMixedModulus p L f k) := + mul_le_mul' le_rfl (b.enorm_mixedLocalMean_le hp L hR k f) + _ = ((∫⁻ t, ‖b.toFun t‖ₑ) * (2 ^ L + 1)) ^ d * (mixedWeight s k * lpMixedModulus p L f k) := by + ring + +/-! ### The reproducing formula -/ + +/-- **The reproducing identity of the kernels** in one variable: +`∑_{j ≤ J} η_j ⋆ k_j = m_{2^J} ⋆ m_{2^J}` at every point, from `(a + b) ⋆ (a - b) = a ⋆ a - b ⋆ b` +for the commuting kernels `a = m_{2^(j+1)}`, `b = m_{2^j}`. -/ +theorem sum_conv_dual_kernel (L J : ℕ) : + ∑ j ∈ Finset.range (J + 1), conv (b.dual L j) (b.kernel L j) volume = + conv (b.scaled L J) (b.scaled L J) volume := by + induction J with + | zero => + rw [Finset.sum_range_one] + rfl + | succ J ih => + rw [Finset.sum_range_succ, ih] + change conv (b.scaled L J) (b.scaled L J) volume + + conv (b.scaled L (J + 1) + b.scaled L J) (b.scaled L (J + 1) - b.scaled L J) volume = _ + rw [conv_add_conv_sub (b.continuous_scaled L (J + 1)) (b.hasCompactSupport_scaled L (J + 1)) + (b.continuous_scaled L J) (b.hasCompactSupport_scaled L J)] + abel + +/-- **The mixed reproducing identity of the kernels**: over the boxes `{k : k_i ≤ J}`, +`∑_k η_k ⋆ k_k = (⊗(m ⋆ m))_{2^J}`. -/ +theorem sum_conv_mixedDual_mixedKernel (L J : ℕ) : + ∑ k ∈ Fintype.piFinset (fun _ : Fin d => Finset.range (J + 1)), + conv (b.mixedDual L k) (b.mixedKernel L k) volume = + dilate ((2 : ℝ) ^ J) + (tensorKernel fun _ : Fin d => conv (momentKernel b.toFun L) (momentKernel b.toFun L) + volume) := by + simp only [mixedDual, mixedKernel, conv_tensorKernel] + rw [sum_tensorKernel_piFinset (fun _ => Finset.range (J + 1)) + (fun _ j => conv (b.dual L j) (b.kernel L j) volume), dilate_tensorKernel] + congr 1 + funext i + rw [b.sum_conv_dual_kernel L J, scaled, conv_dilate_dilate _ _ (by positivity)] + +/-- The convolution `m ⋆ m` of the moment kernel has integral `1`. -/ +theorem integral_conv_momentKernel {L : ℕ} (hL : 1 ≤ L) : + ∫ t, conv (momentKernel b.toFun L) (momentKernel b.toFun L) volume t = 1 := by + have hm := integrable_momentKernel b.integrable L + have h1 := integral_momentKernel b.integrable b.integral_eq_one hL + have h := integral_convolution (L := ContinuousLinearMap.mul ℂ ℂ) (μ := volume) (ν := volume) + hm hm + simp only [ContinuousLinearMap.mul_apply', h1, mul_one] at h + exact h + +/-- **The mixed reproducing formula**: `∑_{k ≤ J} η_k ⋆ k_k ⋆ f → f` in `L_p` over the boxes +`{k : k_i ≤ J}`, since the partial sums are `(⊗(m ⋆ m))_{2^J} ⋆ f`, an approximate identity. -/ +theorem tendsto_sum_mixedDual_mixedLocalMean (hp : p ≠ ∞) {L : ℕ} (hL : 1 ≤ L) + (f : Lp ℂ p (volume : Measure (Fin d → ℝ))) : + Tendsto (fun J => ∑ k ∈ Fintype.piFinset (fun _ : Fin d => Finset.range (J + 1)), + convLp hp (b.integrable_mixedDual L k) (b.mixedLocalMean hp L k f)) atTop (𝓝 f) := by + set Φ : (Fin d → ℝ) → ℂ := + tensorKernel fun _ : Fin d => conv (momentKernel b.toFun L) (momentKernel b.toFun L) volume + have hm := integrable_momentKernel b.integrable L + have hΦ : Integrable Φ := integrable_tensorKernel fun _ => integrable_conv hm hm + have hΦ1 : ∫ x, Φ x = 1 := by + rw [integral_tensorKernel] + simp [b.integral_conv_momentKernel hL] + have hlim := tendsto_convLp_dilate hp hΦ hΦ1 (c := fun J : ℕ => (2 : ℝ) ^ J) + (fun J => pow_ne_zero J two_ne_zero) (tendsto_pow_atTop_atTop_of_one_lt one_lt_two) f + refine hlim.congr fun J => ?_ + symm + simp only [mixedLocalMean] + simp_rw [convLp_convLp hp (b.integrable_mixedDual L _) (b.integrable_mixedKernel L _)] + rw [convLp_finsetSum_kernel] + have hker : (fun a => ∑ k ∈ Fintype.piFinset (fun _ : Fin d => Finset.range (J + 1)), + conv (b.mixedDual L k) (b.mixedKernel L k) volume a) = dilate ((2 : ℝ) ^ J) Φ := by + rw [← b.sum_conv_mixedDual_mixedKernel L J] + funext a + rw [Finset.sum_apply] + exact convLp_congr hp _ _ hker f + +/-! ### The mixed modulus is bounded by the local means -/ + +/-- **The mixed moduli of the reproducing terms**: +`Ω^{e(m)}_L(η_k ⋆ h, 2^(-m))_p ≤ C_η^d ∏_i c(m_i, k_i) ‖h‖_p`, by the differences of the +one-dimensional dual kernels in `L_1` (`Rd.LocalMeansBump.eLpNorm_higherDiff_dual_le`). -/ +theorem lpMixedModulus_convLp_mixedDual_le (hp : p ≠ ∞) (L : ℕ) (m k : Fin d → ℕ) + (h : Lp ℂ p (volume : Measure (Fin d → ℝ))) : + lpMixedModulus p L (convLp hp (b.integrable_mixedDual L k) h) m ≤ + b.dualConst L ^ d * (∏ i, almostDiagCoeff L (m i) (k i)) * ‖h‖ₑ := by + have hp1 : 1 ≤ p := Fact.out + refine iSup₂_le fun v hv => ?_ + set e := mixedSupp m + have hae := (mixedDiff_congr_ae (convLp_apply_ae hp (b.integrable_mixedDual L k) h) L e v).trans + (mixedDiff_conv_ae hp1 hp (b.integrable_mixedDual L k) (Lp.memLp h) L e v) + rw [eLpNorm_congr_ae hae] + have hfac : ∀ i, Integrable (if i ∈ e then (fwdDiff (v i))^[L] (b.dual L (k i)) + else b.dual L (k i)) := fun i => by + split_ifs + · exact integrable_higherDiff (b.integrable_dual L (k i)) L _ + · exact b.integrable_dual L (k i) + refine (eLpNorm_conv_le hp1 hp + (integrable_mixedDiff (b.integrable_mixedDual L k) L e v).aestronglyMeasurable + (Lp.aestronglyMeasurable h)).trans ?_ + rw [Lp.eNorm_def] + refine mul_le_mul' ?_ le_rfl + rw [mixedDual, mixedDiff_tensorKernel, eLpNorm_tensorKernel_one hfac, + ← Fin.prod_const d (b.dualConst L), ← Finset.prod_mul_distrib] + refine Finset.prod_le_prod fun i _ => ?_ + by_cases hi : i ∈ e + · simp only [hi, ↓reduceIte] + have hvi : ‖v i‖ ≤ 1 / 2 ^ m i := by + rw [Real.norm_eq_abs] + exact hv i hi + exact b.eLpNorm_higherDiff_dual_le L hvi + · simp only [hi, ↓reduceIte] + have hm0 : m i = 0 := by + by_contra h0 + exact hi (Finset.mem_filter.2 ⟨Finset.mem_univ i, h0⟩) + have hc : almostDiagCoeff L (m i) (k i) = 1 := by + rw [almostDiagCoeff, hm0] + split_ifs with hk + · rw [show k i = 0 by omega, Nat.sub_zero, ENNReal.dyadicWeight_zero_right] + · rfl + rw [hc, mul_one] + refine (b.eLpNorm_dual_one_le L (k i)).trans ?_ + rw [dualConst] + refine mul_le_mul' le_rfl ?_ + exact le_add_left (le_mul_of_one_le_left' (one_le_pow₀ one_le_two)) + +/-- **Synthesis with the mixed dual kernels**: if `F = ∑_k η_k ⋆ h_k` as the limit of the partial +sums over the boxes `{k : k_i ≤ J}`, then for `0 ≤ s`, +`‖(2^(s|m|_1) Ω^{e(m)}_L(F, 2^(-m))_p)_m‖_{ℓ_q} ≤ (C_η C)^d ‖(2^(s|k|_1) ‖h_k‖_p)_k‖_{ℓ_q}` with the +constant `C` of the almost diagonal lemma, finite for `0 < s < L` +(`Rd.lqNorm_le_of_le_almostDiagonal_pi`). -/ +theorem mixedModNorm_le_of_tendsto (hp : p ≠ ∞) (L : ℕ) {s : ℝ} (hs : 0 ≤ s) {q : ℝ≥0∞} + (hq : 1 ≤ q) {F : Lp ℂ p (volume : Measure (Fin d → ℝ))} + {h : (Fin d → ℕ) → Lp ℂ p (volume : Measure (Fin d → ℝ))} + (hrep : Tendsto (fun J => ∑ k ∈ Fintype.piFinset (fun _ : Fin d => Finset.range (J + 1)), + convLp hp (b.integrable_mixedDual L k) (h k)) atTop (𝓝 F)) : + mixedModNorm p L s q F ≤ (b.dualConst L * ENNReal.almostDiagonalConst s L) ^ d * + lqNorm q (fun k => mixedWeight s k * ‖h k‖ₑ) := by + have hmod : ∀ m, lpMixedModulus p L F m ≤ b.dualConst L ^ d * + ∑' k, (∏ i, almostDiagCoeff L (m i) (k i)) * ‖h k‖ₑ := fun m => by + have h1 : lpMixedModulus p L F m ≤ + ∑' k, lpMixedModulus p L (convLp hp (b.integrable_mixedDual L k) (h k)) m := + ENNReal.le_tsum_of_tendsto_finsetSum (C := 2 ^ (L * d)) (by simp) + (fun x y => lpMixedModulus_add_le L x y m) (fun x => lpMixedModulus_le L x m) hrep + refine h1.trans ?_ + rw [← ENNReal.tsum_mul_left] + refine tsum_le_tsum fun k => ?_ + rw [← mul_assoc] + exact b.lpMixedModulus_convLp_mixedDual_le hp L m k (h k) + exact lqNorm_le_of_le_almostDiagonal_pi hq hs hmod + +/-- **The mixed modulus is bounded by the mixed local means**: for `0 ≤ s`, +`‖(2^(s|m|_1) Ω^{e(m)}_L(f, 2^(-m))_p)_m‖_{ℓ_q} ≤ (C_η C)^d ‖(2^(s|k|_1) ‖k_k ⋆ f‖_p)_k‖_{ℓ_q}`, by +the mixed reproducing formula and the synthesis. -/ +theorem mixedModNorm_le_mixedLocalMeansNorm (hp : p ≠ ∞) {L : ℕ} (hL : 1 ≤ L) {s : ℝ} + (hs : 0 ≤ s) {q : ℝ≥0∞} (hq : 1 ≤ q) (f : Lp ℂ p (volume : Measure (Fin d → ℝ))) : + mixedModNorm p L s q f ≤ + (b.dualConst L * ENNReal.almostDiagonalConst s L) ^ d * b.mixedLocalMeansNorm hp L s q f := + b.mixedModNorm_le_of_tendsto hp L hs hq (b.tendsto_sum_mixedDual_mixedLocalMean hp hL f) + +/-- **Mixed local means and mixed differences** (T. Ullrich; Vybíral): for `1 ≤ p < ∞`, +`0 < s < L`, `1 ≤ q ≤ ∞` and a bump vanishing outside `[-1, 1]`, +`‖(2^(s|k|_1) Ω^{e(k)}_L(f, 2^(-k))_p)_k‖_{ℓ_q(ℕ^d)} < ∞` iff +`‖(2^(s|k|_1) ‖k_k ⋆ f‖_p)_k‖_{ℓ_q(ℕ^d)} < ∞`, with equivalent quasi-norms. -/ +theorem mixedBesov_iff_mixedLocalMeans (hp : p ≠ ∞) {L : ℕ} (hL : 1 ≤ L) (hR : b.radius ≤ 1) + {s : ℝ} (hs : 0 < s) (hsL : s < L) {q : ℝ≥0∞} (hq : 1 ≤ q) + (f : Lp ℂ p (volume : Measure (Fin d → ℝ))) : + mixedModNorm p L s q f < ∞ ↔ b.mixedLocalMeansNorm hp L s q f < ∞ := by + constructor + · intro h + refine (b.mixedLocalMeansNorm_le hp L hR s q f).trans_lt (ENNReal.mul_lt_top ?_ h) + exact ENNReal.pow_lt_top (ENNReal.mul_lt_top b.integrable.2 + (ENNReal.add_lt_top.2 ⟨ENNReal.pow_lt_top (by simp), ENNReal.one_lt_top⟩)) + · intro h + refine (b.mixedModNorm_le_mixedLocalMeansNorm hp hL hs.le hq f).trans_lt + (ENNReal.mul_lt_top ?_ h) + exact ENNReal.pow_lt_top (ENNReal.mul_lt_top (b.dualConst_ne_top L).lt_top + (ENNReal.almostDiagonalConst_ne_top hs hsL).lt_top) + +end LocalMeansBump + +end Rd diff --git a/LeanPool/FunctionSpaces/Rd/MixedSmoothness/MixedSequences.lean b/LeanPool/FunctionSpaces/Rd/MixedSmoothness/MixedSequences.lean new file mode 100644 index 0000000000..8ec81f2002 --- /dev/null +++ b/LeanPool/FunctionSpaces/Rd/MixedSmoothness/MixedSequences.lean @@ -0,0 +1,252 @@ +/- +Copyright (c) 2026 Mario Ullrich. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Mario Ullrich +-/ +module + +public import LeanPool.FunctionSpaces.Analysis.Fourier.Convolution +public import Mathlib.Topology.Algebra.InfiniteSum.NatInt +public import LeanPool.FunctionSpaces.ApproximationSpaces.Sequences.Hardy + +/- +Modified for Lean Pool: module names and imports adapted. +-/ + +/-! +# Sequences on `ℕ^d` + +The quasi-norms of the spaces of dominating mixed smoothness are `ℓ_q` norms of families indexed by +`k ∈ ℕ^d = Fin d → ℕ` with the **mixed weights** `2^(s|k|_1) = ∏_i 2^(s k_i)` (`Rd.mixedWeight`). +The `ℓ_q` norm on `ℕ^d` is `ENNReal.lqNorm`, the `L_q` norm for the counting measure, as on `ℕ`. + +**The Schur test** (`Rd.lqNorm_schur_le`): if the row sums and the column sums of a nonnegative +matrix `w` are at most `A`, then `‖(∑_k w(m, k) b_k)_m‖_{ℓ_q} ≤ A ‖b‖_{ℓ_q}`, `1 ≤ q ≤ ∞`, by the +weighted Jensen inequality `(∑_k w b)^q ≤ (∑_k w)^(q-1) ∑_k w b^q` +(`MeasureTheory.lintegral_mul_rpow_le` for the counting measure). + +**The almost diagonal lemma on `ℕ^d`** (`Rd.lqNorm_almostDiagonal_pi_le`): with the coefficients +`c(i, j) = 2^(-(i-j)L)` for `j ≤ i` and `1` for `j > i` (`Rd.almostDiagCoeff`) and `0 < s < L`, + +`‖(2^(s|m|_1) ∑_k ∏_i c(m_i, k_i) a_k)_m‖_{ℓ_q} ≤ C^d ‖(2^(s|k|_1) a_k)_k‖_{ℓ_q}`, + +`C = (1 - 2^(-(L-s)))⁻¹ + (1 - 2^(-s))⁻¹`. The matrix `2^(s|m|_1) ∏_i c(m_i, k_i) 2^(-s|k|_1)` is a +product over the coordinates of `u(m_i - k_i)` with `u(l) = 2^(-(L-s) l)` for `l ≥ 0` and +`u(l) = 2^(s l)` for `l < 0`, so its row and column sums are at most `(∑_{l ∈ ℤ} u(l))^d = C^d`. +This replaces the one-dimensional Hardy inequalities of `ENNReal.lqNorm_almostDiagonal_le`, which +do not iterate over the coordinates. With termwise bounds +`a_m ≤ C^d ∑_k ∏_i c(m_i, k_i) x_k` it gives +`‖(2^(s|m|_1) a_m)_m‖_{ℓ_q} ≤ (C C_s)^d ‖(2^(s|k|_1) x_k)_k‖_{ℓ_q}` +(`Rd.lqNorm_le_of_le_almostDiagonal_pi`). +-/ + +@[expose] public section + +open MeasureTheory Filter +open scoped ENNReal + +open ENNReal (dyadicWeight lqNorm) + +namespace Rd + +variable {d : ℕ} {q : ℝ≥0∞} + +/-! ### The Schur test -/ + +/-- **The Schur test** on `ℓ_q`: if the row sums and the column sums of a nonnegative matrix `w` are +at most `A`, then `‖(∑_k w(m, k) b_k)_m‖_{ℓ_q} ≤ A ‖b‖_{ℓ_q}` for `1 ≤ q ≤ ∞`, by the weighted +Jensen inequality `(∑_k w b)^q ≤ (∑_k w)^(q-1) ∑_k w b^q`. -/ +theorem lqNorm_schur_le {ι κ : Type*} [MeasurableSpace ι] [Countable ι] + [MeasurableSingletonClass ι] [MeasurableSpace κ] [Countable κ] [MeasurableSingletonClass κ] + (hq : 1 ≤ q) {w : ι → κ → ℝ≥0∞} {A : ℝ≥0∞} (hrow : ∀ m, ∑' k, w m k ≤ A) + (hcol : ∀ k, ∑' m, w m k ≤ A) (b : κ → ℝ≥0∞) : + lqNorm q (fun m => ∑' k, w m k * b k) ≤ A * lqNorm q b := by + rcases eq_or_ne q ∞ with rfl | hq' + · rw [ENNReal.lqNorm_top, ENNReal.lqNorm_top] + refine iSup_le fun m => ?_ + calc ∑' k, w m k * b k ≤ ∑' k, w m k * ⨆ k', b k' := + tsum_le_tsum fun k => mul_le_mul' le_rfl (le_iSup b k) + _ = (∑' k, w m k) * ⨆ k', b k' := ENNReal.tsum_mul_right + _ ≤ A * ⨆ k', b k' := mul_le_mul' (hrow m) le_rfl + have hq0 : q ≠ 0 := (zero_lt_one.trans_le hq).ne' + set r := q.toReal + have hr : 1 ≤ r := ENNReal.one_le_toReal_of_one_le hq hq' + have hr0 : 0 < r := by linarith + rw [ENNReal.lqNorm_eq_tsum hq0 hq', ENNReal.lqNorm_eq_tsum hq0 hq'] + -- the weighted Jensen inequality in each row + have hjensen : ∀ m, (∑' k, w m k * b k) ^ r ≤ A ^ (r - 1) * ∑' k, w m k * b k ^ r := fun m => by + have h := lintegral_mul_rpow_le (μ := (Measure.count : Measure κ)) hr + (measurable_of_countable (w m)).aemeasurable (measurable_of_countable b).aemeasurable + simp only [lintegral_count] at h + exact h.trans (mul_le_mul' (ENNReal.rpow_le_rpow (hrow m) (by linarith)) le_rfl) + have hsum : ∑' m, (∑' k, w m k * b k) ^ r ≤ A ^ r * ∑' k, b k ^ r := by + calc ∑' m, (∑' k, w m k * b k) ^ r ≤ ∑' m, A ^ (r - 1) * ∑' k, w m k * b k ^ r := + tsum_le_tsum hjensen + _ = A ^ (r - 1) * ∑' k, (∑' m, w m k) * b k ^ r := by + rw [ENNReal.tsum_mul_left, tsum_comm] + simp_rw [ENNReal.tsum_mul_right] + _ ≤ A ^ (r - 1) * ∑' k, A * b k ^ r := + mul_le_mul' le_rfl (tsum_le_tsum fun k => mul_le_mul' (hcol k) le_rfl) + _ = A ^ r * ∑' k, b k ^ r := by + rw [ENNReal.tsum_mul_left, ← mul_assoc] + congr 1 + conv_rhs => rw [show r = (r - 1) + 1 by ring] + rw [ENNReal.rpow_add_of_nonneg _ _ (by linarith) zero_le_one, ENNReal.rpow_one] + calc (∑' m, (∑' k, w m k * b k) ^ r) ^ (1 / r) + ≤ (A ^ r * ∑' k, b k ^ r) ^ (1 / r) := ENNReal.rpow_le_rpow hsum (by positivity) + _ = A * (∑' k, b k ^ r) ^ (1 / r) := by + rw [ENNReal.mul_rpow_of_nonneg _ _ (by positivity), ← ENNReal.rpow_mul, + mul_one_div_cancel hr0.ne', ENNReal.rpow_one] + +/-- **Sums of products over `ℕ^d`**: `∑_k ∏_i f_i(k_i) ≤ ∏_i ∑_j f_i(j)`, from the finite boxes +(Mathlib's `Finset.prod_univ_sum`). -/ +theorem tsum_prod_le_prod_tsum (f : Fin d → ℕ → ℝ≥0∞) : + ∑' k : Fin d → ℕ, ∏ i, f i (k i) ≤ ∏ i, ∑' j, f i j := by + rw [tsum_eq_iSup_sum] + refine iSup_le fun S => ?_ + set N := S.sup fun k => Finset.univ.sup k + have hsub : S ⊆ Fintype.piFinset fun _ => Finset.range (N + 1) := fun k hk => by + rw [Fintype.mem_piFinset] + intro i + rw [Finset.mem_range, Nat.lt_succ_iff] + exact (Finset.le_sup (f := k) (Finset.mem_univ i)).trans + (Finset.le_sup (f := fun k => Finset.univ.sup k) hk) + calc ∑ k ∈ S, ∏ i, f i (k i) + ≤ ∑ k ∈ Fintype.piFinset (fun _ => Finset.range (N + 1)), ∏ i, f i (k i) := + Finset.sum_le_sum_of_subset hsub + _ = ∏ i, ∑ j ∈ Finset.range (N + 1), f i j := (Finset.prod_univ_sum _ _).symm + _ ≤ ∏ i, ∑' j, f i j := Finset.prod_le_prod fun i _ => sum_le_tsum _ + +/-! ### The almost diagonal lemma -/ + +/-- The **mixed weight** `2^(s|k|_1) = ∏_i 2^(s k_i)`. -/ +noncomputable def mixedWeight (s : ℝ) (k : Fin d → ℕ) : ℝ≥0∞ := ∏ i, dyadicWeight s (k i) + +/-- The mixed weights are finite. -/ +theorem mixedWeight_ne_top (s : ℝ) (k : Fin d → ℕ) : mixedWeight s k ≠ ∞ := + ENNReal.prod_ne_top fun i _ => ENNReal.dyadicWeight_ne_top s (k i) + +/-- `2^(-s|k|_1) 2^(s|k|_1) = 1`. -/ +theorem mixedWeight_neg_mul_self (s : ℝ) (k : Fin d → ℕ) : + mixedWeight (-s) k * mixedWeight s k = 1 := by + rw [mixedWeight, mixedWeight, ← Finset.prod_mul_distrib] + exact Finset.prod_eq_one fun i _ => ENNReal.dyadicWeight_neg_mul_self s (k i) + +/-- The coefficient `c(i, j) = 2^(-(i-j)L)` for `j ≤ i` and `1` for `j > i` of the almost diagonal +lemma. -/ +noncomputable def almostDiagCoeff (L : ℝ) (i j : ℕ) : ℝ≥0∞ := + if j ≤ i then dyadicWeight (-L) (i - j) else 1 + +/-- The profile `u(l) = 2^(-(L-s) l)` for `l ≥ 0` and `2^(s l)` for `l < 0` on `ℤ`. -/ +noncomputable def almostDiagProfile (s L : ℝ) (l : ℤ) : ℝ≥0∞ := + if 0 ≤ l then (2 : ℝ≥0∞) ^ ((l : ℝ) * (s - L)) else (2 : ℝ≥0∞) ^ ((l : ℝ) * s) + +/-- `2^(s i) c(i, j) 2^(-s j) = u(i - j)`. -/ +theorem dyadicWeight_mul_almostDiagCoeff_mul (s L : ℝ) (i j : ℕ) : + dyadicWeight s i * almostDiagCoeff L i j * dyadicWeight (-s) j = + almostDiagProfile s L ((i : ℤ) - j) := by + have h2 : (2 : ℝ≥0∞) ≠ 0 := two_ne_zero + have h2' : (2 : ℝ≥0∞) ≠ ∞ := ENNReal.ofNat_ne_top + simp only [almostDiagCoeff, almostDiagProfile, ENNReal.dyadicWeight] + by_cases hji : j ≤ i + · have hl : (0 : ℤ) ≤ (i : ℤ) - j := by omega + simp only [hji, hl, ↓reduceIte] + rw [← ENNReal.rpow_add _ _ h2 h2', ← ENNReal.rpow_add _ _ h2 h2'] + congr 1 + push_cast [Nat.cast_sub hji] + ring + · have hl : ¬ (0 : ℤ) ≤ (i : ℤ) - j := by omega + simp only [hji, hl, ↓reduceIte] + rw [mul_one, ← ENNReal.rpow_add _ _ h2 h2'] + congr 1 + push_cast + ring + +/-- `∑_{l ∈ ℤ} u(l) ≤ (1 - 2^(-(L-s)))⁻¹ + (1 - 2^(-s))⁻¹`, two geometric series. -/ +theorem tsum_almostDiagProfile_le (s L : ℝ) (hs : 0 ≤ s) : + ∑' l, almostDiagProfile s L l ≤ + (1 - (2 : ℝ≥0∞) ^ (-(L - s)))⁻¹ + (1 - (2 : ℝ≥0∞) ^ (-s))⁻¹ := by + rw [(CompleteLattice.summable.hasSum.of_nat_of_neg_add_one + CompleteLattice.summable.hasSum).tsum_eq] + refine add_le_add (le_of_eq ?_) ?_ + · rw [← ENNReal.tsum_dyadicWeight_neg] + refine tsum_congr fun n => ?_ + simp only [almostDiagProfile, Int.natCast_nonneg, ↓reduceIte, ENNReal.dyadicWeight] + congr 1 + push_cast + ring + · rw [← ENNReal.tsum_dyadicWeight_neg] + refine tsum_le_tsum fun n => ?_ + have hneg : ¬ (0 : ℤ) ≤ -((n : ℤ) + 1) := by omega + simp only [almostDiagProfile, hneg, ↓reduceIte, ENNReal.dyadicWeight] + refine ENNReal.rpow_le_rpow_of_exponent_le (by norm_num) ?_ + push_cast + nlinarith + +/-- **The almost diagonal lemma on `ℕ^d`**: for `0 < s < L` and `1 ≤ q ≤ ∞`, +`‖(2^(s|m|_1) ∑_k ∏_i c(m_i, k_i) a_k)_m‖_{ℓ_q} ≤ C^d ‖(2^(s|k|_1) a_k)_k‖_{ℓ_q}` with +`C = (1 - 2^(-(L-s)))⁻¹ + (1 - 2^(-s))⁻¹`, by the Schur test: the matrix +`2^(s|m|_1) ∏_i c(m_i, k_i) 2^(-s|k|_1) = ∏_i u(m_i - k_i)` has row and column sums at most `C^d`. +-/ +theorem lqNorm_almostDiagonal_pi_le (hq : 1 ≤ q) {s L : ℝ} (hs : 0 ≤ s) + (a : (Fin d → ℕ) → ℝ≥0∞) : + lqNorm q (fun m => mixedWeight s m * + ∑' k, (∏ i, almostDiagCoeff L (m i) (k i)) * a k) ≤ + ENNReal.almostDiagonalConst s L ^ d * lqNorm q (fun k => mixedWeight s k * a k) := by + set C := ENNReal.almostDiagonalConst s L + set w : (Fin d → ℕ) → (Fin d → ℕ) → ℝ≥0∞ := fun m k => + ∏ i, almostDiagProfile s L ((m i : ℤ) - k i) + have hw : ∀ m k, mixedWeight s m * (∏ i, almostDiagCoeff L (m i) (k i)) * mixedWeight (-s) k = + w m k := fun m k => by + simp only [w, mixedWeight, ← dyadicWeight_mul_almostDiagCoeff_mul, Finset.prod_mul_distrib] + have hprof : ∑' l, almostDiagProfile s L l ≤ C := tsum_almostDiagProfile_le s L hs + have hrow : ∀ m, ∑' k, w m k ≤ C ^ d := fun m => by + refine (tsum_prod_le_prod_tsum fun i j => almostDiagProfile s L ((m i : ℤ) - j)).trans ?_ + calc ∏ i, ∑' j : ℕ, almostDiagProfile s L ((m i : ℤ) - j) ≤ ∏ _i : Fin d, C := + Finset.prod_le_prod fun i _ => le_trans + (tsum_comp_le_tsum_of_injective (fun j j' h => by simpa using h) _) hprof + _ = C ^ d := by rw [Finset.prod_const, Finset.card_univ, Fintype.card_fin] + have hcol : ∀ k, ∑' m, w m k ≤ C ^ d := fun k => by + refine (tsum_prod_le_prod_tsum fun i j => almostDiagProfile s L ((j : ℤ) - k i)).trans ?_ + calc ∏ i, ∑' j : ℕ, almostDiagProfile s L ((j : ℤ) - k i) ≤ ∏ _i : Fin d, C := + Finset.prod_le_prod fun i _ => le_trans + (tsum_comp_le_tsum_of_injective (fun j j' h => by simpa using h) _) hprof + _ = C ^ d := by rw [Finset.prod_const, Finset.card_univ, Fintype.card_fin] + refine le_trans (le_of_eq ?_) (lqNorm_schur_le hq hrow hcol _) + congr 1 + funext m + rw [← ENNReal.tsum_mul_left] + refine tsum_congr fun k => ?_ + rw [← hw m k] + calc mixedWeight s m * ((∏ i, almostDiagCoeff L (m i) (k i)) * a k) + = mixedWeight s m * (∏ i, almostDiagCoeff L (m i) (k i)) * + (mixedWeight (-s) k * mixedWeight s k) * a k := by + rw [mixedWeight_neg_mul_self, mul_one, mul_assoc] + _ = mixedWeight s m * (∏ i, almostDiagCoeff L (m i) (k i)) * mixedWeight (-s) k * + (mixedWeight s k * a k) := by ring + +/-- **The almost diagonal lemma for termwise bounds**: for `0 ≤ s`, `1 ≤ q ≤ ∞` and +`C ∈ [0, ∞]`, if `a_m ≤ C^d ∑_k ∏_i c(m_i, k_i) x_k` for every `m ∈ ℕ^d`, then +`‖(2^(s|m|_1) a_m)_m‖_{ℓ_q} ≤ (C C_s)^d ‖(2^(s|k|_1) x_k)_k‖_{ℓ_q}` with the constant `C_s` of +`Rd.lqNorm_almostDiagonal_pi_le`, by the homogeneity of the `ℓ_q` norm and that lemma. -/ +theorem lqNorm_le_of_le_almostDiagonal_pi (hq : 1 ≤ q) {s L : ℝ} (hs : 0 ≤ s) {C : ℝ≥0∞} + {a x : (Fin d → ℕ) → ℝ≥0∞} + (ha : ∀ m, a m ≤ C ^ d * ∑' k, (∏ i, almostDiagCoeff L (m i) (k i)) * x k) : + lqNorm q (fun m => mixedWeight s m * a m) ≤ + (C * ENNReal.almostDiagonalConst s L) ^ d * lqNorm q (fun k => mixedWeight s k * x k) := by + calc lqNorm q (fun m => mixedWeight s m * a m) + ≤ lqNorm q (fun m => C ^ d * (mixedWeight s m * + ∑' k, (∏ i, almostDiagCoeff L (m i) (k i)) * x k)) := + ENNReal.lqNorm_mono fun m => by + calc mixedWeight s m * a m + ≤ mixedWeight s m * (C ^ d * + ∑' k, (∏ i, almostDiagCoeff L (m i) (k i)) * x k) := + mul_le_mul' le_rfl (ha m) + _ = _ := by ring + _ = C ^ d * lqNorm q (fun m => mixedWeight s m * + ∑' k, (∏ i, almostDiagCoeff L (m i) (k i)) * x k) := ENNReal.lqNorm_const_mul _ _ + _ ≤ C ^ d * (ENNReal.almostDiagonalConst s L ^ d * lqNorm q (fun k => mixedWeight s k * x k)) := + mul_le_mul' le_rfl (lqNorm_almostDiagonal_pi_le hq hs _) + _ = _ := by rw [mul_pow, mul_assoc] + +end Rd diff --git a/LeanPool/FunctionSpaces/Rd/MixedSmoothness/TensorKernels.lean b/LeanPool/FunctionSpaces/Rd/MixedSmoothness/TensorKernels.lean new file mode 100644 index 0000000000..6444ad051c --- /dev/null +++ b/LeanPool/FunctionSpaces/Rd/MixedSmoothness/TensorKernels.lean @@ -0,0 +1,194 @@ +/- +Copyright (c) 2026 Mario Ullrich. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Mario Ullrich +-/ +module + +public import LeanPool.FunctionSpaces.Analysis.Fourier.ApproxIdentity +public import Mathlib.MeasureTheory.Integral.Pi + +/- +Modified for Lean Pool: module names and imports adapted. +-/ + +/-! +# Tensor kernels on `ℝ^d` + +On `ℝ^d = Fin d → ℝ` with Lebesgue measure, the **tensor product** of one-dimensional kernels +`K_0, …, K_{d-1} : ℝ → ℂ` is `(⊗K)(x) = ∏_i K_i(x_i)` (`Rd.tensorKernel`). Tensor products of +integrable kernels are integrable with `∫ ⊗K = ∏_i ∫ K_i` and `‖⊗K‖_1 = ∏_i ‖K_i‖_1` (Fubini, +Mathlib's `integral_fintype_prod_eq_prod`), and the operations behind the function spaces of +dominating mixed smoothness act coordinatewise: + +* convolution, `(⊗K) ⋆ (⊗K') = ⊗(K_i ⋆ K'_i)` (`Rd.conv_tensorKernel`); +* dilation, `(⊗K)_c = ⊗((K_i)_c)` (`Rd.dilate_tensorKernel`); +* sums over boxes, `∑_{k ∈ ∏_i t_i} ⊗(K_i(k_i)) = ⊗(∑_{j ∈ t_i} K_i(j))` + (`Rd.sum_tensorKernel_piFinset`); +* diagonal changes of variables: for `a_i > 0`, + `∫ (⊗φ)(z) f(x - (a_i z_i)_i) dz = ((⊗ φ_i^{(1/a_i)}) ⋆ f)(x)` with `φ^{(c)}(t) = c φ(c t)` + (`Rd.integral_tensorKernel_mul_comp_eq_conv`), since the diagonal map scales Lebesgue measure + by its determinant `∏_i a_i` (Mathlib's `Real.map_linearMap_volume_pi_eq_smul_volume_pi`). + +Convolutions with tensor kernels are `d`-dimensional convolutions, so Young's inequality, the +associativity of convolution and the approximate identities of +`FunctionSpaces.Analysis.Fourier.Convolution` and `FunctionSpaces.Analysis.Fourier.ApproxIdentity` +apply to them without change. +-/ + +@[expose] public section + +open MeasureTheory Filter Module +open scoped ENNReal + +namespace Rd + +variable {d : ℕ} + +/-- The **tensor product** `(⊗K)(x) = ∏_i K_i(x_i)` of one-dimensional kernels. -/ +def tensorKernel (K : Fin d → ℝ → ℂ) (x : Fin d → ℝ) : ℂ := ∏ i, K i (x i) + +/-- `(⊗K)(x) = ∏_i K_i(x_i)`. -/ +theorem tensorKernel_apply (K : Fin d → ℝ → ℂ) (x : Fin d → ℝ) : + tensorKernel K x = ∏ i, K i (x i) := rfl + +/-- Tensor products of integrable kernels are integrable (Mathlib's `Integrable.fintype_prod`). -/ +theorem integrable_tensorKernel {K : Fin d → ℝ → ℂ} (hK : ∀ i, Integrable (K i)) : + Integrable (tensorKernel K) := + Integrable.fintype_prod (μ := fun _ => volume) hK + +/-- Tensor products of continuous kernels are continuous. -/ +theorem continuous_tensorKernel {K : Fin d → ℝ → ℂ} (hK : ∀ i, Continuous (K i)) : + Continuous (tensorKernel K) := + continuous_finsetProd _ fun i _ => (hK i).comp (continuous_apply i) + +/-- **The integral of a tensor product**: `∫ ⊗K = ∏_i ∫ K_i` (Fubini, Mathlib's +`integral_fintype_prod_eq_prod`). -/ +theorem integral_tensorKernel (K : Fin d → ℝ → ℂ) : + ∫ x, tensorKernel K x = ∏ i, ∫ t, K i t := + integral_fintype_prod_volume_eq_prod (E := fun _ => ℝ) K + +/-- **The `L_1` norm of a tensor product**: `‖⊗K‖_1 = ∏_i ‖K_i‖_1`. -/ +theorem lintegral_enorm_tensorKernel {K : Fin d → ℝ → ℂ} (hK : ∀ i, Integrable (K i)) : + ∫⁻ x, ‖tensorKernel K x‖ₑ = ∏ i, ∫⁻ t, ‖K i t‖ₑ := by + rw [← ofReal_integral_norm_eq_lintegral_eNorm (integrable_tensorKernel hK)] + simp_rw [← ofReal_integral_norm_eq_lintegral_eNorm (hK _)] + rw [← ENNReal.ofReal_prod_of_nonneg fun i _ => integral_nonneg fun _ => norm_nonneg _] + congr 1 + simp only [tensorKernel, norm_prod] + exact integral_fintype_prod_volume_eq_prod (E := fun _ => ℝ) (fun i t => ‖K i t‖) + +/-- `‖⊗K‖_1 = ∏_i ‖K_i‖_1` with `eLpNorm`. -/ +theorem eLpNorm_tensorKernel_one {K : Fin d → ℝ → ℂ} (hK : ∀ i, Integrable (K i)) : + eLpNorm (tensorKernel K) 1 volume = ∏ i, eLpNorm (K i) 1 volume := by + rw [eLpNorm_one_eq_lintegral_eNorm (integrable_tensorKernel hK).aestronglyMeasurable, + lintegral_enorm_tensorKernel hK] + exact Finset.prod_congr rfl fun i _ => + (eLpNorm_one_eq_lintegral_eNorm (hK i).aestronglyMeasurable).symm + +/-- **Convolution of tensor products**: `(⊗K) ⋆ (⊗K') = ⊗(K_i ⋆ K'_i)` (Fubini). -/ +theorem conv_tensorKernel (K K' : Fin d → ℝ → ℂ) : + conv (tensorKernel K) (tensorKernel K') volume = + tensorKernel fun i => conv (K i) (K' i) volume := by + funext x + rw [conv_apply, tensorKernel] + simp only [conv_apply] + have h : ∀ y : Fin d → ℝ, tensorKernel K y * tensorKernel K' (x - y) = + ∏ i, K i (y i) * K' i (x i - y i) := fun y => by + simp [tensorKernel, Finset.prod_mul_distrib] + simp_rw [h] + exact integral_fintype_prod_volume_eq_prod (E := fun _ => ℝ) + (fun i t => K i t * K' i (x i - t)) + +/-- **Dilations of tensor products**: `(⊗K)_c = ⊗((K_i)_c)`, since `c^d = ∏_i c`. -/ +theorem dilate_tensorKernel (c : ℝ) (K : Fin d → ℝ → ℂ) : + dilate c (tensorKernel K) = tensorKernel fun i => dilate c (K i) := by + funext x + simp only [dilate, tensorKernel, finrank_fin_fun, finrank_self, pow_one, Pi.smul_apply, + smul_eq_mul] + rw [Finset.prod_mul_distrib, Finset.prod_const, Finset.card_univ, Fintype.card_fin] + push_cast + rfl + +/-- **Sums of tensor products over boxes**: +`∑_{k ∈ ∏_i t_i} ⊗(K_i(k_i)) = ⊗(∑_{j ∈ t_i} K_i(j))`. -/ +theorem sum_tensorKernel_piFinset {ι : Type*} (t : Fin d → Finset ι) (K : Fin d → ι → ℝ → ℂ) : + ∑ k ∈ Fintype.piFinset t, tensorKernel (fun i => K i (k i)) = + tensorKernel fun i => ∑ j ∈ t i, K i j := by + funext x + simp only [Finset.sum_apply, tensorKernel] + rw [Finset.prod_univ_sum] + +/-! ### Diagonal changes of variables -/ + +/-- The diagonal linear map `z ↦ (a_i z_i)_i`. -/ +noncomputable def diagMap (a : Fin d → ℝ) : (Fin d → ℝ) →ₗ[ℝ] Fin d → ℝ := + Matrix.toLin' (Matrix.diagonal a) + +/-- `(diagMap a z)_i = a_i z_i`. -/ +theorem diagMap_apply (a : Fin d → ℝ) (z : Fin d → ℝ) : diagMap a z = fun i => a i * z i := by + funext i + simp [diagMap, Matrix.mulVec_diagonal] + +/-- The determinant of the diagonal map is `∏_i a_i`. -/ +theorem det_diagMap (a : Fin d → ℝ) : LinearMap.det (diagMap a) = ∏ i, a i := by + rw [diagMap, LinearMap.det_toLin', Matrix.det_diagonal] + +/-- For nonzero `a_i` the diagonal map is a measurable equivalence. -/ +noncomputable def diagEquiv {a : Fin d → ℝ} (ha : ∀ i, a i ≠ 0) : (Fin d → ℝ) ≃ᵐ (Fin d → ℝ) := + MeasurableEquiv.piCongrRight fun i => MeasurableEquiv.mulLeft₀ (a i) (ha i) + +/-- `diagEquiv z = (a_i z_i)_i`. -/ +theorem diagEquiv_apply {a : Fin d → ℝ} (ha : ∀ i, a i ≠ 0) (z : Fin d → ℝ) : + diagEquiv ha z = fun i => a i * z i := rfl + +/-- **Diagonal changes of variables**: for `a_i > 0`, +`∫ F((a_i z_i)_i) dz = (∏_i a_i)⁻¹ ∫ F` (Mathlib's +`Real.map_linearMap_volume_pi_eq_smul_volume_pi`). -/ +theorem integral_comp_diagMap {a : Fin d → ℝ} (ha : ∀ i, 0 < a i) (F : (Fin d → ℝ) → ℂ) : + ∫ z : Fin d → ℝ, F (fun i => a i * z i) = ((∏ i, a i)⁻¹ : ℝ) • ∫ y, F y := by + have hdet : LinearMap.det (diagMap a) ≠ 0 := by + rw [det_diagMap] + exact Finset.prod_ne_zero_iff.2 fun i _ => (ha i).ne' + have hmap := Real.map_linearMap_volume_pi_eq_smul_volume_pi hdet + have hpos : 0 < ∏ i, a i := Finset.prod_pos fun i _ => ha i + have he := (diagEquiv fun i => (ha i).ne').measurableEmbedding + have hcoe : ⇑(diagEquiv fun i => (ha i).ne') = ⇑(diagMap a) := by + funext z + rw [diagMap_apply, diagEquiv_apply] + calc ∫ z : Fin d → ℝ, F (fun i => a i * z i) + = ∫ z, F ((diagEquiv fun i => (ha i).ne') z) := by simp_rw [diagEquiv_apply] + _ = ∫ y, F y ∂(Measure.map (diagEquiv fun i => (ha i).ne') volume) := (he.integral_map F).symm + _ = ∫ y, F y ∂(Measure.map (diagMap a) volume) := by rw [hcoe] + _ = ((∏ i, a i)⁻¹ : ℝ) • ∫ y, F y := by + rw [hmap, integral_smul_measure, det_diagMap, ENNReal.toReal_ofReal (abs_nonneg _), + abs_of_pos (inv_pos.2 hpos)] + +/-- **Anisotropic substitution** in a tensor integral: for `a_i > 0`, +`∫ (⊗φ)(z) f(x - (a_i z_i)_i) dz = ((⊗ φ_i^{(1/a_i)}) ⋆ f)(x)` with `φ^{(c)}(t) = c φ(c t)`. -/ +theorem integral_tensorKernel_mul_comp_eq_conv (φ : Fin d → ℝ → ℂ) {a : Fin d → ℝ} + (ha : ∀ i, 0 < a i) (f : (Fin d → ℝ) → ℂ) (x : Fin d → ℝ) : + ∫ z, tensorKernel φ z * f (x - fun i => a i * z i) = + conv (tensorKernel fun i => dilate (a i)⁻¹ (φ i)) f volume x := by + have hpos : 0 < ∏ i, a i := Finset.prod_pos fun i _ => ha i + rw [conv_apply] + have h := integral_comp_diagMap ha + (fun y => tensorKernel (fun i => dilate (a i)⁻¹ (φ i)) y * f (x - y)) + have hterm : ∀ z : Fin d → ℝ, + tensorKernel (fun i => dilate (a i)⁻¹ (φ i)) (fun i => a i * z i) = + (((∏ i, a i)⁻¹ : ℝ) : ℂ) * tensorKernel φ z := fun z => by + simp only [tensorKernel, dilate, finrank_self, pow_one, smul_eq_mul] + rw [Finset.prod_mul_distrib] + congr 1 + · push_cast + rw [Finset.prod_inv_distrib] + · refine Finset.prod_congr rfl fun i _ => ?_ + rw [← mul_assoc, inv_mul_cancel₀ (ha i).ne', one_mul] + simp_rw [hterm, mul_assoc] at h + rw [integral_const_mul] at h + have hne : (((∏ i, a i)⁻¹ : ℝ) : ℂ) ≠ 0 := by + exact_mod_cast (inv_pos.2 hpos).ne' + rw [Complex.real_smul] at h + exact mul_left_cancel₀ hne h + +end Rd diff --git a/LeanPool/FunctionSpaces/Rd/SingularIntegrals/ConvolutionAdjoint.lean b/LeanPool/FunctionSpaces/Rd/SingularIntegrals/ConvolutionAdjoint.lean new file mode 100644 index 0000000000..ae4f09e84f --- /dev/null +++ b/LeanPool/FunctionSpaces/Rd/SingularIntegrals/ConvolutionAdjoint.lean @@ -0,0 +1,431 @@ +/- +Copyright (c) 2026 Mario Ullrich. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Mario Ullrich +-/ +module + +public import LeanPool.FunctionSpaces.Rd.SingularIntegrals.DilationFamilies +public import LeanPool.FunctionSpaces.Rd.Sobolev.WeakDerivatives +public import LeanPool.FunctionSpaces.Analysis.Lp.Young + +/- +Modified for Lean Pool: module names and imports adapted. +-/ + +/-! +# The adjoint of a convolution and the transfer of derivatives + +On a finite-dimensional real inner product space `V` with Lebesgue measure, `K ⋆ f` is the +convolution `(K ⋆ f)(x) = ∫ K(y) f(x - y) dy` (`Rd.conv`) and `K^∨(x) = K(-x)` the reflection +(`Rd.reflect`). + +* **The adjoint identity** (`Rd.integral_conv_mul`): for integrable `K`, `f ∈ L_p`, `g ∈ L_q` + with `1/p + 1/q = 1`, `p < ∞`, `∫ (K ⋆ f) g = ∫ f (K^∨ ⋆ g)`, by Fubini's theorem; the double + integral converges absolutely by Young's and Hölder's inequalities + (`Rd.integrable_kernel_mul_mul`). With conjugation it reads + `∫ (K ⋆ f) conj g = ∫ f conj(K^* ⋆ g)` for the adjoint kernel `K^*(x) = conj K(-x)` + (`Rd.integral_conv_mul_conj`). +* **Derivatives move to the Schwartz factor** (`Rd.integral_conv_iteratedLineDerivOp_mul`): for + Schwartz functions `η`, `u` and `f ∈ L_p`, `1 ≤ p < ∞`, + `∫ ((∂^w η) ⋆ f) u = (-1)^k ∫ (η ⋆ f) ∂^w u`, by the adjoint identity and integration by + parts on the Schwartz space. +* **Reflected translates** (`Rd.shiftReflect`): the Schwartz function `y ↦ η(x - y)` tests + `(η ⋆ f)(x) = ∫ η(x - y) f(y) dy`, and `∂^w` of it is `(-1)^k` times the reflected translate + of `∂^w η` (`Rd.iteratedLineDerivOp_shiftReflect`). +* **Weak derivatives commute with convolution**: if `g ∈ L_r` is the weak derivative `∂^v f` of + `f ∈ L_p` on `V`, `1 ≤ p, r ≤ ∞`, then `η ⋆ g = (∂^v η) ⋆ f` at every point + (`Rd.conv_eq_conv_iteratedLineDerivOp`); locally, if `∂^v f = g` weakly on an open set `Ω` + and `η` has compact support with `x - supp η ⊆ Ω`, then `(η ⋆ g)(x) = ((∂^v η) ⋆ f)(x)` + (`Rd.conv_eq_conv_iteratedLineDerivOp_of_hasWeakLineDeriv`); and + `∂^v (η ⋆ f) = (∂^v η) ⋆ f` weakly for + `f ∈ L_p`, `1 ≤ p < ∞` (`Rd.hasWeakLineDeriv_conv`); for the operators of `Rd.convLp`, + `η ⋆ g = ∂^v (η ⋆ f)` weakly (`Rd.hasWeakLineDeriv_convLp`). +-/ + +@[expose] public section + +open MeasureTheory TopologicalSpace +open scoped ENNReal SchwartzMap FourierTransform LineDeriv ComplexConjugate + +namespace SchwartzMap + +/-! ### Translates of Schwartz functions -/ + +variable {E : Type*} [NormedAddCommGroup E] [NormedSpace ℝ E] + +/-- **Derivatives commute with translations**: `∂_v (η(· - y)) = (∂_v η)(· - y)` for a Schwartz +function `η` (Mathlib's `SchwartzMap.compSubConstCLM` and `fderiv_comp_sub`). -/ +theorem lineDerivOp_compSubConstCLM (η : 𝓢(E, ℂ)) (y v : E) : + ∂_{v} (η.compSubConstCLM ℂ y) = (∂_{v} η).compSubConstCLM ℂ y := by + ext x + rw [lineDerivOp_apply_eq_fderiv, compSubConstCLM_apply, lineDerivOp_apply_eq_fderiv] + change fderiv ℝ (fun z => η (z - y)) x v = _ + rw [fderiv_comp_sub] + +/-- Iterated derivatives commute with translations: `∂^w (η(· - y)) = (∂^w η)(· - y)`. -/ +theorem iteratedLineDerivOp_compSubConstCLM {k : ℕ} (η : 𝓢(E, ℂ)) (y : E) (w : Fin k → E) : + ∂^{w} (η.compSubConstCLM ℂ y) = (∂^{w} η).compSubConstCLM ℂ y := by + induction k generalizing η with + | zero => rfl + | succ k ih => + rw [LineDeriv.iteratedLineDerivOp_succ_left, LineDeriv.iteratedLineDerivOp_succ_left, ih, + lineDerivOp_compSubConstCLM] + +end SchwartzMap + +namespace Rd + +variable {V : Type*} [NormedAddCommGroup V] [InnerProductSpace ℝ V] [FiniteDimensional ℝ V] + [MeasurableSpace V] [BorelSpace V] + +/-! ### Reflection -/ + +/-- The **reflection** `K^∨(x) = K(-x)` of a function `K : V → ℂ`. -/ +def reflect (K : V → ℂ) (x : V) : ℂ := K (-x) + +omit [InnerProductSpace ℝ V] [FiniteDimensional ℝ V] [MeasurableSpace V] [BorelSpace V] in +/-- The values of the reflection: `K^∨(x) = K(-x)`. -/ +@[simp] +theorem reflect_apply (K : V → ℂ) (x : V) : reflect K x = K (-x) := + rfl + +omit [InnerProductSpace ℝ V] [FiniteDimensional ℝ V] [MeasurableSpace V] [BorelSpace V] in +/-- The reflection is an involution. -/ +@[simp] +theorem reflect_reflect (K : V → ℂ) : reflect (reflect K) = K := by + funext x + simp + +/-- The reflection of an integrable function is integrable (Lebesgue measure is invariant under +`x ↦ -x`, Mathlib's `Integrable.comp_neg`). -/ +theorem integrable_reflect {K : V → ℂ} (hK : Integrable K) : Integrable (reflect K) := + hK.comp_neg + +omit [InnerProductSpace ℝ V] [FiniteDimensional ℝ V] [MeasurableSpace V] [BorelSpace V] in +/-- The reflection of a continuous function is continuous. -/ +theorem continuous_reflect {K : V → ℂ} (hK : Continuous K) : Continuous (reflect K) := + hK.comp continuous_neg + +/-- **Fourier transform of the reflection**: `𝓕(K^∨)(ξ) = 𝓕K(-ξ)` for every function `K`, from +Mathlib's `Real.fourierInv_eq_fourier_comp_neg` and `Real.fourierInv_eq_fourier_neg`. -/ +theorem fourier_reflect (K : V → ℂ) (ξ : V) : 𝓕 (reflect K) ξ = 𝓕 K (-ξ) := by + rw [show reflect K = fun x => K (-x) from rfl, ← Real.fourierInv_eq_fourier_comp_neg, + Real.fourierInv_eq_fourier_neg] + +/-! ### Convolution as an integral against translates -/ + +/-- **Convolution with the variable in the kernel**: `(K ⋆ f)(x) = ∫ K(x - y) f(y) dy`, the +symmetric form of the convolution integral (Mathlib's `MeasureTheory.convolution_mul_swap`). -/ +theorem conv_apply_eq_integral_sub (K f : V → ℂ) (x : V) : + conv K f volume x = ∫ y, K (x - y) * f y := by + rw [conv] + exact convolution_mul_swap + +/-- **Convolution with a reflected kernel**: `(K^∨ ⋆ u)(y) = ∫ K(z - y) u(z) dz`. -/ +theorem conv_reflect_apply (K u : V → ℂ) (y : V) : + conv (reflect K) u volume y = ∫ z, K (z - y) * u z := by + simp [conv_apply_eq_integral_sub, reflect_apply, neg_sub] + +/-! ### The adjoint identity -/ + +/-- **The double integrand of the adjoint identity is integrable**: for integrable `K`, +`f ∈ L_p` and `g ∈ L_q` with `1/p + 1/q = 1`, `p < ∞`, the function +`(x, y) ↦ K(x - y) f(y) g(x)` is integrable on `V × V`. For almost every `x` the inner integral +converges (Young's inequality, `MeasureTheory.ae_convolutionExistsAt`), and +`x ↦ ∫ |K(x - y)| |f(y)| dy |g(x)|` is the product of the convolution `|K| ⋆ |f| ∈ L_p` with +`|g| ∈ L_q`, integrable by Hölder's inequality (Mathlib's `MemLp.integrable_mul`). -/ +theorem integrable_kernel_mul_mul {p q : ℝ≥0∞} [p.HolderConjugate q] (hp : p ≠ ∞) + {K f g : V → ℂ} (hK : Integrable K) (hf : MemLp f p) (hg : MemLp g q) : + Integrable (Function.uncurry fun x y => K (x - y) * f y * g x) (volume.prod volume) := by + have hp1 : 1 ≤ p := ENNReal.HolderConjugate.one_le p q + have hmeas : AEStronglyMeasurable (Function.uncurry fun x y => K (x - y) * f y * g x) + (volume.prod volume) := + ((hK.aestronglyMeasurable.comp_quasiMeasurePreserving + (quasiMeasurePreserving_sub_of_right_invariant volume volume)).mul + hf.aestronglyMeasurable.comp_snd).mul hg.aestronglyMeasurable.comp_fst + refine (integrable_prod_iff hmeas).2 ⟨?_, ?_⟩ + · filter_upwards [ae_convolutionExistsAt hp1 hp hK hf] with x hx + have h := (Integrable.comp_sub_left hx x).mul_const (g x) + simpa only [ContinuousLinearMap.mul_apply', sub_sub_cancel, Function.uncurry_apply_pair] + using h + · have hH : MemLp (conv (fun z => ((‖K z‖ : ℝ) : ℂ)) (fun z => ((‖f z‖ : ℝ) : ℂ)) volume) p + volume := memLp_conv hp1 hp hK.norm.ofReal hf.norm.ofReal + refine ((hH.integrable_mul hg).norm).congr (ae_of_all _ fun x => ?_) + have hHx : conv (fun z => ((‖K z‖ : ℝ) : ℂ)) (fun z => ((‖f z‖ : ℝ) : ℂ)) volume x = + ((∫ y, ‖K (x - y)‖ * ‖f y‖ : ℝ) : ℂ) := by + rw [conv_apply_eq_integral_sub] + simp only [← Complex.ofReal_mul] + exact integral_ofReal + have hnn : 0 ≤ ∫ y, ‖K (x - y)‖ * ‖f y‖ := + integral_nonneg fun y => mul_nonneg (norm_nonneg _) (norm_nonneg _) + simp only [Pi.mul_apply, Function.uncurry_apply_pair, norm_mul, hHx, Complex.norm_real, + Real.norm_of_nonneg hnn, integral_mul_const] + +/-- **The adjoint identity for convolutions**: for integrable `K`, `f ∈ L_p` and `g ∈ L_q` with +`1/p + 1/q = 1`, `p < ∞`, and the reflection `K^∨(x) = K(-x)`, +`∫ (K ⋆ f)(x) g(x) dx = ∫ f(y) (K^∨ ⋆ g)(y) dy`. Both sides are the integral of +`K(x - y) f(y) g(x)` over `V × V` (`Rd.integrable_kernel_mul_mul`, Fubini's theorem in the form +of Mathlib's `integral_integral_swap`). -/ +theorem integral_conv_mul {p q : ℝ≥0∞} [p.HolderConjugate q] (hp : p ≠ ∞) {K f g : V → ℂ} + (hK : Integrable K) (hf : MemLp f p) (hg : MemLp g q) : + ∫ x, conv K f volume x * g x = ∫ y, f y * conv (reflect K) g volume y := by + calc ∫ x, conv K f volume x * g x = ∫ x, ∫ y, K (x - y) * f y * g x := by + congr 1 + funext x + rw [conv_apply_eq_integral_sub, ← integral_mul_const] + _ = ∫ y, ∫ x, K (x - y) * f y * g x := + integral_integral_swap (integrable_kernel_mul_mul hp hK hf hg) + _ = ∫ y, f y * conv (reflect K) g volume y := by + congr 1 + funext y + rw [conv_reflect_apply, ← integral_const_mul] + congr 1 + funext x + ring + +/-- **Reflection and conjugation**: `(K^∨ ⋆ conj u)(x) = conj((K^* ⋆ u)(x))` at every point, for +the adjoint kernel `K^*(z) = conj K(-z)` and the reflection `K^∨(z) = K(-z)`; both sides are +`∫ K(y - x) conj u(y) dy`. -/ +theorem conv_reflect_conj (K u : V → ℂ) (x : V) : + conv (reflect K) (fun y => conj (u y)) volume x = + conj (conv (fun z => conj (K (-z))) u volume x) := by + rw [conv_apply_eq_integral_sub, conv_apply_eq_integral_sub, ← integral_conj] + congr 1 + funext y + rw [map_mul, Complex.conj_conj, reflect_apply] + +/-- **The adjoint identity with conjugation**: for integrable `K`, `f ∈ L_p` and `g ∈ L_q` with +`1/p + 1/q = 1`, `p < ∞`, `∫ (K ⋆ f) conj g = ∫ f conj(K^* ⋆ g)` with the adjoint kernel +`K^*(z) = conj K(-z)` (`Rd.integral_conv_mul` for `conj g` and `Rd.conv_reflect_conj`). -/ +theorem integral_conv_mul_conj {p q : ℝ≥0∞} [p.HolderConjugate q] (hp : p ≠ ∞) {K f g : V → ℂ} + (hK : Integrable K) (hf : MemLp f p) (hg : MemLp g q) : + ∫ x, conv K f volume x * conj (g x) = + ∫ y, f y * conj (conv (fun z => conj (K (-z))) g volume y) := by + rw [integral_conv_mul (g := fun x => conj (g x)) hp hK hf hg.star] + congr 1 + funext y + rw [conv_reflect_conj] + +/-! ### Translates and reflections of Schwartz functions -/ + +omit [FiniteDimensional ℝ V] [MeasurableSpace V] [BorelSpace V] in +/-- **Derivatives of a reflection**: `∂_v (η(-·)) = -(∂_v η)(-·)` (Mathlib's +`SchwartzMap.lineDerivOp_compCLMOfContinuousLinearEquiv` and `LineDeriv.lineDerivOp_left_neg`). -/ +theorem lineDerivOp_schwartzReflect (η : 𝓢(V, ℂ)) (v : V) : + ∂_{v} (schwartzReflect η) = -schwartzReflect (∂_{v} η) := by + rw [schwartzReflect, SchwartzMap.lineDerivOp_compCLMOfContinuousLinearEquiv, + ContinuousLinearEquiv.coe_neg, Pi.neg_apply, id_eq, LineDeriv.lineDerivOp_left_neg, map_neg, + schwartzReflect] + +omit [FiniteDimensional ℝ V] [MeasurableSpace V] [BorelSpace V] in +/-- **Iterated derivatives of a reflection**: `∂^w (η(-·)) = (-1)^k (∂^w η)(-·)` for +`w ∈ V^k`. -/ +theorem iteratedLineDerivOp_schwartzReflect {k : ℕ} (η : 𝓢(V, ℂ)) (w : Fin k → V) : + ∂^{w} (schwartzReflect η) = ((-1 : ℂ) ^ k) • schwartzReflect (∂^{w} η) := by + induction k generalizing η with + | zero => simp + | succ k ih => + rw [LineDeriv.iteratedLineDerivOp_succ_left, LineDeriv.iteratedLineDerivOp_succ_left, ih, + LineDeriv.lineDerivOp_smul, lineDerivOp_schwartzReflect, pow_succ, mul_neg_one, neg_smul, + smul_neg] + +/-- The **reflected translate** `y ↦ η(x - y)` of a Schwartz function `η`, the Schwartz function +that tests the convolution `(η ⋆ f)(x) = ∫ η(x - y) f(y) dy`. -/ +noncomputable def shiftReflect (η : 𝓢(V, ℂ)) (x : V) : 𝓢(V, ℂ) := + (schwartzReflect η).compSubConstCLM ℂ x + +omit [FiniteDimensional ℝ V] [MeasurableSpace V] [BorelSpace V] in +/-- The values of the reflected translate: `y ↦ η(x - y)`. -/ +@[simp] +theorem shiftReflect_apply (η : 𝓢(V, ℂ)) (x y : V) : shiftReflect η x y = η (x - y) := by + rw [shiftReflect, SchwartzMap.compSubConstCLM_apply, coe_schwartzReflect] + simp only [neg_sub] + +/-- **Convolution as a pairing**: `(η ⋆ f)(x) = ∫ η(x - y) f(y) dy` is the integral of `f` +against the reflected translate of `η`. -/ +theorem conv_eq_integral_shiftReflect (η : 𝓢(V, ℂ)) (f : V → ℂ) (x : V) : + conv η f volume x = ∫ y, shiftReflect η x y * f y := by + simp only [conv_apply_eq_integral_sub, shiftReflect_apply] + +omit [FiniteDimensional ℝ V] [MeasurableSpace V] [BorelSpace V] in +/-- **Iterated derivatives of a reflected translate**: `∂^w` of `y ↦ η(x - y)` is `(-1)^k` times +`y ↦ (∂^w η)(x - y)`, for `w ∈ V^k`. -/ +theorem iteratedLineDerivOp_shiftReflect {k : ℕ} (η : 𝓢(V, ℂ)) (x : V) (w : Fin k → V) : + ∂^{w} (shiftReflect η x) = ((-1 : ℂ) ^ k) • shiftReflect (∂^{w} η) x := by + rw [shiftReflect, SchwartzMap.iteratedLineDerivOp_compSubConstCLM, + iteratedLineDerivOp_schwartzReflect, + map_smul, shiftReflect] + +/-! ### Derivatives move to the Schwartz factor -/ + +/-- **Integration by parts against a reflected kernel**: for Schwartz functions `η`, `u`, +`(∂_v η)^∨ ⋆ u = -(η^∨ ⋆ ∂_v u)` pointwise, by integration by parts on the Schwartz space +(Mathlib's `SchwartzMap.integral_mul_lineDerivOp_right_eq_neg_left`) applied to `η(· - y)` and +`u`. -/ +theorem conv_reflect_lineDerivOp (η u : 𝓢(V, ℂ)) (v y : V) : + conv (reflect (∂_{v} η : 𝓢(V, ℂ))) u volume y = + -conv (reflect η) (∂_{v} u : 𝓢(V, ℂ)) volume y := by + have h := SchwartzMap.integral_mul_lineDerivOp_right_eq_neg_left (μ := volume) + (η.compSubConstCLM ℂ y) u v + rw [SchwartzMap.lineDerivOp_compSubConstCLM] at h + simp only [SchwartzMap.compSubConstCLM_apply] at h + rw [conv_reflect_apply, conv_reflect_apply, h, neg_neg] + +/-- **A derivative moves from the kernel `η` to the Schwartz function `u`**: for Schwartz +functions `η`, `u`, `f ∈ L_p` with `1 ≤ p < ∞` and `v ∈ V`, +`∫ ((∂_v η) ⋆ f) u = -∫ (η ⋆ f) ∂_v u`. Both sides are pairings of `f` with reflected +convolutions (`Rd.integral_conv_mul`, with the conjugate exponent of `p` and Schwartz functions +in every `L_q`), and these agree up to the sign (`Rd.conv_reflect_lineDerivOp`). -/ +theorem integral_conv_lineDerivOp_mul {p : ℝ≥0∞} (hp1 : 1 ≤ p) (hp : p ≠ ∞) {f : V → ℂ} + (hf : MemLp f p) (η u : 𝓢(V, ℂ)) (v : V) : + ∫ x, conv (∂_{v} η : 𝓢(V, ℂ)) f volume x * u x = + -∫ x, conv η f volume x * (∂_{v} u : 𝓢(V, ℂ)) x := by + have := ENNReal.HolderConjugate.conjExponent hp1 + rw [integral_conv_mul (q := p.conjExponent) hp (∂_{v} η).integrable hf (u.memLp _), + integral_conv_mul (q := p.conjExponent) hp η.integrable hf ((∂_{v} u).memLp _), + ← integral_neg] + congr 1 + funext y + rw [conv_reflect_lineDerivOp, mul_neg] + +/-- **Iterated derivatives move from the kernel `η` to the Schwartz function `u`**: for Schwartz +functions `η`, `u`, `f ∈ L_p` with `1 ≤ p < ∞` and `w ∈ V^k`, +`∫ ((∂^w η) ⋆ f) u = (-1)^k ∫ (η ⋆ f) ∂^w u`, by induction on `k` from +`Rd.integral_conv_lineDerivOp_mul`. -/ +theorem integral_conv_iteratedLineDerivOp_mul {p : ℝ≥0∞} (hp1 : 1 ≤ p) (hp : p ≠ ∞) + {f : V → ℂ} (hf : MemLp f p) (η u : 𝓢(V, ℂ)) {k : ℕ} (w : Fin k → V) : + ∫ x, conv (∂^{w} η : 𝓢(V, ℂ)) f volume x * u x = + (-1 : ℂ) ^ k * ∫ x, conv η f volume x * (∂^{w} u : 𝓢(V, ℂ)) x := by + induction k generalizing η u with + | zero => simp + | succ k ih => + rw [LineDeriv.iteratedLineDerivOp_succ_left w η, integral_conv_lineDerivOp_mul hp1 hp hf, + ih, LineDeriv.iteratedLineDerivOp_succ_left w u, + SchwartzMap.lineDerivOp_iteratedLineDerivOp_comm, pow_succ] + ring + +/-! ### Weak derivatives and convolution -/ + +/-- **Weak derivatives commute with convolution**: if `g ∈ L_r(V)` is the weak derivative +`∂^v f` of `f ∈ L_p(V)` on `V`, `1 ≤ p, r ≤ ∞`, then `η ⋆ g = (∂^v η) ⋆ f` at every point, for +every Schwartz function `η`. The value `(η ⋆ g)(x)` is `g` tested with `y ↦ η(x - y)`; the +tempered derivative moves to this Schwartz function with the sign `(-1)^k` +(`TemperedDistribution.iteratedLineDerivOp_apply_apply`), which cancels against the sign of +`Rd.iteratedLineDerivOp_shiftReflect`. -/ +theorem conv_eq_conv_iteratedLineDerivOp {p r : ℝ≥0∞} [Fact (1 ≤ p)] [Fact (1 ≤ r)] {k : ℕ} + {v : Fin k → V} {f : Lp ℂ p (volume : Measure V)} {g : Lp ℂ r (volume : Measure V)} + (h : HasWeakLineDeriv ⊤ v f g) (η : 𝓢(V, ℂ)) (x : V) : + conv η g volume x = conv (∂^{v} η : 𝓢(V, ℂ)) f volume x := by + have h' := DFunLike.congr_fun (hasWeakLineDeriv_top_iff.1 h) (shiftReflect η x) + rw [TemperedDistribution.iteratedLineDerivOp_apply_apply, iteratedLineDerivOp_shiftReflect, + smul_smul, ← mul_pow, neg_one_mul, neg_neg, one_pow, one_smul, Lp.toTemperedDistribution_apply, + Lp.toTemperedDistribution_apply] at h' + rw [conv_eq_integral_shiftReflect, conv_eq_integral_shiftReflect] + simpa only [smul_eq_mul] using h'.symm + +/-- **Weak derivatives commute with convolution, for functions**: if `g ∈ L_r(V)` is the weak +derivative `∂^v f` of `f ∈ L_p(V)` on `V`, `1 ≤ p, r ≤ ∞`, then `η ⋆ g = (∂^v η) ⋆ f` at every +point, for every Schwartz function `η` (`Rd.conv_eq_conv_iteratedLineDerivOp` for the classes +of `f` and `g`). -/ +theorem conv_eq_conv_iteratedLineDerivOp_of_memLp {p r : ℝ≥0∞} (hp1 : 1 ≤ p) (hr1 : 1 ≤ r) + {k : ℕ} {v : Fin k → V} {f g : V → ℂ} (hf : MemLp f p) (hg : MemLp g r) + (h : HasWeakLineDeriv ⊤ v f g) (η : 𝓢(V, ℂ)) (x : V) : + conv η g volume x = conv (∂^{v} η : 𝓢(V, ℂ)) f volume x := by + have := Fact.mk hp1 + have := Fact.mk hr1 + have h' : HasWeakLineDeriv ⊤ v (hf.toLp f) (hg.toLp g) := by + refine h.congr_ae ?_ ?_ <;> rw [volume_restrict_top] + exacts [hf.coeFn_toLp.symm, hg.coeFn_toLp.symm] + rw [conv_congr_ae hg.coeFn_toLp.symm, conv_congr_ae hf.coeFn_toLp.symm] + exact conv_eq_conv_iteratedLineDerivOp h' η x + +/-- **The weak derivative of a convolution**: for `f ∈ L_p(V)`, `1 ≤ p < ∞`, a Schwartz function +`η` and `v ∈ V^k`, `(∂^v η) ⋆ f` is the weak derivative `∂^v (η ⋆ f)` on `V`. Tested with `φ`, +this is `∫ ((∂^v η) ⋆ f) φ = (-1)^k ∫ (η ⋆ f) ∂^v φ` +(`Rd.integral_conv_iteratedLineDerivOp_mul`); both convolutions lie in `L_p` by Young's +inequality and are locally integrable. -/ +theorem hasWeakLineDeriv_conv {p : ℝ≥0∞} (hp1 : 1 ≤ p) (hp : p ≠ ∞) {f : V → ℂ} + (hf : MemLp f p) (η : 𝓢(V, ℂ)) {k : ℕ} (v : Fin k → V) : + HasWeakLineDeriv ⊤ v (conv η f volume) (conv (∂^{v} η : 𝓢(V, ℂ)) f volume) := by + have hloc : ∀ G : 𝓢(V, ℂ), + LocallyIntegrableOn (conv G f volume) ((⊤ : Opens V) : Set V) volume := fun G => + locallyIntegrableOn_of_memLp hp1 (by + rw [volume_restrict_top] + exact memLp_conv hp1 hp G.integrable hf) + refine (hasWeakLineDeriv_iff_integral (hloc η) (hloc _)).2 fun φ => ?_ + have hA := integral_conv_iteratedLineDerivOp_mul hp1 hp hf η (testSchwartz φ) v + rw [iteratedLineDerivOp_testSchwartz] at hA + simp only [testSchwartz_apply] at hA + simp only [Complex.real_smul] + rw [Complex.ofReal_pow, Complex.ofReal_neg, Complex.ofReal_one] + simpa only [mul_comm] using hA + +/-- **The weak derivative of a convolution, in `L_p`**: for `f ∈ L_p(V)`, `1 ≤ p < ∞`, a +Schwartz function `η` and `v ∈ V^k`, the class of `(∂^v η) ⋆ f` in `L_p` is the weak derivative +`∂^v` of the class of `η ⋆ f` (`Rd.hasWeakLineDeriv_conv`). -/ +theorem hasWeakLineDeriv_toLp_conv {p : ℝ≥0∞} (hp1 : 1 ≤ p) (hp : p ≠ ∞) {f : V → ℂ} + (hf : MemLp f p) (η : 𝓢(V, ℂ)) {k : ℕ} (v : Fin k → V) : + HasWeakLineDeriv ⊤ v (memLp_conv hp1 hp η.integrable hf).toLp + (memLp_conv hp1 hp (∂^{v} η : 𝓢(V, ℂ)).integrable hf).toLp := by + refine (hasWeakLineDeriv_conv hp1 hp hf η v).congr_ae ?_ ?_ <;> rw [volume_restrict_top] + exacts [(MemLp.coeFn_toLp _).symm, (MemLp.coeFn_toLp _).symm] + +/-- **Weak derivatives commute with convolution by Schwartz functions, in `L_p`**: if `g = ∂^v f` +weakly on `V` for `f ∈ L_p(V)`, `g ∈ L_r(V)`, `1 ≤ p, r < ∞`, `v ∈ V^k`, and the kernel `K` is +a Schwartz function `η`, then `K ⋆ g = ∂^v (K ⋆ f)` weakly on `V`, for the operators `Rd.convLp`. +The weak derivative of `η ⋆ f` is `(∂^v η) ⋆ f` (`Rd.hasWeakLineDeriv_conv`), which equals +`η ⋆ g` at every point (`Rd.conv_eq_conv_iteratedLineDerivOp`). -/ +theorem hasWeakLineDeriv_convLp {p r : ℝ≥0∞} [Fact (1 ≤ p)] [Fact (1 ≤ r)] (hp : p ≠ ∞) + (hr : r ≠ ∞) (η : 𝓢(V, ℂ)) {K : V → ℂ} (hK : Integrable K) (hηK : (η : V → ℂ) = K) {k : ℕ} + {v : Fin k → V} {f : Lp ℂ p (volume : Measure V)} {g : Lp ℂ r (volume : Measure V)} + (h : HasWeakLineDeriv ⊤ v f g) : + HasWeakLineDeriv ⊤ v (convLp hp hK f) (convLp hr hK g) := by + subst hηK + refine (hasWeakLineDeriv_conv Fact.out hp (Lp.memLp f) η v).congr_ae ?_ ?_ <;> + rw [volume_restrict_top] + · exact (convLp_apply_ae hp _ f).symm + · filter_upwards [convLp_apply_ae hr η.integrable g] with x hx + rw [hx, conv_eq_conv_iteratedLineDerivOp h η x] + +/-! ### Weak derivatives on open sets and convolution -/ + +omit [FiniteDimensional ℝ V] [MeasurableSpace V] [BorelSpace V] in +/-- The reflected translate `y ↦ η(x - y)` is `η` composed with the homeomorphism `y ↦ x - y`. -/ +theorem coe_shiftReflect_eq_comp (η : 𝓢(V, ℂ)) (x : V) : + (shiftReflect η x : V → ℂ) = (η : V → ℂ) ∘ Homeomorph.subLeft x := + funext fun y => by simp + +omit [FiniteDimensional ℝ V] [MeasurableSpace V] [BorelSpace V] in +/-- The reflected translate of a compactly supported Schwartz function has compact support. -/ +theorem hasCompactSupport_shiftReflect {η : 𝓢(V, ℂ)} (hη : HasCompactSupport (η : V → ℂ)) + (x : V) : HasCompactSupport (shiftReflect η x : V → ℂ) := by + rw [coe_shiftReflect_eq_comp] + exact hη.comp_homeomorph _ + +omit [FiniteDimensional ℝ V] [MeasurableSpace V] [BorelSpace V] in +/-- The support of the reflected translate `y ↦ η(x - y)` lies in `S` if `x - y ∈ S` for every +`y` in the support of `η`. -/ +theorem tsupport_shiftReflect_subset {η : 𝓢(V, ℂ)} {x : V} {S : Set V} + (hS : ∀ y ∈ tsupport (η : V → ℂ), x - y ∈ S) : tsupport (shiftReflect η x : V → ℂ) ⊆ S := by + rw [coe_shiftReflect_eq_comp, tsupport_comp_eq_preimage] + intro z hz + simpa using hS _ hz + +/-- **Weak derivatives commute with convolution, locally**: if `g = ∂^v f` weakly on an open set +`Ω` and `η` is a compactly supported Schwartz function with `x - y ∈ Ω` for every `y` in the +support of `η`, then `(η ⋆ g)(x) = ((∂^v η) ⋆ f)(x)`: the reflected translate `y ↦ η(x - y)` is a +complex test function on `Ω` (`Rd.HasWeakLineDeriv.integral_mul_eq`, +`Rd.iteratedLineDerivOp_shiftReflect`). -/ +theorem conv_eq_conv_iteratedLineDerivOp_of_hasWeakLineDeriv {Ω : Opens V} {k : ℕ} + {v : Fin k → V} {f g : V → ℂ} (h : HasWeakLineDeriv Ω v f g) {η : 𝓢(V, ℂ)} + (hη : HasCompactSupport (η : V → ℂ)) {x : V} (hx : ∀ y ∈ tsupport (η : V → ℂ), x - y ∈ Ω) : + conv η g volume x = conv (∂^{v} η : 𝓢(V, ℂ)) f volume x := by + rw [conv_eq_integral_shiftReflect, conv_eq_integral_shiftReflect, + h.integral_mul_eq _ (hasCompactSupport_shiftReflect hη x) (tsupport_shiftReflect_subset hx), + iteratedLineDerivOp_shiftReflect] + simp only [smul_apply, smul_eq_mul, mul_assoc] + rw [integral_const_mul, ← mul_assoc, ← mul_pow] + simp + +end Rd diff --git a/LeanPool/FunctionSpaces/Rd/SingularIntegrals/DilationFamilies.lean b/LeanPool/FunctionSpaces/Rd/SingularIntegrals/DilationFamilies.lean new file mode 100644 index 0000000000..5610b07477 --- /dev/null +++ b/LeanPool/FunctionSpaces/Rd/SingularIntegrals/DilationFamilies.lean @@ -0,0 +1,924 @@ +/- +Copyright (c) 2026 Mario Ullrich. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Mario Ullrich +-/ +module + +public import LeanPool.FunctionSpaces.Rd.LocalMeans.KernelMajorants +public import LeanPool.FunctionSpaces.Rd.Approximation.BandInverse +public import LeanPool.FunctionSpaces.Analysis.Fourier.LittlewoodPaleyKernels +public import LeanPool.FunctionSpaces.Rd.Sobolev.SobolevTwoLittlewoodPaley +public import LeanPool.FunctionSpaces.Analysis.Lp.MixedNorms +public import LeanPool.FunctionSpaces.ApproximationSpaces.Sequences.Dyadic + +/- +Modified for Lean Pool: module names and imports adapted. +-/ + +/-! +# Dilation families of Schwartz kernels and the Hörmander condition + +On a finite-dimensional real inner product space `V` of dimension `n` with Lebesgue measure, the +kernels of the vector-valued singular integrals of this project are families +`θ_j = (G_j)_{2^j}`, `j ∈ ℕ`, of dilated Schwartz functions `G_j` whose Schwartz seminorms are +bounded uniformly in `j` (`Rd.IsUniformSchwartz`). Two numbers control such a family +(`Rd.IsCZFamily`): the **Fourier overlap** `B` with `∑_j |𝓕θ_j(ξ)|² ≤ B` for every `ξ`, and the +**Hörmander constant** `H` with +`∫_{‖x‖ > 2‖y‖} ‖(θ_j(x - y) - θ_j(x))_j‖_{ℓ_2} dx ≤ H` for every `y`. Here +`δ_c F = F_c`, `F_c(x) = c^n F(c x)`, is the dilation by `c` (`Rd.dilate`), so that the +Littlewood–Paley kernels are `Φ_k = δ_{2^k} Φ`. + +* **Schwartz forms of dilation, reflection and conjugation** (`Rd.schwartzDilate`, + `Rd.schwartzReflect`, `Rd.schwartzConj`), with `𝓕(G_c)(ξ) = 𝓕G(c⁻¹ ξ)` + (`Rd.fourier_schwartzDilate_apply`) and the chain rule + `∂_{w_0} ⋯ ∂_{w_{k-1}} (G_c) = c^k (∂_{w_0} ⋯ ∂_{w_{k-1}} G)_c` for dilations + (`Rd.iteratedLineDerivOp_schwartzDilate`). +* **One dilate** (`Rd.setLIntegral_enorm_dilate_sub_le_min`): the Hörmander integral of + `G_{2^j}` is at most `H_G min(2^j ‖y‖, (2^j ‖y‖)⁻¹)` with the explicit `H_G` + (`Rd.hormanderConst`): for short steps the `L_1` norm of the difference is at most the step + times the `L_1` norm of the gradient (`Rd.lintegral_enorm_dilate_sub_le_mul`, constant + `Rd.gradMassConst`), for long steps both terms are tails + (`Rd.setLIntegral_enorm_dilate_sub_le_inv`). +* **Uniform families**: with the dyadic sum `∑_j min(2^j a, (2^j a)⁻¹) ≤ 4` + (`ENNReal.tsum_min_two_pow_le`), the Hörmander condition holds for every uniform + family with `H = 4 H_A` (`Rd.lintegral_lqNorm_sub_le`, `Rd.familyHormanderConst`), and + `Rd.IsCZFamily.of_dilation`; finitely many members of a uniform family may be changed + (`Rd.IsUniformSchwartz.of_forall_ge_eq`), also in a Calderón–Zygmund family of dilates + (`Rd.IsCZFamily.of_dilation_of_forall_ge_eq`, with `ENNReal.tsum_le_tsum_add_sum_of_forall_ge_eq` + for the overlap). +* **Adjoints**: `θ_j^*(x) = conj θ_j(-x)` has the same overlap and Hörmander constants + (`Rd.IsCZFamily.adjoint`). +* **The Littlewood–Paley families**: the blocks `ψ_j = (psiBase j)_{2^j}`, Schwartz functions + (`Rd.psiS`), with overlap `2` (`Rd.isCZFamily_psi`), and the synthesis kernels `Rd.psiDual` + with `psiDual_j ⋆ ψ_j = ψ_j` (`Rd.conv_psiDual_psi`, `Rd.isCZFamily_psiDual`, overlap `4`). +-/ + +@[expose] public section + +open MeasureTheory Module Metric Filter Set ComplexConjugate +open scoped ENNReal SchwartzMap FourierTransform LineDeriv + +namespace Rd + +open ENNReal (lqNorm) + +variable {V : Type*} [NormedAddCommGroup V] [InnerProductSpace ℝ V] [FiniteDimensional ℝ V] + [MeasurableSpace V] [BorelSpace V] + +/-! ### Dilation, reflection and conjugation of Schwartz functions -/ + +/-- The **dilation of a Schwartz function**: for `c ≠ 0`, the function +`G_c(x) = c^n G(c x)` is a Schwartz function, the composition of `G` with the linear +equivalence `x ↦ c x` (Mathlib's `SchwartzMap.compCLMOfContinuousLinearEquiv`) times `c^n`. -/ +noncomputable def schwartzDilate (c : ℝ) (hc : c ≠ 0) (G : 𝓢(V, ℂ)) : 𝓢(V, ℂ) := + (((c ^ finrank ℝ V : ℝ)) : ℂ) • SchwartzMap.compCLMOfContinuousLinearEquiv ℂ + (ContinuousLinearEquiv.smulLeft (R₁ := ℝ) (Units.mk0 c hc)) G + +omit [FiniteDimensional ℝ V] [MeasurableSpace V] [BorelSpace V] in +/-- The Schwartz dilation is the dilation `Rd.dilate`. -/ +theorem coe_schwartzDilate (c : ℝ) (hc : c ≠ 0) (G : 𝓢(V, ℂ)) : + (schwartzDilate c hc G : V → ℂ) = dilate c G := by + funext x + simp [schwartzDilate, dilate, Units.smul_def] + +/-- The Fourier transform of a dilate: `𝓕(G_c)(ξ) = 𝓕G(c⁻¹ ξ)` for a Schwartz function `G` and +`c > 0` (`Rd.fourier_dilate`). -/ +theorem fourier_schwartzDilate_apply {c : ℝ} (hc : 0 < c) (G : 𝓢(V, ℂ)) (ξ : V) : + (𝓕 (schwartzDilate c hc.ne' G) : 𝓢(V, ℂ)) ξ = (𝓕 G : 𝓢(V, ℂ)) (c⁻¹ • ξ) := by + rw [SchwartzMap.fourier_coe, coe_schwartzDilate, fourier_dilate _ hc, SchwartzMap.fourier_coe] + +omit [FiniteDimensional ℝ V] [MeasurableSpace V] [BorelSpace V] in +/-- The dilation of Schwartz functions is additive: `(∑_i G_i)_c = ∑_i (G_i)_c`. -/ +theorem schwartzDilate_sum {ι : Type*} (s : Finset ι) (c : ℝ) (hc : c ≠ 0) (G : ι → 𝓢(V, ℂ)) : + schwartzDilate c hc (∑ i ∈ s, G i) = ∑ i ∈ s, schwartzDilate c hc (G i) := by + simp only [schwartzDilate, map_sum, Finset.smul_sum] + +omit [FiniteDimensional ℝ V] [MeasurableSpace V] [BorelSpace V] in +/-- **The chain rule for dilations**: `∂_v (G_c) = c (∂_v G)_c` for every Schwartz function `G` +and every `c ≠ 0`, from Mathlib's `SchwartzMap.lineDerivOp_compCLMOfContinuousLinearEquiv` and +`∂_{c v} = c ∂_v`. -/ +theorem lineDerivOp_schwartzDilate (c : ℝ) (hc : c ≠ 0) (G : 𝓢(V, ℂ)) (v : V) : + ∂_{v} (schwartzDilate c hc G) = (c : ℂ) • schwartzDilate c hc (∂_{v} G) := by + unfold schwartzDilate + rw [LineDeriv.lineDerivOp_smul, SchwartzMap.lineDerivOp_compCLMOfContinuousLinearEquiv, + show (ContinuousLinearEquiv.smulLeft (R₁ := ℝ) (Units.mk0 c hc)) v = c • v from rfl, + LineDeriv.lineDerivOp_left_smul, smul_comm] + congr 1 + +omit [FiniteDimensional ℝ V] [MeasurableSpace V] [BorelSpace V] in +/-- **Iterated derivatives of dilations**: for directions `w ∈ V^k`, +`∂_{w_0} ⋯ ∂_{w_{k-1}} (G_c) = c^k (∂_{w_0} ⋯ ∂_{w_{k-1}} G)_c`. -/ +theorem iteratedLineDerivOp_schwartzDilate (c : ℝ) (hc : c ≠ 0) (G : 𝓢(V, ℂ)) {k : ℕ} + (w : Fin k → V) : + ∂^{w} (schwartzDilate c hc G) = ((c : ℂ) ^ k) • schwartzDilate c hc (∂^{w} G) := by + induction k with + | zero => simp + | succ k ih => + rw [LineDeriv.iteratedLineDerivOp_succ_left, ih, LineDeriv.lineDerivOp_smul, + lineDerivOp_schwartzDilate, smul_smul, ← pow_succ, ← LineDeriv.iteratedLineDerivOp_succ_left] + +/-- The **reflection of a Schwartz function**, `x ↦ G(-x)`. -/ +noncomputable def schwartzReflect (G : 𝓢(V, ℂ)) : 𝓢(V, ℂ) := + SchwartzMap.compCLMOfContinuousLinearEquiv ℂ (ContinuousLinearEquiv.neg ℝ) G + +omit [FiniteDimensional ℝ V] [MeasurableSpace V] [BorelSpace V] in +/-- The Schwartz reflection is `x ↦ G(-x)`. -/ +theorem coe_schwartzReflect (G : 𝓢(V, ℂ)) : + (schwartzReflect G : V → ℂ) = fun x => G (-x) := by + funext x + simp [schwartzReflect] + +/-- The **complex conjugate of a Schwartz function**, `x ↦ conj G(x)` (Mathlib's +`SchwartzMap.postcompCLM` with the real-linear conjugation). -/ +noncomputable def schwartzConj (G : 𝓢(V, ℂ)) : 𝓢(V, ℂ) := + SchwartzMap.postcompCLM (𝕜 := ℝ) Complex.conjCLE.toContinuousLinearMap G + +omit [FiniteDimensional ℝ V] [MeasurableSpace V] [BorelSpace V] in +/-- The Schwartz conjugate is `x ↦ conj G(x)`. -/ +theorem coe_schwartzConj (G : 𝓢(V, ℂ)) : + (schwartzConj G : V → ℂ) = fun x => conj (G x) := by + funext x + simp [schwartzConj] + +omit [FiniteDimensional ℝ V] [MeasurableSpace V] [BorelSpace V] in +/-- Dilations are linear: `(F - G)_c = F_c - G_c`. -/ +theorem dilate_sub (c : ℝ) (F G : V → ℂ) : dilate c (F - G) = dilate c F - dilate c G := by + funext x + simp only [dilate, Pi.sub_apply, mul_sub] + +/-! ### Uniform Schwartz families -/ + +/-- A family `(G_j)_{j ∈ ℕ}` of Schwartz functions is **uniformly Schwartz with bounds `A`** if +every Schwartz seminorm `sup_x ‖x‖^k ‖D^l G_j(x)‖` is at most `A k l`, for every `j`. -/ +def IsUniformSchwartz (G : ℕ → 𝓢(V, ℂ)) (A : ℕ → ℕ → ℝ) : Prop := + ∀ j k l, SchwartzMap.seminorm ℝ k l (G j) ≤ A k l + +omit [FiniteDimensional ℝ V] [MeasurableSpace V] [BorelSpace V] in +/-- A family taking only the two values `G₀` and `G₁` is uniformly Schwartz, with the larger of +the two seminorms as bounds. -/ +theorem IsUniformSchwartz.of_forall_eq_or_eq {G : ℕ → 𝓢(V, ℂ)} {G₀ G₁ : 𝓢(V, ℂ)} + (h : ∀ j, G j = G₀ ∨ G j = G₁) : + IsUniformSchwartz G fun k l => + max (SchwartzMap.seminorm ℝ k l G₀) (SchwartzMap.seminorm ℝ k l G₁) := by + intro j k l + rcases h j with hj | hj <;> rw [hj] + · exact le_max_left _ _ + · exact le_max_right _ _ + +omit [FiniteDimensional ℝ V] [MeasurableSpace V] [BorelSpace V] in +/-- A constant family `j ↦ G` is uniformly Schwartz, with the seminorms of `G` as bounds. -/ +theorem IsUniformSchwartz.const (G : 𝓢(V, ℂ)) : + IsUniformSchwartz (fun _ => G) fun k l => SchwartzMap.seminorm ℝ k l G := + fun _ _ _ => le_rfl + +omit [FiniteDimensional ℝ V] [MeasurableSpace V] [BorelSpace V] in +/-- A family taking its values in a finite nonempty set `s` of Schwartz functions is uniformly +Schwartz, with the largest seminorm over `s` as bounds. -/ +theorem IsUniformSchwartz.of_forall_mem {G : ℕ → 𝓢(V, ℂ)} {s : Finset 𝓢(V, ℂ)} + (hs : s.Nonempty) (h : ∀ j, G j ∈ s) : + IsUniformSchwartz G fun k l => s.sup' hs fun g => SchwartzMap.seminorm ℝ k l g := + fun j k l => Finset.le_sup' (fun g => SchwartzMap.seminorm ℝ k l g) (h j) + +omit [FiniteDimensional ℝ V] [MeasurableSpace V] [BorelSpace V] in +/-- The seminorm bounds `A k l` of a uniform family are nonnegative, since they dominate a +seminorm. -/ +theorem IsUniformSchwartz.nonneg {G : ℕ → 𝓢(V, ℂ)} {A : ℕ → ℕ → ℝ} (h : IsUniformSchwartz G A) + (k l : ℕ) : 0 ≤ A k l := + (apply_nonneg _ _).trans (h 0 k l) + +omit [FiniteDimensional ℝ V] [MeasurableSpace V] [BorelSpace V] in +/-- **Finitely many exceptions**: a family `(G'_j)` that agrees with a uniform family `(G_j)` for +`j ≥ N` is uniformly Schwartz, with the bounds `max(A_{k,l}, ∑_{i < N} ‖G'_i‖_{k,l})`. -/ +theorem IsUniformSchwartz.of_forall_ge_eq {G G' : ℕ → 𝓢(V, ℂ)} {A : ℕ → ℕ → ℝ} + (h : IsUniformSchwartz G A) {N : ℕ} (hG : ∀ j, N ≤ j → G' j = G j) : + IsUniformSchwartz G' fun k l => + max (A k l) (∑ i ∈ Finset.range N, SchwartzMap.seminorm ℝ k l (G' i)) := by + intro j k l + by_cases hj : N ≤ j + · rw [hG j hj] + exact (h j k l).trans (le_max_left _ _) + · exact le_max_of_le_right (Finset.single_le_sum (f := fun i => SchwartzMap.seminorm ℝ k l (G' i)) + (fun _ _ => apply_nonneg _ _) (Finset.mem_range.2 (not_le.1 hj))) + +/-- The decay constant `2^N (A_{0,r} + A_{N,r})` of a uniform family, the analogue of +`Rd.schwartzDecayConst` with the seminorms replaced by their bounds. -/ +noncomputable def familyDecayConst (A : ℕ → ℕ → ℝ) (r N : ℕ) : ℝ≥0∞ := + 2 ^ N * ENNReal.ofReal (A 0 r + A N r) + +/-- The decay constant of a uniform family is finite. -/ +theorem familyDecayConst_ne_top (A : ℕ → ℕ → ℝ) (r N : ℕ) : familyDecayConst A r N ≠ ∞ := + ENNReal.mul_ne_top (ENNReal.pow_ne_top ENNReal.ofNat_ne_top) ENNReal.ofReal_ne_top + +omit [FiniteDimensional ℝ V] [MeasurableSpace V] [BorelSpace V] in +/-- Every member of a uniform family has decay constant at most that of the family. -/ +theorem schwartzDecayConst_le_familyDecayConst {G : ℕ → 𝓢(V, ℂ)} {A : ℕ → ℕ → ℝ} + (h : IsUniformSchwartz G A) (j r N : ℕ) : + schwartzDecayConst (G j) r N ≤ familyDecayConst A r N := by + unfold schwartzDecayConst familyDecayConst + gcongr + · exact h j 0 r + · exact h j N r + +variable (V) in +/-- The tail constant `C_{A,0,N+r+n+1} I_{n+1}` of a uniform family, the analogue of +`Rd.tailConst`. -/ +noncomputable def familyTailConst (A : ℕ → ℕ → ℝ) (r N : ℕ) : ℝ≥0∞ := + familyDecayConst A 0 (N + r + finrank ℝ V + 1) * peetreIntegral V (finrank ℝ V + 1) + +/-- The tail constant of a uniform family is finite. -/ +theorem familyTailConst_ne_top (A : ℕ → ℕ → ℝ) (r N : ℕ) : familyTailConst V A r N ≠ ∞ := + ENNReal.mul_ne_top (familyDecayConst_ne_top _ _ _) (peetreIntegral_ne_top (Nat.lt_succ_self _)) + +/-- Every member of a uniform family has tail constant at most that of the family. -/ +theorem tailConst_le_familyTailConst {G : ℕ → 𝓢(V, ℂ)} {A : ℕ → ℕ → ℝ} + (h : IsUniformSchwartz G A) (j r N : ℕ) : tailConst (G j) r N ≤ familyTailConst V A r N := by + unfold tailConst familyTailConst + gcongr + exact schwartzDecayConst_le_familyDecayConst h j 0 _ + +/-! ### The gradient mass -/ + +omit [FiniteDimensional ℝ V] [MeasurableSpace V] [BorelSpace V] in +/-- **Decay of the derivatives of a Schwartz function**: +`‖D^r G(x)‖ ≤ C_{G,r,N} (1 + ‖x‖)^(-N)` with `C_{G,r,N} = Rd.schwartzDecayConst G r N`. -/ +theorem enorm_iteratedFDeriv_schwartz_le (G : 𝓢(V, ℂ)) (r N : ℕ) (x : V) : + ‖iteratedFDeriv ℝ r (G : V → ℂ) x‖ₑ ≤ schwartzDecayConst G r N * ((1 + ‖x‖ₑ) ^ N)⁻¹ := by + have h := one_add_norm_pow_mul_le_schwartz G r N x + have hpos : (0 : ℝ) < (1 + ‖x‖) ^ N := by positivity + have h' : ‖iteratedFDeriv ℝ r (G : V → ℂ) x‖ ≤ + 2 ^ N * (SchwartzMap.seminorm ℝ 0 r G + SchwartzMap.seminorm ℝ N r G) * + ((1 + ‖x‖) ^ N)⁻¹ := by + rw [← div_eq_mul_inv, le_div_iff₀ hpos, mul_comm] + exact h + have e3 : ENNReal.ofReal (((1 + ‖x‖) ^ N)⁻¹) = ((1 + ‖x‖ₑ) ^ N)⁻¹ := by + have h3 := ofReal_inv_one_add_mul_norm_pow zero_le_one x N + rwa [one_mul, ENNReal.ofReal_one, one_mul] at h3 + rw [← ofReal_norm] + refine (ENNReal.ofReal_le_ofReal h').trans_eq ?_ + rw [ENNReal.ofReal_mul (by positivity), ENNReal.ofReal_mul (by positivity), + ENNReal.ofReal_pow zero_le_two, ENNReal.ofReal_ofNat, e3, schwartzDecayConst] + +/-- The **gradient mass** `C_{G,1,n+1} I_{n+1}` of a Schwartz function `G`, a bound for +`∫ ‖DG‖`. -/ +noncomputable def gradMassConst (G : 𝓢(V, ℂ)) : ℝ≥0∞ := + schwartzDecayConst G 1 (finrank ℝ V + 1) * peetreIntegral V (finrank ℝ V + 1) + +/-- The gradient mass of a Schwartz function is finite. -/ +theorem gradMassConst_ne_top (G : 𝓢(V, ℂ)) : gradMassConst G ≠ ∞ := + ENNReal.mul_ne_top (schwartzDecayConst_ne_top _ _ _) (peetreIntegral_ne_top (Nat.lt_succ_self _)) + +/-- **`L_1` norms of directional derivatives**: `∫ |∂_v G| ≤ ‖v‖ M_G` with the gradient mass +`M_G = Rd.gradMassConst G`. -/ +theorem lintegral_enorm_lineDerivOp_le (v : V) (G : 𝓢(V, ℂ)) : + ∫⁻ x, ‖(∂_{v} G : 𝓢(V, ℂ)) x‖ₑ ≤ ‖v‖ₑ * gradMassConst G := by + have hpt : ∀ x, ‖(∂_{v} G : 𝓢(V, ℂ)) x‖ₑ ≤ ‖v‖ₑ * schwartzDecayConst G 1 (finrank ℝ V + 1) * + ((1 + ‖x‖ₑ) ^ (finrank ℝ V + 1))⁻¹ := fun x => by + have h1 := enorm_iteratedLineDerivOp_le v 1 G x + rw [LineDeriv.iteratedLineDerivOp_one, pow_one] at h1 + calc ‖(∂_{v} G : 𝓢(V, ℂ)) x‖ₑ ≤ ‖v‖ₑ * ‖iteratedFDeriv ℝ 1 (G : V → ℂ) x‖ₑ := h1 + _ ≤ ‖v‖ₑ * (schwartzDecayConst G 1 (finrank ℝ V + 1) * + ((1 + ‖x‖ₑ) ^ (finrank ℝ V + 1))⁻¹) := by + gcongr + exact enorm_iteratedFDeriv_schwartz_le G 1 _ x + _ = _ := by ring + calc ∫⁻ x, ‖(∂_{v} G : 𝓢(V, ℂ)) x‖ₑ + ≤ ∫⁻ x, ‖v‖ₑ * schwartzDecayConst G 1 (finrank ℝ V + 1) * + ((1 + ‖x‖ₑ) ^ (finrank ℝ V + 1))⁻¹ := lintegral_mono hpt + _ = ‖v‖ₑ * schwartzDecayConst G 1 (finrank ℝ V + 1) * peetreIntegral V (finrank ℝ V + 1) := + lintegral_const_mul' _ _ (ENNReal.mul_ne_top eNorm_ne_top (schwartzDecayConst_ne_top _ _ _)) + _ = ‖v‖ₑ * gradMassConst G := by rw [gradMassConst, mul_assoc] + +variable (V) in +/-- The gradient mass `C_{A,1,n+1} I_{n+1}` of a uniform family. -/ +noncomputable def familyGradMass (A : ℕ → ℕ → ℝ) : ℝ≥0∞ := + familyDecayConst A 1 (finrank ℝ V + 1) * peetreIntegral V (finrank ℝ V + 1) + +/-- The gradient mass of a uniform family is finite. -/ +theorem familyGradMass_ne_top (A : ℕ → ℕ → ℝ) : familyGradMass V A ≠ ∞ := + ENNReal.mul_ne_top (familyDecayConst_ne_top _ _ _) (peetreIntegral_ne_top (Nat.lt_succ_self _)) + +/-- Every member of a uniform family has gradient mass at most that of the family. -/ +theorem gradMassConst_le_familyGradMass {G : ℕ → 𝓢(V, ℂ)} {A : ℕ → ℕ → ℝ} + (h : IsUniformSchwartz G A) (j : ℕ) : gradMassConst (G j) ≤ familyGradMass V A := by + unfold gradMassConst familyGradMass + gcongr + exact schwartzDecayConst_le_familyDecayConst h j 1 _ + +/-! ### The Hörmander bound for one dilate -/ + +/-- **Short steps**: `∫ |G_{2^j}(x - y) - G_{2^j}(x)| dx ≤ M_G 2^j ‖y‖` with the gradient mass +`M_G = Rd.gradMassConst G`: the difference is the dilate of the difference of `G` with step +`-2^j y` (`Rd.higherDiff_dilate`), dilations keep `L_1` norms, and a difference is at most the +directional derivative in `L_1` (`Rd.lintegral_enorm_fwdDiff_le`). -/ +theorem lintegral_enorm_dilate_sub_le_mul (G : 𝓢(V, ℂ)) (j : ℕ) (y : V) : + ∫⁻ x, ‖dilate (2 ^ j) G (x - y) - dilate (2 ^ j) G x‖ₑ ≤ + gradMassConst G * (2 ^ j * ‖y‖ₑ) := by + have hdiff : ∀ x, dilate (2 ^ j) (G : V → ℂ) (x - y) - dilate (2 ^ j) G x = + dilate (2 ^ j) (fwdDiff (((2 : ℝ) ^ j) • -y) (G : V → ℂ)) x := fun x => by + have h := higherDiff_dilate 1 ((2 : ℝ) ^ j) (-y) (G : V → ℂ) + simp only [Function.iterate_one] at h + rw [← h] + simp [fwdDiff, sub_eq_add_neg] + calc ∫⁻ x, ‖dilate (2 ^ j) (G : V → ℂ) (x - y) - dilate (2 ^ j) G x‖ₑ + = ∫⁻ x, ‖dilate (2 ^ j) (fwdDiff (((2 : ℝ) ^ j) • -y) (G : V → ℂ)) x‖ₑ := + lintegral_congr fun x => by rw [hdiff x] + _ = ∫⁻ x, ‖fwdDiff (((2 : ℝ) ^ j) • -y) (G : V → ℂ) x‖ₑ := + lintegral_enorm_dilate _ (by positivity) + _ ≤ ∫⁻ x, ‖(∂_{((2 : ℝ) ^ j) • -y} G : 𝓢(V, ℂ)) x‖ₑ := lintegral_enorm_fwdDiff_le _ G + _ ≤ ‖((2 : ℝ) ^ j) • -y‖ₑ * gradMassConst G := lintegral_enorm_lineDerivOp_le _ G + _ = _ := by rw [enorm_two_pow_smul, eNorm_neg, mul_comm] + +omit [InnerProductSpace ℝ V] [FiniteDimensional ℝ V] [MeasurableSpace V] [BorelSpace V] in +/-- `(1 + 2^j ‖y‖)^(-1) ≤ (2^j ‖y‖)^(-1)` in `[0, ∞]`. -/ +theorem inv_one_add_ofReal_two_pow_mul_le (j : ℕ) (y : V) : + (1 + ENNReal.ofReal (2 ^ j * ‖y‖))⁻¹ ≤ (2 ^ j * ‖y‖ₑ)⁻¹ := by + rw [ENNReal.ofReal_mul (by positivity), ENNReal.ofReal_pow zero_le_two, + ENNReal.ofReal_ofNat, ofReal_norm] + exact ENNReal.inv_le_inv.2 le_add_self + +/-- `(1 + 2^j)^(-1) ≤ 2^(-j)` in `[0, ∞]`, written in the form `((1 + ofReal (2^j · 1))^1)^(-1)` +of the tail bound `Rd.setLIntegral_enorm_dilate_schwartz_le` at radius `1` and order `1`. -/ +theorem inv_one_add_ofReal_two_pow_le (j : ℕ) : + ((1 + ENNReal.ofReal (2 ^ j * 1)) ^ 1)⁻¹ ≤ (2⁻¹ : ℝ≥0∞) ^ j := by + rw [mul_one, pow_one, ENNReal.ofReal_pow zero_le_two, ENNReal.ofReal_ofNat, ← ENNReal.inv_pow] + exact ENNReal.inv_le_inv.2 le_add_self + +/-- **Long steps**: `∫_{‖x‖ > 2‖y‖} |G_{2^j}(x - y) - G_{2^j}(x)| dx ≤ 2 T_G (2^j ‖y‖)^(-1)` with +`T_G = Rd.tailConst G 0 1`: both `x` and `x - y` lie outside the ball of radius `‖y‖`, where the +mass of `G_{2^j}` is at most `T_G (1 + 2^j ‖y‖)^(-1)` +(`Rd.setLIntegral_enorm_dilate_schwartz_le`). -/ +theorem setLIntegral_enorm_dilate_sub_le_inv (G : 𝓢(V, ℂ)) (j : ℕ) (y : V) : + ∫⁻ x in {x : V | 2 * ‖y‖ < ‖x‖}, ‖dilate (2 ^ j) G (x - y) - dilate (2 ^ j) G x‖ₑ ≤ + 2 * tailConst G 0 1 * (2 ^ j * ‖y‖ₑ)⁻¹ := by + have hS : MeasurableSet {x : V | 2 * ‖y‖ < ‖x‖} := + measurableSet_lt measurable_const measurable_norm + have hT : MeasurableSet {z : V | ‖y‖ ≤ ‖z‖} := measurableSet_le measurable_const measurable_norm + have hc : Continuous (dilate (2 ^ j) (G : V → ℂ)) := continuous_dilate G.continuous _ + have htail : ∫⁻ z in {z : V | ‖y‖ ≤ ‖z‖}, ‖dilate (2 ^ j) (G : V → ℂ) z‖ₑ ≤ + tailConst G 0 1 * (2 ^ j * ‖y‖ₑ)⁻¹ := by + have h := setLIntegral_enorm_dilate_schwartz_le G 1 j ‖y‖ + rw [pow_one] at h + exact h.trans (mul_le_mul_right (inv_one_add_ofReal_two_pow_mul_le j y) _) + have h1 : ∫⁻ x in {x : V | 2 * ‖y‖ < ‖x‖}, ‖dilate (2 ^ j) (G : V → ℂ) x‖ₑ ≤ + ∫⁻ z in {z : V | ‖y‖ ≤ ‖z‖}, ‖dilate (2 ^ j) (G : V → ℂ) z‖ₑ := + lintegral_mono_set fun x (hx : 2 * ‖y‖ < ‖x‖) => by + change ‖y‖ ≤ ‖x‖ + linarith [norm_nonneg y] + have h2 : ∫⁻ x in {x : V | 2 * ‖y‖ < ‖x‖}, ‖dilate (2 ^ j) (G : V → ℂ) (x - y)‖ₑ ≤ + ∫⁻ z in {z : V | ‖y‖ ≤ ‖z‖}, ‖dilate (2 ^ j) (G : V → ℂ) z‖ₑ := by + rw [← lintegral_indicator hS, ← lintegral_indicator hT] + calc ∫⁻ x, {x : V | 2 * ‖y‖ < ‖x‖}.indicator + (fun x => ‖dilate (2 ^ j) (G : V → ℂ) (x - y)‖ₑ) x + ≤ ∫⁻ x, {z : V | ‖y‖ ≤ ‖z‖}.indicator + (fun z => ‖dilate (2 ^ j) (G : V → ℂ) z‖ₑ) (x - y) := lintegral_mono fun x => by + by_cases hx : x ∈ {x : V | 2 * ‖y‖ < ‖x‖} + · have hxy : x - y ∈ {z : V | ‖y‖ ≤ ‖z‖} := by + have hx' : 2 * ‖y‖ < ‖x‖ := hx + change ‖y‖ ≤ ‖x - y‖ + linarith [norm_sub_norm_le x y] + rw [indicator_of_mem hx, indicator_of_mem hxy] + · rw [indicator_of_notMem hx] + exact zero_le + _ = _ := lintegral_sub_right_eq_self _ y + calc ∫⁻ x in {x : V | 2 * ‖y‖ < ‖x‖}, ‖dilate (2 ^ j) G (x - y) - dilate (2 ^ j) G x‖ₑ + ≤ ∫⁻ x in {x : V | 2 * ‖y‖ < ‖x‖}, + (‖dilate (2 ^ j) (G : V → ℂ) (x - y)‖ₑ + ‖dilate (2 ^ j) (G : V → ℂ) x‖ₑ) := + lintegral_mono fun x => eNorm_sub_le + _ = (∫⁻ x in {x : V | 2 * ‖y‖ < ‖x‖}, ‖dilate (2 ^ j) (G : V → ℂ) (x - y)‖ₑ) + + ∫⁻ x in {x : V | 2 * ‖y‖ < ‖x‖}, ‖dilate (2 ^ j) (G : V → ℂ) x‖ₑ := + lintegral_add_right _ hc.eNorm.measurable + _ ≤ tailConst G 0 1 * (2 ^ j * ‖y‖ₑ)⁻¹ + tailConst G 0 1 * (2 ^ j * ‖y‖ₑ)⁻¹ := + add_le_add (h2.trans htail) (h1.trans htail) + _ = _ := by ring + +/-- The **Hörmander constant** `M_G + 2 T_G` of a Schwartz function `G`, with the gradient mass +`M_G = Rd.gradMassConst G` and the tail constant `T_G = Rd.tailConst G 0 1`. -/ +noncomputable def hormanderConst (G : 𝓢(V, ℂ)) : ℝ≥0∞ := gradMassConst G + 2 * tailConst G 0 1 + +/-- The Hörmander constant of a Schwartz function is finite. -/ +theorem hormanderConst_ne_top (G : 𝓢(V, ℂ)) : hormanderConst G ≠ ∞ := + ENNReal.add_ne_top.2 ⟨gradMassConst_ne_top G, + ENNReal.mul_ne_top ENNReal.ofNat_ne_top (tailConst_ne_top G 0 1)⟩ + +/-- **The Hörmander bound for one dilate**: for every Schwartz function `G`, `j ∈ ℕ` and +`y ∈ V`, +`∫_{‖x‖ > 2‖y‖} |G_{2^j}(x - y) - G_{2^j}(x)| dx ≤ H_G min(2^j ‖y‖, (2^j ‖y‖)⁻¹)` with +`H_G = Rd.hormanderConst G`; at `y = 0` both sides vanish, since `0⁻¹ = ∞` in `[0, ∞]`. -/ +theorem setLIntegral_enorm_dilate_sub_le_min (G : 𝓢(V, ℂ)) (j : ℕ) (y : V) : + ∫⁻ x in {x : V | 2 * ‖y‖ < ‖x‖}, ‖dilate (2 ^ j) G (x - y) - dilate (2 ^ j) G x‖ₑ ≤ + hormanderConst G * min (2 ^ j * ‖y‖ₑ) (2 ^ j * ‖y‖ₑ)⁻¹ := by + rcases le_or_gt (2 ^ j * ‖y‖ₑ) 1 with h | h + · rw [min_eq_left (h.trans (ENNReal.one_le_inv.2 h))] + calc _ ≤ ∫⁻ x, ‖dilate (2 ^ j) (G : V → ℂ) (x - y) - dilate (2 ^ j) G x‖ₑ := + setLIntegral_le_lintegral _ _ + _ ≤ gradMassConst G * (2 ^ j * ‖y‖ₑ) := lintegral_enorm_dilate_sub_le_mul G j y + _ ≤ hormanderConst G * (2 ^ j * ‖y‖ₑ) := by + gcongr + exact le_self_add + · rw [min_eq_right ((ENNReal.inv_lt_one.2 h).le.trans h.le)] + calc _ ≤ 2 * tailConst G 0 1 * (2 ^ j * ‖y‖ₑ)⁻¹ := setLIntegral_enorm_dilate_sub_le_inv G j y + _ ≤ hormanderConst G * (2 ^ j * ‖y‖ₑ)⁻¹ := by + gcongr + exact le_add_self + +/-! ### The Hörmander condition for uniform families -/ + +variable (V) in +/-- The **Hörmander constant of a uniform family**, `M_A + 2 T_A` with the gradient mass +`M_A = Rd.familyGradMass V A` and the tail constant `T_A = Rd.familyTailConst V A 0 1`. -/ +noncomputable def familyHormanderConst (A : ℕ → ℕ → ℝ) : ℝ≥0∞ := + familyGradMass V A + 2 * familyTailConst V A 0 1 + +/-- The Hörmander constant of a uniform family is finite. -/ +theorem familyHormanderConst_ne_top (A : ℕ → ℕ → ℝ) : familyHormanderConst V A ≠ ∞ := + ENNReal.add_ne_top.2 ⟨familyGradMass_ne_top A, + ENNReal.mul_ne_top ENNReal.ofNat_ne_top (familyTailConst_ne_top A 0 1)⟩ + +/-- Every member of a uniform family has Hörmander constant at most that of the family. -/ +theorem hormanderConst_le_familyHormanderConst {G : ℕ → 𝓢(V, ℂ)} {A : ℕ → ℕ → ℝ} + (h : IsUniformSchwartz G A) (j : ℕ) : hormanderConst (G j) ≤ familyHormanderConst V A := by + unfold hormanderConst familyHormanderConst + gcongr + · exact gradMassConst_le_familyGradMass h j + · exact tailConst_le_familyTailConst h j 0 1 + +/-- **The Hörmander condition for dilation families**: for a uniform family `(G_j)` with bounds +`A` and every `y ∈ V`, +`∫_{‖x‖ > 2‖y‖} ‖((G_j)_{2^j}(x - y) - (G_j)_{2^j}(x))_j‖_{ℓ_2} dx ≤ 4 H_A` with +`H_A = Rd.familyHormanderConst V A`. The `ℓ_2` norm is at most the `ℓ_1` norm +(`ENNReal.lqNorm_le_lqNorm_one`), each term is bounded by +`Rd.setLIntegral_enorm_dilate_sub_le_min`, and the dyadic sum by `ENNReal.tsum_min_two_pow_le`. -/ +theorem lintegral_lqNorm_sub_le {G : ℕ → 𝓢(V, ℂ)} {A : ℕ → ℕ → ℝ} (h : IsUniformSchwartz G A) + (y : V) : + ∫⁻ x in {x : V | 2 * ‖y‖ < ‖x‖}, + lqNorm 2 (fun j => ‖dilate (2 ^ j) (G j) (x - y) - dilate (2 ^ j) (G j) x‖ₑ) ≤ + 4 * familyHormanderConst V A := by + have hmeas : ∀ j, AEMeasurable (fun x => ‖dilate (2 ^ j) (G j : V → ℂ) (x - y) - + dilate (2 ^ j) (G j : V → ℂ) x‖ₑ) (volume.restrict {x : V | 2 * ‖y‖ < ‖x‖}) := fun j => + (((continuous_dilate (G j).continuous _).comp (continuous_id.sub continuous_const)).sub + (continuous_dilate (G j).continuous _)).eNorm.measurable.aemeasurable + calc ∫⁻ x in {x : V | 2 * ‖y‖ < ‖x‖}, + lqNorm 2 (fun j => ‖dilate (2 ^ j) (G j) (x - y) - dilate (2 ^ j) (G j) x‖ₑ) + ≤ ∫⁻ x in {x : V | 2 * ‖y‖ < ‖x‖}, + ∑' j, ‖dilate (2 ^ j) (G j : V → ℂ) (x - y) - dilate (2 ^ j) (G j : V → ℂ) x‖ₑ := + lintegral_mono fun x => ENNReal.lqNorm_le_lqNorm_one one_le_two _ + _ = ∑' j, ∫⁻ x in {x : V | 2 * ‖y‖ < ‖x‖}, + ‖dilate (2 ^ j) (G j : V → ℂ) (x - y) - dilate (2 ^ j) (G j : V → ℂ) x‖ₑ := + lintegral_tsum hmeas + _ ≤ ∑' j : ℕ, familyHormanderConst V A * min (2 ^ j * ‖y‖ₑ) (2 ^ j * ‖y‖ₑ)⁻¹ := + tsum_le_tsum fun j => (setLIntegral_enorm_dilate_sub_le_min (G j) j y).trans + (by gcongr; exact hormanderConst_le_familyHormanderConst h j) + _ = familyHormanderConst V A * ∑' j : ℕ, min (2 ^ j * ‖y‖ₑ) (2 ^ j * ‖y‖ₑ)⁻¹ := + ENNReal.tsum_mul_left + _ ≤ familyHormanderConst V A * 4 := by gcongr; exact ENNReal.tsum_min_two_pow_le _ + _ = 4 * familyHormanderConst V A := mul_comm _ _ + +/-! ### Calderón–Zygmund families -/ + +/-- A **Calderón–Zygmund family** `(θ_j)_{j ∈ ℕ}` of kernels on `V` with **Fourier overlap** `B` +and **Hörmander constant** `H`: the kernels are integrable, continuous and bounded with +integrable Fourier transforms, `∑_j |𝓕θ_j(ξ)|² ≤ B` for every `ξ`, and +`∫_{‖x‖ > 2‖y‖} ‖(θ_j(x - y) - θ_j(x))_j‖_{ℓ_2} dx ≤ H` for every `y`. -/ +structure IsCZFamily (θ : ℕ → V → ℂ) (B H : ℝ≥0∞) : Prop where + /-- Every kernel is integrable. -/ + integrable : ∀ j, Integrable (θ j) + /-- Every kernel is continuous. -/ + continuous : ∀ j, Continuous (θ j) + /-- Every kernel is bounded. -/ + bddAbove : ∀ j, BddAbove (Set.range fun x => ‖θ j x‖) + /-- Every kernel has an integrable Fourier transform. -/ + integrable_fourier : ∀ j, Integrable (𝓕 (θ j)) + /-- The Fourier overlap: `∑_j |𝓕θ_j(ξ)|² ≤ B` for every `ξ`. -/ + overlap : ∀ ξ, ∑' j, ‖𝓕 (θ j) ξ‖ₑ ^ 2 ≤ B + /-- The Hörmander condition with constant `H`. -/ + hormander : ∀ y, ∫⁻ x in {x : V | 2 * ‖y‖ < ‖x‖}, + lqNorm 2 (fun j => ‖θ j (x - y) - θ j x‖ₑ) ≤ H + +/-- **Larger constants**: a Calderón–Zygmund family with overlap `B` and Hörmander constant `H` +is one with every larger overlap `B' ≥ B` and Hörmander constant `H' ≥ H`. -/ +theorem IsCZFamily.mono {θ : ℕ → V → ℂ} {B H B' H' : ℝ≥0∞} (h : IsCZFamily θ B H) + (hB : B ≤ B') (hH : H ≤ H') : IsCZFamily θ B' H' where + integrable := h.integrable + continuous := h.continuous + bddAbove := h.bddAbove + integrable_fourier := h.integrable_fourier + overlap ξ := (h.overlap ξ).trans hB + hormander y := (h.hormander y).trans hH + +/-- **Fourier transform of the adjoint kernel**: `𝓕(conj θ(-·))(ξ) = conj 𝓕θ(ξ)`, from +`conj 𝓕θ = 𝓕⁻(conj θ)` (`Rd.conj_fourier_apply`) and `𝓕⁻ f = 𝓕(f(-·))` (Mathlib's +`Real.fourierInv_eq_fourier_comp_neg`). -/ +theorem fourier_conj_comp_neg (θ : V → ℂ) (ξ : V) : + 𝓕 (fun x => conj (θ (-x))) ξ = conj (𝓕 θ ξ) := by + rw [conj_fourier_apply, Real.fourierInv_eq_fourier_comp_neg] + +/-- **Adjoint families**: if `(θ_j)` is a Calderón–Zygmund family with overlap `B` and Hörmander +constant `H`, so is `(θ_j^*)` with `θ_j^*(x) = conj θ_j(-x)`: the Fourier transforms are +conjugated, and the Hörmander integral is invariant under `x ↦ -x`, `y ↦ -y`. -/ +theorem IsCZFamily.adjoint {θ : ℕ → V → ℂ} {B H : ℝ≥0∞} (h : IsCZFamily θ B H) : + IsCZFamily (fun j x => conj (θ j (-x))) B H where + integrable j := Complex.conjCLE.toContinuousLinearMap.integrable_comp (h.integrable j).comp_neg + continuous j := Complex.continuous_conj.comp ((h.continuous j).comp continuous_neg) + bddAbove j := by + obtain ⟨M, hM⟩ := h.bddAbove j + refine ⟨M, Set.forall_mem_range.2 fun x => ?_⟩ + rw [Complex.norm_conj] + exact hM (Set.mem_range_self _) + integrable_fourier j := by + rw [show 𝓕 (fun x => conj (θ j (-x))) = fun ξ => conj (𝓕 (θ j) ξ) from + funext (fourier_conj_comp_neg (θ j))] + exact Complex.conjCLE.toContinuousLinearMap.integrable_comp (h.integrable_fourier j) + overlap ξ := by + simp_rw [fourier_conj_comp_neg, RCLike.eNorm_conj] + exact h.overlap ξ + hormander y := by + have hS : ∀ z : V, MeasurableSet {x : V | 2 * ‖z‖ < ‖x‖} := fun z => + measurableSet_lt measurable_const measurable_norm + have hF : ∀ x, (fun j => ‖conj (θ j (-(x - y))) - conj (θ j (-x))‖ₑ) = + fun j => ‖θ j (-x - -y) - θ j (-x)‖ₑ := fun x => by + funext j + rw [← map_sub, RCLike.eNorm_conj, neg_sub, sub_neg_eq_add, neg_add_eq_sub] + simp_rw [hF] + rw [← lintegral_indicator (hS y)] + calc ∫⁻ x, {x : V | 2 * ‖y‖ < ‖x‖}.indicator + (fun x => lqNorm 2 fun j => ‖θ j (-x - -y) - θ j (-x)‖ₑ) x + = ∫⁻ x, {x : V | 2 * ‖-y‖ < ‖x‖}.indicator + (fun z => lqNorm 2 fun j => ‖θ j (z - -y) - θ j z‖ₑ) (-x) := lintegral_congr fun x => by + by_cases hx : 2 * ‖y‖ < ‖x‖ + · have hx' : -x ∈ {x : V | 2 * ‖-y‖ < ‖x‖} := by + change 2 * ‖-y‖ < ‖-x‖ + rwa [norm_neg, norm_neg] + rw [indicator_of_mem (show x ∈ {x : V | 2 * ‖y‖ < ‖x‖} from hx), + indicator_of_mem hx'] + · have hx' : -x ∉ {x : V | 2 * ‖-y‖ < ‖x‖} := by + change ¬ 2 * ‖-y‖ < ‖-x‖ + rwa [norm_neg, norm_neg] + rw [indicator_of_notMem (show x ∉ {x : V | 2 * ‖y‖ < ‖x‖} from hx), + indicator_of_notMem hx'] + _ = ∫⁻ x, {x : V | 2 * ‖-y‖ < ‖x‖}.indicator + (fun z => lqNorm 2 fun j => ‖θ j (z - -y) - θ j z‖ₑ) x := lintegral_neg_eq_self _ + _ ≤ H := by + rw [lintegral_indicator (hS (-y))] + exact h.hormander (-y) + +/-- **Dilation families are Calderón–Zygmund families**: for a uniform family `(G_j)` with bounds +`A` whose dilates `θ_j = (G_j)_{2^j}` satisfy `∑_j |𝓕θ_j(ξ)|² ≤ B` for every `ξ`, `(θ_j)` is a +Calderón–Zygmund family with overlap `B` and Hörmander constant `4 H_A`, +`H_A = Rd.familyHormanderConst V A`. -/ +theorem IsCZFamily.of_dilation {G : ℕ → 𝓢(V, ℂ)} {A : ℕ → ℕ → ℝ} {B : ℝ≥0∞} + (h : IsUniformSchwartz G A) + (hB : ∀ ξ, ∑' j, ‖𝓕 (dilate (2 ^ j) (G j : V → ℂ)) ξ‖ₑ ^ 2 ≤ B) : + IsCZFamily (fun j => dilate (2 ^ j) (G j : V → ℂ)) B (4 * familyHormanderConst V A) where + integrable j := integrable_dilate (G j).integrable (by positivity) + continuous j := continuous_dilate (G j).continuous _ + bddAbove j := bddAbove_dilate (bddAbove_schwartz _) _ + integrable_fourier j := integrable_fourier_dilate + (by rw [← SchwartzMap.fourier_coe]; exact (𝓕 (G j)).integrable) (by positivity) + overlap := hB + hormander := lintegral_lqNorm_sub_le h + +/-- The Fourier transform of a dilate of a Schwartz function `G` is bounded by the supremum of +`𝓕G`: `|𝓕(G_c)(ξ)| ≤ ‖𝓕G‖_{0,0}` for `c > 0` (`Rd.fourier_dilate`). -/ +theorem enorm_fourier_dilate_le (G : 𝓢(V, ℂ)) {c : ℝ} (hc : 0 < c) (ξ : V) : + ‖𝓕 (dilate c (G : V → ℂ)) ξ‖ₑ ≤ ENNReal.ofReal (SchwartzMap.seminorm ℝ 0 0 (𝓕 G)) := by + rw [fourier_dilate _ hc, ← SchwartzMap.fourier_coe, ← ofReal_norm] + exact ENNReal.ofReal_le_ofReal (SchwartzMap.norm_le_seminorm ℝ _ _) + +/-- **Dilation families with finitely many exceptional members**: let `(G_j)` be uniformly +Schwartz with bounds `A` and let its dilates `(G_j)_{2^j}` have the Fourier overlap `B`. If +`G'_j = G_j` for every `j ≥ N`, then the dilates `(G'_j)_{2^j}` form a Calderón–Zygmund family +with overlap `B + ∑_{i < N} ‖𝓕G'_i‖_{0,0}²` and Hörmander constant `4 H_{A'}`, where +`A'_{k,l} = max(A_{k,l}, ∑_{i < N} ‖G'_i‖_{k,l})` (`Rd.IsUniformSchwartz.of_forall_ge_eq`, +`ENNReal.tsum_le_tsum_add_sum_of_forall_ge_eq`, `Rd.IsCZFamily.of_dilation`). -/ +theorem IsCZFamily.of_dilation_of_forall_ge_eq {G G' : ℕ → 𝓢(V, ℂ)} {A : ℕ → ℕ → ℝ} + {B : ℝ≥0∞} (h : IsUniformSchwartz G A) + (hB : ∀ ξ, ∑' j, ‖𝓕 (dilate (2 ^ j) (G j : V → ℂ)) ξ‖ₑ ^ 2 ≤ B) {N : ℕ} + (hG : ∀ j, N ≤ j → G' j = G j) : + IsCZFamily (fun j => dilate (2 ^ j) (G' j : V → ℂ)) + (B + ∑ i ∈ Finset.range N, ENNReal.ofReal (SchwartzMap.seminorm ℝ 0 0 (𝓕 (G' i))) ^ 2) + (4 * familyHormanderConst V fun k l => + max (A k l) (∑ i ∈ Finset.range N, SchwartzMap.seminorm ℝ k l (G' i))) := + IsCZFamily.of_dilation (h.of_forall_ge_eq hG) fun ξ => + (ENNReal.tsum_le_tsum_add_sum_of_forall_ge_eq + (v := fun j => ‖𝓕 (dilate (2 ^ j) (G j : V → ℂ)) ξ‖ₑ ^ 2) fun j hj => by + rw [hG j hj]).trans + (add_le_add (hB ξ) (Finset.sum_le_sum fun i _ => by + gcongr + exact enorm_fourier_dilate_le _ (by positivity) ξ)) + +/-! ### The Littlewood–Paley kernels as dilation families -/ + +/-- `𝓕Φ_k = 1` on the closed ball of radius `2^k`. -/ +theorem fourier_Phi_eq_one {k : ℕ} {ξ : V} (h : ‖ξ‖ ≤ 2 ^ k) : 𝓕 (Phi (V := V) k) ξ = 1 := by + rw [fourier_Phi] + refine cutoff_eq_one _ _ ?_ + rw [norm_two_pow_inv_smul, div_le_one (by positivity)] + exact h + +/-- `𝓕Φ_k = 0` outside the ball of radius `2^(k+1)`. -/ +theorem fourier_Phi_eq_zero {k : ℕ} {ξ : V} (h : 2 ^ (k + 1) ≤ ‖ξ‖) : + 𝓕 (Phi (V := V) k) ξ = 0 := by + rw [fourier_Phi] + refine cutoff_eq_zero _ _ ?_ + rw [norm_two_pow_inv_smul, le_div_iff₀ (by positivity)] + rw [pow_succ] at h + linarith + +/-- `𝓕Φ_k(ξ)` is a real number in `[0, 1]`: it is a value of the cut-off `χ_{1,2}` +(`Rd.fourier_Phi`), a smooth bump with values in `[0, 1]` (Mathlib's `ContDiffBump`). -/ +theorem exists_fourier_Phi_eq_ofReal (k : ℕ) (ξ : V) : + ∃ t : ℝ, 0 ≤ t ∧ t ≤ 1 ∧ 𝓕 (Phi (V := V) k) ξ = t := by + let b : ContDiffBump (0 : V) := ⟨1, 2, one_pos, one_lt_two⟩ + exact ⟨b (((2 : ℝ) ^ k)⁻¹ • ξ), b.nonneg, b.le_one, fourier_Phi k ξ⟩ + +/-- `|𝓕Φ_k(ξ)| ≤ 1`. -/ +theorem norm_fourier_Phi_le_one (k : ℕ) (ξ : V) : ‖𝓕 (Phi (V := V) k) ξ‖ ≤ 1 := by + obtain ⟨t, ht0, ht1, ht⟩ := exists_fourier_Phi_eq_ofReal (V := V) k ξ + rw [ht, Complex.norm_real, Real.norm_of_nonneg ht0] + exact ht1 + +/-- `|𝓕Φ_k(ξ) - 𝓕Φ_l(ξ)| ≤ 1`, since both values lie in `[0, 1]`. -/ +theorem norm_fourier_Phi_sub_le_one (k l : ℕ) (ξ : V) : + ‖𝓕 (Phi (V := V) k) ξ - 𝓕 (Phi (V := V) l) ξ‖ ≤ 1 := by + obtain ⟨t, ht0, ht1, ht⟩ := exists_fourier_Phi_eq_ofReal (V := V) k ξ + obtain ⟨u, hu0, hu1, hu⟩ := exists_fourier_Phi_eq_ofReal (V := V) l ξ + rw [ht, hu, ← Complex.ofReal_sub, Complex.norm_real, Real.norm_eq_abs, abs_sub_le_iff] + constructor <;> linarith + +/-- The Schwartz functions behind the blocks: `psiBase 0 = Φ` and +`psiBase (j+1) = Φ - δ_{1/2} Φ`, with the dilation `δ_c F(x) = c^n F(c x)`, so that +`ψ_j = δ_{2^j} (psiBase j)` (`Rd.dilate_psiBase`). -/ +noncomputable def psiBase : ℕ → 𝓢(V, ℂ) + | 0 => lpKernelS + | _ + 1 => lpKernelS - schwartzDilate (1 / 2) (by norm_num) lpKernelS + +/-- **The blocks are dilates**: `ψ_j = (psiBase j)_{2^j}`. -/ +theorem dilate_psiBase (j : ℕ) : dilate (2 ^ j) (psiBase (V := V) j : V → ℂ) = psi j := by + cases j with + | zero => rfl + | succ j => + have hcoe : ∀ F H : 𝓢(V, ℂ), ((F - H : 𝓢(V, ℂ)) : V → ℂ) = F - H := fun _ _ => rfl + rw [psiBase, hcoe, coe_schwartzDilate, dilate_sub, dilate_dilate] + change dilate (2 ^ (j + 1)) lpKernel - dilate (2 ^ (j + 1) * (1 / 2)) lpKernel = psi (j + 1) + rw [show (2 : ℝ) ^ (j + 1) * (1 / 2) = 2 ^ j by ring] + rfl + +/-- The Littlewood–Paley block `ψ_j = (psiBase j)_{2^j}` as a Schwartz function. -/ +noncomputable def psiS (j : ℕ) : 𝓢(V, ℂ) := + schwartzDilate (2 ^ j) (pow_ne_zero j two_ne_zero) (psiBase j) + +/-- The Schwartz function `Rd.psiS j` is the block `ψ_j` (`Rd.dilate_psiBase`). -/ +theorem coe_psiS (j : ℕ) : (psiS j : V → ℂ) = psi j := by + rw [psiS, coe_schwartzDilate, dilate_psiBase] + +variable (V) in +/-- The seminorm bounds of the family `psiBase`, the larger of the seminorms of `Φ` and of +`Φ - δ_{1/2} Φ`. -/ +noncomputable def psiBaseBound (k l : ℕ) : ℝ := + max (SchwartzMap.seminorm ℝ k l (lpKernelS (V := V))) + (SchwartzMap.seminorm ℝ k l (lpKernelS (V := V) - schwartzDilate (1 / 2) (by norm_num) + lpKernelS)) + +/-- The seminorm bounds of the family `psiBase` are nonnegative. -/ +theorem psiBaseBound_nonneg (k l : ℕ) : 0 ≤ psiBaseBound V k l := + le_max_of_le_left (apply_nonneg _ _) + +/-- The family `psiBase` is uniformly Schwartz with bounds `Rd.psiBaseBound V`. -/ +theorem isUniformSchwartz_psiBase : IsUniformSchwartz (psiBase (V := V)) (psiBaseBound V) := + IsUniformSchwartz.of_forall_eq_or_eq fun j => by + cases j with + | zero => exact Or.inl rfl + | succ j => exact Or.inr rfl + +/-- **Overlap of the blocks**: `∑_j |𝓕ψ_j(ξ)|² ≤ 2` for every `ξ`, the case `s = 0` of +`Rd.tsum_dyadicWeight_fourier_psi_sq_le`. -/ +theorem tsum_fourier_psi_sq_le (ξ : V) : ∑' j, ‖𝓕 (psi (V := V) j) ξ‖ₑ ^ 2 ≤ 2 := by + simpa [besselWeight] using tsum_dyadicWeight_fourier_psi_sq_le (V := V) le_rfl ξ + +/-- **The blocks form a Calderón–Zygmund family** with overlap `2` and Hörmander constant +`4 H_{A^ψ}`, `H_{A^ψ} = Rd.familyHormanderConst V (Rd.psiBaseBound V)`. -/ +theorem isCZFamily_psi : + IsCZFamily (psi (V := V)) 2 (4 * familyHormanderConst V (psiBaseBound V)) := by + have h := IsCZFamily.of_dilation (G := psiBase (V := V)) (A := psiBaseBound V) (B := 2) + isUniformSchwartz_psiBase fun ξ => by + simp_rw [dilate_psiBase] + exact tsum_fourier_psi_sq_le ξ + rwa [show (fun j => dilate (2 ^ j) (psiBase (V := V) j : V → ℂ)) = psi from + funext dilate_psiBase] at h + +/-- The **synthesis kernels** `psiDual 0 = Φ_1`, `psiDual 1 = Φ_2`, +`psiDual (j+2) = Φ_{j+3} - Φ_j`, with `psiDual_j ⋆ ψ_j = ψ_j` (`Rd.conv_psiDual_psi`). -/ +noncomputable def psiDual : ℕ → V → ℂ + | 0 => Phi 1 + | 1 => Phi 2 + | j + 2 => Phi (j + 3) - Phi j + +/-- The Schwartz functions behind the synthesis kernels: `psiDualBase 0 = psiDualBase 1 = δ_2 Φ` +and `psiDualBase (j+2) = δ_2 Φ - δ_{1/4} Φ`, with the dilation `δ_c F(x) = c^n F(c x)`, so that +`psiDual_j = δ_{2^j} (psiDualBase j)` (`Rd.dilate_psiDualBase`). -/ +noncomputable def psiDualBase : ℕ → 𝓢(V, ℂ) + | 0 => schwartzDilate 2 two_ne_zero lpKernelS + | 1 => schwartzDilate 2 two_ne_zero lpKernelS + | _ + 2 => schwartzDilate 2 two_ne_zero lpKernelS - schwartzDilate (1 / 4) (by norm_num) + lpKernelS + +/-- **The synthesis kernels are dilates**: `psiDual_j = (psiDualBase j)_{2^j}`. -/ +theorem dilate_psiDualBase (j : ℕ) : + dilate (2 ^ j) (psiDualBase (V := V) j : V → ℂ) = psiDual j := by + match j with + | 0 => + rw [psiDualBase, coe_schwartzDilate, dilate_dilate] + change dilate (2 ^ 0 * 2) lpKernel = dilate (2 ^ 1) lpKernel + norm_num + | 1 => + rw [psiDualBase, coe_schwartzDilate, dilate_dilate] + change dilate (2 ^ 1 * 2) lpKernel = dilate (2 ^ 2) lpKernel + norm_num + | j + 2 => + have hcoe : ∀ F H : 𝓢(V, ℂ), ((F - H : 𝓢(V, ℂ)) : V → ℂ) = F - H := fun _ _ => rfl + rw [psiDualBase, hcoe, coe_schwartzDilate, coe_schwartzDilate, dilate_sub, + dilate_dilate, dilate_dilate] + change dilate (2 ^ (j + 2) * 2) lpKernel - dilate (2 ^ (j + 2) * (1 / 4)) lpKernel = + dilate (2 ^ (j + 3)) lpKernel - dilate (2 ^ j) lpKernel + rw [show (2 : ℝ) ^ (j + 2) * 2 = 2 ^ (j + 3) by ring, + show (2 : ℝ) ^ (j + 2) * (1 / 4) = 2 ^ j by ring] + +variable (V) in +/-- The seminorm bounds of the family `psiDualBase`, the larger of the seminorms of `δ_2 Φ` and +of `δ_2 Φ - δ_{1/4} Φ`. -/ +noncomputable def psiDualBaseBound (k l : ℕ) : ℝ := + max (SchwartzMap.seminorm ℝ k l (schwartzDilate 2 two_ne_zero (lpKernelS (V := V)))) + (SchwartzMap.seminorm ℝ k l (schwartzDilate 2 two_ne_zero (lpKernelS (V := V)) - + schwartzDilate (1 / 4) (by norm_num) lpKernelS)) + +/-- The seminorm bounds of the family `psiDualBase` are nonnegative. -/ +theorem psiDualBaseBound_nonneg (k l : ℕ) : 0 ≤ psiDualBaseBound V k l := + le_max_of_le_left (apply_nonneg _ _) + +/-- The family `psiDualBase` is uniformly Schwartz with bounds `Rd.psiDualBaseBound V`. -/ +theorem isUniformSchwartz_psiDualBase : + IsUniformSchwartz (psiDualBase (V := V)) (psiDualBaseBound V) := + IsUniformSchwartz.of_forall_eq_or_eq fun j => by + match j with + | 0 => exact Or.inl rfl + | 1 => exact Or.inl rfl + | _ + 2 => exact Or.inr rfl + +/-- The synthesis kernels are integrable. -/ +theorem integrable_psiDual (j : ℕ) : Integrable (psiDual (V := V) j) := by + rw [← dilate_psiDualBase] + exact integrable_dilate (psiDualBase j).integrable (by positivity) + +/-- The synthesis kernels are continuous. -/ +theorem continuous_psiDual (j : ℕ) : Continuous (psiDual (V := V) j) := by + rw [← dilate_psiDualBase] + exact continuous_dilate (psiDualBase j).continuous _ + +/-- The synthesis kernels are bounded. -/ +theorem bddAbove_psiDual (j : ℕ) : BddAbove (Set.range fun x => ‖psiDual (V := V) j x‖) := by + rw [← dilate_psiDualBase] + exact bddAbove_dilate (bddAbove_schwartz _) _ + +/-- The Fourier transforms of the synthesis kernels are integrable. -/ +theorem integrable_fourier_psiDual (j : ℕ) : Integrable (𝓕 (psiDual (V := V) j)) := by + rw [← dilate_psiDualBase] + exact integrable_fourier_dilate + (by rw [← SchwartzMap.fourier_coe]; exact (𝓕 (psiDualBase (V := V) j)).integrable) + (by positivity) + +/-- `‖psiDual_j‖_1 ≤ 2 ‖Φ‖_1`. -/ +theorem eLpNorm_psiDual_one_le (j : ℕ) : + eLpNorm (psiDual (V := V) j) 1 volume ≤ 2 * eLpNorm (lpKernel (V := V)) 1 volume := by + match j with + | 0 => + change eLpNorm (Phi (V := V) 1) 1 volume ≤ _ + rw [eLpNorm_Phi_one, two_mul] + exact le_self_add + | 1 => + change eLpNorm (Phi (V := V) 2) 1 volume ≤ _ + rw [eLpNorm_Phi_one, two_mul] + exact le_self_add + | j + 2 => + change eLpNorm (Phi (V := V) (j + 3) - Phi j) 1 volume ≤ _ + calc eLpNorm (Phi (V := V) (j + 3) - Phi j) 1 volume + ≤ eLpNorm (Phi (V := V) (j + 3)) 1 volume + eLpNorm (Phi (V := V) j) 1 volume := + eLpNorm_sub_le le_rfl + _ = 2 * eLpNorm (lpKernel (V := V)) 1 volume := by + rw [eLpNorm_Phi_one, eLpNorm_Phi_one, two_mul] + +/-- `𝓕 psiDual_{j+2} = 𝓕Φ_{j+3} - 𝓕Φ_j`. -/ +theorem fourier_psiDual_add_two (j : ℕ) (ξ : V) : + 𝓕 (psiDual (V := V) (j + 2)) ξ = 𝓕 (Phi (V := V) (j + 3)) ξ - 𝓕 (Phi (V := V) j) ξ := + fourier_sub_apply (integrable_Phi _) (integrable_Phi _) ξ + +/-- `𝓕 psiDual_j · 𝓕ψ_j = 𝓕ψ_j`: wherever `𝓕ψ_j(ξ) ≠ 0`, `‖ξ‖ < 2^(j+1)`, so +`𝓕Φ_{j+1}(ξ) = 1`, and for `j ≥ 2` also `‖ξ‖ > 2^(j-1)`, so `𝓕Φ_{j-2}(ξ) = 0`; hence +`𝓕 psiDual_j(ξ) = 1` there. -/ +theorem fourier_psiDual_mul_psi (j : ℕ) (ξ : V) : + 𝓕 (psiDual (V := V) j) ξ * 𝓕 (psi (V := V) j) ξ = 𝓕 (psi (V := V) j) ξ := by + by_cases h : 𝓕 (psi (V := V) j) ξ = 0 + · rw [h, mul_zero] + have hlt := norm_lt_of_fourier_psi_ne_zero h + suffices 𝓕 (psiDual (V := V) j) ξ = 1 by rw [this, one_mul] + match j with + | 0 => exact fourier_Phi_eq_one hlt.le + | 1 => exact fourier_Phi_eq_one (hlt.le.trans (pow_le_pow_right₀ one_le_two (by omega))) + | m + 2 => + have hgt : 2 ^ (m + 1) < ‖ξ‖ := not_le.1 fun h' => h (fourier_psi_succ_eq_zero h') + rw [fourier_psiDual_add_two, fourier_Phi_eq_one hlt.le, fourier_Phi_eq_zero hgt.le, sub_zero] + +/-- **The synthesis kernels reproduce the blocks**: `psiDual_j ⋆ ψ_j = ψ_j`, by comparing +Fourier transforms (`Rd.conv_eq_of_fourier`). -/ +theorem conv_psiDual_psi (j : ℕ) : conv (psiDual (V := V) j) (psi j) volume = psi j := + conv_eq_of_fourier (integrable_psiDual _) (integrable_psi _) (continuous_psi _) + (bddAbove_psi _) (integrable_psi _) (continuous_psi _) (integrable_fourier_psi _) + (fourier_psiDual_mul_psi j) + +/-- `|𝓕 psiDual_j(ξ)| ≤ 1`. -/ +theorem enorm_fourier_psiDual_le_one (j : ℕ) (ξ : V) : ‖𝓕 (psiDual (V := V) j) ξ‖ₑ ≤ 1 := by + rw [← ofReal_norm, ← ENNReal.ofReal_one] + refine ENNReal.ofReal_le_ofReal ?_ + match j with + | 0 => exact norm_fourier_Phi_le_one 1 ξ + | 1 => exact norm_fourier_Phi_le_one 2 ξ + | m + 2 => + rw [fourier_psiDual_add_two] + exact norm_fourier_Phi_sub_le_one (m + 3) m ξ + +/-- `𝓕 psiDual_j` vanishes outside the ball of radius `2^(j+2)`. -/ +theorem norm_lt_of_fourier_psiDual_ne_zero {j : ℕ} {ξ : V} + (h : 𝓕 (psiDual (V := V) j) ξ ≠ 0) : ‖ξ‖ < 2 ^ (j + 2) := by + match j with + | 0 => exact norm_lt_of_fourier_Phi_ne_zero h + | 1 => exact norm_lt_of_fourier_Phi_ne_zero h + | m + 2 => + rw [fourier_psiDual_add_two] at h + by_cases h3 : 𝓕 (Phi (V := V) (m + 3)) ξ = 0 + · rw [h3, zero_sub, neg_ne_zero] at h + exact (norm_lt_of_fourier_Phi_ne_zero h).trans + (pow_lt_pow_right₀ one_lt_two (by omega)) + · exact norm_lt_of_fourier_Phi_ne_zero h3 + +/-- `𝓕 psiDual_{m+2}` vanishes on the closed ball of radius `2^m`. -/ +theorem lt_norm_of_fourier_psiDual_ne_zero {m : ℕ} {ξ : V} + (h : 𝓕 (psiDual (V := V) (m + 2)) ξ ≠ 0) : 2 ^ m < ‖ξ‖ := by + by_contra hle + push Not at hle + apply h + rw [fourier_psiDual_add_two, fourier_Phi_eq_one hle, + fourier_Phi_eq_one (hle.trans (pow_le_pow_right₀ one_le_two (by omega))), sub_self] + +/-- **At most four synthesis kernels see a frequency**: with `a` the least index such that +`‖ξ‖ < 2^(a+1)`, `𝓕 psiDual_j(ξ) ≠ 0` forces `a - 1 ≤ j ≤ a + 2`. -/ +theorem mem_Icc_of_fourier_psiDual_ne_zero {a j : ℕ} {ξ : V} (ha : ‖ξ‖ < 2 ^ (a + 1)) + (hmin : ∀ i < a, ¬ ‖ξ‖ < 2 ^ (i + 1)) (h : 𝓕 (psiDual (V := V) j) ξ ≠ 0) : + j ∈ Finset.Icc (a - 1) (a + 2) := by + have hlo : a ≤ j + 1 := by + by_contra hlt + exact hmin (j + 1) (by omega) (norm_lt_of_fourier_psiDual_ne_zero h) + have hhi : j ≤ a + 2 := by + match j, h with + | 0, _ => omega + | 1, _ => omega + | m + 2, h => + have h1 := (lt_norm_of_fourier_psiDual_ne_zero h).trans ha + have h2 : m < a + 1 := (pow_lt_pow_iff_right₀ one_lt_two).1 h1 + omega + exact Finset.mem_Icc.2 ⟨by omega, hhi⟩ + +/-- **Overlap of the synthesis kernels**: `∑_j |𝓕 psiDual_j(ξ)|² ≤ 4` for every `ξ`: at most four +kernels are nonzero at `ξ` (`Rd.mem_Icc_of_fourier_psiDual_ne_zero`), each of modulus at most +`1`. -/ +theorem tsum_fourier_psiDual_sq_le (ξ : V) : ∑' j, ‖𝓕 (psiDual (V := V) j) ξ‖ₑ ^ 2 ≤ 4 := by + classical + have hex : ∃ a : ℕ, ‖ξ‖ < 2 ^ (a + 1) := by + obtain ⟨n, hn⟩ := pow_unbounded_of_one_lt ‖ξ‖ (one_lt_two : (1 : ℝ) < 2) + exact ⟨n, hn.trans (pow_lt_pow_right₀ one_lt_two n.lt_succ_self)⟩ + have hsupp := fun j => mem_Icc_of_fourier_psiDual_ne_zero (j := j) (Nat.find_spec hex) + (fun i hi => Nat.find_min hex hi) + rw [tsum_eq_sum (s := Finset.Icc (Nat.find hex - 1) (Nat.find hex + 2)) (fun j hj => ?_)] + · calc ∑ j ∈ Finset.Icc (Nat.find hex - 1) (Nat.find hex + 2), ‖𝓕 (psiDual (V := V) j) ξ‖ₑ ^ 2 + ≤ ∑ _j ∈ Finset.Icc (Nat.find hex - 1) (Nat.find hex + 2), (1 : ℝ≥0∞) := + Finset.sum_le_sum fun j _ => pow_le_one₀ zero_le (enorm_fourier_psiDual_le_one j ξ) + _ = ((Finset.Icc (Nat.find hex - 1) (Nat.find hex + 2)).card : ℝ≥0∞) := by simp + _ ≤ 4 := by + rw [Nat.card_Icc] + exact_mod_cast (by omega : Nat.find hex + 2 + 1 - (Nat.find hex - 1) ≤ 4) + · have : 𝓕 (psiDual (V := V) j) ξ = 0 := by + by_contra h + exact hj (hsupp j h) + simp [this] + +/-- **The synthesis kernels form a Calderón–Zygmund family** with overlap `4` and Hörmander +constant `4 H_Ã`, `H_Ã = Rd.familyHormanderConst V (Rd.psiDualBaseBound V)`. -/ +theorem isCZFamily_psiDual : + IsCZFamily (psiDual (V := V)) 4 (4 * familyHormanderConst V (psiDualBaseBound V)) := by + have h := IsCZFamily.of_dilation (G := psiDualBase (V := V)) (A := psiDualBaseBound V) (B := 4) + isUniformSchwartz_psiDualBase fun ξ => by + simp_rw [dilate_psiDualBase] + exact tsum_fourier_psiDual_sq_le ξ + rwa [show (fun j => dilate (2 ^ j) (psiDualBase (V := V) j : V → ℂ)) = psiDual from + funext dilate_psiDualBase] at h + +end Rd diff --git a/LeanPool/FunctionSpaces/Rd/SingularIntegrals/PlancherelBounds.lean b/LeanPool/FunctionSpaces/Rd/SingularIntegrals/PlancherelBounds.lean new file mode 100644 index 0000000000..2cdc18a32a --- /dev/null +++ b/LeanPool/FunctionSpaces/Rd/SingularIntegrals/PlancherelBounds.lean @@ -0,0 +1,222 @@ +/- +Copyright (c) 2026 Mario Ullrich. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Mario Ullrich +-/ +module + +public import LeanPool.FunctionSpaces.Rd.SingularIntegrals.DilationFamilies + +/- +Modified for Lean Pool: module names and imports adapted. +-/ + +/-! +# Plancherel bounds for families of convolution operators + +Let `V` be a finite-dimensional real inner product space with Lebesgue measure, and let +`(θ_j)_{j ∈ ℕ}` be integrable kernels with **Fourier overlap** `B`: +`∑_j |𝓕θ_j(ξ)|² ≤ B` for almost every `ξ`. This file proves the `L_2` bounds of the analysis +operator `f ↦ (θ_j ⋆ f)_j` and of the synthesis operators `(g_j)_j ↦ ∑_{j ∈ s} θ_j ⋆ g_j` for +finite sets `s`, by Plancherel's theorem for one convolution, `‖K ⋆ f‖_2² = ∫ |𝓕K|² |𝓕f|²` +(`Rd.enorm_convLp_sq`), and the convolution theorem on `L_2` (`Rd.fourier_convLp`). + +* **The analysis bound** (`Rd.tsum_enorm_convLp_sq_le`, `Rd.lintegral_lqNorm_conv_sq_le`): + `∑_j ‖θ_j ⋆ f‖_2² ≤ B ‖f‖_2²`, that is, `∫ ‖((θ_j ⋆ f)(x))_j‖_{ℓ_2}² dx ≤ B ∫ |f|²`. +* **The synthesis bound** (`Rd.enorm_sum_convLp_sq_le`, `Rd.lintegral_enorm_sum_conv_sq_le`): + for every finite set `s` of indices, `‖∑_{j ∈ s} θ_j ⋆ g_j‖_2² ≤ B ∑_{j ∈ s} ‖g_j‖_2²`, + hence `∫ |∑_{j ∈ s} θ_j ⋆ g_j|² ≤ B ∫ ‖(g_j(x))_j‖_{ℓ_2}² dx`, by the Cauchy–Schwarz + inequality at each frequency (`enorm_sum_mul_sq_le`). +* **Calderón–Zygmund families** satisfy both bounds with their overlap `B` + (`Rd.IsCZFamily.lintegral_lqNorm_conv_sq_le`, `Rd.IsCZFamily.lintegral_enorm_sum_conv_sq_le`). +-/ + +@[expose] public section + +open MeasureTheory +open scoped ENNReal FourierTransform + +/-! ### Cauchy–Schwarz and squares of `L_2` norms -/ + +/-- **The Cauchy–Schwarz inequality for finite sums of products**: +`|∑_{j ∈ s} a_j b_j|² ≤ (∑_{j ∈ s} |a_j|²) (∑_{j ∈ s} |b_j|²)` in every seminormed ring, such +as `ℂ`, with values in `[0, ∞]` (Mathlib's `Finset.sum_mul_sq_le_sq_mul_sq` for the norms, after +the triangle inequality and `‖a b‖ ≤ ‖a‖ ‖b‖`). -/ +theorem enorm_sum_mul_sq_le {R ι : Type*} [SeminormedRing R] (s : Finset ι) (a b : ι → R) : + ‖∑ j ∈ s, a j * b j‖ₑ ^ 2 ≤ (∑ j ∈ s, ‖a j‖ₑ ^ 2) * ∑ j ∈ s, ‖b j‖ₑ ^ 2 := by + have h1 : ‖∑ j ∈ s, a j * b j‖₊ ≤ ∑ j ∈ s, ‖a j‖₊ * ‖b j‖₊ := + (nnNorm_sum_le _ _).trans (Finset.sum_le_sum fun j _ => nnNorm_mul_le _ _) + have h2 : ‖∑ j ∈ s, a j * b j‖₊ ^ 2 ≤ (∑ j ∈ s, ‖a j‖₊ ^ 2) * ∑ j ∈ s, ‖b j‖₊ ^ 2 := + (pow_le_pow_left₀ zero_le h1 2).trans + (Finset.sum_mul_sq_le_sq_mul_sq s (fun j => ‖a j‖₊) fun j => ‖b j‖₊) + simp only [eNorm_eq_nnNorm] + exact_mod_cast h2 + +namespace Rd + +open ENNReal (lqNorm) + +variable {V : Type*} [NormedAddCommGroup V] [InnerProductSpace ℝ V] [FiniteDimensional ℝ V] + [MeasurableSpace V] [BorelSpace V] + +/-- **The `L_2` norm of a convolution through its class**: for integrable `K` and `f ∈ L_2(V)`, +`∫ |K ⋆ f|² = ‖K ⋆ f‖_2²` with the convolution operator `Rd.convLp` on `L_2(V)`. -/ +theorem lintegral_enorm_conv_sq_eq {K f : V → ℂ} (hK : Integrable K) (hf : MemLp f 2) : + ∫⁻ x, ‖conv K f volume x‖ₑ ^ 2 = ‖convLp two_ne_top hK (hf.toLp f)‖ₑ ^ 2 := by + rw [enorm_sq_eq_lintegral] + refine lintegral_congr_ae ?_ + filter_upwards [convLp_apply_ae two_ne_top hK (hf.toLp f)] with x hx + rw [hx, conv_congr_ae hf.coeFn_toLp] + +/-! ### The analysis bound -/ + +/-- **The analysis bound on `L_2`**: for integrable kernels `θ_j` with Fourier overlap `B`, +`∑_j |𝓕θ_j(ξ)|² ≤ B` for almost every `ξ`, and every `f ∈ L_2(V)`, +`∑_j ‖θ_j ⋆ f‖_2² ≤ B ‖f‖_2²`. By `Rd.enorm_convLp_sq` the left side is +`∫ (∑_j |𝓕θ_j|²) |𝓕f|²` (Mathlib's `lintegral_tsum`), and Plancherel's theorem gives +`∫ |𝓕f|² = ‖f‖_2²`. -/ +theorem tsum_enorm_convLp_sq_le {θ : ℕ → V → ℂ} (hθ : ∀ j, Integrable (θ j)) {B : ℝ≥0∞} + (hB : ∀ᵐ ξ ∂volume, ∑' j, ‖𝓕 (θ j) ξ‖ₑ ^ 2 ≤ B) (f : Lp ℂ 2 (volume : Measure V)) : + ∑' j, ‖convLp two_ne_top (hθ j) f‖ₑ ^ 2 ≤ B * ‖f‖ₑ ^ 2 := by + have hF : AEMeasurable (fun ξ => ‖(𝓕 f : Lp ℂ 2 (volume : Measure V)) ξ‖ₑ ^ 2) volume := + (Lp.aestronglyMeasurable _).eNorm.pow_const 2 + have hm : ∀ j, AEMeasurable (fun ξ => ‖𝓕 (θ j) ξ‖ₑ ^ 2 * + ‖(𝓕 f : Lp ℂ 2 (volume : Measure V)) ξ‖ₑ ^ 2) volume := fun j => + ((memLp_top_fourier (hθ j)).aestronglyMeasurable.eNorm.pow_const 2).mul hF + rw [tsum_congr fun j => enorm_convLp_sq (hθ j) f, ← lintegral_tsum hm] + calc ∫⁻ ξ, ∑' j, ‖𝓕 (θ j) ξ‖ₑ ^ 2 * ‖(𝓕 f : Lp ℂ 2 (volume : Measure V)) ξ‖ₑ ^ 2 + = ∫⁻ ξ, (∑' j, ‖𝓕 (θ j) ξ‖ₑ ^ 2) * ‖(𝓕 f : Lp ℂ 2 (volume : Measure V)) ξ‖ₑ ^ 2 := by + simp_rw [ENNReal.tsum_mul_right] + _ ≤ ∫⁻ ξ, B * ‖(𝓕 f : Lp ℂ 2 (volume : Measure V)) ξ‖ₑ ^ 2 := by + refine lintegral_mono_ae ?_ + filter_upwards [hB] with ξ hξ + gcongr + _ = B * ‖f‖ₑ ^ 2 := by + rw [lintegral_const_mul'' _ hF, ← enorm_sq_eq_lintegral, enorm_fourier_Lp_two] + +/-- **The analysis bound on `L_2`, for functions**: for integrable kernels `θ_j` with Fourier +overlap `B` (almost everywhere) and every `f ∈ L_2(V)`, +`∫ ‖((θ_j ⋆ f)(x))_j‖_{ℓ_2}² dx ≤ B ∫ |f|²` (`Rd.tsum_enorm_convLp_sq_le` for the class of `f`, +and Mathlib's `lintegral_tsum`). -/ +theorem lintegral_lqNorm_conv_sq_le {θ : ℕ → V → ℂ} (hθ : ∀ j, Integrable (θ j)) {B : ℝ≥0∞} + (hB : ∀ᵐ ξ ∂volume, ∑' j, ‖𝓕 (θ j) ξ‖ₑ ^ 2 ≤ B) {f : V → ℂ} (hf : MemLp f 2) : + ∫⁻ x, lqNorm 2 (fun j => ‖conv (θ j) f volume x‖ₑ) ^ 2 ≤ B * ∫⁻ x, ‖f x‖ₑ ^ 2 := by + simp_rw [ENNReal.lqNorm_two_sq] + rw [lintegral_tsum fun j => (aestronglyMeasurable_conv (hθ j).aestronglyMeasurable + hf.aestronglyMeasurable).eNorm.pow_const 2, lintegral_enorm_sq_eq_enorm_toLp hf] + calc ∑' j, ∫⁻ x, ‖conv (θ j) f volume x‖ₑ ^ 2 + = ∑' j, ‖convLp two_ne_top (hθ j) (hf.toLp f)‖ₑ ^ 2 := + tsum_congr fun j => lintegral_enorm_conv_sq_eq (hθ j) hf + _ ≤ B * ‖hf.toLp f‖ₑ ^ 2 := tsum_enorm_convLp_sq_le hθ hB _ + +/-! ### The synthesis bound -/ + +/-- **The Fourier transform of a finite sum of convolutions**: for integrable kernels `θ_j`, +functions `g_j ∈ L_2(V)` and a finite set `s`, +`𝓕(∑_{j ∈ s} θ_j ⋆ g_j) = ∑_{j ∈ s} 𝓕θ_j 𝓕g_j` almost everywhere (Mathlib's +`FourierTransform.fourier_sum` and `Rd.fourier_convLp`). -/ +theorem fourier_sum_convLp {θ : ℕ → V → ℂ} (hθ : ∀ j, Integrable (θ j)) (s : Finset ℕ) + (g : ℕ → Lp ℂ 2 (volume : Measure V)) : + ((𝓕 (∑ j ∈ s, convLp two_ne_top (hθ j) (g j)) : Lp ℂ 2 (volume : Measure V)) : V → ℂ) + =ᵐ[volume] fun ξ => ∑ j ∈ s, 𝓕 (θ j) ξ * (𝓕 (g j) : Lp ℂ 2 (volume : Measure V)) ξ := by + rw [FourierTransform.fourier_sum] + filter_upwards [Lp.coeFn_fun_finsetSum s fun j => 𝓕 (convLp two_ne_top (hθ j) (g j)), + ae_all_iff.2 fun j => fourier_convLp (hθ j) (g j)] with ξ h1 h2 + rw [h1] + exact Finset.sum_congr rfl fun j _ => h2 j + +/-- **The synthesis bound on `L_2`**: for integrable kernels `θ_j` with Fourier overlap `B` +(almost everywhere), functions `g_j ∈ L_2(V)` and every finite set `s` of indices, +`‖∑_{j ∈ s} θ_j ⋆ g_j‖_2² ≤ B ∑_{j ∈ s} ‖g_j‖_2²`. At each frequency `ξ`, the Fourier transform +of the sum is `∑_{j ∈ s} 𝓕θ_j(ξ) 𝓕g_j(ξ)` (`Rd.fourier_sum_convLp`), whose square is at most +`(∑_j |𝓕θ_j(ξ)|²) ∑_{j ∈ s} |𝓕g_j(ξ)|² ≤ B ∑_{j ∈ s} |𝓕g_j(ξ)|²` by the Cauchy–Schwarz +inequality (`enorm_sum_mul_sq_le`); Plancherel's theorem finishes. -/ +theorem enorm_sum_convLp_sq_le {θ : ℕ → V → ℂ} (hθ : ∀ j, Integrable (θ j)) {B : ℝ≥0∞} + (hB : ∀ᵐ ξ ∂volume, ∑' j, ‖𝓕 (θ j) ξ‖ₑ ^ 2 ≤ B) (s : Finset ℕ) + (g : ℕ → Lp ℂ 2 (volume : Measure V)) : + ‖∑ j ∈ s, convLp two_ne_top (hθ j) (g j)‖ₑ ^ 2 ≤ B * ∑ j ∈ s, ‖g j‖ₑ ^ 2 := by + have hG : ∀ j ∈ s, AEMeasurable + (fun ξ => ‖(𝓕 (g j) : Lp ℂ 2 (volume : Measure V)) ξ‖ₑ ^ 2) volume := fun j _ => + (Lp.aestronglyMeasurable _).eNorm.pow_const 2 + rw [← enorm_fourier_Lp_two, enorm_sq_eq_lintegral] + calc ∫⁻ ξ, ‖((𝓕 (∑ j ∈ s, convLp two_ne_top (hθ j) (g j)) : + Lp ℂ 2 (volume : Measure V)) : V → ℂ) ξ‖ₑ ^ 2 + ≤ ∫⁻ ξ, B * ∑ j ∈ s, ‖(𝓕 (g j) : Lp ℂ 2 (volume : Measure V)) ξ‖ₑ ^ 2 := by + refine lintegral_mono_ae ?_ + filter_upwards [fourier_sum_convLp hθ s g, hB] with ξ h1 h2 + rw [h1] + refine (enorm_sum_mul_sq_le s _ _).trans ?_ + gcongr + exact (sum_le_tsum s).trans h2 + _ = B * ∑ j ∈ s, ‖g j‖ₑ ^ 2 := by + rw [lintegral_const_mul'' _ (Finset.aemeasurable_fun_sum s hG), lintegral_finsetSum' s hG] + congr 1 + exact Finset.sum_congr rfl fun j _ => by rw [← enorm_sq_eq_lintegral, enorm_fourier_Lp_two] + +/-- **The synthesis bound on `L_2`, for functions**: for integrable kernels `θ_j` with Fourier +overlap `B` (almost everywhere), functions `g_j ∈ L_2(V)` and every finite set `s` of indices, +`∫ |∑_{j ∈ s} θ_j ⋆ g_j|² ≤ B ∫ ‖(g_j(x))_j‖_{ℓ_2}² dx` (`Rd.enorm_sum_convLp_sq_le` for the +classes of the `g_j`). -/ +theorem lintegral_enorm_sum_conv_sq_le {θ : ℕ → V → ℂ} (hθ : ∀ j, Integrable (θ j)) + {B : ℝ≥0∞} (hB : ∀ᵐ ξ ∂volume, ∑' j, ‖𝓕 (θ j) ξ‖ₑ ^ 2 ≤ B) (s : Finset ℕ) + {g : ℕ → V → ℂ} (hg : ∀ j, MemLp (g j) 2) : + ∫⁻ x, ‖∑ j ∈ s, conv (θ j) (g j) volume x‖ₑ ^ 2 ≤ + B * ∫⁻ x, lqNorm 2 (fun j => ‖g j x‖ₑ) ^ 2 := by + have hv : ⇑(∑ j ∈ s, convLp two_ne_top (hθ j) ((hg j).toLp (g j))) =ᵐ[volume] + fun x => ∑ j ∈ s, conv (θ j) (g j) volume x := by + filter_upwards [Lp.coeFn_fun_finsetSum s fun j => + convLp two_ne_top (hθ j) ((hg j).toLp (g j)), ae_all_iff.2 fun j => + convLp_apply_ae two_ne_top (hθ j) ((hg j).toLp (g j))] with x h1 h2 + rw [h1] + exact Finset.sum_congr rfl fun j _ => by rw [h2 j, conv_congr_ae (hg j).coeFn_toLp] + have hG : ∀ j ∈ s, AEMeasurable (fun x => ‖g j x‖ₑ ^ 2) volume := fun j _ => + (hg j).aestronglyMeasurable.eNorm.pow_const 2 + calc ∫⁻ x, ‖∑ j ∈ s, conv (θ j) (g j) volume x‖ₑ ^ 2 + = ‖∑ j ∈ s, convLp two_ne_top (hθ j) ((hg j).toLp (g j))‖ₑ ^ 2 := by + rw [enorm_sq_eq_lintegral] + exact lintegral_congr_ae (hv.mono fun x hx => by dsimp only at hx ⊢; rw [hx]) + _ ≤ B * ∑ j ∈ s, ‖(hg j).toLp (g j)‖ₑ ^ 2 := enorm_sum_convLp_sq_le hθ hB s _ + _ = B * ∫⁻ x, ∑ j ∈ s, ‖g j x‖ₑ ^ 2 := by + rw [lintegral_finsetSum' s hG] + congr 1 + exact Finset.sum_congr rfl fun j _ => (lintegral_enorm_sq_eq_enorm_toLp (hg j)).symm + _ ≤ B * ∫⁻ x, lqNorm 2 (fun j => ‖g j x‖ₑ) ^ 2 := by + gcongr with x + rw [ENNReal.lqNorm_two_sq] + exact sum_le_tsum s + +/-! ### Calderón–Zygmund families -/ + +/-- **The analysis bound for a Calderón–Zygmund family** with overlap `B`: +`∑_j ‖θ_j ⋆ f‖_2² ≤ B ‖f‖_2²` for every `f ∈ L_2(V)` (`Rd.tsum_enorm_convLp_sq_le`). -/ +theorem IsCZFamily.tsum_enorm_convLp_sq_le {θ : ℕ → V → ℂ} {B H : ℝ≥0∞} + (h : IsCZFamily θ B H) (f : Lp ℂ 2 (volume : Measure V)) : + ∑' j, ‖convLp two_ne_top (h.integrable j) f‖ₑ ^ 2 ≤ B * ‖f‖ₑ ^ 2 := + Rd.tsum_enorm_convLp_sq_le h.integrable (ae_of_all _ h.overlap) f + +/-- **The analysis bound for a Calderón–Zygmund family, for functions**: with overlap `B`, +`∫ ‖((θ_j ⋆ f)(x))_j‖_{ℓ_2}² dx ≤ B ∫ |f|²` for every `f ∈ L_2(V)` +(`Rd.lintegral_lqNorm_conv_sq_le`). -/ +theorem IsCZFamily.lintegral_lqNorm_conv_sq_le {θ : ℕ → V → ℂ} {B H : ℝ≥0∞} + (h : IsCZFamily θ B H) {f : V → ℂ} (hf : MemLp f 2) : + ∫⁻ x, lqNorm 2 (fun j => ‖conv (θ j) f volume x‖ₑ) ^ 2 ≤ B * ∫⁻ x, ‖f x‖ₑ ^ 2 := + Rd.lintegral_lqNorm_conv_sq_le h.integrable (ae_of_all _ h.overlap) hf + +/-- **The synthesis bound for a Calderón–Zygmund family** with overlap `B`: +`‖∑_{j ∈ s} θ_j ⋆ g_j‖_2² ≤ B ∑_{j ∈ s} ‖g_j‖_2²` for all `g_j ∈ L_2(V)` and every finite set +`s` (`Rd.enorm_sum_convLp_sq_le`). -/ +theorem IsCZFamily.enorm_sum_convLp_sq_le {θ : ℕ → V → ℂ} {B H : ℝ≥0∞} + (h : IsCZFamily θ B H) (s : Finset ℕ) (g : ℕ → Lp ℂ 2 (volume : Measure V)) : + ‖∑ j ∈ s, convLp two_ne_top (h.integrable j) (g j)‖ₑ ^ 2 ≤ B * ∑ j ∈ s, ‖g j‖ₑ ^ 2 := + Rd.enorm_sum_convLp_sq_le h.integrable (ae_of_all _ h.overlap) s g + +/-- **The synthesis bound for a Calderón–Zygmund family, for functions**: with overlap `B`, +`∫ |∑_{j ∈ s} θ_j ⋆ g_j|² ≤ B ∫ ‖(g_j(x))_j‖_{ℓ_2}² dx` for all `g_j ∈ L_2(V)` and every finite +set `s` (`Rd.lintegral_enorm_sum_conv_sq_le`). -/ +theorem IsCZFamily.lintegral_enorm_sum_conv_sq_le {θ : ℕ → V → ℂ} {B H : ℝ≥0∞} + (h : IsCZFamily θ B H) (s : Finset ℕ) {g : ℕ → V → ℂ} (hg : ∀ j, MemLp (g j) 2) : + ∫⁻ x, ‖∑ j ∈ s, conv (θ j) (g j) volume x‖ₑ ^ 2 ≤ + B * ∫⁻ x, lqNorm 2 (fun j => ‖g j x‖ₑ) ^ 2 := + Rd.lintegral_enorm_sum_conv_sq_le h.integrable (ae_of_all _ h.overlap) s hg + +end Rd diff --git a/LeanPool/FunctionSpaces/Rd/SingularIntegrals/VectorValuedSingularIntegrals.lean b/LeanPool/FunctionSpaces/Rd/SingularIntegrals/VectorValuedSingularIntegrals.lean new file mode 100644 index 0000000000..577428406f --- /dev/null +++ b/LeanPool/FunctionSpaces/Rd/SingularIntegrals/VectorValuedSingularIntegrals.lean @@ -0,0 +1,526 @@ +/- +Copyright (c) 2026 Mario Ullrich. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Mario Ullrich +-/ +module + +public import LeanPool.FunctionSpaces.Rd.SingularIntegrals.VectorValuedWeakType +public import LeanPool.FunctionSpaces.Rd.SingularIntegrals.ConvolutionAdjoint +public import LeanPool.FunctionSpaces.Analysis.Lp.Marcinkiewicz +public import LeanPool.FunctionSpaces.Analysis.Lp.NormingFamily + +/- +Modified for Lean Pool: module names and imports adapted. +-/ + +/-! +# The strong type of vector-valued singular integrals for `1 < p < ∞` + +Let `V` have dimension `n ≥ 1` and let `(θ_j)_{j ∈ ℕ}` be a Calderón–Zygmund family on `V` +with Fourier overlap `B` and Hörmander constant `H` (`Rd.IsCZFamily`). For every `1 < p < ∞`, +with the constant `C = Rd.czConst V p B H`: + +* **the analysis operator** (`Rd.IsCZFamily.eLpNorm_lqNorm_conv_le`): + `‖ ‖((θ_j ⋆ f)(x))_j‖_{ℓ_2} ‖_{L_p} ≤ C ‖f‖_p` for every `f ∈ L_p(V)`; +* **the synthesis operators** (`Rd.IsCZFamily.eLpNorm_sum_conv_le`): + `‖∑_{j ∈ s} θ_j ⋆ g_j‖_p ≤ C ‖ ‖(g_j(x))_j‖_{ℓ_2} ‖_{L_p}` for every finite set `s` and all + `g_j ∈ L_p(V)`. + +For `p = 2` these are the Plancherel bounds with `C = B^{1/2}`, in every dimension +(`Rd.IsCZFamily.eLpNorm_lqNorm_conv_two_le`, `Rd.IsCZFamily.eLpNorm_sum_conv_two_le`). For +`1 < p < 2`, Marcinkiewicz interpolation between the weak type `(1,1)` and the +`L_2` bound gives `C = Rd.czConstBelow V p B H`: for the analysis operator in the terms of the +Carleson project (`Rd.IsCZFamily.hasStrongType_lqNorm_conv_of_lt`), for the synthesis operators +on the abstract input type of families of measurable functions +(`Rd.IsCZFamily.eLpNorm_sum_conv_le_of_lt_of_measurable`), extended to all families in `L_p` by +measurable representatives (`Rd.IsCZFamily.eLpNorm_sum_conv_le_of_lt`). For `2 < p < ∞` +duality with the conjugate exponent `p' < 2` exchanges the two operators of the adjoint family +`θ_j^*(x) = conj θ_j(-x)`, with `C = Rd.czConstBelow V p' B H`. + +For `p > 2` the norms are bounded through their pairings with `L_{p'}` +(`MeasureTheory.eLpNorm_lqNorm_le_of_forall_enorm_sum_integral_le`, +`MeasureTheory.eLpNorm_le_of_forall_enorm_integral_mul_conj_le`), and the adjoint identity +`Rd.integral_conv_mul_conj` turns the pairings of one operator into pairings of the other +operator of the adjoint family (`Rd.IsCZFamily.enorm_sum_integral_conv_mul_conj_le`, +`Rd.IsCZFamily.enorm_integral_sum_conv_mul_conj_le`). +-/ + +@[expose] public section + +open MeasureTheory Filter +open scoped ENNReal NNReal ComplexConjugate +open ENNReal (lqNorm) + +namespace Rd + +variable {V : Type*} [NormedAddCommGroup V] [InnerProductSpace ℝ V] [FiniteDimensional ℝ V] + [MeasurableSpace V] [BorelSpace V] +variable {θ : ℕ → V → ℂ} {B H : ℝ≥0∞} + +/-! ### The case `p = 2` -/ + +/-- **The analysis operator has strong type `(2, 2)`** with constant `B^{1/2}`, in the terms of +the Carleson project: for every `f ∈ L_2(V)` the function `x ↦ ‖((θ_j ⋆ f)(x))_j‖_{ℓ_2}` is +almost everywhere strongly measurable with `L_2` norm at most `B^{1/2} ‖f‖_2`, by the Plancherel +bound `Rd.IsCZFamily.lintegral_lqNorm_conv_sq_le`. -/ +theorem IsCZFamily.hasStrongType_lqNorm_conv_two (h : IsCZFamily θ B H) : + HasStrongType (fun f x => lqNorm 2 fun j => ‖conv (θ j) f volume x‖ₑ) 2 2 volume volume + (B ^ (1 / 2 : ℝ)) := by + intro f hf + have hm : AEMeasurable (fun x => lqNorm 2 fun j => ‖conv (θ j) f volume x‖ₑ) volume := + aemeasurable_lqNorm_comp (fun j => + (aestronglyMeasurable_conv (h.integrable j).1 hf.aestronglyMeasurable).eNorm) 2 + refine ⟨hm.aestronglyMeasurable, ?_⟩ + have h2 := eLpNorm_le_rpow_mul_of_lintegral_enorm_le (p := 2) (C := B) two_ne_zero + ENNReal.ofNat_ne_top hm.aestronglyMeasurable hf.aestronglyMeasurable (by + simpa only [eNorm_eq_self, ENNReal.toReal_ofNat, ENNReal.rpow_two] using + h.lintegral_lqNorm_conv_sq_le hf) + simpa only [ENNReal.toReal_ofNat] using h2 + +/-- **The analysis bound in `L_2`**: `‖ ‖((θ_j ⋆ f)(x))_j‖_{ℓ_2} ‖_2 ≤ B^{1/2} ‖f‖_2` for every +`f ∈ L_2(V)` (`Rd.IsCZFamily.hasStrongType_lqNorm_conv_two`). -/ +theorem IsCZFamily.eLpNorm_lqNorm_conv_two_le (h : IsCZFamily θ B H) {f : V → ℂ} + (hf : MemLp f 2 volume) : + eLpNorm (fun x => lqNorm 2 fun j => ‖conv (θ j) f volume x‖ₑ) 2 volume ≤ + B ^ (1 / 2 : ℝ) * eLpNorm f 2 volume := + (h.hasStrongType_lqNorm_conv_two f hf).2 + +/-- **The synthesis bound in `L_2`**: for every finite set `s` and all `g_j ∈ L_2(V)`, +`‖∑_{j ∈ s} θ_j ⋆ g_j‖_2 ≤ B^{1/2} ‖ ‖(g_j(x))_j‖_{ℓ_2} ‖_2`, by the Plancherel bound +`Rd.IsCZFamily.lintegral_enorm_sum_conv_sq_le`. -/ +theorem IsCZFamily.eLpNorm_sum_conv_two_le (h : IsCZFamily θ B H) (s : Finset ℕ) + {g : ℕ → V → ℂ} (hg : ∀ j, MemLp (g j) 2 volume) : + eLpNorm (fun x => ∑ j ∈ s, conv (θ j) (g j) volume x) 2 volume ≤ + B ^ (1 / 2 : ℝ) * eLpNorm (fun x => lqNorm 2 fun j => ‖g j x‖ₑ) 2 volume := by + have hm1 : AEStronglyMeasurable (fun x => ∑ j ∈ s, conv (θ j) (g j) volume x) volume := + Finset.aestronglyMeasurable_fun_sum s fun j _ => + aestronglyMeasurable_conv (h.integrable j).1 (hg j).aestronglyMeasurable + have hm2 : AEMeasurable (fun x => lqNorm 2 fun j => ‖g j x‖ₑ) volume := + aemeasurable_lqNorm_comp (fun j => (hg j).aestronglyMeasurable.eNorm) 2 + have h2 := eLpNorm_le_rpow_mul_of_lintegral_enorm_le (p := 2) (C := B) two_ne_zero + ENNReal.ofNat_ne_top hm1 hm2.aestronglyMeasurable (by + simpa only [eNorm_eq_self, ENNReal.toReal_ofNat, ENNReal.rpow_two] using + h.lintegral_enorm_sum_conv_sq_le s hg) + simpa only [ENNReal.toReal_ofNat] using h2 + +/-! ### The analysis operator for `1 < p < 2` -/ + +/-- **The analysis operator is subadditive** almost everywhere with constant `1` on +`L_1(V) ∪ L_2(V)`, in the terms of the Carleson project: convolution is additive almost +everywhere (`Rd.conv_add_ae_of_memLp`), and the `ℓ_2` norm satisfies Minkowski's inequality. -/ +theorem IsCZFamily.aeSubadditiveOn_lqNorm_conv (h : IsCZFamily θ B H) : + AESubadditiveOn (fun f x => lqNorm 2 fun j => ‖conv (θ j) f volume x‖ₑ) + (fun f => MemLp f 1 volume ∨ MemLp f 2 volume) 1 volume := by + have hexp : ∀ {u : V → ℂ}, (MemLp u 1 volume ∨ MemLp u 2 volume) → + ∃ r : ℝ≥0∞, 1 ≤ r ∧ r ≠ ∞ ∧ MemLp u r volume := by + rintro u (hu | hu) + exacts [⟨1, le_rfl, ENNReal.one_ne_top, hu⟩, ⟨2, one_le_two, ENNReal.ofNat_ne_top, hu⟩] + intro f g hf hg + obtain ⟨p, hp1, hp, hfp⟩ := hexp hf + obtain ⟨r, hr1, hr, hgr⟩ := hexp hg + filter_upwards [ae_all_iff.2 fun j => + conv_add_ae_of_memLp hp1 hp hr1 hr (h.integrable j) hfp hgr] with x hx + simp only [eNorm_eq_self, one_mul] + refine (ENNReal.lqNorm_mono fun j => ?_).trans (ENNReal.lqNorm_add_le one_le_two _ _) + rw [hx j, Pi.add_apply] + exact eNorm_add_le _ _ + +/-- **The analysis operator has weak type `(1,1)`** with constant `Rd.vectorWeakConst V B H`, in +the terms of the Carleson project, in dimension `n ≥ 1`: the level-set bound +`Rd.IsCZFamily.volume_lqNorm_conv_gt_le` at every level `t` bounds the weak `L_1` norm. -/ +theorem IsCZFamily.hasWeakType_lqNorm_conv [Nontrivial V] (h : IsCZFamily θ B H) : + HasWeakType (fun f x => lqNorm 2 fun j => ‖conv (θ j) f volume x‖ₑ) 1 1 volume volume + (vectorWeakConst V B H) := by + intro f hf + have hfi : Integrable f := memLp_one_iff_integrable.1 hf + refine ⟨(aemeasurable_lqNorm_comp (fun j => + (aestronglyMeasurable_conv (h.integrable j).1 hf.aestronglyMeasurable).eNorm) + 2).aestronglyMeasurable, ?_⟩ + rw [wnorm_ne_top ENNReal.one_ne_top, ENNReal.toReal_one, wnorm', + eLpNorm_one_eq_lintegral_eNorm hf.aestronglyMeasurable] + refine iSup_le fun t => ?_ + rw [inv_one, ENNReal.rpow_one] + rcases eq_or_ne (t : ℝ≥0∞) 0 with ht | ht + · rw [ht, zero_mul] + exact zero_le + have hw := h.volume_lqNorm_conv_gt_le hfi (pos_iff_ne_zero.2 ht) ENNReal.coe_ne_top + calc (t : ℝ≥0∞) * distribution (fun x => lqNorm 2 fun j => ‖conv (θ j) f volume x‖ₑ) t volume + ≤ t * (vectorWeakConst V B H * (t : ℝ≥0∞)⁻¹ * ∫⁻ x, ‖f x‖ₑ) := by + gcongr + simpa only [distribution, eNorm_eq_self] using hw + _ = vectorWeakConst V B H * ∫⁻ x, ‖f x‖ₑ := by + rw [mul_comm (vectorWeakConst V B H), mul_assoc, ← mul_assoc (t : ℝ≥0∞), + ENNReal.mul_inv_cancel ht ENNReal.coe_ne_top, one_mul] + +variable (V) in +/-- The constant of the strong type `(p, p)`, `1 < p < 2`, of a Calderón–Zygmund family with +overlap `B` and Hörmander constant `H`: `C^M_p(C_V(B, H), B)^{1/p}`, with the Marcinkiewicz +constant `C^M_p(C₁, C₂) = p (2 C₁/(p - 1) + 4 C₂/(2 - p))` (`MeasureTheory.marcinkiewiczConst`) +and the weak type constant `C_V(B, H)` (`Rd.vectorWeakConst`). -/ +noncomputable def czConstBelow (p B H : ℝ≥0∞) : ℝ≥0∞ := + marcinkiewiczConst p.toReal (vectorWeakConst V B H) B ^ (1 / p.toReal) + +/-- The constant `Rd.czConstBelow V p B H` is finite for `1 < p < 2` and finite `B`, `H`. -/ +theorem czConstBelow_ne_top {p : ℝ≥0∞} (hp1 : 1 < p) (hp2 : p < 2) (hB : B ≠ ∞) (hH : H ≠ ∞) : + czConstBelow V p B H ≠ ∞ := + ENNReal.rpow_ne_top_of_nonneg (by positivity) (marcinkiewiczConst_ne_top + (ENNReal.one_lt_toReal hp1 (ne_top_of_lt hp2)) + (ENNReal.toReal_lt_of_lt_ofReal (by rwa [ENNReal.ofReal_ofNat])) + (vectorWeakConst_ne_top hB hH) hB) + +/-- **The analysis operator has strong type `(p, p)` for `1 < p < 2`**, in dimension `n ≥ 1`, +with constant `Rd.czConstBelow V p B H`: Marcinkiewicz interpolation in the terms of the +Carleson project (`MeasureTheory.hasStrongType_of_hasWeakType_one_of_hasStrongType_two` with +`A = 1`, `C₁ = C_V(B, H)`, `C₂ = B^{1/2}`) between the weak type `(1,1)` and the strong type +`(2,2)`. -/ +theorem IsCZFamily.hasStrongType_lqNorm_conv_of_lt [Nontrivial V] (h : IsCZFamily θ B H) + {p : ℝ≥0∞} (hp1 : 1 < p) (hp2 : p < 2) : + HasStrongType (fun f x => lqNorm 2 fun j => ‖conv (θ j) f volume x‖ₑ) p p volume volume + (czConstBelow V p B H) := by + have hc : marcinkiewiczNormConst p ((1 : ℝ≥0) : ℝ≥0∞) (vectorWeakConst V B H) + (B ^ (1 / 2 : ℝ)) = czConstBelow V p B H := by + rw [marcinkiewiczNormConst, czConstBelow, ENNReal.coe_one, one_mul, one_pow, one_mul, + ← ENNReal.rpow_natCast, ← ENNReal.rpow_mul] + norm_num + rw [← hc] + exact hasStrongType_of_hasWeakType_one_of_hasStrongType_two hp1 hp2 + (fun f hf => (aemeasurable_lqNorm_comp (fun j => + (aestronglyMeasurable_conv (h.integrable j).1 hf.aestronglyMeasurable).eNorm) + 2).aestronglyMeasurable) + (by rw [ENNReal.coe_one]; exact h.aeSubadditiveOn_lqNorm_conv) h.hasWeakType_lqNorm_conv + h.hasStrongType_lqNorm_conv_two + +/-- **The analysis bound for `1 < p < 2`**, in dimension `n ≥ 1`: +`‖ ‖((θ_j ⋆ f)(x))_j‖_{ℓ_2} ‖_p ≤ Rd.czConstBelow V p B H ‖f‖_p` for every `f ∈ L_p(V)` +(`Rd.IsCZFamily.hasStrongType_lqNorm_conv_of_lt`). -/ +theorem IsCZFamily.eLpNorm_lqNorm_conv_le_of_lt [Nontrivial V] (h : IsCZFamily θ B H) + {p : ℝ≥0∞} (hp1 : 1 < p) (hp2 : p < 2) {f : V → ℂ} (hf : MemLp f p volume) : + eLpNorm (fun x => lqNorm 2 fun j => ‖conv (θ j) f volume x‖ₑ) p volume ≤ + czConstBelow V p B H * eLpNorm f p volume := + (h.hasStrongType_lqNorm_conv_of_lt hp1 hp2 f hf).2 + +/-! ### The synthesis operators for `1 < p < 2` -/ + +/-- **The synthesis bound for `1 < p < 2`, for measurable families**: in dimension `n ≥ 1`, for +every finite set `s` and measurable `g_j` with `‖ ‖(g_j(x))_j‖_{ℓ_2} ‖_p < ∞`, +`‖∑_{j ∈ s} θ_j ⋆ g_j‖_p ≤ Rd.czConstBelow V p B H ‖ ‖(g_j(x))_j‖_{ℓ_2} ‖_p`. Marcinkiewicz +interpolation on the abstract input type of measurable families +(`MeasureTheory.eLpNorm_le_of_weak_one_strong_two`) with the size `‖(g_j)_j‖_{ℓ_2}`, the +restriction `(1_S g_j)_j`, the weak type `(1,1)` `Rd.IsCZFamily.volume_enorm_sum_conv_gt_le` +and the Plancherel bound `Rd.IsCZFamily.lintegral_enorm_sum_conv_sq_le`. -/ +theorem IsCZFamily.eLpNorm_sum_conv_le_of_lt_of_measurable [Nontrivial V] (h : IsCZFamily θ B H) + {p : ℝ≥0∞} (hp1 : 1 < p) (hp2 : p < 2) (s : Finset ℕ) {g : ℕ → V → ℂ} + (hg : ∀ j, Measurable (g j)) + (hG : eLpNorm (fun x => lqNorm 2 fun j => ‖g j x‖ₑ) p volume ≠ ∞) : + eLpNorm (fun x => ∑ j ∈ s, conv (θ j) (g j) volume x) p volume ≤ + czConstBelow V p B H * eLpNorm (fun x => lqNorm 2 fun j => ‖g j x‖ₑ) p volume := by + classical + have hp : p ≠ ∞ := ne_top_of_lt hp2 + have hp0 : p ≠ 0 := (zero_lt_one.trans hp1).ne' + let X := {g : ℕ → V → ℂ // ∀ j, Measurable (g j)} + let res : X → Set V → X := fun g S => + if hS : MeasurableSet S then ⟨fun j => S.indicator (g.1 j), fun j => (g.2 j).indicator hS⟩ + else g + have hres : ∀ (g : X) (S : Set V), MeasurableSet S → (res g S).1 = fun j => S.indicator (g.1 j) := + fun g S hS => by simp only [res, hS, ↓reduceDIte] + have h1 := eLpNorm_le_of_weak_one_strong_two (μ := volume) (ν := volume) + (C₁ := vectorWeakConst V B H) (C₂ := B) (p := p) + (fun g : X => fun x => lqNorm 2 fun j => ‖g.1 j x‖ₑ) + (fun g : X => fun x => ‖∑ j ∈ s, conv (θ j) (g.1 j) volume x‖ₑ) res + (fun g => measurable_lqNorm_comp (fun j => (g.2 j).eNorm) 2) + (fun g => (Finset.aestronglyMeasurable_fun_sum s fun j _ => aestronglyMeasurable_conv + (h.integrable j).1 (g.2 j).aestronglyMeasurable).eNorm) + (fun g S hS => by + funext x + simp only [hres g S hS, eNorm_indicator_eq_indicator_eNorm] + exact ENNReal.lqNorm_indicator 2 S (fun j y => ‖g.1 j y‖ₑ) x) + (fun g S hS hfin => by + have hgp : ∀ j, MemLp (g.1 j) p volume := fun j => + memLp_of_lintegral_lqNorm_rpow_ne_top hp0 hp (g.2 j).aestronglyMeasurable hfin + filter_upwards [ae_all_iff.2 fun j => conv_add_ae hp1.le hp (h.integrable j) + ((hgp j).indicator hS.nullMeasurableSet) + ((hgp j).indicator hS.compl.nullMeasurableSet)] with x hx + simp only [hres g S hS, hres g Sᶜ hS.compl] + refine le_of_eq_of_le ?_ (eNorm_add_le _ _) + rw [← Finset.sum_add_distrib] + refine congrArg _ (Finset.sum_congr rfl fun j _ => ?_) + rw [← Pi.add_apply (conv (θ j) (S.indicator (g.1 j)) volume), ← hx j, + Set.indicator_self_add_compl]) + (fun g hfin t ht0 ht => h.volume_enorm_sum_conv_gt_le s + (fun j => (g.2 j).aestronglyMeasurable) hfin ht0 ht) + (fun g hfin => h.lintegral_enorm_sum_conv_sq_le s fun j => + memLp_of_lintegral_lqNorm_rpow_ne_top two_ne_zero ENNReal.ofNat_ne_top + (g.2 j).aestronglyMeasurable (by + simpa only [ENNReal.toReal_ofNat, ENNReal.rpow_two] using hfin)) + hp1 hp2 ⟨g, hg⟩ hG + rwa [eLpNorm_eNorm _ (Finset.aestronglyMeasurable_fun_sum s fun j _ => + aestronglyMeasurable_conv (h.integrable j).1 (hg j).aestronglyMeasurable)] at h1 + +/-- **The synthesis bound for `1 < p < 2`**: in dimension `n ≥ 1`, for every finite set `s` and +all `g_j ∈ L_p(V)`, +`‖∑_{j ∈ s} θ_j ⋆ g_j‖_p ≤ Rd.czConstBelow V p B H ‖ ‖(g_j(x))_j‖_{ℓ_2} ‖_p`. Replace `g_j` +by a measurable representative for `j ∈ s` and by `0` otherwise; the sum is unchanged, the +`ℓ_2` norm is at most the original one, and it now lies in `L_p` +(`MeasureTheory.eLpNorm_lqNorm_ne_top_of_finite`), so +`Rd.IsCZFamily.eLpNorm_sum_conv_le_of_lt_of_measurable` applies. -/ +theorem IsCZFamily.eLpNorm_sum_conv_le_of_lt [Nontrivial V] (h : IsCZFamily θ B H) + {p : ℝ≥0∞} (hp1 : 1 < p) (hp2 : p < 2) (s : Finset ℕ) {g : ℕ → V → ℂ} + (hg : ∀ j, MemLp (g j) p volume) : + eLpNorm (fun x => ∑ j ∈ s, conv (θ j) (g j) volume x) p volume ≤ + czConstBelow V p B H * eLpNorm (fun x => lqNorm 2 fun j => ‖g j x‖ₑ) p volume := by + classical + let g' : ℕ → V → ℂ := fun j => if j ∈ s then (hg j).aestronglyMeasurable.mk (g j) else 0 + have hm : ∀ j, Measurable (g' j) := fun j => by + by_cases hj : j ∈ s + · simpa only [g', hj, ↓reduceIte] using + (hg j).aestronglyMeasurable.stronglyMeasurable_mk.measurable + · simpa only [g', hj, ↓reduceIte] using measurable_zero + have hmem : ∀ j, MemLp (g' j) p volume := fun j => by + by_cases hj : j ∈ s + · simpa only [g', hj, ↓reduceIte] using (hg j).ae_eq (hg j).aestronglyMeasurable.ae_eq_mk + · simpa only [g', hj, ↓reduceIte] using (MemLp.zero : MemLp (0 : V → ℂ) p volume) + have hconv : ∀ j ∈ s, conv (θ j) (g' j) volume = conv (θ j) (g j) volume := fun j hj => by + simp only [g', hj, ↓reduceIte] + exact conv_congr_ae (hg j).aestronglyMeasurable.ae_eq_mk.symm + have hle : eLpNorm (fun x => lqNorm 2 fun j => ‖g' j x‖ₑ) p volume ≤ + eLpNorm (fun x => lqNorm 2 fun j => ‖g j x‖ₑ) p volume := by + refine eLpNorm_mono_eNorm_ae (aemeasurable_lqNorm_comp (fun j => + (hm j).eNorm.aemeasurable) 2).aestronglyMeasurable ?_ + filter_upwards [ae_all_iff.2 fun j => (hg j).aestronglyMeasurable.ae_eq_mk] with x hx + simp only [eNorm_eq_self] + refine ENNReal.lqNorm_mono fun j => ?_ + by_cases hj : j ∈ s + · simp only [g', hj, ↓reduceIte] + rw [← hx j] + · simp only [g', hj, ↓reduceIte, Pi.zero_apply, eNorm_zero] + exact zero_le + have hfin := eLpNorm_lqNorm_ne_top_of_finite hp1.le s hmem fun j hj => by + simp only [g', hj, ↓reduceIte] + calc eLpNorm (fun x => ∑ j ∈ s, conv (θ j) (g j) volume x) p volume + = eLpNorm (fun x => ∑ j ∈ s, conv (θ j) (g' j) volume x) p volume := by + congr 1 + funext x + exact Finset.sum_congr rfl fun j hj => by rw [hconv j hj] + _ ≤ czConstBelow V p B H * eLpNorm (fun x => lqNorm 2 fun j => ‖g' j x‖ₑ) p volume := + h.eLpNorm_sum_conv_le_of_lt_of_measurable hp1 hp2 s hm hfin + _ ≤ czConstBelow V p B H * eLpNorm (fun x => lqNorm 2 fun j => ‖g j x‖ₑ) p volume := by + gcongr + +/-! ### The case `2 < p < ∞` by duality -/ + +/-- **Pairing the analysis operator with a family**: in dimension `n ≥ 1`, for conjugate +exponents `p, q` with `1 < q < 2`, every `f ∈ L_p(V)`, every finite set `s` and all +`g_j ∈ L_q(V)`, +`|∑_{j ∈ s} ∫ (θ_j ⋆ f) conj g_j| ≤ Rd.czConstBelow V q B H ‖f‖_p ‖ ‖(g_j)_j‖_{ℓ_2} ‖_q`: the +adjoint identity `Rd.integral_conv_mul_conj` moves every `θ_j` to `g_j` as the adjoint kernel +`θ_j^*`, Hölder's inequality and the synthesis bound for the adjoint family at `q` finish. -/ +theorem IsCZFamily.enorm_sum_integral_conv_mul_conj_le [Nontrivial V] (h : IsCZFamily θ B H) + {p q : ℝ≥0∞} [p.HolderConjugate q] (hq1 : 1 < q) (hq2 : q < 2) {f : V → ℂ} + (hf : MemLp f p volume) (s : Finset ℕ) {g : ℕ → V → ℂ} (hg : ∀ j, MemLp (g j) q volume) : + ‖∑ j ∈ s, ∫ x, conv (θ j) f volume x * conj (g j x)‖ₑ ≤ + czConstBelow V q B H * eLpNorm f p volume * + eLpNorm (fun x => lqNorm 2 fun j => ‖g j x‖ₑ) q volume := by + have hp : p ≠ ∞ := ((ENNReal.HolderConjugate.lt_top_iff_one_lt p q).2 hq1).ne + have hq : q ≠ ∞ := ne_top_of_lt hq2 + have hS : MemLp (fun y => ∑ j ∈ s, conv (fun z => conj (θ j (-z))) (g j) volume y) q volume := + memLp_finsetSum s fun j _ => memLp_conv hq1.le hq (h.adjoint.integrable j) (hg j) + calc ‖∑ j ∈ s, ∫ x, conv (θ j) f volume x * conj (g j x)‖ₑ + = ‖∫ y, f y * conj (∑ j ∈ s, conv (fun z => conj (θ j (-z))) (g j) volume y)‖ₑ := by + rw [Finset.sum_congr rfl fun j _ => integral_conv_mul_conj hp (h.integrable j) hf (hg j), + ← integral_finsetSum (f := fun j y => + f y * conj (conv (fun z => conj (θ j (-z))) (g j) volume y)) s fun j _ => + hf.integrable_mul + (memLp_conv hq1.le hq (h.adjoint.integrable j) (hg j)).star] + simp only [map_sum, Finset.mul_sum] + _ ≤ ∫⁻ y, ‖f y‖ₑ * ‖∑ j ∈ s, conv (fun z => conj (θ j (-z))) (g j) volume y‖ₑ := by + refine (eNorm_integral_le_lintegral_eNorm _).trans (le_of_eq ?_) + simp only [eNorm_mul, RCLike.eNorm_conj] + _ ≤ eLpNorm f p volume * + eLpNorm (fun y => ∑ j ∈ s, conv (fun z => conj (θ j (-z))) (g j) volume y) q volume := by + rw [← eLpNorm_eNorm _ hf.aestronglyMeasurable, ← eLpNorm_eNorm _ hS.aestronglyMeasurable] + exact lintegral_mul_le_eLpNorm_mul_eLpNorm hp hq hf.aestronglyMeasurable.eNorm + hS.aestronglyMeasurable.eNorm + _ ≤ eLpNorm f p volume * + (czConstBelow V q B H * eLpNorm (fun x => lqNorm 2 fun j => ‖g j x‖ₑ) q volume) := by + gcongr + exact h.adjoint.eLpNorm_sum_conv_le_of_lt hq1 hq2 s hg + _ = _ := by ring + +/-- **Pairing a synthesis sum with a function**: in dimension `n ≥ 1`, for conjugate exponents +`p, q` with `1 < q < 2`, every finite set `s`, all `g_j ∈ L_p(V)` and every +`u ∈ L_q(V)`, +`|∫ (∑_{j ∈ s} θ_j ⋆ g_j) conj u| ≤ Rd.czConstBelow V q B H ‖ ‖(g_j)_j‖_{ℓ_2} ‖_p ‖u‖_q`: the +adjoint identity `Rd.integral_conv_mul_conj` for every `j`, the Cauchy–Schwarz inequality over +`j ∈ s` at every point (`ENNReal.sum_mul_le_lqNorm_two_mul`), Hölder's inequality and the +analysis bound for the adjoint family at `q`. -/ +theorem IsCZFamily.enorm_integral_sum_conv_mul_conj_le [Nontrivial V] (h : IsCZFamily θ B H) + {p q : ℝ≥0∞} [p.HolderConjugate q] (hq1 : 1 < q) (hq2 : q < 2) + (s : Finset ℕ) {g : ℕ → V → ℂ} (hg : ∀ j, MemLp (g j) p volume) {u : V → ℂ} + (hu : MemLp u q volume) : + ‖∫ x, (∑ j ∈ s, conv (θ j) (g j) volume x) * conj (u x)‖ₑ ≤ + czConstBelow V q B H * eLpNorm (fun x => lqNorm 2 fun j => ‖g j x‖ₑ) p volume * + eLpNorm u q volume := by + have hp : p ≠ ∞ := ((ENNReal.HolderConjugate.lt_top_iff_one_lt p q).2 hq1).ne + have hq : q ≠ ∞ := ne_top_of_lt hq2 + have hp1 : 1 ≤ p := ENNReal.HolderConjugate.one_le p q + have hw : ∀ j, AEStronglyMeasurable (conv (fun z => conj (θ j (-z))) u volume) volume := + fun j => aestronglyMeasurable_conv (h.adjoint.integrable j).1 hu.aestronglyMeasurable + have hGm : AEMeasurable (fun x => lqNorm 2 fun j => ‖g j x‖ₑ) volume := + aemeasurable_lqNorm_comp (fun j => (hg j).aestronglyMeasurable.eNorm) 2 + have hWm : AEMeasurable + (fun x => lqNorm 2 fun j => ‖conv (fun z => conj (θ j (-z))) u volume x‖ₑ) volume := + aemeasurable_lqNorm_comp (fun j => (hw j).eNorm) 2 + calc ‖∫ x, (∑ j ∈ s, conv (θ j) (g j) volume x) * conj (u x)‖ₑ + = ‖∑ j ∈ s, ∫ y, g j y * conj (conv (fun z => conj (θ j (-z))) u volume y)‖ₑ := by + simp_rw [Finset.sum_mul] + rw [integral_finsetSum (f := fun j x => conv (θ j) (g j) volume x * conj (u x)) s + fun j _ => + (memLp_conv hp1 hp (h.integrable j) (hg j)).integrable_mul hu.star] + rw [Finset.sum_congr rfl fun j _ => integral_conv_mul_conj hp (h.integrable j) (hg j) hu] + _ ≤ ∑ j ∈ s, ∫⁻ y, ‖g j y‖ₑ * ‖conv (fun z => conj (θ j (-z))) u volume y‖ₑ := by + refine (eNorm_sum_le _ _).trans (Finset.sum_le_sum fun j _ => ?_) + refine (eNorm_integral_le_lintegral_eNorm _).trans (le_of_eq ?_) + simp only [eNorm_mul, RCLike.eNorm_conj] + _ = ∫⁻ y, ∑ j ∈ s, ‖g j y‖ₑ * ‖conv (fun z => conj (θ j (-z))) u volume y‖ₑ := + (lintegral_finsetSum' s fun j _ => (hg j).aestronglyMeasurable.eNorm.mul (hw j).eNorm).symm + _ ≤ ∫⁻ y, (lqNorm 2 fun j => ‖g j y‖ₑ) * + lqNorm 2 fun j => ‖conv (fun z => conj (θ j (-z))) u volume y‖ₑ := + lintegral_mono fun y => ENNReal.sum_mul_le_lqNorm_two_mul s _ _ + _ ≤ eLpNorm (fun x => lqNorm 2 fun j => ‖g j x‖ₑ) p volume * + eLpNorm (fun x => lqNorm 2 fun j => + ‖conv (fun z => conj (θ j (-z))) u volume x‖ₑ) q volume := + lintegral_mul_le_eLpNorm_mul_eLpNorm hp hq hGm hWm + _ ≤ eLpNorm (fun x => lqNorm 2 fun j => ‖g j x‖ₑ) p volume * + (czConstBelow V q B H * eLpNorm u q volume) := by + gcongr + exact h.adjoint.eLpNorm_lqNorm_conv_le_of_lt hq1 hq2 hu + _ = _ := by ring + +/-- **The analysis bound for `2 < p < ∞`**, in dimension `n ≥ 1`: +`‖ ‖((θ_j ⋆ f)(x))_j‖_{ℓ_2} ‖_p ≤ Rd.czConstBelow V p' B H ‖f‖_p` for every `f ∈ L_p(V)`, +with the conjugate exponent `p' = p.conjExponent < 2`. For every `J`, the duality +`MeasureTheory.eLpNorm_lqNorm_le_of_forall_enorm_sum_integral_le` with +`Rd.IsCZFamily.enorm_sum_integral_conv_mul_conj_le` bounds the `ℓ_2` norm over `j < J`, and +these increase to the full `ℓ_2` norm (`ENNReal.lqNorm_eq_iSup_lqNorm_ite`). -/ +theorem IsCZFamily.eLpNorm_lqNorm_conv_le_of_two_lt [Nontrivial V] (h : IsCZFamily θ B H) + {p : ℝ≥0∞} (hp2 : 2 < p) (hp : p ≠ ∞) {f : V → ℂ} (hf : MemLp f p volume) : + eLpNorm (fun x => lqNorm 2 fun j => ‖conv (θ j) f volume x‖ₑ) p volume ≤ + czConstBelow V p.conjExponent B H * eLpNorm f p volume := by + have hp1 : 1 < p := ENNReal.one_lt_two.trans hp2 + have : p.HolderConjugate p.conjExponent := ENNReal.HolderConjugate.conjExponent hp1.le + have hq1 : 1 < p.conjExponent := (ENNReal.HolderConjugate.lt_top_iff_one_lt p _).1 hp.lt_top + have hq2 : p.conjExponent < 2 := ENNReal.HolderConjugate.lt_two_of_two_lt hp2 + have hJ : ∀ J : ℕ, eLpNorm (fun x => lqNorm 2 fun j => + ‖(if j < J then conv (θ j) f volume x else 0)‖ₑ) p volume ≤ + czConstBelow V p.conjExponent B H * eLpNorm f p volume := fun J => by + refine eLpNorm_lqNorm_le_of_forall_enorm_sum_integral_le (q := p.conjExponent) hp1 hp + (Finset.range J) + (u := fun j x => if j < J then conv (θ j) f volume x else 0) (fun j => ?_) + (fun j hj => ?_) fun g hg => ?_ + · by_cases hj : j < J + · simpa only [hj, ↓reduceIte] using memLp_conv hp1.le hp (h.integrable j) hf + · simp [hj] + · funext x + simp only [Finset.mem_range.not.1 hj, ↓reduceIte, Pi.zero_apply] + · have hs : ∀ j ∈ Finset.range J, + (∫ x, (if j < J then conv (θ j) f volume x else 0) * conj (g j x)) = + ∫ x, conv (θ j) f volume x * conj (g j x) := fun j hj => by + simp only [Finset.mem_range.1 hj, ↓reduceIte] + exact le_of_eq_of_le (congrArg _ (Finset.sum_congr rfl hs)) + (h.enorm_sum_integral_conv_mul_conj_le hq1 hq2 hf _ hg) + have hpt : ∀ x, (lqNorm 2 fun j => ‖conv (θ j) f volume x‖ₑ) = + ⨆ J : ℕ, lqNorm 2 fun j => if j < J then ‖conv (θ j) f volume x‖ₑ else 0 := fun x => + ENNReal.lqNorm_eq_iSup_lqNorm_ite _ + have hmono : Monotone fun (J : ℕ) (x : V) => + lqNorm 2 fun j => if j < J then ‖conv (θ j) f volume x‖ₑ else 0 := fun J J' hJJ' x => + ENNReal.lqNorm_mono fun j => + ENNReal.monotone_ite_lt (fun j => ‖conv (θ j) f volume x‖ₑ) hJJ' j + have hm : ∀ J j : ℕ, AEMeasurable + (fun x => if j < J then ‖conv (θ j) f volume x‖ₑ else 0) volume := fun J j => by + split_ifs + exacts [(aestronglyMeasurable_conv (h.integrable j).1 hf.aestronglyMeasurable).eNorm, + aemeasurable_const] + simp_rw [hpt] + rw [eLpNorm_iSup_of_directed (fun J => aemeasurable_lqNorm_comp (hm J) 2) hmono.directed_le p] + refine iSup_le fun J => le_of_eq_of_le ?_ (hJ J) + congr 1 + funext x + simp_rw [apply_ite (fun z : ℂ => ‖z‖ₑ), eNorm_zero] + +/-- **The synthesis bound for `2 < p < ∞`**, in dimension `n ≥ 1`: for every finite set `s` and +all `g_j ∈ L_p(V)`, +`‖∑_{j ∈ s} θ_j ⋆ g_j‖_p ≤ Rd.czConstBelow V p' B H ‖ ‖(g_j(x))_j‖_{ℓ_2} ‖_p` with the +conjugate exponent `p' = p.conjExponent < 2`, by the duality +`MeasureTheory.eLpNorm_le_of_forall_enorm_integral_mul_conj_le` and +`Rd.IsCZFamily.enorm_integral_sum_conv_mul_conj_le`. -/ +theorem IsCZFamily.eLpNorm_sum_conv_le_of_two_lt [Nontrivial V] (h : IsCZFamily θ B H) + {p : ℝ≥0∞} (hp2 : 2 < p) (hp : p ≠ ∞) (s : Finset ℕ) {g : ℕ → V → ℂ} + (hg : ∀ j, MemLp (g j) p volume) : + eLpNorm (fun x => ∑ j ∈ s, conv (θ j) (g j) volume x) p volume ≤ + czConstBelow V p.conjExponent B H * + eLpNorm (fun x => lqNorm 2 fun j => ‖g j x‖ₑ) p volume := by + have hp1 : 1 < p := ENNReal.one_lt_two.trans hp2 + have : p.HolderConjugate p.conjExponent := ENNReal.HolderConjugate.conjExponent hp1.le + have hq1 : 1 < p.conjExponent := (ENNReal.HolderConjugate.lt_top_iff_one_lt p _).1 hp.lt_top + have hq2 : p.conjExponent < 2 := ENNReal.HolderConjugate.lt_two_of_two_lt hp2 + exact eLpNorm_le_of_forall_enorm_integral_mul_conj_le hp1 hp + (memLp_finsetSum s fun j _ => memLp_conv hp1.le hp (h.integrable j) (hg j)) fun u hu => + h.enorm_integral_sum_conv_mul_conj_le hq1 hq2 s hg hu + +/-! ### All `1 < p < ∞` -/ + +variable (V) in +/-- The constant of the strong type `(p, p)`, `1 < p < ∞`, of a Calderón–Zygmund family with +overlap `B` and Hörmander constant `H`: `B^{1/2}` for `p = 2`, `Rd.czConstBelow V p B H` for +`p < 2`, and `Rd.czConstBelow V p' B H` with the conjugate exponent `p'` for `p > 2`. -/ +noncomputable def czConst (p B H : ℝ≥0∞) : ℝ≥0∞ := + if p = 2 then B ^ (1 / 2 : ℝ) else if p < 2 then czConstBelow V p B H + else czConstBelow V p.conjExponent B H + +/-- The constant `Rd.czConst V p B H` is finite for `1 < p < ∞` and finite `B`, `H`. -/ +theorem czConst_ne_top {p : ℝ≥0∞} (hp1 : 1 < p) (hp : p ≠ ∞) (hB : B ≠ ∞) (hH : H ≠ ∞) : + czConst V p B H ≠ ∞ := by + unfold czConst + split_ifs with h2 hlt + · exact ENNReal.rpow_ne_top_of_nonneg (by norm_num) hB + · exact czConstBelow_ne_top hp1 hlt hB hH + · have hgt : 2 < p := lt_of_le_of_ne (not_lt.1 hlt) (Ne.symm h2) + have : p.HolderConjugate p.conjExponent := ENNReal.HolderConjugate.conjExponent hp1.le + exact czConstBelow_ne_top ((ENNReal.HolderConjugate.lt_top_iff_one_lt p _).1 hp.lt_top) + (ENNReal.HolderConjugate.lt_two_of_two_lt hgt) hB hH + +/-- **The strong type of the analysis operator**: in dimension `n ≥ 1`, for a Calderón–Zygmund +family with overlap `B` and Hörmander constant `H`, every `1 < p < ∞` and every `f ∈ L_p(V)`, +`‖ ‖((θ_j ⋆ f)(x))_j‖_{ℓ_2} ‖_p ≤ Rd.czConst V p B H ‖f‖_p`: the Plancherel bound for `p = 2`, +Marcinkiewicz interpolation for `p < 2` and duality for `p > 2`. -/ +theorem IsCZFamily.eLpNorm_lqNorm_conv_le [Nontrivial V] (h : IsCZFamily θ B H) {p : ℝ≥0∞} + (hp1 : 1 < p) (hp : p ≠ ∞) {f : V → ℂ} (hf : MemLp f p volume) : + eLpNorm (fun x => lqNorm 2 fun j => ‖conv (θ j) f volume x‖ₑ) p volume ≤ + czConst V p B H * eLpNorm f p volume := by + rcases lt_trichotomy p 2 with hlt | rfl | hgt + · simp only [czConst, hlt.ne, hlt, ↓reduceIte] + exact h.eLpNorm_lqNorm_conv_le_of_lt hp1 hlt hf + · simp only [czConst, ↓reduceIte] + exact h.eLpNorm_lqNorm_conv_two_le hf + · simp only [czConst, hgt.ne', not_lt.2 hgt.le, ↓reduceIte] + exact h.eLpNorm_lqNorm_conv_le_of_two_lt hgt hp hf + +/-- **The strong type of the synthesis operators**: in dimension `n ≥ 1`, for a +Calderón–Zygmund family with overlap `B` and Hörmander constant `H`, every `1 < p < ∞`, every +finite set `s` and all `g_j ∈ L_p(V)`, +`‖∑_{j ∈ s} θ_j ⋆ g_j‖_p ≤ Rd.czConst V p B H ‖ ‖(g_j(x))_j‖_{ℓ_2} ‖_p`: the Plancherel bound +for `p = 2`, Marcinkiewicz interpolation for `p < 2` and duality for `p > 2`. -/ +theorem IsCZFamily.eLpNorm_sum_conv_le [Nontrivial V] (h : IsCZFamily θ B H) {p : ℝ≥0∞} + (hp1 : 1 < p) (hp : p ≠ ∞) (s : Finset ℕ) {g : ℕ → V → ℂ} (hg : ∀ j, MemLp (g j) p volume) : + eLpNorm (fun x => ∑ j ∈ s, conv (θ j) (g j) volume x) p volume ≤ + czConst V p B H * eLpNorm (fun x => lqNorm 2 fun j => ‖g j x‖ₑ) p volume := by + rcases lt_trichotomy p 2 with hlt | rfl | hgt + · simp only [czConst, hlt.ne, hlt, ↓reduceIte] + exact h.eLpNorm_sum_conv_le_of_lt hp1 hlt s hg + · simp only [czConst, ↓reduceIte] + exact h.eLpNorm_sum_conv_two_le s hg + · simp only [czConst, hgt.ne', not_lt.2 hgt.le, ↓reduceIte] + exact h.eLpNorm_sum_conv_le_of_two_lt hgt hp s hg + +end Rd diff --git a/LeanPool/FunctionSpaces/Rd/SingularIntegrals/VectorValuedWeakType.lean b/LeanPool/FunctionSpaces/Rd/SingularIntegrals/VectorValuedWeakType.lean new file mode 100644 index 0000000000..a2d7704a9d --- /dev/null +++ b/LeanPool/FunctionSpaces/Rd/SingularIntegrals/VectorValuedWeakType.lean @@ -0,0 +1,486 @@ +/- +Copyright (c) 2026 Mario Ullrich. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Mario Ullrich +-/ +module + +public import LeanPool.FunctionSpaces.Analysis.Maximal.CalderonZygmundSigned +public import LeanPool.FunctionSpaces.Rd.SingularIntegrals.PlancherelBounds +public import LeanPool.FunctionSpaces.Rd.SingularIntegrals.ConvolutionAdjoint + +/- +Modified for Lean Pool: module names and imports adapted. +-/ + +/-! +# The weak type `(1,1)` of vector-valued singular integrals + +Let `V` have dimension `n ≥ 1` and let `(θ_j)_{j ∈ ℕ}` be a Calderón–Zygmund family with Fourier +overlap `B` and Hörmander constant `H` (`Rd.IsCZFamily`). With +`C = Rd.vectorWeakConst V B H = 4 · 2^n B + (2n)^n |B(0, 1)| + 4H`, for every `0 < t < ∞`: + +* **the analysis operator** (`Rd.IsCZFamily.volume_lqNorm_conv_gt_le`): for integrable `f`, + `|{x : ‖((θ_j ⋆ f)(x))_j‖_{ℓ_2} > t}| ≤ C t⁻¹ ∫ |f|`; +* **the synthesis operators** (`Rd.IsCZFamily.volume_enorm_sum_conv_gt_le`): for every finite + set `s` and almost everywhere strongly measurable `g_j` with `G = ‖(g_j)_j‖_{ℓ_2}` and + `∫ G < ∞`, `|{x : |∑_{j ∈ s} (θ_j ⋆ g_j)(x)| > t}| ≤ C t⁻¹ ∫ G`. + +The proof splits `f` (resp. every `g_j`) by the signed Calderón–Zygmund decomposition of `|f|` +(resp. of `G`) at height `t`. The good part is handled by the Plancherel bounds and Chebyshev's +inequality. The bad pieces `b_Q` have mean zero on their cubes `Q` with centres `c_Q`, so +`(θ_j ⋆ b_Q)(x) = ∫_Q (θ_j(x - y) - θ_j(x - c_Q)) b_Q(y) dy` +(`Rd.IsCZFamily.lqNorm_conv_le_setLIntegral`, `Rd.IsCZFamily.enorm_sum_conv_le_setLIntegral`), +and off the enlarged exceptional set `Ω*` the Hörmander condition integrates these kernels +(`Rd.IsCZFamily.setLIntegral_compl_czEnlarged_tsum_le`). The general bookkeeping of the level +sets is `MeasureTheory.measure_lt_le_of_ae_le_add` of `FunctionSpaces.Analysis.Lp.Marcinkiewicz`. +-/ + +@[expose] public section + +open MeasureTheory Module Metric Set Filter +open scoped ENNReal +open ENNReal (lqNorm) + +namespace Rd + +variable {V : Type*} [NormedAddCommGroup V] [InnerProductSpace ℝ V] [FiniteDimensional ℝ V] + [MeasurableSpace V] [BorelSpace V] +variable {θ : ℕ → V → ℂ} {B H : ℝ≥0∞} {G : V → ℝ≥0∞} {t : ℝ≥0∞} + +/-! ### The Hörmander condition around a cube -/ + +/-- **The Hörmander condition around a centre**: for a Calderón–Zygmund family with Hörmander +constant `H`, a centre `c`, a radius `ρ` and a point `y` with `‖y - c‖ ≤ ρ`, +`∫_{‖x - c‖ > 2ρ} ‖(θ_j(x - y) - θ_j(x - c))_j‖_{ℓ_2} dx ≤ H`. The translation `x ↦ x - c` +(Mathlib's `measurePreserving_sub_right`) turns the integral into the Hörmander integral at +`y - c` over a smaller set. -/ +theorem IsCZFamily.setLIntegral_compl_closedBall_le (h : IsCZFamily θ B H) {c y : V} {ρ : ℝ} + (hy : ‖y - c‖ ≤ ρ) : + ∫⁻ x in (closedBall c (2 * ρ))ᶜ, lqNorm 2 (fun j => ‖θ j (x - y) - θ j (x - c)‖ₑ) ≤ H := by + have hsub : (closedBall c (2 * ρ))ᶜ ⊆ (fun x => x - c) ⁻¹' {x' : V | 2 * ‖y - c‖ < ‖x'‖} := by + intro x hx + simp only [mem_compl_iff, mem_closedBall, dist_eq_norm, not_le] at hx + change 2 * ‖y - c‖ < ‖x - c‖ + linarith + calc ∫⁻ x in (closedBall c (2 * ρ))ᶜ, lqNorm 2 (fun j => ‖θ j (x - y) - θ j (x - c)‖ₑ) + ≤ ∫⁻ x in (fun x => x - c) ⁻¹' {x' : V | 2 * ‖y - c‖ < ‖x'‖}, + lqNorm 2 (fun j => ‖θ j (x - c - (y - c)) - θ j (x - c)‖ₑ) := by + simp only [sub_sub_sub_cancel_right] + exact lintegral_mono_set hsub + _ = ∫⁻ x' in {x' : V | 2 * ‖y - c‖ < ‖x'‖}, + lqNorm 2 (fun j => ‖θ j (x' - (y - c)) - θ j x'‖ₑ) := + (measurePreserving_sub_right volume c).setLIntegral_comp_preimage_emb + (measurableEmbedding_subRight c) (fun x' => + lqNorm 2 (fun j => ‖θ j (x' - (y - c)) - θ j x'‖ₑ)) _ + _ ≤ H := h.hormander (y - c) + +/-- The kernel `(x, y) ↦ ‖(θ_j(x - y) - θ_j(x - c))_j‖_{ℓ_2}` of a Calderón–Zygmund family is +measurable on `V × V`, since every `θ_j` is continuous. -/ +theorem IsCZFamily.measurable_lqNorm_sub (h : IsCZFamily θ B H) (c : V) : + Measurable fun p : V × V => lqNorm 2 (fun j => ‖θ j (p.1 - p.2) - θ j (p.1 - c)‖ₑ) := + measurable_lqNorm_comp (fun j => (((h.continuous j).comp (continuous_fst.sub continuous_snd)).sub + ((h.continuous j).comp (continuous_fst.sub continuous_const))).measurable.eNorm) 2 + +/-- **The bad part off the doubled ball** (scalar mass): for a Calderón–Zygmund family with +Hörmander constant `H`, a measurable set `Q ⊆ B̄(c, ρ)` and an almost everywhere measurable mass +`m : V → [0, ∞]`, +`∫_{‖x - c‖ > 2ρ} ∫_Q ‖(θ_j(x - y) - θ_j(x - c))_j‖_{ℓ_2} m(y) dy dx ≤ H ∫_Q m`, by Tonelli's +theorem (Mathlib's `lintegral_lintegral_swap`) and +`Rd.IsCZFamily.setLIntegral_compl_closedBall_le` for each `y ∈ Q`. -/ +theorem IsCZFamily.setLIntegral_compl_closedBall_setLIntegral_le (h : IsCZFamily θ B H) {c : V} + {ρ : ℝ} {Q : Set V} (hQ : MeasurableSet Q) (hQc : Q ⊆ closedBall c ρ) {m : V → ℝ≥0∞} + (hm : AEMeasurable m volume) : + ∫⁻ x in (closedBall c (2 * ρ))ᶜ, ∫⁻ y in Q, + lqNorm 2 (fun j => ‖θ j (x - y) - θ j (x - c)‖ₑ) * m y ≤ H * ∫⁻ y in Q, m y := by + have hF : AEMeasurable (Function.uncurry fun x y => + lqNorm 2 (fun j => ‖θ j (x - y) - θ j (x - c)‖ₑ) * m y) + ((volume.restrict (closedBall c (2 * ρ))ᶜ).prod (volume.restrict Q)) := by + have h2 : AEMeasurable (fun p : V × V => m p.2) + ((volume.restrict (closedBall c (2 * ρ))ᶜ).prod (volume.restrict Q)) := + hm.restrict.comp_snd + exact (h.measurable_lqNorm_sub c).aemeasurable.mul h2 + rw [lintegral_lintegral_swap hF] + have hx : ∀ y, Measurable fun x => lqNorm 2 (fun j => ‖θ j (x - y) - θ j (x - c)‖ₑ) := + fun y => (h.measurable_lqNorm_sub c).comp (f := fun x : V => (x, y)) measurable_prodMk_right + calc ∫⁻ y in Q, ∫⁻ x in (closedBall c (2 * ρ))ᶜ, + lqNorm 2 (fun j => ‖θ j (x - y) - θ j (x - c)‖ₑ) * m y + = ∫⁻ y in Q, (∫⁻ x in (closedBall c (2 * ρ))ᶜ, + lqNorm 2 (fun j => ‖θ j (x - y) - θ j (x - c)‖ₑ)) * m y := + lintegral_congr fun y => lintegral_mul_const _ (hx y) + _ ≤ ∫⁻ y in Q, H * m y := by + refine setLIntegral_mono' hQ fun y hy => ?_ + gcongr + exact h.setLIntegral_compl_closedBall_le (mem_closedBall_iff_norm.1 (hQc hy)) + _ = H * ∫⁻ y in Q, m y := lintegral_const_mul'' H hm.restrict + +/-! ### Convolutions of pieces with mean zero -/ + +/-- **A piece with mean zero against a bounded continuous kernel**: for `b` integrable, +vanishing outside a set `Q`, with `∫ b = 0`, and any points `c, x`, +`|(K ⋆ b)(x)| ≤ ∫_Q |K(x - y) - K(x - c)| |b(y)| dy`, since +`(K ⋆ b)(x) = ∫ (K(x - y) - K(x - c)) b(y) dy`. -/ +theorem enorm_conv_le_setLIntegral_sub {K : V → ℂ} (hK : Continuous K) + (hKb : BddAbove (Set.range fun z => ‖K z‖)) {Q : Set V} {b : V → ℂ} (hb : Integrable b) + (hbQ : ∀ y ∉ Q, b y = 0) (hb0 : ∫ y, b y = 0) (c x : V) : + ‖conv K b volume x‖ₑ ≤ ∫⁻ y in Q, ‖K (x - y) - K (x - c)‖ₑ * ‖b y‖ₑ := by + obtain ⟨C, hC⟩ := hKb + have hKb : Integrable (fun y => K (x - y) * b y) := + hb.bdd_mul (hK.comp (continuous_const.sub continuous_id)).aestronglyMeasurable + (ae_of_all _ fun y => hC ⟨x - y, rfl⟩) + have hconv : conv K b volume x = ∫ y, (K (x - y) - K (x - c)) * b y := by + simp_rw [sub_mul] + rw [integral_sub hKb (hb.const_mul _), integral_const_mul, hb0, mul_zero, sub_zero, + conv_apply_eq_integral_sub] + rw [hconv] + refine (eNorm_integral_le_lintegral_eNorm _).trans (le_of_eq ?_) + simp_rw [eNorm_mul] + refine (setLIntegral_eq_of_support_subset fun y hy => ?_).symm + by_contra hyQ + exact hy (by simp [hbQ y hyQ]) + +/-- **A piece with mean zero against a Calderón–Zygmund family**: for `b` integrable, vanishing +outside `Q`, with `∫ b = 0`, and any points `c, x`, +`‖((θ_j ⋆ b)(x))_j‖_{ℓ_2} ≤ ∫_Q ‖(θ_j(x - y) - θ_j(x - c))_j‖_{ℓ_2} |b(y)| dy`, by +`Rd.enorm_conv_le_setLIntegral_sub` for each `j` and Minkowski's integral inequality +(`MeasureTheory.lqNorm_lintegral_le`). -/ +theorem IsCZFamily.lqNorm_conv_le_setLIntegral (h : IsCZFamily θ B H) {Q : Set V} {b : V → ℂ} + (hb : Integrable b) (hbQ : ∀ y ∉ Q, b y = 0) (hb0 : ∫ y, b y = 0) (c x : V) : + lqNorm 2 (fun j => ‖conv (θ j) b volume x‖ₑ) ≤ + ∫⁻ y in Q, lqNorm 2 (fun j => ‖θ j (x - y) - θ j (x - c)‖ₑ) * ‖b y‖ₑ := by + have hm : ∀ j, AEMeasurable (fun y => ‖θ j (x - y) - θ j (x - c)‖ₑ * ‖b y‖ₑ) + (volume.restrict Q) := fun j => + (((h.continuous j).comp (continuous_const.sub continuous_id)).sub + continuous_const).measurable.eNorm.aemeasurable.mul hb.1.eNorm.restrict + calc lqNorm 2 (fun j => ‖conv (θ j) b volume x‖ₑ) + ≤ lqNorm 2 (fun j => ∫⁻ y in Q, ‖θ j (x - y) - θ j (x - c)‖ₑ * ‖b y‖ₑ) := + ENNReal.lqNorm_mono fun j => + enorm_conv_le_setLIntegral_sub (h.continuous j) (h.bddAbove j) hb hbQ hb0 c x + _ ≤ ∫⁻ y in Q, lqNorm 2 (fun j => ‖θ j (x - y) - θ j (x - c)‖ₑ * ‖b y‖ₑ) := + lqNorm_lintegral_le one_le_two hm + _ = ∫⁻ y in Q, lqNorm 2 (fun j => ‖θ j (x - y) - θ j (x - c)‖ₑ) * ‖b y‖ₑ := + lintegral_congr fun y => by + simpa only [mul_comm] using ENNReal.lqNorm_const_mul (q := 2) ‖b y‖ₑ + (fun j => ‖θ j (x - y) - θ j (x - c)‖ₑ) + +/-- **Pieces with mean zero against a synthesis sum**: for integrable `b_j` vanishing outside `Q` +with `∫ b_j = 0`, a finite set `s` and any points `c, x`, +`|∑_{j ∈ s} (θ_j ⋆ b_j)(x)| ≤ ∫_Q ‖(θ_j(x - y) - θ_j(x - c))_j‖_{ℓ_2} ‖(b_j(y))_j‖_{ℓ_2} dy`, +by `Rd.enorm_conv_le_setLIntegral_sub` for each `j` and the Cauchy–Schwarz inequality +`ENNReal.sum_mul_le_lqNorm_two_mul` at each `y`. -/ +theorem IsCZFamily.enorm_sum_conv_le_setLIntegral (h : IsCZFamily θ B H) (s : Finset ℕ) + {Q : Set V} {b : ℕ → V → ℂ} (hb : ∀ j, Integrable (b j)) (hbQ : ∀ j, ∀ y ∉ Q, b j y = 0) + (hb0 : ∀ j, ∫ y, b j y = 0) (c x : V) : + ‖∑ j ∈ s, conv (θ j) (b j) volume x‖ₑ ≤ + ∫⁻ y in Q, lqNorm 2 (fun j => ‖θ j (x - y) - θ j (x - c)‖ₑ) * + lqNorm 2 (fun j => ‖b j y‖ₑ) := by + have hm : ∀ j ∈ s, AEMeasurable (fun y => ‖θ j (x - y) - θ j (x - c)‖ₑ * ‖b j y‖ₑ) + (volume.restrict Q) := fun j _ => + (((h.continuous j).comp (continuous_const.sub continuous_id)).sub + continuous_const).measurable.eNorm.aemeasurable.mul (hb j).1.eNorm.restrict + calc ‖∑ j ∈ s, conv (θ j) (b j) volume x‖ₑ ≤ ∑ j ∈ s, ‖conv (θ j) (b j) volume x‖ₑ := + eNorm_sum_le _ _ + _ ≤ ∑ j ∈ s, ∫⁻ y in Q, ‖θ j (x - y) - θ j (x - c)‖ₑ * ‖b j y‖ₑ := + Finset.sum_le_sum fun j _ => enorm_conv_le_setLIntegral_sub (h.continuous j) + (h.bddAbove j) (hb j) (hbQ j) (hb0 j) c x + _ = ∫⁻ y in Q, ∑ j ∈ s, ‖θ j (x - y) - θ j (x - c)‖ₑ * ‖b j y‖ₑ := + (lintegral_finsetSum' s hm).symm + _ ≤ _ := lintegral_mono fun y => ENNReal.sum_mul_le_lqNorm_two_mul s _ _ + +/-! ### The bad part -/ + +/-- **Convolution of the bad part, piece by piece**: for a continuous bounded kernel `K`, an +integrable `f` and the maximal big cubes of any `G` at any height `t`, +`(K ⋆ czBadC f)(x) = ∑_Q (K ⋆ czBadPart_Q f)(x)` at every point `x`. The proof bounds +`∑_Q ∫ |K(x - y)| |czBadPart_Q f(y)| dy` by `sup |K| · 2 ∫ |f|` +(`Rd.tsum_lintegral_enorm_czBadPart_le`), so sum and integral can be exchanged (Mathlib's +`hasSum_integral_of_summable_integral_norm`). -/ +theorem hasSum_conv_czBadPart {K : V → ℂ} (hK : Continuous K) + (hKb : BddAbove (Set.range fun z => ‖K z‖)) {f : V → ℂ} (hf : Integrable f) (x : V) : + HasSum (fun km : czMaximal G t => conv K (czBadPart f km.1) volume x) + (conv K (czBadC G t f) volume x) := by + obtain ⟨C, hC⟩ := hKb + have hint : ∀ km : czMaximal G t, Integrable (fun y => K (x - y) * czBadPart f km.1 y) := + fun km => (integrable_czBadPart hf.integrableOn).bdd_mul + (hK.comp (continuous_const.sub continuous_id)).aestronglyMeasurable + (ae_of_all _ fun y => hC ⟨x - y, rfl⟩) + have hle : ∀ km : czMaximal G t, ∫⁻ y, ‖K (x - y) * czBadPart f km.1 y‖ₑ ≤ + ENNReal.ofReal C * ∫⁻ y, ‖czBadPart f km.1 y‖ₑ := fun km => by + rw [← lintegral_const_mul' _ _ ENNReal.ofReal_ne_top] + refine lintegral_mono fun y => ?_ + rw [eNorm_mul, ← ofReal_norm (K (x - y))] + gcongr + exact hC ⟨x - y, rfl⟩ + have hsum : ∑' km : czMaximal G t, ∫⁻ y, ‖K (x - y) * czBadPart f km.1 y‖ₑ ≠ ∞ := by + refine ne_top_of_le_ne_top (ENNReal.mul_ne_top (ENNReal.ofReal_ne_top (r := C)) + (ENNReal.mul_ne_top (by norm_num : (2 : ℝ≥0∞) ≠ ∞) hf.2.ne)) + ((tsum_le_tsum hle).trans ?_) + rw [ENNReal.tsum_mul_left] + gcongr + exact tsum_lintegral_enorm_czBadPart_le f + have hnorm : (fun km : czMaximal G t => ∫ y, ‖K (x - y) * czBadPart f km.1 y‖) = + fun km => (∫⁻ y, ‖K (x - y) * czBadPart f km.1 y‖ₑ).toReal := + funext fun km => integral_norm_eq_lintegral_eNorm (hint km).1 + have h1 := hasSum_integral_of_summable_integral_norm hint + (hnorm ▸ ENNReal.summable_toReal hsum) + have h2 : (fun km : czMaximal G t => conv K (czBadPart f km.1) volume x) = + fun km => ∫ y, K (x - y) * czBadPart f km.1 y := + funext fun km => conv_apply_eq_integral_sub _ _ _ + have h3 : (fun y => K (x - y) * czBadC G t f y) = + fun y => ∑' km : czMaximal G t, K (x - y) * czBadPart f km.1 y := + funext fun y => by rw [czBadC_eq_tsum, tsum_mul_left] + rw [h2, conv_apply_eq_integral_sub, h3] + exact h1 + +/-- **The bad part off the enlarged exceptional set, piece by piece**: for a Calderón–Zygmund +family with Hörmander constant `H`, the maximal big cubes `Q` of any `G` at any height `t`, with +centres `c_Q`, and almost everywhere measurable masses `m_Q : V → [0, ∞]`, +`∫_{V \ Ω*} ∑_Q ∫_Q ‖(θ_j(x - y) - θ_j(x - c_Q))_j‖_{ℓ_2} m_Q(y) dy dx ≤ H ∑_Q ∫_Q m_Q`. Every +`x ∉ Ω*` lies outside the ball of radius `2n 2^(-k)` around the centre of `Q = Q_{k,m}`, and +`Q` lies in the ball of radius `n 2^(-k)` (`Rd.zcell_subset_closedBall`), so +`Rd.IsCZFamily.setLIntegral_compl_closedBall_setLIntegral_le` bounds every term. -/ +theorem IsCZFamily.setLIntegral_compl_czEnlarged_tsum_le (h : IsCZFamily θ B H) + {m : czMaximal G t → V → ℝ≥0∞} (hm : ∀ km, AEMeasurable (m km) volume) : + ∫⁻ x in (czEnlarged G t)ᶜ, ∑' km : czMaximal G t, ∫⁻ y in zcell km.1.1 km.1.2, + lqNorm 2 (fun j => ‖θ j (x - y) - θ j (x - zcellCenter km.1.1 km.1.2)‖ₑ) * m km y ≤ + H * ∑' km : czMaximal G t, ∫⁻ y in zcell km.1.1 km.1.2, m km y := by + have hmeas : ∀ km : czMaximal G t, AEMeasurable (fun x => ∫⁻ y in zcell km.1.1 km.1.2, + lqNorm 2 (fun j => ‖θ j (x - y) - θ j (x - zcellCenter km.1.1 km.1.2)‖ₑ) * m km y) + (volume.restrict (czEnlarged G t)ᶜ) := fun km => by + have h2 : AEMeasurable (fun p : V × V => m km p.2) + ((volume.restrict (czEnlarged G t)ᶜ).prod (volume.restrict (zcell km.1.1 km.1.2))) := + (hm km).restrict.comp_snd + exact ((h.measurable_lqNorm_sub _).aemeasurable.mul h2).lintegral_prod_right' + rw [lintegral_tsum hmeas, ← ENNReal.tsum_mul_left] + refine tsum_le_tsum fun km => ?_ + have hsub : (czEnlarged G t)ᶜ ⊆ + (closedBall (zcellCenter km.1.1 km.1.2) (2 * (finrank ℝ V / 2 ^ km.1.1)))ᶜ := + compl_subset_compl.2 (subset_biUnion_of_mem (u := fun km : ℤ × (Fin (finrank ℝ V) → ℤ) => + closedBall (zcellCenter km.1 km.2) (2 * (finrank ℝ V / 2 ^ km.1))) km.2) + exact (lintegral_mono_set hsub).trans (h.setLIntegral_compl_closedBall_setLIntegral_le + (measurableSet_zcell _ _) (zcell_subset_closedBall _ _) (hm km)) + +/-- **The analysis operator on the bad part, off `Ω*`**: for a Calderón–Zygmund family with +Hörmander constant `H`, an integrable `f` and the cubes of any `G` at any height `t`, +`∫_{V \ Ω*} ‖((θ_j ⋆ czBadC f)(x))_j‖_{ℓ_2} dx ≤ 2H ∫ |f|`. At every `x` the sequence is the +series of the sequences of the pieces (`Rd.hasSum_conv_czBadPart`), whose `ℓ_2` norms add up +(`MeasureTheory.eLpNorm_tsum_le` for the counting measure) and are bounded by +`Rd.IsCZFamily.lqNorm_conv_le_setLIntegral`, since the pieces have mean zero. -/ +theorem IsCZFamily.setLIntegral_lqNorm_conv_czBadC_le (h : IsCZFamily θ B H) {f : V → ℂ} + (hf : Integrable f) : + ∫⁻ x in (czEnlarged G t)ᶜ, lqNorm 2 (fun j => ‖conv (θ j) (czBadC G t f) volume x‖ₑ) ≤ + 2 * H * ∫⁻ x, ‖f x‖ₑ := by + have hpt : ∀ x, lqNorm 2 (fun j => ‖conv (θ j) (czBadC G t f) volume x‖ₑ) ≤ + ∑' km : czMaximal G t, ∫⁻ y in zcell km.1.1 km.1.2, + lqNorm 2 (fun j => ‖θ j (x - y) - θ j (x - zcellCenter km.1.1 km.1.2)‖ₑ) * + ‖czBadPart f km.1 y‖ₑ := fun x => + calc lqNorm 2 (fun j => ‖conv (θ j) (czBadC G t f) volume x‖ₑ) + ≤ lqNorm 2 (fun j => ∑' km : czMaximal G t, ‖conv (θ j) (czBadPart f km.1) volume x‖ₑ) := + ENNReal.lqNorm_mono fun j => (hasSum_conv_czBadPart (h.continuous j) (h.bddAbove j) + hf x).eNorm_le_of_bounded CompleteLattice.summable.hasSum fun _ => le_rfl + _ ≤ ∑' km : czMaximal G t, lqNorm 2 (fun j => ‖conv (θ j) (czBadPart f km.1) volume x‖ₑ) := + eLpNorm_tsum_le one_le_two + _ ≤ _ := tsum_le_tsum fun km => h.lqNorm_conv_le_setLIntegral + (integrable_czBadPart hf.integrableOn) (fun y hy => czBadPart_of_notMem f hy) + (integral_czBadPart f km.1) _ x + calc ∫⁻ x in (czEnlarged G t)ᶜ, lqNorm 2 (fun j => ‖conv (θ j) (czBadC G t f) volume x‖ₑ) + ≤ ∫⁻ x in (czEnlarged G t)ᶜ, ∑' km : czMaximal G t, ∫⁻ y in zcell km.1.1 km.1.2, + lqNorm 2 (fun j => ‖θ j (x - y) - θ j (x - zcellCenter km.1.1 km.1.2)‖ₑ) * + ‖czBadPart f km.1 y‖ₑ := lintegral_mono fun x => hpt x + _ ≤ H * ∑' km : czMaximal G t, ∫⁻ y in zcell km.1.1 km.1.2, ‖czBadPart f km.1 y‖ₑ := + h.setLIntegral_compl_czEnlarged_tsum_le fun km => + (integrable_czBadPart hf.integrableOn).1.eNorm + _ ≤ H * (2 * ∫⁻ x, ‖f x‖ₑ) := by + gcongr + exact (tsum_le_tsum fun km => setLIntegral_le_lintegral _ _).trans + (tsum_lintegral_enorm_czBadPart_le f) + _ = 2 * H * ∫⁻ x, ‖f x‖ₑ := by ring + +/-- **The synthesis operator on the bad parts, off `Ω*`**: for a Calderón–Zygmund family with +Hörmander constant `H`, integrable `g_j`, a finite set `s` and the cubes of any `G` at any +height `t`, +`∫_{V \ Ω*} |∑_{j ∈ s} (θ_j ⋆ czBadC g_j)(x)| dx ≤ 2H ∫ ‖(g_j(x))_j‖_{ℓ_2} dx`, by +`Rd.hasSum_conv_czBadPart` for each `j`, `Rd.IsCZFamily.enorm_sum_conv_le_setLIntegral` for the +pieces on each cube and `Rd.tsum_lintegral_lqNorm_czBadPart_le`. -/ +theorem IsCZFamily.setLIntegral_enorm_sum_conv_czBadC_le (h : IsCZFamily θ B H) (s : Finset ℕ) + {g : ℕ → V → ℂ} (hg : ∀ j, Integrable (g j)) : + ∫⁻ x in (czEnlarged G t)ᶜ, ‖∑ j ∈ s, conv (θ j) (czBadC G t (g j)) volume x‖ₑ ≤ + 2 * H * ∫⁻ x, lqNorm 2 (fun j => ‖g j x‖ₑ) := by + have hpt : ∀ x, ‖∑ j ∈ s, conv (θ j) (czBadC G t (g j)) volume x‖ₑ ≤ + ∑' km : czMaximal G t, ∫⁻ y in zcell km.1.1 km.1.2, + lqNorm 2 (fun j => ‖θ j (x - y) - θ j (x - zcellCenter km.1.1 km.1.2)‖ₑ) * + lqNorm 2 (fun j => ‖czBadPart (g j) km.1 y‖ₑ) := fun x => + calc ‖∑ j ∈ s, conv (θ j) (czBadC G t (g j)) volume x‖ₑ + ≤ ∑' km : czMaximal G t, ‖∑ j ∈ s, conv (θ j) (czBadPart (g j) km.1) volume x‖ₑ := + (hasSum_sum fun j _ => hasSum_conv_czBadPart (h.continuous j) (h.bddAbove j) (hg j) + x).eNorm_le_of_bounded CompleteLattice.summable.hasSum fun _ => le_rfl + _ ≤ _ := tsum_le_tsum fun km => h.enorm_sum_conv_le_setLIntegral s + (fun j => integrable_czBadPart (hg j).integrableOn) + (fun j y hy => czBadPart_of_notMem (g j) hy) (fun j => integral_czBadPart (g j) km.1) _ x + calc ∫⁻ x in (czEnlarged G t)ᶜ, ‖∑ j ∈ s, conv (θ j) (czBadC G t (g j)) volume x‖ₑ + ≤ ∫⁻ x in (czEnlarged G t)ᶜ, ∑' km : czMaximal G t, ∫⁻ y in zcell km.1.1 km.1.2, + lqNorm 2 (fun j => ‖θ j (x - y) - θ j (x - zcellCenter km.1.1 km.1.2)‖ₑ) * + lqNorm 2 (fun j => ‖czBadPart (g j) km.1 y‖ₑ) := lintegral_mono fun x => hpt x + _ ≤ H * ∑' km : czMaximal G t, ∫⁻ y in zcell km.1.1 km.1.2, + lqNorm 2 (fun j => ‖czBadPart (g j) km.1 y‖ₑ) := + h.setLIntegral_compl_czEnlarged_tsum_le fun km => aemeasurable_lqNorm_comp + (fun j => (integrable_czBadPart (hg j).integrableOn).1.eNorm) 2 + _ ≤ H * (2 * ∫⁻ x, lqNorm 2 (fun j => ‖g j x‖ₑ)) := by + gcongr + exact (tsum_le_tsum fun km => setLIntegral_le_lintegral _ _).trans + (tsum_lintegral_lqNorm_czBadPart_le one_le_two fun j => (hg j).1) + _ = 2 * H * ∫⁻ x, lqNorm 2 (fun j => ‖g j x‖ₑ) := by ring + +/-! ### The good part and the splitting -/ + +/-- **The analysis operator on the good part**: in dimension `n ≥ 1`, for a Calderón–Zygmund +family with overlap `B`, an integrable `f` and `0 < t < ∞`, the good part `czGoodC f` for the +cubes of `|f|` at height `t` satisfies +`∫ ‖((θ_j ⋆ czGoodC f)(x))_j‖_{ℓ_2}² dx ≤ B 2^n t ∫ |f|`, by the Plancherel bound +`Rd.IsCZFamily.lintegral_lqNorm_conv_sq_le` and `Rd.lintegral_enorm_czGoodC_sq_le`. -/ +theorem IsCZFamily.lintegral_lqNorm_conv_czGoodC_sq_le [Nontrivial V] (h : IsCZFamily θ B H) + {f : V → ℂ} (hf : Integrable f) (ht0 : 0 < t) (ht : t ≠ ∞) : + ∫⁻ x, lqNorm 2 (fun j => ‖conv (θ j) (czGoodC (fun y => ‖f y‖ₑ) t f) volume x‖ₑ) ^ 2 ≤ + B * 2 ^ finrank ℝ V * t * ∫⁻ x, ‖f x‖ₑ := by + have hsq := lintegral_enorm_czGoodC_sq_le hf ht0 + have hL2 : MemLp (czGoodC (fun y => ‖f y‖ₑ) t f) 2 volume := + memLp_two_of_lintegral_enorm_sq_ne_top (aestronglyMeasurable_czGoodC hf.1) + (ne_top_of_le_ne_top (ENNReal.mul_ne_top (ENNReal.mul_ne_top + (ENNReal.pow_ne_top ENNReal.ofNat_ne_top) ht) hf.2.ne) hsq) + calc _ ≤ B * ∫⁻ x, ‖czGoodC (fun y => ‖f y‖ₑ) t f x‖ₑ ^ 2 := h.lintegral_lqNorm_conv_sq_le hL2 + _ ≤ B * (2 ^ finrank ℝ V * t * ∫⁻ x, ‖f x‖ₑ) := by gcongr + _ = B * 2 ^ finrank ℝ V * t * ∫⁻ x, ‖f x‖ₑ := by ring + +/-- **The synthesis operator on the good parts**: in dimension `n ≥ 1`, for a Calderón–Zygmund +family with overlap `B`, a finite set `s`, almost everywhere strongly measurable `g_j` with +`G = ‖(g_j)_j‖_{ℓ_2}` integrable, and `0 < t < ∞`, the good parts `czGoodC g_j` for the cubes of +`G` at height `t` satisfy `∫ |∑_{j ∈ s} (θ_j ⋆ czGoodC g_j)(x)|² dx ≤ B 2^n t ∫ G`, by the +Plancherel bound `Rd.IsCZFamily.lintegral_enorm_sum_conv_sq_le` and +`Rd.lintegral_lqNorm_czGoodC_sq_le`. -/ +theorem IsCZFamily.lintegral_enorm_sum_conv_czGoodC_sq_le [Nontrivial V] (h : IsCZFamily θ B H) + (s : Finset ℕ) {g : ℕ → V → ℂ} (hg : ∀ j, AEStronglyMeasurable (g j) volume) + (hG : ∫⁻ x, lqNorm 2 (fun j => ‖g j x‖ₑ) ≠ ∞) (ht0 : 0 < t) (ht : t ≠ ∞) : + ∫⁻ x, ‖∑ j ∈ s, conv (θ j) + (czGoodC (fun y => lqNorm 2 (fun j => ‖g j y‖ₑ)) t (g j)) volume x‖ₑ ^ 2 ≤ + B * 2 ^ finrank ℝ V * t * ∫⁻ x, lqNorm 2 (fun j => ‖g j x‖ₑ) := by + have hsq := lintegral_lqNorm_czGoodC_sq_le one_le_two hg hG ht0 + have hfin : ∫⁻ x, lqNorm 2 (fun j => + ‖czGoodC (fun y => lqNorm 2 (fun j => ‖g j y‖ₑ)) t (g j) x‖ₑ) ^ 2 ≠ ∞ := + ne_top_of_le_ne_top (ENNReal.mul_ne_top (ENNReal.mul_ne_top + (ENNReal.pow_ne_top ENNReal.ofNat_ne_top) ht) hG) hsq + have hL2 : ∀ j, MemLp (czGoodC (fun y => lqNorm 2 (fun j => ‖g j y‖ₑ)) t (g j)) 2 volume := + fun j => memLp_two_of_lintegral_enorm_sq_ne_top (aestronglyMeasurable_czGoodC (hg j)) + (ne_top_of_le_ne_top hfin (lintegral_mono fun x => by + gcongr + exact ENNReal.le_lqNorm two_ne_zero (fun i => ‖czGoodC (fun y => + lqNorm 2 (fun j => ‖g j y‖ₑ)) t (g i) x‖ₑ) j)) + calc _ ≤ B * ∫⁻ x, lqNorm 2 (fun j => + ‖czGoodC (fun y => lqNorm 2 (fun j => ‖g j y‖ₑ)) t (g j) x‖ₑ) ^ 2 := + h.lintegral_enorm_sum_conv_sq_le s hL2 + _ ≤ B * (2 ^ finrank ℝ V * t * ∫⁻ x, lqNorm 2 (fun j => ‖g j x‖ₑ)) := by gcongr + _ = B * 2 ^ finrank ℝ V * t * ∫⁻ x, lqNorm 2 (fun j => ‖g j x‖ₑ) := by ring + +/-- **Splitting the analysis operator**: for a Calderón–Zygmund family, an integrable `f` and +the cubes of any `G` at any height `t`, almost every `x` satisfies +`‖((θ_j ⋆ f)(x))_j‖_{ℓ_2} ≤ ‖((θ_j ⋆ czGoodC f)(x))_j‖_{ℓ_2} + ‖((θ_j ⋆ czBadC f)(x))_j‖_{ℓ_2}`, +since `f = czGoodC f + czBadC f` with both parts integrable (`Rd.conv_add_ae`) and by +Minkowski's inequality in `ℓ_2`. -/ +theorem IsCZFamily.ae_lqNorm_conv_le_add (h : IsCZFamily θ B H) {f : V → ℂ} (hf : Integrable f) : + ∀ᵐ x, lqNorm 2 (fun j => ‖conv (θ j) f volume x‖ₑ) ≤ + lqNorm 2 (fun j => ‖conv (θ j) (czGoodC G t f) volume x‖ₑ) + + lqNorm 2 (fun j => ‖conv (θ j) (czBadC G t f) volume x‖ₑ) := by + have hae := ae_all_iff.2 fun j => conv_add_ae le_rfl ENNReal.one_ne_top (h.integrable j) + (memLp_one_iff_integrable.2 (integrable_czGoodC (G := G) (t := t) hf)) + (memLp_one_iff_integrable.2 (integrable_czBadC (G := G) (t := t) hf)) + filter_upwards [hae] with x hx + simp only [czGoodC_add_czBadC, Pi.add_apply] at hx + refine (ENNReal.lqNorm_mono fun j => ?_).trans (ENNReal.lqNorm_add_le one_le_two _ _) + rw [hx j] + exact eNorm_add_le _ _ + +/-- **Splitting the synthesis operator**: for a Calderón–Zygmund family, integrable `g_j`, a +finite set `s` and the cubes of any `G` at any height `t`, almost every `x` satisfies +`|∑_{j ∈ s} (θ_j ⋆ g_j)(x)| ≤ |∑_{j ∈ s} (θ_j ⋆ czGoodC g_j)(x)| + +|∑_{j ∈ s} (θ_j ⋆ czBadC g_j)(x)|` (`Rd.conv_add_ae` for every `j`). -/ +theorem IsCZFamily.ae_enorm_sum_conv_le_add (h : IsCZFamily θ B H) (s : Finset ℕ) + {g : ℕ → V → ℂ} (hg : ∀ j, Integrable (g j)) : + ∀ᵐ x, ‖∑ j ∈ s, conv (θ j) (g j) volume x‖ₑ ≤ + ‖∑ j ∈ s, conv (θ j) (czGoodC G t (g j)) volume x‖ₑ + + ‖∑ j ∈ s, conv (θ j) (czBadC G t (g j)) volume x‖ₑ := by + have hae := ae_all_iff.2 fun j => conv_add_ae le_rfl ENNReal.one_ne_top (h.integrable j) + (memLp_one_iff_integrable.2 (integrable_czGoodC (G := G) (t := t) (hg j))) + (memLp_one_iff_integrable.2 (integrable_czBadC (G := G) (t := t) (hg j))) + filter_upwards [hae] with x hx + simp only [czGoodC_add_czBadC, Pi.add_apply] at hx + rw [Finset.sum_congr rfl fun j _ => hx j, Finset.sum_add_distrib] + exact eNorm_add_le _ _ + +/-! ### The weak type `(1,1)` -/ + +variable (V) in +/-- The constant of the weak type `(1,1)` of a Calderón–Zygmund family with overlap `B` and +Hörmander constant `H`: `4 · 2^n B + (2n)^n |B(0, 1)| + 4H`, where `|B(0, 1)|` is the volume of +the unit ball of `V`, from the good part, the enlarged exceptional set and the bad part. -/ +noncomputable def vectorWeakConst (B H : ℝ≥0∞) : ℝ≥0∞ := + 4 * 2 ^ finrank ℝ V * B + (2 * finrank ℝ V) ^ finrank ℝ V * volume (ball (0 : V) 1) + 4 * H + +/-- The weak type constant is finite for finite `B` and `H`. -/ +theorem vectorWeakConst_ne_top (hB : B ≠ ∞) (hH : H ≠ ∞) : vectorWeakConst V B H ≠ ∞ := by + have hball : volume (ball (0 : V) 1) ≠ ∞ := measure_ball_lt_top.ne + unfold vectorWeakConst + finiteness + +/-- **The weak type `(1,1)` of the analysis operator**: in dimension `n ≥ 1`, for a +Calderón–Zygmund family with overlap `B` and Hörmander constant `H`, every integrable +`f : V → ℂ` and `0 < t < ∞`, +`|{x : ‖((θ_j ⋆ f)(x))_j‖_{ℓ_2} > t}| ≤ C t⁻¹ ∫ |f|` with `C = vectorWeakConst V B H`. The +Calderón–Zygmund decomposition of `|f|` at height `t` splits `f` into the good part, handled by +the Plancherel bound and Chebyshev's inequality, and the bad part, handled by the measure of the +enlarged exceptional set and the Hörmander condition off it +(`MeasureTheory.measure_lt_le_of_ae_le_add`). -/ +theorem IsCZFamily.volume_lqNorm_conv_gt_le [Nontrivial V] (h : IsCZFamily θ B H) {f : V → ℂ} + (hf : Integrable f) (ht0 : 0 < t) (ht : t ≠ ∞) : + volume {x | t < lqNorm 2 (fun j => ‖conv (θ j) f volume x‖ₑ)} ≤ + vectorWeakConst V B H * t⁻¹ * ∫⁻ x, ‖f x‖ₑ := by + have ha : AEMeasurable (fun x => lqNorm 2 (fun j => + ‖conv (θ j) (czGoodC (fun y => ‖f y‖ₑ) t f) volume x‖ₑ)) volume := + aemeasurable_lqNorm_comp (fun j => (aestronglyMeasurable_conv (h.integrable j).1 + (aestronglyMeasurable_czGoodC hf.1)).eNorm) 2 + have hb : AEMeasurable (fun x => lqNorm 2 (fun j => + ‖conv (θ j) (czBadC (fun y => ‖f y‖ₑ) t f) volume x‖ₑ)) volume := + aemeasurable_lqNorm_comp (fun j => (aestronglyMeasurable_conv (h.integrable j).1 + (integrable_czBadC hf).1).eNorm) 2 + refine (measure_lt_le_of_ae_le_add ha hb (h.ae_lqNorm_conv_le_add hf) measurableSet_czEnlarged + ht0 ht (h.lintegral_lqNorm_conv_czGoodC_sq_le hf ht0 ht) volume_czEnlarged_le + (h.setLIntegral_lqNorm_conv_czBadC_le hf)).trans_eq ?_ + rw [vectorWeakConst] + ring + +/-- **The weak type `(1,1)` of the synthesis operators**: in dimension `n ≥ 1`, for a +Calderón–Zygmund family with overlap `B` and Hörmander constant `H`, every finite set `s`, almost +everywhere strongly measurable `g_j : V → ℂ` with `G = ‖(g_j)_j‖_{ℓ_2}` integrable, and +`0 < t < ∞`, `|{x : |∑_{j ∈ s} (θ_j ⋆ g_j)(x)| > t}| ≤ C t⁻¹ ∫ G` with +`C = vectorWeakConst V B H`, by the Calderón–Zygmund decomposition of `G` at height `t`, whose +cubes serve every `g_j`. -/ +theorem IsCZFamily.volume_enorm_sum_conv_gt_le [Nontrivial V] (h : IsCZFamily θ B H) + (s : Finset ℕ) {g : ℕ → V → ℂ} (hg : ∀ j, AEStronglyMeasurable (g j) volume) + (hG : ∫⁻ x, lqNorm 2 (fun j => ‖g j x‖ₑ) ≠ ∞) (ht0 : 0 < t) (ht : t ≠ ∞) : + volume {x | t < ‖∑ j ∈ s, conv (θ j) (g j) volume x‖ₑ} ≤ + vectorWeakConst V B H * t⁻¹ * ∫⁻ x, lqNorm 2 (fun j => ‖g j x‖ₑ) := by + have hgi : ∀ j, Integrable (g j) := fun j => ⟨hg j, (lintegral_mono fun x => + ENNReal.le_lqNorm two_ne_zero (fun i => ‖g i x‖ₑ) j).trans_lt hG.lt_top⟩ + have ha : AEMeasurable (fun x => ‖∑ j ∈ s, conv (θ j) + (czGoodC (fun y => lqNorm 2 (fun j => ‖g j y‖ₑ)) t (g j)) volume x‖ₑ) volume := + (Finset.aestronglyMeasurable_fun_sum s fun j _ => aestronglyMeasurable_conv + (h.integrable j).1 (aestronglyMeasurable_czGoodC (hg j))).eNorm + have hb : AEMeasurable (fun x => ‖∑ j ∈ s, conv (θ j) + (czBadC (fun y => lqNorm 2 (fun j => ‖g j y‖ₑ)) t (g j)) volume x‖ₑ) volume := + (Finset.aestronglyMeasurable_fun_sum s fun j _ => aestronglyMeasurable_conv + (h.integrable j).1 (integrable_czBadC (hgi j)).1).eNorm + refine (measure_lt_le_of_ae_le_add ha hb (h.ae_enorm_sum_conv_le_add s hgi) + measurableSet_czEnlarged ht0 ht (h.lintegral_enorm_sum_conv_czGoodC_sq_le s hg hG ht0 ht) + volume_czEnlarged_le (h.setLIntegral_enorm_sum_conv_czBadC_le s hgi)).trans_eq ?_ + rw [vectorWeakConst] + ring + +end Rd diff --git a/LeanPool/FunctionSpaces/Rd/Sobolev/CriticalSobolevEmbedding.lean b/LeanPool/FunctionSpaces/Rd/Sobolev/CriticalSobolevEmbedding.lean new file mode 100644 index 0000000000..da0e7c193c --- /dev/null +++ b/LeanPool/FunctionSpaces/Rd/Sobolev/CriticalSobolevEmbedding.lean @@ -0,0 +1,345 @@ +/- +Copyright (c) 2026 Mario Ullrich. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Mario Ullrich +-/ +module + +public import LeanPool.FunctionSpaces.Rd.Sobolev.SobolevEmbedding + +/- +Modified for Lean Pool: module names and imports adapted. +-/ + +/-! +# The critical Sobolev embedding + +Let `V` have dimension `n ≥ 1`, `1 ≤ p₀ < p₁ < ∞`, `θ = p₀/p₁` and +`α = n(1/p₀ - 1/p₁)` (`nikolskiiExponent`). This file proves the critical embedding +`F^α_{p₀,∞} ↪ L_{p₁}` directly from the Littlewood–Paley blocks `ψ_j ⋆ f` (`Rd.blockFun`), +following Johnsen–Sickel (2007, Proposition 1): + +* **the Nikolskii inequality in supremum form** (`Rd.iSup_dyadicWeight_enorm_blockFun_le`): + `sup_j 2^(j(s - n/p₀)) |(ψ_j ⋆ f)(x)| ≤ N_{p₀} ‖(2^(js) ‖ψ_j ⋆ f‖_{p₀})_j‖_{ℓ_∞}` at every `x`; +* **the pointwise bound** (`Rd.tsum_dyadicWeight_enorm_blockFun_le`): for `s₀ - s₁ = α`, + the interpolation inequality for dyadic suprema (`ENNReal.tsum_dyadicWeight_mul_le_iSup`) gives + `∑_j 2^(js₁) |(ψ_j ⋆ f)(x)| ≤ c G(x)^θ (N_{p₀} ‖f‖_{B^{s₀}_{p₀,∞}})^(1-θ)` with + `G(x) = sup_j 2^(js₀) |(ψ_j ⋆ f)(x)|`; +* **integration** (`Rd.eLpNorm_tsum_dyadicWeight_enorm_blockFun_le`): since `‖G^θ‖_{p₁} = + ‖G‖_{p₀}^θ = ‖f‖_{F^{s₀}_{p₀,∞}}^θ`, the `L_{p₁}` norm of the left side is at most + `K ‖f‖_{F^{s₀}_{p₀,∞}}` with `K = Rd.criticalEmbeddingConst V p₀ p₁`; +* **`F^α_{p₀,∞} ↪ L_{p₁}`** (`Rd.exists_memLp_ae_eq_of_triebelLizorkinNorm_lt_top`, + `Rd.exists_memLp_ae_eq_of_memTriebelLizorkin`), for `p₀ = 1` as well, and + `F^s_{p₀,q} ↪ L_{p₁}` for `p₀ ≤ p₁` and `s ≥ α` + (`Rd.exists_memLp_ae_eq_of_memTriebelLizorkin_of_le`); +* **Jawerth's embedding** `F^{s₀}_{p₀,∞} ↪ F^{s₁}_{p₁,q}` for `s₁ ≥ 0`, `s₀ - s₁ = α` and every + `1 ≤ q ≤ ∞` (`Rd.exists_triebelLizorkinNorm_le_of_nikolskiiExponent`); +* **the critical Sobolev embedding** `W^m_p ↪ L_r` for `1 < p < ∞`, `r < ∞` and + `m = n(1/p - 1/r)` with named constants (`Rd.exists_memLp_ae_eq_of_hasWeakLineDeriv_of_eq`, + `Rd.exists_memLp_ae_eq_of_memSobolev_of_eq`), and `W^m_p ↪ L_r` for every `p ≤ r < ∞` with + `n(1/p - 1/r) ≤ m` (`Rd.exists_memLp_ae_eq_of_memSobolev_of_le`). +-/ + +@[expose] public section + +open MeasureTheory Filter Module +open scoped ENNReal +open ENNReal (lqNorm dyadicWeight dyadicInterpConst) + +namespace Rd + +variable {V : Type*} [NormedAddCommGroup V] [InnerProductSpace ℝ V] [FiniteDimensional ℝ V] + [MeasurableSpace V] [BorelSpace V] {p₀ p₁ : ℝ≥0∞} [Fact (1 ≤ p₀)] + +/-! ### The pointwise bound -/ + +/-- **The Nikolskii inequality in supremum form**: for `1 ≤ p₀ < ∞`, `s ∈ ℝ`, `f ∈ L_{p₀}(V)` and +every `x`, +`sup_j 2^(j(s - n/p₀)) |(ψ_j ⋆ f)(x)| ≤ N_{p₀} ‖(2^(js) ‖ψ_j ⋆ f‖_{p₀})_j‖_{ℓ_∞}`. Each term is +at most `N_{p₀} 2^(js) ‖ψ_j ⋆ f‖_{p₀}` by the Nikolskii inequality for blocks +(`Rd.enorm_blockFun_le_nikolskii`). -/ +theorem iSup_dyadicWeight_enorm_blockFun_le (hp₀ : p₀ ≠ ∞) (s : ℝ) + (f : Lp ℂ p₀ (volume : Measure V)) (x : V) : + ⨆ j, dyadicWeight (s - (finrank ℝ V : ℝ) / p₀.toReal) j * ‖blockFun j f x‖ₑ ≤ + nikolskiiBlockConst V p₀ * littlewoodPaleyNorm hp₀ s ∞ f := by + rw [littlewoodPaleyNorm_eq_lqNorm_eLpNorm, ENNReal.lqNorm_top, ENNReal.mul_iSup] + refine iSup_le fun j => le_iSup_of_le j ?_ + calc dyadicWeight (s - (finrank ℝ V : ℝ) / p₀.toReal) j * ‖blockFun j f x‖ₑ + ≤ dyadicWeight (s - (finrank ℝ V : ℝ) / p₀.toReal) j * (nikolskiiBlockConst V p₀ * + dyadicWeight (nikolskiiExponent (finrank ℝ V) p₀ ∞) j * + eLpNorm (blockFun j f) p₀ volume) := + mul_le_mul' le_rfl (enorm_blockFun_le_nikolskii hp₀ j f x) + _ = nikolskiiBlockConst V p₀ * (dyadicWeight s j * eLpNorm (blockFun j f) p₀ volume) := by + rw [nikolskiiExponent_top, ← div_eq_mul_inv] + conv_rhs => rw [← sub_add_cancel s ((finrank ℝ V : ℝ) / p₀.toReal), + ENNReal.dyadicWeight_add] + ring + +/-- **The pointwise bound of the weighted blocks** (Johnsen–Sickel 2007, (8)–(9)): let `n ≥ 1`, +`1 ≤ p₀ < p₁ < ∞`, `θ = p₀/p₁` and `s₀ - s₁ = n(1/p₀ - 1/p₁)`. For `f ∈ L_{p₀}(V)` and every `x`, + +`∑_j 2^(js₁) |(ψ_j ⋆ f)(x)| ≤ c(n/p₀, θ) G(x)^θ (N_{p₀} ‖(2^(js₀) ‖ψ_j ⋆ f‖_{p₀})_j‖_{ℓ_∞})^(1-θ)` + +with `G(x) = sup_j 2^(js₀) |(ψ_j ⋆ f)(x)|`: the interpolation inequality for dyadic suprema +(`ENNReal.tsum_dyadicWeight_mul_le_iSup`) with `σ₀ = s₀`, `σ₁ = s₀ - n/p₀`, and the Nikolskii +inequality in supremum form (`Rd.iSup_dyadicWeight_enorm_blockFun_le`). -/ +theorem tsum_dyadicWeight_enorm_blockFun_le [Nontrivial V] (hp₀ : p₀ ≠ ∞) (hp₀₁ : p₀ < p₁) + (hp₁ : p₁ ≠ ∞) {s₀ s₁ : ℝ} (hs : s₀ - s₁ = nikolskiiExponent (finrank ℝ V) p₀ p₁) + (f : Lp ℂ p₀ (volume : Measure V)) (x : V) : + ∑' j, dyadicWeight s₁ j * ‖blockFun j f x‖ₑ ≤ + dyadicInterpConst ((finrank ℝ V : ℝ) / p₀.toReal) (p₀.toReal / p₁.toReal) * + (lqNorm ∞ fun j => dyadicWeight s₀ j * ‖blockFun j f x‖ₑ) ^ (p₀.toReal / p₁.toReal) * + (nikolskiiBlockConst V p₀ * littlewoodPaleyNorm hp₀ s₀ ∞ f) ^ + (1 - p₀.toReal / p₁.toReal) := by + obtain ⟨hθ0, hθ1⟩ := ENNReal.toReal_div_toReal_mem_Ioo Fact.out hp₀₁ hp₁ + have hp₀0 : p₀ ≠ 0 := (zero_lt_one.trans_le (Fact.out : 1 ≤ p₀)).ne' + have hn : 0 < (finrank ℝ V : ℝ) / p₀.toReal := + div_pos (Nat.cast_pos.2 finrank_pos) (ENNReal.toReal_pos hp₀0 hp₀) + have h := ENNReal.tsum_dyadicWeight_mul_le_iSup (σ₀ := s₀) + (σ₁ := s₀ - (finrank ℝ V : ℝ) / p₀.toReal) (by linarith) hθ0 hθ1 + (fun j => ‖blockFun j f x‖ₑ) + rw [nikolskiiExponent_interp_eq hp₀0 hp₀ hs, sub_sub_cancel] at h + rw [ENNReal.lqNorm_top] + exact h.trans (mul_le_mul' le_rfl (ENNReal.rpow_le_rpow + (iSup_dyadicWeight_enorm_blockFun_le hp₀ s₀ f x) (sub_nonneg.2 hθ1.le))) + +/-! ### Integration -/ + +variable (V) in +/-- The **constant of the critical embedding**, +`K_{V,p₀,p₁} = c(n/p₀, θ) N_{p₀}^(1-θ)` with `θ = p₀/p₁`, the constant +`ENNReal.dyadicInterpConst` of the interpolation inequality for dyadic suprema and the Nikolskii +constant `Rd.nikolskiiBlockConst` of the blocks. -/ +noncomputable def criticalEmbeddingConst (p₀ p₁ : ℝ≥0∞) : ℝ≥0∞ := + dyadicInterpConst ((finrank ℝ V : ℝ) / p₀.toReal) (p₀.toReal / p₁.toReal) * + nikolskiiBlockConst V p₀ ^ (1 - p₀.toReal / p₁.toReal) + +/-- The constant of the critical embedding is finite for `n ≥ 1` and `1 ≤ p₀ < p₁ < ∞`. -/ +theorem criticalEmbeddingConst_ne_top [Nontrivial V] (hp₀₁ : p₀ < p₁) (hp₁ : p₁ ≠ ∞) : + criticalEmbeddingConst V p₀ p₁ ≠ ∞ := by + obtain ⟨hθ0, hθ1⟩ := ENNReal.toReal_div_toReal_mem_Ioo Fact.out hp₀₁ hp₁ + have hn : 0 < (finrank ℝ V : ℝ) / p₀.toReal := div_pos (Nat.cast_pos.2 finrank_pos) + (ENNReal.toReal_pos (zero_lt_one.trans_le (Fact.out : 1 ≤ p₀)).ne' (hp₀₁.trans_le le_top).ne) + exact ENNReal.mul_ne_top (ENNReal.dyadicInterpConst_ne_top hn hθ0 hθ1) + (ENNReal.rpow_ne_top_of_nonneg (sub_nonneg.2 hθ1.le) nikolskiiBlockConst_ne_top) + +omit [Fact (1 ≤ p₀)] in +/-- **The `L_{p₁}` norm of `G^θ`** for `θ = p₀/p₁`: with +`G(x) = sup_j 2^(js) |(ψ_j ⋆ f)(x)|`, `‖G^θ‖_{p₁} = ‖G‖_{p₀}^θ = ‖f‖_{F^s_{p₀,∞}}^θ` for +`0 < p₀ < ∞` and `0 < p₁ < ∞` (`MeasureTheory.eLpNorm_fun_rpow`). -/ +theorem eLpNorm_rpow_lqNorm_blockFun_eq (hp₀0 : p₀ ≠ 0) (hp₀ : p₀ ≠ ∞) (hp₁0 : p₁ ≠ 0) + (hp₁ : p₁ ≠ ∞) (s : ℝ) (f : Lp ℂ p₀ (volume : Measure V)) : + eLpNorm (fun x => (lqNorm ∞ fun j => dyadicWeight s j * ‖blockFun j f x‖ₑ) ^ + (p₀.toReal / p₁.toReal)) p₁ volume = + triebelLizorkinNorm s ∞ f ^ (p₀.toReal / p₁.toReal) := by + have hθ : 0 < p₀.toReal / p₁.toReal := + div_pos (ENNReal.toReal_pos hp₀0 hp₀) (ENNReal.toReal_pos hp₁0 hp₁) + rw [eLpNorm_fun_rpow (aemeasurable_lqNorm_blockFun s ∞ f) hθ p₁, + ENNReal.mul_ofReal_toReal_div_toReal hp₀ hp₁0 hp₁] + rfl + +/-- **The integrated bound** (Johnsen–Sickel 2007, (10)): let `n ≥ 1`, `1 ≤ p₀ < p₁ < ∞` and +`s₀ - s₁ = n(1/p₀ - 1/p₁)`. For every `f ∈ L_{p₀}(V)`, + +`‖x ↦ ∑_j 2^(js₁) |(ψ_j ⋆ f)(x)|‖_{p₁} ≤ K_{V,p₀,p₁} ‖f‖_{F^{s₀}_{p₀,∞}}`. + +The pointwise bound (`Rd.tsum_dyadicWeight_enorm_blockFun_le`) is +`c G(x)^θ (N_{p₀} A)^(1-θ)` with `A = ‖(2^(js₀) ‖ψ_j ⋆ f‖_{p₀})_j‖_{ℓ_∞}`; its `L_{p₁}` norm is +`c N_{p₀}^(1-θ) A^(1-θ) ‖f‖_{F^{s₀}_{p₀,∞}}^θ` (`Rd.eLpNorm_rpow_lqNorm_blockFun_eq`), and +`A ≤ ‖f‖_{F^{s₀}_{p₀,∞}}` (`Rd.littlewoodPaleyNorm_max_le_triebelLizorkinNorm`). -/ +theorem eLpNorm_tsum_dyadicWeight_enorm_blockFun_le [Nontrivial V] (hp₀₁ : p₀ < p₁) + (hp₁ : p₁ ≠ ∞) {s₀ s₁ : ℝ} (hs : s₀ - s₁ = nikolskiiExponent (finrank ℝ V) p₀ p₁) + (f : Lp ℂ p₀ (volume : Measure V)) : + eLpNorm (fun x => ∑' j, dyadicWeight s₁ j * ‖blockFun j f x‖ₑ) p₁ volume ≤ + criticalEmbeddingConst V p₀ p₁ * triebelLizorkinNorm s₀ ∞ f := by + have hp₀ : p₀ ≠ ∞ := hp₀₁.ne_top + obtain ⟨hθ0, hθ1⟩ := ENNReal.toReal_div_toReal_mem_Ioo Fact.out hp₀₁ hp₁ + have hp₀0 : p₀ ≠ 0 := (zero_lt_one.trans_le (Fact.out : 1 ≤ p₀)).ne' + have hp₁0 : p₁ ≠ 0 := (zero_lt_one.trans_le ((Fact.out : 1 ≤ p₀).trans hp₀₁.le)).ne' + set θ := p₀.toReal / p₁.toReal + set K := dyadicInterpConst ((finrank ℝ V : ℝ) / p₀.toReal) θ + set B := nikolskiiBlockConst V p₀ * littlewoodPaleyNorm hp₀ s₀ ∞ f + set T := triebelLizorkinNorm s₀ ∞ f + have hmeas : AEStronglyMeasurable (fun x => ∑' j, dyadicWeight s₁ j * ‖blockFun j f x‖ₑ) + volume := (AEMeasurable.tsum fun j => + (aestronglyMeasurable_blockFun j f).eNorm.const_mul _).aestronglyMeasurable + have hB : littlewoodPaleyNorm hp₀ s₀ ∞ f ≤ T := by + simpa using littlewoodPaleyNorm_max_le_triebelLizorkinNorm hp₀ (s := s₀) le_top f + calc eLpNorm (fun x => ∑' j, dyadicWeight s₁ j * ‖blockFun j f x‖ₑ) p₁ volume + ≤ eLpNorm (fun x => K * B ^ (1 - θ) * + (lqNorm ∞ fun j => dyadicWeight s₀ j * ‖blockFun j f x‖ₑ) ^ θ) p₁ volume := + eLpNorm_mono_eNorm hmeas fun x => by + simp only [eNorm_eq_self] + refine (tsum_dyadicWeight_enorm_blockFun_le hp₀ hp₀₁ hp₁ hs f x).trans_eq ?_ + ring + _ = K * B ^ (1 - θ) * T ^ θ := by + rw [eLpNorm_const_mul_ennreal + ((aemeasurable_lqNorm_blockFun s₀ ∞ f).pow_const θ).aestronglyMeasurable, + eLpNorm_rpow_lqNorm_blockFun_eq hp₀0 hp₀ hp₁0 hp₁] + _ ≤ K * (nikolskiiBlockConst V p₀ ^ (1 - θ) * T ^ (1 - θ)) * T ^ θ := by + rw [ENNReal.mul_rpow_of_nonneg _ _ (sub_nonneg.2 hθ1.le)] + exact mul_le_mul' (mul_le_mul' le_rfl (mul_le_mul' le_rfl + (ENNReal.rpow_le_rpow hB (sub_nonneg.2 hθ1.le)))) le_rfl + _ = criticalEmbeddingConst V p₀ p₁ * T := by + rw [criticalEmbeddingConst, mul_assoc, mul_assoc, mul_assoc, mul_comm (T ^ (1 - θ)), + ENNReal.rpow_mul_rpow_one_sub hθ0.le hθ1.le] + +/-! ### The embeddings -/ + +/-- **`F^α_{p₀,∞} ↪ L_{p₁}` with a named constant** (Jawerth 1977; the proof is Johnsen–Sickel's): +let `n ≥ 1`, `1 ≤ p₀ < p₁ < ∞` and `s = α = n(1/p₀ - 1/p₁)`. Every `f ∈ L_{p₀}(V)` with a finite +quasi-norm in `F^s_{p₀,∞}` has a representative `g ∈ L_{p₁}(V)` with +`‖g‖_{p₁} ≤ K_{V,p₀,p₁} ‖f‖_{F^s_{p₀,∞}}`. Since `s > 0`, the series of the blocks converges +almost everywhere to `f` (`Rd.ae_hasSum_blockFun`), so `|f| ≤ ∑_j |ψ_j ⋆ f|` almost everywhere, +and the integrated bound with `s₁ = 0` (`Rd.eLpNorm_tsum_dyadicWeight_enorm_blockFun_le`) +applies. This covers `p₀ = 1`. -/ +theorem exists_memLp_ae_eq_of_triebelLizorkinNorm_lt_top [Nontrivial V] (hp₀₁ : p₀ < p₁) + (hp₁ : p₁ ≠ ∞) {s : ℝ} (hs : nikolskiiExponent (finrank ℝ V) p₀ p₁ = s) + {f : Lp ℂ p₀ (volume : Measure V)} (hf : triebelLizorkinNorm s ∞ f < ∞) : + ∃ g : Lp ℂ p₁ (volume : Measure V), (g : V → ℂ) =ᵐ[volume] f ∧ + ‖g‖ₑ ≤ criticalEmbeddingConst V p₀ p₁ * triebelLizorkinNorm s ∞ f := by + have hp₀ : p₀ ≠ ∞ := hp₀₁.ne_top + have : Fact (1 ≤ p₁) := ⟨(Fact.out : 1 ≤ p₀).trans hp₀₁.le⟩ + have hs0 : 0 < s := hs ▸ nikolskiiExponent_pos (Nat.cast_pos.2 finrank_pos) Fact.out hp₀₁ + have hLP : littlewoodPaleyNorm hp₀ s ∞ f < ∞ := by + refine lt_of_le_of_lt ?_ hf + simpa using littlewoodPaleyNorm_max_le_triebelLizorkinNorm hp₀ (s := s) le_top f + have hae : ∀ᵐ x ∂volume, ‖f x‖ₑ ≤ ‖∑' j, dyadicWeight 0 j * ‖blockFun j f x‖ₑ‖ₑ := by + filter_upwards [ae_hasSum_blockFun hp₀ hs0 le_top hLP] with x hx + simp only [ENNReal.dyadicWeight_zero_left, one_mul, eNorm_eq_self] + rw [← hx.tsum_eq] + exact eNorm_tsum_le_tsum_eNorm + have hbound : eLpNorm f p₁ volume ≤ criticalEmbeddingConst V p₀ p₁ * triebelLizorkinNorm s ∞ f := + (eLpNorm_mono_eNorm_ae (Lp.aestronglyMeasurable f) hae).trans + (eLpNorm_tsum_dyadicWeight_enorm_blockFun_le hp₀₁ hp₁ (by rw [sub_zero, hs]) f) + have hmem : MemLp f p₁ volume := memLp_iff.2 (hbound.trans_lt + (ENNReal.mul_lt_top (criticalEmbeddingConst_ne_top hp₀₁ hp₁).lt_top hf)) + exact ⟨hmem.toLp f, hmem.coeFn_toLp, by rw [Lp.eNorm_toLp]; exact hbound⟩ + +/-- **`F^α_{p₀,q} ↪ L_{p₁}` for every `q`**: under the hypotheses of +`Rd.exists_memLp_ae_eq_of_triebelLizorkinNorm_lt_top`, every `f ∈ F^α_{p₀,q}`, `1 ≤ q ≤ ∞`, has a +representative `g ∈ L_{p₁}(V)` with `‖g‖_{p₁} ≤ K_{V,p₀,p₁} ‖f‖_{F^α_{p₀,q}}`, since +`‖f‖_{F^α_{p₀,∞}} ≤ ‖f‖_{F^α_{p₀,q}}` (`Rd.triebelLizorkinNorm_mono_exponent`). -/ +theorem exists_memLp_ae_eq_of_memTriebelLizorkin [Nontrivial V] (hp₀₁ : p₀ < p₁) + (hp₁ : p₁ ≠ ∞) {s : ℝ} (hs : nikolskiiExponent (finrank ℝ V) p₀ p₁ = s) {q : ℝ≥0∞} + (hq : 1 ≤ q) {f : Lp ℂ p₀ (volume : Measure V)} (hf : MemTriebelLizorkin s q f) : + ∃ g : Lp ℂ p₁ (volume : Measure V), (g : V → ℂ) =ᵐ[volume] f ∧ + ‖g‖ₑ ≤ criticalEmbeddingConst V p₀ p₁ * triebelLizorkinNorm s q f := by + have hle := triebelLizorkinNorm_mono_exponent (s := s) hq le_top f + obtain ⟨g, hg, hn⟩ := exists_memLp_ae_eq_of_triebelLizorkinNorm_lt_top hp₀₁ hp₁ hs + (hle.trans_lt hf) + exact ⟨g, hg, hn.trans (mul_le_mul' le_rfl hle)⟩ + +/-- **`F^s_{p₀,q} ↪ L_{p₁}` for `p₀ ≤ p₁ < ∞`**: let `n ≥ 1`, `1 ≤ p₀ ≤ p₁ < ∞`, `1 ≤ q ≤ ∞` and +`n(1/p₀ - 1/p₁) ≤ s`. Every `f ∈ F^s_{p₀,q}(V)` has a representative in `L_{p₁}(V)`: for +`p₁ = p₀` this is `f` itself; for `p₀ < p₁`, `F^s_{p₀,q} ⊆ F^α_{p₀,∞}` with +`α = n(1/p₀ - 1/p₁)` (`Rd.triebelLizorkinNorm_mono_exponent`, +`Rd.MemTriebelLizorkin.mono_smoothness`) and `F^α_{p₀,∞} ↪ L_{p₁}` +(`Rd.exists_memLp_ae_eq_of_triebelLizorkinNorm_lt_top`). -/ +theorem exists_memLp_ae_eq_of_memTriebelLizorkin_of_le [Nontrivial V] (hp₀₁ : p₀ ≤ p₁) + (hp₁ : p₁ ≠ ∞) {s : ℝ} (hs : nikolskiiExponent (finrank ℝ V) p₀ p₁ ≤ s) {q : ℝ≥0∞} + (hq : 1 ≤ q) {f : Lp ℂ p₀ (volume : Measure V)} (hf : MemTriebelLizorkin s q f) : + ∃ g : Lp ℂ p₁ (volume : Measure V), (g : V → ℂ) =ᵐ[volume] f := by + rcases hp₀₁.eq_or_lt with rfl | hlt + · exact ⟨f, ae_eq_refl _⟩ + obtain ⟨g, hg, -⟩ := exists_memLp_ae_eq_of_triebelLizorkinNorm_lt_top hlt hp₁ rfl + ((triebelLizorkinNorm_mono_exponent hq le_top f).trans_lt (hf.mono_smoothness hs)) + exact ⟨g, hg⟩ + +/-- **Jawerth's embedding** `F^{s₀}_{p₀,∞} ↪ F^{s₁}_{p₁,q}` (Jawerth 1977; Triebel 1983, §2.7.1; +Vybíral 2008, Theorem 0.1 (ii); the proof is Johnsen–Sickel's, 2007, Proposition 1): let `n ≥ 1`, +`1 ≤ p₀ < p₁ < ∞`, `s₁ ≥ 0` and `s₀ - s₁ = n(1/p₀ - 1/p₁)`. Every `f ∈ L_{p₀}(V)` with a finite +quasi-norm in `F^{s₀}_{p₀,∞}` has a representative `g ∈ L_{p₁}(V)` with +`‖g‖_{F^{s₁}_{p₁,q}} ≤ K_{V,p₀,p₁} ‖f‖_{F^{s₀}_{p₀,∞}}` for every `1 ≤ q ≤ ∞`. The representative +comes from `F^{s₀}_{p₀,∞} ⊆ F^{s₀-s₁}_{p₀,∞} ↪ L_{p₁}` +(`Rd.exists_memLp_ae_eq_of_triebelLizorkinNorm_lt_top`), its blocks are those of `f` +(`Rd.blockFun_eq_of_ae_eq`), and `‖·‖_{ℓ_q} ≤ ‖·‖_{ℓ_1}` reduces the bound to the integrated +bound (`Rd.eLpNorm_tsum_dyadicWeight_enorm_blockFun_le`). -/ +theorem exists_triebelLizorkinNorm_le_of_nikolskiiExponent [Nontrivial V] (hp₀₁ : p₀ < p₁) + (hp₁ : p₁ ≠ ∞) {s₀ s₁ : ℝ} (hs₁ : 0 ≤ s₁) + (hs : s₀ - s₁ = nikolskiiExponent (finrank ℝ V) p₀ p₁) {f : Lp ℂ p₀ (volume : Measure V)} + (hf : triebelLizorkinNorm s₀ ∞ f < ∞) : + ∃ g : Lp ℂ p₁ (volume : Measure V), (g : V → ℂ) =ᵐ[volume] f ∧ ∀ q : ℝ≥0∞, 1 ≤ q → + triebelLizorkinNorm s₁ q g ≤ criticalEmbeddingConst V p₀ p₁ * triebelLizorkinNorm s₀ ∞ f := by + obtain ⟨g, hg, -⟩ := exists_memLp_ae_eq_of_triebelLizorkinNorm_lt_top hp₀₁ hp₁ hs.symm + ((triebelLizorkinNorm_mono_smoothness (by linarith) ∞ f).trans_lt hf) + refine ⟨g, hg, fun q hq => ?_⟩ + refine le_trans ?_ (eLpNorm_tsum_dyadicWeight_enorm_blockFun_le hp₀₁ hp₁ hs f) + refine eLpNorm_mono_eNorm (aemeasurable_lqNorm_blockFun s₁ q g).aestronglyMeasurable + fun x => ?_ + simp only [eNorm_eq_self, blockFun_eq_of_ae_eq hg] + exact ENNReal.lqNorm_le_lqNorm_one hq _ + +/-! ### The critical Sobolev embedding -/ + +variable {p : ℝ≥0∞} [Fact (1 ≤ p)] {r : ℝ≥0∞} + +omit [Fact (1 ≤ p)] in +/-- **The exponent `0`**: every `f ∈ L_p(V)` is a class `u` of `L_0(V)` with the same +representative, and `‖u‖_0 = 0`. With Lean's convention `0⁻¹ = 0`, the exponent `r = 0` +satisfies `n(1/p - 1/r) = n/p`, so the critical embeddings below treat it by this lemma. -/ +theorem exists_lp_zero_ae_eq (f : Lp ℂ p (volume : Measure V)) : + ∃ u : Lp ℂ 0 (volume : Measure V), (u : V → ℂ) =ᵐ[volume] f ∧ ‖u‖ₑ = 0 := by + have hmem : MemLp (f : V → ℂ) 0 volume := + memLp_zero_iff_aestronglyMeasurable.2 (Lp.aestronglyMeasurable f) + exact ⟨hmem.toLp f, hmem.coeFn_toLp, + by rw [Lp.eNorm_toLp, eLpNorm_exponent_zero (Lp.aestronglyMeasurable f)]⟩ + +/-- **The critical Sobolev embedding with named constants**: let `n ≥ 1`, `1 < p < ∞`, `r < ∞`, +`m ≥ 1` and `m = n(1/p - 1/r)`, that is `1/r = 1/p - m/n`, and let `f ∈ L_p(V)` have weak +derivatives `g_α ∈ L_p(V)` of order `m` along the basis `e` of `Rd.gridBasis` for every +multi-index `α`. Then there is `u ∈ L_r(V)` with `u = f` almost everywhere and +`‖u‖_r ≤ K_{V,p,r} (‖Φ‖_1 ‖f‖_p + 2^m ∑_α K_α ‖g_α‖_p)` with `K_α = Rd.sobolevToTLConst V p α`. +Here `p < r`, and `‖f‖_{F^m_{p,∞}} ≤ ‖f‖_{F^m_{p,2}}` is bounded by the weak derivatives +(`Rd.triebelLizorkinNorm_le_of_hasWeakLineDeriv`), so `F^m_{p,∞} ↪ L_r` +(`Rd.exists_memLp_ae_eq_of_triebelLizorkinNorm_lt_top`) applies. -/ +theorem exists_memLp_ae_eq_of_hasWeakLineDeriv_of_eq [Nontrivial V] (hp1 : 1 < p) (hp : p ≠ ∞) + (hr : r ≠ ∞) {m : ℕ} (hm : 1 ≤ m) (hs : nikolskiiExponent (finrank ℝ V) p r = m) + {f : Lp ℂ p (volume : Measure V)} + {g : (Fin m → Fin (finrank ℝ V)) → Lp ℂ p (volume : Measure V)} + (hg : ∀ i, HasWeakLineDeriv ⊤ (fun k => gridBasis V (i k)) f (g i)) : + ∃ u : Lp ℂ r (volume : Measure V), (u : V → ℂ) =ᵐ[volume] f ∧ + ‖u‖ₑ ≤ criticalEmbeddingConst V p r * (eLpNorm (lpKernel (V := V)) 1 volume * ‖f‖ₑ + + 2 ^ m * ∑ i, sobolevToTLConst V p i * ‖g i‖ₑ) := by + rcases eq_or_ne r 0 with rfl | hr0 + · obtain ⟨u, hu, hn⟩ := exists_lp_zero_ae_eq f + exact ⟨u, hu, hn.trans_le zero_le⟩ + have hpr : p < r := lt_of_nikolskiiExponent_pos (Nat.cast_nonneg _) hp + (pos_iff_ne_zero.2 hr0) (by rw [hs]; exact Nat.cast_pos.2 hm) + have hle : triebelLizorkinNorm (m : ℝ) ∞ f ≤ eLpNorm (lpKernel (V := V)) 1 volume * ‖f‖ₑ + + 2 ^ m * ∑ i, sobolevToTLConst V p i * ‖g i‖ₑ := + (triebelLizorkinNorm_mono_exponent one_le_two le_top f).trans + (triebelLizorkinNorm_le_of_hasWeakLineDeriv hp1 hp hg) + obtain ⟨u, hu, hn⟩ := exists_memLp_ae_eq_of_triebelLizorkinNorm_lt_top hpr hr hs + ((triebelLizorkinNorm_mono_exponent one_le_two le_top f).trans_lt + (memTriebelLizorkin_of_hasWeakLineDeriv hp1 hp hg)) + exact ⟨u, hu, hn.trans (mul_le_mul' le_rfl hle)⟩ + +/-- **The Sobolev embedding `W^m_p ↪ L_r` for `p ≤ r < ∞`**: let `n ≥ 1`, `1 < p < ∞`, +`p ≤ r < ∞` and `n(1/p - 1/r) ≤ m`. Every `f ∈ W^m_p(V)` has a representative in `L_r(V)`. For +`r = p` this is `f` itself; for `p < r`, `f ∈ F^m_{p,2}` (`Rd.memTriebelLizorkin_of_memSobolev`) +and `F^m_{p,2} ↪ L_r` (`Rd.exists_memLp_ae_eq_of_memTriebelLizorkin_of_le`). -/ +theorem exists_memLp_ae_eq_of_memSobolev_of_le [Nontrivial V] (hp1 : 1 < p) (hp : p ≠ ∞) + (hpr : p ≤ r) (hr : r ≠ ∞) {m : ℕ} (hs : nikolskiiExponent (finrank ℝ V) p r ≤ m) + {f : Lp ℂ p (volume : Measure V)} (hf : MemSobolev m f) : + ∃ g : Lp ℂ r (volume : Measure V), (g : V → ℂ) =ᵐ[volume] f := + exists_memLp_ae_eq_of_memTriebelLizorkin_of_le hpr hr hs one_le_two + (memTriebelLizorkin_of_memSobolev hp1 hp hf) + +/-- **The critical Sobolev embedding** (Sobolev's inequality for `1 < p < n/m`): let `n ≥ 1`, +`1 < p < ∞`, `r < ∞` and `m = n(1/p - 1/r)`, that is `1/r = 1/p - m/n`. Every `f ∈ W^m_p(V)` has +a representative in `L_r(V)`. Here `p ≤ r` (`le_of_nikolskiiExponent_nonneg`), so +`Rd.exists_memLp_ae_eq_of_memSobolev_of_le` applies; +`Rd.exists_memLp_ae_eq_of_hasWeakLineDeriv_of_eq` adds the norm bound. -/ +theorem exists_memLp_ae_eq_of_memSobolev_of_eq [Nontrivial V] (hp1 : 1 < p) (hp : p ≠ ∞) + (hr : r ≠ ∞) {m : ℕ} (hs : nikolskiiExponent (finrank ℝ V) p r = m) + {f : Lp ℂ p (volume : Measure V)} (hf : MemSobolev m f) : + ∃ g : Lp ℂ r (volume : Measure V), (g : V → ℂ) =ᵐ[volume] f := by + rcases eq_or_ne r 0 with rfl | hr0 + · obtain ⟨u, hu, -⟩ := exists_lp_zero_ae_eq f + exact ⟨u, hu⟩ + have hpr : p ≤ r := le_of_nikolskiiExponent_nonneg (Nat.cast_pos.2 finrank_pos) hp + (pos_iff_ne_zero.2 hr0) (by rw [hs]; exact Nat.cast_nonneg m) + exact exists_memLp_ae_eq_of_memSobolev_of_le hp1 hp hpr hr hs.le hf + +end Rd diff --git a/LeanPool/FunctionSpaces/Rd/Sobolev/DerivativeKernels.lean b/LeanPool/FunctionSpaces/Rd/Sobolev/DerivativeKernels.lean new file mode 100644 index 0000000000..efd8628f02 --- /dev/null +++ b/LeanPool/FunctionSpaces/Rd/Sobolev/DerivativeKernels.lean @@ -0,0 +1,468 @@ +/- +Copyright (c) 2026 Mario Ullrich. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Mario Ullrich +-/ +module + +public import LeanPool.FunctionSpaces.Rd.SingularIntegrals.DilationFamilies + +/- +Modified for Lean Pool: module names and imports adapted. +-/ + +/-! +# Derivative kernels + +On a finite-dimensional real inner product space `V` of dimension `n` with Lebesgue measure, let +`e_0, …, e_{n-1}` be the orthonormal basis of `Rd.gridBasis`, and for directions +`w = (w_0, …, w_{k-1}) ∈ V^k` let `∂^w = ∂_{w_0} ⋯ ∂_{w_{k-1}}`. For every `m ∈ ℕ` the +Littlewood–Paley block `ψ_1` is a sum of derivatives of order `m` of Schwartz functions: +`ψ_1 = ∑_{i : Fin m → Fin n} ∂_{e_{i_0}} ⋯ ∂_{e_{i_{m-1}}} η_i` +(`Rd.sum_iteratedLineDerivOp_derivKernel`). On the Fourier side this is +`‖ξ‖^{2m} = ∑_i ∏_k ⟪ξ, e_{i_k}⟫²` (`Rd.norm_pow_eq_sum_prod_inner`): the kernel `η_i` has the +Fourier transform `𝓕η_i(ξ) = ∏_k ⟪ξ, e_{i_k}⟫ / ((2πi)^m ‖ξ‖^{2m}) · 𝓕ψ_1(ξ)` +(`Rd.derivSymbol`, `Rd.derivKernel`), a smooth function since `𝓕ψ_1` vanishes near `0`. + +* **Fourier transforms of derivatives**: `𝓕(∂^w G)(ξ) = (∏_l 2πi ⟪ξ, w_l⟫) 𝓕G(ξ)` for Schwartz + functions with values in a complex normed space (`SchwartzMap.fourier_iteratedLineDerivOp_apply`). +* **The dilated identity**: with the chain rule `∂^w (G_c) = c^k (∂^w G)_c` + (`Rd.iteratedLineDerivOp_schwartzDilate`), + `2^{jm} ψ_{j+1} = ∑_i ∂_{e_{i_0}} ⋯ ∂_{e_{i_{m-1}}} ((η_i)_{2^j})` + (`Rd.two_pow_smul_psi_succ_eq_sum`), with the factor `‖2^n‖ = 2^n` (`Rd.enorm_two_pow_complex`). +* **The derivative families** `((η_i)_{2^j})_j` are Calderón–Zygmund families with overlap `2` + (`Rd.isCZFamily_derivFamily`). +* **The dual derivative families**: for every `w ∈ V^k` the synthesis kernels satisfy + `∂^w psiDual_j = 2^{jk} (∂^w psiDualBase_j)_{2^j}` (`Rd.iteratedLineDerivOp_psiDualS`), and the + dilates on the right form a Calderón–Zygmund family with overlap `4 ((8π)^k ∏_l ‖w_l‖)²` + (`Rd.isCZFamily_derivDualFamily`). +-/ + +@[expose] public section + +open MeasureTheory Module Metric Filter +open scoped ENNReal SchwartzMap FourierTransform LineDeriv Real + +namespace SchwartzMap + +variable {V : Type*} [NormedAddCommGroup V] [InnerProductSpace ℝ V] [FiniteDimensional ℝ V] + [MeasurableSpace V] [BorelSpace V] + +/-- **The Fourier transform of an iterated derivative**: for every Schwartz function `G` on `V` +with values in a complex normed space `E` and directions `w ∈ V^k`, with +`∂^w = ∂_{w_0} ⋯ ∂_{w_{k-1}}`, `𝓕(∂^w G)(ξ) = (∏_l 2πi ⟪ξ, w_l⟫) 𝓕G(ξ)`, by induction from +Mathlib's `SchwartzMap.fourier_lineDerivOp_eq`. -/ +theorem fourier_iteratedLineDerivOp_apply {E : Type*} [NormedAddCommGroup E] [NormedSpace ℂ E] + {k : ℕ} (w : Fin k → V) (G : 𝓢(V, E)) (ξ : V) : + 𝓕 (∂^{w} G) ξ = (∏ l, 2 * π * Complex.I * (inner ℝ ξ (w l) : ℂ)) • 𝓕 G ξ := by + induction k with + | zero => simp + | succ k ih => + have h : (fun x : V => inner ℝ x (w 0)).HasTemperateGrowth := by fun_prop + rw [LineDeriv.iteratedLineDerivOp_succ_left, SchwartzMap.fourier_lineDerivOp_eq, + smul_apply, SchwartzMap.smulLeftCLM_apply_apply h, ih, Fin.prod_univ_succ] + simp only [Fin.tail, ← Complex.coe_smul, smul_smul] + congr 1 + ring + +end SchwartzMap + +namespace Rd + +variable {V : Type*} [NormedAddCommGroup V] [InnerProductSpace ℝ V] [FiniteDimensional ℝ V] + [MeasurableSpace V] [BorelSpace V] + +/-! ### Coordinates and the symbols -/ + +omit [MeasurableSpace V] [BorelSpace V] in +/-- **Powers of the norm in coordinates**: with the orthonormal basis `e_0, …, e_{n-1}` of +`Rd.gridBasis`, `‖ξ‖^{2m} = ∑_{i : Fin m → Fin n} ∏_k ⟪ξ, e_{i_k}⟫²`, from +`‖ξ‖² = ∑_i ⟪ξ, e_i⟫²` (Mathlib's `OrthonormalBasis.sum_sq_inner_left`) and the expansion of an +`m`-th power of a sum (Mathlib's `Fintype.sum_pow`). -/ +theorem norm_pow_eq_sum_prod_inner (ξ : V) (m : ℕ) : + ‖ξ‖ ^ (2 * m) = ∑ i : Fin m → Fin (finrank ℝ V), ∏ k, inner ℝ ξ (gridBasis V (i k)) ^ 2 := by + rw [pow_mul, ← (gridBasis V).sum_sq_inner_left ξ, Fintype.sum_pow] + +/-- The **derivative symbol** of the multi-index `i : Fin m → Fin n`: +`σ_i(ξ) = ∏_k ⟪ξ, e_{i_k}⟫ / ((2πi)^m ‖ξ‖^{2m})`, with the orthonormal basis `e` of +`Rd.gridBasis`; at `ξ = 0` its value is `0` for `m ≥ 1` (Lean's convention `x / 0 = 0`). -/ +noncomputable def derivSymbol {m : ℕ} (i : Fin m → Fin (finrank ℝ V)) (ξ : V) : ℂ := + ((2 * π * Complex.I) ^ m)⁻¹ * + (((∏ k, inner ℝ ξ (gridBasis V (i k))) / ‖ξ‖ ^ (2 * m) : ℝ) : ℂ) + +omit [MeasurableSpace V] [BorelSpace V] in +/-- **The symbols invert the derivatives**: for every `ξ ≠ 0`, +`∑_i (∏_k 2πi ⟪ξ, e_{i_k}⟫) σ_i(ξ) = 1`, since each term is +`(∏_k ⟪ξ, e_{i_k}⟫)² / ‖ξ‖^{2m}` and these add up to `1` (`Rd.norm_pow_eq_sum_prod_inner`). -/ +theorem sum_prod_mul_derivSymbol {m : ℕ} {ξ : V} (hξ : ξ ≠ 0) : + ∑ i : Fin m → Fin (finrank ℝ V), + (∏ k, 2 * π * Complex.I * (inner ℝ ξ (gridBasis V (i k)) : ℂ)) * derivSymbol i ξ = 1 := by + have hc : (2 * π * Complex.I : ℂ) ^ m ≠ 0 := + pow_ne_zero _ (by simp [Real.pi_ne_zero, Complex.I_ne_zero]) + have hN : ‖ξ‖ ^ (2 * m) ≠ 0 := pow_ne_zero _ (norm_ne_zero_iff.2 hξ) + have hreal : ∑ i : Fin m → Fin (finrank ℝ V), (∏ k, inner ℝ ξ (gridBasis V (i k))) * + ((∏ k, inner ℝ ξ (gridBasis V (i k))) / ‖ξ‖ ^ (2 * m)) = 1 := by + simp_rw [← mul_div_assoc, ← sq, ← Finset.prod_pow] + rw [← Finset.sum_div, ← norm_pow_eq_sum_prod_inner, div_self hN] + calc ∑ i : Fin m → Fin (finrank ℝ V), + (∏ k, 2 * π * Complex.I * (inner ℝ ξ (gridBasis V (i k)) : ℂ)) * derivSymbol i ξ + = ∑ i : Fin m → Fin (finrank ℝ V), (((∏ k, inner ℝ ξ (gridBasis V (i k))) * + ((∏ k, inner ℝ ξ (gridBasis V (i k))) / ‖ξ‖ ^ (2 * m)) : ℝ) : ℂ) := by + refine Finset.sum_congr rfl fun i _ => ?_ + rw [derivSymbol, Finset.prod_mul_distrib, Fin.prod_const, Complex.ofReal_mul, + Complex.ofReal_prod] + field_simp + _ = 1 := by rw [← Complex.ofReal_sum, hreal, Complex.ofReal_one] + +omit [MeasurableSpace V] [BorelSpace V] in +/-- **The symbols are bounded away from the origin**: `|σ_i(ξ)| ≤ 1` for `‖ξ‖ ≥ 1`, since +`|⟪ξ, e⟫| ≤ ‖ξ‖`, `‖ξ‖^m ≤ ‖ξ‖^{2m}` and `(2π)^m ≥ 1`. -/ +theorem norm_derivSymbol_le {m : ℕ} (i : Fin m → Fin (finrank ℝ V)) {ξ : V} (hξ : 1 ≤ ‖ξ‖) : + ‖derivSymbol i ξ‖ ≤ 1 := by + have hP : |∏ k, inner ℝ ξ (gridBasis V (i k))| ≤ ‖ξ‖ ^ (2 * m) := by + rw [Finset.abs_prod] + calc ∏ k, |inner ℝ ξ (gridBasis V (i k))| ≤ ∏ _k : Fin m, ‖ξ‖ := + Finset.prod_le_prod₀ (fun k _ => abs_nonneg _) fun k _ => + (abs_real_inner_le_norm _ _).trans_eq (by rw [(gridBasis V).orthonormal.1, mul_one]) + _ = ‖ξ‖ ^ m := Fin.prod_const m ‖ξ‖ + _ ≤ ‖ξ‖ ^ (2 * m) := pow_le_pow_right₀ hξ (by omega) + have h2π : (1 : ℝ) ≤ 2 * π := by linarith [Real.two_le_pi] + rw [derivSymbol, norm_mul, norm_inv, norm_pow, norm_mul, norm_mul, Complex.norm_I, + Complex.norm_real, Complex.norm_real, Complex.norm_ofNat, Real.norm_of_nonneg Real.pi_pos.le, + mul_one, Real.norm_eq_abs, abs_div, abs_of_nonneg (by positivity : (0 : ℝ) ≤ ‖ξ‖ ^ (2 * m))] + calc ((2 * π) ^ m)⁻¹ * (|∏ k, inner ℝ ξ (gridBasis V (i k))| / ‖ξ‖ ^ (2 * m)) ≤ 1 * 1 := + mul_le_mul (inv_le_one_of_one_le₀ (one_le_pow₀ h2π)) (div_le_one_of_le₀ hP (by positivity)) + (by positivity) zero_le_one + _ = 1 := one_mul 1 + +omit [MeasurableSpace V] [BorelSpace V] in +/-- The derivative symbols are smooth away from the origin: `ξ ↦ ∏_k ⟪ξ, e_{i_k}⟫` and +`ξ ↦ ‖ξ‖^{2m} = (‖ξ‖²)^m` are smooth, and the second vanishes only at `0`. -/ +theorem contDiffOn_derivSymbol {m : ℕ} (i : Fin m → Fin (finrank ℝ V)) : + ContDiffOn ℝ ((⊤ : ℕ∞) : WithTop ℕ∞) (derivSymbol i) {ξ : V | ξ ≠ 0} := by + have hP : ContDiff ℝ ((⊤ : ℕ∞) : WithTop ℕ∞) + (fun ξ : V => ∏ k, inner ℝ ξ (gridBasis V (i k))) := + contDiff_prod fun k _ => contDiff_id.inner ℝ contDiff_const + have hN : ContDiff ℝ ((⊤ : ℕ∞) : WithTop ℕ∞) (fun ξ : V => ‖ξ‖ ^ (2 * m)) := by + simp_rw [pow_mul] + exact (contDiff_norm_sq ℝ).pow m + have hq := hP.contDiffOn.div hN.contDiffOn fun ξ (hξ : ξ ∈ {ξ : V | ξ ≠ 0}) => + pow_ne_zero _ (norm_ne_zero_iff.2 hξ) + exact contDiffOn_const.mul (Complex.ofRealCLM.contDiff.comp_contDiffOn hq) + +/-! ### The block `ψ_1` -/ + +/-- The block `ψ_1 = Φ_1 - Φ` as a Schwartz function, `ψ_1 = δ_2 (psiBase 1)`. -/ +noncomputable def psiOneS : 𝓢(V, ℂ) := schwartzDilate 2 two_ne_zero (psiBase 1) + +/-- The Schwartz function `Rd.psiOneS` is the block `ψ_1`. -/ +theorem coe_psiOneS : (psiOneS : V → ℂ) = psi (V := V) 1 := by + have h := dilate_psiBase (V := V) 1 + rw [pow_one] at h + rw [psiOneS, coe_schwartzDilate, h] + +/-- **The blocks are dilates of `ψ_1`**: `ψ_{j+1} = (ψ_1)_{2^j}`. -/ +theorem dilate_psi_one (j : ℕ) : dilate (2 ^ j) (psi (V := V) 1) = psi (j + 1) := by + rw [← coe_psiOneS, psiOneS, coe_schwartzDilate, dilate_dilate, ← pow_succ, + ← dilate_psiBase (j + 1)] + rfl + +/-- The Fourier transform of the Schwartz function `Rd.psiOneS` is `𝓕ψ_1`. -/ +theorem fourier_psiOneS_apply (ξ : V) : 𝓕 (psiOneS (V := V)) ξ = 𝓕 (psi (V := V) 1) ξ := by + rw [SchwartzMap.fourier_coe, coe_psiOneS] + +/-- `𝓕ψ_{j+1}(ξ) = 𝓕ψ_1(2^{-j} ξ)`. -/ +theorem fourier_psi_succ_eq_fourier_psi_one (j : ℕ) (ξ : V) : + 𝓕 (psi (V := V) (j + 1)) ξ = 𝓕 (psi (V := V) 1) (((2 : ℝ) ^ j)⁻¹ • ξ) := by + rw [← dilate_psi_one, fourier_dilate _ (by positivity)] + +/-- Where `𝓕ψ_1(ξ) ≠ 0`, `‖ξ‖ > 1`: the case `i = 0` of +`Rd.lt_norm_of_fourier_psi_succ_ne_zero`. -/ +theorem one_lt_norm_of_fourier_psi_one_ne_zero {ξ : V} (h : 𝓕 (psi (V := V) 1) ξ ≠ 0) : + 1 < ‖ξ‖ := by + simpa using lt_norm_of_fourier_psi_succ_ne_zero (i := 0) h + +/-! ### The derivative kernels -/ + +/-- The function `ξ ↦ σ_i(ξ) 𝓕ψ_1(ξ)` is smooth: `𝓕ψ_1` is smooth and vanishes on the unit ball, +and `σ_i` is smooth away from `0` (`Rd.contDiffOn_derivSymbol`). -/ +theorem contDiff_derivSymbol_mul_fourier_psi_one {m : ℕ} (i : Fin m → Fin (finrank ℝ V)) : + ContDiff ℝ ((⊤ : ℕ∞) : WithTop ℕ∞) (fun ξ : V => derivSymbol i ξ * 𝓕 (psi (V := V) 1) ξ) := by + have hF : ContDiff ℝ ((⊤ : ℕ∞) : WithTop ℕ∞) (𝓕 (psi (V := V) 1)) := by + rw [← coe_psiOneS, ← SchwartzMap.fourier_coe] + exact SchwartzMap.smooth (𝓕 (psiOneS (V := V))) ⊤ + refine contDiff_iff_contDiffAt.2 fun ξ => ?_ + by_cases hξ : ξ = 0 + · subst hξ + refine (contDiffAt_const (c := (0 : ℂ))).congr_of_eventuallyEq ?_ + filter_upwards [ball_mem_nhds (0 : V) one_pos] with ζ hζ + rw [mem_ball_zero_iff] at hζ + rw [fourier_psi_succ_eq_zero (i := 0) (by rw [pow_zero]; exact hζ.le), mul_zero] + · exact ((contDiffOn_derivSymbol i).contDiffAt (isOpen_ne.mem_nhds hξ)).mul hF.contDiffAt + +/-- The function `ξ ↦ σ_i(ξ) 𝓕ψ_1(ξ)` has compact support: it vanishes outside the closed ball +of radius `4`. -/ +theorem hasCompactSupport_derivSymbol_mul_fourier_psi_one {m : ℕ} + (i : Fin m → Fin (finrank ℝ V)) : + HasCompactSupport (fun ξ : V => derivSymbol i ξ * 𝓕 (psi (V := V) 1) ξ) := by + refine HasCompactSupport.intro (isCompact_closedBall (0 : V) 4) fun ξ hξ => ?_ + rw [mem_closedBall_zero_iff, not_le] at hξ + have h : 𝓕 (psi (V := V) 1) ξ = 0 := by + by_contra h + have h4 := norm_lt_of_fourier_psi_ne_zero h + norm_num at h4 + linarith + rw [h, mul_zero] + +/-- The Fourier transform `ξ ↦ σ_i(ξ) 𝓕ψ_1(ξ)` of the derivative kernel `η_i`, a Schwartz +function. -/ +noncomputable def derivKernelHat {m : ℕ} (i : Fin m → Fin (finrank ℝ V)) : 𝓢(V, ℂ) := + (hasCompactSupport_derivSymbol_mul_fourier_psi_one i).toSchwartzMap + (contDiff_derivSymbol_mul_fourier_psi_one i) + +/-- The **derivative kernel** `η_i = 𝓕⁻¹(σ_i 𝓕ψ_1)` of the multi-index `i : Fin m → Fin n`. -/ +noncomputable def derivKernel {m : ℕ} (i : Fin m → Fin (finrank ℝ V)) : 𝓢(V, ℂ) := + 𝓕⁻ (derivKernelHat i) + +/-- `𝓕η_i(ξ) = σ_i(ξ) 𝓕ψ_1(ξ)`. -/ +theorem fourier_derivKernel {m : ℕ} (i : Fin m → Fin (finrank ℝ V)) (ξ : V) : + 𝓕 (derivKernel i : V → ℂ) ξ = derivSymbol i ξ * 𝓕 (psi (V := V) 1) ξ := by + rw [← SchwartzMap.fourier_coe, derivKernel, FourierInvPair.fourier_fourierInv_eq] + rfl + +/-- **`ψ_1` as a sum of derivatives**: for every `m ∈ ℕ`, +`∑_{i : Fin m → Fin n} ∂_{e_{i_0}} ⋯ ∂_{e_{i_{m-1}}} η_i = ψ_1` as Schwartz functions. Both sides +have the same Fourier transform: `(∑_i ∏_k 2πi ⟪ξ, e_{i_k}⟫ σ_i(ξ)) 𝓕ψ_1(ξ) = 𝓕ψ_1(ξ)` for +`ξ ≠ 0` (`Rd.sum_prod_mul_derivSymbol`), and `𝓕ψ_1(0) = 0`. -/ +theorem sum_iteratedLineDerivOp_derivKernel (m : ℕ) : + ∑ i : Fin m → Fin (finrank ℝ V), ∂^{fun k => gridBasis V (i k)} (derivKernel i) = + psiOneS (V := V) := by + apply (FourierTransform.fourierCLE ℂ 𝓢(V, ℂ)).injective + simp only [FourierTransform.fourierCLE_apply, FourierTransform.fourier_sum] + ext ξ + rw [sum_apply, SchwartzMap.fourier_coe psiOneS, coe_psiOneS] + simp_rw [SchwartzMap.fourier_iteratedLineDerivOp_apply, smul_eq_mul, + SchwartzMap.fourier_coe (derivKernel _), fourier_derivKernel, ← mul_assoc] + rw [← Finset.sum_mul] + by_cases hξ : ξ = 0 + · subst hξ + rw [fourier_psi_succ_eq_zero (i := 0) (by simp), mul_zero] + · rw [sum_prod_mul_derivSymbol hξ, one_mul] + +/-- **The dilated identity**: for all `m, j ∈ ℕ`, +`2^{jm} ψ_{j+1} = ∑_{i : Fin m → Fin n} ∂_{e_{i_0}} ⋯ ∂_{e_{i_{m-1}}} ((η_i)_{2^j})`, from +`Rd.sum_iteratedLineDerivOp_derivKernel`, the chain rule for dilations +(`Rd.iteratedLineDerivOp_schwartzDilate`) and `(ψ_1)_{2^j} = ψ_{j+1}`. -/ +theorem two_pow_smul_psi_succ_eq_sum (m j : ℕ) : + ((2 : ℂ) ^ (j * m)) • psi (V := V) (j + 1) = + ∑ i : Fin m → Fin (finrank ℝ V), ⇑(∂^{fun k => gridBasis V (i k)} + (schwartzDilate (2 ^ j) (pow_ne_zero j two_ne_zero) (derivKernel i))) := by + have h : ∑ i : Fin m → Fin (finrank ℝ V), ∂^{fun k => gridBasis V (i k)} + (schwartzDilate (2 ^ j) (pow_ne_zero j two_ne_zero) (derivKernel i)) = + ((2 : ℂ) ^ (j * m)) • schwartzDilate (2 ^ j) (pow_ne_zero j two_ne_zero) psiOneS := by + simp_rw [iteratedLineDerivOp_schwartzDilate] + rw [← Finset.smul_sum, ← schwartzDilate_sum, sum_iteratedLineDerivOp_derivKernel] + push_cast + rw [pow_mul] + funext x + have hx := congrArg (fun S : 𝓢(V, ℂ) => S x) h + simp only [sum_apply, smul_apply] at hx + rw [Finset.sum_apply, hx, Pi.smul_apply, coe_schwartzDilate, coe_psiOneS, dilate_psi_one] + +/-- The complex number `2^n` has absolute value `2^n`, by Mathlib's `eNorm_pow` and +`Complex.norm_two`; this is the size of the factor `2^{jm}` of the dilated identity. -/ +theorem enorm_two_pow_complex (n : ℕ) : ‖(2 : ℂ) ^ n‖ₑ = 2 ^ n := by + rw [eNorm_pow, ← ofReal_norm, Complex.norm_two, ENNReal.ofReal_ofNat] + +/-! ### The derivative families -/ + +/-- The **derivative family** of the multi-index `i`: `j ↦ (η_i)_{2^j}`. -/ +noncomputable def derivFamily {m : ℕ} (i : Fin m → Fin (finrank ℝ V)) (j : ℕ) : V → ℂ := + dilate (2 ^ j) (derivKernel i : V → ℂ) + +/-- `𝓕(η_i)_{2^j}(ξ) = σ_i(2^{-j} ξ) 𝓕ψ_{j+1}(ξ)`. -/ +theorem fourier_derivFamily {m : ℕ} (i : Fin m → Fin (finrank ℝ V)) (j : ℕ) (ξ : V) : + 𝓕 (derivFamily i j) ξ = derivSymbol i (((2 : ℝ) ^ j)⁻¹ • ξ) * 𝓕 (psi (V := V) (j + 1)) ξ := by + rw [derivFamily, fourier_dilate _ (by positivity), fourier_derivKernel, + fourier_psi_succ_eq_fourier_psi_one j ξ] + +/-- `|𝓕(η_i)_{2^j}(ξ)| ≤ |𝓕ψ_{j+1}(ξ)|`: where `𝓕ψ_{j+1}(ξ) ≠ 0`, `‖2^{-j} ξ‖ > 1` and +`|σ_i| ≤ 1` there (`Rd.norm_derivSymbol_le`). -/ +theorem enorm_fourier_derivFamily_le {m : ℕ} (i : Fin m → Fin (finrank ℝ V)) (j : ℕ) (ξ : V) : + ‖𝓕 (derivFamily i j) ξ‖ₑ ≤ ‖𝓕 (psi (V := V) (j + 1)) ξ‖ₑ := by + rw [fourier_derivFamily, eNorm_mul] + by_cases h : 𝓕 (psi (V := V) (j + 1)) ξ = 0 + · rw [h, eNorm_zero, mul_zero] + · rw [fourier_psi_succ_eq_fourier_psi_one j ξ] at h + have h1 := (one_lt_norm_of_fourier_psi_one_ne_zero h).le + calc ‖derivSymbol i (((2 : ℝ) ^ j)⁻¹ • ξ)‖ₑ * ‖𝓕 (psi (V := V) (j + 1)) ξ‖ₑ + ≤ 1 * ‖𝓕 (psi (V := V) (j + 1)) ξ‖ₑ := by + gcongr + rw [← ofReal_norm, ← ENNReal.ofReal_one] + exact ENNReal.ofReal_le_ofReal (norm_derivSymbol_le i h1) + _ = ‖𝓕 (psi (V := V) (j + 1)) ξ‖ₑ := one_mul _ + +/-- **Overlap of a derivative family**: `∑_j |𝓕(η_i)_{2^j}(ξ)|² ≤ 2` for every `ξ`, by comparison +with the blocks (`Rd.enorm_fourier_derivFamily_le`, `Rd.tsum_fourier_psi_sq_le`). -/ +theorem tsum_fourier_derivFamily_sq_le {m : ℕ} (i : Fin m → Fin (finrank ℝ V)) (ξ : V) : + ∑' j, ‖𝓕 (derivFamily i j) ξ‖ₑ ^ 2 ≤ 2 := + calc ∑' j, ‖𝓕 (derivFamily i j) ξ‖ₑ ^ 2 + ≤ ∑' j, ‖𝓕 (psi (V := V) (j + 1)) ξ‖ₑ ^ 2 := + tsum_le_tsum fun j => by gcongr; exact enorm_fourier_derivFamily_le i j ξ + _ ≤ ∑' j, ‖𝓕 (psi (V := V) j) ξ‖ₑ ^ 2 := + tsum_comp_le_tsum_of_injective (add_left_injective 1) + fun j => ‖𝓕 (psi (V := V) j) ξ‖ₑ ^ 2 + _ ≤ 2 := tsum_fourier_psi_sq_le ξ + +/-- The seminorm bounds `A^{η_i}_{k,l} = sup_x ‖x‖^k ‖D^l η_i(x)‖` of the derivative kernel +`η_i`. -/ +noncomputable def derivKernelBound {m : ℕ} (i : Fin m → Fin (finrank ℝ V)) (k l : ℕ) : ℝ := + SchwartzMap.seminorm ℝ k l (derivKernel i) + +/-- The constant family `j ↦ η_i` is uniformly Schwartz with bounds `Rd.derivKernelBound i`. -/ +theorem isUniformSchwartz_derivKernel {m : ℕ} (i : Fin m → Fin (finrank ℝ V)) : + IsUniformSchwartz (fun _ => derivKernel i) (derivKernelBound i) := + IsUniformSchwartz.const _ + +/-- **The derivative families are Calderón–Zygmund families** with overlap `2` and Hörmander +constant `4 H_{A^{η_i}}`, `H_{A^{η_i}} = Rd.familyHormanderConst V (Rd.derivKernelBound i)`. -/ +theorem isCZFamily_derivFamily {m : ℕ} (i : Fin m → Fin (finrank ℝ V)) : + IsCZFamily (derivFamily i) 2 (4 * familyHormanderConst V (derivKernelBound i)) := + IsCZFamily.of_dilation (isUniformSchwartz_derivKernel i) (tsum_fourier_derivFamily_sq_le i) + +/-! ### The dual derivative families -/ + +/-- The synthesis kernel `psiDual_j = (psiDualBase j)_{2^j}` as a Schwartz function. -/ +noncomputable def psiDualS (j : ℕ) : 𝓢(V, ℂ) := + schwartzDilate (2 ^ j) (pow_ne_zero j two_ne_zero) (psiDualBase j) + +/-- The Schwartz function `Rd.psiDualS j` is the synthesis kernel `psiDual_j`. -/ +theorem coe_psiDualS (j : ℕ) : (psiDualS j : V → ℂ) = psiDual j := by + rw [psiDualS, coe_schwartzDilate, dilate_psiDualBase] + +/-- The **dual derivative bases** `∂^w psiDualBase_j = ∂_{w_0} ⋯ ∂_{w_{k-1}} psiDualBase_j` of +the directions `w ∈ V^k`. -/ +noncomputable def derivDualBase {k : ℕ} (w : Fin k → V) (j : ℕ) : 𝓢(V, ℂ) := + ∂^{w} (psiDualBase j) + +/-- The **dual derivative family** `j ↦ (∂^w psiDualBase_j)_{2^j}`. -/ +noncomputable def derivDualFamily {k : ℕ} (w : Fin k → V) (j : ℕ) : V → ℂ := + dilate (2 ^ j) (derivDualBase w j : V → ℂ) + +/-- **Derivatives of the synthesis kernels**: +`∂^w psiDual_j = 2^{jk} (∂^w psiDualBase_j)_{2^j}` as functions +(`Rd.iteratedLineDerivOp_schwartzDilate` with `c = 2^j`). -/ +theorem iteratedLineDerivOp_psiDualS {k : ℕ} (w : Fin k → V) (j : ℕ) : + ⇑(∂^{w} (psiDualS (V := V) j)) = ((2 : ℂ) ^ (j * k)) • derivDualFamily w j := by + rw [psiDualS, iteratedLineDerivOp_schwartzDilate] + funext x + rw [smul_apply, coe_schwartzDilate, Pi.smul_apply, derivDualFamily, derivDualBase] + push_cast + rw [pow_mul] + +/-- The seminorm bounds of the dual derivative bases `j ↦ ∂^w psiDualBase_j`: the larger of the +seminorms of `∂^w δ_2 Φ` (`j = 0, 1`) and `∂^w (δ_2 Φ - δ_{1/4} Φ)` (`j ≥ 2`). -/ +noncomputable def derivDualBound {k : ℕ} (w : Fin k → V) (a l : ℕ) : ℝ := + max (SchwartzMap.seminorm ℝ a l (derivDualBase w 0)) + (SchwartzMap.seminorm ℝ a l (derivDualBase w 2)) + +/-- The dual derivative bases are uniformly Schwartz with bounds `Rd.derivDualBound w`: they take +the two values of `j = 0` and `j = 2`. -/ +theorem isUniformSchwartz_derivDualBase {k : ℕ} (w : Fin k → V) : + IsUniformSchwartz (derivDualBase w) (derivDualBound w) := + IsUniformSchwartz.of_forall_eq_or_eq fun j => by + match j with + | 0 => exact Or.inl rfl + | 1 => exact Or.inl rfl + | _ + 2 => exact Or.inr rfl + +omit [InnerProductSpace ℝ V] [FiniteDimensional ℝ V] [MeasurableSpace V] [BorelSpace V] in +/-- The **overlap of a dual derivative family**, `4 ((8π)^k ∏_l ‖w_l‖)²`. -/ +noncomputable def derivDualOverlap {k : ℕ} (w : Fin k → V) : ℝ≥0∞ := + 4 * (ENNReal.ofReal (8 * π) ^ k * ∏ l, ‖w l‖ₑ) ^ 2 + +omit [InnerProductSpace ℝ V] [FiniteDimensional ℝ V] [MeasurableSpace V] [BorelSpace V] in +/-- The overlap of a dual derivative family is finite. -/ +theorem derivDualOverlap_ne_top {k : ℕ} (w : Fin k → V) : derivDualOverlap w ≠ ∞ := + ENNReal.mul_ne_top ENNReal.ofNat_ne_top (ENNReal.pow_ne_top (ENNReal.mul_ne_top + (ENNReal.pow_ne_top ENNReal.ofReal_ne_top) (ENNReal.prod_ne_top fun _ _ => eNorm_ne_top))) + +/-- `𝓕(∂^w psiDualBase_j)_{2^j}(ξ) = (∏_l 2πi ⟪2^{-j} ξ, w_l⟫) 𝓕 psiDual_j(ξ)`. -/ +theorem fourier_derivDualFamily {k : ℕ} (w : Fin k → V) (j : ℕ) (ξ : V) : + 𝓕 (derivDualFamily w j) ξ = (∏ l, 2 * π * Complex.I * + (inner ℝ (((2 : ℝ) ^ j)⁻¹ • ξ) (w l) : ℂ)) * 𝓕 (psiDual (V := V) j) ξ := by + rw [derivDualFamily, fourier_dilate _ (by positivity), ← SchwartzMap.fourier_coe, derivDualBase, + SchwartzMap.fourier_iteratedLineDerivOp_apply, smul_eq_mul, SchwartzMap.fourier_coe, + ← fourier_dilate _ (by positivity), dilate_psiDualBase] + +omit [FiniteDimensional ℝ V] [MeasurableSpace V] [BorelSpace V] in +/-- `|∏_l 2πi ⟪ζ, w_l⟫| ≤ (2πR)^k ∏_l ‖w_l‖` for `‖ζ‖ ≤ R`, by Cauchy–Schwarz. -/ +theorem enorm_prod_inner_le {k : ℕ} (w : Fin k → V) {ζ : V} {R : ℝ} (hζ : ‖ζ‖ ≤ R) : + ‖∏ l, 2 * π * Complex.I * (inner ℝ ζ (w l) : ℂ)‖ₑ ≤ + ENNReal.ofReal (2 * π * R) ^ k * ∏ l, ‖w l‖ₑ := by + have hR : 0 ≤ R := (norm_nonneg ζ).trans hζ + have h2πR : 0 ≤ 2 * π * R := mul_nonneg (by positivity) hR + have h : ‖∏ l, 2 * π * Complex.I * (inner ℝ ζ (w l) : ℂ)‖ ≤ (2 * π * R) ^ k * ∏ l, ‖w l‖ := by + rw [norm_prod] + calc ∏ l, ‖2 * π * Complex.I * (inner ℝ ζ (w l) : ℂ)‖ ≤ ∏ l, 2 * π * R * ‖w l‖ := + Finset.prod_le_prod₀ (fun l _ => norm_nonneg _) fun l _ => ?_ + _ = (2 * π * R) ^ k * ∏ l, ‖w l‖ := by rw [Finset.prod_mul_distrib, Fin.prod_const] + rw [norm_mul, norm_mul, norm_mul, Complex.norm_I, Complex.norm_real, Complex.norm_real, + Complex.norm_ofNat, Real.norm_of_nonneg Real.pi_pos.le, mul_one, Real.norm_eq_abs] + have h1 := abs_real_inner_le_norm ζ (w l) + have h2 : ‖ζ‖ * ‖w l‖ ≤ R * ‖w l‖ := by gcongr + nlinarith [Real.pi_pos] + rw [← ofReal_norm] + refine (ENNReal.ofReal_le_ofReal h).trans_eq ?_ + rw [ENNReal.ofReal_mul (pow_nonneg h2πR k), ENNReal.ofReal_pow h2πR, + ENNReal.ofReal_prod_of_nonneg fun l _ => norm_nonneg _] + simp_rw [ofReal_norm] + +/-- `|𝓕(∂^w psiDualBase_j)_{2^j}(ξ)| ≤ (8π)^k (∏_l ‖w_l‖) |𝓕 psiDual_j(ξ)|`: where +`𝓕 psiDual_j(ξ) ≠ 0`, `‖ξ‖ < 2^{j+2}` (`Rd.norm_lt_of_fourier_psiDual_ne_zero`), so +`‖2^{-j} ξ‖ < 4`. -/ +theorem enorm_fourier_derivDualFamily_le {k : ℕ} (w : Fin k → V) (j : ℕ) (ξ : V) : + ‖𝓕 (derivDualFamily w j) ξ‖ₑ ≤ + ENNReal.ofReal (8 * π) ^ k * (∏ l, ‖w l‖ₑ) * ‖𝓕 (psiDual (V := V) j) ξ‖ₑ := by + rw [fourier_derivDualFamily, eNorm_mul] + by_cases h : 𝓕 (psiDual (V := V) j) ξ = 0 + · rw [h, eNorm_zero, mul_zero, mul_zero] + · rw [show (8 : ℝ) * π = 2 * π * 4 by ring] + gcongr + refine enorm_prod_inner_le w ?_ + have h1 := norm_lt_of_fourier_psiDual_ne_zero h + rw [norm_two_pow_inv_smul, div_le_iff₀ (by positivity)] + rw [pow_add] at h1 + norm_num at h1 + linarith + +/-- **Overlap of a dual derivative family**: +`∑_j |𝓕(∂^w psiDualBase_j)_{2^j}(ξ)|² ≤ 4 ((8π)^k ∏_l ‖w_l‖)²` for every `ξ`, by +comparison with the synthesis kernels (`Rd.enorm_fourier_derivDualFamily_le`, +`Rd.tsum_fourier_psiDual_sq_le`). -/ +theorem tsum_fourier_derivDualFamily_sq_le {k : ℕ} (w : Fin k → V) (ξ : V) : + ∑' j, ‖𝓕 (derivDualFamily w j) ξ‖ₑ ^ 2 ≤ derivDualOverlap w := + calc ∑' j, ‖𝓕 (derivDualFamily w j) ξ‖ₑ ^ 2 + ≤ ∑' j, (ENNReal.ofReal (8 * π) ^ k * ∏ l, ‖w l‖ₑ) ^ 2 * + ‖𝓕 (psiDual (V := V) j) ξ‖ₑ ^ 2 := + tsum_le_tsum fun j => by + rw [← mul_pow] + gcongr + exact enorm_fourier_derivDualFamily_le w j ξ + _ = (ENNReal.ofReal (8 * π) ^ k * ∏ l, ‖w l‖ₑ) ^ 2 * + ∑' j, ‖𝓕 (psiDual (V := V) j) ξ‖ₑ ^ 2 := ENNReal.tsum_mul_left + _ ≤ (ENNReal.ofReal (8 * π) ^ k * ∏ l, ‖w l‖ₑ) ^ 2 * 4 := by + gcongr + exact tsum_fourier_psiDual_sq_le ξ + _ = derivDualOverlap w := by rw [derivDualOverlap, mul_comm] + +/-- **The dual derivative families are Calderón–Zygmund families** with overlap +`4 ((8π)^k ∏_l ‖w_l‖)²` (`Rd.derivDualOverlap`) and Hörmander constant `4 H_{A^w}`, +`H_{A^w} = Rd.familyHormanderConst V (Rd.derivDualBound w)`. -/ +theorem isCZFamily_derivDualFamily {k : ℕ} (w : Fin k → V) : + IsCZFamily (derivDualFamily w) (derivDualOverlap w) + (4 * familyHormanderConst V (derivDualBound w)) := + IsCZFamily.of_dilation (isUniformSchwartz_derivDualBase w) + (tsum_fourier_derivDualFamily_sq_le w) + +end Rd diff --git a/LeanPool/FunctionSpaces/Rd/Sobolev/DivergenceKernels.lean b/LeanPool/FunctionSpaces/Rd/Sobolev/DivergenceKernels.lean new file mode 100644 index 0000000000..eed1b5b872 --- /dev/null +++ b/LeanPool/FunctionSpaces/Rd/Sobolev/DivergenceKernels.lean @@ -0,0 +1,668 @@ +/- +Copyright (c) 2026 Mario Ullrich. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Mario Ullrich +-/ +module + +public import LeanPool.FunctionSpaces.Rd.SingularIntegrals.DilationFamilies +public import Mathlib.Analysis.Calculus.ParametricIntervalIntegral + +/- +Modified for Lean Pool: module names and imports adapted. +-/ + +/-! +# Divergence kernels + +Let `V` be a finite-dimensional real inner product space of dimension `n`, such as `ℝ^d`, with +Lebesgue measure and an orthonormal basis `(e_i)`, and let `m_c(x) = c^n m(c x)` be the +dilations (`Rd.dilate`). + +* **Smoothness of parametric integrals** + (`intervalIntegral.contDiff_parametric_intervalIntegral_of_contDiff`): if `(x, t) ↦ F(x, t)` is + smooth, so is `x ↦ ∫_a^b F(x, t) dt`, with the derivative under the integral sign for `C^1` + integrands (`intervalIntegral.hasFDerivAt_integral_of_contDiff`). Mathlib has the derivative at + one point and the continuity; smoothness follows by induction on the order. +* **The dilation identity** (`Rd.sum_fderiv_divergenceKernel`): for `m ∈ C^1`, Euler's identity + `d/ds m_{e^s}(x) = n m_{e^s}(x) + D(m_{e^s})(x) x` (`Rd.hasDerivAt_dilate_exp`) and the + fundamental theorem of calculus give, with the dilation average + `A_m(x) = ∫_0^{log 2} m_{e^s}(x) ds = ∫_1^2 t⁻¹ m_t(x) dt` (`Rd.dilationAverage`, + `Rd.dilationAverage_eq_integral_inv_mul`) and the + divergence kernels `K_i(x) = ⟪e_i, x⟫ A_m(x)` (`Rd.divergenceKernel`), + `m_2 - m = ∑_i ∂_{e_i} K_i`, since `∑_i ∂_{e_i} (⟪e_i, ·⟫ A)(x) = n A(x) + DA(x) x` + (`Rd.sum_fderiv_inner_mul`); at every scale for the dilates + (`Rd.sum_lineDerivOp_schwartzDilate_divergenceSchwartz`). +* **Support and mean**: `K_i(x) ≠ 0` only if `m(t x) ≠ 0` for some `t ∈ [1, 2]` + (`Rd.divergenceKernel_eq_zero`), so the `K_i` of a smooth compactly supported `m` are Schwartz + functions (`Rd.divergenceSchwartz`). A kernel that vanishes outside a closed set `S` with + `c y ∈ S ⇒ y ∈ S` for `c ≥ 1` has its dyadic dilates supported in `S` + (`Rd.tsupport_dilate_two_pow_subset`), and `∫ K_i = 0` if the first moments of `m` vanish + (`Rd.integral_divergenceKernel`, with the first moments of dilates + `Rd.integral_inner_mul_dilate`), + as they do for the moment kernels of order two (`Rd.integral_inner_mul_momentKernel_two`). +* **Calderón–Zygmund families** (`Rd.isCZFamily_dilate_of_integral_eq_zero`): for a Schwartz + function `G` with `∫ G = 0`, `|𝓕G(η)| ≤ C min(‖η‖, ‖η‖⁻¹)` (`Rd.enorm_fourier_le_mul_min`), so + the dilates `G_{2^j}` have the Fourier overlap `4 C²` (`Rd.meanZeroOverlap`); in particular the + dilated divergence kernels form Calderón–Zygmund families + (`Rd.isCZFamily_divergenceSchwartz`). +* **The local means kernels as dilation differences** (`Rd.LocalMeansBump.kernel_succ_eq_dilate`): + for a bump with moment kernel `m` of any order, `k_{j+1} = (m_2 - m)_{2^j}`, the identity that + the divergence kernels of `m_2 - m` turn into derivatives. +-/ + +@[expose] public section + +open MeasureTheory Filter Topology Module Metric Set +open scoped ENNReal SchwartzMap FourierTransform LineDeriv Real + +/-! ### Smoothness of parametric integrals -/ + +section ParametricIntegral + +universe u v w + +variable {H : Type u} [NormedAddCommGroup H] [NormedSpace ℝ H] [FiniteDimensional ℝ H] + +namespace intervalIntegral + +omit [FiniteDimensional ℝ H] in +/-- The partial derivative `(x, t) ↦ D_x F(x, t)` of a jointly `C^1` integrand is continuous. -/ +private theorem continuous_fderiv_fst_of_contDiff {E : Type w} [NormedAddCommGroup E] + [NormedSpace ℝ E] {F : H → ℝ → E} (hF : ContDiff ℝ 1 (Function.uncurry F)) : + Continuous fun q : H × ℝ => fderiv ℝ (fun x => F x q.2) q.1 := by + have hpart : ContDiff ℝ 1 (Function.uncurry fun (q : H × ℝ) (x : H) => F x q.2) := + hF.comp (contDiff_snd.prodMk (contDiff_snd.comp contDiff_fst)) + exact (ContDiff.fderiv (n := 0) hpart contDiff_fst (by norm_num)).continuous + +/-- **Differentiation under the integral sign** for a jointly `C^1` integrand: if +`(x, t) ↦ F x t` is `C^1` on `H × ℝ`, then `x ↦ ∫_a^b F x t dt` has the derivative +`∫_a^b D_x F x₀ t dt` at every `x₀`. The partial derivative is bounded on the compact set +`B̄(x₀, 1) × [a, b]`, so Mathlib's `intervalIntegral.hasFDerivAt_integral_of_dominated_of_fderiv_le` +applies. -/ +theorem hasFDerivAt_integral_of_contDiff {E : Type w} [NormedAddCommGroup E] + [NormedSpace ℝ E] {F : H → ℝ → E} (hF : ContDiff ℝ 1 (Function.uncurry F)) (a b : ℝ) + (x₀ : H) : + HasFDerivAt (fun x => ∫ t in a..b, F x t) (∫ t in a..b, fderiv ℝ (fun x => F x t) x₀) x₀ := by + have hcont := continuous_fderiv_fst_of_contDiff hF + have hslice : ∀ t, ContDiff ℝ 1 fun x => F x t := fun t => + hF.comp (contDiff_id.prodMk contDiff_const) + have hK : IsCompact (closedBall x₀ 1 ×ˢ uIcc a b) := + (isCompact_closedBall x₀ 1).prod isCompact_uIcc + obtain ⟨C, hC⟩ := hK.exists_bound_of_continuousOn hcont.continuousOn + refine hasFDerivAt_integral_of_dominated_of_fderiv_le (𝕜 := ℝ) + (bound := fun _ => C) (F' := fun x t => fderiv ℝ (fun x => F x t) x) + (closedBall_mem_nhds x₀ one_pos) (Eventually.of_forall fun x => + (hF.continuous.comp (continuous_const.prodMk continuous_id)).aestronglyMeasurable) + ((hF.continuous.comp (continuous_const.prodMk continuous_id)).intervalIntegrable a b) + (hcont.comp (continuous_const.prodMk continuous_id)).aestronglyMeasurable + (ae_of_all _ fun t ht x hx => hC (x, t) ⟨hx, uIoc_subset_uIcc ht⟩) + intervalIntegrable_const (ae_of_all _ fun t _ x _ => ?_) + exact ((hslice t).differentiable one_ne_zero x).hasFDerivAt + +/-- **The derivative of a parametric integral, applied to a vector**: for a jointly `C^1` +integrand, `D(∫_a^b F(·, t) dt)(x) v = ∫_a^b D_x F(x, t) v dt` +(`intervalIntegral.hasFDerivAt_integral_of_contDiff` and Mathlib's +`ContinuousLinearMap.intervalIntegral_apply`). -/ +theorem fderiv_integral_apply_of_contDiff {E : Type w} [NormedAddCommGroup E] + [NormedSpace ℝ E] {F : H → ℝ → E} (hF : ContDiff ℝ 1 (Function.uncurry F)) (a b : ℝ) + (x v : H) : + fderiv ℝ (fun x => ∫ t in a..b, F x t) x v = ∫ t in a..b, fderiv ℝ (fun x => F x t) x v := by + rw [(hasFDerivAt_integral_of_contDiff hF a b x).fderiv, + ContinuousLinearMap.intervalIntegral_apply (φ := fun t => fderiv ℝ (fun x => F x t) x) + (((continuous_fderiv_fst_of_contDiff hF).comp + (continuous_const.prodMk continuous_id)).intervalIntegrable a b)] + +/-- Smoothness of parametric integrals with values in a space of the universe of `H` or above, +by induction on the order: the derivative of `x ↦ ∫_a^b F x t dt` is again a parametric integral +of a smooth integrand (`intervalIntegral.hasFDerivAt_integral_of_contDiff`). -/ +theorem contDiff_parametric_intervalIntegral_of_contDiff_aux {E : Type max u v} + [NormedAddCommGroup E] [NormedSpace ℝ E] (n : ℕ) {F : H → ℝ → E} + (hF : ContDiff ℝ ((⊤ : ℕ∞) : WithTop ℕ∞) (Function.uncurry F)) (a b : ℝ) : + ContDiff ℝ n fun x => ∫ t in a..b, F x t := by + induction n generalizing E with + | zero => + exact contDiff_zero.2 (continuous_parametric_intervalIntegral_of_continuous' hF.continuous a b) + | succ n ih => + refine contDiff_succ_iff_hasFDerivAt.2 ⟨fun x => ∫ t in a..b, fderiv ℝ (fun x => F x t) x, + ?_, fun x => hasFDerivAt_integral_of_contDiff (hF.of_le (by simp)) a b x⟩ + have hpart : ContDiff ℝ ((⊤ : ℕ∞) : WithTop ℕ∞) + (Function.uncurry fun (q : H × ℝ) (x : H) => F x q.2) := + hF.comp (contDiff_snd.prodMk (contDiff_snd.comp contDiff_fst)) + exact ih (F := fun x t => fderiv ℝ (fun x => F x t) x) + (hpart.fderiv contDiff_fst (by simp)) + +/-- **Smoothness of parametric integrals**: if `(x, t) ↦ F x t` is smooth on `H × ℝ`, `H` finite +dimensional, then `x ↦ ∫_a^b F x t dt` is smooth. Mathlib has the derivative under the integral +sign (`intervalIntegral.hasFDerivAt_integral_of_dominated_of_fderiv_le`) and the continuity +(`intervalIntegral.continuous_parametric_intervalIntegral_of_continuous'`); the induction on the +order runs in one universe +(`intervalIntegral.contDiff_parametric_intervalIntegral_of_contDiff_aux`), reached through +`ULift`. -/ +theorem contDiff_parametric_intervalIntegral_of_contDiff {E : Type w} [NormedAddCommGroup E] + [NormedSpace ℝ E] {F : H → ℝ → E} + (hF : ContDiff ℝ ((⊤ : ℕ∞) : WithTop ℕ∞) (Function.uncurry F)) (a b : ℝ) : + ContDiff ℝ ((⊤ : ℕ∞) : WithTop ℕ∞) fun x => ∫ t in a..b, F x t := by + let e : ULift.{u} E ≃L[ℝ] E := ContinuousLinearEquiv.ulift + have hF' : ContDiff ℝ ((⊤ : ℕ∞) : WithTop ℕ∞) (Function.uncurry fun x t => e.symm (F x t)) := + e.symm.contDiff.comp hF + have h : ContDiff ℝ ((⊤ : ℕ∞) : WithTop ℕ∞) fun x => ∫ t in a..b, e.symm (F x t) := + contDiff_infty.2 fun n => contDiff_parametric_intervalIntegral_of_contDiff_aux.{u, w} n hF' a b + have heq : (fun x => ∫ t in a..b, F x t) = fun x => e (∫ t in a..b, e.symm (F x t)) := by + funext x + calc ∫ t in a..b, F x t = ∫ t in a..b, e (e.symm (F x t)) := by simp + _ = e (∫ t in a..b, e.symm (F x t)) := by + simp only [intervalIntegral, e.integral_comp_comm, map_sub] + rw [heq] + exact e.contDiff.comp h + +end intervalIntegral + +end ParametricIntegral + +namespace Rd + +variable {V : Type*} [NormedAddCommGroup V] [InnerProductSpace ℝ V] [FiniteDimensional ℝ V] + [MeasurableSpace V] [BorelSpace V] + +/-! ### Exponential dilations -/ + +omit [FiniteDimensional ℝ V] [MeasurableSpace V] [BorelSpace V] in +/-- The dilations `m_{e^s}(x) = e^{sn} m(e^s x)` depend smoothly on `(x, s)` if `m` is smooth. -/ +theorem contDiff_dilate_exp {m : V → ℂ} {n : WithTop ℕ∞} (hm : ContDiff ℝ n m) : + ContDiff ℝ n (Function.uncurry fun (x : V) (s : ℝ) => dilate (Real.exp s) m x) := by + have he : ContDiff ℝ n fun p : V × ℝ => Real.exp p.2 := Real.contDiff_exp.comp contDiff_snd + exact (Complex.ofRealCLM.contDiff.comp (he.pow _)).mul (hm.comp (he.smul contDiff_fst)) + +omit [FiniteDimensional ℝ V] [MeasurableSpace V] [BorelSpace V] in +/-- The dilations `m_{e^s}(x)` depend continuously on `(x, s)` if `m` is continuous. -/ +theorem continuous_dilate_exp {m : V → ℂ} (hm : Continuous m) : + Continuous (Function.uncurry fun (x : V) (s : ℝ) => dilate (Real.exp s) m x) := + (contDiff_dilate_exp (n := 0) (contDiff_zero.2 hm)).continuous + +omit [FiniteDimensional ℝ V] [MeasurableSpace V] [BorelSpace V] in +/-- The derivative of a dilate: `D(m_c)(x) v = c^n Dm(c x)(c v)`. -/ +theorem fderiv_dilate_apply {m : V → ℂ} (hm : Differentiable ℝ m) (c : ℝ) (x v : V) : + fderiv ℝ (dilate c m) x v = (((c ^ finrank ℝ V : ℝ)) : ℂ) * fderiv ℝ m (c • x) (c • v) := by + have h : HasFDerivAt (dilate c m) ((((c ^ finrank ℝ V : ℝ)) : ℂ) • + (fderiv ℝ m (c • x)).comp (c • ContinuousLinearMap.id ℝ V)) x := + ((hm (c • x)).hasFDerivAt.comp x ((hasFDerivAt_id x).const_smul c)).const_mul _ + rw [h.fderiv] + simp + +omit [FiniteDimensional ℝ V] [MeasurableSpace V] [BorelSpace V] in +/-- The dilates of a differentiable function are differentiable. -/ +theorem differentiableAt_dilate {G : V → ℂ} (hG : Differentiable ℝ G) (c : ℝ) (x : V) : + DifferentiableAt ℝ (dilate c G) x := + (differentiableAt_const _).mul ((hG _).comp x (differentiableAt_id.const_smul c)) + +omit [FiniteDimensional ℝ V] [MeasurableSpace V] [BorelSpace V] in +/-- **Euler's identity for dilations**: `d/ds m_{e^s}(x) = n m_{e^s}(x) + D(m_{e^s})(x) x`, the +derivative of the dilation parameter is the radial derivative. -/ +theorem hasDerivAt_dilate_exp {m : V → ℂ} (hm : Differentiable ℝ m) (x : V) (s : ℝ) : + HasDerivAt (fun s => dilate (Real.exp s) m x) + ((finrank ℝ V : ℂ) * dilate (Real.exp s) m x + + fderiv ℝ (dilate (Real.exp s) m) x x) s := by + set n := finrank ℝ V + have h1 : HasDerivAt (fun s => ((Real.exp (n * s) : ℝ) : ℂ)) ((Real.exp (n * s) * n : ℝ) : ℂ) s := + (((hasDerivAt_id s).const_mul (n : ℝ)).exp.congr_deriv (by simp)).ofReal_comp + have h2 : HasDerivAt (fun s => m (Real.exp s • x)) (fderiv ℝ m (Real.exp s • x) + (Real.exp s • x)) s := + (hm _).hasFDerivAt.comp_hasDerivAt s ((Real.hasDerivAt_exp s).smul_const x) + have hd : (fun s => dilate (Real.exp s) m x) = + fun s => ((Real.exp (n * s) : ℝ) : ℂ) * m (Real.exp s • x) := by + funext s + rw [dilate, Real.exp_nat_mul] + rw [hd] + convert h1.mul h2 using 1 + rw [fderiv_dilate_apply hm, dilate, ← Real.exp_nat_mul] + push_cast + ring + +/-! ### The dilation average and the divergence kernels -/ + +/-- The **dilation average** `A_m(x) = ∫_0^{log 2} m_{e^s}(x) ds`, which is +`∫_1^2 t⁻¹ m_t(x) dt` after the substitution `t = e^s`. -/ +noncomputable def dilationAverage (m : V → ℂ) (x : V) : ℂ := + ∫ s in (0 : ℝ)..Real.log 2, dilate (Real.exp s) m x + +omit [FiniteDimensional ℝ V] [MeasurableSpace V] [BorelSpace V] in +/-- **The dilation average after the substitution `t = e^s`**: for continuous `m`, +`A_m(x) = ∫_1^2 t⁻¹ m_t(x) dt` (Mathlib's `intervalIntegral.integral_deriv_smul_comp'`). -/ +theorem dilationAverage_eq_integral_inv_mul {m : V → ℂ} (hm : Continuous m) (x : V) : + dilationAverage m x = ∫ t in (1 : ℝ)..2, ((t⁻¹ : ℝ) : ℂ) * dilate t m x := by + have hcont : Continuous fun t : ℝ => dilate t m x := + (Complex.continuous_ofReal.comp (continuous_pow _)).mul + (hm.comp (continuous_id.smul continuous_const)) + have hg : ContinuousOn (fun t : ℝ => ((t⁻¹ : ℝ) : ℂ) * dilate t m x) + (Real.exp '' uIcc 0 (Real.log 2)) := by + refine (Complex.continuous_ofReal.comp_continuousOn (continuousOn_inv₀.mono ?_)).mul + hcont.continuousOn + rintro _ ⟨s, -, rfl⟩ + exact (Real.exp_pos s).ne' + have h := intervalIntegral.integral_deriv_smul_comp' (fun s _ => Real.hasDerivAt_exp s) + Real.continuous_exp.continuousOn hg + rw [Real.exp_zero, Real.exp_log two_pos] at h + rw [dilationAverage, ← h] + refine intervalIntegral.integral_congr fun s _ => ?_ + rw [Function.comp_apply, Complex.real_smul, ← mul_assoc, ← Complex.ofReal_mul, + mul_inv_cancel₀ (Real.exp_pos s).ne', Complex.ofReal_one, one_mul] + +/-- The **divergence kernel** `K_w(x) = ⟪w, x⟫ A_m(x)` in the direction `w`. For an orthonormal +basis `(b_i)`, `∑_i ∂_{b_i} K_{b_i} = m_2 - m` (`Rd.sum_fderiv_divergenceKernel`). -/ +noncomputable def divergenceKernel (m : V → ℂ) (w : V) (x : V) : ℂ := + (inner ℝ w x : ℂ) * dilationAverage m x + +omit [MeasurableSpace V] [BorelSpace V] in +/-- The dilation average of a smooth function is smooth +(`intervalIntegral.contDiff_parametric_intervalIntegral_of_contDiff`). -/ +theorem contDiff_dilationAverage {m : V → ℂ} (hm : ContDiff ℝ ((⊤ : ℕ∞) : WithTop ℕ∞) m) : + ContDiff ℝ ((⊤ : ℕ∞) : WithTop ℕ∞) (dilationAverage m) := + intervalIntegral.contDiff_parametric_intervalIntegral_of_contDiff (contDiff_dilate_exp hm) _ _ + +omit [MeasurableSpace V] [BorelSpace V] in +/-- The divergence kernels of a smooth function are smooth. -/ +theorem contDiff_divergenceKernel {m : V → ℂ} (hm : ContDiff ℝ ((⊤ : ℕ∞) : WithTop ℕ∞) m) + (w : V) : ContDiff ℝ ((⊤ : ℕ∞) : WithTop ℕ∞) (divergenceKernel m w) := + (Complex.ofRealCLM.contDiff.comp (innerSL ℝ w).contDiff).mul (contDiff_dilationAverage hm) + +omit [FiniteDimensional ℝ V] [MeasurableSpace V] [BorelSpace V] in +/-- The dilation average vanishes at `x` if `m(t x) = 0` for every `t ∈ [1, 2]`. -/ +theorem dilationAverage_eq_zero {m : V → ℂ} {x : V} + (hx : ∀ t : ℝ, 1 ≤ t → t ≤ 2 → m (t • x) = 0) : dilationAverage m x = 0 := by + have hlog : (0 : ℝ) ≤ Real.log 2 := Real.log_nonneg one_le_two + refine (intervalIntegral.integral_congr (g := fun _ => (0 : ℂ)) fun s hs => ?_).trans + intervalIntegral.integral_zero + rw [uIcc_of_le hlog] at hs + have h1 : 1 ≤ Real.exp s := Real.one_le_exp hs.1 + have h2 : Real.exp s ≤ 2 := by + calc Real.exp s ≤ Real.exp (Real.log 2) := Real.exp_le_exp.2 hs.2 + _ = 2 := Real.exp_log two_pos + simp [dilate, hx _ h1 h2] + +omit [FiniteDimensional ℝ V] [MeasurableSpace V] [BorelSpace V] in +/-- The divergence kernels vanish at `x` if `m(t x) = 0` for every `t ∈ [1, 2]`. -/ +theorem divergenceKernel_eq_zero {m : V → ℂ} (w : V) {x : V} + (hx : ∀ t : ℝ, 1 ≤ t → t ≤ 2 → m (t • x) = 0) : divergenceKernel m w x = 0 := by + rw [divergenceKernel, dilationAverage_eq_zero hx, mul_zero] + +omit [FiniteDimensional ℝ V] [MeasurableSpace V] [BorelSpace V] in +/-- The divergence kernels vanish outside the ball of radius `R` if `m` does. -/ +theorem divergenceKernel_eq_zero_of_lt {m : V → ℂ} {R : ℝ} (hR : ∀ z, R < ‖z‖ → m z = 0) + (w : V) {x : V} (hx : R < ‖x‖) : divergenceKernel m w x = 0 := + divergenceKernel_eq_zero w fun t ht _ => hR _ (by + rw [norm_smul, Real.norm_of_nonneg (zero_le_one.trans ht)] + nlinarith [norm_nonneg x]) + +omit [FiniteDimensional ℝ V] [MeasurableSpace V] [BorelSpace V] in +/-- The divergence kernels have compact support if `m` vanishes outside a ball. -/ +theorem hasCompactSupport_divergenceKernel [ProperSpace V] {m : V → ℂ} {R : ℝ} + (hR : ∀ z, R < ‖z‖ → m z = 0) (w : V) : HasCompactSupport (divergenceKernel m w) := + HasCompactSupport.intro (isCompact_closedBall 0 R) fun x hx => + divergenceKernel_eq_zero_of_lt hR w (by simpa [mem_closedBall, dist_zero_right] using hx) + +omit [InnerProductSpace ℝ V] [FiniteDimensional ℝ V] [MeasurableSpace V] [BorelSpace V] in +/-- **Supports of dyadic dilates**: if `K` vanishes outside a closed set `S` with +`c y ∈ S ⇒ y ∈ S` for `c ≥ 1`, then every dilate `K_{2^j}` is supported in `S`. -/ +theorem tsupport_dilate_two_pow_subset [NormedSpace ℝ V] {K : V → ℂ} {S : Set V} + (hS : IsClosed S) (hK : ∀ y, K y ≠ 0 → y ∈ S) + (hscale : ∀ c : ℝ, 1 ≤ c → ∀ y, c • y ∈ S → y ∈ S) (j : ℕ) : + tsupport (dilate (2 ^ j) K) ⊆ S := + closure_minimal (fun y hy => hscale (2 ^ j) (one_le_pow₀ one_le_two) y + (hK _ fun h => hy (by simp [dilate, h]))) hS + +omit [MeasurableSpace V] [BorelSpace V] in +/-- The dilation average of a `C^1` function is differentiable +(`intervalIntegral.hasFDerivAt_integral_of_contDiff`). -/ +theorem differentiable_dilationAverage {m : V → ℂ} (hm : ContDiff ℝ 1 m) : + Differentiable ℝ (dilationAverage m) := fun x => + (intervalIntegral.hasFDerivAt_integral_of_contDiff (contDiff_dilate_exp hm) _ _ + x).differentiableAt + +omit [MeasurableSpace V] [BorelSpace V] in +/-- The derivative of the dilation average of a `C^1` function: +`D A_m(x) v = ∫_0^{log 2} D(m_{e^s})(x) v ds` +(`intervalIntegral.fderiv_integral_apply_of_contDiff`). -/ +theorem fderiv_dilationAverage_apply {m : V → ℂ} (hm : ContDiff ℝ 1 m) (x v : V) : + fderiv ℝ (dilationAverage m) x v = + ∫ s in (0 : ℝ)..Real.log 2, fderiv ℝ (dilate (Real.exp s) m) x v := + intervalIntegral.fderiv_integral_apply_of_contDiff (contDiff_dilate_exp hm) _ _ x v + +omit [FiniteDimensional ℝ V] [MeasurableSpace V] [BorelSpace V] in +/-- The radial derivative `s ↦ D(m_{e^s})(x) x` of the dilates of a `C^1` function is +continuous in `s`. -/ +theorem continuous_fderiv_dilate_exp_apply {m : V → ℂ} (hm : ContDiff ℝ 1 m) (x : V) : + Continuous fun s => fderiv ℝ (dilate (Real.exp s) m) x x := by + have hd : Differentiable ℝ m := hm.differentiable one_ne_zero + simp_rw [fderiv_dilate_apply hd] + have hg : Continuous fun s : ℝ => Real.exp s • x := Real.continuous_exp.smul continuous_const + exact (Complex.continuous_ofReal.comp (Real.continuous_exp.pow _)).mul + (((hm.continuous_fderiv one_ne_zero).comp hg).clm_apply hg) + +omit [MeasurableSpace V] [BorelSpace V] in +/-- **The dilation identity**: `m_2(x) - m(x) = n A_m(x) + D A_m(x) x`, by the fundamental theorem +of calculus for `s ↦ m_{e^s}(x)` on `[0, log 2]` and Euler's identity +(`Rd.hasDerivAt_dilate_exp`). -/ +theorem dilate_two_sub_eq {m : V → ℂ} (hm : ContDiff ℝ 1 m) (x : V) : + dilate 2 m x - m x = (finrank ℝ V : ℂ) * dilationAverage m x + + fderiv ℝ (dilationAverage m) x x := by + have hd : Differentiable ℝ m := hm.differentiable one_ne_zero + have hc1 : Continuous fun s => dilate (Real.exp s) m x := + (contDiff_dilate_exp hm).continuous.comp (continuous_const.prodMk continuous_id) + have hc2 := continuous_fderiv_dilate_exp_apply hm x + have hcf : Continuous fun s => (finrank ℝ V : ℂ) * dilate (Real.exp s) m x + + fderiv ℝ (dilate (Real.exp s) m) x x := (continuous_const.mul hc1).add hc2 + have hftc := intervalIntegral.integral_eq_sub_of_hasDerivAt + (fun s _ => hasDerivAt_dilate_exp hd x s) (hcf.intervalIntegrable 0 (Real.log 2)) + rw [intervalIntegral.integral_add (f := fun s => (finrank ℝ V : ℂ) * dilate (Real.exp s) m x) + (g := fun s => fderiv ℝ (dilate (Real.exp s) m) x x) + ((continuous_const.mul hc1).intervalIntegrable _ _) (hc2.intervalIntegrable _ _), + intervalIntegral.integral_const_mul, Real.exp_log two_pos, + Real.exp_zero] at hftc + rw [dilationAverage, fderiv_dilationAverage_apply hm, hftc] + simp [dilate] + +omit [FiniteDimensional ℝ V] [MeasurableSpace V] [BorelSpace V] in +/-- **The divergence of `x A(x)`**: for an orthonormal basis `(b_i)` of `V` and `A` +differentiable at `x`, `∑_i ∂_{b_i} (⟪b_i, ·⟫ A)(x) = n A(x) + DA(x) x`, since +`∑_i ⟪b_i, x⟫ b_i = x` (Mathlib's `OrthonormalBasis.sum_repr'`). -/ +theorem sum_fderiv_inner_mul {ι : Type*} [Fintype ι] (b : OrthonormalBasis ι ℝ V) {A : V → ℂ} + {x : V} (hA : DifferentiableAt ℝ A x) : + ∑ i, fderiv ℝ (fun y => (inner ℝ (b i) y : ℂ) * A y) x (b i) = + (finrank ℝ V : ℂ) * A x + fderiv ℝ A x x := by + have hK : ∀ w v : V, fderiv ℝ (fun y => (inner ℝ w y : ℂ) * A y) x v = + (inner ℝ w v : ℂ) * A x + (inner ℝ w x : ℂ) * fderiv ℝ A x v := fun w v => by + have h := ((Complex.ofRealCLM.comp (innerSL ℝ w)).hasFDerivAt (x := x)).mul hA.hasFDerivAt + rw [show (fun y => (inner ℝ w y : ℂ) * A y) = ⇑(Complex.ofRealCLM.comp (innerSL ℝ w)) * A from + funext fun y => by simp, h.fderiv] + simp [add_comm, mul_comm] + have hb : ∀ i, inner ℝ (b i) (b i) = (1 : ℝ) := fun i => by + rw [real_inner_self_eq_norm_sq, b.orthonormal.1 i, one_pow] + have hsum : fderiv ℝ A x x = ∑ i, (inner ℝ (b i) x : ℂ) * fderiv ℝ A x (b i) := by + rw [← congrArg (fun v => fderiv ℝ A x v) (b.sum_repr' x)] + simp [map_sum, Complex.real_smul] + simp_rw [hK, hb, Complex.ofReal_one, one_mul] + rw [Finset.sum_add_distrib, Finset.sum_const, Finset.card_univ, hsum, + ← Module.finrank_eq_card_basis b.toBasis, nsmul_eq_mul] + +omit [MeasurableSpace V] [BorelSpace V] in +/-- **The divergence identity**: for an orthonormal basis `(b_i)` of `V` and `m ∈ C^1`, +`∑_i ∂_{b_i} K_{b_i}(x) = m_2(x) - m(x)` with the divergence kernels +`K_{b_i}(x) = ⟪b_i, x⟫ A_m(x)`: the left side is `n A_m(x) + D A_m(x) x` +(`Rd.sum_fderiv_inner_mul`), and `Rd.dilate_two_sub_eq`. -/ +theorem sum_fderiv_divergenceKernel {ι : Type*} [Fintype ι] (b : OrthonormalBasis ι ℝ V) + {m : V → ℂ} (hm : ContDiff ℝ 1 m) (x : V) : + ∑ i, fderiv ℝ (divergenceKernel m (b i)) x (b i) = dilate 2 m x - m x := + (sum_fderiv_inner_mul b (differentiable_dilationAverage hm x)).trans (dilate_two_sub_eq hm x).symm + +/-- The integrand `(x, s) ↦ ⟪w, x⟫ m_{e^s}(x)` of the dilation average is integrable on +`V × (0, c]` if `m` is continuous and vanishes outside a ball: it is continuous and vanishes +outside the compact set `B̄(0, R) × [0, c]`. -/ +theorem integrable_inner_mul_dilate_exp {m : V → ℂ} (hm : Continuous m) {R : ℝ} + (hR : ∀ z, R < ‖z‖ → m z = 0) (w : V) (c : ℝ) : + Integrable (Function.uncurry fun (x : V) (s : ℝ) => (inner ℝ w x : ℂ) * dilate (Real.exp s) m x) + ((volume : Measure V).prod (volume.restrict (Ioc 0 c))) := by + have hcont : Continuous (Function.uncurry fun (x : V) (s : ℝ) => + (inner ℝ w x : ℂ) * dilate (Real.exp s) m x) := + (Complex.continuous_ofReal.comp (continuous_const.inner continuous_fst)).mul + (continuous_dilate_exp hm) + have hμ : (volume : Measure V).prod (volume.restrict (Ioc 0 c)) = + ((volume : Measure V).prod volume).restrict (univ ×ˢ Ioc 0 c) := by + rw [← Measure.prod_restrict, Measure.restrict_univ] + rw [hμ] + refine IntegrableOn.mono_set ?_ (prod_mono subset_rfl Ioc_subset_Icc_self) + refine IntegrableOn.of_forall_sdiff_eq_zero (s := closedBall 0 R ×ˢ Icc 0 c) + (hcont.continuousOn.integrableOn_compact ((isCompact_closedBall 0 R).prod isCompact_Icc)) + (MeasurableSet.univ.prod measurableSet_Icc) ?_ + rintro ⟨x, s⟩ ⟨⟨-, hs⟩, hns⟩ + have hx : R < ‖x‖ := by + by_contra h + exact hns ⟨by simpa [mem_closedBall, dist_zero_right] using h, hs⟩ + have h1 : R < ‖Real.exp s • x‖ := by + rw [norm_smul, Real.norm_of_nonneg (Real.exp_pos s).le] + nlinarith [Real.one_le_exp hs.1, norm_nonneg x] + simp [dilate, hR _ h1] + +/-- **The divergence kernels have mean zero** if the first moments of `m` vanish: +`∫ K_w = ∫_0^{log 2} ∫ ⟪w, x⟫ m_{e^s}(x) dx ds = ∫_0^{log 2} e^{-s} ∫ ⟪w, x⟫ m(x) dx ds = 0` +(Fubini, Mathlib's `integral_integral_swap`, and `Rd.integral_inner_mul_dilate`). -/ +theorem integral_divergenceKernel {m : V → ℂ} (hm : Continuous m) {R : ℝ} + (hR : ∀ z, R < ‖z‖ → m z = 0) (w : V) (h1 : ∫ x, (inner ℝ w x : ℂ) * m x = 0) : + ∫ x, divergenceKernel m w x = 0 := by + have hlog : (0 : ℝ) ≤ Real.log 2 := Real.log_nonneg one_le_two + have h : ∀ x, divergenceKernel m w x = + ∫ s in Ioc 0 (Real.log 2), (inner ℝ w x : ℂ) * dilate (Real.exp s) m x := fun x => by + rw [divergenceKernel, dilationAverage, intervalIntegral.integral_of_le hlog, + integral_const_mul] + simp_rw [h] + rw [integral_integral_swap (integrable_inner_mul_dilate_exp hm hR w _)] + refine integral_eq_zero_of_ae (ae_of_all _ fun s => ?_) + change (∫ x, (inner ℝ w x : ℂ) * dilate (Real.exp s) m x) = 0 + rw [integral_inner_mul_dilate m w (Real.exp_pos s), h1, mul_zero] + +/-! ### The divergence kernels as Schwartz functions -/ + +/-- The divergence kernel `K_w` of a smooth `m` that vanishes outside a ball, as a Schwartz +function (it is smooth with compact support). -/ +noncomputable def divergenceSchwartz {m : V → ℂ} (hm : ContDiff ℝ ((⊤ : ℕ∞) : WithTop ℕ∞) m) + {R : ℝ} (hR : ∀ z, R < ‖z‖ → m z = 0) (w : V) : 𝓢(V, ℂ) := + (hasCompactSupport_divergenceKernel hR w).toSchwartzMap (contDiff_divergenceKernel hm w) + +omit [MeasurableSpace V] [BorelSpace V] in +/-- The values of the Schwartz divergence kernel are those of `Rd.divergenceKernel`. -/ +theorem coe_divergenceSchwartz {m : V → ℂ} (hm : ContDiff ℝ ((⊤ : ℕ∞) : WithTop ℕ∞) m) + {R : ℝ} (hR : ∀ z, R < ‖z‖ → m z = 0) (w : V) : + (divergenceSchwartz hm hR w : V → ℂ) = divergenceKernel m w := + rfl + +omit [MeasurableSpace V] [BorelSpace V] in +/-- **The divergence identity for Schwartz kernels**: `∑_i ∂_{b_i} K_{b_i} = m_2 - m` pointwise +(`Rd.sum_fderiv_divergenceKernel`). -/ +theorem sum_lineDerivOp_divergenceSchwartz {ι : Type*} [Fintype ι] (b : OrthonormalBasis ι ℝ V) + {m : V → ℂ} (hm : ContDiff ℝ ((⊤ : ℕ∞) : WithTop ℕ∞) m) {R : ℝ} + (hR : ∀ z, R < ‖z‖ → m z = 0) (x : V) : + ∑ i, (∂_{b i} (divergenceSchwartz hm hR (b i)) : 𝓢(V, ℂ)) x = dilate 2 m x - m x := by + simp_rw [SchwartzMap.lineDerivOp_apply_eq_fderiv, coe_divergenceSchwartz] + exact sum_fderiv_divergenceKernel b (hm.of_le (by simp)) x + +omit [MeasurableSpace V] [BorelSpace V] in +/-- **The divergence identity at every scale**: for `c ≠ 0`, +`∑_i ∂_{b_i} (K_{b_i})_c = c (m_2 - m)_c`, by the chain rule for dilations +(`Rd.lineDerivOp_schwartzDilate`). -/ +theorem sum_lineDerivOp_schwartzDilate_divergenceSchwartz {ι : Type*} [Fintype ι] + (b : OrthonormalBasis ι ℝ V) {m : V → ℂ} (hm : ContDiff ℝ ((⊤ : ℕ∞) : WithTop ℕ∞) m) + {R : ℝ} (hR : ∀ z, R < ‖z‖ → m z = 0) {c : ℝ} (hc : c ≠ 0) (x : V) : + ∑ i, (∂_{b i} (schwartzDilate c hc (divergenceSchwartz hm hR (b i))) : 𝓢(V, ℂ)) x = + (c : ℂ) * dilate c (fun y => dilate 2 m y - m y) x := by + simp_rw [lineDerivOp_schwartzDilate, smul_apply, coe_schwartzDilate, smul_eq_mul, + ← Finset.mul_sum] + congr 1 + simp only [dilate, ← Finset.mul_sum] + congr 1 + exact sum_lineDerivOp_divergenceSchwartz b hm hR (c • x) + +/-! ### Fourier transforms of mean-zero kernels -/ + +/-- **Fourier transforms of mean-zero kernels vanish at `0` to first order**: for a Schwartz +function `G` with `∫ G = 0`, `|𝓕G(ξ)| ≤ 2π ‖ξ‖ ∫ ‖x‖ |G(x)| dx`, since +`𝓕G(ξ) = ∫ (e^(-2πi⟪x, ξ⟫) - 1) G(x) dx` and the character is `2π`-Lipschitz +(`Rd.norm_fourierChar_sub_le`). -/ +theorem norm_fourier_le_of_integral_eq_zero (G : 𝓢(V, ℂ)) (h0 : ∫ x, G x = 0) (ξ : V) : + ‖𝓕 (G : V → ℂ) ξ‖ ≤ 2 * π * ‖ξ‖ * ∫ x, ‖x‖ * ‖G x‖ := by + have hi : Integrable fun x => 𝐞 (-inner ℝ x ξ) • G x := by + simpa using (VectorFourier.fourierIntegral_convergent_iff Real.continuous_fourierChar + (show Continuous fun p : V × V => (innerₗ V) p.1 p.2 from continuous_inner) + (μ := volume) ξ).2 G.integrable + have h : 𝓕 (G : V → ℂ) ξ = ∫ x, (𝐞 (-inner ℝ x ξ) • G x - G x) := by + rw [integral_sub hi G.integrable, h0, sub_zero, Real.fourier_eq] + have hb : Integrable fun x => 2 * π * ‖ξ‖ * (‖x‖ * ‖G x‖) := by + simpa using (G.integrable_pow_mul volume 1).const_mul (2 * π * ‖ξ‖) + rw [h, ← integral_const_mul] + refine norm_integral_le_of_norm_le hb (ae_of_all _ fun x => ?_) + have h1 : 𝐞 (-inner ℝ x ξ) • G x - G x = ((𝐞 (-inner ℝ x ξ) : ℂ) - 𝐞 0) * G x := by + rw [AddChar.map_zero_eq_one, Circle.smul_def, Circle.coe_one, sub_mul, one_mul, smul_eq_mul] + rw [h1, norm_mul] + calc ‖(𝐞 (-inner ℝ x ξ) : ℂ) - 𝐞 0‖ * ‖G x‖ ≤ 2 * π * |-inner ℝ x ξ - 0| * ‖G x‖ := by + gcongr + exact norm_fourierChar_sub_le _ _ + _ ≤ 2 * π * (‖x‖ * ‖ξ‖) * ‖G x‖ := by + gcongr + rw [sub_zero, abs_neg] + exact abs_real_inner_le_norm x ξ + _ = 2 * π * ‖ξ‖ * (‖x‖ * ‖G x‖) := by ring + +/-- **Fourier transforms of Schwartz functions decay like `1/‖ξ‖`**: +`2π ‖ξ‖ |𝓕G(ξ)| ≤ C_G` with the gradient mass `C_G = Rd.gradMassConst G`, since +`𝓕(∂_ξ G)(ξ) = 2πi ‖ξ‖² 𝓕G(ξ)` (Mathlib's `SchwartzMap.fourier_lineDerivOp_eq`) and +`∫ |∂_ξ G| ≤ ‖ξ‖ C_G` (`Rd.lintegral_enorm_lineDerivOp_le`). -/ +theorem ofReal_mul_enorm_mul_enorm_fourier_le (G : 𝓢(V, ℂ)) (ξ : V) : + ENNReal.ofReal (2 * π) * ‖ξ‖ₑ * ‖𝓕 (G : V → ℂ) ξ‖ₑ ≤ gradMassConst G := by + rcases eq_or_ne ξ 0 with rfl | hξ + · simp + have hF : 𝓕 ((∂_{ξ} G : 𝓢(V, ℂ)) : V → ℂ) ξ = + (2 * π * Complex.I * (inner ℝ ξ ξ : ℂ)) * 𝓕 (G : V → ℂ) ξ := by + have ht : (fun x : V => inner ℝ x ξ).HasTemperateGrowth := by fun_prop + rw [← SchwartzMap.fourier_coe, SchwartzMap.fourier_lineDerivOp_eq, smul_apply, + SchwartzMap.smulLeftCLM_apply_apply ht, SchwartzMap.fourier_coe] + simp [mul_assoc] + have hnorm : ‖𝓕 ((∂_{ξ} G : 𝓢(V, ℂ)) : V → ℂ) ξ‖ₑ = + ‖ξ‖ₑ * (ENNReal.ofReal (2 * π) * ‖ξ‖ₑ * ‖𝓕 (G : V → ℂ) ξ‖ₑ) := by + rw [hF, eNorm_mul, real_inner_self_eq_norm_sq] + have h2 : ‖2 * π * Complex.I * ((‖ξ‖ ^ 2 : ℝ) : ℂ)‖ₑ = + ENNReal.ofReal (2 * π) * ‖ξ‖ₑ ^ 2 := by + rw [← ofReal_norm, ← ofReal_norm, ← ENNReal.ofReal_pow (norm_nonneg _), + ← ENNReal.ofReal_mul (by positivity)] + congr 1 + simp [Complex.norm_real, abs_of_pos Real.pi_pos] + rw [h2] + ring + have hle : ‖𝓕 ((∂_{ξ} G : 𝓢(V, ℂ)) : V → ℂ) ξ‖ₑ ≤ ‖ξ‖ₑ * gradMassConst G := + (enorm_fourier_le_lintegral _ ξ).trans (lintegral_enorm_lineDerivOp_le ξ G) + rw [hnorm] at hle + exact (ENNReal.mul_le_mul_iff_right (eNorm_ne_zero.2 hξ) eNorm_ne_top).1 hle + +/-- The constant `4 (2π ∫ ‖x‖ |G(x)| dx + C_G / (2π))²` of the Fourier overlap of the dilates of a +mean-zero Schwartz function `G`, with the gradient mass `C_G = Rd.gradMassConst G`. -/ +noncomputable def meanZeroOverlap (G : 𝓢(V, ℂ)) : ℝ≥0∞ := + 4 * (ENNReal.ofReal (2 * π * ∫ x, ‖x‖ * ‖G x‖) + + gradMassConst G * (ENNReal.ofReal (2 * π))⁻¹) ^ 2 + +/-- The overlap constant of a mean-zero Schwartz function is finite. -/ +theorem meanZeroOverlap_ne_top (G : 𝓢(V, ℂ)) : meanZeroOverlap G ≠ ∞ := + ENNReal.mul_ne_top (by norm_num) (ENNReal.pow_ne_top (ENNReal.add_ne_top.2 + ⟨ENNReal.ofReal_ne_top, ENNReal.mul_ne_top (gradMassConst_ne_top G) + (ENNReal.inv_ne_top.2 (by simp [Real.pi_pos]))⟩)) + +/-- **The two Fourier bounds of a mean-zero kernel together**: +`|𝓕G(η)| ≤ C min(‖η‖, ‖η‖⁻¹)` with `C = 2π ∫ ‖x‖ |G(x)| dx + C_G / (2π)` +(`Rd.norm_fourier_le_of_integral_eq_zero`, `Rd.ofReal_mul_enorm_mul_enorm_fourier_le`). -/ +theorem enorm_fourier_le_mul_min (G : 𝓢(V, ℂ)) (h0 : ∫ x, G x = 0) (η : V) : + ‖𝓕 (G : V → ℂ) η‖ₑ ≤ (ENNReal.ofReal (2 * π * ∫ x, ‖x‖ * ‖G x‖) + + gradMassConst G * (ENNReal.ofReal (2 * π))⁻¹) * min ‖η‖ₑ ‖η‖ₑ⁻¹ := by + set A := ENNReal.ofReal (2 * π * ∫ x, ‖x‖ * ‖G x‖) + set B := gradMassConst G * (ENNReal.ofReal (2 * π))⁻¹ + have hA : ‖𝓕 (G : V → ℂ) η‖ₑ ≤ (A + B) * ‖η‖ₑ := by + refine le_trans ?_ (mul_le_mul_left (le_self_add : A ≤ A + B) _) + rw [← ofReal_norm, ← ofReal_norm, ← ENNReal.ofReal_mul (by positivity)] + refine ENNReal.ofReal_le_ofReal ((norm_fourier_le_of_integral_eq_zero G h0 η).trans_eq ?_) + ring + rcases eq_or_ne η 0 with rfl | hη + · rw [eNorm_zero, mul_zero] at hA + exact hA.trans zero_le + have hc0 : ENNReal.ofReal (2 * π) * ‖η‖ₑ ≠ 0 := + mul_ne_zero (by simp [Real.pi_pos]) (eNorm_ne_zero.2 hη) + have hct : ENNReal.ofReal (2 * π) * ‖η‖ₑ ≠ ∞ := + ENNReal.mul_ne_top ENNReal.ofReal_ne_top eNorm_ne_top + have hB : ‖𝓕 (G : V → ℂ) η‖ₑ ≤ (A + B) * ‖η‖ₑ⁻¹ := + calc ‖𝓕 (G : V → ℂ) η‖ₑ + = (ENNReal.ofReal (2 * π) * ‖η‖ₑ)⁻¹ * + (ENNReal.ofReal (2 * π) * ‖η‖ₑ * ‖𝓕 (G : V → ℂ) η‖ₑ) := by + rw [← mul_assoc, ENNReal.inv_mul_cancel hc0 hct, one_mul] + _ ≤ (ENNReal.ofReal (2 * π) * ‖η‖ₑ)⁻¹ * gradMassConst G := by + gcongr + exact ofReal_mul_enorm_mul_enorm_fourier_le G η + _ = B * ‖η‖ₑ⁻¹ := by + rw [ENNReal.mul_inv (Or.inr eNorm_ne_top) (Or.inl ENNReal.ofReal_ne_top)] + ring + _ ≤ (A + B) * ‖η‖ₑ⁻¹ := by gcongr; exact le_add_self + rw [mul_min] + exact le_min hA hB + +/-- **The Fourier overlap of the dilates of a mean-zero kernel**: for a Schwartz function `G` +with `∫ G = 0` and every `ξ`, `∑_j |𝓕(G_{2^j})(ξ)|² ≤ 4 C²` (`Rd.meanZeroOverlap G`), since +`𝓕(G_{2^j})(ξ) = 𝓕G(2^(-j) ξ)` and `∑_j min(2^(-j) ‖ξ‖, 2^j ‖ξ‖⁻¹) ≤ 4` +(`ENNReal.tsum_min_two_pow_le`). -/ +theorem tsum_enorm_fourier_dilate_sq_le (G : 𝓢(V, ℂ)) (h0 : ∫ x, G x = 0) (ξ : V) : + ∑' j : ℕ, ‖𝓕 (dilate (2 ^ j) (G : V → ℂ)) ξ‖ₑ ^ 2 ≤ meanZeroOverlap G := by + set C := ENNReal.ofReal (2 * π * ∫ x, ‖x‖ * ‖G x‖) + + gradMassConst G * (ENNReal.ofReal (2 * π))⁻¹ + have hdil : ∀ j : ℕ, 𝓕 (dilate (2 ^ j) (G : V → ℂ)) ξ = 𝓕 (G : V → ℂ) (((2 : ℝ) ^ j)⁻¹ • ξ) := + fun j => fourier_dilate _ (by positivity) ξ + rcases eq_or_ne ξ 0 with rfl | hξ + · have h : ∀ j : ℕ, ‖𝓕 (dilate (2 ^ j) (G : V → ℂ)) 0‖ₑ ^ 2 = 0 := fun j => by + have h1 := enorm_fourier_le_mul_min G h0 0 + rw [eNorm_zero, min_eq_left zero_le, mul_zero, nonpos_iff_eq_zero] at h1 + rw [hdil, smul_zero, h1, zero_pow two_ne_zero] + simp [h] + set a := ‖ξ‖ₑ⁻¹ + have hn : ∀ j : ℕ, ‖((2 : ℝ) ^ j)⁻¹ • ξ‖ₑ = (2 ^ j * a)⁻¹ := fun j => by + rw [eNorm_smul, ENNReal.mul_inv (Or.inl (pow_ne_zero _ two_ne_zero)) + (Or.inl (ENNReal.pow_ne_top ENNReal.ofNat_ne_top)), inv_inv] + congr 1 + rw [← ofReal_norm, Real.norm_of_nonneg (by positivity), ENNReal.ofReal_inv_of_pos + (by positivity), ENNReal.ofReal_pow zero_le_two, ENNReal.ofReal_ofNat] + have hterm : ∀ j : ℕ, ‖𝓕 (dilate (2 ^ j) (G : V → ℂ)) ξ‖ₑ ^ 2 ≤ + C ^ 2 * min (2 ^ j * a) (2 ^ j * a)⁻¹ := fun j => by + rw [hdil] + calc ‖𝓕 (G : V → ℂ) (((2 : ℝ) ^ j)⁻¹ • ξ)‖ₑ ^ 2 + ≤ (C * min (2 ^ j * a)⁻¹ (2 ^ j * a)⁻¹⁻¹) ^ 2 := by + gcongr + rw [← hn] + exact enorm_fourier_le_mul_min G h0 _ + _ = C ^ 2 * min (2 ^ j * a)⁻¹ (2 ^ j * a)⁻¹⁻¹ ^ 2 := by ring + _ ≤ C ^ 2 * min (2 ^ j * a)⁻¹ (2 ^ j * a)⁻¹⁻¹ := by + gcongr + exact ENNReal.min_inv_sq_le _ + _ = C ^ 2 * min (2 ^ j * a) (2 ^ j * a)⁻¹ := by rw [inv_inv, min_comm] + calc ∑' j : ℕ, ‖𝓕 (dilate (2 ^ j) (G : V → ℂ)) ξ‖ₑ ^ 2 + ≤ ∑' j : ℕ, C ^ 2 * min (2 ^ j * a) (2 ^ j * a)⁻¹ := tsum_le_tsum hterm + _ = C ^ 2 * ∑' j : ℕ, min (2 ^ j * a) (2 ^ j * a)⁻¹ := ENNReal.tsum_mul_left + _ ≤ C ^ 2 * 4 := by gcongr; exact ENNReal.tsum_min_two_pow_le a + _ = meanZeroOverlap G := by rw [meanZeroOverlap]; ring + +/-- **Dilates of a mean-zero Schwartz function form a Calderón–Zygmund family**: for +`G ∈ 𝓢(V, ℂ)` with `∫ G = 0`, the kernels `G_{2^j}` have the Fourier overlap +`Rd.meanZeroOverlap G` and the Hörmander constant `4 H_G` (`Rd.IsCZFamily.of_dilation` with the +constant family `Rd.IsUniformSchwartz.const`). -/ +theorem isCZFamily_dilate_of_integral_eq_zero (G : 𝓢(V, ℂ)) (h0 : ∫ x, G x = 0) : + IsCZFamily (fun j => dilate (2 ^ j) (G : V → ℂ)) (meanZeroOverlap G) + (4 * familyHormanderConst V fun k l => SchwartzMap.seminorm ℝ k l G) := + IsCZFamily.of_dilation (G := fun _ => G) (IsUniformSchwartz.const G) + (tsum_enorm_fourier_dilate_sq_le G h0) + +/-- **The divergence kernels form Calderón–Zygmund families**: if `m` is smooth, vanishes outside +a ball and has vanishing first moment in the direction `w`, the dilates `(K_w)_{2^j}` of the +divergence kernel form a Calderón–Zygmund family (`Rd.integral_divergenceKernel`, +`Rd.isCZFamily_dilate_of_integral_eq_zero`). -/ +theorem isCZFamily_divergenceSchwartz {m : V → ℂ} (hm : ContDiff ℝ ((⊤ : ℕ∞) : WithTop ℕ∞) m) + {R : ℝ} (hR : ∀ z, R < ‖z‖ → m z = 0) {w : V} (h1 : ∫ x, (inner ℝ w x : ℂ) * m x = 0) : + IsCZFamily (fun j => dilate (2 ^ j) (divergenceSchwartz hm hR w : V → ℂ)) + (meanZeroOverlap (divergenceSchwartz hm hR w)) + (4 * familyHormanderConst V fun k l => + SchwartzMap.seminorm ℝ k l (divergenceSchwartz hm hR w)) := + isCZFamily_dilate_of_integral_eq_zero _ (integral_divergenceKernel hm.continuous hR w h1) + +/-! ### The local means kernels as dilation differences -/ + +/-- **The local means kernels at dyadic scales**: for a bump with moment kernel `m` of order `L`, +`k_{j+1} = (m_2 - m)_{2^j}`, since `k_{j+1} = m_{2^(j+1)} - m_{2^j}` and +`(m_2)_{2^j} = m_{2^(j+1)}` (`Rd.dilate_sub`, `Rd.dilate_dilate`). -/ +theorem LocalMeansBump.kernel_succ_eq_dilate (b : LocalMeansBump V) (L j : ℕ) : + b.kernel L (j + 1) = + dilate (2 ^ j) (fun y => dilate 2 (momentKernel b.toFun L) y - momentKernel b.toFun L y) := by + rw [show (fun y => dilate 2 (momentKernel b.toFun L) y - momentKernel b.toFun L y) = + dilate 2 (momentKernel b.toFun L) - momentKernel b.toFun L from rfl, dilate_sub, + dilate_dilate, ← pow_succ] + rfl + +end Rd diff --git a/LeanPool/FunctionSpaces/Rd/Sobolev/GagliardoNirenbergSobolev.lean b/LeanPool/FunctionSpaces/Rd/Sobolev/GagliardoNirenbergSobolev.lean new file mode 100644 index 0000000000..5d35106199 --- /dev/null +++ b/LeanPool/FunctionSpaces/Rd/Sobolev/GagliardoNirenbergSobolev.lean @@ -0,0 +1,457 @@ +/- +Copyright (c) 2026 Mario Ullrich. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Mario Ullrich +-/ +module + +public import LeanPool.FunctionSpaces.Rd.Sobolev.CriticalSobolevEmbedding +public import LeanPool.FunctionSpaces.Rd.Sobolev.WeakDerivativeChangeOfVariables +public import Mathlib.Analysis.FunctionalSpaces.SobolevInequality + +/- +Modified for Lean Pool: module names and imports adapted. +-/ + +/-! +# The Gagliardo–Nirenberg–Sobolev inequality + +Let `V` have dimension `n ≥ 1`, `1 ≤ p`, and `1/p' = 1/p - 1/n`. Mathlib proves the +Gagliardo–Nirenberg–Sobolev inequality `‖u‖_{p'} ≤ C_{V,p} ‖Du‖_p` for compactly supported +`C^1` functions `u` (`MeasureTheory.eLpNorm_le_eLpNorm_fderiv_of_eq_inner`, constant +`MeasureTheory.eLpNormLESNormFDerivOfEqInnerConst`). This file carries it to weakly +differentiable functions by mollification, cut-off and Fatou's lemma +(`MeasureTheory.eLpNorm_le_of_ae_tendsto_of_tendsto`): + +* **compact support** (`Rd.eLpNorm_le_of_hasCompactSupport_of_hasWeakLineDeriv`): for `h` with + compact support and weak derivatives `g_k` along the orthonormal basis `e` of `Rd.gridBasis`, + `‖h‖_{p'} ≤ C_{V,p} ∑_k ‖g_k‖_p`; the mollified `η_c ⋆ h`, `η = Rd.LocalMeansBump.std`, + satisfy the bound by Young's inequality, with `D_{e_k}(η_c ⋆ h) = η_c ⋆ g_k` + (`Rd.fderiv_conv_apply_eq_conv`), and converge to `h` in `L_1`, hence in measure; +* **the homogeneous inequality** (`Rd.eLpNorm_le_of_hasWeakLineDeriv`): the same bound for every + `f ∈ L_p(V)` with weak derivatives along `e`, through the cut-offs `χ_R f` + (`Rd.realCutoff`), whose weak derivatives differ from `χ_R g_k` by `O(1/R) |f|`; +* **`W^1_p ↪ L_r` for `1/r = 1/p - 1/n`** and every `1 ≤ p`, `p = 1` included + (`Rd.exists_memLp_ae_eq_of_hasWeakLineDeriv_one`, `Rd.exists_memLp_ae_eq_of_memSobolev_one`), + also with the exponents in the form `1/r + 1/n = 1/p` + (`Rd.exists_memLp_ae_eq_of_memSobolev_one_of_inv_add_inv`); +* **`W^m_1 ↪ L_r` for `1/r = 1 - m/n`** (`Rd.exists_memLp_ae_eq_of_memSobolev_one_of_eq`): the + derivatives of order below `m` lie in `L_{n/(n-1)}`, and the critical Sobolev embedding of + `W^{m-1}_{n/(n-1)}` (`Rd.exists_memLp_ae_eq_of_memSobolev_of_eq`) applies. +-/ + +@[expose] public section + +open MeasureTheory Filter Topology Module TopologicalSpace +open scoped ENNReal NNReal SchwartzMap LineDeriv + +/-- **Fatou's lemma for `L_p` norms with convergent bounds**: if almost everywhere strongly +measurable `u_i` converge to `f` almost everywhere, `‖u_i‖_p ≤ B_i` for every `i` and `B_i → b`, +then `‖f‖_p ≤ b`. This extends Mathlib's `MeasureTheory.Lp.eLpNorm_le_of_ae_tendsto`, the case of +a constant bound, to convergent bounds. The proof is Mathlib's Fatou lemma +`MeasureTheory.Lp.eLpNorm_lim_le_liminf_eLpNorm`, with `f` measurable as an almost everywhere +limit (Mathlib's `aestronglyMeasurable_of_tendsto_ae`). -/ +theorem MeasureTheory.eLpNorm_le_of_ae_tendsto_of_tendsto {α E : Type*} [MeasurableSpace α] + {μ : Measure α} [NormedAddCommGroup E] {p : ℝ≥0∞} {u : ℕ → α → E} {f : α → E} + (hu : ∀ i, AEStronglyMeasurable (u i) μ) + (hlim : ∀ᵐ x ∂μ, Tendsto (fun i => u i x) atTop (𝓝 (f x))) {B : ℕ → ℝ≥0∞} {b : ℝ≥0∞} + (hB : Tendsto B atTop (𝓝 b)) (hle : ∀ i, eLpNorm (u i) p μ ≤ B i) : eLpNorm f p μ ≤ b := + (Lp.eLpNorm_lim_le_liminf_eLpNorm hu f (aestronglyMeasurable_of_tendsto_ae atTop hu hlim) + hlim).trans ((liminf_le_liminf (Eventually.of_forall hle)).trans_eq hB.liminf_eq) + +/-- **The operator norm through an orthonormal basis**: for an orthonormal basis `b` of a real +inner product space `E` and a continuous linear map `L : E → F`, `‖L‖ ≤ ∑_i ‖L b_i‖`, since +`x = ∑_i ⟪b_i, x⟫ b_i` (Mathlib's `OrthonormalBasis.sum_repr'`) and `|⟪b_i, x⟫| ≤ ‖x‖`. -/ +theorem ContinuousLinearMap.opNorm_le_sum_norm_apply_orthonormalBasis {ι E F : Type*} + [Fintype ι] [NormedAddCommGroup E] [InnerProductSpace ℝ E] [NormedAddCommGroup F] + [NormedSpace ℝ F] (L : E →L[ℝ] F) (b : OrthonormalBasis ι ℝ E) : + ‖L‖ ≤ ∑ i, ‖L (b i)‖ := by + refine L.opNorm_le_bound (Finset.sum_nonneg fun i _ => norm_nonneg _) fun x => ?_ + conv_lhs => rw [← b.sum_repr' x] + rw [map_sum, Finset.sum_mul] + refine (norm_sum_le _ _).trans (Finset.sum_le_sum fun i _ => ?_) + rw [map_smul, norm_smul, mul_comm] + refine mul_le_mul_of_nonneg_left ?_ (norm_nonneg _) + calc ‖inner ℝ (b i) x‖ ≤ ‖b i‖ * ‖x‖ := norm_inner_le_norm _ _ + _ = ‖x‖ := by rw [b.orthonormal.1 i, one_mul] + +namespace Rd + +variable {V : Type*} [NormedAddCommGroup V] [InnerProductSpace ℝ V] [FiniteDimensional ℝ V] + [MeasurableSpace V] [BorelSpace V] + +/-! ### Derivatives through a basis -/ + +omit [MeasurableSpace V] [BorelSpace V] in +/-- **The operator norm through the grid basis**: for a continuous linear map `L : V → F`, +`‖L‖ ≤ ∑_k ‖L e_k‖` for the orthonormal basis `e` of `Rd.gridBasis` +(`ContinuousLinearMap.opNorm_le_sum_norm_apply_orthonormalBasis`). -/ +theorem norm_le_sum_norm_apply_gridBasis {F : Type*} [NormedAddCommGroup F] [NormedSpace ℝ F] + (L : V →L[ℝ] F) : ‖L‖ ≤ ∑ k, ‖L (gridBasis V k)‖ := + L.opNorm_le_sum_norm_apply_orthonormalBasis (gridBasis V) + +/-- **The `L_p` norm of a derivative through a basis**: for a `C^1` function `u : V → ℂ` and +`1 ≤ p`, `‖Du‖_p ≤ ∑_k ‖D_{e_k} u‖_p` (`Rd.norm_le_sum_norm_apply_gridBasis` and Mathlib's +`MeasureTheory.eLpNorm_sum_le`). -/ +theorem eLpNorm_fderiv_le_sum {u : V → ℂ} (hu : ContDiff ℝ 1 u) {p : ℝ≥0∞} (hp : 1 ≤ p) : + eLpNorm (fderiv ℝ u) p volume ≤ + ∑ k, eLpNorm (fun x => fderiv ℝ u x (gridBasis V k)) p volume := by + have hc : Continuous (fderiv ℝ u) := hu.continuous_fderiv one_ne_zero + calc eLpNorm (fderiv ℝ u) p volume + ≤ eLpNorm (∑ k, fun x => ‖fderiv ℝ u x (gridBasis V k)‖) p volume := + eLpNorm_mono_real hc.aestronglyMeasurable fun x => by + rw [Finset.sum_apply] + exact norm_le_sum_norm_apply_gridBasis _ + _ ≤ ∑ k, eLpNorm (fun x => ‖fderiv ℝ u x (gridBasis V k)‖) p volume := eLpNorm_sum_le hp + _ = _ := Finset.sum_congr rfl fun k _ => + eLpNorm_norm _ (hc.clm_apply continuous_const).aestronglyMeasurable + +/-! ### Functions with compact support -/ + +/-- **The Gagliardo–Nirenberg–Sobolev inequality for a mollification**: let `n ≥ 1`, `1 ≤ p`, +`1/p' = 1/p - 1/n`, `K` smooth with compact support, and `h` with compact support and weak +derivatives `g_k` along the orthonormal basis `e` of `Rd.gridBasis`. Then +`‖K ⋆ h‖_{p'} ≤ C_{V,p} ‖K‖_1 ∑_k ‖g_k‖_p`: Mathlib's inequality for the smooth function `K ⋆ h` +with compact support, `D_{e_k}(K ⋆ h) = K ⋆ g_k` (`Rd.fderiv_conv_apply_eq_conv`) and Young's +inequality (`Rd.eLpNorm_conv_le`). -/ +theorem eLpNorm_conv_le_of_hasWeakLineDeriv {p p' : ℝ≥0} (hp : 1 ≤ p) (hn : 0 < finrank ℝ V) + (hp' : (p' : ℝ)⁻¹ = p⁻¹ - (finrank ℝ V : ℝ)⁻¹) {K : V → ℂ} + (hK : ContDiff ℝ ((⊤ : ℕ∞) : WithTop ℕ∞) K) (hKs : HasCompactSupport K) {h : V → ℂ} + (hc : HasCompactSupport h) {g : Fin (finrank ℝ V) → V → ℂ} + (hhg : ∀ k, HasWeakLineDeriv ⊤ (fun _ : Fin 1 => gridBasis V k) h (g k)) : + eLpNorm (conv K h volume) p' volume ≤ + eLpNormLESNormFDerivOfEqInnerConst (volume : Measure V) p * + (eLpNorm K 1 volume * ∑ k, eLpNorm (g k) p volume) := by + have hu := contDiff_conv hK hKs (hhg ⟨0, hn⟩).locallyIntegrable + have hu1 : ContDiff ℝ 1 (conv K h volume) := hu.of_le (by exact_mod_cast le_top) + have hus : HasCompactSupport (conv K h volume) := + hKs.convolution (L := ContinuousLinearMap.mul ℂ ℂ) (μ := volume) hc + have hp1 : (1 : ℝ≥0∞) ≤ p := ENNReal.one_le_coe_iff.2 hp + refine (eLpNorm_le_eLpNorm_fderiv_of_eq_inner volume hu1 hus hp hn hp').trans ?_ + gcongr + refine (eLpNorm_fderiv_le_sum hu1 hp1).trans ?_ + rw [Finset.mul_sum] + refine Finset.sum_le_sum fun k _ => ?_ + have he : (fun x => fderiv ℝ (conv K h volume) x (gridBasis V k)) = conv K (g k) volume := + funext fun x => fderiv_conv_apply_eq_conv hK hKs (hhg k) x + rw [he] + exact eLpNorm_conv_le hp1 ENNReal.coe_ne_top hK.continuous.aestronglyMeasurable + (hhg k).locallyIntegrable_deriv.aestronglyMeasurable + +/-- **The Gagliardo–Nirenberg–Sobolev inequality with compact support**: let `n ≥ 1`, `1 ≤ p`, +`1/p' = 1/p - 1/n`, and let `h` have compact support and weak derivatives `g_k` along the +orthonormal basis `e` of `Rd.gridBasis`. Then `‖h‖_{p'} ≤ C_{V,p} ∑_k ‖g_k‖_p` with Mathlib's +constant `C_{V,p} = MeasureTheory.eLpNormLESNormFDerivOfEqInnerConst volume p`. The mollified +`η_c ⋆ h`, `η = Rd.LocalMeansBump.std`, satisfy the bound +(`Rd.eLpNorm_conv_le_of_hasWeakLineDeriv`, `Rd.LocalMeansBump.eLpNorm_std_one`); they converge to +the integrable `h` in `L_1` (`Rd.tendsto_eLpNorm_conv_dilate_sub`), hence in measure, and +Mathlib's `MeasureTheory.eLpNorm_le_of_tendstoInMeasure` passes the bound to `h`. -/ +theorem eLpNorm_le_of_hasCompactSupport_of_hasWeakLineDeriv {p p' : ℝ≥0} (hp : 1 ≤ p) + (hn : 0 < finrank ℝ V) (hp' : (p' : ℝ)⁻¹ = p⁻¹ - (finrank ℝ V : ℝ)⁻¹) {h : V → ℂ} + (hc : HasCompactSupport h) {g : Fin (finrank ℝ V) → V → ℂ} + (hhg : ∀ k, HasWeakLineDeriv ⊤ (fun _ : Fin 1 => gridBasis V k) h (g k)) : + eLpNorm h p' volume ≤ + eLpNormLESNormFDerivOfEqInnerConst (volume : Measure V) p * ∑ k, eLpNorm (g k) p volume := by + have hloc := (hhg ⟨0, hn⟩).locallyIntegrable + have hint : Integrable h volume := hloc.integrable_of_hasCompactSupport hc + have hlim : Tendsto (fun i : ℕ => eLpNorm (conv (dilate ((i : ℝ) + 1) + (LocalMeansBump.std (V := V)).toFun) h volume - h) 1 volume) atTop (𝓝 0) := + (tendsto_eLpNorm_conv_dilate_sub ENNReal.one_ne_top LocalMeansBump.std.integrable + LocalMeansBump.std.integral_eq_one (memLp_one_iff_integrable.2 hint)).comp + (tendsto_atTop_add_const_right _ 1 tendsto_natCast_atTop_atTop) + refine eLpNorm_le_of_tendstoInMeasure (Eventually.of_forall fun i => ?_) + (tendstoInMeasure_of_tendsto_eLpNorm one_ne_zero hlim) fun i => ?_ + · have hci : (0 : ℝ) < (i : ℝ) + 1 := by positivity + have hbound := eLpNorm_conv_le_of_hasWeakLineDeriv hp hn hp' + (contDiff_dilate LocalMeansBump.std.contDiff _) + (hasCompactSupport_dilate LocalMeansBump.std.hasCompactSupport hci.ne') hc hhg + rwa [eLpNorm_dilate_one LocalMeansBump.std.integrable hci, LocalMeansBump.eLpNorm_std_one, + one_mul] at hbound + · exact (contDiff_conv (contDiff_dilate LocalMeansBump.std.contDiff _) + (hasCompactSupport_dilate LocalMeansBump.std.hasCompactSupport (by positivity)) + hloc).continuous.aestronglyMeasurable + +/-! ### The cut-off -/ + +/-- The smooth bump around `0` with radii `1` and `2`, the bump of the cut-off `Rd.cutoff 1 2`. -/ +noncomputable def cutoffBump : ContDiffBump (0 : V) := ⟨1, 2, one_pos, one_lt_two⟩ + +/-- The **real cut-off** `χ_R(x) = b(x/R)` with the smooth bump `b = Rd.cutoffBump`, written +`b(R⁻¹ x)`: smooth, with values in `[0, 1]`, equal to `1` on `B̄(0, R)` for `R > 0`. -/ +noncomputable def realCutoff (R : ℝ) (x : V) : ℝ := + cutoffBump (V := V) (R⁻¹ • x) + +omit [MeasurableSpace V] [BorelSpace V] in +/-- As a complex function, the real cut-off is the rescaled cut-off of the Littlewood–Paley +kernels: `χ_R(x) = Rd.cutoff 1 2 (R⁻¹ x)`. -/ +theorem ofReal_realCutoff (R : ℝ) (x : V) : + (realCutoff R x : ℂ) = cutoff 1 2 one_pos one_lt_two (R⁻¹ • x) := + rfl + +omit [MeasurableSpace V] [BorelSpace V] in +/-- The cut-off `χ_R` is smooth. -/ +theorem contDiff_realCutoff (R : ℝ) : + ContDiff ℝ ((⊤ : ℕ∞) : WithTop ℕ∞) (realCutoff (V := V) R) := + (cutoffBump (V := V)).contDiff.comp (contDiff_const_smul R⁻¹) + +omit [MeasurableSpace V] [BorelSpace V] in +/-- The cut-off `χ_R` has compact support for `R ≠ 0`. -/ +theorem hasCompactSupport_realCutoff {R : ℝ} (hR : R ≠ 0) : + HasCompactSupport (realCutoff (V := V) R) := + (cutoffBump (V := V)).hasCompactSupport.comp_homeomorph + (Homeomorph.smulOfNeZero R⁻¹ (inv_ne_zero hR)) + +omit [MeasurableSpace V] [BorelSpace V] in +/-- The cut-off `χ_R` is `1` on `B̄(0, R)`, `R > 0`. -/ +theorem realCutoff_eq_one {R : ℝ} (hR : 0 < R) {x : V} (hx : ‖x‖ ≤ R) : realCutoff R x = 1 := by + refine (cutoffBump (V := V)).one_of_mem_closedBall ?_ + rw [Metric.mem_closedBall, dist_zero_right, norm_smul, Real.norm_of_nonneg (inv_nonneg.2 hR.le)] + change R⁻¹ * ‖x‖ ≤ 1 + rw [inv_mul_le_iff₀ hR, mul_one] + exact hx + +omit [MeasurableSpace V] [BorelSpace V] in +/-- The cut-off `χ_R` takes values in `[0, 1]`: `|χ_R(x)| ≤ 1`. -/ +theorem abs_realCutoff_le_one (R : ℝ) (x : V) : |realCutoff R x| ≤ 1 := by + unfold realCutoff + rw [abs_of_nonneg (cutoffBump (V := V)).nonneg] + exact (cutoffBump (V := V)).le_one + +omit [MeasurableSpace V] [BorelSpace V] in +/-- **The derivative of the bump**: `|Db(y) w| ≤ sup ‖Db‖ ‖w‖`, with `sup ‖Db‖` the Schwartz +seminorm `p_{0,1}` of the cut-off `Rd.cutoffSchwartz 1 2`, whose real part is `b`. -/ +theorem abs_fderiv_cutoffBump_le (y w : V) : + |fderiv ℝ (cutoffBump (V := V)) y w| ≤ + SchwartzMap.seminorm ℝ 0 1 (cutoffSchwartz (V := V) 1 2 one_pos one_lt_two) * ‖w‖ := by + have hc : HasFDerivAt (cutoff (V := V) 1 2 one_pos one_lt_two) + (Complex.ofRealCLM.comp (fderiv ℝ (cutoffBump (V := V)) y)) y := + Complex.ofRealCLM.hasFDerivAt.comp y + (((cutoffBump (V := V)).contDiff.differentiable (n := 1) one_ne_zero) y).hasFDerivAt + calc |fderiv ℝ (cutoffBump (V := V)) y w| + = ‖fderiv ℝ (cutoff (V := V) 1 2 one_pos one_lt_two) y w‖ := by + rw [hc.fderiv, ContinuousLinearMap.comp_apply, Complex.ofRealCLM_apply, Complex.norm_real, + Real.norm_eq_abs] + _ ≤ ‖fderiv ℝ (cutoff (V := V) 1 2 one_pos one_lt_two) y‖ * ‖w‖ := + ContinuousLinearMap.le_opNorm _ _ + _ ≤ _ := by + gcongr + rw [← norm_iteratedFDeriv_one (𝕜 := ℝ)] + exact SchwartzMap.norm_iteratedFDeriv_le_seminorm ℝ + (cutoffSchwartz (V := V) 1 2 one_pos one_lt_two) 1 y + +omit [MeasurableSpace V] [BorelSpace V] in +/-- **The derivative of the cut-off**: for `R > 0` and all `x`, `v`, +`|Dχ_R(x) v| ≤ sup ‖Db‖ R⁻¹ ‖v‖`, with `sup ‖Db‖` the Schwartz seminorm `p_{0,1}` of +`Rd.cutoffSchwartz 1 2`, since `Dχ_R(x) v = Db(x/R)(v/R)` (`Rd.abs_fderiv_cutoffBump_le`). -/ +theorem abs_fderiv_realCutoff_le {R : ℝ} (hR : 0 < R) (x v : V) : + |fderiv ℝ (realCutoff R) x v| ≤ + SchwartzMap.seminorm ℝ 0 1 (cutoffSchwartz (V := V) 1 2 one_pos one_lt_two) * R⁻¹ * ‖v‖ := by + have hd : HasFDerivAt (realCutoff (V := V) R) + ((fderiv ℝ (cutoffBump (V := V)) (R⁻¹ • x)).comp (R⁻¹ • ContinuousLinearMap.id ℝ V)) x := + (((cutoffBump (V := V)).contDiff.differentiable (n := 1) one_ne_zero) _).hasFDerivAt.comp x + ((hasFDerivAt_id x).const_smul R⁻¹) + rw [hd.fderiv, ContinuousLinearMap.comp_apply, smul_apply, + ContinuousLinearMap.id_apply] + refine (abs_fderiv_cutoffBump_le _ _).trans_eq ?_ + rw [norm_smul, Real.norm_of_nonneg (inv_nonneg.2 hR.le), mul_assoc] + +/-- **The weak derivatives of `χ_R f`**: if `|Dχ_R(x) v| ≤ M R⁻¹ ‖v‖` for all `x`, `v`, then +`‖χ_R g + (D_{e_k} χ_R) f‖_p ≤ ‖g‖_p + M R⁻¹ ‖f‖_p` for `1 ≤ p`, since `|χ_R| ≤ 1` and +`‖e_k‖ = 1`; for `g = ∂_{e_k} f` the left side is the weak derivative of `χ_R f` +(`Rd.HasWeakLineDeriv.mul_contDiff`). -/ +theorem eLpNorm_realCutoff_mul_deriv_le {p : ℝ≥0∞} (hp : 1 ≤ p) {M R : ℝ} + (hM : ∀ x v : V, |fderiv ℝ (realCutoff R) x v| ≤ M * R⁻¹ * ‖v‖) {f g : V → ℂ} + (hf : AEStronglyMeasurable f volume) (hg : AEStronglyMeasurable g volume) + (k : Fin (finrank ℝ V)) : + eLpNorm (fun x => (realCutoff R x : ℂ) * g x + + (fderiv ℝ (realCutoff R) x (gridBasis V k) : ℂ) * f x) p volume ≤ + eLpNorm g p volume + ENNReal.ofReal (M * R⁻¹) * eLpNorm f p volume := by + have hχ := contDiff_realCutoff (V := V) R + have h1 : AEStronglyMeasurable (fun x => (realCutoff R x : ℂ) * g x) volume := + (Complex.continuous_ofReal.comp hχ.continuous).aestronglyMeasurable.mul hg + have h2 : AEStronglyMeasurable + (fun x => (fderiv ℝ (realCutoff R) x (gridBasis V k) : ℂ) * f x) volume := + (Complex.continuous_ofReal.comp ((hχ.continuous_fderiv (by simp)).clm_apply + continuous_const)).aestronglyMeasurable.mul hf + refine (eLpNorm_add_le (f := fun x => (realCutoff R x : ℂ) * g x) + (g := fun x => (fderiv ℝ (realCutoff R) x (gridBasis V k) : ℂ) * f x) hp).trans + (add_le_add ?_ ?_) + · refine eLpNorm_mono h1 fun x => ?_ + rw [norm_mul, Complex.norm_real, Real.norm_eq_abs] + exact mul_le_of_le_one_left (norm_nonneg _) (abs_realCutoff_le_one R x) + · refine eLpNorm_le_mul_eLpNorm_of_ae_le_mul h2 (ae_of_all _ fun x => ?_) p + rw [norm_mul, Complex.norm_real, Real.norm_eq_abs] + refine mul_le_mul_of_nonneg_right ((hM x _).trans_eq ?_) (norm_nonneg _) + rw [(gridBasis V).orthonormal.1 k, mul_one] + +/-! ### The homogeneous Sobolev inequality -/ + +/-- **The Gagliardo–Nirenberg–Sobolev inequality on `W^1_p`** (Gagliardo 1958 and Nirenberg 1959, +independently, for `p = 1`; `1 < p < n` follows by applying it to `|u|^γ`): let `n ≥ 1`, `1 ≤ p`, +`1/p' = 1/p - 1/n`, and let `f ∈ L_p(V)` have weak derivatives `g_k` along the orthonormal +basis `e` of `Rd.gridBasis`. Then `‖f‖_{p'} ≤ C_{V,p} ∑_k ‖g_k‖_p` with Mathlib's constant +`C_{V,p} = MeasureTheory.eLpNormLESNormFDerivOfEqInnerConst volume p`. The cut-offs +`χ_R f`, `R = i + 1`, have compact support and weak derivatives `χ_R g_k + (D_{e_k} χ_R) f` +(`Rd.HasWeakLineDeriv.mul_contDiff`) with `L_p` norms at most `‖g_k‖_p + M R⁻¹ ‖f‖_p`, where +`M = sup ‖Db‖` (`Rd.abs_fderiv_realCutoff_le`, `Rd.eLpNorm_realCutoff_mul_deriv_le`); the case of +compact support (`Rd.eLpNorm_le_of_hasCompactSupport_of_hasWeakLineDeriv`) and Fatou's lemma +(`MeasureTheory.eLpNorm_le_of_ae_tendsto_of_tendsto`) along `χ_R f → f` give the bound. -/ +theorem eLpNorm_le_of_hasWeakLineDeriv {p p' : ℝ≥0} (hp : 1 ≤ p) (hn : 0 < finrank ℝ V) + (hp' : (p' : ℝ)⁻¹ = p⁻¹ - (finrank ℝ V : ℝ)⁻¹) {f : V → ℂ} (hf : MemLp f p volume) + {g : Fin (finrank ℝ V) → V → ℂ} + (hfg : ∀ k, HasWeakLineDeriv ⊤ (fun _ : Fin 1 => gridBasis V k) f (g k)) : + eLpNorm f p' volume ≤ + eLpNormLESNormFDerivOfEqInnerConst (volume : Measure V) p * ∑ k, eLpNorm (g k) p volume := by + have hp1 : (1 : ℝ≥0∞) ≤ p := ENNReal.one_le_coe_iff.2 hp + have h0 : Tendsto (fun i : ℕ => ENNReal.ofReal + (SchwartzMap.seminorm ℝ 0 1 (cutoffSchwartz (V := V) 1 2 one_pos one_lt_two) * + ((i : ℝ) + 1)⁻¹)) atTop (𝓝 0) := by + rw [← ENNReal.ofReal_zero] + refine ENNReal.tendsto_ofReal ?_ + simpa [one_div] using tendsto_one_div_add_atTop_nhds_zero_nat.const_mul + (SchwartzMap.seminorm ℝ 0 1 (cutoffSchwartz (V := V) 1 2 one_pos one_lt_two)) + have hk : ∀ k, Tendsto (fun i : ℕ => eLpNorm (g k) p volume + ENNReal.ofReal + (SchwartzMap.seminorm ℝ 0 1 (cutoffSchwartz (V := V) 1 2 one_pos one_lt_two) * + ((i : ℝ) + 1)⁻¹) * eLpNorm f p volume) atTop (𝓝 (eLpNorm (g k) p volume)) := fun k => by + have h := tendsto_const_nhds (x := eLpNorm (g k) p volume).add + (ENNReal.Tendsto.mul_const h0 (Or.inr hf.eLpNorm_ne_top)) + rwa [zero_mul, add_zero] at h + refine eLpNorm_le_of_ae_tendsto_of_tendsto + (u := fun i x => (realCutoff ((i : ℝ) + 1) x : ℂ) * f x) (fun i => ?_) + (ae_of_all _ fun x => ?_) (ENNReal.Tendsto.const_mul (tendsto_finsetSum _ fun k _ => hk k) + (Or.inr ENNReal.coe_ne_top)) fun i => ?_ + · exact (Complex.continuous_ofReal.comp + (contDiff_realCutoff _).continuous).aestronglyMeasurable.mul hf.aestronglyMeasurable + · refine tendsto_const_nhds.congr' ?_ + filter_upwards [eventually_ge_atTop ⌈‖x‖⌉₊] with i hi + have hx : ‖x‖ ≤ (i : ℝ) + 1 := by + have h1 := Nat.le_ceil ‖x‖ + have h2 : (⌈‖x‖⌉₊ : ℝ) ≤ i := by exact_mod_cast hi + linarith + rw [realCutoff_eq_one (by positivity) hx, Complex.ofReal_one, one_mul] + · have hR : (0 : ℝ) < (i : ℝ) + 1 := by positivity + have hcs : HasCompactSupport fun x => (realCutoff ((i : ℝ) + 1) x : ℂ) * f x := + hasCompactSupport_cutoff_smul_mul i f + refine (eLpNorm_le_of_hasCompactSupport_of_hasWeakLineDeriv hp hn hp' hcs + fun k => (hfg k).mul_contDiff (contDiff_realCutoff _)).trans ?_ + gcongr with k + exact eLpNorm_realCutoff_mul_deriv_le hp1 (abs_fderiv_realCutoff_le hR) + hf.aestronglyMeasurable (hfg k).locallyIntegrable_deriv.aestronglyMeasurable k + +/-! ### The Sobolev embedding of `W^1_p` -/ + +/-- **`W^1_p ↪ L_r` with Mathlib's constant** (Gagliardo 1958 and Nirenberg 1959, independently, +for `p = 1`; `1 < p < n` follows by applying it to `|u|^γ`): let `1 ≤ p`, `r < ∞` and +`n(1/p - 1/r) = 1`, so that `p < ∞` and `1/r = 1/p - 1/n` +(`toReal_inv_eq_of_nikolskiiExponent_eq_one`), and let `f ∈ L_p(V)` have weak derivatives +`g_k ∈ L_p(V)` along the orthonormal basis `e` of `Rd.gridBasis`. Then there is `u ∈ L_r(V)` +with `u = f` almost everywhere and `‖u‖_r ≤ C_{V,p} ∑_k ‖g_k‖_p`, +`C_{V,p} = MeasureTheory.eLpNormLESNormFDerivOfEqInnerConst volume p` +(`Rd.eLpNorm_le_of_hasWeakLineDeriv`). The order of the derivatives is `1`. -/ +theorem exists_memLp_ae_eq_of_hasWeakLineDeriv_one {p r : ℝ≥0∞} [Fact (1 ≤ p)] + (hr : r ≠ ∞) (hs : nikolskiiExponent (finrank ℝ V) p r = 1) + {f : Lp ℂ p (volume : Measure V)} {g : Fin (finrank ℝ V) → Lp ℂ p (volume : Measure V)} + (hfg : ∀ k, HasWeakLineDeriv ⊤ (fun _ : Fin 1 => gridBasis V k) f (g k)) : + ∃ u : Lp ℂ r (volume : Measure V), (u : V → ℂ) =ᵐ[volume] f ∧ + ‖u‖ₑ ≤ eLpNormLESNormFDerivOfEqInnerConst (volume : Measure V) p.toReal * ∑ k, ‖g k‖ₑ := by + obtain ⟨hn, hp, hinv⟩ := toReal_inv_eq_of_nikolskiiExponent_eq_one (Nat.cast_nonneg _) hs + have hp1 : (1 : ℝ≥0) ≤ p.toNNReal := by + have h := ENNReal.toNNReal_mono hp (Fact.out : 1 ≤ p) + rwa [ENNReal.toNNReal_one] at h + have hbound := eLpNorm_le_of_hasWeakLineDeriv (p' := r.toNNReal) hp1 (Nat.cast_pos.1 hn) hinv + (by rw [ENNReal.coe_toNNReal hp]; exact Lp.memLp f) hfg + rw [ENNReal.coe_toNNReal hp, ENNReal.coe_toNNReal hr, ENNReal.coe_toNNReal_eq_toReal] at hbound + simp only [← Lp.eNorm_def] at hbound + have hmem : MemLp (f : V → ℂ) r volume := memLp_iff.2 (hbound.trans_lt + (ENNReal.mul_lt_top ENNReal.coe_lt_top (ENNReal.sum_lt_top.2 fun k _ => eNorm_lt_top))) + exact ⟨hmem.toLp f, hmem.coeFn_toLp, by rw [Lp.eNorm_toLp]; exact hbound⟩ + +/-- **`W^1_p ↪ L_r` for `1/r = 1/p - 1/n`** (Gagliardo 1958 and Nirenberg 1959, independently, +for `p = 1`; `1 < p < n` follows by applying it to `|u|^γ`): for `1 ≤ p`, `r < ∞` and +`n(1/p - 1/r) = 1`, every `f ∈ W^1_p(V)`, of order `1`, has weak derivatives `G_k ∈ L_p(V)` +along the orthonormal basis `e` of `Rd.gridBasis` and a representative `u ∈ L_r(V)` with +`‖u‖_r ≤ C_{V,p} ∑_k ‖G_k‖_p` (`Rd.exists_memLp_ae_eq_of_hasWeakLineDeriv_one`). This includes +`p = 1`, where `W^1_1` is larger than `F^1_{1,2}`. -/ +theorem exists_memLp_ae_eq_of_memSobolev_one {p r : ℝ≥0∞} [Fact (1 ≤ p)] + (hr : r ≠ ∞) (hs : nikolskiiExponent (finrank ℝ V) p r = 1) + {f : Lp ℂ p (volume : Measure V)} (hf : MemSobolev 1 f) : + ∃ G : Fin (finrank ℝ V) → Lp ℂ p (volume : Measure V), + (∀ k, HasWeakLineDeriv ⊤ (fun _ : Fin 1 => gridBasis V k) f (G k)) ∧ + ∃ u : Lp ℂ r (volume : Measure V), (u : V → ℂ) =ᵐ[volume] f ∧ + ‖u‖ₑ ≤ eLpNormLESNormFDerivOfEqInnerConst (volume : Measure V) p.toReal * + ∑ k, ‖G k‖ₑ := by + choose G hG using fun k : Fin (finrank ℝ V) => + (memSobolev_iff_exists_hasWeakLineDeriv f).1 hf 1 le_rfl (fun _ => gridBasis V k) + exact ⟨G, hG, exists_memLp_ae_eq_of_hasWeakLineDeriv_one hr hs hG⟩ + +/-- **`W^1_p ↪ L_r` with the exponents `1/r + 1/n = 1/p`**, the form of TauCeti's +`W1p.eLpNorm_value_le_mul_enorm_gradient`: for `1 ≤ p`, `r < ∞` and `r⁻¹ + n⁻¹ = p⁻¹` in +`[0, ∞]`, every `f ∈ W^1_p(V)` has weak derivatives `G_k ∈ L_p(V)` along the orthonormal basis +of `Rd.gridBasis` and a representative `u ∈ L_r(V)` with `‖u‖_r ≤ C_{V,p} ∑_k ‖G_k‖_p` +(`nikolskiiExponent_eq_one_of_inv_add_inv`, `Rd.exists_memLp_ae_eq_of_memSobolev_one`). -/ +theorem exists_memLp_ae_eq_of_memSobolev_one_of_inv_add_inv {p r : ℝ≥0∞} [Fact (1 ≤ p)] + (hr : r ≠ ∞) (hexp : r⁻¹ + (finrank ℝ V : ℝ≥0∞)⁻¹ = p⁻¹) + {f : Lp ℂ p (volume : Measure V)} (hf : MemSobolev 1 f) : + ∃ G : Fin (finrank ℝ V) → Lp ℂ p (volume : Measure V), + (∀ k, HasWeakLineDeriv ⊤ (fun _ : Fin 1 => gridBasis V k) f (G k)) ∧ + ∃ u : Lp ℂ r (volume : Measure V), (u : V → ℂ) =ᵐ[volume] f ∧ + ‖u‖ₑ ≤ eLpNormLESNormFDerivOfEqInnerConst (volume : Measure V) p.toReal * + ∑ k, ‖G k‖ₑ := + exists_memLp_ae_eq_of_memSobolev_one hr (nikolskiiExponent_eq_one_of_inv_add_inv Fact.out hexp).2 + hf + +/-! ### The Sobolev embedding of `W^m_1` -/ + +/-- **The derivatives of order below `m` of `f ∈ W^m_1` lie in `L_q` for `n(1 - 1/q) = 1`**: +for `f ∈ L_1(V)` in `W^m_1(V)`, every weak derivative `∂^v f ∈ L_1(V)` of order `k < m` has the +weak derivatives `∂^{(e_j, v)} f ∈ L_1(V)` along the orthonormal basis `e` of `Rd.gridBasis` +(`Rd.HasWeakLineDeriv.of_cons`), so it has a representative in `L_q(V)` +(`Rd.exists_memLp_ae_eq_of_hasWeakLineDeriv_one` with `p = 1`). -/ +theorem exists_hasWeakLineDeriv_memLp_of_memSobolev_of_lt {m : ℕ} + {f : Lp ℂ 1 (volume : Measure V)} (hf : MemSobolev m f) {q : ℝ≥0∞} + (hq : q ≠ ∞) (hs : nikolskiiExponent (finrank ℝ V) 1 q = 1) {k : ℕ} (hk : k < m) + (v : Fin k → V) : ∃ u : Lp ℂ q (volume : Measure V), HasWeakLineDeriv ⊤ v f u := by + have hder := (memSobolev_iff_exists_hasWeakLineDeriv f).1 hf + obtain ⟨G, hG⟩ := hder k hk.le v + choose H hH using fun j : Fin (finrank ℝ V) => hder (k + 1) hk (Fin.cons (gridBasis V j) v) + obtain ⟨u, hu, -⟩ := exists_memLp_ae_eq_of_hasWeakLineDeriv_one hq hs + fun j => hG.of_cons (hH j) + refine ⟨u, hG.congr_ae EventuallyEq.rfl ?_⟩ + rw [volume_restrict_top] + exact hu.symm + +/-- **`W^m_1 ↪ L_r` for `1/r = 1 - m/n`**, the integrability exponent being `p = 1` (Gagliardo +1958 and Nirenberg 1959): let `m ≥ 1`, `r < ∞` and `n(1 - 1/r) = m`. Every `f ∈ W^m_1(V)` has a +representative in `L_r(V)`. For `m = 1` this is `Rd.exists_memLp_ae_eq_of_memSobolev_one`; for +`m ≥ 2` and `q = n/(n - 1)` (`nikolskiiExponent_conjExponent_of_eq`), the derivatives of `f` of +order below `m` lie in `L_q` (`Rd.exists_hasWeakLineDeriv_memLp_of_memSobolev_of_lt`), so `f` +has a representative in `W^{m-1}_q(V)`, and the critical Sobolev embedding for `1 < q < ∞` +(`Rd.exists_memLp_ae_eq_of_memSobolev_of_eq`) applies. -/ +theorem exists_memLp_ae_eq_of_memSobolev_one_of_eq {m : ℕ} (hm : 1 ≤ m) {r : ℝ≥0∞} + (hr : r ≠ ∞) (hs : nikolskiiExponent (finrank ℝ V) 1 r = m) + {f : Lp ℂ 1 (volume : Measure V)} (hf : MemSobolev m f) : + ∃ g : Lp ℂ r (volume : Measure V), (g : V → ℂ) =ᵐ[volume] f := by + rcases hm.eq_or_lt with rfl | hm2 + · obtain ⟨-, -, u, hu, -⟩ := + exists_memLp_ae_eq_of_memSobolev_one hr (by exact_mod_cast hs) hf + exact ⟨u, hu⟩ + obtain ⟨hq1, hq, hq1s, hqr⟩ := nikolskiiExponent_conjExponent_of_eq hm2 hs + generalize ENNReal.conjExponent (finrank ℝ V : ℝ≥0∞) = q at hq1 hq hq1s hqr + have : Fact (1 ≤ q) := ⟨hq1.le⟩ + have : Nontrivial V := Module.nontrivial_of_finrank_pos + (Nat.cast_pos.1 (toReal_inv_eq_of_nikolskiiExponent_eq_one (Nat.cast_nonneg _) hq1s).1) + obtain ⟨f', hf'⟩ := exists_hasWeakLineDeriv_memLp_of_memSobolev_of_lt hf hq hq1s + (by omega : 0 < m) Fin.elim0 + have hff' : (f' : V → ℂ) =ᵐ[volume] f := by + have h := hf'.unique (hasWeakLineDeriv_fin_zero _ hf'.1) + rwa [volume_restrict_top] at h + have hS : MemSobolev (m - 1) f' := (memSobolev_iff_exists_hasWeakLineDeriv f').2 fun k hk v => by + obtain ⟨u, hu⟩ := exists_hasWeakLineDeriv_memLp_of_memSobolev_of_lt hf hq hq1s + (by omega : k < m) v + refine ⟨u, hu.congr_ae ?_ EventuallyEq.rfl⟩ + rw [volume_restrict_top] + exact hff'.symm + obtain ⟨g, hg⟩ := exists_memLp_ae_eq_of_memSobolev_of_eq hq1 hq hr hqr hS + exact ⟨g, hg.trans hff'⟩ + +end Rd diff --git a/LeanPool/FunctionSpaces/Rd/Sobolev/RellichCompactness.lean b/LeanPool/FunctionSpaces/Rd/Sobolev/RellichCompactness.lean new file mode 100644 index 0000000000..e5b0040478 --- /dev/null +++ b/LeanPool/FunctionSpaces/Rd/Sobolev/RellichCompactness.lean @@ -0,0 +1,566 @@ +/- +Copyright (c) 2026 Mario Ullrich. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Mario Ullrich +-/ +module + +public import LeanPool.FunctionSpaces.Rd.Sobolev.SobolevTwoLittlewoodPaley +public import LeanPool.FunctionSpaces.Analysis.Lp.IndicatorOperator +public import Mathlib.Analysis.Fourier.LpSpace +public import Mathlib.Analysis.Normed.Operator.Compact.Basic +public import Mathlib.MeasureTheory.Integral.Bochner.Set +public import Mathlib.Topology.ContinuousMap.Bounded.ArzelaAscoli +public import Mathlib.Topology.MetricSpace.UniformConvergence + +/- +Modified for Lean Pool: module names and imports adapted. +-/ + +/-! +# Rellich compactness of `H^1(V)` in `L_2` of a bounded set + +Let `V` be a finite-dimensional real inner product space, such as `ℝ^d`, with Lebesgue measure, +and `Ω ⊆ V` bounded. **Rellich's theorem**: the map `F ↦ F|_Ω` from Mathlib's Sobolev space +`H^1(V) = H^{1,2}(V, ℂ)` to `L_2(Ω)` is a compact operator (`Rd.isCompactOperator_restr_toL2`). +Every bounded sequence in `H^1(V)` has a subsequence whose restrictions to `Ω` converge in +`L_2(Ω)` (`Rd.exists_subseq_tendsto_restr`), and so has every sequence `f_n ∈ L_2(V)` with weak +gradients and `‖f_n‖_2² + ∑_i ‖∂_{e_i} f_n‖_2² ≤ M²` +(`Rd.exists_subseq_tendsto_restr_of_hasWeakLineDeriv`). + +* **The inverse Fourier transform on `L_1 ∩ L_2`**: for every integrable `h ∈ L_2(V)` the `L_2` + inverse Fourier transform is the pointwise inverse Fourier integral + (`Rd.fourierInv_Lp_ae_eq_of_integrable`). +* **`H^1(V)` in `L_2(V)`**: an element `F` of `H^{1,2}(V, ℂ)` is the `L_2` function + `𝓕⁻(⟨ξ⟩⁻¹ 𝓕(J_1 F))` (`Rd.toL2`, `Rd.toTemperedDistribution_toL2`), which determines `F` + (`Rd.toL2_injective`), and `‖F‖_2 ≤ ‖F‖_{H^1}` (`Rd.norm_toL2_le`). +* **Fourier truncation**: cutting `𝓕F` off to the ball `|ξ| ≤ K` changes `F` by at most + `K⁻¹ ‖F‖_{H^1}` in `L_2(V)`, since `⟨ξ⟩⁻¹ ≤ K⁻¹` outside the ball + (`Rd.norm_toL2_sub_truncL2_le`), so the truncations converge in operator norm + (`Rd.tendsto_truncL2`). +* **Band-limited functions**: for `h ∈ L_2(V)` the cut-off `1_{B_K} h` to the ball + `B_K = {|ξ| ≤ K}` is integrable (`Rd.integrable_indicator_closedBall`), and its inverse Fourier + integral is bounded by `|B_K|^{1/2} ‖h‖_2` and Lipschitz with constant + `2π max(K, 0) |B_K|^{1/2} ‖h‖_2` on `V` (`Rd.norm_fourierInv_indicator_le`, + `Rd.lipschitzWith_fourierInv_indicator`). +* **Compactness of the truncations**: by the Arzelà–Ascoli theorem on the compact closure of `Ω` + (`Rd.totallyBounded_setOf_lipschitzWith`), the truncated operators restricted to `Ω` are + compact (`Rd.isCompactOperator_restr_truncL2`), and a limit of compact operators is compact + (Mathlib's `isCompactOperator_of_tendsto`). +-/ + +@[expose] public section + +open MeasureTheory Metric Filter Topology +open scoped ENNReal NNReal SchwartzMap FourierTransform Real BesselPotentialSpace + BoundedContinuousFunction +open TemperedDistribution (besselPotential) + +namespace Rd + +variable {V : Type*} [NormedAddCommGroup V] [InnerProductSpace ℝ V] [FiniteDimensional ℝ V] + [MeasurableSpace V] [BorelSpace V] + +/-! ### The inverse Fourier transform on `L_1 ∩ L_2` -/ + +/-- **The `L_2` inverse Fourier transform of an `L_1 ∩ L_2` function is the inverse Fourier +integral**: for `h ∈ L_2(V)` integrable, Plancherel's `𝓕⁻h` agrees almost everywhere with +`x ↦ ∫ e^(2πi⟪ξ, x⟫) h(ξ) dξ`. Both are locally integrable (the second is continuous) and have +the same integrals against smooth compactly supported functions `u`: +`∫ u · 𝓕⁻h = (𝓕⁻h)(u) = h(𝓕⁻u) = ∫ 𝓕⁻u · h`, by Mathlib's +`Lp.fourierInv_toTemperedDistribution_eq` and `Rd.integral_fourierInv_smul_eq_of_integrable`. -/ +theorem fourierInv_Lp_ae_eq_of_integrable (h : Lp ℂ 2 (volume : Measure V)) + (hh : Integrable (h : V → ℂ)) : + ((𝓕⁻ h : Lp ℂ 2 (volume : Measure V)) : V → ℂ) =ᵐ[volume] 𝓕⁻ (h : V → ℂ) := by + refine ae_eq_of_integral_contDiff_smul_eq ((Lp.memLp _).locallyIntegrable (by norm_num)) + (continuous_fourierInv_of_integrable hh).locallyIntegrable fun φ hφ hφc => ?_ + have hφ₁ : HasCompactSupport (Complex.ofRealCLM ∘ φ) := hφc.comp_left rfl + have hφ₂ : ContDiff ℝ ((⊤ : ℕ∞) : WithTop ℕ∞) (Complex.ofRealCLM ∘ φ) := by fun_prop + have key : ((𝓕⁻ h : Lp ℂ 2 (volume : Measure V)) : 𝓢'(V, ℂ)) (hφ₁.toSchwartzMap hφ₂) = + ∫ x, hφ₁.toSchwartzMap hφ₂ x • 𝓕⁻ (h : V → ℂ) x := by + rw [← Lp.fourierInv_toTemperedDistribution_eq, TemperedDistribution.fourierInv_apply, + Lp.toTemperedDistribution_apply, integral_fourierInv_smul_eq_of_integrable _ hh] + rw [Lp.toTemperedDistribution_apply] at key + convert key using 2 with x x <;> simp [Complex.real_smul] + +/-! ### `H^1(V)` as a space of `L_2` functions -/ + +omit [InnerProductSpace ℝ V] [FiniteDimensional ℝ V] [MeasurableSpace V] [BorelSpace V] in +/-- `⟨ξ⟩^{-1} = (⟨ξ⟩^1)⁻¹`: the Bessel weight of order `-1` is the reciprocal of the one of +order `1`. -/ +theorem besselWeight_neg_one_eq_inv (ξ : V) : besselWeight (-1) ξ = (besselWeight 1 ξ)⁻¹ := by + rw [besselWeight, besselWeight, neg_div, Real.rpow_neg (by positivity)] + +omit [InnerProductSpace ℝ V] [FiniteDimensional ℝ V] [MeasurableSpace V] [BorelSpace V] in +/-- `⟨ξ⟩⁻¹ ≤ 1`. -/ +theorem besselWeight_neg_one_le_one (ξ : V) : besselWeight (-1) ξ ≤ 1 := + Real.rpow_le_one_of_one_le_of_nonpos (le_add_of_nonneg_right (sq_nonneg _)) (by norm_num) + +omit [InnerProductSpace ℝ V] [FiniteDimensional ℝ V] [MeasurableSpace V] [BorelSpace V] in +/-- `⟨ξ⟩⁻¹ ≤ K⁻¹` for `|ξ| ≥ K > 0`, since `|ξ| ≤ ⟨ξ⟩`. -/ +theorem besselWeight_neg_one_le_inv {K : ℝ} (hK : 0 < K) {ξ : V} (hξ : K ≤ ‖ξ‖) : + besselWeight (-1) ξ ≤ K⁻¹ := by + rw [besselWeight_neg_one_eq_inv] + exact inv_anti₀ hK (hξ.trans (norm_le_besselWeight_one ξ)) + +omit [InnerProductSpace ℝ V] [FiniteDimensional ℝ V] [MeasurableSpace V] [BorelSpace V] in +/-- `|⟨ξ⟩⁻¹| ≤ 1` for the Bessel weight of order `-1` as a complex number. -/ +theorem norm_besselWeight_neg_one_le_one (ξ : V) : ‖(besselWeight (-1) ξ : ℂ)‖ ≤ 1 := by + rw [Complex.norm_real, Real.norm_of_nonneg (besselWeight_nonneg _ _)] + exact besselWeight_neg_one_le_one ξ + +/-- The Bessel weight `⟨ξ⟩⁻¹` of order `-1` is a bounded function, an element of `L_∞(V)`. -/ +theorem memLp_top_besselWeight_neg_one : + MemLp (fun ξ : V => (besselWeight (-1) ξ : ℂ)) ∞ volume := + memLp_top_of_bound (hasTemperateGrowth_besselWeight (-1)).1.continuous.aestronglyMeasurable 1 + (ae_of_all _ norm_besselWeight_neg_one_le_one) + +/-- **Multiplication by `⟨ξ⟩⁻¹` on `L_2(V)`**, as a bounded operator (Mathlib's Hölder +multiplication `L_∞ × L_2 → L_2`); its norm is at most `1` (`Rd.norm_besselInvMul_le_one`). -/ +noncomputable def besselInvMul : Lp ℂ 2 (volume : Measure V) →L[ℂ] Lp ℂ 2 (volume : Measure V) := + (ContinuousLinearMap.mul ℂ ℂ).holderL volume ∞ 2 2 (memLp_top_besselWeight_neg_one.toLp _) + +/-- Multiplication by `⟨ξ⟩⁻¹` is pointwise multiplication, almost everywhere. -/ +theorem besselInvMul_apply_ae (g : Lp ℂ 2 (volume : Measure V)) : + (besselInvMul g : V → ℂ) =ᵐ[volume] fun ξ => (besselWeight (-1) ξ : ℂ) * g ξ := by + filter_upwards [ContinuousLinearMap.coeFn_holder (r := 2) (ContinuousLinearMap.mul ℂ ℂ) + (memLp_top_besselWeight_neg_one.toLp _) g, memLp_top_besselWeight_neg_one.coeFn_toLp] + with x h1 h2 + rw [besselInvMul, ContinuousLinearMap.holderL_apply_apply, h1, ContinuousLinearMap.mul_apply', + h2] + +/-- Multiplication by `⟨ξ⟩⁻¹` has operator norm at most `1` on `L_2(V)`, since `|⟨ξ⟩⁻¹| ≤ 1` +(Mathlib's `Lp.norm_le_norm_of_ae_le`). -/ +theorem norm_besselInvMul_le_one : + ‖(besselInvMul : Lp ℂ 2 (volume : Measure V) →L[ℂ] Lp ℂ 2 (volume : Measure V))‖ ≤ 1 := + ContinuousLinearMap.opNorm_le_bound _ zero_le_one fun g => by + rw [one_mul] + refine Lp.norm_le_norm_of_ae_le ?_ + filter_upwards [besselInvMul_apply_ae g] with ξ hξ + rw [hξ, norm_mul] + exact mul_le_of_le_one_left (norm_nonneg _) (norm_besselWeight_neg_one_le_one ξ) + +/-- **An element of `H^1(V)` as an `L_2` function**: for `F ∈ H^{1,2}(V, ℂ)`, given by the +tempered distribution `u = F.toDistr` and the `L_2` function `J_1 u = F.toLp`, the `L_2` +function `𝓕⁻(⟨ξ⟩⁻¹ 𝓕(J_1 u))`, which is `u` (`Rd.toTemperedDistribution_toL2`). -/ +noncomputable def toL2 : H^{1, 2}(V, ℂ) →L[ℂ] Lp ℂ 2 (volume : Measure V) := + FourierTransform.fourierInvCLM ℂ (Lp ℂ 2 (volume : Measure V)) ∘L besselInvMul ∘L + FourierTransform.fourierCLM ℂ (Lp ℂ 2 (volume : Measure V)) ∘L + (BesselPotentialSpace.toLpₗᵢ V ℂ 1 2).toLinearIsometry.toContinuousLinearMap + +/-- `toL2 F = 𝓕⁻(⟨ξ⟩⁻¹ 𝓕(J_1 F))`. -/ +theorem toL2_apply (F : H^{1, 2}(V, ℂ)) : toL2 F = 𝓕⁻ (besselInvMul (𝓕 F.toLp)) := by + simp only [toL2, ContinuousLinearMap.coe_comp, Function.comp_apply, + LinearIsometry.coe_toContinuousLinearMap, LinearIsometryEquiv.coe_toLinearIsometry, + BesselPotentialSpace.toLpₗᵢ_apply, FourierTransform.fourierCLM_apply, + FourierTransform.fourierInvCLM_apply] + +/-- The Fourier transform of `toL2 F` is `⟨ξ⟩⁻¹ 𝓕(J_1 F)`. -/ +theorem fourier_toL2 (F : H^{1, 2}(V, ℂ)) : 𝓕 (toL2 F) = besselInvMul (𝓕 F.toLp) := by + rw [toL2_apply, FourierTransform.fourier_fourierInv_eq] + +/-- The Fourier transform of `toL2 F` is `⟨ξ⟩⁻¹ 𝓕(J_1 F)` almost everywhere. -/ +theorem fourier_toL2_ae_eq (F : H^{1, 2}(V, ℂ)) : + ((𝓕 (toL2 F) : Lp ℂ 2 (volume : Measure V)) : V → ℂ) =ᵐ[volume] + fun ξ => (besselWeight (-1) ξ : ℂ) * (𝓕 F.toLp : Lp ℂ 2 (volume : Measure V)) ξ := by + rw [fourier_toL2] + exact besselInvMul_apply_ae _ + +/-- **`toL2 F` represents `F`**: the tempered distribution of the `L_2` function `toL2 F` is the +distribution `F.toDistr`. Indeed `F.toDistr = J_{-1}(J_1 F)` (Mathlib's +`BesselPotentialSpace.besselPotential_neg_toLp_eq`), and the Fourier transform of `J_{-1} g` is +`⟨ξ⟩⁻¹ 𝓕g`, which for `g ∈ L_2` is the distribution of the `L_2` function `⟨ξ⟩⁻¹ 𝓕g` +(`Rd.smulLeftCLM_toTemperedDistribution_eq`). -/ +theorem toTemperedDistribution_toL2 (F : H^{1, 2}(V, ℂ)) : + ((toL2 F : Lp ℂ 2 (volume : Measure V)) : 𝓢'(V, ℂ)) = F.toDistr := by + have hm : MemLp (fun ξ => (besselWeight (-1) ξ : ℂ) * + (𝓕 F.toLp : Lp ℂ 2 (volume : Measure V)) ξ) 2 volume := + (Lp.memLp (besselInvMul (𝓕 F.toLp))).ae_eq (besselInvMul_apply_ae _) + have h1 : besselInvMul (𝓕 F.toLp) = hm.toLp _ := + Lp.ext ((besselInvMul_apply_ae _).trans hm.coeFn_toLp.symm) + conv_rhs => rw [← BesselPotentialSpace.besselPotential_neg_toLp_eq (f := F), + ← FourierTransform.fourierInv_fourier_eq (F := 𝓢'(V, ℂ)) (besselPotential V ℂ (-1) _), + TemperedDistribution.fourier_besselPotential_eq_smulLeftCLM_fourier_apply, + Lp.fourier_toTemperedDistribution_eq] + rw [toL2_apply, ← Lp.fourierInv_toTemperedDistribution_eq, h1, + ← smulLeftCLM_toTemperedDistribution_eq (hasTemperateGrowth_besselWeight (-1))] + rfl + +/-- An `L_2` function `f` is `toL2 F` as soon as its tempered distribution is `F.toDistr`: +`L_2` functions are determined by their distributions (`Rd.eq_of_toTemperedDistribution_eq`). +-/ +theorem toL2_eq_of_toDistr_eq (F : H^{1, 2}(V, ℂ)) {f : Lp ℂ 2 (volume : Measure V)} + (hf : (f : 𝓢'(V, ℂ)) = F.toDistr) : toL2 F = f := + eq_of_toTemperedDistribution_eq ((toTemperedDistribution_toL2 F).trans hf.symm) + +/-- **`H^1(V)` is determined by its `L_2` functions**: `F ↦ toL2 F` is injective, since the +tempered distribution of `toL2 F` is `F.toDistr` (`Rd.toTemperedDistribution_toL2`) and an element +of `H^1(V)` is determined by its distribution (Mathlib's `BesselPotentialSpace.ext`). -/ +theorem toL2_injective : Function.Injective (toL2 (V := V)) := + fun U W h => BesselPotentialSpace.ext (by + rw [← toTemperedDistribution_toL2, h, toTemperedDistribution_toL2]) + +/-- **`‖F‖_2 ≤ ‖F‖_{H^1}`**: by Plancherel, `‖toL2 F‖_2 = ‖⟨ξ⟩⁻¹ 𝓕(J_1 F)‖_2 ≤ ‖𝓕(J_1 F)‖_2` +(`Rd.norm_besselInvMul_le_one`), and `‖𝓕(J_1 F)‖_2 = ‖F‖_{H^1}` (Mathlib's +`BesselPotentialSpace.norm_fourier_toLp_eq`). -/ +theorem norm_toL2_le (F : H^{1, 2}(V, ℂ)) : ‖toL2 F‖ ≤ ‖F‖ := by + rw [← Lp.norm_fourier_eq (toL2 F), fourier_toL2, ← BesselPotentialSpace.norm_fourier_toLp_eq] + exact (besselInvMul.le_of_opNorm_le norm_besselInvMul_le_one _).trans_eq (one_mul _) + +/-! ### Truncation in frequency -/ + +/-- **The frequency truncation**: `truncL2 K F = 𝓕⁻(1_{B_K} 𝓕(toL2 F))`, the part of `F` with +frequencies in the closed ball `B_K = {|ξ| ≤ K}`, where `1_{B_K}` acts by the project's +`Rd.indicatorLp`. -/ +noncomputable def truncL2 (K : ℝ) : H^{1, 2}(V, ℂ) →L[ℂ] Lp ℂ 2 (volume : Measure V) := + FourierTransform.fourierInvCLM ℂ (Lp ℂ 2 (volume : Measure V)) ∘L + indicatorLp (measurableSet_closedBall (x := (0 : V)) (ε := K)) ∘L + FourierTransform.fourierCLM ℂ (Lp ℂ 2 (volume : Measure V)) ∘L toL2 + +/-- `truncL2 K F = 𝓕⁻(1_{B_K} 𝓕(toL2 F))`. -/ +theorem truncL2_apply (K : ℝ) (F : H^{1, 2}(V, ℂ)) : + truncL2 K F = 𝓕⁻ (indicatorLp (measurableSet_closedBall (x := (0 : V)) (ε := K)) + (𝓕 (toL2 F))) := rfl + +/-- **The truncation error**: for `K > 0` and `F ∈ H^1(V)`, +`‖toL2 F - truncL2 K F‖_2 ≤ K⁻¹ ‖F‖_{H^1}`. By Plancherel the left side is the `L_2` norm of +`1_{|ξ| > K} ⟨ξ⟩⁻¹ 𝓕(J_1 F)`, and `⟨ξ⟩⁻¹ ≤ K⁻¹` for `|ξ| > K`. -/ +theorem norm_toL2_sub_truncL2_apply_le {K : ℝ} (hK : 0 < K) (F : H^{1, 2}(V, ℂ)) : + ‖toL2 F - truncL2 K F‖ ≤ K⁻¹ * ‖F‖ := by + have hB := measurableSet_closedBall (x := (0 : V)) (ε := K) + have hsub : 𝓕 (toL2 F - truncL2 K F) = 𝓕 (toL2 F) - 𝓕 (truncL2 K F) := + map_sub (FourierTransform.fourierCLM ℂ (Lp ℂ 2 (volume : Measure V))) _ _ + rw [← Lp.norm_fourier_eq, hsub, truncL2_apply, FourierTransform.fourier_fourierInv_eq, + ← BesselPotentialSpace.norm_fourier_toLp_eq] + refine Lp.norm_le_mul_norm_of_ae_le_mul ?_ + filter_upwards [Lp.coeFn_sub (𝓕 (toL2 F)) (indicatorLp hB (𝓕 (toL2 F))), + indicatorLp_apply_ae hB (𝓕 (toL2 F)), fourier_toL2_ae_eq F] with ξ h1 h2 h3 + rw [h1, Pi.sub_apply, h2] + by_cases hξ : ξ ∈ closedBall (0 : V) K + · rw [Set.indicator_of_mem hξ, sub_self, norm_zero] + positivity + · rw [Set.indicator_of_notMem hξ, sub_zero, h3, norm_mul] + refine mul_le_mul_of_nonneg_right ?_ (norm_nonneg _) + rw [Complex.norm_real, Real.norm_of_nonneg (besselWeight_nonneg _ _)] + rw [mem_closedBall, dist_zero_right, not_le] at hξ + exact besselWeight_neg_one_le_inv hK hξ.le + +/-- **The truncations approximate in operator norm**: `‖toL2 - truncL2 K‖ ≤ K⁻¹` for `K > 0`. -/ +theorem norm_toL2_sub_truncL2_le {K : ℝ} (hK : 0 < K) : + ‖(toL2 : H^{1, 2}(V, ℂ) →L[ℂ] Lp ℂ 2 (volume : Measure V)) - truncL2 K‖ ≤ K⁻¹ := + ContinuousLinearMap.opNorm_le_bound _ (inv_nonneg.2 hK.le) fun F => + norm_toL2_sub_truncL2_apply_le hK F + +/-- **The truncations converge to `toL2`** in operator norm as `K → ∞`. -/ +theorem tendsto_truncL2 : + Tendsto (fun K : ℝ => (truncL2 K : H^{1, 2}(V, ℂ) →L[ℂ] Lp ℂ 2 (volume : Measure V))) atTop + (𝓝 toL2) := by + rw [tendsto_iff_norm_sub_tendsto_zero] + refine squeeze_zero' (Eventually.of_forall fun K => norm_nonneg _) ?_ tendsto_inv_atTop_zero + filter_upwards [eventually_gt_atTop 0] with K hK + rw [norm_sub_rev] + exact norm_toL2_sub_truncL2_le hK + +/-! ### Band-limited functions are bounded and Lipschitz -/ + +variable (V) in +/-- The constant `|B_K|^{1/2}`, the square root of the volume of the closed ball +`B_K = {|ξ| ≤ K}` in `V`: by Cauchy–Schwarz, `∫_{B_K} |h| ≤ |B_K|^{1/2} ‖h‖_2`. -/ +noncomputable def ballVolumeSqrt (K : ℝ) : ℝ := + (volume (closedBall (0 : V) K)).toReal ^ (1 / 2 : ℝ) + +/-- `|B_K|^{1/2} ≥ 0`. -/ +theorem ballVolumeSqrt_nonneg (K : ℝ) : 0 ≤ ballVolumeSqrt V K := + Real.rpow_nonneg ENNReal.toReal_nonneg _ + +/-- **Cauchy–Schwarz on a ball**: for `h ∈ L_2(V)`, `∫_{B_K} |h| ≤ |B_K|^{1/2} ‖h‖_2`, in +`ℝ≥0∞` (Mathlib's `eLpNorm_le_eLpNorm_mul_rpow_measure_univ` on the ball). -/ +theorem eLpNorm_one_indicator_closedBall_le (h : Lp ℂ 2 (volume : Measure V)) (K : ℝ) : + eLpNorm ((closedBall (0 : V) K).indicator h) 1 volume ≤ + volume (closedBall (0 : V) K) ^ (1 / 2 : ℝ) * ‖h‖ₑ := by + rw [eLpNorm_indicator_eq_eLpNorm_restrict + (measurableSet_closedBall : MeasurableSet (closedBall (0 : V) K)).nullMeasurableSet] + refine (eLpNorm_le_eLpNorm_mul_rpow_measure_univ (q := 2) (by norm_num) + (Lp.aestronglyMeasurable h).restrict).trans ?_ + rw [Measure.restrict_apply_univ, mul_comm, Lp.eNorm_def] + norm_num + gcongr + exact Measure.restrict_le_self + +/-- A function `h ∈ L_2(V)` cut off to a ball is integrable. -/ +theorem integrable_indicator_closedBall (h : Lp ℂ 2 (volume : Measure V)) (K : ℝ) : + Integrable ((closedBall (0 : V) K).indicator h) := by + refine memLp_one_iff_integrable.1 (memLp_iff.2 ?_) + refine (eLpNorm_one_indicator_closedBall_le h K).trans_lt (ENNReal.mul_lt_top ?_ eNorm_lt_top) + exact ENNReal.rpow_lt_top_of_nonneg (by norm_num) measure_closedBall_lt_top.ne + +/-- **Cauchy–Schwarz on a ball**, in `ℝ`: `∫ |1_{B_K} h| ≤ |B_K|^{1/2} ‖h‖_2` for `h ∈ L_2(V)`. -/ +theorem integral_norm_indicator_closedBall_le (h : Lp ℂ 2 (volume : Measure V)) (K : ℝ) : + ∫ ξ, ‖(closedBall (0 : V) K).indicator h ξ‖ ≤ ballVolumeSqrt V K * ‖h‖ := by + have hfin : volume (closedBall (0 : V) K) ^ (1 / 2 : ℝ) * ‖h‖ₑ ≠ ∞ := + ENNReal.mul_ne_top (ENNReal.rpow_ne_top_of_nonneg (by norm_num) + measure_closedBall_lt_top.ne) eNorm_ne_top + have hm : AEStronglyMeasurable ((closedBall (0 : V) K).indicator (h : V → ℂ)) volume := + (Lp.aestronglyMeasurable h).indicator measurableSet_closedBall + rw [integral_norm_eq_lintegral_eNorm hm, ← eLpNorm_one_eq_lintegral_eNorm hm] + refine (ENNReal.toReal_mono hfin (eLpNorm_one_indicator_closedBall_le h K)).trans_eq ?_ + rw [ENNReal.toReal_mul, ← ENNReal.toReal_rpow, toReal_eNorm, ballVolumeSqrt] + +/-- **Band-limited functions are bounded**: for `h ∈ L_2(V)` and every `x`, +`|𝓕⁻(1_{B_K} h)(x)| ≤ |B_K|^{1/2} ‖h‖_2`. -/ +theorem norm_fourierInv_indicator_le (h : Lp ℂ 2 (volume : Measure V)) (K : ℝ) (x : V) : + ‖𝓕⁻ ((closedBall (0 : V) K).indicator h) x‖ ≤ ballVolumeSqrt V K * ‖h‖ := + (norm_fourierInv_le_integral_norm _ x).trans (integral_norm_indicator_closedBall_le h K) + +/-- **Band-limited functions are Lipschitz**, with explicit constant: for `h ∈ L_2(V)`, the +function `𝓕⁻(1_{B_K} h)` is Lipschitz on `V` with constant `2π max(K, 0) |B_K|^{1/2} ‖h‖_2` +(`Rd.norm_fourierInv_sub_le` and Cauchy–Schwarz on the ball). -/ +theorem lipschitzWith_fourierInv_indicator (h : Lp ℂ 2 (volume : Measure V)) (K : ℝ) : + LipschitzWith (2 * π * max K 0 * ballVolumeSqrt V K * ‖h‖).toNNReal + (𝓕⁻ ((closedBall (0 : V) K).indicator h)) := by + have hC := ballVolumeSqrt_nonneg (V := V) K + have hsupp : ∀ ξ : V, max K 0 < ‖ξ‖ → (closedBall (0 : V) K).indicator h ξ = 0 := + fun ξ hξ => Set.indicator_of_notMem (by + rw [mem_closedBall, dist_zero_right, not_le] + exact (le_max_left K 0).trans_lt hξ) _ + refine LipschitzWith.of_dist_le_mul fun x y => ?_ + rw [dist_eq_norm, dist_eq_norm, Real.coe_toNNReal _ (by positivity)] + calc _ ≤ 2 * π * max K 0 * ‖x - y‖ * ∫ ξ, ‖(closedBall (0 : V) K).indicator h ξ‖ := + norm_fourierInv_sub_le (integrable_indicator_closedBall h K) (Eventually.of_forall hsupp) + x y + _ ≤ 2 * π * max K 0 * ‖x - y‖ * (ballVolumeSqrt V K * ‖h‖) := by + gcongr + exact integral_norm_indicator_closedBall_le h K + _ = _ := by ring + +/-! ### Arzelà–Ascoli and the restriction to a bounded set -/ + +/-- **Arzelà–Ascoli for Lipschitz functions**: on a compact metric space `X`, the bounded +continuous functions with `|g| ≤ C` that are Lipschitz with constant `L` form a totally bounded +set in the uniform norm (Mathlib's `BoundedContinuousFunction.arzela_ascoli`: the family is +equicontinuous and takes values in the compact disc of radius `C`). -/ +theorem totallyBounded_setOf_lipschitzWith {X : Type*} [PseudoMetricSpace X] [CompactSpace X] + (C : ℝ) (L : ℝ≥0) : + TotallyBounded {g : X →ᵇ ℂ | (∀ x, ‖g x‖ ≤ C) ∧ LipschitzWith L g} := + (BoundedContinuousFunction.arzela_ascoli (closedBall (0 : ℂ) C) (isCompact_closedBall 0 C) + {g : X →ᵇ ℂ | (∀ x, ‖g x‖ ≤ C) ∧ LipschitzWith L g} + (fun _ x hg => mem_closedBall_zero_iff.2 (hg.1 x)) + (LipschitzWith.uniformEquicontinuous _ L fun g => g.2.2).equicontinuous).totallyBounded.subset + subset_closure + +variable {Ω : Set V} + +open scoped Classical in +/-- A bounded continuous function `g` on the closure of `Ω ⊆ V`, extended by `0` to all of +`V`. -/ +noncomputable def extendClosure (Ω : Set V) (g : closure Ω →ᵇ ℂ) : V → ℂ := + fun x => if hx : x ∈ closure Ω then g ⟨x, hx⟩ else 0 + +omit [InnerProductSpace ℝ V] [FiniteDimensional ℝ V] [MeasurableSpace V] [BorelSpace V] in +/-- On the closure of `Ω` the extension by `0` is `g`. -/ +theorem extendClosure_of_mem (g : closure Ω →ᵇ ℂ) {x : V} (hx : x ∈ closure Ω) : + extendClosure Ω g x = g ⟨x, hx⟩ := by + simp [extendClosure, hx] + +omit [InnerProductSpace ℝ V] [FiniteDimensional ℝ V] in +/-- The extension by `0` is measurable: `g` is continuous on the closed set `closure Ω`. -/ +theorem measurable_extendClosure (g : closure Ω →ᵇ ℂ) : Measurable (extendClosure Ω g) := by + classical + exact Measurable.dite g.continuous.measurable measurable_const isClosed_closure.measurableSet + +omit [InnerProductSpace ℝ V] [FiniteDimensional ℝ V] [MeasurableSpace V] [BorelSpace V] in +/-- The extension by `0` is bounded by the uniform norm of `g`. -/ +theorem norm_extendClosure_le (g : closure Ω →ᵇ ℂ) (x : V) : ‖extendClosure Ω g x‖ ≤ ‖g‖ := by + by_cases hx : x ∈ closure Ω + · rw [extendClosure_of_mem g hx] + exact g.norm_coe_le_norm _ + · simp only [extendClosure, hx, dite_false, norm_zero] + exact norm_nonneg g + +omit [InnerProductSpace ℝ V] [FiniteDimensional ℝ V] [MeasurableSpace V] [BorelSpace V] in +/-- The extensions by `0` of `g` and `g'` differ by at most the uniform distance of `g` and +`g'`. -/ +theorem norm_extendClosure_sub_le (g g' : closure Ω →ᵇ ℂ) (x : V) : + ‖extendClosure Ω g x - extendClosure Ω g' x‖ ≤ dist g g' := by + by_cases hx : x ∈ closure Ω + · rw [extendClosure_of_mem g hx, extendClosure_of_mem g' hx, ← dist_eq_norm] + exact g.dist_coe_le_dist _ + · simp only [extendClosure, hx, dite_false, sub_zero, norm_zero] + exact dist_nonneg + +/-- On a bounded set `Ω`, the extension by `0` lies in `L_2(Ω)`: it is measurable and bounded, +and `Ω` has finite volume. -/ +theorem memLp_extendClosure (hΩ : Bornology.IsBounded Ω) (g : closure Ω →ᵇ ℂ) : + MemLp (extendClosure Ω g) 2 (volume.restrict Ω) := by + have : IsFiniteMeasure (volume.restrict Ω) := + isFiniteMeasure_restrict.2 hΩ.measure_lt_top.ne + exact MemLp.of_bound (measurable_extendClosure g).aestronglyMeasurable ‖g‖ + (ae_of_all _ (norm_extendClosure_le g)) + +/-- **Bounded continuous functions on `closure Ω` as elements of `L_2(Ω)`**, for bounded `Ω`. -/ +noncomputable def closureToLp (hΩ : Bornology.IsBounded Ω) (g : closure Ω →ᵇ ℂ) : + Lp ℂ 2 (volume.restrict Ω) := + (memLp_extendClosure hΩ g).toLp _ + +/-- `‖g - g'‖_{L_2(Ω)} ≤ |Ω|^{1/2} ‖g - g'‖_∞` (Mathlib's `Lp.norm_le_of_ae_bound`). -/ +theorem dist_closureToLp_le (hΩ : Bornology.IsBounded Ω) (g g' : closure Ω →ᵇ ℂ) : + dist (closureToLp hΩ g) (closureToLp hΩ g') ≤ + (volume Ω).toReal ^ (1 / 2 : ℝ) * dist g g' := by + have : IsFiniteMeasure (volume.restrict Ω) := + isFiniteMeasure_restrict.2 hΩ.measure_lt_top.ne + have hae : ∀ᵐ x ∂(volume.restrict Ω), + ‖(closureToLp hΩ g - closureToLp hΩ g' : Lp ℂ 2 (volume.restrict Ω)) x‖ ≤ dist g g' := by + filter_upwards [Lp.coeFn_sub (closureToLp hΩ g) (closureToLp hΩ g'), + (memLp_extendClosure hΩ g).coeFn_toLp, (memLp_extendClosure hΩ g').coeFn_toLp] + with x h0 h1 h2 + rw [h0, Pi.sub_apply, closureToLp, closureToLp, h1, h2] + exact norm_extendClosure_sub_le g g' x + rw [dist_eq_norm] + refine (Lp.norm_le_of_ae_bound dist_nonneg hae).trans_eq ?_ + rw [measureUnivNNReal, Measure.restrict_apply_univ, ENNReal.coe_toNNReal_eq_toReal] + norm_num + +/-- The map `g ↦ g` from bounded continuous functions on `closure Ω` to `L_2(Ω)` is Lipschitz +with constant `|Ω|^{1/2}`. -/ +theorem lipschitzWith_closureToLp (hΩ : Bornology.IsBounded Ω) : + LipschitzWith ((volume Ω).toReal ^ (1 / 2 : ℝ)).toNNReal (closureToLp hΩ) := + LipschitzWith.of_dist_le_mul fun g g' => by + rw [Real.coe_toNNReal _ (Real.rpow_nonneg ENNReal.toReal_nonneg _)] + exact dist_closureToLp_le hΩ g g' + +/-! ### Rellich's theorem -/ + +/-- **The truncation as an inverse Fourier integral**: `truncL2 K F` agrees almost everywhere with +the pointwise inverse Fourier integral `x ↦ ∫ e^(2πi⟪ξ, x⟫) 1_{B_K}(ξ) 𝓕(toL2 F)(ξ) dξ`, since +`1_{B_K} 𝓕(toL2 F)` is integrable (`Rd.integrable_indicator_closedBall`, +`Rd.fourierInv_Lp_ae_eq_of_integrable`). -/ +theorem truncL2_ae_eq_fourierInv_indicator (K : ℝ) (F : H^{1, 2}(V, ℂ)) : + (truncL2 K F : V → ℂ) =ᵐ[volume] + 𝓕⁻ ((closedBall (0 : V) K).indicator (𝓕 (toL2 F) : Lp ℂ 2 (volume : Measure V))) := by + rw [truncL2_apply] + refine (fourierInv_Lp_ae_eq_of_integrable _ ((integrable_indicator_closedBall _ K).congr + (indicatorLp_apply_ae _ _).symm)).trans (Eventually.of_forall fun x => ?_) + exact Real.fourierInv_congr_ae (indicatorLp_apply_ae _ _) x + +/-- **The truncations restricted to `Ω` are band-limited functions**: for `‖F‖_{H^1} ≤ 1`, the +restriction of `truncL2 K F` to a bounded set `Ω` is (the class of) a bounded continuous function +on `closure Ω` with `|g| ≤ |B_K|^{1/2}` that is Lipschitz with constant +`2π max(K, 0) |B_K|^{1/2}`: the function `𝓕⁻(1_{B_K} 𝓕(toL2 F))` +(`Rd.truncL2_ae_eq_fourierInv_indicator`, `Rd.norm_fourierInv_indicator_le`, +`Rd.lipschitzWith_fourierInv_indicator`), since `‖𝓕(toL2 F)‖_2 ≤ ‖F‖_{H^1} ≤ 1`. -/ +theorem restr_truncL2_mem_closureToLp_image (hΩ : Bornology.IsBounded Ω) (K : ℝ) + {F : H^{1, 2}(V, ℂ)} (hF : ‖F‖ ≤ 1) : + LpToLpRestrictCLM V ℂ ℂ volume 2 Ω (truncL2 K F) ∈ closureToLp hΩ '' + {g | (∀ x, ‖g x‖ ≤ ballVolumeSqrt V K) ∧ + LipschitzWith (2 * π * max K 0 * ballVolumeSqrt V K).toNNReal g} := by + have : CompactSpace (closure Ω) := isCompact_iff_compactSpace.1 hΩ.isCompact_closure + have hy : ‖(𝓕 (toL2 F) : Lp ℂ 2 (volume : Measure V))‖ ≤ 1 := by + rw [Lp.norm_fourier_eq] + exact (norm_toL2_le F).trans hF + have hC := ballVolumeSqrt_nonneg (V := V) K + have hGL := lipschitzWith_fourierInv_indicator (𝓕 (toL2 F)) K + have hle : (2 * π * max K 0 * ballVolumeSqrt V K * + ‖(𝓕 (toL2 F) : Lp ℂ 2 (volume : Measure V))‖).toNNReal ≤ + (2 * π * max K 0 * ballVolumeSqrt V K).toNNReal := + Real.toNNReal_le_toNNReal (mul_le_of_le_one_right (by positivity) hy) + let g : closure Ω →ᵇ ℂ := BoundedContinuousFunction.mkOfCompact + ⟨fun x => 𝓕⁻ ((closedBall (0 : V) K).indicator + (𝓕 (toL2 F) : Lp ℂ 2 (volume : Measure V))) x, + hGL.continuous.comp continuous_subtype_val⟩ + refine ⟨g, ⟨fun x => ?_, LipschitzWith.of_dist_le_mul fun a b => ?_⟩, ?_⟩ + · exact (norm_fourierInv_indicator_le _ K x.1).trans (mul_le_of_le_one_right hC hy) + · exact (hGL.weaken hle).dist_le_mul a b + · refine Lp.ext ?_ + have h4 : ∀ᵐ x ∂(volume.restrict Ω), x ∈ closure Ω := + (ae_restrict_mem isClosed_closure.measurableSet).filter_mono + (ae_mono (Measure.restrict_mono subset_closure le_rfl)) + filter_upwards [(memLp_extendClosure hΩ g).coeFn_toLp, + LpToLpRestrictCLM_coeFn ℂ Ω (truncL2 K F), + ae_restrict_of_ae (truncL2_ae_eq_fourierInv_indicator K F), h4] with x e1 e2 e3 e4 + rw [closureToLp, e1, e2, e3, extendClosure_of_mem g e4] + rfl + +/-- **The truncated operators are compact on bounded sets**: for bounded `Ω ⊆ V` and every +`K`, `F ↦ (truncL2 K F)|_Ω` is a compact operator from `H^1(V)` to `L_2(Ω)`. The image of the +unit ball lies in the image, under the Lipschitz map `Rd.closureToLp`, of a set of uniformly +bounded and uniformly Lipschitz functions on the compact set `closure Ω` +(`Rd.restr_truncL2_mem_closureToLp_image`), which is totally bounded by Arzelà–Ascoli +(`Rd.totallyBounded_setOf_lipschitzWith`). -/ +theorem isCompactOperator_restr_truncL2 (hΩ : Bornology.IsBounded Ω) (K : ℝ) : + IsCompactOperator (LpToLpRestrictCLM V ℂ ℂ volume 2 Ω ∘L truncL2 K) := by + have : CompactSpace (closure Ω) := isCompact_iff_compactSpace.1 hΩ.isCompact_closure + refine (isCompactOperator_iff_isCompact_closure_image_closedBall + ((LpToLpRestrictCLM V ℂ ℂ volume 2 Ω ∘L truncL2 K : H^{1, 2}(V, ℂ) →L[ℂ] _) : + H^{1, 2}(V, ℂ) →ₗ[ℂ] Lp ℂ 2 (volume.restrict Ω)) one_pos).2 ?_ + refine isCompact_iff_totallyBounded_isComplete.2 + ⟨TotallyBounded.closure ?_, isClosed_closure.isComplete⟩ + refine ((totallyBounded_setOf_lipschitzWith (ballVolumeSqrt V K) + (2 * π * max K 0 * ballVolumeSqrt V K).toNNReal).image + (lipschitzWith_closureToLp hΩ).uniformContinuous).subset ?_ + rintro _ ⟨F, hF, rfl⟩ + exact restr_truncL2_mem_closureToLp_image hΩ K (mem_closedBall_zero_iff.1 hF) + +/-- **Rellich's theorem**: for every bounded set `Ω ⊆ V`, the restriction +`F ↦ F|_Ω` from Mathlib's Sobolev space `H^1(V) = H^{1,2}(V, ℂ)` to `L_2(Ω)` is a compact +operator. It is the operator-norm limit of the compact operators `F ↦ (truncL2 K F)|_Ω` as +`K → ∞` (`Rd.tendsto_truncL2`, `Rd.isCompactOperator_restr_truncL2`, Mathlib's +`isCompactOperator_of_tendsto`). -/ +theorem isCompactOperator_restr_toL2 (hΩ : Bornology.IsBounded Ω) : + IsCompactOperator (LpToLpRestrictCLM V ℂ ℂ volume 2 Ω ∘L + (toL2 : H^{1, 2}(V, ℂ) →L[ℂ] Lp ℂ 2 (volume : Measure V))) := + isCompactOperator_of_tendsto + (((ContinuousLinearMap.compL ℂ H^{1, 2}(V, ℂ) (Lp ℂ 2 (volume : Measure V)) + (Lp ℂ 2 (volume.restrict Ω)) (LpToLpRestrictCLM V ℂ ℂ volume 2 Ω)).continuous.tendsto + _).comp tendsto_truncL2) + (Eventually.of_forall fun K => isCompactOperator_restr_truncL2 hΩ K) + +/-- **Rellich's theorem for sequences**: for bounded `Ω ⊆ V`, every sequence `F_n` in `H^1(V)` +with `‖F_n‖_{H^1} ≤ M` has a subsequence whose restrictions to `Ω` converge in `L_2(Ω)` +(Mathlib's `IsCompact.tendsto_subseq` on the compact closure of the image of the ball of radius +`M`). -/ +theorem exists_subseq_tendsto_restr (hΩ : Bornology.IsBounded Ω) {M : ℝ} + (F : ℕ → H^{1, 2}(V, ℂ)) (hF : ∀ n, ‖F n‖ ≤ M) : + ∃ φ : ℕ → ℕ, StrictMono φ ∧ ∃ u : Lp ℂ 2 (volume.restrict Ω), + Tendsto (fun k => LpToLpRestrictCLM V ℂ ℂ volume 2 Ω (toL2 (F (φ k)))) atTop (𝓝 u) := by + obtain ⟨u, -, φ, hφ, hu⟩ := (IsCompactOperator.isCompact_closure_image_closedBall + (f := ((LpToLpRestrictCLM V ℂ ℂ volume 2 Ω ∘L toL2 : H^{1, 2}(V, ℂ) →L[ℂ] _) : + H^{1, 2}(V, ℂ) →ₗ[ℂ] Lp ℂ 2 (volume.restrict Ω))) + (isCompactOperator_restr_toL2 hΩ) M).tendsto_subseq + (x := fun n => LpToLpRestrictCLM V ℂ ℂ volume 2 Ω (toL2 (F n))) + (fun n => subset_closure ⟨F n, mem_closedBall_zero_iff.2 (hF n), rfl⟩) + exact ⟨φ, hφ, u, hu⟩ + +/-! ### Rellich's theorem by weak gradients -/ + +/-- **Rellich's theorem by weak gradients**: let `Ω ⊆ V` be bounded and `(e_i)` an orthonormal +basis of `V`. Every sequence `f_n ∈ L_2(V)` with weak derivatives `g_{n,i} = ∂_{e_i} f_n` on `V` +in `L_2(V)` and `‖f_n‖_2² + ∑_i ‖g_{n,i}‖_2² ≤ M²` has a subsequence whose restrictions to `Ω` +converge in `L_2(Ω)`. Weak derivatives on `V` are derivatives of tempered distributions +(`Rd.hasWeakLineDeriv_top_iff`), so each `f_n` lies in `H^1(V)` +(`Rd.memSobolev_one_two_of_lineDerivOp_eq`) and is `toL2` of the element +`TemperedDistribution.MemSobolev.toBesselPotentialSpace` of `H^{1,2}(V, ℂ)`, of norm at most `|M|` +(`Rd.sq_norm_besselPotential_one_le`); `Rd.exists_subseq_tendsto_restr` applies. -/ +theorem exists_subseq_tendsto_restr_of_hasWeakLineDeriv (hΩ : Bornology.IsBounded Ω) + {ι : Type*} [Fintype ι] (b : OrthonormalBasis ι ℝ V) {f : ℕ → Lp ℂ 2 (volume : Measure V)} + {g : ℕ → ι → Lp ℂ 2 (volume : Measure V)} + (hg : ∀ n i, HasWeakLineDeriv ⊤ (fun _ : Fin 1 => b i) (f n) (g n i)) {M : ℝ} + (hM : ∀ n, ‖f n‖ ^ 2 + ∑ i, ‖g n i‖ ^ 2 ≤ M ^ 2) : + ∃ φ : ℕ → ℕ, StrictMono φ ∧ ∃ u : Lp ℂ 2 (volume.restrict Ω), + Tendsto (fun k => LpToLpRestrictCLM V ℂ ℂ volume 2 Ω (f (φ k))) atTop (𝓝 u) := by + have hS : ∀ n, TemperedDistribution.MemSobolev 1 2 (f n : 𝓢'(V, ℂ)) := fun n => + memSobolev_one_two_of_lineDerivOp_eq b fun i => hasWeakLineDeriv_top_iff.1 (hg n i) + let F : ℕ → H^{1, 2}(V, ℂ) := fun n => (hS n).toBesselPotentialSpace + have hF : ∀ n, toL2 (F n) = f n := fun n => + toL2_eq_of_toDistr_eq (F n) (hS n).toBesselPotentialSpace_toDistr.symm + have hJ : ∀ n, besselPotential V ℂ 1 (f n : 𝓢'(V, ℂ)) = ((F n).toLp : 𝓢'(V, ℂ)) := fun n => by + conv_lhs => rw [← (hS n).toBesselPotentialSpace_toDistr] + exact (F n).bessel_toDistr_eq_toLp + have hFM : ∀ n, ‖F n‖ ≤ |M| := fun n => by + rw [← BesselPotentialSpace.norm_toLp_eq] + refine (pow_le_pow_iff_left₀ (norm_nonneg _) (abs_nonneg M) two_ne_zero).1 ?_ + rw [sq_abs] + exact (sq_norm_besselPotential_one_le b (hg n) (hJ n)).trans (hM n) + obtain ⟨φ, hφ, u, hu⟩ := exists_subseq_tendsto_restr hΩ F hFM + exact ⟨φ, hφ, u, by simpa only [hF] using hu⟩ + +end Rd diff --git a/LeanPool/FunctionSpaces/Rd/Sobolev/SobolevEmbedding.lean b/LeanPool/FunctionSpaces/Rd/Sobolev/SobolevEmbedding.lean new file mode 100644 index 0000000000..158c13ddc8 --- /dev/null +++ b/LeanPool/FunctionSpaces/Rd/Sobolev/SobolevEmbedding.lean @@ -0,0 +1,504 @@ +/- +Copyright (c) 2026 Mario Ullrich. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Mario Ullrich +-/ +module + +public import LeanPool.FunctionSpaces.Rd.Sobolev.SobolevTriebelLizorkin +public import LeanPool.FunctionSpaces.MeasureSpaces.Besov.Nikolskii +public import LeanPool.FunctionSpaces.Analysis.Lp.Interpolation +public import Mathlib.MeasureTheory.Function.LpSpace.InfiniteSum +public import Mathlib.MeasureTheory.Function.ContinuousMapDense +public import Mathlib.Analysis.Normed.Group.FunctionSeries + +/- +Modified for Lean Pool: module names and imports adapted. +-/ + +/-! +# Sobolev and Besov embeddings on `V` + +Let `V` have dimension `n`, `1 ≤ p < ∞` and `α(n, p, r) = n (1/p - 1/r)` for `p ≤ r ≤ ∞` +(`nikolskiiExponent`). The embeddings come directly from the Littlewood–Paley blocks +`ψ_j ⋆ f` (`Rd.blockFun`). + +* **Convolutions with integrable bounded kernels are continuous** on `L_p` + (`Rd.continuous_conv_of_enorm_le`, for Schwartz kernels `Rd.continuous_conv_schwartz`): + uniform limits of convolutions with continuous functions of compact support. Hence every block + is continuous (`Rd.continuous_blockFun`). +* **The Nikolskii inequality for blocks** (`Rd.enorm_blockFun_le_nikolskii`, + `Rd.eLpNorm_blockFun_le_nikolskii`): the block is band-limited, `Θ_j ⋆ (ψ_j ⋆ f) = ψ_j ⋆ f`, + so `|(ψ_j ⋆ f)(x)| ≤ N_p 2^(jn/p) ‖ψ_j ⋆ f‖_p` at every point, and interpolation gives + `‖ψ_j ⋆ f‖_r ≤ N_p^(1-p/r) 2^(j α(n,p,r)) ‖ψ_j ⋆ f‖_p` (`Rd.nikolskiiBlockConst`). +* **Besov into `L_r`** (`Rd.exists_memLp_ae_eq_of_memApprox`): for `1 ≤ q ≤ ∞` and + `s > α(n, p, r)` every `f ∈ B^s_{p,q}` has a representative `g ∈ L_r` with + `‖g‖_r ≤ K ‖(2^(js) ‖ψ_j ⋆ f‖_p)_j‖_{ℓ_q}` (`Rd.besovEmbeddingConst`); the series of the blocks + converges absolutely in `L_r` and almost everywhere to `f` (`Rd.ae_hasSum_blockFun`). +* **Besov into bounded continuous functions** (`Rd.exists_boundedContinuous_ae_eq_of_memApprox`): + for `1 ≤ q ≤ ∞` and `s > n/p` the series of the blocks converges uniformly to a bounded + continuous representative `a` of `f` with `sup |a| ≤ K ‖(2^(js) ‖ψ_j ⋆ f‖_p)_j‖_{ℓ_q}`. +* **Sobolev embeddings** (`Rd.exists_memLp_ae_eq_of_hasWeakLineDeriv`, + `Rd.exists_boundedContinuous_ae_eq_of_hasWeakLineDeriv`, `Rd.exists_memLp_ae_eq_of_memSobolev`, + `Rd.exists_boundedContinuous_ae_eq_of_memSobolev`): for `n ≥ 1` and `1 < p < ∞`, the bound + `‖f‖_{F^m_{p,2}} ≤ ‖Φ‖_1 ‖f‖_p + 2^m ∑_α K_α ‖∂^α f‖_p` bounds the Littlewood–Paley quasi-norm + of `B^m_{p,max(p,2)}`, which gives `W^m_p ↪ L_r` for `m > n(1/p - 1/r)` and `W^m_p ↪ C_b` for + `m > n/p`, with named constants, formulas in norms and Schwartz seminorms of fixed kernels + that are proved finite. The critical case `1/r = 1/p - m/n` with `r < ∞` (Sobolev's + inequality) is in `FunctionSpaces.Rd.Sobolev.CriticalSobolevEmbedding` + (`Rd.exists_memLp_ae_eq_of_memSobolev_of_eq`), and for `p = 1` in + `FunctionSpaces.Rd.Sobolev.GagliardoNirenbergSobolev` + (`Rd.exists_memLp_ae_eq_of_memSobolev_one_of_eq`). +-/ + +@[expose] public section + +open MeasureTheory Filter Module +open scoped ENNReal Topology SchwartzMap BoundedContinuousFunction +open ENNReal (lqNorm dyadicWeight) + +namespace Rd + +variable {V : Type*} [NormedAddCommGroup V] [InnerProductSpace ℝ V] [FiniteDimensional ℝ V] + [MeasurableSpace V] [BorelSpace V] + +/-! ### Convolutions with integrable bounded kernels are continuous -/ + +/-- **The convolution integrand of an integrable bounded kernel and an `L_p` function is +integrable**: for `1 ≤ p ≤ ∞`, an integrable `K` with `|K| ≤ B < ∞`, `f ∈ L_p(V)` and every `x`, +`y ↦ K(y) f(x - y)` is integrable, by Hölder's inequality (Mathlib's `MemLp.integrable_mul`) with +`K ∈ L_{p'}`, since `K ∈ L_1 ∩ L_∞` (`MeasureTheory.MemLp.mono_exponent_of_enorm_le`). -/ +theorem integrable_mul_sub_of_enorm_le {p : ℝ≥0∞} (hp1 : 1 ≤ p) {K : V → ℂ} (hK : Integrable K) + {B : ℝ≥0∞} (hB : ∀ y, ‖K y‖ₑ ≤ B) (hBtop : B ≠ ∞) {f : V → ℂ} (hf : MemLp f p volume) + (x : V) : Integrable (fun y => K y * f (x - y)) volume := by + have : p.HolderConjugate p.conjExponent := ENNReal.HolderConjugate.conjExponent hp1 + have : p.conjExponent.HolderConjugate p := ENNReal.HolderConjugate.symm + have hfx : MemLp (fun y => f (x - y)) p volume := + hf.comp_measurePreserving (volume.measurePreserving_sub_left x) + have hK' : MemLp K p.conjExponent volume := + (memLp_one_iff_integrable.2 hK).mono_exponent_of_enorm_le (ae_of_all _ hB) hBtop one_ne_zero + (by rw [ENNReal.conjExponent]; exact le_self_add) + exact hK'.integrable_mul hfx + +/-- **Convolution with an integrable bounded kernel respects differences at every point** on +`L_p`: `(K ⋆ f)(x) - (K ⋆ g)(x) = (K ⋆ (f - g))(x)` for `1 ≤ p ≤ ∞`, an integrable `K` with +`|K| ≤ B < ∞` and `f, g ∈ L_p(V)`. -/ +theorem conv_sub_apply_of_enorm_le {p : ℝ≥0∞} (hp1 : 1 ≤ p) {K : V → ℂ} (hK : Integrable K) + {B : ℝ≥0∞} (hB : ∀ y, ‖K y‖ₑ ≤ B) (hBtop : B ≠ ∞) {f g : V → ℂ} + (hf : MemLp f p volume) (hg : MemLp g p volume) (x : V) : + conv K f volume x - conv K g volume x = conv K (f - g) volume x := by + rw [conv_apply, conv_apply, conv_apply, + ← integral_sub (integrable_mul_sub_of_enorm_le hp1 hK hB hBtop hf x) + (integrable_mul_sub_of_enorm_le hp1 hK hB hBtop hg x)] + congr 1 + funext y + simp [mul_sub] + +/-- **Convolutions of integrable bounded kernels with `L_p` functions are continuous**, for +`1 ≤ p < ∞`, an integrable `K` with `|K| ≤ B < ∞` and `f ∈ L_p(V)`. Continuous functions of +compact support `g_k` approximate `f` in `L_p` (Mathlib's +`MemLp.exists_hasCompactSupport_eLpNorm_sub_le`), each `K ⋆ g_k` is continuous (Mathlib's +`HasCompactSupport.continuous_convolution_right`), and the pointwise bound +`|(K ⋆ (f - g_k))(x)| ≤ ‖K‖_1^(1-1/p) B^(1/p) ‖f - g_k‖_p` (`Rd.enorm_conv_le_of_enorm_le`) makes +the convergence `K ⋆ g_k → K ⋆ f` uniform. -/ +theorem continuous_conv_of_enorm_le {p : ℝ≥0∞} (hp1 : 1 ≤ p) (hp : p ≠ ∞) {K : V → ℂ} + (hK : Integrable K) {B : ℝ≥0∞} (hB : ∀ y, ‖K y‖ₑ ≤ B) (hBtop : B ≠ ∞) {f : V → ℂ} + (hf : MemLp f p volume) : Continuous (conv K f volume) := by + have hC : eLpNorm K 1 volume ^ (1 - 1 / p.toReal) * B ^ (1 / p.toReal) ≠ ∞ := + ENNReal.mul_ne_top (ENNReal.rpow_ne_top_of_nonneg (one_sub_one_div_toReal_nonneg hp1) + (memLp_one_iff_integrable.2 hK).eLpNorm_ne_top) + (ENNReal.rpow_ne_top_of_nonneg (by positivity) hBtop) + choose g hgs hgle hgc hgm using fun k : ℕ => hf.exists_hasCompactSupport_eLpNorm_sub_le hp + (ENNReal.inv_ne_zero.2 (ENNReal.natCast_ne_top k)) + refine TendstoUniformly.continuous (F := fun k => conv K (g k) volume) (p := atTop) ?_ + (Frequently.of_forall fun k => by + exact (hgs k).continuous_convolution_right (ContinuousLinearMap.mul ℂ ℂ) + hK.locallyIntegrable (hgc k)) + rw [EMetric.tendstoUniformly_iff] + intro ε hε + have hlim : Tendsto (fun k : ℕ => eLpNorm K 1 volume ^ (1 - 1 / p.toReal) * + B ^ (1 / p.toReal) * (k : ℝ≥0∞)⁻¹) atTop (𝓝 0) := by + simpa using ENNReal.Tendsto.const_mul ENNReal.tendsto_inv_nat_nhds_zero (Or.inr hC) + filter_upwards [(tendsto_order.1 hlim).2 ε hε] with k hk x + rw [eDist_eq_eNorm_sub, conv_sub_apply_of_enorm_le hp1 hK hB hBtop hf (hgm k) x] + refine lt_of_le_of_lt ?_ hk + calc ‖conv K (f - g k) volume x‖ₑ + ≤ eLpNorm K 1 volume ^ (1 - 1 / p.toReal) * B ^ (1 / p.toReal) * + eLpNorm (f - g k) p volume := + enorm_conv_le_of_enorm_le hp1 hp hK.aestronglyMeasurable hB + (hf.aestronglyMeasurable.sub (hgm k).aestronglyMeasurable) x + _ ≤ _ := by gcongr; exact hgle k + +/-- **Convolutions of Schwartz functions with `L_p` functions are continuous**, for +`1 ≤ p < ∞`: a Schwartz function `G` is integrable and bounded by its decay constant +`Rd.schwartzDecayConst G 0 0` (`Rd.enorm_schwartz_le`), so `Rd.continuous_conv_of_enorm_le` +applies. -/ +theorem continuous_conv_schwartz {p : ℝ≥0∞} (hp1 : 1 ≤ p) (hp : p ≠ ∞) (G : 𝓢(V, ℂ)) + {f : V → ℂ} (hf : MemLp f p volume) : Continuous (conv G f volume) := + continuous_conv_of_enorm_le hp1 hp G.integrable (fun y => by simpa using enorm_schwartz_le G 0 y) + (schwartzDecayConst_ne_top G 0 0) hf + +/-- The Littlewood–Paley kernel `ψ_j` is the Schwartz function `(psiBase j)_{2^j}` +(`Rd.dilate_psiBase`). -/ +theorem coe_schwartzDilate_psiBase (j : ℕ) : + (schwartzDilate ((2 : ℝ) ^ j) (by positivity) (psiBase (V := V) j) : V → ℂ) = psi j := + (coe_schwartzDilate _ _ _).trans (dilate_psiBase j) + +/-- The band-limiting kernel `Θ_j` is the Schwartz function `Θ_{2^j}`. -/ +theorem coe_schwartzDilate_bandKernelS (j : ℕ) : + (schwartzDilate ((2 : ℝ) ^ j) (by positivity) (bandKernelS (V := V)) : V → ℂ) = Theta j := + coe_schwartzDilate _ _ _ + +variable {p : ℝ≥0∞} [Fact (1 ≤ p)] + +/-- **The blocks are continuous**: for `1 ≤ p < ∞` and `f ∈ L_p(V)`, `ψ_j ⋆ f` is continuous, +since `ψ_j` is a Schwartz function (`Rd.continuous_conv_schwartz`). -/ +theorem continuous_blockFun (hp : p ≠ ∞) (j : ℕ) (f : Lp ℂ p (volume : Measure V)) : + Continuous (blockFun j f) := by + rw [blockFun, ← coe_schwartzDilate_psiBase] + exact continuous_conv_schwartz Fact.out hp _ (Lp.memLp f) + +/-! ### The Nikolskii inequality for blocks -/ + +/-- The supremum `sup |Θ|` of the band-limiting kernel is finite (`Rd.bddAbove_bandKernel`). -/ +theorem iSup_enorm_bandKernel_lt_top : (⨆ y, ‖bandKernel (V := V) y‖ₑ) < ∞ := + iSup_enorm_lt_top_of_bddAbove bddAbove_bandKernel + +variable (V) in +/-- The **Nikolskii constant** `N_p = ‖Θ‖_1^(1-1/p) (sup |Θ|)^(1/p)` of the blocks, built from the +band-limiting kernel `Θ`. -/ +noncomputable def nikolskiiBlockConst (p : ℝ≥0∞) : ℝ≥0∞ := + eLpNorm (bandKernel (V := V)) 1 volume ^ (1 - 1 / p.toReal) * + (⨆ y, ‖bandKernel (V := V) y‖ₑ) ^ (1 / p.toReal) + +/-- The Nikolskii constant `N_p` is finite for `p ≥ 1`. -/ +theorem nikolskiiBlockConst_ne_top : nikolskiiBlockConst V p ≠ ∞ := + ENNReal.mul_ne_top (ENNReal.rpow_ne_top_of_nonneg (one_sub_one_div_toReal_nonneg Fact.out) + eLpNorm_bandKernel_ne_top) + (ENNReal.rpow_ne_top_of_nonneg (by positivity) iSup_enorm_bandKernel_lt_top.ne) + +/-- `|Θ_j(y)| ≤ 2^(jn) sup |Θ|` for every `y`, since `Θ_j(y) = 2^(jn) Θ(2^j y)`. -/ +theorem enorm_Theta_le (j : ℕ) (y : V) : + ‖Theta (V := V) j y‖ₑ ≤ 2 ^ (j * finrank ℝ V) * ⨆ z, ‖bandKernel (V := V) z‖ₑ := by + rw [Theta, enorm_dilate_two_pow] + gcongr + exact le_iSup (fun z => ‖bandKernel (V := V) z‖ₑ) _ + +/-- **The blocks are band-limited at every point**: `Θ_j ⋆ (ψ_j ⋆ f) = ψ_j ⋆ f` for +`1 ≤ p < ∞` and `f ∈ L_p(V)`. Almost everywhere this is associativity and `Θ_j ⋆ ψ_j = ψ_j` +(`Rd.conv_conv_ae`, `Rd.conv_Theta_psi`); both sides are continuous +(`Rd.continuous_conv_schwartz`), so they agree everywhere (Mathlib's +`Continuous.ae_eq_iff_eq`). -/ +theorem conv_Theta_blockFun (hp : p ≠ ∞) (j : ℕ) (f : Lp ℂ p (volume : Measure V)) : + conv (Theta j) (blockFun j f) volume = blockFun j f := by + have hae : conv (Theta j) (blockFun j f) volume =ᵐ[volume] blockFun j f := by + have h := conv_conv_ae Fact.out hp (integrable_Theta (V := V) j) (integrable_psi j) + (Lp.memLp f) + rw [conv_Theta_psi] at h + exact h.symm + refine (Continuous.ae_eq_iff_eq volume ?_ (continuous_blockFun hp j f)).1 hae + rw [← coe_schwartzDilate_bandKernelS] + exact continuous_conv_schwartz Fact.out hp _ (memLp_blockFun hp j f) + +/-- **The Nikolskii inequality for blocks at every point**: for `1 ≤ p < ∞`, `f ∈ L_p(V)` and +every `x`, `|(ψ_j ⋆ f)(x)| ≤ N_p 2^(jn/p) ‖ψ_j ⋆ f‖_p`. The block is `Θ_j ⋆ (ψ_j ⋆ f)` +(`Rd.conv_Theta_blockFun`), and the pointwise bound of convolutions with `‖Θ_j‖_1 = ‖Θ‖_1` and +`|Θ_j| ≤ 2^(jn) sup |Θ|` gives the factor `2^(jn/p)` (`ENNReal.two_pow_rpow_eq_dyadicWeight`). -/ +theorem enorm_blockFun_le_nikolskii (hp : p ≠ ∞) (j : ℕ) (f : Lp ℂ p (volume : Measure V)) + (x : V) : + ‖blockFun j f x‖ₑ ≤ nikolskiiBlockConst V p * + dyadicWeight (nikolskiiExponent (finrank ℝ V) p ∞) j * eLpNorm (blockFun j f) p volume := by + calc ‖blockFun j f x‖ₑ = ‖conv (Theta j) (blockFun j f) volume x‖ₑ := by + rw [conv_Theta_blockFun hp j f] + _ ≤ eLpNorm (Theta (V := V) j) 1 volume ^ (1 - 1 / p.toReal) * + (2 ^ (j * finrank ℝ V) * ⨆ z, ‖bandKernel (V := V) z‖ₑ) ^ (1 / p.toReal) * + eLpNorm (blockFun j f) p volume := + enorm_conv_le_of_enorm_le Fact.out hp (integrable_Theta j).aestronglyMeasurable + (enorm_Theta_le j) (aestronglyMeasurable_blockFun j f) x + _ = _ := by + rw [eLpNorm_Theta_one, ENNReal.mul_rpow_of_nonneg _ _ (by positivity), + ENNReal.two_pow_rpow_eq_dyadicWeight, nikolskiiExponent_top, nikolskiiBlockConst, one_div] + ring + +/-- **The Nikolskii inequality for blocks**: for `1 ≤ p ≤ r ≤ ∞`, `p < ∞` and `f ∈ L_p(V)`, +`‖ψ_j ⋆ f‖_r ≤ N_p^(1-p/r) 2^(j α) ‖ψ_j ⋆ f‖_p` with `α = n(1/p - 1/r)`. For `r = ∞` this is +`Rd.enorm_blockFun_le_nikolskii`; for `r < ∞` interpolation +(`MeasureTheory.eLpNorm_le_rpow_mul_eLpNorm_rpow`) gives the exponent `(n/p)(1 - p/r) = α`. -/ +theorem eLpNorm_blockFun_le_nikolskii (hp : p ≠ ∞) {r : ℝ≥0∞} (hpr : p ≤ r) (j : ℕ) + (f : Lp ℂ p (volume : Measure V)) : + eLpNorm (blockFun j f) r volume ≤ nikolskiiBlockConst V p ^ (1 - p.toReal / r.toReal) * + dyadicWeight (nikolskiiExponent (finrank ℝ V) p r) j * eLpNorm (blockFun j f) p volume := by + have hb := enorm_blockFun_le_nikolskii hp j f + rcases eq_or_ne r ∞ with rfl | hr + · rw [ENNReal.toReal_top, div_zero, sub_zero, ENNReal.rpow_one, + eLpNorm_exponent_top (aestronglyMeasurable_blockFun j f)] + exact eLpNormEssSup_le_of_ae_eNorm_bound (ae_of_all _ hb) + have hp0 : p ≠ 0 := (zero_lt_one.trans_le Fact.out).ne' + have hpp : 0 < p.toReal := ENNReal.toReal_pos hp0 hp + have hrr : 0 < r.toReal := + ENNReal.toReal_pos (zero_lt_one.trans_le ((Fact.out : 1 ≤ p).trans hpr)).ne' hr + have h1 : 0 ≤ 1 - p.toReal / r.toReal := ENNReal.one_sub_toReal_div_nonneg hpr + have hθ : 0 ≤ p.toReal / r.toReal := by positivity + have hexp : (finrank ℝ V : ℝ) * p.toReal⁻¹ * (1 - p.toReal / r.toReal) = + nikolskiiExponent (finrank ℝ V) p r := by + unfold nikolskiiExponent + field_simp + calc eLpNorm (blockFun j f) r volume + ≤ (nikolskiiBlockConst V p * dyadicWeight (nikolskiiExponent (finrank ℝ V) p ∞) j * + eLpNorm (blockFun j f) p volume) ^ (1 - p.toReal / r.toReal) * + eLpNorm (blockFun j f) p volume ^ (p.toReal / r.toReal) := + eLpNorm_le_rpow_mul_eLpNorm_rpow (aestronglyMeasurable_blockFun j f) (ae_of_all _ hb) + hp0 hpr hr + _ = nikolskiiBlockConst V p ^ (1 - p.toReal / r.toReal) * + dyadicWeight (nikolskiiExponent (finrank ℝ V) p ∞) j ^ (1 - p.toReal / r.toReal) * + (eLpNorm (blockFun j f) p volume ^ (1 - p.toReal / r.toReal) * + eLpNorm (blockFun j f) p volume ^ (p.toReal / r.toReal)) := by + rw [ENNReal.mul_rpow_of_nonneg _ _ h1, ENNReal.mul_rpow_of_nonneg _ _ h1] + ring + _ = _ := by + rw [← ENNReal.rpow_add_of_nonneg _ _ h1 hθ, sub_add_cancel, ENNReal.rpow_one, + ENNReal.dyadicWeight_rpow, nikolskiiExponent_top, hexp] + +/-- **The blocks lie in `L_r`** for `1 ≤ p ≤ r ≤ ∞`, `p < ∞` and `f ∈ L_p(V)`, by the Nikolskii +inequality for blocks (`Rd.eLpNorm_blockFun_le_nikolskii`). -/ +theorem memLp_blockFun_of_le (hp : p ≠ ∞) {r : ℝ≥0∞} (hpr : p ≤ r) (j : ℕ) + (f : Lp ℂ p (volume : Measure V)) : MemLp (blockFun j f) r volume := + memLp_iff.2 <| (eLpNorm_blockFun_le_nikolskii hp hpr j f).trans_lt + (ENNReal.mul_lt_top (ENNReal.mul_lt_top (ENNReal.rpow_lt_top_of_nonneg + (ENNReal.one_sub_toReal_div_nonneg hpr) nikolskiiBlockConst_ne_top) + (ENNReal.dyadicWeight_lt_top _ _)) (memLp_blockFun hp j f).eLpNorm_lt_top) + +/-! ### Besov embeddings -/ + +/-- **The series of the blocks converges almost everywhere**: for `1 ≤ p < ∞`, `s > 0`, +`1 ≤ q ≤ ∞` and `f ∈ L_p(V)` with a finite Littlewood–Paley quasi-norm, `∑_j (ψ_j ⋆ f)(x) = f(x)` +for almost every `x`. The norms `‖Δ_j f‖_p` are summable (`ENNReal.tsum_le_lqNorm_dyadicWeight`), +`f = ∑_j Δ_j f` in `L_p` (`Rd.hasSum_lpBlock`), and an absolutely convergent series in `L_p` +converges almost everywhere (Mathlib's `MeasureTheory.Lp.hasSum_coeFn_tsum`). -/ +theorem ae_hasSum_blockFun (hp : p ≠ ∞) {s : ℝ} (hs : 0 < s) {q : ℝ≥0∞} (hq : 1 ≤ q) + {f : Lp ℂ p (volume : Measure V)} (hf : littlewoodPaleyNorm hp s q f < ∞) : + ∀ᵐ x ∂volume, HasSum (fun j => blockFun j f x) (f x) := by + have htsum : ∑' j, ‖lpBlock hp j f‖ₑ ≠ ∞ := + ne_top_of_le_ne_top (ENNReal.mul_ne_top (ENNReal.one_sub_two_rpow_neg_inv_ne_top hs) hf.ne) + (ENNReal.tsum_le_lqNorm_dyadicWeight hq s _) + have h1 := Lp.hasSum_coeFn_tsum htsum + rw [(hasSum_lpBlock hp hs hq hf).tsum_eq] at h1 + have h2 : ∀ᵐ x ∂volume, ∀ j, lpBlock hp j f x = blockFun j f x := + ae_all_iff.2 fun j => lpBlock_ae_eq_blockFun hp j f + filter_upwards [h1, h2] with x hx1 hx2 + simpa only [hx2] using hx1 + +variable (V) in +/-- The **constant of the Besov embedding** into `L_r`, +`K_{V,p,r,s} = N_p^(1-p/r) (1 - 2^(-(s - α)))⁻¹` with `α = n(1/p - 1/r)`. -/ +noncomputable def besovEmbeddingConst (p r : ℝ≥0∞) (s : ℝ) : ℝ≥0∞ := + nikolskiiBlockConst V p ^ (1 - p.toReal / r.toReal) * + (1 - (2 : ℝ≥0∞) ^ (-(s - nikolskiiExponent (finrank ℝ V) p r)))⁻¹ + +/-- The constant of the Besov embedding is finite for `p ≤ r` and `s > n(1/p - 1/r)`. -/ +theorem besovEmbeddingConst_ne_top {r : ℝ≥0∞} (hpr : p ≤ r) {s : ℝ} + (hs : nikolskiiExponent (finrank ℝ V) p r < s) : besovEmbeddingConst V p r s ≠ ∞ := + ENNReal.mul_ne_top (ENNReal.rpow_ne_top_of_nonneg (ENNReal.one_sub_toReal_div_nonneg hpr) + nikolskiiBlockConst_ne_top) (ENNReal.one_sub_two_rpow_neg_inv_ne_top (sub_pos.2 hs)) + +/-- **The Nikolskii bounds are summable**: for `1 ≤ p < ∞`, every `r`, `s ∈ ℝ`, `1 ≤ q ≤ ∞` and +`f ∈ L_p(V)`, +`∑_j N_p^(1-p/r) 2^(jα) ‖ψ_j ⋆ f‖_p ≤ K_{V,p,r,s} ‖(2^(js) ‖Δ_j f‖_p)_j‖_{ℓ_q}`, since the weights +`2^(-j(s-α))` absorb the `ℓ_q` norm (`ENNReal.tsum_le_lqNorm_dyadicWeight`). -/ +theorem tsum_nikolskii_le (hp : p ≠ ∞) {r : ℝ≥0∞} (s : ℝ) {q : ℝ≥0∞} (hq : 1 ≤ q) + (f : Lp ℂ p (volume : Measure V)) : + ∑' j, nikolskiiBlockConst V p ^ (1 - p.toReal / r.toReal) * + dyadicWeight (nikolskiiExponent (finrank ℝ V) p r) j * eLpNorm (blockFun j f) p volume ≤ + besovEmbeddingConst V p r s * littlewoodPaleyNorm hp s q f := by + set α := nikolskiiExponent (finrank ℝ V) p r + set K := nikolskiiBlockConst V p ^ (1 - p.toReal / r.toReal) + have hw : (fun j => dyadicWeight (s - α) j * + (dyadicWeight α j * eLpNorm (blockFun j f) p volume)) = + fun j => dyadicWeight s j * ‖lpBlock hp j f‖ₑ := by + funext j + rw [← mul_assoc, ← ENNReal.dyadicWeight_add, sub_add_cancel, + enorm_lpBlock_eq_eLpNorm_blockFun] + calc ∑' j, K * dyadicWeight α j * eLpNorm (blockFun j f) p volume + = K * ∑' j, dyadicWeight α j * eLpNorm (blockFun j f) p volume := by + simp_rw [mul_assoc] + exact ENNReal.tsum_mul_left + _ ≤ K * ((1 - (2 : ℝ≥0∞) ^ (-(s - α)))⁻¹ * lqNorm q (fun j => dyadicWeight (s - α) j * + (dyadicWeight α j * eLpNorm (blockFun j f) p volume))) := by + gcongr + exact ENNReal.tsum_le_lqNorm_dyadicWeight hq (s - α) _ + _ = besovEmbeddingConst V p r s * littlewoodPaleyNorm hp s q f := by + rw [hw, besovEmbeddingConst, littlewoodPaleyNorm, mul_assoc] + +/-- **The `L_r` norms of the blocks are summable**: for `1 ≤ p ≤ r ≤ ∞`, `p < ∞`, `s ∈ ℝ`, +`1 ≤ q ≤ ∞` and `f ∈ L_p(V)`, +`∑_j ‖ψ_j ⋆ f‖_r ≤ K_{V,p,r,s} ‖(2^(js) ‖Δ_j f‖_p)_j‖_{ℓ_q}` (the Nikolskii inequality for +blocks and `Rd.tsum_nikolskii_le`). -/ +theorem tsum_eLpNorm_blockFun_le (hp : p ≠ ∞) {r : ℝ≥0∞} (hpr : p ≤ r) (s : ℝ) {q : ℝ≥0∞} + (hq : 1 ≤ q) (f : Lp ℂ p (volume : Measure V)) : + ∑' j, eLpNorm (blockFun j f) r volume ≤ + besovEmbeddingConst V p r s * littlewoodPaleyNorm hp s q f := + (tsum_le_tsum fun j => eLpNorm_blockFun_le_nikolskii hp hpr j f).trans + (tsum_nikolskii_le hp s hq f) + +/-- **The Besov embedding into `L_r`**: for `1 ≤ p ≤ r ≤ ∞`, `p < ∞`, +`s > α = n(1/p - 1/r)`, `1 ≤ q ≤ ∞` and `f ∈ B^s_{p,q}` (band-limited approximation in `L_p`), +there is `g ∈ L_r(V)` with `g = f` almost everywhere and +`‖g‖_r ≤ K_{V,p,r,s} ‖(2^(js) ‖Δ_j f‖_p)_j‖_{ℓ_q}`. The blocks lie in `L_r`, their series +converges absolutely in `L_r` (`Rd.tsum_eLpNorm_blockFun_le`), its sum `g` is the almost +everywhere limit of the series (Mathlib's `MeasureTheory.Lp.hasSum_coeFn_tsum`), and so is `f` +(`Rd.ae_hasSum_blockFun`). -/ +theorem exists_memLp_ae_eq_of_memApprox (hp : p ≠ ∞) {r : ℝ≥0∞} (hpr : p ≤ r) + {s : ℝ} (hs : nikolskiiExponent (finrank ℝ V) p r < s) {q : ℝ≥0∞} (hq : 1 ≤ q) + {f : Lp ℂ p (volume : Measure V)} (hf : (bandScheme hp).MemApprox s q f) : + ∃ g : Lp ℂ r (volume : Measure V), (g : V → ℂ) =ᵐ[volume] f ∧ + ‖g‖ₑ ≤ besovEmbeddingConst V p r s * littlewoodPaleyNorm hp s q f := by + have : Fact (1 ≤ r) := ⟨(Fact.out : 1 ≤ p).trans hpr⟩ + have hs0 : 0 < s := + (nikolskiiExponent_nonneg (Nat.cast_nonneg _) Fact.out hpr).trans_lt hs + have hLP : littlewoodPaleyNorm hp s q f < ∞ := (memApprox_bandScheme_iff hp hs0 hq).1 hf + set u : ℕ → Lp ℂ r (volume : Measure V) := fun j => (memLp_blockFun_of_le hp hpr j f).toLp _ + have htsum : ∑' j, ‖u j‖ₑ ≤ besovEmbeddingConst V p r s * littlewoodPaleyNorm hp s q f := by + simp only [u, Lp.eNorm_toLp] + exact tsum_eLpNorm_blockFun_le hp hpr s hq f + have hfin : ∑' j, ‖u j‖ₑ ≠ ∞ := + ne_top_of_le_ne_top (ENNReal.mul_ne_top (besovEmbeddingConst_ne_top hpr hs) hLP.ne) htsum + refine ⟨∑' j, u j, ?_, eNorm_tsum_le_tsum_eNorm.trans htsum⟩ + have h2 : ∀ᵐ x ∂volume, ∀ j, u j x = blockFun j f x := + ae_all_iff.2 fun j => MemLp.coeFn_toLp _ + filter_upwards [Lp.hasSum_coeFn_tsum hfin, h2, ae_hasSum_blockFun hp hs0 hq hLP] + with x hx1 hx2 hx3 + simp only [hx2] at hx1 + exact hx1.unique hx3 + +/-- **The Besov embedding into bounded continuous functions**: for `1 ≤ p < ∞`, `s > n/p`, +`1 ≤ q ≤ ∞` and `f ∈ B^s_{p,q}` (band-limited approximation in `L_p`), there is a bounded +continuous function `a` with `a = f` almost everywhere and +`sup |a| ≤ K_{V,p,∞,s} ‖(2^(js) ‖Δ_j f‖_p)_j‖_{ℓ_q}`. The blocks are continuous +(`Rd.continuous_blockFun`) and bounded at every point by the summable Nikolskii bounds +(`Rd.enorm_blockFun_le_nikolskii`, `Rd.tsum_nikolskii_le`), so their series converges uniformly +to a continuous function (Mathlib's `continuous_tsum`), which is `f` almost everywhere +(`Rd.ae_hasSum_blockFun`); its sup norm is the supremum of `|a(x)|` (Mathlib's +`BoundedContinuousFunction.eNorm_eq_iSup_eNorm`). -/ +theorem exists_boundedContinuous_ae_eq_of_memApprox (hp : p ≠ ∞) {s : ℝ} + (hs : (finrank ℝ V : ℝ) / p.toReal < s) {q : ℝ≥0∞} (hq : 1 ≤ q) + {f : Lp ℂ p (volume : Measure V)} (hf : (bandScheme hp).MemApprox s q f) : + ∃ a : V →ᵇ ℂ, (a : V → ℂ) =ᵐ[volume] f ∧ + ‖a‖ₑ ≤ besovEmbeddingConst V p ∞ s * littlewoodPaleyNorm hp s q f := by + have hα : nikolskiiExponent (finrank ℝ V) p ∞ < s := by + rwa [nikolskiiExponent_top, ← div_eq_mul_inv] + have hs0 : 0 < s := (nikolskiiExponent_nonneg (Nat.cast_nonneg _) Fact.out le_top).trans_lt hα + have hLP : littlewoodPaleyNorm hp s q f < ∞ := (memApprox_bandScheme_iff hp hs0 hq).1 hf + set b : ℕ → ℝ≥0∞ := fun j => nikolskiiBlockConst V p ^ (1 - p.toReal / (∞ : ℝ≥0∞).toReal) * + dyadicWeight (nikolskiiExponent (finrank ℝ V) p ∞) j * eLpNorm (blockFun j f) p volume + have htsum : ∑' j, b j ≤ besovEmbeddingConst V p ∞ s * littlewoodPaleyNorm hp s q f := + tsum_nikolskii_le hp s hq f + have hfin : ∑' j, b j ≠ ∞ := ne_top_of_le_ne_top + (ENNReal.mul_ne_top (besovEmbeddingConst_ne_top le_top hα) hLP.ne) htsum + have hb : ∀ j x, ‖blockFun j f x‖ₑ ≤ b j := fun j x => + (enorm_blockFun_le_nikolskii hp j f x).trans_eq (by + simp only [b, ENNReal.toReal_top, div_zero, sub_zero, ENNReal.rpow_one]) + have hnorm : ∀ j x, ‖blockFun j f x‖ ≤ (b j).toReal := fun j x => by + rw [← toReal_eNorm] + exact ENNReal.toReal_mono (ne_top_of_le_ne_top hfin (le_tsum _ j)) (hb j x) + have hsum : Summable fun j => (b j).toReal := ENNReal.summable_toReal hfin + have hac : Continuous fun x => ∑' j, blockFun j f x := + continuous_tsum (fun j => continuous_blockFun hp j f) hsum hnorm + have hab : ∀ x, ‖∑' j, blockFun j f x‖ ≤ ∑' j, (b j).toReal := fun x => + tsum_of_norm_bounded hsum.hasSum fun j => hnorm j x + refine ⟨BoundedContinuousFunction.ofNormedAddCommGroup _ hac _ hab, ?_, ?_⟩ + · filter_upwards [ae_hasSum_blockFun hp hs0 hq hLP] with x hx + exact hx.tsum_eq + · rw [BoundedContinuousFunction.eNorm_eq_iSup_eNorm] + exact iSup_le fun x => eNorm_tsum_le_tsum_eNorm.trans + ((tsum_le_tsum fun j => hb j x).trans htsum) + +/-! ### Sobolev embeddings -/ + +/-- **The Sobolev embedding into `L_r` with named constants**: let `n ≥ 1`, `1 < p ≤ r ≤ ∞`, +`p < ∞` and `m > n(1/p - 1/r)`, and let `f ∈ L_p(V)` have weak derivatives `g_α ∈ L_p(V)` of +order `m` along the basis `e` of `Rd.gridBasis` for every multi-index `α`. Then there is +`u ∈ L_r(V)` with `u = f` almost everywhere and +`‖u‖_r ≤ K_{V,p,r,m} (‖Φ‖_1 ‖f‖_p + 2^m ∑_α K_α ‖g_α‖_p)` with `K_α = Rd.sobolevToTLConst V p α`. +The bound of `‖f‖_{F^m_{p,2}}` (`Rd.triebelLizorkinNorm_le_of_hasWeakLineDeriv`) bounds the +Littlewood–Paley quasi-norm of `B^m_{p,max(p,2)}` +(`Rd.littlewoodPaleyNorm_max_le_triebelLizorkinNorm`), and the Besov embedding +(`Rd.exists_memLp_ae_eq_of_memApprox`) applies. The critical case `1/r = 1/p - m/n` with `r < ∞` +(Sobolev's inequality) is `Rd.exists_memLp_ae_eq_of_hasWeakLineDeriv_of_eq`; for `m = 1` and +every `1 ≤ p`, `p = 1` included, it is `Rd.exists_memLp_ae_eq_of_hasWeakLineDeriv_one`. -/ +theorem exists_memLp_ae_eq_of_hasWeakLineDeriv [Nontrivial V] (hp1 : 1 < p) (hp : p ≠ ∞) + {r : ℝ≥0∞} (hpr : p ≤ r) {m : ℕ} (hs : nikolskiiExponent (finrank ℝ V) p r < m) + {f : Lp ℂ p (volume : Measure V)} + {g : (Fin m → Fin (finrank ℝ V)) → Lp ℂ p (volume : Measure V)} + (hg : ∀ i, HasWeakLineDeriv ⊤ (fun k => gridBasis V (i k)) f (g i)) : + ∃ u : Lp ℂ r (volume : Measure V), (u : V → ℂ) =ᵐ[volume] f ∧ + ‖u‖ₑ ≤ besovEmbeddingConst V p r m * (eLpNorm (lpKernel (V := V)) 1 volume * ‖f‖ₑ + + 2 ^ m * ∑ i, sobolevToTLConst V p i * ‖g i‖ₑ) := by + have hm : 1 ≤ m := one_le_of_nikolskiiExponent_lt (Nat.cast_nonneg _) Fact.out hpr hs + obtain ⟨u, hu, hn⟩ := exists_memLp_ae_eq_of_memApprox hp hpr hs + (one_le_two.trans (le_max_right _ _)) (memApprox_of_memTriebelLizorkin hp + (Nat.cast_pos.2 hm) one_le_two (memTriebelLizorkin_of_hasWeakLineDeriv hp1 hp hg)) + refine ⟨u, hu, hn.trans ?_⟩ + gcongr + exact (littlewoodPaleyNorm_max_le_triebelLizorkinNorm hp one_le_two f).trans + (triebelLizorkinNorm_le_of_hasWeakLineDeriv hp1 hp hg) + +/-- **The Sobolev embedding into bounded continuous functions with named constants**: let +`n ≥ 1`, `1 < p < ∞` and `m > n/p`, and let `f ∈ L_p(V)` have weak derivatives `g_α ∈ L_p(V)` of +order `m` along the basis `e` of `Rd.gridBasis` for every multi-index `α`. Then there is a +bounded continuous function `a` with `a = f` almost everywhere and +`sup |a| ≤ K_{V,p,∞,m} (‖Φ‖_1 ‖f‖_p + 2^m ∑_α K_α ‖g_α‖_p)` with +`K_α = Rd.sobolevToTLConst V p α`, by the same argument as +`Rd.exists_memLp_ae_eq_of_hasWeakLineDeriv` with the Besov embedding into bounded continuous +functions (`Rd.exists_boundedContinuous_ae_eq_of_memApprox`). -/ +theorem exists_boundedContinuous_ae_eq_of_hasWeakLineDeriv [Nontrivial V] (hp1 : 1 < p) + (hp : p ≠ ∞) {m : ℕ} (hs : (finrank ℝ V : ℝ) / p.toReal < m) + {f : Lp ℂ p (volume : Measure V)} + {g : (Fin m → Fin (finrank ℝ V)) → Lp ℂ p (volume : Measure V)} + (hg : ∀ i, HasWeakLineDeriv ⊤ (fun k => gridBasis V (i k)) f (g i)) : + ∃ a : V →ᵇ ℂ, (a : V → ℂ) =ᵐ[volume] f ∧ + ‖a‖ₑ ≤ besovEmbeddingConst V p ∞ m * (eLpNorm (lpKernel (V := V)) 1 volume * ‖f‖ₑ + + 2 ^ m * ∑ i, sobolevToTLConst V p i * ‖g i‖ₑ) := by + have hα : nikolskiiExponent (finrank ℝ V) p ∞ < m := by + rwa [nikolskiiExponent_top, ← div_eq_mul_inv] + have hm : 1 ≤ m := one_le_of_nikolskiiExponent_lt (Nat.cast_nonneg _) Fact.out le_top hα + obtain ⟨a, ha, hn⟩ := exists_boundedContinuous_ae_eq_of_memApprox hp hs + (one_le_two.trans (le_max_right _ _)) (memApprox_of_memTriebelLizorkin hp + (Nat.cast_pos.2 hm) one_le_two (memTriebelLizorkin_of_hasWeakLineDeriv hp1 hp hg)) + refine ⟨a, ha, hn.trans ?_⟩ + gcongr + exact (littlewoodPaleyNorm_max_le_triebelLizorkinNorm hp one_le_two f).trans + (triebelLizorkinNorm_le_of_hasWeakLineDeriv hp1 hp hg) + +/-- **The Sobolev embedding into `L_r`**: let `n ≥ 1`, `1 < p ≤ r ≤ ∞`, `p < ∞` and +`m > n(1/p - 1/r)`. Every `f ∈ W^m_p(V)` has a representative in `L_r(V)`: there is +`g ∈ L_r(V)` with `g = f` almost everywhere. This is `W^m_p ⊆ B^m_{p,max(p,2)}` +(`Rd.memApprox_of_memSobolev`) and the Besov embedding (`Rd.exists_memLp_ae_eq_of_memApprox`); +`Rd.exists_memLp_ae_eq_of_hasWeakLineDeriv` adds the norm bound. The critical case +`1/r = 1/p - m/n` with `r < ∞` (Sobolev's inequality) is +`Rd.exists_memLp_ae_eq_of_memSobolev_of_eq`, and for `p = 1` +`Rd.exists_memLp_ae_eq_of_memSobolev_one_of_eq`. -/ +theorem exists_memLp_ae_eq_of_memSobolev [Nontrivial V] (hp1 : 1 < p) (hp : p ≠ ∞) + {r : ℝ≥0∞} (hpr : p ≤ r) {m : ℕ} + (hs : nikolskiiExponent (finrank ℝ V) p r < m) {f : Lp ℂ p (volume : Measure V)} + (hf : MemSobolev m f) : ∃ g : Lp ℂ r (volume : Measure V), (g : V → ℂ) =ᵐ[volume] f := by + have hm : 1 ≤ m := one_le_of_nikolskiiExponent_lt (Nat.cast_nonneg _) Fact.out hpr hs + obtain ⟨g, hg, -⟩ := exists_memLp_ae_eq_of_memApprox hp hpr hs + (one_le_two.trans (le_max_right _ _)) (memApprox_of_memSobolev hp1 hp hm hf) + exact ⟨g, hg⟩ + +/-- **The Sobolev embedding into bounded continuous functions**: let `n ≥ 1`, `1 < p < ∞` and +`m > n/p`. Every `f ∈ W^m_p(V)` has a bounded continuous representative. This is +`W^m_p ⊆ B^m_{p,max(p,2)}` (`Rd.memApprox_of_memSobolev`) and the Besov embedding into bounded +continuous functions (`Rd.exists_boundedContinuous_ae_eq_of_memApprox`); +`Rd.exists_boundedContinuous_ae_eq_of_hasWeakLineDeriv` adds the norm bound. -/ +theorem exists_boundedContinuous_ae_eq_of_memSobolev [Nontrivial V] (hp1 : 1 < p) (hp : p ≠ ∞) + {m : ℕ} (hs : (finrank ℝ V : ℝ) / p.toReal < m) {f : Lp ℂ p (volume : Measure V)} + (hf : MemSobolev m f) : ∃ a : V →ᵇ ℂ, (a : V → ℂ) =ᵐ[volume] f := by + have hα : nikolskiiExponent (finrank ℝ V) p ∞ < m := by + rwa [nikolskiiExponent_top, ← div_eq_mul_inv] + have hm : 1 ≤ m := one_le_of_nikolskiiExponent_lt (Nat.cast_nonneg _) Fact.out le_top hα + obtain ⟨a, ha, -⟩ := exists_boundedContinuous_ae_eq_of_memApprox hp hs + (one_le_two.trans (le_max_right _ _)) (memApprox_of_memSobolev hp1 hp hm hf) + exact ⟨a, ha⟩ + +end Rd diff --git a/LeanPool/FunctionSpaces/Rd/Sobolev/SobolevJets.lean b/LeanPool/FunctionSpaces/Rd/Sobolev/SobolevJets.lean new file mode 100644 index 0000000000..1c0218a9b8 --- /dev/null +++ b/LeanPool/FunctionSpaces/Rd/Sobolev/SobolevJets.lean @@ -0,0 +1,236 @@ +/- +Copyright (c) 2026 Mario Ullrich. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Mario Ullrich +-/ +module + +public import LeanPool.FunctionSpaces.Rd.Sobolev.WeakDerivatives +public import LeanPool.FunctionSpaces.Analysis.Maximal.DyadicGrid + +/- +Modified for Lean Pool: module names and imports adapted. +-/ + +/-! +# Value–derivative jets of `W^1_p` + +Let `V` be a finite-dimensional real inner product space of dimension `n`, `e_i = Rd.gridBasis V i` +its orthonormal basis, `O ⊆ V` open and `1 ≤ p ≤ ∞`. A **jet** of `W^1_p(O)` is a pair +`(f, (g_i)_i)` of elements of `L_p(O)` with `g_i = ∂_{e_i} f` weakly on `O` +(`Rd.weakSobolevJet p O`); the jets of `W^1_p(V)` are the same over `L_p(V)` (`Rd.sobolevJet p`). +Both are complex linear subspaces of `L_p × L_p^n` with the norm `max(‖f‖_p, max_i ‖g_i‖_p)`, which +is equivalent to `‖f‖_p + ∑_i ‖g_i‖_p` (`Rd.norm_le_norm_fst_add_sum`, +`Rd.norm_fst_add_sum_le`; in `ℝ≥0∞`, `Rd.toReal_enorm_add_sum`, and the squared form +`Rd.sq_norm_add_sum_sq_le`). + +* The derivatives of a jet are determined by its value (`Rd.weakSobolevJet.snd_eq_of_fst_eq`, + `Rd.sobolevJet.snd_eq_of_fst_eq`), and every `f ∈ W^1_p(O)` is the value of a jet + (`Rd.exists_mem_weakSobolevJet_of_memWeakSobolev`). +* The restriction `Rd.sobolevJet.restrictL O` from the jets of `W^1_p(V)` to those of `W^1_p(O)` + is a bounded linear operator. +* A linear map into `L_p(V)` whose values have weak derivatives along the `e_i` in `L_p(V)` is a + linear map into the jets (`Rd.sobolevJet.lift`). +-/ + +@[expose] public section + +open MeasureTheory Module TopologicalSpace +open scoped ENNReal + +namespace Rd + +/-! ### Norms on products -/ + +/-- The sup norm of `(x, (y_i)_i) ∈ E × F^ι` is at most `‖x‖ + ∑_i ‖y_i‖`. -/ +theorem norm_le_norm_fst_add_sum {E F ι : Type*} [SeminormedAddCommGroup E] + [SeminormedAddCommGroup F] [Fintype ι] (u : E × (ι → F)) : + ‖u‖ ≤ ‖u.1‖ + ∑ i, ‖u.2 i‖ := by + have hs : 0 ≤ ∑ i, ‖u.2 i‖ := Finset.sum_nonneg fun i _ => norm_nonneg _ + refine max_le (le_add_of_nonneg_right hs) ((pi_norm_le_iff_of_nonneg (by positivity)).2 + fun i => ?_) + exact (Finset.single_le_sum (f := fun i => ‖u.2 i‖) (fun i _ => norm_nonneg _) + (Finset.mem_univ i)).trans (le_add_of_nonneg_left (norm_nonneg _)) + +/-- `‖x‖ + ∑_i ‖y_i‖` is at most `(#ι + 1)` times the sup norm of `(x, (y_i)_i) ∈ E × F^ι` +(Mathlib's `Pi.sum_norm_apply_le_norm`, `∑_i ‖y_i‖ ≤ #ι ‖y‖`). -/ +theorem norm_fst_add_sum_le {E F ι : Type*} [SeminormedAddCommGroup E] + [SeminormedAddCommGroup F] [Fintype ι] (u : E × (ι → F)) : + ‖u.1‖ + ∑ i, ‖u.2 i‖ ≤ (Fintype.card ι + 1) * ‖u‖ := by + have h2 : ∑ i, ‖u.2 i‖ ≤ Fintype.card ι * ‖u‖ := by + rw [← nsmul_eq_mul] + exact (Pi.sum_norm_apply_le_norm u.2).trans (nsmul_le_nsmul_right (norm_snd_le u) _) + linarith [norm_fst_le u] + +/-- `(‖x‖ₑ + ∑_i ‖y_i‖ₑ).toReal = ‖x‖ + ∑_i ‖y_i‖` in a normed group: the norm +`‖x‖ + ∑_i ‖y_i‖` in `ℝ≥0∞` and in `ℝ`. -/ +theorem toReal_enorm_add_sum {E ι : Type*} [NormedAddCommGroup E] [Fintype ι] (x : E) + (y : ι → E) : (‖x‖ₑ + ∑ i, ‖y i‖ₑ).toReal = ‖x‖ + ∑ i, ‖y i‖ := by + rw [ENNReal.toReal_add eNorm_ne_top (ENNReal.sum_ne_top.2 fun _ _ => eNorm_ne_top), + ENNReal.toReal_sum fun _ _ => eNorm_ne_top] + simp only [toReal_eNorm] + +/-- If `‖x‖ + ∑_i ‖y_i‖ ≤ K` in `ℝ≥0∞` with `K` finite, then `‖x‖² + ∑_i ‖y_i‖² ≤ K²` in `ℝ`. -/ +theorem sq_norm_add_sum_sq_le {E : Type*} [NormedAddCommGroup E] {ι : Type*} [Fintype ι] {x : E} + {y : ι → E} {K : ℝ≥0∞} (hK : K ≠ ∞) (h : ‖x‖ₑ + ∑ i, ‖y i‖ₑ ≤ K) : + ‖x‖ ^ 2 + ∑ i, ‖y i‖ ^ 2 ≤ K.toReal ^ 2 := by + have hr : ‖x‖ + ∑ i, ‖y i‖ ≤ K.toReal := + toReal_enorm_add_sum x y ▸ ENNReal.toReal_mono hK h + have hs := Finset.sum_sq_le_sq_sum_of_nonneg (s := Finset.univ) fun i _ => norm_nonneg (y i) + have h0 : 0 ≤ ∑ i, ‖y i‖ := Finset.sum_nonneg fun i _ => norm_nonneg _ + nlinarith [norm_nonneg x] + +variable {V : Type*} [NormedAddCommGroup V] [InnerProductSpace ℝ V] [FiniteDimensional ℝ V] + [MeasurableSpace V] [BorelSpace V] {p : ℝ≥0∞} + +/-! ### Jets on an open set -/ + +variable (p) in +/-- The **jets of `W^1_p(O)`**: the pairs `(f, (g_i)_i)` of elements of `L_p(O)` with +`g_i = ∂_{e_i} f` weakly on `O`, `e_i = Rd.gridBasis V i`; a complex linear subspace of +`L_p(O) × L_p(O)^n`. -/ +noncomputable def weakSobolevJet (O : Opens V) : + Submodule ℂ (Lp ℂ p (volume.restrict (O : Set V)) × + (Fin (finrank ℝ V) → Lp ℂ p (volume.restrict (O : Set V)))) where + carrier := {u | ∀ i, HasWeakLineDeriv O (fun _ : Fin 1 => gridBasis V i) u.1 (u.2 i)} + zero_mem' := fun _ => + hasWeakLineDeriv_zero.congr_ae (Lp.coeFn_zero ..).symm (Lp.coeFn_zero ..).symm + add_mem' := fun hu hv i => + ((hu i).add (hv i)).congr_ae (Lp.coeFn_add ..).symm (Lp.coeFn_add ..).symm + smul_mem' := fun c _ hu i => + ((hu i).smul c).congr_ae (Lp.coeFn_smul ..).symm (Lp.coeFn_smul ..).symm + +/-- Membership in the jets of `W^1_p(O)`: `g_i = ∂_{e_i} f` weakly on `O` for every `i`. -/ +theorem mem_weakSobolevJet {O : Opens V} + {u : Lp ℂ p (volume.restrict (O : Set V)) × + (Fin (finrank ℝ V) → Lp ℂ p (volume.restrict (O : Set V)))} : + u ∈ weakSobolevJet p O ↔ + ∀ i, HasWeakLineDeriv O (fun _ : Fin 1 => gridBasis V i) u.1 (u.2 i) := + Iff.rfl + +/-- **The derivatives of a jet of `W^1_p(O)` are determined by its value**: two jets with the same +value have the same derivatives (`Rd.HasWeakLineDeriv.unique`). -/ +theorem weakSobolevJet.snd_eq_of_fst_eq {O : Opens V} + {u v : Lp ℂ p (volume.restrict (O : Set V)) × + (Fin (finrank ℝ V) → Lp ℂ p (volume.restrict (O : Set V)))} + (hu : u ∈ weakSobolevJet p O) (hv : v ∈ weakSobolevJet p O) (h : u.1 = v.1) : u.2 = v.2 := by + funext i + have hv' := hv i + rw [← h] at hv' + exact Lp.ext ((hu i).unique hv') + +/-- Two jets of `W^1_p(O)` with the same value are equal +(`Rd.weakSobolevJet.snd_eq_of_fst_eq`). -/ +theorem weakSobolevJet.ext_of_fst_eq {O : Opens V} {u v : weakSobolevJet p O} + (h : u.1.1 = v.1.1) : u = v := + Subtype.ext (Prod.ext h (weakSobolevJet.snd_eq_of_fst_eq u.2 v.2 h)) + +/-- **Every `f ∈ W^1_p(O)` is the value of a jet**: some jet of `W^1_p(O)` has a value equal to `f` +almost everywhere on `O`. -/ +theorem exists_mem_weakSobolevJet_of_memWeakSobolev {O : Opens V} {f : V → ℂ} + (hf : MemWeakSobolev O 1 p f) : + ∃ u ∈ weakSobolevJet p O, (u.1 : V → ℂ) =ᵐ[volume.restrict (O : Set V)] f := by + choose g hg hfg using fun i => hf.2 1 le_rfl fun _ : Fin 1 => gridBasis V i + refine ⟨(hf.1.toLp f, fun i => (hg i).toLp (g i)), fun i => ?_, hf.1.coeFn_toLp⟩ + exact (hfg i).congr_ae hf.1.coeFn_toLp.symm (hg i).coeFn_toLp.symm + +/-! ### Jets on the whole space -/ + +variable (p) in +/-- The **jets of `W^1_p(V)`**: the pairs `(F, (G_i)_i)` of elements of `L_p(V)` with +`G_i = ∂_{e_i} F` weakly on `V`, `e_i = Rd.gridBasis V i`; a complex linear subspace of +`L_p(V) × L_p(V)^n`. -/ +noncomputable def sobolevJet : + Submodule ℂ (Lp ℂ p (volume : Measure V) × (Fin (finrank ℝ V) → Lp ℂ p (volume : Measure V))) + where + carrier := {u | ∀ i, HasWeakLineDeriv ⊤ (fun _ : Fin 1 => gridBasis V i) u.1 (u.2 i)} + zero_mem' := fun _ => hasWeakLineDeriv_zero.congr_ae + (ae_restrict_of_ae (Lp.coeFn_zero ..).symm) (ae_restrict_of_ae (Lp.coeFn_zero ..).symm) + add_mem' := fun hu hv i => ((hu i).add (hv i)).congr_ae + (ae_restrict_of_ae (Lp.coeFn_add ..).symm) (ae_restrict_of_ae (Lp.coeFn_add ..).symm) + smul_mem' := fun c _ hu i => ((hu i).smul c).congr_ae + (ae_restrict_of_ae (Lp.coeFn_smul ..).symm) (ae_restrict_of_ae (Lp.coeFn_smul ..).symm) + +/-- Membership in the jets of `W^1_p(V)`: `G_i = ∂_{e_i} F` weakly on `V` for every `i`. -/ +theorem mem_sobolevJet + {u : Lp ℂ p (volume : Measure V) × (Fin (finrank ℝ V) → Lp ℂ p (volume : Measure V))} : + u ∈ sobolevJet p ↔ ∀ i, HasWeakLineDeriv ⊤ (fun _ : Fin 1 => gridBasis V i) u.1 (u.2 i) := + Iff.rfl + +/-- **The derivatives of a jet of `W^1_p(V)` are determined by its value** +(`Rd.HasWeakLineDeriv.eq_of_top`). -/ +theorem sobolevJet.snd_eq_of_fst_eq + {u v : Lp ℂ p (volume : Measure V) × (Fin (finrank ℝ V) → Lp ℂ p (volume : Measure V))} + (hu : u ∈ sobolevJet p) (hv : v ∈ sobolevJet p) (h : u.1 = v.1) : u.2 = v.2 := by + funext i + have hv' := hv i + rw [← h] at hv' + exact (hu i).eq_of_top hv' + +/-- Two jets of `W^1_p(V)` with the same value are equal (`Rd.sobolevJet.snd_eq_of_fst_eq`). -/ +theorem sobolevJet.ext_of_fst_eq {u v : sobolevJet (V := V) p} + (h : u.1.1 = v.1.1) : u = v := + Subtype.ext (Prod.ext h (sobolevJet.snd_eq_of_fst_eq u.2 v.2 h)) + +/-! ### Linear maps into the jets -/ + +/-- **Linear maps into the jets of `W^1_p(V)`**: a linear map `L` into `L_p(V)` whose values have +weak derivatives `∂_{e_i} (L u) ∈ L_p(V)` is the linear map `u ↦ (L u, (∂_{e_i} (L u))_i)` into +the jets; it is additive and homogeneous since the derivatives are determined by the value +(`Rd.sobolevJet.ext_of_fst_eq`). -/ +noncomputable def sobolevJet.lift {M : Type*} [AddCommGroup M] [Module ℂ M] + (L : M →ₗ[ℂ] Lp ℂ p (volume : Measure V)) + (h : ∀ u i, ∃ G : Lp ℂ p (volume : Measure V), + HasWeakLineDeriv ⊤ (fun _ : Fin 1 => gridBasis V i) (L u) G) : + M →ₗ[ℂ] sobolevJet (V := V) p where + toFun u := ⟨(L u, fun i => (h u i).choose), fun i => (h u i).choose_spec⟩ + map_add' u v := sobolevJet.ext_of_fst_eq (map_add L u v) + map_smul' c u := sobolevJet.ext_of_fst_eq (map_smul L c u) + +/-- The value of `Rd.sobolevJet.lift L h u` is `L u`. -/ +theorem sobolevJet.lift_apply_fst {M : Type*} [AddCommGroup M] [Module ℂ M] + (L : M →ₗ[ℂ] Lp ℂ p (volume : Measure V)) + (h : ∀ u i, ∃ G : Lp ℂ p (volume : Measure V), + HasWeakLineDeriv ⊤ (fun _ : Fin 1 => gridBasis V i) (L u) G) (u : M) : + (sobolevJet.lift L h u).1.1 = L u := + rfl + +/-- The derivatives of `Rd.sobolevJet.lift L h u` are the weak derivatives of `L u`: every weak +derivative `G = ∂_{e_i} (L u)` in `L_p(V)` is the `i`-th one (`Rd.HasWeakLineDeriv.eq_of_top`). -/ +theorem sobolevJet.lift_apply_snd {M : Type*} [AddCommGroup M] [Module ℂ M] + (L : M →ₗ[ℂ] Lp ℂ p (volume : Measure V)) + (h : ∀ u i, ∃ G : Lp ℂ p (volume : Measure V), + HasWeakLineDeriv ⊤ (fun _ : Fin 1 => gridBasis V i) (L u) G) (u : M) (i : Fin (finrank ℝ V)) + {G : Lp ℂ p (volume : Measure V)} + (hG : HasWeakLineDeriv ⊤ (fun _ : Fin 1 => gridBasis V i) (L u) G) : + (sobolevJet.lift L h u).1.2 i = G := + (h u i).choose_spec.eq_of_top hG + +/-! ### The restriction -/ + +variable [Fact (1 ≤ p)] + +/-- **The restriction of jets** `(F, (G_i)_i) ↦ (F|_O, (G_i|_O)_i)` from `W^1_p(V)` to `W^1_p(O)`, +a bounded linear operator (Mathlib's `MeasureTheory.LpToLpRestrictCLM` in each component; weak +derivatives restrict by `Rd.HasWeakLineDeriv.mono`). -/ +noncomputable def sobolevJet.restrictL (O : Opens V) : + sobolevJet (V := V) p →L[ℂ] weakSobolevJet p O := + (((LpToLpRestrictCLM V ℂ ℂ volume p O).prodMap (ContinuousLinearMap.pi fun i => + (LpToLpRestrictCLM V ℂ ℂ volume p O).comp (ContinuousLinearMap.proj i))).comp + (sobolevJet p).subtypeL).codRestrict (weakSobolevJet p O) fun u i => + ((u.2 i).mono le_top).congr_ae (LpToLpRestrictCLM_coeFn ℂ _ _).symm + (LpToLpRestrictCLM_coeFn ℂ _ _).symm + +/-- The value of the restricted jet is the restriction of the value. -/ +theorem sobolevJet.restrictL_apply_fst (O : Opens V) (u : sobolevJet (V := V) p) : + (sobolevJet.restrictL O u).1.1 = LpToLpRestrictCLM V ℂ ℂ volume p O u.1.1 := + rfl + +/-- The derivatives of the restricted jet are the restrictions of the derivatives. -/ +theorem sobolevJet.restrictL_apply_snd (O : Opens V) (u : sobolevJet (V := V) p) + (i : Fin (finrank ℝ V)) : + (sobolevJet.restrictL O u).1.2 i = + LpToLpRestrictCLM V ℂ ℂ volume p O (u.1.2 i) := + rfl + +end Rd diff --git a/LeanPool/FunctionSpaces/Rd/Sobolev/SobolevTriebelLizorkin.lean b/LeanPool/FunctionSpaces/Rd/Sobolev/SobolevTriebelLizorkin.lean new file mode 100644 index 0000000000..80b9ce2bf9 --- /dev/null +++ b/LeanPool/FunctionSpaces/Rd/Sobolev/SobolevTriebelLizorkin.lean @@ -0,0 +1,534 @@ +/- +Copyright (c) 2026 Mario Ullrich. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Mario Ullrich +-/ +module + +public import LeanPool.FunctionSpaces.Rd.Sobolev.DerivativeKernels +public import LeanPool.FunctionSpaces.Rd.TriebelLizorkin.SquareFunction + +/- +Modified for Lean Pool: module names and imports adapted. +-/ + +/-! +# Sobolev spaces `W^m_p = F^m_{p,2}` + +Let `V` have dimension `n ≥ 1`, `1 < p < ∞` and `m ∈ ℕ`. A function `f ∈ L_p(V)` lies in the +Sobolev space `W^m_p(V)` (`Rd.MemSobolev`: all weak derivatives `∂^w f` of order `k ≤ m` exist +and lie in `L_p(V)`) iff it lies in the Triebel–Lizorkin space `F^m_{p,2}(V)` +(`Rd.MemTriebelLizorkin`: `‖ x ↦ ‖(2^{jm} (ψ_j ⋆ f)(x))_j‖_{ℓ_2} ‖_p < ∞`), see +`Rd.memSobolev_iff_memTriebelLizorkin`. Both directions have named constants +(`Rd.sobolevToTLConst`, `Rd.tlToSobolevConst`), formulas in the Schwartz seminorms of fixed +kernels that are proved finite. + +* **`W^m_p ⊆ F^m_{p,2}`** (`Rd.triebelLizorkinNorm_le_of_hasWeakLineDeriv`, + `Rd.memTriebelLizorkin_of_hasWeakLineDeriv`): with the weak + derivatives `g_α = ∂_{e_{α_0}} ⋯ ∂_{e_{α_{m-1}}} f` along the orthonormal basis `e` of + `Rd.gridBasis`, `‖f‖_{F^m_{p,2}} ≤ ‖Φ‖_1 ‖f‖_p + 2^m ∑_α K_α ‖g_α‖_p` + (`Rd.sobolevToTLConst`). Young's inequality bounds `ψ_0 ⋆ f`; the dilated derivative kernels + give `2^{jm} ψ_{j+1} ⋆ f = ∑_α (η_α)_{2^j} ⋆ g_α` (`Rd.two_pow_mul_blockFun_succ_ae`), and the + analysis bound of the Calderón–Zygmund families `((η_α)_{2^j})_j` bounds each sum. +* **`F^m_{p,2} ⊆ W^m_p`** (`Rd.exists_hasWeakLineDeriv_of_memTriebelLizorkin`): for + `f ∈ F^k_{p,2}(V)` and directions `w ∈ V^k`, the partial sums + `∑_{j < J} (∂^w ψ̃_j) ⋆ (ψ_j ⋆ f)` (`Rd.derivSynthesisSum`) are a Cauchy sequence in `L_p`, by + the synthesis bound of the Calderón–Zygmund family `((∂^w G̃_j)_{2^j})_j` and the tails of the + coefficients `2^{jk} ψ_j ⋆ f` in `L_p(ℓ_2)`. They are the weak derivatives `∂^w` of the + reproducing sums `∑_{j < J} ψ̃_j ⋆ (ψ_j ⋆ f) → f`, so their limit `g` is the weak derivative + `∂^w f`, with `‖g‖_p ≤ C_w ‖f‖_{F^k_{p,2}}` (`Rd.tlToSobolevConst`). For `k ≤ m`, + `F^m_{p,2} ⊆ F^k_{p,2}`. +* **Synthesis sums**: for Schwartz kernels `K_j` with the synthesis bound + `‖∑_{j ∈ t} K_j ⋆ (ψ_j ⋆ f)‖_p ≤ C ‖ x ↦ ‖(1_t(j) 2^{jσ} (ψ_j ⋆ f)(x))_j‖_{ℓ_2} ‖_p`, the + partial sums converge in `L_p` for `f ∈ F^σ_{p,2}` (`Rd.cauchySeq_toLp_sum_conv_blockFun`, + `Rd.exists_tendsto_sum_conv_blockFun`); a Calderón–Zygmund family with the coefficients + `|c_j| = 2^{jσ}` has this bound (`Rd.IsCZFamily.eLpNorm_sum_conv_smul_le` for every family + in `L_p`, `Rd.IsCZFamily.eLpNorm_sum_conv_smul_blockFun_le` for the blocks). The + Bessel potentials of `FunctionSpaces.Rd.BesselPotentials.BesselPotentialLifting` use the same + sums. + +With the Besov sandwich of the Triebel–Lizorkin spaces, `B^m_{p,min(p,2)} ⊆ W^m_p` and, for +`m ≥ 1`, `W^m_p ⊆ B^m_{p,max(p,2)}` (`Rd.memSobolev_of_memApprox`, `Rd.memApprox_of_memSobolev`, +with norm bounds in `Rd.exists_hasWeakLineDeriv_of_memApprox` and +`Rd.approxNormDyadic_le_of_hasWeakLineDeriv`), and `W^m_2 = B^m_{2,2}` for `m ≥ 1` +(`Rd.memSobolev_two_iff_memApprox`). +-/ + +@[expose] public section + +open MeasureTheory Filter Module +open scoped ENNReal Topology SchwartzMap LineDeriv +open ENNReal (lqNorm dyadicWeight) + +namespace Rd + +variable {V : Type*} [NormedAddCommGroup V] [InnerProductSpace ℝ V] [FiniteDimensional ℝ V] + [MeasurableSpace V] [BorelSpace V] + +variable {p : ℝ≥0∞} [Fact (1 ≤ p)] + +/-! ### `W^m_p ⊆ F^m_{p,2}` -/ + +variable (V) in +/-- The constant `K_α = S_{V,p}(2, 4 H_{A^α})` of the bound `W^m_p ⊆ F^m_{p,2}` for the +multi-index `α`: the strong type constant `Rd.czConst` of the Calderón–Zygmund family of the +dilated derivative kernels `(η_α)_{2^j}`, with overlap `2` and Hörmander constant `4 H_{A^α}` +(`Rd.isCZFamily_derivFamily`). -/ +noncomputable def sobolevToTLConst (p : ℝ≥0∞) {m : ℕ} (i : Fin m → Fin (finrank ℝ V)) : ℝ≥0∞ := + czConst V p 2 (4 * familyHormanderConst V (derivKernelBound i)) + +/-- The constant `Rd.sobolevToTLConst V p α` is finite for `1 < p < ∞`. -/ +theorem sobolevToTLConst_ne_top {p : ℝ≥0∞} (hp1 : 1 < p) (hp : p ≠ ∞) {m : ℕ} + (i : Fin m → Fin (finrank ℝ V)) : sobolevToTLConst V p i ≠ ∞ := + czConst_ne_top hp1 hp ENNReal.ofNat_ne_top + (ENNReal.mul_ne_top ENNReal.ofNat_ne_top (familyHormanderConst_ne_top _)) + +/-- **The blocks of `f` as convolutions with its derivatives**: for `1 ≤ p < ∞`, if +`g_α ∈ L_p(V)` is the weak derivative `∂_{e_{α_0}} ⋯ ∂_{e_{α_{m-1}}} f` for every multi-index +`α`, then for almost every `x` and every `j`, +`2^{jm} (ψ_{j+1} ⋆ f)(x) = ∑_α ((η_α)_{2^j} ⋆ g_α)(x)`. +This is the dilated identity `2^{jm} ψ_{j+1} = ∑_α ∂^α ((η_α)_{2^j})` +(`Rd.two_pow_smul_psi_succ_eq_sum`) with each derivative moved from the kernel to `f` +(`Rd.conv_eq_conv_iteratedLineDerivOp`). -/ +theorem two_pow_mul_blockFun_succ_ae (hp : p ≠ ∞) {m : ℕ} {f : Lp ℂ p (volume : Measure V)} + {g : (Fin m → Fin (finrank ℝ V)) → Lp ℂ p (volume : Measure V)} + (hg : ∀ i, HasWeakLineDeriv ⊤ (fun k => gridBasis V (i k)) f (g i)) : + ∀ᵐ x ∂volume, ∀ j, (2 : ℂ) ^ (j * m) * blockFun (j + 1) f x = + ∑ i, conv (derivFamily i j) (g i) volume x := by + refine ae_all_iff.2 fun j => ?_ + set K : (Fin m → Fin (finrank ℝ V)) → 𝓢(V, ℂ) := fun i => + ∂^{fun k => gridBasis V (i k)} (schwartzDilate (2 ^ j) (pow_ne_zero j two_ne_zero) + (derivKernel i)) with hKdef + have hsum : (fun y => ∑ i, (1 : ℂ) * K i y) = (2 : ℂ) ^ (j * m) • psi (V := V) (j + 1) := by + rw [two_pow_smul_psi_succ_eq_sum] + funext y + simp [K, Finset.sum_apply] + have h := conv_finsetSum_kernel_ae Fact.out hp Finset.univ (fun _ => (1 : ℂ)) + (K := fun i => ⇑(K i)) (fun i _ => (K i).integrable) (Lp.memLp f) + rw [hsum, smul_conv] at h + filter_upwards [h] with x hx + simp only [Pi.smul_apply, smul_eq_mul, one_mul] at hx + rw [blockFun, hx] + refine Finset.sum_congr rfl fun i _ => ?_ + rw [hKdef, ← conv_eq_conv_iteratedLineDerivOp (hg i), coe_schwartzDilate] + rfl + +/-- **The pointwise bound of the higher blocks**: for `1 ≤ p < ∞`, under the hypotheses of +`Rd.two_pow_mul_blockFun_succ_ae`, for almost every `x`, +`‖(2^{(j+1)m} (ψ_{j+1} ⋆ f)(x))_j‖_{ℓ_2} ≤ 2^m ∑_α ‖(((η_α)_{2^j} ⋆ g_α)(x))_j‖_{ℓ_2}`, by +Minkowski's inequality in `ℓ_2` (`ENNReal.lqNorm_dyadicWeight_succ_le_sum`). -/ +theorem lqNorm_blockFun_succ_le_sum_ae (hp : p ≠ ∞) {m : ℕ} {f : Lp ℂ p (volume : Measure V)} + {g : (Fin m → Fin (finrank ℝ V)) → Lp ℂ p (volume : Measure V)} + (hg : ∀ i, HasWeakLineDeriv ⊤ (fun k => gridBasis V (i k)) f (g i)) : + ∀ᵐ x ∂volume, + lqNorm 2 (fun n => dyadicWeight (m : ℝ) (n + 1) * ‖blockFun (n + 1) f x‖ₑ) ≤ + 2 ^ m * ∑ i, lqNorm 2 (fun n => ‖conv (derivFamily i n) (g i) volume x‖ₑ) := by + filter_upwards [two_pow_mul_blockFun_succ_ae hp hg] with x hx + refine ENNReal.lqNorm_dyadicWeight_succ_le_sum one_le_two Finset.univ fun n => ?_ + rw [← enorm_two_pow_complex, ← eNorm_mul, hx n] + exact eNorm_sum_le _ _ + +/-- **The higher blocks in `L_p(ℓ_2)`**: in dimension `n ≥ 1`, for `1 < p < ∞`, under the +hypotheses of `Rd.two_pow_mul_blockFun_succ_ae`, +`‖ x ↦ ‖(2^{(j+1)m} (ψ_{j+1} ⋆ f)(x))_j‖_{ℓ_2} ‖_p ≤ 2^m ∑_α K_α ‖g_α‖_p` with +`K_α = Rd.sobolevToTLConst V p α`: the pointwise bound `Rd.lqNorm_blockFun_succ_le_sum_ae`, +Minkowski's inequality in `L_p` (`MeasureTheory.eLpNorm_le_const_mul_sum_of_ae_le`), and the +analysis bound of the families `((η_α)_{2^j})_j` (`Rd.IsCZFamily.eLpNorm_lqNorm_conv_le`). -/ +theorem eLpNorm_lqNorm_blockFun_succ_le [Nontrivial V] (hp1 : 1 < p) (hp : p ≠ ∞) {m : ℕ} + {f : Lp ℂ p (volume : Measure V)} + {g : (Fin m → Fin (finrank ℝ V)) → Lp ℂ p (volume : Measure V)} + (hg : ∀ i, HasWeakLineDeriv ⊤ (fun k => gridBasis V (i k)) f (g i)) : + eLpNorm (fun x => lqNorm 2 (fun n => + dyadicWeight (m : ℝ) (n + 1) * ‖blockFun (n + 1) f x‖ₑ)) p volume ≤ + 2 ^ m * ∑ i, sobolevToTLConst V p i * ‖g i‖ₑ := by + have hF : ∀ i, AEMeasurable + (fun x => lqNorm 2 (fun n => ‖conv (derivFamily i n) (g i) volume x‖ₑ)) volume := + fun i => aemeasurable_lqNorm_comp (fun n => (aestronglyMeasurable_conv + ((isCZFamily_derivFamily i).integrable n).aestronglyMeasurable + (Lp.aestronglyMeasurable (g i))).eNorm) 2 + refine (eLpNorm_le_const_mul_sum_of_ae_le (p := p) Fact.out Finset.univ + (aemeasurable_lqNorm_comp (fun n => + (aestronglyMeasurable_blockFun (n + 1) f).eNorm.const_mul _) 2) + (fun i _ => hF i) _ (lqNorm_blockFun_succ_le_sum_ae hp hg)).trans ?_ + gcongr with i + rw [Lp.eNorm_def] + exact (isCZFamily_derivFamily i).eLpNorm_lqNorm_conv_le hp1 hp (Lp.memLp (g i)) + +/-- **`W^m_p ⊆ F^m_{p,2}` with named constants**: in dimension `n ≥ 1`, for `1 < p < ∞` and +`f ∈ L_p(V)` whose weak derivatives `g_α = ∂_{e_{α_0}} ⋯ ∂_{e_{α_{m-1}}} f` along the orthonormal +basis `e` of `Rd.gridBasis` lie in `L_p(V)` for every multi-index `α`, +`‖f‖_{F^m_{p,2}} ≤ ‖Φ‖_1 ‖f‖_p + 2^m ∑_α K_α ‖g_α‖_p` with `K_α = Rd.sobolevToTLConst V p α`. +The block `j = 0` is split off from the `ℓ_2` norm +(`MeasureTheory.eLpNorm_lqNorm_dyadicWeight_le_zero_add_succ`) and bounded by Young's inequality +(`Rd.eLpNorm_blockFun_zero_le`); the other blocks by `Rd.eLpNorm_lqNorm_blockFun_succ_le`. -/ +theorem triebelLizorkinNorm_le_of_hasWeakLineDeriv [Nontrivial V] (hp1 : 1 < p) (hp : p ≠ ∞) + {m : ℕ} {f : Lp ℂ p (volume : Measure V)} + {g : (Fin m → Fin (finrank ℝ V)) → Lp ℂ p (volume : Measure V)} + (hg : ∀ i, HasWeakLineDeriv ⊤ (fun k => gridBasis V (i k)) f (g i)) : + triebelLizorkinNorm (m : ℝ) 2 f ≤ + eLpNorm (lpKernel (V := V)) 1 volume * ‖f‖ₑ + + 2 ^ m * ∑ i, sobolevToTLConst V p i * ‖g i‖ₑ := by + refine (eLpNorm_lqNorm_dyadicWeight_le_zero_add_succ (p := p) Fact.out one_le_two _ + fun j => (aestronglyMeasurable_blockFun j f).eNorm).trans ?_ + gcongr + · rw [eLpNorm_eNorm _ (aestronglyMeasurable_blockFun 0 f)] + exact eLpNorm_blockFun_zero_le hp f + · exact eLpNorm_lqNorm_blockFun_succ_le hp1 hp hg + +/-- **The weak derivatives of order `m` along the basis vectors give `f ∈ F^m_{p,2}`**: in +dimension `n ≥ 1`, for `1 < p < ∞`, if the weak derivatives `g_α = ∂^α f` of order `m` along the +basis `e` of `Rd.gridBasis` lie in `L_p(V)` for every multi-index `α`, then `f ∈ F^m_{p,2}(V)`, +since the bound `Rd.triebelLizorkinNorm_le_of_hasWeakLineDeriv` is finite. -/ +theorem memTriebelLizorkin_of_hasWeakLineDeriv [Nontrivial V] (hp1 : 1 < p) (hp : p ≠ ∞) + {m : ℕ} {f : Lp ℂ p (volume : Measure V)} + {g : (Fin m → Fin (finrank ℝ V)) → Lp ℂ p (volume : Measure V)} + (hg : ∀ i, HasWeakLineDeriv ⊤ (fun k => gridBasis V (i k)) f (g i)) : + MemTriebelLizorkin (m : ℝ) 2 f := + (triebelLizorkinNorm_le_of_hasWeakLineDeriv hp1 hp hg).trans_lt + (ENNReal.add_lt_top.2 ⟨ENNReal.mul_lt_top + eLpNorm_lpKernel_lt_top eNorm_lt_top, + ENNReal.mul_lt_top (ENNReal.pow_lt_top ENNReal.ofNat_lt_top) (ENNReal.sum_lt_top.2 fun i _ => + ENNReal.mul_lt_top (sobolevToTLConst_ne_top hp1 hp i).lt_top eNorm_lt_top)⟩) + +/-- **`W^m_p ⊆ F^m_{p,2}`**: in dimension `n ≥ 1`, for `1 < p < ∞`, every `f ∈ W^m_p(V)` lies in +`F^m_{p,2}(V)`; the weak derivatives of order `m` along the basis vectors suffice +(`Rd.memTriebelLizorkin_of_hasWeakLineDeriv`). -/ +theorem memTriebelLizorkin_of_memSobolev [Nontrivial V] (hp1 : 1 < p) (hp : p ≠ ∞) {m : ℕ} + {f : Lp ℂ p (volume : Measure V)} (hf : MemSobolev m f) : MemTriebelLizorkin (m : ℝ) 2 f := by + have hd : ∀ i : Fin m → Fin (finrank ℝ V), ∃ g : Lp ℂ p (volume : Measure V), + HasWeakLineDeriv ⊤ (fun k => gridBasis V (i k)) f g := fun i => + (memSobolev_iff_exists_hasWeakLineDeriv f).1 hf m le_rfl _ + choose g hg using hd + exact memTriebelLizorkin_of_hasWeakLineDeriv hp1 hp hg + +/-! ### `F^m_{p,2} ⊆ W^m_p` -/ + +/-- The constant `C_w = S_{V,p}(4 ((8π)^k ∏_l ‖w_l‖)², 4 H_{Ã^w})` of the bound +`F^k_{p,2} ⊆ W^k_p` for the directions `w ∈ V^k`: the strong type constant `Rd.czConst` of the +Calderón–Zygmund family `((∂^w G̃_j)_{2^j})_j` of the rescaled derivatives of the synthesis +kernels (`Rd.isCZFamily_derivDualFamily`). -/ +noncomputable def tlToSobolevConst (p : ℝ≥0∞) {k : ℕ} (w : Fin k → V) : ℝ≥0∞ := + czConst V p (derivDualOverlap w) (4 * familyHormanderConst V (derivDualBound w)) + +/-- The constant `Rd.tlToSobolevConst p w` is finite for `1 < p < ∞`. -/ +theorem tlToSobolevConst_ne_top {p : ℝ≥0∞} (hp1 : 1 < p) (hp : p ≠ ∞) {k : ℕ} (w : Fin k → V) : + tlToSobolevConst p w ≠ ∞ := + czConst_ne_top hp1 hp (derivDualOverlap_ne_top w) + (ENNReal.mul_ne_top ENNReal.ofNat_ne_top (familyHormanderConst_ne_top _)) + +omit [Fact (1 ≤ p)] in +/-- **The synthesis bound with scaled coefficients**: in dimension `n ≥ 1`, for `1 < p < ∞`, a +Calderón–Zygmund family `(θ_j)_j` with overlap `B` and Hörmander constant `H`, coefficients +`c_j ∈ ℂ` with `|c_j| = 2^{jσ}`, every finite set `t ⊆ ℕ` and functions `g_j ∈ L_p(V)`, +`‖∑_{j ∈ t} θ_j ⋆ (c_j g_j)‖_p ≤ S ‖ x ↦ ‖(1_t(j) 2^{jσ} |g_j(x)|)_j‖_{ℓ_2} ‖_p` with +`S = Rd.czConst V p B H`: the synthesis bound of the family +(`Rd.IsCZFamily.eLpNorm_sum_conv_le`) for the functions `1_t(j) c_j g_j`. -/ +theorem IsCZFamily.eLpNorm_sum_conv_smul_le [Nontrivial V] {θ : ℕ → V → ℂ} {B H : ℝ≥0∞} + (hθ : IsCZFamily θ B H) (hp1 : 1 < p) (hp : p ≠ ∞) {σ : ℝ} {c : ℕ → ℂ} + (hc : ∀ j, ‖c j‖ₑ = dyadicWeight σ j) (t : Finset ℕ) {g : ℕ → V → ℂ} + (hg : ∀ j, MemLp (g j) p volume) : + eLpNorm (fun x => ∑ j ∈ t, conv (θ j) (c j • g j) volume x) p volume ≤ + czConst V p B H * eLpNorm (fun x => lqNorm 2 fun j => + if j ∈ t then dyadicWeight σ j * ‖g j x‖ₑ else 0) p volume := by + set a : ℕ → V → ℂ := fun j => (if j ∈ t then c j else 0) • g j + have ha : ∀ j, MemLp (a j) p volume := fun j => (hg j).const_smul _ + have hsum : (fun x => ∑ j ∈ t, conv (θ j) (c j • g j) volume x) = + fun x => ∑ j ∈ t, conv (θ j) (a j) volume x := by + funext x + refine Finset.sum_congr rfl fun j hj => ?_ + simp only [a, hj, ↓reduceIte] + have hnorm : (fun x => lqNorm 2 fun j => ‖a j x‖ₑ) = fun x => lqNorm 2 fun j => + if j ∈ t then dyadicWeight σ j * ‖g j x‖ₑ else 0 := by + funext x + congr 1 + funext j + by_cases h : j ∈ t + · simp only [a, h, ↓reduceIte, Pi.smul_apply, smul_eq_mul, eNorm_mul, hc] + · simp only [a, h, ↓reduceIte, zero_smul, Pi.zero_apply, eNorm_zero] + rw [hsum, ← hnorm] + exact hθ.eLpNorm_sum_conv_le hp1 hp t ha + +/-- **The synthesis bound with scaled blocks**: in dimension `n ≥ 1`, for `1 < p < ∞`, a +Calderón–Zygmund family `(θ_j)_j` with overlap `B` and Hörmander constant `H`, coefficients +`c_j ∈ ℂ` with `|c_j| = 2^{jσ}`, every finite set `t ⊆ ℕ` and `f ∈ L_p(V)`, +`‖∑_{j ∈ t} θ_j ⋆ (c_j ψ_j ⋆ f)‖_p ≤ S ‖ x ↦ ‖(1_t(j) 2^{jσ} (ψ_j ⋆ f)(x))_j‖_{ℓ_2} ‖_p` with +`S = Rd.czConst V p B H`: `Rd.IsCZFamily.eLpNorm_sum_conv_smul_le` for the blocks `ψ_j ⋆ f`, +which lie in `L_p(V)` (`Rd.memLp_blockFun`). -/ +theorem IsCZFamily.eLpNorm_sum_conv_smul_blockFun_le [Nontrivial V] {θ : ℕ → V → ℂ} + {B H : ℝ≥0∞} (hθ : IsCZFamily θ B H) (hp1 : 1 < p) (hp : p ≠ ∞) {σ : ℝ} {c : ℕ → ℂ} + (hc : ∀ j, ‖c j‖ₑ = dyadicWeight σ j) (t : Finset ℕ) (f : Lp ℂ p (volume : Measure V)) : + eLpNorm (fun x => ∑ j ∈ t, conv (θ j) (c j • blockFun j f) volume x) p volume ≤ + czConst V p B H * eLpNorm (fun x => lqNorm 2 fun j => + if j ∈ t then dyadicWeight σ j * ‖blockFun j f x‖ₑ else 0) p volume := + hθ.eLpNorm_sum_conv_smul_le hp1 hp hc t fun j => memLp_blockFun hp j f + +/-- **The synthesis bound for derivatives of the synthesis kernels**: in dimension `n ≥ 1`, for +`1 < p < ∞`, directions `w ∈ V^k`, every finite set `s ⊆ ℕ` and `f ∈ L_p(V)`, +`‖∑_{j ∈ s} (∂^w ψ̃_j) ⋆ (ψ_j ⋆ f)‖_p ≤ C_w ‖ x ↦ ‖(1_s(j) 2^{jk} (ψ_j ⋆ f)(x))_j‖_{ℓ_2} ‖_p` +with `C_w = Rd.tlToSobolevConst p w`. Since `∂^w ψ̃_j = 2^{jk} (∂^w G̃_j)_{2^j}` +(`Rd.iteratedLineDerivOp_psiDualS`), this is the synthesis bound of the family +`((∂^w G̃_j)_{2^j})_j` with the coefficients `2^{jk}`, `|2^{jk}| = 2^{jk}` +(`Rd.IsCZFamily.eLpNorm_sum_conv_smul_blockFun_le`). -/ +theorem eLpNorm_sum_conv_derivDual_le [Nontrivial V] (hp1 : 1 < p) (hp : p ≠ ∞) {k : ℕ} + (w : Fin k → V) (s : Finset ℕ) (f : Lp ℂ p (volume : Measure V)) : + eLpNorm (fun x => ∑ j ∈ s, conv (∂^{w} (psiDualS j) : 𝓢(V, ℂ)) (blockFun j f) volume x) + p volume ≤ + tlToSobolevConst p w * eLpNorm (fun x => lqNorm 2 fun j => + if j ∈ s then dyadicWeight (k : ℝ) j * ‖blockFun j f x‖ₑ else 0) p volume := by + have hsum : + (fun x => ∑ j ∈ s, conv (∂^{w} (psiDualS j) : 𝓢(V, ℂ)) (blockFun j f) volume x) = + fun x => ∑ j ∈ s, conv (derivDualFamily w j) (((2 : ℂ) ^ (j * k)) • blockFun j f) + volume x := by + funext x + refine Finset.sum_congr rfl fun j _ => ?_ + simp only [iteratedLineDerivOp_psiDualS, smul_conv, conv_smul, Pi.smul_apply] + rw [hsum] + exact (isCZFamily_derivDualFamily w).eLpNorm_sum_conv_smul_blockFun_le hp1 hp + (c := fun j => (2 : ℂ) ^ (j * k)) + (fun j => by rw [ENNReal.dyadicWeight_natCast]; exact enorm_two_pow_complex _) s f + +/-- The **synthesis sums** `∑_{j ∈ t} K_j ⋆ (ψ_j ⋆ f)` of Schwartz kernels `K_j` and the blocks of +`f ∈ L_p(V)` lie in `L_p(V)` for `1 ≤ p < ∞`, by Young's inequality. -/ +theorem memLp_sum_conv_blockFun (hp : p ≠ ∞) (K : ℕ → 𝓢(V, ℂ)) + (f : Lp ℂ p (volume : Measure V)) (t : Finset ℕ) : + MemLp (fun x => ∑ j ∈ t, conv (K j) (blockFun j f) volume x) p volume := + memLp_finsetSum _ fun j _ => memLp_conv Fact.out hp (K j).integrable (memLp_blockFun hp j f) + +omit [Fact (1 ≤ p)] in +/-- **Differences of synthesis sums**: let `σ` be real and `K_j` Schwartz kernels with +`‖∑_{j ∈ t} K_j ⋆ (ψ_j ⋆ f)‖_p ≤ C ‖ x ↦ ‖(1_t(j) 2^{jσ} (ψ_j ⋆ f)(x))_j‖_{ℓ_2} ‖_p` for every +finite `t`. For `N ≤ N'` the difference of the partial sums `∑_{j < J} K_j ⋆ (ψ_j ⋆ f)` at `N'` +and at `N` is the sum over `{N, …, N' - 1}`, so its `L_p` norm is at most +`C ‖ x ↦ ‖(2^{jσ} (ψ_j ⋆ f)(x))_{j ≥ N}‖_{ℓ_2} ‖_p` (`MeasureTheory.eLpNorm_lqNorm_ite_mono`). -/ +theorem eLpNorm_sum_conv_blockFun_sub_le {σ : ℝ} {K : ℕ → 𝓢(V, ℂ)} {C : ℝ≥0∞} + {f : Lp ℂ p (volume : Measure V)} + (hK : ∀ t : Finset ℕ, eLpNorm (fun x => ∑ j ∈ t, conv (K j) (blockFun j f) volume x) + p volume ≤ C * eLpNorm (fun x => lqNorm 2 fun j => + if j ∈ t then dyadicWeight σ j * ‖blockFun j f x‖ₑ else 0) p volume) + {N N' : ℕ} (hNN' : N ≤ N') : + eLpNorm ((fun x => ∑ j ∈ Finset.range N', conv (K j) (blockFun j f) volume x) - + fun x => ∑ j ∈ Finset.range N, conv (K j) (blockFun j f) volume x) p volume ≤ + C * eLpNorm (fun x => lqNorm 2 fun j => + if N ≤ j then dyadicWeight σ j * ‖blockFun j f x‖ₑ else 0) p volume := by + have hd : (fun x => ∑ j ∈ Finset.range N', conv (K j) (blockFun j f) volume x) - + (fun x => ∑ j ∈ Finset.range N, conv (K j) (blockFun j f) volume x) = + fun x => ∑ j ∈ Finset.Ico N N', conv (K j) (blockFun j f) volume x := by + funext x + rw [Pi.sub_apply, Finset.sum_Ico_eq_sub _ hNN'] + rw [hd] + refine (hK _).trans ?_ + gcongr + exact eLpNorm_lqNorm_ite_mono (P := (· ∈ Finset.Ico N N')) (Q := (N ≤ ·)) + (fun j => (aestronglyMeasurable_blockFun j f).eNorm.const_mul _) + fun j hj => (Finset.mem_Ico.1 hj).1 + +/-- **Cauchy synthesis sums**: let `1 ≤ p < ∞`, `σ` real, `f ∈ F^σ_{p,2}(V)` and `K_j` Schwartz +kernels with +`‖∑_{j ∈ t} K_j ⋆ (ψ_j ⋆ f)‖_p ≤ C ‖ x ↦ ‖(1_t(j) 2^{jσ} (ψ_j ⋆ f)(x))_j‖_{ℓ_2} ‖_p` for every +finite `t` and some finite `C`. Then the classes of the partial sums +`∑_{j < J} K_j ⋆ (ψ_j ⋆ f)` form a Cauchy sequence in `L_p(V)`: their differences are bounded by +the tails of the weighted blocks (`Rd.eLpNorm_sum_conv_blockFun_sub_le`), which tend to zero +(`MeasureTheory.cauchySeq_of_edist_le_lqNorm_ite`). -/ +theorem cauchySeq_toLp_sum_conv_blockFun (hp : p ≠ ∞) {σ : ℝ} {K : ℕ → 𝓢(V, ℂ)} {C : ℝ≥0∞} + (hC : C ≠ ∞) {f : Lp ℂ p (volume : Measure V)} (hf : MemTriebelLizorkin σ 2 f) + (hK : ∀ t : Finset ℕ, eLpNorm (fun x => ∑ j ∈ t, conv (K j) (blockFun j f) volume x) + p volume ≤ C * eLpNorm (fun x => lqNorm 2 fun j => + if j ∈ t then dyadicWeight σ j * ‖blockFun j f x‖ₑ else 0) p volume) : + CauchySeq fun J => (memLp_sum_conv_blockFun hp K f (Finset.range J)).toLp _ := + cauchySeq_of_edist_le_lqNorm_ite (p := p) (q := 2) + (g := fun j x => dyadicWeight σ j * ‖blockFun j f x‖ₑ) hC + (zero_lt_one.trans_le Fact.out).ne' hp two_ne_zero ENNReal.ofNat_ne_top + (fun j => (aestronglyMeasurable_blockFun j f).eNorm.const_mul _) hf.ne fun N N' hNN' => by + simp only [Lp.edist_toLp_toLp] + exact eLpNorm_sum_conv_blockFun_sub_le hK hNN' + +/-- **Convergent synthesis sums**: under the hypotheses of +`Rd.cauchySeq_toLp_sum_conv_blockFun`, the partial sums `∑_{j < J} K_j ⋆ (ψ_j ⋆ f)` converge in +`L_p(V)` to some `g` with `‖g‖_p ≤ C ‖f‖_{F^σ_{p,2}}`. -/ +theorem exists_tendsto_sum_conv_blockFun (hp : p ≠ ∞) {σ : ℝ} {K : ℕ → 𝓢(V, ℂ)} {C : ℝ≥0∞} + (hC : C ≠ ∞) {f : Lp ℂ p (volume : Measure V)} (hf : MemTriebelLizorkin σ 2 f) + (hK : ∀ t : Finset ℕ, eLpNorm (fun x => ∑ j ∈ t, conv (K j) (blockFun j f) volume x) + p volume ≤ C * eLpNorm (fun x => lqNorm 2 fun j => + if j ∈ t then dyadicWeight σ j * ‖blockFun j f x‖ₑ else 0) p volume) : + ∃ g : Lp ℂ p (volume : Measure V), + Tendsto (fun J => eLpNorm ((fun x => ∑ j ∈ Finset.range J, + conv (K j) (blockFun j f) volume x) - ⇑g) p volume) atTop (𝓝 0) ∧ + ‖g‖ₑ ≤ C * triebelLizorkinNorm σ 2 f := by + obtain ⟨g, hg⟩ := cauchySeq_tendsto_of_complete (cauchySeq_toLp_sum_conv_blockFun hp hC hf hK) + refine ⟨g, ((Lp.tendsto_Lp_iff_tendsto_eLpNorm' _ g).1 hg).congr fun J => + eLpNorm_congr_ae ((MemLp.coeFn_toLp _).sub EventuallyEq.rfl), le_of_tendsto' hg.eNorm + fun J => ?_⟩ + rw [Lp.eNorm_def, eLpNorm_congr_ae (MemLp.coeFn_toLp _)] + refine (hK _).trans ?_ + gcongr + exact eLpNorm_lqNorm_ite_blockFun_le _ _ f + +omit [Fact (1 ≤ p)] in +/-- The **partial sums of the derivative** `∂^w f`: `∑_{j < J} (∂^w ψ̃_j) ⋆ (ψ_j ⋆ f)`, the +derivatives of the reproducing sums `∑_{j < J} ψ̃_j ⋆ (ψ_j ⋆ f)`. -/ +noncomputable def derivSynthesisSum {k : ℕ} (w : Fin k → V) (f : Lp ℂ p (volume : Measure V)) + (J : ℕ) : V → ℂ := + fun x => ∑ j ∈ Finset.range J, conv (∂^{w} (psiDualS j) : 𝓢(V, ℂ)) (blockFun j f) volume x + +/-- The partial sums of the derivative lie in `L_p(V)` for `1 ≤ p < ∞`, by Young's inequality +(`Rd.memLp_sum_conv_blockFun`). -/ +theorem memLp_derivSynthesisSum (hp : p ≠ ∞) {k : ℕ} (w : Fin k → V) + (f : Lp ℂ p (volume : Measure V)) (J : ℕ) : MemLp (derivSynthesisSum w f J) p volume := + memLp_sum_conv_blockFun hp (fun j => ∂^{w} (psiDualS j)) f (Finset.range J) + +/-- **Differences of partial sums**: in dimension `n ≥ 1`, for `1 < p < ∞` and `N ≤ N'`, the +difference of the partial sums `Rd.derivSynthesisSum` at `N'` and at `N` has `L_p` norm at most +`C_w ‖ x ↦ ‖(2^{jk} (ψ_j ⋆ f)(x))_{j ≥ N}‖_{ℓ_2} ‖_p` (`Rd.eLpNorm_sum_conv_blockFun_sub_le` with +the synthesis bound `Rd.eLpNorm_sum_conv_derivDual_le`). -/ +theorem eLpNorm_derivSynthesisSum_sub_le [Nontrivial V] (hp1 : 1 < p) (hp : p ≠ ∞) {k : ℕ} + (w : Fin k → V) (f : Lp ℂ p (volume : Measure V)) {N N' : ℕ} (hNN' : N ≤ N') : + eLpNorm (derivSynthesisSum w f N' - derivSynthesisSum w f N) p volume ≤ + tlToSobolevConst p w * eLpNorm (fun x => lqNorm 2 fun j => + if N ≤ j then dyadicWeight (k : ℝ) j * ‖blockFun j f x‖ₑ else 0) p volume := + eLpNorm_sum_conv_blockFun_sub_le (K := fun j => (∂^{w} (psiDualS j) : 𝓢(V, ℂ))) + (fun t => eLpNorm_sum_conv_derivDual_le hp1 hp w t f) hNN' + +/-- **The partial sums of the derivative converge**: in dimension `n ≥ 1`, for `1 < p < ∞`, +`w ∈ V^k` and `f ∈ F^k_{p,2}(V)`, the classes in `L_p(V)` of the partial sums +`Rd.derivSynthesisSum w f J` form a Cauchy sequence (`Rd.cauchySeq_toLp_sum_conv_blockFun` with +the synthesis bound `Rd.eLpNorm_sum_conv_derivDual_le`). -/ +theorem cauchySeq_toLp_derivSynthesisSum [Nontrivial V] (hp1 : 1 < p) (hp : p ≠ ∞) {k : ℕ} + (w : Fin k → V) {f : Lp ℂ p (volume : Measure V)} (hf : MemTriebelLizorkin (k : ℝ) 2 f) : + CauchySeq fun J => (memLp_derivSynthesisSum hp w f J).toLp := + cauchySeq_toLp_sum_conv_blockFun hp (K := fun j => (∂^{w} (psiDualS j) : 𝓢(V, ℂ))) + (tlToSobolevConst_ne_top hp1 hp w) hf fun t => eLpNorm_sum_conv_derivDual_le hp1 hp w t f + +/-- **The partial sums are weak derivatives**: for `1 ≤ p < ∞`, `w ∈ V^k` and `f ∈ L_p(V)`, +`Rd.derivSynthesisSum w f J` is the weak derivative `∂^w` of the reproducing sum +`∑_{j < J} ψ̃_j ⋆ (ψ_j ⋆ f)` on `V` (`Rd.hasWeakLineDeriv_conv` for each term, +`Rd.HasWeakLineDeriv.sum`). -/ +theorem hasWeakLineDeriv_sum_conv_psiDual (hp : p ≠ ∞) {k : ℕ} (w : Fin k → V) + (f : Lp ℂ p (volume : Measure V)) (J : ℕ) : + HasWeakLineDeriv ⊤ w + (fun x => ∑ j ∈ Finset.range J, conv (psiDual j) (blockFun j f) volume x) + (derivSynthesisSum w f J) := by + have h := HasWeakLineDeriv.sum (s := Finset.range J) fun j _ => + hasWeakLineDeriv_conv Fact.out hp (memLp_blockFun hp j f) (psiDualS j) w + simp only [coe_psiDualS] at h + rw [Finset.sum_fn, Finset.sum_fn] at h + exact h + +/-- **`F^k_{p,2} ⊆ W^k_p` with named constants**: in dimension `n ≥ 1`, for `1 < p < ∞`, +directions `w ∈ V^k` and `f ∈ F^k_{p,2}(V)`, the weak derivative `∂^w f` exists on `V` as a +class `g ∈ L_p(V)` with `‖g‖_p ≤ C_w ‖f‖_{F^k_{p,2}}`, `C_w = Rd.tlToSobolevConst p w`. +The function `g` is the limit of the partial sums `Rd.derivSynthesisSum w f J` +(`Rd.exists_tendsto_sum_conv_blockFun` with the synthesis bound +`Rd.eLpNorm_sum_conv_derivDual_le`), the weak derivatives of the reproducing sums, which tend to +`f` (`Rd.tendsto_eLpNorm_sum_conv_psiDual_blockFun_sub`); weak derivatives pass to the limit +(`Rd.HasWeakLineDeriv.of_tendsto`). -/ +theorem exists_hasWeakLineDeriv_of_memTriebelLizorkin [Nontrivial V] (hp1 : 1 < p) + (hp : p ≠ ∞) {k : ℕ} (w : Fin k → V) {f : Lp ℂ p (volume : Measure V)} + (hf : MemTriebelLizorkin (k : ℝ) 2 f) : + ∃ g : Lp ℂ p (volume : Measure V), HasWeakLineDeriv ⊤ w f g ∧ + ‖g‖ₑ ≤ tlToSobolevConst p w * triebelLizorkinNorm (k : ℝ) 2 f := by + obtain ⟨g, hS, hg⟩ := exists_tendsto_sum_conv_blockFun hp + (K := fun j => (∂^{w} (psiDualS j) : 𝓢(V, ℂ))) (tlToSobolevConst_ne_top hp1 hp w) hf + fun t => eLpNorm_sum_conv_derivDual_le hp1 hp w t f + refine ⟨g, ?_, hg⟩ + refine HasWeakLineDeriv.of_tendsto (p := p) (r := p) (l := atTop) Fact.out Fact.out + (fun J => hasWeakLineDeriv_sum_conv_psiDual hp w f J) ?_ ?_ ?_ ?_ <;> + rw [volume_restrict_top] + exacts [Lp.memLp f, Lp.memLp g, tendsto_eLpNorm_sum_conv_psiDual_blockFun_sub hp f, hS] + +/-- **`F^m_{p,2} ⊆ W^m_p` with named constants**: in dimension `n ≥ 1`, for `1 < p < ∞`, +`k ≤ m`, directions `w ∈ V^k` and `f ∈ F^m_{p,2}(V)`, the weak derivative `∂^w f` exists on `V` +as a class `g ∈ L_p(V)` with `‖g‖_p ≤ C_w ‖f‖_{F^m_{p,2}}`, `C_w = Rd.tlToSobolevConst p w` +(`Rd.exists_hasWeakLineDeriv_of_memTriebelLizorkin` and +`‖f‖_{F^k_{p,2}} ≤ ‖f‖_{F^m_{p,2}}`, `Rd.triebelLizorkinNorm_mono_smoothness`). -/ +theorem exists_hasWeakLineDeriv_of_memTriebelLizorkin_of_le [Nontrivial V] (hp1 : 1 < p) + (hp : p ≠ ∞) {k m : ℕ} (hkm : k ≤ m) (w : Fin k → V) {f : Lp ℂ p (volume : Measure V)} + (hf : MemTriebelLizorkin (m : ℝ) 2 f) : + ∃ g : Lp ℂ p (volume : Measure V), HasWeakLineDeriv ⊤ w f g ∧ + ‖g‖ₑ ≤ tlToSobolevConst p w * triebelLizorkinNorm (m : ℝ) 2 f := by + have hkm' : (k : ℝ) ≤ m := Nat.cast_le.2 hkm + obtain ⟨g, hg, hgn⟩ := + exists_hasWeakLineDeriv_of_memTriebelLizorkin hp1 hp w (hf.mono_smoothness hkm') + refine ⟨g, hg, hgn.trans ?_⟩ + gcongr + exact triebelLizorkinNorm_mono_smoothness hkm' 2 f + +/-- **`F^m_{p,2} ⊆ W^m_p`**: in dimension `n ≥ 1`, for `1 < p < ∞`, every `f ∈ F^m_{p,2}(V)` lies +in `W^m_p(V)` (`Rd.exists_hasWeakLineDeriv_of_memTriebelLizorkin_of_le`). -/ +theorem memSobolev_of_memTriebelLizorkin [Nontrivial V] (hp1 : 1 < p) (hp : p ≠ ∞) {m : ℕ} + {f : Lp ℂ p (volume : Measure V)} (hf : MemTriebelLizorkin (m : ℝ) 2 f) : MemSobolev m f := + (memSobolev_iff_exists_hasWeakLineDeriv f).2 fun _ hk w => + (exists_hasWeakLineDeriv_of_memTriebelLizorkin_of_le hp1 hp hk w hf).imp fun _ hg => hg.1 + +/-- **`W^m_p = F^m_{p,2}`**: in dimension `n ≥ 1`, for `1 < p < ∞`, `m ∈ ℕ` and `f ∈ L_p(V)`, +`f ∈ W^m_p(V)` iff `f ∈ F^m_{p,2}(V)`. The norm bounds are +`Rd.triebelLizorkinNorm_le_of_hasWeakLineDeriv` and +`Rd.exists_hasWeakLineDeriv_of_memTriebelLizorkin_of_le`. -/ +theorem memSobolev_iff_memTriebelLizorkin [Nontrivial V] (hp1 : 1 < p) (hp : p ≠ ∞) {m : ℕ} + (f : Lp ℂ p (volume : Measure V)) : MemSobolev m f ↔ MemTriebelLizorkin (m : ℝ) 2 f := + ⟨memTriebelLizorkin_of_memSobolev hp1 hp, memSobolev_of_memTriebelLizorkin hp1 hp⟩ + +/-! ### The Besov sandwich -/ + +/-- **`W^m_p ⊆ B^m_{p,max(p,2)}`**: in dimension `n ≥ 1`, for `1 < p < ∞` and `m ≥ 1`, every +`f ∈ W^m_p(V)` lies in the approximation space `A^m_{max(p,2)}` of the band-limited scheme, the +Besov space `B^m_{p,max(p,2)}(V)` (`Rd.memApprox_of_memTriebelLizorkin`). -/ +theorem memApprox_of_memSobolev [Nontrivial V] (hp1 : 1 < p) (hp : p ≠ ∞) {m : ℕ} (hm : 1 ≤ m) + {f : Lp ℂ p (volume : Measure V)} (hf : MemSobolev m f) : + (bandScheme hp).MemApprox (m : ℝ) (max p 2) f := + memApprox_of_memTriebelLizorkin hp (Nat.cast_pos.2 hm) one_le_two + (memTriebelLizorkin_of_memSobolev hp1 hp hf) + +/-- **`B^m_{p,min(p,2)} ⊆ W^m_p`**: in dimension `n ≥ 1`, for `1 < p < ∞` and `m ∈ ℕ`, every +`f` in the approximation space `A^m_{min(p,2)}` of the band-limited scheme, the Besov space +`B^m_{p,min(p,2)}(V)`, lies in `W^m_p(V)` (`Rd.memTriebelLizorkin_two_of_memApprox`). -/ +theorem memSobolev_of_memApprox [Nontrivial V] (hp1 : 1 < p) (hp : p ≠ ∞) {m : ℕ} + {f : Lp ℂ p (volume : Measure V)} (hf : (bandScheme hp).MemApprox (m : ℝ) (min p 2) f) : + MemSobolev m f := + memSobolev_of_memTriebelLizorkin hp1 hp + (memTriebelLizorkin_two_of_memApprox hp1 hp (Nat.cast_nonneg m) hf) + +/-- **`W^m_2 = B^m_{2,2}`**: for `p = 2` and every order `m ≥ 1`, in dimension `n ≥ 1`, +`f ∈ L_2(V)` lies in `W^m_2(V)` iff `f` lies in the approximation space `A^m_2` of the +band-limited scheme, the Besov space `B^m_{2,2}(V)`, since `F^m_{2,2} = B^m_{2,2}` +(`Rd.memTriebelLizorkin_iff_memApprox`). The case `m = 1` holds in every dimension +(`Rd.memSobolev_one_iff_memApprox`). -/ +theorem memSobolev_two_iff_memApprox [Nontrivial V] {m : ℕ} (hm : 1 ≤ m) + (f : Lp ℂ 2 (volume : Measure V)) : + MemSobolev m f ↔ (bandScheme (V := V) two_ne_top).MemApprox (m : ℝ) 2 f := by + rw [memSobolev_iff_memTriebelLizorkin ENNReal.one_lt_two two_ne_top, + memTriebelLizorkin_iff_memApprox two_ne_top (Nat.cast_pos.2 hm)] + +/-- **`W^m_p ⊆ B^m_{p,max(p,2)}` with named constants**: under the hypotheses of +`Rd.triebelLizorkinNorm_le_of_hasWeakLineDeriv` and `m ≥ 1`, the approximation norm of `f` in +`A^m_{max(p,2)}` of the band-limited scheme is at most +`2 (1 - 2^{-m})⁻¹ (‖Φ‖_1 ‖f‖_p + 2^m ∑_α K_α ‖g_α‖_p)` +(`Rd.approxNormDyadic_le_triebelLizorkinNorm`). -/ +theorem approxNormDyadic_le_of_hasWeakLineDeriv [Nontrivial V] (hp1 : 1 < p) (hp : p ≠ ∞) + {m : ℕ} (hm : 1 ≤ m) {f : Lp ℂ p (volume : Measure V)} + {g : (Fin m → Fin (finrank ℝ V)) → Lp ℂ p (volume : Measure V)} + (hg : ∀ i, HasWeakLineDeriv ⊤ (fun k => gridBasis V (i k)) f (g i)) : + (bandScheme hp).approxNormDyadic (m : ℝ) (max p 2) f ≤ + 2 * (1 - (2 : ℝ≥0∞) ^ (-(m : ℝ)))⁻¹ * (eLpNorm (lpKernel (V := V)) 1 volume * ‖f‖ₑ + + 2 ^ m * ∑ i, sobolevToTLConst V p i * ‖g i‖ₑ) := + (approxNormDyadic_le_triebelLizorkinNorm hp (Nat.cast_pos.2 hm) one_le_two f).trans + (by gcongr; exact triebelLizorkinNorm_le_of_hasWeakLineDeriv hp1 hp hg) + +/-- **`B^m_{p,min(p,2)} ⊆ W^m_p` with named constants**: in dimension `n ≥ 1`, for `1 < p < ∞`, +`m ∈ ℕ`, `k ≤ m`, directions `w ∈ V^k` and `f` in the approximation space `A^m_{min(p,2)}` of +the band-limited scheme, the weak derivative `∂^w f` is a class `g ∈ L_p(V)` with +`‖g‖_p ≤ C_w · 8 · 2^{3m} ‖Φ‖_1 ‖f‖_{A^m_{min(p,2)}}`, `C_w = Rd.tlToSobolevConst p w` +(`Rd.triebelLizorkinNorm_le_approxNormDyadic`). -/ +theorem exists_hasWeakLineDeriv_of_memApprox [Nontrivial V] (hp1 : 1 < p) (hp : p ≠ ∞) + {k m : ℕ} (hkm : k ≤ m) (w : Fin k → V) {f : Lp ℂ p (volume : Measure V)} + (hf : (bandScheme hp).MemApprox (m : ℝ) (min p 2) f) : + ∃ g : Lp ℂ p (volume : Measure V), HasWeakLineDeriv ⊤ w f g ∧ + ‖g‖ₑ ≤ tlToSobolevConst p w * (8 * dyadicWeight (m : ℝ) 3 * + eLpNorm (lpKernel (V := V)) 1 volume * + (bandScheme hp).approxNormDyadic (m : ℝ) (min p 2) f) := by + obtain ⟨g, hg, hgn⟩ := exists_hasWeakLineDeriv_of_memTriebelLizorkin_of_le hp1 hp hkm w + (memTriebelLizorkin_two_of_memApprox hp1 hp (Nat.cast_nonneg m) hf) + refine ⟨g, hg, hgn.trans ?_⟩ + gcongr + exact triebelLizorkinNorm_le_approxNormDyadic hp (Nat.cast_nonneg m) one_le_two f + +end Rd diff --git a/LeanPool/FunctionSpaces/Rd/Sobolev/SobolevTwoLittlewoodPaley.lean b/LeanPool/FunctionSpaces/Rd/Sobolev/SobolevTwoLittlewoodPaley.lean new file mode 100644 index 0000000000..51f382e516 --- /dev/null +++ b/LeanPool/FunctionSpaces/Rd/Sobolev/SobolevTwoLittlewoodPaley.lean @@ -0,0 +1,907 @@ +/- +Copyright (c) 2026 Mario Ullrich. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Mario Ullrich +-/ +module + +public import LeanPool.FunctionSpaces.Rd.Sobolev.WeakDerivatives +public import LeanPool.FunctionSpaces.Rd.TriebelLizorkin.TriebelLizorkin +public import LeanPool.FunctionSpaces.Analysis.Maximal.DyadicGrid +public import Mathlib.Analysis.Fourier.Convolution +public import Mathlib.Analysis.Fourier.LpSpace +public import Mathlib.Analysis.Distribution.Sobolev +public import Mathlib.Analysis.FunctionalSpaces.BesselPotentialSpace + +/- +Modified for Lean Pool: module names and imports adapted. +-/ + +/-! +# Mathlib's Sobolev spaces `H^s(V)` by Littlewood–Paley blocks + +Let `V` be a finite-dimensional real inner product space, such as `ℝ^d`, with Lebesgue measure. +Mathlib's Sobolev space `H^s(V)` consists of the tempered distributions `u` whose Bessel potential +`J_s u = 𝓕⁻¹(⟨ξ⟩^s 𝓕u)`, `⟨ξ⟩^s = (1 + ‖ξ‖²)^(s/2)` (`Rd.besselWeight`), is an `L_2` function +(`TemperedDistribution.MemSobolev s 2`). For `s ≥ 0` this file identifies `H^s(V)` with the +Triebel–Lizorkin space `F^s_{2,2}(V)`, and for `s > 0` with the Besov space `B^s_{2,2}(V)`, with +explicit constants, and proves `W^1_2(V) = H^1(V) = B^1_{2,2}(V)`. + +* **Plancherel for the blocks**: `𝓕(K ⋆ f) = 𝓕K · 𝓕f` for an integrable `K` and `f ∈ L_2(V)` + (`Rd.fourier_convLp`), so `‖K ⋆ f‖_2² = ∫ |𝓕K|² |𝓕f|²` (`Rd.enorm_convLp_sq`), in particular + `‖ψ_j ⋆ f‖_2² = ∫ |𝓕ψ_j|² |𝓕f|²` (`Rd.enorm_lpBlock_sq`). +* **The Bessel potential on Schwartz functions**: `J_t u = 𝓕⁻(⟨ξ⟩^t 𝓕u)` (`Rd.besselSchwartz`) + is Mathlib's `J_t` on the tempered distribution of `u` (`Rd.besselPotential_schwartz`), with + inverse `J_{-t}` (`Rd.besselSchwartz_besselSchwartz_neg`). + Mathlib's Fourier multiplier `m(D)` of a temperate symbol `m` multiplies the Fourier transform + of a Schwartz function by `m` (`Rd.fourier_fourierMultiplierCLM_apply`); for even `m` it acts + on tempered distributions by + the transpose, `(m(D) T)(u) = T(m(D) u)` (`Rd.fourierMultiplierCLM_apply_apply_of_even`); for + the even Bessel weight this is `(J_t T)(u) = T(J_t u)` (`Rd.besselPotential_apply_apply`), so + `J_t` is symmetric on Schwartz functions (`Rd.integral_besselSchwartz_mul`). +* **The weight comparison**: at every frequency at most two blocks are nonzero, and their + Fourier transforms add up to `1` (`Rd.exists_fourier_psi_window`, in + `FunctionSpaces.Analysis.Fourier.LittlewoodPaleyKernels`); hence, for `s ≥ 0`, + `∑_j 2^{2js} |𝓕ψ_j(ξ)|² ≤ 2 · 4^s ⟨ξ⟩^{2s}` and `⟨ξ⟩^{2s} ≤ 2 · 5^s ∑_j 2^{2js} |𝓕ψ_j(ξ)|²` + (`Rd.tsum_dyadicWeight_fourier_psi_sq_le`, `Rd.ofReal_besselWeight_sq_le_tsum`). +* **`H^s = F^s_{2,2}`** (`Rd.memSobolev_two_iff_memTriebelLizorkin`): if `J_s f = h` with + `f, h ∈ L_2(V)`, then `‖f‖_{F^s_{2,2}} ≤ (2 · 4^s)^{1/2} ‖h‖_2` and + `‖h‖_2 ≤ (2 · 5^s)^{1/2} ‖f‖_{F^s_{2,2}}`; the Besov form + (`Rd.memSobolev_two_iff_exists_memApprox`) and the bundled space `H^{s}(V)` + (`Rd.exists_eq_toDistr_two`) follow. +* **`W^1_2 = H^1`** (`Rd.memSobolev_one_iff`), with `‖∂_v f‖_2 ≤ 2π ‖v‖ ‖J_1 f‖_2` and + `(2π)² ‖J_1 f‖_2² = (2π)² ‖f‖_2² + ∑_i ‖∂_{e_i} f‖_2²` for an orthonormal basis `(e_i)` + (`Rd.sq_norm_besselPotential_one_eq`), hence + `‖J_1 f‖_2² ≤ ‖f‖_2² + ∑_i ‖∂_{e_i} f‖_2²` (`Rd.sq_norm_besselPotential_one_le`). +* **`W^1_2 = B^1_{2,2}`** (`Rd.memSobolev_one_iff_memApprox`, `Rd.memSobolev_one_iff_modulus`): + `F ∈ W^1_2(V)` iff `‖F‖_2 + ‖(2^k ω_r(F, 2^(-k))_2)_k‖_{ℓ_2} < ∞`, for every order `r ≥ 2`. + +Two facts about tempered distributions carry the proofs: the product of a temperate weight `w` +with the distribution of an `L_p` function `g` is the distribution of `w g` when `w g` lies in +`L_q` (`Rd.smulLeftCLM_toTemperedDistribution_eq`), and an identity `w g = h` of distributions, +with `g` and `h` in `L_p` spaces, holds almost everywhere (`Rd.ae_eq_of_smulLeftCLM_eq`). An +`L_p` function is determined by its tempered distribution (`Rd.eq_of_toTemperedDistribution_eq`), +almost everywhere equal `L_p` and `L_r` classes have the same tempered distribution +(`Rd.toTemperedDistribution_eq_of_ae_eq`), and the norm of Mathlib's `H^{s,p}` is the `L_p` norm +of `J_s U`, also in `ℝ≥0∞` (`BesselPotentialSpace.enorm_toLp_eq`). +-/ + +@[expose] public section + +open MeasureTheory Filter Module +open scoped ENNReal SchwartzMap FourierTransform LineDeriv Real BesselPotentialSpace +open TemperedDistribution (besselPotential) + +namespace BesselPotentialSpace + +variable {E F : Type*} [NormedAddCommGroup E] [NormedAddCommGroup F] [InnerProductSpace ℝ E] + [FiniteDimensional ℝ E] [MeasurableSpace E] [BorelSpace E] [CompleteSpace F] [NormedSpace ℂ F] + {s : ℝ} {p : ℝ≥0∞} [Fact (1 ≤ p)] + +/-- `‖J_s U‖_p = ‖U‖` in `ℝ≥0∞`, for `U ∈ H^{s,p}(E, F)`: the norm of the Bessel potential space +is the norm of the `L_p` function `J_s U` (Mathlib's `BesselPotentialSpace.norm_toLp_eq`). -/ +theorem enorm_toLp_eq (U : H^{s, p}(E, F)) : ‖U.toLp‖ₑ = ‖U‖ₑ := by + rw [← ofReal_norm, ← ofReal_norm, norm_toLp_eq] + +end BesselPotentialSpace + +namespace Rd + +open ENNReal (lqNorm dyadicWeight) + +variable {V : Type*} [NormedAddCommGroup V] [InnerProductSpace ℝ V] [FiniteDimensional ℝ V] + [MeasurableSpace V] [BorelSpace V] + +/-! ### The Fourier transform of convolutions on `L_2` -/ + +/-- `2 ≠ ∞` in `ℝ≥0∞` (Mathlib's `ENNReal.ofNat_ne_top` at `2`): the hypothesis `p ≠ ∞` of the +blocks and the band-limited scheme on `L_2`. Its type fixes `p = 2` before the remaining +arguments are elaborated. -/ +theorem two_ne_top : (2 : ℝ≥0∞) ≠ ∞ := ENNReal.ofNat_ne_top + +/-- `L_p` functions are determined by their tempered distributions (Mathlib's +`Lp.ker_toTemperedDistributionCLM_eq_bot`). -/ +theorem eq_of_toTemperedDistribution_eq {p : ℝ≥0∞} [Fact (1 ≤ p)] + {f g : Lp ℂ p (volume : Measure V)} (h : (f : 𝓢'(V, ℂ)) = g) : f = g := + LinearMap.ker_eq_bot.1 (Lp.ker_toTemperedDistributionCLM_eq_bot (F := ℂ) + (μ := (volume : Measure V)) (p := p)) h + +/-- **Almost everywhere equal classes are the same tempered distribution**: if `f ∈ L_p(V)` and +`g ∈ L_r(V)`, `1 ≤ p, r ≤ ∞`, have almost everywhere equal representatives, then +`∫ u g = ∫ u f` for every Schwartz function `u` (Mathlib's +`MeasureTheory.Lp.toTemperedDistribution_apply`, `MeasureTheory.integral_congr_ae`). -/ +theorem toTemperedDistribution_eq_of_ae_eq {p r : ℝ≥0∞} [Fact (1 ≤ p)] [Fact (1 ≤ r)] + {f : Lp ℂ p (volume : Measure V)} {g : Lp ℂ r (volume : Measure V)} + (h : (g : V → ℂ) =ᵐ[volume] f) : (g : 𝓢'(V, ℂ)) = (f : 𝓢'(V, ℂ)) := by + ext u + simp only [Lp.toTemperedDistribution_apply] + refine integral_congr_ae ?_ + filter_upwards [h] with x hx + rw [hx] + +/-- **`𝓕(K ⋆ φ) = 𝓕K · 𝓕φ` for Schwartz functions `φ`**, as an identity in `L_2(V)`: the `L_2` +Fourier transform of `K ⋆ φ` is the product of the bounded function `𝓕K` with the `L_2` Fourier +transform of `φ`, for every integrable `K`. Both sides are tested against Schwartz functions +(`Rd.eq_of_toTemperedDistribution_eq`): `K ⋆ φ` is integrable, so the duality +for `𝓕` (the multiplication formula) and the pointwise convolution theorem `Rd.fourier_conv` +apply. -/ +theorem fourier_convLp_toLp {K : V → ℂ} (hK : Integrable K) (φ : 𝓢(V, ℂ)) : + 𝓕 (convLp two_ne_top hK (φ.toLp 2 (volume : Measure V))) = + (ContinuousLinearMap.mul ℂ ℂ).holder 2 ((memLp_top_fourier hK).toLp _) + (𝓕 (φ.toLp 2 (volume : Measure V))) := by + apply eq_of_toTemperedDistribution_eq + ext u + simp only [← Lp.fourier_toTemperedDistribution_eq, TemperedDistribution.fourier_apply, + Lp.toTemperedDistribution_apply] + have hc : Integrable (conv K φ volume) := integrable_conv hK φ.integrable + have hF : ((𝓕 (φ.toLp 2 (volume : Measure V)) : Lp ℂ 2 (volume : Measure V)) : V → ℂ) + =ᵐ[volume] 𝓕 (φ : V → ℂ) := by + rw [SchwartzMap.toLp_fourier_eq, ← SchwartzMap.fourier_coe] + exact (𝓕 φ).coeFn_toLp 2 volume + calc ∫ x, 𝓕 u x • (convLp two_ne_top hK (φ.toLp 2 (volume : Measure V)) : V → ℂ) x + = ∫ x, 𝓕 u x • conv K φ volume x := by + refine integral_congr_ae ?_ + filter_upwards [convLp_apply_ae two_ne_top hK (φ.toLp 2 volume)] with x hx + rw [hx, conv_congr_ae (φ.coeFn_toLp 2 volume)] + _ = ∫ x, u x • 𝓕 (conv K φ volume) x := integral_fourier_smul_eq_of_integrable u hc + _ = ∫ x, u x • (𝓕 K x * 𝓕 (φ : V → ℂ) x) := by + congr 1 + ext x + rw [fourier_conv hK φ.integrable x] + _ = _ := by + refine integral_congr_ae ?_ + filter_upwards [ContinuousLinearMap.coeFn_holder (r := 2) (ContinuousLinearMap.mul ℂ ℂ) + ((memLp_top_fourier hK).toLp _) (𝓕 (φ.toLp 2 (volume : Measure V))), + (memLp_top_fourier hK).coeFn_toLp, hF] with x h1 h2 h3 + rw [h1, ContinuousLinearMap.mul_apply', h2, h3] + +/-- **The convolution theorem on `L_2`**: for every integrable `K` and every `f ∈ L_2(V)`, +`𝓕(K ⋆ f) = 𝓕K · 𝓕f` almost everywhere, where `𝓕` on `L_2` is Plancherel's Fourier transform. +Both sides are continuous in `f` (Young's inequality, and multiplication by the bounded `𝓕K`), and +they agree on the dense set of Schwartz functions (`Rd.fourier_convLp_toLp`). The Fourier +transform on `L_2(V)` is continuous by Mathlib's `FourierTransform.continuous_fourier`. -/ +theorem fourier_convLp {K : V → ℂ} (hK : Integrable K) (f : Lp ℂ 2 (volume : Measure V)) : + ((𝓕 (convLp two_ne_top hK f) : Lp ℂ 2 (volume : Measure V)) : V → ℂ) =ᵐ[volume] + fun ξ => 𝓕 K ξ * (𝓕 f : Lp ℂ 2 (volume : Measure V)) ξ := by + set a : Lp ℂ ∞ (volume : Measure V) := (memLp_top_fourier hK).toLp _ + have hF : Continuous (𝓕 : Lp ℂ 2 (volume : Measure V) → Lp ℂ 2 (volume : Measure V)) := + FourierTransform.continuous_fourier + have key : 𝓕 (convLp two_ne_top hK f) = + (ContinuousLinearMap.mul ℂ ℂ).holder 2 a (𝓕 f) := by + refine DenseRange.induction_on (p := fun f : Lp ℂ 2 (volume : Measure V) => + 𝓕 (convLp two_ne_top hK f) = (ContinuousLinearMap.mul ℂ ℂ).holder 2 a (𝓕 f)) + (SchwartzMap.denseRange_toLpCLM (p := 2) two_ne_top) f ?_ ?_ + · exact isClosed_eq (hF.comp (convLp two_ne_top hK).continuous) + ((((ContinuousLinearMap.mul ℂ ℂ).holderL volume ∞ 2 2) a).continuous.comp hF) + · intro φ + exact fourier_convLp_toLp hK φ + rw [key] + filter_upwards [ContinuousLinearMap.coeFn_holder (r := 2) (ContinuousLinearMap.mul ℂ ℂ) a + (𝓕 f), (memLp_top_fourier hK).coeFn_toLp] with x h1 h2 + rw [h1, ContinuousLinearMap.mul_apply', h2] + +/-- **The Fourier transform of a block**: for `f ∈ L_2(V)`, `𝓕(Δ_j f) = 𝓕ψ_j · 𝓕f` almost +everywhere. -/ +theorem fourier_lpBlock (f : Lp ℂ 2 (volume : Measure V)) (j : ℕ) : + ((𝓕 (lpBlock two_ne_top j f) : Lp ℂ 2 (volume : Measure V)) : V → ℂ) =ᵐ[volume] + fun ξ => 𝓕 (psi (V := V) j) ξ * (𝓕 f : Lp ℂ 2 (volume : Measure V)) ξ := + fourier_convLp (integrable_psi j) f + +/-- **Plancherel's theorem** in `ℝ≥0∞`: `‖𝓕F‖_2 = ‖F‖_2` for `F ∈ L_2(V)` (Mathlib's +`Lp.norm_fourier_eq`). -/ +theorem enorm_fourier_Lp_two (F : Lp ℂ 2 (volume : Measure V)) : + ‖(𝓕 F : Lp ℂ 2 (volume : Measure V))‖ₑ = ‖F‖ₑ := by + rw [← ofReal_norm, ← ofReal_norm, Lp.norm_fourier_eq] + +/-- The square of the `L_2` norm is an integral: `‖F‖_2² = ∫ |F|²`, on every measure space. -/ +theorem enorm_sq_eq_lintegral {α : Type*} [MeasurableSpace α] {μ : Measure α} + (F : Lp ℂ 2 μ) : ‖F‖ₑ ^ 2 = ∫⁻ x, ‖F x‖ₑ ^ 2 ∂μ := by + have h := eLpNorm_rpow_eq (Lp.aestronglyMeasurable F) two_ne_zero two_ne_top + simp only [ENNReal.toReal_ofNat, ENNReal.rpow_two] at h + rw [Lp.eNorm_def, h] + +/-- **The `L_2` norm of a function through its class**: for a function `f` with +`∫ |f|² < ∞` (`MemLp f 2 μ`), `∫ |f|² = ‖[f]‖_2²` for the class `[f] = hf.toLp f` of `f` in +`L_2(μ)`, on every measure space (`Rd.enorm_sq_eq_lintegral` and `[f] = f` almost everywhere). -/ +theorem lintegral_enorm_sq_eq_enorm_toLp {α : Type*} [MeasurableSpace α] {μ : Measure α} + {f : α → ℂ} (hf : MemLp f 2 μ) : ∫⁻ x, ‖f x‖ₑ ^ 2 ∂μ = ‖hf.toLp f‖ₑ ^ 2 := by + rw [enorm_sq_eq_lintegral] + exact lintegral_congr_ae (hf.coeFn_toLp.mono fun x hx => by dsimp only; rw [hx]) + +/-- **Plancherel for a convolution**: for integrable `K` and `f ∈ L_2(V)`, +`‖K ⋆ f‖_2² = ∫ |𝓕K(ξ)|² |𝓕f(ξ)|² dξ`, where `𝓕f` is the `L_2` Fourier transform +(`Rd.fourier_convLp` and Plancherel's theorem `Rd.enorm_fourier_Lp_two`). -/ +theorem enorm_convLp_sq {K : V → ℂ} (hK : Integrable K) (f : Lp ℂ 2 (volume : Measure V)) : + ‖convLp two_ne_top hK f‖ₑ ^ 2 = + ∫⁻ ξ, ‖𝓕 K ξ‖ₑ ^ 2 * ‖(𝓕 f : Lp ℂ 2 (volume : Measure V)) ξ‖ₑ ^ 2 := by + rw [← enorm_fourier_Lp_two, enorm_sq_eq_lintegral] + refine lintegral_congr_ae ?_ + filter_upwards [fourier_convLp hK f] with ξ hξ + rw [hξ, eNorm_mul, mul_pow] + +/-- **Plancherel for a block**: for `f ∈ L_2(V)`, +`‖Δ_j f‖_2² = ∫ |𝓕ψ_j(ξ)|² |𝓕f(ξ)|² dξ`, the case `K = ψ_j` of `Rd.enorm_convLp_sq`. -/ +theorem enorm_lpBlock_sq (f : Lp ℂ 2 (volume : Measure V)) (j : ℕ) : + ‖lpBlock two_ne_top j f‖ₑ ^ 2 = + ∫⁻ ξ, ‖𝓕 (psi (V := V) j) ξ‖ₑ ^ 2 * ‖(𝓕 f : Lp ℂ 2 (volume : Measure V)) ξ‖ₑ ^ 2 := + enorm_convLp_sq (integrable_psi j) f + +/-! ### The Bessel weight and the Littlewood–Paley weights -/ + +/-- The **Bessel weight** `⟨ξ⟩^s = (1 + ‖ξ‖²)^(s/2)`, the symbol of Mathlib's Bessel potential +`J_s = TemperedDistribution.besselPotential V ℂ s`. -/ +noncomputable def besselWeight (s : ℝ) (ξ : V) : ℝ := (1 + ‖ξ‖ ^ 2) ^ (s / 2) + +omit [InnerProductSpace ℝ V] [FiniteDimensional ℝ V] [MeasurableSpace V] [BorelSpace V] in +/-- The Bessel weight is nonnegative. -/ +theorem besselWeight_nonneg (s : ℝ) (ξ : V) : 0 ≤ besselWeight s ξ := + Real.rpow_nonneg (by positivity) _ + +omit [InnerProductSpace ℝ V] [FiniteDimensional ℝ V] [MeasurableSpace V] [BorelSpace V] in +/-- The Bessel weight is even: `⟨-ξ⟩^s = ⟨ξ⟩^s`. -/ +theorem besselWeight_neg (s : ℝ) (ξ : V) : besselWeight s (-ξ) = besselWeight s ξ := by + rw [besselWeight, besselWeight, norm_neg] + +omit [FiniteDimensional ℝ V] [MeasurableSpace V] [BorelSpace V] in +/-- The Bessel weight is smooth with polynomially bounded derivatives, so it multiplies tempered +distributions. -/ +theorem hasTemperateGrowth_besselWeight (s : ℝ) : + (fun ξ : V => (besselWeight s ξ : ℂ)).HasTemperateGrowth := by + unfold besselWeight + fun_prop + +/-- **The Bessel potential on Schwartz functions**: `J_t u = 𝓕⁻(⟨ξ⟩^t 𝓕u)` with the weight +`⟨ξ⟩^t = (1 + ‖ξ‖²)^{t/2}` (`Rd.besselWeight`), a continuous linear map of the Schwartz space +(Mathlib's `SchwartzMap.fourierMultiplierCLM`). -/ +noncomputable def besselSchwartz (t : ℝ) : 𝓢(V, ℂ) →L[ℂ] 𝓢(V, ℂ) := + SchwartzMap.fourierMultiplierCLM ℂ fun ξ => (besselWeight t ξ : ℂ) + +/-- The Bessel potential `J_t` of Mathlib's tempered distributions restricts to `J_t` on Schwartz +functions (Mathlib's `TemperedDistribution.fourierMultiplierCLM_toTemperedDistributionCLM_eq`). -/ +theorem besselPotential_schwartz (t : ℝ) (u : 𝓢(V, ℂ)) : + besselPotential V ℂ t (u : 𝓢'(V, ℂ)) = (besselSchwartz t u : 𝓢'(V, ℂ)) := + TemperedDistribution.fourierMultiplierCLM_toTemperedDistributionCLM_eq + (hasTemperateGrowth_besselWeight t) u + +/-- **`J_{-t}` inverts `J_t` on Schwartz functions**: `J_t (J_{-t} u) = u`, since the product of +the Bessel weights is `⟨ξ⟩^t ⟨ξ⟩^{-t} = 1` (Mathlib's +`SchwartzMap.fourierMultiplierCLM_fourierMultiplierCLM_apply` and +`SchwartzMap.fourierMultiplierCLM_const`). -/ +theorem besselSchwartz_besselSchwartz_neg (t : ℝ) (u : 𝓢(V, ℂ)) : + besselSchwartz t (besselSchwartz (-t) u) = u := by + rw [besselSchwartz, besselSchwartz, SchwartzMap.fourierMultiplierCLM_fourierMultiplierCLM_apply + (hasTemperateGrowth_besselWeight t) (hasTemperateGrowth_besselWeight (-t))] + have h : ((fun ξ : V => (besselWeight t ξ : ℂ)) * fun ξ => (besselWeight (-t) ξ : ℂ)) = + fun _ => (1 : ℂ) := funext fun ξ => by + have hpos : 0 < 1 + ‖ξ‖ ^ 2 := by positivity + rw [Pi.mul_apply, besselWeight, besselWeight, ← Complex.ofReal_mul, ← Real.rpow_add hpos, + show t / 2 + -t / 2 = 0 by ring, Real.rpow_zero, Complex.ofReal_one] + rw [h, SchwartzMap.fourierMultiplierCLM_const, one_smul] + rfl + +/-- `J_t u(x) = 𝓕⁻(⟨ξ⟩^t 𝓕u)(x)`, with the Fourier integrals of functions. -/ +theorem besselSchwartz_apply (t : ℝ) (u : 𝓢(V, ℂ)) (x : V) : + besselSchwartz t u x = 𝓕⁻ (fun ξ => (besselWeight t ξ : ℂ) * 𝓕 (u : V → ℂ) ξ) x := by + rw [besselSchwartz, SchwartzMap.fourierMultiplierCLM_apply, SchwartzMap.fourierInv_coe, + SchwartzMap.smulLeftCLM_apply (hasTemperateGrowth_besselWeight t), SchwartzMap.fourier_coe] + rfl + +/-- **Fourier multipliers multiply the Fourier transform**: `𝓕(m(D) u)(ξ) = m(ξ) 𝓕u(ξ)` for a +symbol `m` of temperate growth and a Schwartz function `u` (Fourier inversion on Schwartz +functions). -/ +theorem fourier_fourierMultiplierCLM_apply {m : V → ℂ} (hm : m.HasTemperateGrowth) + (u : 𝓢(V, ℂ)) (ξ : V) : + 𝓕 (SchwartzMap.fourierMultiplierCLM ℂ m u) ξ = m ξ * 𝓕 u ξ := by + rw [SchwartzMap.fourierMultiplierCLM_apply, FourierInvPair.fourier_fourierInv_eq, + SchwartzMap.smulLeftCLM_apply_apply hm, smul_eq_mul] + +/-- **The transpose form of an even Fourier multiplier**: for an even symbol `m` of temperate +growth, `m(-ξ) = m(ξ)`, Mathlib's Fourier multiplier `m(D) u = 𝓕⁻(m 𝓕u)` on Schwartz functions +is also `m(D) u(x) = 𝓕(m 𝓕⁻u)(x)`, since `𝓕⁻ h(x) = 𝓕 h(-x)` (Mathlib's +`Real.fourierInv_eq_fourier_comp_neg`, `Real.fourierInv_eq_fourier_neg`). -/ +theorem fourierMultiplierCLM_apply_eq_fourier {m : V → ℂ} (hm : m.HasTemperateGrowth) + (heven : ∀ ξ, m (-ξ) = m ξ) (u : 𝓢(V, ℂ)) (x : V) : + SchwartzMap.fourierMultiplierCLM ℂ m u x = 𝓕 (fun ξ => m ξ * 𝓕⁻ (u : V → ℂ) ξ) x := by + rw [SchwartzMap.fourierMultiplierCLM_apply, SchwartzMap.fourierInv_coe, + SchwartzMap.smulLeftCLM_apply hm, SchwartzMap.fourier_coe, + Real.fourierInv_eq_fourier_comp_neg] + refine congrFun (congrArg _ (funext fun ξ => ?_)) x + rw [smul_eq_mul, heven, Real.fourierInv_eq_fourier_neg] + +/-- **Even Fourier multipliers act by the transpose**: for an even symbol `m` of temperate growth, +every tempered distribution `T` and every Schwartz function `u`, `(m(D) T)(u) = T(m(D) u)`. +Mathlib defines `(m(D) T)(u) = T(𝓕(m 𝓕⁻u))`, and `𝓕(m 𝓕⁻u) = m(D) u` +(`Rd.fourierMultiplierCLM_apply_eq_fourier`). -/ +theorem fourierMultiplierCLM_apply_apply_of_even {m : V → ℂ} (hm : m.HasTemperateGrowth) + (heven : ∀ ξ, m (-ξ) = m ξ) (T : 𝓢'(V, ℂ)) (u : 𝓢(V, ℂ)) : + TemperedDistribution.fourierMultiplierCLM ℂ m T u = + T (SchwartzMap.fourierMultiplierCLM ℂ m u) := by + rw [TemperedDistribution.fourierMultiplierCLM_apply_apply] + congr 1 + ext x + rw [fourierMultiplierCLM_apply_eq_fourier hm heven, SchwartzMap.fourier_coe, + SchwartzMap.smulLeftCLM_apply hm, SchwartzMap.fourierInv_coe] + rfl + +/-- **The transpose form of `J_t`**: `J_t u(x) = 𝓕(⟨ξ⟩^t 𝓕⁻u)(x)`, since the Bessel weight is +even (`Rd.besselWeight_neg`, `Rd.fourierMultiplierCLM_apply_eq_fourier`). -/ +theorem besselSchwartz_apply_eq_fourier (t : ℝ) (u : 𝓢(V, ℂ)) (x : V) : + besselSchwartz t u x = 𝓕 (fun ξ => (besselWeight t ξ : ℂ) * 𝓕⁻ (u : V → ℂ) ξ) x := + fourierMultiplierCLM_apply_eq_fourier (hasTemperateGrowth_besselWeight t) + (fun ξ => by rw [besselWeight_neg]) u x + +/-- **Mathlib's Bessel potential acts by the transpose**: for every tempered distribution `T` +and every Schwartz function `u`, `(J_t T)(u) = T(J_t u)`, since the Bessel weight is even +(`Rd.besselWeight_neg`, `Rd.fourierMultiplierCLM_apply_apply_of_even`). -/ +theorem besselPotential_apply_apply (t : ℝ) (T : 𝓢'(V, ℂ)) (u : 𝓢(V, ℂ)) : + besselPotential V ℂ t T u = T (besselSchwartz t u) := + fourierMultiplierCLM_apply_apply_of_even (hasTemperateGrowth_besselWeight t) + (fun ξ => by rw [besselWeight_neg]) T u + +/-- **`J_t` is symmetric on Schwartz functions**: `∫ J_t φ · u = ∫ φ · J_t u` for Schwartz +functions `φ`, `u`. Both sides are `(J_t φ)(u)` for the tempered distribution of `φ` +(`Rd.besselPotential_apply_apply`, `Rd.besselPotential_schwartz`). -/ +theorem integral_besselSchwartz_mul (t : ℝ) (φ u : 𝓢(V, ℂ)) : + ∫ x, besselSchwartz t φ x * u x = ∫ x, φ x * besselSchwartz t u x := by + have h := besselPotential_apply_apply t (φ : 𝓢'(V, ℂ)) u + rw [besselPotential_schwartz, SchwartzMap.coe_apply, SchwartzMap.coe_apply] at h + simp only [smul_eq_mul] at h + calc ∫ x, besselSchwartz t φ x * u x = ∫ x, u x * besselSchwartz t φ x := by + congr 1 + funext x + ring + _ = ∫ x, besselSchwartz t u x * φ x := h + _ = ∫ x, φ x * besselSchwartz t u x := by + congr 1 + funext x + ring + +omit [InnerProductSpace ℝ V] [FiniteDimensional ℝ V] [MeasurableSpace V] [BorelSpace V] in +/-- The Bessel weight as a complex number has absolute value `⟨ξ⟩^s`. -/ +theorem enorm_besselWeight (s : ℝ) (ξ : V) : + ‖(besselWeight s ξ : ℂ)‖ₑ = ENNReal.ofReal (besselWeight s ξ) := by + rw [← ofReal_norm, Complex.norm_real, Real.norm_of_nonneg (besselWeight_nonneg s ξ)] + +omit [InnerProductSpace ℝ V] [FiniteDimensional ℝ V] [MeasurableSpace V] [BorelSpace V] in +/-- `(⟨ξ⟩^s)² = (1 + ‖ξ‖²)^s`. -/ +theorem ofReal_besselWeight_sq (s : ℝ) (ξ : V) : + ENNReal.ofReal (besselWeight s ξ) ^ 2 = ENNReal.ofReal (1 + ‖ξ‖ ^ 2) ^ s := by + rw [ENNReal.ofReal_rpow_of_pos (by positivity), ← ENNReal.ofReal_pow (besselWeight_nonneg s ξ), + besselWeight, ← Real.rpow_natCast, ← Real.rpow_mul (by positivity)] + congr 2 + push_cast + ring + +omit [InnerProductSpace ℝ V] [FiniteDimensional ℝ V] [MeasurableSpace V] [BorelSpace V] in +/-- `‖ξ‖ ≤ ⟨ξ⟩ = (1 + ‖ξ‖²)^(1/2)`. -/ +theorem norm_le_besselWeight_one (ξ : V) : ‖ξ‖ ≤ besselWeight 1 ξ := by + rw [besselWeight, ← Real.sqrt_eq_rpow, Real.le_sqrt (norm_nonneg ξ) (by positivity)] + linarith + +omit [InnerProductSpace ℝ V] [FiniteDimensional ℝ V] [MeasurableSpace V] [BorelSpace V] in +/-- If `‖ξ‖ < 2^(j+1)`, then `1 + ‖ξ‖² ≤ 5 · 4^j`. -/ +theorem one_add_norm_sq_le_of_norm_lt {j : ℕ} {ξ : V} (h : ‖ξ‖ < 2 ^ (j + 1)) : + 1 + ‖ξ‖ ^ 2 ≤ 5 * (4 : ℝ) ^ j := by + have h4 : ((2 : ℝ) ^ (j + 1)) ^ 2 = 4 * (4 : ℝ) ^ j := by + rw [← pow_mul, mul_comm, pow_mul] + norm_num + ring + have h1 : (1 : ℝ) ≤ 4 ^ j := one_le_pow₀ (by norm_num) + nlinarith [norm_nonneg ξ] + +/-- **Upper weight bound**: for `s ≥ 0`, if `𝓕ψ_j(ξ) ≠ 0`, then +`2^(2js) ≤ 4^s ⟨ξ⟩^{2s}`. -/ +theorem dyadicWeight_sq_le_of_fourier_psi_ne_zero {s : ℝ} (hs : 0 ≤ s) {j : ℕ} {ξ : V} + (h : 𝓕 (psi (V := V) j) ξ ≠ 0) : + dyadicWeight s j ^ 2 ≤ 4 ^ s * ENNReal.ofReal (besselWeight s ξ) ^ 2 := by + rw [ENNReal.dyadicWeight_sq, ofReal_besselWeight_sq, ← ENNReal.mul_rpow_of_nonneg _ _ hs] + refine ENNReal.rpow_le_rpow ?_ hs + rw [show (4 : ℝ≥0∞) = ENNReal.ofReal 4 by norm_num, ← ENNReal.ofReal_pow (by norm_num), + ← ENNReal.ofReal_mul (by norm_num)] + exact ENNReal.ofReal_le_ofReal (four_pow_le_of_fourier_psi_ne_zero h) + +omit [InnerProductSpace ℝ V] [FiniteDimensional ℝ V] [MeasurableSpace V] [BorelSpace V] in +/-- **Lower weight bound**: for `s ≥ 0`, if `‖ξ‖ < 2^(j+1)`, then +`⟨ξ⟩^{2s} ≤ 5^s 2^(2js)`. -/ +theorem ofReal_besselWeight_sq_le_of_norm_lt {s : ℝ} (hs : 0 ≤ s) {j : ℕ} {ξ : V} + (h : ‖ξ‖ < 2 ^ (j + 1)) : + ENNReal.ofReal (besselWeight s ξ) ^ 2 ≤ 5 ^ s * dyadicWeight s j ^ 2 := by + rw [ENNReal.dyadicWeight_sq, ofReal_besselWeight_sq, ← ENNReal.mul_rpow_of_nonneg _ _ hs] + refine ENNReal.rpow_le_rpow ?_ hs + rw [show (5 : ℝ≥0∞) = ENNReal.ofReal 5 by norm_num, + show (4 : ℝ≥0∞) = ENNReal.ofReal 4 by norm_num, ← ENNReal.ofReal_pow (by norm_num), + ← ENNReal.ofReal_mul (by norm_num)] + exact ENNReal.ofReal_le_ofReal (one_add_norm_sq_le_of_norm_lt h) + +/-- **The Littlewood–Paley symbol is at most the Bessel weight**: for `s ≥ 0` and every `ξ ∈ V`, +`∑_j 2^(2js) |𝓕ψ_j(ξ)|² ≤ 2 · 4^s ⟨ξ⟩^{2s}`. At most two terms are nonzero +(`Rd.exists_fourier_psi_window`), each at most `4^s ⟨ξ⟩^{2s}`. -/ +theorem tsum_dyadicWeight_fourier_psi_sq_le {s : ℝ} (hs : 0 ≤ s) (ξ : V) : + ∑' j, dyadicWeight s j ^ 2 * ‖𝓕 (psi (V := V) j) ξ‖ₑ ^ 2 ≤ + 2 * 4 ^ s * ENNReal.ofReal (besselWeight s ξ) ^ 2 := by + obtain ⟨a, -, hwin, -⟩ := exists_fourier_psi_window ξ + have hterm : ∀ j, dyadicWeight s j ^ 2 * ‖𝓕 (psi (V := V) j) ξ‖ₑ ^ 2 ≤ + 4 ^ s * ENNReal.ofReal (besselWeight s ξ) ^ 2 := by + intro j + by_cases h : 𝓕 (psi (V := V) j) ξ = 0 + · simp [h] + · calc _ ≤ (4 ^ s * ENNReal.ofReal (besselWeight s ξ) ^ 2) * 1 := by + gcongr + · exact dyadicWeight_sq_le_of_fourier_psi_ne_zero hs h + · exact pow_le_one₀ (by positivity) (enorm_fourier_psi_le_one j ξ) + _ = _ := mul_one _ + rw [tsum_eq_sum (s := {a, a + 1}) (fun j hj => ?_), Finset.sum_pair (by omega)] + · calc _ ≤ 4 ^ s * ENNReal.ofReal (besselWeight s ξ) ^ 2 + + 4 ^ s * ENNReal.ofReal (besselWeight s ξ) ^ 2 := add_le_add (hterm a) (hterm (a + 1)) + _ = _ := by ring + · have : 𝓕 (psi (V := V) j) ξ = 0 := by + by_contra h + rcases hwin j h with rfl | rfl <;> simp at hj + simp [this] + +/-- Two complex numbers with `x + y = 1` satisfy `1 ≤ 2(|x|² + |y|²)`: `1 ≤ |x| + |y|` by the +triangle inequality, and `(a + b)² ≤ 2(a² + b²)` (Mathlib's `add_sq_le`). -/ +theorem one_le_two_mul_enorm_sq_add {x y : ℂ} (h : x + y = 1) : + 1 ≤ 2 * (‖x‖ₑ ^ 2 + ‖y‖ₑ ^ 2) := by + have h1 : 1 ≤ ‖x‖ + ‖y‖ := by simpa [h] using norm_add_le x y + have h2 : (1 : ℝ) ≤ 2 * (‖x‖ ^ 2 + ‖y‖ ^ 2) := (one_le_pow₀ h1).trans add_sq_le + rw [← ofReal_norm, ← ofReal_norm, ← ENNReal.ofReal_pow (norm_nonneg _), + ← ENNReal.ofReal_pow (norm_nonneg _), ← ENNReal.ofReal_add (by positivity) (by positivity), + ← ENNReal.ofReal_ofNat 2, ← ENNReal.ofReal_mul (by norm_num), ← ENNReal.ofReal_one] + exact ENNReal.ofReal_le_ofReal h2 + +/-- **The Bessel weight is at most the Littlewood–Paley symbol**: for `s ≥ 0` and every `ξ ∈ V`, +`⟨ξ⟩^{2s} ≤ 2 · 5^s ∑_j 2^(2js) |𝓕ψ_j(ξ)|²`. The two blocks `a`, `a + 1` of +`Rd.exists_fourier_psi_window` have `|𝓕ψ_a(ξ)|² + |𝓕ψ_{a+1}(ξ)|² ≥ 1/2`, and +`⟨ξ⟩^{2s} ≤ 5^s 2^(2js)` for both. -/ +theorem ofReal_besselWeight_sq_le_tsum {s : ℝ} (hs : 0 ≤ s) (ξ : V) : + ENNReal.ofReal (besselWeight s ξ) ^ 2 ≤ + 2 * 5 ^ s * ∑' j, dyadicWeight s j ^ 2 * ‖𝓕 (psi (V := V) j) ξ‖ₑ ^ 2 := by + obtain ⟨a, ha, -, hsum⟩ := exists_fourier_psi_window ξ + have h1 := ofReal_besselWeight_sq_le_of_norm_lt hs (j := a) ha + have h2 := ofReal_besselWeight_sq_le_of_norm_lt hs (j := a + 1) + (ha.trans (pow_lt_pow_right₀ one_lt_two (by omega))) + calc ENNReal.ofReal (besselWeight s ξ) ^ 2 + ≤ ENNReal.ofReal (besselWeight s ξ) ^ 2 * + (2 * (‖𝓕 (psi (V := V) a) ξ‖ₑ ^ 2 + ‖𝓕 (psi (V := V) (a + 1)) ξ‖ₑ ^ 2)) := + le_mul_of_one_le_right' (one_le_two_mul_enorm_sq_add hsum) + _ = 2 * (ENNReal.ofReal (besselWeight s ξ) ^ 2 * ‖𝓕 (psi (V := V) a) ξ‖ₑ ^ 2 + + ENNReal.ofReal (besselWeight s ξ) ^ 2 * ‖𝓕 (psi (V := V) (a + 1)) ξ‖ₑ ^ 2) := by ring + _ ≤ 2 * (5 ^ s * dyadicWeight s a ^ 2 * ‖𝓕 (psi (V := V) a) ξ‖ₑ ^ 2 + + 5 ^ s * dyadicWeight s (a + 1) ^ 2 * ‖𝓕 (psi (V := V) (a + 1)) ξ‖ₑ ^ 2) := by + gcongr + _ = 2 * 5 ^ s * ∑ j ∈ {a, a + 1}, dyadicWeight s j ^ 2 * ‖𝓕 (psi (V := V) j) ξ‖ₑ ^ 2 := by + rw [Finset.sum_pair (by omega)] + ring + _ ≤ _ := by + gcongr + exact sum_le_tsum _ + +/-! ### Temperate weights and Bessel potentials of `L_2` functions -/ + +/-- **Multiplying an `L_p` function by a temperate weight**: if `w` has temperate growth, +`g ∈ L_p(V)` and `w g ∈ L_q(V)`, `1 ≤ p, q ≤ ∞`, then the product of `w` with the tempered +distribution of `g` is the tempered distribution of `w g`. -/ +theorem smulLeftCLM_toTemperedDistribution_eq {w : V → ℂ} (hw : w.HasTemperateGrowth) + {p q : ℝ≥0∞} [Fact (1 ≤ p)] [Fact (1 ≤ q)] (g : Lp ℂ p (volume : Measure V)) + (hg : MemLp (fun ξ => w ξ * g ξ) q volume) : + TemperedDistribution.smulLeftCLM ℂ w (g : 𝓢'(V, ℂ)) = + ((hg.toLp _ : Lp ℂ q (volume : Measure V)) : 𝓢'(V, ℂ)) := by + ext u + simp only [TemperedDistribution.smulLeftCLM_apply_apply, Lp.toTemperedDistribution_apply, + SchwartzMap.smulLeftCLM_apply_apply hw] + refine integral_congr_ae ?_ + filter_upwards [hg.coeFn_toLp] with x hx + rw [hx, smul_eq_mul, smul_eq_mul, smul_eq_mul] + ring + +/-- **Identities between weighted `L_p` functions hold almost everywhere**: if `w` has temperate +growth, `G ∈ L_p(V)`, `H ∈ L_q(V)`, `1 ≤ p, q ≤ ∞`, and `w G = H` as tempered distributions, +then `w G = H` almost everywhere. Both sides are locally integrable and have the same integrals +against smooth compactly supported functions (Mathlib's `ae_eq_of_integral_contDiff_smul_eq`). -/ +theorem ae_eq_of_smulLeftCLM_eq {w : V → ℂ} (hw : w.HasTemperateGrowth) + {p q : ℝ≥0∞} [Fact (1 ≤ p)] [Fact (1 ≤ q)] {G : Lp ℂ p (volume : Measure V)} + {H : Lp ℂ q (volume : Measure V)} + (h : TemperedDistribution.smulLeftCLM ℂ w (G : 𝓢'(V, ℂ)) = (H : 𝓢'(V, ℂ))) : + (fun x => w x * G x) =ᵐ[volume] H := by + refine ae_eq_of_integral_contDiff_smul_eq + (((Lp.memLp G).locallyIntegrable Fact.out).continuous_mul hw.1.continuous) + ((Lp.memLp H).locallyIntegrable Fact.out) fun φ hφ hφc => ?_ + have hφ₁ : HasCompactSupport (Complex.ofRealCLM ∘ φ) := hφc.comp_left rfl + have hφ₂ : ContDiff ℝ ((⊤ : ℕ∞) : WithTop ℕ∞) (Complex.ofRealCLM ∘ φ) := by fun_prop + have := DFunLike.congr_fun h (hφ₁.toSchwartzMap hφ₂) + simp only [TemperedDistribution.smulLeftCLM_apply_apply, Lp.toTemperedDistribution_apply, + SchwartzMap.smulLeftCLM_apply_apply hw] at this + convert this using 2 with x x + · ext x + simp [Complex.real_smul] + ring + · simp [Complex.real_smul] + +/-- **The Bessel potential on the Fourier side**: if `J_s f = h` with `f, h ∈ L_2(V)`, then +`𝓕h = ⟨ξ⟩^s 𝓕f` almost everywhere. -/ +theorem fourier_ae_eq_of_besselPotential_eq {s : ℝ} {f h : Lp ℂ 2 (volume : Measure V)} + (hfh : besselPotential V ℂ s (f : 𝓢'(V, ℂ)) = (h : 𝓢'(V, ℂ))) : + (fun ξ => (besselWeight s ξ : ℂ) * (𝓕 f : Lp ℂ 2 (volume : Measure V)) ξ) =ᵐ[volume] + (𝓕 h : Lp ℂ 2 (volume : Measure V)) := by + refine ae_eq_of_smulLeftCLM_eq (hasTemperateGrowth_besselWeight s) ?_ + rw [← Lp.fourier_toTemperedDistribution_eq, ← Lp.fourier_toTemperedDistribution_eq, ← hfh, + TemperedDistribution.fourier_besselPotential_eq_smulLeftCLM_fourier_apply] + rfl + +/-- **Plancherel for the Bessel potential**: if `J_s f = h` with `f, h ∈ L_2(V)`, then +`‖h‖_2² = ∫ ⟨ξ⟩^{2s} |𝓕f(ξ)|² dξ`. -/ +theorem enorm_sq_eq_lintegral_of_besselPotential_eq {s : ℝ} + {f h : Lp ℂ 2 (volume : Measure V)} + (hfh : besselPotential V ℂ s (f : 𝓢'(V, ℂ)) = (h : 𝓢'(V, ℂ))) : + ‖h‖ₑ ^ 2 = ∫⁻ ξ, ENNReal.ofReal (besselWeight s ξ) ^ 2 * + ‖(𝓕 f : Lp ℂ 2 (volume : Measure V)) ξ‖ₑ ^ 2 := by + rw [← enorm_fourier_Lp_two, enorm_sq_eq_lintegral] + refine lintegral_congr_ae ?_ + filter_upwards [fourier_ae_eq_of_besselPotential_eq hfh] with ξ hξ + rw [← hξ, eNorm_mul, mul_pow, enorm_besselWeight] + +/-- If `∫ ⟨ξ⟩^{2s} |𝓕f(ξ)|² dξ < ∞` for `f ∈ L_2(V)`, then `⟨ξ⟩^s 𝓕f ∈ L_2(V)`. -/ +theorem memLp_besselWeight_mul_fourier (s : ℝ) (f : Lp ℂ 2 (volume : Measure V)) + (hf : ∫⁻ ξ, ENNReal.ofReal (besselWeight s ξ) ^ 2 * + ‖(𝓕 f : Lp ℂ 2 (volume : Measure V)) ξ‖ₑ ^ 2 < ∞) : + MemLp (fun ξ => (besselWeight s ξ : ℂ) * (𝓕 f : Lp ℂ 2 (volume : Measure V)) ξ) 2 + volume := by + have hm : AEStronglyMeasurable + (fun ξ => (besselWeight s ξ : ℂ) * (𝓕 f : Lp ℂ 2 (volume : Measure V)) ξ) volume := + (hasTemperateGrowth_besselWeight s).1.continuous.aestronglyMeasurable.mul + (Lp.aestronglyMeasurable _) + refine memLp_iff.2 ?_ + rw [eLpNorm_lt_top_iff_lintegral_rpow_eNorm_lt_top two_ne_zero two_ne_top hm] + simpa [eNorm_mul, mul_pow, enorm_besselWeight, ENNReal.rpow_two] using hf + +/-- **A sufficient condition for `H^s`**: if `f ∈ L_2(V)` has +`∫ ⟨ξ⟩^{2s} |𝓕f(ξ)|² dξ < ∞`, then `f ∈ H^s(V)`. -/ +theorem memSobolev_two_of_lintegral_lt_top {s : ℝ} (f : Lp ℂ 2 (volume : Measure V)) + (hf : ∫⁻ ξ, ENNReal.ofReal (besselWeight s ξ) ^ 2 * + ‖(𝓕 f : Lp ℂ 2 (volume : Measure V)) ξ‖ₑ ^ 2 < ∞) : + TemperedDistribution.MemSobolev s 2 (f : 𝓢'(V, ℂ)) := by + rw [TemperedDistribution.memSobolev_iff_exists_smulLeftCLM_fourier] + refine ⟨(memLp_besselWeight_mul_fourier s f hf).toLp _, ?_⟩ + rw [Lp.fourier_toTemperedDistribution_eq] + exact smulLeftCLM_toTemperedDistribution_eq (hasTemperateGrowth_besselWeight s) _ _ + +/-- **Elements of `H^s`, `s ≥ 0`, are `L_2` functions**: if `J_s u = h` for a tempered +distribution `u` and `h ∈ L_2(V)`, then `u` is an `L_2(V)` function, namely `J_{-s} h` +(Mathlib's `TemperedDistribution.MemSobolev.mono`: `H^0 ⊆ H^{-s}`). -/ +theorem exists_toTemperedDistribution_eq_of_besselPotential_eq {s : ℝ} (hs : 0 ≤ s) + {u : 𝓢'(V, ℂ)} {h : Lp ℂ 2 (volume : Measure V)} + (hu : besselPotential V ℂ s u = (h : 𝓢'(V, ℂ))) : + ∃ f : Lp ℂ 2 (volume : Measure V), (f : 𝓢'(V, ℂ)) = u := by + obtain ⟨f, hf⟩ := (TemperedDistribution.memSobolev_zero_iff.2 ⟨h, rfl⟩ : + TemperedDistribution.MemSobolev 0 2 (h : 𝓢'(V, ℂ))).mono (by linarith : -s ≤ 0) + exact ⟨f, hf.symm.trans ((TemperedDistribution.besselPotential_neg_apply_eq_iff s _ _).2 hu)⟩ + +/-! ### `H^s = F^s_{2,2}` -/ + +/-- **The Triebel–Lizorkin norm for `p = q = 2` on the Fourier side**: for `f ∈ L_2(V)`, +`‖f‖_{F^s_{2,2}}² = ∫ (∑_j 2^(2js) |𝓕ψ_j(ξ)|²) |𝓕f(ξ)|² dξ`, by +`‖f‖_{F^s_{2,2}} = ‖(2^(js) ‖Δ_j f‖_2)_j‖_{ℓ_2}`, Plancherel for each block and Tonelli. -/ +theorem triebelLizorkinNorm_two_sq (s : ℝ) (f : Lp ℂ 2 (volume : Measure V)) : + triebelLizorkinNorm s 2 f ^ 2 = ∫⁻ ξ, (∑' j, dyadicWeight s j ^ 2 * + ‖𝓕 (psi (V := V) j) ξ‖ₑ ^ 2) * ‖(𝓕 f : Lp ℂ 2 (volume : Measure V)) ξ‖ₑ ^ 2 := by + have hl := ENNReal.lqNorm_two_sq (fun j => dyadicWeight s j * ‖lpBlock two_ne_top j f‖ₑ) + have hm : ∀ j, AEMeasurable (fun ξ => dyadicWeight s j ^ 2 * ‖𝓕 (psi (V := V) j) ξ‖ₑ ^ 2 * + ‖(𝓕 f : Lp ℂ 2 (volume : Measure V)) ξ‖ₑ ^ 2) volume := fun j => + ((((continuous_fourier_of_integrable (integrable_psi j)).measurable.eNorm.pow_const + 2).aemeasurable.const_mul _).mul ((Lp.aestronglyMeasurable _).eNorm.pow_const 2)) + rw [triebelLizorkinNorm_eq_littlewoodPaleyNorm two_ne_top, littlewoodPaleyNorm, hl] + calc ∑' j, (dyadicWeight s j * ‖lpBlock two_ne_top j f‖ₑ) ^ 2 + = ∑' j, ∫⁻ ξ, dyadicWeight s j ^ 2 * ‖𝓕 (psi (V := V) j) ξ‖ₑ ^ 2 * + ‖(𝓕 f : Lp ℂ 2 (volume : Measure V)) ξ‖ₑ ^ 2 := by + congr 1 + ext j + rw [mul_pow, enorm_lpBlock_sq, ← lintegral_const_mul' _ _ + (ENNReal.pow_ne_top (ENNReal.dyadicWeight_ne_top s j))] + simp_rw [mul_assoc] + _ = _ := by + rw [← lintegral_tsum hm] + congr 1 + ext ξ + rw [ENNReal.tsum_mul_right] + +/-- For `s ≥ 0` and `f ∈ L_2(V)`, +`‖f‖_{F^s_{2,2}}² ≤ 2 · 4^s ∫ ⟨ξ⟩^{2s} |𝓕f(ξ)|² dξ`. -/ +theorem triebelLizorkinNorm_two_sq_le {s : ℝ} (hs : 0 ≤ s) (f : Lp ℂ 2 (volume : Measure V)) : + triebelLizorkinNorm s 2 f ^ 2 ≤ 2 * 4 ^ s * ∫⁻ ξ, ENNReal.ofReal (besselWeight s ξ) ^ 2 * + ‖(𝓕 f : Lp ℂ 2 (volume : Measure V)) ξ‖ₑ ^ 2 := by + rw [triebelLizorkinNorm_two_sq, ← lintegral_const_mul' _ _ (by finiteness)] + refine lintegral_mono fun ξ => ?_ + rw [← mul_assoc] + gcongr + exact tsum_dyadicWeight_fourier_psi_sq_le hs ξ + +/-- For `s ≥ 0` and `f ∈ L_2(V)`, +`∫ ⟨ξ⟩^{2s} |𝓕f(ξ)|² dξ ≤ 2 · 5^s ‖f‖_{F^s_{2,2}}²`. -/ +theorem lintegral_besselWeight_sq_le {s : ℝ} (hs : 0 ≤ s) (f : Lp ℂ 2 (volume : Measure V)) : + ∫⁻ ξ, ENNReal.ofReal (besselWeight s ξ) ^ 2 * + ‖(𝓕 f : Lp ℂ 2 (volume : Measure V)) ξ‖ₑ ^ 2 ≤ + 2 * 5 ^ s * triebelLizorkinNorm s 2 f ^ 2 := by + rw [triebelLizorkinNorm_two_sq, ← lintegral_const_mul' _ _ (by finiteness)] + refine lintegral_mono fun ξ => ?_ + rw [← mul_assoc] + gcongr + exact ofReal_besselWeight_sq_le_tsum hs ξ + +/-- Taking square roots in `ℝ≥0∞`: `a² ≤ c b²` implies `a ≤ c^(1/2) b`. -/ +theorem le_rpow_half_mul_of_sq_le {a b c : ℝ≥0∞} (h : a ^ 2 ≤ c * b ^ 2) : + a ≤ c ^ (1 / 2 : ℝ) * b := by + have h2 : (c ^ (1 / 2 : ℝ) * b) ^ 2 = c * b ^ 2 := by + rw [mul_pow, ← ENNReal.rpow_natCast, ← ENNReal.rpow_mul] + norm_num + exact (ENNReal.pow_le_pow_left_iff two_ne_zero).1 (h.trans h2.ge) + +/-- **`H^s ⊆ F^s_{2,2}` with norms**: for `s ≥ 0` and `f, h ∈ L_2(V)` with `J_s f = h`, +`‖f‖_{F^s_{2,2}} ≤ (2 · 4^s)^{1/2} ‖h‖_2`. -/ +theorem triebelLizorkinNorm_le_of_besselPotential_eq {s : ℝ} (hs : 0 ≤ s) + {f h : Lp ℂ 2 (volume : Measure V)} + (hfh : besselPotential V ℂ s (f : 𝓢'(V, ℂ)) = (h : 𝓢'(V, ℂ))) : + triebelLizorkinNorm s 2 f ≤ (2 * 4 ^ s) ^ (1 / 2 : ℝ) * ‖h‖ₑ := + le_rpow_half_mul_of_sq_le ((triebelLizorkinNorm_two_sq_le hs f).trans_eq + (by rw [enorm_sq_eq_lintegral_of_besselPotential_eq hfh])) + +/-- **`F^s_{2,2} ⊆ H^s` with norms**: for `s ≥ 0` and `f, h ∈ L_2(V)` with `J_s f = h`, +`‖h‖_2 ≤ (2 · 5^s)^{1/2} ‖f‖_{F^s_{2,2}}`. -/ +theorem enorm_besselPotential_le_triebelLizorkinNorm {s : ℝ} (hs : 0 ≤ s) + {f h : Lp ℂ 2 (volume : Measure V)} + (hfh : besselPotential V ℂ s (f : 𝓢'(V, ℂ)) = (h : 𝓢'(V, ℂ))) : + ‖h‖ₑ ≤ (2 * 5 ^ s) ^ (1 / 2 : ℝ) * triebelLizorkinNorm s 2 f := + le_rpow_half_mul_of_sq_le ((enorm_sq_eq_lintegral_of_besselPotential_eq hfh).trans_le + (lintegral_besselWeight_sq_le hs f)) + +/-- **`H^s = F^s_{2,2}`**: for `s ≥ 0`, a tempered distribution `u` lies in Mathlib's Sobolev +space `H^s(V)` iff it is an `L_2(V)` function in the Triebel–Lizorkin space `F^s_{2,2}(V)`. -/ +theorem memSobolev_two_iff_memTriebelLizorkin {s : ℝ} (hs : 0 ≤ s) (u : 𝓢'(V, ℂ)) : + TemperedDistribution.MemSobolev s 2 u ↔ + ∃ f : Lp ℂ 2 (volume : Measure V), (f : 𝓢'(V, ℂ)) = u ∧ MemTriebelLizorkin s 2 f := by + constructor + · rintro ⟨h, hh⟩ + obtain ⟨f, rfl⟩ := exists_toTemperedDistribution_eq_of_besselPotential_eq hs hh + refine ⟨f, rfl, (triebelLizorkinNorm_le_of_besselPotential_eq hs hh).trans_lt ?_⟩ + exact ENNReal.mul_lt_top (by finiteness) eNorm_lt_top + · rintro ⟨f, rfl, hf⟩ + refine memSobolev_two_of_lintegral_lt_top f ((lintegral_besselWeight_sq_le hs f).trans_lt ?_) + exact ENNReal.mul_lt_top (by finiteness) (ENNReal.pow_lt_top hf) + +/-- **`H^s = B^s_{2,2}`**: for `s > 0`, a tempered distribution `u` lies in `H^s(V)` iff it is an +`L_2(V)` function in the approximation space `A^s_2` of the band-limited scheme, the Besov space +`B^s_{2,2}(V)`. -/ +theorem memSobolev_two_iff_exists_memApprox {s : ℝ} (hs : 0 < s) (u : 𝓢'(V, ℂ)) : + TemperedDistribution.MemSobolev s 2 u ↔ ∃ f : Lp ℂ 2 (volume : Measure V), + (f : 𝓢'(V, ℂ)) = u ∧ (bandScheme two_ne_top).MemApprox s 2 f := by + simp_rw [memSobolev_two_iff_memTriebelLizorkin hs.le, + memTriebelLizorkin_iff_memApprox two_ne_top hs] + +/-- **`H^s` by the Littlewood–Paley norm**: for `s ≥ 0`, a tempered distribution `u` lies in +`H^s(V)` iff it is an `L_2(V)` function with `‖(2^(js) ‖Δ_j f‖_2)_j‖_{ℓ_2} < ∞`. -/ +theorem memSobolev_two_iff_littlewoodPaleyNorm_lt_top {s : ℝ} (hs : 0 ≤ s) (u : 𝓢'(V, ℂ)) : + TemperedDistribution.MemSobolev s 2 u ↔ ∃ f : Lp ℂ 2 (volume : Measure V), + (f : 𝓢'(V, ℂ)) = u ∧ littlewoodPaleyNorm two_ne_top s 2 f < ∞ := by + simp_rw [memSobolev_two_iff_memTriebelLizorkin hs, MemTriebelLizorkin, + triebelLizorkinNorm_eq_littlewoodPaleyNorm two_ne_top] + +/-- **The bundled space `H^s(V)`**: for `s ≥ 0`, every `F ∈ H^{s}(V)` (Mathlib's +`BesselPotentialSpace`) is an `L_2(V)` function `f` in `F^s_{2,2}(V)` with +`‖f‖_{F^s_{2,2}} ≤ (2 · 4^s)^{1/2} ‖F‖_{H^s}`. -/ +theorem exists_eq_toDistr_two {s : ℝ} (hs : 0 ≤ s) (F : H^{s}(V)) : + ∃ f : Lp ℂ 2 (volume : Measure V), (f : 𝓢'(V, ℂ)) = F.toDistr ∧ + MemTriebelLizorkin s 2 f ∧ + triebelLizorkinNorm s 2 f ≤ (2 * 4 ^ s) ^ (1 / 2 : ℝ) * ‖F‖ₑ := by + obtain ⟨f, hf⟩ := exists_toTemperedDistribution_eq_of_besselPotential_eq hs + F.bessel_toDistr_eq_toLp + have hb := triebelLizorkinNorm_le_of_besselPotential_eq hs (f := f) + (hf ▸ F.bessel_toDistr_eq_toLp) + rw [BesselPotentialSpace.enorm_toLp_eq] at hb + exact ⟨f, hf, hb.trans_lt (ENNReal.mul_lt_top (by finiteness) eNorm_lt_top), hb⟩ + +/-! ### `W^1_2 = H^1` -/ + +/-- **A derivative on the Fourier side**: if `∂_v f = g` as tempered distributions with +`f, g ∈ L_2(V)`, then `𝓕g(ξ) = 2πi ⟪ξ, v⟫ 𝓕f(ξ)` almost everywhere (Mathlib's +`TemperedDistribution.fourier_lineDerivOp_eq`). -/ +theorem fourier_ae_eq_of_lineDerivOp_eq {v : V} {f g : Lp ℂ 2 (volume : Measure V)} + (h : ∂_{v} (f : 𝓢'(V, ℂ)) = (g : 𝓢'(V, ℂ))) : + (fun ξ => 2 * π * Complex.I * (inner ℝ ξ v : ℂ) * (𝓕 f : Lp ℂ 2 (volume : Measure V)) ξ) + =ᵐ[volume] (𝓕 g : Lp ℂ 2 (volume : Measure V)) := by + refine ae_eq_of_smulLeftCLM_eq (w := fun ξ => 2 * π * Complex.I * (inner ℝ ξ v : ℂ)) + (by fun_prop) ?_ + rw [← Lp.fourier_toTemperedDistribution_eq, ← Lp.fourier_toTemperedDistribution_eq, ← h, + TemperedDistribution.fourier_lineDerivOp_eq, ← smul_apply, + ← TemperedDistribution.smulLeftCLM_smul (by fun_prop)] + rfl + +omit [FiniteDimensional ℝ V] [MeasurableSpace V] [BorelSpace V] in +/-- `|2πi ⟪ξ, v⟫| ≤ 2π ‖v‖ ⟨ξ⟩`, by Cauchy–Schwarz and `‖ξ‖ ≤ ⟨ξ⟩`. -/ +theorem norm_two_pi_I_inner_le (ξ v : V) : + ‖2 * π * Complex.I * (inner ℝ ξ v : ℂ)‖ ≤ 2 * π * ‖v‖ * besselWeight 1 ξ := by + rw [norm_mul, norm_mul, norm_mul, Complex.norm_I, Complex.norm_real, Complex.norm_real, + Complex.norm_ofNat, Real.norm_of_nonneg Real.pi_pos.le, Real.norm_eq_abs, mul_one] + have h1 := abs_real_inner_le_norm ξ v + have h2 := norm_le_besselWeight_one ξ + have h3 : ‖ξ‖ * ‖v‖ ≤ ‖v‖ * besselWeight 1 ξ := by nlinarith [norm_nonneg v] + calc 2 * π * |inner ℝ ξ v| ≤ 2 * π * (‖v‖ * besselWeight 1 ξ) := by gcongr; linarith + _ = _ := by ring + +/-- **Weak derivatives are bounded by the `H^1` norm**: if `g` is the weak derivative `∂_v f` on +`V` of `f ∈ L_2(V)`, `g ∈ L_2(V)`, and `J_1 f = h ∈ L_2(V)`, then +`‖g‖_2 ≤ 2π ‖v‖ ‖h‖_2`. -/ +theorem enorm_le_of_hasWeakLineDeriv {v : V} {f g h : Lp ℂ 2 (volume : Measure V)} + (hfg : HasWeakLineDeriv ⊤ (fun _ : Fin 1 => v) f g) + (hfh : besselPotential V ℂ 1 (f : 𝓢'(V, ℂ)) = (h : 𝓢'(V, ℂ))) : + ‖g‖ₑ ≤ ENNReal.ofReal (2 * π) * ‖v‖ₑ * ‖h‖ₑ := by + have h1 := fourier_ae_eq_of_lineDerivOp_eq (hasWeakLineDeriv_top_iff.1 hfg) + have h2 := fourier_ae_eq_of_besselPotential_eq hfh + rw [← enorm_fourier_Lp_two g, ← enorm_fourier_Lp_two h, Lp.eNorm_def, Lp.eNorm_def] + refine eLpNorm_le_mul_eLpNorm_of_ae_le_mul'' _ (Lp.aestronglyMeasurable _) ?_ + filter_upwards [h1, h2] with ξ e1 e2 + rw [← e1, ← e2, eNorm_mul (2 * π * Complex.I * (inner ℝ ξ v : ℂ)), + eNorm_mul (besselWeight 1 ξ : ℂ), ← mul_assoc] + gcongr + rw [← ofReal_norm, ← ofReal_norm, enorm_besselWeight, ← ENNReal.ofReal_mul (by positivity), + ← ENNReal.ofReal_mul (by positivity)] + exact ENNReal.ofReal_le_ofReal (norm_two_pi_I_inner_le ξ v) + +/-- **A directional derivative by Plancherel**: if `∂_v f = g` as tempered distributions with +`f, g ∈ L_2(V)`, then `(2π)² ∫ ⟪ξ, v⟫² |𝓕f(ξ)|² dξ = ‖g‖_2²`. -/ +theorem lintegral_inner_sq_eq {v : V} {f g : Lp ℂ 2 (volume : Measure V)} + (h : ∂_{v} (f : 𝓢'(V, ℂ)) = (g : 𝓢'(V, ℂ))) : + ENNReal.ofReal (2 * π) ^ 2 * ∫⁻ ξ, ‖(inner ℝ ξ v : ℂ)‖ₑ ^ 2 * + ‖(𝓕 f : Lp ℂ 2 (volume : Measure V)) ξ‖ₑ ^ 2 = ‖g‖ₑ ^ 2 := by + rw [← enorm_fourier_Lp_two g, enorm_sq_eq_lintegral, + ← lintegral_const_mul' _ _ (by finiteness)] + refine lintegral_congr_ae ?_ + filter_upwards [fourier_ae_eq_of_lineDerivOp_eq h] with ξ hξ + rw [← hξ, eNorm_mul, eNorm_mul, mul_pow, mul_pow, ← mul_assoc] + congr 2 + rw [← ofReal_norm] + congr 1 + simp [abs_of_pos Real.pi_pos] + +omit [FiniteDimensional ℝ V] [MeasurableSpace V] [BorelSpace V] in +/-- **Parseval for the Bessel weight**: `⟨ξ⟩² = 1 + ∑_i ⟪ξ, e_i⟫²` for every orthonormal basis +`(e_i)` of `V` (Mathlib's `OrthonormalBasis.sum_sq_inner_left`). -/ +theorem ofReal_besselWeight_one_sq {ι : Type*} [Fintype ι] (b : OrthonormalBasis ι ℝ V) (ξ : V) : + ENNReal.ofReal (besselWeight 1 ξ) ^ 2 = 1 + ∑ i, ‖(inner ℝ ξ (b i) : ℂ)‖ₑ ^ 2 := by + rw [ofReal_besselWeight_sq, ENNReal.rpow_one, ← b.sum_sq_inner_left ξ, + ENNReal.ofReal_add zero_le_one (Finset.sum_nonneg fun i _ => sq_nonneg _), + ENNReal.ofReal_one, ENNReal.ofReal_sum_of_nonneg fun i _ => sq_nonneg _] + congr 1 + refine Finset.sum_congr rfl fun i _ => ?_ + rw [← ofReal_norm, Complex.norm_real, Real.norm_eq_abs, ← ENNReal.ofReal_pow (abs_nonneg _), + sq_abs] + +/-- **The `H^1` integral by the gradient**: let `(e_i)` be an orthonormal basis of `V`. If +`∂_{e_i} f = g_i` as tempered distributions for every `i`, with `f, g_i ∈ L_2(V)`, then +`(2π)² ∫ ⟨ξ⟩² |𝓕f(ξ)|² dξ = (2π)² ‖f‖_2² + ∑_i ‖g_i‖_2²`. -/ +theorem lintegral_besselWeight_one_sq_eq {ι : Type*} [Fintype ι] (b : OrthonormalBasis ι ℝ V) + {f : Lp ℂ 2 (volume : Measure V)} {g : ι → Lp ℂ 2 (volume : Measure V)} + (hg : ∀ i, ∂_{b i} (f : 𝓢'(V, ℂ)) = (g i : 𝓢'(V, ℂ))) : + ENNReal.ofReal (2 * π) ^ 2 * ∫⁻ ξ, ENNReal.ofReal (besselWeight 1 ξ) ^ 2 * + ‖(𝓕 f : Lp ℂ 2 (volume : Measure V)) ξ‖ₑ ^ 2 = + ENNReal.ofReal (2 * π) ^ 2 * ‖f‖ₑ ^ 2 + ∑ i, ‖g i‖ₑ ^ 2 := by + have hF : AEMeasurable (fun ξ => ‖(𝓕 f : Lp ℂ 2 (volume : Measure V)) ξ‖ₑ ^ 2) volume := + (Lp.aestronglyMeasurable _).eNorm.pow_const 2 + simp_rw [ofReal_besselWeight_one_sq b, add_mul, one_mul, Finset.sum_mul] + rw [lintegral_add_left' hF, lintegral_finsetSum' _ fun i _ => ?_, mul_add, Finset.mul_sum, + ← enorm_sq_eq_lintegral, enorm_fourier_Lp_two] + · congr 1 + exact Finset.sum_congr rfl fun i _ => lintegral_inner_sq_eq (hg i) + · exact ((Complex.continuous_ofReal.comp (continuous_id.inner continuous_const)).measurable.eNorm + |>.pow_const 2).aemeasurable.mul hF + +/-- **A gradient in `L_2` gives `H^1`**: let `(e_i)` be an orthonormal basis of `V`. If +`∂_{e_i} f = g_i` as tempered distributions for every `i`, with `f, g_i ∈ L_2(V)`, then +`f ∈ H^1(V)`, since `(2π)² ∫ ⟨ξ⟩² |𝓕f|² = (2π)² ‖f‖_2² + ∑_i ‖g_i‖_2² < ∞` +(`Rd.lintegral_besselWeight_one_sq_eq`, `Rd.memSobolev_two_of_lintegral_lt_top`). -/ +theorem memSobolev_one_two_of_lineDerivOp_eq {ι : Type*} [Fintype ι] + (b : OrthonormalBasis ι ℝ V) {f : Lp ℂ 2 (volume : Measure V)} + {g : ι → Lp ℂ 2 (volume : Measure V)} (hg : ∀ i, ∂_{b i} (f : 𝓢'(V, ℂ)) = (g i : 𝓢'(V, ℂ))) : + TemperedDistribution.MemSobolev 1 2 (f : 𝓢'(V, ℂ)) := by + refine memSobolev_two_of_lintegral_lt_top f (ENNReal.lt_top_of_mul_ne_top_right ?_ + (ENNReal.pow_ne_zero (by simp [Real.pi_pos]) 2 : ENNReal.ofReal (2 * π) ^ 2 ≠ 0)) + rw [lintegral_besselWeight_one_sq_eq b hg] + exact ENNReal.add_ne_top.2 ⟨ENNReal.mul_ne_top (by finiteness) + (ENNReal.pow_ne_top eNorm_ne_top), ENNReal.sum_ne_top.2 fun i _ => + ENNReal.pow_ne_top eNorm_ne_top⟩ + +/-- **`W^1_2 = H^1`**: a function `f ∈ L_2(V)` lies in the Sobolev space `W^1_2(V)` of weak +derivatives (`Rd.MemSobolev 1 f`) iff it lies in Mathlib's Sobolev space `H^1(V)` +(`TemperedDistribution.MemSobolev 1 2`). `⇒`: the weak derivatives along the orthonormal basis +`Rd.gridBasis V` give `f ∈ H^1` (`Rd.memSobolev_one_two_of_lineDerivOp_eq`); `⇐`: Mathlib's +`TemperedDistribution.MemSobolev.lineDerivOp` maps `H^1` to `H^0 = L_2`. -/ +theorem memSobolev_one_iff (f : Lp ℂ 2 (volume : Measure V)) : + MemSobolev 1 f ↔ TemperedDistribution.MemSobolev 1 2 (f : 𝓢'(V, ℂ)) := by + rw [memSobolev_iff_tempered] + constructor + · intro hf + choose g hg using fun i : Fin (finrank ℝ V) => hf 1 le_rfl (fun _ => gridBasis V i) + exact memSobolev_one_two_of_lineDerivOp_eq (gridBasis V) (g := g) hg + · intro hf k hk v + rcases Nat.le_one_iff_eq_zero_or_eq_one.1 hk with rfl | rfl + · exact ⟨f, rfl⟩ + · exact TemperedDistribution.memSobolev_zero_iff.1 + (by simpa using hf.lineDerivOp (m := v 0)) + +/-- **The `H^1` norm by the weak gradient**: let `(e_i)` be an orthonormal basis of `V`. If +`g_i ∈ L_2(V)` is the weak derivative `∂_{e_i} f` on `V` of `f ∈ L_2(V)` for every `i`, and +`J_1 f = h ∈ L_2(V)`, then `(2π)² ‖h‖_2² = (2π)² ‖f‖_2² + ∑_i ‖g_i‖_2²`. -/ +theorem enorm_besselPotential_one_sq_eq {ι : Type*} [Fintype ι] (b : OrthonormalBasis ι ℝ V) + {f h : Lp ℂ 2 (volume : Measure V)} {g : ι → Lp ℂ 2 (volume : Measure V)} + (hg : ∀ i, HasWeakLineDeriv ⊤ (fun _ : Fin 1 => b i) f (g i)) + (hfh : besselPotential V ℂ 1 (f : 𝓢'(V, ℂ)) = (h : 𝓢'(V, ℂ))) : + ENNReal.ofReal (2 * π) ^ 2 * ‖h‖ₑ ^ 2 = + ENNReal.ofReal (2 * π) ^ 2 * ‖f‖ₑ ^ 2 + ∑ i, ‖g i‖ₑ ^ 2 := by + rw [enorm_sq_eq_lintegral_of_besselPotential_eq hfh] + exact lintegral_besselWeight_one_sq_eq b fun i => hasWeakLineDeriv_top_iff.1 (hg i) + +/-- **The `H^1` norm is at most the `W^1_2` norm**: under the hypotheses of +`Rd.enorm_besselPotential_one_sq_eq`, `‖J_1 f‖_2² ≤ ‖f‖_2² + ∑_i ‖∂_{e_i} f‖_2²`, since +`(2π)² ≥ 1`. -/ +theorem enorm_besselPotential_one_sq_le {ι : Type*} [Fintype ι] (b : OrthonormalBasis ι ℝ V) + {f h : Lp ℂ 2 (volume : Measure V)} {g : ι → Lp ℂ 2 (volume : Measure V)} + (hg : ∀ i, HasWeakLineDeriv ⊤ (fun _ : Fin 1 => b i) f (g i)) + (hfh : besselPotential V ℂ 1 (f : 𝓢'(V, ℂ)) = (h : 𝓢'(V, ℂ))) : + ‖h‖ₑ ^ 2 ≤ ‖f‖ₑ ^ 2 + ∑ i, ‖g i‖ₑ ^ 2 := by + have hc1 : 1 ≤ ENNReal.ofReal (2 * π) ^ 2 := one_le_pow₀ (by + rw [← ENNReal.ofReal_one] + exact ENNReal.ofReal_le_ofReal (by linarith [Real.one_le_pi_div_two])) + refine (ENNReal.mul_le_mul_iff_right (zero_lt_one.trans_le hc1).ne' (by finiteness)).1 ?_ + rw [enorm_besselPotential_one_sq_eq b hg hfh, mul_add] + gcongr + exact le_mul_of_one_le_left (by positivity) hc1 + +/-- `‖J_1 f‖_2² ≤ ‖f‖_2² + ∑_i ‖∂_{e_i} f‖_2²` in `ℝ` (`Rd.enorm_besselPotential_one_sq_le`). -/ +theorem sq_norm_besselPotential_one_le {ι : Type*} [Fintype ι] (b : OrthonormalBasis ι ℝ V) + {f h : Lp ℂ 2 (volume : Measure V)} {g : ι → Lp ℂ 2 (volume : Measure V)} + (hg : ∀ i, HasWeakLineDeriv ⊤ (fun _ : Fin 1 => b i) f (g i)) + (hfh : besselPotential V ℂ 1 (f : 𝓢'(V, ℂ)) = (h : 𝓢'(V, ℂ))) : + ‖h‖ ^ 2 ≤ ‖f‖ ^ 2 + ∑ i, ‖g i‖ ^ 2 := by + have hle := enorm_besselPotential_one_sq_le b hg hfh + simp only [← ofReal_norm, ← ENNReal.ofReal_pow (norm_nonneg _)] at hle + rw [← ENNReal.ofReal_sum_of_nonneg (fun i _ => by positivity), + ← ENNReal.ofReal_add (by positivity) (by positivity)] at hle + exact (ENNReal.ofReal_le_ofReal_iff (by positivity)).1 hle + +/-- **The `H^1` norm by the weak gradient, in `ℝ`**: under the hypotheses of +`Rd.enorm_besselPotential_one_sq_eq`, `(2π)² ‖h‖_2² = (2π)² ‖f‖_2² + ∑_i ‖g_i‖_2²`. -/ +theorem sq_norm_besselPotential_one_eq {ι : Type*} [Fintype ι] (b : OrthonormalBasis ι ℝ V) + {f h : Lp ℂ 2 (volume : Measure V)} {g : ι → Lp ℂ 2 (volume : Measure V)} + (hg : ∀ i, HasWeakLineDeriv ⊤ (fun _ : Fin 1 => b i) f (g i)) + (hfh : besselPotential V ℂ 1 (f : 𝓢'(V, ℂ)) = (h : 𝓢'(V, ℂ))) : + (2 * π) ^ 2 * ‖h‖ ^ 2 = (2 * π) ^ 2 * ‖f‖ ^ 2 + ∑ i, ‖g i‖ ^ 2 := by + have he := enorm_besselPotential_one_sq_eq b hg hfh + simp only [← ofReal_norm, ← ENNReal.ofReal_pow (norm_nonneg _), + ← ENNReal.ofReal_pow (by positivity : (0 : ℝ) ≤ 2 * π)] at he + rw [← ENNReal.ofReal_mul (by positivity), ← ENNReal.ofReal_mul (by positivity), + ← ENNReal.ofReal_sum_of_nonneg (fun i _ => by positivity), + ← ENNReal.ofReal_add (by positivity) (by positivity)] at he + exact (ENNReal.ofReal_eq_ofReal_iff (by positivity) (by positivity)).1 he + +/-! ### `W^1_2(V)` as a Besov space -/ + +/-- **`W^1_2 = B^1_{2,2}`**: `F ∈ L_2(V)` lies in the Sobolev space `W^1_2(V)` iff it lies in the +approximation space `A^1_2` of the band-limited functions, the Besov space `B^1_{2,2}(V)`. This +combines `W^1_2 = H^1` (`Rd.memSobolev_one_iff`) and `H^1 = B^1_{2,2}` +(`Rd.memSobolev_two_iff_exists_memApprox`); an `L_2` function is determined by its tempered +distribution (`Rd.eq_of_toTemperedDistribution_eq`). -/ +theorem memSobolev_one_iff_memApprox (F : Lp ℂ 2 (volume : Measure V)) : + MemSobolev 1 F ↔ (bandScheme two_ne_top).MemApprox 1 2 F := by + rw [memSobolev_one_iff, memSobolev_two_iff_exists_memApprox one_pos] + refine ⟨fun ⟨f, hf, hfa⟩ => ?_, fun h => ⟨F, rfl, h⟩⟩ + rwa [← eq_of_toTemperedDistribution_eq hf] + +/-- **`W^1_2 = B^1_{2,2}` by differences**: for every order `r ≥ 2`, `F ∈ L_2(V)` lies in +`W^1_2(V)` iff `‖F‖_2 + ‖(2^k ω_r(F, 2^(-k))_2)_k‖_{ℓ_2} < ∞` +(`Rd.memApprox_bandScheme_iff_modulus` with `s = 1 < r`). -/ +theorem memSobolev_one_iff_modulus {r : ℕ} (hr : 2 ≤ r) (F : Lp ℂ 2 (volume : Measure V)) : + MemSobolev 1 F ↔ ‖F‖ₑ + lqNorm 2 (fun k => dyadicWeight 1 k * lpModulus 2 r F k) < ∞ := by + rw [memSobolev_one_iff_memApprox] + have hr' : (1 : ℝ) < r := by exact_mod_cast Nat.lt_of_lt_of_le one_lt_two hr + exact memApprox_bandScheme_iff_modulus two_ne_top zero_le_one hr' one_le_two F + +end Rd diff --git a/LeanPool/FunctionSpaces/Rd/Sobolev/WeakDerivativeChangeOfVariables.lean b/LeanPool/FunctionSpaces/Rd/Sobolev/WeakDerivativeChangeOfVariables.lean new file mode 100644 index 0000000000..ed07513dbc --- /dev/null +++ b/LeanPool/FunctionSpaces/Rd/Sobolev/WeakDerivativeChangeOfVariables.lean @@ -0,0 +1,837 @@ +/- +Copyright (c) 2026 Mario Ullrich. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Mario Ullrich +-/ +module + +public import LeanPool.FunctionSpaces.Rd.SingularIntegrals.ConvolutionAdjoint +public import Mathlib.Analysis.Calculus.LineDeriv.IntegrationByParts +public import Mathlib.Analysis.Calculus.Rademacher +public import Mathlib.Geometry.Manifold.PartitionOfUnity +public import Mathlib.MeasureTheory.Function.SpecialFunctions.Inner + +/- +Modified for Lean Pool: module names and imports adapted. +-/ + +/-! +# Weak derivatives under Lipschitz changes of variables, and cutoffs + +Let `V` be a finite-dimensional real inner product space with Lebesgue measure and the +orthonormal basis `e_0, …, e_{n-1}` of `Rd.gridBasis`; the integrals of line derivatives hold for +every Haar measure on a finite-dimensional normed space, and the composition bounds for every +measure-preserving map between measure spaces. + +* **Two general facts** (`MeasureTheory.LocallyIntegrable.integrable_of_hasCompactSupport`, + `MeasureTheory.eLpNorm_mul_le_of_forall_norm_le`): locally integrable functions with compact + support are integrable, and `‖c u‖_{L_p} ≤ C ‖u‖_{L_p}` for every multiplier `|c| ≤ C`. +* **Lipschitz functions** (`Rd.integral_lineDeriv_eq_zero_complex`, + `Rd.hasWeakLineDeriv_of_lipschitzWith`): the line derivative of a compactly supported Lipschitz + function integrates to zero, and the almost everywhere line derivative `∂_v f` of a Lipschitz + function `f` is its weak derivative on every open set (Mathlib's integration by parts + `LipschitzWith.integral_lineDeriv_mul_eq` and Rademacher's theorem). The classical derivative + of a `C^1` function is its weak derivative (`Rd.hasWeakLineDeriv_of_contDiff`, Mathlib's + `integral_mul_fderiv_eq_neg_fderiv_mul_of_integrable`); in particular constants have weak + gradient zero (`Rd.hasWeakLineDeriv_const`). +* **Directions** (`Rd.HasWeakLineDeriv.sum_smul_dir`, `Rd.hasWeakLineDeriv_of_forall_gridBasis`): + weak derivatives are linear in the direction, so the derivatives `g_i = ∂_{e_i} f` give + `∂_v f = ∑_i ⟪v, e_i⟫ g_i` for every `v`, and `W^1_p(V)` and `W^1_p(Ω)` need only the basis + directions (`Rd.memSobolev_one_of_forall_gridBasis`, `Rd.memWeakSobolev_one_of_forall_gridBasis`). +* **Cutoffs**: the `L_p` bounds of the product rule with a cutoff of + `FunctionSpaces.Rd.Sobolev.WeakDerivatives`: if the smooth `χ` has closed support in `B`, the + `L_p(O)` norms of `χ g + (∂_w χ) f` and `χ f` are bounded by the `L_p(O ∩ B)` norms of `f` + and `g` (`Rd.eLpNorm_mul_add_fderiv_mul_le`, `Rd.eLpNorm_mul_le_of_tsupport_subset`), on `V` + in the norm `‖f‖_p + ∑_i ‖g_i‖_p` (`Rd.eLpNorm_mul_add_sum_le_of_tsupport_subset`); smooth + cutoffs equal to `1` near a compact set exist (`Rd.exists_contDiff_eventuallyEq_one`), with + bounded derivatives (`Rd.exists_norm_fderiv_gridBasis_le`). +* **Mollification on open sets** (`Rd.fderiv_conv_apply_eq_conv`, + `Rd.exists_tendsto_contDiff_of_hasWeakLineDeriv`): mollification commutes with weak + derivatives, and for every compact `K ⊆ O` smooth compactly supported `u_k` converge to `f` + in `L_1(K)` with `∂_{w_i} u_k → ∂_{w_i} f` in `L_1(K)`, through a smooth cutoff equal to `1` + near `K`. +* **The chain rule** (`Rd.HasWeakLineDeriv.comp_lipschitzWith`; local to global: + `Rd.hasWeakLineDeriv_of_forall_isCompact`): for a Lipschitz map `Φ` that preserves Lebesgue + measure and maps `U` into `O`, the derivatives `g_i = ∂_{e_i} f` on `O` give + `∂_v (f ∘ Φ)(x) = ∑_i ⟪DΦ(x) v, e_i⟫ g_i(Φ x)` on `U`, with the `L_p` bounds + `‖h ∘ Φ‖_{L_p(U)} ≤ ‖h‖_{L_p(O)}` (`Rd.eLpNorm_comp_le_of_mapsTo`) and, for `1 ≤ p`, + `‖∑_i ⟪DΦ v, e_i⟫ h_i ∘ Φ‖_{L_p(U)} ≤ K ‖v‖ ∑_i ‖h_i‖_{L_p(O)}` + (`Rd.eLpNorm_sum_inner_fderiv_mul_comp_le`). +-/ + +@[expose] public section + +open MeasureTheory Filter Topology TopologicalSpace Module Set +open scoped ENNReal NNReal SchwartzMap LineDeriv Distributions + +namespace MeasureTheory + +/-- **Locally integrable functions with compact support are integrable**: such a function is +integrable on its compact closed support (Mathlib's `LocallyIntegrable.integrableOn_isCompact`) and +zero outside it, as for continuous functions in `Continuous.integrable_of_hasCompactSupport`. -/ +theorem LocallyIntegrable.integrable_of_hasCompactSupport {X E : Type*} [TopologicalSpace X] + [MeasurableSpace X] {μ : Measure X} [NormedAddCommGroup E] {f : X → E} + (hf : LocallyIntegrable f μ) (hc : HasCompactSupport f) : Integrable f μ := + (integrableOn_iff_integrable_of_support_subset (subset_tsupport f)).1 + (hf.integrableOn_isCompact hc.isCompact) + +/-- **Bounded multipliers on `L_p`**: if `c` is almost everywhere strongly measurable with +`‖c x‖ ≤ C` for every `x`, then `‖c u‖_{L_p(μ)} ≤ C ‖u‖_{L_p(μ)}` for every `u` and every +`0 ≤ p ≤ ∞`. For almost everywhere strongly measurable `u` this is Mathlib's +`eLpNorm_le_mul_eLpNorm_of_ae_le_mul'`; for the other `u`, `‖u‖_{L_p(μ)} = ∞` +(`eLpNorm_of_not_aestronglyMeasurable`), and for `C = 0` the product is `0`. -/ +theorem eLpNorm_mul_le_of_forall_norm_le {α : Type*} [MeasurableSpace α] {μ : Measure α} + {c u : α → ℂ} (hc : AEStronglyMeasurable c μ) {C : ℝ≥0} (hC : ∀ x, ‖c x‖ ≤ C) + (p : ℝ≥0∞) : eLpNorm (fun x => c x * u x) p μ ≤ C * eLpNorm u p μ := by + by_cases hu : AEStronglyMeasurable u μ + · refine eLpNorm_le_mul_eLpNorm_of_ae_le_mul' (hc.mul hu) (ae_of_all _ fun x => ?_) p + rw [Pi.mul_apply, eNorm_mul] + gcongr + exact eNorm_le_coe.2 (by rw [← NNReal.coe_le_coe, coe_nnNorm]; exact hC x) + rcases eq_or_ne C 0 with rfl | hC0 + · have h0 : (fun x => c x * u x) = 0 := funext fun x => by + have hx := hC x + rw [NNReal.coe_zero, norm_le_zero_iff] at hx + simp [hx] + rw [h0, eLpNorm_zero] + exact zero_le + · rw [eLpNorm_of_not_aestronglyMeasurable hu, ENNReal.mul_top (ENNReal.coe_ne_zero.2 hC0)] + exact le_top + +end MeasureTheory + +namespace Rd + +/-! ### Integrals of line derivatives of Lipschitz functions -/ + +section LineDerivIntegral + +variable {F : Type*} [NormedAddCommGroup F] [NormedSpace ℝ F] [FiniteDimensional ℝ F] + [MeasurableSpace F] [BorelSpace F] {μ : Measure F} [μ.IsAddHaarMeasure] {C : ℝ≥0} + +/-- **The line derivative of a compactly supported Lipschitz function integrates to zero**: for a +Lipschitz `f : F → ℝ` with compact support on a finite-dimensional space with a Haar measure, +`∫ ∂_v f = 0` for every direction `v`. This is Mathlib's integration by parts for Lipschitz +functions (`LipschitzWith.integral_lineDeriv_mul_eq`) against the constant `1`. -/ +theorem integral_lineDeriv_eq_zero {f : F → ℝ} (hf : LipschitzWith C f) + (hfc : HasCompactSupport f) (v : F) : ∫ x, lineDeriv ℝ f x v ∂μ = 0 := by + have h := (LipschitzWith.const (1 : ℝ)).integral_lineDeriv_mul_eq (μ := μ) hf hfc (-v) + simp only [neg_neg, mul_one] at h + rw [← h] + simp [lineDeriv] + +/-- **The line derivative of a compactly supported Lipschitz function is integrable**: it is +measurable (Mathlib's `aestronglyMeasurable_lineDeriv`), bounded by `C ‖v‖` +(`norm_lineDeriv_le_of_lipschitz`) and zero outside the closed support of `f`. -/ +theorem integrable_lineDeriv {G : Type*} [NormedAddCommGroup G] [NormedSpace ℝ G] + [CompleteSpace G] {f : F → G} + (hf : LipschitzWith C f) (hfc : HasCompactSupport f) (v : F) : + Integrable (fun x => lineDeriv ℝ f x v) μ := by + refine IntegrableOn.integrable_of_forall_notMem_eq_zero (s := tsupport f) + (Measure.integrableOn_of_bounded hfc.measure_lt_top.ne + (aestronglyMeasurable_lineDeriv hf.continuous _) + (ae_of_all _ fun _ => norm_lineDeriv_le_of_lipschitz ℝ hf)) fun x hx => ?_ + rw [((notMem_tsupport_iff_eventuallyEq).1 hx).lineDeriv_eq] + simp [lineDeriv] + +/-- **Real parts of line derivatives**: for a Lipschitz `f : F → ℂ`, almost everywhere the real +part of `∂_v f` is the line derivative of `Re f`, since `f` is differentiable almost everywhere +(Rademacher's theorem, Mathlib's `LipschitzWith.ae_differentiableAt`). -/ +theorem ae_re_lineDeriv_eq {f : F → ℂ} (hf : LipschitzWith C f) (v : F) : + ∀ᵐ x ∂μ, (lineDeriv ℝ f x v).re = lineDeriv ℝ (fun y => (f y).re) x v := by + filter_upwards [hf.ae_differentiableAt] with x hx + have h2 : HasFDerivAt (fun y => (f y).re) (Complex.reCLM.comp (fderiv ℝ f x)) x := + Complex.reCLM.hasFDerivAt.comp x hx.hasFDerivAt + rw [hx.lineDeriv_eq_fderiv, h2.differentiableAt.lineDeriv_eq_fderiv, h2.fderiv] + rfl + +/-- **Imaginary parts of line derivatives**: for a Lipschitz `f : F → ℂ`, almost everywhere the +imaginary part of `∂_v f` is the line derivative of `Im f` (Rademacher's theorem). -/ +theorem ae_im_lineDeriv_eq {f : F → ℂ} (hf : LipschitzWith C f) (v : F) : + ∀ᵐ x ∂μ, (lineDeriv ℝ f x v).im = lineDeriv ℝ (fun y => (f y).im) x v := by + filter_upwards [hf.ae_differentiableAt] with x hx + have h2 : HasFDerivAt (fun y => (f y).im) (Complex.imCLM.comp (fderiv ℝ f x)) x := + Complex.imCLM.hasFDerivAt.comp x hx.hasFDerivAt + rw [hx.lineDeriv_eq_fderiv, h2.differentiableAt.lineDeriv_eq_fderiv, h2.fderiv] + rfl + +/-- **The complex form**: for a compactly supported Lipschitz `f : F → ℂ`, `∫ ∂_v f = 0`. The +real and imaginary parts of `∂_v f` are almost everywhere the line derivatives of the real and +imaginary parts of `f` (`Rd.ae_re_lineDeriv_eq`, `Rd.ae_im_lineDeriv_eq`), whose integrals vanish +(`Rd.integral_lineDeriv_eq_zero`), and `∂_v f` is integrable (`Rd.integrable_lineDeriv`). -/ +theorem integral_lineDeriv_eq_zero_complex {f : F → ℂ} (hf : LipschitzWith C f) + (hfc : HasCompactSupport f) (v : F) : ∫ x, lineDeriv ℝ f x v ∂μ = 0 := by + have h := integral_re_add_im (integrable_lineDeriv (μ := μ) hf hfc v) + simp only [RCLike.re_to_complex, RCLike.im_to_complex, RCLike.I_to_complex] at h + have h0re : ∫ x, lineDeriv ℝ (fun y => (f y).re) x v ∂μ = 0 := + integral_lineDeriv_eq_zero (Complex.reCLM.lipschitzWith.comp hf) + (hfc.comp_left Complex.zero_re) v + have h0im : ∫ x, lineDeriv ℝ (fun y => (f y).im) x v ∂μ = 0 := + integral_lineDeriv_eq_zero (Complex.imCLM.lipschitzWith.comp hf) + (hfc.comp_left Complex.zero_im) v + rw [← h, integral_congr_ae (ae_re_lineDeriv_eq hf v), integral_congr_ae (ae_im_lineDeriv_eq hf v), + h0re, h0im] + simp + +end LineDerivIntegral + +variable {V : Type*} [NormedAddCommGroup V] [InnerProductSpace ℝ V] [FiniteDimensional ℝ V] + [MeasurableSpace V] [BorelSpace V] + +/-! ### Lipschitz functions -/ + +section Lipschitz + +/-- **Integration by parts for a Lipschitz function and a test function**: for a Lipschitz +`u : V → ℝ` and every test function `φ` on an open set, `∫ φ ∂_v u = -∫ (∂_v φ) u`, Mathlib's +`LipschitzWith.integral_lineDeriv_mul_eq` with the Lipschitz function `φ` of compact support +(`ContDiff.lipschitzWith_of_hasCompactSupport`). -/ +theorem integral_testFunction_mul_lineDeriv {Ω : Opens V} {u : V → ℝ} {K : ℝ≥0} + (hu : LipschitzWith K u) (φ : 𝓓(Ω, ℝ)) (v : V) : + ∫ x, φ x * lineDeriv ℝ u x v = -∫ x, (∂_{v} φ) x * u x := by + obtain ⟨D, hD⟩ := φ.contDiff.lipschitzWith_of_hasCompactSupport φ.hasCompactSupport (by simp) + have h := hu.integral_lineDeriv_mul_eq (μ := volume) hD φ.hasCompactSupport v + have hφ : ∀ x, lineDeriv ℝ φ x (-v) = -(∂_{v} φ) x := fun x => by + rw [((φ.contDiff.differentiable (by simp)).differentiableAt).lineDeriv_eq_fderiv, + lineDerivOp_testFunction_apply, map_neg] + simp only [hφ, neg_mul, integral_neg] at h + rw [← h] + exact integral_congr_ae (ae_of_all _ fun x => mul_comm _ _) + +/-- **Lipschitz functions are weakly differentiable**: for a Lipschitz `f : V → ℂ`, the almost +everywhere line derivative `∂_v f` (Mathlib's `lineDeriv`) is the weak derivative of `f` on every +open set, for every direction `v`. The real and imaginary parts are almost everywhere the line +derivatives of `Re f` and `Im f` (`Rd.ae_re_lineDeriv_eq`, `Rd.ae_im_lineDeriv_eq`), and +`Rd.integral_testFunction_mul_lineDeriv` integrates by parts. -/ +theorem hasWeakLineDeriv_of_lipschitzWith {K : ℝ≥0} {f : V → ℂ} (hf : LipschitzWith K f) + (Ω : Opens V) (v : V) : + HasWeakLineDeriv Ω (fun _ : Fin 1 => v) f (fun x => lineDeriv ℝ f x v) := by + have hfl : LocallyIntegrable f volume := hf.continuous.locallyIntegrable + have hgl : LocallyIntegrable (fun x => lineDeriv ℝ f x v) volume := + (memLp_top_of_bound (aestronglyMeasurable_lineDeriv hf.continuous _) (K * ‖v‖) + (ae_of_all _ fun _ => norm_lineDeriv_le_of_lipschitz ℝ hf)).locallyIntegrable le_top + refine (hasWeakLineDeriv_iff_integral (hfl.locallyIntegrableOn _) + (hgl.locallyIntegrableOn _)).2 fun φ => ?_ + rw [LineDeriv.iteratedLineDerivOp_one] + have i1 := φ.integrable_smul (hgl.locallyIntegrableOn (Ω : Set V)) + have i2 := (∂_{v} φ).integrable_smul (hfl.locallyIntegrableOn (Ω : Set V)) + have hre : ∫ x, φ x * lineDeriv ℝ (fun y => (f y).re) x v = -∫ x, (∂_{v} φ) x * (f x).re := + integral_testFunction_mul_lineDeriv (Complex.reCLM.lipschitzWith.comp hf) φ v + have him : ∫ x, φ x * lineDeriv ℝ (fun y => (f y).im) x v = -∫ x, (∂_{v} φ) x * (f x).im := + integral_testFunction_mul_lineDeriv (Complex.imCLM.lipschitzWith.comp hf) φ v + apply Complex.ext + · have h1 := integral_re i1 + have h2 := integral_re i2 + simp only [RCLike.re_to_complex, Complex.smul_re, smul_eq_mul] at h1 h2 + rw [← h1, integral_congr_ae ((ae_re_lineDeriv_eq hf v).mono fun x hx => by rw [hx]), hre, + pow_one, neg_one_smul, Complex.neg_re, ← h2] + · have h1 := integral_im i1 + have h2 := integral_im i2 + simp only [RCLike.im_to_complex, Complex.smul_im, smul_eq_mul] at h1 h2 + rw [← h1, integral_congr_ae ((ae_im_lineDeriv_eq hf v).mono fun x hx => by rw [hx]), him, + pow_one, neg_one_smul, Complex.neg_im, ← h2] + +/-- **Classical derivatives are weak derivatives**: for a `C^1` function `F` on `V`, the +classical directional derivative `x ↦ DF(x) w` is the weak derivative `∂_w F` on every open set +`Ω`. This is integration by parts against compactly supported test functions (Mathlib's +`integral_mul_fderiv_eq_neg_fderiv_mul_of_integrable`). -/ +theorem hasWeakLineDeriv_of_contDiff {F : V → ℂ} (hF : ContDiff ℝ 1 F) (Ω : Opens V) (w : V) : + HasWeakLineDeriv Ω (fun _ : Fin 1 => w) F (fun x => fderiv ℝ F x w) := by + have hc : Continuous F := hF.continuous + have hd : Continuous fun x => fderiv ℝ F x w := + (hF.continuous_fderiv one_ne_zero).clm_apply continuous_const + refine (hasWeakLineDeriv_iff_integral (hc.locallyIntegrable.locallyIntegrableOn _) + (hd.locallyIntegrable.locallyIntegrableOn _)).2 fun φ => ?_ + have hi : ∀ (ψ : 𝓓(Ω, ℝ)) {u : V → ℂ}, Continuous u → + Integrable (fun x => (testSchwartz ψ) x * u x) volume := fun ψ u hu => by + simpa only [testSchwartz_apply, Complex.real_smul] using + ψ.integrable_smul (hu.locallyIntegrable.locallyIntegrableOn _) + have h := integral_mul_fderiv_eq_neg_fderiv_mul_of_integrable (f := testSchwartz φ) (g := F) + (v := w) (by simpa only [fderiv_testSchwartz_apply, testSchwartz_apply] using hi (∂_{w} φ) hc) + (hi φ hd) (hi φ hc) (fun x _ => (testSchwartz φ).differentiableAt) + (fun x _ => (hF.differentiable one_ne_zero).differentiableAt) + simp only [fderiv_testSchwartz_apply, testSchwartz_apply] at h + rw [LineDeriv.iteratedLineDerivOp_one, pow_one, neg_one_smul] + simpa only [Complex.real_smul] using h + +/-- **Constants have weak gradient zero**: on every open set `O`, the constant function `c` has +the weak derivative `0` in every direction `w` (`Rd.hasWeakLineDeriv_of_contDiff`). -/ +theorem hasWeakLineDeriv_const (O : Opens V) (w : V) (c : ℂ) : + HasWeakLineDeriv O (fun _ : Fin 1 => w) (fun _ => c) 0 := by + have h := hasWeakLineDeriv_of_contDiff (contDiff_const (c := c)) O w + have h0 : (fun x => fderiv ℝ (fun _ : V => c) x w) = 0 := funext fun x => by simp + rwa [h0] at h + +end Lipschitz + +/-! ### Directions -/ + +section Directions + +variable {Ω : Opens V} {f : V → ℂ} + +/-- Finite sums of locally integrable functions on `Ω` with coefficients in a normed field `𝕜` +acting on `ℂ`, such as `ℝ` or `ℂ`, are locally integrable on `Ω`, by induction over the sum as in +Mathlib's `locallyIntegrable_finsetSum'`. -/ +theorem locallyIntegrableOn_sum_smul {𝕜 : Type*} [NormedField 𝕜] [NormedSpace 𝕜 ℂ] {ι : Type*} + (s : Finset ι) (c : ι → 𝕜) {g : ι → V → ℂ} + (hg : ∀ i ∈ s, LocallyIntegrableOn (g i) Ω volume) : + LocallyIntegrableOn (∑ i ∈ s, c i • g i) Ω volume := + Finset.sum_induction (fun i => c i • g i) + (fun u : V → ℂ => LocallyIntegrableOn u (Ω : Set V) volume) + (fun _ _ => LocallyIntegrableOn.add) locallyIntegrableOn_zero fun i hi => (hg i hi).smul (c i) + +/-- **Weak derivatives are linear in the direction**: if `g_i = ∂_{v_i} f` weakly on `Ω` for every +`i ∈ s`, `s` finite, and `f` is locally integrable on `Ω`, then for all real `c_i`, +`∑_i c_i g_i = ∂_v f` weakly on `Ω` for `v = ∑_i c_i v_i`. Tested against `φ`, this is the +linearity of `w ↦ ∂_w φ = Dφ(·) w` (`Rd.lineDerivOp_testFunction_apply`). -/ +theorem HasWeakLineDeriv.sum_smul_dir {ι : Type*} (s : Finset ι) {v : ι → V} (c : ι → ℝ) + {g : ι → V → ℂ} (hf : LocallyIntegrableOn f Ω volume) + (h : ∀ i ∈ s, HasWeakLineDeriv Ω (fun _ : Fin 1 => v i) f (g i)) : + HasWeakLineDeriv Ω (fun _ : Fin 1 => ∑ i ∈ s, c i • v i) f (∑ i ∈ s, (c i : ℂ) • g i) := by + refine (hasWeakLineDeriv_iff_integral hf + (locallyIntegrableOn_sum_smul s (fun i => (c i : ℂ)) fun i hi => (h i hi).2)).2 fun φ => ?_ + have hL : ∀ x, (∂^{fun _ : Fin 1 => ∑ i ∈ s, c i • v i} φ) x = + ∑ i ∈ s, c i * (∂^{fun _ : Fin 1 => v i} φ) x := fun x => by + simp only [LineDeriv.iteratedLineDerivOp_one, lineDerivOp_testFunction_apply, map_sum, + map_smul, smul_eq_mul] + have e1 : (fun x => φ x • (∑ i ∈ s, (c i : ℂ) • g i) x) = + fun x => ∑ i ∈ s, (c i : ℂ) * (φ x • g i x) := funext fun x => by + rw [Finset.sum_apply, Finset.smul_sum] + refine Finset.sum_congr rfl fun i _ => ?_ + simp only [Pi.smul_apply, smul_eq_mul, Complex.real_smul] + ring + have e2 : (fun x => (∂^{fun _ : Fin 1 => ∑ i ∈ s, c i • v i} φ) x • f x) = + fun x => ∑ i ∈ s, (c i : ℂ) * ((∂^{fun _ : Fin 1 => v i} φ) x • f x) := funext fun x => by + rw [hL, Finset.sum_smul] + refine Finset.sum_congr rfl fun i _ => ?_ + simp only [Complex.real_smul, Complex.ofReal_mul] + ring + rw [e1, e2, integral_finsetSum _ fun i hi => (φ.integrable_smul (h i hi).2).const_mul _, + integral_finsetSum _ fun i _ => ((∂^{fun _ : Fin 1 => v i} φ).integrable_smul hf).const_mul _, + Finset.smul_sum] + refine Finset.sum_congr rfl fun i hi => ?_ + rw [integral_const_mul, integral_const_mul, (h i hi).integral_eq φ] + simp only [Complex.real_smul] + ring + +/-- **Local integrability from the basis derivatives**: if `f` has weak derivatives `g_i` along +the basis vectors `e_i` on `Ω`, then `f` is locally integrable on `Ω`; in dimension `0` every +function on `V` is constant, hence continuous. -/ +theorem locallyIntegrableOn_of_forall_gridBasis {g : Fin (finrank ℝ V) → V → ℂ} + (h : ∀ i, HasWeakLineDeriv Ω (fun _ : Fin 1 => gridBasis V i) f (g i)) : + LocallyIntegrableOn f Ω volume := by + rcases (finrank ℝ V).eq_zero_or_pos with h0 | h0 + · have : Subsingleton V := Module.finrank_zero_iff.1 h0 + have hc : Continuous f := by + have hf : f = fun _ => f 0 := funext fun x => congrArg f (Subsingleton.elim x 0) + rw [hf] + exact continuous_const + exact hc.locallyIntegrable.locallyIntegrableOn _ + · exact (h ⟨0, h0⟩).locallyIntegrableOn + +/-- **All directions from the basis**: if `g_i = ∂_{e_i} f` weakly on `Ω` for the basis vectors +`e_i` of `Rd.gridBasis`, then `∑_i ⟪v, e_i⟫ g_i = ∂_v f` weakly on `Ω` for every `v ∈ V` +(`Rd.HasWeakLineDeriv.sum_smul_dir` with `v = ∑_i ⟪v, e_i⟫ e_i`, Mathlib's +`OrthonormalBasis.sum_repr'`). -/ +theorem hasWeakLineDeriv_of_forall_gridBasis {g : Fin (finrank ℝ V) → V → ℂ} + (h : ∀ i, HasWeakLineDeriv Ω (fun _ : Fin 1 => gridBasis V i) f (g i)) (v : V) : + HasWeakLineDeriv Ω (fun _ : Fin 1 => v) f + (fun x => ∑ i, (inner ℝ v (gridBasis V i) : ℂ) * g i x) := by + have h' := HasWeakLineDeriv.sum_smul_dir Finset.univ (fun i => inner ℝ v (gridBasis V i)) + (locallyIntegrableOn_of_forall_gridBasis h) fun i _ => h i + have hv : ∑ i, inner ℝ v (gridBasis V i) • gridBasis V i = v := by + simpa only [real_inner_comm] using (gridBasis V).sum_repr' v + rw [hv] at h' + convert h' using 1 + funext x + simp [Finset.sum_apply] + +/-- **`W^1_p(V)` from the basis derivatives**: a function `F ∈ L_p(V)`, `1 ≤ p`, with weak +derivatives `G_i ∈ L_p(V)` along the basis vectors `e_i` on `V` lies in `W^1_p(V)`; the +derivative along `v` is the class of `∑_i ⟪v, e_i⟫ G_i` +(`Rd.hasWeakLineDeriv_of_forall_gridBasis`, `Rd.memSobolev_one_of_forall_hasWeakLineDeriv`). -/ +theorem memSobolev_one_of_forall_gridBasis {p : ℝ≥0∞} [Fact (1 ≤ p)] + {F : Lp ℂ p (volume : Measure V)} {G : Fin (finrank ℝ V) → Lp ℂ p (volume : Measure V)} + (h : ∀ i, HasWeakLineDeriv ⊤ (fun _ : Fin 1 => gridBasis V i) F (G i)) : MemSobolev 1 F := by + refine memSobolev_one_of_forall_hasWeakLineDeriv fun v => ?_ + have hm : MemLp (fun x => ∑ i, (inner ℝ v (gridBasis V i) : ℂ) * G i x) p volume := + memLp_finsetSum Finset.univ fun i _ => (Lp.memLp (G i)).const_mul _ + refine ⟨hm.toLp _, (hasWeakLineDeriv_of_forall_gridBasis h v).congr_ae EventuallyEq.rfl ?_⟩ + rw [volume_restrict_top] + exact hm.coeFn_toLp.symm + +/-- **`W^1_p(Ω)` from the basis derivatives**: on an open set `Ω`, for `1 ≤ p`, a function +`f ∈ L_p(Ω)` with weak derivatives `g_i = ∂_{e_i} f ∈ L_p(Ω)` along the basis vectors +`e_i = Rd.gridBasis V i` lies in `W^1_p(Ω)`; the derivative along `v` is +`∑_i ⟪v, e_i⟫ g_i` (`Rd.hasWeakLineDeriv_of_forall_gridBasis`), and the derivative of order zero +is `f` itself. -/ +theorem memWeakSobolev_one_of_forall_gridBasis {p : ℝ≥0∞} (hp : 1 ≤ p) + {g : Fin (finrank ℝ V) → V → ℂ} (hf : MemLp f p (volume.restrict Ω)) + (hg : ∀ i, MemLp (g i) p (volume.restrict Ω)) + (h : ∀ i, HasWeakLineDeriv Ω (fun _ : Fin 1 => gridBasis V i) f (g i)) : + MemWeakSobolev Ω 1 p f := by + refine ⟨hf, fun k hk v => ?_⟩ + rcases Nat.le_one_iff_eq_zero_or_eq_one.1 hk with rfl | rfl + · exact ⟨f, hf, hasWeakLineDeriv_fin_zero v (locallyIntegrableOn_of_memLp hp hf)⟩ + have hv : v = fun _ => v 0 := funext fun i => congrArg v (Subsingleton.elim i 0) + rw [hv] + refine ⟨fun x => ∑ i, (inner ℝ (v 0) (gridBasis V i) : ℂ) * g i x, ?_, + hasWeakLineDeriv_of_forall_gridBasis h (v 0)⟩ + exact memLp_finsetSum Finset.univ fun i _ => (hg i).const_mul _ + +end Directions + +/-! ### Cutoffs -/ + +section Cutoff + +variable {O B : Opens V} + +/-- **Restriction to the support**: if `h` vanishes outside the open set `B`, then its `L_p` norm +on `O` is its `L_p` norm on `O ∩ B`, for every `0 ≤ p ≤ ∞` (Mathlib's +`eLpNorm_indicator_eq_eLpNorm_restrict`). -/ +theorem eLpNorm_restrict_eq_inf_of_support_subset {E : Type*} [NormedAddCommGroup E] {h : V → E} + (hB : Function.support h ⊆ B) (p : ℝ≥0∞) : + eLpNorm h p (volume.restrict O) = eLpNorm h p (volume.restrict (O ⊓ B : Opens V)) := by + conv_lhs => rw [← indicator_eq_self.2 hB] + rw [eLpNorm_indicator_eq_eLpNorm_restrict B.isOpen.measurableSet.nullMeasurableSet, + Measure.restrict_restrict B.isOpen.measurableSet, Opens.coe_inf, inter_comm] + +/-- **The `L_p` bound for a cutoff derivative**: if `χ` has closed support in `B`, `|χ| ≤ C` and +`|∂_w χ| ≤ C'`, then `‖χ g + (∂_w χ) f‖_{L_p(O)} ≤ C ‖g‖_{L_p(O ∩ B)} + C' ‖f‖_{L_p(O ∩ B)}` for +all `f`, `g` and `1 ≤ p`: the function vanishes outside `B`, and each term is bounded by +`MeasureTheory.eLpNorm_mul_le_of_forall_norm_le`. -/ +theorem eLpNorm_mul_add_fderiv_mul_le {p : ℝ≥0∞} (hp : 1 ≤ p) {w : V} {f g : V → ℂ} {χ : V → ℝ} + (hχ : ContDiff ℝ ((⊤ : ℕ∞) : WithTop ℕ∞) χ) (hχB : tsupport χ ⊆ B) {C C' : ℝ≥0} + (hC : ∀ x, ‖χ x‖ ≤ C) (hC' : ∀ x, ‖fderiv ℝ χ x w‖ ≤ C') : + eLpNorm (fun x => (χ x : ℂ) * g x + (fderiv ℝ χ x w : ℂ) * f x) p (volume.restrict O) ≤ + C * eLpNorm g p (volume.restrict (O ⊓ B : Opens V)) + + C' * eLpNorm f p (volume.restrict (O ⊓ B : Opens V)) := by + have hc : Continuous fun x => (χ x : ℂ) := Complex.continuous_ofReal.comp hχ.continuous + have hχ' : ContDiff ℝ ((⊤ : ℕ∞) : WithTop ℕ∞) fun x => fderiv ℝ χ x w := + (hχ.fderiv_right (by simp)).clm_apply contDiff_const + have hc' : Continuous fun x => (fderiv ℝ χ x w : ℂ) := + Complex.continuous_ofReal.comp hχ'.continuous + have hsupp : (Function.support fun x => (χ x : ℂ) * g x + (fderiv ℝ χ x w : ℂ) * f x) ⊆ B := by + intro x hx + by_contra hxB + have h0 : χ =ᶠ[𝓝 x] 0 := notMem_tsupport_iff_eventuallyEq.1 fun h => hxB (hχB h) + exact hx (by simp [h0.eq_of_nhds, h0.fderiv_eq]) + rw [eLpNorm_restrict_eq_inf_of_support_subset hsupp] + exact (eLpNorm_add_le hp).trans (add_le_add + (eLpNorm_mul_le_of_forall_norm_le hc.aestronglyMeasurable + (fun x => by rw [Complex.norm_real]; exact hC x) p) + (eLpNorm_mul_le_of_forall_norm_le hc'.aestronglyMeasurable + (fun x => by rw [Complex.norm_real]; exact hC' x) p)) + +/-- **Cutoffs in `L_p`**: if `χ` is continuous with closed support in `B` and `|χ| ≤ C`, then +`‖χ f‖_{L_p(O)} ≤ C ‖f‖_{L_p(O ∩ B)}` for every `f` and every `0 ≤ p ≤ ∞`: the product vanishes +outside `B` (`Rd.eLpNorm_restrict_eq_inf_of_support_subset`), and +`MeasureTheory.eLpNorm_mul_le_of_forall_norm_le` bounds it. -/ +theorem eLpNorm_mul_le_of_tsupport_subset {p : ℝ≥0∞} {f : V → ℂ} {χ : V → ℝ} + (hχ : Continuous χ) (hχB : tsupport χ ⊆ B) {C : ℝ≥0} (hC : ∀ x, ‖χ x‖ ≤ C) : + eLpNorm (fun x => (χ x : ℂ) * f x) p (volume.restrict O) ≤ + C * eLpNorm f p (volume.restrict (O ⊓ B : Opens V)) := by + have hsupp : (Function.support fun x => (χ x : ℂ) * f x) ⊆ B := fun x hx => + hχB (subset_tsupport _ (Function.mem_support.2 + (Complex.ofReal_ne_zero.1 (left_ne_zero_of_mul (Function.mem_support.1 hx))))) + rw [eLpNorm_restrict_eq_inf_of_support_subset hsupp] + have hc : Continuous fun x => (χ x : ℂ) := Complex.continuous_ofReal.comp hχ + exact eLpNorm_mul_le_of_forall_norm_le hc.aestronglyMeasurable + (fun x => by rw [Complex.norm_real]; exact hC x) p + +omit [MeasurableSpace V] [BorelSpace V] in +/-- **Smooth cutoffs**: for a compact `K` inside an open set `U` there is a smooth +`χ : V → [0, 1]` with compact closed support in `U` and `χ = 1` on a neighbourhood of `K` +(Mathlib's `exists_compact_between`, `exists_open_between_and_isCompact_closure` and +`exists_contDiff_support_eq_eq_one_iff`). -/ +theorem exists_contDiff_eventuallyEq_one {K U : Set V} (hK : IsCompact K) (hU : IsOpen U) + (hKU : K ⊆ U) : + ∃ χ : V → ℝ, ContDiff ℝ ((⊤ : ℕ∞) : WithTop ℕ∞) χ ∧ HasCompactSupport χ ∧ tsupport χ ⊆ U ∧ + (∀ x, χ x ∈ Icc (0 : ℝ) 1) ∧ ∀ᶠ x in 𝓝ˢ K, χ x = 1 := by + obtain ⟨L, hL, hKL, hLU⟩ := exists_compact_between hK hU hKU + obtain ⟨W, hW, hLW, hWU, hWc⟩ := exists_open_between_and_isCompact_closure hL hU hLU + obtain ⟨χ, hχ, hrange, hsupp, h1⟩ := + exists_contDiff_support_eq_eq_one_iff (n := (⊤ : ℕ∞)) hW hL.isClosed hLW + refine ⟨χ, hχ, ?_, ?_, fun x => hrange ⟨x, rfl⟩, ?_⟩ + · rw [HasCompactSupport, tsupport, hsupp] + exact hWc + · rw [tsupport, hsupp] + exact hWU + · exact eventually_of_mem (isOpen_interior.mem_nhdsSet.2 hKL) fun x hx => + (h1 x).1 (interior_subset hx) + +omit [MeasurableSpace V] [BorelSpace V] in +/-- **Bounded derivatives of a cutoff**: a smooth `χ` with compact support has +`|∂_{e_i} χ| ≤ d_i` for constants `d_i ≥ 0` (Mathlib's +`Continuous.bounded_above_of_compact_support`). -/ +theorem exists_norm_fderiv_gridBasis_le {χ : V → ℝ} (hχ : ContDiff ℝ ((⊤ : ℕ∞) : WithTop ℕ∞) χ) + (hχc : HasCompactSupport χ) : + ∃ d : Fin (finrank ℝ V) → ℝ≥0, ∀ i x, ‖fderiv ℝ χ x (gridBasis V i)‖ ≤ d i := by + choose d hd using fun i => ((hχ.continuous_fderiv (by simp)).clm_apply + continuous_const).bounded_above_of_compact_support (hχc.fderiv_apply (𝕜 := ℝ) (gridBasis V i)) + exact ⟨fun i => (d i).toNNReal, fun i x => (hd i x).trans (Real.le_coe_toNNReal _)⟩ + +/-- A real function with values in `[0, 1]`, such as the cutoffs of +`Rd.exists_contDiff_eventuallyEq_one`, has norm at most `1`. -/ +theorem norm_le_one_of_forall_mem_Icc {α : Type*} {χ : α → ℝ} (h : ∀ x, χ x ∈ Icc (0 : ℝ) 1) + (x : α) : ‖χ x‖ ≤ 1 := by + rw [Real.norm_eq_abs, abs_of_nonneg (h x).1] + exact (h x).2 + +/-- **The bound of a cutoff on `V`**: for `1 ≤ p`, an open `O`, a smooth `χ` with values in +`[0, 1]`, closed support in `O` and `|∂_{e_i} χ| ≤ d_i`, and all `f`, `g_i`, +`‖χ f‖_p + ∑_i ‖χ g_i + (∂_{e_i} χ) f‖_p ≤ (1 + ∑_i d_i) (‖f‖_{L_p(O)} + ∑_i ‖g_i‖_{L_p(O)})` +(`Rd.eLpNorm_mul_le_of_tsupport_subset` and `Rd.eLpNorm_mul_add_fderiv_mul_le` on `V`). -/ +theorem eLpNorm_mul_add_sum_le_of_tsupport_subset {p : ℝ≥0∞} (hp : 1 ≤ p) {χ : V → ℝ} + (hχ : ContDiff ℝ ((⊤ : ℕ∞) : WithTop ℕ∞) χ) (hχO : tsupport χ ⊆ O) + (hχ01 : ∀ x, χ x ∈ Icc (0 : ℝ) 1) {d : Fin (finrank ℝ V) → ℝ≥0} + (hd : ∀ i x, ‖fderiv ℝ χ x (gridBasis V i)‖ ≤ d i) (f : V → ℂ) + (g : Fin (finrank ℝ V) → V → ℂ) : + eLpNorm (fun x => (χ x : ℂ) * f x) p volume + ∑ i, eLpNorm + (fun x => (χ x : ℂ) * g i x + (fderiv ℝ χ x (gridBasis V i) : ℂ) * f x) p volume ≤ + (1 + ∑ i, (d i : ℝ≥0∞)) * + (eLpNorm f p (volume.restrict O) + ∑ i, eLpNorm (g i) p (volume.restrict O)) := by + have h1 : ∀ x, ‖χ x‖ ≤ ((1 : ℝ≥0) : ℝ) := fun x => + (norm_le_one_of_forall_mem_Icc hχ01 x).trans_eq NNReal.coe_one.symm + have hF := eLpNorm_mul_le_of_tsupport_subset (O := ⊤) (B := O) (f := f) (p := p) + hχ.continuous hχO h1 + have hG := fun i => eLpNorm_mul_add_fderiv_mul_le (O := ⊤) (B := O) (f := f) (g := g i) + hp hχ hχO h1 (hd i) + simp only [volume_restrict_top, top_inf_eq, ENNReal.coe_one, one_mul] at hF hG + calc _ ≤ eLpNorm f p (volume.restrict O) + ∑ i, (eLpNorm (g i) p + (volume.restrict O) + d i * eLpNorm f p (volume.restrict O)) := + add_le_add hF (Finset.sum_le_sum fun i _ => hG i) + _ ≤ _ := by + rw [Finset.sum_add_distrib, ← Finset.sum_mul] + calc _ ≤ eLpNorm f p (volume.restrict O) + + (∑ i, eLpNorm (g i) p (volume.restrict O) + + (∑ i, (d i : ℝ≥0∞)) * eLpNorm f p (volume.restrict O)) + + (∑ i, (d i : ℝ≥0∞)) * ∑ i, eLpNorm (g i) p (volume.restrict O) := + le_self_add + _ = _ := by ring + +end Cutoff + +/-! ### Mollification on open sets -/ + +section Mollification + +omit [FiniteDimensional ℝ V] [MeasurableSpace V] [BorelSpace V] in +/-- The directional derivative of a smooth compactly supported `K`, as a Schwartz function +(Mathlib's `HasCompactSupport.toSchwartzMap`), is `y ↦ DK(y) v`. -/ +theorem coe_lineDerivOp_toSchwartzMap {K : V → ℂ} (hK : ContDiff ℝ ((⊤ : ℕ∞) : WithTop ℕ∞) K) + (hKs : HasCompactSupport K) (v : V) : + ((∂^{fun _ : Fin 1 => v} (hKs.toSchwartzMap hK) : 𝓢(V, ℂ)) : V → ℂ) = + fun y => fderiv ℝ K y v := by + funext y + rw [LineDeriv.iteratedLineDerivOp_one, SchwartzMap.lineDerivOp_apply_eq_fderiv] + rfl + +/-- **The derivative of a mollification is the mollified weak derivative**: for a smooth `K` +with compact support and `g = ∂_v h` weakly on `V`, `D(K ⋆ h)(x) v = (K ⋆ g)(x)` for every `x`. +The derivative falls on the kernel (`Rd.fderiv_conv_apply`), and the weak derivative tested with +the reflected translate `y ↦ K(x - y)` moves it back to `h` +(`Rd.conv_eq_conv_iteratedLineDerivOp_of_hasWeakLineDeriv`). -/ +theorem fderiv_conv_apply_eq_conv {K : V → ℂ} (hK : ContDiff ℝ ((⊤ : ℕ∞) : WithTop ℕ∞) K) + (hKs : HasCompactSupport K) {v : V} {h g : V → ℂ} + (hhg : HasWeakLineDeriv ⊤ (fun _ : Fin 1 => v) h g) (x : V) : + fderiv ℝ (conv K h volume) x v = conv K g volume x := by + have hc := conv_eq_conv_iteratedLineDerivOp_of_hasWeakLineDeriv hhg + (η := hKs.toSchwartzMap hK) hKs (x := x) fun _ _ => by simp + rw [fderiv_conv_apply (hK.of_le (by exact_mod_cast le_top)) hKs hhg.locallyIntegrable, + ← coe_lineDerivOp_toSchwartzMap hK hKs v] + exact hc.symm + +/-- **Mollifiers converge in `L_1` of a set**: for an integrable `h` that agrees with `h'` almost +everywhere on `K`, the mollifications `η_{k+1} ⋆ h` with the standard bump +`η = Rd.LocalMeansBump.std` converge to `h'` in `L_1(K)` (`Rd.tendsto_eLpNorm_conv_dilate_sub` +with `p = 1`). -/ +theorem tendsto_eLpNorm_mollify_sub_restrict {h h' : V → ℂ} (hh : Integrable h volume) {K : Set V} + (hK : h =ᵐ[volume.restrict K] h') : + Tendsto (fun k : ℕ => eLpNorm (conv (dilate ((k : ℝ) + 1) + (LocalMeansBump.std (V := V)).toFun) h volume - h') 1 (volume.restrict K)) atTop (𝓝 0) := by + have hlim : Tendsto (fun k : ℕ => eLpNorm (conv (dilate ((k : ℝ) + 1) + (LocalMeansBump.std (V := V)).toFun) h volume - h) 1 volume) atTop (𝓝 0) := + (tendsto_eLpNorm_conv_dilate_sub ENNReal.one_ne_top LocalMeansBump.std.integrable + LocalMeansBump.std.integral_eq_one (memLp_one_iff_integrable.2 hh)).comp + (tendsto_atTop_add_const_right _ 1 tendsto_natCast_atTop_atTop) + refine tendsto_of_tendsto_of_tendsto_of_le_of_le tendsto_const_nhds hlim (fun _ => bot_le) + fun k => ?_ + calc eLpNorm (conv (dilate ((k : ℝ) + 1) (LocalMeansBump.std (V := V)).toFun) h volume - h') 1 + (volume.restrict K) + = eLpNorm (conv (dilate ((k : ℝ) + 1) (LocalMeansBump.std (V := V)).toFun) h volume - h) 1 + (volume.restrict K) := eLpNorm_congr_ae (EventuallyEq.rfl.sub hK.symm) + _ ≤ _ := eLpNorm_mono_measure _ Measure.restrict_le_self + +/-- **The cutoff of a weakly differentiable function**: if `g = ∂_w f` weakly on `O` and `χ` is +smooth with compact closed support in `O`, then `χ f` and `χ g + (∂_w χ) f` are integrable on `V` +and `χ g + (∂_w χ) f = ∂_w (χ f)` weakly on `V` (`Rd.HasWeakLineDeriv.mul_of_tsupport_subset` +with `V` for `O` and `O` for `B`, and +`MeasureTheory.LocallyIntegrable.integrable_of_hasCompactSupport`). -/ +theorem HasWeakLineDeriv.cutoff_top {O : Opens V} {w : V} {f g : V → ℂ} + (hfg : HasWeakLineDeriv O (fun _ : Fin 1 => w) f g) {χ : V → ℝ} + (hχ : ContDiff ℝ ((⊤ : ℕ∞) : WithTop ℕ∞) χ) (hχc : HasCompactSupport χ) + (hχO : tsupport χ ⊆ O) : + HasWeakLineDeriv ⊤ (fun _ : Fin 1 => w) (fun x => (χ x : ℂ) * f x) + (fun x => (χ x : ℂ) * g x + (fderiv ℝ χ x w : ℂ) * f x) ∧ + Integrable (fun x => (χ x : ℂ) * f x) volume ∧ + Integrable (fun x => (χ x : ℂ) * g x + (fderiv ℝ χ x w : ℂ) * f x) volume := by + have h : HasWeakLineDeriv ⊤ (fun _ : Fin 1 => w) (fun x => (χ x : ℂ) * f x) + (fun x => (χ x : ℂ) * g x + (fderiv ℝ χ x w : ℂ) * f x) := + (hfg.mono (by simp)).mul_of_tsupport_subset hχ hχO + have hc : HasCompactSupport fun x => (χ x : ℂ) := hχc.comp_left Complex.ofReal_zero + have hc' : HasCompactSupport fun x => (fderiv ℝ χ x w : ℂ) := + (hχc.fderiv_apply (𝕜 := ℝ) w).comp_left Complex.ofReal_zero + exact ⟨h, h.locallyIntegrable.integrable_of_hasCompactSupport hc.mul_right, + h.locallyIntegrable_deriv.integrable_of_hasCompactSupport (hc.mul_right.add hc'.mul_right)⟩ + +/-- **Interior mollification in `L_1`**: let `g_i = ∂_{w_i} f` weakly on the open set `O` +(`i ∈ ι`), `f` locally integrable on `O`, and `K ⊆ O` compact. Then there are smooth compactly +supported `u_k` with `u_k → f` and `D u_k(·) w_i → g_i` in `L_1(K)` for every `i`: with a cutoff +`χ = 1` near `K` (`Rd.exists_contDiff_eventuallyEq_one`), `u_k = η_{k+1} ⋆ (χ f)`, whose +derivatives are `η_{k+1} ⋆ (χ g_i + (∂_{w_i} χ) f)` (`Rd.fderiv_conv_apply_eq_conv`). -/ +theorem exists_tendsto_contDiff_of_hasWeakLineDeriv {O : Opens V} {K : Set V} (hK : IsCompact K) + (hKO : K ⊆ O) {ι : Type*} {w : ι → V} {f : V → ℂ} {g : ι → V → ℂ} + (hfg : ∀ i, HasWeakLineDeriv O (fun _ : Fin 1 => w i) f (g i)) + (hf : LocallyIntegrableOn f O volume) : + ∃ u : ℕ → V → ℂ, (∀ k, ContDiff ℝ ((⊤ : ℕ∞) : WithTop ℕ∞) (u k)) ∧ + (∀ k, HasCompactSupport (u k)) ∧ + Tendsto (fun k => eLpNorm (u k - f) 1 (volume.restrict K)) atTop (𝓝 0) ∧ + ∀ i, Tendsto (fun k => eLpNorm ((fun x => fderiv ℝ (u k) x (w i)) - g i) 1 + (volume.restrict K)) atTop (𝓝 0) := by + obtain ⟨χ, hχ, hχc, hχO, -, hχ1⟩ := exists_contDiff_eventuallyEq_one hK O.isOpen hKO + have hχK : ∀ x ∈ K, χ x = 1 ∧ fderiv ℝ χ x = 0 := fun x hx => by + have hev : χ =ᶠ[𝓝 x] fun _ => 1 := hχ1.filter_mono (nhds_le_nhdsSet hx) + exact ⟨hev.eq_of_nhds, by rw [hev.fderiv_eq, fderiv_const_apply]⟩ + have hc : HasCompactSupport fun x => (χ x : ℂ) := hχc.comp_left Complex.ofReal_zero + have hFl : LocallyIntegrable (fun x => (χ x : ℂ) * f x) volume := by + have h := locallyIntegrableOn_mul_of_tsupport_subset (O := ⊤) (B := O) (hf.mono_set (by simp)) + (Complex.continuous_ofReal.comp hχ.continuous) + ((tsupport_comp_subset Complex.ofReal_zero χ).trans hχO) + rwa [Opens.coe_top, locallyIntegrableOn_univ] at h + have hFi := hFl.integrable_of_hasCompactSupport hc.mul_right + set η := (LocalMeansBump.std (V := V)).toFun + have hη : ∀ k : ℕ, ContDiff ℝ ((⊤ : ℕ∞) : WithTop ℕ∞) (dilate ((k : ℝ) + 1) η) := fun k => + contDiff_dilate LocalMeansBump.std.contDiff _ + have hηc : ∀ k : ℕ, HasCompactSupport (dilate ((k : ℝ) + 1) η) := fun k => + hasCompactSupport_dilate LocalMeansBump.std.hasCompactSupport (by positivity) + refine ⟨fun k => conv (dilate ((k : ℝ) + 1) η) (fun x => (χ x : ℂ) * f x) volume, + fun k => contDiff_conv (hη k) (hηc k) hFl, + fun k => (hηc k).convolution (L := ContinuousLinearMap.mul ℂ ℂ) (μ := volume) hc.mul_right, + tendsto_eLpNorm_mollify_sub_restrict hFi ?_, fun i => ?_⟩ + · filter_upwards [ae_restrict_mem hK.measurableSet] with x hx + simp [(hχK x hx).1] + obtain ⟨hG, -, hGi⟩ := (hfg i).cutoff_top hχ hχc hχO + have he : ∀ k : ℕ, (fun x => fderiv ℝ (conv (dilate ((k : ℝ) + 1) η) + (fun x => (χ x : ℂ) * f x) volume) x (w i)) = conv (dilate ((k : ℝ) + 1) η) + (fun x => (χ x : ℂ) * g i x + (fderiv ℝ χ x (w i) : ℂ) * f x) volume := fun k => + funext fun x => fderiv_conv_apply_eq_conv (hη k) (hηc k) hG x + simp only [he] + refine tendsto_eLpNorm_mollify_sub_restrict hGi ?_ + filter_upwards [ae_restrict_mem hK.measurableSet] with x hx + simp [(hχK x hx).1, (hχK x hx).2] + +end Mollification + +/-! ### Compositions with measure-preserving maps -/ + +section Composition + +variable {α β E : Type*} [MeasurableSpace α] [MeasurableSpace β] [NormedAddCommGroup E] + {μ : Measure α} {ν : Measure β} {Φ : α → β} {U : Set α} {O : Set β} {h : β → E} + +/-- **Measurability of a composition on a subset**: if `Φ` carries `μ` to `ν` and maps the set +`U` into the measurable set `O`, and `h` is almost everywhere strongly measurable on `O`, then +`h ∘ Φ` is almost everywhere strongly measurable on `U`. The map `Φ` carries `μ` on `Φ⁻¹(O)` to +`ν` on `O` (Mathlib's `MeasurePreserving.restrict_preimage`), and `U ⊆ Φ⁻¹(O)`. -/ +theorem aestronglyMeasurable_comp_of_mapsTo (hmp : MeasurePreserving Φ μ ν) + (hO : MeasurableSet O) (hUO : MapsTo Φ U O) + (hh : AEStronglyMeasurable h (ν.restrict O)) : AEStronglyMeasurable (h ∘ Φ) (μ.restrict U) := + (hh.comp_measurePreserving (hmp.restrict_preimage hO)).mono_measure + (Measure.restrict_mono_set μ hUO.subset_preimage) + +/-- **`L_p` norms of compositions on a subset**: if `Φ` carries `μ` to `ν` and maps the set `U` +into the measurable set `O`, then `‖h ∘ Φ‖_{L_p(U)} ≤ ‖h‖_{L_p(O)}` for every `h` and every +`0 ≤ p ≤ ∞`. The map `Φ` carries `μ` on `Φ⁻¹(O) ⊇ U` to `ν` on `O` +(Mathlib's `MeasurePreserving.restrict_preimage`, `eLpNorm_comp_measurePreserving`); for an `h` +that is not almost everywhere strongly measurable on `O`, the right side is `∞`. -/ +theorem eLpNorm_comp_le_of_mapsTo (hmp : MeasurePreserving Φ μ ν) + (hO : MeasurableSet O) (hUO : MapsTo Φ U O) (p : ℝ≥0∞) : + eLpNorm (h ∘ Φ) p (μ.restrict U) ≤ eLpNorm h p (ν.restrict O) := by + by_cases hh : AEStronglyMeasurable h (ν.restrict O) + swap + · rw [eLpNorm_of_not_aestronglyMeasurable hh] + exact le_top + exact (eLpNorm_mono_measure _ (Measure.restrict_mono_set μ hUO.subset_preimage)).trans_eq + (eLpNorm_comp_measurePreserving hh (hmp.restrict_preimage hO)) + +end Composition + +/-! ### The chain rule -/ + +section ChainRule + +omit [MeasurableSpace V] [BorelSpace V] in +/-- **The chain rule through the basis**: if `u` is differentiable at `Φ x` and `Φ` at `x`, then +`∂_v (u ∘ Φ)(x) = ∑_i ⟪DΦ(x) v, e_i⟫ Du(Φ x) e_i`, by `DΦ(x) v = ∑_i ⟪e_i, DΦ(x) v⟫ e_i` +(Mathlib's `OrthonormalBasis.sum_repr'`). -/ +theorem lineDeriv_comp_eq_sum {u : V → ℂ} {Φ : V → V} {x : V} + (hu : DifferentiableAt ℝ u (Φ x)) (hΦ : DifferentiableAt ℝ Φ x) (v : V) : + lineDeriv ℝ (u ∘ Φ) x v = + ∑ i, (inner ℝ (fderiv ℝ Φ x v) (gridBasis V i) : ℂ) * fderiv ℝ u (Φ x) (gridBasis V i) := by + rw [(hu.comp x hΦ).lineDeriv_eq_fderiv, fderiv_comp x hu hΦ, ContinuousLinearMap.comp_apply] + conv_lhs => rw [← (gridBasis V).sum_repr' (fderiv ℝ Φ x v)] + rw [map_sum] + refine Finset.sum_congr rfl fun i _ => ?_ + rw [map_smul, Complex.real_smul, real_inner_comm] + +/-- **Smooth functions after a Lipschitz map**: for a smooth `u` with compact support and a +Lipschitz `Φ`, the weak derivative of `u ∘ Φ` on every open set along `v` is +`x ↦ ∑_i ⟪DΦ(x) v, e_i⟫ Du(Φ x) e_i`: `u ∘ Φ` is Lipschitz +(`Rd.hasWeakLineDeriv_of_lipschitzWith`), and `Rd.lineDeriv_comp_eq_sum` holds where `Φ` is +differentiable, almost everywhere by Rademacher's theorem. -/ +theorem hasWeakLineDeriv_comp_of_contDiff {u : V → ℂ} + (hu : ContDiff ℝ ((⊤ : ℕ∞) : WithTop ℕ∞) u) (huc : HasCompactSupport u) {K : ℝ≥0} + {Φ : V → V} (hΦ : LipschitzWith K Φ) (Ω : Opens V) (v : V) : + HasWeakLineDeriv Ω (fun _ : Fin 1 => v) (u ∘ Φ) + (fun x => ∑ i, (inner ℝ (fderiv ℝ Φ x v) (gridBasis V i) : ℂ) * + fderiv ℝ u (Φ x) (gridBasis V i)) := by + obtain ⟨D, hD⟩ := hu.lipschitzWith_of_hasCompactSupport huc (by simp) + refine (hasWeakLineDeriv_of_lipschitzWith (hD.comp hΦ) Ω v).congr_ae EventuallyEq.rfl ?_ + refine ae_restrict_of_ae ?_ + filter_upwards [hΦ.ae_differentiableAt (μ := volume)] with x hx + exact lineDeriv_comp_eq_sum ((hu.differentiable (by simp)).differentiableAt) hx v + +/-- **The `L_p` bound of the chain-rule derivative**: for a `K`-Lipschitz `Φ` that preserves +Lebesgue measure and maps the set `U` into the measurable set `O`, every `v` and all `h_i`, +`‖∑_i ⟪DΦ v, e_i⟫ h_i ∘ Φ‖_{L_p(U)} ≤ K ‖v‖ ∑_i ‖h_i‖_{L_p(O)}` for `1 ≤ p`, since +`|⟪DΦ(x) v, e_i⟫| ≤ ‖DΦ(x)‖ ‖v‖ ≤ K ‖v‖` (Mathlib's `norm_fderiv_le_of_lipschitz`), +`MeasureTheory.eLpNorm_mul_le_of_forall_norm_le` and `Rd.eLpNorm_comp_le_of_mapsTo`. -/ +theorem eLpNorm_sum_inner_fderiv_mul_comp_le {p : ℝ≥0∞} (hp : 1 ≤ p) {K : ℝ≥0} {Φ : V → V} + (hΦ : LipschitzWith K Φ) (hmp : MeasurePreserving Φ volume volume) {U O : Set V} + (hO : MeasurableSet O) (hUO : MapsTo Φ U O) (v : V) (h : Fin (finrank ℝ V) → V → ℂ) : + eLpNorm (fun x => ∑ i, (inner ℝ (fderiv ℝ Φ x v) (gridBasis V i) : ℂ) * h i (Φ x)) p + (volume.restrict U) ≤ K * ‖v‖ₑ * ∑ i, eLpNorm (h i) p (volume.restrict O) := by + have hfun : (fun x => ∑ i, (inner ℝ (fderiv ℝ Φ x v) (gridBasis V i) : ℂ) * h i (Φ x)) = + ∑ i, fun x => (inner ℝ (fderiv ℝ Φ x v) (gridBasis V i) : ℂ) * h i (Φ x) := by + funext x + simp [Finset.sum_apply] + rw [hfun, Finset.mul_sum] + refine (eLpNorm_sum_le hp).trans (Finset.sum_le_sum fun i _ => ?_) + have hc : Measurable fun x => (inner ℝ (fderiv ℝ Φ x v) (gridBasis V i) : ℂ) := + Complex.measurable_ofReal.comp + (Measurable.inner (measurable_fderiv_apply_const ℝ Φ v) measurable_const) + have hb : ∀ x, ‖(inner ℝ (fderiv ℝ Φ x v) (gridBasis V i) : ℂ)‖ ≤ (K * ‖v‖₊ : ℝ≥0) := by + intro x + rw [Complex.norm_real, NNReal.coe_mul, coe_nnNorm] + calc ‖inner ℝ (fderiv ℝ Φ x v) (gridBasis V i)‖ + ≤ ‖fderiv ℝ Φ x v‖ * ‖gridBasis V i‖ := norm_inner_le_norm _ _ + _ = ‖fderiv ℝ Φ x v‖ := by rw [(gridBasis V).orthonormal.1 i, mul_one] + _ ≤ ‖fderiv ℝ Φ x‖ * ‖v‖ := (fderiv ℝ Φ x).le_opNorm v + _ ≤ K * ‖v‖ := by gcongr; exact norm_fderiv_le_of_lipschitz ℝ hΦ + calc _ ≤ (K * ‖v‖₊ : ℝ≥0) * eLpNorm (h i ∘ Φ) p (volume.restrict U) := + eLpNorm_mul_le_of_forall_norm_le hc.aestronglyMeasurable hb p + _ ≤ (K * ‖v‖₊ : ℝ≥0) * eLpNorm (h i) p (volume.restrict O) := by + gcongr + exact eLpNorm_comp_le_of_mapsTo hmp hO hUO p + _ = _ := by rw [ENNReal.coe_mul, eNorm_eq_nnNorm] + +/-- **Local-to-global for weak derivatives**: if every compact `K ⊆ U` lies in an open `U'` on +which `G = ∂^v F` weakly, then `G = ∂^v F` weakly on `U`. A test function on `U` is a test +function on such a `U'` containing its closed support; local integrability is checked near the +points of `U`. -/ +theorem hasWeakLineDeriv_of_forall_isCompact {U : Opens V} {k : ℕ} {v : Fin k → V} {F G : V → ℂ} + (h : ∀ K ⊆ (U : Set V), IsCompact K → + ∃ U' : Opens V, K ⊆ U' ∧ HasWeakLineDeriv U' v F G) : + HasWeakLineDeriv U v F G := by + have hloc : ∀ {u : V → ℂ}, (∀ U' : Opens V, HasWeakLineDeriv U' v F G → + LocallyIntegrableOn u U' volume) → LocallyIntegrableOn u U volume := by + intro u hu x hx + obtain ⟨U', hxU', hU'⟩ := h {x} (singleton_subset_iff.2 hx) isCompact_singleton + have hx' : x ∈ (U' : Set V) := hxU' rfl + have h' := hu U' hU' x hx' + rwa [nhdsWithin_eq_nhds.2 (U'.isOpen.mem_nhds hx'), + ← nhdsWithin_eq_nhds.2 (U.isOpen.mem_nhds hx)] at h' + refine (hasWeakLineDeriv_iff_integral (hloc fun _ h' => h'.1) (hloc fun _ h' => h'.2)).2 + fun φ => ?_ + obtain ⟨U', hKU', hU'⟩ := h (tsupport φ) φ.tsupport_subset φ.hasCompactSupport + let ψ : 𝓓(U', ℝ) := ⟨φ, φ.contDiff, φ.hasCompactSupport, hKU'⟩ + have hψ : (ψ : V → ℝ) = φ := rfl + have h' := hU'.integral_eq ψ + rwa [coe_iteratedLineDerivOp_eq hψ, hψ] at h' + +/-- **The chain rule on a piece**: let `g_i = ∂_{e_i} f` weakly on `O`, `f` locally integrable on +`O`, `L ⊆ O` compact, `Φ` a `K`-Lipschitz map preserving Lebesgue measure, and `U` open with +`Φ(U) ⊆ L`. Then `∑_i ⟪DΦ(·) v, e_i⟫ g_i ∘ Φ = ∂_v (f ∘ Φ)` weakly on `U`: the smooth `u_k` of +`Rd.exists_tendsto_contDiff_of_hasWeakLineDeriv` give the chain rule for `u_k ∘ Φ` +(`Rd.hasWeakLineDeriv_comp_of_contDiff`), and both sides converge in `L_1(U)` by +`Rd.eLpNorm_comp_le_of_mapsTo` and `Rd.eLpNorm_sum_inner_fderiv_mul_comp_le` +(`Rd.HasWeakLineDeriv.of_tendsto`). -/ +theorem HasWeakLineDeriv.comp_lipschitzWith_of_mapsTo_isCompact {O U : Opens V} {L : Set V} + (hL : IsCompact L) (hLO : L ⊆ O) {f : V → ℂ} {g : Fin (finrank ℝ V) → V → ℂ} + (hf : LocallyIntegrableOn f O volume) + (hfg : ∀ i, HasWeakLineDeriv O (fun _ : Fin 1 => gridBasis V i) f (g i)) {K : ℝ≥0} + {Φ : V → V} (hΦ : LipschitzWith K Φ) (hmp : MeasurePreserving Φ volume volume) + (hUL : MapsTo Φ U L) (v : V) : + HasWeakLineDeriv U (fun _ : Fin 1 => v) (f ∘ Φ) + (fun x => ∑ i, (inner ℝ (fderiv ℝ Φ x v) (gridBasis V i) : ℂ) * g i (Φ x)) := by + obtain ⟨u, hu, huc, hlim, hlimd⟩ := exists_tendsto_contDiff_of_hasWeakLineDeriv hL hLO hfg hf + have hLm := hL.measurableSet + have hfL : MemLp f 1 (volume.restrict L) := + memLp_one_iff_integrable.2 (hf.integrableOn_compact_subset hLO hL) + have hgL : ∀ i, MemLp (g i) 1 (volume.restrict L) := fun i => + memLp_one_iff_integrable.2 ((hfg i).2.integrableOn_compact_subset hLO hL) + have hKv : (K : ℝ≥0∞) * ‖v‖ₑ ≠ ∞ := ENNReal.mul_ne_top ENNReal.coe_ne_top eNorm_ne_top + refine HasWeakLineDeriv.of_tendsto le_rfl le_rfl (l := atTop) + (fun k => hasWeakLineDeriv_comp_of_contDiff (hu k) (huc k) hΦ U v) + ((eLpNorm_comp_le_of_mapsTo hmp hLm hUL 1).trans_lt hfL) + ((eLpNorm_sum_inner_fderiv_mul_comp_le le_rfl hΦ hmp hLm hUL v g).trans_lt + (ENNReal.mul_lt_top hKv.lt_top (ENNReal.sum_lt_top.2 fun i _ => hgL i))) ?_ ?_ + · refine tendsto_of_tendsto_of_tendsto_of_le_of_le tendsto_const_nhds hlim (fun _ => bot_le) + fun k => ?_ + exact eLpNorm_comp_le_of_mapsTo (h := u k - f) hmp hLm hUL 1 + · have hsum := ENNReal.Tendsto.const_mul (tendsto_finsetSum Finset.univ fun i _ => + hlimd i) (Or.inr hKv) + simp only [Finset.sum_const_zero, mul_zero] at hsum + refine tendsto_of_tendsto_of_tendsto_of_le_of_le tendsto_const_nhds hsum (fun _ => bot_le) + fun k => ?_ + have he : ((fun x => ∑ i, (inner ℝ (fderiv ℝ Φ x v) (gridBasis V i) : ℂ) * + fderiv ℝ (u k) (Φ x) (gridBasis V i)) - + fun x => ∑ i, (inner ℝ (fderiv ℝ Φ x v) (gridBasis V i) : ℂ) * g i (Φ x)) = + fun x => ∑ i, (inner ℝ (fderiv ℝ Φ x v) (gridBasis V i) : ℂ) * + ((fun y => fderiv ℝ (u k) y (gridBasis V i)) - g i) (Φ x) := by + funext x + simp only [Pi.sub_apply, ← Finset.sum_sub_distrib, mul_sub] + rw [he] + exact eLpNorm_sum_inner_fderiv_mul_comp_le le_rfl hΦ hmp hLm hUL v + fun i => (fun y => fderiv ℝ (u k) y (gridBasis V i)) - g i + +/-- **The chain rule for weak derivatives under Lipschitz maps**: let `g_i = ∂_{e_i} f` weakly on +the open set `O` for the basis vectors `e_i` of `Rd.gridBasis`, let `Φ : V → V` be `K`-Lipschitz +and preserve Lebesgue measure, and let `Φ` map the open set `U` into `O`. Then for every `v ∈ V`, +`x ↦ ∑_i ⟪DΦ(x) v, e_i⟫ g_i(Φ x)` is the weak derivative `∂_v (f ∘ Φ)` on `U`; here `DΦ(x)` is +Mathlib's `fderiv`, which exists almost everywhere by Rademacher's theorem. Every compact +`K' ⊆ U` lies in the open set `Φ⁻¹(int L)` for a compact `L ⊆ O` with `Φ(K') ⊆ int L`, where +`Rd.HasWeakLineDeriv.comp_lipschitzWith_of_mapsTo_isCompact` applies +(`Rd.hasWeakLineDeriv_of_forall_isCompact`). -/ +theorem HasWeakLineDeriv.comp_lipschitzWith {O U : Opens V} {f : V → ℂ} + {g : Fin (finrank ℝ V) → V → ℂ} + (hfg : ∀ i, HasWeakLineDeriv O (fun _ : Fin 1 => gridBasis V i) f (g i)) {K : ℝ≥0} + {Φ : V → V} (hΦ : LipschitzWith K Φ) (hmp : MeasurePreserving Φ volume volume) + (hUO : MapsTo Φ U O) (v : V) : + HasWeakLineDeriv U (fun _ : Fin 1 => v) (f ∘ Φ) + (fun x => ∑ i, (inner ℝ (fderiv ℝ Φ x v) (gridBasis V i) : ℂ) * g i (Φ x)) := by + refine hasWeakLineDeriv_of_forall_isCompact fun Kc hKc hKcc => ?_ + obtain ⟨L, hL, hΦL, hLO⟩ := exists_compact_between (hKcc.image hΦ.continuous) O.isOpen + (image_subset_iff.2 (hKc.trans hUO)) + let U' : Opens V := ⟨Φ ⁻¹' interior L, isOpen_interior.preimage hΦ.continuous⟩ + refine ⟨U', fun x hx => hΦL (mem_image_of_mem Φ hx), ?_⟩ + exact HasWeakLineDeriv.comp_lipschitzWith_of_mapsTo_isCompact hL hLO + (locallyIntegrableOn_of_forall_gridBasis hfg) hfg hΦ hmp + (fun x hx => interior_subset hx) v + +end ChainRule + +end Rd diff --git a/LeanPool/FunctionSpaces/Rd/Sobolev/WeakDerivativeLeibniz.lean b/LeanPool/FunctionSpaces/Rd/Sobolev/WeakDerivativeLeibniz.lean new file mode 100644 index 0000000000..8f666fba39 --- /dev/null +++ b/LeanPool/FunctionSpaces/Rd/Sobolev/WeakDerivativeLeibniz.lean @@ -0,0 +1,516 @@ +/- +Copyright (c) 2026 Mario Ullrich. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Mario Ullrich +-/ +module + +public import LeanPool.FunctionSpaces.Rd.Sobolev.WeakDerivativeChangeOfVariables +public import LeanPool.FunctionSpaces.Rd.Differences.PointwiseMultipliers + +/- +Modified for Lean Pool: module names and imports adapted. +-/ + +/-! +# The Leibniz rule in `W^m_p` + +Let `V` be a finite-dimensional real inner product space with Lebesgue measure and the +orthonormal basis `e_0, …, e_{n-1}` of `Rd.gridBasis`. A **word** of length `k` is a map +`w : Fin k → Fin n`; it stands for the derivative `∂^{e_w} = ∂_{e_{w_0}} ⋯ ∂_{e_{w_{k-1}}}`. + +* **Composition** (`Rd.HasWeakLineDeriv.snoc`, `Rd.HasWeakLineDeriv.of_snoc`): if `h = ∂_w f`, + then `g = ∂^u h` iff `g = ∂^{(u, w)} f`, the last direction acting first. +* **Words to directions** (`Rd.iteratedLineDerivOp_eq_sum_prod_smul`, + `Rd.hasWeakLineDeriv_of_gridBasis_words`): `∂^v` is multilinear in `v`, so + `∂^v f = ∑_w ∏_l ⟪v_l, e_{w_l}⟫ ∂^{e_w} f`, and derivatives along all words of length `k` give + the derivatives along all directions `v ∈ V^k`. +* **The Leibniz rule with a bound** (`Rd.exists_hasWeakLineDeriv_mul_of_tsupport_subset`): if + `f` has the weak derivatives `g_{k,w} = ∂^{e_w} f` on `O ∩ B` for all words of length `k ≤ m` + and `χ` is smooth with compact support in `B`, then `χ f` has weak derivatives `G_w` on `O` + along all words of length `k ≤ m`, with + `‖G_w‖_{L_p(O)} ≤ C_k(χ) ∑_{k' ≤ k} ∑_{w'} ‖g_{k',w'}‖_{L_p(O ∩ B)}`. The constant is + `C_k(χ) = 2^k sup_x ∑_{j ≤ k} ‖D^j χ(x)‖` (`Rd.leibnizConst`, finite by + `Rd.leibnizConst_ne_top`); the proof is the induction `∂_i (χ f) = χ ∂_i f + (∂_i χ) f`. +* **Sums over words** (`Rd.le_sum_range_sum_words`, `Rd.sum_range_sum_words_mono`, + `Rd.sum_range_sum_words_sum_mul`): elementary bounds for `∑_{k ≤ m} ∑_w a_{k,w}`, and one + family of choices along all words of length at most `m` + (`Rd.exists_forall_words_of_forall_le`). +* **Smooth compactly supported multipliers on `W^m_p(V)`** + (`Rd.MemSobolev.mulLp_of_hasCompactSupport`): `χ F ∈ W^m_p(V)` for `F ∈ W^m_p(V)`, since + derivatives in `L_p(V)` along all words of length `k ≤ m` give `W^m_p(V)` + (`Rd.memSobolev_of_forall_gridBasis_words`); the case `m = 1` is `Rd.MemSobolev.mulLp`. +* **The product rule in `L_p(V)`** (`Rd.hasWeakLineDeriv_mulLp`): `∂_w (χ F) = χ ∂_w F + (∂_w χ) F` + for every smooth bounded `χ` with bounded `∂_w χ`. +-/ + +@[expose] public section + +open MeasureTheory Filter Topology TopologicalSpace Module Set +open scoped ENNReal NNReal LineDeriv Distributions + +namespace Rd + +variable {V : Type*} [NormedAddCommGroup V] [InnerProductSpace ℝ V] [FiniteDimensional ℝ V] + [MeasurableSpace V] [BorelSpace V] + +/-! ### Composition of weak derivatives -/ + +section Composition + +variable {Ω : Opens V} {f h g : V → ℂ} {k : ℕ} {u : Fin k → V} {w : V} + +/-- **Composition of weak derivatives**: if `h = ∂_w f` and `g = ∂^u h` weakly on `Ω`, then +`g = ∂^{(u, w)} f` weakly on `Ω`, where `∂_w` acts first (Mathlib's +`LineDeriv.iteratedLineDerivOp_succ_right`). -/ +theorem HasWeakLineDeriv.snoc (h₁ : HasWeakLineDeriv Ω (fun _ : Fin 1 => w) f h) + (h₂ : HasWeakLineDeriv Ω u h g) : HasWeakLineDeriv Ω (Fin.snoc u w) f g := by + refine ⟨h₁.1, h₂.2, ?_⟩ + have e1 := h₁.eq + rw [LineDeriv.iteratedLineDerivOp_one] at e1 + rw [LineDeriv.iteratedLineDerivOp_succ_right, Fin.init_snoc, Fin.snoc_last, e1, h₂.eq] + +/-- **Weak derivatives of a first derivative**: if `h = ∂_w f` and `g = ∂^{(u, w)} f` weakly on +`Ω`, then `g = ∂^u h` weakly on `Ω`, the converse of `Rd.HasWeakLineDeriv.snoc`. -/ +theorem HasWeakLineDeriv.of_snoc (h₁ : HasWeakLineDeriv Ω (fun _ : Fin 1 => w) f h) + (h₂ : HasWeakLineDeriv Ω (Fin.snoc u w) f g) : HasWeakLineDeriv Ω u h g := by + refine ⟨h₁.2, h₂.2, ?_⟩ + have e1 := h₁.eq + rw [LineDeriv.iteratedLineDerivOp_one] at e1 + rw [← e1, ← h₂.eq, LineDeriv.iteratedLineDerivOp_succ_right (Fin.snoc u w), Fin.init_snoc, + Fin.snoc_last] + +end Composition + +/-! ### Words and directions -/ + +section Words + +omit [FiniteDimensional ℝ V] [MeasurableSpace V] [BorelSpace V] in +/-- **Iterated derivatives are multilinear in the directions**: if +`v_l = ∑_j c_{l,j} b_j` for `l < k`, then +`∂^v T = ∑_{i : Fin k → ι} (∏_l c_{l, i_l}) ∂_{b_{i_0}} ⋯ ∂_{b_{i_{k-1}}} T`, for every `T` in a +space with additive and homogeneous derivatives, such as distributions. By induction on `k`, +with Mathlib's `LineDeriv.lineDerivOp_left_sum` and the splitting of words by `Fin.consEquiv`. -/ +theorem iteratedLineDerivOp_eq_sum_prod_smul {E ι : Type*} [AddCommGroup E] [Module ℝ E] + [LineDeriv V E E] [LineDerivAdd V E E] [LineDerivSMul ℝ V E E] [LineDerivLeftSMul ℝ V E E] + [Fintype ι] (b : ι → V) {k : ℕ} (c : Fin k → ι → ℝ) (T : E) : + ∂^{fun l => ∑ j, c l j • b j} T = + ∑ i : Fin k → ι, (∏ l, c l (i l)) • ∂^{fun l => b (i l)} T := by + induction k with + | zero => simp + | succ k ih => + rw [LineDeriv.iteratedLineDerivOp_succ_left] + have ht : Fin.tail (fun l : Fin (k + 1) => ∑ j, c l j • b j) = + fun l => ∑ j, c l.succ j • b j := rfl + rw [ht, ih (fun l => c l.succ), LineDeriv.lineDerivOp_left_sum, + ← Fintype.sum_equiv (Fin.consEquiv fun _ => ι) _ _ fun _ => rfl, Fintype.sum_prod_type] + refine Finset.sum_congr rfl fun j _ => ?_ + rw [LineDeriv.lineDerivOp_left_smul, LineDeriv.lineDerivOp_sum, Finset.smul_sum] + refine Finset.sum_congr rfl fun i _ => ?_ + simp only [Fin.consEquiv, Equiv.coe_fn_mk, Fin.prod_univ_succ, Fin.cons_zero, Fin.cons_succ, + LineDeriv.lineDerivOp_smul, smul_smul] + rw [LineDeriv.iteratedLineDerivOp_succ_left] + rfl + +variable {Ω : Opens V} {f : V → ℂ} + +/-- The distribution of a finite combination `∑_i c_i g_i` with real `c_i` of locally integrable +functions is `∑_i c_i` times the distributions of the `g_i` (Mathlib's `Distribution.ofFun_add` +and `Distribution.ofFun_smul`). -/ +theorem ofFun_sum_smul {ι : Type*} (s : Finset ι) (c : ι → ℝ) {g : ι → V → ℂ} + (hg : ∀ i ∈ s, LocallyIntegrableOn (g i) Ω volume) : + Distribution.ofFun Ω (∑ i ∈ s, c i • g i) volume ⊤ = + ∑ i ∈ s, c i • Distribution.ofFun Ω (g i) volume ⊤ := by + classical + induction s using Finset.induction_on with + | empty => simp [Distribution.ofFun_zero] + | insert i s hi ih => + have hs : ∀ j ∈ s, LocallyIntegrableOn (g j) Ω volume := fun j hj => + hg j (Finset.mem_insert_of_mem hj) + rw [Finset.sum_insert hi, Finset.sum_insert hi, + Distribution.ofFun_add ((hg i (Finset.mem_insert_self i s)).smul _) + (locallyIntegrableOn_sum_smul s c hs), + Distribution.ofFun_smul, ih hs] + +/-- **Weak derivatives along all directions from the words**: if `g_w = ∂^{e_w} f` weakly on `Ω` +for every word `w` of length `k`, then for all directions `v ∈ V^k`, +`∑_w ∏_l ⟪v_l, e_{w_l}⟫ g_w = ∂^v f` weakly on `Ω` +(`Rd.iteratedLineDerivOp_eq_sum_prod_smul` with `v_l = ∑_j ⟪v_l, e_j⟫ e_j`, Mathlib's +`OrthonormalBasis.sum_repr'`). -/ +theorem hasWeakLineDeriv_of_gridBasis_words {k : ℕ} {g : (Fin k → Fin (finrank ℝ V)) → V → ℂ} + (hf : LocallyIntegrableOn f Ω volume) + (h : ∀ w, HasWeakLineDeriv Ω (fun l => gridBasis V (w l)) f (g w)) (v : Fin k → V) : + HasWeakLineDeriv Ω v f + (fun x => ∑ w, (∏ l, (inner ℝ (v l) (gridBasis V (w l)) : ℂ)) * g w x) := by + have hv : v = fun l => ∑ j, inner ℝ (v l) (gridBasis V j) • gridBasis V j := funext fun l => by + simpa only [real_inner_comm] using ((gridBasis V).sum_repr' (v l)).symm + have hfun : (fun x => ∑ w, (∏ l, (inner ℝ (v l) (gridBasis V (w l)) : ℂ)) * g w x) = + ∑ w, (∏ l, inner ℝ (v l) (gridBasis V (w l))) • g w := funext fun x => by + simp [Finset.sum_apply, Complex.real_smul] + refine ⟨hf, ?_, ?_⟩ + · rw [hfun] + exact locallyIntegrableOn_sum_smul _ _ fun w _ => (h w).2 + · rw [hfun, ofFun_sum_smul _ _ fun w _ => (h w).2] + conv_lhs => rw [hv] + rw [iteratedLineDerivOp_eq_sum_prod_smul] + exact Finset.sum_congr rfl fun w _ => by rw [(h w).eq] + +end Words + +/-! ### The Leibniz constant -/ + +section Constant + +/-- The **Leibniz constant** `C_k(χ) = 2^k sup_x ∑_{j ≤ k} ‖D^j χ(x)‖` of a smooth function `χ`: the +weak derivatives of order `k` of `χ f` are bounded by `C_k(χ)` times the derivatives of `f` of order +at most `k` (`Rd.exists_hasWeakLineDeriv_mul_of_tsupport_subset`). -/ +noncomputable def leibnizConst (χ : V → ℝ) (k : ℕ) : ℝ≥0∞ := + 2 ^ k * ⨆ x, ∑ j ∈ Finset.range (k + 1), ‖iteratedFDeriv ℝ j χ x‖ₑ + +omit [FiniteDimensional ℝ V] [MeasurableSpace V] [BorelSpace V] in +/-- The Leibniz constant of a smooth function with compact support is finite: each derivative +`D^j χ` is continuous with compact support, hence bounded (Mathlib's +`Continuous.bounded_above_of_compact_support`). -/ +theorem leibnizConst_ne_top {χ : V → ℝ} (hχ : ContDiff ℝ ((⊤ : ℕ∞) : WithTop ℕ∞) χ) + (hc : HasCompactSupport χ) (k : ℕ) : leibnizConst χ k ≠ ∞ := by + choose C hC using fun j : ℕ => (hχ.continuous_iteratedFDeriv (m := j) + (by exact_mod_cast le_top)).bounded_above_of_compact_support (hc.iteratedFDeriv j) + have hS : (⨆ x, ∑ j ∈ Finset.range (k + 1), ‖iteratedFDeriv ℝ j χ x‖ₑ) ≤ + ∑ j ∈ Finset.range (k + 1), ENNReal.ofReal (C j) := + iSup_le fun x => Finset.sum_le_sum fun j _ => by + rw [← ofReal_norm] + exact ENNReal.ofReal_le_ofReal (hC j x) + exact ENNReal.mul_ne_top (by simp) + (ne_top_of_le_ne_top (ENNReal.sum_ne_top.2 fun _ _ => ENNReal.ofReal_ne_top) hS) + +omit [FiniteDimensional ℝ V] [MeasurableSpace V] [BorelSpace V] in +/-- The values of `χ` are bounded by the Leibniz constant of order `0`. -/ +theorem enorm_le_leibnizConst_zero (χ : V → ℝ) (x : V) : ‖χ x‖ₑ ≤ leibnizConst χ 0 := by + rw [leibnizConst, pow_zero, one_mul] + refine le_trans ?_ (le_iSup _ x) + rw [Finset.sum_range_one, ← ofReal_norm, ← ofReal_norm, norm_iteratedFDeriv_zero] + +omit [FiniteDimensional ℝ V] [MeasurableSpace V] [BorelSpace V] in +/-- **The derivatives of a directional derivative**: for a smooth `χ` and `‖v‖ ≤ 1`, +`‖D^j (∂_v χ)(x)‖ ≤ ‖D^{j+1} χ(x)‖` (Mathlib's `norm_iteratedFDeriv_clm_apply_const` and +`norm_iteratedFDeriv_fderiv`). -/ +theorem enorm_iteratedFDeriv_fderiv_apply_le {χ : V → ℝ} + (hχ : ContDiff ℝ ((⊤ : ℕ∞) : WithTop ℕ∞) χ) {v : V} (hv : ‖v‖ ≤ 1) (j : ℕ) (x : V) : + ‖iteratedFDeriv ℝ j (fun y => fderiv ℝ χ y v) x‖ₑ ≤ ‖iteratedFDeriv ℝ (j + 1) χ x‖ₑ := by + rw [← ofReal_norm, ← ofReal_norm] + refine ENNReal.ofReal_le_ofReal ?_ + have h := norm_iteratedFDeriv_clm_apply_const (c := v) (x := x) (n := j) + ((hχ.fderiv_right (m := ((⊤ : ℕ∞) : WithTop ℕ∞)) (by simp)).contDiffAt) + (by exact_mod_cast le_top) + rw [norm_iteratedFDeriv_fderiv] at h + exact h.trans (mul_le_of_le_one_left (norm_nonneg _) hv) + +omit [FiniteDimensional ℝ V] [MeasurableSpace V] [BorelSpace V] in +/-- **The Leibniz constants grow along the induction**: for a smooth `χ` and `‖v‖ ≤ 1`, +`C_k(χ) + C_k(∂_v χ) ≤ C_{k+1}(χ)`, since both suprema are at most +`sup_x ∑_{j ≤ k+1} ‖D^j χ(x)‖` (`Rd.enorm_iteratedFDeriv_fderiv_apply_le`). -/ +theorem leibnizConst_add_le {χ : V → ℝ} (hχ : ContDiff ℝ ((⊤ : ℕ∞) : WithTop ℕ∞) χ) {v : V} + (hv : ‖v‖ ≤ 1) (k : ℕ) : + leibnizConst χ k + leibnizConst (fun y => fderiv ℝ χ y v) k ≤ leibnizConst χ (k + 1) := by + set S := ⨆ x, ∑ j ∈ Finset.range (k + 2), ‖iteratedFDeriv ℝ j χ x‖ₑ + have h1 : (⨆ x, ∑ j ∈ Finset.range (k + 1), ‖iteratedFDeriv ℝ j χ x‖ₑ) ≤ S := + iSup_mono fun x => by + rw [Finset.sum_range_succ _ (k + 1)] + exact le_self_add + have h2 : (⨆ x, ∑ j ∈ Finset.range (k + 1), + ‖iteratedFDeriv ℝ j (fun y => fderiv ℝ χ y v) x‖ₑ) ≤ S := iSup_mono fun x => by + rw [Finset.sum_range_succ' _ (k + 1)] + exact le_add_right (Finset.sum_le_sum fun j _ => enorm_iteratedFDeriv_fderiv_apply_le hχ hv j x) + calc leibnizConst χ k + leibnizConst (fun y => fderiv ℝ χ y v) k ≤ 2 ^ k * S + 2 ^ k * S := + add_le_add (mul_le_mul_right h1 _) (mul_le_mul_right h2 _) + _ = leibnizConst χ (k + 1) := by rw [leibnizConst, pow_succ]; ring + +end Constant + +/-! ### The Leibniz rule -/ + +section Leibniz + +omit [NormedAddCommGroup V] [InnerProductSpace ℝ V] [FiniteDimensional ℝ V] [MeasurableSpace V] + [BorelSpace V] in +/-- **Words with a fixed last letter**: for nonnegative `a`, the sum over the words `(w, j)` of +length `k + 1` that end with `j` is at most the sum over all words of length `k + 1` (the map +`w ↦ (w, j)` is injective, Mathlib's `Fin.snoc_left_injective`). -/ +theorem sum_snoc_le {ι : Type*} [Fintype ι] {k : ℕ} (a : (Fin (k + 1) → ι) → ℝ≥0∞) (j : ι) : + ∑ w : Fin k → ι, a (Fin.snoc w j) ≤ ∑ w, a w := by + classical + rw [← Finset.sum_image fun x _ y _ h => Fin.snoc_left_injective (α := fun _ => ι) j h] + exact Finset.sum_le_sum_of_subset (Finset.subset_univ _) + +omit [NormedAddCommGroup V] [InnerProductSpace ℝ V] [FiniteDimensional ℝ V] [MeasurableSpace V] + [BorelSpace V] in +/-- **The sums of the induction step**: the sum over the words of length `k' + 1 ≤ k + 1` that end +with `j` is at most the sum over all words of length at most `k + 1` (`Rd.sum_snoc_le`). -/ +theorem sum_range_sum_snoc_le {ι : Type*} [Fintype ι] (a : (k : ℕ) → (Fin k → ι) → ℝ≥0∞) (j : ι) + (k : ℕ) : + ∑ k' ∈ Finset.range (k + 1), ∑ w : Fin k' → ι, a (k' + 1) (Fin.snoc w j) ≤ + ∑ k' ∈ Finset.range (k + 2), ∑ w : Fin k' → ι, a k' w := by + rw [Finset.sum_range_succ' _ (k + 1)] + exact le_add_right (Finset.sum_le_sum fun k' _ => sum_snoc_le (a (k' + 1)) j) + +omit [NormedAddCommGroup V] [InnerProductSpace ℝ V] [FiniteDimensional ℝ V] [MeasurableSpace V] + [BorelSpace V] in +/-- **One term of a sum over words**: for nonnegative `a` and a word `w` of length `k ≤ m`, +`a_{k,w} ≤ ∑_{k' ≤ m} ∑_{w'} a_{k',w'}`, the sum over all words of length at most `m`. -/ +theorem le_sum_range_sum_words {ι : Type*} [Fintype ι] (a : (k : ℕ) → (Fin k → ι) → ℝ≥0∞) + {k m : ℕ} (hk : k ≤ m) (w : Fin k → ι) : + a k w ≤ ∑ k' ∈ Finset.range (m + 1), ∑ w' : Fin k' → ι, a k' w' := + (Finset.single_le_sum (f := fun w' => a k w') (fun _ _ => zero_le) (Finset.mem_univ w)).trans + (Finset.single_le_sum (f := fun k' => ∑ w' : Fin k' → ι, a k' w') (fun _ _ => zero_le) + (Finset.mem_range.2 (Nat.lt_succ_of_le hk))) + +omit [NormedAddCommGroup V] [InnerProductSpace ℝ V] [FiniteDimensional ℝ V] [MeasurableSpace V] + [BorelSpace V] in +/-- **Sums over words of increasing length**: for nonnegative `a` and `k ≤ m`, the sum over the +words of length at most `k` is at most the sum over the words of length at most `m`. -/ +theorem sum_range_sum_words_mono {ι : Type*} [Fintype ι] (a : (k : ℕ) → (Fin k → ι) → ℝ≥0∞) + {k m : ℕ} (hk : k ≤ m) : + ∑ k' ∈ Finset.range (k + 1), ∑ w' : Fin k' → ι, a k' w' ≤ + ∑ k' ∈ Finset.range (m + 1), ∑ w' : Fin k' → ι, a k' w' := + Finset.sum_le_sum_of_subset (Finset.range_mono (by omega)) + +omit [NormedAddCommGroup V] [InnerProductSpace ℝ V] [FiniteDimensional ℝ V] [MeasurableSpace V] + [BorelSpace V] in +/-- **Exchanging the sums over words and over an index set**: for nonnegative `λ_{i,k}` and +`c_i`, `∑_{k ≤ m} ∑_w ∑_i λ_{i,k} c_i = ∑_i (∑_{k ≤ m} ∑_w λ_{i,k}) c_i`. -/ +theorem sum_range_sum_words_sum_mul {ι κ : Type*} [Fintype ι] [Fintype κ] (m : ℕ) + (lam : ι → ℕ → ℝ≥0∞) (c : ι → ℝ≥0∞) : + ∑ k ∈ Finset.range (m + 1), ∑ _w : Fin k → κ, ∑ i, lam i k * c i = + ∑ i, (∑ k ∈ Finset.range (m + 1), ∑ _w : Fin k → κ, lam i k) * c i := by + rw [Finset.sum_congr rfl fun k _ => Finset.sum_comm, Finset.sum_comm] + refine Finset.sum_congr rfl fun i _ => ?_ + simp_rw [Finset.sum_mul] + +omit [NormedAddCommGroup V] [InnerProductSpace ℝ V] [FiniteDimensional ℝ V] [MeasurableSpace V] + [BorelSpace V] in +/-- **A choice along the words of length at most `m`**: if for every word `w` of length `k ≤ m` +some `a` satisfies `P k w a`, then one family `(a_{k,w})`, indexed by all words, satisfies +`P k w a_{k,w}` for every word `w` of length `k ≤ m`. -/ +theorem exists_forall_words_of_forall_le {ι α : Type*} [Nonempty α] {m : ℕ} + {P : (k : ℕ) → (Fin k → ι) → α → Prop} (h : ∀ k ≤ m, ∀ w, ∃ a, P k w a) : + ∃ G : (k : ℕ) → (Fin k → ι) → α, ∀ k ≤ m, ∀ w, P k w (G k w) := by + classical + refine ⟨fun k w => if hk : k ≤ m then (h k hk w).choose else Classical.arbitrary α, + fun k hk w => ?_⟩ + simp only [hk, ↓reduceDIte] + exact (h k hk w).choose_spec + +omit [MeasurableSpace V] [BorelSpace V] in +/-- The basis directions of a word `(u, j)` are those of `u` followed by `e_j` (Mathlib's +`Fin.comp_snoc`). -/ +theorem gridBasis_snoc {k : ℕ} (u : Fin k → Fin (finrank ℝ V)) (j : Fin (finrank ℝ V)) : + (fun l => gridBasis V (Fin.snoc (α := fun _ => Fin (finrank ℝ V)) u j l)) = + Fin.snoc (α := fun _ => V) (fun l => gridBasis V (u l)) (gridBasis V j) := + Fin.comp_snoc (gridBasis V) u j + +variable {p : ℝ≥0∞} [Fact (1 ≤ p)] {O B : Opens V} + +omit [Fact (1 ≤ p)] in +/-- **The base case of the Leibniz rule**: the derivative of order `0` of `χ f` is `χ f`, with +`‖χ f‖_{L_p(O)} ≤ C_0(χ) ‖g_0‖_{L_p(O ∩ B)}` for `g_0 = f` almost everywhere on `O ∩ B` +(`Rd.eLpNorm_mul_le_of_tsupport_subset`). -/ +theorem exists_hasWeakLineDeriv_mul_zero {f : V → ℂ} + (g : (k : ℕ) → (Fin k → Fin (finrank ℝ V)) → V → ℂ) + (hg : ∀ w : Fin 0 → Fin (finrank ℝ V), + HasWeakLineDeriv (O ⊓ B) (fun l => gridBasis V (w l)) f (g 0 w)) + {χ : V → ℝ} (hχ : ContDiff ℝ ((⊤ : ℕ∞) : WithTop ℕ∞) χ) (hχc : HasCompactSupport χ) + (hχB : tsupport χ ⊆ B) (w : Fin 0 → Fin (finrank ℝ V)) : + ∃ G : V → ℂ, HasWeakLineDeriv O (fun l => gridBasis V (w l)) (fun x => (χ x : ℂ) * f x) G ∧ + eLpNorm G p (volume.restrict O) ≤ leibnizConst χ 0 * + ∑ k' ∈ Finset.range 1, ∑ w' : Fin k' → Fin (finrank ℝ V), + eLpNorm (g k' w') p (volume.restrict (O ⊓ B : Opens V)) := by + have hc : Continuous fun x => (χ x : ℂ) := Complex.continuous_ofReal.comp hχ.continuous + have hcB : tsupport (fun x => (χ x : ℂ)) ⊆ B := + (tsupport_comp_subset Complex.ofReal_zero χ).trans hχB + have hf := (hg w).locallyIntegrableOn + refine ⟨_, hasWeakLineDeriv_fin_zero _ (locallyIntegrableOn_mul_of_tsupport_subset hf hc hcB), + ?_⟩ + have hC := leibnizConst_ne_top hχ hχc 0 + have hb : ∀ x, ‖χ x‖ ≤ ((leibnizConst χ 0).toNNReal : ℝ) := fun x => by + rw [← ENNReal.ofReal_le_ofReal_iff (by positivity), ofReal_norm, ENNReal.ofReal_coe_nnreal, + ENNReal.coe_toNNReal hC] + exact enorm_le_leibnizConst_zero χ x + have hfg : f =ᵐ[volume.restrict (O ⊓ B : Opens V)] g 0 w := + (hasWeakLineDeriv_fin_zero (fun l => gridBasis V (w l)) hf).unique (hg w) + refine (eLpNorm_mul_le_of_tsupport_subset hχ.continuous hχB hb).trans ?_ + rw [ENNReal.coe_toNNReal hC, eLpNorm_congr_ae hfg, Finset.sum_range_one] + exact mul_le_mul_right (Finset.single_le_sum (f := fun w' => eLpNorm (g 0 w') p _) + (fun _ _ => zero_le) (Finset.mem_univ w)) _ + +/-- **The induction step of the Leibniz rule**: if `χ f'` and `(∂_{e_j} χ) f` have the weak +derivatives `G_1`, `G_2` along `u`, where `f' = ∂_{e_j} f` on `O ∩ B`, then `G_1 + G_2` is the weak +derivative of `χ f` along `(u, j)` on `O`, since `∂_{e_j} (χ f) = χ f' + (∂_{e_j} χ) f` +(`Rd.HasWeakLineDeriv.mul_of_tsupport_subset`, `Rd.HasWeakLineDeriv.snoc`). -/ +theorem HasWeakLineDeriv.mul_snoc {f f' G₁ G₂ : V → ℂ} {k : ℕ} + {u : Fin k → Fin (finrank ℝ V)} {j : Fin (finrank ℝ V)} + (h1 : HasWeakLineDeriv (O ⊓ B) (fun _ : Fin 1 => gridBasis V j) f f') {χ : V → ℝ} + (hχ : ContDiff ℝ ((⊤ : ℕ∞) : WithTop ℕ∞) χ) (hχB : tsupport χ ⊆ B) + (hG₁ : HasWeakLineDeriv O (fun l => gridBasis V (u l)) (fun x => (χ x : ℂ) * f' x) G₁) + (hG₂ : HasWeakLineDeriv O (fun l => gridBasis V (u l)) + (fun x => (fderiv ℝ χ x (gridBasis V j) : ℂ) * f x) G₂) : + HasWeakLineDeriv O (fun l => gridBasis V (Fin.snoc (α := fun _ => Fin (finrank ℝ V)) u j l)) + (fun x => (χ x : ℂ) * f x) (G₁ + G₂) := by + rw [gridBasis_snoc] + exact (h1.mul_of_tsupport_subset hχ hχB).snoc (hG₁.add hG₂) + +/-- **The Leibniz rule with a bound**: let `g_{k,w} = ∂^{e_w} f` weakly on `O ∩ B` for every word +`w` of length `k ≤ m`, and let `χ` be smooth with compact support and `tsupport χ ⊆ B`. Then for +every word `w` of length `k ≤ m` the function `χ f` has a weak derivative `G = ∂^{e_w} (χ f)` on `O` +with `‖G‖_{L_p(O)} ≤ C_k(χ) ∑_{k' ≤ k} ∑_{w'} ‖g_{k',w'}‖_{L_p(O ∩ B)}` (`Rd.leibnizConst`). +By induction on `k`: for `w = (u, j)`, +`∂^{e_w} (χ f) = ∂^{e_u} (χ ∂_{e_j} f) + ∂^{e_u} ((∂_{e_j} χ) f)`, and both terms are of order `k` +(`Rd.HasWeakLineDeriv.mul_snoc`, `Rd.leibnizConst_add_le`). -/ +theorem exists_hasWeakLineDeriv_mul_of_tsupport_subset {m : ℕ} {f : V → ℂ} + (g : (k : ℕ) → (Fin k → Fin (finrank ℝ V)) → V → ℂ) + (hg : ∀ k ≤ m, ∀ w : Fin k → Fin (finrank ℝ V), + HasWeakLineDeriv (O ⊓ B) (fun l => gridBasis V (w l)) f (g k w)) + {χ : V → ℝ} (hχ : ContDiff ℝ ((⊤ : ℕ∞) : WithTop ℕ∞) χ) (hχc : HasCompactSupport χ) + (hχB : tsupport χ ⊆ B) {k : ℕ} (hk : k ≤ m) (w : Fin k → Fin (finrank ℝ V)) : + ∃ G : V → ℂ, HasWeakLineDeriv O (fun l => gridBasis V (w l)) (fun x => (χ x : ℂ) * f x) G ∧ + eLpNorm G p (volume.restrict O) ≤ leibnizConst χ k * + ∑ k' ∈ Finset.range (k + 1), ∑ w' : Fin k' → Fin (finrank ℝ V), + eLpNorm (g k' w') p (volume.restrict (O ⊓ B : Opens V)) := by + induction k generalizing m f g χ with + | zero => exact exists_hasWeakLineDeriv_mul_zero g (hg 0 (Nat.zero_le m)) hχ hχc hχB w + | succ k ih => + obtain ⟨u, j, rfl⟩ : ∃ u j, w = Fin.snoc (α := fun _ => Fin (finrank ℝ V)) u j := + ⟨Fin.init w, w (Fin.last k), (Fin.snoc_init_self w).symm⟩ + have h1 : HasWeakLineDeriv (O ⊓ B) (fun _ : Fin 1 => gridBasis V j) f (g 1 fun _ => j) := + hg 1 (by omega) fun _ => j + have hg' : ∀ k' ≤ m - 1, ∀ w' : Fin k' → Fin (finrank ℝ V), + HasWeakLineDeriv (O ⊓ B) (fun l => gridBasis V (w' l)) (g 1 fun _ => j) + (g (k' + 1) (Fin.snoc w' j)) := fun k' hk' w' => h1.of_snoc (by + rw [← gridBasis_snoc] + exact hg (k' + 1) (by omega) (Fin.snoc w' j)) + have hχ' : ContDiff ℝ ((⊤ : ℕ∞) : WithTop ℕ∞) fun x => fderiv ℝ χ x (gridBasis V j) := + (hχ.fderiv_right (by simp)).clm_apply contDiff_const + obtain ⟨G₁, hG₁, hb₁⟩ := ih (m := m - 1) (fun k' w' => g (k' + 1) (Fin.snoc w' j)) hg' hχ + hχc hχB (by omega) u + obtain ⟨G₂, hG₂, hb₂⟩ := ih (m := m) g hg hχ' (hχc.fderiv_apply (𝕜 := ℝ) (gridBasis V j)) + ((tsupport_fderiv_apply_subset ℝ _).trans hχB) (by omega) u + refine ⟨G₁ + G₂, h1.mul_snoc hχ hχB hG₁ hG₂, ?_⟩ + set N := ∑ k' ∈ Finset.range (k + 2), ∑ w' : Fin k' → Fin (finrank ℝ V), + eLpNorm (g k' w') p (volume.restrict (O ⊓ B : Opens V)) + have hN₁ := sum_range_sum_snoc_le + (fun k' w' => eLpNorm (g k' w') p (volume.restrict (O ⊓ B : Opens V))) j k + have hN₂ : ∑ k' ∈ Finset.range (k + 1), ∑ w' : Fin k' → Fin (finrank ℝ V), + eLpNorm (g k' w') p (volume.restrict (O ⊓ B : Opens V)) ≤ N := by + simp only [N, Finset.sum_range_succ _ (k + 1)] + exact le_self_add + have hv : ‖gridBasis V j‖ ≤ 1 := ((gridBasis V).orthonormal.1 j).le + calc eLpNorm (G₁ + G₂) p (volume.restrict O) + ≤ eLpNorm G₁ p (volume.restrict O) + eLpNorm G₂ p (volume.restrict O) := + eLpNorm_add_le Fact.out + _ ≤ leibnizConst χ k * N + leibnizConst (fun x => fderiv ℝ χ x (gridBasis V j)) k * N := + add_le_add (hb₁.trans (mul_le_mul_right hN₁ _)) (hb₂.trans (mul_le_mul_right hN₂ _)) + _ ≤ leibnizConst χ (k + 1) * N := by + rw [← add_mul] + gcongr + exact leibnizConst_add_le hχ hv k + +end Leibniz + +/-! ### Multipliers on `W^m_p(V)` -/ + +section Multipliers + +variable {p : ℝ≥0∞} [Fact (1 ≤ p)] + +/-- **The Leibniz rule on `V`**: for `F ∈ W^m_p(V)` and a smooth `χ` with compact support, `χ F` +has a weak derivative `G ∈ L_p(V)` along every word of length `k ≤ m` +(`Rd.exists_hasWeakLineDeriv_mul_of_tsupport_subset` with `O = B = V`; the bound is finite since the +derivatives of `F` lie in `L_p(V)`). -/ +theorem MemSobolev.exists_hasWeakLineDeriv_mul {m : ℕ} {F : Lp ℂ p (volume : Measure V)} + (hF : MemSobolev m F) {χ : V → ℝ} (hχ : ContDiff ℝ ((⊤ : ℕ∞) : WithTop ℕ∞) χ) + (hcs : HasCompactSupport χ) {k : ℕ} (hk : k ≤ m) (w : Fin k → Fin (finrank ℝ V)) : + ∃ G : V → ℂ, MemLp G p volume ∧ + HasWeakLineDeriv ⊤ (fun l => gridBasis V (w l)) (fun x => (χ x : ℂ) * F x) G := by + have htop : (⊤ ⊓ ⊤ : Opens V) = ⊤ := inf_idem _ + obtain ⟨g, hg⟩ := exists_forall_words_of_forall_le (m := m) + (P := fun k w g => MemLp g p volume ∧ HasWeakLineDeriv ⊤ (fun l => gridBasis V (w l)) F g) + fun k hk w => (hF.2 k hk fun l => gridBasis V (w l)).imp fun g hg => + ⟨volume_restrict_top (V := V) ▸ hg.1, hg.2⟩ + obtain ⟨G, hG, hGb⟩ := exists_hasWeakLineDeriv_mul_of_tsupport_subset (p := p) (O := ⊤) (B := ⊤) + g (fun k hk w => htop ▸ (hg k hk w).2) hχ hcs (subset_univ _) hk w + have hfin : eLpNorm G p (volume.restrict (⊤ : Opens V)) < ∞ := by + refine hGb.trans_lt (ENNReal.mul_lt_top (leibnizConst_ne_top hχ hcs k).lt_top ?_) + refine ENNReal.sum_lt_top.2 fun k' hk' => ENNReal.sum_lt_top.2 fun w' _ => ?_ + rw [htop, volume_restrict_top] + exact (hg k' (by have := Finset.mem_range.1 hk'; omega) w').1.eLpNorm_lt_top + rw [volume_restrict_top] at hfin + exact ⟨G, memLp_iff.2 hfin, hG⟩ + +/-- **`W^m_p(V)` from the derivatives along words**: a function `F ∈ L_p(V)`, `1 ≤ p`, with a weak +derivative `G_w ∈ L_p(V)` on `V` along every word `w` of length `k ≤ m` lies in `W^m_p(V)`; the +derivative along `v ∈ V^k` is `∑_w ∏_l ⟪v_l, e_{w_l}⟫ G_w` +(`Rd.hasWeakLineDeriv_of_gridBasis_words`). For `m = 1` this is +`Rd.memSobolev_one_of_forall_gridBasis`. -/ +theorem memSobolev_of_forall_gridBasis_words {m : ℕ} {F : Lp ℂ p (volume : Measure V)} + (h : ∀ k ≤ m, ∀ w : Fin k → Fin (finrank ℝ V), ∃ G : V → ℂ, MemLp G p volume ∧ + HasWeakLineDeriv ⊤ (fun l => gridBasis V (w l)) F G) : MemSobolev m F := by + refine ⟨by simpa using Lp.memLp F, fun k hk v => ?_⟩ + choose G hG hGd using h k hk + have hD : MemLp (fun x => ∑ w, (∏ l, (inner ℝ (v l) (gridBasis V (w l)) : ℂ)) * G w x) p + (volume.restrict ((⊤ : Opens V) : Set V)) := by + rw [volume_restrict_top] + have h' := memLp_finsetSum' Finset.univ fun w _ => + (hG w).const_mul (∏ l, (inner ℝ (v l) (gridBasis V (w l)) : ℂ)) + convert h' using 1 + funext x + simp [Finset.sum_apply] + exact ⟨_, hD, hasWeakLineDeriv_of_gridBasis_words (locallyIntegrableOn_top_Lp _) hGd v⟩ + +/-- **Smooth compactly supported multipliers keep `W^m_p(V)`**: if `F ∈ W^m_p(V)` and `χ` is a +smooth real function with compact support, then `χ F ∈ W^m_p(V)`. Here `hc` and `hC` are the +continuity and the bound `|χ| ≤ C` with which the product `Rd.mulLp` in `L_p` is formed; both +follow from smoothness and compact support. The derivatives along words come from the Leibniz rule +(`Rd.MemSobolev.exists_hasWeakLineDeriv_mul`), those along all directions from the words +(`Rd.memSobolev_of_forall_gridBasis_words`). -/ +theorem MemSobolev.mulLp_of_hasCompactSupport {m : ℕ} {F : Lp ℂ p (volume : Measure V)} + (hF : MemSobolev m F) {χ : V → ℝ} (hχ : ContDiff ℝ ((⊤ : ℕ∞) : WithTop ℕ∞) χ) + (hcs : HasCompactSupport χ) {C : ℝ} (hc : Continuous fun x => (χ x : ℂ)) + (hC : ∀ x, ‖(χ x : ℂ)‖ ≤ C) : MemSobolev m (mulLp hc hC F) := by + have hae : (fun x => (χ x : ℂ) * F x) =ᵐ[volume.restrict ((⊤ : Opens V) : Set V)] + (mulLp hc hC F : V → ℂ) := by + rw [volume_restrict_top] + exact (mulLp_apply_ae hc hC F).symm + refine memSobolev_of_forall_gridBasis_words fun k hk w => ?_ + obtain ⟨G, hG, hGd⟩ := hF.exists_hasWeakLineDeriv_mul hχ hcs hk w + exact ⟨G, hG, hGd.congr_ae hae EventuallyEq.rfl⟩ + +omit [Fact (1 ≤ p)] in +/-- **The product rule in `L_p(V)`**: if `G = ∂_w F` weakly on `V` and `χ` is a smooth real +function, bounded with its derivative `∂_w χ` (bounds `C`, `C'`), then `χ G + (∂_w χ) F` is the weak +derivative `∂_w (χ F)` on `V`, with the products `Rd.mulLp` in `L_p(V)` +(`Rd.HasWeakLineDeriv.mul_contDiff`). -/ +theorem hasWeakLineDeriv_mulLp {w : V} {F G : Lp ℂ p (volume : Measure V)} + (h : HasWeakLineDeriv ⊤ (fun _ : Fin 1 => w) F G) {χ : V → ℝ} + (hχ : ContDiff ℝ ((⊤ : ℕ∞) : WithTop ℕ∞) χ) {C C' : ℝ} + (hc : Continuous fun x => (χ x : ℂ)) (hC : ∀ x, ‖(χ x : ℂ)‖ ≤ C) + (hc' : Continuous fun x => (fderiv ℝ χ x w : ℂ)) (hC' : ∀ x, ‖(fderiv ℝ χ x w : ℂ)‖ ≤ C') : + HasWeakLineDeriv ⊤ (fun _ : Fin 1 => w) (mulLp hc hC F) + ((mulLp hc hC G + mulLp hc' hC' F : Lp ℂ p (volume : Measure V)) : V → ℂ) := by + refine (h.mul_contDiff hχ).congr_ae ?_ ?_ <;> rw [volume_restrict_top] + · exact (mulLp_apply_ae hc hC F).symm + · filter_upwards [Lp.coeFn_add (mulLp hc hC G) (mulLp hc' hC' F), mulLp_apply_ae hc hC G, + mulLp_apply_ae hc' hC' F] with x h1 h2 h3 + rw [h1, Pi.add_apply, h2, h3] + +/-- **Smooth compactly supported multipliers keep `W^1_p(V)`**: if `F ∈ W^1_p(V)` and `χ` is a +smooth real function with compact support, then `χ F ∈ W^1_p(V)`, the case `m = 1` of +`Rd.MemSobolev.mulLp_of_hasCompactSupport`. -/ +theorem MemSobolev.mulLp {F : Lp ℂ p (volume : Measure V)} (hF : MemSobolev 1 F) + {χ : V → ℝ} (hχ : ContDiff ℝ ((⊤ : ℕ∞) : WithTop ℕ∞) χ) (hcs : HasCompactSupport χ) {C : ℝ} + (hc : Continuous fun x => (χ x : ℂ)) (hC : ∀ x, ‖(χ x : ℂ)‖ ≤ C) : + MemSobolev 1 (mulLp hc hC F) := + hF.mulLp_of_hasCompactSupport hχ hcs hc hC + +end Multipliers + +end Rd diff --git a/LeanPool/FunctionSpaces/Rd/Sobolev/WeakDerivatives.lean b/LeanPool/FunctionSpaces/Rd/Sobolev/WeakDerivatives.lean new file mode 100644 index 0000000000..74661d811e --- /dev/null +++ b/LeanPool/FunctionSpaces/Rd/Sobolev/WeakDerivatives.lean @@ -0,0 +1,690 @@ +/- +Copyright (c) 2026 Mario Ullrich. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Mario Ullrich +-/ +module + +public import LeanPool.FunctionSpaces.Analysis.Fourier.SchwartzCutoff + +/- +Modified for Lean Pool: module names and imports adapted. +-/ + +/-! +# Weak derivatives and Sobolev spaces on open sets + +Let `V` be a finite-dimensional real inner product space, such as `ℝ^d`, with Lebesgue measure, +and `Ω ⊆ V` open. For directions `v = (v_0, …, v_{k-1})` in `V`, +`∂^v = ∂_{v_0} ⋯ ∂_{v_{k-1}}` is the iterated directional derivative (Mathlib's +`LineDeriv.iteratedLineDerivOp`, notation `∂^{v}`). A locally integrable function `f` on `Ω` is +the distribution `φ ↦ ∫ φ f` on `Ω` (Mathlib's `Distribution.ofFun`, test functions +`𝓓(Ω, ℝ)`), and Mathlib differentiates distributions by `∂_w T (φ) = T(-∂_w φ)`. + +* **Weak derivatives** (`Rd.HasWeakLineDeriv Ω v f g`): `∂^v f = g` as distributions on `Ω`, + that is, `∫ φ g = (-1)^k ∫ (∂^v φ) f` for every test function `φ` + (`Rd.hasWeakLineDeriv_iff_integral`, by the transpose formula + `Distribution.iteratedLineDerivOp_apply_apply`). They are unique almost everywhere on `Ω` + and, on `V`, unique as elements of `L_r(V)` (`Rd.HasWeakLineDeriv.eq_of_top`), linear, local + (`Rd.HasWeakLineDeriv.mono`), on `V` locally integrable, as is `f` + (`Rd.HasWeakLineDeriv.locallyIntegrable_deriv`, `Rd.HasWeakLineDeriv.locallyIntegrable`), + iterate (`Rd.HasWeakLineDeriv.of_cons`: if `G = ∂^v f` and `H = ∂^{(w, v)} f`, then + `H = ∂_w G`), vanish where `f` vanishes + (`Rd.HasWeakLineDeriv.ae_eq_zero_of_ae_eq_zero`), additive over finite sums + (`Rd.HasWeakLineDeriv.sum`), tested also by smooth compactly supported complex functions + (`Rd.HasWeakLineDeriv.integral_mul_eq`), satisfy the product rule with smooth real functions + `χ` (`Rd.HasWeakLineDeriv.mul_contDiff`), also from `Ω ∩ B` to `Ω` when the closed support of + `χ` lies in an open set `B` (`Rd.HasWeakLineDeriv.mul_of_tsupport_subset`, through the test + functions `Rd.testFunctionMulOn`), are classical on Schwartz functions + (`Rd.hasWeakLineDeriv_schwartz`), and pass to limits in `L_p(Ω)` + (`Rd.HasWeakLineDeriv.of_tendsto`). +* **Sobolev spaces**: `Rd.MemWeakSobolev Ω m p f` says that `f` and all its weak derivatives of + order at most `m` lie in `L_p(Ω)`; `Rd.MemSobolev m f` is the case `Ω = V` for `f ∈ L_p(V)`, + with the weak derivatives as classes in `L_p(V)` (`Rd.memSobolev_iff_exists_hasWeakLineDeriv`; + for `m = 1`, weak derivatives in every direction suffice, + `Rd.memSobolev_one_of_forall_hasWeakLineDeriv`), closed under finite sums + (`Rd.MemSobolev.sum`). +* **The bridge to tempered distributions** (`Rd.hasWeakLineDeriv_top_iff`): for `f ∈ L_p(V)`, + `g ∈ L_r(V)`, the weak derivative on `V` is the derivative of tempered distributions, + `∂^v f = g` in `𝓢'(V, ℂ)`, since a tempered distribution that vanishes on all test functions + is zero (`Rd.eq_zero_of_testSchwartz`). +-/ + +@[expose] public section + +open MeasureTheory Filter Topology TopologicalSpace +open scoped ENNReal SchwartzMap LineDeriv Distributions + +namespace Rd + +variable {V : Type*} [NormedAddCommGroup V] [InnerProductSpace ℝ V] [FiniteDimensional ℝ V] + [MeasurableSpace V] [BorelSpace V] + +/-! ### Weak derivatives on open sets -/ + +/-- `g` is the **weak derivative** `∂^v f` of `f` on the open set `Ω` along the directions +`v = (v_0, …, v_{k-1})`: both are locally integrable on `Ω` and `∂^v f = g` as distributions on +`Ω`, that is, `∫ φ g = (-1)^k ∫ (∂^v φ) f` for every smooth compactly supported `φ` in `Ω` +(`Rd.hasWeakLineDeriv_iff_integral`). -/ +structure HasWeakLineDeriv (Ω : Opens V) {k : ℕ} (v : Fin k → V) (f g : V → ℂ) : Prop where + /-- `f` is locally integrable on `Ω`. -/ + locallyIntegrableOn : LocallyIntegrableOn f Ω volume + /-- `g` is locally integrable on `Ω`. -/ + locallyIntegrableOn_deriv : LocallyIntegrableOn g Ω volume + /-- `∂^v f = g` as distributions on `Ω`. -/ + eq : ∂^{v} (Distribution.ofFun Ω f volume ⊤) = Distribution.ofFun Ω g volume ⊤ + +/-- The **Sobolev space** `W^m_p(Ω)` as a predicate: `f ∈ L_p(Ω)`, and for every order `k ≤ m` +and all directions `v = (v_0, …, v_{k-1})` the weak derivative `∂^v f` exists on `Ω` and lies in +`L_p(Ω)`. -/ +def MemWeakSobolev (Ω : Opens V) (m : ℕ) (p : ℝ≥0∞) (f : V → ℂ) : Prop := + MemLp f p (volume.restrict Ω) ∧ ∀ k ≤ m, ∀ v : Fin k → V, + ∃ g : V → ℂ, MemLp g p (volume.restrict Ω) ∧ HasWeakLineDeriv Ω v f g + +/-- The **Sobolev space** `W^m_p(V)` as a predicate on `f ∈ L_p(V)`: the case `Ω = V` of +`Rd.MemWeakSobolev`. -/ +def MemSobolev {p : ℝ≥0∞} (m : ℕ) (f : Lp ℂ p (volume : Measure V)) : Prop := + MemWeakSobolev ⊤ m p f + +/-- Lebesgue measure restricted to the whole space `Ω = V` is Lebesgue measure, so that +`L_p(Ω) = L_p(V)` for `Ω = V`; a rewrite form of Mathlib's simp lemmas `Opens.coe_top` and +`Measure.restrict_univ`. -/ +theorem volume_restrict_top : (volume : Measure V).restrict ((⊤ : Opens V) : Set V) = volume := by + simp + +/-- A function in `L_p(Ω)`, `1 ≤ p`, is locally integrable on `Ω`. -/ +theorem locallyIntegrableOn_of_memLp {Ω : Opens V} {p : ℝ≥0∞} (hp : 1 ≤ p) {f : V → ℂ} + (hf : MemLp f p (volume.restrict Ω)) : LocallyIntegrableOn f Ω volume := + locallyIntegrableOn_of_locallyIntegrable_restrict (hf.locallyIntegrable hp) + +variable {Ω Ω' : Opens V} {k : ℕ} {v : Fin k → V} {f f' g g' : V → ℂ} + +/-- The integral form of a weak derivative: if `g = ∂^v f` weakly on `Ω`, then +`∫ φ g = (-1)^k ∫ (∂^v φ) f` for every test function `φ` on `Ω`. -/ +theorem HasWeakLineDeriv.integral_eq (h : HasWeakLineDeriv Ω v f g) (φ : 𝓓(Ω, ℝ)) : + ∫ x, φ x • g x = (-1 : ℝ) ^ k • ∫ x, (∂^{v} φ) x • f x := by + have h' := DFunLike.congr_fun h.eq φ + rw [Distribution.iteratedLineDerivOp_apply_apply, Distribution.ofFun_apply h.1, + Distribution.ofFun_apply h.2] at h' + exact h'.symm + +/-- **Weak derivatives by integration by parts**: for locally integrable `f`, `g` on `Ω`, `g` is +the weak derivative `∂^v f` on `Ω` iff `∫ φ g = (-1)^k ∫ (∂^v φ) f` for every test function `φ` +on `Ω`. -/ +theorem hasWeakLineDeriv_iff_integral (hf : LocallyIntegrableOn f Ω volume) + (hg : LocallyIntegrableOn g Ω volume) : + HasWeakLineDeriv Ω v f g ↔ + ∀ φ : 𝓓(Ω, ℝ), ∫ x, φ x • g x = (-1 : ℝ) ^ k • ∫ x, (∂^{v} φ) x • f x := by + refine ⟨fun h => h.integral_eq, fun h => ⟨hf, hg, ?_⟩⟩ + ext φ + rw [Distribution.iteratedLineDerivOp_apply_apply, Distribution.ofFun_apply hf, + Distribution.ofFun_apply hg, h φ] + +/-- The weak derivative is **unique** almost everywhere on `Ω`. -/ +theorem HasWeakLineDeriv.unique (h : HasWeakLineDeriv Ω v f g) (h' : HasWeakLineDeriv Ω v f g') : + g =ᵐ[volume.restrict Ω] g' := + Distribution.ofFun_injective h.2 h'.2 (h.eq.symm.trans h'.eq) + +/-- **Weak derivatives on `V` are unique classes**: two weak derivatives `G`, `G' ∈ L_r(V)` of the +same function on the whole space `V` are equal in `L_r(V)` (`Rd.HasWeakLineDeriv.unique`). -/ +theorem HasWeakLineDeriv.eq_of_top {r : ℝ≥0∞} {G G' : Lp ℂ r (volume : Measure V)} + (h : HasWeakLineDeriv ⊤ v f G) (h' : HasWeakLineDeriv ⊤ v f G') : G = G' := by + have hu := h.unique h' + rw [volume_restrict_top] at hu + exact Lp.ext hu + +/-- The derivative of order zero: a locally integrable `f` is its own weak derivative along the +empty family of directions. -/ +theorem hasWeakLineDeriv_fin_zero (v : Fin 0 → V) (hf : LocallyIntegrableOn f Ω volume) : + HasWeakLineDeriv Ω v f f := + ⟨hf, hf, LineDeriv.iteratedLineDerivOp_fin_zero v _⟩ + +/-- The weak derivative of the zero function is zero. -/ +theorem hasWeakLineDeriv_zero : HasWeakLineDeriv Ω v (0 : V → ℂ) 0 := by + refine ⟨locallyIntegrableOn_zero, locallyIntegrableOn_zero, ?_⟩ + rw [Distribution.ofFun_zero, LineDeriv.iteratedLineDerivOp_zero] + +/-- Weak derivatives are additive: `∂^v (f + f') = ∂^v f + ∂^v f'`. -/ +theorem HasWeakLineDeriv.add (h : HasWeakLineDeriv Ω v f g) (h' : HasWeakLineDeriv Ω v f' g') : + HasWeakLineDeriv Ω v (f + f') (g + g') := by + refine ⟨h.1.add h'.1, h.2.add h'.2, ?_⟩ + rw [Distribution.ofFun_add h.1 h'.1, Distribution.ofFun_add h.2 h'.2, + LineDeriv.iteratedLineDerivOp_add, h.eq, h'.eq] + +/-- The weak derivative of `-f` is `-∂^v f`. -/ +theorem HasWeakLineDeriv.neg (h : HasWeakLineDeriv Ω v f g) : HasWeakLineDeriv Ω v (-f) (-g) := by + refine ⟨h.1.neg, h.2.neg, ?_⟩ + rw [Distribution.ofFun_neg, Distribution.ofFun_neg, LineDeriv.iteratedLineDerivOp_neg, h.eq] + +/-- Weak derivatives of differences: `∂^v (f - f') = ∂^v f - ∂^v f'`. -/ +theorem HasWeakLineDeriv.sub (h : HasWeakLineDeriv Ω v f g) (h' : HasWeakLineDeriv Ω v f' g') : + HasWeakLineDeriv Ω v (f - f') (g - g') := by + simpa only [sub_eq_add_neg] using h.add h'.neg + +/-- Weak derivatives are homogeneous: `∂^v (c f) = c ∂^v f` for `c ∈ ℂ`. -/ +theorem HasWeakLineDeriv.smul (h : HasWeakLineDeriv Ω v f g) (c : ℂ) : + HasWeakLineDeriv Ω v (c • f) (c • g) := by + refine (hasWeakLineDeriv_iff_integral (h.1.smul c) (h.2.smul c)).2 fun φ => ?_ + have hc : ∀ (w : V → ℝ) (u : V → ℂ), ∫ x, w x • (c • u) x = c • ∫ x, w x • u x := by + intro w u + rw [← integral_smul] + exact integral_congr_ae (ae_of_all _ fun x => smul_comm (w x) c (u x)) + rw [hc, hc, h.integral_eq φ, smul_comm] + +/-- **Weak derivatives of finite sums**: if `G_j` is the weak derivative `∂^v F_j` on `Ω` for +every `j ∈ s`, `s` finite, then `∑_{j ∈ s} G_j` is the weak derivative of `∑_{j ∈ s} F_j` +(`Rd.HasWeakLineDeriv.add`, by induction on `s`). -/ +theorem HasWeakLineDeriv.sum {ι : Type*} {s : Finset ι} {F G : ι → V → ℂ} + (h : ∀ j ∈ s, HasWeakLineDeriv Ω v (F j) (G j)) : + HasWeakLineDeriv Ω v (∑ j ∈ s, F j) (∑ j ∈ s, G j) := by + classical + induction s using Finset.induction_on with + | empty => simpa using (hasWeakLineDeriv_zero : HasWeakLineDeriv Ω v 0 0) + | insert i s hi ih => + rw [Finset.sum_insert hi, Finset.sum_insert hi] + exact (h i (Finset.mem_insert_self i s)).add (ih fun j hj => h j (Finset.mem_insert_of_mem hj)) + +/-- Weak derivatives only see `f` and `g` almost everywhere on `Ω`. -/ +theorem HasWeakLineDeriv.congr_ae (h : HasWeakLineDeriv Ω v f g) + (hf : f =ᵐ[volume.restrict Ω] f') (hg : g =ᵐ[volume.restrict Ω] g') : + HasWeakLineDeriv Ω v f' g' := by + refine ⟨h.1.congr hf, h.2.congr hg, ?_⟩ + rw [← Distribution.ofFun_congr_ae hf, ← Distribution.ofFun_congr_ae hg] + exact h.eq + +/-- **Weak derivatives are local**: a weak derivative on `Ω` is one on every open `Ω' ⊆ Ω`, +because a test function on `Ω'` is one on `Ω` (Mathlib's `TestFunction.monoCLM`). -/ +theorem HasWeakLineDeriv.mono (h : HasWeakLineDeriv Ω v f g) (hΩ : Ω' ≤ Ω) : + HasWeakLineDeriv Ω' v f g := by + have hs : (Ω' : Set V) ⊆ Ω := hΩ + refine (hasWeakLineDeriv_iff_integral (h.1.mono_set hs) (h.2.mono_set hs)).2 fun φ => ?_ + have hφ : ((TestFunction.monoCLM ℝ φ : 𝓓(Ω, ℝ)) : V → ℝ) = φ := by + simp [hΩ] + have h' := h.integral_eq (TestFunction.monoCLM ℝ φ) + rwa [coe_iteratedLineDerivOp_eq hφ, hφ] at h' + +/-- A function with a weak derivative on the whole space `V` is locally integrable on `V`. -/ +theorem HasWeakLineDeriv.locallyIntegrable (h : HasWeakLineDeriv ⊤ v f g) : + LocallyIntegrable f volume := by + have h' := h.locallyIntegrableOn + rwa [Opens.coe_top, locallyIntegrableOn_univ] at h' + +/-- A weak derivative on the whole space `V` is locally integrable on `V`. -/ +theorem HasWeakLineDeriv.locallyIntegrable_deriv (h : HasWeakLineDeriv ⊤ v f g) : + LocallyIntegrable g volume := by + have h' := h.locallyIntegrableOn_deriv + rwa [Opens.coe_top, locallyIntegrableOn_univ] at h' + +/-- **Weak derivatives of weak derivatives**: if `G = ∂^v f` and `H = ∂^{(w, v)} f` weakly on `Ω`, +then `H = ∂_w G` weakly on `Ω`, since `∂^{(w, v)} = ∂_w ∂^v` for distributions (Mathlib's +`LineDeriv.iteratedLineDerivOp_succ_left`). -/ +theorem HasWeakLineDeriv.of_cons {w : V} {G H : V → ℂ} (h : HasWeakLineDeriv Ω v f G) + (h' : HasWeakLineDeriv Ω (Fin.cons w v) f H) : + HasWeakLineDeriv Ω (fun _ : Fin 1 => w) G H := by + refine ⟨h.locallyIntegrableOn_deriv, h'.locallyIntegrableOn_deriv, ?_⟩ + rw [LineDeriv.iteratedLineDerivOp_one, ← h'.eq, + LineDeriv.iteratedLineDerivOp_succ_left (Fin.cons w v), Fin.cons_zero, Fin.tail_cons, h.eq] + +/-- **Weak derivatives vanish where the function vanishes**: if `g` is a weak derivative `∂^v f` +on `Ω`, `O ⊆ Ω` is open and `f = 0` almost everywhere on `O`, then `g = 0` almost everywhere on +`O`, by locality (`Rd.HasWeakLineDeriv.mono`) and uniqueness (`Rd.HasWeakLineDeriv.unique`). -/ +theorem HasWeakLineDeriv.ae_eq_zero_of_ae_eq_zero {O : Opens V} (h : HasWeakLineDeriv Ω v f g) + (hO : O ≤ Ω) (hf : f =ᵐ[volume.restrict (O : Set V)] 0) : + g =ᵐ[volume.restrict (O : Set V)] 0 := + ((h.mono hO).congr_ae hf EventuallyEq.rfl).unique hasWeakLineDeriv_zero + +/-- **The integral form with complex test functions**: if `g = ∂^v f` weakly on `Ω`, then +`∫ w g = (-1)^k ∫ (∂^v w) f` for every smooth compactly supported complex `w` (a Schwartz function) +with `tsupport w ⊆ Ω`, by splitting `w = Re w + i Im w` into real test functions +(`Rd.exists_testSchwartz_eq_of_tsupport_subset`). -/ +theorem HasWeakLineDeriv.integral_mul_eq (h : HasWeakLineDeriv Ω v f g) (w : 𝓢(V, ℂ)) + (hw : HasCompactSupport w) (hwΩ : tsupport w ⊆ Ω) : + ∫ x, w x * g x = (-1 : ℂ) ^ k * ∫ x, (∂^{v} w : 𝓢(V, ℂ)) x * f x := by + obtain ⟨a, b, rfl⟩ := exists_testSchwartz_eq_of_tsupport_subset w hw hwΩ + have hc : ∀ (φ : 𝓓(Ω, ℝ)) (u : V → ℂ), (fun x => ((φ x : ℝ) : ℂ) * u x) = + fun x => φ x • u x := fun φ u => funext fun x => (Complex.real_smul ..).symm + have hsplit : ∀ (φ ψ : 𝓓(Ω, ℝ)) (u : V → ℂ), LocallyIntegrableOn u Ω volume → + ∫ x, (testSchwartz φ + Complex.I • testSchwartz ψ) x * u x = + (∫ x, φ x • u x) + Complex.I * ∫ x, ψ x • u x := fun φ ψ u hu => by + have h1 := φ.integrable_smul hu + have h2 := (ψ.integrable_smul hu).const_mul Complex.I + rw [← integral_const_mul, ← integral_add h1 h2] + refine integral_congr_ae (ae_of_all _ fun x => ?_) + simp only [add_apply, smul_apply, testSchwartz_apply, smul_eq_mul, + Complex.real_smul] + ring + rw [LineDeriv.iteratedLineDerivOp_add, LineDeriv.iteratedLineDerivOp_smul, + iteratedLineDerivOp_testSchwartz, iteratedLineDerivOp_testSchwartz, hsplit a b g h.2, + hsplit _ _ f h.1, h.integral_eq a, h.integral_eq b] + simp only [Complex.real_smul, Complex.ofReal_pow, Complex.ofReal_neg, Complex.ofReal_one] + ring + +/-- The product `φ χ` of a real test function `φ` on `Ω` with a smooth real function `χ` is a test +function on `Ω`. -/ +noncomputable def testFunctionMul (φ : 𝓓(Ω, ℝ)) {χ : V → ℝ} + (hχ : ContDiff ℝ ((⊤ : ℕ∞) : WithTop ℕ∞) χ) : 𝓓(Ω, ℝ) := + ⟨fun x => φ x * χ x, φ.contDiff.mul hχ, φ.hasCompactSupport.mul_right, + (tsupport_mul_subset_left).trans φ.tsupport_subset⟩ + +omit [FiniteDimensional ℝ V] [MeasurableSpace V] [BorelSpace V] in +/-- The values of `Rd.testFunctionMul`: `(φ χ)(x) = φ(x) χ(x)`. -/ +theorem testFunctionMul_apply (φ : 𝓓(Ω, ℝ)) {χ : V → ℝ} + (hχ : ContDiff ℝ ((⊤ : ℕ∞) : WithTop ℕ∞) χ) (x : V) : + testFunctionMul φ hχ x = φ x * χ x := + rfl + +omit [FiniteDimensional ℝ V] [MeasurableSpace V] [BorelSpace V] in +/-- **The product rule for test functions**: `∂_w (φ χ) = (∂_w φ) χ + φ ∂_w χ`. -/ +theorem lineDerivOp_testFunctionMul_apply (φ : 𝓓(Ω, ℝ)) {χ : V → ℝ} + (hχ : ContDiff ℝ ((⊤ : ℕ∞) : WithTop ℕ∞) χ) (w x : V) : + (∂_{w} (testFunctionMul φ hχ)) x = (∂_{w} φ) x * χ x + φ x * fderiv ℝ χ x w := by + have hφ : DifferentiableAt ℝ φ x := (φ.contDiff.differentiable (by simp)).differentiableAt + have hχx : DifferentiableAt ℝ χ x := (hχ.differentiable (by simp)).differentiableAt + rw [lineDerivOp_testFunction_apply, lineDerivOp_testFunction_apply] + change fderiv ℝ (fun y => φ y * χ y) x w = _ + rw [fderiv_fun_mul hφ hχx] + simp only [add_apply, smul_apply, smul_eq_mul] + ring + +section Cutoff + +variable {O B : Opens V} + +omit [FiniteDimensional ℝ V] [MeasurableSpace V] [BorelSpace V] in +/-- The product `φ χ` of a real test function `φ` on `O` with a smooth real function `χ` whose +closed support lies in `B` is a test function on `O ∩ B`. -/ +noncomputable def testFunctionMulOn (φ : 𝓓(O, ℝ)) {χ : V → ℝ} + (hχ : ContDiff ℝ ((⊤ : ℕ∞) : WithTop ℕ∞) χ) (hχB : tsupport χ ⊆ B) : 𝓓(O ⊓ B, ℝ) := + ⟨fun x => φ x * χ x, φ.contDiff.mul hχ, φ.hasCompactSupport.mul_right, by + rw [Opens.coe_inf] + exact Set.subset_inter ((tsupport_mul_subset_left).trans φ.tsupport_subset) + ((tsupport_mul_subset_right).trans hχB)⟩ + +omit [FiniteDimensional ℝ V] [MeasurableSpace V] [BorelSpace V] in +/-- The values of `Rd.testFunctionMulOn`: `(φ χ)(x) = φ(x) χ(x)`. -/ +theorem testFunctionMulOn_apply (φ : 𝓓(O, ℝ)) {χ : V → ℝ} + (hχ : ContDiff ℝ ((⊤ : ℕ∞) : WithTop ℕ∞) χ) (hχB : tsupport χ ⊆ B) (x : V) : + testFunctionMulOn φ hχ hχB x = φ x * χ x := + rfl + +omit [FiniteDimensional ℝ V] [MeasurableSpace V] [BorelSpace V] in +/-- **The product rule for `Rd.testFunctionMulOn`**: `∂_w (φ χ) = (∂_w φ) χ + φ ∂_w χ`. As a +function, `φ χ` is the test function `Rd.testFunctionMul φ` on `O`, whose derivative is +`Rd.lineDerivOp_testFunctionMul_apply`. -/ +theorem lineDerivOp_testFunctionMulOn_apply (φ : 𝓓(O, ℝ)) {χ : V → ℝ} + (hχ : ContDiff ℝ ((⊤ : ℕ∞) : WithTop ℕ∞) χ) (hχB : tsupport χ ⊆ B) (w x : V) : + (∂_{w} (testFunctionMulOn φ hχ hχB)) x = (∂_{w} φ) x * χ x + φ x * fderiv ℝ χ x w := by + rw [lineDerivOp_testFunction_apply] + exact (lineDerivOp_testFunction_apply (testFunctionMul φ hχ) w x).symm.trans + (lineDerivOp_testFunctionMul_apply φ hχ w x) + +/-- **Cutoff products are locally integrable on the larger set**: if `u` is locally integrable +on `O ∩ B` and `c` is continuous with closed support in `B`, then `c u` is locally integrable on +`O`; near points of `B` this is the product with a continuous function, and near the other points +of `O`, `c u` vanishes. -/ +theorem locallyIntegrableOn_mul_of_tsupport_subset {u : V → ℂ} + (hu : LocallyIntegrableOn u (O ⊓ B : Opens V) volume) {c : V → ℂ} (hc : Continuous c) + (hcB : tsupport c ⊆ B) : LocallyIntegrableOn (fun x => c x * u x) O volume := by + intro x hx + rw [nhdsWithin_eq_nhds.2 (O.isOpen.mem_nhds hx)] + by_cases hxB : x ∈ (B : Set V) + · have hxOB : x ∈ ((O ⊓ B : Opens V) : Set V) := by + rw [Opens.coe_inf] + exact ⟨hx, hxB⟩ + have h := hu.continuousOn_mul hc.continuousOn (O ⊓ B).isOpen.isLocallyClosed x hxOB + rwa [nhdsWithin_eq_nhds.2 ((O ⊓ B).isOpen.mem_nhds hxOB)] at h + · have hx' : x ∉ tsupport c := fun h => hxB (hcB h) + refine ⟨(tsupport c)ᶜ, (isClosed_tsupport c).isOpen_compl.mem_nhds hx', ?_⟩ + refine integrableOn_zero.congr_fun (fun y hy => ?_) + (isClosed_tsupport c).isOpen_compl.measurableSet + simp [image_eq_zero_of_notMem_tsupport hy] + +/-- **The product rule with a cutoff**: if `g = ∂_w f` weakly on `O ∩ B` and `χ` is a smooth +real function with closed support in `B`, then `χ g + (∂_w χ) f = ∂_w (χ f)` weakly on `O`. Tested +against `φ ∈ 𝓓(O)`, this is the weak derivative on `O ∩ B` tested against the test function +`φ χ` (`Rd.testFunctionMulOn`, `Rd.lineDerivOp_testFunctionMulOn_apply`). -/ +theorem HasWeakLineDeriv.mul_of_tsupport_subset {w : V} {f g : V → ℂ} + (h : HasWeakLineDeriv (O ⊓ B) (fun _ : Fin 1 => w) f g) {χ : V → ℝ} + (hχ : ContDiff ℝ ((⊤ : ℕ∞) : WithTop ℕ∞) χ) (hχB : tsupport χ ⊆ B) : + HasWeakLineDeriv O (fun _ : Fin 1 => w) (fun x => (χ x : ℂ) * f x) + (fun x => (χ x : ℂ) * g x + (fderiv ℝ χ x w : ℂ) * f x) := by + have hχ' : ContDiff ℝ ((⊤ : ℕ∞) : WithTop ℕ∞) fun x => fderiv ℝ χ x w := + (hχ.fderiv_right (by simp)).clm_apply contDiff_const + have hχ'B : tsupport (fun x => fderiv ℝ χ x w) ⊆ B := (tsupport_fderiv_apply_subset ℝ w).trans hχB + have hc : Continuous fun x => (χ x : ℂ) := Complex.continuous_ofReal.comp hχ.continuous + have hc' : Continuous fun x => (fderiv ℝ χ x w : ℂ) := + Complex.continuous_ofReal.comp hχ'.continuous + have hcB : tsupport (fun x => (χ x : ℂ)) ⊆ B := + (tsupport_comp_subset Complex.ofReal_zero χ).trans hχB + have hcB' : tsupport (fun x => (fderiv ℝ χ x w : ℂ)) ⊆ B := + (tsupport_comp_subset Complex.ofReal_zero _).trans hχ'B + refine (hasWeakLineDeriv_iff_integral (locallyIntegrableOn_mul_of_tsupport_subset h.1 hc hcB) + ((locallyIntegrableOn_mul_of_tsupport_subset h.2 hc hcB).add + (locallyIntegrableOn_mul_of_tsupport_subset h.1 hc' hcB'))).2 fun φ => ?_ + have h1 := h.integral_eq (testFunctionMulOn φ hχ hχB) + have i1 := (testFunctionMulOn φ hχ hχB).integrable_smul h.2 + have i2 := (testFunctionMulOn φ hχ' hχ'B).integrable_smul h.1 + have i3 := (testFunctionMulOn (∂_{w} φ) hχ hχB).integrable_smul h.1 + rw [LineDeriv.iteratedLineDerivOp_one] at h1 ⊢ + have e1 : (fun x => φ x • ((χ x : ℂ) * g x + (fderiv ℝ χ x w : ℂ) * f x)) = + fun x => testFunctionMulOn φ hχ hχB x • g x + testFunctionMulOn φ hχ' hχ'B x • f x := + funext fun x => by + simp only [testFunctionMulOn_apply, Complex.real_smul, Complex.ofReal_mul] + ring + have e2 : (fun x => (∂_{w} (testFunctionMulOn φ hχ hχB)) x • f x) = + fun x => testFunctionMulOn (∂_{w} φ) hχ hχB x • f x + testFunctionMulOn φ hχ' hχ'B x • f x := + funext fun x => by + simp only [lineDerivOp_testFunctionMulOn_apply, testFunctionMulOn_apply, Complex.real_smul, + Complex.ofReal_mul, Complex.ofReal_add] + ring + have e3 : (fun x => (∂_{w} φ) x • ((χ x : ℂ) * f x)) = + fun x => testFunctionMulOn (∂_{w} φ) hχ hχB x • f x := funext fun x => by + simp only [testFunctionMulOn_apply, Complex.real_smul, Complex.ofReal_mul] + ring + simp only [Pi.add_apply] + rw [e1, integral_add i1 i2, h1, e2, integral_add i3 i2, e3] + simp only [pow_one, neg_one_smul] + abel + +end Cutoff + +/-- **The product rule for weak derivatives**: if `g = ∂_w f` weakly on `Ω` and `χ` is a smooth +real function, then `χ g + (∂_w χ) f = ∂_w (χ f)` weakly on `Ω`: the product rule with a cutoff +(`Rd.HasWeakLineDeriv.mul_of_tsupport_subset`) for `B = V`. -/ +theorem HasWeakLineDeriv.mul_contDiff {w : V} (h : HasWeakLineDeriv Ω (fun _ : Fin 1 => w) f g) + {χ : V → ℝ} (hχ : ContDiff ℝ ((⊤ : ℕ∞) : WithTop ℕ∞) χ) : + HasWeakLineDeriv Ω (fun _ : Fin 1 => w) (fun x => (χ x : ℂ) * f x) + (fun x => (χ x : ℂ) * g x + (fderiv ℝ χ x w : ℂ) * f x) := by + have h' : HasWeakLineDeriv (Ω ⊓ ⊤) (fun _ : Fin 1 => w) f g := by rwa [inf_top_eq] + exact h'.mul_of_tsupport_subset hχ (by simp) + +/-! ### Sobolev spaces on open sets -/ + +/-- `W^0_p(Ω) = L_p(Ω)` for `1 ≤ p`. -/ +theorem memWeakSobolev_zero_iff {p : ℝ≥0∞} (hp : 1 ≤ p) : + MemWeakSobolev Ω 0 p f ↔ MemLp f p (volume.restrict Ω) := by + refine ⟨fun h => h.1, fun h => ⟨h, fun k hk v => ?_⟩⟩ + obtain rfl : k = 0 := Nat.le_zero.1 hk + exact ⟨f, h, hasWeakLineDeriv_fin_zero v (locallyIntegrableOn_of_memLp hp h)⟩ + +/-- `W^m_p(Ω) ⊆ W^n_p(Ω)` for `n ≤ m`. -/ +theorem MemWeakSobolev.mono_order {p : ℝ≥0∞} {m n : ℕ} (hf : MemWeakSobolev Ω m p f) + (hnm : n ≤ m) : MemWeakSobolev Ω n p f := + ⟨hf.1, fun k hk v => hf.2 k (hk.trans hnm) v⟩ + +/-- Restriction to a smaller open set: `f ∈ W^m_p(Ω)` gives `f ∈ W^m_p(Ω')` for `Ω' ⊆ Ω`. -/ +theorem MemWeakSobolev.mono_set {p : ℝ≥0∞} {m : ℕ} (hf : MemWeakSobolev Ω m p f) + (hΩ : Ω' ≤ Ω) : MemWeakSobolev Ω' m p f := by + have hμ : volume.restrict (Ω' : Set V) ≤ volume.restrict Ω := + Measure.restrict_mono (show (Ω' : Set V) ⊆ Ω from hΩ) le_rfl + refine ⟨hf.1.mono_measure hμ, fun k hk v => ?_⟩ + obtain ⟨g, hg, hfg⟩ := hf.2 k hk v + exact ⟨g, hg.mono_measure hμ, hfg.mono hΩ⟩ + +/-- The zero function lies in `W^m_p(Ω)`. -/ +theorem zero_memWeakSobolev {p : ℝ≥0∞} {m : ℕ} : MemWeakSobolev Ω m p 0 := + ⟨MemLp.zero, fun _ _ _ => ⟨0, MemLp.zero, hasWeakLineDeriv_zero⟩⟩ + +/-- `W^m_p(Ω)` is closed under addition. -/ +theorem MemWeakSobolev.add {p : ℝ≥0∞} {m : ℕ} (hf : MemWeakSobolev Ω m p f) + (hf' : MemWeakSobolev Ω m p f') : MemWeakSobolev Ω m p (f + f') := by + refine ⟨hf.1.add hf'.1, fun k hk v => ?_⟩ + obtain ⟨g, hg, hfg⟩ := hf.2 k hk v + obtain ⟨g', hg', hfg'⟩ := hf'.2 k hk v + exact ⟨g + g', hg.add hg', hfg.add hfg'⟩ + +/-- `W^m_p(Ω)` is closed under multiplication by complex scalars. -/ +theorem MemWeakSobolev.smul {p : ℝ≥0∞} {m : ℕ} (hf : MemWeakSobolev Ω m p f) (c : ℂ) : + MemWeakSobolev Ω m p (c • f) := by + refine ⟨hf.1.const_smul c, fun k hk v => ?_⟩ + obtain ⟨g, hg, hfg⟩ := hf.2 k hk v + exact ⟨c • g, hg.const_smul c, hfg.smul c⟩ + +/-- `W^m_p(Ω)` only sees `f` almost everywhere on `Ω`: if `f ∈ W^m_p(Ω)` and `f = f'` almost +everywhere on `Ω`, then `f' ∈ W^m_p(Ω)`; the weak derivatives of `f` serve for `f'` +(`Rd.HasWeakLineDeriv.congr_ae`). -/ +theorem MemWeakSobolev.congr_ae {p : ℝ≥0∞} {m : ℕ} (hf : MemWeakSobolev Ω m p f) + (hff' : f =ᵐ[volume.restrict Ω] f') : MemWeakSobolev Ω m p f' := by + refine ⟨MemLp.ae_eq hff' hf.1, fun k hk v => ?_⟩ + obtain ⟨g, hg, hfg⟩ := hf.2 k hk v + exact ⟨g, hg, hfg.congr_ae hff' Filter.EventuallyEq.rfl⟩ + +/-- The zero class lies in `W^m_p(V)`. -/ +theorem zero_memSobolev {p : ℝ≥0∞} {m : ℕ} : MemSobolev m (0 : Lp ℂ p (volume : Measure V)) := + zero_memWeakSobolev.congr_ae (ae_restrict_of_ae (Lp.coeFn_zero ..).symm) + +/-- `W^m_p(V)` is closed under addition in `L_p(V)`. -/ +theorem MemSobolev.add {p : ℝ≥0∞} {m : ℕ} {F G : Lp ℂ p (volume : Measure V)} + (hF : MemSobolev m F) (hG : MemSobolev m G) : MemSobolev m (F + G) := + (MemWeakSobolev.add hF hG).congr_ae (ae_restrict_of_ae (Lp.coeFn_add F G).symm) + +/-- `W^m_p(V)` is closed under multiplication by complex scalars in `L_p(V)`. -/ +theorem MemSobolev.smul {p : ℝ≥0∞} {m : ℕ} {F : Lp ℂ p (volume : Measure V)} + (hF : MemSobolev m F) (c : ℂ) : MemSobolev m (c • F) := + (MemWeakSobolev.smul hF c).congr_ae (ae_restrict_of_ae (Lp.coeFn_smul c F).symm) + +/-- `W^m_p(V)` is closed under finite sums in `L_p(V)` (`Rd.MemSobolev.add`). -/ +theorem MemSobolev.sum {p : ℝ≥0∞} {m : ℕ} {ι : Type*} (s : Finset ι) + {F : ι → Lp ℂ p (volume : Measure V)} (hF : ∀ i ∈ s, MemSobolev m (F i)) : + MemSobolev m (∑ i ∈ s, F i) := by + classical + induction s using Finset.induction_on with + | empty => simpa using (zero_memSobolev : MemSobolev m (0 : Lp ℂ p (volume : Measure V))) + | insert i s hi ih => + rw [Finset.sum_insert hi] + exact (hF i (Finset.mem_insert_self i s)).add + (ih fun j hj => hF j (Finset.mem_insert_of_mem hj)) + +/-- **`W^m_p(V)` with derivatives in `L_p(V)`**: `f ∈ L_p(V)` lies in `W^m_p(V)` iff for every +order `k ≤ m` and all directions `v ∈ V^k` some class `g ∈ L_p(V)` is the weak derivative +`∂^v f` on `V`. -/ +theorem memSobolev_iff_exists_hasWeakLineDeriv {p : ℝ≥0∞} {m : ℕ} + (f : Lp ℂ p (volume : Measure V)) : + MemSobolev m f ↔ ∀ k ≤ m, ∀ v : Fin k → V, + ∃ g : Lp ℂ p (volume : Measure V), HasWeakLineDeriv ⊤ v f g := by + constructor + · rintro ⟨-, h⟩ k hk v + obtain ⟨g, hg, hfg⟩ := h k hk v + rw [volume_restrict_top] at hg + refine ⟨hg.toLp g, hfg.congr_ae EventuallyEq.rfl ?_⟩ + rw [volume_restrict_top] + exact hg.coeFn_toLp.symm + · intro h + refine ⟨by simpa using Lp.memLp f, fun k hk v => ?_⟩ + obtain ⟨g, hg⟩ := h k hk v + exact ⟨g, by simpa using Lp.memLp g, hg⟩ + +/-! ### Limits -/ + +/-- **Hölder bound for the pairing with a test function**: for `1 ≤ p`, a test function `φ` on +`Ω` with support `K` and every `h` a.e. strongly measurable on `Ω`, +`‖φ h‖_{L_1(Ω)} ≤ ‖φ‖_∞ |K|^(1 - 1/p) ‖h‖_{L_p(Ω)}` (Hölder on the compact set `K`: Mathlib's +`eLpNorm_le_eLpNorm_mul_rpow_measure_univ` and `eLpNorm_smul_le_eLpNorm_top_mul_eLpNorm`). -/ +theorem eLpNorm_testFunction_smul_le {p : ℝ≥0∞} (hp : 1 ≤ p) (φ : 𝓓(Ω, ℝ)) {h : V → ℂ} + (hh : AEStronglyMeasurable h (volume.restrict Ω)) : + eLpNorm (fun x => φ x • h x) 1 (volume.restrict Ω) ≤ + eLpNorm φ ∞ volume * volume (tsupport φ) ^ (1 - 1 / p.toReal) * + eLpNorm h p (volume.restrict Ω) := by + set μ := volume.restrict (Ω : Set V) + have hm : AEStronglyMeasurable (fun x => φ x • h x) μ := φ.continuous.aestronglyMeasurable.smul hh + have hsupp : (Function.support fun x => φ x • h x) ⊆ tsupport φ := fun x hx => + subset_tsupport _ fun h0 => hx (by simp [h0]) + calc eLpNorm (fun x => φ x • h x) 1 μ + = eLpNorm (fun x => φ x • h x) 1 (μ.restrict (tsupport φ)) := + (eLpNorm_restrict_eq_of_support_subset hm hsupp).symm + _ ≤ eLpNorm (fun x => φ x • h x) p (μ.restrict (tsupport φ)) * + (μ.restrict (tsupport φ)) Set.univ ^ (1 / (1 : ℝ≥0∞).toReal - 1 / p.toReal) := + eLpNorm_le_eLpNorm_mul_rpow_measure_univ hp hm.restrict + _ ≤ (eLpNorm φ ∞ volume * eLpNorm h p μ) * volume (tsupport φ) ^ (1 - 1 / p.toReal) := by + gcongr + · calc eLpNorm (fun x => φ x • h x) p (μ.restrict (tsupport φ)) + ≤ eLpNorm φ ∞ (μ.restrict (tsupport φ)) * eLpNorm h p (μ.restrict (tsupport φ)) := + eLpNorm_smul_le_eLpNorm_top_mul_eLpNorm p φ.continuous.aestronglyMeasurable + _ ≤ eLpNorm φ ∞ volume * eLpNorm h p μ := by + gcongr + · exact Measure.restrict_le_self.trans Measure.restrict_le_self + · exact Measure.restrict_le_self + · rw [Measure.restrict_apply_univ, ENNReal.toReal_one, div_one] + exact ENNReal.rpow_le_rpow (Measure.restrict_apply_le _ _) + (one_sub_one_div_toReal_nonneg hp) + _ = _ := by ring + +/-- If `‖h_i - h‖_{L_p(μ)} → 0` and `h ∈ L_p(μ)`, then eventually every `h_i` lies in `L_p(μ)`: +`h_i = (h_i - h) + h` with `‖h_i - h‖_p < 1` eventually. -/ +theorem eventually_memLp_of_tendsto {α : Type*} [MeasurableSpace α] {p : ℝ≥0∞} {μ : Measure α} + {ι : Type*} {l : Filter ι} {hs : ι → α → ℂ} {h : α → ℂ} (hh : MemLp h p μ) + (hlim : Tendsto (fun i => eLpNorm (hs i - h) p μ) l (𝓝 0)) : ∀ᶠ i in l, MemLp (hs i) p μ := by + filter_upwards [hlim.eventually (gt_mem_nhds zero_lt_one)] with i hi + have hd : MemLp (hs i - h) p μ := memLp_iff.2 (hi.trans ENNReal.one_lt_top) + simpa using hd.add hh + +/-- **Convergence in `L_p(Ω)` gives convergence of the pairings with a test function**: if +`h_i → h` in `L_p(Ω)`, `1 ≤ p`, with `h ∈ L_p(Ω)` and `h_i ∈ L_p(Ω)` eventually, then +`∫ φ h_i → ∫ φ h` for every test function `φ` on `Ω`. -/ +theorem tendsto_integral_testFunction_smul {p : ℝ≥0∞} (hp : 1 ≤ p) (φ : 𝓓(Ω, ℝ)) {ι : Type*} + {l : Filter ι} {hs : ι → V → ℂ} {h : V → ℂ} + (hhs : ∀ᶠ i in l, MemLp (hs i) p (volume.restrict Ω)) + (hh : MemLp h p (volume.restrict Ω)) + (hlim : Tendsto (fun i => eLpNorm (hs i - h) p (volume.restrict Ω)) l (𝓝 0)) : + Tendsto (fun i => ∫ x, φ x • hs i x) l (𝓝 (∫ x, φ x • h x)) := by + have hcompl : ∀ u : V → ℂ, ∫ x in (Ω : Set V), φ x • u x = ∫ x, φ x • u x := fun u => + setIntegral_eq_integral_of_forall_compl_eq_zero fun x hx => by + simp [φ.zero_on_compl hx] + simp only [← hcompl] + refine tendsto_integral_of_L1' _ (hhs.mono fun i hi => + (φ.integrable_smul (locallyIntegrableOn_of_memLp hp hi)).restrict) ?_ + have hC : eLpNorm φ ∞ volume * volume (tsupport φ) ^ (1 - 1 / p.toReal) ≠ ∞ := + ENNReal.mul_ne_top (φ.memLp_top).eLpNorm_ne_top + (ENNReal.rpow_ne_top_of_nonneg (one_sub_one_div_toReal_nonneg hp) + φ.hasCompactSupport.isCompact.measure_ne_top) + have hlim' := ENNReal.Tendsto.const_mul hlim (Or.inr hC) + rw [mul_zero] at hlim' + refine tendsto_of_tendsto_of_tendsto_of_le_of_le' tendsto_const_nhds hlim' + (Eventually.of_forall fun _ => bot_le) (hhs.mono fun i hi => ?_) + have he : ((fun x => φ x • hs i x) - fun x => φ x • h x) = fun x => φ x • (hs i - h) x := by + funext x + simp [smul_sub] + simp only [he] + exact eLpNorm_testFunction_smul_le hp φ (hi.aestronglyMeasurable.sub hh.aestronglyMeasurable) + +/-- **Weak derivatives pass to limits in `L_p(Ω)`**: if `g_i = ∂^v f_i` weakly on `Ω`, +`f ∈ L_p(Ω)`, `g ∈ L_r(Ω)`, `‖f_i - f‖_{L_p(Ω)} → 0` and `‖g_i - g‖_{L_r(Ω)} → 0` with +`1 ≤ p, r`, along a nontrivial filter, then `g = ∂^v f` weakly on `Ω`. Eventually the `f_i` +lie in `L_p(Ω)` and the `g_i` in `L_r(Ω)` (`Rd.eventually_memLp_of_tendsto`). -/ +theorem HasWeakLineDeriv.of_tendsto {p r : ℝ≥0∞} (hp : 1 ≤ p) (hr : 1 ≤ r) {ι : Type*} + {l : Filter ι} [l.NeBot] {fs gs : ι → V → ℂ} (h : ∀ i, HasWeakLineDeriv Ω v (fs i) (gs i)) + (hf : MemLp f p (volume.restrict Ω)) (hg : MemLp g r (volume.restrict Ω)) + (hlf : Tendsto (fun i => eLpNorm (fs i - f) p (volume.restrict Ω)) l (𝓝 0)) + (hlg : Tendsto (fun i => eLpNorm (gs i - g) r (volume.restrict Ω)) l (𝓝 0)) : + HasWeakLineDeriv Ω v f g := by + refine (hasWeakLineDeriv_iff_integral (locallyIntegrableOn_of_memLp hp hf) + (locallyIntegrableOn_of_memLp hr hg)).2 fun φ => ?_ + have hfs := eventually_memLp_of_tendsto hf hlf + have hgs := eventually_memLp_of_tendsto hg hlg + refine tendsto_nhds_unique (tendsto_integral_testFunction_smul hr φ hgs hg hlg) ?_ + have hlim := (tendsto_integral_testFunction_smul hp (∂^{v} φ) hfs hf hlf).const_smul + ((-1 : ℝ) ^ k) + exact hlim.congr fun i => ((h i).integral_eq φ).symm + +/-! ### The bridge to tempered distributions -/ + +section Bridge + +variable {p r : ℝ≥0∞} [Fact (1 ≤ p)] [Fact (1 ≤ r)] + +/-- An `L_p(V)` function, `1 ≤ p`, is locally integrable on `V`: the case `Ω = V` of +`Rd.locallyIntegrableOn_of_memLp`. -/ +theorem locallyIntegrableOn_top_Lp (f : Lp ℂ p (volume : Measure V)) : + LocallyIntegrableOn f ((⊤ : Opens V) : Set V) volume := + locallyIntegrableOn_of_memLp Fact.out (by simpa using Lp.memLp f) + +/-- **`W^1_p(V)` from first-order weak derivatives**: a function `f ∈ L_p(V)`, `1 ≤ p`, with a +weak derivative `∂_v f ∈ L_p(V)` in every direction `v` lies in `W^1_p(V)` +(`Rd.memSobolev_iff_exists_hasWeakLineDeriv`; the derivative of order zero is `f` itself). -/ +theorem memSobolev_one_of_forall_hasWeakLineDeriv {f : Lp ℂ p (volume : Measure V)} + (h : ∀ v : V, ∃ g : Lp ℂ p (volume : Measure V), HasWeakLineDeriv ⊤ (fun _ : Fin 1 => v) f g) : + MemSobolev 1 f := by + refine (memSobolev_iff_exists_hasWeakLineDeriv _).2 fun k hk v => ?_ + rcases Nat.le_one_iff_eq_zero_or_eq_one.1 hk with rfl | rfl + · exact ⟨_, hasWeakLineDeriv_fin_zero v (locallyIntegrableOn_top_Lp _)⟩ + have hv : v = fun _ => v 0 := funext fun i => congrArg v (Subsingleton.elim i 0) + rw [hv] + exact h (v 0) + +/-- On `Ω = V`, the distribution of `f ∈ L_p(V)` applied to a test function `φ` is the tempered +distribution of `f` applied to the Schwartz function `φ`: both are `∫ φ f`. -/ +theorem ofFun_top_apply (f : Lp ℂ p (volume : Measure V)) (φ : 𝓓((⊤ : Opens V), ℝ)) : + Distribution.ofFun ⊤ (f : V → ℂ) volume ⊤ φ = (f : 𝓢'(V, ℂ)) (testSchwartz φ) := by + rw [Distribution.ofFun_apply (locallyIntegrableOn_top_Lp f), Lp.toTemperedDistribution_apply] + refine integral_congr_ae (ae_of_all _ fun x => ?_) + simp [Complex.real_smul] + +/-- On `Ω = V`, the iterated derivatives of `f ∈ L_p(V)` as a distribution and as a tempered +distribution agree on test functions. -/ +theorem iteratedLineDerivOp_ofFun_top_apply (v : Fin k → V) (f : Lp ℂ p (volume : Measure V)) + (φ : 𝓓((⊤ : Opens V), ℝ)) : + ∂^{v} (Distribution.ofFun ⊤ (f : V → ℂ) volume ⊤) φ = + ∂^{v} (f : 𝓢'(V, ℂ)) (testSchwartz φ) := by + rw [Distribution.iteratedLineDerivOp_apply_apply, ofFun_top_apply, + TemperedDistribution.iteratedLineDerivOp_apply_apply, map_smul, + iteratedLineDerivOp_testSchwartz] + simp only [Complex.real_smul, smul_eq_mul, Complex.ofReal_pow, Complex.ofReal_neg, + Complex.ofReal_one] + +/-- **Weak derivatives on `V` are derivatives of tempered distributions**: for `f ∈ L_p(V)` and +`g ∈ L_r(V)`, `1 ≤ p, r`, `g` is the weak derivative `∂^v f` on `V` iff `∂^v f = g` in +`𝓢'(V, ℂ)`. One direction tests with the Schwartz functions `Rd.testSchwartz φ`; the other uses +that tempered distributions are determined by test functions (`Rd.eq_zero_of_testSchwartz`). -/ +theorem hasWeakLineDeriv_top_iff {f : Lp ℂ p (volume : Measure V)} + {g : Lp ℂ r (volume : Measure V)} : + HasWeakLineDeriv ⊤ v f g ↔ ∂^{v} (f : 𝓢'(V, ℂ)) = (g : 𝓢'(V, ℂ)) := by + constructor + · intro h + rw [← sub_eq_zero] + refine eq_zero_of_testSchwartz fun φ => ?_ + have h' := DFunLike.congr_fun h.eq φ + rw [iteratedLineDerivOp_ofFun_top_apply, ofFun_top_apply] at h' + simp [h'] + · intro h + refine ⟨locallyIntegrableOn_top_Lp f, locallyIntegrableOn_top_Lp g, ?_⟩ + ext φ + rw [iteratedLineDerivOp_ofFun_top_apply, ofFun_top_apply, h] + +/-- The iterated derivative `∂^v` of the `L_p(V)` class of a Schwartz function `η`, as a tempered +distribution, is the `L_r(V)` class of the Schwartz function `∂^v η`, as a tempered +distribution. -/ +theorem iteratedLineDerivOp_toLp_eq (η : 𝓢(V, ℂ)) (v : Fin k → V) : + ∂^{v} ((η.toLp p (volume : Measure V) : Lp ℂ p (volume : Measure V)) : 𝓢'(V, ℂ)) = + ((∂^{v} η).toLp r (volume : Measure V) : 𝓢'(V, ℂ)) := by + rw [Lp.toTemperedDistribution_toLp_eq, Lp.toTemperedDistribution_toLp_eq, + TemperedDistribution.iteratedLineDerivOp_toTemperedDistributionCLM_eq] + +/-- **Schwartz functions**: on every open set `Ω`, the classical iterated derivative `∂^v η` of a +Schwartz function `η` is its weak derivative. -/ +theorem hasWeakLineDeriv_schwartz (Ω : Opens V) (η : 𝓢(V, ℂ)) (v : Fin k → V) : + HasWeakLineDeriv Ω v η ((∂^{v} η : 𝓢(V, ℂ)) : V → ℂ) := by + have h := (hasWeakLineDeriv_top_iff (p := 2) (r := 2)).2 + (iteratedLineDerivOp_toLp_eq (p := 2) (r := 2) η v) + refine (h.congr_ae ?_ ?_).mono le_top + · rw [volume_restrict_top] + exact η.coeFn_toLp 2 volume + · rw [volume_restrict_top] + exact (∂^{v} η).coeFn_toLp 2 volume + +/-- **Sobolev spaces by tempered distributions**: `f ∈ L_p(V)` lies in `W^m_p(V)` iff for every +order `k ≤ m` and all directions `v`, the tempered derivative `∂^v f` is an `L_p(V)` function +(`Rd.memSobolev_iff_exists_hasWeakLineDeriv` and `Rd.hasWeakLineDeriv_top_iff`). -/ +theorem memSobolev_iff_tempered {m : ℕ} (f : Lp ℂ p (volume : Measure V)) : + MemSobolev m f ↔ ∀ k ≤ m, ∀ v : Fin k → V, + ∃ g : Lp ℂ p (volume : Measure V), ∂^{v} (f : 𝓢'(V, ℂ)) = (g : 𝓢'(V, ℂ)) := + (memSobolev_iff_exists_hasWeakLineDeriv f).trans <| forall₂_congr fun _ _ => + forall_congr' fun _ => exists_congr fun _ => hasWeakLineDeriv_top_iff + +/-- Schwartz functions lie in every Sobolev space `W^m_p(V)`. -/ +theorem memSobolev_toLp (η : 𝓢(V, ℂ)) (m : ℕ) : + MemSobolev m (η.toLp p (volume : Measure V)) := + (memSobolev_iff_tempered _).2 fun _ _ v => ⟨_, iteratedLineDerivOp_toLp_eq (r := p) η v⟩ + +end Bridge + +end Rd diff --git a/LeanPool/FunctionSpaces/Rd/TriebelLizorkin/LittlewoodPaleyFamilies.lean b/LeanPool/FunctionSpaces/Rd/TriebelLizorkin/LittlewoodPaleyFamilies.lean new file mode 100644 index 0000000000..95b7462ed7 --- /dev/null +++ b/LeanPool/FunctionSpaces/Rd/TriebelLizorkin/LittlewoodPaleyFamilies.lean @@ -0,0 +1,387 @@ +/- +Copyright (c) 2026 Mario Ullrich. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Mario Ullrich +-/ +module + +public import LeanPool.FunctionSpaces.Rd.TriebelLizorkin.TriebelLizorkinDistributions +public import LeanPool.FunctionSpaces.Rd.FourierMultipliers.SymbolKernels +public import LeanPool.FunctionSpaces.Rd.TriebelLizorkin.TriebelLizorkinLocalMeans + +/- +Modified for Lean Pool: module names and imports adapted. +-/ + +/-! +# Independence of the Littlewood–Paley family + +The blocks of an admissible Littlewood–Paley kernel (`Rd.LPKernel`, with `𝓕Φ' = 1` on the ball +`{‖ξ‖ ≤ a}` and `𝓕Φ' = 0` outside the ball of radius `b`) are `ψ'_0 = Φ'` and +`ψ'_j = (Φ' - δ_{1/2} Φ')_{2^j}`, with the dilation `G_c(x) = c^n G(c x)`, so that +`𝓕ψ'_j(ξ) = 𝓕Φ'(2^{-j} ξ) - 𝓕Φ'(2^{1-j} ξ)` for `j ≥ 1` (`Rd.LPKernel.fourier_psiS_succ`), as in +Triebel's example of a Littlewood–Paley system (Triebel 1983, §2.3.1). The bases `Φ'` and +`Φ' - δ_{1/2} Φ'` are uniformly Schwartz with the seminorm bounds `Rd.LPKernel.baseBound` +(`Rd.LPKernel.isUniformSchwartz_base`). + +Any two admissible kernels give equivalent Triebel–Lizorkin quasi-norms on tempered distributions, +for every real `s`, `1 < p < ∞` and `1 < q ≤ ∞`, with the explicit constant +`Rd.LPKernel.comparisonConst N c s` times the Fefferman–Stein constant +(`Rd.LPKernel.triebelLizorkinNormDistr_le_of_blocks`, +`Rd.LPKernel.triebelLizorkinNormDistr_le_mul`), for every window `c ∈ ℕ` with `b ≤ 2^c a'` and +`b' ≤ 2^c a`, that is `2^c ≥ max(b/a', b'/a)`; such a window exists (`Rd.LPKernel.exists_window`). +Hence they give the same spaces, also on `L_p` (`Rd.LPKernel.memTriebelLizorkinDistr_iff`, +`Rd.LPKernel.memTriebelLizorkin_iff`). + +The proof is a finite identity on the Fourier side. With `2^c ≥ max(b/a', b'/a)`, +`∑_{|k - j| ≤ c} 𝓕ψ'_k = 1` wherever `𝓕ψ_j ≠ 0` (`Rd.LPKernel.fourier_psiS_mul_sum_Icc`), so +`Δ_j u = ∑_{|k - j| ≤ c} ψ_j ⋆ Δ'_k u` (`Rd.LPKernel.distribBlock_eq_sum`). The convolutions with +`ψ_j` lie below the maximal function, uniformly in `j`, the weights change by at most `2^{c|s|}` +inside the window, the window sums cost the factor `2c + 1` in `ℓ_q` +(`ENNReal.lqNorm_sum_Icc_le`), and the Fefferman–Stein inequality finishes. +-/ + +@[expose] public section + +open MeasureTheory Filter Module +open scoped ENNReal SchwartzMap FourierTransform + +open ENNReal (lqNorm dyadicWeight) + +namespace Rd + +variable {V : Type*} [NormedAddCommGroup V] [InnerProductSpace ℝ V] [FiniteDimensional ℝ V] + [MeasurableSpace V] [BorelSpace V] + +namespace LPKernel + +variable (K K' : LPKernel V) + +/-! ### The blocks of an admissible kernel -/ + +/-- The seminorm bounds of the bases: the larger of the seminorms of `Φ'` and `Φ' - δ_{1/2} Φ'`. -/ +noncomputable def baseBound (k l : ℕ) : ℝ := + max (SchwartzMap.seminorm ℝ k l K.kernel) + (SchwartzMap.seminorm ℝ k l (K.kernel - schwartzDilate (1 / 2) (by norm_num) K.kernel)) + +/-- The bases form a uniformly Schwartz family with bounds `K.baseBound`, since they take only two +values (`Rd.IsUniformSchwartz.of_forall_eq_or_eq`). -/ +theorem isUniformSchwartz_base : IsUniformSchwartz K.base K.baseBound := + IsUniformSchwartz.of_forall_eq_or_eq fun j => by + cases j with + | zero => exact Or.inl rfl + | succ j => exact Or.inr rfl + +/-- `𝓕ψ'_0 = 𝓕Φ'`. -/ +theorem fourier_psiS_zero (ξ : V) : + (𝓕 (K.psiS 0) : 𝓢(V, ℂ)) ξ = (𝓕 K.kernel : 𝓢(V, ℂ)) ξ := by + rw [psiS, fourier_schwartzDilate_apply (by norm_num : (0 : ℝ) < 2 ^ 0), pow_zero, inv_one, + one_smul] + rfl + +/-- `𝓕ψ'_{j+1}(ξ) = 𝓕Φ'(2^{-(j+1)} ξ) - 𝓕Φ'(2^{-j} ξ)` (`Rd.fourier_schwartzDilate_apply`). -/ +theorem fourier_psiS_succ (j : ℕ) (ξ : V) : + (𝓕 (K.psiS (j + 1)) : 𝓢(V, ℂ)) ξ = + (𝓕 K.kernel : 𝓢(V, ℂ)) (((2 : ℝ) ^ (j + 1))⁻¹ • ξ) - + (𝓕 K.kernel : 𝓢(V, ℂ)) (((2 : ℝ) ^ j)⁻¹ • ξ) := by + rw [psiS, fourier_schwartzDilate_apply (by positivity : (0 : ℝ) < 2 ^ (j + 1)), base, + sub_eq_add_neg, FourierAdd.fourier_add, FourierTransform.fourier_neg, add_apply, + neg_apply, ← sub_eq_add_neg, + fourier_schwartzDilate_apply (by norm_num : (0 : ℝ) < 1 / 2), smul_smul] + congr 2 + rw [pow_succ] + field_simp + +/-- **The blocks telescope**: `∑_{j ≤ J} 𝓕ψ'_j(ξ) = 𝓕Φ'(2^{-J} ξ)`. -/ +theorem sum_range_fourier_psiS (J : ℕ) (ξ : V) : + ∑ j ∈ Finset.range (J + 1), (𝓕 (K.psiS j) : 𝓢(V, ℂ)) ξ = + (𝓕 K.kernel : 𝓢(V, ℂ)) (((2 : ℝ) ^ J)⁻¹ • ξ) := by + induction J with + | zero => rw [zero_add, Finset.sum_range_one, fourier_psiS_zero, pow_zero, inv_one, one_smul] + | succ J ih => rw [Finset.sum_range_succ, ih, fourier_psiS_succ]; ring + +/-- `𝓕Φ'(c⁻¹ ξ) = 1` for `‖ξ‖ ≤ c a`, `c > 0`. -/ +theorem fourier_kernel_inv_smul_eq_one {c : ℝ} (hc : 0 < c) {ξ : V} (h : ‖ξ‖ ≤ c * K.a) : + (𝓕 K.kernel : 𝓢(V, ℂ)) (c⁻¹ • ξ) = 1 := by + refine K.fourier_eq_one _ ?_ + rw [norm_smul, norm_inv, Real.norm_of_nonneg hc.le, inv_mul_le_iff₀ hc] + exact h + +/-- `𝓕Φ'(c⁻¹ ξ) = 0` for `‖ξ‖ ≥ c b`, `c > 0`. -/ +theorem fourier_kernel_inv_smul_eq_zero {c : ℝ} (hc : 0 < c) {ξ : V} (h : c * K.b ≤ ‖ξ‖) : + (𝓕 K.kernel : 𝓢(V, ℂ)) (c⁻¹ • ξ) = 0 := by + refine K.fourier_eq_zero _ ?_ + rw [norm_smul, norm_inv, Real.norm_of_nonneg hc.le, le_inv_mul_iff₀ hc] + exact h + +/-- **The Fourier support of the blocks, outer radius**: where `𝓕ψ'_j(ξ) ≠ 0`, `‖ξ‖ < 2^j b`. -/ +theorem norm_lt_of_fourier_psiS_ne_zero {j : ℕ} {ξ : V} + (h : (𝓕 (K.psiS j) : 𝓢(V, ℂ)) ξ ≠ 0) : ‖ξ‖ < 2 ^ j * K.b := by + by_contra hξ + rw [not_lt] at hξ + cases j with + | zero => + rw [fourier_psiS_zero] at h + exact h (by simpa using K.fourier_kernel_inv_smul_eq_zero one_pos (by simpa using hξ)) + | succ j => + rw [fourier_psiS_succ, K.fourier_kernel_inv_smul_eq_zero (by positivity) hξ, + K.fourier_kernel_inv_smul_eq_zero (by positivity) (le_trans (by + rw [pow_succ]; nlinarith [K.a_pos, K.a_lt_b, pow_pos (two_pos (α := ℝ)) j]) hξ), + sub_zero] at h + exact h rfl + +/-- **The Fourier support of the blocks, inner radius**: where `𝓕ψ'_{j+1}(ξ) ≠ 0`, +`2^j a < ‖ξ‖`. -/ +theorem lt_norm_of_fourier_psiS_succ_ne_zero {j : ℕ} {ξ : V} + (h : (𝓕 (K.psiS (j + 1)) : 𝓢(V, ℂ)) ξ ≠ 0) : 2 ^ j * K.a < ‖ξ‖ := by + by_contra hξ + rw [not_lt] at hξ + rw [fourier_psiS_succ, K.fourier_kernel_inv_smul_eq_one (by positivity) hξ, + K.fourier_kernel_inv_smul_eq_one (by positivity) (hξ.trans (by + rw [pow_succ]; nlinarith [K.a_pos, pow_pos (two_pos (α := ℝ)) j])), sub_self] at h + exact h rfl + +/-! ### The finite identity -/ + +/-- **A window for two kernels**: for admissible kernels `K`, `K'` there is `c ∈ ℕ` with +`b ≤ 2^c a'` and `b' ≤ 2^c a` (Mathlib's `pow_unbounded_of_one_lt`). -/ +theorem exists_window : ∃ c : ℕ, K.b ≤ 2 ^ c * K'.a ∧ K'.b ≤ 2 ^ c * K.a := by + obtain ⟨c, hc⟩ := pow_unbounded_of_one_lt (max (K.b / K'.a) (K'.b / K.a)) one_lt_two + refine ⟨c, ?_, ?_⟩ + · exact ((div_lt_iff₀ K'.a_pos).1 ((le_max_left _ _).trans_lt hc)).le + · exact ((div_lt_iff₀ K.a_pos).1 ((le_max_right _ _).trans_lt hc)).le + +/-- **The window sums are `1` on the Fourier support of a block**: if `b ≤ 2^c a'` and +`b' ≤ 2^c a`, then `∑_{k = j - c}^{j + c} 𝓕ψ'_k(ξ) = 1` wherever `𝓕ψ_j(ξ) ≠ 0`. The sum is +`𝓕Φ'(2^{-(j+c)} ξ) - 𝓕Φ'(2^{-(j-c-1)} ξ)` (`Rd.LPKernel.sum_range_fourier_psiS`, the second term +absent for `j ≤ c`), and `2^{j-1} a < ‖ξ‖ < 2^j b` (`Rd.LPKernel.norm_lt_of_fourier_psiS_ne_zero`, +`Rd.LPKernel.lt_norm_of_fourier_psiS_succ_ne_zero`). -/ +theorem sum_Icc_fourier_psiS_eq_one {c : ℕ} (hb : K.b ≤ 2 ^ c * K'.a) (hb' : K'.b ≤ 2 ^ c * K.a) + {j : ℕ} {ξ : V} (h : (𝓕 (K.psiS j) : 𝓢(V, ℂ)) ξ ≠ 0) : + ∑ k ∈ Finset.Icc (j - c) (j + c), (𝓕 (K'.psiS k) : 𝓢(V, ℂ)) ξ = 1 := by + have hup : ∑ k ∈ Finset.range (j + c + 1), (𝓕 (K'.psiS k) : 𝓢(V, ℂ)) ξ = 1 := by + rw [K'.sum_range_fourier_psiS] + refine K'.fourier_kernel_inv_smul_eq_one (by positivity) ?_ + have h1 := K.norm_lt_of_fourier_psiS_ne_zero h + calc ‖ξ‖ ≤ 2 ^ j * K.b := h1.le + _ ≤ 2 ^ j * (2 ^ c * K'.a) := by gcongr + _ = 2 ^ (j + c) * K'.a := by rw [pow_add, mul_assoc] + rw [← Finset.Ico_add_one_right_eq_Icc, Finset.sum_Ico_eq_sub _ (by omega), hup] + rcases Nat.lt_or_ge c j with hcj | hcj + · obtain ⟨i, rfl⟩ : ∃ i, j = c + i + 1 := ⟨j - c - 1, by omega⟩ + rw [show c + i + 1 - c = i + 1 by omega, K'.sum_range_fourier_psiS, + K'.fourier_kernel_inv_smul_eq_zero (by positivity), sub_zero] + have h1 := K.lt_norm_of_fourier_psiS_succ_ne_zero h + calc 2 ^ i * K'.b ≤ 2 ^ i * (2 ^ c * K.a) := by gcongr + _ = 2 ^ (c + i) * K.a := by rw [pow_add]; ring + _ ≤ ‖ξ‖ := h1.le + · rw [Nat.sub_eq_zero_of_le hcj, Finset.sum_range_zero, sub_zero] + +/-- **The finite identity on the Fourier side**: `𝓕ψ_j · ∑_{k = j - c}^{j + c} 𝓕ψ'_k = 𝓕ψ_j` +under the hypotheses of `Rd.LPKernel.sum_Icc_fourier_psiS_eq_one`. -/ +theorem fourier_psiS_mul_sum_Icc {c : ℕ} (hb : K.b ≤ 2 ^ c * K'.a) (hb' : K'.b ≤ 2 ^ c * K.a) + (j : ℕ) (ξ : V) : + (𝓕 (K.psiS j) : 𝓢(V, ℂ)) ξ * + ∑ k ∈ Finset.Icc (j - c) (j + c), (𝓕 (K'.psiS k) : 𝓢(V, ℂ)) ξ = + (𝓕 (K.psiS j) : 𝓢(V, ℂ)) ξ := by + by_cases h : (𝓕 (K.psiS j) : 𝓢(V, ℂ)) ξ = 0 + · rw [h, zero_mul] + · rw [K.sum_Icc_fourier_psiS_eq_one K' hb hb' h, mul_one] + +/-! ### The finite identity for tempered distributions -/ + +/-- **The finite identity for tempered distributions**: under the hypotheses of +`Rd.LPKernel.sum_Icc_fourier_psiS_eq_one`, for every tempered distribution `u` and every `j`, +`Δ_j u = ∑_{k = j - c}^{j + c} (𝓕ψ_j)(D) Δ'_k u`, with the blocks `Δ_j` of `K` and `Δ'_k` of +`K'`. Both sides are Fourier multipliers of `u` (Mathlib's +`TemperedDistribution.fourierMultiplierCLM_fourierMultiplierCLM_apply`, +`TemperedDistribution.fourierMultiplierCLM_sum`), with the same symbol by +`Rd.LPKernel.fourier_psiS_mul_sum_Icc`. -/ +theorem distribBlock_eq_sum {c : ℕ} (hb : K.b ≤ 2 ^ c * K'.a) (hb' : K'.b ≤ 2 ^ c * K.a) + (u : 𝓢'(V, ℂ)) (j : ℕ) : + K.distribBlock j u = ∑ k ∈ Finset.Icc (j - c) (j + c), + TemperedDistribution.fourierMultiplierCLM ℂ (𝓕 (K.psiS j) : 𝓢(V, ℂ)) + (K'.distribBlock k u) := by + simp only [distribBlock] + simp_rw [TemperedDistribution.fourierMultiplierCLM_fourierMultiplierCLM_apply + (𝓕 (K'.psiS _)).hasTemperateGrowth (𝓕 (K.psiS j)).hasTemperateGrowth] + rw [← sum_apply, ← TemperedDistribution.fourierMultiplierCLM_sum ℂ + fun k _ => (𝓕 (K'.psiS k)).hasTemperateGrowth.mul (𝓕 (K.psiS j)).hasTemperateGrowth] + refine congrArg (fun f => TemperedDistribution.fourierMultiplierCLM ℂ f u) (funext fun ξ => ?_) + simp only [Pi.mul_apply] + rw [← Finset.sum_mul, mul_comm, K.fourier_psiS_mul_sum_Icc K' hb hb' j ξ] + +variable {p : ℝ≥0∞} [Fact (1 ≤ p)] + +/-- **The blocks of `K` from those of `K'`**: under the hypotheses of +`Rd.LPKernel.distribBlock_eq_sum`, `1 ≤ p < ∞`, if the blocks `Δ'_k u` are `L_p` functions `g_k`, +then `Δ_j u` is the `L_p` function `∑_{k = j - c}^{j + c} ψ_j ⋆ g_k` +(`Rd.fourierMultiplierCLM_fourier_toLp_eq_conv`). -/ +theorem distribBlock_eq_sum_convLp (hp : p ≠ ∞) {c : ℕ} (hb : K.b ≤ 2 ^ c * K'.a) + (hb' : K'.b ≤ 2 ^ c * K.a) {u : 𝓢'(V, ℂ)} {g : ℕ → Lp ℂ p (volume : Measure V)} + (hg : ∀ k, K'.distribBlock k u = (g k : 𝓢'(V, ℂ))) (j : ℕ) : + K.distribBlock j u = ((∑ k ∈ Finset.Icc (j - c) (j + c), + convLp hp (K.psiS j).integrable (g k) : Lp ℂ p (volume : Measure V)) : 𝓢'(V, ℂ)) := by + rw [K.distribBlock_eq_sum K' hb hb', ← Lp.toTemperedDistributionCLM_apply, map_sum] + refine Finset.sum_congr rfl fun k _ => ?_ + rw [hg, fourierMultiplierCLM_fourier_toLp_eq_conv hp, Lp.toTemperedDistributionCLM_apply] + +/-! ### The comparison of two kernels -/ + +/-- **The pointwise bound**: let `N > n`, `c, j ∈ ℕ` and `s` real. For every family +`g_k : V → ℂ` and every `x`, +`2^{js} |∑_{k = j - c}^{j + c} (ψ_j ⋆ g_k)(x)| ≤ 2^{c|s|} C_{n,N} C_{A,0,N} ∑_k M(2^{ks} |g_k|)(x)` +with the bounds `A = K.baseBound` of the bases of `K`: the convolutions lie below the maximal +function (`Rd.IsUniformSchwartz.enorm_conv_dilate_le_maximal`), and every `k` in the window has +`|j - k| ≤ c`, so `2^{js} ≤ 2^{c|s|} 2^{ks}` (`ENNReal.dyadicWeight_le_of_mem_Icc`). -/ +theorem dyadicWeight_mul_enorm_sum_conv_le {N : ℕ} (hN : finrank ℝ V < N) (c : ℕ) (s : ℝ) + (j : ℕ) (g : ℕ → V → ℂ) (x : V) : + dyadicWeight s j * ‖∑ k ∈ Finset.Icc (j - c) (j + c), conv (K.psiS j) (g k) volume x‖ₑ ≤ + dyadicWeight |s| c * (decayMaximalConst V N * familyDecayConst K.baseBound 0 N) * + ∑ k ∈ Finset.Icc (j - c) (j + c), + maximal (fun y => dyadicWeight s k * ‖g k y‖ₑ) x := by + set D := decayMaximalConst V N * familyDecayConst K.baseBound 0 N + calc dyadicWeight s j * ‖∑ k ∈ Finset.Icc (j - c) (j + c), conv (K.psiS j) (g k) volume x‖ₑ + ≤ ∑ k ∈ Finset.Icc (j - c) (j + c), + dyadicWeight s j * (D * maximal (fun y => ‖g k y‖ₑ) x) := by + rw [← Finset.mul_sum] + refine mul_le_mul_of_nonneg_left ((eNorm_sum_le _ _).trans + (Finset.sum_le_sum fun k _ => ?_)) (zero_le (a := dyadicWeight s j)) + rw [K.coe_psiS] + exact K.isUniformSchwartz_base.enorm_conv_dilate_le_maximal hN j _ x + _ ≤ ∑ k ∈ Finset.Icc (j - c) (j + c), + dyadicWeight |s| c * dyadicWeight s k * (D * maximal (fun y => ‖g k y‖ₑ) x) := + Finset.sum_le_sum fun k hk => mul_le_mul_of_nonneg_right + (ENNReal.dyadicWeight_le_of_mem_Icc s hk) (zero_le (a := D * _)) + _ = _ := by + rw [Finset.mul_sum] + refine Finset.sum_congr rfl fun k _ => ?_ + rw [← dyadicWeight_mul_maximal] + ring + +/-- The **comparison constant** `2^{c|s|} C_{n,N} C_{A,0,N} (2c + 1)` of two kernels, with the +window `c`, `N > n` and the bounds `A = K.baseBound` of the bases of `K`. -/ +noncomputable def comparisonConst (N c : ℕ) (s : ℝ) : ℝ≥0∞ := + dyadicWeight |s| c * (decayMaximalConst V N * familyDecayConst K.baseBound 0 N) * (2 * c + 1) + +/-- The comparison constant is finite for `N > n`. -/ +theorem comparisonConst_ne_top {N : ℕ} (hN : finrank ℝ V < N) (c : ℕ) (s : ℝ) : + K.comparisonConst N c s ≠ ∞ := + ENNReal.mul_ne_top (ENNReal.mul_ne_top (ENNReal.dyadicWeight_ne_top _ _) + (decayMaximalConst_mul_familyDecayConst_ne_top hN _)) (by finiteness) + +/-- **The comparison for one family of blocks**: let `1 < p < ∞`, `1 < q ≤ ∞`, `N > n` and +`b ≤ 2^c a'`, `b' ≤ 2^c a`. If the blocks of `u` for `K'` are `L_p` functions `g_k`, then +`‖u‖_{F^s_{p,q}, K} ≤ C C_{FS} ‖ x ↦ ‖(2^{ks} |g_k(x)|)_k‖_{ℓ_q} ‖_p` with the comparison constant +`C = K.comparisonConst N c s` and the Fefferman–Stein constant `C_{FS}`. The blocks of `u` for `K` +are window sums of convolutions of the `g_k` (`Rd.LPKernel.distribBlock_eq_sum_convLp`), bounded +pointwise by maximal functions (`Rd.LPKernel.dyadicWeight_mul_enorm_sum_conv_le`); the window +sums cost `2c + 1` in `ℓ_q` (`ENNReal.lqNorm_sum_Icc_le`), and +`Rd.eLpNorm_le_of_le_lqNorm_maximal` finishes. -/ +theorem triebelLizorkinNormDistr_le_of_blocks (hp1 : 1 < p) (hp : p ≠ ∞) {q : ℝ≥0∞} + (hq1 : 1 < q) {N : ℕ} (hN : finrank ℝ V < N) {c : ℕ} (hb : K.b ≤ 2 ^ c * K'.a) + (hb' : K'.b ≤ 2 ^ c * K.a) (s : ℝ) {u : 𝓢'(V, ℂ)} {g : ℕ → Lp ℂ p (volume : Measure V)} + (hg : ∀ k, K'.distribBlock k u = (g k : 𝓢'(V, ℂ))) : + K.triebelLizorkinNormDistr p s q u ≤ K.comparisonConst N c s * feffermanSteinConst V p q * + eLpNorm (fun x => lqNorm q fun k => dyadicWeight s k * ‖g k x‖ₑ) p volume := by + set h : ℕ → Lp ℂ p (volume : Measure V) := fun j => + ∑ k ∈ Finset.Icc (j - c) (j + c), convLp hp (K.psiS j).integrable (g k) with hh + have hae : ∀ j, ⇑(h j) =ᵐ[volume] + fun x => ∑ k ∈ Finset.Icc (j - c) (j + c), conv (K.psiS j) (g k) volume x := fun j => + coeFn_sum_convLp_ae hp (fun _ => K.psiS j) g _ + refine (K.triebelLizorkinNormDistr_le (g := h) + (K.distribBlock_eq_sum_convLp K' hp hb hb' hg)).trans ?_ + refine eLpNorm_le_of_le_lqNorm_maximal hp1 hp hq1 (aemeasurable_lqNorm_dyadicWeight_Lp _ q _) + (fun k => ((Lp.aestronglyMeasurable (g k)).eNorm.const_mul _)) ?_ + filter_upwards [ae_all_iff.2 hae] with x hx + simp_rw [hx] + calc lqNorm q (fun j => dyadicWeight s j * + ‖∑ k ∈ Finset.Icc (j - c) (j + c), conv (K.psiS j) (g k) volume x‖ₑ) + ≤ lqNorm q (fun j => dyadicWeight |s| c * + (decayMaximalConst V N * familyDecayConst K.baseBound 0 N) * + ∑ k ∈ Finset.Icc (j - c) (j + c), + maximal (fun y => dyadicWeight s k * ‖g k y‖ₑ) x) := + ENNReal.lqNorm_mono fun j => K.dyadicWeight_mul_enorm_sum_conv_le hN c s j _ x + _ ≤ dyadicWeight |s| c * (decayMaximalConst V N * familyDecayConst K.baseBound 0 N) * + ((2 * c + 1) * lqNorm q (fun k => maximal (fun y => dyadicWeight s k * ‖g k y‖ₑ) x)) := by + rw [ENNReal.lqNorm_const_mul] + exact mul_le_mul_of_nonneg_left (ENNReal.lqNorm_sum_Icc_le hq1.le c _) (zero_le (a := _)) + _ = _ := by rw [comparisonConst, mul_assoc _ (2 * c + 1 : ℝ≥0∞)] + +/-- **Any two admissible kernels give equivalent quasi-norms, with explicit constant**: let +`1 < p < ∞`, `1 < q ≤ ∞`, `N > n` and `b ≤ 2^c a'`, `b' ≤ 2^c a`. For every tempered distribution +`u`, `‖u‖_{F^s_{p,q}, K} ≤ max(1, C C_{FS}) ‖u‖_{F^s_{p,q}, K'}` with the comparison constant +`C = K.comparisonConst N c s` and the Fefferman–Stein constant `C_{FS}` +(`Rd.LPKernel.triebelLizorkinNormDistr_le_of_blocks` for every family of `L_p` functions +representing the blocks of `u` for `K'`, and `Rd.LPKernel.le_mul_triebelLizorkinNormDistr`). -/ +theorem triebelLizorkinNormDistr_le_mul (hp1 : 1 < p) (hp : p ≠ ∞) {q : ℝ≥0∞} (hq1 : 1 < q) + {N : ℕ} (hN : finrank ℝ V < N) {c : ℕ} (hb : K.b ≤ 2 ^ c * K'.a) (hb' : K'.b ≤ 2 ^ c * K.a) + (s : ℝ) (u : 𝓢'(V, ℂ)) : + K.triebelLizorkinNormDistr p s q u ≤ + max 1 (K.comparisonConst N c s * feffermanSteinConst V p q) * + K'.triebelLizorkinNormDistr p s q u := by + refine K'.le_mul_triebelLizorkinNormDistr (zero_lt_one.trans_le (le_max_left _ _)).ne' + fun g hg => ?_ + refine (K.triebelLizorkinNormDistr_le_of_blocks K' hp1 hp hq1 hN hb hb' s hg).trans ?_ + exact mul_le_mul_of_nonneg_right (le_max_right _ _) (zero_le (a := _)) + +/-- **Any two admissible kernels give equivalent quasi-norms**: for admissible kernels `K`, `K'`, +`1 < p < ∞`, `1 < q ≤ ∞` and every real `s` there is a finite constant `C` with +`‖u‖_{F^s_{p,q}, K} ≤ C ‖u‖_{F^s_{p,q}, K'}` for every tempered distribution `u` +(`Rd.LPKernel.triebelLizorkinNormDistr_le_mul` with a window from `Rd.LPKernel.exists_window` and +`N = n + 1`). Exchanging `K` and `K'` gives the converse. -/ +theorem exists_triebelLizorkinNormDistr_le (hp1 : 1 < p) (hp : p ≠ ∞) {q : ℝ≥0∞} (hq1 : 1 < q) + (s : ℝ) : + ∃ C : ℝ≥0∞, C ≠ ∞ ∧ ∀ u : 𝓢'(V, ℂ), + K.triebelLizorkinNormDistr p s q u ≤ C * K'.triebelLizorkinNormDistr p s q u := by + obtain ⟨c, hb, hb'⟩ := K.exists_window K' + have hN : finrank ℝ V < finrank ℝ V + 1 := Nat.lt_succ_self _ + exact ⟨max 1 (K.comparisonConst (finrank ℝ V + 1) c s * feffermanSteinConst V p q), + max_ne_top ENNReal.one_ne_top (ENNReal.mul_ne_top (K.comparisonConst_ne_top hN c s) + (feffermanSteinConst_ne_top hp1 hp hq1)), + K.triebelLizorkinNormDistr_le_mul K' hp1 hp hq1 hN hb hb' s⟩ + +/-- **Every admissible kernel gives the same spaces of tempered distributions**: for `1 < p < ∞`, +`1 < q ≤ ∞` and every real `s`, a tempered distribution has finite quasi-norm for the kernel `K` +iff it lies in `F^s_{p,q}` of the project (`Rd.LPKernel.exists_triebelLizorkinNormDistr_le` for +`K` and `Rd.LPKernel.standard` in both orders). -/ +theorem memTriebelLizorkinDistr_iff (hp1 : 1 < p) (hp : p ≠ ∞) {q : ℝ≥0∞} (hq1 : 1 < q) + (s : ℝ) (u : 𝓢'(V, ℂ)) : + K.triebelLizorkinNormDistr p s q u < ∞ ↔ MemTriebelLizorkinDistr p s q u := by + rw [MemTriebelLizorkinDistr, ← standard_triebelLizorkinNormDistr] + obtain ⟨C, hC, h⟩ := K.exists_triebelLizorkinNormDistr_le (standard V) hp1 hp hq1 s + obtain ⟨C', hC', h'⟩ := (standard V).exists_triebelLizorkinNormDistr_le K hp1 hp hq1 s + exact ⟨fun hu => (h' u).trans_lt (ENNReal.mul_lt_top hC'.lt_top hu), + fun hu => (h u).trans_lt (ENNReal.mul_lt_top hC.lt_top hu)⟩ + +/-- **Every admissible kernel gives the same spaces of `L_p` functions**: for `1 < p < ∞`, +`1 < q ≤ ∞`, every real `s` and `f ∈ L_p(V)`, +`‖ x ↦ ‖(2^{js} |(ψ'_j ⋆ f)(x)|)_j‖_{ℓ_q} ‖_p < ∞` iff `f ∈ F^s_{p,q}` +(`Rd.LPKernel.memTriebelLizorkinDistr_iff`, +`Rd.LPKernel.triebelLizorkinNormDistr_toTemperedDistribution`, +`Rd.memTriebelLizorkinDistr_toTemperedDistribution_iff`). -/ +theorem memTriebelLizorkin_iff (hp1 : 1 < p) (hp : p ≠ ∞) {q : ℝ≥0∞} (hq1 : 1 < q) (s : ℝ) + (f : Lp ℂ p (volume : Measure V)) : + K.triebelLizorkinNorm s q f < ∞ ↔ MemTriebelLizorkin s q f := by + rw [← K.triebelLizorkinNormDistr_toTemperedDistribution hp, K.memTriebelLizorkinDistr_iff hp1 hp + hq1, memTriebelLizorkinDistr_toTemperedDistribution_iff hp] + +/-- **Equivalent quasi-norms on `L_p`**: for admissible kernels `K`, `K'`, `1 < p < ∞`, +`1 < q ≤ ∞` and every real `s` there is a finite constant `C` with +`‖f‖_{F^s_{p,q}, K} ≤ C ‖f‖_{F^s_{p,q}, K'}` for every `f ∈ L_p(V)` +(`Rd.LPKernel.exists_triebelLizorkinNormDistr_le`). For `K' = Rd.LPKernel.standard` the right side +is the quasi-norm `Rd.triebelLizorkinNorm` of the project +(`Rd.LPKernel.standard_triebelLizorkinNorm`). -/ +theorem exists_triebelLizorkinNorm_le (hp1 : 1 < p) (hp : p ≠ ∞) {q : ℝ≥0∞} (hq1 : 1 < q) + (s : ℝ) : + ∃ C : ℝ≥0∞, C ≠ ∞ ∧ ∀ f : Lp ℂ p (volume : Measure V), + K.triebelLizorkinNorm s q f ≤ C * K'.triebelLizorkinNorm s q f := by + obtain ⟨C, hC, h⟩ := K.exists_triebelLizorkinNormDistr_le K' hp1 hp hq1 s + refine ⟨C, hC, fun f => ?_⟩ + have hf := h f + rwa [K.triebelLizorkinNormDistr_toTemperedDistribution hp, + K'.triebelLizorkinNormDistr_toTemperedDistribution hp] at hf + +end LPKernel + +end Rd diff --git a/LeanPool/FunctionSpaces/Rd/TriebelLizorkin/SquareFunction.lean b/LeanPool/FunctionSpaces/Rd/TriebelLizorkin/SquareFunction.lean new file mode 100644 index 0000000000..e9904a24e3 --- /dev/null +++ b/LeanPool/FunctionSpaces/Rd/TriebelLizorkin/SquareFunction.lean @@ -0,0 +1,173 @@ +/- +Copyright (c) 2026 Mario Ullrich. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Mario Ullrich +-/ +module + +public import LeanPool.FunctionSpaces.Rd.SingularIntegrals.VectorValuedSingularIntegrals +public import LeanPool.FunctionSpaces.Rd.TriebelLizorkin.TriebelLizorkin + +/- +Modified for Lean Pool: module names and imports adapted. +-/ + +/-! +# The square function theorem `L_p = F^0_{p,2}` + +Let `V` have dimension `n ≥ 1` and `1 < p < ∞`. The **square function** of `f ∈ L_p(V)` is +`x ↦ ‖((ψ_j ⋆ f)(x))_j‖_{ℓ_2}`, and its `L_p` norm is the Triebel–Lizorkin norm +`‖f‖_{F^0_{p,2}}` by definition (`Rd.triebelLizorkinNorm_zero_left`). The square +function theorem is the two-sided bound of this norm by `‖f‖_p`, with named constants, +formulas in the Schwartz seminorms of the fixed blocks and synthesis kernels that are proved +finite (`Rd.squareFunctionConst_ne_top`, `Rd.squareSynthesisConst_ne_top`): + +* `‖f‖_{F^0_{p,2}} ≤ Q_{V,p} ‖f‖_p` (`Rd.triebelLizorkinNorm_zero_two_le`, constant + `Rd.squareFunctionConst`): the analysis bound of the Calderón–Zygmund family `(ψ_j)_j`; +* `‖f‖_p ≤ Q̃_{V,p} ‖f‖_{F^0_{p,2}}` (`Rd.enorm_le_triebelLizorkinNorm_zero_two`, constant + `Rd.squareSynthesisConst`): the reproducing formula + `∑_{j < J} psiDual_j ⋆ (ψ_j ⋆ f) = ∑_{j < J} Δ_j f` almost everywhere, and these partial + sums tend to `f` in `L_p` (`Rd.sum_conv_psiDual_blockFun_ae`, + `Rd.tendsto_eLpNorm_sum_conv_psiDual_blockFun_sub`), and the synthesis bound of the + Calderón–Zygmund family `(psiDual_j)_j`. + +By the upper bound every `f ∈ L_p(V)` lies in `F^0_{p,2}` (`Rd.memTriebelLizorkin_zero_two`), so +the subspace `F^0_{p,2}` of `L_p(V)` is all of `L_p(V)` +(`Rd.triebelLizorkinSpace_zero_two_eq_top`). With the Besov sandwich of `F^s_{p,2}` for `s > 0`, +every `f` in the Besov space `B^s_{p,min(p,2)}` lies in `F^s_{p,2}` for every `s ≥ 0` +(`Rd.memTriebelLizorkin_two_of_memApprox`). +-/ + +@[expose] public section + +open MeasureTheory Filter +open scoped ENNReal Topology +open ENNReal (lqNorm) + +namespace Rd + +variable {V : Type*} [NormedAddCommGroup V] [InnerProductSpace ℝ V] [FiniteDimensional ℝ V] + [MeasurableSpace V] [BorelSpace V] {p : ℝ≥0∞} [Fact (1 ≤ p)] + +/-! ### The constants -/ + +variable (V) in +/-- The constant `Q_{V,p}` of the **upper square function bound** +`‖f‖_{F^0_{p,2}} ≤ Q_{V,p} ‖f‖_p`: the strong type constant `Rd.czConst` of the +Calderón–Zygmund family of the blocks `ψ_j`, with overlap `2` and Hörmander constant +`4 H_{A^ψ}`, where `A^ψ = Rd.psiBaseBound V` (`Rd.isCZFamily_psi`). -/ +noncomputable def squareFunctionConst (p : ℝ≥0∞) : ℝ≥0∞ := + czConst V p 2 (4 * familyHormanderConst V (psiBaseBound V)) + +/-- The constant `Rd.squareFunctionConst V p` is finite for `1 < p < ∞`. -/ +theorem squareFunctionConst_ne_top {p : ℝ≥0∞} (hp1 : 1 < p) (hp : p ≠ ∞) : + squareFunctionConst V p ≠ ∞ := + czConst_ne_top hp1 hp ENNReal.ofNat_ne_top + (ENNReal.mul_ne_top ENNReal.ofNat_ne_top (familyHormanderConst_ne_top _)) + +variable (V) in +/-- The constant `Q̃_{V,p}` of the **lower square function bound** +`‖f‖_p ≤ Q̃_{V,p} ‖f‖_{F^0_{p,2}}`: the strong type constant `Rd.czConst` of the +Calderón–Zygmund family of the synthesis kernels `psiDual_j`, with overlap `4` and Hörmander +constant `4 H_{Ã}`, where `Ã = Rd.psiDualBaseBound V` (`Rd.isCZFamily_psiDual`). -/ +noncomputable def squareSynthesisConst (p : ℝ≥0∞) : ℝ≥0∞ := + czConst V p 4 (4 * familyHormanderConst V (psiDualBaseBound V)) + +/-- The constant `Rd.squareSynthesisConst V p` is finite for `1 < p < ∞`. -/ +theorem squareSynthesisConst_ne_top {p : ℝ≥0∞} (hp1 : 1 < p) (hp : p ≠ ∞) : + squareSynthesisConst V p ≠ ∞ := + czConst_ne_top hp1 hp ENNReal.ofNat_ne_top + (ENNReal.mul_ne_top ENNReal.ofNat_ne_top (familyHormanderConst_ne_top _)) + +/-! ### The square function -/ + +/-- **The upper square function bound**: in dimension `n ≥ 1`, for `1 < p < ∞` and +`f ∈ L_p(V)`, `‖f‖_{F^0_{p,2}} ≤ Q_{V,p} ‖f‖_p` with `Q_{V,p} = Rd.squareFunctionConst V p`. This is +the strong type of the analysis operator of the Calderón–Zygmund family `(ψ_j)_j`. -/ +theorem triebelLizorkinNorm_zero_two_le [Nontrivial V] (hp1 : 1 < p) (hp : p ≠ ∞) + (f : Lp ℂ p (volume : Measure V)) : + triebelLizorkinNorm 0 2 f ≤ squareFunctionConst V p * ‖f‖ₑ := by + rw [triebelLizorkinNorm_zero_left, Lp.eNorm_def] + exact isCZFamily_psi.eLpNorm_lqNorm_conv_le hp1 hp (Lp.memLp f) + +/-- **`L_p ⊆ F^0_{p,2}`**: in dimension `n ≥ 1`, for `1 < p < ∞`, every `f ∈ L_p(V)` has a +finite Triebel–Lizorkin norm `‖f‖_{F^0_{p,2}}`. -/ +theorem memTriebelLizorkin_zero_two [Nontrivial V] (hp1 : 1 < p) (hp : p ≠ ∞) + (f : Lp ℂ p (volume : Measure V)) : MemTriebelLizorkin 0 2 f := + (triebelLizorkinNorm_zero_two_le hp1 hp f).trans_lt + (ENNReal.mul_lt_top (squareFunctionConst_ne_top hp1 hp).lt_top eNorm_lt_top) + +/-! ### The reproducing formula -/ + +/-- **The synthesis kernels reproduce the blocks**: for `1 ≤ p < ∞` and `f ∈ L_p(V)`, +`psiDual_j ⋆ (ψ_j ⋆ f) = ψ_j ⋆ f` almost everywhere, by associativity of convolution and +`psiDual_j ⋆ ψ_j = ψ_j` (`Rd.conv_psiDual_psi`). -/ +theorem conv_psiDual_blockFun_ae (hp : p ≠ ∞) (j : ℕ) (f : Lp ℂ p (volume : Measure V)) : + conv (psiDual j) (blockFun j f) volume =ᵐ[volume] blockFun j f := by + have h := conv_conv_ae Fact.out hp (integrable_psiDual j) (integrable_psi j) (Lp.memLp f) + rw [conv_psiDual_psi] at h + exact h.symm + +/-- **The reproducing sums**: for `1 ≤ p < ∞`, `f ∈ L_p(V)` and every finite set `s ⊆ ℕ`, +`∑_{j ∈ s} psiDual_j ⋆ (ψ_j ⋆ f) = ∑_{j ∈ s} Δ_j f` almost everywhere. -/ +theorem sum_conv_psiDual_blockFun_ae (hp : p ≠ ∞) (s : Finset ℕ) + (f : Lp ℂ p (volume : Measure V)) : + (fun x => ∑ j ∈ s, conv (psiDual j) (blockFun j f) volume x) =ᵐ[volume] + ⇑(∑ j ∈ s, lpBlock hp j f) := by + have h1 : ∀ᵐ x ∂volume, ∀ j, conv (psiDual j) (blockFun j f) volume x = blockFun j f x := + ae_all_iff.2 fun j => conv_psiDual_blockFun_ae hp j f + have h2 : ∀ᵐ x ∂volume, ∀ j, lpBlock hp j f x = blockFun j f x := + ae_all_iff.2 fun j => lpBlock_ae_eq_blockFun hp j f + filter_upwards [h1, h2, Lp.coeFn_fun_finsetSum s fun j => lpBlock hp j f] with x hx1 hx2 hx3 + rw [hx3] + exact Finset.sum_congr rfl fun j _ => (hx1 j).trans (hx2 j).symm + +/-- **The reproducing formula**: for `1 ≤ p < ∞` and `f ∈ L_p(V)`, +`∑_{j < J} psiDual_j ⋆ (ψ_j ⋆ f) → f` in `L_p(V)` as `J → ∞`, since the partial sums are the +partial sums `∑_{j < J} Δ_j f` of the Littlewood–Paley decomposition (`Rd.tendsto_sum_lpBlock`). -/ +theorem tendsto_eLpNorm_sum_conv_psiDual_blockFun_sub (hp : p ≠ ∞) + (f : Lp ℂ p (volume : Measure V)) : + Tendsto (fun J => eLpNorm ((fun x => ∑ j ∈ Finset.range J, + conv (psiDual j) (blockFun j f) volume x) - ⇑f) p volume) atTop (𝓝 0) := by + have h := (Lp.tendsto_Lp_iff_tendsto_eLpNorm' _ f).1 (tendsto_sum_lpBlock hp f) + refine h.congr fun J => eLpNorm_congr_ae ?_ + exact ((sum_conv_psiDual_blockFun_ae hp _ f).sub EventuallyEq.rfl).symm + +/-! ### The lower bound and `L_p = F^0_{p,2}` -/ + +/-- **The lower square function bound**: in dimension `n ≥ 1`, for `1 < p < ∞` and +`f ∈ L_p(V)`, `‖f‖_p ≤ Q̃_{V,p} ‖f‖_{F^0_{p,2}}` with `Q̃_{V,p} = Rd.squareSynthesisConst V p`. +The partial sums `∑_{j < J} Δ_j f` tend to `f` and equal `∑_{j < J} psiDual_j ⋆ (ψ_j ⋆ f)`, +whose `L_p` norms the synthesis bound of the Calderón–Zygmund family `(psiDual_j)_j` controls. -/ +theorem enorm_le_triebelLizorkinNorm_zero_two [Nontrivial V] (hp1 : 1 < p) (hp : p ≠ ∞) + (f : Lp ℂ p (volume : Measure V)) : + ‖f‖ₑ ≤ squareSynthesisConst V p * triebelLizorkinNorm 0 2 f := by + have h : Tendsto (fun J => ‖∑ j ∈ Finset.range J, lpBlock hp j f‖ₑ) atTop (𝓝 ‖f‖ₑ) := + (tendsto_sum_lpBlock hp f).eNorm + refine le_of_tendsto' h fun J => ?_ + rw [Lp.eNorm_def, ← eLpNorm_congr_ae (sum_conv_psiDual_blockFun_ae hp _ f), + triebelLizorkinNorm_zero_left] + exact isCZFamily_psiDual.eLpNorm_sum_conv_le hp1 hp _ fun j => memLp_blockFun hp j f + +/-- **The square function theorem `L_p = F^0_{p,2}`**: in dimension `n ≥ 1`, for `1 < p < ∞`, +the subspace `F^0_{p,2}` of `L_p(V)` is all of `L_p(V)`. The norms are equivalent by +`Rd.triebelLizorkinNorm_zero_two_le` and `Rd.enorm_le_triebelLizorkinNorm_zero_two`. -/ +theorem triebelLizorkinSpace_zero_two_eq_top [Nontrivial V] (hp1 : 1 < p) (hp : p ≠ ∞) : + triebelLizorkinSpace (V := V) hp 0 2 one_le_two = ⊤ := + Submodule.eq_top_iff'.2 fun f => memTriebelLizorkin_zero_two hp1 hp f + +/-! ### Besov spaces in `F^s_{p,2}` -/ + +/-- **`B^s_{p,min(p,2)} ⊆ F^s_{p,2}` for `s ≥ 0`**: in dimension `n ≥ 1`, for `1 < p < ∞` and +`s ≥ 0`, every `f` in the approximation space `A^s_{min(p,2)}` of the band-limited scheme lies in +`F^s_{p,2}(V)`: for `s > 0` by the Besov sandwich (`Rd.memTriebelLizorkin_of_memApprox`), for +`s = 0` since `F^0_{p,2} = L_p(V)` by the square function theorem +(`Rd.memTriebelLizorkin_zero_two`). -/ +theorem memTriebelLizorkin_two_of_memApprox [Nontrivial V] (hp1 : 1 < p) (hp : p ≠ ∞) {s : ℝ} + (hs : 0 ≤ s) {f : Lp ℂ p (volume : Measure V)} + (hf : (bandScheme hp).MemApprox s (min p 2) f) : MemTriebelLizorkin s 2 f := by + rcases hs.eq_or_lt with rfl | hs + · exact memTriebelLizorkin_zero_two hp1 hp f + · exact memTriebelLizorkin_of_memApprox hp hs one_le_two hf + +end Rd diff --git a/LeanPool/FunctionSpaces/Rd/TriebelLizorkin/TriebelLizorkin.lean b/LeanPool/FunctionSpaces/Rd/TriebelLizorkin/TriebelLizorkin.lean new file mode 100644 index 0000000000..05ff656134 --- /dev/null +++ b/LeanPool/FunctionSpaces/Rd/TriebelLizorkin/TriebelLizorkin.lean @@ -0,0 +1,458 @@ +/- +Copyright (c) 2026 Mario Ullrich. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Mario Ullrich +-/ +module + +public import LeanPool.FunctionSpaces.Rd.LittlewoodPaley.LittlewoodPaley +public import LeanPool.FunctionSpaces.Rd.Differences.BesovDifferences +public import LeanPool.FunctionSpaces.Analysis.Lp.MixedNorms + +/- +Modified for Lean Pool: module names and imports adapted. +-/ + +/-! +# Triebel–Lizorkin spaces on `V` + +For `1 ≤ p < ∞`, `s ∈ ℝ`, `1 ≤ q ≤ ∞` and `f ∈ L_p(V)`, the **Triebel–Lizorkin quasi-norm** + +`‖f‖_{F^s_{p,q}} = ‖ x ↦ ‖(2^(js) |ψ_j ⋆ f(x)|)_j‖_{ℓ_q} ‖_p` + +(`Rd.triebelLizorkinNorm`) takes the `ℓ_q` norm of the Littlewood–Paley blocks at every point +before the `L_p` norm, the reverse of the order in the Littlewood–Paley quasi-norm of the Besov +spaces (`Rd.littlewoodPaleyNorm`). The blocks are the pointwise convolutions `ψ_j ⋆ f` +(`Rd.blockFun`), bounded at every point by the weighted Jensen inequality +(`Rd.enorm_conv_le_of_enorm_le`, `Rd.enorm_blockFun_le`) with a finite constant +(`Rd.eLpNorm_psi_mul_iSup_psi_ne_top`), and they lie in `L_p` by Young's inequality +(`Rd.memLp_blockFun`, `Rd.eLpNorm_blockFun_zero_le`). The space `F^s_{p,q}` consists of the +`f` with a finite quasi-norm (`Rd.MemTriebelLizorkin`); it is a subspace of `L_p` for +`1 ≤ q ≤ ∞` (`Rd.triebelLizorkinSpace`), increasing in `q` and decreasing in `s`. Setting +terms of the weighted blocks to zero keeps them below the quasi-norm, and for `q < ∞` and +`f ∈ F^s_{p,q}` their tails `‖ x ↦ ‖(2^(js) |ψ_j ⋆ f(x)|)_{j ≥ N}‖_{ℓ_q} ‖_p` tend to zero +(`Rd.eLpNorm_lqNorm_ite_blockFun_le`, `Rd.tendsto_eLpNorm_lqNorm_blockFun_tail`). + +The mixed-norm comparisons of `FunctionSpaces.Analysis.Lp.MixedNorms` give, for every `s ∈ ℝ`, +`‖(2^(js) ‖Δ_j f‖_p)_j‖_{ℓ_{max(p,q)}} ≤ ‖f‖_{F^s_{p,q}} ≤ ‖(2^(js) ‖Δ_j f‖_p)_j‖_{ℓ_{min(p,q)}}`, +with equality for `q = p` (`Rd.littlewoodPaleyNorm_max_le_triebelLizorkinNorm`, +`Rd.triebelLizorkinNorm_le_littlewoodPaleyNorm_min`, +`Rd.triebelLizorkinNorm_eq_littlewoodPaleyNorm`). +For `s > 0` this gives: + +* `F^s_{p,p} = B^s_{p,p}` (`Rd.memTriebelLizorkin_iff_memApprox`), also described by moduli of + smoothness (`Rd.memTriebelLizorkin_iff_modulus`); +* the **Besov sandwich** `B^s_{p,min(p,q)} ⊆ F^s_{p,q} ⊆ B^s_{p,max(p,q)}`, with explicit finite + constants (`Rd.approxNormDyadic_le_triebelLizorkinNorm`, + `Rd.triebelLizorkinNorm_le_approxNormDyadic`, + `Rd.eight_mul_dyadicWeight_mul_eLpNorm_lpKernel_ne_top`, `Rd.memApprox_of_memTriebelLizorkin`, + `Rd.memTriebelLizorkin_of_memApprox`). For `q = 2`, + `F^s_{p,2}` lies between `B^s_{p,min(p,2)}` and `B^s_{p,max(p,2)}`. + +Besov spaces on `V` are the approximation spaces of the band-limited scheme (`Rd.bandScheme`). +-/ + +@[expose] public section + +open MeasureTheory +open scoped ENNReal + +namespace Rd + +open ENNReal (lqNorm dyadicWeight) + +variable {V : Type*} [NormedAddCommGroup V] [InnerProductSpace ℝ V] [FiniteDimensional ℝ V] + [MeasurableSpace V] [BorelSpace V] {p : ℝ≥0∞} [Fact (1 ≤ p)] + +/-! ### Pointwise bounds of convolutions -/ + +/-- **A bounded function has a finite supremum in `[0, ∞]`**: if the norms `‖K y‖` are bounded +above, then `sup_y ‖K y‖ₑ < ∞` (Mathlib's `ENNReal.iSup_coe_lt_top`). This is the constant `B` of +the pointwise bound of convolutions with a bounded kernel. -/ +theorem iSup_enorm_lt_top_of_bddAbove {α E : Type*} [SeminormedAddCommGroup E] {K : α → E} + (h : BddAbove (Set.range fun y => ‖K y‖)) : (⨆ y, ‖K y‖ₑ) < ∞ := by + refine ENNReal.iSup_coe_lt_top.2 ?_ + obtain ⟨A, hA⟩ := h + refine ⟨⟨max A 0, le_max_right _ _⟩, ?_⟩ + rintro _ ⟨y, rfl⟩ + exact (le_max_left _ _).trans' (hA ⟨y, rfl⟩) + +omit [Fact (1 ≤ p)] in +/-- **Pointwise bound of a convolution with a bounded kernel**: for `1 ≤ p < ∞`, a measurable +kernel `K` with `|K| ≤ B` and a measurable `f`, at every point `x`, +`|(K ⋆ f)(x)| ≤ ‖K‖_1^(1-1/p) B^(1/p) ‖f‖_p`. This is the weighted Jensen inequality with the +weight `|K|`, followed by `|K| ≤ B` and the translation invariance of `‖f‖_p`; it covers `p = 1`, +where the bound is `B ‖f‖_1`. -/ +theorem enorm_conv_le_of_enorm_le (hp1 : 1 ≤ p) (hp : p ≠ ∞) {K f : V → ℂ} + (hK : AEStronglyMeasurable K volume) {B : ℝ≥0∞} (hB : ∀ y, ‖K y‖ₑ ≤ B) + (hf : AEStronglyMeasurable f volume) (x : V) : + ‖conv K f volume x‖ₑ ≤ + eLpNorm K 1 volume ^ (1 - 1 / p.toReal) * B ^ (1 / p.toReal) * eLpNorm f p volume := by + have hp0 : p ≠ 0 := (zero_lt_one.trans_le hp1).ne' + have hr : 1 ≤ p.toReal := ENNReal.one_le_toReal_of_one_le hp1 hp + have hr0 : 0 < p.toReal := zero_lt_one.trans_le hr + have h1r : 0 ≤ 1 / p.toReal := one_div_nonneg.2 hr0.le + have hg : AEMeasurable (fun y => ‖f (x - y)‖ₑ) volume := + (hf.comp_quasiMeasurePreserving (quasiMeasurePreserving_sub_left volume x)).eNorm + have hpow : (∫⁻ y, ‖K y‖ₑ * ‖f (x - y)‖ₑ) ^ p.toReal ≤ + (∫⁻ y, ‖K y‖ₑ) ^ (p.toReal - 1) * (B * eLpNorm f p volume ^ p.toReal) := + calc (∫⁻ y, ‖K y‖ₑ * ‖f (x - y)‖ₑ) ^ p.toReal + ≤ (∫⁻ y, ‖K y‖ₑ) ^ (p.toReal - 1) * ∫⁻ y, ‖K y‖ₑ * ‖f (x - y)‖ₑ ^ p.toReal := + lintegral_mul_rpow_le hr hK.eNorm hg + _ ≤ (∫⁻ y, ‖K y‖ₑ) ^ (p.toReal - 1) * ∫⁻ y, B * ‖f (x - y)‖ₑ ^ p.toReal := by + gcongr with y + exact hB y + _ = (∫⁻ y, ‖K y‖ₑ) ^ (p.toReal - 1) * (B * eLpNorm f p volume ^ p.toReal) := by + rw [lintegral_const_mul'' B (hg.pow_const _), + lintegral_sub_left_eq_self (fun z => ‖f z‖ₑ ^ p.toReal) x, + eLpNorm_rpow_eq hf hp0 hp] + calc ‖conv K f volume x‖ₑ ≤ ∫⁻ y, ‖K y‖ₑ * ‖f (x - y)‖ₑ := enorm_conv_le_lintegral K f x + _ = ((∫⁻ y, ‖K y‖ₑ * ‖f (x - y)‖ₑ) ^ p.toReal) ^ (1 / p.toReal) := by + rw [← ENNReal.rpow_mul, mul_one_div_cancel hr0.ne', ENNReal.rpow_one] + _ ≤ ((∫⁻ y, ‖K y‖ₑ) ^ (p.toReal - 1) * (B * eLpNorm f p volume ^ p.toReal)) ^ + (1 / p.toReal) := ENNReal.rpow_le_rpow hpow h1r + _ = eLpNorm K 1 volume ^ (1 - 1 / p.toReal) * B ^ (1 / p.toReal) * eLpNorm f p volume := by + rw [ENNReal.mul_rpow_of_nonneg _ _ h1r, ENNReal.mul_rpow_of_nonneg _ _ h1r, + ← ENNReal.rpow_mul, ← ENNReal.rpow_mul, mul_one_div_cancel hr0.ne', ENNReal.rpow_one, + eLpNorm_one_eq_lintegral_eNorm, ← mul_assoc, sub_mul, one_mul, mul_one_div_cancel hr0.ne'] + exact hK + +/-! ### The blocks at every point -/ + +/-- The **Littlewood–Paley block at every point**, `x ↦ (ψ_j ⋆ f)(x)`, the convolution integral +of the kernel `ψ_j` with a representative of `f ∈ L_p`. Its class in `L_p` is the block +`Rd.lpBlock` (`Rd.lpBlock_ae_eq_blockFun`). -/ +noncomputable def blockFun (j : ℕ) (f : Lp ℂ p (volume : Measure V)) : V → ℂ := + conv (psi j) f volume + +/-- The block `Δ_j f ∈ L_p` is represented by the pointwise convolution `ψ_j ⋆ f`. -/ +theorem lpBlock_ae_eq_blockFun (hp : p ≠ ∞) (j : ℕ) (f : Lp ℂ p (volume : Measure V)) : + lpBlock hp j f =ᵐ[volume] blockFun j f := + convLp_apply_ae hp (integrable_psi j) f + +omit [Fact (1 ≤ p)] in +/-- The pointwise blocks are measurable. -/ +theorem aestronglyMeasurable_blockFun (j : ℕ) (f : Lp ℂ p (volume : Measure V)) : + AEStronglyMeasurable (blockFun j f) volume := + aestronglyMeasurable_conv (integrable_psi j).aestronglyMeasurable (Lp.aestronglyMeasurable f) + +/-- The pointwise blocks `ψ_j ⋆ f` of `f ∈ L_p(V)` lie in `L_p(V)`, for `1 ≤ p < ∞`, by Young's +inequality (`Rd.memLp_conv`). -/ +theorem memLp_blockFun (hp : p ≠ ∞) (j : ℕ) (f : Lp ℂ p (volume : Measure V)) : + MemLp (blockFun j f) p volume := + memLp_conv Fact.out hp (integrable_psi j) (Lp.memLp f) + +/-- **The first block**: `‖ψ_0 ⋆ f‖_p ≤ ‖Φ‖_1 ‖f‖_p` for `1 ≤ p < ∞`, by Young's inequality, +since `ψ_0 = Φ_0` and `‖Φ_0‖_1 = ‖Φ‖_1`. -/ +theorem eLpNorm_blockFun_zero_le (hp : p ≠ ∞) (f : Lp ℂ p (volume : Measure V)) : + eLpNorm (blockFun 0 f) p volume ≤ eLpNorm (lpKernel (V := V)) 1 volume * ‖f‖ₑ := by + rw [Lp.eNorm_def, ← eLpNorm_Phi_one 0] + exact eLpNorm_conv_le Fact.out hp (integrable_Phi 0).aestronglyMeasurable + (Lp.aestronglyMeasurable f) + +/-- `‖Δ_j f‖_p` is the `L_p` norm of the pointwise block `ψ_j ⋆ f`. -/ +theorem enorm_lpBlock_eq_eLpNorm_blockFun (hp : p ≠ ∞) (j : ℕ) + (f : Lp ℂ p (volume : Measure V)) : ‖lpBlock hp j f‖ₑ = eLpNorm (blockFun j f) p volume := by + rw [Lp.eNorm_def] + exact eLpNorm_congr_ae (lpBlock_ae_eq_blockFun hp j f) + +/-- The supremum `sup |ψ_j|` of the Littlewood–Paley kernel `ψ_j` is finite, since `ψ_j` is +bounded (`Rd.bddAbove_psi`). -/ +theorem iSup_enorm_psi_lt_top (j : ℕ) : (⨆ y, ‖psi (V := V) j y‖ₑ) < ∞ := + iSup_enorm_lt_top_of_bddAbove (bddAbove_psi j) + +/-- The constant `‖ψ_j‖_1^(1-1/p) (sup |ψ_j|)^(1/p)` of the pointwise bound of the blocks is +finite for `1 ≤ p < ∞`, since `ψ_j` is integrable (`Rd.integrable_psi`) and bounded +(`Rd.iSup_enorm_psi_lt_top`). -/ +theorem eLpNorm_psi_mul_iSup_psi_ne_top (hp : p ≠ ∞) (j : ℕ) : + eLpNorm (psi (V := V) j) 1 volume ^ (1 - 1 / p.toReal) * + (⨆ y, ‖psi (V := V) j y‖ₑ) ^ (1 / p.toReal) ≠ ∞ := by + have hr : 1 ≤ p.toReal := ENNReal.one_le_toReal_of_one_le Fact.out hp + have h1r : 0 ≤ 1 / p.toReal := one_div_nonneg.2 (zero_le_one.trans hr) + have h1r' : 0 ≤ 1 - 1 / p.toReal := + sub_nonneg.2 ((one_div_le_one_div_of_le zero_lt_one hr).trans_eq one_div_one) + exact ENNReal.mul_ne_top + (ENNReal.rpow_ne_top_of_nonneg h1r' + (memLp_one_iff_integrable.2 (integrable_psi j)).eLpNorm_lt_top.ne) + (ENNReal.rpow_ne_top_of_nonneg h1r (iSup_enorm_psi_lt_top j).ne) + +/-- **The blocks are bounded at every point**: for `1 ≤ p < ∞`, +`|(ψ_j ⋆ f)(x)| ≤ ‖ψ_j‖_1^(1-1/p) (sup |ψ_j|)^(1/p) ‖f‖_p`, with a finite constant +(`Rd.eLpNorm_psi_mul_iSup_psi_ne_top`). -/ +theorem enorm_blockFun_le (hp : p ≠ ∞) (j : ℕ) (f : Lp ℂ p (volume : Measure V)) (x : V) : + ‖blockFun j f x‖ₑ ≤ eLpNorm (psi (V := V) j) 1 volume ^ (1 - 1 / p.toReal) * + (⨆ y, ‖psi (V := V) j y‖ₑ) ^ (1 / p.toReal) * ‖f‖ₑ := by + rw [Lp.eNorm_def] + exact enorm_conv_le_of_enorm_le Fact.out hp (integrable_psi j).aestronglyMeasurable + (fun y => le_iSup (fun y => ‖psi (V := V) j y‖ₑ) y) (Lp.aestronglyMeasurable f) x + +/-- The block of a sum is the sum of the blocks, almost everywhere and for all levels at once. -/ +theorem blockFun_add_ae (hp : p ≠ ∞) (f g : Lp ℂ p (volume : Measure V)) : + ∀ᵐ x ∂volume, ∀ j, blockFun j (f + g) x = blockFun j f x + blockFun j g x := by + rw [ae_all_iff] + intro j + have h : blockFun j (f + g) = conv (psi j) (⇑f + ⇑g) volume := conv_congr_ae (Lp.coeFn_add f g) + rw [h] + exact conv_add_ae Fact.out hp (integrable_psi j) (Lp.memLp f) (Lp.memLp g) + +omit [Fact (1 ≤ p)] in +/-- The block of a complex multiple is the multiple of the block, at every point. -/ +theorem blockFun_smul (j : ℕ) (c : ℂ) (f : Lp ℂ p (volume : Measure V)) (x : V) : + blockFun j (c • f) x = c * blockFun j f x := by + have h : blockFun j (c • f) = conv (psi j) (c • ⇑f) volume := conv_congr_ae (Lp.coeFn_smul c f) + rw [h, conv_smul] + rfl + +omit [Fact (1 ≤ p)] in +/-- The blocks of two `L_p` classes with almost everywhere equal representatives agree at every +point, for possibly different exponents (`Rd.conv_congr_ae`). -/ +theorem blockFun_eq_of_ae_eq {r : ℝ≥0∞} {f : Lp ℂ p (volume : Measure V)} + {g : Lp ℂ r (volume : Measure V)} (h : (g : V → ℂ) =ᵐ[volume] f) (j : ℕ) : + blockFun j g = blockFun j f := + conv_congr_ae h + +/-! ### The Triebel–Lizorkin quasi-norm -/ + +/-- The **Triebel–Lizorkin quasi-norm** `‖ x ↦ ‖(2^(js) |ψ_j ⋆ f(x)|)_j‖_{ℓ_q} ‖_p` of +`f ∈ L_p`: the `ℓ_q` norm of the weighted blocks at each point, then the `L_p` norm. The +Littlewood–Paley quasi-norm of the Besov spaces (`Rd.littlewoodPaleyNorm`) takes the two norms in +the other order. For `q = 0` the quasi-norm is `0`; the results assume `1 ≤ q`. -/ +noncomputable def triebelLizorkinNorm (s : ℝ) (q : ℝ≥0∞) (f : Lp ℂ p (volume : Measure V)) : + ℝ≥0∞ := + eLpNorm (fun x => lqNorm q (fun j => dyadicWeight s j * ‖blockFun j f x‖ₑ)) p volume + +/-- `f ∈ F^s_{p,q}`: the Triebel–Lizorkin quasi-norm of `f` is finite. The space is defined +directly by this quasi-norm, which is why it has a predicate of its own beside the approximation +spaces that describe the Besov spaces. -/ +def MemTriebelLizorkin (s : ℝ) (q : ℝ≥0∞) (f : Lp ℂ p (volume : Measure V)) : Prop := + triebelLizorkinNorm s q f < ∞ + +omit [Fact (1 ≤ p)] in +/-- The pointwise `ℓ_q` norm of the weighted blocks is measurable. -/ +theorem aemeasurable_lqNorm_blockFun (s : ℝ) (q : ℝ≥0∞) (f : Lp ℂ p (volume : Measure V)) : + AEMeasurable (fun x => lqNorm q (fun j => dyadicWeight s j * ‖blockFun j f x‖ₑ)) volume := + aemeasurable_lqNorm_comp (fun j => (aestronglyMeasurable_blockFun j f).eNorm.const_mul _) q + +/-- **The quasi-norm is subadditive**: for `1 ≤ q ≤ ∞`, +`‖f + g‖_{F^s_{p,q}} ≤ ‖f‖_{F^s_{p,q}} + ‖g‖_{F^s_{p,q}}`, by the triangle inequalities in +`ℓ_q` at every point and in `L_p`. -/ +theorem triebelLizorkinNorm_add_le (hp : p ≠ ∞) {s : ℝ} {q : ℝ≥0∞} (hq : 1 ≤ q) + (f g : Lp ℂ p (volume : Measure V)) : + triebelLizorkinNorm s q (f + g) ≤ triebelLizorkinNorm s q f + triebelLizorkinNorm s q g := + eLpNorm_lqNorm_le_add Fact.out hq + (fun j => (aestronglyMeasurable_blockFun j (f + g)).eNorm.const_mul _) <| by + filter_upwards [blockFun_add_ae hp f g] with x hx j + rw [hx j, ← mul_add] + gcongr + exact eNorm_add_le _ _ + +omit [Fact (1 ≤ p)] in +/-- **The quasi-norm is homogeneous**: `‖c f‖_{F^s_{p,q}} = |c| ‖f‖_{F^s_{p,q}}` for `c ∈ ℂ`. -/ +theorem triebelLizorkinNorm_smul (s : ℝ) (q : ℝ≥0∞) (c : ℂ) (f : Lp ℂ p (volume : Measure V)) : + triebelLizorkinNorm s q (c • f) = ‖c‖ₑ * triebelLizorkinNorm s q f := + eLpNorm_lqNorm_eq_const_mul _ (fun j => (aestronglyMeasurable_blockFun j f).eNorm.const_mul _) + (ae_of_all _ fun x j => by rw [blockFun_smul, eNorm_mul, mul_left_comm]) + +omit [Fact (1 ≤ p)] in +/-- The zero function has quasi-norm `0`. -/ +theorem triebelLizorkinNorm_zero (s : ℝ) (q : ℝ≥0∞) : + triebelLizorkinNorm s q (0 : Lp ℂ p (volume : Measure V)) = 0 := by + simpa using triebelLizorkinNorm_smul s q (0 : ℂ) (0 : Lp ℂ p (volume : Measure V)) + +omit [Fact (1 ≤ p)] in +/-- **Smoothness `0`**: `‖f‖_{F^0_{p,q}} = ‖ x ↦ ‖((ψ_j ⋆ f)(x))_j‖_{ℓ_q} ‖_p` for every `q`, +since the weights `2^(j·0)` are `1`. -/ +theorem triebelLizorkinNorm_zero_left (q : ℝ≥0∞) (f : Lp ℂ p (volume : Measure V)) : + triebelLizorkinNorm 0 q f = + eLpNorm (fun x => lqNorm q fun j => ‖blockFun j f x‖ₑ) p volume := + eLpNorm_lqNorm_dyadicWeight_zero_left _ + +omit [Fact (1 ≤ p)] in +/-- **The quasi-norm decreases in `q`**: `‖f‖_{F^s_{p,r}} ≤ ‖f‖_{F^s_{p,q}}` for +`1 ≤ q ≤ r ≤ ∞`, since `‖·‖_{ℓ_r} ≤ ‖·‖_{ℓ_q}` at every point. -/ +theorem triebelLizorkinNorm_mono_exponent {s : ℝ} {q r : ℝ≥0∞} (hq : 1 ≤ q) (hqr : q ≤ r) + (f : Lp ℂ p (volume : Measure V)) : triebelLizorkinNorm s r f ≤ triebelLizorkinNorm s q f := + eLpNorm_lqNorm_mono_exponent (zero_lt_one.trans_le hq).ne' hqr fun j => + (aestronglyMeasurable_blockFun j f).eNorm.const_mul _ + +omit [Fact (1 ≤ p)] in +/-- **The quasi-norm increases in `s`**: `‖f‖_{F^s_{p,q}} ≤ ‖f‖_{F^t_{p,q}}` for `s ≤ t`, since +`2^(js) ≤ 2^(jt)`. -/ +theorem triebelLizorkinNorm_mono_smoothness {s t : ℝ} (hst : s ≤ t) (q : ℝ≥0∞) + (f : Lp ℂ p (volume : Measure V)) : triebelLizorkinNorm s q f ≤ triebelLizorkinNorm t q f := + eLpNorm_lqNorm_dyadicWeight_mono_smoothness hst fun j => + (aestronglyMeasurable_blockFun j f).eNorm + +omit [Fact (1 ≤ p)] in +/-- **Weighted blocks with terms set to zero**: for every predicate `P` on `ℕ`, +`‖ x ↦ ‖(1_P(j) 2^{js} |(ψ_j ⋆ f)(x)|)_j‖_{ℓ_q} ‖_p ≤ ‖f‖_{F^s_{p,q}}`, where the terms with `P j` +false are `0` (`MeasureTheory.eLpNorm_lqNorm_ite_le`). -/ +theorem eLpNorm_lqNorm_ite_blockFun_le {P : ℕ → Prop} [DecidablePred P] (s : ℝ) (q : ℝ≥0∞) + (f : Lp ℂ p (volume : Measure V)) : + eLpNorm (fun x => lqNorm q fun j => + if P j then dyadicWeight s j * ‖blockFun j f x‖ₑ else 0) p volume ≤ + triebelLizorkinNorm s q f := + eLpNorm_lqNorm_ite_le fun j => (aestronglyMeasurable_blockFun j f).eNorm.const_mul _ + +open Filter Topology in +/-- **The tails of the weighted blocks tend to zero**: for `1 ≤ p < ∞`, `0 < q < ∞`, `s ∈ ℝ` and +`f ∈ F^s_{p,q}(V)`, `‖ x ↦ ‖(2^{js} (ψ_j ⋆ f)(x))_{j ≥ N}‖_{ℓ_q} ‖_p → 0` as `N → ∞`, where the +terms `j < N` are `0` (`MeasureTheory.tendsto_eLpNorm_lqNorm_ite_le`). -/ +theorem tendsto_eLpNorm_lqNorm_blockFun_tail (hp : p ≠ ∞) {s : ℝ} {q : ℝ≥0∞} (hq0 : q ≠ 0) + (hq : q ≠ ∞) {f : Lp ℂ p (volume : Measure V)} (hf : MemTriebelLizorkin s q f) : + Tendsto (fun N => eLpNorm (fun x => lqNorm q fun j => + if N ≤ j then dyadicWeight s j * ‖blockFun j f x‖ₑ else 0) p volume) atTop (𝓝 0) := + tendsto_eLpNorm_lqNorm_ite_le (zero_lt_one.trans_le Fact.out).ne' hp hq0 hq + (fun j => (aestronglyMeasurable_blockFun j f).eNorm.const_mul _) hf.ne + +/-! ### The spaces `F^s_{p,q}` -/ + +omit [Fact (1 ≤ p)] in +/-- **`F^s_{p,q}` increases in `q`**: `F^s_{p,q} ⊆ F^s_{p,r}` for `1 ≤ q ≤ r ≤ ∞`. -/ +theorem MemTriebelLizorkin.mono_exponent {s : ℝ} {q r : ℝ≥0∞} (hq : 1 ≤ q) (hqr : q ≤ r) + {f : Lp ℂ p (volume : Measure V)} (hf : MemTriebelLizorkin s q f) : + MemTriebelLizorkin s r f := + (triebelLizorkinNorm_mono_exponent hq hqr f).trans_lt hf + +omit [Fact (1 ≤ p)] in +/-- **`F^s_{p,q}` decreases in `s`**: `F^t_{p,q} ⊆ F^s_{p,q}` for `s ≤ t`. -/ +theorem MemTriebelLizorkin.mono_smoothness {s t : ℝ} (hst : s ≤ t) {q : ℝ≥0∞} + {f : Lp ℂ p (volume : Measure V)} (hf : MemTriebelLizorkin t q f) : + MemTriebelLizorkin s q f := + (triebelLizorkinNorm_mono_smoothness hst q f).trans_lt hf + +/-- `F^s_{p,q}` is closed under addition, for `1 ≤ q ≤ ∞`. -/ +theorem MemTriebelLizorkin.add (hp : p ≠ ∞) {s : ℝ} {q : ℝ≥0∞} (hq : 1 ≤ q) + {f g : Lp ℂ p (volume : Measure V)} (hf : MemTriebelLizorkin s q f) + (hg : MemTriebelLizorkin s q g) : MemTriebelLizorkin s q (f + g) := + (triebelLizorkinNorm_add_le hp hq f g).trans_lt (ENNReal.add_lt_top.2 ⟨hf, hg⟩) + +omit [Fact (1 ≤ p)] in +/-- `F^s_{p,q}` is closed under complex multiples. -/ +theorem MemTriebelLizorkin.smul {s : ℝ} {q : ℝ≥0∞} (c : ℂ) {f : Lp ℂ p (volume : Measure V)} + (hf : MemTriebelLizorkin s q f) : MemTriebelLizorkin s q (c • f) := by + rw [MemTriebelLizorkin, triebelLizorkinNorm_smul] + exact ENNReal.mul_lt_top eNorm_lt_top hf + +/-- The **Triebel–Lizorkin space** `F^s_{p,q}` as a subspace of `L_p`, for `1 ≤ p < ∞`, `s ∈ ℝ` +and `1 ≤ q ≤ ∞`, with real scalars as `FunctionScheme.besovSpace`. -/ +noncomputable def triebelLizorkinSpace (hp : p ≠ ∞) (s : ℝ) (q : ℝ≥0∞) (hq : 1 ≤ q) : + Submodule ℝ (Lp ℂ p (volume : Measure V)) where + carrier := {f | MemTriebelLizorkin s q f} + add_mem' hf hg := hf.add hp hq hg + zero_mem' := by + simp only [Set.mem_ofPred_eq, MemTriebelLizorkin, triebelLizorkinNorm_zero] + exact ENNReal.zero_lt_top + smul_mem' r f hf := by + simp only [Set.mem_ofPred_eq] at hf ⊢ + rw [RCLike.real_smul_eq_coe_smul (K := ℂ) r f] + exact hf.smul _ + +/-- Membership in the subspace `F^s_{p,q}` is a finite Triebel–Lizorkin quasi-norm. -/ +theorem mem_triebelLizorkinSpace (hp : p ≠ ∞) {s : ℝ} {q : ℝ≥0∞} (hq : 1 ≤ q) + {f : Lp ℂ p (volume : Measure V)} : + f ∈ triebelLizorkinSpace hp s q hq ↔ MemTriebelLizorkin s q f := + Iff.rfl + +/-! ### Comparison with the Besov spaces -/ + +/-- The Littlewood–Paley quasi-norm of the Besov spaces in terms of the pointwise blocks: +`‖(2^(js) ‖Δ_j f‖_p)_j‖_{ℓ_q} = ‖(2^(js) ‖ψ_j ⋆ f‖_p)_j‖_{ℓ_q}`. -/ +theorem littlewoodPaleyNorm_eq_lqNorm_eLpNorm (hp : p ≠ ∞) (s : ℝ) (q : ℝ≥0∞) + (f : Lp ℂ p (volume : Measure V)) : + littlewoodPaleyNorm hp s q f = + lqNorm q (fun j => dyadicWeight s j * eLpNorm (blockFun j f) p volume) := by + simp only [littlewoodPaleyNorm, enorm_lpBlock_eq_eLpNorm_blockFun hp] + +/-- **For `q = p` the two quasi-norms agree**: for every `s ∈ ℝ`, +`‖f‖_{F^s_{p,p}} = ‖(2^(js) ‖Δ_j f‖_p)_j‖_{ℓ_p}`, by Tonelli's theorem (`L_p(ℓ_p) = ℓ_p(L_p)`). -/ +theorem triebelLizorkinNorm_eq_littlewoodPaleyNorm (hp : p ≠ ∞) (s : ℝ) + (f : Lp ℂ p (volume : Measure V)) : + triebelLizorkinNorm s p f = littlewoodPaleyNorm hp s p f := by + rw [littlewoodPaleyNorm_eq_lqNorm_eLpNorm] + exact eLpNorm_lqNorm_dyadicWeight_eq (zero_lt_one.trans_le Fact.out).ne' hp + fun j => aestronglyMeasurable_blockFun j f + +/-- **`F^s_{p,p} = B^s_{p,p}`**: for `1 ≤ p < ∞` and `s > 0`, `f ∈ F^s_{p,p}` iff `f` lies in the +approximation space `A^s_p` of the band-limited scheme, the Besov space `B^s_{p,p}`. -/ +theorem memTriebelLizorkin_iff_memApprox (hp : p ≠ ∞) {s : ℝ} (hs : 0 < s) + {f : Lp ℂ p (volume : Measure V)} : + MemTriebelLizorkin s p f ↔ (bandScheme hp).MemApprox s p f := by + rw [memApprox_bandScheme_iff hp hs Fact.out, MemTriebelLizorkin, + triebelLizorkinNorm_eq_littlewoodPaleyNorm hp] + +/-- **The lower bound of the Triebel–Lizorkin quasi-norm**, behind `F^s_{p,q} ⊆ B^s_{p,max(p,q)}`: +for `1 ≤ p < ∞`, `s ∈ ℝ` and `1 ≤ q ≤ ∞`, +`‖(2^(js) ‖Δ_j f‖_p)_j‖_{ℓ_{max(p,q)}} ≤ ‖f‖_{F^s_{p,q}}`. For `q = 2`: the Littlewood–Paley +quasi-norm of `B^s_{p,max(p,2)}` is at most the quasi-norm of `F^s_{p,2}`. -/ +theorem littlewoodPaleyNorm_max_le_triebelLizorkinNorm (hp : p ≠ ∞) {s : ℝ} {q : ℝ≥0∞} + (hq : 1 ≤ q) (f : Lp ℂ p (volume : Measure V)) : + littlewoodPaleyNorm hp s (max p q) f ≤ triebelLizorkinNorm s q f := by + rw [littlewoodPaleyNorm_eq_lqNorm_eLpNorm] + exact lqNorm_max_dyadicWeight_le Fact.out hp hq fun j => aestronglyMeasurable_blockFun j f + +/-- **The upper bound of the Triebel–Lizorkin quasi-norm**, behind `B^s_{p,min(p,q)} ⊆ F^s_{p,q}`: +for `1 ≤ p < ∞`, `s ∈ ℝ` and `1 ≤ q ≤ ∞`, +`‖f‖_{F^s_{p,q}} ≤ ‖(2^(js) ‖Δ_j f‖_p)_j‖_{ℓ_{min(p,q)}}`. For `q = 2`: the quasi-norm of +`F^s_{p,2}` is at most the Littlewood–Paley quasi-norm of `B^s_{p,min(p,2)}`. -/ +theorem triebelLizorkinNorm_le_littlewoodPaleyNorm_min (hp : p ≠ ∞) {s : ℝ} {q : ℝ≥0∞} + (hq : 1 ≤ q) (f : Lp ℂ p (volume : Measure V)) : + triebelLizorkinNorm s q f ≤ littlewoodPaleyNorm hp s (min p q) f := by + rw [littlewoodPaleyNorm_eq_lqNorm_eLpNorm] + exact eLpNorm_lqNorm_dyadicWeight_le_min Fact.out hp hq fun j => aestronglyMeasurable_blockFun j f + +/-- **`F^s_{p,q} ⊆ B^s_{p,max(p,q)}` with a constant**: for `1 ≤ p < ∞`, `s > 0` and +`1 ≤ q ≤ ∞`, the approximation norm of `f` in `A^s_{max(p,q)}` of the band-limited scheme is at +most `2 (1 - 2^(-s))⁻¹ ‖f‖_{F^s_{p,q}}`. -/ +theorem approxNormDyadic_le_triebelLizorkinNorm (hp : p ≠ ∞) {s : ℝ} (hs : 0 < s) {q : ℝ≥0∞} + (hq : 1 ≤ q) (f : Lp ℂ p (volume : Measure V)) : + (bandScheme hp).approxNormDyadic s (max p q) f ≤ + 2 * (1 - (2 : ℝ≥0∞) ^ (-s))⁻¹ * triebelLizorkinNorm s q f := + (approxNormDyadic_bandScheme_le hp hs (le_max_of_le_right hq) f).trans + (by gcongr; exact littlewoodPaleyNorm_max_le_triebelLizorkinNorm hp hq f) + +/-- **`B^s_{p,min(p,q)} ⊆ F^s_{p,q}` with a constant**: for `1 ≤ p < ∞`, `s ≥ 0` and +`1 ≤ q ≤ ∞`, `‖f‖_{F^s_{p,q}} ≤ 8 · 2^(3s) ‖Φ‖_1` times the approximation norm of `f` in +`A^s_{min(p,q)}` of the band-limited scheme. -/ +theorem triebelLizorkinNorm_le_approxNormDyadic (hp : p ≠ ∞) {s : ℝ} (hs : 0 ≤ s) {q : ℝ≥0∞} + (hq : 1 ≤ q) (f : Lp ℂ p (volume : Measure V)) : + triebelLizorkinNorm s q f ≤ + 8 * dyadicWeight s 3 * eLpNorm (lpKernel (V := V)) 1 volume * + (bandScheme hp).approxNormDyadic s (min p q) f := + (triebelLizorkinNorm_le_littlewoodPaleyNorm_min hp hq f).trans + (littlewoodPaleyNorm_le_approxNormDyadic hp hs (le_min Fact.out hq) f) + +/-- The constant `8 · 2^{3s} ‖Φ‖_1` of `Rd.triebelLizorkinNorm_le_approxNormDyadic` is finite. -/ +theorem eight_mul_dyadicWeight_mul_eLpNorm_lpKernel_ne_top (s : ℝ) : + 8 * dyadicWeight s 3 * eLpNorm (lpKernel (V := V)) 1 volume ≠ ∞ := + ENNReal.mul_ne_top (ENNReal.mul_ne_top ENNReal.ofNat_ne_top (ENNReal.dyadicWeight_ne_top _ _)) + eLpNorm_lpKernel_ne_top + +/-- **`F^s_{p,q} ⊆ B^s_{p,max(p,q)}`**: for `1 ≤ p < ∞`, `s > 0` and `1 ≤ q ≤ ∞`, every +`f ∈ F^s_{p,q}` lies in the approximation space `A^s_{max(p,q)}` of the band-limited scheme. For +`q = 2`: `F^s_{p,2} ⊆ B^s_{p,max(p,2)}`. -/ +theorem memApprox_of_memTriebelLizorkin (hp : p ≠ ∞) {s : ℝ} (hs : 0 < s) {q : ℝ≥0∞} + (hq : 1 ≤ q) {f : Lp ℂ p (volume : Measure V)} (hf : MemTriebelLizorkin s q f) : + (bandScheme hp).MemApprox s (max p q) f := + (memApprox_bandScheme_iff hp hs (le_max_of_le_right hq)).2 + ((littlewoodPaleyNorm_max_le_triebelLizorkinNorm hp hq f).trans_lt hf) + +/-- **`B^s_{p,min(p,q)} ⊆ F^s_{p,q}`**: for `1 ≤ p < ∞`, `s > 0` and `1 ≤ q ≤ ∞`, every `f` in +the approximation space `A^s_{min(p,q)}` of the band-limited scheme lies in `F^s_{p,q}`. For +`q = 2`: `B^s_{p,min(p,2)} ⊆ F^s_{p,2}`. -/ +theorem memTriebelLizorkin_of_memApprox (hp : p ≠ ∞) {s : ℝ} (hs : 0 < s) {q : ℝ≥0∞} + (hq : 1 ≤ q) {f : Lp ℂ p (volume : Measure V)} + (hf : (bandScheme hp).MemApprox s (min p q) f) : MemTriebelLizorkin s q f := + (triebelLizorkinNorm_le_littlewoodPaleyNorm_min hp hq f).trans_lt + ((memApprox_bandScheme_iff hp hs (le_min Fact.out hq)).1 hf) + +/-- **`F^s_{p,p}` by differences**: for `1 ≤ p < ∞` and `0 < s < r`, `f ∈ F^s_{p,p}` iff +`‖f‖_p + ‖(2^(ks) ω_r(f, 2^(-k))_p)_k‖_{ℓ_p} < ∞`. -/ +theorem memTriebelLizorkin_iff_modulus (hp : p ≠ ∞) {r : ℕ} {s : ℝ} (hs : 0 < s) (hsr : s < r) + (f : Lp ℂ p (volume : Measure V)) : + MemTriebelLizorkin s p f ↔ + ‖f‖ₑ + lqNorm p (fun k => dyadicWeight s k * lpModulus p r f k) < ∞ := by + rw [MemTriebelLizorkin, triebelLizorkinNorm_eq_littlewoodPaleyNorm hp] + exact littlewoodPaleyNorm_lt_top_iff_modulus hp hs hsr Fact.out f + +end Rd diff --git a/LeanPool/FunctionSpaces/Rd/TriebelLizorkin/TriebelLizorkinAtoms.lean b/LeanPool/FunctionSpaces/Rd/TriebelLizorkin/TriebelLizorkinAtoms.lean new file mode 100644 index 0000000000..76245bc04c --- /dev/null +++ b/LeanPool/FunctionSpaces/Rd/TriebelLizorkin/TriebelLizorkinAtoms.lean @@ -0,0 +1,804 @@ +/- +Copyright (c) 2026 Mario Ullrich. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Mario Ullrich +-/ +module + +public import LeanPool.FunctionSpaces.Rd.TriebelLizorkin.TriebelLizorkinLocalMeans + +/- +Modified for Lean Pool: module names and imports adapted. +-/ + +/-! +# Atomic decompositions of Triebel–Lizorkin spaces + +Coefficients `λ_{j,m}` of the dyadic cells `P_{j,m}` define the step functions +`x ↦ |λ_{j,m}|` for `x ∈ P_{j,m}` (`Rd.cellCoefFun`), and the sequence space `f^s_{p,q}` takes +the `ℓ_q` norm of their weighted values at each point, then the `L_p` norm: +`‖λ‖_{f^s_{p,q}} = ‖ x ↦ ‖(2^(js) |λ_{j,m_j(x)}|)_j‖_{ℓ_q} ‖_p` (`Rd.tlCoeffNorm`), where +`P_{j,m_j(x)}` is the cell of level `j` containing `x`. The atoms are the smooth atoms +`Rd.IsSmoothAtom` of order `L`, normalised in `L_∞`. + +**Atomic characterisation** (`Rd.memTriebelLizorkin_iff_atomic`): for `1 < p < ∞`, +`1 < q ≤ ∞` and `0 < s < L`, `F ∈ F^s_{p,q}` iff `F = ∑_j ∑_m λ_{j,m} a_{j,m}` with smooth atoms +of order `L` centred at the cells and `‖λ‖_{f^s_{p,q}} < ∞`. No moment conditions are needed. + +* **Synthesis** (`Rd.LocalMeansBump.tlLocalMeansNorm_le_tlCoeffNorm`). A local mean `k_i` of the + atoms of level `j ≥ i` is bounded by the coefficients of the nearby cells; for `j < i` the + moments of `k_i` and the smoothness of the atoms give the factor `2^(-(i-j)L)`. Both bounds + are maximal functions of the step functions of the coefficients + (`Rd.LocalMeansBump.ae_enorm_conv_kernel_level_le`), and the almost diagonal estimate and the + Fefferman–Stein inequality finish. The **coarse local means** are those of levels `i ≤ j`, at + most the level `j` of the atoms, and the **fine local means** those of levels `i > j`. +* **Analysis** (`Rd.LocalMeansBump.tl_atomic_decomposition`, + `Rd.LocalMeansBump.tlCoeffNorm_cellCoef_le`). The atoms of `F` are the cell atoms of + `η_j ⋆ (k_j ⋆ F)` with the coefficients `2^(jn) ∫_{P_{j,m}} |k_j ⋆ F|`, and each coefficient is + at most a multiple of `M(k_j ⋆ F)` at every point of its cell + (`Rd.cellCoefFun_le_maximal`). +-/ + +@[expose] public section + +open MeasureTheory Module Metric Filter Set +open scoped ENNReal Topology + +open ENNReal (lqNorm dyadicWeight) + +namespace ENNReal + +/-- **A series against bounds supported on some indices**: if `u_m ≤ B 1_{P(m)}` for every index +`m`, then `∑_m c_m u_m ≤ B ∑_{m : P(m)} c_m`, for every family `c_m ∈ [0, ∞]`. -/ +theorem tsum_mul_le_of_le {ι : Type*} {c u : ι → ℝ≥0∞} {B : ℝ≥0∞} {P : ι → Prop} + [DecidablePred P] (h : ∀ m, u m ≤ B * if P m then 1 else 0) : + ∑' m, c m * u m ≤ B * ∑' m, if P m then c m else 0 := by + rw [← ENNReal.tsum_mul_left] + refine tsum_le_tsum fun m => (mul_le_mul_right (h m) _).trans_eq ?_ + split_ifs <;> ring + +end ENNReal + +namespace Rd + +variable {V : Type*} [NormedAddCommGroup V] [InnerProductSpace ℝ V] [FiniteDimensional ℝ V] + [MeasurableSpace V] [BorelSpace V] + +/-! ### The sequence space `f^s_{p,q}` -/ + +/-- The **step function of the coefficients** of level `j`: at `x` the modulus `|λ_{j,m}|` of +the coefficient of the cell `P_{j,m}` of level `j` that contains `x`. -/ +noncomputable def cellCoefFun (j : ℕ) (coef : ℕ → (Fin (finrank ℝ V) → ℤ) → ℂ) (x : V) : + ℝ≥0∞ := + ‖coef j (cellIndex j x)‖ₑ + +omit [MeasurableSpace V] [BorelSpace V] in +/-- On the cell `P_{j,m}` the step function of the coefficients is `|λ_{j,m}|`. -/ +theorem cellCoefFun_of_mem {j : ℕ} {m : Fin (finrank ℝ V) → ℤ} {x : V} (hx : x ∈ cell j m) + (coef : ℕ → (Fin (finrank ℝ V) → ℤ) → ℂ) : cellCoefFun j coef x = ‖coef j m‖ₑ := by + rw [cellCoefFun, show cellIndex j x = m from hx] + +/-- The step function of the coefficients is measurable: it factors through the measurable cell +index, which takes values in a countable set. -/ +theorem measurable_cellCoefFun (j : ℕ) (coef : ℕ → (Fin (finrank ℝ V) → ℤ) → ℂ) : + Measurable (cellCoefFun (V := V) j coef) := + (measurable_of_countable fun m => ‖coef j m‖ₑ).comp (measurable_cellIndex j) + +/-- The **quasi-norm of the sequence space `f^s_{p,q}`**: +`‖λ‖_{f^s_{p,q}} = ‖ x ↦ ‖(2^(js) |λ_{j,m_j(x)}|)_j‖_{ℓ_q} ‖_p`, where `P_{j,m_j(x)}` is the cell +of level `j` containing `x`: the `ℓ_q` norm at each point, then the `L_p` norm. -/ +noncomputable def tlCoeffNorm (p : ℝ≥0∞) (s : ℝ) (q : ℝ≥0∞) + (coef : ℕ → (Fin (finrank ℝ V) → ℤ) → ℂ) : ℝ≥0∞ := + eLpNorm (fun x : V => lqNorm q (fun j => dyadicWeight s j * cellCoefFun j coef x)) p volume + +/-- The pointwise `ℓ_q` norm of the weighted step functions of the coefficients is +measurable. -/ +theorem aemeasurable_lqNorm_cellCoefFun (s : ℝ) (q : ℝ≥0∞) + (coef : ℕ → (Fin (finrank ℝ V) → ℤ) → ℂ) : + AEMeasurable (fun x : V => lqNorm q (fun j => dyadicWeight s j * cellCoefFun j coef x)) + volume := + aemeasurable_lqNorm_comp + (fun j => ((measurable_cellCoefFun j coef).const_mul _).aemeasurable) q + +/-! ### Coefficients and the maximal function -/ + +/-- **Integrals over dyadic balls by the maximal function**: +`2^(jn) ∫_{B(x, ρ 2^(-j))} g ≤ ρ^n |B_1| M g(x)` for `ρ > 0` and every `g : V → [0, ∞]`. -/ +theorem dyadicWeight_mul_setLIntegral_ball_le {ρ : ℝ} (hρ : 0 < ρ) (j : ℕ) (g : V → ℝ≥0∞) + (x : V) : + dyadicWeight (finrank ℝ V : ℝ) j * ∫⁻ y in ball x (ρ / 2 ^ j), g y ≤ + ENNReal.ofReal (ρ ^ finrank ℝ V) * volume (ball (0 : V) 1) * maximal g x := by + calc dyadicWeight (finrank ℝ V : ℝ) j * ∫⁻ y in ball x (ρ / 2 ^ j), g y + ≤ dyadicWeight (finrank ℝ V : ℝ) j * + (volume (ball (0 : V) (ρ / 2 ^ j)) * maximal g x) := by + gcongr + exact setLIntegral_ball_le_mul_maximal (by positivity) g x + _ = ENNReal.ofReal (ρ ^ finrank ℝ V) * volume (ball (0 : V) 1) * maximal g x * + (dyadicWeight (-(finrank ℝ V : ℝ)) j * dyadicWeight (finrank ℝ V : ℝ) j) := by + rw [volume_ball_div_two_pow hρ j 0] + ring + _ = _ := by rw [ENNReal.dyadicWeight_neg_mul_self, mul_one] + +/-- **Coefficients below the maximal function**: if `|λ_{j,m}| ≤ 2^(jn) ∫_{P_{j,m}} g` for every +cell of level `j`, then at every point `x` the coefficient of the cell containing `x` is at most +`(2n + 1)^n |B_1| M g(x)`, since that cell lies in `B(x, (2n + 1) 2^(-j))`. -/ +theorem cellCoefFun_le_maximal {j : ℕ} {coef : ℕ → (Fin (finrank ℝ V) → ℤ) → ℂ} + {g : V → ℝ≥0∞} + (hcoef : ∀ m, ‖coef j m‖ₑ ≤ dyadicWeight (finrank ℝ V : ℝ) j * ∫⁻ y in cell j m, g y) + (x : V) : + cellCoefFun j coef x ≤ ENNReal.ofReal ((2 * finrank ℝ V + 1) ^ finrank ℝ V) * + volume (ball (0 : V) 1) * maximal g x := by + have hsub : cell j (cellIndex j x) ⊆ ball x ((2 * finrank ℝ V + 1) / 2 ^ j) := fun y hy => by + have h1 := norm_sub_cellCenter_le hy + have h2 := norm_sub_cellCenter_le (mem_cell_cellIndex j x) + rw [mem_ball, dist_eq_norm] + calc ‖y - x‖ ≤ ‖y - cellCenter j (cellIndex j x)‖ + ‖x - cellCenter j (cellIndex j x)‖ := by + simpa only [dist_eq_norm] using dist_triangle_right y x (cellCenter j (cellIndex j x)) + _ ≤ finrank ℝ V / 2 ^ j + finrank ℝ V / 2 ^ j := add_le_add h1 h2 + _ < (2 * finrank ℝ V + 1) / 2 ^ j := by + rw [← add_div, div_lt_div_iff_of_pos_right (by positivity)] + linarith + calc cellCoefFun j coef x = ‖coef j (cellIndex j x)‖ₑ := rfl + _ ≤ dyadicWeight (finrank ℝ V : ℝ) j * ∫⁻ y in cell j (cellIndex j x), g y := hcoef _ + _ ≤ dyadicWeight (finrank ℝ V : ℝ) j * + ∫⁻ y in ball x ((2 * finrank ℝ V + 1) / 2 ^ j), g y := by + gcongr + _ ≤ _ := dyadicWeight_mul_setLIntegral_ball_le (by positivity) j g x + +/-- **A coefficient below the maximal function of the step function**: if `x` lies within +`ρ 2^(-j)` of the centre of `P_{j,m}`, then `|λ_{j,m}| ≤ (2(ρ + 1))^n M(x)`, with `M` the maximal +function of the step function of the coefficients of level `j`: the ball +`B(c_{j,m}, 2^(-j)/2)` lies in `P_{j,m}` and in `B(x, (ρ + 1) 2^(-j))`. -/ +theorem enorm_coef_le_maximal_cellCoefFun {j : ℕ} (coef : ℕ → (Fin (finrank ℝ V) → ℤ) → ℂ) + {m : Fin (finrank ℝ V) → ℤ} {ρ : ℝ} {x : V} (hx : ‖x - cellCenter j m‖ ≤ ρ / 2 ^ j) : + ‖coef j m‖ₑ ≤ ENNReal.ofReal ((2 * (ρ + 1)) ^ finrank ℝ V) * + maximal (cellCoefFun j coef) x := by + have hρ : 0 ≤ ρ := by + have h := (norm_nonneg _).trans hx + rwa [le_div_iff₀ (by positivity), zero_mul] at h + have hr : (0 : ℝ) < 1 / 2 / 2 ^ j := by positivity + have hsub : ball (cellCenter j m) (1 / 2 / 2 ^ j) ⊆ cell j m := by + have h := ball_subset_zcell (V := V) (j : ℤ) m + rwa [zcell_natCast, zcellCenter_natCast, zpow_natCast] at h + have hball : ball (cellCenter j m) (1 / 2 / 2 ^ j) ⊆ + ball x (2 * (ρ + 1) * (1 / 2 / 2 ^ j)) := fun y hy => by + rw [mem_ball, dist_eq_norm] at hy ⊢ + have h1 : 2 * (ρ + 1) * (1 / 2 / 2 ^ j) = ρ / 2 ^ j + 1 / 2 ^ j := by ring + have h2 : (1 : ℝ) / 2 / 2 ^ j = (1 / 2 ^ j) / 2 := by ring + have h3 : (0 : ℝ) < 1 / 2 ^ j := by positivity + calc ‖y - x‖ ≤ ‖y - cellCenter j m‖ + ‖x - cellCenter j m‖ := by + simpa only [dist_eq_norm] using dist_triangle_right y x (cellCenter j m) + _ < 2 * (ρ + 1) * (1 / 2 / 2 ^ j) := by rw [h1]; linarith + have hc : 0 < 2 * (ρ + 1) := by positivity + refine (ENNReal.mul_le_mul_iff_left (volume_ball_ne_zero (V := V) hr) + (volume_ball_ne_top _)).1 ?_ + calc ‖coef j m‖ₑ * volume (ball (0 : V) (1 / 2 / 2 ^ j)) + = ∫⁻ y in ball (cellCenter j m) (1 / 2 / 2 ^ j), cellCoefFun j coef y := by + rw [setLIntegral_congr_fun measurableSet_ball fun y hy => cellCoefFun_of_mem (hsub hy) coef, + setLIntegral_const, Measure.addHaar_ball_center volume (cellCenter j m)] + _ ≤ ∫⁻ y in ball x (2 * (ρ + 1) * (1 / 2 / 2 ^ j)), cellCoefFun j coef y := + lintegral_mono_set hball + _ ≤ volume (ball (0 : V) (2 * (ρ + 1) * (1 / 2 / 2 ^ j))) * maximal (cellCoefFun j coef) x := + setLIntegral_ball_le_mul_maximal (by positivity) _ x + _ = _ := by + rw [Measure.addHaar_ball_mul_of_pos volume (0 : V) hc] + ring + +/-- **The coefficients of the cells near a point**: for levels `i ≤ j` and `ρ ≥ 0`, +`2^(-jn) ∑_{m : |x - c_{j,m}| ≤ ρ 2^(-i)} |λ_{j,m}| ≤ (ρ + n + 1)^n |B_1| 2^(-in) M(x)`, with `M` +the maximal function of the step function of the coefficients of level `j`: these cells lie in +`B(x, (ρ + n + 1) 2^(-i))`, and `2^(-jn) |λ_{j,m}|` is the integral of the step function over +`P_{j,m}`. -/ +theorem dyadicWeight_mul_tsum_ite_le_maximal {i j : ℕ} (hij : i ≤ j) + (coef : ℕ → (Fin (finrank ℝ V) → ℤ) → ℂ) {ρ : ℝ} (hρ : 0 ≤ ρ) (x : V) : + dyadicWeight (-(finrank ℝ V : ℝ)) j * + ∑' m, (if ‖x - cellCenter j m‖ ≤ ρ / 2 ^ i then ‖coef j m‖ₑ else 0) ≤ + ENNReal.ofReal ((ρ + finrank ℝ V + 1) ^ finrank ℝ V) * volume (ball (0 : V) 1) * + dyadicWeight (-(finrank ℝ V : ℝ)) i * maximal (cellCoefFun j coef) x := by + set r : ℝ := (ρ + finrank ℝ V + 1) / 2 ^ i + have hsub : ∀ m, ‖x - cellCenter j m‖ ≤ ρ / 2 ^ i → cell j m ⊆ ball x r := fun m hm y hy => by + have h1 := norm_sub_cellCenter_le hy + have h2 : (finrank ℝ V : ℝ) / 2 ^ j ≤ finrank ℝ V / 2 ^ i := + div_le_div_of_nonneg_left (Nat.cast_nonneg _) (by positivity) + (pow_le_pow_right₀ one_le_two hij) + have h3 : r = ρ / 2 ^ i + finrank ℝ V / 2 ^ i + 1 / 2 ^ i := by simp only [r]; ring + have h4 : (0 : ℝ) < 1 / 2 ^ i := by positivity + rw [mem_ball, dist_eq_norm] + calc ‖y - x‖ ≤ ‖y - cellCenter j m‖ + ‖x - cellCenter j m‖ := by + simpa only [dist_eq_norm] using dist_triangle_right y x (cellCenter j m) + _ < r := by linarith + have hterm : ∀ m, dyadicWeight (-(finrank ℝ V : ℝ)) j * + (if ‖x - cellCenter j m‖ ≤ ρ / 2 ^ i then ‖coef j m‖ₑ else 0) ≤ + ∫⁻ y in cell j m, (ball x r).indicator (cellCoefFun j coef) y := fun m => by + split_ifs with hm + · rw [setLIntegral_congr_fun (measurableSet_cell j m) fun y hy => by + rw [indicator_of_mem (hsub m hm hy), cellCoefFun_of_mem hy coef], + setLIntegral_const, volume_cell, mul_comm] + · rw [mul_zero] + exact zero_le + calc dyadicWeight (-(finrank ℝ V : ℝ)) j * + ∑' m, (if ‖x - cellCenter j m‖ ≤ ρ / 2 ^ i then ‖coef j m‖ₑ else 0) + ≤ ∑' m, ∫⁻ y in cell j m, (ball x r).indicator (cellCoefFun j coef) y := by + rw [← ENNReal.tsum_mul_left] + exact tsum_le_tsum hterm + _ = ∫⁻ y in ball x r, cellCoefFun j coef y := by + rw [← lintegral_eq_tsum_cell j, lintegral_indicator measurableSet_ball] + _ ≤ volume (ball (0 : V) r) * maximal (cellCoefFun j coef) x := + setLIntegral_ball_le_mul_maximal (by positivity) _ x + _ = _ := by rw [volume_ball_div_two_pow (by positivity) i 0] + +/-! ### Smooth atoms -/ + +/-- A smooth atom on `Ω` is bounded by its constant on `Ω`: `|a(y)| ≤ A`. -/ +theorem IsSmoothAtom.norm_le {Ω : Set V} {K : ℕ} {d A : ℝ} {j : ℕ} {c : V} {a : V → ℂ} + (ha : IsSmoothAtom Ω K d A j c a) {y : V} (hy : y ∈ Ω) : ‖a y‖ ≤ A := by + simpa [norm_iteratedFDerivWithin_zero] using + ha.norm_iteratedFDerivWithin_le 0 (Nat.zero_le K) y hy + +/-- The constant of a smooth atom on `V` is nonnegative: `0 ≤ |a(0)| ≤ A`. -/ +theorem IsSmoothAtom.const_nonneg {K : ℕ} {d A : ℝ} {j : ℕ} {c : V} {a : V → ℂ} + (ha : IsSmoothAtom univ K d A j c a) : 0 ≤ A := + (norm_nonneg _).trans (ha.norm_le (mem_univ 0)) + +/-- A smooth atom on `V` is continuous. -/ +theorem IsSmoothAtom.continuous {K : ℕ} {d A : ℝ} {j : ℕ} {c : V} {a : V → ℂ} + (ha : IsSmoothAtom univ K d A j c a) : Continuous a := + continuousOn_univ.1 ha.contDiffOn.continuousOn + +/-- A smooth atom has compact support, in `B̄(c, d 2^(-j))`. -/ +theorem IsSmoothAtom.hasCompactSupport {Ω : Set V} {K : ℕ} {d A : ℝ} {j : ℕ} {c : V} + {a : V → ℂ} (ha : IsSmoothAtom Ω K d A j c a) : HasCompactSupport a := + HasCompactSupport.intro (isCompact_closedBall c (d / 2 ^ j)) fun x hx => + ha.eq_zero x (by rwa [mem_closedBall, dist_eq_norm, not_le] at hx) + +/-- A smooth atom on `V` is integrable. -/ +theorem IsSmoothAtom.integrable {K : ℕ} {d A : ℝ} {j : ℕ} {c : V} {a : V → ℂ} + (ha : IsSmoothAtom univ K d A j c a) : Integrable a := + ha.continuous.integrable_of_hasCompactSupport ha.hasCompactSupport + +/-- `∫ |a| ≤ A |B̄(c, d 2^(-j))| = A d^n |B_1| 2^(-jn)` for a smooth atom `a` on `V` with radius +factor `d ≥ 0`. -/ +theorem IsSmoothAtom.lintegral_enorm_le {K : ℕ} {d A : ℝ} (hd : 0 ≤ d) {j : ℕ} {c : V} + {a : V → ℂ} (ha : IsSmoothAtom univ K d A j c a) : + ∫⁻ y, ‖a y‖ₑ ≤ ENNReal.ofReal A * (ENNReal.ofReal (d ^ finrank ℝ V) * + volume (ball (0 : V) 1) * dyadicWeight (-(finrank ℝ V : ℝ)) j) := by + rw [← eLpNorm_one_eq_lintegral_eNorm ha.integrable.aestronglyMeasurable, + ← volume_closedBall_div_two_pow hd j c] + refine (eLpNorm_le_of_bound_of_support ha.integrable.aestronglyMeasurable + (S := closedBall c (d / 2 ^ j)) (B := ENNReal.ofReal A) + (fun y hy => ha.eq_zero y (by rwa [mem_closedBall, dist_eq_norm, not_le] at hy)) + fun y => ?_).trans_eq ?_ + · rw [← ofReal_norm] + exact ENNReal.ofReal_le_ofReal (ha.norm_le (mem_univ y)) + · rw [ENNReal.toReal_one, div_one, ENNReal.rpow_one] + +/-- **Convolution with a series of atoms, term by term**: for a continuous kernel `K` that +vanishes outside `B̄(0, ρ)`, `ρ ≥ 0`, and smooth atoms `a_m` of level `j` centred at the cells +with radius factor `d ≥ 0`, `K ⋆ (∑_m λ_m a_m) = ∑_m λ_m K ⋆ a_m` at every point. Near each +point only finitely many atoms meet the support of `y ↦ K(x - y)`. -/ +theorem conv_tsum_atom {K : V → ℂ} (hKc : Continuous K) {ρ : ℝ} (hρ : 0 ≤ ρ) + (hKρ : ∀ y, ρ < ‖y‖ → K y = 0) {k : ℕ} {d A : ℝ} (hd : 0 ≤ d) {j : ℕ} + (coef : (Fin (finrank ℝ V) → ℤ) → ℂ) {a : (Fin (finrank ℝ V) → ℤ) → V → ℂ} + (ha : ∀ m, IsSmoothAtom univ k d A j (cellCenter j m) (a m)) (x : V) : + conv K (fun y => ∑' m, coef m * a m y) volume x = ∑' m, coef m * conv K (a m) volume x := by + have hKs : HasCompactSupport K := HasCompactSupport.intro (isCompact_closedBall 0 ρ) + fun y hy => hKρ y (by simpa [mem_closedBall, dist_zero_right, not_le] using hy) + set R := ρ * 2 ^ j + d + have hR : 0 ≤ R := by positivity + have hnear : ∀ m y, K y ≠ 0 → a m (x - y) ≠ 0 → ‖x - cellCenter j m‖ ≤ R / 2 ^ j := + fun m y hy hay => by + have h1 : ‖y‖ ≤ ρ := not_lt.1 fun h => hy (hKρ y h) + have h2 : ‖x - y - cellCenter j m‖ ≤ d / 2 ^ j := not_lt.1 fun h => hay ((ha m).eq_zero _ h) + calc ‖x - cellCenter j m‖ ≤ ‖x - (x - y)‖ + ‖x - y - cellCenter j m‖ := + norm_sub_le_norm_sub_add_norm_sub _ _ _ + _ ≤ ρ + d / 2 ^ j := by rw [sub_sub_cancel]; exact add_le_add h1 h2 + _ = R / 2 ^ j := by simp only [R]; field_simp + obtain ⟨T, hT, -⟩ := exists_finset_of_card_le + (P := fun m => ‖x - cellCenter j m‖ ≤ R / 2 ^ j) + fun S hS => card_le_of_norm_sub_cellCenter_le j hR x S hS + rw [conv_tsum_of_finset hKc hKs (u := fun m y => coef m * a m y) + (fun m => ((ha m).integrable.const_mul (coef m)).locallyIntegrable) x T + fun m hm y hy => by_contra fun hay => hm (hT m (hnear m y hy (right_ne_zero_of_mul hay)))] + refine tsum_congr fun m => ?_ + rw [conv_apply, conv_apply, ← integral_const_mul] + congr 1 + funext y + ring + +/-- **Convolution with a series of atoms, bounded term by term**: if `f = ∑_m λ_m a_m` almost +everywhere, for smooth atoms `a_m` of level `j` centred at the cells with radius factor `d ≥ 0`, +then `|K ⋆ f(x)| ≤ ∑_m |λ_m| |K ⋆ a_m(x)|` at every point, for a continuous kernel `K` that +vanishes outside `B̄(0, ρ)`, `ρ ≥ 0`. -/ +theorem enorm_conv_le_tsum_atom {K : V → ℂ} (hKc : Continuous K) {ρ : ℝ} (hρ : 0 ≤ ρ) + (hKρ : ∀ y, ρ < ‖y‖ → K y = 0) {k : ℕ} {d A : ℝ} (hd : 0 ≤ d) {j : ℕ} + {coef : (Fin (finrank ℝ V) → ℤ) → ℂ} {a : (Fin (finrank ℝ V) → ℤ) → V → ℂ} + (ha : ∀ m, IsSmoothAtom univ k d A j (cellCenter j m) (a m)) {f : V → ℂ} + (hf : ∀ᵐ x ∂volume, f x = ∑' m, coef m * a m x) (x : V) : + ‖conv K f volume x‖ₑ ≤ ∑' m, ‖coef m‖ₑ * ‖conv K (a m) volume x‖ₑ := by + rw [conv_congr_ae hf, conv_tsum_atom hKc hρ hKρ hd coef ha x] + refine eNorm_tsum_le_tsum_eNorm.trans_eq ?_ + simp only [eNorm_mul] + +/-! ### Coefficients with exponent one -/ + +/-- **The coefficients with exponent one in `f^s_{p,q}` by maximal functions**: for almost +everywhere strongly measurable functions `g_j`, the step functions of the coefficients +`λ_{j,m} = Rd.cellCoef 1 j g_j m` satisfy, at every point, +`‖(2^(js) |λ_{j,m_j(x)}|)_j‖_{ℓ_q} ≤ (2n + 1)^n |B_1| ‖(M(2^(js) |g_j|)(x))_j‖_{ℓ_q}`. -/ +theorem lqNorm_cellCoefFun_le_lqNorm_maximal (q : ℝ≥0∞) (s : ℝ) {g : ℕ → V → ℂ} + (hg : ∀ j, AEStronglyMeasurable (g j) volume) (x : V) : + lqNorm q (fun j => dyadicWeight s j * cellCoefFun j (fun j => cellCoef 1 j (g j)) x) ≤ + ENNReal.ofReal ((2 * finrank ℝ V + 1) ^ finrank ℝ V) * volume (ball (0 : V) 1) * + lqNorm q (fun j => maximal (fun y => dyadicWeight s j * ‖g j y‖ₑ) x) := by + rw [← ENNReal.lqNorm_const_mul] + refine ENNReal.lqNorm_mono fun j => ?_ + rw [← dyadicWeight_mul_maximal, mul_left_comm] + gcongr + exact cellCoefFun_le_maximal (fun m => enorm_cellCoef_one_le j (hg j) m) x + +namespace LocalMeansBump + +variable (b : LocalMeansBump V) + +/-! ### Synthesis: coarse local means -/ + +/-- **A coarse local mean of an atom**: for levels `i ≤ j` and a smooth atom `a` on `V` of level +`j` with centre `c`, radius factor `d ≥ 0` and constant `A`, +`∫ |k_i(y)| |a(x - y)| dy ≤ C A d^n |B_1| 2^(in) 2^(-jn)` with +`C = Rd.LocalMeansBump.kernelSupConst L`, and the integral vanishes unless +`|x - c| ≤ (2LR + d) 2^(-i)`. -/ +theorem lintegral_enorm_kernel_mul_atom_le (L : ℕ) {i j : ℕ} (hij : i ≤ j) {K : ℕ} {d A : ℝ} + (hd : 0 ≤ d) {c : V} {a : V → ℂ} (ha : IsSmoothAtom univ K d A j c a) (x : V) : + ∫⁻ y, ‖b.kernel L i y‖ₑ * ‖a (x - y)‖ₑ ≤ + ENNReal.ofReal (b.kernelSupConst L) * (ENNReal.ofReal A * + (ENNReal.ofReal (d ^ finrank ℝ V) * volume (ball (0 : V) 1))) * + dyadicWeight (finrank ℝ V : ℝ) i * dyadicWeight (-(finrank ℝ V : ℝ)) j * + (if ‖x - c‖ ≤ (2 * L * b.radius + d) / 2 ^ i then 1 else 0) := by + split_ifs with hx + · rw [mul_one] + calc ∫⁻ y, ‖b.kernel L i y‖ₑ * ‖a (x - y)‖ₑ + ≤ ∫⁻ y, ENNReal.ofReal (b.kernelSupConst L) * dyadicWeight (finrank ℝ V : ℝ) i * + ‖a (x - y)‖ₑ := + lintegral_mono fun y => by + gcongr + rw [ENNReal.dyadicWeight_natCast] + exact b.enorm_kernel_le L i y + _ = ENNReal.ofReal (b.kernelSupConst L) * dyadicWeight (finrank ℝ V : ℝ) i * + ∫⁻ y, ‖a y‖ₑ := by + rw [lintegral_const_mul' _ _ (ENNReal.mul_ne_top ENNReal.ofReal_ne_top + (ENNReal.dyadicWeight_ne_top _ _)), lintegral_sub_left_eq_self (fun y => ‖a y‖ₑ) x] + _ ≤ ENNReal.ofReal (b.kernelSupConst L) * dyadicWeight (finrank ℝ V : ℝ) i * + (ENNReal.ofReal A * (ENNReal.ofReal (d ^ finrank ℝ V) * volume (ball (0 : V) 1) * + dyadicWeight (-(finrank ℝ V : ℝ)) j)) := by + gcongr + exact ha.lintegral_enorm_le hd + _ = _ := by ring + · have h0 : ∀ y, ‖b.kernel L i y‖ₑ * ‖a (x - y)‖ₑ = 0 := fun y => by + by_cases hy : 2 * L * b.radius / 2 ^ i < ‖y‖ + · rw [b.kernel_eq_zero_of_lt L i hy, eNorm_zero, zero_mul] + · push Not at hy hx + have h1 : d / 2 ^ j ≤ d / 2 ^ i := + div_le_div_of_nonneg_left hd (by positivity) (pow_le_pow_right₀ one_le_two hij) + have h2 : ‖x - c‖ ≤ ‖x - y - c‖ + ‖y‖ := by + calc ‖x - c‖ = ‖(x - y - c) + y‖ := by congr 1; abel + _ ≤ _ := norm_add_le _ _ + have h3 : (2 * L * b.radius + d) / 2 ^ i = 2 * L * b.radius / 2 ^ i + d / 2 ^ i := + add_div _ _ _ + rw [ha.eq_zero (x - y) (by linarith), eNorm_zero, mul_zero] + simp only [h0, lintegral_zero, mul_zero, le_refl] + +/-- The constant `C A_+ d^n |B_1| (2LR + d + n + 1)^n |B_1|` of the coarse local means of atoms +with radius factor `d` and constant `A`, where `A_+ = max(A, 0)`, +`C = Rd.LocalMeansBump.kernelSupConst L` and `R` is the radius of the bump. -/ +noncomputable def tlAtomCoarseConst (L : ℕ) (d A : ℝ) : ℝ≥0∞ := + ENNReal.ofReal (b.kernelSupConst L) * (ENNReal.ofReal A * + (ENNReal.ofReal (d ^ finrank ℝ V) * volume (ball (0 : V) 1))) * + (ENNReal.ofReal ((2 * L * b.radius + d + finrank ℝ V + 1) ^ finrank ℝ V) * + volume (ball (0 : V) 1)) + +/-- The constant of the coarse local means of atoms is finite. -/ +theorem tlAtomCoarseConst_ne_top (L : ℕ) (d A : ℝ) : b.tlAtomCoarseConst L d A ≠ ∞ := + ENNReal.mul_ne_top (ENNReal.mul_ne_top ENNReal.ofReal_ne_top (ENNReal.mul_ne_top + ENNReal.ofReal_ne_top (ENNReal.mul_ne_top ENNReal.ofReal_ne_top (volume_ball_ne_top 1)))) + (ENNReal.mul_ne_top ENNReal.ofReal_ne_top (volume_ball_ne_top 1)) + +/-- **A coarse local mean of the atoms of one level**: for levels `i ≤ j`, smooth atoms +`a_{j,m}` on `V` of level `j` centred at the cells, with radius factor `d ≥ 0` and constant `A`, +and `f = ∑_m λ_{j,m} a_{j,m}` almost everywhere, `|k_i ⋆ f(x)| ≤ C M(x)` at every point, with +`M` the maximal function of the step function of the coefficients of level `j` and +`C = Rd.LocalMeansBump.tlAtomCoarseConst L d A`. -/ +theorem enorm_conv_kernel_level_le_of_le (L : ℕ) {i j : ℕ} (hij : i ≤ j) {K : ℕ} {d A : ℝ} + (hd : 0 ≤ d) {coef : ℕ → (Fin (finrank ℝ V) → ℤ) → ℂ} + {a : ℕ → (Fin (finrank ℝ V) → ℤ) → V → ℂ} + (hatom : ∀ m, IsSmoothAtom univ K d A j (cellCenter j m) (a j m)) {f : V → ℂ} + (hf : ∀ᵐ x ∂volume, f x = ∑' m, coef j m * a j m x) (x : V) : + ‖conv (b.kernel L i) f volume x‖ₑ ≤ + b.tlAtomCoarseConst L d A * maximal (cellCoefFun j coef) x := by + have hR := b.radius_nonneg + have hρ : 0 ≤ 2 * L * b.radius + d := by positivity + refine (enorm_conv_le_tsum_atom (b.continuous_kernel L i) (by positivity) + (fun y hy => b.kernel_eq_zero_of_lt L i hy) hd hatom hf x).trans + ((ENNReal.tsum_mul_le_of_le fun m => (enorm_conv_le_lintegral _ _ x).trans + (b.lintegral_enorm_kernel_mul_atom_le L hij hd (hatom m) x)).trans ?_) + calc ENNReal.ofReal (b.kernelSupConst L) * (ENNReal.ofReal A * + (ENNReal.ofReal (d ^ finrank ℝ V) * volume (ball (0 : V) 1))) * + dyadicWeight (finrank ℝ V : ℝ) i * dyadicWeight (-(finrank ℝ V : ℝ)) j * + ∑' m, (if ‖x - cellCenter j m‖ ≤ (2 * L * b.radius + d) / 2 ^ i then ‖coef j m‖ₑ + else 0) + = ENNReal.ofReal (b.kernelSupConst L) * (ENNReal.ofReal A * + (ENNReal.ofReal (d ^ finrank ℝ V) * volume (ball (0 : V) 1))) * + dyadicWeight (finrank ℝ V : ℝ) i * (dyadicWeight (-(finrank ℝ V : ℝ)) j * + ∑' m, (if ‖x - cellCenter j m‖ ≤ (2 * L * b.radius + d) / 2 ^ i then ‖coef j m‖ₑ + else 0)) := by ring + _ ≤ ENNReal.ofReal (b.kernelSupConst L) * (ENNReal.ofReal A * + (ENNReal.ofReal (d ^ finrank ℝ V) * volume (ball (0 : V) 1))) * + dyadicWeight (finrank ℝ V : ℝ) i * + (ENNReal.ofReal ((2 * L * b.radius + d + finrank ℝ V + 1) ^ finrank ℝ V) * + volume (ball (0 : V) 1) * dyadicWeight (-(finrank ℝ V : ℝ)) i * + maximal (cellCoefFun j coef) x) := + mul_le_mul_right (dyadicWeight_mul_tsum_ite_le_maximal hij coef hρ x) _ + _ = b.tlAtomCoarseConst L d A * maximal (cellCoefFun j coef) x * + (dyadicWeight (-(finrank ℝ V : ℝ)) i * dyadicWeight (finrank ℝ V : ℝ) i) := by + rw [tlAtomCoarseConst] + ring + _ = _ := by rw [ENNReal.dyadicWeight_neg_mul_self, mul_one] + +/-! ### Synthesis: fine local means -/ + +/-- One step of the moment identity for an atom, pointwise in `z`: for a smooth atom `a` on `V` +of level `j` and order `L ≥ 1` with centre `c`, radius factor `d` and constant `A`, and `k ≥ j`, +`|g(z)| |Δ^L_{-2^(-k) z} a(x)| ≤ |g(z)| 2^L L^(L+1) A R^L 2^(-(k-j)L) 1_{|x - c| ≤ (d + LR) 2^(-j)}` +for the bump `g` of radius `R`: on the support of `g` the step has length at most `2^(-k) R`, and +far from `c` the differences vanish (`Rd.IsSmoothAtom.higherDiff_eq_zero_of_lt`). -/ +theorem enorm_mul_higherDiff_atom_le {L : ℕ} (hL : 1 ≤ L) {d A : ℝ} {j : ℕ} + {c : V} {a : V → ℂ} (ha : IsSmoothAtom univ L d A j c a) {k : ℕ} (hjk : j ≤ k) (z x : V) : + ‖b.toFun z‖ₑ * ‖(fwdDiff (-((2 : ℝ) ^ k)⁻¹ • z))^[L] a x‖ₑ ≤ + ‖b.toFun z‖ₑ * (ENNReal.ofReal (2 ^ L * (L : ℝ) ^ (L + 1) * A) * + ENNReal.ofReal (b.radius ^ L) * dyadicWeight (-(L : ℝ)) (k - j) * + (if ‖x - c‖ ≤ (d + L * b.radius) / 2 ^ j then 1 else 0)) := by + by_cases hz : b.radius < ‖z‖ + · rw [b.eq_zero z hz, eNorm_zero, zero_mul, zero_mul] + push Not at hz + refine mul_le_mul_right ?_ _ + have hR := b.radius_nonneg + have hA := ha.const_nonneg + have hh : ‖-((2 : ℝ) ^ k)⁻¹ • z‖ ≤ b.radius / 2 ^ k := by + rw [norm_smul, norm_neg, norm_inv, Real.norm_of_nonneg (by positivity), inv_mul_eq_div] + exact div_le_div_of_nonneg_right hz (by positivity) + have hkj : b.radius / 2 ^ k ≤ b.radius / 2 ^ j := + div_le_div_of_nonneg_left hR (by positivity) (pow_le_pow_right₀ one_le_two hjk) + split_ifs with hx + · rw [mul_one, mul_assoc] + refine (ha.enorm_higherDiff_le convex_univ (by rw [interior_univ]; exact univ_nonempty) hA hL + le_rfl (by rw [stepSet_univ]; trivial)).trans + (mul_le_mul_right ((min_le_right _ _).trans ?_) _) + have h1 : 2 ^ j * ‖-((2 : ℝ) ^ k)⁻¹ • z‖ ≤ b.radius * (1 / 2 ^ (k - j)) := by + have hk : (2 : ℝ) ^ k = 2 ^ (k - j) * 2 ^ j := by rw [← pow_add, Nat.sub_add_cancel hjk] + calc 2 ^ j * ‖-((2 : ℝ) ^ k)⁻¹ • z‖ ≤ 2 ^ j * (b.radius / 2 ^ k) := by gcongr + _ = b.radius * (1 / 2 ^ (k - j)) := by rw [hk]; field_simp + calc ENNReal.ofReal (2 ^ j * ‖-((2 : ℝ) ^ k)⁻¹ • z‖) ^ (L : ℝ) + = ENNReal.ofReal ((2 ^ j * ‖-((2 : ℝ) ^ k)⁻¹ • z‖) ^ L) := by + rw [ENNReal.rpow_natCast, ENNReal.ofReal_pow (by positivity)] + _ ≤ ENNReal.ofReal ((b.radius * (1 / 2 ^ (k - j))) ^ L) := + ENNReal.ofReal_le_ofReal (pow_le_pow_left₀ (by positivity) h1 L) + _ = ENNReal.ofReal (b.radius ^ L) * dyadicWeight (-(L : ℝ)) (k - j) := by + rw [mul_pow, ENNReal.ofReal_mul (by positivity), ENNReal.ofReal_one_div_two_pow_pow] + · push Not at hx + rw [ha.higherDiff_eq_zero_of_lt L (hh.trans hkj) (lt_of_eq_of_lt (by ring) hx), eNorm_zero] + exact zero_le + +/-- **One scale of the moment identity for an atom**: for a smooth atom `a` on `V` of level `j` +and order `L ≥ 1` with centre `c`, radius factor `d` and constant `A`, and `k ≥ j`, almost +everywhere +`|a(x) - (m_{2^k} ⋆ a)(x)| ≤ ‖g‖_1 2^L L^(L+1) A R^L 2^(-(k-j)L) 1_{|x - c| ≤ (d + LR) 2^(-j)}`, +by the averaged differences of the moment kernel `m` of the bump `g`. -/ +theorem ae_enorm_atom_sub_conv_scaled_le {L : ℕ} (hL : 1 ≤ L) {d A : ℝ} {j : ℕ} + {c : V} {a : V → ℂ} (ha : IsSmoothAtom univ L d A j c a) {k : ℕ} (hjk : j ≤ k) : + ∀ᵐ x ∂volume, ‖a x - conv (b.scaled L k) a volume x‖ₑ ≤ + (∫⁻ z, ‖b.toFun z‖ₑ) * (ENNReal.ofReal (2 ^ L * (L : ℝ) ^ (L + 1) * A) * + ENNReal.ofReal (b.radius ^ L) * dyadicWeight (-(L : ℝ)) (k - j) * + (if ‖x - c‖ ≤ (d + L * b.radius) / 2 ^ j then 1 else 0)) := by + filter_upwards [ae_enorm_sub_conv_dilate_momentKernel_le le_rfl ENNReal.one_ne_top b.integrable + b.integral_eq_one (memLp_one_iff_integrable.2 ha.integrable) L (c := (2 : ℝ) ^ k) + (by positivity)] with x hx + refine hx.trans ((lintegral_mono fun z => + b.enorm_mul_higherDiff_atom_le hL ha hjk z x).trans ?_) + rw [lintegral_mul_const'' _ b.contDiff.continuous.aestronglyMeasurable.eNorm] + +/-- The constant `2 ‖g‖_1 2^L L^(L+1) A (2R)^L` of the fine local means of a smooth atom of order +`L` and constant `A`, for the bump `g` of radius `R`. -/ +noncomputable def momentAtomConst (L : ℕ) (A : ℝ) : ℝ≥0∞ := + 2 * (∫⁻ z, ‖b.toFun z‖ₑ) * ENNReal.ofReal (2 ^ L * (L : ℝ) ^ (L + 1) * A) * + ENNReal.ofReal ((2 * b.radius) ^ L) + +/-- The constant of the fine local means of a smooth atom is finite. -/ +theorem momentAtomConst_ne_top (L : ℕ) (A : ℝ) : b.momentAtomConst L A ≠ ∞ := + ENNReal.mul_ne_top (ENNReal.mul_ne_top (ENNReal.mul_ne_top ENNReal.ofNat_ne_top + b.integrable.hasFiniteIntegral.ne) ENNReal.ofReal_ne_top) ENNReal.ofReal_ne_top + +/-- **A fine local mean of an atom**: for a smooth atom `a` on `V` of level `j < i` and order +`L ≥ 1` with centre `c`, radius factor `d` and constant `A`, almost everywhere +`|k_i ⋆ a(x)| ≤ C 2^(-(i-j)L) 1_{|x - c| ≤ (d + LR) 2^(-j)}` with +`C = Rd.LocalMeansBump.momentAtomConst L A`. The kernel `k_i = m_{2^i} - m_{2^(i-1)}` is a +difference of two moment kernels (`Rd.LocalMeansBump.ae_enorm_conv_kernel_le_of_scaled`), each of +which reproduces `a` up to averaged differences of order `L` with steps of length at most +`2^(1-i) R`. -/ +theorem ae_enorm_conv_kernel_atom_le_of_lt {L : ℕ} (hL : 1 ≤ L) {d A : ℝ} {j : ℕ} + {c : V} {a : V → ℂ} (ha : IsSmoothAtom univ L d A j c a) {i : ℕ} (hji : j < i) : + ∀ᵐ x ∂volume, ‖conv (b.kernel L i) a volume x‖ₑ ≤ + b.momentAtomConst L A * dyadicWeight (-(L : ℝ)) (i - j) * + (if ‖x - c‖ ≤ (d + L * b.radius) / 2 ^ j then 1 else 0) := by + have hR := b.radius_nonneg + have h2R : ENNReal.ofReal ((2 * b.radius) ^ L) = 2 ^ L * ENNReal.ofReal (b.radius ^ L) := by + rw [mul_pow, ENNReal.ofReal_mul (by positivity), ENNReal.ofReal_pow zero_le_two, + ENNReal.ofReal_ofNat] + filter_upwards [b.ae_enorm_conv_kernel_le_of_scaled L (memLp_one_iff_integrable.2 ha.integrable) + (C := (∫⁻ z, ‖b.toFun z‖ₑ) * (ENNReal.ofReal (2 ^ L * (L : ℝ) ^ (L + 1) * A) * + ENNReal.ofReal (b.radius ^ L))) + (u := fun x => if ‖x - c‖ ≤ (d + L * b.radius) / 2 ^ j then 1 else 0) + (fun k hjk => (b.ae_enorm_atom_sub_conv_scaled_le hL ha hjk).mono fun x hx => + hx.trans_eq (by ring)) hji] with x hx + refine hx.trans_eq ?_ + rw [momentAtomConst, h2R] + ring + +/-- The constant `C (d + LR + n + 1)^n |B_1|` of the fine local means of atoms with radius factor +`d` and constant `A`, with `C = Rd.LocalMeansBump.momentAtomConst L A` and the radius `R` of the +bump. -/ +noncomputable def tlAtomFineConst (L : ℕ) (d A : ℝ) : ℝ≥0∞ := + b.momentAtomConst L A * (ENNReal.ofReal ((d + L * b.radius + finrank ℝ V + 1) ^ finrank ℝ V) * + volume (ball (0 : V) 1)) + +/-- The constant of the fine local means of atoms is finite. -/ +theorem tlAtomFineConst_ne_top (L : ℕ) (d A : ℝ) : b.tlAtomFineConst L d A ≠ ∞ := + ENNReal.mul_ne_top (b.momentAtomConst_ne_top L A) + (ENNReal.mul_ne_top ENNReal.ofReal_ne_top (volume_ball_ne_top 1)) + +/-- **A fine local mean of the atoms of one level**: for levels `j < i`, smooth atoms `a_{j,m}` +on `V` of level `j` and order `L ≥ 1` centred at the cells, with radius factor `d ≥ 0` and +constant `A`, and `f = ∑_m λ_{j,m} a_{j,m}` almost everywhere, almost everywhere +`|k_i ⋆ f(x)| ≤ C 2^(-(i-j)L) M(x)`, with `M` the maximal function of the step function of the +coefficients of level `j` and `C = Rd.LocalMeansBump.tlAtomFineConst L d A`. -/ +theorem ae_enorm_conv_kernel_level_le_of_lt {L : ℕ} (hL : 1 ≤ L) {d A : ℝ} (hd : 0 ≤ d) + {j : ℕ} {coef : ℕ → (Fin (finrank ℝ V) → ℤ) → ℂ} + {a : ℕ → (Fin (finrank ℝ V) → ℤ) → V → ℂ} + (hatom : ∀ m, IsSmoothAtom univ L d A j (cellCenter j m) (a j m)) {f : V → ℂ} + (hf : ∀ᵐ x ∂volume, f x = ∑' m, coef j m * a j m x) {i : ℕ} (hji : j < i) : + ∀ᵐ x ∂volume, ‖conv (b.kernel L i) f volume x‖ₑ ≤ + b.tlAtomFineConst L d A * dyadicWeight (-(L : ℝ)) (i - j) * + maximal (cellCoefFun j coef) x := by + have hR := b.radius_nonneg + have hρ : 0 ≤ d + L * b.radius := by positivity + filter_upwards [ae_all_iff.2 fun m => b.ae_enorm_conv_kernel_atom_le_of_lt hL (hatom m) hji] + with x hx + refine (enorm_conv_le_tsum_atom (b.continuous_kernel L i) (by positivity) + (fun y hy => b.kernel_eq_zero_of_lt L i hy) hd hatom hf x).trans + ((ENNReal.tsum_mul_le_of_le hx).trans ?_) + have hS : ∑' m, (if ‖x - cellCenter j m‖ ≤ (d + L * b.radius) / 2 ^ j then ‖coef j m‖ₑ + else 0) ≤ ENNReal.ofReal ((d + L * b.radius + finrank ℝ V + 1) ^ finrank ℝ V) * + volume (ball (0 : V) 1) * maximal (cellCoefFun j coef) x := by + refine (ENNReal.mul_le_mul_iff_right (ENNReal.dyadicWeight_ne_zero (-(finrank ℝ V : ℝ)) j) + (ENNReal.dyadicWeight_ne_top _ _)).1 + ((dyadicWeight_mul_tsum_ite_le_maximal (le_refl j) coef hρ x).trans_eq ?_) + ring + calc b.momentAtomConst L A * dyadicWeight (-(L : ℝ)) (i - j) * + ∑' m, (if ‖x - cellCenter j m‖ ≤ (d + L * b.radius) / 2 ^ j then ‖coef j m‖ₑ else 0) + ≤ b.momentAtomConst L A * dyadicWeight (-(L : ℝ)) (i - j) * + (ENNReal.ofReal ((d + L * b.radius + finrank ℝ V + 1) ^ finrank ℝ V) * + volume (ball (0 : V) 1) * maximal (cellCoefFun j coef) x) := by gcongr + _ = _ := by rw [tlAtomFineConst]; ring + +/-! ### Synthesis: the theorem -/ + +/-- The constant of the synthesis of Triebel–Lizorkin spaces from atoms with radius factor `d` +and constant `A`: the larger of the constants of the coarse and of the fine local means, +`max (Rd.LocalMeansBump.tlAtomCoarseConst L d A) (Rd.LocalMeansBump.tlAtomFineConst L d A)`. -/ +noncomputable def tlAtomSynthesisConst (L : ℕ) (d A : ℝ) : ℝ≥0∞ := + max (b.tlAtomCoarseConst L d A) (b.tlAtomFineConst L d A) + +/-- The constant of the synthesis from atoms is finite. -/ +theorem tlAtomSynthesisConst_ne_top (L : ℕ) (d A : ℝ) : b.tlAtomSynthesisConst L d A ≠ ∞ := + (max_lt (b.tlAtomCoarseConst_ne_top L d A).lt_top (b.tlAtomFineConst_ne_top L d A).lt_top).ne + +/-- **A local mean of the atoms of one level**: for smooth atoms `a_{j,m}` on `V` of level `j` +and order `L ≥ 1` centred at the cells, with radius factor `d ≥ 0` and constant `A`, and +`f = ∑_m λ_{j,m} a_{j,m}` almost everywhere, for every `i` almost everywhere +`|k_i ⋆ f(x)| ≤ C c_{ij} M(x)` with `c_{ij} = 2^(-(i-j)L)` for `j ≤ i`, `c_{ij} = 1` for `j > i`, +`M` the maximal function of the step function of the coefficients of level `j` and +`C = Rd.LocalMeansBump.tlAtomSynthesisConst L d A`. -/ +theorem ae_enorm_conv_kernel_level_le {L : ℕ} (hL : 1 ≤ L) {d A : ℝ} (hd : 0 ≤ d) + {j : ℕ} {coef : ℕ → (Fin (finrank ℝ V) → ℤ) → ℂ} + {a : ℕ → (Fin (finrank ℝ V) → ℤ) → V → ℂ} + (hatom : ∀ m, IsSmoothAtom univ L d A j (cellCenter j m) (a j m)) {f : V → ℂ} + (hf : ∀ᵐ x ∂volume, f x = ∑' m, coef j m * a j m x) (i : ℕ) : + ∀ᵐ x ∂volume, ‖conv (b.kernel L i) f volume x‖ₑ ≤ b.tlAtomSynthesisConst L d A * + ((if j ≤ i then dyadicWeight (-(L : ℝ)) (i - j) else 1) * + maximal (cellCoefFun j coef) x) := by + rcases lt_or_ge j i with hji | hij + · filter_upwards [b.ae_enorm_conv_kernel_level_le_of_lt hL hd hatom hf hji] with x hx + simp only [hji.le, ↓reduceIte] + refine hx.trans ?_ + rw [← mul_assoc, tlAtomSynthesisConst] + gcongr + exact le_max_right _ _ + · refine ae_of_all _ fun x => (b.enorm_conv_kernel_level_le_of_le L hij hd hatom hf x).trans ?_ + have h1 : 1 ≤ (if j ≤ i then dyadicWeight (-(L : ℝ)) (i - j) else 1) := by + split_ifs with hji + · rw [le_antisymm hji hij, Nat.sub_self, ENNReal.dyadicWeight_zero_right] + · exact le_rfl + calc b.tlAtomCoarseConst L d A * maximal (cellCoefFun j coef) x + ≤ b.tlAtomSynthesisConst L d A * (1 * maximal (cellCoefFun j coef) x) := by + rw [one_mul, tlAtomSynthesisConst] + gcongr + exact le_max_left _ _ + _ ≤ _ := by gcongr + +variable {p : ℝ≥0∞} [Fact (1 ≤ p)] + +/-- **Local means of a sum of levels**: if `∑_{j ≤ J} f_j → F` in `L_p`, `1 ≤ p < ∞`, then +almost everywhere `|k_i ⋆ F(x)| ≤ ∑_j |k_i ⋆ f_j(x)|`: the local mean `k_i ⋆` is continuous on +`L_p`, and the bound holds for the partial sums +(`MeasureTheory.ae_enorm_le_of_tendsto_Lp`). -/ +theorem enorm_conv_kernel_le_tsum_level (hp : p ≠ ∞) (L : ℕ) + (f : ℕ → Lp ℂ p (volume : Measure V)) {F : Lp ℂ p (volume : Measure V)} + (hF : Tendsto (fun J => ∑ j ∈ Finset.range (J + 1), f j) atTop (𝓝 F)) (i : ℕ) : + ∀ᵐ x ∂volume, ‖conv (b.kernel L i) F volume x‖ₑ ≤ + ∑' j, ‖conv (b.kernel L i) (f j) volume x‖ₑ := by + have h := ae_enorm_le_of_tendsto_Lp (((b.localMean hp L i).continuous.tendsto F).comp hF) + (v := fun x => ∑' j, ‖conv (b.kernel L i) (f j) volume x‖ₑ) fun J => by + have hall := ae_all_iff.2 fun j => b.localMean_ae_eq hp L i (f j) + filter_upwards [Lp.coeFn_fun_finsetSum (Finset.range (J + 1)) + (fun j => b.localMean hp L i (f j)), hall] with x hx hj + simp only [Function.comp_apply, map_sum] + rw [hx] + refine (eNorm_sum_le _ _).trans ?_ + simp only [hj] + exact sum_le_tsum _ + filter_upwards [h, b.localMean_ae_eq hp L i F] with x hx hb + rwa [← hb] + +/-- **Local means of an atomic sum, pointwise**: for smooth atoms `a_{j,m}` on `V` of level `j` +and order `L ≥ 1` centred at the cells, with radius factor `d ≥ 0` and constant `A`, level +sums `f_j = ∑_m λ_{j,m} a_{j,m}` almost everywhere and `∑_{j ≤ J} f_j → F` in `L_p`, +`1 ≤ p < ∞`, almost everywhere and for all `i`, +`|k_i ⋆ F(x)| ≤ C ∑_j c_{ij} M_j(x)` with `c_{ij} = 2^(-(i-j)L)` for `j ≤ i`, `c_{ij} = 1` for +`j > i`, `M_j` the maximal function of the step function of the coefficients of level `j` and +`C = Rd.LocalMeansBump.tlAtomSynthesisConst L d A`. -/ +theorem enorm_localMean_le_tsum_maximal_cellCoefFun {L : ℕ} (hL : 1 ≤ L) (hp : p ≠ ∞) + {d A : ℝ} (hd : 0 ≤ d) {coef : ℕ → (Fin (finrank ℝ V) → ℤ) → ℂ} + {a : ℕ → (Fin (finrank ℝ V) → ℤ) → V → ℂ} + (hatom : ∀ j m, IsSmoothAtom univ L d A j (cellCenter j m) (a j m)) + {f : ℕ → Lp ℂ p (volume : Measure V)} + (hf : ∀ j, ∀ᵐ x ∂volume, f j x = ∑' m, coef j m * a j m x) {F : Lp ℂ p (volume : Measure V)} + (hF : Tendsto (fun J => ∑ j ∈ Finset.range (J + 1), f j) atTop (𝓝 F)) : + ∀ᵐ x ∂volume, ∀ i, ‖conv (b.kernel L i) F volume x‖ₑ ≤ b.tlAtomSynthesisConst L d A * + ∑' j, (if j ≤ i then dyadicWeight (-(L : ℝ)) (i - j) else 1) * + maximal (cellCoefFun j coef) x := by + have h1 := ae_all_iff.2 fun i => b.enorm_conv_kernel_le_tsum_level hp L f hF i + have h2 := ae_all_iff.2 fun i => ae_all_iff.2 fun j => + b.ae_enorm_conv_kernel_level_le hL hd (hatom j) (hf j) i + filter_upwards [h1, h2] with x hx1 hx2 i + refine (hx1 i).trans ?_ + rw [← ENNReal.tsum_mul_left] + exact tsum_le_tsum fun j => hx2 i j + +/-- **Synthesis from atoms**: for smooth atoms `a_{j,m}` on `V` of level `j` and order `L ≥ 1` +centred at the cells, with radius factor `d ≥ 0` and constant `A`, level sums +`f_j = ∑_m λ_{j,m} a_{j,m}` almost everywhere with `∑_{j ≤ J} f_j → F` in `L_p`, `1 < p < ∞`, +`1 < q ≤ ∞` and `s ∈ ℝ`, +`‖F‖_{F^s_{p,q}}^{b,L} ≤ C A_{s,L} C_{FS} ‖λ‖_{f^s_{p,q}}` with +`C = Rd.LocalMeansBump.tlAtomSynthesisConst L d A`, `A_{s,L} = ENNReal.almostDiagonalConst s L` +(finite for `0 < s < L`) and the Fefferman–Stein constant `C_{FS} = Rd.feffermanSteinConst V p q`. +-/ +theorem tlLocalMeansNorm_le_tlCoeffNorm {L : ℕ} (hL : 1 ≤ L) (hp1 : 1 < p) (hp : p ≠ ∞) + {q : ℝ≥0∞} (hq1 : 1 < q) (s : ℝ) {d A : ℝ} (hd : 0 ≤ d) + {coef : ℕ → (Fin (finrank ℝ V) → ℤ) → ℂ} {a : ℕ → (Fin (finrank ℝ V) → ℤ) → V → ℂ} + (hatom : ∀ j m, IsSmoothAtom univ L d A j (cellCenter j m) (a j m)) + {f : ℕ → Lp ℂ p (volume : Measure V)} + (hf : ∀ j, ∀ᵐ x ∂volume, f j x = ∑' m, coef j m * a j m x) {F : Lp ℂ p (volume : Measure V)} + (hF : Tendsto (fun J => ∑ j ∈ Finset.range (J + 1), f j) atTop (𝓝 F)) : + b.tlLocalMeansNorm L s q F ≤ b.tlAtomSynthesisConst L d A * ENNReal.almostDiagonalConst s L * + feffermanSteinConst V p q * tlCoeffNorm p s q coef := + eLpNorm_le_of_le_lqNorm_maximal hp1 hp hq1 (b.aemeasurable_lqNorm_conv_kernel L s q F) + (fun j => ((measurable_cellCoefFun j coef).const_mul _).aemeasurable) + ((b.enorm_localMean_le_tsum_maximal_cellCoefFun hL hp hd hatom hf hF).mono fun x hx => + (ENNReal.lqNorm_le_almostDiagonalConst_mul_of_le hq1.le s L hx).trans_eq + (by simp only [dyadicWeight_mul_maximal])) + +/-! ### Analysis -/ + +/-- **Atomic decomposition with `L_1`-normalised coefficients**: for `L ≥ 1`, every order `K`, +`1 ≤ p < ∞` and `F ∈ L_p`, with `g_j = k_j ⋆ F`, the coefficients +`λ_{j,m} = Rd.cellCoef 1 j g_j m = 2^(jn) ∫_{P_{j,m}} |g_j|` and the cell atoms +`a_{j,m} = Rd.cellAtom 1 η_j j g_j m = λ_{j,m}⁻¹ η_j ⋆ (1_{P_{j,m}} g_j)` with exponent one +satisfy: every `a_{j,m}` is a smooth atom on `V` of level `j` and order `K` with radius factor +`2LR + n` and constant `Rd.LocalMeansBump.dualDerivConst L K`; `η_j ⋆ g_j = ∑_m λ_{j,m} a_{j,m}` +at every point; and `∑_{j ≤ J} η_j ⋆ g_j → F` in `L_p`. -/ +theorem tl_atomic_decomposition {L : ℕ} (hL : 1 ≤ L) (K : ℕ) (hp : p ≠ ∞) + (F : Lp ℂ p (volume : Measure V)) : + (∀ j m, IsSmoothAtom univ K (2 * L * b.radius + finrank ℝ V) (b.dualDerivConst L K) j + (cellCenter j m) (cellAtom 1 (b.dual L j) j (conv (b.kernel L j) F volume) m)) ∧ + (∀ j x, conv (b.dual L j) (conv (b.kernel L j) F volume) volume x = + ∑' m, cellCoef 1 j (conv (b.kernel L j) F volume) m * + cellAtom 1 (b.dual L j) j (conv (b.kernel L j) F volume) m x) ∧ + Tendsto (fun J => ∑ j ∈ Finset.range (J + 1), + convLp hp (b.integrable_dual L j) (b.localMean hp L j F)) atTop (𝓝 F) := by + have hcell : ∀ j m, MemLp ((cell j m).indicator (conv (b.kernel L j) F volume)) 1 volume := + fun j m => memLp_one_indicator_cell Fact.out + (memLp_conv Fact.out hp (b.integrable_kernel L j) (Lp.memLp F)) j m + refine ⟨fun j m => ?_, fun j x => ?_, b.tendsto_sum_dual_localMean hp hL F⟩ + · have h := b.isSmoothAtom_cellAtom le_rfl L K j (hcell j m) m + rw [cellAtom_indicator] at h + convert h using 1 + simp + · have hR := b.radius_nonneg + exact conv_eq_tsum_cellAtom_of_indicator le_rfl (b.continuous_dual L j) (by positivity) + (fun y hy => b.dual_eq_zero_of_lt L j hy) (hcell j) x + +/-- **The coefficients of the atomic decomposition in `f^s_{p,q}`**: for every order `L`, +`1 < p < ∞`, `1 < q ≤ ∞`, `s ∈ ℝ` and `F ∈ L_p`, the coefficients with exponent one +`λ_{j,m} = Rd.cellCoef 1 j (k_j ⋆ F) m` satisfy +`‖λ‖_{f^s_{p,q}} ≤ (2n + 1)^n |B_1| C_{FS} ‖F‖_{F^s_{p,q}}^{b,L}` with the Fefferman–Stein +constant `C_{FS} = Rd.feffermanSteinConst V p q`. -/ +theorem tlCoeffNorm_cellCoef_le (L : ℕ) (hp1 : 1 < p) (hp : p ≠ ∞) {q : ℝ≥0∞} (hq1 : 1 < q) + (s : ℝ) (F : Lp ℂ p (volume : Measure V)) : + tlCoeffNorm p s q (fun j => cellCoef 1 j (conv (b.kernel L j) F volume)) ≤ + ENNReal.ofReal ((2 * finrank ℝ V + 1) ^ finrank ℝ V) * volume (ball (0 : V) 1) * + feffermanSteinConst V p q * b.tlLocalMeansNorm L s q F := + eLpNorm_le_of_le_lqNorm_maximal hp1 hp hq1 (aemeasurable_lqNorm_cellCoefFun s q _) + (fun j => (b.measurable_dyadicWeight_mul_conv_kernel L s j F).aemeasurable) + (ae_of_all _ (lqNorm_cellCoefFun_le_lqNorm_maximal q s fun j => + (b.continuous_conv_kernel L j F).aestronglyMeasurable)) + +end LocalMeansBump + +/-! ### The atomic characterisation -/ + +/-- **The atomic characterisation of Triebel–Lizorkin spaces** for `1 < p < ∞`, `1 < q ≤ ∞` +and `s > 0`, with atoms normalised in `L_∞` and the weights `2^(js)` in `f^s_{p,q}`; for `s > 0` +the atoms carry no moment conditions. Triebel, *Theory of Function Spaces II*, states it with +`(s,p)`-atoms normalised in `L_p`; the coefficients `λ_{j,m}` here correspond to his +coefficients `2^(j(s - n/p)) λ_{j,m}`, `n = dim V`. For an order `L` with `0 < s < L`, +`F ∈ F^s_{p,q}` iff `F = ∑_j f_j` in `L_p` with `f_j = ∑_m λ_{j,m} a_{j,m}` almost everywhere for +smooth atoms `a_{j,m}` on `V` of level `j` and order `L` centred at the cells, with a common +radius factor `d ≥ 0` and constant `A`, and `‖λ‖_{f^s_{p,q}} < ∞`. The atoms of `F` are the cell +atoms of `η_j ⋆ (k_j ⋆ F)` (`Rd.LocalMeansBump.tl_atomic_decomposition`); the converse is the +synthesis `Rd.LocalMeansBump.tlLocalMeansNorm_le_tlCoeffNorm`. The Besov analogue is +`Rd.LocalMeansBump.besov_iff_atomic`. -/ +theorem memTriebelLizorkin_iff_atomic {p : ℝ≥0∞} [Fact (1 ≤ p)] (hp1 : 1 < p) (hp : p ≠ ∞) + {q : ℝ≥0∞} (hq1 : 1 < q) {s : ℝ} (hs : 0 < s) {L : ℕ} (hsL : s < L) + (F : Lp ℂ p (volume : Measure V)) : + MemTriebelLizorkin s q F ↔ ∃ (d A : ℝ) (coef : ℕ → (Fin (finrank ℝ V) → ℤ) → ℂ) + (a : ℕ → (Fin (finrank ℝ V) → ℤ) → V → ℂ) (f : ℕ → Lp ℂ p (volume : Measure V)), + 0 ≤ d ∧ (∀ j m, IsSmoothAtom univ L d A j (cellCenter j m) (a j m)) ∧ + (∀ j, ∀ᵐ x ∂volume, f j x = ∑' m, coef j m * a j m x) ∧ + Tendsto (fun J => ∑ j ∈ Finset.range (J + 1), f j) atTop (𝓝 F) ∧ + tlCoeffNorm p s q coef < ∞ := by + have hL : 1 ≤ L := Nat.one_le_iff_ne_zero.2 fun h => by + rw [h, Nat.cast_zero] at hsL + linarith + obtain ⟨b⟩ : Nonempty (LocalMeansBump V) := ⟨LocalMeansBump.std⟩ + rw [b.memTriebelLizorkin_iff_tlLocalMeans hp1 hp hq1 hs hsL] + constructor + · intro hF + obtain ⟨hatom, hsum, hlim⟩ := b.tl_atomic_decomposition hL L hp F + have hR := b.radius_nonneg + refine ⟨2 * L * b.radius + finrank ℝ V, b.dualDerivConst L L, + fun j => cellCoef 1 j (conv (b.kernel L j) F volume), + fun j => cellAtom 1 (b.dual L j) j (conv (b.kernel L j) F volume), + fun j => convLp hp (b.integrable_dual L j) (b.localMean hp L j F), by positivity, hatom, + fun j => ?_, hlim, ?_⟩ + · filter_upwards [convLp_apply_ae hp (b.integrable_dual L j) (b.localMean hp L j F)] + with x hx + rw [hx, conv_congr_ae (b.localMean_ae_eq hp L j F)] + exact hsum j x + · exact (b.tlCoeffNorm_cellCoef_le L hp1 hp hq1 s F).trans_lt (ENNReal.mul_lt_top + (ENNReal.mul_ne_top (ENNReal.mul_ne_top ENNReal.ofReal_ne_top (volume_ball_ne_top 1)) + (feffermanSteinConst_ne_top hp1 hp hq1)).lt_top hF) + · rintro ⟨d, A, coef, a, f, hd, hatom, hf, hF, hcoef⟩ + exact (b.tlLocalMeansNorm_le_tlCoeffNorm hL hp1 hp hq1 s hd hatom hf hF).trans_lt + (ENNReal.mul_lt_top (ENNReal.mul_ne_top (ENNReal.mul_ne_top + (b.tlAtomSynthesisConst_ne_top L d A) (ENNReal.almostDiagonalConst_ne_top hs hsL)) + (feffermanSteinConst_ne_top hp1 hp hq1)).lt_top hcoef) + +end Rd diff --git a/LeanPool/FunctionSpaces/Rd/TriebelLizorkin/TriebelLizorkinDifferences.lean b/LeanPool/FunctionSpaces/Rd/TriebelLizorkin/TriebelLizorkinDifferences.lean new file mode 100644 index 0000000000..36a7334e47 --- /dev/null +++ b/LeanPool/FunctionSpaces/Rd/TriebelLizorkin/TriebelLizorkinDifferences.lean @@ -0,0 +1,1100 @@ +/- +Copyright (c) 2026 Mario Ullrich. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Mario Ullrich +-/ +module + +public import LeanPool.FunctionSpaces.Rd.TriebelLizorkin.TriebelLizorkinLocalMeans + +/- +Modified for Lean Pool: module names and imports adapted. +-/ + +/-! +# Ball means of differences for Triebel–Lizorkin spaces + +The **ball mean of differences** of order `L` at level `j` is +`d_j f(x) = |B(0, 2^(-j))|⁻¹ ∫_{B(0, 2^(-j))} |Δ^L_h f(x)| dh` (`Rd.ballMeanDiff`), and +`‖f‖_p + ‖ x ↦ ‖(2^(js) d_j f(x))_j‖_{ℓ_q} ‖_p` (`Rd.tlDiffNorm`) is the quasi-norm of +Triebel–Lizorkin type built from it. For `1 < p < ∞`, `1 < q ≤ ∞` and `0 < s < L` it is equivalent +to the local means quasi-norm of `FunctionSpaces.Rd.TriebelLizorkin.TriebelLizorkinLocalMeans`, with +explicit constants (`Rd.LocalMeansBump.tlDiffNorm_le_tlLocalMeansNorm`, +`Rd.LocalMeansBump.tlLocalMeansNorm_le_tlDiffNorm`), so `F^s_{p,q}` is described by ball means of +differences (`Rd.memTriebelLizorkin_iff_tlDiffNorm_lt_top`). + +The proof is pointwise in `x`. A local mean is a difference of two averaged differences of `f`, +so `|k_{j+r+1} ⋆ f(x)| ≤ C d_j f(x)`, where `r = ⌈R⌉₊` gives `R < 2^r` +(`Rd.LocalMeansBump.enorm_localMean_le_ballMeanDiff`). Conversely, the differences of +`η_i ⋆ g` are bounded by the maximal function of `g`, with the factor `2^(-(j-i)L)` for `i ≤ j` +from the smoothness of `η_i` and the factor `1` for `i > j` from averaging the shifts over the +ball (`Rd.LocalMeansBump.ballMeanDiff_conv_dual_le`); the reproducing formula +`f = ∑_i η_i ⋆ k_i ⋆ f` then gives `d_j f(x) ≤ C ∑_i c_{ji} M(k_i ⋆ f)(x)` +(`Rd.LocalMeansBump.ballMeanDiff_le_tsum_maximal`), and the almost diagonal estimate and the +Fefferman–Stein inequality finish. In the bounds for `η_i ⋆ g`, the **fine levels** are the ball +levels `j ≥ i`, at least the level `i` of the kernel, and the **coarse levels** are the ball +levels `j < i`. +-/ + +@[expose] public section + +open MeasureTheory Module Metric Filter Set +open scoped ENNReal Topology Pointwise + +open ENNReal (lqNorm dyadicWeight) + +namespace Rd + +variable {V : Type*} [NormedAddCommGroup V] [InnerProductSpace ℝ V] [FiniteDimensional ℝ V] + [MeasurableSpace V] [BorelSpace V] + +/-! ### Ball means of differences -/ + +/-- The **ball mean of differences** of order `L` at level `j`: +`d_j f(x) = |B(0, 2^(-j))|⁻¹ ∫_{B(0, 2^(-j))} |Δ^L_h f(x)| dh`, the mean of the differences of +`f` at `x` over all steps of length less than `2^(-j)`. -/ +noncomputable def ballMeanDiff (L j : ℕ) (f : V → ℂ) (x : V) : ℝ≥0∞ := + (volume (ball (0 : V) (1 / 2 ^ j)))⁻¹ * ∫⁻ h in ball (0 : V) (1 / 2 ^ j), ‖(fwdDiff h)^[L] f x‖ₑ + +/-- The radius `2^(-j)` of the balls of the ball means is positive. -/ +theorem one_div_two_pow_pos (j : ℕ) : (0 : ℝ) < 1 / 2 ^ j := by positivity + +/-- `2^(jn) |B(0, 2^(-j))| = |B(0, 1)|`. -/ +theorem two_pow_mul_volume_ball_one_div (j : ℕ) : + 2 ^ (j * finrank ℝ V) * volume (ball (0 : V) (1 / 2 ^ j)) = volume (ball (0 : V) 1) := by + have h := Measure.addHaar_ball_mul_of_pos volume (0 : V) (r := 2 ^ j) (by positivity) (1 / 2 ^ j) + rw [ENNReal.ofReal_pow (pow_nonneg zero_le_two j), mul_one_div_cancel (by positivity), + ENNReal.ofReal_pow zero_le_two, ENNReal.ofReal_ofNat, ← pow_mul] at h + exact h.symm + +omit [FiniteDimensional ℝ V] [MeasurableSpace V] [BorelSpace V] in +/-- The scaling factor of the steps: `|((-2^(-m))^n)⁻¹| = 2^(mn)`. -/ +theorem ofReal_abs_inv_neg_inv_two_pow_pow (m : ℕ) : + ENNReal.ofReal |((-((2 : ℝ) ^ m)⁻¹) ^ finrank ℝ V)⁻¹| = 2 ^ (m * finrank ℝ V) := by + rw [abs_inv, abs_pow, abs_neg, abs_inv, abs_of_pos (by positivity), inv_pow, inv_inv, + ← pow_mul, ENNReal.ofReal_pow zero_le_two, ENNReal.ofReal_ofNat] + +/-- The integral of the differences over the ball is `|B(0, 2^(-j))| d_j f(x)`. -/ +theorem setLIntegral_eq_mul_ballMeanDiff (L j : ℕ) (f : V → ℂ) (x : V) : + ∫⁻ h in ball (0 : V) (1 / 2 ^ j), ‖(fwdDiff h)^[L] f x‖ₑ = + volume (ball (0 : V) (1 / 2 ^ j)) * ballMeanDiff L j f x := by + rw [ballMeanDiff, ← mul_assoc, ENNReal.mul_inv_cancel + (volume_ball_ne_zero (one_div_two_pow_pos j)) (volume_ball_ne_top _), one_mul] + +/-- A bound of the differences `|Δ^L_h f(x)| ≤ c` for all steps `‖h‖ < 2^(-j)` bounds the ball +mean: `d_j f(x) ≤ c`. -/ +theorem ballMeanDiff_le_of_forall {L j : ℕ} {f : V → ℂ} {x : V} {c : ℝ≥0∞} + (h : ∀ v ∈ ball (0 : V) (1 / 2 ^ j), ‖(fwdDiff v)^[L] f x‖ₑ ≤ c) : + ballMeanDiff L j f x ≤ c := by + rw [ballMeanDiff, ENNReal.inv_mul_le_iff (volume_ball_ne_zero (one_div_two_pow_pos j)) + (volume_ball_ne_top _)] + calc ∫⁻ v in ball (0 : V) (1 / 2 ^ j), ‖(fwdDiff v)^[L] f x‖ₑ + ≤ ∫⁻ _ in ball (0 : V) (1 / 2 ^ j), c := setLIntegral_mono' measurableSet_ball h + _ = volume (ball (0 : V) (1 / 2 ^ j)) * c := by rw [setLIntegral_const, mul_comm] + +/-- **Smaller balls**: `d_{j+r} f(x) ≤ 2^(rn) d_j f(x)`, since the ball of radius `2^(-j-r)` lies in +the ball of radius `2^(-j)` and has `2^(-rn)` times its volume. -/ +theorem ballMeanDiff_level_add_le (L j r : ℕ) (f : V → ℂ) (x : V) : + ballMeanDiff L (j + r) f x ≤ 2 ^ (r * finrank ℝ V) * ballMeanDiff L j f x := by + have hvol : volume (ball (0 : V) (1 / 2 ^ j)) = + 2 ^ (r * finrank ℝ V) * volume (ball (0 : V) (1 / 2 ^ (j + r))) := by + have h := Measure.addHaar_ball_mul_of_pos volume (0 : V) (r := 2 ^ r) (by positivity) + (1 / 2 ^ (j + r)) + rw [ENNReal.ofReal_pow (pow_nonneg zero_le_two r), ENNReal.ofReal_pow zero_le_two, + ENNReal.ofReal_ofNat, ← pow_mul, pow_add, + show (2 : ℝ) ^ r * (1 / (2 ^ j * 2 ^ r)) = 1 / 2 ^ j by field_simp] at h + rw [h, pow_add] + have hsub : ball (0 : V) (1 / 2 ^ (j + r)) ⊆ ball (0 : V) (1 / 2 ^ j) := + ball_subset_ball (one_div_le_one_div_of_le (by positivity) + (pow_le_pow_right₀ one_le_two (Nat.le_add_right j r))) + have h2 : (2 : ℝ≥0∞) ^ (r * finrank ℝ V) ≠ 0 := pow_ne_zero _ two_ne_zero + have h2' : (2 : ℝ≥0∞) ^ (r * finrank ℝ V) ≠ ∞ := ENNReal.pow_ne_top ENNReal.ofNat_ne_top + rw [ballMeanDiff, ballMeanDiff, hvol, ENNReal.mul_inv (Or.inl h2) (Or.inl h2'), ← mul_assoc, + ← mul_assoc, ENNReal.mul_inv_cancel h2 h2', one_mul] + exact mul_le_mul' le_rfl (lintegral_mono_set hsub) + +/-- For measurable `f` and fixed `x` the differences `h ↦ |Δ^L_h f(x)|` are measurable. -/ +theorem measurable_enorm_higherDiff_step {f : V → ℂ} (hf : Measurable f) (L : ℕ) (x : V) : + Measurable fun h : V => ‖(fwdDiff h)^[L] f x‖ₑ := + (measurable_enorm_higherDiff_uncurry hf L).comp measurable_prodMk_left + +/-- The ball means of a measurable function are measurable (Tonelli's theorem, Mathlib's +`Measurable.lintegral_prod_right'`). -/ +theorem measurable_ballMeanDiff {f : V → ℂ} (hf : Measurable f) (L j : ℕ) : + Measurable (ballMeanDiff L j f) := + ((measurable_enorm_higherDiff_uncurry hf L).lintegral_prod_right' + (ν := volume.restrict (ball (0 : V) (1 / 2 ^ j)))).const_mul _ + +/-- **Ball means of almost everywhere equal functions** agree almost everywhere: at a point `x` +with `f(x) = g(x)` the values `f(x + l h)`, `1 ≤ l ≤ L`, agree for almost every step `h`, since +`h ↦ x + l h` maps null sets to null sets. -/ +theorem ballMeanDiff_congr_ae {f g : V → ℂ} (hfg : f =ᵐ[volume] g) (L j : ℕ) : + ballMeanDiff L j f =ᵐ[volume] ballMeanDiff L j g := by + filter_upwards [hfg] with x hx + have hl : ∀ l : ℕ, ∀ᵐ v ∂(volume : Measure V), f (x + (l : ℝ) • v) = g (x + (l : ℝ) • v) := by + intro l + rcases Nat.eq_zero_or_pos l with rfl | hl + · exact Eventually.of_forall fun v => by simpa using hx + · have hq : QuasiMeasurePreserving (fun v : V => x + (l : ℝ) • v) volume volume := + (measurePreserving_add_left volume x).quasiMeasurePreserving.comp + (Measure.quasiMeasurePreserving_smul volume (by positivity : (l : ℝ) ≠ 0)) + exact hq.ae_eq_comp hfg + have hv : ∀ᵐ v ∂(volume : Measure V), ‖(fwdDiff v)^[L] f x‖ₑ = ‖(fwdDiff v)^[L] g x‖ₑ := by + filter_upwards [ae_all_iff.2 hl] with v hv + rw [higherDiff_apply, higherDiff_apply] + exact congrArg _ (Finset.sum_congr rfl fun l _ => by rw [hv l]) + rw [ballMeanDiff, ballMeanDiff, lintegral_congr_ae (ae_restrict_of_ae hv)] + +/-- **The power of a ball mean** (weighted Jensen inequality): for `1 ≤ P` and measurable `f`, +`(d_j f(x))^P ≤ |B|⁻¹ ∫_B |Δ^L_h f(x)|^P dh` with `B = B(0, 2^(-j))`. -/ +theorem ballMeanDiff_rpow_le {f : V → ℂ} (hf : Measurable f) (L j : ℕ) {P : ℝ} (hP : 1 ≤ P) + (x : V) : + ballMeanDiff L j f x ^ P ≤ ∫⁻ h in ball (0 : V) (1 / 2 ^ j), + (volume (ball (0 : V) (1 / 2 ^ j)))⁻¹ * ‖(fwdDiff h)^[L] f x‖ₑ ^ P := by + set B := ball (0 : V) (1 / 2 ^ j) + have hB0 : volume B ≠ 0 := volume_ball_ne_zero (one_div_two_pow_pos j) + have hc : (volume B)⁻¹ ≠ ∞ := ENNReal.inv_ne_top.2 hB0 + have hmass : ∫⁻ _ in B, (volume B)⁻¹ = 1 := by + rw [setLIntegral_const, ENNReal.inv_mul_cancel hB0 (volume_ball_ne_top _)] + have h := lintegral_mul_rpow_le (μ := volume.restrict B) hP (a := fun _ => (volume B)⁻¹) + aemeasurable_const (measurable_enorm_higherDiff_step hf L x).aemeasurable + rw [hmass, ENNReal.one_rpow, one_mul, lintegral_const_mul' _ _ hc] at h + exact h + +/-- **Ball means are bounded in `L_p`**: `‖d_j f‖_p ≤ 2^L ‖f‖_p` for measurable `f` and +`1 ≤ p < ∞`. By `Rd.ballMeanDiff_rpow_le` and Tonelli's theorem, +`∫ (d_j f)^p ≤ |B|⁻¹ ∫_B ‖Δ^L_h f‖_p^p dh`, and `‖Δ^L_h f‖_p ≤ 2^L ‖f‖_p` +(`Rd.eLpNorm_higherDiff_le`). -/ +theorem eLpNorm_ballMeanDiff_le_of_measurable {p : ℝ≥0∞} (hp1 : 1 ≤ p) (hp : p ≠ ∞) + {f : V → ℂ} (hf : Measurable f) (L j : ℕ) : + eLpNorm (ballMeanDiff L j f) p volume ≤ 2 ^ L * eLpNorm f p volume := by + set B := ball (0 : V) (1 / 2 ^ j) + set X := 2 ^ L * eLpNorm f p volume + have hp0 : p ≠ 0 := (zero_lt_one.trans_le hp1).ne' + have hP1 : 1 ≤ p.toReal := ENNReal.one_le_toReal_of_one_le hp1 hp + have hP : 0 < p.toReal := zero_lt_one.trans_le hP1 + have hB0 : volume B ≠ 0 := volume_ball_ne_zero (one_div_two_pow_pos j) + have hc : (volume B)⁻¹ ≠ ∞ := ENNReal.inv_ne_top.2 hB0 + have hD := measurable_enorm_higherDiff_uncurry hf L + have hstep : ∀ v : V, ∫⁻ x, ‖(fwdDiff v)^[L] f x‖ₑ ^ p.toReal ≤ X ^ p.toReal := fun v => by + rw [← eLpNorm_rpow_eq (aestronglyMeasurable_higherDiff hf.aestronglyMeasurable L v) hp0 hp] + exact ENNReal.rpow_le_rpow (eLpNorm_higherDiff_le hf.aestronglyMeasurable hp1 L v) hP.le + have hint : ∫⁻ x, ballMeanDiff L j f x ^ p.toReal ≤ X ^ p.toReal := + calc ∫⁻ x, ballMeanDiff L j f x ^ p.toReal + ≤ ∫⁻ x, ∫⁻ v in B, (volume B)⁻¹ * ‖(fwdDiff v)^[L] f x‖ₑ ^ p.toReal := + lintegral_mono fun x => ballMeanDiff_rpow_le hf L j hP1 x + _ = ∫⁻ v in B, ∫⁻ x, (volume B)⁻¹ * ‖(fwdDiff v)^[L] f x‖ₑ ^ p.toReal := + lintegral_lintegral_swap ((hD.pow_const _).const_mul _).aemeasurable + _ ≤ ∫⁻ _ in B, (volume B)⁻¹ * X ^ p.toReal := lintegral_mono fun v => by + rw [lintegral_const_mul' _ _ hc] + exact mul_le_mul' le_rfl (hstep v) + _ = X ^ p.toReal := by + rw [setLIntegral_const, mul_comm, ← mul_assoc, + ENNReal.mul_inv_cancel hB0 (volume_ball_ne_top _), one_mul] + rw [← ENNReal.rpow_le_rpow_iff hP, + eLpNorm_rpow_eq_lintegral hp0 hp (measurable_ballMeanDiff hf L j).aemeasurable] + exact hint + +/-- **Ball means are bounded in `L_p`**: `‖d_j f‖_p ≤ 2^L ‖f‖_p` for almost everywhere strongly +measurable `f` and `1 ≤ p < ∞`, through a measurable representative +(`Rd.ballMeanDiff_congr_ae`). -/ +theorem eLpNorm_ballMeanDiff_le {p : ℝ≥0∞} (hp1 : 1 ≤ p) (hp : p ≠ ∞) {f : V → ℂ} + (hf : AEStronglyMeasurable f volume) (L j : ℕ) : + eLpNorm (ballMeanDiff L j f) p volume ≤ 2 ^ L * eLpNorm f p volume := by + rw [eLpNorm_congr_ae (ballMeanDiff_congr_ae hf.ae_eq_mk L j), eLpNorm_congr_ae hf.ae_eq_mk] + exact eLpNorm_ballMeanDiff_le_of_measurable hp1 hp hf.stronglyMeasurable_mk.measurable L j + +/-- **Subadditivity**: `d_j (f + g)(x) ≤ d_j f(x) + d_j g(x)` for measurable `f` and every `g`. +One summand has to be measurable, since the lower Lebesgue integral of a sum of two +non-measurable functions can exceed the sum of their integrals. -/ +theorem ballMeanDiff_add_le {f : V → ℂ} (hf : Measurable f) (g : V → ℂ) (L j : ℕ) (x : V) : + ballMeanDiff L j (f + g) x ≤ ballMeanDiff L j f x + ballMeanDiff L j g x := by + rw [ballMeanDiff, ballMeanDiff, ballMeanDiff, ← mul_add] + gcongr + calc ∫⁻ v in ball (0 : V) (1 / 2 ^ j), ‖(fwdDiff v)^[L] (f + g) x‖ₑ + ≤ ∫⁻ v in ball (0 : V) (1 / 2 ^ j), + (‖(fwdDiff v)^[L] f x‖ₑ + ‖(fwdDiff v)^[L] g x‖ₑ) := lintegral_mono fun v => by + rw [fwdDiff_iter_add, Pi.add_apply] + exact eNorm_add_le _ _ + _ = _ := lintegral_add_left' (measurable_enorm_higherDiff_step hf L x).aemeasurable _ + +/-- The ball means of the zero function vanish. -/ +theorem ballMeanDiff_zero (L j : ℕ) (x : V) : ballMeanDiff L j (0 : V → ℂ) x = 0 := by + simp [ballMeanDiff, higherDiff_apply] + +/-- **Subadditivity for finite sums**: `d_j (∑_{i ∈ s} f_i)(x) ≤ ∑_{i ∈ s} d_j f_i(x)` for +measurable `f_i` (Mathlib's `Finset.le_sum_of_subadditive_on_pred`, with measurability as the +predicate closed under sums). -/ +theorem ballMeanDiff_finsetSum_le {ι : Type*} {s : Finset ι} {f : ι → V → ℂ} + (hf : ∀ i ∈ s, Measurable (f i)) (L j : ℕ) (x : V) : + ballMeanDiff L j (∑ i ∈ s, f i) x ≤ ∑ i ∈ s, ballMeanDiff L j (f i) x := + Finset.le_sum_of_subadditive_on_pred (fun F => ballMeanDiff L j F x) Measurable + (ballMeanDiff_zero L j x).le (fun _ G hF _ => ballMeanDiff_add_le hF G L j x) + (fun _ _ hF hG => hF.add hG) f hf + +/-! ### The ball means quasi-norm -/ + +section Quasinorm + +variable {p : ℝ≥0∞} + +/-- The **ball means quasi-norm of Triebel–Lizorkin type** +`‖f‖_p + ‖ x ↦ ‖(2^(js) d_j f(x))_j‖_{ℓ_q} ‖_p` of `f ∈ L_p`, with the ball means of +differences of order `L`: the `ℓ_q` norm at each point, then the `L_p` norm. -/ +noncomputable def tlDiffNorm (L : ℕ) (s : ℝ) (q : ℝ≥0∞) (f : Lp ℂ p (volume : Measure V)) : + ℝ≥0∞ := + ‖f‖ₑ + eLpNorm (fun x => lqNorm q (fun j => dyadicWeight s j * ballMeanDiff L j f x)) p volume + +/-- The pointwise `ℓ_q` norm of the weighted ball means is measurable. -/ +theorem measurable_lqNorm_ballMeanDiff (L : ℕ) (s : ℝ) (q : ℝ≥0∞) + (f : Lp ℂ p (volume : Measure V)) : + Measurable fun x => lqNorm q (fun j => dyadicWeight s j * ballMeanDiff L j f x) := + measurable_lqNorm_comp (fun j => + (measurable_ballMeanDiff (Lp.stronglyMeasurable f).measurable L j).const_mul _) q + +end Quasinorm + +/-! ### Tools for ball means of convolutions -/ + +omit [InnerProductSpace ℝ V] [FiniteDimensional ℝ V] [MeasurableSpace V] [BorelSpace V] in +/-- A step in the ball `B(0, 2^(-j))` has `‖h‖ ≤ 2^(-j)` in `[0, ∞]`. -/ +theorem enorm_le_inv_two_pow_of_mem_ball {j : ℕ} {h : V} (hh : h ∈ ball (0 : V) (1 / 2 ^ j)) : + ‖h‖ₑ ≤ ((2 : ℝ≥0∞) ^ j)⁻¹ := by + rw [mem_ball_zero_iff] at hh + rw [← ofReal_norm] + refine (ENNReal.ofReal_le_ofReal hh.le).trans_eq ?_ + rw [one_div, ENNReal.ofReal_inv_of_pos (by positivity), ENNReal.ofReal_pow zero_le_two, + ENNReal.ofReal_ofNat] + +/-- `2^(iL) 2^(-jL) = 2^(-(j-i)L)` for `i ≤ j`. -/ +theorem dyadicWeight_mul_dyadicWeight_neg_of_le (L : ℝ) {i j : ℕ} (hij : i ≤ j) : + dyadicWeight L i * dyadicWeight (-L) j = dyadicWeight (-L) (j - i) := by + obtain ⟨k, rfl⟩ := Nat.exists_eq_add_of_le hij + rw [Nat.add_sub_cancel_left, add_comm i k, ENNReal.dyadicWeight_add_nat, mul_left_comm, + mul_comm (dyadicWeight L i), ENNReal.dyadicWeight_neg_mul_self, mul_one] + +/-- For `l ≥ 1` the steps `v` with `‖x + l v - w‖ < ρ` form a set of measure at most +`|B(0,ρ)|`, a ball of radius `ρ / l`. -/ +theorem volume_setOf_dist_add_smul_lt_le {l : ℝ} (hl : 1 ≤ l) (ρ : ℝ) (x w : V) : + volume {v : V | dist w (x + l • v) < ρ} ≤ volume (ball (0 : V) ρ) := by + have hl0 : 0 < l := zero_lt_one.trans_le hl + have hset : {v : V | dist w (x + l • v) < ρ} = (fun v => l • v) ⁻¹' ball (w - x) ρ := by + ext v + simp only [mem_ofPred_eq, mem_preimage, mem_ball, dist_eq_norm] + rw [show w - (x + l • v) = -(l • v - (w - x)) by abel, norm_neg] + rw [hset, Measure.addHaar_preimage_smul volume hl0.ne', Measure.addHaar_ball_center] + refine (mul_le_mul' (ENNReal.ofReal_le_one.2 ?_) le_rfl).trans_eq (one_mul _) + rw [abs_of_pos (inv_pos.2 (pow_pos hl0 _))] + exact inv_le_one_of_one_le₀ (one_le_pow₀ hl) + +omit [FiniteDimensional ℝ V] [MeasurableSpace V] [BorelSpace V] in +/-- **A point of a moving ball**: for `l ≥ 0`, a step `v ∈ B(0,a)` and points `x, w`, +`1_{B(x + l v, ρ)}(w) G(w) ≤ 1_{B(x, ρ + l a)}(w) G(w) 1_T(v)` with +`T = {v' : dist(w, x + l v') < ρ}`: a point `w` of the ball `B(x + l v, ρ)` lies in +`B(x, ρ + l a)` by the triangle inequality, and `v ∈ T` by definition. -/ +theorem indicator_ball_add_smul_le (G : V → ℝ≥0∞) {l : ℝ} (hl0 : 0 ≤ l) {a : ℝ} (ρ : ℝ) + (x : V) {v : V} (hv : v ∈ ball (0 : V) a) (w : V) : + (ball (x + l • v) ρ).indicator G w ≤ + (ball x (ρ + l * a)).indicator G w * {v : V | dist w (x + l • v) < ρ}.indicator 1 v := by + by_cases hw : w ∈ ball (x + l • v) ρ + · have hwx : w ∈ ball x (ρ + l * a) := by + rw [mem_ball] at hw ⊢ + rw [mem_ball_zero_iff] at hv + calc dist w x ≤ dist w (x + l • v) + dist (x + l • v) x := dist_triangle _ _ _ + _ < ρ + l * a := by + rw [dist_eq_norm (x + l • v), add_sub_cancel_left, norm_smul, Real.norm_of_nonneg hl0] + exact add_lt_add_of_lt_of_le hw (mul_le_mul_of_nonneg_left hv.le hl0) + rw [indicator_of_mem hw, indicator_of_mem hwx, + indicator_of_mem (show v ∈ {v : V | dist w (x + l • v) < ρ} from hw), Pi.one_apply, mul_one] + · rw [indicator_of_notMem hw] + exact zero_le + +/-- **One point under moving balls**: for `l ≥ 1`, every `a, ρ` and points `x, w`, +`∫_{B(0,a)} 1_{B(x + l v, ρ)}(w) G(w) dv ≤ 1_{B(x, ρ + l a)}(w) G(w) |B(0,ρ)|`: the integrand is +at most `1_{B(x, ρ + l a)}(w) G(w)` times the indicator of the steps `v` whose ball contains `w` +(`Rd.indicator_ball_add_smul_le`), a set of measure at most `|B(0,ρ)|` +(`Rd.volume_setOf_dist_add_smul_lt_le`). -/ +theorem setLIntegral_indicator_ball_add_smul_le (G : V → ℝ≥0∞) {l : ℝ} (hl : 1 ≤ l) (a ρ : ℝ) + (x w : V) : + ∫⁻ v in ball (0 : V) a, (ball (x + l • v) ρ).indicator G w ≤ + (ball x (ρ + l * a)).indicator G w * volume (ball (0 : V) ρ) := by + have hT : MeasurableSet {v : V | dist w (x + l • v) < ρ} := + (isOpen_lt (continuous_const.dist (continuous_const.add (continuous_id.const_smul l))) + continuous_const).measurableSet + calc ∫⁻ v in ball (0 : V) a, (ball (x + l • v) ρ).indicator G w + ≤ ∫⁻ v in ball (0 : V) a, (ball x (ρ + l * a)).indicator G w * + {v : V | dist w (x + l • v) < ρ}.indicator 1 v := + setLIntegral_mono' measurableSet_ball fun v hv => + indicator_ball_add_smul_le G (zero_le_one.trans hl) ρ x hv w + _ ≤ ∫⁻ v, (ball x (ρ + l * a)).indicator G w * + {v : V | dist w (x + l • v) < ρ}.indicator 1 v := setLIntegral_le_lintegral _ _ + _ = (ball x (ρ + l * a)).indicator G w * volume {v : V | dist w (x + l • v) < ρ} := by + rw [lintegral_const_mul _ (measurable_one.indicator hT), lintegral_indicator_one hT] + _ ≤ _ := mul_le_mul' le_rfl (volume_setOf_dist_add_smul_lt_le hl ρ x w) + +/-- **Averaging moving balls** (Tonelli): for `l ≥ 1`, every `a, ρ`, `x` and every almost +everywhere measurable `G : V → [0, ∞]`, +`∫_{B(0,a)} ∫_{B(x + l v, ρ)} G(w) dw dv ≤ |B(0,ρ)| ∫_{B(x, ρ + l a)} G`: a point `w` lies in +`B(x + l v, ρ)` only for `v` in a set of measure at most `|B(0,ρ)|`, and only if +`w ∈ B(x, ρ + l a)` (`Rd.setLIntegral_indicator_ball_add_smul_le`). -/ +theorem setLIntegral_setLIntegral_ball_le {G : V → ℝ≥0∞} (hG : AEMeasurable G volume) {l : ℝ} + (hl : 1 ≤ l) (a ρ : ℝ) (x : V) : + ∫⁻ v in ball (0 : V) a, ∫⁻ w in ball (x + l • v) ρ, G w ≤ + volume (ball (0 : V) ρ) * ∫⁻ w in ball x (ρ + l * a), G w := by + have hS : MeasurableSet {z : V × V | dist z.2 (x + l • z.1) < ρ} := + (isOpen_lt (continuous_snd.dist (continuous_const.add (continuous_fst.const_smul l))) + continuous_const).measurableSet + have hmeas : AEMeasurable (Function.uncurry fun v w => (ball (x + l • v) ρ).indicator G w) + ((volume.restrict (ball (0 : V) a)).prod volume) := by + have heq : (Function.uncurry fun v w => (ball (x + l • v) ρ).indicator G w) = + {z : V × V | dist z.2 (x + l • z.1) < ρ}.indicator fun z => G z.2 := by + funext z + rfl + rw [heq] + exact hG.comp_snd.indicator hS + calc ∫⁻ v in ball (0 : V) a, ∫⁻ w in ball (x + l • v) ρ, G w + = ∫⁻ v in ball (0 : V) a, ∫⁻ w, (ball (x + l • v) ρ).indicator G w := by + simp only [lintegral_indicator measurableSet_ball] + _ = ∫⁻ w, ∫⁻ v in ball (0 : V) a, (ball (x + l • v) ρ).indicator G w := + lintegral_lintegral_swap hmeas + _ ≤ ∫⁻ w, (ball x (ρ + l * a)).indicator G w * volume (ball (0 : V) ρ) := + lintegral_mono fun w => setLIntegral_indicator_ball_add_smul_le G hl a ρ x w + _ = volume (ball (0 : V) ρ) * ∫⁻ w in ball x (ρ + l * a), G w := by + rw [lintegral_mul_const' _ _ (volume_ball_ne_top ρ), lintegral_indicator measurableSet_ball, + mul_comm] + +/-! ### Local means by ball means -/ + +namespace LocalMeansBump + +variable (b : LocalMeansBump V) + +/-- The supremum `sup |b|` of a bump `b` is finite, since a bump is continuous with compact +support. -/ +theorem iSup_enorm_lt_top : (⨆ z, ‖b.toFun z‖ₑ) < ∞ := by + obtain ⟨A, hA⟩ := b.contDiff.continuous.bounded_above_of_compact_support b.hasCompactSupport + exact iSup_enorm_lt_top_of_bddAbove ⟨A, Set.forall_mem_range.2 hA⟩ + +/-- The constant `sup |b| |B(0,1)| 2^(rn) (1 + 2^n)` of the bound of the local means by ball +means, with `r = ⌈R⌉₊`, the least natural number at least the radius `R` of the bump `b`. -/ +noncomputable def ballMeanConst : ℝ≥0∞ := + (⨆ z, ‖b.toFun z‖ₑ) * volume (ball (0 : V) 1) * 2 ^ (⌈b.radius⌉₊ * finrank ℝ V) * + (1 + 2 ^ finrank ℝ V) + +/-- The constant of the bound of the local means by ball means is finite. -/ +theorem ballMeanConst_ne_top : b.ballMeanConst ≠ ∞ := + ENNReal.mul_ne_top (ENNReal.mul_ne_top (ENNReal.mul_ne_top b.iSup_enorm_lt_top.ne + (volume_ball_ne_top 1)) (ENNReal.pow_ne_top ENNReal.ofNat_ne_top)) + (ENNReal.add_ne_top.2 ⟨ENNReal.one_ne_top, ENNReal.pow_ne_top ENNReal.ofNat_ne_top⟩) + +/-- The steps `-2^(-(j+k)) z` with `‖z‖ ≤ R < 2^k` lie in the ball `B(0, 2^(-j))`. -/ +theorem smul_closedBall_subset_ball (j : ℕ) {k : ℕ} (hk : b.radius < 2 ^ k) : + (-((2 : ℝ) ^ (j + k))⁻¹) • closedBall (0 : V) b.radius ⊆ ball (0 : V) (1 / 2 ^ j) := by + rw [smul_closedBall _ _ b.radius_nonneg, smul_zero] + refine closedBall_subset_ball ?_ + rw [norm_neg, norm_inv, Real.norm_of_nonneg (by positivity), pow_add, mul_inv, mul_assoc, + one_div] + have h2 : ((2 : ℝ) ^ k)⁻¹ * b.radius < 1 := by + rw [inv_mul_lt_iff₀ (by positivity), mul_one] + exact hk + calc ((2 : ℝ) ^ j)⁻¹ * (((2 : ℝ) ^ k)⁻¹ * b.radius) < ((2 : ℝ) ^ j)⁻¹ * 1 := + mul_lt_mul_of_pos_left h2 (by positivity) + _ = ((2 : ℝ) ^ j)⁻¹ := mul_one _ + +/-- **One averaged difference by a ball mean**: for the bump `b`, `R < 2^k`, every `f`, `x` +and `j`, `∫ |b(z)| |Δ^L_{-2^(-(j+k)) z} f(x)| dz ≤ sup |b| |B(0,1)| 2^(kn) d_j f(x)`. The steps +`-2^(-(j+k)) z`, `‖z‖ ≤ R`, fill a ball inside `B(0, 2^(-j))`, and the change of variables +`h = -2^(-(j+k)) z` (`Rd.setLIntegral_comp_smul`) costs the factor `2^((j+k)n)`. -/ +theorem lintegral_enorm_mul_higherDiff_le (L j : ℕ) {k : ℕ} (hk : b.radius < 2 ^ k) + (f : V → ℂ) (x : V) : + ∫⁻ z, ‖b.toFun z‖ₑ * ‖(fwdDiff (-((2 : ℝ) ^ (j + k))⁻¹ • z))^[L] f x‖ₑ ≤ + (⨆ z, ‖b.toFun z‖ₑ) * volume (ball (0 : V) 1) * 2 ^ (k * finrank ℝ V) * + ballMeanDiff L j f x := by + have hr : -((2 : ℝ) ^ (j + k))⁻¹ ≠ 0 := neg_ne_zero.2 (inv_ne_zero (by positivity)) + have hS : (⨆ z, ‖b.toFun z‖ₑ) ≠ ∞ := b.iSup_enorm_lt_top.ne + have hpt : ∀ z, ‖b.toFun z‖ₑ * ‖(fwdDiff (-((2 : ℝ) ^ (j + k))⁻¹ • z))^[L] f x‖ₑ ≤ + (closedBall (0 : V) b.radius).indicator (fun z => (⨆ z, ‖b.toFun z‖ₑ) * + ‖(fwdDiff (-((2 : ℝ) ^ (j + k))⁻¹ • z))^[L] f x‖ₑ) z := fun z => by + by_cases hz : z ∈ closedBall (0 : V) b.radius + · rw [indicator_of_mem hz] + exact mul_le_mul' (le_iSup (fun z => ‖b.toFun z‖ₑ) z) le_rfl + · rw [indicator_of_notMem hz, b.eq_zero z (by simpa using hz), eNorm_zero, zero_mul] + calc ∫⁻ z, ‖b.toFun z‖ₑ * ‖(fwdDiff (-((2 : ℝ) ^ (j + k))⁻¹ • z))^[L] f x‖ₑ + ≤ ∫⁻ z in closedBall (0 : V) b.radius, (⨆ z, ‖b.toFun z‖ₑ) * + ‖(fwdDiff (-((2 : ℝ) ^ (j + k))⁻¹ • z))^[L] f x‖ₑ := by + rw [← lintegral_indicator measurableSet_closedBall] + exact lintegral_mono hpt + _ = (⨆ z, ‖b.toFun z‖ₑ) * (ENNReal.ofReal |((-((2 : ℝ) ^ (j + k))⁻¹) ^ finrank ℝ V)⁻¹| * + ∫⁻ v in (-((2 : ℝ) ^ (j + k))⁻¹) • closedBall (0 : V) b.radius, + ‖(fwdDiff v)^[L] f x‖ₑ) := by + rw [lintegral_const_mul' _ _ hS] + exact congrArg _ (setLIntegral_comp_smul (fun v => ‖(fwdDiff v)^[L] f x‖ₑ) hr _) + _ ≤ (⨆ z, ‖b.toFun z‖ₑ) * (2 ^ ((j + k) * finrank ℝ V) * + ∫⁻ v in ball (0 : V) (1 / 2 ^ j), ‖(fwdDiff v)^[L] f x‖ₑ) := by + rw [ofReal_abs_inv_neg_inv_two_pow_pow] + exact mul_le_mul' le_rfl (mul_le_mul' le_rfl + (lintegral_mono_set (b.smul_closedBall_subset_ball j hk))) + _ = _ := by + rw [setLIntegral_eq_mul_ballMeanDiff, add_mul, pow_add, + ← two_pow_mul_volume_ball_one_div (V := V) j] + ring + +/-- **Local means by ball means**: let `r = ⌈R⌉₊`, so that `R < 2^r`. For every order `L`, +`1 ≤ p < ∞`, `f ∈ L_p`, almost every `x` and every level `j`, +`|k_{j+r+1} ⋆ f(x)| ≤ C d_j f(x)` with `C = Rd.LocalMeansBump.ballMeanConst`. Since +`k_{J+1} ⋆ f = (f - m_{2^J} ⋆ f) - (f - m_{2^(J+1)} ⋆ f)` with `J = j + r`, and each term +averages differences with steps `-2^(-J) z` or `-2^(-J-1) z`, `‖z‖ ≤ R` +(`Rd.ae_enorm_sub_conv_dilate_momentKernel_le`). -/ +theorem enorm_localMean_le_ballMeanDiff {p : ℝ≥0∞} [Fact (1 ≤ p)] (L : ℕ) (hp : p ≠ ∞) + (f : Lp ℂ p (volume : Measure V)) : + ∀ᵐ x ∂volume, ∀ j, ‖conv (b.kernel L (j + ⌈b.radius⌉₊ + 1)) f volume x‖ₑ ≤ + b.ballMeanConst * ballMeanDiff L j f x := by + have hp1 : 1 ≤ p := Fact.out + have hr : b.radius < 2 ^ ⌈b.radius⌉₊ := + (Nat.le_ceil _).trans_lt (by exact_mod_cast Nat.lt_two_pow_self) + have hr1 : b.radius < 2 ^ (⌈b.radius⌉₊ + 1) := + hr.trans (pow_lt_pow_right₀ one_lt_two (Nat.lt_succ_self _)) + refine ae_all_iff.2 fun j => ?_ + filter_upwards [sub_conv_ae hp1 hp (b.integrable_scaled L (j + ⌈b.radius⌉₊ + 1)) + (b.integrable_scaled L (j + ⌈b.radius⌉₊)) (Lp.memLp f), + ae_enorm_sub_conv_dilate_momentKernel_le hp1 hp b.integrable b.integral_eq_one + (Lp.memLp f) L (c := (2 : ℝ) ^ (j + ⌈b.radius⌉₊)) (by positivity), + ae_enorm_sub_conv_dilate_momentKernel_le hp1 hp b.integrable b.integral_eq_one + (Lp.memLp f) L (c := (2 : ℝ) ^ (j + (⌈b.radius⌉₊ + 1))) (by positivity)] + with x hx hx1 hx2 + have hk : b.kernel L (j + ⌈b.radius⌉₊ + 1) = + b.scaled L (j + ⌈b.radius⌉₊ + 1) - b.scaled L (j + ⌈b.radius⌉₊) := rfl + have hsplit : ∀ a c d : ℂ, c - d = (a - d) - (a - c) := fun a c d => by ring + rw [hk, hx, Pi.sub_apply, hsplit ((f : V → ℂ) x)] + calc _ ≤ ‖(f : V → ℂ) x - conv (b.scaled L (j + ⌈b.radius⌉₊)) f volume x‖ₑ + + ‖(f : V → ℂ) x - conv (b.scaled L (j + ⌈b.radius⌉₊ + 1)) f volume x‖ₑ := eNorm_sub_le + _ ≤ (⨆ z, ‖b.toFun z‖ₑ) * volume (ball (0 : V) 1) * 2 ^ (⌈b.radius⌉₊ * finrank ℝ V) * + ballMeanDiff L j f x + (⨆ z, ‖b.toFun z‖ₑ) * volume (ball (0 : V) 1) * + 2 ^ ((⌈b.radius⌉₊ + 1) * finrank ℝ V) * ballMeanDiff L j f x := + add_le_add (hx1.trans (b.lintegral_enorm_mul_higherDiff_le L j hr f x)) + (hx2.trans (b.lintegral_enorm_mul_higherDiff_le L j hr1 f x)) + _ = b.ballMeanConst * ballMeanDiff L j f x := by + rw [ballMeanConst, add_mul, one_mul, pow_add] + ring + +/-! ### Ball means of the dual kernels -/ + +/-- The constant `|B(0,1)| max(A_L (2LR + L + 1)^n, 2^L A_0 (2LR + 1)^n (2LR + L + 1)^n)` of +the bound of ball means by local means, with `A_l = Rd.LocalMeansBump.dualDerivConst L l`, the +bound of the derivatives of order `≤ l` of the dual kernels. -/ +noncomputable def diffByLocalMeansConst (L : ℕ) : ℝ≥0∞ := + volume (ball (0 : V) 1) * max + (ENNReal.ofReal (b.dualDerivConst L L) * + ENNReal.ofReal (2 * L * b.radius + L + 1) ^ finrank ℝ V) + (2 ^ L * ENNReal.ofReal (b.dualDerivConst L 0) * + ENNReal.ofReal (2 * L * b.radius + 1) ^ finrank ℝ V * + ENNReal.ofReal (2 * L * b.radius + L + 1) ^ finrank ℝ V) + +/-- The constant of the bound of ball means by local means is finite. -/ +theorem diffByLocalMeansConst_ne_top (L : ℕ) : b.diffByLocalMeansConst L ≠ ∞ := + ENNReal.mul_ne_top (volume_ball_ne_top 1) (max_ne_top + (ENNReal.mul_ne_top ENNReal.ofReal_ne_top (ENNReal.pow_ne_top ENNReal.ofReal_ne_top)) + (ENNReal.mul_ne_top (ENNReal.mul_ne_top (ENNReal.mul_ne_top + (ENNReal.pow_ne_top ENNReal.ofNat_ne_top) ENNReal.ofReal_ne_top) + (ENNReal.pow_ne_top ENNReal.ofReal_ne_top)) (ENNReal.pow_ne_top ENNReal.ofReal_ne_top))) + +/-- **Differences of the dual kernels**: `|Δ^L_h η_i(y)| ≤ A_L 2^(in) 2^(iL) ‖h‖^L` with +`A_L = Rd.LocalMeansBump.dualDerivConst L L`, the case of the step `h` without dilation in +`Rd.LocalMeansBump.enorm_higherDiff_dual_le`. -/ +theorem enorm_higherDiff_dual_le_mul (L i : ℕ) (h y : V) : + ‖(fwdDiff h)^[L] (b.dual L i) y‖ₑ ≤ + ENNReal.ofReal (b.dualDerivConst L L) * 2 ^ (i * finrank ℝ V) * dyadicWeight (L : ℝ) i * + ‖h‖ₑ ^ L := by + simpa [ENNReal.dyadicWeight_zero_right, eNorm_neg] using b.enorm_higherDiff_dual_le L L i 0 (-h) y + +/-- **Differences of the dual kernels for short steps**: for `i ≤ j` and `‖h‖ < 2^(-j)`, +`|Δ^L_h η_i| ≤ A_L 2^(in) 2^(-(j-i)L) 1_{B(0, (2LR + L + 1) 2^(-i))}`, since `η_i` vanishes +outside `B̄(0, 2LR 2^(-i))` and the points `y + l h`, `l ≤ L`, move by at most +`L 2^(-j) ≤ L 2^(-i)`. -/ +theorem enorm_higherDiff_dual_le_indicator (L : ℕ) {i j : ℕ} (hij : i ≤ j) {h : V} + (hh : h ∈ ball (0 : V) (1 / 2 ^ j)) (y : V) : + ‖(fwdDiff h)^[L] (b.dual L i) y‖ₑ ≤ + ENNReal.ofReal (b.dualDerivConst L L) * 2 ^ (i * finrank ℝ V) * + dyadicWeight (-(L : ℝ)) (j - i) * + (ball (0 : V) ((2 * L * b.radius + L + 1) * (1 / 2 ^ i))).indicator 1 y := by + by_cases hy : y ∈ ball (0 : V) ((2 * L * b.radius + L + 1) * (1 / 2 ^ i)) + · rw [indicator_of_mem hy, Pi.one_apply, mul_one] + refine (b.enorm_higherDiff_dual_le_mul L i h y).trans ?_ + have hhL : ‖h‖ₑ ^ L ≤ dyadicWeight (-(L : ℝ)) j := by + rw [ENNReal.dyadicWeight_neg_natCast] + exact pow_le_pow_left' (enorm_le_inv_two_pow_of_mem_ball hh) L + calc ENNReal.ofReal (b.dualDerivConst L L) * 2 ^ (i * finrank ℝ V) * dyadicWeight (L : ℝ) i * + ‖h‖ₑ ^ L + ≤ ENNReal.ofReal (b.dualDerivConst L L) * 2 ^ (i * finrank ℝ V) * + (dyadicWeight (L : ℝ) i * dyadicWeight (-(L : ℝ)) j) := by + rw [← mul_assoc] + exact mul_le_mul' le_rfl hhL + _ = _ := by rw [dyadicWeight_mul_dyadicWeight_neg_of_le _ hij] + · rw [indicator_of_notMem hy, mul_zero, nonpos_iff_eq_zero, + b.higherDiff_dual_eq_zero L L i ?_, eNorm_zero] + rw [mem_ball_zero_iff, not_lt] at hy + rw [mem_ball_zero_iff] at hh + have hji : (1 : ℝ) / 2 ^ j ≤ 1 / 2 ^ i := + one_div_le_one_div_of_le (by positivity) (pow_le_pow_right₀ one_le_two hij) + have hLh : (L : ℝ) * ‖h‖ ≤ L * (1 / 2 ^ i) := + mul_le_mul_of_nonneg_left (hh.le.trans hji) (Nat.cast_nonneg L) + have hpos : (0 : ℝ) < 1 / 2 ^ i := by positivity + calc 2 * L * b.radius / 2 ^ i + L * ‖h‖ + ≤ 2 * L * b.radius * (1 / 2 ^ i) + L * (1 / 2 ^ i) := by + rw [mul_one_div] + exact add_le_add le_rfl hLh + _ < (2 * L * b.radius + L + 1) * (1 / 2 ^ i) := by nlinarith + _ ≤ ‖y‖ := hy + +/-- **Ball means of `η_i ⋆ g`, fine levels, one step**: for `i ≤ j`, a locally integrable `g`, +`‖h‖ < 2^(-j)` and every `x`, +`|Δ^L_h (η_i ⋆ g)(x)| ≤ A_L (2LR + L + 1)^n |B(0,1)| 2^(-(j-i)L) M|g|(x)`: the difference moves +onto the kernel (`Rd.higherDiff_conv_apply`), and a kernel bounded by a ball acts below the +maximal function (`Rd.lintegral_mul_le_maximal_of_ball`). -/ +theorem enorm_higherDiff_conv_dual_le_of_le (L : ℕ) {i j : ℕ} (hij : i ≤ j) {g : V → ℂ} + (hg : LocallyIntegrable g volume) {h : V} (hh : h ∈ ball (0 : V) (1 / 2 ^ j)) (x : V) : + ‖(fwdDiff h)^[L] (conv (b.dual L i) g volume) x‖ₑ ≤ + ENNReal.ofReal (b.dualDerivConst L L) * + ENNReal.ofReal (2 * L * b.radius + L + 1) ^ finrank ℝ V * volume (ball (0 : V) 1) * + dyadicWeight (-(L : ℝ)) (j - i) * maximal (fun y => ‖g y‖ₑ) x := by + have hc : (0 : ℝ) < 2 * L * b.radius + L + 1 := by + have := b.radius_nonneg + positivity + have hA : ENNReal.ofReal (b.dualDerivConst L L) * 2 ^ (i * finrank ℝ V) * + dyadicWeight (-(L : ℝ)) (j - i) ≠ ∞ := + ENNReal.mul_ne_top (ENNReal.mul_ne_top ENNReal.ofReal_ne_top + (ENNReal.pow_ne_top ENNReal.ofNat_ne_top)) (ENNReal.dyadicWeight_ne_top _ _) + rw [higherDiff_conv_apply (fun v x => integrable_translate_mul_of_locallyIntegrable + (b.continuous_dual L i) (b.hasCompactSupport_dual L i) hg v x)] + refine (enorm_conv_le_lintegral _ _ x).trans ((lintegral_mul_le_maximal_of_ball + (K := fun y => ‖(fwdDiff h)^[L] (b.dual L i) y‖ₑ) hA + (b.enorm_higherDiff_dual_le_indicator L hij hh) (mul_pos hc (one_div_two_pow_pos i)) + (fun y => ‖g y‖ₑ) x).trans (le_of_eq ?_)) + rw [Measure.addHaar_ball_mul_of_pos volume (0 : V) hc, ENNReal.ofReal_pow hc.le, + ← two_pow_mul_volume_ball_one_div (V := V) i] + ring + +/-- **Ball means of `η_i ⋆ g`, fine levels**: for `i ≤ j`, a locally integrable `g` and every +`x`, `d_j(η_i ⋆ g)(x) ≤ C 2^(-(j-i)L) M|g|(x)` with +`C = Rd.LocalMeansBump.diffByLocalMeansConst L`. -/ +theorem ballMeanDiff_conv_dual_le_of_le (L : ℕ) {i j : ℕ} (hij : i ≤ j) {g : V → ℂ} + (hg : LocallyIntegrable g volume) (x : V) : + ballMeanDiff L j (conv (b.dual L i) g volume) x ≤ + b.diffByLocalMeansConst L * dyadicWeight (-(L : ℝ)) (j - i) * + maximal (fun y => ‖g y‖ₑ) x := by + refine (ballMeanDiff_le_of_forall fun h hh => + b.enorm_higherDiff_conv_dual_le_of_le L hij hg hh x).trans ?_ + refine mul_le_mul' (mul_le_mul' ?_ le_rfl) le_rfl + rw [diffByLocalMeansConst, mul_comm _ (volume (ball (0 : V) 1))] + exact mul_le_mul' le_rfl (le_max_left _ _) + +/-- **The dual kernels are bounded with small support**: +`|η_i| ≤ A_0 2^(in) 1_{B(0, (2LR + 1) 2^(-i))}` with +`A_0 = Rd.LocalMeansBump.dualDerivConst L 0`. -/ +theorem enorm_dual_le_indicator (L i : ℕ) (y : V) : + ‖b.dual L i y‖ₑ ≤ ENNReal.ofReal (b.dualDerivConst L 0) * 2 ^ (i * finrank ℝ V) * + (ball (0 : V) ((2 * L * b.radius + 1) * (1 / 2 ^ i))).indicator 1 y := by + by_cases hy : y ∈ ball (0 : V) ((2 * L * b.radius + 1) * (1 / 2 ^ i)) + · rw [indicator_of_mem hy, Pi.one_apply, mul_one] + have h := b.norm_iteratedFDeriv_dual_le L 0 le_rfl i y + rw [norm_iteratedFDeriv_zero, add_zero] at h + rw [← ofReal_norm] + refine (ENNReal.ofReal_le_ofReal h).trans_eq ?_ + rw [ENNReal.ofReal_mul (b.dualDerivConst_nonneg L 0), ENNReal.ofReal_pow zero_le_two, + ENNReal.ofReal_ofNat] + · rw [indicator_of_notMem hy, mul_zero, nonpos_iff_eq_zero, b.dual_eq_zero_of_lt L i ?_, + eNorm_zero] + rw [mem_ball_zero_iff, not_lt] at hy + refine lt_of_lt_of_le ?_ hy + rw [← mul_one_div] + exact mul_lt_mul_of_pos_right (lt_add_one _) (one_div_two_pow_pos i) + +/-- `|η_i ⋆ g(u)| ≤ A_0 2^(in) ∫_{B(u, (2LR + 1) 2^(-i))} |g|` for every `g` and every `u`. -/ +theorem enorm_conv_dual_le (L i : ℕ) (g : V → ℂ) (u : V) : + ‖conv (b.dual L i) g volume u‖ₑ ≤ + ENNReal.ofReal (b.dualDerivConst L 0) * 2 ^ (i * finrank ℝ V) * + ∫⁻ w in ball u ((2 * L * b.radius + 1) * (1 / 2 ^ i)), ‖g w‖ₑ := + (enorm_conv_le_lintegral _ _ u).trans (lintegral_mul_le_setLIntegral_ball + (K := fun y => ‖b.dual L i y‖ₑ) + (ENNReal.mul_ne_top ENNReal.ofReal_ne_top (ENNReal.pow_ne_top ENNReal.ofNat_ne_top)) + (b.enorm_dual_le_indicator L i) (fun w => ‖g w‖ₑ) u) + +/-- `|η_i ⋆ g(x)| ≤ A_0 (2LR + 1)^n |B(0,1)| M|g|(x)` for every `g` and every `x`. -/ +theorem enorm_conv_dual_le_maximal (L i : ℕ) (g : V → ℂ) (x : V) : + ‖conv (b.dual L i) g volume x‖ₑ ≤ ENNReal.ofReal (b.dualDerivConst L 0) * + ENNReal.ofReal (2 * L * b.radius + 1) ^ finrank ℝ V * volume (ball (0 : V) 1) * + maximal (fun y => ‖g y‖ₑ) x := by + have hc : (0 : ℝ) < 2 * L * b.radius + 1 := by + have := b.radius_nonneg + positivity + refine (b.enorm_conv_dual_le L i g x).trans ?_ + calc ENNReal.ofReal (b.dualDerivConst L 0) * 2 ^ (i * finrank ℝ V) * + ∫⁻ w in ball x ((2 * L * b.radius + 1) * (1 / 2 ^ i)), ‖g w‖ₑ + ≤ ENNReal.ofReal (b.dualDerivConst L 0) * 2 ^ (i * finrank ℝ V) * + (volume (ball (0 : V) ((2 * L * b.radius + 1) * (1 / 2 ^ i))) * + maximal (fun y => ‖g y‖ₑ) x) := + mul_le_mul' le_rfl (setLIntegral_ball_le_mul_maximal + (mul_pos hc (one_div_two_pow_pos i)) _ x) + _ = _ := by + rw [Measure.addHaar_ball_mul_of_pos volume (0 : V) hc, ENNReal.ofReal_pow hc.le, + ← two_pow_mul_volume_ball_one_div (V := V) i] + ring + +/-- **Averages of shifted `η_i ⋆ g`**: for `j ≤ i`, `1 ≤ l ≤ L`, a locally integrable `g` and +every `x`, `⨍_B |η_i ⋆ g(x + l h)| dh ≤ A_0 (2LR + 1)^n (2LR + L + 1)^n |B(0,1)| M|g|(x)` +with `B = B(0, 2^(-j))`: the bound of `|η_i ⋆ g|` by integrals of `|g|` over moving balls +(`Rd.LocalMeansBump.enorm_conv_dual_le`) and the average of those balls +(`Rd.setLIntegral_setLIntegral_ball_le`). -/ +theorem laverage_enorm_conv_dual_add_smul_le_of_one_le (L : ℕ) {i j : ℕ} (hji : j ≤ i) + {g : V → ℂ} (hg : LocallyIntegrable g volume) {l : ℕ} (hl1 : 1 ≤ l) (hlL : l ≤ L) (x : V) : + ⨍⁻ h in ball (0 : V) (1 / 2 ^ j), ‖conv (b.dual L i) g volume (x + (l : ℝ) • h)‖ₑ ∂volume ≤ + ENNReal.ofReal (b.dualDerivConst L 0) * + ENNReal.ofReal (2 * L * b.radius + 1) ^ finrank ℝ V * + ENNReal.ofReal (2 * L * b.radius + L + 1) ^ finrank ℝ V * volume (ball (0 : V) 1) * + maximal (fun y => ‖g y‖ₑ) x := by + rw [setLAverage_eq, ENNReal.div_eq_inv_mul] + have hR := b.radius_nonneg + have hc1 : (0 : ℝ) < 2 * L * b.radius + 1 := by positivity + have hc2 : (0 : ℝ) < 2 * L * b.radius + L + 1 := by positivity + have hA : ENNReal.ofReal (b.dualDerivConst L 0) * 2 ^ (i * finrank ℝ V) ≠ ∞ := + ENNReal.mul_ne_top ENNReal.ofReal_ne_top (ENNReal.pow_ne_top ENNReal.ofNat_ne_top) + have hB0 : volume (ball (0 : V) (1 / 2 ^ j)) ≠ 0 := volume_ball_ne_zero (one_div_two_pow_pos j) + have hl : (1 : ℝ) ≤ l := by exact_mod_cast hl1 + have hrad : (2 * L * b.radius + 1) * (1 / 2 ^ i) + l * (1 / 2 ^ j) ≤ + (2 * L * b.radius + L + 1) * (1 / 2 ^ j) := by + have hij : (1 : ℝ) / 2 ^ i ≤ 1 / 2 ^ j := + one_div_le_one_div_of_le (by positivity) (pow_le_pow_right₀ one_le_two hji) + have hlL' : (l : ℝ) ≤ L := by exact_mod_cast hlL + have hj := one_div_two_pow_pos j + nlinarith + calc (volume (ball (0 : V) (1 / 2 ^ j)))⁻¹ * + ∫⁻ h in ball (0 : V) (1 / 2 ^ j), ‖conv (b.dual L i) g volume (x + (l : ℝ) • h)‖ₑ + ≤ (volume (ball (0 : V) (1 / 2 ^ j)))⁻¹ * + ∫⁻ h in ball (0 : V) (1 / 2 ^ j), ENNReal.ofReal (b.dualDerivConst L 0) * + 2 ^ (i * finrank ℝ V) * ∫⁻ w in ball (x + (l : ℝ) • h) + ((2 * L * b.radius + 1) * (1 / 2 ^ i)), ‖g w‖ₑ := + mul_le_mul' le_rfl (lintegral_mono fun h => b.enorm_conv_dual_le L i g _) + _ ≤ (volume (ball (0 : V) (1 / 2 ^ j)))⁻¹ * (ENNReal.ofReal (b.dualDerivConst L 0) * + 2 ^ (i * finrank ℝ V) * + (volume (ball (0 : V) ((2 * L * b.radius + 1) * (1 / 2 ^ i))) * + (volume (ball (0 : V) ((2 * L * b.radius + L + 1) * (1 / 2 ^ j))) * + maximal (fun y => ‖g y‖ₑ) x))) := by + rw [lintegral_const_mul' _ _ hA] + refine mul_le_mul' le_rfl (mul_le_mul' le_rfl ((setLIntegral_setLIntegral_ball_le + hg.aestronglyMeasurable.eNorm hl _ _ x).trans (mul_le_mul' le_rfl ?_))) + exact (lintegral_mono_set (ball_subset_ball hrad)).trans + (setLIntegral_ball_le_mul_maximal (mul_pos hc2 (one_div_two_pow_pos j)) _ x) + _ = _ := by + rw [Measure.addHaar_ball_mul_of_pos volume (0 : V) hc1, ENNReal.ofReal_pow hc1.le, + Measure.addHaar_ball_mul_of_pos volume (0 : V) hc2, ENNReal.ofReal_pow hc2.le, + ← two_pow_mul_volume_ball_one_div (V := V) i] + calc _ = ENNReal.ofReal (b.dualDerivConst L 0) * + ENNReal.ofReal (2 * L * b.radius + 1) ^ finrank ℝ V * + ENNReal.ofReal (2 * L * b.radius + L + 1) ^ finrank ℝ V * + (2 ^ (i * finrank ℝ V) * volume (ball (0 : V) (1 / 2 ^ i))) * + maximal (fun y => ‖g y‖ₑ) x * + ((volume (ball (0 : V) (1 / 2 ^ j)))⁻¹ * volume (ball (0 : V) (1 / 2 ^ j))) := by + ring + _ = _ := by rw [ENNReal.inv_mul_cancel hB0 (volume_ball_ne_top _), mul_one] + +/-- **Averages of shifted `η_i ⋆ g`, every shift**: for `j ≤ i`, `l ≤ L`, a locally integrable +`g` and every `x`, +`⨍_B |η_i ⋆ g(x + l h)| dh ≤ A_0 (2LR + 1)^n (2LR + L + 1)^n |B(0,1)| M|g|(x)` with +`B = B(0, 2^(-j))`; for `l = 0` the integrand is constant +(`Rd.LocalMeansBump.enorm_conv_dual_le_maximal`). -/ +theorem laverage_enorm_conv_dual_add_smul_le (L : ℕ) {i j : ℕ} (hji : j ≤ i) {g : V → ℂ} + (hg : LocallyIntegrable g volume) {l : ℕ} (hlL : l ≤ L) (x : V) : + ⨍⁻ h in ball (0 : V) (1 / 2 ^ j), ‖conv (b.dual L i) g volume (x + (l : ℝ) • h)‖ₑ ∂volume ≤ + ENNReal.ofReal (b.dualDerivConst L 0) * + ENNReal.ofReal (2 * L * b.radius + 1) ^ finrank ℝ V * + ENNReal.ofReal (2 * L * b.radius + L + 1) ^ finrank ℝ V * volume (ball (0 : V) 1) * + maximal (fun y => ‖g y‖ₑ) x := by + rcases Nat.eq_zero_or_pos l with rfl | hl1 + · have hB0 : volume (ball (0 : V) (1 / 2 ^ j)) ≠ 0 := + volume_ball_ne_zero (one_div_two_pow_pos j) + have h1 : (1 : ℝ≥0∞) ≤ ENNReal.ofReal (2 * L * b.radius + L + 1) ^ finrank ℝ V := by + have := b.radius_nonneg + exact one_le_pow₀ (ENNReal.one_le_ofReal.2 (le_add_of_nonneg_left (by positivity))) + simp only [Nat.cast_zero, zero_smul, add_zero] + rw [setLAverage_eq, ENNReal.div_eq_inv_mul, setLIntegral_const, mul_comm _ (volume _), + ← mul_assoc, ENNReal.inv_mul_cancel hB0 (volume_ball_ne_top _), one_mul] + refine (b.enorm_conv_dual_le_maximal L i g x).trans ?_ + calc ENNReal.ofReal (b.dualDerivConst L 0) * + ENNReal.ofReal (2 * L * b.radius + 1) ^ finrank ℝ V * volume (ball (0 : V) 1) * + maximal (fun y => ‖g y‖ₑ) x + = ENNReal.ofReal (b.dualDerivConst L 0) * + ENNReal.ofReal (2 * L * b.radius + 1) ^ finrank ℝ V * 1 * volume (ball (0 : V) 1) * + maximal (fun y => ‖g y‖ₑ) x := by rw [mul_one] + _ ≤ _ := by gcongr + · exact b.laverage_enorm_conv_dual_add_smul_le_of_one_le L hji hg hl1 hlL x + +/-- **Ball means of `η_i ⋆ g`, coarse levels**: for `j < i`, a locally integrable `g` and every +`x`, `d_j(η_i ⋆ g)(x) ≤ C M|g|(x)` with `C = Rd.LocalMeansBump.diffByLocalMeansConst L`. The +difference is a sum of `L + 1` shifts `η_i ⋆ g(x + l h)` with binomial weights of sum `2^L`, and +the average of each shift over the ball is bounded by the maximal function +(`Rd.LocalMeansBump.laverage_enorm_conv_dual_add_smul_le`). -/ +theorem ballMeanDiff_conv_dual_le_of_lt (L : ℕ) {i j : ℕ} (hji : j < i) {g : V → ℂ} + (hg : LocallyIntegrable g volume) (x : V) : + ballMeanDiff L j (conv (b.dual L i) g volume) x ≤ + b.diffByLocalMeansConst L * maximal (fun y => ‖g y‖ₑ) x := by + set F := conv (b.dual L i) g volume + set K := ENNReal.ofReal (b.dualDerivConst L 0) * + ENNReal.ofReal (2 * L * b.radius + 1) ^ finrank ℝ V * + ENNReal.ofReal (2 * L * b.radius + L + 1) ^ finrank ℝ V * volume (ball (0 : V) 1) * + maximal (fun y => ‖g y‖ₑ) x + have hF : Continuous F := (b.hasCompactSupport_dual L i).continuous_convolution_left + (ContinuousLinearMap.mul ℂ ℂ) (b.continuous_dual L i) hg + have hmeas : ∀ l ∈ Finset.range (L + 1), AEMeasurable + (fun h => (L.choose l : ℝ≥0∞) * ‖F (x + (l : ℝ) • h)‖ₑ) + (volume.restrict (ball (0 : V) (1 / 2 ^ j))) := fun l _ => + ((hF.comp (continuous_const.add (continuous_id.const_smul _))).measurable.eNorm.const_mul + _).aemeasurable + calc ballMeanDiff L j F x + ≤ (volume (ball (0 : V) (1 / 2 ^ j)))⁻¹ * ∫⁻ h in ball (0 : V) (1 / 2 ^ j), + ∑ l ∈ Finset.range (L + 1), (L.choose l : ℝ≥0∞) * ‖F (x + (l : ℝ) • h)‖ₑ := by + rw [ballMeanDiff] + exact mul_le_mul' le_rfl (lintegral_mono fun h => enorm_higherDiff_le_sum L h F x) + _ = ∑ l ∈ Finset.range (L + 1), (L.choose l : ℝ≥0∞) * + ((volume (ball (0 : V) (1 / 2 ^ j)))⁻¹ * + ∫⁻ h in ball (0 : V) (1 / 2 ^ j), ‖F (x + (l : ℝ) • h)‖ₑ) := by + rw [lintegral_finsetSum' _ hmeas, Finset.mul_sum] + refine Finset.sum_congr rfl fun l _ => ?_ + rw [lintegral_const_mul' _ _ (ENNReal.natCast_ne_top _)] + ring + _ ≤ ∑ l ∈ Finset.range (L + 1), (L.choose l : ℝ≥0∞) * K := + Finset.sum_le_sum fun l hl => mul_le_mul' le_rfl + (by simpa only [setLAverage_eq, ENNReal.div_eq_inv_mul] using + b.laverage_enorm_conv_dual_add_smul_le L hji.le hg + (Nat.lt_succ_iff.1 (Finset.mem_range.1 hl)) x) + _ = 2 ^ L * K := by + rw [← Finset.sum_mul] + congr 1 + exact_mod_cast Nat.sum_range_choose L + _ ≤ b.diffByLocalMeansConst L * maximal (fun y => ‖g y‖ₑ) x := by + rw [diffByLocalMeansConst] + calc 2 ^ L * K = volume (ball (0 : V) 1) * (2 ^ L * ENNReal.ofReal (b.dualDerivConst L 0) * + ENNReal.ofReal (2 * L * b.radius + 1) ^ finrank ℝ V * + ENNReal.ofReal (2 * L * b.radius + L + 1) ^ finrank ℝ V) * + maximal (fun y => ‖g y‖ₑ) x := by ring + _ ≤ _ := mul_le_mul' (mul_le_mul' le_rfl (le_max_right _ _)) le_rfl + +/-- **Ball means of `η_i ⋆ g`**: for all levels `i, j`, a locally integrable `g` and every `x`, +`d_j(η_i ⋆ g)(x) ≤ C c_{ji} M|g|(x)` with `c_{ji} = 2^(-(j-i)L)` for `i ≤ j`, `c_{ji} = 1` for +`i > j`, and `C = Rd.LocalMeansBump.diffByLocalMeansConst L`. -/ +theorem ballMeanDiff_conv_dual_le (L i j : ℕ) {g : V → ℂ} (hg : LocallyIntegrable g volume) + (x : V) : + ballMeanDiff L j (conv (b.dual L i) g volume) x ≤ b.diffByLocalMeansConst L * + ((if i ≤ j then dyadicWeight (-(L : ℝ)) (j - i) else 1) * maximal (fun y => ‖g y‖ₑ) x) := by + split_ifs with hij + · rw [← mul_assoc] + exact b.ballMeanDiff_conv_dual_le_of_le L hij hg x + · rw [one_mul] + exact b.ballMeanDiff_conv_dual_le_of_lt L (not_le.1 hij) hg x + +/-! ### Ball means by local means -/ + +variable {p : ℝ≥0∞} [Fact (1 ≤ p)] + +/-- **Ball means of the partial sums of the reproducing formula**: for `1 ≤ p < ∞`, +`f ∈ L_p`, all `J, j` and every `x`, +`d_j(m_{2^J} ⋆ m_{2^J} ⋆ f)(x) ≤ C ∑_{i ≤ J} c_{ji} M(k_i ⋆ f)(x)` with +`C = Rd.LocalMeansBump.diffByLocalMeansConst L`, since +`m_{2^J} ⋆ m_{2^J} ⋆ f = ∑_{i ≤ J} η_i ⋆ k_i ⋆ f` at every point +(`Rd.LocalMeansBump.sum_conv_dual_localMean_apply`). -/ +theorem ballMeanDiff_partialSum_le (L : ℕ) (hp : p ≠ ∞) (f : Lp ℂ p (volume : Measure V)) + (J j : ℕ) (x : V) : + ballMeanDiff L j (conv (b.scaled L J) (convLp hp (b.integrable_scaled L J) f) volume) x ≤ + b.diffByLocalMeansConst L * ∑ i ∈ Finset.range (J + 1), + (if i ≤ j then dyadicWeight (-(L : ℝ)) (j - i) else 1) * + maximal (fun y => ‖conv (b.kernel L i) f volume y‖ₑ) x := by + have hp1 : 1 ≤ p := Fact.out + have heq : conv (b.scaled L J) (convLp hp (b.integrable_scaled L J) f) volume = + ∑ i ∈ Finset.range (J + 1), conv (b.dual L i) (b.localMean hp L i f) volume := by + funext y + rw [Finset.sum_apply] + exact (b.sum_conv_dual_localMean_apply hp L J f y).symm + have hmeas : ∀ i ∈ Finset.range (J + 1), + Measurable (conv (b.dual L i) (b.localMean hp L i f) volume) := fun i _ => + ((b.hasCompactSupport_dual L i).continuous_convolution_left (ContinuousLinearMap.mul ℂ ℂ) + (b.continuous_dual L i) ((Lp.memLp _).locallyIntegrable hp1)).measurable + rw [heq, Finset.mul_sum] + refine (ballMeanDiff_finsetSum_le hmeas L j x).trans (Finset.sum_le_sum fun i _ => ?_) + have hM : maximal (fun y => ‖(b.localMean hp L i f : V → ℂ) y‖ₑ) = + maximal (fun y => ‖conv (b.kernel L i) f volume y‖ₑ) := + maximal_congr_ae ((b.localMean_ae_eq hp L i f).mono fun y hy => by simp only [hy]) + rw [← hM] + exact b.ballMeanDiff_conv_dual_le L i j ((Lp.memLp _).locallyIntegrable hp1) x + +/-- The bound of the ball means of `f` through the partial sums: for `1 ≤ p < ∞`, `f ∈ L_p`, +all `J, j` and every `x`, +`d_j f(x) ≤ C ∑_i c_{ji} M(k_i ⋆ f)(x) + d_j(f - m_{2^J} ⋆ m_{2^J} ⋆ f)(x)`, with +`C = Rd.LocalMeansBump.diffByLocalMeansConst L` (subadditivity, `Rd.ballMeanDiff_add_le`, with +the continuous partial sum as the measurable summand). -/ +theorem ballMeanDiff_le_tsum_add (L : ℕ) (hp : p ≠ ∞) (f : Lp ℂ p (volume : Measure V)) + (J j : ℕ) (x : V) : + ballMeanDiff L j f x ≤ b.diffByLocalMeansConst L * ∑' i, + (if i ≤ j then dyadicWeight (-(L : ℝ)) (j - i) else 1) * + maximal (fun y => ‖conv (b.kernel L i) f volume y‖ₑ) x + + ballMeanDiff L j ((f : V → ℂ) - + conv (b.scaled L J) (convLp hp (b.integrable_scaled L J) f) volume) x := by + have hp1 : 1 ≤ p := Fact.out + have hFc : Continuous (conv (b.scaled L J) (convLp hp (b.integrable_scaled L J) f) volume) := + (b.hasCompactSupport_scaled L J).continuous_convolution_left (ContinuousLinearMap.mul ℂ ℂ) + (b.continuous_scaled L J) ((Lp.memLp _).locallyIntegrable hp1) + have h1 : ballMeanDiff L j f x = ballMeanDiff L j + (conv (b.scaled L J) (convLp hp (b.integrable_scaled L J) f) volume + ((f : V → ℂ) - + conv (b.scaled L J) (convLp hp (b.integrable_scaled L J) f) volume)) x := by + rw [add_sub_cancel] + rw [h1] + refine (ballMeanDiff_add_le hFc.measurable _ L j x).trans (add_le_add ?_ le_rfl) + refine (b.ballMeanDiff_partialSum_le L hp f J j x).trans (mul_le_mul' le_rfl ?_) + exact sum_le_tsum _ + +/-- The remainders of the reproducing formula vanish in the ball means: for `L ≥ 1`, +`1 ≤ p < ∞`, `f ∈ L_p` and every `j`, `‖d_j(f - m_{2^J} ⋆ m_{2^J} ⋆ f)‖_p → 0` as `J → ∞`, +since it is at most `2^L ‖f - m_{2^J} ⋆ m_{2^J} ⋆ f‖_p` (`Rd.eLpNorm_ballMeanDiff_le`) and +`m_{2^J} ⋆ m_{2^J} ⋆ f → f` in `L_p` (`Rd.LocalMeansBump.tendsto_sum_dual_localMean`). -/ +theorem tendsto_eLpNorm_ballMeanDiff_sub {L : ℕ} (hL : 1 ≤ L) (hp : p ≠ ∞) + (f : Lp ℂ p (volume : Measure V)) (j : ℕ) : + Tendsto (fun J => eLpNorm (ballMeanDiff L j ((f : V → ℂ) - + conv (b.scaled L J) (convLp hp (b.integrable_scaled L J) f) volume)) p volume) + atTop (𝓝 0) := by + have hp1 : 1 ≤ p := Fact.out + set H : ℕ → Lp ℂ p (volume : Measure V) := fun J => + convLp hp (b.integrable_scaled L J) (convLp hp (b.integrable_scaled L J) f) + have hH : Tendsto H atTop (𝓝 f) := by + have h := b.tendsto_sum_dual_localMean hp hL f + simp_rw [b.sum_dual_localMean hp L] at h + exact h + have h0 : Tendsto (fun J => 2 ^ L * ‖H J - f‖ₑ) atTop (𝓝 0) := by + have h := (hH.sub_const f).eNorm + rw [sub_self, eNorm_zero] at h + simpa using ENNReal.Tendsto.const_mul h (Or.inr (ENNReal.pow_ne_top ENNReal.ofNat_ne_top)) + refine tendsto_of_tendsto_of_tendsto_of_le_of_le tendsto_const_nhds h0 (fun J => zero_le) + fun J => ?_ + have hae : (f : V → ℂ) - conv (b.scaled L J) (convLp hp (b.integrable_scaled L J) f) volume + =ᵐ[volume] ⇑(f - H J) := by + filter_upwards [Lp.coeFn_sub f (H J), convLp_apply_ae hp (b.integrable_scaled L J) + (convLp hp (b.integrable_scaled L J) f)] with y hy1 hy2 + rw [hy1, Pi.sub_apply, Pi.sub_apply, hy2] + have hFc : Continuous (conv (b.scaled L J) (convLp hp (b.integrable_scaled L J) f) volume) := + (b.hasCompactSupport_scaled L J).continuous_convolution_left (ContinuousLinearMap.mul ℂ ℂ) + (b.continuous_scaled L J) ((Lp.memLp _).locallyIntegrable hp1) + refine (eLpNorm_ballMeanDiff_le hp1 hp ((Lp.aestronglyMeasurable f).sub + hFc.aestronglyMeasurable) L j).trans (le_of_eq ?_) + rw [eLpNorm_congr_ae hae, ← Lp.eNorm_def, eNorm_sub_rev] + +/-- **Ball means by local means, pointwise**: for `L ≥ 1`, `1 ≤ p < ∞` and `f ∈ L_p`, almost +everywhere and for all levels `j`, `d_j f(x) ≤ C ∑_i c_{ji} M(k_i ⋆ f)(x)` with +`c_{ji} = 2^(-(j-i)L)` for `i ≤ j`, `c_{ji} = 1` for `i > j`, and +`C = Rd.LocalMeansBump.diffByLocalMeansConst L`. The bound holds for the partial sums of the +reproducing formula at every point, and passes to `f` by +`MeasureTheory.ae_le_of_le_add_of_tendsto_eLpNorm`. -/ +theorem ballMeanDiff_le_tsum_maximal {L : ℕ} (hL : 1 ≤ L) (hp : p ≠ ∞) + (f : Lp ℂ p (volume : Measure V)) : + ∀ᵐ x ∂volume, ∀ j, ballMeanDiff L j f x ≤ b.diffByLocalMeansConst L * ∑' i, + (if i ≤ j then dyadicWeight (-(L : ℝ)) (j - i) else 1) * + maximal (fun y => ‖conv (b.kernel L i) f volume y‖ₑ) x := by + have hp0 : p ≠ 0 := (zero_lt_one.trans_le (Fact.out : 1 ≤ p)).ne' + refine ae_all_iff.2 fun j => ae_le_of_le_add_of_tendsto_eLpNorm + (measurable_ballMeanDiff (Lp.stronglyMeasurable f).measurable L j).aemeasurable + (measurable_const.mul (Measurable.tsum fun i => measurable_const.mul + (measurable_maximal _))).aemeasurable hp0 + (fun J => Eventually.of_forall fun x => b.ballMeanDiff_le_tsum_add L hp f J j x) + (b.tendsto_eLpNorm_ballMeanDiff_sub hL hp f j) + +/-! ### The characterisation -/ + +/-- **`L_p` norms by local means**: for `L ≥ 1`, `1 ≤ p < ∞`, `1 ≤ q ≤ ∞`, every `s` and +`f ∈ L_p`, `‖f‖_p ≤ 2 ‖m‖_1 (1 - 2^(-s))⁻¹ ‖f‖^{b,L}_{F^s_{p,q}}`: the reproducing formula +`f = ∑_j η_j ⋆ k_j ⋆ f` with `‖η_j‖_1 ≤ 2 ‖m‖_1` (`ENNReal.enorm_le_of_tendsto_sum`), then +`ℓ_∞(L_p) ≤ L_p(ℓ_∞) ≤ L_p(ℓ_q)` (`MeasureTheory.lqNorm_max_le_eLpNorm_lqNorm`). -/ +theorem enorm_le_tlLocalMeansNorm {L : ℕ} (hL : 1 ≤ L) (hp : p ≠ ∞) {q : ℝ≥0∞} (hq : 1 ≤ q) + (s : ℝ) (f : Lp ℂ p (volume : Measure V)) : + ‖f‖ₑ ≤ 2 * eLpNorm (momentKernel b.toFun L) 1 volume * (1 - (2 : ℝ≥0∞) ^ (-s))⁻¹ * + b.tlLocalMeansNorm L s q f := by + have hp1 : 1 ≤ p := Fact.out + have hmeas := fun j => b.measurable_dyadicWeight_mul_conv_kernel L s j f + have h1 := ENNReal.enorm_le_of_tendsto_sum (b.tendsto_sum_dual_localMean hp hL f) + (K := 2 * eLpNorm (momentKernel b.toFun L) 1 volume) (b := fun j => ‖b.localMean hp L j f‖ₑ) + (fun j => (enorm_convLp_le hp _ _).trans (mul_le_mul' (b.eLpNorm_dual_one_le L j) le_rfl)) + s (q := ∞) le_top + refine h1.trans (mul_le_mul' le_rfl ?_) + have heq : ∀ j, dyadicWeight s j * ‖b.localMean hp L j f‖ₑ = + eLpNorm (fun y => dyadicWeight s j * ‖conv (b.kernel L j) f volume y‖ₑ) p volume := + fun j => by + rw [eLpNorm_const_mul_enorm _ (b.continuous_conv_kernel L j f).aestronglyMeasurable, + Lp.eNorm_def, eLpNorm_congr_ae (b.localMean_ae_eq hp L j f)] + simp_rw [heq] + calc lqNorm ∞ (fun j => + eLpNorm (fun y => dyadicWeight s j * ‖conv (b.kernel L j) f volume y‖ₑ) p volume) + ≤ eLpNorm (fun x => lqNorm ∞ (fun j => + dyadicWeight s j * ‖conv (b.kernel L j) f volume x‖ₑ)) p volume := by + have h := lqNorm_max_le_eLpNorm_lqNorm hp1 hp le_top + fun j => (hmeas j).aemeasurable (μ := volume) + rwa [max_eq_right le_top] at h + _ ≤ b.tlLocalMeansNorm L s q f := + eLpNorm_mono_eNorm (measurable_lqNorm_comp hmeas ∞).aestronglyMeasurable fun x => by + simp only [eNorm_eq_self] + exact ENNReal.lqNorm_le_lqNorm_of_le (zero_lt_one.trans_le hq).ne' le_top _ + +/-- The constant `2 ‖m‖_1 (1 - 2^(-s))⁻¹ + C A_{s,L} C_{FS}` of the bound of the ball means +quasi-norm by local means: `‖m‖_1` is the `L_1` norm of the moment kernel, +`C = Rd.LocalMeansBump.diffByLocalMeansConst L`, `A_{s,L} = ENNReal.almostDiagonalConst s L` and +`C_{FS} = Rd.feffermanSteinConst V p q`. -/ +noncomputable def diffUpperConst (L : ℕ) (p q : ℝ≥0∞) (s : ℝ) : ℝ≥0∞ := + 2 * eLpNorm (momentKernel b.toFun L) 1 volume * (1 - (2 : ℝ≥0∞) ^ (-s))⁻¹ + + b.diffByLocalMeansConst L * ENNReal.almostDiagonalConst s L * feffermanSteinConst V p q + +/-- The constant of the bound of the ball means quasi-norm by local means is finite for +`1 < p < ∞`, `1 < q ≤ ∞` and `0 < s < L`. -/ +theorem diffUpperConst_ne_top {L : ℕ} {p q : ℝ≥0∞} (hp1 : 1 < p) (hp : p ≠ ∞) (hq1 : 1 < q) + {s : ℝ} (hs : 0 < s) (hsL : s < L) : b.diffUpperConst L p q s ≠ ∞ := + ENNReal.add_ne_top.2 + ⟨ENNReal.mul_ne_top (ENNReal.mul_ne_top (by norm_num) + (eLpNorm_momentKernel_ne_top b.integrable L)) + (ENNReal.one_sub_two_rpow_neg_inv_ne_top hs), + ENNReal.mul_ne_top (ENNReal.mul_ne_top (b.diffByLocalMeansConst_ne_top L) + (ENNReal.almostDiagonalConst_ne_top hs hsL)) (feffermanSteinConst_ne_top hp1 hp hq1)⟩ + +/-- **The ball means quasi-norm by local means**: for `L ≥ 1`, `1 < p < ∞`, `1 < q ≤ ∞`, every +`s` and `f ∈ L_p`, `‖f‖_p + ‖(2^(js) d_j f)_j‖_{L_p(ℓ_q)} ≤ C ‖f‖^{b,L}_{F^s_{p,q}}` with +`C = Rd.LocalMeansBump.diffUpperConst L p q s`, finite for `0 < s < L`. Pointwise the ball +means are bounded by maximal functions of the local means +(`Rd.LocalMeansBump.ballMeanDiff_le_tsum_maximal`), and the almost diagonal estimate and the +Fefferman–Stein inequality bound those in `L_p(ℓ_q)`. -/ +theorem tlDiffNorm_le_tlLocalMeansNorm {L : ℕ} (hL : 1 ≤ L) (hp1 : 1 < p) (hp : p ≠ ∞) + {q : ℝ≥0∞} (hq1 : 1 < q) (s : ℝ) (f : Lp ℂ p (volume : Measure V)) : + tlDiffNorm L s q f ≤ b.diffUpperConst L p q s * b.tlLocalMeansNorm L s q f := by + have h2 : eLpNorm (fun x => lqNorm q (fun j => dyadicWeight s j * ballMeanDiff L j f x)) p + volume ≤ b.diffByLocalMeansConst L * ENNReal.almostDiagonalConst s L * + feffermanSteinConst V p q * b.tlLocalMeansNorm L s q f := + eLpNorm_le_of_le_lqNorm_maximal hp1 hp hq1 (measurable_lqNorm_ballMeanDiff L s q f).aemeasurable + (fun i => (b.measurable_dyadicWeight_mul_conv_kernel L s i f).aemeasurable) (by + filter_upwards [b.ballMeanDiff_le_tsum_maximal hL hp f] with x hx + refine (ENNReal.lqNorm_le_almostDiagonalConst_mul_of_le hq1.le s L hx).trans_eq ?_ + simp only [dyadicWeight_mul_maximal]) + rw [tlDiffNorm, diffUpperConst, add_mul] + exact add_le_add (b.enorm_le_tlLocalMeansNorm hL hp hq1.le s f) h2 + +/-- The constant `2 ‖m‖_1 ∑_{j ≤ r} 2^(js) + 2^((r+1)s) C` of the bound of the local means +quasi-norm by ball means, with `r = ⌈R⌉₊` and `C = Rd.LocalMeansBump.ballMeanConst`. -/ +noncomputable def diffLowerConst (L : ℕ) (s : ℝ) : ℝ≥0∞ := + 2 * eLpNorm (momentKernel b.toFun L) 1 volume * + ∑ j ∈ Finset.range (⌈b.radius⌉₊ + 1), dyadicWeight s j + + dyadicWeight s (⌈b.radius⌉₊ + 1) * b.ballMeanConst + +/-- The constant of the bound of the local means quasi-norm by ball means is finite. -/ +theorem diffLowerConst_ne_top (L : ℕ) (s : ℝ) : b.diffLowerConst L s ≠ ∞ := + ENNReal.add_ne_top.2 + ⟨ENNReal.mul_ne_top (ENNReal.mul_ne_top (by norm_num) + (eLpNorm_momentKernel_ne_top b.integrable L)) + (ENNReal.sum_ne_top.2 fun j _ => ENNReal.dyadicWeight_ne_top s j), + ENNReal.mul_ne_top (ENNReal.dyadicWeight_ne_top _ _) b.ballMeanConst_ne_top⟩ + +/-- **The weighted local means in `L_p`** (Young's inequality): +`‖2^(js) |k_j ⋆ f|‖_p ≤ 2^(js) 2 ‖m‖_1 ‖f‖_p`. -/ +theorem eLpNorm_dyadicWeight_mul_conv_kernel_le (L : ℕ) (hp : p ≠ ∞) (s : ℝ) (j : ℕ) + (f : Lp ℂ p (volume : Measure V)) : + eLpNorm (fun y => dyadicWeight s j * ‖conv (b.kernel L j) f volume y‖ₑ) p volume ≤ + dyadicWeight s j * (2 * eLpNorm (momentKernel b.toFun L) 1 volume * ‖f‖ₑ) := by + rw [eLpNorm_const_mul_enorm _ (b.continuous_conv_kernel L j f).aestronglyMeasurable, + ← eLpNorm_congr_ae (b.localMean_ae_eq hp L j f), ← Lp.eNorm_def] + exact mul_le_mul' le_rfl + ((enorm_convLp_le hp _ f).trans (mul_le_mul' (b.eLpNorm_kernel_one_le L j) le_rfl)) + +/-- **The fine local means by ball means in `ℓ_q`**: with `r = ⌈R⌉₊`, almost everywhere, +`‖(2^((j+r+1)s) |k_{j+r+1} ⋆ f(x)|)_j‖_{ℓ_q} ≤ 2^((r+1)s) C ‖(2^(js) d_j f(x))_j‖_{ℓ_q}` with +`C = Rd.LocalMeansBump.ballMeanConst` (`Rd.LocalMeansBump.enorm_localMean_le_ballMeanDiff`). -/ +theorem lqNorm_localMean_shift_le (L : ℕ) (hp : p ≠ ∞) (q : ℝ≥0∞) (s : ℝ) + (f : Lp ℂ p (volume : Measure V)) : + ∀ᵐ x ∂volume, lqNorm q (fun j => dyadicWeight s (j + (⌈b.radius⌉₊ + 1)) * + ‖conv (b.kernel L (j + (⌈b.radius⌉₊ + 1))) f volume x‖ₑ) ≤ + dyadicWeight s (⌈b.radius⌉₊ + 1) * b.ballMeanConst * + lqNorm q (fun j => dyadicWeight s j * ballMeanDiff L j f x) := by + filter_upwards [b.enorm_localMean_le_ballMeanDiff L hp f] with x hx + rw [← ENNReal.lqNorm_const_mul] + refine ENNReal.lqNorm_mono fun j => ?_ + rw [ENNReal.dyadicWeight_add_nat] + calc dyadicWeight s j * dyadicWeight s (⌈b.radius⌉₊ + 1) * + ‖conv (b.kernel L (j + (⌈b.radius⌉₊ + 1))) f volume x‖ₑ + ≤ dyadicWeight s j * dyadicWeight s (⌈b.radius⌉₊ + 1) * + (b.ballMeanConst * ballMeanDiff L j f x) := mul_le_mul' le_rfl (hx j) + _ = _ := by ring + +/-- **The local means quasi-norm by ball means**: for every order `L`, `1 ≤ p < ∞`, +`1 ≤ q ≤ ∞`, every `s` and `f ∈ L_p`, +`‖f‖^{b,L}_{F^s_{p,q}} ≤ C (‖f‖_p + ‖(2^(js) d_j f)_j‖_{L_p(ℓ_q)})` with +`C = Rd.LocalMeansBump.diffLowerConst L s`. The levels `j ≤ r = ⌈R⌉₊` are bounded by Young's +inequality, the levels `j > r` by the ball means +(`Rd.LocalMeansBump.lqNorm_localMean_shift_le`). -/ +theorem tlLocalMeansNorm_le_tlDiffNorm (L : ℕ) (hp : p ≠ ∞) {q : ℝ≥0∞} (hq : 1 ≤ q) (s : ℝ) + (f : Lp ℂ p (volume : Measure V)) : + b.tlLocalMeansNorm L s q f ≤ b.diffLowerConst L s * tlDiffNorm L s q f := by + have hp1 : 1 ≤ p := Fact.out + have hmeas := fun j => b.measurable_dyadicWeight_mul_conv_kernel L s j f + have hhead : eLpNorm (fun x => ∑ j ∈ Finset.range (⌈b.radius⌉₊ + 1), + dyadicWeight s j * ‖conv (b.kernel L j) f volume x‖ₑ) p volume ≤ + 2 * eLpNorm (momentKernel b.toFun L) 1 volume * + (∑ j ∈ Finset.range (⌈b.radius⌉₊ + 1), dyadicWeight s j) * ‖f‖ₑ := by + have hfun : (fun x => ∑ j ∈ Finset.range (⌈b.radius⌉₊ + 1), + dyadicWeight s j * ‖conv (b.kernel L j) f volume x‖ₑ) = + ∑ j ∈ Finset.range (⌈b.radius⌉₊ + 1), + fun x => dyadicWeight s j * ‖conv (b.kernel L j) f volume x‖ₑ := by + funext x + rw [Finset.sum_apply] + rw [hfun] + refine (eLpNorm_sum_le hp1).trans ((Finset.sum_le_sum fun j _ => + b.eLpNorm_dyadicWeight_mul_conv_kernel_le L hp s j f).trans_eq ?_) + rw [← Finset.sum_mul] + ring + have htail : eLpNorm (fun x => lqNorm q (fun j => dyadicWeight s (j + (⌈b.radius⌉₊ + 1)) * + ‖conv (b.kernel L (j + (⌈b.radius⌉₊ + 1))) f volume x‖ₑ)) p volume ≤ + dyadicWeight s (⌈b.radius⌉₊ + 1) * b.ballMeanConst * + eLpNorm (fun x => lqNorm q (fun j => dyadicWeight s j * ballMeanDiff L j f x)) p + volume := by + refine (eLpNorm_mono_eNorm_ae (measurable_lqNorm_comp + (fun j => hmeas (j + (⌈b.radius⌉₊ + 1))) q).aestronglyMeasurable (μ := volume) (p := p) + (g := fun x => dyadicWeight s (⌈b.radius⌉₊ + 1) * b.ballMeanConst * + lqNorm q (fun j => dyadicWeight s j * ballMeanDiff L j f x)) + ((b.lqNorm_localMean_shift_le L hp q s f).mono fun x hx => ?_)).trans_eq ?_ + · simpa only [eNorm_eq_self] using hx + · exact eLpNorm_const_mul_ennreal (measurable_lqNorm_ballMeanDiff L s q f).aestronglyMeasurable + calc b.tlLocalMeansNorm L s q f + ≤ eLpNorm (fun x => ∑ j ∈ Finset.range (⌈b.radius⌉₊ + 1), + dyadicWeight s j * ‖conv (b.kernel L j) f volume x‖ₑ + + lqNorm q (fun j => dyadicWeight s (j + (⌈b.radius⌉₊ + 1)) * + ‖conv (b.kernel L (j + (⌈b.radius⌉₊ + 1))) f volume x‖ₑ)) p volume := + eLpNorm_mono_eNorm (b.aemeasurable_lqNorm_conv_kernel L s q f).aestronglyMeasurable + fun x => by + simp only [eNorm_eq_self] + exact ENNReal.lqNorm_le_sum_range_add_shift hq _ _ + _ ≤ _ := eLpNorm_add_le hp1 + _ ≤ _ := add_le_add hhead htail + _ ≤ b.diffLowerConst L s * tlDiffNorm L s q f := by + rw [diffLowerConst, tlDiffNorm, add_mul, mul_add, mul_add] + exact add_le_add le_self_add le_add_self + +end LocalMeansBump + +/-- **The ball means characterisation of Triebel–Lizorkin spaces**: for `1 < p < ∞`, +`1 < q ≤ ∞`, an order `L` and `0 < s < L`, `f ∈ F^s_{p,q}` iff +`‖f‖_p + ‖(2^(js) d_j f)_j‖_{L_p(ℓ_q)} < ∞`, with the ball means of differences of order `L`. +Both quasi-norms are compared with the local means quasi-norm of the standard bump +(`Rd.LocalMeansBump.std`, `Rd.LocalMeansBump.memTriebelLizorkin_iff_tlLocalMeans`). -/ +theorem memTriebelLizorkin_iff_tlDiffNorm_lt_top {p : ℝ≥0∞} [Fact (1 ≤ p)] {L : ℕ} + (hp1 : 1 < p) (hp : p ≠ ∞) {q : ℝ≥0∞} (hq1 : 1 < q) {s : ℝ} (hs : 0 < s) (hsL : s < L) + {f : Lp ℂ p (volume : Measure V)} : + MemTriebelLizorkin s q f ↔ tlDiffNorm L s q f < ∞ := by + have hL : 1 ≤ L := Nat.one_le_iff_ne_zero.2 fun h => by + rw [h, Nat.cast_zero] at hsL + linarith + rw [(LocalMeansBump.std (V := V)).memTriebelLizorkin_iff_tlLocalMeans hp1 hp hq1 hs hsL] + exact ⟨fun h => ((LocalMeansBump.std (V := V)).tlDiffNorm_le_tlLocalMeansNorm hL hp1 hp hq1 s + f).trans_lt (ENNReal.mul_lt_top + ((LocalMeansBump.std (V := V)).diffUpperConst_ne_top hp1 hp hq1 hs hsL).lt_top h), + fun h => ((LocalMeansBump.std (V := V)).tlLocalMeansNorm_le_tlDiffNorm L hp hq1.le s + f).trans_lt (ENNReal.mul_lt_top + ((LocalMeansBump.std (V := V)).diffLowerConst_ne_top L s).lt_top h)⟩ + +end Rd diff --git a/LeanPool/FunctionSpaces/Rd/TriebelLizorkin/TriebelLizorkinDistributions.lean b/LeanPool/FunctionSpaces/Rd/TriebelLizorkin/TriebelLizorkinDistributions.lean new file mode 100644 index 0000000000..70c488014d --- /dev/null +++ b/LeanPool/FunctionSpaces/Rd/TriebelLizorkin/TriebelLizorkinDistributions.lean @@ -0,0 +1,539 @@ +/- +Copyright (c) 2026 Mario Ullrich. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Mario Ullrich +-/ +module + +public import LeanPool.FunctionSpaces.Rd.TriebelLizorkin.SquareFunction +public import LeanPool.FunctionSpaces.Analysis.Fourier.SchwartzCutoff + +/- +Modified for Lean Pool: module names and imports adapted. +-/ + +/-! +# Triebel–Lizorkin spaces of tempered distributions + +The Littlewood–Paley blocks of a tempered distribution `u` on `V` are the Fourier multipliers +`Δ_j u = (𝓕ψ_j)(D) u` (`Rd.distribBlock`), with the blocks `ψ_j` as Schwartz functions +(`Rd.psiS`). A tempered distribution lies in `F^s_{p,q}` when every block is an `L_p` function +`g_j` and `‖ x ↦ ‖(2^{js} |g_j(x)|)_j‖_{ℓ_q} ‖_p < ∞` (`Rd.triebelLizorkinNormDistr`, +`Rd.MemTriebelLizorkinDistr`); the quasi-norm is `∞` when some block is no `L_p` function. For +`p < ∞` this describes `F^s_{p,q}` for every real `s`, without the restriction to `L_p`. + +* **Convolutions as Fourier multipliers**: for a Schwartz function `η`, `(𝓕η)(D) φ = η ⋆ φ` for + Schwartz functions `φ`, Mathlib's convolution of Schwartz functions + (`Rd.fourierMultiplierCLM_fourier_eq_convolution`, `Rd.fourierMultiplierCLM_fourier_eq_conv`), + and, since Schwartz functions are dense in `L_r`, `(𝓕η)(D) G = η ⋆ G` for `G ∈ L_r`, `1 ≤ r < ∞` + (`Rd.fourierMultiplierCLM_fourier_toLp_eq_conv`). In particular the blocks of an `L_r` + function are its blocks `ψ_j ⋆ f` (`Rd.distribBlock_toTemperedDistribution`). Finite sums of + such convolutions in `L_p` are the pointwise sums (`Rd.coeFn_sum_convLp_ae`). +* **The decomposition converges**: `∑_{j < J} Δ_j u → u` in `𝓢'` for every tempered + distribution `u` (`Rd.tendsto_sum_distribBlock`), since `∑_{j ≤ J} 𝓕ψ_j = χ(2^{-J} ·)` and the + cut-offs converge in the Schwartz space (`Rd.tendsto_cutoffMul`). If the blocks are `L_p` + functions whose partial sums converge in `L_p`, the limit is `u` + (`Rd.eq_of_tendsto_sum_distribBlock`). +* **Admissible kernels**: an admissible Littlewood–Paley kernel (`Rd.LPKernel`) is a Schwartz + function `Φ'` with `𝓕Φ' = 1` on the ball `{‖ξ‖ ≤ a}` and `𝓕Φ' = 0` outside the ball of radius + `b`, `0 < a < b`; its blocks are `Δ'_j u = (𝓕ψ'_j)(D) u` with `ψ'_0 = Φ'` and + `ψ'_j = (Φ' - δ_{1/2} Φ')_{2^j}` (`Rd.LPKernel.distribBlock`). The kernel of the project, + `Rd.LPKernel.standard`, has the blocks `Rd.distribBlock` (`Rd.LPKernel.standard_distribBlock`). +* **One quasi-norm for every kernel**: `Rd.LPKernel.triebelLizorkinNormDistr` is defined with the + blocks of an admissible kernel, and `Rd.triebelLizorkinNormDistr` is its value for the kernel of + the project. The blocks determine their `L_p` functions, so the quasi-norm is that of the + unique family (`Rd.triebelLizorkinNormDistr_eq`). For `f ∈ L_p`, `p < ∞`, it is the quasi-norm + `‖ x ↦ ‖(2^{js} |(ψ'_j ⋆ f)(x)|)_j‖_{ℓ_q} ‖_p` of `f` for the kernel + (`Rd.LPKernel.triebelLizorkinNorm`, + `Rd.LPKernel.triebelLizorkinNormDistr_toTemperedDistribution`), which for the kernel of the + project is `Rd.triebelLizorkinNorm` (`Rd.LPKernel.standard_triebelLizorkinNorm`, + `Rd.triebelLizorkinNormDistr_toTemperedDistribution`). The quasi-norm decreases in `q` + and increases in `s`; when it is finite, the blocks are `L_p` functions + (`Rd.MemTriebelLizorkinDistr.exists_blocks`). The weighted `ℓ_q` norm of a family of `L_p` + functions is almost everywhere measurable (`Rd.aemeasurable_lqNorm_dyadicWeight_Lp`). +-/ + +@[expose] public section + +open MeasureTheory Filter Topology Module +open scoped ENNReal SchwartzMap FourierTransform + +open ENNReal (lqNorm dyadicWeight) + +namespace Rd + +variable {V : Type*} [NormedAddCommGroup V] [InnerProductSpace ℝ V] [FiniteDimensional ℝ V] + [MeasurableSpace V] [BorelSpace V] + +/-! ### Convolutions as Fourier multipliers -/ + +/-- **Mathlib's convolution of Schwartz functions as a Fourier multiplier**: for Schwartz +functions `η` and `φ`, `(𝓕η)(D) φ` is Mathlib's convolution `SchwartzMap.convolution` of `η` and +`φ` with the multiplication of `ℂ`, since both have the Fourier transform `𝓕η 𝓕φ` (Mathlib's +`SchwartzMap.fourier_convolution`) and the Fourier transform is injective. -/ +theorem fourierMultiplierCLM_fourier_eq_convolution (η φ : 𝓢(V, ℂ)) : + SchwartzMap.fourierMultiplierCLM ℂ (𝓕 η : 𝓢(V, ℂ)) φ = + SchwartzMap.convolution (ContinuousLinearMap.mul ℂ ℂ) η φ := by + apply (FourierTransform.fourierCLE ℂ 𝓢(V, ℂ)).injective + ext ξ + simp only [FourierTransform.fourierCLE_apply, SchwartzMap.fourier_convolution, + SchwartzMap.pairing_apply_apply, SchwartzMap.fourierMultiplierCLM_apply, + FourierInvPair.fourier_fourierInv_eq, + SchwartzMap.smulLeftCLM_apply_apply (𝓕 η).hasTemperateGrowth, smul_eq_mul, + ContinuousLinearMap.mul_apply'] + +/-- **Convolution as a Fourier multiplier on Schwartz functions**: for Schwartz functions `η` and +`φ`, `(𝓕η)(D) φ = η ⋆ φ` (`Rd.fourierMultiplierCLM_fourier_eq_convolution`, and Mathlib's +`SchwartzMap.convolution_apply` for the convolution integral). -/ +theorem fourierMultiplierCLM_fourier_eq_conv (η φ : 𝓢(V, ℂ)) : + ⇑(SchwartzMap.fourierMultiplierCLM ℂ (𝓕 η : 𝓢(V, ℂ)) φ) = conv η φ volume := by + rw [fourierMultiplierCLM_fourier_eq_convolution] + exact funext (SchwartzMap.convolution_apply _ η φ) + +/-- **Convolution as a Fourier multiplier on `L_r`**: for a Schwartz function `η`, `1 ≤ r < ∞` +and `G ∈ L_r(V)`, `(𝓕η)(D) G = η ⋆ G` as tempered distributions. Both sides are continuous in +`G` (Mathlib's `MeasureTheory.Lp.toTemperedDistributionCLM`, `Rd.convLp`), they agree on +Schwartz functions (`Rd.fourierMultiplierCLM_fourier_eq_conv`, Mathlib's +`TemperedDistribution.fourierMultiplierCLM_toTemperedDistributionCLM_eq`), and Schwartz +functions are dense in `L_r` (Mathlib's `SchwartzMap.denseRange_toLpCLM`, +`DenseRange.equalizer`). -/ +theorem fourierMultiplierCLM_fourier_toLp_eq_conv {r : ℝ≥0∞} [Fact (1 ≤ r)] (hr : r ≠ ∞) + (η : 𝓢(V, ℂ)) (G : Lp ℂ r (volume : Measure V)) : + TemperedDistribution.fourierMultiplierCLM ℂ (𝓕 η : 𝓢(V, ℂ)) (G : 𝓢'(V, ℂ)) = + (convLp hr η.integrable G : 𝓢'(V, ℂ)) := by + have hd := SchwartzMap.denseRange_toLpCLM (F := ℂ) (E := V) hr (μ := volume) + have h := hd.equalizer + ((TemperedDistribution.fourierMultiplierCLM ℂ (𝓕 η : 𝓢(V, ℂ))).continuous.comp + (Lp.toTemperedDistributionCLM ℂ volume r).continuous) + ((Lp.toTemperedDistributionCLM ℂ volume r).continuous.comp + (convLp hr η.integrable).continuous) + (funext fun φ => ?_) + · exact congrFun h G + simp only [Function.comp_apply, Lp.toTemperedDistributionCLM_apply, + SchwartzMap.toLpCLM_apply] + rw [Lp.toTemperedDistribution_toLp_eq, + TemperedDistribution.fourierMultiplierCLM_toTemperedDistributionCLM_eq + (𝓕 η).hasTemperateGrowth, ← Lp.toTemperedDistribution_toLp_eq (p := r) (μ := volume)] + refine (toTemperedDistribution_eq_of_ae_eq ?_).symm + filter_upwards [convLp_apply_ae hr η.integrable (φ.toLp r volume), + (SchwartzMap.fourierMultiplierCLM ℂ (𝓕 η : 𝓢(V, ℂ)) φ).coeFn_toLp r volume] with x h1 h2 + rw [h1, h2, fourierMultiplierCLM_fourier_eq_conv, + conv_congr_ae (φ.coeFn_toLp r volume)] + +/-! ### The blocks of tempered distributions -/ + +/-- `𝓕(psiS j)` is the Fourier transform `𝓕ψ_j` of the block. -/ +theorem fourier_psiS_apply (j : ℕ) (ξ : V) : + (𝓕 (psiS (V := V) j) : 𝓢(V, ℂ)) ξ = 𝓕 (psi (V := V) j) ξ := by + rw [SchwartzMap.fourier_coe, coe_psiS] + +/-- The **Littlewood–Paley block of a tempered distribution**, `Δ_j u = (𝓕ψ_j)(D) u`, Mathlib's +Fourier multiplier with the Fourier transform of the block `ψ_j`. -/ +noncomputable def distribBlock (j : ℕ) : 𝓢'(V, ℂ) →L[ℂ] 𝓢'(V, ℂ) := + TemperedDistribution.fourierMultiplierCLM ℂ (𝓕 (psiS (V := V) j) : 𝓢(V, ℂ)) + +/-- **The blocks of an `L_r` function**: for `1 ≤ r < ∞` and `f ∈ L_r(V)`, the block of the +tempered distribution of `f` is that of the `L_r` block `ψ_j ⋆ f` (`Rd.lpBlock`), by +`Rd.fourierMultiplierCLM_fourier_toLp_eq_conv`. -/ +theorem distribBlock_toTemperedDistribution {r : ℝ≥0∞} [Fact (1 ≤ r)] (hr : r ≠ ∞) (j : ℕ) + (f : Lp ℂ r (volume : Measure V)) : + distribBlock j (f : 𝓢'(V, ℂ)) = (lpBlock hr j f : 𝓢'(V, ℂ)) := by + rw [distribBlock, fourierMultiplierCLM_fourier_toLp_eq_conv hr] + refine toTemperedDistribution_eq_of_ae_eq ?_ + filter_upwards [lpBlock_ae_eq_blockFun hr j f, + convLp_apply_ae hr (psiS (V := V) j).integrable f] with x h1 h2 + rw [h1, h2, blockFun, coe_psiS] + +/-! ### The decomposition of tempered distributions -/ + +/-- **The Fourier transforms of the blocks add up to a cut-off**: +`∑_{j ≤ J} 𝓕ψ_j(ξ) = χ(2^{-J} ξ)` with `χ = Rd.cutoff 1 2` (`Rd.sum_range_fourier_psi`, +`Rd.fourier_Phi`). -/ +theorem sum_fourier_psiS_apply (J : ℕ) (ξ : V) : + ∑ j ∈ Finset.range (J + 1), (𝓕 (psiS (V := V) j) : 𝓢(V, ℂ)) ξ = + cutoff 1 2 one_pos one_lt_two (((2 : ℝ) ^ J)⁻¹ • ξ) := by + simp_rw [fourier_psiS_apply] + rw [sum_range_fourier_psi, fourier_Phi] + +/-- **Partial sums of the blocks as one multiplier**: `∑_{j ≤ J} Δ_j u` is the Fourier multiplier +with `χ(2^{-J} ·)` (Mathlib's `TemperedDistribution.fourierMultiplierCLM_sum`, +`Rd.sum_fourier_psiS_apply`). -/ +theorem sum_distribBlock (J : ℕ) (u : 𝓢'(V, ℂ)) : + ∑ j ∈ Finset.range (J + 1), distribBlock j u = + TemperedDistribution.fourierMultiplierCLM ℂ + (fun ξ => ∑ j ∈ Finset.range (J + 1), (𝓕 (psiS (V := V) j) : 𝓢(V, ℂ)) ξ) u := by + rw [TemperedDistribution.fourierMultiplierCLM_sum ℂ fun j _ => + (𝓕 (psiS (V := V) j)).hasTemperateGrowth] + simp only [FunLike.coe_sum, Finset.sum_apply, distribBlock] + +/-- **The cut-off of the inverse Fourier transform**: multiplying a Schwartz function `w` by +`∑_{j ≤ J} 𝓕ψ_j = χ(2^{-J} ·)` is the cut-off `Rd.cutoffMul (2^J - 1) w` at radius `2^J` +(`Rd.sum_fourier_psiS_apply`, `Rd.cutoffMul_apply`). -/ +theorem smulLeftCLM_sum_fourier_psiS (J : ℕ) (w : 𝓢(V, ℂ)) : + SchwartzMap.smulLeftCLM ℂ + (fun ξ => ∑ j ∈ Finset.range (J + 1), (𝓕 (psiS (V := V) j) : 𝓢(V, ℂ)) ξ) w = + cutoffMul (2 ^ J - 1) w := by + have hg : (fun ξ => ∑ j ∈ Finset.range (J + 1), + (𝓕 (psiS (V := V) j) : 𝓢(V, ℂ)) ξ).HasTemperateGrowth := + Function.HasTemperateGrowth.sum fun j _ => (𝓕 (psiS (V := V) j)).hasTemperateGrowth + have hcast : (((2 ^ J - 1 : ℕ) : ℝ) + 1) = (2 : ℝ) ^ J := by + rw [Nat.cast_sub Nat.one_le_two_pow] + push_cast + ring + ext x + rw [SchwartzMap.smulLeftCLM_apply_apply hg, sum_fourier_psiS_apply, cutoffMul_apply, hcast, + smul_eq_mul] + +/-- **The Littlewood–Paley decomposition of tempered distributions**: for every tempered +distribution `u` on `V`, `∑_{j < J} Δ_j u → u` in `𝓢'(V, ℂ)`. Tested against a Schwartz function +`φ`, `∑_{j ≤ J} Δ_j u (φ) = u(𝓕(χ_J 𝓕⁻¹ φ))` with the cut-offs `χ_J = χ(2^{-J} ·)` +(`Rd.sum_distribBlock`, `Rd.smulLeftCLM_sum_fourier_psiS`), and `χ_J 𝓕⁻¹ φ → 𝓕⁻¹ φ` in the +Schwartz space (`Rd.tendsto_cutoffMul`); `𝓕` and `u` are continuous. -/ +theorem tendsto_sum_distribBlock (u : 𝓢'(V, ℂ)) : + Tendsto (fun J => ∑ j ∈ Finset.range J, distribBlock j u) atTop (𝓝 u) := by + refine (tendsto_add_atTop_iff_nat 1).1 ?_ + rw [PointwiseConvergenceCLM.tendsto_iff_forall_tendsto] + intro φ + have hJ : Tendsto (fun J : ℕ => 2 ^ J - 1) atTop atTop := + tendsto_sub_atTop_nat 1 |>.comp (tendsto_pow_atTop_atTop_of_one_lt one_lt_two) + have hlim : Tendsto (fun J : ℕ => u (𝓕 (cutoffMul (2 ^ J - 1) (𝓕⁻ φ)))) atTop + (𝓝 (u (𝓕 (𝓕⁻ φ)))) := + (u.continuous.comp (FourierTransform.fourierCLM ℂ 𝓢(V, ℂ)).continuous).continuousAt.tendsto.comp + ((tendsto_cutoffMul (𝓕⁻ φ)).comp hJ) + rw [FourierInvPair.fourier_fourierInv_eq] at hlim + refine hlim.congr fun J => ?_ + rw [sum_distribBlock, TemperedDistribution.fourierMultiplierCLM_apply_apply, + smulLeftCLM_sum_fourier_psiS] + +/-! ### Admissible Littlewood–Paley kernels -/ + +variable (V) in +/-- An **admissible Littlewood–Paley kernel**: a Schwartz function `Φ'` whose Fourier transform +is `1` on the closed ball of radius `a` and `0` outside the ball of radius `b`, with +`0 < a < b` (modelled on Triebel's example of a Littlewood–Paley system, 1983, §2.3.1). -/ +structure LPKernel where + /-- The kernel `Φ'`. -/ + kernel : 𝓢(V, ℂ) + /-- The radius of the ball where `𝓕Φ' = 1`. -/ + a : ℝ + /-- The radius outside of which `𝓕Φ' = 0`. -/ + b : ℝ + a_pos : 0 < a + a_lt_b : a < b + fourier_eq_one : ∀ ξ : V, ‖ξ‖ ≤ a → (𝓕 kernel : 𝓢(V, ℂ)) ξ = 1 + fourier_eq_zero : ∀ ξ : V, b ≤ ‖ξ‖ → (𝓕 kernel : 𝓢(V, ℂ)) ξ = 0 + +namespace LPKernel + +variable (K : LPKernel V) + +/-- The Schwartz functions behind the blocks: `base 0 = Φ'` and `base (j+1) = Φ' - δ_{1/2} Φ'`, +with the dilation `δ_c G(x) = c^n G(c x)`, as `Rd.psiBase` for the kernel of the project. -/ +noncomputable def base : ℕ → 𝓢(V, ℂ) + | 0 => K.kernel + | _ + 1 => K.kernel - schwartzDilate (1 / 2) (by norm_num) K.kernel + +/-- The **blocks** `ψ'_j = (base j)_{2^j}` of an admissible kernel, as Schwartz functions. -/ +noncomputable def psiS (j : ℕ) : 𝓢(V, ℂ) := + schwartzDilate (2 ^ j) (pow_ne_zero j two_ne_zero) (K.base j) + +/-- The block `ψ'_j` is the dilate `(base j)_{2^j}` as a function. -/ +theorem coe_psiS (j : ℕ) : (K.psiS j : V → ℂ) = dilate (2 ^ j) (K.base j : V → ℂ) := + coe_schwartzDilate _ _ _ + +/-- The **blocks of a tempered distribution** for the kernel `K`: `Δ'_j u = (𝓕ψ'_j)(D) u`, as +`Rd.distribBlock` for the kernel of the project. -/ +noncomputable def distribBlock (j : ℕ) : 𝓢'(V, ℂ) →L[ℂ] 𝓢'(V, ℂ) := + TemperedDistribution.fourierMultiplierCLM ℂ (𝓕 (K.psiS j) : 𝓢(V, ℂ)) + +variable (V) in +/-- The **kernel of the project** `Φ = 𝓕⁻¹ χ_{1,2}` (`Rd.lpKernelS`) as an admissible kernel, with +`a = 1` and `b = 2`. -/ +noncomputable def standard : LPKernel V where + kernel := lpKernelS + a := 1 + b := 2 + a_pos := one_pos + a_lt_b := one_lt_two + fourier_eq_one ξ h := by + rw [fourier_lpKernelS] + exact cutoff_eq_one one_pos one_lt_two h + fourier_eq_zero ξ h := by + rw [fourier_lpKernelS] + exact cutoff_eq_zero one_pos one_lt_two h + +/-- The blocks of the kernel of the project are the blocks `Rd.psiS` of the project. -/ +theorem standard_psiS (j : ℕ) : (standard V).psiS j = Rd.psiS j := by + cases j <;> rfl + +/-- The blocks of tempered distributions of the kernel of the project are `Rd.distribBlock`. -/ +theorem standard_distribBlock (j : ℕ) : (standard V).distribBlock j = Rd.distribBlock j := by + rw [distribBlock, standard_psiS] + rfl + +end LPKernel + +/-! ### The Triebel–Lizorkin quasi-norm of tempered distributions -/ + +variable {p : ℝ≥0∞} [Fact (1 ≤ p)] + +/-- The **partial sums of convolutions in `L_p`**: for Schwartz kernels `K_j`, `g_j ∈ L_p(V)`, +`1 ≤ p < ∞` and a finite set `t`, the sum `∑_{j ∈ t} K_j ⋆ g_j` of the classes in `L_p(V)` is +almost everywhere the pointwise sum of the convolutions (`Rd.convLp_apply_ae`). -/ +theorem coeFn_sum_convLp_ae (hp : p ≠ ∞) (K : ℕ → 𝓢(V, ℂ)) + (g : ℕ → Lp ℂ p (volume : Measure V)) (t : Finset ℕ) : + ⇑(∑ j ∈ t, convLp hp (K j).integrable (g j)) =ᵐ[volume] + fun x => ∑ j ∈ t, conv (K j) (g j) volume x := by + filter_upwards [ae_all_iff.2 fun j => convLp_apply_ae hp (K j).integrable (g j), + Lp.coeFn_fun_finsetSum t fun j => convLp hp (K j).integrable (g j)] with x hx1 hx2 + rw [hx2] + exact Finset.sum_congr rfl fun j _ => hx1 j + +omit [Fact (1 ≤ p)] in +/-- The weighted `L_p` blocks of a family `g` are almost everywhere measurable, and so is their +pointwise `ℓ_q` norm `x ↦ ‖(2^{js} |g_j(x)|)_j‖_{ℓ_q}`. -/ +theorem aemeasurable_lqNorm_dyadicWeight_Lp (s : ℝ) (q : ℝ≥0∞) + (g : ℕ → Lp ℂ p (volume : Measure V)) : + AEMeasurable (fun x => lqNorm q fun j => dyadicWeight s j * ‖g j x‖ₑ) volume := + aemeasurable_lqNorm_comp (fun j => (Lp.aestronglyMeasurable (g j)).eNorm.const_mul _) q + +namespace LPKernel + +variable (K : LPKernel V) + +variable (p) in +/-- The **Triebel–Lizorkin quasi-norm of a tempered distribution for the kernel `K`**: +`‖ x ↦ ‖(2^{js} |g_j(x)|)_j‖_{ℓ_q} ‖_p` when every block `Δ'_j u` is (the tempered distribution +of) an `L_p` function `g_j`, and `∞` otherwise (the infimum over the families `(g_j)` with +`Δ'_j u = g_j`; there is at most one, `Rd.LPKernel.triebelLizorkinNormDistr_eq`). The kernel of +the project gives `Rd.triebelLizorkinNormDistr`. -/ +noncomputable def triebelLizorkinNormDistr (s : ℝ) (q : ℝ≥0∞) (u : 𝓢'(V, ℂ)) : ℝ≥0∞ := + ⨅ (g : ℕ → Lp ℂ p (volume : Measure V)) (_ : ∀ j, K.distribBlock j u = (g j : 𝓢'(V, ℂ))), + eLpNorm (fun x => lqNorm q fun j => dyadicWeight s j * ‖g j x‖ₑ) p volume + +/-- The quasi-norm is at most that of any family of `L_p` functions representing the blocks. -/ +theorem triebelLizorkinNormDistr_le {s : ℝ} {q : ℝ≥0∞} {u : 𝓢'(V, ℂ)} + {g : ℕ → Lp ℂ p (volume : Measure V)} (hg : ∀ j, K.distribBlock j u = (g j : 𝓢'(V, ℂ))) : + K.triebelLizorkinNormDistr p s q u ≤ + eLpNorm (fun x => lqNorm q fun j => dyadicWeight s j * ‖g j x‖ₑ) p volume := + iInf₂_le g hg + +/-- **The quasi-norm of the representing family**: if the blocks of `u` for `K` are the `L_p` +functions `g_j`, the quasi-norm is `‖ x ↦ ‖(2^{js} |g_j(x)|)_j‖_{ℓ_q} ‖_p`, since `L_p` functions +are determined by their tempered distributions (`Rd.eq_of_toTemperedDistribution_eq`). -/ +theorem triebelLizorkinNormDistr_eq {s : ℝ} {q : ℝ≥0∞} {u : 𝓢'(V, ℂ)} + {g : ℕ → Lp ℂ p (volume : Measure V)} (hg : ∀ j, K.distribBlock j u = (g j : 𝓢'(V, ℂ))) : + K.triebelLizorkinNormDistr p s q u = + eLpNorm (fun x => lqNorm q fun j => dyadicWeight s j * ‖g j x‖ₑ) p volume := by + refine le_antisymm (K.triebelLizorkinNormDistr_le hg) (le_iInf₂ fun g' hg' => ?_) + rw [funext fun j => eq_of_toTemperedDistribution_eq ((hg' j).symm.trans (hg j))] + +/-- If some block of `u` for `K` is no `L_p` function, the quasi-norm is `∞`. -/ +theorem triebelLizorkinNormDistr_eq_top {s : ℝ} {q : ℝ≥0∞} {u : 𝓢'(V, ℂ)} + (h : ¬ ∃ g : ℕ → Lp ℂ p (volume : Measure V), + ∀ j, K.distribBlock j u = (g j : 𝓢'(V, ℂ))) : + K.triebelLizorkinNormDistr p s q u = ∞ := + iInf_eq_top.2 fun g => iInf_eq_top.2 fun hg => (h ⟨g, hg⟩).elim + +/-- **Bounding by the quasi-norm**: if `x ≤ C ‖ x ↦ ‖(2^{js} |g_j(x)|)_j‖_{ℓ_q} ‖_p` for every +family of `L_p` functions `g_j` representing the blocks of `u` for `K`, and `C ≠ 0`, then +`x ≤ C ‖u‖_{F^s_{p,q}, K}` (`Rd.LPKernel.triebelLizorkinNormDistr_eq`, +`Rd.LPKernel.triebelLizorkinNormDistr_eq_top`). -/ +theorem le_mul_triebelLizorkinNormDistr {s : ℝ} {q : ℝ≥0∞} {u : 𝓢'(V, ℂ)} {x C : ℝ≥0∞} + (hC : C ≠ 0) (h : ∀ g : ℕ → Lp ℂ p (volume : Measure V), + (∀ j, K.distribBlock j u = (g j : 𝓢'(V, ℂ))) → + x ≤ C * eLpNorm (fun y => lqNorm q fun j => dyadicWeight s j * ‖g j y‖ₑ) p volume) : + x ≤ C * K.triebelLizorkinNormDistr p s q u := by + by_cases hex : ∃ g : ℕ → Lp ℂ p (volume : Measure V), + ∀ j, K.distribBlock j u = (g j : 𝓢'(V, ℂ)) + · obtain ⟨g, hg⟩ := hex + rw [K.triebelLizorkinNormDistr_eq hg] + exact h g hg + · rw [K.triebelLizorkinNormDistr_eq_top hex, ENNReal.mul_top hC] + exact le_top + +/-- **The quasi-norm decreases in `q`**: `‖u‖_{F^s_{p,r}, K} ≤ ‖u‖_{F^s_{p,q}, K}` for +`1 ≤ q ≤ r ≤ ∞` (`MeasureTheory.eLpNorm_lqNorm_mono_exponent`). -/ +theorem triebelLizorkinNormDistr_mono_exponent {s : ℝ} {q r : ℝ≥0∞} (hq : 1 ≤ q) (hqr : q ≤ r) + (u : 𝓢'(V, ℂ)) : + K.triebelLizorkinNormDistr p s r u ≤ K.triebelLizorkinNormDistr p s q u := + le_iInf₂ fun g hg => (K.triebelLizorkinNormDistr_le hg).trans + (eLpNorm_lqNorm_mono_exponent (zero_lt_one.trans_le hq).ne' hqr fun j => + (Lp.aestronglyMeasurable (g j)).eNorm.const_mul _) + +/-- **The quasi-norm increases in `s`**: `‖u‖_{F^s_{p,q}, K} ≤ ‖u‖_{F^t_{p,q}, K}` for `s ≤ t` +(`MeasureTheory.eLpNorm_lqNorm_dyadicWeight_mono_smoothness`). -/ +theorem triebelLizorkinNormDistr_mono_smoothness {s t : ℝ} (hst : s ≤ t) (q : ℝ≥0∞) + (u : 𝓢'(V, ℂ)) : + K.triebelLizorkinNormDistr p s q u ≤ K.triebelLizorkinNormDistr p t q u := + le_iInf₂ fun g hg => (K.triebelLizorkinNormDistr_le hg).trans + (eLpNorm_lqNorm_dyadicWeight_mono_smoothness hst fun j => + (Lp.aestronglyMeasurable (g j)).eNorm) + +end LPKernel + +variable (p) in +/-- The **Triebel–Lizorkin quasi-norm of a tempered distribution** `u`, the quasi-norm +`Rd.LPKernel.triebelLizorkinNormDistr` of the kernel of the project (`Rd.LPKernel.standard`): +`‖ x ↦ ‖(2^{js} |g_j(x)|)_j‖_{ℓ_q} ‖_p` when every block `Δ_j u` is (the tempered distribution +of) an `L_p` function `g_j`, and `∞` otherwise. -/ +noncomputable def triebelLizorkinNormDistr (s : ℝ) (q : ℝ≥0∞) (u : 𝓢'(V, ℂ)) : ℝ≥0∞ := + (LPKernel.standard V).triebelLizorkinNormDistr p s q u + +variable (p) in +/-- `u ∈ F^s_{p,q}`: the Triebel–Lizorkin quasi-norm of the tempered distribution `u` is +finite. -/ +def MemTriebelLizorkinDistr (s : ℝ) (q : ℝ≥0∞) (u : 𝓢'(V, ℂ)) : Prop := + triebelLizorkinNormDistr p s q u < ∞ + +/-- The quasi-norm of the kernel of the project is `Rd.triebelLizorkinNormDistr`, by +definition. -/ +theorem LPKernel.standard_triebelLizorkinNormDistr (s : ℝ) (q : ℝ≥0∞) (u : 𝓢'(V, ℂ)) : + (LPKernel.standard V).triebelLizorkinNormDistr p s q u = + Rd.triebelLizorkinNormDistr p s q u := + rfl + +/-- A family represents the blocks of `u` for the kernel of the project iff it represents the +blocks `Rd.distribBlock` (`Rd.LPKernel.standard_distribBlock`). -/ +theorem LPKernel.standard_distribBlock_eq_iff {u : 𝓢'(V, ℂ)} {G : ℕ → 𝓢'(V, ℂ)} : + (∀ j, (LPKernel.standard V).distribBlock j u = G j) ↔ ∀ j, Rd.distribBlock j u = G j := by + simp only [LPKernel.standard_distribBlock] + +/-- The quasi-norm is at most that of any family of `L_p` functions representing the blocks +(`Rd.LPKernel.triebelLizorkinNormDistr_le`). -/ +theorem triebelLizorkinNormDistr_le {s : ℝ} {q : ℝ≥0∞} {u : 𝓢'(V, ℂ)} + {g : ℕ → Lp ℂ p (volume : Measure V)} (hg : ∀ j, distribBlock j u = (g j : 𝓢'(V, ℂ))) : + triebelLizorkinNormDistr p s q u ≤ + eLpNorm (fun x => lqNorm q fun j => dyadicWeight s j * ‖g j x‖ₑ) p volume := + (LPKernel.standard V).triebelLizorkinNormDistr_le (LPKernel.standard_distribBlock_eq_iff.2 hg) + +/-- **The quasi-norm of the representing family**: if the blocks of `u` are the `L_p` functions +`g_j`, the quasi-norm is `‖ x ↦ ‖(2^{js} |g_j(x)|)_j‖_{ℓ_q} ‖_p` +(`Rd.LPKernel.triebelLizorkinNormDistr_eq`). -/ +theorem triebelLizorkinNormDistr_eq {s : ℝ} {q : ℝ≥0∞} {u : 𝓢'(V, ℂ)} + {g : ℕ → Lp ℂ p (volume : Measure V)} (hg : ∀ j, distribBlock j u = (g j : 𝓢'(V, ℂ))) : + triebelLizorkinNormDistr p s q u = + eLpNorm (fun x => lqNorm q fun j => dyadicWeight s j * ‖g j x‖ₑ) p volume := + (LPKernel.standard V).triebelLizorkinNormDistr_eq (LPKernel.standard_distribBlock_eq_iff.2 hg) + +/-- If some block of `u` is no `L_p` function, the quasi-norm is `∞` +(`Rd.LPKernel.triebelLizorkinNormDistr_eq_top`). -/ +theorem triebelLizorkinNormDistr_eq_top {s : ℝ} {q : ℝ≥0∞} {u : 𝓢'(V, ℂ)} + (h : ¬ ∃ g : ℕ → Lp ℂ p (volume : Measure V), ∀ j, distribBlock j u = (g j : 𝓢'(V, ℂ))) : + triebelLizorkinNormDistr p s q u = ∞ := + (LPKernel.standard V).triebelLizorkinNormDistr_eq_top fun ⟨g, hg⟩ => + h ⟨g, LPKernel.standard_distribBlock_eq_iff.1 hg⟩ + +/-- **Bounding by the quasi-norm**: if `x ≤ C ‖ x ↦ ‖(2^{js} |g_j(x)|)_j‖_{ℓ_q} ‖_p` for every +family of `L_p` functions `g_j` representing the blocks of `u`, and `C ≠ 0`, then +`x ≤ C ‖u‖_{F^s_{p,q}}` (`Rd.LPKernel.le_mul_triebelLizorkinNormDistr`). -/ +theorem le_mul_triebelLizorkinNormDistr {s : ℝ} {q : ℝ≥0∞} {u : 𝓢'(V, ℂ)} {x C : ℝ≥0∞} + (hC : C ≠ 0) (h : ∀ g : ℕ → Lp ℂ p (volume : Measure V), + (∀ j, distribBlock j u = (g j : 𝓢'(V, ℂ))) → + x ≤ C * eLpNorm (fun y => lqNorm q fun j => dyadicWeight s j * ‖g j y‖ₑ) p volume) : + x ≤ C * triebelLizorkinNormDistr p s q u := + (LPKernel.standard V).le_mul_triebelLizorkinNormDistr hC fun g hg => + h g (LPKernel.standard_distribBlock_eq_iff.1 hg) + +/-! ### Compatibility with `L_p` -/ + +namespace LPKernel + +variable (K : LPKernel V) + +/-- The **Triebel–Lizorkin quasi-norm of `f ∈ L_p` for the kernel `K`**: +`‖ x ↦ ‖(2^{js} |(ψ'_j ⋆ f)(x)|)_j‖_{ℓ_q} ‖_p`. -/ +noncomputable def triebelLizorkinNorm (s : ℝ) (q : ℝ≥0∞) (f : Lp ℂ p (volume : Measure V)) : + ℝ≥0∞ := + eLpNorm (fun x => lqNorm q fun j => dyadicWeight s j * ‖conv (K.psiS j) f volume x‖ₑ) p volume + +/-- **Compatibility with `L_p`**: for `1 ≤ p < ∞` and `f ∈ L_p(V)`, the quasi-norm of the tempered +distribution of `f` for the kernel `K` is `K.triebelLizorkinNorm s q f`, since the blocks of `f` +are the convolutions `ψ'_j ⋆ f` (`Rd.fourierMultiplierCLM_fourier_toLp_eq_conv`). -/ +theorem triebelLizorkinNormDistr_toTemperedDistribution (hp : p ≠ ∞) (s : ℝ) (q : ℝ≥0∞) + (f : Lp ℂ p (volume : Measure V)) : + K.triebelLizorkinNormDistr p s q (f : 𝓢'(V, ℂ)) = K.triebelLizorkinNorm s q f := by + rw [K.triebelLizorkinNormDistr_eq (g := fun j => convLp hp (K.psiS j).integrable f) + (fun j => fourierMultiplierCLM_fourier_toLp_eq_conv hp (K.psiS j) f), triebelLizorkinNorm] + refine eLpNorm_congr_ae ?_ + filter_upwards [ae_all_iff.2 fun j => convLp_apply_ae hp (K.psiS j).integrable f] with x hx + simp_rw [hx] + +omit [Fact (1 ≤ p)] in +/-- The quasi-norm of the kernel of the project on `L_p` is `Rd.triebelLizorkinNorm`, for every +`1 ≤ p ≤ ∞`: the blocks are the same functions (`Rd.LPKernel.standard_psiS`, `Rd.coe_psiS`). -/ +theorem standard_triebelLizorkinNorm (s : ℝ) (q : ℝ≥0∞) (f : Lp ℂ p (volume : Measure V)) : + (standard V).triebelLizorkinNorm s q f = Rd.triebelLizorkinNorm s q f := by + simp only [triebelLizorkinNorm, Rd.triebelLizorkinNorm, blockFun, standard_psiS, Rd.coe_psiS] + +end LPKernel + +/-- **Compatibility with `L_p`**: for `1 ≤ p < ∞` and `f ∈ L_p(V)`, the quasi-norm of the +tempered distribution of `f` is the Triebel–Lizorkin quasi-norm `‖f‖_{F^s_{p,q}}` of +`Rd.triebelLizorkinNorm`: the case of the kernel of the project +(`Rd.LPKernel.triebelLizorkinNormDistr_toTemperedDistribution`, +`Rd.LPKernel.standard_triebelLizorkinNorm`). -/ +theorem triebelLizorkinNormDistr_toTemperedDistribution (hp : p ≠ ∞) (s : ℝ) (q : ℝ≥0∞) + (f : Lp ℂ p (volume : Measure V)) : + triebelLizorkinNormDistr p s q (f : 𝓢'(V, ℂ)) = triebelLizorkinNorm s q f := + ((LPKernel.standard V).triebelLizorkinNormDistr_toTemperedDistribution hp s q f).trans + (LPKernel.standard_triebelLizorkinNorm s q f) + +/-- `f ∈ L_p` lies in `F^s_{p,q}` as a tempered distribution iff it lies in `F^s_{p,q}` of +`Rd.MemTriebelLizorkin` (`Rd.triebelLizorkinNormDistr_toTemperedDistribution`). -/ +theorem memTriebelLizorkinDistr_toTemperedDistribution_iff (hp : p ≠ ∞) {s : ℝ} {q : ℝ≥0∞} + (f : Lp ℂ p (volume : Measure V)) : + MemTriebelLizorkinDistr p s q (f : 𝓢'(V, ℂ)) ↔ MemTriebelLizorkin s q f := by + rw [MemTriebelLizorkinDistr, MemTriebelLizorkin, + triebelLizorkinNormDistr_toTemperedDistribution hp] + +/-- **The quasi-norm decreases in `q`**: `‖u‖_{F^s_{p,r}} ≤ ‖u‖_{F^s_{p,q}}` for +`1 ≤ q ≤ r ≤ ∞` (`Rd.LPKernel.triebelLizorkinNormDistr_mono_exponent`). -/ +theorem triebelLizorkinNormDistr_mono_exponent {s : ℝ} {q r : ℝ≥0∞} (hq : 1 ≤ q) (hqr : q ≤ r) + (u : 𝓢'(V, ℂ)) : + triebelLizorkinNormDistr p s r u ≤ triebelLizorkinNormDistr p s q u := + (LPKernel.standard V).triebelLizorkinNormDistr_mono_exponent hq hqr u + +/-- **The quasi-norm increases in `s`**: `‖u‖_{F^s_{p,q}} ≤ ‖u‖_{F^t_{p,q}}` for `s ≤ t` +(`Rd.LPKernel.triebelLizorkinNormDistr_mono_smoothness`). -/ +theorem triebelLizorkinNormDistr_mono_smoothness {s t : ℝ} (hst : s ≤ t) (q : ℝ≥0∞) + (u : 𝓢'(V, ℂ)) : + triebelLizorkinNormDistr p s q u ≤ triebelLizorkinNormDistr p t q u := + (LPKernel.standard V).triebelLizorkinNormDistr_mono_smoothness hst q u + +/-- **`F^s_{p,q}` increases in `q`**: `F^s_{p,q} ⊆ F^s_{p,r}` for `1 ≤ q ≤ r ≤ ∞`. -/ +theorem MemTriebelLizorkinDistr.mono_exponent {s : ℝ} {q r : ℝ≥0∞} (hq : 1 ≤ q) (hqr : q ≤ r) + {u : 𝓢'(V, ℂ)} (hu : MemTriebelLizorkinDistr p s q u) : MemTriebelLizorkinDistr p s r u := + (triebelLizorkinNormDistr_mono_exponent hq hqr u).trans_lt hu + +/-- **`F^s_{p,q}` decreases in `s`**: `F^t_{p,q} ⊆ F^s_{p,q}` for `s ≤ t`. -/ +theorem MemTriebelLizorkinDistr.mono_smoothness {s t : ℝ} (hst : s ≤ t) {q : ℝ≥0∞} + {u : 𝓢'(V, ℂ)} (hu : MemTriebelLizorkinDistr p t q u) : MemTriebelLizorkinDistr p s q u := + (triebelLizorkinNormDistr_mono_smoothness hst q u).trans_lt hu + +/-- **The blocks of `u ∈ F^s_{p,q}` are `L_p` functions**: if the quasi-norm of `u` is finite, +there is a family `(g_j)` in `L_p(V)` with `Δ_j u = g_j` for every `j` +(`Rd.triebelLizorkinNormDistr_eq_top`). -/ +theorem MemTriebelLizorkinDistr.exists_blocks {s : ℝ} {q : ℝ≥0∞} {u : 𝓢'(V, ℂ)} + (hu : MemTriebelLizorkinDistr p s q u) : + ∃ g : ℕ → Lp ℂ p (volume : Measure V), ∀ j, distribBlock j u = (g j : 𝓢'(V, ℂ)) := by + by_contra h + exact hu.ne (triebelLizorkinNormDistr_eq_top h) + +/-! ### Limits of the decomposition -/ + +/-- **A tempered distribution is the limit of its `L_p` blocks**: if every block `Δ_j w` is an +`L_p` function `G_j` and the partial sums `∑_{j < J} G_j` converge in `L_p(V)` to `h`, then +`w = h` as tempered distributions. The partial sums tend to `w` in `𝓢'` +(`Rd.tendsto_sum_distribBlock`) and to `h`, since `L_p` embeds continuously into `𝓢'`; limits in +`𝓢'` are unique. -/ +theorem eq_of_tendsto_sum_distribBlock {w : 𝓢'(V, ℂ)} {G : ℕ → Lp ℂ p (volume : Measure V)} + (hw : ∀ j, distribBlock j w = (G j : 𝓢'(V, ℂ))) {h : Lp ℂ p (volume : Measure V)} + (hG : Tendsto (fun J => ∑ j ∈ Finset.range J, G j) atTop (𝓝 h)) : + w = (h : 𝓢'(V, ℂ)) := by + refine tendsto_nhds_unique (tendsto_sum_distribBlock w) ?_ + refine (((Lp.toTemperedDistributionCLM ℂ volume p).continuous.tendsto h).comp hG).congr + fun J => ?_ + simp only [Function.comp_apply, map_sum, Lp.toTemperedDistributionCLM_apply, hw] + +end Rd diff --git a/LeanPool/FunctionSpaces/Rd/TriebelLizorkin/TriebelLizorkinLocalMeans.lean b/LeanPool/FunctionSpaces/Rd/TriebelLizorkin/TriebelLizorkinLocalMeans.lean new file mode 100644 index 0000000000..76c4e93cad --- /dev/null +++ b/LeanPool/FunctionSpaces/Rd/TriebelLizorkin/TriebelLizorkinLocalMeans.lean @@ -0,0 +1,511 @@ +/- +Copyright (c) 2026 Mario Ullrich. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Mario Ullrich +-/ +module + +public import LeanPool.FunctionSpaces.Rd.TriebelLizorkin.TriebelLizorkin +public import LeanPool.FunctionSpaces.Rd.LocalMeans.KernelMajorants +public import LeanPool.FunctionSpaces.Analysis.Maximal.FeffermanStein + +/- +Modified for Lean Pool: module names and imports adapted. +-/ + +/-! +# Local means for Triebel–Lizorkin spaces + +For a bump `b` of radius `R` and an order `L`, the local means `k_j ⋆ f` of +`FunctionSpaces.Rd.LocalMeans.LocalMeans` define the quasi-norm + +`‖f‖_{F^s_{p,q}}^{b,L} = ‖ x ↦ ‖(2^(js) |k_j ⋆ f(x)|)_j‖_{ℓ_q} ‖_p` + +(`Rd.LocalMeansBump.tlLocalMeansNorm`). For `1 < p < ∞`, `1 < q ≤ ∞` and `0 < s < L` it is +equivalent to the Triebel–Lizorkin quasi-norm, with explicit constants +(`Rd.LocalMeansBump.triebelLizorkinNorm_le_tlLocalMeansNorm`, +`Rd.LocalMeansBump.tlLocalMeansNorm_le_triebelLizorkinNorm`), so `F^s_{p,q}` is described by +local means (`Rd.LocalMeansBump.memTriebelLizorkin_iff_tlLocalMeans`), and every bump and every +order `L > s` give the same space (`Rd.LocalMeansBump.tlLocalMeansNorm_lt_top_iff`). + +The proof is pointwise in `x`. The reproducing formula `f = ∑_i η_i ⋆ k_i ⋆ f` and the cross +kernels `ψ_j ⋆ η_i` of `FunctionSpaces.Rd.LocalMeans.KernelMajorants` give +`|ψ_j ⋆ f(x)| ≤ C ∑_i c_{ji} M(k_i ⋆ f)(x)` almost everywhere +(`Rd.LocalMeansBump.enorm_blockFun_le_tsum_maximal`); the decomposition `f = ∑_i ψ_i ⋆ f` +and the cross kernels `k_j ⋆ Θ_i` give `|k_j ⋆ f(x)| ≤ C ∑_i c_{ji} M(ψ_i ⋆ f)(x)` +(`Rd.LocalMeansBump.enorm_localMean_le_tsum_maximal`). The factors `c_{ji}` decay geometrically +below the diagonal, so the almost diagonal estimate in `ℓ_q` +(`ENNReal.lqNorm_le_almostDiagonalConst_mul_of_le`) and the Fefferman–Stein inequality +(`Rd.feffermanStein`) finish. The partial sums of the two decompositions converge in `L_p`, and +the pointwise bounds pass to the limit by `MeasureTheory.ae_enorm_le_of_tendsto_Lp`. + +The first half works for every synthesis sum: if `F = ∑_i η_i ⋆ h_i` in `L_p`, then +`‖F‖_{F^s_{p,q}} ≤ C ‖ x ↦ ‖(2^(is) |h_i(x)|)_i‖_{ℓ_q} ‖_p` +(`Rd.LocalMeansBump.triebelLizorkinNorm_le_of_tendsto_sum_dual`). +-/ + +@[expose] public section + +open MeasureTheory Module Filter Topology +open scoped ENNReal + +open ENNReal (lqNorm dyadicWeight) + +namespace Rd + +variable {V : Type*} [NormedAddCommGroup V] [InnerProductSpace ℝ V] [FiniteDimensional ℝ V] + [MeasurableSpace V] [BorelSpace V] {p : ℝ≥0∞} [Fact (1 ≤ p)] + +/-! ### Sequences and maximal functions -/ + +/-- The weights `c_{ji} = 2^(-(j-i)L)` for `i ≤ j` and `c_{ji} = 1` for `i > j` are finite. -/ +theorem ite_dyadicWeight_ne_top (L : ℝ) (i j : ℕ) : + (if i ≤ j then dyadicWeight (-L) (j - i) else 1) ≠ ∞ := by + split_ifs + · exact ENNReal.dyadicWeight_ne_top _ _ + · exact ENNReal.one_ne_top + +/-- The weights go inside the maximal function: `2^(is) M g(x) = M(2^(is) g)(x)`. -/ +theorem dyadicWeight_mul_maximal (s : ℝ) (i : ℕ) (g : V → ℝ≥0∞) (x : V) : + dyadicWeight s i * maximal g x = maximal (fun y => dyadicWeight s i * g y) x := + (maximal_const_mul (ENNReal.dyadicWeight_ne_top s i) g x).symm + +omit [Fact (1 ≤ p)] in +/-- **From pointwise maximal bounds to `L_p(ℓ_q)`**: for `1 < p < ∞` and `1 < q ≤ ∞`, if +`F ≤ C ‖(M g_i)_i‖_{ℓ_q}` almost everywhere, with almost everywhere measurable `F` and `g_i`, +then +`‖F‖_p ≤ C C_{FS} ‖ x ↦ ‖(g_i(x))_i‖_{ℓ_q} ‖_p` with the Fefferman–Stein constant +`C_{FS} = Rd.feffermanSteinConst V p q`. -/ +theorem eLpNorm_le_of_le_lqNorm_maximal (hp1 : 1 < p) (hp : p ≠ ∞) {q : ℝ≥0∞} (hq1 : 1 < q) + {F : V → ℝ≥0∞} (hF : AEMeasurable F volume) {g : ℕ → V → ℝ≥0∞} + (hg : ∀ i, AEMeasurable (g i) volume) {C : ℝ≥0∞} + (h : ∀ᵐ x ∂volume, F x ≤ C * lqNorm q (fun i => maximal (g i) x)) : + eLpNorm F p volume ≤ + C * feffermanSteinConst V p q * eLpNorm (fun x => lqNorm q (fun i => g i x)) p volume := + calc eLpNorm F p volume + ≤ eLpNorm (fun x => C * lqNorm q (fun i => maximal (g i) x)) p volume := + eLpNorm_mono_eNorm_ae hF.aestronglyMeasurable (h.mono fun x hx => by + simpa only [eNorm_eq_self] using hx) + _ = C * eLpNorm (fun x => lqNorm q (fun i => maximal (g i) x)) p volume := + eLpNorm_const_mul_ennreal (c := C) (aemeasurable_lqNorm_comp + (fun i => (measurable_maximal (g i)).aemeasurable) q).aestronglyMeasurable + _ ≤ C * (feffermanSteinConst V p q * + eLpNorm (fun x => lqNorm q (fun i => g i x)) p volume) := by + gcongr + exact feffermanStein hp1 hp hq1 g hg + _ = _ := by rw [mul_assoc] + +namespace LocalMeansBump + +variable (b : LocalMeansBump V) + +/-! ### The local means quasi-norm -/ + +/-- The **local means quasi-norm of Triebel–Lizorkin type** +`‖ x ↦ ‖(2^(js) |k_j ⋆ f(x)|)_j‖_{ℓ_q} ‖_p`, with the local means kernels `k_j` of the bump `b` +and the order `L`: the `ℓ_q` norm at each point, then the `L_p` norm. -/ +noncomputable def tlLocalMeansNorm (L : ℕ) (s : ℝ) (q : ℝ≥0∞) + (f : Lp ℂ p (volume : Measure V)) : ℝ≥0∞ := + eLpNorm (fun x => lqNorm q (fun j => dyadicWeight s j * ‖conv (b.kernel L j) f volume x‖ₑ)) + p volume + +/-- The local means `k_j ⋆ f ∈ L_p` are represented by the pointwise convolutions. -/ +theorem localMean_ae_eq (hp : p ≠ ∞) (L j : ℕ) (f : Lp ℂ p (volume : Measure V)) : + b.localMean hp L j f =ᵐ[volume] conv (b.kernel L j) f volume := + convLp_apply_ae hp (b.integrable_kernel L j) f + +/-- The pointwise local means `k_j ⋆ f` are continuous, since `k_j` is continuous with compact +support and `f` is locally integrable. -/ +theorem continuous_conv_kernel (L j : ℕ) (f : Lp ℂ p (volume : Measure V)) : + Continuous (conv (b.kernel L j) f volume) := + (b.hasCompactSupport_kernel L j).continuous_convolution_left (ContinuousLinearMap.mul ℂ ℂ) + (b.continuous_kernel L j) ((Lp.memLp f).locallyIntegrable Fact.out) + +/-- The weighted local means `2^(js) |k_j ⋆ f|` are measurable. -/ +theorem measurable_dyadicWeight_mul_conv_kernel (L : ℕ) (s : ℝ) (j : ℕ) + (f : Lp ℂ p (volume : Measure V)) : + Measurable fun y => dyadicWeight s j * ‖conv (b.kernel L j) f volume y‖ₑ := + (b.continuous_conv_kernel L j f).measurable.eNorm.const_mul _ + +/-- The pointwise `ℓ_q` norm of the weighted local means is measurable. -/ +theorem aemeasurable_lqNorm_conv_kernel (L : ℕ) (s : ℝ) (q : ℝ≥0∞) + (f : Lp ℂ p (volume : Measure V)) : + AEMeasurable (fun x => lqNorm q (fun j => dyadicWeight s j * + ‖conv (b.kernel L j) f volume x‖ₑ)) volume := + aemeasurable_lqNorm_comp + (fun j => (b.measurable_dyadicWeight_mul_conv_kernel L s j f).aemeasurable) q + +/-! ### Blocks by local means -/ + +/-- The constant `C_{L,L',n+1} C_{n,n+1}` of the bound of the blocks by local means: the constant +of the cross kernels `ψ_j ⋆ η_i` (`Rd.LocalMeansBump.psiDualConst`) at the decay order `n + 1` +times the constant of the maximal function bound (`Rd.decayMaximalConst`). -/ +noncomputable def blockByLocalMeansConst (L L' : ℕ) : ℝ≥0∞ := + b.psiDualConst L L' (finrank ℝ V + 1) * decayMaximalConst V (finrank ℝ V + 1) + +/-- The constant of the bound of the blocks by local means is finite. -/ +theorem blockByLocalMeansConst_ne_top (L L' : ℕ) : b.blockByLocalMeansConst L L' ≠ ∞ := + ENNReal.mul_ne_top (b.psiDualConst_ne_top L L' (Nat.lt_succ_self _)) + (decayMaximalConst_ne_top (Nat.lt_succ_self _)) + +/-- **One term of the reproducing formula under a block**: for `L' ≥ 1`, all levels `i, j`, every +function `h` and every `x`, `|((ψ_j ⋆ η_i) ⋆ h)(x)| ≤ C c_{ji} M|h|(x)` with +`c_{ji} = 2^(-(j-i)L')` for `i ≤ j`, `c_{ji} = 1` for `i > j`, and +`C = Rd.LocalMeansBump.blockByLocalMeansConst L L'`. -/ +theorem enorm_conv_conv_psi_dual_le (L : ℕ) {L' : ℕ} (hL' : 1 ≤ L') (i j : ℕ) (h : V → ℂ) + (x : V) : + ‖conv (conv (psi j) (b.dual L i) volume) h volume x‖ₑ ≤ + b.blockByLocalMeansConst L L' * ((if i ≤ j then dyadicWeight (-(L' : ℝ)) (j - i) else 1) * + maximal (fun y => ‖h y‖ₑ) x) := by + have hC : b.psiDualConst L L' (finrank ℝ V + 1) * + (if i ≤ j then dyadicWeight (-(L' : ℝ)) (j - i) else 1) ≠ ∞ := + ENNReal.mul_ne_top (b.psiDualConst_ne_top L L' (Nat.lt_succ_self _)) + (ite_dyadicWeight_ne_top _ i j) + refine (enorm_conv_le_maximal_of_decay (Nat.lt_succ_self _) hC + (b.enorm_conv_psi_dual_le L hL' (finrank ℝ V + 1) i j) h x).trans (le_of_eq ?_) + rw [blockByLocalMeansConst] + ring + +/-! ### Synthesis with the dual kernels -/ + +/-- **A block of a partial synthesis sum**: for every family `h_i ∈ L_p`, almost everywhere, +`Δ_j (∑_{i ≤ J} η_i ⋆ h_i) = ∑_{i ≤ J} (ψ_j ⋆ η_i) ⋆ h_i`, with pointwise convolutions on the +right. -/ +theorem lpBlock_sum_dual_ae (hp : p ≠ ∞) (L J j : ℕ) (h : ℕ → Lp ℂ p (volume : Measure V)) : + ∀ᵐ x ∂volume, lpBlock hp j (∑ i ∈ Finset.range (J + 1), + convLp hp (b.integrable_dual L i) (h i)) x = + ∑ i ∈ Finset.range (J + 1), conv (conv (psi j) (b.dual L i) volume) (h i) volume x := by + simp only [map_sum, lpBlock, convLp_convLp] + have hall := ae_all_iff.2 fun i => convLp_apply_ae hp + (integrable_conv (integrable_psi j) (b.integrable_dual L i)) (h i) + filter_upwards [Lp.coeFn_fun_finsetSum (Finset.range (J + 1)) fun i => convLp hp + (integrable_conv (integrable_psi j) (b.integrable_dual L i)) (h i), hall] with x hx hi + rw [hx] + exact Finset.sum_congr rfl fun i _ => hi i + +/-- The bound of the blocks of a partial synthesis sum: for `L' ≥ 1`, every `J` and every family +`h_i ∈ L_p`, almost everywhere, `|Δ_j (∑_{i ≤ J} η_i ⋆ h_i)| ≤ C ∑_i c_{ji} M|h_i|` with +`c_{ji} = 2^(-(j-i)L')` for `i ≤ j`, `c_{ji} = 1` for `i > j`, and +`C = Rd.LocalMeansBump.blockByLocalMeansConst L L'`. -/ +theorem ae_enorm_lpBlock_sum_dual_le_tsum_maximal (hp : p ≠ ∞) (L : ℕ) {L' : ℕ} (hL' : 1 ≤ L') + (J j : ℕ) (h : ℕ → Lp ℂ p (volume : Measure V)) : + ∀ᵐ x ∂volume, ‖lpBlock hp j (∑ i ∈ Finset.range (J + 1), + convLp hp (b.integrable_dual L i) (h i)) x‖ₑ ≤ + b.blockByLocalMeansConst L L' * ∑' i, (if i ≤ j then dyadicWeight (-(L' : ℝ)) (j - i) + else 1) * maximal (fun y => ‖h i y‖ₑ) x := by + filter_upwards [b.lpBlock_sum_dual_ae hp L J j h] with x hx + rw [hx] + refine (eNorm_sum_le _ _).trans ((Finset.sum_le_sum fun i _ => + b.enorm_conv_conv_psi_dual_le L hL' i j _ x).trans ?_) + rw [← Finset.mul_sum] + gcongr + exact sum_le_tsum _ + +/-- **The blocks of a synthesis sum, pointwise**: if `F = ∑_i η_i ⋆ h_i` in `L_p` (as the limit +of the partial sums), then for `L' ≥ 1`, almost everywhere and for all levels `j`, +`|ψ_j ⋆ F(x)| ≤ C ∑_i c_{ji} M|h_i|(x)` with `c_{ji} = 2^(-(j-i)L')` for `i ≤ j`, `c_{ji} = 1` for +`i > j`, and `C = Rd.LocalMeansBump.blockByLocalMeansConst L L'` +(`MeasureTheory.ae_enorm_le_of_tendsto_Lp`). -/ +theorem enorm_blockFun_le_tsum_maximal_of_tendsto (hp : p ≠ ∞) (L : ℕ) {L' : ℕ} (hL' : 1 ≤ L') + {F : Lp ℂ p (volume : Measure V)} {h : ℕ → Lp ℂ p (volume : Measure V)} + (hrep : Tendsto (fun J => ∑ i ∈ Finset.range (J + 1), + convLp hp (b.integrable_dual L i) (h i)) atTop (𝓝 F)) : + ∀ᵐ x ∂volume, ∀ j, ‖blockFun j F x‖ₑ ≤ b.blockByLocalMeansConst L L' * + ∑' i, (if i ≤ j then dyadicWeight (-(L' : ℝ)) (j - i) else 1) * + maximal (fun y => ‖h i y‖ₑ) x := by + refine ae_all_iff.2 fun j => ?_ + have hlim := ae_enorm_le_of_tendsto_Lp (((lpBlock hp j).continuous.tendsto F).comp hrep) + (fun J => b.ae_enorm_lpBlock_sum_dual_le_tsum_maximal hp L hL' J j h) + filter_upwards [hlim, lpBlock_ae_eq_blockFun hp j F] with x hx hb + rwa [← hb] + +/-- **A block of a partial sum of the reproducing formula**: almost everywhere, +`Δ_j (∑_{i ≤ J} η_i ⋆ k_i ⋆ f) = ∑_{i ≤ J} (ψ_j ⋆ η_i) ⋆ (k_i ⋆ f)`, with pointwise +convolutions on the right (`Rd.LocalMeansBump.lpBlock_sum_dual_ae`). -/ +theorem lpBlock_sum_dual_localMean_ae (hp : p ≠ ∞) (L J j : ℕ) + (f : Lp ℂ p (volume : Measure V)) : + ∀ᵐ x ∂volume, lpBlock hp j (∑ i ∈ Finset.range (J + 1), + convLp hp (b.integrable_dual L i) (b.localMean hp L i f)) x = + ∑ i ∈ Finset.range (J + 1), + conv (conv (psi j) (b.dual L i) volume) (conv (b.kernel L i) f volume) volume x := by + filter_upwards [b.lpBlock_sum_dual_ae hp L J j fun i => b.localMean hp L i f] with x hx + rw [hx] + exact Finset.sum_congr rfl fun i _ => by rw [conv_congr_ae (b.localMean_ae_eq hp L i f)] + +/-- The maximal function of a local mean is that of the pointwise convolution `k_i ⋆ f` +(`Rd.maximal_congr_ae`). -/ +theorem maximal_enorm_localMean (hp : p ≠ ∞) (L i : ℕ) (f : Lp ℂ p (volume : Measure V)) : + maximal (fun y => ‖(b.localMean hp L i f : V → ℂ) y‖ₑ) = + maximal (fun y => ‖conv (b.kernel L i) f volume y‖ₑ) := + maximal_congr_ae ((b.localMean_ae_eq hp L i f).mono fun y hy => by simp only [hy]) + +/-- The bound of the blocks by local means for the partial sums of the reproducing formula: for +`L' ≥ 1` and every `J`, almost everywhere, +`|Δ_j (∑_{i ≤ J} η_i ⋆ k_i ⋆ f)| ≤ C ∑_i c_{ji} M(k_i ⋆ f)` with `c_{ji} = 2^(-(j-i)L')` for +`i ≤ j`, `c_{ji} = 1` for `i > j`, and `C = Rd.LocalMeansBump.blockByLocalMeansConst L L'` +(`Rd.LocalMeansBump.ae_enorm_lpBlock_sum_dual_le_tsum_maximal`). -/ +theorem ae_enorm_lpBlock_sum_dual_le (hp : p ≠ ∞) (L : ℕ) {L' : ℕ} (hL' : 1 ≤ L') (J j : ℕ) + (f : Lp ℂ p (volume : Measure V)) : + ∀ᵐ x ∂volume, ‖lpBlock hp j (∑ i ∈ Finset.range (J + 1), + convLp hp (b.integrable_dual L i) (b.localMean hp L i f)) x‖ₑ ≤ + b.blockByLocalMeansConst L L' * ∑' i, (if i ≤ j then dyadicWeight (-(L' : ℝ)) (j - i) + else 1) * maximal (fun y => ‖conv (b.kernel L i) f volume y‖ₑ) x := by + simpa only [b.maximal_enorm_localMean hp L] using + b.ae_enorm_lpBlock_sum_dual_le_tsum_maximal hp L hL' J j fun i => b.localMean hp L i f + +/-- **The blocks by local means, pointwise**: for `L ≥ 1`, `L' ≥ 1`, `1 ≤ p < ∞` and +`f ∈ L_p`, almost everywhere and for all levels `j`, +`|ψ_j ⋆ f(x)| ≤ C ∑_i c_{ji} M(k_i ⋆ f)(x)` with `c_{ji} = 2^(-(j-i)L')` for `i ≤ j`, +`c_{ji} = 1` for `i > j`, and `C = Rd.LocalMeansBump.blockByLocalMeansConst L L'`. The reproducing +formula `f = ∑_i η_i ⋆ k_i ⋆ f` holds in `L_p` +(`Rd.LocalMeansBump.enorm_blockFun_le_tsum_maximal_of_tendsto`). -/ +theorem enorm_blockFun_le_tsum_maximal {L : ℕ} (hL : 1 ≤ L) {L' : ℕ} (hL' : 1 ≤ L') + (hp : p ≠ ∞) (f : Lp ℂ p (volume : Measure V)) : + ∀ᵐ x ∂volume, ∀ j, ‖blockFun j f x‖ₑ ≤ b.blockByLocalMeansConst L L' * + ∑' i, (if i ≤ j then dyadicWeight (-(L' : ℝ)) (j - i) else 1) * + maximal (fun y => ‖conv (b.kernel L i) f volume y‖ₑ) x := by + simpa only [b.maximal_enorm_localMean hp L] using + b.enorm_blockFun_le_tsum_maximal_of_tendsto hp L hL' (b.tendsto_sum_dual_localMean hp hL f) + +/-! ### Local means by blocks -/ + +/-- The constant `C^Θ_{L,n+1} C_{n,n+1}` of the bound of the local means by blocks: the constant +of the cross kernels `k_j ⋆ Θ_i` (`Rd.LocalMeansBump.kernelThetaConst`) at the decay order +`n + 1` times the constant of the maximal function bound (`Rd.decayMaximalConst`). -/ +noncomputable def localMeansByBlockConst (L : ℕ) : ℝ≥0∞ := + b.kernelThetaConst L (finrank ℝ V + 1) * decayMaximalConst V (finrank ℝ V + 1) + +/-- The constant of the bound of the local means by blocks is finite. -/ +theorem localMeansByBlockConst_ne_top (L : ℕ) : b.localMeansByBlockConst L ≠ ∞ := + ENNReal.mul_ne_top (b.kernelThetaConst_ne_top L _) + (decayMaximalConst_ne_top (Nat.lt_succ_self _)) + +/-- **One term of the block decomposition under a local mean**: for all levels `i, j`, every +function `h` and every `x`, `|((k_j ⋆ Θ_i) ⋆ h)(x)| ≤ C c_{ji} M|h|(x)` with +`c_{ji} = 2^(-(j-i)L)` for `i ≤ j`, `c_{ji} = 1` for `i > j`, and +`C = Rd.LocalMeansBump.localMeansByBlockConst L`. -/ +theorem enorm_conv_conv_kernel_Theta_le (L i j : ℕ) (h : V → ℂ) (x : V) : + ‖conv (conv (b.kernel L j) (Theta i) volume) h volume x‖ₑ ≤ + b.localMeansByBlockConst L * ((if i ≤ j then dyadicWeight (-(L : ℝ)) (j - i) else 1) * + maximal (fun y => ‖h y‖ₑ) x) := by + have hC : b.kernelThetaConst L (finrank ℝ V + 1) * + (if i ≤ j then dyadicWeight (-(L : ℝ)) (j - i) else 1) ≠ ∞ := + ENNReal.mul_ne_top (b.kernelThetaConst_ne_top L _) (ite_dyadicWeight_ne_top _ i j) + refine (enorm_conv_le_maximal_of_decay (Nat.lt_succ_self _) hC + (b.enorm_conv_kernel_Theta_le L (finrank ℝ V + 1) i j) h x).trans (le_of_eq ?_) + rw [localMeansByBlockConst] + ring + +/-- A local mean of a block is the block convolved with the cross kernel: +`k_j ⋆ Δ_i f = (k_j ⋆ Θ_i) ⋆ Δ_i f` in `L_p`, since `Θ_i ⋆ ψ_i = ψ_i`. -/ +theorem localMean_lpBlock (hp : p ≠ ∞) (L i j : ℕ) (f : Lp ℂ p (volume : Measure V)) : + b.localMean hp L j (lpBlock hp i f) = + convLp hp (integrable_conv (b.integrable_kernel L j) (integrable_Theta i)) + (lpBlock hp i f) := by + have hT : convLp hp (integrable_Theta i) (lpBlock hp i f) = lpBlock hp i f := + convLp_convLp_of_eq hp (integrable_Theta i) (integrable_psi i) (integrable_psi i) + (conv_Theta_psi i) f + calc b.localMean hp L j (lpBlock hp i f) + = convLp hp (b.integrable_kernel L j) + (convLp hp (integrable_Theta i) (lpBlock hp i f)) := by rw [hT]; rfl + _ = _ := convLp_convLp hp _ _ _ + +/-- **A local mean of a partial sum of blocks**: almost everywhere, +`k_j ⋆ (∑_{i < J} Δ_i f) = ∑_{i < J} (k_j ⋆ Θ_i) ⋆ (ψ_i ⋆ f)`, with pointwise convolutions on +the right. -/ +theorem localMean_sum_lpBlock_ae (hp : p ≠ ∞) (L J j : ℕ) (f : Lp ℂ p (volume : Measure V)) : + ∀ᵐ x ∂volume, b.localMean hp L j (∑ i ∈ Finset.range J, lpBlock hp i f) x = + ∑ i ∈ Finset.range J, + conv (conv (b.kernel L j) (Theta i) volume) (blockFun i f) volume x := by + simp only [map_sum, b.localMean_lpBlock hp L _ j f] + have hall := ae_all_iff.2 fun i => convLp_apply_ae hp + (integrable_conv (b.integrable_kernel L j) (integrable_Theta i)) (lpBlock hp i f) + filter_upwards [Lp.coeFn_fun_finsetSum (Finset.range J) fun i => convLp hp + (integrable_conv (b.integrable_kernel L j) (integrable_Theta i)) (lpBlock hp i f), hall] + with x hx hi + rw [hx] + refine Finset.sum_congr rfl fun i _ => ?_ + rw [hi i, conv_congr_ae (lpBlock_ae_eq_blockFun hp i f)] + +/-- The bound of the local means by blocks for the partial sums of the block decomposition: for +every `J`, almost everywhere, `|k_j ⋆ (∑_{i < J} Δ_i f)| ≤ C ∑_i c_{ji} M(ψ_i ⋆ f)` with +`c_{ji} = 2^(-(j-i)L)` for `i ≤ j`, `c_{ji} = 1` for `i > j`, and +`C = Rd.LocalMeansBump.localMeansByBlockConst L`. -/ +theorem ae_enorm_localMean_sum_lpBlock_le (hp : p ≠ ∞) (L J j : ℕ) + (f : Lp ℂ p (volume : Measure V)) : + ∀ᵐ x ∂volume, ‖b.localMean hp L j (∑ i ∈ Finset.range J, lpBlock hp i f) x‖ₑ ≤ + b.localMeansByBlockConst L * ∑' i, (if i ≤ j then dyadicWeight (-(L : ℝ)) (j - i) + else 1) * maximal (fun y => ‖blockFun i f y‖ₑ) x := by + filter_upwards [b.localMean_sum_lpBlock_ae hp L J j f] with x hx + rw [hx] + refine (eNorm_sum_le _ _).trans ((Finset.sum_le_sum fun i _ => + b.enorm_conv_conv_kernel_Theta_le L i j _ x).trans ?_) + rw [← Finset.mul_sum] + gcongr + exact sum_le_tsum _ + +/-- **The local means by blocks, pointwise**: for every order `L`, `1 ≤ p < ∞` and `f ∈ L_p`, +almost everywhere and for all levels `j`, `|k_j ⋆ f(x)| ≤ C ∑_i c_{ji} M(ψ_i ⋆ f)(x)` with +`c_{ji} = 2^(-(j-i)L)` for `i ≤ j`, `c_{ji} = 1` for `i > j`, and +`C = Rd.LocalMeansBump.localMeansByBlockConst L`. The decomposition `f = ∑_i Δ_i f` holds in +`L_p`, and the bound passes from its partial sums to `f` +(`MeasureTheory.ae_enorm_le_of_tendsto_Lp`). -/ +theorem enorm_localMean_le_tsum_maximal (L : ℕ) (hp : p ≠ ∞) (f : Lp ℂ p (volume : Measure V)) : + ∀ᵐ x ∂volume, ∀ j, ‖conv (b.kernel L j) f volume x‖ₑ ≤ b.localMeansByBlockConst L * + ∑' i, (if i ≤ j then dyadicWeight (-(L : ℝ)) (j - i) else 1) * + maximal (fun y => ‖blockFun i f y‖ₑ) x := by + refine ae_all_iff.2 fun j => ?_ + have h := ae_enorm_le_of_tendsto_Lp + (((b.localMean hp L j).continuous.tendsto f).comp (tendsto_sum_lpBlock hp f)) + (fun J => b.ae_enorm_localMean_sum_lpBlock_le hp L J j f) + filter_upwards [h, b.localMean_ae_eq hp L j f] with x hx hb + rwa [← hb] + +/-! ### The almost diagonal step -/ + +/-- **The blocks by local means in `ℓ_q`**: for `L ≥ 1`, `L' ≥ 1`, `1 ≤ p < ∞`, `1 ≤ q ≤ ∞`, +`s ∈ ℝ` and `f ∈ L_p`, almost everywhere, +`‖(2^(js) |ψ_j ⋆ f(x)|)_j‖_{ℓ_q} ≤ C A_{s,L'} ‖(M(2^(is) |k_i ⋆ f|)(x))_i‖_{ℓ_q}` with +`C = Rd.LocalMeansBump.blockByLocalMeansConst L L'` and +`A_{s,L'} = ENNReal.almostDiagonalConst s L'`, finite for `0 < s < L'`. -/ +theorem lqNorm_blockFun_le_lqNorm_maximal {L : ℕ} (hL : 1 ≤ L) {L' : ℕ} (hL' : 1 ≤ L') + (hp : p ≠ ∞) {q : ℝ≥0∞} (hq : 1 ≤ q) (s : ℝ) (f : Lp ℂ p (volume : Measure V)) : + ∀ᵐ x ∂volume, lqNorm q (fun j => dyadicWeight s j * ‖blockFun j f x‖ₑ) ≤ + b.blockByLocalMeansConst L L' * ENNReal.almostDiagonalConst s L' * + lqNorm q (fun i => maximal (fun y => dyadicWeight s i * + ‖conv (b.kernel L i) f volume y‖ₑ) x) := by + filter_upwards [b.enorm_blockFun_le_tsum_maximal hL hL' hp f] with x hx + refine (ENNReal.lqNorm_le_almostDiagonalConst_mul_of_le hq s L' hx).trans_eq ?_ + simp only [dyadicWeight_mul_maximal] + +/-- **The local means by blocks in `ℓ_q`**: for every order `L`, `1 ≤ p < ∞`, `1 ≤ q ≤ ∞`, +`s ∈ ℝ` and `f ∈ L_p`, almost everywhere, +`‖(2^(js) |k_j ⋆ f(x)|)_j‖_{ℓ_q} ≤ C A_{s,L} ‖(M(2^(is) |ψ_i ⋆ f|)(x))_i‖_{ℓ_q}` with +`C = Rd.LocalMeansBump.localMeansByBlockConst L` and `A_{s,L} = ENNReal.almostDiagonalConst s L`, +finite for `0 < s < L`. -/ +theorem lqNorm_localMean_le_lqNorm_maximal (L : ℕ) (hp : p ≠ ∞) {q : ℝ≥0∞} (hq : 1 ≤ q) + (s : ℝ) (f : Lp ℂ p (volume : Measure V)) : + ∀ᵐ x ∂volume, lqNorm q (fun j => dyadicWeight s j * ‖conv (b.kernel L j) f volume x‖ₑ) ≤ + b.localMeansByBlockConst L * ENNReal.almostDiagonalConst s L * + lqNorm q (fun i => maximal (fun y => dyadicWeight s i * ‖blockFun i f y‖ₑ) x) := by + filter_upwards [b.enorm_localMean_le_tsum_maximal L hp f] with x hx + refine (ENNReal.lqNorm_le_almostDiagonalConst_mul_of_le hq s L hx).trans_eq ?_ + simp only [dyadicWeight_mul_maximal] + +/-! ### The characterisation -/ + +/-- The constant `C A_{s,L'} C_{FS}` of the bound of the Triebel–Lizorkin quasi-norm by local +means, with `L' = ⌈s⌉₊ + 1`, the natural ceiling of `s` plus one, so `L' ≥ 1` and `L' > s`: +`C = Rd.LocalMeansBump.blockByLocalMeansConst L L'`, +`A_{s,L'} = ENNReal.almostDiagonalConst s L'` and the Fefferman–Stein constant +`C_{FS} = Rd.feffermanSteinConst V p q`. -/ +noncomputable def tlUpperConst (L : ℕ) (p q : ℝ≥0∞) (s : ℝ) : ℝ≥0∞ := + b.blockByLocalMeansConst L (⌈s⌉₊ + 1) * ENNReal.almostDiagonalConst s ((⌈s⌉₊ + 1 : ℕ) : ℝ) * + feffermanSteinConst V p q + +/-- The constant of the bound of the Triebel–Lizorkin quasi-norm by local means is finite for +`1 < p < ∞`, `1 < q ≤ ∞` and `s > 0`. -/ +theorem tlUpperConst_ne_top (L : ℕ) {p q : ℝ≥0∞} (hp1 : 1 < p) (hp : p ≠ ∞) (hq1 : 1 < q) + {s : ℝ} (hs : 0 < s) : b.tlUpperConst L p q s ≠ ∞ := + ENNReal.mul_ne_top (ENNReal.mul_ne_top (b.blockByLocalMeansConst_ne_top L _) + (ENNReal.almostDiagonalConst_ne_top hs + (by push_cast; exact (Nat.le_ceil s).trans_lt (lt_add_one _)))) + (feffermanSteinConst_ne_top hp1 hp hq1) + +/-- The constant `C A_{s,L} C_{FS}` of the bound of the local means by the Triebel–Lizorkin +quasi-norm: `C = Rd.LocalMeansBump.localMeansByBlockConst L`, +`A_{s,L} = ENNReal.almostDiagonalConst s L` and `C_{FS} = Rd.feffermanSteinConst V p q`. -/ +noncomputable def tlLowerConst (L : ℕ) (p q : ℝ≥0∞) (s : ℝ) : ℝ≥0∞ := + b.localMeansByBlockConst L * ENNReal.almostDiagonalConst s L * feffermanSteinConst V p q + +/-- The constant of the bound of the local means by the Triebel–Lizorkin quasi-norm is finite +for `1 < p < ∞`, `1 < q ≤ ∞` and `0 < s < L`. -/ +theorem tlLowerConst_ne_top {L : ℕ} {p q : ℝ≥0∞} (hp1 : 1 < p) (hp : p ≠ ∞) (hq1 : 1 < q) + {s : ℝ} (hs : 0 < s) (hsL : s < L) : b.tlLowerConst L p q s ≠ ∞ := + ENNReal.mul_ne_top (ENNReal.mul_ne_top (b.localMeansByBlockConst_ne_top L) + (ENNReal.almostDiagonalConst_ne_top hs hsL)) (feffermanSteinConst_ne_top hp1 hp hq1) + +/-- **The Triebel–Lizorkin quasi-norm by local means**: for `L ≥ 1`, `1 < p < ∞`, `1 < q ≤ ∞`, +`s ∈ ℝ` and `f ∈ L_p`, `‖f‖_{F^s_{p,q}} ≤ C ‖f‖_{F^s_{p,q}}^{b,L}` with +`C = Rd.LocalMeansBump.tlUpperConst L p q s`, finite for `s > 0`. Pointwise the blocks are +bounded by maximal functions of the local means in `ℓ_q`, and the Fefferman–Stein inequality +bounds those in `L_p(ℓ_q)`. -/ +theorem triebelLizorkinNorm_le_tlLocalMeansNorm {L : ℕ} (hL : 1 ≤ L) (hp1 : 1 < p) + (hp : p ≠ ∞) {q : ℝ≥0∞} (hq1 : 1 < q) (s : ℝ) (f : Lp ℂ p (volume : Measure V)) : + triebelLizorkinNorm s q f ≤ b.tlUpperConst L p q s * b.tlLocalMeansNorm L s q f := + eLpNorm_le_of_le_lqNorm_maximal hp1 hp hq1 (aemeasurable_lqNorm_blockFun s q f) + (fun i => (b.measurable_dyadicWeight_mul_conv_kernel L s i f).aemeasurable) + (b.lqNorm_blockFun_le_lqNorm_maximal hL (Nat.le_add_left 1 _) hp hq1.le s f) + +/-- **The local means by the Triebel–Lizorkin quasi-norm**: for every order `L`, `1 < p < ∞`, +`1 < q ≤ ∞`, `s ∈ ℝ` and `f ∈ L_p`, `‖f‖_{F^s_{p,q}}^{b,L} ≤ C ‖f‖_{F^s_{p,q}}` with +`C = Rd.LocalMeansBump.tlLowerConst L p q s`, finite for `0 < s < L`. -/ +theorem tlLocalMeansNorm_le_triebelLizorkinNorm (L : ℕ) (hp1 : 1 < p) (hp : p ≠ ∞) {q : ℝ≥0∞} + (hq1 : 1 < q) (s : ℝ) (f : Lp ℂ p (volume : Measure V)) : + b.tlLocalMeansNorm L s q f ≤ b.tlLowerConst L p q s * triebelLizorkinNorm s q f := + eLpNorm_le_of_le_lqNorm_maximal hp1 hp hq1 (b.aemeasurable_lqNorm_conv_kernel L s q f) + (fun i => ((aestronglyMeasurable_blockFun i f).eNorm.const_mul _)) + (b.lqNorm_localMean_le_lqNorm_maximal L hp hq1.le s f) + +/-- **The local means characterisation of Triebel–Lizorkin spaces**: for a bump `b`, an order +`L`, `1 < p < ∞`, `1 < q ≤ ∞` and `0 < s < L`, `f ∈ F^s_{p,q}` iff +`‖f‖_{F^s_{p,q}}^{b,L} < ∞`. The order satisfies `L ≥ 1` since `0 < s < L`. -/ +theorem memTriebelLizorkin_iff_tlLocalMeans {L : ℕ} (hp1 : 1 < p) (hp : p ≠ ∞) + {q : ℝ≥0∞} (hq1 : 1 < q) {s : ℝ} (hs : 0 < s) (hsL : s < L) + {f : Lp ℂ p (volume : Measure V)} : + MemTriebelLizorkin s q f ↔ b.tlLocalMeansNorm L s q f < ∞ := + have hL : 1 ≤ L := Nat.cast_pos.1 (hs.trans hsL) + ⟨fun h => (b.tlLocalMeansNorm_le_triebelLizorkinNorm L hp1 hp hq1 s f).trans_lt + (ENNReal.mul_lt_top (b.tlLowerConst_ne_top hp1 hp hq1 hs hsL).lt_top h), + fun h => (b.triebelLizorkinNorm_le_tlLocalMeansNorm hL hp1 hp hq1 s f).trans_lt + (ENNReal.mul_lt_top (b.tlUpperConst_ne_top L hp1 hp hq1 hs).lt_top h)⟩ + +/-- **Change of bump and order**: for two bumps `b, b'`, orders `L ≥ 1` and `L'`, +`1 < p < ∞`, `1 < q ≤ ∞`, `s ∈ ℝ` and `f ∈ L_p`, +`‖f‖_{F^s_{p,q}}^{b',L'} ≤ C' C ‖f‖_{F^s_{p,q}}^{b,L}` with +`C' = Rd.LocalMeansBump.tlLowerConst` of `b', L'` and `C = Rd.LocalMeansBump.tlUpperConst` of +`b, L`, both finite for `0 < s < L'`. -/ +theorem tlLocalMeansNorm_le_tlLocalMeansNorm (b' : LocalMeansBump V) {L : ℕ} (hL : 1 ≤ L) + (L' : ℕ) (hp1 : 1 < p) (hp : p ≠ ∞) {q : ℝ≥0∞} (hq1 : 1 < q) (s : ℝ) + (f : Lp ℂ p (volume : Measure V)) : + b'.tlLocalMeansNorm L' s q f ≤ + b'.tlLowerConst L' p q s * b.tlUpperConst L p q s * b.tlLocalMeansNorm L s q f := by + rw [mul_assoc] + exact (b'.tlLocalMeansNorm_le_triebelLizorkinNorm L' hp1 hp hq1 s f).trans + (by gcongr; exact b.triebelLizorkinNorm_le_tlLocalMeansNorm hL hp1 hp hq1 s f) + +/-- **The local means quasi-norms are equivalent**: for two bumps `b, b'`, orders `L, L'`, +`1 < p < ∞`, `1 < q ≤ ∞` and `0 < s < min(L, L')`, `‖f‖_{F^s_{p,q}}^{b,L} < ∞` iff +`‖f‖_{F^s_{p,q}}^{b',L'} < ∞`. -/ +theorem tlLocalMeansNorm_lt_top_iff (b' : LocalMeansBump V) {L L' : ℕ} (hp1 : 1 < p) + (hp : p ≠ ∞) {q : ℝ≥0∞} (hq1 : 1 < q) {s : ℝ} (hs : 0 < s) (hsL : s < L) (hsL' : s < L') + {f : Lp ℂ p (volume : Measure V)} : + b.tlLocalMeansNorm L s q f < ∞ ↔ b'.tlLocalMeansNorm L' s q f < ∞ := by + rw [← b.memTriebelLizorkin_iff_tlLocalMeans hp1 hp hq1 hs hsL, + ← b'.memTriebelLizorkin_iff_tlLocalMeans hp1 hp hq1 hs hsL'] + +/-! ### Synthesis in Triebel–Lizorkin spaces -/ + +/-- **Synthesis in Triebel–Lizorkin spaces**: if `F = ∑_i η_i ⋆ h_i` in `L_p` (as the limit of +the partial sums) for a family `h_i ∈ L_p`, then for `1 < p < ∞`, `1 < q ≤ ∞` and `s ∈ ℝ`, +`‖F‖_{F^s_{p,q}} ≤ C ‖ x ↦ ‖(2^(is) |h_i(x)|)_i‖_{ℓ_q} ‖_p` with +`C = Rd.LocalMeansBump.tlUpperConst L p q s`, finite for `s > 0`. The blocks of `F` are bounded by +maximal functions of the `h_i` (`Rd.LocalMeansBump.enorm_blockFun_le_tsum_maximal_of_tendsto`), +then the almost diagonal estimate and the Fefferman–Stein inequality finish. -/ +theorem triebelLizorkinNorm_le_of_tendsto_sum_dual (L : ℕ) (hp1 : 1 < p) (hp : p ≠ ∞) + {q : ℝ≥0∞} (hq1 : 1 < q) (s : ℝ) {F : Lp ℂ p (volume : Measure V)} + {h : ℕ → Lp ℂ p (volume : Measure V)} + (hrep : Tendsto (fun J => ∑ i ∈ Finset.range (J + 1), + convLp hp (b.integrable_dual L i) (h i)) atTop (𝓝 F)) : + triebelLizorkinNorm s q F ≤ b.tlUpperConst L p q s * + eLpNorm (fun x => lqNorm q (fun i => dyadicWeight s i * ‖h i x‖ₑ)) p volume := by + refine eLpNorm_le_of_le_lqNorm_maximal hp1 hp hq1 (aemeasurable_lqNorm_blockFun s q F) + (fun i => ((Lp.aestronglyMeasurable (h i)).eNorm.const_mul _)) ?_ + filter_upwards [b.enorm_blockFun_le_tsum_maximal_of_tendsto hp L (Nat.le_add_left 1 ⌈s⌉₊) hrep] + with x hx + refine (ENNReal.lqNorm_le_almostDiagonalConst_mul_of_le hq1.le s _ hx).trans_eq ?_ + simp only [dyadicWeight_mul_maximal] + +end LocalMeansBump + +end Rd diff --git a/LeanPool/FunctionSpaces/Torus/BesovInterpolation.lean b/LeanPool/FunctionSpaces/Torus/BesovInterpolation.lean new file mode 100644 index 0000000000..9c14fe63e4 --- /dev/null +++ b/LeanPool/FunctionSpaces/Torus/BesovInterpolation.lean @@ -0,0 +1,65 @@ +/- +Copyright (c) 2026 Mario Ullrich. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Mario Ullrich +-/ +module + +public import LeanPool.FunctionSpaces.Torus.LpBesovModuli + +/- +Modified for Lean Pool: module names and imports adapted. +-/ + +/-! +# Besov spaces on the torus as interpolation spaces + +For `1 ≤ p < ∞` and Besov spaces by differences of order `r` on `𝕋^d`, with the quasi-norms +`‖f‖_p + ‖(2^(ks_i) ω_r(f, 2^(-k))_p)_k‖_{ℓ_{q_i}}` (the couple +`ApproximationScheme.ModulusData.modCouple` of `Torus.lpModulusData`), `0 < s₀ < s₁ < r`, +`0 < η < 1`, `1 ≤ q₀, q₁, q ≤ ∞` and `s = (1-η)s₀ + ηs₁`, + +`f ∈ (B^{s₀}_{p,q₀}, B^{s₁}_{p,q₁})_{η,q} ⟺ ‖f‖_p + ‖(2^(ks) ω_r(f, 2^(-k))_p)_k‖_{ℓ_q} < ∞` + +(`Torus.memKMethod_modCouple_iff`), and `(L_p, B^{s₁}_{p,q₁})_{η,q} = B^{ηs₁}_{p,q}` by +differences (`Torus.memKMethod_leftModCouple_iff`). The approximation spaces of the +trigonometric scheme interpolate by `FunctionScheme.memKMethod_besovCouple_iff`. +-/ + +@[expose] public section + +open MeasureTheory UnitAddTorus +open scoped ENNReal TorusHaar + +open ENNReal (lqNorm dyadicWeight) + +namespace Torus + +variable {d : Type*} [Fintype d] {p : ℝ≥0∞} [Fact (1 ≤ p)] {s₀ s₁ η : ℝ} {q₀ q₁ q : ℝ≥0∞} + +/-- **Besov spaces on the torus by differences interpolate**: for `1 ≤ p < ∞`, an order `r`, +`0 < s₀ < s₁ < r`, `0 < η < 1` and `1 ≤ q₀, q₁, q ≤ ∞`, `f ∈ L_p(𝕋^d)` lies in the real +interpolation space of the couple of the quasi-norms +`‖f‖_p + ‖(2^(ks_i) ω_r(f, 2^(-k))_p)_k‖_{ℓ_{q_i}}` iff +`‖f‖_p + ‖(2^(ks) ω_r(f, 2^(-k))_p)_k‖_{ℓ_q} < ∞` with `s = (1-η)s₀ + ηs₁`. -/ +theorem memKMethod_modCouple_iff (hp : p ≠ ∞) {r : ℕ} (hs₀ : 0 < s₀) (hs : s₀ < s₁) + (hs₁ : s₁ < r) (hη : 0 < η) (hη' : η < 1) (hq₀ : 1 ≤ q₀) (hq₁ : 1 ≤ q₁) (hq : 1 ≤ q) + {f : Lp ℂ p (volume : Measure (UnitAddTorus d))} : + ((lpModulusData d hp r).modCouple s₀ q₀ s₁ q₁).MemKMethod η q f ↔ + ‖f‖ₑ + lqNorm q (fun k => dyadicWeight ((1 - η) * s₀ + η * s₁) k * Rd.lpModulus p r f k) < + ∞ := + (lpModulusData d hp r).memKMethod_modCouple_iff hs₀ hs hs₁ hη hη' hq₀ hq₁ hq + +/-- **`L_p` and a Besov space by differences on the torus interpolate**: for `1 ≤ p < ∞`, an +order `r`, `0 < s₁ < r`, `0 < η < 1` and `1 ≤ q₁, q ≤ ∞`, `f ∈ L_p(𝕋^d)` lies in the real +interpolation space of the couple of `‖f‖_p` and +`‖f‖_p + ‖(2^(ks₁) ω_r(f, 2^(-k))_p)_k‖_{ℓ_{q₁}}` iff +`‖f‖_p + ‖(2^(kηs₁) ω_r(f, 2^(-k))_p)_k‖_{ℓ_q} < ∞`. -/ +theorem memKMethod_leftModCouple_iff (hp : p ≠ ∞) {r : ℕ} (hs₁ : 0 < s₁) (hs₁r : s₁ < r) + (hη : 0 < η) (hη' : η < 1) (hq₁ : 1 ≤ q₁) (hq : 1 ≤ q) + {f : Lp ℂ p (volume : Measure (UnitAddTorus d))} : + ((lpModulusData d hp r).leftModCouple s₁ q₁).MemKMethod η q f ↔ + ‖f‖ₑ + lqNorm q (fun k => dyadicWeight (η * s₁) k * Rd.lpModulus p r f k) < ∞ := + (lpModulusData d hp r).memKMethod_leftModCouple_iff hs₁ hs₁r hη hη' hq₁ hq + +end Torus diff --git a/LeanPool/FunctionSpaces/Torus/BesovModuli.lean b/LeanPool/FunctionSpaces/Torus/BesovModuli.lean new file mode 100644 index 0000000000..acb48ab36a --- /dev/null +++ b/LeanPool/FunctionSpaces/Torus/BesovModuli.lean @@ -0,0 +1,260 @@ +/- +Copyright (c) 2026 Mario Ullrich. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Mario Ullrich +-/ +module + +public import LeanPool.FunctionSpaces.Torus.Modulus +public import LeanPool.FunctionSpaces.ApproximationSpaces.Moduli + +/- +Modified for Lean Pool: module names and imports adapted. +-/ + +/-! +# Besov spaces through moduli of smoothness: the coincidence theorem in `L_2(𝕋^d)` + +The classical definition of the Besov space `B^s_{2,q}(𝕋^d)`, `0 < s < 1`, uses the modulus of +smoothness `ω(f, t)_2 = sup_{‖h‖ ≤ t} ‖f(· + h) - f‖_2` at the dyadic scales `t = 2^(-k)`. This +modulus is compatible with the trigonometric scheme, with inverse order `θ = 1` +(`Torus.trigModulusData`, a `ModulusData`): + +* it is subadditive and at most `2 ‖f‖_2` (`Rd.lpModulus_add_le`, `Rd.lpModulus_le`); +* **Jackson's inequality** `E_n(f)_2 ≤ (d + 1) ω(f, 1/n)_2` (`Torus.approxError_le_modulus`); +* **the inverse inequality** `ω(a, 2^(-k))_2 ≤ max(2, 2πd) 2^(-(k-j)) ‖a‖_2` for trigonometric + polynomials `a` of degree `< 2^j` (`Torus.modulus_le_of_mem`), from Bernstein's inequality + `‖τ_h a - a‖_2 ≤ 2πd 2^j ‖h‖ ‖a‖_2` (`Torus.enorm_translate_sub_le_of_mem`). + +**Coincidence theorem** (`Torus.memBesov_iff_modulusNorm_lt_top`): for `0 < s < 1` and +`1 ≤ q ≤ ∞`, `f` lies in the approximation space `B^s_{2,q}(𝕋^d)` of trigonometric polynomials +iff `‖f‖_2 + ‖(2^(js) ω(f, 2^(-j))_2)_{j ≥ 0}‖_{ℓ_q} < ∞`, with the norm equivalence of +`ModulusData` (`Torus.approxNormDyadic_le_modulusNorm`, `Torus.modulusNorm_le_approxNormDyadic`). +The restriction `s < 1` is that of differences of first order. + +The modulus is also controlled by the dyadic Fourier blocks: a translation by `h` multiplies the +block `Δ_K f` by at most `min(2, 2πd 2^(K+1) ‖h‖)` (`Torus.enorm_translate_sub_sq_le`), so +`ω(f, t)_2 ≤ ∑_K min(2, 2πd 2^(K+1) t) ‖Δ_K f‖_2` (`Torus.modulus_le_tsum_block`). +-/ + +@[expose] public section + +open MeasureTheory UnitAddTorus Set ApproximationScheme +open scoped ENNReal TorusHaar lp Real + +namespace Torus + +open ENNReal (lqNorm dyadicWeight) + +variable {d : Type*} [Fintype d] {s : ℝ} {q : ℝ≥0∞} + +/-! ### Jackson's inequality -/ + +/-- Jackson's theorem in the form `E_n(f) ≤ (d + 1) ω(f, 1/n)`. -/ +theorem approxError_le_modulus {n : ℕ} (hn : 1 ≤ n) + (f : Lp ℂ 2 (volume : Measure (UnitAddTorus d))) : + ((trigScheme d).toLp volume 2).approxError f n ≤ + ((Fintype.card d : ℝ≥0∞) + 1) * modulus f (1 / n) := by + have h := approxError_sq_le_card_mul_modulus_sq hn f + have hd : (Fintype.card d : ℝ≥0∞) ≤ ((Fintype.card d : ℝ≥0∞) + 1) ^ 2 := by + calc (Fintype.card d : ℝ≥0∞) ≤ (Fintype.card d : ℝ≥0∞) + 1 := le_self_add + _ ≤ ((Fintype.card d : ℝ≥0∞) + 1) ^ 2 := by + rw [sq]; exact le_mul_of_one_le_left' le_add_self + have h2 : ((trigScheme d).toLp volume 2).approxError f n ^ 2 ≤ + (((Fintype.card d : ℝ≥0∞) + 1) * modulus f (1 / n)) ^ 2 := by + rw [mul_pow]; exact h.trans (by gcongr) + rw [← ENNReal.rpow_two, ← ENNReal.rpow_two] at h2 + exact (ENNReal.rpow_le_rpow_iff (by norm_num)).1 h2 + +/-! ### The inverse inequality -/ + +/-- **Trigonometric polynomials have no high frequencies**: for `a` of degree `< n`, +`â(k) = 0` whenever `deg k ≥ n` (`SpectralScheme.repr_eq_zero_of_mem_span`). -/ +theorem mFourierCoeff_eq_zero_of_mem {n : ℕ} {a : Lp ℂ 2 (volume : Measure (UnitAddTorus d))} + (ha : a ∈ (trigScheme d).toLp volume 2 n) {k : d → ℤ} (hk : n ≤ deg k) : + mFourierCoeff a k = 0 := by + rw [toLp_trigScheme_eq d] at ha + rw [← mFourierBasis_repr] + exact (fourierScheme d).repr_eq_zero_of_mem_span ha hk + +/-- **Bernstein's inequality for translations**: a trigonometric polynomial `a` of degree `< n` +satisfies `‖τ_h a - a‖_2 ≤ 2πd n ‖h‖ ‖a‖_2`, by Parseval and `|e_k(h) - 1| ≤ 2πd deg k ‖h‖` +(`Torus.norm_mFourier_sub_one_le`). -/ +theorem enorm_translate_sub_le_of_mem {n : ℕ} {a : Lp ℂ 2 (volume : Measure (UnitAddTorus d))} + (ha : a ∈ (trigScheme d).toLp volume 2 n) (h : UnitAddTorus d) : + ‖translate h a - a‖ₑ ≤ ENNReal.ofReal (2 * π * Fintype.card d * n * ‖h‖) * ‖a‖ₑ := by + have hpars : ‖a‖ₑ ^ 2 = ∑' k, ‖mFourierCoeff a k‖ₑ ^ 2 := by + rw [← mFourierBasis.repr.eNorm_map, lp.enorm_sq_eq_tsum] + simp only [mFourierBasis_repr] + refine (ENNReal.pow_le_pow_left_iff two_ne_zero).1 ?_ + rw [enorm_translate_sub_sq, mul_pow, hpars, ← ENNReal.tsum_mul_left] + refine tsum_le_tsum fun k => ?_ + rcases le_or_gt n (deg k) with hk | hk + · simp [mFourierCoeff_eq_zero_of_mem ha hk] + · gcongr + rw [← ofReal_norm] + refine ENNReal.ofReal_le_ofReal ((norm_mFourier_sub_one_le k h).trans ?_) + gcongr + +/-- **The inverse inequality for the modulus**: a trigonometric polynomial `a` of degree `< 2^j` +satisfies `ω(a, 2^(-k))_2 ≤ max(2, 2πd) 2^(-(k-j)) ‖a‖_2`: for `k < j` the modulus is at most +`2 ‖a‖_2`, and for `k ≥ j` Bernstein's inequality gives `2πd 2^(j-k) ‖a‖_2`. -/ +theorem modulus_le_of_mem {j : ℕ} {a : Lp ℂ 2 (volume : Measure (UnitAddTorus d))} + (ha : a ∈ (trigScheme d).toLp volume 2 (2 ^ j)) (k : ℕ) : + modulus a (1 / 2 ^ k) ≤ + ENNReal.ofReal (max 2 (2 * π * Fintype.card d)) * dyadicWeight (-1) (k - j) * ‖a‖ₑ := by + rcases lt_or_ge k j with hkj | hjk + · rw [Nat.sub_eq_zero_of_le hkj.le, ENNReal.dyadicWeight_zero_right, mul_one] + refine (Rd.lpModulus_le 1 a k).trans ?_ + gcongr + rw [pow_one, ← ENNReal.ofReal_ofNat 2] + exact ENNReal.ofReal_le_ofReal (le_max_left _ _) + · rw [modulus_eq_iSup] + refine iSup₂_le fun h hh => (enorm_translate_sub_le_of_mem ha h).trans ?_ + have h1 : ENNReal.ofReal (2 * π * Fintype.card d * ((2 ^ j : ℕ) : ℝ) * ‖h‖) = + ENNReal.ofReal (2 * π * Fintype.card d) * ENNReal.ofReal (2 ^ j * ‖h‖) := by + rw [show 2 * π * Fintype.card d * ((2 ^ j : ℕ) : ℝ) * ‖h‖ = + (2 * π * Fintype.card d) * (2 ^ j * ‖h‖) by push_cast; ring, + ENNReal.ofReal_mul (by positivity)] + rw [h1] + refine mul_le_mul' (mul_le_mul' (ENNReal.ofReal_le_ofReal (le_max_right _ _)) ?_) le_rfl + simpa using ENNReal.ofReal_two_pow_mul_rpow_le hjk hh zero_le_one + +/-! ### The coincidence theorem -/ + +/-- **The modulus is compatible with the trigonometric scheme**, with inverse order `θ = 1`: at +the scales `2^(-k)` it is subadditive and at most `2 ‖f‖_2`, Jackson's inequality holds from +`k = 0` on with the constant `d + 1`, and the inverse inequality with the constant +`max(2, 2πd)`. -/ +noncomputable def trigModulusData (d : Type*) [Fintype d] : + ModulusData ((trigScheme d).toLp volume 2) 1 where + modulus f k := modulus f (1 / 2 ^ k) + add_le f g k := Rd.lpModulus_add_le 1 f g k + C0 := 2 + C0_ne_top := by norm_num + le_enorm f k := (Rd.lpModulus_le 1 f k).trans_eq (by rw [pow_one]) + jacksonStart := 0 + CJ := Fintype.card d + 1 + CJ_ne_top := ENNReal.add_ne_top.2 ⟨ENNReal.natCast_ne_top _, ENNReal.one_ne_top⟩ + jackson f k _ := by simpa using approxError_le_modulus (Nat.one_le_two_pow (n := k)) f + CB := ENNReal.ofReal (max 2 (2 * π * Fintype.card d)) + CB_ne_top := ENNReal.ofReal_ne_top + inverse _ k _ ha := modulus_le_of_mem ha k + +/-- **Jackson's half of the coincidence theorem**: `‖f‖_{B^s_{2,q}} ≤ (d + 2) ‖f‖^ω_{s,q}` in the +dyadic quasi-norm, with the constant `1 + C_J` of `ModulusData.approxNormDyadic_le_modNorm`. -/ +theorem approxNormDyadic_le_modulusNorm (hq : 1 ≤ q) + (f : Lp ℂ 2 (volume : Measure (UnitAddTorus d))) : + ((trigScheme d).toLp volume 2).approxNormDyadic s q f ≤ + (trigModulusData d).directConst s * (trigModulusData d).modNorm s q f := + (trigModulusData d).approxNormDyadic_le_modNorm hq f + +/-- **The second half of the coincidence theorem**: for `0 ≤ s < 1`, +`‖f‖^ω_{s,q} ≤ K ‖f‖_{B^s_{2,q}}` in the dyadic quasi-norm, with the constant `K` of +`ModulusData.modNorm_le_approxNormDyadic`. -/ +theorem modulusNorm_le_approxNormDyadic (hq : 1 ≤ q) (hs : 0 ≤ s) (hs1 : s < 1) + (f : Lp ℂ 2 (volume : Measure (UnitAddTorus d))) : + (trigModulusData d).modNorm s q f ≤ + (trigModulusData d).inverseConst s * ((trigScheme d).toLp volume 2).approxNormDyadic s q f := + (trigModulusData d).modNorm_le_approxNormDyadic hq hs hs1 f + +/-- **The coincidence theorem in `L_2(𝕋^d)`**: for `0 < s < 1` and `1 ≤ q ≤ ∞`, the Besov space +`B^s_{2,q}(𝕋^d)` defined by approximation with trigonometric polynomials is the Besov space +defined by the modulus of smoothness: `f ∈ B^s_{2,q}` iff +`‖f‖_2 + ‖(2^(js) ω(f, 2^(-j))_2)_j‖_{ℓ_q} < ∞`. -/ +theorem memBesov_iff_modulusNorm_lt_top (hs : 0 < s) (hs1 : s < 1) (hq : 1 ≤ q) + (f : Lp ℂ 2 (volume : Measure (UnitAddTorus d))) : + (trigScheme d).MemBesov volume 2 s q f ↔ (trigModulusData d).modNorm s q f < ∞ := + (trigModulusData d).memApprox_iff_modNorm_lt_top hq hs.le hs1 f + +/-! ### The modulus and the dyadic Fourier blocks -/ + +/-- The multiplier bound of a translation by `‖h‖ ≤ t` on the dyadic block `K`: +`min(2, 2πd 2^(K+1) t)`. -/ +noncomputable def blockMult (d : Type*) [Fintype d] (K : ℕ) (t : ℝ) : ℝ≥0∞ := + ENNReal.ofReal (min 2 (2 * π * Fintype.card d * 2 ^ (K + 1) * t)) + +/-- On the block `K`, `|e_k(h) - 1| ≤ min(2, 2πd 2^(K+1) ‖h‖)`. -/ +theorem enorm_mFourier_sub_one_le_blockMult {k : d → ℤ} {K : ℕ} (hk : deg k < 2 ^ (K + 1)) + {h : UnitAddTorus d} {t : ℝ} (hh : ‖h‖ ≤ t) : + ‖mFourier k h - 1‖ₑ ≤ blockMult d K t := by + rw [blockMult, ← ofReal_norm] + refine ENNReal.ofReal_le_ofReal (le_min ?_ ?_) + · calc ‖mFourier k h - 1‖ ≤ ‖mFourier k h‖ + ‖(1 : ℂ)‖ := norm_sub_le _ _ + _ = 2 := by + rw [norm_one, show ‖mFourier k h‖ = 1 from norm_trigMonomial_apply k h]; norm_num + · calc ‖mFourier k h - 1‖ ≤ 2 * π * Fintype.card d * deg k * ‖h‖ := + norm_mFourier_sub_one_le k h + _ ≤ 2 * π * Fintype.card d * 2 ^ (K + 1) * t := by + gcongr + exact_mod_cast hk.le + +/-- **A translation acts on the dyadic blocks with bounded multipliers**: for `‖h‖ ≤ t`, +`‖f(· + h) - f‖² ≤ ∑_K min(2, 2πd 2^(K+1) t)² ‖Δ_K f‖²`. -/ +theorem enorm_translate_sub_sq_le {h : UnitAddTorus d} {t : ℝ} (hh : ‖h‖ ≤ t) + (f : Lp ℂ 2 (volume : Measure (UnitAddTorus d))) : + ‖translate h f - f‖ₑ ^ 2 ≤ ∑' K, blockMult d K t ^ 2 * ‖fourierBlock K f‖ₑ ^ 2 := by + rw [enorm_translate_sub_sq] + simp_rw [enorm_fourierBlock_sq, ← ENNReal.tsum_mul_left] + rw [tsum_comm] + refine tsum_le_tsum fun k => ?_ + rcases Nat.eq_zero_or_pos (deg k) with h0 | hpos + · have hk : k = 0 := by + funext i; have := natAbs_le_deg k i; rw [h0] at this; simpa using this + subst hk + simp [mFourier_zero] + set K0 := Nat.log 2 (deg k) + have hK0 : 2 ^ K0 ≤ deg k ∧ deg k < 2 ^ (K0 + 1) := + ⟨Nat.pow_log_le_self 2 hpos.ne', Nat.lt_pow_succ_log_self Nat.one_lt_two _⟩ + calc ‖mFourier k h - 1‖ₑ ^ 2 * ‖mFourierCoeff f k‖ₑ ^ 2 + ≤ blockMult d K0 t ^ 2 * ‖mFourierCoeff f k‖ₑ ^ 2 := by + gcongr; exact enorm_mFourier_sub_one_le_blockMult hK0.2 hh + _ = blockMult d K0 t ^ 2 * (if 2 ^ K0 ≤ deg k ∧ deg k < 2 ^ (K0 + 1) then + ‖mFourierCoeff f k‖ₑ ^ 2 else 0) := by simp only [hK0, and_self, ↓reduceIte] + _ ≤ ∑' K, blockMult d K t ^ 2 * (if 2 ^ K ≤ deg k ∧ deg k < 2 ^ (K + 1) then + ‖mFourierCoeff f k‖ₑ ^ 2 else 0) := + le_tsum (f := fun K => blockMult d K t ^ 2 * (if 2 ^ K ≤ deg k ∧ + deg k < 2 ^ (K + 1) then ‖mFourierCoeff f k‖ₑ ^ 2 else 0)) K0 + +/-- **The modulus is controlled by the dyadic blocks**: +`ω(f, t) ≤ ∑_K min(2, 2πd 2^(K+1) t) ‖Δ_K f‖`. The square-sum bound +`enorm_translate_sub_sq_le` passes to the sum through `∑ b_K² ≤ (∑ b_K)²`. -/ +theorem modulus_le_tsum_block (f : Lp ℂ 2 (volume : Measure (UnitAddTorus d))) (t : ℝ) : + modulus f t ≤ ∑' K, blockMult d K t * ‖fourierBlock K f‖ₑ := by + rw [modulus_eq_iSup] + refine iSup₂_le fun h hh => (ENNReal.pow_le_pow_left_iff two_ne_zero).1 ?_ + calc ‖translate h f - f‖ₑ ^ 2 ≤ ∑' K, (blockMult d K t * ‖fourierBlock K f‖ₑ) ^ 2 := by + simpa only [mul_pow] using enorm_translate_sub_sq_le hh f + _ ≤ (∑' K, blockMult d K t * ‖fourierBlock K f‖ₑ) ^ 2 := by + simp only [sq, ← ENNReal.tsum_mul_right] + exact tsum_le_tsum fun K => by + gcongr; exact le_tsum (f := fun K => blockMult d K t * ‖fourierBlock K f‖ₑ) K + +/-- At `t = 2^(-j)` the block multipliers are `≤ 2` for `K ≥ j` and `≤ 4πd 2^(K-j)` for +`K ≤ j`. -/ +theorem blockMult_le (K j : ℕ) : + blockMult d K (1 / 2 ^ j) ≤ (if j ≤ K then 2 else 0) + + (if K ≤ j then ENNReal.ofReal (4 * π * Fintype.card d) * + (dyadicWeight (-1) j * dyadicWeight 1 K) else 0) := by + by_cases hjK : j ≤ K + · simp only [hjK, ↓reduceIte] + refine le_trans ?_ le_self_add + rw [blockMult, ← ENNReal.ofReal_ofNat 2] + exact ENNReal.ofReal_le_ofReal (min_le_left _ _) + · simp only [hjK, show K ≤ j by omega, ↓reduceIte, zero_add] + have h1 : ENNReal.ofReal ((2 : ℝ) ^ K * (1 / 2 ^ j)) = + dyadicWeight (-1) j * dyadicWeight 1 K := by + rw [ENNReal.ofReal_mul (by positivity), one_div, ENNReal.ofReal_inv_of_pos (by positivity), + show ((2 : ℝ) ^ K) = ((2 ^ K : ℕ) : ℝ) by push_cast; rfl, + show ((2 : ℝ) ^ j) = ((2 ^ j : ℕ) : ℝ) by push_cast; rfl, ENNReal.ofReal_natCast, + ENNReal.ofReal_natCast, ENNReal.natCast_two_pow_eq, ENNReal.natCast_two_pow_eq, + ← ENNReal.dyadicWeight_neg, mul_comm] + calc blockMult d K (1 / 2 ^ j) + ≤ ENNReal.ofReal (4 * π * Fintype.card d * ((2 : ℝ) ^ K * (1 / 2 ^ j))) := by + rw [blockMult] + refine ENNReal.ofReal_le_ofReal ((min_le_right _ _).trans_eq ?_) + ring + _ = ENNReal.ofReal (4 * π * Fintype.card d) * (dyadicWeight (-1) j * dyadicWeight 1 K) := by + rw [ENNReal.ofReal_mul (by positivity), h1] + +end Torus diff --git a/LeanPool/FunctionSpaces/Torus/Coefficients.lean b/LeanPool/FunctionSpaces/Torus/Coefficients.lean new file mode 100644 index 0000000000..71b8c895a7 --- /dev/null +++ b/LeanPool/FunctionSpaces/Torus/Coefficients.lean @@ -0,0 +1,79 @@ +/- +Copyright (c) 2026 Mario Ullrich. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Mario Ullrich +-/ +module + +public import LeanPool.FunctionSpaces.Torus.Sobolev +public import LeanPool.FunctionSpaces.MeasureSpaces.Spectral.Blocks + +/- +Modified for Lean Pool: module names and imports adapted. +-/ + +/-! +# Fourier-coefficient characterisations on the torus + +For `f ∈ L_2(𝕋^d)` with Fourier coefficients `f̂(k)`, and `s > 0`: + +* **`B^s_{2,2}(𝕋^d) = H^s(𝕋^d)`** (`Torus.memBesov_two_two_iff`): + `f ∈ B^s_{2,2}` iff `∑_k (1 + max_i |k_i|)^(2s) |f̂(k)|² < ∞`; +* **the Littlewood–Paley characterisation of `B^s_{2,q}`** with sharp dyadic cut-offs + (`Torus.memBesov_two_iff_blockNorm_lt_top`): `f ∈ B^s_{2,q}` iff + `(2^(ks) (∑_{2^k ≤ max_i |k_i| < 2^(k+1)} |f̂(k)|²)^(1/2))_k ∈ ℓ_q`, the block norms being + `Torus.enorm_fourierBlock_sq`. + +Both are the spectral statements of `FunctionSpaces.MeasureSpaces.Spectral.Blocks` for the Fourier +basis, transported along `Torus.toLp_trigScheme_eq`. The smooth Littlewood–Paley blocks +`Torus.lpBlock` describe `B^s_{p,q}(𝕋^d)` for every `1 ≤ p < ∞` +(`Torus.memBesov_iff_littlewoodPaleyNorm_lt_top`), and for `1 < p < ∞` the Littlewood–Paley +identity `F^0_{p,2}(𝕋^d) = L_p(𝕋^d)` holds (`Torus.triebelLizorkinSpace_zero_two_eq_top`). +-/ + +@[expose] public section + +open MeasureTheory UnitAddTorus +open scoped ENNReal BoundedContinuousFunction TorusHaar lp + +namespace Torus + +variable {d : Type*} [Fintype d] {s : ℝ} {q : ℝ≥0∞} + +/-- **`B^s_{2,2}(𝕋^d) = H^s(𝕋^d)`**: for `s > 0`, `f ∈ L_2(𝕋^d)` lies in `B^s_{2,2}` iff +`∑_k (1 + max_i |k_i|)^(2s) |f̂(k)|² < ∞`. -/ +theorem memBesov_two_two_iff (hs : 0 < s) (f : Lp ℂ 2 (volume : Measure (UnitAddTorus d))) : + (trigScheme d).MemBesov volume 2 s 2 f ↔ + Memℓp (fun k => ((((1 + deg k : ℕ) : ℝ) ^ s : ℝ) : ℂ) * mFourierCoeff f k) 2 := by + have h := (fourierScheme d).memApprox_two_iff hs f + simp only [fourierScheme, mFourierBasis_repr] at h + change ((trigScheme d).toLp volume 2).MemApprox s 2 f ↔ _ + rw [toLp_trigScheme_eq] + exact h + +/-- The **dyadic Fourier block** `Δ_k f = ∑_{2^k ≤ max_i |k_i| < 2^(k+1)} f̂(k) e_k`. -/ +noncomputable abbrev fourierBlock (k : ℕ) (f : Lp ℂ 2 (volume : Measure (UnitAddTorus d))) : + Lp ℂ 2 (volume : Measure (UnitAddTorus d)) := + (fourierScheme d).projectionScheme.block k f + +/-- `‖Δ_k f‖² = ∑_{2^k ≤ max_i |k_i| < 2^(k+1)} |f̂(k)|²`. -/ +theorem enorm_fourierBlock_sq (k : ℕ) (f : Lp ℂ 2 (volume : Measure (UnitAddTorus d))) : + ‖fourierBlock k f‖ₑ ^ 2 = ∑' n : d → ℤ, + if 2 ^ k ≤ deg n ∧ deg n < 2 ^ (k + 1) then ‖mFourierCoeff f n‖ₑ ^ 2 else 0 := by + rw [fourierBlock, (fourierScheme d).enorm_block_sq k f] + congr 1; funext n + change (if 2 ^ k ≤ deg n ∧ deg n < 2 ^ (k + 1) then ‖mFourierBasis.repr f n‖ₑ ^ 2 else 0) = _ + rw [mFourierBasis_repr] + +/-- **The Littlewood–Paley characterisation of `B^s_{2,q}(𝕋^d)`** with sharp dyadic cut-offs: +for `s > 0` and `1 ≤ q ≤ ∞`, `f ∈ B^s_{2,q}` iff +`‖P_1 f‖ + ‖(2^(ks) ‖Δ_k f‖_2)_k‖_{ℓ_q} < ∞`, where `P_1 f` is the mean of `f`. -/ +theorem memBesov_two_iff_blockNorm_lt_top (hs : 0 < s) (hq : 1 ≤ q) + (f : Lp ℂ 2 (volume : Measure (UnitAddTorus d))) : + (trigScheme d).MemBesov volume 2 s q f ↔ + (fourierScheme d).projectionScheme.blockNorm s q f < ∞ := by + change ((trigScheme d).toLp volume 2).MemApprox s q f ↔ _ + rw [toLp_trigScheme_eq] + exact (fourierScheme d).memApprox_iff_blockNorm_lt_top hs hq + +end Torus diff --git a/LeanPool/FunctionSpaces/Torus/Embeddings.lean b/LeanPool/FunctionSpaces/Torus/Embeddings.lean new file mode 100644 index 0000000000..7298bc64f4 --- /dev/null +++ b/LeanPool/FunctionSpaces/Torus/Embeddings.lean @@ -0,0 +1,118 @@ +/- +Copyright (c) 2026 Mario Ullrich. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Mario Ullrich +-/ +module + +public import LeanPool.FunctionSpaces.Torus.Sobolev + +/- +Modified for Lean Pool: module names and imports adapted. +-/ + +/-! +# Embedding theorems on the torus + +The general embedding theorems of `FunctionSpaces.MeasureSpaces.Besov.Embeddings` and +`FunctionSpaces.MeasureSpaces.Sobolev.Embeddings`, applied to the scheme of trigonometric +polynomials on `𝕋^d`, which has the Nikolskii property of dimension `d` +(`Torus.trigScheme_hasNikolskii`): + +* **Besov embedding** (`Torus.memBesov_exists_inclusion_eq`): for `1 ≤ p ≤ r ≤ ∞` and + `s > d(1/p - 1/r)`, `B^s_{p,q}(𝕋^d) ⊆ B^{s - d(1/p - 1/r)}_{r,q}(𝕋^d)`; +* **into continuous functions** (`Torus.memBesov_exists_continuous`): for `s > d/p`, every + `f ∈ B^s_{p,q}(𝕋^d)` has a continuous representative; +* **Sobolev embedding** (`Torus.sobolev_exists_continuous`): for `s > d/2`, every + `f ∈ L_2(𝕋^d)` with `∑_k (1 + max_i |k_i|)^(2s) |f̂(k)|² < ∞` has a continuous + representative; +* **`H^s` and Besov spaces** (`Torus.sobolev_memBesov_top`, `Torus.exists_sobolev_of_memBesov`): + `H^s(𝕋^d) ⊆ B^s_{2,∞}(𝕋^d)` and `B^t_{2,q}(𝕋^d) ⊆ H^s(𝕋^d)` for `t > s`; and + `H^s(𝕋^d) ⊆ L_r(𝕋^d)` with `B^{s - d(1/2 - 1/r)}_{r,∞}` smoothness for `2 ≤ r` and + `s > d(1/2 - 1/r)` (`Torus.sobolev_exists_inclusion_eq`). + +The torus measure is Mathlib's normalised Haar measure, available as `volume` after +`open scoped TorusHaar`. +-/ + +@[expose] public section + +open MeasureTheory UnitAddTorus FunctionScheme +open scoped ENNReal BoundedContinuousFunction TorusHaar lp + +namespace Torus + +variable {d : Type*} [Fintype d] {p r : ℝ≥0∞} [Fact (1 ≤ p)] [Fact (1 ≤ r)] {s : ℝ} + {q : ℝ≥0∞} + +/-- A bounded continuous function on the compact torus is a continuous function, with the same +`L_∞` class. -/ +theorem toLp_toContinuousMap (a : UnitAddTorus d →ᵇ ℂ) : + ContinuousMap.toLp (E := ℂ) ∞ volume ℝ a.toContinuousMap = + BoundedContinuousFunction.toLp (E := ℂ) ∞ volume ℝ a := by + rw [ContinuousMap.toLp_def] + congr 1 + +/-- **The Besov embedding on the torus**: for `1 ≤ p ≤ r ≤ ∞`, `1 ≤ q ≤ ∞` and +`s > d(1/p - 1/r)`, every `f ∈ B^s_{p,q}(𝕋^d)` lies in `L_r` and in +`B^{s - d(1/p - 1/r)}_{r,q}(𝕋^d)`. -/ +theorem memBesov_exists_inclusion_eq (hpr : p ≤ r) + (hs : (Fintype.card d : ℝ) * (p.toReal⁻¹ - r.toReal⁻¹) < s) (hq : 1 ≤ q) + {f : Lp ℂ p (volume : Measure (UnitAddTorus d))} (hf : (trigScheme d).MemBesov volume p s q f) : + ∃ g : Lp ℂ r (volume : Measure (UnitAddTorus d)), + Lp.inclusionOfExponentLe (𝕜 := ℝ) volume hpr g = f ∧ + (trigScheme d).MemBesov volume r (s - Fintype.card d * (p.toReal⁻¹ - r.toReal⁻¹)) q g := + MemBesov.exists_inclusion_eq_of_nikolskii trigScheme_hasNikolskii (Nat.cast_nonneg _) hpr hs hq + hf + +/-- **Besov functions are continuous** for `s > d/p`: every `f ∈ B^s_{p,q}(𝕋^d)` has a +continuous representative. -/ +theorem memBesov_exists_continuous (hs : (Fintype.card d : ℝ) * p.toReal⁻¹ < s) (hq : 1 ≤ q) + {f : Lp ℂ p (volume : Measure (UnitAddTorus d))} (hf : (trigScheme d).MemBesov volume p s q f) : + ∃ g : C(UnitAddTorus d, ℂ), + Lp.inclusionOfExponentLe (𝕜 := ℝ) volume le_top (ContinuousMap.toLp (E := ℂ) ∞ volume ℝ g) = + f := by + obtain ⟨a, ha⟩ := + MemBesov.exists_boundedContinuous trigScheme_hasNikolskii (Nat.cast_nonneg _) hs hq hf + exact ⟨a.toContinuousMap, by rw [toLp_toContinuousMap, ha]⟩ + +/-- **`H^s(𝕋^d) ⊆ B^s_{2,∞}(𝕋^d)`**, from Jackson's inequality. -/ +theorem sobolev_memBesov_top (hs : 0 < s) (c : ℓ²(d → ℤ, ℂ)) : + (trigScheme d).MemBesov volume 2 s ∞ ((sobolevSpace s hs).incl c) := + (sobolevSpace s hs).memApprox_top c + +/-- **`B^t_{2,q}(𝕋^d) ⊆ H^s(𝕋^d)` for `t > s`**, from Bernstein's inequality. -/ +theorem exists_sobolev_of_memBesov (hs : 0 < s) {t : ℝ} (hst : s < t) (hq : 1 ≤ q) + {f : Lp ℂ 2 (volume : Measure (UnitAddTorus d))} (hf : (trigScheme d).MemBesov volume 2 t q f) : + ∃ c : ℓ²(d → ℤ, ℂ), (sobolevSpace s hs).incl c = f := + (sobolevSpace s hs).exists_eq_of_lt hst hq hf + +/-- **The Sobolev embedding into `L_r`** on the torus: for `2 ≤ r ≤ ∞` and +`s > d(1/2 - 1/r)`, every element of `H^s(𝕋^d)` lies in `L_r` and in +`B^{s - d(1/2 - 1/r)}_{r,∞}(𝕋^d)`. -/ +theorem sobolev_exists_inclusion_eq (h2r : (2 : ℝ≥0∞) ≤ r) (hs : 0 < s) + (hsr : (Fintype.card d : ℝ) * ((2 : ℝ≥0∞).toReal⁻¹ - r.toReal⁻¹) < s) (c : ℓ²(d → ℤ, ℂ)) : + ∃ g : Lp ℂ r (volume : Measure (UnitAddTorus d)), + Lp.inclusionOfExponentLe (𝕜 := ℝ) volume h2r g = (sobolevSpace s hs).incl c ∧ + (trigScheme d).MemBesov volume r + (s - Fintype.card d * ((2 : ℝ≥0∞).toReal⁻¹ - r.toReal⁻¹)) ∞ g := + memBesov_exists_inclusion_eq h2r hsr le_top (sobolev_memBesov_top hs c) + +/-- **The Sobolev embedding into continuous functions** on the torus: for `s > d/2`, every +`f ∈ L_2(𝕋^d)` with `∑_k (1 + max_i |k_i|)^(2s) |f̂(k)|² < ∞` has a continuous +representative. -/ +theorem sobolev_exists_continuous (hs : (Fintype.card d : ℝ) / 2 < s) + {f : Lp ℂ 2 (volume : Measure (UnitAddTorus d))} + (hf : Memℓp (fun k => ((((1 + deg k : ℕ) : ℝ) ^ s : ℝ) : ℂ) * mFourierCoeff f k) 2) : + ∃ g : C(UnitAddTorus d, ℂ), + Lp.inclusionOfExponentLe (𝕜 := ℝ) volume le_top (ContinuousMap.toLp (E := ℂ) ∞ volume ℝ g) = + f := by + have hs0 : 0 < s := lt_of_le_of_lt (by positivity) hs + obtain ⟨c, rfl⟩ := (mem_range_sobolev_iff s hs0 f).2 hf + have hs' : (Fintype.card d : ℝ) * (2 : ℝ≥0∞).toReal⁻¹ < (sobolevSpace (d := d) s hs0).order := by + simpa [div_eq_mul_inv] using hs + obtain ⟨a, ha⟩ := SobolevSpace.exists_boundedContinuous trigScheme_hasNikolskii + (Nat.cast_nonneg _) (sobolevSpace s hs0) hs' c + exact ⟨a.toContinuousMap, by rw [toLp_toContinuousMap, ha]⟩ + +end Torus diff --git a/LeanPool/FunctionSpaces/Torus/EuclideanConvolution.lean b/LeanPool/FunctionSpaces/Torus/EuclideanConvolution.lean new file mode 100644 index 0000000000..1d71f2785a --- /dev/null +++ b/LeanPool/FunctionSpaces/Torus/EuclideanConvolution.lean @@ -0,0 +1,574 @@ +/- +Copyright (c) 2026 Mario Ullrich. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Mario Ullrich +-/ +module + +public import LeanPool.FunctionSpaces.Torus.Modulus +public import LeanPool.FunctionSpaces.Torus.Nikolskii +public import LeanPool.FunctionSpaces.Analysis.Lp.Young +public import Mathlib.Analysis.Fourier.FourierTransform + +/- +Modified for Lean Pool: module names and imports adapted. +-/ + +/-! +# Convolution on the torus with kernels on `ℝ^d` + +The quotient map `π : ℝ^d → 𝕋^d`, `π x = (x_i mod 1)_i` (`Torus.proj`), lets an integrable kernel +`Φ` on `ℝ^d` act on functions on the torus by + +`(Φ ⋆ f)(t) = ∫_{ℝ^d} Φ(y) f(t - π y) dy` (`Torus.econv`), + +the convolution of `f` with the periodisation `∑_{m ∈ ℤ^d} Φ(· + m)` of `Φ`, without forming it. + +* **Young's inequality** `‖Φ ⋆ f‖_{L_p(𝕋)} ≤ ‖Φ‖_{L_1(ℝ^d)} ‖f‖_p` (`Torus.eLpNorm_econv_le`), + from the weighted averages of `MeasureTheory.eLpNorm_integral_kernel_le_of_bound` and the + invariance of the Haar measure of the torus; so `Φ ⋆ ·` is a bounded operator on `L_p(𝕋)` + (`Torus.econvLp`). The convolution is linear (`Torus.econv_add_ae`, `Torus.econv_smul`), and a + finite sum of convolutions in `L_p` is represented by the pointwise sum + (`Torus.coeFn_sum_econvLp_ae`). +* **Fourier multipliers**: `Φ ⋆ e_m = 𝓕Φ(m) e_m` (`Torus.econv_mFourier`), since + `e_m(-π y) = e^(-2πi⟨m, y⟩)`. If `𝓕Φ(m) = 0` for `deg m ≥ n`, the operator maps `L_p(𝕋)` into + the trigonometric polynomials of degree `< n` (`Torus.econvLp_mem_trigPolyLp`): it maps the dense + span of the `e_m` into this finite-dimensional, hence closed, subspace. If `𝓕Φ(m) = 1` for + `deg m < n`, it reproduces them (`Torus.econvLp_eq_self_of_mem`). +* **Differences**: `Δ^r_{π h} (Φ ⋆ f) = (Δ^r_h Φ) ⋆ f` almost everywhere + (`Torus.higherDiff_econv_ae`), by the translation invariance of the Lebesgue measure. +* **Bounded continuous functions**: `f ↦ Φ ⋆ f` is a bounded operator on the bounded continuous + functions, `‖Φ ⋆ f‖_∞ ≤ ‖Φ‖_1 ‖f‖_∞` (`Torus.econvBCF`), and the class of `Φ ⋆ f` in `L_p` is + `Torus.econvLp` of the class of `f` (`Torus.toLp_econvBCF`). +-/ + +@[expose] public section + +open MeasureTheory UnitAddTorus Set Filter +open scoped ENNReal FourierTransform TorusHaar Real + +namespace Torus + +variable {d : Type*} [Fintype d] + +/-! ### The quotient map -/ + +/-- The **quotient map** `π : ℝ^d → 𝕋^d`, `π x = (x_i mod 1)_i`. -/ +noncomputable def proj : EuclideanSpace ℝ d →+ UnitAddTorus d where + toFun x i := ((x i : ℝ) : UnitAddCircle) + map_zero' := funext fun i => by simp + map_add' x y := funext fun i => by simp + +omit [Fintype d] in +/-- `(π x)_i = x_i mod 1`. -/ +theorem proj_apply (x : EuclideanSpace ℝ d) (i : d) : + proj x i = ((x i : ℝ) : UnitAddCircle) := rfl + +omit [Fintype d] in +/-- The quotient map is continuous. -/ +theorem continuous_proj : Continuous (proj : EuclideanSpace ℝ d → UnitAddTorus d) := + continuous_pi fun i => (AddCircle.continuous_mk' 1).comp (PiLp.continuous_apply 2 _ i) + +omit [Fintype d] in +/-- The quotient map is measurable. -/ +theorem measurable_proj [Finite d] : Measurable (proj : EuclideanSpace ℝ d → UnitAddTorus d) := by + let := Fintype.ofFinite d + exact continuous_proj.measurable + +/-- `‖π x‖ ≤ ‖x‖` for the sup norm of the torus. -/ +theorem norm_proj_le (x : EuclideanSpace ℝ d) : ‖proj x‖ ≤ ‖x‖ := + (pi_norm_le_iff_of_nonneg (norm_nonneg x)).2 fun i => + (norm_coe_le_abs (x i)).trans (by rw [← Real.norm_eq_abs]; exact PiLp.norm_apply_le x i) + +/-- **A norm bound by the coordinates**: `‖x‖ ≤ #d · M` if `|x_i| ≤ M` for every `i`. -/ +theorem norm_le_card_mul {x : EuclideanSpace ℝ d} {M : ℝ} (hx : ∀ i, |x i| ≤ M) : + ‖x‖ ≤ Fintype.card d * M := by + rcases isEmpty_or_nonempty d with hd | ⟨⟨i₀⟩⟩ + · rw [Subsingleton.elim x 0, norm_zero, Fintype.card_eq_zero, Nat.cast_zero, zero_mul] + · have hM : 0 ≤ M := (abs_nonneg _).trans (hx i₀) + have hcard : (1 : ℝ) ≤ Fintype.card d := by exact_mod_cast Fintype.card_pos_iff.2 ⟨i₀⟩ + rw [EuclideanSpace.norm_eq, Real.sqrt_le_left (by positivity)] + calc ∑ i, ‖x i‖ ^ 2 ≤ ∑ _i : d, M ^ 2 := Finset.sum_le_sum fun i _ => + pow_le_pow_left₀ (norm_nonneg _) (by rw [Real.norm_eq_abs]; exact hx i) 2 + _ = Fintype.card d * M ^ 2 := by rw [Finset.sum_const, Finset.card_univ, nsmul_eq_mul] + _ ≤ (Fintype.card d * M) ^ 2 := by nlinarith [sq_nonneg M] + +/-- **Every point of the torus is `π x` with `‖x‖ ≤ #d ‖h‖`**: choose representatives +`|x_i| = ‖h_i‖` (`Torus.exists_coe_eq_abs_eq_norm`). -/ +theorem exists_proj_eq (h : UnitAddTorus d) : + ∃ x : EuclideanSpace ℝ d, proj x = h ∧ ‖x‖ ≤ Fintype.card d * ‖h‖ := by + choose x hx1 hx2 using fun i => exists_coe_eq_abs_eq_norm (h i) + refine ⟨WithLp.toLp 2 x, funext fun i => hx1 i, norm_le_card_mul fun i => ?_⟩ + rw [show (WithLp.toLp 2 x : EuclideanSpace ℝ d) i = x i from rfl, hx2] + exact norm_le_pi_norm h i + +/-! ### Lattice points and characters -/ + +/-- The **lattice point** `(m_i)_i ∈ ℝ^d` of `m ∈ ℤ^d`. -/ +noncomputable def latticeVec (m : d → ℤ) : EuclideanSpace ℝ d := WithLp.toLp 2 fun i => (m i : ℝ) + +omit [Fintype d] in +/-- `(latticeVec m)_i = m_i`. -/ +theorem latticeVec_apply (m : d → ℤ) (i : d) : latticeVec m i = (m i : ℝ) := rfl + +omit [Fintype d] in +/-- The lattice vector of `-m` is `-m`. -/ +theorem latticeVec_neg (m : d → ℤ) : latticeVec (-m) = -latticeVec m := by + ext i + simp [latticeVec_apply] + +/-- `⟪m, v⟫ = ∑_i m_i v_i` in coordinates. -/ +theorem inner_latticeVec (m : d → ℤ) (v : EuclideanSpace ℝ d) : + inner ℝ (latticeVec m) v = ∑ i, (m i : ℝ) * v i := by + simp only [PiLp.inner_apply, latticeVec_apply, RCLike.inner_apply, conj_trivial] + exact Finset.sum_congr rfl fun i _ => mul_comm _ _ + +/-- `⟪m, e_i⟫ = m_i` for the unit vector `e_i`. -/ +theorem inner_latticeVec_single [DecidableEq d] (m : d → ℤ) (i : d) : + inner ℝ (latticeVec m) (EuclideanSpace.single i (1 : ℝ)) = (m i : ℝ) := by + rw [EuclideanSpace.inner_single_right, latticeVec_apply, one_mul] + rfl + +/-- **The degree is at most the norm**: `max_i |m_i| ≤ ‖m‖`. -/ +theorem deg_le_norm_latticeVec (m : d → ℤ) : (deg m : ℝ) ≤ ‖latticeVec m‖ := by + have hi : ∀ i, ((m i).natAbs : ℝ) ≤ ‖latticeVec m‖ := fun i => by + have h := PiLp.norm_apply_le (latticeVec m) i + rwa [latticeVec_apply, Real.norm_eq_abs, ← Int.cast_abs, ← Nat.cast_natAbs] at h + have h : deg m ≤ ⌊‖latticeVec m‖⌋₊ := deg_le_iff.2 fun i => Nat.le_floor (hi i) + exact (Nat.cast_le.2 h).trans (Nat.floor_le (norm_nonneg _)) + +/-- **The norm is at most `#d` times the degree**. -/ +theorem norm_latticeVec_le (m : d → ℤ) : ‖latticeVec m‖ ≤ Fintype.card d * deg m := + norm_le_card_mul fun i => by + rw [latticeVec_apply, ← Int.cast_abs, ← Nat.cast_natAbs] + exact Nat.cast_le.2 (natAbs_le_deg m i) + +/-- **The characters along the quotient map**: `e_m(-π y) = e^(-2πi⟨y, m⟩)`. -/ +theorem mFourier_neg_proj (m : d → ℤ) (y : EuclideanSpace ℝ d) : + mFourier m (-proj y) = Complex.exp (↑(-2 * π * inner ℝ y (latticeVec m)) * Complex.I) := by + rw [← map_neg] + have h : ∀ i, fourier (m i) (proj (-y) i) = + Complex.exp (↑(-2 * π * (y i * m i)) * Complex.I) := fun i => by + rw [proj_apply, fourier_coe_apply, PiLp.neg_apply] + congr 1 + push_cast + ring + change ∏ i, fourier (m i) (proj (-y) i) = _ + simp only [h] + rw [← Complex.exp_sum] + congr 1 + rw [PiLp.inner_apply, Finset.mul_sum, Complex.ofReal_sum, Finset.sum_mul] + refine Finset.sum_congr rfl fun i _ => ?_ + simp only [RCLike.inner_apply, conj_trivial, latticeVec_apply] + push_cast + ring + +/-- **The Fourier transform at the lattice points**: `∫ Φ(y) e_m(-π y) dy = 𝓕Φ(m)`. -/ +theorem integral_mul_mFourier_neg_proj (Φ : EuclideanSpace ℝ d → ℂ) (m : d → ℤ) : + ∫ y, Φ y * mFourier m (-proj y) = 𝓕 Φ (latticeVec m) := by + rw [Real.fourier_eq'] + refine integral_congr_ae (Eventually.of_forall fun y => ?_) + simp only [mFourier_neg_proj, smul_eq_mul] + ring + +/-! ### Convolution with a kernel on `ℝ^d` -/ + +/-- The **convolution with a kernel on `ℝ^d`**: `(Φ ⋆ f)(t) = ∫ Φ(y) f(t - π y) dy` for a function +`f` on the torus. -/ +noncomputable def econv (Φ : EuclideanSpace ℝ d → ℂ) (f : UnitAddTorus d → ℂ) + (t : UnitAddTorus d) : ℂ := + ∫ y, Φ y * f (t - proj y) + +omit [Fintype d] in +/-- The integrand `(t, y) ↦ f(t - π y)` is measurable. -/ +theorem measurable_comp_sub_proj [Finite d] {f : UnitAddTorus d → ℂ} (hf : Measurable f) : + Measurable (Function.uncurry fun (t : UnitAddTorus d) (y : EuclideanSpace ℝ d) => + f (t - proj y)) := by + let := Fintype.ofFinite d + exact hf.comp (measurable_fst.sub (measurable_proj.comp measurable_snd)) + +/-- Translations keep `L_p` norms on the torus. -/ +theorem eLpNorm_comp_sub {f : UnitAddTorus d → ℂ} (hf : AEStronglyMeasurable f volume) + (p : ℝ≥0∞) (c : UnitAddTorus d) : + eLpNorm (fun t => f (t - c)) p volume = eLpNorm f p volume := + eLpNorm_comp_measurePreserving hf (measurePreserving_sub_right volume c) + +/-- The convolution is measurable. -/ +theorem aestronglyMeasurable_econv {Φ : EuclideanSpace ℝ d → ℂ} + (hΦ : AEStronglyMeasurable Φ volume) {f : UnitAddTorus d → ℂ} (hf : Measurable f) : + AEStronglyMeasurable (econv Φ f) volume := + (hΦ.comp_snd.mul (measurable_comp_sub_proj hf).aestronglyMeasurable).integral_prod_right' + +/-- **Young's inequality on the torus**: `‖Φ ⋆ f‖_{L_p(𝕋)} ≤ ‖Φ‖_{L_1(ℝ^d)} ‖f‖_p`, `1 ≤ p < ∞`, +since every translate `f(· - π y)` has the norm of `f`. -/ +theorem eLpNorm_econv_le {p : ℝ≥0∞} (hp1 : 1 ≤ p) (hp : p ≠ ∞) {Φ : EuclideanSpace ℝ d → ℂ} + (hΦ : Integrable Φ) {f : UnitAddTorus d → ℂ} (hf : Measurable f) : + eLpNorm (econv Φ f) p volume ≤ (∫⁻ y, ‖Φ y‖ₑ) * eLpNorm f p volume := by + by_cases h0 : ∫⁻ y, ‖Φ y‖ₑ = 0 + · have he : econv Φ f = 0 := funext fun t => integral_eq_zero_of_ae <| by + filter_upwards [(lintegral_eq_zero_iff' hΦ.aestronglyMeasurable.eNorm).1 h0] with y hy + simp [eNorm_eq_zero.1 hy] + simp [he] + · exact eLpNorm_integral_kernel_le_of_bound hp1 hp hΦ.aestronglyMeasurable h0 hΦ.2.ne + (measurable_comp_sub_proj hf) fun z _ => + (eLpNorm_comp_sub hf.aestronglyMeasurable p (proj z)).le + +/-- The convolution of `f ∈ L_p(𝕋)` with an integrable kernel is in `L_p(𝕋)`. -/ +theorem memLp_econv {p : ℝ≥0∞} (hp1 : 1 ≤ p) (hp : p ≠ ∞) {Φ : EuclideanSpace ℝ d → ℂ} + (hΦ : Integrable Φ) {f : UnitAddTorus d → ℂ} (hf : Measurable f) + (hfp : MemLp f p volume) : MemLp (econv Φ f) p volume := + (eLpNorm_econv_le hp1 hp hΦ hf).trans_lt (ENNReal.mul_lt_top hΦ.2 hfp) + +/-- **The convolution integral converges absolutely almost everywhere** for `f ∈ L_1(𝕋)`: +`∫∫ |Φ(y)| |f(t - π y)| dy dt = ‖Φ‖_1 ‖f‖_1` by Tonelli's theorem. -/ +theorem ae_integrable_econv {Φ : EuclideanSpace ℝ d → ℂ} (hΦ : Integrable Φ) + {f : UnitAddTorus d → ℂ} (hf : Measurable f) (hfi : Integrable f volume) : + ∀ᵐ t ∂volume, Integrable (fun y => Φ y * f (t - proj y)) := by + have hmeas : AEStronglyMeasurable (Function.uncurry fun (t : UnitAddTorus d) + (y : EuclideanSpace ℝ d) => Φ y * f (t - proj y)) (volume.prod volume) := + hΦ.aestronglyMeasurable.comp_snd.mul (measurable_comp_sub_proj hf).aestronglyMeasurable + have hF : Integrable (Function.uncurry fun (t : UnitAddTorus d) (y : EuclideanSpace ℝ d) => + Φ y * f (t - proj y)) (volume.prod volume) := by + refine ⟨hmeas, ?_⟩ + rw [HasFiniteIntegral, lintegral_prod_symm _ hmeas.eNorm] + have hin : ∀ y, ∫⁻ t, ‖Function.uncurry (fun (t : UnitAddTorus d) + (y : EuclideanSpace ℝ d) => Φ y * f (t - proj y)) (t, y)‖ₑ = + ‖Φ y‖ₑ * ∫⁻ t, ‖f t‖ₑ := fun y => by + simp only [Function.uncurry_apply_pair, eNorm_mul] + rw [lintegral_const_mul' _ _ eNorm_ne_top, + lintegral_sub_right_eq_self (fun t => ‖f t‖ₑ) (proj y)] + simp_rw [hin] + rw [lintegral_mul_const'' _ hΦ.aestronglyMeasurable.eNorm] + exact ENNReal.mul_lt_top hΦ.2 hfi.2 + exact hF.prod_right_ae + +/-- **The convolution sees only classes**: `f = g` almost everywhere gives `Φ ⋆ f = Φ ⋆ g` +almost everywhere, since `f(t - π y) = g(t - π y)` for almost every `(t, y)`. -/ +theorem econv_congr_ae (Φ : EuclideanSpace ℝ d → ℂ) {f g : UnitAddTorus d → ℂ} + (hf : Measurable f) (hg : Measurable g) (hfg : f =ᵐ[volume] g) : + econv Φ f =ᵐ[volume] econv Φ g := by + have hset : MeasurableSet {z : UnitAddTorus d × EuclideanSpace ℝ d | + f (z.1 - proj z.2) = g (z.1 - proj z.2)} := + measurableSet_eq_fun (measurable_comp_sub_proj hf) (measurable_comp_sub_proj hg) + have h : ∀ᵐ y ∂(volume : Measure (EuclideanSpace ℝ d)), ∀ᵐ t ∂volume, + f (t - proj y) = g (t - proj y) := Eventually.of_forall fun y => + (measurePreserving_sub_right volume (proj y)).quasiMeasurePreserving.ae_eq_comp hfg + filter_upwards [(Measure.ae_ae_comm hset).2 h] with t ht + exact integral_congr_ae (ht.mono fun y hy => congrArg (Φ y * ·) hy) + +/-- **The convolution is additive almost everywhere** for integrable `f, g` on the torus: +`Φ ⋆ (f + g) = Φ ⋆ f + Φ ⋆ g` almost everywhere, where both integrals converge absolutely +(`Torus.ae_integrable_econv`). -/ +theorem econv_add_ae {Φ : EuclideanSpace ℝ d → ℂ} (hΦ : Integrable Φ) {f g : UnitAddTorus d → ℂ} + (hf : Measurable f) (hg : Measurable g) (hfi : Integrable f volume) + (hgi : Integrable g volume) : econv Φ (f + g) =ᵐ[volume] econv Φ f + econv Φ g := by + filter_upwards [ae_integrable_econv hΦ hf hfi, ae_integrable_econv hΦ hg hgi] with t h1 h2 + simp only [econv, Pi.add_apply, mul_add] + exact integral_add h1 h2 + +/-- **The convolution is homogeneous**: `Φ ⋆ (c f) = c (Φ ⋆ f)` at every point, for every +`c ∈ ℂ`. -/ +theorem econv_smul (Φ : EuclideanSpace ℝ d → ℂ) (c : ℂ) (f : UnitAddTorus d → ℂ) : + econv Φ (c • f) = c • econv Φ f := funext fun t => by + simp only [econv, Pi.smul_apply, smul_eq_mul, mul_left_comm (Φ _) c, integral_const_mul] + +/-! ### The operator on `L_p` -/ + +variable {p : ℝ≥0∞} [Fact (1 ≤ p)] + +/-- **Convolution with an integrable kernel on `ℝ^d` as a bounded operator on `L_p(𝕋)`**, +`1 ≤ p < ∞`, of norm at most `‖Φ‖_1`. -/ +noncomputable def econvLp (hp : p ≠ ∞) {Φ : EuclideanSpace ℝ d → ℂ} (hΦ : Integrable Φ) : + Lp ℂ p (volume : Measure (UnitAddTorus d)) →L[ℂ] Lp ℂ p (volume : Measure (UnitAddTorus d)) := + LinearMap.mkContinuous + { toFun := fun f => (memLp_econv Fact.out hp hΦ (Lp.stronglyMeasurable f).measurable + (Lp.memLp f)).toLp (econv Φ f) + map_add' := fun f g => by + refine Lp.ext ?_ + have hfm := (Lp.stronglyMeasurable f).measurable + have hgm := (Lp.stronglyMeasurable g).measurable + filter_upwards [MemLp.coeFn_toLp (memLp_econv Fact.out hp hΦ + (Lp.stronglyMeasurable (f + g)).measurable (Lp.memLp (f + g))), + MemLp.coeFn_toLp (memLp_econv Fact.out hp hΦ hfm (Lp.memLp f)), + MemLp.coeFn_toLp (memLp_econv Fact.out hp hΦ hgm (Lp.memLp g)), + Lp.coeFn_add ((memLp_econv Fact.out hp hΦ hfm (Lp.memLp f)).toLp (econv Φ f)) + ((memLp_econv Fact.out hp hΦ hgm (Lp.memLp g)).toLp (econv Φ g)), + econv_congr_ae Φ (Lp.stronglyMeasurable (f + g)).measurable (hfm.add hgm) + (Lp.coeFn_add f g), + econv_add_ae hΦ hfm hgm ((Lp.memLp f).integrable Fact.out) + ((Lp.memLp g).integrable Fact.out)] with t h1 h2 h3 h4 h5 h6 + rw [h1, h4, Pi.add_apply, h2, h3, h5, h6, Pi.add_apply] + map_smul' := fun c f => by + refine Lp.ext ?_ + have hfm := (Lp.stronglyMeasurable f).measurable + filter_upwards [MemLp.coeFn_toLp (memLp_econv Fact.out hp hΦ + (Lp.stronglyMeasurable (c • f)).measurable (Lp.memLp (c • f))), + MemLp.coeFn_toLp (memLp_econv Fact.out hp hΦ hfm (Lp.memLp f)), + Lp.coeFn_smul c ((memLp_econv Fact.out hp hΦ hfm (Lp.memLp f)).toLp (econv Φ f)), + econv_congr_ae Φ (Lp.stronglyMeasurable (c • f)).measurable (hfm.const_smul c) + (Lp.coeFn_smul c f)] with t h1 h2 h3 h4 + rw [h1, RingHom.id_apply, h3, Pi.smul_apply, h2, h4, econv_smul, Pi.smul_apply] } + (∫⁻ y, ‖Φ y‖ₑ).toReal (fun f => by + rw [LinearMap.coe_mk, AddHom.coe_mk, Lp.norm_toLp, Lp.norm_def, ← ENNReal.toReal_mul] + exact ENNReal.toReal_mono (ENNReal.mul_ne_top hΦ.2.ne (Lp.eLpNorm_ne_top f)) + (eLpNorm_econv_le Fact.out hp hΦ (Lp.stronglyMeasurable f).measurable)) + +/-- The operator `econvLp` is the convolution, almost everywhere. -/ +theorem econvLp_apply_ae (hp : p ≠ ∞) {Φ : EuclideanSpace ℝ d → ℂ} (hΦ : Integrable Φ) + (f : Lp ℂ p (volume : Measure (UnitAddTorus d))) : econvLp hp hΦ f =ᵐ[volume] econv Φ f := + MemLp.coeFn_toLp (memLp_econv Fact.out hp hΦ (Lp.stronglyMeasurable f).measurable (Lp.memLp f)) + +/-- **Sums of convolutions are pointwise sums**: for integrable kernels `K_j` on `ℝ^d`, +`u_j ∈ L_p(𝕋^d)` and every finite set `s`, the class `∑_{j ∈ s} K_j ⋆ u_j` is represented by +`t ↦ ∑_{j ∈ s} (K_j ⋆ u_j)(t)` (`Torus.econvLp_apply_ae`, Mathlib's `Lp.coeFn_fun_finsetSum`). -/ +theorem coeFn_sum_econvLp_ae (hp : p ≠ ∞) {ι : Type*} (s : Finset ι) + {K : ι → EuclideanSpace ℝ d → ℂ} (hK : ∀ j, Integrable (K j)) + (u : ι → Lp ℂ p (volume : Measure (UnitAddTorus d))) : + ⇑(∑ j ∈ s, econvLp hp (hK j) (u j)) =ᵐ[volume] fun t => ∑ j ∈ s, econv (K j) (u j) t := by + filter_upwards [Lp.coeFn_fun_finsetSum s fun j => econvLp hp (hK j) (u j), + (eventually_all_finset s).2 fun j _ => econvLp_apply_ae hp (hK j) (u j)] with t h1 h2 + rw [h1] + exact Finset.sum_congr rfl h2 + +/-- **Young's inequality on `L_p(𝕋)`** in extended norms: `‖Φ ⋆ f‖_p ≤ ‖Φ‖_1 ‖f‖_p`. -/ +theorem enorm_econvLp_le (hp : p ≠ ∞) {Φ : EuclideanSpace ℝ d → ℂ} (hΦ : Integrable Φ) + (f : Lp ℂ p (volume : Measure (UnitAddTorus d))) : + ‖econvLp hp hΦ f‖ₑ ≤ (∫⁻ y, ‖Φ y‖ₑ) * ‖f‖ₑ := by + rw [Lp.eNorm_def, Lp.eNorm_def, eLpNorm_congr_ae (econvLp_apply_ae hp hΦ f)] + exact eLpNorm_econv_le Fact.out hp hΦ (Lp.stronglyMeasurable f).measurable + +/-! ### Fourier multipliers -/ + +/-- **The characters are eigenfunctions**: `Φ ⋆ e_m = 𝓕Φ(m) e_m`. -/ +theorem econv_mFourier (Φ : EuclideanSpace ℝ d → ℂ) (m : d → ℤ) (t : UnitAddTorus d) : + econv Φ (mFourier m) t = 𝓕 Φ (latticeVec m) * mFourier m t := by + simp only [econv, sub_eq_add_neg, mFourier_add_apply] + rw [← integral_mul_mFourier_neg_proj, ← integral_mul_const] + exact integral_congr_ae (Eventually.of_forall fun y => by ring) + +/-- **The characters are eigenfunctions in `L_p`**: `Φ ⋆ e_m = 𝓕Φ(m) e_m`. -/ +theorem econvLp_mFourierLp (hp : p ≠ ∞) {Φ : EuclideanSpace ℝ d → ℂ} (hΦ : Integrable Φ) + (m : d → ℤ) : econvLp hp hΦ (mFourierLp p m) = 𝓕 Φ (latticeVec m) • mFourierLp p m := by + refine Lp.ext ?_ + have hm := coeFn_mFourierLp (d := d) p m + filter_upwards [econvLp_apply_ae hp hΦ (mFourierLp p m), + econv_congr_ae Φ (Lp.stronglyMeasurable (mFourierLp p m)).measurable + (mFourier m).continuous.measurable hm, + Lp.coeFn_smul (𝓕 Φ (latticeVec m)) (mFourierLp p m), hm] with t h1 h2 h3 h4 + rw [h1, h2, econv_mFourier, h3, Pi.smul_apply, h4, smul_eq_mul] + +variable (p) in +/-- The **trigonometric polynomials of degree `< n` in `L_p(𝕋)`**. -/ +noncomputable def trigPolyLp (n : ℕ) : Submodule ℂ (Lp ℂ p (volume : Measure (UnitAddTorus d))) := + (trigPoly d n).map (BoundedContinuousFunction.toLp (E := ℂ) p volume ℂ).toLinearMap + +/-- The trigonometric polynomials of degree `< n` in `L_p(𝕋)` are spanned by the characters +`e_m`, `deg m < n`. -/ +theorem trigPolyLp_eq_span (n : ℕ) : + trigPolyLp (d := d) p n = Submodule.span ℂ (mFourierLp p '' (boxLt d n : Set (d → ℤ))) := by + rw [trigPolyLp, trigPoly, Submodule.map_span, ← Set.image_comp] + rfl + +/-- `e_m` is a trigonometric polynomial of degree `< n` for `deg m < n`. -/ +theorem mFourierLp_mem_trigPolyLp {n : ℕ} {m : d → ℤ} (hm : deg m < n) : + mFourierLp p m ∈ trigPolyLp p n := by + rw [trigPolyLp_eq_span] + exact Submodule.subset_span ⟨m, mem_boxLt.2 hm, rfl⟩ + +/-- The trigonometric polynomials of degree `< n` form a closed subspace of `L_p(𝕋)`, being +finite-dimensional. -/ +theorem isClosed_trigPolyLp (n : ℕ) : + IsClosed (↑(trigPolyLp (d := d) p n) : Set (Lp ℂ p (volume : Measure (UnitAddTorus d)))) := by + have : FiniteDimensional ℂ (trigPolyLp (d := d) p n) := by + rw [trigPolyLp_eq_span] + exact FiniteDimensional.span_of_finite ℂ ((boxLt d n).finite_toSet.image _) + exact Submodule.isClosed_of_finiteDimensional _ + +/-- **The trigonometric polynomials of the scheme in `L_p`**: the approximants of degree `< n` +of `(trigScheme d).toLp volume p` are the trigonometric polynomials of degree `< n` in `L_p`. -/ +theorem mem_toLp_trigScheme_iff {n : ℕ} {g : Lp ℂ p (volume : Measure (UnitAddTorus d))} : + g ∈ (trigScheme d).toLp volume p n ↔ g ∈ trigPolyLp p n := by + rw [FunctionScheme.toLp, ApproximationScheme.mem_map, trigPolyLp, Submodule.mem_map] + simp only [mem_trigScheme] + rfl + +/-- **Band-limited kernels map `L_p(𝕋)` into trigonometric polynomials**: if `𝓕Φ(m) = 0` for +`deg m ≥ n`, then `Φ ⋆ f` has degree `< n`. The operator maps every `e_m` into the closed subspace +of trigonometric polynomials of degree `< n`, and the `e_m` span a dense subspace (Mathlib's +`span_mFourierLp_closure_eq_top`). -/ +theorem econvLp_mem_trigPolyLp (hp : p ≠ ∞) {Φ : EuclideanSpace ℝ d → ℂ} (hΦ : Integrable Φ) + {n : ℕ} (hF : ∀ m : d → ℤ, n ≤ deg m → 𝓕 Φ (latticeVec m) = 0) + (f : Lp ℂ p (volume : Measure (UnitAddTorus d))) : econvLp hp hΦ f ∈ trigPolyLp p n := by + set S := (trigPolyLp (d := d) p n).comap (econvLp hp hΦ).toLinearMap + have hS : IsClosed (S : Set (Lp ℂ p (volume : Measure (UnitAddTorus d)))) := + (isClosed_trigPolyLp n).preimage (econvLp hp hΦ).continuous + have hspan : Submodule.span ℂ (Set.range (mFourierLp (d := d) p)) ≤ S := by + rw [Submodule.span_le] + rintro _ ⟨m, rfl⟩ + change econvLp hp hΦ (mFourierLp p m) ∈ trigPolyLp p n + rw [econvLp_mFourierLp] + by_cases hm : n ≤ deg m + · rw [hF m hm, zero_smul] + exact zero_mem _ + · exact Submodule.smul_mem _ _ (mFourierLp_mem_trigPolyLp (not_le.1 hm)) + have hcl := Submodule.topologicalClosure_minimal _ hspan hS + rw [span_mFourierLp_closure_eq_top hp] at hcl + exact hcl Submodule.mem_top + +/-- **Kernels with `𝓕Φ = 1` on the low frequencies reproduce trigonometric polynomials**: if +`𝓕Φ(m) = 1` for `deg m < n`, then `Φ ⋆ a = a` for every trigonometric polynomial `a` of degree +`< n`. -/ +theorem econvLp_eq_self_of_mem (hp : p ≠ ∞) {Φ : EuclideanSpace ℝ d → ℂ} (hΦ : Integrable Φ) + {n : ℕ} (hF : ∀ m : d → ℤ, deg m < n → 𝓕 Φ (latticeVec m) = 1) + {a : Lp ℂ p (volume : Measure (UnitAddTorus d))} (ha : a ∈ trigPolyLp p n) : + econvLp hp hΦ a = a := by + rw [trigPolyLp_eq_span] at ha + refine LinearMap.eqOn_span (f := (econvLp hp hΦ).toLinearMap) (g := LinearMap.id) ?_ ha + rintro _ ⟨m, hm, rfl⟩ + simp [econvLp_mFourierLp, hF m (mem_boxLt.1 hm)] + +/-! ### Translations and differences -/ + +/-- **Translation**: `(Φ ⋆ f)(t + π h) = (Φ(· + h) ⋆ f)(t)`, by the translation invariance of the +Lebesgue measure. -/ +theorem econv_add_proj (Φ : EuclideanSpace ℝ d → ℂ) (f : UnitAddTorus d → ℂ) + (t : UnitAddTorus d) (h : EuclideanSpace ℝ d) : + econv Φ f (t + proj h) = econv (fun y => Φ (y + h)) f t := by + simp only [econv] + rw [← integral_add_right_eq_self (fun y => Φ y * f (t + proj h - proj y)) h] + refine integral_congr_ae (Eventually.of_forall fun y => ?_) + simp only [map_add] + congr 2 + abel + +/-- **Differences of the convolution**: `Δ^r_{π h} (Φ ⋆ f) = (Δ^r_h Φ) ⋆ f` almost everywhere, +for integrable `Φ` and `f ∈ L_1(𝕋)`. -/ +theorem higherDiff_econv_ae {Φ : EuclideanSpace ℝ d → ℂ} (hΦ : Integrable Φ) + {f : UnitAddTorus d → ℂ} (hf : Measurable f) (hfi : Integrable f volume) (r : ℕ) + (h : EuclideanSpace ℝ d) : + (fwdDiff (proj h))^[r] (econv Φ f) =ᵐ[volume] econv ((fwdDiff h)^[r] Φ) f := by + have hint : ∀ᵐ t ∂volume, ∀ l ∈ Finset.range (r + 1), + Integrable (fun y => Φ (y + l • h) * f (t - proj y)) := + (eventually_all_finset _).2 fun l _ => ae_integrable_econv (hΦ.comp_add_right (l • h)) hf hfi + filter_upwards [hint] with t ht + have hL : ∀ l : ℕ, econv Φ f (t + l • proj h) = ∫ y, Φ (y + l • h) * f (t - proj y) := + fun l => by rw [← map_nsmul, econv_add_proj]; rfl + rw [fwdDiff_iter_eq_sum_shift] + simp only [hL, zsmul_eq_mul] + rw [econv] + simp only [fwdDiff_iter_eq_sum_shift, zsmul_eq_mul, Finset.sum_mul] + rw [integral_finsetSum _ fun l hl => by simpa only [mul_assoc] using (ht l hl).const_mul _] + refine Finset.sum_congr rfl fun l _ => ?_ + rw [← integral_const_mul] + exact integral_congr_ae (Eventually.of_forall fun y => by ring) + +section BoundedContinuous + +open scoped BoundedContinuousFunction + +/-! ### Convolution of bounded continuous functions -/ + +/-- The integrand `y ↦ Φ(y) f(t - π y)` of the convolution of a bounded continuous `f` with an +integrable kernel is integrable. -/ +theorem integrable_mul_comp_sub_proj {Φ : EuclideanSpace ℝ d → ℂ} (hΦ : Integrable Φ) + (f : UnitAddTorus d →ᵇ ℂ) (t : UnitAddTorus d) : + Integrable fun y => Φ y * f (t - proj y) := + hΦ.mul_bdd (f.continuous.comp (continuous_const.sub continuous_proj)).aestronglyMeasurable + (Eventually.of_forall fun _ => f.norm_coe_le_norm _) + +/-- **The convolution of a continuous function is continuous**: for integrable `Φ` on `ℝ^d` and +bounded continuous `f` on `𝕋^d`, `Φ ⋆ f` is continuous, by dominated convergence with the bound +`|Φ(y)| ‖f‖_∞`. -/ +theorem continuous_econv {Φ : EuclideanSpace ℝ d → ℂ} (hΦ : Integrable Φ) + (f : UnitAddTorus d →ᵇ ℂ) : Continuous (econv Φ f) := by + change Continuous fun t => ∫ y, Φ y * f (t - proj y) + refine continuous_of_dominated (bound := fun y => ‖Φ y‖ * ‖f‖) + (fun t => (integrable_mul_comp_sub_proj hΦ f t).aestronglyMeasurable) + (fun t => Eventually.of_forall fun y => ?_) (hΦ.norm.mul_const _) + (Eventually.of_forall fun y => ?_) + · rw [norm_mul] + exact mul_le_mul_of_nonneg_left (f.norm_coe_le_norm _) (norm_nonneg _) + · exact continuous_const.mul (f.continuous.comp (continuous_id.sub continuous_const)) + +/-- **The convolution is bounded pointwise**: `|(Φ ⋆ f)(t)| ≤ ‖Φ‖_1 ‖f‖_∞` for every `t`. -/ +theorem norm_econv_le {Φ : EuclideanSpace ℝ d → ℂ} (hΦ : Integrable Φ) + (f : UnitAddTorus d →ᵇ ℂ) (t : UnitAddTorus d) : ‖econv Φ f t‖ ≤ (∫ y, ‖Φ y‖) * ‖f‖ := by + rw [econv, ← integral_mul_const] + refine norm_integral_le_of_norm_le (hΦ.norm.mul_const _) (Eventually.of_forall fun y => ?_) + rw [norm_mul] + exact mul_le_mul_of_nonneg_left (f.norm_coe_le_norm _) (norm_nonneg _) + +/-- The **convolution of bounded continuous functions** with an integrable kernel `Φ` on `ℝ^d`, +`(Φ ⋆ f)(t) = ∫ Φ(y) f(t - π y) dy`, as a bounded linear operator on the bounded continuous +functions on `𝕋^d`, of norm at most `‖Φ‖_1`. -/ +noncomputable def econvBCF {Φ : EuclideanSpace ℝ d → ℂ} (hΦ : Integrable Φ) : + (UnitAddTorus d →ᵇ ℂ) →L[ℂ] (UnitAddTorus d →ᵇ ℂ) := + LinearMap.mkContinuous + { toFun := fun f => BoundedContinuousFunction.mkOfCompact ⟨econv Φ f, continuous_econv hΦ f⟩ + map_add' := fun f g => by + ext t + change econv Φ ⇑(f + g) t = econv Φ f t + econv Φ g t + simp only [econv, FunLike.coe_add, Pi.add_apply, mul_add] + exact integral_add (integrable_mul_comp_sub_proj hΦ f t) + (integrable_mul_comp_sub_proj hΦ g t) + map_smul' := fun c f => by + ext t + change econv Φ (c • ⇑f) t = c * econv Φ f t + rw [econv_smul, Pi.smul_apply, smul_eq_mul] } + (∫ y, ‖Φ y‖) fun f => (BoundedContinuousFunction.norm_le + (mul_nonneg (integral_nonneg fun _ => norm_nonneg _) (norm_nonneg _))).2 + fun t => norm_econv_le hΦ f t + +/-- The values of `econvBCF` are the convolution integrals. -/ +@[simp] +theorem econvBCF_apply {Φ : EuclideanSpace ℝ d → ℂ} (hΦ : Integrable Φ) + (f : UnitAddTorus d →ᵇ ℂ) (t : UnitAddTorus d) : econvBCF hΦ f t = econv Φ f t := rfl + +/-- **Young's inequality in the sup norm**: `‖Φ ⋆ f‖_∞ ≤ ‖Φ‖_1 ‖f‖_∞`. -/ +theorem norm_econvBCF_le {Φ : EuclideanSpace ℝ d → ℂ} (hΦ : Integrable Φ) + (f : UnitAddTorus d →ᵇ ℂ) : ‖econvBCF hΦ f‖ ≤ (∫ y, ‖Φ y‖) * ‖f‖ := + (BoundedContinuousFunction.norm_le + (mul_nonneg (integral_nonneg fun _ => norm_nonneg _) (norm_nonneg _))).2 + fun t => norm_econv_le hΦ f t + +/-- **The two convolutions agree**: the `L_p` class of `Φ ⋆ f` for bounded continuous `f` is the +operator `Torus.econvLp` applied to the class of `f`, `1 ≤ p < ∞`. -/ +theorem toLp_econvBCF {𝕜 : Type*} [NontriviallyNormedField 𝕜] [NormedSpace 𝕜 ℂ] (hp : p ≠ ∞) + {Φ : EuclideanSpace ℝ d → ℂ} (hΦ : Integrable Φ) (f : UnitAddTorus d →ᵇ ℂ) : + BoundedContinuousFunction.toLp (E := ℂ) p volume 𝕜 (econvBCF hΦ f) = + econvLp hp hΦ (BoundedContinuousFunction.toLp (E := ℂ) p volume 𝕜 f) := by + refine Lp.ext ?_ + have hf := BoundedContinuousFunction.coeFn_toLp (E := ℂ) p + (volume : Measure (UnitAddTorus d)) 𝕜 f + filter_upwards [BoundedContinuousFunction.coeFn_toLp (E := ℂ) p volume 𝕜 (econvBCF hΦ f), + econvLp_apply_ae hp hΦ (BoundedContinuousFunction.toLp (E := ℂ) p volume 𝕜 f), + econv_congr_ae Φ (Lp.stronglyMeasurable _).measurable f.continuous.measurable hf] + with t h1 h2 h3 + rw [h1, h2, h3, econvBCF_apply] + +/-- **Band-limited kernels map continuous functions into trigonometric polynomials**: if +`𝓕Φ(m) = 0` for `deg m ≥ N`, then `Φ ⋆ f` has degree `< N` (through `L_2` and the injectivity of +`f ↦ [f]` on continuous functions). -/ +theorem econvBCF_mem_trigPoly {Φ : EuclideanSpace ℝ d → ℂ} (hΦ : Integrable Φ) {N : ℕ} + (hF : ∀ m : d → ℤ, N ≤ deg m → 𝓕 Φ (latticeVec m) = 0) (f : UnitAddTorus d →ᵇ ℂ) : + econvBCF hΦ f ∈ trigPoly d N := by + obtain ⟨a, ha, hae⟩ := Submodule.mem_map.1 (econvLp_mem_trigPolyLp (p := (2 : ℝ≥0∞)) + ENNReal.ofNat_ne_top hΦ hF (BoundedContinuousFunction.toLp (E := ℂ) 2 volume ℂ f)) + have h : BoundedContinuousFunction.toLp (E := ℂ) 2 volume ℂ a = + BoundedContinuousFunction.toLp (E := ℂ) 2 volume ℂ (econvBCF hΦ f) := by + rw [toLp_econvBCF (p := (2 : ℝ≥0∞)) ENNReal.ofNat_ne_top] + exact hae + rwa [← BoundedContinuousFunction.toLp_injective (E := ℂ) (p := (2 : ℝ≥0∞)) (𝕜 := ℂ) volume h] + +/-- **Kernels with `𝓕Φ = 1` on the low frequencies reproduce continuous trigonometric +polynomials**: if `𝓕Φ(m) = 1` for `deg m < N`, then `Φ ⋆ a = a` for `a` of degree `< N`. -/ +theorem econvBCF_eq_self_of_mem {Φ : EuclideanSpace ℝ d → ℂ} (hΦ : Integrable Φ) {N : ℕ} + (hF : ∀ m : d → ℤ, deg m < N → 𝓕 Φ (latticeVec m) = 1) {a : UnitAddTorus d →ᵇ ℂ} + (ha : a ∈ trigPoly d N) : econvBCF hΦ a = a := by + refine BoundedContinuousFunction.toLp_injective (E := ℂ) (p := (2 : ℝ≥0∞)) (𝕜 := ℂ) volume ?_ + rw [toLp_econvBCF (p := (2 : ℝ≥0∞)) ENNReal.ofNat_ne_top] + exact econvLp_eq_self_of_mem _ hΦ hF (Submodule.mem_map_of_mem ha) + +end BoundedContinuous + +end Torus diff --git a/LeanPool/FunctionSpaces/Torus/EuclideanConvolutionIdentities.lean b/LeanPool/FunctionSpaces/Torus/EuclideanConvolutionIdentities.lean new file mode 100644 index 0000000000..7ed460e3e2 --- /dev/null +++ b/LeanPool/FunctionSpaces/Torus/EuclideanConvolutionIdentities.lean @@ -0,0 +1,233 @@ +/- +Copyright (c) 2026 Mario Ullrich. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Mario Ullrich +-/ +module + +public import LeanPool.FunctionSpaces.Torus.EuclideanConvolution +public import LeanPool.FunctionSpaces.Analysis.Fourier.LittlewoodPaleyKernels + +/- +Modified for Lean Pool: module names and imports adapted. +-/ + +/-! +# Identities of convolution operators on the torus + +The kernels `Φ` of `ℝ^d` act on `L_p(𝕋^d)`, `1 ≤ p < ∞`, by the bounded operators +`f ↦ Φ ⋆ f` (`Torus.econvLp`), and the characters are their eigenfunctions, +`Φ ⋆ e_m = 𝓕Φ(m) e_m` (`Torus.econvLp_mFourierLp`). Since the characters span a dense subspace +of `L_p(𝕋^d)`, a bounded linear map on `L_p(𝕋^d)` is determined by its values on them +(`Torus.ext_mFourierLp`), and every identity between these operators is an identity of Fourier +multipliers: + +* `K ⋆ (L ⋆ f) = (K ⋆ L) ⋆ f` (`Torus.econvLp_comp_econvLp`, and + `Torus.econvLp_comp_econvLp_of_eq` for a given `M = K ⋆ L`), from `𝓕(K ⋆ L) = 𝓕K · 𝓕L` + (`Rd.fourier_conv`); in particular the operators commute (`Torus.econvLp_comm`); +* the operator is additive in the kernel (`Torus.econvLp_add_kernel`, + `Torus.econvLp_sub_kernel`), constants move from the kernel to the function + (`Torus.econv_smul_kernel`), and equal kernels give the same operator + (`Torus.econvLp_congr_kernel`); +* if `𝓕Φ(m) = 0` for `deg m < n`, the operator annihilates the trigonometric polynomials of + degree `< n` (`Torus.econvLp_eq_zero_of_mem`). + +**Approximate identities** (`Torus.tendsto_econvLp_of_fourier`): a family of kernels with +bounded `L_1` norms whose Fourier transforms tend to `1` at every lattice point satisfies +`Φ_i ⋆ f → f` in `L_p(𝕋^d)`. The convergence holds on the characters, the operators are +uniformly bounded (`Torus.norm_econvLp_le`), so the set where it holds is a closed subspace. +This applies to the dilations `K_c ⋆ f → f` of a kernel with `∫ K = 1` +(`Torus.tendsto_econvLp_dilate`) and to the Littlewood–Paley kernels `Φ_J` +(`Torus.tendsto_econvLp_Phi`). +-/ + +@[expose] public section + +open MeasureTheory UnitAddTorus Set Filter Topology +open scoped ENNReal FourierTransform TorusHaar + +namespace Torus + +variable {d : Type*} [Fintype d] {p : ℝ≥0∞} [Fact (1 ≤ p)] + +/-! ### Operators are determined by the characters -/ + +/-- **Bounded linear maps on `L_p(𝕋^d)` are determined by the characters**: for `1 ≤ p < ∞`, +two bounded linear maps from `L_p(𝕋^d)` into a normed space that agree on every `e_m` are equal, +since the characters span a dense subspace (Mathlib's `span_mFourierLp_closure_eq_top`). -/ +theorem ext_mFourierLp (hp : p ≠ ∞) {F : Type*} [NormedAddCommGroup F] [NormedSpace ℂ F] + {T S : Lp ℂ p (volume : Measure (UnitAddTorus d)) →L[ℂ] F} + (h : ∀ m : d → ℤ, T (mFourierLp p m) = S (mFourierLp p m)) : T = S := + ContinuousLinearMap.ext_on + (Submodule.dense_iff_topologicalClosure_eq_top.2 (span_mFourierLp_closure_eq_top hp)) + (by rintro _ ⟨m, rfl⟩; exact h m) + +/-! ### Composition and linearity in the kernel -/ + +/-- **Composition of convolution operators**: `K ⋆ (L ⋆ f) = (K ⋆ L) ⋆ f` on `L_p(𝕋^d)`, for +integrable kernels `K`, `L` on `ℝ^d`; on the characters both sides multiply by +`𝓕K(m) 𝓕L(m) = 𝓕(K ⋆ L)(m)`. -/ +theorem econvLp_comp_econvLp (hp : p ≠ ∞) {K L : EuclideanSpace ℝ d → ℂ} (hK : Integrable K) + (hL : Integrable L) (f : Lp ℂ p (volume : Measure (UnitAddTorus d))) : + econvLp hp hK (econvLp hp hL f) = econvLp hp (Rd.integrable_conv hK hL) f := by + have h : (econvLp hp hK).comp (econvLp hp hL) = econvLp hp (Rd.integrable_conv hK hL) := + ext_mFourierLp hp fun m => by + rw [ContinuousLinearMap.comp_apply, econvLp_mFourierLp, map_smul, econvLp_mFourierLp, + smul_smul, econvLp_mFourierLp, Rd.fourier_conv hK hL, mul_comm] + exact DFunLike.congr_fun h f + +/-- If `K ⋆ L = M` on `ℝ^d`, then `K ⋆ (L ⋆ f) = M ⋆ f` on `L_p(𝕋^d)`. -/ +theorem econvLp_comp_econvLp_of_eq (hp : p ≠ ∞) {K L M : EuclideanSpace ℝ d → ℂ} + (hK : Integrable K) (hL : Integrable L) (hM : Integrable M) (h : Rd.conv K L volume = M) + (f : Lp ℂ p (volume : Measure (UnitAddTorus d))) : + econvLp hp hK (econvLp hp hL f) = econvLp hp hM f := by + rw [econvLp_comp_econvLp hp hK hL] + subst h + rfl + +/-- **Convolution operators commute**: `K ⋆ (L ⋆ f) = L ⋆ (K ⋆ f)` on `L_p(𝕋^d)`. -/ +theorem econvLp_comm (hp : p ≠ ∞) {K L : EuclideanSpace ℝ d → ℂ} (hK : Integrable K) + (hL : Integrable L) (f : Lp ℂ p (volume : Measure (UnitAddTorus d))) : + econvLp hp hK (econvLp hp hL f) = econvLp hp hL (econvLp hp hK f) := by + have h : (econvLp hp hK).comp (econvLp hp hL) = (econvLp hp hL).comp (econvLp hp hK) := + ext_mFourierLp hp fun m => by + rw [ContinuousLinearMap.comp_apply, ContinuousLinearMap.comp_apply, + econvLp_mFourierLp hp hL, map_smul, econvLp_mFourierLp hp hK, smul_smul, map_smul, + econvLp_mFourierLp hp hL, smul_smul, mul_comm] + exact DFunLike.congr_fun h f + +/-- **Additivity in the kernel**: `(K + L) ⋆ f = K ⋆ f + L ⋆ f` on `L_p(𝕋^d)`. -/ +theorem econvLp_add_kernel (hp : p ≠ ∞) {K L : EuclideanSpace ℝ d → ℂ} (hK : Integrable K) + (hL : Integrable L) (f : Lp ℂ p (volume : Measure (UnitAddTorus d))) : + econvLp hp (hK.add hL) f = econvLp hp hK f + econvLp hp hL f := by + have h : econvLp hp (hK.add hL) = econvLp hp hK + econvLp hp hL := + ext_mFourierLp hp fun m => by + rw [add_apply, econvLp_mFourierLp, econvLp_mFourierLp, + econvLp_mFourierLp, Rd.fourier_add_apply hK hL, add_smul] + exact DFunLike.congr_fun h f + +/-- **Subtractivity in the kernel**: `(K - L) ⋆ f = K ⋆ f - L ⋆ f` on `L_p(𝕋^d)`. -/ +theorem econvLp_sub_kernel (hp : p ≠ ∞) {K L : EuclideanSpace ℝ d → ℂ} (hK : Integrable K) + (hL : Integrable L) (f : Lp ℂ p (volume : Measure (UnitAddTorus d))) : + econvLp hp (hK.sub hL) f = econvLp hp hK f - econvLp hp hL f := by + have h : econvLp hp (hK.sub hL) = econvLp hp hK - econvLp hp hL := + ext_mFourierLp hp fun m => by + rw [sub_apply, econvLp_mFourierLp, econvLp_mFourierLp, + econvLp_mFourierLp, Rd.fourier_sub_apply hK hL, sub_smul] + exact DFunLike.congr_fun h f + +/-- **Constants move from the kernel to the function**: `(c K) ⋆ g = K ⋆ (c g)` at every point +of the torus, for every `c ∈ ℂ`, every function `K` on `ℝ^d` and every function `g` on `𝕋^d`. -/ +theorem econv_smul_kernel (c : ℂ) (K : EuclideanSpace ℝ d → ℂ) (g : UnitAddTorus d → ℂ) : + econv (c • K) g = econv K (c • g) := by + rw [econv_smul] + funext t + simp only [econv, Pi.smul_apply, smul_eq_mul, mul_assoc, integral_const_mul] + +/-- Equal integrable kernels `K = L` on `ℝ^d` give the same convolution operator on +`L_p(𝕋^d)`. -/ +theorem econvLp_congr_kernel (hp : p ≠ ∞) {K L : EuclideanSpace ℝ d → ℂ} (hK : Integrable K) + (hL : Integrable L) (h : K = L) : econvLp hp hK = econvLp hp hL := by + subst h + rfl + +/-- **Kernels with `𝓕Φ = 0` on the low frequencies annihilate trigonometric polynomials**: if +`𝓕Φ(m) = 0` for `deg m < n`, then `Φ ⋆ a = 0` for every trigonometric polynomial `a` of degree +`< n`. -/ +theorem econvLp_eq_zero_of_mem (hp : p ≠ ∞) {Φ : EuclideanSpace ℝ d → ℂ} (hΦ : Integrable Φ) + {n : ℕ} (hF : ∀ m : d → ℤ, deg m < n → 𝓕 Φ (latticeVec m) = 0) + {a : Lp ℂ p (volume : Measure (UnitAddTorus d))} (ha : a ∈ trigPolyLp p n) : + econvLp hp hΦ a = 0 := by + rw [trigPolyLp_eq_span] at ha + refine LinearMap.eqOn_span (f := (econvLp hp hΦ).toLinearMap) (g := 0) ?_ ha + rintro _ ⟨m, hm, rfl⟩ + simp [econvLp_mFourierLp, hF m (mem_boxLt.1 hm)] + +/-! ### Approximate identities -/ + +/-- **A uniform bound for convolution operators**: if `∫ |Φ| ≤ C < ∞`, then +`‖Φ ⋆ g‖_p ≤ C ‖g‖_p` in real norms. -/ +theorem norm_econvLp_le (hp : p ≠ ∞) {Φ : EuclideanSpace ℝ d → ℂ} (hΦ : Integrable Φ) + {C : ℝ≥0∞} (hC : C ≠ ∞) (hB : ∫⁻ y, ‖Φ y‖ₑ ≤ C) + (g : Lp ℂ p (volume : Measure (UnitAddTorus d))) : + ‖econvLp hp hΦ g‖ ≤ C.toReal * ‖g‖ := by + have h : ‖econvLp hp hΦ g‖ₑ ≤ C * ‖g‖ₑ := + (enorm_econvLp_le hp hΦ g).trans (mul_le_mul_left hB _) + calc ‖econvLp hp hΦ g‖ = ‖econvLp hp hΦ g‖ₑ.toReal := (toReal_eNorm _).symm + _ ≤ (C * ‖g‖ₑ).toReal := ENNReal.toReal_mono (ENNReal.mul_ne_top hC eNorm_ne_top) h + _ = C.toReal * ‖g‖ := by rw [ENNReal.toReal_mul, toReal_eNorm] + +/-- **Approximate identities on the torus**: let `Φ_i` be integrable kernels on `ℝ^d` with +`∫ |Φ_i| ≤ C < ∞` and `𝓕Φ_i(m) → 1` for every lattice point `m`. Then `Φ_i ⋆ f → f` in +`L_p(𝕋^d)` for every `f`, `1 ≤ p < ∞`. The `f` with `Φ_i ⋆ f → f` form a subspace that contains +every character; it is closed since the operators are uniformly bounded, hence equicontinuous +(Mathlib's `Equicontinuous.isClosed_setOfPred_tendsto`), and the characters span a dense +subspace. -/ +theorem tendsto_econvLp_of_fourier (hp : p ≠ ∞) {ι : Type*} {l : Filter ι} + {Φ : ι → EuclideanSpace ℝ d → ℂ} (hΦ : ∀ i, Integrable (Φ i)) {C : ℝ≥0∞} (hC : C ≠ ∞) + (hB : ∀ i, ∫⁻ y, ‖Φ i y‖ₑ ≤ C) + (hF : ∀ m : d → ℤ, Tendsto (fun i => 𝓕 (Φ i) (latticeVec m)) l (𝓝 1)) + (f : Lp ℂ p (volume : Measure (UnitAddTorus d))) : + Tendsto (fun i => econvLp hp (hΦ i) f) l (𝓝 f) := by + let S : Submodule ℂ (Lp ℂ p (volume : Measure (UnitAddTorus d))) := + { carrier := {g | Tendsto (fun i => econvLp hp (hΦ i) g) l (𝓝 g)} + add_mem' := fun {g h} hg hh => by + simp only [Set.mem_ofPred_eq, map_add] at hg hh ⊢ + exact hg.add hh + zero_mem' := by + simp only [Set.mem_ofPred_eq, map_zero] + exact tendsto_const_nhds + smul_mem' := fun c g hg => by + simp only [Set.mem_ofPred_eq, map_smul] at hg ⊢ + exact hg.const_smul c } + have hbd : ∃ C' : ℝ, ∀ i (g : Lp ℂ p (volume : Measure (UnitAddTorus d))), + ‖econvLp hp (hΦ i) g‖ ≤ C' * ‖g‖ := + ⟨C.toReal, fun i g => norm_econvLp_le hp (hΦ i) hC (hB i) g⟩ + have hequi : Equicontinuous + ((↑) ∘ fun i => econvLp hp (hΦ i) : + ι → Lp ℂ p (volume : Measure (UnitAddTorus d)) → + Lp ℂ p (volume : Measure (UnitAddTorus d))) := + ((NormedSpace.equicontinuous_tfae fun i => econvLp hp (hΦ i)).out 4 2).1 hbd + have hS : IsClosed (S : Set (Lp ℂ p (volume : Measure (UnitAddTorus d)))) := + hequi.isClosed_setOfPred_tendsto continuous_id + have hspan : Submodule.span ℂ (Set.range (mFourierLp (d := d) p)) ≤ S := by + rw [Submodule.span_le] + rintro _ ⟨m, rfl⟩ + change Tendsto (fun i => econvLp hp (hΦ i) (mFourierLp p m)) l (𝓝 (mFourierLp p m)) + simp only [econvLp_mFourierLp] + simpa only [one_smul] using (hF m).smul_const (mFourierLp p m) + have hcl := Submodule.topologicalClosure_minimal _ hspan hS + rw [span_mFourierLp_closure_eq_top hp] at hcl + exact hcl Submodule.mem_top + +/-- **Dilations are approximate identities on the torus**: for an integrable kernel `K` on `ℝ^d` +with `∫ K = 1` and scales `c_i > 0` with `c_i → ∞` along a filter, `K_{c_i} ⋆ f → f` in +`L_p(𝕋^d)`. The Fourier transforms `𝓕K_{c_i}(m) = 𝓕K(m / c_i)` tend to `𝓕K(0) = ∫ K = 1`, and +`‖K_{c_i}‖_1 = ‖K‖_1`. -/ +theorem tendsto_econvLp_dilate (hp : p ≠ ∞) {K : EuclideanSpace ℝ d → ℂ} (hK : Integrable K) + (h1 : ∫ y, K y = 1) {ι : Type*} {l : Filter ι} {c : ι → ℝ} (hc0 : ∀ i, 0 < c i) + (hc : Tendsto c l atTop) (f : Lp ℂ p (volume : Measure (UnitAddTorus d))) : + Tendsto (fun i => econvLp hp (Rd.integrable_dilate hK (hc0 i).ne') f) l (𝓝 f) := by + refine tendsto_econvLp_of_fourier hp (fun i => Rd.integrable_dilate hK (hc0 i).ne') + (hK.2.ne) (fun i => ?_) (fun m => ?_) f + · rw [← eLpNorm_one_eq_lintegral_eNorm (Rd.integrable_dilate hK (hc0 i).ne').1, + Rd.eLpNorm_dilate_one hK (hc0 i), eLpNorm_one_eq_lintegral_eNorm hK.1] + · have hsmul : Tendsto (fun i => (c i)⁻¹ • latticeVec m) l (𝓝 0) := by + have h := (tendsto_inv_atTop_zero.comp hc).smul_const (latticeVec m) + rwa [zero_smul] at h + have hlim := ((Rd.continuous_fourier_of_integrable hK).tendsto 0).comp hsmul + rw [Rd.fourier_apply_zero, h1] at hlim + refine hlim.congr fun i => ?_ + simp only [Function.comp_apply] + rw [Rd.fourier_dilate K (hc0 i)] + +/-- **The Littlewood–Paley kernels are an approximate identity on the torus**: `Φ_J ⋆ f → f` +in `L_p(𝕋^d)` as `J → ∞`, for `1 ≤ p < ∞`. -/ +theorem tendsto_econvLp_Phi (hp : p ≠ ∞) (f : Lp ℂ p (volume : Measure (UnitAddTorus d))) : + Tendsto (fun J => econvLp hp (Rd.integrable_Phi (V := EuclideanSpace ℝ d) J) f) atTop + (𝓝 f) := + tendsto_econvLp_dilate hp Rd.integrable_lpKernel Rd.integral_lpKernel + (c := fun J : ℕ => (2 : ℝ) ^ J) (fun J => by positivity) + (tendsto_pow_atTop_atTop_of_one_lt one_lt_two) f + +end Torus diff --git a/LeanPool/FunctionSpaces/Torus/FeffermanStein.lean b/LeanPool/FunctionSpaces/Torus/FeffermanStein.lean new file mode 100644 index 0000000000..6a970a355f --- /dev/null +++ b/LeanPool/FunctionSpaces/Torus/FeffermanStein.lean @@ -0,0 +1,184 @@ +/- +Copyright (c) 2026 Mario Ullrich. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Mario Ullrich +-/ +module + +public import LeanPool.FunctionSpaces.Torus.PeriodicLift +public import LeanPool.FunctionSpaces.Analysis.Maximal.FeffermanStein + +/- +Modified for Lean Pool: module names and imports adapted. +-/ + +/-! +# The Fefferman–Stein inequality for periodic lifts + +For functions `g_j` on the torus `𝕋^d`, the maximal functions `M(g_j ∘ π)` of their periodic lifts +on `ℝ^d` satisfy the Fefferman–Stein inequality on the period box `P_0 = (0, 1]^d` +(`Torus.feffermanStein_periodic`): for `1 < p < ∞` and `1 < q ≤ ∞`, + +`‖ x ↦ ‖(M(g_j ∘ π)(x))_j‖_{ℓ_q} ‖_{L_p(P_0)} ≤ C ‖ t ↦ ‖(g_j(t))_j‖_{ℓ_q} ‖_{L_p(𝕋^d)}` + +with the explicit constant `C = Torus.periodicFSConst d p q`. The proof localises +(`Torus.maximal_comp_proj_le`): at a point of `P_0`, balls of radius `r ≤ 1` lie in the box +`(-1, 2]^d`, so they see only the lift cut off to that box, to which the inequality on `ℝ^d` +(`Rd.feffermanStein`) applies; a ball of radius `r > 1` meets at most `(2r + 2)^d ≤ (4r)^d` +period boxes, so its mean is at most `4^d |B(0,1)|⁻¹ ∫_{𝕋^d} g`. The mean term is bounded by +Minkowski's integral inequality on the probability space `𝕋^d` +(`MeasureTheory.lqNorm_lintegral_le_eLpNorm`). + +Lifts of functions that agree almost everywhere have the same maximal function +(`Torus.maximal_enorm_comp_proj_congr_ae`). +-/ + +@[expose] public section + +open MeasureTheory UnitAddTorus Set Filter Metric Module +open scoped ENNReal TorusHaar + +open ENNReal (lqNorm) + +namespace Torus + +variable {d : Type*} [Fintype d] + +/-! ### Localisation of the maximal function -/ + +/-- **The maximal function of a lift sees only the class of the function**: if `u = v` almost +everywhere on `𝕋^d`, then `M(|u| ∘ π) = M(|v| ∘ π)`, since the lifts agree almost everywhere on +`ℝ^d` (`Torus.ae_comp_proj`). -/ +theorem maximal_enorm_comp_proj_congr_ae {E : Type*} [ENorm E] {u v : UnitAddTorus d → E} + (h : u =ᵐ[volume] v) : + Rd.maximal (fun y => ‖u (proj y)‖ₑ) = Rd.maximal (fun y => ‖v (proj y)‖ₑ) := + Rd.maximal_congr_ae ((ae_comp_proj h).mono fun y hy => by simp only [hy]) + +/-- **Large balls**: for `r ≥ 1`, `(2r + 2)^d ≤ |B(0,r)| 4^d |B(0,1)|⁻¹`, since +`|B(0,r)| = r^d |B(0,1)|` and `2r + 2 ≤ 4r`. -/ +theorem ofReal_two_mul_add_two_pow_le_volume_ball_mul {r : ℝ} (hr : 1 ≤ r) : + ENNReal.ofReal (2 * r + 2) ^ Fintype.card d ≤ + volume (ball (0 : EuclideanSpace ℝ d) r) * + (4 ^ Fintype.card d * (volume (ball (0 : EuclideanSpace ℝ d) 1))⁻¹) := by + have hB0 := Rd.volume_ball_ne_zero (V := EuclideanSpace ℝ d) one_pos + have hBt := Rd.volume_ball_ne_top (V := EuclideanSpace ℝ d) 1 + rw [Measure.addHaar_ball_of_pos volume 0 (zero_lt_one.trans_le hr), finrank_euclideanSpace, + mul_comm (4 ^ Fintype.card d), ← mul_assoc, mul_assoc (ENNReal.ofReal _), + ENNReal.mul_inv_cancel hB0 hBt, mul_one, ← ENNReal.ofReal_pow (by linarith), + ← ENNReal.ofReal_ofNat 4, ← ENNReal.ofReal_pow (by norm_num), + ← ENNReal.ofReal_mul (by positivity), ← mul_pow] + exact ENNReal.ofReal_le_ofReal (pow_le_pow_left₀ (by linarith) (by linarith) _) + +/-- **Localisation of the maximal function of a lift**: at every point `x` of `P_0 = (0, 1]^d`, +`M(g ∘ π)(x) ≤ M(1_{(-1,2]^d} (g ∘ π))(x) + 4^d |B(0,1)|⁻¹ ∫_{𝕋^d} g`. Balls of radius `r ≤ 1` +lie in `(-1, 2]^d`; a ball of radius `r > 1` meets at most `(2r + 2)^d` period boxes +(`Torus.setLIntegral_ball_comp_proj_le`). -/ +theorem maximal_comp_proj_le (g : UnitAddTorus d → ℝ≥0∞) {x : EuclideanSpace ℝ d} + (hx : x ∈ periodBox 0) : + Rd.maximal (fun y => g (proj y)) x ≤ + Rd.maximal (tripleBox.indicator fun y => g (proj y)) x + + 4 ^ Fintype.card d * (volume (ball (0 : EuclideanSpace ℝ d) 1))⁻¹ * ∫⁻ t, g t := by + refine Rd.maximal_le_of_forall fun r hr => ?_ + rcases le_or_gt r 1 with hr1 | hr1 + · have heq : ∫⁻ y in ball x r, g (proj y) = + ∫⁻ y in ball x r, tripleBox.indicator (fun y => g (proj y)) y := + setLIntegral_congr_fun measurableSet_ball fun y hy => + (indicator_of_mem (ball_subset_tripleBox hx hr1 hy) (fun y => g (proj y))).symm + rw [heq] + exact (Rd.setLIntegral_ball_le_mul_maximal hr _ x).trans + (mul_le_mul_right le_self_add _) + · calc ∫⁻ y in ball x r, g (proj y) + ≤ ENNReal.ofReal (2 * r + 2) ^ Fintype.card d * ∫⁻ t, g t := + setLIntegral_ball_comp_proj_le g x r + _ ≤ volume (ball (0 : EuclideanSpace ℝ d) r) * + (4 ^ Fintype.card d * (volume (ball (0 : EuclideanSpace ℝ d) 1))⁻¹ * ∫⁻ t, g t) := by + rw [← mul_assoc] + gcongr + exact ofReal_two_mul_add_two_pow_le_volume_ball_mul hr1.le + _ ≤ _ := mul_le_mul_right le_add_self _ + +/-! ### The inequality -/ + +/-- The constant `3^{d/p} C_{d,p,q} + 4^d |B(0,1)|⁻¹` of the Fefferman–Stein inequality for +periodic lifts, with the constant `C_{d,p,q} = Rd.feffermanSteinConst` of `ℝ^d` and the volume +`|B(0,1)|` of the unit ball of `ℝ^d`. -/ +noncomputable def periodicFSConst (d : Type*) [Fintype d] (p q : ℝ≥0∞) : ℝ≥0∞ := + 3 ^ ((Fintype.card d : ℝ) / p.toReal) * Rd.feffermanSteinConst (EuclideanSpace ℝ d) p q + + 4 ^ Fintype.card d * (volume (ball (0 : EuclideanSpace ℝ d) 1))⁻¹ + +/-- The constant of the Fefferman–Stein inequality for periodic lifts is finite for `1 < p < ∞` +and `1 < q ≤ ∞`. -/ +theorem periodicFSConst_ne_top {p q : ℝ≥0∞} (hp1 : 1 < p) (hp : p ≠ ∞) (hq1 : 1 < q) : + periodicFSConst d p q ≠ ∞ := + ENNReal.add_ne_top.2 ⟨ENNReal.mul_ne_top + (ENNReal.rpow_ne_top_of_nonneg (by positivity) (by norm_num)) + (Rd.feffermanSteinConst_ne_top hp1 hp hq1), + ENNReal.mul_ne_top (ENNReal.pow_ne_top (by norm_num)) + (ENNReal.inv_ne_top.2 (Rd.volume_ball_ne_zero one_pos))⟩ + +/-- The pointwise localisation in `ℓ_q`: for `1 ≤ q ≤ ∞`, on `P_0`, +`‖(M(g_j ∘ π)(x))_j‖_{ℓ_q} ≤ ‖(M(1_{(-1,2]^d} (g_j ∘ π))(x))_j‖_{ℓ_q} + +4^d |B(0,1)|⁻¹ ‖(∫_{𝕋^d} g_j)_j‖_{ℓ_q}`. -/ +theorem lqNorm_maximal_comp_proj_le {q : ℝ≥0∞} (hq : 1 ≤ q) (g : ℕ → UnitAddTorus d → ℝ≥0∞) + {x : EuclideanSpace ℝ d} (hx : x ∈ periodBox 0) : + lqNorm q (fun j => Rd.maximal (fun y => g j (proj y)) x) ≤ + lqNorm q (fun j => Rd.maximal (tripleBox.indicator fun y => g j (proj y)) x) + + 4 ^ Fintype.card d * (volume (ball (0 : EuclideanSpace ℝ d) 1))⁻¹ * + lqNorm q (fun j => ∫⁻ t, g j t) := by + rw [← ENNReal.lqNorm_const_mul] + exact (ENNReal.lqNorm_mono fun j => maximal_comp_proj_le (g j) hx).trans + (ENNReal.lqNorm_add_le hq _ _) + +/-- **The Fefferman–Stein inequality for periodic lifts**: for `1 < p < ∞`, `1 < q ≤ ∞` and +almost everywhere measurable `g_j : 𝕋^d → [0, ∞]`, `j ∈ ℕ`, +`‖ x ↦ ‖(M(g_j ∘ π)(x))_j‖_{ℓ_q} ‖_{L_p(P_0)} ≤ C ‖ t ↦ ‖(g_j(t))_j‖_{ℓ_q} ‖_{L_p(𝕋^d)}` with +`C = Torus.periodicFSConst d p q` and the period box `P_0 = (0, 1]^d`. -/ +theorem feffermanStein_periodic {p q : ℝ≥0∞} (hp1 : 1 < p) (hp : p ≠ ∞) (hq1 : 1 < q) + (g : ℕ → UnitAddTorus d → ℝ≥0∞) (hg : ∀ j, AEMeasurable (g j) volume) : + eLpNorm (fun x => lqNorm q (fun j => Rd.maximal (fun y => g j (proj y)) x)) p + (volume.restrict (periodBox 0)) ≤ + periodicFSConst d p q * eLpNorm (fun t => lqNorm q (fun j => g j t)) p volume := by + set G : UnitAddTorus d → ℝ≥0∞ := fun t => lqNorm q (fun j => g j t) + set c : ℝ≥0∞ := 4 ^ Fintype.card d * (volume (ball (0 : EuclideanSpace ℝ d) 1))⁻¹ + set A : EuclideanSpace ℝ d → ℝ≥0∞ := fun x => + lqNorm q (fun j => Rd.maximal (tripleBox.indicator fun y => g j (proj y)) x) + have hgl : ∀ j, AEMeasurable (tripleBox.indicator fun y => g j (proj y)) volume := fun j => + ((hg j).comp_quasiMeasurePreserving quasiMeasurePreserving_proj).indicator + measurableSet_tripleBox + have hA : Measurable A := measurable_lqNorm_comp (fun j => Rd.measurable_maximal _) q + have h1 : eLpNorm A p (volume.restrict (periodBox 0)) ≤ + 3 ^ ((Fintype.card d : ℝ) / p.toReal) * Rd.feffermanSteinConst (EuclideanSpace ℝ d) p q * + eLpNorm G p volume := by + refine (eLpNorm_mono_measure _ Measure.restrict_le_self).trans + ((Rd.feffermanStein hp1 hp hq1 _ hgl).trans (le_of_eq ?_)) + have hfun : (fun y => lqNorm q (fun j => tripleBox.indicator (fun y => g j (proj y)) y)) = + tripleBox.indicator fun y => G (proj y) := + funext fun y => ENNReal.lqNorm_indicator q _ _ y + rw [hfun, eLpNorm_indicator_tripleBox (zero_lt_one.trans hp1).ne' hp + (aemeasurable_lqNorm_comp hg q)] + ring + have h2 : eLpNorm (fun _ : EuclideanSpace ℝ d => c * lqNorm q (fun j => ∫⁻ t, g j t)) p + (volume.restrict (periodBox 0)) ≤ c * eLpNorm G p volume := by + rw [eLpNorm_const' _ (zero_lt_one.trans hp1).ne' hp, Measure.restrict_apply_univ, + volume_periodBox, ENNReal.one_rpow, mul_one, eNorm_eq_self] + gcongr + exact lqNorm_lintegral_le_eLpNorm hp1.le hq1.le hg + calc eLpNorm (fun x => lqNorm q (fun j => Rd.maximal (fun y => g j (proj y)) x)) p + (volume.restrict (periodBox 0)) + ≤ eLpNorm (A + fun _ => c * lqNorm q (fun j => ∫⁻ t, g j t)) p + (volume.restrict (periodBox 0)) := by + refine eLpNorm_mono_eNorm_ae + (measurable_lqNorm_comp (fun j => Rd.measurable_maximal _) q).aestronglyMeasurable ?_ + filter_upwards [ae_restrict_mem (measurableSet_periodBox 0)] with x hx + simp only [eNorm_eq_self, Pi.add_apply] + exact lqNorm_maximal_comp_proj_le hq1.le g hx + _ ≤ eLpNorm A p (volume.restrict (periodBox 0)) + + eLpNorm (fun _ : EuclideanSpace ℝ d => c * lqNorm q (fun j => ∫⁻ t, g j t)) p + (volume.restrict (periodBox 0)) := + eLpNorm_add_le hp1.le + _ ≤ 3 ^ ((Fintype.card d : ℝ) / p.toReal) * Rd.feffermanSteinConst (EuclideanSpace ℝ d) p q * + eLpNorm G p volume + c * eLpNorm G p volume := add_le_add h1 h2 + _ = periodicFSConst d p q * eLpNorm G p volume := by + rw [periodicFSConst, add_mul] + +end Torus diff --git a/LeanPool/FunctionSpaces/Torus/FourierSpectralBasis.lean b/LeanPool/FunctionSpaces/Torus/FourierSpectralBasis.lean new file mode 100644 index 0000000000..54a5814180 --- /dev/null +++ b/LeanPool/FunctionSpaces/Torus/FourierSpectralBasis.lean @@ -0,0 +1,103 @@ +/- +Copyright (c) 2026 Mario Ullrich. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Mario Ullrich +-/ +module + +public import LeanPool.FunctionSpaces.MeasureSpaces.Spectral.LocalWeyl +public import LeanPool.FunctionSpaces.Torus.Sobolev + +/- +Modified for Lean Pool: module names and imports adapted. +-/ + +/-! +# The Fourier basis as a continuous spectral basis + +The trigonometric monomials `e_k`, `k ∈ ℤ^d`, are the eigenfunctions of the Laplacian on the torus +`𝕋^d`, `Δ e_k = -4π² |k|² e_k`. With the level `deg k = max_i |k_i|` they form a continuous +spectral basis (`ContinuousSpectralBasis`, `Torus.fourierEigenbasis`): the Fourier basis of +`L_2(𝕋^d)`, represented by the bounded continuous functions `Torus.trigMonomial k`. Its spans are +the trigonometric polynomials (`Torus.basisSpan_fourierEigenbasis`), so its scheme is the +trigonometric scheme (`Torus.basisScheme_fourierEigenbasis`), and the general results for +continuous spectral bases hold on the torus. The hypotheses of those results are theorems here: + +* **the local Weyl bound** of dimension `d` (`Torus.localWeylBound_fourierEigenbasis`): + `∑_{deg k < n} |e_k(x)|² ≤ 2^d n^d`, since `|e_k| = 1` and there are at most `(2n)^d` + frequencies of degree `< n`; +* **the Nikolskii property** of dimension `d` (`Torus.hasNikolskii_fourierEigenbasis`), from the + power trick of `FunctionSpaces.Torus.Nikolskii`. +-/ + +@[expose] public section + +open MeasureTheory UnitAddTorus FunctionScheme +open scoped ENNReal BoundedContinuousFunction TorusHaar + +namespace Torus + +variable (d : Type*) [Fintype d] + +/-- The **Fourier basis as a continuous spectral basis** of `L_2(𝕋^d)`, an eigenbasis of the +Laplacian: the trigonometric monomials `e_k` with the level `deg k = max_i |k_i|`. -/ +noncomputable def fourierEigenbasis : + ContinuousSpectralBasis (d → ℤ) (volume : Measure (UnitAddTorus d)) where + toSpectralScheme := fourierScheme d + basisFun := trigMonomial + toLp_basisFun k := by + rw [toLp_trigMonomial] + exact (congrFun coe_mFourierBasis k).symm + +variable {d} + +/-- The level of `e_k` is `deg k`. -/ +@[simp] +theorem fourierEigenbasis_level (k : d → ℤ) : (fourierEigenbasis d).level k = deg k := rfl + +/-- The continuous basis functions are the trigonometric monomials. -/ +@[simp] +theorem fourierEigenbasis_basisFun (k : d → ℤ) : + (fourierEigenbasis d).basisFun k = trigMonomial k := rfl + +/-- The span of the basis functions of level `< n` is the space of trigonometric polynomials of +degree `< n`. -/ +theorem basisSpan_fourierEigenbasis (n : ℕ) : + (fourierEigenbasis d).basisSpan n = trigPoly d n := by + rw [ContinuousSpectralBasis.basisSpan, trigPoly] + congr 2 + ext k + simp [mem_boxLt] + +/-- The scheme of the basis functions is the trigonometric scheme. -/ +theorem basisScheme_fourierEigenbasis : (fourierEigenbasis d).basisScheme = trigScheme d := by + ext n a + change a ∈ (fourierEigenbasis d).basisSpan n ↔ a ∈ trigPoly d n + rw [basisSpan_fourierEigenbasis] + +/-- The levels `< n` are the frequencies of degree `< n`. -/ +theorem levelSet_fourierEigenbasis (n : ℕ) : (fourierEigenbasis d).levelSet n = boxLt d n := by + ext k + rw [ContinuousSpectralBasis.mem_levelSet, mem_boxLt, fourierEigenbasis_level] + +/-- **The local Weyl bound on the torus**: `∑_{deg k < n} |e_k(x)|² ≤ 2^d n^d`, since every +monomial has modulus `1` and there are at most `(2n)^d` frequencies of degree `< n`. -/ +theorem localWeylBound_fourierEigenbasis : + (fourierEigenbasis d).LocalWeylBound (Fintype.card d) (2 ^ Fintype.card d) := by + refine ⟨by positivity, fun n _ x => ?_⟩ + rw [levelSet_fourierEigenbasis] + have h1 : ∑ k ∈ boxLt d n, ‖(fourierEigenbasis d).basisFun k x‖ ^ 2 = (boxLt d n).card := by + simp only [fourierEigenbasis_basisFun, norm_trigMonomial_apply, one_pow, Finset.sum_const, + nsmul_eq_mul, mul_one] + rw [h1, Real.rpow_natCast] + calc ((boxLt d n).card : ℝ) ≤ ((2 * n) ^ Fintype.card d : ℕ) := by + exact_mod_cast card_boxLt_le n + _ = 2 ^ Fintype.card d * (n : ℝ) ^ Fintype.card d := by push_cast; ring + +/-- **The Nikolskii property of the Fourier eigenbasis**, of dimension `d`. -/ +theorem hasNikolskii_fourierEigenbasis : + (fourierEigenbasis d).basisScheme.HasNikolskii volume (Fintype.card d) := by + rw [basisScheme_fourierEigenbasis] + exact trigScheme_hasNikolskii + +end Torus diff --git a/LeanPool/FunctionSpaces/Torus/HaarMeasure.lean b/LeanPool/FunctionSpaces/Torus/HaarMeasure.lean new file mode 100644 index 0000000000..db1f0f051a --- /dev/null +++ b/LeanPool/FunctionSpaces/Torus/HaarMeasure.lean @@ -0,0 +1,66 @@ +/- +Copyright (c) 2026 Mario Ullrich. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Mario Ullrich +-/ +module + +public import Mathlib.Analysis.Fourier.AddCircleMulti + +/- +Modified for Lean Pool: module names and imports adapted. +-/ + +/-! +# The normalised Haar measure on the torus + +Mathlib's Fourier analysis on the torus `𝕋^d = UnitAddTorus d` uses +`Mathlib.Analysis.Fourier.AddCircleMulti` and works with the probability Haar measure +`AddCircle.haarAddCircle` on each circle factor. A local instance makes it the measure `volume`. +Outside that file, +the global instance `AddCircle.measureSpace` applies instead, whose `volume` is equal but not +definitionally equal, so `L_2(𝕋^d)` would be a different type from the one carrying Mathlib's +Fourier basis `UnitAddTorus.mFourierBasis`. + +This file makes Mathlib's instance available as a **scoped instance**: after +`open scoped TorusHaar`, `volume` on `UnitAddCircle` and on `UnitAddTorus d` is the +normalised Haar measure of Mathlib's Fourier theory. It also records that this measure is a +Haar probability measure, which gives (through Mathlib's product instances) a probability +measure on `𝕋^d` charging every nonempty open set. +-/ + +@[expose] public section + +open MeasureTheory + +namespace TorusHaar + +attribute [scoped instance] instMeasureSpaceUnitAddCircle + +end TorusHaar + +open scoped TorusHaar + +/-- The normalised Haar measure on the circle is a Haar measure. -/ +instance TorusHaar.isAddHaarMeasure : + Measure.IsAddHaarMeasure (volume : Measure UnitAddCircle) := + inferInstanceAs (Measure.IsAddHaarMeasure AddCircle.haarAddCircle) + +/-- The normalised Haar measure on the circle is a probability measure. -/ +instance TorusHaar.isProbabilityMeasure : IsProbabilityMeasure (volume : Measure UnitAddCircle) := + inferInstanceAs (IsProbabilityMeasure AddCircle.haarAddCircle) + +namespace TorusHaar + +variable (d : Type*) [Fintype d] + +/-- The scoped measure on the circle is Mathlib's normalised Haar measure. -/ +theorem volume_eq_haarAddCircle : (volume : Measure UnitAddCircle) = AddCircle.haarAddCircle := + rfl + +example : IsProbabilityMeasure (volume : Measure (UnitAddTorus d)) := inferInstance +example : (volume : Measure (UnitAddTorus d)).IsOpenPosMeasure := inferInstance +example : BorelSpace (UnitAddTorus d) := inferInstance +example : CompactSpace (UnitAddTorus d) := inferInstance + +end TorusHaar diff --git a/LeanPool/FunctionSpaces/Torus/LittlewoodPaley.lean b/LeanPool/FunctionSpaces/Torus/LittlewoodPaley.lean new file mode 100644 index 0000000000..9de7a61197 --- /dev/null +++ b/LeanPool/FunctionSpaces/Torus/LittlewoodPaley.lean @@ -0,0 +1,214 @@ +/- +Copyright (c) 2026 Mario Ullrich. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Mario Ullrich +-/ +module + +public import LeanPool.FunctionSpaces.Torus.EuclideanConvolutionIdentities +public import LeanPool.FunctionSpaces.ApproximationSpaces.Decompositions.Blocks + +/- +Modified for Lean Pool: module names and imports adapted. +-/ + +/-! +# Littlewood–Paley blocks on the torus + +For `f ∈ L_p(𝕋^d)`, `1 ≤ p < ∞`, the **Littlewood–Paley blocks** are `Δ_j f = ψ_j ⋆ f` +(`Torus.lpBlock`), with the kernels `ψ_j` of `Rd.psi` on `ℝ^d` acting by `Torus.econvLp`. They +are bounded uniformly, `‖Δ_j f‖_p ≤ 2 ‖Φ‖_1 ‖f‖_p` (`Torus.enorm_lpBlock_le`), their partial +sums are `Φ_J ⋆ f` (`Torus.sum_lpBlock`), and these converge to `f` +(`Torus.tendsto_sum_lpBlock`). The **Littlewood–Paley quasi-norm** is +`‖(2^(js) ‖Δ_j f‖_p)_j‖_{ℓ_q}` (`Torus.littlewoodPaleyNorm`). + +**Besov spaces on the torus by Littlewood–Paley blocks** +(`Torus.memBesov_iff_littlewoodPaleyNorm_lt_top`): for `s > 0`, `1 ≤ q ≤ ∞` and every +`1 ≤ p < ∞`, `f ∈ B^s_{p,q}(𝕋^d)` iff its Littlewood–Paley quasi-norm is finite, with explicit +constants in both directions (`Torus.approxNormDyadic_trigScheme_le`, +`Torus.littlewoodPaleyNorm_le_approxNormDyadic_trigScheme`). Both come from the Fourier +multipliers at the lattice points: + +* the blocks are trigonometric polynomials, `Δ_j f ∈ 𝒯_{2^(j+1)}`, since `𝓕ψ_j(m) = 0` for + `|m| ≥ 2^(j+1)` (`Torus.lpBlock_mem_trigPolyLp`); +* high blocks of trigonometric polynomials vanish, `Δ_j a = 0` for `a ∈ 𝒯_{2^i}` and + `j ≥ i + #d + 1`, since `|m| ≤ #d deg m < 2^(i + #d)` (`Torus.lpBlock_eq_zero_of_mem`); hence + `‖Δ_j f‖_p ≤ 2 ‖Φ‖_1 E_{2^i}(f)_p` (`Torus.enorm_lpBlock_le_approxError`). +-/ + +@[expose] public section + +open MeasureTheory UnitAddTorus Set Filter Topology +open scoped ENNReal FourierTransform TorusHaar + +open ENNReal (lqNorm dyadicWeight) + +namespace Torus + +variable {d : Type*} [Fintype d] {p : ℝ≥0∞} [Fact (1 ≤ p)] + +/-! ### The blocks -/ + +/-- The **Littlewood–Paley block** `Δ_j f = ψ_j ⋆ f` of `f ∈ L_p(𝕋^d)`, with the kernel `ψ_j` of +`Rd.psi` on `ℝ^d`. -/ +noncomputable def lpBlock (hp : p ≠ ∞) (j : ℕ) : + Lp ℂ p (volume : Measure (UnitAddTorus d)) →L[ℂ] Lp ℂ p (volume : Measure (UnitAddTorus d)) := + econvLp hp (Rd.integrable_psi (V := EuclideanSpace ℝ d) j) + +/-- **The blocks are bounded uniformly**: `‖Δ_j f‖_p ≤ 2 ‖Φ‖_1 ‖f‖_p`. -/ +theorem enorm_lpBlock_le (hp : p ≠ ∞) (j : ℕ) (f : Lp ℂ p (volume : Measure (UnitAddTorus d))) : + ‖lpBlock hp j f‖ₑ ≤ 2 * eLpNorm (Rd.lpKernel (V := EuclideanSpace ℝ d)) 1 volume * ‖f‖ₑ := by + refine (enorm_econvLp_le hp _ f).trans ?_ + rw [← eLpNorm_one_eq_lintegral_eNorm (Rd.integrable_psi j).1] + gcongr + exact Rd.eLpNorm_psi_one_le j + +/-- `Δ_{j+1} f = Φ_{j+1} ⋆ f - Φ_j ⋆ f`. -/ +theorem lpBlock_succ (hp : p ≠ ∞) (j : ℕ) (f : Lp ℂ p (volume : Measure (UnitAddTorus d))) : + lpBlock hp (j + 1) f = + econvLp hp (Rd.integrable_Phi (V := EuclideanSpace ℝ d) (j + 1)) f - + econvLp hp (Rd.integrable_Phi (V := EuclideanSpace ℝ d) j) f := + econvLp_sub_kernel hp (Rd.integrable_Phi (j + 1)) (Rd.integrable_Phi j) f + +/-- **The blocks telescope**: `∑_{j ≤ J} Δ_j f = Φ_J ⋆ f`. -/ +theorem sum_lpBlock (hp : p ≠ ∞) (J : ℕ) (f : Lp ℂ p (volume : Measure (UnitAddTorus d))) : + ∑ j ∈ Finset.range (J + 1), lpBlock hp j f = + econvLp hp (Rd.integrable_Phi (V := EuclideanSpace ℝ d) J) f := by + induction J with + | zero => + rw [Finset.sum_range_one] + rfl + | succ J ih => rw [Finset.sum_range_succ, ih, lpBlock_succ, add_sub_cancel] + +/-- **Reconstruction**: the partial sums of the blocks converge to `f` in `L_p(𝕋^d)`, since +`Φ_J ⋆ f → f` (`Torus.tendsto_econvLp_Phi`). -/ +theorem tendsto_sum_lpBlock (hp : p ≠ ∞) (f : Lp ℂ p (volume : Measure (UnitAddTorus d))) : + Tendsto (fun J => ∑ j ∈ Finset.range J, lpBlock hp j f) atTop (𝓝 f) := by + rw [← tendsto_add_atTop_iff_nat 1] + simpa only [sum_lpBlock] using tendsto_econvLp_Phi hp f + +/-! ### Blocks and trigonometric polynomials -/ + +/-- **The blocks are trigonometric polynomials**: `Δ_j f` has degree `< 2^(j+1)`, since +`𝓕ψ_j(m) ≠ 0` forces `deg m ≤ |m| < 2^(j+1)`. -/ +theorem lpBlock_mem_trigPolyLp (hp : p ≠ ∞) (j : ℕ) + (f : Lp ℂ p (volume : Measure (UnitAddTorus d))) : + lpBlock hp j f ∈ trigPolyLp p (2 ^ (j + 1)) := by + refine econvLp_mem_trigPolyLp hp _ (fun m hm => ?_) f + by_contra h + have h1 := Rd.norm_lt_of_fourier_psi_ne_zero h + have h2 := deg_le_norm_latticeVec m + have h3 : ((2 : ℝ) ^ (j + 1)) ≤ deg m := by exact_mod_cast hm + linarith + +/-- **High blocks of trigonometric polynomials vanish**: `Δ_j a = 0` for a trigonometric +polynomial `a` of degree `< 2^i` and `j ≥ i + #d + 1`, since `𝓕ψ_j = 0` on the ball of radius +`2^(j-1)` and `|m| ≤ #d deg m < 2^(i + #d)`. -/ +theorem lpBlock_eq_zero_of_mem (hp : p ≠ ∞) {i j : ℕ} (hij : i + Fintype.card d + 1 ≤ j) + {a : Lp ℂ p (volume : Measure (UnitAddTorus d))} (ha : a ∈ trigPolyLp p (2 ^ i)) : + lpBlock hp j a = 0 := by + obtain ⟨k, rfl⟩ : ∃ k, j = k + 1 := ⟨j - 1, by omega⟩ + refine econvLp_eq_zero_of_mem hp _ (fun m hm => Rd.fourier_psi_succ_eq_zero ?_) ha + have hcard : (Fintype.card d : ℝ) ≤ 2 ^ Fintype.card d := by + exact_mod_cast (Fintype.card d).lt_two_pow_self.le + have hdeg : (deg m : ℝ) ≤ 2 ^ i := by exact_mod_cast hm.le + calc ‖latticeVec m‖ ≤ Fintype.card d * deg m := norm_latticeVec_le m + _ ≤ 2 ^ Fintype.card d * 2 ^ i := by gcongr + _ = 2 ^ (i + Fintype.card d) := by rw [pow_add, mul_comm] + _ ≤ 2 ^ k := pow_le_pow_right₀ one_le_two (by omega) + +/-- **Blocks see only the error of trigonometric approximation**: for `j ≥ i + #d + 1`, +`‖Δ_j f‖_p ≤ 2 ‖Φ‖_1 E_{2^i}(f)_p`. -/ +theorem enorm_lpBlock_le_approxError (hp : p ≠ ∞) {i j : ℕ} (hij : i + Fintype.card d + 1 ≤ j) + (f : Lp ℂ p (volume : Measure (UnitAddTorus d))) : + ‖lpBlock hp j f‖ₑ ≤ 2 * eLpNorm (Rd.lpKernel (V := EuclideanSpace ℝ d)) 1 volume * + ((trigScheme d).toLp volume p).approxError f (2 ^ i) := by + refine ApproximationScheme.le_mul_approxError_of_forall_mem + (ENNReal.mul_ne_top (by norm_num) Rd.eLpNorm_lpKernel_ne_top) fun a ha => ?_ + have h0 : lpBlock hp j a = 0 := lpBlock_eq_zero_of_mem hp hij (mem_toLp_trigScheme_iff.1 ha) + rw [show lpBlock hp j f = lpBlock hp j (f - a) by rw [map_sub, h0, sub_zero]] + exact enorm_lpBlock_le hp j (f - a) + +/-! ### The Littlewood–Paley quasi-norm -/ + +/-- The **Littlewood–Paley quasi-norm** `‖(2^(js) ‖Δ_j f‖_p)_j‖_{ℓ_q}` on `L_p(𝕋^d)`. -/ +noncomputable def littlewoodPaleyNorm (hp : p ≠ ∞) (s : ℝ) (q : ℝ≥0∞) + (f : Lp ℂ p (volume : Measure (UnitAddTorus d))) : ℝ≥0∞ := + lqNorm q (fun j => dyadicWeight s j * ‖lpBlock hp j f‖ₑ) + +/-- **A finite Littlewood–Paley quasi-norm gives an absolutely convergent decomposition**: for +`s > 0`, `‖Δ_j f‖_p ≤ 2^(-js) ‖f‖_{LP}`, so `f = ∑_j Δ_j f` converges absolutely in +`L_p(𝕋^d)`. -/ +theorem hasSum_lpBlock (hp : p ≠ ∞) {s : ℝ} (hs : 0 < s) {q : ℝ≥0∞} (hq : 1 ≤ q) + {f : Lp ℂ p (volume : Measure (UnitAddTorus d))} (hf : littlewoodPaleyNorm hp s q f < ∞) : + HasSum (fun j => lpBlock hp j f) f := + HasSum.of_tendsto_of_lqNorm_dyadicWeight_lt_top hs hq (tendsto_sum_lpBlock hp f) hf + +/-! ### Trigonometric approximation and Littlewood–Paley blocks -/ + +/-- **The approximation norm is controlled by the Littlewood–Paley quasi-norm**: for `s > 0`, +`‖f‖^dyadic ≤ 2 · 2^s (1 - 2^(-s))⁻¹ ‖(2^(js) ‖Δ_j f‖_p)_j‖_q` for every `f ∈ L_p(𝕋^d)`, with +the scheme of trigonometric polynomials. The blocks moved up by one level, +`0, Δ_0 f, Δ_1 f, …` (`ApproximationScheme.shiftSeq 1`), lie in `𝒯_{2^k}` and form a block +decomposition (`ApproximationScheme.approxNormDyadic_le_of_hasSum`). -/ +theorem approxNormDyadic_trigScheme_le (hp : p ≠ ∞) {s : ℝ} (hs : 0 < s) {q : ℝ≥0∞} + (hq : 1 ≤ q) (f : Lp ℂ p (volume : Measure (UnitAddTorus d))) : + ((trigScheme d).toLp volume p).approxNormDyadic s q f ≤ + 2 * dyadicWeight s 1 * (1 - (2 : ℝ≥0∞) ^ (-s))⁻¹ * littlewoodPaleyNorm hp s q f := by + rcases eq_or_ne (littlewoodPaleyNorm hp s q f) ∞ with h | h + · rw [h, ENNReal.mul_top (mul_ne_zero (mul_ne_zero two_ne_zero + (ENNReal.dyadicWeight_pos s 1).ne') + (zero_lt_one.trans_le (ENNReal.one_le_one_sub_two_rpow_neg_inv s)).ne')] + exact le_top + set g := ApproximationScheme.shiftSeq 1 fun j => lpBlock hp j f + calc ((trigScheme d).toLp volume p).approxNormDyadic s q f + ≤ 2 * (1 - (2 : ℝ≥0∞) ^ (-s))⁻¹ * lqNorm q (fun k => dyadicWeight s k * ‖g k‖ₑ) := + ApproximationScheme.approxNormDyadic_le_of_hasSum hq + (ApproximationScheme.shiftSeq_mem fun j => + mem_toLp_trigScheme_iff.2 (lpBlock_mem_trigPolyLp hp j f)) + (ApproximationScheme.hasSum_shiftSeq (hasSum_lpBlock hp hs hq h.lt_top)) + _ ≤ 2 * (1 - (2 : ℝ≥0∞) ^ (-s))⁻¹ * + lqNorm q (fun j => dyadicWeight s 1 * (dyadicWeight s j * ‖lpBlock hp j f‖ₑ)) := by + gcongr + refine (ApproximationScheme.lqNorm_shiftSeq_le 1 _ s q).trans_eq ?_ + congr 1; funext j; rw [ENNReal.dyadicWeight_add_nat]; ring + _ = 2 * dyadicWeight s 1 * (1 - (2 : ℝ≥0∞) ^ (-s))⁻¹ * littlewoodPaleyNorm hp s q f := by + rw [ENNReal.lqNorm_const_mul, littlewoodPaleyNorm]; ring + +/-- **The Littlewood–Paley quasi-norm is controlled by the approximation norm**: for `s ≥ 0`, +`‖(2^(js) ‖Δ_j f‖_p)_j‖_q ≤ 2 (#d + 1) 2^((#d + 1) s) ‖Φ‖_1 ‖f‖^dyadic` for every +`f ∈ L_p(𝕋^d)`, with the scheme of trigonometric polynomials. The first `#d + 1` blocks are +bounded by `‖f‖`, the block `Δ_{j + #d + 1} f` by `E_{2^j}(f)`. -/ +theorem littlewoodPaleyNorm_le_approxNormDyadic_trigScheme (hp : p ≠ ∞) {s : ℝ} (hs : 0 ≤ s) + {q : ℝ≥0∞} (hq : 1 ≤ q) (f : Lp ℂ p (volume : Measure (UnitAddTorus d))) : + littlewoodPaleyNorm hp s q f ≤ + 2 * ((Fintype.card d : ℝ≥0∞) + 1) * dyadicWeight s (Fintype.card d + 1) * + eLpNorm (Rd.lpKernel (V := EuclideanSpace ℝ d)) 1 volume * + ((trigScheme d).toLp volume p).approxNormDyadic s q f := by + refine (ApproximationScheme.lqNorm_dyadicWeight_mul_enorm_le_approxNormDyadic + (M := Fintype.card d + 1) hs hq (by omega) (fun j _ => enorm_lpBlock_le hp j f) + fun n => enorm_lpBlock_le_approxError hp le_rfl f).trans_eq ?_ + push_cast + ring + +/-- **Besov spaces on the torus by Littlewood–Paley blocks**: for every `1 ≤ p < ∞`, `s > 0` and +`1 ≤ q ≤ ∞`, `f ∈ B^s_{p,q}(𝕋^d)` (the approximation space of the trigonometric polynomials in +`L_p`) iff `(2^(js) ‖ψ_j ⋆ f‖_p)_j ∈ ℓ_q`. -/ +theorem memBesov_iff_littlewoodPaleyNorm_lt_top (hp : p ≠ ∞) {s : ℝ} (hs : 0 < s) {q : ℝ≥0∞} + (hq : 1 ≤ q) {f : Lp ℂ p (volume : Measure (UnitAddTorus d))} : + (trigScheme d).MemBesov volume p s q f ↔ littlewoodPaleyNorm hp s q f < ∞ := by + rw [FunctionScheme.MemBesov, ApproximationScheme.memApprox_iff_approxNormDyadic_lt_top hq hs.le] + have hK : eLpNorm (Rd.lpKernel (V := EuclideanSpace ℝ d)) 1 volume < ∞ := + Rd.eLpNorm_lpKernel_lt_top + constructor + · intro h + refine (littlewoodPaleyNorm_le_approxNormDyadic_trigScheme hp hs.le hq f).trans_lt + (ENNReal.mul_lt_top (ENNReal.mul_lt_top (ENNReal.mul_lt_top (ENNReal.mul_lt_top + (by norm_num) ?_) (ENNReal.dyadicWeight_lt_top s _)) hK) h) + exact ENNReal.add_lt_top.2 ⟨ENNReal.natCast_lt_top _, ENNReal.one_lt_top⟩ + · intro h + exact (approxNormDyadic_trigScheme_le hp hs hq f).trans_lt (ENNReal.mul_lt_top + (ENNReal.mul_lt_top (ENNReal.mul_lt_top (by norm_num) (ENNReal.dyadicWeight_lt_top s 1)) + (ENNReal.one_sub_two_rpow_neg_inv_ne_top hs).lt_top) h) + +end Torus diff --git a/LeanPool/FunctionSpaces/Torus/LpBesovModuli.lean b/LeanPool/FunctionSpaces/Torus/LpBesovModuli.lean new file mode 100644 index 0000000000..3f5574c7e3 --- /dev/null +++ b/LeanPool/FunctionSpaces/Torus/LpBesovModuli.lean @@ -0,0 +1,96 @@ +/- +Copyright (c) 2026 Mario Ullrich. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Mario Ullrich +-/ +module + +public import LeanPool.FunctionSpaces.Torus.LpJackson +public import LeanPool.FunctionSpaces.MeasureSpaces.Besov.Basic +public import LeanPool.FunctionSpaces.ApproximationSpaces.Moduli + +/- +Modified for Lean Pool: module names and imports adapted. +-/ + +/-! +# Besov spaces on the torus through moduli of smoothness, for all `1 ≤ p < ∞` + +For `1 ≤ p < ∞` and an order `r ≥ 1`, the modulus of smoothness `ω_r(f, 2^(-k))_p` of +`f ∈ L_p(𝕋^d)` is compatible with the trigonometric polynomials (`Torus.lpModulusData`): + +* Jackson's inequality `E_{2^k}(f)_p ≤ 2^r C ω_r(f, 2^(-k))_p` for `k ≥ 1` + (`Torus.approxError_trigScheme_le` and the halving of the step, + `Torus.lpModulus_le_two_pow_mul_succ`); +* the inverse inequality `ω_r(a, 2^(-k))_p ≤ C 2^(-(k-j) r) ‖a‖_p` for trigonometric polynomials + of degree `< 2^j` (`Torus.lpModulus_le_of_mem_trigPolyLp`). + +Hence, for `0 < s < r` and `1 ≤ q ≤ ∞`, the Besov space `B^s_{p,q}(𝕋^d)` of the trigonometric +scheme is described by moduli of smoothness (`Torus.memBesov_iff_modNorm_lt_top_lp`): + +`f ∈ B^s_{p,q}(𝕋^d) ⟺ ‖f‖_p + ‖(2^(ks) ω_r(f, 2^(-k))_p)_k‖_{ℓ_q} < ∞`, + +with equivalent quasi-norms (`Torus.approxNormDyadic_le_modNorm_lp`, +`Torus.modNorm_le_approxNormDyadic_lp`). +-/ + +@[expose] public section + +open MeasureTheory UnitAddTorus +open scoped ENNReal TorusHaar + +open ENNReal (lqNorm dyadicWeight) + +namespace Torus + +variable {d : Type*} [Fintype d] {p : ℝ≥0∞} [Fact (1 ≤ p)] + +variable (d) in +/-- **The modulus of order `r` is compatible with the trigonometric polynomials in `L_p(𝕋^d)`**, +with inverse order `r`: Jackson's inequality from level `1` on, and the inverse inequality. -/ +noncomputable def lpModulusData (hp : p ≠ ∞) (r : ℕ) : + ApproximationScheme.ModulusData ((trigScheme d).toLp volume p) r where + modulus f k := Rd.lpModulus p r f k + add_le f g k := Rd.lpModulus_add_le r f g k + C0 := 2 ^ r + C0_ne_top := by simp + le_enorm f k := Rd.lpModulus_le r f k + jacksonStart := 1 + CJ := Rd.jacksonConst (EuclideanSpace ℝ d) r p * 2 ^ r + CJ_ne_top := ENNReal.mul_ne_top (Rd.jacksonConst_ne_top Fact.out hp r) (by simp) + jackson f k hk := by + obtain ⟨k', rfl⟩ : ∃ k', k = k' + 1 := ⟨k - 1, by omega⟩ + refine (approxError_trigScheme_le hp r k' f).trans ?_ + rw [mul_assoc] + exact mul_le_mul' le_rfl (lpModulus_le_two_pow_mul_succ r k' f) + CB := bernsteinConst d r + CB_ne_top := bernsteinConst_ne_top r + inverse _ _ _ ha := lpModulus_le_of_mem_trigPolyLp hp r (mem_toLp_trigScheme_iff.1 ha) + +/-- **The approximation quasi-norm is at most the moduli quasi-norm** on `L_p(𝕋^d)`: +`‖f‖_{A^s_q} ≤ C (‖f‖_p + ‖(2^(ks) ω_r(f, 2^(-k))_p)_k‖_{ℓ_q})`. -/ +theorem approxNormDyadic_le_modNorm_lp (hp : p ≠ ∞) (r : ℕ) {s : ℝ} {q : ℝ≥0∞} (hq : 1 ≤ q) + (f : Lp ℂ p (volume : Measure (UnitAddTorus d))) : + ((trigScheme d).toLp volume p).approxNormDyadic s q f ≤ + (lpModulusData d hp r).directConst s * (lpModulusData d hp r).modNorm s q f := + (lpModulusData d hp r).approxNormDyadic_le_modNorm hq f + +/-- **The moduli quasi-norm is at most the approximation quasi-norm** on `L_p(𝕋^d)`, for +`0 ≤ s < r`. -/ +theorem modNorm_le_approxNormDyadic_lp (hp : p ≠ ∞) {r : ℕ} {s : ℝ} (hs : 0 ≤ s) (hsr : s < r) + {q : ℝ≥0∞} (hq : 1 ≤ q) (f : Lp ℂ p (volume : Measure (UnitAddTorus d))) : + (lpModulusData d hp r).modNorm s q f ≤ + (lpModulusData d hp r).inverseConst s * + ((trigScheme d).toLp volume p).approxNormDyadic s q f := + (lpModulusData d hp r).modNorm_le_approxNormDyadic hq hs hsr f + +/-- **Besov spaces on the torus by moduli of smoothness, for all `1 ≤ p < ∞`**: for `0 < s < r` +and `1 ≤ q ≤ ∞`, `f ∈ B^s_{p,q}(𝕋^d)` (the approximation space of the trigonometric +polynomials in `L_p`) iff `‖f‖_p + ‖(2^(ks) ω_r(f, 2^(-k))_p)_k‖_{ℓ_q} < ∞`. -/ +theorem memBesov_iff_modNorm_lt_top_lp (hp : p ≠ ∞) {r : ℕ} {s : ℝ} (hs : 0 < s) (hsr : s < r) + {q : ℝ≥0∞} (hq : 1 ≤ q) (f : Lp ℂ p (volume : Measure (UnitAddTorus d))) : + (trigScheme d).MemBesov volume p s q f ↔ + ‖f‖ₑ + lqNorm q (fun k => dyadicWeight s k * Rd.lpModulus p r f k) < ∞ := + (lpModulusData d hp r).memApprox_iff_modNorm_lt_top hq hs.le hsr f + +end Torus diff --git a/LeanPool/FunctionSpaces/Torus/LpFourierCoefficients.lean b/LeanPool/FunctionSpaces/Torus/LpFourierCoefficients.lean new file mode 100644 index 0000000000..2a4f9b0757 --- /dev/null +++ b/LeanPool/FunctionSpaces/Torus/LpFourierCoefficients.lean @@ -0,0 +1,267 @@ +/- +Copyright (c) 2026 Mario Ullrich. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Mario Ullrich +-/ +module + +public import LeanPool.FunctionSpaces.Torus.LittlewoodPaley +public import LeanPool.FunctionSpaces.Analysis.Lp.Inclusion + +/- +Modified for Lean Pool: module names and imports adapted. +-/ + +/-! +# Fourier coefficients in `L_p(𝕋^d)` + +For `1 ≤ p ≤ ∞` and `m ∈ ℤ^d`, the Fourier coefficient `f ↦ f̂(m) = ∫ e_{-m} f` is a bounded +linear functional on `L_p(𝕋^d)` of norm at most `1`, since `|f̂(m)| ≤ ‖f‖_1 ≤ ‖f‖_p` on the +probability space `𝕋^d` (`Torus.coeffCLM`, `Torus.norm_coeffCLM_le`). The characters have the +coefficients `ê_k(m) = 1` for `k = m` and `0` otherwise (`Torus.mFourierCoeff_mFourierLp`). + +* **Coefficients of convolutions**: for an integrable kernel `Φ` on `ℝ^d`, + `(Φ ⋆ f)^(m) = 𝓕Φ(m) f̂(m)` (`Torus.mFourierCoeff_econvLp`, `Torus.mFourierCoeff_econv`). Both + sides are bounded functionals of `f` that agree on the characters, whose span is dense + (`Torus.ext_mFourierLp`). +* The inclusion `L_r ⊆ L_p`, `p ≤ r`, keeps the coefficients + (`Torus.mFourierCoeff_inclusionOfExponentLe`). +* **Uniqueness**: for `1 ≤ p ≤ ∞`, an element of `L_p(𝕋^d)` is determined by its Fourier + coefficients (`Torus.eq_of_mFourierCoeff_eq`). A trigonometric polynomial is the sum of its + coefficients times the characters (`Torus.eq_sum_mFourierCoeff_of_mem_trigPolyLp`). In `L_1`, + the Littlewood–Paley blocks of `f` are trigonometric polynomials with the coefficients + `𝓕ψ_j(m) f̂(m)`, and their partial sums converge to `f`; the inclusion `L_p ⊆ L_1` gives every + `p`. +-/ + +@[expose] public section + +open MeasureTheory UnitAddTorus Filter Topology +open scoped ENNReal FourierTransform TorusHaar + +namespace Torus + +variable {d : Type*} [Fintype d] + +/-! ### Coefficients of functions -/ + +/-- The Fourier coefficients see only classes: `f = g` almost everywhere gives `f̂ = ĝ`. -/ +theorem mFourierCoeff_congr_ae {f g : UnitAddTorus d → ℂ} (h : f =ᵐ[volume] g) (m : d → ℤ) : + mFourierCoeff f m = mFourierCoeff g m := + integral_congr_ae (h.mono fun t ht => by simp only [ht]) + +/-- `|e_m(t)| ≤ 1` for every character and every point of the torus. -/ +theorem norm_mFourier_apply_le (m : d → ℤ) (t : UnitAddTorus d) : ‖mFourier m t‖ ≤ 1 := + (norm_trigMonomial_apply m t).le + +/-- **The coefficient is bounded by the `L_1` norm**: `|f̂(m)| ≤ ∫ |f| = ‖f‖_1`. -/ +theorem enorm_mFourierCoeff_le_eLpNorm_one (f : UnitAddTorus d → ℂ) (m : d → ℤ) : + ‖mFourierCoeff f m‖ₑ ≤ eLpNorm f 1 volume := by + by_cases hf : AEStronglyMeasurable f volume + swap + · rw [eLpNorm_of_not_aestronglyMeasurable hf] + exact le_top + rw [eLpNorm_one_eq_lintegral_eNorm hf] + refine (eNorm_integral_le_lintegral_eNorm _).trans (lintegral_mono fun t => ?_) + rw [eNorm_smul] + calc ‖mFourier (-m) t‖ₑ * ‖f t‖ₑ ≤ 1 * ‖f t‖ₑ := by + gcongr + rw [← ofReal_norm, ENNReal.ofReal_le_one] + exact norm_mFourier_apply_le _ t + _ = ‖f t‖ₑ := one_mul _ + +variable {p : ℝ≥0∞} [Fact (1 ≤ p)] + +/-- The integrand `e_m f` of a coefficient of `f ∈ L_p(𝕋^d)` is integrable, `1 ≤ p`. -/ +theorem integrable_mFourier_smul (f : Lp ℂ p (volume : Measure (UnitAddTorus d))) (m : d → ℤ) : + Integrable (fun t => mFourier m t • f t) volume := + ((Lp.memLp f).integrable Fact.out).bdd_smul 1 (mFourier m).continuous.aestronglyMeasurable + (Eventually.of_forall fun t => norm_mFourier_apply_le m t) + +/-- **The coefficients are additive**: `(f + g)^(m) = f̂(m) + ĝ(m)` in `L_p(𝕋^d)`. -/ +theorem mFourierCoeff_add (f g : Lp ℂ p (volume : Measure (UnitAddTorus d))) (m : d → ℤ) : + mFourierCoeff ⇑(f + g) m = mFourierCoeff f m + mFourierCoeff g m := by + rw [mFourierCoeff_congr_ae (Lp.coeFn_add f g)] + simp only [mFourierCoeff, Pi.add_apply, smul_add] + exact integral_add (integrable_mFourier_smul f (-m)) (integrable_mFourier_smul g (-m)) + +omit [Fact (1 ≤ p)] in +/-- **The coefficients are homogeneous**: `(c f)^(m) = c f̂(m)` in `L_p(𝕋^d)`. -/ +theorem mFourierCoeff_smul (c : ℂ) (f : Lp ℂ p (volume : Measure (UnitAddTorus d))) + (m : d → ℤ) : mFourierCoeff ⇑(c • f) m = c * mFourierCoeff f m := by + rw [mFourierCoeff_congr_ae (Lp.coeFn_smul c f)] + simp only [mFourierCoeff, Pi.smul_apply, smul_eq_mul] + rw [← integral_const_mul] + exact integral_congr_ae (Eventually.of_forall fun t => by ring) + +/-- **The coefficient is bounded by the norm**: `|f̂(m)| ≤ ‖f‖_p` for `f ∈ L_p(𝕋^d)`, from +`|f̂(m)| ≤ ‖f‖_1` and `‖f‖_1 ≤ ‖f‖_p` on the probability space `𝕋^d`. -/ +theorem enorm_mFourierCoeff_le (f : Lp ℂ p (volume : Measure (UnitAddTorus d))) (m : d → ℤ) : + ‖mFourierCoeff f m‖ₑ ≤ ‖f‖ₑ := by + rw [Lp.eNorm_def] + exact (enorm_mFourierCoeff_le_eLpNorm_one f m).trans + (eLpNorm_le_eLpNorm_of_exponent_le Fact.out) + +/-- **The coefficient is bounded by the norm**, in real norms: `|f̂(m)| ≤ ‖f‖_p`. -/ +theorem norm_mFourierCoeff_le (f : Lp ℂ p (volume : Measure (UnitAddTorus d))) (m : d → ℤ) : + ‖mFourierCoeff f m‖ ≤ ‖f‖ := + eNorm_le_iff_norm_le.1 (enorm_mFourierCoeff_le f m) + +/-! ### The coefficient functional -/ + +variable (p) in +/-- The **coefficient functional** `f ↦ f̂(m)` on `L_p(𝕋^d)`, `1 ≤ p`, a bounded linear map of +norm at most `1`. -/ +noncomputable def coeffCLM (m : d → ℤ) : Lp ℂ p (volume : Measure (UnitAddTorus d)) →L[ℂ] ℂ := + LinearMap.mkContinuous + { toFun := fun f => mFourierCoeff f m + map_add' := fun f g => mFourierCoeff_add f g m + map_smul' := fun c f => mFourierCoeff_smul c f m } + 1 fun f => by + rw [one_mul] + exact norm_mFourierCoeff_le f m + +/-- The coefficient functional is the Fourier coefficient. -/ +@[simp] +theorem coeffCLM_apply (m : d → ℤ) (f : Lp ℂ p (volume : Measure (UnitAddTorus d))) : + coeffCLM p m f = mFourierCoeff f m := rfl + +/-- **The coefficient functional has norm at most `1`**. -/ +theorem norm_coeffCLM_le (m : d → ℤ) : ‖coeffCLM (d := d) p m‖ ≤ 1 := + LinearMap.mkContinuous_norm_le _ zero_le_one _ + +/-- `(f - g)^(m) = f̂(m) - ĝ(m)` in `L_p(𝕋^d)`. -/ +theorem mFourierCoeff_sub (f g : Lp ℂ p (volume : Measure (UnitAddTorus d))) (m : d → ℤ) : + mFourierCoeff ⇑(f - g) m = mFourierCoeff f m - mFourierCoeff g m := + map_sub (coeffCLM p m) f g + +/-- `(-f)^(m) = -f̂(m)` in `L_p(𝕋^d)`. -/ +theorem mFourierCoeff_neg (f : Lp ℂ p (volume : Measure (UnitAddTorus d))) (m : d → ℤ) : + mFourierCoeff ⇑(-f) m = -mFourierCoeff f m := + map_neg (coeffCLM p m) f + +/-- The coefficients of `0 ∈ L_p(𝕋^d)` vanish. -/ +theorem mFourierCoeff_zero (m : d → ℤ) : + mFourierCoeff ⇑(0 : Lp ℂ p (volume : Measure (UnitAddTorus d))) m = 0 := + map_zero (coeffCLM p m) + +/-- The coefficients of a finite sum in `L_p(𝕋^d)` are the sums of the coefficients. -/ +theorem mFourierCoeff_sum {ι : Type*} (s : Finset ι) + (F : ι → Lp ℂ p (volume : Measure (UnitAddTorus d))) (m : d → ℤ) : + mFourierCoeff ⇑(∑ i ∈ s, F i) m = ∑ i ∈ s, mFourierCoeff (F i) m := + map_sum (coeffCLM p m) F s + +omit [Fact (1 ≤ p)] in +/-- The coefficients of `e_k` as a continuous function: `ê_k(m) = 1` for `k = m`, `0` +otherwise, by the orthonormality of the characters (Mathlib's `mFourierBasis`). -/ +theorem mFourierCoeff_mFourier (k m : d → ℤ) : + mFourierCoeff (mFourier k) m = if k = m then 1 else 0 := by + classical + rw [← mFourierCoeff_toLp, ← mFourierBasis_repr] + have h : (ContinuousMap.toLp (E := ℂ) 2 volume ℂ (mFourier k) : + Lp ℂ 2 (volume : Measure (UnitAddTorus d))) = mFourierBasis k := by + rw [coe_mFourierBasis] + rw [h, HilbertBasis.repr_self, lp.single_apply, Pi.single_apply] + exact if_congr eq_comm rfl rfl + +/-- **The coefficients of the characters**: `ê_k(m) = 1` for `k = m` and `0` otherwise, in +`L_p(𝕋^d)`. -/ +theorem mFourierCoeff_mFourierLp (k m : d → ℤ) : + mFourierCoeff (mFourierLp p k) m = if k = m then 1 else 0 := by + rw [mFourierCoeff_congr_ae (coeFn_mFourierLp p k), mFourierCoeff_mFourier] + +/-- **The inclusion `L_r ⊆ L_p` keeps the coefficients**: for `p ≤ r` and `f ∈ L_r(𝕋^d)`, the +class of `f` in `L_p` has the Fourier coefficients of `f`. -/ +theorem mFourierCoeff_inclusionOfExponentLe {𝕜 : Type*} [NontriviallyNormedField 𝕜] + [NormedSpace 𝕜 ℂ] {r : ℝ≥0∞} [Fact (1 ≤ r)] (hpr : p ≤ r) + (f : Lp ℂ r (volume : Measure (UnitAddTorus d))) (m : d → ℤ) : + mFourierCoeff (Lp.inclusionOfExponentLe (𝕜 := 𝕜) volume hpr f) m = mFourierCoeff f m := + mFourierCoeff_congr_ae (Lp.coeFn_inclusionOfExponentLe hpr f) m + +/-! ### Coefficients of convolutions -/ + +/-- **The coefficients of a convolution**: `(Φ ⋆ f)^(m) = 𝓕Φ(m) f̂(m)` for `f ∈ L_p(𝕋^d)`, +`1 ≤ p < ∞`, and an integrable kernel `Φ` on `ℝ^d`. Both sides are bounded functionals of `f`; +on `e_k` both are `𝓕Φ(m)` for `k = m` and `0` otherwise (`Torus.econvLp_mFourierLp`). -/ +theorem mFourierCoeff_econvLp (hp : p ≠ ∞) {Φ : EuclideanSpace ℝ d → ℂ} (hΦ : Integrable Φ) + (f : Lp ℂ p (volume : Measure (UnitAddTorus d))) (m : d → ℤ) : + mFourierCoeff (econvLp hp hΦ f) m = 𝓕 Φ (latticeVec m) * mFourierCoeff f m := by + have h : (coeffCLM p m).comp (econvLp hp hΦ) = 𝓕 Φ (latticeVec m) • coeffCLM p m := + ext_mFourierLp hp fun k => by + simp only [ContinuousLinearMap.comp_apply, econvLp_mFourierLp, map_smul, smul_apply, + coeffCLM_apply, mFourierCoeff_mFourierLp, smul_eq_mul] + by_cases hk : k = m + · rw [hk] + · simp only [hk, ↓reduceIte, mul_zero] + have hf := DFunLike.congr_fun h f + simpa only [ContinuousLinearMap.comp_apply, smul_apply, coeffCLM_apply, smul_eq_mul] using hf + +/-- **The coefficients of a convolution of functions**: `(Φ ⋆ f)^(m) = 𝓕Φ(m) f̂(m)` for +measurable integrable `f` on `𝕋^d` and an integrable kernel `Φ` on `ℝ^d`, from the case `p = 1`. -/ +theorem mFourierCoeff_econv {Φ : EuclideanSpace ℝ d → ℂ} (hΦ : Integrable Φ) + {f : UnitAddTorus d → ℂ} (hf : Measurable f) (hfi : Integrable f volume) (m : d → ℤ) : + mFourierCoeff (econv Φ f) m = 𝓕 Φ (latticeVec m) * mFourierCoeff f m := by + have hF := (memLp_one_iff_integrable.2 hfi).coeFn_toLp + have h := mFourierCoeff_econvLp ENNReal.one_ne_top hΦ + ((memLp_one_iff_integrable.2 hfi).toLp f) m + rwa [mFourierCoeff_congr_ae (econvLp_apply_ae ENNReal.one_ne_top hΦ _), + mFourierCoeff_congr_ae (econv_congr_ae Φ (Lp.stronglyMeasurable _).measurable hf hF), + mFourierCoeff_congr_ae hF] at h + +/-! ### Uniqueness -/ + +/-- **Trigonometric polynomials are their Fourier series**: an element `a` of `L_p(𝕋^d)` of +degree `< n` is `∑_{deg m < n} â(m) e_m`. Both sides are linear in `a`, and they agree on the +characters that span the trigonometric polynomials. -/ +theorem eq_sum_mFourierCoeff_of_mem_trigPolyLp {n : ℕ} + {a : Lp ℂ p (volume : Measure (UnitAddTorus d))} (ha : a ∈ trigPolyLp p n) : + a = ∑ m ∈ boxLt d n, mFourierCoeff a m • mFourierLp p m := by + classical + rw [trigPolyLp_eq_span] at ha + refine (LinearMap.eqOn_span (f := LinearMap.id) + (g := ∑ m ∈ boxLt d n, (coeffCLM p m).toLinearMap.smulRight (mFourierLp p m)) ?_ ha).trans + (by simp) + rintro _ ⟨k, hk, rfl⟩ + simp only [LinearMap.id_apply, LinearMap.sum_apply, LinearMap.smulRight_apply, + ContinuousLinearMap.coe_coe, coeffCLM_apply, mFourierCoeff_mFourierLp, ite_smul, one_smul, + zero_smul, Finset.sum_ite_eq, Finset.mem_coe.1 hk, ↓reduceIte] + +/-- A trigonometric polynomial with vanishing Fourier coefficients is `0`. -/ +theorem eq_zero_of_mem_trigPolyLp {n : ℕ} {a : Lp ℂ p (volume : Measure (UnitAddTorus d))} + (ha : a ∈ trigPolyLp p n) (h : ∀ m, mFourierCoeff a m = 0) : a = 0 := by + rw [eq_sum_mFourierCoeff_of_mem_trigPolyLp ha] + simp only [h, zero_smul, Finset.sum_const_zero] + +omit [Fact (1 ≤ p)] in +/-- **An element of `L_1(𝕋^d)` with vanishing Fourier coefficients is `0`**. Every +Littlewood–Paley block `Δ_j f` is a trigonometric polynomial with the coefficients +`𝓕ψ_j(m) f̂(m) = 0`, hence `0`, and the partial sums of the blocks converge to `f` +(`Torus.tendsto_sum_lpBlock`). -/ +theorem eq_zero_of_mFourierCoeff_eq_zero_one {f : Lp ℂ 1 (volume : Measure (UnitAddTorus d))} + (h : ∀ m, mFourierCoeff f m = 0) : f = 0 := by + have hblock : ∀ j, lpBlock ENNReal.one_ne_top j f = 0 := fun j => + eq_zero_of_mem_trigPolyLp (lpBlock_mem_trigPolyLp ENNReal.one_ne_top j f) fun m => by + rw [lpBlock, mFourierCoeff_econvLp, h m, mul_zero] + have hlim := tendsto_sum_lpBlock ENNReal.one_ne_top f + simp only [hblock, Finset.sum_const_zero] at hlim + exact (tendsto_nhds_unique tendsto_const_nhds hlim).symm + +/-- **An element of `L_p(𝕋^d)` with vanishing Fourier coefficients is `0`**, `1 ≤ p ≤ ∞`. Its +class in `L_1` has the same coefficients (`Torus.mFourierCoeff_inclusionOfExponentLe`), so it is +`0` by the case `p = 1`, and the inclusion `L_p ⊆ L_1` is injective. -/ +theorem eq_zero_of_mFourierCoeff_eq_zero {f : Lp ℂ p (volume : Measure (UnitAddTorus d))} + (h : ∀ m, mFourierCoeff f m = 0) : f = 0 := by + refine Lp.inclusionOfExponentLe_injective (E := ℂ) (𝕜 := ℂ) (μ := volume) + (Fact.out : (1 : ℝ≥0∞) ≤ p) ?_ + rw [map_zero] + exact eq_zero_of_mFourierCoeff_eq_zero_one fun m => by + rw [mFourierCoeff_inclusionOfExponentLe, h m] + +/-- **Uniqueness of the Fourier coefficients**: two elements of `L_p(𝕋^d)`, `1 ≤ p ≤ ∞`, with the +same Fourier coefficients are equal. -/ +theorem eq_of_mFourierCoeff_eq {f g : Lp ℂ p (volume : Measure (UnitAddTorus d))} + (h : ∀ m, mFourierCoeff f m = mFourierCoeff g m) : f = g := + sub_eq_zero.1 (eq_zero_of_mFourierCoeff_eq_zero fun m => by + rw [mFourierCoeff_sub, h m, sub_self]) + +end Torus diff --git a/LeanPool/FunctionSpaces/Torus/LpJackson.lean b/LeanPool/FunctionSpaces/Torus/LpJackson.lean new file mode 100644 index 0000000000..70f37d93d2 --- /dev/null +++ b/LeanPool/FunctionSpaces/Torus/LpJackson.lean @@ -0,0 +1,344 @@ +/- +Copyright (c) 2026 Mario Ullrich. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Mario Ullrich +-/ +module + +public import LeanPool.FunctionSpaces.Torus.EuclideanConvolution +public import LeanPool.FunctionSpaces.Rd.Approximation.BandJackson +public import LeanPool.FunctionSpaces.Rd.Approximation.BandInverse + +/- +Modified for Lean Pool: module names and imports adapted. +-/ + +/-! +# Jackson's and Bernstein's inequalities in `L_p(𝕋^d)` + +The kernels of `ℝ^d` act on the torus by `(Φ ⋆ f)(t) = ∫ Φ(y) f(t - π y) dy` +(`Torus.econvLp`), and their Fourier transforms at the lattice points are the Fourier multipliers. +This transfers the band-limited approximation of `ℝ^d` to trigonometric polynomials, for every +`1 ≤ p < ∞`. + +**Jackson's inequality.** With the kernel `Φ` of `Rd.lpKernel` (`𝓕Φ = 0` for `|ξ| ≥ 2`, +`∫ Φ = 1`), the approximant `J_k f = ∑_{l 0` +(substitute `y = c^(-1) z`). -/ +theorem econv_dilate_apply (Φ : EuclideanSpace ℝ d → ℂ) (f : UnitAddTorus d → ℂ) {c : ℝ} + (hc : 0 < c) (t : UnitAddTorus d) : + econv (Rd.dilate c Φ) f t = ∫ z, Φ z * f (t - proj (c⁻¹ • z)) := by + have hpow : (0 : ℝ) < c ^ Module.finrank ℝ (EuclideanSpace ℝ d) := pow_pos hc _ + rw [econv] + have h : ∀ y, Rd.dilate c Φ y * f (t - proj y) = + (((c ^ Module.finrank ℝ (EuclideanSpace ℝ d) : ℝ)) : ℂ) * + (fun z => Φ z * f (t - proj (c⁻¹ • z))) (c • y) := fun y => by + simp only [Rd.dilate, inv_smul_smul₀ hc.ne'] + ring + simp_rw [h] + rw [integral_const_mul, Measure.integral_comp_smul volume + (fun z => Φ z * f (t - proj (c⁻¹ • z))) c, + abs_of_pos (inv_pos.2 hpow), Complex.real_smul, ← mul_assoc, ← Complex.ofReal_mul, + mul_inv_cancel₀ hpow.ne', Complex.ofReal_one, one_mul] + +/-- **The averaged translates are integrable**: for integrable `Φ`, `f ∈ L_1(𝕋)`, `c > 0` and +almost every `t`, `z ↦ Φ(z) f(t - π(c^(-1) z))` is integrable. -/ +theorem ae_integrable_dilate_mul {Φ : EuclideanSpace ℝ d → ℂ} (hΦ : Integrable Φ) + {f : UnitAddTorus d → ℂ} (hf : Measurable f) (hfi : Integrable f volume) {c : ℝ} + (hc : 0 < c) : ∀ᵐ t ∂volume, Integrable (fun z => Φ z * f (t - proj (c⁻¹ • z))) := by + have hpow : (0 : ℝ) < c ^ Module.finrank ℝ (EuclideanSpace ℝ d) := pow_pos hc _ + filter_upwards [ae_integrable_econv (Rd.integrable_dilate hΦ hc.ne') hf hfi] with t ht + have h2 := (ht.comp_smul (inv_ne_zero hc.ne')).const_mul + ((((c ^ Module.finrank ℝ (EuclideanSpace ℝ d))⁻¹ : ℝ)) : ℂ) + refine h2.congr (Eventually.of_forall fun z => ?_) + simp only [Rd.dilate, smul_inv_smul₀ hc.ne'] + rw [← mul_assoc, ← mul_assoc, ← Complex.ofReal_mul, inv_mul_cancel₀ hpow.ne', + Complex.ofReal_one, one_mul] + +omit [Fintype d] in +/-- **Averaged differences on the torus**: `(-1)^r Δ^r_{π(-c^(-1) z)} f(t) = +f(t) - ∑_{l by + rw [← map_nsmul, ← map_neg, ← Nat.cast_smul_eq_nsmul ℝ, inv_div, smul_smul, mul_neg, + neg_smul, div_eq_mul_inv, Nat.cast_succ] + have h := Rd.neg_one_pow_mul_sum_higherDiff_coeff r (fun l => f (t + l • proj (-c⁻¹ • z))) + rw [fwdDiff_iter_eq_sum_shift] + simp only [zsmul_eq_mul] + push_cast + rw [h] + congr 1 + · simp + · refine Finset.sum_congr rfl fun l _ => ?_ + rw [hsmul l, ← sub_eq_add_neg] + +/-! ### The Jackson approximant -/ + +variable {p : ℝ≥0∞} [Fact (1 ≤ p)] + +/-- The **Jackson approximant on the torus** `J_k f = ∑_{l + Submodule.smul_mem _ _ (econvLp_mem_trigPolyLp hp _ (fun m hm => ?_) f) + rw [Rd.fourier_dilate _ (Rd.jacksonScale_pos k l), Rd.fourier_lpKernel] + refine Rd.cutoff_eq_zero one_pos one_lt_two ?_ + have hdeg : (2 : ℝ) ^ (k + 1) ≤ ‖latticeVec m‖ := by + have h := (Nat.cast_le (α := ℝ)).2 hm + push_cast at h + exact h.trans (deg_le_norm_latticeVec m) + have hl : (1 : ℝ) ≤ (l : ℝ) + 1 := by linarith [(Nat.cast_nonneg l : (0 : ℝ) ≤ l)] + rw [norm_smul, Real.norm_of_nonneg (inv_nonneg.2 (Rd.jacksonScale_pos k l).le), Rd.jacksonScale, + inv_div, div_mul_eq_mul_div, le_div_iff₀ (by positivity)] + calc 2 * 2 ^ k = 1 * 2 ^ (k + 1) := by ring + _ ≤ ((l : ℝ) + 1) * ‖latticeVec m‖ := by gcongr + +/-- **The Jackson approximant as an averaged difference**: for almost every `t`, +`f(t) - J_k f(t) = ∫ Φ(z) (-1)^r Δ^r_{π(-2^(-k) z)} f(t) dz`. -/ +theorem ae_sub_jacksonApprox_eq (hp : p ≠ ∞) (r k : ℕ) + (f : Lp ℂ p (volume : Measure (UnitAddTorus d))) : + ⇑(f - jacksonApprox hp r k f) =ᵐ[volume] fun t => ∫ z, Rd.lpKernel z * + ((-1 : ℂ) ^ r * (fwdDiff (proj (-((2 : ℝ) ^ k)⁻¹ • z)))^[r] (f : UnitAddTorus d → ℂ) t) := by + have hfm := (Lp.stronglyMeasurable f).measurable + have hfi := (Lp.memLp f).integrable (Fact.out : 1 ≤ p) + set Φ := Rd.lpKernel (V := EuclideanSpace ℝ d) + have hJ : ⇑(jacksonApprox hp r k f) =ᵐ[volume] fun t => ∑ l ∈ Finset.range r, + Rd.jacksonCoeff r l * econv (Rd.dilate (Rd.jacksonScale k l) Φ) f t := by + unfold jacksonApprox + refine (Lp.coeFn_finsetSum _ _).trans ((eventuallyEq_sum fun l _ => + (Lp.coeFn_smul _ _).trans ((econvLp_apply_ae hp (Rd.integrable_dilate + (V := EuclideanSpace ℝ d) Rd.integrable_lpKernel (Rd.jacksonScale_pos k l).ne') + f).const_smul (Rd.jacksonCoeff r l))).trans (.of_eq ?_)) + funext t + rw [Finset.sum_apply] + exact Finset.sum_congr rfl fun l _ => by rw [Pi.smul_apply, smul_eq_mul] + have hint : ∀ᵐ t ∂volume, ∀ l ∈ Finset.range r, Integrable + (fun z => Φ z * (f : UnitAddTorus d → ℂ) (t - proj ((Rd.jacksonScale k l)⁻¹ • z))) := + (Filter.eventually_all_finset _).2 fun l _ => + ae_integrable_dilate_mul Rd.integrable_lpKernel hfm hfi (Rd.jacksonScale_pos k l) + filter_upwards [Lp.coeFn_sub f (jacksonApprox hp r k f), hJ, hint] with t h1 h2 h3 + rw [h1, Pi.sub_apply, h2] + have hsum : ∑ l ∈ Finset.range r, + Rd.jacksonCoeff r l * econv (Rd.dilate (Rd.jacksonScale k l) Φ) f t = + ∑ l ∈ Finset.range r, ∫ z, Rd.jacksonCoeff r l * + (Φ z * (f : UnitAddTorus d → ℂ) (t - proj ((Rd.jacksonScale k l)⁻¹ • z))) := + Finset.sum_congr rfl fun l _ => by + rw [econv_dilate_apply _ _ (Rd.jacksonScale_pos k l), integral_const_mul] + have hf0 : (f : UnitAddTorus d → ℂ) t = ∫ z, Φ z * (f : UnitAddTorus d → ℂ) t := by + rw [integral_mul_const, Rd.integral_lpKernel, one_mul] + rw [hsum, hf0, ← integral_finsetSum _ fun l hl => (h3 l hl).const_mul _, + ← integral_sub (Rd.integrable_lpKernel.mul_const _) + (integrable_finsetSum _ fun l hl => (h3 l hl).const_mul _)] + refine integral_congr_ae (Eventually.of_forall fun z => ?_) + simp only + rw [neg_one_pow_mul_higherDiff_proj, mul_sub, Finset.mul_sum] + congr 1 + refine Finset.sum_congr rfl fun l _ => ?_ + rw [Rd.jacksonScale] + ring + +/-! ### Jackson's inequality -/ + +/-- **Jackson's inequality on the torus**: for `f ∈ L_p(𝕋^d)`, `1 ≤ p < ∞`, +`‖f - J_k f‖_p ≤ C ω_r(f, 2^(-k))_p`, with the constant `Rd.jacksonConst` of `ℝ^d`: by the weighted +averages of `Rd.eLpNorm_integral_lpKernel_mul_le` and +`ω_r(f, 2^(-k) |z|)_p ≤ (1 + |z|)^r ω_r(f, 2^(-k))_p`. -/ +theorem enorm_sub_jacksonApprox_le (hp : p ≠ ∞) (r k : ℕ) + (f : Lp ℂ p (volume : Measure (UnitAddTorus d))) : + ‖f - jacksonApprox hp r k f‖ₑ ≤ + Rd.jacksonConst (EuclideanSpace ℝ d) r p * Rd.lpModulus p r f k := by + have hp1 : 1 ≤ p := Fact.out + have hfm : Measurable (f : UnitAddTorus d → ℂ) := (Lp.stronglyMeasurable f).measurable + set w : EuclideanSpace ℝ d → UnitAddTorus d := fun z => proj (-((2 : ℝ) ^ k)⁻¹ • z) with hw + set G : UnitAddTorus d → EuclideanSpace ℝ d → ℂ := + fun t z => (-1 : ℂ) ^ r * (fwdDiff (w z))^[r] (f : UnitAddTorus d → ℂ) t with hGdef + have hwl : ∀ l : ℕ, Measurable fun z => l • w z := fun l => + ((continuous_proj.comp (continuous_const_smul _)).nsmul l).measurable + have hG : Measurable (Function.uncurry G) := by + have heq : Function.uncurry G = fun y : UnitAddTorus d × EuclideanSpace ℝ d => + (-1 : ℂ) ^ r * ∑ l ∈ Finset.range (r + 1), + (((-1 : ℤ) ^ (r - l) * (r.choose l : ℤ) : ℤ) : ℂ) * + (f : UnitAddTorus d → ℂ) (y.1 + l • w y.2) := by + funext y + simp only [Function.uncurry, G] + rw [fwdDiff_iter_eq_sum_shift] + simp only [zsmul_eq_mul] + rw [heq] + exact measurable_const.mul (Finset.measurable_sum _ fun l _ => measurable_const.mul + (hfm.comp (measurable_fst.add ((hwl l).comp measurable_snd)))) + have hω : Rd.lpModulus p r f k ≠ ∞ := + ne_top_of_le_ne_top (ENNReal.mul_ne_top (by simp) eNorm_ne_top) (Rd.lpModulus_le r f k) + -- the differences at the step `π(-2^(-k) z)` + have hbound : ∀ z, eLpNorm (fun t => G t z) p volume ≤ + ENNReal.ofReal (1 + ‖z‖) ^ r * Rd.lpModulus p r f k := fun z => by + have hnorm : ‖w z‖ ≤ ‖z‖ * (1 / 2 ^ k) := by + refine (norm_proj_le _).trans ?_ + rw [norm_smul, norm_neg, norm_inv, Real.norm_of_nonneg (by positivity), one_div, + mul_comm] + have hD := Rd.aestronglyMeasurable_higherDiff (Lp.aestronglyMeasurable f) r (w z) + calc eLpNorm (fun t => G t z) p volume + = eLpNorm ((fwdDiff (w z))^[r] (f : UnitAddTorus d → ℂ)) p volume := by + refine eLpNorm_congr_norm_ae ((hG.comp measurable_prodMk_right).aestronglyMeasurable) + hD (Eventually.of_forall fun t => ?_) + simp [G] + _ ≤ Rd.modulus volume r p (f : UnitAddTorus d → ℂ) (‖z‖ * (1 / 2 ^ k)) := + Rd.eLpNorm_higherDiff_le_modulus hnorm + _ ≤ ENNReal.ofReal (1 + ‖z‖) ^ r * + Rd.modulus volume r p (f : UnitAddTorus d → ℂ) (1 / 2 ^ k) := + modulus_mul_le (Lp.aestronglyMeasurable f) hp1 r (norm_nonneg z) (by positivity) + have hlhs : ‖f - jacksonApprox hp r k f‖ₑ = + eLpNorm (fun t => ∫ z, Rd.lpKernel z * G t z) p volume := by + rw [Lp.eNorm_def] + exact eLpNorm_congr_ae (ae_sub_jacksonApprox_eq hp r k f) + rw [hlhs] + exact Rd.eLpNorm_integral_lpKernel_mul_le hp1 hp r hG hω hbound + +/-- **Jackson's inequality for the trigonometric polynomials**: +`E_{2^(k+1)}(f)_p ≤ C ω_r(f, 2^(-k))_p` in `L_p(𝕋^d)`. -/ +theorem approxError_trigScheme_le (hp : p ≠ ∞) (r k : ℕ) + (f : Lp ℂ p (volume : Measure (UnitAddTorus d))) : + ((trigScheme d).toLp volume p).approxError f (2 ^ (k + 1)) ≤ + Rd.jacksonConst (EuclideanSpace ℝ d) r p * Rd.lpModulus p r f k := + (ApproximationScheme.approxError_le_of_mem + (mem_toLp_trigScheme_iff.2 (jacksonApprox_mem_trigPolyLp hp r k f)) f).trans + (enorm_sub_jacksonApprox_le hp r k f) + +/-- **Halving the step**: `ω_r(f, 2^(-k))_p ≤ 2^r ω_r(f, 2^(-(k+1)))_p` on the torus +(`Torus.modulus_nat_mul_le` with `m = 2`). -/ +theorem lpModulus_le_two_pow_mul_succ (r k : ℕ) + (f : Lp ℂ p (volume : Measure (UnitAddTorus d))) : + Rd.lpModulus p r f k ≤ 2 ^ r * Rd.lpModulus p r f (k + 1) := by + have h := modulus_nat_mul_le (Lp.aestronglyMeasurable f) (Fact.out : 1 ≤ p) r (m := 2) + one_le_two (t := 1 / 2 ^ (k + 1)) (by positivity) + rw [show ((2 : ℕ) : ℝ) * (1 / 2 ^ (k + 1)) = 1 / 2 ^ k by + push_cast; rw [pow_succ]; field_simp] at h + simpa [Rd.lpModulus] using h + +/-! ### Bernstein's inequality -/ + +variable (d) in +/-- The **constant of the inverse inequality on the torus**, `2^r + (2^(#d) #d)^r ‖D^r Θ‖_1`. -/ +noncomputable def bernsteinConst (r : ℕ) : ℝ≥0∞ := + 2 ^ r + ENNReal.ofReal ((2 : ℝ) ^ Fintype.card d * Fintype.card d) ^ r * + ∫⁻ x, ‖iteratedFDeriv ℝ r (Rd.bandKernelS (V := EuclideanSpace ℝ d) : + EuclideanSpace ℝ d → ℂ) x‖ₑ + +/-- The constant of the inverse inequality is finite. -/ +theorem bernsteinConst_ne_top (r : ℕ) : bernsteinConst d r ≠ ∞ := + ENNReal.add_ne_top.2 ⟨by simp, ENNReal.mul_ne_top (ENNReal.pow_ne_top ENNReal.ofReal_ne_top) + (Rd.lintegral_enorm_iteratedFDeriv_ne_top r _)⟩ + +/-- **The band-limiting kernel reproduces trigonometric polynomials**: `Θ_{j+#d} ⋆ a = a` for `a` +of degree `< 2^j`, since `‖m‖ ≤ #d deg m < 2^(#d) 2^j` and `𝓕Θ_J = 1` on `‖ξ‖ ≤ 2^(J+1)`. -/ +theorem econvLp_Theta_eq_self (hp : p ≠ ∞) {j : ℕ} + {a : Lp ℂ p (volume : Measure (UnitAddTorus d))} (ha : a ∈ trigPolyLp p (2 ^ j)) : + econvLp hp (Rd.integrable_Theta (V := EuclideanSpace ℝ d) (j + Fintype.card d)) a = a := by + refine econvLp_eq_self_of_mem hp _ (fun m hm => Rd.fourier_Theta_eq_one ?_) ha + have hcard : (Fintype.card d : ℝ) ≤ 2 ^ Fintype.card d := by + have h := (Nat.cast_le (α := ℝ)).2 (Fintype.card d).lt_two_pow_self.le + push_cast at h + exact h + have hdeg : (deg m : ℝ) ≤ 2 ^ j := by + have h := (Nat.cast_le (α := ℝ)).2 hm.le + push_cast at h + exact h + calc ‖latticeVec m‖ ≤ Fintype.card d * deg m := norm_latticeVec_le m + _ ≤ 2 ^ Fintype.card d * 2 ^ j := by gcongr + _ = 2 ^ (j + Fintype.card d) := by rw [pow_add, mul_comm] + _ ≤ 2 ^ (j + Fintype.card d + 1) := pow_le_pow_right₀ one_le_two (Nat.le_succ _) + +/-- **The inverse inequality on the torus** (Bernstein): for a trigonometric polynomial `a` of +degree `< 2^j`, `ω_r(a, 2^(-k))_p ≤ C 2^(-(k-j) r) ‖a‖_p` (with `k - j` truncated at `0`). For +`k ≥ j` and `‖h‖ ≤ 2^(-k)`, `h = π x` with `‖x‖ ≤ #d ‖h‖`, `Δ^r_h a = (Δ^r_x Θ_J) ⋆ a`, and Young's +inequality gives `‖Δ^r_h a‖_p ≤ (2^J ‖x‖)^r ‖D^r Θ‖_1 ‖a‖_p`. -/ +theorem lpModulus_le_of_mem_trigPolyLp (hp : p ≠ ∞) (r : ℕ) {j k : ℕ} + {a : Lp ℂ p (volume : Measure (UnitAddTorus d))} (ha : a ∈ trigPolyLp p (2 ^ j)) : + Rd.lpModulus p r a k ≤ bernsteinConst d r * dyadicWeight (-(r : ℝ)) (k - j) * ‖a‖ₑ := by + rcases lt_or_ge k j with hkj | hjk + · rw [Nat.sub_eq_zero_of_le hkj.le, ENNReal.dyadicWeight_zero_right, mul_one] + exact (Rd.lpModulus_le r a k).trans (by gcongr; exact le_self_add) + · set J := j + Fintype.card d + set Θ := Rd.Theta (V := EuclideanSpace ℝ d) J + have hΘ : Integrable Θ := Rd.integrable_Theta J + have hae : (a : UnitAddTorus d → ℂ) =ᵐ[volume] econv Θ a := by + have h1 := econvLp_apply_ae hp hΘ a + rw [econvLp_Theta_eq_self hp ha] at h1 + exact h1 + have ham := (Lp.stronglyMeasurable a).measurable + have hai := (Lp.memLp a).integrable (Fact.out : 1 ≤ p) + set D := ∫⁻ x, ‖iteratedFDeriv ℝ r (Rd.bandKernelS (V := EuclideanSpace ℝ d) : + EuclideanSpace ℝ d → ℂ) x‖ₑ + set c := (2 : ℝ) ^ Fintype.card d * Fintype.card d + rw [Rd.lpModulus, Rd.modulus_congr_ae hae] + refine iSup₂_le fun h hh => ?_ + obtain ⟨x, rfl, hxn⟩ := exists_proj_eq h + have h1 : eLpNorm ((fwdDiff (proj x))^[r] (econv Θ a)) p volume ≤ + eLpNorm ((fwdDiff x)^[r] Θ) 1 volume * ‖a‖ₑ := by + rw [eLpNorm_congr_ae (higherDiff_econv_ae hΘ ham hai r x), Lp.eNorm_def, + eLpNorm_one_eq_lintegral_eNorm (Rd.integrable_higherDiff hΘ r x).aestronglyMeasurable] + exact eLpNorm_econv_le Fact.out hp (Rd.integrable_higherDiff hΘ r x) ham + have h2 : ENNReal.ofReal (2 ^ J * ‖x‖) ^ r ≤ + ENNReal.ofReal c ^ r * dyadicWeight (-(r : ℝ)) (k - j) := by + have hle : (2 : ℝ) ^ J * ‖x‖ ≤ c * (2 ^ j * ‖proj x‖) := by + calc (2 : ℝ) ^ J * ‖x‖ ≤ 2 ^ J * (Fintype.card d * ‖proj x‖) := by gcongr + _ = c * (2 ^ j * ‖proj x‖) := by rw [pow_add]; ring + calc ENNReal.ofReal (2 ^ J * ‖x‖) ^ r ≤ ENNReal.ofReal (c * (2 ^ j * ‖proj x‖)) ^ r := by + gcongr + _ = ENNReal.ofReal c ^ r * ENNReal.ofReal (2 ^ j * ‖proj x‖) ^ r := by + rw [ENNReal.ofReal_mul (by positivity), mul_pow] + _ ≤ ENNReal.ofReal c ^ r * dyadicWeight (-(r : ℝ)) (k - j) := by + gcongr + rw [← ENNReal.rpow_natCast] + exact ENNReal.ofReal_two_pow_mul_rpow_le hjk hh (Nat.cast_nonneg r) + calc eLpNorm ((fwdDiff (proj x))^[r] (econv Θ a)) p volume + ≤ ENNReal.ofReal (2 ^ J * ‖x‖) ^ r * D * ‖a‖ₑ := + h1.trans (by gcongr; exact Rd.eLpNorm_higherDiff_Theta_le r J x) + _ ≤ ENNReal.ofReal c ^ r * dyadicWeight (-(r : ℝ)) (k - j) * D * ‖a‖ₑ := by gcongr + _ = (ENNReal.ofReal c ^ r * D) * dyadicWeight (-(r : ℝ)) (k - j) * ‖a‖ₑ := by ring + _ ≤ bernsteinConst d r * dyadicWeight (-(r : ℝ)) (k - j) * ‖a‖ₑ := by + gcongr + exact le_add_self + +end Torus diff --git a/LeanPool/FunctionSpaces/Torus/LpWeakDerivatives.lean b/LeanPool/FunctionSpaces/Torus/LpWeakDerivatives.lean new file mode 100644 index 0000000000..9c167b08b9 --- /dev/null +++ b/LeanPool/FunctionSpaces/Torus/LpWeakDerivatives.lean @@ -0,0 +1,379 @@ +/- +Copyright (c) 2026 Mario Ullrich. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Mario Ullrich +-/ +module + +public import LeanPool.FunctionSpaces.Torus.LpFourierCoefficients +public import LeanPool.FunctionSpaces.Torus.WeakDerivatives +public import LeanPool.FunctionSpaces.Rd.Sobolev.DerivativeKernels + +/- +Modified for Lean Pool: module names and imports adapted. +-/ + +/-! +# Weak derivatives in `L_p(𝕋^d)` + +For directions `v = (v_0, …, v_{k-1}) ∈ (ℝ^d)^k`, the derivative `∂^v = ∂_{v_0} ⋯ ∂_{v_{k-1}}` +multiplies the Fourier coefficient of index `m ∈ ℤ^d` by the **symbol** +`σ_v(m) = ∏_l 2πi ⟪m, v_l⟫` (`Torus.lineSymbol`). So `g ∈ L_p(𝕋^d)` is the **weak derivative** +`∂^v f` of `f ∈ L_p(𝕋^d)` (`Torus.HasWeakLineDeriv`) if `ĝ(m) = σ_v(m) f̂(m)` for every `m`: +the identity `∫ g φ = (-1)^k ∫ f ∂^v φ` tested with the characters `φ = e_{-m}`, whose span is +dense in the smooth functions. + +* **Symbols**: `σ_v(-m) = (-1)^k σ_v(m)`, `|σ_v(m)| ≤ ∏_l 2π |m| |v_l|`, the symbol of + concatenated directions is the product, the coordinate directions of a multi-index `α` give + `(2πi m)^α` (`Torus.lineSymbol_coordDirs`), and `σ_v(m)` expands into the symbols of the + coordinate derivatives of order `k` (`Torus.lineSymbol_eq_sum`). +* **The calculus**: for `1 ≤ p ≤ ∞` the weak derivative is unique, linear, compatible with + composition, with limits in `L_p` and with the inclusions `L_r ⊆ L_p`, and the characters + have the derivatives `∂^v e_k = σ_v(k) e_k`. Derivatives along the coordinate directions are + the derivatives `∂^α` of `Torus.HasWeakDeriv` (`Torus.hasWeakDeriv_iff_hasWeakLineDeriv`). +* **Convolution**: for `1 ≤ p < ∞` and a Schwartz kernel `η` on `ℝ^d`, + `∂^v (η ⋆ f) = (∂^v η) ⋆ f` (`Torus.hasWeakLineDeriv_econvLp`); for every integrable kernel + `Φ`, `Φ ⋆ ∂^v f = ∂^v (Φ ⋆ f)` (`Torus.HasWeakLineDeriv.econvLp`); hence + `(∂^v η) ⋆ f = η ⋆ ∂^v f` (`Torus.econvLp_iteratedLineDerivOp`). +* **Sobolev spaces**: `f ∈ W^m_p(𝕋^d)` iff `∂^v f ∈ L_p` for all directions of order `≤ m` + (`Torus.memSobolev_iff_exists_hasWeakLineDeriv`); `W^0_p = L_p`, `W^m_p` is a linear subspace, + decreasing in `m`, and `W^m_r ⊆ W^m_p` for `p ≤ r`. +-/ + +@[expose] public section + +open MeasureTheory UnitAddTorus Filter Topology +open scoped ENNReal FourierTransform TorusHaar Real SchwartzMap LineDeriv + +namespace Torus + +variable {d : Type*} [Fintype d] + +/-! ### The symbols -/ + +/-- The **symbol** `σ_v(m) = ∏_l 2πi ⟪m, v_l⟫` of the derivative `∂^v = ∂_{v_0} ⋯ ∂_{v_{k-1}}` +along the directions `v ∈ (ℝ^d)^k`, at the lattice point `m ∈ ℤ^d`. -/ +noncomputable def lineSymbol {k : ℕ} (v : Fin k → EuclideanSpace ℝ d) (m : d → ℤ) : ℂ := + ∏ l, 2 * π * Complex.I * (inner ℝ (latticeVec m) (v l) : ℂ) + +/-- The symbol of no directions is `1`. -/ +@[simp] +theorem lineSymbol_fin_zero (v : Fin 0 → EuclideanSpace ℝ d) (m : d → ℤ) : + lineSymbol v m = 1 := by + simp [lineSymbol] + +/-- **The symbol at `-m`**: `σ_v(-m) = (-1)^k σ_v(m)` for `k` directions. -/ +theorem lineSymbol_neg {k : ℕ} (v : Fin k → EuclideanSpace ℝ d) (m : d → ℤ) : + lineSymbol v (-m) = (-1) ^ k * lineSymbol v m := by + simp only [lineSymbol, latticeVec_neg, inner_neg_left, Complex.ofReal_neg, mul_neg] + rw [Finset.prod_neg, Finset.card_univ, Fintype.card_fin] + +/-- **The size of the symbol**: `|σ_v(m)| ≤ ∏_l 2π |m| |v_l|`, by the Cauchy–Schwarz +inequality; the real-norm form of `Rd.enorm_prod_inner_le` with `R = |m|`. -/ +theorem norm_lineSymbol_le {k : ℕ} (v : Fin k → EuclideanSpace ℝ d) (m : d → ℤ) : + ‖lineSymbol v m‖ ≤ ∏ l, 2 * π * ‖latticeVec m‖ * ‖v l‖ := by + have h : ‖lineSymbol v m‖ₑ ≤ ENNReal.ofReal (2 * π * ‖latticeVec m‖) ^ k * ∏ l, ‖v l‖ₑ := + Rd.enorm_prod_inner_le v le_rfl + rw [Finset.prod_mul_distrib, Fin.prod_const, + ← ENNReal.ofReal_le_ofReal_iff (by positivity), ofReal_norm, + ENNReal.ofReal_mul (by positivity), ENNReal.ofReal_pow (by positivity), + ENNReal.ofReal_prod_of_nonneg fun l _ => norm_nonneg _] + simpa only [ofReal_norm] using h + +/-- **The symbol of concatenated directions** is the product of the symbols: +`σ_{(v, w)}(m) = σ_v(m) σ_w(m)`. -/ +theorem lineSymbol_append {k l : ℕ} (v : Fin k → EuclideanSpace ℝ d) + (w : Fin l → EuclideanSpace ℝ d) (m : d → ℤ) : + lineSymbol (Fin.append v w) m = lineSymbol v m * lineSymbol w m := by + simp only [lineSymbol, Fin.prod_univ_add, Fin.append_left, Fin.append_right] + +/-! ### Coordinate directions -/ + +/-- A fixed enumeration of the `∑_i α_i` slots of a multi-index `α ∈ ℕ^d` by +`0, …, ∑_i α_i - 1`: the slot `(i, j)`, `j < α_i`, is the `j`-th derivative in the +coordinate `i`. -/ +noncomputable def coordIndexEquiv (α : d → ℕ) : (Σ i, Fin (α i)) ≃ Fin (∑ i, α i) := + Fintype.equivFinOfCardEq (by simp) + +/-- The **coordinate directions of a multi-index** `α ∈ ℕ^d`: `α_i` copies of the unit vector +`e_i` for each coordinate `i`, so that `∂^{coordDirs α} = ∂^α`. -/ +noncomputable def coordDirs [DecidableEq d] (α : d → ℕ) : + Fin (∑ i, α i) → EuclideanSpace ℝ d := + fun l => EuclideanSpace.single ((coordIndexEquiv α).symm l).1 1 + +/-- **The coordinate directions give the symbol of `∂^α`**: `σ_{coordDirs α}(m) = (2πi m)^α`. -/ +theorem lineSymbol_coordDirs [DecidableEq d] (α : d → ℕ) (m : d → ℤ) : + lineSymbol (coordDirs α) m = derivSymbol α m := by + simp only [lineSymbol, coordDirs, inner_latticeVec_single, Complex.ofReal_intCast] + rw [(coordIndexEquiv α).symm.prod_comp + (fun s : Σ i, Fin (α i) => 2 * π * Complex.I * ((m s.1 : ℤ) : ℂ)), Fintype.prod_sigma, + derivSymbol] + simp only [Finset.prod_const, Finset.card_univ, Fintype.card_fin] + +/-- The **multiplicities** of a map `c : Fin k → d`: `coordCount c i` is the number of `l` with +`c l = i`. A word `c` of coordinates is the multi-index `coordCount c` up to order. -/ +def coordCount [DecidableEq d] {k : ℕ} (c : Fin k → d) (i : d) : ℕ := + (Finset.univ.filter fun l => c l = i).card + +/-- The multiplicities of `c : Fin k → d` add up to `k`. -/ +theorem sum_coordCount [DecidableEq d] {k : ℕ} (c : Fin k → d) : ∑ i, coordCount c i = k := by + simp only [coordCount] + rw [← Finset.card_eq_sum_card_fiberwise fun l _ => Finset.mem_univ (c l), Finset.card_univ, + Fintype.card_fin] + +/-- **A word of coordinate derivatives is `∂^α`** with `α` its multiplicities: +`∏_l 2πi m_{c_l} = (2πi m)^{coordCount c}`. -/ +theorem prod_eq_derivSymbol_coordCount [DecidableEq d] {k : ℕ} (c : Fin k → d) (m : d → ℤ) : + ∏ l, 2 * π * Complex.I * (m (c l) : ℂ) = derivSymbol (coordCount c) m := by + rw [← Finset.prod_fiberwise' Finset.univ c (fun i => 2 * π * Complex.I * (m i : ℂ)), + derivSymbol] + simp only [Finset.prod_const, coordCount] + +/-- **The symbol in coordinates**: `σ_v(m) = ∑_{c : Fin k → d} (∏_l (v_l)_{c_l}) (2πi m)^α_c` +with `α_c = coordCount c`, by expanding `∏_l ∑_i 2πi m_i (v_l)_i` (Mathlib's +`Finset.prod_univ_sum`). -/ +theorem lineSymbol_eq_sum [DecidableEq d] {k : ℕ} (v : Fin k → EuclideanSpace ℝ d) + (m : d → ℤ) : + lineSymbol v m = + ∑ c : Fin k → d, ((∏ l, v l (c l) : ℝ) : ℂ) * derivSymbol (coordCount c) m := by + have h : ∀ l, 2 * π * Complex.I * (inner ℝ (latticeVec m) (v l) : ℂ) = + ∑ i, (v l i : ℂ) * (2 * π * Complex.I * (m i : ℂ)) := fun l => by + rw [inner_latticeVec, Complex.ofReal_sum, Finset.mul_sum] + refine Finset.sum_congr rfl fun i _ => ?_ + push_cast + ring + simp only [lineSymbol, h] + rw [Finset.prod_univ_sum] + refine Finset.sum_congr rfl fun c _ => ?_ + rw [Finset.prod_mul_distrib, prod_eq_derivSymbol_coordCount, Complex.ofReal_prod] + +/-! ### Weak derivatives along directions -/ + +/-- `g ∈ L_p(𝕋^d)` is the **weak derivative** `∂^v f` of `f ∈ L_p(𝕋^d)` along the directions +`v ∈ (ℝ^d)^k`: `ĝ(m) = σ_v(m) f̂(m)` for every `m ∈ ℤ^d`. This is the integral identity +`∫ g φ = (-1)^k ∫ f ∂^v φ` tested with the trigonometric polynomials `φ`. The definition is meant +for `1 ≤ p ≤ ∞`, where every element of `L_p(𝕋^d)` is integrable and its coefficients are +integrals. It is the distributional derivative of the periodic lifts on `ℝ^d` +(`Torus.hasWeakLineDeriv_iff_comp_proj`). -/ +def HasWeakLineDeriv {p : ℝ≥0∞} {k : ℕ} (v : Fin k → EuclideanSpace ℝ d) + (f g : Lp ℂ p (volume : Measure (UnitAddTorus d))) : Prop := + ∀ m : d → ℤ, mFourierCoeff g m = lineSymbol v m * mFourierCoeff f m + +variable {p : ℝ≥0∞} {k : ℕ} {v : Fin k → EuclideanSpace ℝ d} + +/-- `f` is its own derivative along no directions. -/ +theorem hasWeakLineDeriv_fin_zero (v : Fin 0 → EuclideanSpace ℝ d) + (f : Lp ℂ p (volume : Measure (UnitAddTorus d))) : HasWeakLineDeriv v f f := fun m => by + rw [lineSymbol_fin_zero, one_mul] + +/-- **Derivatives along coordinate directions are the derivatives `∂^α`**: +`∂^{coordDirs α} f = ∂^α f`. -/ +theorem hasWeakDeriv_iff_hasWeakLineDeriv [DecidableEq d] {α : d → ℕ} + {f g : Lp ℂ p (volume : Measure (UnitAddTorus d))} : + HasWeakDeriv α f g ↔ HasWeakLineDeriv (coordDirs α) f g := by + simp only [HasWeakDeriv, HasWeakLineDeriv, lineSymbol_coordDirs] + +/-- **The weak derivatives compose**: if `g = ∂^v f` and `h = ∂^w g`, then `h = ∂^{(w, v)} f`. -/ +theorem HasWeakLineDeriv.comp {l : ℕ} {w : Fin l → EuclideanSpace ℝ d} + {f g h : Lp ℂ p (volume : Measure (UnitAddTorus d))} (hg : HasWeakLineDeriv v f g) + (hh : HasWeakLineDeriv w g h) : HasWeakLineDeriv (Fin.append w v) f h := fun m => by + rw [hh m, hg m, lineSymbol_append, mul_assoc] + +variable [Fact (1 ≤ p)] + +/-- **The weak derivative is unique** in `L_p(𝕋^d)`, `1 ≤ p ≤ ∞`, since an element of `L_p` is +determined by its Fourier coefficients (`Torus.eq_of_mFourierCoeff_eq`). -/ +theorem HasWeakLineDeriv.unique {f g g' : Lp ℂ p (volume : Measure (UnitAddTorus d))} + (hg : HasWeakLineDeriv v f g) (hg' : HasWeakLineDeriv v f g') : g = g' := + eq_of_mFourierCoeff_eq fun m => by rw [hg m, hg' m] + +/-- **The weak derivative `∂^α` is unique** in `L_p(𝕋^d)`, `1 ≤ p ≤ ∞`, since an element of +`L_p` is determined by its Fourier coefficients (`Torus.eq_of_mFourierCoeff_eq`). -/ +theorem HasWeakDeriv.unique {α : d → ℕ} {f g g' : Lp ℂ p (volume : Measure (UnitAddTorus d))} + (hg : HasWeakDeriv α f g) (hg' : HasWeakDeriv α f g') : g = g' := + eq_of_mFourierCoeff_eq fun m => by rw [hg m, hg' m] + +/-- **The weak derivative is additive**: `∂^v (f₁ + f₂) = ∂^v f₁ + ∂^v f₂`. -/ +theorem HasWeakLineDeriv.add {f₁ f₂ g₁ g₂ : Lp ℂ p (volume : Measure (UnitAddTorus d))} + (h₁ : HasWeakLineDeriv v f₁ g₁) (h₂ : HasWeakLineDeriv v f₂ g₂) : + HasWeakLineDeriv v (f₁ + f₂) (g₁ + g₂) := fun m => by + rw [mFourierCoeff_add, mFourierCoeff_add, h₁ m, h₂ m, mul_add] + +omit [Fact (1 ≤ p)] in +/-- **The weak derivative is homogeneous**: `∂^v (c f) = c ∂^v f`. -/ +theorem HasWeakLineDeriv.smul (c : ℂ) {f g : Lp ℂ p (volume : Measure (UnitAddTorus d))} + (h : HasWeakLineDeriv v f g) : HasWeakLineDeriv v (c • f) (c • g) := fun m => by + rw [mFourierCoeff_smul, mFourierCoeff_smul, h m, mul_left_comm] + +/-- **`∂^α` is additive**: `∂^α (f₁ + f₂) = ∂^α f₁ + ∂^α f₂`. -/ +theorem HasWeakDeriv.add {α : d → ℕ} {f₁ f₂ g₁ g₂ : Lp ℂ p (volume : Measure (UnitAddTorus d))} + (h₁ : HasWeakDeriv α f₁ g₁) (h₂ : HasWeakDeriv α f₂ g₂) : + HasWeakDeriv α (f₁ + f₂) (g₁ + g₂) := fun m => by + rw [mFourierCoeff_add, mFourierCoeff_add, h₁ m, h₂ m, mul_add] + +omit [Fact (1 ≤ p)] in +/-- **`∂^α` is homogeneous**: `∂^α (c f) = c ∂^α f`. -/ +theorem HasWeakDeriv.smul {α : d → ℕ} (c : ℂ) {f g : Lp ℂ p (volume : Measure (UnitAddTorus d))} + (h : HasWeakDeriv α f g) : HasWeakDeriv α (c • f) (c • g) := fun m => by + rw [mFourierCoeff_smul, mFourierCoeff_smul, h m, mul_left_comm] + +/-- `∂^v (-f) = -∂^v f`. -/ +theorem HasWeakLineDeriv.neg {f g : Lp ℂ p (volume : Measure (UnitAddTorus d))} + (h : HasWeakLineDeriv v f g) : HasWeakLineDeriv v (-f) (-g) := fun m => by + rw [mFourierCoeff_neg, mFourierCoeff_neg, h m, mul_neg] + +/-- `∂^v (f₁ - f₂) = ∂^v f₁ - ∂^v f₂`. -/ +theorem HasWeakLineDeriv.sub {f₁ f₂ g₁ g₂ : Lp ℂ p (volume : Measure (UnitAddTorus d))} + (h₁ : HasWeakLineDeriv v f₁ g₁) (h₂ : HasWeakLineDeriv v f₂ g₂) : + HasWeakLineDeriv v (f₁ - f₂) (g₁ - g₂) := fun m => by + rw [mFourierCoeff_sub, mFourierCoeff_sub, h₁ m, h₂ m, mul_sub] + +/-- **The weak derivative of a finite sum** is the sum of the weak derivatives. -/ +theorem HasWeakLineDeriv.sum {ι : Type*} (s : Finset ι) + {F G : ι → Lp ℂ p (volume : Measure (UnitAddTorus d))} + (h : ∀ i ∈ s, HasWeakLineDeriv v (F i) (G i)) : + HasWeakLineDeriv v (∑ i ∈ s, F i) (∑ i ∈ s, G i) := fun m => by + rw [mFourierCoeff_sum, mFourierCoeff_sum, Finset.mul_sum] + exact Finset.sum_congr rfl fun i hi => h i hi m + +/-- **Weak derivatives pass to limits**: if `f_i → f` and `g_i → g` in `L_p(𝕋^d)` and eventually +`g_i = ∂^v f_i`, then `g = ∂^v f`, since every Fourier coefficient is a continuous functional +(`Torus.coeffCLM`). -/ +theorem HasWeakLineDeriv.of_tendsto {ι : Type*} {l : Filter ι} [l.NeBot] + {F G : ι → Lp ℂ p (volume : Measure (UnitAddTorus d))} + {f g : Lp ℂ p (volume : Measure (UnitAddTorus d))} (hF : Tendsto F l (𝓝 f)) + (hG : Tendsto G l (𝓝 g)) (h : ∀ᶠ i in l, HasWeakLineDeriv v (F i) (G i)) : + HasWeakLineDeriv v f g := fun m => by + have hGm := ((coeffCLM p m).continuous.tendsto g).comp hG + have hFm := (((coeffCLM p m).continuous.tendsto f).comp hF).const_mul (lineSymbol v m) + refine tendsto_nhds_unique hGm (hFm.congr' (h.mono fun i hi => ?_)) + simp only [Function.comp_apply, coeffCLM_apply] + exact (hi m).symm + +/-- **The derivatives of the characters**: `∂^v e_k = σ_v(k) e_k` in `L_p(𝕋^d)`. -/ +theorem hasWeakLineDeriv_mFourierLp (v : Fin k → EuclideanSpace ℝ d) (n : d → ℤ) : + HasWeakLineDeriv v (mFourierLp (d := d) p n) (lineSymbol v n • mFourierLp p n) := + fun m => by + rw [mFourierCoeff_smul, mFourierCoeff_mFourierLp] + by_cases hn : n = m + · rw [hn] + · simp only [hn, ↓reduceIte, mul_zero] + +/-! ### Weak derivatives and convolution -/ + +/-- **The derivative of a convolution** falls on the kernel: `∂^v (η ⋆ f) = (∂^v η) ⋆ f` for +`f ∈ L_p(𝕋^d)` and every Schwartz kernel `η` on `ℝ^d`. -/ +theorem hasWeakLineDeriv_econvLp (hp : p ≠ ∞) (v : Fin k → EuclideanSpace ℝ d) + (η : 𝓢(EuclideanSpace ℝ d, ℂ)) (f : Lp ℂ p (volume : Measure (UnitAddTorus d))) : + HasWeakLineDeriv v (econvLp hp η.integrable f) (econvLp hp (∂^{v} η).integrable f) := + fun m => by + rw [mFourierCoeff_econvLp, mFourierCoeff_econvLp, ← SchwartzMap.fourier_coe, + SchwartzMap.fourier_iteratedLineDerivOp_apply, ← SchwartzMap.fourier_coe, smul_eq_mul, + lineSymbol] + ring + +/-- **Convolution keeps weak derivatives**: if `g = ∂^v f` in `L_p(𝕋^d)`, `1 ≤ p < ∞`, then +`Φ ⋆ g = ∂^v (Φ ⋆ f)` for every integrable kernel `Φ` on `ℝ^d`; both sides have the coefficients +`𝓕Φ(m) σ_v(m) f̂(m)` (`Torus.mFourierCoeff_econvLp`). -/ +theorem HasWeakLineDeriv.econvLp (hp : p ≠ ∞) {Φ : EuclideanSpace ℝ d → ℂ} (hΦ : Integrable Φ) + {f g : Lp ℂ p (volume : Measure (UnitAddTorus d))} (h : HasWeakLineDeriv v f g) : + HasWeakLineDeriv v (Torus.econvLp hp hΦ f) (Torus.econvLp hp hΦ g) := fun m => by + rw [mFourierCoeff_econvLp, mFourierCoeff_econvLp, h m, mul_left_comm] + +/-- **Derivatives move from the kernel to the function**: if `g = ∂^v f` in `L_p(𝕋^d)`, +`1 ≤ p < ∞`, then `(∂^v η) ⋆ f = η ⋆ g` for every Schwartz kernel `η` on `ℝ^d`. Both sides have +the derivative `∂^v (η ⋆ f)` (`Torus.hasWeakLineDeriv_econvLp`, `Torus.HasWeakLineDeriv.econvLp`), +which is unique. -/ +theorem econvLp_iteratedLineDerivOp (hp : p ≠ ∞) + {f g : Lp ℂ p (volume : Measure (UnitAddTorus d))} (h : HasWeakLineDeriv v f g) + (η : 𝓢(EuclideanSpace ℝ d, ℂ)) : + econvLp hp (∂^{v} η).integrable f = econvLp hp η.integrable g := + (hasWeakLineDeriv_econvLp hp v η f).unique (h.econvLp hp η.integrable) + +/-! ### Sobolev spaces -/ + +/-- **A derivative along directions from the coordinate derivatives**: if `g_c = ∂^{α_c} f` for +the multiplicities `α_c` of every word `c : Fin k → d`, then +`∑_c (∏_l (v_l)_{c_l}) g_c = ∂^v f` (`Torus.lineSymbol_eq_sum`). -/ +theorem hasWeakLineDeriv_sum_coordCount [DecidableEq d] + {f : Lp ℂ p (volume : Measure (UnitAddTorus d))} + {g : (Fin k → d) → Lp ℂ p (volume : Measure (UnitAddTorus d))} + (hg : ∀ c, HasWeakDeriv (coordCount c) f (g c)) : + HasWeakLineDeriv v f (∑ c, ((∏ l, v l (c l) : ℝ) : ℂ) • g c) := fun m => by + rw [mFourierCoeff_sum, lineSymbol_eq_sum, Finset.sum_mul] + refine Finset.sum_congr rfl fun c _ => ?_ + rw [mFourierCoeff_smul, hg c m, mul_assoc] + +/-- **Sobolev spaces through directional derivatives**: `f ∈ W^m_p(𝕋^d)` iff for every order +`k ≤ m` and all directions `v ∈ (ℝ^d)^k` the weak derivative `∂^v f` lies in `L_p`. The coordinate +directions of a multi-index give one direction (`Torus.coordDirs`); the expansion of `σ_v` into +coordinate symbols gives the other (`Torus.hasWeakLineDeriv_sum_coordCount`). -/ +theorem memSobolev_iff_exists_hasWeakLineDeriv {m : ℕ} + {f : Lp ℂ p (volume : Measure (UnitAddTorus d))} : + MemSobolev m f ↔ + ∀ k ≤ m, ∀ v : Fin k → EuclideanSpace ℝ d, ∃ g, HasWeakLineDeriv v f g := by + classical + constructor + · intro hf k hk v + have hc : ∀ c : Fin k → d, ∃ g, HasWeakDeriv (coordCount c) f g := fun c => + hf _ (by rw [sum_coordCount]; exact hk) + choose g hg using hc + exact ⟨_, hasWeakLineDeriv_sum_coordCount hg⟩ + · intro hf α hα + obtain ⟨g, hg⟩ := hf _ hα (coordDirs α) + exact ⟨g, hasWeakDeriv_iff_hasWeakLineDeriv.2 hg⟩ + +omit [Fact (1 ≤ p)] in +/-- **`W^0_p = L_p`**: every `f ∈ L_p(𝕋^d)` lies in `W^0_p(𝕋^d)`. -/ +theorem memSobolev_zero (f : Lp ℂ p (volume : Measure (UnitAddTorus d))) : MemSobolev 0 f := + fun α hα => by + have h0 : α = 0 := funext fun i => + (Finset.sum_eq_zero_iff.1 (Nat.le_zero.1 hα)) i (Finset.mem_univ i) + exact ⟨f, h0 ▸ hasWeakDeriv_zero f⟩ + +/-- **`W^m_p` is closed under addition**. -/ +theorem MemSobolev.add {m : ℕ} {f₁ f₂ : Lp ℂ p (volume : Measure (UnitAddTorus d))} + (h₁ : MemSobolev m f₁) (h₂ : MemSobolev m f₂) : MemSobolev m (f₁ + f₂) := fun α hα => by + obtain ⟨g₁, hg₁⟩ := h₁ α hα + obtain ⟨g₂, hg₂⟩ := h₂ α hα + exact ⟨g₁ + g₂, hg₁.add hg₂⟩ + +omit [Fact (1 ≤ p)] in +/-- **`W^m_p` is closed under scalar multiplication**. -/ +theorem MemSobolev.smul {m : ℕ} (c : ℂ) {f : Lp ℂ p (volume : Measure (UnitAddTorus d))} + (h : MemSobolev m f) : MemSobolev m (c • f) := fun α hα => by + obtain ⟨g, hg⟩ := h α hα + exact ⟨c • g, hg.smul c⟩ + +omit [Fact (1 ≤ p)] in +/-- **`W^m_p` decreases in `m`**: `W^m_p ⊆ W^{m'}_p` for `m' ≤ m`. -/ +theorem MemSobolev.mono_order {m m' : ℕ} (hm : m' ≤ m) + {f : Lp ℂ p (volume : Measure (UnitAddTorus d))} (h : MemSobolev m f) : MemSobolev m' f := + fun α hα => h α (hα.trans hm) + +variable {r : ℝ≥0∞} [Fact (1 ≤ r)] + +/-- **The inclusion `L_r ⊆ L_p` keeps weak derivatives**: for `p ≤ r`, if `g = ∂^v f` in `L_r`, +then the same holds for the classes in `L_p`. -/ +theorem HasWeakLineDeriv.of_inclusion (hpr : p ≤ r) + {f g : Lp ℂ r (volume : Measure (UnitAddTorus d))} (h : HasWeakLineDeriv v f g) : + HasWeakLineDeriv v (Lp.inclusionOfExponentLe (𝕜 := ℂ) volume hpr f) + (Lp.inclusionOfExponentLe (𝕜 := ℂ) volume hpr g) := fun m => by + rw [mFourierCoeff_inclusionOfExponentLe, mFourierCoeff_inclusionOfExponentLe, h m] + +/-- **The inclusion `L_r ⊆ L_p` keeps the derivatives `∂^α`**, `p ≤ r`. -/ +theorem HasWeakDeriv.of_inclusion (hpr : p ≤ r) {α : d → ℕ} + {f g : Lp ℂ r (volume : Measure (UnitAddTorus d))} (h : HasWeakDeriv α f g) : + HasWeakDeriv α (Lp.inclusionOfExponentLe (𝕜 := ℂ) volume hpr f) + (Lp.inclusionOfExponentLe (𝕜 := ℂ) volume hpr g) := fun m => by + rw [mFourierCoeff_inclusionOfExponentLe, mFourierCoeff_inclusionOfExponentLe, h m] + +/-- **`W^m_r ⊆ W^m_p` for `p ≤ r`**: the class in `L_p` of `f ∈ W^m_r(𝕋^d)` lies in +`W^m_p(𝕋^d)`. -/ +theorem MemSobolev.of_inclusion (hpr : p ≤ r) {m : ℕ} + {f : Lp ℂ r (volume : Measure (UnitAddTorus d))} (h : MemSobolev m f) : + MemSobolev m (Lp.inclusionOfExponentLe (𝕜 := ℂ) volume hpr f) := fun α hα => by + obtain ⟨g, hg⟩ := h α hα + exact ⟨_, hg.of_inclusion hpr⟩ + +end Torus diff --git a/LeanPool/FunctionSpaces/Torus/Modulus.lean b/LeanPool/FunctionSpaces/Torus/Modulus.lean new file mode 100644 index 0000000000..a61ef76832 --- /dev/null +++ b/LeanPool/FunctionSpaces/Torus/Modulus.lean @@ -0,0 +1,319 @@ +/- +Copyright (c) 2026 Mario Ullrich. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Mario Ullrich +-/ +module + +public import LeanPool.FunctionSpaces.Analysis.Differences.Differences +public import LeanPool.FunctionSpaces.Torus.Translation +public import Mathlib.Analysis.SpecialFunctions.Integrals.Basic + +/- +Modified for Lean Pool: module names and imports adapted. +-/ + +/-! +# The modulus of smoothness in `L_2(𝕋^d)` and Jackson's theorem + +The **modulus of smoothness** (of first order) of `f ∈ L_2(𝕋^d)` is + +`ω(f, t)_2 = sup_{‖h‖ ≤ t} ‖f(· + h) - f‖_2` (`Torus.modulus`, `Torus.modulus_eq_iSup`), + +the modulus of order `1` in `L_2` of `Rd.modulus` for the Haar measure on `𝕋^d`, with the sup +norm `‖h‖ = max_i ‖h_i‖` on `𝕋^d`. For every order `r` and `1 ≤ p` the modulus +`ω_r(f, t)_p` of `Rd.modulus` on the torus satisfies `ω_r(f, c t)_p ≤ (1 + c)^r ω_r(f, t)_p` +(`Torus.modulus_mul_le`). This file proves +**Jackson's theorem** + +`E_n(f)_2² ≤ d · ω(f, 1/n)_2²` (`Torus.approxError_sq_le_card_mul_modulus_sq`), + +the error of best approximation by trigonometric polynomials of degree `< n` controlled by the +modulus. The proof averages over translations in the coordinate directions: by Parseval, +`∫_0^t ‖f(· + u eᵢ) - f‖² du = ∑_k |f̂(k)|² ∫_0^t |e^(2πi kᵢ u) - 1|² du`, and the last integral, +`2t - sin(2π kᵢ t)/(π kᵢ)`, is at least `t` as soon as `|kᵢ| t ≥ 1` +(`le_integral_norm_fourier_sub_one_sq`). Choosing for each frequency the coordinate of +largest modulus gives the theorem. +-/ + +@[expose] public section + +open MeasureTheory UnitAddTorus Set +open scoped ENNReal TorusHaar lp Real + +namespace Torus + +variable {d : Type*} [Fintype d] + +/-- The **modulus of smoothness** `ω(f, t)_2 = sup_{‖h‖ ≤ t} ‖f(· + h) - f‖_2`, the modulus of +order `1` in `L_2` of `Rd.modulus` for the Haar measure on `𝕋^d`. -/ +noncomputable def modulus (f : Lp ℂ 2 (volume : Measure (UnitAddTorus d))) (t : ℝ) : ℝ≥0∞ := + Rd.modulus volume 1 2 (f : UnitAddTorus d → ℂ) t + +/-- `‖τ_h f - f‖_2 = ‖Δ_h f‖_2` for the representative of `f`. -/ +theorem enorm_translate_sub_eq (h : UnitAddTorus d) + (f : Lp ℂ 2 (volume : Measure (UnitAddTorus d))) : + ‖translate h f - f‖ₑ = eLpNorm ((fwdDiff h)^[1] (f : UnitAddTorus d → ℂ)) 2 volume := by + rw [Lp.eNorm_def, Function.iterate_one] + refine eLpNorm_congr_ae ?_ + filter_upwards [Lp.coeFn_sub (translate h f) f, coeFn_translate h f] with x h1 h2 + rw [h1, Pi.sub_apply, h2] + rfl + +/-- **The modulus through translations**: `ω(f, t)_2 = sup_{‖h‖ ≤ t} ‖τ_h f - f‖_2`. -/ +theorem modulus_eq_iSup (f : Lp ℂ 2 (volume : Measure (UnitAddTorus d))) (t : ℝ) : + modulus f t = ⨆ (h : UnitAddTorus d) (_ : ‖h‖ ≤ t), ‖translate h f - f‖ₑ := by + simp only [enorm_translate_sub_eq] + rfl + +variable {f : Lp ℂ 2 (volume : Measure (UnitAddTorus d))} + +/-- `‖τ_h f - f‖_2 ≤ ω(f, t)_2` for `‖h‖ ≤ t`. -/ +theorem enorm_translate_sub_le_modulus {t : ℝ} {h : UnitAddTorus d} (hh : ‖h‖ ≤ t) : + ‖translate h f - f‖ₑ ≤ modulus f t := by + rw [enorm_translate_sub_eq] + exact Rd.eLpNorm_higherDiff_le_modulus hh + +/-- The modulus of smoothness increases in `t`. -/ +theorem modulus_mono (f : Lp ℂ 2 (volume : Measure (UnitAddTorus d))) : Monotone (modulus f) := + Rd.modulus_mono 1 2 _ + +/-- The norm on the circle is at most the absolute value of a representative. -/ +theorem norm_coe_le_abs (u : ℝ) : ‖(u : UnitAddCircle)‖ ≤ |u| := by + simpa using QuotientAddGroup.norm_mk_le_norm (S := AddSubgroup.zmultiples (1 : ℝ)) (m := u) + +/-- Translation is an isometry of `L_2(𝕋^d)`. -/ +theorem enorm_translate (h : UnitAddTorus d) (g : Lp ℂ 2 (volume : Measure (UnitAddTorus d))) : + ‖translate h g‖ₑ = ‖g‖ₑ := by + rw [← ofReal_norm, ← ofReal_norm, translate, Lp.norm_compMeasurePreserving] + +/-- `τ_0 = id`. -/ +theorem translate_zero (g : Lp ℂ 2 (volume : Measure (UnitAddTorus d))) : translate 0 g = g := by + ext1 + filter_upwards [coeFn_translate 0 g] with x hx + rw [hx, add_zero] + +/-- `τ_{a+b} = τ_a τ_b`. -/ +theorem translate_add (a b : UnitAddTorus d) (g : Lp ℂ 2 (volume : Measure (UnitAddTorus d))) : + translate (a + b) g = translate a (translate b g) := by + ext1 + filter_upwards [coeFn_translate (a + b) g, coeFn_translate a (translate b g), + (measurePreserving_add_right volume a).quasiMeasurePreserving.ae_eq_comp + (coeFn_translate b g)] with x h1 h2 h3 + simp only [Function.comp_apply] at h3 + rw [h1, h2, h3, add_assoc] + +/-- `‖τ_{n h} f - f‖_2 ≤ n ‖τ_h f - f‖_2`, by telescoping. -/ +theorem enorm_translate_nsmul_sub_le (n : ℕ) (h : UnitAddTorus d) + (f : Lp ℂ 2 (volume : Measure (UnitAddTorus d))) : + ‖translate (n • h) f - f‖ₑ ≤ n * ‖translate h f - f‖ₑ := by + induction n with + | zero => simp [translate_zero] + | succ n ih => + rw [succ_nsmul', translate_add, ← sub_add_sub_cancel _ (translate h f), ← map_sub, + Nat.cast_succ, add_mul, one_mul] + exact (eNorm_add_le _ _).trans (add_le_add_left ((enorm_translate _ _).trans_le ih) _) + +/-- Every point of the circle has a representative `x ∈ ℝ` with `|x| = ‖u‖`. -/ +theorem exists_coe_eq_abs_eq_norm (u : UnitAddCircle) : + ∃ x : ℝ, (x : UnitAddCircle) = u ∧ |x| = ‖u‖ := by + induction u using QuotientAddGroup.induction_on with + | H y => + refine ⟨y - round y, ?_, UnitAddCircle.norm_eq.symm⟩ + rw [AddCircle.coe_sub, + (AddCircle.coe_eq_zero_iff 1 (x := ((round y : ℤ) : ℝ))).2 ⟨round y, by simp⟩, sub_zero] + +/-- **Scaling the modulus of order `r`**: `ω_r(f, m t)_p ≤ m^r ω_r(f, t)_p` on the torus for +`m ≥ 1` and `1 ≤ p`, since every `h` with `‖h‖ ≤ m t` is `m h'` with `‖h'‖ ≤ t` +(`Torus.exists_coe_eq_abs_eq_norm`, `Rd.modulus_nat_mul_le_of_forall_exists_nsmul`). -/ +theorem modulus_nat_mul_le {f : UnitAddTorus d → ℂ} (hf : AEStronglyMeasurable f volume) + {p : ℝ≥0∞} (hp : 1 ≤ p) (r : ℕ) {m : ℕ} (hm : 1 ≤ m) {t : ℝ} (ht : 0 ≤ t) : + Rd.modulus volume r p f (m * t) ≤ (m : ℝ≥0∞) ^ r * Rd.modulus volume r p f t := by + refine Rd.modulus_nat_mul_le_of_forall_exists_nsmul hf hp r fun h hh => ?_ + have hm' : (0 : ℝ) < m := by exact_mod_cast hm + choose x hx1 hx2 using fun i => exists_coe_eq_abs_eq_norm (h i) + refine ⟨fun i => ((x i / m : ℝ) : UnitAddCircle), (pi_norm_le_iff_of_nonneg ht).2 fun i => + (norm_coe_le_abs _).trans ?_, funext fun i => ?_⟩ + · rw [abs_div, Nat.abs_cast, div_le_iff₀ hm', hx2, mul_comm] + exact (norm_le_pi_norm h i).trans hh + · rw [Pi.smul_apply, ← hx1 i, ← AddCircle.coe_nsmul, nsmul_eq_mul, mul_div_cancel₀ _ hm'.ne'] + +/-- **The modulus of order `r` grows polynomially**: `ω_r(f, c t)_p ≤ (1 + c)^r ω_r(f, t)_p` on the +torus for `c, t ≥ 0` (`Torus.modulus_nat_mul_le`, `Rd.modulus_mul_le_of_nat_mul_le`). -/ +theorem modulus_mul_le {f : UnitAddTorus d → ℂ} (hf : AEStronglyMeasurable f volume) + {p : ℝ≥0∞} (hp : 1 ≤ p) (r : ℕ) {c t : ℝ} (hc : 0 ≤ c) (ht : 0 ≤ t) : + Rd.modulus volume r p f (c * t) ≤ ENNReal.ofReal (1 + c) ^ r * Rd.modulus volume r p f t := + Rd.modulus_mul_le_of_nat_mul_le hc ht fun _ hm => modulus_nat_mul_le hf hp r hm ht + +/-- `|e^(ix) - 1|² = 2 - 2 cos x`. -/ +theorem norm_exp_I_mul_sub_one_sq (x : ℝ) : + ‖Complex.exp (Complex.I * x) - 1‖ ^ 2 = 2 - 2 * Real.cos x := by + rw [Complex.norm_exp_I_mul_ofReal_sub_one, norm_mul, Real.norm_eq_abs, Real.norm_eq_abs, + mul_pow, sq_abs] + have h1 := Real.cos_two_mul (x / 2) + rw [mul_div_cancel₀ x two_ne_zero] at h1 + have h2 := Real.sin_sq_add_cos_sq (x / 2) + norm_num + nlinarith + +/-- The character `e_a` at the point `u ∈ ℝ` of the circle is `exp(2πi a u)`. -/ +theorem fourier_coe_eq_exp (a : ℤ) (u : ℝ) : + fourier a (u : UnitAddCircle) = Complex.exp (Complex.I * ((2 * π * a * u : ℝ) : ℂ)) := by + rw [fourier_coe_apply]; congr 1; push_cast; ring + +/-- `|e_a(u) - 1|² = 2 - 2 cos(2π a u)`. -/ +theorem norm_fourier_sub_one_sq (a : ℤ) (u : ℝ) : + ‖fourier a (u : UnitAddCircle) - 1‖ ^ 2 = 2 - 2 * Real.cos (2 * π * a * u) := by + rw [fourier_coe_eq_exp, norm_exp_I_mul_sub_one_sq] + +/-- `∫_0^t |e^(2πiau) - 1|² du = 2t - sin(2πat)/(πa)` for `a ≠ 0`. -/ +theorem integral_norm_fourier_sub_one_sq (a : ℤ) (ha : a ≠ 0) (t : ℝ) : + ∫ u in (0 : ℝ)..t, ‖fourier a (u : UnitAddCircle) - 1‖ ^ 2 = + 2 * t - Real.sin (2 * π * a * t) / (π * a) := by + have ha' : (a : ℝ) ≠ 0 := by exact_mod_cast ha + have hc : 2 * π * (a : ℝ) ≠ 0 := by positivity + simp_rw [norm_fourier_sub_one_sq] + have hcos : Continuous fun u : ℝ => 2 * Real.cos (2 * π * a * u) := by fun_prop + rw [intervalIntegral.integral_sub intervalIntegrable_const (hcos.intervalIntegrable _ _), + intervalIntegral.integral_const, intervalIntegral.integral_const_mul, + intervalIntegral.integral_comp_mul_left (fun x => Real.cos x) hc, integral_cos] + simp only [sub_zero, smul_eq_mul, mul_zero, Real.sin_zero] + field_simp + +/-- **The averaged multiplier is large at high frequencies**: for `|a| t ≥ 1`, +`t ≤ ∫_0^t |e^(2πiau) - 1|² du`. -/ +theorem le_integral_norm_fourier_sub_one_sq (a : ℤ) {t : ℝ} (hat : 1 ≤ |(a : ℝ)| * t) : + t ≤ ∫ u in (0 : ℝ)..t, ‖fourier a (u : UnitAddCircle) - 1‖ ^ 2 := by + have ha : a ≠ 0 := by rintro rfl; simp at hat; linarith + have ha' : 0 < |(a : ℝ)| := abs_pos.2 (by exact_mod_cast ha) + rw [integral_norm_fourier_sub_one_sq a ha t] + have hsin : |Real.sin (2 * π * a * t) / (π * a)| ≤ t := by + rw [abs_div, abs_mul, abs_of_pos Real.pi_pos, div_le_iff₀ (by positivity)] + calc |Real.sin (2 * π * a * t)| ≤ 1 := Real.abs_sin_le_one _ + _ ≤ |(a : ℝ)| * t := hat + _ ≤ t * (π * |(a : ℝ)|) := by nlinarith [Real.one_le_pi_div_two] + have := le_abs_self (Real.sin (2 * π * a * t) / (π * a)) + linarith + +/-- The averaged multiplier in `ℝ≥0∞`, over `(0, t]`. -/ +theorem ofReal_le_lintegral_enorm_fourier_sub_one_sq (a : ℤ) {t : ℝ} (ht : 0 ≤ t) + (hat : 1 ≤ |(a : ℝ)| * t) : + ENNReal.ofReal t ≤ ∫⁻ u in Ioc 0 t, ‖fourier a (u : UnitAddCircle) - 1‖ₑ ^ 2 := by + have hcont : Continuous fun u : ℝ => ‖fourier a (u : UnitAddCircle) - 1‖ ^ 2 := + (((fourier a).continuous.comp continuous_quotient_mk').sub continuous_const).norm.pow 2 + have hint : IntegrableOn (fun u : ℝ => ‖fourier a (u : UnitAddCircle) - 1‖ ^ 2) (Ioc 0 t) := + (hcont.integrableOn_Icc).mono_set Ioc_subset_Icc_self + have heq : (fun u : ℝ => ‖fourier a (u : UnitAddCircle) - 1‖ₑ ^ 2) = + fun u : ℝ => ENNReal.ofReal (‖fourier a (u : UnitAddCircle) - 1‖ ^ 2) := by + funext u; rw [← ofReal_norm, ENNReal.ofReal_pow (norm_nonneg _)] + rw [heq, ← ofReal_integral_eq_lintegral_ofReal hint (Filter.Eventually.of_forall fun _ => by + positivity), + ← intervalIntegral.integral_of_le ht] + exact ENNReal.ofReal_le_ofReal (le_integral_norm_fourier_sub_one_sq a hat) + +/-- On a coordinate axis, `e_k(u eᵢ) = e^(2πi kᵢ u)`. -/ +theorem mFourier_single [DecidableEq d] (k : d → ℤ) (i : d) (u : UnitAddCircle) : + mFourier k (Pi.single i u) = fourier (k i) u := by + simp only [mFourier, ContinuousMap.coe_mk] + rw [Finset.prod_eq_single i (fun j _ hj => by simp [Pi.single_eq_of_ne hj]) (by simp)] + simp + +/-- The error of best approximation is at most the tail of the Fourier series: +`E_n(f)_2² ≤ ∑_{deg k ≥ n} |f̂(k)|²`. -/ +theorem approxError_sq_le_tsum (n : ℕ) (f : Lp ℂ 2 (volume : Measure (UnitAddTorus d))) : + ((trigScheme d).toLp volume 2).approxError f n ^ 2 ≤ + ∑' k, if n ≤ deg k then ‖mFourierCoeff f k‖ₑ ^ 2 else 0 := by + rw [toLp_trigScheme_eq] + have h1 := (fourierScheme d).projectionScheme.approxError_le_enorm_sub n f + refine (pow_le_pow_left₀ bot_le h1 2).trans (le_of_eq ?_) + rw [SpectralScheme.projectionScheme_P, ← mFourierBasis.repr.eNorm_map, + lp.enorm_sq_eq_tsum] + congr 1; funext k + change ‖(fourierScheme d).basis.repr (f - (fourierScheme d).truncate n f) k‖ₑ ^ 2 = _ + rw [SpectralScheme.repr_sub_truncate] + change (‖if deg k < n then 0 else mFourierBasis.repr f k‖ₑ) ^ 2 = _ + rw [mFourierBasis_repr] + split_ifs with h1 h2 h2 + · omega + · simp + · rfl + · omega + +/-- **Jackson's theorem in `L_2(𝕋^d)`**: `E_n(f)_2² ≤ d · ω(f, 1/n)_2²` for `n ≥ 1`. -/ +theorem approxError_sq_le_card_mul_modulus_sq {n : ℕ} (hn : 1 ≤ n) + (f : Lp ℂ 2 (volume : Measure (UnitAddTorus d))) : + ((trigScheme d).toLp volume 2).approxError f n ^ 2 ≤ + (Fintype.card d : ℝ≥0∞) * modulus f (1 / n) ^ 2 := by + classical + set t : ℝ := 1 / n + have ht : 0 < t := by positivity + set ω := modulus f t + set c : (d → ℤ) → ℝ≥0∞ := fun k => ‖mFourierCoeff f k‖ₑ ^ 2 + set I : d → (d → ℤ) → ℝ≥0∞ := fun i k => + ∫⁻ u in Ioc 0 t, ‖fourier (k i) (u : UnitAddCircle) - 1‖ₑ ^ 2 + -- averaging in one coordinate direction + have hdir : ∀ i, ∑' k, c k * I i k ≤ ω ^ 2 * ENNReal.ofReal t := by + intro i + have hmeas : ∀ k, AEMeasurable + (fun u : ℝ => ‖fourier (k i) (u : UnitAddCircle) - 1‖ₑ ^ 2 * c k) + (volume.restrict (Ioc 0 t)) := fun k => + (Measurable.mul_const ((((fourier (k i)).continuous.comp continuous_quotient_mk').sub + continuous_const).measurable.eNorm.pow_const 2) _).aemeasurable + calc ∑' k, c k * I i k + = ∫⁻ u in Ioc 0 t, ∑' k, ‖fourier (k i) (u : UnitAddCircle) - 1‖ₑ ^ 2 * c k := by + rw [lintegral_tsum hmeas] + congr 1; funext k + rw [lintegral_mul_const' _ _ (ENNReal.pow_ne_top eNorm_ne_top), mul_comm] + _ = ∫⁻ u in Ioc 0 t, ‖translate (Pi.single i (u : UnitAddCircle)) f - f‖ₑ ^ 2 := by + congr 1; funext u + rw [enorm_translate_sub_sq] + simp_rw [mFourier_single] + rfl + _ ≤ ∫⁻ _u in Ioc 0 t, ω ^ 2 := by + refine setLIntegral_mono measurable_const fun u hu => ?_ + gcongr + refine enorm_translate_sub_le_modulus ?_ + rw [Pi.norm_single] + exact (norm_coe_le_abs u).trans (by rw [abs_of_pos hu.1]; exact hu.2) + _ = ω ^ 2 * ENNReal.ofReal t := by + rw [setLIntegral_const, Real.volume_Ioc, sub_zero] + -- each frequency of degree `≥ n` is seen by one coordinate + have hfreq : ∀ k, (if n ≤ deg k then ENNReal.ofReal t * c k else 0) ≤ c k * ∑ i, I i k := by + intro k + split_ifs with hk + · have hne : (Finset.univ : Finset d).Nonempty := by + by_contra h + rw [Finset.not_nonempty_iff_eq_empty] at h + have : deg k = 0 := by simp [deg, h] + omega + obtain ⟨i, -, hi⟩ := Finset.exists_mem_eq_sup _ hne fun i => (k i).natAbs + have hat : 1 ≤ |((k i : ℤ) : ℝ)| * t := by + rw [← Int.cast_abs, ← Int.natCast_natAbs] + have : (n : ℝ) ≤ (k i).natAbs := by + have := hk; rw [deg, hi] at this; exact_mod_cast this + simp only [t] + rw [mul_one_div, le_div_iff₀ (by positivity), one_mul] + exact this + calc ENNReal.ofReal t * c k = c k * ENNReal.ofReal t := mul_comm _ _ + _ ≤ c k * I i k := by gcongr; exact ofReal_le_lintegral_enorm_fourier_sub_one_sq _ ht.le hat + _ ≤ c k * ∑ i, I i k := by + gcongr; exact Finset.single_le_sum (f := fun j => I j k) (fun _ _ => bot_le) + (Finset.mem_univ i) + · exact bot_le + have hsum : ENNReal.ofReal t * ∑' k, (if n ≤ deg k then c k else 0) ≤ + ENNReal.ofReal t * ((Fintype.card d : ℝ≥0∞) * ω ^ 2) := by + calc ENNReal.ofReal t * ∑' k, (if n ≤ deg k then c k else 0) + = ∑' k, (if n ≤ deg k then ENNReal.ofReal t * c k else 0) := by + rw [← ENNReal.tsum_mul_left]; congr 1; funext k; split_ifs <;> simp + _ ≤ ∑' k, c k * ∑ i, I i k := tsum_le_tsum hfreq + _ = ∑ i, ∑' k, c k * I i k := by + simp_rw [Finset.mul_sum] + exact (Summable.tsum_finsetSum fun _ _ => CompleteLattice.summable) + _ ≤ ∑ _i : d, ω ^ 2 * ENNReal.ofReal t := Finset.sum_le_sum fun i _ => hdir i + _ = ENNReal.ofReal t * ((Fintype.card d : ℝ≥0∞) * ω ^ 2) := by + rw [Finset.sum_const, Finset.card_univ, nsmul_eq_mul]; ring + have hcancel := (ENNReal.mul_le_mul_iff_right (ENNReal.ofReal_pos.2 ht).ne' + ENNReal.ofReal_ne_top).1 hsum + exact (approxError_sq_le_tsum n f).trans hcancel + +end Torus diff --git a/LeanPool/FunctionSpaces/Torus/NTermFourier.lean b/LeanPool/FunctionSpaces/Torus/NTermFourier.lean new file mode 100644 index 0000000000..6966fa7aec --- /dev/null +++ b/LeanPool/FunctionSpaces/Torus/NTermFourier.lean @@ -0,0 +1,61 @@ +/- +Copyright (c) 2026 Mario Ullrich. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Mario Ullrich +-/ +module + +public import LeanPool.FunctionSpaces.Torus.HaarMeasure +public import LeanPool.FunctionSpaces.ApproximationSpaces.Instances.NTermHilbertBasis + +/- +Modified for Lean Pool: module names and imports adapted. +-/ + +/-! +# `n`-term trigonometric approximation + +The trigonometric monomials `e_k(x) = exp(2πi ⟨k, x⟩)`, `k ∈ ℤ^d`, form Mathlib's Hilbert basis +of `L_2(𝕋^d)` (`UnitAddTorus.mFourierBasis`), with the Fourier coefficients `f̂(k)` as +coefficients (`UnitAddTorus.mFourierBasis_repr`). Best `n`-term approximation from this basis +approximates `f` by combinations `∑_{k ∈ Λ} c_k e_k` of at most `n` monomials, with frequencies +`Λ` chosen for each `f`. The theorem of Stechkin and DeVore for Hilbert bases +(`HilbertBasis.memApprox_nTerm_iff`) describes its approximation spaces by the Fourier +coefficients: for `0 < τ < 2` and `θ = 1/τ - 1/2`, + +`f ∈ A^θ_τ(L_2(𝕋^d), n-term) ⟺ ∑_{k ∈ ℤ^d} |f̂(k)|^τ < ∞` (`Torus.memApprox_nTerm_iff`). + +For `τ = 1` the right side says that the Fourier series of `f` converges absolutely, Stechkin's +original setting. Linear approximation by the trigonometric polynomials of degree `< n` leads +instead to conditions on the sizes `(1 + max_i |k_i|)^s |f̂(k)|`, with the frequencies ordered by +degree, such as the Sobolev spaces `H^s(𝕋^d)` of `Torus.sobolevSpace`. +-/ + +@[expose] public section + +open MeasureTheory UnitAddTorus ApproximationScheme +open scoped ENNReal TorusHaar + +namespace Torus + +variable {d : Type*} [Fintype d] + +/-- **`n`-term trigonometric approximation in `L_2(𝕋^d)`**: for `0 < τ < 2` and +`θ = 1/τ - 1/2`, `f ∈ L_2(𝕋^d)` lies in the approximation space `A^θ_τ` of `n`-term +approximation from the Fourier basis, the dictionary of the multiples `c e_k`, iff its Fourier +coefficients lie in `ℓ_τ`, `∑_{k ∈ ℤ^d} |f̂(k)|^τ < ∞`. This is the theorem of Stechkin and +DeVore (`HilbertBasis.memApprox_nTerm_iff`) for Mathlib's Fourier basis, whose coefficients are +the Fourier coefficients (`UnitAddTorus.mFourierBasis_repr`). For `τ < 1` the space is only +quasi-normed, and the condition is stronger than absolute convergence of the Fourier series; +for `τ = 1` it is absolute convergence, Stechkin's theorem. Linear approximation by +trigonometric polynomials of degree `< n` gives instead weighted `ℓ_2` conditions on the +coefficients, such as the Sobolev spaces of `Torus.sobolevSpace`. -/ +theorem memApprox_nTerm_iff {τ : ℝ} (hτ0 : 0 < τ) (hτ2 : τ < 2) + (f : Lp ℂ 2 (volume : Measure (UnitAddTorus d))) : + (nTerm (mFourierBasis (d := d)).coeffDictionary).MemApprox (1 / τ - 1 / 2) + (ENNReal.ofReal τ) f ↔ ∑' k, ‖mFourierCoeff f k‖ₑ ^ τ < ∞ := by + have h := mFourierBasis.memApprox_nTerm_iff hτ0 hτ2 f + simp only [mFourierBasis_repr] at h + exact h + +end Torus diff --git a/LeanPool/FunctionSpaces/Torus/Nikolskii.lean b/LeanPool/FunctionSpaces/Torus/Nikolskii.lean new file mode 100644 index 0000000000..2e9df49101 --- /dev/null +++ b/LeanPool/FunctionSpaces/Torus/Nikolskii.lean @@ -0,0 +1,234 @@ +/- +Copyright (c) 2026 Mario Ullrich. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Mario Ullrich +-/ +module + +public import LeanPool.FunctionSpaces.Torus.TrigPolynomials +public import LeanPool.FunctionSpaces.MeasureSpaces.Besov.Nikolskii +public import Mathlib.Algebra.Order.Chebyshev + +/- +Modified for Lean Pool: module names and imports adapted. +-/ + +/-! +# The Nikolskii inequality for trigonometric polynomials + +For a trigonometric polynomial `T` of degree `< n` on `𝕋^d`, `n ≥ 1`, and `1 ≤ p < ∞`, + +`‖T‖_∞ ≤ (2m)^(d/p) n^(d/p) ‖T‖_p`, `m = ⌈p/2⌉` + +(`Torus.norm_le_rpow_mul_eLpNorm`), so the scheme of trigonometric polynomials has the +Nikolskii property of dimension `d` (`Torus.trigScheme_hasNikolskii`). + +**Proof without kernels.** +1. *`p = 2`*: write `T = ∑ c_k e_k` over the at most `(2n)^d` frequencies of degree `< n`. + Then `|T(x)| ≤ ∑ |c_k| ≤ ((2n)^d)^(1/2) (∑ |c_k|²)^(1/2) = ((2n)^d)^(1/2) ‖T‖_2` by the + Cauchy–Schwarz inequality and Parseval's identity (orthonormality of the `e_k` in `L_2`, + Mathlib's `UnitAddTorus.orthonormal_mFourier`). +2. *The power trick*: `T^m` is a trigonometric polynomial of degree `< m n`, so by step 1 + `‖T‖_∞^(2m) = ‖T^m‖_∞² ≤ (2mn)^d ‖T^m‖_2² = (2mn)^d ∫ |T|^(2m) ≤ (2mn)^d ‖T‖_∞^(2m-p) ‖T‖_p^p` + for `2m ≥ p`; dividing by `‖T‖_∞^(2m-p)` gives `‖T‖_∞^p ≤ (2mn)^d ‖T‖_p^p`. + +The usual proof uses the de la Vallée Poussin kernel and gives a constant independent of `p`; +the power trick avoids all kernels at the price of the factor `(2m)^(d/p)`, which is bounded +by `3^d` for `p ≥ 1`. Only the order `n^(d/p)` matters for the embedding theorems. +-/ + +@[expose] public section + +open MeasureTheory UnitAddTorus +open scoped ENNReal BoundedContinuousFunction TorusHaar InnerProductSpace + +namespace Torus + +variable {d : Type*} [Fintype d] + +/-- The `L_p` class of a trigonometric monomial is Mathlib's `L_p` Fourier monomial. -/ +theorem toLp_trigMonomial (p : ℝ≥0∞) [Fact (1 ≤ p)] (k : d → ℤ) : + BoundedContinuousFunction.toLp (E := ℂ) p volume ℂ (trigMonomial k) = mFourierLp p k := + rfl + +/-- A trigonometric polynomial of degree `< n` is a combination of the monomials of degree +`< n`. -/ +theorem exists_sum_of_mem_trigPoly {n : ℕ} {T : UnitAddTorus d →ᵇ ℂ} (hT : T ∈ trigPoly d n) : + ∃ t : Finset (d → ℤ), t ⊆ boxLt d n ∧ ∃ c : (d → ℤ) → ℂ, + T = ∑ k ∈ t, c k • trigMonomial k := by + classical + obtain ⟨t, ht, c, hc⟩ := (Submodule.mem_span_image_iff_exists_fun ℂ).1 hT + refine ⟨t, by exact_mod_cast ht, fun k => if hk : k ∈ t then c ⟨k, hk⟩ else 0, ?_⟩ + rw [← hc, ← Finset.sum_coe_sort t] + refine Finset.sum_congr rfl fun k _ => ?_ + simp + +/-- **Parseval for trigonometric polynomials**: `‖∑ c_k e_k‖_2² = ∑ |c_k|²` (Mathlib's +`OrthogonalFamily.norm_sum` for the orthonormal characters). -/ +theorem norm_toLp_sum_sq (t : Finset (d → ℤ)) (c : (d → ℤ) → ℂ) : + ‖BoundedContinuousFunction.toLp (E := ℂ) 2 volume ℂ (∑ k ∈ t, c k • trigMonomial k)‖ ^ 2 = + ∑ k ∈ t, ‖c k‖ ^ 2 := by + have hsum : BoundedContinuousFunction.toLp (E := ℂ) 2 volume ℂ (∑ k ∈ t, c k • trigMonomial k) + = ∑ k ∈ t, c k • mFourierLp 2 k := by + rw [map_sum]; simp_rw [map_smul, toLp_trigMonomial] + rw [hsum] + exact orthonormal_mFourier.orthogonalFamily.norm_sum c t + +/-- **The Nikolskii inequality from `L_2` to `L_∞`**: for a trigonometric polynomial of degree +`< n`, `‖T‖_∞² ≤ (2n)^d ‖T‖_2²`. -/ +theorem norm_sq_le_card_mul_norm_toLp_sq {n : ℕ} {T : UnitAddTorus d →ᵇ ℂ} + (hT : T ∈ trigPoly d n) : + ‖T‖ ^ 2 ≤ ((2 * n) ^ Fintype.card d : ℕ) * + ‖BoundedContinuousFunction.toLp (E := ℂ) 2 volume ℂ T‖ ^ 2 := by + obtain ⟨t, ht, c, rfl⟩ := exists_sum_of_mem_trigPoly hT + rw [norm_toLp_sum_sq] + have hcard : (t.card : ℝ) ≤ ((2 * n) ^ Fintype.card d : ℕ) := by + exact_mod_cast (Finset.card_le_card ht).trans (card_boxLt_le n) + have hsup : ‖∑ k ∈ t, c k • trigMonomial k‖ ≤ ∑ k ∈ t, ‖c k‖ := by + refine (BoundedContinuousFunction.norm_le (Finset.sum_nonneg fun _ _ => norm_nonneg _)).2 + fun x => ?_ + calc ‖(∑ k ∈ t, c k • trigMonomial k) x‖ = ‖∑ k ∈ t, c k * trigMonomial k x‖ := by + simp + _ ≤ ∑ k ∈ t, ‖c k * trigMonomial k x‖ := norm_sum_le _ _ + _ = ∑ k ∈ t, ‖c k‖ := Finset.sum_congr rfl fun k _ => by + rw [norm_mul, norm_trigMonomial_apply, mul_one] + calc ‖∑ k ∈ t, c k • trigMonomial k‖ ^ 2 ≤ (∑ k ∈ t, ‖c k‖) ^ 2 := by + gcongr + _ ≤ t.card * ∑ k ∈ t, ‖c k‖ ^ 2 := sq_sum_le_card_mul_sum_sq + _ ≤ _ := by gcongr + +/-- For a bounded continuous function, `‖T‖^m ≤ ‖T^m‖` (in fact equality holds). -/ +theorem norm_pow_le_norm_pow {α : Type*} [TopologicalSpace α] (T : α →ᵇ ℂ) {m : ℕ} + (hm : m ≠ 0) : ‖T‖ ^ m ≤ ‖T ^ m‖ := by + have hA := norm_nonneg (T ^ m) + have hT : ‖T‖ ≤ ‖T ^ m‖ ^ ((m : ℝ)⁻¹) := + (BoundedContinuousFunction.norm_le (Real.rpow_nonneg hA _)).2 fun x => by + have h1 : ‖T x‖ ^ m ≤ ‖T ^ m‖ := by + rw [← norm_pow] + simpa [FunLike.coe_pow] using (T ^ m).norm_coe_le_norm x + calc ‖T x‖ = (‖T x‖ ^ m) ^ ((m : ℝ)⁻¹) := (Real.pow_rpow_inv_natCast (norm_nonneg _) hm).symm + _ ≤ ‖T ^ m‖ ^ ((m : ℝ)⁻¹) := Real.rpow_le_rpow (by positivity) h1 (by positivity) + calc ‖T‖ ^ m ≤ (‖T ^ m‖ ^ ((m : ℝ)⁻¹)) ^ m := pow_le_pow_left₀ (norm_nonneg _) hT m + _ = ‖T ^ m‖ := Real.rpow_inv_natCast_pow hA hm + +/-- The `L_2` norm of `T^m` is the `m`-th power of the `L_{2m}` norm of `T`. -/ +theorem norm_toLp_two_pow (T : UnitAddTorus d →ᵇ ℂ) {m : ℕ} (hm : m ≠ 0) : + ‖BoundedContinuousFunction.toLp (E := ℂ) 2 volume ℂ (T ^ m)‖ = + (eLpNorm T (2 * m) volume).toReal ^ m := by + rw [BoundedContinuousFunction.norm_toLp_eq_toReal_eLpNorm] + have hT := T.continuous.aestronglyMeasurable (μ := volume) + have hm0 : (0 : ℝ) < m := by exact_mod_cast Nat.pos_of_ne_zero hm + have h1 : eLpNorm (⇑(T ^ m)) 2 volume = eLpNorm (fun x => ‖T x‖ ^ (m : ℝ)) 2 volume := + eLpNorm_congr_norm_ae (T ^ m).continuous.aestronglyMeasurable + (T.continuous.norm.measurable.pow_const _).aestronglyMeasurable + (Filter.Eventually.of_forall fun x => by simp [Real.rpow_natCast]) + rw [h1, eLpNorm_norm_rpow _ hT hm0, ENNReal.ofReal_natCast, ENNReal.rpow_natCast, + ENNReal.toReal_pow] + +/-- **The Nikolskii inequality from `L_p` to `L_∞`** for trigonometric polynomials: for +`T` of degree `< n`, `1 ≤ p < ∞` and `m = ⌈p/2⌉`, +`‖T‖_∞^p ≤ (2mn)^d ‖T‖_p^p`. -/ +theorem norm_rpow_le_card_mul_eLpNorm_rpow {n : ℕ} {T : UnitAddTorus d →ᵇ ℂ} + (hT : T ∈ trigPoly d n) {p : ℝ≥0∞} (hp : 1 ≤ p) (hp' : p ≠ ∞) : + ‖T‖ ^ p.toReal ≤ ((2 * (⌈p.toReal / 2⌉₊ * n)) ^ Fintype.card d : ℕ) * + (eLpNorm T p volume).toReal ^ p.toReal := by + set P := p.toReal + have hP1 : 1 ≤ P := ENNReal.one_le_toReal_of_one_le hp hp' + have hP0 : 0 < P := zero_lt_one.trans_le hP1 + set m := ⌈P / 2⌉₊ + have hm0 : m ≠ 0 := by + have : 0 < P / 2 := by positivity + exact (Nat.ceil_pos.2 this).ne' + have hmP : P ≤ 2 * m := by + have := Nat.le_ceil (P / 2); linarith + set K : ℝ := (((2 * (m * n)) ^ Fintype.card d : ℕ) : ℝ) + have hK : 0 ≤ K := Nat.cast_nonneg _ + set N := (eLpNorm T p volume).toReal + have hN : 0 ≤ N := ENNReal.toReal_nonneg + set X := (eLpNorm T (2 * m) volume).toReal + -- `T^m` is a trigonometric polynomial of degree `< m n` + have hS : T ^ m ∈ trigPoly d (m * n) := by + obtain ⟨m', hm'⟩ := Nat.exists_eq_succ_of_ne_zero hm0 + rw [hm'] + exact pow_mem_trigPoly hT m' + -- interpolation between `L_p` and `L_∞` at the exponent `2m` + have h2m : p ≤ (2 * m : ℝ≥0∞) := by + rw [← ENNReal.ofReal_toReal hp'] + calc ENNReal.ofReal P ≤ ENNReal.ofReal (2 * m) := ENNReal.ofReal_le_ofReal hmP + _ = (2 * m : ℝ≥0∞) := by rw [ENNReal.ofReal_mul (by norm_num)]; simp + have h2mtop : (2 * m : ℝ≥0∞) ≠ ∞ := ENNReal.mul_ne_top (by norm_num) (ENNReal.natCast_ne_top m) + have h2mR : ((2 * m : ℝ≥0∞)).toReal = 2 * m := by simp + have hint := toReal_eLpNorm_le_rpow_mul (μ := volume) T.continuous.aestronglyMeasurable + (norm_nonneg T) (Filter.Eventually.of_forall T.norm_coe_le_norm) + (zero_lt_one.trans_le hp).ne' h2m h2mtop + rw [h2mR] at hint + have hX : X ^ (2 * m : ℝ) ≤ ‖T‖ ^ (2 * m - P) * N ^ P := by + have hθ : 0 ≤ 1 - P / (2 * m) := by + rw [sub_nonneg, div_le_one (by positivity)]; exact hmP + calc X ^ (2 * m : ℝ) ≤ (‖T‖ ^ (1 - P / (2 * m)) * N ^ (P / (2 * m))) ^ (2 * m : ℝ) := + Real.rpow_le_rpow ENNReal.toReal_nonneg hint (by positivity) + _ = ‖T‖ ^ (2 * m - P) * N ^ P := by + rw [Real.mul_rpow (by positivity) (by positivity), ← Real.rpow_mul (norm_nonneg _), + ← Real.rpow_mul hN] + congr 2 <;> field_simp + -- the chain of inequalities + have hchain : ‖T‖ ^ (2 * m : ℝ) ≤ K * (‖T‖ ^ (2 * m - P) * N ^ P) := by + have h1 : ‖T‖ ^ (2 * m : ℝ) ≤ ‖T ^ m‖ ^ 2 := by + rw [show (2 * m : ℝ) = ((2 * m : ℕ) : ℝ) by push_cast; ring, Real.rpow_natCast, mul_comm, + pow_mul] + exact pow_le_pow_left₀ (by positivity) (norm_pow_le_norm_pow T hm0) 2 + have h2 := norm_sq_le_card_mul_norm_toLp_sq hS + rw [norm_toLp_two_pow T hm0] at h2 + have h3 : (X ^ m) ^ 2 = X ^ (2 * m : ℝ) := by + rw [← pow_mul, show (2 * m : ℝ) = ((m * 2 : ℕ) : ℝ) by push_cast; ring, Real.rpow_natCast] + calc ‖T‖ ^ (2 * m : ℝ) ≤ ‖T ^ m‖ ^ 2 := h1 + _ ≤ K * (X ^ m) ^ 2 := h2 + _ = K * X ^ (2 * m : ℝ) := by rw [h3] + _ ≤ K * (‖T‖ ^ (2 * m - P) * N ^ P) := by gcongr + -- cancel `‖T‖^(2m - P)` + rcases (norm_nonneg T).eq_or_lt with h0 | hpos + · rw [← h0, Real.zero_rpow hP0.ne']; positivity + have hsplit : ‖T‖ ^ (2 * m : ℝ) = ‖T‖ ^ (2 * m - P) * ‖T‖ ^ P := by + rw [← Real.rpow_add hpos, sub_add_cancel] + rw [hsplit, mul_left_comm] at hchain + exact le_of_mul_le_mul_left hchain (Real.rpow_pos_of_pos hpos _) + +/-- **The Nikolskii inequality** for trigonometric polynomials: for `T` of degree `< n` and +`1 ≤ p < ∞`, `‖T‖_∞ ≤ (2⌈p/2⌉)^(d/p) n^(d/p) ‖T‖_p`. -/ +theorem norm_le_rpow_mul_eLpNorm {n : ℕ} {T : UnitAddTorus d →ᵇ ℂ} (hT : T ∈ trigPoly d n) + {p : ℝ≥0∞} (hp : 1 ≤ p) (hp' : p ≠ ∞) : + ‖T‖ ≤ (2 * ⌈p.toReal / 2⌉₊ : ℝ) ^ ((Fintype.card d : ℝ) * p.toReal⁻¹) * + (n : ℝ) ^ ((Fintype.card d : ℝ) * p.toReal⁻¹) * (eLpNorm T p volume).toReal := by + set P := p.toReal + have hP0 : 0 < P := zero_lt_one.trans_le (ENNReal.one_le_toReal_of_one_le hp hp') + set m := ⌈P / 2⌉₊ + set N := (eLpNorm T p volume).toReal + have hN : 0 ≤ N := ENNReal.toReal_nonneg + have h := norm_rpow_le_card_mul_eLpNorm_rpow hT hp hp' + have hK : (((2 * (m * n)) ^ Fintype.card d : ℕ) : ℝ) ^ P⁻¹ = + (2 * m : ℝ) ^ ((Fintype.card d : ℝ) * P⁻¹) * (n : ℝ) ^ ((Fintype.card d : ℝ) * P⁻¹) := by + rw [Nat.cast_pow, ← Real.rpow_natCast, ← Real.rpow_mul (by positivity), ← Real.mul_rpow + (by positivity) (by positivity)] + push_cast; ring_nf + calc ‖T‖ = (‖T‖ ^ P) ^ P⁻¹ := (Real.rpow_rpow_inv (norm_nonneg T) hP0.ne').symm + _ ≤ ((((2 * (m * n)) ^ Fintype.card d : ℕ) : ℝ) * N ^ P) ^ P⁻¹ := + Real.rpow_le_rpow (by positivity) h (by positivity) + _ = (((2 * (m * n)) ^ Fintype.card d : ℕ) : ℝ) ^ P⁻¹ * N := by + rw [Real.mul_rpow (by positivity) (by positivity), Real.rpow_rpow_inv hN hP0.ne'] + _ = _ := by rw [hK] + +/-- **The trigonometric polynomials have the Nikolskii property of dimension `d`**. -/ +theorem trigScheme_hasNikolskii : + (trigScheme d).HasNikolskii volume (Fintype.card d) := by + refine ⟨fun p hp => ?_⟩ + rcases eq_or_ne p ∞ with rfl | hp' + · refine ⟨1, zero_le_one, fun n _ a _ => ?_⟩ + have := BoundedContinuousFunction.norm_toLp_top (μ := (volume : Measure (UnitAddTorus d))) + (𝕜 := ℂ) a + rw [BoundedContinuousFunction.norm_toLp_eq_toReal_eLpNorm] at this + simp [this] + · refine ⟨(2 * ⌈p.toReal / 2⌉₊ : ℝ) ^ ((Fintype.card d : ℝ) * p.toReal⁻¹), by positivity, + fun n _ a ha => ?_⟩ + exact norm_le_rpow_mul_eLpNorm ha hp hp' + +end Torus diff --git a/LeanPool/FunctionSpaces/Torus/PeriodicDistributions.lean b/LeanPool/FunctionSpaces/Torus/PeriodicDistributions.lean new file mode 100644 index 0000000000..66b60bfda9 --- /dev/null +++ b/LeanPool/FunctionSpaces/Torus/PeriodicDistributions.lean @@ -0,0 +1,387 @@ +/- +Copyright (c) 2026 Mario Ullrich. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Mario Ullrich +-/ +module + +public import LeanPool.FunctionSpaces.Torus.LpWeakDerivatives +public import LeanPool.FunctionSpaces.Torus.PeriodicLift +public import LeanPool.FunctionSpaces.Rd.Sobolev.WeakDerivativeChangeOfVariables +public import Mathlib.Analysis.Calculus.BumpFunction.Normed + +/- +Modified for Lean Pool: module names and imports adapted. +-/ + +/-! +# Weak derivatives on the torus as distributions of periodic lifts + +A function `f` on `𝕋^d` lifts to the periodic function `f ∘ π` on `ℝ^d`, where +`π : ℝ^d → 𝕋^d` is the quotient map. For `f, g ∈ L_p(𝕋^d)`, `1 ≤ p ≤ ∞`, and directions +`v ∈ (ℝ^d)^k`, the weak derivative of `Torus.HasWeakLineDeriv` (the rule `ĝ(m) = σ_v(m) f̂(m)`) +is the distributional derivative of the lift: `g = ∂^v f` on the torus iff +`g ∘ π = ∂^v (f ∘ π)` in Mathlib's distributions `𝓓'(ℝ^d)` +(`Torus.hasWeakLineDeriv_iff_comp_proj`, `Rd.HasWeakLineDeriv ⊤`). The same holds for the +multi-index derivatives `∂^α` (`Torus.hasWeakDeriv_iff_comp_proj`), so `W^m_p(𝕋^d)` is described +through the lifts (`Torus.memSobolev_iff_comp_proj`). + +* **The pairing** `h ↦ ∫ φ(x) h(π x) dx` with a test function `φ` on `ℝ^d` is a bounded linear + functional on `L_p(𝕋^d)` (`Torus.periodicPairing`); on the character `e_m` it is the Fourier + transform of `φ` at `-m`, and `∂^v φ` multiplies it by `(-1)^k σ_v(m)`. +* **From the torus to `ℝ^d`** (`Torus.HasWeakLineDeriv.comp_proj`): the integral identity + `∫ φ (g ∘ π) = (-1)^k ∫ (∂^v φ) (f ∘ π)` holds for the Littlewood–Paley blocks, which are + trigonometric polynomials, and passes to the limit of their partial sums. +* **From `ℝ^d` to the torus** (`Torus.HasWeakLineDeriv.of_comp_proj`): convolution with a + compactly supported Schwartz kernel `η` moves the derivative onto `η`, so + `η ⋆ g = (∂^v η) ⋆ f` on the torus; the modulated bump `η_m` with `𝓕η_m(m) = 1` + (`Torus.modulatedBump`) reads off the coefficient at `m`. +* **Classical derivatives**: since the classical derivative of a `C^1` function on `ℝ^d` is its + weak derivative (`FunctionSpaces.Rd.Sobolev.WeakDerivativeChangeOfVariables`), for `C^1` lifts + the + classes of the classical derivatives are the weak derivatives on the torus + (`Torus.hasWeakLineDeriv_of_contDiff`, and `Torus.hasWeakLineDeriv_of_contDiff_chain` for a + chain of derivatives of order `k`, whose coefficients multiply along the chain by + `Fin.eq_prod_mul_of_succ_eq`). +-/ + +@[expose] public section + +open MeasureTheory UnitAddTorus Filter Topology TopologicalSpace Metric +open scoped ENNReal FourierTransform TorusHaar Real SchwartzMap LineDeriv Distributions + +/-! ### A product along a chain -/ + +/-- **A product along a chain**: in a commutative monoid, if `a_{l+1} = c_l a_l` for every +`l < k`, then `a_k = (∏_{l simp + | succ k ih => + have ih' := ih (fun l => a l.castSucc) (fun l => c l.castSucc) fun l => by + simpa only [Fin.succ_castSucc] using h l.castSucc + rw [← Fin.succ_last, h (Fin.last k), ih', Fin.prod_univ_castSucc, Fin.castSucc_zero, + mul_comm (∏ l : Fin k, c l.castSucc) (c (Fin.last k)), mul_assoc] + +namespace Torus + +variable {d : Type*} [Fintype d] + +/-! ### The pairing of periodic lifts with test functions -/ + +variable {p : ℝ≥0∞} [Fact (1 ≤ p)] + +/-- For a test function `φ` on `ℝ^d` and `h ∈ L_p(𝕋^d)`, `x ↦ φ(x) h(π x)` is integrable. -/ +theorem integrable_mul_comp_proj (φ : 𝓓((⊤ : Opens (EuclideanSpace ℝ d)), ℝ)) + (h : Lp ℂ p (volume : Measure (UnitAddTorus d))) : + Integrable (fun x => (φ x : ℂ) * h (proj x)) volume := by + simpa only [Complex.real_smul, Function.comp_apply] using + φ.integrable_smul ((locallyIntegrable_comp_proj_Lp h).locallyIntegrableOn _) + +omit [Fact (1 ≤ p)] in +/-- **The pairing is bounded by the `L_1` norm**: if `|φ| ≤ M` and the support of `φ` lies in the +open ball `B(0, R)`, then `|∫ φ(x) h(π x) dx| ≤ M (2R + 2)^d ‖h‖_1` for `h ∈ L_p(𝕋^d)`, by +counting the period boxes that meet the ball (`Torus.setLIntegral_ball_comp_proj_le`). -/ +theorem enorm_integral_mul_comp_proj_le (φ : 𝓓((⊤ : Opens (EuclideanSpace ℝ d)), ℝ)) {M R : ℝ} + (hM : ∀ x, ‖φ x‖ ≤ M) (hR : tsupport φ ⊆ ball 0 R) + (h : Lp ℂ p (volume : Measure (UnitAddTorus d))) : + ‖∫ x, (φ x : ℂ) * h (proj x)‖ₑ ≤ + ENNReal.ofReal M * ENNReal.ofReal (2 * R + 2) ^ Fintype.card d * eLpNorm h 1 volume := by + calc ‖∫ x, (φ x : ℂ) * h (proj x)‖ₑ ≤ ∫⁻ x, ‖(φ x : ℂ) * h (proj x)‖ₑ := + eNorm_integral_le_lintegral_eNorm _ + _ ≤ ∫⁻ x in ball 0 R, ENNReal.ofReal M * ‖h (proj x)‖ₑ := by + rw [← lintegral_indicator measurableSet_ball] + refine lintegral_mono fun x => ?_ + by_cases hx : x ∈ ball (0 : EuclideanSpace ℝ d) R + · rw [Set.indicator_of_mem hx, eNorm_mul, ← ofReal_norm, Complex.norm_real] + gcongr + exact hM x + · rw [Set.indicator_of_notMem hx, image_eq_zero_of_notMem_tsupport fun h' => hx (hR h'), + Complex.ofReal_zero, zero_mul, eNorm_zero] + _ = ENNReal.ofReal M * ∫⁻ x in ball 0 R, ‖h (proj x)‖ₑ := + lintegral_const_mul' _ _ ENNReal.ofReal_ne_top + _ ≤ ENNReal.ofReal M * (ENNReal.ofReal (2 * R + 2) ^ Fintype.card d * ∫⁻ t, ‖h t‖ₑ) := by + gcongr + exact setLIntegral_ball_comp_proj_le (fun t => ‖h t‖ₑ) 0 R + _ = _ := by + rw [mul_assoc, eLpNorm_one_eq_lintegral_eNorm (Lp.aestronglyMeasurable h)] + +/-- The pairing `h ↦ ∫ φ(x) h(π x) dx` has a bound `C ‖h‖_p` on `L_p(𝕋^d)`: a test function is +bounded and supported in a ball (`Torus.enorm_integral_mul_comp_proj_le`), and +`‖h‖_1 ≤ ‖h‖_p` on the probability space `𝕋^d`. -/ +theorem exists_norm_integral_mul_comp_proj_le (φ : 𝓓((⊤ : Opens (EuclideanSpace ℝ d)), ℝ)) : + ∃ C, ∀ h : Lp ℂ p (volume : Measure (UnitAddTorus d)), + ‖∫ x, (φ x : ℂ) * h (proj x)‖ ≤ C * ‖h‖ := by + obtain ⟨M, hM⟩ := φ.continuous.bounded_above_of_compact_support φ.hasCompactSupport + obtain ⟨R, hR⟩ := φ.hasCompactSupport.isCompact.isBounded.subset_ball 0 + refine ⟨(ENNReal.ofReal M * ENNReal.ofReal (2 * R + 2) ^ Fintype.card d).toReal, fun h => ?_⟩ + rw [← toReal_eNorm, ← toReal_eNorm h, ← ENNReal.toReal_mul] + refine ENNReal.toReal_mono (ENNReal.mul_ne_top (ENNReal.mul_ne_top ENNReal.ofReal_ne_top + (ENNReal.pow_ne_top ENNReal.ofReal_ne_top)) eNorm_ne_top) + ((enorm_integral_mul_comp_proj_le φ hM hR h).trans ?_) + rw [Lp.eNorm_def] + gcongr + exact eLpNorm_le_eLpNorm_of_exponent_le Fact.out + +/-- The pairing is additive in `h ∈ L_p(𝕋^d)`. -/ +theorem integral_mul_comp_proj_add (φ : 𝓓((⊤ : Opens (EuclideanSpace ℝ d)), ℝ)) + (f g : Lp ℂ p (volume : Measure (UnitAddTorus d))) : + ∫ x, (φ x : ℂ) * (f + g) (proj x) = + (∫ x, (φ x : ℂ) * f (proj x)) + ∫ x, (φ x : ℂ) * g (proj x) := by + rw [← integral_add (integrable_mul_comp_proj φ f) (integrable_mul_comp_proj φ g)] + refine integral_congr_ae ((ae_comp_proj (Lp.coeFn_add f g)).mono fun x hx => ?_) + simp only [hx, Pi.add_apply, mul_add] + +omit [Fact (1 ≤ p)] in +/-- The pairing is homogeneous in `h ∈ L_p(𝕋^d)`. -/ +theorem integral_mul_comp_proj_smul (φ : 𝓓((⊤ : Opens (EuclideanSpace ℝ d)), ℝ)) (c : ℂ) + (f : Lp ℂ p (volume : Measure (UnitAddTorus d))) : + ∫ x, (φ x : ℂ) * (c • f) (proj x) = c * ∫ x, (φ x : ℂ) * f (proj x) := by + rw [← integral_const_mul] + refine integral_congr_ae ((ae_comp_proj (Lp.coeFn_smul c f)).mono fun x hx => ?_) + simp only [hx, Pi.smul_apply, smul_eq_mul] + ring + +variable (p) in +/-- The **periodic pairing** of a test function `φ` on `ℝ^d` with `L_p(𝕋^d)`, `1 ≤ p ≤ ∞`: the +bounded linear functional `h ↦ ∫ φ(x) h(π x) dx`, the lift `h ∘ π` as a distribution on `ℝ^d` +evaluated at `φ`. -/ +noncomputable def periodicPairing (φ : 𝓓((⊤ : Opens (EuclideanSpace ℝ d)), ℝ)) : + Lp ℂ p (volume : Measure (UnitAddTorus d)) →L[ℂ] ℂ := + LinearMap.mkContinuousOfExistsBound + { toFun := fun h => ∫ x, (φ x : ℂ) * h (proj x) + map_add' := integral_mul_comp_proj_add φ + map_smul' := integral_mul_comp_proj_smul φ } + (exists_norm_integral_mul_comp_proj_le φ) + +/-- The periodic pairing is the integral `∫ φ(x) h(π x) dx`. -/ +theorem periodicPairing_apply (φ : 𝓓((⊤ : Opens (EuclideanSpace ℝ d)), ℝ)) + (h : Lp ℂ p (volume : Measure (UnitAddTorus d))) : + periodicPairing p φ h = ∫ x, (φ x : ℂ) * h (proj x) := + rfl + +/-- **The pairing with a character** is a value of the Fourier transform: +`∫ φ(x) e_m(π x) dx = 𝓕φ(-m)`. -/ +theorem periodicPairing_mFourierLp (φ : 𝓓((⊤ : Opens (EuclideanSpace ℝ d)), ℝ)) (m : d → ℤ) : + periodicPairing p φ (mFourierLp p m) = + 𝓕 (Rd.testSchwartz φ : EuclideanSpace ℝ d → ℂ) (latticeVec (-m)) := by + rw [periodicPairing_apply, ← integral_mul_mFourier_neg_proj] + refine integral_congr_ae ((ae_comp_proj (coeFn_mFourierLp p m)).mono fun x hx => ?_) + dsimp only + rw [hx, ← mFourier_neg_neg m (proj x), Rd.testSchwartz_apply] + +/-- **Derivatives of the test function on a character**: the pairing of `∂^v φ` with `e_m` is +`(-1)^k σ_v(m)` times the pairing of `φ`, since `𝓕(∂^v φ)(ξ) = ∏_l 2πi ⟪ξ, v_l⟫ 𝓕φ(ξ)` and +`σ_v(-m) = (-1)^k σ_v(m)`. -/ +theorem periodicPairing_iteratedLineDerivOp_mFourierLp + (φ : 𝓓((⊤ : Opens (EuclideanSpace ℝ d)), ℝ)) {k : ℕ} (v : Fin k → EuclideanSpace ℝ d) + (m : d → ℤ) : + periodicPairing p (∂^{v} φ) (mFourierLp p m) = + (-1) ^ k * lineSymbol v m * periodicPairing p φ (mFourierLp p m) := by + have h := SchwartzMap.fourier_iteratedLineDerivOp_apply v (Rd.testSchwartz φ) (latticeVec (-m)) + rw [Rd.iteratedLineDerivOp_testSchwartz] at h + rw [periodicPairing_mFourierLp, periodicPairing_mFourierLp, ← SchwartzMap.fourier_coe, h, + ← SchwartzMap.fourier_coe, smul_eq_mul] + change lineSymbol v (-m) * _ = _ + rw [lineSymbol_neg] + +/-! ### From the torus to `ℝ^d` -/ + +/-- **The integral identity for trigonometric polynomials**: if `a, b ∈ L_p(𝕋^d)` are +trigonometric polynomials of degree `< n` with `b = ∂^v a`, then +`∫ φ (b ∘ π) = (-1)^k ∫ (∂^v φ) (a ∘ π)` for every test function `φ` on `ℝ^d`. Both sides are +sums over the characters (`Torus.eq_sum_mFourierCoeff_of_mem_trigPolyLp`). -/ +theorem periodicPairing_eq_of_mem_trigPolyLp {n k : ℕ} {v : Fin k → EuclideanSpace ℝ d} + {a b : Lp ℂ p (volume : Measure (UnitAddTorus d))} (ha : a ∈ trigPolyLp p n) + (hb : b ∈ trigPolyLp p n) (h : HasWeakLineDeriv v a b) + (φ : 𝓓((⊤ : Opens (EuclideanSpace ℝ d)), ℝ)) : + periodicPairing p φ b = (-1) ^ k * periodicPairing p (∂^{v} φ) a := by + rw [eq_sum_mFourierCoeff_of_mem_trigPolyLp ha, eq_sum_mFourierCoeff_of_mem_trigPolyLp hb, + map_sum, map_sum, Finset.mul_sum] + refine Finset.sum_congr rfl fun m _ => ?_ + have hsq : ((-1 : ℂ) ^ k) * (-1) ^ k = 1 := by + rw [← mul_pow] + norm_num + rw [map_smul, map_smul, smul_eq_mul, smul_eq_mul, h m, + periodicPairing_iteratedLineDerivOp_mFourierLp] + linear_combination (-(lineSymbol v m * mFourierCoeff a m * + periodicPairing p φ (mFourierLp p m))) * hsq + +/-- **The integral identity for the Littlewood–Paley blocks**: if `g = ∂^v f` in `L_p(𝕋^d)`, +`1 ≤ p < ∞`, then `∫ φ (Δ_j g ∘ π) = (-1)^k ∫ (∂^v φ) (Δ_j f ∘ π)`, since `Δ_j g = ∂^v Δ_j f` +(`Torus.HasWeakLineDeriv.econvLp`) and both blocks are trigonometric polynomials +(`Torus.lpBlock_mem_trigPolyLp`). -/ +theorem periodicPairing_lpBlock (hp : p ≠ ∞) {k : ℕ} {v : Fin k → EuclideanSpace ℝ d} + {f g : Lp ℂ p (volume : Measure (UnitAddTorus d))} (h : HasWeakLineDeriv v f g) + (φ : 𝓓((⊤ : Opens (EuclideanSpace ℝ d)), ℝ)) (j : ℕ) : + periodicPairing p φ (lpBlock hp j g) = + (-1) ^ k * periodicPairing p (∂^{v} φ) (lpBlock hp j f) := + periodicPairing_eq_of_mem_trigPolyLp (lpBlock_mem_trigPolyLp hp j f) + (lpBlock_mem_trigPolyLp hp j g) (h.econvLp hp _) φ + +/-- **The integral identity for the lifts**: if `g = ∂^v f` in `L_p(𝕋^d)`, `1 ≤ p < ∞`, then +`∫ φ (g ∘ π) = (-1)^k ∫ (∂^v φ) (f ∘ π)` for every test function `φ` on `ℝ^d`. The identity holds +for the partial sums `∑_{j ?_) + simp only [Function.comp_apply, map_sum, Finset.mul_sum, periodicPairing_lpBlock hp h φ] + +/-- **Weak derivatives on the torus are weak derivatives of the lifts**: if `g = ∂^v f` in +`L_p(𝕋^d)`, `1 ≤ p ≤ ∞`, then `g ∘ π = ∂^v (f ∘ π)` as distributions on `ℝ^d`. For `p < ∞` this is +`Torus.HasWeakLineDeriv.periodicPairing_eq`; every `p` reduces to `p = 1` through the inclusion +`L_p ⊆ L_1`, which keeps the classes of the lifts. -/ +theorem HasWeakLineDeriv.comp_proj {k : ℕ} {v : Fin k → EuclideanSpace ℝ d} + {f g : Lp ℂ p (volume : Measure (UnitAddTorus d))} (h : HasWeakLineDeriv v f g) : + Rd.HasWeakLineDeriv ⊤ v (⇑f ∘ proj) (⇑g ∘ proj) := by + have hp1 : (1 : ℝ≥0∞) ≤ p := Fact.out + have hincl : ∀ (ψ : 𝓓((⊤ : Opens (EuclideanSpace ℝ d)), ℝ)) + (u : Lp ℂ p (volume : Measure (UnitAddTorus d))), + periodicPairing 1 ψ (Lp.inclusionOfExponentLe (𝕜 := ℂ) volume hp1 u) = + ∫ x, (ψ x : ℂ) * u (proj x) := fun ψ u => + integral_congr_ae ((ae_comp_proj (Lp.coeFn_inclusionOfExponentLe (𝕜 := ℂ) hp1 u)).mono + fun x hx => by simp only [hx]) + refine (Rd.hasWeakLineDeriv_iff_integral + ((locallyIntegrable_comp_proj_Lp f).locallyIntegrableOn _) + ((locallyIntegrable_comp_proj_Lp g).locallyIntegrableOn _)).2 fun φ => ?_ + have h1 := (h.of_inclusion hp1).periodicPairing_eq ENNReal.one_ne_top φ + rw [hincl, hincl] at h1 + simp only [Complex.real_smul, Function.comp_apply, Complex.ofReal_pow, Complex.ofReal_neg, + Complex.ofReal_one] + exact h1 + +/-! ### From `ℝ^d` to the torus -/ + +/-- **Weak derivatives of the lifts commute with convolution on the torus**: if +`g ∘ π = ∂^v (f ∘ π)` weakly on `ℝ^d` and `η` is a compactly supported Schwartz function, then +`η ⋆ g = (∂^v η) ⋆ f` at every point of the torus. At `π x` both sides are convolutions on `ℝ^d` +(`Torus.econv_proj`), equal by `Rd.conv_eq_conv_iteratedLineDerivOp_of_hasWeakLineDeriv`. -/ +theorem econv_eq_of_comp_proj {k : ℕ} {v : Fin k → EuclideanSpace ℝ d} + {f g : UnitAddTorus d → ℂ} (h : Rd.HasWeakLineDeriv ⊤ v (f ∘ proj) (g ∘ proj)) + {η : 𝓢(EuclideanSpace ℝ d, ℂ)} (hη : HasCompactSupport (η : EuclideanSpace ℝ d → ℂ)) : + econv η g = econv (∂^{v} η : 𝓢(EuclideanSpace ℝ d, ℂ)) f := funext fun t => by + obtain ⟨x, rfl, -⟩ := exists_proj_eq t + rw [econv_proj, econv_proj] + exact Rd.conv_eq_conv_iteratedLineDerivOp_of_hasWeakLineDeriv h hη fun y _ => by simp + +/-- The **modulated bump** `η_m(x) = χ(x) e^{2πi ⟪x, m⟫}` for `m ∈ ℤ^d`, where `χ` is the +standard bump `Rd.LocalMeansBump.std` (smooth, supported in the unit ball, `∫ χ = 1`): a +compactly supported Schwartz function on `ℝ^d` with `𝓕η_m(m) = ∫ χ = 1`. -/ +noncomputable def modulatedBump (m : d → ℤ) : 𝓢(EuclideanSpace ℝ d, ℂ) := + HasCompactSupport.toSchwartzMap + (f := fun x => (Rd.LocalMeansBump.std (V := EuclideanSpace ℝ d)).toFun x * + Complex.exp (↑(2 * π * inner ℝ x (latticeVec m)) * Complex.I)) + (Rd.LocalMeansBump.std (V := EuclideanSpace ℝ d)).hasCompactSupport.mul_right + ((Rd.LocalMeansBump.std (V := EuclideanSpace ℝ d)).contDiff.mul + (Complex.contDiff_exp.comp ((Complex.ofRealCLM.contDiff.comp + (contDiff_const.mul (contDiff_id.inner ℝ contDiff_const))).mul contDiff_const))) + +/-- The values of the modulated bump: `η_m(x) = χ(x) e^{2πi ⟪x, m⟫}`. -/ +theorem modulatedBump_apply (m : d → ℤ) (x : EuclideanSpace ℝ d) : + modulatedBump m x = (Rd.LocalMeansBump.std (V := EuclideanSpace ℝ d)).toFun x * + Complex.exp (↑(2 * π * inner ℝ x (latticeVec m)) * Complex.I) := + rfl + +/-- The modulated bump has compact support. -/ +theorem hasCompactSupport_modulatedBump (m : d → ℤ) : + HasCompactSupport (modulatedBump m : EuclideanSpace ℝ d → ℂ) := + (Rd.LocalMeansBump.std (V := EuclideanSpace ℝ d)).hasCompactSupport.mul_right + +/-- **The Fourier transform of the modulated bump at `m`** is `∫ χ = 1`: the modulation cancels +the character of the Fourier transform. -/ +theorem fourier_modulatedBump (m : d → ℤ) : + 𝓕 (modulatedBump m : EuclideanSpace ℝ d → ℂ) (latticeVec m) = 1 := by + rw [Real.fourier_eq'] + have h : ∀ x : EuclideanSpace ℝ d, + Complex.exp (↑(-2 * π * inner ℝ x (latticeVec m)) * Complex.I) • modulatedBump m x = + (Rd.LocalMeansBump.std (V := EuclideanSpace ℝ d)).toFun x := fun x => by + rw [modulatedBump_apply, smul_eq_mul, mul_left_comm, ← Complex.exp_add] + push_cast + ring_nf + rw [Complex.exp_zero, mul_one] + exact (integral_congr_ae (Eventually.of_forall h)).trans + (Rd.LocalMeansBump.std (V := EuclideanSpace ℝ d)).integral_eq_one + +/-- **Weak derivatives of the lifts are weak derivatives on the torus**: if `f, g ∈ L_p(𝕋^d)`, +`1 ≤ p ≤ ∞`, and `g ∘ π = ∂^v (f ∘ π)` as distributions on `ℝ^d`, then `g = ∂^v f`. Convolution +with the modulated bump gives `η_m ⋆ g = (∂^v η_m) ⋆ f` (`Torus.econv_eq_of_comp_proj`); the +coefficients at `m` are `ĝ(m)` and `σ_v(m) f̂(m)`, since `𝓕η_m(m) = 1`. -/ +theorem HasWeakLineDeriv.of_comp_proj {k : ℕ} {v : Fin k → EuclideanSpace ℝ d} + {f g : Lp ℂ p (volume : Measure (UnitAddTorus d))} + (h : Rd.HasWeakLineDeriv ⊤ v (⇑f ∘ proj) (⇑g ∘ proj)) : HasWeakLineDeriv v f g := fun m => by + have hc := congrArg (fun F => mFourierCoeff F m) + (econv_eq_of_comp_proj h (hasCompactSupport_modulatedBump m)) + rw [mFourierCoeff_econv (modulatedBump m).integrable (Lp.stronglyMeasurable g).measurable + ((Lp.memLp g).integrable Fact.out), + mFourierCoeff_econv (∂^{v} (modulatedBump m)).integrable (Lp.stronglyMeasurable f).measurable + ((Lp.memLp f).integrable Fact.out), + ← SchwartzMap.fourier_coe (∂^{v} (modulatedBump m)), + SchwartzMap.fourier_iteratedLineDerivOp_apply, + SchwartzMap.fourier_coe, fourier_modulatedBump, smul_eq_mul, one_mul, mul_one] at hc + exact hc + +/-- **The torus derivative is the distributional derivative of the lift**: for +`f, g ∈ L_p(𝕋^d)`, `1 ≤ p ≤ ∞`, and directions `v ∈ (ℝ^d)^k`, `g = ∂^v f` (the rule +`ĝ(m) = σ_v(m) f̂(m)`) iff `g ∘ π = ∂^v (f ∘ π)` in `𝓓'(ℝ^d)`. -/ +theorem hasWeakLineDeriv_iff_comp_proj {k : ℕ} {v : Fin k → EuclideanSpace ℝ d} + {f g : Lp ℂ p (volume : Measure (UnitAddTorus d))} : + HasWeakLineDeriv v f g ↔ Rd.HasWeakLineDeriv ⊤ v (⇑f ∘ proj) (⇑g ∘ proj) := + ⟨HasWeakLineDeriv.comp_proj, HasWeakLineDeriv.of_comp_proj⟩ + +/-- **The multi-index derivative is the distributional derivative of the lift**: `g = ∂^α f` in +`L_p(𝕋^d)`, `1 ≤ p ≤ ∞`, iff `g ∘ π = ∂^α (f ∘ π)` in `𝓓'(ℝ^d)`, with `∂^α` along the coordinate +directions `Torus.coordDirs α`. -/ +theorem hasWeakDeriv_iff_comp_proj [DecidableEq d] {α : d → ℕ} + {f g : Lp ℂ p (volume : Measure (UnitAddTorus d))} : + HasWeakDeriv α f g ↔ Rd.HasWeakLineDeriv ⊤ (coordDirs α) (⇑f ∘ proj) (⇑g ∘ proj) := by + rw [hasWeakDeriv_iff_hasWeakLineDeriv, hasWeakLineDeriv_iff_comp_proj] + +/-- **`W^m_p(𝕋^d)` through the lifts**: `f ∈ W^m_p(𝕋^d)`, `1 ≤ p ≤ ∞`, iff for every order +`k ≤ m` and all directions `v ∈ (ℝ^d)^k` some `g ∈ L_p(𝕋^d)` has `g ∘ π = ∂^v (f ∘ π)` in +`𝓓'(ℝ^d)`. -/ +theorem memSobolev_iff_comp_proj {m : ℕ} {f : Lp ℂ p (volume : Measure (UnitAddTorus d))} : + MemSobolev m f ↔ ∀ k ≤ m, ∀ v : Fin k → EuclideanSpace ℝ d, + ∃ g : Lp ℂ p (volume : Measure (UnitAddTorus d)), + Rd.HasWeakLineDeriv ⊤ v (⇑f ∘ proj) (⇑g ∘ proj) := by + simp only [memSobolev_iff_exists_hasWeakLineDeriv, hasWeakLineDeriv_iff_comp_proj] + +/-! ### Classical derivatives -/ + +/-- **Classical derivatives are weak derivatives on the torus**: if the lift of `f ∈ L_p(𝕋^d)`, +`1 ≤ p ≤ ∞`, agrees almost everywhere with a `C^1` function `F` on `ℝ^d`, and the lift of +`g ∈ L_p(𝕋^d)` with its derivative `x ↦ DF(x) w`, then `g = ∂_w f` +(`Rd.hasWeakLineDeriv_of_contDiff`, `Torus.HasWeakLineDeriv.of_comp_proj`). -/ +theorem hasWeakLineDeriv_of_contDiff {F : EuclideanSpace ℝ d → ℂ} (hF : ContDiff ℝ 1 F) + (w : EuclideanSpace ℝ d) {f g : Lp ℂ p (volume : Measure (UnitAddTorus d))} + (hf : ⇑f ∘ proj =ᵐ[volume] F) (hg : ⇑g ∘ proj =ᵐ[volume] fun x => fderiv ℝ F x w) : + HasWeakLineDeriv (fun _ : Fin 1 => w) f g := by + refine HasWeakLineDeriv.of_comp_proj ((Rd.hasWeakLineDeriv_of_contDiff hF ⊤ w).congr_ae ?_ ?_) + · rw [Rd.volume_restrict_top] + exact hf.symm + · rw [Rd.volume_restrict_top] + exact hg.symm + +/-- **Classical derivatives of order `k`**: let `F_0, …, F_k` be functions on `ℝ^d` such that +`F_l` is `C^1` and `F_{l+1} = D F_l (·) v_l` for every `l < k`, and let `f_0, …, f_k ∈ L_p(𝕋^d)`, +`1 ≤ p ≤ ∞`, have lifts equal to `F_l` almost everywhere. Then `f_k = ∂^v f_0`: each step is +`Torus.hasWeakLineDeriv_of_contDiff`, and the symbols multiply. -/ +theorem hasWeakLineDeriv_of_contDiff_chain {k : ℕ} (v : Fin k → EuclideanSpace ℝ d) + {F : Fin (k + 1) → EuclideanSpace ℝ d → ℂ} (hF : ∀ l : Fin k, ContDiff ℝ 1 (F l.castSucc)) + (hstep : ∀ l : Fin k, F l.succ = fun x => fderiv ℝ (F l.castSucc) x (v l)) + {f : Fin (k + 1) → Lp ℂ p (volume : Measure (UnitAddTorus d))} + (hf : ∀ l, ⇑(f l) ∘ proj =ᵐ[volume] F l) : HasWeakLineDeriv v (f 0) (f (Fin.last k)) := + fun m => Fin.eq_prod_mul_of_succ_eq (fun l => mFourierCoeff (f l) m) + (fun l => 2 * π * Complex.I * (inner ℝ (latticeVec m) (v l) : ℂ)) fun l => by + have h1 := hasWeakLineDeriv_of_contDiff (hF l) (v l) (hf l.castSucc) + (by rw [← hstep l]; exact hf l.succ) m + simpa only [lineSymbol, Finset.univ_unique, Finset.prod_singleton] using h1 + +end Torus diff --git a/LeanPool/FunctionSpaces/Torus/PeriodicLift.lean b/LeanPool/FunctionSpaces/Torus/PeriodicLift.lean new file mode 100644 index 0000000000..1737e46c65 --- /dev/null +++ b/LeanPool/FunctionSpaces/Torus/PeriodicLift.lean @@ -0,0 +1,380 @@ +/- +Copyright (c) 2026 Mario Ullrich. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Mario Ullrich +-/ +module + +public import LeanPool.FunctionSpaces.Torus.EuclideanConvolutionIdentities + +/- +Modified for Lean Pool: module names and imports adapted. +-/ + +/-! +# The periodic lift + +A function `g` on the torus `𝕋^d` lifts to the `ℤ^d`-periodic function `g ∘ π` on `ℝ^d`, with the +quotient map `π` (`Torus.proj`). This file compares integrals of lifts with integrals on the torus. + +* The **period boxes** `P_a = {x : a_i < x_i ≤ a_i + 1}` (`Torus.periodBox`) are fundamental + domains: `∫_{P_a} g(π x) dx = ∫_{𝕋^d} g` (`Torus.lintegral_periodBox`, from Mathlib's + `UnitAddTorus.lintegral_preimage`), so `π` maps the Lebesgue measure on `P_a` to the Haar + measure (`Torus.measurePreserving_proj_periodBox`), `|P_a| = 1` and + `‖F ∘ π‖_{L_p(P_a)} = ‖F‖_{L_p(𝕋^d)}` (`Torus.volume_periodBox`, + `Torus.eLpNorm_comp_proj_periodBox`). Hence a bound `F(π x) ≤ A(x) + G(π x)` for almost every + `x ∈ P_0` gives `‖F‖_{L_p(𝕋^d)} ≤ ‖A‖_{L_p(ℝ^d)} + ‖G‖_{L_p(𝕋^d)}` + (`Torus.eLpNorm_le_of_comp_proj_le`). The boxes `P_m`, `m ∈ ℤ^d`, partition `ℝ^d`, hence `π` + maps null sets back to null sets (`Torus.quasiMeasurePreserving_proj`) and almost everywhere + statements on the torus lift (`Torus.ae_comp_proj`). +* Convolutions and differences on the torus are those of the lift: + `(Φ ⋆ h)(π x) = (Φ ⋆ (h ∘ π))(x)` (`Torus.econv_proj`) and + `Δ^L_{π h} f(π x) = Δ^L_h (f ∘ π)(x)` (`Torus.higherDiff_comp_proj`). +* **Counting boxes**: a ball of radius `r` meets at most `(2r + 2)^d` boxes, so + `∫_{B(x,r)} g(π y) dy ≤ (2r + 2)^d ∫_{𝕋^d} g` (`Torus.setLIntegral_ball_comp_proj_le`), lifts + of integrable functions are locally integrable (`Torus.locallyIntegrable_comp_proj`, for `L_p` + classes `Torus.locallyIntegrable_comp_proj_Lp`), balls of + radius `r ≤ 1` around points of `P_0` lie in the box `(-1, 2]^d` of side `3` + (`Torus.ball_subset_tripleBox`), `‖y‖ ≥ 1` whenever `x ∈ P_0` and `x - y ∉ (-1, 2]^d` + (`Torus.one_le_norm_of_sub_notMem_tripleBox`), and `∫_{(-1,2]^d} g(π y) dy = 3^d ∫_{𝕋^d} g` + (`Torus.setLIntegral_tripleBox`); hence + `‖1_{(-1,2]^d} (F ∘ π)‖_{L_p(ℝ^d)} = 3^{d/p} ‖F‖_{L_p(𝕋^d)}` + (`Torus.eLpNorm_indicator_tripleBox_comp_proj`, `Torus.eLpNorm_indicator_tripleBox`, + `Torus.memLp_indicator_tripleBox_comp_proj`). +-/ + +@[expose] public section + +open MeasureTheory UnitAddTorus Set Filter Metric +open scoped ENNReal TorusHaar + +namespace Torus + +variable {d : Type*} [Fintype d] + +/-! ### Period boxes -/ + +/-- The **period box** `P_a = {x ∈ ℝ^d : a_i < x_i ≤ a_i + 1 for every i}`, a fundamental domain +of the lattice `ℤ^d`. -/ +def periodBox (a : d → ℝ) : Set (EuclideanSpace ℝ d) := + {x | ∀ i, x i ∈ Ioc (a i) (a i + 1)} + +/-- The box `(-1, 2]^d` of side `3`, the union of the `3^d` period boxes around `(0, 1]^d`. -/ +def tripleBox : Set (EuclideanSpace ℝ d) := + {y | ∀ i, y i ∈ Ioc (-1 : ℝ) 2} + +omit [Fintype d] in +/-- Period boxes are measurable. -/ +theorem measurableSet_periodBox [Finite d] (a : d → ℝ) : MeasurableSet (periodBox a) := by + let := Fintype.ofFinite d + have h : periodBox a = ⋂ i, (fun x : EuclideanSpace ℝ d => x i) ⁻¹' Ioc (a i) (a i + 1) := by + ext x + simp [periodBox] + rw [h] + exact MeasurableSet.iInter fun i => (PiLp.continuous_apply 2 _ i).measurable measurableSet_Ioc + +omit [Fintype d] in +/-- The box `(-1, 2]^d` is measurable. -/ +theorem measurableSet_tripleBox [Finite d] : MeasurableSet (tripleBox (d := d)) := by + let := Fintype.ofFinite d + have h : tripleBox (d := d) = + ⋂ i, (fun x : EuclideanSpace ℝ d => x i) ⁻¹' Ioc (-1 : ℝ) 2 := by + ext x + simp [tripleBox] + rw [h] + exact MeasurableSet.iInter fun i => (PiLp.continuous_apply 2 _ i).measurable measurableSet_Ioc + +omit [Fintype d] in +/-- `x` lies in the period box of an integer vector `m` iff `⌈x_i⌉ = m_i + 1` for every `i`. -/ +theorem mem_periodBox_intCast_iff (m : d → ℤ) (x : EuclideanSpace ℝ d) : + x ∈ periodBox (fun i => (m i : ℝ)) ↔ ∀ i, ⌈x i⌉ = m i + 1 := by + refine forall_congr' fun i => ?_ + rw [Int.ceil_eq_iff, mem_Ioc] + push_cast + constructor <;> rintro ⟨h1, h2⟩ <;> constructor <;> linarith + +omit [Fintype d] in +/-- Every point `x` lies in the period box of the integer vector `(⌈x_i⌉ - 1)_i`. -/ +theorem mem_periodBox_ceil (x : EuclideanSpace ℝ d) : + x ∈ periodBox (fun i => ((⌈x i⌉ - 1 : ℤ) : ℝ)) := + (mem_periodBox_intCast_iff _ x).2 fun i => by ring + +omit [Fintype d] in +/-- Period boxes of distinct integer vectors are disjoint. -/ +theorem pairwise_disjoint_periodBox : + Pairwise fun m m' : d → ℤ => + Disjoint (periodBox (fun i => (m i : ℝ))) (periodBox (fun i => (m' i : ℝ))) := by + intro m m' hmm' + refine Set.disjoint_left.2 fun x hx hx' => hmm' (funext fun i => ?_) + have h := ((mem_periodBox_intCast_iff m x).1 hx i).symm.trans + ((mem_periodBox_intCast_iff m' x).1 hx' i) + omega + +/-- **The period boxes are fundamental domains**: `∫_{P_a} g(π x) dx = ∫_{𝕋^d} g` for every +`g : 𝕋^d → [0, ∞]` (Mathlib's `UnitAddTorus.lintegral_preimage`, carried from `d → ℝ` to +`ℝ^d` by the volume-preserving identification). -/ +theorem lintegral_periodBox (a : d → ℝ) (g : UnitAddTorus d → ℝ≥0∞) : + ∫⁻ x in periodBox a, g (proj x) = ∫⁻ t, g t := by + rw [UnitAddTorus.lintegral_preimage g a] + exact MeasurePreserving.setLIntegral_comp_preimage_emb + (EuclideanSpace.volume_preserving_symm_measurableEquiv_toLp d) + (MeasurableEquiv.toLp 2 (d → ℝ)).symm.measurableEmbedding (fun x => g fun i => x i) + {x : d → ℝ | ∀ i, x i ∈ Ioc (a i) (a i + 1)} + +/-- **The quotient map preserves measure on a period box**: `π` maps the Lebesgue measure on +`P_a` to the Haar measure of the torus. -/ +theorem measurePreserving_proj_periodBox (a : d → ℝ) : + MeasurePreserving proj (volume.restrict (periodBox a)) volume := by + refine ⟨measurable_proj, Measure.ext fun s hs => ?_⟩ + rw [Measure.map_apply measurable_proj hs, ← lintegral_indicator_one (measurable_proj hs), + ← lintegral_indicator_one hs, ← lintegral_periodBox a] + rfl + +/-- A period box has volume `1`. -/ +theorem volume_periodBox (a : d → ℝ) : volume (periodBox a) = 1 := by + have h := (measurePreserving_proj_periodBox a).measure_preimage + (MeasurableSet.univ (α := UnitAddTorus d)).nullMeasurableSet + rwa [preimage_univ, Measure.restrict_apply_univ, measure_univ] at h + +/-- `L_p` norms of lifts on a period box are `L_p` norms on the torus: +`‖F ∘ π‖_{L_p(P_a)} = ‖F‖_{L_p(𝕋^d)}`. -/ +theorem eLpNorm_comp_proj_periodBox {ε : Type*} [TopologicalSpace ε] [ContinuousENorm ε] + (a : d → ℝ) {F : UnitAddTorus d → ε} (hF : AEStronglyMeasurable F volume) (p : ℝ≥0∞) : + eLpNorm (F ∘ proj) p (volume.restrict (periodBox a)) = eLpNorm F p volume := + eLpNorm_comp_measurePreserving hF (measurePreserving_proj_periodBox a) + +/-- **From the period box to the torus**: for `1 ≤ p`, almost everywhere measurable +`F, G : 𝕋^d → [0, ∞]` and `A : ℝ^d → [0, ∞]` with `F(π x) ≤ A(x) + G(π x)` for almost every +`x ∈ P_0`, `‖F‖_{L_p(𝕋^d)} ≤ ‖A‖_{L_p(ℝ^d)} + ‖G‖_{L_p(𝕋^d)}`, since `L_p` norms on the torus are +`L_p` norms of lifts on `P_0` (`Torus.eLpNorm_comp_proj_periodBox`). -/ +theorem eLpNorm_le_of_comp_proj_le {p : ℝ≥0∞} (hp1 : 1 ≤ p) {F G : UnitAddTorus d → ℝ≥0∞} + (hF : AEMeasurable F volume) (hG : AEMeasurable G volume) {A : EuclideanSpace ℝ d → ℝ≥0∞} + (h : ∀ᵐ x ∂volume.restrict (periodBox 0), F (proj x) ≤ A x + G (proj x)) : + eLpNorm F p volume ≤ eLpNorm A p volume + eLpNorm G p volume := + calc eLpNorm F p volume = eLpNorm (F ∘ proj) p (volume.restrict (periodBox 0)) := + (eLpNorm_comp_proj_periodBox 0 hF.aestronglyMeasurable p).symm + _ ≤ eLpNorm (A + G ∘ proj) p (volume.restrict (periodBox 0)) := + eLpNorm_mono_eNorm_ae (hF.aestronglyMeasurable.comp_measurePreserving + (measurePreserving_proj_periodBox 0)) (h.mono fun x hx => by + simpa only [eNorm_eq_self, Pi.add_apply, Function.comp_apply] using hx) + _ ≤ eLpNorm A p (volume.restrict (periodBox 0)) + + eLpNorm (G ∘ proj) p (volume.restrict (periodBox 0)) := eLpNorm_add_le hp1 + _ ≤ eLpNorm A p volume + eLpNorm G p volume := + add_le_add (eLpNorm_mono_measure _ Measure.restrict_le_self) + (eLpNorm_comp_proj_periodBox 0 hG.aestronglyMeasurable p).le + +/-! ### Null sets and almost everywhere statements -/ + +/-- **The quotient map pulls null sets back to null sets**: the period boxes `P_m`, `m ∈ ℤ^d`, +cover `ℝ^d`, and on each of them `π` preserves measure. -/ +theorem quasiMeasurePreserving_proj : + QuasiMeasurePreserving (proj : EuclideanSpace ℝ d → UnitAddTorus d) volume volume := by + refine ⟨measurable_proj.aemeasurable, Measure.AbsolutelyContinuous.mk fun s hs h0 => ?_⟩ + rw [Measure.map_apply measurable_proj hs] + have hcover : proj ⁻¹' s ⊆ + ⋃ m : d → ℤ, proj ⁻¹' s ∩ periodBox (fun i => (m i : ℝ)) := fun x hx => + mem_iUnion.2 ⟨fun i => ⌈x i⌉ - 1, hx, mem_periodBox_ceil x⟩ + refine measure_mono_null hcover (measure_iUnion_null fun m => ?_) + rw [← Measure.restrict_apply (measurable_proj hs), + (measurePreserving_proj_periodBox _).measure_preimage hs.nullMeasurableSet, h0] + +/-- **Almost everywhere statements lift**: if `P(t)` holds for almost every `t ∈ 𝕋^d`, then +`P(π x)` holds for almost every `x ∈ ℝ^d`. -/ +theorem ae_comp_proj {P : UnitAddTorus d → Prop} (h : ∀ᵐ t ∂volume, P t) : + ∀ᵐ x ∂(volume : Measure (EuclideanSpace ℝ d)), P (proj x) := + quasiMeasurePreserving_proj.ae h + +/-! ### Convolutions and differences of lifts -/ + +/-- **Convolution commutes with the lift**: `(Φ ⋆ h)(π x) = (Φ ⋆ (h ∘ π))(x)`, a convolution on +`ℝ^d` on the right. -/ +theorem econv_proj (Φ : EuclideanSpace ℝ d → ℂ) (h : UnitAddTorus d → ℂ) + (x : EuclideanSpace ℝ d) : econv Φ h (proj x) = Rd.conv Φ (h ∘ proj) volume x := by + rw [Rd.conv_apply] + simp only [econv, Function.comp_apply, map_sub] + +omit [Fintype d] in +/-- **Differences commute with the lift**: `Δ^L_{π h} f(π x) = Δ^L_h (f ∘ π)(x)`. -/ +theorem higherDiff_comp_proj (f : UnitAddTorus d → ℂ) (L : ℕ) (h x : EuclideanSpace ℝ d) : + (fwdDiff (proj h))^[L] f (proj x) = (fwdDiff h)^[L] (f ∘ proj) x := by + simp only [fwdDiff_iter_eq_sum_shift, Function.comp_apply, map_add, map_nsmul] + +/-! ### Counting boxes -/ + +/-- A ball `B(x, r)` lies in the union of the period boxes `P_m` with +`⌈x_i - r⌉ - 1 ≤ m_i ≤ ⌈x_i + r⌉ - 1`. -/ +theorem ball_subset_iUnion_periodBox (x : EuclideanSpace ℝ d) (r : ℝ) : + ball x r ⊆ ⋃ (m : d → ℤ) (_ : ∀ i, m i ∈ Finset.Icc (⌈x i - r⌉ - 1) (⌈x i + r⌉ - 1)), + periodBox (fun i => (m i : ℝ)) := by + intro y hy + refine mem_iUnion₂.2 ⟨fun i => ⌈y i⌉ - 1, fun i => ?_, mem_periodBox_ceil y⟩ + have hi : |y i - x i| < r := by + simpa [Real.dist_eq] using (PiLp.dist_apply_le y x i).trans_lt (mem_ball.1 hy) + rw [abs_lt] at hi + rw [Finset.mem_Icc] + exact ⟨by linarith [Int.ceil_mono (show x i - r ≤ y i by linarith)], + by linarith [Int.ceil_mono (show y i ≤ x i + r by linarith)]⟩ + +/-- For `r ≥ 0`, the interval `[⌈a - r⌉ - 1, ⌈a + r⌉ - 1]` of integers has at most `2r + 2` +elements. -/ +theorem card_Icc_ceil_le (a r : ℝ) (hr : 0 ≤ r) : + ((Finset.Icc (⌈a - r⌉ - 1) (⌈a + r⌉ - 1)).card : ℝ) ≤ 2 * r + 2 := by + rw [Int.card_Icc] + have h1 : (⌈a + r⌉ : ℝ) < a + r + 1 := Int.ceil_lt_add_one _ + have h2 : a - r ≤ (⌈a - r⌉ : ℝ) := Int.le_ceil _ + have h : (((⌈a + r⌉ - 1 + 1 - (⌈a - r⌉ - 1)).toNat : ℤ) : ℝ) ≤ 2 * r + 2 := by + rw [Int.toNat_eq_max] + push_cast + exact max_le (by linarith) (by linarith) + exact_mod_cast h + +/-- **Counting boxes**: `∫_{B(x,r)} g(π y) dy ≤ (2r + 2)^d ∫_{𝕋^d} g` for every +`g : 𝕋^d → [0, ∞]` and `r ∈ ℝ`: the ball meets at most `(2r + 2)^d` period boxes, and each +contributes `∫_{𝕋^d} g`; for `r ≤ 0` the ball is empty. -/ +theorem setLIntegral_ball_comp_proj_le (g : UnitAddTorus d → ℝ≥0∞) (x : EuclideanSpace ℝ d) + (r : ℝ) : + ∫⁻ y in ball x r, g (proj y) ≤ + ENNReal.ofReal (2 * r + 2) ^ Fintype.card d * ∫⁻ t, g t := by + classical + rcases le_or_gt r 0 with hr | hr + · rw [ball_eq_empty.2 hr, Measure.restrict_empty, lintegral_zero_measure] + exact zero_le + set M : Finset (d → ℤ) := Fintype.piFinset fun i => Finset.Icc (⌈x i - r⌉ - 1) (⌈x i + r⌉ - 1) + have hsub : ball x r ⊆ ⋃ m ∈ M, periodBox (fun i => (m i : ℝ)) := by + refine (ball_subset_iUnion_periodBox x r).trans fun y hy => ?_ + obtain ⟨m, hm, hy⟩ := mem_iUnion₂.1 hy + exact mem_iUnion₂.2 ⟨m, Fintype.mem_piFinset.2 hm, hy⟩ + have hcard : (M.card : ℝ≥0∞) ≤ ENNReal.ofReal (2 * r + 2) ^ Fintype.card d := by + rw [Fintype.card_piFinset, Nat.cast_prod, ← Finset.card_univ, ← Finset.prod_const] + refine Finset.prod_le_prod fun i _ => ?_ + rw [← ENNReal.ofReal_natCast] + exact ENNReal.ofReal_le_ofReal (card_Icc_ceil_le (x i) r hr.le) + calc ∫⁻ y in ball x r, g (proj y) + ≤ ∫⁻ y in ⋃ m ∈ M, periodBox (fun i => (m i : ℝ)), g (proj y) := lintegral_mono_set hsub + _ = ∑ m ∈ M, ∫⁻ y in periodBox (fun i => (m i : ℝ)), g (proj y) := + lintegral_biUnion_finset (fun m _ m' _ h => pairwise_disjoint_periodBox h) + (fun m _ => measurableSet_periodBox _) _ + _ = M.card * ∫⁻ t, g t := by + simp only [lintegral_periodBox, Finset.sum_const, nsmul_eq_mul] + _ ≤ _ := by gcongr + +/-- **Lifts of integrable functions are locally integrable**: by counting boxes every ball has +finite integral. -/ +theorem locallyIntegrable_comp_proj {h : UnitAddTorus d → ℂ} (hh : Integrable h volume) : + LocallyIntegrable (h ∘ proj) volume := fun x => by + refine ⟨ball x 1, ball_mem_nhds x one_pos, ?_, ?_⟩ + · exact (hh.aestronglyMeasurable.comp_quasiMeasurePreserving + quasiMeasurePreserving_proj).restrict + · refine (setLIntegral_ball_comp_proj_le (fun t => ‖h t‖ₑ) x 1).trans_lt ?_ + exact ENNReal.mul_lt_top (ENNReal.pow_lt_top ENNReal.ofReal_lt_top) hh.2 + +section Lp + +variable {p : ℝ≥0∞} [Fact (1 ≤ p)] + +/-- The lift `h ∘ π` of `h ∈ L_p(𝕋^d)`, `1 ≤ p`, is locally integrable on `ℝ^d`. -/ +theorem locallyIntegrable_comp_proj_Lp (h : Lp ℂ p (volume : Measure (UnitAddTorus d))) : + LocallyIntegrable (⇑h ∘ proj) volume := + locallyIntegrable_comp_proj ((Lp.memLp h).integrable Fact.out) + +end Lp + +omit [Fintype d] in +/-- The box `(-1, 2]^d` is the union of the period boxes `P_m` with `m ∈ {-1, 0, 1}^d`. -/ +theorem tripleBox_eq_biUnion : + tripleBox (d := d) = ⋃ (m : d → ℤ) (_ : ∀ i, -1 ≤ m i ∧ m i ≤ 1), + periodBox (fun i => (m i : ℝ)) := by + ext y + simp only [mem_iUnion, exists_prop] + constructor + · intro hy + refine ⟨fun i => ⌈y i⌉ - 1, fun i => ?_, mem_periodBox_ceil y⟩ + obtain ⟨h1, h2⟩ := hy i + have h3 : (0 : ℤ) ≤ ⌈y i⌉ := Int.ceil_nonneg_of_neg_one_lt h1 + have h4 : ⌈y i⌉ ≤ 2 := Int.ceil_le.2 (by exact_mod_cast h2) + exact ⟨by simp only; omega, by simp only; omega⟩ + · rintro ⟨m, hm, hy⟩ i + obtain ⟨h1, h2⟩ := hy i + have hm1 : (-1 : ℝ) ≤ m i := by exact_mod_cast (hm i).1 + have hm2 : (m i : ℝ) ≤ 1 := by exact_mod_cast (hm i).2 + exact ⟨by linarith, by linarith⟩ + +/-- At a point of `P_0 = (0, 1]^d`, every ball of radius `r ≤ 1` lies in the box `(-1, 2]^d`. -/ +theorem ball_subset_tripleBox {x : EuclideanSpace ℝ d} (hx : x ∈ periodBox 0) {r : ℝ} + (hr : r ≤ 1) : ball x r ⊆ tripleBox := by + intro y hy i + have hi : |y i - x i| < 1 := by + simpa [Real.dist_eq] using ((PiLp.dist_apply_le y x i).trans_lt (mem_ball.1 hy)).trans_le hr + rw [abs_lt] at hi + obtain ⟨h1, h2⟩ := hx i + simp only [Pi.zero_apply, zero_add] at h1 h2 + exact ⟨by linarith, by linarith⟩ + +/-- **Points outside the box are far**: if `x ∈ P_0 = (0, 1]^d` and `x - y ∉ (-1, 2]^d`, then +`‖y‖ ≥ 1`, since some coordinate has `y_i ≥ x_i + 1 > 1` or `y_i < x_i - 2 ≤ -1`. -/ +theorem one_le_norm_of_sub_notMem_tripleBox {x y : EuclideanSpace ℝ d} (hx : x ∈ periodBox 0) + (h : x - y ∉ tripleBox) : 1 ≤ ‖y‖ := by + simp only [tripleBox, mem_ofPred_eq, not_forall] at h + obtain ⟨i, hi⟩ := h + obtain ⟨h1, h2⟩ := hx i + simp only [Pi.zero_apply, zero_add] at h1 h2 + rw [PiLp.sub_apply, mem_Ioc, not_and_or, not_lt, not_le] at hi + have hyi : 1 ≤ |y i| := by + rcases hi with hi | hi + · rw [abs_of_pos (by linarith)] + linarith + · rw [abs_of_neg (by linarith)] + linarith + exact hyi.trans (by rw [← Real.norm_eq_abs]; exact PiLp.norm_apply_le y i) + +/-- **The box of side `3`**: `∫_{(-1,2]^d} g(π y) dy = 3^d ∫_{𝕋^d} g`, since `(-1, 2]^d` is the +disjoint union of `3^d` period boxes. -/ +theorem setLIntegral_tripleBox (g : UnitAddTorus d → ℝ≥0∞) : + ∫⁻ y in tripleBox, g (proj y) = 3 ^ Fintype.card d * ∫⁻ t, g t := by + classical + have h : tripleBox (d := d) = ⋃ m ∈ Fintype.piFinset fun _ : d => Finset.Icc (-1 : ℤ) 1, + periodBox (fun i => (m i : ℝ)) := by + simp only [tripleBox_eq_biUnion, Fintype.mem_piFinset, Finset.mem_Icc] + rw [h, lintegral_biUnion_finset + (fun m _ m' _ h => pairwise_disjoint_periodBox h) (fun m _ => measurableSet_periodBox _)] + simp only [lintegral_periodBox, Finset.sum_const, nsmul_eq_mul, Fintype.card_piFinset, + Int.card_Icc, Finset.prod_const, Finset.card_univ] + norm_num + +/-! ### `L_p` norms on the box `(-1, 2]^d` -/ + +/-- `L_p` norms on the box `(-1, 2]^d`: +`‖1_{(-1,2]^d} (F ∘ π)‖_{L_p(ℝ^d)} = 3^{d/p} ‖F‖_{L_p(𝕋^d)}` for `0 < p < ∞` and every almost +everywhere strongly measurable `F` on `𝕋^d` with values in a space with an extended norm, such as +`ℂ` or `[0, ∞]` (`Torus.setLIntegral_tripleBox` for `|F|^p`). -/ +theorem eLpNorm_indicator_tripleBox_comp_proj {ε : Type*} [TopologicalSpace ε] + [ESeminormedAddMonoid ε] {p : ℝ≥0∞} (hp0 : p ≠ 0) (hp : p ≠ ∞) {F : UnitAddTorus d → ε} + (hF : AEStronglyMeasurable F volume) : + eLpNorm (tripleBox.indicator (F ∘ proj)) p volume = + 3 ^ ((Fintype.card d : ℝ) / p.toReal) * eLpNorm F p volume := by + rw [eLpNorm_indicator_eq_eLpNorm_restrict measurableSet_tripleBox.nullMeasurableSet, + eLpNorm_eq_lintegral_rpow_eNorm_toReal hp0 hp + (hF.comp_quasiMeasurePreserving quasiMeasurePreserving_proj).restrict, + eLpNorm_eq_lintegral_rpow_eNorm_toReal hp0 hp hF, Function.comp_def, + setLIntegral_tripleBox (fun t => ‖F t‖ₑ ^ p.toReal), + ENNReal.mul_rpow_of_nonneg _ _ (by positivity), ← ENNReal.rpow_natCast, ← ENNReal.rpow_mul, + mul_one_div] + +/-- `L_p` norms on the box `(-1, 2]^d` for functions with values in `[0, ∞]`: +`‖1_{(-1,2]^d} (G ∘ π)‖_{L_p(ℝ^d)} = 3^{d/p} ‖G‖_{L_p(𝕋^d)}` for `0 < p < ∞` and almost everywhere +measurable `G : 𝕋^d → [0, ∞]` (`Torus.eLpNorm_indicator_tripleBox_comp_proj`). -/ +theorem eLpNorm_indicator_tripleBox {p : ℝ≥0∞} (hp0 : p ≠ 0) (hp : p ≠ ∞) + {G : UnitAddTorus d → ℝ≥0∞} (hG : AEMeasurable G volume) : + eLpNorm (tripleBox.indicator fun y => G (proj y)) p volume = + 3 ^ ((Fintype.card d : ℝ) / p.toReal) * eLpNorm G p volume := + eLpNorm_indicator_tripleBox_comp_proj hp0 hp hG.aestronglyMeasurable + +/-- The part `1_{(-1,2]^d} (f ∘ π)` of the lift of `f ∈ L_p(𝕋^d)`, `0 < p < ∞`, lies in +`L_p(ℝ^d)`. -/ +theorem memLp_indicator_tripleBox_comp_proj {p : ℝ≥0∞} (hp0 : p ≠ 0) (hp : p ≠ ∞) + {f : UnitAddTorus d → ℂ} (hf : MemLp f p volume) : + MemLp (tripleBox.indicator (f ∘ proj)) p volume := by + rw [memLp_iff, eLpNorm_indicator_tripleBox_comp_proj hp0 hp hf.aestronglyMeasurable] + exact ENNReal.mul_lt_top (ENNReal.rpow_lt_top_of_nonneg (by positivity) (by norm_num)) hf + +end Torus diff --git a/LeanPool/FunctionSpaces/Torus/SingularIntegrals.lean b/LeanPool/FunctionSpaces/Torus/SingularIntegrals.lean new file mode 100644 index 0000000000..c21337c220 --- /dev/null +++ b/LeanPool/FunctionSpaces/Torus/SingularIntegrals.lean @@ -0,0 +1,376 @@ +/- +Copyright (c) 2026 Mario Ullrich. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Mario Ullrich +-/ +module + +public import LeanPool.FunctionSpaces.Torus.FeffermanStein +public import LeanPool.FunctionSpaces.Rd.SingularIntegrals.VectorValuedSingularIntegrals +public import LeanPool.FunctionSpaces.Rd.Sobolev.DerivativeKernels + +/- +Modified for Lean Pool: module names and imports adapted. +-/ + +/-! +# Vector-valued singular integrals on the torus + +Let `(θ_j)_{j ∈ ℕ}` be a Calderón–Zygmund family on `ℝ^d`, `d ≥ 1`, with overlap `B` and +Hörmander constant `H` (`Rd.IsCZFamily`), acting on the torus `𝕋^d` by +`(θ_j ⋆ f)(t) = ∫ θ_j(y) f(t - π y) dy` (`Torus.econv`). For `1 < p < ∞`, with the constant +`C = 3^{d/p} S_{d,p}(B, H) + D` (`Torus.periodicCZConst`), where `S_{d,p}(B, H)` is the strong +type constant on `ℝ^d` (`Rd.czConst`) and `D` bounds the **far mass** +`∫_{‖y‖ ≥ 1} ∑_j |θ_j(y)| dy` (`Torus.farMass`): + +* **the analysis operator** (`Torus.eLpNorm_lqNorm_econv_le`): + `‖ ‖((θ_j ⋆ f)(t))_j‖_{ℓ_2} ‖_{L_p(𝕋^d)} ≤ C ‖f‖_p` for every `f ∈ L_p(𝕋^d)`; +* **the synthesis operators** (`Torus.eLpNorm_sum_econv_le`): + `‖∑_{j ∈ s} θ_j ⋆ g_j‖_{L_p(𝕋^d)} ≤ C ‖ ‖(g_j(t))_j‖_{ℓ_2} ‖_{L_p(𝕋^d)}` for every finite set + `s` and all measurable `g_j ∈ L_p(𝕋^d)`. + +The proof transfers the bounds of `ℝ^d` (`Rd.IsCZFamily.eLpNorm_lqNorm_conv_le`, +`Rd.IsCZFamily.eLpNorm_sum_conv_le`) by localising the periodic lift, as for the +Fefferman–Stein inequality. At a point `x` of the period box `P_0 = (0, 1]^d`, +`(θ_j ⋆ f)(π x) = (θ_j ⋆ (f ∘ π))(x)`; the part of `f ∘ π` on the box `(-1, 2]^d` is a function +on `ℝ^d` with `L_p` norm `3^{d/p} ‖f‖_p` (`Torus.eLpNorm_indicator_tripleBox_comp_proj`), and the +rest is only seen by `θ_j` at points `‖y‖ ≥ 1` (`Torus.one_le_norm_of_sub_notMem_tripleBox`, +`Torus.enorm_econv_proj_sub_conv_le`). These far parts are bounded at every point by the +**far convolution** `∫_{‖y‖ ≥ 1} (∑_j |θ_j(y)|) G(t - π y) dy` (`Torus.farConv`), whose `L_p` +norm is at most the far mass times `‖G‖_p` by Young's inequality (`Torus.eLpNorm_farConv_le`). +For dilations `θ_j = (G_j)_{2^j}` of a uniform Schwartz family with bounds `A` the far mass is at +most `2 T_A`, with the tail constant `T_A = Rd.familyTailConst` (`Torus.farMass_dilate_le`); this +covers the blocks `ψ_j`, the synthesis kernels `psiDual_j` and the derivative families. +-/ + +@[expose] public section + +open MeasureTheory UnitAddTorus Set Filter +open scoped ENNReal TorusHaar SchwartzMap + +open ENNReal (lqNorm) + +namespace Torus + +variable {d : Type*} [Fintype d] + +/-! ### The far mass -/ + +/-- The **far mass** `∫_{‖y‖ ≥ 1} ∑_j |θ_j(y)| dy` of a family of kernels on `ℝ^d`: the part of +the kernels that the localisation to the box `(-1, 2]^d` leaves over. -/ +noncomputable def farMass (θ : ℕ → EuclideanSpace ℝ d → ℂ) : ℝ≥0∞ := + ∫⁻ y in {y : EuclideanSpace ℝ d | 1 ≤ ‖y‖}, ∑' j, ‖θ j y‖ₑ + +/-- **The far mass of a dilation family**: for a uniform Schwartz family `(G_j)_j` with bounds `A`, +the dilates `θ_j = (G_j)_{2^j}` have far mass at most `2 T_A`, with the tail constant +`T_A = Rd.familyTailConst (EuclideanSpace ℝ d) A 0 1`. Each dilate contributes at most +`T_A (1 + 2^j)⁻¹ ≤ T_A 2^{-j}` (`Rd.setLIntegral_enorm_dilate_schwartz_le`), and +`∑_j 2^{-j} = 2`. -/ +theorem farMass_dilate_le {G : ℕ → 𝓢(EuclideanSpace ℝ d, ℂ)} {A : ℕ → ℕ → ℝ} + (h : Rd.IsUniformSchwartz G A) : + farMass (fun j => Rd.dilate (2 ^ j) (G j)) ≤ + 2 * Rd.familyTailConst (EuclideanSpace ℝ d) A 0 1 := by + have hmeas : ∀ j, AEMeasurable (fun y => ‖Rd.dilate (2 ^ j) (G j : EuclideanSpace ℝ d → ℂ) y‖ₑ) + (volume.restrict {y : EuclideanSpace ℝ d | 1 ≤ ‖y‖}) := fun j => + (Rd.continuous_dilate (G j).continuous _).measurable.eNorm.aemeasurable + rw [farMass, lintegral_tsum hmeas] + calc ∑' j, ∫⁻ y in {y : EuclideanSpace ℝ d | 1 ≤ ‖y‖}, + ‖Rd.dilate (2 ^ j) (G j : EuclideanSpace ℝ d → ℂ) y‖ₑ + ≤ ∑' j : ℕ, Rd.familyTailConst (EuclideanSpace ℝ d) A 0 1 * (2⁻¹ : ℝ≥0∞) ^ j := + tsum_le_tsum fun j => (Rd.setLIntegral_enorm_dilate_schwartz_le (G j) 1 j 1).trans + (mul_le_mul' (Rd.tailConst_le_familyTailConst h j 0 1) + (Rd.inv_one_add_ofReal_two_pow_le j)) + _ = 2 * Rd.familyTailConst (EuclideanSpace ℝ d) A 0 1 := by + rw [ENNReal.tsum_mul_left, ENNReal.tsum_geometric_two, mul_comm] + +/-- The far mass of the Littlewood–Paley blocks `ψ_j = (psiBase j)_{2^j}` is at most `2 T_{A^ψ}`, +with the seminorm bounds `A^ψ = Rd.psiBaseBound`. -/ +theorem farMass_psi_le : + farMass (Rd.psi (V := EuclideanSpace ℝ d)) ≤ + 2 * Rd.familyTailConst (EuclideanSpace ℝ d) (Rd.psiBaseBound (EuclideanSpace ℝ d)) 0 1 := by + have h := farMass_dilate_le (Rd.isUniformSchwartz_psiBase (V := EuclideanSpace ℝ d)) + rwa [show (fun j => Rd.dilate (2 ^ j) (Rd.psiBase (V := EuclideanSpace ℝ d) j : + EuclideanSpace ℝ d → ℂ)) = Rd.psi from funext Rd.dilate_psiBase] at h + +/-- The far mass of the synthesis kernels `psiDual_j = (psiDualBase j)_{2^j}` is at most +`2 T_{Ã}`, with the seminorm bounds `Ã = Rd.psiDualBaseBound`. -/ +theorem farMass_psiDual_le : + farMass (Rd.psiDual (V := EuclideanSpace ℝ d)) ≤ + 2 * Rd.familyTailConst (EuclideanSpace ℝ d) (Rd.psiDualBaseBound (EuclideanSpace ℝ d)) + 0 1 := by + have h := farMass_dilate_le (Rd.isUniformSchwartz_psiDualBase (V := EuclideanSpace ℝ d)) + rwa [show (fun j => Rd.dilate (2 ^ j) (Rd.psiDualBase (V := EuclideanSpace ℝ d) j : + EuclideanSpace ℝ d → ℂ)) = Rd.psiDual from funext Rd.dilate_psiDualBase] at h + +/-- The far mass of the derivative family `j ↦ (η_i)_{2^j}` of a multi-index `i` is at most +`2 T_{A^{η_i}}`, with the seminorm bounds `A^{η_i} = Rd.derivKernelBound i`. -/ +theorem farMass_derivFamily_le {m : ℕ} (i : Fin m → Fin (Module.finrank ℝ (EuclideanSpace ℝ d))) : + farMass (Rd.derivFamily i) ≤ + 2 * Rd.familyTailConst (EuclideanSpace ℝ d) (Rd.derivKernelBound i) 0 1 := + farMass_dilate_le (Rd.isUniformSchwartz_derivKernel i) + +/-- The far mass of the dual derivative family `j ↦ (∂^w psiDualBase_j)_{2^j}` of directions +`w ∈ (ℝ^d)^k` is at most `2 T_{A^w}`, with the seminorm bounds `A^w = Rd.derivDualBound w`. -/ +theorem farMass_derivDualFamily_le {k : ℕ} (w : Fin k → EuclideanSpace ℝ d) : + farMass (Rd.derivDualFamily w) ≤ + 2 * Rd.familyTailConst (EuclideanSpace ℝ d) (Rd.derivDualBound w) 0 1 := + farMass_dilate_le (Rd.isUniformSchwartz_derivDualBase w) + +/-! ### The far convolution -/ + +/-- The **far convolution** `t ↦ ∫_{‖y‖ ≥ 1} (∑_j |θ_j(y)|) G(t - π y) dy` of `G : 𝕋^d → [0, ∞]` +with the far parts of a family of kernels on `ℝ^d`; it bounds the far parts of the convolutions +`θ_j ⋆ g_j` at every point. -/ +noncomputable def farConv (θ : ℕ → EuclideanSpace ℝ d → ℂ) (G : UnitAddTorus d → ℝ≥0∞) + (t : UnitAddTorus d) : ℝ≥0∞ := + ∫⁻ y in {y : EuclideanSpace ℝ d | 1 ≤ ‖y‖}, (∑' j, ‖θ j y‖ₑ) * G (t - proj y) + +/-- The kernel `y ↦ ∑_j |θ_j(y)|` of the far parts is almost everywhere measurable for every +measure `ν` below the Lebesgue measure, such as its restriction to `{‖y‖ ≥ 1}`. -/ +theorem aemeasurable_tsum_enorm {θ : ℕ → EuclideanSpace ℝ d → ℂ} + (hθ : ∀ j, AEStronglyMeasurable (θ j) volume) (ν : Measure (EuclideanSpace ℝ d)) + (hν : ν ≤ volume) : AEMeasurable (fun y => ∑' j, ‖θ j y‖ₑ) ν := + AEMeasurable.tsum fun j => ((hθ j).mono_measure hν).eNorm + +/-- **Young's inequality for kernels on `ℝ^d` acting on the torus**, for nonnegative functions: +for `1 ≤ q`, an s-finite measure `ν` on `ℝ^d`, an almost everywhere measurable +`a : ℝ^d → [0, ∞]` and a measurable `G : 𝕋^d → [0, ∞]`, +`∫_{𝕋^d} (∫ a(y) G(t - π y) dν(y))^q dt ≤ (∫ a dν)^q ∫_{𝕋^d} G^q`. This is the torus form of +`MeasureTheory.lintegral_rpow_lintegral_mul_le`: the kernel form +`MeasureTheory.lintegral_rpow_lintegral_kernel_le` for `K(t, y) = G(t - π y)`, with +`∫_{𝕋^d} G(t - π y)^q dt = ∫_{𝕋^d} G^q` by the translation invariance of the Haar measure. -/ +theorem lintegral_rpow_lintegral_mul_comp_sub_proj_le {ν : Measure (EuclideanSpace ℝ d)} + [SFinite ν] {q : ℝ} (hq1 : 1 ≤ q) {a : EuclideanSpace ℝ d → ℝ≥0∞} (ha : AEMeasurable a ν) + {G : UnitAddTorus d → ℝ≥0∞} (hG : Measurable G) : + ∫⁻ t, (∫⁻ y, a y * G (t - proj y) ∂ν) ^ q ≤ (∫⁻ y, a y ∂ν) ^ q * ∫⁻ t, G t ^ q := + lintegral_rpow_lintegral_kernel_le hq1 ha (K := fun t y => G (t - proj y)) + (hG.comp (measurable_fst.sub (measurable_proj.comp measurable_snd))).aemeasurable + fun y => (lintegral_sub_right_eq_self (fun t => G t ^ q) (proj y)).le + +/-- For almost everywhere strongly measurable kernels `θ_j` and measurable `G`, the far +convolution `Torus.farConv θ G` is almost everywhere measurable. -/ +theorem aemeasurable_farConv {θ : ℕ → EuclideanSpace ℝ d → ℂ} + (hθ : ∀ j, AEStronglyMeasurable (θ j) volume) {G : UnitAddTorus d → ℝ≥0∞} (hG : Measurable G) : + AEMeasurable (farConv θ G) volume := by + have hprod : AEMeasurable (Function.uncurry fun (t : UnitAddTorus d) y => + (∑' j, ‖θ j y‖ₑ) * G (t - proj y)) + (volume.prod (volume.restrict {y : EuclideanSpace ℝ d | 1 ≤ ‖y‖})) := + (aemeasurable_tsum_enorm hθ _ Measure.restrict_le_self).comp_snd.mul + (hG.comp (measurable_fst.sub (measurable_proj.comp measurable_snd))).aemeasurable + exact hprod.lintegral_prod_right' + +/-- **Young's inequality for the far convolution**: for almost everywhere strongly measurable +kernels `θ_j`, `1 ≤ p < ∞` and measurable `G : 𝕋^d → [0, ∞]`, +`‖t ↦ ∫_{‖y‖ ≥ 1} (∑_j |θ_j(y)|) G(t - π y) dy‖_p ≤ M_θ ‖G‖_p` with the far mass +`M_θ = Torus.farMass θ`. -/ +theorem eLpNorm_farConv_le {θ : ℕ → EuclideanSpace ℝ d → ℂ} + (hθ : ∀ j, AEStronglyMeasurable (θ j) volume) {p : ℝ≥0∞} (hp1 : 1 ≤ p) (hp : p ≠ ∞) + {G : UnitAddTorus d → ℝ≥0∞} (hG : Measurable G) : + eLpNorm (farConv θ G) p volume ≤ farMass θ * eLpNorm G p volume := by + have hp0 : p ≠ 0 := (zero_lt_one.trans_le hp1).ne' + have hq1 : 1 ≤ p.toReal := ENNReal.one_le_toReal_of_one_le hp1 hp + refine eLpNorm_le_of_lintegral_le (aemeasurable_farConv hθ hG).aestronglyMeasurable hp0 hp ?_ + rw [ENNReal.mul_rpow_of_nonneg _ _ (by linarith), eLpNorm_rpow_eq_lintegral hp0 hp + hG.aemeasurable] + simp only [eNorm_eq_self] + exact lintegral_rpow_lintegral_mul_comp_sub_proj_le hq1 + (aemeasurable_tsum_enorm hθ _ Measure.restrict_le_self) hG + +/-- **The far parts as a far convolution**: `∑_j ∫_{‖y‖ ≥ 1} |θ_j(y)| G(t - π y) dy` is the far +convolution of `G`, by monotone convergence. -/ +theorem tsum_setLIntegral_eq_farConv {θ : ℕ → EuclideanSpace ℝ d → ℂ} + (hθ : ∀ j, AEStronglyMeasurable (θ j) volume) {G : UnitAddTorus d → ℝ≥0∞} (hG : Measurable G) + (t : UnitAddTorus d) : + ∑' j, ∫⁻ y in {y : EuclideanSpace ℝ d | 1 ≤ ‖y‖}, ‖θ j y‖ₑ * G (t - proj y) = + farConv θ G t := by + rw [farConv, ← lintegral_tsum (f := fun j y => ‖θ j y‖ₑ * G (t - proj y)) fun j => + (hθ j).restrict.eNorm.mul (hG.comp (measurable_const.sub measurable_proj)).aemeasurable] + exact lintegral_congr fun y => ENNReal.tsum_mul_right + +/-! ### Pointwise localisation -/ + +/-- **Localisation of a convolution**: at `x ∈ P_0 = (0, 1]^d`, if the convolution integral of +`θ` and `f` converges absolutely at `π x`, then +`|(θ ⋆ f)(π x) - (θ ⋆ 1_{(-1,2]^d} (f ∘ π))(x)| ≤ ∫_{‖y‖ ≥ 1} |θ(y)| |f(π x - π y)| dy`, with +the convolution on `ℝ^d` in the second term. The difference is the integral over the `y` with +`x - y ∉ (-1, 2]^d`, and these have `‖y‖ ≥ 1`. -/ +theorem enorm_econv_proj_sub_conv_le {θ : EuclideanSpace ℝ d → ℂ} {f : UnitAddTorus d → ℂ} + {x : EuclideanSpace ℝ d} (hx : x ∈ periodBox 0) + (hint : Integrable fun y => θ y * f (proj x - proj y)) : + ‖econv θ f (proj x) - Rd.conv θ (tripleBox.indicator (f ∘ proj)) volume x‖ₑ ≤ + ∫⁻ y in {y : EuclideanSpace ℝ d | 1 ≤ ‖y‖}, ‖θ y‖ₑ * ‖f (proj x - proj y)‖ₑ := by + set S : Set (EuclideanSpace ℝ d) := {y | x - y ∈ tripleBox} + have hS : MeasurableSet S := + measurableSet_tripleBox.preimage (measurable_const.sub measurable_id) + have hconv : Rd.conv θ (tripleBox.indicator (f ∘ proj)) volume x = + ∫ y in S, θ y * f (proj x - proj y) := by + rw [Rd.conv_apply, ← integral_indicator hS] + refine integral_congr_ae (Eventually.of_forall fun y => ?_) + dsimp only + by_cases hy : x - y ∈ tripleBox + · rw [indicator_of_mem hy, indicator_of_mem (show y ∈ S from hy), Function.comp_apply, + map_sub] + · rw [indicator_of_notMem hy, indicator_of_notMem (show y ∉ S from hy), mul_zero] + have hsplit := integral_add_compl hS hint + rw [hconv, show econv θ f (proj x) = ∫ y, θ y * f (proj x - proj y) from rfl, ← hsplit, + add_sub_cancel_left] + refine (eNorm_integral_le_lintegral_eNorm _).trans ?_ + simp only [eNorm_mul] + exact lintegral_mono_set fun y hy => one_le_norm_of_sub_notMem_tripleBox hx hy + +/-- **The convolution integrals of lifts converge absolutely**: for integrable kernels `θ_j` and +measurable `g_j ∈ L_1(𝕋^d)`, for almost every `x ∈ ℝ^d` and every `j` the integral +`∫ θ_j(y) g_j(π x - π y) dy` converges absolutely (`Torus.ae_integrable_econv`, lifted by +`Torus.ae_comp_proj`). -/ +theorem ae_integrable_econv_proj {θ : ℕ → EuclideanSpace ℝ d → ℂ} (hθ : ∀ j, Integrable (θ j)) + {g : ℕ → UnitAddTorus d → ℂ} (hg : ∀ j, Measurable (g j)) (hgi : ∀ j, Integrable (g j)) : + ∀ᵐ x ∂(volume : Measure (EuclideanSpace ℝ d)), ∀ j, + Integrable fun y => θ j y * g j (proj x - proj y) := + ae_all_iff.2 fun j => ae_comp_proj (ae_integrable_econv (hθ j) (hg j) (hgi j)) + +/-- **Localisation of the analysis operator**: at `x ∈ P_0` where all convolution integrals +converge absolutely, +`‖((θ_j ⋆ f)(π x))_j‖_{ℓ_2} ≤ ‖((θ_j ⋆ 1_{(-1,2]^d} (f ∘ π))(x))_j‖_{ℓ_2} + F(π x)` with the far +convolution `F` of `|f|` (`Torus.farConv`): the triangle inequality in `ℓ_2`, and +`‖·‖_{ℓ_2} ≤ ‖·‖_{ℓ_1}` for the far parts. -/ +theorem lqNorm_econv_proj_le {θ : ℕ → EuclideanSpace ℝ d → ℂ} + (hθ : ∀ j, AEStronglyMeasurable (θ j) volume) {f : UnitAddTorus d → ℂ} (hf : Measurable f) + {x : EuclideanSpace ℝ d} (hx : x ∈ periodBox 0) + (hint : ∀ j, Integrable fun y => θ j y * f (proj x - proj y)) : + lqNorm 2 (fun j => ‖econv (θ j) f (proj x)‖ₑ) ≤ + lqNorm 2 (fun j => ‖Rd.conv (θ j) (tripleBox.indicator (f ∘ proj)) volume x‖ₑ) + + farConv θ (fun t => ‖f t‖ₑ) (proj x) := by + have hj : ∀ j, ‖econv (θ j) f (proj x)‖ₑ ≤ + ‖Rd.conv (θ j) (tripleBox.indicator (f ∘ proj)) volume x‖ₑ + + ∫⁻ y in {y : EuclideanSpace ℝ d | 1 ≤ ‖y‖}, ‖θ j y‖ₑ * ‖f (proj x - proj y)‖ₑ := by + intro j + calc ‖econv (θ j) f (proj x)‖ₑ + = ‖Rd.conv (θ j) (tripleBox.indicator (f ∘ proj)) volume x + + (econv (θ j) f (proj x) - + Rd.conv (θ j) (tripleBox.indicator (f ∘ proj)) volume x)‖ₑ := by + rw [add_sub_cancel] + _ ≤ _ := (eNorm_add_le _ _).trans + (add_le_add le_rfl (enorm_econv_proj_sub_conv_le hx (hint j))) + refine (ENNReal.lqNorm_mono hj).trans ((ENNReal.lqNorm_add_le one_le_two _ _).trans ?_) + refine add_le_add le_rfl ((ENNReal.lqNorm_le_lqNorm_one one_le_two _).trans_eq ?_) + exact tsum_setLIntegral_eq_farConv hθ hf.eNorm (proj x) + +/-- **Localisation of the synthesis operators**: at `x ∈ P_0` where all convolution integrals +converge absolutely, for every finite set `s`, +`|∑_{j ∈ s} (θ_j ⋆ g_j)(π x)| ≤ |∑_{j ∈ s} (θ_j ⋆ 1_{(-1,2]^d} (g_j ∘ π))(x)| + F(π x)` with the +far convolution `F` of `G(t) = ‖(g_j(t))_j‖_{ℓ_2}` (`Torus.farConv`), since `|g_j| ≤ G`. -/ +theorem enorm_sum_econv_proj_le {θ : ℕ → EuclideanSpace ℝ d → ℂ} + (hθ : ∀ j, AEStronglyMeasurable (θ j) volume) {g : ℕ → UnitAddTorus d → ℂ} + (hg : ∀ j, Measurable (g j)) (s : Finset ℕ) {x : EuclideanSpace ℝ d} (hx : x ∈ periodBox 0) + (hint : ∀ j, Integrable fun y => θ j y * g j (proj x - proj y)) : + ‖∑ j ∈ s, econv (θ j) (g j) (proj x)‖ₑ ≤ + ‖∑ j ∈ s, Rd.conv (θ j) (tripleBox.indicator (g j ∘ proj)) volume x‖ₑ + + farConv θ (fun t => lqNorm 2 fun j => ‖g j t‖ₑ) (proj x) := by + set c : ℕ → ℂ := fun j => Rd.conv (θ j) (tripleBox.indicator (g j ∘ proj)) volume x + have hG : Measurable fun t => lqNorm 2 fun j => ‖g j t‖ₑ := + measurable_lqNorm_comp (fun j => (hg j).eNorm) 2 + have hfar : ∑ j ∈ s, ‖econv (θ j) (g j) (proj x) - c j‖ₑ ≤ + farConv θ (fun t => lqNorm 2 fun j => ‖g j t‖ₑ) (proj x) := by + rw [← tsum_setLIntegral_eq_farConv hθ hG] + refine (Finset.sum_le_sum fun j _ => (enorm_econv_proj_sub_conv_le hx (hint j)).trans + (lintegral_mono fun y => mul_le_mul_right ?_ _)).trans (sum_le_tsum s) + exact ENNReal.le_lqNorm two_ne_zero (fun i => ‖g i (proj x - proj y)‖ₑ) j + calc ‖∑ j ∈ s, econv (θ j) (g j) (proj x)‖ₑ + = ‖∑ j ∈ s, c j + ∑ j ∈ s, (econv (θ j) (g j) (proj x) - c j)‖ₑ := by + rw [← Finset.sum_add_distrib] + simp only [add_sub_cancel] + _ ≤ ‖∑ j ∈ s, c j‖ₑ + ∑ j ∈ s, ‖econv (θ j) (g j) (proj x) - c j‖ₑ := + (eNorm_add_le _ _).trans (add_le_add le_rfl (eNorm_sum_le _ _)) + _ ≤ _ := add_le_add le_rfl hfar + +/-! ### The two bounds -/ + +variable (d) in +/-- The constant `3^{d/p} S_{d,p}(B, H) + D` of the vector-valued singular integrals on the +torus, with the strong type constant `S_{d,p}(B, H) = Rd.czConst` of `ℝ^d` and a bound `D` of the +far mass. -/ +noncomputable def periodicCZConst (p B H D : ℝ≥0∞) : ℝ≥0∞ := + 3 ^ ((Fintype.card d : ℝ) / p.toReal) * Rd.czConst (EuclideanSpace ℝ d) p B H + D + +/-- The constant `Torus.periodicCZConst d p B H D` is finite for `1 < p < ∞` and finite `B`, +`H`, `D`. -/ +theorem periodicCZConst_ne_top {p B H D : ℝ≥0∞} (hp1 : 1 < p) (hp : p ≠ ∞) (hB : B ≠ ∞) + (hH : H ≠ ∞) (hD : D ≠ ∞) : periodicCZConst d p B H D ≠ ∞ := + ENNReal.add_ne_top.2 ⟨ENNReal.mul_ne_top + (ENNReal.rpow_ne_top_of_nonneg (by positivity) (by norm_num)) + (Rd.czConst_ne_top hp1 hp hB hH), hD⟩ + +/-- **The strong type of the analysis operator on the torus**: for `d ≥ 1`, a Calderón–Zygmund +family `(θ_j)_j` on `ℝ^d` with overlap `B`, Hörmander constant `H` and far mass at most `D`, +every `1 < p < ∞` and every `f ∈ L_p(𝕋^d)`, +`‖ ‖((θ_j ⋆ f)(t))_j‖_{ℓ_2} ‖_{L_p(𝕋^d)} ≤ C ‖f‖_p` with `C = Torus.periodicCZConst d p B H D`. +The lift splits into the part on `(-1, 2]^d`, bounded by the strong type on `ℝ^d`, and the far +part, bounded by Young's inequality for the far convolution. -/ +theorem eLpNorm_lqNorm_econv_le [Nonempty d] {θ : ℕ → EuclideanSpace ℝ d → ℂ} {B H D : ℝ≥0∞} + (h : Rd.IsCZFamily θ B H) (hD : farMass θ ≤ D) {p : ℝ≥0∞} (hp1 : 1 < p) (hp : p ≠ ∞) + (f : Lp ℂ p (volume : Measure (UnitAddTorus d))) : + eLpNorm (fun t => lqNorm 2 fun j => ‖econv (θ j) f t‖ₑ) p volume ≤ + periodicCZConst d p B H D * ‖f‖ₑ := by + have hp0 : p ≠ 0 := (zero_lt_one.trans hp1).ne' + have hθ : ∀ j, AEStronglyMeasurable (θ j) volume := fun j => (h.integrable j).1 + have hfm : Measurable f := (Lp.stronglyMeasurable f).measurable + have hF : AEMeasurable (fun t => lqNorm 2 fun j => ‖econv (θ j) f t‖ₑ) volume := + aemeasurable_lqNorm_comp (fun j => (aestronglyMeasurable_econv (hθ j) hfm).eNorm) 2 + have hsplit := eLpNorm_le_of_comp_proj_le hp1.le hF (aemeasurable_farConv hθ hfm.eNorm) + (A := fun x => lqNorm 2 fun j => ‖Rd.conv (θ j) (tripleBox.indicator (f ∘ proj)) volume x‖ₑ) + (by + filter_upwards [ae_restrict_mem (measurableSet_periodBox 0), ae_restrict_of_ae + (ae_integrable_econv_proj (g := fun _ => f) h.integrable (fun _ => hfm) + fun _ => (Lp.memLp f).integrable hp1.le)] + with x hx hint + exact lqNorm_econv_proj_le hθ hfm hx hint) + have hnear := h.eLpNorm_lqNorm_conv_le hp1 hp + (memLp_indicator_tripleBox_comp_proj hp0 hp (Lp.memLp f)) + rw [eLpNorm_indicator_tripleBox_comp_proj hp0 hp (Lp.aestronglyMeasurable f)] at hnear + refine hsplit.trans ?_ + rw [Lp.eNorm_def, periodicCZConst, add_mul] + refine add_le_add (hnear.trans_eq (by ring)) ?_ + refine (eLpNorm_farConv_le hθ hp1.le hp hfm.eNorm).trans ?_ + rw [eLpNorm_eNorm _ (Lp.aestronglyMeasurable f)] + gcongr + +/-- **The strong type of the synthesis operators on the torus**: for `d ≥ 1`, a +Calderón–Zygmund family `(θ_j)_j` on `ℝ^d` with overlap `B`, Hörmander constant `H` and far mass +at most `D`, every `1 < p < ∞`, every finite set `s` and all measurable `g_j ∈ L_p(𝕋^d)`, +`‖∑_{j ∈ s} θ_j ⋆ g_j‖_{L_p(𝕋^d)} ≤ C ‖ ‖(g_j(t))_j‖_{ℓ_2} ‖_{L_p(𝕋^d)}` with +`C = Torus.periodicCZConst d p B H D`. -/ +theorem eLpNorm_sum_econv_le [Nonempty d] {θ : ℕ → EuclideanSpace ℝ d → ℂ} {B H D : ℝ≥0∞} + (h : Rd.IsCZFamily θ B H) (hD : farMass θ ≤ D) {p : ℝ≥0∞} (hp1 : 1 < p) (hp : p ≠ ∞) + (s : Finset ℕ) {g : ℕ → UnitAddTorus d → ℂ} (hgm : ∀ j, Measurable (g j)) + (hg : ∀ j, MemLp (g j) p volume) : + eLpNorm (fun t => ∑ j ∈ s, econv (θ j) (g j) t) p volume ≤ + periodicCZConst d p B H D * eLpNorm (fun t => lqNorm 2 fun j => ‖g j t‖ₑ) p volume := by + have hp0 : p ≠ 0 := (zero_lt_one.trans hp1).ne' + have hθ : ∀ j, AEStronglyMeasurable (θ j) volume := fun j => (h.integrable j).1 + have hG : Measurable fun t => lqNorm 2 fun j => ‖g j t‖ₑ := + measurable_lqNorm_comp (fun j => (hgm j).eNorm) 2 + have hsum : AEStronglyMeasurable (fun t => ∑ j ∈ s, econv (θ j) (g j) t) volume := + Finset.aestronglyMeasurable_fun_sum s fun j _ => aestronglyMeasurable_econv (hθ j) (hgm j) + have hsplit := eLpNorm_le_of_comp_proj_le hp1.le hsum.eNorm (aemeasurable_farConv hθ hG) + (A := fun x => ‖∑ j ∈ s, Rd.conv (θ j) (tripleBox.indicator (g j ∘ proj)) volume x‖ₑ) + (by + filter_upwards [ae_restrict_mem (measurableSet_periodBox 0), ae_restrict_of_ae + (ae_integrable_econv_proj h.integrable hgm fun j => (hg j).integrable hp1.le)] + with x hx hint + exact enorm_sum_econv_proj_le hθ hgm s hx hint) + rw [eLpNorm_eNorm _ hsum, eLpNorm_eNorm _ (Finset.aestronglyMeasurable_fun_sum s fun j _ => + Rd.aestronglyMeasurable_conv (hθ j) + (memLp_indicator_tripleBox_comp_proj hp0 hp (hg j)).aestronglyMeasurable)] at hsplit + have hnear := h.eLpNorm_sum_conv_le hp1 hp s fun j => + memLp_indicator_tripleBox_comp_proj hp0 hp (hg j) + have hfun : (fun x => lqNorm 2 fun j => ‖tripleBox.indicator (g j ∘ proj) x‖ₑ) = + tripleBox.indicator fun y => lqNorm 2 fun j => ‖g j (proj y)‖ₑ := funext fun x => by + simp only [eNorm_indicator_eq_indicator_eNorm] + exact ENNReal.lqNorm_indicator 2 _ (fun j y => ‖(g j ∘ proj) y‖ₑ) x + rw [hfun, eLpNorm_indicator_tripleBox hp0 hp hG.aemeasurable] at hnear + refine hsplit.trans ?_ + rw [periodicCZConst, add_mul] + exact add_le_add (hnear.trans_eq (by ring)) + ((eLpNorm_farConv_le hθ hp1.le hp hG).trans (by gcongr)) + +end Torus diff --git a/LeanPool/FunctionSpaces/Torus/Sobolev.lean b/LeanPool/FunctionSpaces/Torus/Sobolev.lean new file mode 100644 index 0000000000..c3fe4317d4 --- /dev/null +++ b/LeanPool/FunctionSpaces/Torus/Sobolev.lean @@ -0,0 +1,107 @@ +/- +Copyright (c) 2026 Mario Ullrich. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Mario Ullrich +-/ +module + +public import LeanPool.FunctionSpaces.Torus.Nikolskii +public import LeanPool.FunctionSpaces.MeasureSpaces.Spectral.Basic +public import LeanPool.FunctionSpaces.MeasureSpaces.Sobolev.Embeddings + +/- +Modified for Lean Pool: module names and imports adapted. +-/ + +/-! +# `L_2` Sobolev spaces on the torus + +Mathlib's Fourier basis `e_k`, `k ∈ ℤ^d`, of `L_2(𝕋^d)` (`UnitAddTorus.mFourierBasis`), with +the level `deg k = max_i |k_i|`, is a spectral scheme (`Torus.fourierScheme`). Its +approximants of complexity `n` are the `L_2` classes of the trigonometric polynomials of +degree `< n`, so it is the scheme `Torus.trigScheme` transported to `L_2` +(`Torus.toLp_trigScheme_eq`). + +The **Sobolev space** `H^s(𝕋^d)`, `s > 0`, consists of the `f ∈ L_2(𝕋^d)` with + +`∑_{k ∈ ℤ^d} (1 + max_i |k_i|)^(2s) |f̂(k)|² < ∞`, + +normed by the square root of this sum; it is the image of `ℓ²(ℤ^d)` under +`c ↦ ∑_k (1 + deg k)^(-s) c_k e_k` (`Torus.sobolevSpace`, `Torus.mem_range_sobolev_iff`). The weight +`(1 + max_i |k_i|)^(2s)` is equivalent to the more common `(1 + |k|²)^s`, up to constants depending +on `d` and `s`; it is used because the degree `max_i |k_i|` is the one that indexes the +trigonometric polynomials. By the spectral theory of `FunctionSpaces.MeasureSpaces.Spectral` it +satisfies Jackson's and Bernstein's inequalities with constant `1`, and so is a Sobolev space for +the scheme of trigonometric polynomials in the sense of `FunctionScheme.SobolevSpace`. +-/ + +@[expose] public section + +open MeasureTheory UnitAddTorus +open scoped ENNReal BoundedContinuousFunction TorusHaar lp + +namespace Torus + +variable (d : Type*) [Fintype d] + +/-- The **Fourier basis** of `L_2(𝕋^d)` with the level `deg k = max_i |k_i|`, a spectral +scheme. -/ +noncomputable def fourierScheme : SpectralScheme (d → ℤ) (Lp ℂ 2 (volume : Measure (UnitAddTorus +d))) where + basis := mFourierBasis + level := deg + finite_level n := by + convert (boxLt d n).finite_toSet using 1 + ext k; simp [mem_boxLt] + +/-- The `L_2` classes of the trigonometric polynomials of degree `< n` are the span of the +Fourier basis elements of degree `< n`. -/ +theorem toLp_trigScheme_eq : + (trigScheme d).toLp volume 2 = (fourierScheme d).toScheme := by + ext n f + change f ∈ (BoundedContinuousFunction.toLp (E := ℂ) 2 volume ℝ) '' (trigPoly d n : Set _) ↔ + f ∈ ((fourierScheme d).span n : Set _) + have hmap : (BoundedContinuousFunction.toLp (E := ℂ) 2 volume ℝ : _ → _) '' (trigPoly d n : Set _) + = SetLike.coe ((trigPoly d n).map + (BoundedContinuousFunction.toLp (E := ℂ) 2 volume ℂ).toLinearMap) := by + rw [Submodule.map_coe]; rfl + rw [hmap, trigPoly, Submodule.map_span, ← Set.image_comp] + have hset : ((BoundedContinuousFunction.toLp (E := ℂ) 2 volume ℂ).toLinearMap ∘ trigMonomial) '' + (boxLt d n : Set (d → ℤ)) = mFourierBasis '' {k | deg k < n} := by + ext g + simp only [Set.mem_image, Function.comp_apply, Finset.mem_coe, mem_boxLt, Set.mem_ofPred_eq, + ContinuousLinearMap.coe_coe, toLp_trigMonomial, coe_mFourierBasis] + rw [hset] + rfl + +variable {d} + +/-- The **Sobolev space `H^s(𝕋^d)`**, `s > 0`, as a Sobolev space for the scheme of +trigonometric polynomials in `L_2`: the image of `ℓ²(ℤ^d)` under +`c ↦ ∑_k (1 + deg k)^(-s) c_k e_k`, with Jackson's and Bernstein's inequalities of order `s` +and constant `1`. -/ +noncomputable def sobolevSpace (s : ℝ) (hs : 0 < s) : + (trigScheme d).SobolevSpace volume 2 ℓ²(d → ℤ, ℂ) := + ApproximationScheme.SmoothnessSpace.congr (toLp_trigScheme_eq d).symm + ((fourierScheme d).toSmoothnessSpace s hs) + +/-- `H^s(𝕋^d)` has order `s`. -/ +@[simp] +theorem sobolevSpace_order (s : ℝ) (hs : 0 < s) : (sobolevSpace (d := d) s hs).order = s := rfl + +/-- The embedding of `H^s(𝕋^d)` is `J_s`. -/ +theorem sobolevSpace_incl (s : ℝ) (hs : 0 < s) (c : ℓ²(d → ℤ, ℂ)) : + (sobolevSpace (d := d) s hs).incl c = (fourierScheme d).sobolevEmbed s hs.le c := rfl + +/-- **Membership in `H^s(𝕋^d)`** through the Fourier coefficients: `f ∈ L_2(𝕋^d)` lies in the +range of the Sobolev embedding exactly when +`∑_k (1 + max_i |k_i|)^(2s) |f̂(k)|² < ∞`. -/ +theorem mem_range_sobolev_iff (s : ℝ) (hs : 0 < s) (f : Lp ℂ 2 (volume : Measure (UnitAddTorus +d))) : + f ∈ Set.range (sobolevSpace (d := d) s hs).incl ↔ + Memℓp (fun k => ((((1 + deg k : ℕ) : ℝ) ^ s : ℝ) : ℂ) * mFourierCoeff f k) 2 := by + have := (fourierScheme d).mem_range_sobolevEmbed_iff s hs.le f + simp only [fourierScheme, mFourierBasis_repr] at this + exact this + +end Torus diff --git a/LeanPool/FunctionSpaces/Torus/SobolevEmbedding.lean b/LeanPool/FunctionSpaces/Torus/SobolevEmbedding.lean new file mode 100644 index 0000000000..240793a893 --- /dev/null +++ b/LeanPool/FunctionSpaces/Torus/SobolevEmbedding.lean @@ -0,0 +1,87 @@ +/- +Copyright (c) 2026 Mario Ullrich. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Mario Ullrich +-/ +module + +public import LeanPool.FunctionSpaces.Torus.SobolevTriebelLizorkin +public import LeanPool.FunctionSpaces.Torus.Embeddings + +/- +Modified for Lean Pool: module names and imports adapted. +-/ + +/-! +# Sobolev embeddings on the torus + +Let `d ≥ 1` and `1 < p < ∞`. Through `W^m_p(𝕋^d) ⊆ B^m_{p,max(p,2)}(𝕋^d)` for `m ≥ 1` +(`Torus.memBesov_of_memSobolev`) the Besov embeddings of the torus +(`FunctionSpaces.Torus.Embeddings`) give, with `α = d (1/p - 1/r)`: + +* **into `L_r`** (`Torus.memSobolev_exists_inclusion_eq`): for `p ≤ r ≤ ∞` and `m > α`, every + `f ∈ W^m_p(𝕋^d)` lies in `L_r(𝕋^d)` and in `B^{m - α}_{r,max(p,2)}(𝕋^d)`; +* **into continuous functions** (`Torus.memSobolev_exists_continuous`): for `m > d/p`, every + `f ∈ W^m_p(𝕋^d)` has a continuous representative; +* **between Sobolev spaces** (`Torus.memSobolev_of_memSobolev_of_lt`): for `p ≤ r < ∞` and + `k < m - α`, `W^m_p(𝕋^d) ⊆ W^k_r(𝕋^d)`, through `B^{m - α}_{r,max(p,2)} ⊆ B^k_{r,min(r,2)}` + (`ApproximationScheme.MemApprox.of_lt`) and `B^k_{r,min(r,2)} ⊆ W^k_r` + (`Torus.memSobolev_of_memBesov`). +-/ + +@[expose] public section + +open MeasureTheory UnitAddTorus +open scoped ENNReal TorusHaar + +namespace Torus + +variable {d : Type*} [Fintype d] {p r : ℝ≥0∞} [Fact (1 ≤ p)] [Fact (1 ≤ r)] + +/-- **The Sobolev embedding into `L_r` on the torus**: for `d ≥ 1`, `1 < p < ∞`, `p ≤ r ≤ ∞` and +`m > d (1/p - 1/r)`, every `f ∈ W^m_p(𝕋^d)` is the class in `L_p` of some `g ∈ L_r(𝕋^d)`, and +`g` lies in the Besov space `B^{m - d(1/p - 1/r)}_{r,max(p,2)}(𝕋^d)` +(`Torus.memBesov_of_memSobolev` and `Torus.memBesov_exists_inclusion_eq`). The order satisfies +`m ≥ 1` since `d (1/p - 1/r) ≥ 0`. -/ +theorem memSobolev_exists_inclusion_eq [Nonempty d] (hp1 : 1 < p) (hp : p ≠ ∞) (hpr : p ≤ r) + {m : ℕ} (hm : (Fintype.card d : ℝ) * (p.toReal⁻¹ - r.toReal⁻¹) < m) + {f : Lp ℂ p (volume : Measure (UnitAddTorus d))} (hf : MemSobolev m f) : + ∃ g : Lp ℂ r (volume : Measure (UnitAddTorus d)), + Lp.inclusionOfExponentLe (𝕜 := ℝ) volume hpr g = f ∧ + (trigScheme d).MemBesov volume r + ((m : ℝ) - Fintype.card d * (p.toReal⁻¹ - r.toReal⁻¹)) (max p 2) g := + memBesov_exists_inclusion_eq hpr hm (le_max_of_le_right one_le_two) + (memBesov_of_memSobolev hp1 hp + (one_le_of_nikolskiiExponent_lt (Nat.cast_nonneg _) Fact.out hpr hm) hf) + +/-- **The Sobolev embedding into continuous functions on the torus**: for `d ≥ 1`, `1 < p < ∞` +and `m > d/p`, every `f ∈ W^m_p(𝕋^d)` has a continuous representative +(`Torus.memBesov_of_memSobolev` and `Torus.memBesov_exists_continuous`). -/ +theorem memSobolev_exists_continuous [Nonempty d] (hp1 : 1 < p) (hp : p ≠ ∞) {m : ℕ} + (hm : (Fintype.card d : ℝ) * p.toReal⁻¹ < m) + {f : Lp ℂ p (volume : Measure (UnitAddTorus d))} (hf : MemSobolev m f) : + ∃ g : C(UnitAddTorus d, ℂ), + Lp.inclusionOfExponentLe (𝕜 := ℝ) volume le_top (ContinuousMap.toLp (E := ℂ) ∞ volume ℝ g) = + f := + memBesov_exists_continuous hm (le_max_of_le_right one_le_two) + (memBesov_of_memSobolev hp1 hp (Nat.cast_pos.1 (lt_of_le_of_lt (by positivity) hm)) hf) + +/-- **The embeddings between Sobolev spaces on the torus**: for `d ≥ 1`, `1 < p ≤ r < ∞` and +orders `k < m - d (1/p - 1/r)`, every `f ∈ W^m_p(𝕋^d)` is the class in `L_p` of some +`g ∈ W^k_r(𝕋^d)`. The class `g ∈ B^{m - d(1/p - 1/r)}_{r,max(p,2)}(𝕋^d)` of +`Torus.memSobolev_exists_inclusion_eq` lies in `B^k_{r,min(r,2)}(𝕋^d)` since `k` is smaller +(`ApproximationScheme.MemApprox.of_lt`), hence in `W^k_r(𝕋^d)` (`Torus.memSobolev_of_memBesov`). -/ +theorem memSobolev_of_memSobolev_of_lt [Nonempty d] (hp1 : 1 < p) (hp : p ≠ ∞) (hpr : p ≤ r) + (hr : r ≠ ∞) {k m : ℕ} + (hkm : (k : ℝ) < m - Fintype.card d * (p.toReal⁻¹ - r.toReal⁻¹)) + {f : Lp ℂ p (volume : Measure (UnitAddTorus d))} (hf : MemSobolev m f) : + ∃ g : Lp ℂ r (volume : Measure (UnitAddTorus d)), + Lp.inclusionOfExponentLe (𝕜 := ℝ) volume hpr g = f ∧ MemSobolev k g := by + have hm : (Fintype.card d : ℝ) * (p.toReal⁻¹ - r.toReal⁻¹) < m := by + linarith [Nat.cast_nonneg (α := ℝ) k] + obtain ⟨g, hgf, hg⟩ := memSobolev_exists_inclusion_eq hp1 hp hpr hm hf + exact ⟨g, hgf, memSobolev_of_memBesov (hp1.trans_le hpr) hr + (hg.of_lt (le_max_of_le_right one_le_two) (le_min Fact.out one_le_two) (Nat.cast_nonneg k) + hkm)⟩ + +end Torus diff --git a/LeanPool/FunctionSpaces/Torus/SobolevTriebelLizorkin.lean b/LeanPool/FunctionSpaces/Torus/SobolevTriebelLizorkin.lean new file mode 100644 index 0000000000..d4fc37e0c4 --- /dev/null +++ b/LeanPool/FunctionSpaces/Torus/SobolevTriebelLizorkin.lean @@ -0,0 +1,481 @@ +/- +Copyright (c) 2026 Mario Ullrich. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Mario Ullrich +-/ +module + +public import LeanPool.FunctionSpaces.Torus.LpWeakDerivatives +public import LeanPool.FunctionSpaces.Torus.SquareFunction +public import LeanPool.FunctionSpaces.Torus.TriebelLizorkinLocalMeans + +/- +Modified for Lean Pool: module names and imports adapted. +-/ + +/-! +# Sobolev spaces `W^m_p = F^m_{p,2}` on the torus + +Let `d ≥ 1`, `1 < p < ∞` and `m ∈ ℕ`. A function `f ∈ L_p(𝕋^d)` lies in the Sobolev space +`W^m_p(𝕋^d)` (`Torus.MemSobolev`: all weak derivatives `∂^α f` of order `|α| ≤ m` lie in +`L_p(𝕋^d)`) iff it lies in the Triebel–Lizorkin space `F^m_{p,2}(𝕋^d)` +(`Torus.MemTriebelLizorkin`), see `Torus.memSobolev_iff_memTriebelLizorkin`. Both directions have +named constants (`Torus.sobolevToTLConst`, `Torus.tlToSobolevConst`): constants +`Torus.periodicCZConst` of the vector-valued singular integrals on the torus, applied to the +Calderón–Zygmund families of `FunctionSpaces.Rd.Sobolev.DerivativeKernels`. + +* **`W^m_p ⊆ F^m_{p,2}`** (`Torus.triebelLizorkinNorm_le_of_hasWeakLineDeriv`): with the weak + derivatives `g_α = ∂_{e_{α_0}} ⋯ ∂_{e_{α_{m-1}}} f` along the orthonormal basis + `e = Rd.gridBasis` of `ℝ^d`, `‖f‖_{F^m_{p,2}} ≤ ‖Φ‖_1 ‖f‖_p + 2^m ∑_α K_α ‖g_α‖_p`. The dilated + derivative kernels give `2^{jm} ψ_{j+1} ⋆ f = ∑_α (η_α)_{2^j} ⋆ g_α` + (`Torus.two_pow_mul_blockFun_succ_ae`; on the Fourier side, + `Torus.fourier_two_pow_smul_psi_succ`), and the analysis bound on the torus + (`Torus.eLpNorm_lqNorm_econv_le`) bounds each sum. +* **`F^m_{p,2} ⊆ W^m_p`** (`Torus.exists_hasWeakLineDeriv_of_memTriebelLizorkin`): for + `f ∈ F^k_{p,2}(𝕋^d)` and directions `w ∈ (ℝ^d)^k`, the partial sums + `∑_{j < J} (∂^w ψ̃_j) ⋆ Δ_j f` (`Torus.derivSynthesisSum`) are the weak derivatives `∂^w` of + `∑_{j < J} Δ_j f → f`, and a Cauchy sequence in `L_p(𝕋^d)` by the synthesis bound on the torus + (`Torus.eLpNorm_sum_econv_le`); their limit `g` is `∂^w f`, with `‖g‖_p ≤ C_w ‖f‖_{F^k_{p,2}}`. + +With the Besov sandwich, `B^m_{p,min(p,2)}(𝕋^d) ⊆ W^m_p(𝕋^d)` and, for `m ≥ 1`, +`W^m_p(𝕋^d) ⊆ B^m_{p,max(p,2)}(𝕋^d)` (`Torus.memSobolev_of_memBesov`, +`Torus.memBesov_of_memSobolev`, with norm bounds in `Torus.exists_hasWeakLineDeriv_of_memBesov` +and `Torus.approxNormDyadic_le_of_hasWeakLineDeriv`), and `W^m_p(𝕋^d)` is described by local +means (`Torus.memSobolev_iff_tlLocalMeans`). +-/ + +@[expose] public section + +open MeasureTheory UnitAddTorus Filter Module +open scoped ENNReal TorusHaar Topology SchwartzMap LineDeriv FourierTransform + +open ENNReal (lqNorm dyadicWeight) + +namespace Torus + +variable {d : Type*} [Fintype d] + +/-! ### The blocks through derivatives -/ + +/-- **The dilated derivative identity on the Fourier side**: for all `m, j ∈ ℕ` and `ξ ∈ ℝ^d`, +`2^{jm} 𝓕ψ_{j+1}(ξ) = ∑_α (∏_l 2πi ⟪ξ, e_{α_l}⟫) 𝓕(η_α)_{2^j}(ξ)`, the Fourier transform of +`Rd.two_pow_smul_psi_succ_eq_sum`. -/ +theorem fourier_two_pow_smul_psi_succ (m j : ℕ) (ξ : EuclideanSpace ℝ d) : + (2 : ℂ) ^ (j * m) * 𝓕 (Rd.psi (V := EuclideanSpace ℝ d) (j + 1)) ξ = + ∑ i : Fin m → Fin (finrank ℝ (EuclideanSpace ℝ d)), + (∏ l, 2 * Real.pi * Complex.I * + (inner ℝ ξ (Rd.gridBasis (EuclideanSpace ℝ d) (i l)) : ℂ)) * + 𝓕 (Rd.derivFamily i j) ξ := by + have h := congrFun (congrArg 𝓕 + (Rd.two_pow_smul_psi_succ_eq_sum (V := EuclideanSpace ℝ d) m j)) ξ + have hs : 𝓕 ((2 : ℂ) ^ (j * m) • Rd.psi (V := EuclideanSpace ℝ d) (j + 1)) ξ = + (2 : ℂ) ^ (j * m) * 𝓕 (Rd.psi (V := EuclideanSpace ℝ d) (j + 1)) ξ := + congrFun (VectorFourier.fourierIntegral_const_smul _ _ _ _ _) ξ + rw [hs] at h + set K : (Fin m → Fin (finrank ℝ (EuclideanSpace ℝ d))) → 𝓢(EuclideanSpace ℝ d, ℂ) := + fun i => ∂^{fun k => Rd.gridBasis (EuclideanSpace ℝ d) (i k)} + (Rd.schwartzDilate (2 ^ j) (pow_ne_zero j two_ne_zero) (Rd.derivKernel i)) with hK + have hc : (∑ i, ⇑(K i)) = ⇑(∑ i, K i) := funext fun x => by rw [sum_apply, Finset.sum_apply] + rw [h, hc, ← SchwartzMap.fourier_coe, FourierTransform.fourier_sum, sum_apply] + refine Finset.sum_congr rfl fun i _ => ?_ + simp only [hK] + rw [SchwartzMap.fourier_iteratedLineDerivOp_apply, smul_eq_mul, + SchwartzMap.fourier_coe, Rd.coe_schwartzDilate] + rfl + +variable {p : ℝ≥0∞} [Fact (1 ≤ p)] + +/-- **The blocks of `f` through its derivatives, in `L_p(𝕋^d)`**: for `1 ≤ p < ∞`, if +`g_α ∈ L_p(𝕋^d)` is the weak derivative `∂_{e_{α_0}} ⋯ ∂_{e_{α_{m-1}}} f` for every multi-index +`α`, then `2^{jm} Δ_{j+1} f = ∑_α (η_α)_{2^j} ⋆ g_α` for every `j`. Both sides have the Fourier +coefficients `2^{jm} 𝓕ψ_{j+1}(k) f̂(k)` (`Torus.fourier_two_pow_smul_psi_succ`). -/ +theorem two_pow_smul_lpBlock_succ (hp : p ≠ ∞) {m : ℕ} + {f : Lp ℂ p (volume : Measure (UnitAddTorus d))} + {g : (Fin m → Fin (finrank ℝ (EuclideanSpace ℝ d))) → + Lp ℂ p (volume : Measure (UnitAddTorus d))} + (hg : ∀ i, HasWeakLineDeriv (fun k => Rd.gridBasis (EuclideanSpace ℝ d) (i k)) f (g i)) + (j : ℕ) : + (2 : ℂ) ^ (j * m) • lpBlock hp (j + 1) f = + ∑ i, econvLp hp ((Rd.isCZFamily_derivFamily i).integrable j) (g i) := + eq_of_mFourierCoeff_eq fun n => by + rw [mFourierCoeff_smul, lpBlock, mFourierCoeff_econvLp, mFourierCoeff_sum, ← mul_assoc, + fourier_two_pow_smul_psi_succ, Finset.sum_mul] + refine Finset.sum_congr rfl fun i _ => ?_ + rw [mFourierCoeff_econvLp, hg i n, lineSymbol] + ring + +/-- **The blocks of `f` through its derivatives at every point**: under the hypotheses of +`Torus.two_pow_smul_lpBlock_succ`, for almost every `t ∈ 𝕋^d` and every `j`, +`2^{jm} (ψ_{j+1} ⋆ f)(t) = ∑_α ((η_α)_{2^j} ⋆ g_α)(t)`. -/ +theorem two_pow_mul_blockFun_succ_ae (hp : p ≠ ∞) {m : ℕ} + {f : Lp ℂ p (volume : Measure (UnitAddTorus d))} + {g : (Fin m → Fin (finrank ℝ (EuclideanSpace ℝ d))) → + Lp ℂ p (volume : Measure (UnitAddTorus d))} + (hg : ∀ i, HasWeakLineDeriv (fun k => Rd.gridBasis (EuclideanSpace ℝ d) (i k)) f (g i)) : + ∀ᵐ t ∂volume, ∀ j, (2 : ℂ) ^ (j * m) * blockFun (j + 1) f t = + ∑ i, econv (Rd.derivFamily i j) (g i) t := by + refine ae_all_iff.2 fun j => ?_ + filter_upwards [Lp.coeFn_smul ((2 : ℂ) ^ (j * m)) (lpBlock hp (j + 1) f), + lpBlock_ae_eq_blockFun hp (j + 1) f, + coeFn_sum_econvLp_ae hp Finset.univ (fun i => (Rd.isCZFamily_derivFamily i).integrable j) g] + with t h1 h2 h3 + rw [← h2, ← smul_eq_mul, ← Pi.smul_apply ((2 : ℂ) ^ (j * m)) (⇑(lpBlock hp (j + 1) f)), ← h1, + two_pow_smul_lpBlock_succ hp hg j, h3] + +/-- **The pointwise bound of the higher blocks**: under the hypotheses of +`Torus.two_pow_smul_lpBlock_succ`, for almost every `t`, +`‖(2^{(j+1)m} (ψ_{j+1} ⋆ f)(t))_j‖_{ℓ_2} ≤ 2^m ∑_α ‖(((η_α)_{2^j} ⋆ g_α)(t))_j‖_{ℓ_2}`, by +Minkowski's inequality in `ℓ_2` (`ENNReal.lqNorm_dyadicWeight_succ_le_sum`). -/ +theorem lqNorm_blockFun_succ_le_sum_ae (hp : p ≠ ∞) {m : ℕ} + {f : Lp ℂ p (volume : Measure (UnitAddTorus d))} + {g : (Fin m → Fin (finrank ℝ (EuclideanSpace ℝ d))) → + Lp ℂ p (volume : Measure (UnitAddTorus d))} + (hg : ∀ i, HasWeakLineDeriv (fun k => Rd.gridBasis (EuclideanSpace ℝ d) (i k)) f (g i)) : + ∀ᵐ t ∂volume, + lqNorm 2 (fun n => dyadicWeight (m : ℝ) (n + 1) * ‖blockFun (n + 1) f t‖ₑ) ≤ + 2 ^ m * ∑ i, lqNorm 2 (fun n => ‖econv (Rd.derivFamily i n) (g i) t‖ₑ) := by + filter_upwards [two_pow_mul_blockFun_succ_ae hp hg] with t ht + refine ENNReal.lqNorm_dyadicWeight_succ_le_sum one_le_two Finset.univ fun n => ?_ + rw [← Rd.enorm_two_pow_complex, ← eNorm_mul, ht n] + exact eNorm_sum_le _ _ + +/-! ### `W^m_p ⊆ F^m_{p,2}` -/ + +variable (d) in +/-- The constant `K_α` of the bound `W^m_p ⊆ F^m_{p,2}` on the torus for the multi-index `α`: the +constant `Torus.periodicCZConst d p 2 (4 H_{A^α}) (2 T_{A^α})` of the Calderón–Zygmund family of +the dilated derivative kernels `(η_α)_{2^j}` (`Rd.isCZFamily_derivFamily`), with the far mass +bound `2 T_{A^α}` (`Torus.farMass_derivFamily_le`), where `A^α = Rd.derivKernelBound α`. -/ +noncomputable def sobolevToTLConst (p : ℝ≥0∞) {m : ℕ} + (i : Fin m → Fin (finrank ℝ (EuclideanSpace ℝ d))) : ℝ≥0∞ := + periodicCZConst d p 2 + (4 * Rd.familyHormanderConst (EuclideanSpace ℝ d) (Rd.derivKernelBound i)) + (2 * Rd.familyTailConst (EuclideanSpace ℝ d) (Rd.derivKernelBound i) 0 1) + +omit [Fact (1 ≤ p)] in +/-- The constant `Torus.sobolevToTLConst d p α` is finite for `1 < p < ∞`. -/ +theorem sobolevToTLConst_ne_top (hp1 : 1 < p) (hp : p ≠ ∞) {m : ℕ} + (i : Fin m → Fin (finrank ℝ (EuclideanSpace ℝ d))) : sobolevToTLConst d p i ≠ ∞ := + periodicCZConst_ne_top hp1 hp ENNReal.ofNat_ne_top + (ENNReal.mul_ne_top ENNReal.ofNat_ne_top (Rd.familyHormanderConst_ne_top _)) + (ENNReal.mul_ne_top ENNReal.ofNat_ne_top (Rd.familyTailConst_ne_top _ _ _)) + +/-- **The higher blocks in `L_p(ℓ_2)`**: for `d ≥ 1`, `1 < p < ∞` and weak derivatives `g_α` as in +`Torus.two_pow_smul_lpBlock_succ`, +`‖ t ↦ ‖(2^{(j+1)m} (ψ_{j+1} ⋆ f)(t))_j‖_{ℓ_2} ‖_p ≤ 2^m ∑_α K_α ‖g_α‖_p` with +`K_α = Torus.sobolevToTLConst d p α`: the pointwise bound, Minkowski's inequality in `L_p` +(`MeasureTheory.eLpNorm_le_const_mul_sum_of_ae_le`), and the analysis bound on the torus +(`Torus.eLpNorm_lqNorm_econv_le`). -/ +theorem eLpNorm_lqNorm_blockFun_succ_le [Nonempty d] (hp1 : 1 < p) (hp : p ≠ ∞) {m : ℕ} + {f : Lp ℂ p (volume : Measure (UnitAddTorus d))} + {g : (Fin m → Fin (finrank ℝ (EuclideanSpace ℝ d))) → + Lp ℂ p (volume : Measure (UnitAddTorus d))} + (hg : ∀ i, HasWeakLineDeriv (fun k => Rd.gridBasis (EuclideanSpace ℝ d) (i k)) f (g i)) : + eLpNorm (fun t => lqNorm 2 (fun n => + dyadicWeight (m : ℝ) (n + 1) * ‖blockFun (n + 1) f t‖ₑ)) p volume ≤ + 2 ^ m * ∑ i, sobolevToTLConst d p i * ‖g i‖ₑ := by + have hF : ∀ i, AEMeasurable + (fun t => lqNorm 2 (fun n => ‖econv (Rd.derivFamily i n) (g i) t‖ₑ)) volume := + fun i => aemeasurable_lqNorm_comp (fun n => (aestronglyMeasurable_econv + ((Rd.isCZFamily_derivFamily i).integrable n).aestronglyMeasurable + (Lp.stronglyMeasurable (g i)).measurable).eNorm) 2 + refine (eLpNorm_le_const_mul_sum_of_ae_le (p := p) Fact.out Finset.univ + (aemeasurable_lqNorm_comp (fun n => + (aestronglyMeasurable_blockFun (n + 1) f).eNorm.const_mul _) 2) + (fun i _ => hF i) _ (lqNorm_blockFun_succ_le_sum_ae hp hg)).trans ?_ + gcongr with i + exact eLpNorm_lqNorm_econv_le (Rd.isCZFamily_derivFamily i) (farMass_derivFamily_le i) + hp1 hp (g i) + +/-- **`W^m_p(𝕋^d) ⊆ F^m_{p,2}(𝕋^d)` with named constants**: for `d ≥ 1`, `1 < p < ∞` and +`f ∈ L_p(𝕋^d)` whose weak derivatives `g_α = ∂_{e_{α_0}} ⋯ ∂_{e_{α_{m-1}}} f` along the +orthonormal basis `e = Rd.gridBasis` of `ℝ^d` lie in `L_p(𝕋^d)` for every multi-index `α`, +`‖f‖_{F^m_{p,2}} ≤ ‖Φ‖_1 ‖f‖_p + 2^m ∑_α K_α ‖g_α‖_p` with `K_α = Torus.sobolevToTLConst d p α`. +The block `j = 0` is split off from the `ℓ_2` norm +(`MeasureTheory.eLpNorm_lqNorm_dyadicWeight_le_zero_add_succ`) and bounded by Young's inequality +(`Torus.eLpNorm_blockFun_zero_le`); the other blocks by `Torus.eLpNorm_lqNorm_blockFun_succ_le`. -/ +theorem triebelLizorkinNorm_le_of_hasWeakLineDeriv [Nonempty d] (hp1 : 1 < p) (hp : p ≠ ∞) + {m : ℕ} {f : Lp ℂ p (volume : Measure (UnitAddTorus d))} + {g : (Fin m → Fin (finrank ℝ (EuclideanSpace ℝ d))) → + Lp ℂ p (volume : Measure (UnitAddTorus d))} + (hg : ∀ i, HasWeakLineDeriv (fun k => Rd.gridBasis (EuclideanSpace ℝ d) (i k)) f (g i)) : + triebelLizorkinNorm (m : ℝ) 2 f ≤ + eLpNorm (Rd.lpKernel (V := EuclideanSpace ℝ d)) 1 volume * ‖f‖ₑ + + 2 ^ m * ∑ i, sobolevToTLConst d p i * ‖g i‖ₑ := by + refine (eLpNorm_lqNorm_dyadicWeight_le_zero_add_succ (p := p) Fact.out one_le_two _ + fun j => (aestronglyMeasurable_blockFun j f).eNorm).trans ?_ + gcongr + · rw [eLpNorm_eNorm _ (aestronglyMeasurable_blockFun 0 f)] + exact eLpNorm_blockFun_zero_le hp f + · exact eLpNorm_lqNorm_blockFun_succ_le hp1 hp hg + +/-- **The weak derivatives of order `m` along the basis vectors give `f ∈ F^m_{p,2}(𝕋^d)`**: for +`d ≥ 1` and `1 < p < ∞`, since the bound `Torus.triebelLizorkinNorm_le_of_hasWeakLineDeriv` is +finite. -/ +theorem memTriebelLizorkin_of_hasWeakLineDeriv [Nonempty d] (hp1 : 1 < p) (hp : p ≠ ∞) + {m : ℕ} {f : Lp ℂ p (volume : Measure (UnitAddTorus d))} + {g : (Fin m → Fin (finrank ℝ (EuclideanSpace ℝ d))) → + Lp ℂ p (volume : Measure (UnitAddTorus d))} + (hg : ∀ i, HasWeakLineDeriv (fun k => Rd.gridBasis (EuclideanSpace ℝ d) (i k)) f (g i)) : + MemTriebelLizorkin (m : ℝ) 2 f := + (triebelLizorkinNorm_le_of_hasWeakLineDeriv hp1 hp hg).trans_lt + (ENNReal.add_lt_top.2 ⟨ENNReal.mul_lt_top + Rd.eLpNorm_lpKernel_lt_top eNorm_lt_top, + ENNReal.mul_lt_top (ENNReal.pow_lt_top ENNReal.ofNat_lt_top) (ENNReal.sum_lt_top.2 fun i _ => + ENNReal.mul_lt_top (sobolevToTLConst_ne_top hp1 hp i).lt_top eNorm_lt_top)⟩) + +/-- **`W^m_p(𝕋^d) ⊆ F^m_{p,2}(𝕋^d)`**: for `d ≥ 1` and `1 < p < ∞`, every `f ∈ W^m_p(𝕋^d)` lies in +`F^m_{p,2}(𝕋^d)`; the weak derivatives of order `m` along the basis vectors suffice +(`Torus.memTriebelLizorkin_of_hasWeakLineDeriv`). -/ +theorem memTriebelLizorkin_of_memSobolev [Nonempty d] (hp1 : 1 < p) (hp : p ≠ ∞) {m : ℕ} + {f : Lp ℂ p (volume : Measure (UnitAddTorus d))} (hf : MemSobolev m f) : + MemTriebelLizorkin (m : ℝ) 2 f := by + have hd : ∀ i : Fin m → Fin (finrank ℝ (EuclideanSpace ℝ d)), + ∃ g : Lp ℂ p (volume : Measure (UnitAddTorus d)), + HasWeakLineDeriv (fun k => Rd.gridBasis (EuclideanSpace ℝ d) (i k)) f g := fun i => + memSobolev_iff_exists_hasWeakLineDeriv.1 hf m le_rfl _ + choose g hg using hd + exact memTriebelLizorkin_of_hasWeakLineDeriv hp1 hp hg + +/-! ### `F^m_{p,2} ⊆ W^m_p` -/ + +variable (d) in +/-- The constant `C_w` of the bound `F^k_{p,2} ⊆ W^k_p` on the torus for the directions +`w ∈ (ℝ^d)^k`: the constant `Torus.periodicCZConst d p B (4 H_{Ã^w}) (2 T_{Ã^w})` of the +Calderón–Zygmund family `((∂^w G̃_j)_{2^j})_j` (`Rd.isCZFamily_derivDualFamily`), with the overlap +`B = 4 ((8π)^k ∏_l ‖w_l‖)²` (`Rd.derivDualOverlap`) and the far mass bound `2 T_{Ã^w}` +(`Torus.farMass_derivDualFamily_le`), where `Ã^w = Rd.derivDualBound w`. -/ +noncomputable def tlToSobolevConst (p : ℝ≥0∞) {k : ℕ} (w : Fin k → EuclideanSpace ℝ d) : + ℝ≥0∞ := + periodicCZConst d p (Rd.derivDualOverlap w) + (4 * Rd.familyHormanderConst (EuclideanSpace ℝ d) (Rd.derivDualBound w)) + (2 * Rd.familyTailConst (EuclideanSpace ℝ d) (Rd.derivDualBound w) 0 1) + +omit [Fact (1 ≤ p)] in +/-- The constant `Torus.tlToSobolevConst d p w` is finite for `1 < p < ∞`. -/ +theorem tlToSobolevConst_ne_top (hp1 : 1 < p) (hp : p ≠ ∞) {k : ℕ} + (w : Fin k → EuclideanSpace ℝ d) : tlToSobolevConst d p w ≠ ∞ := + periodicCZConst_ne_top hp1 hp (Rd.derivDualOverlap_ne_top w) + (ENNReal.mul_ne_top ENNReal.ofNat_ne_top (Rd.familyHormanderConst_ne_top _)) + (ENNReal.mul_ne_top ENNReal.ofNat_ne_top (Rd.familyTailConst_ne_top _ _ _)) + +/-- **The synthesis bound for derivatives of the synthesis kernels on the torus**: for `d ≥ 1`, +`1 < p < ∞`, directions `w ∈ (ℝ^d)^k`, every finite set `s ⊆ ℕ` and `f ∈ L_p(𝕋^d)`, +`‖∑_{j ∈ s} (∂^w ψ̃_j) ⋆ Δ_j f‖_p ≤ C_w ‖ t ↦ ‖(1_s(j) 2^{jk} (ψ_j ⋆ f)(t))_j‖_{ℓ_2} ‖_p` with +`C_w = Torus.tlToSobolevConst d p w`. Since `∂^w ψ̃_j = 2^{jk} (∂^w G̃_j)_{2^j}` +(`Rd.iteratedLineDerivOp_psiDualS`), this is the synthesis bound on the torus +(`Torus.eLpNorm_sum_econv_le`) with the coefficients `1_s(j) 2^{jk} Δ_j f`. -/ +theorem enorm_sum_econvLp_derivDual_le [Nonempty d] (hp1 : 1 < p) (hp : p ≠ ∞) {k : ℕ} + (w : Fin k → EuclideanSpace ℝ d) (s : Finset ℕ) + (f : Lp ℂ p (volume : Measure (UnitAddTorus d))) : + ‖∑ j ∈ s, econvLp hp (∂^{w} (Rd.psiDualS (V := EuclideanSpace ℝ d) j)).integrable + (lpBlock hp j f)‖ₑ ≤ + tlToSobolevConst d p w * eLpNorm (fun t => lqNorm 2 fun j => + if j ∈ s then dyadicWeight (k : ℝ) j * ‖blockFun j f t‖ₑ else 0) p volume := by + set a : ℕ → UnitAddTorus d → ℂ := + fun j => (if j ∈ s then (2 : ℂ) ^ (j * k) else 0) • ⇑(lpBlock hp j f) + have hsum : ⇑(∑ j ∈ s, econvLp hp (∂^{w} (Rd.psiDualS (V := EuclideanSpace ℝ d) j)).integrable + (lpBlock hp j f)) =ᵐ[volume] fun t => ∑ j ∈ s, econv (Rd.derivDualFamily w j) (a j) t := by + filter_upwards [coeFn_sum_econvLp_ae hp s + (fun j => (∂^{w} (Rd.psiDualS (V := EuclideanSpace ℝ d) j)).integrable) + fun j => lpBlock hp j f] with t h + rw [h] + refine Finset.sum_congr rfl fun j hj => ?_ + rw [Rd.iteratedLineDerivOp_psiDualS, econv_smul_kernel] + simp only [a, hj, ↓reduceIte] + have hnorm : (fun t => lqNorm 2 fun j => ‖a j t‖ₑ) =ᵐ[volume] fun t => lqNorm 2 fun j => + if j ∈ s then dyadicWeight (k : ℝ) j * ‖blockFun j f t‖ₑ else 0 := by + filter_upwards [ae_all_iff.2 fun j => lpBlock_ae_eq_blockFun hp j f] with t ht + congr 1 + funext j + simp only [a, Pi.smul_apply, smul_eq_mul, eNorm_mul, ht j] + split_ifs + · rw [Rd.enorm_two_pow_complex, ENNReal.dyadicWeight_natCast] + · rw [eNorm_zero, zero_mul] + rw [Lp.eNorm_def, eLpNorm_congr_ae hsum, ← eLpNorm_congr_ae hnorm] + exact eLpNorm_sum_econv_le (Rd.isCZFamily_derivDualFamily w) (farMass_derivDualFamily_le w) + hp1 hp s (fun j => (Lp.stronglyMeasurable _).measurable.const_smul _) + fun j => (Lp.memLp _).const_smul _ + +/-- The **partial sums of the derivative** `∂^w f` on the torus: +`∑_{j < J} (∂^w ψ̃_j) ⋆ Δ_j f ∈ L_p(𝕋^d)`, the derivatives of the partial sums +`∑_{j < J} Δ_j f` (`Torus.hasWeakLineDeriv_sum_lpBlock`). -/ +noncomputable def derivSynthesisSum (hp : p ≠ ∞) {k : ℕ} (w : Fin k → EuclideanSpace ℝ d) + (f : Lp ℂ p (volume : Measure (UnitAddTorus d))) (J : ℕ) : + Lp ℂ p (volume : Measure (UnitAddTorus d)) := + ∑ j ∈ Finset.range J, econvLp hp (∂^{w} (Rd.psiDualS (V := EuclideanSpace ℝ d) j)).integrable + (lpBlock hp j f) + +/-- **The partial sums are weak derivatives**: for `1 ≤ p < ∞`, `w ∈ (ℝ^d)^k` and +`f ∈ L_p(𝕋^d)`, `Torus.derivSynthesisSum hp w f J = ∂^w (∑_{j < J} Δ_j f)`. Each term is +`∂^w (ψ̃_j ⋆ Δ_j f)` (`Torus.hasWeakLineDeriv_econvLp`), and `ψ̃_j ⋆ Δ_j f = Δ_j f` +(`Torus.econvLp_psiDual_lpBlock`). -/ +theorem hasWeakLineDeriv_sum_lpBlock (hp : p ≠ ∞) {k : ℕ} (w : Fin k → EuclideanSpace ℝ d) + (f : Lp ℂ p (volume : Measure (UnitAddTorus d))) (J : ℕ) : + HasWeakLineDeriv w (∑ j ∈ Finset.range J, lpBlock hp j f) (derivSynthesisSum hp w f J) := + HasWeakLineDeriv.sum _ fun j _ => by + have h := hasWeakLineDeriv_econvLp hp w (Rd.psiDualS (V := EuclideanSpace ℝ d) j) + (lpBlock hp j f) + rwa [econvLp_congr_kernel hp _ (Rd.integrable_psiDual j) (Rd.coe_psiDualS j), + econvLp_psiDual_lpBlock] at h + +/-- **Differences of partial sums**: for `d ≥ 1`, `1 < p < ∞` and `N ≤ N'`, +`‖Torus.derivSynthesisSum hp w f N' - Torus.derivSynthesisSum hp w f N‖_p` is at most +`C_w ‖ t ↦ ‖(2^{jk} (ψ_j ⋆ f)(t))_{j ≥ N}‖_{ℓ_2} ‖_p` (`Torus.enorm_sum_econvLp_derivDual_le` +for the set `{N, …, N' - 1}`; `MeasureTheory.eLpNorm_lqNorm_ite_mono`). -/ +theorem enorm_derivSynthesisSum_sub_le [Nonempty d] (hp1 : 1 < p) (hp : p ≠ ∞) {k : ℕ} + (w : Fin k → EuclideanSpace ℝ d) (f : Lp ℂ p (volume : Measure (UnitAddTorus d))) + {N N' : ℕ} (hNN' : N ≤ N') : + ‖derivSynthesisSum hp w f N' - derivSynthesisSum hp w f N‖ₑ ≤ + tlToSobolevConst d p w * eLpNorm (fun t => lqNorm 2 fun j => + if N ≤ j then dyadicWeight (k : ℝ) j * ‖blockFun j f t‖ₑ else 0) p volume := by + rw [derivSynthesisSum, derivSynthesisSum, ← Finset.sum_Ico_eq_sub _ hNN'] + refine (enorm_sum_econvLp_derivDual_le hp1 hp w _ f).trans ?_ + gcongr + exact eLpNorm_lqNorm_ite_mono (P := (· ∈ Finset.Ico N N')) (Q := (N ≤ ·)) + (fun j => (aestronglyMeasurable_blockFun j f).eNorm.const_mul _) + fun j hj => (Finset.mem_Ico.1 hj).1 + +/-- **The partial sums of the derivative converge**: for `d ≥ 1`, `1 < p < ∞`, `w ∈ (ℝ^d)^k` and +`f ∈ F^k_{p,2}(𝕋^d)`, the partial sums `Torus.derivSynthesisSum hp w f J` form a Cauchy sequence +in `L_p(𝕋^d)`: their differences are bounded by the tails of the weighted blocks +(`Torus.enorm_derivSynthesisSum_sub_le`), which tend to zero +(`MeasureTheory.cauchySeq_of_edist_le_lqNorm_ite`). -/ +theorem cauchySeq_derivSynthesisSum [Nonempty d] (hp1 : 1 < p) (hp : p ≠ ∞) {k : ℕ} + (w : Fin k → EuclideanSpace ℝ d) {f : Lp ℂ p (volume : Measure (UnitAddTorus d))} + (hf : MemTriebelLizorkin (k : ℝ) 2 f) : CauchySeq (derivSynthesisSum hp w f) := + cauchySeq_of_edist_le_lqNorm_ite (p := p) (q := 2) + (g := fun j t => dyadicWeight (k : ℝ) j * ‖blockFun j f t‖ₑ) + (tlToSobolevConst_ne_top hp1 hp w) (zero_lt_one.trans_le Fact.out).ne' hp two_ne_zero + ENNReal.ofNat_ne_top (fun j => (aestronglyMeasurable_blockFun j f).eNorm.const_mul _) hf.ne + fun N N' hNN' => by + rw [eDist_eq_eNorm_sub] + exact enorm_derivSynthesisSum_sub_le hp1 hp w f hNN' + +/-- **`F^k_{p,2}(𝕋^d) ⊆ W^k_p(𝕋^d)` with named constants**: for `d ≥ 1`, `1 < p < ∞`, +directions `w ∈ (ℝ^d)^k` and `f ∈ F^k_{p,2}(𝕋^d)`, the weak derivative `∂^w f` exists as a class +`g ∈ L_p(𝕋^d)` with `‖g‖_p ≤ C_w ‖f‖_{F^k_{p,2}}`, `C_w = Torus.tlToSobolevConst d p w`. The class +`g` is the limit of the partial sums `Torus.derivSynthesisSum hp w f J` +(`Torus.cauchySeq_derivSynthesisSum`), the weak derivatives of `∑_{j < J} Δ_j f → f` +(`Torus.tendsto_sum_lpBlock`); weak derivatives pass to the limit +(`Torus.HasWeakLineDeriv.of_tendsto`). -/ +theorem exists_hasWeakLineDeriv_of_memTriebelLizorkin [Nonempty d] (hp1 : 1 < p) + (hp : p ≠ ∞) {k : ℕ} (w : Fin k → EuclideanSpace ℝ d) + {f : Lp ℂ p (volume : Measure (UnitAddTorus d))} (hf : MemTriebelLizorkin (k : ℝ) 2 f) : + ∃ g : Lp ℂ p (volume : Measure (UnitAddTorus d)), HasWeakLineDeriv w f g ∧ + ‖g‖ₑ ≤ tlToSobolevConst d p w * triebelLizorkinNorm (k : ℝ) 2 f := by + obtain ⟨g, hg⟩ := cauchySeq_tendsto_of_complete (cauchySeq_derivSynthesisSum hp1 hp w hf) + refine ⟨g, HasWeakLineDeriv.of_tendsto (tendsto_sum_lpBlock hp f) hg + (Eventually.of_forall fun J => hasWeakLineDeriv_sum_lpBlock hp w f J), + le_of_tendsto' hg.eNorm fun J => ?_⟩ + refine (enorm_sum_econvLp_derivDual_le hp1 hp w _ f).trans ?_ + gcongr + exact eLpNorm_lqNorm_ite_blockFun_le _ _ f + +/-- **`F^m_{p,2}(𝕋^d) ⊆ W^m_p(𝕋^d)` with named constants**: for `d ≥ 1`, `1 < p < ∞`, `k ≤ m`, +directions `w ∈ (ℝ^d)^k` and `f ∈ F^m_{p,2}(𝕋^d)`, the weak derivative `∂^w f` is a class +`g ∈ L_p(𝕋^d)` with `‖g‖_p ≤ C_w ‖f‖_{F^m_{p,2}}`, `C_w = Torus.tlToSobolevConst d p w` +(`Torus.exists_hasWeakLineDeriv_of_memTriebelLizorkin` and +`Torus.triebelLizorkinNorm_mono_smoothness`). -/ +theorem exists_hasWeakLineDeriv_of_memTriebelLizorkin_of_le [Nonempty d] (hp1 : 1 < p) + (hp : p ≠ ∞) {k m : ℕ} (hkm : k ≤ m) (w : Fin k → EuclideanSpace ℝ d) + {f : Lp ℂ p (volume : Measure (UnitAddTorus d))} (hf : MemTriebelLizorkin (m : ℝ) 2 f) : + ∃ g : Lp ℂ p (volume : Measure (UnitAddTorus d)), HasWeakLineDeriv w f g ∧ + ‖g‖ₑ ≤ tlToSobolevConst d p w * triebelLizorkinNorm (m : ℝ) 2 f := by + have hkm' : (k : ℝ) ≤ m := Nat.cast_le.2 hkm + obtain ⟨g, hg, hgn⟩ := + exists_hasWeakLineDeriv_of_memTriebelLizorkin hp1 hp w (hf.mono_smoothness hkm') + refine ⟨g, hg, hgn.trans ?_⟩ + gcongr + exact triebelLizorkinNorm_mono_smoothness hkm' 2 f + +/-- **`F^m_{p,2}(𝕋^d) ⊆ W^m_p(𝕋^d)`**: for `d ≥ 1` and `1 < p < ∞`, every `f ∈ F^m_{p,2}(𝕋^d)` +lies in `W^m_p(𝕋^d)` (`Torus.exists_hasWeakLineDeriv_of_memTriebelLizorkin_of_le` and +`Torus.memSobolev_iff_exists_hasWeakLineDeriv`). -/ +theorem memSobolev_of_memTriebelLizorkin [Nonempty d] (hp1 : 1 < p) (hp : p ≠ ∞) {m : ℕ} + {f : Lp ℂ p (volume : Measure (UnitAddTorus d))} (hf : MemTriebelLizorkin (m : ℝ) 2 f) : + MemSobolev m f := + memSobolev_iff_exists_hasWeakLineDeriv.2 fun _ hk w => + (exists_hasWeakLineDeriv_of_memTriebelLizorkin_of_le hp1 hp hk w hf).imp fun _ hg => hg.1 + +/-- **`W^m_p(𝕋^d) = F^m_{p,2}(𝕋^d)`**: for `d ≥ 1`, `1 < p < ∞`, `m ∈ ℕ` and `f ∈ L_p(𝕋^d)`, +`f ∈ W^m_p(𝕋^d)` iff `f ∈ F^m_{p,2}(𝕋^d)`. The norm bounds are +`Torus.triebelLizorkinNorm_le_of_hasWeakLineDeriv` and +`Torus.exists_hasWeakLineDeriv_of_memTriebelLizorkin_of_le`. For `p = 2` and `m ≥ 1`, together +with `F^m_{2,2} = B^m_{2,2}` (`Torus.memTriebelLizorkin_iff_memBesov`), this gives +`W^m_2 = B^m_{2,2}` once more (`Torus.memSobolev_iff_memBesov`). -/ +theorem memSobolev_iff_memTriebelLizorkin [Nonempty d] (hp1 : 1 < p) (hp : p ≠ ∞) {m : ℕ} + (f : Lp ℂ p (volume : Measure (UnitAddTorus d))) : + MemSobolev m f ↔ MemTriebelLizorkin (m : ℝ) 2 f := + ⟨memTriebelLizorkin_of_memSobolev hp1 hp, memSobolev_of_memTriebelLizorkin hp1 hp⟩ + +/-! ### The Besov sandwich and local means -/ + +/-- **`W^m_p(𝕋^d) ⊆ B^m_{p,max(p,2)}(𝕋^d)`**: for `d ≥ 1`, `1 < p < ∞` and `m ≥ 1`, every +`f ∈ W^m_p(𝕋^d)` lies in the Besov space `B^m_{p,max(p,2)}(𝕋^d)` of the scheme of trigonometric +polynomials (`Torus.trigScheme`), by `Torus.memBesov_of_memTriebelLizorkin`. -/ +theorem memBesov_of_memSobolev [Nonempty d] (hp1 : 1 < p) (hp : p ≠ ∞) {m : ℕ} (hm : 1 ≤ m) + {f : Lp ℂ p (volume : Measure (UnitAddTorus d))} (hf : MemSobolev m f) : + (trigScheme d).MemBesov volume p (m : ℝ) (max p 2) f := + memBesov_of_memTriebelLizorkin hp (Nat.cast_pos.2 hm) one_le_two + (memTriebelLizorkin_of_memSobolev hp1 hp hf) + +/-- **`B^m_{p,min(p,2)}(𝕋^d) ⊆ W^m_p(𝕋^d)`**: for `d ≥ 1`, `1 < p < ∞` and `m ∈ ℕ`, every `f` in +the Besov space `B^m_{p,min(p,2)}(𝕋^d)` lies in `W^m_p(𝕋^d)` +(`Torus.memTriebelLizorkin_two_of_memBesov`). -/ +theorem memSobolev_of_memBesov [Nonempty d] (hp1 : 1 < p) (hp : p ≠ ∞) {m : ℕ} + {f : Lp ℂ p (volume : Measure (UnitAddTorus d))} + (hf : (trigScheme d).MemBesov volume p (m : ℝ) (min p 2) f) : MemSobolev m f := + memSobolev_of_memTriebelLizorkin hp1 hp + (memTriebelLizorkin_two_of_memBesov hp1 hp (Nat.cast_nonneg m) hf) + +/-- **`W^m_p(𝕋^d) ⊆ B^m_{p,max(p,2)}(𝕋^d)` with named constants**: under the hypotheses of +`Torus.triebelLizorkinNorm_le_of_hasWeakLineDeriv` and `m ≥ 1`, the approximation norm of `f` in +`A^m_{max(p,2)}` of the trigonometric polynomials is at most +`2 · 2^m (1 - 2^{-m})⁻¹ (‖Φ‖_1 ‖f‖_p + 2^m ∑_α K_α ‖g_α‖_p)` +(`Torus.approxNormDyadic_le_triebelLizorkinNorm`). -/ +theorem approxNormDyadic_le_of_hasWeakLineDeriv [Nonempty d] (hp1 : 1 < p) (hp : p ≠ ∞) + {m : ℕ} (hm : 1 ≤ m) {f : Lp ℂ p (volume : Measure (UnitAddTorus d))} + {g : (Fin m → Fin (finrank ℝ (EuclideanSpace ℝ d))) → + Lp ℂ p (volume : Measure (UnitAddTorus d))} + (hg : ∀ i, HasWeakLineDeriv (fun k => Rd.gridBasis (EuclideanSpace ℝ d) (i k)) f (g i)) : + ((trigScheme d).toLp volume p).approxNormDyadic (m : ℝ) (max p 2) f ≤ + 2 * dyadicWeight (m : ℝ) 1 * (1 - (2 : ℝ≥0∞) ^ (-(m : ℝ)))⁻¹ * + (eLpNorm (Rd.lpKernel (V := EuclideanSpace ℝ d)) 1 volume * ‖f‖ₑ + + 2 ^ m * ∑ i, sobolevToTLConst d p i * ‖g i‖ₑ) := + (approxNormDyadic_le_triebelLizorkinNorm hp (Nat.cast_pos.2 hm) one_le_two f).trans + (by gcongr; exact triebelLizorkinNorm_le_of_hasWeakLineDeriv hp1 hp hg) + +/-- **`B^m_{p,min(p,2)}(𝕋^d) ⊆ W^m_p(𝕋^d)` with named constants**: for `d ≥ 1`, `1 < p < ∞`, +`k ≤ m`, directions `w ∈ (ℝ^d)^k` and `f ∈ B^m_{p,min(p,2)}(𝕋^d)`, the weak derivative `∂^w f` is +a class `g ∈ L_p(𝕋^d)` with +`‖g‖_p ≤ C_w · 2 (#d + 1) 2^{(#d + 1) m} ‖Φ‖_1 ‖f‖_{A^m_{min(p,2)}}`, +`C_w = Torus.tlToSobolevConst d p w` (`Torus.triebelLizorkinNorm_le_approxNormDyadic`). -/ +theorem exists_hasWeakLineDeriv_of_memBesov [Nonempty d] (hp1 : 1 < p) (hp : p ≠ ∞) + {k m : ℕ} (hkm : k ≤ m) (w : Fin k → EuclideanSpace ℝ d) + {f : Lp ℂ p (volume : Measure (UnitAddTorus d))} + (hf : (trigScheme d).MemBesov volume p (m : ℝ) (min p 2) f) : + ∃ g : Lp ℂ p (volume : Measure (UnitAddTorus d)), HasWeakLineDeriv w f g ∧ + ‖g‖ₑ ≤ tlToSobolevConst d p w * (2 * ((Fintype.card d : ℝ≥0∞) + 1) * + dyadicWeight (m : ℝ) (Fintype.card d + 1) * + eLpNorm (Rd.lpKernel (V := EuclideanSpace ℝ d)) 1 volume * + ((trigScheme d).toLp volume p).approxNormDyadic (m : ℝ) (min p 2) f) := by + obtain ⟨g, hg, hgn⟩ := exists_hasWeakLineDeriv_of_memTriebelLizorkin_of_le hp1 hp hkm w + (memTriebelLizorkin_two_of_memBesov hp1 hp (Nat.cast_nonneg m) hf) + refine ⟨g, hg, hgn.trans ?_⟩ + gcongr + exact triebelLizorkinNorm_le_approxNormDyadic hp (Nat.cast_nonneg m) one_le_two f + +/-- **`W^m_p(𝕋^d)` by local means**: for `d ≥ 1`, `1 < p < ∞`, a bump `b` on `ℝ^d` and orders +`1 ≤ m < L`, `f ∈ W^m_p(𝕋^d)` iff `‖f‖_{F^m_{p,2}}^{b,L} < ∞`, through `W^m_p = F^m_{p,2}` and +the local means characterisation of `F^m_{p,2}(𝕋^d)` (`Torus.memTriebelLizorkin_iff_tlLocalMeans` +with `q = 2`). -/ +theorem memSobolev_iff_tlLocalMeans [Nonempty d] (b : Rd.LocalMeansBump (EuclideanSpace ℝ d)) + (hp1 : 1 < p) (hp : p ≠ ∞) {m L : ℕ} (hm : 1 ≤ m) (hmL : m < L) + (f : Lp ℂ p (volume : Measure (UnitAddTorus d))) : + MemSobolev m f ↔ tlLocalMeansNorm b L (m : ℝ) 2 f < ∞ := + (memSobolev_iff_memTriebelLizorkin hp1 hp f).trans + (memTriebelLizorkin_iff_tlLocalMeans b hp1 hp ENNReal.one_lt_two (Nat.cast_pos.2 hm) + (Nat.cast_lt.2 hmL)) + +end Torus diff --git a/LeanPool/FunctionSpaces/Torus/SquareFunction.lean b/LeanPool/FunctionSpaces/Torus/SquareFunction.lean new file mode 100644 index 0000000000..8be50afc30 --- /dev/null +++ b/LeanPool/FunctionSpaces/Torus/SquareFunction.lean @@ -0,0 +1,168 @@ +/- +Copyright (c) 2026 Mario Ullrich. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Mario Ullrich +-/ +module + +public import LeanPool.FunctionSpaces.Torus.SingularIntegrals +public import LeanPool.FunctionSpaces.Torus.TriebelLizorkin + +/- +Modified for Lean Pool: module names and imports adapted. +-/ + +/-! +# The square function theorem on the torus + +Let `d ≥ 1` and `1 < p < ∞`. The norm `‖f‖_{F^0_{p,2}(𝕋^d)}` of `f ∈ L_p(𝕋^d)` is the `L_p` norm +of the square function `t ↦ ‖((ψ_j ⋆ f)(t))_j‖_{ℓ_2}` of the Littlewood–Paley blocks +(`Torus.triebelLizorkinNorm_zero_left`). The square function theorem on the torus is the +two-sided bound of this norm by `‖f‖_p`, with named constants that are proved finite +(`Torus.squareFunctionConst_ne_top`, `Torus.squareSynthesisConst_ne_top`): + +* `‖f‖_{F^0_{p,2}(𝕋^d)} ≤ Q^𝕋_p ‖f‖_p` (`Torus.triebelLizorkinNorm_zero_two_le`, constant + `Torus.squareFunctionConst`): the analysis bound of the vector-valued singular integrals on the + torus for the Calderón–Zygmund family `(ψ_j)_j`; +* `‖f‖_p ≤ Q̃^𝕋_p ‖f‖_{F^0_{p,2}(𝕋^d)}` (`Torus.enorm_le_triebelLizorkinNorm_zero_two`, + constant `Torus.squareSynthesisConst`): the synthesis kernels reproduce the blocks, + `psiDual_j ⋆ Δ_j f = Δ_j f` (`Torus.econvLp_psiDual_lpBlock`), so + `∑_{j ∈ s} psiDual_j ⋆ Δ_j f = ∑_{j ∈ s} Δ_j f` almost everywhere + (`Torus.sum_econv_psiDual_lpBlock_ae`); these partial sums tend to `f` + (`Torus.tendsto_sum_lpBlock`), and the synthesis bound for the family `(psiDual_j)_j` applies. + +Hence `F^0_{p,2}(𝕋^d) = L_p(𝕋^d)` (`Torus.triebelLizorkinSpace_zero_two_eq_top`), and +`B^s_{p,min(p,2)}(𝕋^d) ⊆ F^s_{p,2}(𝕋^d)` holds for every `s ≥ 0` +(`Torus.memTriebelLizorkin_two_of_memBesov`). +-/ + +@[expose] public section + +open MeasureTheory UnitAddTorus Filter +open scoped ENNReal TorusHaar Topology + +open ENNReal (lqNorm) + +namespace Torus + +variable {d : Type*} [Fintype d] {p : ℝ≥0∞} [Fact (1 ≤ p)] + +/-! ### The constants -/ + +variable (d) in +/-- The constant `Q^𝕋_p` of the **upper square function bound on the torus**: the constant +`Torus.periodicCZConst` of the Calderón–Zygmund family of the blocks `ψ_j`, with overlap `2`, +Hörmander constant `4 H_{A^ψ}` and far mass bound `2 T_{A^ψ}`, where `A^ψ = Rd.psiBaseBound` +(`Rd.isCZFamily_psi`, `Torus.farMass_psi_le`). -/ +noncomputable def squareFunctionConst (p : ℝ≥0∞) : ℝ≥0∞ := + periodicCZConst d p 2 + (4 * Rd.familyHormanderConst (EuclideanSpace ℝ d) (Rd.psiBaseBound (EuclideanSpace ℝ d))) + (2 * Rd.familyTailConst (EuclideanSpace ℝ d) (Rd.psiBaseBound (EuclideanSpace ℝ d)) 0 1) + +/-- The constant `Torus.squareFunctionConst d p` is finite for `1 < p < ∞`. -/ +theorem squareFunctionConst_ne_top {p : ℝ≥0∞} (hp1 : 1 < p) (hp : p ≠ ∞) : + squareFunctionConst d p ≠ ∞ := + periodicCZConst_ne_top hp1 hp ENNReal.ofNat_ne_top + (ENNReal.mul_ne_top ENNReal.ofNat_ne_top (Rd.familyHormanderConst_ne_top _)) + (ENNReal.mul_ne_top ENNReal.ofNat_ne_top (Rd.familyTailConst_ne_top _ _ _)) + +variable (d) in +/-- The constant `Q̃^𝕋_p` of the **lower square function bound on the torus**: the constant +`Torus.periodicCZConst` of the Calderón–Zygmund family of the synthesis kernels `psiDual_j`, +with overlap `4`, Hörmander constant `4 H_Ã` and far mass bound `2 T_Ã`, where +`Ã = Rd.psiDualBaseBound` (`Rd.isCZFamily_psiDual`, `Torus.farMass_psiDual_le`). -/ +noncomputable def squareSynthesisConst (p : ℝ≥0∞) : ℝ≥0∞ := + periodicCZConst d p 4 + (4 * Rd.familyHormanderConst (EuclideanSpace ℝ d) (Rd.psiDualBaseBound (EuclideanSpace ℝ d))) + (2 * Rd.familyTailConst (EuclideanSpace ℝ d) (Rd.psiDualBaseBound (EuclideanSpace ℝ d)) 0 1) + +/-- The constant `Torus.squareSynthesisConst d p` is finite for `1 < p < ∞`. -/ +theorem squareSynthesisConst_ne_top {p : ℝ≥0∞} (hp1 : 1 < p) (hp : p ≠ ∞) : + squareSynthesisConst d p ≠ ∞ := + periodicCZConst_ne_top hp1 hp ENNReal.ofNat_ne_top + (ENNReal.mul_ne_top ENNReal.ofNat_ne_top (Rd.familyHormanderConst_ne_top _)) + (ENNReal.mul_ne_top ENNReal.ofNat_ne_top (Rd.familyTailConst_ne_top _ _ _)) + +/-! ### The upper bound -/ + +/-- **The upper square function bound on the torus**: for `d ≥ 1`, `1 < p < ∞` and +`f ∈ L_p(𝕋^d)`, `‖f‖_{F^0_{p,2}(𝕋^d)} ≤ Q^𝕋_p ‖f‖_p` with +`Q^𝕋_p = Torus.squareFunctionConst d p`: the analysis bound on the torus +(`Torus.eLpNorm_lqNorm_econv_le`) for the Calderón–Zygmund family `(ψ_j)_j`. -/ +theorem triebelLizorkinNorm_zero_two_le [Nonempty d] (hp1 : 1 < p) (hp : p ≠ ∞) + (f : Lp ℂ p (volume : Measure (UnitAddTorus d))) : + triebelLizorkinNorm 0 2 f ≤ squareFunctionConst d p * ‖f‖ₑ := by + rw [triebelLizorkinNorm_zero_left] + exact eLpNorm_lqNorm_econv_le Rd.isCZFamily_psi farMass_psi_le hp1 hp f + +/-- **`L_p(𝕋^d) ⊆ F^0_{p,2}(𝕋^d)`**: for `d ≥ 1` and `1 < p < ∞`, every `f ∈ L_p(𝕋^d)` has a +finite Triebel–Lizorkin norm `‖f‖_{F^0_{p,2}(𝕋^d)}`. -/ +theorem memTriebelLizorkin_zero_two [Nonempty d] (hp1 : 1 < p) (hp : p ≠ ∞) + (f : Lp ℂ p (volume : Measure (UnitAddTorus d))) : MemTriebelLizorkin 0 2 f := + (triebelLizorkinNorm_zero_two_le hp1 hp f).trans_lt + (ENNReal.mul_lt_top (squareFunctionConst_ne_top hp1 hp).lt_top eNorm_lt_top) + +/-! ### The reproducing formula -/ + +/-- **The synthesis kernels reproduce the blocks**: for `1 ≤ p < ∞` and `f ∈ L_p(𝕋^d)`, +`psiDual_j ⋆ Δ_j f = Δ_j f`, since `psiDual_j ⋆ ψ_j = ψ_j` on `ℝ^d` (`Rd.conv_psiDual_psi`). -/ +theorem econvLp_psiDual_lpBlock (hp : p ≠ ∞) (j : ℕ) + (f : Lp ℂ p (volume : Measure (UnitAddTorus d))) : + econvLp hp (Rd.integrable_psiDual j) (lpBlock hp j f) = lpBlock hp j f := + econvLp_comp_econvLp_of_eq hp (Rd.integrable_psiDual j) (Rd.integrable_psi j) + (Rd.integrable_psi j) (Rd.conv_psiDual_psi j) f + +/-- **The reproducing sums**: for `1 ≤ p < ∞`, `f ∈ L_p(𝕋^d)` and every finite set `s ⊆ ℕ`, +`∑_{j ∈ s} psiDual_j ⋆ Δ_j f = ∑_{j ∈ s} Δ_j f` almost everywhere, with the pointwise +convolutions of representatives on the left. -/ +theorem sum_econv_psiDual_lpBlock_ae (hp : p ≠ ∞) (s : Finset ℕ) + (f : Lp ℂ p (volume : Measure (UnitAddTorus d))) : + (fun t => ∑ j ∈ s, econv (Rd.psiDual j) (lpBlock hp j f) t) =ᵐ[volume] + ⇑(∑ j ∈ s, lpBlock hp j f) := by + have h := coeFn_sum_econvLp_ae hp s (fun j => Rd.integrable_psiDual (V := EuclideanSpace ℝ d) j) + fun j => lpBlock hp j f + simp only [econvLp_psiDual_lpBlock] at h + exact h.symm + +/-! ### The lower bound and `L_p = F^0_{p,2}` -/ + +/-- **The lower square function bound on the torus**: for `d ≥ 1`, `1 < p < ∞` and +`f ∈ L_p(𝕋^d)`, `‖f‖_p ≤ Q̃^𝕋_p ‖f‖_{F^0_{p,2}(𝕋^d)}` with +`Q̃^𝕋_p = Torus.squareSynthesisConst d p`. The partial sums `∑_{j < J} Δ_j f` tend to `f` +(`Torus.tendsto_sum_lpBlock`) and equal `∑_{j < J} psiDual_j ⋆ Δ_j f`, whose `L_p` norms the +synthesis bound on the torus (`Torus.eLpNorm_sum_econv_le`) for the family `(psiDual_j)_j` +controls. -/ +theorem enorm_le_triebelLizorkinNorm_zero_two [Nonempty d] (hp1 : 1 < p) (hp : p ≠ ∞) + (f : Lp ℂ p (volume : Measure (UnitAddTorus d))) : + ‖f‖ₑ ≤ squareSynthesisConst d p * triebelLizorkinNorm 0 2 f := by + have h : Tendsto (fun J => ‖∑ j ∈ Finset.range J, lpBlock hp j f‖ₑ) atTop (𝓝 ‖f‖ₑ) := + (tendsto_sum_lpBlock hp f).eNorm + have hblock : (fun t => lqNorm 2 fun j => ‖lpBlock hp j f t‖ₑ) =ᵐ[volume] + fun t => lqNorm 2 fun j => ‖blockFun j f t‖ₑ := by + filter_upwards [ae_all_iff.2 fun j => lpBlock_ae_eq_blockFun hp j f] with t ht + simp only [ht] + refine le_of_tendsto' h fun J => ?_ + rw [Lp.eNorm_def, ← eLpNorm_congr_ae (sum_econv_psiDual_lpBlock_ae hp _ f), + triebelLizorkinNorm_zero_left, ← eLpNorm_congr_ae hblock] + exact eLpNorm_sum_econv_le Rd.isCZFamily_psiDual farMass_psiDual_le hp1 hp _ + (fun j => (Lp.stronglyMeasurable _).measurable) fun j => Lp.memLp _ + +/-- **The square function theorem on the torus**: for `d ≥ 1` and `1 < p < ∞`, the subspace +`F^0_{p,2}(𝕋^d)` of `L_p(𝕋^d)` is all of `L_p(𝕋^d)`. The norms are equivalent by +`Torus.triebelLizorkinNorm_zero_two_le` and `Torus.enorm_le_triebelLizorkinNorm_zero_two`. -/ +theorem triebelLizorkinSpace_zero_two_eq_top [Nonempty d] (hp1 : 1 < p) (hp : p ≠ ∞) : + triebelLizorkinSpace (d := d) (p := p) 0 2 one_le_two = ⊤ := + Submodule.eq_top_iff'.2 fun f => memTriebelLizorkin_zero_two hp1 hp f + +/-- **`B^s_{p,min(p,2)}(𝕋^d) ⊆ F^s_{p,2}(𝕋^d)` for every `s ≥ 0`**: for `d ≥ 1` and +`1 < p < ∞`; for `s > 0` this is the Besov sandwich (`Torus.memTriebelLizorkin_of_memBesov`), and +for `s = 0` the square function theorem gives `F^0_{p,2}(𝕋^d) = L_p(𝕋^d)`. This is the torus +form of `Rd.memTriebelLizorkin_two_of_memApprox`. -/ +theorem memTriebelLizorkin_two_of_memBesov [Nonempty d] (hp1 : 1 < p) (hp : p ≠ ∞) {s : ℝ} + (hs : 0 ≤ s) {f : Lp ℂ p (volume : Measure (UnitAddTorus d))} + (hf : (trigScheme d).MemBesov volume p s (min p 2) f) : MemTriebelLizorkin s 2 f := by + rcases hs.lt_or_eq with hs | rfl + · exact memTriebelLizorkin_of_memBesov hp hs one_le_two hf + · exact memTriebelLizorkin_zero_two hp1 hp f + +end Torus diff --git a/LeanPool/FunctionSpaces/Torus/Trace.lean b/LeanPool/FunctionSpaces/Torus/Trace.lean new file mode 100644 index 0000000000..8329a5266d --- /dev/null +++ b/LeanPool/FunctionSpaces/Torus/Trace.lean @@ -0,0 +1,553 @@ +/- +Copyright (c) 2026 Mario Ullrich. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Mario Ullrich +-/ +module + +public import LeanPool.FunctionSpaces.Torus.Embeddings +public import LeanPool.FunctionSpaces.ApproximationSpaces.Trace + +/- +Modified for Lean Pool: module names and imports adapted. +-/ + +/-! +# Traces on the torus + +The trace of a function on `𝕋^(n+1)` is its restriction to the face `{x_0 = 0} ≅ 𝕋^n`, +`x' ↦ f(0, x')` (`Torus.face`, `Torus.restrictFace`). It is defined on continuous functions, +not on `L_p`. This file shows, for `1 ≤ p < ∞`, `1 ≤ q ≤ ∞` and `s > 0` +(`Torus.trace_besov`): the restriction extends from trigonometric polynomials to a map from +`B^{s+1/p}_{p,q}(𝕋^(n+1))` into `B^s_{p,q}(𝕋^n)`, and every element of `B^s_{p,q}(𝕋^n)` is a +trace. Both directions are the abstract trace theorem (`ApproximationSpaces.Trace`) for two +inequalities on trigonometric polynomials. The restrictions and extensions keep the degree, +since they send monomials to multiples of monomials (`Torus.restrictFace_mem_trigPoly`). + +* **The trace inequality** (`Torus.eLpNorm_restrictFace_le`): for `a` of degree `< m`, + `‖a(0, ·)‖_{L_p(𝕋^n)} ≤ (2⌈p/2⌉ m)^(1/p) ‖a‖_{L_p(𝕋^(n+1))}`. On every line + `t ↦ a(t, x')` the one-dimensional Nikolskii inequality bounds `|a(0, x')|^p` by + `2⌈p/2⌉ m ∫ |a(t, x')|^p dt`; integration over `x'` (Fubini on `𝕋^(n+1) = 𝕋 × 𝕋^n`, + `Torus.lintegral_eq_lintegral_cons`) gives the bound. So the restriction is a trace bound + of exponent `1/p` (`Torus.traceBound`). +* **The extension** (`Torus.extendFace`): `b` on `𝕋^n` of degree `< m` extends to + `φ_m(x_0) b(x')`, of degree `< 3m`, with the normalised Fejér kernel + `φ_m = m^(-2) |∑_{j Fin.cons 0 x', continuous_const.finCons continuous_id⟩ + +@[simp] +theorem face_apply (x' : UnitAddTorus (Fin n)) : face n x' = Fin.cons 0 x' := rfl + +/-- The line `t ↦ (t, x')` through `x'`, parametrised by `𝕋^1`. -/ +noncomputable def lineThrough (x' : UnitAddTorus (Fin n)) : + C(UnitAddTorus (Fin 1), UnitAddTorus (Fin (n + 1))) := + ⟨fun v => Fin.cons (v 0) x', + Continuous.finCons (A := fun _ => UnitAddCircle) (continuous_apply 0) continuous_const⟩ + +@[simp] +theorem lineThrough_apply (x' : UnitAddTorus (Fin n)) (v : UnitAddTorus (Fin 1)) : + lineThrough x' v = Fin.cons (v 0) x' := rfl + +/-- Composition with a continuous map, as a linear map of bounded continuous functions +(Mathlib's `BoundedContinuousFunction.compContinuousCLM`). -/ +noncomputable def compLinear {Y Z : Type*} [TopologicalSpace Y] [TopologicalSpace Z] + (g : C(Y, Z)) : (Z →ᵇ ℂ) →ₗ[ℂ] (Y →ᵇ ℂ) := + (BoundedContinuousFunction.compContinuousCLM ℂ ℂ g).toLinearMap + +@[simp] +theorem compLinear_apply {Y Z : Type*} [TopologicalSpace Y] [TopologicalSpace Z] (g : C(Y, Z)) + (a : Z →ᵇ ℂ) (y : Y) : compLinear g a y = a (g y) := rfl + +/-- The restriction to the face `{x_0 = 0}`. -/ +noncomputable abbrev restrictFace (n : ℕ) : + (UnitAddTorus (Fin (n + 1)) →ᵇ ℂ) →ₗ[ℂ] (UnitAddTorus (Fin n) →ᵇ ℂ) := + compLinear (face n) + +/-- `deg (k_1, …, k_n) ≤ deg (k_0, …, k_n)`. -/ +theorem deg_tail_le (k : Fin (n + 1) → ℤ) : deg (Fin.tail k) ≤ deg k := + deg_le_iff.2 fun i => natAbs_le_deg k i.succ + +/-- `|k_0| ≤ deg k`, as the degree of the one-variable index `(k_0)`. -/ +theorem deg_const_le (k : Fin (n + 1) → ℤ) : deg (fun _ : Fin 1 => k 0) ≤ deg k := + deg_le_iff.2 fun _ => natAbs_le_deg k 0 + +/-- The restriction of a monomial to the face is a monomial: `e_k(0, x') = e_{k'}(x')`. -/ +theorem restrictFace_trigMonomial (k : Fin (n + 1) → ℤ) : + restrictFace n (trigMonomial k) = trigMonomial (Fin.tail k) := by + ext x' + simp only [compLinear_apply, face_apply, trigMonomial_apply, mFourier, ContinuousMap.coe_mk, + Fin.prod_univ_succ, Fin.cons_zero, Fin.cons_succ, fourier_eval_zero, one_mul, Fin.tail] + +/-- A monomial on a line is a multiple of a one-variable monomial: +`e_k(t, x') = e_{k'}(x') e_{k_0}(t)`. -/ +theorem compLinear_lineThrough_trigMonomial (x' : UnitAddTorus (Fin n)) (k : Fin (n + 1) → ℤ) : + compLinear (lineThrough x') (trigMonomial k) = + mFourier (Fin.tail k) x' • trigMonomial (fun _ : Fin 1 => k 0) := by + ext v + simp only [compLinear_apply, lineThrough_apply, trigMonomial_apply, mFourier, + ContinuousMap.coe_mk, Fin.prod_univ_succ, Fin.cons_zero, Fin.cons_succ, + FunLike.coe_smul, Pi.smul_apply, smul_eq_mul, Fin.tail] + ring + +/-- The restriction of a trigonometric polynomial of degree `< m` to the face is a trigonometric +polynomial of degree `< m`. -/ +theorem restrictFace_mem_trigPoly {m : ℕ} {a : UnitAddTorus (Fin (n + 1)) →ᵇ ℂ} + (ha : a ∈ trigPoly (Fin (n + 1)) m) : restrictFace n a ∈ trigPoly (Fin n) m := + map_mem_trigPoly _ (fun k hk => by + rw [restrictFace_trigMonomial] + exact trigMonomial_mem_trigPoly ((deg_tail_le k).trans_lt hk)) ha + +/-- The restriction of a trigonometric polynomial of degree `< m` to a line is a one-variable +trigonometric polynomial of degree `< m`. -/ +theorem compLinear_lineThrough_mem_trigPoly (x' : UnitAddTorus (Fin n)) {m : ℕ} + {a : UnitAddTorus (Fin (n + 1)) →ᵇ ℂ} (ha : a ∈ trigPoly (Fin (n + 1)) m) : + compLinear (lineThrough x') a ∈ trigPoly (Fin 1) m := + map_mem_trigPoly _ (fun k hk => by + rw [compLinear_lineThrough_trigMonomial] + exact Submodule.smul_mem _ _ (trigMonomial_mem_trigPoly ((deg_const_le k).trans_lt hk))) ha + +/-- **Fubini on `𝕋^(n+1) = 𝕋 × 𝕋^n`**, with the first factor written as `𝕋^1`: +`∫ F = ∫_{x'} ∫_v F(v_0, x')`. -/ +theorem lintegral_eq_lintegral_cons {F : UnitAddTorus (Fin (n + 1)) → ℝ≥0∞} (hF : Measurable F) : + ∫⁻ x, F x = + ∫⁻ x' : UnitAddTorus (Fin n), ∫⁻ v : UnitAddTorus (Fin 1), F (Fin.cons (v 0) x') := by + set e := MeasurableEquiv.piFinSuccAbove (fun _ : Fin (n + 1) => UnitAddCircle) 0 + have he : MeasurePreserving e := volume_preserving_piFinSuccAbove (fun _ => UnitAddCircle) 0 + have he' : ∀ y : UnitAddCircle × UnitAddTorus (Fin n), e.symm y = Fin.cons y.1 y.2 := fun y => by + simp [e, MeasurableEquiv.piFinSuccAbove_symm_apply] + have h1 : ∫⁻ x, F x = ∫⁻ y : UnitAddCircle × UnitAddTorus (Fin n), F (e.symm y) := + (he.symm.lintegral_comp hF).symm + have hmeas : Measurable fun y : UnitAddCircle × UnitAddTorus (Fin n) => F (e.symm y) := + hF.comp e.symm.measurable + rw [h1, Measure.volume_eq_prod, lintegral_prod_symm _ hmeas.aemeasurable] + congr 1; funext x' + have hu : Measurable fun u : UnitAddCircle => F (Fin.cons u x') := by + have := hmeas.comp (measurable_id.prodMk (measurable_const (a := x'))) + simpa [Function.comp_def, he'] using this + simp only [he'] + rw [← (volume_preserving_funUnique (Fin 1) UnitAddCircle).lintegral_comp hu] + simp [MeasurableEquiv.funUnique_apply] + rfl + +/-- **The one-dimensional Nikolskii inequality**, pointwise in `ℝ≥0∞`: for a trigonometric +polynomial `F` of degree `< m` on `𝕋^1` and `1 ≤ p < ∞`, `|F(v)|^p ≤ 2⌈p/2⌉ m ∫ |F|^p`. -/ +theorem enorm_rpow_le_lintegral {m : ℕ} {F : UnitAddTorus (Fin 1) →ᵇ ℂ} + (hF : F ∈ trigPoly (Fin 1) m) {p : ℝ≥0∞} (hp : 1 ≤ p) (hp' : p ≠ ∞) + (v : UnitAddTorus (Fin 1)) : + ‖F v‖ₑ ^ p.toReal ≤ ((2 * (⌈p.toReal / 2⌉₊ * m) : ℕ) : ℝ≥0∞) * ∫⁻ w, ‖F w‖ₑ ^ p.toReal := by + set P := p.toReal + have hP0 : 0 < P := zero_lt_one.trans_le (ENNReal.one_le_toReal_of_one_le hp hp') + have hp0 : p ≠ 0 := (zero_lt_one.trans_le hp).ne' + have h := norm_rpow_le_card_mul_eLpNorm_rpow hF hp hp' + rw [Fintype.card_fin, pow_one] at h + have hfin : eLpNorm F p volume ≠ ∞ := + ((F.memLp_top (μ := volume)).mono_exponent le_top).eLpNorm_ne_top + have hI : eLpNorm F p volume ^ P = ∫⁻ w, ‖F w‖ₑ ^ P := by + rw [eLpNorm_eq_lintegral_rpow_eNorm_toReal hp0 hp' F.continuous.aestronglyMeasurable, + one_div, ENNReal.rpow_inv_rpow hP0.ne'] + calc ‖F v‖ₑ ^ P = ENNReal.ofReal (‖F v‖ ^ P) := by + rw [← ofReal_norm, ENNReal.ofReal_rpow_of_nonneg (norm_nonneg _) hP0.le] + _ ≤ ENNReal.ofReal (‖F‖ ^ P) := ENNReal.ofReal_le_ofReal + (Real.rpow_le_rpow (norm_nonneg _) (F.norm_coe_le_norm v) hP0.le) + _ ≤ ENNReal.ofReal (((2 * (⌈P / 2⌉₊ * m) : ℕ) : ℝ) * (eLpNorm F p volume).toReal ^ P) := + ENNReal.ofReal_le_ofReal h + _ = ((2 * (⌈P / 2⌉₊ * m) : ℕ) : ℝ≥0∞) * eLpNorm F p volume ^ P := by + rw [ENNReal.ofReal_mul (by positivity), ENNReal.ofReal_natCast, ENNReal.toReal_rpow, + ENNReal.ofReal_toReal (ENNReal.rpow_ne_top_of_nonneg hP0.le hfin)] + _ = _ := by rw [hI] + +/-- **The trace inequality on the torus**: for a trigonometric polynomial `a` of degree `< m` +on `𝕋^(n+1)` and `1 ≤ p < ∞`, `‖a(0, ·)‖_p ≤ (2⌈p/2⌉ m)^(1/p) ‖a‖_p`. -/ +theorem eLpNorm_restrictFace_le {m : ℕ} {a : UnitAddTorus (Fin (n + 1)) →ᵇ ℂ} + (ha : a ∈ trigPoly (Fin (n + 1)) m) {p : ℝ≥0∞} (hp : 1 ≤ p) (hp' : p ≠ ∞) : + eLpNorm (restrictFace n a) p volume ≤ + ((2 * (⌈p.toReal / 2⌉₊ * m) : ℕ) : ℝ≥0∞) ^ (1 / p.toReal) * eLpNorm a p volume := by + set P := p.toReal + set N : ℝ≥0∞ := ((2 * (⌈P / 2⌉₊ * m) : ℕ) : ℝ≥0∞) + have hP0 : 0 < P := zero_lt_one.trans_le (ENNReal.one_le_toReal_of_one_le hp hp') + have hp0 : p ≠ 0 := (zero_lt_one.trans_le hp).ne' + rw [eLpNorm_eq_lintegral_rpow_eNorm_toReal hp0 hp' + (restrictFace n a).continuous.aestronglyMeasurable, + eLpNorm_eq_lintegral_rpow_eNorm_toReal hp0 hp' a.continuous.aestronglyMeasurable, + ← ENNReal.mul_rpow_of_nonneg _ _ (by positivity)] + refine ENNReal.rpow_le_rpow ?_ (by positivity) + have hmeas : Measurable fun x => ‖a x‖ₑ ^ P := a.continuous.measurable.eNorm.pow_const P + calc ∫⁻ x', ‖restrictFace n a x'‖ₑ ^ P + ≤ ∫⁻ x', N * ∫⁻ v : UnitAddTorus (Fin 1), ‖a (Fin.cons (v 0) x')‖ₑ ^ P := by + refine lintegral_mono fun x' => ?_ + exact enorm_rpow_le_lintegral (compLinear_lineThrough_mem_trigPoly x' ha) hp hp' + (fun _ => 0) + _ = N * ∫⁻ x', ∫⁻ v : UnitAddTorus (Fin 1), ‖a (Fin.cons (v 0) x')‖ₑ ^ P := + lintegral_const_mul' _ _ (ENNReal.natCast_ne_top _) + _ = N * ∫⁻ x, ‖a x‖ₑ ^ P := by rw [lintegral_eq_lintegral_cons hmeas] + +/-! ### Extension from the face -/ + +/-- The projection `x ↦ (x_1, …, x_n)` of `𝕋^(n+1)` onto the face coordinates. -/ +noncomputable def tailMap (n : ℕ) : C(UnitAddTorus (Fin (n + 1)), UnitAddTorus (Fin n)) := + ⟨Fin.tail, continuous_pi fun i => continuous_apply i.succ⟩ + +@[simp] +theorem tailMap_apply (x : UnitAddTorus (Fin (n + 1))) : tailMap n x = Fin.tail x := rfl + +/-- `deg (0, k') = deg k'`, at most. -/ +theorem deg_cons_zero_le (k : Fin n → ℤ) : deg (Fin.cons 0 k : Fin (n + 1) → ℤ) ≤ deg k := + deg_le_iff.2 fun i => by + refine Fin.cases ?_ (fun j => ?_) i + · simp + · simpa using natAbs_le_deg k j + +/-- A monomial of the face coordinates is a monomial of `𝕋^(n+1)`: `e_{k'}(x') = e_{(0,k')}(x)`. -/ +theorem compLinear_tailMap_trigMonomial (k : Fin n → ℤ) : + compLinear (tailMap n) (trigMonomial k) = trigMonomial (Fin.cons 0 k) := by + ext x + simp only [compLinear_apply, tailMap_apply, trigMonomial_apply, mFourier, ContinuousMap.coe_mk, + Fin.prod_univ_succ, Fin.cons_zero, Fin.cons_succ, fourier_zero, one_mul, Fin.tail] + +/-- A trigonometric polynomial of the face coordinates is one of `𝕋^(n+1)`, of the same +degree. -/ +theorem compLinear_tailMap_mem_trigPoly {m : ℕ} {b : UnitAddTorus (Fin n) →ᵇ ℂ} + (hb : b ∈ trigPoly (Fin n) m) : compLinear (tailMap n) b ∈ trigPoly (Fin (n + 1)) m := + map_mem_trigPoly _ (fun k hk => by + rw [compLinear_tailMap_trigMonomial] + exact trigMonomial_mem_trigPoly ((deg_cons_zero_le k).trans_lt hk)) hb + +/-- The monomial `e^{2πi j x_0}` at `(u, x')` is `e^{2πi j u}`. -/ +theorem trigMonomial_single_cons (j : ℤ) (u : UnitAddCircle) (x' : UnitAddTorus (Fin n)) : + trigMonomial (Pi.single 0 j : Fin (n + 1) → ℤ) (Fin.cons u x') = fourier j u := by + simp only [trigMonomial_apply, mFourier, ContinuousMap.coe_mk, Fin.prod_univ_succ, + Fin.cons_zero, Fin.cons_succ, Pi.single_eq_same] + rw [Finset.prod_eq_one fun i _ => by simp [Fin.succ_ne_zero], mul_one] + +/-- `deg (j, 0, …, 0) = |j|`, at most. -/ +theorem deg_single_le (j : ℤ) : deg (Pi.single 0 j : Fin (n + 1) → ℤ) ≤ j.natAbs := + deg_le_iff.2 fun i => by + by_cases h : i = 0 + · subst h; simp + · simp [h] + +/-- The conjugate of a monomial is the monomial of the opposite frequency. -/ +theorem star_trigMonomial {d : Type*} [Fintype d] (k : d → ℤ) : + star (trigMonomial k) = trigMonomial (-k) := by + ext x + simp only [BoundedContinuousFunction.star_apply, trigMonomial_apply, mFourier, + ContinuousMap.coe_mk, Pi.neg_apply, fourier_neg] + rw [show star (∏ i, (fourier (k i)) (x i)) = (starRingEnd ℂ) (∏ i, (fourier (k i)) (x i)) from + rfl, map_prod] + +/-- The conjugate of a trigonometric polynomial of degree `< m` has degree `< m`. -/ +theorem star_mem_trigPoly {d : Type*} [Fintype d] {m : ℕ} {T : UnitAddTorus d →ᵇ ℂ} + (hT : T ∈ trigPoly d m) : star T ∈ trigPoly d m := by + obtain ⟨t, ht, c, rfl⟩ := exists_sum_of_mem_trigPoly hT + rw [star_sum] + refine Submodule.sum_mem _ fun k hk => ?_ + rw [star_smul, star_trigMonomial] + refine Submodule.smul_mem _ _ (trigMonomial_mem_trigPoly ?_) + have : deg (-k) = deg k := by simp [deg] + rw [this]; exact mem_boxLt.1 (ht hk) + +/-- The **Dirichlet sum** `D_m(x) = ∑_{j trigMonomial_mem_trigPoly + ((deg_single_le _).trans_lt (by simpa using Finset.mem_range.1 hj)) + +/-- `|D_m| ≤ m`. -/ +theorem norm_dirichletSum_le (m : ℕ) (x : UnitAddTorus (Fin (n + 1))) : + ‖dirichletSum n m x‖ ≤ m := by + simp only [dirichletSum, FunLike.coe_sum, Finset.sum_apply] + refine (norm_sum_le _ _).trans ?_ + simp only [norm_trigMonomial_apply, Finset.sum_const, Finset.card_range, nsmul_eq_mul, mul_one, + le_refl] + +/-- `‖D_m‖_2² = m`, by Parseval. -/ +theorem lintegral_enorm_dirichletSum_sq (m : ℕ) : + ∫⁻ x, ‖dirichletSum n m x‖ₑ ^ (2 : ℝ) = m := by + have hinj : Set.InjOn (fun j : ℕ => (Pi.single 0 (j : ℤ) : Fin (n + 1) → ℤ)) + (Finset.range m : Set ℕ) := fun i _ j _ h => by + have := congr_fun h 0 + simpa using this + have hD : dirichletSum n m = ∑ k ∈ (Finset.range m).image + (fun j : ℕ => (Pi.single 0 (j : ℤ) : Fin (n + 1) → ℤ)), (1 : ℂ) • trigMonomial k := by + rw [Finset.sum_image hinj]; simp [dirichletSum] + have h2 := norm_toLp_sum_sq ((Finset.range m).image + (fun j : ℕ => (Pi.single 0 (j : ℤ) : Fin (n + 1) → ℤ))) (fun _ => (1 : ℂ)) + rw [← hD] at h2 + simp only [norm_one, one_pow, Finset.sum_const, nsmul_eq_mul, mul_one] at h2 + rw [Finset.card_image_of_injOn hinj, Finset.card_range] at h2 + have hfin : eLpNorm (dirichletSum n m) 2 volume ≠ ∞ := + (((dirichletSum n m).memLp_top (μ := volume)).mono_exponent le_top).eLpNorm_ne_top + rw [BoundedContinuousFunction.norm_toLp_eq_toReal_eLpNorm] at h2 + have he : eLpNorm (dirichletSum n m) 2 volume ^ (2 : ℝ) = + ∫⁻ x, ‖dirichletSum n m x‖ₑ ^ (2 : ℝ) := by + rw [eLpNorm_eq_lintegral_rpow_eNorm_toReal (by norm_num) (by norm_num) + (dirichletSum n m).continuous.aestronglyMeasurable] + simp only [ENNReal.toReal_ofNat, one_div] + rw [ENNReal.rpow_inv_rpow (by norm_num)] + rw [← he, ← ENNReal.ofReal_toReal (ENNReal.rpow_ne_top_of_nonneg (by norm_num) hfin), + ← ENNReal.toReal_rpow, Real.rpow_two, h2, ENNReal.ofReal_natCast] + +/-- The **normalised Fejér kernel** in `x_0`: `φ_m = m^(-2) |D_m|²`, with `φ_m(0, x') = 1`, +`0 ≤ φ_m ≤ 1` and `∫ φ_m = 1/m`. -/ +noncomputable def fejerFace (n m : ℕ) : UnitAddTorus (Fin (n + 1)) →ᵇ ℂ := + ((m : ℂ) ^ 2)⁻¹ • (dirichletSum n m * star (dirichletSum n m)) + +theorem fejerFace_apply (m : ℕ) (x : UnitAddTorus (Fin (n + 1))) : + fejerFace n m x = (((m : ℝ) ^ 2)⁻¹ * ‖dirichletSum n m x‖ ^ 2 : ℝ) := by + simp only [fejerFace, FunLike.coe_smul, Pi.smul_apply, + FunLike.coe_mul, BoundedContinuousFunction.star_apply, Pi.mul_apply, + smul_eq_mul] + rw [show star (dirichletSum n m x) = (starRingEnd ℂ) (dirichletSum n m x) from rfl, + Complex.mul_conj, Complex.normSq_eq_norm_sq] + push_cast; ring + +/-- `φ_m` has degree `< 2m`. -/ +theorem fejerFace_mem_trigPoly (m : ℕ) : fejerFace n m ∈ trigPoly (Fin (n + 1)) (m + m) := + Submodule.smul_mem _ _ (mul_mem_trigPoly (dirichletSum_mem_trigPoly m) + (star_mem_trigPoly (dirichletSum_mem_trigPoly m))) + +/-- `|φ_m| ≤ 1`. -/ +theorem enorm_fejerFace_le (m : ℕ) (x : UnitAddTorus (Fin (n + 1))) : ‖fejerFace n m x‖ₑ ≤ 1 := by + rcases Nat.eq_zero_or_pos m with rfl | hm + · simp [fejerFace] + rw [fejerFace_apply, ← ofReal_norm, Complex.norm_real, Real.norm_eq_abs, ENNReal.ofReal_le_one, + abs_of_nonneg (by positivity)] + have hm' : (0 : ℝ) < m := by exact_mod_cast hm + rw [inv_mul_le_iff₀ (by positivity), mul_one] + exact pow_le_pow_left₀ (norm_nonneg _) (norm_dirichletSum_le m x) 2 + +/-- `φ_m(0, x') = 1` for `m ≥ 1`. -/ +theorem fejerFace_cons_zero {m : ℕ} (hm : 1 ≤ m) (x' : UnitAddTorus (Fin n)) : + fejerFace n m (Fin.cons 0 x') = 1 := by + have hm' : (m : ℝ) ≠ 0 := Nat.cast_ne_zero.2 (Nat.one_le_iff_ne_zero.1 hm) + rw [fejerFace_apply, dirichletSum_cons] + simp only [fourier_eval_zero, Finset.sum_const, Finset.card_range, nsmul_eq_mul, mul_one, + Complex.norm_natCast] + push_cast + field_simp + exact div_self (by exact_mod_cast hm') + +/-- `∫ φ_m = 1/m`. -/ +theorem lintegral_enorm_fejerFace {m : ℕ} (hm : 1 ≤ m) : + ∫⁻ x, ‖fejerFace n m x‖ₑ = (m : ℝ≥0∞)⁻¹ := by + have hm0 : (m : ℝ≥0∞) ≠ 0 := by exact_mod_cast (Nat.one_le_iff_ne_zero.1 hm) + have hpt : ∀ x, ‖fejerFace n m x‖ₑ = ((m : ℝ≥0∞) ^ 2)⁻¹ * ‖dirichletSum n m x‖ₑ ^ (2 : ℝ) := + fun x => by + have hmr : (0 : ℝ) < (m : ℝ) ^ 2 := by + have : (0 : ℝ) < m := by exact_mod_cast hm + positivity + rw [fejerFace_apply, ← ofReal_norm, Complex.norm_real, Real.norm_eq_abs, + abs_of_nonneg (by positivity), ENNReal.ofReal_mul (by positivity), + ENNReal.ofReal_inv_of_pos hmr, ENNReal.ofReal_pow (Nat.cast_nonneg _), + ENNReal.ofReal_natCast, ENNReal.ofReal_pow (norm_nonneg _), ofReal_norm, ENNReal.rpow_two] + simp_rw [hpt] + rw [lintegral_const_mul' _ _ (ENNReal.inv_ne_top.2 (pow_ne_zero 2 hm0)), + lintegral_enorm_dirichletSum_sq, pow_two, + ENNReal.mul_inv (Or.inl hm0) (Or.inl (ENNReal.natCast_ne_top m)), + mul_assoc, ENNReal.inv_mul_cancel hm0 (ENNReal.natCast_ne_top m), mul_one] + +/-- The **extension** of a function `b` on the face: `(φ_m b)(x) = φ_m(x_0) b(x')`. -/ +noncomputable def extendFace (n m : ℕ) (b : UnitAddTorus (Fin n) →ᵇ ℂ) : + UnitAddTorus (Fin (n + 1)) →ᵇ ℂ := + fejerFace n m * compLinear (tailMap n) b + +/-- The extension of a polynomial of degree `< m` has degree `< 3m`. -/ +theorem extendFace_mem_trigPoly {m : ℕ} {b : UnitAddTorus (Fin n) →ᵇ ℂ} + (hb : b ∈ trigPoly (Fin n) m) : extendFace n m b ∈ trigPoly (Fin (n + 1)) (m + m + m) := + mul_mem_trigPoly (fejerFace_mem_trigPoly m) (compLinear_tailMap_mem_trigPoly hb) + +/-- The extension restricts to `b` on the face. -/ +theorem restrictFace_extendFace {m : ℕ} (hm : 1 ≤ m) (b : UnitAddTorus (Fin n) →ᵇ ℂ) : + restrictFace n (extendFace n m b) = b := by + ext x' + simp [extendFace, fejerFace_cons_zero hm, Fin.tail_cons] + +/-- **The extension is small**: `‖φ_m b‖_p ≤ m^(-1/p) ‖b‖_p` for `1 ≤ p < ∞`. -/ +theorem eLpNorm_extendFace_le {m : ℕ} (hm : 1 ≤ m) (b : UnitAddTorus (Fin n) →ᵇ ℂ) + {p : ℝ≥0∞} (hp : 1 ≤ p) (hp' : p ≠ ∞) : + eLpNorm (extendFace n m b) p volume ≤ (m : ℝ≥0∞) ^ (-p.toReal⁻¹) * eLpNorm b p volume := by + set P := p.toReal + have hP1 : 1 ≤ P := ENNReal.one_le_toReal_of_one_le hp hp' + have hP0 : 0 < P := zero_lt_one.trans_le hP1 + have hp0 : p ≠ 0 := (zero_lt_one.trans_le hp).ne' + set ψ : UnitAddCircle → ℝ≥0∞ := fun u => ‖fejerFace n m (Fin.cons u (0 : UnitAddTorus (Fin n)))‖ₑ + have hφ : ∀ u x', fejerFace n m (Fin.cons u x') = fejerFace n m (Fin.cons u 0) := fun u x' => by + rw [fejerFace_apply, fejerFace_apply, dirichletSum_cons, dirichletSum_cons] + -- `∫ φ_m^p ≤ ∫ φ_m = 1/m`, integrated over the first coordinate + have hψ : ∫⁻ v : UnitAddTorus (Fin 1), ψ (v 0) ^ P ≤ (m : ℝ≥0∞)⁻¹ := by + have hmeasφ : Measurable fun x => ‖fejerFace n m x‖ₑ := + (fejerFace n m).continuous.measurable.eNorm + have h1 := lintegral_eq_lintegral_cons hmeasφ + simp_rw [hφ] at h1 + rw [lintegral_const, measure_univ, mul_one, lintegral_enorm_fejerFace hm] at h1 + calc ∫⁻ v : UnitAddTorus (Fin 1), ψ (v 0) ^ P ≤ ∫⁻ v : UnitAddTorus (Fin 1), ψ (v 0) := + lintegral_mono fun v => ENNReal.rpow_le_self_of_le_one (enorm_fejerFace_le m _) hP1 + _ = (m : ℝ≥0∞)⁻¹ := h1.symm + have hmeas : Measurable fun x => ‖extendFace n m b x‖ₑ ^ P := + (extendFace n m b).continuous.measurable.eNorm.pow_const P + have hint : ∫⁻ x, ‖extendFace n m b x‖ₑ ^ P ≤ (m : ℝ≥0∞)⁻¹ * ∫⁻ x', ‖b x'‖ₑ ^ P := by + rw [lintegral_eq_lintegral_cons hmeas] + calc ∫⁻ x', ∫⁻ v : UnitAddTorus (Fin 1), ‖extendFace n m b (Fin.cons (v 0) x')‖ₑ ^ P + = ∫⁻ x', (∫⁻ v : UnitAddTorus (Fin 1), ψ (v 0) ^ P) * ‖b x'‖ₑ ^ P := by + congr 1; funext x' + rw [← lintegral_mul_const' _ _ (ENNReal.rpow_ne_top_of_nonneg hP0.le eNorm_ne_top)] + congr 1; funext v + simp only [extendFace, FunLike.coe_mul, Pi.mul_apply, + compLinear_apply, tailMap_apply, Fin.tail_cons, eNorm_mul, ψ, hφ (v 0) x'] + rw [ENNReal.mul_rpow_of_nonneg _ _ hP0.le] + _ = (∫⁻ v : UnitAddTorus (Fin 1), ψ (v 0) ^ P) * ∫⁻ x', ‖b x'‖ₑ ^ P := + lintegral_const_mul' _ _ (ne_top_of_le_ne_top (ENNReal.inv_ne_top.2 + (by exact_mod_cast (Nat.one_le_iff_ne_zero.1 hm))) hψ) + _ ≤ (m : ℝ≥0∞)⁻¹ * ∫⁻ x', ‖b x'‖ₑ ^ P := by gcongr + rw [eLpNorm_eq_lintegral_rpow_eNorm_toReal hp0 hp' + (extendFace n m b).continuous.aestronglyMeasurable, + eLpNorm_eq_lintegral_rpow_eNorm_toReal hp0 hp' b.continuous.aestronglyMeasurable] + calc (∫⁻ x, ‖extendFace n m b x‖ₑ ^ P) ^ (1 / P) + ≤ ((m : ℝ≥0∞)⁻¹ * ∫⁻ x', ‖b x'‖ₑ ^ P) ^ (1 / P) := + ENNReal.rpow_le_rpow hint (by positivity) + _ = (m : ℝ≥0∞) ^ (-P⁻¹) * (∫⁻ x', ‖b x'‖ₑ ^ P) ^ (1 / P) := by + rw [ENNReal.mul_rpow_of_nonneg _ _ (by positivity), ENNReal.inv_rpow, ← ENNReal.rpow_neg, + one_div] + +/-! ### The trace as a trace bound -/ + +variable (p : ℝ≥0∞) [Fact (1 ≤ p)] + +/-- The `L_p` classes of bounded continuous functions, as a real-linear map. -/ +noncomputable abbrev toLpR (d : Type*) [Fintype d] : + (UnitAddTorus d →ᵇ ℂ) →ₗ[ℝ] Lp ℂ p (volume : Measure (UnitAddTorus d)) := + (BoundedContinuousFunction.toLp (E := ℂ) p volume ℝ).toLinearMap + +theorem toLpR_injective (d : Type*) [Fintype d] : Function.Injective (toLpR p d) := + BoundedContinuousFunction.toLp_injective (E := ℂ) (p := p) (𝕜 := ℝ) volume + +theorem enorm_toLpR {d : Type*} [Fintype d] (a : UnitAddTorus d →ᵇ ℂ) : + ‖toLpR p d a‖ₑ = eLpNorm a p volume := by + rw [Lp.eNorm_def] + exact eLpNorm_congr_ae (BoundedContinuousFunction.coeFn_toLp p volume ℝ a) + +/-- Every approximant of the trigonometric scheme in `L_p` is the class of a bounded continuous +function. -/ +theorem iUnionSubmodule_le_range (d : Type*) [Fintype d] : + ((trigScheme d).toLp volume p).iUnionSubmodule ≤ LinearMap.range (toLpR p d) := by + intro g hg + rw [← SetLike.mem_coe, ApproximationScheme.coe_iUnionSubmodule, Set.mem_iUnion] at hg + obtain ⟨k, a, -, rfl⟩ := hg + exact ⟨a, rfl⟩ + +/-- The restriction to the face on the `L_p` classes of trigonometric polynomials. -/ +noncomputable def traceOnApprox (n : ℕ) : + ((trigScheme (Fin (n + 1))).toLp volume p).iUnionSubmodule →ₗ[ℝ] + Lp ℂ p (volume : Measure (UnitAddTorus (Fin n))) := + toLpR p (Fin n) ∘ₗ (restrictFace n).restrictScalars ℝ ∘ₗ + (LinearEquiv.ofInjective (toLpR p (Fin (n + 1))) (toLpR_injective p _)).symm.toLinearMap ∘ₗ + Submodule.inclusion (iUnionSubmodule_le_range p (Fin (n + 1))) + +theorem traceOnApprox_apply (a : UnitAddTorus (Fin (n + 1)) →ᵇ ℂ) + (h : toLpR p (Fin (n + 1)) a ∈ ((trigScheme (Fin (n + 1))).toLp volume p).iUnionSubmodule) : + traceOnApprox p n ⟨toLpR p (Fin (n + 1)) a, h⟩ = toLpR p (Fin n) (restrictFace n a) := by + have he : Submodule.inclusion (iUnionSubmodule_le_range p (Fin (n + 1))) + ⟨toLpR p (Fin (n + 1)) a, h⟩ = + LinearEquiv.ofInjective (toLpR p (Fin (n + 1))) (toLpR_injective p _) a := + Subtype.ext (by rw [LinearEquiv.ofInjective_apply]; rfl) + simp only [traceOnApprox, LinearMap.coe_comp, Function.comp_apply, LinearEquiv.coe_coe, he, + LinearEquiv.symm_apply_apply, LinearMap.restrictScalars_apply] + +/-- The constant `(2⌈p/2⌉)^(1/p)` of the trace inequality. -/ +noncomputable def traceConstTorus : ℝ≥0∞ := ((2 * ⌈p.toReal / 2⌉₊ : ℕ) : ℝ≥0∞) ^ p.toReal⁻¹ + +/-- **The restriction to the face is a trace bound** of exponent `1/p` from the trigonometric +scheme of `𝕋^(n+1)` to that of `𝕋^n` in `L_p`, `1 ≤ p < ∞`. -/ +noncomputable def traceBound (n : ℕ) (hp : p ≠ ∞) : + ApproximationScheme.TraceBound ((trigScheme (Fin (n + 1))).toLp volume p) + ((trigScheme (Fin n)).toLp volume p) p.toReal⁻¹ := + ApproximationScheme.TraceBound.ofSubmodule (traceOnApprox p n) + (fun m g hg => by + obtain ⟨a, ha, hag⟩ := hg + have hg' : g = ⟨toLpR p (Fin (n + 1)) a, hag ▸ g.2⟩ := Subtype.ext hag.symm + rw [hg', traceOnApprox_apply] + exact FunctionScheme.toLp_mem_toLp (restrictFace_mem_trigPoly ha)) + (traceConstTorus p) (ENNReal.rpow_ne_top_of_nonneg (by positivity) (ENNReal.natCast_ne_top _)) + (fun m hm g hg => by + obtain ⟨a, ha, hag⟩ := hg + have hg' : g = ⟨toLpR p (Fin (n + 1)) a, hag ▸ g.2⟩ := Subtype.ext hag.symm + rw [hg', traceOnApprox_apply, enorm_toLpR, enorm_toLpR] + refine (eLpNorm_restrictFace_le ha (Fact.out) hp).trans_eq ?_ + rw [traceConstTorus, one_div, Nat.cast_mul, Nat.cast_mul, ← mul_assoc, Nat.cast_mul, + ENNReal.mul_rpow_of_nonneg _ _ (by positivity)]) + +/-- On trigonometric polynomials the trace is the restriction to the face. -/ +theorem traceBound_T_toLp (hp : p ≠ ∞) {m : ℕ} {a : UnitAddTorus (Fin (n + 1)) →ᵇ ℂ} + (ha : a ∈ trigPoly (Fin (n + 1)) m) : + (traceBound p n hp).T (toLpR p (Fin (n + 1)) a) = toLpR p (Fin n) (restrictFace n a) := by + have hmem : toLpR p (Fin (n + 1)) a ∈ + ((trigScheme (Fin (n + 1))).toLp volume p).iUnionSubmodule := + ApproximationScheme.mem_iUnionSubmodule (FunctionScheme.toLp_mem_toLp (n := m) ha) + unfold traceBound + exact (ApproximationScheme.TraceBound.ofSubmodule_T _ _ _ _ _ ⟨_, hmem⟩).trans + (traceOnApprox_apply p a hmem) + +/-- **The trace of a trigonometric polynomial** is its restriction to the face. -/ +theorem traceBound_ext_toLp (hp : p ≠ ∞) {m : ℕ} {a : UnitAddTorus (Fin (n + 1)) →ᵇ ℂ} + (ha : a ∈ trigPoly (Fin (n + 1)) m) : + (traceBound p n hp).ext (toLpR p (Fin (n + 1)) a) = toLpR p (Fin n) (restrictFace n a) := by + exact ((traceBound p n hp).ext_eq_of_mem (by positivity) + (FunctionScheme.toLp_mem_toLp (n := m) ha)).trans (traceBound_T_toLp p hp ha) + +/-- **The extension is a right inverse on approximants**: every polynomial of degree `< 2^k` on +`𝕋^n` is the trace of a polynomial of degree `< 2^(k+2)` on `𝕋^(n+1)` of norm +`≤ 2^(-k/p) ‖b‖_p`. -/ +theorem traceBound_rightInverse (hp : p ≠ ∞) : + (traceBound p n hp).RightInverseBound 2 1 := by + intro k b' hb' + obtain ⟨b, hb, rfl⟩ := hb' + have hm : 1 ≤ 2 ^ k := Nat.one_le_two_pow + have hmem : extendFace n (2 ^ k) b ∈ trigPoly (Fin (n + 1)) (2 ^ (k + 2)) := + trigPoly_mono (by rw [pow_add]; omega) (extendFace_mem_trigPoly hb) + refine ⟨toLpR p (Fin (n + 1)) (extendFace n (2 ^ k) b), FunctionScheme.toLp_mem_toLp hmem, ?_, ?_⟩ + · rw [traceBound_T_toLp p hp hmem, restrictFace_extendFace hm] + · rw [enorm_toLpR, one_mul, ← ENNReal.natCast_two_pow_rpow] + exact (eLpNorm_extendFace_le hm b Fact.out hp).trans_eq (by rw [enorm_toLpR]) + +/-- **The trace theorem on the torus**: for `1 ≤ p < ∞`, `1 ≤ q ≤ ∞` and `s > 0`, the +restriction to the face `{x_0 = 0}` extends from trigonometric polynomials to a map from +`B^{s+1/p}_{p,q}(𝕋^(n+1))` into `B^s_{p,q}(𝕋^n)`, and every `g ∈ B^s_{p,q}(𝕋^n)` is the trace +of some `f ∈ B^{s+1/p}_{p,q}(𝕋^(n+1))`. -/ +theorem trace_besov (hp : p ≠ ∞) {s : ℝ} (hs : 0 < s) {q : ℝ≥0∞} (hq : 1 ≤ q) : + (∀ f, (trigScheme (Fin (n + 1))).MemBesov volume p (s + p.toReal⁻¹) q f → + (trigScheme (Fin n)).MemBesov volume p s q ((traceBound p n hp).ext f)) ∧ + (∀ g, (trigScheme (Fin n)).MemBesov volume p s q g → + ∃ f, (trigScheme (Fin (n + 1))).MemBesov volume p (s + p.toReal⁻¹) q f ∧ + (traceBound p n hp).ext f = g) := by + have hβ : 0 ≤ p.toReal⁻¹ := by positivity + refine ⟨fun f hf => ?_, fun g hg => ?_⟩ + · have := (traceBound p n hp).memApprox_ext hβ (by linarith) hq hf + rwa [add_sub_cancel_right] at this + · obtain ⟨f, hf, hfg, -⟩ := (traceBound p n hp).exists_ext_eq hβ ENNReal.one_ne_top + (traceBound_rightInverse p hp) hs hq hg + exact ⟨f, hf, hfg⟩ + +end Torus diff --git a/LeanPool/FunctionSpaces/Torus/TraceContinuous.lean b/LeanPool/FunctionSpaces/Torus/TraceContinuous.lean new file mode 100644 index 0000000000..986a485315 --- /dev/null +++ b/LeanPool/FunctionSpaces/Torus/TraceContinuous.lean @@ -0,0 +1,266 @@ +/- +Copyright (c) 2026 Mario Ullrich. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Mario Ullrich +-/ +module + +public import LeanPool.FunctionSpaces.Torus.Trace +public import LeanPool.FunctionSpaces.Torus.LpJackson + +/- +Modified for Lean Pool: module names and imports adapted. +-/ + +/-! +# The trace of a continuous function on the torus + +The trace `Tr = (Torus.traceBound p n hp).ext` of `Torus.trace_besov`, `1 ≤ p < ∞`, is a limit of +traces of near-best approximants. For every bounded continuous `f` on `𝕋^(n+1)` whose class lies +in `B^{1/p}_{p,1}(𝕋^(n+1))`, it is the restriction `f(0, ·)` to the face +(`Torus.traceBound_ext_eq_restrictFace`), in particular for `f ∈ B^{s+1/p}_{p,q}`, `s > 0` +(`Torus.trace_besov_eq_restrictFace`). For `s > n/p` every element of `B^{s+1/p}_{p,q}(𝕋^(n+1))` +has a continuous representative, and its trace is the restriction of that representative +(`Torus.exists_trace_eq_restrictFace`). + +The proof uses the uniform density of the trigonometric polynomials +(`Torus.dense_iUnion_trigPoly`) and the convolution of bounded continuous functions with +integrable kernels on `ℝ^d` (`Torus.econvBCF`). + +* **De la Vallée Poussin operators** (`Torus.valleePoussin`, `Torus.valleePoussinBCF`): + `V_k f = Θ_{k+#d} ⋆ f` reproduces the trigonometric polynomials of degree `< 2^k`, has degree + `< 2^(k+#d+2)` and norm `≤ ‖Θ‖_1`; hence it is near-best in `L_p` and in the sup norm: + `‖f - V_k f‖ ≤ (1 + ‖Θ‖_1) ‖f - a‖` for every `a` of degree `< 2^k`. + +The main theorem combines both norms: `V_k f → f` uniformly, so `(V_k f)(0, ·) → f(0, ·)` in +`L_p(𝕋^n)`; and `V_k f → f` in `L_p` at the rate of the abstract trace theorem +(`ApproximationScheme.TraceBound.tendsto_ext`), so `(V_k f)(0, ·) → Tr f`. +-/ + +@[expose] public section + +open MeasureTheory UnitAddTorus Filter Topology +open scoped ENNReal BoundedContinuousFunction FourierTransform TorusHaar + +open ENNReal (dyadicWeight) + +namespace Torus + +variable {d : Type*} [Fintype d] + +variable {p : ℝ≥0∞} [Fact (1 ≤ p)] + +/-! ### De la Vallée Poussin operators -/ + +/-- `𝓕Θ_j` vanishes at the lattice points of degree `≥ 2^(j+2)`. -/ +theorem fourier_Theta_latticeVec_eq_zero {j : ℕ} {m : d → ℤ} (hm : 2 ^ (j + 2) ≤ deg m) : + 𝓕 (Rd.Theta (V := EuclideanSpace ℝ d) j) (latticeVec m) = 0 := by + by_contra h + have h1 := Rd.norm_lt_of_fourier_Theta_ne_zero h + have h2 := deg_le_norm_latticeVec m + have h3 : ((2 : ℝ) ^ (j + 2)) ≤ deg m := by exact_mod_cast hm + linarith + +/-- The **de la Vallée Poussin operator** `V_k F = Θ_{k+#d} ⋆ F` on `L_p(𝕋^d)`, `1 ≤ p < ∞`, with +the band-limiting kernel `Θ_J` of `ℝ^d` (`Rd.Theta`). It is a smooth de la Vallée Poussin +operator: its multiplier is `1` on frequencies of degree `< 2^k` and `0` from degree +`2^(k+#d+2)` on. -/ +noncomputable def valleePoussin (hp : p ≠ ∞) (k : ℕ) : + Lp ℂ p (volume : Measure (UnitAddTorus d)) →L[ℂ] Lp ℂ p (volume : Measure (UnitAddTorus d)) := + econvLp hp (Rd.integrable_Theta (V := EuclideanSpace ℝ d) (k + Fintype.card d)) + +/-- The **de la Vallée Poussin operator** `V_k f = Θ_{k+#d} ⋆ f` on the bounded continuous +functions on `𝕋^d`, the smooth de la Vallée Poussin operator of `Torus.valleePoussin`. -/ +noncomputable def valleePoussinBCF (k : ℕ) : + (UnitAddTorus d →ᵇ ℂ) →L[ℂ] (UnitAddTorus d →ᵇ ℂ) := + econvBCF (Rd.integrable_Theta (V := EuclideanSpace ℝ d) (k + Fintype.card d)) + +/-- `V_k F` is a trigonometric polynomial of degree `< 2^(k+#d+2)`. -/ +theorem valleePoussin_mem_trigPolyLp (hp : p ≠ ∞) (k : ℕ) + (F : Lp ℂ p (volume : Measure (UnitAddTorus d))) : + valleePoussin hp k F ∈ trigPolyLp p (2 ^ (k + Fintype.card d + 2)) := + econvLp_mem_trigPolyLp hp _ (fun _ hm => fourier_Theta_latticeVec_eq_zero hm) F + +/-- `V_k f` is a trigonometric polynomial of degree `< 2^(k+#d+2)`. -/ +theorem valleePoussinBCF_mem_trigPoly (k : ℕ) (f : UnitAddTorus d →ᵇ ℂ) : + valleePoussinBCF k f ∈ trigPoly d (2 ^ (k + Fintype.card d + 2)) := + econvBCF_mem_trigPoly _ (fun _ hm => fourier_Theta_latticeVec_eq_zero hm) f + +/-- `V_k a = a` for every trigonometric polynomial `a` of degree `< 2^k` in `L_p`. -/ +theorem valleePoussin_eq_self (hp : p ≠ ∞) {k : ℕ} + {a : Lp ℂ p (volume : Measure (UnitAddTorus d))} (ha : a ∈ trigPolyLp p (2 ^ k)) : + valleePoussin hp k a = a := + econvLp_Theta_eq_self hp ha + +/-- `V_k a = a` for every trigonometric polynomial `a` of degree `< 2^k`. -/ +theorem valleePoussinBCF_eq_self {k : ℕ} {a : UnitAddTorus d →ᵇ ℂ} + (ha : a ∈ trigPoly d (2 ^ k)) : valleePoussinBCF k a = a := by + refine BoundedContinuousFunction.toLp_injective (E := ℂ) (p := (2 : ℝ≥0∞)) (𝕜 := ℂ) volume ?_ + rw [valleePoussinBCF, toLp_econvBCF (p := (2 : ℝ≥0∞)) ENNReal.ofNat_ne_top] + exact econvLp_Theta_eq_self _ (Submodule.mem_map_of_mem ha) + +/-- The `L_p` class of `V_k f` is `V_k` of the class of `f`. -/ +theorem toLp_valleePoussinBCF {𝕜 : Type*} [NontriviallyNormedField 𝕜] [NormedSpace 𝕜 ℂ] + (hp : p ≠ ∞) (k : ℕ) (f : UnitAddTorus d →ᵇ ℂ) : + BoundedContinuousFunction.toLp (E := ℂ) p volume 𝕜 (valleePoussinBCF k f) = + valleePoussin hp k (BoundedContinuousFunction.toLp (E := ℂ) p volume 𝕜 f) := + toLp_econvBCF hp _ f + +variable (d) in +/-- The **near-best constant** `1 + ‖Θ‖_1` of the smooth de la Vallée Poussin operators. -/ +noncomputable def valleePoussinConst : ℝ≥0∞ := + 1 + eLpNorm (Rd.bandKernel (V := EuclideanSpace ℝ d)) 1 volume + +/-- The near-best constant is finite. -/ +theorem valleePoussinConst_ne_top : valleePoussinConst d ≠ ∞ := + ENNReal.add_ne_top.2 ⟨ENNReal.one_ne_top, Rd.eLpNorm_bandKernel_ne_top⟩ + +/-- The near-best constant is `1 + ∫ |Θ_j|` for every `j`, as a real number. -/ +theorem toReal_valleePoussinConst (j : ℕ) : + (valleePoussinConst d).toReal = 1 + ∫ y, ‖Rd.Theta (V := EuclideanSpace ℝ d) j y‖ := by + rw [integral_norm_eq_lintegral_eNorm + (Rd.integrable_Theta (V := EuclideanSpace ℝ d) j).aestronglyMeasurable, + Rd.lintegral_enorm_Theta, valleePoussinConst, + ENNReal.toReal_add ENNReal.one_ne_top Rd.eLpNorm_bandKernel_ne_top, ENNReal.toReal_one] + +/-- **The de la Vallée Poussin operators are near-best in `L_p`**: for every trigonometric +polynomial `a` of degree `< 2^k`, `‖F - V_k F‖_p ≤ (1 + ‖Θ‖_1) ‖F - a‖_p`, by the Lebesgue +inequality `ApproximationScheme.enorm_sub_apply_le_of_apply_eq`. -/ +theorem enorm_sub_valleePoussin_le (hp : p ≠ ∞) {k : ℕ} + {a : Lp ℂ p (volume : Measure (UnitAddTorus d))} (ha : a ∈ trigPolyLp p (2 ^ k)) + (F : Lp ℂ p (volume : Measure (UnitAddTorus d))) : + ‖F - valleePoussin hp k F‖ₑ ≤ valleePoussinConst d * ‖F - a‖ₑ := by + rw [valleePoussinConst, ← Rd.lintegral_enorm_Theta (k + Fintype.card d)] + exact ApproximationScheme.enorm_sub_apply_le_of_apply_eq (fun x => enorm_econvLp_le hp _ x) + (valleePoussin_eq_self hp ha) F + +/-- **The de la Vallée Poussin operators are near-best in the sup norm**: for every trigonometric +polynomial `a` of degree `< 2^k`, `‖f - V_k f‖_∞ ≤ (1 + ‖Θ‖_1) ‖f - a‖_∞`, by the Lebesgue +inequality `ApproximationScheme.norm_sub_apply_le_of_apply_eq`. -/ +theorem norm_sub_valleePoussinBCF_le {k : ℕ} {a : UnitAddTorus d →ᵇ ℂ} + (ha : a ∈ trigPoly d (2 ^ k)) (f : UnitAddTorus d →ᵇ ℂ) : + ‖f - valleePoussinBCF k f‖ ≤ (valleePoussinConst d).toReal * ‖f - a‖ := by + rw [toReal_valleePoussinConst (k + Fintype.card d)] + exact ApproximationScheme.norm_sub_apply_le_of_apply_eq (fun x => norm_econvBCF_le _ x) + (valleePoussinBCF_eq_self ha) f + +/-- **The de la Vallée Poussin operators converge uniformly**: `V_k f → f` in the sup norm for +every bounded continuous `f`, since `‖f - V_k f‖_∞ ≤ (1 + ‖Θ‖_1) E_{2^k}(f)_∞ → 0`. -/ +theorem tendsto_valleePoussinBCF (f : UnitAddTorus d →ᵇ ℂ) : + Tendsto (fun k => valleePoussinBCF k f) atTop (𝓝 f) := by + have hE : Tendsto (fun k => valleePoussinConst d * (trigScheme d).approxError f (2 ^ k)) atTop + (𝓝 0) := by + simpa using ENNReal.Tendsto.const_mul ((tendsto_approxError_trigScheme f).comp + (tendsto_pow_atTop_atTop_of_one_lt (α := ℕ) one_lt_two)) (Or.inr valleePoussinConst_ne_top) + rw [tendsto_iff_edist_tendsto_0] + refine tendsto_of_tendsto_of_tendsto_of_le_of_le tendsto_const_nhds hE (fun _ => bot_le) + fun k => ?_ + rw [edist_comm, eDist_eq_eNorm_sub] + refine ApproximationScheme.le_mul_approxError_of_forall_mem valleePoussinConst_ne_top + fun a ha => ?_ + rw [← ofReal_norm, ← ofReal_norm, ← ENNReal.ofReal_toReal (valleePoussinConst_ne_top (d := d)), + ← ENNReal.ofReal_mul ENNReal.toReal_nonneg] + exact ENNReal.ofReal_le_ofReal (norm_sub_valleePoussinBCF_le ha f) + +/-- **The weighted rate of the de la Vallée Poussin operators**: for `F ∈ A^β_1` of the +trigonometric scheme in `L_p(𝕋^d)`, `β ≥ 0`, `2^(kβ) ‖F - V_k F‖_p → 0`. The canonical near-best +approximants `a_k` have this rate, and `‖F - V_k F‖_p ≤ (1 + ‖Θ‖_1) ‖F - a_k‖_p`. -/ +theorem tendsto_dyadicWeight_mul_enorm_sub_valleePoussin (hp : p ≠ ∞) {β : ℝ} (hβ : 0 ≤ β) + {F : Lp ℂ p (volume : Measure (UnitAddTorus d))} + (hF : ((trigScheme d).toLp volume p).MemApprox β 1 F) : + Tendsto (fun k => dyadicWeight β k * ‖F - valleePoussin hp k F‖ₑ) atTop (𝓝 0) := by + set D := ApproximationScheme.canonicalApprox ((trigScheme d).toLp volume p) β F + have hD := D.tendsto_dyadicWeight_mul_enorm_sub (ApproximationScheme.tsum_canonical_ne_top hβ hF) + have hC := ENNReal.Tendsto.const_mul hD (Or.inr (valleePoussinConst_ne_top (d := d))) + rw [mul_zero] at hC + refine tendsto_of_tendsto_of_tendsto_of_le_of_le tendsto_const_nhds hC (fun _ => bot_le) + fun k => ?_ + calc dyadicWeight β k * ‖F - valleePoussin hp k F‖ₑ + ≤ dyadicWeight β k * (valleePoussinConst d * ‖F - D.a k‖ₑ) := by + gcongr + exact enorm_sub_valleePoussin_le hp (mem_toLp_trigScheme_iff.1 (D.mem k)) F + _ = valleePoussinConst d * (dyadicWeight β k * ‖F - D.a k‖ₑ) := by ring + +/-! ### The trace of a continuous function -/ + +variable {n : ℕ} + +/-- The restriction to the face is continuous for the sup norm. -/ +theorem continuous_restrictFace (n : ℕ) : Continuous (restrictFace n) := + BoundedContinuousFunction.continuous_compContinuous (face n) + +/-- The `L_p` class of `V_k f` on `𝕋^(n+1)` is an approximant of complexity `2^(k+n+3)` of the +trigonometric scheme in `L_p`. -/ +theorem toLpR_valleePoussinBCF_mem (k : ℕ) (f : UnitAddTorus (Fin (n + 1)) →ᵇ ℂ) : + toLpR p (Fin (n + 1)) (valleePoussinBCF k f) ∈ + (trigScheme (Fin (n + 1))).toLp volume p (2 ^ (k + (n + 3))) := by + have h := valleePoussinBCF_mem_trigPoly k f + rw [Fintype.card_fin, show k + (n + 1) + 2 = k + (n + 3) by omega] at h + exact FunctionScheme.toLp_mem_toLp h + +/-- **The trace of a continuous function is its restriction**: for `1 ≤ p < ∞` and a bounded +continuous `f` on `𝕋^(n+1)` whose class lies in `B^{1/p}_{p,1}(𝕋^(n+1))`, the trace of `f` is +`f(0, ·)`. The traces `(V_k f)(0, ·)` of the de la Vallée Poussin approximants converge to the +trace (`ApproximationScheme.TraceBound.tendsto_ext`) and, uniformly, to `f(0, ·)`. -/ +theorem traceBound_ext_eq_restrictFace (hp : p ≠ ∞) (f : UnitAddTorus (Fin (n + 1)) →ᵇ ℂ) + (hf : (trigScheme (Fin (n + 1))).MemBesov volume p p.toReal⁻¹ 1 (toLpR p (Fin (n + 1)) f)) : + (traceBound p n hp).ext (toLpR p (Fin (n + 1)) f) = toLpR p (Fin n) (restrictFace n f) := by + have hβ : 0 ≤ p.toReal⁻¹ := by positivity + have hrate : Tendsto (fun k => dyadicWeight p.toReal⁻¹ k * + ‖toLpR p (Fin (n + 1)) f - toLpR p (Fin (n + 1)) (valleePoussinBCF k f)‖ₑ) atTop + (𝓝 0) := by + simpa only [toLpR, ContinuousLinearMap.coe_coe, toLp_valleePoussinBCF hp] using + tendsto_dyadicWeight_mul_enorm_sub_valleePoussin hp hβ hf + have h1 := (traceBound p n hp).tendsto_ext hβ hf (fun k => toLpR_valleePoussinBCF_mem k f) hrate + have hT : ∀ k, (traceBound p n hp).T (toLpR p (Fin (n + 1)) (valleePoussinBCF k f)) = + toLpR p (Fin n) (restrictFace n (valleePoussinBCF k f)) := fun k => + traceBound_T_toLp p hp (valleePoussinBCF_mem_trigPoly k f) + have h2 : Tendsto (fun k => toLpR p (Fin n) (restrictFace n (valleePoussinBCF k f))) atTop + (𝓝 (toLpR p (Fin n) (restrictFace n f))) := + (((BoundedContinuousFunction.toLp (E := ℂ) p volume ℝ).continuous.comp + (continuous_restrictFace n)).tendsto f).comp (tendsto_valleePoussinBCF f) + simp only [hT] at h1 + exact tendsto_nhds_unique h1 h2 + +/-- **The trace of a continuous Besov function is its restriction**: for `1 ≤ p < ∞`, `s > 0`, +`1 ≤ q ≤ ∞` and a bounded continuous `f` on `𝕋^(n+1)` whose class lies in +`B^{s+1/p}_{p,q}(𝕋^(n+1))`, the trace of `f` is `f(0, ·)`. -/ +theorem trace_besov_eq_restrictFace (hp : p ≠ ∞) {s : ℝ} (hs : 0 < s) {q : ℝ≥0∞} (hq : 1 ≤ q) + (f : UnitAddTorus (Fin (n + 1)) →ᵇ ℂ) + (hf : (trigScheme (Fin (n + 1))).MemBesov volume p (s + p.toReal⁻¹) q + (toLpR p (Fin (n + 1)) f)) : + (traceBound p n hp).ext (toLpR p (Fin (n + 1)) f) = toLpR p (Fin n) (restrictFace n f) := + traceBound_ext_eq_restrictFace hp f (ApproximationScheme.MemApprox.mono hq le_rfl + (by positivity) (Or.inl (by linarith)) hf) + +/-- **The trace of a continuous function, almost everywhere**: under the hypotheses of +`Torus.traceBound_ext_eq_restrictFace`, the trace of `f` is `x' ↦ f(0, x')` almost everywhere +on `𝕋^n`. -/ +theorem ae_trace_eq_restrictFace (hp : p ≠ ∞) (f : UnitAddTorus (Fin (n + 1)) →ᵇ ℂ) + (hf : (trigScheme (Fin (n + 1))).MemBesov volume p p.toReal⁻¹ 1 (toLpR p (Fin (n + 1)) f)) : + ⇑((traceBound p n hp).ext (toLpR p (Fin (n + 1)) f)) =ᵐ[volume] + fun x' => f (Fin.cons 0 x') := by + rw [traceBound_ext_eq_restrictFace hp f hf] + exact BoundedContinuousFunction.coeFn_toLp (E := ℂ) p volume ℝ (restrictFace n f) + +/-- **Every smooth enough Besov function has a continuous representative whose restriction is its +trace**: for `1 ≤ p < ∞`, `s > n/p` and `1 ≤ q ≤ ∞`, every `F ∈ B^{s+1/p}_{p,q}(𝕋^(n+1))` is the +class of a bounded continuous `f` (the Besov embedding, since `s + 1/p > (n+1)/p`), and the trace +of `F` is `f(0, ·)`. -/ +theorem exists_trace_eq_restrictFace (hp : p ≠ ∞) {s : ℝ} (hs : (n : ℝ) * p.toReal⁻¹ < s) + {q : ℝ≥0∞} (hq : 1 ≤ q) {F : Lp ℂ p (volume : Measure (UnitAddTorus (Fin (n + 1))))} + (hF : (trigScheme (Fin (n + 1))).MemBesov volume p (s + p.toReal⁻¹) q F) : + ∃ f : UnitAddTorus (Fin (n + 1)) →ᵇ ℂ, toLpR p (Fin (n + 1)) f = F ∧ + (traceBound p n hp).ext F = toLpR p (Fin n) (restrictFace n f) := by + have hD : (Fintype.card (Fin (n + 1)) : ℝ) * p.toReal⁻¹ < s + p.toReal⁻¹ := by + rw [Fintype.card_fin] + push_cast + linarith + obtain ⟨f, hf⟩ := FunctionScheme.MemBesov.exists_boundedContinuous trigScheme_hasNikolskii + (Nat.cast_nonneg _) hD hq hF + rw [BoundedContinuousFunction.inclusionOfExponentLe_toLp] at hf + have hs0 : 0 < s := lt_of_le_of_lt (by positivity) hs + subst hf + exact ⟨f, rfl, trace_besov_eq_restrictFace hp hs0 hq f hF⟩ + +end Torus diff --git a/LeanPool/FunctionSpaces/Torus/Translation.lean b/LeanPool/FunctionSpaces/Torus/Translation.lean new file mode 100644 index 0000000000..5a4cc72878 --- /dev/null +++ b/LeanPool/FunctionSpaces/Torus/Translation.lean @@ -0,0 +1,150 @@ +/- +Copyright (c) 2026 Mario Ullrich. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Mario Ullrich +-/ +module + +public import LeanPool.FunctionSpaces.Torus.Coefficients +public import Mathlib.Analysis.SpecialFunctions.Trigonometric.Bounds + +/- +Modified for Lean Pool: module names and imports adapted. +-/ + +/-! +# Translations on the torus and their Fourier coefficients + +The translate of `f ∈ L_2(𝕋^d)` by `h ∈ 𝕋^d` is `(τ_h f)(x) = f(x + h)` (`Torus.translate`), +defined through Mathlib's `MeasureTheory.Lp.compMeasurePreserving` and the translation +invariance of the Haar measure. Its Fourier coefficients are + +`(τ_h f)^(k) = e_k(h) f̂(k)` (`Torus.mFourierCoeff_translate`), + +so by Parseval + +`‖τ_h f - f‖_2² = ∑_k |e_k(h) - 1|² |f̂(k)|²` (`Torus.enorm_translate_sub_sq`). + +The multiplier is controlled by `|e_k(h) - 1| ≤ 2π · d · deg k · ‖h‖` +(`Torus.norm_mFourier_sub_one_le`), from `|e^(iθ) - 1| ≤ |θ|` in each coordinate. These are the +facts behind the moduli of smoothness of `FunctionSpaces.Torus.Modulus`. +-/ + +@[expose] public section + +open MeasureTheory UnitAddTorus +open scoped ENNReal TorusHaar lp Real + +namespace Torus + +variable {d : Type*} [Fintype d] + +/-- `|e^(2πinx) - 1| ≤ 2π |n| ‖x‖` on the circle. -/ +theorem norm_fourier_sub_one_le (n : ℤ) (x : UnitAddCircle) : + ‖fourier n x - 1‖ ≤ 2 * π * |(n : ℝ)| * ‖x‖ := by + induction x using QuotientAddGroup.induction_on with + | H y => + set θ : ℝ := 2 * π * n * (y - round y) + have hfy : fourier n (y : UnitAddCircle) = Complex.exp (Complex.I * θ) := by + rw [fourier_coe_apply] + have h1 : 2 * π * Complex.I * n * y / (1 : ℝ) = + Complex.I * θ + ((n * round y : ℤ) : ℂ) * (2 * π * Complex.I) := by + simp only [θ]; push_cast; ring + rw [h1, Complex.exp_add, Complex.exp_int_mul_two_pi_mul_I, mul_one] + rw [hfy] + calc ‖Complex.exp (Complex.I * θ) - 1‖ ≤ ‖θ‖ := Real.norm_exp_I_mul_ofReal_sub_one_le + _ = 2 * π * |(n : ℝ)| * ‖((y : ℝ) : UnitAddCircle)‖ := by + rw [UnitAddCircle.norm_eq, Real.norm_eq_abs] + simp only [θ, abs_mul, abs_of_pos Real.pi_pos, abs_two] + +/-- For complex numbers of modulus `1`, `|∏ aᵢ - 1| ≤ ∑ |aᵢ - 1|`. -/ +theorem norm_prod_sub_one_le {ι : Type*} (s : Finset ι) (a : ι → ℂ) (ha : ∀ i, ‖a i‖ = 1) : + ‖∏ i ∈ s, a i - 1‖ ≤ ∑ i ∈ s, ‖a i - 1‖ := by + classical + induction s using Finset.induction_on with + | empty => simp + | insert i s hi ih => + rw [Finset.prod_insert hi, Finset.sum_insert hi] + have hP : ‖∏ j ∈ s, a j‖ = 1 := by rw [norm_prod]; exact Finset.prod_eq_one fun j _ => ha j + calc ‖a i * ∏ j ∈ s, a j - 1‖ = ‖(a i - 1) * ∏ j ∈ s, a j + (∏ j ∈ s, a j - 1)‖ := by + congr 1; ring + _ ≤ ‖a i - 1‖ * ‖∏ j ∈ s, a j‖ + ‖∏ j ∈ s, a j - 1‖ := by + rw [← norm_mul]; exact norm_add_le _ _ + _ ≤ ‖a i - 1‖ + ∑ j ∈ s, ‖a j - 1‖ := by rw [hP, mul_one]; gcongr + +/-- **The Fourier multiplier of a translation**: `|e_k(h) - 1| ≤ 2π · d · deg k · ‖h‖`. -/ +theorem norm_mFourier_sub_one_le (k : d → ℤ) (h : UnitAddTorus d) : + ‖mFourier k h - 1‖ ≤ 2 * π * Fintype.card d * deg k * ‖h‖ := by + have h1 : ‖mFourier k h - 1‖ ≤ ∑ i, ‖fourier (k i) (h i) - 1‖ := + norm_prod_sub_one_le Finset.univ _ fun i => by simp [fourier_apply, Circle.norm_coe] + refine h1.trans ?_ + calc ∑ i, ‖fourier (k i) (h i) - 1‖ ≤ ∑ _i : d, 2 * π * (deg k : ℝ) * ‖h‖ := by + refine Finset.sum_le_sum fun i _ => (norm_fourier_sub_one_le (k i) (h i)).trans ?_ + gcongr + · rw [← Int.cast_abs, ← Int.natCast_natAbs]; exact_mod_cast natAbs_le_deg k i + · exact norm_le_pi_norm h i + _ = 2 * π * Fintype.card d * deg k * ‖h‖ := by + rw [Finset.sum_const, Finset.card_univ, nsmul_eq_mul]; ring + +/-- A trigonometric monomial is a character: `e_k(x + h) = e_k(x) e_k(h)`. -/ +theorem mFourier_add_apply (k : d → ℤ) (x h : UnitAddTorus d) : + mFourier k (x + h) = mFourier k x * mFourier k h := by + simp only [mFourier, ContinuousMap.coe_mk, Pi.add_apply, fourier_apply, smul_add, + AddCircle.toCircle_add, Circle.coe_mul, Finset.prod_mul_distrib] + +/-- `e_k(0) = 1`. -/ +@[simp] +theorem mFourier_apply_zero (k : d → ℤ) : mFourier k (0 : UnitAddTorus d) = 1 := by + simp [mFourier] + +/-- `e_{-k}(-h) = e_k(h)`. -/ +theorem mFourier_neg_neg (k : d → ℤ) (h : UnitAddTorus d) : mFourier (-k) (-h) = mFourier k h := by + simp only [mFourier, ContinuousMap.coe_mk, Pi.neg_apply, fourier_apply, neg_smul_neg] + +/-- The **translate** `(τ_h f)(x) = f(x + h)` on `L_2(𝕋^d)`. -/ +noncomputable def translate (h : UnitAddTorus d) : + Lp ℂ 2 (volume : Measure (UnitAddTorus d)) →+ Lp ℂ 2 (volume : Measure (UnitAddTorus d)) := + Lp.compMeasurePreserving (· + h) (measurePreserving_add_right volume h) + +/-- `τ_h f` is a.e. the function `x ↦ f(x + h)`. -/ +theorem coeFn_translate (h : UnitAddTorus d) (f : Lp ℂ 2 (volume : Measure (UnitAddTorus d))) : + translate h f =ᵐ[volume] fun x => f (x + h) := + Lp.coeFn_compMeasurePreserving f _ + +/-- **The Fourier coefficients of a translate**: `(τ_h f)^(k) = e_k(h) f̂(k)`. -/ +theorem mFourierCoeff_translate (h : UnitAddTorus d) + (f : Lp ℂ 2 (volume : Measure (UnitAddTorus d))) (k : d → ℤ) : + mFourierCoeff (translate h f) k = mFourier k h * mFourierCoeff f k := by + simp only [mFourierCoeff] + rw [integral_congr_ae ((coeFn_translate h f).mono fun x hx => by + simp only [smul_eq_mul]; rw [hx])] + have hsub : ∀ x : UnitAddTorus d, mFourier (-k) x = mFourier (-k) (x + h) * mFourier k h := by + intro x + rw [mFourier_add_apply, mul_assoc, ← mFourier_neg_neg k h, ← mFourier_add_apply, + add_neg_cancel, mFourier_apply_zero, mul_one] + have hfun : (fun x => mFourier (-k) x * f (x + h)) = + fun x => mFourier (-k) (x + h) * mFourier k h * f (x + h) := funext fun x => by rw [hsub x] + rw [hfun] + have := integral_add_right_eq_self (μ := (volume : Measure (UnitAddTorus d))) + (fun y => mFourier (-k) y * mFourier k h * f y) h + calc ∫ x, mFourier (-k) (x + h) * mFourier k h * f (x + h) + = ∫ y, mFourier (-k) y * mFourier k h * f y := this + _ = mFourier k h * ∫ y, mFourier (-k) y • f y := by + rw [← integral_const_mul]; congr 1; funext y; simp only [smul_eq_mul]; ring + +/-- The coefficients of `τ_h f` in the Fourier basis are `e_k(h) f̂(k)`. -/ +theorem repr_translate (h : UnitAddTorus d) (f : Lp ℂ 2 (volume : Measure (UnitAddTorus d))) + (k : d → ℤ) : + mFourierBasis.repr (translate h f) k = mFourier k h * mFourierBasis.repr f k := by + rw [mFourierBasis_repr, mFourierBasis_repr, mFourierCoeff_translate] + +/-- **Parseval for differences**: `‖τ_h f - f‖_2² = ∑_k |e_k(h) - 1|² |f̂(k)|²`. -/ +theorem enorm_translate_sub_sq (h : UnitAddTorus d) + (f : Lp ℂ 2 (volume : Measure (UnitAddTorus d))) : + ‖translate h f - f‖ₑ ^ 2 = ∑' k, ‖mFourier k h - 1‖ₑ ^ 2 * ‖mFourierCoeff f k‖ₑ ^ 2 := by + rw [← mFourierBasis.repr.eNorm_map, lp.enorm_sq_eq_tsum] + congr 1; funext k + rw [map_sub, lp.coeFn_sub, Pi.sub_apply, repr_translate, mFourierBasis_repr, ← sub_one_mul, + eNorm_mul, mul_pow] + +end Torus diff --git a/LeanPool/FunctionSpaces/Torus/TriebelLizorkin.lean b/LeanPool/FunctionSpaces/Torus/TriebelLizorkin.lean new file mode 100644 index 0000000000..60cc3027a8 --- /dev/null +++ b/LeanPool/FunctionSpaces/Torus/TriebelLizorkin.lean @@ -0,0 +1,362 @@ +/- +Copyright (c) 2026 Mario Ullrich. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Mario Ullrich +-/ +module + +public import LeanPool.FunctionSpaces.Torus.LittlewoodPaley +public import LeanPool.FunctionSpaces.Torus.LpBesovModuli +public import LeanPool.FunctionSpaces.Analysis.Lp.MixedNorms + +/- +Modified for Lean Pool: module names and imports adapted. +-/ + +/-! +# Triebel–Lizorkin spaces on the torus + +For `1 ≤ p ≤ ∞`, `s ∈ ℝ`, `1 ≤ q ≤ ∞` and `f ∈ L_p(𝕋^d)`, the **Triebel–Lizorkin quasi-norm** + +`‖f‖_{F^s_{p,q}} = ‖ t ↦ ‖(2^(js) |ψ_j ⋆ f(t)|)_j‖_{ℓ_q} ‖_p` + +(`Torus.triebelLizorkinNorm`) takes the `ℓ_q` norm of the Littlewood–Paley blocks at every point +before the `L_p` norm. The blocks are the pointwise convolutions `ψ_j ⋆ f` with the kernels of +`ℝ^d` (`Torus.blockFun`), representatives of `Torus.lpBlock`, with +`‖ψ_0 ⋆ f‖_p ≤ ‖Φ‖_1 ‖f‖_p` by Young's inequality (`Torus.eLpNorm_blockFun_zero_le`). The +space `F^s_{p,q}(𝕋^d)` consists of the `f` with a finite quasi-norm (`Torus.MemTriebelLizorkin`); +it is a subspace of `L_p` for `1 ≤ q ≤ ∞` (`Torus.triebelLizorkinSpace`), increasing in `q` and +decreasing in `s`. For `s = 0` the weights are `1`, so `‖f‖_{F^0_{p,q}}` is the `L_p` norm of +`t ↦ ‖((ψ_j ⋆ f)(t))_j‖_{ℓ_q}` (`Torus.triebelLizorkinNorm_zero_left`). These are the properties +of the mixed norms of dyadically weighted families in `FunctionSpaces.Analysis.Lp.MixedNorms`. +Setting terms of the weighted blocks to zero keeps them below the quasi-norm, and for `p < ∞`, +`0 < q < ∞` and `f ∈ F^s_{p,q}(𝕋^d)` their tails tend to zero +(`Torus.eLpNorm_lqNorm_ite_blockFun_le`, `Torus.tendsto_eLpNorm_lqNorm_blockFun_tail`). The +comparisons with Besov spaces below need `p < ∞`. + +The mixed-norm comparisons of `FunctionSpaces.Analysis.Lp.MixedNorms` give, for every `s ∈ ℝ`, +`‖(2^(js) ‖Δ_j f‖_p)_j‖_{ℓ_{max(p,q)}} ≤ ‖f‖_{F^s_{p,q}} ≤ ‖(2^(js) ‖Δ_j f‖_p)_j‖_{ℓ_{min(p,q)}}`, +with equality for `q = p`. With the Littlewood–Paley characterisation of Besov spaces on the +torus (`Torus.memBesov_iff_littlewoodPaleyNorm_lt_top`) this gives, for `s > 0`: + +* `F^s_{p,p}(𝕋^d) = B^s_{p,p}(𝕋^d)` (`Torus.memTriebelLizorkin_iff_memBesov`), and hence the + description of `F^s_{p,p}(𝕋^d)` by moduli of smoothness (`Torus.memTriebelLizorkin_iff_modulus`); +* the **Besov sandwich** `B^s_{p,min(p,q)}(𝕋^d) ⊆ F^s_{p,q}(𝕋^d) ⊆ B^s_{p,max(p,q)}(𝕋^d)` + (`Torus.memTriebelLizorkin_of_memBesov`, `Torus.memBesov_of_memTriebelLizorkin`), with explicit + constants (`Torus.triebelLizorkinNorm_le_approxNormDyadic`, + `Torus.approxNormDyadic_le_triebelLizorkinNorm`). +-/ + +@[expose] public section + +open MeasureTheory UnitAddTorus Set Filter Topology +open scoped ENNReal FourierTransform TorusHaar + +open ENNReal (lqNorm dyadicWeight) + +namespace Torus + +variable {d : Type*} [Fintype d] {p : ℝ≥0∞} [Fact (1 ≤ p)] + +/-! ### The blocks at every point -/ + +/-- The **Littlewood–Paley block at every point**, `t ↦ (ψ_j ⋆ f)(t) = ∫ ψ_j(y) f(t - π y) dy`, +with a representative of `f ∈ L_p(𝕋^d)`. Its class in `L_p` is the block `Torus.lpBlock` +(`Torus.lpBlock_ae_eq_blockFun`). -/ +noncomputable def blockFun (j : ℕ) (f : Lp ℂ p (volume : Measure (UnitAddTorus d))) : + UnitAddTorus d → ℂ := + econv (Rd.psi (V := EuclideanSpace ℝ d) j) f + +/-- The block `Δ_j f ∈ L_p(𝕋^d)` is represented by the pointwise convolution `ψ_j ⋆ f`. -/ +theorem lpBlock_ae_eq_blockFun (hp : p ≠ ∞) (j : ℕ) + (f : Lp ℂ p (volume : Measure (UnitAddTorus d))) : + lpBlock hp j f =ᵐ[volume] blockFun j f := + econvLp_apply_ae hp (Rd.integrable_psi j) f + +omit [Fact (1 ≤ p)] in +/-- The pointwise blocks are measurable. -/ +theorem aestronglyMeasurable_blockFun (j : ℕ) (f : Lp ℂ p (volume : Measure (UnitAddTorus d))) : + AEStronglyMeasurable (blockFun j f) volume := + aestronglyMeasurable_econv (Rd.integrable_psi j).aestronglyMeasurable + (Lp.stronglyMeasurable f).measurable + +/-- `‖Δ_j f‖_p` is the `L_p` norm of the pointwise block `ψ_j ⋆ f`. -/ +theorem enorm_lpBlock_eq_eLpNorm_blockFun (hp : p ≠ ∞) (j : ℕ) + (f : Lp ℂ p (volume : Measure (UnitAddTorus d))) : + ‖lpBlock hp j f‖ₑ = eLpNorm (blockFun j f) p volume := by + rw [Lp.eNorm_def] + exact eLpNorm_congr_ae (lpBlock_ae_eq_blockFun hp j f) + +/-- **The block `j = 0` by Young's inequality**: for `1 ≤ p < ∞` and `f ∈ L_p(𝕋^d)`, +`‖ψ_0 ⋆ f‖_p ≤ ‖Φ‖_1 ‖f‖_p`. -/ +theorem eLpNorm_blockFun_zero_le (hp : p ≠ ∞) (f : Lp ℂ p (volume : Measure (UnitAddTorus d))) : + eLpNorm (blockFun 0 f) p volume ≤ + eLpNorm (Rd.lpKernel (V := EuclideanSpace ℝ d)) 1 volume * ‖f‖ₑ := by + rw [Lp.eNorm_def, ← Rd.eLpNorm_Phi_one 0, eLpNorm_one_eq_lintegral_eNorm (Rd.integrable_Phi 0).1] + exact eLpNorm_econv_le Fact.out hp (Rd.integrable_psi 0) (Lp.stronglyMeasurable f).measurable + +/-- The block of a sum is the sum of the blocks, almost everywhere and for all levels at once. +On the torus `L_p ⊆ L_1`, so the convolution integrals converge absolutely almost everywhere +(`Torus.ae_integrable_econv`). -/ +theorem blockFun_add_ae (f g : Lp ℂ p (volume : Measure (UnitAddTorus d))) : + ∀ᵐ t ∂volume, ∀ j, blockFun j (f + g) t = blockFun j f t + blockFun j g t := by + refine ae_all_iff.2 fun j => ?_ + have hfm := (Lp.stronglyMeasurable f).measurable + have hgm := (Lp.stronglyMeasurable g).measurable + filter_upwards [econv_congr_ae (Rd.psi j) (Lp.stronglyMeasurable (f + g)).measurable + (hfm.add hgm) (Lp.coeFn_add f g), + econv_add_ae (Rd.integrable_psi j) hfm hgm ((Lp.memLp f).integrable Fact.out) + ((Lp.memLp g).integrable Fact.out)] with t h1 h2 + rw [blockFun, blockFun, blockFun, h1, h2, Pi.add_apply] + +omit [Fact (1 ≤ p)] in +/-- The block of a complex multiple is the multiple of the block, almost everywhere and for all +levels at once. -/ +theorem blockFun_smul_ae (c : ℂ) (f : Lp ℂ p (volume : Measure (UnitAddTorus d))) : + ∀ᵐ t ∂volume, ∀ j, blockFun j (c • f) t = c * blockFun j f t := by + refine ae_all_iff.2 fun j => ?_ + filter_upwards [econv_congr_ae (Rd.psi j) (Lp.stronglyMeasurable (c • f)).measurable + ((Lp.stronglyMeasurable f).measurable.const_smul c) (Lp.coeFn_smul c f)] with t h + rw [blockFun, blockFun, h, econv_smul, Pi.smul_apply, smul_eq_mul] + +/-! ### The Triebel–Lizorkin quasi-norm -/ + +/-- The **Triebel–Lizorkin quasi-norm** `‖ t ↦ ‖(2^(js) |ψ_j ⋆ f(t)|)_j‖_{ℓ_q} ‖_p` of +`f ∈ L_p(𝕋^d)`: the `ℓ_q` norm of the weighted blocks at each point, then the `L_p` norm. -/ +noncomputable def triebelLizorkinNorm (s : ℝ) (q : ℝ≥0∞) + (f : Lp ℂ p (volume : Measure (UnitAddTorus d))) : ℝ≥0∞ := + eLpNorm (fun t => lqNorm q (fun j => dyadicWeight s j * ‖blockFun j f t‖ₑ)) p volume + +/-- `f ∈ F^s_{p,q}(𝕋^d)`: the Triebel–Lizorkin quasi-norm of `f` is finite. -/ +def MemTriebelLizorkin (s : ℝ) (q : ℝ≥0∞) (f : Lp ℂ p (volume : Measure (UnitAddTorus d))) : + Prop := + triebelLizorkinNorm s q f < ∞ + +omit [Fact (1 ≤ p)] in +/-- The pointwise `ℓ_q` norm of the weighted blocks is measurable. -/ +theorem aemeasurable_lqNorm_blockFun (s : ℝ) (q : ℝ≥0∞) + (f : Lp ℂ p (volume : Measure (UnitAddTorus d))) : + AEMeasurable (fun t => lqNorm q (fun j => dyadicWeight s j * ‖blockFun j f t‖ₑ)) volume := + aemeasurable_lqNorm_comp (fun j => (aestronglyMeasurable_blockFun j f).eNorm.const_mul _) q + +/-- **The quasi-norm is subadditive**: for `1 ≤ q ≤ ∞`, +`‖f + g‖_{F^s_{p,q}} ≤ ‖f‖_{F^s_{p,q}} + ‖g‖_{F^s_{p,q}}`, by the triangle inequalities in +`ℓ_q` at every point and in `L_p`. -/ +theorem triebelLizorkinNorm_add_le {s : ℝ} {q : ℝ≥0∞} (hq : 1 ≤ q) + (f g : Lp ℂ p (volume : Measure (UnitAddTorus d))) : + triebelLizorkinNorm s q (f + g) ≤ triebelLizorkinNorm s q f + triebelLizorkinNorm s q g := + eLpNorm_lqNorm_le_add Fact.out hq + (fun j => (aestronglyMeasurable_blockFun j (f + g)).eNorm.const_mul _) <| by + filter_upwards [blockFun_add_ae f g] with t ht j + rw [ht j, ← mul_add] + gcongr + exact eNorm_add_le _ _ + +omit [Fact (1 ≤ p)] in +/-- **The quasi-norm is homogeneous**: `‖c f‖_{F^s_{p,q}} = |c| ‖f‖_{F^s_{p,q}}` for `c ∈ ℂ`. -/ +theorem triebelLizorkinNorm_smul (s : ℝ) (q : ℝ≥0∞) (c : ℂ) + (f : Lp ℂ p (volume : Measure (UnitAddTorus d))) : + triebelLizorkinNorm s q (c • f) = ‖c‖ₑ * triebelLizorkinNorm s q f := + eLpNorm_lqNorm_eq_const_mul _ (fun j => (aestronglyMeasurable_blockFun j f).eNorm.const_mul _) <| + by filter_upwards [blockFun_smul_ae c f] with t ht j; rw [ht j, eNorm_mul, mul_left_comm] + +omit [Fact (1 ≤ p)] in +/-- The zero function has quasi-norm `0`. -/ +theorem triebelLizorkinNorm_zero (s : ℝ) (q : ℝ≥0∞) : + triebelLizorkinNorm s q (0 : Lp ℂ p (volume : Measure (UnitAddTorus d))) = 0 := by + simpa using + triebelLizorkinNorm_smul s q (0 : ℂ) (0 : Lp ℂ p (volume : Measure (UnitAddTorus d))) + +omit [Fact (1 ≤ p)] in +/-- **Smoothness `0`**: `‖f‖_{F^0_{p,q}(𝕋^d)} = ‖ t ↦ ‖((ψ_j ⋆ f)(t))_j‖_{ℓ_q} ‖_p` for every `q`, +since the weights `2^(j·0)` are `1`. -/ +theorem triebelLizorkinNorm_zero_left (q : ℝ≥0∞) + (f : Lp ℂ p (volume : Measure (UnitAddTorus d))) : + triebelLizorkinNorm 0 q f = + eLpNorm (fun t => lqNorm q fun j => ‖blockFun j f t‖ₑ) p volume := + eLpNorm_lqNorm_dyadicWeight_zero_left _ + +omit [Fact (1 ≤ p)] in +/-- **The quasi-norm decreases in `q`**: `‖f‖_{F^s_{p,r}} ≤ ‖f‖_{F^s_{p,q}}` for +`1 ≤ q ≤ r ≤ ∞`, since `‖·‖_{ℓ_r} ≤ ‖·‖_{ℓ_q}` at every point. -/ +theorem triebelLizorkinNorm_mono_exponent {s : ℝ} {q r : ℝ≥0∞} (hq : 1 ≤ q) (hqr : q ≤ r) + (f : Lp ℂ p (volume : Measure (UnitAddTorus d))) : + triebelLizorkinNorm s r f ≤ triebelLizorkinNorm s q f := + eLpNorm_lqNorm_mono_exponent (zero_lt_one.trans_le hq).ne' hqr fun j => + (aestronglyMeasurable_blockFun j f).eNorm.const_mul _ + +omit [Fact (1 ≤ p)] in +/-- **The quasi-norm increases in `s`**: `‖f‖_{F^s_{p,q}} ≤ ‖f‖_{F^t_{p,q}}` for `s ≤ t`, since +`2^(js) ≤ 2^(jt)`. -/ +theorem triebelLizorkinNorm_mono_smoothness {s t : ℝ} (hst : s ≤ t) (q : ℝ≥0∞) + (f : Lp ℂ p (volume : Measure (UnitAddTorus d))) : + triebelLizorkinNorm s q f ≤ triebelLizorkinNorm t q f := + eLpNorm_lqNorm_dyadicWeight_mono_smoothness hst fun j => + (aestronglyMeasurable_blockFun j f).eNorm + +omit [Fact (1 ≤ p)] in +/-- **Weighted blocks with terms set to zero**: for every predicate `P` on `ℕ`, +`‖ t ↦ ‖(1_P(j) 2^{js} |(ψ_j ⋆ f)(t)|)_j‖_{ℓ_q} ‖_p ≤ ‖f‖_{F^s_{p,q}(𝕋^d)}`, where the terms with +`P j` false are `0` (`MeasureTheory.eLpNorm_lqNorm_ite_le`). -/ +theorem eLpNorm_lqNorm_ite_blockFun_le {P : ℕ → Prop} [DecidablePred P] (s : ℝ) (q : ℝ≥0∞) + (f : Lp ℂ p (volume : Measure (UnitAddTorus d))) : + eLpNorm (fun t => lqNorm q fun j => + if P j then dyadicWeight s j * ‖blockFun j f t‖ₑ else 0) p volume ≤ + triebelLizorkinNorm s q f := + eLpNorm_lqNorm_ite_le fun j => (aestronglyMeasurable_blockFun j f).eNorm.const_mul _ + +/-- **The tails of the weighted blocks tend to zero**: for `1 ≤ p < ∞`, `0 < q < ∞`, `s ∈ ℝ` and +`f ∈ F^s_{p,q}(𝕋^d)`, `‖ t ↦ ‖(2^{js} (ψ_j ⋆ f)(t))_{j ≥ N}‖_{ℓ_q} ‖_p → 0` as `N → ∞`, where +the terms `j < N` are `0` (`MeasureTheory.tendsto_eLpNorm_lqNorm_ite_le`). -/ +theorem tendsto_eLpNorm_lqNorm_blockFun_tail (hp : p ≠ ∞) {s : ℝ} {q : ℝ≥0∞} (hq0 : q ≠ 0) + (hq : q ≠ ∞) {f : Lp ℂ p (volume : Measure (UnitAddTorus d))} + (hf : MemTriebelLizorkin s q f) : + Tendsto (fun N => eLpNorm (fun t => lqNorm q fun j => + if N ≤ j then dyadicWeight s j * ‖blockFun j f t‖ₑ else 0) p volume) atTop (𝓝 0) := + tendsto_eLpNorm_lqNorm_ite_le (zero_lt_one.trans_le Fact.out).ne' hp hq0 hq + (fun j => (aestronglyMeasurable_blockFun j f).eNorm.const_mul _) hf.ne + +/-! ### The spaces `F^s_{p,q}(𝕋^d)` -/ + +omit [Fact (1 ≤ p)] in +/-- **`F^s_{p,q}(𝕋^d)` increases in `q`**: `F^s_{p,q} ⊆ F^s_{p,r}` for `1 ≤ q ≤ r ≤ ∞`. -/ +theorem MemTriebelLizorkin.mono_exponent {s : ℝ} {q r : ℝ≥0∞} (hq : 1 ≤ q) (hqr : q ≤ r) + {f : Lp ℂ p (volume : Measure (UnitAddTorus d))} (hf : MemTriebelLizorkin s q f) : + MemTriebelLizorkin s r f := + (triebelLizorkinNorm_mono_exponent hq hqr f).trans_lt hf + +omit [Fact (1 ≤ p)] in +/-- **`F^s_{p,q}(𝕋^d)` decreases in `s`**: `F^t_{p,q} ⊆ F^s_{p,q}` for `s ≤ t`. -/ +theorem MemTriebelLizorkin.mono_smoothness {s t : ℝ} (hst : s ≤ t) {q : ℝ≥0∞} + {f : Lp ℂ p (volume : Measure (UnitAddTorus d))} (hf : MemTriebelLizorkin t q f) : + MemTriebelLizorkin s q f := + (triebelLizorkinNorm_mono_smoothness hst q f).trans_lt hf + +/-- `F^s_{p,q}(𝕋^d)` is closed under addition, for `1 ≤ q ≤ ∞`. -/ +theorem MemTriebelLizorkin.add {s : ℝ} {q : ℝ≥0∞} (hq : 1 ≤ q) + {f g : Lp ℂ p (volume : Measure (UnitAddTorus d))} (hf : MemTriebelLizorkin s q f) + (hg : MemTriebelLizorkin s q g) : MemTriebelLizorkin s q (f + g) := + (triebelLizorkinNorm_add_le hq f g).trans_lt (ENNReal.add_lt_top.2 ⟨hf, hg⟩) + +omit [Fact (1 ≤ p)] in +/-- `F^s_{p,q}(𝕋^d)` is closed under complex multiples. -/ +theorem MemTriebelLizorkin.smul {s : ℝ} {q : ℝ≥0∞} (c : ℂ) + {f : Lp ℂ p (volume : Measure (UnitAddTorus d))} (hf : MemTriebelLizorkin s q f) : + MemTriebelLizorkin s q (c • f) := by + rw [MemTriebelLizorkin, triebelLizorkinNorm_smul] + exact ENNReal.mul_lt_top eNorm_lt_top hf + +/-- The **Triebel–Lizorkin space** `F^s_{p,q}(𝕋^d)` as a subspace of `L_p(𝕋^d)`, for +`1 ≤ p ≤ ∞`, `s ∈ ℝ` and `1 ≤ q ≤ ∞`, with real scalars as `FunctionScheme.besovSpace`. -/ +noncomputable def triebelLizorkinSpace (s : ℝ) (q : ℝ≥0∞) (hq : 1 ≤ q) : + Submodule ℝ (Lp ℂ p (volume : Measure (UnitAddTorus d))) where + carrier := {f | MemTriebelLizorkin s q f} + add_mem' hf hg := hf.add hq hg + zero_mem' := by + simp only [Set.mem_ofPred_eq, MemTriebelLizorkin, triebelLizorkinNorm_zero] + exact ENNReal.zero_lt_top + smul_mem' r f hf := by + simp only [Set.mem_ofPred_eq] at hf ⊢ + rw [RCLike.real_smul_eq_coe_smul (K := ℂ) r f] + exact hf.smul _ + +/-- Membership in the subspace `F^s_{p,q}(𝕋^d)` is a finite Triebel–Lizorkin quasi-norm. -/ +theorem mem_triebelLizorkinSpace {s : ℝ} {q : ℝ≥0∞} (hq : 1 ≤ q) + {f : Lp ℂ p (volume : Measure (UnitAddTorus d))} : + f ∈ triebelLizorkinSpace s q hq ↔ MemTriebelLizorkin s q f := + Iff.rfl + +/-! ### Comparison with the Besov spaces -/ + +/-- The Littlewood–Paley quasi-norm on the torus in terms of the pointwise blocks: +`‖(2^(js) ‖Δ_j f‖_p)_j‖_{ℓ_q} = ‖(2^(js) ‖ψ_j ⋆ f‖_p)_j‖_{ℓ_q}`. -/ +theorem littlewoodPaleyNorm_eq_lqNorm_eLpNorm (hp : p ≠ ∞) (s : ℝ) (q : ℝ≥0∞) + (f : Lp ℂ p (volume : Measure (UnitAddTorus d))) : + littlewoodPaleyNorm hp s q f = + lqNorm q (fun j => dyadicWeight s j * eLpNorm (blockFun j f) p volume) := by + simp only [littlewoodPaleyNorm, enorm_lpBlock_eq_eLpNorm_blockFun hp] + +/-- **For `q = p` the two quasi-norms agree**: for every `s ∈ ℝ`, +`‖f‖_{F^s_{p,p}} = ‖(2^(js) ‖Δ_j f‖_p)_j‖_{ℓ_p}` on `L_p(𝕋^d)`, by Tonelli's theorem +(`L_p(ℓ_p) = ℓ_p(L_p)`). -/ +theorem triebelLizorkinNorm_eq_littlewoodPaleyNorm (hp : p ≠ ∞) (s : ℝ) + (f : Lp ℂ p (volume : Measure (UnitAddTorus d))) : + triebelLizorkinNorm s p f = littlewoodPaleyNorm hp s p f := by + rw [littlewoodPaleyNorm_eq_lqNorm_eLpNorm] + exact eLpNorm_lqNorm_dyadicWeight_eq (zero_lt_one.trans_le Fact.out).ne' hp + fun j => aestronglyMeasurable_blockFun j f + +/-- **`F^s_{p,p}(𝕋^d) = B^s_{p,p}(𝕋^d)`**: for `1 ≤ p < ∞` and `s > 0`, `f ∈ F^s_{p,p}` iff `f` +lies in the Besov space `B^s_{p,p}(𝕋^d)`, the approximation space of the trigonometric +polynomials. -/ +theorem memTriebelLizorkin_iff_memBesov (hp : p ≠ ∞) {s : ℝ} (hs : 0 < s) + {f : Lp ℂ p (volume : Measure (UnitAddTorus d))} : + MemTriebelLizorkin s p f ↔ (trigScheme d).MemBesov volume p s p f := by + rw [memBesov_iff_littlewoodPaleyNorm_lt_top hp hs Fact.out, MemTriebelLizorkin, + triebelLizorkinNorm_eq_littlewoodPaleyNorm hp] + +/-- **The lower bound of the Triebel–Lizorkin quasi-norm on the torus**: for `1 ≤ p < ∞`, +`s ∈ ℝ` and `1 ≤ q ≤ ∞`, `‖(2^(js) ‖Δ_j f‖_p)_j‖_{ℓ_{max(p,q)}} ≤ ‖f‖_{F^s_{p,q}}`. -/ +theorem littlewoodPaleyNorm_max_le_triebelLizorkinNorm (hp : p ≠ ∞) {s : ℝ} {q : ℝ≥0∞} + (hq : 1 ≤ q) (f : Lp ℂ p (volume : Measure (UnitAddTorus d))) : + littlewoodPaleyNorm hp s (max p q) f ≤ triebelLizorkinNorm s q f := by + rw [littlewoodPaleyNorm_eq_lqNorm_eLpNorm] + exact lqNorm_max_dyadicWeight_le Fact.out hp hq fun j => aestronglyMeasurable_blockFun j f + +/-- **The upper bound of the Triebel–Lizorkin quasi-norm on the torus**: for `1 ≤ p < ∞`, +`s ∈ ℝ` and `1 ≤ q ≤ ∞`, `‖f‖_{F^s_{p,q}} ≤ ‖(2^(js) ‖Δ_j f‖_p)_j‖_{ℓ_{min(p,q)}}`. -/ +theorem triebelLizorkinNorm_le_littlewoodPaleyNorm_min (hp : p ≠ ∞) {s : ℝ} {q : ℝ≥0∞} + (hq : 1 ≤ q) (f : Lp ℂ p (volume : Measure (UnitAddTorus d))) : + triebelLizorkinNorm s q f ≤ littlewoodPaleyNorm hp s (min p q) f := by + rw [littlewoodPaleyNorm_eq_lqNorm_eLpNorm] + exact eLpNorm_lqNorm_dyadicWeight_le_min Fact.out hp hq fun j => aestronglyMeasurable_blockFun j f + +/-- **`F^s_{p,q}(𝕋^d) ⊆ B^s_{p,max(p,q)}(𝕋^d)` with a constant**: for `1 ≤ p < ∞`, `s > 0` and +`1 ≤ q ≤ ∞`, the approximation norm of `f` in `A^s_{max(p,q)}` of the trigonometric polynomials +is at most `2 · 2^s (1 - 2^(-s))⁻¹ ‖f‖_{F^s_{p,q}}`. -/ +theorem approxNormDyadic_le_triebelLizorkinNorm (hp : p ≠ ∞) {s : ℝ} (hs : 0 < s) {q : ℝ≥0∞} + (hq : 1 ≤ q) (f : Lp ℂ p (volume : Measure (UnitAddTorus d))) : + ((trigScheme d).toLp volume p).approxNormDyadic s (max p q) f ≤ + 2 * dyadicWeight s 1 * (1 - (2 : ℝ≥0∞) ^ (-s))⁻¹ * triebelLizorkinNorm s q f := + (approxNormDyadic_trigScheme_le hp hs (le_max_of_le_right hq) f).trans + (by gcongr; exact littlewoodPaleyNorm_max_le_triebelLizorkinNorm hp hq f) + +/-- **`B^s_{p,min(p,q)}(𝕋^d) ⊆ F^s_{p,q}(𝕋^d)` with a constant**: for `1 ≤ p < ∞`, `s ≥ 0` and +`1 ≤ q ≤ ∞`, `‖f‖_{F^s_{p,q}} ≤ 2 (#d + 1) 2^((#d + 1) s) ‖Φ‖_1` times the approximation norm of +`f` in `A^s_{min(p,q)}` of the trigonometric polynomials. -/ +theorem triebelLizorkinNorm_le_approxNormDyadic (hp : p ≠ ∞) {s : ℝ} (hs : 0 ≤ s) {q : ℝ≥0∞} + (hq : 1 ≤ q) (f : Lp ℂ p (volume : Measure (UnitAddTorus d))) : + triebelLizorkinNorm s q f ≤ + 2 * ((Fintype.card d : ℝ≥0∞) + 1) * dyadicWeight s (Fintype.card d + 1) * + eLpNorm (Rd.lpKernel (V := EuclideanSpace ℝ d)) 1 volume * + ((trigScheme d).toLp volume p).approxNormDyadic s (min p q) f := + (triebelLizorkinNorm_le_littlewoodPaleyNorm_min hp hq f).trans + (littlewoodPaleyNorm_le_approxNormDyadic_trigScheme hp hs (le_min Fact.out hq) f) + +/-- **`F^s_{p,q}(𝕋^d) ⊆ B^s_{p,max(p,q)}(𝕋^d)`**: for `1 ≤ p < ∞`, `s > 0` and `1 ≤ q ≤ ∞`. +For `q = 2`: `F^s_{p,2}(𝕋^d) ⊆ B^s_{p,max(p,2)}(𝕋^d)`. -/ +theorem memBesov_of_memTriebelLizorkin (hp : p ≠ ∞) {s : ℝ} (hs : 0 < s) {q : ℝ≥0∞} + (hq : 1 ≤ q) {f : Lp ℂ p (volume : Measure (UnitAddTorus d))} + (hf : MemTriebelLizorkin s q f) : (trigScheme d).MemBesov volume p s (max p q) f := + (memBesov_iff_littlewoodPaleyNorm_lt_top hp hs (le_max_of_le_right hq)).2 + ((littlewoodPaleyNorm_max_le_triebelLizorkinNorm hp hq f).trans_lt hf) + +/-- **`B^s_{p,min(p,q)}(𝕋^d) ⊆ F^s_{p,q}(𝕋^d)`**: for `1 ≤ p < ∞`, `s > 0` and `1 ≤ q ≤ ∞`. +For `q = 2`: `B^s_{p,min(p,2)}(𝕋^d) ⊆ F^s_{p,2}(𝕋^d)`. -/ +theorem memTriebelLizorkin_of_memBesov (hp : p ≠ ∞) {s : ℝ} (hs : 0 < s) {q : ℝ≥0∞} + (hq : 1 ≤ q) {f : Lp ℂ p (volume : Measure (UnitAddTorus d))} + (hf : (trigScheme d).MemBesov volume p s (min p q) f) : MemTriebelLizorkin s q f := + (triebelLizorkinNorm_le_littlewoodPaleyNorm_min hp hq f).trans_lt + ((memBesov_iff_littlewoodPaleyNorm_lt_top hp hs (le_min Fact.out hq)).1 hf) + +/-- **`F^s_{p,p}(𝕋^d)` by differences**: for `1 ≤ p < ∞` and `0 < s < r`, `f ∈ F^s_{p,p}` iff +`‖f‖_p + ‖(2^(ks) ω_r(f, 2^(-k))_p)_k‖_{ℓ_p} < ∞`, through `F^s_{p,p} = B^s_{p,p}` and the +description of `B^s_{p,p}(𝕋^d)` by moduli of smoothness. -/ +theorem memTriebelLizorkin_iff_modulus (hp : p ≠ ∞) {r : ℕ} {s : ℝ} (hs : 0 < s) (hsr : s < r) + (f : Lp ℂ p (volume : Measure (UnitAddTorus d))) : + MemTriebelLizorkin s p f ↔ + ‖f‖ₑ + lqNorm p (fun k => dyadicWeight s k * Rd.lpModulus p r f k) < ∞ := + (memTriebelLizorkin_iff_memBesov hp hs).trans + (memBesov_iff_modNorm_lt_top_lp hp hs hsr Fact.out f) + +end Torus diff --git a/LeanPool/FunctionSpaces/Torus/TriebelLizorkinInterpolation.lean b/LeanPool/FunctionSpaces/Torus/TriebelLizorkinInterpolation.lean new file mode 100644 index 0000000000..c5bd17de7e --- /dev/null +++ b/LeanPool/FunctionSpaces/Torus/TriebelLizorkinInterpolation.lean @@ -0,0 +1,137 @@ +/- +Copyright (c) 2026 Mario Ullrich. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Mario Ullrich +-/ +module + +public import LeanPool.FunctionSpaces.Torus.TriebelLizorkin +public import LeanPool.FunctionSpaces.ApproximationSpaces.Interpolation.ApproxSpaces + +/- +Modified for Lean Pool: module names and imports adapted. +-/ + +/-! +# Triebel–Lizorkin spaces on the torus and real interpolation + +Let `1 ≤ p < ∞`, `0 < η < 1` and `1 ≤ q₀, q₁, q ≤ ∞`. On `𝕋^d` the Triebel–Lizorkin quasi-norm +of `F^s_{p,q}` lies between the dyadic quasi-norms of `B^s_{p,max(p,q)}` and `B^s_{p,min(p,q)}` +of the trigonometric polynomials (`Torus.approxNormDyadic_le_triebelLizorkinNorm`, +`Torus.triebelLizorkinNorm_le_approxNormDyadic`), with the constants +`Torus.triebelLizorkinBesovConst` and `Torus.besovTriebelLizorkinConst`, so the sandwich principle +gives, for `0 < s₀ < s₁`, + +`(F^{s₀}_{p,q₀}(𝕋^d), F^{s₁}_{p,q₁}(𝕋^d))_{η,q} = B^{(1-η)s₀+ηs₁}_{p,q}(𝕋^d)` and +`(L_p(𝕋^d), F^{s₁}_{p,q₁}(𝕋^d))_{η,q} = B^{ηs₁}_{p,q}(𝕋^d)` + +(`Torus.memKMethod_triebelLizorkinCouple_iff`, `Torus.memKMethod_lpTriebelLizorkinCouple_iff`). +-/ + +@[expose] public section + +open MeasureTheory UnitAddTorus +open scoped ENNReal TorusHaar +open ENNReal (dyadicWeight) + +namespace Torus + +variable {d : Type*} [Fintype d] {p : ℝ≥0∞} [Fact (1 ≤ p)] {s₀ s₁ η : ℝ} {q₀ q₁ q : ℝ≥0∞} + +variable (d) in +/-- The constant `2 (#d + 1) 2^((#d + 1) s) ‖Φ‖_1` of the bound of the Triebel–Lizorkin +quasi-norm on `𝕋^d` by the Besov quasi-norm (`Torus.triebelLizorkinNorm_le_approxNormDyadic`). -/ +noncomputable def triebelLizorkinBesovConst (s : ℝ) : ℝ≥0∞ := + 2 * ((Fintype.card d : ℝ≥0∞) + 1) * dyadicWeight s (Fintype.card d + 1) * + eLpNorm (Rd.lpKernel (V := EuclideanSpace ℝ d)) 1 volume + +variable (d) in +/-- The constant `Torus.triebelLizorkinBesovConst d s` is finite. -/ +theorem triebelLizorkinBesovConst_ne_top (s : ℝ) : triebelLizorkinBesovConst d s ≠ ∞ := + ENNReal.mul_ne_top (ENNReal.mul_ne_top (ENNReal.mul_ne_top ENNReal.ofNat_ne_top + (ENNReal.add_ne_top.2 ⟨ENNReal.natCast_ne_top _, ENNReal.one_ne_top⟩)) + (ENNReal.dyadicWeight_ne_top _ _)) Rd.eLpNorm_lpKernel_ne_top + +/-- The constant `2 · 2^s (1 - 2^(-s))⁻¹` of the bound of the Besov quasi-norm on `𝕋^d` by the +Triebel–Lizorkin quasi-norm (`Torus.approxNormDyadic_le_triebelLizorkinNorm`). -/ +noncomputable def besovTriebelLizorkinConst (s : ℝ) : ℝ≥0∞ := + 2 * dyadicWeight s 1 * (1 - (2 : ℝ≥0∞) ^ (-s))⁻¹ + +/-- The constant `Torus.besovTriebelLizorkinConst s` is finite for `s > 0`. -/ +theorem besovTriebelLizorkinConst_ne_top {s : ℝ} (hs : 0 < s) : besovTriebelLizorkinConst s ≠ ∞ := + ENNReal.mul_ne_top (ENNReal.mul_ne_top ENNReal.ofNat_ne_top (ENNReal.dyadicWeight_ne_top _ _)) + (ENNReal.one_sub_two_rpow_neg_inv_ne_top hs) + +/-- The **couple `(F^{s₀}_{p,q₀}(𝕋^d), F^{s₁}_{p,q₁}(𝕋^d))`** on `L_p(𝕋^d)`: the two +Triebel–Lizorkin quasi-norms. -/ +noncomputable def triebelLizorkinCouple (s₀ : ℝ) (q₀ : ℝ≥0∞) (s₁ : ℝ) (q₁ : ℝ≥0∞) : + InterpCouple (Lp ℂ p (volume : Measure (UnitAddTorus d))) := + ⟨triebelLizorkinNorm s₀ q₀, triebelLizorkinNorm s₁ q₁⟩ + +omit [Fact (1 ≤ p)] in +/-- The first norm of `(F^{s₀}_{p,q₀}(𝕋^d), F^{s₁}_{p,q₁}(𝕋^d))` is the quasi-norm of +`F^{s₀}_{p,q₀}(𝕋^d)`. -/ +@[simp] +theorem triebelLizorkinCouple_norm0 (f : Lp ℂ p (volume : Measure (UnitAddTorus d))) : + (triebelLizorkinCouple s₀ q₀ s₁ q₁).norm0 f = triebelLizorkinNorm s₀ q₀ f := rfl + +omit [Fact (1 ≤ p)] in +/-- The second norm of `(F^{s₀}_{p,q₀}(𝕋^d), F^{s₁}_{p,q₁}(𝕋^d))` is the quasi-norm of +`F^{s₁}_{p,q₁}(𝕋^d)`. -/ +@[simp] +theorem triebelLizorkinCouple_norm1 (f : Lp ℂ p (volume : Measure (UnitAddTorus d))) : + (triebelLizorkinCouple s₀ q₀ s₁ q₁).norm1 f = triebelLizorkinNorm s₁ q₁ f := rfl + +/-- The **couple `(L_p(𝕋^d), F^{s₁}_{p,q₁}(𝕋^d))`** on `L_p(𝕋^d)`: the `L_p` norm and the +Triebel–Lizorkin quasi-norm. -/ +noncomputable def lpTriebelLizorkinCouple (s₁ : ℝ) (q₁ : ℝ≥0∞) : + InterpCouple (Lp ℂ p (volume : Measure (UnitAddTorus d))) := + ⟨fun f => ‖f‖ₑ, triebelLizorkinNorm s₁ q₁⟩ + +/-- The first norm of `(L_p(𝕋^d), F^{s₁}_{p,q₁}(𝕋^d))` is the `L_p` norm. -/ +@[simp] +theorem lpTriebelLizorkinCouple_norm0 (f : Lp ℂ p (volume : Measure (UnitAddTorus d))) : + (lpTriebelLizorkinCouple s₁ q₁).norm0 f = ‖f‖ₑ := rfl + +/-- The second norm of `(L_p(𝕋^d), F^{s₁}_{p,q₁}(𝕋^d))` is the quasi-norm of +`F^{s₁}_{p,q₁}(𝕋^d)`. -/ +@[simp] +theorem lpTriebelLizorkinCouple_norm1 (f : Lp ℂ p (volume : Measure (UnitAddTorus d))) : + (lpTriebelLizorkinCouple s₁ q₁).norm1 f = triebelLizorkinNorm s₁ q₁ f := rfl + +/-- **Triebel–Lizorkin spaces on the torus interpolate to Besov spaces**: for `1 ≤ p < ∞`, +`0 < s₀ < s₁`, `0 < η < 1` and `1 ≤ q₀, q₁, q ≤ ∞`, `f ∈ L_p(𝕋^d)` lies in the real +interpolation space `(F^{s₀}_{p,q₀}(𝕋^d), F^{s₁}_{p,q₁}(𝕋^d))_{η,q}` iff +`f ∈ B^{(1-η)s₀+ηs₁}_{p,q}(𝕋^d)` +(`ApproximationScheme.memKMethod_iff_memApprox_of_two_sandwiches`). -/ +theorem memKMethod_triebelLizorkinCouple_iff (hp : p ≠ ∞) (hs₀ : 0 < s₀) (hs : s₀ < s₁) + (hη : 0 < η) (hη' : η < 1) (hq₀ : 1 ≤ q₀) (hq₁ : 1 ≤ q₁) (hq : 1 ≤ q) + {f : Lp ℂ p (volume : Measure (UnitAddTorus d))} : + (triebelLizorkinCouple s₀ q₀ s₁ q₁).MemKMethod η q f ↔ + (trigScheme d).MemBesov volume p ((1 - η) * s₀ + η * s₁) q f := + ApproximationScheme.memKMethod_iff_memApprox_of_two_sandwiches + (N₀ := triebelLizorkinNorm s₀ q₀) (N₁ := triebelLizorkinNorm s₁ q₁) + (triebelLizorkinBesovConst_ne_top d s₀) (besovTriebelLizorkinConst_ne_top hs₀) + (triebelLizorkinBesovConst_ne_top d s₁) (besovTriebelLizorkinConst_ne_top (hs₀.trans hs)) + (le_min Fact.out hq₀) (le_max_of_le_right hq₀) (le_min Fact.out hq₁) + (le_max_of_le_right hq₁) hs₀ hs hη hη' hq + (triebelLizorkinNorm_le_approxNormDyadic hp hs₀.le hq₀) + (approxNormDyadic_le_triebelLizorkinNorm hp hs₀ hq₀) + (triebelLizorkinNorm_le_approxNormDyadic hp (hs₀.trans hs).le hq₁) + (approxNormDyadic_le_triebelLizorkinNorm hp (hs₀.trans hs) hq₁) + +/-- **`L_p` and a Triebel–Lizorkin space on the torus interpolate to Besov spaces**: for +`1 ≤ p < ∞`, `s₁ > 0`, `0 < η < 1` and `1 ≤ q₁, q ≤ ∞`, `f ∈ L_p(𝕋^d)` lies in the real +interpolation space `(L_p(𝕋^d), F^{s₁}_{p,q₁}(𝕋^d))_{η,q}` iff `f ∈ B^{ηs₁}_{p,q}(𝕋^d)` +(`ApproximationScheme.memKMethod_iff_memApprox_of_sandwich`). -/ +theorem memKMethod_lpTriebelLizorkinCouple_iff (hp : p ≠ ∞) (hs₁ : 0 < s₁) (hη : 0 < η) + (hη' : η < 1) (hq₁ : 1 ≤ q₁) (hq : 1 ≤ q) {f : Lp ℂ p (volume : Measure (UnitAddTorus d))} : + (lpTriebelLizorkinCouple s₁ q₁).MemKMethod η q f ↔ + (trigScheme d).MemBesov volume p (η * s₁) q f := + ApproximationScheme.memKMethod_iff_memApprox_of_sandwich (N₁ := triebelLizorkinNorm s₁ q₁) + (triebelLizorkinBesovConst_ne_top d s₁) (besovTriebelLizorkinConst_ne_top hs₁) + (le_min Fact.out hq₁) (le_max_of_le_right hq₁) hs₁ hη hη' hq + (triebelLizorkinNorm_le_approxNormDyadic hp hs₁.le hq₁) + (approxNormDyadic_le_triebelLizorkinNorm hp hs₁ hq₁) + +end Torus diff --git a/LeanPool/FunctionSpaces/Torus/TriebelLizorkinLocalMeans.lean b/LeanPool/FunctionSpaces/Torus/TriebelLizorkinLocalMeans.lean new file mode 100644 index 0000000000..c62f95061c --- /dev/null +++ b/LeanPool/FunctionSpaces/Torus/TriebelLizorkinLocalMeans.lean @@ -0,0 +1,436 @@ +/- +Copyright (c) 2026 Mario Ullrich. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Mario Ullrich +-/ +module + +public import LeanPool.FunctionSpaces.Torus.TriebelLizorkin +public import LeanPool.FunctionSpaces.Torus.FeffermanStein +public import LeanPool.FunctionSpaces.Rd.TriebelLizorkin.TriebelLizorkinLocalMeans + +/- +Modified for Lean Pool: module names and imports adapted. +-/ + +/-! +# Local means for Triebel–Lizorkin spaces on the torus + +For a bump `b` on `ℝ^d` and an order `L`, the local means kernels `k_j` of `ℝ^d` act on the torus +by `Torus.econv` and define the quasi-norm + +`‖f‖_{F^s_{p,q}(𝕋^d)}^{b,L} = ‖ t ↦ ‖(2^(js) |k_j ⋆ f(t)|)_j‖_{ℓ_q} ‖_{L_p(𝕋^d)}` + +(`Torus.tlLocalMeansNorm`). For `1 < p < ∞`, `1 < q ≤ ∞` and `0 < s < L` it is equivalent to the +Triebel–Lizorkin quasi-norm of the torus, with explicit constants +(`Torus.triebelLizorkinNorm_le_tlLocalMeansNorm`, `Torus.tlLocalMeansNorm_le_triebelLizorkinNorm`), +so `F^s_{p,q}(𝕋^d)` is described by local means (`Torus.memTriebelLizorkin_iff_tlLocalMeans`). + +The proof transfers the one on `ℝ^d` (`FunctionSpaces.Rd.TriebelLizorkin.TriebelLizorkinLocalMeans`) +by the periodic lift. The operator identities, the reproducing formula `f = ∑_i η_i ⋆ k_i ⋆ f` +(`Torus.sum_econvLp_dual_kernel`, `Torus.tendsto_sum_econvLp_dual_kernel`) and +`k_j ⋆ Δ_i f = (k_j ⋆ Θ_i) ⋆ Δ_i f`, hold on the torus as identities of Fourier multipliers. At a +lifted point, `(K ⋆ h)(π x) = (K ⋆ (h ∘ π))(x)` is a convolution on `ℝ^d`, to which the pointwise +bounds of the cross kernels apply for every function `h`; this gives, for almost every `x` in the +period box `P_0 = (0, 1]^d`, `|ψ_j ⋆ f(π x)| ≤ C ∑_i c_{ji} M(|k_i ⋆ f| ∘ π)(x)` +(`Torus.enorm_blockFun_proj_le_tsum_maximal`) and +`|k_j ⋆ f(π x)| ≤ C ∑_i c_{ji} M(|ψ_i ⋆ f| ∘ π)(x)` +(`Torus.enorm_econv_kernel_proj_le_tsum_maximal`), with `c_{ji} = 2^(-(j-i)L')` for `i ≤ j`, +`c_{ji} = 1` for `i > j`, and explicit constants `C`. The bounds pass from the partial sums to their +limits in `L_p(𝕋^d)` on `P_0` (`Torus.ae_enorm_comp_proj_le_of_tendsto_Lp`). The almost diagonal +estimate and the Fefferman–Stein inequality for periodic lifts (`Torus.feffermanStein_periodic`) +finish, since `L_p(𝕋^d)` norms are `L_p(P_0)` norms of lifts. +-/ + +@[expose] public section + +open MeasureTheory UnitAddTorus Set Filter Topology Module +open scoped ENNReal TorusHaar + +open ENNReal (lqNorm dyadicWeight) + +namespace Torus + +variable {d : Type*} [Fintype d] {p : ℝ≥0∞} [Fact (1 ≤ p)] + (b : Rd.LocalMeansBump (EuclideanSpace ℝ d)) + +/-! ### The local means quasi-norm -/ + +/-- The **local means quasi-norm of Triebel–Lizorkin type on the torus** +`‖ t ↦ ‖(2^(js) |k_j ⋆ f(t)|)_j‖_{ℓ_q} ‖_p`, with the local means kernels `k_j` on `ℝ^d` of the +bump `b` and the order `L` acting on the torus: the `ℓ_q` norm at each point, then the `L_p` +norm. -/ +noncomputable def tlLocalMeansNorm (L : ℕ) (s : ℝ) (q : ℝ≥0∞) + (f : Lp ℂ p (volume : Measure (UnitAddTorus d))) : ℝ≥0∞ := + eLpNorm (fun t => lqNorm q (fun j => dyadicWeight s j * ‖econv (b.kernel L j) f t‖ₑ)) p volume + +omit [Fact (1 ≤ p)] in +/-- The weighted local means `2^(js) |k_j ⋆ f|` on the torus are almost everywhere +measurable. -/ +theorem aemeasurable_dyadicWeight_mul_econv_kernel (L : ℕ) (s : ℝ) (j : ℕ) + (f : Lp ℂ p (volume : Measure (UnitAddTorus d))) : + AEMeasurable (fun t => dyadicWeight s j * ‖econv (b.kernel L j) f t‖ₑ) volume := + (aestronglyMeasurable_econv (b.integrable_kernel L j).aestronglyMeasurable + (Lp.stronglyMeasurable f).measurable).eNorm.const_mul _ + +omit [Fact (1 ≤ p)] in +/-- The pointwise `ℓ_q` norm of the weighted local means on the torus is almost everywhere +measurable. -/ +theorem aemeasurable_lqNorm_econv_kernel (L : ℕ) (s : ℝ) (q : ℝ≥0∞) + (f : Lp ℂ p (volume : Measure (UnitAddTorus d))) : + AEMeasurable (fun t => lqNorm q (fun j => dyadicWeight s j * + ‖econv (b.kernel L j) f t‖ₑ)) volume := + aemeasurable_lqNorm_comp (fun j => aemeasurable_dyadicWeight_mul_econv_kernel b L s j f) q + +/-! ### Operator identities -/ + +/-- **The reproducing formula on the torus, partial sums**: +`∑_{j ≤ J} η_j ⋆ k_j ⋆ f = m_{2^J} ⋆ m_{2^J} ⋆ f` on `L_p(𝕋^d)`, from `a² - b² = (a - b)(a + b)` +for the commuting operators `a = m_{2^(J+1)} ⋆`, `b = m_{2^J} ⋆`. -/ +theorem sum_econvLp_dual_kernel (hp : p ≠ ∞) (L J : ℕ) + (f : Lp ℂ p (volume : Measure (UnitAddTorus d))) : + ∑ j ∈ Finset.range (J + 1), + econvLp hp (b.integrable_dual L j) (econvLp hp (b.integrable_kernel L j) f) = + econvLp hp (b.integrable_scaled L J) (econvLp hp (b.integrable_scaled L J) f) := by + induction J with + | zero => + rw [Finset.sum_range_one] + rfl + | succ J ih => + have hk : econvLp hp (b.integrable_kernel L (J + 1)) f = + econvLp hp (b.integrable_scaled L (J + 1)) f - econvLp hp (b.integrable_scaled L J) f := + econvLp_sub_kernel hp (b.integrable_scaled L (J + 1)) (b.integrable_scaled L J) f + have hd : ∀ g : Lp ℂ p (volume : Measure (UnitAddTorus d)), + econvLp hp (b.integrable_dual L (J + 1)) g = + econvLp hp (b.integrable_scaled L (J + 1)) g + econvLp hp (b.integrable_scaled L J) g := + fun g => econvLp_add_kernel hp (b.integrable_scaled L (J + 1)) (b.integrable_scaled L J) g + rw [Finset.sum_range_succ, ih, hd, hk, map_sub, map_sub, + econvLp_comm hp (b.integrable_scaled L (J + 1)) (b.integrable_scaled L J)] + abel + +/-- **The reproducing formula on the torus**: `∑_j η_j ⋆ k_j ⋆ f = f` in `L_p(𝕋^d)` for `L ≥ 1`, +since `m_{2^J} ⋆ m_{2^J} ⋆ f → f` (`m` is an approximate identity on the torus, +`Torus.tendsto_econvLp_dilate`, and the operators `m_{2^J} ⋆` are uniformly bounded, +`Rd.tendsto_apply_apply_of_tendsto`). -/ +theorem tendsto_sum_econvLp_dual_kernel (hp : p ≠ ∞) {L : ℕ} (hL : 1 ≤ L) + (f : Lp ℂ p (volume : Measure (UnitAddTorus d))) : + Tendsto (fun J => ∑ j ∈ Finset.range (J + 1), + econvLp hp (b.integrable_dual L j) (econvLp hp (b.integrable_kernel L j) f)) atTop + (𝓝 f) := by + simp_rw [sum_econvLp_dual_kernel b hp L] + have h : Tendsto (fun J => econvLp hp (b.integrable_scaled L J) f) atTop (𝓝 f) := + tendsto_econvLp_dilate hp (Rd.integrable_momentKernel b.integrable L) + (Rd.integral_momentKernel b.integrable b.integral_eq_one hL) (c := fun J : ℕ => (2 : ℝ) ^ J) + (fun J => by positivity) (tendsto_pow_atTop_atTop_of_one_lt one_lt_two) f + have hm : eLpNorm (Rd.momentKernel b.toFun L) 1 volume ≠ ∞ := + (memLp_one_iff_integrable.2 (Rd.integrable_momentKernel b.integrable L)).eLpNorm_ne_top + refine Rd.tendsto_apply_apply_of_tendsto (T := fun J => econvLp hp (b.integrable_scaled L J)) + (fun J g => norm_econvLp_le hp _ hm (by + rw [← eLpNorm_one_eq_lintegral_eNorm (b.integrable_scaled L J).1, b.eLpNorm_scaled_one]) g) h + +/-- A local mean of a block on the torus is the block convolved with the cross kernel: +`k_j ⋆ Δ_i f = (k_j ⋆ Θ_i) ⋆ Δ_i f` in `L_p(𝕋^d)`, since `Θ_i ⋆ ψ_i = ψ_i`. -/ +theorem econvLp_kernel_lpBlock (hp : p ≠ ∞) (L i j : ℕ) + (f : Lp ℂ p (volume : Measure (UnitAddTorus d))) : + econvLp hp (b.integrable_kernel L j) (lpBlock hp i f) = + econvLp hp (Rd.integrable_conv (b.integrable_kernel L j) (Rd.integrable_Theta i)) + (lpBlock hp i f) := by + have hT : econvLp hp (Rd.integrable_Theta i) (lpBlock hp i f) = lpBlock hp i f := + econvLp_comp_econvLp_of_eq hp _ _ (Rd.integrable_psi i) (Rd.conv_Theta_psi i) f + calc econvLp hp (b.integrable_kernel L j) (lpBlock hp i f) + = econvLp hp (b.integrable_kernel L j) + (econvLp hp (Rd.integrable_Theta i) (lpBlock hp i f)) := by rw [hT] + _ = _ := econvLp_comp_econvLp hp _ _ _ + +/-! ### Limits on the lift -/ + +/-- **Pointwise bounds on the lift pass to limits in `L_p(𝕋^d)`**: if `G_J → g` in `L_p(𝕋^d)` +and `|G_J(π x)| ≤ v(x)` for every `J` and almost every `x` in the period box `P_a`, then +`|g(π x)| ≤ v(x)` for almost every `x ∈ P_a`. Composition with `π` is an isometry from +`L_p(𝕋^d)` to `L_p(P_a)` (Mathlib's `Lp.isometry_compMeasurePreserving`), and +`MeasureTheory.ae_enorm_le_of_tendsto_Lp` applies on `P_a`. -/ +theorem ae_enorm_comp_proj_le_of_tendsto_Lp {a : d → ℝ} + {G : ℕ → Lp ℂ p (volume : Measure (UnitAddTorus d))} {g : Lp ℂ p volume} + (hG : Tendsto G atTop (𝓝 g)) {v : EuclideanSpace ℝ d → ℝ≥0∞} + (h : ∀ J, ∀ᵐ x ∂(volume.restrict (periodBox a)), ‖G J (proj x)‖ₑ ≤ v x) : + ∀ᵐ x ∂(volume.restrict (periodBox a)), ‖g (proj x)‖ₑ ≤ v x := by + have hmp := measurePreserving_proj_periodBox a + have hlim := ((Lp.isometry_compMeasurePreserving (E := ℂ) (p := p) hmp).continuous.tendsto _).comp + hG + have h' := ae_enorm_le_of_tendsto_Lp hlim fun J => by + filter_upwards [Lp.coeFn_compMeasurePreserving (G J) hmp, h J] with x h1 h2 + simp only [Function.comp_apply] at h1 ⊢ + rw [h1] + exact h2 + filter_upwards [h', Lp.coeFn_compMeasurePreserving g hmp] with x hx h1 + rw [← Function.comp_apply (f := ⇑g), ← h1] + exact hx + +/-! ### Blocks by local means -/ + +/-- **A block of a partial sum of the reproducing formula on the torus**: almost everywhere, +`Δ_j (∑_{i ≤ J} η_i ⋆ k_i ⋆ f) = ∑_{i ≤ J} (ψ_j ⋆ η_i) ⋆ (k_i ⋆ f)`, with the representatives of +`k_i ⋆ f ∈ L_p(𝕋^d)` on the right. -/ +theorem lpBlock_sum_econvLp_dual_ae (hp : p ≠ ∞) (L J j : ℕ) + (f : Lp ℂ p (volume : Measure (UnitAddTorus d))) : + ∀ᵐ t ∂volume, lpBlock hp j (∑ i ∈ Finset.range (J + 1), + econvLp hp (b.integrable_dual L i) (econvLp hp (b.integrable_kernel L i) f)) t = + ∑ i ∈ Finset.range (J + 1), econv (Rd.conv (Rd.psi j) (b.dual L i) volume) + (econvLp hp (b.integrable_kernel L i) f) t := by + have hsum : lpBlock hp j (∑ i ∈ Finset.range (J + 1), + econvLp hp (b.integrable_dual L i) (econvLp hp (b.integrable_kernel L i) f)) = + ∑ i ∈ Finset.range (J + 1), + econvLp hp (Rd.integrable_conv (Rd.integrable_psi j) (b.integrable_dual L i)) + (econvLp hp (b.integrable_kernel L i) f) := by + rw [map_sum] + exact Finset.sum_congr rfl fun i _ => econvLp_comp_econvLp hp _ _ _ + rw [hsum] + exact coeFn_sum_econvLp_ae hp _ _ _ + +/-- The maximal function of the lift of `k_i ⋆ f ∈ L_p(𝕋^d)` is that of the lift of the pointwise +convolution `k_i ⋆ f`. -/ +theorem maximal_econvLp_kernel_proj (hp : p ≠ ∞) (L i : ℕ) + (f : Lp ℂ p (volume : Measure (UnitAddTorus d))) : + Rd.maximal (fun y => ‖econvLp hp (b.integrable_kernel L i) f (proj y)‖ₑ) = + Rd.maximal (fun y => ‖econv (b.kernel L i) f (proj y)‖ₑ) := + maximal_enorm_comp_proj_congr_ae (econvLp_apply_ae hp (b.integrable_kernel L i) f) + +/-- The bound of the blocks by local means for the partial sums of the reproducing formula, at +lifted points: for `L' ≥ 1` and every `J`, for almost every `x ∈ ℝ^d`, +`|Δ_j (∑_{i ≤ J} η_i ⋆ k_i ⋆ f)(π x)| ≤ C ∑_i c_{ji} M(|k_i ⋆ f| ∘ π)(x)` with +`c_{ji} = 2^(-(j-i)L')` for `i ≤ j`, `c_{ji} = 1` for `i > j`, and +`C = Rd.LocalMeansBump.blockByLocalMeansConst L L'`. -/ +theorem ae_enorm_lpBlock_sum_proj_le (hp : p ≠ ∞) (L : ℕ) {L' : ℕ} (hL' : 1 ≤ L') (J j : ℕ) + (f : Lp ℂ p (volume : Measure (UnitAddTorus d))) : + ∀ᵐ x ∂(volume : Measure (EuclideanSpace ℝ d)), ‖lpBlock hp j (∑ i ∈ Finset.range (J + 1), + econvLp hp (b.integrable_dual L i) (econvLp hp (b.integrable_kernel L i) f)) (proj x)‖ₑ ≤ + b.blockByLocalMeansConst L L' * ∑' i, (if i ≤ j then dyadicWeight (-(L' : ℝ)) (j - i) + else 1) * Rd.maximal (fun y => ‖econv (b.kernel L i) f (proj y)‖ₑ) x := by + filter_upwards [ae_comp_proj (lpBlock_sum_econvLp_dual_ae b hp L J j f)] with x hx + have hterm : ∀ i, ‖econv (Rd.conv (Rd.psi j) (b.dual L i) volume) + (econvLp hp (b.integrable_kernel L i) f) (proj x)‖ₑ ≤ + b.blockByLocalMeansConst L L' * ((if i ≤ j then dyadicWeight (-(L' : ℝ)) (j - i) + else 1) * Rd.maximal (fun y => ‖econv (b.kernel L i) f (proj y)‖ₑ) x) := fun i => by + rw [econv_proj, ← maximal_econvLp_kernel_proj b hp L i f] + exact b.enorm_conv_conv_psi_dual_le L hL' i j _ x + rw [hx] + refine (eNorm_sum_le _ _).trans ((Finset.sum_le_sum fun i _ => hterm i).trans ?_) + rw [← Finset.mul_sum] + gcongr + exact sum_le_tsum _ + +/-- **The blocks by local means on the torus, pointwise on the lift**: for `L ≥ 1`, `L' ≥ 1`, +`1 ≤ p < ∞` and `f ∈ L_p(𝕋^d)`, for almost every `x` in the period box `P_0 = (0, 1]^d` and all +levels `j`, `|ψ_j ⋆ f(π x)| ≤ C ∑_i c_{ji} M(|k_i ⋆ f| ∘ π)(x)` with `c_{ji} = 2^(-(j-i)L')` for +`i ≤ j`, `c_{ji} = 1` for `i > j`, and `C = Rd.LocalMeansBump.blockByLocalMeansConst L L'`. The +reproducing formula holds in `L_p(𝕋^d)`, and the bound passes from the partial sums to `f` +(`Torus.ae_enorm_comp_proj_le_of_tendsto_Lp`). -/ +theorem enorm_blockFun_proj_le_tsum_maximal {L : ℕ} (hL : 1 ≤ L) {L' : ℕ} (hL' : 1 ≤ L') + (hp : p ≠ ∞) (f : Lp ℂ p (volume : Measure (UnitAddTorus d))) : + ∀ᵐ x ∂(volume.restrict (periodBox 0)), ∀ j, ‖blockFun j f (proj x)‖ₑ ≤ + b.blockByLocalMeansConst L L' * ∑' i, (if i ≤ j then dyadicWeight (-(L' : ℝ)) (j - i) + else 1) * Rd.maximal (fun y => ‖econv (b.kernel L i) f (proj y)‖ₑ) x := by + refine ae_all_iff.2 fun j => ?_ + have h := ae_enorm_comp_proj_le_of_tendsto_Lp (a := 0) + (((lpBlock hp j).continuous.tendsto f).comp (tendsto_sum_econvLp_dual_kernel b hp hL f)) + fun J => ae_restrict_of_ae (ae_enorm_lpBlock_sum_proj_le b hp L hL' J j f) + filter_upwards [h, ae_restrict_of_ae (ae_comp_proj (lpBlock_ae_eq_blockFun hp j f))] + with x hx h2 + rw [← h2] + exact hx + +/-! ### Local means by blocks -/ + +/-- **A local mean of a partial sum of blocks on the torus**: almost everywhere, +`k_j ⋆ (∑_{i < J} Δ_i f) = ∑_{i < J} (k_j ⋆ Θ_i) ⋆ Δ_i f`, with the representatives of +`Δ_i f ∈ L_p(𝕋^d)` on the right. -/ +theorem econvLp_kernel_sum_lpBlock_ae (hp : p ≠ ∞) (L J j : ℕ) + (f : Lp ℂ p (volume : Measure (UnitAddTorus d))) : + ∀ᵐ t ∂volume, econvLp hp (b.integrable_kernel L j) (∑ i ∈ Finset.range J, lpBlock hp i f) t = + ∑ i ∈ Finset.range J, econv (Rd.conv (b.kernel L j) (Rd.Theta i) volume) + (lpBlock hp i f) t := by + simp only [map_sum, econvLp_kernel_lpBlock b hp L _ j f] + exact coeFn_sum_econvLp_ae hp _ _ _ + +/-- The maximal function of the lift of `Δ_i f ∈ L_p(𝕋^d)` is that of the lift of the pointwise +block `ψ_i ⋆ f`. -/ +theorem maximal_lpBlock_proj (hp : p ≠ ∞) (i : ℕ) + (f : Lp ℂ p (volume : Measure (UnitAddTorus d))) : + Rd.maximal (fun y => ‖lpBlock hp i f (proj y)‖ₑ) = + Rd.maximal (fun y => ‖blockFun i f (proj y)‖ₑ) := + maximal_enorm_comp_proj_congr_ae (lpBlock_ae_eq_blockFun hp i f) + +/-- The bound of the local means by blocks for the partial sums of the block decomposition, at +lifted points: for every `J`, for almost every `x ∈ ℝ^d`, +`|k_j ⋆ (∑_{i < J} Δ_i f)(π x)| ≤ C ∑_i c_{ji} M(|ψ_i ⋆ f| ∘ π)(x)` with `c_{ji} = 2^(-(j-i)L)` for +`i ≤ j`, `c_{ji} = 1` for `i > j`, and `C = Rd.LocalMeansBump.localMeansByBlockConst L`. -/ +theorem ae_enorm_econvLp_kernel_sum_proj_le (hp : p ≠ ∞) (L J j : ℕ) + (f : Lp ℂ p (volume : Measure (UnitAddTorus d))) : + ∀ᵐ x ∂(volume : Measure (EuclideanSpace ℝ d)), + ‖econvLp hp (b.integrable_kernel L j) (∑ i ∈ Finset.range J, lpBlock hp i f) (proj x)‖ₑ ≤ + b.localMeansByBlockConst L * ∑' i, (if i ≤ j then dyadicWeight (-(L : ℝ)) (j - i) + else 1) * Rd.maximal (fun y => ‖blockFun i f (proj y)‖ₑ) x := by + filter_upwards [ae_comp_proj (econvLp_kernel_sum_lpBlock_ae b hp L J j f)] with x hx + have hterm : ∀ i, ‖econv (Rd.conv (b.kernel L j) (Rd.Theta i) volume) + (lpBlock hp i f) (proj x)‖ₑ ≤ + b.localMeansByBlockConst L * ((if i ≤ j then dyadicWeight (-(L : ℝ)) (j - i) + else 1) * Rd.maximal (fun y => ‖blockFun i f (proj y)‖ₑ) x) := fun i => by + rw [econv_proj, ← maximal_lpBlock_proj hp i f] + exact b.enorm_conv_conv_kernel_Theta_le L i j _ x + rw [hx] + refine (eNorm_sum_le _ _).trans ((Finset.sum_le_sum fun i _ => hterm i).trans ?_) + rw [← Finset.mul_sum] + gcongr + exact sum_le_tsum _ + +/-- **The local means by blocks on the torus, pointwise on the lift**: for every order `L`, +`1 ≤ p < ∞` and `f ∈ L_p(𝕋^d)`, for almost every `x` in the period box `P_0 = (0, 1]^d` and all +levels `j`, `|k_j ⋆ f(π x)| ≤ C ∑_i c_{ji} M(|ψ_i ⋆ f| ∘ π)(x)` with `c_{ji} = 2^(-(j-i)L)` for +`i ≤ j`, `c_{ji} = 1` for `i > j`, and `C = Rd.LocalMeansBump.localMeansByBlockConst L`. The +decomposition `f = ∑_i Δ_i f` holds in `L_p(𝕋^d)`, and the bound passes from its partial sums to +`f` (`Torus.ae_enorm_comp_proj_le_of_tendsto_Lp`). -/ +theorem enorm_econv_kernel_proj_le_tsum_maximal (L : ℕ) (hp : p ≠ ∞) + (f : Lp ℂ p (volume : Measure (UnitAddTorus d))) : + ∀ᵐ x ∂(volume.restrict (periodBox 0)), ∀ j, ‖econv (b.kernel L j) f (proj x)‖ₑ ≤ + b.localMeansByBlockConst L * ∑' i, (if i ≤ j then dyadicWeight (-(L : ℝ)) (j - i) + else 1) * Rd.maximal (fun y => ‖blockFun i f (proj y)‖ₑ) x := by + refine ae_all_iff.2 fun j => ?_ + have h := ae_enorm_comp_proj_le_of_tendsto_Lp (a := 0) + (((econvLp hp (b.integrable_kernel L j)).continuous.tendsto f).comp (tendsto_sum_lpBlock hp f)) + fun J => ae_restrict_of_ae (ae_enorm_econvLp_kernel_sum_proj_le b hp L J j f) + filter_upwards [h, + ae_restrict_of_ae (ae_comp_proj (econvLp_apply_ae hp (b.integrable_kernel L j) f))] + with x hx h2 + rw [← h2] + exact hx + +/-! ### The almost diagonal step -/ + +/-- **The blocks by local means in `ℓ_q` on the torus**: for `L ≥ 1`, `L' ≥ 1`, `1 ≤ p < ∞`, +`1 ≤ q ≤ ∞`, `s ∈ ℝ` and `f ∈ L_p(𝕋^d)`, for almost every `x ∈ P_0`, +`‖(2^(js) |ψ_j ⋆ f(π x)|)_j‖_{ℓ_q} ≤ C A_{s,L'} ‖(M(2^(is) |k_i ⋆ f| ∘ π)(x))_i‖_{ℓ_q}` with +`C = Rd.LocalMeansBump.blockByLocalMeansConst L L'` and +`A_{s,L'} = ENNReal.almostDiagonalConst s L'`. -/ +theorem lqNorm_blockFun_proj_le_lqNorm_maximal {L : ℕ} (hL : 1 ≤ L) {L' : ℕ} (hL' : 1 ≤ L') + (hp : p ≠ ∞) {q : ℝ≥0∞} (hq : 1 ≤ q) (s : ℝ) + (f : Lp ℂ p (volume : Measure (UnitAddTorus d))) : + ∀ᵐ x ∂(volume.restrict (periodBox 0)), + lqNorm q (fun j => dyadicWeight s j * ‖blockFun j f (proj x)‖ₑ) ≤ + b.blockByLocalMeansConst L L' * ENNReal.almostDiagonalConst s L' * + lqNorm q (fun i => Rd.maximal (fun y => dyadicWeight s i * + ‖econv (b.kernel L i) f (proj y)‖ₑ) x) := by + filter_upwards [enorm_blockFun_proj_le_tsum_maximal b hL hL' hp f] with x hx + refine (ENNReal.lqNorm_le_almostDiagonalConst_mul_of_le hq s L' hx).trans_eq ?_ + simp only [Rd.dyadicWeight_mul_maximal] + +/-- **The local means by blocks in `ℓ_q` on the torus**: for every order `L`, `1 ≤ p < ∞`, +`1 ≤ q ≤ ∞`, `s ∈ ℝ` and `f ∈ L_p(𝕋^d)`, for almost every `x ∈ P_0`, +`‖(2^(js) |k_j ⋆ f(π x)|)_j‖_{ℓ_q} ≤ C A_{s,L} ‖(M(2^(is) |ψ_i ⋆ f| ∘ π)(x))_i‖_{ℓ_q}` with +`C = Rd.LocalMeansBump.localMeansByBlockConst L` and `A_{s,L} = ENNReal.almostDiagonalConst s L`. -/ +theorem lqNorm_econv_kernel_proj_le_lqNorm_maximal (L : ℕ) (hp : p ≠ ∞) {q : ℝ≥0∞} + (hq : 1 ≤ q) (s : ℝ) (f : Lp ℂ p (volume : Measure (UnitAddTorus d))) : + ∀ᵐ x ∂(volume.restrict (periodBox 0)), + lqNorm q (fun j => dyadicWeight s j * ‖econv (b.kernel L j) f (proj x)‖ₑ) ≤ + b.localMeansByBlockConst L * ENNReal.almostDiagonalConst s L * + lqNorm q (fun i => Rd.maximal (fun y => dyadicWeight s i * + ‖blockFun i f (proj y)‖ₑ) x) := by + filter_upwards [enorm_econv_kernel_proj_le_tsum_maximal b L hp f] with x hx + refine (ENNReal.lqNorm_le_almostDiagonalConst_mul_of_le hq s L hx).trans_eq ?_ + simp only [Rd.dyadicWeight_mul_maximal] + +omit [Fact (1 ≤ p)] in +/-- **From pointwise maximal bounds on the lift to `L_p(ℓ_q)` on the torus**: for `1 < p < ∞` +and `1 < q ≤ ∞`, if `F(π x) ≤ C ‖(M(g_i ∘ π)(x))_i‖_{ℓ_q}` for almost every `x ∈ P_0`, with +almost everywhere measurable `F` and `g_i` on `𝕋^d`, then +`‖F‖_p ≤ C C_P ‖ t ↦ ‖(g_i(t))_i‖_{ℓ_q} ‖_p` with `C_P = Torus.periodicFSConst d p q`. -/ +theorem eLpNorm_le_of_le_lqNorm_maximal_proj (hp1 : 1 < p) (hp : p ≠ ∞) {q : ℝ≥0∞} + (hq1 : 1 < q) {F : UnitAddTorus d → ℝ≥0∞} (hF : AEMeasurable F volume) + {g : ℕ → UnitAddTorus d → ℝ≥0∞} (hg : ∀ i, AEMeasurable (g i) volume) {C : ℝ≥0∞} + (h : ∀ᵐ x ∂(volume.restrict (periodBox 0)), + F (proj x) ≤ C * lqNorm q (fun i => Rd.maximal (fun y => g i (proj y)) x)) : + eLpNorm F p volume ≤ + C * periodicFSConst d p q * eLpNorm (fun t => lqNorm q (fun i => g i t)) p volume := by + have hmp := measurePreserving_proj_periodBox (d := d) 0 + calc eLpNorm F p volume = eLpNorm (F ∘ proj) p (volume.restrict (periodBox 0)) := + (eLpNorm_comp_proj_periodBox 0 hF.aestronglyMeasurable p).symm + _ ≤ eLpNorm (fun x => C * lqNorm q (fun i => Rd.maximal (fun y => g i (proj y)) x)) p + (volume.restrict (periodBox 0)) := + eLpNorm_mono_eNorm_ae + (hF.comp_quasiMeasurePreserving hmp.quasiMeasurePreserving).aestronglyMeasurable + (h.mono fun x hx => by simpa only [eNorm_eq_self, Function.comp_apply] using hx) + _ = C * eLpNorm (fun x => lqNorm q (fun i => Rd.maximal (fun y => g i (proj y)) x)) p + (volume.restrict (periodBox 0)) := + eLpNorm_const_mul_ennreal (c := C) + (measurable_lqNorm_comp (fun i => Rd.measurable_maximal _) q).aestronglyMeasurable + _ ≤ C * (periodicFSConst d p q * eLpNorm (fun t => lqNorm q (fun i => g i t)) p volume) := by + gcongr + exact feffermanStein_periodic hp1 hp hq1 g hg + _ = _ := by rw [mul_assoc] + +/-! ### The characterisation -/ + +/-- The constant `C A_{s,L'} C_P` of the bound of the Triebel–Lizorkin quasi-norm on the torus by +local means, with `L' = ⌈s⌉₊ + 1`: `C = Rd.LocalMeansBump.blockByLocalMeansConst L L'`, +`A_{s,L'} = ENNReal.almostDiagonalConst s L'` and `C_P = Torus.periodicFSConst d p q`. -/ +noncomputable def tlUpperConst (L : ℕ) (p q : ℝ≥0∞) (s : ℝ) : ℝ≥0∞ := + b.blockByLocalMeansConst L (⌈s⌉₊ + 1) * ENNReal.almostDiagonalConst s ((⌈s⌉₊ + 1 : ℕ) : ℝ) * + periodicFSConst d p q + +/-- The constant of the bound of the Triebel–Lizorkin quasi-norm on the torus by local means is +finite for `1 < p < ∞`, `1 < q ≤ ∞` and `s > 0`. -/ +theorem tlUpperConst_ne_top (L : ℕ) {p q : ℝ≥0∞} (hp1 : 1 < p) (hp : p ≠ ∞) (hq1 : 1 < q) + {s : ℝ} (hs : 0 < s) : tlUpperConst b L p q s ≠ ∞ := + ENNReal.mul_ne_top (ENNReal.mul_ne_top (b.blockByLocalMeansConst_ne_top L _) + (ENNReal.almostDiagonalConst_ne_top hs + (by push_cast; exact (Nat.le_ceil s).trans_lt (lt_add_one _)))) + (periodicFSConst_ne_top hp1 hp hq1) + +/-- The constant `C A_{s,L} C_P` of the bound of the local means on the torus by the +Triebel–Lizorkin quasi-norm: `C = Rd.LocalMeansBump.localMeansByBlockConst L`, +`A_{s,L} = ENNReal.almostDiagonalConst s L` and `C_P = Torus.periodicFSConst d p q`. -/ +noncomputable def tlLowerConst (L : ℕ) (p q : ℝ≥0∞) (s : ℝ) : ℝ≥0∞ := + b.localMeansByBlockConst L * ENNReal.almostDiagonalConst s L * periodicFSConst d p q + +/-- The constant of the bound of the local means on the torus by the Triebel–Lizorkin quasi-norm +is finite for `1 < p < ∞`, `1 < q ≤ ∞` and `0 < s < L`. -/ +theorem tlLowerConst_ne_top {L : ℕ} {p q : ℝ≥0∞} (hp1 : 1 < p) (hp : p ≠ ∞) (hq1 : 1 < q) + {s : ℝ} (hs : 0 < s) (hsL : s < L) : tlLowerConst b L p q s ≠ ∞ := + ENNReal.mul_ne_top (ENNReal.mul_ne_top (b.localMeansByBlockConst_ne_top L) + (ENNReal.almostDiagonalConst_ne_top hs hsL)) (periodicFSConst_ne_top hp1 hp hq1) + +/-- **The Triebel–Lizorkin quasi-norm on the torus by local means**: for `L ≥ 1`, `1 < p < ∞`, +`1 < q ≤ ∞`, `s ∈ ℝ` and `f ∈ L_p(𝕋^d)`, `‖f‖_{F^s_{p,q}} ≤ C ‖f‖_{F^s_{p,q}}^{b,L}` with +`C = Torus.tlUpperConst b L p q s`, finite for `s > 0`. -/ +theorem triebelLizorkinNorm_le_tlLocalMeansNorm {L : ℕ} (hL : 1 ≤ L) (hp1 : 1 < p) + (hp : p ≠ ∞) {q : ℝ≥0∞} (hq1 : 1 < q) (s : ℝ) + (f : Lp ℂ p (volume : Measure (UnitAddTorus d))) : + triebelLizorkinNorm s q f ≤ tlUpperConst b L p q s * tlLocalMeansNorm b L s q f := + eLpNorm_le_of_le_lqNorm_maximal_proj hp1 hp hq1 (aemeasurable_lqNorm_blockFun s q f) + (fun i => aemeasurable_dyadicWeight_mul_econv_kernel b L s i f) + (lqNorm_blockFun_proj_le_lqNorm_maximal b hL (Nat.le_add_left 1 _) hp hq1.le s f) + +/-- **The local means on the torus by the Triebel–Lizorkin quasi-norm**: for every order `L`, +`1 < p < ∞`, `1 < q ≤ ∞`, `s ∈ ℝ` and `f ∈ L_p(𝕋^d)`, +`‖f‖_{F^s_{p,q}}^{b,L} ≤ C ‖f‖_{F^s_{p,q}}` with `C = Torus.tlLowerConst b L p q s`, finite for +`0 < s < L`. -/ +theorem tlLocalMeansNorm_le_triebelLizorkinNorm (L : ℕ) (hp1 : 1 < p) (hp : p ≠ ∞) + {q : ℝ≥0∞} (hq1 : 1 < q) (s : ℝ) (f : Lp ℂ p (volume : Measure (UnitAddTorus d))) : + tlLocalMeansNorm b L s q f ≤ tlLowerConst b L p q s * triebelLizorkinNorm s q f := + eLpNorm_le_of_le_lqNorm_maximal_proj hp1 hp hq1 (aemeasurable_lqNorm_econv_kernel b L s q f) + (fun i => (aestronglyMeasurable_blockFun i f).eNorm.const_mul _) + (lqNorm_econv_kernel_proj_le_lqNorm_maximal b L hp hq1.le s f) + +/-- **The local means characterisation of Triebel–Lizorkin spaces on the torus**: for a bump +`b` on `ℝ^d`, an order `L`, `1 < p < ∞`, `1 < q ≤ ∞` and `0 < s < L`, `f ∈ F^s_{p,q}(𝕋^d)` +iff `‖f‖_{F^s_{p,q}}^{b,L} < ∞`. The order satisfies `L ≥ 1` since `0 < s < L`. -/ +theorem memTriebelLizorkin_iff_tlLocalMeans {L : ℕ} (hp1 : 1 < p) (hp : p ≠ ∞) + {q : ℝ≥0∞} (hq1 : 1 < q) {s : ℝ} (hs : 0 < s) (hsL : s < L) + {f : Lp ℂ p (volume : Measure (UnitAddTorus d))} : + MemTriebelLizorkin s q f ↔ tlLocalMeansNorm b L s q f < ∞ := + have hL : 1 ≤ L := Nat.cast_pos.1 (hs.trans hsL) + ⟨fun h => (tlLocalMeansNorm_le_triebelLizorkinNorm b L hp1 hp hq1 s f).trans_lt + (ENNReal.mul_lt_top (tlLowerConst_ne_top b hp1 hp hq1 hs hsL).lt_top h), + fun h => (triebelLizorkinNorm_le_tlLocalMeansNorm b hL hp1 hp hq1 s f).trans_lt + (ENNReal.mul_lt_top (tlUpperConst_ne_top b L hp1 hp hq1 hs).lt_top h)⟩ + +end Torus diff --git a/LeanPool/FunctionSpaces/Torus/TrigPolynomials.lean b/LeanPool/FunctionSpaces/Torus/TrigPolynomials.lean new file mode 100644 index 0000000000..85cffaee4f --- /dev/null +++ b/LeanPool/FunctionSpaces/Torus/TrigPolynomials.lean @@ -0,0 +1,236 @@ +/- +Copyright (c) 2026 Mario Ullrich. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Mario Ullrich +-/ +module + +public import LeanPool.FunctionSpaces.MeasureSpaces.Scheme +public import LeanPool.FunctionSpaces.ApproximationSpaces.Error +public import LeanPool.FunctionSpaces.Torus.HaarMeasure +public import Mathlib.Algebra.Algebra.Operations +public import Mathlib.Data.Int.Interval +public import Mathlib.Analysis.Fourier.AddCircleMulti +public import Mathlib.Topology.ContinuousMap.Compact + +/- +Modified for Lean Pool: module names and imports adapted. +-/ + +/-! +# Trigonometric polynomials on the torus + +On the torus `𝕋^d = UnitAddTorus d` the **trigonometric monomial** of frequency `k ∈ ℤ^d` is +`e_k(x) = exp(2πi ⟨k, x⟩)` (Mathlib's `UnitAddTorus.mFourier k`), here as a bounded continuous +function `Torus.trigMonomial k`. The **degree** of a frequency is `deg k = max_i |k_i|`, and + +`trigPoly n = span_ℂ {e_k : deg k < n}` + +is the space of trigonometric polynomials of degree `< n` (`Torus.trigPoly`). It contains the +constants for `n ≥ 1` and is `{0}` for `n = 0`; this strict-degree convention makes the +spaces an approximation scheme, `Torus.trigScheme d`. A linear map that sends the monomials of +degree `< n` into `trigPoly n` maps `trigPoly n` into `trigPoly n` (`Torus.map_mem_trigPoly`). + +The frequencies of degree `< n` form the box `boxLt n ⊆ ℤ^d` with at most `(2n)^d` elements +(`card_boxLt_le`). Since `e_k e_l = e_{k+l}` and `deg (k + l) ≤ deg k + deg l`, products of +trigonometric polynomials are trigonometric polynomials, `trigPoly m · trigPoly n ⊆ +trigPoly (m + n)`, and `T ∈ trigPoly n` has `T^m ∈ trigPoly (m n)` +(`pow_mem_trigPoly`). This is what the proof of the Nikolskii inequality uses. + +The trigonometric polynomials are dense in the bounded continuous functions for the sup norm +(`Torus.dense_iUnion_trigPoly`, from Mathlib's `span_mFourier_closure_eq_top`), so the errors of +best uniform approximation tend to `0` (`Torus.tendsto_approxError_trigScheme`). +-/ + +@[expose] public section + +open MeasureTheory UnitAddTorus +open scoped ENNReal BoundedContinuousFunction TorusHaar Pointwise + +namespace Torus + +variable {d : Type*} [Fintype d] + +/-- The **degree** `max_i |k_i|` of a frequency `k ∈ ℤ^d`. -/ +def deg (k : d → ℤ) : ℕ := Finset.univ.sup fun i => (k i).natAbs + +/-- `|k_i| ≤ deg k`. -/ +theorem natAbs_le_deg (k : d → ℤ) (i : d) : (k i).natAbs ≤ deg k := + Finset.le_sup (f := fun i => (k i).natAbs) (Finset.mem_univ i) + +/-- `deg k ≤ n` iff `|k_i| ≤ n` for every `i`. -/ +theorem deg_le_iff {k : d → ℤ} {n : ℕ} : deg k ≤ n ↔ ∀ i, (k i).natAbs ≤ n := by + simp [deg, Finset.sup_le_iff] + +/-- `deg (k + l) ≤ deg k + deg l`. -/ +theorem deg_add_le (k l : d → ℤ) : deg (k + l) ≤ deg k + deg l := + deg_le_iff.2 fun i => (Int.natAbs_add_le _ _).trans + (add_le_add (natAbs_le_deg k i) (natAbs_le_deg l i)) + +/-- `deg 0 = 0`. -/ +@[simp] +theorem deg_zero : deg (0 : d → ℤ) = 0 := by simp [deg] + +variable (d) in +open Classical in +/-- The **frequencies of degree `< n`**. -/ +noncomputable def boxLt (n : ℕ) : Finset (d → ℤ) := + (Fintype.piFinset fun _ => Finset.Ioo (-(n : ℤ)) n).filter fun k => deg k < n + +/-- `k` lies in the box of size `n` iff `deg k < n`. -/ +theorem mem_boxLt {n : ℕ} {k : d → ℤ} : k ∈ boxLt d n ↔ deg k < n := by + simp only [boxLt, Finset.mem_filter, Fintype.mem_piFinset, Finset.mem_Ioo] + refine ⟨fun h => h.2, fun h => ⟨fun i => ?_, h⟩⟩ + have := (natAbs_le_deg k i).trans_lt h + omega + +/-- The box of size `0` is empty. -/ +@[simp] +theorem boxLt_zero : boxLt d 0 = ∅ := by + ext k; simp [mem_boxLt] + +/-- The boxes increase with `n`. -/ +theorem boxLt_mono : Monotone (boxLt d) := fun _ _ h _ hk => + mem_boxLt.2 ((mem_boxLt.1 hk).trans_le h) + +/-- There are at most `(2n)^d` frequencies of degree `< n`. -/ +theorem card_boxLt_le (n : ℕ) : (boxLt d n).card ≤ (2 * n) ^ Fintype.card d := by + classical + calc (boxLt d n).card ≤ (Fintype.piFinset fun _ : d => Finset.Ioo (-(n : ℤ)) n).card := + Finset.card_filter_le _ _ + _ = ∏ _i : d, (Finset.Ioo (-(n : ℤ)) n).card := Fintype.card_piFinset _ + _ = (Finset.Ioo (-(n : ℤ)) n).card ^ Fintype.card d := by + rw [Finset.prod_const, Finset.card_univ] + _ ≤ (2 * n) ^ Fintype.card d := by + gcongr + rw [Int.card_Ioo] + omega + +/-- The **trigonometric monomial** `e_k(x) = exp(2πi ⟨k, x⟩)`, as a bounded continuous +function on the torus. -/ +noncomputable def trigMonomial (k : d → ℤ) : UnitAddTorus d →ᵇ ℂ := + BoundedContinuousFunction.mkOfCompact (mFourier k) + +/-- The monomial `e_k` as a bounded continuous function is Mathlib's `mFourier k`. -/ +@[simp] +theorem trigMonomial_apply (k : d → ℤ) (x : UnitAddTorus d) : trigMonomial k x = mFourier k x := + rfl + +/-- `e_{k+l} = e_k e_l`. -/ +theorem trigMonomial_add (k l : d → ℤ) : + trigMonomial (k + l) = trigMonomial k * trigMonomial l := by + ext x; simp [mFourier_add] + +/-- `e_0 = 1`. -/ +@[simp] +theorem trigMonomial_zero : trigMonomial (0 : d → ℤ) = 1 := by + ext x; simp [mFourier_zero] + +/-- A trigonometric monomial has modulus `1` everywhere. -/ +theorem norm_trigMonomial_apply (k : d → ℤ) (x : UnitAddTorus d) : ‖trigMonomial k x‖ = 1 := by + simp [mFourier, norm_prod, fourier_apply, Circle.norm_coe] + +variable (d) in +/-- The **trigonometric polynomials of degree `< n`**, `span_ℂ {e_k : deg k < n}`. -/ +noncomputable def trigPoly (n : ℕ) : Submodule ℂ (UnitAddTorus d →ᵇ ℂ) := + Submodule.span ℂ (trigMonomial '' (boxLt d n : Set (d → ℤ))) + +/-- There are no nonzero trigonometric polynomials of degree `< 0`. -/ +@[simp] +theorem trigPoly_zero : trigPoly d 0 = ⊥ := by simp [trigPoly] + +/-- The spaces of trigonometric polynomials increase with the degree. -/ +theorem trigPoly_mono : Monotone (trigPoly d) := fun _ _ h => + Submodule.span_mono (Set.image_mono (by exact_mod_cast boxLt_mono h)) + +/-- `e_k` has degree `< n` when `deg k < n`. -/ +theorem trigMonomial_mem_trigPoly {n : ℕ} {k : d → ℤ} (hk : deg k < n) : + trigMonomial k ∈ trigPoly d n := + Submodule.subset_span ⟨k, by simpa using mem_boxLt.2 hk, rfl⟩ + +/-- **Linear maps of trigonometric polynomials**: a linear map that sends every monomial `e_k` of +degree `< m` to a trigonometric polynomial of degree `< m` maps every trigonometric polynomial of +degree `< m` to one of degree `< m`, since these polynomials are the span of the monomials +(Mathlib's `Submodule.span_le`). -/ +theorem map_mem_trigPoly {ι κ : Type*} [Fintype ι] [Fintype κ] + (L : (UnitAddTorus ι →ᵇ ℂ) →ₗ[ℂ] (UnitAddTorus κ →ᵇ ℂ)) {m : ℕ} + (hL : ∀ k : ι → ℤ, deg k < m → L (trigMonomial k) ∈ trigPoly κ m) + {a : UnitAddTorus ι →ᵇ ℂ} (ha : a ∈ trigPoly ι m) : L a ∈ trigPoly κ m := + (Submodule.span_le (p := (trigPoly κ m).comap L)).2 + (by rintro _ ⟨k, hk, rfl⟩; exact hL k (mem_boxLt.1 hk)) ha + +/-- **Products of trigonometric polynomials**: degrees `< m` and `< n` give degree `< m + n`. -/ +theorem trigPoly_mul_le (m n : ℕ) : trigPoly d m * trigPoly d n ≤ trigPoly d (m + n) := by + rw [trigPoly, trigPoly, Submodule.span_mul_span] + apply Submodule.span_mono + rintro _ ⟨_, ⟨k, hk, rfl⟩, _, ⟨l, hl, rfl⟩, rfl⟩ + refine ⟨k + l, ?_, trigMonomial_add k l⟩ + have hk' := mem_boxLt.1 (by simpa using hk) + have hl' := mem_boxLt.1 (by simpa using hl) + simpa using mem_boxLt.2 ((deg_add_le k l).trans_lt (by omega)) + +/-- The product of polynomials of degree `< m` and `< n` has degree `< m + n`. -/ +theorem mul_mem_trigPoly {m n : ℕ} {S T : UnitAddTorus d →ᵇ ℂ} (hS : S ∈ trigPoly d m) + (hT : T ∈ trigPoly d n) : S * T ∈ trigPoly d (m + n) := + trigPoly_mul_le m n (Submodule.mul_mem_mul hS hT) + +/-- **Powers of trigonometric polynomials**: `T` of degree `< n` gives `T^(m+1)` of degree +`< (m+1) n`. -/ +theorem pow_mem_trigPoly {n : ℕ} {T : UnitAddTorus d →ᵇ ℂ} (hT : T ∈ trigPoly d n) (m : ℕ) : + T ^ (m + 1) ∈ trigPoly d ((m + 1) * n) := by + induction m with + | zero => simpa using hT + | succ m ih => + rw [pow_succ, show (m + 1 + 1) * n = (m + 1) * n + n by ring] + exact mul_mem_trigPoly ih hT + +variable (d) in +/-- The **scheme of trigonometric polynomials** on `𝕋^d`: `A n` is the space of trigonometric +polynomials of degree `< n`. -/ +noncomputable def trigScheme : FunctionScheme (UnitAddTorus d) := + ApproximationScheme.ofSubmodules (fun n => (trigPoly d n).restrictScalars ℝ) + (by simp) (fun _ _ h => trigPoly_mono h) + +/-- The approximants of the trigonometric scheme are the trigonometric polynomials. -/ +@[simp] +theorem mem_trigScheme {n : ℕ} {T : UnitAddTorus d →ᵇ ℂ} : + T ∈ trigScheme d n ↔ T ∈ trigPoly d n := Iff.rfl + +section UniformDensity + +open Filter Topology + +/-! ### Uniform density of the trigonometric polynomials -/ + +/-- Every element of the span of the characters `e_k` in `C(𝕋^d)`, viewed as a bounded continuous +function, is a trigonometric polynomial of some degree: the image of the span lies in the +supremum `⨆ n, 𝒯_n` of the spaces of trigonometric polynomials. -/ +theorem map_span_mFourier_le_iSup_trigPoly : + (Submodule.span ℂ (Set.range (mFourier (d := d)))).map + (ContinuousMap.linearIsometryBoundedOfCompact (UnitAddTorus d) ℂ ℂ).toLinearMap ≤ + ⨆ n, trigPoly d n := by + rw [Submodule.map_span, Submodule.span_le] + rintro _ ⟨_, ⟨k, rfl⟩, rfl⟩ + exact Submodule.mem_iSup_of_mem (deg k + 1) (trigMonomial_mem_trigPoly (Nat.lt_succ_self _)) + +/-- **The trigonometric polynomials are uniformly dense** in the bounded continuous functions on +`𝕋^d`: the image of Mathlib's dense span of the characters (`span_mFourier_closure_eq_top`) under +the isometry `C(𝕋^d) ≅ (𝕋^d →ᵇ ℂ)`. -/ +theorem dense_iUnion_trigPoly : Dense (⋃ n, (trigPoly d n : Set (UnitAddTorus d →ᵇ ℂ))) := by + let L := ContinuousMap.linearIsometryBoundedOfCompact (UnitAddTorus d) ℂ ℂ + have hS : Dense (Submodule.span ℂ (Set.range (mFourier (d := d))) : + Set C(UnitAddTorus d, ℂ)) := + Submodule.dense_iff_topologicalClosure_eq_top.2 span_mFourier_closure_eq_top + rw [← Submodule.coe_iSup_of_directed _ trigPoly_mono.directed_le] + exact (L.surjective.denseRange.dense_image L.continuous hS).mono + map_span_mFourier_le_iSup_trigPoly + +/-- The errors of best uniform approximation by trigonometric polynomials of degree `< n` tend +to `0`. -/ +theorem tendsto_approxError_trigScheme (f : UnitAddTorus d →ᵇ ℂ) : + Tendsto ((trigScheme d).approxError f) atTop (𝓝 0) := + (ApproximationScheme.tendsto_approxError_zero_iff f).2 (dense_iUnion_trigPoly f) + +end UniformDensity + +end Torus diff --git a/LeanPool/FunctionSpaces/Torus/WeakDerivatives.lean b/LeanPool/FunctionSpaces/Torus/WeakDerivatives.lean new file mode 100644 index 0000000000..9ec68d4012 --- /dev/null +++ b/LeanPool/FunctionSpaces/Torus/WeakDerivatives.lean @@ -0,0 +1,204 @@ +/- +Copyright (c) 2026 Mario Ullrich. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Mario Ullrich +-/ +module + +public import LeanPool.FunctionSpaces.Torus.Coefficients + +/- +Modified for Lean Pool: module names and imports adapted. +-/ + +/-! +# Weak derivatives on the torus and `W^m_2(𝕋^d)` + +For a multi-index `α ∈ ℕ^d`, the derivative `∂^α` multiplies the Fourier coefficients by the +**symbol** `(2πi k)^α = ∏ᵢ (2πi kᵢ)^(αᵢ)` (`Torus.derivSymbol`). So `g ∈ L_p` is the **weak +derivative** `∂^α f` of `f ∈ L_p` (`Torus.HasWeakDeriv`) if + +`ĝ(k) = (2πi k)^α f̂(k)` for all `k ∈ ℤ^d`. + +This is the distributional definition `∫ g φ = (-1)^|α| ∫ f ∂^α φ`, tested against the +trigonometric monomials `φ = e_{-k}`, whose span is dense. For `1 ≤ p ≤ ∞` the weak derivative +`∂^α f` is the distributional derivative of the periodic lift `f ∘ π` on `ℝ^d` +(`Torus.hasWeakDeriv_iff_comp_proj`). The **Sobolev space** +`W^m_p(𝕋^d)`, `m ∈ ℕ`, consists of the `f ∈ L_p` all of whose weak derivatives of order +`|α| ≤ m` lie in `L_p` (`Torus.MemSobolev`). The definitions are for every exponent `p`; the +theorems below, apart from `Torus.hasWeakDeriv_zero`, are for `p = 2`. +`FunctionSpaces.Torus.LpWeakDerivatives` develops the calculus for `1 ≤ p ≤ ∞`. + +**Coincidence** (`Torus.memSobolev_iff`, `Torus.memSobolev_iff_memBesov`): + +`W^m_2(𝕋^d) = H^m(𝕋^d) = B^m_{2,2}(𝕋^d)` (`m ≥ 1` for the Besov space), + +because the symbols of order `≤ m` and the weight `(1 + max_i |k_i|)^m` dominate each other: +`|(2πi k)^α| ≤ (2π)^m (1 + max_i |k_i|)^m` for `|α| ≤ m` (`Torus.norm_derivSymbol_le`), and +`(1 + max_i |k_i|)^m ≤ 2^m (1 + ∑_j |k_j|^m)`, where `|k_j|^m` is at most the symbol of +`∂_j^m` (`Torus.one_add_deg_pow_le`). For functions with `C^1` lifts the classical derivatives +are the weak derivatives (`Torus.hasWeakLineDeriv_of_contDiff`). +-/ + +@[expose] public section + +open MeasureTheory UnitAddTorus +open scoped ENNReal TorusHaar lp Real + +namespace Torus + +variable {d : Type*} [Fintype d] + +/-- The **symbol** `(2πi k)^α = ∏ᵢ (2πi kᵢ)^(αᵢ)` of the derivative `∂^α`. -/ +noncomputable def derivSymbol (α : d → ℕ) (k : d → ℤ) : ℂ := + ∏ i, (2 * π * Complex.I * (k i : ℂ)) ^ α i + +/-- `|2πi a| = 2π |a|` for an integer `a`. -/ +theorem norm_two_pi_I_mul_intCast (a : ℤ) : + ‖2 * π * Complex.I * (a : ℂ)‖ = 2 * π * |(a : ℝ)| := by + rw [norm_mul, norm_mul, norm_mul, Complex.norm_I, Complex.norm_intCast, Complex.norm_real, + Real.norm_eq_abs, abs_of_pos Real.pi_pos, Complex.norm_ofNat, mul_one] + +/-- `|(2πi k)^α| = ∏ᵢ (2π |kᵢ|)^(αᵢ)`. -/ +theorem norm_derivSymbol (α : d → ℕ) (k : d → ℤ) : + ‖derivSymbol α k‖ = ∏ i, (2 * π * |(k i : ℝ)|) ^ α i := by + simp only [derivSymbol, norm_prod, norm_pow, norm_two_pi_I_mul_intCast] + +/-- The symbol of order `0` is `1`. -/ +@[simp] +theorem derivSymbol_zero (k : d → ℤ) : derivSymbol 0 k = 1 := by + simp [derivSymbol] + +/-- The symbol of `∂_j^m` is `(2πi k_j)^m`. -/ +theorem derivSymbol_single [DecidableEq d] (j : d) (m : ℕ) (k : d → ℤ) : + derivSymbol (Pi.single j m) k = (2 * π * Complex.I * (k j : ℂ)) ^ m := by + rw [derivSymbol, Fintype.prod_eq_single j fun i hi => by simp [hi]] + simp + +/-- `1 ≤ 2π`. -/ +theorem one_le_two_pi : (1 : ℝ) ≤ 2 * π := by + have := Real.one_le_pi_div_two; linarith + +/-- `|kᵢ| ≤ 1 + max_j |k_j|`. -/ +theorem abs_le_one_add_deg (k : d → ℤ) (i : d) : |(k i : ℝ)| ≤ 1 + deg k := by + have h : ((k i).natAbs : ℝ) ≤ deg k := by exact_mod_cast natAbs_le_deg k i + have he : ((k i).natAbs : ℝ) = |(k i : ℝ)| := by rw [Nat.cast_natAbs, Int.cast_abs] + linarith + +/-- **Symbols of order `≤ m` are dominated by the Sobolev weight**: +`|(2πi k)^α| ≤ (2π)^m (1 + max_i |k_i|)^m` for `|α| ≤ m`. -/ +theorem norm_derivSymbol_le {m : ℕ} {α : d → ℕ} (hα : ∑ i, α i ≤ m) (k : d → ℤ) : + ‖derivSymbol α k‖ ≤ (2 * π) ^ m * (1 + deg k : ℝ) ^ m := by + have hx : (1 : ℝ) ≤ 2 * π * (1 + deg k) := by + have : (1 : ℝ) ≤ 1 + deg k := by have := (deg k).cast_nonneg (α := ℝ); linarith + nlinarith [one_le_two_pi] + rw [norm_derivSymbol, ← mul_pow] + calc ∏ i, (2 * π * |(k i : ℝ)|) ^ α i ≤ ∏ i, (2 * π * (1 + deg k)) ^ α i := by + refine Finset.prod_le_prod₀ (fun i _ => by positivity) fun i _ => ?_ + gcongr + exact abs_le_one_add_deg k i + _ = (2 * π * (1 + deg k)) ^ ∑ i, α i := Finset.prod_pow_eq_pow_sum _ _ _ + _ ≤ (2 * π * (1 + deg k)) ^ m := pow_le_pow_right₀ hx hα + +/-- **The Sobolev weight is dominated by symbols**: `(1 + max_i |k_i|)^m ≤ 2^m (1 + ∑_j |k_j|^m)`, +and `|k_j|^m ≤ |(2πi k_j)^m|` is the symbol of `∂_j^m`. -/ +theorem one_add_deg_pow_le [DecidableEq d] (m : ℕ) (k : d → ℤ) : + (1 + deg k : ℝ) ^ m ≤ + 2 ^ m * (‖derivSymbol 0 k‖ + ∑ j, ‖derivSymbol (Pi.single j m) k‖) := by + have hsym : ∀ j, |(k j : ℝ)| ^ m ≤ ‖derivSymbol (Pi.single j m) k‖ := fun j => by + rw [derivSymbol_single, norm_pow, norm_two_pi_I_mul_intCast, mul_pow] + exact le_mul_of_one_le_left (by positivity) (one_le_pow₀ one_le_two_pi) + rw [derivSymbol_zero, norm_one] + rcases (Finset.univ : Finset d).eq_empty_or_nonempty with he | hne + · have h0 : deg k = 0 := by simp [deg, he] + rw [h0, Nat.cast_zero, add_zero, one_pow] + have : (0 : ℝ) ≤ ∑ j, ‖derivSymbol (Pi.single j m) k‖ := by positivity + nlinarith [one_le_pow₀ (M₀ := ℝ) one_le_two (n := m)] + · obtain ⟨j, -, hj⟩ := Finset.exists_mem_eq_sup _ hne fun i => (k i).natAbs + have hdeg : (deg k : ℝ) = |(k j : ℝ)| := by + rw [deg, hj, ← Int.cast_abs, ← Int.natCast_natAbs, Int.cast_natCast] + refine (one_add_pow_le_two_pow_mul (Nat.cast_nonneg _) m).trans ?_ + gcongr + rw [hdeg] + exact (hsym j).trans + (Finset.single_le_sum (f := fun j => ‖derivSymbol (Pi.single j m) k‖) + (fun _ _ => norm_nonneg _) (Finset.mem_univ j)) + +/-- `g ∈ L_p(𝕋^d)` is the **weak derivative** `∂^α f` of `f ∈ L_p(𝕋^d)`: +`ĝ(k) = (2πi k)^α f̂(k)` for all `k ∈ ℤ^d`. The definition is meant for `1 ≤ p ≤ ∞`, where every +element of `L_p(𝕋^d)` is integrable and its coefficients are integrals. -/ +def HasWeakDeriv {p : ℝ≥0∞} (α : d → ℕ) (f g : Lp ℂ p (volume : Measure (UnitAddTorus d))) : + Prop := + ∀ k : d → ℤ, mFourierCoeff g k = derivSymbol α k * mFourierCoeff f k + +/-- `f ∈ W^m_p(𝕋^d)`: every weak derivative `∂^α f` of order `|α| ≤ m` lies in `L_p`. The +definition is meant for `1 ≤ p ≤ ∞`, where every element of `L_p(𝕋^d)` is integrable and its +coefficients are integrals. -/ +def MemSobolev {p : ℝ≥0∞} (m : ℕ) (f : Lp ℂ p (volume : Measure (UnitAddTorus d))) : Prop := + ∀ α : d → ℕ, ∑ i, α i ≤ m → ∃ g, HasWeakDeriv α f g + +/-- `f ∈ L_p(𝕋^d)` is its own derivative of order `0`. -/ +theorem hasWeakDeriv_zero {p : ℝ≥0∞} (f : Lp ℂ p (volume : Measure (UnitAddTorus d))) : + HasWeakDeriv 0 f f := fun k => by rw [derivSymbol_zero, one_mul] + +/-- A weak derivative exists as soon as the multiplied coefficients are square-summable: it is +the `L_2` function with these coefficients. -/ +theorem exists_hasWeakDeriv {α : d → ℕ} {f : Lp ℂ 2 (volume : Measure (UnitAddTorus d))} + (h : Memℓp (fun k => derivSymbol α k * mFourierCoeff f k) 2) : ∃ g, HasWeakDeriv α f g := by + refine ⟨mFourierBasis.repr.symm ⟨_, h⟩, fun k => ?_⟩ + rw [← mFourierBasis_repr, LinearIsometryEquiv.apply_symm_apply] + +/-- The coefficients of a weak derivative are square-summable. -/ +theorem HasWeakDeriv.mem_l2 {α : d → ℕ} {f g : Lp ℂ 2 (volume : Measure (UnitAddTorus d))} + (hg : HasWeakDeriv α f g) : Memℓp (fun k => derivSymbol α k * mFourierCoeff f k) 2 := by + have h := lp.memℓp (mFourierBasis.repr g) + convert h using 1 + funext k + rw [mFourierBasis_repr, hg k] + +/-- **`W^m_2(𝕋^d) = H^m(𝕋^d)`**: all weak derivatives of order `≤ m` lie in `L_2` iff +`∑_k (1 + max_i |k_i|)^(2m) |f̂(k)|² < ∞`. -/ +theorem memSobolev_iff (m : ℕ) (f : Lp ℂ 2 (volume : Measure (UnitAddTorus d))) : + MemSobolev m f ↔ + Memℓp (fun k => ((((1 + deg k : ℕ) : ℝ) ^ (m : ℝ) : ℝ) : ℂ) * mFourierCoeff f k) 2 := by + classical + have hw : ∀ k : d → ℤ, ‖((((1 + deg k : ℕ) : ℝ) ^ (m : ℝ) : ℝ) : ℂ) * mFourierCoeff f k‖ = + (1 + deg k : ℝ) ^ m * ‖mFourierCoeff f k‖ := fun k => by + rw [norm_mul, Complex.norm_real, Real.rpow_natCast, Real.norm_eq_abs, abs_of_nonneg + (by positivity)] + push_cast + rfl + constructor + · intro hf + -- the coefficient sequences of `f` and of the derivatives `∂_j^m f` dominate the weight + have h0 := (hf 0 (by simp)).choose_spec.mem_l2 + have hj : ∀ j, Memℓp (fun k => derivSymbol (Pi.single j m) k * mFourierCoeff f k) 2 := + fun j => (hf _ (by simp [Finset.sum_pi_single'])).choose_spec.mem_l2 + have hdom : Memℓp (fun k => 2 ^ m * (‖derivSymbol 0 k * mFourierCoeff f k‖ + + ∑ j, ‖derivSymbol (Pi.single j m) k * mFourierCoeff f k‖)) 2 := + ((memℓp_norm_iff.2 h0).add (Memℓp.finsetSum _ fun j _ => memℓp_norm_iff.2 (hj j))).const_mul + _ + refine hdom.mono fun k => ?_ + rw [hw k] + simp only [norm_mul, ← Finset.sum_mul, ← add_mul, ← mul_assoc] + exact mul_le_mul_of_nonneg_right (one_add_deg_pow_le m k) (norm_nonneg _) + · intro hf α hα + refine exists_hasWeakDeriv (((memℓp_norm_iff.2 hf).const_mul ((2 * π) ^ m)).mono fun k => ?_) + rw [norm_mul, hw k, ← mul_assoc] + exact mul_le_mul_of_nonneg_right (norm_derivSymbol_le hα k) (norm_nonneg _) + +/-- **`W^m_2(𝕋^d) = B^m_{2,2}(𝕋^d)`** for `m ≥ 1`: the classical Sobolev space through weak +derivatives is the Besov space of the trigonometric polynomials. -/ +theorem memSobolev_iff_memBesov {m : ℕ} (hm : 1 ≤ m) + (f : Lp ℂ 2 (volume : Measure (UnitAddTorus d))) : + MemSobolev m f ↔ (trigScheme d).MemBesov volume 2 m 2 f := by + rw [memSobolev_iff, memBesov_two_two_iff (by exact_mod_cast hm)] + +/-- **`W^m_2(𝕋^d)` is the range of the Sobolev embedding** for `m ≥ 1`, the Sobolev space +`H^m(𝕋^d)` of the approximation theory. -/ +theorem memSobolev_iff_mem_range {m : ℕ} (hm : 1 ≤ m) + (f : Lp ℂ 2 (volume : Measure (UnitAddTorus d))) : + MemSobolev m f ↔ f ∈ Set.range (sobolevSpace (d := d) m (by exact_mod_cast hm)).incl := by + rw [memSobolev_iff, mem_range_sobolev_iff] + +end Torus diff --git a/LeanPool/FunctionSpaces/Wavelets/DyadicNormalisation.lean b/LeanPool/FunctionSpaces/Wavelets/DyadicNormalisation.lean new file mode 100644 index 0000000000..e83802f112 --- /dev/null +++ b/LeanPool/FunctionSpaces/Wavelets/DyadicNormalisation.lean @@ -0,0 +1,42 @@ +/- +Copyright (c) 2026 Mario Ullrich. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Mario Ullrich +-/ +module + +public import LeanPool.FunctionSpaces.ApproximationSpaces.Sequences.Lq +public import Mathlib.Analysis.Complex.Norm +public import Mathlib.Analysis.SpecialFunctions.Pow.NNReal + +/- +Modified for Lean Pool: module names and imports adapted. +-/ + +/-! +# The normalising factor `2^(j/2)` of dyadic dilations + +Haar functions, multiwavelets and Daubechies wavelets of level `j` carry the factor `2^(j/2)`, +which makes the dilation `g ↦ 2^(j/2) g(2^j ·)` an isometry of `L_2`. As a complex number its +square is `2^j` (`ofReal_two_rpow_half_mul_self`), and its extended norm is the dyadic weight +`2^(j/2)` (`enorm_two_rpow_half`). +-/ + +@[expose] public section + +open scoped ENNReal + +/-- **The square of the normalising factor**: `2^(j/2) · 2^(j/2) = 2^j` for every `j ∈ ℕ`, as +complex numbers (Mathlib's `Real.rpow_add` and `add_halves`). -/ +theorem ofReal_two_rpow_half_mul_self (j : ℕ) : + (((2 : ℝ) ^ ((j : ℝ) / 2) : ℝ) : ℂ) * (((2 : ℝ) ^ ((j : ℝ) / 2) : ℝ) : ℂ) = (2 : ℂ) ^ j := by + rw [← Complex.ofReal_mul, ← Real.rpow_add two_pos, add_halves, Real.rpow_natCast] + push_cast + rfl + +/-- **The normalising factor in extended norm**: `‖2^(j/2)‖ = 2^(j/2)` for every `j ∈ ℕ`, written +as the dyadic weight `ENNReal.dyadicWeight (1/2) j`. -/ +theorem enorm_two_rpow_half (j : ℕ) : + ‖(((2 : ℝ) ^ ((j : ℝ) / 2) : ℝ) : ℂ)‖ₑ = ENNReal.dyadicWeight (1 / 2) j := by + rw [← ofReal_norm, Complex.norm_real, Real.norm_of_nonneg (by positivity), + ← ENNReal.ofReal_rpow_of_pos two_pos, ENNReal.ofReal_ofNat, ENNReal.dyadicWeight, mul_one_div] diff --git a/LeanPool/FunctionSpaces/Wavelets/Examples/Daubechies/Bernstein.lean b/LeanPool/FunctionSpaces/Wavelets/Examples/Daubechies/Bernstein.lean new file mode 100644 index 0000000000..4b0061a1e7 --- /dev/null +++ b/LeanPool/FunctionSpaces/Wavelets/Examples/Daubechies/Bernstein.lean @@ -0,0 +1,369 @@ +/- +Copyright (c) 2026 Mario Ullrich. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Mario Ullrich +-/ +module + +public import LeanPool.FunctionSpaces.Wavelets.Examples.Daubechies.HolderRegularity +public import LeanPool.FunctionSpaces.Wavelets.Examples.Daubechies.MatrixMethodD4 +public import LeanPool.FunctionSpaces.Wavelets.Examples.Daubechies.Projections + +/- +Modified for Lean Pool: module names and imports adapted. +-/ + +/-! +# The Bernstein inequality for the Daubechies scaling spaces + +For a Daubechies mask of order `N ≥ 2` with scaling function `φ` (`Daubechies.scalingFun`) and +`1 ≤ p < ∞`, let `V_j ⊆ L_p(ℝ)` be the scaling space of level `j` (`Daubechies.scalingSpace`), +the range of the projection `P_j f = ∑_k ⟨f, φ_{j,k}⟩ φ_{j,k}` with +`φ_{j,k}(x) = 2^(j/2) φ(2^j x - k)`. This file proves the inverse inequality of the Daubechies +scheme: the moduli of smoothness `ω_r(f, t)_p = sup_{|h| ≤ t} ‖Δ_h^r f‖_p` (`Rd.modulus`) of the +elements of `V_j` are controlled by those of `φ`. Here `Δ_h f(x) = f(x + h) - f(x)` is Mathlib's +`fwdDiff h f` and `Δ_h^r = (fwdDiff h)^[r]` its `r`-fold iterate. + +* **Differences of expansions.** Differences commute with dilation and translation: + `Δ_h^r g_{j,k} = (Δ_{2^j h}^r g)_{j,k}` for `g_{j,k}(x) = 2^(j/2) g(2^j x - k)` + (`Daubechies.iterate_fwdDiff_scaledFun`). Hence, for a generator `g` vanishing outside a bounded + interval, `Δ_h^r ∑_k c_k g_{j,k} = ∑_k c_k (Δ_{2^j h}^r g)_{j,k}` at every point + (`Daubechies.iterate_fwdDiff_expand`). +* **The Bernstein inequality.** For `a ∈ V_j` and `2^j t ≤ 1`, + `ω_r(a, t)_p ≤ C ω_r(φ, 2^j t)_p ‖a‖_p` with `C = (2N + 2r)^(1 - 1/p) (2N)^(1/p) ‖φ‖_{p'}` + independent of `j`, `a` and `t` (`Daubechies.modulus_mem_scalingSpace_le`, + `Daubechies.bernsteinConst`). The element `a` is the expansion `∑_k λ_k φ_{j,k}` of its + coefficients `λ_k = ⟨a, φ_{j,k}⟩`, so `Δ_h^r a = ∑_k λ_k (Δ_{2^j h}^r φ)_{j,k}`. For + `|2^j h| ≤ 1` the generator `Δ_{2^j h}^r φ` vanishes outside `[-r, 2N - 1 + r]`, and the upper + stability of the expansions and the coefficient estimate of + `FunctionSpaces.Wavelets.Examples.Daubechies.Expansion` give + `‖Δ_h^r a‖_p ≤ (2N + 2r)^(1 - 1/p) ‖Δ_{2^j h}^r φ‖_p 2^(j(1/2 - 1/p)) ‖λ‖_{ℓ_p}` + `≤ C ‖Δ_{2^j h}^r φ‖_p ‖a‖_p`. +* **Bernstein bounds.** A Bernstein bound of order `θ` is a bound `ω_r(φ, t)_p ≤ K t^θ` for + `0 < t ≤ 1` with a finite constant `K` (`Daubechies.BernsteinBound`). The regularity theorems + for `φ` provide them: for `p ≤ 2` of every order `s < N - log₄ λ` under a growth bound + `T^n 1 ≤ C λ^n` for the transfer operator (`Daubechies.bernsteinBound_of_le_two`), for `p ≥ 2` + of the interpolated order `(2/p) s + (1 - 2/p) a` with a Hölder exponent `a` of `φ` + (`Daubechies.bernsteinBound_interp`, `Daubechies.bernsteinBound_interp_of_holder`), and + explicitly for the orders two and three (`Daubechies.bernsteinBound_order_two`, + `Daubechies.bernsteinBound_order_three`) and for D4 with its Hölder exponent + `2 - log₂(1 + √3)` (`Daubechies.bernsteinBound_d4`). +* **The inverse inequality of the scheme.** Under a Bernstein bound of order `θ`, every + approximant `a` of complexity `2^j` of the Daubechies scheme satisfies + `ω_r(a, 2^(-k))_p ≤ C_B 2^(-(k-j)θ) ‖a‖_p` for all `k`, with `k - j` truncated at `0` + (`Daubechies.inverse_scheme`): for `k ≥ j` by the Bernstein inequality at `t = 2^(-k)` and the + bound `ω_r(φ, 2^(-(k-j)))_p ≤ K 2^(-(k-j)θ)`, for `k < j` by `ω_r(a, t)_p ≤ 2^r ‖a‖_p`. This is + the inverse inequality of `ApproximationScheme.ModulusData`. +-/ + +@[expose] public section + +open MeasureTheory +open scoped ENNReal Real +open ENNReal (dyadicWeight) + +namespace Daubechies + +/-! ### Differences of expansions -/ + +section Generic + +variable {g : ℝ → ℂ} {a b : ℝ} + +/-- **Differences commute with dilation and translation**: for every `g : ℝ → ℂ`, level `j`, +position `k` and step `h`, `Δ_h g_{j,k} = (Δ_{2^j h} g)_{j,k}`, that is +`g_{j,k}(x + h) - g_{j,k}(x) = 2^(j/2) (g(2^j x - k + 2^j h) - g(2^j x - k))`, since +`2^j (x + h) - k = (2^j x - k) + 2^j h`. -/ +theorem fwdDiff_scaledFun (g : ℝ → ℂ) (j : ℕ) (k : ℤ) (h : ℝ) : + fwdDiff h (scaledFun g j k) = scaledFun (fwdDiff (2 ^ j * h) g) j k := by + funext x + simp only [fwdDiff, scaledFun] + rw [← mul_sub, show (2 : ℝ) ^ j * (x + h) - k = 2 ^ j * x - k + 2 ^ j * h by ring] + +/-- **Higher differences commute with dilation and translation**: for every `g : ℝ → ℂ`, order +`r`, level `j`, position `k` and step `h`, `Δ_h^r g_{j,k} = (Δ_{2^j h}^r g)_{j,k}`; that is, `Δ_h^r` +maps `x ↦ 2^(j/2) g(2^j x - k)` to `x ↦ 2^(j/2) (Δ_{2^j h}^r g)(2^j x - k)`. By induction on `r` +from `Daubechies.fwdDiff_scaledFun`. -/ +theorem iterate_fwdDiff_scaledFun (g : ℝ → ℂ) (r j : ℕ) (k : ℤ) (h : ℝ) : + (fwdDiff h)^[r] (scaledFun g j k) = scaledFun ((fwdDiff (2 ^ j * h))^[r] g) j k := by + induction r with + | zero => rfl + | succ r ih => + rw [Function.iterate_succ_apply', ih, fwdDiff_scaledFun, + ← Function.iterate_succ_apply' (fwdDiff (2 ^ j * h)) r g] + +/-- **A difference of an expansion**: if `g` vanishes outside `[a, b]`, then for every level `j`, +all coefficients `c : ℤ → ℂ` and every step `h`, +`Δ_h (∑_k c_k g_{j,k}) = ∑_k c_k (Δ_{2^j h} g)_{j,k}` at every point. At each point only finitely +many terms are nonzero (`Daubechies.summable_expand`), so the difference may be taken termwise +(`Daubechies.fwdDiff_scaledFun`). -/ +theorem fwdDiff_expand (hsupp : ∀ x ∉ Set.Icc a b, g x = 0) (j : ℕ) (c : ℤ → ℂ) (h : ℝ) : + fwdDiff h (expand g j c) = expand (fwdDiff (2 ^ j * h) g) j c := by + funext x + change expand g j c (x + h) - expand g j c x = _ + simp only [expand] + rw [← (summable_expand hsupp j c (x + h)).tsum_sub (summable_expand hsupp j c x)] + refine tsum_congr fun k => ?_ + rw [← mul_sub] + exact congrArg (c k * ·) (congrFun (fwdDiff_scaledFun g j k h) x) + +/-- **Higher differences of an expansion**: if `g` vanishes outside `[a, b]`, then for every +order `r`, level `j`, all coefficients `c : ℤ → ℂ` and every step `h`, +`Δ_h^r (∑_k c_k g_{j,k}) = ∑_k c_k (Δ_{2^j h}^r g)_{j,k}` at every point. By induction on `r` +from `Daubechies.fwdDiff_expand`; each generator `Δ_{2^j h}^i g` vanishes outside a bounded +interval (`Daubechies.iterate_fwdDiff_eq_zero_of_notMem`). -/ +theorem iterate_fwdDiff_expand (hsupp : ∀ x ∉ Set.Icc a b, g x = 0) (r j : ℕ) (c : ℤ → ℂ) + (h : ℝ) : (fwdDiff h)^[r] (expand g j c) = expand ((fwdDiff (2 ^ j * h))^[r] g) j c := by + induction r with + | zero => rfl + | succ r ih => + rw [Function.iterate_succ_apply', ih, + fwdDiff_expand (fun x hx => iterate_fwdDiff_eq_zero_of_notMem hsupp r (2 ^ j * h) hx), + ← Function.iterate_succ_apply' (fwdDiff (2 ^ j * h)) r g] + +end Generic + +/-! ### The Bernstein inequality for the scaling spaces -/ + +variable {N : ℕ} (m : Mask N) + +/-- **The overlap number of the differences of `φ`**: for `N ≥ 1` and every `r ∈ ℕ`, the interval +`[-r, 2N - 1 + r]`, outside which the differences `Δ_H^r φ` with `|H| ≤ 1` vanish +(`Daubechies.higherDiff_scalingFun_eq_zero`), has the overlap number +`⌈(2N - 1 + r) - (-r)⌉ + 1 = 2N + 2r` of the upper estimate of expansions +(`Daubechies.eLpNorm_expand_le`). -/ +theorem natCeil_higherDiff_support_add_one (hN : 1 ≤ N) (r : ℕ) : + ⌈(2 * N - 1 + r : ℝ) - -(r : ℝ)⌉₊ + 1 = 2 * N + 2 * r := by + have h : (2 * N - 1 + r : ℝ) - -(r : ℝ) = ((2 * N - 1 + 2 * r : ℕ) : ℝ) := by + rw [Nat.cast_add, Nat.cast_sub (by omega)] + push_cast + ring + rw [h, Nat.ceil_natCast] + omega + +/-- **The constant of the Bernstein inequality**: `(2N + 2r)^(1 - 1/p) (2N)^(1/p) ‖φ‖_{p'}` with +the conjugate exponent `p'`. The first factor is the overlap factor of the upper estimate of +expansions (`Daubechies.eLpNorm_expand_le`) for the generators `Δ_H^r φ`, `|H| ≤ 1`, which vanish +outside `[-r, 2N - 1 + r]` (`Daubechies.natCeil_higherDiff_support_add_one`); the second is the +constant of the coefficient estimate (`Daubechies.coeffConst` for `φ` and its support +`[0, 2N - 1]`). It is the same for every level and every scale. -/ +noncomputable def bernsteinConst (p : ℝ≥0∞) (r : ℕ) : ℝ≥0∞ := + ((2 * N + 2 * r : ℕ) : ℝ≥0∞) ^ (1 - 1 / p.toReal) * coeffConst (scalingFun m) 0 (2 * N - 1) p + +/-- The constant of the Bernstein inequality is finite for `N ≥ 2`, since `φ` lies in every +`L_p` (`Daubechies.coeffConst_ne_top`). -/ +theorem bernsteinConst_ne_top (hN : 2 ≤ N) (p : ℝ≥0∞) (r : ℕ) : bernsteinConst m p r ≠ ∞ := + ENNReal.mul_ne_top (ENNReal.rpow_ne_top_of_ne_zero (Nat.cast_ne_zero.2 (by omega)) + (ENNReal.natCast_ne_top _)) (coeffConst_ne_top _ _ (memLp_scalingFun m hN _)) + +section Lp + +variable {p : ℝ≥0∞} [Fact (1 ≤ p)] + +/-- **The Bernstein inequality for the scaling spaces**: for `N ≥ 2`, `1 ≤ p < ∞`, every order +`r`, every level `j`, every `a ∈ V_j` (`Daubechies.scalingSpace`) and every `t` with `2^j t ≤ 1`, +`ω_r(a, t)_p ≤ C ω_r(φ, 2^j t)_p ‖a‖_p` with the constant `C = Daubechies.bernsteinConst m p r`, +which is finite (`Daubechies.bernsteinConst_ne_top`) and independent of `j`, `a` and `t`. + +The element `a` is almost everywhere the expansion `∑_k λ_k φ_{j,k}` of its coefficients +`λ_k = ⟨a, φ_{j,k}⟩` (`Daubechies.proj_eq_self_of_mem`), so for `|h| ≤ t`, +`Δ_h^r a = ∑_k λ_k (Δ_{2^j h}^r φ)_{j,k}` (`Daubechies.iterate_fwdDiff_expand`). As `|2^j h| ≤ 1`, +the generator `Δ_{2^j h}^r φ` vanishes outside `[-r, 2N - 1 + r]` +(`Daubechies.higherDiff_scalingFun_eq_zero`), and the upper estimate of expansions +(`Daubechies.eLpNorm_expand_le`) and the coefficient estimate +(`Daubechies.dyadicWeight_mul_lqNorm_coeffFun_le`) give +`‖Δ_h^r a‖_p ≤ (2N + 2r)^(1 - 1/p) ‖Δ_{2^j h}^r φ‖_p 2^(j(1/2 - 1/p)) ‖λ‖_{ℓ_p}` +`≤ C ‖Δ_{2^j h}^r φ‖_p ‖a‖_p`, where the dyadic weights cancel. -/ +theorem modulus_mem_scalingSpace_le (hN : 2 ≤ N) (hp : p ≠ ∞) (r : ℕ) {j : ℕ} + {a : Lp ℂ p (volume : Measure ℝ)} (ha : a ∈ scalingSpace m p hN hp j) {t : ℝ} + (ht : 2 ^ j * t ≤ 1) : + Rd.modulus volume r p (a : ℝ → ℂ) t ≤ + bernsteinConst m p r * Rd.modulus volume r p (scalingFun m) (2 ^ j * t) * ‖a‖ₑ := by + have hae : (a : ℝ → ℂ) =ᵐ[volume] projFun m j a := by + have h := proj_apply_ae m hN hp j a + rwa [proj_eq_self_of_mem m hN hp ha] at h + rw [Rd.modulus_congr_ae hae] + refine iSup₂_le fun h hh => ?_ + have h2 : (0 : ℝ) < 2 ^ j := by positivity + have hHt : ‖(2 : ℝ) ^ j * h‖ ≤ 2 ^ j * t := by + rw [norm_mul, Real.norm_of_nonneg h2.le] + exact mul_le_mul_of_nonneg_left hh h2.le + have hH : |(2 : ℝ) ^ j * h| ≤ 1 := (Real.norm_eq_abs _ ▸ hHt).trans ht + have hexp := eLpNorm_expand_le + (continuous_iterate_fwdDiff (continuous_scalingFun m hN) r + ((2 : ℝ) ^ j * h)).aestronglyMeasurable + (fun x hx => higherDiff_scalingFun_eq_zero m hN r hH hx) (Fact.out : 1 ≤ p) hp j + (coeffFun (scalingFun m) j a) + have hcoef := dyadicWeight_mul_lqNorm_coeffFun_le + (continuous_scalingFun m hN).aestronglyMeasurable (fun _ hx => scalingFun_eq_zero m hN hx) + (Fact.out : 1 ≤ p) hp (Lp.aestronglyMeasurable a) j + rw [natCeil_higherDiff_support_add_one (by omega)] at hexp + rw [projFun, iterate_fwdDiff_expand (fun _ hx => scalingFun_eq_zero m hN hx)] + calc eLpNorm (expand ((fwdDiff (2 ^ j * h))^[r] (scalingFun m)) j + (coeffFun (scalingFun m) j a)) p volume + ≤ ((2 * N + 2 * r : ℕ) : ℝ≥0∞) ^ (1 - 1 / p.toReal) * + eLpNorm ((fwdDiff (2 ^ j * h))^[r] (scalingFun m)) p volume * + (dyadicWeight (1 / 2 - 1 / p.toReal) j * + ENNReal.lqNorm p (fun k => ‖coeffFun (scalingFun m) j a k‖ₑ)) := by + rw [← mul_assoc] + exact hexp + _ ≤ ((2 * N + 2 * r : ℕ) : ℝ≥0∞) ^ (1 - 1 / p.toReal) * + Rd.modulus volume r p (scalingFun m) (2 ^ j * t) * + (coeffConst (scalingFun m) 0 (2 * N - 1) p * ‖a‖ₑ) := by + rw [Lp.eNorm_def] + exact mul_le_mul' (mul_le_mul_right (Rd.eLpNorm_higherDiff_le_modulus hHt) _) hcoef + _ = bernsteinConst m p r * Rd.modulus volume r p (scalingFun m) (2 ^ j * t) * ‖a‖ₑ := by + rw [bernsteinConst] + ring + +end Lp + +/-! ### Bernstein bounds for the scaling function -/ + +/-- **A Bernstein bound of order `θ`** for the scaling function `φ` in `L_p`, with differences +of order `r`: there is a finite constant `K` with `ω_r(φ, t)_p ≤ K t^θ` for all `0 < t ≤ 1`. +It is a hypothesis on the mask; the regularity theorems for `φ` prove it +(`Daubechies.bernsteinBound_of_le_two`, `Daubechies.bernsteinBound_interp`), for instance for +`N = 2` and `N = 3` with `p ≤ 2` and for D4 with `p ≥ 2` (`Daubechies.bernsteinBound_order_two`, +`Daubechies.bernsteinBound_order_three`, `Daubechies.bernsteinBound_d4`), and a Bernstein bound +gives the inverse inequality of the Daubechies scheme (`Daubechies.inverse_scheme`). -/ +def BernsteinBound (p : ℝ≥0∞) (θ : ℝ) (r : ℕ) : Prop := + ∃ K : ℝ≥0∞, K ≠ ∞ ∧ ∀ t ∈ Set.Ioc (0 : ℝ) 1, + Rd.modulus volume r p (scalingFun m) t ≤ K * ENNReal.ofReal (t ^ θ) + +/-- **Lower orders**: a Bernstein bound of order `θ` is one of every order `θ₁ ≤ θ`, since +`t^θ ≤ t^θ₁` for `0 < t ≤ 1`. -/ +theorem BernsteinBound.mono {p : ℝ≥0∞} {θ θ₁ : ℝ} {r : ℕ} (hB : BernsteinBound m p θ r) + (hθ : θ₁ ≤ θ) : BernsteinBound m p θ₁ r := by + obtain ⟨K, hK, hmod⟩ := hB + exact ⟨K, hK, fun t ht => (hmod t ht).trans (mul_le_mul_right + (ENNReal.ofReal_le_ofReal (Real.rpow_le_rpow_of_exponent_ge ht.1 ht.2 hθ)) K)⟩ + +/-- **Bernstein bounds for `p ≤ 2`**: let `N ≥ 2`, `p ≤ 2`, let `T^n 1 ≤ C λ^n` be a growth bound +for the transfer operator (`Daubechies.TransferGrowth`), and let `s ∈ ℝ`, `r ∈ ℕ` with +`0 ≤ s ≤ r` and `s < N - log₄ λ`. Then `φ` has a Bernstein bound of order `s` in `L_p` with +differences of order `r` (`Daubechies.modulus_scalingFun_le_two`). -/ +theorem bernsteinBound_of_le_two (hN : 2 ≤ N) {p : ℝ≥0∞} (hp2 : p ≤ 2) {lam C s : ℝ} {r : ℕ} + (hg : TransferGrowth N lam C) (hs0 : 0 ≤ s) (hs : s < N - Real.logb 4 lam) (hsr : s ≤ r) : + BernsteinBound m p s r := + modulus_scalingFun_le_two m hN hp2 hg hs0 hs hsr + +/-- **Bernstein bounds for `p ≥ 2`** (Fourier route): let `N ≥ 2`, `2 ≤ p ≤ ∞`, let +`T^n 1 ≤ C λ^n` be a growth bound for the transfer operator (`Daubechies.TransferGrowth`), and +let `s, a ∈ ℝ`, `r ∈ ℕ` with `0 ≤ s ≤ r`, `s < N - log₄ λ`, `0 ≤ a ≤ r` and +`a < N - log₄ λ - 1/2`. Then `φ` has a Bernstein bound of order `θ = (2/p) s + (1 - 2/p) a` in +`L_p` with differences of order `r` (`Daubechies.modulus_scalingFun_interp`). -/ +theorem bernsteinBound_interp (hN : 2 ≤ N) {p : ℝ≥0∞} (hp2 : 2 ≤ p) {lam C s a : ℝ} {r : ℕ} + (hg : TransferGrowth N lam C) (hs0 : 0 ≤ s) (hs : s < N - Real.logb 4 lam) (hsr : s ≤ r) + (ha0 : 0 ≤ a) (har : a ≤ r) (ha : a < N - Real.logb 4 lam - 1 / 2) : + BernsteinBound m p (2 / p.toReal * s + (1 - 2 / p.toReal) * a) r := + modulus_scalingFun_interp m hN hp2 hg hs0 hs hsr ha0 har ha + +/-- **Bernstein bounds for `p ≥ 2` from a Hölder estimate**: let `N ≥ 2`, `2 ≤ p ≤ ∞`, let +`T^n 1 ≤ C λ^n` be a growth bound for the transfer operator (`Daubechies.TransferGrowth`), let +`s ∈ ℝ` and an order `r ≥ 1` with `0 ≤ s ≤ r` and `s < N - log₄ λ`, and suppose +`|φ(x) - φ(y)| ≤ K₀ |x - y|^a` for all `x, y ∈ ℝ`, with `a ≥ 0`. Then `φ` has a Bernstein bound +of order `θ = (2/p) s + (1 - 2/p) a` in `L_p` with differences of order `r` +(`Daubechies.modulus_scalingFun_interp_of_holder`). -/ +theorem bernsteinBound_interp_of_holder (hN : 2 ≤ N) {p : ℝ≥0∞} (hp2 : 2 ≤ p) + {lam C s a K₀ : ℝ} {r : ℕ} (hr : 1 ≤ r) (hg : TransferGrowth N lam C) (hs0 : 0 ≤ s) + (hs : s < N - Real.logb 4 lam) (hsr : s ≤ r) (ha0 : 0 ≤ a) + (hK : ∀ x y : ℝ, ‖scalingFun m x - scalingFun m y‖ ≤ K₀ * |x - y| ^ a) : + BernsteinBound m p (2 / p.toReal * s + (1 - 2 / p.toReal) * a) r := + modulus_scalingFun_interp_of_holder m hN hp2 hr hg hs0 hs hsr ha0 hK + +/-- **Bernstein bounds of order two, `p ≤ 2`**: for every Daubechies mask of order `N = 2`, every +`p ≤ 2`, every real `s` with `0 ≤ s < 1` and every order `r ≥ s`, `φ` has a Bernstein bound of +order `s` in `L_p` with differences of order `r` +(`Daubechies.modulus_scalingFun_le_two_order_two`). -/ +theorem bernsteinBound_order_two (m : Mask 2) {p : ℝ≥0∞} (hp2 : p ≤ 2) {s : ℝ} {r : ℕ} + (hs0 : 0 ≤ s) (hs : s < 1) (hsr : s ≤ r) : BernsteinBound m p s r := + modulus_scalingFun_le_two_order_two m hp2 hs0 hs hsr + +/-- **Bernstein bounds of order three, `p ≤ 2`**: for every Daubechies mask of order `N = 3`, +every `p ≤ 2`, every real `s` with `0 ≤ s < 3 - log₂ 3 ≈ 1.415` and every order `r ≥ s`, `φ` has +a Bernstein bound of order `s` in `L_p` with differences of order `r` +(`Daubechies.modulus_scalingFun_le_two_order_three`). -/ +theorem bernsteinBound_order_three (m : Mask 3) {p : ℝ≥0∞} (hp2 : p ≤ 2) {s : ℝ} {r : ℕ} + (hs0 : 0 ≤ s) (hs : s < 3 - Real.logb 2 3) (hsr : s ≤ r) : BernsteinBound m p s r := + modulus_scalingFun_le_two_order_three m hp2 hs0 hs hsr + +/-- **Bernstein bounds for D4, `p ≥ 2`**: for the mask D4 (`Daubechies.d4`), every +`2 ≤ p ≤ ∞`, all real `s, a` with `0 ≤ s < 1` and `0 ≤ a ≤ 2 - log₂(1 + √3) ≈ 0.5500`, and every +order `r ≥ 1` with `s ≤ r`, `φ` has a Bernstein bound of order `θ = (2/p) s + (1 - 2/p) a` in +`L_p` with differences of order `r`. The Hölder estimate is the one of the matrix method +(`Daubechies.holder_d4`), the `L²` bound comes from the growth bound `T^n 1 ≤ 4^n` +(`Daubechies.transferGrowth_two`, exponent `2 - log₄ 4 = 1`), and +`Daubechies.bernsteinBound_interp_of_holder` interpolates. -/ +theorem bernsteinBound_d4 {p : ℝ≥0∞} (hp2 : 2 ≤ p) {s a : ℝ} {r : ℕ} (hr : 1 ≤ r) + (hs0 : 0 ≤ s) (hs : s < 1) (hsr : s ≤ r) (ha0 : 0 ≤ a) + (ha : a ≤ 2 - Real.logb 2 (1 + √3)) : + BernsteinBound d4 p (2 / p.toReal * s + (1 - 2 / p.toReal) * a) r := by + obtain ⟨K₀, hK⟩ := holder_d4 ha0 ha + exact bernsteinBound_interp_of_holder d4 le_rfl hp2 hr transferGrowth_two hs0 + (by rw [Nat.cast_ofNat, two_sub_logb_four_four]; exact hs) hsr ha0 hK + +/-! ### The inverse inequality of the Daubechies scheme -/ + +/-- **Dyadic scales of two levels**: `2^j 2^(-k) = 2^(-(k - j))` for `j ≤ k`. -/ +theorem two_pow_mul_one_div_two_pow {j k : ℕ} (hjk : j ≤ k) : + (2 : ℝ) ^ j * (1 / 2 ^ k) = 1 / 2 ^ (k - j) := by + obtain ⟨n, rfl⟩ := Nat.exists_eq_add_of_le hjk + rw [Nat.add_sub_cancel_left, pow_add] + field_simp + +section Lp + +variable {p : ℝ≥0∞} [Fact (1 ≤ p)] + +/-- **The modulus of an element of `V_j` at the dyadic scales `2^(-k)`, `k ≥ j`**: let `N ≥ 2`, +`1 ≤ p < ∞`, and let `ω_r(φ, t)_p ≤ K t^θ` for all `0 < t ≤ 1`. Then for all levels `j ≤ k` and +every `a ∈ V_j` (`Daubechies.scalingSpace`), `ω_r(a, 2^(-k))_p ≤ C K 2^(-(k-j)θ) ‖a‖_p` with +`C = Daubechies.bernsteinConst m p r`. This is the Bernstein inequality +`Daubechies.modulus_mem_scalingSpace_le` at `t = 2^(-k)`, where `2^j t = 2^(-(k-j)) ∈ (0, 1]`. -/ +theorem lpModulus_le_of_mem_scalingSpace (hN : 2 ≤ N) (hp : p ≠ ∞) {θ : ℝ} {r : ℕ} + {K : ℝ≥0∞} (hK : ∀ t ∈ Set.Ioc (0 : ℝ) 1, + Rd.modulus volume r p (scalingFun m) t ≤ K * ENNReal.ofReal (t ^ θ)) + {j k : ℕ} (hjk : j ≤ k) {a : Lp ℂ p (volume : Measure ℝ)} + (ha : a ∈ scalingSpace m p hN hp j) : + Rd.lpModulus p r a k ≤ bernsteinConst m p r * K * dyadicWeight (-θ) (k - j) * ‖a‖ₑ := by + have hmem : (2 : ℝ) ^ j * (1 / 2 ^ k) ∈ Set.Ioc (0 : ℝ) 1 := by + rw [two_pow_mul_one_div_two_pow hjk] + exact ⟨by positivity, (div_le_one (by positivity)).2 (one_le_pow₀ one_le_two)⟩ + calc Rd.lpModulus p r a k = Rd.modulus volume r p (a : ℝ → ℂ) (1 / 2 ^ k) := rfl + _ ≤ bernsteinConst m p r * Rd.modulus volume r p (scalingFun m) (2 ^ j * (1 / 2 ^ k)) * + ‖a‖ₑ := modulus_mem_scalingSpace_le m hN hp r ha hmem.2 + _ ≤ bernsteinConst m p r * (K * ENNReal.ofReal (((2 : ℝ) ^ j * (1 / 2 ^ k)) ^ θ)) * + ‖a‖ₑ := by + gcongr + exact hK _ hmem + _ = bernsteinConst m p r * K * dyadicWeight (-θ) (k - j) * ‖a‖ₑ := by + rw [two_pow_mul_one_div_two_pow hjk, ENNReal.ofReal_one_div_two_pow_rpow] + ring + +/-- **The inverse inequality of the Daubechies scheme** (Bernstein): let `N ≥ 2`, `1 ≤ p < ∞`, +and let `φ` have a Bernstein bound of order `θ` with differences of order `r` +(`Daubechies.BernsteinBound`). Then there is a finite constant `C_B` with +`ω_r(a, 2^(-k))_p ≤ C_B 2^(-(k-j)θ) ‖a‖_p` for all `j, k ∈ ℕ` and every approximant `a` of +complexity `2^j` of the Daubechies scheme (`Daubechies.scheme`; these are the elements of +`V_j`), where `k - j` is truncated at `0`. For `k ≥ j` this is +`Daubechies.lpModulus_le_of_mem_scalingSpace`; for `k < j` the weight is `1` and +`ω_r(a, t)_p ≤ 2^r ‖a‖_p` (`Rd.lpModulus_le`). This is the inverse inequality of +`ApproximationScheme.ModulusData` for the modulus `Rd.lpModulus p r`. -/ +theorem inverse_scheme (hN : 2 ≤ N) (hp : p ≠ ∞) {θ : ℝ} {r : ℕ} + (hB : BernsteinBound m p θ r) : + ∃ CB : ℝ≥0∞, CB ≠ ∞ ∧ ∀ j k : ℕ, ∀ a ∈ scheme m p hN hp (2 ^ j), + Rd.lpModulus p r a k ≤ CB * dyadicWeight (-θ) (k - j) * ‖a‖ₑ := by + obtain ⟨K, hK, hmod⟩ := hB + refine ⟨bernsteinConst m p r * K + 2 ^ r, + ENNReal.add_ne_top.2 ⟨ENNReal.mul_ne_top (bernsteinConst_ne_top m hN p r) hK, by simp⟩, + fun j k a ha => ?_⟩ + rcases lt_or_ge k j with hkj | hjk + · rw [Nat.sub_eq_zero_of_le hkj.le, ENNReal.dyadicWeight_zero_right, mul_one] + exact (Rd.lpModulus_le r a k).trans (by gcongr; exact le_add_self) + · exact (lpModulus_le_of_mem_scalingSpace m hN hp hmod hjk + ((mem_scheme_two_pow m).1 ha)).trans (by gcongr; exact le_self_add) + +end Lp + +end Daubechies diff --git a/LeanPool/FunctionSpaces/Wavelets/Examples/Daubechies/Besov.lean b/LeanPool/FunctionSpaces/Wavelets/Examples/Daubechies/Besov.lean new file mode 100644 index 0000000000..5bf4c09d92 --- /dev/null +++ b/LeanPool/FunctionSpaces/Wavelets/Examples/Daubechies/Besov.lean @@ -0,0 +1,375 @@ +/- +Copyright (c) 2026 Mario Ullrich. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Mario Ullrich +-/ +module + +public import LeanPool.FunctionSpaces.ApproximationSpaces.Moduli +public import LeanPool.FunctionSpaces.Rd.Differences.BesovDifferences +public import LeanPool.FunctionSpaces.Wavelets.Examples.Daubechies.Bernstein +public import LeanPool.FunctionSpaces.Wavelets.Examples.Daubechies.Jackson +public import LeanPool.FunctionSpaces.Wavelets.Examples.Daubechies.Wavelet + +/- +Modified for Lean Pool: module names and imports adapted. +-/ + +/-! +# Besov spaces by Daubechies coefficients + +For a Daubechies mask of order `N ≥ 2` with scaling function `φ` (`Daubechies.scalingFun`), +wavelet `ψ` (`Daubechies.wavelet`) and `1 ≤ p < ∞`, `1 ≤ q ≤ ∞`, this file characterises the +Besov spaces `B^s_{p,q}(ℝ)` by the coefficients `⟨f, φ(· - k)⟩` and `⟨f, ψ_{j,k}⟩`, where +`ψ_{j,k}(x) = 2^(j/2) ψ(2^j x - k)` and `⟨f, g⟩ = ∫ f(x) conj g(x) dx` +(`Daubechies.coeffFun`). With the **coefficient quasi-norm** + +`‖f‖_coef = ‖(⟨f, φ(· - k)⟩)_k‖_{ℓ_p} + ‖(2^(j(s + 1/2 - 1/p)) ‖(⟨f, ψ_{j,k}⟩)_k‖_{ℓ_p})_j‖_{ℓ_q}` + +(`Daubechies.coeffNorm`), the main theorem (`Daubechies.besov_iff_coeff`) reads: if `φ` has a +Bernstein bound `ω_N(φ, t)_p ≤ K t^θ` for `0 < t ≤ 1` (`Daubechies.BernsteinBound`), then for +`0 < s < θ` and every `f ∈ L_p(ℝ)` + +`‖f‖_p + ‖(2^(ks) ω_N(f, 2^(-k))_p)_k‖_{ℓ_q} < ∞ ⟺ ‖f‖_coef < ∞`. + +* **Approximation and moduli.** Jackson's inequality `E_{2^k}(f)_p ≤ C_J ω_N(f, 2^(-k))_p` + (`Daubechies.approxError_scheme_le`) and the inverse inequality + `ω_N(a, 2^(-k))_p ≤ C_B 2^(-(k-j)θ) ‖a‖_p` for `a ∈ V_j` (`Daubechies.inverse_scheme`) make + the modulus of smoothness compatible with the Daubechies scheme (`Daubechies.modulusData`), so + the coincidence theorem `ApproximationScheme.ModulusData.memApprox_iff_modNorm_lt_top` gives + `f ∈ A^s_q ⟺ ‖f‖_p + ‖(2^(ks) ω_N(f, 2^(-k))_p)_k‖_{ℓ_q} < ∞` for `0 ≤ s < θ` + (`Daubechies.memApprox_scheme_iff_modulus`). +* **Approximation and coefficients.** The projections `P_j` form a projection scheme with dense + union (`Daubechies.projectionScheme`, `Daubechies.closure_iUnion_scheme`), so `f ∈ A^s_q` iff + `‖P_0 f‖_p + ‖(2^(js) ‖P_{j+1} f - P_j f‖_p)_j‖_{ℓ_q} < ∞` for `s > 0` + (`ApproximationScheme.ProjectionScheme.memApprox_iff_blockNorm_lt_top`). The blocks are the + wavelet expansions of level `j` (`Daubechies.proj_succ_sub_proj`), and their norms are + comparable with `2^(j(1/2 - 1/p)) ‖(⟨f, ψ_{j,k}⟩)_k‖_{ℓ_p}` (`Daubechies.enorm_block_equiv`); + likewise `‖P_0 f‖_p` with `‖(⟨f, φ(· - k)⟩)_k‖_{ℓ_p}` (`Daubechies.enorm_proj_zero_equiv`). + Hence `f ∈ A^s_q ⟺ ‖f‖_coef < ∞` for `s > 0` (`Daubechies.memApprox_scheme_iff_coeff`). +* **Littlewood–Paley.** For `0 < s < min(θ, N)` the coefficient condition is also equivalent + to the finiteness of the Littlewood–Paley quasi-norm `‖(2^(js) ‖Δ_j f‖_p)_j‖_{ℓ_q}` + (`Daubechies.littlewoodPaleyNorm_lt_top_iff_coeff`, through + `Rd.littlewoodPaleyNorm_lt_top_iff_modulus`). +* **The regularity of `φ`.** Let `T^n 1 ≤ C λ^n` be a growth bound for the transfer operator + (`Daubechies.TransferGrowth`); then `λ ≥ 1` (`Daubechies.TransferGrowth.one_le_lam`). For + `p ≤ 2` the characterisation holds for `0 < s < N - log₄ λ` + (`Daubechies.besov_iff_coeff_of_le_two`); for `p ≥ 2` it holds for + `0 < s < (2/p) s' + (1 - 2/p) a` with `s' < N - log₄ λ` and either `a < N - log₄ λ - 1/2` + (`Daubechies.besov_iff_coeff_of_two_le`) or a Hölder exponent `a` of `φ` + (`Daubechies.besov_iff_coeff_of_two_le_of_holder`). +-/ + +@[expose] public section + +open Filter MeasureTheory Topology +open scoped ENNReal +open ENNReal (dyadicWeight) + +namespace Daubechies + +/-! ### Growth bounds for the transfer operator -/ + +/-- **The iterates of the transfer operator on `1` are at least `1`**: for `N ≥ 1`, every +`n ∈ ℕ` and every `ξ ∈ ℝ`, `(T^n 1)(ξ) ≥ 1`. By induction on `n`: since `P ≥ 1` +(`Daubechies.one_le_daubFun`), for `g ≥ 1` the first summand of +`(T g)(ξ) = P(ξ/2) g(ξ/2) + P((ξ + 1)/2) g((ξ + 1)/2)` is at least `1` and the second is +nonnegative. -/ +theorem one_le_iterate_transfer_one {N : ℕ} (hN : 1 ≤ N) (n : ℕ) (ξ : ℝ) : + 1 ≤ (transfer N)^[n] (fun _ => 1) ξ := by + induction n generalizing ξ with + | zero => exact le_rfl + | succ n ih => + rw [Function.iterate_succ_apply'] + have h1 : 1 ≤ daubFun N (ξ / 2) * (transfer N)^[n] (fun _ => 1) (ξ / 2) := + one_le_mul_of_one_le_of_one_le (one_le_daubFun hN _) (ih _) + have h2 : 0 ≤ daubFun N ((ξ + 1) / 2) * (transfer N)^[n] (fun _ => 1) ((ξ + 1) / 2) := + mul_nonneg (daubFun_nonneg N _) (iterate_transfer_one_nonneg N n _) + exact le_add_of_le_of_nonneg h1 h2 + +/-- **The rate of a growth bound is at least `1`**: for `N ≥ 1`, every growth bound +`T^n 1 ≤ C λ^n` for the transfer operator (`Daubechies.TransferGrowth`) has `λ ≥ 1`. Otherwise +`C λ^n → 0`, while `(T^n 1)(0) ≥ 1` for every `n` (`Daubechies.one_le_iterate_transfer_one`). -/ +theorem TransferGrowth.one_le_lam {N : ℕ} {lam C : ℝ} (hN : 1 ≤ N) + (hg : TransferGrowth N lam C) : 1 ≤ lam := by + by_contra h + push Not at h + have ht : Tendsto (fun n : ℕ => C * lam ^ n) atTop (𝓝 0) := by + simpa using (tendsto_pow_atTop_nhds_zero_of_lt_one hg.1.le h).const_mul C + obtain ⟨n, hn⟩ := (ht.eventually (gt_mem_nhds one_pos)).exists + linarith [hg.2 n 0, one_le_iterate_transfer_one hN n 0] + +/-- **The Sobolev exponent of a growth bound is at most `N`**: for `N ≥ 1` and every growth +bound `T^n 1 ≤ C λ^n` for the transfer operator, `N - log₄ λ ≤ N`, since `λ ≥ 1` +(`Daubechies.TransferGrowth.one_le_lam`). -/ +theorem TransferGrowth.sub_logb_le {N : ℕ} {lam C : ℝ} (hN : 1 ≤ N) + (hg : TransferGrowth N lam C) : (N : ℝ) - Real.logb 4 lam ≤ N := + sub_le_self _ (Real.logb_nonneg (by norm_num) (hg.one_le_lam hN)) + +variable {N : ℕ} (m : Mask N) + +/-! ### The coefficient quasi-norm -/ + +/-- **The Daubechies coefficient quasi-norm** of `f : ℝ → ℂ`, for the exponents `p, q` and the +smoothness `s`: +`‖(⟨f, φ(· - k)⟩)_k‖_{ℓ_p} + ‖(2^(j(s + 1/2 - 1/p)) ‖(⟨f, ψ_{j,k}⟩)_k‖_{ℓ_p})_j‖_{ℓ_q}`, with the +coefficients `⟨f, g_{j,k}⟩ = ∫ f(x) conj g_{j,k}(x) dx` (`Daubechies.coeffFun`) of the scaling +function `φ` at level `0` and of the wavelet `ψ` at the levels `j ∈ ℕ`. Its finiteness describes +`B^s_{p,q}(ℝ)` (`Daubechies.besov_iff_coeff`). -/ +noncomputable def coeffNorm (p : ℝ≥0∞) (s : ℝ) (q : ℝ≥0∞) (f : ℝ → ℂ) : ℝ≥0∞ := + ENNReal.lqNorm p (fun k : ℤ => ‖coeffFun (scalingFun m) 0 f k‖ₑ) + + ENNReal.lqNorm q (fun j => dyadicWeight (s + (1 / 2 - 1 / p.toReal)) j * + ENNReal.lqNorm p (fun k : ℤ => ‖coeffFun (wavelet m) j f k‖ₑ)) + +section Lp + +variable {p : ℝ≥0∞} [Fact (1 ≤ p)] + +/-! ### The modulus of smoothness and the Daubechies scheme -/ + +variable (p) in +/-- **The modulus of smoothness is compatible with the Daubechies scheme**: for `N ≥ 2`, +`1 ≤ p < ∞` and a Bernstein bound `ω_N(φ, t)_p ≤ K t^θ` for `0 < t ≤ 1` +(`Daubechies.BernsteinBound` with differences of order `N`), the modulus +`ω_N(f, 2^(-k))_p` (`Rd.lpModulus p N`) is compatible with the Daubechies scheme with inverse +order `θ` (`ApproximationScheme.ModulusData`). Jackson's inequality +`E_{2^k}(f)_p ≤ C_J ω_N(f, 2^(-k))_p` holds from level `0` on +(`Daubechies.approxError_scheme_le_jacksonConst_mul`), and the inverse inequality +`ω_N(a, 2^(-k))_p ≤ C_B 2^(-(k-j)θ) ‖a‖_p` for the approximants `a` of complexity `2^j` is +`Daubechies.inverse_scheme`. -/ +noncomputable def modulusData (hN : 2 ≤ N) (hp : p ≠ ∞) {θ : ℝ} (hB : BernsteinBound m p θ N) : + ApproximationScheme.ModulusData (scheme m p hN hp) θ where + modulus := Rd.lpModulus p N + add_le := Rd.lpModulus_add_le N + C0 := 2 ^ N + C0_ne_top := by simp + le_enorm := Rd.lpModulus_le N + jacksonStart := 0 + CJ := jacksonConst m p + CJ_ne_top := jacksonConst_ne_top m hN p + jackson f k _ := approxError_scheme_le_jacksonConst_mul m hN hp f k + CB := (inverse_scheme m hN hp hB).choose + CB_ne_top := (inverse_scheme m hN hp hB).choose_spec.1 + inverse := (inverse_scheme m hN hp hB).choose_spec.2 + +/-- **Approximation by the Daubechies scaling spaces and moduli of smoothness**: for `N ≥ 2`, +`1 ≤ p < ∞`, a Bernstein bound of order `θ` for `φ` with differences of order `N`, +`1 ≤ q ≤ ∞` and `0 ≤ s < θ`, an `f ∈ L_p(ℝ)` lies in the approximation space `A^s_q` of the +Daubechies scheme iff `‖f‖_p + ‖(2^(ks) ω_N(f, 2^(-k))_p)_k‖_{ℓ_q} < ∞`. This is the coincidence +theorem `ApproximationScheme.ModulusData.memApprox_iff_modNorm_lt_top` for +`Daubechies.modulusData`. -/ +theorem memApprox_scheme_iff_modulus (hN : 2 ≤ N) (hp : p ≠ ∞) {θ : ℝ} + (hB : BernsteinBound m p θ N) {s : ℝ} {q : ℝ≥0∞} (hq : 1 ≤ q) (hs : 0 ≤ s) (hsθ : s < θ) + (f : Lp ℂ p (volume : Measure ℝ)) : + (scheme m p hN hp).MemApprox s q f ↔ + ‖f‖ₑ + ENNReal.lqNorm q (fun k => dyadicWeight s k * Rd.lpModulus p N f k) < ∞ := + (modulusData m p hN hp hB).memApprox_iff_modNorm_lt_top hq hs hsθ f + +/-! ### Approximation and coefficients -/ + +/-- **The projection of complexity `1` of the Daubechies projection scheme is `P_0`**: the +case `k = 0` of `Daubechies.projectionScheme_two_pow`. -/ +theorem projectionScheme_one (hN : 2 ≤ N) (hp : p ≠ ∞) : + (projectionScheme m p hN hp).P 1 = proj m p hN hp 0 := by + simpa using projectionScheme_two_pow m hN hp 0 + +/-- **The dyadic blocks of the Daubechies projection scheme**: for every `f ∈ L_p` and level `j`, +the block `P(2^(j+1)) f - P(2^j) f` of the projection scheme is `P_{j+1} f - P_j f`, since the +projection of complexity `2^j` is `P_j` (`Daubechies.projectionScheme_two_pow`). -/ +theorem projectionScheme_block (hN : 2 ≤ N) (hp : p ≠ ∞) (j : ℕ) + (f : Lp ℂ p (volume : Measure ℝ)) : + (projectionScheme m p hN hp).block j f = proj m p hN hp (j + 1) f - proj m p hN hp j f := by + rw [ApproximationScheme.ProjectionScheme.block, projectionScheme_two_pow, + projectionScheme_two_pow] + +/-- **Approximation by the Daubechies scaling spaces through coefficients**: for `N ≥ 2`, +`1 ≤ p < ∞`, `s > 0` and `1 ≤ q ≤ ∞`, an `f ∈ L_p(ℝ)` lies in the approximation space `A^s_q` +of the Daubechies scheme iff its coefficient quasi-norm +`‖(⟨f, φ(· - k)⟩)_k‖_{ℓ_p} + ‖(2^(j(s + 1/2 - 1/p)) ‖(⟨f, ψ_{j,k}⟩)_k‖_{ℓ_p})_j‖_{ℓ_q}` +(`Daubechies.coeffNorm`) is finite. + +The projections form a projection scheme with dense union, so `f ∈ A^s_q` iff +`‖P_0 f‖_p + ‖(2^(js) ‖P_{j+1} f - P_j f‖_p)_j‖_{ℓ_q} < ∞` +(`ApproximationScheme.ProjectionScheme.memApprox_iff_blockNorm_lt_top`). The first summand +`‖P_0 f‖_p` and `‖(⟨f, φ(· - k)⟩)_k‖_{ℓ_p}` are both finite (`Daubechies.enorm_proj_zero_equiv`), +and +`2^(js) ‖P_{j+1} f - P_j f‖_p` is comparable with +`2^(j(s + 1/2 - 1/p)) ‖(⟨f, ψ_{j,k}⟩)_k‖_{ℓ_p}` uniformly in `j` (`Daubechies.enorm_block_equiv`), +so the two `ℓ_q` norms are finite together (`ENNReal.lqNorm_lt_top_iff_of_le_mul`). -/ +theorem memApprox_scheme_iff_coeff (hN : 2 ≤ N) (hp : p ≠ ∞) {s : ℝ} (hs : 0 < s) {q : ℝ≥0∞} + (hq : 1 ≤ q) (f : Lp ℂ p (volume : Measure ℝ)) : + (scheme m p hN hp).MemApprox s q f ↔ coeffNorm m p s q f < ∞ := by + obtain ⟨K₀, _, hK₀, _, hKM₀⟩ := enorm_proj_zero_equiv m hN hp + obtain ⟨K, M, hK, hM, hKM⟩ := enorm_block_equiv m hN hp + rw [(projectionScheme m p hN hp).memApprox_iff_blockNorm_lt_top + (closure_iUnion_scheme m hN hp) hs hq, ApproximationScheme.ProjectionScheme.blockNorm, + projectionScheme_one, coeffNorm] + simp only [projectionScheme_block, ENNReal.add_lt_top] + refine and_congr ⟨fun _ => (hKM₀ f).1.trans_lt (ENNReal.mul_lt_top hK₀.lt_top eNorm_lt_top), + fun _ => eNorm_lt_top⟩ + (ENNReal.lqNorm_lt_top_iff_of_le_mul hK hM (fun j => ?_) fun j => ?_) + · rw [ENNReal.dyadicWeight_add, mul_assoc, mul_left_comm M] + exact mul_le_mul' le_rfl (hKM f j).2 + · rw [ENNReal.dyadicWeight_add, mul_assoc, mul_left_comm K] + exact mul_le_mul' le_rfl (hKM f j).1 + +/-! ### Besov spaces by Daubechies coefficients -/ + +/-- **Besov spaces by Daubechies coefficients**: let `N ≥ 2`, `1 ≤ p < ∞`, `1 ≤ q ≤ ∞`, and let +`φ` have a Bernstein bound `ω_N(φ, t)_p ≤ K t^θ` for `0 < t ≤ 1` (`Daubechies.BernsteinBound`). +Then for `0 < s < θ` and every `f ∈ L_p(ℝ)`, +`‖f‖_p + ‖(2^(ks) ω_N(f, 2^(-k))_p)_k‖_{ℓ_q} < ∞` iff +`‖(⟨f, φ(· - k)⟩)_k‖_{ℓ_p} + ‖(2^(j(s + 1/2 - 1/p)) ‖(⟨f, ψ_{j,k}⟩)_k‖_{ℓ_p})_j‖_{ℓ_q} < ∞` +(`Daubechies.coeffNorm`). Both conditions describe the approximation space `A^s_q` of the +Daubechies scheme (`Daubechies.memApprox_scheme_iff_modulus`, +`Daubechies.memApprox_scheme_iff_coeff`). -/ +theorem besov_iff_coeff (hN : 2 ≤ N) (hp : p ≠ ∞) {θ : ℝ} (hB : BernsteinBound m p θ N) + {s : ℝ} (hs : 0 < s) (hsθ : s < θ) {q : ℝ≥0∞} (hq : 1 ≤ q) + (f : Lp ℂ p (volume : Measure ℝ)) : + ‖f‖ₑ + ENNReal.lqNorm q (fun k => dyadicWeight s k * Rd.lpModulus p N f k) < ∞ ↔ + coeffNorm m p s q f < ∞ := + (memApprox_scheme_iff_modulus m hN hp hB hq hs.le hsθ f).symm.trans + (memApprox_scheme_iff_coeff m hN hp hs hq f) + +/-- **Littlewood–Paley blocks and Daubechies coefficients**: let `N ≥ 2`, `1 ≤ p < ∞`, +`1 ≤ q ≤ ∞`, and let `φ` have a Bernstein bound of order `θ` with differences of order `N` +(`Daubechies.BernsteinBound`). Then for `0 < s` with `s < θ` and `s < N`, and every +`f ∈ L_p(ℝ)`, the Littlewood–Paley quasi-norm `‖(2^(js) ‖Δ_j f‖_p)_j‖_{ℓ_q}` with the +Littlewood–Paley blocks `Δ_j f` (`Rd.littlewoodPaleyNorm`, `Rd.lpBlock`) is finite iff the +coefficient quasi-norm +`‖(⟨f, φ(· - k)⟩)_k‖_{ℓ_p} + ‖(2^(j(s + 1/2 - 1/p)) ‖(⟨f, ψ_{j,k}⟩)_k‖_{ℓ_p})_j‖_{ℓ_q}` +(`Daubechies.coeffNorm`) is: both are equivalent to the finiteness of the Besov quasi-norm by +differences of order `N` (`Rd.littlewoodPaleyNorm_lt_top_iff_modulus`, +`Daubechies.besov_iff_coeff`). -/ +theorem littlewoodPaleyNorm_lt_top_iff_coeff (hN : 2 ≤ N) (hp : p ≠ ∞) {θ : ℝ} + (hB : BernsteinBound m p θ N) {s : ℝ} (hs : 0 < s) (hsθ : s < θ) (hsN : s < N) {q : ℝ≥0∞} + (hq : 1 ≤ q) (f : Lp ℂ p (volume : Measure ℝ)) : + Rd.littlewoodPaleyNorm hp s q f < ∞ ↔ coeffNorm m p s q f < ∞ := + (Rd.littlewoodPaleyNorm_lt_top_iff_modulus hp hs hsN hq f).trans + (besov_iff_coeff m hN hp hB hs hsθ hq f) + +end Lp + +/-! ### The regularity of the scaling function -/ + +/-- **Bernstein bounds above a given order, `p ≤ 2`**: let `N ≥ 2`, `p ≤ 2`, let `T^n 1 ≤ C λ^n` +be a growth bound for the transfer operator (`Daubechies.TransferGrowth`), and let +`0 ≤ s < N - log₄ λ`. Then `φ` has a Bernstein bound of some order `θ > s` in `L_p` with +differences of order `N`: the order `θ = (s + N - log₄ λ)/2` lies in `(s, N - log₄ λ)` and is at +most `N` (`Daubechies.TransferGrowth.sub_logb_le`), so `Daubechies.bernsteinBound_of_le_two` +applies. -/ +theorem exists_bernsteinBound_of_le_two (hN : 2 ≤ N) {p : ℝ≥0∞} (hp2 : p ≤ 2) {lam C s : ℝ} + (hg : TransferGrowth N lam C) (hs0 : 0 ≤ s) (hs : s < N - Real.logb 4 lam) : + ∃ θ : ℝ, s < θ ∧ BernsteinBound m p θ N := by + have hle := hg.sub_logb_le (by omega) + exact ⟨(s + (N - Real.logb 4 lam)) / 2, by linarith, + bernsteinBound_of_le_two m hN hp2 hg (by linarith) (by linarith) (by linarith)⟩ + +/-- **The interpolation weight**: for `2 ≤ p < ∞`, the weight `2/p` of the interpolated order +`(2/p) s + (1 - 2/p) a` lies in `[0, 1]`. -/ +theorem two_div_toReal_mem_Icc {p : ℝ≥0∞} (hp : p ≠ ∞) (hp2 : 2 ≤ p) : + 2 / p.toReal ∈ Set.Icc (0 : ℝ) 1 := by + have h2 : (2 : ℝ) ≤ p.toReal := by simpa using ENNReal.toReal_mono hp hp2 + exact ⟨by positivity, (div_le_one (by linarith)).2 h2⟩ + +/-- **Interpolated orders stay below a common bound**: for every weight `w ∈ [0, 1]` and all real +`s, a, b` with `s ≤ b` and `a ≤ b`, `w s + (1 - w) a ≤ b`, since a convex combination is at most +the larger of the two numbers (Mathlib's `Convex.combo_le_max`). -/ +theorem mul_add_one_sub_mul_le {w s a b : ℝ} (hw : w ∈ Set.Icc (0 : ℝ) 1) (hs : s ≤ b) + (ha : a ≤ b) : w * s + (1 - w) * a ≤ b := + (Convex.combo_le_max s a hw.1 (sub_nonneg.2 hw.2) (by ring)).trans (max_le hs ha) + +section Lp + +variable {p : ℝ≥0∞} [Fact (1 ≤ p)] + +/-- **Besov spaces by Daubechies coefficients, `p ≤ 2`**: let `N ≥ 2`, `1 ≤ p ≤ 2`, +`1 ≤ q ≤ ∞`, and let `T^n 1 ≤ C λ^n` be a growth bound for the transfer operator +(`Daubechies.TransferGrowth`). Then for `0 < s < N - log₄ λ` and every `f ∈ L_p(ℝ)`, +`‖f‖_p + ‖(2^(ks) ω_N(f, 2^(-k))_p)_k‖_{ℓ_q} < ∞` iff +`‖(⟨f, φ(· - k)⟩)_k‖_{ℓ_p} + ‖(2^(j(s + 1/2 - 1/p)) ‖(⟨f, ψ_{j,k}⟩)_k‖_{ℓ_p})_j‖_{ℓ_q} < ∞` +(`Daubechies.besov_iff_coeff` with the Bernstein bound of +`Daubechies.exists_bernsteinBound_of_le_two`). -/ +theorem besov_iff_coeff_of_le_two (hN : 2 ≤ N) (hp : p ≠ ∞) (hp2 : p ≤ 2) {lam C : ℝ} + (hg : TransferGrowth N lam C) {s : ℝ} (hs : 0 < s) (hsl : s < N - Real.logb 4 lam) + {q : ℝ≥0∞} (hq : 1 ≤ q) (f : Lp ℂ p (volume : Measure ℝ)) : + ‖f‖ₑ + ENNReal.lqNorm q (fun k => dyadicWeight s k * Rd.lpModulus p N f k) < ∞ ↔ + coeffNorm m p s q f < ∞ := by + obtain ⟨θ, hsθ, hB⟩ := exists_bernsteinBound_of_le_two m hN hp2 hg hs.le hsl + exact besov_iff_coeff m hN hp hB hs hsθ hq f + +/-- **Littlewood–Paley blocks and Daubechies coefficients, `p ≤ 2`**: let `N ≥ 2`, +`1 ≤ p ≤ 2`, `1 ≤ q ≤ ∞`, and let `T^n 1 ≤ C λ^n` be a growth bound for the transfer operator. +Then for `0 < s < N - log₄ λ` and every `f ∈ L_p(ℝ)`, the Littlewood–Paley quasi-norm +`‖(2^(js) ‖Δ_j f‖_p)_j‖_{ℓ_q}` (`Rd.littlewoodPaleyNorm`) is finite iff the coefficient +quasi-norm `Daubechies.coeffNorm` is (`Daubechies.littlewoodPaleyNorm_lt_top_iff_coeff`; here +`s < N` since `λ ≥ 1`, `Daubechies.TransferGrowth.sub_logb_le`). -/ +theorem littlewoodPaleyNorm_lt_top_iff_coeff_of_le_two (hN : 2 ≤ N) (hp : p ≠ ∞) (hp2 : p ≤ 2) + {lam C : ℝ} (hg : TransferGrowth N lam C) {s : ℝ} (hs : 0 < s) + (hsl : s < N - Real.logb 4 lam) {q : ℝ≥0∞} (hq : 1 ≤ q) (f : Lp ℂ p (volume : Measure ℝ)) : + Rd.littlewoodPaleyNorm hp s q f < ∞ ↔ coeffNorm m p s q f < ∞ := by + obtain ⟨θ, hsθ, hB⟩ := exists_bernsteinBound_of_le_two m hN hp2 hg hs.le hsl + exact littlewoodPaleyNorm_lt_top_iff_coeff m hN hp hB hs hsθ + (hsl.trans_le (hg.sub_logb_le (by omega))) hq f + +/-- **Besov spaces by Daubechies coefficients, `p ≥ 2`**: let `N ≥ 2`, `2 ≤ p < ∞`, +`1 ≤ q ≤ ∞`, let `T^n 1 ≤ C λ^n` be a growth bound for the transfer operator +(`Daubechies.TransferGrowth`), and let `s', a` be real with `0 ≤ s' < N - log₄ λ` and +`0 ≤ a < N - log₄ λ - 1/2`. Then for `0 < s < (2/p) s' + (1 - 2/p) a` and every `f ∈ L_p(ℝ)`, +`‖f‖_p + ‖(2^(ks) ω_N(f, 2^(-k))_p)_k‖_{ℓ_q} < ∞` iff +`‖(⟨f, φ(· - k)⟩)_k‖_{ℓ_p} + ‖(2^(j(s + 1/2 - 1/p)) ‖(⟨f, ψ_{j,k}⟩)_k‖_{ℓ_p})_j‖_{ℓ_q} < ∞` +(`Daubechies.besov_iff_coeff` with the interpolated Bernstein bound +`Daubechies.bernsteinBound_interp`; `s', a ≤ N` since `λ ≥ 1`). -/ +theorem besov_iff_coeff_of_two_le (hN : 2 ≤ N) (hp : p ≠ ∞) (hp2 : 2 ≤ p) {lam C : ℝ} + (hg : TransferGrowth N lam C) {s' a : ℝ} (hs'0 : 0 ≤ s') (hs' : s' < N - Real.logb 4 lam) + (ha0 : 0 ≤ a) (ha : a < N - Real.logb 4 lam - 1 / 2) {s : ℝ} (hs : 0 < s) + (hsθ : s < 2 / p.toReal * s' + (1 - 2 / p.toReal) * a) {q : ℝ≥0∞} (hq : 1 ≤ q) + (f : Lp ℂ p (volume : Measure ℝ)) : + ‖f‖ₑ + ENNReal.lqNorm q (fun k => dyadicWeight s k * Rd.lpModulus p N f k) < ∞ ↔ + coeffNorm m p s q f < ∞ := by + have hle := hg.sub_logb_le (by omega) + exact besov_iff_coeff m hN hp (bernsteinBound_interp m hN hp2 hg hs'0 hs' (by linarith) ha0 + (by linarith) ha) hs hsθ hq f + +/-- **Littlewood–Paley blocks and Daubechies coefficients, `p ≥ 2`**: under the hypotheses of +`Daubechies.besov_iff_coeff_of_two_le`, for `0 < s < (2/p) s' + (1 - 2/p) a` and every +`f ∈ L_p(ℝ)`, the Littlewood–Paley quasi-norm `‖(2^(js) ‖Δ_j f‖_p)_j‖_{ℓ_q}` +(`Rd.littlewoodPaleyNorm`) is finite iff the coefficient quasi-norm `Daubechies.coeffNorm` is. +The interpolated order is at most `N`, since `s', a ≤ N` and `2/p ∈ [0, 1]` +(`Daubechies.mul_add_one_sub_mul_le`), so `s < N`. -/ +theorem littlewoodPaleyNorm_lt_top_iff_coeff_of_two_le (hN : 2 ≤ N) (hp : p ≠ ∞) + (hp2 : 2 ≤ p) {lam C : ℝ} (hg : TransferGrowth N lam C) {s' a : ℝ} (hs'0 : 0 ≤ s') + (hs' : s' < N - Real.logb 4 lam) (ha0 : 0 ≤ a) (ha : a < N - Real.logb 4 lam - 1 / 2) + {s : ℝ} (hs : 0 < s) (hsθ : s < 2 / p.toReal * s' + (1 - 2 / p.toReal) * a) {q : ℝ≥0∞} + (hq : 1 ≤ q) (f : Lp ℂ p (volume : Measure ℝ)) : + Rd.littlewoodPaleyNorm hp s q f < ∞ ↔ coeffNorm m p s q f < ∞ := by + have hle := hg.sub_logb_le (by omega) + exact littlewoodPaleyNorm_lt_top_iff_coeff m hN hp (bernsteinBound_interp m hN hp2 hg hs'0 hs' + (by linarith) ha0 (by linarith) ha) hs hsθ + (hsθ.trans_le (mul_add_one_sub_mul_le (two_div_toReal_mem_Icc hp hp2) (by linarith) + (by linarith))) hq f + +/-- **Besov spaces by Daubechies coefficients, `p ≥ 2`, from a Hölder estimate**: let `N ≥ 2`, +`2 ≤ p < ∞`, `1 ≤ q ≤ ∞`, let `T^n 1 ≤ C λ^n` be a growth bound for the transfer operator +(`Daubechies.TransferGrowth`), let `0 ≤ s' < N - log₄ λ`, and let +`|φ(x) - φ(y)| ≤ K₀ |x - y|^a` for all `x, y ∈ ℝ`, with `a ≥ 0`. Then for +`0 < s < (2/p) s' + (1 - 2/p) a` and every `f ∈ L_p(ℝ)`, +`‖f‖_p + ‖(2^(ks) ω_N(f, 2^(-k))_p)_k‖_{ℓ_q} < ∞` iff +`‖(⟨f, φ(· - k)⟩)_k‖_{ℓ_p} + ‖(2^(j(s + 1/2 - 1/p)) ‖(⟨f, ψ_{j,k}⟩)_k‖_{ℓ_p})_j‖_{ℓ_q} < ∞` +(`Daubechies.besov_iff_coeff` with the Bernstein bound +`Daubechies.bernsteinBound_interp_of_holder`). -/ +theorem besov_iff_coeff_of_two_le_of_holder (hN : 2 ≤ N) (hp : p ≠ ∞) (hp2 : 2 ≤ p) + {lam C : ℝ} (hg : TransferGrowth N lam C) {s' a K₀ : ℝ} (hs'0 : 0 ≤ s') + (hs' : s' < N - Real.logb 4 lam) (ha0 : 0 ≤ a) + (hK : ∀ x y : ℝ, ‖scalingFun m x - scalingFun m y‖ ≤ K₀ * |x - y| ^ a) {s : ℝ} (hs : 0 < s) + (hsθ : s < 2 / p.toReal * s' + (1 - 2 / p.toReal) * a) {q : ℝ≥0∞} (hq : 1 ≤ q) + (f : Lp ℂ p (volume : Measure ℝ)) : + ‖f‖ₑ + ENNReal.lqNorm q (fun k => dyadicWeight s k * Rd.lpModulus p N f k) < ∞ ↔ + coeffNorm m p s q f < ∞ := by + have hle := hg.sub_logb_le (by omega) + exact besov_iff_coeff m hN hp (bernsteinBound_interp_of_holder m hN hp2 (by omega) hg hs'0 hs' + (by linarith) ha0 hK) hs hsθ hq f + +end Lp + +end Daubechies diff --git a/LeanPool/FunctionSpaces/Wavelets/Examples/Daubechies/Cascade.lean b/LeanPool/FunctionSpaces/Wavelets/Examples/Daubechies/Cascade.lean new file mode 100644 index 0000000000..e1927a4f95 --- /dev/null +++ b/LeanPool/FunctionSpaces/Wavelets/Examples/Daubechies/Cascade.lean @@ -0,0 +1,325 @@ +/- +Copyright (c) 2026 Mario Ullrich. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Mario Ullrich +-/ +module + +public import LeanPool.FunctionSpaces.Wavelets.Examples.Daubechies.ScalingFunction + +/- +Modified for Lean Pool: module names and imports adapted. +-/ + +/-! +# The cascade algorithm and the support of the scaling function + +For a Daubechies mask of order `N` with filter coefficients `c_k` (`Daubechies.coeff`), symbol +`m_0` (`Daubechies.symbol`) and symbol product `Φ(ξ) = ∏_{j ≥ 0} m_0(ξ/2^(j+1))` +(`Daubechies.symbolProduct`), the scaling function is `φ = 𝓕⁻ Φ` (`Daubechies.scalingFun`). +This file proves that `φ` vanishes outside `[0, 2N - 1]` and that `𝓕 φ = Φ`, with the help of +the **cascade algorithm** + +`η_0 = 1_[0,1)`, `η_(n+1)(x) = ∑_{k=0}^{2N-1} c_k η_n(2x - k)` (`Daubechies.cascade`). + +* **Support.** Every `η_n` vanishes outside `[0, 2N - 1]` (`Daubechies.cascade_eq_zero`): for + `0 ≤ k ≤ 2N - 1`, `2x - k ∈ [0, 2N - 1]` forces `x ∈ [0, 2N - 1]`. Every `η_n` is integrable + (`Daubechies.integrable_cascade`). +* **Fourier transform.** Dilation and translation turn the recursion into + `𝓕 η_(n+1)(ξ) = m_0(ξ/2) 𝓕 η_n(ξ/2)` (`Daubechies.fourier_cascade_succ`), hence + `𝓕 η_n(ξ) = ∏_{j (Set.Ico (0 : ℝ) 1).indicator 1 + | n + 1 => fun x => ∑ k ∈ Finset.range (2 * N), (coeff m k : ℂ) * cascade n (2 * x - k) + +/-- `η_0 = 1_[0,1)`, the indicator function of `[0, 1)`. -/ +theorem cascade_zero : cascade m 0 = (Set.Ico (0 : ℝ) 1).indicator 1 := rfl + +/-- The cascade recursion as an identity of functions: +`η_(n+1) = (x ↦ ∑_{k=0}^{2N-1} c_k η_n(2x - k))`. -/ +theorem cascade_succ (n : ℕ) : + cascade m (n + 1) = + fun x => ∑ k ∈ Finset.range (2 * N), (coeff m k : ℂ) * cascade m n (2 * x - k) := rfl + +/-- **The cascade recursion** `η_(n+1)(x) = ∑_{k=0}^{2N-1} c_k η_n(2x - k)` for every +`x ∈ ℝ`. -/ +theorem cascade_succ_apply (n : ℕ) (x : ℝ) : + cascade m (n + 1) x = + ∑ k ∈ Finset.range (2 * N), (coeff m k : ℂ) * cascade m n (2 * x - k) := rfl + +/-! ### Support and integrability of the cascade -/ + +/-- If `0 ≤ k ≤ b` and `2x - k ∈ [0, b]`, then `x ∈ [0, b]`: `x ≥ k/2 ≥ 0` and +`x ≤ (b + k)/2 ≤ b`. For `b = 2N - 1` this is the step of the support argument for the cascade: +no map `x ↦ 2x - k` with `0 ≤ k ≤ 2N - 1` sends a point outside `[0, 2N - 1]` into +`[0, 2N - 1]`. -/ +theorem mem_Icc_of_two_mul_sub_mem_Icc {x k b : ℝ} (hk : 0 ≤ k) (hkb : k ≤ b) + (h : 2 * x - k ∈ Set.Icc 0 b) : x ∈ Set.Icc 0 b := + ⟨by linarith [h.1], by linarith [h.2]⟩ + +/-- **The cascade functions vanish outside `[0, 2N - 1]`**: `η_n(x) = 0` for every `n` and every +`x ∉ [0, 2N - 1]`. By induction on `n`: `[0, 1) ⊆ [0, 2N - 1]` since `N ≥ 1` +(`Daubechies.Mask.one_le`), and for `x ∉ [0, 2N - 1]` no point `2x - k` with `0 ≤ k ≤ 2N - 1` +lies in `[0, 2N - 1]` (`Daubechies.mem_Icc_of_two_mul_sub_mem_Icc`). -/ +theorem cascade_eq_zero (n : ℕ) {x : ℝ} (hx : x ∉ Set.Icc (0 : ℝ) (2 * N - 1)) : + cascade m n x = 0 := by + induction n generalizing x with + | zero => + have h1 : (1 : ℝ) ≤ N := by exact_mod_cast m.one_le + exact Set.indicator_of_notMem (fun h : x ∈ Set.Ico (0 : ℝ) 1 => hx ⟨h.1, by linarith [h.2]⟩) _ + | succ n ih => + rw [cascade_succ_apply] + refine Finset.sum_eq_zero fun k hk => ?_ + have hk' : (k : ℝ) + 1 ≤ 2 * N := by exact_mod_cast Finset.mem_range.1 hk + rw [ih (fun h => hx (mem_Icc_of_two_mul_sub_mem_Icc k.cast_nonneg (by linarith) h)), + mul_zero] + +/-- If `f : ℝ → ℂ` is integrable, then so is `x ↦ c f(2x - b)`, for all `c ∈ ℂ` and `b ∈ ℝ` +(Mathlib's `MeasureTheory.Integrable.comp_sub_right` and +`MeasureTheory.Integrable.comp_mul_left'`). -/ +theorem integrable_const_mul_comp_two_mul_sub {f : ℝ → ℂ} (hf : Integrable f) (c : ℂ) (b : ℝ) : + Integrable (fun x => c * f (2 * x - b)) := + ((hf.comp_sub_right b).comp_mul_left' two_ne_zero).const_mul c + +/-- **The cascade functions are integrable**, by induction on `n`: `1_[0,1)` is integrable, and +`η_(n+1)` is a finite sum of the integrable functions `x ↦ c_k η_n(2x - k)`. -/ +theorem integrable_cascade (n : ℕ) : Integrable (cascade m n) := by + induction n with + | zero => + exact (integrable_indicator_iff measurableSet_Ico).2 + (integrableOn_const measure_Ico_lt_top.ne) + | succ n ih => + rw [cascade_succ] + exact integrable_finsetSum _ fun k _ => integrable_const_mul_comp_two_mul_sub ih _ _ + +/-! ### The Fourier transform of the cascade -/ + +/-- **The cascade recursion on the Fourier side**: `𝓕 η_(n+1)(ξ) = m_0(ξ/2) 𝓕 η_n(ξ/2)` for +every `ξ ∈ ℝ`. The transform of `x ↦ η_n(2x - k)` is `(1/2) e^(-2πik(ξ/2)) 𝓕 η_n(ξ/2)` +(`Real.fourier_comp_mul_sub_apply`), and `(1/2) ∑_k c_k e^(-2πik(ξ/2)) = m_0(ξ/2)` +(`Daubechies.symbol_eq_sum`). -/ +theorem fourier_cascade_succ (n : ℕ) (ξ : ℝ) : + 𝓕 (cascade m (n + 1)) ξ = symbol m (ξ / 2) * 𝓕 (cascade m n) (ξ / 2) := by + rw [cascade_succ, Real.fourier_sum_apply _ (fun (k : ℕ) _ => + integrable_const_mul_comp_two_mul_sub (integrable_cascade m n) _ _), + symbol_eq_sum, Finset.mul_sum, Finset.sum_mul] + refine Finset.sum_congr rfl fun k _ => ?_ + rw [Real.fourier_const_mul_apply, Real.fourier_comp_mul_sub_apply _ two_pos, expFreq_pow, + expFreq] + push_cast + rw [show -(2 * (π : ℂ) * k * (ξ / 2) * Complex.I) = -(2 * π * (k * (ξ / 2))) * Complex.I by + ring] + ring + +/-- **The Fourier transform of the cascade**: +`𝓕 η_n(ξ) = ∏_{j simp + | succ n ih => + have h : ξ / 2 / 2 ^ n = ξ / 2 ^ (n + 1) := by rw [div_div, ← pow_succ'] + rw [fourier_cascade_succ, ih, prod_range_succ_symbol, h, mul_assoc] + +/-- The Fourier transform of every cascade function is continuous, since `η_n` is integrable +(`Real.continuous_fourier_of_integrable`). -/ +theorem continuous_fourier_cascade (n : ℕ) : Continuous (𝓕 (cascade m n)) := + Real.continuous_fourier_of_integrable (integrable_cascade m n) + +/-- `∫ η_0 = ∫_0^1 1 dx = 1`. -/ +theorem integral_cascade_zero : ∫ x, cascade m 0 x = 1 := by + rw [cascade_zero, integral_indicator measurableSet_Ico] + simp + +/-- `∫ |η_0| = 1`, since `|η_0| = 1_[0,1)`. -/ +theorem integral_norm_cascade_zero : ∫ x, ‖cascade m 0 x‖ = 1 := by + rw [cascade_zero] + simp [norm_indicator_eq_indicator_norm, integral_indicator measurableSet_Ico] + +/-- `𝓕 η_0(0) = ∫ η_0 = 1` (`Real.fourier_apply_zero`). -/ +theorem fourier_cascade_zero_apply_zero : 𝓕 (cascade m 0) 0 = 1 := by + rw [Real.fourier_apply_zero, integral_cascade_zero] + +/-- `|𝓕 η_0(ξ)| ≤ ∫ |η_0| = 1` for every `ξ ∈ ℝ` (`Real.norm_fourier_le_integral_norm`). -/ +theorem norm_fourier_cascade_zero_le_one (ξ : ℝ) : ‖𝓕 (cascade m 0) ξ‖ ≤ 1 := + (Real.norm_fourier_le_integral_norm _ ξ).trans (integral_norm_cascade_zero m).le + +/-- **The Fourier transforms of the cascade are bounded by `1`**: `|𝓕 η_n(ξ)| ≤ 1` for every `n` +and every `ξ ∈ ℝ`. In `Daubechies.fourier_cascade` the partial products of the symbol have +modulus at most `1` (`Daubechies.norm_prod_symbol_le_one`), and `|𝓕 η_0| ≤ 1`. -/ +theorem norm_fourier_cascade_le_one (n : ℕ) (ξ : ℝ) : ‖𝓕 (cascade m n) ξ‖ ≤ 1 := by + rw [fourier_cascade, norm_mul, ← one_mul (1 : ℝ)] + exact mul_le_mul (norm_prod_symbol_le_one m ξ n) (norm_fourier_cascade_zero_le_one m _) + (norm_nonneg _) zero_le_one + +/-- **The Fourier transforms of the cascade converge to the symbol product**: `𝓕 η_n(ξ) → Φ(ξ)` +as `n → ∞`, for every `ξ ∈ ℝ`. In `𝓕 η_n(ξ) = ∏_{j 𝓕 (cascade m n) ξ) atTop (𝓝 (symbolProduct m ξ)) := by + have h0 : Tendsto (fun n : ℕ => ξ / 2 ^ n) atTop (𝓝 0) := + tendsto_const_nhds.div_atTop (tendsto_pow_atTop_atTop_of_one_lt one_lt_two) + have h1 : Tendsto (fun n : ℕ => 𝓕 (cascade m 0) (ξ / 2 ^ n)) atTop (𝓝 1) := by + rw [← fourier_cascade_zero_apply_zero m] + exact ((continuous_fourier_cascade m 0).tendsto 0).comp h0 + have h := (tendsto_prod_symbol m ξ).mul h1 + rw [mul_one] at h + exact h.congr fun n => (fourier_cascade m n ξ).symm + +/-! ### Convergence against Schwartz functions -/ + +/-- **The cascade converges to the scaling function against Schwartz functions**: for a mask of +order `N ≥ 2` and every Schwartz function `ψ`, `∫ η_n ψ → ∫ φ ψ` as `n → ∞`. The +multiplication formula gives `∫ η_n ψ = ∫ 𝓕 η_n · 𝓕⁻ ψ` (`Real.integral_mul_schwartz_eq`). These +integrands converge pointwise to `Φ · 𝓕⁻ ψ` (`Daubechies.tendsto_fourier_cascade`) and are +bounded by the integrable function `|𝓕⁻ ψ|` (`Daubechies.norm_fourier_cascade_le_one`), so +dominated convergence (Mathlib's `MeasureTheory.tendsto_integral_of_dominated_convergence`) gives +the limit `∫ Φ · 𝓕⁻ ψ = ∫ 𝓕⁻ Φ · ψ = ∫ φ ψ` (`Real.integral_fourierInv_mul`, which needs +`Φ ∈ L¹`, `Daubechies.integrable_symbolProduct`). -/ +theorem tendsto_integral_cascade_mul (hN : 2 ≤ N) (ψ : 𝓢(ℝ, ℂ)) : + Tendsto (fun n => ∫ x, cascade m n x * ψ x) atTop (𝓝 (∫ x, scalingFun m x * ψ x)) := by + have h1 : ∀ n, ∫ x, cascade m n x * ψ x = ∫ ξ, 𝓕 (cascade m n) ξ * 𝓕⁻ ψ ξ := fun n => + Real.integral_mul_schwartz_eq (integrable_cascade m n) ψ + have h2 : ∫ x, scalingFun m x * ψ x = ∫ ξ, symbolProduct m ξ * 𝓕⁻ ψ ξ := by + rw [scalingFun, Real.integral_fourierInv_mul (integrable_symbolProduct m hN) ψ.integrable, + SchwartzMap.fourierInv_coe] + simp_rw [h1, h2] + refine tendsto_integral_of_dominated_convergence (fun ξ => ‖𝓕⁻ ψ ξ‖) + (fun n => ((continuous_fourier_cascade m n).mul (𝓕⁻ ψ).continuous).aestronglyMeasurable) + (𝓕⁻ ψ).integrable.norm (fun n => Eventually.of_forall fun ξ => ?_) + (Eventually.of_forall fun ξ => (tendsto_fourier_cascade m ξ).mul_const _) + rw [norm_mul] + exact mul_le_of_le_one_left (norm_nonneg _) (norm_fourier_cascade_le_one m n ξ) + +/-! ### The support of the scaling function -/ + +/-- `∫ η_n g = 0` for every `n` and every function `g : ℝ → ℂ` that vanishes on `[0, 2N - 1]`: +the product `η_n g` vanishes everywhere (`Daubechies.cascade_eq_zero`). -/ +theorem integral_cascade_mul_eq_zero (n : ℕ) {g : ℝ → ℂ} + (hg : ∀ x ∈ Set.Icc (0 : ℝ) (2 * N - 1), g x = 0) : + ∫ x, cascade m n x * g x = 0 := by + have h : ∀ x, cascade m n x * g x = 0 := fun x => by + by_cases hx : x ∈ Set.Icc (0 : ℝ) (2 * N - 1) + · rw [hg x hx, mul_zero] + · rw [cascade_eq_zero m n hx, zero_mul] + simp only [h, integral_zero] + +/-- **The scaling function vanishes outside `[0, 2N - 1]`**: for a mask of order `N ≥ 2`, +`φ(x) = 0` for every `x ∉ [0, 2N - 1]`. For a Schwartz function `ψ` with support in the open set +`ℝ \ [0, 2N - 1]` every integral `∫ η_n ψ` vanishes (`Daubechies.integral_cascade_mul_eq_zero`), +so their limit `∫ φ ψ` (`Daubechies.tendsto_integral_cascade_mul`) is `0`. The continuous +function `φ` therefore vanishes on the open set, by the fundamental lemma +(`Real.eqOn_zero_of_integral_mul_schwartz_eq_zero`). -/ +theorem scalingFun_eq_zero (hN : 2 ≤ N) {x : ℝ} (hx : x ∉ Set.Icc (0 : ℝ) (2 * N - 1)) : + scalingFun m x = 0 := by + refine Real.eqOn_zero_of_integral_mul_schwartz_eq_zero (continuous_scalingFun m hN) + isClosed_Icc.isOpen_compl (fun ψ _ hψ => ?_) x hx + have h0 : ∀ n, ∫ x, cascade m n x * ψ x = 0 := fun n => + integral_cascade_mul_eq_zero m n fun y hy => + image_eq_zero_of_notMem_tsupport fun h => hψ h hy + have h := tendsto_integral_cascade_mul m hN ψ + simp only [h0] at h + simp_rw [mul_comm (ψ _)] + exact tendsto_nhds_unique h tendsto_const_nhds + +/-- **The scaling function vanishes at the endpoints as well**: `φ(x) = 0` for every +`x ∉ (0, 2N - 1)`, for `N ≥ 2`. The zero set of the continuous function `φ` is closed and +contains the open set `ℝ \ [0, 2N - 1]` (`Daubechies.scalingFun_eq_zero`), hence also its closure +`ℝ \ (0, 2N - 1)`. -/ +theorem scalingFun_eq_zero_of_notMem_Ioo (hN : 2 ≤ N) {x : ℝ} + (hx : x ∉ Set.Ioo (0 : ℝ) (2 * N - 1)) : scalingFun m x = 0 := by + have h : closure (Set.Icc (0 : ℝ) (2 * N - 1))ᶜ ⊆ {y | scalingFun m y = 0} := + closure_minimal (fun y hy => scalingFun_eq_zero m hN hy) + (isClosed_eq (continuous_scalingFun m hN) continuous_const) + rw [closure_compl, interior_Icc] at h + exact h hx + +/-- The closed support of the scaling function lies in `[0, 2N - 1]`, for `N ≥ 2` +(`Daubechies.scalingFun_eq_zero`). -/ +theorem tsupport_scalingFun_subset (hN : 2 ≤ N) : + tsupport (scalingFun m) ⊆ Set.Icc (0 : ℝ) (2 * N - 1) := + closure_minimal (fun _ hx => by_contra fun h => hx (scalingFun_eq_zero m hN h)) isClosed_Icc + +/-- **The scaling function has compact support**, for `N ≥ 2`: it vanishes outside the compact +interval `[0, 2N - 1]` (`Daubechies.scalingFun_eq_zero`). -/ +theorem hasCompactSupport_scalingFun (hN : 2 ≤ N) : HasCompactSupport (scalingFun m) := + HasCompactSupport.intro isCompact_Icc fun _ hx => scalingFun_eq_zero m hN hx + +/-- **The scaling function is integrable**, for `N ≥ 2`: it is continuous with compact support +(Mathlib's `Continuous.integrable_of_hasCompactSupport`). -/ +theorem integrable_scalingFun (hN : 2 ≤ N) : Integrable (scalingFun m) := + (continuous_scalingFun m hN).integrable_of_hasCompactSupport + (hasCompactSupport_scalingFun m hN) + +/-- **The scaling function lies in every `L^p`**: `φ ∈ L^p(ℝ)` for every exponent `p ∈ [0, ∞]`, +for `N ≥ 2`, since it is continuous with compact support (Mathlib's +`Continuous.memLp_of_hasCompactSupport`). -/ +theorem memLp_scalingFun (hN : 2 ≤ N) (p : ℝ≥0∞) : MemLp (scalingFun m) p := + (continuous_scalingFun m hN).memLp_of_hasCompactSupport (hasCompactSupport_scalingFun m hN) + +/-! ### The Fourier transform of the scaling function -/ + +/-- `𝓕 Φ(ξ) = φ(-ξ)` for every `ξ ∈ ℝ`, since `𝓕⁻ Φ(x) = 𝓕 Φ(-x)` (Mathlib's +`Real.fourierInv_eq_fourier_neg`). -/ +theorem fourier_symbolProduct_apply (ξ : ℝ) : 𝓕 (symbolProduct m) ξ = scalingFun m (-ξ) := by + rw [scalingFun, Real.fourierInv_eq_fourier_neg, neg_neg] + +/-- For `N ≥ 2` the Fourier transform `𝓕 Φ` of the symbol product is integrable: +`𝓕 Φ(ξ) = φ(-ξ)` (`Daubechies.fourier_symbolProduct_apply`), and `φ` is integrable. -/ +theorem integrable_fourier_symbolProduct (hN : 2 ≤ N) : Integrable (𝓕 (symbolProduct m)) := by + rw [funext (fourier_symbolProduct_apply m)] + exact (integrable_scalingFun m hN).comp_neg + +/-- **The Fourier transform of the scaling function is the symbol product**: `𝓕 φ = Φ` for +`N ≥ 2`. The function `Φ` is continuous and integrable, and so is `𝓕 Φ` +(`Daubechies.integrable_fourier_symbolProduct`), so the inversion theorem `𝓕 (𝓕⁻ Φ) = Φ` applies +(Mathlib's `Continuous.fourier_fourierInv_eq`). -/ +theorem fourier_scalingFun (hN : 2 ≤ N) : 𝓕 (scalingFun m) = symbolProduct m := + (continuous_symbolProduct m).fourier_fourierInv_eq (integrable_symbolProduct m hN) + (integrable_fourier_symbolProduct m hN) + +/-- **The scaling function has integral `1`**: `∫ φ = 𝓕 φ(0) = Φ(0) = 1` for `N ≥ 2` +(`Real.fourier_apply_zero`, `Daubechies.fourier_scalingFun`, `Daubechies.symbolProduct_zero`). -/ +theorem integral_scalingFun (hN : 2 ≤ N) : ∫ x, scalingFun m x = 1 := by + rw [← Real.fourier_apply_zero, fourier_scalingFun m hN, symbolProduct_zero] + +end Daubechies diff --git a/LeanPool/FunctionSpaces/Wavelets/Examples/Daubechies/D4.lean b/LeanPool/FunctionSpaces/Wavelets/Examples/Daubechies/D4.lean new file mode 100644 index 0000000000..a17469cacc --- /dev/null +++ b/LeanPool/FunctionSpaces/Wavelets/Examples/Daubechies/D4.lean @@ -0,0 +1,134 @@ +/- +Copyright (c) 2026 Mario Ullrich. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Mario Ullrich +-/ +module + +public import LeanPool.FunctionSpaces.Wavelets.Examples.Daubechies.Mask + +/- +Modified for Lean Pool: module names and imports adapted. +-/ + +/-! +# The Daubechies mask D4 + +The Daubechies wavelet D4 comes from the mask of order `N = 2` (`Daubechies.d4`) with the +polynomial factor + +`L(z) = a + b z`, `a = (1 + √3)/2`, `b = (1 - √3)/2`, + +whose root `z = 2 + √3` lies outside the unit disk. The conditions of a mask +(`Daubechies.Mask`) are `deg L = 1 < 2`, `L(1) = a + b = 1`, and, for `z = e^(-2πiξ)`, + +`|L(z)|² = a² + b² + 2ab cos(2πξ) = 2 - cos(2πξ) = 1 + 2 sin²(πξ) = P(ξ)`, + +since `a² + b² = 2` and `2ab = -1` (`Daubechies.normSq_add_mul_expFreq`, +`Daubechies.daubFun_two_eq_two_sub_cos`). The mask polynomial is + +`m(z) = ((1 + z)/2)² L(z) = ((1 + √3) + (3 + √3) z + (3 - √3) z² + (1 - √3) z³)/8` + +(`Daubechies.maskPoly_d4`), so the four filter coefficients are + +`c_0 = (1 + √3)/4`, `c_1 = (3 + √3)/4`, `c_2 = (3 - √3)/4`, `c_3 = (1 - √3)/4` + +(`Daubechies.coeff_d4`), and `c_k = 0` for every other `k ∈ ℤ` (`Daubechies.coeff_d4_eq_zero`). +They are normalised by `∑_k c_k = 2`; the orthonormal filter `h_k = c_k/√2` is the form in which +the coefficients are usually tabulated. +-/ + +@[expose] public section + +open Polynomial +open scoped Real + +namespace Daubechies + +/-- **A real linear polynomial on the unit circle**: for real `a, b` and `ξ`, +`|a + b e^(-2πiξ)|² = a² + b² + 2ab cos(2πξ)`. This is `|a + b z|² = a² + b² |z|² + 2ab Re z` +with `|z| = 1` and `Re z = cos(2πξ)`. -/ +theorem normSq_add_mul_expFreq (a b ξ : ℝ) : + ‖(a : ℂ) + b * expFreq ξ‖ ^ 2 = a ^ 2 + b ^ 2 + 2 * a * b * Real.cos (2 * π * ξ) := by + rw [Complex.sq_norm, Complex.normSq_apply] + simp only [Complex.add_re, Complex.add_im, Complex.mul_re, Complex.mul_im, Complex.ofReal_re, + Complex.ofReal_im, expFreq_re, expFreq_im] + linear_combination b ^ 2 * Real.sin_sq_add_cos_sq (2 * π * ξ) + +/-- For `N = 2` the trigonometric Daubechies polynomial is `P(ξ) = 2 - cos(2πξ)`: by +`Daubechies.daubFun_two`, `P(ξ) = 1 + 2 sin²(πξ)`, and `cos(2πξ) = 1 - 2 sin²(πξ)`. -/ +theorem daubFun_two_eq_two_sub_cos (ξ : ℝ) : daubFun 2 ξ = 2 - Real.cos (2 * π * ξ) := by + rw [daubFun_two, show 2 * π * ξ = 2 * (π * ξ) by ring, Real.cos_two_mul', Real.cos_sq'] + ring + +/-- **The Daubechies mask D4**, the mask of order `N = 2` with the polynomial factor +`L(z) = (1 + √3)/2 + ((1 - √3)/2) z` (`Daubechies.d4_L`). Its filter coefficients are +`c_0, …, c_3 = (1 + √3)/4, (3 + √3)/4, (3 - √3)/4, (1 - √3)/4` (`Daubechies.coeff_d4`). The +condition `|L(e^(-2πiξ))|² = P(ξ)` holds since both sides equal `2 - cos(2πξ)` +(`Daubechies.normSq_add_mul_expFreq`, `Daubechies.daubFun_two_eq_two_sub_cos`). -/ +noncomputable def d4 : Mask 2 where + L := C ((1 + √3) / 2) + C ((1 - √3) / 2) * X + natDegree_L_lt := Nat.lt_succ_of_le <| natDegree_add_le_of_degree_le + ((natDegree_C _).trans_le zero_le_one) ((natDegree_C_mul_le _ _).trans natDegree_X_le) + eval_L_one := by + simp only [eval_add, eval_C, eval_mul, eval_X] + ring + normSq_L ξ := by + have h3 : √3 ^ 2 = 3 := Real.sq_sqrt (by norm_num) + rw [map_add, map_mul, aeval_C, aeval_C, aeval_X, Complex.coe_algebraMap, + normSq_add_mul_expFreq, daubFun_two_eq_two_sub_cos] + linear_combination (1 - Real.cos (2 * π * ξ)) / 2 * h3 + +/-- The polynomial factor of D4 is `L(z) = (1 + √3)/2 + ((1 - √3)/2) z`. -/ +theorem d4_L : d4.L = C ((1 + √3) / 2) + C ((1 - √3) / 2) * X := + rfl + +/-- **The mask polynomial of D4**: +`m(z) = ((1 + z)/2)² L(z) = ((1 + √3) + (3 + √3) z + (3 - √3) z² + (1 - √3) z³)/8`. Two +polynomials over `ℝ` agree once they agree at every real point (Mathlib's +`Polynomial.funext`), and pointwise this is the expansion of +`(1 + 2x + x²)(a + bx)/4` with `a = (1 + √3)/2`, `b = (1 - √3)/2`. -/ +theorem maskPoly_d4 : + maskPoly d4 = C ((1 + √3) / 8) + C ((3 + √3) / 8) * X + C ((3 - √3) / 8) * X ^ 2 + + C ((1 - √3) / 8) * X ^ 3 := by + refine Polynomial.funext fun x => ?_ + simp only [maskPoly, d4_L, eval_mul, eval_pow, eval_add, eval_C, eval_one, eval_X] + ring + +/-- The filter coefficient `c_0 = (1 + √3)/4` of D4. -/ +@[simp] +theorem coeff_d4_zero : coeff d4 0 = (1 + √3) / 4 := by + simp [coeff, maskPoly_d4] + ring + +/-- The filter coefficient `c_1 = (3 + √3)/4` of D4. -/ +@[simp] +theorem coeff_d4_one : coeff d4 1 = (3 + √3) / 4 := by + simp [coeff, maskPoly_d4] + ring + +/-- The filter coefficient `c_2 = (3 - √3)/4` of D4. -/ +@[simp] +theorem coeff_d4_two : coeff d4 2 = (3 - √3) / 4 := by + simp [coeff, maskPoly_d4] + ring + +/-- The filter coefficient `c_3 = (1 - √3)/4` of D4. -/ +@[simp] +theorem coeff_d4_three : coeff d4 3 = (1 - √3) / 4 := by + simp [coeff, maskPoly_d4] + ring + +/-- **The filter coefficients of D4**: +`c_0 = (1 + √3)/4`, `c_1 = (3 + √3)/4`, `c_2 = (3 - √3)/4`, `c_3 = (1 - √3)/4`. -/ +theorem coeff_d4 : + coeff d4 0 = (1 + √3) / 4 ∧ coeff d4 1 = (3 + √3) / 4 ∧ coeff d4 2 = (3 - √3) / 4 ∧ + coeff d4 3 = (1 - √3) / 4 := + ⟨coeff_d4_zero, coeff_d4_one, coeff_d4_two, coeff_d4_three⟩ + +/-- The filter coefficients of D4 vanish outside `0 ≤ k ≤ 3`: `c_k = 0` for `k < 0` and for +`k ≥ 4` (`Daubechies.coeff_eq_zero` with `2N = 4`). -/ +theorem coeff_d4_eq_zero {k : ℤ} (hk : k < 0 ∨ 4 ≤ k) : coeff d4 k = 0 := + coeff_eq_zero d4 (by omega) + +end Daubechies diff --git a/LeanPool/FunctionSpaces/Wavelets/Examples/Daubechies/D4Besov.lean b/LeanPool/FunctionSpaces/Wavelets/Examples/Daubechies/D4Besov.lean new file mode 100644 index 0000000000..0e17dfee5f --- /dev/null +++ b/LeanPool/FunctionSpaces/Wavelets/Examples/Daubechies/D4Besov.lean @@ -0,0 +1,200 @@ +/- +Copyright (c) 2026 Mario Ullrich. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Mario Ullrich +-/ +module + +public import LeanPool.FunctionSpaces.Wavelets.Examples.Daubechies.Besov + +/- +Modified for Lean Pool: module names and imports adapted. +-/ + +/-! +# Besov spaces by D4 coefficients + +For the Daubechies mask D4 (`Daubechies.d4`) with scaling function `φ` (`Daubechies.scalingFun`) +and wavelet `ψ` (`Daubechies.wavelet`), this file gives the explicit smoothness ranges in which +the Besov spaces `B^s_{p,q}(ℝ)` are described by the D4 coefficients. Let +`α = 2 - log₂(1 + √3) ≈ 0.5500` be the Hölder exponent of D4, and let `1 ≤ q ≤ ∞` and +`f ∈ L_p(ℝ)`. The **Besov condition** is +`‖f‖_p + ‖(2^(ks) ω_2(f, 2^(-k))_p)_k‖_{ℓ_q} < ∞` with differences of order `2` +(`Rd.lpModulus p 2`), and the **coefficient condition** is the finiteness of +`‖(⟨f, φ(· - k)⟩)_k‖_{ℓ_p} + ‖(2^(j(s + 1/2 - 1/p)) ‖(⟨f, ψ_{j,k}⟩)_k‖_{ℓ_p})_j‖_{ℓ_q}` +(`Daubechies.coeffNorm`). + +* **Hölder regularity.** `‖φ(x) - φ(y)‖ ≤ K |x - y|^a` for every `0 ≤ a ≤ 0.55` + (`Daubechies.holder_d4_of_le_055`), which is `Daubechies.holder_d4` together with + `0.55 < α`; moreover `α < 1` (`Daubechies.two_sub_logb_two_one_add_sqrt_three_lt_one`). +* **`1 ≤ p ≤ 2`.** For `0 < s < 1` the Besov condition and the coefficient condition are + equivalent (`Daubechies.besov_iff_coeff_d4_le_two`). The transfer operator of order two maps + `1` to `4`, so its growth bound `T^n 1 ≤ 4^n` (`Daubechies.transferGrowth_two`) has the + Sobolev exponent `2 - log₄ 4 = 1`, and `Daubechies.besov_iff_coeff_of_le_two` applies. +* **`2 ≤ p < ∞`.** For `0 < s < 2/p + (1 - 2/p) α` the two conditions are equivalent + (`Daubechies.besov_iff_coeff_d4_two_le`). Since the bound is strict, there is `s' < 1` with + `s < (2/p) s' + (1 - 2/p) α` (`Daubechies.exists_lt_mul_add_one_sub_mul`), and + `φ` has a Bernstein bound of this interpolated order (`Daubechies.bernsteinBound_d4`, + collected in `Daubechies.exists_bernsteinBound_d4_of_two_le`). +* **Every `1 ≤ p < ∞`.** For `0 < s < α` both ranges apply, so the two conditions are + equivalent for every `p` (`Daubechies.besov_iff_coeff_d4`). +* **Littlewood–Paley.** In both ranges the coefficient condition is also equivalent to the + finiteness of the Littlewood–Paley quasi-norm `‖(2^(js) ‖Δ_j f‖_p)_j‖_{ℓ_q}` + (`Daubechies.littlewoodPaleyNorm_lt_top_iff_coeff_d4_le_two`, + `Daubechies.littlewoodPaleyNorm_lt_top_iff_coeff_d4_two_le`). + +The order `2` of the differences matches the order of D4; every order `r > s` describes the same +space, since the Besov quasi-norms of two such orders are equivalent +(`Rd.modNorm_le_modNorm_of_lt`). +-/ + +@[expose] public section + +open MeasureTheory +open scoped ENNReal Real +open ENNReal (dyadicWeight) + +namespace Daubechies + +/-! ### The Hölder exponent of D4 -/ + +/-- **The Hölder exponent of D4 is below `1`**: `2 - log₂(1 + √3) < 1`, since `1 + √3 > 2` +(`Daubechies.one_lt_sqrt_three`) and `log₂` is strictly increasing with `log₂ 2 = 1`. -/ +theorem two_sub_logb_two_one_add_sqrt_three_lt_one : 2 - Real.logb 2 (1 + √3) < 1 := by + have h : Real.logb 2 2 < Real.logb 2 (1 + √3) := + Real.logb_lt_logb one_lt_two two_pos (by linarith [one_lt_sqrt_three]) + rw [Real.logb_self_eq_one one_lt_two] at h + linarith + +/-- **The Hölder exponent of D4 is positive**: `0 < 2 - log₂(1 + √3)`, since it exceeds `0.55` +(`Daubechies.two_sub_logb_two_one_add_sqrt_three_gt`). -/ +theorem two_sub_logb_two_one_add_sqrt_three_pos : 0 < 2 - Real.logb 2 (1 + √3) := + lt_trans (by norm_num) two_sub_logb_two_one_add_sqrt_three_gt + +/-- **D4 is Hölder continuous with exponent `0.55`**: for every real `a` with `0 ≤ a ≤ 0.55` +there is `K` with `‖φ(x) - φ(y)‖ ≤ K |x - y|^a` for all `x, y ∈ ℝ`, where `φ` is the scaling +function of D4. This is `Daubechies.holder_d4`, which holds for every +`0 ≤ a ≤ 2 - log₂(1 + √3)`, together with `0.55 < 2 - log₂(1 + √3)` +(`Daubechies.two_sub_logb_two_one_add_sqrt_three_gt`). -/ +theorem holder_d4_of_le_055 {a : ℝ} (ha0 : 0 ≤ a) (ha : a ≤ 0.55) : + ∃ K, ∀ x y, ‖scalingFun d4 x - scalingFun d4 y‖ ≤ K * |x - y| ^ a := + holder_d4 ha0 (ha.trans two_sub_logb_two_one_add_sqrt_three_gt.le) + +/-! ### Bernstein bounds for D4 -/ + +/-- **Interpolated orders below a strict bound**: for a weight `w ∈ [0, 1]`, real `s, a` and +`b > 0` with `s < w b + (1 - w) a`, there is `s'` with `0 ≤ s' < b` and +`s < w s' + (1 - w) a`. With `ε = w b + (1 - w) a - s > 0`, the choice `s' = max(0, b - ε/2)` +works: `0 ≤ b - s' ≤ ε/2`, so `w b - w s' ≤ ε/2 < ε`. -/ +theorem exists_lt_mul_add_one_sub_mul {w s a b : ℝ} (hw : w ∈ Set.Icc (0 : ℝ) 1) (hb : 0 < b) + (hs : s < w * b + (1 - w) * a) : + ∃ s', 0 ≤ s' ∧ s' < b ∧ s < w * s' + (1 - w) * a := by + refine ⟨max 0 (b - (w * b + (1 - w) * a - s) / 2), le_max_left _ _, + max_lt hb (by linarith), ?_⟩ + have h1 : b - (w * b + (1 - w) * a - s) / 2 ≤ max 0 (b - (w * b + (1 - w) * a - s) / 2) := + le_max_right _ _ + have h2 : max 0 (b - (w * b + (1 - w) * a - s) / 2) ≤ b := max_le hb.le (by linarith) + have h3 := mul_le_of_le_one_left (sub_nonneg.2 h2) hw.2 + linarith + +/-- **Bernstein bounds for D4 above a given smoothness, `p ≥ 2`**: for `2 ≤ p < ∞` and every +real `s < 2/p + (1 - 2/p) α` with `α = 2 - log₂(1 + √3)`, the scaling function of D4 has a +Bernstein bound `ω_2(φ, t)_p ≤ K t^θ` for `0 < t ≤ 1` (`Daubechies.BernsteinBound` with +differences of order `2`) of some order `θ` with `s < θ ≤ 1`. The order is +`θ = (2/p) s' + (1 - 2/p) α` for an `s' ∈ [0, 1)` with `s < θ` +(`Daubechies.exists_lt_mul_add_one_sub_mul`, the weight `2/p ∈ [0, 1]`), the bound is +`Daubechies.bernsteinBound_d4`, and `θ ≤ 1` since `s', α ≤ 1`. -/ +theorem exists_bernsteinBound_d4_of_two_le {p : ℝ≥0∞} (hp : p ≠ ∞) (hp2 : 2 ≤ p) {s : ℝ} + (hs : s < 2 / p.toReal + (1 - 2 / p.toReal) * (2 - Real.logb 2 (1 + √3))) : + ∃ θ : ℝ, s < θ ∧ θ ≤ 1 ∧ BernsteinBound d4 p θ 2 := by + have hw := two_div_toReal_mem_Icc hp hp2 + obtain ⟨s', hs'0, hs'1, hsθ⟩ := exists_lt_mul_add_one_sub_mul hw one_pos (by rwa [mul_one]) + exact ⟨_, hsθ, mul_add_one_sub_mul_le hw hs'1.le two_sub_logb_two_one_add_sqrt_three_lt_one.le, + bernsteinBound_d4 hp2 one_le_two hs'0 hs'1 (by push_cast; linarith) + two_sub_logb_two_one_add_sqrt_three_pos.le le_rfl⟩ + +/-! ### Besov spaces by D4 coefficients -/ + +section Lp + +variable {p : ℝ≥0∞} [Fact (1 ≤ p)] + +/-- **Besov spaces by D4 coefficients, `p ≤ 2`**: let `1 ≤ p ≤ 2`, `1 ≤ q ≤ ∞` and `0 < s < 1`. +Then for every `f ∈ L_p(ℝ)`, +`‖f‖_p + ‖(2^(ks) ω_2(f, 2^(-k))_p)_k‖_{ℓ_q} < ∞` iff +`‖(⟨f, φ(· - k)⟩)_k‖_{ℓ_p} + ‖(2^(j(s + 1/2 - 1/p)) ‖(⟨f, ψ_{j,k}⟩)_k‖_{ℓ_p})_j‖_{ℓ_q} < ∞` +(`Daubechies.coeffNorm`), with the scaling function `φ` and the wavelet `ψ` of D4. This is +`Daubechies.besov_iff_coeff_of_le_two` with the growth bound `T^n 1 ≤ 4^n` +(`Daubechies.transferGrowth_two`), whose exponent is `2 - log₄ 4 = 1`; `p ≤ 2` forces `p < ∞`. +Differences of any order `r > s` give the same condition (`Rd.modNorm_le_modNorm_of_lt`). -/ +theorem besov_iff_coeff_d4_le_two (hp2 : p ≤ 2) {s : ℝ} (hs : 0 < s) (hs1 : s < 1) + {q : ℝ≥0∞} (hq : 1 ≤ q) (f : Lp ℂ p (volume : Measure ℝ)) : + ‖f‖ₑ + ENNReal.lqNorm q (fun k => dyadicWeight s k * Rd.lpModulus p 2 f k) < ∞ ↔ + coeffNorm d4 p s q f < ∞ := + besov_iff_coeff_of_le_two d4 le_rfl (ne_top_of_le_ne_top ENNReal.ofNat_ne_top hp2) hp2 + transferGrowth_two hs (by rw [Nat.cast_ofNat, two_sub_logb_four_four]; exact hs1) hq f + +/-- **Littlewood–Paley blocks and D4 coefficients, `p ≤ 2`**: let `1 ≤ p ≤ 2`, `1 ≤ q ≤ ∞` and +`0 < s < 1`. Then for every `f ∈ L_p(ℝ)` the Littlewood–Paley quasi-norm +`‖(2^(js) ‖Δ_j f‖_p)_j‖_{ℓ_q}` (`Rd.littlewoodPaleyNorm`) is finite iff the D4 coefficient +quasi-norm `Daubechies.coeffNorm` is (`Daubechies.littlewoodPaleyNorm_lt_top_iff_coeff_of_le_two` +with `Daubechies.transferGrowth_two`). -/ +theorem littlewoodPaleyNorm_lt_top_iff_coeff_d4_le_two (hp : p ≠ ∞) (hp2 : p ≤ 2) {s : ℝ} + (hs : 0 < s) (hs1 : s < 1) {q : ℝ≥0∞} (hq : 1 ≤ q) (f : Lp ℂ p (volume : Measure ℝ)) : + Rd.littlewoodPaleyNorm hp s q f < ∞ ↔ coeffNorm d4 p s q f < ∞ := + littlewoodPaleyNorm_lt_top_iff_coeff_of_le_two d4 le_rfl hp hp2 transferGrowth_two hs + (by rw [Nat.cast_ofNat, two_sub_logb_four_four]; exact hs1) hq f + +/-- **Besov spaces by D4 coefficients, `p ≥ 2`**: let `2 ≤ p < ∞`, `1 ≤ q ≤ ∞` and +`0 < s < 2/p + (1 - 2/p) α` with the Hölder exponent `α = 2 - log₂(1 + √3) ≈ 0.5500` of D4. +Then for every `f ∈ L_p(ℝ)`, +`‖f‖_p + ‖(2^(ks) ω_2(f, 2^(-k))_p)_k‖_{ℓ_q} < ∞` iff +`‖(⟨f, φ(· - k)⟩)_k‖_{ℓ_p} + ‖(2^(j(s + 1/2 - 1/p)) ‖(⟨f, ψ_{j,k}⟩)_k‖_{ℓ_p})_j‖_{ℓ_q} < ∞` +(`Daubechies.coeffNorm`). This is `Daubechies.besov_iff_coeff` with a Bernstein bound of an order +`θ > s` (`Daubechies.exists_bernsteinBound_d4_of_two_le`). The bound decreases from `1` at +`p = 2` to `α` as `p → ∞`. Differences of any order `r > s` give the same condition +(`Rd.modNorm_le_modNorm_of_lt`). -/ +theorem besov_iff_coeff_d4_two_le (hp : p ≠ ∞) (hp2 : 2 ≤ p) {s : ℝ} (hs : 0 < s) + (hsb : s < 2 / p.toReal + (1 - 2 / p.toReal) * (2 - Real.logb 2 (1 + √3))) {q : ℝ≥0∞} + (hq : 1 ≤ q) (f : Lp ℂ p (volume : Measure ℝ)) : + ‖f‖ₑ + ENNReal.lqNorm q (fun k => dyadicWeight s k * Rd.lpModulus p 2 f k) < ∞ ↔ + coeffNorm d4 p s q f < ∞ := by + obtain ⟨θ, hsθ, -, hB⟩ := exists_bernsteinBound_d4_of_two_le hp hp2 hsb + exact besov_iff_coeff d4 le_rfl hp hB hs hsθ hq f + +/-- **Littlewood–Paley blocks and D4 coefficients, `p ≥ 2`**: let `2 ≤ p < ∞`, `1 ≤ q ≤ ∞` and +`0 < s < 2/p + (1 - 2/p) α` with `α = 2 - log₂(1 + √3)`. Then for every `f ∈ L_p(ℝ)` the +Littlewood–Paley quasi-norm `‖(2^(js) ‖Δ_j f‖_p)_j‖_{ℓ_q}` (`Rd.littlewoodPaleyNorm`) is finite +iff the D4 coefficient quasi-norm `Daubechies.coeffNorm` is +(`Daubechies.littlewoodPaleyNorm_lt_top_iff_coeff` with the Bernstein bound of +`Daubechies.exists_bernsteinBound_d4_of_two_le`, whose order `θ ≤ 1` gives `s < 2`). -/ +theorem littlewoodPaleyNorm_lt_top_iff_coeff_d4_two_le (hp : p ≠ ∞) (hp2 : 2 ≤ p) {s : ℝ} + (hs : 0 < s) + (hsb : s < 2 / p.toReal + (1 - 2 / p.toReal) * (2 - Real.logb 2 (1 + √3))) {q : ℝ≥0∞} + (hq : 1 ≤ q) (f : Lp ℂ p (volume : Measure ℝ)) : + Rd.littlewoodPaleyNorm hp s q f < ∞ ↔ coeffNorm d4 p s q f < ∞ := by + obtain ⟨θ, hsθ, hθ1, hB⟩ := exists_bernsteinBound_d4_of_two_le hp hp2 hsb + exact littlewoodPaleyNorm_lt_top_iff_coeff d4 le_rfl hp hB hs hsθ (by push_cast; linarith) hq f + +/-- **Besov spaces by D4 coefficients for every `p`**: let `1 ≤ p < ∞`, `1 ≤ q ≤ ∞` and +`0 < s < α = 2 - log₂(1 + √3) ≈ 0.5500`. Then for every `f ∈ L_p(ℝ)`, +`‖f‖_p + ‖(2^(ks) ω_2(f, 2^(-k))_p)_k‖_{ℓ_q} < ∞` iff +`‖(⟨f, φ(· - k)⟩)_k‖_{ℓ_p} + ‖(2^(j(s + 1/2 - 1/p)) ‖(⟨f, ψ_{j,k}⟩)_k‖_{ℓ_p})_j‖_{ℓ_q} < ∞` +(`Daubechies.coeffNorm`). For `p ≤ 2` this is `Daubechies.besov_iff_coeff_d4_le_two`, since +`α < 1`; for `p ≥ 2` it is `Daubechies.besov_iff_coeff_d4_two_le`, since +`α ≤ 2/p + (1 - 2/p) α`. -/ +theorem besov_iff_coeff_d4 (hp : p ≠ ∞) {s : ℝ} (hs : 0 < s) + (hsα : s < 2 - Real.logb 2 (1 + √3)) {q : ℝ≥0∞} (hq : 1 ≤ q) + (f : Lp ℂ p (volume : Measure ℝ)) : + ‖f‖ₑ + ENNReal.lqNorm q (fun k => dyadicWeight s k * Rd.lpModulus p 2 f k) < ∞ ↔ + coeffNorm d4 p s q f < ∞ := by + have hα1 := two_sub_logb_two_one_add_sqrt_three_lt_one + rcases le_total p 2 with hp2 | hp2 + · exact besov_iff_coeff_d4_le_two hp2 hs (hsα.trans hα1) hq f + · have hw := two_div_toReal_mem_Icc hp hp2 + have h := mul_nonneg hw.1 (sub_nonneg.2 hα1.le) + exact besov_iff_coeff_d4_two_le hp hp2 hs (by linarith) hq f + +end Lp + +end Daubechies diff --git a/LeanPool/FunctionSpaces/Wavelets/Examples/Daubechies/DaubechiesPolynomial.lean b/LeanPool/FunctionSpaces/Wavelets/Examples/Daubechies/DaubechiesPolynomial.lean new file mode 100644 index 0000000000..363869a11d --- /dev/null +++ b/LeanPool/FunctionSpaces/Wavelets/Examples/Daubechies/DaubechiesPolynomial.lean @@ -0,0 +1,356 @@ +/- +Copyright (c) 2026 Mario Ullrich. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Mario Ullrich +-/ +module + +public import Mathlib.Algebra.Polynomial.Roots +public import Mathlib.Analysis.SpecialFunctions.Trigonometric.Bounds +public import Mathlib.Data.Nat.Choose.Sum +public import Mathlib.Topology.Algebra.Polynomial + +/- +Modified for Lean Pool: module names and imports adapted. +-/ + +/-! +# The Daubechies polynomial + +The orthonormal wavelets of Daubechies of order `N` are built from the polynomial +`P_N(y) = ∑_{k < N} C(N - 1 + k, k) y^k` (`Daubechies.daubPoly`), the first `N` terms of the +binomial series `(1 - y)^(-N) = ∑_k C(N - 1 + k, k) y^k`. Its key property is the +**Bézout identity** +`(1 - y)^N P_N(y) + y^N P_N(1 - y) = 1` for `N ≥ 1` +(`Daubechies.daubPoly_bezout`; evaluated: `Daubechies.eval_daubPoly_bezout`). It follows by +induction on `N`, starting from `P_1 = 1`, from the recurrence +`(1 - y) P_{N+1}(y) = P_N(y) + C(2N - 1, N) y^N - C(2N, N) y^(N+1)` +(`Daubechies.one_sub_mul_eval_daubPoly_succ`, as polynomials +`Daubechies.one_sub_X_mul_daubPoly_succ`; Pascal's rule) and `C(2N, N) = 2 C(2N - 1, N)` +(`Daubechies.choose_two_mul_eq_two_mul_choose`): from `N` to `N + 1` the summand +`(1 - y)^N P_N(y)` changes by `y^N (1 - y)^N (C(2N - 1, N) - C(2N, N) y)`, the summand +`y^N P_N(1 - y)` by `y^N (1 - y)^N (C(2N - 1, N) - C(2N, N) (1 - y))`, and these changes cancel. + +**Values and bounds.** For `N ≥ 1`: `P_N(0) = 1`, `P_N(1) = C(2N - 1, N)` (the hockey-stick +identity, Mathlib's `Nat.sum_range_add_choose`), and for `0 ≤ y ≤ 1` +`1 ≤ P_N(y) ≤ 1 + C(2N - 1, N) y` (`Daubechies.one_le_eval_daubPoly`, +`Daubechies.eval_daubPoly_le`), since `y^k ≤ y` for `k ≥ 1`. For `N ≥ 2`, +`C(2N - 1, N) < 4^(N - 1)` (`Daubechies.choose_lt_four_pow`, from Mathlib's +`Nat.sum_range_choose_halfway`). + +**The trigonometric form** `P(ξ) = P_N(sin²(πξ))` (`Daubechies.daubFun`) is the squared modulus +`|L(e^(-2πiξ))|²` of the polynomial factor `L` of a Daubechies mask of order `N`. It is +continuous, even and `1`-periodic, `P(ξ + 1/2) = P_N(cos²(πξ))`, `P(ξ) ≤ C(2N - 1, N)`, +`1 ≤ P(ξ)` for `N ≥ 1`, and `P(ξ) ≤ 1 + C(2N - 1, N) π² ξ²` (`Daubechies.daubFun_le`, from +`sin²(πξ) ≤ π² ξ²`). At +`y = sin²(πξ)`, where `1 - y = cos²(πξ)`, the Bézout identity becomes +`cos(πξ)^(2N) P(ξ) + sin(πξ)^(2N) P(ξ + 1/2) = 1` (`Daubechies.daubFun_bezout`), the source of +the quadrature mirror filter identity of the Daubechies masks. +-/ + +@[expose] public section + +open Polynomial +open scoped Real + +namespace Daubechies + +/-! ### The polynomial `P_N` -/ + +/-- **The Daubechies polynomial** of order `N`: `P_N(y) = ∑_{k < N} C(N - 1 + k, k) y^k`, the +first `N` terms of the binomial series `(1 - y)^(-N) = ∑_k C(N - 1 + k, k) y^k`. For `N = 0` +it is the zero polynomial. -/ +noncomputable def daubPoly (N : ℕ) : ℝ[X] := + ∑ k ∈ Finset.range N, C ((N - 1 + k).choose k : ℝ) * X ^ k + +/-- The value of `P_N` at a real number `y`: `P_N(y) = ∑_{k < N} C(N - 1 + k, k) y^k`. -/ +theorem eval_daubPoly (N : ℕ) (y : ℝ) : + (daubPoly N).eval y = ∑ k ∈ Finset.range N, ((N - 1 + k).choose k : ℝ) * y ^ k := by + simp only [daubPoly, eval_finsetSum, eval_mul, eval_C, eval_pow, eval_X] + +/-- `P_0 = 0`, the empty sum. -/ +theorem daubPoly_zero : daubPoly 0 = 0 := by + simp [daubPoly] + +/-- `P_1 = 1`. -/ +theorem daubPoly_one : daubPoly 1 = 1 := by + simp [daubPoly] + +/-- `P_2(y) = 1 + 2y`, the polynomial of the wavelet D4. -/ +theorem daubPoly_two : daubPoly 2 = 1 + 2 * X := by + refine Polynomial.funext fun y => ?_ + simp [eval_daubPoly, Finset.sum_range_succ] + +/-- `P_3(y) = 1 + 3y + 6y²`. -/ +theorem daubPoly_three : daubPoly 3 = 1 + 3 * X + 6 * X ^ 2 := by + refine Polynomial.funext fun y => ?_ + simp [eval_daubPoly, Finset.sum_range_succ, Nat.choose] + +/-- `P_N` has degree at most `N - 1`. -/ +theorem natDegree_daubPoly_le (N : ℕ) : (daubPoly N).natDegree ≤ N - 1 := + natDegree_sum_le_of_forall_le _ _ fun k hk => + (natDegree_C_mul_X_pow_le _ k).trans (by rw [Finset.mem_range] at hk; omega) + +/-- The constant term of `P_{M+1}` is `1`: +`P_{M+1}(y) = 1 + ∑_{k < M} C(M + k + 1, k + 1) y^(k+1)`. -/ +theorem eval_daubPoly_succ_eq_one_add (M : ℕ) (y : ℝ) : + (daubPoly (M + 1)).eval y = + 1 + ∑ k ∈ Finset.range M, ((M + (k + 1)).choose (k + 1) : ℝ) * y ^ (k + 1) := by + rw [eval_daubPoly, Finset.sum_range_succ', add_comm] + simp + +/-- `P_N(0) = 1` for `N ≥ 1`: only the constant term `C(N - 1, 0) = 1` survives. -/ +theorem eval_zero_daubPoly {N : ℕ} (hN : 1 ≤ N) : (daubPoly N).eval 0 = 1 := by + obtain ⟨M, rfl⟩ : ∃ M, N = M + 1 := ⟨N - 1, by omega⟩ + simp [eval_daubPoly_succ_eq_one_add] + +/-- **The value at `1`**: `P_N(1) = ∑_{k < N} C(N - 1 + k, k) = C(2N - 1, N)` for `N ≥ 1`, by the +symmetry `C(N - 1 + k, k) = C(N - 1 + k, N - 1)` (Mathlib's `Nat.choose_symm_add`) and the +hockey-stick identity `∑_{i ≤ n} C(i + m, m) = C(n + m + 1, m + 1)` (`Nat.sum_range_add_choose`). -/ +theorem eval_one_daubPoly {N : ℕ} (hN : 1 ≤ N) : + (daubPoly N).eval 1 = (2 * N - 1).choose N := by + obtain ⟨M, rfl⟩ : ∃ M, N = M + 1 := ⟨N - 1, by omega⟩ + have h : ∑ k ∈ Finset.range (M + 1), (M + 1 - 1 + k).choose k = + (2 * (M + 1) - 1).choose (M + 1) := by + rw [show 2 * (M + 1) - 1 = M + M + 1 by omega, ← Nat.sum_range_add_choose M M] + refine Finset.sum_congr rfl fun k _ => ?_ + rw [Nat.add_sub_cancel, add_comm M k] + exact Nat.choose_symm_add + rw [eval_daubPoly] + simp only [one_pow, mul_one] + exact_mod_cast h + +/-! ### The recurrence and the Bézout identity -/ + +/-- **The recurrence of the Daubechies polynomials**, evaluated: for every `N` and every real `y`, +`(1 - y) P_{N+1}(y) = P_N(y) + C(2N - 1, N) y^N - C(2N, N) y^(N+1)`. +On the left the constant term is `1`, the coefficient of `y^(k+1)` for `k < N` is +`C(N + k + 1, k + 1) - C(N + k, k) = C(N + k, k + 1)` (Pascal's rule, Mathlib's +`Nat.choose_succ_succ'`), and the top term is `-C(2N, N) y^(N+1)`; on the right +`P_N(y) + C(2N - 1, N) y^N = ∑_{k ≤ N} C(N - 1 + k, k) y^k` has the same coefficients. -/ +theorem one_sub_mul_eval_daubPoly_succ (N : ℕ) (y : ℝ) : + (1 - y) * (daubPoly (N + 1)).eval y = (daubPoly N).eval y + + ((2 * N - 1).choose N : ℝ) * y ^ N - ((2 * N).choose N : ℝ) * y ^ (N + 1) := by + -- `P_{N+1}(y)`, with Pascal's rule applied to the coefficients of `y^(k+1)` + have hA : (daubPoly (N + 1)).eval y = 1 + ∑ k ∈ Finset.range N, + ((N + k).choose k : ℝ) * y ^ (k + 1) + ∑ k ∈ Finset.range N, + ((N + k).choose (k + 1) : ℝ) * y ^ (k + 1) := by + rw [eval_daubPoly_succ_eq_one_add, add_assoc, ← Finset.sum_add_distrib] + congr 1 + refine Finset.sum_congr rfl fun k _ => ?_ + rw [← add_mul, ← Nat.cast_add, ← Nat.choose_succ_succ', add_assoc] + -- `y P_{N+1}(y)`, with the top term split off + have hB : y * (daubPoly (N + 1)).eval y = ∑ k ∈ Finset.range N, + ((N + k).choose k : ℝ) * y ^ (k + 1) + ((2 * N).choose N : ℝ) * y ^ (N + 1) := by + rw [eval_daubPoly, Finset.mul_sum, Finset.sum_range_succ] + congr 1 + · refine Finset.sum_congr rfl fun k _ => ?_ + rw [show N + 1 - 1 + k = N + k by omega] + ring + · rw [show N + 1 - 1 + N = 2 * N by omega] + ring + -- `P_N(y) + C(2N - 1, N) y^N`, with the constant term split off + have hC : (daubPoly N).eval y + ((2 * N - 1).choose N : ℝ) * y ^ N = 1 + ∑ k ∈ Finset.range N, + ((N + k).choose (k + 1) : ℝ) * y ^ (k + 1) := by + have h : (daubPoly N).eval y + ((2 * N - 1).choose N : ℝ) * y ^ N = + ∑ k ∈ Finset.range (N + 1), ((N - 1 + k).choose k : ℝ) * y ^ k := by + rw [Finset.sum_range_succ, eval_daubPoly, show N - 1 + N = 2 * N - 1 by omega] + rw [h, Finset.sum_range_succ', add_comm] + congr 1 + · simp + · refine Finset.sum_congr rfl fun k hk => ?_ + rw [Finset.mem_range] at hk + rw [show N - 1 + (k + 1) = N + k by omega] + linear_combination hA - hB - hC + +/-- **The recurrence of the Daubechies polynomials** as an identity of polynomials: +`(1 - X) P_{N+1} = P_N + C(2N - 1, N) X^N - C(2N, N) X^(N+1)` for every `N`. -/ +theorem one_sub_X_mul_daubPoly_succ (N : ℕ) : + (1 - X) * daubPoly (N + 1) = daubPoly N + C ((2 * N - 1).choose N : ℝ) * X ^ N - + C ((2 * N).choose N : ℝ) * X ^ (N + 1) := by + refine Polynomial.funext fun y => ?_ + simp only [eval_mul, eval_sub, eval_one, eval_X, eval_add, eval_C, eval_pow] + exact one_sub_mul_eval_daubPoly_succ N y + +/-- `C(2N, N) = 2 C(2N - 1, N)` for `N ≥ 1`: Pascal's rule +`C(2N, N) = C(2N - 1, N - 1) + C(2N - 1, N)` and the symmetry `C(2N - 1, N - 1) = C(2N - 1, N)` +(Mathlib's `Nat.choose_symm_half`). -/ +theorem choose_two_mul_eq_two_mul_choose {N : ℕ} (hN : 1 ≤ N) : + (2 * N).choose N = 2 * (2 * N - 1).choose N := by + obtain ⟨M, rfl⟩ : ∃ M, N = M + 1 := ⟨N - 1, by omega⟩ + rw [show 2 * (M + 1) - 1 = 2 * M + 1 by omega, show 2 * (M + 1) = 2 * M + 1 + 1 by ring, + Nat.choose_succ_succ' (2 * M + 1) M, Nat.choose_symm_half M] + ring + +/-- **The induction step of the Bézout identity**: for `N ≥ 1` the Bézout sum +`(1 - y)^N P_N(y) + y^N P_N(1 - y)` takes the same value at `N + 1` as at `N`. By the recurrence +the first summand changes by `y^N (1 - y)^N (C(2N - 1, N) - C(2N, N) y)` and the second by +`y^N (1 - y)^N (C(2N - 1, N) - C(2N, N) (1 - y))`; the changes add up to +`y^N (1 - y)^N (2 C(2N - 1, N) - C(2N, N)) = 0`. -/ +theorem eval_daubPoly_bezout_succ {N : ℕ} (hN : 1 ≤ N) (y : ℝ) : + (1 - y) ^ (N + 1) * (daubPoly (N + 1)).eval y + + y ^ (N + 1) * (daubPoly (N + 1)).eval (1 - y) = + (1 - y) ^ N * (daubPoly N).eval y + y ^ N * (daubPoly N).eval (1 - y) := by + have h1 := one_sub_mul_eval_daubPoly_succ N y + have h2 := one_sub_mul_eval_daubPoly_succ N (1 - y) + have hc : ((2 * N).choose N : ℝ) = 2 * ((2 * N - 1).choose N : ℝ) := by + exact_mod_cast choose_two_mul_eq_two_mul_choose hN + linear_combination (1 - y) ^ N * h1 + y ^ N * h2 - y ^ N * (1 - y) ^ N * hc + +/-- **The Bézout identity of the Daubechies polynomials**, evaluated: +`(1 - y)^N P_N(y) + y^N P_N(1 - y) = 1` for `N ≥ 1` and every real `y`, by induction from +`P_1 = 1`, where it reads `(1 - y) + y = 1`. -/ +theorem eval_daubPoly_bezout {N : ℕ} (hN : 1 ≤ N) (y : ℝ) : + (1 - y) ^ N * (daubPoly N).eval y + y ^ N * (daubPoly N).eval (1 - y) = 1 := by + induction N, hN using Nat.le_induction with + | base => simp [daubPoly_one] + | succ N hN ih => rw [eval_daubPoly_bezout_succ hN, ih] + +/-- **The Bézout identity of the Daubechies polynomials**: +`(1 - X)^N P_N + X^N P_N(1 - X) = 1` for `N ≥ 1`. It follows from the evaluated form +`Daubechies.eval_daubPoly_bezout`, since two real polynomials with the same values at every +real number are equal (Mathlib's `Polynomial.funext`). -/ +theorem daubPoly_bezout {N : ℕ} (hN : 1 ≤ N) : + (1 - X) ^ N * daubPoly N + X ^ N * (daubPoly N).comp (1 - X) = 1 := by + refine Polynomial.funext fun y => ?_ + simp only [eval_add, eval_mul, eval_pow, eval_sub, eval_one, eval_X, eval_comp] + exact eval_daubPoly_bezout hN y + +/-! ### Bounds -/ + +/-- `P_N(y) ≥ 0` for `y ≥ 0`: all coefficients of `P_N` are nonnegative. -/ +theorem eval_daubPoly_nonneg (N : ℕ) {y : ℝ} (hy : 0 ≤ y) : 0 ≤ (daubPoly N).eval y := by + rw [eval_daubPoly] + exact Finset.sum_nonneg fun k _ => by positivity + +/-- `P_N(y) ≥ 1` for `y ≥ 0` and `N ≥ 1`: the constant term is `1`, and the other terms are +nonnegative. -/ +theorem one_le_eval_daubPoly {N : ℕ} (hN : 1 ≤ N) {y : ℝ} (hy : 0 ≤ y) : + 1 ≤ (daubPoly N).eval y := by + obtain ⟨M, rfl⟩ : ∃ M, N = M + 1 := ⟨N - 1, by omega⟩ + rw [eval_daubPoly_succ_eq_one_add] + have : 0 ≤ ∑ k ∈ Finset.range M, ((M + (k + 1)).choose (k + 1) : ℝ) * y ^ (k + 1) := + Finset.sum_nonneg fun k _ => by positivity + linarith + +/-- On `[0, 1]` the polynomial `P_N` is bounded by its value at `1`, since `y^k ≤ 1` there. -/ +theorem eval_daubPoly_le_eval_one (N : ℕ) {y : ℝ} (hy0 : 0 ≤ y) (hy1 : y ≤ 1) : + (daubPoly N).eval y ≤ (daubPoly N).eval 1 := by + rw [eval_daubPoly, eval_daubPoly] + refine Finset.sum_le_sum fun k _ => ?_ + rw [one_pow, mul_one] + exact mul_le_of_le_one_right (Nat.cast_nonneg _) (pow_le_one₀ hy0 hy1) + +/-- `P_N(y) ≤ 1 + C(2N - 1, N) y` for `0 ≤ y ≤ 1` and every `N`: the constant term is `1`, the +other terms satisfy `y^k ≤ y`, and their coefficients add up to `P_N(1) - 1 = C(2N - 1, N) - 1` +(for `N = 0` the left side is `0`). -/ +theorem eval_daubPoly_le (N : ℕ) {y : ℝ} (hy0 : 0 ≤ y) (hy1 : y ≤ 1) : + (daubPoly N).eval y ≤ 1 + ((2 * N - 1).choose N : ℝ) * y := by + rcases N with _ | M + · simp only [daubPoly_zero, eval_zero] + positivity + · have h1 := eval_one_daubPoly (N := M + 1) (by omega) + rw [eval_daubPoly_succ_eq_one_add] at h1 ⊢ + simp only [one_pow, mul_one] at h1 + have hle : ∑ k ∈ Finset.range M, ((M + (k + 1)).choose (k + 1) : ℝ) * y ^ (k + 1) ≤ + (∑ k ∈ Finset.range M, ((M + (k + 1)).choose (k + 1) : ℝ)) * y := by + rw [Finset.sum_mul] + refine Finset.sum_le_sum fun k _ => ?_ + exact mul_le_mul_of_nonneg_left (pow_le_of_le_one hy0 hy1 (by omega)) (Nat.cast_nonneg _) + have hS : (∑ k ∈ Finset.range M, ((M + (k + 1)).choose (k + 1) : ℝ)) ≤ + ((2 * (M + 1) - 1).choose (M + 1) : ℝ) := by + linarith + have := mul_le_mul_of_nonneg_right hS hy0 + linarith + +/-- `C(2N - 1, N) < 4^(N - 1)` for `N ≥ 2`. With `N = M + 1`, `C(2M + 1, M + 1) = C(2M + 1, M)` +is a term of `∑_{i ≤ M} C(2M + 1, i) = 4^M` (Mathlib's `Nat.sum_range_choose_halfway`), and so is +`C(2M + 1, 0) = 1` since `M ≥ 1`. Equivalently `N - log₄(2 C(2N - 1, N)) > 1/2`. -/ +theorem choose_lt_four_pow {N : ℕ} (hN : 2 ≤ N) : (2 * N - 1).choose N < 4 ^ (N - 1) := by + obtain ⟨M, rfl⟩ : ∃ M, N = M + 1 := ⟨N - 1, by omega⟩ + rw [show 2 * (M + 1) - 1 = 2 * M + 1 by omega, Nat.add_sub_cancel, Nat.choose_symm_half, + ← Nat.sum_range_choose_halfway M, Finset.sum_range_succ] + have h0 : 1 ≤ ∑ i ∈ Finset.range M, (2 * M + 1).choose i := by + have := Finset.single_le_sum (f := fun i => (2 * M + 1).choose i) (fun i _ => Nat.zero_le _) + (Finset.mem_range.2 (show 0 < M by omega)) + simpa using this + omega + +/-! ### The trigonometric polynomial `P(ξ) = P_N(sin²(πξ))` -/ + +/-- **The trigonometric Daubechies polynomial** of order `N`: `P(ξ) = P_N(sin²(πξ))`. A +Daubechies mask of order `N` has a polynomial factor `L` with `|L(e^(-2πiξ))|² = P(ξ)`. -/ +noncomputable def daubFun (N : ℕ) (ξ : ℝ) : ℝ := (daubPoly N).eval (Real.sin (π * ξ) ^ 2) + +/-- `P` has period `1`, since `sin(π(ξ + 1)) = -sin(πξ)`. -/ +theorem daubFun_periodic (N : ℕ) : Function.Periodic (daubFun N) 1 := fun ξ => by + simp only [daubFun, mul_add, mul_one, Real.sin_add_pi, neg_sq] + +/-- `P` is even: `P(-ξ) = P(ξ)`. -/ +theorem daubFun_neg (N : ℕ) (ξ : ℝ) : daubFun N (-ξ) = daubFun N ξ := by + simp only [daubFun, mul_neg, Real.sin_neg, neg_sq] + +/-- `P(ξ + 1/2) = P_N(cos²(πξ))`, since `sin(π(ξ + 1/2)) = cos(πξ)`. -/ +theorem daubFun_add_half (N : ℕ) (ξ : ℝ) : + daubFun N (ξ + 1 / 2) = (daubPoly N).eval (Real.cos (π * ξ) ^ 2) := by + rw [daubFun, show π * (ξ + 1 / 2) = π * ξ + π / 2 by ring, Real.sin_add_pi_div_two] + +/-- `P(0) = P_N(0) = 1` for `N ≥ 1`. -/ +theorem daubFun_zero {N : ℕ} (hN : 1 ≤ N) : daubFun N 0 = 1 := by + simp [daubFun, eval_zero_daubPoly hN] + +/-- For `N = 2`: `P(ξ) = 1 + 2 sin²(πξ)`. -/ +theorem daubFun_two (ξ : ℝ) : daubFun 2 ξ = 1 + 2 * Real.sin (π * ξ) ^ 2 := by + simp [daubFun, daubPoly_two] + +/-- For `N = 3`: `P(ξ) = 1 + 3 sin²(πξ) + 6 sin⁴(πξ)`. -/ +theorem daubFun_three (ξ : ℝ) : + daubFun 3 ξ = 1 + 3 * Real.sin (π * ξ) ^ 2 + 6 * Real.sin (π * ξ) ^ 4 := by + simp only [daubFun, daubPoly_three, eval_add, eval_mul, eval_pow, eval_X, eval_one, + eval_ofNat] + ring + +/-- `P ≥ 0`. -/ +theorem daubFun_nonneg (N : ℕ) (ξ : ℝ) : 0 ≤ daubFun N ξ := + eval_daubPoly_nonneg N (sq_nonneg _) + +/-- `P ≥ 1` for `N ≥ 1`. -/ +theorem one_le_daubFun {N : ℕ} (hN : 1 ≤ N) (ξ : ℝ) : 1 ≤ daubFun N ξ := + one_le_eval_daubPoly hN (sq_nonneg _) + +/-- `P ≤ C(2N - 1, N)` for every `N`: for `N ≥ 1` this is the value of `P_N` at `1`, the maximum +of `P_N` on `[0, 1]`. -/ +theorem daubFun_le_choose (N : ℕ) (ξ : ℝ) : daubFun N ξ ≤ (2 * N - 1).choose N := by + rcases N with _ | M + · simp [daubFun, daubPoly_zero] + · rw [← eval_one_daubPoly (by omega)] + exact eval_daubPoly_le_eval_one _ (sq_nonneg _) (Real.sin_sq_le_one _) + +/-- `P(ξ) ≤ 1 + C(2N - 1, N) π² ξ²`, from `P_N(y) ≤ 1 + C(2N - 1, N) y` on `[0, 1]` and +`sin²(πξ) ≤ π² ξ²` (Mathlib's `Real.sin_sq_le_sq`). -/ +theorem daubFun_le (N : ℕ) (ξ : ℝ) : + daubFun N ξ ≤ 1 + ((2 * N - 1).choose N : ℝ) * π ^ 2 * ξ ^ 2 := by + have h := eval_daubPoly_le N (sq_nonneg (Real.sin (π * ξ))) (Real.sin_sq_le_one _) + have hs : Real.sin (π * ξ) ^ 2 ≤ π ^ 2 * ξ ^ 2 := by + rw [← mul_pow] + exact Real.sin_sq_le_sq + calc daubFun N ξ ≤ 1 + ((2 * N - 1).choose N : ℝ) * Real.sin (π * ξ) ^ 2 := h + _ ≤ 1 + ((2 * N - 1).choose N : ℝ) * (π ^ 2 * ξ ^ 2) := by gcongr + _ = 1 + ((2 * N - 1).choose N : ℝ) * π ^ 2 * ξ ^ 2 := by ring + +/-- `P` is continuous. -/ +theorem continuous_daubFun (N : ℕ) : Continuous (daubFun N) := by + unfold daubFun + fun_prop + +/-- **The trigonometric Bézout identity**: `cos(πξ)^(2N) P(ξ) + sin(πξ)^(2N) P(ξ + 1/2) = 1` for +`N ≥ 1`. This is the Bézout identity at `y = sin²(πξ)`, where `cos²(πξ) = 1 - y` and +`P(ξ + 1/2) = P_N(1 - y)`; it gives the quadrature mirror filter identity +`|m_0(ξ)|² + |m_0(ξ + 1/2)|² = 1` of the Daubechies masks. -/ +theorem daubFun_bezout {N : ℕ} (hN : 1 ≤ N) (ξ : ℝ) : + Real.cos (π * ξ) ^ (2 * N) * daubFun N ξ + + Real.sin (π * ξ) ^ (2 * N) * daubFun N (ξ + 1 / 2) = 1 := by + rw [daubFun_add_half, daubFun, pow_mul, pow_mul, Real.cos_sq'] + exact eval_daubPoly_bezout hN _ + +end Daubechies diff --git a/LeanPool/FunctionSpaces/Wavelets/Examples/Daubechies/Expansion.lean b/LeanPool/FunctionSpaces/Wavelets/Examples/Daubechies/Expansion.lean new file mode 100644 index 0000000000..d30b4e8cb2 --- /dev/null +++ b/LeanPool/FunctionSpaces/Wavelets/Examples/Daubechies/Expansion.lean @@ -0,0 +1,757 @@ +/- +Copyright (c) 2026 Mario Ullrich. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Mario Ullrich +-/ +module + +public import LeanPool.FunctionSpaces.Analysis.Maximal.DyadicGrid +public import LeanPool.FunctionSpaces.Wavelets.DyadicNormalisation +public import Mathlib.MeasureTheory.Measure.Haar.NormedSpace + +/- +Modified for Lean Pool: module names and imports adapted. +-/ + +/-! +# Expansions in dilated and translated generators + +Let `g : ℝ → ℂ` vanish outside a bounded interval `[a, b]`. Its dilated and translated copies +`g_{j,k}(x) = 2^(j/2) g(2^j x - k)` of level `j ∈ ℕ` and position `k ∈ ℤ` +(`Daubechies.scaledFun`) give the expansions and the coefficients + +`∑_{k ∈ ℤ} c_k g_{j,k}(x)` (`Daubechies.expand`) and +`⟨f, g_{j,k}⟩ = ∫ f(y) conj g_{j,k}(y) dy` (`Daubechies.coeffFun`). + +The file is generic in `g`, so that it serves the scaling function `φ` (support `[0, 2N - 1]`, +`FunctionSpaces.Wavelets.Examples.Daubechies.ExpansionScaling`) and the wavelet `ψ` alike. + +* **Finitely many terms.** `g_{j,k}` vanishes outside the support window + `{x : 2^j x - k ∈ [a, b]} = [(k + a)/2^j, (k + b)/2^j]` (`Daubechies.supportWindow`), and + every point lies in at most `M = ⌈b - a⌉ + 1` windows of one level + (`Daubechies.card_le_of_forall_mem_supportWindow`). Hence every expansion is a finite sum at + each point (`Daubechies.expand_eq_sum`), continuous if `g` is continuous + (`Daubechies.continuous_expand`), and a.e. strongly measurable if `g` is + (`Daubechies.aestronglyMeasurable_expand`). +* **Orthonormality and coefficient recovery.** The generators of level `0` are the integer + translates `g(· - k)` (`Daubechies.scaledFun_zero`). If these are orthonormal, then so are the + `g_{j,k}` of every level (`Daubechies.integral_scaledFun_mul_conj`, by the substitution + `u = 2^j x`, `Daubechies.integral_eq_two_pow_mul_integral_comp`), and + `⟨∑_l c_l g_{j,l}, g_{j,k}⟩ = c_k` for every coefficient sequence `c` + (`Daubechies.coeffFun_expand`). +* **Stability.** Let `1 ≤ p < ∞`, let `M = ⌈b - a⌉ + 1` be the overlap number and `p'` the + conjugate exponent. The upper estimate + `‖∑_k c_k g_{j,k}‖_p ≤ M^(1 - 1/p) ‖g‖_p 2^(j(1/2 - 1/p)) ‖c‖_{ℓ_p}` + (`Daubechies.eLpNorm_expand_le`) follows from the bounded overlap inequality + (`Rd.eLpNorm_rpow_le_of_overlap`) and `‖g_{j,k}‖_p = 2^(j(1/2 - 1/p)) ‖g‖_p` + (`Daubechies.eLpNorm_scaledFun`). The coefficient estimate + `‖(⟨f, g_{j,k}⟩)_k‖_{ℓ_p} ≤ M^(1/p) ‖g‖_{p'} 2^(-j(1/2 - 1/p)) ‖f‖_p` + (`Daubechies.lqNorm_coeffFun_le`) follows from Hölder's inequality on each window and the + window inequality `∑_k ∫_{W_k} F ≤ M ∫ F` (`MeasureTheory.tsum_setLIntegral_le_mul_lintegral`). + Together with coefficient recovery it gives the lower estimate + `2^(j(1/2 - 1/p)) ‖c‖_{ℓ_p} ≤ M^(1/p) ‖g‖_{p'} ‖∑_k c_k g_{j,k}‖_p` for orthonormal translates + (`Daubechies.lqNorm_le_eLpNorm_expand`). The constants (`Daubechies.expandConst`, + `Daubechies.coeffConst`) are the same for every level. +* **`L_p` membership and linearity.** Expansions with `ℓ_p` coefficients lie in `L_p` + (`Daubechies.memLp_expand`), and so does the expansion of the coefficients of an `L_p` + function (`Daubechies.memLp_expand_coeffFun`), with + `‖∑_k ⟨f, g_{j,k}⟩ g_{j,k}‖_p ≤ C C' ‖f‖_p` uniformly in the level + (`Daubechies.eLpNorm_expand_coeffFun_le`). Expansions are linear in the coefficients and the + coefficients are linear in `f` (`Daubechies.expand_add`, `Daubechies.expand_const_mul`, + `Daubechies.coeffFun_add`, `Daubechies.coeffFun_const_mul`). +-/ + +@[expose] public section + +open Filter MeasureTheory Topology +open scoped ENNReal ComplexConjugate +open ENNReal (dyadicWeight) + +namespace MeasureTheory + +/-- **The window inequality**: let `I_i`, `i ∈ ι`, be countably many measurable sets such that +every point lies in at most `M` of them (every finite set `S` of indices with `x ∈ I_i` for all +`i ∈ S` has at most `M` elements). Then `∑_i ∫_{I_i} F ≤ M ∫ F` for every a.e. measurable +`F : α → [0, ∞]`. Indeed `∑_i 1_{I_i}(x) F(x) ≤ M F(x)` at every point, and the sum and the +integral may be exchanged (Mathlib's `MeasureTheory.lintegral_tsum`). -/ +theorem tsum_setLIntegral_le_mul_lintegral {α ι : Type*} [MeasurableSpace α] [Countable ι] + {μ : Measure α} {I : ι → Set α} (hI : ∀ i, MeasurableSet (I i)) {M : ℕ} + (hM : ∀ x (S : Finset ι), (∀ i ∈ S, x ∈ I i) → S.card ≤ M) {F : α → ℝ≥0∞} + (hF : AEMeasurable F μ) : + ∑' i, ∫⁻ x in I i, F x ∂μ ≤ M * ∫⁻ x, F x ∂μ := by + have hpt : ∀ x, ∑' i, (I i).indicator F x ≤ M * F x := fun x => by + obtain ⟨T, hT, hTM⟩ := Rd.exists_finset_of_card_le (P := fun i => x ∈ I i) (hM x) + rw [tsum_eq_sum (s := T) fun i hi => Set.indicator_of_notMem (fun h => hi (hT i h)) _] + calc ∑ i ∈ T, (I i).indicator F x ≤ ∑ _i ∈ T, F x := + Finset.sum_le_sum fun i _ => Set.indicator_le_self _ _ x + _ = T.card * F x := by rw [Finset.sum_const, nsmul_eq_mul] + _ ≤ M * F x := by gcongr + calc ∑' i, ∫⁻ x in I i, F x ∂μ = ∑' i, ∫⁻ x, (I i).indicator F x ∂μ := by + congr 1 + funext i + rw [lintegral_indicator (hI i)] + _ = ∫⁻ x, ∑' i, (I i).indicator F x ∂μ := + (lintegral_tsum fun i => hF.indicator (hI i)).symm + _ ≤ ∫⁻ x, M * F x ∂μ := lintegral_mono hpt + _ = M * ∫⁻ x, F x ∂μ := lintegral_const_mul' _ _ (ENNReal.natCast_ne_top M) + +end MeasureTheory + +namespace Daubechies + +/-! ### Dilated and translated generators -/ + +section Generic + +variable {g : ℝ → ℂ} {a b : ℝ} + +/-- **The dilated and translated generator** `g_{j,k}(x) = 2^(j/2) g(2^j x - k)` of level +`j ∈ ℕ` and position `k ∈ ℤ`. The factor `2^(j/2)` makes the `L_2` norm independent of `j` and +`k`. For the scaling function `g = φ` these are the functions `φ_{j,k}` of the multiresolution +analysis (`Daubechies.scaled`). -/ +noncomputable def scaledFun (g : ℝ → ℂ) (j : ℕ) (k : ℤ) (x : ℝ) : ℂ := + (((2 : ℝ) ^ ((j : ℝ) / 2) : ℝ) : ℂ) * g (2 ^ j * x - k) + +/-- **The expansion** `∑_{k ∈ ℤ} c_k g_{j,k}(x)` of level `j` with coefficients `c : ℤ → ℂ`. If +`g` vanishes outside a bounded interval, only finitely many terms are nonzero at each point +(`Daubechies.expand_eq_sum`), so the sum is meaningful for every coefficient sequence. -/ +noncomputable def expand (g : ℝ → ℂ) (j : ℕ) (c : ℤ → ℂ) (x : ℝ) : ℂ := + ∑' k : ℤ, c k * scaledFun g j k x + +/-- **The coefficient functional** `⟨f, g_{j,k}⟩ = ∫ f(y) conj g_{j,k}(y) dy` of level `j` and +position `k`. For an orthonormal system it recovers the coefficients of an expansion +(`Daubechies.coeffFun_expand`). -/ +noncomputable def coeffFun (g : ℝ → ℂ) (j : ℕ) (f : ℝ → ℂ) (k : ℤ) : ℂ := + ∫ y, f y * conj (scaledFun g j k y) + +/-- **The support window** `{x : 2^j x - k ∈ [a, b]}` of level `j` and position `k`: the +interval `[(k + a)/2^j, (k + b)/2^j]` (`Daubechies.supportWindow_eq_Icc`) outside which +`g_{j,k}` vanishes when `g` vanishes outside `[a, b]` (`Daubechies.scaledFun_eq_zero`). -/ +def supportWindow (a b : ℝ) (j : ℕ) (k : ℤ) : Set ℝ := {x | (2 : ℝ) ^ j * x - k ∈ Set.Icc a b} + +/-- The support window is the interval `[(k + a)/2^j, (k + b)/2^j]`. -/ +theorem supportWindow_eq_Icc (a b : ℝ) (j : ℕ) (k : ℤ) : + supportWindow a b j k = Set.Icc ((k + a) / 2 ^ j) ((k + b) / 2 ^ j) := by + ext x + have h : (0 : ℝ) < 2 ^ j := by positivity + simp only [supportWindow, Set.mem_ofPred_eq, Set.mem_Icc, div_le_iff₀ h, le_div_iff₀ h] + constructor <;> rintro ⟨h1, h2⟩ <;> constructor <;> linarith + +/-- The support windows are measurable (closed intervals). -/ +theorem measurableSet_supportWindow (a b : ℝ) (j : ℕ) (k : ℤ) : + MeasurableSet (supportWindow a b j k) := by + rw [supportWindow_eq_Icc] + exact measurableSet_Icc + +/-- The support windows are compact (closed bounded intervals). -/ +theorem isCompact_supportWindow (a b : ℝ) (j : ℕ) (k : ℤ) : + IsCompact (supportWindow a b j k) := by + rw [supportWindow_eq_Icc] + exact isCompact_Icc + +/-- **Support of `g_{j,k}`**: if `g` vanishes outside `[a, b]`, then `g_{j,k}(x) = 0` for every +`x` outside the support window `{x : 2^j x - k ∈ [a, b]}`. -/ +theorem scaledFun_eq_zero (hsupp : ∀ x ∉ Set.Icc a b, g x = 0) {j : ℕ} {k : ℤ} {x : ℝ} + (hx : x ∉ supportWindow a b j k) : scaledFun g j k x = 0 := by + rw [scaledFun, hsupp _ hx, mul_zero] + +/-- If `g` vanishes outside `[a, b]` and `g_{j,k}(x) ≠ 0`, then `x` lies in the support window +`{x : 2^j x - k ∈ [a, b]}` (`Daubechies.scaledFun_eq_zero`). -/ +theorem mem_supportWindow_of_scaledFun_ne_zero (hsupp : ∀ x ∉ Set.Icc a b, g x = 0) {j : ℕ} + {k : ℤ} {x : ℝ} (h : scaledFun g j k x ≠ 0) : x ∈ supportWindow a b j k := + by_contra fun hx => h (scaledFun_eq_zero hsupp hx) + +/-- **`g_{j,k}` has compact support** if `g` vanishes outside `[a, b]`: it vanishes outside the +compact support window (`Daubechies.scaledFun_eq_zero`). -/ +theorem hasCompactSupport_scaledFun (hsupp : ∀ x ∉ Set.Icc a b, g x = 0) (j : ℕ) (k : ℤ) : + HasCompactSupport (scaledFun g j k) := + HasCompactSupport.intro (isCompact_supportWindow a b j k) fun _ hx => scaledFun_eq_zero hsupp hx + +/-- **`g_{j,k}` is continuous** if `g` is. -/ +theorem continuous_scaledFun (hg : Continuous g) (j : ℕ) (k : ℤ) : + Continuous (scaledFun g j k) := + continuous_const.mul (hg.comp ((continuous_const.mul continuous_id).sub continuous_const)) + +/-- **The generators of level `0` are the integer translates**: `g_{0,k}(x) = g(x - k)` for every +`g : ℝ → ℂ`, `k ∈ ℤ` and `x ∈ ℝ`, since `2^0 = 1`. -/ +theorem scaledFun_zero (g : ℝ → ℂ) (k : ℤ) (x : ℝ) : scaledFun g 0 k x = g (x - k) := by + simp [scaledFun] + +/-! ### Finitely many terms at each point -/ + +/-- **The integers in an interval**: if `t - k ∈ [a, b]` for an integer `k`, then +`⌈t - b⌉ ≤ k ≤ ⌊t - a⌋`. -/ +theorem mem_Icc_ceil_floor {t : ℝ} {k : ℤ} (h : t - k ∈ Set.Icc a b) : + k ∈ Finset.Icc ⌈t - b⌉ ⌊t - a⌋ := + Finset.mem_Icc.2 ⟨Int.ceil_le.2 (by linarith [h.2]), Int.le_floor.2 (by linarith [h.1])⟩ + +/-- **Counting integers in an interval of length `b - a`**: the integers `k` with +`⌈t - b⌉ ≤ k ≤ ⌊t - a⌋` number at most `⌈b - a⌉ + 1`, for all real `t`, `a`, `b`. -/ +theorem card_Icc_ceil_floor_le (t a b : ℝ) : + (Finset.Icc ⌈t - b⌉ ⌊t - a⌋).card ≤ ⌈b - a⌉₊ + 1 := by + rw [Int.card_Icc, Int.toNat_le] + have h1 := Int.floor_le (t - a) + have h2 := Int.le_ceil (t - b) + have h3 := Nat.le_ceil (b - a) + have h : ((⌊t - a⌋ + 1 - ⌈t - b⌉ : ℤ) : ℝ) ≤ ((⌈b - a⌉₊ + 1 : ℕ) : ℤ) := by + push_cast + linarith + exact_mod_cast h + +/-- **Bounded overlap of the support windows**: every point `x` lies in at most `⌈b - a⌉ + 1` +of the windows `{x : 2^j x - k ∈ [a, b]}`, `k ∈ ℤ`, of one level `j`: such `k` satisfy +`⌈2^j x - b⌉ ≤ k ≤ ⌊2^j x - a⌋` (`Daubechies.mem_Icc_ceil_floor`, +`Daubechies.card_Icc_ceil_floor_le`). -/ +theorem card_le_of_forall_mem_supportWindow {j : ℕ} (x : ℝ) (S : Finset ℤ) + (hS : ∀ k ∈ S, x ∈ supportWindow a b j k) : S.card ≤ ⌈b - a⌉₊ + 1 := + (Finset.card_le_card fun k hk => mem_Icc_ceil_floor (hS k hk)).trans + (card_Icc_ceil_floor_le _ a b) + +/-- **Expansions are finite sums**: if `g` vanishes outside `[a, b]`, then for every level `j`, +coefficients `c` and point `x`, +`∑_{k ∈ ℤ} c_k g_{j,k}(x) = ∑_{k = ⌈2^j x - b⌉}^{⌊2^j x - a⌋} c_k g_{j,k}(x)`. -/ +theorem expand_eq_sum (hsupp : ∀ x ∉ Set.Icc a b, g x = 0) (j : ℕ) (c : ℤ → ℂ) (x : ℝ) : + expand g j c x = + ∑ k ∈ Finset.Icc ⌈2 ^ j * x - b⌉ ⌊2 ^ j * x - a⌋, c k * scaledFun g j k x := + tsum_eq_sum fun _ hk => by + rw [scaledFun_eq_zero hsupp (fun hx => hk (mem_Icc_ceil_floor hx)), mul_zero] + +/-- The series `∑_k c_k g_{j,k}(x)` converges for every point `x`, if `g` vanishes outside +`[a, b]`: only finitely many terms are nonzero. -/ +theorem summable_expand (hsupp : ∀ x ∉ Set.Icc a b, g x = 0) (j : ℕ) (c : ℤ → ℂ) (x : ℝ) : + Summable fun k => c k * scaledFun g j k x := + summable_of_ne_finset_zero (s := Finset.Icc ⌈2 ^ j * x - b⌉ ⌊2 ^ j * x - a⌋) fun _ hk => by + rw [scaledFun_eq_zero hsupp (fun hx => hk (mem_Icc_ceil_floor hx)), mul_zero] + +/-- **Expansions are continuous**: if `g` is continuous and vanishes outside `[a, b]`, then +`x ↦ ∑_k c_k g_{j,k}(x)` is continuous for every level `j` and all coefficients `c`. Near a point +`x`, at all `y` with `|2^j y - 2^j x| < 1`, the expansion is the same finite sum over +`⌈2^j x - b - 1⌉ ≤ k ≤ ⌊2^j x - a + 1⌋`, a continuous function. -/ +theorem continuous_expand (hg : Continuous g) (hsupp : ∀ x ∉ Set.Icc a b, g x = 0) (j : ℕ) + (c : ℤ → ℂ) : Continuous (expand g j c) := by + refine continuous_iff_continuousAt.2 fun x => ?_ + have hU : ∀ᶠ y in 𝓝 x, (2 : ℝ) ^ j * y ∈ Set.Ioo ((2 : ℝ) ^ j * x - 1) (2 ^ j * x + 1) := + (continuous_const_mul ((2 : ℝ) ^ j)).continuousAt.preimage_mem_nhds + (Ioo_mem_nhds (by linarith) (by linarith)) + have hev : (fun y => ∑ k ∈ Finset.Icc ⌈2 ^ j * x - (b + 1)⌉ ⌊2 ^ j * x - (a - 1)⌋, + c k * scaledFun g j k y) =ᶠ[𝓝 x] expand g j c := by + filter_upwards [hU] with y hy + refine (tsum_eq_sum fun k hk => ?_).symm + refine by_contra fun h => hk (mem_Icc_ceil_floor ?_) + have hmem := mem_supportWindow_of_scaledFun_ne_zero hsupp (right_ne_zero_of_mul h) + exact ⟨by linarith [hmem.1, hy.2], by linarith [hmem.2, hy.1]⟩ + exact ((continuous_finsetSum _ fun k _ => + continuous_const.mul (continuous_scaledFun hg j k)).continuousAt).congr hev + +/-! ### Orthonormality at every level -/ + +/-- **The dyadic substitution**: `∫ g(u) du = 2^j ∫ g(2^j y) dy` for every `g : ℝ → ℂ` and every +`j ∈ ℕ`, by the substitution `u = 2^j y` (Mathlib's +`MeasureTheory.Measure.integral_comp_mul_left`). Both sides are `0` when `g` is not integrable. -/ +theorem integral_eq_two_pow_mul_integral_comp (g : ℝ → ℂ) (j : ℕ) : + ∫ u, g u = (2 : ℂ) ^ j * ∫ y, g (2 ^ j * y) := by + rw [Measure.integral_comp_mul_left, abs_of_pos (by positivity), Complex.real_smul, ← mul_assoc] + push_cast + rw [mul_inv_cancel₀ (pow_ne_zero _ two_ne_zero), one_mul] + +/-- **The product of two generators of one level**: +`g_{j,k}(x) conj g_{j,l}(x) = 2^j g(2^j x - k) conj g(2^j x - l)`, since the factor `2^(j/2)` is +real. -/ +theorem scaledFun_mul_conj (j : ℕ) (k l : ℤ) (x : ℝ) : + scaledFun g j k x * conj (scaledFun g j l x) = + (2 : ℂ) ^ j * (g (2 ^ j * x - k) * conj (g (2 ^ j * x - l))) := by + rw [scaledFun, scaledFun, map_mul, Complex.conj_ofReal, ← ofReal_two_rpow_half_mul_self j] + ring + +/-- **Orthonormality at every level**: if the integer translates of `g` are orthonormal, +`∫ g(x - k) conj g(x - l) dx = δ_{kl}` for all `k, l ∈ ℤ`, then so are the generators of every +level `j`: `∫ g_{j,k}(x) conj g_{j,l}(x) dx = δ_{kl}`. The substitution `u = 2^j x` +(`Daubechies.integral_eq_two_pow_mul_integral_comp`) cancels the factor `2^j` of +`Daubechies.scaledFun_mul_conj`. -/ +theorem integral_scaledFun_mul_conj + (horth : ∀ k l : ℤ, ∫ x, g (x - k) * conj (g (x - l)) = if k = l then 1 else 0) + (j : ℕ) (k l : ℤ) : + ∫ x, scaledFun g j k x * conj (scaledFun g j l x) = if k = l then 1 else 0 := by + have h := integral_eq_two_pow_mul_integral_comp (fun u => g (u - k) * conj (g (u - l))) j + simp_rw [scaledFun_mul_conj] + rw [integral_const_mul, ← h, horth] + +/-! ### Coefficient recovery -/ + +/-- **Generators of one level overlap only for nearby positions**: if `g` vanishes outside +`[a, b]`, then `g_{j,l}(y) conj g_{j,k}(y) = 0` for every `y` unless `|l - k| ≤ ⌈b - a⌉`. If both +factors are nonzero, then `2^j y - l` and `2^j y - k` lie in `[a, b]`, so `|l - k| ≤ b - a`. -/ +theorem scaledFun_mul_conj_eq_zero (hsupp : ∀ x ∉ Set.Icc a b, g x = 0) {j : ℕ} {k l : ℤ} + (hl : l ∉ Finset.Icc (k - ⌈b - a⌉₊) (k + ⌈b - a⌉₊)) (y : ℝ) : + scaledFun g j l y * conj (scaledFun g j k y) = 0 := by + by_contra h + obtain ⟨hl', hk'⟩ := mul_ne_zero_iff.1 h + have h1 := mem_supportWindow_of_scaledFun_ne_zero hsupp hl' + have h2 := mem_supportWindow_of_scaledFun_ne_zero hsupp fun h0 => hk' (by rw [h0, map_zero]) + have h3 := Nat.le_ceil (b - a) + refine hl (Finset.mem_Icc.2 ⟨?_, ?_⟩) + · have h4 : ((k - ⌈b - a⌉₊ : ℤ) : ℝ) ≤ l := by + push_cast + linarith [h1.2, h2.1] + exact_mod_cast h4 + · have h4 : (l : ℝ) ≤ ((k + ⌈b - a⌉₊ : ℤ) : ℝ) := by + push_cast + linarith [h1.1, h2.2] + exact_mod_cast h4 + +/-- If `g` is continuous and vanishes outside `[a, b]`, then `y ↦ g_{j,l}(y) conj g_{j,k}(y)` is +integrable: it is continuous with compact support. -/ +theorem integrable_scaledFun_mul_conj (hg : Continuous g) (hsupp : ∀ x ∉ Set.Icc a b, g x = 0) + (j : ℕ) (k l : ℤ) : Integrable fun y => scaledFun g j l y * conj (scaledFun g j k y) := + ((continuous_scaledFun hg j l).mul + (Complex.continuous_conj.comp (continuous_scaledFun hg j k))).integrable_of_hasCompactSupport + (hasCompactSupport_scaledFun hsupp j l).mul_right + +/-- **Coefficient recovery**: let `g` be continuous, vanish outside `[a, b]`, and have +orthonormal integer translates. Then for every level `j`, every coefficient sequence +`c : ℤ → ℂ` and every `k ∈ ℤ`, `⟨∑_l c_l g_{j,l}, g_{j,k}⟩ = c_k`. Only the positions `l` with +`|l - k| ≤ ⌈b - a⌉` contribute to the integrand (`Daubechies.scaledFun_mul_conj_eq_zero`), so it +is a finite sum, and orthonormality at level `j` (`Daubechies.integral_scaledFun_mul_conj`) leaves +the term `l = k`. The sequence `c` is arbitrary: at each point the sum over `l` is finite. -/ +theorem coeffFun_expand (hg : Continuous g) (hsupp : ∀ x ∉ Set.Icc a b, g x = 0) + (horth : ∀ k l : ℤ, ∫ x, g (x - k) * conj (g (x - l)) = if k = l then 1 else 0) + (j : ℕ) (c : ℤ → ℂ) (k : ℤ) : coeffFun g j (expand g j c) k = c k := by + have h : ∀ y, expand g j c y * conj (scaledFun g j k y) = + ∑ l ∈ Finset.Icc (k - ⌈b - a⌉₊) (k + ⌈b - a⌉₊), + c l * (scaledFun g j l y * conj (scaledFun g j k y)) := fun y => by + rw [expand, ← tsum_mul_right] + refine (tsum_eq_sum fun l hl => ?_).trans (Finset.sum_congr rfl fun l _ => mul_assoc _ _ _) + rw [mul_assoc, scaledFun_mul_conj_eq_zero hsupp hl, mul_zero] + rw [coeffFun] + simp_rw [h] + rw [integral_finsetSum _ fun l _ => (integrable_scaledFun_mul_conj hg hsupp j k l).const_mul _] + simp_rw [integral_const_mul, integral_scaledFun_mul_conj horth, mul_ite, mul_one, mul_zero] + exact Finset.sum_ite_eq_of_mem' _ _ _ (Finset.mem_Icc.2 ⟨by omega, by omega⟩) + +/-! ### Measurability and `L_p` norms of the generators -/ + +/-- For every a.e. strongly measurable `F : ℝ → ℂ`, `j ∈ ℕ` and `t ∈ ℝ`, the translate +`u ↦ F(u - t)` is a.e. strongly measurable for the image of Lebesgue measure under `x ↦ 2^j x`. +That image is `2^(-j)` times Lebesgue measure (Mathlib's `Real.map_volume_mul_left`), and +translations preserve Lebesgue measure. -/ +theorem aestronglyMeasurable_comp_sub_map {F : ℝ → ℂ} (hF : AEStronglyMeasurable F volume) + (j : ℕ) (t : ℝ) : + AEStronglyMeasurable (fun u => F (u - t)) (Measure.map (fun x => (2 : ℝ) ^ j * x) volume) := by + rw [Real.map_volume_mul_left (pow_ne_zero j two_ne_zero)] + exact (hF.comp_measurePreserving (measurePreserving_sub_right volume t)).smul_measure _ + +/-- **Dilation and translation preserve measurability**: for every a.e. strongly measurable +`F : ℝ → ℂ`, `j ∈ ℕ` and `t ∈ ℝ`, the function `x ↦ F(2^j x - t)` is a.e. strongly measurable +(`Daubechies.aestronglyMeasurable_comp_sub_map`). -/ +theorem aestronglyMeasurable_comp_two_pow_mul_sub {F : ℝ → ℂ} + (hF : AEStronglyMeasurable F volume) (j : ℕ) (t : ℝ) : + AEStronglyMeasurable (fun x => F (2 ^ j * x - t)) volume := + (aestronglyMeasurable_comp_sub_map hF j t).comp_aemeasurable + (measurable_const_mul _).aemeasurable + +/-- The generators `g_{j,k}` of an a.e. strongly measurable `g` are a.e. strongly measurable +(`Daubechies.aestronglyMeasurable_comp_two_pow_mul_sub`). -/ +theorem aestronglyMeasurable_scaledFun (hg : AEStronglyMeasurable g volume) (j : ℕ) (k : ℤ) : + AEStronglyMeasurable (scaledFun g j k) volume := + (aestronglyMeasurable_comp_two_pow_mul_sub hg j k).const_mul _ + +/-- **Expansions are a.e. strongly measurable** for every a.e. strongly measurable `g` and all +coefficients `c`: a countable sum of a.e. strongly measurable functions (Mathlib's +`MeasureTheory.AEStronglyMeasurable.tsum`). -/ +theorem aestronglyMeasurable_expand (hg : AEStronglyMeasurable g volume) (j : ℕ) (c : ℤ → ℂ) : + AEStronglyMeasurable (expand g j c) volume := + AEStronglyMeasurable.tsum fun k => (aestronglyMeasurable_scaledFun hg j k).const_mul (c k) + +/-- **Dilation and translation in `L_p`**: for every a.e. strongly measurable `F : ℝ → ℂ`, every +`j ∈ ℕ`, `t ∈ ℝ` and every exponent `p`, `‖F(2^j · - t)‖_p = 2^(-j/p) ‖F‖_p`. The image of +Lebesgue measure under `x ↦ 2^j x` is `2^(-j)` times Lebesgue measure (Mathlib's +`Real.map_volume_mul_left`), and translations preserve Lebesgue measure. For `p = ∞` the factor +is `1`, since then `1/p.toReal = 0` in Lean. -/ +theorem eLpNorm_comp_two_pow_mul_sub {F : ℝ → ℂ} (hF : AEStronglyMeasurable F volume) (j : ℕ) + (t : ℝ) (p : ℝ≥0∞) : + eLpNorm (fun x => F (2 ^ j * x - t)) p volume = + dyadicWeight (-(1 / p.toReal)) j * eLpNorm F p volume := by + have hc : ENNReal.ofReal |((2 : ℝ) ^ j)⁻¹| ≠ 0 := by + rw [ne_eq, ENNReal.ofReal_eq_zero, not_le] + positivity + rw [show (fun x => F (2 ^ j * x - t)) = (fun u => F (u - t)) ∘ fun x => (2 : ℝ) ^ j * x from rfl, + ← eLpNorm_map_measure (aestronglyMeasurable_comp_sub_map hF j t) + (measurable_const_mul _).aemeasurable, + Real.map_volume_mul_left (pow_ne_zero j two_ne_zero), + eLpNorm_smul_measure_of_ne_zero hc, smul_eq_mul, + show (fun u => F (u - t)) = F ∘ (fun u => u - t) from rfl, + eLpNorm_comp_measurePreserving hF (measurePreserving_sub_right volume t)] + congr 1 + rw [dyadicWeight, mul_neg, ENNReal.rpow_neg, ENNReal.rpow_mul, ENNReal.rpow_natCast, + ← ENNReal.inv_rpow, abs_of_pos (by positivity), ENNReal.ofReal_inv_of_pos (by positivity), + ENNReal.ofReal_pow zero_le_two, ENNReal.ofReal_ofNat, ENNReal.toReal_div, ENNReal.toReal_one] + +/-- **`L_p` norms of the generators**: for every a.e. strongly measurable `g`, every level `j`, +position `k` and exponent `p`, `‖g_{j,k}‖_p = 2^(j(1/2 - 1/p)) ‖g‖_p` +(`Daubechies.eLpNorm_comp_two_pow_mul_sub` and the factor `2^(j/2)`, +`enorm_two_rpow_half`). In particular +`‖g_{j,k}‖_2 = ‖g‖_2`. -/ +theorem eLpNorm_scaledFun (hg : AEStronglyMeasurable g volume) (j : ℕ) (k : ℤ) (p : ℝ≥0∞) : + eLpNorm (scaledFun g j k) p volume = + dyadicWeight (1 / 2 - 1 / p.toReal) j * eLpNorm g p volume := by + have h : scaledFun g j k = (((2 : ℝ) ^ ((j : ℝ) / 2) : ℝ) : ℂ) • fun x => g (2 ^ j * x - k) := + rfl + rw [h, eLpNorm_const_smul, eLpNorm_comp_two_pow_mul_sub hg, ← mul_assoc, sub_eq_add_neg, + ENNReal.dyadicWeight_add] + congr 2 + exact enorm_two_rpow_half j + +/-- **`L_p` norm of a multiple of a generator**: `‖z g_{j,k}‖_p = |z| 2^(j(1/2 - 1/p)) ‖g‖_p` for +every `z ∈ ℂ` (`Daubechies.eLpNorm_scaledFun`). -/ +theorem eLpNorm_const_mul_scaledFun (hg : AEStronglyMeasurable g volume) (z : ℂ) (j : ℕ) + (k : ℤ) (p : ℝ≥0∞) : + eLpNorm (fun x => z * scaledFun g j k x) p volume = + ‖z‖ₑ * (dyadicWeight (1 / 2 - 1 / p.toReal) j * eLpNorm g p volume) := by + rw [show (fun x => z * scaledFun g j k x) = z • scaledFun g j k from rfl, eLpNorm_const_smul, + eLpNorm_scaledFun hg] + +/-- A continuous `g` vanishing outside `[a, b]` lies in every `L_p`: it has compact support +(Mathlib's `Continuous.memLp_of_hasCompactSupport`). -/ +theorem memLp_of_continuous_of_eq_zero (hg : Continuous g) (hsupp : ∀ x ∉ Set.Icc a b, g x = 0) + (p : ℝ≥0∞) : MemLp g p volume := + hg.memLp_of_hasCompactSupport (HasCompactSupport.intro isCompact_Icc hsupp) + +/-! ### Upper stability of the expansions -/ + +/-- **Upper stability of the expansions**: let `g` be a.e. strongly measurable and vanish outside +`[a, b]`, and let `1 ≤ p < ∞`. Then for every level `j` and all coefficients `c : ℤ → ℂ`, +`‖∑_k c_k g_{j,k}‖_p ≤ M^(1 - 1/p) ‖g‖_p 2^(j(1/2 - 1/p)) ‖c‖_{ℓ_p}` with the overlap number +`M = ⌈b - a⌉ + 1`. The constant `M^(1 - 1/p) ‖g‖_p` (`Daubechies.expandConst`) is proportional to +`‖g‖_p`, depends on the support only through `b - a`, and is the same for every level `j` and +every `c`. At each point at most `M` terms are nonzero +(`Daubechies.card_le_of_forall_mem_supportWindow`), so +the bounded overlap inequality `‖∑_k F_k‖_p^p ≤ M^(p-1) ∑_k ‖F_k‖_p^p` +(`Rd.eLpNorm_rpow_le_of_overlap`) applies, and +`‖c_k g_{j,k}‖_p = |c_k| 2^(j(1/2 - 1/p)) ‖g‖_p` (`Daubechies.eLpNorm_const_mul_scaledFun`). -/ +theorem eLpNorm_expand_le (hg : AEStronglyMeasurable g volume) + (hsupp : ∀ x ∉ Set.Icc a b, g x = 0) {p : ℝ≥0∞} (hp1 : 1 ≤ p) (hp : p ≠ ∞) (j : ℕ) + (c : ℤ → ℂ) : + eLpNorm (expand g j c) p volume ≤ + ((⌈b - a⌉₊ + 1 : ℕ) : ℝ≥0∞) ^ (1 - 1 / p.toReal) * eLpNorm g p volume * + dyadicWeight (1 / 2 - 1 / p.toReal) j * ENNReal.lqNorm p (fun k => ‖c k‖ₑ) := by + have hp0 : p ≠ 0 := (zero_lt_one.trans_le hp1).ne' + have hr : 0 < p.toReal := ENNReal.toReal_pos hp0 hp + have h := Rd.eLpNorm_rpow_le_of_overlap (μ := volume) hp1 hp + (g := fun k x => c k * scaledFun g j k x) + (fun k => (aestronglyMeasurable_scaledFun hg j k).const_mul (c k)) (N := ⌈b - a⌉₊ + 1) + (fun x S hS => card_le_of_forall_mem_supportWindow x S fun k hk => + mem_supportWindow_of_scaledFun_ne_zero hsupp (right_ne_zero_of_mul (hS k hk))) + (aestronglyMeasurable_expand hg j c) (Eventually.of_forall fun x => rfl) + simp_rw [eLpNorm_const_mul_scaledFun hg] at h + rw [← ENNReal.rpow_le_rpow_iff hr] + refine h.trans (le_of_eq ?_) + have he : (1 - 1 / p.toReal) * p.toReal = p.toReal - 1 := by field_simp + simp only [ENNReal.mul_rpow_of_nonneg _ _ hr.le, ← ENNReal.rpow_mul, he] + rw [ENNReal.tsum_mul_right, ← ENNReal.lqNorm_rpow hp0 hp (fun k => ‖c k‖ₑ)] + ring + +/-- **The constant of the upper estimate** `Daubechies.eLpNorm_expand_le`: +`M^(1 - 1/p) ‖g‖_p` with the overlap number `M = ⌈b - a⌉ + 1`, which bounds the number of +generators of one level that are nonzero at a point. It is the same for every level. -/ +noncomputable def expandConst (g : ℝ → ℂ) (a b : ℝ) (p : ℝ≥0∞) : ℝ≥0∞ := + ((⌈b - a⌉₊ + 1 : ℕ) : ℝ≥0∞) ^ (1 - 1 / p.toReal) * eLpNorm g p volume + +/-- The constant `expandConst g a b p` is finite for every `g ∈ L_p`. -/ +theorem expandConst_ne_top (a b : ℝ) {p : ℝ≥0∞} (hg : MemLp g p volume) : + expandConst g a b p ≠ ∞ := + ENNReal.mul_ne_top (ENNReal.rpow_ne_top_of_ne_zero (by simp) (ENNReal.natCast_ne_top _)) + hg.eLpNorm_ne_top + +/-- **Expansions with `ℓ_p` coefficients lie in `L_p`**: if `g ∈ L_p` vanishes outside `[a, b]`, +`1 ≤ p < ∞` and `‖c‖_{ℓ_p} < ∞`, then `∑_k c_k g_{j,k} ∈ L_p` for every level `j`, since its norm +is finite by the upper estimate (`Daubechies.eLpNorm_expand_le`). -/ +theorem memLp_expand {p : ℝ≥0∞} (hg : MemLp g p volume) (hsupp : ∀ x ∉ Set.Icc a b, g x = 0) + (hp1 : 1 ≤ p) (hp : p ≠ ∞) (j : ℕ) {c : ℤ → ℂ} + (hc : ENNReal.lqNorm p (fun k => ‖c k‖ₑ) < ∞) : MemLp (expand g j c) p volume := + memLp_iff.2 ((eLpNorm_expand_le hg.aestronglyMeasurable hsupp hp1 hp j c).trans_lt + (ENNReal.mul_lt_top (ENNReal.mul_lt_top (expandConst_ne_top a b hg).lt_top + (ENNReal.dyadicWeight_lt_top _ _)) hc)) + +/-! ### The coefficient estimate -/ + +/-- **The conjugate exponent**: for `1 ≤ p ≤ ∞` and `p' = p/(p - 1)` (Mathlib's +`ENNReal.conjExponent`), the real exponents satisfy `1/p' = 1 - 1/p`, from `1/p + 1/p' = 1`; for +`p = 1` this reads `1/∞ = 0`, the value Lean assigns. -/ +theorem one_div_toReal_conjExponent {p : ℝ≥0∞} (hp1 : 1 ≤ p) : + 1 / (ENNReal.conjExponent p).toReal = 1 - 1 / p.toReal := by + have := ENNReal.HolderConjugate.conjExponent hp1 + have h := ENNReal.HolderConjugate.inv_add_inv_eq_one p (ENNReal.conjExponent p) + have hp' : p⁻¹ ≠ ∞ := ne_top_of_le_ne_top ENNReal.one_ne_top (le_self_add.trans_eq h) + have hq' : (ENNReal.conjExponent p)⁻¹ ≠ ∞ := + ne_top_of_le_ne_top ENNReal.one_ne_top (le_add_self.trans_eq h) + have h2 := congrArg ENNReal.toReal h + rw [ENNReal.toReal_add hp' hq', ENNReal.toReal_inv, ENNReal.toReal_inv, ENNReal.toReal_one] at h2 + rw [one_div, one_div] + linarith + +/-- **`L_{p'}` norms of the generators**: for `1 ≤ p` and the conjugate exponent `p'`, +`‖g_{j,k}‖_{p'} = 2^(-j(1/2 - 1/p)) ‖g‖_{p'}`, since `1/2 - 1/p' = -(1/2 - 1/p)` +(`Daubechies.eLpNorm_scaledFun`, `Daubechies.one_div_toReal_conjExponent`). -/ +theorem eLpNorm_scaledFun_conjExponent (hg : AEStronglyMeasurable g volume) {p : ℝ≥0∞} + (hp1 : 1 ≤ p) (j : ℕ) (k : ℤ) : + eLpNorm (scaledFun g j k) (ENNReal.conjExponent p) volume = + dyadicWeight (-(1 / 2 - 1 / p.toReal)) j * eLpNorm g (ENNReal.conjExponent p) volume := by + rw [eLpNorm_scaledFun hg, one_div_toReal_conjExponent hp1] + congr 2 + ring + +/-- **Hölder's inequality on a support window**: let `g` be a.e. strongly measurable and vanish +outside `[a, b]`, let `1 ≤ p`, and let `f` be a.e. strongly measurable. Then +`‖f conj g_{j,k}‖_1 ≤ ‖1_W f‖_p ‖g_{j,k}‖_{p'}` with the support window +`W = {x : 2^j x - k ∈ [a, b]}` and the conjugate exponent `p'`. Outside `W` the factor `g_{j,k}` +vanishes, so `f` may be replaced by `1_W f`; then Hölder's inequality (Mathlib's +`MeasureTheory.eLpNorm_le_eLpNorm_mul_eLpNorm`) applies. -/ +theorem eLpNorm_mul_conj_scaledFun_le (hg : AEStronglyMeasurable g volume) + (hsupp : ∀ x ∉ Set.Icc a b, g x = 0) {p : ℝ≥0∞} (hp1 : 1 ≤ p) {f : ℝ → ℂ} + (hf : AEStronglyMeasurable f volume) (j : ℕ) (k : ℤ) : + eLpNorm (fun y => f y * conj (scaledFun g j k y)) 1 volume ≤ + eLpNorm ((supportWindow a b j k).indicator f) p volume * + eLpNorm (scaledFun g j k) (ENNReal.conjExponent p) volume := by + have := ENNReal.HolderConjugate.conjExponent hp1 + have heq : (fun y => f y * conj (scaledFun g j k y)) = + fun y => (supportWindow a b j k).indicator f y * conj (scaledFun g j k y) := by + funext y + by_cases hy : y ∈ supportWindow a b j k + · rw [Set.indicator_of_mem hy] + · rw [scaledFun_eq_zero hsupp hy, map_zero, mul_zero, mul_zero] + have h := eLpNorm_le_eLpNorm_mul_eLpNorm (μ := volume) (p := p) + (q := ENNReal.conjExponent p) (r := 1) (fun u v : ℂ => u * conj v) 1 + (continuous_fst.mul (Complex.continuous_conj.comp continuous_snd)) + (hf.indicator (measurableSet_supportWindow a b j k)) (aestronglyMeasurable_scaledFun hg j k) + (Eventually.of_forall fun y => by simp) + rw [ENNReal.coe_one, one_mul] at h + rw [heq] + exact h + +/-- **A single coefficient**: under the hypotheses of `Daubechies.eLpNorm_mul_conj_scaledFun_le`, +`|⟨f, g_{j,k}⟩| ≤ ‖1_W f‖_p ‖g_{j,k}‖_{p'}` with the support window +`W = {x : 2^j x - k ∈ [a, b]}`, since `|∫ h| ≤ ‖h‖_1`. -/ +theorem enorm_coeffFun_le (hg : AEStronglyMeasurable g volume) + (hsupp : ∀ x ∉ Set.Icc a b, g x = 0) {p : ℝ≥0∞} (hp1 : 1 ≤ p) {f : ℝ → ℂ} + (hf : AEStronglyMeasurable f volume) (j : ℕ) (k : ℤ) : + ‖coeffFun g j f k‖ₑ ≤ eLpNorm ((supportWindow a b j k).indicator f) p volume * + eLpNorm (scaledFun g j k) (ENNReal.conjExponent p) volume := by + have hm : AEStronglyMeasurable (fun y => f y * conj (scaledFun g j k y)) volume := + hf.mul (Complex.continuous_conj.comp_aestronglyMeasurable + (aestronglyMeasurable_scaledFun hg j k)) + refine (eNorm_integral_le_lintegral_eNorm _).trans + (le_of_eq_of_le ?_ (eLpNorm_mul_conj_scaledFun_le hg hsupp hp1 hf j k)) + rw [eLpNorm_one_eq_lintegral_eNorm hm] + +/-- **Summing local bounds over the support windows**: let `1 ≤ p < ∞`, let `f` be a.e. strongly +measurable, and let `d : ℤ → [0, ∞]` satisfy `d_k ≤ ‖1_{W_k} f‖_p B` for every `k`, where +`W_k = {x : 2^j x - k ∈ [a, b]}` are the support windows of level `j`. Then +`‖d‖_{ℓ_p} ≤ M^(1/p) B ‖f‖_p` with the overlap number `M = ⌈b - a⌉ + 1`: the `p`-th powers satisfy +`∑_k d_k^p ≤ B^p ∑_k ∫_{W_k} |f|^p ≤ M B^p ‖f‖_p^p` by the window inequality +(`MeasureTheory.tsum_setLIntegral_le_mul_lintegral`, with the overlap bound +`Daubechies.card_le_of_forall_mem_supportWindow`). -/ +theorem lqNorm_le_of_le_eLpNorm_indicator {p : ℝ≥0∞} (hp1 : 1 ≤ p) (hp : p ≠ ∞) {f : ℝ → ℂ} + (hf : AEStronglyMeasurable f volume) (j : ℕ) {d : ℤ → ℝ≥0∞} {B : ℝ≥0∞} + (hd : ∀ k, d k ≤ eLpNorm ((supportWindow a b j k).indicator f) p volume * B) : + ENNReal.lqNorm p d ≤ + ((⌈b - a⌉₊ + 1 : ℕ) : ℝ≥0∞) ^ (1 / p.toReal) * B * eLpNorm f p volume := by + have hp0 : p ≠ 0 := (zero_lt_one.trans_le hp1).ne' + have hr : 0 < p.toReal := ENNReal.toReal_pos hp0 hp + have hk : ∀ k, d k ^ p.toReal ≤ + B ^ p.toReal * ∫⁻ x in supportWindow a b j k, ‖f x‖ₑ ^ p.toReal := fun k => by + calc d k ^ p.toReal + ≤ (eLpNorm ((supportWindow a b j k).indicator f) p volume * B) ^ p.toReal := + ENNReal.rpow_le_rpow (hd k) hr.le + _ = B ^ p.toReal * ∫⁻ x in supportWindow a b j k, ‖f x‖ₑ ^ p.toReal := by + rw [ENNReal.mul_rpow_of_nonneg _ _ hr.le, mul_comm, + eLpNorm_indicator_eq_eLpNorm_restrict + (measurableSet_supportWindow a b j k).nullMeasurableSet, + eLpNorm_rpow_eq hf.restrict hp0 hp] + have hsum : ∑' k, d k ^ p.toReal ≤ + B ^ p.toReal * (((⌈b - a⌉₊ + 1 : ℕ) : ℝ≥0∞) * eLpNorm f p volume ^ p.toReal) := by + calc ∑' k, d k ^ p.toReal + ≤ ∑' k, B ^ p.toReal * ∫⁻ x in supportWindow a b j k, ‖f x‖ₑ ^ p.toReal := + tsum_le_tsum hk + _ = B ^ p.toReal * ∑' k, ∫⁻ x in supportWindow a b j k, ‖f x‖ₑ ^ p.toReal := + ENNReal.tsum_mul_left + _ ≤ B ^ p.toReal * (((⌈b - a⌉₊ + 1 : ℕ) : ℝ≥0∞) * ∫⁻ x, ‖f x‖ₑ ^ p.toReal) := by + gcongr + exact tsum_setLIntegral_le_mul_lintegral (measurableSet_supportWindow a b j) + (fun x S hS => card_le_of_forall_mem_supportWindow x S hS) (hf.eNorm.pow_const _) + _ = B ^ p.toReal * (((⌈b - a⌉₊ + 1 : ℕ) : ℝ≥0∞) * eLpNorm f p volume ^ p.toReal) := by + rw [eLpNorm_rpow_eq hf hp0 hp] + rw [← ENNReal.rpow_le_rpow_iff hr, ENNReal.lqNorm_rpow hp0 hp] + refine hsum.trans (le_of_eq ?_) + simp only [ENNReal.mul_rpow_of_nonneg _ _ hr.le, ← ENNReal.rpow_mul, + one_div_mul_cancel hr.ne', ENNReal.rpow_one] + ring + +/-- **The coefficient estimate**: let `g` be a.e. strongly measurable and vanish outside +`[a, b]`, and let `1 ≤ p < ∞`. Then for every a.e. strongly measurable `f` and every level `j`, +`‖(⟨f, g_{j,k}⟩)_k‖_{ℓ_p} ≤ M^(1/p) ‖g‖_{p'} 2^(-j(1/2 - 1/p)) ‖f‖_p` with the overlap number +`M = ⌈b - a⌉ + 1` and the conjugate exponent `p'`. The constant `M^(1/p) ‖g‖_{p'}` +(`Daubechies.coeffConst`) is the same for every `j` and `f`. Each coefficient is bounded by +Hölder's inequality on its support window, `|⟨f, g_{j,k}⟩| ≤ ‖1_{W_k} f‖_p ‖g_{j,k}‖_{p'}` +(`Daubechies.enorm_coeffFun_le`) with `‖g_{j,k}‖_{p'} = 2^(-j(1/2 - 1/p)) ‖g‖_{p'}` +(`Daubechies.eLpNorm_scaledFun_conjExponent`), and the windows overlap at most `M` times +(`Daubechies.lqNorm_le_of_le_eLpNorm_indicator`). -/ +theorem lqNorm_coeffFun_le (hg : AEStronglyMeasurable g volume) + (hsupp : ∀ x ∉ Set.Icc a b, g x = 0) {p : ℝ≥0∞} (hp1 : 1 ≤ p) (hp : p ≠ ∞) {f : ℝ → ℂ} + (hf : AEStronglyMeasurable f volume) (j : ℕ) : + ENNReal.lqNorm p (fun k => ‖coeffFun g j f k‖ₑ) ≤ + ((⌈b - a⌉₊ + 1 : ℕ) : ℝ≥0∞) ^ (1 / p.toReal) * eLpNorm g (ENNReal.conjExponent p) volume * + dyadicWeight (-(1 / 2 - 1 / p.toReal)) j * eLpNorm f p volume := by + have h := lqNorm_le_of_le_eLpNorm_indicator (a := a) (b := b) hp1 hp hf j + (d := fun k => ‖coeffFun g j f k‖ₑ) + (B := dyadicWeight (-(1 / 2 - 1 / p.toReal)) j * eLpNorm g (ENNReal.conjExponent p) volume) + fun k => by + rw [← eLpNorm_scaledFun_conjExponent hg hp1 j k] + exact enorm_coeffFun_le hg hsupp hp1 hf j k + refine h.trans (le_of_eq ?_) + ring + +/-- **The constant of the coefficient estimate** `Daubechies.lqNorm_coeffFun_le`: +`M^(1/p) ‖g‖_{p'}` with the overlap number `M = ⌈b - a⌉ + 1` and the conjugate exponent +`p' = p/(p - 1)` (Mathlib's `ENNReal.conjExponent`). It is the same for every level. -/ +noncomputable def coeffConst (g : ℝ → ℂ) (a b : ℝ) (p : ℝ≥0∞) : ℝ≥0∞ := + ((⌈b - a⌉₊ + 1 : ℕ) : ℝ≥0∞) ^ (1 / p.toReal) * eLpNorm g (ENNReal.conjExponent p) volume + +/-- The constant `coeffConst g a b p` is finite for every `g ∈ L_{p'}`, `p'` the conjugate +exponent. -/ +theorem coeffConst_ne_top (a b : ℝ) {p : ℝ≥0∞} (hg : MemLp g (ENNReal.conjExponent p) volume) : + coeffConst g a b p ≠ ∞ := + ENNReal.mul_ne_top (ENNReal.rpow_ne_top_of_ne_zero (by simp) (ENNReal.natCast_ne_top _)) + hg.eLpNorm_ne_top + +/-- **The coefficient estimate, weighted form**: +`2^(j(1/2 - 1/p)) ‖(⟨f, g_{j,k}⟩)_k‖_{ℓ_p} ≤ C' ‖f‖_p` with `C' = coeffConst g a b p`, under the +hypotheses of `Daubechies.lqNorm_coeffFun_le`, since `2^(j(1/2 - 1/p)) 2^(-j(1/2 - 1/p)) = 1`. -/ +theorem dyadicWeight_mul_lqNorm_coeffFun_le (hg : AEStronglyMeasurable g volume) + (hsupp : ∀ x ∉ Set.Icc a b, g x = 0) {p : ℝ≥0∞} (hp1 : 1 ≤ p) (hp : p ≠ ∞) {f : ℝ → ℂ} + (hf : AEStronglyMeasurable f volume) (j : ℕ) : + dyadicWeight (1 / 2 - 1 / p.toReal) j * ENNReal.lqNorm p (fun k => ‖coeffFun g j f k‖ₑ) ≤ + coeffConst g a b p * eLpNorm f p volume := by + calc dyadicWeight (1 / 2 - 1 / p.toReal) j * ENNReal.lqNorm p (fun k => ‖coeffFun g j f k‖ₑ) + ≤ dyadicWeight (1 / 2 - 1 / p.toReal) j * (coeffConst g a b p * + dyadicWeight (-(1 / 2 - 1 / p.toReal)) j * eLpNorm f p volume) := + mul_le_mul_right (lqNorm_coeffFun_le hg hsupp hp1 hp hf j) _ + _ = coeffConst g a b p * eLpNorm f p volume * (dyadicWeight (1 / 2 - 1 / p.toReal) j * + dyadicWeight (-(1 / 2 - 1 / p.toReal)) j) := by ring + _ = coeffConst g a b p * eLpNorm f p volume := by + rw [ENNReal.dyadicWeight_mul_neg_self, mul_one] + +/-- **Lower stability of the expansions**: let `g` be continuous, vanish outside `[a, b]`, and +have orthonormal integer translates, and let `1 ≤ p < ∞`. Then for every level `j` and all +coefficients `c : ℤ → ℂ`, `2^(j(1/2 - 1/p)) ‖c‖_{ℓ_p} ≤ C' ‖∑_k c_k g_{j,k}‖_p` with the constant +`C' = coeffConst g a b p`. The coefficients are recovered from the expansion, +`c_k = ⟨∑_l c_l g_{j,l}, g_{j,k}⟩` (`Daubechies.coeffFun_expand`), and the coefficient estimate +(`Daubechies.dyadicWeight_mul_lqNorm_coeffFun_le`) applies to the continuous expansion. -/ +theorem lqNorm_le_eLpNorm_expand (hg : Continuous g) (hsupp : ∀ x ∉ Set.Icc a b, g x = 0) + (horth : ∀ k l : ℤ, ∫ x, g (x - k) * conj (g (x - l)) = if k = l then 1 else 0) + {p : ℝ≥0∞} (hp1 : 1 ≤ p) (hp : p ≠ ∞) (j : ℕ) (c : ℤ → ℂ) : + dyadicWeight (1 / 2 - 1 / p.toReal) j * ENNReal.lqNorm p (fun k => ‖c k‖ₑ) ≤ + coeffConst g a b p * eLpNorm (expand g j c) p volume := by + have h := dyadicWeight_mul_lqNorm_coeffFun_le hg.aestronglyMeasurable hsupp hp1 hp + (continuous_expand hg hsupp j c).aestronglyMeasurable j + simp only [coeffFun_expand hg hsupp horth] at h + exact h + +/-! ### Expansions of the coefficients of `L_p` functions -/ + +/-- **`L_p` functions have `ℓ_p` coefficients**: if `g` is continuous and vanishes outside +`[a, b]`, `1 ≤ p < ∞` and `f ∈ L_p`, then `‖(⟨f, g_{j,k}⟩)_k‖_{ℓ_p} < ∞` for every level `j` +(`Daubechies.lqNorm_coeffFun_le`). -/ +theorem lqNorm_coeffFun_lt_top (hg : Continuous g) (hsupp : ∀ x ∉ Set.Icc a b, g x = 0) + {p : ℝ≥0∞} (hp1 : 1 ≤ p) (hp : p ≠ ∞) {f : ℝ → ℂ} (hf : MemLp f p volume) (j : ℕ) : + ENNReal.lqNorm p (fun k => ‖coeffFun g j f k‖ₑ) < ∞ := + (lqNorm_coeffFun_le hg.aestronglyMeasurable hsupp hp1 hp hf.aestronglyMeasurable j).trans_lt + (ENNReal.mul_lt_top (ENNReal.mul_lt_top + (coeffConst_ne_top a b (memLp_of_continuous_of_eq_zero hg hsupp _)).lt_top + (ENNReal.dyadicWeight_lt_top _ _)) hf.eLpNorm_lt_top) + +/-- **The expansion of the coefficients is bounded on `L_p`, uniformly in the level**: if `g` is +a.e. strongly measurable and vanishes outside `[a, b]` and `1 ≤ p < ∞`, then for every a.e. +strongly measurable `f` and every level `j`, `‖∑_k ⟨f, g_{j,k}⟩ g_{j,k}‖_p ≤ C C' ‖f‖_p` with the +constants `C = expandConst g a b p` and `C' = coeffConst g a b p`: the upper estimate +(`Daubechies.eLpNorm_expand_le`) and the coefficient estimate +(`Daubechies.dyadicWeight_mul_lqNorm_coeffFun_le`), whose dyadic weights cancel. -/ +theorem eLpNorm_expand_coeffFun_le (hg : AEStronglyMeasurable g volume) + (hsupp : ∀ x ∉ Set.Icc a b, g x = 0) {p : ℝ≥0∞} (hp1 : 1 ≤ p) (hp : p ≠ ∞) {f : ℝ → ℂ} + (hf : AEStronglyMeasurable f volume) (j : ℕ) : + eLpNorm (expand g j (coeffFun g j f)) p volume ≤ + expandConst g a b p * coeffConst g a b p * eLpNorm f p volume := by + calc eLpNorm (expand g j (coeffFun g j f)) p volume + ≤ expandConst g a b p * (dyadicWeight (1 / 2 - 1 / p.toReal) j * + ENNReal.lqNorm p (fun k => ‖coeffFun g j f k‖ₑ)) := + (eLpNorm_expand_le hg hsupp hp1 hp j _).trans_eq (by rw [expandConst, mul_assoc]) + _ ≤ expandConst g a b p * (coeffConst g a b p * eLpNorm f p volume) := + mul_le_mul_right (dyadicWeight_mul_lqNorm_coeffFun_le hg hsupp hp1 hp hf j) _ + _ = expandConst g a b p * coeffConst g a b p * eLpNorm f p volume := (mul_assoc _ _ _).symm + +/-- **The expansion of the coefficients of an `L_p` function lies in `L_p`**: if `g` is +continuous and vanishes outside `[a, b]`, `1 ≤ p < ∞` and `f ∈ L_p`, then +`∑_k ⟨f, g_{j,k}⟩ g_{j,k} ∈ L_p` for every level `j` (`Daubechies.eLpNorm_expand_coeffFun_le`). -/ +theorem memLp_expand_coeffFun (hg : Continuous g) (hsupp : ∀ x ∉ Set.Icc a b, g x = 0) + {p : ℝ≥0∞} (hp1 : 1 ≤ p) (hp : p ≠ ∞) {f : ℝ → ℂ} (hf : MemLp f p volume) (j : ℕ) : + MemLp (expand g j (coeffFun g j f)) p volume := + memLp_iff.2 ((eLpNorm_expand_coeffFun_le hg.aestronglyMeasurable hsupp hp1 hp + hf.aestronglyMeasurable j).trans_lt (ENNReal.mul_lt_top (ENNReal.mul_lt_top + (expandConst_ne_top a b (memLp_of_continuous_of_eq_zero hg hsupp p)).lt_top + (coeffConst_ne_top a b (memLp_of_continuous_of_eq_zero hg hsupp _)).lt_top) + hf.eLpNorm_lt_top)) + +/-! ### Linearity -/ + +/-- **Expansions are additive in the coefficients**: if `g` vanishes outside `[a, b]`, then +`∑_k (c_k + d_k) g_{j,k}(x) = ∑_k c_k g_{j,k}(x) + ∑_k d_k g_{j,k}(x)` at every point `x`; both +sums are finite (`Daubechies.summable_expand`). -/ +theorem expand_add (hsupp : ∀ x ∉ Set.Icc a b, g x = 0) (j : ℕ) (c d : ℤ → ℂ) (x : ℝ) : + expand g j (fun k => c k + d k) x = expand g j c x + expand g j d x := by + simp only [expand, add_mul] + exact (summable_expand hsupp j c x).tsum_add (summable_expand hsupp j d x) + +/-- **Expansions are homogeneous in the coefficients**: +`∑_k (z c_k) g_{j,k}(x) = z ∑_k c_k g_{j,k}(x)` for every `z ∈ ℂ` and every point `x`. -/ +theorem expand_const_mul (j : ℕ) (z : ℂ) (c : ℤ → ℂ) (x : ℝ) : + expand g j (fun k => z * c k) x = z * expand g j c x := by + simp only [expand, mul_assoc] + exact tsum_mul_left + +/-- **The coefficients depend only on the class of `f` almost everywhere**: if `f = f'` almost +everywhere, then `⟨f, g_{j,k}⟩ = ⟨f', g_{j,k}⟩` (Mathlib's `MeasureTheory.integral_congr_ae`). -/ +theorem coeffFun_congr_ae {f f' : ℝ → ℂ} (h : f =ᵐ[volume] f') (j : ℕ) (k : ℤ) : + coeffFun g j f k = coeffFun g j f' k := + integral_congr_ae (h.mono fun y hy => by simp only [hy]) + +/-- **The integrands of the coefficients of `L_p` functions are integrable**: if `g` is continuous +and vanishes outside `[a, b]`, `1 ≤ p` and `f ∈ L_p`, then `f conj g_{j,k}` is integrable, by +Hölder's inequality with `conj g_{j,k} ∈ L_{p'}` (Mathlib's `MeasureTheory.MemLp.integrable_mul`). +-/ +theorem integrable_mul_conj_scaledFun (hg : Continuous g) (hsupp : ∀ x ∉ Set.Icc a b, g x = 0) + {p : ℝ≥0∞} (hp1 : 1 ≤ p) {f : ℝ → ℂ} (hf : MemLp f p volume) (j : ℕ) (k : ℤ) : + Integrable fun y => f y * conj (scaledFun g j k y) := by + have := ENNReal.HolderConjugate.conjExponent hp1 + exact hf.integrable_mul (q := ENNReal.conjExponent p) + ((Complex.continuous_conj.comp (continuous_scaledFun hg j k)).memLp_of_hasCompactSupport + ((hasCompactSupport_scaledFun hsupp j k).comp_left (map_zero _))) + +/-- **The coefficients are additive in `f`**: `⟨f + f', g_{j,k}⟩ = ⟨f, g_{j,k}⟩ + ⟨f', g_{j,k}⟩` +when both integrands are integrable (for instance for `f, f' ∈ L_p`, +`Daubechies.integrable_mul_conj_scaledFun`). -/ +theorem coeffFun_add {f f' : ℝ → ℂ} {j : ℕ} {k : ℤ} + (hf : Integrable fun y => f y * conj (scaledFun g j k y)) + (hf' : Integrable fun y => f' y * conj (scaledFun g j k y)) : + coeffFun g j (fun y => f y + f' y) k = coeffFun g j f k + coeffFun g j f' k := by + simp only [coeffFun, add_mul] + exact integral_add hf hf' + +/-- **The coefficients are homogeneous in `f`**: `⟨z f, g_{j,k}⟩ = z ⟨f, g_{j,k}⟩` for every +`z ∈ ℂ` (Mathlib's `MeasureTheory.integral_const_mul`). -/ +theorem coeffFun_const_mul (z : ℂ) (f : ℝ → ℂ) (j : ℕ) (k : ℤ) : + coeffFun g j (fun y => z * f y) k = z * coeffFun g j f k := by + simp only [coeffFun, mul_assoc] + exact integral_const_mul z _ + +end Generic + +end Daubechies diff --git a/LeanPool/FunctionSpaces/Wavelets/Examples/Daubechies/ExpansionScaling.lean b/LeanPool/FunctionSpaces/Wavelets/Examples/Daubechies/ExpansionScaling.lean new file mode 100644 index 0000000000..020d29af4d --- /dev/null +++ b/LeanPool/FunctionSpaces/Wavelets/Examples/Daubechies/ExpansionScaling.lean @@ -0,0 +1,126 @@ +/- +Copyright (c) 2026 Mario Ullrich. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Mario Ullrich +-/ +module + +public import LeanPool.FunctionSpaces.Wavelets.Examples.Daubechies.Expansion +public import LeanPool.FunctionSpaces.Wavelets.Examples.Daubechies.Orthonormality + +/- +Modified for Lean Pool: module names and imports adapted. +-/ + +/-! +# The scaling functions of every level + +For a Daubechies mask of order `N ≥ 2` with filter coefficients `c_k` (`Daubechies.coeff`) and +scaling function `φ` (`Daubechies.scalingFun`), the functions of the multiresolution analysis are + +`φ_{j,k}(x) = 2^(j/2) φ(2^j x - k)`, `j ∈ ℕ`, `k ∈ ℤ` (`Daubechies.scaled`), + +the generic generators `Daubechies.scaledFun` of +`FunctionSpaces.Wavelets.Examples.Daubechies.Expansion` for `g = φ`. The scaling function is +continuous and vanishes outside `[0, 2N - 1]` (`Daubechies.continuous_scalingFun`, +`Daubechies.scalingFun_eq_zero`), so every result of that file applies with `a = 0` and +`b = 2N - 1`. This file adds what is particular to `φ`: + +* `φ_{j,k}` vanishes outside `[k/2^j, (k + 2N - 1)/2^j]` (`Daubechies.scaled_eq_zero`); +* **orthonormality at every level**, `∫ φ_{j,k} conj φ_{j,l} = δ_{kl}` + (`Daubechies.integral_scaled_mul_conj`), from the orthonormality of the integer translates + (`Daubechies.integral_scalingFun_translate_mul_conj_translate`), and with it coefficient + recovery `⟨∑_l c_l φ_{j,l}, φ_{j,k}⟩ = c_k` (`Daubechies.coeffFun_expand_scalingFun`); +* **the refinement relation between levels**, + `φ_{j,k} = ∑_{i=0}^{2N-1} (c_i/√2) φ_{j+1,2k+i}` (`Daubechies.scaled_refine`), the refinement + equation `φ(y) = ∑_i c_i φ(2y - i)` (`Daubechies.scalingFun_refine`) at `y = 2^j x - k`; as an + expansion of level `j + 1` it reads `φ_{j,k} = ∑_{n ∈ ℤ} (c_{n-2k}/√2) φ_{j+1,n}` + (`Daubechies.scaled_eq_expand`). +-/ + +@[expose] public section + +open MeasureTheory +open scoped ComplexConjugate + +namespace Daubechies + +variable {N : ℕ} (m : Mask N) + +/-- **The functions `φ_{j,k}` of the multiresolution analysis**: +`φ_{j,k}(x) = 2^(j/2) φ(2^j x - k)` for the scaling function `φ` (`Daubechies.scalingFun`), the +level `j ∈ ℕ` and the position `k ∈ ℤ`; this is the generic `Daubechies.scaledFun` for `g = φ`. +-/ +noncomputable abbrev scaled (j : ℕ) (k : ℤ) : ℝ → ℂ := scaledFun (scalingFun m) j k + +/-- **Support of `φ_{j,k}`**: for `N ≥ 2`, `φ_{j,k}(x) = 0` for every `x` outside +`[k/2^j, (k + 2N - 1)/2^j]`, since `φ` vanishes outside `[0, 2N - 1]` +(`Daubechies.scalingFun_eq_zero`, `Daubechies.supportWindow_eq_Icc`). -/ +theorem scaled_eq_zero (hN : 2 ≤ N) {j : ℕ} {k : ℤ} {x : ℝ} + (hx : x ∉ Set.Icc ((k : ℝ) / 2 ^ j) ((k + (2 * N - 1)) / 2 ^ j)) : scaled m j k x = 0 := + scaledFun_eq_zero (fun _ hy => scalingFun_eq_zero m hN hy) + (by rwa [supportWindow_eq_Icc, add_zero]) + +/-- **Orthonormality at every level**: for `N ≥ 2`, every level `j` and all positions `k, l`, +`∫ φ_{j,k}(x) conj φ_{j,l}(x) dx` is `1` for `k = l` and `0` otherwise +(`Daubechies.integral_scaledFun_mul_conj` and the orthonormality of the integer translates, +`Daubechies.integral_scalingFun_translate_mul_conj_translate`). -/ +theorem integral_scaled_mul_conj (hN : 2 ≤ N) (j : ℕ) (k l : ℤ) : + ∫ x, scaled m j k x * conj (scaled m j l x) = if k = l then 1 else 0 := + integral_scaledFun_mul_conj (integral_scalingFun_translate_mul_conj_translate m hN) j k l + +/-- **Coefficient recovery for the scaling function**: for `N ≥ 2`, every level `j`, every +coefficient sequence `c : ℤ → ℂ` and every `k ∈ ℤ`, `⟨∑_l c_l φ_{j,l}, φ_{j,k}⟩ = c_k` +(`Daubechies.coeffFun_expand` for `g = φ`, with `a = 0` and `b = 2N - 1`). -/ +theorem coeffFun_expand_scalingFun (hN : 2 ≤ N) (j : ℕ) (c : ℤ → ℂ) (k : ℤ) : + coeffFun (scalingFun m) j (expand (scalingFun m) j c) k = c k := + coeffFun_expand (continuous_scalingFun m hN) (fun _ hx => scalingFun_eq_zero m hN hx) + (integral_scalingFun_translate_mul_conj_translate m hN) j c k + +/-- `2^((j+1)/2) = 2^(j/2) √2` for every `j ∈ ℕ`: the normalising factors of two consecutive +levels differ by the factor `√2`. -/ +theorem two_rpow_succ_div_two (j : ℕ) : + (2 : ℝ) ^ (((j + 1 : ℕ) : ℝ) / 2) = (2 : ℝ) ^ ((j : ℝ) / 2) * √2 := by + rw [Nat.cast_succ, add_div, Real.rpow_add two_pos, Real.sqrt_eq_rpow] + +/-- **The refinement relation between levels**: for `N ≥ 2`, every level `j`, position `k` and +point `x`, `φ_{j,k}(x) = ∑_{i=0}^{2N-1} (c_i/√2) φ_{j+1,2k+i}(x)`. This is the refinement +equation `φ(y) = ∑_i c_i φ(2y - i)` (`Daubechies.scalingFun_refine`) at `y = 2^j x - k`, with +`2(2^j x - k) - i = 2^(j+1) x - (2k + i)` and `2^(j/2) = 2^((j+1)/2)/√2` +(`Daubechies.two_rpow_succ_div_two`). -/ +theorem scaled_refine (hN : 2 ≤ N) (j : ℕ) (k : ℤ) (x : ℝ) : + scaled m j k x = ∑ i ∈ Finset.range (2 * N), + ((coeff m i / √2 : ℝ) : ℂ) * scaled m (j + 1) (2 * k + i) x := by + simp only [scaled, scaledFun] + rw [scalingFun_refine m hN (2 ^ j * x - k), Finset.mul_sum] + refine Finset.sum_congr rfl fun i _ => ?_ + have h2 : (2 : ℝ) * ((2 : ℝ) ^ j * x - k) - i = 2 ^ (j + 1) * x - ((2 * k + i : ℤ) : ℝ) := by + push_cast + ring + have hs : (√2 : ℝ) ≠ 0 := by positivity + have hc : (2 : ℝ) ^ ((j : ℝ) / 2) * coeff m i = + coeff m i / √2 * ((2 : ℝ) ^ ((j : ℝ) / 2) * √2) := by + field_simp + rw [h2, two_rpow_succ_div_two, ← mul_assoc, ← mul_assoc, ← Complex.ofReal_mul, + ← Complex.ofReal_mul, hc] + +/-- **`φ_{j,k}` is an expansion of level `j + 1`**: for `N ≥ 2`, every level `j`, position `k` +and point `x`, `φ_{j,k}(x) = ∑_{n ∈ ℤ} (c_{n-2k}/√2) φ_{j+1,n}(x)`. This is the refinement +relation `Daubechies.scaled_refine` after the substitution `n = 2k + i`; the filter coefficients +`c_i` vanish outside `0 ≤ i ≤ 2N - 1` (`Daubechies.coeff_eq_zero`). -/ +theorem scaled_eq_expand (hN : 2 ≤ N) (j : ℕ) (k : ℤ) (x : ℝ) : + scaled m j k x = + expand (scalingFun m) (j + 1) (fun n => ((coeff m (n - 2 * k) / √2 : ℝ) : ℂ)) x := by + rw [scaled_refine m hN, expand, ← (Equiv.addLeft (2 * k)).tsum_eq] + simp only [Equiv.coe_addLeft, add_sub_cancel_left] + rw [tsum_eq_sum (s := (Finset.range (2 * N)).map Nat.castEmbedding) ?_, Finset.sum_map] + · rfl + · intro i hi + have h0 : coeff m i = 0 := by + refine coeff_eq_zero m ?_ + by_contra h + push Not at h + exact hi (Finset.mem_map.2 ⟨i.toNat, Finset.mem_range.2 (by omega), by simp [h.1]⟩) + rw [h0, zero_div, Complex.ofReal_zero, zero_mul] + +end Daubechies diff --git a/LeanPool/FunctionSpaces/Wavelets/Examples/Daubechies/FejerRiesz.lean b/LeanPool/FunctionSpaces/Wavelets/Examples/Daubechies/FejerRiesz.lean new file mode 100644 index 0000000000..18a2cc9c89 --- /dev/null +++ b/LeanPool/FunctionSpaces/Wavelets/Examples/Daubechies/FejerRiesz.lean @@ -0,0 +1,458 @@ +/- +Copyright (c) 2026 Mario Ullrich. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Mario Ullrich +-/ +module + +public import Mathlib.Analysis.Complex.Polynomial.Basic + +/- +Modified for Lean Pool: module names and imports adapted. +-/ + +/-! +# The Fejér–Riesz theorem + +For a real polynomial `Q` that is positive on `[-1, 1]`, `Q(cos θ)` is a squared modulus on the +unit circle (`Polynomial.fejer_riesz`): there is a real polynomial `L` with `deg L ≤ deg Q`, +`L(1) > 0` and + +`|L(e^{iθ})|² = Q(cos θ)` for all `θ ∈ ℝ`. + +The `L` constructed here has no zeros in the closed unit disk (`Polynomial.fejer_riesz_outer`), +and the identity holds with `e^{-iθ}` as well (`Polynomial.forall_norm_aeval_exp_neg_sq_iff`, +`Polynomial.fejer_riesz_exp_neg`), the form used for the masks of the Daubechies wavelets. In +Lean the modulus is the norm `‖·‖` of `ℂ`, and `L(e^{iθ})` is +`Polynomial.aeval (Complex.exp (θ * I)) L`. + +**The inverse of the Joukowsky map.** The Joukowsky map `a ↦ (a + a⁻¹)/2` takes `e^{iφ}` to +`cos φ`. For `t ∈ ℂ` outside `[-1, 1]` the equation `a² - 2ta + 1 = 0`, that is +`(a + a⁻¹)/2 = t`, has exactly one root `a(t)` with `|a(t)| < 1` (`Complex.joukowskyInv`): the +two roots have product `1`, and a root on the unit circle would give `t = Re a ∈ [-1, 1]` +(`Complex.exists_joukowsky_root`, `Complex.joukowsky_root_unique`). Uniqueness gives +`a(t̄) = conj (a(t))` (`Complex.joukowskyInv_conj`). On the unit circle the factor `cos θ - t` of +`Q` splits into two linear factors: for `z = e^{iθ}`, +`2 |a| |cos θ - t| = |1 - a z| |1 - ā z|` (`Complex.joukowsky_two_mul_norm_mul_norm_re_sub`). + +**The proof.** Over `ℂ`, `Q(z) = c ∏_t (z - t)` with the leading coefficient `c` and the complex +roots `t` of `Q`, counted with multiplicity (`Polynomial.aeval_eq_mul_prod_aroots`). No root lies +in `[-1, 1]`, and the roots are invariant under conjugation (`Polynomial.map_conj_aroots`). The +product `L₀ = ∏_t (1 - a(t) X)` (`Polynomial.fejerRieszFactor`) has its roots `1/a(t)` outside +the closed unit disk (`Polynomial.eval_fejerRieszFactor_ne_zero`) and coefficients fixed by +conjugation, so it is a real polynomial (`Polynomial.exists_map_eq_of_map_conj_eq`). With +`∏_t |1 - ā(t) z| = ∏_t |1 - a(t̄) z| = ∏_t |1 - a(t) z|` the identity above gives +`Q(cos θ) = K |L₀(e^{iθ})|²` with `K = |c| / ∏_t 2|a(t)| > 0` +(`Polynomial.exists_eval_cos_eq_mul_norm_sq`). Finally `L = ±√K L₀`, the sign chosen such that +`L(1) > 0` (`Polynomial.exists_eval_one_pos_of_aeval_ne_zero`); here `L(1) ≠ 0` since `L` has no +zeros in the disk, and `L(1)² = Q(1)` (`Polynomial.eval_one_sq_of_norm_aeval_exp_sq`). + +With the roots `1/a(t)` outside the disk, `Q(t) = 2 - t` (root `t = 2`, `a = 2 - √3`) gives +`L = ((1 + √3) + (1 - √3) X)/2`, the polynomial of the Daubechies wavelet D4. +-/ + +@[expose] public section + +open Polynomial +open scoped ComplexConjugate + +namespace Complex + +/-- For a real polynomial `p` and `x ∈ ℝ`, evaluating `p` at the complex number `x` gives the +real number `p(x)`. This is Mathlib's `Polynomial.aeval_ofReal` for the coercion `ℝ → ℂ`; +Mathlib states it for every `RCLike` field with the coercion `RCLike.ofReal`, and the form +here, with the coercion of `ℂ`, is the one that `rw` matches in this file. -/ +protected theorem aeval_ofReal (p : ℝ[X]) (x : ℝ) : + aeval (x : ℂ) p = ((p.eval x : ℝ) : ℂ) := + Polynomial.aeval_ofReal p x + +/-! ### The inverse of the Joukowsky map -/ + +/-- A root `a` of `a² - 2ta + 1 = 0` on the unit circle forces `t = Re a`: then `a⁻¹ = ā`, and +the equation says `2t = a + a⁻¹ = a + ā`. So `t` is real and lies in `[-1, 1]`. -/ +theorem joukowsky_eq_re_of_norm_eq_one {a t : ℂ} (h : a ^ 2 - 2 * t * a + 1 = 0) + (ha : ‖a‖ = 1) : t = (a.re : ℂ) := by + have h1 : a * conj a = 1 := by + rw [mul_conj, normSq_eq_norm_sq, ha] + norm_num + have h2 : a + conj a = 2 * (a.re : ℂ) := by + rw [add_conj] + push_cast + ring + linear_combination (-1 / 2 : ℂ) * conj a * h + (a / 2 - t) * h1 + (1 / 2 : ℂ) * h2 + +/-- **Existence of the root in the disk.** For `t ∈ ℂ` outside `[-1, 1]` (no real `r ∈ [-1, 1]` +equals `t`), the equation `a² - 2ta + 1 = 0` has a root with `|a| < 1`. Its two roots +`t ± s`, `s² = t² - 1`, have product `1`, and neither has modulus `1` +(`Complex.joukowsky_eq_re_of_norm_eq_one`), so one of them lies in the open unit disk. -/ +theorem exists_joukowsky_root {t : ℂ} (ht : ∀ r ∈ Set.Icc (-1 : ℝ) 1, (r : ℂ) ≠ t) : + ∃ a : ℂ, ‖a‖ < 1 ∧ a ^ 2 - 2 * t * a + 1 = 0 := by + obtain ⟨s, hs⟩ := IsAlgClosed.isSquare (t ^ 2 - 1) + have hne : ∀ a : ℂ, a ^ 2 - 2 * t * a + 1 = 0 → ‖a‖ ≠ 1 := fun a h ha => by + refine ht a.re ⟨?_, ?_⟩ (joukowsky_eq_re_of_norm_eq_one h ha).symm + · linarith [neg_abs_le a.re, abs_re_le_norm a] + · linarith [le_abs_self a.re, abs_re_le_norm a] + have h₁ : (t + s) ^ 2 - 2 * t * (t + s) + 1 = 0 := by linear_combination -hs + have h₂ : (t - s) ^ 2 - 2 * t * (t - s) + 1 = 0 := by linear_combination -hs + have hprod : ‖t + s‖ * ‖t - s‖ = 1 := by + rw [← norm_mul] + have : (t + s) * (t - s) = 1 := by linear_combination hs + rw [this, norm_one] + rcases lt_or_gt_of_ne (hne _ h₁) with h | h + · exact ⟨t + s, h, h₁⟩ + · refine ⟨t - s, ?_, h₂⟩ + nlinarith [norm_nonneg (t - s)] + +/-- **Uniqueness of the root in the disk.** The equation `a² - 2ta + 1 = 0` has at most one root +with `|a| < 1`: two different roots `a ≠ b` are the two roots, so `ab = 1`, which is impossible +for `|a|, |b| < 1`. -/ +theorem joukowsky_root_unique {a b t : ℂ} (ha : ‖a‖ < 1) (hb : ‖b‖ < 1) + (ha' : a ^ 2 - 2 * t * a + 1 = 0) (hb' : b ^ 2 - 2 * t * b + 1 = 0) : a = b := by + by_contra hab + have h1 : a + b - 2 * t = 0 := by + have : (a - b) * (a + b - 2 * t) = 0 := by linear_combination ha' - hb' + exact (mul_eq_zero.1 this).resolve_left (sub_ne_zero.2 hab) + have h2 : a * b = 1 := by linear_combination -ha' + a * h1 + have h3 : ‖a‖ * ‖b‖ = 1 := by rw [← norm_mul, h2, norm_one] + nlinarith [norm_nonneg a, norm_nonneg b] + +/-- A root of `a² - 2ta + 1 = 0` is nonzero. -/ +theorem joukowsky_root_ne_zero {a t : ℂ} (h : a ^ 2 - 2 * t * a + 1 = 0) : a ≠ 0 := by + rintro rfl + norm_num at h + +/-- If `a² - 2ta + 1 = 0`, then `ā² - 2 t̄ ā + 1 = 0`: conjugation is a ring homomorphism. -/ +theorem joukowsky_root_conj {a t : ℂ} (h : a ^ 2 - 2 * t * a + 1 = 0) : + conj a ^ 2 - 2 * conj t * conj a + 1 = 0 := by + have := congrArg conj h + rw [map_add, map_sub, map_mul, map_mul, map_pow, map_ofNat, map_one, map_zero] at this + exact this + +open Classical in +/-- **The inverse of the Joukowsky map** `a ↦ (a + a⁻¹)/2` on the punctured open unit disk: for +`t ∈ ℂ` outside `[-1, 1]`, `joukowskyInv t` is the unique root `a` of `a² - 2ta + 1 = 0`, that is +of `(a + a⁻¹)/2 = t`, with `|a| < 1` (`Complex.exists_joukowsky_root`, +`Complex.joukowsky_root_unique`). For `t ∈ [-1, 1]` both roots lie on the unit circle, and the +value is `0`. -/ +noncomputable def joukowskyInv (t : ℂ) : ℂ := + if h : ∃ a : ℂ, ‖a‖ < 1 ∧ a ^ 2 - 2 * t * a + 1 = 0 then h.choose else 0 + +/-- If `a² - 2ta + 1 = 0` has a root in the open unit disk, then `a = joukowskyInv t` is one: +`|a| < 1` and `a² - 2ta + 1 = 0`. -/ +theorem joukowskyInv_spec {t : ℂ} (h : ∃ a : ℂ, ‖a‖ < 1 ∧ a ^ 2 - 2 * t * a + 1 = 0) : + ‖joukowskyInv t‖ < 1 ∧ joukowskyInv t ^ 2 - 2 * t * joukowskyInv t + 1 = 0 := by + rw [joukowskyInv, dite_eq_left h] + exact h.choose_spec + +/-- Every root `a` of `a² - 2ta + 1 = 0` with `|a| < 1` is `joukowskyInv t`. -/ +theorem joukowskyInv_eq {a t : ℂ} (ha : ‖a‖ < 1) (h : a ^ 2 - 2 * t * a + 1 = 0) : + joukowskyInv t = a := + have hspec := joukowskyInv_spec ⟨a, ha, h⟩ + joukowsky_root_unique hspec.1 ha hspec.2 h + +/-- **The inverse of the Joukowsky map commutes with conjugation**, `a(t̄) = conj (a(t))`, for +every `t ∈ ℂ`: conjugation maps the roots of `a² - 2ta + 1` in the disk to those of +`a² - 2t̄a + 1`, and the root in the disk is unique. -/ +theorem joukowskyInv_conj (t : ℂ) : joukowskyInv (conj t) = conj (joukowskyInv t) := by + by_cases h : ∃ a : ℂ, ‖a‖ < 1 ∧ a ^ 2 - 2 * t * a + 1 = 0 + · have hspec := joukowskyInv_spec h + exact joukowskyInv_eq (by rw [norm_conj]; exact hspec.1) (joukowsky_root_conj hspec.2) + · have h' : ¬ ∃ a : ℂ, ‖a‖ < 1 ∧ a ^ 2 - 2 * conj t * a + 1 = 0 := fun ⟨b, hb, hb'⟩ => + h ⟨conj b, by rw [norm_conj]; exact hb, by simpa using joukowsky_root_conj hb'⟩ + rw [joukowskyInv, dite_eq_right h', joukowskyInv, dite_eq_right h, map_zero] + +/-- **The factorisation on the unit circle**, algebraic form: if `a² - 2ta + 1 = 0` and +`z z̄ = 1`, then `2a (Re z - t) = -(1 - a z)(1 - a z̄)`, from `z + z̄ = 2 Re z`. -/ +theorem joukowsky_two_mul_mul_re_sub {a t z : ℂ} (h : a ^ 2 - 2 * t * a + 1 = 0) + (hz : z * conj z = 1) : 2 * a * ((z.re : ℂ) - t) = -((1 - a * z) * (1 - a * conj z)) := by + have h2 : z + conj z = 2 * (z.re : ℂ) := by + rw [add_conj] + push_cast + ring + linear_combination h + a ^ 2 * hz - a * h2 + +/-- **The factorisation on the unit circle.** If `a² - 2ta + 1 = 0` and `|z| = 1`, then +`2 |a| |Re z - t| = |1 - a z| |1 - ā z|`; for `z = e^{iθ}` the left side contains +`|cos θ - t|`. Here `|1 - a z̄| = |1 - ā z|` by conjugation. -/ +theorem joukowsky_two_mul_norm_mul_norm_re_sub {a t z : ℂ} (h : a ^ 2 - 2 * t * a + 1 = 0) + (hz : ‖z‖ = 1) : 2 * ‖a‖ * ‖(z.re : ℂ) - t‖ = ‖1 - a * z‖ * ‖1 - conj a * z‖ := by + have hz' : z * conj z = 1 := by + rw [mul_conj, normSq_eq_norm_sq, hz] + norm_num + have h1 : ‖1 - a * conj z‖ = ‖1 - conj a * z‖ := by + rw [← norm_conj (1 - a * conj z), map_sub, map_one, map_mul, conj_conj] + have h2 := congrArg norm (joukowsky_two_mul_mul_re_sub h hz') + rw [norm_mul, norm_mul, norm_neg, norm_mul, h1, Complex.norm_two] at h2 + exact h2 + +end Complex + +namespace Polynomial + +/-! ### The complex roots of a real polynomial -/ + +/-- **The complex roots of a real polynomial are invariant under conjugation**, with +multiplicities: the multiset `t̄` over the roots `t` of `Q` is the multiset of roots of `Q`. -/ +theorem map_conj_aroots (Q : ℝ[X]) : (Q.aroots ℂ).map conj = Q.aroots ℂ := by + rw [aroots_def, roots_map_of_injective_of_card_eq_natDegree (RingHom.injective _) + IsAlgClosed.card_roots_eq_natDegree, Polynomial.map_map] + congr 2 + exact RingHom.ext fun r => by simp + +/-- Conjugation can be dropped inside a function of the complex roots of a real polynomial: +the multisets `g(t̄)` and `g(t)` over the roots `t` of `Q` agree (`Polynomial.map_conj_aroots`). -/ +theorem map_comp_conj_aroots {M : Type*} (Q : ℝ[X]) (g : ℂ → M) : + (Q.aroots ℂ).map (fun t => g (conj t)) = (Q.aroots ℂ).map g := by + calc (Q.aroots ℂ).map (fun t => g (conj t)) = ((Q.aroots ℂ).map conj).map g := + (Multiset.map_map g conj _).symm + _ = (Q.aroots ℂ).map g := by rw [map_conj_aroots] + +/-- A real point `r` with `Q(r) ≠ 0` is no complex root of `Q`. -/ +theorem ofReal_ne_of_mem_aroots {Q : ℝ[X]} {t : ℂ} (ht : t ∈ Q.aroots ℂ) {r : ℝ} + (hr : Q.eval r ≠ 0) : (r : ℂ) ≠ t := by + intro hrt + have h0 := (mem_aroots.1 ht).2 + rw [← hrt, Complex.aeval_ofReal, Complex.ofReal_eq_zero] at h0 + exact hr h0 + +/-- **Factorisation over `ℂ`**: a real polynomial `Q` with leading coefficient `c` is, at every +`z ∈ ℂ`, the product `Q(z) = c ∏_t (z - t)` over its complex roots `t`, counted with +multiplicity (Mathlib's `C_leadingCoeff_mul_prod_multiset_X_sub_C`; `ℂ` is algebraically +closed). -/ +theorem aeval_eq_mul_prod_aroots (Q : ℝ[X]) (z : ℂ) : + aeval z Q = (Q.leadingCoeff : ℂ) * ((Q.aroots ℂ).map fun t => z - t).prod := by + have h := congrArg (eval z) (C_leadingCoeff_mul_prod_multiset_X_sub_C + (p := Q.map (algebraMap ℝ ℂ)) IsAlgClosed.card_roots_eq_natDegree) + rw [eval_mul, eval_C, eval_multiset_prod, Multiset.map_map, eval_map_algebraMap, + leadingCoeff_map] at h + rw [← h] + simp + +/-- At a real point `x` with `Q(x) ≥ 0`, `Q(x) = |c| ∏_t |x - t|` with the leading coefficient +`c` and the complex roots `t` of `Q` (`Polynomial.aeval_eq_mul_prod_aroots`, moduli). -/ +theorem eval_eq_abs_leadingCoeff_mul_prod_norm {Q : ℝ[X]} {x : ℝ} (hx : 0 ≤ Q.eval x) : + Q.eval x = |Q.leadingCoeff| * ((Q.aroots ℂ).map fun t => ‖(x : ℂ) - t‖).prod := by + have h := congrArg norm (aeval_eq_mul_prod_aroots Q x) + rw [Complex.aeval_ofReal, norm_mul, Multiset.norm_prod, Multiset.map_map, Complex.norm_real, + Complex.norm_real, Real.norm_eq_abs, Real.norm_eq_abs, abs_of_nonneg hx] at h + exact h + +/-- If `Q > 0` on `[-1, 1]`, then each complex root `t` of `Q` lies outside `[-1, 1]`, so +`a = a(t)` (`Complex.joukowskyInv`) is a root of `a² - 2ta + 1 = 0` with `|a| < 1`. -/ +theorem joukowskyInv_spec_of_mem_aroots {Q : ℝ[X]} + (hQ : ∀ r ∈ Set.Icc (-1 : ℝ) 1, 0 < Q.eval r) {t : ℂ} (ht : t ∈ Q.aroots ℂ) : + ‖Complex.joukowskyInv t‖ < 1 ∧ + Complex.joukowskyInv t ^ 2 - 2 * t * Complex.joukowskyInv t + 1 = 0 := + Complex.joukowskyInv_spec (Complex.exists_joukowsky_root fun r hr => + ofReal_ne_of_mem_aroots ht (hQ r hr).ne') + +/-! ### The Fejér–Riesz factor -/ + +/-- **The Fejér–Riesz factor** of a real polynomial `Q`: the complex polynomial +`L₀ = ∏_t (1 - a(t) X)` over the complex roots `t` of `Q`, counted with multiplicity, with +`a(t) = Complex.joukowskyInv t` the root in the unit disk of `a² - 2ta + 1`. For `Q > 0` on +`[-1, 1]` its roots `1/a(t)` lie outside the closed unit disk. -/ +noncomputable def fejerRieszFactor (Q : ℝ[X]) : ℂ[X] := + ((Q.aroots ℂ).map fun t => 1 - C (Complex.joukowskyInv t) * X).prod + +/-- The Fejér–Riesz factor has degree at most `deg Q`: it has one factor of degree `≤ 1` for each +of the at most `deg Q` complex roots of `Q`. -/ +theorem natDegree_fejerRieszFactor_le (Q : ℝ[X]) : + (fejerRieszFactor Q).natDegree ≤ Q.natDegree := by + refine (natDegree_multiset_prod_le _).trans ?_ + rw [Multiset.map_map] + refine (Multiset.sum_le_card_nsmul _ 1 fun n hn => ?_).trans ?_ + · obtain ⟨t, -, rfl⟩ := Multiset.mem_map.1 hn + simp only [Function.comp_apply] + compute_degree + · rw [Multiset.card_map, smul_eq_mul, mul_one] + exact card_roots_map_le_natDegree Q + +/-- **The Fejér–Riesz factor has coefficients fixed by conjugation**: conjugating the +coefficients replaces `a(t)` by `conj (a(t)) = a(t̄)` (`Complex.joukowskyInv_conj`), and the roots +`t` of `Q` are invariant under conjugation (`Polynomial.map_comp_conj_aroots`). -/ +theorem map_conj_fejerRieszFactor (Q : ℝ[X]) : + (fejerRieszFactor Q).map (starRingEnd ℂ) = fejerRieszFactor Q := by + rw [fejerRieszFactor, Polynomial.map_multiset_prod, Multiset.map_map] + have h : ∀ t : ℂ, + (Polynomial.map (starRingEnd ℂ) ∘ fun t => 1 - C (Complex.joukowskyInv t) * X) t = + 1 - C (Complex.joukowskyInv (conj t)) * X := fun t => by + simp [Complex.joukowskyInv_conj] + rw [Multiset.map_congr rfl fun t _ => h t, + map_comp_conj_aroots Q fun t => 1 - C (Complex.joukowskyInv t) * X] + +/-- The value of the Fejér–Riesz factor at `z ∈ ℂ` is `∏_t (1 - a(t) z)`. -/ +theorem eval_fejerRieszFactor (Q : ℝ[X]) (z : ℂ) : + (fejerRieszFactor Q).eval z = + ((Q.aroots ℂ).map fun t => 1 - Complex.joukowskyInv t * z).prod := by + rw [fejerRieszFactor, eval_multiset_prod, Multiset.map_map] + congr 1 + exact Multiset.map_congr rfl fun t _ => by simp + +/-- **The Fejér–Riesz factor has no zeros in the closed unit disk** if `Q > 0` on `[-1, 1]`: +for `|z| ≤ 1` each factor `1 - a(t) z` has `|a(t) z| < 1`. -/ +theorem eval_fejerRieszFactor_ne_zero {Q : ℝ[X]} (hQ : ∀ r ∈ Set.Icc (-1 : ℝ) 1, 0 < Q.eval r) + {z : ℂ} (hz : ‖z‖ ≤ 1) : (fejerRieszFactor Q).eval z ≠ 0 := by + rw [eval_fejerRieszFactor] + refine Multiset.prod_ne_zero fun h0 => ?_ + obtain ⟨t, ht, h⟩ := Multiset.mem_map.1 h0 + have h1 : ‖Complex.joukowskyInv t * z‖ < 1 := by + rw [norm_mul] + exact (mul_le_of_le_one_right (norm_nonneg _) hz).trans_lt + (joukowskyInv_spec_of_mem_aroots hQ ht).1 + rw [← sub_eq_zero.1 h, norm_one] at h1 + exact lt_irrefl _ h1 + +/-- **A complex polynomial with coefficients fixed by conjugation is real**: if `P̄ = P` +coefficientwise, then `P` is the image of a real polynomial (each coefficient equals its real +part; Mathlib's `Polynomial.lifts`). -/ +theorem exists_map_eq_of_map_conj_eq {P : ℂ[X]} (h : P.map (starRingEnd ℂ) = P) : + ∃ L : ℝ[X], L.map (algebraMap ℝ ℂ) = P := by + refine (mem_lifts P).1 ((lifts_iff_coeff_lifts P).2 fun n => ⟨(P.coeff n).re, ?_⟩) + have hn : conj (P.coeff n) = P.coeff n := by + rw [← coeff_map, h] + exact Complex.conj_eq_iff_re.1 hn + +/-- **The squared modulus of the Fejér–Riesz factor on the unit circle.** If `Q > 0` on +`[-1, 1]`, then for every `θ ∈ ℝ` +`∏_t 2|a(t)| · ∏_t |cos θ - t| = |L₀(e^{iθ})|²` +over the complex roots `t` of `Q`: each factor is `|1 - a(t) z| |1 - conj (a(t)) z|` with +`z = e^{iθ}` (`Complex.joukowsky_two_mul_norm_mul_norm_re_sub`), and +`∏_t |1 - conj (a(t)) z| = ∏_t |1 - a(t̄) z| = ∏_t |1 - a(t) z|`. -/ +theorem prod_two_mul_norm_mul_prod_norm_eq {Q : ℝ[X]} + (hQ : ∀ r ∈ Set.Icc (-1 : ℝ) 1, 0 < Q.eval r) (θ : ℝ) : + ((Q.aroots ℂ).map fun t => 2 * ‖Complex.joukowskyInv t‖).prod * + ((Q.aroots ℂ).map fun t => ‖((Real.cos θ : ℝ) : ℂ) - t‖).prod = + ‖(fejerRieszFactor Q).eval (Complex.exp ((θ : ℂ) * Complex.I))‖ ^ 2 := by + have hz : ‖Complex.exp ((θ : ℂ) * Complex.I)‖ = 1 := Complex.norm_exp_ofReal_mul_I θ + have hre : (Complex.exp ((θ : ℂ) * Complex.I)).re = Real.cos θ := + Complex.exp_ofReal_mul_I_re θ + have h1 : ∀ t ∈ Q.aroots ℂ, 2 * ‖Complex.joukowskyInv t‖ * ‖((Real.cos θ : ℝ) : ℂ) - t‖ = + ‖1 - Complex.joukowskyInv t * Complex.exp ((θ : ℂ) * Complex.I)‖ * + ‖1 - conj (Complex.joukowskyInv t) * Complex.exp ((θ : ℂ) * Complex.I)‖ := + fun t ht => by + rw [← hre] + exact Complex.joukowsky_two_mul_norm_mul_norm_re_sub + (joukowskyInv_spec_of_mem_aroots hQ ht).2 hz + have h2 : ((Q.aroots ℂ).map fun t => + ‖1 - conj (Complex.joukowskyInv t) * Complex.exp ((θ : ℂ) * Complex.I)‖) = + (Q.aroots ℂ).map fun t => + ‖1 - Complex.joukowskyInv t * Complex.exp ((θ : ℂ) * Complex.I)‖ := by + rw [← map_comp_conj_aroots Q fun t => + ‖1 - Complex.joukowskyInv t * Complex.exp ((θ : ℂ) * Complex.I)‖] + simp only [Complex.joukowskyInv_conj] + rw [← Multiset.prod_map_mul, Multiset.map_congr rfl h1, Multiset.prod_map_mul, h2, + eval_fejerRieszFactor, Multiset.norm_prod, Multiset.map_map, sq] + rfl + +/-- **Fejér–Riesz up to a constant.** If `Q > 0` on `[-1, 1]`, there are a constant `K > 0` and +a real polynomial `L` of degree `≤ deg Q`, without zeros in the closed unit disk, with +`Q(cos θ) = K |L(e^{iθ})|²` for all `θ ∈ ℝ`: `L` is the Fejér–Riesz factor read as a real +polynomial and `K = |c| / ∏_t 2|a(t)|`, with the leading coefficient `c` of `Q` +(`Polynomial.eval_eq_abs_leadingCoeff_mul_prod_norm`, +`Polynomial.prod_two_mul_norm_mul_prod_norm_eq`). -/ +theorem exists_eval_cos_eq_mul_norm_sq {Q : ℝ[X]} + (hQ : ∀ r ∈ Set.Icc (-1 : ℝ) 1, 0 < Q.eval r) : + ∃ K : ℝ, 0 < K ∧ ∃ L : ℝ[X], L.natDegree ≤ Q.natDegree ∧ + (∀ z : ℂ, ‖z‖ ≤ 1 → aeval z L ≠ 0) ∧ + ∀ θ : ℝ, Q.eval (Real.cos θ) = K * ‖aeval (Complex.exp ((θ : ℂ) * Complex.I)) L‖ ^ 2 := by + have hQ0 : Q ≠ 0 := fun h => by simpa [h] using hQ 0 ⟨by norm_num, by norm_num⟩ + obtain ⟨L, hL⟩ := exists_map_eq_of_map_conj_eq (map_conj_fejerRieszFactor Q) + have hD : 0 < ((Q.aroots ℂ).map fun t => 2 * ‖Complex.joukowskyInv t‖).prod := + Multiset.prod_pos fun x hx => by + obtain ⟨t, ht, rfl⟩ := Multiset.mem_map.1 hx + exact mul_pos two_pos (norm_pos_iff.2 + (Complex.joukowsky_root_ne_zero (joukowskyInv_spec_of_mem_aroots hQ ht).2)) + refine ⟨|Q.leadingCoeff| / ((Q.aroots ℂ).map fun t => 2 * ‖Complex.joukowskyInv t‖).prod, + div_pos (abs_pos.2 (leadingCoeff_ne_zero.2 hQ0)) hD, L, ?_, fun z hz => ?_, fun θ => ?_⟩ + · rw [← natDegree_map_eq_of_injective (RingHom.injective (algebraMap ℝ ℂ)), hL] + exact natDegree_fejerRieszFactor_le Q + · rw [← eval_map_algebraMap, hL] + exact eval_fejerRieszFactor_ne_zero hQ hz + · have hx : Real.cos θ ∈ Set.Icc (-1 : ℝ) 1 := ⟨Real.neg_one_le_cos θ, Real.cos_le_one θ⟩ + rw [eval_eq_abs_leadingCoeff_mul_prod_norm (hQ _ hx).le, ← eval_map_algebraMap, hL, + ← prod_two_mul_norm_mul_prod_norm_eq hQ θ] + field_simp + +/-- At `θ = 0` the identity `|L(e^{iθ})|² = Q(cos θ)` reads `L(1)² = Q(1)`. -/ +theorem eval_one_sq_of_norm_aeval_exp_sq {Q L : ℝ[X]} + (h : ∀ θ : ℝ, ‖aeval (Complex.exp ((θ : ℂ) * Complex.I)) L‖ ^ 2 = Q.eval (Real.cos θ)) : + L.eval 1 ^ 2 = Q.eval 1 := by + have h0 := h 0 + rw [Complex.ofReal_zero, zero_mul, Complex.exp_zero, Real.cos_zero, ← Complex.ofReal_one, + Complex.aeval_ofReal, Complex.norm_real, Real.norm_eq_abs, sq_abs] at h0 + exact h0 + +/-- **Fixing the sign.** A real polynomial `L` without zeros in the closed unit disk has +`L(1) ≠ 0`, so `L` or `-L` is positive at `1`. Both have the degree of `L`, no zeros in the closed +unit disk, and the moduli `|L(z)|`, `z ∈ ℂ`, of `L`. -/ +theorem exists_eval_one_pos_of_aeval_ne_zero {L : ℝ[X]} (hne : ∀ z : ℂ, ‖z‖ ≤ 1 → aeval z L ≠ 0) : + ∃ L' : ℝ[X], L'.natDegree = L.natDegree ∧ 0 < L'.eval 1 ∧ + (∀ z : ℂ, ‖z‖ ≤ 1 → aeval z L' ≠ 0) ∧ ∀ z : ℂ, ‖aeval z L'‖ = ‖aeval z L‖ := by + have h1 : L.eval 1 ≠ 0 := by + have h := hne 1 (by rw [norm_one]) + rwa [← Complex.ofReal_one, Complex.aeval_ofReal, Complex.ofReal_ne_zero] at h + rcases lt_or_gt_of_ne h1 with hneg | hpos + · refine ⟨-L, natDegree_neg L, by rw [eval_neg]; linarith, fun z hz => ?_, fun z => ?_⟩ + · rw [map_neg, neg_ne_zero] + exact hne z hz + · rw [map_neg, norm_neg] + · exact ⟨L, rfl, hpos, hne, fun z => rfl⟩ + +/-- **The Fejér–Riesz theorem with an outer factor.** A real polynomial `Q` with `Q(t) > 0` +for all `t ∈ [-1, 1]` has a real polynomial `L` with `deg L ≤ deg Q`, `L(1) > 0`, no zeros in +the closed unit disk (an outer polynomial), and `|L(e^{iθ})|² = Q(cos θ)` for all `θ ∈ ℝ`. +Here `L = ±√K L₀` with the Fejér–Riesz factor `L₀ = ∏_t (1 - a(t) X)` and the constant `K` of +`Polynomial.exists_eval_cos_eq_mul_norm_sq`, the sign from +`Polynomial.exists_eval_one_pos_of_aeval_ne_zero`. -/ +theorem fejer_riesz_outer {Q : ℝ[X]} (hQ : ∀ t ∈ Set.Icc (-1 : ℝ) 1, 0 < Q.eval t) : + ∃ L : ℝ[X], L.natDegree ≤ Q.natDegree ∧ 0 < L.eval 1 ∧ + (∀ z : ℂ, ‖z‖ ≤ 1 → aeval z L ≠ 0) ∧ + ∀ θ : ℝ, ‖aeval (Complex.exp ((θ : ℂ) * Complex.I)) L‖ ^ 2 = Q.eval (Real.cos θ) := by + obtain ⟨K, hK, L, hdeg, hne, hL⟩ := exists_eval_cos_eq_mul_norm_sq hQ + have hnorm : ∀ z : ℂ, ‖aeval z (C (Real.sqrt K) * L)‖ = Real.sqrt K * ‖aeval z L‖ := + fun z => by + rw [map_mul, aeval_C, norm_mul, norm_algebraMap', Real.norm_eq_abs, + abs_of_nonneg (Real.sqrt_nonneg K)] + obtain ⟨L', hdeg', hpos, hne', hL'⟩ := + exists_eval_one_pos_of_aeval_ne_zero (L := C (Real.sqrt K) * L) fun z hz => by + rw [← norm_ne_zero_iff, hnorm] + exact mul_ne_zero (Real.sqrt_pos.2 hK).ne' (norm_ne_zero_iff.2 (hne z hz)) + refine ⟨L', hdeg'.trans_le ((natDegree_C_mul_le _ _).trans hdeg), hpos, hne', fun θ => ?_⟩ + rw [hL', hnorm, mul_pow, Real.sq_sqrt hK.le, hL θ] + +/-- **The Fejér–Riesz theorem.** For a real polynomial `Q` with `Q(t) > 0` for all `t ∈ [-1, 1]`, +`Q(cos θ)` is a squared modulus on the unit circle: there is a real polynomial `L` with +`deg L ≤ deg Q` and `L(1) > 0` such that `|L(e^{iθ})|² = Q(cos θ)` for all `θ ∈ ℝ` +(`Polynomial.fejer_riesz_outer`, which also gives `L` without zeros in the closed unit disk). -/ +theorem fejer_riesz {Q : ℝ[X]} (hQ : ∀ t ∈ Set.Icc (-1 : ℝ) 1, 0 < Q.eval t) : + ∃ L : ℝ[X], L.natDegree ≤ Q.natDegree ∧ 0 < L.eval 1 ∧ + ∀ θ : ℝ, ‖aeval (Complex.exp ((θ : ℂ) * Complex.I)) L‖ ^ 2 = Q.eval (Real.cos θ) := by + obtain ⟨L, hdeg, hpos, -, h⟩ := fejer_riesz_outer hQ + exact ⟨L, hdeg, hpos, h⟩ + +/-- The identity of the Fejér–Riesz theorem holds with `e^{-iθ}` exactly when it holds with +`e^{iθ}`: substitute `-θ` and use `cos (-θ) = cos θ`. -/ +theorem forall_norm_aeval_exp_neg_sq_iff {Q L : ℝ[X]} : + (∀ θ : ℝ, ‖aeval (Complex.exp (-(θ : ℂ) * Complex.I)) L‖ ^ 2 = Q.eval (Real.cos θ)) ↔ + ∀ θ : ℝ, ‖aeval (Complex.exp ((θ : ℂ) * Complex.I)) L‖ ^ 2 = Q.eval (Real.cos θ) := by + constructor + · intro h θ + have h' := h (-θ) + rwa [Complex.ofReal_neg, neg_neg, Real.cos_neg] at h' + · intro h θ + have h' := h (-θ) + rwa [Complex.ofReal_neg, Real.cos_neg] at h' + +/-- **The Fejér–Riesz theorem with `e^{-iθ}`.** A real polynomial `Q` with `Q(t) > 0` for all +`t ∈ [-1, 1]` has a real polynomial `L` with `deg L ≤ deg Q`, `L(1) > 0` and +`|L(e^{-iθ})|² = Q(cos θ)` for all `θ ∈ ℝ` (`Polynomial.fejer_riesz`, +`Polynomial.forall_norm_aeval_exp_neg_sq_iff`). This is the form of the Daubechies masks, with +`θ = 2πξ`. -/ +theorem fejer_riesz_exp_neg {Q : ℝ[X]} (hQ : ∀ t ∈ Set.Icc (-1 : ℝ) 1, 0 < Q.eval t) : + ∃ L : ℝ[X], L.natDegree ≤ Q.natDegree ∧ 0 < L.eval 1 ∧ + ∀ θ : ℝ, ‖aeval (Complex.exp (-(θ : ℂ) * Complex.I)) L‖ ^ 2 = Q.eval (Real.cos θ) := by + obtain ⟨L, hdeg, hpos, h⟩ := fejer_riesz hQ + exact ⟨L, hdeg, hpos, forall_norm_aeval_exp_neg_sq_iff.2 h⟩ + +end Polynomial diff --git a/LeanPool/FunctionSpaces/Wavelets/Examples/Daubechies/FilterIdentities.lean b/LeanPool/FunctionSpaces/Wavelets/Examples/Daubechies/FilterIdentities.lean new file mode 100644 index 0000000000..5f78ba3c4c --- /dev/null +++ b/LeanPool/FunctionSpaces/Wavelets/Examples/Daubechies/FilterIdentities.lean @@ -0,0 +1,794 @@ +/- +Copyright (c) 2026 Mario Ullrich. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Mario Ullrich +-/ +module + +public import LeanPool.FunctionSpaces.Wavelets.Examples.Daubechies.Mask +public import Mathlib.Algebra.BigOperators.Finprod +public import Mathlib.Algebra.FiniteSupport.Basic +public import Mathlib.Analysis.Calculus.IteratedDeriv.Defs +public import Mathlib.Analysis.SpecialFunctions.Integrals.Basic +public import Mathlib.MeasureTheory.Integral.IntervalIntegral.Periodic + +/- +Modified for Lean Pool: module names and imports adapted. +-/ + +/-! +# Filter identities of Daubechies masks + +For a Daubechies mask of order `N` with filter coefficients `c_k` (`Daubechies.coeff`, zero +outside `0 ≤ k < 2N`) and symbol `m_0(ξ) = (1/2) ∑_k c_k e^(-2πikξ)` this file proves the +identities between the coefficients that the scaling function and the wavelet are built on. + +**Sums over `ℤ`.** All sums run over `k ∈ ℤ` and are Mathlib's `finsum`, written `∑ᶠ k : ℤ`: +the sum of the finitely many nonzero terms, with the value `0` by convention when infinitely many +terms are nonzero. The filter coefficients have finite support +(`Daubechies.finite_support_coeff`), so every sum here has finitely many nonzero terms. Three +conversions connect these sums with the other notations: a sum whose terms vanish wherever `c_k` +vanishes is the finite sum `∑_{k<2N}` (`Daubechies.finsum_eq_sum_range_of_coeff`), a sum whose +terms vanish wherever `g_k` vanishes is the finite sum `∑_{2-2N ≤ k ≤ 1}` +(`Daubechies.finsum_eq_sum_Icc_of_dualCoeff`), and a series `∑'` with finitely many nonzero terms +is the `finsum` (Mathlib's `tsum_eq_finsum`). + +* **Orthogonality of the even shifts**: `∑_k c_k c_(k+2j) = 2 δ_(j0)` for every `j ∈ ℤ` + (`Daubechies.sum_coeff_mul_coeff_add`). The proof integrates the quadrature mirror filter + identity `|m_0(ξ)|² + |m_0(ξ + 1/2)|² = 1` against `e^(2πi·2jξ)` over `[0, 1]`. The + exponentials `e^(-2πikξ)` are orthonormal there (`Daubechies.integral_finsum_mul_conj_finsum`), + so the `2j`-th Fourier coefficient of `|m_0|²` is `(1/4) ∑_k c_k c_(k+2j)`; the substitution + `η = ξ + 1/2` and the period `1` give the same `2j`-th Fourier coefficient for + `|m_0(ξ + 1/2)|²`. +* **Sum rules**: `∑_k (-1)^k k^l c_k = 0` for `l < N` (`Daubechies.sum_rule`), and more generally + `∑_k (-1)^k Q(k) c_k = 0` for every polynomial `Q` of degree `< N` + (`Daubechies.sum_rule_poly`). The mask polynomial is divisible by `(z + 1)^N`. The Euler + operator `p ↦ z p'` multiplies the `k`-th coefficient by `k` and lowers the power of `z + 1` + dividing `p` by at most one, and a polynomial divisible by `z + 1` vanishes at `z = -1`. +* **Parity sums and first moments**: `∑_i c_(2i+r) = 1` for every `r ∈ ℤ` + (`Daubechies.sum_coeff_two_mul_add`) and, for `N ≥ 2`, `∑_i (2i + r) c_(2i+r) = μ` with + `μ = (1/2) ∑_k k c_k` (`Daubechies.firstMoment`, `Daubechies.sum_two_mul_add_mul_coeff`): by + the sum rules for `l = 0` and `l = 1` the even and the odd indices contribute equally. Together + they give `∑_i i c_(2i+r) = (μ - r)/2` (`Daubechies.sum_mul_coeff_two_mul_add`). +* **Derivatives of the symbol at the half-integers**: `m_0^(l)(1/2 + n) = 0` for `l < N` and + `n ∈ ℤ` (`Daubechies.iteratedDeriv_symbol_half_add_int`), since + `m_0^(l)(ξ) = (1/2) ∑_k c_k (-2πik)^l e^(-2πikξ)` (`Daubechies.iteratedDeriv_symbol`) and + `e^(-2πik(1/2 + n)) = (-1)^k`. +* **The dual filter** `g_k = (-1)^k c_(1-k)` (`Daubechies.dualCoeff`), the filter of the wavelet. + Each of its identities comes from an identity for `c_k` by a substitution: + - `∑_k g_k g_(k+2j) = 2 δ_(j0)` (`Daubechies.sum_dualCoeff_mul_dualCoeff_add`): `k ↦ 1 - 2j - k` + turns the sum into `∑_k c_k c_(k+2j)`; + - `∑_k c_k g_(k+2j) = 0` (`Daubechies.sum_coeff_mul_dualCoeff_add`): `k ↦ 1 - 2j - k` turns the + sum into its negative; + - `∑_j (c_(a-2j) c_(b-2j) + g_(a-2j) g_(b-2j)) = 2 δ_(ab)` for all `a, b ∈ ℤ` + (`Daubechies.sum_coeff_mul_add_dual`): `j ↦ -j` turns both sums into sums over one parity + class of `h(k) = c_(k+(a-b)) c_k`; for `a - b` even the two classes are complementary and + add up to `∑_k c_k c_(k+(a-b))`, for `a - b` odd they cancel; + - the vanishing moments `∑_k g_k k^l = 0` for `l < N` (`Daubechies.sum_dualCoeff_mul_pow`): + `k ↦ 1 - k` turns the sum into `-∑_k (-1)^k (1 - k)^l c_k`, a sum rule for the polynomial + `(1 - X)^l`. +-/ + +@[expose] public section + +open Polynomial +open scoped Real ComplexConjugate + +namespace Daubechies + +/-! ### Finite sums over `ℤ` -/ + +/-- A sum over `k ∈ ℤ` of a function that vanishes outside `0 ≤ k < n` is the finite sum over +`k = 0, …, n - 1`. -/ +theorem finsum_eq_sum_range_of_eq_zero {M : Type*} [AddCommMonoid M] {f : ℤ → M} {n : ℕ} + (hf : ∀ k : ℤ, k < 0 ∨ (n : ℤ) ≤ k → f k = 0) : + ∑ᶠ k : ℤ, f k = ∑ k ∈ Finset.range n, f k := by + rw [finsum_eq_sum_of_support_subset f (s := (Finset.range n).map Nat.castEmbedding), + Finset.sum_map] + · rfl + · intro k hk + have h0 : 0 ≤ k := by + by_contra h + exact hk (hf k (Or.inl (not_le.1 h))) + have h1 : k < n := by + by_contra h + exact hk (hf k (Or.inr (not_lt.1 h))) + simp only [Finset.coe_map, Nat.castEmbedding_apply, Set.mem_image, Finset.mem_coe, + Finset.mem_range] + exact ⟨k.toNat, by omega, by omega⟩ + +/-- **Splitting a sum over `ℤ` by parity**: `∑_i g(2i) + ∑_i g(2i + 1) = ∑_k g(k)` for every +function `g` with finite support. -/ +theorem finsum_two_mul_add_finsum_two_mul_add_one {M : Type*} [AddCommMonoid M] {g : ℤ → M} + (hg : (Function.support g).Finite) : + ∑ᶠ i : ℤ, g (2 * i) + ∑ᶠ i : ℤ, g (2 * i + 1) = ∑ᶠ k : ℤ, g k := by + have he : ∑ᶠ k ∈ Set.range (fun i : ℤ => 2 * i), g k = ∑ᶠ i : ℤ, g (2 * i) := + finsum_mem_range fun i j h => by omega + have ho : ∑ᶠ k ∈ Set.range (fun i : ℤ => 2 * i + 1), g k = ∑ᶠ i : ℤ, g (2 * i + 1) := + finsum_mem_range fun i j h => by omega + have hdisj : Disjoint (Set.range fun i : ℤ => 2 * i) (Set.range fun i : ℤ => 2 * i + 1) := by + rw [Set.disjoint_left] + rintro k ⟨i, rfl⟩ ⟨j, hj⟩ + simp only at hj + omega + have hunion : (Set.range fun i : ℤ => 2 * i) ∪ Set.range (fun i : ℤ => 2 * i + 1) = + Set.univ := by + refine Set.eq_univ_of_forall fun k => ?_ + obtain ⟨i, hi | hi⟩ := Int.even_or_odd' k + · exact Or.inl ⟨i, hi.symm⟩ + · exact Or.inr ⟨i, hi.symm⟩ + rw [← he, ← ho, ← finsum_mem_union' hdisj (hg.subset Set.inter_subset_right) + (hg.subset Set.inter_subset_right), hunion, finsum_mem_univ] + +/-- Splitting a sum over `ℤ` by parity, shifted by `r ∈ ℤ`: +`∑_i g(2i + r) + ∑_i g(2i + r + 1) = ∑_k g(k)` for every function `g` with finite support. -/ +theorem finsum_two_mul_add_add_finsum {M : Type*} [AddCommMonoid M] {g : ℤ → M} + (hg : (Function.support g).Finite) (r : ℤ) : + ∑ᶠ i : ℤ, g (2 * i + r) + ∑ᶠ i : ℤ, g (2 * i + (r + 1)) = ∑ᶠ k : ℤ, g k := by + have hg' : (Function.support fun k : ℤ => g (k + r)).Finite := + Function.HasFiniteSupport.fun_comp_of_injective (add_left_injective r) hg + calc ∑ᶠ i : ℤ, g (2 * i + r) + ∑ᶠ i : ℤ, g (2 * i + (r + 1)) + = ∑ᶠ i : ℤ, g (2 * i + r) + ∑ᶠ i : ℤ, g (2 * i + 1 + r) := by + simp only [show ∀ i : ℤ, 2 * i + (r + 1) = 2 * i + 1 + r from fun i => by ring] + _ = ∑ᶠ k : ℤ, g (k + r) := finsum_two_mul_add_finsum_two_mul_add_one hg' + _ = ∑ᶠ k : ℤ, g k := finsum_comp_equiv (Equiv.addRight r) + +/-- The sum `∑_i g(2i + r)` over one parity class depends only on the parity of `r`: +`∑_i g(2i + r + 2q) = ∑_i g(2i + r)` for all `r, q ∈ ℤ`. -/ +theorem finsum_two_mul_add_add_two_mul {M : Type*} [AddCommMonoid M] (g : ℤ → M) (r q : ℤ) : + ∑ᶠ i : ℤ, g (2 * i + (r + 2 * q)) = ∑ᶠ i : ℤ, g (2 * i + r) := by + calc ∑ᶠ i : ℤ, g (2 * i + (r + 2 * q)) = ∑ᶠ i : ℤ, g (2 * (i + q) + r) := by + simp only [show ∀ i : ℤ, 2 * i + (r + 2 * q) = 2 * (i + q) + r from fun i => by ring] + _ = ∑ᶠ i : ℤ, g (2 * i + r) := + finsum_comp_equiv (Equiv.addRight q) (f := fun i => g (2 * i + r)) + +/-- `(-1)^a = (-1)^b` for integers `a, b` of the same parity. -/ +theorem neg_one_zpow_eq_of_even_sub {a b : ℤ} (h : Even (a - b)) : + (-1 : ℝ) ^ a = (-1) ^ b := by + obtain ⟨t, ht⟩ := h + rw [show a = b + (t + t) by omega, zpow_add₀ (by norm_num : (-1 : ℝ) ≠ 0), + Even.neg_one_zpow ⟨t, rfl⟩, mul_one] + +/-- `(-1)^a = -(-1)^b` for integers `a, b` of different parity. -/ +theorem neg_one_zpow_eq_neg_of_odd_sub {a b : ℤ} (h : Odd (a - b)) : + (-1 : ℝ) ^ a = -(-1) ^ b := by + obtain ⟨t, ht⟩ := h + rw [show a = b + (2 * t + 1) by omega, zpow_add₀ (by norm_num : (-1 : ℝ) ≠ 0), + Odd.neg_one_zpow ⟨t, rfl⟩, mul_neg_one] + +/-- **Equal parity sums.** If `g : ℤ → ℝ` has finite support and alternating sum +`∑_k (-1)^k g(k) = 0`, then each parity class carries half of the total: +`∑_i g(2i + r) = (1/2) ∑_k g(k)` for every `r ∈ ℤ`. -/ +theorem finsum_two_mul_add_eq_half {g : ℤ → ℝ} (hg : (Function.support g).Finite) + (halt : ∑ᶠ k : ℤ, (-1 : ℝ) ^ k * g k = 0) (r : ℤ) : + ∑ᶠ i : ℤ, g (2 * i + r) = (∑ᶠ k : ℤ, g k) / 2 := by + have hsplit := finsum_two_mul_add_add_finsum hg r + have hg' : (Function.support fun k : ℤ => (-1 : ℝ) ^ k * g k).Finite := + hg.subset (Function.support_mul_subset_right _ _) + have hsplit' := finsum_two_mul_add_add_finsum hg' r + have he : ∀ i : ℤ, (-1 : ℝ) ^ (2 * i + r) = (-1) ^ r := fun i => + neg_one_zpow_eq_of_even_sub ⟨i, by ring⟩ + have ho : ∀ i : ℤ, (-1 : ℝ) ^ (2 * i + (r + 1)) = -(-1) ^ r := fun i => + neg_one_zpow_eq_neg_of_odd_sub ⟨i, by ring⟩ + simp only [he, ho, neg_mul, finsum_neg_distrib, ← mul_finsum] at hsplit' + rw [halt] at hsplit' + have hne : (-1 : ℝ) ^ r ≠ 0 := zpow_ne_zero _ (by norm_num) + have hprod : (-1 : ℝ) ^ r * (∑ᶠ i : ℤ, g (2 * i + r) - ∑ᶠ i : ℤ, g (2 * i + (r + 1))) = 0 := by + rw [mul_sub] + linarith + have heq := sub_eq_zero.1 ((mul_eq_zero.1 hprod).resolve_left hne) + linarith + +variable {N : ℕ} (m : Mask N) + +/-! ### The filter coefficients as a function on `ℤ` -/ + +/-- The filter coefficients have finite support: they vanish outside `0 ≤ k < 2N`. -/ +theorem finite_support_coeff : (Function.support (coeff m)).Finite := + (Set.finite_Ico 0 (2 * (N : ℤ))).subset fun k hk => by + by_contra h + simp only [Set.mem_Ico, not_and_or, not_le, not_lt] at h + exact hk (coeff_eq_zero m h) + +/-- A sum over `k ∈ ℤ` of a function that vanishes wherever the filter coefficients vanish is the +finite sum over `k = 0, …, 2N - 1`. -/ +theorem finsum_eq_sum_range_of_coeff {M : Type*} [AddCommMonoid M] (f : ℤ → M) + (hf : ∀ k : ℤ, coeff m k = 0 → f k = 0) : + ∑ᶠ k : ℤ, f k = ∑ k ∈ Finset.range (2 * N), f k := + finsum_eq_sum_range_of_eq_zero fun k hk => hf k (coeff_eq_zero m (by push_cast at hk; exact hk)) + +/-- `∑_k c_k = 2`, as a sum over `k ∈ ℤ`. -/ +theorem finsum_coeff : ∑ᶠ k : ℤ, coeff m k = 2 := by + rw [finsum_eq_sum_range_of_coeff m (coeff m) fun k hk => hk, sum_coeff] + +/-- **The symbol as a sum over `ℤ`**: `m_0(ξ) = (1/2) ∑_{k ∈ ℤ} c_k e^(-2πikξ)`. -/ +theorem symbol_eq_finsum (ξ : ℝ) : + symbol m ξ = 1 / 2 * ∑ᶠ k : ℤ, (coeff m k : ℂ) * expFreq (k * ξ) := by + rw [symbol_eq_sum, finsum_eq_sum_range_of_coeff m _ fun k hk => by simp [hk]] + congr 1 + refine Finset.sum_congr rfl fun k _ => ?_ + rw [expFreq_pow, Int.cast_natCast] + +/-! ### Trigonometric polynomials on `[0, 1]` -/ + +/-- `ξ ↦ e^(-2πicξ)` is continuous for every `c ∈ ℝ`. -/ +theorem continuous_expFreq_mul (c : ℝ) : Continuous fun ξ : ℝ => expFreq (c * ξ) := + continuous_expFreq.comp (continuous_const_mul c) + +/-- **Integrals of the exponentials over a period**: `∫_0^1 e^(-2πinξ) dξ` is `1` for `n = 0` +and `0` for every other integer `n`. -/ +theorem integral_expFreq_intCast_mul (n : ℤ) : + ∫ ξ in (0 : ℝ)..1, expFreq (n * ξ) = if n = 0 then 1 else 0 := by + by_cases hn : n = 0 + · simp [hn] + · have hc : -(2 * π * Complex.I) * n ≠ 0 := by + simp [Real.pi_ne_zero, Complex.I_ne_zero, hn] + have h : ∀ ξ : ℝ, expFreq (n * ξ) = Complex.exp (-(2 * π * Complex.I) * n * ξ) := + fun ξ => by + rw [expFreq_eq_exp_mul] + congr 1 + push_cast + ring + have h1 : Complex.exp (-(2 * π * Complex.I) * n * ((1 : ℝ) : ℂ)) = 1 := by + rw [← h, mul_one, expFreq_intCast] + simp_rw [h] + rw [integral_exp_mul_complex hc, h1] + simp [hn] + +/-- **Orthonormality of the exponentials `e^(-2πikξ)` on `[0, 1]`**, for finite sums over a +finite set `u ⊆ ℤ` with coefficients `a, b : ℤ → ℂ`: +`∫_0^1 (∑_{k ∈ u} a_k e^(-2πikξ)) conj (∑_{k ∈ u} b_k e^(-2πikξ)) dξ = ∑_{k ∈ u} a_k conj b_k`. -/ +theorem integral_sum_mul_conj_sum (u : Finset ℤ) (a b : ℤ → ℂ) : + ∫ ξ in (0 : ℝ)..1, (∑ k ∈ u, a k * expFreq (k * ξ)) * + conj (∑ k ∈ u, b k * expFreq (k * ξ)) = ∑ k ∈ u, a k * conj (b k) := by + have hprod : ∀ ξ : ℝ, (∑ k ∈ u, a k * expFreq (k * ξ)) * + conj (∑ k ∈ u, b k * expFreq (k * ξ)) = + ∑ k ∈ u, ∑ l ∈ u, a k * conj (b l) * expFreq (((k - l : ℤ) : ℝ) * ξ) := fun ξ => by + rw [map_sum, Finset.sum_mul_sum] + refine Finset.sum_congr rfl fun k _ => Finset.sum_congr rfl fun l _ => ?_ + rw [map_mul, conj_expFreq, show ((k - l : ℤ) : ℝ) * ξ = k * ξ + -(l * ξ) by push_cast; ring, + expFreq_add] + ring + have hcont : ∀ k l : ℤ, + Continuous fun ξ : ℝ => a k * conj (b l) * expFreq (((k - l : ℤ) : ℝ) * ξ) := + fun k l => continuous_const.fun_mul (continuous_expFreq_mul _) + simp_rw [hprod] + rw [intervalIntegral.integral_finsetSum] + · refine Finset.sum_congr rfl fun k hk => ?_ + rw [intervalIntegral.integral_finsetSum] + · simp_rw [intervalIntegral.integral_const_mul, integral_expFreq_intCast_mul, sub_eq_zero, + mul_ite, mul_one, mul_zero] + rw [Finset.sum_ite_eq] + simp only [hk, ↓reduceIte] + · exact fun l _ => (hcont k l).intervalIntegrable _ _ + · exact fun k _ => (continuous_finsetSum _ fun l _ => hcont k l).intervalIntegrable _ _ + +/-- **Orthonormality of the exponentials `e^(-2πikξ)` on `[0, 1]`**, for coefficient sequences +`a, b : ℤ → ℂ` with finite support: +`∫_0^1 (∑_k a_k e^(-2πikξ)) conj (∑_k b_k e^(-2πikξ)) dξ = ∑_k a_k conj b_k`. -/ +theorem integral_finsum_mul_conj_finsum {a b : ℤ → ℂ} (ha : (Function.support a).Finite) + (hb : (Function.support b).Finite) : + ∫ ξ in (0 : ℝ)..1, (∑ᶠ k : ℤ, a k * expFreq (k * ξ)) * + conj (∑ᶠ k : ℤ, b k * expFreq (k * ξ)) = ∑ᶠ k : ℤ, a k * conj (b k) := by + obtain ⟨u, hau, hbu⟩ : ∃ u : Finset ℤ, + Function.support a ⊆ u ∧ Function.support b ⊆ u := + ⟨ha.toFinset ∪ hb.toFinset, by simp, by simp⟩ + have hA : ∀ ξ : ℝ, ∑ᶠ k : ℤ, a k * expFreq (k * ξ) = ∑ k ∈ u, a k * expFreq (k * ξ) := + fun ξ => finsum_eq_sum_of_support_subset _ + ((Function.support_mul_subset_left _ _).trans hau) + have hB : ∀ ξ : ℝ, ∑ᶠ k : ℤ, b k * expFreq (k * ξ) = ∑ k ∈ u, b k * expFreq (k * ξ) := + fun ξ => finsum_eq_sum_of_support_subset _ + ((Function.support_mul_subset_left _ _).trans hbu) + simp_rw [hA, hB] + rw [integral_sum_mul_conj_sum] + exact (finsum_eq_sum_of_support_subset _ + ((Function.support_mul_subset_left _ _).trans hau)).symm + +/-- **Fourier coefficients of `|T|²`** for a trigonometric polynomial +`T(ξ) = ∑_k a_k e^(-2πikξ)` with finitely many nonzero `a_k ∈ ℂ`: +`∫_0^1 e^(-2πinξ) |T(ξ)|² dξ = ∑_k a_(k-n) conj a_k` for every `n ∈ ℤ`. -/ +theorem integral_expFreq_mul_normSq_finsum {a : ℤ → ℂ} (ha : (Function.support a).Finite) + (n : ℤ) : + ∫ ξ in (0 : ℝ)..1, expFreq (n * ξ) * ((‖∑ᶠ k : ℤ, a k * expFreq (k * ξ)‖ ^ 2 : ℝ) : ℂ) = + ∑ᶠ k : ℤ, a (k - n) * conj (a k) := by + have ha' : (Function.support fun k : ℤ => a (k - n)).Finite := + Function.HasFiniteSupport.fun_comp_of_injective (sub_left_injective (b := n)) ha + have hshift : ∀ ξ : ℝ, expFreq (n * ξ) * ∑ᶠ k : ℤ, a k * expFreq (k * ξ) = + ∑ᶠ k : ℤ, a (k - n) * expFreq (k * ξ) := fun ξ => by + rw [mul_finsum] + calc ∑ᶠ k : ℤ, expFreq (n * ξ) * (a k * expFreq (k * ξ)) + = ∑ᶠ k : ℤ, a (k + n - n) * expFreq (((k + n : ℤ) : ℝ) * ξ) := by + refine finsum_congr fun k => ?_ + rw [add_sub_cancel_right, mul_left_comm, ← expFreq_add] + congr 2 + push_cast + ring + _ = ∑ᶠ k : ℤ, a (k - n) * expFreq (k * ξ) := + finsum_comp_equiv (Equiv.addRight n) (f := fun k : ℤ => a (k - n) * expFreq (k * ξ)) + have hnorm : ∀ ξ : ℝ, + expFreq (n * ξ) * ((‖∑ᶠ k : ℤ, a k * expFreq (k * ξ)‖ ^ 2 : ℝ) : ℂ) = + (∑ᶠ k : ℤ, a (k - n) * expFreq (k * ξ)) * conj (∑ᶠ k : ℤ, a k * expFreq (k * ξ)) := + fun ξ => by rw [Complex.ofReal_pow, ← Complex.mul_conj', ← mul_assoc, hshift] + simp_rw [hnorm] + exact integral_finsum_mul_conj_finsum ha' ha + +/-! ### Orthogonality of the even shifts -/ + +/-- `|z/2|² = |z|²/4` for `z ∈ ℂ`. -/ +theorem norm_half_mul_sq (z : ℂ) : ‖(1 / 2 : ℂ) * z‖ ^ 2 = 1 / 4 * ‖z‖ ^ 2 := by + rw [norm_mul, mul_pow] + norm_num + +/-- **Fourier coefficients of `|m_0|²`**: for every `n ∈ ℤ`, +`∫_0^1 e^(-2πinξ) |m_0(ξ)|² dξ = (1/4) ∑_k c_(k-n) c_k`. -/ +theorem integral_expFreq_mul_normSq_symbol (n : ℤ) : + ∫ ξ in (0 : ℝ)..1, expFreq (n * ξ) * ((‖symbol m ξ‖ ^ 2 : ℝ) : ℂ) = + 1 / 4 * ∑ᶠ k : ℤ, ((coeff m (k - n) * coeff m k : ℝ) : ℂ) := by + have hfin : (Function.support fun k : ℤ => (coeff m k : ℂ)).Finite := + (finite_support_coeff m).subset fun k hk => by simpa using hk + have hsym : ∀ ξ : ℝ, expFreq (n * ξ) * ((‖symbol m ξ‖ ^ 2 : ℝ) : ℂ) = 1 / 4 * + (expFreq (n * ξ) * ((‖∑ᶠ k : ℤ, (coeff m k : ℂ) * expFreq (k * ξ)‖ ^ 2 : ℝ) : ℂ)) := + fun ξ => by + rw [symbol_eq_finsum, norm_half_mul_sq] + push_cast + ring + simp_rw [hsym, intervalIntegral.integral_const_mul] + rw [integral_expFreq_mul_normSq_finsum hfin n] + congr 1 + refine finsum_congr fun k => ?_ + rw [Complex.conj_ofReal] + push_cast + ring + +/-- For every integer `k`, the function `ξ ↦ e^(-2πikξ)` has period `1`, since `e^(-2πik) = 1` +(`Daubechies.expFreq_intCast`). -/ +theorem periodic_expFreq_intCast_mul (k : ℤ) : + Function.Periodic (fun ξ : ℝ => expFreq (k * ξ)) 1 := fun ξ => by + simp only + rw [mul_add, mul_one, expFreq_add, expFreq_intCast, mul_one] + +/-- **Fourier coefficients of `|m_0(· + 1/2)|²`**: for every `n ∈ ℤ`, +`∫_0^1 e^(-2πinξ) |m_0(ξ + 1/2)|² dξ = (1/4) e^(πin) ∑_k c_(k-n) c_k`. The substitution +`η = ξ + 1/2` (Mathlib's `intervalIntegral.integral_comp_add_right`) gives the factor +`e^(-2πin(-1/2)) = e^(πin)` and the integral over `[1/2, 3/2]`, which is the integral over +`[0, 1]` since `η ↦ e^(-2πinη) |m_0(η)|²` has period `1` +(`Daubechies.periodic_expFreq_intCast_mul`, `Daubechies.symbol_periodic`, Mathlib's +`Function.Periodic.intervalIntegral_add_eq`); then `Daubechies.integral_expFreq_mul_normSq_symbol` +applies. -/ +theorem integral_expFreq_mul_normSq_symbol_add_half (n : ℤ) : + ∫ ξ in (0 : ℝ)..1, expFreq (n * ξ) * ((‖symbol m (ξ + 1 / 2)‖ ^ 2 : ℝ) : ℂ) = + 1 / 4 * expFreq (-(n : ℝ) / 2) * ∑ᶠ k : ℤ, ((coeff m (k - n) * coeff m k : ℝ) : ℂ) := by + have hshift : ∀ ξ : ℝ, expFreq (n * ξ) * ((‖symbol m (ξ + 1 / 2)‖ ^ 2 : ℝ) : ℂ) = + expFreq (-(n : ℝ) / 2) * + (expFreq (n * (ξ + 1 / 2)) * ((‖symbol m (ξ + 1 / 2)‖ ^ 2 : ℝ) : ℂ)) := fun ξ => by + rw [← mul_assoc, ← expFreq_add] + congr 2 + ring + have hper : Function.Periodic + (fun η : ℝ => expFreq (n * η) * ((‖symbol m η‖ ^ 2 : ℝ) : ℂ)) 1 := + (periodic_expFreq_intCast_mul n).mul + ((symbol_periodic m).comp fun z => ((‖z‖ ^ 2 : ℝ) : ℂ)) + simp_rw [hshift, intervalIntegral.integral_const_mul] + rw [intervalIntegral.integral_comp_add_right + (fun η : ℝ => expFreq (n * η) * ((‖symbol m η‖ ^ 2 : ℝ) : ℂ)), zero_add, + add_comm (1 : ℝ), hper.intervalIntegral_add_eq (1 / 2) 0, zero_add, + integral_expFreq_mul_normSq_symbol m n] + ring + +/-- **Orthogonality of the even shifts of the filter**: `∑_k c_k c_(k+2j) = 2 δ_(j0)` for every +`j ∈ ℤ`. Integrating the quadrature mirror filter identity +`|m_0(ξ)|² + |m_0(ξ + 1/2)|² = 1` (`Daubechies.qmf`) against `e^(2πi·2jξ)` over `[0, 1]` gives +`(1/4) ∑_k c_k c_(k+2j) + (1/4) ∑_k c_k c_(k+2j) = δ_(j0)`. -/ +theorem sum_coeff_mul_coeff_add (j : ℤ) : + ∑ᶠ k : ℤ, coeff m k * coeff m (k + 2 * j) = if j = 0 then 2 else 0 := by + have hc1 : Continuous fun ξ : ℝ => + expFreq (((-(2 * j) : ℤ) : ℝ) * ξ) * ((‖symbol m ξ‖ ^ 2 : ℝ) : ℂ) := + (continuous_expFreq_mul _).mul + (Complex.continuous_ofReal.comp ((continuous_symbol m).norm.pow 2)) + have hc2 : Continuous fun ξ : ℝ => + expFreq (((-(2 * j) : ℤ) : ℝ) * ξ) * ((‖symbol m (ξ + 1 / 2)‖ ^ 2 : ℝ) : ℂ) := + (continuous_expFreq_mul _).mul (Complex.continuous_ofReal.comp + (((continuous_symbol m).comp (continuous_add_const (1 / 2))).norm.pow 2)) + have h : (∫ ξ in (0 : ℝ)..1, + expFreq (((-(2 * j) : ℤ) : ℝ) * ξ) * ((‖symbol m ξ‖ ^ 2 : ℝ) : ℂ)) + + (∫ ξ in (0 : ℝ)..1, + expFreq (((-(2 * j) : ℤ) : ℝ) * ξ) * ((‖symbol m (ξ + 1 / 2)‖ ^ 2 : ℝ) : ℂ)) = + if -(2 * j) = 0 then 1 else 0 := by + rw [← intervalIntegral.integral_add (hc1.intervalIntegrable 0 1) (hc2.intervalIntegrable 0 1), + ← integral_expFreq_intCast_mul] + refine intervalIntegral.integral_congr fun ξ _ => ?_ + rw [← mul_add, ← Complex.ofReal_add, qmf, Complex.ofReal_one, mul_one] + have hE : expFreq (-(((-(2 * j) : ℤ) : ℝ)) / 2) = 1 := by + rw [show -(((-(2 * j) : ℤ) : ℝ)) / 2 = ((j : ℤ) : ℝ) by push_cast; ring] + exact expFreq_intCast j + have hS : ∑ᶠ k : ℤ, ((coeff m (k - -(2 * j)) * coeff m k : ℝ) : ℂ) = + ((∑ᶠ k : ℤ, coeff m k * coeff m (k + 2 * j) : ℝ) : ℂ) := by + rw [finsum_eq_sum_range_of_coeff m + (fun k : ℤ => ((coeff m (k - -(2 * j)) * coeff m k : ℝ) : ℂ)) fun k hk => by simp [hk], + finsum_eq_sum_range_of_coeff m (fun k : ℤ => coeff m k * coeff m (k + 2 * j)) + fun k hk => by simp [hk], Complex.ofReal_sum] + refine Finset.sum_congr rfl fun k _ => ?_ + rw [sub_neg_eq_add, mul_comm] + have hite : (if -(2 * j) = 0 then (1 : ℂ) else 0) = + ((if j = 0 then 2 else 0 : ℝ) : ℂ) / 2 := by + by_cases hj : j = 0 + · norm_num [hj] + · simp [hj, show -(2 * j) ≠ 0 by omega] + rw [integral_expFreq_mul_normSq_symbol, integral_expFreq_mul_normSq_symbol_add_half, hE, + mul_one, hS, hite] at h + have h2 : ((∑ᶠ k : ℤ, coeff m k * coeff m (k + 2 * j) : ℝ) : ℂ) = + ((if j = 0 then 2 else 0 : ℝ) : ℂ) := by + linear_combination 2 * h + exact_mod_cast h2 + +/-! ### Sum rules -/ + +/-- **The Euler operator on coefficients**: the `k`-th coefficient of `X p'` is `k` times the +`k`-th coefficient of `p`. -/ +theorem coeff_X_mul_derivative (p : ℝ[X]) (k : ℕ) : + (X * derivative p).coeff k = k * p.coeff k := by + cases k with + | zero => simp + | succ k => + rw [coeff_X_mul, coeff_derivative] + push_cast + ring + +/-- The `l`-th iterate of the Euler operator `p ↦ X p'` multiplies the `k`-th coefficient by +`k^l`. -/ +theorem coeff_iterate_X_mul_derivative (p : ℝ[X]) (l k : ℕ) : + ((fun q : ℝ[X] => X * derivative q)^[l] p).coeff k = (k : ℝ) ^ l * p.coeff k := by + induction l with + | zero => simp + | succ l ih => + rw [Function.iterate_succ_apply', coeff_X_mul_derivative, ih] + ring + +/-- If `(X + 1)^j` divides `p`, then `(X + 1)^(j - l)` divides the `l`-th iterate of the Euler +operator `p ↦ X p'` applied to `p`: each step differentiates once (Mathlib's +`Polynomial.pow_sub_one_dvd_derivative_of_pow_dvd`) and multiplies by `X`. -/ +theorem pow_dvd_iterate_X_mul_derivative {p : ℝ[X]} {j : ℕ} (h : (X + 1) ^ j ∣ p) (l : ℕ) : + (X + 1) ^ (j - l) ∣ (fun q : ℝ[X] => X * derivative q)^[l] p := by + induction l with + | zero => simpa using h + | succ l ih => + rw [Function.iterate_succ_apply', show j - (l + 1) = j - l - 1 by omega] + exact (pow_sub_one_dvd_derivative_of_pow_dvd ih).mul_left X + +/-- **Sum rules for polynomials divisible by `(X + 1)^j`**: if `(X + 1)^j ∣ p`, `l < j` and +`deg p < n`, then `∑_{k < n} (-1)^k k^l [X^k] p = 0`. The sum is the value at `-1` of the `l`-th +iterate of the Euler operator `p ↦ X p'`, which is still divisible by `X + 1`. -/ +theorem sum_range_neg_one_pow_mul_pow_mul_coeff {p : ℝ[X]} {j l n : ℕ} (h : (X + 1) ^ j ∣ p) + (hl : l < j) (hn : p.natDegree < n) : + ∑ k ∈ Finset.range n, (-1) ^ k * (k : ℝ) ^ l * p.coeff k = 0 := by + have hdeg : ((fun q : ℝ[X] => X * derivative q)^[l] p).natDegree < n := by + refine lt_of_le_of_lt ?_ hn + rw [natDegree_le_iff_coeff_eq_zero] + intro k hk + rw [coeff_iterate_X_mul_derivative, coeff_eq_zero_of_natDegree_lt hk, mul_zero] + have hdvd : X - C (-1) ∣ (fun q : ℝ[X] => X * derivative q)^[l] p := by + rw [C_neg, C_1, sub_neg_eq_add] + exact (dvd_pow_self (X + 1) (by omega)).trans (pow_dvd_iterate_X_mul_derivative h l) + have hroot := (dvd_iff_isRoot.1 hdvd).eq_zero + rw [eval_eq_sum_range' hdeg] at hroot + refine Eq.trans (Finset.sum_congr rfl fun k _ => ?_) hroot + rw [coeff_iterate_X_mul_derivative] + ring + +/-- **The sum rules** as finite sums over `k = 0, …, 2N - 1`: +`∑_{k < 2N} (-1)^k k^l c_k = 0` for `l < N`. -/ +theorem sum_range_rule {l : ℕ} (hl : l < N) : + ∑ k ∈ Finset.range (2 * N), (-1) ^ k * (k : ℝ) ^ l * coeff m k = 0 := by + have h := sum_range_neg_one_pow_mul_pow_mul_coeff (X_add_one_pow_dvd_maskPoly m) hl + (natDegree_maskPoly_lt m) + calc ∑ k ∈ Finset.range (2 * N), (-1) ^ k * (k : ℝ) ^ l * coeff m k + = 2 * ∑ k ∈ Finset.range (2 * N), (-1) ^ k * (k : ℝ) ^ l * (maskPoly m).coeff k := by + rw [Finset.mul_sum] + refine Finset.sum_congr rfl fun k _ => ?_ + rw [coeff_natCast] + ring + _ = 0 := by rw [h, mul_zero] + +/-- **The sum rules** `∑_k (-1)^k k^l c_k = 0` for `l < N`, as a sum over `k ∈ ℤ`. They express +that the mask polynomial is divisible by `(z + 1)^N` (`Daubechies.X_add_one_pow_dvd_maskPoly`). -/ +theorem sum_rule {l : ℕ} (hl : l < N) : + ∑ᶠ k : ℤ, (-1 : ℝ) ^ k * (k : ℝ) ^ l * coeff m k = 0 := by + rw [finsum_eq_sum_range_of_coeff m _ fun k hk => by rw [hk, mul_zero]] + simpa only [zpow_natCast, Int.cast_natCast] using sum_range_rule m hl + +/-- **The sum rules for polynomials**: `∑_k (-1)^k Q(k) c_k = 0` for every real polynomial `Q` +of degree `< N`, a linear combination of the sum rules `Daubechies.sum_rule`. -/ +theorem sum_rule_poly {Q : ℝ[X]} (hQ : Q.natDegree < N) : + ∑ᶠ k : ℤ, (-1 : ℝ) ^ k * Q.eval (k : ℝ) * coeff m k = 0 := by + rw [finsum_eq_sum_range_of_coeff m _ fun k hk => by rw [hk, mul_zero]] + simp only [zpow_natCast, Int.cast_natCast, eval_eq_sum_range' hQ, Finset.mul_sum, + Finset.sum_mul] + rw [Finset.sum_comm] + refine Finset.sum_eq_zero fun i hi => ?_ + calc ∑ k ∈ Finset.range (2 * N), (-1) ^ k * (Q.coeff i * (k : ℝ) ^ i) * coeff m k + = Q.coeff i * ∑ k ∈ Finset.range (2 * N), (-1) ^ k * (k : ℝ) ^ i * coeff m k := by + rw [Finset.mul_sum] + refine Finset.sum_congr rfl fun k _ => ?_ + ring + _ = 0 := by rw [sum_range_rule m (Finset.mem_range.1 hi), mul_zero] + +/-! ### Parity sums and first moments -/ + +/-- The alternating sum of the filter coefficients vanishes: `∑_k (-1)^k c_k = 0`, the sum rule +for `l = 0`; equivalently `m_0(1/2) = 0`. -/ +theorem finsum_neg_one_zpow_mul_coeff : ∑ᶠ k : ℤ, (-1 : ℝ) ^ k * coeff m k = 0 := by + simpa using sum_rule m (l := 0) m.one_le + +/-- **The parity sums** `∑_i c_(2i+r) = 1` for every `r ∈ ℤ`: the filter coefficients with even +and with odd indices each add up to `1`, since `∑_k c_k = 2` and `∑_k (-1)^k c_k = 0`. -/ +theorem sum_coeff_two_mul_add (r : ℤ) : ∑ᶠ i : ℤ, coeff m (2 * i + r) = 1 := by + rw [finsum_two_mul_add_eq_half (finite_support_coeff m) (finsum_neg_one_zpow_mul_coeff m) r, + finsum_coeff] + norm_num + +/-- The filter coefficients with even indices add up to `1`: `∑_i c_(2i) = 1`. -/ +theorem sum_coeff_two_mul : ∑ᶠ i : ℤ, coeff m (2 * i) = 1 := by + simpa using sum_coeff_two_mul_add m 0 + +/-- The filter coefficients with odd indices add up to `1`: `∑_i c_(2i+1) = 1`. -/ +theorem sum_coeff_two_mul_add_one : ∑ᶠ i : ℤ, coeff m (2 * i + 1) = 1 := + sum_coeff_two_mul_add m 1 + +/-- **The first moment** `μ = (1/2) ∑_k k c_k` of the filter coefficients. -/ +noncomputable def firstMoment : ℝ := 1 / 2 * ∑ᶠ k : ℤ, (k : ℝ) * coeff m k + +/-- **The first moments of the two parity classes** (`N ≥ 2`): `∑_i (2i + r) c_(2i+r) = μ` for +every `r ∈ ℤ`, where `μ = (1/2) ∑_k k c_k`. By the sum rule for `l = 1`, the even and the odd +indices contribute equally to `∑_k k c_k = 2μ`. -/ +theorem sum_two_mul_add_mul_coeff (hN : 2 ≤ N) (r : ℤ) : + ∑ᶠ i : ℤ, (2 * (i : ℝ) + r) * coeff m (2 * i + r) = firstMoment m := by + have hfin : (Function.support fun k : ℤ => (k : ℝ) * coeff m k).Finite := + (finite_support_coeff m).subset (Function.support_mul_subset_right _ _) + have halt : ∑ᶠ k : ℤ, (-1 : ℝ) ^ k * ((k : ℝ) * coeff m k) = 0 := by + simpa only [pow_one, mul_assoc] using sum_rule m (l := 1) (by omega) + calc ∑ᶠ i : ℤ, (2 * (i : ℝ) + r) * coeff m (2 * i + r) + = ∑ᶠ i : ℤ, ((2 * i + r : ℤ) : ℝ) * coeff m (2 * i + r) := + finsum_congr fun i => by push_cast; ring + _ = (∑ᶠ k : ℤ, (k : ℝ) * coeff m k) / 2 := finsum_two_mul_add_eq_half hfin halt r + _ = firstMoment m := by rw [firstMoment]; ring + +/-- **The index moments of the two parity classes** (`N ≥ 2`): `∑_i i c_(2i+r) = (μ - r)/2` for +every `r ∈ ℤ`, where `μ = (1/2) ∑_k k c_k`. It follows from `∑_i (2i + r) c_(2i+r) = μ` +(`Daubechies.sum_two_mul_add_mul_coeff`) and `∑_i c_(2i+r) = 1` +(`Daubechies.sum_coeff_two_mul_add`). -/ +theorem sum_mul_coeff_two_mul_add (hN : 2 ≤ N) (r : ℤ) : + ∑ᶠ i : ℤ, (i : ℝ) * coeff m (2 * i + r) = (firstMoment m - r) / 2 := by + have hinj : Function.Injective fun i : ℤ => 2 * i + r := fun i j h => by + simp only at h + omega + have hfin : (Function.support fun i : ℤ => coeff m (2 * i + r)).Finite := + Function.HasFiniteSupport.fun_comp_of_injective hinj (finite_support_coeff m) + have h1 : (Function.support fun i : ℤ => 2 * (i : ℝ) * coeff m (2 * i + r)).Finite := + hfin.subset (Function.support_mul_subset_right _ _) + have h2 : (Function.support fun i : ℤ => (r : ℝ) * coeff m (2 * i + r)).Finite := + hfin.subset (Function.support_mul_subset_right _ _) + have h := sum_two_mul_add_mul_coeff m hN r + simp only [add_mul] at h + rw [finsum_add_distrib h1 h2, ← mul_finsum, sum_coeff_two_mul_add, mul_one] at h + simp only [mul_assoc] at h + rw [← mul_finsum] at h + linarith + +/-! ### Derivatives of the symbol -/ + +/-- **Derivatives of a finite exponential sum** in a real variable: for `a_i, b_i ∈ ℂ`, +`(d/dt)^l ∑_i a_i e^(b_i t) = ∑_i a_i b_i^l e^(b_i t)`. Mathlib's +`iteratedDeriv_cexp_const_mul` is the version for a complex variable. -/ +theorem iteratedDeriv_sum_mul_cexp {ι : Type*} (s : Finset ι) (a b : ι → ℂ) (l : ℕ) : + iteratedDeriv l (fun t : ℝ => ∑ i ∈ s, a i * Complex.exp (b i * t)) = + fun t : ℝ => ∑ i ∈ s, a i * b i ^ l * Complex.exp (b i * t) := by + induction l with + | zero => simp + | succ l ih => + rw [iteratedDeriv_succ, ih] + funext t + refine HasDerivAt.deriv (HasDerivAt.fun_sum fun i _ => ?_) + have h1 : HasDerivAt (fun y : ℝ => b i * (y : ℂ)) (b i) t := by + simpa only [mul_one] using! ((hasDerivAt_id (t : ℂ)).const_mul (b i)).comp_ofReal + convert h1.cexp.const_mul (a i * b i ^ l) using 1 + ring + +/-- The symbol as a finite exponential sum: `m_0(ξ) = ∑_{k < 2N} (c_k/2) e^(-2πikξ)`. -/ +theorem symbol_eq_sum_cexp : + symbol m = fun ξ : ℝ => ∑ k ∈ Finset.range (2 * N), + (coeff m k / 2 : ℂ) * Complex.exp (-(2 * π * Complex.I * k) * ξ) := by + funext ξ + rw [symbol_eq_sum, Finset.mul_sum] + refine Finset.sum_congr rfl fun k _ => ?_ + rw [expFreq_pow, expFreq_eq_exp_mul, + show -(2 * (π : ℂ) * Complex.I * k) * ξ = -(2 * π * Complex.I) * ((k * ξ : ℝ) : ℂ) by + push_cast; ring] + ring + +/-- **The derivatives of the symbol**: `m_0^(l)(ξ) = ∑_{k < 2N} (c_k/2) (-2πik)^l e^(-2πikξ)`. -/ +theorem iteratedDeriv_symbol (l : ℕ) (ξ : ℝ) : + iteratedDeriv l (symbol m) ξ = ∑ k ∈ Finset.range (2 * N), + (coeff m k / 2 : ℂ) * (-(2 * π * Complex.I * k)) ^ l * expFreq ξ ^ k := by + rw [symbol_eq_sum_cexp, iteratedDeriv_sum_mul_cexp] + refine Finset.sum_congr rfl fun k _ => ?_ + rw [expFreq_pow, expFreq_eq_exp_mul] + congr 2 + push_cast + ring + +/-- **The derivatives of the symbol vanish at the half-integers** up to order `N - 1`: +`m_0^(l)(1/2 + n) = 0` for `l < N` and `n ∈ ℤ`. At `ξ = 1/2 + n` one has +`e^(-2πikξ) = (-1)^k`, so `m_0^(l)(1/2 + n) = (1/2) (-2πi)^l ∑_k (-1)^k k^l c_k`, which vanishes +by the sum rules. -/ +theorem iteratedDeriv_symbol_half_add_int {l : ℕ} (hl : l < N) (n : ℤ) : + iteratedDeriv l (symbol m) (1 / 2 + n) = 0 := by + have h : ∑ k ∈ Finset.range (2 * N), ((-1) ^ k * (k : ℂ) ^ l * coeff m k) = 0 := by + exact_mod_cast sum_range_rule m hl + rw [iteratedDeriv_symbol, expFreq_half_add_int] + calc ∑ k ∈ Finset.range (2 * N), + (coeff m k / 2 : ℂ) * (-(2 * π * Complex.I * k)) ^ l * (-1) ^ k + = (-(2 * π * Complex.I)) ^ l / 2 * + ∑ k ∈ Finset.range (2 * N), ((-1) ^ k * (k : ℂ) ^ l * coeff m k) := by + rw [Finset.mul_sum] + refine Finset.sum_congr rfl fun k _ => ?_ + rw [show -(2 * (π : ℂ) * Complex.I * k) = -(2 * π * Complex.I) * k by ring, mul_pow] + ring + _ = 0 := by rw [h, mul_zero] + +/-! ### The dual filter -/ + +/-- **The dual filter** `g_k = (-1)^k c_(1-k)` of a mask, the coefficients of the refinement +equation `ψ(x) = ∑_k g_k φ(2x - k)` of the wavelet. They vanish outside `2 - 2N ≤ k ≤ 1` +(`Daubechies.dualCoeff_eq_zero`). -/ +noncomputable def dualCoeff (k : ℤ) : ℝ := (-1) ^ k * coeff m (1 - k) + +/-- The dual filter vanishes outside `2 - 2N ≤ k ≤ 1`. -/ +theorem dualCoeff_eq_zero {k : ℤ} (hk : k < 2 - 2 * (N : ℤ) ∨ 1 < k) : dualCoeff m k = 0 := by + rw [dualCoeff, coeff_eq_zero m (by omega), mul_zero] + +/-- The dual filter has finite support. -/ +theorem finite_support_dualCoeff : (Function.support (dualCoeff m)).Finite := + (Set.finite_Icc (2 - 2 * (N : ℤ)) 1).subset fun k hk => by + by_contra h + simp only [Set.mem_Icc, not_and_or, not_le] at h + exact hk (dualCoeff_eq_zero m h) + +/-- A sum over `k ∈ ℤ` of a function that vanishes wherever the dual filter vanishes is the +finite sum over `2 - 2N ≤ k ≤ 1`. -/ +theorem finsum_eq_sum_Icc_of_dualCoeff {M : Type*} [AddCommMonoid M] (f : ℤ → M) + (hf : ∀ k : ℤ, dualCoeff m k = 0 → f k = 0) : + ∑ᶠ k : ℤ, f k = ∑ k ∈ Finset.Icc (2 - 2 * (N : ℤ)) 1, f k := + finsum_eq_sum_of_support_subset f fun k hk => by + rw [Finset.coe_Icc, Set.mem_Icc] + by_contra h + rw [not_and_or, not_le, not_le] at h + exact hk (hf k (dualCoeff_eq_zero m h)) + +/-- **Orthogonality of the even shifts of the dual filter**: `∑_k g_k g_(k+2j) = 2 δ_(j0)` for +every `j ∈ ℤ`. The substitution `k ↦ 1 - 2j - k` turns the sum into `∑_k c_k c_(k+2j)` +(`Daubechies.sum_coeff_mul_coeff_add`). -/ +theorem sum_dualCoeff_mul_dualCoeff_add (j : ℤ) : + ∑ᶠ k : ℤ, dualCoeff m k * dualCoeff m (k + 2 * j) = if j = 0 then 2 else 0 := by + calc ∑ᶠ k : ℤ, dualCoeff m k * dualCoeff m (k + 2 * j) + = ∑ᶠ k : ℤ, dualCoeff m (1 - 2 * j - k) * dualCoeff m (1 - 2 * j - k + 2 * j) := + (finsum_comp_equiv (Equiv.subLeft (1 - 2 * j)) + (f := fun k => dualCoeff m k * dualCoeff m (k + 2 * j))).symm + _ = ∑ᶠ k : ℤ, coeff m k * coeff m (k + 2 * j) := finsum_congr fun k => by + simp only [dualCoeff] + rw [show 1 - (1 - 2 * j - k) = k + 2 * j by ring, + show 1 - 2 * j - k + 2 * j = 1 - k by ring, show 1 - (1 - k) = k by ring, + neg_one_zpow_eq_of_even_sub (a := 1 - 2 * j - k) (b := 1 - k) ⟨-j, by ring⟩] + have h1 : (-1 : ℝ) ^ (1 - k) * (-1) ^ (1 - k) = 1 := by + rw [← zpow_add₀ (by norm_num : (-1 : ℝ) ≠ 0)] + exact Even.neg_one_zpow ⟨1 - k, rfl⟩ + calc (-1) ^ (1 - k) * coeff m (k + 2 * j) * ((-1) ^ (1 - k) * coeff m k) + = ((-1) ^ (1 - k) * (-1) ^ (1 - k)) * (coeff m k * coeff m (k + 2 * j)) := by ring + _ = coeff m k * coeff m (k + 2 * j) := by rw [h1, one_mul] + _ = if j = 0 then 2 else 0 := sum_coeff_mul_coeff_add m j + +/-- **The dual filter is orthogonal to the even shifts of the filter**: `∑_k c_k g_(k+2j) = 0` +for every `j ∈ ℤ`. The substitution `k ↦ 1 - 2j - k` maps the sum to its negative. -/ +theorem sum_coeff_mul_dualCoeff_add (j : ℤ) : + ∑ᶠ k : ℤ, coeff m k * dualCoeff m (k + 2 * j) = 0 := by + have h : ∑ᶠ k : ℤ, coeff m k * dualCoeff m (k + 2 * j) = + -∑ᶠ k : ℤ, coeff m k * dualCoeff m (k + 2 * j) := by + rw [← finsum_neg_distrib] + calc ∑ᶠ k : ℤ, coeff m k * dualCoeff m (k + 2 * j) + = ∑ᶠ k : ℤ, coeff m (1 - 2 * j - k) * dualCoeff m (1 - 2 * j - k + 2 * j) := + (finsum_comp_equiv (Equiv.subLeft (1 - 2 * j)) + (f := fun k => coeff m k * dualCoeff m (k + 2 * j))).symm + _ = ∑ᶠ k : ℤ, -(coeff m k * dualCoeff m (k + 2 * j)) := finsum_congr fun k => by + simp only [dualCoeff] + rw [show 1 - (1 - 2 * j - k + 2 * j) = k by ring, + show 1 - 2 * j - k + 2 * j = 1 - k by ring, + show 1 - (k + 2 * j) = 1 - 2 * j - k by ring, + neg_one_zpow_eq_neg_of_odd_sub (a := 1 - k) (b := k + 2 * j) ⟨-k - j, by ring⟩] + ring + linarith + +/-- Reindexing a sum of products of filter coefficients over one parity class: +`∑_j c_(a-2j) c_(b-2j) = ∑_i c_(2i+b+(a-b)) c_(2i+b)`. -/ +theorem finsum_coeff_sub_two_mul_mul (a b : ℤ) : + ∑ᶠ j : ℤ, coeff m (a - 2 * j) * coeff m (b - 2 * j) = + ∑ᶠ i : ℤ, coeff m (2 * i + b + (a - b)) * coeff m (2 * i + b) := by + calc ∑ᶠ j : ℤ, coeff m (a - 2 * j) * coeff m (b - 2 * j) + = ∑ᶠ i : ℤ, coeff m (a - 2 * -i) * coeff m (b - 2 * -i) := + (finsum_comp_equiv (Equiv.neg ℤ) + (f := fun j => coeff m (a - 2 * j) * coeff m (b - 2 * j))).symm + _ = ∑ᶠ i : ℤ, coeff m (2 * i + b + (a - b)) * coeff m (2 * i + b) := + finsum_congr fun i => by + rw [show a - 2 * -i = 2 * i + b + (a - b) by ring, show b - 2 * -i = 2 * i + b by ring] + +/-- Reindexing a sum of products of dual filter coefficients over one parity class: +`∑_j g_(a-2j) g_(b-2j) = (-1)^(a+b) ∑_i c_(2i+(1-a)+(a-b)) c_(2i+(1-a))`. -/ +theorem finsum_dualCoeff_sub_two_mul_mul (a b : ℤ) : + ∑ᶠ j : ℤ, dualCoeff m (a - 2 * j) * dualCoeff m (b - 2 * j) = + (-1) ^ (a + b) * + ∑ᶠ i : ℤ, coeff m (2 * i + (1 - a) + (a - b)) * coeff m (2 * i + (1 - a)) := by + rw [mul_finsum] + refine finsum_congr fun j => ?_ + simp only [dualCoeff] + rw [neg_one_zpow_eq_of_even_sub (a := a - 2 * j) (b := a) ⟨-j, by ring⟩, + neg_one_zpow_eq_of_even_sub (a := b - 2 * j) (b := b) ⟨-j, by ring⟩, + zpow_add₀ (by norm_num : (-1 : ℝ) ≠ 0), show 1 - (a - 2 * j) = 2 * j + (1 - a) by ring, + show 1 - (b - 2 * j) = 2 * j + (1 - a) + (a - b) by ring] + ring + +/-- **The filter and its dual resolve the identity**: for all `a, b ∈ ℤ`, +`∑_j (c_(a-2j) c_(b-2j) + g_(a-2j) g_(b-2j)) = 2 δ_(ab)`. Both sums run over one parity class +of the products `h(k) = c_(k+(a-b)) c_k`. For `a - b` even the two classes are complementary and +the sum is `∑_k c_k c_(k+(a-b)) = 2 δ_(ab)` (`Daubechies.sum_coeff_mul_coeff_add`); for `a - b` +odd the two classes agree and the sign `(-1)^(a+b) = -1` makes them cancel. -/ +theorem sum_coeff_mul_add_dual (a b : ℤ) : + ∑ᶠ j : ℤ, (coeff m (a - 2 * j) * coeff m (b - 2 * j) + + dualCoeff m (a - 2 * j) * dualCoeff m (b - 2 * j)) = if a = b then 2 else 0 := by + have hinj : Function.Injective fun j : ℤ => b - 2 * j := fun i j hij => by + simp only at hij + omega + have hfin1 : (Function.support fun j : ℤ => + coeff m (a - 2 * j) * coeff m (b - 2 * j)).Finite := + Set.Finite.subset (Function.HasFiniteSupport.fun_comp_of_injective hinj + (finite_support_coeff m)) (Function.support_mul_subset_right _ _) + have hfin2 : (Function.support fun j : ℤ => + dualCoeff m (a - 2 * j) * dualCoeff m (b - 2 * j)).Finite := + Set.Finite.subset (Function.HasFiniteSupport.fun_comp_of_injective hinj + (finite_support_dualCoeff m)) (Function.support_mul_subset_right _ _) + have hfinh : (Function.support fun k : ℤ => coeff m (k + (a - b)) * coeff m k).Finite := + (finite_support_coeff m).subset (Function.support_mul_subset_right _ _) + rw [finsum_add_distrib hfin1 hfin2, finsum_coeff_sub_two_mul_mul, + finsum_dualCoeff_sub_two_mul_mul] + rcases Int.even_or_odd (a - b) with ⟨t, ht⟩ | ⟨t, ht⟩ + · rw [Even.neg_one_zpow ⟨b + t, by omega⟩, one_mul, + show 1 - a = b + 1 + 2 * (-b - t) by omega, + finsum_two_mul_add_add_two_mul (fun k : ℤ => coeff m (k + (a - b)) * coeff m k), + finsum_two_mul_add_add_finsum hfinh b, show a - b = 2 * t by omega] + rw [finsum_congr fun k => mul_comm (coeff m (k + 2 * t)) (coeff m k), + sum_coeff_mul_coeff_add m t] + simp only [show t = 0 ↔ a = b by omega] + · rw [Odd.neg_one_zpow ⟨b + t, by omega⟩, show 1 - a = b + 2 * (-b - t) by omega, + finsum_two_mul_add_add_two_mul (fun k : ℤ => coeff m (k + (a - b)) * coeff m k)] + simp only [show ¬a = b by omega, ↓reduceIte] + ring + +/-- **Vanishing moments of the dual filter**: `∑_k g_k k^l = 0` for `l < N`. The substitution +`k ↦ 1 - k` turns the sum into `-∑_k (-1)^k (1 - k)^l c_k`, which vanishes by the sum rules for +the polynomial `(1 - X)^l` of degree `l < N` (`Daubechies.sum_rule_poly`). -/ +theorem sum_dualCoeff_mul_pow {l : ℕ} (hl : l < N) : + ∑ᶠ k : ℤ, dualCoeff m k * (k : ℝ) ^ l = 0 := by + have hdeg : ((1 - X : ℝ[X]) ^ l).natDegree < N := by + have h1 : (1 - X : ℝ[X]).natDegree ≤ 1 := (natDegree_sub_le _ _).trans (by simp) + exact (natDegree_pow_le_of_le l h1).trans_lt (by omega) + calc ∑ᶠ k : ℤ, dualCoeff m k * (k : ℝ) ^ l + = ∑ᶠ k : ℤ, dualCoeff m (1 - k) * ((1 - k : ℤ) : ℝ) ^ l := + (finsum_comp_equiv (Equiv.subLeft 1) (f := fun k => dualCoeff m k * (k : ℝ) ^ l)).symm + _ = ∑ᶠ k : ℤ, -((-1 : ℝ) ^ k * ((1 - X : ℝ[X]) ^ l).eval (k : ℝ) * coeff m k) := + finsum_congr fun k => by + simp only [dualCoeff] + rw [show (1 : ℤ) - (1 - k) = k by ring, + neg_one_zpow_eq_neg_of_odd_sub (a := 1 - k) (b := k) ⟨-k, by ring⟩] + simp only [eval_pow, eval_sub, eval_one, eval_X] + push_cast + ring + _ = 0 := by rw [finsum_neg_distrib, sum_rule_poly m hdeg, neg_zero] + +end Daubechies diff --git a/LeanPool/FunctionSpaces/Wavelets/Examples/Daubechies/FourierIntegrable.lean b/LeanPool/FunctionSpaces/Wavelets/Examples/Daubechies/FourierIntegrable.lean new file mode 100644 index 0000000000..bfce870271 --- /dev/null +++ b/LeanPool/FunctionSpaces/Wavelets/Examples/Daubechies/FourierIntegrable.lean @@ -0,0 +1,293 @@ +/- +Copyright (c) 2026 Mario Ullrich. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Mario Ullrich +-/ +module + +public import LeanPool.FunctionSpaces.Analysis.Fourier.LittlewoodPaleyKernels +public import Mathlib.Analysis.Distribution.AEEqOfIntegralContDiff + +/- +Modified for Lean Pool: module names and imports adapted. +-/ + +/-! +# The Fourier transform of integrable functions on the line + +Mathlib's Fourier transform of `f : ℝ → ℂ` is `𝓕 f(ξ) = ∫ e^(-2πixξ) f(x) dx`, its inverse is +`𝓕⁻ f(x) = ∫ e^(2πixξ) f(ξ) dξ` (`Real.fourier_real_eq`, `Real.fourierInv_eq`). This file proves +the facts about the transform that the Daubechies scaling function `φ = 𝓕⁻ Φ` needs. The +analytic hypotheses are integrability and continuity conditions. Continuity, the uniform bound, +the value at `0`, conjugation and the multiplication formula are the cases `V = ℝ` of the +lemmas of `FunctionSpaces.Analysis.Fourier.LittlewoodPaleyKernels`. + +* **Continuity and the uniform bound.** For integrable `f`, `𝓕 f` and `𝓕⁻ f` are continuous + (`Real.continuous_fourier_of_integrable`), and `‖𝓕 f(ξ)‖ ≤ ∫ ‖f‖` + (Mathlib's `Real.norm_fourier_le_integral_norm`). +* **The value at `0`**: `𝓕 f(0) = ∫ f` for every `f` (`Real.fourier_apply_zero`). +* **Linearity**: `𝓕[c f] = c 𝓕 f` for every `f` (`Real.fourier_const_mul_apply`) and finite sums + of integrable functions (`Real.fourier_sum_apply`), each with its `𝓕⁻` version. +* **Translation, modulation, dilation, conjugation**: + `𝓕[f(· + a)](ξ) = e^(2πiaξ) 𝓕 f(ξ)` (`Real.fourier_comp_add_right_apply`), + `𝓕[e^(2πib·) f](ξ) = 𝓕 f(ξ - b)` (`Real.fourier_exp_mul_apply`), + `𝓕[f(a ·)](ξ) = a⁻¹ 𝓕 f(ξ / a)` for `a > 0` (`Real.fourier_comp_mul_left_apply`) and + `conj (𝓕 f(ξ)) = 𝓕⁻[conj ∘ f](ξ)` (`Real.conj_fourier`), each with its `𝓕⁻` version. +* **The multiplication formula** `∫ 𝓕 f · g = ∫ f · 𝓕 g` for integrable `f, g` + (`Real.integral_fourier_mul`), by Fubini (`Rd.integral_fourier_mul`). +* **Parseval's identity** `∫ f · conj g = ∫ 𝓕 f · conj (𝓕 g)` for integrable `f` and continuous + integrable `g` with integrable `𝓕 g` (`Real.integral_mul_conj_eq_integral_fourier`): the + sesquilinear multiplication formula for `f` and `𝓕 g` + (`VectorFourier.integral_sesq_fourierIntegral_eq_neg_flip`) and the inversion theorem + `𝓕⁻ (𝓕 g) = g` (`Continuous.fourierInv_fourier_eq`). For `f = g` it is Plancherel's identity + `∫ ‖𝓕 f‖² = ∫ ‖f‖²` (`Real.integral_norm_sq_fourier`). +* **Schwartz test functions.** `∫ f · ψ = ∫ 𝓕 f · 𝓕⁻ ψ` for integrable `f` and a Schwartz + function `ψ` (`Real.integral_mul_schwartz_eq`), and the **fundamental lemma** + `Real.eqOn_zero_of_integral_mul_schwartz_eq_zero`: a continuous `f` with `∫ ψ f = 0` for every + Schwartz function `ψ` with compact support in an open set `U` vanishes on `U`. Mathlib's + `IsOpen.ae_eq_zero_of_integral_contDiff_smul_eq_zero` tests with real smooth compactly + supported `g`, and `x ↦ (g x : ℂ)` is a Schwartz function (`HasCompactSupport.toSchwartzMap`), + so `f = 0` almost everywhere on `U` (`Real.ae_eq_zero_of_integral_mul_schwartz_eq_zero`); + continuity gives `f = 0` at every point of `U` (`MeasureTheory.Measure.eqOn_open_of_ae_eq`). +-/ + +@[expose] public section + +open MeasureTheory Complex +open scoped FourierTransform SchwartzMap ComplexConjugate ContDiff + +namespace Real + +variable {f g : ℝ → ℂ} + +/-! ### Continuity and the uniform bound -/ + +/-- The Fourier transform `𝓕 f(ξ) = ∫ e^(-2πixξ) f(x) dx` of an integrable function is +continuous (`Rd.continuous_fourier_of_integrable` on `ℝ`). -/ +theorem continuous_fourier_of_integrable (hf : Integrable f) : Continuous (𝓕 f) := + Rd.continuous_fourier_of_integrable hf + +/-- The inverse Fourier transform `𝓕⁻ f(x) = ∫ e^(2πixξ) f(ξ) dξ` of an integrable function is +continuous (`Rd.continuous_fourierInv_of_integrable` on `ℝ`). -/ +theorem continuous_fourierInv_of_integrable (hf : Integrable f) : Continuous (𝓕⁻ f) := + Rd.continuous_fourierInv_of_integrable hf + +/-- The uniform bound `‖𝓕⁻ f(x)‖ ≤ ∫ ‖f‖` for the inverse transform +(`Rd.norm_fourierInv_le_integral_norm` on `ℝ`). -/ +theorem norm_fourierInv_le_integral_norm (f : ℝ → ℂ) (x : ℝ) : ‖𝓕⁻ f x‖ ≤ ∫ ξ, ‖f ξ‖ := + Rd.norm_fourierInv_le_integral_norm f x + +/-! ### The Fourier transform at `0` -/ + +/-- **The Fourier transform at `0` is the integral**: `𝓕 f(0) = ∫ f(x) dx` for every +`f : ℝ → ℂ` (`Rd.fourier_apply_zero` on `ℝ`). -/ +theorem fourier_apply_zero (f : ℝ → ℂ) : 𝓕 f 0 = ∫ x, f x := + Rd.fourier_apply_zero f + +/-! ### Linearity -/ + +/-- The Fourier transform commutes with multiplication by a constant, `𝓕[c f] = c 𝓕 f`, for +every `f` (Mathlib's `VectorFourier.fourierIntegral_const_smul`). -/ +theorem fourier_const_mul_apply (c : ℂ) (f : ℝ → ℂ) (ξ : ℝ) : + 𝓕 (fun x => c * f x) ξ = c * 𝓕 f ξ := + congrFun (VectorFourier.fourierIntegral_const_smul 𝐞 volume (innerₗ ℝ) f c) ξ + +/-- The inverse Fourier transform commutes with multiplication by a constant. -/ +theorem fourierInv_const_mul_apply (c : ℂ) (f : ℝ → ℂ) (x : ℝ) : + 𝓕⁻ (fun ξ => c * f ξ) x = c * 𝓕⁻ f x := by + rw [fourierInv_eq_fourier_neg, fourierInv_eq_fourier_neg, fourier_const_mul_apply] + +/-- The Fourier transform of a finite sum of integrable functions is the sum of the +transforms. -/ +theorem fourier_sum_apply {ι : Type*} (s : Finset ι) {F : ι → ℝ → ℂ} + (hF : ∀ i ∈ s, Integrable (F i)) (ξ : ℝ) : + 𝓕 (fun x => ∑ i ∈ s, F i x) ξ = ∑ i ∈ s, 𝓕 (F i) ξ := by + simp only [fourier_eq, Finset.smul_sum] + exact integral_finsetSum s fun i hi => (fourierIntegral_convergent_iff ξ).2 (hF i hi) + +/-- The inverse Fourier transform of a finite sum of integrable functions is the sum of the +inverse transforms. -/ +theorem fourierInv_sum_apply {ι : Type*} (s : Finset ι) {F : ι → ℝ → ℂ} + (hF : ∀ i ∈ s, Integrable (F i)) (x : ℝ) : + 𝓕⁻ (fun ξ => ∑ i ∈ s, F i ξ) x = ∑ i ∈ s, 𝓕⁻ (F i) x := by + rw [fourierInv_eq_fourier_neg, fourier_sum_apply s hF] + exact Finset.sum_congr rfl fun i _ => (fourierInv_eq_fourier_neg (F i) x).symm + +/-! ### Translation, modulation, dilation -/ + +/-- **Translation becomes modulation**: `𝓕[f(· + a)](ξ) = e^(2πiaξ) 𝓕 f(ξ)`, by the substitution +`y = x + a` (Mathlib's `VectorFourier.fourierIntegral_comp_add_right`). -/ +theorem fourier_comp_add_right_apply (f : ℝ → ℂ) (a ξ : ℝ) : + 𝓕 (fun x => f (x + a)) ξ = cexp (2 * π * a * ξ * I) * 𝓕 f ξ := by + have h := congrFun (VectorFourier.fourierIntegral_comp_add_right 𝐞 volume (innerₗ ℝ) f a) ξ + refine h.trans ?_ + rw [Circle.smul_def, fourierChar_apply, innerₗ_apply_apply, inner_apply, smul_eq_mul] + congr 2 + push_cast + ring + +/-- **Translation becomes modulation**, subtraction form: `𝓕[f(· - a)](ξ) = e^(-2πiaξ) 𝓕 f(ξ)`. -/ +theorem fourier_comp_sub_right_apply (f : ℝ → ℂ) (a ξ : ℝ) : + 𝓕 (fun x => f (x - a)) ξ = cexp (-(2 * π * a * ξ * I)) * 𝓕 f ξ := by + simp_rw [sub_eq_add_neg] + rw [fourier_comp_add_right_apply] + congr 2 + push_cast + ring + +/-- Translation for the inverse transform: `𝓕⁻[f(· + a)](x) = e^(-2πiax) 𝓕⁻ f(x)`. -/ +theorem fourierInv_comp_add_right_apply (f : ℝ → ℂ) (a x : ℝ) : + 𝓕⁻ (fun ξ => f (ξ + a)) x = cexp (-(2 * π * a * x * I)) * 𝓕⁻ f x := by + rw [fourierInv_eq_fourier_neg, fourierInv_eq_fourier_neg, fourier_comp_add_right_apply] + congr 2 + push_cast + ring + +/-- **Modulation becomes translation**: `𝓕[e^(2πib·) f](ξ) = 𝓕 f(ξ - b)`, since +`e^(-2πixξ) e^(2πibx) = e^(-2πix(ξ - b))`. -/ +theorem fourier_exp_mul_apply (f : ℝ → ℂ) (b ξ : ℝ) : + 𝓕 (fun x : ℝ => cexp (2 * π * b * x * I) * f x) ξ = 𝓕 f (ξ - b) := by + rw [fourier_real_eq_integral_exp_smul, fourier_real_eq_integral_exp_smul] + congr 1 with x + rw [smul_eq_mul, smul_eq_mul, ← mul_assoc, ← Complex.exp_add] + congr 2 + push_cast + ring + +/-- Modulation for the inverse transform: `𝓕⁻[e^(2πib·) f](x) = 𝓕⁻ f(x + b)`. -/ +theorem fourierInv_exp_mul_apply (f : ℝ → ℂ) (b x : ℝ) : + 𝓕⁻ (fun ξ : ℝ => cexp (2 * π * b * ξ * I) * f ξ) x = 𝓕⁻ f (x + b) := by + rw [fourierInv_eq_fourier_neg, fourierInv_eq_fourier_neg, fourier_exp_mul_apply, neg_add, + sub_eq_add_neg] + +/-- **Dilation** by `a ≠ 0`: `𝓕[f(a ·)](ξ) = |a|⁻¹ 𝓕 f(ξ / a)`, by the substitution `y = a x` +(Mathlib's `MeasureTheory.Measure.integral_comp_mul_left`). -/ +theorem fourier_comp_mul_left_apply_of_ne_zero (f : ℝ → ℂ) {a : ℝ} (ha : a ≠ 0) (ξ : ℝ) : + 𝓕 (fun x => f (a * x)) ξ = ((|a| : ℝ) : ℂ)⁻¹ * 𝓕 f (ξ / a) := by + have h : ∀ x : ℝ, 𝐞 (-(x * ξ)) • f (a * x) = + (fun y => 𝐞 (-(y * (ξ / a))) • f y) (a * x) := fun x => by + simp only + congr 3 + field_simp + rw [fourier_real_eq, fourier_real_eq] + simp_rw [h] + rw [Measure.integral_comp_mul_left (fun y => 𝐞 (-(y * (ξ / a))) • f y) a, Complex.real_smul, + abs_inv, Complex.ofReal_inv] + +/-- **Dilation** by `a > 0`: `𝓕[f(a ·)](ξ) = a⁻¹ 𝓕 f(ξ / a)`. -/ +theorem fourier_comp_mul_left_apply (f : ℝ → ℂ) {a : ℝ} (ha : 0 < a) (ξ : ℝ) : + 𝓕 (fun x => f (a * x)) ξ = (a : ℂ)⁻¹ * 𝓕 f (ξ / a) := by + rw [fourier_comp_mul_left_apply_of_ne_zero f ha.ne', abs_of_pos ha] + +/-- Dilation for the inverse transform, `a > 0`: `𝓕⁻[f(a ·)](x) = a⁻¹ 𝓕⁻ f(x / a)`. -/ +theorem fourierInv_comp_mul_left_apply (f : ℝ → ℂ) {a : ℝ} (ha : 0 < a) (x : ℝ) : + 𝓕⁻ (fun ξ => f (a * ξ)) x = (a : ℂ)⁻¹ * 𝓕⁻ f (x / a) := by + rw [fourierInv_eq_fourier_neg, fourierInv_eq_fourier_neg, fourier_comp_mul_left_apply f ha, + neg_div] + +/-- Dilation and translation together, `a > 0`: +`𝓕[f(a · - b)](ξ) = a⁻¹ e^(-2πibξ/a) 𝓕 f(ξ / a)`. This is the form met by the cascade +`η_{n+1}(x) = ∑_k c_k η_n(2x - k)`. -/ +theorem fourier_comp_mul_sub_apply (f : ℝ → ℂ) {a : ℝ} (ha : 0 < a) (b ξ : ℝ) : + 𝓕 (fun x => f (a * x - b)) ξ = + (a : ℂ)⁻¹ * (cexp (-(2 * π * b * (ξ / a) * I)) * 𝓕 f (ξ / a)) := by + rw [fourier_comp_mul_left_apply (fun y => f (y - b)) ha, fourier_comp_sub_right_apply] + push_cast + rfl + +/-! ### Conjugation -/ + +/-- **Conjugation**: `conj (𝓕 f(ξ)) = 𝓕⁻[conj ∘ f](ξ)`, since `conj e^(-2πixξ) = e^(2πixξ)` +(`Rd.conj_fourier_apply` on `ℝ`). -/ +theorem conj_fourier (f : ℝ → ℂ) (ξ : ℝ) : conj (𝓕 f ξ) = 𝓕⁻ (fun x => conj (f x)) ξ := + Rd.conj_fourier_apply f ξ + +/-- Conjugation for the inverse transform: `conj (𝓕⁻ f(x)) = 𝓕[conj ∘ f](x)` +(`Rd.conj_fourierInv_apply` on `ℝ`). -/ +theorem conj_fourierInv (f : ℝ → ℂ) (x : ℝ) : conj (𝓕⁻ f x) = 𝓕 (fun ξ => conj (f ξ)) x := + Rd.conj_fourierInv_apply f x + +/-! ### The multiplication formula and Parseval's identity -/ + +/-- **The multiplication formula** `∫ 𝓕 f · g = ∫ f · 𝓕 g` for integrable `f, g` +(`Rd.integral_fourier_mul` on `ℝ`). -/ +theorem integral_fourier_mul (hf : Integrable f) (hg : Integrable g) : + ∫ ξ, 𝓕 f ξ * g ξ = ∫ x, f x * 𝓕 g x := + Rd.integral_fourier_mul hf hg + +/-- The multiplication formula for the inverse transform: `∫ 𝓕⁻ f · g = ∫ f · 𝓕⁻ g` for +integrable `f, g` (`Rd.integral_fourierInv_mul` on `ℝ`). -/ +theorem integral_fourierInv_mul (hf : Integrable f) (hg : Integrable g) : + ∫ ξ, 𝓕⁻ f ξ * g ξ = ∫ x, f x * 𝓕⁻ g x := + Rd.integral_fourierInv_mul hf hg + +/-- **Parseval's identity** `∫ f · conj g = ∫ 𝓕 f · conj (𝓕 g)` for integrable `f` and a +continuous integrable `g` with integrable transform. The sesquilinear multiplication formula +(Mathlib's `VectorFourier.integral_sesq_fourierIntegral_eq_neg_flip`) applied to `f` and `𝓕 g` +gives `∫ 𝓕 g · conj (𝓕 f) = ∫ 𝓕⁻ (𝓕 g) · conj f`, and `𝓕⁻ (𝓕 g) = g` by the inversion theorem +(Mathlib's `Continuous.fourierInv_fourier_eq`, which needs the hypotheses on `g`). -/ +theorem integral_mul_conj_eq_integral_fourier (hf : Integrable f) (hg : Continuous g) + (hgi : Integrable g) (hFg : Integrable (𝓕 g)) : + ∫ x, f x * conj (g x) = ∫ ξ, 𝓕 f ξ * conj (𝓕 g ξ) := by + have h := VectorFourier.integral_sesq_fourierIntegral_eq_neg_flip (innerSL ℂ (E := ℂ)) + (L := innerₗ ℝ) continuous_fourierChar continuous_inner hf hFg + have h' : ∫ ξ, 𝓕 g ξ * conj (𝓕 f ξ) = ∫ x, 𝓕⁻ (𝓕 g) x * conj (f x) := by + simpa [RCLike.inner_apply] using! h + rw [hg.fourierInv_fourier_eq hgi hFg] at h' + have h'' := congrArg conj h' + rw [← integral_conj, ← integral_conj] at h'' + simpa [mul_comm] using h''.symm + +/-- **Plancherel's identity** `∫ ‖𝓕 f‖² = ∫ ‖f‖²` for a continuous integrable `f` with integrable +transform: Parseval's identity for `g = f`, with `z · conj z = ‖z‖²`. -/ +theorem integral_norm_sq_fourier (hf : Continuous f) (hfi : Integrable f) + (hFf : Integrable (𝓕 f)) : ∫ ξ, ‖𝓕 f ξ‖ ^ 2 = ∫ x, ‖f x‖ ^ 2 := by + have h := integral_mul_conj_eq_integral_fourier hfi hf hfi hFf + have e : ∀ z : ℂ, z * conj z = ((‖z‖ ^ 2 : ℝ) : ℂ) := fun z => by + rw [Complex.mul_conj, Complex.normSq_eq_norm_sq] + simp_rw [e] at h + rw [integral_complex_ofReal, integral_complex_ofReal] at h + exact_mod_cast h.symm + +/-- **Testing against a Schwartz function** `ψ`: `∫ f · ψ = ∫ 𝓕 f · 𝓕⁻ ψ` for integrable `f`, +the multiplication formula for `f` and `𝓕⁻ ψ` together with `𝓕 (𝓕⁻ ψ) = ψ` (Fourier inversion on +the Schwartz space). Here `𝓕⁻ ψ` is the inverse transform of `ψ` as a Schwartz function. -/ +theorem integral_mul_schwartz_eq (hf : Integrable f) (ψ : 𝓢(ℝ, ℂ)) : + ∫ x, f x * ψ x = ∫ ξ, 𝓕 f ξ * 𝓕⁻ ψ ξ := by + rw [integral_fourier_mul hf (𝓕⁻ ψ).integrable] + congr 1 with x + rw [← SchwartzMap.fourier_coe, FourierTransform.fourier_fourierInv_eq] + +/-! ### The fundamental lemma of the calculus of variations -/ + +/-- **Fundamental lemma, almost everywhere form**: if `f` is locally integrable on an open set `U` +and `∫ ψ f = 0` for every Schwartz function `ψ` with compact support in `U`, then `f = 0` almost +everywhere on `U`. Mathlib's `IsOpen.ae_eq_zero_of_integral_contDiff_smul_eq_zero` tests with +real smooth compactly supported `g`; the function `x ↦ (g x : ℂ)` is such a Schwartz function +(`HasCompactSupport.toSchwartzMap`). -/ +theorem ae_eq_zero_of_integral_mul_schwartz_eq_zero {U : Set ℝ} (hU : IsOpen U) + (hf : LocallyIntegrableOn f U) + (h : ∀ ψ : 𝓢(ℝ, ℂ), HasCompactSupport ψ → tsupport ψ ⊆ U → ∫ x, ψ x * f x = 0) : + ∀ᵐ x, x ∈ U → f x = 0 := by + refine hU.ae_eq_zero_of_integral_contDiff_smul_eq_zero hf fun g g_smooth g_cpt g_supp => ?_ + have hg₁ : HasCompactSupport (Complex.ofRealCLM ∘ g) := g_cpt.comp_left rfl + have hg₂ : ContDiff ℝ ∞ (Complex.ofRealCLM ∘ g) := by fun_prop + have hg₃ : tsupport (Complex.ofRealCLM ∘ g) ⊆ U := + (tsupport_comp_subset (map_zero Complex.ofRealCLM) g).trans g_supp + simpa [Complex.real_smul] using h (hg₁.toSchwartzMap hg₂) hg₁ hg₃ + +/-- **Fundamental lemma**: a continuous `f` with `∫ ψ f = 0` for every Schwartz function `ψ` +with compact support in an open set `U` vanishes at every point of `U`. Almost everywhere this +is `Real.ae_eq_zero_of_integral_mul_schwartz_eq_zero`; two continuous functions that agree almost +everywhere on an open set agree on it (Mathlib's `MeasureTheory.Measure.eqOn_open_of_ae_eq`, +nonempty open sets have positive Lebesgue measure). -/ +theorem eqOn_zero_of_integral_mul_schwartz_eq_zero {U : Set ℝ} (hf : Continuous f) + (hU : IsOpen U) + (h : ∀ ψ : 𝓢(ℝ, ℂ), HasCompactSupport ψ → tsupport ψ ⊆ U → ∫ x, ψ x * f x = 0) : + ∀ x ∈ U, f x = 0 := by + have hae := ae_eq_zero_of_integral_mul_schwartz_eq_zero hU + (hf.locallyIntegrable.locallyIntegrableOn U) h + have hres : f =ᵐ[volume.restrict U] 0 := (ae_restrict_iff' hU.measurableSet).2 hae + exact fun x hx => Measure.eqOn_open_of_ae_eq hres hU hf.continuousOn continuousOn_const hx + +end Real diff --git a/LeanPool/FunctionSpaces/Wavelets/Examples/Daubechies/HolderRegularity.lean b/LeanPool/FunctionSpaces/Wavelets/Examples/Daubechies/HolderRegularity.lean new file mode 100644 index 0000000000..4fb925fcab --- /dev/null +++ b/LeanPool/FunctionSpaces/Wavelets/Examples/Daubechies/HolderRegularity.lean @@ -0,0 +1,490 @@ +/- +Copyright (c) 2026 Mario Ullrich. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Mario Ullrich +-/ +module + +public import LeanPool.FunctionSpaces.Analysis.Lp.Interpolation +public import LeanPool.FunctionSpaces.Wavelets.Examples.Daubechies.SobolevRegularity + +/- +Modified for Lean Pool: module names and imports adapted. +-/ + +/-! +# Hölder regularity of the scaling function + +For a Daubechies mask of order `N` with symbol product `Φ` (`Daubechies.symbolProduct`) and +scaling function `φ = 𝓕⁻ Φ` (`Daubechies.scalingFun`), this file bounds the differences +`Δ_h^r φ(x)` pointwise and the moduli of smoothness `ω_r(φ, t)_p = sup_{|h| ≤ t} ‖Δ_h^r φ‖_p` +(`Rd.modulus`) for `2 ≤ p ≤ ∞`. Here `Δ_h f(x) = f(x + h) - f(x)` is Mathlib's `fwdDiff h f` and +`Δ_h^r = (fwdDiff h)^[r]` its `r`-fold iterate. Under a growth bound `T^n 1 ≤ C λ^n` for the +transfer operator `T` (`Daubechies.TransferGrowth N λ C`), for every real `a` with +`0 ≤ a < N - log₄ λ - 1/2` and every order `r ∈ ℕ` with `r ≥ a` there is a constant `K` with + +`|Δ_h^r φ(x)| ≤ K |h|^a` for all `x, h ∈ ℝ` (`Daubechies.norm_higherDiff_scalingFun_le`). + +For `r = 1` and `a ≤ 1` this is the Hölder estimate `|φ(x) - φ(y)| ≤ K |x - y|^a` +(`Daubechies.holder_scalingFun_fourier`); in `L^∞` it reads `ω_r(φ, t)_∞ ≤ K t^a` +(`Daubechies.modulus_scalingFun_top_le`). Interpolation with the `L²` bound `ω_r(φ, t)_2 ≤ K t^s`, +`0 ≤ s < N - log₄ λ`, of `FunctionSpaces.Wavelets.Examples.Daubechies.SobolevRegularity` gives, for +`N ≥ 2`, `2 ≤ p ≤ ∞` and `0 < t ≤ 1`, + +`ω_r(φ, t)_p ≤ K t^θ`, `θ = (2/p) s + (1 - 2/p) a` (`Daubechies.modulus_scalingFun_interp`). + +* **Differences on the Fourier side.** For integrable `F : ℝ → ℂ`, the translate of `𝓕⁻ F` by `h` + is the inverse transform of `e^(2πihξ) F(ξ)`, so + `Δ_h^r (𝓕⁻ F)(x) = 𝓕⁻[ξ ↦ (e^(2πihξ) - 1)^r F(ξ)](x)` + (`Real.iterate_fwdDiff_fourierInv_apply`) and + `|Δ_h^r (𝓕⁻ F)(x)| ≤ ∫ |e^(2πihξ) - 1|^r |F(ξ)| dξ` + (`Real.norm_iterate_fwdDiff_fourierInv_le`). +* **The uniform bound.** For `0 ≤ a ≤ r` and every step `h`, + `|e^(2πihξ) - 1|^r ≤ (2π)^r |h|^a (1 + |ξ|)^a` + (`Daubechies.norm_exp_sub_one_pow_le_mul_rpow`, in + `FunctionSpaces.Wavelets.Examples.Daubechies.SobolevRegularity`), hence + `|Δ_h^r φ(x)| ≤ (2π)^r (∫ (1 + |ξ|)^a |Φ(ξ)| dξ) |h|^a` + (`Daubechies.norm_higherDiff_scalingFun_le_mul_rpow`), where the integral is finite for + `a < N - log₄ λ - 1/2` (`Daubechies.integrable_rpow_mul_norm`); its case `a = 0` is `Φ ∈ L¹` + (`Daubechies.integrable_symbolProduct_of_growth`, in + `FunctionSpaces.Wavelets.Examples.Daubechies.SymbolDecay`). +* **Interpolation.** For `2 ≤ p < ∞`, `‖g‖_p ≤ ‖g‖_∞^(1 - 2/p) ‖g‖_2^(2/p)` + (`Daubechies.eLpNorm_le_rpow_mul_rpow_of_eLpNorm_two_le`, from the project's + `MeasureTheory.eLpNorm_le_rpow_mul_eLpNorm_rpow`). For differences with a uniform bound + `|Δ_h^r f(x)| ≤ K |h|^a` and an `L²` bound `‖Δ_h^r f‖_2 ≤ B |h|^s` it gives + `ω_r(f, t)_p ≤ K^(1 - 2/p) B^(2/p) t^θ` (`Daubechies.modulus_le_of_norm_le_of_eLpNorm_two_le`). + For the scaling function the uniform bound may be the Fourier one + (`Daubechies.modulus_scalingFun_interp`) or come from any Hölder estimate + `|φ(x) - φ(y)| ≤ K₀ |x - y|^a` (`Daubechies.modulus_scalingFun_interp_of_holder`), through + `|Δ_h^r f(x)| ≤ 2^(r-1) K₀ |h|^a` for `r ≥ 1` (`Daubechies.norm_iterate_fwdDiff_le_of_holder`); + the Hölder estimate of the mask D4 by the matrix method is of this kind. +* **Orders two and three.** The growth bounds `T^n 1 ≤ 4^n` for `N = 2` and `T^n 1 ≤ 2 · 9^n` for + `N = 3` (`Daubechies.transferGrowth_two`, `Daubechies.transferGrowth_three`) give the Hölder + estimates for every `0 ≤ a < 1/2` and every `0 ≤ a < 5/2 - log₂ 3 ≈ 0.915` + (`Daubechies.holder_scalingFun_order_two`, `Daubechies.holder_scalingFun_order_three`), and the + interpolated `L_p` bounds with `s < 1` and `s < 3 - log₂ 3` + (`Daubechies.modulus_scalingFun_interp_order_two`, + `Daubechies.modulus_scalingFun_interp_order_three`). +-/ + +@[expose] public section + +open MeasureTheory Complex Filter +open scoped Real FourierTransform ENNReal + +namespace Real + +/-! ### Differences of an inverse Fourier transform -/ + +variable {F G : ℝ → ℂ} + +/-- The inverse Fourier transform of a difference of integrable functions is the difference of +the inverse transforms: `𝓕⁻ (F - G)(x) = 𝓕⁻ F(x) - 𝓕⁻ G(x)`. Since `𝓕⁻ F(x) = 𝓕 F(-x)` +(Mathlib's `Real.fourierInv_eq_fourier_neg`), this is the linearity of the Fourier transform +(`Rd.fourier_sub_apply`). -/ +theorem fourierInv_sub_apply (hF : Integrable F) (hG : Integrable G) (x : ℝ) : + 𝓕⁻ (F - G) x = 𝓕⁻ F x - 𝓕⁻ G x := by + rw [fourierInv_eq_fourier_neg, fourierInv_eq_fourier_neg, fourierInv_eq_fourier_neg, + Rd.fourier_sub_apply hF hG] + +/-- For integrable `F : ℝ → ℂ` and every `h ∈ ℝ`, the modulated function +`ξ ↦ e^(2πihξ) F(ξ)` is integrable: the continuous factor has modulus `1` +(Mathlib's `Complex.norm_exp_ofReal_mul_I`, `MeasureTheory.Integrable.bdd_mul`). -/ +theorem integrable_exp_mul (hF : Integrable F) (h : ℝ) : + Integrable (fun ξ : ℝ => cexp (2 * π * h * ξ * I) * F ξ) := + hF.bdd_mul (c := 1) + (by fun_prop : Continuous fun ξ : ℝ => cexp (2 * π * h * ξ * I)).aestronglyMeasurable + (Eventually.of_forall fun ξ => by + rw [Daubechies.exp_two_pi_mul_I_eq, mul_comm, Complex.norm_exp_ofReal_mul_I]) + +/-- **A difference of an inverse Fourier transform**: for integrable `F : ℝ → ℂ` and all +`h, x ∈ ℝ`, `Δ_h (𝓕⁻ F)(x) = 𝓕⁻[ξ ↦ (e^(2πihξ) - 1) F(ξ)](x)`, where `Δ_h g = g(· + h) - g` is +Mathlib's `fwdDiff h g`. The translate `𝓕⁻ F(x + h)` is the inverse transform of the modulated +function `e^(2πihξ) F(ξ)` (`Real.fourierInv_exp_mul_apply`), and the inverse transform is linear +on integrable functions (`Real.fourierInv_sub_apply`). -/ +theorem fwdDiff_fourierInv_apply (hF : Integrable F) (h x : ℝ) : + fwdDiff h (𝓕⁻ F) x = 𝓕⁻ (fun ξ : ℝ => (cexp (2 * π * h * ξ * I) - 1) * F ξ) x := by + have hsub : (fun ξ : ℝ => (cexp (2 * π * h * ξ * I) - 1) * F ξ) = + (fun ξ : ℝ => cexp (2 * π * h * ξ * I) * F ξ) - F := by + ext ξ + simp only [Pi.sub_apply] + ring + rw [hsub, fourierInv_sub_apply (integrable_exp_mul hF h) hF, fourierInv_exp_mul_apply] + rfl + +/-- **The differences of an inverse Fourier transform**: for integrable `F : ℝ → ℂ`, every +`r ∈ ℕ` and all `h, x ∈ ℝ`, `Δ_h^r (𝓕⁻ F)(x) = 𝓕⁻[ξ ↦ (e^(2πihξ) - 1)^r F(ξ)](x)`, where +`Δ_h^r = (fwdDiff h)^[r]` is the `r`-fold difference. By induction on `r` with +`Real.fwdDiff_fourierInv_apply`, since the functions `(e^(2πihξ) - 1)^r F(ξ)` are integrable +(`Real.integrable_exp_sub_one_pow_mul`). It is the inverse-transform form of +`Real.fourier_iterate_fwdDiff_apply`. -/ +theorem iterate_fwdDiff_fourierInv_apply (hF : Integrable F) (r : ℕ) (h x : ℝ) : + (fwdDiff h)^[r] (𝓕⁻ F) x = 𝓕⁻ (fun ξ : ℝ => (cexp (2 * π * h * ξ * I) - 1) ^ r * F ξ) x := by + induction r generalizing x with + | zero => simp + | succ r ih => + rw [Function.iterate_succ_apply', funext ih, + fwdDiff_fourierInv_apply (integrable_exp_sub_one_pow_mul hF r h)] + refine congrArg (fun G : ℝ → ℂ => 𝓕⁻ G x) (funext fun ξ => ?_) + ring + +/-- **The uniform bound for the differences of an inverse Fourier transform**: for integrable +`F : ℝ → ℂ`, every `r ∈ ℕ` and all `h, x ∈ ℝ`, +`|Δ_h^r (𝓕⁻ F)(x)| ≤ ∫ |e^(2πihξ) - 1|^r |F(ξ)| dξ`, the formula +`Real.iterate_fwdDiff_fourierInv_apply` together with `|𝓕⁻ G(x)| ≤ ∫ |G|` +(`Real.norm_fourierInv_le_integral_norm`). -/ +theorem norm_iterate_fwdDiff_fourierInv_le (hF : Integrable F) (r : ℕ) (h x : ℝ) : + ‖(fwdDiff h)^[r] (𝓕⁻ F) x‖ ≤ ∫ ξ : ℝ, ‖cexp (2 * π * h * ξ * I) - 1‖ ^ r * ‖F ξ‖ := by + rw [iterate_fwdDiff_fourierInv_apply hF] + refine (norm_fourierInv_le_integral_norm _ x).trans_eq ?_ + simp_rw [norm_mul, norm_pow] + +end Real + +namespace Daubechies + +/-! ### Pointwise bounds for the differences of the scaling function -/ + +variable {N : ℕ} (m : Mask N) + +/-- **The differences of the scaling function as inverse Fourier transforms**: if the symbol +product `Φ` is integrable, then `Δ_h^r φ(x) = 𝓕⁻[ξ ↦ (e^(2πihξ) - 1)^r Φ(ξ)](x)` for every +`r ∈ ℕ` and all `h, x ∈ ℝ`. This is `Real.iterate_fwdDiff_fourierInv_apply` for `φ = 𝓕⁻ Φ` +(`Daubechies.scalingFun`). -/ +theorem higherDiff_scalingFun_eq_fourierInv (hΦ : Integrable (symbolProduct m)) (r : ℕ) + (h x : ℝ) : + (fwdDiff h)^[r] (scalingFun m) x = + 𝓕⁻ (fun ξ : ℝ => (cexp (2 * π * h * ξ * I) - 1) ^ r * symbolProduct m ξ) x := + Real.iterate_fwdDiff_fourierInv_apply hΦ r h x + +/-- **The uniform bound for the differences of the scaling function**: if `Φ` is integrable, +then `|Δ_h^r φ(x)| ≤ ∫ |e^(2πihξ) - 1|^r |Φ(ξ)| dξ` for every `r ∈ ℕ` and all `h, x ∈ ℝ` +(`Real.norm_iterate_fwdDiff_fourierInv_le` for `φ = 𝓕⁻ Φ`). -/ +theorem norm_higherDiff_scalingFun_le_integral (hΦ : Integrable (symbolProduct m)) (r : ℕ) + (h x : ℝ) : + ‖(fwdDiff h)^[r] (scalingFun m) x‖ ≤ + ∫ ξ : ℝ, ‖cexp (2 * π * h * ξ * I) - 1‖ ^ r * ‖symbolProduct m ξ‖ := + Real.norm_iterate_fwdDiff_fourierInv_le hΦ r h x + +/-- **The uniform bound for the differences of the scaling function, with an explicit +constant**: let `T^n 1 ≤ C λ^n` be a growth bound for the transfer operator +(`Daubechies.TransferGrowth`), and let `a ∈ ℝ`, `r ∈ ℕ` with `0 ≤ a ≤ r` and +`a < N - log₄ λ - 1/2`. Then for all `h, x ∈ ℝ`, +`|Δ_h^r φ(x)| ≤ (2π)^r (∫ (1 + |ξ|)^a |Φ(ξ)| dξ) |h|^a`. +The multiplier bound `|e^(2πihξ) - 1|^r ≤ (2π)^r |h|^a (1 + |ξ|)^a` +(`Daubechies.norm_exp_sub_one_pow_le_mul_rpow`) inside +`Daubechies.norm_higherDiff_scalingFun_le_integral` gives the estimate; the condition +`a < N - log₄ λ - 1/2` makes `(1 + |ξ|)^a |Φ(ξ)|` integrable +(`Daubechies.integrable_rpow_mul_norm`). -/ +theorem norm_higherDiff_scalingFun_le_mul_rpow {lam C a : ℝ} {r : ℕ} + (hg : TransferGrowth N lam C) (ha0 : 0 ≤ a) (har : a ≤ r) + (ha : a < N - Real.logb 4 lam - 1 / 2) (h x : ℝ) : + ‖(fwdDiff h)^[r] (scalingFun m) x‖ ≤ + (2 * π) ^ r * (∫ ξ, (1 + |ξ|) ^ a * ‖symbolProduct m ξ‖) * |h| ^ a := by + refine (norm_higherDiff_scalingFun_le_integral m + (integrable_symbolProduct_of_growth m hg (ha0.trans_lt ha)) r h x).trans ?_ + calc ∫ ξ : ℝ, ‖cexp (2 * π * h * ξ * I) - 1‖ ^ r * ‖symbolProduct m ξ‖ + ≤ ∫ ξ, (2 * π) ^ r * |h| ^ a * ((1 + |ξ|) ^ a * ‖symbolProduct m ξ‖) := by + refine integral_mono_of_nonneg (Eventually.of_forall fun ξ => by positivity) + ((integrable_rpow_mul_norm m hg ha).const_mul _) (Eventually.of_forall fun ξ => ?_) + calc ‖cexp (2 * π * h * ξ * I) - 1‖ ^ r * ‖symbolProduct m ξ‖ + ≤ (2 * π) ^ r * (|h| ^ a * (1 + |ξ|) ^ a) * ‖symbolProduct m ξ‖ := + mul_le_mul_of_nonneg_right (norm_exp_sub_one_pow_le_mul_rpow ha0 har h ξ) + (norm_nonneg _) + _ = (2 * π) ^ r * |h| ^ a * ((1 + |ξ|) ^ a * ‖symbolProduct m ξ‖) := by ring + _ = (2 * π) ^ r * (∫ ξ, (1 + |ξ|) ^ a * ‖symbolProduct m ξ‖) * |h| ^ a := by + rw [integral_const_mul] + ring + +/-- **Uniform bounds for the differences of the scaling function**: let `T^n 1 ≤ C λ^n` be a +growth bound for the transfer operator (`Daubechies.TransferGrowth`), and let `a ∈ ℝ`, `r ∈ ℕ` +with `0 ≤ a ≤ r` and `a < N - log₄ λ - 1/2`. Then there is a constant `K` with +`|Δ_h^r φ(x)| ≤ K |h|^a` for all `x, h ∈ ℝ`, namely `K = (2π)^r ∫ (1 + |ξ|)^a |Φ(ξ)| dξ` +(`Daubechies.norm_higherDiff_scalingFun_le_mul_rpow`). -/ +theorem norm_higherDiff_scalingFun_le {lam C a : ℝ} {r : ℕ} (hg : TransferGrowth N lam C) + (ha0 : 0 ≤ a) (har : a ≤ r) (ha : a < N - Real.logb 4 lam - 1 / 2) : + ∃ K : ℝ, ∀ x h : ℝ, ‖(fwdDiff h)^[r] (scalingFun m) x‖ ≤ K * |h| ^ a := + ⟨_, fun x h => norm_higherDiff_scalingFun_le_mul_rpow m hg ha0 har ha h x⟩ + +/-- **The Hölder estimate of the scaling function** (Fourier route): let `T^n 1 ≤ C λ^n` be a +growth bound for the transfer operator (`Daubechies.TransferGrowth`), and let `0 ≤ a ≤ 1` with +`a < N - log₄ λ - 1/2`. Then there is a constant `K` with `|φ(x) - φ(y)| ≤ K |x - y|^a` for all +`x, y ∈ ℝ`: the case `r = 1` of `Daubechies.norm_higherDiff_scalingFun_le`, with step +`h = x - y` at the point `y`. -/ +theorem holder_scalingFun_fourier {lam C a : ℝ} (hg : TransferGrowth N lam C) (ha0 : 0 ≤ a) + (ha1 : a ≤ 1) (ha : a < N - Real.logb 4 lam - 1 / 2) : + ∃ K : ℝ, ∀ x y : ℝ, ‖scalingFun m x - scalingFun m y‖ ≤ K * |x - y| ^ a := by + obtain ⟨K, hK⟩ := norm_higherDiff_scalingFun_le m hg ha0 (r := 1) (by simpa using ha1) ha + refine ⟨K, fun x y => ?_⟩ + have h := hK y (x - y) + rwa [Function.iterate_one, fwdDiff, add_sub_cancel] at h + +/-! ### The uniform modulus of smoothness -/ + +/-- **A uniform bound gives an `L^∞` bound**: if `g` is almost everywhere strongly measurable and +`|g(x)| ≤ B` for every `x`, then `‖g‖_∞ ≤ B`. Here `‖g‖_∞` is the essential supremum of `|g|` +(Mathlib's `MeasureTheory.eLpNorm_exponent_top`, `MeasureTheory.eLpNormEssSup_le_of_ae_bound`). -/ +theorem eLpNorm_top_le_of_norm_le {α E : Type*} [MeasurableSpace α] {μ : Measure α} + [NormedAddCommGroup E] {g : α → E} (hg : AEStronglyMeasurable g μ) {B : ℝ} + (hB : ∀ x, ‖g x‖ ≤ B) : eLpNorm g ∞ μ ≤ ENNReal.ofReal B := by + rw [eLpNorm_exponent_top hg] + exact eLpNormEssSup_le_of_ae_bound (Eventually.of_forall hB) + +/-- **The uniform modulus from a pointwise bound**: let `f : ℝ → ℂ` be almost everywhere strongly +measurable, `r ∈ ℕ` and `a ≥ 0`, and suppose `|Δ_h^r f(x)| ≤ K |h|^a` for all `x, h ∈ ℝ`. Then +`ω_r(f, t)_∞ ≤ K t^a` for every `t ∈ ℝ`, since every step `|h| ≤ t` has +`‖Δ_h^r f‖_∞ ≤ K |h|^a ≤ K t^a` (`Daubechies.eLpNorm_top_le_of_norm_le`). -/ +theorem modulus_top_le_of_norm_le {f : ℝ → ℂ} (hf : AEStronglyMeasurable f) {r : ℕ} {K a : ℝ} + (ha0 : 0 ≤ a) (hK : ∀ x h : ℝ, ‖(fwdDiff h)^[r] f x‖ ≤ K * |h| ^ a) (t : ℝ) : + Rd.modulus volume r ∞ f t ≤ ENNReal.ofReal K * ENNReal.ofReal (t ^ a) := by + refine iSup₂_le fun h hh => ?_ + refine (eLpNorm_top_le_of_norm_le (Rd.aestronglyMeasurable_higherDiff hf r h) + fun x => hK x h).trans ?_ + rw [ENNReal.ofReal_mul' (by positivity)] + exact mul_le_mul_right (ENNReal.ofReal_le_ofReal (Real.rpow_le_rpow (abs_nonneg h) hh ha0)) _ + +/-- **The uniform modulus of smoothness of the scaling function**: let `T^n 1 ≤ C λ^n` be a +growth bound for the transfer operator (`Daubechies.TransferGrowth`), and let `a ∈ ℝ`, `r ∈ ℕ` +with `0 ≤ a ≤ r` and `a < N - log₄ λ - 1/2`. Then there is a finite constant `K` with +`ω_r(φ, t)_∞ ≤ K t^a` for all `0 < t ≤ 1` (`Daubechies.modulus_top_le_of_norm_le` with the +pointwise bound `Daubechies.norm_higherDiff_scalingFun_le_mul_rpow`). The scaling function is +continuous as the inverse Fourier transform of the integrable function `Φ` +(`Daubechies.integrable_symbolProduct_of_growth`). -/ +theorem modulus_scalingFun_top_le {lam C a : ℝ} {r : ℕ} (hg : TransferGrowth N lam C) + (ha0 : 0 ≤ a) (har : a ≤ r) (ha : a < N - Real.logb 4 lam - 1 / 2) : + ∃ K : ℝ≥0∞, K ≠ ∞ ∧ ∀ t ∈ Set.Ioc (0 : ℝ) 1, + Rd.modulus volume r ∞ (scalingFun m) t ≤ K * ENNReal.ofReal (t ^ a) := by + have hφ : Continuous (scalingFun m) := Real.continuous_fourierInv_of_integrable + (integrable_symbolProduct_of_growth m hg (ha0.trans_lt ha)) + exact ⟨_, ENNReal.ofReal_ne_top, fun t _ => modulus_top_le_of_norm_le hφ.aestronglyMeasurable + ha0 (fun x h => norm_higherDiff_scalingFun_le_mul_rpow m hg ha0 har ha h x) t⟩ + +/-! ### Interpolation between `L²` and `L^∞` -/ + +/-- **Interpolation between `L²` and `L^∞`** on the line: if `g : ℝ → ℂ` is almost everywhere +strongly measurable with `|g(x)| ≤ M` for every `x` and `‖g‖_2 ≤ B`, then +`‖g‖_p ≤ M^(1 - 2/p) B^(2/p)` for every `2 ≤ p < ∞`. This is the project's +`MeasureTheory.eLpNorm_le_rpow_mul_eLpNorm_rpow` with the smaller exponent `2` and the larger +exponent `p`, followed by `‖g‖_2^(2/p) ≤ B^(2/p)`. -/ +theorem eLpNorm_le_rpow_mul_rpow_of_eLpNorm_two_le {g : ℝ → ℂ} (hg : AEStronglyMeasurable g) + {M B : ℝ≥0∞} (hM : ∀ x, ‖g x‖ₑ ≤ M) (hB : eLpNorm g 2 volume ≤ B) {p : ℝ≥0∞} (hp2 : 2 ≤ p) + (hp : p ≠ ∞) : + eLpNorm g p volume ≤ M ^ (1 - 2 / p.toReal) * B ^ (2 / p.toReal) := by + have h := eLpNorm_le_rpow_mul_eLpNorm_rpow hg (Eventually.of_forall hM) (p := 2) (r := p) + two_ne_zero hp2 hp + rw [ENNReal.toReal_ofNat] at h + exact h.trans (mul_le_mul_right (ENNReal.rpow_le_rpow hB (by positivity)) _) + +/-- `(A x^a)^α (B x^s)^β = A^α B^β x^(βs + αa)` in `[0, ∞]`, for nonnegative real exponents +`a, s, α, β` (Mathlib's `ENNReal.mul_rpow_of_nonneg`, `ENNReal.rpow_mul`, +`ENNReal.rpow_add_of_nonneg`). -/ +theorem mul_rpow_mul_mul_rpow (A B x : ℝ≥0∞) {a s α β : ℝ} (ha : 0 ≤ a) (hs : 0 ≤ s) + (hα : 0 ≤ α) (hβ : 0 ≤ β) : + (A * x ^ a) ^ α * (B * x ^ s) ^ β = A ^ α * B ^ β * x ^ (β * s + α * a) := by + rw [ENNReal.mul_rpow_of_nonneg _ _ hα, ENNReal.mul_rpow_of_nonneg _ _ hβ, ← ENNReal.rpow_mul, + ← ENNReal.rpow_mul, show β * s + α * a = a * α + s * β by ring, + ENNReal.rpow_add_of_nonneg _ _ (mul_nonneg ha hα) (mul_nonneg hs hβ)] + ring + +/-- The weight of the uniform norm in the interpolation inequality is nonnegative: +`1 - 2/p ≥ 0` for `2 ≤ p < ∞`, where `2/p` stands for `2 / p.toReal`. -/ +theorem one_sub_two_div_toReal_nonneg {p : ℝ≥0∞} (hp2 : 2 ≤ p) (hp : p ≠ ∞) : + 0 ≤ 1 - 2 / p.toReal := by + have h2p : (2 : ℝ) ≤ p.toReal := by + simpa using ENNReal.toReal_mono hp hp2 + exact sub_nonneg.2 ((div_le_one (by linarith)).2 h2p) + +/-- **The `L_p` modulus by interpolation**: let `f : ℝ → ℂ` be almost everywhere strongly +measurable, `r ∈ ℕ`, `a, s ≥ 0`, and suppose that for all `x, h ∈ ℝ` the differences satisfy the +uniform bound `|Δ_h^r f(x)| ≤ K |h|^a` and the `L²` bound `‖Δ_h^r f‖_2 ≤ B |h|^s`. Then for every +`2 ≤ p < ∞` and every `t ∈ ℝ`, +`ω_r(f, t)_p ≤ K^(1 - 2/p) B^(2/p) t^θ` with `θ = (2/p) s + (1 - 2/p) a`. +For each step `h` the interpolation inequality +`‖g‖_p ≤ ‖g‖_∞^(1 - 2/p) ‖g‖_2^(2/p)` (`Daubechies.eLpNorm_le_rpow_mul_rpow_of_eLpNorm_two_le`) +gives `‖Δ_h^r f‖_p ≤ K^(1 - 2/p) B^(2/p) |h|^θ` (`Daubechies.mul_rpow_mul_mul_rpow`), and +`|h|^θ ≤ t^θ` for `|h| ≤ t`. -/ +theorem modulus_le_of_norm_le_of_eLpNorm_two_le {f : ℝ → ℂ} (hf : AEStronglyMeasurable f) + {r : ℕ} {K a s : ℝ} {B : ℝ≥0∞} (ha0 : 0 ≤ a) (hs0 : 0 ≤ s) + (hK : ∀ x h : ℝ, ‖(fwdDiff h)^[r] f x‖ ≤ K * |h| ^ a) + (hB : ∀ h : ℝ, eLpNorm ((fwdDiff h)^[r] f) 2 volume ≤ B * ENNReal.ofReal (|h| ^ s)) + {p : ℝ≥0∞} (hp2 : 2 ≤ p) (hp : p ≠ ∞) (t : ℝ) : + Rd.modulus volume r p f t ≤ ENNReal.ofReal K ^ (1 - 2 / p.toReal) * B ^ (2 / p.toReal) * + ENNReal.ofReal (t ^ (2 / p.toReal * s + (1 - 2 / p.toReal) * a)) := by + have hα := one_sub_two_div_toReal_nonneg hp2 hp + have hβ : 0 ≤ 2 / p.toReal := by positivity + have hθ : 0 ≤ 2 / p.toReal * s + (1 - 2 / p.toReal) * a := + add_nonneg (mul_nonneg hβ hs0) (mul_nonneg hα ha0) + refine iSup₂_le fun h hh => ?_ + have hM : ∀ y, ‖(fwdDiff h)^[r] f y‖ₑ ≤ ENNReal.ofReal K * ENNReal.ofReal |h| ^ a := + fun y => by + rw [ENNReal.ofReal_rpow_of_nonneg (abs_nonneg h) ha0, ← ENNReal.ofReal_mul' (by positivity), + ← ofReal_norm] + exact ENNReal.ofReal_le_ofReal (hK y h) + have hB' : eLpNorm ((fwdDiff h)^[r] f) 2 volume ≤ B * ENNReal.ofReal |h| ^ s := by + rw [ENNReal.ofReal_rpow_of_nonneg (abs_nonneg h) hs0] + exact hB h + refine (eLpNorm_le_rpow_mul_rpow_of_eLpNorm_two_le (Rd.aestronglyMeasurable_higherDiff hf r h) + hM hB' hp2 hp).trans ?_ + rw [mul_rpow_mul_mul_rpow _ _ _ ha0 hs0 hα hβ, ENNReal.ofReal_rpow_of_nonneg (abs_nonneg h) hθ] + exact mul_le_mul_right (ENNReal.ofReal_le_ofReal (Real.rpow_le_rpow (abs_nonneg h) hh hθ)) _ + +/-! ### The `L_p` modulus of the scaling function for `p ≥ 2` -/ + +/-- **The `L_p` modulus of the scaling function from a uniform bound, `p ≥ 2`**: let `N ≥ 2`, let +`T^n 1 ≤ C λ^n` be a growth bound for the transfer operator (`Daubechies.TransferGrowth`), let +`s ∈ ℝ`, `r ∈ ℕ` with `0 ≤ s ≤ r` and `s < N - log₄ λ`, and suppose that the differences of `φ` +satisfy a uniform bound `|Δ_h^r φ(x)| ≤ K₀ |h|^a` for all `x, h ∈ ℝ`, with `a ≥ 0`. Then for +every `p ∈ [2, ∞]` there is a finite constant `K` with `ω_r(φ, t)_p ≤ K t^θ` for all +`0 < t ≤ 1`, where `θ = (2/p) s + (1 - 2/p) a`; for `p = ∞` the weight `2/p` is `0` (in Lean, +`(∞ : ℝ≥0∞).toReal = 0`), so `θ = a`. For `p < ∞` this is the interpolation +`Daubechies.modulus_le_of_norm_le_of_eLpNorm_two_le` with the `L²` bound +`Daubechies.eLpNorm_two_higherDiff_scalingFun_le`; for `p = ∞` it is +`Daubechies.modulus_top_le_of_norm_le`. -/ +theorem modulus_scalingFun_interp_of_norm_le (hN : 2 ≤ N) {p : ℝ≥0∞} (hp2 : 2 ≤ p) + {lam C s a K₀ : ℝ} {r : ℕ} (hg : TransferGrowth N lam C) (hs0 : 0 ≤ s) + (hs : s < N - Real.logb 4 lam) (hsr : s ≤ r) (ha0 : 0 ≤ a) + (hK : ∀ x h : ℝ, ‖(fwdDiff h)^[r] (scalingFun m) x‖ ≤ K₀ * |h| ^ a) : + ∃ K : ℝ≥0∞, K ≠ ∞ ∧ ∀ t ∈ Set.Ioc (0 : ℝ) 1, + Rd.modulus volume r p (scalingFun m) t ≤ + K * ENNReal.ofReal (t ^ (2 / p.toReal * s + (1 - 2 / p.toReal) * a)) := by + have hφ : AEStronglyMeasurable (scalingFun m) := (continuous_scalingFun m hN).aestronglyMeasurable + rcases eq_or_ne p ∞ with rfl | hp + · refine ⟨ENNReal.ofReal K₀, ENNReal.ofReal_ne_top, fun t _ => ?_⟩ + rw [ENNReal.toReal_top, div_zero, zero_mul, zero_add, sub_zero, one_mul] + exact modulus_top_le_of_norm_le hφ ha0 hK t + · refine ⟨ENNReal.ofReal K₀ ^ (1 - 2 / p.toReal) * ENNReal.ofReal ((2 * π) ^ r * + √(∫ ξ, (1 + |ξ|) ^ (2 * s) * ‖symbolProduct m ξ‖ ^ 2)) ^ (2 / p.toReal), + ENNReal.mul_ne_top (ENNReal.rpow_ne_top_of_nonneg (one_sub_two_div_toReal_nonneg hp2 hp) + ENNReal.ofReal_ne_top) (ENNReal.rpow_ne_top_of_nonneg (by positivity) + ENNReal.ofReal_ne_top), fun t _ => ?_⟩ + exact modulus_le_of_norm_le_of_eLpNorm_two_le hφ ha0 hs0 hK + (eLpNorm_two_higherDiff_scalingFun_le m hN hg hs0 hs hsr) hp2 hp t + +/-- **The `L_p` modulus of the scaling function, `p ≥ 2`** (Fourier route): let `N ≥ 2`, let +`T^n 1 ≤ C λ^n` be a growth bound for the transfer operator (`Daubechies.TransferGrowth`), and +let `s, a ∈ ℝ`, `r ∈ ℕ` with `0 ≤ s ≤ r`, `s < N - log₄ λ`, `0 ≤ a ≤ r` and +`a < N - log₄ λ - 1/2`. Then for every `p ∈ [2, ∞]` there is a finite constant `K` with +`ω_r(φ, t)_p ≤ K t^θ` for all `0 < t ≤ 1`, where `θ = (2/p) s + (1 - 2/p) a` interpolates between +the `L²` exponent `s` (`p = 2`) and the uniform exponent `a` (`p = ∞`, where `2/p = 0`). The +uniform bound is `Daubechies.norm_higherDiff_scalingFun_le`, and +`Daubechies.modulus_scalingFun_interp_of_norm_le` interpolates. -/ +theorem modulus_scalingFun_interp (hN : 2 ≤ N) {p : ℝ≥0∞} (hp2 : 2 ≤ p) {lam C s a : ℝ} {r : ℕ} + (hg : TransferGrowth N lam C) (hs0 : 0 ≤ s) (hs : s < N - Real.logb 4 lam) (hsr : s ≤ r) + (ha0 : 0 ≤ a) (har : a ≤ r) (ha : a < N - Real.logb 4 lam - 1 / 2) : + ∃ K : ℝ≥0∞, K ≠ ∞ ∧ ∀ t ∈ Set.Ioc (0 : ℝ) 1, + Rd.modulus volume r p (scalingFun m) t ≤ + K * ENNReal.ofReal (t ^ (2 / p.toReal * s + (1 - 2 / p.toReal) * a)) := by + obtain ⟨K₀, hK⟩ := norm_higherDiff_scalingFun_le m hg ha0 har ha + exact modulus_scalingFun_interp_of_norm_le m hN hp2 hg hs0 hs hsr ha0 hK + +/-! ### Hölder estimates from other sources -/ + +/-- **Higher differences of a Hölder function**: if `|f(x) - f(y)| ≤ K |x - y|^a` for all +`x, y ∈ ℝ`, then `|Δ_h^(r+1) f(x)| ≤ 2^r K |h|^a` for every `r ∈ ℕ` and all `x, h ∈ ℝ`. By +induction on `r`: the case `r = 0` is the Hölder estimate at `x + h` and `x`, and +`Δ_h^(r+2) f(x) = Δ_h^(r+1) f(x + h) - Δ_h^(r+1) f(x)`. -/ +theorem norm_iterate_fwdDiff_le_of_holder {E : Type*} [NormedAddCommGroup E] {f : ℝ → E} + {K a : ℝ} (hf : ∀ x y, ‖f x - f y‖ ≤ K * |x - y| ^ a) (r : ℕ) (h x : ℝ) : + ‖(fwdDiff h)^[r + 1] f x‖ ≤ 2 ^ r * K * |h| ^ a := by + induction r generalizing x with + | zero => + have h0 := hf (x + h) x + rw [add_sub_cancel_left] at h0 + rw [zero_add, Function.iterate_one, pow_zero, one_mul] + exact h0 + | succ r ih => + rw [Function.iterate_succ_apply'] + calc ‖fwdDiff h ((fwdDiff h)^[r + 1] f) x‖ + = ‖(fwdDiff h)^[r + 1] f (x + h) - (fwdDiff h)^[r + 1] f x‖ := rfl + _ ≤ ‖(fwdDiff h)^[r + 1] f (x + h)‖ + ‖(fwdDiff h)^[r + 1] f x‖ := norm_sub_le _ _ + _ ≤ 2 ^ r * K * |h| ^ a + 2 ^ r * K * |h| ^ a := add_le_add (ih (x + h)) (ih x) + _ = 2 ^ (r + 1) * K * |h| ^ a := by ring + +/-- **The `L_p` modulus of the scaling function from a Hölder estimate, `p ≥ 2`**: let `N ≥ 2`, +let `T^n 1 ≤ C λ^n` be a growth bound for the transfer operator (`Daubechies.TransferGrowth`), let +`s ∈ ℝ` and an order `r ≥ 1` with `0 ≤ s ≤ r` and `s < N - log₄ λ`, and suppose +`|φ(x) - φ(y)| ≤ K₀ |x - y|^a` for all `x, y ∈ ℝ`, with `a ≥ 0`. Then for every `p ∈ [2, ∞]` +there is a finite constant `K` with `ω_r(φ, t)_p ≤ K t^θ` for all `0 < t ≤ 1`, where +`θ = (2/p) s + (1 - 2/p) a`. The Hölder estimate bounds the differences, +`|Δ_h^r φ(x)| ≤ 2^(r-1) K₀ |h|^a` (`Daubechies.norm_iterate_fwdDiff_le_of_holder`), and +`Daubechies.modulus_scalingFun_interp_of_norm_le` interpolates. The Hölder exponent may come from +any source, such as the matrix method for the mask D4. -/ +theorem modulus_scalingFun_interp_of_holder (hN : 2 ≤ N) {p : ℝ≥0∞} (hp2 : 2 ≤ p) + {lam C s a K₀ : ℝ} {r : ℕ} (hr : 1 ≤ r) (hg : TransferGrowth N lam C) (hs0 : 0 ≤ s) + (hs : s < N - Real.logb 4 lam) (hsr : s ≤ r) (ha0 : 0 ≤ a) + (hK : ∀ x y : ℝ, ‖scalingFun m x - scalingFun m y‖ ≤ K₀ * |x - y| ^ a) : + ∃ K : ℝ≥0∞, K ≠ ∞ ∧ ∀ t ∈ Set.Ioc (0 : ℝ) 1, + Rd.modulus volume r p (scalingFun m) t ≤ + K * ENNReal.ofReal (t ^ (2 / p.toReal * s + (1 - 2 / p.toReal) * a)) := by + obtain ⟨k, rfl⟩ : ∃ k, r = k + 1 := ⟨r - 1, by omega⟩ + exact modulus_scalingFun_interp_of_norm_le m hN hp2 hg hs0 hs hsr ha0 (K₀ := 2 ^ k * K₀) + fun x h => norm_iterate_fwdDiff_le_of_holder hK k h x + +/-! ### Orders two and three -/ + +/-- `log₂ 3 > 3/2`, since `2^3 = 8 < 9 = 3^2` (Mathlib's `Real.log_lt_log`, `Real.log_pow`). +Hence the exponent `5/2 - log₂ 3 ≈ 0.915` of order three lies below `1`. -/ +theorem three_halves_lt_logb_two_three : 3 / 2 < Real.logb 2 3 := by + rw [← Real.log_div_log, lt_div_iff₀ (Real.log_pos one_lt_two)] + have h : Real.log (2 ^ 3) < Real.log (3 ^ 2) := Real.log_lt_log (by norm_num) (by norm_num) + rw [Real.log_pow, Real.log_pow] at h + push_cast at h + linarith + +/-- **The Hölder estimate of the scaling function of order two** (Fourier route): for every +Daubechies mask of order `N = 2` and every `0 ≤ a < 1/2` there is a constant `K` with +`|φ(x) - φ(y)| ≤ K |x - y|^a` for all `x, y ∈ ℝ`. The growth bound `T^n 1 ≤ 4^n` +(`Daubechies.transferGrowth_two`) gives `N - log₄ λ - 1/2 = 2 - 1 - 1/2 = 1/2` +(`Daubechies.two_sub_logb_four_four`), so `Daubechies.holder_scalingFun_fourier` applies. -/ +theorem holder_scalingFun_order_two (m : Mask 2) {a : ℝ} (ha0 : 0 ≤ a) (ha : a < 1 / 2) : + ∃ K : ℝ, ∀ x y : ℝ, ‖scalingFun m x - scalingFun m y‖ ≤ K * |x - y| ^ a := + holder_scalingFun_fourier m transferGrowth_two ha0 (by linarith) + (by rw [Nat.cast_ofNat, two_sub_logb_four_four]; linarith) + +/-- **The Hölder estimate of the scaling function of order three** (Fourier route): for every +Daubechies mask of order `N = 3` and every `0 ≤ a < 5/2 - log₂ 3 ≈ 0.915` there is a constant `K` +with `|φ(x) - φ(y)| ≤ K |x - y|^a` for all `x, y ∈ ℝ`. The growth bound `T^n 1 ≤ 2 · 9^n` +(`Daubechies.transferGrowth_three`) gives `N - log₄ λ - 1/2 = 3 - log₂ 3 - 1/2` +(`Daubechies.three_sub_logb_four_nine`), and `a < 1` by +`Daubechies.three_halves_lt_logb_two_three`, so `Daubechies.holder_scalingFun_fourier` +applies. -/ +theorem holder_scalingFun_order_three (m : Mask 3) {a : ℝ} (ha0 : 0 ≤ a) + (ha : a < 5 / 2 - Real.logb 2 3) : + ∃ K : ℝ, ∀ x y : ℝ, ‖scalingFun m x - scalingFun m y‖ ≤ K * |x - y| ^ a := + holder_scalingFun_fourier m transferGrowth_three ha0 + (by linarith [three_halves_lt_logb_two_three]) + (by rw [Nat.cast_ofNat, three_sub_logb_four_nine]; linarith) + +/-- **The `L_p` modulus of the scaling function of order two, `p ≥ 2`**: for every Daubechies +mask of order `N = 2`, every `p ∈ [2, ∞]`, all real `s, a` with `0 ≤ s < 1` and `0 ≤ a < 1/2`, +and every order `r ∈ ℕ` with `r ≥ s` and `r ≥ a`, there is a finite constant `K` with +`ω_r(φ, t)_p ≤ K t^θ` for all `0 < t ≤ 1`, where `θ = (2/p) s + (1 - 2/p) a` +(`Daubechies.modulus_scalingFun_interp` with the growth bound `Daubechies.transferGrowth_two`, +whose exponents are `2 - log₄ 4 = 1` and `1 - 1/2 = 1/2`). -/ +theorem modulus_scalingFun_interp_order_two (m : Mask 2) {p : ℝ≥0∞} (hp2 : 2 ≤ p) {s a : ℝ} + {r : ℕ} (hs0 : 0 ≤ s) (hs : s < 1) (hsr : s ≤ r) (ha0 : 0 ≤ a) (har : a ≤ r) + (ha : a < 1 / 2) : + ∃ K : ℝ≥0∞, K ≠ ∞ ∧ ∀ t ∈ Set.Ioc (0 : ℝ) 1, + Rd.modulus volume r p (scalingFun m) t ≤ + K * ENNReal.ofReal (t ^ (2 / p.toReal * s + (1 - 2 / p.toReal) * a)) := + modulus_scalingFun_interp m le_rfl hp2 transferGrowth_two hs0 + (by rw [Nat.cast_ofNat, two_sub_logb_four_four]; exact hs) hsr ha0 har + (by rw [Nat.cast_ofNat, two_sub_logb_four_four]; linarith) + +/-- **The `L_p` modulus of the scaling function of order three, `p ≥ 2`**: for every Daubechies +mask of order `N = 3`, every `p ∈ [2, ∞]`, all real `s, a` with `0 ≤ s < 3 - log₂ 3` and +`0 ≤ a < 5/2 - log₂ 3`, and every order `r ∈ ℕ` with `r ≥ s` and `r ≥ a`, there is a finite +constant `K` with `ω_r(φ, t)_p ≤ K t^θ` for all `0 < t ≤ 1`, where `θ = (2/p) s + (1 - 2/p) a` +(`Daubechies.modulus_scalingFun_interp` with the growth bound `Daubechies.transferGrowth_three`, +whose exponent is `3 - log₄ 9 = 3 - log₂ 3`). -/ +theorem modulus_scalingFun_interp_order_three (m : Mask 3) {p : ℝ≥0∞} (hp2 : 2 ≤ p) {s a : ℝ} + {r : ℕ} (hs0 : 0 ≤ s) (hs : s < 3 - Real.logb 2 3) (hsr : s ≤ r) (ha0 : 0 ≤ a) (har : a ≤ r) + (ha : a < 5 / 2 - Real.logb 2 3) : + ∃ K : ℝ≥0∞, K ≠ ∞ ∧ ∀ t ∈ Set.Ioc (0 : ℝ) 1, + Rd.modulus volume r p (scalingFun m) t ≤ + K * ENNReal.ofReal (t ^ (2 / p.toReal * s + (1 - 2 / p.toReal) * a)) := + modulus_scalingFun_interp m (by norm_num) hp2 transferGrowth_three hs0 + (by rw [Nat.cast_ofNat, three_sub_logb_four_nine]; exact hs) hsr ha0 har + (by rw [Nat.cast_ofNat, three_sub_logb_four_nine]; linarith) + +end Daubechies diff --git a/LeanPool/FunctionSpaces/Wavelets/Examples/Daubechies/Jackson.lean b/LeanPool/FunctionSpaces/Wavelets/Examples/Daubechies/Jackson.lean new file mode 100644 index 0000000000..5327e5cd5a --- /dev/null +++ b/LeanPool/FunctionSpaces/Wavelets/Examples/Daubechies/Jackson.lean @@ -0,0 +1,481 @@ +/- +Copyright (c) 2026 Mario Ullrich. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Mario Ullrich +-/ +module + +public import LeanPool.FunctionSpaces.Domains.Interval.Taylor +public import LeanPool.FunctionSpaces.Wavelets.Examples.Daubechies.JacksonSmoothing +public import LeanPool.FunctionSpaces.Wavelets.Examples.Daubechies.Projections + +/- +Modified for Lean Pool: module names and imports adapted. +-/ + +/-! +# Jackson's inequality for the Daubechies projections + +For a Daubechies mask of order `N ≥ 2` with scaling function `φ`, the projections +`P_j f = ∑_{k ∈ ℤ} ⟨f, φ_{j,k}⟩ φ_{j,k}` (`Daubechies.projFun`, `Daubechies.proj`) and the +scaling spaces `V_j` satisfy **Jackson's inequality**: for `1 ≤ p < ∞`, every `f ∈ L_p(ℝ)` and +every level `j ∈ ℕ`, the error of best approximation from `V_j` obeys + +`E_{2^j}(f)_p ≤ C_J ω_N(f, 2^(-j))_p`, + +with the modulus of smoothness `ω_N(f, t)_p = sup_{|h| ≤ t} ‖Δ_h^N f‖_{L_p(ℝ)}` (`Rd.modulus`) and +a constant `C_J` that depends only on the mask and on `p` (`Daubechies.jacksonConst`, +`Daubechies.approxError_scheme_le_jacksonConst_mul`). This is the Jackson inequality of the +Daubechies scheme (`Daubechies.approxError_scheme_le`). With the uniform bound `C` of the +projections it gives `‖f - P_j f‖_p ≤ (1 + C) C_J ω_N(f, 2^(-j))_p` +(`Daubechies.enorm_sub_proj_le`), and for continuous `f` directly +`‖f - P_j f‖_p ≤ C_J ω_N(f, 2^(-j))_p` (`Daubechies.eLpNorm_sub_projFun_le_modulus`). + +The proof has three steps. + +* **Smooth functions.** The dyadic cells `I_k = [k/2^j, (k + 1)/2^j)` cover `ℝ` + (`Daubechies.iUnion_Ico_div_two_pow`), and each lies in its window + `W_k = [(k - (2N - 2))/2^j, (k + 2N - 1)/2^j]` of length `(4N - 3)/2^j`; every point lies in + at most `4N - 2` windows (`Daubechies.card_le_of_forall_mem_window`), so + `∑_k ‖G‖_{L_p(W_k)}^p ≤ (4N - 2) ‖G‖_p^p` (`Daubechies.tsum_eLpNorm_window_rpow_le`). For + `S ∈ C^N` Taylor's theorem gives a polynomial `Q_k` of degree `< N` with + `‖S - Q_k‖_{L_p(W_k)} ≤ |W_k|^N ‖S^(N)‖_{L_p(W_k)}` (`Interval.exists_eLpNorm_sub_polyFun_le`). + The projection reproduces `Q_k`, so `S - P_j S = (S - Q_k) - P_j (S - Q_k)` + (`Daubechies.sub_projFun_eq_sub_projFun_sub`), and on `I_k` the projection only sees the + function on `W_k` (`Daubechies.eLpNorm_projFun_cell_le`). Hence + `‖S - P_j S‖_{L_p(I_k)} ≤ (1 + C) (4N - 3)^N 2^(-jN) ‖S^(N)‖_{L_p(W_k)}` + (`Daubechies.eLpNorm_sub_projFun_cell_le`), and summing over the cells + (`MeasureTheory.eLpNorm_le_of_forall_eLpNorm_restrict_le`) gives + `‖S - P_j S‖_p ≤ C_S 2^(-jN) ‖S^(N)‖_p` (`Daubechies.eLpNorm_sub_projFun_le_of_contDiff`). +* **Continuous functions.** For continuous `f` and the Steklov smoothing `S = S_δ f` at the step + `δ = 1/(N 2^j)`, `‖f - S‖_p ≤ ω_N(f, 2^(-j))_p` and + `‖S^(N)‖_p ≤ 2^N N^N 2^(jN) ω_N(f, 2^(-j))_p` + (`FunctionSpaces.Wavelets.Examples.Daubechies.JacksonSmoothing`), while + `‖f - P_j f‖_p ≤ (1 + C) ‖f - S‖_p + ‖S - P_j S‖_p` with the uniform bound `C` of the + projections (`Daubechies.eLpNorm_sub_projFun_le_add`). Together: + `‖f - P_j f‖_p ≤ C_J ω_N(f, 2^(-j))_p` (`Daubechies.eLpNorm_sub_projFun_le_modulus`), and the + same for every `f ∈ L_p` with a continuous representative + (`Daubechies.enorm_sub_proj_le_of_continuous`). +* **All of `L_p`.** The functions with a bounded continuous representative are dense in `L_p` + (Mathlib's `MeasureTheory.Lp.boundedContinuousFunction_dense`), and the error of best + approximation and the modulus are both controlled by `‖f‖_p`, so the inequality for + `E_{2^j}(f)_p ≤ ‖f - P_j f‖_p` extends by density + (`ApproximationScheme.approxError_le_of_dense`). The Lebesgue inequality + `‖f - P_j f‖_p ≤ (1 + C) E_{2^j}(f)_p` returns to the projections. +-/ + +@[expose] public section + +open Filter MeasureTheory +open scoped ENNReal + +namespace MeasureTheory + +/-- **Summing local bounds over a cover**: let `I_i`, `i ∈ ι`, be countably many sets covering +`α`, let `W_i` be sets, and let `0 < p < ∞`. Let `F : α → ℂ` be a.e. strongly measurable and +`G : α → ℂ` a function whose local norms satisfy the window inequality +`∑_i ‖G‖_{L_p(W_i)}^p ≤ M ‖G‖_p^p`. If `‖F‖_{L_p(I_i)} ≤ B ‖G‖_{L_p(W_i)}` for every `i`, then +`‖F‖_p ≤ M^(1/p) B ‖G‖_p`. Indeed +`‖F‖_p^p = ∫ |F|^p ≤ ∑_i ∫_{I_i} |F|^p ≤ B^p ∑_i ‖G‖_{L_p(W_i)}^p ≤ M B^p ‖G‖_p^p` by the +countable subadditivity of the integral (Mathlib's `MeasureTheory.lintegral_iUnion_le`), which +holds for arbitrary sets `I_i`. -/ +theorem eLpNorm_le_of_forall_eLpNorm_restrict_le {α ι : Type*} [MeasurableSpace α] [Countable ι] + {μ : Measure α} {I W : ι → Set α} (hI : ⋃ i, I i = Set.univ) {p : ℝ≥0∞} (hp0 : p ≠ 0) + (hp : p ≠ ∞) {F G : α → ℂ} (hF : AEStronglyMeasurable F μ) {M B : ℝ≥0∞} + (hW : ∑' i, eLpNorm G p (μ.restrict (W i)) ^ p.toReal ≤ M * eLpNorm G p μ ^ p.toReal) + (h : ∀ i, eLpNorm F p (μ.restrict (I i)) ≤ B * eLpNorm G p (μ.restrict (W i))) : + eLpNorm F p μ ≤ M ^ (1 / p.toReal) * B * eLpNorm G p μ := by + have hr : 0 < p.toReal := ENNReal.toReal_pos hp0 hp + have hk : ∀ i, ∫⁻ x in I i, ‖F x‖ₑ ^ p.toReal ∂μ ≤ + B ^ p.toReal * eLpNorm G p (μ.restrict (W i)) ^ p.toReal := fun i => by + rw [← eLpNorm_rpow_eq hF.restrict hp0 hp, ← ENNReal.mul_rpow_of_nonneg _ _ hr.le] + exact ENNReal.rpow_le_rpow (h i) hr.le + rw [← ENNReal.rpow_le_rpow_iff hr, eLpNorm_rpow_eq hF hp0 hp] + calc ∫⁻ x, ‖F x‖ₑ ^ p.toReal ∂μ = ∫⁻ x in ⋃ i, I i, ‖F x‖ₑ ^ p.toReal ∂μ := by + rw [hI, Measure.restrict_univ] + _ ≤ ∑' i, ∫⁻ x in I i, ‖F x‖ₑ ^ p.toReal ∂μ := lintegral_iUnion_le _ _ + _ ≤ ∑' i, B ^ p.toReal * eLpNorm G p (μ.restrict (W i)) ^ p.toReal := + tsum_le_tsum hk + _ = B ^ p.toReal * ∑' i, eLpNorm G p (μ.restrict (W i)) ^ p.toReal := ENNReal.tsum_mul_left + _ ≤ B ^ p.toReal * (M * eLpNorm G p μ ^ p.toReal) := by gcongr + _ = (M ^ (1 / p.toReal) * B * eLpNorm G p μ) ^ p.toReal := by + rw [ENNReal.mul_rpow_of_nonneg _ _ hr.le, ENNReal.mul_rpow_of_nonneg _ _ hr.le, + ← ENNReal.rpow_mul, one_div_mul_cancel hr.ne', ENNReal.rpow_one] + ring + +end MeasureTheory + +namespace Daubechies + +variable {N : ℕ} (m : Mask N) + +/-! ### Dyadic cells and their windows -/ + +/-- **The dyadic cells of level `j` cover the line**: every `x ∈ ℝ` lies in the cell +`[k/2^j, (k + 1)/2^j)` with `k = ⌊2^j x⌋`. -/ +theorem iUnion_Ico_div_two_pow (j : ℕ) : + ⋃ k : ℤ, Set.Ico ((k : ℝ) / 2 ^ j) ((k + 1) / 2 ^ j) = Set.univ := by + refine Set.eq_univ_of_forall fun x => Set.mem_iUnion.2 ⟨⌊2 ^ j * x⌋, ?_⟩ + have h : (0 : ℝ) < 2 ^ j := by positivity + rw [Set.mem_Ico, div_le_iff₀' h, lt_div_iff₀' h] + exact ⟨Int.floor_le _, Int.lt_floor_add_one _⟩ + +/-- **A cell lies in its window**: for `N ≥ 1`, the dyadic cell `[k/2^j, (k + 1)/2^j)` lies in +the window `[(k - (2N - 2))/2^j, (k + 2N - 1)/2^j]`. -/ +theorem Ico_subset_window (hN : 1 ≤ N) (j : ℕ) (k : ℤ) : + Set.Ico ((k : ℝ) / 2 ^ j) ((k + 1) / 2 ^ j) ⊆ + Set.Icc (((k : ℝ) - (2 * N - 2)) / 2 ^ j) ((k + (2 * N - 1)) / 2 ^ j) := by + have hN' : (1 : ℝ) ≤ N := by exact_mod_cast hN + refine Set.Ico_subset_Icc_self.trans (Set.Icc_subset_Icc ?_ ?_) + · gcongr + linarith + · gcongr + linarith + +/-- The window `[(k - (2N - 2))/2^j, (k + 2N - 1)/2^j]` is the support window +`{x : 2^j x - k ∈ [-(2N - 2), 2N - 1]}` (`Daubechies.supportWindow_eq_Icc`). -/ +theorem window_eq_supportWindow (N j : ℕ) (k : ℤ) : + Set.Icc (((k : ℝ) - (2 * N - 2)) / 2 ^ j) ((k + (2 * N - 1)) / 2 ^ j) = + supportWindow (-(2 * N - 2)) (2 * N - 1) j k := by + rw [supportWindow_eq_Icc, sub_eq_add_neg] + +/-- **Bounded overlap of the windows**: for `N ≥ 1`, every point `x` lies in at most `4N - 2` +of the windows `[(k - (2N - 2))/2^j, (k + 2N - 1)/2^j]`, `k ∈ ℤ`, of one level `j`. The windows +are the support windows of an interval of length `4N - 3` +(`Daubechies.card_le_of_forall_mem_supportWindow`). -/ +theorem card_le_of_forall_mem_window (hN : 1 ≤ N) {j : ℕ} (x : ℝ) (S : Finset ℤ) + (hS : ∀ k ∈ S, + x ∈ Set.Icc (((k : ℝ) - (2 * N - 2)) / 2 ^ j) ((k + (2 * N - 1)) / 2 ^ j)) : + S.card ≤ 4 * N - 2 := by + have h := card_le_of_forall_mem_supportWindow (a := -(2 * N - 2)) (b := 2 * N - 1) x S + fun k hk => by + rw [← window_eq_supportWindow] + exact hS k hk + have hc : (2 * (N : ℝ) - 1) - (-(2 * N - 2)) = ((4 * N - 3 : ℕ) : ℝ) := by + rw [Nat.cast_sub (by omega)] + push_cast + ring + rw [hc, Nat.ceil_natCast] at h + omega + +/-- **Window summation**: for `N ≥ 1`, `0 < p < ∞`, every a.e. strongly measurable `G : ℝ → ℂ` +and every level `j`, the windows `W_k = [(k - (2N - 2))/2^j, (k + 2N - 1)/2^j]` satisfy +`∑_{k ∈ ℤ} ‖G‖_{L_p(W_k)}^p ≤ (4N - 2) ‖G‖_p^p`. This is the window inequality +`∑_k ∫_{W_k} |G|^p ≤ M ∫ |G|^p` (`MeasureTheory.tsum_setLIntegral_le_mul_lintegral`) with the +overlap number `M = 4N - 2` (`Daubechies.card_le_of_forall_mem_window`). -/ +theorem tsum_eLpNorm_window_rpow_le (hN : 1 ≤ N) {p : ℝ≥0∞} (hp0 : p ≠ 0) (hp : p ≠ ∞) + {G : ℝ → ℂ} (hG : AEStronglyMeasurable G volume) (j : ℕ) : + ∑' k : ℤ, eLpNorm G p (volume.restrict + (Set.Icc (((k : ℝ) - (2 * N - 2)) / 2 ^ j) ((k + (2 * N - 1)) / 2 ^ j))) ^ p.toReal ≤ + ((4 * N - 2 : ℕ) : ℝ≥0∞) * eLpNorm G p volume ^ p.toReal := by + have hk : ∀ k : ℤ, eLpNorm G p (volume.restrict + (Set.Icc (((k : ℝ) - (2 * N - 2)) / 2 ^ j) ((k + (2 * N - 1)) / 2 ^ j))) ^ p.toReal = + ∫⁻ x in Set.Icc (((k : ℝ) - (2 * N - 2)) / 2 ^ j) ((k + (2 * N - 1)) / 2 ^ j), + ‖G x‖ₑ ^ p.toReal := fun k => eLpNorm_rpow_eq hG.restrict hp0 hp + rw [tsum_congr hk, eLpNorm_rpow_eq hG hp0 hp] + exact tsum_setLIntegral_le_mul_lintegral (fun k => measurableSet_Icc) + (fun x T hT => card_le_of_forall_mem_window hN x T hT) (hG.eNorm.pow_const _) + +/-- **The length of a window**: `|W_k|^N = (4N - 3)^N 2^(-jN)` for the window +`W_k = [(k - (2N - 2))/2^j, (k + 2N - 1)/2^j]` of length `(4N - 3)/2^j`, `N ≥ 1`. -/ +theorem ofReal_window_length_pow (hN : 1 ≤ N) (j : ℕ) (k : ℤ) : + ENNReal.ofReal (((k : ℝ) + (2 * N - 1)) / 2 ^ j - ((k : ℝ) - (2 * N - 2)) / 2 ^ j) ^ N = + ((4 * N - 3 : ℕ) : ℝ≥0∞) ^ N * (2 ^ (j * N))⁻¹ := by + have h : ((k : ℝ) + (2 * N - 1)) / 2 ^ j - ((k : ℝ) - (2 * N - 2)) / 2 ^ j = + ((4 * N - 3 : ℕ) : ℝ) * ((2 : ℝ) ^ j)⁻¹ := by + rw [Nat.cast_sub (by omega)] + push_cast + field_simp + ring + rw [h, ENNReal.ofReal_mul (Nat.cast_nonneg _), ENNReal.ofReal_natCast, + ENNReal.ofReal_inv_of_pos (by positivity), ENNReal.ofReal_pow zero_le_two, + ENNReal.ofReal_ofNat, mul_pow, ← ENNReal.inv_pow, ← pow_mul] + +/-! ### Jackson's inequality for smooth functions -/ + +/-- **Subtracting a reproduced polynomial**: for `N ≥ 2`, a locally integrable `S : ℝ → ℂ`, a +complex polynomial `Q` of degree `< N` and every level `j`, +`S - P_j S = (S - Q) - P_j (S - Q)` at every point, since `P_j` is linear on locally integrable +functions (`Daubechies.projFun_sub`) and reproduces `Q` (`Daubechies.projFun_poly`). -/ +theorem sub_projFun_eq_sub_projFun_sub (hN : 2 ≤ N) {S : ℝ → ℂ} + (hS : LocallyIntegrable S volume) {Q : Polynomial ℂ} (hQ : Q ∈ Polynomial.degreeLT ℂ N) + (j : ℕ) : + (fun x => S x - projFun m j S x) = fun x => + (S x - Q.eval (x : ℂ)) - projFun m j (fun y => S y - Q.eval (y : ℂ)) x := by + have hQc : Continuous fun y : ℝ => Q.eval (y : ℂ) := Interval.continuous_polyFun Q + rw [projFun_sub m hN hS hQc.locallyIntegrable j, projFun_poly m hN hQ j] + funext x + ring + +/-- **The error on a cell through a polynomial**: let `N ≥ 2`, `1 ≤ p ≤ ∞`, let `S : ℝ → ℂ` be +locally integrable and `Q` a complex polynomial of degree `< N`. Then on the dyadic cell +`I = [k/2^j, (k + 1)/2^j)` with the window `W = [(k - (2N - 2))/2^j, (k + 2N - 1)/2^j]`, +`‖S - P_j S‖_{L_p(I)} ≤ (1 + C) ‖S - Q‖_{L_p(W)}` with the constant `C = cellConst m p` of the +local bound. Indeed `S - P_j S = (S - Q) - P_j (S - Q)` +(`Daubechies.sub_projFun_eq_sub_projFun_sub`), `I ⊆ W` (`Daubechies.Ico_subset_window`), and +`‖P_j (S - Q)‖_{L_p(I)} ≤ C ‖S - Q‖_{L_p(W)}` (`Daubechies.eLpNorm_projFun_cell_le`). -/ +theorem eLpNorm_sub_projFun_cell_le_of_poly (hN : 2 ≤ N) {p : ℝ≥0∞} (hp1 : 1 ≤ p) + {S : ℝ → ℂ} (hS : LocallyIntegrable S volume) {Q : Polynomial ℂ} + (hQ : Q ∈ Polynomial.degreeLT ℂ N) (j : ℕ) (k : ℤ) : + eLpNorm (fun x => S x - projFun m j S x) p + (volume.restrict (Set.Ico ((k : ℝ) / 2 ^ j) ((k + 1) / 2 ^ j))) ≤ + (1 + cellConst m p) * eLpNorm (fun x => S x - Q.eval (x : ℂ)) p (volume.restrict + (Set.Icc (((k : ℝ) - (2 * N - 2)) / 2 ^ j) ((k + (2 * N - 1)) / 2 ^ j))) := by + have hR : AEStronglyMeasurable (fun x : ℝ => S x - Q.eval (x : ℂ)) volume := + hS.aestronglyMeasurable.sub (Interval.continuous_polyFun Q).aestronglyMeasurable + rw [sub_projFun_eq_sub_projFun_sub m hN hS hQ j] + calc eLpNorm (fun x => (S x - Q.eval (x : ℂ)) - projFun m j (fun y => S y - Q.eval (y : ℂ)) x) + p (volume.restrict (Set.Ico ((k : ℝ) / 2 ^ j) ((k + 1) / 2 ^ j))) + ≤ eLpNorm (fun x => S x - Q.eval (x : ℂ)) p + (volume.restrict (Set.Ico ((k : ℝ) / 2 ^ j) ((k + 1) / 2 ^ j))) + + eLpNorm (projFun m j (fun y => S y - Q.eval (y : ℂ))) p + (volume.restrict (Set.Ico ((k : ℝ) / 2 ^ j) ((k + 1) / 2 ^ j))) := + eLpNorm_sub_le hp1 + _ ≤ eLpNorm (fun x => S x - Q.eval (x : ℂ)) p (volume.restrict + (Set.Icc (((k : ℝ) - (2 * N - 2)) / 2 ^ j) ((k + (2 * N - 1)) / 2 ^ j))) + + cellConst m p * eLpNorm (fun x => S x - Q.eval (x : ℂ)) p (volume.restrict + (Set.Icc (((k : ℝ) - (2 * N - 2)) / 2 ^ j) ((k + (2 * N - 1)) / 2 ^ j))) := + add_le_add (eLpNorm_mono_measure _ + (Measure.restrict_mono (Ico_subset_window (by omega) j k) le_rfl)) + (eLpNorm_projFun_cell_le m hN hp1 hR j k) + _ = _ := by ring + +/-- **The error on a cell for a smooth function**: let `N ≥ 2`, `1 ≤ p ≤ ∞` and `S ∈ C^N(ℝ)`. +Then on the dyadic cell `I = [k/2^j, (k + 1)/2^j)` with the window +`W = [(k - (2N - 2))/2^j, (k + 2N - 1)/2^j]`, +`‖S - P_j S‖_{L_p(I)} ≤ (1 + C) (4N - 3)^N 2^(-jN) ‖S^(N)‖_{L_p(W)}` with `C = cellConst m p`. +Taylor's theorem on `W` gives a polynomial `Q` of degree `< N` with +`‖S - Q‖_{L_p(W)} ≤ |W|^N ‖S^(N)‖_{L_p(W)}` (`Interval.exists_eLpNorm_sub_polyFun_le`), and +`|W| = (4N - 3)/2^j` (`Daubechies.ofReal_window_length_pow`); then +`Daubechies.eLpNorm_sub_projFun_cell_le_of_poly` applies. -/ +theorem eLpNorm_sub_projFun_cell_le (hN : 2 ≤ N) {p : ℝ≥0∞} (hp1 : 1 ≤ p) {S : ℝ → ℂ} + (hS : ContDiff ℝ N S) (j : ℕ) (k : ℤ) : + eLpNorm (fun x => S x - projFun m j S x) p + (volume.restrict (Set.Ico ((k : ℝ) / 2 ^ j) ((k + 1) / 2 ^ j))) ≤ + (1 + cellConst m p) * (((4 * N - 3 : ℕ) : ℝ≥0∞) ^ N * (2 ^ (j * N))⁻¹) * + eLpNorm (iteratedDeriv N S) p (volume.restrict + (Set.Icc (((k : ℝ) - (2 * N - 2)) / 2 ^ j) ((k + (2 * N - 1)) / 2 ^ j))) := by + have hN' : (1 : ℝ) ≤ N := by exact_mod_cast (by omega : 1 ≤ N) + have huv : ((k : ℝ) - (2 * N - 2)) / 2 ^ j ≤ ((k : ℝ) + (2 * N - 1)) / 2 ^ j := by + gcongr + linarith + obtain ⟨Q, hQ, hT⟩ := Interval.exists_eLpNorm_sub_polyFun_le hp1 N hS huv + rw [ofReal_window_length_pow (by omega) j k] at hT + calc eLpNorm (fun x => S x - projFun m j S x) p + (volume.restrict (Set.Ico ((k : ℝ) / 2 ^ j) ((k + 1) / 2 ^ j))) + ≤ (1 + cellConst m p) * eLpNorm (fun x => S x - Q.eval (x : ℂ)) p (volume.restrict + (Set.Icc (((k : ℝ) - (2 * N - 2)) / 2 ^ j) ((k + (2 * N - 1)) / 2 ^ j))) := + eLpNorm_sub_projFun_cell_le_of_poly m hN hp1 hS.continuous.locallyIntegrable hQ j k + _ ≤ (1 + cellConst m p) * (((4 * N - 3 : ℕ) : ℝ≥0∞) ^ N * (2 ^ (j * N))⁻¹ * + eLpNorm (iteratedDeriv N S) p (volume.restrict + (Set.Icc (((k : ℝ) - (2 * N - 2)) / 2 ^ j) ((k + (2 * N - 1)) / 2 ^ j)))) := by + gcongr + exact hT + _ = _ := by ring + +/-- **The constant of Jackson's inequality for smooth functions**: +`(4N - 2)^(1/p) (1 + C) (4N - 3)^N` with the constant `C = cellConst m p` of the local bound, the +overlap number `4N - 2` of the windows and their length `(4N - 3)/2^j` +(`Daubechies.eLpNorm_sub_projFun_le_of_contDiff`). -/ +noncomputable def smoothJacksonConst (p : ℝ≥0∞) : ℝ≥0∞ := + ((4 * N - 2 : ℕ) : ℝ≥0∞) ^ (1 / p.toReal) * (1 + cellConst m p) * + ((4 * N - 3 : ℕ) : ℝ≥0∞) ^ N + +/-- The constant `smoothJacksonConst m p` is finite for `N ≥ 2` (`Daubechies.cellConst_ne_top`). +-/ +theorem smoothJacksonConst_ne_top (hN : 2 ≤ N) (p : ℝ≥0∞) : smoothJacksonConst m p ≠ ∞ := + ENNReal.mul_ne_top (ENNReal.mul_ne_top + (ENNReal.rpow_ne_top_of_nonneg (by positivity) (ENNReal.natCast_ne_top _)) + (ENNReal.add_ne_top.2 ⟨ENNReal.one_ne_top, cellConst_ne_top m hN p⟩)) + (ENNReal.pow_ne_top (ENNReal.natCast_ne_top _)) + +/-- **Jackson's inequality for smooth functions**: for `N ≥ 2`, `1 ≤ p < ∞`, `S ∈ C^N(ℝ)` and +every level `j`, `‖S - P_j S‖_p ≤ C_S 2^(-jN) ‖S^(N)‖_p` with `C_S = smoothJacksonConst m p`. +The cell bound `Daubechies.eLpNorm_sub_projFun_cell_le` holds on every dyadic cell of level `j`, +the cells cover `ℝ` (`Daubechies.iUnion_Ico_div_two_pow`), and the windows satisfy the window +summation `Daubechies.tsum_eLpNorm_window_rpow_le`, so the summation lemma +`MeasureTheory.eLpNorm_le_of_forall_eLpNorm_restrict_le` applies. The inequality holds in +`[0, ∞]` for every `S ∈ C^N(ℝ)`. -/ +theorem eLpNorm_sub_projFun_le_of_contDiff (hN : 2 ≤ N) {p : ℝ≥0∞} (hp1 : 1 ≤ p) (hp : p ≠ ∞) + {S : ℝ → ℂ} (hS : ContDiff ℝ N S) (j : ℕ) : + eLpNorm (fun x => S x - projFun m j S x) p volume ≤ + smoothJacksonConst m p * (2 ^ (j * N))⁻¹ * eLpNorm (iteratedDeriv N S) p volume := by + have hp0 : p ≠ 0 := (zero_lt_one.trans_le hp1).ne' + have h := eLpNorm_le_of_forall_eLpNorm_restrict_le (μ := volume) (iUnion_Ico_div_two_pow j) + hp0 hp (hS.continuous.sub (continuous_projFun m hN j S)).aestronglyMeasurable + (tsum_eLpNorm_window_rpow_le (by omega) hp0 hp + (hS.continuous_iteratedDeriv' N).aestronglyMeasurable j) + (fun k => eLpNorm_sub_projFun_cell_le m hN hp1 hS j k) + refine h.trans (le_of_eq ?_) + rw [smoothJacksonConst] + ring + +/-! ### Jackson's inequality for continuous functions -/ + +/-- **Comparing the errors of two functions**: for `N ≥ 2`, `1 ≤ p < ∞`, locally integrable +`f, S : ℝ → ℂ` and every level `j`, +`‖f - P_j f‖_p ≤ (1 + C) ‖f - S‖_p + ‖S - P_j S‖_p` with the uniform bound `C = projConst m p` of +the projections. Indeed `f - P_j f = (f - S) + (S - P_j S) + P_j (S - f)` by the linearity of +`P_j` (`Daubechies.projFun_sub`), and `‖P_j (S - f)‖_p ≤ C ‖S - f‖_p` +(`Daubechies.eLpNorm_projFun_le`). -/ +theorem eLpNorm_sub_projFun_le_add (hN : 2 ≤ N) {p : ℝ≥0∞} (hp1 : 1 ≤ p) (hp : p ≠ ∞) + {f S : ℝ → ℂ} (hf : LocallyIntegrable f volume) (hS : LocallyIntegrable S volume) (j : ℕ) : + eLpNorm (fun x => f x - projFun m j f x) p volume ≤ + (1 + ENNReal.ofReal (projConst m p)) * eLpNorm (fun x => f x - S x) p volume + + eLpNorm (fun x => S x - projFun m j S x) p volume := by + have heq : (fun x => f x - projFun m j f x) = (fun x => f x - S x) + + (fun x => S x - projFun m j S x) + projFun m j (fun y => S y - f y) := by + rw [projFun_sub m hN hS hf j] + funext x + simp only [Pi.add_apply] + ring + have hP : eLpNorm (projFun m j (fun y => S y - f y)) p volume ≤ + ENNReal.ofReal (projConst m p) * eLpNorm (fun x => f x - S x) p volume := by + refine (eLpNorm_projFun_le m hN hp1 hp + (hS.aestronglyMeasurable.sub hf.aestronglyMeasurable) j).trans (le_of_eq ?_) + rw [← eLpNorm_neg] + congr 2 + funext x + simp + rw [heq] + calc eLpNorm ((fun x => f x - S x) + (fun x => S x - projFun m j S x) + + projFun m j (fun y => S y - f y)) p volume + ≤ eLpNorm (fun x => f x - S x) p volume + + eLpNorm (fun x => S x - projFun m j S x) p volume + + eLpNorm (projFun m j (fun y => S y - f y)) p volume := + (eLpNorm_add_le hp1).trans (add_le_add_left (eLpNorm_add_le hp1) _) + _ ≤ eLpNorm (fun x => f x - S x) p volume + + eLpNorm (fun x => S x - projFun m j S x) p volume + + ENNReal.ofReal (projConst m p) * eLpNorm (fun x => f x - S x) p volume := by gcongr + _ = _ := by ring + +/-- **The constant of Jackson's inequality**: `C_J = 1 + C + C_S 2^N N^N` with the uniform bound +`C = projConst m p` of the projections and the constant `C_S = smoothJacksonConst m p` for smooth +functions (`Daubechies.eLpNorm_sub_projFun_le_modulus`). It depends only on the mask and on +`p`. -/ +noncomputable def jacksonConst (p : ℝ≥0∞) : ℝ≥0∞ := + 1 + ENNReal.ofReal (projConst m p) + smoothJacksonConst m p * (2 ^ N * (N : ℝ≥0∞) ^ N) + +/-- The constant `jacksonConst m p` is finite for `N ≥ 2` +(`Daubechies.smoothJacksonConst_ne_top`). -/ +theorem jacksonConst_ne_top (hN : 2 ≤ N) (p : ℝ≥0∞) : jacksonConst m p ≠ ∞ := + ENNReal.add_ne_top.2 ⟨ENNReal.add_ne_top.2 ⟨ENNReal.one_ne_top, ENNReal.ofReal_ne_top⟩, + ENNReal.mul_ne_top (smoothJacksonConst_ne_top m hN p) + (ENNReal.mul_ne_top (ENNReal.pow_ne_top ENNReal.ofNat_ne_top) + (ENNReal.pow_ne_top (ENNReal.natCast_ne_top N)))⟩ + +/-- **Jackson's inequality for continuous functions**: for `N ≥ 2`, `1 ≤ p < ∞`, every continuous +`f : ℝ → ℂ` and every level `j`, +`‖f - P_j f‖_p ≤ C_J ω_N(f, 2^(-j))_p` with `C_J = jacksonConst m p` and the modulus of +smoothness `ω_N(f, t)_p = sup_{|h| ≤ t} ‖Δ_h^N f‖_{L_p(ℝ)}` (`Rd.modulus volume`). With the +Steklov smoothing `S = S_δ f` at the step `δ = 1/(N 2^j)`, which lies in `C^N` +(`Interval.contDiff_smooth`): `‖f - S‖_p ≤ ω_N(f, 2^(-j))_p` +(`Daubechies.eLpNorm_sub_smooth_le_dyadic`), `‖S^(N)‖_p ≤ 2^N N^N 2^(jN) ω_N(f, 2^(-j))_p` +(`Daubechies.eLpNorm_iteratedDeriv_smooth_le_dyadic`), hence +`‖S - P_j S‖_p ≤ C_S 2^N N^N ω_N(f, 2^(-j))_p` (`Daubechies.eLpNorm_sub_projFun_le_of_contDiff`), +and `Daubechies.eLpNorm_sub_projFun_le_add` combines the two bounds. The inequality holds in +`[0, ∞]` for every continuous `f`. -/ +theorem eLpNorm_sub_projFun_le_modulus (hN : 2 ≤ N) {p : ℝ≥0∞} (hp1 : 1 ≤ p) (hp : p ≠ ∞) + {f : ℝ → ℂ} (hf : Continuous f) (j : ℕ) : + eLpNorm (fun x => f x - projFun m j f x) p volume ≤ + jacksonConst m p * Rd.modulus volume N p f (1 / 2 ^ j) := by + have hS := Interval.contDiff_smooth hf N (1 / (N * 2 ^ j)) + have h0 : (2 : ℝ≥0∞) ^ (j * N) ≠ 0 := pow_ne_zero _ two_ne_zero + have htop : (2 : ℝ≥0∞) ^ (j * N) ≠ ∞ := ENNReal.pow_ne_top ENNReal.ofNat_ne_top + calc eLpNorm (fun x => f x - projFun m j f x) p volume + ≤ (1 + ENNReal.ofReal (projConst m p)) * + eLpNorm (fun x => f x - Interval.smooth N (1 / (N * 2 ^ j)) f x) p volume + + eLpNorm (fun x => Interval.smooth N (1 / (N * 2 ^ j)) f x - + projFun m j (Interval.smooth N (1 / (N * 2 ^ j)) f) x) p volume := + eLpNorm_sub_projFun_le_add m hN hp1 hp hf.locallyIntegrable + hS.continuous.locallyIntegrable j + _ ≤ (1 + ENNReal.ofReal (projConst m p)) * Rd.modulus volume N p f (1 / 2 ^ j) + + smoothJacksonConst m p * (2 ^ (j * N))⁻¹ * + (2 ^ N * (N : ℝ≥0∞) ^ N * 2 ^ (j * N) * Rd.modulus volume N p f (1 / 2 ^ j)) := by + gcongr + · exact eLpNorm_sub_smooth_le_dyadic hf (by omega) j hp1 hp + · exact (eLpNorm_sub_projFun_le_of_contDiff m hN hp1 hp hS j).trans (by + gcongr + exact eLpNorm_iteratedDeriv_smooth_le_dyadic hf (by omega) j hp1) + _ = (1 + ENNReal.ofReal (projConst m p)) * Rd.modulus volume N p f (1 / 2 ^ j) + + smoothJacksonConst m p * (2 ^ N * (N : ℝ≥0∞) ^ N) * + Rd.modulus volume N p f (1 / 2 ^ j) * ((2 ^ (j * N))⁻¹ * 2 ^ (j * N)) := by ring + _ = jacksonConst m p * Rd.modulus volume N p f (1 / 2 ^ j) := by + rw [ENNReal.inv_mul_cancel h0 htop, mul_one, jacksonConst] + ring + +/-! ### Jackson's inequality on `L_p` -/ + +section Lp + +variable {p : ℝ≥0∞} [Fact (1 ≤ p)] + +/-- **Jackson's inequality for a continuous representative**: for `N ≥ 2`, `1 ≤ p < ∞`, every +`f ∈ L_p(ℝ)` that agrees almost everywhere with a continuous function `g`, and every level `j`, +`‖f - P_j f‖_p ≤ C_J ω_N(f, 2^(-j))_p` with `C_J = jacksonConst m p` +(`Daubechies.eLpNorm_sub_projFun_le_modulus` for `g`; both sides depend only on the class of +`f`, `Daubechies.projFun_congr_ae` and `Rd.modulus_congr_ae`). -/ +theorem enorm_sub_proj_le_of_continuous (hN : 2 ≤ N) (hp : p ≠ ∞) + {f : Lp ℂ p (volume : Measure ℝ)} {g : ℝ → ℂ} (hg : Continuous g) (hfg : ⇑f =ᵐ[volume] g) + (j : ℕ) : ‖f - proj m p hN hp j f‖ₑ ≤ jacksonConst m p * Rd.lpModulus p N f j := by + have hP : ⇑(proj m p hN hp j f) =ᵐ[volume] projFun m j g := + (proj_apply_ae m hN hp j f).trans (EventuallyEq.of_eq (projFun_congr_ae m hfg j)) + rw [Lp.eNorm_def, eLpNorm_congr_ae ((Lp.coeFn_sub _ _).trans (hfg.sub hP)), Rd.lpModulus, + Rd.modulus_congr_ae hfg] + exact eLpNorm_sub_projFun_le_modulus m hN Fact.out hp hg j + +/-- **Jackson's inequality for the Daubechies scheme, with its constant**: for `N ≥ 2`, +`1 ≤ p < ∞`, every `f ∈ L_p(ℝ)` and every level `j`, the error of best approximation from the +scaling space `V_j` (the approximants of complexity `2^j`, `Daubechies.mem_scheme_two_pow`) +satisfies `E_{2^j}(f)_p ≤ C_J ω_N(f, 2^(-j))_p` with `C_J = jacksonConst m p`. For `f` with a +bounded continuous representative, `P_j f ∈ V_j` gives `E_{2^j}(f)_p ≤ ‖f - P_j f‖_p` +(`Daubechies.enorm_sub_proj_le_of_continuous`); these `f` are dense in `L_p` (Mathlib's +`MeasureTheory.Lp.boundedContinuousFunction_dense`), and both sides are controlled by `‖f‖_p` +(`Rd.lpModulus_add_le`, `Rd.lpModulus_le`), so the bound extends to all of `L_p` +(`ApproximationScheme.approxError_le_of_dense`). -/ +theorem approxError_scheme_le_jacksonConst_mul (hN : 2 ≤ N) (hp : p ≠ ∞) + (f : Lp ℂ p (volume : Measure ℝ)) (j : ℕ) : + (scheme m p hN hp).approxError f (2 ^ j) ≤ jacksonConst m p * Rd.lpModulus p N f j := by + refine ApproximationScheme.approxError_le_of_dense + (Lp.boundedContinuousFunction_dense ℂ volume hp) (fun f g => Rd.lpModulus_add_le N f g j) + (C0 := 2 ^ N) (ENNReal.pow_ne_top ENNReal.ofNat_ne_top) (fun f => Rd.lpModulus_le N f j) + (jacksonConst_ne_top m hN p) (fun g hg => ?_) f + obtain ⟨g₀, hg₀⟩ := Lp.mem_boundedContinuousFunction_iff.1 hg + have hae : ⇑g =ᵐ[volume] g₀ := by + have h := g₀.toContinuousMap.coeFn_toAEEqFun volume + rw [hg₀] at h + exact h + exact ((scheme m p hN hp).approxError_le_of_mem + ((mem_scheme_two_pow m).2 (proj_mem_scalingSpace m hN hp j g)) g).trans + (enorm_sub_proj_le_of_continuous m hN hp g₀.continuous hae j) + +/-- **Jackson's inequality for the Daubechies scheme**: for `N ≥ 2` and `1 ≤ p < ∞` there is a +constant `C_J < ∞` such that for every `f ∈ L_p(ℝ)` and every level `j` the error of best +approximation from the scaling space `V_j` satisfies `E_{2^j}(f)_p ≤ C_J ω_N(f, 2^(-j))_p`, the +Jackson inequality of an approximation scheme with modulus `ω_N` at the dyadic scales. The +constant `C_J = jacksonConst m p` serves (`Daubechies.approxError_scheme_le_jacksonConst_mul`). -/ +theorem approxError_scheme_le (hN : 2 ≤ N) (hp : p ≠ ∞) : + ∃ C_J : ℝ≥0∞, C_J ≠ ∞ ∧ ∀ (f : Lp ℂ p (volume : Measure ℝ)) (j : ℕ), + (scheme m p hN hp).approxError f (2 ^ j) ≤ C_J * Rd.lpModulus p N f j := + ⟨jacksonConst m p, jacksonConst_ne_top m hN p, approxError_scheme_le_jacksonConst_mul m hN hp⟩ + +/-- **Jackson's inequality for the projections**: for `N ≥ 2`, `1 ≤ p < ∞`, every `f ∈ L_p(ℝ)` and +every level `j`, `‖f - P_j f‖_p ≤ (1 + C) C_J ω_N(f, 2^(-j))_p` with the uniform bound +`C = projConst m p` of the projections and `C_J = jacksonConst m p`. This is the Lebesgue +inequality `‖f - P_j f‖_p ≤ (1 + C) E_{2^j}(f)_p` +(`ApproximationScheme.ProjectionScheme.enorm_sub_le_approxError` for the projection scheme +`Daubechies.projectionScheme`, whose projection of complexity `2^j` is `P_j`, +`Daubechies.projectionScheme_two_pow`) combined with +`Daubechies.approxError_scheme_le_jacksonConst_mul`. -/ +theorem enorm_sub_proj_le (hN : 2 ≤ N) (hp : p ≠ ∞) (f : Lp ℂ p (volume : Measure ℝ)) (j : ℕ) : + ‖f - proj m p hN hp j f‖ₑ ≤ + (1 + ENNReal.ofReal (projConst m p)) * jacksonConst m p * Rd.lpModulus p N f j := by + have h := (projectionScheme m p hN hp).enorm_sub_le_approxError (2 ^ j) f + rw [projectionScheme_two_pow] at h + refine h.trans ?_ + rw [mul_assoc] + exact mul_le_mul_right (approxError_scheme_le_jacksonConst_mul m hN hp f j) _ + +end Lp + +end Daubechies diff --git a/LeanPool/FunctionSpaces/Wavelets/Examples/Daubechies/JacksonSmoothing.lean b/LeanPool/FunctionSpaces/Wavelets/Examples/Daubechies/JacksonSmoothing.lean new file mode 100644 index 0000000000..549334ace3 --- /dev/null +++ b/LeanPool/FunctionSpaces/Wavelets/Examples/Daubechies/JacksonSmoothing.lean @@ -0,0 +1,171 @@ +/- +Copyright (c) 2026 Mario Ullrich. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Mario Ullrich +-/ +module + +public import LeanPool.FunctionSpaces.Domains.Interval.Smoothing +public import LeanPool.FunctionSpaces.Analysis.Differences.Differences + +/- +Modified for Lean Pool: module names and imports adapted. +-/ + +/-! +# Steklov smoothing on the whole line + +For a continuous `f : ℝ → ℂ`, an order `r ∈ ℕ` and a step `δ > 0`, the **Steklov smoothing** +`S_δ f = ∑_{k=1}^r (-1)^(k+1) C(r, k) M_{kδ}^r f` (`Interval.smooth`, defined pointwise on all of +`ℝ` from the Steklov averages `M_η g(x) = η^(-1) ∫_0^η g(x + τ) dτ`) is `r` times continuously +differentiable (`Interval.contDiff_smooth`). On all of `ℝ` it is controlled by the modulus of +smoothness of the line, `ω_r(f, t)_p = sup_{|h| ≤ t} ‖Δ_h^r f‖_{L_p(ℝ)}` (`Rd.modulus volume`): + +* `‖f - S_δ f‖_{L_p(ℝ)} ≤ ω_r(f, rδ)_p` for `1 ≤ p < ∞` + (`Daubechies.eLpNorm_sub_smooth_le_modulus`); +* `‖(S_δ f)^(r)‖_{L_p(ℝ)} ≤ 2^r δ^(-r) ω_r(f, rδ)_p` for `1 ≤ p ≤ ∞` + (`Daubechies.eLpNorm_iteratedDeriv_smooth_le_modulus`). + +The proofs are those of the interval versions `Interval.eLpNorm_sub_smooth_le` and +`Interval.eLpNorm_iteratedDeriv_smooth_le`, with Lebesgue measure on `ℝ` in place of its +restriction to an interval. The difference `f - S_δ f` is `(-1)^r` times the average of +`Δ^r_{v_1 + ⋯ + v_r} f` over `v ∈ [0, δ]^r` (`Interval.sub_smooth_eq`), so Minkowski's inequality +for averages (`Interval.eLpNorm_avgStepIter_le`) bounds it by the differences with steps +`0 ≤ h ≤ rδ`. The derivative is the combination +`(S_δ f)^(r) = ∑_{k=1}^r (-1)^(k+1) C(r, k) (kδ)^(-r) Δ_{kδ}^r f` +(`Interval.iteratedDeriv_smooth_eq_sum_smul`), bounded by the derivative bound for any measure +(`Interval.eLpNorm_sum_smoothCoeff_smul_le`) with `‖Δ_h^r f‖_p ≤ ω_r(f, rδ)_p` for `0 ≤ h ≤ rδ`. + +At the dyadic step `δ = 1/(N 2^j)`, where `Nδ = 2^(-j)` and `δ^(-N) = N^N 2^(jN)`, the two +bounds read `‖f - S_δ f‖_p ≤ ω_N(f, 2^(-j))_p` and +`‖(S_δ f)^(N)‖_p ≤ 2^N N^N 2^(jN) ω_N(f, 2^(-j))_p` (`Daubechies.eLpNorm_sub_smooth_le_dyadic`, +`Daubechies.eLpNorm_iteratedDeriv_smooth_le_dyadic`), and for `f ∈ L_p` both `S_δ f` and +`(S_δ f)^(r)` lie in `L_p` (`Daubechies.memLp_smooth`, `Daubechies.memLp_iteratedDeriv_smooth`). +These are the smoothing steps of Jackson's inequality for the Daubechies projections. +-/ + +@[expose] public section + +open MeasureTheory +open scoped ENNReal + +namespace Daubechies + +/-! ### The two smoothing estimates on the line -/ + +/-- **Differences with a nonnegative step are bounded by the modulus**: for `0 ≤ h ≤ t`, +`‖Δ_h^r f‖_{L_p(ℝ)} ≤ ω_r(f, t)_p`, where `ω_r(f, t)_p = sup_{|h| ≤ t} ‖Δ_h^r f‖_{L_p(ℝ)}` is the +modulus of smoothness of the line (`Rd.modulus volume`). -/ +theorem eLpNorm_higherDiff_le_modulus_of_nonneg {r : ℕ} {p : ℝ≥0∞} {f : ℝ → ℂ} {h t : ℝ} + (h0 : 0 ≤ h) (ht : h ≤ t) : + eLpNorm (Rd.higherDiff r h f) p volume ≤ Rd.modulus volume r p f t := + Rd.eLpNorm_higherDiff_le_modulus (by rwa [Real.norm_of_nonneg h0]) + +/-- **The smoothing is close to `f` on the whole line**: for continuous `f : ℝ → ℂ`, `r ∈ ℕ`, +`δ > 0` and `1 ≤ p < ∞`, +`‖f - S_δ f‖_{L_p(ℝ)} ≤ ω_r(f, rδ)_p`. +Indeed `f - S_δ f = (-1)^r avg_{v ∈ [0, δ]^r} Δ^r_{v_1 + ⋯ + v_r} f` (`Interval.sub_smooth_eq`), +and Minkowski's inequality for averages (`Interval.eLpNorm_avgStepIter_le`, stated for +`p < ∞`) bounds its norm by the supremum of `‖Δ_h^r f‖_{L_p(ℝ)}` over `0 ≤ h ≤ rδ`. -/ +theorem eLpNorm_sub_smooth_le_modulus {f : ℝ → ℂ} (hf : Continuous f) (r : ℕ) {δ : ℝ} + (hδ : 0 < δ) {p : ℝ≥0∞} (hp : 1 ≤ p) (hp' : p ≠ ∞) : + eLpNorm (fun x => f x - Interval.smooth r δ f x) p volume ≤ + Rd.modulus volume r p f (r * δ) := by + have heq : (fun x => f x - Interval.smooth r δ f x) = ((-1 : ℂ) ^ r) • + Interval.avgStepIter r δ (fun h y => Rd.higherDiff r h f y) 0 := by + funext x + rw [Interval.sub_smooth_eq hf r hδ.ne' x] + rfl + rw [heq, eLpNorm_const_smul, eNorm_pow, eNorm_neg, eNorm_one, one_pow, one_mul] + refine (Interval.eLpNorm_avgStepIter_le (Interval.continuous_higherDiff_uncurry hf r) hδ hp + hp' volume r 0).trans (iSup₂_le fun h hh => ?_) + rw [zero_add] at hh + exact eLpNorm_higherDiff_le_modulus_of_nonneg hh.1 hh.2 + +/-- **The derivative of order `r` of the smoothing on the whole line**: for continuous +`f : ℝ → ℂ`, `r ∈ ℕ`, `δ > 0` and `1 ≤ p ≤ ∞`, +`‖(S_δ f)^(r)‖_{L_p(ℝ)} ≤ 2^r δ^(-r) ω_r(f, rδ)_p`, +by the triangle inequality for `(S_δ f)^(r) = ∑_{k=1}^r (-1)^(k+1) C(r, k) (kδ)^(-r) Δ_{kδ}^r f` +and `∑_{k=1}^r C(r, k) ≤ 2^r` (`Interval.eLpNorm_sum_smoothCoeff_smul_le` for Lebesgue measure on +`ℝ`). -/ +theorem eLpNorm_iteratedDeriv_smooth_le_modulus {f : ℝ → ℂ} (hf : Continuous f) (r : ℕ) + {δ : ℝ} (hδ : 0 < δ) {p : ℝ≥0∞} (hp : 1 ≤ p) : + eLpNorm (iteratedDeriv r (Interval.smooth r δ f)) p volume ≤ + 2 ^ r * (ENNReal.ofReal δ)⁻¹ ^ r * Rd.modulus volume r p f (r * δ) := by + rw [Interval.iteratedDeriv_smooth_eq_sum_smul hf r δ] + exact Interval.eLpNorm_sum_smoothCoeff_smul_le (D := fun h => Rd.higherDiff r h f) hδ hp + fun h h0 hh => eLpNorm_higherDiff_le_modulus_of_nonneg h0 hh + +/-! ### The dyadic step `δ = 1/(N 2^j)` -/ + +/-- **The smoothing at a dyadic scale is close to `f`**: for continuous `f : ℝ → ℂ`, `N ≥ 1`, +`j ∈ ℕ`, `1 ≤ p < ∞` and the step `δ = 1/(N 2^j)`, +`‖f - S_δ f‖_{L_p(ℝ)} ≤ ω_N(f, 2^(-j))_p`. +This is `eLpNorm_sub_smooth_le_modulus` with `r = N`, since `Nδ = 2^(-j)`. -/ +theorem eLpNorm_sub_smooth_le_dyadic {f : ℝ → ℂ} (hf : Continuous f) {N : ℕ} (hN : 0 < N) + (j : ℕ) {p : ℝ≥0∞} (hp : 1 ≤ p) (hp' : p ≠ ∞) : + eLpNorm (fun x => f x - Interval.smooth N (1 / (N * 2 ^ j)) f x) p volume ≤ + Rd.modulus volume N p f (1 / 2 ^ j) := by + have hN' : (0 : ℝ) < N := by exact_mod_cast hN + have hδ : (0 : ℝ) < 1 / (N * 2 ^ j) := div_pos one_pos (mul_pos hN' (pow_pos two_pos j)) + have hNδ : (N : ℝ) * (1 / (N * 2 ^ j)) = 1 / 2 ^ j := by field_simp + have h := eLpNorm_sub_smooth_le_modulus hf N hδ hp hp' + rwa [hNδ] at h + +/-- **The derivative of the smoothing at a dyadic scale**: for continuous `f : ℝ → ℂ`, `N ≥ 1`, +`j ∈ ℕ`, `1 ≤ p ≤ ∞` and the step `δ = 1/(N 2^j)`, +`‖(S_δ f)^(N)‖_{L_p(ℝ)} ≤ 2^N N^N 2^(jN) ω_N(f, 2^(-j))_p`. +This is `eLpNorm_iteratedDeriv_smooth_le_modulus` with `r = N`, since `δ^(-N) = N^N 2^(jN)` +and `Nδ = 2^(-j)`. -/ +theorem eLpNorm_iteratedDeriv_smooth_le_dyadic {f : ℝ → ℂ} (hf : Continuous f) {N : ℕ} + (hN : 0 < N) (j : ℕ) {p : ℝ≥0∞} (hp : 1 ≤ p) : + eLpNorm (iteratedDeriv N (Interval.smooth N (1 / (N * 2 ^ j)) f)) p volume ≤ + 2 ^ N * (N : ℝ≥0∞) ^ N * 2 ^ (j * N) * Rd.modulus volume N p f (1 / 2 ^ j) := by + have hN' : (0 : ℝ) < N := by exact_mod_cast hN + have hδ : (0 : ℝ) < 1 / (N * 2 ^ j) := div_pos one_pos (mul_pos hN' (pow_pos two_pos j)) + have hNδ : (N : ℝ) * (1 / (N * 2 ^ j)) = 1 / 2 ^ j := by field_simp + have hinv : (ENNReal.ofReal (1 / (N * 2 ^ j)))⁻¹ ^ N = (N : ℝ≥0∞) ^ N * 2 ^ (j * N) := by + rw [← ENNReal.ofReal_inv_of_pos hδ, one_div, inv_inv, ENNReal.ofReal_mul hN'.le, + ENNReal.ofReal_natCast, ENNReal.ofReal_pow zero_le_two, ENNReal.ofReal_ofNat, mul_pow, + ← pow_mul] + have h := eLpNorm_iteratedDeriv_smooth_le_modulus hf N hδ hp + rwa [hinv, hNδ, ← mul_assoc] at h + +/-! ### `L_p` membership -/ + +/-- **The smoothing of an `L_p` function lies in `L_p`**: for continuous `f ∈ L_p(ℝ)`, `r ∈ ℕ`, +`δ > 0` and `1 ≤ p < ∞`, also `S_δ f ∈ L_p(ℝ)`, because +`‖f - S_δ f‖_p ≤ ω_r(f, rδ)_p ≤ 2^r ‖f‖_p` (`Rd.modulus_le`). -/ +theorem memLp_smooth {f : ℝ → ℂ} {p : ℝ≥0∞} (hf : Continuous f) (hfp : MemLp f p volume) + (r : ℕ) {δ : ℝ} (hδ : 0 < δ) (hp : 1 ≤ p) (hp' : p ≠ ∞) : + MemLp (Interval.smooth r δ f) p volume := by + have hsub : MemLp (fun x => f x - Interval.smooth r δ f x) p volume := memLp_iff.2 <| + calc eLpNorm (fun x => f x - Interval.smooth r δ f x) p volume + ≤ Rd.modulus volume r p f (r * δ) := eLpNorm_sub_smooth_le_modulus hf r hδ hp hp' + _ ≤ 2 ^ r * eLpNorm f p volume := Rd.modulus_le hf.aestronglyMeasurable hp r _ + _ < ∞ := ENNReal.mul_lt_top (ENNReal.pow_lt_top ENNReal.ofNat_lt_top) hfp.eLpNorm_lt_top + have heq : Interval.smooth r δ f = f - fun x => f x - Interval.smooth r δ f x := by + funext x + simp + rw [heq] + exact hfp.sub hsub + +/-- **The derivative of the smoothing of an `L_p` function lies in `L_p`**: for continuous +`f ∈ L_p(ℝ)`, `r ∈ ℕ`, `δ > 0` and `1 ≤ p ≤ ∞`, also `(S_δ f)^(r) ∈ L_p(ℝ)`, because +`‖(S_δ f)^(r)‖_p ≤ 2^r δ^(-r) ω_r(f, rδ)_p ≤ 4^r δ^(-r) ‖f‖_p`. -/ +theorem memLp_iteratedDeriv_smooth {f : ℝ → ℂ} {p : ℝ≥0∞} (hf : Continuous f) + (hfp : MemLp f p volume) (r : ℕ) {δ : ℝ} (hδ : 0 < δ) (hp : 1 ≤ p) : + MemLp (iteratedDeriv r (Interval.smooth r δ f)) p volume := by + have h2 : (2 : ℝ≥0∞) ^ r < ∞ := ENNReal.pow_lt_top ENNReal.ofNat_lt_top + have hinv : (ENNReal.ofReal δ)⁻¹ < ∞ := ENNReal.inv_lt_top.2 (ENNReal.ofReal_pos.2 hδ) + refine memLp_iff.2 ?_ + calc eLpNorm (iteratedDeriv r (Interval.smooth r δ f)) p volume + ≤ 2 ^ r * (ENNReal.ofReal δ)⁻¹ ^ r * Rd.modulus volume r p f (r * δ) := + eLpNorm_iteratedDeriv_smooth_le_modulus hf r hδ hp + _ ≤ 2 ^ r * (ENNReal.ofReal δ)⁻¹ ^ r * (2 ^ r * eLpNorm f p volume) := by + gcongr + exact Rd.modulus_le hf.aestronglyMeasurable hp r _ + _ < ∞ := ENNReal.mul_lt_top (ENNReal.mul_lt_top h2 (ENNReal.pow_lt_top hinv)) + (ENNReal.mul_lt_top h2 hfp.eLpNorm_lt_top) + +end Daubechies diff --git a/LeanPool/FunctionSpaces/Wavelets/Examples/Daubechies/Mask.lean b/LeanPool/FunctionSpaces/Wavelets/Examples/Daubechies/Mask.lean new file mode 100644 index 0000000000..f5d3c33040 --- /dev/null +++ b/LeanPool/FunctionSpaces/Wavelets/Examples/Daubechies/Mask.lean @@ -0,0 +1,401 @@ +/- +Copyright (c) 2026 Mario Ullrich. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Mario Ullrich +-/ +module + +public import LeanPool.FunctionSpaces.Wavelets.Examples.Daubechies.DaubechiesPolynomial +public import Mathlib.Analysis.Calculus.ContDiff.Polynomial +public import Mathlib.Analysis.SpecialFunctions.ExpDeriv + +/- +Modified for Lean Pool: module names and imports adapted. +-/ + +/-! +# Daubechies masks + +A **Daubechies mask of order `N`** (`Daubechies.Mask`) is given by a real polynomial `L` of +degree `< N` with `L(1) = 1` and `|L(e^(-2πiξ))|² = P(ξ)` for all `ξ ∈ ℝ`, where +`P(ξ) = P_N(sin²(πξ))` is the trigonometric Daubechies polynomial (`Daubechies.daubFun`). Every +mask has order `N ≥ 1` (`Daubechies.Mask.one_le`). From `L` one builds + +* the **mask polynomial** `m(z) = ((1 + z)/2)^N L(z)` (`Daubechies.maskPoly`), with + `deg m ≤ 2N - 1` (`Daubechies.natDegree_maskPoly_le`) and `(z + 1)^N ∣ m(z)` + (`Daubechies.X_add_one_pow_dvd_maskPoly`); +* the **filter coefficients** `c_k = 2 [z^k] m(z)` for `k ∈ ℤ` (`Daubechies.coeff`), with + `c_k = 0` for `k < 0` and for `k ≥ 2N` (`Daubechies.coeff_eq_zero`) and + `∑_{k<2N} c_k = 2 m(1) = 2` (`Daubechies.sum_coeff`); +* the **symbol** `m_0(ξ) = m(e^(-2πiξ)) = (1/2) ∑_k c_k e^(-2πikξ)` (`Daubechies.symbol`, + `Daubechies.symbol_eq_sum`), a smooth function of period `1` with `m_0(0) = 1` + (`Daubechies.contDiff_symbol`, `Daubechies.symbol_periodic`, `Daubechies.symbol_zero`). + +The point `z = e^(-2πiξ)` of the unit circle is `Daubechies.expFreq ξ`. There the factor +`(1 + z)/2` equals `e^(-πiξ) cos(πξ)` (`Daubechies.one_add_expFreq_div_two`), so + +`|m_0(ξ)|² = cos(πξ)^(2N) P(ξ)` (`Daubechies.normSq_symbol`). + +Together with the trigonometric Bézout identity `cos(πξ)^(2N) P(ξ) + sin(πξ)^(2N) P(ξ + 1/2) = 1` +(`Daubechies.daubFun_bezout`) this gives the **quadrature mirror filter identity** + +`|m_0(ξ)|² + |m_0(ξ + 1/2)|² = 1` (`Daubechies.qmf`), + +and hence `|m_0(ξ)| ≤ 1` for every `ξ` (`Daubechies.norm_symbol_le_one`). Since `P ≥ 1` and +`cos(πξ) > 0` for `|ξ| < 1/2`, the symbol has no zeros in `(-1/2, 1/2)` +(`Daubechies.symbol_ne_zero`), while `m_0(1/2 + n) = 0` for every `n ∈ ℤ` +(`Daubechies.symbol_half_add_int`), where `z = -1`. The mask polynomial has real coefficients, +so `m_0(-ξ) = conj (m_0(ξ))` (`Daubechies.symbol_neg`). Finally `m_0` is Lipschitz at `0`: +`|m_0(ξ) - 1| ≤ π ∑_{k<2N} k |c_k| · |ξ|` (`Daubechies.norm_symbol_sub_one_le`), where the +constant `π ∑_{k<2N} k |c_k|` is `Daubechies.symbolLip`. The bound follows from +`m_0(ξ) - 1 = (1/2) ∑_k c_k (e^(-2πikξ) - 1)` and `|e^(-2πikξ) - 1| ≤ 2πk|ξ|`. +-/ + +@[expose] public section + +open Polynomial +open scoped Real ComplexConjugate + +namespace Daubechies + +/-! ### The point `e^(-2πiξ)` of the unit circle -/ + +/-- **The point `e^(-2πiξ)` of the unit circle.** The symbol of a mask is its mask polynomial +evaluated at `z = e^(-2πiξ)`; the sign of the exponent is the one of Mathlib's Fourier transform +`𝓕 f(ξ) = ∫ e^(-2πixξ) f(x) dx`. -/ +noncomputable def expFreq (ξ : ℝ) : ℂ := Complex.exp (((-(2 * π * ξ)) : ℝ) * Complex.I) + +/-- `|e^(-2πiξ)| = 1`. -/ +@[simp] +theorem norm_expFreq (ξ : ℝ) : ‖expFreq ξ‖ = 1 := + Complex.norm_exp_ofReal_mul_I _ + +/-- `e^(-2πiξ) ≠ 0`. -/ +theorem expFreq_ne_zero (ξ : ℝ) : expFreq ξ ≠ 0 := + Complex.exp_ne_zero _ + +/-- `e^(-2πiξ) = exp(cξ)` with the complex constant `c = -2πi`, the form in which `ξ` enters +linearly into the exponent. -/ +theorem expFreq_eq_exp_mul (ξ : ℝ) : expFreq ξ = Complex.exp (-(2 * π * Complex.I) * ξ) := by + rw [expFreq] + congr 1 + push_cast + ring + +/-- The real part of `e^(-2πiξ)` is `cos(2πξ)`. -/ +theorem expFreq_re (ξ : ℝ) : (expFreq ξ).re = Real.cos (2 * π * ξ) := by + rw [expFreq, Complex.exp_ofReal_mul_I_re, Real.cos_neg] + +/-- The imaginary part of `e^(-2πiξ)` is `-sin(2πξ)`. -/ +theorem expFreq_im (ξ : ℝ) : (expFreq ξ).im = -Real.sin (2 * π * ξ) := by + rw [expFreq, Complex.exp_ofReal_mul_I_im, Real.sin_neg] + +/-- `e^(-2πi · 0) = 1`. -/ +@[simp] +theorem expFreq_zero : expFreq 0 = 1 := by + simp [expFreq] + +/-- `e^(-2πi(ξ + η)) = e^(-2πiξ) e^(-2πiη)`. -/ +theorem expFreq_add (ξ η : ℝ) : expFreq (ξ + η) = expFreq ξ * expFreq η := by + rw [expFreq, expFreq, expFreq, ← Complex.exp_add] + congr 1 + push_cast + ring + +/-- `(e^(-2πiξ))^k = e^(-2πikξ)` for every `k ∈ ℕ`. -/ +theorem expFreq_pow (ξ : ℝ) (k : ℕ) : expFreq ξ ^ k = expFreq (k * ξ) := by + rw [expFreq, expFreq, ← Complex.exp_nat_mul] + congr 1 + push_cast + ring + +/-- `e^(-2πin) = 1` for every integer `n`. -/ +theorem expFreq_intCast (n : ℤ) : expFreq n = 1 := by + rw [expFreq, ← Complex.exp_int_mul_two_pi_mul_I (-n)] + congr 1 + push_cast + ring + +/-- `e^(-2πi) = 1`. -/ +theorem expFreq_one : expFreq 1 = 1 := by + simpa using expFreq_intCast 1 + +/-- `ξ ↦ e^(-2πiξ)` has period `1`. -/ +theorem expFreq_periodic : Function.Periodic expFreq 1 := fun ξ => by + rw [expFreq_add, expFreq_one, mul_one] + +/-- `e^(-2πi(1/2 + n)) = e^(-πi) = -1` for every integer `n`. -/ +theorem expFreq_half_add_int (n : ℤ) : expFreq (1 / 2 + n) = -1 := by + rw [expFreq_add, expFreq_intCast, mul_one, expFreq, + show (((-(2 * π * (1 / 2))) : ℝ) : ℂ) * Complex.I = -(π * Complex.I) by push_cast; ring] + exact Complex.exp_neg_pi_mul_I + +/-- `conj (e^(-2πiξ)) = e^(2πiξ) = e^(-2πi(-ξ))`. -/ +theorem conj_expFreq (ξ : ℝ) : conj (expFreq ξ) = expFreq (-ξ) := by + rw [expFreq, expFreq, ← Complex.exp_conj, map_mul, Complex.conj_ofReal, Complex.conj_I] + congr 1 + push_cast + ring + +/-- `ξ ↦ e^(-2πiξ)` is smooth: it is `C^n` for every `n`, including `n = ∞` and the analytic +case `n = ω`. -/ +theorem contDiff_expFreq {n : WithTop ℕ∞} : ContDiff ℝ n expFreq := + Complex.contDiff_exp.comp ((Complex.ofRealCLM.contDiff.comp + (contDiff_const.mul contDiff_id).neg).mul contDiff_const) + +/-- `ξ ↦ e^(-2πiξ)` is continuous. -/ +theorem continuous_expFreq : Continuous expFreq := + (contDiff_expFreq (n := 0)).continuous + +/-- `|e^(-2πiξ) - 1| ≤ 2π|ξ|`, from Mathlib's `Real.norm_exp_I_mul_ofReal_sub_one_le`: +`|e^(ix) - 1| ≤ |x|` for real `x`. -/ +theorem norm_expFreq_sub_one_le (ξ : ℝ) : ‖expFreq ξ - 1‖ ≤ 2 * π * |ξ| := by + rw [expFreq, mul_comm] + calc ‖Complex.exp (Complex.I * ((-(2 * π * ξ) : ℝ) : ℂ)) - 1‖ ≤ ‖(-(2 * π * ξ) : ℝ)‖ := + Real.norm_exp_I_mul_ofReal_sub_one_le + _ = 2 * π * |ξ| := by + rw [Real.norm_eq_abs, abs_neg, abs_mul, abs_mul, abs_two, abs_of_pos Real.pi_pos] + +/-- `|e^(-2πikξ) - 1| ≤ 2πk|ξ|` for every `k ∈ ℕ`. -/ +theorem norm_expFreq_pow_sub_one_le (ξ : ℝ) (k : ℕ) : + ‖expFreq ξ ^ k - 1‖ ≤ 2 * π * k * |ξ| := by + rw [expFreq_pow] + calc ‖expFreq (k * ξ) - 1‖ ≤ 2 * π * |k * ξ| := norm_expFreq_sub_one_le _ + _ = 2 * π * k * |ξ| := by rw [abs_mul, Nat.abs_cast]; ring + +/-- **The factor `(1 + z)/2` on the unit circle**: `(1 + e^(-2πiξ))/2 = e^(-πiξ) cos(πξ)`, since +`2 cos(πξ) = e^(πiξ) + e^(-πiξ)` (Mathlib's `Complex.two_cos`). -/ +theorem one_add_expFreq_div_two (ξ : ℝ) : + (1 + expFreq ξ) / 2 = expFreq (ξ / 2) * (Real.cos (π * ξ) : ℂ) := by + have h : expFreq (ξ / 2) * (2 * Complex.cos ((π * ξ : ℝ) : ℂ)) = 1 + expFreq ξ := by + rw [Complex.two_cos, mul_add, expFreq, expFreq, ← Complex.exp_add, ← Complex.exp_add] + congr 1 + · rw [← Complex.exp_zero] + congr 1 + push_cast + ring + · congr 1 + push_cast + ring + rw [Complex.ofReal_cos, ← h] + ring + +/-- `|(1 + e^(-2πiξ))/2| = |cos(πξ)|`. -/ +theorem norm_one_add_expFreq_div_two (ξ : ℝ) : + ‖(1 + expFreq ξ) / 2‖ = |Real.cos (π * ξ)| := by + rw [one_add_expFreq_div_two, norm_mul, norm_expFreq, one_mul, Complex.norm_real, + Real.norm_eq_abs] + +/-- `|(1 + e^(-2πiξ))/2|² = cos²(πξ)`. -/ +theorem normSq_one_add_expFreq_div_two (ξ : ℝ) : + ‖(1 + expFreq ξ) / 2‖ ^ 2 = Real.cos (π * ξ) ^ 2 := by + rw [norm_one_add_expFreq_div_two, sq_abs] + +/-! ### Masks -/ + +/-- **A Daubechies mask of order `N`**, given by its polynomial factor: a real polynomial `L` of +degree `< N` with `L(1) = 1` and `|L(e^(-2πiξ))|² = P(ξ) = P_N(sin²(πξ))` for every `ξ ∈ ℝ` +(`Daubechies.daubFun`). The mask polynomial is `m(z) = ((1 + z)/2)^N L(z)` +(`Daubechies.maskPoly`). Every mask has order `N ≥ 1` (`Daubechies.Mask.one_le`). -/ +structure Mask (N : ℕ) where + /-- The polynomial factor `L` of the mask. -/ + L : ℝ[X] + /-- `L` has degree `< N`, so that the mask polynomial has degree `< 2N`. -/ + natDegree_L_lt : L.natDegree < N + /-- `L(1) = 1`, which normalises the symbol to `m_0(0) = 1`. -/ + eval_L_one : L.eval 1 = 1 + /-- `|L(e^(-2πiξ))|² = P_N(sin²(πξ))` for every `ξ ∈ ℝ`. -/ + normSq_L : ∀ ξ : ℝ, ‖aeval (expFreq ξ) L‖ ^ 2 = daubFun N ξ + +/-- Every mask has order `N ≥ 1`: the degree of `L` is a natural number `< N`. -/ +theorem Mask.one_le {N : ℕ} (m : Mask N) : 1 ≤ N := by + have := m.natDegree_L_lt + omega + +variable {N : ℕ} (m : Mask N) + +/-! ### The mask polynomial and the filter coefficients -/ + +/-- **The mask polynomial** `m(z) = ((1 + z)/2)^N L(z)` of a mask of order `N`. -/ +noncomputable def maskPoly : ℝ[X] := (C (1 / 2 : ℝ) * (1 + X)) ^ N * m.L + +/-- **The filter coefficients** `c_k = 2 [z^k] m(z)` of a mask, for `k ∈ ℤ`: twice the +coefficients of the mask polynomial for `k ≥ 0`, and `0` for `k < 0`. They vanish outside +`0 ≤ k < 2N` (`Daubechies.coeff_eq_zero`) and add up to `2` (`Daubechies.sum_coeff`). -/ +noncomputable def coeff (k : ℤ) : ℝ := + if 0 ≤ k then 2 * (maskPoly m).coeff k.toNat else 0 + +/-- **The symbol** `m_0(ξ) = m(e^(-2πiξ))` of a mask, the mask polynomial evaluated on the unit +circle; it equals `(1/2) ∑_k c_k e^(-2πikξ)` (`Daubechies.symbol_eq_sum`). -/ +noncomputable def symbol (ξ : ℝ) : ℂ := aeval (expFreq ξ) (maskPoly m) + +/-- **The Lipschitz constant of the symbol at `0`**, `π ∑_{k < 2N} k |c_k|`: by +`Daubechies.norm_symbol_sub_one_le`, `|m_0(ξ) - 1| ≤ π ∑_k k |c_k| · |ξ|`. -/ +noncomputable def symbolLip : ℝ := + π * ∑ k ∈ Finset.range (2 * N), (k : ℝ) * |coeff m k| + +/-- The mask polynomial is divisible by `(z + 1)^N`: `m(z) = (z + 1)^N · 2^(-N) L(z)`. This is the +source of the sum rules of the filter coefficients. -/ +theorem X_add_one_pow_dvd_maskPoly : (X + 1) ^ N ∣ maskPoly m := + ⟨C (1 / 2 : ℝ) ^ N * m.L, by rw [maskPoly, mul_pow, add_comm X]; ring⟩ + +/-- The mask polynomial has degree `≤ 2N - 1`: `N` factors of degree `1` and `deg L ≤ N - 1`. -/ +theorem natDegree_maskPoly_le : (maskPoly m).natDegree ≤ 2 * N - 1 := by + have h1 : (C (1 / 2 : ℝ) * (1 + X)).natDegree ≤ 1 := + (natDegree_C_mul_le _ _).trans ((natDegree_add_le _ _).trans (by simp)) + have h2 : ((C (1 / 2 : ℝ) * (1 + X)) ^ N).natDegree ≤ N := by + simpa using natDegree_pow_le_of_le N h1 + have h3 := m.natDegree_L_lt + calc (maskPoly m).natDegree + ≤ ((C (1 / 2 : ℝ) * (1 + X)) ^ N).natDegree + m.L.natDegree := natDegree_mul_le + _ ≤ 2 * N - 1 := by omega + +/-- The mask polynomial has degree `< 2N`. -/ +theorem natDegree_maskPoly_lt : (maskPoly m).natDegree < 2 * N := by + have := natDegree_maskPoly_le m + have := m.one_le + omega + +/-- For `k ∈ ℕ` the filter coefficient is `c_k = 2 [z^k] m(z)`. -/ +theorem coeff_natCast (k : ℕ) : coeff m k = 2 * (maskPoly m).coeff k := by + simp [coeff] + +/-- The filter coefficients vanish outside `0 ≤ k < 2N`: for `k < 0` by definition, for +`k ≥ 2N` since the mask polynomial has degree `< 2N`. -/ +theorem coeff_eq_zero {k : ℤ} (hk : k < 0 ∨ 2 * (N : ℤ) ≤ k) : coeff m k = 0 := by + rcases hk with hk | hk + · simp only [coeff, not_le.2 hk, ↓reduceIte] + · lift k to ℕ using (by omega) + have := natDegree_maskPoly_lt m + rw [coeff_natCast, coeff_eq_zero_of_natDegree_lt (by omega), mul_zero] + +/-- `m(1) = 1`: `((1 + 1)/2)^N L(1) = 1`. -/ +theorem eval_one_maskPoly : (maskPoly m).eval 1 = 1 := by + norm_num [maskPoly, m.eval_L_one] + +/-- **The filter coefficients add up to `2`**: `∑_{k < 2N} c_k = 2 m(1) = 2`. -/ +theorem sum_coeff : ∑ k ∈ Finset.range (2 * N), coeff m k = 2 := by + have h := eval_eq_sum_range' (natDegree_maskPoly_lt m) (1 : ℝ) + simp only [eval_one_maskPoly, one_pow, mul_one] at h + simp only [coeff_natCast, ← Finset.mul_sum, ← h, mul_one] + +/-! ### The symbol -/ + +/-- The symbol factors as `m_0(ξ) = ((1 + e^(-2πiξ))/2)^N L(e^(-2πiξ))`. -/ +theorem symbol_eq_mul (ξ : ℝ) : + symbol m ξ = ((1 + expFreq ξ) / 2) ^ N * aeval (expFreq ξ) m.L := by + simp only [symbol, maskPoly, map_mul, map_pow, map_add, map_one, aeval_C, aeval_X, + Complex.coe_algebraMap] + congr 2 + push_cast + ring + +/-- **The symbol as a trigonometric polynomial**: +`m_0(ξ) = (1/2) ∑_{k < 2N} c_k e^(-2πikξ)`, with `e^(-2πikξ) = (e^(-2πiξ))^k`. -/ +theorem symbol_eq_sum (ξ : ℝ) : + symbol m ξ = 1 / 2 * ∑ k ∈ Finset.range (2 * N), (coeff m k : ℂ) * expFreq ξ ^ k := by + rw [symbol, aeval_eq_sum_range' (natDegree_maskPoly_lt m), Finset.mul_sum] + refine Finset.sum_congr rfl fun k _ => ?_ + rw [coeff_natCast, Complex.real_smul] + push_cast + ring + +/-- `m_0(0) = m(1) = 1`. -/ +theorem symbol_zero : symbol m 0 = 1 := by + rw [symbol, expFreq_zero, aeval_def, eval₂_at_one, eval_one_maskPoly, map_one] + +/-- **The squared modulus of the symbol**: `|m_0(ξ)|² = cos(πξ)^(2N) P(ξ)`, from +`|(1 + e^(-2πiξ))/2|² = cos²(πξ)` and `|L(e^(-2πiξ))|² = P(ξ)`. -/ +theorem normSq_symbol (ξ : ℝ) : + ‖symbol m ξ‖ ^ 2 = Real.cos (π * ξ) ^ (2 * N) * daubFun N ξ := by + rw [symbol_eq_mul, norm_mul, mul_pow, norm_pow, ← pow_mul, mul_comm N 2, pow_mul, + normSq_one_add_expFreq_div_two, m.normSq_L, ← pow_mul] + +/-- **The quadrature mirror filter identity** `|m_0(ξ)|² + |m_0(ξ + 1/2)|² = 1`: with +`cos(π(ξ + 1/2)) = -sin(πξ)` it is the trigonometric Bézout identity +`cos(πξ)^(2N) P(ξ) + sin(πξ)^(2N) P(ξ + 1/2) = 1` (`Daubechies.daubFun_bezout`). -/ +theorem qmf (ξ : ℝ) : ‖symbol m ξ‖ ^ 2 + ‖symbol m (ξ + 1 / 2)‖ ^ 2 = 1 := by + rw [normSq_symbol, normSq_symbol, show π * (ξ + 1 / 2) = π * ξ + π / 2 by ring, + Real.cos_add_pi_div_two, Even.neg_pow (even_two_mul N)] + exact daubFun_bezout m.one_le ξ + +/-- `|m_0(ξ)| ≤ 1`, from the quadrature mirror filter identity. -/ +theorem norm_symbol_le_one (ξ : ℝ) : ‖symbol m ξ‖ ≤ 1 := by + have h := qmf m ξ + nlinarith [norm_nonneg (symbol m ξ), sq_nonneg ‖symbol m (ξ + 1 / 2)‖] + +/-- The symbol has period `1`. -/ +theorem symbol_periodic : Function.Periodic (symbol m) 1 := fun ξ => by + rw [symbol, symbol, expFreq_periodic ξ] + +/-- `m_0(-ξ) = conj (m_0(ξ))`: the mask polynomial has real coefficients, and +`e^(-2πi(-ξ)) = conj (e^(-2πiξ))`. -/ +theorem symbol_neg (ξ : ℝ) : symbol m (-ξ) = conj (symbol m ξ) := by + have h := aeval_algHom_apply Complex.conjAe (expFreq ξ) (maskPoly m) + rw [Complex.conjAe_coe, conj_expFreq] at h + exact h + +/-- **The symbol has no zeros in `(-1/2, 1/2)`**: there `cos(πξ) > 0`, and `P(ξ) ≥ 1` +(`Daubechies.one_le_daubFun`), so `|m_0(ξ)|² = cos(πξ)^(2N) P(ξ) > 0`. -/ +theorem symbol_ne_zero {ξ : ℝ} (h : |ξ| < 1 / 2) : symbol m ξ ≠ 0 := by + have hcos : 0 < Real.cos (π * ξ) := by + apply Real.cos_pos_of_mem_Ioo + rw [abs_lt] at h + constructor <;> nlinarith [Real.pi_pos] + have hpos : 0 < ‖symbol m ξ‖ ^ 2 := by + rw [normSq_symbol] + exact mul_pos (pow_pos hcos _) (lt_of_lt_of_le one_pos (one_le_daubFun m.one_le ξ)) + intro h0 + rw [h0, norm_zero] at hpos + norm_num at hpos + +/-- `m_0(1/2 + n) = 0` for every integer `n`: there `e^(-2πiξ) = -1`, so the factor +`((1 + z)/2)^N` vanishes (`N ≥ 1`). -/ +theorem symbol_half_add_int (n : ℤ) : symbol m (1 / 2 + n) = 0 := by + have := m.one_le + rw [symbol_eq_mul, expFreq_half_add_int, add_neg_cancel, zero_div, zero_pow (by omega), + zero_mul] + +/-- `m_0(1/2) = 0`. -/ +theorem symbol_half : symbol m (1 / 2) = 0 := by + simpa using symbol_half_add_int m 0 + +/-- The constant `π ∑_k k |c_k|` is nonnegative. -/ +theorem symbolLip_nonneg : 0 ≤ symbolLip m := + mul_nonneg Real.pi_pos.le + (Finset.sum_nonneg fun k _ => mul_nonneg (Nat.cast_nonneg k) (abs_nonneg _)) + +/-- **The symbol is Lipschitz at `0`**: `|m_0(ξ) - 1| ≤ π ∑_k k |c_k| · |ξ|`. Since +`∑_k c_k = 2`, `m_0(ξ) - 1 = (1/2) ∑_k c_k (e^(-2πikξ) - 1)`, and +`|e^(-2πikξ) - 1| ≤ 2πk|ξ|`. -/ +theorem norm_symbol_sub_one_le (ξ : ℝ) : ‖symbol m ξ - 1‖ ≤ symbolLip m * |ξ| := by + have hsum : ∑ k ∈ Finset.range (2 * N), (coeff m k : ℂ) = 2 := by + exact_mod_cast sum_coeff m + have h : symbol m ξ - 1 = + 1 / 2 * ∑ k ∈ Finset.range (2 * N), (coeff m k : ℂ) * (expFreq ξ ^ k - 1) := by + simp only [symbol_eq_sum, mul_sub, mul_one, Finset.sum_sub_distrib, hsum] + ring + have hhalf : ‖(1 / 2 : ℂ)‖ = 1 / 2 := by norm_num + rw [h, norm_mul, hhalf] + calc 1 / 2 * ‖∑ k ∈ Finset.range (2 * N), (coeff m k : ℂ) * (expFreq ξ ^ k - 1)‖ + ≤ 1 / 2 * ∑ k ∈ Finset.range (2 * N), |coeff m k| * (2 * π * k * |ξ|) := by + gcongr + refine (norm_sum_le _ _).trans (Finset.sum_le_sum fun k _ => ?_) + rw [norm_mul, Complex.norm_real, Real.norm_eq_abs] + exact mul_le_mul_of_nonneg_left (norm_expFreq_pow_sub_one_le ξ k) (abs_nonneg _) + _ = symbolLip m * |ξ| := by + rw [symbolLip, Finset.mul_sum, Finset.mul_sum, Finset.sum_mul] + refine Finset.sum_congr rfl fun k _ => ?_ + ring + +/-- **The symbol is smooth**: `C^n` for every `n`, including `n = ∞` and the analytic case +`n = ω`, as a polynomial (Mathlib's `Polynomial.contDiff_aeval`) composed with the smooth map +`ξ ↦ e^(-2πiξ)`. -/ +theorem contDiff_symbol {n : WithTop ℕ∞} : ContDiff ℝ n (symbol m) := + (((maskPoly m).contDiff_aeval n).restrict_scalars ℝ).comp contDiff_expFreq + +/-- The symbol is continuous. -/ +theorem continuous_symbol : Continuous (symbol m) := + (contDiff_symbol m (n := 0)).continuous + +end Daubechies diff --git a/LeanPool/FunctionSpaces/Wavelets/Examples/Daubechies/MaskExistence.lean b/LeanPool/FunctionSpaces/Wavelets/Examples/Daubechies/MaskExistence.lean new file mode 100644 index 0000000000..fd4a6232ac --- /dev/null +++ b/LeanPool/FunctionSpaces/Wavelets/Examples/Daubechies/MaskExistence.lean @@ -0,0 +1,268 @@ +/- +Copyright (c) 2026 Mario Ullrich. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Mario Ullrich +-/ +module + +public import LeanPool.FunctionSpaces.Wavelets.Examples.Daubechies.D4 +public import LeanPool.FunctionSpaces.Wavelets.Examples.Daubechies.FejerRiesz + +/- +Modified for Lean Pool: module names and imports adapted. +-/ + +/-! +# Daubechies masks of every order + +For every `N ≥ 1` there is a Daubechies mask of order `N` (`Daubechies.exists_mask`), so +`Nonempty (Mask N) ↔ 1 ≤ N` (`Daubechies.nonempty_mask_iff`). The polynomial factor `L` of the +mask comes from the Fejér–Riesz theorem (`Polynomial.fejer_riesz_outer`), applied to the +Daubechies polynomial in the variable `cos θ`, + +`Q_N(t) = P_N((1 - t)/2)` (`Daubechies.daubCosPoly`). + +Since `(1 - cos θ)/2 = sin²(θ/2)`, `Q_N(cos 2πξ) = P_N(sin²(πξ)) = P(ξ)` +(`Daubechies.eval_daubCosPoly_cos_two_pi_mul`). For `t ∈ [-1, 1]` the point `(1 - t)/2` lies in +`[0, 1]`, where `P_N ≥ 1`, so `Q_N > 0` on `[-1, 1]` (`Daubechies.eval_daubCosPoly_pos`), and +`deg Q_N ≤ N - 1` (`Daubechies.natDegree_daubCosPoly_le`). The Fejér–Riesz theorem gives a real +polynomial `L` with `deg L ≤ N - 1`, `L(1) > 0`, no zeros in the closed unit disk, and +`|L(e^{iθ})|² = Q_N(cos θ)` for all `θ ∈ ℝ`. At `θ = -2πξ` this is the mask identity +`|L(e^(-2πiξ))|² = P(ξ)`, and at `θ = 0` it reads `L(1)² = Q_N(1) = P_N(0) = 1`, so `L(1) = 1` +(`Daubechies.Mask.ofNormSqCos`). + +The mask chosen in this way is `Daubechies.daubMask`; its polynomial factor has no zeros in the +closed unit disk (`Daubechies.aeval_daubMask_L_ne_zero`). For `N = 2` this property singles out +D4: the polynomial factor of a mask of order `2` is `L(z) = α + βz` with `α + β = 1` and +`(α - β)² = 3` (`Daubechies.Mask.exists_L_eq_of_two`), and of the two solutions only +`α = (1 + √3)/2`, `β = (1 - √3)/2` has its root `2 + √3` outside the disk +(`Daubechies.eq_d4_iff_aeval_ne_zero`). Hence the Fejér–Riesz construction reproduces D4 +(`Daubechies.daubMask_two`). +-/ + +@[expose] public section + +open Polynomial +open scoped Real + +namespace Daubechies + +/-! ### The Daubechies polynomial in the variable `cos θ` -/ + +/-- **The Daubechies polynomial in the variable `cos θ`**: `Q_N(t) = P_N((1 - t)/2)`, with the +Daubechies polynomial `P_N` (`Daubechies.daubPoly`). Since `(1 - cos θ)/2 = sin²(θ/2)`, it +satisfies `Q_N(cos θ) = P_N(sin²(θ/2))` (`Daubechies.eval_daubCosPoly_cos`), in particular +`Q_N(cos 2πξ) = P(ξ)` (`Daubechies.eval_daubCosPoly_cos_two_pi_mul`). -/ +noncomputable def daubCosPoly (N : ℕ) : ℝ[X] := (daubPoly N).comp (C (1 / 2 : ℝ) * (1 - X)) + +/-- The value of `Q_N` at a real number `t`: `Q_N(t) = P_N((1 - t)/2)`. -/ +theorem eval_daubCosPoly (N : ℕ) (t : ℝ) : + (daubCosPoly N).eval t = (daubPoly N).eval ((1 - t) / 2) := by + rw [daubCosPoly, eval_comp] + congr 1 + simp only [eval_mul, eval_C, eval_sub, eval_one, eval_X] + ring + +/-- `Q_N` has degree at most `N - 1`, the degree bound of `P_N`: substituting the linear +polynomial `(1 - X)/2` does not raise the degree (Mathlib's `Polynomial.natDegree_comp_le`). -/ +theorem natDegree_daubCosPoly_le (N : ℕ) : (daubCosPoly N).natDegree ≤ N - 1 := by + have h : (C (1 / 2 : ℝ) * (1 - X)).natDegree ≤ 1 := + (natDegree_C_mul_le _ _).trans (by compute_degree) + calc (daubCosPoly N).natDegree + ≤ (daubPoly N).natDegree * (C (1 / 2 : ℝ) * (1 - X)).natDegree := natDegree_comp_le + _ ≤ (N - 1) * 1 := Nat.mul_le_mul (natDegree_daubPoly_le N) h + _ = N - 1 := mul_one _ + +/-- `Q_N(t) ≥ 1` for `t ≤ 1` and `N ≥ 1`: then `(1 - t)/2 ≥ 0`, where `P_N ≥ 1` +(`Daubechies.one_le_eval_daubPoly`). -/ +theorem one_le_eval_daubCosPoly {N : ℕ} (hN : 1 ≤ N) {t : ℝ} (ht : t ≤ 1) : + 1 ≤ (daubCosPoly N).eval t := by + rw [eval_daubCosPoly] + exact one_le_eval_daubPoly hN (by linarith) + +/-- `Q_N(t) > 0` for every `t ∈ [-1, 1]` and `N ≥ 1` (`Daubechies.one_le_eval_daubCosPoly`), +the hypothesis of the Fejér–Riesz theorem. -/ +theorem eval_daubCosPoly_pos {N : ℕ} (hN : 1 ≤ N) : + ∀ t ∈ Set.Icc (-1 : ℝ) 1, 0 < (daubCosPoly N).eval t := fun _ ht => + one_pos.trans_le (one_le_eval_daubCosPoly hN ht.2) + +/-- `Q_N(1) = P_N(0) = 1` for `N ≥ 1`. -/ +theorem eval_one_daubCosPoly {N : ℕ} (hN : 1 ≤ N) : (daubCosPoly N).eval 1 = 1 := by + rw [eval_daubCosPoly, sub_self, zero_div, eval_zero_daubPoly hN] + +/-- **`Q_N` at the cosines**: `Q_N(cos θ) = P_N(sin²(θ/2))` for every `θ ∈ ℝ`, since +`cos θ = 1 - 2 sin²(θ/2)` (Mathlib's `Real.cos_two_mul_eq_one_sub`). -/ +theorem eval_daubCosPoly_cos (N : ℕ) (θ : ℝ) : + (daubCosPoly N).eval (Real.cos θ) = (daubPoly N).eval (Real.sin (θ / 2) ^ 2) := by + have h := Real.cos_two_mul_eq_one_sub (θ / 2) + rw [mul_div_cancel₀ θ two_ne_zero] at h + rw [eval_daubCosPoly, h] + congr 1 + ring + +/-- `Q_N(cos 2πξ) = P_N(sin²(πξ)) = P(ξ)` for every `ξ ∈ ℝ`, with the trigonometric Daubechies +polynomial `P` (`Daubechies.daubFun`). -/ +theorem eval_daubCosPoly_cos_two_pi_mul (N : ℕ) (ξ : ℝ) : + (daubCosPoly N).eval (Real.cos (2 * π * ξ)) = daubFun N ξ := by + rw [eval_daubCosPoly_cos, daubFun, show 2 * π * ξ / 2 = π * ξ by ring] + +/-! ### Masks from the Fejér–Riesz theorem -/ + +/-- **Normalisation at `1`.** For `N ≥ 1`, a real polynomial `L` with `L(1) > 0` and +`|L(e^{iθ})|² = Q_N(cos θ)` for all `θ ∈ ℝ` has `L(1) = 1`: at `θ = 0` the identity reads +`L(1)² = Q_N(1) = 1` (`Polynomial.eval_one_sq_of_norm_aeval_exp_sq`). -/ +theorem eval_one_eq_one_of_norm_aeval_exp_sq {N : ℕ} (hN : 1 ≤ N) {L : ℝ[X]} + (hpos : 0 < L.eval 1) + (hL : ∀ θ : ℝ, ‖aeval (Complex.exp ((θ : ℂ) * Complex.I)) L‖ ^ 2 = + (daubCosPoly N).eval (Real.cos θ)) : + L.eval 1 = 1 := by + have h := eval_one_sq_of_norm_aeval_exp_sq hL + rw [eval_one_daubCosPoly hN] at h + nlinarith + +/-- **From the cosine form to the mask form.** If `|L(e^{iθ})|² = Q_N(cos θ)` for all `θ ∈ ℝ`, +then `|L(e^(-2πiξ))|² = P(ξ) = P_N(sin²(πξ))` for all `ξ ∈ ℝ`: for `θ = -2πξ` the point +`e^{iθ}` is `e^(-2πiξ)` (`Daubechies.expFreq`), and `Q_N(cos(-2πξ)) = Q_N(cos 2πξ) = P(ξ)` +(`Daubechies.eval_daubCosPoly_cos_two_pi_mul`). -/ +theorem normSq_aeval_expFreq_of_norm_aeval_exp_sq {N : ℕ} {L : ℝ[X]} + (hL : ∀ θ : ℝ, ‖aeval (Complex.exp ((θ : ℂ) * Complex.I)) L‖ ^ 2 = + (daubCosPoly N).eval (Real.cos θ)) (ξ : ℝ) : + ‖aeval (expFreq ξ) L‖ ^ 2 = daubFun N ξ := by + rw [expFreq, hL, Real.cos_neg, eval_daubCosPoly_cos_two_pi_mul] + +/-- **A mask from the cosine form.** A real polynomial `L` with `deg L < N`, `L(1) > 0` and +`|L(e^{iθ})|² = Q_N(cos θ)` for all `θ ∈ ℝ` is the polynomial factor of a Daubechies mask of +order `N`: `L(1) = 1` by `Daubechies.eval_one_eq_one_of_norm_aeval_exp_sq` (here `N ≥ 1`, since +`0 ≤ deg L < N`), and `|L(e^(-2πiξ))|² = P(ξ)` by +`Daubechies.normSq_aeval_expFreq_of_norm_aeval_exp_sq`. -/ +def Mask.ofNormSqCos {N : ℕ} (L : ℝ[X]) (hdeg : L.natDegree < N) (hpos : 0 < L.eval 1) + (hL : ∀ θ : ℝ, ‖aeval (Complex.exp ((θ : ℂ) * Complex.I)) L‖ ^ 2 = + (daubCosPoly N).eval (Real.cos θ)) : Mask N where + L := L + natDegree_L_lt := hdeg + eval_L_one := eval_one_eq_one_of_norm_aeval_exp_sq (by omega) hpos hL + normSq_L := normSq_aeval_expFreq_of_norm_aeval_exp_sq hL + +/-! ### Existence -/ + +/-- **Existence of outer Daubechies masks.** For every `N ≥ 1` there is a Daubechies mask of +order `N` whose polynomial factor `L` has no zeros in the closed unit disk. Apply the +Fejér–Riesz theorem with an outer factor (`Polynomial.fejer_riesz_outer`) to `Q_N`, which is +positive on `[-1, 1]` (`Daubechies.eval_daubCosPoly_pos`) and of degree `≤ N - 1` +(`Daubechies.natDegree_daubCosPoly_le`): it gives `L` with `deg L ≤ N - 1`, `L(1) > 0`, no +zeros in the closed unit disk and `|L(e^{iθ})|² = Q_N(cos θ)`, a mask by +`Daubechies.Mask.ofNormSqCos`. -/ +theorem exists_mask_outer {N : ℕ} (hN : 1 ≤ N) : + ∃ m : Mask N, ∀ z : ℂ, ‖z‖ ≤ 1 → aeval z m.L ≠ 0 := by + obtain ⟨L, hdeg, hpos, hne, hL⟩ := fejer_riesz_outer (eval_daubCosPoly_pos hN) + have hlt : L.natDegree < N := by + have := natDegree_daubCosPoly_le N + omega + exact ⟨Mask.ofNormSqCos L hlt hpos hL, hne⟩ + +/-- **Existence of Daubechies masks of every order** `N ≥ 1` (`Daubechies.exists_mask_outer`). -/ +theorem exists_mask {N : ℕ} (hN : 1 ≤ N) : Nonempty (Mask N) := by + obtain ⟨m, -⟩ := exists_mask_outer hN + exact ⟨m⟩ + +/-- There is a Daubechies mask of order `N` exactly when `N ≥ 1` (`Daubechies.exists_mask`, +`Daubechies.Mask.one_le`). -/ +theorem nonempty_mask_iff {N : ℕ} : Nonempty (Mask N) ↔ 1 ≤ N := + ⟨fun ⟨m⟩ => m.one_le, exists_mask⟩ + +/-- **The Daubechies mask of order `N`**, for `N ≥ 1`: a mask chosen among those whose +polynomial factor `L` has no zeros in the closed unit disk (`Daubechies.exists_mask_outer`, +`Daubechies.aeval_daubMask_L_ne_zero`), the minimum-phase choice of signal processing. For +`N = 2` it is the mask D4 (`Daubechies.daubMask_two`). -/ +noncomputable def daubMask {N : ℕ} (hN : 1 ≤ N) : Mask N := (exists_mask_outer hN).choose + +/-- The polynomial factor of the Daubechies mask `Daubechies.daubMask` has no zeros in the +closed unit disk: `L(z) ≠ 0` for every `z ∈ ℂ` with `|z| ≤ 1`. -/ +theorem aeval_daubMask_L_ne_zero {N : ℕ} (hN : 1 ≤ N) {z : ℂ} (hz : ‖z‖ ≤ 1) : + aeval z (daubMask hN).L ≠ 0 := + (exists_mask_outer hN).choose_spec z hz + +/-! ### Order `2`: the mask D4 -/ + +/-- Two masks of the same order with the same polynomial factor `L` are equal: the other fields +of `Daubechies.Mask` are properties of `L`. -/ +@[ext] +theorem Mask.ext {N : ℕ} {m₁ m₂ : Mask N} (h : m₁.L = m₂.L) : m₁ = m₂ := by + cases m₁ + cases m₂ + cases h + rfl + +/-- **The polynomial factor of D4 has no zeros in the closed unit disk**: the root of +`L(z) = (1 + √3)/2 + ((1 - √3)/2) z` is `z = (1 + √3)/(√3 - 1) = 2 + √3 > 1`. -/ +theorem aeval_d4_L_ne_zero {z : ℂ} (hz : ‖z‖ ≤ 1) : aeval z d4.L ≠ 0 := by + have h3 : √3 ^ 2 = 3 := Real.sq_sqrt (by norm_num) + have h1 : 1 < √3 := by nlinarith [Real.sqrt_nonneg 3] + rw [d4_L, map_add, map_mul, aeval_C, aeval_C, aeval_X, Complex.coe_algebraMap] + intro h + have h' : (((1 - √3) / 2 : ℝ) : ℂ) * z = -(((1 + √3) / 2 : ℝ) : ℂ) := by + linear_combination h + have hn := congrArg norm h' + rw [norm_neg, norm_mul, Complex.norm_real, Complex.norm_real, Real.norm_eq_abs, + Real.norm_eq_abs, abs_of_neg (show (1 - √3) / 2 < 0 by linarith), + abs_of_pos (show 0 < (1 + √3) / 2 by linarith)] at hn + nlinarith [mul_nonneg (sub_nonneg.2 h1.le) (sub_nonneg.2 hz)] + +/-- **The polynomial factor of a mask of order `2`** is `L(z) = α + βz` with real `α, β` such +that `α + β = 1` and `(α - β)² = 3`. The degree of `L` is `≤ 1` (Mathlib's +`Polynomial.exists_eq_X_add_C_of_natDegree_le_one`); `α + β = L(1) = 1`; and at `ξ = 1/2` the +mask identity `α² + β² + 2αβ cos(2πξ) = P(ξ) = 2 - cos(2πξ)` (`Daubechies.normSq_add_mul_expFreq`, +`Daubechies.daubFun_two_eq_two_sub_cos`) reads `(α - β)² = 3`. -/ +theorem Mask.exists_L_eq_of_two (m : Mask 2) : + ∃ α β : ℝ, m.L = C α + C β * X ∧ α + β = 1 ∧ (α - β) ^ 2 = 3 := by + obtain ⟨β, α, hL⟩ := exists_eq_X_add_C_of_natDegree_le_one + (show m.L.natDegree ≤ 1 by have := m.natDegree_L_lt; omega) + rw [add_comm] at hL + refine ⟨α, β, hL, ?_, ?_⟩ + · have h := m.eval_L_one + rw [hL] at h + simpa only [eval_add, eval_C, eval_mul, eval_X, mul_one] using h + · have h := m.normSq_L (1 / 2) + rw [hL, map_add, map_mul, aeval_C, aeval_C, aeval_X, Complex.coe_algebraMap, + normSq_add_mul_expFreq, daubFun_two_eq_two_sub_cos, + show 2 * π * (1 / 2) = π by ring, Real.cos_pi] at h + linear_combination h + +/-- **The outer mask of order `2` is D4.** A mask of order `2` whose polynomial factor has no +zeros in the closed unit disk is the mask D4. By `Daubechies.Mask.exists_L_eq_of_two`, +`L(z) = α + βz` with `α + β = 1` and `α - β = ±√3`. The sign `-` gives `α = (1 - √3)/2`, +`β = (1 + √3)/2`, and then `L` has the root `2 - √3` in the disk; the sign `+` gives the +coefficients `α = (1 + √3)/2`, `β = (1 - √3)/2` of D4. -/ +theorem eq_d4_of_aeval_ne_zero (m : Mask 2) (hm : ∀ z : ℂ, ‖z‖ ≤ 1 → aeval z m.L ≠ 0) : + m = d4 := by + obtain ⟨α, β, hL, hsum, hsq⟩ := m.exists_L_eq_of_two + have h3 : √3 ^ 2 = 3 := Real.sq_sqrt (by norm_num) + have h1 : 1 < √3 := by nlinarith [Real.sqrt_nonneg 3] + have h2 : √3 < 2 := by nlinarith [Real.sqrt_nonneg 3] + rcases sq_eq_sq_iff_eq_or_eq_neg.1 (hsq.trans h3.symm) with h | h + · refine Mask.ext ?_ + rw [hL, d4_L, show α = (1 + √3) / 2 by linarith, show β = (1 - √3) / 2 by linarith] + · refine absurd ?_ (hm ((2 - √3 : ℝ) : ℂ) ?_) + · rw [hL, Complex.aeval_ofReal, Complex.ofReal_eq_zero] + simp only [eval_add, eval_C, eval_mul, eval_X] + rw [show α = (1 - √3) / 2 by linarith, show β = (1 + √3) / 2 by linarith] + linear_combination (-1 / 2 : ℝ) * h3 + · rw [Complex.norm_real, Real.norm_eq_abs, abs_le] + constructor <;> linarith + +/-- **D4 is the outer mask of order `2`**: a mask of order `2` is D4 exactly when its polynomial +factor has no zeros in the closed unit disk (`Daubechies.eq_d4_of_aeval_ne_zero`, +`Daubechies.aeval_d4_L_ne_zero`). -/ +theorem eq_d4_iff_aeval_ne_zero (m : Mask 2) : + m = d4 ↔ ∀ z : ℂ, ‖z‖ ≤ 1 → aeval z m.L ≠ 0 := by + refine ⟨?_, eq_d4_of_aeval_ne_zero m⟩ + rintro rfl + exact fun _ hz => aeval_d4_L_ne_zero hz + +/-- **The Daubechies mask of order `2` is D4**: the mask chosen by the Fejér–Riesz construction +is the mask D4, with the polynomial factor `L(z) = (1 + √3)/2 + ((1 - √3)/2) z` +(`Daubechies.eq_d4_of_aeval_ne_zero`). -/ +theorem daubMask_two (h : 1 ≤ 2) : daubMask h = d4 := + eq_d4_of_aeval_ne_zero _ fun _ hz => aeval_daubMask_L_ne_zero h hz + +end Daubechies diff --git a/LeanPool/FunctionSpaces/Wavelets/Examples/Daubechies/MatrixMethod.lean b/LeanPool/FunctionSpaces/Wavelets/Examples/Daubechies/MatrixMethod.lean new file mode 100644 index 0000000000..96d8fefb84 --- /dev/null +++ b/LeanPool/FunctionSpaces/Wavelets/Examples/Daubechies/MatrixMethod.lean @@ -0,0 +1,347 @@ +/- +Copyright (c) 2026 Mario Ullrich. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Mario Ullrich +-/ +module + +public import Mathlib.Analysis.SpecialFunctions.Pow.Real + +/- +Modified for Lean Pool: module names and imports adapted. +-/ + +/-! +# The dyadic descent of the matrix method + +The matrix method of Daubechies–Lagarias proves Hölder continuity of a refinable function from a +recursion on the two halves of `[0, 1)`. This file contains the method in a scalar form, for +functions `A, B : ℝ → E` with values in a seminormed group, and the passage from oscillation +bounds on dyadic intervals to a Hölder estimate. The file +`FunctionSpaces.Wavelets.Examples.Daubechies.MatrixMethodD4` applies it to the scaling function +of D4. + +The dyadic intervals of level `n` in `[0, 1)` are `I_{n,k} = [k/2^n, (k+1)/2^n)`, `0 ≤ k < 2^n`. +For `k < 2^(n+1)` and `d = ⌊k/2^n⌋ ∈ {0, 1}` the interval `I_{n+1,k}` lies in the half +`[d/2, (d+1)/2)`, and `x ↦ 2x - d` maps it onto `I_{n,r}` with `r = k mod 2^n` +(`Daubechies.mem_Ico_half_of_mem_dyadic`, `Daubechies.two_mul_sub_mem_dyadic`). + +* **Halving recursion.** If `A` has oscillation at most `E_A` on `[0, 1)` and + `‖A(x) - A(y)‖ ≤ ‖A(2x - d) - A(2y - d)‖/2` for `x, y` in the half `[d/2, (d+1)/2)`, then + `‖A(x) - A(y)‖ ≤ E_A/2^n` for `x, y` in one interval `I_{n,k}` + (`Daubechies.norm_sub_le_of_halving`). +* **Triangular recursion.** If moreover `B` has oscillation at most `E_B` on `[0, 1)`, + `‖B(x) - B(y)‖ ≤ β ‖A(2x - d) - A(2y - d)‖ + ρ ‖B(2x - d) - B(2y - d)‖` on the halves with + `β, ρ ≥ 0`, and `β E_A ≤ (ρ - 1/2) C`, then `‖B(x) - B(y)‖ ≤ ρ^n (E_B + C) - C/2^n` for `x, y` + in one interval `I_{n,k}` (`Daubechies.norm_sub_le_of_triangular`). The pair of differences + follows a lower triangular recursion with diagonal `(1/2, ρ)`, and for `ρ > 1/2` its rate is + `ρ^n`. +* **Hölder estimate.** Let `f : ℝ → E` be continuous and bounded with + `‖f(x + i) - f(y + i)‖ ≤ C ρ^n` for every integer `i` and all `x, y` in one interval `I_{n,k}`. + By continuity the bound holds on the closed intervals `[k/2^n, (k+1)/2^n]`, `k ∈ ℤ` + (`Daubechies.norm_sub_le_of_forall_Ico`, `Daubechies.norm_sub_le_of_unit_dyadic`); two points + at distance at most `2^(-n)` lie in one closed interval or in two adjacent ones + (`Daubechies.norm_sub_le_of_adjacent_dyadic`). For `0 ≤ ρ ≤ 2^(-a)` with `a ≥ 0`, the level `n` + with `2^(-(n+1)) < |x - y| ≤ 2^(-n)` gives `‖f(x) - f(y)‖ ≤ K |x - y|^a` + (`Daubechies.exists_holder_of_dyadic`, `Daubechies.exists_holder_of_unit_dyadic`). +-/ + +@[expose] public section + +open Set + +namespace Daubechies + +/-! ### The dyadic descent -/ + +section DyadicDescent + +variable {E : Type*} [SeminormedAddCommGroup E] + +/-- **The parent half of a dyadic interval**: for `n, k ∈ ℕ` put `d = ⌊k / 2^n⌋` (natural +division). Every point `x` of the dyadic interval `[k/2^(n+1), (k+1)/2^(n+1))` lies in the half +`[d/2, (d+1)/2)`. -/ +theorem mem_Ico_half_of_mem_dyadic {n k : ℕ} {x : ℝ} + (hx : x ∈ Ico ((k : ℝ) / 2 ^ (n + 1)) ((k + 1) / 2 ^ (n + 1))) : + x ∈ Ico (((k / 2 ^ n : ℕ) : ℝ) / 2) ((((k / 2 ^ n : ℕ) : ℝ) + 1) / 2) := by + have hk : (k : ℝ) = 2 ^ n * ((k / 2 ^ n : ℕ) : ℝ) + ((k % 2 ^ n : ℕ) : ℝ) := by + exact_mod_cast (Nat.div_add_mod k (2 ^ n)).symm + have hr : ((k % 2 ^ n : ℕ) : ℝ) + 1 ≤ 2 ^ n := by + exact_mod_cast Nat.mod_lt k (by positivity) + have hr0 : (0 : ℝ) ≤ ((k % 2 ^ n : ℕ) : ℝ) := Nat.cast_nonneg _ + have h2 : (0 : ℝ) < 2 ^ n := by positivity + rw [mem_Ico, pow_succ, div_le_iff₀ (by positivity), lt_div_iff₀ (by positivity)] at hx + rw [mem_Ico, div_le_iff₀ two_pos, lt_div_iff₀ two_pos] + constructor <;> nlinarith + +/-- **The doubling map on a dyadic interval**: for `n, k ∈ ℕ` put `d = ⌊k / 2^n⌋` and +`r = k mod 2^n`, so that `k = 2^n d + r`. The map `x ↦ 2x - d` sends the dyadic interval +`[k/2^(n+1), (k+1)/2^(n+1))` of level `n + 1` onto the dyadic interval `[r/2^n, (r+1)/2^n)` of +level `n`. -/ +theorem two_mul_sub_mem_dyadic {n k : ℕ} {x : ℝ} + (hx : x ∈ Ico ((k : ℝ) / 2 ^ (n + 1)) ((k + 1) / 2 ^ (n + 1))) : + 2 * x - ((k / 2 ^ n : ℕ) : ℝ) ∈ + Ico (((k % 2 ^ n : ℕ) : ℝ) / 2 ^ n) ((((k % 2 ^ n : ℕ) : ℝ) + 1) / 2 ^ n) := by + have hk : (k : ℝ) = 2 ^ n * ((k / 2 ^ n : ℕ) : ℝ) + ((k % 2 ^ n : ℕ) : ℝ) := by + exact_mod_cast (Nat.div_add_mod k (2 ^ n)).symm + have h2 : (0 : ℝ) < 2 ^ n := by positivity + rw [mem_Ico, pow_succ, div_le_iff₀ (by positivity), lt_div_iff₀ (by positivity)] at hx + rw [mem_Ico, div_le_iff₀ h2, lt_div_iff₀ h2] + constructor <;> nlinarith + +/-- A dyadic interval `[k/2^n, (k+1)/2^n)` with `k < 2^n` lies in `[0, 1)`. -/ +theorem mem_Ico_zero_one_of_mem_dyadic {n k : ℕ} (hk : k < 2 ^ n) {x : ℝ} + (hx : x ∈ Ico ((k : ℝ) / 2 ^ n) ((k + 1) / 2 ^ n)) : x ∈ Ico (0 : ℝ) 1 := by + have h2 : (0 : ℝ) < 2 ^ n := by positivity + have hk' : (k : ℝ) + 1 ≤ 2 ^ n := by exact_mod_cast hk + rw [mem_Ico, div_le_iff₀ h2, lt_div_iff₀ h2] at hx + constructor <;> nlinarith [(Nat.cast_nonneg k : (0 : ℝ) ≤ k)] + +/-- The index of the parent half: for `k < 2^(n+1)`, `d = ⌊k / 2^n⌋` is `0` or `1`. -/ +theorem div_two_pow_lt_two {n k : ℕ} (hk : k < 2 ^ (n + 1)) : k / 2 ^ n < 2 := + (Nat.div_lt_iff_lt_mul (by positivity)).2 (by rwa [pow_succ'] at hk) + +/-- **Dyadic descent for a halving recursion.** Let `A : ℝ → E` have oscillation at most `E_A` +on `[0, 1)` and satisfy, on each half `[d/2, (d+1)/2)` (`d ∈ {0, 1}`), +`‖A(x) - A(y)‖ ≤ ‖A(2x - d) - A(2y - d)‖ / 2`. Then for all `x, y` in one dyadic interval +`[k/2^n, (k+1)/2^n)` of level `n` inside `[0, 1)` (that is, `k < 2^n`), +`‖A(x) - A(y)‖ ≤ E_A / 2^n`. By induction on `n`: the doubling map `x ↦ 2x - d` sends a dyadic +interval of level `n + 1` onto one of level `n` (`Daubechies.two_mul_sub_mem_dyadic`). -/ +theorem norm_sub_le_of_halving {A : ℝ → E} {EA : ℝ} + (hE : ∀ x ∈ Ico (0 : ℝ) 1, ∀ y ∈ Ico (0 : ℝ) 1, ‖A x - A y‖ ≤ EA) + (hA : ∀ d : ℕ, d < 2 → ∀ x ∈ Ico ((d : ℝ) / 2) ((d + 1) / 2), + ∀ y ∈ Ico ((d : ℝ) / 2) ((d + 1) / 2), ‖A x - A y‖ ≤ ‖A (2 * x - d) - A (2 * y - d)‖ / 2) + (n : ℕ) {k : ℕ} (hk : k < 2 ^ n) {x y : ℝ} (hx : x ∈ Ico ((k : ℝ) / 2 ^ n) ((k + 1) / 2 ^ n)) + (hy : y ∈ Ico ((k : ℝ) / 2 ^ n) ((k + 1) / 2 ^ n)) : ‖A x - A y‖ ≤ EA / 2 ^ n := by + induction n generalizing k x y with + | zero => + obtain rfl : k = 0 := by simpa using hk + simpa using hE x (by simpa using hx) y (by simpa using hy) + | succ n ih => + have h := hA _ (div_two_pow_lt_two hk) x (mem_Ico_half_of_mem_dyadic hx) y + (mem_Ico_half_of_mem_dyadic hy) + have h' := ih (Nat.mod_lt k (by positivity)) (two_mul_sub_mem_dyadic hx) + (two_mul_sub_mem_dyadic hy) + calc ‖A x - A y‖ ≤ EA / 2 ^ n / 2 := h.trans (by gcongr) + _ = EA / 2 ^ (n + 1) := by rw [pow_succ, div_div] + +/-- **Dyadic descent for a triangular recursion.** Let `A, B : ℝ → E`, where `A` satisfies the +level bounds `‖A(x) - A(y)‖ ≤ E_A / 2^n` on the dyadic intervals of level `n` in `[0, 1)` (as +provided by `Daubechies.norm_sub_le_of_halving`), `B` has oscillation at most `E_B` on `[0, 1)`, +and on each half `[d/2, (d+1)/2)` +`‖B(x) - B(y)‖ ≤ β ‖A(2x - d) - A(2y - d)‖ + ρ ‖B(2x - d) - B(2y - d)‖` +with `β, ρ ≥ 0`. If `C` satisfies `β E_A ≤ (ρ - 1/2) C`, then on the dyadic intervals of level +`n` in `[0, 1)` +`‖B(x) - B(y)‖ ≤ ρ^n (E_B + C) - C / 2^n`. +This is the statement that a lower triangular `2 × 2` recursion with diagonal `1/2, ρ` produces +the rate `ρ^n` when `ρ > 1/2`; the term `- C / 2^n` makes the induction on `n` close. -/ +theorem norm_sub_le_of_triangular {A B : ℝ → E} {EA EB β ρ C : ℝ} (hβ : 0 ≤ β) (hρ : 0 ≤ ρ) + (hC : β * EA ≤ (ρ - 1 / 2) * C) + (hA : ∀ (n k : ℕ), k < 2 ^ n → ∀ x ∈ Ico ((k : ℝ) / 2 ^ n) ((k + 1) / 2 ^ n), + ∀ y ∈ Ico ((k : ℝ) / 2 ^ n) ((k + 1) / 2 ^ n), ‖A x - A y‖ ≤ EA / 2 ^ n) + (hE : ∀ x ∈ Ico (0 : ℝ) 1, ∀ y ∈ Ico (0 : ℝ) 1, ‖B x - B y‖ ≤ EB) + (hB : ∀ d : ℕ, d < 2 → ∀ x ∈ Ico ((d : ℝ) / 2) ((d + 1) / 2), + ∀ y ∈ Ico ((d : ℝ) / 2) ((d + 1) / 2), ‖B x - B y‖ ≤ + β * ‖A (2 * x - d) - A (2 * y - d)‖ + ρ * ‖B (2 * x - d) - B (2 * y - d)‖) + (n : ℕ) {k : ℕ} (hk : k < 2 ^ n) {x y : ℝ} (hx : x ∈ Ico ((k : ℝ) / 2 ^ n) ((k + 1) / 2 ^ n)) + (hy : y ∈ Ico ((k : ℝ) / 2 ^ n) ((k + 1) / 2 ^ n)) : + ‖B x - B y‖ ≤ ρ ^ n * (EB + C) - C / 2 ^ n := by + induction n generalizing k x y with + | zero => + obtain rfl : k = 0 := by simpa using hk + simpa using hE x (by simpa using hx) y (by simpa using hy) + | succ n ih => + have hk' := Nat.mod_lt k (pow_pos two_pos n) + have h := hB _ (div_two_pow_lt_two hk) x (mem_Ico_half_of_mem_dyadic hx) y + (mem_Ico_half_of_mem_dyadic hy) + have hA' := hA n _ hk' _ (two_mul_sub_mem_dyadic hx) _ (two_mul_sub_mem_dyadic hy) + have hB' := ih hk' (two_mul_sub_mem_dyadic hx) (two_mul_sub_mem_dyadic hy) + have h2 : (0 : ℝ) < 2 ^ n := by positivity + calc ‖B x - B y‖ ≤ β * (EA / 2 ^ n) + ρ * (ρ ^ n * (EB + C) - C / 2 ^ n) := + h.trans (add_le_add (mul_le_mul_of_nonneg_left hA' hβ) + (mul_le_mul_of_nonneg_left hB' hρ)) + _ = ρ ^ (n + 1) * (EB + C) - C / 2 ^ (n + 1) + (β * EA - (ρ - 1 / 2) * C) / 2 ^ n := by + rw [pow_succ, pow_succ] + field_simp + ring + _ ≤ ρ ^ (n + 1) * (EB + C) - C / 2 ^ (n + 1) := by + have : (β * EA - (ρ - 1 / 2) * C) / 2 ^ n ≤ 0 := + div_nonpos_of_nonpos_of_nonneg (by linarith) h2.le + linarith + +end DyadicDescent + +/-! ### From dyadic oscillation bounds to a Hölder estimate -/ + +section Holder + +variable {E : Type*} [SeminormedAddCommGroup E] + +/-- **Oscillation bounds pass to the closed interval**: if `f : ℝ → E` is continuous, `a < b`, +and `‖f(x) - f(y)‖ ≤ C` for all `x, y ∈ [a, b)`, then the same holds for all `x, y ∈ [a, b]`. +The set of pairs `(x, y)` with `‖f(x) - f(y)‖ ≤ C` is closed and contains `[a, b) × [a, b)`, +hence its closure `[a, b] × [a, b]` (Mathlib's `closure_prod_eq`, `closure_Ico`). -/ +theorem norm_sub_le_of_forall_Ico {f : ℝ → E} (hf : Continuous f) {a b C : ℝ} (hab : a < b) + (h : ∀ x ∈ Ico a b, ∀ y ∈ Ico a b, ‖f x - f y‖ ≤ C) : + ∀ x ∈ Icc a b, ∀ y ∈ Icc a b, ‖f x - f y‖ ≤ C := by + have hS : IsClosed {p : ℝ × ℝ | ‖f p.1 - f p.2‖ ≤ C} := + isClosed_le (by fun_prop) continuous_const + have hsub : closure (Ico a b ×ˢ Ico a b) ⊆ {p : ℝ × ℝ | ‖f p.1 - f p.2‖ ≤ C} := + closure_minimal (fun p hp => h p.1 hp.1 p.2 hp.2) hS + rw [closure_prod_eq, closure_Ico hab.ne] at hsub + exact fun x hx y hy => hsub (mk_mem_prod hx hy) + +/-- **From the dyadic intervals of `[0, 1)` to those of `ℝ`**: let `f : ℝ → E` be continuous, +`n ∈ ℕ`, and suppose that `‖f(x + i) - f(y + i)‖ ≤ C` for every integer `i` and all `x, y` in +one dyadic interval `[k/2^n, (k+1)/2^n)` with `0 ≤ k < 2^n`. Then `‖f(x) - f(y)‖ ≤ C` for all +`x, y` in one closed dyadic interval `[k/2^n, (k+1)/2^n]`, `k ∈ ℤ`. Write `k = 2^n q + r` with +`0 ≤ r < 2^n` and apply `Daubechies.norm_sub_le_of_forall_Ico` to `t ↦ f(t + q)`. -/ +theorem norm_sub_le_of_unit_dyadic {f : ℝ → E} (hf : Continuous f) {n : ℕ} {C : ℝ} + (h : ∀ (i : ℤ) (k : ℕ), k < 2 ^ n → ∀ x ∈ Ico ((k : ℝ) / 2 ^ n) ((k + 1) / 2 ^ n), + ∀ y ∈ Ico ((k : ℝ) / 2 ^ n) ((k + 1) / 2 ^ n), ‖f (x + i) - f (y + i)‖ ≤ C) + (k : ℤ) : ∀ x ∈ Icc ((k : ℝ) / 2 ^ n) ((k + 1) / 2 ^ n), + ∀ y ∈ Icc ((k : ℝ) / 2 ^ n) ((k + 1) / 2 ^ n), ‖f x - f y‖ ≤ C := by + have hpos : (0 : ℤ) < 2 ^ n := by positivity + obtain ⟨r, hr⟩ : ∃ r : ℕ, (r : ℤ) = k % 2 ^ n := + ⟨(k % 2 ^ n).toNat, Int.toNat_of_nonneg (Int.emod_nonneg k hpos.ne')⟩ + have hrn : r < 2 ^ n := by + have := Int.emod_lt_of_pos k hpos + rw [← hr] at this + exact_mod_cast this + have hk : (k : ℝ) = 2 ^ n * ((k / 2 ^ n : ℤ) : ℝ) + r := by + have := Int.mul_ediv_add_emod k (2 ^ n) + rw [← hr] at this + exact_mod_cast this.symm + have h2 : (0 : ℝ) < 2 ^ n := by positivity + have hg := norm_sub_le_of_forall_Ico (f := fun t => f (t + ((k / 2 ^ n : ℤ) : ℝ))) + (hf.comp (continuous_id.add continuous_const)) (div_lt_div_of_pos_right (lt_add_one (r : ℝ)) h2) + (h (k / 2 ^ n) r hrn) + have hmem : ∀ x ∈ Icc ((k : ℝ) / 2 ^ n) ((k + 1) / 2 ^ n), + x - ((k / 2 ^ n : ℤ) : ℝ) ∈ Icc ((r : ℝ) / 2 ^ n) ((r + 1) / 2 ^ n) := by + intro x hx + rw [mem_Icc, div_le_iff₀ h2, le_div_iff₀ h2] at hx ⊢ + constructor <;> nlinarith + intro x hx y hy + simpa using hg _ (hmem x hx) _ (hmem y hy) + +/-- **Two adjacent dyadic intervals**: suppose `‖f(x) - f(y)‖ ≤ c` whenever `x, y` lie in one +closed dyadic interval `[k/2^n, (k+1)/2^n]`, `k ∈ ℤ`. Then `‖f(x) - f(y)‖ ≤ 2c` whenever +`x ≤ y ≤ x + 2^(-n)`: with `k = ⌊2^n x⌋`, either `y` lies in the interval `[k/2^n, (k+1)/2^n]` +of `x`, or the point `z = (k+1)/2^n` joins `x` to `y` through two adjacent intervals. -/ +theorem norm_sub_le_of_adjacent_dyadic {f : ℝ → E} {n : ℕ} {c : ℝ} + (h : ∀ k : ℤ, ∀ x ∈ Icc ((k : ℝ) / 2 ^ n) ((k + 1) / 2 ^ n), + ∀ y ∈ Icc ((k : ℝ) / 2 ^ n) ((k + 1) / 2 ^ n), ‖f x - f y‖ ≤ c) + {x y : ℝ} (hxy : x ≤ y) (hyx : y - x ≤ 1 / 2 ^ n) : ‖f x - f y‖ ≤ 2 * c := by + have h2 : (0 : ℝ) < 2 ^ n := by positivity + have hk1 : (⌊(2 : ℝ) ^ n * x⌋ : ℝ) ≤ 2 ^ n * x := Int.floor_le _ + have hk2 : 2 ^ n * x < ⌊(2 : ℝ) ^ n * x⌋ + 1 := Int.lt_floor_add_one _ + have hyx' : (y - x) * 2 ^ n ≤ 1 := by rwa [le_div_iff₀ h2] at hyx + have hx : x ∈ Icc ((⌊(2 : ℝ) ^ n * x⌋ : ℝ) / 2 ^ n) ((⌊(2 : ℝ) ^ n * x⌋ + 1) / 2 ^ n) := by + rw [mem_Icc, div_le_iff₀ h2, le_div_iff₀ h2] + constructor <;> linarith + have hc : 0 ≤ c := (norm_nonneg _).trans (h _ x hx x hx) + by_cases hy : y ≤ (⌊(2 : ℝ) ^ n * x⌋ + 1) / 2 ^ n + · have := h _ x hx y ⟨hx.1.trans hxy, hy⟩ + linarith + · push Not at hy + have hz : ((⌊(2 : ℝ) ^ n * x⌋ : ℝ) + 1) / 2 ^ n ∈ + Icc ((⌊(2 : ℝ) ^ n * x⌋ : ℝ) / 2 ^ n) ((⌊(2 : ℝ) ^ n * x⌋ + 1) / 2 ^ n) := + ⟨div_le_div_of_nonneg_right (by linarith) h2.le, le_rfl⟩ + have hz' : ((⌊(2 : ℝ) ^ n * x⌋ : ℝ) + 1) / 2 ^ n ∈ + Icc (((⌊(2 : ℝ) ^ n * x⌋ + 1 : ℤ) : ℝ) / 2 ^ n) + ((((⌊(2 : ℝ) ^ n * x⌋ + 1 : ℤ) : ℝ) + 1) / 2 ^ n) := by + push_cast + exact ⟨le_rfl, div_le_div_of_nonneg_right (by linarith) h2.le⟩ + have hy' : y ∈ Icc (((⌊(2 : ℝ) ^ n * x⌋ + 1 : ℤ) : ℝ) / 2 ^ n) + ((((⌊(2 : ℝ) ^ n * x⌋ + 1 : ℤ) : ℝ) + 1) / 2 ^ n) := by + push_cast + refine ⟨hy.le, ?_⟩ + rw [le_div_iff₀ h2] + linarith + calc ‖f x - f y‖ = ‖(f x - f ((⌊(2 : ℝ) ^ n * x⌋ + 1) / 2 ^ n)) + + (f ((⌊(2 : ℝ) ^ n * x⌋ + 1) / 2 ^ n) - f y)‖ := by abel_nf + _ ≤ ‖f x - f ((⌊(2 : ℝ) ^ n * x⌋ + 1) / 2 ^ n)‖ + + ‖f ((⌊(2 : ℝ) ^ n * x⌋ + 1) / 2 ^ n) - f y‖ := norm_add_le _ _ + _ ≤ c + c := add_le_add (h _ x hx _ hz) (h _ _ hz' y hy') + _ = 2 * c := by ring + +/-- **Choice of the dyadic level**: for `0 < t ≤ 1` there is `n ∈ ℕ` with +`2^(-(n+1)) < t ≤ 2^(-n)` (Mathlib's `exists_nat_pow_near_of_lt_one` with base `1/2`). -/ +theorem exists_dyadic_level {t : ℝ} (ht0 : 0 < t) (ht1 : t ≤ 1) : + ∃ n : ℕ, 1 / 2 ^ (n + 1) < t ∧ t ≤ 1 / 2 ^ n := by + obtain ⟨n, h1, h2⟩ := exists_nat_pow_near_of_lt_one ht0 ht1 (by norm_num : (0 : ℝ) < 1 / 2) + (by norm_num) + exact ⟨n, by rwa [one_div_pow] at h1, by rwa [one_div_pow] at h2⟩ + +/-- **The rate `ρ^n` as a power of the scale**: if `0 ≤ ρ ≤ 2^(-a)` with `a ≥ 0` and +`2^(-(n+1)) < t`, then `ρ^n ≤ 2^a t^a`. Indeed `ρ^n ≤ (2^(-a))^n = (2^(-n))^a` and +`2^(-n) < 2t`. -/ +theorem pow_le_two_rpow_mul_rpow {ρ a t : ℝ} {n : ℕ} (hρ0 : 0 ≤ ρ) (hρ : ρ ≤ 2 ^ (-a)) + (ha : 0 ≤ a) (ht : 1 / 2 ^ (n + 1) < t) : ρ ^ n ≤ 2 ^ a * t ^ a := by + have h2 : (0 : ℝ) < 2 ^ n := by positivity + have hpow : ((2 : ℝ) ^ (-a)) ^ n = (1 / 2 ^ n) ^ a := by + rw [Real.rpow_neg (by norm_num), ← Real.inv_rpow (by norm_num), Real.rpow_pow_comm + (by norm_num), inv_pow, one_div] + have hle : 1 / (2 : ℝ) ^ n ≤ 2 * t := by + rw [pow_succ, ← div_div] at ht + linarith + calc ρ ^ n ≤ ((2 : ℝ) ^ (-a)) ^ n := pow_le_pow_left₀ hρ0 hρ n + _ = (1 / 2 ^ n) ^ a := hpow + _ ≤ (2 * t) ^ a := Real.rpow_le_rpow (by positivity) hle ha + _ = 2 ^ a * t ^ a := Real.mul_rpow (by norm_num) (by linarith [ht, one_div_pos.2 h2]) + +/-- **Hölder continuity from dyadic oscillation bounds**: let `f : ℝ → E` be bounded, +`‖f(x)‖ ≤ M`, and suppose that `‖f(x) - f(y)‖ ≤ C ρ^n` whenever `x, y` lie in one closed dyadic +interval `[k/2^n, (k+1)/2^n]` (`n ∈ ℕ`, `k ∈ ℤ`), where `C ≥ 0`, `0 ≤ ρ ≤ 2^(-a)` and `a ≥ 0`. +Then `f` is Hölder continuous with exponent `a`: there is `K` with +`‖f(x) - f(y)‖ ≤ K |x - y|^a` for all `x, y ∈ ℝ`. For `0 < |x - y| ≤ 1` choose `n` with +`2^(-(n+1)) < |x - y| ≤ 2^(-n)` (`Daubechies.exists_dyadic_level`); then +`‖f(x) - f(y)‖ ≤ 2 C ρ^n ≤ 2 C 2^a |x - y|^a` (`Daubechies.norm_sub_le_of_adjacent_dyadic`, +`Daubechies.pow_le_two_rpow_mul_rpow`). For `|x - y| > 1`, +`‖f(x) - f(y)‖ ≤ 2M ≤ 2M |x - y|^a`. -/ +theorem exists_holder_of_dyadic {f : ℝ → E} {M C ρ a : ℝ} (hM : ∀ x, ‖f x‖ ≤ M) (hC : 0 ≤ C) + (hρ0 : 0 ≤ ρ) (hρ : ρ ≤ 2 ^ (-a)) (ha : 0 ≤ a) + (h : ∀ (n : ℕ) (k : ℤ), ∀ x ∈ Icc ((k : ℝ) / 2 ^ n) ((k + 1) / 2 ^ n), + ∀ y ∈ Icc ((k : ℝ) / 2 ^ n) ((k + 1) / 2 ^ n), ‖f x - f y‖ ≤ C * ρ ^ n) : + ∃ K, ∀ x y, ‖f x - f y‖ ≤ K * |x - y| ^ a := by + have hM0 : 0 ≤ M := (norm_nonneg _).trans (hM 0) + have hK1 : 0 ≤ 2 * C * 2 ^ a := by positivity + refine ⟨2 * C * 2 ^ a + 2 * M, fun x y => ?_⟩ + wlog hxy : x ≤ y generalizing x y + · rw [norm_sub_rev, abs_sub_comm] + exact this y x (le_of_not_ge hxy) + rcases eq_or_lt_of_le hxy with rfl | hlt + · simp only [sub_self, norm_zero, abs_zero] + exact mul_nonneg (by positivity) (Real.rpow_nonneg le_rfl a) + rw [abs_sub_comm, abs_of_pos (sub_pos.2 hlt)] + have ht0 : 0 ≤ (y - x) ^ a := Real.rpow_nonneg (sub_pos.2 hlt).le a + by_cases h1 : y - x ≤ 1 + · obtain ⟨n, hn1, hn2⟩ := exists_dyadic_level (sub_pos.2 hlt) h1 + have hρn := pow_le_two_rpow_mul_rpow hρ0 hρ ha hn1 + calc ‖f x - f y‖ ≤ 2 * (C * ρ ^ n) := norm_sub_le_of_adjacent_dyadic (h n) hxy hn2 + _ ≤ 2 * (C * (2 ^ a * (y - x) ^ a)) := by gcongr + _ ≤ (2 * C * 2 ^ a + 2 * M) * (y - x) ^ a := by nlinarith [mul_nonneg hM0 ht0] + · push Not at h1 + have ht : 1 ≤ (y - x) ^ a := Real.one_le_rpow h1.le ha + calc ‖f x - f y‖ ≤ ‖f x‖ + ‖f y‖ := norm_sub_le _ _ + _ ≤ 2 * M := by linarith [hM x, hM y] + _ ≤ (2 * C * 2 ^ a + 2 * M) * (y - x) ^ a := by + nlinarith [mul_nonneg (add_nonneg hK1 (by linarith : (0 : ℝ) ≤ 2 * M)) + (sub_nonneg.2 ht)] + +/-- **Hölder continuity from dyadic bounds on the unit interval**: let `f : ℝ → E` be continuous +and bounded, `‖f(x)‖ ≤ M`, let `C ≥ 0`, `0 ≤ ρ ≤ 2^(-a)` and `a ≥ 0`, and suppose that +`‖f(x + i) - f(y + i)‖ ≤ C ρ^n` for every `n ∈ ℕ`, every integer `i` and all `x, y` in one dyadic +interval `[k/2^n, (k+1)/2^n)` with `0 ≤ k < 2^n`. Then there is `K` with +`‖f(x) - f(y)‖ ≤ K |x - y|^a` for all `x, y ∈ ℝ` (`Daubechies.norm_sub_le_of_unit_dyadic`, +`Daubechies.exists_holder_of_dyadic`). -/ +theorem exists_holder_of_unit_dyadic {f : ℝ → E} (hf : Continuous f) {M C ρ a : ℝ} + (hM : ∀ x, ‖f x‖ ≤ M) (hC : 0 ≤ C) (hρ0 : 0 ≤ ρ) (hρ : ρ ≤ 2 ^ (-a)) (ha : 0 ≤ a) + (h : ∀ (n : ℕ) (i : ℤ) (k : ℕ), k < 2 ^ n → ∀ x ∈ Ico ((k : ℝ) / 2 ^ n) ((k + 1) / 2 ^ n), + ∀ y ∈ Ico ((k : ℝ) / 2 ^ n) ((k + 1) / 2 ^ n), ‖f (x + i) - f (y + i)‖ ≤ C * ρ ^ n) : + ∃ K, ∀ x y, ‖f x - f y‖ ≤ K * |x - y| ^ a := + exists_holder_of_dyadic hM hC hρ0 hρ ha fun n => norm_sub_le_of_unit_dyadic hf (h n) + +end Holder + +end Daubechies diff --git a/LeanPool/FunctionSpaces/Wavelets/Examples/Daubechies/MatrixMethodD4.lean b/LeanPool/FunctionSpaces/Wavelets/Examples/Daubechies/MatrixMethodD4.lean new file mode 100644 index 0000000000..76d14667ac --- /dev/null +++ b/LeanPool/FunctionSpaces/Wavelets/Examples/Daubechies/MatrixMethodD4.lean @@ -0,0 +1,477 @@ +/- +Copyright (c) 2026 Mario Ullrich. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Mario Ullrich +-/ +module + +public import LeanPool.FunctionSpaces.Wavelets.Examples.Daubechies.D4 +public import LeanPool.FunctionSpaces.Wavelets.Examples.Daubechies.MatrixMethod +public import LeanPool.FunctionSpaces.Wavelets.Examples.Daubechies.ScalingMoments + +/- +Modified for Lean Pool: module names and imports adapted. +-/ + +/-! +# The Hölder exponent of D4 by the matrix method + +The scaling function `φ` of the Daubechies mask D4 (`Daubechies.d4`, filter coefficients +`c_0, …, c_3 = (1 + √3)/4, (3 + √3)/4, (3 - √3)/4, (1 - √3)/4`) is Hölder continuous with every +exponent `0 ≤ a ≤ α = 2 - log₂(1 + √3)`: there is `K` with `‖φ(x) - φ(y)‖ ≤ K |x - y|^a` for all +`x, y ∈ ℝ` (`Daubechies.holder_d4`), and `α > 0.55` +(`Daubechies.two_sub_logb_two_one_add_sqrt_three_gt`). The exponent `α ≈ 0.5500` is the Hölder +exponent of D4 determined by Daubechies–Lagarias; the proof is their matrix method in a scalar +form, with the dyadic descent of `FunctionSpaces.Wavelets.Examples.Daubechies.MatrixMethod`. + +* **The vector of translates.** `φ` vanishes outside `(0, 3)` (`Daubechies.scalingFun_d4_eq_zero`), + so for `x ∈ [0, 1)` the vector `v(x) = (φ(x), φ(x + 1), φ(x + 2))` carries all values of `φ`. + On the half `[d/2, (d+1)/2)` the refinement equation `φ(x) = ∑_k c_k φ(2x - k)` reads + `v(x) = T_d v(2x - d)` with `(T_d)_{ij} = c_{2i+d-j}` (`Daubechies.scalingFun_d4_left`, + `Daubechies.scalingFun_d4_add_one_left`, `Daubechies.scalingFun_d4_add_two_left` for `d = 0`, + `Daubechies.scalingFun_d4_right`, `Daubechies.scalingFun_d4_add_one_right`, + `Daubechies.scalingFun_d4_add_two_right` for `d = 1`), and the partition of unity gives + `φ(x) + φ(x + 1) + φ(x + 2) = 1` (`Daubechies.scalingFun_d4_add_add_eq_one`), that is + `ℓ_0(v(x)) = 1` for the functional `ℓ_0 = (1, 1, 1)`. +* **Two scalar recursions.** The functions `A(x) = φ(x + 1) + 2 φ(x + 2)` (`Daubechies.d4A`, the + functional `ℓ_1 = (0, 1, 2)` applied to `v(x)`) and `B(x) = φ(x) + A(x)` (`Daubechies.d4B`) + satisfy, with `u = 2x - d`, + `A(x) = A(u)/2 + (μ - d)/2` for `μ = (3 - √3)/2` (`Daubechies.d4A_left`, `Daubechies.d4A_right`), + `B(x) = a_0 + β_0 A(u) + λ_0 B(u)` for `d = 0` and `B(x) = a_1 + λ_1 B(u)` for `d = 1`, where + `a_0 = (3 - √3)/4`, `a_1 = (3 + √3)/4`, `β_0 = λ_1 = (1 - √3)/4` and `λ_0 = (1 + √3)/4` + (`Daubechies.d4B_left`, `Daubechies.d4B_right`). In matrix terms, `ℓ_0` is a common left + eigenvector of `T_0` and `T_1` for the eigenvalue `1`, and on differences, which lie in the + kernel of `ℓ_0`, both matrices act triangularly with diagonal `(1/2, λ_d)`. +* **Dyadic descent.** The differences of `A` and `B` satisfy the halving and the triangular + recursion with `ρ = (1 + √3)/4` and `β = ρ - 1/2 = (√3 - 1)/4` (`Daubechies.norm_d4A_sub_le`, + `Daubechies.norm_d4B_sub_le`). For a bound `‖φ‖ ≤ M`, the descent gives + `‖A(x) - A(y)‖ ≤ 6M/2^n` and `‖B(x) - B(y)‖ ≤ 14 M ρ^n` on every dyadic interval of level `n` + in `[0, 1)`. Since `φ(x + i)` is affine in `(A(x), B(x))` + (`Daubechies.norm_scalingFun_d4_sub_le`), `‖φ(x + i) - φ(y + i)‖ ≤ 28 M ρ^n` there + (`Daubechies.norm_scalingFun_d4_sub_le_dyadic`), and `ρ = 2^(-α)` turns these bounds into the + Hölder estimate. +-/ + +@[expose] public section + +open Set +open scoped Real + +namespace Daubechies + +/-! ### The scaling function of D4 on the unit interval -/ + +section D4 + +/-- `1 < √3`, since `1² < 3` (Mathlib's `Real.lt_sqrt`). -/ +theorem one_lt_sqrt_three : 1 < √3 := by + rw [Real.lt_sqrt zero_le_one] + norm_num + +/-- **The support of the D4 scaling function**: `φ(x) = 0` for every `x ∉ (0, 3)` +(`Daubechies.scalingFun_eq_zero_of_notMem_Ioo` with `2N - 1 = 3`). -/ +theorem scalingFun_d4_eq_zero {x : ℝ} (hx : x ∉ Ioo (0 : ℝ) 3) : scalingFun d4 x = 0 := + scalingFun_eq_zero_of_notMem_Ioo d4 le_rfl + (by rwa [show (2 : ℝ) * ((2 : ℕ) : ℝ) - 1 = 3 by norm_num]) + +/-- **The partition of unity for D4 on `[0, 1)`**: `φ(x) + φ(x + 1) + φ(x + 2) = 1` for every +`x ∈ [0, 1)`. In `∑_{k ∈ ℤ} φ(x - k) = 1` (`Daubechies.sum_scalingFun_translate`) only the +indices `k = 0, -1, -2` contribute, since `φ` vanishes outside `(0, 3)`. -/ +theorem scalingFun_d4_add_add_eq_one {x : ℝ} (hx : x ∈ Ico (0 : ℝ) 1) : + scalingFun d4 x + scalingFun d4 (x + 1) + scalingFun d4 (x + 2) = 1 := by + have h := sum_scalingFun_translate d4 le_rfl x + rw [tsum_eq_sum (s := ({0, -1, -2} : Finset ℤ)) fun k hk => scalingFun_d4_eq_zero fun hk' => + hk ?_] at h + · simpa [add_assoc] using h + · have h1 : (k : ℝ) < 1 := by linarith [hk'.1, hx.2] + have h2 : (-3 : ℝ) < k := by linarith [hk'.2, hx.1] + have h1' : k < 1 := by exact_mod_cast h1 + have h2' : -3 < k := by exact_mod_cast h2 + simp only [Finset.mem_insert, Finset.mem_singleton] + omega + +/-- **The refinement equation of D4**, written out: +`φ(x) = c_0 φ(2x) + c_1 φ(2x - 1) + c_2 φ(2x - 2) + c_3 φ(2x - 3)` for every `x ∈ ℝ` +(`Daubechies.scalingFun_refine` with `2N = 4`). -/ +theorem scalingFun_d4_refine (x : ℝ) : + scalingFun d4 x = (coeff d4 0 : ℂ) * scalingFun d4 (2 * x) + + (coeff d4 1 : ℂ) * scalingFun d4 (2 * x - 1) + (coeff d4 2 : ℂ) * scalingFun d4 (2 * x - 2) + + (coeff d4 3 : ℂ) * scalingFun d4 (2 * x - 3) := by + rw [scalingFun_refine d4 le_rfl x] + simp [Finset.sum_range_succ] + +/-- **The refinement equation on the left half**: for `x ∈ [0, 1/2)`, `φ(x) = c_0 φ(2x)`; the +other terms of `Daubechies.scalingFun_d4_refine` vanish since `2x - j < 0` for `j ≥ 1`. -/ +theorem scalingFun_d4_left {x : ℝ} (hx : x ∈ Ico (0 : ℝ) (1 / 2)) : + scalingFun d4 x = (coeff d4 0 : ℂ) * scalingFun d4 (2 * x) := by + rw [scalingFun_d4_refine, scalingFun_d4_eq_zero (x := 2 * x - 1) fun h => by linarith [h.1, hx.2], + scalingFun_d4_eq_zero (x := 2 * x - 2) fun h => by linarith [h.1, hx.2], + scalingFun_d4_eq_zero (x := 2 * x - 3) fun h => by linarith [h.1, hx.2]] + ring + +/-- **The refinement equation on the left half**, second translate: for `x ∈ [0, 1/2)`, +`φ(x + 1) = c_2 φ(2x) + c_1 φ(2x + 1) + c_0 φ(2x + 2)`; the term `c_3 φ(2x - 1)` vanishes. -/ +theorem scalingFun_d4_add_one_left {x : ℝ} (hx : x ∈ Ico (0 : ℝ) (1 / 2)) : + scalingFun d4 (x + 1) = (coeff d4 2 : ℂ) * scalingFun d4 (2 * x) + + (coeff d4 1 : ℂ) * scalingFun d4 (2 * x + 1) + + (coeff d4 0 : ℂ) * scalingFun d4 (2 * x + 2) := by + rw [scalingFun_d4_refine, show 2 * (x + 1) = 2 * x + 2 by ring, + show 2 * x + 2 - 1 = 2 * x + 1 by ring, show 2 * x + 2 - 2 = 2 * x by ring, + show 2 * x + 2 - 3 = 2 * x - 1 by ring, + scalingFun_d4_eq_zero (x := 2 * x - 1) fun h => by linarith [h.1, hx.2]] + ring + +/-- **The refinement equation on the left half**, third translate: for `x ∈ [0, 1/2)`, +`φ(x + 2) = c_3 φ(2x + 1) + c_2 φ(2x + 2)`; the terms with `φ(2x + 3)` and `φ(2x + 4)` vanish. -/ +theorem scalingFun_d4_add_two_left {x : ℝ} (hx : x ∈ Ico (0 : ℝ) (1 / 2)) : + scalingFun d4 (x + 2) = (coeff d4 3 : ℂ) * scalingFun d4 (2 * x + 1) + + (coeff d4 2 : ℂ) * scalingFun d4 (2 * x + 2) := by + rw [scalingFun_d4_refine, show 2 * (x + 2) = 2 * x + 4 by ring, + show 2 * x + 4 - 1 = 2 * x + 3 by ring, show 2 * x + 4 - 2 = 2 * x + 2 by ring, + show 2 * x + 4 - 3 = 2 * x + 1 by ring, + scalingFun_d4_eq_zero (x := 2 * x + 4) fun h => by linarith [h.2, hx.1], + scalingFun_d4_eq_zero (x := 2 * x + 3) fun h => by linarith [h.2, hx.1]] + ring + +/-- **The refinement equation on the right half**: for `x ∈ [1/2, 1)`, +`φ(x) = c_1 φ(2x - 1) + c_0 φ(2x)`; the terms with `φ(2x - 2)` and `φ(2x - 3)` vanish. -/ +theorem scalingFun_d4_right {x : ℝ} (hx : x ∈ Ico (1 / 2 : ℝ) 1) : + scalingFun d4 x = (coeff d4 1 : ℂ) * scalingFun d4 (2 * x - 1) + + (coeff d4 0 : ℂ) * scalingFun d4 (2 * x) := by + rw [scalingFun_d4_refine, scalingFun_d4_eq_zero (x := 2 * x - 2) fun h => by linarith [h.1, hx.2], + scalingFun_d4_eq_zero (x := 2 * x - 3) fun h => by linarith [h.1, hx.2]] + ring + +/-- **The refinement equation on the right half**, second translate: for `x ∈ [1/2, 1)`, +`φ(x + 1) = c_3 φ(2x - 1) + c_2 φ(2x) + c_1 φ(2x + 1)`; the term `c_0 φ(2x + 2)` vanishes. -/ +theorem scalingFun_d4_add_one_right {x : ℝ} (hx : x ∈ Ico (1 / 2 : ℝ) 1) : + scalingFun d4 (x + 1) = (coeff d4 3 : ℂ) * scalingFun d4 (2 * x - 1) + + (coeff d4 2 : ℂ) * scalingFun d4 (2 * x) + + (coeff d4 1 : ℂ) * scalingFun d4 (2 * x + 1) := by + rw [scalingFun_d4_refine, show 2 * (x + 1) = 2 * x + 2 by ring, + show 2 * x + 2 - 1 = 2 * x + 1 by ring, show 2 * x + 2 - 2 = 2 * x by ring, + show 2 * x + 2 - 3 = 2 * x - 1 by ring, + scalingFun_d4_eq_zero (x := 2 * x + 2) fun h => by linarith [h.2, hx.1]] + ring + +/-- **The refinement equation on the right half**, third translate: for `x ∈ [1/2, 1)`, +`φ(x + 2) = c_3 φ(2x + 1)`; the other terms vanish since `2x + j ≥ 3` for `j ≥ 2`. -/ +theorem scalingFun_d4_add_two_right {x : ℝ} (hx : x ∈ Ico (1 / 2 : ℝ) 1) : + scalingFun d4 (x + 2) = (coeff d4 3 : ℂ) * scalingFun d4 (2 * x + 1) := by + rw [scalingFun_d4_refine, show 2 * (x + 2) = 2 * x + 4 by ring, + show 2 * x + 4 - 1 = 2 * x + 3 by ring, show 2 * x + 4 - 2 = 2 * x + 2 by ring, + show 2 * x + 4 - 3 = 2 * x + 1 by ring, + scalingFun_d4_eq_zero (x := 2 * x + 4) fun h => by linarith [h.2, hx.1], + scalingFun_d4_eq_zero (x := 2 * x + 3) fun h => by linarith [h.2, hx.1], + scalingFun_d4_eq_zero (x := 2 * x + 2) fun h => by linarith [h.2, hx.1]] + ring + +/-! ### The two scalar recursions -/ + +/-- **The first auxiliary function of the matrix method for D4**: `A(x) = φ(x + 1) + 2 φ(x + 2)`. +For `x ∈ [0, 1)` it is the functional `ℓ_1 = (0, 1, 2)` applied to the vector +`v(x) = (φ(x), φ(x + 1), φ(x + 2))` of Daubechies–Lagarias. -/ +noncomputable def d4A (x : ℝ) : ℂ := scalingFun d4 (x + 1) + 2 * scalingFun d4 (x + 2) + +/-- **The second auxiliary function of the matrix method for D4**: +`B(x) = φ(x) + A(x) = φ(x) + φ(x + 1) + 2 φ(x + 2)`, the functional `(1, 1, 2)` applied to the +vector `v(x) = (φ(x), φ(x + 1), φ(x + 2))`. -/ +noncomputable def d4B (x : ℝ) : ℂ := scalingFun d4 x + d4A x + +/-- **The recursion of `A` on the left half**: for `x ∈ [0, 1/2)`, +`A(x) = A(2x)/2 + (3 - √3)/4`. By the refinement equation (`Daubechies.scalingFun_d4_add_one_left`, +`Daubechies.scalingFun_d4_add_two_left`), `A(x) = c_2 φ(u) + (c_1 + 2c_3) φ(u + 1) + +(c_0 + 2c_2) φ(u + 2)` with `u = 2x ∈ [0, 1)`, and the coefficients are +`(3 - √3)/4 + (0, 1/2, 1)`; the partition of unity `φ(u) + φ(u + 1) + φ(u + 2) = 1` +(`Daubechies.scalingFun_d4_add_add_eq_one`) turns the first part into the constant `(3 - √3)/4`. In +matrix language: `ℓ_1 T_0 = ℓ_1/2 + (μ/2) ℓ_0` with `μ = (3 - √3)/2`. -/ +theorem d4A_left {x : ℝ} (hx : x ∈ Ico (0 : ℝ) (1 / 2)) : + d4A x = d4A (2 * x) / 2 + (((3 - √3) / 4 : ℝ) : ℂ) := by + have hp := scalingFun_d4_add_add_eq_one (x := 2 * x) ⟨by linarith [hx.1], by linarith [hx.2]⟩ + simp only [d4A] + rw [scalingFun_d4_add_one_left hx, scalingFun_d4_add_two_left hx, coeff_d4_zero, coeff_d4_one, + coeff_d4_two, coeff_d4_three] + push_cast + linear_combination ((3 - (√3 : ℂ)) / 4) * hp + +/-- **The recursion of `A` on the right half**: for `x ∈ [1/2, 1)`, +`A(x) = A(2x - 1)/2 + (1 - √3)/4`. With `u = 2x - 1 ∈ [0, 1)`, the refinement equation +(`Daubechies.scalingFun_d4_add_one_right`, `Daubechies.scalingFun_d4_add_two_right`) gives +`A(x) = c_3 φ(u) + c_2 φ(u + 1) + (c_1 + 2c_3) φ(u + 2)` with coefficients +`(1 - √3)/4 + (0, 1/2, 1)`, and the partition of unity gives the constant. In matrix language: +`ℓ_1 T_1 = ℓ_1/2 + ((μ - 1)/2) ℓ_0`. -/ +theorem d4A_right {x : ℝ} (hx : x ∈ Ico (1 / 2 : ℝ) 1) : + d4A x = d4A (2 * x - 1) / 2 + (((1 - √3) / 4 : ℝ) : ℂ) := by + have hp := scalingFun_d4_add_add_eq_one (x := 2 * x - 1) ⟨by linarith [hx.1], by linarith [hx.2]⟩ + rw [show 2 * x - 1 + 1 = 2 * x by ring, show 2 * x - 1 + 2 = 2 * x + 1 by ring] at hp + simp only [d4A] + rw [show 2 * x - 1 + 1 = 2 * x by ring, show 2 * x - 1 + 2 = 2 * x + 1 by ring, + scalingFun_d4_add_one_right hx, scalingFun_d4_add_two_right hx, coeff_d4_one, coeff_d4_two, + coeff_d4_three] + push_cast + linear_combination ((1 - (√3 : ℂ)) / 4) * hp + +/-- **The recursion of `B` on the left half**: for `x ∈ [0, 1/2)`, +`B(x) = (3 - √3)/4 + ((1 - √3)/4) A(2x) + ((1 + √3)/4) B(2x)`. With `u = 2x`, the refinement +equation gives `B(x) = φ(u) + ((5 - √3)/4) φ(u + 1) + ((7 - √3)/4) φ(u + 2)`, and this row vector +is `a_0 ℓ_0 + β_0 ℓ_1 + λ_0 (1, 1, 2)` with `a_0 = (3 - √3)/4`, `β_0 = (1 - √3)/4`, +`λ_0 = (1 + √3)/4`; the partition of unity turns `a_0 ℓ_0` into the constant `a_0`. -/ +theorem d4B_left {x : ℝ} (hx : x ∈ Ico (0 : ℝ) (1 / 2)) : + d4B x = (((3 - √3) / 4 : ℝ) : ℂ) + (((1 - √3) / 4 : ℝ) : ℂ) * d4A (2 * x) + + (((1 + √3) / 4 : ℝ) : ℂ) * d4B (2 * x) := by + have hp := scalingFun_d4_add_add_eq_one (x := 2 * x) ⟨by linarith [hx.1], by linarith [hx.2]⟩ + simp only [d4B, d4A] + rw [scalingFun_d4_left hx, scalingFun_d4_add_one_left hx, scalingFun_d4_add_two_left hx, + coeff_d4_zero, coeff_d4_one, coeff_d4_two, coeff_d4_three] + push_cast + linear_combination ((3 - (√3 : ℂ)) / 4) * hp + +/-- **The recursion of `B` on the right half**: for `x ∈ [1/2, 1)`, +`B(x) = (3 + √3)/4 + ((1 - √3)/4) B(2x - 1)`. With `u = 2x - 1`, the refinement equation gives +`B(x) = φ(u) + φ(u + 1) + ((5 - √3)/4) φ(u + 2)`, the row vector +`a_1 ℓ_0 + λ_1 (1, 1, 2)` with `a_1 = (3 + √3)/4` and `λ_1 = (1 - √3)/4`, whose `A`-coordinate +is `0`. -/ +theorem d4B_right {x : ℝ} (hx : x ∈ Ico (1 / 2 : ℝ) 1) : + d4B x = (((3 + √3) / 4 : ℝ) : ℂ) + (((1 - √3) / 4 : ℝ) : ℂ) * d4B (2 * x - 1) := by + have hp := scalingFun_d4_add_add_eq_one (x := 2 * x - 1) ⟨by linarith [hx.1], by linarith [hx.2]⟩ + rw [show 2 * x - 1 + 1 = 2 * x by ring, show 2 * x - 1 + 2 = 2 * x + 1 by ring] at hp + simp only [d4B, d4A] + rw [show 2 * x - 1 + 1 = 2 * x by ring, show 2 * x - 1 + 2 = 2 * x + 1 by ring, + scalingFun_d4_right hx, scalingFun_d4_add_one_right hx, scalingFun_d4_add_two_right hx, + coeff_d4_zero, coeff_d4_one, coeff_d4_two, coeff_d4_three] + push_cast + linear_combination ((3 + (√3 : ℂ)) / 4) * hp + +/-- **The halving recursion of `A` for differences**: for `d ∈ {0, 1}` and +`x, y ∈ [d/2, (d+1)/2)`, `‖A(x) - A(y)‖ ≤ ‖A(2x - d) - A(2y - d)‖ / 2` (in fact with equality): +the additive constants of `Daubechies.d4A_left` and `Daubechies.d4A_right` cancel. This is the +hypothesis of `Daubechies.norm_sub_le_of_halving`. -/ +theorem norm_d4A_sub_le (d : ℕ) (hd : d < 2) {x y : ℝ} + (hx : x ∈ Ico ((d : ℝ) / 2) ((d + 1) / 2)) (hy : y ∈ Ico ((d : ℝ) / 2) ((d + 1) / 2)) : + ‖d4A x - d4A y‖ ≤ ‖d4A (2 * x - d) - d4A (2 * y - d)‖ / 2 := by + obtain rfl | rfl : d = 0 ∨ d = 1 := by omega + · have hx' : x ∈ Ico (0 : ℝ) (1 / 2) := by simpa using hx + have hy' : y ∈ Ico (0 : ℝ) (1 / 2) := by simpa using hy + have h : d4A x - d4A y = (d4A (2 * x) - d4A (2 * y)) / 2 := by + rw [d4A_left hx', d4A_left hy'] + ring + rw [h, Nat.cast_zero, sub_zero, sub_zero, norm_div, Complex.norm_two] + · have hx' : x ∈ Ico (1 / 2 : ℝ) 1 := by norm_num at hx ⊢; exact hx + have hy' : y ∈ Ico (1 / 2 : ℝ) 1 := by norm_num at hy ⊢; exact hy + have h : d4A x - d4A y = (d4A (2 * x - 1) - d4A (2 * y - 1)) / 2 := by + rw [d4A_right hx', d4A_right hy'] + ring + rw [h, Nat.cast_one, norm_div, Complex.norm_two] + +/-- **The triangular recursion of `B` for differences**: for `d ∈ {0, 1}` and +`x, y ∈ [d/2, (d+1)/2)`, +`‖B(x) - B(y)‖ ≤ ((√3 - 1)/4) ‖A(2x - d) - A(2y - d)‖ + ((1 + √3)/4) ‖B(2x - d) - B(2y - d)‖`. +For `d = 0` this is the triangle inequality in `Daubechies.d4B_left` with +`|β_0| = (√3 - 1)/4` and `λ_0 = (1 + √3)/4`; for `d = 1` (`Daubechies.d4B_right`) the factor +`|λ_1| = (√3 - 1)/4` is at most `(1 + √3)/4`. This is the hypothesis of +`Daubechies.norm_sub_le_of_triangular` with `β = (√3 - 1)/4` and `ρ = (1 + √3)/4`. -/ +theorem norm_d4B_sub_le (d : ℕ) (hd : d < 2) {x y : ℝ} + (hx : x ∈ Ico ((d : ℝ) / 2) ((d + 1) / 2)) (hy : y ∈ Ico ((d : ℝ) / 2) ((d + 1) / 2)) : + ‖d4B x - d4B y‖ ≤ (√3 - 1) / 4 * ‖d4A (2 * x - d) - d4A (2 * y - d)‖ + + (1 + √3) / 4 * ‖d4B (2 * x - d) - d4B (2 * y - d)‖ := by + have h3 := one_lt_sqrt_three + obtain rfl | rfl : d = 0 ∨ d = 1 := by omega + · have hx' : x ∈ Ico (0 : ℝ) (1 / 2) := by simpa using hx + have hy' : y ∈ Ico (0 : ℝ) (1 / 2) := by simpa using hy + have h : d4B x - d4B y = (((1 - √3) / 4 : ℝ) : ℂ) * (d4A (2 * x) - d4A (2 * y)) + + (((1 + √3) / 4 : ℝ) : ℂ) * (d4B (2 * x) - d4B (2 * y)) := by + rw [d4B_left hx', d4B_left hy'] + ring + rw [h, Nat.cast_zero, sub_zero, sub_zero] + refine (norm_add_le _ _).trans (le_of_eq ?_) + rw [norm_mul, norm_mul, Complex.norm_real, Complex.norm_real, Real.norm_eq_abs, + Real.norm_eq_abs, abs_of_neg (by linarith), abs_of_pos (by positivity)] + ring + · have hx' : x ∈ Ico (1 / 2 : ℝ) 1 := by norm_num at hx ⊢; exact hx + have hy' : y ∈ Ico (1 / 2 : ℝ) 1 := by norm_num at hy ⊢; exact hy + have h : d4B x - d4B y = (((1 - √3) / 4 : ℝ) : ℂ) * (d4B (2 * x - 1) - d4B (2 * y - 1)) := by + rw [d4B_right hx', d4B_right hy'] + ring + rw [h, Nat.cast_one, norm_mul, Complex.norm_real, Real.norm_eq_abs, abs_of_neg (by linarith)] + nlinarith [mul_nonneg (sub_nonneg.2 h3.le) (norm_nonneg (d4A (2 * x - 1) - d4A (2 * y - 1))), + norm_nonneg (d4B (2 * x - 1) - d4B (2 * y - 1))] + +/-! ### Back from the auxiliary functions to the scaling function -/ + +/-- `φ = B - A` (the definition of `B`). -/ +theorem scalingFun_d4_eq_d4B_sub_d4A (x : ℝ) : scalingFun d4 x = d4B x - d4A x := by + simp [d4B] + +/-- `φ(x + 2) = B(x) - 1` for `x ∈ [0, 1)`: `B(x) = (φ(x) + φ(x + 1) + φ(x + 2)) + φ(x + 2)` +and the partition of unity (`Daubechies.scalingFun_d4_add_add_eq_one`). -/ +theorem scalingFun_d4_add_two_eq {x : ℝ} (hx : x ∈ Ico (0 : ℝ) 1) : + scalingFun d4 (x + 2) = d4B x - 1 := by + have hp := scalingFun_d4_add_add_eq_one hx + simp only [d4B, d4A] + linear_combination -hp + +/-- `φ(x + 1) = A(x) - 2 (B(x) - 1)` for `x ∈ [0, 1)`: `A(x) = φ(x + 1) + 2 φ(x + 2)` and +`φ(x + 2) = B(x) - 1` (`Daubechies.scalingFun_d4_add_two_eq`). -/ +theorem scalingFun_d4_add_one_eq {x : ℝ} (hx : x ∈ Ico (0 : ℝ) 1) : + scalingFun d4 (x + 1) = d4A x - 2 * (d4B x - 1) := by + have hp := scalingFun_d4_add_add_eq_one hx + simp only [d4B, d4A] + linear_combination 2 * hp + +/-- For `x ∈ [0, 1)` and an integer `i ∉ {0, 1, 2}`, `φ(x + i) = 0`, since `x + i ∉ (0, 3)` +(`Daubechies.scalingFun_d4_eq_zero`). -/ +theorem scalingFun_d4_add_int_eq_zero {x : ℝ} (hx : x ∈ Ico (0 : ℝ) 1) {i : ℤ} + (hi : i ≠ 0 ∧ i ≠ 1 ∧ i ≠ 2) : scalingFun d4 (x + i) = 0 := by + refine scalingFun_d4_eq_zero fun h => ?_ + have h1 : (-1 : ℝ) < i := by linarith [h.1, hx.2] + have h2 : (i : ℝ) < 3 := by linarith [h.2, hx.1] + have h1' : -1 < i := by exact_mod_cast h1 + have h2' : i < 3 := by exact_mod_cast h2 + omega + +/-- **The translates of `φ` are controlled by `A` and `B`**: for `x, y ∈ [0, 1)` and every +integer `i`, +`‖φ(x + i) - φ(y + i)‖ ≤ ‖A(x) - A(y)‖ + 2 ‖B(x) - B(y)‖`. +On `[0, 1)` the values `φ(x) = B(x) - A(x)`, `φ(x + 1) = A(x) - 2 (B(x) - 1)` and +`φ(x + 2) = B(x) - 1` are affine in `(A(x), B(x))`, and `φ(x + i) = 0` for the other `i`. -/ +theorem norm_scalingFun_d4_sub_le {x y : ℝ} (hx : x ∈ Ico (0 : ℝ) 1) (hy : y ∈ Ico (0 : ℝ) 1) + (i : ℤ) : ‖scalingFun d4 (x + i) - scalingFun d4 (y + i)‖ ≤ + ‖d4A x - d4A y‖ + 2 * ‖d4B x - d4B y‖ := by + have hA := norm_nonneg (d4A x - d4A y) + have hB := norm_nonneg (d4B x - d4B y) + by_cases h0 : i = 0 + · subst h0 + rw [Int.cast_zero, add_zero, add_zero, scalingFun_d4_eq_d4B_sub_d4A, + scalingFun_d4_eq_d4B_sub_d4A, + show d4B x - d4A x - (d4B y - d4A y) = (d4B x - d4B y) - (d4A x - d4A y) by ring] + linarith [norm_sub_le (d4B x - d4B y) (d4A x - d4A y)] + by_cases h1 : i = 1 + · subst h1 + rw [Int.cast_one, scalingFun_d4_add_one_eq hx, scalingFun_d4_add_one_eq hy, + show d4A x - 2 * (d4B x - 1) - (d4A y - 2 * (d4B y - 1)) = + (d4A x - d4A y) - 2 * (d4B x - d4B y) by ring] + refine (norm_sub_le _ _).trans (le_of_eq ?_) + rw [norm_mul, Complex.norm_two] + by_cases h2 : i = 2 + · subst h2 + rw [Int.cast_ofNat, scalingFun_d4_add_two_eq hx, scalingFun_d4_add_two_eq hy, + sub_sub_sub_cancel_right] + linarith + · rw [scalingFun_d4_add_int_eq_zero hx ⟨h0, h1, h2⟩, + scalingFun_d4_add_int_eq_zero hy ⟨h0, h1, h2⟩, sub_zero, norm_zero] + positivity + +/-! ### The Hölder exponent -/ + +/-- A bound `‖φ‖ ≤ M` gives `‖A(x)‖ ≤ 3M` for every `x ∈ ℝ`. -/ +theorem norm_d4A_le {M : ℝ} (hM : ∀ x, ‖scalingFun d4 x‖ ≤ M) (x : ℝ) : ‖d4A x‖ ≤ 3 * M := by + calc ‖d4A x‖ ≤ ‖scalingFun d4 (x + 1)‖ + ‖2 * scalingFun d4 (x + 2)‖ := norm_add_le _ _ + _ ≤ 3 * M := by rw [norm_mul, Complex.norm_two]; linarith [hM (x + 1), hM (x + 2)] + +/-- A bound `‖φ‖ ≤ M` gives `‖B(x)‖ ≤ 4M` for every `x ∈ ℝ`. -/ +theorem norm_d4B_le {M : ℝ} (hM : ∀ x, ‖scalingFun d4 x‖ ≤ M) (x : ℝ) : ‖d4B x‖ ≤ 4 * M := by + calc ‖d4B x‖ ≤ ‖scalingFun d4 x‖ + ‖d4A x‖ := norm_add_le _ _ + _ ≤ 4 * M := by linarith [hM x, norm_d4A_le hM x] + +/-- A bound `‖φ‖ ≤ M` gives `‖A(x) - A(y)‖ ≤ 6M` for all `x, y ∈ ℝ` +(`Daubechies.norm_d4A_le`). -/ +theorem norm_d4A_sub_d4A_le {M : ℝ} (hM : ∀ x, ‖scalingFun d4 x‖ ≤ M) (x y : ℝ) : + ‖d4A x - d4A y‖ ≤ 6 * M := by + linarith [norm_sub_le (d4A x) (d4A y), norm_d4A_le hM x, norm_d4A_le hM y] + +/-- A bound `‖φ‖ ≤ M` gives `‖B(x) - B(y)‖ ≤ 8M` for all `x, y ∈ ℝ` +(`Daubechies.norm_d4B_le`). -/ +theorem norm_d4B_sub_d4B_le {M : ℝ} (hM : ∀ x, ‖scalingFun d4 x‖ ≤ M) (x y : ℝ) : + ‖d4B x - d4B y‖ ≤ 8 * M := by + linarith [norm_sub_le (d4B x) (d4B y), norm_d4B_le hM x, norm_d4B_le hM y] + +/-- **The oscillation of D4 on dyadic intervals**: let `‖φ‖ ≤ M` and `ρ = (1 + √3)/4`. For every +`n ∈ ℕ`, every integer `i` and all `x, y` in one dyadic interval `[k/2^n, (k+1)/2^n)` with +`k < 2^n`, +`‖φ(x + i) - φ(y + i)‖ ≤ 28 M ρ^n`. +The dyadic descent gives `‖A(x) - A(y)‖ ≤ 6M / 2^n` (`Daubechies.norm_sub_le_of_halving`) and +`‖B(x) - B(y)‖ ≤ 14 M ρ^n - 6M / 2^n` (`Daubechies.norm_sub_le_of_triangular` with +`β = ρ - 1/2 = (√3 - 1)/4` and `C = E_A = 6M`), and +`Daubechies.norm_scalingFun_d4_sub_le` combines them. -/ +theorem norm_scalingFun_d4_sub_le_dyadic {M : ℝ} (hM : ∀ x, ‖scalingFun d4 x‖ ≤ M) (n : ℕ) + (i : ℤ) {k : ℕ} (hk : k < 2 ^ n) {x y : ℝ} + (hx : x ∈ Ico ((k : ℝ) / 2 ^ n) ((k + 1) / 2 ^ n)) + (hy : y ∈ Ico ((k : ℝ) / 2 ^ n) ((k + 1) / 2 ^ n)) : + ‖scalingFun d4 (x + i) - scalingFun d4 (y + i)‖ ≤ 28 * M * ((1 + √3) / 4) ^ n := by + have h3 := one_lt_sqrt_three + have hA : ∀ (n k : ℕ), k < 2 ^ n → ∀ x ∈ Ico ((k : ℝ) / 2 ^ n) ((k + 1) / 2 ^ n), + ∀ y ∈ Ico ((k : ℝ) / 2 ^ n) ((k + 1) / 2 ^ n), ‖d4A x - d4A y‖ ≤ 6 * M / 2 ^ n := + fun n k hk x hx y hy => norm_sub_le_of_halving (fun x _ y _ => norm_d4A_sub_d4A_le hM x y) + (fun d hd x hx y hy => norm_d4A_sub_le d hd hx hy) n hk hx hy + have hB := norm_sub_le_of_triangular (C := 6 * M) (by linarith) (by positivity) + (le_of_eq (by ring)) hA (fun x _ y _ => norm_d4B_sub_d4B_le hM x y) + (fun d hd x hx y hy => norm_d4B_sub_le d hd hx hy) n hk hx hy + have hφ := norm_scalingFun_d4_sub_le (mem_Ico_zero_one_of_mem_dyadic hk hx) + (mem_Ico_zero_one_of_mem_dyadic hk hy) i + have hA' := hA n k hk x hx y hy + have hM0 : 0 ≤ M := (norm_nonneg _).trans (hM 0) + have h2 : 0 ≤ 6 * M / 2 ^ n := by positivity + linarith + +/-- `ρ = (1 + √3)/4 ≤ 2^(-a)` for every `a ≤ 2 - log₂(1 + √3)`, since +`2^(log₂(1 + √3) - 2) = (1 + √3)/4`. -/ +theorem one_add_sqrt_three_div_four_le {a : ℝ} (ha : a ≤ 2 - Real.logb 2 (1 + √3)) : + (1 + √3) / 4 ≤ (2 : ℝ) ^ (-a) := by + have h3 : (0 : ℝ) < 1 + √3 := by positivity + calc (1 + √3) / 4 = (2 : ℝ) ^ (Real.logb 2 (1 + √3) - 2) := by + rw [Real.rpow_sub two_pos, Real.rpow_logb two_pos (by norm_num) h3, Real.rpow_two] + norm_num + _ ≤ 2 ^ (-a) := Real.rpow_le_rpow_of_exponent_le (by norm_num) (by linarith) + +/-- **The Hölder exponent of D4** (Daubechies–Lagarias): the scaling function `φ` of the +Daubechies mask D4 is Hölder continuous with every exponent `0 ≤ a ≤ 2 - log₂(1 + √3)` +(`≈ 0.5500`): there is `K` with `‖φ(x) - φ(y)‖ ≤ K |x - y|^a` for all `x, y ∈ ℝ`. The exponent is +`-log₂ ρ` for the rate `ρ = (1 + √3)/4` of `Daubechies.norm_scalingFun_d4_sub_le_dyadic`, and +`Daubechies.exists_holder_of_unit_dyadic` turns the dyadic bounds `28 M ρ^n` into the Hölder +estimate (`M = ∫ ‖Φ‖ ≥ sup ‖φ‖`, `Daubechies.norm_scalingFun_le`). -/ +theorem holder_d4 {a : ℝ} (ha0 : 0 ≤ a) (ha : a ≤ 2 - Real.logb 2 (1 + √3)) : + ∃ K, ∀ x y, ‖scalingFun d4 x - scalingFun d4 y‖ ≤ K * |x - y| ^ a := by + have hM := norm_scalingFun_le d4 + have hM0 : 0 ≤ ∫ ξ, ‖symbolProduct d4 ξ‖ := (norm_nonneg _).trans (hM 0) + exact exists_holder_of_unit_dyadic (continuous_scalingFun d4 le_rfl) hM (by positivity) + (by positivity) (one_add_sqrt_three_div_four_le ha) ha0 + fun n i k hk x hx y hy => norm_scalingFun_d4_sub_le_dyadic hM n i hk hx hy + +/-- `(1 + √3)^20 = 268377088 + 154947584 √3`, by repeated squaring with `(√3)² = 3`: +`(1 + √3)² = 4 + 2√3`, `(1 + √3)^4 = 28 + 16√3`, `(1 + √3)^8 = 1552 + 896√3`, +`(1 + √3)^16 = 4817152 + 2781184√3`. -/ +theorem one_add_sqrt_three_pow_twenty : (1 + √3) ^ 20 = 268377088 + 154947584 * √3 := by + have hs : √3 ^ 2 = 3 := Real.sq_sqrt (by norm_num) + have h2 : (1 + √3) ^ 2 = 4 + 2 * √3 := by linear_combination hs + have h4 : (1 + √3) ^ 4 = 28 + 16 * √3 := by + rw [show (1 + √3) ^ 4 = ((1 + √3) ^ 2) ^ 2 by ring, h2] + linear_combination 4 * hs + have h8 : (1 + √3) ^ 8 = 1552 + 896 * √3 := by + rw [show (1 + √3) ^ 8 = ((1 + √3) ^ 4) ^ 2 by ring, h4] + linear_combination 256 * hs + have h16 : (1 + √3) ^ 16 = 4817152 + 2781184 * √3 := by + rw [show (1 + √3) ^ 16 = ((1 + √3) ^ 8) ^ 2 by ring, h8] + linear_combination 802816 * hs + rw [show (1 + √3) ^ 20 = (1 + √3) ^ 16 * (1 + √3) ^ 4 by ring, h16, h4] + linear_combination 44498944 * hs + +/-- **The Hölder exponent of D4 exceeds `0.55`**: `2 - log₂(1 + √3) > 0.55`. Equivalently +`1 + √3 < 2^(29/20)`, that is `(1 + √3)^20 < 2^29 = 536870912`; by +`Daubechies.one_add_sqrt_three_pow_twenty` this is `154947584 √3 < 268493824`, which holds since +`√3 < 1.7321`. -/ +theorem two_sub_logb_two_one_add_sqrt_three_gt : (0.55 : ℝ) < 2 - Real.logb 2 (1 + √3) := by + have hs : √3 < 1.7321 := by + rw [Real.sqrt_lt' (by norm_num)] + norm_num + have hlt : (1 + √3) ^ 20 < ((2 : ℝ) ^ (1.45 : ℝ)) ^ 20 := by + rw [one_add_sqrt_three_pow_twenty, ← Real.rpow_natCast, ← Real.rpow_mul (by norm_num)] + norm_num + linarith + have hlog : Real.logb 2 (1 + √3) < 1.45 := by + rw [Real.logb_lt_iff_lt_rpow (by norm_num) (by positivity)] + exact lt_of_pow_lt_pow_left₀ 20 (by positivity) hlt + linarith + +end D4 + +end Daubechies diff --git a/LeanPool/FunctionSpaces/Wavelets/Examples/Daubechies/OrderThree.lean b/LeanPool/FunctionSpaces/Wavelets/Examples/Daubechies/OrderThree.lean new file mode 100644 index 0000000000..09a7e63d12 --- /dev/null +++ b/LeanPool/FunctionSpaces/Wavelets/Examples/Daubechies/OrderThree.lean @@ -0,0 +1,312 @@ +/- +Copyright (c) 2026 Mario Ullrich. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Mario Ullrich +-/ +module + +public import LeanPool.FunctionSpaces.Wavelets.Examples.Daubechies.Besov +public import LeanPool.FunctionSpaces.Wavelets.Examples.Daubechies.MaskExistence + +/- +Modified for Lean Pool: module names and imports adapted. +-/ + +/-! +# Daubechies wavelets of order three + +This file collects the regularity of the scaling function `φ` (`Daubechies.scalingFun`) of a +Daubechies mask of order `N = 3` and the characterisation of `B^s_{p,q}(ℝ)` by its coefficients. +All exponents come from the growth bound `T^n 1 ≤ 2 · 9^n` of the transfer operator +(`Daubechies.transferGrowth_three`), whose Sobolev exponent is +`3 - log₄ 9 = 3 - log₂ 3 ≈ 1.415` (`Daubechies.three_sub_logb_four_nine`). Masks of order three +exist (`Daubechies.exists_mask`), so every statement below applies to at least one mask +(`Daubechies.exists_mask_order_three_regular`). For every mask `m : Mask 3`: + +* **Sobolev regularity.** `∫ (1 + |ξ|)^(2s) |𝓕 φ(ξ)|² dξ < ∞`, that is `φ ∈ H^s`, for every + `s < 3 - log₂ 3` (`Daubechies.sobolev_scalingFun_order_three`). In terms of moduli of + smoothness, `ω_r(φ, t)_p ≤ K t^s` for `p ≤ 2`, `0 < t ≤ 1` and `0 ≤ s < 3 - log₂ 3`, `s ≤ r` + (`Daubechies.modulus_scalingFun_le_two_order_three`), and hence + `‖(2^(ks) ω_r(φ, 2^(-k))_p)_k‖_{ℓ_q} < ∞` for every `q ≥ 1` and `0 ≤ s < min(r, 3 - log₂ 3)` + (`Daubechies.lqNorm_modulus_scalingFun_lt_top_order_three`), which for `p = q = 2` is the + Besov description `H^s = B^s_{2,2}`. +* **Hölder regularity.** `|φ(x) - φ(y)| ≤ K |x - y|^a` for every `0 ≤ a < 5/2 - log₂ 3 ≈ 0.915` + (`Daubechies.holder_scalingFun_order_three`), in particular for `a = 9/10` + (`Daubechies.holder_scalingFun_order_three_nine_tenths`), since `log₂ 3 < 8/5`. +* **Besov spaces by coefficients.** For `1 ≤ q ≤ ∞` and every `f ∈ L_p(ℝ)`, + `‖f‖_p + ‖(2^(ks) ω_3(f, 2^(-k))_p)_k‖_{ℓ_q} < ∞` iff the coefficient quasi-norm + `‖(⟨f, φ(· - k)⟩)_k‖_{ℓ_p} + ‖(2^(j(s + 1/2 - 1/p)) ‖(⟨f, ψ_{j,k}⟩)_k‖_{ℓ_p})_j‖_{ℓ_q}` + (`Daubechies.coeffNorm`) is finite, for `1 ≤ p ≤ 2` and `0 < s < 3 - log₂ 3` + (`Daubechies.besov_iff_coeff_order_three_le_two`) and for `2 ≤ p < ∞` and + `0 < s < (2/p)(3 - log₂ 3) + (1 - 2/p)(5/2 - log₂ 3) = 5/2 - log₂ 3 + 1/p` + (`Daubechies.besov_iff_coeff_order_three_two_le`), hence for every `1 ≤ p < ∞` and + `0 < s < 5/2 - log₂ 3` (`Daubechies.besov_iff_coeff_order_three`); likewise with the + Littlewood–Paley quasi-norm in place of the moduli of smoothness + (`Daubechies.littlewoodPaleyNorm_lt_top_iff_coeff_order_three_le_two`, + `Daubechies.littlewoodPaleyNorm_lt_top_iff_coeff_order_three_two_le`). + +The characterisations are the general theorems `Daubechies.besov_iff_coeff_of_le_two` and +`Daubechies.besov_iff_coeff_of_two_le` for the growth bound of order three. For `p > 2` they need +orders `s' < 3 - log₂ 3` and `a < 5/2 - log₂ 3` with `s < (2/p) s' + (1 - 2/p) a`; since the +bound on `s` is strict, both orders can be taken a common `ε > 0` below their bounds +(`Daubechies.exists_orders_of_lt_interp`, `Daubechies.exists_orders_order_three`). The modulus of +smoothness has order `3` throughout (`Rd.lpModulus p 3`); every order `r > s` describes the same +space (`Rd.modNorm_le_modNorm_of_lt`). +-/ + +@[expose] public section + +open MeasureTheory +open scoped ENNReal FourierTransform +open ENNReal (dyadicWeight) + +namespace Daubechies + +/-! ### The exponents of order three -/ + +/-- **An upper bound for `log₂ 3`**: `log₂ 3 < 8/5`, since `3^5 = 243 < 256 = 2^8` (Mathlib's +`Real.log_lt_log`, `Real.log_pow`). Hence the Sobolev exponent of order three satisfies +`3 - log₂ 3 > 7/5` and the Hölder exponent `5/2 - log₂ 3 > 9/10`; together with +`log₂ 3 > 3/2` (`Daubechies.three_halves_lt_logb_two_three`) both lie in intervals of length +`1/10`. -/ +theorem logb_two_three_lt_eight_fifths : Real.logb 2 3 < 8 / 5 := by + rw [← Real.log_div_log, div_lt_iff₀ (Real.log_pos one_lt_two)] + have h : Real.log (3 ^ 5) < Real.log (2 ^ 8) := Real.log_lt_log (by norm_num) (by norm_num) + rw [Real.log_pow, Real.log_pow] at h + push_cast at h + linarith + +/-- **Interpolated orders below their bounds**: for real `σ, α > 0`, every weight `w` and every +`s < w σ + (1 - w) α` there are `s', a` with `0 ≤ s' < σ`, `0 ≤ a < α` and +`s < w s' + (1 - w) a`. Take `s' = σ - ε` and `a = α - ε` with +`0 < ε < min(σ, α, w σ + (1 - w) α - s)` (Mathlib's `exists_between`); then +`w s' + (1 - w) a = w σ + (1 - w) α - ε > s`. -/ +theorem exists_orders_of_lt_interp {w σ α s : ℝ} (hσ : 0 < σ) (hα : 0 < α) + (hs : s < w * σ + (1 - w) * α) : + ∃ s' a : ℝ, 0 ≤ s' ∧ s' < σ ∧ 0 ≤ a ∧ a < α ∧ s < w * s' + (1 - w) * a := by + obtain ⟨ε, hε0, hε⟩ := exists_between (lt_min (lt_min hσ hα) (sub_pos.2 hs)) + simp only [lt_min_iff] at hε + obtain ⟨⟨hεσ, hεα⟩, hεs⟩ := hε + refine ⟨σ - ε, α - ε, by linarith, by linarith, by linarith, by linarith, ?_⟩ + linarith [show w * (σ - ε) + (1 - w) * (α - ε) = w * σ + (1 - w) * α - ε by ring] + +/-! ### Sobolev regularity -/ + +/-- **The weighted `L²` bound on the symbol product of order three**: for every Daubechies mask +of order `N = 3` and every real `s < 3 - log₂ 3 ≈ 1.415`, +`∫ (1 + |ξ|)^(2s) |Φ(ξ)|² dξ < ∞` for the symbol product `Φ` (`Daubechies.symbolProduct`). +This is `Daubechies.integrable_rpow_mul_normSq` for the growth bound `T^n 1 ≤ 2 · 9^n` +(`Daubechies.transferGrowth_three`), whose exponent is `3 - log₄ 9 = 3 - log₂ 3` +(`Daubechies.three_sub_logb_four_nine`). -/ +theorem integrable_rpow_mul_normSq_order_three (m : Mask 3) {s : ℝ} + (hs : s < 3 - Real.logb 2 3) : + Integrable (fun ξ => (1 + |ξ|) ^ (2 * s) * ‖symbolProduct m ξ‖ ^ 2) := + integrable_rpow_mul_normSq m transferGrowth_three + (by rw [Nat.cast_ofNat, three_sub_logb_four_nine]; exact hs) + +/-- **The scaling function of order three lies in `H^s` for every `s < 3 - log₂ 3`**: for every +Daubechies mask of order `N = 3` and every real `s < 3 - log₂ 3 ≈ 1.415`, +`∫ (1 + |ξ|)^(2s) |𝓕 φ(ξ)|² dξ < ∞`, which is the Fourier description of the Sobolev space +`H^s(ℝ)`. The Fourier transform of `φ` is the symbol product `Φ` +(`Daubechies.fourier_scalingFun`), so this is +`Daubechies.integrable_rpow_mul_normSq_order_three`. -/ +theorem sobolev_scalingFun_order_three (m : Mask 3) {s : ℝ} (hs : s < 3 - Real.logb 2 3) : + Integrable (fun ξ => (1 + |ξ|) ^ (2 * s) * ‖𝓕 (scalingFun m) ξ‖ ^ 2) := by + rw [fourier_scalingFun m (by norm_num)] + exact integrable_rpow_mul_normSq_order_three m hs + +/-- **Power bounds give finite Besov seminorms**: let `F : ℝ → [0, ∞]` satisfy `F(t) ≤ K t^θ` +for all `0 < t ≤ 1`, with a finite constant `K`. Then for every `s < θ` and `1 ≤ q ≤ ∞`, +`‖(2^(ks) F(2^(-k)))_k‖_{ℓ_q} < ∞`. Indeed `2^(ks) F(2^(-k)) ≤ K 2^(-k(θ - s))` +(`ENNReal.ofReal_one_div_two_pow_rpow`, `ENNReal.dyadicWeight_add`), and the geometric sequence +`(2^(-k(θ - s)))_k` has `ℓ_q` norm at most `(1 - 2^(-(θ - s)))⁻¹ < ∞` +(`ENNReal.lqNorm_dyadicWeight_neg_le`). -/ +theorem lqNorm_dyadicWeight_mul_lt_top_of_le_rpow {F : ℝ → ℝ≥0∞} {K : ℝ≥0∞} (hK : K ≠ ∞) + {θ : ℝ} (hF : ∀ t ∈ Set.Ioc (0 : ℝ) 1, F t ≤ K * ENNReal.ofReal (t ^ θ)) {s : ℝ} + (hsθ : s < θ) {q : ℝ≥0∞} (hq : 1 ≤ q) : + ENNReal.lqNorm q (fun k : ℕ => dyadicWeight s k * F (1 / 2 ^ k)) < ∞ := by + have hle : ∀ k : ℕ, dyadicWeight s k * F (1 / 2 ^ k) ≤ K * dyadicWeight (-(θ - s)) k := by + intro k + have ht : (1 / 2 ^ k : ℝ) ∈ Set.Ioc 0 1 := + ⟨by positivity, by rw [div_le_one (by positivity)]; exact one_le_pow₀ one_le_two⟩ + calc dyadicWeight s k * F (1 / 2 ^ k) + ≤ dyadicWeight s k * (K * dyadicWeight (-θ) k) := by + rw [← ENNReal.ofReal_one_div_two_pow_rpow] + exact mul_le_mul_right (hF _ ht) _ + _ = K * dyadicWeight (-(θ - s)) k := by + rw [mul_left_comm, ← ENNReal.dyadicWeight_add] + congr 2 + ring + calc ENNReal.lqNorm q (fun k : ℕ => dyadicWeight s k * F (1 / 2 ^ k)) + ≤ ENNReal.lqNorm q (fun k : ℕ => K * dyadicWeight (-(θ - s)) k) := ENNReal.lqNorm_mono hle + _ = K * ENNReal.lqNorm q (dyadicWeight (-(θ - s))) := ENNReal.lqNorm_const_mul _ _ + _ ≤ K * (1 - (2 : ℝ≥0∞) ^ (-(θ - s)))⁻¹ := + mul_le_mul_right (ENNReal.lqNorm_dyadicWeight_neg_le hq _) _ + _ < ∞ := ENNReal.mul_lt_top hK.lt_top + (ENNReal.one_sub_two_rpow_neg_inv_ne_top (by linarith)).lt_top + +/-- **A Bernstein bound gives finite Besov seminorms of `φ`**: if the scaling function `φ` of a +Daubechies mask has a Bernstein bound `ω_r(φ, t)_p ≤ K t^θ` for `0 < t ≤ 1` +(`Daubechies.BernsteinBound`), then `‖(2^(ks) ω_r(φ, 2^(-k))_p)_k‖_{ℓ_q} < ∞` for every `s < θ` +and `1 ≤ q ≤ ∞` (`Daubechies.lqNorm_dyadicWeight_mul_lt_top_of_le_rpow`). -/ +theorem BernsteinBound.lqNorm_modulus_lt_top {N : ℕ} {m : Mask N} {p : ℝ≥0∞} {θ : ℝ} {r : ℕ} + (hB : BernsteinBound m p θ r) {s : ℝ} (hsθ : s < θ) {q : ℝ≥0∞} (hq : 1 ≤ q) : + ENNReal.lqNorm q + (fun k : ℕ => dyadicWeight s k * Rd.modulus volume r p (scalingFun m) (1 / 2 ^ k)) < ∞ := + let ⟨_, hK, hmod⟩ := hB + lqNorm_dyadicWeight_mul_lt_top_of_le_rpow hK hmod hsθ hq + +/-- **The Besov seminorms of the scaling function of order three, `p ≤ 2`**: for every +Daubechies mask of order `N = 3`, every `p ≤ 2`, every `1 ≤ q ≤ ∞`, every order `r ∈ ℕ` and every +real `s` with `0 ≤ s < r` and `s < 3 - log₂ 3`, +`‖(2^(ks) ω_r(φ, 2^(-k))_p)_k‖_{ℓ_q} < ∞`. For `p = q = 2` and `s > 0` this is the regularity +`φ ∈ H^s` in the Besov form `H^s = B^s_{2,2}`. The order `θ = (s + min(r, 3 - log₂ 3))/2` lies in +`(s, min(r, 3 - log₂ 3))`, so `φ` has a Bernstein bound of order `θ` +(`Daubechies.bernsteinBound_order_three`) and +`Daubechies.BernsteinBound.lqNorm_modulus_lt_top` applies. -/ +theorem lqNorm_modulus_scalingFun_lt_top_order_three (m : Mask 3) {p : ℝ≥0∞} (hp2 : p ≤ 2) + {q : ℝ≥0∞} (hq : 1 ≤ q) {r : ℕ} {s : ℝ} (hs0 : 0 ≤ s) (hsr : s < r) + (hs : s < 3 - Real.logb 2 3) : + ENNReal.lqNorm q + (fun k : ℕ => dyadicWeight s k * Rd.modulus volume r p (scalingFun m) (1 / 2 ^ k)) < ∞ := by + have h1 : min (r : ℝ) (3 - Real.logb 2 3) ≤ r := min_le_left _ _ + have h2 : min (r : ℝ) (3 - Real.logb 2 3) ≤ 3 - Real.logb 2 3 := min_le_right _ _ + have h3 : s < min (r : ℝ) (3 - Real.logb 2 3) := lt_min hsr hs + exact (bernsteinBound_order_three m hp2 (s := (s + min (r : ℝ) (3 - Real.logb 2 3)) / 2) + (by linarith) (by linarith) (by linarith)).lqNorm_modulus_lt_top (by linarith) hq + +/-! ### Hölder regularity -/ + +/-- **The scaling function of order three is Hölder continuous of order `9/10`**: for every +Daubechies mask of order `N = 3` there is a constant `K` with +`|φ(x) - φ(y)| ≤ K |x - y|^(9/10)` for all `x, y ∈ ℝ`. The Hölder estimate of order three +(`Daubechies.holder_scalingFun_order_three`) holds for every `0 ≤ a < 5/2 - log₂ 3 ≈ 0.915`, and +`9/10 < 5/2 - log₂ 3` since `log₂ 3 < 8/5` (`Daubechies.logb_two_three_lt_eight_fifths`). -/ +theorem holder_scalingFun_order_three_nine_tenths (m : Mask 3) : + ∃ K : ℝ, ∀ x y : ℝ, ‖scalingFun m x - scalingFun m y‖ ≤ K * |x - y| ^ (9 / 10 : ℝ) := + holder_scalingFun_order_three m (by norm_num) (by linarith [logb_two_three_lt_eight_fifths]) + +/-! ### Besov spaces by Daubechies coefficients -/ + +section Lp + +variable {p : ℝ≥0∞} [Fact (1 ≤ p)] + +/-- **Besov spaces by Daubechies coefficients of order three, `p ≤ 2`**: for every Daubechies +mask of order `N = 3`, every `1 ≤ p ≤ 2`, every `1 ≤ q ≤ ∞` and every `0 < s < 3 - log₂ 3`, an +`f ∈ L_p(ℝ)` satisfies `‖f‖_p + ‖(2^(ks) ω_3(f, 2^(-k))_p)_k‖_{ℓ_q} < ∞` iff +`‖(⟨f, φ(· - k)⟩)_k‖_{ℓ_p} + ‖(2^(j(s + 1/2 - 1/p)) ‖(⟨f, ψ_{j,k}⟩)_k‖_{ℓ_p})_j‖_{ℓ_q} < ∞` +(`Daubechies.coeffNorm`). This is `Daubechies.besov_iff_coeff_of_le_two` for the growth bound +`T^n 1 ≤ 2 · 9^n` (`Daubechies.transferGrowth_three`), whose exponent is +`3 - log₄ 9 = 3 - log₂ 3` (`Daubechies.three_sub_logb_four_nine`); `p ≤ 2` forces `p < ∞`. -/ +theorem besov_iff_coeff_order_three_le_two (m : Mask 3) (hp2 : p ≤ 2) {s : ℝ} (hs : 0 < s) + (hsl : s < 3 - Real.logb 2 3) {q : ℝ≥0∞} (hq : 1 ≤ q) (f : Lp ℂ p (volume : Measure ℝ)) : + ‖f‖ₑ + ENNReal.lqNorm q (fun k => dyadicWeight s k * Rd.lpModulus p 3 f k) < ∞ ↔ + coeffNorm m p s q f < ∞ := + besov_iff_coeff_of_le_two m (by norm_num) (ne_top_of_le_ne_top ENNReal.ofNat_ne_top hp2) hp2 + transferGrowth_three hs (by rw [Nat.cast_ofNat, three_sub_logb_four_nine]; exact hsl) hq f + +/-- **Littlewood–Paley blocks and Daubechies coefficients of order three, `p ≤ 2`**: for every +Daubechies mask of order `N = 3`, every `1 ≤ p ≤ 2`, every `1 ≤ q ≤ ∞` and every +`0 < s < 3 - log₂ 3`, the Littlewood–Paley quasi-norm `‖(2^(js) ‖Δ_j f‖_p)_j‖_{ℓ_q}` +(`Rd.littlewoodPaleyNorm`) of an `f ∈ L_p(ℝ)` is finite iff its coefficient quasi-norm +`Daubechies.coeffNorm` is (`Daubechies.littlewoodPaleyNorm_lt_top_iff_coeff_of_le_two` for the +growth bound `Daubechies.transferGrowth_three`). -/ +theorem littlewoodPaleyNorm_lt_top_iff_coeff_order_three_le_two (m : Mask 3) (hp : p ≠ ∞) + (hp2 : p ≤ 2) {s : ℝ} (hs : 0 < s) (hsl : s < 3 - Real.logb 2 3) {q : ℝ≥0∞} (hq : 1 ≤ q) + (f : Lp ℂ p (volume : Measure ℝ)) : + Rd.littlewoodPaleyNorm hp s q f < ∞ ↔ coeffNorm m p s q f < ∞ := + littlewoodPaleyNorm_lt_top_iff_coeff_of_le_two m (by norm_num) hp hp2 transferGrowth_three hs + (by rw [Nat.cast_ofNat, three_sub_logb_four_nine]; exact hsl) hq f + +/-- **The orders of order three for `p ≥ 2`**: for every weight `w` and every +`s < w (3 - log₂ 3) + (1 - w)(5/2 - log₂ 3)` there are `s', a` with +`0 ≤ s' < 3 - log₄ 9`, `0 ≤ a < 3 - log₄ 9 - 1/2` and `s < w s' + (1 - w) a`, in the form that +`Daubechies.besov_iff_coeff_of_two_le` takes for the growth bound +`Daubechies.transferGrowth_three` (`Daubechies.exists_orders_of_lt_interp`; both bounds are +positive since `log₂ 3 < 8/5`, `Daubechies.logb_two_three_lt_eight_fifths`). -/ +theorem exists_orders_order_three {w s : ℝ} + (hs : s < w * (3 - Real.logb 2 3) + (1 - w) * (5 / 2 - Real.logb 2 3)) : + ∃ s' a : ℝ, 0 ≤ s' ∧ s' < ((3 : ℕ) : ℝ) - Real.logb 4 9 ∧ 0 ≤ a ∧ + a < ((3 : ℕ) : ℝ) - Real.logb 4 9 - 1 / 2 ∧ s < w * s' + (1 - w) * a := by + have hl := logb_two_three_lt_eight_fifths + obtain ⟨s', a, hs'0, hs', ha0, ha, hsθ⟩ := + exists_orders_of_lt_interp (by linarith) (by linarith) hs + rw [Nat.cast_ofNat, three_sub_logb_four_nine] + exact ⟨s', a, hs'0, hs', ha0, by linarith, hsθ⟩ + +/-- **Besov spaces by Daubechies coefficients of order three, `p ≥ 2`**: for every Daubechies +mask of order `N = 3`, every `2 ≤ p < ∞`, every `1 ≤ q ≤ ∞` and every `s` with +`0 < s < (2/p)(3 - log₂ 3) + (1 - 2/p)(5/2 - log₂ 3)`, an `f ∈ L_p(ℝ)` satisfies +`‖f‖_p + ‖(2^(ks) ω_3(f, 2^(-k))_p)_k‖_{ℓ_q} < ∞` iff +`‖(⟨f, φ(· - k)⟩)_k‖_{ℓ_p} + ‖(2^(j(s + 1/2 - 1/p)) ‖(⟨f, ψ_{j,k}⟩)_k‖_{ℓ_p})_j‖_{ℓ_q} < ∞` +(`Daubechies.coeffNorm`). The bound on `s` equals `5/2 - log₂ 3 + 1/p`: it is `3 - log₂ 3` for +`p = 2` and decreases to the Hölder exponent `5/2 - log₂ 3` as `p → ∞`. Orders +`s' < 3 - log₂ 3` and `a < 5/2 - log₂ 3` with `s < (2/p) s' + (1 - 2/p) a` +(`Daubechies.exists_orders_order_three`) make `Daubechies.besov_iff_coeff_of_two_le` applicable +with the growth bound `Daubechies.transferGrowth_three`. -/ +theorem besov_iff_coeff_order_three_two_le (m : Mask 3) (hp : p ≠ ∞) (hp2 : 2 ≤ p) {s : ℝ} + (hs : 0 < s) + (hsθ : s < 2 / p.toReal * (3 - Real.logb 2 3) + (1 - 2 / p.toReal) * (5 / 2 - Real.logb 2 3)) + {q : ℝ≥0∞} (hq : 1 ≤ q) (f : Lp ℂ p (volume : Measure ℝ)) : + ‖f‖ₑ + ENNReal.lqNorm q (fun k => dyadicWeight s k * Rd.lpModulus p 3 f k) < ∞ ↔ + coeffNorm m p s q f < ∞ := + let ⟨_, _, hs'0, hs', ha0, ha, hsθ'⟩ := exists_orders_order_three hsθ + besov_iff_coeff_of_two_le m (by norm_num) hp hp2 transferGrowth_three hs'0 hs' ha0 ha hs hsθ' + hq f + +/-- **Littlewood–Paley blocks and Daubechies coefficients of order three, `p ≥ 2`**: for every +Daubechies mask of order `N = 3`, every `2 ≤ p < ∞`, every `1 ≤ q ≤ ∞` and every `s` with +`0 < s < (2/p)(3 - log₂ 3) + (1 - 2/p)(5/2 - log₂ 3)`, the Littlewood–Paley quasi-norm +`‖(2^(js) ‖Δ_j f‖_p)_j‖_{ℓ_q}` (`Rd.littlewoodPaleyNorm`) of an `f ∈ L_p(ℝ)` is finite iff its +coefficient quasi-norm `Daubechies.coeffNorm` is +(`Daubechies.littlewoodPaleyNorm_lt_top_iff_coeff_of_two_le` with the orders of +`Daubechies.exists_orders_order_three`). -/ +theorem littlewoodPaleyNorm_lt_top_iff_coeff_order_three_two_le (m : Mask 3) (hp : p ≠ ∞) + (hp2 : 2 ≤ p) {s : ℝ} (hs : 0 < s) + (hsθ : s < 2 / p.toReal * (3 - Real.logb 2 3) + (1 - 2 / p.toReal) * (5 / 2 - Real.logb 2 3)) + {q : ℝ≥0∞} (hq : 1 ≤ q) (f : Lp ℂ p (volume : Measure ℝ)) : + Rd.littlewoodPaleyNorm hp s q f < ∞ ↔ coeffNorm m p s q f < ∞ := + let ⟨_, _, hs'0, hs', ha0, ha, hsθ'⟩ := exists_orders_order_three hsθ + littlewoodPaleyNorm_lt_top_iff_coeff_of_two_le m (by norm_num) hp hp2 transferGrowth_three hs'0 + hs' ha0 ha hs hsθ' hq f + +/-- **Besov spaces by Daubechies coefficients of order three for every `p`**: for every +Daubechies mask of order `N = 3`, every `1 ≤ p < ∞`, every `1 ≤ q ≤ ∞` and every +`0 < s < 5/2 - log₂ 3 ≈ 0.915`, an `f ∈ L_p(ℝ)` satisfies +`‖f‖_p + ‖(2^(ks) ω_3(f, 2^(-k))_p)_k‖_{ℓ_q} < ∞` iff +`‖(⟨f, φ(· - k)⟩)_k‖_{ℓ_p} + ‖(2^(j(s + 1/2 - 1/p)) ‖(⟨f, ψ_{j,k}⟩)_k‖_{ℓ_p})_j‖_{ℓ_q} < ∞` +(`Daubechies.coeffNorm`). For `p ≤ 2` this is `Daubechies.besov_iff_coeff_order_three_le_two`, +since `5/2 - log₂ 3 < 3 - log₂ 3`; for `p ≥ 2` it is +`Daubechies.besov_iff_coeff_order_three_two_le`, since the bound there is +`5/2 - log₂ 3 + 1/p ≥ 5/2 - log₂ 3`. -/ +theorem besov_iff_coeff_order_three (m : Mask 3) (hp : p ≠ ∞) {s : ℝ} (hs : 0 < s) + (hsa : s < 5 / 2 - Real.logb 2 3) {q : ℝ≥0∞} (hq : 1 ≤ q) + (f : Lp ℂ p (volume : Measure ℝ)) : + ‖f‖ₑ + ENNReal.lqNorm q (fun k => dyadicWeight s k * Rd.lpModulus p 3 f k) < ∞ ↔ + coeffNorm m p s q f < ∞ := by + rcases le_total p 2 with hp2 | hp2 + · exact besov_iff_coeff_order_three_le_two m hp2 hs (by linarith) hq f + · have hw := (two_div_toReal_mem_Icc hp hp2).1 + exact besov_iff_coeff_order_three_two_le m hp hp2 hs (by linarith) hq f + +end Lp + +/-! ### Existence -/ + +/-- **A regular Daubechies wavelet of order three exists**: there is a Daubechies mask of order +`N = 3` (`Daubechies.exists_mask`), and its scaling function `φ` lies in `H^s` for every +`s < 3 - log₂ 3 ≈ 1.415`, `∫ (1 + |ξ|)^(2s) |𝓕 φ(ξ)|² dξ < ∞` +(`Daubechies.sobolev_scalingFun_order_three`), and is Hölder continuous of every order +`0 ≤ a < 5/2 - log₂ 3 ≈ 0.915` (`Daubechies.holder_scalingFun_order_three`). The Besov +characterisations of this file therefore apply to at least one mask. -/ +theorem exists_mask_order_three_regular : + ∃ m : Mask 3, (∀ s : ℝ, s < 3 - Real.logb 2 3 → + Integrable (fun ξ => (1 + |ξ|) ^ (2 * s) * ‖𝓕 (scalingFun m) ξ‖ ^ 2)) ∧ + ∀ a : ℝ, 0 ≤ a → a < 5 / 2 - Real.logb 2 3 → + ∃ K : ℝ, ∀ x y : ℝ, ‖scalingFun m x - scalingFun m y‖ ≤ K * |x - y| ^ a := + let ⟨m⟩ := exists_mask (N := 3) (by norm_num) + ⟨m, fun _ hs => sobolev_scalingFun_order_three m hs, + fun _ ha0 ha => holder_scalingFun_order_three m ha0 ha⟩ + +end Daubechies diff --git a/LeanPool/FunctionSpaces/Wavelets/Examples/Daubechies/Orthonormality.lean b/LeanPool/FunctionSpaces/Wavelets/Examples/Daubechies/Orthonormality.lean new file mode 100644 index 0000000000..b494cfcf0b --- /dev/null +++ b/LeanPool/FunctionSpaces/Wavelets/Examples/Daubechies/Orthonormality.lean @@ -0,0 +1,365 @@ +/- +Copyright (c) 2026 Mario Ullrich. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Mario Ullrich +-/ +module + +public import LeanPool.FunctionSpaces.Wavelets.Examples.Daubechies.Cascade +public import LeanPool.FunctionSpaces.Wavelets.Examples.Daubechies.FilterIdentities + +/- +Modified for Lean Pool: module names and imports adapted. +-/ + +/-! +# Orthonormality of the integer translates of the scaling function + +For a Daubechies mask of order `N ≥ 2` with symbol `m_0` (`Daubechies.symbol`), symbol product +`Φ(ξ) = ∏_{j ≥ 0} m_0(ξ/2^(j+1))` (`Daubechies.symbolProduct`) and scaling function `φ = 𝓕⁻ Φ` +(`Daubechies.scalingFun`), this file proves that the integer translates of `φ` are orthonormal: + +`∫ φ(x - k) conj φ(x - l) dx = δ_(kl)` for all `k, l ∈ ℤ` +(`Daubechies.integral_scalingFun_translate_mul_conj_translate`), where `δ_(kl)` is `1` for `k = l` +and `0` otherwise. + +* **Truncated products.** The functions + `Φ_n(ξ) = ∏_{j 0` a lower bound of `|Φ|` on `[-1/2, 1/2]`, `|Φ_n| ≤ |Φ|/κ` + (`Daubechies.norm_truncProduct_le`), since `Φ(ξ) = Φ_n(ξ) Φ(ξ/2^n)` for `ξ ∈ [-2^n/2, 2^n/2)`, + and `Φ_n → Φ` pointwise (`Daubechies.tendsto_truncProduct`). As `|Φ|²` is integrable, dominated + convergence gives `∫ w(ξ) |Φ(ξ)|² dξ = ∫_0^1 w(ξ) dξ` + (`Daubechies.integral_periodic_mul_normSq_symbolProduct`). For `w(ξ) = e^(-2πikξ)` this says + `∫ |Φ(ξ)|² e^(-2πikξ) dξ = δ_(k0)` for `k ∈ ℤ` + (`Daubechies.integral_normSq_symbolProduct_mul_expFreq`). +* **Orthonormality.** Parseval's identity for integrable functions with integrable transforms + (`Real.integral_mul_conj_eq_integral_fourier`), `𝓕 φ = Φ` (`Daubechies.fourier_scalingFun`) and + the translation rule `𝓕[φ(· - k)](ξ) = e^(-2πikξ) Φ(ξ)` (`Real.fourier_comp_sub_right_apply`) + give `∫ φ(x - k) conj φ(x) dx = ∫ e^(-2πikξ) |Φ(ξ)|² dξ = δ_(k0)` + (`Daubechies.integral_scalingFun_translate_mul_conj`). The substitution `x ↦ x + l` gives the + form for two translates, and since `φ` is real, also `∫ φ(x - k) φ(x - l) dx = δ_(kl)` + (`Daubechies.integral_scalingFun_translate_mul_translate`). +-/ + +@[expose] public section + +open Filter MeasureTheory Topology +open scoped Real FourierTransform ComplexConjugate + +namespace Daubechies + +/-! ### Substitutions -/ + +/-- **Splitting a period into two halves**: `∫_0^1 g(ζ) dζ = ∫_0^(1/2) (g(ζ) + g(ζ + 1/2)) dζ` +for every continuous `g : ℝ → ℂ`. The integral over `[1/2, 1]` is the integral of `g(· + 1/2)` +over `[0, 1/2]` (Mathlib's `intervalIntegral.integral_comp_add_right`). -/ +theorem intervalIntegral_zero_one_eq_add_half {g : ℝ → ℂ} (hg : Continuous g) : + ∫ ζ in (0 : ℝ)..1, g ζ = ∫ ζ in (0 : ℝ)..1 / 2, (g ζ + g (ζ + 1 / 2)) := by + have hg' : Continuous fun ζ => g (ζ + 1 / 2) := hg.comp (continuous_id.add continuous_const) + rw [intervalIntegral.integral_add (hg.intervalIntegrable _ _) (hg'.intervalIntegrable _ _), + intervalIntegral.integral_comp_add_right g (1 / 2), zero_add, add_halves, + intervalIntegral.integral_add_adjacent_intervals (hg.intervalIntegrable _ _) + (hg.intervalIntegrable _ _)] + +/-- **The doubling substitution on a half period**: `2 ∫_0^(1/2) w(2ζ) dζ = ∫_0^1 w(ξ) dξ` for +every `w : ℝ → ℂ`, by the substitution `ξ = 2ζ` (Mathlib's +`intervalIntegral.smul_integral_comp_mul_left`). -/ +theorem two_mul_intervalIntegral_comp_two_mul (w : ℝ → ℂ) : + 2 * ∫ ζ in (0 : ℝ)..1 / 2, w (2 * ζ) = ∫ ξ in (0 : ℝ)..1, w ξ := by + have h := intervalIntegral.smul_integral_comp_mul_left w (2 : ℝ) (a := 0) (b := 1 / 2) + rw [mul_zero, mul_one_div_cancel two_ne_zero, Complex.real_smul] at h + exact_mod_cast h + +/-- **The doubling substitution on the line**: `∫ F(ξ/2) dξ = 2 ∫ F(ζ) dζ` for every +`F : ℝ → ℂ`, by the substitution `ξ = 2ζ` (Mathlib's `MeasureTheory.Measure.integral_comp_div`). +The identity holds for every `F`, integrable or not: Lean assigns the value `0` to the integral +of a non-integrable function, on both sides. -/ +theorem integral_comp_div_two (F : ℝ → ℂ) : ∫ ξ, F (ξ / 2) = 2 * ∫ ζ, F ζ := by + rw [Measure.integral_comp_div, abs_two, Complex.real_smul] + norm_num + +variable {N : ℕ} (m : Mask N) + +/-- **Halving against the squared symbol**: for every continuous `1`-periodic `w : ℝ → ℂ`, +`2 ∫_0^1 w(2ζ) |m_0(ζ)|² dζ = ∫_0^1 w(ξ) dξ`. Split `[0, 1]` into its two halves +(`Daubechies.intervalIntegral_zero_one_eq_add_half`); since `w(2ζ + 1) = w(2ζ)`, the integrand +on `[0, 1/2]` becomes `w(2ζ) (|m_0(ζ)|² + |m_0(ζ + 1/2)|²) = w(2ζ)` by the quadrature mirror +filter identity (`Daubechies.qmf`), and `2 ∫_0^(1/2) w(2ζ) dζ = ∫_0^1 w` +(`Daubechies.two_mul_intervalIntegral_comp_two_mul`). -/ +theorem two_mul_intervalIntegral_comp_two_mul_mul_normSq_symbol {w : ℝ → ℂ} + (hw : Continuous w) (hper : Function.Periodic w 1) : + 2 * ∫ ζ in (0 : ℝ)..1, w (2 * ζ) * ((‖symbol m ζ‖ ^ 2 : ℝ) : ℂ) = + ∫ ξ in (0 : ℝ)..1, w ξ := by + have hs := continuous_symbol m + have hc : Continuous fun ζ => w (2 * ζ) * ((‖symbol m ζ‖ ^ 2 : ℝ) : ℂ) := by fun_prop + rw [intervalIntegral_zero_one_eq_add_half hc, ← two_mul_intervalIntegral_comp_two_mul w] + congr 1 + refine intervalIntegral.integral_congr fun ζ _ => ?_ + rw [show 2 * (ζ + 1 / 2) = 2 * ζ + 1 by ring, hper (2 * ζ), ← mul_add, ← Complex.ofReal_add, + qmf m ζ, Complex.ofReal_one, mul_one] + +/-- For a `1`-periodic `w : ℝ → ℂ`, the function `ζ ↦ w(2ζ) |m_0(ζ)|²` is `1`-periodic again: +`w(2ζ + 2) = w(2ζ)`, and `m_0` has period `1` (`Daubechies.symbol_periodic`). -/ +theorem periodic_comp_two_mul_mul_normSq_symbol {w : ℝ → ℂ} (hper : Function.Periodic w 1) : + Function.Periodic (fun ζ => w (2 * ζ) * ((‖symbol m ζ‖ ^ 2 : ℝ) : ℂ)) 1 := fun ζ => by + simp only + rw [show 2 * (ζ + 1) = 2 * ζ + 1 + 1 by ring, hper, hper, symbol_periodic m ζ] + +/-! ### The truncated symbol products -/ + +/-- **The truncated symbol products** +`Φ_n(ξ) = ∏_{j rintro ⟨h1, h2⟩ <;> constructor <;> linarith + +/-- **The recursion of the truncated products**: `Φ_(n+1)(ξ) = m_0(ξ/2) Φ_n(ξ/2)` for every `n` +and every `ξ ∈ ℝ`. Split off the first factor of the product +(`Daubechies.prod_range_succ_symbol`); `ξ` lies in the cut-off interval of level `n + 1` exactly +when `ξ/2` lies in the one of level `n` (`Daubechies.mem_Ico_two_pow_succ_iff`). -/ +theorem truncProduct_succ (n : ℕ) (ξ : ℝ) : + truncProduct m (n + 1) ξ = symbol m (ξ / 2) * truncProduct m n (ξ / 2) := by + have h : (Set.Ico (-(2 ^ (n + 1) / 2 : ℝ)) (2 ^ (n + 1) / 2)).indicator (1 : ℝ → ℂ) ξ = + (Set.Ico (-(2 ^ n / 2 : ℝ)) (2 ^ n / 2)).indicator 1 (ξ / 2) := by + by_cases hξ : ξ / 2 ∈ Set.Ico (-(2 ^ n / 2 : ℝ)) (2 ^ n / 2) + · rw [Set.indicator_of_mem ((mem_Ico_two_pow_succ_iff n ξ).2 hξ), Set.indicator_of_mem hξ, + Pi.one_apply, Pi.one_apply] + · rw [Set.indicator_of_notMem (fun h' => hξ ((mem_Ico_two_pow_succ_iff n ξ).1 h')), + Set.indicator_of_notMem hξ] + rw [truncProduct, truncProduct, prod_range_succ_symbol, h, mul_assoc] + +/-- The recursion for the squared moduli: +`|Φ_(n+1)(ξ)|² = |m_0(ξ/2)|² |Φ_n(ξ/2)|²` (`Daubechies.truncProduct_succ`). -/ +theorem normSq_truncProduct_succ (n : ℕ) (ξ : ℝ) : + ‖truncProduct m (n + 1) ξ‖ ^ 2 = + ‖symbol m (ξ / 2)‖ ^ 2 * ‖truncProduct m n (ξ / 2)‖ ^ 2 := by + rw [truncProduct_succ, norm_mul, mul_pow] + +/-- The truncated products are measurable: a continuous function times the indicator function +of an interval. -/ +theorem measurable_truncProduct (n : ℕ) : Measurable (truncProduct m n) := by + have h : Continuous fun ξ : ℝ => ∏ j ∈ Finset.range n, symbol m (ξ / 2 ^ (j + 1)) := + continuous_finsetProd _ fun j _ => (continuous_symbol m).comp (continuous_id.div_const _) + exact h.measurable.mul (measurable_one.indicator measurableSet_Ico) + +/-! ### The integral identity for the truncated products -/ + +/-- **The integral identity for `n = 0`**: `∫ w(ξ) |Φ_0(ξ)|² dξ = ∫_0^1 w(ξ) dξ` for every +`1`-periodic `w : ℝ → ℂ`. Since `|Φ_0|² = 1_[-1/2, 1/2)`, the left side is `∫_(-1/2)^(1/2) w`, +and the integral of a `1`-periodic function is the same over every interval of length `1` +(Mathlib's `Function.Periodic.intervalIntegral_add_eq`). -/ +theorem integral_mul_normSq_truncProduct_zero {w : ℝ → ℂ} (hper : Function.Periodic w 1) : + ∫ ξ, w ξ * ((‖truncProduct m 0 ξ‖ ^ 2 : ℝ) : ℂ) = ∫ ξ in (0 : ℝ)..1, w ξ := by + have h : ∀ ξ, w ξ * ((‖truncProduct m 0 ξ‖ ^ 2 : ℝ) : ℂ) = + (Set.Ico (-(1 / 2 : ℝ)) (1 / 2)).indicator w ξ := fun ξ => by + rw [truncProduct_zero] + by_cases hξ : ξ ∈ Set.Ico (-(1 / 2 : ℝ)) (1 / 2) + · rw [Set.indicator_of_mem hξ, Set.indicator_of_mem hξ] + simp + · rw [Set.indicator_of_notMem hξ, Set.indicator_of_notMem hξ] + simp + simp_rw [h] + rw [integral_indicator measurableSet_Ico, integral_Ico_eq_integral_Ioc, + ← intervalIntegral.integral_of_le (by norm_num)] + have h1 := hper.intervalIntegral_add_eq (-(1 / 2)) 0 + rwa [show -(1 / 2 : ℝ) + 1 = 1 / 2 by norm_num, zero_add] at h1 + +/-- **The substitution step**: for every `w : ℝ → ℂ` and every `n`, +`∫ w(ξ) |Φ_(n+1)(ξ)|² dξ = 2 ∫ w(2ζ) |m_0(ζ)|² |Φ_n(ζ)|² dζ`, by the recursion +`|Φ_(n+1)(ξ)|² = |m_0(ξ/2)|² |Φ_n(ξ/2)|²` (`Daubechies.normSq_truncProduct_succ`) and the +substitution `ξ = 2ζ` (`Daubechies.integral_comp_div_two`). -/ +theorem integral_mul_normSq_truncProduct_succ (w : ℝ → ℂ) (n : ℕ) : + ∫ ξ, w ξ * ((‖truncProduct m (n + 1) ξ‖ ^ 2 : ℝ) : ℂ) = + 2 * ∫ ζ, w (2 * ζ) * ((‖symbol m ζ‖ ^ 2 : ℝ) : ℂ) * + ((‖truncProduct m n ζ‖ ^ 2 : ℝ) : ℂ) := by + rw [← integral_comp_div_two] + congr 1 with ξ + rw [show 2 * (ξ / 2) = ξ by ring, normSq_truncProduct_succ, Complex.ofReal_mul, mul_assoc] + +/-- **The integral identity for the truncated products**: for every continuous `1`-periodic +`w : ℝ → ℂ` and every `n`, `∫ w(ξ) |Φ_n(ξ)|² dξ = ∫_0^1 w(ξ) dξ`. Induction on `n`, for all such +`w` at once. The case `n = 0` is `Daubechies.integral_mul_normSq_truncProduct_zero`. For the step, +the substitution `ξ = 2ζ` (`Daubechies.integral_mul_normSq_truncProduct_succ`) and the induction +hypothesis for the continuous `1`-periodic function `ζ ↦ w(2ζ) |m_0(ζ)|²` +(`Daubechies.periodic_comp_two_mul_mul_normSq_symbol`) give `2 ∫_0^1 w(2ζ) |m_0(ζ)|² dζ`, which +is `∫_0^1 w` (`Daubechies.two_mul_intervalIntegral_comp_two_mul_mul_normSq_symbol`). -/ +theorem integral_periodic_mul_normSq_truncProduct {w : ℝ → ℂ} (hw : Continuous w) + (hper : Function.Periodic w 1) (n : ℕ) : + ∫ ξ, w ξ * ((‖truncProduct m n ξ‖ ^ 2 : ℝ) : ℂ) = ∫ ξ in (0 : ℝ)..1, w ξ := by + induction n generalizing w with + | zero => exact integral_mul_normSq_truncProduct_zero m hper + | succ n ih => + have hs := continuous_symbol m + have hc : Continuous fun ζ => w (2 * ζ) * ((‖symbol m ζ‖ ^ 2 : ℝ) : ℂ) := by fun_prop + rw [integral_mul_normSq_truncProduct_succ, + ih hc (periodic_comp_two_mul_mul_normSq_symbol m hper), + two_mul_intervalIntegral_comp_two_mul_mul_normSq_symbol m hw hper] + +/-! ### Convergence of the truncated products -/ + +/-- **The truncated products are dominated by the symbol product**: if `κ > 0` and +`κ ≤ |Φ(ξ)|` for all `|ξ| ≤ 1/2` (such a `κ` exists by +`Daubechies.exists_pos_le_norm_symbolProduct`), then `|Φ_n(ξ)| ≤ |Φ(ξ)|/κ` for every `n` and +every `ξ ∈ ℝ`. Outside `[-2^n/2, 2^n/2)` the left side is `0`. Inside, `|ξ/2^n| ≤ 1/2` and +`Φ(ξ) = ∏_{j linarith [hξ.1, hξ.2] + rw [truncProduct, Set.indicator_of_mem hξ, Pi.one_apply, mul_one, le_div_iff₀ hκ, + symbolProduct_eq_prod_mul m ξ n, norm_mul] + exact mul_le_mul_of_nonneg_left (h _ h1) (norm_nonneg _) + · rw [truncProduct, Set.indicator_of_notMem hξ, mul_zero, norm_zero] + exact div_nonneg (norm_nonneg _) hκ.le + +/-- Every `ξ ∈ ℝ` lies in the cut-off interval `[-2^n/2, 2^n/2)` for all sufficiently large `n`, +since `2^n → ∞`. -/ +theorem eventually_mem_Ico_two_pow (ξ : ℝ) : + ∀ᶠ n : ℕ in atTop, ξ ∈ Set.Ico (-(2 ^ n / 2 : ℝ)) (2 ^ n / 2) := by + have h := tendsto_pow_atTop_atTop_of_one_lt (one_lt_two : (1 : ℝ) < 2) + filter_upwards [h.eventually_gt_atTop (2 * |ξ|)] with n hn + constructor <;> linarith [neg_abs_le ξ, le_abs_self ξ] + +/-- **The truncated products converge to the symbol product**: `Φ_n(ξ) → Φ(ξ)` as `n → ∞`, for +every `ξ ∈ ℝ`. For large `n` the cut-off factor at `ξ` is `1` +(`Daubechies.eventually_mem_Ico_two_pow`), and the partial products converge to `Φ(ξ)` +(`Daubechies.tendsto_prod_symbol`). -/ +theorem tendsto_truncProduct (ξ : ℝ) : + Tendsto (fun n => truncProduct m n ξ) atTop (𝓝 (symbolProduct m ξ)) := by + refine (tendsto_prod_symbol m ξ).congr' ?_ + filter_upwards [eventually_mem_Ico_two_pow ξ] with n hn + rw [truncProduct, Set.indicator_of_mem hn, Pi.one_apply, mul_one] + +/-! ### The integral identity for the symbol product -/ + +/-- **`|Φ|²` is integrable** for every mask of order `N ≥ 2`, since `Φ ∈ L²` +(`Daubechies.memLp_symbolProduct_two`). -/ +theorem integrable_normSq_symbolProduct (hN : 2 ≤ N) : + Integrable (fun ξ => ‖symbolProduct m ξ‖ ^ 2) := + (memLp_two_iff_integrable_sq_norm (continuous_symbolProduct m).aestronglyMeasurable).1 + (memLp_symbolProduct_two m hN) + +/-- **The integral identity for the symbol product**: for a mask of order `N ≥ 2` and every +continuous `1`-periodic `w : ℝ → ℂ`, `∫ w(ξ) |Φ(ξ)|² dξ = ∫_0^1 w(ξ) dξ`. The integrands +`w |Φ_n|²` converge pointwise to `w |Φ|²` (`Daubechies.tendsto_truncProduct`) and are bounded by +`(B/κ²) |Φ|²` (`Daubechies.norm_truncProduct_le`), where `B` bounds the continuous periodic +function `|w|` (Mathlib's `Function.Periodic.isBounded_of_continuous`) and `κ > 0` bounds `|Φ|` +from below on `[-1/2, 1/2]`; this bound is integrable +(`Daubechies.integrable_normSq_symbolProduct`). Dominated convergence (Mathlib's +`MeasureTheory.tendsto_integral_of_dominated_convergence`) and `∫ w |Φ_n|² = ∫_0^1 w` for every +`n` (`Daubechies.integral_periodic_mul_normSq_truncProduct`) give the identity. -/ +theorem integral_periodic_mul_normSq_symbolProduct (hN : 2 ≤ N) {w : ℝ → ℂ} + (hw : Continuous w) (hper : Function.Periodic w 1) : + ∫ ξ, w ξ * ((‖symbolProduct m ξ‖ ^ 2 : ℝ) : ℂ) = ∫ ξ in (0 : ℝ)..1, w ξ := by + obtain ⟨κ, hκ, hκle⟩ := exists_pos_le_norm_symbolProduct m + obtain ⟨B, hB⟩ := (hper.isBounded_of_continuous one_ne_zero hw).exists_norm_le + have hB0 : 0 ≤ B := (norm_nonneg _).trans (hB _ (Set.mem_range_self 0)) + have hlim : Tendsto (fun n => ∫ ξ, w ξ * ((‖truncProduct m n ξ‖ ^ 2 : ℝ) : ℂ)) atTop + (𝓝 (∫ ξ, w ξ * ((‖symbolProduct m ξ‖ ^ 2 : ℝ) : ℂ))) := by + refine tendsto_integral_of_dominated_convergence + (fun ξ => B / κ ^ 2 * ‖symbolProduct m ξ‖ ^ 2) + (fun n => (hw.measurable.mul (Complex.measurable_ofReal.comp + ((measurable_truncProduct m n).norm.pow_const 2))).aestronglyMeasurable) + ((integrable_normSq_symbolProduct m hN).const_mul _) + (fun n => Eventually.of_forall fun ξ => ?_) + (Eventually.of_forall fun ξ => + (((tendsto_truncProduct m ξ).norm.pow 2).ofReal).const_mul (w ξ)) + rw [norm_mul, Complex.norm_real, Real.norm_of_nonneg (sq_nonneg _)] + calc ‖w ξ‖ * ‖truncProduct m n ξ‖ ^ 2 ≤ B * (‖symbolProduct m ξ‖ / κ) ^ 2 := + mul_le_mul (hB _ (Set.mem_range_self ξ)) + (pow_le_pow_left₀ (norm_nonneg _) (norm_truncProduct_le m hκ hκle n ξ) 2) + (sq_nonneg _) hB0 + _ = B / κ ^ 2 * ‖symbolProduct m ξ‖ ^ 2 := by ring + simp only [integral_periodic_mul_normSq_truncProduct m hw hper] at hlim + exact tendsto_nhds_unique hlim tendsto_const_nhds + +/-! ### Orthonormality -/ + +/-- **The Fourier coefficients of `|Φ|²` at the integers**: for a mask of order `N ≥ 2` and every +`k ∈ ℤ`, `∫ |Φ(ξ)|² e^(-2πikξ) dξ` is `1` for `k = 0` and `0` otherwise. This is the integral +identity `Daubechies.integral_periodic_mul_normSq_symbolProduct` for `w(ξ) = e^(-2πikξ)`, +together with `∫_0^1 e^(-2πikξ) dξ = δ_(k0)` (`Daubechies.integral_expFreq_intCast_mul`). -/ +theorem integral_normSq_symbolProduct_mul_expFreq (hN : 2 ≤ N) (k : ℤ) : + ∫ ξ, ((‖symbolProduct m ξ‖ ^ 2 : ℝ) : ℂ) * expFreq (k * ξ) = if k = 0 then 1 else 0 := by + have h := integral_periodic_mul_normSq_symbolProduct m hN (continuous_expFreq_mul (k : ℝ)) + (periodic_expFreq_intCast_mul k) + rw [integral_expFreq_intCast_mul] at h + rw [← h] + congr 1 with ξ + ring + +/-- **Orthonormality of the integer translates of the scaling function**: for a mask of order +`N ≥ 2` and every `k ∈ ℤ`, `∫ φ(x - k) conj φ(x) dx` is `1` for `k = 0` and `0` otherwise. +Parseval's identity (`Real.integral_mul_conj_eq_integral_fourier`; `φ` is continuous and +integrable, with integrable transform `𝓕 φ = Φ` by `Daubechies.fourier_scalingFun`) and the +translation rule `𝓕[φ(· - k)](ξ) = e^(-2πikξ) Φ(ξ)` (`Real.fourier_comp_sub_right_apply`) turn the +integral into `∫ e^(-2πikξ) |Φ(ξ)|² dξ`, which is +`Daubechies.integral_normSq_symbolProduct_mul_expFreq`. -/ +theorem integral_scalingFun_translate_mul_conj (hN : 2 ≤ N) (k : ℤ) : + ∫ x, scalingFun m (x - k) * conj (scalingFun m x) = if k = 0 then 1 else 0 := by + have hφ := integrable_scalingFun m hN + have hF : Integrable (𝓕 (scalingFun m)) := by + rw [fourier_scalingFun m hN] + exact integrable_symbolProduct m hN + rw [Real.integral_mul_conj_eq_integral_fourier (hφ.comp_sub_right (k : ℝ)) + (continuous_scalingFun m hN) hφ hF, ← integral_normSq_symbolProduct_mul_expFreq m hN k] + congr 1 with ξ + rw [Real.fourier_comp_sub_right_apply (scalingFun m) k ξ, fourier_scalingFun m hN, mul_assoc, + Complex.mul_conj', ← Complex.ofReal_pow, mul_comm, expFreq] + congr 2 + push_cast + ring + +/-- **Orthonormality of the integer translates, for two translates**: for a mask of order +`N ≥ 2` and all `k, l ∈ ℤ`, `∫ φ(x - k) conj φ(x - l) dx` is `1` for `k = l` and `0` otherwise. +The substitution `x ↦ x + l` (Mathlib's `MeasureTheory.integral_add_right_eq_self`) reduces it to +`Daubechies.integral_scalingFun_translate_mul_conj` for `k - l`. -/ +theorem integral_scalingFun_translate_mul_conj_translate (hN : 2 ≤ N) (k l : ℤ) : + ∫ x, scalingFun m (x - k) * conj (scalingFun m (x - l)) = if k = l then 1 else 0 := by + rw [← integral_add_right_eq_self _ (l : ℝ)] + have h : ∀ x : ℝ, scalingFun m (x + l - k) * conj (scalingFun m (x + l - l)) = + scalingFun m (x - ((k - l : ℤ) : ℝ)) * conj (scalingFun m x) := fun x => by + rw [add_sub_cancel_right, Int.cast_sub, show x + (l : ℝ) - k = x - (k - l) by ring] + simp only [h, integral_scalingFun_translate_mul_conj m hN, sub_eq_zero] + +/-- **Orthonormality of the integer translates, real form**: for a mask of order `N ≥ 2` and all +`k, l ∈ ℤ`, `∫ φ(x - k) φ(x - l) dx` is `1` for `k = l` and `0` otherwise, since `φ` is real +(`Daubechies.conj_scalingFun`). -/ +theorem integral_scalingFun_translate_mul_translate (hN : 2 ≤ N) (k l : ℤ) : + ∫ x, scalingFun m (x - k) * scalingFun m (x - l) = if k = l then 1 else 0 := by + rw [← integral_scalingFun_translate_mul_conj_translate m hN k l] + simp only [conj_scalingFun] + +end Daubechies diff --git a/LeanPool/FunctionSpaces/Wavelets/Examples/Daubechies/PolynomialReproduction.lean b/LeanPool/FunctionSpaces/Wavelets/Examples/Daubechies/PolynomialReproduction.lean new file mode 100644 index 0000000000..3d09fb064f --- /dev/null +++ b/LeanPool/FunctionSpaces/Wavelets/Examples/Daubechies/PolynomialReproduction.lean @@ -0,0 +1,276 @@ +/- +Copyright (c) 2026 Mario Ullrich. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Mario Ullrich +-/ +module + +public import LeanPool.FunctionSpaces.Domains.Interval.Differences +public import LeanPool.FunctionSpaces.Wavelets.Examples.Daubechies.ExpansionScaling +public import LeanPool.FunctionSpaces.Wavelets.Examples.Daubechies.ScalingMoments + +/- +Modified for Lean Pool: module names and imports adapted. +-/ + +/-! +# Polynomial reproduction by the integer translates of the scaling function + +For a Daubechies mask of order `N ≥ 2` with scaling function `φ` (`Daubechies.scalingFun`), this +file proves that the integer translates `φ(· - k)`, `k ∈ ℤ`, reproduce the polynomials of degree +`< N`: for every complex polynomial `Q` of degree `< N` and every `x ∈ ℝ`, + +`∑_{k ∈ ℤ} ⟨Q, φ(· - k)⟩ φ(x - k) = Q(x)`, where `⟨Q, φ(· - k)⟩ = ∫ Q(y) conj φ(y - k) dy` + +(`Daubechies.sum_inner_poly_mul_scalingFun`), and at every dyadic level `j ∈ ℕ`, +`∑_{k ∈ ℤ} 2^j (∫ Q(y) conj φ(2^j y - k) dy) φ(2^j x - k) = Q(x)` +(`Daubechies.sum_inner_poly_mul_scalingFun_two_pow`). Since `φ` vanishes outside `[0, 2N - 1]`, +each of these sums has only finitely many nonzero terms. + +* **Integer moments.** Write `k = x - (x - k)` and expand `k^l` by the binomial theorem. The + periodised moments `∑_k (x - k)^r φ(x - k) = μ_r := ∫ y^r φ(y) dy`, `r < N` + (`Daubechies.periodization_moment_eq`), give + `∑_k k^l φ(x - k) = ∑_{i=0}^{l} C(l, i) (-1)^(l-i) μ_(l-i) x^i` + (`Daubechies.tsum_intCast_pow_mul_scalingFun_sub`), a monic polynomial of degree `l` in `x` + for `l < N`, since `μ_0 = ∫ φ = 1` (`Daubechies.exists_poly_sum_pow_mul`). +* **Polynomial coefficients.** By induction on the degree, every polynomial `Q` of degree `< N` + is `Q(x) = ∑_k a(k) φ(x - k)` with a polynomial `a`: subtracting the coefficient of `x^n` in + `Q` times the monic polynomial `∑_k k^n φ(x - k)` lowers the degree + (`Daubechies.exists_coeff_poly`). +* **Coefficient recovery.** The integer translates are the generators of level `0` of the + expansions in `φ`, so coefficient recovery + `∫ (∑_j a(j) φ(y - j)) conj φ(y - k) dy = a(k)` for every sequence `a : ℤ → ℂ` + (`Daubechies.integral_tsum_mul_scalingFun_sub_mul_conj`) is the level `0` case of + `Daubechies.coeffFun_expand_scalingFun`. For `Q = ∑_j a(j) φ(· - j)` this is + `⟨Q, φ(· - k)⟩ = a(k)`, and the projection identity follows. Its dyadic form is the identity + for the polynomial `Q(2^(-j) ·)` after the substitution `u = 2^j y` + (`Daubechies.integral_eq_two_pow_mul_integral_comp`). +-/ + +@[expose] public section + +open MeasureTheory +open scoped ComplexConjugate Polynomial + +namespace Daubechies + +/-! ### Lowering the degree of a polynomial -/ + +/-- **Lowering the degree of a polynomial**: let `Q` have degree `< n + 1`, and let `P` have +degree `≤ n` and coefficient `1` at `X^n`. Then `Q - q_n P` has degree `< n`, where `q_n` is the +coefficient of `X^n` in `Q`: the coefficients at `X^n` cancel, and both polynomials have no terms +of higher degree. -/ +theorem sub_C_coeff_mul_mem_degreeLT {R : Type*} [Ring R] {n : ℕ} {Q P : R[X]} + (hQ : Q ∈ Polynomial.degreeLT R (n + 1)) (hP : P.natDegree ≤ n) (hPn : P.coeff n = 1) : + Q - Polynomial.C (Q.coeff n) * P ∈ Polynomial.degreeLT R n := by + rw [Polynomial.mem_degreeLT, Polynomial.degree_lt_iff_coeff_zero] + intro k hk + rw [Polynomial.coeff_sub, Polynomial.coeff_C_mul] + rcases hk.eq_or_lt with rfl | hk + · rw [hPn, mul_one, sub_self] + · rw [(Polynomial.degree_lt_iff_coeff_zero Q (n + 1)).1 (Polynomial.mem_degreeLT.1 hQ) k hk, + Polynomial.coeff_eq_zero_of_natDegree_lt (hP.trans_lt hk), mul_zero, sub_zero] + +variable {N : ℕ} (m : Mask N) + +/-! ### The integer moments of the translates -/ + +/-- **The integer moments of the translates, as a polynomial in `x`**: for `N ≥ 2`, `l < N` and +every `x ∈ ℝ`, +`∑_{k ∈ ℤ} k^l φ(x - k) = ∑_{i=0}^{l} C(l, i) (-1)^(l-i) μ_(l-i) x^i`, +where `μ_r = ∫ y^r φ(y) dy` are the moments of `φ`. Write `k = x + (-(x - k))` and expand `k^l` +by the binomial theorem (Mathlib's `add_pow`); exchange the finite sum over `i` with the sum over +`k` (each sum over `k` has only finitely many nonzero terms, +`Daubechies.summable_mul_scalingFun_sub`), and use that the periodised moments +`∑_k (x - k)^r φ(x - k)` equal `μ_r` for `r < N` (`Daubechies.periodization_moment_eq`). -/ +theorem tsum_intCast_pow_mul_scalingFun_sub (hN : 2 ≤ N) {l : ℕ} (hl : l < N) (x : ℝ) : + ∑' k : ℤ, (k : ℂ) ^ l * scalingFun m (x - k) = + ∑ i ∈ Finset.range (l + 1), (l.choose i : ℂ) * (-1) ^ (l - i) * + (∫ y : ℝ, (y : ℂ) ^ (l - i) * scalingFun m y) * (x : ℂ) ^ i := by + have h : ∀ k : ℤ, (k : ℂ) ^ l * scalingFun m (x - k) = + ∑ i ∈ Finset.range (l + 1), (l.choose i : ℂ) * (-1) ^ (l - i) * (x : ℂ) ^ i * + (((x - k : ℝ) : ℂ) ^ (l - i) * scalingFun m (x - k)) := fun k => by + have hk : (k : ℂ) = (x : ℂ) + -((x - k : ℝ) : ℂ) := by push_cast; ring + rw [hk, add_pow, Finset.sum_mul] + refine Finset.sum_congr rfl fun i _ => ?_ + rw [neg_pow] + ring + have hs : ∀ i ∈ Finset.range (l + 1), Summable fun k : ℤ => + (l.choose i : ℂ) * (-1) ^ (l - i) * (x : ℂ) ^ i * + (((x - k : ℝ) : ℂ) ^ (l - i) * scalingFun m (x - k)) := fun i _ => + (summable_mul_scalingFun_sub m hN _ x).mul_left _ + rw [tsum_congr h, Summable.tsum_finsetSum hs] + refine Finset.sum_congr rfl fun i _ => ?_ + rw [tsum_mul_left, periodization_moment_eq m hN ((Nat.sub_le l i).trans_lt hl) x] + ring + +/-- **The integer moments of the translates are polynomials**: for `N ≥ 2` and `l < N` there is +a polynomial `Q` of degree `≤ l` with coefficient `1` at `X^l` (so `Q` is monic of degree `l`) +such that `∑_{k ∈ ℤ} k^l φ(x - k) = Q(x)` for every `x ∈ ℝ`. The polynomial is +`Q = ∑_{i=0}^{l} C(l, i) (-1)^(l-i) μ_(l-i) X^i` with the moments `μ_r = ∫ y^r φ(y) dy` +(`Daubechies.tsum_intCast_pow_mul_scalingFun_sub`); its coefficient at `X^l` is +`μ_0 = ∫ φ = 1` (`Daubechies.integral_scalingFun`). -/ +theorem exists_poly_sum_pow_mul (hN : 2 ≤ N) {l : ℕ} (hl : l < N) : + ∃ Q : ℂ[X], Q.natDegree ≤ l ∧ Q.coeff l = 1 ∧ + ∀ x : ℝ, ∑' k : ℤ, (k : ℂ) ^ l * scalingFun m (x - k) = Q.eval (x : ℂ) := by + refine ⟨∑ i ∈ Finset.range (l + 1), Polynomial.C ((l.choose i : ℂ) * (-1) ^ (l - i) * + ∫ y : ℝ, (y : ℂ) ^ (l - i) * scalingFun m y) * Polynomial.X ^ i, ?_, ?_, fun x => ?_⟩ + · exact Polynomial.natDegree_sum_le_of_forall_le _ _ fun i hi => + (Polynomial.natDegree_C_mul_X_pow_le _ _).trans (Nat.lt_succ_iff.1 (Finset.mem_range.1 hi)) + · simp only [Polynomial.finsetSum_coeff, Polynomial.coeff_C_mul_X_pow, Finset.sum_ite_eq, + Finset.mem_range, Nat.lt_succ_self, ↓reduceIte, Nat.choose_self, Nat.sub_self, pow_zero, + one_mul, integral_scalingFun m hN, Nat.cast_one, mul_one] + · rw [tsum_intCast_pow_mul_scalingFun_sub m hN hl x, Polynomial.eval_finsetSum] + simp only [Polynomial.eval_mul, Polynomial.eval_C, Polynomial.eval_pow, Polynomial.eval_X] + +/-! ### Every polynomial of degree `< N` is a combination of the translates -/ + +/-- **Polynomials of degree `< n` as combinations of the translates, with polynomial +coefficients**: for `N ≥ 2`, `n ≤ N` and every polynomial `Q` of degree `< n` there is a +polynomial `a` of degree `< n` with `Q(x) = ∑_{k ∈ ℤ} a(k) φ(x - k)` for every `x ∈ ℝ`. Induction +on `n`. For `n = 0` the polynomial `Q` is zero. For the step, let `q_n` be the coefficient of +`X^n` in `Q` and let `P` be the monic polynomial of degree `n` with +`P(x) = ∑_k k^n φ(x - k)` (`Daubechies.exists_poly_sum_pow_mul`, since `n < N`). The polynomial +`Q - q_n P` has degree `< n` (`Daubechies.sub_C_coeff_mul_mem_degreeLT`), so by induction it is +`∑_k a'(k) φ(x - k)` with `a'` of degree `< n`, and `a = q_n X^n + a'` represents `Q`. -/ +theorem exists_coeff_poly_of_mem_degreeLT (hN : 2 ≤ N) {n : ℕ} (hn : n ≤ N) {Q : ℂ[X]} + (hQ : Q ∈ Polynomial.degreeLT ℂ n) : + ∃ a ∈ Polynomial.degreeLT ℂ n, + ∀ x : ℝ, Q.eval (x : ℂ) = ∑' k : ℤ, a.eval (k : ℂ) * scalingFun m (x - k) := by + induction n generalizing Q with + | zero => + have hQ0 : Q = 0 := AddMonoidAlgebra.ext <| Finsupp.ext fun i => by + simpa using (Polynomial.degree_lt_iff_coeff_zero Q 0).1 (Polynomial.mem_degreeLT.1 hQ) i + (Nat.zero_le i) + exact ⟨0, Submodule.zero_mem _, fun x => by simp [hQ0]⟩ + | succ n ih => + obtain ⟨P, hPdeg, hPn, hP⟩ := exists_poly_sum_pow_mul m hN (l := n) (by omega) + obtain ⟨a, ha, hQa⟩ := ih (by omega) (sub_C_coeff_mul_mem_degreeLT hQ hPdeg hPn) + have hXn : Polynomial.C (Q.coeff n) * Polynomial.X ^ n ∈ Polynomial.degreeLT ℂ (n + 1) := + Polynomial.mem_degreeLT.2 ((Polynomial.degree_C_mul_X_pow_le _ _).trans_lt + (by exact_mod_cast Nat.lt_succ_self n)) + refine ⟨Polynomial.C (Q.coeff n) * Polynomial.X ^ n + a, + Submodule.add_mem _ hXn (Polynomial.degreeLT_mono (Nat.le_succ n) ha), fun x => ?_⟩ + have hx : Q.eval (x : ℂ) = Q.coeff n * P.eval (x : ℂ) + + (Q - Polynomial.C (Q.coeff n) * P).eval (x : ℂ) := by + simp only [Polynomial.eval_sub, Polynomial.eval_mul, Polynomial.eval_C] + ring + rw [hx, ← hP x, hQa x, ← tsum_mul_left, ← Summable.tsum_add + ((summable_mul_scalingFun_sub m hN (fun k : ℤ => (k : ℂ) ^ n) x).mul_left _) + (summable_mul_scalingFun_sub m hN (fun k : ℤ => a.eval (k : ℂ)) x)] + refine tsum_congr fun k => ?_ + simp only [Polynomial.eval_add, Polynomial.eval_mul, Polynomial.eval_C, Polynomial.eval_pow, + Polynomial.eval_X] + ring + +/-- **Every polynomial of degree `< N` is a combination of the integer translates of `φ` with +polynomial coefficients**: for `N ≥ 2` and every polynomial `Q` of degree `< N` there is a +polynomial `a` with `Q(x) = ∑_{k ∈ ℤ} a(k) φ(x - k)` for every `x ∈ ℝ` +(`Daubechies.exists_coeff_poly_of_mem_degreeLT` with `n = N`, which also gives `a` of +degree `< N`). For each `x` the sum has only finitely many nonzero terms. -/ +theorem exists_coeff_poly (hN : 2 ≤ N) {Q : ℂ[X]} (hQ : Q ∈ Polynomial.degreeLT ℂ N) : + ∃ a : ℂ[X], ∀ x : ℝ, Q.eval (x : ℂ) = ∑' k : ℤ, a.eval (k : ℂ) * scalingFun m (x - k) := + let ⟨a, _, ha⟩ := exists_coeff_poly_of_mem_degreeLT m hN le_rfl hQ + ⟨a, ha⟩ + +/-! ### Coefficient recovery -/ + +/-- **Two translates of `φ` overlap only for nearby indices**: for `N ≥ 2`, `y ∈ ℝ` and integers +`j, k` with `j ∉ [k - (2N - 1), k + (2N - 1)]`, `φ(y - j) conj φ(y - k) = 0`. This is the +level `0` case of `Daubechies.scaledFun_mul_conj_eq_zero` (`Daubechies.scaledFun_zero`), since +`φ` vanishes outside `[0, 2N - 1]` (`Daubechies.scalingFun_eq_zero`), so +`⌈b - a⌉ = ⌈(2N - 1) - 0⌉ = 2N - 1`. -/ +theorem scalingFun_sub_mul_conj_eq_zero (hN : 2 ≤ N) {j k : ℤ} + (hjk : j ∉ Finset.Icc (k - (2 * N - 1)) (k + (2 * N - 1))) (y : ℝ) : + scalingFun m (y - j) * conj (scalingFun m (y - k)) = 0 := by + have hc : ((⌈(2 * N - 1 : ℝ) - 0⌉₊ : ℕ) : ℤ) = 2 * N - 1 := by + have h : (2 * N - 1 : ℝ) - 0 = ((2 * N - 1 : ℕ) : ℝ) := by + rw [sub_zero, Nat.cast_sub (by omega), Nat.cast_mul, Nat.cast_ofNat, Nat.cast_one] + rw [h, Nat.ceil_natCast] + omega + simpa only [scaledFun_zero] using scaledFun_mul_conj_eq_zero (j := 0) (k := k) (l := j) + (fun _ hx => scalingFun_eq_zero m hN hx) (by rwa [hc]) y + +/-- For `N ≥ 2` and integers `j, k`, the function `y ↦ φ(y - j) conj φ(y - k)` is integrable: +the level `0` case of `Daubechies.integrable_scaledFun_mul_conj` (`Daubechies.scaledFun_zero`), +since `φ` is continuous and vanishes outside `[0, 2N - 1]`. -/ +theorem integrable_scalingFun_sub_mul_conj (hN : 2 ≤ N) (j k : ℤ) : + Integrable fun y : ℝ => scalingFun m (y - j) * conj (scalingFun m (y - k)) := by + simpa only [scaledFun_zero] using integrable_scaledFun_mul_conj (continuous_scalingFun m hN) + (fun _ hx => scalingFun_eq_zero m hN hx) 0 k j + +/-- **Coefficient recovery**: for `N ≥ 2`, every sequence `a : ℤ → ℂ` and every `k ∈ ℤ`, +`∫ (∑_{j ∈ ℤ} a(j) φ(y - j)) conj φ(y - k) dy = a(k)`. This is coefficient recovery for the +scaling function at level `0` (`Daubechies.coeffFun_expand_scalingFun`, +`Daubechies.scaledFun_zero`). The sequence `a` is arbitrary: at each point the sum over `j` is +finite. -/ +theorem integral_tsum_mul_scalingFun_sub_mul_conj (hN : 2 ≤ N) (a : ℤ → ℂ) (k : ℤ) : + ∫ y, (∑' j : ℤ, a j * scalingFun m (y - j)) * conj (scalingFun m (y - k)) = a k := by + simpa only [coeffFun, expand, scaledFun_zero] using coeffFun_expand_scalingFun m hN 0 a k + +/-! ### The projection identity -/ + +/-- **The projection identity: the translates of `φ` reproduce polynomials**: for `N ≥ 2`, every +polynomial `Q` of degree `< N` and every `x ∈ ℝ`, +`∑_{k ∈ ℤ} ⟨Q, φ(· - k)⟩ φ(x - k) = Q(x)`, where `⟨Q, φ(· - k)⟩ = ∫ Q(y) conj φ(y - k) dy`. +So the projection `f ↦ ∑_k ⟨f, φ(· - k)⟩ φ(· - k)` leaves every polynomial of degree `< N` +unchanged. Write `Q = ∑_j a(j) φ(· - j)` with a polynomial `a` (`Daubechies.exists_coeff_poly`); +then `⟨Q, φ(· - k)⟩ = a(k)` (`Daubechies.integral_tsum_mul_scalingFun_sub_mul_conj`), and the left +side is `∑_k a(k) φ(x - k) = Q(x)`. -/ +theorem sum_inner_poly_mul_scalingFun (hN : 2 ≤ N) {Q : ℂ[X]} + (hQ : Q ∈ Polynomial.degreeLT ℂ N) (x : ℝ) : + ∑' k : ℤ, (∫ y : ℝ, Q.eval (y : ℂ) * conj (scalingFun m (y - k))) * scalingFun m (x - k) = + Q.eval (x : ℂ) := by + obtain ⟨a, ha⟩ := exists_coeff_poly m hN hQ + have h : ∀ k : ℤ, ∫ y : ℝ, Q.eval (y : ℂ) * conj (scalingFun m (y - k)) = a.eval (k : ℂ) := + fun k => by + simp_rw [ha] + exact integral_tsum_mul_scalingFun_sub_mul_conj m hN (fun j => a.eval (j : ℂ)) k + simp_rw [h] + exact (ha x).symm + +/-- **The projection identity, real form**: for `N ≥ 2`, every polynomial `Q` of degree `< N` and +every `x ∈ ℝ`, `∑_{k ∈ ℤ} (∫ Q(y) φ(y - k) dy) φ(x - k) = Q(x)`. Since `φ` is real +(`Daubechies.conj_scalingFun`), this is `Daubechies.sum_inner_poly_mul_scalingFun`. -/ +theorem sum_integral_poly_mul_scalingFun (hN : 2 ≤ N) {Q : ℂ[X]} + (hQ : Q ∈ Polynomial.degreeLT ℂ N) (x : ℝ) : + ∑' k : ℤ, (∫ y : ℝ, Q.eval (y : ℂ) * scalingFun m (y - k)) * scalingFun m (x - k) = + Q.eval (x : ℂ) := by + simpa only [conj_scalingFun] using sum_inner_poly_mul_scalingFun m hN hQ x + +/-! ### The projection identity at the dyadic levels -/ + +/-- **Dilating a polynomial**: for every polynomial `Q` of degree `< N` and every `j ∈ ℕ` there is +a polynomial `R` of degree `< N` with `R(2^j y) = Q(y)` for every `y ∈ ℝ`, namely +`R(u) = Q(2^(-j) u)` (`Interval.comp_affine_mem_degreeLT`). -/ +theorem exists_poly_comp_two_pow_mul {Q : ℂ[X]} (hQ : Q ∈ Polynomial.degreeLT ℂ N) (j : ℕ) : + ∃ R ∈ Polynomial.degreeLT ℂ N, ∀ y : ℝ, R.eval ((2 ^ j * y : ℝ) : ℂ) = Q.eval (y : ℂ) := by + refine ⟨Q.comp (Polynomial.C 0 + Polynomial.C ((2 : ℂ) ^ j)⁻¹ * Polynomial.X), + Interval.comp_affine_mem_degreeLT hQ 0 ((2 : ℂ) ^ j)⁻¹, fun y => ?_⟩ + simp only [Polynomial.eval_comp, Polynomial.eval_add, Polynomial.eval_mul, Polynomial.eval_C, + Polynomial.eval_X, zero_add] + push_cast + rw [inv_mul_cancel_left₀ (pow_ne_zero _ two_ne_zero)] + +/-- **The projection identity at the dyadic level `j`**: for `N ≥ 2`, every polynomial `Q` of +degree `< N`, every `j ∈ ℕ` and every `x ∈ ℝ`, +`∑_{k ∈ ℤ} 2^j (∫ Q(y) conj φ(2^j y - k) dy) φ(2^j x - k) = Q(x)`. +For the normalised functions `φ_(j,k)(x) = 2^(j/2) φ(2^j x - k)` this reads +`∑_k ⟨Q, φ_(j,k)⟩ φ_(j,k)(x) = Q(x)`. Apply `Daubechies.sum_inner_poly_mul_scalingFun` to the +polynomial `R` of degree `< N` with `R(2^j y) = Q(y)` (`Daubechies.exists_poly_comp_two_pow_mul`) +at the point `2^j x`, and substitute `u = 2^j y` in the integrals +(`Daubechies.integral_eq_two_pow_mul_integral_comp`). -/ +theorem sum_inner_poly_mul_scalingFun_two_pow (hN : 2 ≤ N) {Q : ℂ[X]} + (hQ : Q ∈ Polynomial.degreeLT ℂ N) (j : ℕ) (x : ℝ) : + ∑' k : ℤ, ((2 : ℂ) ^ j * ∫ y : ℝ, Q.eval (y : ℂ) * conj (scalingFun m (2 ^ j * y - k))) * + scalingFun m (2 ^ j * x - k) = Q.eval (x : ℂ) := by + obtain ⟨R, hR, hRQ⟩ := exists_poly_comp_two_pow_mul hQ j + have h := sum_inner_poly_mul_scalingFun m hN hR (2 ^ j * x) + rw [hRQ] at h + rw [← h] + refine tsum_congr fun k => ?_ + rw [integral_eq_two_pow_mul_integral_comp + (fun u : ℝ => R.eval (u : ℂ) * conj (scalingFun m (u - k))) j] + simp only [hRQ] + +end Daubechies diff --git a/LeanPool/FunctionSpaces/Wavelets/Examples/Daubechies/Projections.lean b/LeanPool/FunctionSpaces/Wavelets/Examples/Daubechies/Projections.lean new file mode 100644 index 0000000000..6029ed1259 --- /dev/null +++ b/LeanPool/FunctionSpaces/Wavelets/Examples/Daubechies/Projections.lean @@ -0,0 +1,920 @@ +/- +Copyright (c) 2026 Mario Ullrich. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Mario Ullrich +-/ +module + +public import LeanPool.FunctionSpaces.Wavelets.Examples.Daubechies.PolynomialReproduction +public import LeanPool.FunctionSpaces.ApproximationSpaces.Decompositions.Projection + +/- +Modified for Lean Pool: module names and imports adapted. +-/ + +/-! +# The projections of the multiresolution analysis + +For a Daubechies mask of order `N ≥ 2` with scaling function `φ` (`Daubechies.scalingFun`) and +the functions `φ_{j,k}(x) = 2^(j/2) φ(2^j x - k)` of level `j ∈ ℕ` and position `k ∈ ℤ` +(`Daubechies.scaled`), the **projection of level `j`** is + +`P_j f(x) = ∑_{k ∈ ℤ} ⟨f, φ_{j,k}⟩ φ_{j,k}(x)`, with `⟨f, φ_{j,k}⟩ = ∫ f(y) conj φ_{j,k}(y) dy`, + +defined at every point for every `f` (`Daubechies.projFun`); only finitely many terms are nonzero +at each point. + +* **Bounds.** `‖P_j f‖_p ≤ C ‖f‖_p` for `1 ≤ p < ∞`, with `C = 2N ‖φ‖_p ‖φ‖_{p'}` independent of + the level (`Daubechies.eLpNorm_projFun_le`, `Daubechies.projConst`), from the stability of the + expansions (`FunctionSpaces.Wavelets.Examples.Daubechies.Expansion`). On a dyadic cell + `I = [k/2^j, (k + 1)/2^j)` with the window `W = [(k - 2N + 2)/2^j, (k + 2N - 1)/2^j]`, + `‖P_j f‖_{L_p(I)} ≤ (2N - 1) ‖φ‖_p ‖φ‖_{p'} ‖f‖_{L_p(W)}` for every `f` and `1 ≤ p ≤ ∞` + (`Daubechies.eLpNorm_projFun_cell_le`). The projections reproduce the polynomials of degree + `< N` (`Daubechies.projFun_poly`). +* **Projections and scaling spaces.** On `L_p`, `1 ≤ p < ∞`, the classes of the `P_j f` form + bounded operators (`Daubechies.proj`, `Daubechies.norm_proj_le`) with `P_j P_j = P_j` + (`Daubechies.proj_proj`), by coefficient recovery. Their ranges, the **scaling spaces** `V_j` + (`Daubechies.scalingSpace`), increase with the level (`Daubechies.scalingSpace_mono`): by the + refinement equation an expansion of level `j` is one of level `j + 1` + (`Daubechies.expand_eq_expand_succ`, for any finite real filter + `Daubechies.expand_eq_tsum_refine_of_filter`), so `P_{j+1} P_j = P_j`. +* **Density.** The partition of unity `∑_k φ(x - k) = 1` gives the kernel form + `P_j f(x) - f(x) = ∑_k φ_{j,k}(x) ∫ (f(y) - f(x)) conj φ_{j,k}(y) dy` + (`Daubechies.projFun_sub_eq_tsum`), and for continuous `f` with compact support uniform + continuity gives `‖f - P_j f‖_p → 0` (`Daubechies.tendsto_eLpNorm_sub_projFun`). Hence + `⋃_j V_j` is dense in `L_p` (`Daubechies.closure_iUnion_scalingSpace`), and `P_j f → f` for every + `f ∈ L_p` (`Daubechies.tendsto_proj`). +* **Schemes.** The scaling spaces form the approximation scheme `Daubechies.scheme` (`{0}` at + complexity `0`, `V_{⌊log₂ n⌋}` at complexity `n ≥ 1`), dense in `L_p` + (`Daubechies.closure_iUnion_scheme`), with the projection scheme + `Daubechies.projectionScheme` (`0` at complexity `0`, `P_{⌊log₂ n⌋}` at complexity `n ≥ 1`). +-/ + +@[expose] public section + +open Filter MeasureTheory Topology +open scoped ENNReal ComplexConjugate +open ENNReal (dyadicWeight) + +namespace Daubechies + +variable {N : ℕ} (m : Mask N) + +/-! ### The projection of level `j`, pointwise -/ + +/-- **The projection of level `j`, pointwise**: for every function `f : ℝ → ℂ`, +`P_j f(x) = ∑_{k ∈ ℤ} ⟨f, φ_{j,k}⟩ φ_{j,k}(x)`, with the coefficients +`⟨f, φ_{j,k}⟩ = ∫ f(y) conj φ_{j,k}(y) dy` (`Daubechies.coeffFun`) and the functions +`φ_{j,k}(x) = 2^(j/2) φ(2^j x - k)` (`Daubechies.scaled`). Only finitely many terms are nonzero at +each point, so the sum is meaningful for every `f`; for locally integrable `f` the coefficients +are genuine integrals. -/ +noncomputable def projFun (j : ℕ) (f : ℝ → ℂ) : ℝ → ℂ := + expand (scalingFun m) j (coeffFun (scalingFun m) j f) + +/-- `P_j f(x) = ∑_{k ∈ ℤ} ⟨f, φ_{j,k}⟩ φ_{j,k}(x)`, by definition. -/ +theorem projFun_apply (j : ℕ) (f : ℝ → ℂ) (x : ℝ) : + projFun m j f x = ∑' k : ℤ, coeffFun (scalingFun m) j f k * scaled m j k x := rfl + +/-- **The projection is continuous**: for `N ≥ 2`, `P_j f` is continuous for every level `j` and +every `f`, as an expansion in the continuous functions `φ_{j,k}` +(`Daubechies.continuous_expand`). -/ +theorem continuous_projFun (hN : 2 ≤ N) (j : ℕ) (f : ℝ → ℂ) : Continuous (projFun m j f) := + continuous_expand (continuous_scalingFun m hN) (fun _ hx => scalingFun_eq_zero m hN hx) j _ + +/-- **The projection depends only on the class of `f`**: if `f = f'` almost everywhere, then +`P_j f = P_j f'` at every point, since the coefficients agree +(`Daubechies.coeffFun_congr_ae`). -/ +theorem projFun_congr_ae {f f' : ℝ → ℂ} (h : f =ᵐ[volume] f') (j : ℕ) : + projFun m j f = projFun m j f' := by + rw [projFun, projFun, show coeffFun (scalingFun m) j f = coeffFun (scalingFun m) j f' from + funext fun k => coeffFun_congr_ae h j k] + +/-- **The coefficient integrands of locally integrable functions are integrable**: for `N ≥ 2` +and locally integrable `f`, the function `y ↦ f(y) conj φ_{j,k}(y)` is integrable, since +`φ_{j,k}` is continuous with compact support (Mathlib's +`MeasureTheory.LocallyIntegrable.integrable_smul_right_of_hasCompactSupport`). -/ +theorem integrable_mul_conj_scaled (hN : 2 ≤ N) {f : ℝ → ℂ} (hf : LocallyIntegrable f volume) + (j : ℕ) (k : ℤ) : Integrable fun y => f y * conj (scaled m j k y) := by + have h := hf.integrable_smul_right_of_hasCompactSupport + (Complex.continuous_conj.comp (continuous_scaledFun (continuous_scalingFun m hN) j k)) + ((hasCompactSupport_scaledFun (fun _ hx => scalingFun_eq_zero m hN hx) j k).comp_left + (map_zero _)) + simpa only [smul_eq_mul, Function.comp_apply] using h + +/-- **The projection is additive** on locally integrable functions: for `N ≥ 2`, +`P_j (f + g) = P_j f + P_j g` at every point (`Daubechies.coeffFun_add`, +`Daubechies.expand_add`). -/ +theorem projFun_add (hN : 2 ≤ N) {f g : ℝ → ℂ} (hf : LocallyIntegrable f volume) + (hg : LocallyIntegrable g volume) (j : ℕ) : + projFun m j (fun y => f y + g y) = fun x => projFun m j f x + projFun m j g x := by + funext x + have hc : coeffFun (scalingFun m) j (fun y => f y + g y) = + fun k => coeffFun (scalingFun m) j f k + coeffFun (scalingFun m) j g k := + funext fun k => coeffFun_add (integrable_mul_conj_scaled m hN hf j k) + (integrable_mul_conj_scaled m hN hg j k) + rw [projFun, hc] + exact expand_add (fun _ hx => scalingFun_eq_zero m hN hx) j _ _ x + +/-- **The projection is homogeneous**: `P_j (z f) = z P_j f` for every `z ∈ ℂ` and every `f` +(`Daubechies.coeffFun_const_mul`, `Daubechies.expand_const_mul`). -/ +theorem projFun_const_mul (z : ℂ) (f : ℝ → ℂ) (j : ℕ) : + projFun m j (fun y => z * f y) = fun x => z * projFun m j f x := by + funext x + have hc : coeffFun (scalingFun m) j (fun y => z * f y) = + fun k => z * coeffFun (scalingFun m) j f k := + funext fun k => coeffFun_const_mul z f j k + rw [projFun, hc] + exact expand_const_mul j z _ x + +/-- **The projection is subtractive** on locally integrable functions: for `N ≥ 2`, +`P_j (f - g) = P_j f - P_j g` at every point (`Daubechies.projFun_add` and +`Daubechies.projFun_const_mul` with `z = -1`). -/ +theorem projFun_sub (hN : 2 ≤ N) {f g : ℝ → ℂ} (hf : LocallyIntegrable f volume) + (hg : LocallyIntegrable g volume) (j : ℕ) : + projFun m j (fun y => f y - g y) = fun x => projFun m j f x - projFun m j g x := by + have hg' : LocallyIntegrable (fun y => (-1 : ℂ) * g y) volume := by + simpa only [neg_one_mul, Pi.neg_def] using hg.neg + have h := projFun_add m hN hf hg' j + rw [projFun_const_mul] at h + simp only [neg_one_mul, ← sub_eq_add_neg] at h + exact h + +/-! ### The uniform bound -/ + +/-- **The bound of the projections**: the real number +`M^(1 - 1/p) ‖φ‖_p · M^(1/p) ‖φ‖_{p'} = 2N ‖φ‖_p ‖φ‖_{p'}` with the overlap number +`M = ⌈2N - 1⌉ + 1 = 2N` (for `N ≥ 1`) and the conjugate exponent `p'`, the product of the +constants of the upper estimate and of the coefficient estimate of the expansions +(`Daubechies.expandConst`, `Daubechies.coeffConst`, with the support interval `[0, 2N - 1]` of +`φ`). It is the same for every level. -/ +noncomputable def projConst (p : ℝ≥0∞) : ℝ := + (expandConst (scalingFun m) 0 (2 * N - 1) p * coeffConst (scalingFun m) 0 (2 * N - 1) p).toReal + +/-- The bound `projConst m p` is nonnegative. -/ +theorem projConst_nonneg (p : ℝ≥0∞) : 0 ≤ projConst m p := ENNReal.toReal_nonneg + +/-- For `N ≥ 2` the bound `projConst m p` is the product of the (finite) constants of the upper +estimate and of the coefficient estimate (`Daubechies.expandConst_ne_top`, +`Daubechies.coeffConst_ne_top`). -/ +theorem ofReal_projConst (hN : 2 ≤ N) (p : ℝ≥0∞) : + ENNReal.ofReal (projConst m p) = + expandConst (scalingFun m) 0 (2 * N - 1) p * coeffConst (scalingFun m) 0 (2 * N - 1) p := + ENNReal.ofReal_toReal (ENNReal.mul_ne_top (expandConst_ne_top _ _ (memLp_scalingFun m hN p)) + (coeffConst_ne_top _ _ (memLp_scalingFun m hN _))) + +/-- **The projections are bounded on `L_p`, uniformly in the level**: for `N ≥ 2`, `1 ≤ p < ∞`, +every a.e. strongly measurable `f` and every level `j`, `‖P_j f‖_p ≤ C ‖f‖_p` with +`C = projConst m p`, from the upper estimate of the expansions and the coefficient estimate, +whose dyadic weights cancel (`Daubechies.eLpNorm_expand_coeffFun_le`). -/ +theorem eLpNorm_projFun_le (hN : 2 ≤ N) {p : ℝ≥0∞} (hp1 : 1 ≤ p) (hp : p ≠ ∞) {f : ℝ → ℂ} + (hf : AEStronglyMeasurable f volume) (j : ℕ) : + eLpNorm (projFun m j f) p volume ≤ ENNReal.ofReal (projConst m p) * eLpNorm f p volume := by + rw [ofReal_projConst m hN] + exact eLpNorm_expand_coeffFun_le (continuous_scalingFun m hN).aestronglyMeasurable + (fun _ hx => scalingFun_eq_zero m hN hx) hp1 hp hf j + +/-- **The projection of an `L_p` function lies in `L_p`**: for `N ≥ 2`, `1 ≤ p < ∞`, `f ∈ L_p` +and every level `j` (`Daubechies.memLp_expand_coeffFun`). -/ +theorem memLp_projFun (hN : 2 ≤ N) {p : ℝ≥0∞} (hp1 : 1 ≤ p) (hp : p ≠ ∞) {f : ℝ → ℂ} + (hf : MemLp f p volume) (j : ℕ) : MemLp (projFun m j f) p volume := + memLp_expand_coeffFun (continuous_scalingFun m hN) (fun _ hx => scalingFun_eq_zero m hN hx) + hp1 hp hf j + +/-! ### The local bound on a dyadic cell -/ + +/-- **Only the positions `k - (2N - 2) ≤ l ≤ k` meet a dyadic cell**: for `N ≥ 2`, if `x` lies in +the dyadic cell `[k/2^j, (k + 1)/2^j)` and `l` lies outside `[k - (2N - 2), k]`, then +`φ_{j,l}(x) = 0`. Indeed `φ` vanishes outside the open interval `(0, 2N - 1)` +(`Daubechies.scalingFun_eq_zero_of_notMem_Ioo`), and `0 < 2^j x - l < 2N - 1` together with +`k ≤ 2^j x < k + 1` forces `k - (2N - 1) < l < k + 1`. -/ +theorem scaled_eq_zero_of_mem_cell (hN : 2 ≤ N) {j : ℕ} {k l : ℤ} {x : ℝ} + (hx : x ∈ Set.Ico ((k : ℝ) / 2 ^ j) ((k + 1) / 2 ^ j)) + (hl : l ∉ Finset.Icc (k - (2 * N - 2)) k) : scaled m j l x = 0 := by + have h2 : (0 : ℝ) < 2 ^ j := by positivity + have hx1 : (k : ℝ) ≤ 2 ^ j * x := (div_le_iff₀' h2).1 hx.1 + have hx2 : 2 ^ j * x < (k : ℝ) + 1 := (lt_div_iff₀' h2).1 hx.2 + refine mul_eq_zero_of_right _ (scalingFun_eq_zero_of_notMem_Ioo m hN fun ht => hl ?_) + obtain ⟨ht1, ht2⟩ := ht + have hl1 : ((k - (2 * N - 1) : ℤ) : ℝ) < l := by + push_cast + linarith + have hl2 : (l : ℝ) < ((k + 1 : ℤ) : ℝ) := by + push_cast + linarith + have hl1' := Int.cast_lt.1 hl1 + have hl2' := Int.cast_lt.1 hl2 + exact Finset.mem_Icc.2 ⟨by omega, by omega⟩ + +/-- **The projection on a dyadic cell is a finite sum**: for `N ≥ 2`, every `f` and every `x` in +the dyadic cell `[k/2^j, (k + 1)/2^j)`, +`P_j f(x) = ∑_{l = k - (2N - 2)}^{k} ⟨f, φ_{j,l}⟩ φ_{j,l}(x)` +(`Daubechies.scaled_eq_zero_of_mem_cell`). -/ +theorem projFun_eq_sum_of_mem_cell (hN : 2 ≤ N) (j : ℕ) (f : ℝ → ℂ) {k : ℤ} {x : ℝ} + (hx : x ∈ Set.Ico ((k : ℝ) / 2 ^ j) ((k + 1) / 2 ^ j)) : + projFun m j f x = + ∑ l ∈ Finset.Icc (k - (2 * N - 2)) k, coeffFun (scalingFun m) j f l * scaled m j l x := + tsum_eq_sum fun l hl => by + rw [show scaledFun (scalingFun m) j l x = 0 from scaled_eq_zero_of_mem_cell m hN hx hl, + mul_zero] + +/-- **The positions meeting a cell have their supports in one window**: for +`k - (2N - 2) ≤ l ≤ k`, the support window `[l/2^j, (l + 2N - 1)/2^j]` of `φ_{j,l}` lies in the +window `[(k - (2N - 2))/2^j, (k + 2N - 1)/2^j]`. -/ +theorem supportWindow_subset_of_mem_Icc {j : ℕ} {k l : ℤ} + (hl : l ∈ Finset.Icc (k - (2 * N - 2)) k) : + supportWindow 0 (2 * N - 1) j l ⊆ + Set.Icc (((k : ℝ) - (2 * N - 2)) / 2 ^ j) ((k + (2 * N - 1)) / 2 ^ j) := by + rw [supportWindow_eq_Icc] + obtain ⟨h1, h2⟩ := Finset.mem_Icc.1 hl + have h1' : (k : ℝ) - (2 * N - 2) ≤ l := by exact_mod_cast h1 + have h2' : (l : ℝ) ≤ k := by exact_mod_cast h2 + exact Set.Icc_subset_Icc (by gcongr; linarith) (by gcongr) + +/-- The number of positions meeting a cell: `[k - (2N - 2), k]` contains `2N - 1` integers, for +`N ≥ 1`. -/ +theorem card_Icc_sub_two_mul_sub_two (hN : 1 ≤ N) (k : ℤ) : + (Finset.Icc (k - (2 * N - 2)) k).card = 2 * N - 1 := by + rw [Int.card_Icc] + omega + +/-- **The constant of the local bound**: `(2N - 1) ‖φ‖_p ‖φ‖_{p'}` with the conjugate exponent +`p'` (`Daubechies.eLpNorm_projFun_cell_le`). -/ +noncomputable def cellConst (p : ℝ≥0∞) : ℝ≥0∞ := + ((2 * N - 1 : ℕ) : ℝ≥0∞) * + (eLpNorm (scalingFun m) p volume * eLpNorm (scalingFun m) (ENNReal.conjExponent p) volume) + +/-- The constant of the local bound is finite for `N ≥ 2`, since `φ` lies in every `L_p`. -/ +theorem cellConst_ne_top (hN : 2 ≤ N) (p : ℝ≥0∞) : cellConst m p ≠ ∞ := + ENNReal.mul_ne_top (ENNReal.natCast_ne_top _) (ENNReal.mul_ne_top + (memLp_scalingFun m hN p).eLpNorm_ne_top (memLp_scalingFun m hN _).eLpNorm_ne_top) + +/-- **One term of the projection, bounded on a window**: let `N ≥ 2`, `1 ≤ p`, let `f` be a.e. +strongly measurable, and let the set `W` contain the support window of `φ_{j,l}`. Then +`‖⟨f, φ_{j,l}⟩ φ_{j,l}‖_p ≤ ‖φ‖_p ‖φ‖_{p'} ‖f‖_{L_p(W)}`, from Hölder's inequality on the support +window (`Daubechies.enorm_coeffFun_le`) and the norms `‖φ_{j,l}‖_p = 2^(j(1/2 - 1/p)) ‖φ‖_p` and +`‖φ_{j,l}‖_{p'} = 2^(-j(1/2 - 1/p)) ‖φ‖_{p'}` (`Daubechies.eLpNorm_const_mul_scaledFun`, +`Daubechies.eLpNorm_scaledFun_conjExponent`), whose dyadic weights cancel. -/ +theorem eLpNorm_coeffFun_mul_scaled_le (hN : 2 ≤ N) {p : ℝ≥0∞} (hp1 : 1 ≤ p) {f : ℝ → ℂ} + (hf : AEStronglyMeasurable f volume) (j : ℕ) (l : ℤ) {W : Set ℝ} + (hW : supportWindow 0 (2 * N - 1) j l ⊆ W) : + eLpNorm (fun x => coeffFun (scalingFun m) j f l * scaled m j l x) p volume ≤ + eLpNorm (scalingFun m) p volume * eLpNorm (scalingFun m) (ENNReal.conjExponent p) volume * + eLpNorm f p (volume.restrict W) := by + have hφ := (continuous_scalingFun m hN).aestronglyMeasurable (μ := volume) + have hc := enorm_coeffFun_le hφ (fun _ ht => scalingFun_eq_zero m hN ht) hp1 hf j l + rw [eLpNorm_indicator_eq_eLpNorm_restrict (measurableSet_supportWindow _ _ j l).nullMeasurableSet, + eLpNorm_scaledFun_conjExponent hφ hp1] at hc + have hW' : eLpNorm f p (volume.restrict (supportWindow 0 (2 * N - 1) j l)) ≤ + eLpNorm f p (volume.restrict W) := + eLpNorm_mono_measure _ (Measure.restrict_mono hW le_rfl) + rw [eLpNorm_const_mul_scaledFun hφ] + calc ‖coeffFun (scalingFun m) j f l‖ₑ * + (dyadicWeight (1 / 2 - 1 / p.toReal) j * eLpNorm (scalingFun m) p volume) + ≤ eLpNorm f p (volume.restrict W) * (dyadicWeight (-(1 / 2 - 1 / p.toReal)) j * + eLpNorm (scalingFun m) (ENNReal.conjExponent p) volume) * + (dyadicWeight (1 / 2 - 1 / p.toReal) j * eLpNorm (scalingFun m) p volume) := by + gcongr + exact hc.trans (by gcongr) + _ = eLpNorm (scalingFun m) p volume * eLpNorm (scalingFun m) (ENNReal.conjExponent p) volume * + eLpNorm f p (volume.restrict W) * (dyadicWeight (1 / 2 - 1 / p.toReal) j * + dyadicWeight (-(1 / 2 - 1 / p.toReal)) j) := by ring + _ = _ := by rw [ENNReal.dyadicWeight_mul_neg_self, mul_one] + +/-- **The local bound on a dyadic cell**: for `N ≥ 2`, `1 ≤ p ≤ ∞`, every a.e. strongly measurable +`f`, every level `j` and every `k ∈ ℤ`, the projection on the dyadic cell +`I = [k/2^j, (k + 1)/2^j)` is controlled by `f` on the window +`W = [(k - (2N - 2))/2^j, (k + 2N - 1)/2^j]`: +`‖P_j f‖_{L_p(I)} ≤ (2N - 1) ‖φ‖_p ‖φ‖_{p'} ‖f‖_{L_p(W)}` (the constant `Daubechies.cellConst` +is the same for every `j` and `k`). On `I` only the `2N - 1` positions `k - (2N - 2) ≤ l ≤ k` +contribute (`Daubechies.projFun_eq_sum_of_mem_cell`), the support windows of their `φ_{j,l}` lie +in `W` (`Daubechies.supportWindow_subset_of_mem_Icc`), and each term is bounded by +`Daubechies.eLpNorm_coeffFun_mul_scaled_le`. -/ +theorem eLpNorm_projFun_cell_le (hN : 2 ≤ N) {p : ℝ≥0∞} (hp1 : 1 ≤ p) {f : ℝ → ℂ} + (hf : AEStronglyMeasurable f volume) (j : ℕ) (k : ℤ) : + eLpNorm (projFun m j f) p (volume.restrict (Set.Ico ((k : ℝ) / 2 ^ j) ((k + 1) / 2 ^ j))) ≤ + cellConst m p * eLpNorm f p (volume.restrict + (Set.Icc (((k : ℝ) - (2 * N - 2)) / 2 ^ j) ((k + (2 * N - 1)) / 2 ^ j))) := by + rw [eLpNorm_congr_ae (ae_restrict_of_forall_mem measurableSet_Ico + fun x hx => projFun_eq_sum_of_mem_cell m hN j f hx), ← Finset.sum_fn] + refine (eLpNorm_sum_le hp1).trans ((Finset.sum_le_card_nsmul _ _ _ fun l hl => + (eLpNorm_mono_measure _ Measure.restrict_le_self).trans + (eLpNorm_coeffFun_mul_scaled_le m hN hp1 hf j l (supportWindow_subset_of_mem_Icc hl))).trans + (le_of_eq ?_)) + rw [nsmul_eq_mul, card_Icc_sub_two_mul_sub_two (by omega), cellConst] + ring + +/-! ### Reproduction of expansions and refinement -/ + +/-- **The projection reproduces expansions**: for `N ≥ 2`, every level `j` and every coefficient +sequence `a : ℤ → ℂ`, `P_j (∑_k a_k φ_{j,k}) = ∑_k a_k φ_{j,k}` at every point, since the +coefficients are recovered, `⟨∑_l a_l φ_{j,l}, φ_{j,k}⟩ = a_k` +(`Daubechies.coeffFun_expand_scalingFun`). -/ +theorem projFun_expand (hN : 2 ≤ N) (j : ℕ) (a : ℤ → ℂ) : + projFun m j (expand (scalingFun m) j a) = expand (scalingFun m) j a := by + rw [projFun, show coeffFun (scalingFun m) j (expand (scalingFun m) j a) = a from + funext (coeffFun_expand_scalingFun m hN j a)] + +/-- **The pointwise projection is idempotent**: `P_j (P_j f) = P_j f` at every point, for `N ≥ 2` +and every `f`, since `P_j f` is an expansion of level `j` (`Daubechies.projFun_expand`). -/ +theorem projFun_projFun (hN : 2 ≤ N) (j : ℕ) (f : ℝ → ℂ) : + projFun m j (projFun m j f) = projFun m j f := + projFun_expand m hN j _ + +/-- **The projection reproduces polynomials**: for `N ≥ 2`, every complex polynomial `Q` of +degree `< N` and every level `j`, `P_j Q = Q` at every point. This is the dyadic polynomial +reproduction `∑_k 2^j (∫ Q(y) conj φ(2^j y - k) dy) φ(2^j x - k) = Q(x)` +(`Daubechies.sum_inner_poly_mul_scalingFun_two_pow`), since +`⟨Q, φ_{j,k}⟩ φ_{j,k}(x) = 2^j (∫ Q(y) conj φ(2^j y - k) dy) φ(2^j x - k)`. -/ +theorem projFun_poly (hN : 2 ≤ N) {Q : Polynomial ℂ} (hQ : Q ∈ Polynomial.degreeLT ℂ N) + (j : ℕ) : projFun m j (fun y => Q.eval (y : ℂ)) = fun x : ℝ => Q.eval (x : ℂ) := by + funext x + rw [projFun_apply, ← sum_inner_poly_mul_scalingFun_two_pow m hN hQ j x] + refine tsum_congr fun k => ?_ + have hc : coeffFun (scalingFun m) j (fun y => Q.eval (y : ℂ)) k = + (((2 : ℝ) ^ ((j : ℝ) / 2) : ℝ) : ℂ) * + ∫ y : ℝ, Q.eval (y : ℂ) * conj (scalingFun m (2 ^ j * y - k)) := by + rw [coeffFun, ← integral_const_mul] + refine integral_congr_ae (Eventually.of_forall fun y => ?_) + simp only [scaledFun, map_mul, Complex.conj_ofReal] + ring + rw [hc, show scaled m j k x = (((2 : ℝ) ^ ((j : ℝ) / 2) : ℝ) : ℂ) * scalingFun m (2 ^ j * x - k) + from rfl, ← ofReal_two_rpow_half_mul_self j] + ring + +/-- **The refined coefficients**: for coefficients `a : ℤ → ℂ` of level `j`, the coefficients +`a'_n = ∑_{k ∈ ℤ} a_k c_{n-2k}/√2` of level `j + 1`, with the filter coefficients `c_i` +(`Daubechies.coeff`); only the `k` with `0 ≤ n - 2k ≤ 2N - 1` contribute. They express an +expansion of level `j` as one of level `j + 1`, `∑_k a_k φ_{j,k} = ∑_n a'_n φ_{j+1,n}` +(`Daubechies.expand_eq_expand_succ`). -/ +noncomputable def refineCoeff (a : ℤ → ℂ) (n : ℤ) : ℂ := + ∑' k : ℤ, a k * ((coeff m (n - 2 * k) / √2 : ℝ) : ℂ) + +/-- **Support of the filter**: if the filter coefficient `c_i` is nonzero, then +`0 ≤ i ≤ 2N - 1` (`Daubechies.coeff_eq_zero`). -/ +theorem mem_Icc_of_coeff_ne_zero {i : ℤ} (h : coeff m i ≠ 0) : 0 ≤ i ∧ i ≤ 2 * N - 1 := by + by_contra h' + exact h (coeff_eq_zero m (by omega)) + +/-- **The double sum of a refinement has finitely many terms**: for `N ≥ 2`, a real filter `h` +vanishing outside `[a, b]`, a level `j`, coefficients `c : ℤ → ℂ` and a point `x`, the family +`(k, n) ↦ c_k (h_{n-2k}/√2) φ_{j+1,n}(x)` is summable over `ℤ × ℤ`. A nonzero term needs +`a ≤ n - 2k ≤ b` and `0 ≤ 2^(j+1) x - n ≤ 2N - 1`, which leaves finitely many pairs +(`Daubechies.mem_Icc_ceil_floor`). -/ +theorem summable_refine_of_filter (hN : 2 ≤ N) {h : ℤ → ℝ} {a b : ℤ} + (hh : ∀ i, h i ≠ 0 → a ≤ i ∧ i ≤ b) (j : ℕ) (c : ℤ → ℂ) (x : ℝ) : + Summable (Function.uncurry fun k n : ℤ => + c k * (((h (n - 2 * k) / √2 : ℝ) : ℂ) * scaled m (j + 1) n x)) := by + refine summable_of_ne_finset_zero + (s := Finset.Icc ⌈2 ^ j * x - (b + (2 * N - 1)) / 2⌉ ⌊2 ^ j * x - a / 2⌋ ×ˢ + Finset.Icc ⌈2 ^ (j + 1) * x - (2 * N - 1)⌉ ⌊2 ^ (j + 1) * x - 0⌋) fun kn hkn => ?_ + obtain ⟨k, n⟩ := kn + by_contra hne + refine hkn ?_ + simp only [Function.uncurry_apply_pair] at hne + obtain ⟨-, h'⟩ := mul_ne_zero_iff.1 hne + obtain ⟨hc, hs⟩ := mul_ne_zero_iff.1 h' + have hc' : h (n - 2 * k) ≠ 0 := fun h0 => hc (by rw [h0, zero_div, Complex.ofReal_zero]) + obtain ⟨h1, h2⟩ := hh _ hc' + have hw := mem_supportWindow_of_scaledFun_ne_zero (fun _ hy => scalingFun_eq_zero m hN hy) hs + refine Finset.mem_product.2 ⟨mem_Icc_ceil_floor ?_, mem_Icc_ceil_floor hw⟩ + have h1' : (a : ℝ) ≤ n - 2 * k := by exact_mod_cast h1 + have h2' : (n : ℝ) - 2 * k ≤ b := by exact_mod_cast h2 + obtain ⟨hw1, hw2⟩ := hw + rw [pow_succ] at hw1 hw2 + constructor <;> linarith + +/-- **Refining an expansion through a filter**: if `N ≥ 2`, the real filter `h` vanishes outside +`[a, b]` and `g_{j,k} = ∑_n (h_{n-2k}/√2) φ_{j+1,n}` for every `k`, then +`∑_k c_k g_{j,k}(x) = ∑_n (∑_k c_k h_{n-2k}/√2) φ_{j+1,n}(x)` for all `c` and `x`; the two sums +may be exchanged (`Daubechies.summable_refine_of_filter`). -/ +theorem expand_eq_tsum_refine_of_filter (hN : 2 ≤ N) {g : ℝ → ℂ} {h : ℤ → ℝ} {a b : ℤ} + (hh : ∀ i, h i ≠ 0 → a ≤ i ∧ i ≤ b) (j : ℕ) + (hg : ∀ (k : ℤ) (x : ℝ), scaledFun g j k x = + expand (scalingFun m) (j + 1) (fun n => ((h (n - 2 * k) / √2 : ℝ) : ℂ)) x) + (c : ℤ → ℂ) (x : ℝ) : + expand g j c x = ∑' n : ℤ, + (∑' k : ℤ, c k * ((h (n - 2 * k) / √2 : ℝ) : ℂ)) * scaled m (j + 1) n x := by + calc expand g j c x + = ∑' k : ℤ, ∑' n : ℤ, + c k * (((h (n - 2 * k) / √2 : ℝ) : ℂ) * scaled m (j + 1) n x) := by + refine tsum_congr fun k => ?_ + rw [hg k x, expand, ← tsum_mul_left] + _ = ∑' n : ℤ, ∑' k : ℤ, + c k * (((h (n - 2 * k) / √2 : ℝ) : ℂ) * scaled m (j + 1) n x) := + (summable_refine_of_filter m hN hh j c x).tsum_comm.symm + _ = _ := by + refine tsum_congr fun n => ?_ + rw [← tsum_mul_right] + exact tsum_congr fun k => (mul_assoc _ _ _).symm + +/-- **The double sum of the refinement has finitely many terms**: for `N ≥ 2` the family +`(k, n) ↦ a_k (c_{n-2k}/√2) φ_{j+1,n}(x)` is summable over `ℤ × ℤ` +(`Daubechies.summable_refine_of_filter`, `Daubechies.mem_Icc_of_coeff_ne_zero`). -/ +theorem summable_refine (hN : 2 ≤ N) (j : ℕ) (a : ℤ → ℂ) (x : ℝ) : + Summable (Function.uncurry fun k n : ℤ => + a k * (((coeff m (n - 2 * k) / √2 : ℝ) : ℂ) * scaled m (j + 1) n x)) := + summable_refine_of_filter m hN (h := coeff m) (fun _ hi => mem_Icc_of_coeff_ne_zero m hi) + j a x + +/-- **Expansions of level `j` are expansions of level `j + 1`**: for `N ≥ 2`, every level `j`, +coefficients `a : ℤ → ℂ` and point `x`, `∑_k a_k φ_{j,k}(x) = ∑_n a'_n φ_{j+1,n}(x)` with the +refined coefficients `a'_n = ∑_k a_k c_{n-2k}/√2` (`Daubechies.refineCoeff`), by +`Daubechies.expand_eq_tsum_refine_of_filter` and `Daubechies.scaled_eq_expand`. -/ +theorem expand_eq_expand_succ (hN : 2 ≤ N) (j : ℕ) (a : ℤ → ℂ) (x : ℝ) : + expand (scalingFun m) j a x = expand (scalingFun m) (j + 1) (refineCoeff m a) x := + expand_eq_tsum_refine_of_filter m hN (h := coeff m) + (fun _ hi => mem_Icc_of_coeff_ne_zero m hi) j (scaled_eq_expand m hN j) a x + +/-- **The projections of consecutive levels**: `P_{j+1} (P_j f) = P_j f` at every point, for +`N ≥ 2` and every `f`. The function `P_j f` is an expansion of level `j + 1` +(`Daubechies.expand_eq_expand_succ`), which `P_{j+1}` reproduces +(`Daubechies.projFun_expand`). -/ +theorem projFun_succ_projFun (hN : 2 ≤ N) (j : ℕ) (f : ℝ → ℂ) : + projFun m (j + 1) (projFun m j f) = projFun m j f := by + have h : projFun m j f = + expand (scalingFun m) (j + 1) (refineCoeff m (coeffFun (scalingFun m) j f)) := + funext (expand_eq_expand_succ m hN j _) + rw [h, projFun_expand m hN] + +/-! ### Convergence for continuous functions with compact support -/ + +/-- **Points of one support window are close**: if `x` and `y` both lie in the support window +`{t : 2^j t - k ∈ [a, b]}`, then `|y - x| ≤ (b - a)/2^j`. -/ +theorem abs_sub_le_of_mem_supportWindow {a b : ℝ} {j : ℕ} {k : ℤ} {x y : ℝ} + (hx : x ∈ supportWindow a b j k) (hy : y ∈ supportWindow a b j k) : + |y - x| ≤ (b - a) / 2 ^ j := by + rw [supportWindow_eq_Icc] at hx hy + have h : (b - a) / 2 ^ j = (k + b) / 2 ^ j - (k + a) / 2 ^ j := by ring + rw [h, abs_sub_le_iff] + constructor <;> linarith [hx.1, hx.2, hy.1, hy.2] + +/-- **A pointwise bound of `φ_{j,k}`**: if `‖φ(t)‖ ≤ C` for every `t`, then +`‖φ_{j,k}(x)‖ ≤ 2^(j/2) C` for every level `j`, position `k` and point `x`. -/ +theorem enorm_scaled_le {C : ℝ≥0∞} (hC : ∀ t, ‖scalingFun m t‖ₑ ≤ C) (j : ℕ) (k : ℤ) (x : ℝ) : + ‖scaled m j k x‖ₑ ≤ dyadicWeight (1 / 2) j * C := by + rw [show scaled m j k x = (((2 : ℝ) ^ ((j : ℝ) / 2) : ℝ) : ℂ) * scalingFun m (2 ^ j * x - k) + from rfl, eNorm_mul, enorm_two_rpow_half] + gcongr + exact hC _ + +/-- `conj φ_{j,k}` is integrable for `N ≥ 2`: it is continuous with compact support. -/ +theorem integrable_conj_scaled (hN : 2 ≤ N) (j : ℕ) (k : ℤ) : + Integrable fun y => conj (scaled m j k y) := + (Complex.continuous_conj.comp (continuous_scaledFun (continuous_scalingFun m hN) j k) + ).integrable_of_hasCompactSupport + ((hasCompactSupport_scaledFun (fun _ hx => scalingFun_eq_zero m hN hx) j k).comp_left + (map_zero _)) + +/-- **`φ_{j,k}` times its integral**: `φ_{j,k}(x) ∫ conj φ_{j,k} = φ(2^j x - k)` for `N ≥ 2`, every +level `j`, position `k` and point `x`. The scaling function is real with `∫ φ = 1` +(`Daubechies.conj_scalingFun`, `Daubechies.integral_scalingFun`), so the substitution `u = 2^j y` +(`Daubechies.integral_eq_two_pow_mul_integral_comp`) gives +`∫ conj φ_{j,k} = 2^(j/2) 2^(-j)`, and `2^(j/2) 2^(j/2) 2^(-j) = 1`. -/ +theorem scaled_mul_integral_conj (hN : 2 ≤ N) (j : ℕ) (k : ℤ) (x : ℝ) : + scaled m j k x * ∫ y, conj (scaled m j k y) = scalingFun m (2 ^ j * x - k) := by + have h1 : (2 : ℂ) ^ j * ∫ y, scalingFun m (2 ^ j * y - k) = 1 := by + have h := integral_eq_two_pow_mul_integral_comp (fun u => scalingFun m (u - k)) j + rw [integral_sub_right_eq_self, integral_scalingFun m hN] at h + exact h.symm + have h2 : (fun y => conj (scaled m j k y)) = + fun y => (((2 : ℝ) ^ ((j : ℝ) / 2) : ℝ) : ℂ) * scalingFun m (2 ^ j * y - k) := by + funext y + rw [show scaled m j k y = (((2 : ℝ) ^ ((j : ℝ) / 2) : ℝ) : ℂ) * scalingFun m (2 ^ j * y - k) + from rfl, map_mul, Complex.conj_ofReal, conj_scalingFun] + rw [h2, integral_const_mul, show scaled m j k x = + (((2 : ℝ) ^ ((j : ℝ) / 2) : ℝ) : ℂ) * scalingFun m (2 ^ j * x - k) from rfl] + calc (((2 : ℝ) ^ ((j : ℝ) / 2) : ℝ) : ℂ) * scalingFun m (2 ^ j * x - k) * + ((((2 : ℝ) ^ ((j : ℝ) / 2) : ℝ) : ℂ) * ∫ y, scalingFun m (2 ^ j * y - k)) + = scalingFun m (2 ^ j * x - k) * ((((2 : ℝ) ^ ((j : ℝ) / 2) : ℝ) : ℂ) * + (((2 : ℝ) ^ ((j : ℝ) / 2) : ℝ) : ℂ) * ∫ y, scalingFun m (2 ^ j * y - k)) := by ring + _ = scalingFun m (2 ^ j * x - k) := by rw [ofReal_two_rpow_half_mul_self, h1, mul_one] + +/-- **Partition of unity at level `j`**: for `N ≥ 2`, every level `j` and point `x`, +`∑_{k ∈ ℤ} φ_{j,k}(x) ∫ conj φ_{j,k} = ∑_k φ(2^j x - k) = 1` +(`Daubechies.scaled_mul_integral_conj`, `Daubechies.sum_scalingFun_translate`). -/ +theorem tsum_scaled_mul_integral_conj (hN : 2 ≤ N) (j : ℕ) (x : ℝ) : + ∑' k : ℤ, scaled m j k x * ∫ y, conj (scaled m j k y) = 1 := by + simp only [scaled_mul_integral_conj m hN] + exact sum_scalingFun_translate m hN (2 ^ j * x) + +/-- **The positions contributing at a point**: for `N ≥ 2`, `φ_{j,k}(x) = 0` unless +`⌈2^j x - (2N - 1)⌉ ≤ k ≤ ⌊2^j x⌋` (`Daubechies.scaledFun_eq_zero`, +`Daubechies.mem_Icc_ceil_floor`). -/ +theorem scaled_eq_zero_of_notMem_Icc (hN : 2 ≤ N) {j : ℕ} {k : ℤ} {x : ℝ} + (hk : k ∉ Finset.Icc ⌈2 ^ j * x - (2 * N - 1)⌉ ⌊2 ^ j * x⌋) : scaled m j k x = 0 := + scaledFun_eq_zero (fun _ hy => scalingFun_eq_zero m hN hy) fun hx => + hk (by simpa only [sub_zero] using mem_Icc_ceil_floor hx) + +/-- **Sums over the positions at a point are finite**: for `N ≥ 2`, a level `j`, a point `x` and +a family `F : ℤ → ℂ` with `F k = 0` whenever `φ_{j,k}(x) = 0`, +`∑_{k ∈ ℤ} F k = ∑_{k = ⌈2^j x - (2N - 1)⌉}^{⌊2^j x⌋} F k` +(`Daubechies.scaled_eq_zero_of_notMem_Icc`). -/ +theorem tsum_eq_sum_of_scaled_eq_zero (hN : 2 ≤ N) {j : ℕ} {x : ℝ} {F : ℤ → ℂ} + (hF : ∀ k, scaled m j k x = 0 → F k = 0) : + ∑' k, F k = ∑ k ∈ Finset.Icc ⌈2 ^ j * x - (2 * N - 1)⌉ ⌊2 ^ j * x⌋, F k := + tsum_eq_sum fun k hk => hF k (scaled_eq_zero_of_notMem_Icc m hN hk) + +/-- The families of `Daubechies.tsum_eq_sum_of_scaled_eq_zero` are summable: they have only +finitely many nonzero terms. -/ +theorem summable_of_scaled_eq_zero (hN : 2 ≤ N) {j : ℕ} {x : ℝ} {F : ℤ → ℂ} + (hF : ∀ k, scaled m j k x = 0 → F k = 0) : Summable F := + summable_of_ne_finset_zero fun k hk => hF k (scaled_eq_zero_of_notMem_Icc m hN hk) + +/-- **Counting the contributing positions**: for `N ≥ 1` and every `t ∈ ℝ`, the interval +`[⌈t - (2N - 1)⌉, ⌊t⌋]` contains at most `2N` integers (`Daubechies.card_Icc_ceil_floor_le`). -/ +theorem card_Icc_ceil_floor_le_two_mul (hN : 1 ≤ N) (t : ℝ) : + (Finset.Icc ⌈t - (2 * N - 1)⌉ ⌊t⌋).card ≤ 2 * N := by + have h := card_Icc_ceil_floor_le t 0 (2 * N - 1) + simp only [sub_zero] at h + have hc : ⌈(2 * N - 1 : ℝ)⌉₊ ≤ 2 * N - 1 := + Nat.ceil_le.2 (le_of_eq (by rw [Nat.cast_sub (by omega : 1 ≤ 2 * N)]; push_cast; ring)) + omega + +/-- **The kernel form of `P_j f - f`**: for `N ≥ 2`, locally integrable `f`, every level `j` and +point `x`, `P_j f(x) - f(x) = ∑_{k ∈ ℤ} φ_{j,k}(x) ∫ (f(y) - f(x)) conj φ_{j,k}(y) dy`. Subtract +`f(x) = ∑_k φ_{j,k}(x) f(x) ∫ conj φ_{j,k}` (`Daubechies.tsum_scaled_mul_integral_conj`) term by +term; both sums have only finitely many nonzero terms. -/ +theorem projFun_sub_eq_tsum (hN : 2 ≤ N) {f : ℝ → ℂ} (hf : LocallyIntegrable f volume) (j : ℕ) + (x : ℝ) : + projFun m j f x - f x = + ∑' k : ℤ, scaled m j k x * ∫ y, (f y - f x) * conj (scaled m j k y) := by + have hint : ∀ k : ℤ, ∫ y, (f y - f x) * conj (scaled m j k y) = + coeffFun (scalingFun m) j f k - f x * ∫ y, conj (scaled m j k y) := fun k => by + simp only [sub_mul] + rw [integral_sub (integrable_mul_conj_scaled m hN hf j k) + ((integrable_conj_scaled m hN j k).const_mul (f x)), integral_const_mul] + rfl + have hs1 : Summable fun k : ℤ => scaled m j k x * coeffFun (scalingFun m) j f k := + summable_of_scaled_eq_zero m hN fun k hk => by rw [hk, zero_mul] + have hs2 : Summable fun k : ℤ => scaled m j k x * (f x * ∫ y, conj (scaled m j k y)) := + summable_of_scaled_eq_zero m hN fun k hk => by rw [hk, zero_mul] + simp only [hint, mul_sub] + rw [hs1.tsum_sub hs2] + congr 1 + · rw [projFun_apply] + exact tsum_congr fun k => mul_comm _ _ + · rw [show (fun k : ℤ => scaled m j k x * (f x * ∫ y, conj (scaled m j k y))) = + fun k => f x * (scaled m j k x * ∫ y, conj (scaled m j k y)) from + funext fun k => mul_left_comm _ _ _, tsum_mul_left, tsum_scaled_mul_integral_conj m hN, + mul_one] + +/-- **A local bound for one kernel term**: let `N ≥ 2`, `‖φ(t)‖ ≤ C` for all `t`, and let `η` +bound `‖f(y) - f(x)‖` for all `y` with `|y - x| ≤ (2N - 1)/2^j`. Then +`‖φ_{j,k}(x) ∫ (f(y) - f(x)) conj φ_{j,k}(y) dy‖ ≤ C ‖φ‖_1 η` for every position `k`. The term +vanishes unless `x` lies in the support window of `φ_{j,k}`; then every `y` of that window has +`|y - x| ≤ (2N - 1)/2^j` (`Daubechies.abs_sub_le_of_mem_supportWindow`), so the integral is at +most `η ‖φ_{j,k}‖_1 = η 2^(-j/2) ‖φ‖_1` (`Daubechies.eLpNorm_scaledFun`), while +`‖φ_{j,k}(x)‖ ≤ 2^(j/2) C` (`Daubechies.enorm_scaled_le`). -/ +theorem enorm_scaled_mul_integral_sub_le (hN : 2 ≤ N) {f : ℝ → ℂ} {C : ℝ≥0∞} + (hC : ∀ t, ‖scalingFun m t‖ₑ ≤ C) (j : ℕ) (k : ℤ) (x : ℝ) {η : ℝ≥0∞} + (hη : ∀ y, |y - x| ≤ (2 * N - 1) / 2 ^ j → ‖f y - f x‖ₑ ≤ η) : + ‖scaled m j k x * ∫ y, (f y - f x) * conj (scaled m j k y)‖ₑ ≤ + C * eLpNorm (scalingFun m) 1 volume * η := by + have hsupp : ∀ t ∉ Set.Icc (0 : ℝ) (2 * N - 1), scalingFun m t = 0 := + fun _ ht => scalingFun_eq_zero m hN ht + by_cases hx : scaled m j k x = 0 + · rw [hx, zero_mul, eNorm_zero] + positivity + have hxw := mem_supportWindow_of_scaledFun_ne_zero hsupp hx + have hs := continuous_scaledFun (continuous_scalingFun m hN) j k + have h1 : ∫⁻ y, ‖(f y - f x) * conj (scaled m j k y)‖ₑ ≤ ∫⁻ y, η * ‖scaled m j k y‖ₑ := by + refine lintegral_mono fun y => ?_ + rw [eNorm_mul, RCLike.eNorm_conj] + by_cases hy : scaled m j k y = 0 + · rw [hy, eNorm_zero, mul_zero, mul_zero] + · gcongr + exact hη y ((abs_sub_le_of_mem_supportWindow hxw + (mem_supportWindow_of_scaledFun_ne_zero hsupp hy)).trans_eq (by rw [sub_zero])) + have h2 : ‖∫ y, (f y - f x) * conj (scaled m j k y)‖ₑ ≤ + η * (dyadicWeight (-(1 / 2)) j * eLpNorm (scalingFun m) 1 volume) := by + have hw : (1 : ℝ) / 2 - 1 / (1 : ℝ≥0∞).toReal = -(1 / 2) := by norm_num + calc ‖∫ y, (f y - f x) * conj (scaled m j k y)‖ₑ + ≤ ∫⁻ y, ‖(f y - f x) * conj (scaled m j k y)‖ₑ := eNorm_integral_le_lintegral_eNorm _ + _ ≤ ∫⁻ y, η * ‖scaled m j k y‖ₑ := h1 + _ = η * ∫⁻ y, ‖scaled m j k y‖ₑ := lintegral_const_mul η hs.measurable.eNorm + _ = η * (dyadicWeight (-(1 / 2)) j * eLpNorm (scalingFun m) 1 volume) := by + rw [← eLpNorm_one_eq_lintegral_eNorm hs.aestronglyMeasurable, + eLpNorm_scaledFun (continuous_scalingFun m hN).aestronglyMeasurable, hw] + calc ‖scaled m j k x * ∫ y, (f y - f x) * conj (scaled m j k y)‖ₑ + = ‖scaled m j k x‖ₑ * ‖∫ y, (f y - f x) * conj (scaled m j k y)‖ₑ := eNorm_mul _ _ + _ ≤ (dyadicWeight (1 / 2) j * C) * + (η * (dyadicWeight (-(1 / 2)) j * eLpNorm (scalingFun m) 1 volume)) := + mul_le_mul' (enorm_scaled_le m hC j k x) h2 + _ = C * eLpNorm (scalingFun m) 1 volume * η * + (dyadicWeight (1 / 2) j * dyadicWeight (-(1 / 2)) j) := by ring + _ = C * eLpNorm (scalingFun m) 1 volume * η := by + rw [ENNReal.dyadicWeight_mul_neg_self, mul_one] + +/-- **A pointwise bound for `P_j f - f`**: let `N ≥ 2`, let `f` be locally integrable, let +`‖φ(t)‖ ≤ C` for all `t`, and let `η` bound `‖f(y) - f(x)‖` for all `y` with +`|y - x| ≤ (2N - 1)/2^j`. Then `‖P_j f(x) - f(x)‖ ≤ 2N C ‖φ‖_1 η`. The kernel form +(`Daubechies.projFun_sub_eq_tsum`) has at most `2N` nonzero terms at `x` +(`Daubechies.card_Icc_ceil_floor_le_two_mul`), each bounded by +`Daubechies.enorm_scaled_mul_integral_sub_le`. -/ +theorem enorm_projFun_sub_le (hN : 2 ≤ N) {f : ℝ → ℂ} (hf : LocallyIntegrable f volume) + {C : ℝ≥0∞} (hC : ∀ t, ‖scalingFun m t‖ₑ ≤ C) (j : ℕ) (x : ℝ) {η : ℝ≥0∞} + (hη : ∀ y, |y - x| ≤ (2 * N - 1) / 2 ^ j → ‖f y - f x‖ₑ ≤ η) : + ‖projFun m j f x - f x‖ₑ ≤ 2 * N * (C * eLpNorm (scalingFun m) 1 volume * η) := by + rw [projFun_sub_eq_tsum m hN hf j x, + tsum_eq_sum_of_scaled_eq_zero m hN fun k hk => by rw [hk, zero_mul]] + refine (eNorm_sum_le _ _).trans ((Finset.sum_le_card_nsmul _ _ _ fun k _ => + enorm_scaled_mul_integral_sub_le m hN hC j k x hη).trans ?_) + rw [nsmul_eq_mul] + gcongr + exact_mod_cast card_Icc_ceil_floor_le_two_mul (by omega) _ + +/-- **The `L_p` error of `P_j f` for a continuous function with compact support**: let `N ≥ 2`, +let `f` be continuous with `f(x) = 0` for `|x| ≥ R`, let `‖φ(t)‖ ≤ C` for all `t`, and let `η` +bound `‖f(y) - f(x)‖` for all `x, y` with `|y - x| ≤ (2N - 1)/2^j`. Then for every exponent `p`, +`‖f - P_j f‖_p ≤ 2N C ‖φ‖_1 η |[-R - 2N, R + 2N]|^(1/p)`. The pointwise bound +`Daubechies.enorm_projFun_sub_le` holds everywhere, and `P_j f - f` vanishes for +`|x| > R + 2N`, where the same bound holds with `η = 0`. -/ +theorem eLpNorm_sub_projFun_le (hN : 2 ≤ N) {f : ℝ → ℂ} (hf : Continuous f) {R : ℝ} + (hR : ∀ x : ℝ, R ≤ ‖x‖ → f x = 0) {C : ℝ≥0∞} (hC : ∀ t, ‖scalingFun m t‖ₑ ≤ C) (j : ℕ) + {η : ℝ≥0∞} (hη : ∀ x y : ℝ, |y - x| ≤ (2 * N - 1) / 2 ^ j → ‖f y - f x‖ₑ ≤ η) + (p : ℝ≥0∞) : + eLpNorm (f - projFun m j f) p volume ≤ 2 * N * (C * eLpNorm (scalingFun m) 1 volume * η) * + volume (Metric.closedBall (0 : ℝ) (R + 2 * N)) ^ p.toReal⁻¹ := by + have hN' : (2 : ℝ) ≤ N := by exact_mod_cast hN + have hmeas : AEStronglyMeasurable (f - projFun m j f) volume := + (hf.sub (continuous_projFun m hN j f)).aestronglyMeasurable + have hsupp : Function.support (f - projFun m j f) ⊆ Metric.closedBall 0 (R + 2 * N) := by + intro x hx + by_contra hxK + rw [Metric.mem_closedBall, dist_zero_right, not_le, Real.norm_eq_abs] at hxK + refine hx ?_ + have hfx : f x = 0 := hR x (by rw [Real.norm_eq_abs]; linarith) + have h0 := enorm_projFun_sub_le m hN hf.locallyIntegrable hC j x (η := 0) fun y hy => by + have h2 : (2 * N - 1 : ℝ) / 2 ^ j ≤ 2 * N - 1 := + div_le_self (by linarith) (one_le_pow₀ one_le_two) + have h3 := abs_sub_abs_le_abs_sub x y + rw [abs_sub_comm x y] at h3 + rw [hfx, hR y (by rw [Real.norm_eq_abs]; linarith), sub_zero, eNorm_zero] + rw [mul_zero, mul_zero, nonpos_iff_eq_zero, eNorm_eq_zero, sub_eq_zero, hfx] at h0 + rw [Pi.sub_apply, h0, hfx, sub_self] + rw [← eLpNorm_restrict_eq_of_support_subset hmeas hsupp] + refine (eLpNorm_le_of_ae_eNorm_bound (C := 2 * N * (C * eLpNorm (scalingFun m) 1 volume * η)) + hmeas.restrict (Eventually.of_forall fun x => ?_)).trans ?_ + · rw [Pi.sub_apply, eNorm_sub_rev] + exact enorm_projFun_sub_le m hN hf.locallyIntegrable hC j x (hη x) + · rw [Measure.restrict_apply_univ, smul_eq_mul] + +/-- **Dyadic scales become small**: for every `c ∈ ℝ` and `δ > 0` there is a level `J` with +`c/2^J < δ`. -/ +theorem exists_div_two_pow_lt (c : ℝ) {δ : ℝ} (hδ : 0 < δ) : ∃ J : ℕ, c / 2 ^ J < δ := by + obtain ⟨J, hJ⟩ := exists_nat_gt (c / δ) + refine ⟨J, ?_⟩ + have h2 : (J : ℝ) < 2 ^ J := by exact_mod_cast Nat.lt_two_pow_self + have h3 : (J : ℝ) * δ < 2 ^ J * δ := mul_lt_mul_of_pos_right h2 hδ + rw [div_lt_iff₀ hδ] at hJ + rw [div_lt_iff₀ (by positivity)] + linarith + +/-- **`P_j f → f` for continuous functions with compact support**: for `N ≥ 2`, every continuous +`f` with compact support and every exponent `p`, `‖f - P_j f‖_p → 0` as `j → ∞`. The function +`f` is uniformly continuous, so `‖f(y) - f(x)‖ ≤ η` once `|y - x| ≤ (2N - 1)/2^j` and `j` is +large; `φ` is bounded; and `Daubechies.eLpNorm_sub_projFun_le` bounds the error by a fixed +multiple of `η`. -/ +theorem tendsto_eLpNorm_sub_projFun (hN : 2 ≤ N) {f : ℝ → ℂ} (hf : Continuous f) + (hfc : HasCompactSupport f) (p : ℝ≥0∞) : + Tendsto (fun j => eLpNorm (f - projFun m j f) p volume) atTop (𝓝 0) := by + obtain ⟨R, -, hR⟩ := hfc.exists_pos_le_norm + obtain ⟨C, hC⟩ := (continuous_scalingFun m hN).bounded_above_of_compact_support + (hasCompactSupport_scalingFun m hN) + have hC' : ∀ t, ‖scalingFun m t‖ₑ ≤ ENNReal.ofReal C := fun t => by + rw [← ofReal_norm] + exact ENNReal.ofReal_le_ofReal (hC t) + have hA : 2 * N * (ENNReal.ofReal C * eLpNorm (scalingFun m) 1 volume) * + volume (Metric.closedBall (0 : ℝ) (R + 2 * N)) ^ p.toReal⁻¹ ≠ ∞ := + ENNReal.mul_ne_top (ENNReal.mul_ne_top (ENNReal.mul_ne_top (by simp) (by simp)) + (ENNReal.mul_ne_top ENNReal.ofReal_ne_top (memLp_scalingFun m hN 1).eLpNorm_ne_top)) + (ENNReal.rpow_ne_top_of_nonneg (inv_nonneg.2 ENNReal.toReal_nonneg) + (by rw [Real.volume_closedBall]; exact ENNReal.ofReal_ne_top)) + rw [ENNReal.tendsto_atTop_zero] + intro ε hε + obtain ⟨η, hη0, hηε⟩ := ENNReal.exists_nnreal_pos_mul_lt hA hε.ne' + obtain ⟨δ, hδ0, hδ⟩ := + Metric.uniformContinuous_iff.1 (hfc.uniformContinuous_of_continuous hf) η hη0 + obtain ⟨J, hJ⟩ := exists_div_two_pow_lt (2 * N - 1) hδ0 + refine ⟨J, fun j hj => (eLpNorm_sub_projFun_le m hN hf hR hC' j (η := η) + (fun x y hxy => ?_) p).trans ?_⟩ + · have hjJ : (2 * N - 1 : ℝ) / 2 ^ j ≤ (2 * N - 1) / 2 ^ J := + div_le_div_of_nonneg_left (by linarith [show (2 : ℝ) ≤ N by exact_mod_cast hN]) + (by positivity) (pow_le_pow_right₀ one_le_two hj) + have hd : dist y x < δ := by + rw [Real.dist_eq] + linarith + rw [← eDist_eq_eNorm_sub, edist_dist] + exact (ENNReal.ofReal_le_ofReal (hδ hd).le).trans_eq ENNReal.ofReal_coe_nnreal + · calc 2 * N * (ENNReal.ofReal C * eLpNorm (scalingFun m) 1 volume * η) * + volume (Metric.closedBall (0 : ℝ) (R + 2 * N)) ^ p.toReal⁻¹ + = η * (2 * N * (ENNReal.ofReal C * eLpNorm (scalingFun m) 1 volume) * + volume (Metric.closedBall (0 : ℝ) (R + 2 * N)) ^ p.toReal⁻¹) := by ring + _ ≤ ε := hηε.le + +/-! ### The projection of level `j` on `L_p` -/ + +section Lp + +variable {p : ℝ≥0∞} [Fact (1 ≤ p)] + +variable (p) in +/-- **The projection of level `j` as a linear map on `L_p`**, for `N ≥ 2` and `1 ≤ p < ∞`: the +class of the pointwise projection `P_j f` (`Daubechies.projFun`) of a representative of `f`. -/ +noncomputable def projLinear (hN : 2 ≤ N) (hp : p ≠ ∞) (j : ℕ) : + Lp ℂ p (volume : Measure ℝ) →ₗ[ℝ] Lp ℂ p (volume : Measure ℝ) where + toFun f := (memLp_projFun m hN Fact.out hp (Lp.memLp f) j).toLp _ + map_add' f g := by + rw [← MemLp.toLp_add] + refine MemLp.toLp_congr _ _ (Eventually.of_forall fun x => ?_) + rw [projFun_congr_ae m (Lp.coeFn_add f g) j] + exact congrFun (projFun_add m hN ((Lp.memLp f).locallyIntegrable Fact.out) + ((Lp.memLp g).locallyIntegrable Fact.out) j) x + map_smul' c f := by + rw [RingHom.id_apply, ← MemLp.toLp_const_smul] + refine MemLp.toLp_congr _ _ (Eventually.of_forall fun x => ?_) + have hcf : ⇑(c • f) =ᵐ[volume] fun y => (c : ℂ) * f y := + (Lp.coeFn_smul c f).mono fun y hy => by rw [hy, Pi.smul_apply, Complex.real_smul] + rw [projFun_congr_ae m hcf j, projFun_const_mul, Pi.smul_apply, Complex.real_smul] + +variable (p) in +/-- **The projection of level `j` on `L_p`**, for `N ≥ 2` and `1 ≤ p < ∞`: +`P_j f = ∑_{k ∈ ℤ} ⟨f, φ_{j,k}⟩ φ_{j,k}`, a bounded operator whose norm is at most +`projConst m p` for every level (`Daubechies.norm_proj_le`). -/ +noncomputable def proj (hN : 2 ≤ N) (hp : p ≠ ∞) (j : ℕ) : + Lp ℂ p (volume : Measure ℝ) →L[ℝ] Lp ℂ p (volume : Measure ℝ) := + LinearMap.mkContinuous (projLinear m p hN hp j) (projConst m p) fun f => by + have hmem := memLp_projFun m hN Fact.out hp (Lp.memLp f) j + rw [Lp.norm_def, Lp.norm_def, ← ENNReal.toReal_ofReal (projConst_nonneg m p), + ← ENNReal.toReal_mul] + refine ENNReal.toReal_mono (ENNReal.mul_ne_top ENNReal.ofReal_ne_top (Lp.eLpNorm_ne_top f)) ?_ + rw [show projLinear m p hN hp j f = hmem.toLp _ from rfl, + eLpNorm_congr_ae (MemLp.coeFn_toLp hmem)] + exact eLpNorm_projFun_le m hN Fact.out hp (Lp.aestronglyMeasurable f) j + +/-- **The projection is the pointwise projection almost everywhere**: +`P_j f = ∑_k ⟨f, φ_{j,k}⟩ φ_{j,k}` almost everywhere, for every `f ∈ L_p`. -/ +theorem proj_apply_ae (hN : 2 ≤ N) (hp : p ≠ ∞) (j : ℕ) (f : Lp ℂ p (volume : Measure ℝ)) : + proj m p hN hp j f =ᵐ[volume] projFun m j f := + MemLp.coeFn_toLp (memLp_projFun m hN Fact.out hp (Lp.memLp f) j) + +/-- **The projections are uniformly bounded**: `‖P_j‖ ≤ projConst m p` for every level `j`. -/ +theorem norm_proj_le (hN : 2 ≤ N) (hp : p ≠ ∞) (j : ℕ) : ‖proj m p hN hp j‖ ≤ projConst m p := + LinearMap.mkContinuous_norm_le _ (projConst_nonneg m p) _ + +/-- **The uniform bound in extended norms**: `‖P_j f‖_p ≤ C ‖f‖_p` with `C = projConst m p`, for +every `f ∈ L_p` and every level `j` (`Daubechies.eLpNorm_projFun_le`). -/ +theorem enorm_proj_le (hN : 2 ≤ N) (hp : p ≠ ∞) (j : ℕ) (f : Lp ℂ p (volume : Measure ℝ)) : + ‖proj m p hN hp j f‖ₑ ≤ ENNReal.ofReal (projConst m p) * ‖f‖ₑ := by + rw [Lp.eNorm_def, Lp.eNorm_def, eLpNorm_congr_ae (proj_apply_ae m hN hp j f)] + exact eLpNorm_projFun_le m hN Fact.out hp (Lp.aestronglyMeasurable f) j + +/-! ### The scaling spaces -/ + +/-- **`P_j` is a projection**: `P_j (P_j f) = P_j f` for every `f ∈ L_p`, for `N ≥ 2` and +`1 ≤ p < ∞` (`Daubechies.projFun_projFun`). -/ +theorem proj_proj (hN : 2 ≤ N) (hp : p ≠ ∞) (j : ℕ) (f : Lp ℂ p (volume : Measure ℝ)) : + proj m p hN hp j (proj m p hN hp j f) = proj m p hN hp j f := by + refine Lp.ext ((proj_apply_ae m hN hp j _).trans ?_) + rw [projFun_congr_ae m (proj_apply_ae m hN hp j f) j, projFun_projFun m hN] + exact (proj_apply_ae m hN hp j f).symm + +/-- **The projections of consecutive levels**: `P_{j+1} (P_j f) = P_j f` for every `f ∈ L_p`, for +`N ≥ 2` and `1 ≤ p < ∞` (`Daubechies.projFun_succ_projFun`). -/ +theorem proj_succ_proj (hN : 2 ≤ N) (hp : p ≠ ∞) (j : ℕ) (f : Lp ℂ p (volume : Measure ℝ)) : + proj m p hN hp (j + 1) (proj m p hN hp j f) = proj m p hN hp j f := by + refine Lp.ext ((proj_apply_ae m hN hp (j + 1) _).trans ?_) + rw [projFun_congr_ae m (proj_apply_ae m hN hp j f) (j + 1), projFun_succ_projFun m hN] + exact (proj_apply_ae m hN hp j f).symm + +variable (p) in +/-- **The scaling space of level `j`**: the range `V_j` of the projection `P_j` in `L_p`, for +`N ≥ 2` and `1 ≤ p < ∞`, a real subspace of `L_p`. It consists of the classes of the expansions +`∑_k ⟨f, φ_{j,k}⟩ φ_{j,k}`, `f ∈ L_p`, and `P_j` is the identity on it +(`Daubechies.proj_eq_self_of_mem`). -/ +noncomputable def scalingSpace (hN : 2 ≤ N) (hp : p ≠ ∞) (j : ℕ) : + Submodule ℝ (Lp ℂ p (volume : Measure ℝ)) := + LinearMap.range (proj m p hN hp j).toLinearMap + +/-- `a ∈ V_j` iff `a = P_j f` for some `f ∈ L_p`. -/ +theorem mem_scalingSpace {hN : 2 ≤ N} {hp : p ≠ ∞} {j : ℕ} {a : Lp ℂ p (volume : Measure ℝ)} : + a ∈ scalingSpace m p hN hp j ↔ ∃ f, proj m p hN hp j f = a := + LinearMap.mem_range + +/-- The projection `P_j f` lies in the scaling space `V_j`. -/ +theorem proj_mem_scalingSpace (hN : 2 ≤ N) (hp : p ≠ ∞) (j : ℕ) + (f : Lp ℂ p (volume : Measure ℝ)) : proj m p hN hp j f ∈ scalingSpace m p hN hp j := + LinearMap.mem_range_self _ f + +/-- **The projection fixes the scaling space**: `P_j a = a` for every `a ∈ V_j` +(`Daubechies.proj_proj`). -/ +theorem proj_eq_self_of_mem (hN : 2 ≤ N) (hp : p ≠ ∞) {j : ℕ} {a : Lp ℂ p (volume : Measure ℝ)} + (ha : a ∈ scalingSpace m p hN hp j) : proj m p hN hp j a = a := by + obtain ⟨f, rfl⟩ := (mem_scalingSpace m).1 ha + exact proj_proj m hN hp j f + +/-- **The scaling spaces are nested**: `V_j ⊆ V_{j+1}`, since `P_j f = P_{j+1} (P_j f)` +(`Daubechies.proj_succ_proj`), a consequence of the refinement equation. -/ +theorem scalingSpace_le_succ (hN : 2 ≤ N) (hp : p ≠ ∞) (j : ℕ) : + scalingSpace m p hN hp j ≤ scalingSpace m p hN hp (j + 1) := fun a ha => by + obtain ⟨f, rfl⟩ := (mem_scalingSpace m).1 ha + exact (mem_scalingSpace m).2 ⟨proj m p hN hp j f, proj_succ_proj m hN hp j f⟩ + +/-- **The scaling spaces increase with the level**: `V_i ⊆ V_j` for `i ≤ j` +(`Daubechies.scalingSpace_le_succ`). -/ +theorem scalingSpace_mono (hN : 2 ≤ N) (hp : p ≠ ∞) : Monotone (scalingSpace m p hN hp) := + monotone_nat_of_le_succ (scalingSpace_le_succ m hN hp) + +/-! ### The approximation scheme and the projection scheme -/ + +variable (p) in +/-- **The Daubechies scheme** in `L_p`, for `N ≥ 2` and `1 ≤ p < ∞`: `{0}` at complexity `0` and +the scaling space `V_{⌊log₂ n⌋}` at complexity `n ≥ 1`, so that `V_k` is the set of approximants +of complexity `2^k` (`ApproximationScheme.ofMonotoneSubmodules`). -/ +noncomputable def scheme (hN : 2 ≤ N) (hp : p ≠ ∞) : + ApproximationScheme (Lp ℂ p (volume : Measure ℝ)) := + ApproximationScheme.ofMonotoneSubmodules (scalingSpace m p hN hp) (scalingSpace_mono m hN hp) + +/-- The approximants of complexity `0` are `{0}`. -/ +theorem mem_scheme_zero {hN : 2 ≤ N} {hp : p ≠ ∞} {a : Lp ℂ p (volume : Measure ℝ)} : + a ∈ scheme m p hN hp 0 ↔ a = 0 := + ApproximationScheme.mem_ofMonotoneSubmodules_zero + +/-- The approximants of complexity `n ≥ 1` are the elements of the scaling space +`V_{⌊log₂ n⌋}`. -/ +theorem mem_scheme {hN : 2 ≤ N} {hp : p ≠ ∞} {n : ℕ} (hn : n ≠ 0) + {a : Lp ℂ p (volume : Measure ℝ)} : + a ∈ scheme m p hN hp n ↔ a ∈ scalingSpace m p hN hp (Nat.log 2 n) := + ApproximationScheme.mem_ofMonotoneSubmodules hn + +/-- The approximants of complexity `2^k` are the elements of the scaling space `V_k`. -/ +theorem mem_scheme_two_pow {hN : 2 ≤ N} {hp : p ≠ ∞} {k : ℕ} {a : Lp ℂ p (volume : Measure ℝ)} : + a ∈ scheme m p hN hp (2 ^ k) ↔ a ∈ scalingSpace m p hN hp k := + ApproximationScheme.mem_ofMonotoneSubmodules_two_pow + +variable (p) in +/-- **The projection scheme of the Daubechies scaling spaces** in `L_p`, for `N ≥ 2` and +`1 ≤ p < ∞`: the projection of complexity `n ≥ 1` is `P_{⌊log₂ n⌋}`, the one of complexity `0` +is `0` (the approximants of complexity `0` are `{0}`), and all are bounded by `projConst m p`. -/ +noncomputable def projectionScheme (hN : 2 ≤ N) (hp : p ≠ ∞) : + (scheme m p hN hp).ProjectionScheme := + ApproximationScheme.ProjectionScheme.ofMonotone (scalingSpace m p hN hp) + (scalingSpace_mono m hN hp) (proj m p hN hp) (proj_mem_scalingSpace m hN hp) + (fun _ _ ha => proj_eq_self_of_mem m hN hp ha) (projConst m p) (norm_proj_le m hN hp) + +/-- The projection of complexity `2^k` is `P_k`. -/ +theorem projectionScheme_two_pow (hN : 2 ≤ N) (hp : p ≠ ∞) (k : ℕ) : + (projectionScheme m p hN hp).P (2 ^ k) = proj m p hN hp k := + ApproximationScheme.ProjectionScheme.ofMonotone_two_pow k + +/-! ### Density of the scaling spaces -/ + +/-- **The scaling spaces are dense** in `L_p`, for `N ≥ 2` and `1 ≤ p < ∞`: the closure of +`⋃_j V_j` is all of `L_p`. Approximate `F ∈ L_p` by a continuous function `g` with compact +support (Mathlib's `MeasureTheory.MemLp.exists_hasCompactSupport_eLpNorm_sub_le`), and `g` by +`P_j g ∈ V_j` (`Daubechies.tendsto_eLpNorm_sub_projFun`). -/ +theorem closure_iUnion_scalingSpace (hN : 2 ≤ N) (hp : p ≠ ∞) : + closure (⋃ j, (scalingSpace m p hN hp j : Set (Lp ℂ p (volume : Measure ℝ)))) = Set.univ := by + refine Set.eq_univ_of_forall fun F => EMetric.mem_closure_iff.2 fun ε hε => ?_ + obtain ⟨g, hgc, hFg, hg, hgp⟩ := + (Lp.memLp F).exists_hasCompactSupport_eLpNorm_sub_le hp (ENNReal.half_pos hε.ne').ne' + obtain ⟨j, hj⟩ := ((tendsto_eLpNorm_sub_projFun m hN hg hgc p).eventually + (gt_mem_nhds (ENNReal.half_pos hε.ne'))).exists + refine ⟨proj m p hN hp j (hgp.toLp g), + Set.mem_iUnion.2 ⟨j, proj_mem_scalingSpace m hN hp j _⟩, ?_⟩ + have hP : ⇑(proj m p hN hp j (hgp.toLp g)) =ᵐ[volume] projFun m j g := + (proj_apply_ae m hN hp j _).trans + (EventuallyEq.of_eq (projFun_congr_ae m (MemLp.coeFn_toLp hgp) j)) + rw [Lp.edist_def, eLpNorm_congr_ae ((EventuallyEq.refl _ (⇑F)).sub hP)] + calc eLpNorm (⇑F - projFun m j g) p volume + = eLpNorm ((⇑F - g) + (g - projFun m j g)) p volume := by rw [sub_add_sub_cancel] + _ ≤ eLpNorm (⇑F - g) p volume + eLpNorm (g - projFun m j g) p volume := + eLpNorm_add_le Fact.out + _ < ε / 2 + ε / 2 := + ENNReal.add_lt_add_of_le_of_lt ((Lp.memLp F).sub hgp).eLpNorm_ne_top hFg hj + _ = ε := ENNReal.add_halves ε + +/-- **The Daubechies scheme is dense** in `L_p`, for `N ≥ 2` and `1 ≤ p < ∞`: the closure of the +union of its approximants is all of `L_p`, since `V_j` is the set of approximants of complexity +`2^j` (`Daubechies.mem_scheme_two_pow`, `Daubechies.closure_iUnion_scalingSpace`). -/ +theorem closure_iUnion_scheme (hN : 2 ≤ N) (hp : p ≠ ∞) : + closure (⋃ n, scheme m p hN hp n) = Set.univ := by + refine Set.eq_univ_of_univ_subset + ((closure_iUnion_scalingSpace m hN hp).symm.subset.trans (closure_mono fun a ha => ?_)) + obtain ⟨j, hj⟩ := Set.mem_iUnion.1 ha + exact Set.mem_iUnion.2 ⟨2 ^ j, (mem_scheme_two_pow m).2 hj⟩ + +/-- **The projections converge**: `P_j f → f` in `L_p` as `j → ∞`, for every `f ∈ L_p`, `N ≥ 2` +and `1 ≤ p < ∞`. The projections are uniformly bounded and `⋃_j V_j` is dense +(`Daubechies.closure_iUnion_scheme`), so the projection scheme converges +(`ApproximationScheme.ProjectionScheme.tendsto_of_dense`) along the complexities `2^j` +(`Daubechies.projectionScheme_two_pow`). -/ +theorem tendsto_proj (hN : 2 ≤ N) (hp : p ≠ ∞) (f : Lp ℂ p (volume : Measure ℝ)) : + Tendsto (fun j => proj m p hN hp j f) atTop (𝓝 f) := by + have h := ((projectionScheme m p hN hp).tendsto_of_dense (closure_iUnion_scheme m hN hp) + f).comp (tendsto_pow_atTop_atTop_of_one_lt one_lt_two) + simpa only [Function.comp_def, projectionScheme_two_pow] using h + +end Lp + +end Daubechies diff --git a/LeanPool/FunctionSpaces/Wavelets/Examples/Daubechies/ScalingFunction.lean b/LeanPool/FunctionSpaces/Wavelets/Examples/Daubechies/ScalingFunction.lean new file mode 100644 index 0000000000..e074c0a469 --- /dev/null +++ b/LeanPool/FunctionSpaces/Wavelets/Examples/Daubechies/ScalingFunction.lean @@ -0,0 +1,179 @@ +/- +Copyright (c) 2026 Mario Ullrich. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Mario Ullrich +-/ +module + +public import LeanPool.FunctionSpaces.Wavelets.Examples.Daubechies.FourierIntegrable +public import LeanPool.FunctionSpaces.Wavelets.Examples.Daubechies.SymbolDecay + +/- +Modified for Lean Pool: module names and imports adapted. +-/ + +/-! +# The Daubechies scaling function + +For a Daubechies mask of order `N` with filter coefficients `c_k` (`Daubechies.coeff`), symbol +`m_0(ξ) = (1/2) ∑_k c_k e^(-2πikξ)` (`Daubechies.symbol`) and symbol product +`Φ(ξ) = ∏_{j ≥ 0} m_0(ξ/2^(j+1))` (`Daubechies.symbolProduct`), the **scaling function** is the +inverse Fourier transform of `Φ`, + +`φ(x) = 𝓕⁻ Φ(x) = ∫ Φ(ξ) e^(2πixξ) dξ` (`Daubechies.scalingFun`, +`Daubechies.scalingFun_eq_integral`). + +For `N ≥ 2` the symbol product is integrable (`Daubechies.integrable_symbolProduct`), so `φ` is +continuous (`Daubechies.continuous_scalingFun`), and `|φ(x)| ≤ ∫ |Φ|` for every `x` +(`Daubechies.norm_scalingFun_le`). The file `FunctionSpaces.Wavelets.Examples.Daubechies.Cascade` +proves that `φ` has compact support, by the cascade algorithm, and then that `𝓕 φ = Φ`, by Fourier +inversion. + +**The refinement equation.** For `N ≥ 2` and every `x ∈ ℝ`, + +`φ(x) = ∑_{k=0}^{2N-1} c_k φ(2x - k)` (`Daubechies.scalingFun_refine`). + +On the Fourier side it is the identity `Φ(2ξ) = m_0(ξ) Φ(ξ) = (1/2) ∑_k c_k e^(-2πikξ) Φ(ξ)` +(`Daubechies.symbolProduct_two_mul_eq_sum`). The dilation rule gives `φ(x) = 2 𝓕⁻[Φ(2 ·)](2x)` +(`Daubechies.scalingFun_eq_two_mul_fourierInv`), the inverse transform is linear on the +integrable summands `(c_k/2) e^(-2πikξ) Φ(ξ)` (`Daubechies.integrable_expFreq_mul`), and the +modulation rule `𝓕⁻[e^(-2πia ·) f](y) = 𝓕⁻ f(y - a)` (`Daubechies.fourierInv_expFreq_mul_apply`) +turns the `k`-th summand into `(c_k/2) φ(2x - k)`. + +**The scaling function is real.** `Φ(-ξ) = conj Φ(ξ)` (`Daubechies.symbolProduct_neg`), so +`conj φ(x) = 𝓕[conj ∘ Φ](x) = 𝓕[Φ(-·)](x) = 𝓕⁻ Φ(x) = φ(x)` (`Daubechies.conj_scalingFun`); +hence `φ(x)` has imaginary part `0` (`Daubechies.im_scalingFun`) and equals its real part +(`Daubechies.ofReal_re_scalingFun`). +-/ + +@[expose] public section + +open Filter MeasureTheory +open scoped Real FourierTransform ComplexConjugate + +namespace Daubechies + +/-! ### Modulation by `e^(-2πiaξ)` -/ + +/-- `e^(-2πiaξ) = exp(2π(-a)ξ i)`, the form of the exponential in the modulation rule +`Real.fourierInv_exp_mul_apply`. -/ +theorem expFreq_mul_eq_exp (a ξ : ℝ) : + expFreq (a * ξ) = Complex.exp (2 * π * ((-a : ℝ) : ℂ) * ξ * Complex.I) := by + rw [expFreq] + congr 1 + push_cast + ring + +/-- **Modulation by `e^(-2πiaξ)` is translation by `a`** for the inverse Fourier transform: +`𝓕⁻[ξ ↦ e^(-2πiaξ) f(ξ)](x) = 𝓕⁻ f(x - a)` for every `f : ℝ → ℂ` and all real `a`, `x` +(`Real.fourierInv_exp_mul_apply` with `b = -a`). -/ +theorem fourierInv_expFreq_mul_apply (f : ℝ → ℂ) (a x : ℝ) : + 𝓕⁻ (fun ξ => expFreq (a * ξ) * f ξ) x = 𝓕⁻ f (x - a) := by + simp_rw [expFreq_mul_eq_exp] + rw [Real.fourierInv_exp_mul_apply, sub_eq_add_neg] + +/-- An integrable `f : ℝ → ℂ` stays integrable after multiplication by `e^(-2πiaξ)`, a continuous +function of modulus `1` (Mathlib's `MeasureTheory.Integrable.bdd_mul`). -/ +theorem integrable_expFreq_mul {f : ℝ → ℂ} (hf : Integrable f) (a : ℝ) : + Integrable (fun ξ => expFreq (a * ξ) * f ξ) := + hf.bdd_mul (c := 1) + (continuous_expFreq.comp (continuous_const.mul continuous_id)).aestronglyMeasurable + (Eventually.of_forall fun ξ => (norm_expFreq (a * ξ)).le) + +/-! ### The scaling function -/ + +variable {N : ℕ} (m : Mask N) + +/-- **The scaling function** of a Daubechies mask: the inverse Fourier transform +`φ(x) = 𝓕⁻ Φ(x) = ∫ Φ(ξ) e^(2πixξ) dξ` of the symbol product `Φ` (`Daubechies.symbolProduct`). +It is defined for every mask; for order `N ≥ 2` the symbol product is integrable, and then `φ` +is continuous (`Daubechies.continuous_scalingFun`) and satisfies the refinement equation +(`Daubechies.scalingFun_refine`). -/ +noncomputable def scalingFun : ℝ → ℂ := 𝓕⁻ (symbolProduct m) + +/-- **The scaling function as an integral**: `φ(x) = ∫ e^(2πixξ) Φ(ξ) dξ` for every `x ∈ ℝ` +(Mathlib's `Real.fourierInv_eq'`). -/ +theorem scalingFun_eq_integral (x : ℝ) : + scalingFun m x = ∫ ξ : ℝ, Complex.exp (2 * π * x * ξ * Complex.I) * symbolProduct m ξ := by + rw [scalingFun, Real.fourierInv_eq'] + congr 1 with ξ + rw [Real.inner_apply, smul_eq_mul] + congr 2 + push_cast + ring + +/-- **The scaling function is continuous** for `N ≥ 2`: the inverse Fourier transform of the +integrable function `Φ` (`Daubechies.integrable_symbolProduct`) is continuous +(`Real.continuous_fourierInv_of_integrable`). -/ +theorem continuous_scalingFun (hN : 2 ≤ N) : Continuous (scalingFun m) := + Real.continuous_fourierInv_of_integrable (integrable_symbolProduct m hN) + +/-- **The uniform bound** `|φ(x)| ≤ ∫ |Φ(ξ)| dξ` for every `x ∈ ℝ` +(`Real.norm_fourierInv_le_integral_norm`). For `N ≥ 2` the right side is finite +(`Daubechies.integrable_symbolProduct`); the bound holds for every order, since Lean assigns +the value `0` to the integral of a non-integrable function. -/ +theorem norm_scalingFun_le (x : ℝ) : ‖scalingFun m x‖ ≤ ∫ ξ, ‖symbolProduct m ξ‖ := + Real.norm_fourierInv_le_integral_norm _ x + +/-! ### The refinement equation -/ + +/-- **The refinement identity on the Fourier side**: +`Φ(2ξ) = m_0(ξ) Φ(ξ) = ∑_{k<2N} (c_k/2) e^(-2πikξ) Φ(ξ)` for every `ξ ∈ ℝ` +(`Daubechies.symbolProduct_two_mul` and `Daubechies.symbol_eq_sum`). -/ +theorem symbolProduct_two_mul_eq_sum (ξ : ℝ) : + symbolProduct m (2 * ξ) = ∑ k ∈ Finset.range (2 * N), + (coeff m k : ℂ) / 2 * (expFreq (k * ξ) * symbolProduct m ξ) := by + rw [symbolProduct_two_mul, symbol_eq_sum, Finset.mul_sum, Finset.sum_mul] + refine Finset.sum_congr rfl fun k _ => ?_ + rw [expFreq_pow] + ring + +/-- **The dilation step**: `φ(x) = 2 𝓕⁻[ξ ↦ Φ(2ξ)](2x)` for every `x ∈ ℝ`, the dilation rule +`𝓕⁻[f(2 ·)](y) = 𝓕⁻ f(y/2)/2` (`Real.fourierInv_comp_mul_left_apply`) at `y = 2x`. -/ +theorem scalingFun_eq_two_mul_fourierInv (x : ℝ) : + scalingFun m x = 2 * 𝓕⁻ (fun ξ => symbolProduct m (2 * ξ)) (2 * x) := by + rw [Real.fourierInv_comp_mul_left_apply (symbolProduct m) two_pos (2 * x), + mul_div_cancel_left₀ x two_ne_zero, scalingFun] + push_cast + rw [← mul_assoc, mul_inv_cancel₀ two_ne_zero, one_mul] + +/-- **The refinement equation** `φ(x) = ∑_{k=0}^{2N-1} c_k φ(2x - k)` for every `x ∈ ℝ` and every +mask of order `N ≥ 2`. By the dilation step (`Daubechies.scalingFun_eq_two_mul_fourierInv`) and +the Fourier-side identity `Φ(2ξ) = ∑_k (c_k/2) e^(-2πikξ) Φ(ξ)` +(`Daubechies.symbolProduct_two_mul_eq_sum`), +`φ(x) = 2 𝓕⁻[∑_k (c_k/2) e^(-2πik ·) Φ](2x) = ∑_k c_k 𝓕⁻[e^(-2πik ·) Φ](2x) = ∑_k c_k φ(2x - k)`: +the inverse transform is linear on the integrable summands (`Φ ∈ L¹` for `N ≥ 2`, +`Daubechies.integrable_symbolProduct`), and modulation by `e^(-2πikξ)` is translation by `k` +(`Daubechies.fourierInv_expFreq_mul_apply`). -/ +theorem scalingFun_refine (hN : 2 ≤ N) (x : ℝ) : + scalingFun m x = + ∑ k ∈ Finset.range (2 * N), (coeff m k : ℂ) * scalingFun m (2 * x - k) := by + have hΦ := integrable_symbolProduct m hN + rw [scalingFun_eq_two_mul_fourierInv, funext (symbolProduct_two_mul_eq_sum m), + Real.fourierInv_sum_apply, Finset.mul_sum] + · refine Finset.sum_congr rfl fun k _ => ?_ + rw [Real.fourierInv_const_mul_apply, fourierInv_expFreq_mul_apply, scalingFun] + ring + · intro k _ + exact (integrable_expFreq_mul hΦ k).const_mul _ + +/-! ### The scaling function is real -/ + +/-- **The scaling function is real**: `conj φ(x) = φ(x)` for every `x ∈ ℝ`. Conjugation turns the +inverse transform into the transform of the conjugate (`Real.conj_fourierInv`), +`conj Φ(ξ) = Φ(-ξ)` (`Daubechies.symbolProduct_neg`), and `𝓕[Φ(-·)] = 𝓕⁻ Φ` (Mathlib's +`Real.fourierInv_eq_fourier_comp_neg`). -/ +theorem conj_scalingFun (x : ℝ) : conj (scalingFun m x) = scalingFun m x := by + have h : (fun ξ => conj (symbolProduct m ξ)) = fun ξ => symbolProduct m (-ξ) := + funext fun ξ => (symbolProduct_neg m ξ).symm + rw [scalingFun, Real.conj_fourierInv, h, Real.fourierInv_eq_fourier_comp_neg] + +/-- The imaginary part of `φ(x)` is `0`, for every `x ∈ ℝ`. -/ +theorem im_scalingFun (x : ℝ) : (scalingFun m x).im = 0 := + Complex.conj_eq_iff_im.1 (conj_scalingFun m x) + +/-- `φ(x)` equals its real part: `Re φ(x) = φ(x)` as complex numbers, for every `x ∈ ℝ`. -/ +theorem ofReal_re_scalingFun (x : ℝ) : ((scalingFun m x).re : ℂ) = scalingFun m x := + Complex.conj_eq_iff_re.1 (conj_scalingFun m x) + +end Daubechies diff --git a/LeanPool/FunctionSpaces/Wavelets/Examples/Daubechies/ScalingMoments.lean b/LeanPool/FunctionSpaces/Wavelets/Examples/Daubechies/ScalingMoments.lean new file mode 100644 index 0000000000..38fcc4d0d3 --- /dev/null +++ b/LeanPool/FunctionSpaces/Wavelets/Examples/Daubechies/ScalingMoments.lean @@ -0,0 +1,325 @@ +/- +Copyright (c) 2026 Mario Ullrich. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Mario Ullrich +-/ +module + +public import LeanPool.FunctionSpaces.Wavelets.Examples.Daubechies.Cascade +public import LeanPool.FunctionSpaces.Wavelets.Examples.Daubechies.FilterIdentities +public import Mathlib.Analysis.Calculus.IteratedDeriv.Lemmas +public import Mathlib.Analysis.Fourier.FourierTransformDeriv +public import Mathlib.Analysis.Fourier.PoissonSummation + +/- +Modified for Lean Pool: module names and imports adapted. +-/ + +/-! +# Smoothness of the symbol product and the moments of the scaling function + +For a Daubechies mask of order `N ≥ 2` with symbol `m_0` (`Daubechies.symbol`), symbol product +`Φ(ξ) = ∏_{j ≥ 0} m_0(ξ/2^(j+1))` (`Daubechies.symbolProduct`) and scaling function `φ = 𝓕⁻ Φ` +(`Daubechies.scalingFun`), this file proves that the periodised moments of `φ` are constant: + +`∑_{k ∈ ℤ} (x - k)^l φ(x - k) = ∫ y^l φ(y) dy` for every `x ∈ ℝ` and every `l < N` +(`Daubechies.periodization_moment_eq`), + +in particular the **partition of unity** `∑_{k ∈ ℤ} φ(x - k) = 1` +(`Daubechies.sum_scalingFun_translate`). + +* **Smoothness of `Φ`.** The scaling function is continuous with compact support, so every + moment `∫ |x|^n |φ(x)| dx` is finite, and `Φ = 𝓕 φ` (`Daubechies.fourier_scalingFun`) is smooth + (`Daubechies.contDiff_symbolProduct`, Mathlib's `Real.contDiff_fourier`). Its derivatives are + the Fourier transforms of the moments, `Φ^(l) = (-2πi)^l 𝓕[x^l φ]` + (`Daubechies.iteratedDeriv_symbolProduct_eq_fourier`, Mathlib's `Real.iteratedDeriv_fourier`). +* **Derivatives at the nonzero integers.** The Leibniz rule applied to `Φ(2ξ) = m_0(ξ) Φ(ξ)` + gives `2^l Φ^(l)(2ξ) = ∑_{i ≤ l} C(l, i) m_0^(i)(ξ) Φ^(l-i)(ξ)` + (`Daubechies.iteratedDeriv_symbolProduct_two_mul`). For `l < N` the derivatives + `m_0^(i)(1/2 + n)` with `i ≤ l` vanish (`Daubechies.iteratedDeriv_symbol_half_add_int`), so + `Φ^(l)(2n + 1) = 0`; at an even integer `2j` the derivatives `Φ^(i)(j)` vanish by induction on + `|j|`. Hence `Φ^(l)(j) = 0` for every integer `j ≠ 0` and every `l < N` + (`Daubechies.iteratedDeriv_symbolProduct_int`), and `𝓕[x^l φ](j) = 0` + (`Daubechies.fourier_pow_mul_scalingFun_int`). +* **Periodisation.** The periodisation `∑_n f(x + n)` of a continuous function `f` with compact + support has the Fourier coefficients `𝓕 f(n)`, `n ∈ ℤ`. If they vanish for `n ≠ 0`, Poisson + summation (Mathlib's `Real.tsum_eq_tsum_fourier`) shows that the periodisation is the constant + `𝓕 f(0) = ∫ f` (`Real.tsum_comp_add_int_eq_integral`). Applied to `f(y) = y^l φ(y)` this gives + the periodised moments. +* **Finite sums.** Since `φ` vanishes outside `[0, 2N - 1]`, only the indices + `⌊x⌋ - (2N - 1) ≤ k ≤ ⌊x⌋` contribute to a sum `∑_k a(k) φ(x - k)` + (`Daubechies.scalingFun_sub_eq_zero`, `Daubechies.tsum_mul_scalingFun_sub_eq_sum`). +-/ + +@[expose] public section + +open Filter MeasureTheory +open scoped Real FourierTransform + +namespace Real + +/-! ### Poisson summation with vanishing Fourier coefficients -/ + +/-- For a continuous function `f : ℝ → E` vanishing outside a bounded interval `[a, b]` and a +compact set `K ⊆ ℝ`, the sup norms over `K` of the translates `x ↦ f(x + n)`, `n ∈ ℤ`, are +summable: only the finitely many `n` with `K + n` meeting `[a, b]` give a translate that is +nonzero on `K`. This is the hypothesis of Mathlib's Poisson summation formula +`Real.tsum_eq_tsum_fourier`. -/ +theorem summable_norm_restrict_comp_addRight {E : Type*} [NormedAddCommGroup E] {f : C(ℝ, E)} + {a b : ℝ} (hf : ∀ x ∉ Set.Icc a b, f x = 0) (K : TopologicalSpace.Compacts ℝ) : + Summable fun n : ℤ => ‖(f.comp (ContinuousMap.addRight (n : ℝ))).restrict K‖ := by + obtain ⟨R, hR⟩ := K.isCompact.isBounded.exists_norm_le + refine summable_of_ne_finset_zero (s := Finset.Icc ⌈a - R⌉ ⌊b + R⌋) fun n hn => ?_ + refine le_antisymm ((ContinuousMap.norm_le _ le_rfl).2 fun y => ?_) (norm_nonneg _) + have hy : |(y : ℝ)| ≤ R := hR y y.2 + rw [abs_le] at hy + have hmem : (y : ℝ) + n ∉ Set.Icc a b := fun h => hn (by + rw [Finset.mem_Icc, Int.ceil_le, Int.le_floor] + exact ⟨by linarith [h.1], by linarith [h.2]⟩) + rw [ContinuousMap.restrict_apply, ContinuousMap.comp_apply, ContinuousMap.coe_addRight, + hf _ hmem, norm_zero] + +/-- **Poisson summation when the Fourier transform vanishes at the nonzero integers**: let +`f : ℝ → ℂ` be continuous and vanish outside a bounded interval `[a, b]`, with `𝓕 f(n) = 0` for +every integer `n ≠ 0`. Then the periodisation of `f` is the constant `∫ f`: +`∑_{n ∈ ℤ} f(x + n) = ∫ f(y) dy` for every `x ∈ ℝ`. Poisson summation (Mathlib's +`Real.tsum_eq_tsum_fourier`) writes the periodisation as the Fourier series +`∑_n 𝓕 f(n) e^(2πinx)`, whose only nonzero term is `𝓕 f(0) = ∫ f` (`Real.fourier_apply_zero`). -/ +theorem tsum_comp_add_int_eq_integral {f : ℝ → ℂ} (hf : Continuous f) {a b : ℝ} + (hab : ∀ x ∉ Set.Icc a b, f x = 0) (hF : ∀ n : ℤ, n ≠ 0 → 𝓕 f n = 0) (x : ℝ) : + ∑' n : ℤ, f (x + n) = ∫ y, f y := by + have hsum : Summable fun n : ℤ => 𝓕 f n := + summable_of_ne_finset_zero (s := {0}) fun n hn => hF n (Finset.notMem_singleton.1 hn) + have h := tsum_eq_tsum_fourier (f := ⟨f, hf⟩) + (summable_norm_restrict_comp_addRight (f := ⟨f, hf⟩) hab) hsum x + have h0 : ∑' n : ℤ, 𝓕 f n * fourier n (x : UnitAddCircle) = ∫ y, f y := by + rw [tsum_eq_single 0, Int.cast_zero, _root_.fourier_zero, mul_one, fourier_apply_zero] + intro n hn + rw [hF n hn, zero_mul] + simp only [ContinuousMap.coe_mk] at h + rw [h, h0] + +end Real + +namespace Daubechies + +variable {N : ℕ} (m : Mask N) + +/-! ### Smoothness of the symbol product -/ + +/-- For `N ≥ 2` and every `n ∈ ℕ` the function `x ↦ |x|^n |φ(x)|` is integrable: it is +continuous and vanishes outside `[0, 2N - 1]` (`Daubechies.hasCompactSupport_scalingFun`). -/ +theorem integrable_norm_pow_mul_norm_scalingFun (hN : 2 ≤ N) (n : ℕ) : + Integrable fun x : ℝ => ‖x‖ ^ n * ‖scalingFun m x‖ := + ((continuous_norm.pow n).mul (continuous_scalingFun m hN).norm).integrable_of_hasCompactSupport + (hasCompactSupport_scalingFun m hN).norm.mul_left + +/-- **The symbol product is smooth** for `N ≥ 2`: `Φ = 𝓕 φ` (`Daubechies.fourier_scalingFun`) +is `C^∞`, since every moment `∫ |x|^n |φ(x)| dx` is finite (Mathlib's +`Real.contDiff_fourier`). -/ +theorem contDiff_symbolProduct (hN : 2 ≤ N) : + ContDiff ℝ ((⊤ : ℕ∞) : WithTop ℕ∞) (symbolProduct m) := by + rw [← fourier_scalingFun m hN] + exact Real.contDiff_fourier fun n _ => integrable_norm_pow_mul_norm_scalingFun m hN n + +/-- For `N ≥ 2` the symbol product is `C^n` for every `n ∈ ℕ` +(`Daubechies.contDiff_symbolProduct`). -/ +theorem contDiff_nat_symbolProduct (hN : 2 ≤ N) (n : ℕ) : ContDiff ℝ n (symbolProduct m) := + (contDiff_symbolProduct m hN).of_le (by exact_mod_cast le_top) + +/-! ### Derivatives of the refinement identity -/ + +/-- **The derivatives of the refinement identity** `Φ(2ξ) = m_0(ξ) Φ(ξ)`: for `N ≥ 2`, every +`l ∈ ℕ` and every `ξ ∈ ℝ`, +`2^l Φ^(l)(2ξ) = ∑_{i=0}^{l} C(l, i) m_0^(i)(ξ) Φ^(l-i)(ξ)`. +The left side is the `l`-th derivative of `ξ ↦ Φ(2ξ)` (chain rule, Mathlib's +`iteratedDeriv_comp_const_smul`), the right side that of `m_0 · Φ` (Leibniz rule, Mathlib's +`iteratedDeriv_fun_mul`); both factors are smooth (`Daubechies.contDiff_symbol`, +`Daubechies.contDiff_symbolProduct`). -/ +theorem iteratedDeriv_symbolProduct_two_mul (hN : 2 ≤ N) (l : ℕ) (ξ : ℝ) : + (2 : ℂ) ^ l * iteratedDeriv l (symbolProduct m) (2 * ξ) = + ∑ i ∈ Finset.range (l + 1), (l.choose i : ℂ) * iteratedDeriv i (symbol m) ξ * + iteratedDeriv (l - i) (symbolProduct m) ξ := by + have h : iteratedDeriv l (fun x => symbolProduct m (2 * x)) ξ = + (2 : ℝ) ^ l • iteratedDeriv l (symbolProduct m) (2 * ξ) := + congrFun (iteratedDeriv_comp_const_smul (contDiff_nat_symbolProduct m hN l) (2 : ℝ)) ξ + simp only [symbolProduct_two_mul] at h + rw [iteratedDeriv_fun_mul (contDiff_symbol m).contDiffAt + (contDiff_nat_symbolProduct m hN l).contDiffAt, Complex.real_smul] at h + rw [h] + push_cast + ring + +/-- If all derivatives `Φ^(i)`, `i ≤ l`, vanish at a point `ξ`, then `Φ^(l)(2ξ) = 0` (for +`N ≥ 2`): every term of the Leibniz sum in `Daubechies.iteratedDeriv_symbolProduct_two_mul` +contains a factor `Φ^(l-i)(ξ) = 0`. -/ +theorem iteratedDeriv_symbolProduct_two_mul_eq_zero (hN : 2 ≤ N) {l : ℕ} {ξ : ℝ} + (h : ∀ i ≤ l, iteratedDeriv i (symbolProduct m) ξ = 0) : + iteratedDeriv l (symbolProduct m) (2 * ξ) = 0 := by + have h' := iteratedDeriv_symbolProduct_two_mul m hN l ξ + have h0 : ∑ i ∈ Finset.range (l + 1), (l.choose i : ℂ) * iteratedDeriv i (symbol m) ξ * + iteratedDeriv (l - i) (symbolProduct m) ξ = 0 := + Finset.sum_eq_zero fun i _ => by rw [h (l - i) (Nat.sub_le l i), mul_zero] + rw [h0] at h' + exact (mul_eq_zero.1 h').resolve_left (pow_ne_zero _ two_ne_zero) + +/-- **`Φ^(l)` vanishes at the odd integers** for `l < N` (and `N ≥ 2`): `Φ^(l)(2n + 1) = 0` for +every `n ∈ ℤ`. In the Leibniz sum of `Daubechies.iteratedDeriv_symbolProduct_two_mul` at +`ξ = 1/2 + n` every derivative `m_0^(i)(1/2 + n)`, `i ≤ l < N`, vanishes +(`Daubechies.iteratedDeriv_symbol_half_add_int`, a consequence of the sum rules). -/ +theorem iteratedDeriv_symbolProduct_two_mul_add_one (hN : 2 ≤ N) {l : ℕ} (hl : l < N) (n : ℤ) : + iteratedDeriv l (symbolProduct m) (2 * n + 1) = 0 := by + have h := iteratedDeriv_symbolProduct_two_mul m hN l (1 / 2 + n) + have h0 : ∑ i ∈ Finset.range (l + 1), (l.choose i : ℂ) * + iteratedDeriv i (symbol m) (1 / 2 + n) * + iteratedDeriv (l - i) (symbolProduct m) (1 / 2 + n) = 0 := + Finset.sum_eq_zero fun i hi => by + rw [iteratedDeriv_symbol_half_add_int m + ((Nat.lt_succ_iff.1 (Finset.mem_range.1 hi)).trans_lt hl) n, mul_zero, zero_mul] + rw [h0, show 2 * (1 / 2 + (n : ℝ)) = 2 * n + 1 by ring] at h + exact (mul_eq_zero.1 h).resolve_left (pow_ne_zero _ two_ne_zero) + +/-- **The derivatives of `Φ` vanish at the nonzero integers**: for `N ≥ 2`, every integer +`j ≠ 0` and every `l < N`, `Φ^(l)(j) = 0`. By induction on `|j|`, for all `l < N` at once: an +odd `j` is covered by `Daubechies.iteratedDeriv_symbolProduct_two_mul_add_one`; for even +`j = 2j'` the integer `j' ≠ 0` is smaller in absolute value, so `Φ^(i)(j') = 0` for every +`i ≤ l`, and `Daubechies.iteratedDeriv_symbolProduct_two_mul_eq_zero` gives `Φ^(l)(2j') = 0`. -/ +theorem iteratedDeriv_symbolProduct_int (hN : 2 ≤ N) (j : ℤ) (hj : j ≠ 0) (l : ℕ) (hl : l < N) : + iteratedDeriv l (symbolProduct m) j = 0 := by + suffices h : ∀ n : ℕ, ∀ j : ℤ, j.natAbs ≤ n → j ≠ 0 → ∀ l < N, + iteratedDeriv l (symbolProduct m) j = 0 from h _ j le_rfl hj l hl + intro n + induction n with + | zero => + intro j hj hj0 + exact absurd (by omega : j = 0) hj0 + | succ n ih => + intro j hjn hj0 l hl + obtain ⟨i, rfl | rfl⟩ := Int.even_or_odd' j + · have hi : i ≠ 0 := by + rintro rfl + simp at hj0 + push_cast + exact iteratedDeriv_symbolProduct_two_mul_eq_zero m hN fun k hk => + ih i (by omega) hi k (hk.trans_lt hl) + · push_cast + exact iteratedDeriv_symbolProduct_two_mul_add_one m hN hl i + +/-! ### The Fourier transforms of the moments -/ + +/-- For `N ≥ 2` and every `n ∈ ℕ` the moment function `x ↦ x^n φ(x)` is integrable: it is +continuous with compact support. It is written with the real scalar multiplication +`x^n • φ(x)`, the form of the hypothesis of Mathlib's `Real.iteratedDeriv_fourier`. -/ +theorem integrable_pow_smul_scalingFun (hN : 2 ≤ N) (n : ℕ) : + Integrable fun x : ℝ => x ^ n • scalingFun m x := + ((continuous_pow n).smul (continuous_scalingFun m hN)).integrable_of_hasCompactSupport + (hasCompactSupport_scalingFun m hN).smul_left + +/-- **The derivatives of `Φ` are the Fourier transforms of the moments**: for `N ≥ 2`, every +`l ∈ ℕ` and every `ξ ∈ ℝ`, `Φ^(l)(ξ) = (-2πi)^l 𝓕[x^l φ](ξ)`. This is differentiation under the +integral sign in `Φ = 𝓕 φ` (Mathlib's `Real.iteratedDeriv_fourier`), legitimate since every +moment of `φ` is integrable. -/ +theorem iteratedDeriv_symbolProduct_eq_fourier (hN : 2 ≤ N) (l : ℕ) (ξ : ℝ) : + iteratedDeriv l (symbolProduct m) ξ = + (-2 * π * Complex.I) ^ l * 𝓕 (fun x : ℝ => (x : ℂ) ^ l * scalingFun m x) ξ := by + rw [← fourier_scalingFun m hN, Real.iteratedDeriv_fourier (N := l) + (fun n _ => integrable_pow_smul_scalingFun m hN n) le_rfl, ← Real.fourier_const_mul_apply] + simp only [smul_eq_mul, mul_pow, mul_assoc] + +/-- **The Fourier transforms of the moments vanish at the nonzero integers**: for `N ≥ 2`, +`l < N` and every integer `j ≠ 0`, `𝓕[x^l φ](j) = 0`, since +`(-2πi)^l 𝓕[x^l φ](j) = Φ^(l)(j) = 0` (`Daubechies.iteratedDeriv_symbolProduct_eq_fourier`, +`Daubechies.iteratedDeriv_symbolProduct_int`). -/ +theorem fourier_pow_mul_scalingFun_int (hN : 2 ≤ N) {l : ℕ} (hl : l < N) {j : ℤ} (hj : j ≠ 0) : + 𝓕 (fun x : ℝ => (x : ℂ) ^ l * scalingFun m x) j = 0 := by + have h := iteratedDeriv_symbolProduct_eq_fourier m hN l j + rw [iteratedDeriv_symbolProduct_int m hN j hj l hl] at h + refine (mul_eq_zero.1 h.symm).resolve_left (pow_ne_zero _ ?_) + simp [Real.pi_ne_zero, Complex.I_ne_zero] + +/-! ### The periodised moments -/ + +/-- For `N ≥ 2` the moment function `x ↦ x^l φ(x)` is continuous. -/ +theorem continuous_pow_mul_scalingFun (hN : 2 ≤ N) (l : ℕ) : + Continuous fun x : ℝ => (x : ℂ) ^ l * scalingFun m x := + (Complex.continuous_ofReal.pow l).mul (continuous_scalingFun m hN) + +/-- **The periodised moments are constant**: for `N ≥ 2`, `l < N` and every `x ∈ ℝ`, +`∑_{k ∈ ℤ} (x - k)^l φ(x - k) = ∫ y^l φ(y) dy`. The function `f(y) = y^l φ(y)` is continuous, +vanishes outside `[0, 2N - 1]`, and `𝓕 f(n) = 0` for every integer `n ≠ 0` +(`Daubechies.fourier_pow_mul_scalingFun_int`), so Poisson summation +(`Real.tsum_comp_add_int_eq_integral`) gives `∑_n f(x + n) = ∫ f`; the substitution `k = -n` +turns this into the sum over the points `x - k`. -/ +theorem periodization_moment_eq (hN : 2 ≤ N) {l : ℕ} (hl : l < N) (x : ℝ) : + ∑' k : ℤ, ((x - k : ℝ) : ℂ) ^ l * scalingFun m (x - k) = + ∫ y : ℝ, (y : ℂ) ^ l * scalingFun m y := by + have h : ∑' k : ℤ, ((x - k : ℝ) : ℂ) ^ l * scalingFun m (x - k) = + ∑' n : ℤ, ((x + n : ℝ) : ℂ) ^ l * scalingFun m (x + n) := by + rw [← (Equiv.neg ℤ).tsum_eq] + simp only [Equiv.neg_apply, Int.cast_neg, sub_neg_eq_add] + rw [h] + exact Real.tsum_comp_add_int_eq_integral (a := 0) (b := 2 * N - 1) + (continuous_pow_mul_scalingFun m hN l) (fun y hy => by simp [scalingFun_eq_zero m hN hy]) + (fun n hn => fourier_pow_mul_scalingFun_int m hN hl hn) x + +/-- **The periodised moments are constant**, in existential form: for `N ≥ 2` and `l < N` there +is a constant `c` with `∑_{k ∈ ℤ} (x - k)^l φ(x - k) = c` for every `x ∈ ℝ`, namely +`c = ∫ y^l φ(y) dy` (`Daubechies.periodization_moment_eq`). -/ +theorem periodization_moment_const (hN : 2 ≤ N) {l : ℕ} (hl : l < N) : + ∃ c : ℂ, ∀ x : ℝ, ∑' k : ℤ, ((x - k : ℝ) : ℂ) ^ l * scalingFun m (x - k) = c := + ⟨_, periodization_moment_eq m hN hl⟩ + +/-- **Partition of unity**: `∑_{k ∈ ℤ} φ(x - k) = 1` for every `x ∈ ℝ` (for `N ≥ 2`), the case +`l = 0` of `Daubechies.periodization_moment_eq` together with `∫ φ = 1` +(`Daubechies.integral_scalingFun`). -/ +theorem sum_scalingFun_translate (hN : 2 ≤ N) (x : ℝ) : ∑' k : ℤ, scalingFun m (x - k) = 1 := by + have h := periodization_moment_eq m hN (l := 0) (by omega) x + simp only [pow_zero, one_mul] at h + rw [h, integral_scalingFun m hN] + +/-! ### Sums over the translates are finite -/ + +/-- **Only finitely many translates are nonzero at a point**: for `N ≥ 2`, `x ∈ ℝ` and an +integer `k` outside `[⌊x⌋ - (2N - 1), ⌊x⌋]`, `φ(x - k) = 0`. Indeed `φ(x - k) ≠ 0` forces +`x - k ∈ [0, 2N - 1]` (`Daubechies.scalingFun_eq_zero`), hence `k ≤ x`, so `k ≤ ⌊x⌋`, and +`k ≥ x - (2N - 1) ≥ ⌊x⌋ - (2N - 1)`. The index set depends only on `⌊x⌋`. -/ +theorem scalingFun_sub_eq_zero (hN : 2 ≤ N) {x : ℝ} {k : ℤ} + (hk : k ∉ Finset.Icc (⌊x⌋ - (2 * N - 1)) ⌊x⌋) : scalingFun m (x - k) = 0 := by + refine scalingFun_eq_zero m hN fun h => hk ?_ + obtain ⟨h0, h1⟩ := h + have hfl := Int.floor_le x + have hk2 : ((⌊x⌋ - (2 * N - 1) : ℤ) : ℝ) ≤ k := by + push_cast + linarith + exact Finset.mem_Icc.2 ⟨by exact_mod_cast hk2, Int.le_floor.2 (by linarith)⟩ + +/-- **Sums against the translates of `φ` are finite**: for `N ≥ 2`, `x ∈ ℝ` and coefficients +`a : ℤ → ℂ`, `∑_{k ∈ ℤ} a(k) φ(x - k) = ∑_{k = ⌊x⌋ - (2N - 1)}^{⌊x⌋} a(k) φ(x - k)` +(`Daubechies.scalingFun_sub_eq_zero`). -/ +theorem tsum_mul_scalingFun_sub_eq_sum (hN : 2 ≤ N) (a : ℤ → ℂ) (x : ℝ) : + ∑' k : ℤ, a k * scalingFun m (x - k) = + ∑ k ∈ Finset.Icc (⌊x⌋ - (2 * N - 1)) ⌊x⌋, a k * scalingFun m (x - k) := + tsum_eq_sum fun k hk => by rw [scalingFun_sub_eq_zero m hN hk, mul_zero] + +/-- The sums `∑_{k ∈ ℤ} a(k) φ(x - k)` converge (for `N ≥ 2`): only finitely many terms are +nonzero (`Daubechies.scalingFun_sub_eq_zero`). -/ +theorem summable_mul_scalingFun_sub (hN : 2 ≤ N) (a : ℤ → ℂ) (x : ℝ) : + Summable fun k : ℤ => a k * scalingFun m (x - k) := + summable_of_ne_finset_zero fun k hk => by rw [scalingFun_sub_eq_zero m hN hk, mul_zero] + +/-- The sum of the translates of `φ` at a point is finite: for `N ≥ 2` and `x ∈ ℝ`, +`∑_{k ∈ ℤ} φ(x - k) = ∑_{k = ⌊x⌋ - (2N - 1)}^{⌊x⌋} φ(x - k)` +(`Daubechies.scalingFun_sub_eq_zero`). -/ +theorem tsum_scalingFun_sub_eq_sum (hN : 2 ≤ N) (x : ℝ) : + ∑' k : ℤ, scalingFun m (x - k) = + ∑ k ∈ Finset.Icc (⌊x⌋ - (2 * N - 1)) ⌊x⌋, scalingFun m (x - k) := + tsum_eq_sum fun _ hk => scalingFun_sub_eq_zero m hN hk + +/-- **Partition of unity as a finite sum**: for `N ≥ 2` and `x ∈ ℝ`, +`∑_{k = ⌊x⌋ - (2N - 1)}^{⌊x⌋} φ(x - k) = 1` (`Daubechies.sum_scalingFun_translate`, +`Daubechies.tsum_scalingFun_sub_eq_sum`). -/ +theorem sum_Icc_scalingFun_sub (hN : 2 ≤ N) (x : ℝ) : + ∑ k ∈ Finset.Icc (⌊x⌋ - (2 * N - 1)) ⌊x⌋, scalingFun m (x - k) = 1 := by + rw [← tsum_scalingFun_sub_eq_sum m hN, sum_scalingFun_translate m hN] + +end Daubechies diff --git a/LeanPool/FunctionSpaces/Wavelets/Examples/Daubechies/SobolevRegularity.lean b/LeanPool/FunctionSpaces/Wavelets/Examples/Daubechies/SobolevRegularity.lean new file mode 100644 index 0000000000..388715a610 --- /dev/null +++ b/LeanPool/FunctionSpaces/Wavelets/Examples/Daubechies/SobolevRegularity.lean @@ -0,0 +1,516 @@ +/- +Copyright (c) 2026 Mario Ullrich. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Mario Ullrich +-/ +module + +public import LeanPool.FunctionSpaces.Analysis.Differences.Differences +public import LeanPool.FunctionSpaces.Analysis.Fourier.LittlewoodPaleyKernels +public import LeanPool.FunctionSpaces.Wavelets.Examples.Daubechies.Cascade +public import LeanPool.FunctionSpaces.Wavelets.Examples.Daubechies.TransferExamples + +/- +Modified for Lean Pool: module names and imports adapted. +-/ + +/-! +# Sobolev regularity of the scaling function + +For a Daubechies mask of order `N ≥ 2` with symbol product `Φ` (`Daubechies.symbolProduct`) and +scaling function `φ = 𝓕⁻ Φ` (`Daubechies.scalingFun`), this file bounds the moduli of smoothness +`ω_r(φ, t)_p = sup_{|h| ≤ t} ‖Δ_h^r φ‖_p` (`Rd.modulus`) for `p ≤ 2`. Here +`Δ_h f(x) = f(x + h) - f(x)` is the forward difference (Mathlib's `fwdDiff h f`) and `Δ_h^r` its +`r`-fold iterate, written `(fwdDiff h)^[r]`. Under a growth bound `T^n 1 ≤ C λ^n` for the transfer +operator `T` (`Daubechies.TransferGrowth N λ C`), for every real `s` with `0 ≤ s < N - log₄ λ` and +every order `r ∈ ℕ` with `r ≥ s` there is a finite constant `K` with + +`ω_r(φ, t)_2 ≤ K t^s` for `0 < t ≤ 1` (`Daubechies.modulus_scalingFun_two_le`), + +and the same holds in `L_p` for every `p ≤ 2` (`Daubechies.modulus_scalingFun_le_two`). As `s` may +be any number in `[0, N - log₄ λ)`, these bounds express the Sobolev regularity `φ ∈ H^s` for every +`s < N - log₄ λ` by moduli of smoothness (the bound for `s` says `φ ∈ B^s_{2,∞}`, and +`B^s_{2,∞} ⊂ H^(s')` for `s' < s`). + +* **The Fourier transform of a difference.** For integrable `f : ℝ → ℂ`, + `𝓕 (Δ_h f)(ξ) = (e^(2πihξ) - 1) 𝓕 f(ξ)` by linearity and the translation rule + (`Real.fourier_fwdDiff_apply`), hence `𝓕 (Δ_h^r f)(ξ) = (e^(2πihξ) - 1)^r 𝓕 f(ξ)` + (`Real.fourier_iterate_fwdDiff_apply`). +* **The multiplier.** The elementary bounds `|e^(iθ) - 1| ≤ 2` and `|e^(iθ) - 1| ≤ |θ|` for real + `θ` give `|e^(2πihξ) - 1| ≤ 2π min(1, |hξ|)` (`Daubechies.norm_exp_sub_one_le_min`). Since + `min(1, x)^r ≤ x^a` for `x ≥ 0` and `0 ≤ a ≤ r` (`Daubechies.min_one_rpow_le_rpow`), the + power form is `|e^(2πihξ) - 1|^r ≤ (2π)^r |h|^a (1 + |ξ|)^a` for all `h, ξ ∈ ℝ` + (`Daubechies.norm_exp_sub_one_pow_le_mul_rpow`), used here with the exponents `2s ≤ 2r` + (`Daubechies.norm_exp_sub_one_pow_le`). The factor is bounded by `2^r`, so + `(e^(2πihξ) - 1)^r F(ξ)` is integrable with `F` (`Real.integrable_exp_sub_one_pow_mul`). +* **Parseval's identity for the differences of `φ`.** The scaling function is continuous and + integrable with `𝓕 φ = Φ`, so `Δ_h^r φ` is continuous and integrable with the integrable + transform `(e^(2πihξ) - 1)^r Φ(ξ)` (`Daubechies.fourier_higherDiff_scalingFun`, + `Daubechies.integrable_fourier_higherDiff_scalingFun`). Plancherel's identity + (`Real.integral_norm_sq_fourier`) gives `‖Δ_h^r φ‖_2² = ∫ |e^(2πihξ) - 1|^(2r) |Φ(ξ)|² dξ` + (`Daubechies.integral_norm_sq_higherDiff_scalingFun`, + `Daubechies.eLpNorm_two_higherDiff_scalingFun_sq`). +* **The `L²` modulus.** With the power form of the multiplier bound, + `‖Δ_h^r φ‖_2 ≤ (2π)^r (∫ (1 + |ξ|)^(2s) |Φ(ξ)|² dξ)^(1/2) |h|^s` + (`Daubechies.eLpNorm_two_higherDiff_scalingFun_le`), where the integral is finite for + `s < N - log₄ λ` (`Daubechies.integrable_rpow_mul_normSq`). The supremum over `|h| ≤ t` bounds + `ω_r(φ, t)_2` (`Daubechies.modulus_scalingFun_two_le_mul_rpow`). +* **Exponents `p ≤ 2`.** For `|h| ≤ 1` the difference `Δ_h^r φ` vanishes outside + `[-r, 2N - 1 + r]` (`Daubechies.higherDiff_scalingFun_eq_zero`), since `φ` vanishes outside + `[0, 2N - 1]`. Hölder's inequality on this interval of length `2N - 1 + 2r` + (`Daubechies.eLpNorm_le_eLpNorm_mul_of_eq_zero`) gives + `ω_r(φ, t)_p ≤ (2N - 1 + 2r)^(1/p - 1/2) ω_r(φ, t)_2` for `t ≤ 1` + (`Daubechies.modulus_scalingFun_le_modulus_two`). +* **Orders two and three.** The growth bounds `T^n 1 ≤ 4^n` for `N = 2` and `T^n 1 ≤ 2 · 9^n` for + `N = 3` (`Daubechies.transferGrowth_two`, `Daubechies.transferGrowth_three`) have the exponents + `2 - log₄ 4 = 1` and `3 - log₄ 9 = 3 - log₂ 3 ≈ 1.415`. Hence `ω_r(φ, t)_p ≤ K t^s` for + `p ≤ 2` and `0 < t ≤ 1`, for every `0 ≤ s < 1` if `N = 2` + (`Daubechies.modulus_scalingFun_two_le_order_two`, + `Daubechies.modulus_scalingFun_le_two_order_two`) and for every `0 ≤ s < 3 - log₂ 3` if + `N = 3` (`Daubechies.modulus_scalingFun_two_le_order_three`, + `Daubechies.modulus_scalingFun_le_two_order_three`). +-/ + +@[expose] public section + +open MeasureTheory Complex +open scoped Real FourierTransform ENNReal + +namespace Real + +/-! ### The Fourier transform of a difference -/ + +variable {f : ℝ → ℂ} + +/-- **The Fourier transform of a difference**: for integrable `f : ℝ → ℂ` and all `h, ξ ∈ ℝ`, +`𝓕 (Δ_h f)(ξ) = (e^(2πihξ) - 1) 𝓕 f(ξ)`, where `Δ_h f(x) = f(x + h) - f(x)` is Mathlib's +`fwdDiff h f`. The transform is linear on integrable functions (`Rd.fourier_sub_apply`), and +translation becomes modulation, `𝓕[f(· + h)](ξ) = e^(2πihξ) 𝓕 f(ξ)` +(`Real.fourier_comp_add_right_apply`). -/ +theorem fourier_fwdDiff_apply (hf : Integrable f) (h ξ : ℝ) : + 𝓕 (fwdDiff h f) ξ = (cexp (2 * π * h * ξ * I) - 1) * 𝓕 f ξ := by + rw [show fwdDiff h f = (fun x => f (x + h)) - f from rfl, + Rd.fourier_sub_apply (hf.comp_add_right h) hf, fourier_comp_add_right_apply, sub_one_mul] + +/-- **The Fourier transform of a difference of order `r`**: for integrable `f : ℝ → ℂ`, +`𝓕 (Δ_h^r f)(ξ) = (e^(2πihξ) - 1)^r 𝓕 f(ξ)` for every `r ∈ ℕ` and all `h, ξ ∈ ℝ`, where +`Δ_h^r f = (fwdDiff h)^[r] f` is the `r`-fold iterate of the difference. By induction on `r` with +`Real.fourier_fwdDiff_apply`, since every difference of an integrable function is integrable +(`Rd.integrable_higherDiff`). -/ +theorem fourier_iterate_fwdDiff_apply (hf : Integrable f) (r : ℕ) (h ξ : ℝ) : + 𝓕 ((fwdDiff h)^[r] f) ξ = (cexp (2 * π * h * ξ * I) - 1) ^ r * 𝓕 f ξ := by + induction r with + | zero => simp + | succ r ih => + rw [Function.iterate_succ_apply', fourier_fwdDiff_apply (Rd.integrable_higherDiff hf r h), + ih, pow_succ'] + ring + +end Real + +namespace Daubechies + +/-! ### The multiplier of a difference -/ + +/-- `e^(2πihξ) = e^(iθ)` with the real number `θ = 2πhξ`. This is the form `exp(iθ)`, `θ` real, in +which Mathlib states `|e^(iθ)| = 1` and `|e^(iθ) - 1| ≤ |θ|` (`Complex.norm_exp_ofReal_mul_I`, +`Real.norm_exp_I_mul_ofReal_sub_one_le`). -/ +theorem exp_two_pi_mul_I_eq (h ξ : ℝ) : + cexp (2 * π * h * ξ * I) = cexp (I * ((2 * π * (h * ξ) : ℝ) : ℂ)) := by + congr 1 + push_cast + ring + +/-- `|e^(2πihξ) - 1| ≤ 2` for all `h, ξ ∈ ℝ`, by the triangle inequality and `|e^(iθ)| = 1` for +real `θ` (Mathlib's `Complex.norm_exp_ofReal_mul_I`). -/ +theorem norm_exp_sub_one_le_two (h ξ : ℝ) : ‖cexp (2 * π * h * ξ * I) - 1‖ ≤ 2 := by + calc ‖cexp (2 * π * h * ξ * I) - 1‖ ≤ ‖cexp (2 * π * h * ξ * I)‖ + ‖(1 : ℂ)‖ := + norm_sub_le _ _ + _ = 2 := by + rw [exp_two_pi_mul_I_eq, mul_comm, Complex.norm_exp_ofReal_mul_I, norm_one] + norm_num + +/-- **The multiplier of a difference**: `|e^(2πihξ) - 1| ≤ 2π min(1, |hξ|)` for all `h, ξ ∈ ℝ`. +It combines `|e^(iθ) - 1| ≤ 2 ≤ 2π` (`Daubechies.norm_exp_sub_one_le_two`) with +`|e^(iθ) - 1| ≤ |θ|` for `θ = 2πhξ` (Mathlib's `Real.norm_exp_I_mul_ofReal_sub_one_le`). -/ +theorem norm_exp_sub_one_le_min (h ξ : ℝ) : + ‖cexp (2 * π * h * ξ * I) - 1‖ ≤ 2 * π * min 1 |h * ξ| := by + rw [mul_min_of_nonneg _ _ (by positivity), mul_one] + refine le_min ((norm_exp_sub_one_le_two h ξ).trans (by linarith [Real.two_le_pi])) ?_ + rw [exp_two_pi_mul_I_eq] + refine Real.norm_exp_I_mul_ofReal_sub_one_le.trans_eq ?_ + rw [Real.norm_eq_abs, abs_mul, abs_of_pos (by positivity : (0 : ℝ) < 2 * π)] + +/-- `min(1, x)^b ≤ x^a` for `x ≥ 0` and real exponents `0 ≤ a ≤ b`. For `x ≤ 1` the power `x^t` +decreases in `t`, so `x^b ≤ x^a` (Mathlib's `Real.rpow_le_rpow_of_exponent_ge'`); for `x ≥ 1` +the left side is `1 ≤ x^a` (Mathlib's `Real.one_le_rpow`). -/ +theorem min_one_rpow_le_rpow {x a b : ℝ} (hx : 0 ≤ x) (ha : 0 ≤ a) (hab : a ≤ b) : + min 1 x ^ b ≤ x ^ a := by + rcases le_total x 1 with hx1 | hx1 + · rw [min_eq_right hx1] + exact Real.rpow_le_rpow_of_exponent_ge' hx hx1 ha hab + · rw [min_eq_left hx1, Real.one_rpow] + exact Real.one_le_rpow hx1 ha + +/-- **The multiplier bound in power form**: for real `a` and `r ∈ ℕ` with `0 ≤ a ≤ r`, +`|e^(2πihξ) - 1|^r ≤ (2π)^r |h|^a (1 + |ξ|)^a` for all `h, ξ ∈ ℝ`. It follows from +`|e^(2πihξ) - 1| ≤ 2π min(1, |hξ|)` (`Daubechies.norm_exp_sub_one_le_min`), +`min(1, |hξ|)^r ≤ |hξ|^a` (`Daubechies.min_one_rpow_le_rpow`) and `|ξ| ≤ 1 + |ξ|`. The bound holds +for every step `h`, small or large; its squared form, with the exponents `2r` and `2a`, is +`Daubechies.norm_exp_sub_one_pow_le`. -/ +theorem norm_exp_sub_one_pow_le_mul_rpow {a : ℝ} {r : ℕ} (ha0 : 0 ≤ a) (har : a ≤ r) + (h ξ : ℝ) : + ‖cexp (2 * π * h * ξ * I) - 1‖ ^ r ≤ (2 * π) ^ r * (|h| ^ a * (1 + |ξ|) ^ a) := by + have h1 : min 1 |h * ξ| ^ r ≤ |h * ξ| ^ a := by + have := min_one_rpow_le_rpow (abs_nonneg (h * ξ)) ha0 har + rwa [Real.rpow_natCast] at this + have h2 : |h * ξ| ^ a ≤ |h| ^ a * (1 + |ξ|) ^ a := by + rw [abs_mul, Real.mul_rpow (abs_nonneg _) (abs_nonneg _)] + exact mul_le_mul_of_nonneg_left + (Real.rpow_le_rpow (abs_nonneg _) (by linarith) ha0) (by positivity) + calc ‖cexp (2 * π * h * ξ * I) - 1‖ ^ r ≤ (2 * π * min 1 |h * ξ|) ^ r := + pow_le_pow_left₀ (norm_nonneg _) (norm_exp_sub_one_le_min h ξ) _ + _ = (2 * π) ^ r * min 1 |h * ξ| ^ r := mul_pow _ _ _ + _ ≤ _ := mul_le_mul_of_nonneg_left (h1.trans h2) (by positivity) + +/-- **The power form of the multiplier bound**: for real `s` and `r ∈ ℕ` with `0 ≤ s ≤ r`, +`|e^(2πihξ) - 1|^(2r) ≤ (2π)^(2r) |h|^(2s) (1 + |ξ|)^(2s)` for all `h, ξ ∈ ℝ`: the case of the +exponents `2s ≤ 2r` of `Daubechies.norm_exp_sub_one_pow_le_mul_rpow`. The exponent `s` trades the +factor `|h|^(2s)` for the weight `(1 + |ξ|)^(2s)` on the Fourier side. -/ +theorem norm_exp_sub_one_pow_le {s : ℝ} {r : ℕ} (hs0 : 0 ≤ s) (hsr : s ≤ r) (h ξ : ℝ) : + ‖cexp (2 * π * h * ξ * I) - 1‖ ^ (2 * r) ≤ + (2 * π) ^ (2 * r) * (|h| ^ (2 * s) * (1 + |ξ|) ^ (2 * s)) := + norm_exp_sub_one_pow_le_mul_rpow (by linarith) (by push_cast; linarith) h ξ + +end Daubechies + +namespace Real + +/-- For integrable `F : ℝ → ℂ`, every `r ∈ ℕ` and every `h ∈ ℝ`, the function +`ξ ↦ (e^(2πihξ) - 1)^r F(ξ)` is integrable: the continuous factor is bounded by `2^r` +(`Daubechies.norm_exp_sub_one_le_two`, Mathlib's `MeasureTheory.Integrable.bdd_mul`). -/ +theorem integrable_exp_sub_one_pow_mul {F : ℝ → ℂ} (hF : Integrable F) (r : ℕ) + (h : ℝ) : Integrable (fun ξ : ℝ => (cexp (2 * π * h * ξ * I) - 1) ^ r * F ξ) := by + refine hF.bdd_mul (c := 2 ^ r) + (by fun_prop : Continuous fun ξ : ℝ => (cexp (2 * π * h * ξ * I) - 1) ^ r).aestronglyMeasurable + (Filter.Eventually.of_forall fun ξ => ?_) + rw [norm_pow] + exact pow_le_pow_left₀ (norm_nonneg _) (Daubechies.norm_exp_sub_one_le_two h ξ) r + +end Real + +namespace Daubechies + +/-! ### Continuity and `L_p` norms of differences -/ + +/-- The differences `Δ_h^r f` of a continuous `f : ℝ → ℂ` are continuous, for every `r ∈ ℕ` and +every `h ∈ ℝ`: by induction on `r`, since `Δ_h g = g(· + h) - g`. -/ +theorem continuous_iterate_fwdDiff {f : ℝ → ℂ} (hf : Continuous f) (r : ℕ) (h : ℝ) : + Continuous ((fwdDiff h)^[r] f) := by + induction r with + | zero => exact hf + | succ r ih => + rw [Function.iterate_succ_apply'] + exact (ih.comp (continuous_id.add continuous_const)).sub ih + +/-- The differences of a function in `L_p(ℝ)`, `p ≥ 1`, lie in `L_p(ℝ)`: `Δ_h^r f ∈ L_p` for +every `r ∈ ℕ` and every `h ∈ ℝ`, since `‖Δ_h^r f‖_p ≤ 2^r ‖f‖_p` (`Rd.eLpNorm_higherDiff_le`). -/ +theorem memLp_iterate_fwdDiff {f : ℝ → ℂ} {p : ℝ≥0∞} (hf : MemLp f p) (hp : 1 ≤ p) (r : ℕ) + (h : ℝ) : MemLp ((fwdDiff h)^[r] f) p := + (Rd.eLpNorm_higherDiff_le hf.aestronglyMeasurable hp r h).trans_lt + (ENNReal.mul_lt_top (by simp) hf) + +/-- **The `L²` norm as an integral**: `‖g‖_2 = (∫ ‖g(x)‖² dμ(x))^(1/2)` for every `g ∈ L²(μ)` +with values in a normed group, on every measure space. The left side is Mathlib's +`eLpNorm g 2 μ ∈ [0, ∞]`, the right side the real square root, embedded by `ENNReal.ofReal` +(Mathlib's `MeasureTheory.MemLp.eLpNorm_eq_integral_rpow_norm`). -/ +theorem eLpNorm_two_eq_sqrt_integral {α E : Type*} [MeasurableSpace α] {μ : Measure α} + [NormedAddCommGroup E] {g : α → E} (hg : MemLp g 2 μ) : + eLpNorm g 2 μ = ENNReal.ofReal √(∫ x, ‖g x‖ ^ 2 ∂μ) := by + rw [hg.eLpNorm_eq_integral_rpow_norm two_ne_zero ENNReal.ofNat_ne_top, ENNReal.toReal_ofNat, + Real.sqrt_eq_rpow, one_div] + simp_rw [Real.rpow_two] + +/-! ### Parseval's identity for the differences of the scaling function -/ + +variable {N : ℕ} (m : Mask N) + +/-- **The Fourier transform of the differences of the scaling function**: for `N ≥ 2`, +`𝓕 (Δ_h^r φ)(ξ) = (e^(2πihξ) - 1)^r Φ(ξ)` for every `r ∈ ℕ` and all `h, ξ ∈ ℝ`. This is +`Real.fourier_iterate_fwdDiff_apply` for the integrable function `φ` +(`Daubechies.integrable_scalingFun`) together with `𝓕 φ = Φ` (`Daubechies.fourier_scalingFun`). -/ +theorem fourier_higherDiff_scalingFun (hN : 2 ≤ N) (r : ℕ) (h ξ : ℝ) : + 𝓕 ((fwdDiff h)^[r] (scalingFun m)) ξ = + (cexp (2 * π * h * ξ * I) - 1) ^ r * symbolProduct m ξ := by + rw [Real.fourier_iterate_fwdDiff_apply (integrable_scalingFun m hN), fourier_scalingFun m hN] + +/-- For `N ≥ 2` the Fourier transform `ξ ↦ (e^(2πihξ) - 1)^r Φ(ξ)` of `Δ_h^r φ` +(`Daubechies.fourier_higherDiff_scalingFun`) is integrable: `Φ` is integrable +(`Daubechies.integrable_symbolProduct`, `Real.integrable_exp_sub_one_pow_mul`). -/ +theorem integrable_fourier_higherDiff_scalingFun (hN : 2 ≤ N) (r : ℕ) (h : ℝ) : + Integrable (𝓕 ((fwdDiff h)^[r] (scalingFun m))) := by + rw [funext (fourier_higherDiff_scalingFun m hN r h)] + exact Real.integrable_exp_sub_one_pow_mul (integrable_symbolProduct m hN) r h + +/-- **Parseval's identity for the differences of the scaling function**: for `N ≥ 2`, +`∫ |Δ_h^r φ(x)|² dx = ∫ |e^(2πihξ) - 1|^(2r) |Φ(ξ)|² dξ` for every `r ∈ ℕ` and every `h ∈ ℝ`. +The function `Δ_h^r φ` is continuous and integrable (`Daubechies.continuous_iterate_fwdDiff`, +`Rd.integrable_higherDiff`) and has an integrable transform +(`Daubechies.integrable_fourier_higherDiff_scalingFun`), so Plancherel's identity +`Real.integral_norm_sq_fourier` applies; the transform is given by +`Daubechies.fourier_higherDiff_scalingFun`. -/ +theorem integral_norm_sq_higherDiff_scalingFun (hN : 2 ≤ N) (r : ℕ) (h : ℝ) : + ∫ x, ‖(fwdDiff h)^[r] (scalingFun m) x‖ ^ 2 = + ∫ ξ : ℝ, ‖cexp (2 * π * h * ξ * I) - 1‖ ^ (2 * r) * ‖symbolProduct m ξ‖ ^ 2 := by + rw [← Real.integral_norm_sq_fourier + (continuous_iterate_fwdDiff (continuous_scalingFun m hN) r h) + (Rd.integrable_higherDiff (integrable_scalingFun m hN) r h) + (integrable_fourier_higherDiff_scalingFun m hN r h)] + congr 1 with ξ + rw [fourier_higherDiff_scalingFun m hN, norm_mul, norm_pow, mul_pow, ← pow_mul, mul_comm r 2] + +/-- For `N ≥ 2` the differences `Δ_h^r φ` of the scaling function lie in `L_p(ℝ)` for every +`p ≥ 1`, since `φ` does (`Daubechies.memLp_scalingFun`, `Daubechies.memLp_iterate_fwdDiff`). -/ +theorem memLp_higherDiff_scalingFun (hN : 2 ≤ N) {p : ℝ≥0∞} (hp : 1 ≤ p) (r : ℕ) (h : ℝ) : + MemLp ((fwdDiff h)^[r] (scalingFun m)) p := + memLp_iterate_fwdDiff (memLp_scalingFun m hN p) hp r h + +/-- **The `L²` norm of the differences on the Fourier side**: for `N ≥ 2`, +`‖Δ_h^r φ‖_2² = ∫ |e^(2πihξ) - 1|^(2r) |Φ(ξ)|² dξ` for every `r ∈ ℕ` and every `h ∈ ℝ`, as an +identity in `[0, ∞]`. This is Parseval's identity +`Daubechies.integral_norm_sq_higherDiff_scalingFun` together with `‖g‖_2 = (∫ ‖g‖²)^(1/2)` +(`Daubechies.eLpNorm_two_eq_sqrt_integral`). -/ +theorem eLpNorm_two_higherDiff_scalingFun_sq (hN : 2 ≤ N) (r : ℕ) (h : ℝ) : + eLpNorm ((fwdDiff h)^[r] (scalingFun m)) 2 volume ^ 2 = + ENNReal.ofReal + (∫ ξ : ℝ, ‖cexp (2 * π * h * ξ * I) - 1‖ ^ (2 * r) * ‖symbolProduct m ξ‖ ^ 2) := by + rw [eLpNorm_two_eq_sqrt_integral (memLp_higherDiff_scalingFun m hN one_le_two r h), + ← ENNReal.ofReal_pow (Real.sqrt_nonneg _), + Real.sq_sqrt (integral_nonneg fun x => sq_nonneg _), + integral_norm_sq_higherDiff_scalingFun m hN] + +/-! ### The `L²` modulus of the scaling function -/ + +/-- `x^(2s) = (x^s)²` for `x ≥ 0` and every real `s` (Mathlib's `Real.rpow_mul`). -/ +theorem rpow_two_mul_eq_sq {x : ℝ} (hx : 0 ≤ x) (s : ℝ) : x ^ (2 * s) = (x ^ s) ^ 2 := by + rw [mul_comm, Real.rpow_mul hx, Real.rpow_two] + +/-- **The squared `L²` bound for the differences of the scaling function**: let `N ≥ 2`, let +`T^n 1 ≤ C λ^n` be a growth bound for the transfer operator (`Daubechies.TransferGrowth`), and +let `s ∈ ℝ`, `r ∈ ℕ` with `0 ≤ s ≤ r` and `s < N - log₄ λ`. Then for every `h ∈ ℝ`, +`∫ |Δ_h^r φ(x)|² dx ≤ ((2π)^r |h|^s)² ∫ (1 + |ξ|)^(2s) |Φ(ξ)|² dξ`. +Parseval's identity (`Daubechies.integral_norm_sq_higherDiff_scalingFun`) and the pointwise bound +`Daubechies.norm_exp_sub_one_pow_le` give the estimate. The condition `s < N - log₄ λ` makes the +integrand on the right integrable (`Daubechies.integrable_rpow_mul_normSq`), which the comparison +of the integrals needs. -/ +theorem integral_norm_sq_higherDiff_scalingFun_le (hN : 2 ≤ N) {lam C s : ℝ} {r : ℕ} + (hg : TransferGrowth N lam C) (hs0 : 0 ≤ s) (hs : s < N - Real.logb 4 lam) (hsr : s ≤ r) + (h : ℝ) : + ∫ x, ‖(fwdDiff h)^[r] (scalingFun m) x‖ ^ 2 ≤ + ((2 * π) ^ r * |h| ^ s) ^ 2 * ∫ ξ, (1 + |ξ|) ^ (2 * s) * ‖symbolProduct m ξ‖ ^ 2 := by + rw [integral_norm_sq_higherDiff_scalingFun m hN, ← integral_const_mul] + refine integral_mono_of_nonneg (Filter.Eventually.of_forall fun ξ => by positivity) + ((integrable_rpow_mul_normSq m hg hs).const_mul _) (Filter.Eventually.of_forall fun ξ => ?_) + calc ‖cexp (2 * π * h * ξ * I) - 1‖ ^ (2 * r) * ‖symbolProduct m ξ‖ ^ 2 + ≤ (2 * π) ^ (2 * r) * (|h| ^ (2 * s) * (1 + |ξ|) ^ (2 * s)) * ‖symbolProduct m ξ‖ ^ 2 := + mul_le_mul_of_nonneg_right (norm_exp_sub_one_pow_le hs0 hsr h ξ) (by positivity) + _ = ((2 * π) ^ r * |h| ^ s) ^ 2 * ((1 + |ξ|) ^ (2 * s) * ‖symbolProduct m ξ‖ ^ 2) := by + rw [rpow_two_mul_eq_sq (abs_nonneg h), pow_mul'] + ring + +/-- **The `L²` bound for the differences of the scaling function**: under the hypotheses of +`Daubechies.integral_norm_sq_higherDiff_scalingFun_le`, for every `h ∈ ℝ`, +`‖Δ_h^r φ‖_2 ≤ (2π)^r (∫ (1 + |ξ|)^(2s) |Φ(ξ)|² dξ)^(1/2) |h|^s`, the square root of that bound +(`Daubechies.eLpNorm_two_eq_sqrt_integral`). -/ +theorem eLpNorm_two_higherDiff_scalingFun_le (hN : 2 ≤ N) {lam C s : ℝ} {r : ℕ} + (hg : TransferGrowth N lam C) (hs0 : 0 ≤ s) (hs : s < N - Real.logb 4 lam) (hsr : s ≤ r) + (h : ℝ) : + eLpNorm ((fwdDiff h)^[r] (scalingFun m)) 2 volume ≤ + ENNReal.ofReal ((2 * π) ^ r * √(∫ ξ, (1 + |ξ|) ^ (2 * s) * ‖symbolProduct m ξ‖ ^ 2)) * + ENNReal.ofReal (|h| ^ s) := by + rw [eLpNorm_two_eq_sqrt_integral (memLp_higherDiff_scalingFun m hN one_le_two r h), + ← ENNReal.ofReal_mul (by positivity)] + refine ENNReal.ofReal_le_ofReal ((Real.sqrt_le_sqrt + (integral_norm_sq_higherDiff_scalingFun_le m hN hg hs0 hs hsr h)).trans_eq ?_) + rw [Real.sqrt_mul (sq_nonneg _), Real.sqrt_sq (by positivity)] + ring + +/-- **The `L²` modulus of the scaling function, with an explicit constant**: under the hypotheses +of `Daubechies.integral_norm_sq_higherDiff_scalingFun_le`, for every `t ∈ ℝ`, +`ω_r(φ, t)_2 ≤ (2π)^r (∫ (1 + |ξ|)^(2s) |Φ(ξ)|² dξ)^(1/2) t^s`. This is the supremum over +`|h| ≤ t` of `Daubechies.eLpNorm_two_higherDiff_scalingFun_le`, with `|h|^s ≤ t^s` since +`s ≥ 0`. -/ +theorem modulus_scalingFun_two_le_mul_rpow (hN : 2 ≤ N) {lam C s : ℝ} {r : ℕ} + (hg : TransferGrowth N lam C) (hs0 : 0 ≤ s) (hs : s < N - Real.logb 4 lam) (hsr : s ≤ r) + (t : ℝ) : + Rd.modulus volume r 2 (scalingFun m) t ≤ + ENNReal.ofReal ((2 * π) ^ r * √(∫ ξ, (1 + |ξ|) ^ (2 * s) * ‖symbolProduct m ξ‖ ^ 2)) * + ENNReal.ofReal (t ^ s) := by + refine iSup₂_le fun h hh => (eLpNorm_two_higherDiff_scalingFun_le m hN hg hs0 hs hsr h).trans ?_ + gcongr + exact hh + +/-- **The `L²` modulus of smoothness of the scaling function**: let `N ≥ 2` and let +`T^n 1 ≤ C λ^n` be a growth bound for the transfer operator (`Daubechies.TransferGrowth`). For +every real `s` with `0 ≤ s < N - log₄ λ` and every order `r ∈ ℕ` with `r ≥ s` there is a finite +constant `K` with `ω_r(φ, t)_2 ≤ K t^s` for all `0 < t ≤ 1` +(`Daubechies.modulus_scalingFun_two_le_mul_rpow`). Over all such `s`, this is the Sobolev +regularity `φ ∈ H^s` for every `s < N - log₄ λ`, in terms of moduli of smoothness. -/ +theorem modulus_scalingFun_two_le (hN : 2 ≤ N) {lam C s : ℝ} {r : ℕ} + (hg : TransferGrowth N lam C) (hs0 : 0 ≤ s) (hs : s < N - Real.logb 4 lam) (hsr : s ≤ r) : + ∃ K : ℝ≥0∞, K ≠ ∞ ∧ ∀ t ∈ Set.Ioc (0 : ℝ) 1, + Rd.modulus volume r 2 (scalingFun m) t ≤ K * ENNReal.ofReal (t ^ s) := + ⟨_, ENNReal.ofReal_ne_top, fun t _ => modulus_scalingFun_two_le_mul_rpow m hN hg hs0 hs hsr t⟩ + +/-! ### Exponents `p ≤ 2` -/ + +/-- **The support of a difference**: if `f : ℝ → ℂ` vanishes outside `[a, b]`, then `Δ_h^r f` +vanishes outside `[a - r|h|, b + r|h|]`, for every `r ∈ ℕ` and every `h ∈ ℝ`. By induction on +`r`: `Δ_h^(r+1) f(x) = Δ_h^r f(x + h) - Δ_h^r f(x)`, and for `x` outside +`[a - (r+1)|h|, b + (r+1)|h|]` both `x` and `x + h` lie outside `[a - r|h|, b + r|h|]`. -/ +theorem iterate_fwdDiff_eq_zero_of_notMem {f : ℝ → ℂ} {a b : ℝ} + (hf : ∀ x ∉ Set.Icc a b, f x = 0) (r : ℕ) (h : ℝ) {x : ℝ} + (hx : x ∉ Set.Icc (a - r * |h|) (b + r * |h|)) : (fwdDiff h)^[r] f x = 0 := by + induction r generalizing x with + | zero => + rw [Nat.cast_zero, zero_mul, sub_zero, add_zero] at hx + exact hf x hx + | succ r ih => + have hh := abs_nonneg h + rw [Function.iterate_succ_apply'] + change (fwdDiff h)^[r] f (x + h) - (fwdDiff h)^[r] f x = 0 + rw [ih fun hmem => ?_, ih fun hmem => ?_, sub_zero] + · refine hx ⟨?_, ?_⟩ <;> push_cast <;> linarith [hmem.1, hmem.2] + · refine hx ⟨?_, ?_⟩ <;> push_cast <;> linarith [hmem.1, hmem.2, neg_abs_le h, le_abs_self h] + +/-- **Hölder's inequality for a function supported in an interval**: if `g : ℝ → E` is almost +everywhere strongly measurable and vanishes outside `[a, b]`, then +`‖g‖_p ≤ ‖g‖_q (b - a)^(1/p - 1/q)` for exponents `p ≤ q` in `[0, ∞]`, where `1/p` stands for +`1 / p.toReal` (so `1/∞ = 0`). Both norms are the norms for Lebesgue measure restricted to +`[a, b]` (Mathlib's `MeasureTheory.eLpNorm_restrict_eq_of_support_subset`), and on this finite +measure space the comparison of `L_p` norms +(Mathlib's `MeasureTheory.eLpNorm_le_eLpNorm_mul_rpow_measure_univ`) gives the factor +`|[a, b]|^(1/p - 1/q)`. -/ +theorem eLpNorm_le_eLpNorm_mul_of_eq_zero {E : Type*} [NormedAddCommGroup E] {g : ℝ → E} + (hg : AEStronglyMeasurable g) {a b : ℝ} (hab : ∀ x ∉ Set.Icc a b, g x = 0) {p q : ℝ≥0∞} + (hpq : p ≤ q) : + eLpNorm g p volume ≤ + eLpNorm g q volume * ENNReal.ofReal (b - a) ^ (1 / p.toReal - 1 / q.toReal) := by + have hsupp : Function.support g ⊆ Set.Icc a b := fun x hx => by_contra fun h => hx (hab x h) + rw [← eLpNorm_restrict_eq_of_support_subset hg hsupp, + ← eLpNorm_restrict_eq_of_support_subset (p := q) hg hsupp] + refine (eLpNorm_le_eLpNorm_mul_rpow_measure_univ hpq hg.restrict).trans_eq ?_ + rw [Measure.restrict_apply_univ, Real.volume_Icc] + +/-- **The support of the differences of the scaling function**: for `N ≥ 2`, `r ∈ ℕ` and a step +`|h| ≤ 1`, `Δ_h^r φ(x) = 0` for every `x ∉ [-r, 2N - 1 + r]`. The scaling function vanishes +outside `[0, 2N - 1]` (`Daubechies.scalingFun_eq_zero`), so `Δ_h^r φ` vanishes outside +`[-r|h|, 2N - 1 + r|h|] ⊆ [-r, 2N - 1 + r]` (`Daubechies.iterate_fwdDiff_eq_zero_of_notMem`). -/ +theorem higherDiff_scalingFun_eq_zero (hN : 2 ≤ N) (r : ℕ) {h : ℝ} (hh : |h| ≤ 1) {x : ℝ} + (hx : x ∉ Set.Icc (-(r : ℝ)) (2 * N - 1 + r)) : (fwdDiff h)^[r] (scalingFun m) x = 0 := by + have hr : (r : ℝ) * |h| ≤ r := mul_le_of_le_one_right r.cast_nonneg hh + refine iterate_fwdDiff_eq_zero_of_notMem (fun y hy => scalingFun_eq_zero m hN hy) r h + fun hmem => hx ⟨?_, ?_⟩ + · linarith [hmem.1] + · linarith [hmem.2] + +/-- **`L_p` norms of the differences by the `L²` norm**: for `N ≥ 2`, `p ≤ 2`, `r ∈ ℕ` and a +step `|h| ≤ 1`, `‖Δ_h^r φ‖_p ≤ ‖Δ_h^r φ‖_2 (2N - 1 + 2r)^(1/p - 1/2)`. The difference vanishes +outside the interval `[-r, 2N - 1 + r]` of length `2N - 1 + 2r` +(`Daubechies.higherDiff_scalingFun_eq_zero`), and Hölder's inequality on this interval gives the +factor (`Daubechies.eLpNorm_le_eLpNorm_mul_of_eq_zero`). -/ +theorem eLpNorm_higherDiff_scalingFun_le_two (hN : 2 ≤ N) {p : ℝ≥0∞} (hp2 : p ≤ 2) (r : ℕ) + {h : ℝ} (hh : |h| ≤ 1) : + eLpNorm ((fwdDiff h)^[r] (scalingFun m)) p volume ≤ + eLpNorm ((fwdDiff h)^[r] (scalingFun m)) 2 volume * + ENNReal.ofReal (2 * N - 1 + 2 * r) ^ (1 / p.toReal - 1 / 2) := by + have h1 := eLpNorm_le_eLpNorm_mul_of_eq_zero + (memLp_higherDiff_scalingFun m hN one_le_two r h).aestronglyMeasurable + (fun x hx => higherDiff_scalingFun_eq_zero m hN r hh hx) hp2 + rwa [ENNReal.toReal_ofNat, show (2 * N - 1 + r : ℝ) - -r = 2 * N - 1 + 2 * r by ring] at h1 + +/-- **The `L_p` modulus by the `L²` modulus**: for `N ≥ 2`, `p ≤ 2`, `r ∈ ℕ` and `t ≤ 1`, +`ω_r(φ, t)_p ≤ (2N - 1 + 2r)^(1/p - 1/2) ω_r(φ, t)_2`, the supremum over `|h| ≤ t` of +`Daubechies.eLpNorm_higherDiff_scalingFun_le_two`. -/ +theorem modulus_scalingFun_le_modulus_two (hN : 2 ≤ N) {p : ℝ≥0∞} (hp2 : p ≤ 2) (r : ℕ) {t : ℝ} + (ht : t ≤ 1) : + Rd.modulus volume r p (scalingFun m) t ≤ + ENNReal.ofReal (2 * N - 1 + 2 * r) ^ (1 / p.toReal - 1 / 2) * + Rd.modulus volume r 2 (scalingFun m) t := by + refine iSup₂_le fun h hh => ?_ + rw [mul_comm] + exact (eLpNorm_higherDiff_scalingFun_le_two m hN hp2 r (hh.trans ht)).trans + (mul_le_mul_left (Rd.eLpNorm_higherDiff_le_modulus hh) _) + +/-- **The `L_p` modulus of smoothness of the scaling function, `p ≤ 2`**: let `N ≥ 2`, let +`T^n 1 ≤ C λ^n` be a growth bound for the transfer operator (`Daubechies.TransferGrowth`), and +let `p ≤ 2`. For every real `s` with `0 ≤ s < N - log₄ λ` and every order `r ∈ ℕ` with `r ≥ s` +there is a finite constant `K` with `ω_r(φ, t)_p ≤ K t^s` for all `0 < t ≤ 1`, namely +`K = (2N - 1 + 2r)^(1/p - 1/2) K₂` with the constant `K₂` of the `L²` bound +`Daubechies.modulus_scalingFun_two_le` (`Daubechies.modulus_scalingFun_le_modulus_two`). The +exponent may be any `p ≤ 2`, including `p < 1`. -/ +theorem modulus_scalingFun_le_two (hN : 2 ≤ N) {p : ℝ≥0∞} (hp2 : p ≤ 2) {lam C s : ℝ} {r : ℕ} + (hg : TransferGrowth N lam C) (hs0 : 0 ≤ s) (hs : s < N - Real.logb 4 lam) (hsr : s ≤ r) : + ∃ K : ℝ≥0∞, K ≠ ∞ ∧ ∀ t ∈ Set.Ioc (0 : ℝ) 1, + Rd.modulus volume r p (scalingFun m) t ≤ K * ENNReal.ofReal (t ^ s) := by + obtain ⟨K, hK, hmod⟩ := modulus_scalingFun_two_le m hN hg hs0 hs hsr + have hL : (0 : ℝ) < 2 * N - 1 + 2 * r := by + have : (2 : ℝ) ≤ N := by exact_mod_cast hN + linarith [r.cast_nonneg (α := ℝ)] + refine ⟨ENNReal.ofReal (2 * N - 1 + 2 * r) ^ (1 / p.toReal - 1 / 2) * K, + ENNReal.mul_ne_top (ENNReal.rpow_ne_top_of_ne_zero (ENNReal.ofReal_pos.2 hL).ne' + ENNReal.ofReal_ne_top) hK, fun t ht => ?_⟩ + rw [mul_assoc] + exact (modulus_scalingFun_le_modulus_two m hN hp2 r ht.2).trans (mul_le_mul_right (hmod t ht) _) + +/-! ### Orders two and three -/ + +/-- **The `L²` modulus of the scaling function of order two**: for every Daubechies mask of order +`N = 2`, every real `s` with `0 ≤ s < 1` and every order `r ∈ ℕ` with `r ≥ s` there is a finite +constant `K` with `ω_r(φ, t)_2 ≤ K t^s` for all `0 < t ≤ 1`. The growth bound `T^n 1 ≤ 4^n` +(`Daubechies.transferGrowth_two`) has the exponent `2 - log₄ 4 = 1` +(`Daubechies.two_sub_logb_four_four`), so `Daubechies.modulus_scalingFun_two_le` applies. -/ +theorem modulus_scalingFun_two_le_order_two (m : Mask 2) {s : ℝ} {r : ℕ} (hs0 : 0 ≤ s) + (hs : s < 1) (hsr : s ≤ r) : + ∃ K : ℝ≥0∞, K ≠ ∞ ∧ ∀ t ∈ Set.Ioc (0 : ℝ) 1, + Rd.modulus volume r 2 (scalingFun m) t ≤ K * ENNReal.ofReal (t ^ s) := + modulus_scalingFun_two_le m le_rfl transferGrowth_two hs0 + (by rw [Nat.cast_ofNat, two_sub_logb_four_four]; exact hs) hsr + +/-- **The `L_p` modulus of the scaling function of order two, `p ≤ 2`**: for every Daubechies +mask of order `N = 2`, every `p ≤ 2`, every real `s` with `0 ≤ s < 1` and every order `r ∈ ℕ` +with `r ≥ s` there is a finite constant `K` with `ω_r(φ, t)_p ≤ K t^s` for all `0 < t ≤ 1` +(`Daubechies.modulus_scalingFun_le_two` with the growth bound `Daubechies.transferGrowth_two`). -/ +theorem modulus_scalingFun_le_two_order_two (m : Mask 2) {p : ℝ≥0∞} (hp2 : p ≤ 2) {s : ℝ} + {r : ℕ} (hs0 : 0 ≤ s) (hs : s < 1) (hsr : s ≤ r) : + ∃ K : ℝ≥0∞, K ≠ ∞ ∧ ∀ t ∈ Set.Ioc (0 : ℝ) 1, + Rd.modulus volume r p (scalingFun m) t ≤ K * ENNReal.ofReal (t ^ s) := + modulus_scalingFun_le_two m le_rfl hp2 transferGrowth_two hs0 + (by rw [Nat.cast_ofNat, two_sub_logb_four_four]; exact hs) hsr + +/-- **The `L²` modulus of the scaling function of order three**: for every Daubechies mask of +order `N = 3`, every real `s` with `0 ≤ s < 3 - log₂ 3 ≈ 1.415` and every order `r ∈ ℕ` with +`r ≥ s` there is a finite constant `K` with `ω_r(φ, t)_2 ≤ K t^s` for all `0 < t ≤ 1`. The +growth bound `T^n 1 ≤ 2 · 9^n` (`Daubechies.transferGrowth_three`) has the exponent +`3 - log₄ 9 = 3 - log₂ 3` (`Daubechies.three_sub_logb_four_nine`), so +`Daubechies.modulus_scalingFun_two_le` applies. -/ +theorem modulus_scalingFun_two_le_order_three (m : Mask 3) {s : ℝ} {r : ℕ} (hs0 : 0 ≤ s) + (hs : s < 3 - Real.logb 2 3) (hsr : s ≤ r) : + ∃ K : ℝ≥0∞, K ≠ ∞ ∧ ∀ t ∈ Set.Ioc (0 : ℝ) 1, + Rd.modulus volume r 2 (scalingFun m) t ≤ K * ENNReal.ofReal (t ^ s) := + modulus_scalingFun_two_le m (by norm_num) transferGrowth_three hs0 + (by rw [Nat.cast_ofNat, three_sub_logb_four_nine]; exact hs) hsr + +/-- **The `L_p` modulus of the scaling function of order three, `p ≤ 2`**: for every Daubechies +mask of order `N = 3`, every `p ≤ 2`, every real `s` with `0 ≤ s < 3 - log₂ 3` and every order +`r ∈ ℕ` with `r ≥ s` there is a finite constant `K` with `ω_r(φ, t)_p ≤ K t^s` for all +`0 < t ≤ 1` (`Daubechies.modulus_scalingFun_le_two` with the growth bound +`Daubechies.transferGrowth_three`). -/ +theorem modulus_scalingFun_le_two_order_three (m : Mask 3) {p : ℝ≥0∞} (hp2 : p ≤ 2) {s : ℝ} + {r : ℕ} (hs0 : 0 ≤ s) (hs : s < 3 - Real.logb 2 3) (hsr : s ≤ r) : + ∃ K : ℝ≥0∞, K ≠ ∞ ∧ ∀ t ∈ Set.Ioc (0 : ℝ) 1, + Rd.modulus volume r p (scalingFun m) t ≤ K * ENNReal.ofReal (t ^ s) := + modulus_scalingFun_le_two m (by norm_num) hp2 transferGrowth_three hs0 + (by rw [Nat.cast_ofNat, three_sub_logb_four_nine]; exact hs) hsr + +end Daubechies diff --git a/LeanPool/FunctionSpaces/Wavelets/Examples/Daubechies/SymbolDecay.lean b/LeanPool/FunctionSpaces/Wavelets/Examples/Daubechies/SymbolDecay.lean new file mode 100644 index 0000000000..b3eeea43c1 --- /dev/null +++ b/LeanPool/FunctionSpaces/Wavelets/Examples/Daubechies/SymbolDecay.lean @@ -0,0 +1,405 @@ +/- +Copyright (c) 2026 Mario Ullrich. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Mario Ullrich +-/ +module + +public import LeanPool.FunctionSpaces.Wavelets.Examples.Daubechies.SymbolProduct +public import LeanPool.FunctionSpaces.Wavelets.Examples.Daubechies.TransferOperator +public import Mathlib.Analysis.SpecialFunctions.JapaneseBracket +public import Mathlib.Analysis.SpecialFunctions.Log.Base +public import Mathlib.MeasureTheory.Function.L2Space + +/- +Modified for Lean Pool: module names and imports adapted. +-/ + +/-! +# The decay of the symbol product + +For a Daubechies mask of order `N` with symbol product `Φ(ξ) = ∏_{j ≥ 0} m_0(ξ/2^(j+1))` +(`Daubechies.symbolProduct`), a growth bound `T^n 1 ≤ C λ^n` for the transfer operator `T` +(`Daubechies.TransferGrowth N λ C`) gives the decay of `Φ`: + +* `∫ (1 + |ξ|)^(2s) |Φ(ξ)|² dξ < ∞` for every real `s < N - log₄ λ` + (`Daubechies.integrable_rpow_mul_normSq`); +* `∫ (1 + |ξ|)^a |Φ(ξ)| dξ < ∞` for every real `a < N - log₄ λ - 1/2` + (`Daubechies.integrable_rpow_mul_norm`), in particular `Φ ∈ L¹` if `N - log₄ λ - 1/2 > 0` + (`Daubechies.integrable_symbolProduct_of_growth`). + +The crude growth bound `λ = 2 C(2N - 1, N)`, `C = 1` (`Daubechies.transferGrowth_crude`) +satisfies `log₄(2 C(2N - 1, N)) < N - 1/2` for `N ≥ 2` +(`Daubechies.logb_four_two_mul_choose_lt`), so the cases `a = 0` and `s = 0` give `Φ ∈ L¹` and +`Φ ∈ L²` for every `N ≥ 2` (`Daubechies.integrable_symbolProduct`, +`Daubechies.memLp_symbolProduct_two`). + +**The annuli.** The dyadic annuli `A_n = {2^n/4 < |ξ| ≤ 2^n/2}`, `n ∈ ℕ` (`Daubechies.annulus`), +together with `[-1/4, 1/4]` cover `ℝ` (`Daubechies.univ_subset_Icc_union_annulus`). For +`ξ ∈ A_n`, `|sinc(πξ)| ≤ 1/(π|ξ|) < 4/(π 2^n)`, and the product formula +`|Φ(ξ)|² = sinc(πξ)^(2N) ∏_{j ≥ 0} P(ξ/2^(j+1))` with the tail bound of +`Daubechies.normSq_symbolProduct_le` gives +`|Φ(ξ)|² ≤ exp(C(2N - 1, N) π²/12) (4/(π 2^n))^(2N) ∏_{j 1` +(Mathlib's `integrable_one_add_norm`). +-/ + +@[expose] public section + +open Filter MeasureTheory +open scoped Real + +namespace Daubechies + +/-! ### The finite dyadic products of `P` -/ + +/-- The finite dyadic products `∏_{j daubFun_nonneg N _ + +/-- The finite dyadic products `ξ ↦ ∏_{j ∏ j ∈ Finset.range n, daubFun N (ξ / 2 ^ (j + 1)) := + continuous_finsetProd _ fun _ _ => (continuous_daubFun N).comp (continuous_id.div_const _) + +/-! ### Growth bounds -/ + +/-- Under a growth bound `T^n 1 ≤ C λ^n`, the integral of `∏_{j prod_daubFun_nonneg N n ξ) + (Eventually.of_forall fun _ hx => hs hx) + _ = ∫ ξ in -(2 ^ n / 2 : ℝ)..2 ^ n / 2, + ∏ j ∈ Finset.range n, daubFun N (ξ / 2 ^ (j + 1)) := by + rw [intervalIntegral.integral_of_le hle, integral_Icc_eq_integral_Ioc] + _ ≤ C * lam ^ n := hg.integral_prod_daubFun_le n + +/-- `log₄(2 C(2N - 1, N)) < N - 1/2` for `N ≥ 2`. It follows from `C(2N - 1, N) < 4^(N - 1)` +(`Daubechies.choose_lt_four_pow`), since `2 · 4^(N - 1) = 4^(N - 1/2)`. -/ +theorem logb_four_two_mul_choose_lt {N : ℕ} (hN : 2 ≤ N) : + Real.logb 4 (2 * ((2 * N - 1).choose N : ℝ)) < N - 1 / 2 := by + have hC : ((2 * N - 1).choose N : ℝ) < 4 ^ (N - 1) := by + exact_mod_cast choose_lt_four_pow hN + have hpos : (0 : ℝ) < 2 * ((2 * N - 1).choose N : ℝ) := by + have := Nat.choose_pos (show N ≤ 2 * N - 1 by omega) + positivity + have h4 : (4 : ℝ) ^ ((N : ℝ) - 1 / 2) = 2 * 4 ^ (N - 1) := by + have hN' : (N : ℝ) - 1 / 2 = ((N - 1 : ℕ) : ℝ) + 1 / 2 := by + rw [Nat.cast_sub (by omega)] + ring + have h2 : (4 : ℝ) ^ (1 / 2 : ℝ) = 2 := by + rw [show (4 : ℝ) = 2 ^ (2 : ℝ) by norm_num, ← Real.rpow_mul (by norm_num)] + norm_num + rw [hN', Real.rpow_add (by norm_num), Real.rpow_natCast, h2, mul_comm] + rw [Real.logb_lt_iff_lt_rpow (by norm_num) hpos, h4] + linarith + +/-- If `λ > 0` and `s < N - log₄ λ`, then `2^(2s) λ < 4^N`: the hypothesis says +`log₄ λ < N - s`, that is `λ < 4^(N - s) = 4^N/4^s`, and `2^(2s) = 4^s`. -/ +theorem two_rpow_two_mul_mul_lt {N : ℕ} {lam s : ℝ} (hlam : 0 < lam) + (hs : s < N - Real.logb 4 lam) : (2 : ℝ) ^ (2 * s) * lam < 4 ^ N := by + have h : Real.logb 4 lam < N - s := by linarith + rw [Real.logb_lt_iff_lt_rpow (by norm_num) hlam, Real.rpow_sub (by norm_num), + Real.rpow_natCast, lt_div_iff₀ (by positivity)] at h + rw [Real.rpow_mul (by norm_num), show (2 : ℝ) ^ (2 : ℝ) = 4 by norm_num] + linarith + +/-! ### The dyadic annuli -/ + +/-- **The dyadic annulus** `A_n = {ξ ∈ ℝ : 2^n/4 < |ξ| ≤ 2^n/2}` for `n ∈ ℕ`. The annuli +`A_0, A_1, …` cover `{|ξ| > 1/4}` (`Daubechies.exists_mem_annulus`). -/ +def annulus (n : ℕ) : Set ℝ := {ξ | 2 ^ n / 4 < |ξ| ∧ |ξ| ≤ 2 ^ n / 2} + +/-- The annuli are measurable sets. -/ +theorem measurableSet_annulus (n : ℕ) : MeasurableSet (annulus n) := + (measurableSet_lt measurable_const continuous_abs.measurable).inter + (measurableSet_le continuous_abs.measurable measurable_const) + +/-- The annulus `A_n` lies in the interval `[-2^n/2, 2^n/2]`. -/ +theorem annulus_subset_Icc (n : ℕ) : annulus n ⊆ Set.Icc (-(2 ^ n / 2)) (2 ^ n / 2) := + fun _ hξ => abs_le.1 hξ.2 + +/-- **The annuli cover `{|ξ| > 1/4}`**: for `|ξ| > 1/4` the least `n` with `|ξ| ≤ 2^n/2` +satisfies `2^n/4 < |ξ|` (for `n = 0` by hypothesis, for `n ≥ 1` by minimality), so `ξ ∈ A_n`. -/ +theorem exists_mem_annulus {ξ : ℝ} (h : 1 / 4 < |ξ|) : ∃ n : ℕ, ξ ∈ annulus n := by + classical + have hex : ∃ n : ℕ, |ξ| ≤ 2 ^ n / 2 := by + obtain ⟨n, hn⟩ := pow_unbounded_of_one_lt (2 * |ξ|) one_lt_two + exact ⟨n, by linarith⟩ + refine ⟨Nat.find hex, ?_, Nat.find_spec hex⟩ + rcases Nat.eq_zero_or_pos (Nat.find hex) with h0 | hpos + · rw [h0, pow_zero] + exact h + · have hmin := Nat.find_min hex (Nat.sub_lt hpos one_pos) + rw [not_le] at hmin + have h2 : (2 : ℝ) ^ Nat.find hex = 2 * 2 ^ (Nat.find hex - 1) := by + rw [← pow_succ'] + congr 1 + omega + rw [h2] + linarith + +/-- **The covering of `ℝ`**: every real `ξ` lies in `[-1/4, 1/4]` or in one of the annuli. -/ +theorem univ_subset_Icc_union_annulus : + Set.univ ⊆ Set.Icc (-(1 / 4)) (1 / 4) ∪ ⋃ n, annulus n := fun ξ _ => by + rcases le_or_gt |ξ| (1 / 4) with h | h + · exact Or.inl (abs_le.1 h) + · exact Or.inr (Set.mem_iUnion.2 (exists_mem_annulus h)) + +/-- **Integrability from geometric decay on the annuli**: a continuous `f : ℝ → E` with +`∫_{A_n} ‖f‖ ≤ M r^n` for every `n`, where `0 ≤ r < 1`, is integrable on `ℝ`. On `[-1/4, 1/4]` it +is integrable as a continuous function on a compact interval, on `⋃_n A_n` because the integrals +over the annuli are summable (Mathlib's `integrableOn_iUnion_of_summable_integral_norm`), and +these two sets cover `ℝ`. -/ +theorem integrable_of_integral_annulus_le {E : Type*} [NormedAddCommGroup E] {f : ℝ → E} + (hf : Continuous f) {M r : ℝ} (hr0 : 0 ≤ r) (hr1 : r < 1) + (h : ∀ n : ℕ, ∫ ξ in annulus n, ‖f ξ‖ ≤ M * r ^ n) : Integrable f := by + have h1 : IntegrableOn f (Set.Icc (-(1 / 4)) (1 / 4)) := hf.integrableOn_Icc + have h2 : IntegrableOn f (⋃ n, annulus n) := + integrableOn_iUnion_of_summable_integral_norm + (fun n => hf.integrableOn_Icc.mono_set (annulus_subset_Icc n)) + (Summable.of_nonneg_of_le (fun n => integral_nonneg fun _ => norm_nonneg _) h + ((summable_geometric_of_lt_one hr0 hr1).mul_left M)) + exact integrableOn_univ.1 ((h1.union h2).mono_set univ_subset_Icc_union_annulus) + +/-! ### The symbol product on the annuli -/ + +/-- `|sinc x| ≤ 1/|x|` for `x ≠ 0`, since `sinc x = sin x / x` and `|sin x| ≤ 1`. Mathlib's +`Real.sinc_le_inv_abs` is the one-sided bound `sinc x ≤ 1/|x|`. -/ +theorem abs_sinc_le_inv_abs {x : ℝ} (hx : x ≠ 0) : |Real.sinc x| ≤ |x|⁻¹ := by + rw [Real.sinc_of_ne_zero hx, abs_div, div_eq_mul_inv] + exact mul_le_of_le_one_left (inv_nonneg.2 (abs_nonneg x)) (Real.abs_sin_le_one x) + +/-- On the annulus `A_n`: `sinc(πξ)^(2N) ≤ (4/(π 2^n))^(2N)`, since `|sinc(πξ)| ≤ 1/(π|ξ|)` and +`π|ξ| > π 2^n/4`. -/ +theorem sinc_pow_le_of_mem_annulus (N : ℕ) {n : ℕ} {ξ : ℝ} (hξ : ξ ∈ annulus n) : + Real.sinc (π * ξ) ^ (2 * N) ≤ (4 / (π * 2 ^ n)) ^ (2 * N) := by + have hξ0 : 0 < |ξ| := lt_of_le_of_lt (by positivity) hξ.1 + have h1 : |Real.sinc (π * ξ)| ≤ 4 / (π * 2 ^ n) := by + refine (abs_sinc_le_inv_abs (mul_ne_zero Real.pi_ne_zero (abs_pos.1 hξ0))).trans ?_ + rw [abs_mul, abs_of_pos Real.pi_pos] + calc (π * |ξ|)⁻¹ ≤ (π * (2 ^ n / 4))⁻¹ := by + gcongr + exact hξ.1.le + _ = 4 / (π * 2 ^ n) := by field_simp + rw [← (even_two_mul N).pow_abs] + exact pow_le_pow_left₀ (abs_nonneg _) h1 _ + +/-- **The pointwise bound on the annuli**: for `ξ ∈ A_n`, +`|Φ(ξ)|² ≤ exp(C(2N - 1, N) π²/12) (4/(π 2^n))^(2N) ∏_{j ‖symbolProduct m ξ‖ ^ 2 := + (continuous_symbolProduct m).norm.pow 2 + have hK : 0 ≤ Real.exp (((2 * N - 1).choose N : ℝ) * π ^ 2 / 12) * + (4 / (π * 2 ^ n)) ^ (2 * N) := by positivity + calc ∫ ξ in annulus n, ‖symbolProduct m ξ‖ ^ 2 + ≤ ∫ ξ in annulus n, Real.exp (((2 * N - 1).choose N : ℝ) * π ^ 2 / 12) * + (4 / (π * 2 ^ n)) ^ (2 * N) * ∏ j ∈ Finset.range n, daubFun N (ξ / 2 ^ (j + 1)) := + setIntegral_mono_on (hc.integrableOn_Icc.mono_set (annulus_subset_Icc n)) + ((continuous_const.mul (continuous_prod_daubFun N n)).integrableOn_Icc.mono_set + (annulus_subset_Icc n)) + (measurableSet_annulus n) fun ξ hξ => normSq_symbolProduct_le_of_mem_annulus m hξ + _ = Real.exp (((2 * N - 1).choose N : ℝ) * π ^ 2 / 12) * (4 / (π * 2 ^ n)) ^ (2 * N) * + ∫ ξ in annulus n, ∏ j ∈ Finset.range n, daubFun N (ξ / 2 ^ (j + 1)) := + integral_const_mul _ _ + _ ≤ Real.exp (((2 * N - 1).choose N : ℝ) * π ^ 2 / 12) * (4 / (π * 2 ^ n)) ^ (2 * N) * + (C * lam ^ n) := + mul_le_mul_of_nonneg_left (hg.setIntegral_prod_daubFun_le n (annulus_subset_Icc n)) hK + +/-! ### Weights -/ + +/-- The weight `ξ ↦ (1 + |ξ|)^t` is continuous for every real `t`, since `1 + |ξ| > 0`. -/ +theorem continuous_one_add_abs_rpow (t : ℝ) : Continuous fun ξ : ℝ => (1 + |ξ|) ^ t := + (continuous_const.add continuous_abs).rpow_const fun ξ => + Or.inl (by positivity : (0 : ℝ) < 1 + |ξ|).ne' + +/-- **Comparable bases give comparable powers**: if `y > 0` and `y/4 ≤ x ≤ 4y`, then +`x^t ≤ 4^|t| y^t` for every real exponent `t` (for `t ≥ 0` from `x ≤ 4y`, for `t ≤ 0` from +`y/4 ≤ x`). -/ +theorem rpow_le_four_rpow_abs_mul {x y t : ℝ} (hy : 0 < y) (h1 : y / 4 ≤ x) (h2 : x ≤ 4 * y) : + x ^ t ≤ 4 ^ |t| * y ^ t := by + have hx : 0 < x := lt_of_lt_of_le (by positivity) h1 + rcases le_total 0 t with ht | ht + · rw [abs_of_nonneg ht, ← Real.mul_rpow (by norm_num) hy.le] + exact Real.rpow_le_rpow hx.le h2 ht + · rw [abs_of_nonpos ht, Real.rpow_neg (by norm_num), ← div_eq_inv_mul, + ← Real.div_rpow hy.le (by norm_num)] + exact Real.rpow_le_rpow_of_nonpos (by positivity) h1 ht + +/-- **The weight on the annuli**: for `ξ ∈ A_n` and every real `t`, +`(1 + |ξ|)^t ≤ 4^|t| (2^t)^n`, since `2^n/4 ≤ 1 + |ξ| ≤ 4 · 2^n` +(`Daubechies.rpow_le_four_rpow_abs_mul`). -/ +theorem one_add_abs_rpow_le_of_mem_annulus (t : ℝ) {n : ℕ} {ξ : ℝ} (hξ : ξ ∈ annulus n) : + (1 + |ξ|) ^ t ≤ 4 ^ |t| * ((2 : ℝ) ^ t) ^ n := by + rw [Real.rpow_pow_comm (by norm_num)] + have h1 : (1 : ℝ) ≤ 2 ^ n := one_le_pow₀ one_le_two + refine rpow_le_four_rpow_abs_mul (by positivity) ?_ ?_ + · linarith [hξ.1] + · linarith [hξ.2] + +/-- `(4/(π 2^n))^(2N) = (4/π)^(2N) / (4^N)^n`, since `(2^n)^(2N) = 2^(2Nn) = (4^N)^n`. -/ +theorem four_div_pi_mul_two_pow_pow (N n : ℕ) : + (4 / (π * 2 ^ n)) ^ (2 * N) = (4 / π) ^ (2 * N) / ((4 : ℝ) ^ N) ^ n := by + have h : ((2 : ℝ) ^ n) ^ (2 * N) = ((4 : ℝ) ^ N) ^ n := by + rw [← pow_mul, ← pow_mul, show (4 : ℝ) = 2 ^ 2 by norm_num, ← pow_mul] + ring + rw [div_mul_eq_div_div, div_pow, h] + +/-- `x^a c ≤ x^(2(a - b)) + x^(2b) c²` for `x > 0`, `c ≥ 0` and all real `a`, `b`: with +`u = x^(a - b)` and `v = x^b c`, `x^a c = uv ≤ 2uv ≤ u² + v²`. -/ +theorem rpow_mul_le_rpow_add_rpow_mul_sq {x c : ℝ} (hx : 0 < x) (hc : 0 ≤ c) (a b : ℝ) : + x ^ a * c ≤ x ^ (2 * (a - b)) + x ^ (2 * b) * c ^ 2 := by + have h1 : x ^ a * c = x ^ (a - b) * (x ^ b * c) := by + rw [← mul_assoc, ← Real.rpow_add hx, sub_add_cancel] + have h2 : x ^ (2 * (a - b)) = (x ^ (a - b)) ^ 2 := by + rw [mul_comm, Real.rpow_mul hx.le, Real.rpow_two] + have h3 : x ^ (2 * b) * c ^ 2 = (x ^ b * c) ^ 2 := by + rw [mul_pow, mul_comm 2 b, Real.rpow_mul hx.le, Real.rpow_two] + rw [h1, h2, h3] + have hu : 0 ≤ x ^ (a - b) := by positivity + have hv : 0 ≤ x ^ b * c := by positivity + nlinarith [two_mul_le_add_sq (x ^ (a - b)) (x ^ b * c), mul_nonneg hu hv] + +/-! ### Decay of the symbol product -/ + +/-- **The weighted `L²` bound on the symbol product**: under a growth bound `T^n 1 ≤ C λ^n`, the +function `ξ ↦ (1 + |ξ|)^(2s) |Φ(ξ)|²` is integrable for every real `s < N - log₄ λ`. On the +annulus `A_n` the weight is at most `4^|2s| 2^(2sn)` +(`Daubechies.one_add_abs_rpow_le_of_mem_annulus`) and +`∫_{A_n} |Φ|² ≤ exp(C(2N - 1, N) π²/12) (4/π)^(2N) C (λ/4^N)^n` +(`Daubechies.integral_annulus_normSq_le`), so the integrals over the annuli decay geometrically +with ratio `2^(2s) λ/4^N < 1` (`Daubechies.two_rpow_two_mul_mul_lt`, +`Daubechies.integrable_of_integral_annulus_le`). -/ +theorem integrable_rpow_mul_normSq {N : ℕ} (m : Mask N) {lam C s : ℝ} + (hg : TransferGrowth N lam C) (hs : s < N - Real.logb 4 lam) : + Integrable (fun ξ => (1 + |ξ|) ^ (2 * s) * ‖symbolProduct m ξ‖ ^ 2) := by + have hc : Continuous fun ξ => ‖symbolProduct m ξ‖ ^ 2 := + (continuous_symbolProduct m).norm.pow 2 + have hw := continuous_one_add_abs_rpow (2 * s) + have hr : (2 : ℝ) ^ (2 * s) * lam / 4 ^ N < 1 := by + rw [div_lt_one (by positivity)] + exact two_rpow_two_mul_mul_lt hg.1 hs + have hr0 : 0 ≤ (2 : ℝ) ^ (2 * s) * lam / 4 ^ N := + div_nonneg (mul_nonneg (Real.rpow_nonneg zero_le_two _) hg.1.le) (by positivity) + refine integrable_of_integral_annulus_le (hw.mul hc) + (M := 4 ^ |2 * s| * (Real.exp (((2 * N - 1).choose N : ℝ) * π ^ 2 / 12) * + (4 / π) ^ (2 * N) * C)) hr0 hr fun n => ?_ + calc ∫ ξ in annulus n, ‖(1 + |ξ|) ^ (2 * s) * ‖symbolProduct m ξ‖ ^ 2‖ + = ∫ ξ in annulus n, (1 + |ξ|) ^ (2 * s) * ‖symbolProduct m ξ‖ ^ 2 := by + refine integral_congr_ae (Eventually.of_forall fun ξ => ?_) + exact Real.norm_of_nonneg (by positivity) + _ ≤ ∫ ξ in annulus n, 4 ^ |2 * s| * ((2 : ℝ) ^ (2 * s)) ^ n * ‖symbolProduct m ξ‖ ^ 2 := + setIntegral_mono_on ((hw.mul hc).integrableOn_Icc.mono_set (annulus_subset_Icc n)) + ((continuous_const.mul hc).integrableOn_Icc.mono_set (annulus_subset_Icc n)) + (measurableSet_annulus n) fun ξ hξ => mul_le_mul_of_nonneg_right + (one_add_abs_rpow_le_of_mem_annulus _ hξ) (sq_nonneg _) + _ = 4 ^ |2 * s| * ((2 : ℝ) ^ (2 * s)) ^ n * ∫ ξ in annulus n, ‖symbolProduct m ξ‖ ^ 2 := + integral_const_mul _ _ + _ ≤ 4 ^ |2 * s| * ((2 : ℝ) ^ (2 * s)) ^ n * + (Real.exp (((2 * N - 1).choose N : ℝ) * π ^ 2 / 12) * (4 / (π * 2 ^ n)) ^ (2 * N) * + (C * lam ^ n)) := + mul_le_mul_of_nonneg_left (integral_annulus_normSq_le m hg n) (by positivity) + _ = 4 ^ |2 * s| * (Real.exp (((2 * N - 1).choose N : ℝ) * π ^ 2 / 12) * + (4 / π) ^ (2 * N) * C) * ((2 : ℝ) ^ (2 * s) * lam / 4 ^ N) ^ n := by + rw [four_div_pi_mul_two_pow_pow, div_pow ((2 : ℝ) ^ (2 * s) * lam), mul_pow] + ring + +/-- **The weighted `L¹` bound on the symbol product**: under a growth bound `T^n 1 ≤ C λ^n`, the +function `ξ ↦ (1 + |ξ|)^a |Φ(ξ)|` is integrable for every real `a < N - log₄ λ - 1/2`. Choose `b` +with `a + 1/2 < b < N - log₄ λ`; then +`(1 + |ξ|)^a |Φ(ξ)| ≤ (1 + |ξ|)^(-2(b - a)) + (1 + |ξ|)^(2b) |Φ(ξ)|²` +(`Daubechies.rpow_mul_le_rpow_add_rpow_mul_sq`), where the first summand is integrable since +`2(b - a) > 1` (Mathlib's `integrable_one_add_norm`) and the second by +`Daubechies.integrable_rpow_mul_normSq`. -/ +theorem integrable_rpow_mul_norm {N : ℕ} (m : Mask N) {lam C a : ℝ} + (hg : TransferGrowth N lam C) (ha : a < N - Real.logb 4 lam - 1 / 2) : + Integrable (fun ξ => (1 + |ξ|) ^ a * ‖symbolProduct m ξ‖) := by + obtain ⟨b, hb1, hb2⟩ : ∃ b : ℝ, b < N - Real.logb 4 lam ∧ 1 < 2 * (b - a) := + ⟨(a + 1 / 2 + (N - Real.logb 4 lam)) / 2, by linarith, by linarith⟩ + have h1 := integrable_rpow_mul_normSq m hg hb1 + have h2 : Integrable (fun ξ : ℝ => (1 + ‖ξ‖) ^ (-(2 * (b - a)))) := + integrable_one_add_norm (by simpa using hb2) + have hc : Continuous fun ξ => (1 + |ξ|) ^ a * ‖symbolProduct m ξ‖ := + (continuous_one_add_abs_rpow a).mul (continuous_symbolProduct m).norm + refine (h2.add h1).mono' hc.aestronglyMeasurable (Eventually.of_forall fun ξ => ?_) + rw [Real.norm_of_nonneg (by positivity), Pi.add_apply, Real.norm_eq_abs, + show -(2 * (b - a)) = 2 * (a - b) by ring] + exact rpow_mul_le_rpow_add_rpow_mul_sq (by positivity) (norm_nonneg _) a b + +/-- **The symbol product is integrable under a growth bound**: if `T^n 1 ≤ C λ^n` +(`Daubechies.TransferGrowth`) and `N - log₄ λ - 1/2 > 0`, then `Φ` is integrable. This is the case +`a = 0` of the weighted bound `Daubechies.integrable_rpow_mul_norm`. -/ +theorem integrable_symbolProduct_of_growth {N : ℕ} (m : Mask N) {lam C : ℝ} + (hg : TransferGrowth N lam C) (hpos : 0 < N - Real.logb 4 lam - 1 / 2) : + Integrable (symbolProduct m) := by + have h := integrable_rpow_mul_norm m hg (a := 0) hpos + simp only [Real.rpow_zero, one_mul] at h + exact (integrable_norm_iff (continuous_symbolProduct m).aestronglyMeasurable).1 h + +/-- **The symbol product is integrable** for every Daubechies mask of order `N ≥ 2`: the crude +growth bound `T^n 1 ≤ (2 C(2N - 1, N))^n` (`Daubechies.transferGrowth_crude`) satisfies +`log₄(2 C(2N - 1, N)) < N - 1/2` (`Daubechies.logb_four_two_mul_choose_lt`), so +`Daubechies.integrable_symbolProduct_of_growth` applies. -/ +theorem integrable_symbolProduct {N : ℕ} (m : Mask N) (hN : 2 ≤ N) : + Integrable (symbolProduct m) := + integrable_symbolProduct_of_growth m (transferGrowth_crude N) + (by linarith [logb_four_two_mul_choose_lt hN]) + +/-- **The symbol product is square integrable** for every Daubechies mask of order `N ≥ 2`: the +case `s = 0` of `Daubechies.integrable_rpow_mul_normSq` with the crude growth bound, since +`log₄(2 C(2N - 1, N)) < N - 1/2 < N`. -/ +theorem memLp_symbolProduct_two {N : ℕ} (m : Mask N) (hN : 2 ≤ N) : + MemLp (symbolProduct m) 2 := by + have h := integrable_rpow_mul_normSq m (transferGrowth_crude N) (s := 0) + (by linarith [logb_four_two_mul_choose_lt hN]) + simp only [mul_zero, Real.rpow_zero, one_mul] at h + exact (memLp_two_iff_integrable_sq_norm (continuous_symbolProduct m).aestronglyMeasurable).2 h + +end Daubechies diff --git a/LeanPool/FunctionSpaces/Wavelets/Examples/Daubechies/SymbolProduct.lean b/LeanPool/FunctionSpaces/Wavelets/Examples/Daubechies/SymbolProduct.lean new file mode 100644 index 0000000000..7e4e193d7d --- /dev/null +++ b/LeanPool/FunctionSpaces/Wavelets/Examples/Daubechies/SymbolProduct.lean @@ -0,0 +1,465 @@ +/- +Copyright (c) 2026 Mario Ullrich. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Mario Ullrich +-/ +module + +public import LeanPool.FunctionSpaces.Wavelets.Examples.Daubechies.Mask +public import Mathlib.Analysis.Normed.Module.MultipliableUniformlyOn +public import Mathlib.Analysis.SpecialFunctions.Trigonometric.Sinc +public import Mathlib.Analysis.SpecificLimits.Basic +public import Mathlib.Topology.Algebra.InfiniteSum.Field +public import Mathlib.Topology.UniformSpace.UniformApproximation + +/- +Modified for Lean Pool: module names and imports adapted. +-/ + +/-! +# The symbol product + +For a Daubechies mask of order `N` with symbol `m_0` (`Daubechies.symbol`) the +**symbol product** is the infinite product + +`Φ(ξ) = ∏_{j ≥ 0} m_0(ξ/2^(j+1))` (`Daubechies.symbolProduct`). + +The scaling function of the mask is the inverse Fourier transform of `Φ`. + +**Convergence.** Since `|m_0(η) - 1| ≤ C|η|` (`Daubechies.norm_symbol_sub_one_le`), the factors +satisfy `|m_0(ξ/2^(j+1)) - 1| ≤ C|ξ|/2^(j+1)`, a summable bound, uniform for `ξ` in a compact +set. Hence the product converges for every `ξ` (`Daubechies.multipliable_symbolProduct`, from +Mathlib's `multipliable_one_add_of_summable`), uniformly on compact sets +(`Daubechies.hasProdUniformlyOn_symbolProduct`), the partial products +`∏_{j 0` on `[-1/2, 1/2]` (`Daubechies.exists_pos_le_norm_symbolProduct`). + +**The modulus.** The cosine product `∏_{j ≥ 0} cos(x/2^(j+1)) = sinc x` (`Daubechies.tprod_cos`) +follows from the identity `sinc(x/2^n) ∏_{j (x / 2 ^ (j + 1)) ^ 2) (x ^ 2 / 3) := by + have h := (hasSum_geometric_of_lt_one (r := 1 / 4) (by norm_num) (by norm_num)).mul_left + (x ^ 2 / 4) + convert h using 1 + · exact funext fun j => sq_div_two_pow_succ x j + · norm_num + ring + +/-! ### The cosine product -/ + +/-- **The doubling formula for `sinc`**: `sinc(y) cos(y) = sinc(2y)` for every real `y`, from +`sin(2y) = 2 sin(y) cos(y)` (Mathlib's `Real.sin_two_mul`); at `y = 0` both sides are `1`. -/ +theorem sinc_mul_cos (y : ℝ) : Real.sinc y * Real.cos y = Real.sinc (2 * y) := by + rcases eq_or_ne y 0 with rfl | hy + · simp + · rw [Real.sinc_of_ne_zero hy, Real.sinc_of_ne_zero (mul_ne_zero two_ne_zero hy), + Real.sin_two_mul] + field_simp + +/-- **The finite cosine product**: `sinc(x/2^n) ∏_{j simp + | succ n ih => + have h2 : 2 * (x / 2 ^ (n + 1)) = x / 2 ^ n := by + rw [pow_succ] + field_simp + calc Real.sinc (x / 2 ^ (n + 1)) * ∏ j ∈ Finset.range (n + 1), Real.cos (x / 2 ^ (j + 1)) + = Real.sinc (x / 2 ^ (n + 1)) * Real.cos (x / 2 ^ (n + 1)) * + ∏ j ∈ Finset.range n, Real.cos (x / 2 ^ (j + 1)) := by + rw [Finset.prod_range_succ] + ring + _ = Real.sinc x := by rw [sinc_mul_cos, h2, ih] + +/-- `|cos(y) - 1| ≤ y²/2` for every real `y`, from `1 - y²/2 ≤ cos(y) ≤ 1` (Mathlib's +`Real.one_sub_sq_div_two_le_cos`). -/ +theorem norm_cos_sub_one_le (y : ℝ) : ‖Real.cos y - 1‖ ≤ y ^ 2 / 2 := by + rw [Real.norm_eq_abs, abs_sub_comm, abs_of_nonneg (sub_nonneg.2 (Real.cos_le_one y))] + linarith [Real.one_sub_sq_div_two_le_cos (x := y)] + +/-- The infinite product `∏_{j ≥ 0} cos(x/2^(j+1))` converges: its factors are `1 + a_j` with +`|a_j| ≤ (x/2^(j+1))²/2`, a summable bound (Mathlib's `Real.multipliable_one_add_of_summable`). -/ +theorem multipliable_cos_div_two_pow (x : ℝ) : + Multipliable (fun j : ℕ => Real.cos (x / 2 ^ (j + 1))) := by + have hs : Summable (fun j : ℕ => Real.cos (x / 2 ^ (j + 1)) - 1) := + Summable.of_norm_bounded ((hasSum_sq_div_two_pow x).summable.div_const 2) + fun _ => norm_cos_sub_one_le _ + simpa only [add_sub_cancel] using Real.multipliable_one_add_of_summable hs + +/-- **The cosine product as a `HasProd`**: `∏_{j ≥ 0} cos(x/2^(j+1)) = sinc(x)`. The partial +products `p_n` satisfy `sinc(x/2^n) p_n = sinc(x)` +(`Daubechies.sinc_div_two_pow_mul_prod_cos`); since `sinc(x/2^n) → sinc(0) = 1` and `p_n` +converges, the limit of `p_n` is `sinc(x)`. -/ +theorem hasProd_cos_div_two_pow (x : ℝ) : + HasProd (fun j : ℕ => Real.cos (x / 2 ^ (j + 1))) (Real.sinc x) := by + have hm := multipliable_cos_div_two_pow x + have h0 : Tendsto (fun n : ℕ => x / 2 ^ n) atTop (𝓝 0) := + tendsto_const_nhds.div_atTop (tendsto_pow_atTop_atTop_of_one_lt one_lt_two) + have h1 : Tendsto (fun n : ℕ => Real.sinc (x / 2 ^ n)) atTop (𝓝 1) := by + simpa [Function.comp_def, Real.sinc_zero] using (Real.continuous_sinc.tendsto 0).comp h0 + have h2 := hm.tendsto_prod_tprod_nat + have h3 := h1.mul h2 + simp only [sinc_div_two_pow_mul_prod_cos, one_mul] at h3 + have h4 : Real.sinc x = ∏' j : ℕ, Real.cos (x / 2 ^ (j + 1)) := + tendsto_nhds_unique tendsto_const_nhds h3 + rw [h4] + exact hm.hasProd + +/-- **The cosine product**: `∏_{j ≥ 0} cos(x/2^(j+1)) = sinc(x)` for every real `x`, where +`sinc(x) = sin(x)/x` for `x ≠ 0` and `sinc(0) = 1`. -/ +theorem tprod_cos (x : ℝ) : ∏' j : ℕ, Real.cos (x / 2 ^ (j + 1)) = Real.sinc x := + (hasProd_cos_div_two_pow x).tprod_eq + +/-! ### The real product of the trigonometric Daubechies polynomial -/ + +/-- **The product of the trigonometric Daubechies polynomial converges**: +`∏_{j ≥ 0} P(x/2^(j+1))` is multipliable for every `N` and every real `x`, where +`P = Daubechies.daubFun N`. For `N ≥ 1` the factors are `1 + a_j` with +`0 ≤ a_j ≤ C(2N - 1, N) π² (x/2^(j+1))²` (`Daubechies.one_le_daubFun`, `Daubechies.daubFun_le`), +a summable bound; for `N = 0` every factor is `0`. -/ +theorem multipliable_daubFun (N : ℕ) (x : ℝ) : + Multipliable (fun j : ℕ => daubFun N (x / 2 ^ (j + 1))) := by + rcases Nat.eq_zero_or_pos N with rfl | hN + · exact multipliable_of_exists_eq_zero ⟨0, by simp [daubFun, daubPoly_zero]⟩ + · have hs : Summable (fun j : ℕ => daubFun N (x / 2 ^ (j + 1)) - 1) := by + refine Summable.of_nonneg_of_le (fun _ => sub_nonneg.2 (one_le_daubFun hN _)) + (fun j => ?_) ((hasSum_sq_div_two_pow x).summable.mul_left + (((2 * N - 1).choose N : ℝ) * π ^ 2)) + have := daubFun_le N (x / 2 ^ (j + 1)) + linarith + simpa only [add_sub_cancel] using Real.multipliable_one_add_of_summable hs + +/-- The tail `∏_{j ≥ 0} P(ξ/2^(n+j+1))` of the product of the trigonometric Daubechies +polynomial converges: it is the full product at the point `ξ/2^n`. -/ +theorem multipliable_daubFun_shift (N n : ℕ) (ξ : ℝ) : + Multipliable (fun j : ℕ => daubFun N (ξ / 2 ^ (n + j + 1))) := by + simpa only [div_two_pow_add_succ] using multipliable_daubFun N (ξ / 2 ^ n) + +/-- The product of the trigonometric Daubechies polynomial is nonnegative: +`∏_{j ≥ 0} P(x/2^(j+1)) ≥ 0` for every `N` and every real `x`, since `P ≥ 0` +(`Daubechies.daubFun_nonneg`, Mathlib's `tprod_nonneg`). -/ +theorem tprod_daubFun_nonneg (N : ℕ) (x : ℝ) : 0 ≤ ∏' j : ℕ, daubFun N (x / 2 ^ (j + 1)) := + tprod_nonneg fun _ => daubFun_nonneg N _ + +/-- **The split into the first `n` factors and the tail**: +`∏_{j ≥ 0} P(ξ/2^(j+1)) = ∏_{j daubFun N (ξ / 2 ^ (j + n + 1))) := by + simpa only [add_comm _ n] using multipliable_daubFun_shift N n ξ + rw [← Multipliable.prod_mul_tprod_nat_mul' (f := fun j : ℕ => daubFun N (ξ / 2 ^ (j + 1))) hm] + simp only [add_comm _ n] + +/-- **The bound on the product of the trigonometric Daubechies polynomial**: +`∏_{j ≥ 0} P(x/2^(j+1)) ≤ exp(C(2N - 1, N) π² x²/3)` for every `N` and every real `x`. Each +factor is at most `1 + C(2N - 1, N) π² (x/2^(j+1))² ≤ exp(C(2N - 1, N) π² (x/2^(j+1))²)` +(`Daubechies.daubFun_le`, Mathlib's `Real.prod_one_add_le_exp_sum`), and +`∑_{j ≥ 0} (x/2^(j+1))² = x²/3`. -/ +theorem tprod_daubFun_le (N : ℕ) (x : ℝ) : + ∏' j : ℕ, daubFun N (x / 2 ^ (j + 1)) ≤ + Real.exp (((2 * N - 1).choose N : ℝ) * π ^ 2 * (x ^ 2 / 3)) := by + refine (multipliable_daubFun N x).tprod_le_of_prod_range_le fun k => ?_ + calc ∏ j ∈ Finset.range k, daubFun N (x / 2 ^ (j + 1)) + ≤ ∏ j ∈ Finset.range k, + (1 + ((2 * N - 1).choose N : ℝ) * π ^ 2 * (x / 2 ^ (j + 1)) ^ 2) := + Finset.prod_le_prod₀ (fun _ _ => daubFun_nonneg N _) (fun _ _ => daubFun_le N _) + _ ≤ Real.exp (∑ j ∈ Finset.range k, + ((2 * N - 1).choose N : ℝ) * π ^ 2 * (x / 2 ^ (j + 1)) ^ 2) := + Real.prod_one_add_le_exp_sum _ fun _ => by positivity + _ ≤ Real.exp (((2 * N - 1).choose N : ℝ) * π ^ 2 * (x ^ 2 / 3)) := by + rw [← Finset.mul_sum] + gcongr + exact sum_le_hasSum _ (fun _ _ => sq_nonneg _) (hasSum_sq_div_two_pow x) + +/-- **The tail bound**: for `|ξ| ≤ 2^n/2`, +`∏_{j ≥ 0} P(ξ/2^(n+j+1)) ≤ exp(C(2N - 1, N) π²/12)`. The tail is the full product at +`x = ξ/2^n`, and `|x| ≤ 1/2` gives `x²/3 ≤ 1/12` in `Daubechies.tprod_daubFun_le`. -/ +theorem tprod_daubFun_shift_le (N : ℕ) {n : ℕ} {ξ : ℝ} (h : |ξ| ≤ 2 ^ n / 2) : + ∏' j : ℕ, daubFun N (ξ / 2 ^ (n + j + 1)) ≤ + Real.exp (((2 * N - 1).choose N : ℝ) * π ^ 2 / 12) := by + simp only [div_two_pow_add_succ] + refine (tprod_daubFun_le N (ξ / 2 ^ n)).trans (Real.exp_le_exp.2 ?_) + have h1 : |ξ / 2 ^ n| ≤ 1 / 2 := by + rw [abs_div, abs_of_pos (by positivity : (0 : ℝ) < 2 ^ n), div_le_iff₀ (by positivity)] + linarith + have hx : (ξ / 2 ^ n) ^ 2 ≤ 1 / 4 := by + have := pow_le_pow_left₀ (abs_nonneg _) h1 2 + rw [sq_abs] at this + linarith + have hC : 0 ≤ ((2 * N - 1).choose N : ℝ) * π ^ 2 := by positivity + calc ((2 * N - 1).choose N : ℝ) * π ^ 2 * ((ξ / 2 ^ n) ^ 2 / 3) + ≤ ((2 * N - 1).choose N : ℝ) * π ^ 2 * (1 / 4 / 3) := by gcongr + _ = ((2 * N - 1).choose N : ℝ) * π ^ 2 / 12 := by ring + +/-! ### The symbol product: convergence and continuity -/ + +variable {N : ℕ} (m : Mask N) + +/-- **The symbol product** of a mask: `Φ(ξ) = ∏_{j ≥ 0} m_0(ξ/2^(j+1))`, where `m_0` is the +symbol (`Daubechies.symbol`). The product converges for every `ξ` +(`Daubechies.multipliable_symbolProduct`). -/ +noncomputable def symbolProduct (ξ : ℝ) : ℂ := ∏' j : ℕ, symbol m (ξ / 2 ^ (j + 1)) + +/-- `|m_0(ξ/2^(j+1)) - 1| ≤ (C|ξ|/2)/2^j` with `C = π ∑_k k |c_k|` (`Daubechies.symbolLip`), from +`|m_0(η) - 1| ≤ C|η|`. -/ +theorem norm_symbol_div_two_pow_sub_one_le (ξ : ℝ) (j : ℕ) : + ‖symbol m (ξ / 2 ^ (j + 1)) - 1‖ ≤ symbolLip m * |ξ| / 2 / 2 ^ j := by + calc ‖symbol m (ξ / 2 ^ (j + 1)) - 1‖ ≤ symbolLip m * |ξ / 2 ^ (j + 1)| := + norm_symbol_sub_one_le m _ + _ = symbolLip m * |ξ| / 2 / 2 ^ j := by + rw [abs_div, abs_of_pos (by positivity : (0 : ℝ) < 2 ^ (j + 1)), pow_succ] + ring + +/-- The deviations `|m_0(ξ/2^(j+1)) - 1|` are summable over `j`: they are bounded by the +geometric sequence `(C|ξ|/2)/2^j`. -/ +theorem summable_norm_symbol_sub_one (ξ : ℝ) : + Summable (fun j : ℕ => ‖symbol m (ξ / 2 ^ (j + 1)) - 1‖) := + Summable.of_nonneg_of_le (fun _ => norm_nonneg _) (norm_symbol_div_two_pow_sub_one_le m ξ) + (summable_geometric_two' _) + +/-- **The symbol product converges** for every `ξ`: the factors are `1 + a_j` with +`∑_j |a_j| < ∞` (Mathlib's `multipliable_one_add_of_summable`). -/ +theorem multipliable_symbolProduct (ξ : ℝ) : + Multipliable (fun j : ℕ => symbol m (ξ / 2 ^ (j + 1))) := by + simpa only [add_sub_cancel] using + multipliable_one_add_of_summable (summable_norm_symbol_sub_one m ξ) + +/-- **Uniform convergence on compact sets**: on every compact set `K ⊆ ℝ`, say `K ⊆ [-R, R]`, the +symbol product converges uniformly, since there `|m_0(ξ/2^(j+1)) - 1| ≤ (CR/2)/2^j` (Mathlib's +`Summable.hasProdUniformlyOn_nat_one_add`). -/ +theorem hasProdUniformlyOn_symbolProduct {K : Set ℝ} (hK : IsCompact K) : + HasProdUniformlyOn (fun j ξ => symbol m (ξ / 2 ^ (j + 1))) (symbolProduct m) K := by + obtain ⟨R, hR⟩ := hK.isBounded.exists_norm_le + have h := Summable.hasProdUniformlyOn_nat_one_add (f := fun j ξ => symbol m (ξ / 2 ^ (j + 1)) - 1) + hK (summable_geometric_two' (symbolLip m * R)) + (Eventually.of_forall fun j ξ hξ => (norm_symbol_div_two_pow_sub_one_le m ξ j).trans (by + have := symbolLip_nonneg m + have hξR : |ξ| ≤ R := hR ξ hξ + gcongr)) + (fun _ => (((continuous_symbol m).comp (continuous_id.div_const _)).sub + continuous_const).continuousOn) + simp only [add_sub_cancel] at h + exact h + +/-- **Locally uniform convergence**: the products `∏_{j ∈ s} m_0(ξ/2^(j+1))` over finite sets +`s ⊆ ℕ` converge to `Φ(ξ)` as `s` grows, locally uniformly in `ξ ∈ ℝ`: uniformly on every compact +set (`Daubechies.hasProdUniformlyOn_symbolProduct`, Mathlib's +`hasProdLocallyUniformly_of_forall_compact`). -/ +theorem hasProdLocallyUniformly_symbolProduct : + HasProdLocallyUniformly (fun j ξ => symbol m (ξ / 2 ^ (j + 1))) (symbolProduct m) := + hasProdLocallyUniformly_of_forall_compact fun _ hK => hasProdUniformlyOn_symbolProduct m hK + +/-- **The partial products converge locally uniformly**: +`∏_{j ∏ j ∈ Finset.range n, symbol m (ξ / 2 ^ (j + 1))) + (symbolProduct m) atTop := + (hasProdLocallyUniformly_symbolProduct m).tendstoLocallyUniformly_finsetRange + +/-- **The partial products converge pointwise**: `∏_{j ∏ j ∈ Finset.range n, symbol m (ξ / 2 ^ (j + 1))) atTop + (𝓝 (symbolProduct m ξ)) := + (multipliable_symbolProduct m ξ).tendsto_prod_tprod_nat + +/-- **The symbol product is continuous**, as a locally uniform limit of the continuous partial +products. -/ +theorem continuous_symbolProduct : Continuous (symbolProduct m) := + (tendstoLocallyUniformly_prod_symbol m).continuous (Frequently.of_forall fun _ => + continuous_finsetProd _ fun _ _ => (continuous_symbol m).comp (continuous_id.div_const _)) + +/-! ### Algebraic properties of the symbol product -/ + +/-- `Φ(0) = 1`: every factor is `m_0(0) = 1`. -/ +theorem symbolProduct_zero : symbolProduct m 0 = 1 := by + simp [symbolProduct, symbol_zero] + +/-- The partial products have modulus at most `1`: +`|∏_{j norm_nonneg _) fun _ _ => norm_symbol_le_one m _ + +/-- **`|Φ| ≤ 1`**: the modulus of the product is the product of the moduli +(Mathlib's `Multipliable.norm_tprod`), whose partial products are at most `1`. -/ +theorem norm_symbolProduct_le_one (ξ : ℝ) : ‖symbolProduct m ξ‖ ≤ 1 := by + rw [symbolProduct, (multipliable_symbolProduct m ξ).norm_tprod] + refine (multipliable_symbolProduct m ξ).norm.tprod_le_of_prod_range_le fun n => ?_ + rw [← norm_prod] + exact norm_prod_symbol_le_one m ξ n + +/-- **Splitting off the first factor of a partial product**: +`∏_{j ?_ + rw [div_div, ← pow_succ'] + +/-- **Splitting off the first `n` factors**: +`Φ(ξ) = ∏_{j by + rw [add_comm j n] + exact div_two_pow_add_succ ξ n j + have hm : Multipliable (fun j : ℕ => symbol m (ξ / 2 ^ (j + n + 1))) := by + simpa only [h] using multipliable_symbolProduct m (ξ / 2 ^ n) + rw [symbolProduct, ← Multipliable.prod_mul_tprod_nat_mul' + (f := fun j : ℕ => symbol m (ξ / 2 ^ (j + 1))) hm, symbolProduct] + simp only [h] + +/-- **The refinement identity** `Φ(2ξ) = m_0(ξ) Φ(ξ)`: the case `n = 1` of +`Daubechies.symbolProduct_eq_prod_mul` at the point `2ξ`. -/ +theorem symbolProduct_two_mul (ξ : ℝ) : + symbolProduct m (2 * ξ) = symbol m ξ * symbolProduct m ξ := by + rw [symbolProduct_eq_prod_mul m (2 * ξ) 1, Finset.prod_range_one, zero_add, pow_one, + mul_div_cancel_left₀ ξ two_ne_zero] + +/-- **`Φ(-ξ) = conj Φ(ξ)`**: every factor satisfies `m_0(-η) = conj m_0(η)` +(`Daubechies.symbol_neg`), and complex conjugation is a continuous multiplicative map. -/ +theorem symbolProduct_neg (ξ : ℝ) : symbolProduct m (-ξ) = conj (symbolProduct m ξ) := by + have h := (multipliable_symbolProduct m ξ).hasProd.map (starRingEnd ℂ) Complex.continuous_conj + rw [symbolProduct, symbolProduct, ← h.tprod_eq] + congr 1 + funext j + simp only [Function.comp_apply, neg_div, symbol_neg] + +/-- **`Φ` has no zeros on `[-1/2, 1/2]`**: for `|ξ| ≤ 1/2` every argument `ξ/2^(j+1)` has modulus +`≤ 1/4 < 1/2`, so no factor vanishes (`Daubechies.symbol_ne_zero`), and a convergent product of +nonzero factors `1 + a_j` with `∑_j |a_j| < ∞` is nonzero (Mathlib's +`tprod_one_add_ne_zero_of_summable`). -/ +theorem symbolProduct_ne_zero {ξ : ℝ} (h : |ξ| ≤ 1 / 2) : symbolProduct m ξ ≠ 0 := by + have h1 : ∀ j : ℕ, 1 + (symbol m (ξ / 2 ^ (j + 1)) - 1) ≠ 0 := fun j => by + rw [add_sub_cancel] + apply symbol_ne_zero + have h2 : (2 : ℝ) ≤ 2 ^ (j + 1) := le_self_pow₀ one_le_two (Nat.succ_ne_zero j) + rw [abs_div, abs_of_pos (by positivity : (0 : ℝ) < 2 ^ (j + 1)), div_lt_iff₀ (by positivity)] + linarith + have h3 := tprod_one_add_ne_zero_of_summable h1 (summable_norm_symbol_sub_one m ξ) + simp only [add_sub_cancel] at h3 + exact h3 + +/-- **`|Φ|` is bounded below on `[-1/2, 1/2]`**: there is `κ > 0` with `κ ≤ |Φ(ξ)|` for all +`|ξ| ≤ 1/2`, namely the minimum of the continuous function `|Φ|` on the compact interval, which is +positive since `Φ` has no zeros there. -/ +theorem exists_pos_le_norm_symbolProduct : + ∃ κ > 0, ∀ ξ : ℝ, |ξ| ≤ 1 / 2 → κ ≤ ‖symbolProduct m ξ‖ := by + obtain ⟨ξ₀, hξ₀, hmin⟩ := (isCompact_Icc (a := -(1 / 2 : ℝ)) (b := 1 / 2)).exists_isMinOn + (Set.nonempty_Icc.2 (by norm_num)) (continuous_symbolProduct m).norm.continuousOn + refine ⟨‖symbolProduct m ξ₀‖, norm_pos_iff.2 (symbolProduct_ne_zero m (abs_le.2 hξ₀)), + fun ξ hξ => ?_⟩ + exact isMinOn_iff.1 hmin ξ (abs_le.1 hξ) + +/-! ### The modulus of the symbol product -/ + +/-- **The squared modulus of the symbol product**: +`|Φ(ξ)|² = sinc(πξ)^(2N) ∏_{j ≥ 0} P(ξ/2^(j+1))`, where `P = Daubechies.daubFun N`. The factors +satisfy `|m_0(η)|² = cos(πη)^(2N) P(η)` (`Daubechies.normSq_symbol`), and +`∏_{j ≥ 0} cos(πξ/2^(j+1)) = sinc(πξ)` (`Daubechies.hasProd_cos_div_two_pow`); both products +converge, so the product of the squared moduli is the product of the two. -/ +theorem normSq_symbolProduct (ξ : ℝ) : + ‖symbolProduct m ξ‖ ^ 2 = + Real.sinc (π * ξ) ^ (2 * N) * ∏' j : ℕ, daubFun N (ξ / 2 ^ (j + 1)) := by + have h1 : HasProd (fun j : ℕ => ‖symbol m (ξ / 2 ^ (j + 1))‖ ^ 2) (‖symbolProduct m ξ‖ ^ 2) := + (multipliable_symbolProduct m ξ).hasProd.norm.pow 2 + have h2 : HasProd + (fun j : ℕ => Real.cos (π * ξ / 2 ^ (j + 1)) ^ (2 * N) * daubFun N (ξ / 2 ^ (j + 1))) + (Real.sinc (π * ξ) ^ (2 * N) * ∏' j : ℕ, daubFun N (ξ / 2 ^ (j + 1))) := + ((hasProd_cos_div_two_pow (π * ξ)).pow (2 * N)).mul (multipliable_daubFun N ξ).hasProd + have h3 : (fun j : ℕ => ‖symbol m (ξ / 2 ^ (j + 1))‖ ^ 2) = + fun j : ℕ => Real.cos (π * ξ / 2 ^ (j + 1)) ^ (2 * N) * daubFun N (ξ / 2 ^ (j + 1)) := by + funext j + rw [normSq_symbol, mul_div_assoc] + rw [h3] at h1 + exact h1.unique h2 + +/-- **The bound on `|Φ|²` by a finite product**: for `|ξ| ≤ 2^n/2`, +`|Φ(ξ)|² ≤ exp(C(2N - 1, N) π²/12) · sinc(πξ)^(2N) ∏_{j daubFun_nonneg N _ + have h3 := tprod_daubFun_shift_le N h + calc Real.sinc (π * ξ) ^ (2 * N) * ((∏ j ∈ Finset.range n, daubFun N (ξ / 2 ^ (j + 1))) * + ∏' j : ℕ, daubFun N (ξ / 2 ^ (n + j + 1))) + = Real.sinc (π * ξ) ^ (2 * N) * (∏ j ∈ Finset.range n, daubFun N (ξ / 2 ^ (j + 1))) * + ∏' j : ℕ, daubFun N (ξ / 2 ^ (n + j + 1)) := by ring + _ ≤ Real.sinc (π * ξ) ^ (2 * N) * (∏ j ∈ Finset.range n, daubFun N (ξ / 2 ^ (j + 1))) * + Real.exp (((2 * N - 1).choose N : ℝ) * π ^ 2 / 12) := by gcongr + _ = Real.exp (((2 * N - 1).choose N : ℝ) * π ^ 2 / 12) * + (Real.sinc (π * ξ) ^ (2 * N) * ∏ j ∈ Finset.range n, daubFun N (ξ / 2 ^ (j + 1))) := by + ring + +end Daubechies diff --git a/LeanPool/FunctionSpaces/Wavelets/Examples/Daubechies/TransferExamples.lean b/LeanPool/FunctionSpaces/Wavelets/Examples/Daubechies/TransferExamples.lean new file mode 100644 index 0000000000..fdb2c12401 --- /dev/null +++ b/LeanPool/FunctionSpaces/Wavelets/Examples/Daubechies/TransferExamples.lean @@ -0,0 +1,240 @@ +/- +Copyright (c) 2026 Mario Ullrich. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Mario Ullrich +-/ +module + +public import LeanPool.FunctionSpaces.Wavelets.Examples.Daubechies.TransferOperator +public import Mathlib.Analysis.SpecialFunctions.Log.Base + +/- +Modified for Lean Pool: module names and imports adapted. +-/ + +/-! +# The transfer operator of orders two and three + +For `N = 2` and `N = 3` the transfer operator `T = Daubechies.transfer N`, +`(T g)(ξ) = P(ξ/2) g(ξ/2) + P((ξ + 1)/2) g((ξ + 1)/2)` with `P(ξ) = P_N(sin²(πξ))`, has explicit +eigenfunctions among the trigonometric polynomials. They give the growth of the iterates `T^n 1` +exactly: `T^n 1 = 4^n` for `N = 2`, and `T^n 1` is a combination of `9^n` and `(-4)^n` for +`N = 3`. Hence `Daubechies.TransferGrowth 2 4 1` and `Daubechies.TransferGrowth 3 9 2` hold, and +the exponent `N - log₄ λ` of the decay estimates of the symbol product equals `2 - log₄ 4 = 1` +for `N = 2` and `3 - log₄ 9 = 3 - log₂ 3 ≈ 1.415` for `N = 3`. + +**Linearity and eigenfunctions.** `T` is linear, hence so are its iterates +(`Daubechies.iterate_transfer_add`, `Daubechies.iterate_transfer_smul`), and an eigenfunction +`T e = μ e` satisfies `T^n e = μ^n e` (`Daubechies.iterate_transfer_eq_pow_smul`). + +**The variable `s = sin²(πξ/2)`.** At the two points `ξ/2` and `(ξ + 1)/2` the factor `P` takes +the values `P_N(s)` and `P_N(1 - s)` (`Daubechies.transfer_eq_eval_sin_sq`), and the cosines met +below are polynomials in `s`: `cos(πξ) = 1 - 2s`, `cos(π(ξ + 1)) = 2s - 1` and +`cos(2πξ) = 1 - 8s(1 - s)` (`Daubechies.cos_two_pi_mul_div_two`, +`Daubechies.cos_two_pi_mul_add_one_div_two`, `Daubechies.cos_two_pi_mul_eq_sin_sq`). Each +eigenvalue equation below thereby becomes a polynomial identity in `s`. + +**Order two.** `P_2(y) = 1 + 2y`, so `(T 1)(ξ) = (1 + 2s) + (1 + 2(1 - s)) = 4` +(`Daubechies.transfer_two_one`), `T^n 1 = 4^n` (`Daubechies.iterate_transfer_two_one`), and +`Daubechies.transferGrowth_two` follows. + +**Order three.** `P_3(y) = 1 + 3y + 6y²`, and with `c(ξ) = cos(2πξ)`, +`T (9 + c) = 9 (9 + c)` and `T (1 + 3c) = -4 (1 + 3c)` (`Daubechies.transfer_three_eigen_one`, +`Daubechies.transfer_three_eigen_two`); in the first identity both sides equal +`90 - 72s(1 - s)`. Since `1 = (3/26)(9 + c) - (1/26)(1 + 3c)`, +`T^n 1 = (3/26) 9^n (9 + c) - (1/26) (-4)^n (1 + 3c)` (`Daubechies.iterate_transfer_three_one`), +which is at most `(30/26) 9^n + (4/26) 4^n ≤ (17/13) 9^n` +(`Daubechies.iterate_transfer_three_one_le`); `Daubechies.transferGrowth_three` follows. +-/ + +@[expose] public section + +open scoped Real + +namespace Daubechies + +/-! ### Linearity of the iterates and eigenfunctions -/ + +/-- The iterates of the transfer operator are additive: `T^n (g₁ + g₂) = T^n g₁ + T^n g₂` for +every `n`, since `T` is additive (Mathlib's `Function.Semiconj₂.iterate`). -/ +theorem iterate_transfer_add (N n : ℕ) (g₁ g₂ : ℝ → ℝ) : + (transfer N)^[n] (g₁ + g₂) = (transfer N)^[n] g₁ + (transfer N)^[n] g₂ := + have ha : Function.Semiconj₂ (transfer N) (· + ·) (· + ·) := transfer_add N + (ha.iterate n).eq g₁ g₂ + +/-- The iterates of the transfer operator are homogeneous: `T^n (c g) = c T^n g` for every `n` +and every real `c`, since `T` commutes with the multiplication by `c` (Mathlib's +`Function.Commute.iterate_left`). -/ +theorem iterate_transfer_smul (N n : ℕ) (c : ℝ) (g : ℝ → ℝ) : + (transfer N)^[n] (c • g) = c • (transfer N)^[n] g := + have hc : Function.Commute (transfer N) (c • ·) := transfer_smul N c + hc.iterate_left n g + +/-- **Eigenfunctions of the transfer operator**: if `T e = μ e`, then `T^n e = μ^n e` for every +`n`. The operator `T` commutes with the multiplication by `μ` and agrees with it at `e`, so their +iterates agree at `e` (Mathlib's `Function.Commute.iterate_eq_of_map_eq`), and the `n`-th iterate +of the multiplication by `μ` is the multiplication by `μ^n` (Mathlib's `smul_iterate_apply`). -/ +theorem iterate_transfer_eq_pow_smul {N : ℕ} {e : ℝ → ℝ} {μ : ℝ} (he : transfer N e = μ • e) + (n : ℕ) : (transfer N)^[n] e = μ ^ n • e := + have hc : Function.Commute (transfer N) (μ • ·) := transfer_smul N μ + (hc.iterate_eq_of_map_eq n he).trans (smul_iterate_apply μ n e) + +/-! ### The transfer operator in the variable `s = sin²(πξ/2)` -/ + +/-- **The transfer operator in the variable `s = sin²(πξ/2)`**: for every `N`, `g` and `ξ`, +`(T g)(ξ) = P_N(s) g(ξ/2) + P_N(1 - s) g((ξ + 1)/2)`. Indeed `P(ξ/2) = P_N(sin²(πξ/2))` by +definition, and `P((ξ + 1)/2) = P(ξ/2 + 1/2) = P_N(cos²(πξ/2)) = P_N(1 - s)` +(`Daubechies.daubFun_add_half`). -/ +theorem transfer_eq_eval_sin_sq (N : ℕ) (g : ℝ → ℝ) (ξ : ℝ) : + transfer N g ξ = (daubPoly N).eval (Real.sin (π * (ξ / 2)) ^ 2) * g (ξ / 2) + + (daubPoly N).eval (1 - Real.sin (π * (ξ / 2)) ^ 2) * g ((ξ + 1) / 2) := by + rw [transfer, show (ξ + 1) / 2 = ξ / 2 + 1 / 2 by ring, daubFun_add_half, Real.cos_sq'] + rfl + +/-- `cos(2π · ξ/2) = cos(πξ) = 1 - 2s` with `s = sin²(πξ/2)` (Mathlib's +`Real.cos_two_mul_eq_one_sub`). -/ +theorem cos_two_pi_mul_div_two (ξ : ℝ) : + Real.cos (2 * π * (ξ / 2)) = 1 - 2 * Real.sin (π * (ξ / 2)) ^ 2 := by + rw [show 2 * π * (ξ / 2) = 2 * (π * (ξ / 2)) by ring, Real.cos_two_mul_eq_one_sub] + +/-- `cos(2π · (ξ + 1)/2) = cos(πξ + π) = -cos(πξ) = 2s - 1` with `s = sin²(πξ/2)` (Mathlib's +`Real.cos_add_pi`). -/ +theorem cos_two_pi_mul_add_one_div_two (ξ : ℝ) : + Real.cos (2 * π * ((ξ + 1) / 2)) = 2 * Real.sin (π * (ξ / 2)) ^ 2 - 1 := by + rw [show 2 * π * ((ξ + 1) / 2) = 2 * π * (ξ / 2) + π by ring, Real.cos_add_pi, + cos_two_pi_mul_div_two] + ring + +/-- `cos(2πξ) = 1 - 8s(1 - s)` with `s = sin²(πξ/2)`: for `x = πξ/2`, +`cos(4x) = 1 - 2 sin²(2x) = 1 - 8 sin²x cos²x` (Mathlib's `Real.cos_two_mul_eq_one_sub` and +`Real.sin_two_mul`), and `cos²x = 1 - sin²x`. -/ +theorem cos_two_pi_mul_eq_sin_sq (ξ : ℝ) : + Real.cos (2 * π * ξ) = + 1 - 8 * Real.sin (π * (ξ / 2)) ^ 2 * (1 - Real.sin (π * (ξ / 2)) ^ 2) := by + have h := Real.cos_sq' (π * (ξ / 2)) + rw [show 2 * π * ξ = 2 * (2 * (π * (ξ / 2))) by ring, Real.cos_two_mul_eq_one_sub, + Real.sin_two_mul] + linear_combination (-8 * Real.sin (π * (ξ / 2)) ^ 2) * h + +/-! ### Order two -/ + +/-- **The transfer operator of order two maps `1` to `4`**: for `N = 2`, `(T 1)(ξ) = 4` for every +`ξ`. With `s = sin²(πξ/2)` and `P_2(y) = 1 + 2y`, `(T 1)(ξ) = (1 + 2s) + (1 + 2(1 - s)) = 4`. -/ +theorem transfer_two_one : transfer 2 (fun _ => 1) = fun _ => 4 := by + ext ξ + simp only [transfer_eq_eval_sin_sq, daubPoly_two, Polynomial.eval_add, Polynomial.eval_mul, + Polynomial.eval_X, Polynomial.eval_one, Polynomial.eval_ofNat] + ring + +/-- For `N = 2` the iterates of the transfer operator at `1` are the constants `T^n 1 = 4^n`, +since `1` is an eigenfunction with eigenvalue `4` (`Daubechies.transfer_two_one`). -/ +theorem iterate_transfer_two_one (n : ℕ) : + (transfer 2)^[n] (fun _ => 1) = fun _ => 4 ^ n := by + have h : transfer 2 (fun _ => 1) = (4 : ℝ) • fun _ => (1 : ℝ) := by + rw [transfer_two_one] + ext ξ + simp + rw [iterate_transfer_eq_pow_smul h] + ext ξ + simp + +/-- **The growth bound of order two**: `T^n 1 ≤ 1 · 4^n` for `N = 2`, every `n` and every `ξ`, +with equality (`Daubechies.iterate_transfer_two_one`). The exponent `N - log₄ λ` of this bound +is `2 - log₄ 4 = 1` (`Daubechies.two_sub_logb_four_four`). -/ +theorem transferGrowth_two : TransferGrowth 2 4 1 := + ⟨by norm_num, fun n ξ => by simp [iterate_transfer_two_one]⟩ + +/-- The exponent `N - log₄ λ` for `N = 2` and `λ = 4`: `2 - log₄ 4 = 1`. -/ +theorem two_sub_logb_four_four : (2 : ℝ) - Real.logb 4 4 = 1 := by + rw [Real.logb_self_eq_one (by norm_num)] + norm_num + +/-! ### Order three -/ + +/-- **The first eigenfunction of order three**: for `N = 3`, +`T (9 + cos(2π·)) = 9 (9 + cos(2π·))`. With `s = sin²(πξ/2)` and `P_3(y) = 1 + 3y + 6y²`, the +left side at `ξ` is `(1 + 3s + 6s²)(10 - 2s) + (1 + 3(1 - s) + 6(1 - s)²)(8 + 2s)` and the right +side is `9 (10 - 8s(1 - s))`; both equal `90 - 72s(1 - s)`. -/ +theorem transfer_three_eigen_one : + transfer 3 (fun ξ => 9 + Real.cos (2 * π * ξ)) = fun ξ => 9 * (9 + Real.cos (2 * π * ξ)) := by + ext ξ + simp only [transfer_eq_eval_sin_sq, daubPoly_three, Polynomial.eval_add, Polynomial.eval_mul, + Polynomial.eval_pow, Polynomial.eval_X, Polynomial.eval_one, Polynomial.eval_ofNat] + rw [cos_two_pi_mul_div_two ξ, cos_two_pi_mul_add_one_div_two ξ, cos_two_pi_mul_eq_sin_sq ξ] + ring + +/-- **The second eigenfunction of order three**: for `N = 3`, +`T (1 + 3 cos(2π·)) = -4 (1 + 3 cos(2π·))`. With `s = sin²(πξ/2)` the left side at `ξ` is +`(1 + 3s + 6s²)(4 - 6s) + (1 + 3(1 - s) + 6(1 - s)²)(6s - 2)` and the right side is +`-4 (4 - 24s(1 - s))`; both equal `-16 + 96s(1 - s)`. -/ +theorem transfer_three_eigen_two : + transfer 3 (fun ξ => 1 + 3 * Real.cos (2 * π * ξ)) = + fun ξ => -4 * (1 + 3 * Real.cos (2 * π * ξ)) := by + ext ξ + simp only [transfer_eq_eval_sin_sq, daubPoly_three, Polynomial.eval_add, Polynomial.eval_mul, + Polynomial.eval_pow, Polynomial.eval_X, Polynomial.eval_one, Polynomial.eval_ofNat] + rw [cos_two_pi_mul_div_two ξ, cos_two_pi_mul_add_one_div_two ξ, cos_two_pi_mul_eq_sin_sq ξ] + ring + +/-- **The iterates of order three at `1`**: for `N = 3`, every `n` and every `ξ`, +`(T^n 1)(ξ) = (3/26) 9^n (9 + cos(2πξ)) - (1/26) (-4)^n (1 + 3 cos(2πξ))`. The constant `1` is +the combination `(3/26)(9 + cos(2π·)) - (1/26)(1 + 3 cos(2π·))` of the two eigenfunctions +(`Daubechies.transfer_three_eigen_one`, `Daubechies.transfer_three_eigen_two`), and the iterates +of `T` are linear. -/ +theorem iterate_transfer_three_one (n : ℕ) : + (transfer 3)^[n] (fun _ => 1) = fun ξ => 3 / 26 * 9 ^ n * (9 + Real.cos (2 * π * ξ)) - + 1 / 26 * (-4) ^ n * (1 + 3 * Real.cos (2 * π * ξ)) := by + have h₁ : transfer 3 (fun ξ => 9 + Real.cos (2 * π * ξ)) = + (9 : ℝ) • fun ξ => 9 + Real.cos (2 * π * ξ) := by + rw [transfer_three_eigen_one] + ext ξ + simp only [Pi.smul_apply, smul_eq_mul] + have h₂ : transfer 3 (fun ξ => 1 + 3 * Real.cos (2 * π * ξ)) = + (-4 : ℝ) • fun ξ => 1 + 3 * Real.cos (2 * π * ξ) := by + rw [transfer_three_eigen_two] + ext ξ + simp only [Pi.smul_apply, smul_eq_mul] + have h₀ : (fun _ : ℝ => (1 : ℝ)) = (3 / 26 : ℝ) • (fun ξ => 9 + Real.cos (2 * π * ξ)) + + (-1 / 26 : ℝ) • fun ξ => 1 + 3 * Real.cos (2 * π * ξ) := by + ext ξ + simp only [Pi.add_apply, Pi.smul_apply, smul_eq_mul] + ring + rw [h₀, iterate_transfer_add, iterate_transfer_smul, iterate_transfer_smul, + iterate_transfer_eq_pow_smul h₁, iterate_transfer_eq_pow_smul h₂] + ext ξ + simp only [Pi.add_apply, Pi.smul_apply, smul_eq_mul] + ring + +/-- **The growth of order three**: `(T^n 1)(ξ) ≤ (17/13) 9^n` for `N = 3`, every `n` and every +`ξ`. In the closed form `Daubechies.iterate_transfer_three_one`, `9 + cos(2πξ) ≤ 10` and +`|(-4)^n (1 + 3 cos(2πξ))| ≤ 4^n · 4 ≤ 9^n · 4`, so `T^n 1 ≤ (30/26 + 4/26) 9^n`. -/ +theorem iterate_transfer_three_one_le (n : ℕ) (ξ : ℝ) : + (transfer 3)^[n] (fun _ => 1) ξ ≤ 17 / 13 * 9 ^ n := by + simp only [iterate_transfer_three_one] + have hc := Real.cos_le_one (2 * π * ξ) + have hc' := Real.neg_one_le_cos (2 * π * ξ) + have h9 : (0 : ℝ) ≤ 9 ^ n := by positivity + have h4 : |(-4 : ℝ) ^ n| ≤ 9 ^ n := by + rw [abs_pow, abs_neg, abs_of_pos (by norm_num : (0 : ℝ) < 4)] + exact pow_le_pow_left₀ (by norm_num) (by norm_num) n + have h13 : |1 + 3 * Real.cos (2 * π * ξ)| ≤ 4 := abs_le.2 ⟨by linarith, by linarith⟩ + have hprod : -((-4 : ℝ) ^ n * (1 + 3 * Real.cos (2 * π * ξ))) ≤ 9 ^ n * 4 := + (neg_le_abs _).trans ((abs_mul _ _).le.trans (mul_le_mul h4 h13 (abs_nonneg _) h9)) + have h9c : 9 ^ n * Real.cos (2 * π * ξ) ≤ 9 ^ n := mul_le_of_le_one_right h9 hc + linarith + +/-- **The growth bound of order three**: `T^n 1 ≤ 2 · 9^n` for `N = 3`, every `n` and every `ξ` +(`Daubechies.iterate_transfer_three_one_le` and `17/13 ≤ 2`). The exponent `N - log₄ λ` of this +bound is `3 - log₄ 9 = 3 - log₂ 3 ≈ 1.415` (`Daubechies.three_sub_logb_four_nine`). -/ +theorem transferGrowth_three : TransferGrowth 3 9 2 := + ⟨by norm_num, fun n ξ => (iterate_transfer_three_one_le n ξ).trans + (mul_le_mul_of_nonneg_right (by norm_num) (by positivity))⟩ + +/-- The exponent `N - log₄ λ` for `N = 3` and `λ = 9`: `3 - log₄ 9 = 3 - log₂ 3`, since +`log₄ 9 = log 3² / log 2² = 2 log 3 / (2 log 2) = log₂ 3` (Mathlib's `Real.log_pow`). -/ +theorem three_sub_logb_four_nine : (3 : ℝ) - Real.logb 4 9 = 3 - Real.logb 2 3 := by + rw [← Real.log_div_log, ← Real.log_div_log, show (9 : ℝ) = 3 ^ 2 by norm_num, + show (4 : ℝ) = 2 ^ 2 by norm_num, Real.log_pow, Real.log_pow, + mul_div_mul_left _ _ (by norm_num : ((2 : ℕ) : ℝ) ≠ 0)] + +end Daubechies diff --git a/LeanPool/FunctionSpaces/Wavelets/Examples/Daubechies/TransferOperator.lean b/LeanPool/FunctionSpaces/Wavelets/Examples/Daubechies/TransferOperator.lean new file mode 100644 index 0000000000..b5bba5e346 --- /dev/null +++ b/LeanPool/FunctionSpaces/Wavelets/Examples/Daubechies/TransferOperator.lean @@ -0,0 +1,335 @@ +/- +Copyright (c) 2026 Mario Ullrich. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Mario Ullrich +-/ +module + +public import LeanPool.FunctionSpaces.Wavelets.Examples.Daubechies.DaubechiesPolynomial +public import Mathlib.MeasureTheory.Integral.IntervalIntegral.Periodic + +/- +Modified for Lean Pool: module names and imports adapted. +-/ + +/-! +# The transfer operator + +The **transfer operator** of order `N` acts on functions `g : ℝ → ℝ` by +`(T g)(ξ) = P(ξ/2) g(ξ/2) + P((ξ + 1)/2) g((ξ + 1)/2)` (`Daubechies.transfer`), where +`P(ξ) = P_N(sin²(πξ))` is the trigonometric Daubechies polynomial (`Daubechies.daubFun`). The +points `ξ/2` and `(ξ + 1)/2` are the two preimages of `ξ` under the doubling map `η ↦ 2η` modulo +`1`. The operator governs the decay of the symbol product `Φ(ξ) = ∏_{j ≥ 0} m_0(ξ/2^(j+1))` of a +Daubechies mask: `|Φ(ξ)|² = sinc(πξ)^(2N) ∏_{j ≥ 0} P(ξ/2^(j+1))`, and the finite products of +the factors `P(ξ/2^(j+1))` integrate to the integrals of the iterates `T^n 1`. + +**Elementary properties.** `T` is linear and monotone, and it maps continuous functions to +continuous functions, `1`-periodic functions to `1`-periodic functions (from `ξ` to `ξ + 1` the +two points `ξ/2`, `(ξ + 1)/2` become `(ξ + 1)/2`, `ξ/2 + 1`, so the two summands swap) and +nonnegative functions to nonnegative ones. Since `0 ≤ P ≤ C(2N - 1, N)`, +`|T g| ≤ 2 C(2N - 1, N) sup |g|` (`Daubechies.abs_transfer_le`), and the same holds for the +iterates with the factor `(2 C(2N - 1, N))^n` (`Daubechies.abs_iterate_transfer_le`). + +**The adjoint identity.** For continuous `1`-periodic `h` and `g`, +`∫_{-1/2}^{1/2} h(η) (T g)(η) dη = 2 ∫_{-1/2}^{1/2} h(2η) P(η) g(η) dη` +(`Daubechies.integral_transfer`). The substitutions `u = η/2` and `u = (η + 1)/2` turn the two +summands into integrals over `[-1/4, 1/4]` and `[1/4, 3/4]`, which together form one period of +the `1`-periodic function `u ↦ h(2u) P(u) g(u)` +(`Daubechies.integral_comp_div_two_add_comp_add_one_div_two`). By induction on `n`, +`∫_{-1/2}^{1/2} h(η) (T^n g)(η) dη = 2^n ∫_{-1/2}^{1/2} h(2^n η) ∏_{i 0` and `T^n 1 ≤ C λ^n` +everywhere, for every `n`; then the integrals above are at most `C λ^n` +(`Daubechies.TransferGrowth.integral_prod_daubFun_le`). The crude bound gives +`λ = 2 C(2N - 1, N)` and `C = 1` for every `N` (`Daubechies.transferGrowth_crude`). +-/ + +@[expose] public section + +open Function + +namespace Daubechies + +/-! ### The operator and its elementary properties -/ + +/-- **The transfer operator** of order `N`: for `g : ℝ → ℝ` and `ξ ∈ ℝ`, +`(T g)(ξ) = P(ξ/2) g(ξ/2) + P((ξ + 1)/2) g((ξ + 1)/2)`, where `P = daubFun N` is the +trigonometric Daubechies polynomial `P(ξ) = P_N(sin²(πξ))`. The points `ξ/2` and `(ξ + 1)/2` are +the two preimages of `ξ` under the doubling map `η ↦ 2η` modulo `1`. -/ +noncomputable def transfer (N : ℕ) (g : ℝ → ℝ) (ξ : ℝ) : ℝ := + daubFun N (ξ / 2) * g (ξ / 2) + daubFun N ((ξ + 1) / 2) * g ((ξ + 1) / 2) + +/-- `T` is additive: `T (g₁ + g₂) = T g₁ + T g₂`. -/ +theorem transfer_add (N : ℕ) (g₁ g₂ : ℝ → ℝ) : + transfer N (g₁ + g₂) = transfer N g₁ + transfer N g₂ := by + ext ξ + simp only [transfer, Pi.add_apply] + ring + +/-- `T` is homogeneous: `T (c g) = c T g` for every real `c`. -/ +theorem transfer_smul (N : ℕ) (c : ℝ) (g : ℝ → ℝ) : + transfer N (c • g) = c • transfer N g := by + ext ξ + simp only [transfer, Pi.smul_apply, smul_eq_mul] + ring + +/-- `T` maps `1`-periodic functions to `1`-periodic functions: from `ξ` to `ξ + 1` the points +`ξ/2` and `(ξ + 1)/2` become `(ξ + 1)/2` and `(ξ + 2)/2 = ξ/2 + 1`, so the two summands swap, +since `P` and `g` have period `1`. -/ +theorem transfer_periodic (N : ℕ) {g : ℝ → ℝ} (hg : Periodic g 1) : + Periodic (transfer N g) 1 := fun ξ => by + have h : (ξ + 1 + 1) / 2 = ξ / 2 + 1 := by ring + simp only [transfer, h, daubFun_periodic N (ξ / 2), hg (ξ / 2)] + ring + +/-- `T` maps continuous functions to continuous functions. -/ +theorem continuous_transfer (N : ℕ) {g : ℝ → ℝ} (hg : Continuous g) : + Continuous (transfer N g) := by + have hP := continuous_daubFun N + unfold transfer + fun_prop + +/-- `T` is positive: `T g ≥ 0` for `g ≥ 0`, since `P ≥ 0`. -/ +theorem transfer_nonneg (N : ℕ) {g : ℝ → ℝ} (hg : ∀ x, 0 ≤ g x) (ξ : ℝ) : + 0 ≤ transfer N g ξ := + add_nonneg (mul_nonneg (daubFun_nonneg N _) (hg _)) (mul_nonneg (daubFun_nonneg N _) (hg _)) + +/-- `T` is monotone: `g₁ ≤ g₂` everywhere implies `T g₁ ≤ T g₂` everywhere, since `P ≥ 0`. -/ +theorem transfer_mono (N : ℕ) {g₁ g₂ : ℝ → ℝ} (h : ∀ x, g₁ x ≤ g₂ x) (ξ : ℝ) : + transfer N g₁ ξ ≤ transfer N g₂ ξ := + add_le_add (mul_le_mul_of_nonneg_left (h _) (daubFun_nonneg N _)) + (mul_le_mul_of_nonneg_left (h _) (daubFun_nonneg N _)) + +/-- **The crude bound**: if `|g(x)| ≤ B` for every `x`, then `|(T g)(ξ)| ≤ 2 C(2N - 1, N) B` for +every `ξ`, since `0 ≤ P ≤ C(2N - 1, N)` (`Daubechies.daubFun_le_choose`). -/ +theorem abs_transfer_le (N : ℕ) {g : ℝ → ℝ} {B : ℝ} (hg : ∀ x, |g x| ≤ B) (ξ : ℝ) : + |transfer N g ξ| ≤ 2 * ((2 * N - 1).choose N : ℝ) * B := by + have key : ∀ x, |daubFun N x * g x| ≤ ((2 * N - 1).choose N : ℝ) * B := fun x => by + rw [abs_mul, abs_of_nonneg (daubFun_nonneg N x)] + exact mul_le_mul (daubFun_le_choose N x) (hg x) (abs_nonneg _) (Nat.cast_nonneg _) + calc |transfer N g ξ| ≤ |daubFun N (ξ / 2) * g (ξ / 2)| + + |daubFun N ((ξ + 1) / 2) * g ((ξ + 1) / 2)| := abs_add_le _ _ + _ ≤ ((2 * N - 1).choose N : ℝ) * B + ((2 * N - 1).choose N : ℝ) * B := + add_le_add (key _) (key _) + _ = 2 * ((2 * N - 1).choose N : ℝ) * B := by ring + +/-! ### The iterates -/ + +/-- The iterates `T^n g` of a continuous `g` are continuous. -/ +theorem continuous_iterate_transfer (N : ℕ) {g : ℝ → ℝ} (hg : Continuous g) (n : ℕ) : + Continuous ((transfer N)^[n] g) := by + induction n with + | zero => exact hg + | succ n ih => + rw [iterate_succ_apply'] + exact continuous_transfer N ih + +/-- The iterates `T^n g` of a `1`-periodic `g` are `1`-periodic. -/ +theorem periodic_iterate_transfer (N : ℕ) {g : ℝ → ℝ} (hg : Periodic g 1) (n : ℕ) : + Periodic ((transfer N)^[n] g) 1 := by + induction n with + | zero => exact hg + | succ n ih => + rw [iterate_succ_apply'] + exact transfer_periodic N ih + +/-- The iterates `T^n g` of a nonnegative `g` are nonnegative. -/ +theorem iterate_transfer_nonneg (N : ℕ) {g : ℝ → ℝ} (hg : ∀ x, 0 ≤ g x) (n : ℕ) (ξ : ℝ) : + 0 ≤ (transfer N)^[n] g ξ := by + induction n generalizing ξ with + | zero => exact hg ξ + | succ n ih => + rw [iterate_succ_apply'] + exact transfer_nonneg N ih ξ + +/-- If `|g(x)| ≤ B` for every `x`, then `|(T^n g)(ξ)| ≤ (2 C(2N - 1, N))^n B` for every `n` and +`ξ`, by induction from `Daubechies.abs_transfer_le`. -/ +theorem abs_iterate_transfer_le (N : ℕ) {g : ℝ → ℝ} {B : ℝ} (hg : ∀ x, |g x| ≤ B) (n : ℕ) + (ξ : ℝ) : |(transfer N)^[n] g ξ| ≤ (2 * ((2 * N - 1).choose N : ℝ)) ^ n * B := by + induction n generalizing ξ with + | zero => simpa using hg ξ + | succ n ih => + rw [iterate_succ_apply', pow_succ', mul_assoc] + exact abs_transfer_le N ih ξ + +/-- The iterates `T^n 1` of the constant function `1` are continuous. -/ +theorem continuous_iterate_transfer_one (N n : ℕ) : + Continuous ((transfer N)^[n] (fun _ => 1)) := + continuous_iterate_transfer N continuous_const n + +/-- The iterates `T^n 1` of the constant function `1` are `1`-periodic. -/ +theorem periodic_iterate_transfer_one (N n : ℕ) : + Periodic ((transfer N)^[n] (fun _ => 1)) 1 := + periodic_iterate_transfer N (fun _ => rfl) n + +/-- The iterates `T^n 1` of the constant function `1` are nonnegative. -/ +theorem iterate_transfer_one_nonneg (N n : ℕ) (ξ : ℝ) : 0 ≤ (transfer N)^[n] (fun _ => 1) ξ := + iterate_transfer_nonneg N (fun _ => zero_le_one) n ξ + +/-! ### The adjoint identity -/ + +/-- If `h` has period `1`, then so has `η ↦ h(2η)`: `h` has period `2`, so `η ↦ h(2η)` has period +`2⁻¹ · 2 = 1` (Mathlib's `Function.Periodic.nat_mul` and `Function.Periodic.const_mul`). -/ +theorem periodic_comp_two_mul {h : ℝ → ℝ} (hh : Periodic h 1) : + Periodic (fun η => h (2 * η)) 1 := by + simpa using (hh.nat_mul 2).const_mul (2 : ℝ) + +/-- **The two branches of halving**: for a continuous `1`-periodic `f`, +`∫_{-1/2}^{1/2} (f(η/2) + f((η + 1)/2)) dη = 2 ∫_{-1/2}^{1/2} f(η) dη`. The substitutions +`u = η/2` and `u = (η + 1)/2` (Mathlib's `intervalIntegral.integral_comp_div` and +`intervalIntegral.integral_comp_div_add`) turn the two summands into `2 ∫_{-1/4}^{1/4} f` and +`2 ∫_{1/4}^{3/4} f`. Together they give `2 ∫_{-1/4}^{3/4} f`, and the integral of a `1`-periodic +function is the same over every interval of length `1` +(`Function.Periodic.intervalIntegral_add_eq`). -/ +theorem integral_comp_div_two_add_comp_add_one_div_two {f : ℝ → ℝ} (hf : Continuous f) + (hp : Periodic f 1) : + ∫ η in (-1/2 : ℝ)..1/2, (f (η / 2) + f ((η + 1) / 2)) = + 2 * ∫ η in (-1/2 : ℝ)..1/2, f η := by + have h1 : ∫ η in (-1/2 : ℝ)..1/2, f (η / 2) = 2 * ∫ η in (-1/4 : ℝ)..1/4, f η := by + rw [intervalIntegral.integral_comp_div f two_ne_zero, smul_eq_mul] + norm_num + have h2 : ∫ η in (-1/2 : ℝ)..1/2, f ((η + 1) / 2) = 2 * ∫ η in (1/4 : ℝ)..3/4, f η := by + simp only [add_div] + rw [intervalIntegral.integral_comp_div_add f two_ne_zero, smul_eq_mul] + norm_num + have h3 : ∫ η in (-1/4 : ℝ)..3/4, f η = ∫ η in (-1/2 : ℝ)..1/2, f η := by + have h := hp.intervalIntegral_add_eq (-1/4) (-1/2) + rwa [show (-1/4 : ℝ) + 1 = 3/4 by norm_num, show (-1/2 : ℝ) + 1 = 1/2 by norm_num] at h + rw [intervalIntegral.integral_add, h1, h2, ← mul_add, + intervalIntegral.integral_add_adjacent_intervals, h3] + all_goals exact Continuous.intervalIntegrable (by fun_prop) _ _ + +/-- **The adjoint identity of the transfer operator**: for continuous `1`-periodic `h` and `g`, +`∫_{-1/2}^{1/2} h(η) (T g)(η) dη = 2 ∫_{-1/2}^{1/2} h(2η) P(η) g(η) dη`. With +`f(u) = h(2u) P(u) g(u)`, which is continuous and `1`-periodic, the integrand on the left is +`f(η/2) + f((η + 1)/2)`, because `h(η) = h(η + 1)`; then +`Daubechies.integral_comp_div_two_add_comp_add_one_div_two` applies. -/ +theorem integral_transfer (N : ℕ) {h g : ℝ → ℝ} (hhc : Continuous h) (hhp : Periodic h 1) + (hgc : Continuous g) (hgp : Periodic g 1) : + ∫ η in (-1/2 : ℝ)..1/2, h η * transfer N g η = + 2 * ∫ η in (-1/2 : ℝ)..1/2, h (2 * η) * daubFun N η * g η := by + have hP := continuous_daubFun N + have hfc : Continuous fun u => h (2 * u) * daubFun N u * g u := by fun_prop + have hfp : Periodic (fun u => h (2 * u) * daubFun N u * g u) 1 := + ((periodic_comp_two_mul hhp).mul (daubFun_periodic N)).mul hgp + rw [← integral_comp_div_two_add_comp_add_one_div_two hfc hfp] + refine intervalIntegral.integral_congr fun η _ => ?_ + simp only [transfer, show 2 * (η / 2) = η by ring, show 2 * ((η + 1) / 2) = η + 1 by ring, + hhp η] + ring + +/-- **The adjoint identity for the iterates**: for continuous `1`-periodic `h` and `g` and every +`n`, `∫_{-1/2}^{1/2} h(η) (T^n g)(η) dη = 2^n ∫_{-1/2}^{1/2} h(2^n η) ∏_{i simp + | succ n ih => + have hP := continuous_daubFun N + have hc : Continuous fun η => h (2 * η) * daubFun N η := by fun_prop + have hp : Periodic (fun η => h (2 * η) * daubFun N η) 1 := + (periodic_comp_two_mul hhp).mul (daubFun_periodic N) + rw [iterate_succ_apply', integral_transfer N hhc hhp (continuous_iterate_transfer N hgc n) + (periodic_iterate_transfer N hgp n), ih hc hp, ← mul_assoc, ← pow_succ'] + congr 1 + refine intervalIntegral.integral_congr fun η _ => ?_ + simp only [Finset.prod_range_succ, show (2 : ℝ) ^ (n + 1) * η = 2 * (2 ^ n * η) by ring] + ring + +/-- The adjoint identity for `h = g = 1`: +`∫_{-1/2}^{1/2} (T^n 1)(η) dη = 2^n ∫_{-1/2}^{1/2} ∏_{i 1) η = + 2 ^ n * ∫ η in (-1/2 : ℝ)..1/2, ∏ i ∈ Finset.range n, daubFun N (2 ^ i * η) := by + have h := integral_iterate_transfer N n (h := fun _ => 1) (g := fun _ => 1) continuous_const + (fun _ => rfl) continuous_const (fun _ => rfl) + simpa only [one_mul, mul_one] using h + +/-- Reindexing a dyadic product by `j = n - 1 - i`: +`∏_{j daubFun N (2 ^ i * η)) n] + refine Finset.prod_congr rfl fun j hj => ?_ + rw [Finset.mem_range] at hj + have h2 : (2 : ℝ) ^ n = 2 ^ (n - 1 - j) * 2 ^ (j + 1) := by + rw [← pow_add] + congr 1 + omega + rw [h2, mul_right_comm, mul_div_cancel_right₀ _ (by positivity)] + +/-- **The dyadic products integrate to the iterates of the transfer operator**: for every `n`, +`∫_{-2^n/2}^{2^n/2} ∏_{j 1) η := by + have h := intervalIntegral.smul_integral_comp_mul_left + (fun ξ => ∏ j ∈ Finset.range n, daubFun N (ξ / 2 ^ (j + 1))) ((2 : ℝ) ^ n) + (a := -1/2) (b := 1/2) + rw [show (2 : ℝ) ^ n * (-1/2) = -(2 ^ n / 2) by ring, + show (2 : ℝ) ^ n * (1/2) = 2 ^ n / 2 by ring, smul_eq_mul] at h + rw [← h, integral_iterate_transfer_one] + congr 1 + exact intervalIntegral.integral_congr fun η _ => prod_daubFun_two_pow_mul_div N n η + +/-! ### Growth bounds -/ + +/-- **A growth bound for the transfer operator** of order `N`, with rate `λ` (the argument `lam`) +and constant `C`: `λ > 0`, and `(T^n 1)(ξ) ≤ C λ^n` for every `n ∈ ℕ` and every `ξ ∈ ℝ`. Such a +bound controls the decay of the symbol product `Φ` of a Daubechies mask of order `N`: +`∫ (1 + |ξ|)^(2s) |Φ(ξ)|² dξ < ∞` for `s < N - log₄ λ`. It is a hypothesis; it is proved with +`λ = 4` for `N = 2`, `λ = 9` for `N = 3` (`Daubechies.transferGrowth_two`, +`Daubechies.transferGrowth_three`) and with a crude rate for every `N` +(`Daubechies.transferGrowth_crude`). -/ +def TransferGrowth (N : ℕ) (lam C : ℝ) : Prop := + 0 < lam ∧ ∀ (n : ℕ) (ξ : ℝ), (transfer N)^[n] (fun _ => 1) ξ ≤ C * lam ^ n + +/-- A growth bound `T^n 1 ≤ C λ^n` forces `C ≥ 1`: for `n = 0` it says `1 ≤ C`. -/ +theorem TransferGrowth.one_le {N : ℕ} {lam C : ℝ} (hg : TransferGrowth N lam C) : 1 ≤ C := by + simpa using hg.2 0 0 + +/-- Under a growth bound `T^n 1 ≤ C λ^n`, the integral of `T^n 1` over one period is at most +`C λ^n`. -/ +theorem TransferGrowth.integral_iterate_transfer_one_le {N : ℕ} {lam C : ℝ} + (hg : TransferGrowth N lam C) (n : ℕ) : + ∫ η in (-1/2 : ℝ)..1/2, (transfer N)^[n] (fun _ => 1) η ≤ C * lam ^ n := by + have h := intervalIntegral.integral_mono (μ := MeasureTheory.volume) (a := -1/2) (b := 1/2) + (by norm_num) ((continuous_iterate_transfer_one N n).intervalIntegrable _ _) + (continuous_const.intervalIntegrable _ _) (hg.2 n) + rwa [intervalIntegral.integral_const, smul_eq_mul, show (1/2 : ℝ) - (-1/2) = 1 by norm_num, + one_mul] at h + +/-- Under a growth bound `T^n 1 ≤ C λ^n`, the dyadic products satisfy +`∫_{-2^n/2}^{2^n/2} ∏_{j ?_⟩ + have h := abs_iterate_transfer_le N (g := fun _ => 1) (B := 1) (fun _ => by simp) n ξ + rw [mul_one] at h + rw [one_mul] + exact (le_abs_self _).trans h + +end Daubechies diff --git a/LeanPool/FunctionSpaces/Wavelets/Examples/Daubechies/Wavelet.lean b/LeanPool/FunctionSpaces/Wavelets/Examples/Daubechies/Wavelet.lean new file mode 100644 index 0000000000..713e788227 --- /dev/null +++ b/LeanPool/FunctionSpaces/Wavelets/Examples/Daubechies/Wavelet.lean @@ -0,0 +1,757 @@ +/- +Copyright (c) 2026 Mario Ullrich. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Mario Ullrich +-/ +module + +public import LeanPool.FunctionSpaces.Wavelets.Examples.Daubechies.FilterIdentities +public import LeanPool.FunctionSpaces.Wavelets.Examples.Daubechies.Projections + +/- +Modified for Lean Pool: module names and imports adapted. +-/ + +/-! +# The Daubechies wavelet + +For a Daubechies mask of order `N ≥ 2` with filter coefficients `c_k` (`Daubechies.coeff`), dual +filter `g_k = (-1)^k c_{1-k}` (`Daubechies.dualCoeff`) and scaling function `φ` +(`Daubechies.scalingFun`), the **Daubechies wavelet** is + +`ψ(x) = ∑_{k = 2 - 2N}^{1} g_k φ(2x - k)` (`Daubechies.wavelet`), + +a real continuous function vanishing outside `[1 - N, N]` (`Daubechies.wavelet_eq_zero`). Its +dilates and translates `ψ_{j,k}(x) = 2^(j/2) ψ(2^j x - k)` (`Daubechies.waveletScaled`) complete +the multiresolution analysis of `FunctionSpaces.Wavelets.Examples.Daubechies.Projections`, with the +projections `P_j f = ∑_k ⟨f, φ_{j,k}⟩ φ_{j,k}`. + +* **Refinement.** `ψ_{j,k} = ∑_n (g_{n-2k}/√2) φ_{j+1,n}` (`Daubechies.waveletScaled_eq_expand`), + as `φ_{j,k} = ∑_n (c_{n-2k}/√2) φ_{j+1,n}`. +* **Orthonormality.** `⟨ψ_{j,k}, ψ_{j,l}⟩ = δ_{kl}` and `⟨ψ_{j,k}, φ_{j,l}⟩ = 0` at every level + (`Daubechies.integral_waveletScaled_mul_conj`, + `Daubechies.integral_waveletScaled_mul_conj_scaled`), in particular for the integer translates. + Both functions are expansions of level `j + 1`, so Parseval's identity for finite expansions + (`Daubechies.integral_expand_mul_conj_expand`) reduces the integrals to the filter identities + `∑_k g_k g_{k+2i} = 2 δ_{i0}` and `∑_k c_k g_{k+2i} = 0`. +* **The block identity.** `P_{j+1} f - P_j f = ∑_k ⟨f, ψ_{j,k}⟩ ψ_{j,k}` for locally integrable + `f` (`Daubechies.projFun_succ_eq_add`, with the wavelet part `Daubechies.detailFun`) and on + `L_p` (`Daubechies.proj_succ_sub_proj`). The coefficients of level `j` are + `⟨f, φ_{j,k}⟩ = ∑_n (c_{n-2k}/√2) ⟨f, φ_{j+1,n}⟩` and + `⟨f, ψ_{j,k}⟩ = ∑_n (g_{n-2k}/√2) ⟨f, φ_{j+1,n}⟩`, both expansions of level `j` are expansions + of level `j + 1` (`Daubechies.expand_eq_expand_succ`, + `Daubechies.expand_wavelet_eq_expand_succ`, `Daubechies.coeffFun_eq_tsum_of_filter`), and the + filter identity + `∑_k (c_{a-2k} c_{b-2k} + g_{a-2k} g_{b-2k}) = 2 δ_{ab}` gives perfect reconstruction + (`Daubechies.refineCoeff_add_waveletRefineCoeff`). +* **The kernel identity.** + `∑_n φ_{j+1,n}(x) φ_{j+1,n}(y) = ∑_k φ_{j,k}(x) φ_{j,k}(y) + ∑_k ψ_{j,k}(x) ψ_{j,k}(y)` + (`Daubechies.tsum_scaled_mul_scaled_succ`), by perfect reconstruction with + `a_n = φ_{j+1,n}(y)`; at level `0` it reads `2 K(2x, 2y) = K(x, y) + ∑_k ψ(x - k) ψ(y - k)` for + the kernel `K(x, y) = ∑_k φ(x - k) φ(y - k)` of `P_0` (`Daubechies.kernel_succ`). +* **Norms of the blocks.** For `1 ≤ p < ∞` there are constants `K, M < ∞` with + `2^(j(1/2 - 1/p)) ‖(⟨f, ψ_{j,k}⟩)_k‖_{ℓ_p} ≤ K ‖P_{j+1} f - P_j f‖_p` and + `‖P_{j+1} f - P_j f‖_p ≤ M 2^(j(1/2 - 1/p)) ‖(⟨f, ψ_{j,k}⟩)_k‖_{ℓ_p}` for all `f` and `j` + (`Daubechies.enorm_block_equiv`), and the same for `‖P_j f‖_p` and the coefficients + `⟨f, φ_{j,k}⟩` (`Daubechies.enorm_proj_equiv`, `Daubechies.enorm_proj_zero_equiv`): the + stability of the expansions (`FunctionSpaces.Wavelets.Examples.Daubechies.Expansion`). +* **Vanishing moments.** `∫ x^l ψ(x) dx = 0` for `l < N` (`Daubechies.vanishing_moments`): the + substitution `y = 2x - k` and the binomial theorem reduce it to `∑_k g_k k^i = 0` for `i < N`. +-/ + +@[expose] public section + +open Filter MeasureTheory Topology +open scoped ENNReal ComplexConjugate +open ENNReal (dyadicWeight) + +namespace Daubechies + +variable {N : ℕ} (m : Mask N) + +/-! ### The wavelet -/ + +/-- **The Daubechies wavelet** `ψ(x) = ∑_{k = 2 - 2N}^{1} g_k φ(2x - k)` of a mask of order `N`, +with the dual filter `g_k = (-1)^k c_{1-k}` (`Daubechies.dualCoeff`) and the scaling function `φ` +(`Daubechies.scalingFun`). The dual filter vanishes outside `2 - 2N ≤ k ≤ 1` +(`Daubechies.dualCoeff_eq_zero`), so this is the sum over all `k ∈ ℤ`. -/ +noncomputable def wavelet (x : ℝ) : ℂ := + ∑ k ∈ Finset.Icc (2 - 2 * (N : ℤ)) 1, (dualCoeff m k : ℂ) * scalingFun m (2 * x - k) + +/-- **Support of the wavelet**: for `N ≥ 2`, `ψ(x) = 0` for every `x` outside `[1 - N, N]`. A term +`g_k φ(2x - k)` with `2 - 2N ≤ k ≤ 1` is nonzero only if `0 ≤ 2x - k ≤ 2N - 1` +(`Daubechies.scalingFun_eq_zero`), which forces `2 - 2N ≤ 2x ≤ 2N`. -/ +theorem wavelet_eq_zero (hN : 2 ≤ N) {x : ℝ} (hx : x ∉ Set.Icc (1 - N : ℝ) N) : + wavelet m x = 0 := by + refine Finset.sum_eq_zero fun k hk => ?_ + obtain ⟨hk1, hk2⟩ := Finset.mem_Icc.1 hk + have hk1' : (2 - 2 * N : ℝ) ≤ k := by exact_mod_cast hk1 + have hk2' : (k : ℝ) ≤ 1 := by exact_mod_cast hk2 + rw [scalingFun_eq_zero m hN fun h => hx ⟨by linarith [h.1], by linarith [h.2]⟩, mul_zero] + +/-- **The wavelet is continuous**, for `N ≥ 2`: a finite sum of dilated and translated copies of +the continuous scaling function (`Daubechies.continuous_scalingFun`). -/ +theorem continuous_wavelet (hN : 2 ≤ N) : Continuous (wavelet m) := by + have hφ := continuous_scalingFun m hN + unfold wavelet + fun_prop + +/-- **The wavelet has compact support**, for `N ≥ 2`: it vanishes outside `[1 - N, N]` +(`Daubechies.wavelet_eq_zero`). -/ +theorem hasCompactSupport_wavelet (hN : 2 ≤ N) : HasCompactSupport (wavelet m) := + HasCompactSupport.intro isCompact_Icc fun _ hx => wavelet_eq_zero m hN hx + +/-- **The wavelet lies in every `L_p`**, `p ∈ [0, ∞]`, for `N ≥ 2`: it is continuous with compact +support (Mathlib's `Continuous.memLp_of_hasCompactSupport`). -/ +theorem memLp_wavelet (hN : 2 ≤ N) (p : ℝ≥0∞) : MemLp (wavelet m) p := + (continuous_wavelet m hN).memLp_of_hasCompactSupport (hasCompactSupport_wavelet m hN) + +/-- **The wavelet is real**: `conj ψ(x) = ψ(x)` for every `x ∈ ℝ`, since the dual filter and the +scaling function are real (`Daubechies.conj_scalingFun`). -/ +theorem conj_wavelet (x : ℝ) : conj (wavelet m x) = wavelet m x := by + simp only [wavelet, map_sum, map_mul, Complex.conj_ofReal, conj_scalingFun] + +/-! ### The wavelets of every level -/ + +/-- **The wavelets of level `j`**: `ψ_{j,k}(x) = 2^(j/2) ψ(2^j x - k)` for the level `j ∈ ℕ` and +the position `k ∈ ℤ`; this is the generic `Daubechies.scaledFun` for `g = ψ`. -/ +noncomputable abbrev waveletScaled (j : ℕ) (k : ℤ) : ℝ → ℂ := scaledFun (wavelet m) j k + +/-- **The wavelets through the scaling functions of the next level**: for every level `j`, +position `k` and point `x`, `ψ_{j,k}(x) = ∑_{i = 2 - 2N}^{1} (g_i/√2) φ_{j+1,2k+i}(x)`. This is the +definition `ψ(y) = ∑_i g_i φ(2y - i)` at `y = 2^j x - k`, with +`2(2^j x - k) - i = 2^(j+1) x - (2k + i)` and `2^(j/2) = 2^((j+1)/2)/√2` +(`Daubechies.two_rpow_succ_div_two`). -/ +theorem waveletScaled_refine (j : ℕ) (k : ℤ) (x : ℝ) : + waveletScaled m j k x = ∑ i ∈ Finset.Icc (2 - 2 * (N : ℤ)) 1, + ((dualCoeff m i / √2 : ℝ) : ℂ) * scaled m (j + 1) (2 * k + i) x := by + simp only [waveletScaled, scaled, scaledFun, wavelet] + rw [Finset.mul_sum] + refine Finset.sum_congr rfl fun i _ => ?_ + have h2 : (2 : ℝ) * ((2 : ℝ) ^ j * x - k) - i = 2 ^ (j + 1) * x - ((2 * k + i : ℤ) : ℝ) := by + push_cast + ring + have hs : (√2 : ℝ) ≠ 0 := by positivity + have hc : (2 : ℝ) ^ ((j : ℝ) / 2) * dualCoeff m i = + dualCoeff m i / √2 * ((2 : ℝ) ^ ((j : ℝ) / 2) * √2) := by + field_simp + rw [h2, two_rpow_succ_div_two, ← mul_assoc, ← mul_assoc, ← Complex.ofReal_mul, + ← Complex.ofReal_mul, hc] + +/-- **`ψ_{j,k}` is an expansion of level `j + 1`**: for every level `j`, position `k` and point +`x`, `ψ_{j,k}(x) = ∑_{n ∈ ℤ} (g_{n-2k}/√2) φ_{j+1,n}(x)`. This is +`Daubechies.waveletScaled_refine` after the substitution `n = 2k + i`; the dual filter vanishes +outside `2 - 2N ≤ i ≤ 1` (`Daubechies.dualCoeff_eq_zero`). -/ +theorem waveletScaled_eq_expand (j : ℕ) (k : ℤ) (x : ℝ) : + waveletScaled m j k x = + expand (scalingFun m) (j + 1) (fun n => ((dualCoeff m (n - 2 * k) / √2 : ℝ) : ℂ)) x := by + rw [waveletScaled_refine m, expand, ← (Equiv.addLeft (2 * k)).tsum_eq] + simp only [Equiv.coe_addLeft, add_sub_cancel_left] + rw [tsum_eq_sum (s := Finset.Icc (2 - 2 * (N : ℤ)) 1) ?_] + intro i hi + rw [Finset.mem_Icc, not_and_or, not_le, not_le] at hi + rw [dualCoeff_eq_zero m hi, zero_div, Complex.ofReal_zero, zero_mul] + +/-! ### Inner products with finite expansions -/ + +/-- **Coefficients against a finite expansion**: let `N ≥ 2`, let `f` be locally integrable and +let the coefficients `v : ℤ → ℂ` vanish outside a finite set `T`. Then for every level `j`, +`∫ f conj(∑_n v_n φ_{j,n}) = ∑_{n ∈ T} conj(v_n) ⟨f, φ_{j,n}⟩`: the expansion is a finite sum, and +the integral is linear on the integrable terms (`Daubechies.integrable_mul_conj_scaled`). -/ +theorem integral_mul_conj_expand (hN : 2 ≤ N) {f : ℝ → ℂ} (hf : LocallyIntegrable f volume) + (j : ℕ) {v : ℤ → ℂ} {T : Finset ℤ} (hv : ∀ n ∉ T, v n = 0) : + ∫ y, f y * conj (expand (scalingFun m) j v y) = + ∑ n ∈ T, conj (v n) * coeffFun (scalingFun m) j f n := by + have h : ∀ y, f y * conj (expand (scalingFun m) j v y) = + ∑ n ∈ T, conj (v n) * (f y * conj (scaled m j n y)) := fun y => by + rw [expand, tsum_eq_sum (s := T) fun n hn => by rw [hv n hn, zero_mul], map_sum, + Finset.mul_sum] + refine Finset.sum_congr rfl fun n _ => ?_ + rw [map_mul] + ring + simp_rw [h] + rw [integral_finsetSum _ fun n _ => (integrable_mul_conj_scaled m hN hf j n).const_mul _] + simp_rw [integral_const_mul] + rfl + +/-- **Parseval's identity for a finite expansion**: for `N ≥ 2`, every level `j`, all coefficients +`u : ℤ → ℂ` and all coefficients `v` vanishing outside a finite set `T`, +`∫ (∑_n u_n φ_{j,n}) conj(∑_n v_n φ_{j,n}) = ∑_{n ∈ T} u_n conj(v_n)`, by +`Daubechies.integral_mul_conj_expand` and coefficient recovery +(`Daubechies.coeffFun_expand_scalingFun`). -/ +theorem integral_expand_mul_conj_expand (hN : 2 ≤ N) (j : ℕ) (u : ℤ → ℂ) {v : ℤ → ℂ} + {T : Finset ℤ} (hv : ∀ n ∉ T, v n = 0) : + ∫ y, expand (scalingFun m) j u y * conj (expand (scalingFun m) j v y) = + ∑ n ∈ T, u n * conj (v n) := by + rw [integral_mul_conj_expand m hN (continuous_expand (continuous_scalingFun m hN) + (fun _ hx => scalingFun_eq_zero m hN hx) j u).locallyIntegrable j hv] + exact Finset.sum_congr rfl fun n _ => by rw [coeffFun_expand_scalingFun m hN, mul_comm] + +/-! ### Sums of products of filters -/ + +/-- **Support of the dual filter**: if `g_i ≠ 0`, then `2 - 2N ≤ i ≤ 1` +(`Daubechies.dualCoeff_eq_zero`). -/ +theorem mem_Icc_of_dualCoeff_ne_zero {i : ℤ} (h : dualCoeff m i ≠ 0) : + 2 - 2 * (N : ℤ) ≤ i ∧ i ≤ 1 := by + by_contra h' + exact h (dualCoeff_eq_zero m (by omega)) + +/-- The shifted filter `n ↦ c_{n-2l}` vanishes outside `[2l, 2l + 2N - 1]` +(`Daubechies.coeff_eq_zero`). -/ +theorem coeff_sub_eq_zero {l n : ℤ} (hn : n ∉ Finset.Icc (2 * l) (2 * l + (2 * N - 1))) : + coeff m (n - 2 * l) = 0 := by + rw [Finset.mem_Icc, not_and_or, not_le, not_le] at hn + exact coeff_eq_zero m (by omega) + +/-- The shifted dual filter `n ↦ g_{n-2l}` vanishes outside `[2l + 2 - 2N, 2l + 1]` +(`Daubechies.dualCoeff_eq_zero`). -/ +theorem dualCoeff_sub_eq_zero {l n : ℤ} (hn : n ∉ Finset.Icc (2 * l + (2 - 2 * N)) (2 * l + 1)) : + dualCoeff m (n - 2 * l) = 0 := by + rw [Finset.mem_Icc, not_and_or, not_le, not_le] at hn + exact dualCoeff_eq_zero m (by omega) + +/-- **A sum of products of shifted filters**: let `h, h' : ℤ → ℝ`, `k, l ∈ ℤ`, and let +`h'(n - 2l) = 0` for every `n` outside a finite set `T`. Then +`∑_{n ∈ T} (h_{n-2k}/√2) conj(h'_{n-2l}/√2) = (1/2) ∑_{n ∈ ℤ} h_{n-2k} h'_{n-2l}`, since +`√2 √2 = 2` and the sequences are real. -/ +theorem sum_mul_conj_filter {h h' : ℤ → ℝ} {T : Finset ℤ} {k l : ℤ} + (hT : ∀ n ∉ T, h' (n - 2 * l) = 0) : + ∑ n ∈ T, ((h (n - 2 * k) / √2 : ℝ) : ℂ) * conj ((h' (n - 2 * l) / √2 : ℝ) : ℂ) = + ((1 / 2 * ∑ᶠ n : ℤ, h (n - 2 * k) * h' (n - 2 * l) : ℝ) : ℂ) := by + rw [finsum_eq_sum_of_support_subset (s := T) _ fun n hn => + by_contra fun hnT => hn (by rw [hT n hnT, mul_zero]), Finset.mul_sum, Complex.ofReal_sum] + refine Finset.sum_congr rfl fun n _ => ?_ + have hr : h (n - 2 * k) / √2 * (h' (n - 2 * l) / √2) = + 1 / 2 * (h (n - 2 * k) * h' (n - 2 * l)) := by + rw [div_mul_div_comm, Real.mul_self_sqrt zero_le_two] + ring + rw [Complex.conj_ofReal, ← Complex.ofReal_mul, hr] + +/-- **Reindexing a sum of products of shifted sequences**: for all `h, h' : ℤ → ℝ` and +`k, l ∈ ℤ`, `∑_n h_{n-2k} h'_{n-2l} = ∑_a h_a h'_{a+2(k-l)}`, by the substitution `n = a + 2k`. -/ +theorem finsum_mul_sub_two_mul (h h' : ℤ → ℝ) (k l : ℤ) : + ∑ᶠ n : ℤ, h (n - 2 * k) * h' (n - 2 * l) = ∑ᶠ a : ℤ, h a * h' (a + 2 * (k - l)) := by + rw [← finsum_comp_equiv (Equiv.addRight (2 * k))] + refine finsum_congr fun a => ?_ + simp only [Equiv.coe_addRight] + rw [add_sub_cancel_right, show a + 2 * k - 2 * l = a + 2 * (k - l) by ring] + +/-! ### Orthonormality -/ + +/-- **Orthonormality of the wavelets at every level**: for `N ≥ 2`, every level `j` and all +positions `k, l`, `∫ ψ_{j,k}(x) conj ψ_{j,l}(x) dx` is `1` for `k = l` and `0` otherwise. Both +wavelets are expansions of level `j + 1` with the coefficients `g_{n-2k}/√2` and `g_{n-2l}/√2` +(`Daubechies.waveletScaled_eq_expand`), so by Parseval's identity +(`Daubechies.integral_expand_mul_conj_expand`) the integral is +`(1/2) ∑_n g_{n-2k} g_{n-2l} = (1/2) ∑_a g_a g_{a+2(k-l)} = δ_{kl}` +(`Daubechies.sum_dualCoeff_mul_dualCoeff_add`). -/ +theorem integral_waveletScaled_mul_conj (hN : 2 ≤ N) (j : ℕ) (k l : ℤ) : + ∫ x, waveletScaled m j k x * conj (waveletScaled m j l x) = if k = l then 1 else 0 := by + simp_rw [waveletScaled_eq_expand m j] + rw [integral_expand_mul_conj_expand m hN (j + 1) _ + (T := Finset.Icc (2 * l + (2 - 2 * N)) (2 * l + 1)) fun n hn => by + simp only [dualCoeff_sub_eq_zero m hn, zero_div, Complex.ofReal_zero], + sum_mul_conj_filter fun n hn => dualCoeff_sub_eq_zero m hn, finsum_mul_sub_two_mul, + sum_dualCoeff_mul_dualCoeff_add] + simp only [sub_eq_zero] + split_ifs <;> norm_num + +/-- **The wavelets are orthogonal to the scaling functions of the same level**: for `N ≥ 2`, +every level `j` and all positions `k, l`, `∫ ψ_{j,k}(x) conj φ_{j,l}(x) dx = 0`. As expansions of +level `j + 1` (`Daubechies.waveletScaled_eq_expand`, `Daubechies.scaled_eq_expand`), Parseval's +identity gives `(1/2) ∑_n g_{n-2k} c_{n-2l} = (1/2) ∑_a c_a g_{a+2(l-k)} = 0` +(`Daubechies.sum_coeff_mul_dualCoeff_add`). -/ +theorem integral_waveletScaled_mul_conj_scaled (hN : 2 ≤ N) (j : ℕ) (k l : ℤ) : + ∫ x, waveletScaled m j k x * conj (scaled m j l x) = 0 := by + simp_rw [waveletScaled_eq_expand m j, scaled_eq_expand m hN j] + rw [integral_expand_mul_conj_expand m hN (j + 1) _ + (T := Finset.Icc (2 * l) (2 * l + (2 * N - 1))) fun n hn => by + simp only [coeff_sub_eq_zero m hn, zero_div, Complex.ofReal_zero], + sum_mul_conj_filter fun n hn => coeff_sub_eq_zero m hn, + finsum_congr fun n => mul_comm (dualCoeff m (n - 2 * k)) (coeff m (n - 2 * l)), + finsum_mul_sub_two_mul, sum_coeff_mul_dualCoeff_add, mul_zero, Complex.ofReal_zero] + +/-- **Orthonormality of the integer translates of the wavelet**: for `N ≥ 2` and all `k, l ∈ ℤ`, +`∫ ψ(x - k) conj ψ(x - l) dx` is `1` for `k = l` and `0` otherwise: the level `j = 0` of +`Daubechies.integral_waveletScaled_mul_conj` (`Daubechies.scaledFun_zero`). -/ +theorem integral_wavelet_translate_mul_conj_translate (hN : 2 ≤ N) (k l : ℤ) : + ∫ x, wavelet m (x - k) * conj (wavelet m (x - l)) = if k = l then 1 else 0 := by + simpa only [waveletScaled, scaledFun_zero] using integral_waveletScaled_mul_conj m hN 0 k l + +/-- **The integer translates of the wavelet and of the scaling function are orthogonal**: for +`N ≥ 2` and all `k, l ∈ ℤ`, `∫ ψ(x - k) conj φ(x - l) dx = 0`: the level `j = 0` of +`Daubechies.integral_waveletScaled_mul_conj_scaled` (`Daubechies.scaledFun_zero`). -/ +theorem integral_wavelet_translate_mul_conj_scalingFun_translate (hN : 2 ≤ N) (k l : ℤ) : + ∫ x, wavelet m (x - k) * conj (scalingFun m (x - l)) = 0 := by + simpa only [waveletScaled, scaled, scaledFun_zero] using + integral_waveletScaled_mul_conj_scaled m hN 0 k l + +/-! ### The coefficients of two consecutive levels -/ + +/-- **The coefficients of a refinable generator through those of the next level**: if `N ≥ 2`, +the real filter `h` vanishes outside `[a, b]`, `f` is locally integrable and +`g_{j,k} = ∑_n (h_{n-2k}/√2) φ_{j+1,n}`, then `⟨f, g_{j,k}⟩ = ∑_n (h_{n-2k}/√2) ⟨f, φ_{j+1,n}⟩` +(`Daubechies.integral_mul_conj_expand` for the finite expansion; the filter is real). -/ +theorem coeffFun_eq_tsum_of_filter (hN : 2 ≤ N) {g : ℝ → ℂ} {h : ℤ → ℝ} {a b : ℤ} + (hh : ∀ i, h i ≠ 0 → a ≤ i ∧ i ≤ b) {f : ℝ → ℂ} (hf : LocallyIntegrable f volume) + (j : ℕ) (k : ℤ) + (hg : ∀ x, scaledFun g j k x = + expand (scalingFun m) (j + 1) (fun n => ((h (n - 2 * k) / √2 : ℝ) : ℂ)) x) : + coeffFun g j f k = + ∑' n : ℤ, ((h (n - 2 * k) / √2 : ℝ) : ℂ) * coeffFun (scalingFun m) (j + 1) f n := by + have hT : ∀ n ∉ Finset.Icc (2 * k + a) (2 * k + b), ((h (n - 2 * k) / √2 : ℝ) : ℂ) = 0 := + fun n hn => by + have h0 : h (n - 2 * k) = 0 := by + by_contra hne + obtain ⟨h1, h2⟩ := hh _ hne + exact hn (Finset.mem_Icc.2 ⟨by omega, by omega⟩) + rw [h0, zero_div, Complex.ofReal_zero] + rw [coeffFun, show scaledFun g j k = expand (scalingFun m) (j + 1) + (fun n => ((h (n - 2 * k) / √2 : ℝ) : ℂ)) from funext hg, + integral_mul_conj_expand m hN hf (j + 1) hT, + tsum_eq_sum (s := Finset.Icc (2 * k + a) (2 * k + b)) fun n hn => by rw [hT n hn, zero_mul]] + simp only [Complex.conj_ofReal] + +/-- **The scaling coefficients of level `j` through those of level `j + 1`**: for `N ≥ 2` and +locally integrable `f`, `⟨f, φ_{j,k}⟩ = ∑_n (c_{n-2k}/√2) ⟨f, φ_{j+1,n}⟩` +(`Daubechies.coeffFun_eq_tsum_of_filter`, `Daubechies.scaled_eq_expand`). -/ +theorem coeffFun_scalingFun_eq_tsum (hN : 2 ≤ N) {f : ℝ → ℂ} (hf : LocallyIntegrable f volume) + (j : ℕ) (k : ℤ) : + coeffFun (scalingFun m) j f k = + ∑' n : ℤ, ((coeff m (n - 2 * k) / √2 : ℝ) : ℂ) * coeffFun (scalingFun m) (j + 1) f n := + coeffFun_eq_tsum_of_filter m hN (h := coeff m) (fun _ hi => mem_Icc_of_coeff_ne_zero m hi) hf + j k (scaled_eq_expand m hN j k) + +/-- **The wavelet coefficients of level `j` through the scaling coefficients of level `j + 1`**: +for `N ≥ 2` and locally integrable `f`, `⟨f, ψ_{j,k}⟩ = ∑_n (g_{n-2k}/√2) ⟨f, φ_{j+1,n}⟩` +(`Daubechies.coeffFun_eq_tsum_of_filter`, `Daubechies.waveletScaled_eq_expand`). -/ +theorem coeffFun_wavelet_eq_tsum (hN : 2 ≤ N) {f : ℝ → ℂ} (hf : LocallyIntegrable f volume) + (j : ℕ) (k : ℤ) : + coeffFun (wavelet m) j f k = + ∑' n : ℤ, ((dualCoeff m (n - 2 * k) / √2 : ℝ) : ℂ) * coeffFun (scalingFun m) (j + 1) f n := + coeffFun_eq_tsum_of_filter m hN (h := dualCoeff m) + (fun _ hi => mem_Icc_of_dualCoeff_ne_zero m hi) hf j k (waveletScaled_eq_expand m j k) + +/-- **The refined wavelet coefficients**: for coefficients `b : ℤ → ℂ` of level `j`, the +coefficients `b'_n = ∑_{k ∈ ℤ} b_k g_{n-2k}/√2` of level `j + 1`, with the dual filter `g` +(`Daubechies.dualCoeff`); only the `k` with `2 - 2N ≤ n - 2k ≤ 1` contribute. They express a +wavelet expansion of level `j` as an expansion in the scaling functions of level `j + 1`, +`∑_k b_k ψ_{j,k} = ∑_n b'_n φ_{j+1,n}` (`Daubechies.expand_wavelet_eq_expand_succ`). -/ +noncomputable def waveletRefineCoeff (b : ℤ → ℂ) (n : ℤ) : ℂ := + ∑' k : ℤ, b k * ((dualCoeff m (n - 2 * k) / √2 : ℝ) : ℂ) + +/-- **The double sum of the wavelet refinement has finitely many terms**: for `N ≥ 2` the family +`(k, n) ↦ b_k (g_{n-2k}/√2) φ_{j+1,n}(x)` is summable over `ℤ × ℤ` +(`Daubechies.summable_refine_of_filter`, `Daubechies.mem_Icc_of_dualCoeff_ne_zero`). -/ +theorem summable_waveletRefine (hN : 2 ≤ N) (j : ℕ) (b : ℤ → ℂ) (x : ℝ) : + Summable (Function.uncurry fun k n : ℤ => + b k * (((dualCoeff m (n - 2 * k) / √2 : ℝ) : ℂ) * scaled m (j + 1) n x)) := + summable_refine_of_filter m hN (h := dualCoeff m) + (fun _ hi => mem_Icc_of_dualCoeff_ne_zero m hi) j b x + +/-- **Wavelet expansions of level `j` are expansions of level `j + 1`**: for `N ≥ 2`, every level +`j`, coefficients `b : ℤ → ℂ` and point `x`, `∑_k b_k ψ_{j,k}(x) = ∑_n b'_n φ_{j+1,n}(x)` with the +refined coefficients `b'_n = ∑_k b_k g_{n-2k}/√2` (`Daubechies.waveletRefineCoeff`), by +`Daubechies.expand_eq_tsum_refine_of_filter` and `Daubechies.waveletScaled_eq_expand`. -/ +theorem expand_wavelet_eq_expand_succ (hN : 2 ≤ N) (j : ℕ) (b : ℤ → ℂ) (x : ℝ) : + expand (wavelet m) j b x = expand (scalingFun m) (j + 1) (waveletRefineCoeff m b) x := + expand_eq_tsum_refine_of_filter m hN (h := dualCoeff m) + (fun _ hi => mem_Icc_of_dualCoeff_ne_zero m hi) j (waveletScaled_eq_expand m j) b x + +/-! ### Perfect reconstruction -/ + +/-- **Combining and exchanging two double sums**: for families `X, Y : ℤ → ℤ → ℂ` that are +summable over `ℤ × ℤ`, `∑_k ∑_n X_{k,n} + ∑_k ∑_n Y_{k,n} = ∑_n ∑_k (X_{k,n} + Y_{k,n})` (Mathlib's +`Summable.tsum_comm`, `Summable.prod`, `Summable.prod_factor`). -/ +theorem tsum_tsum_add_tsum_tsum {X Y : ℤ → ℤ → ℂ} (hX : Summable (Function.uncurry X)) + (hY : Summable (Function.uncurry Y)) : + ∑' k, ∑' n, X k n + ∑' k, ∑' n, Y k n = ∑' n, ∑' k, (X k n + Y k n) := by + have hX1 : Summable fun k => ∑' n, X k n := hX.prod + have hY1 : Summable fun k => ∑' n, Y k n := hY.prod + have hXY : Summable (Function.uncurry fun k n => X k n + Y k n) := hX.add hY + calc ∑' k, ∑' n, X k n + ∑' k, ∑' n, Y k n + = ∑' k, (∑' n, X k n + ∑' n, Y k n) := (hX1.tsum_add hY1).symm + _ = ∑' k, ∑' n, (X k n + Y k n) := + tsum_congr fun k => ((hX.prod_factor k).tsum_add (hY.prod_factor k)).symm + _ = ∑' n, ∑' k, (X k n + Y k n) := hXY.tsum_comm.symm + +/-- **The double sum of the filter identity has finitely many terms**: let `h, h' : ℤ → ℝ` vanish +outside `[-B, B]`. Then for every `a : ℤ → ℂ` and `n' ∈ ℤ` the family +`(k, n) ↦ (h_{n-2k}/√2)(h'_{n'-2k}/√2) a_n` is summable over `ℤ × ℤ`: a nonzero term needs +`|n' - 2k| ≤ B` and `|n - 2k| ≤ B`, which leaves finitely many pairs. -/ +theorem summable_filter_mul_filter {h h' : ℤ → ℝ} {B : ℤ} + (hh : ∀ i, h i ≠ 0 → -B ≤ i ∧ i ≤ B) (hh' : ∀ i, h' i ≠ 0 → -B ≤ i ∧ i ≤ B) + (a : ℤ → ℂ) (n' : ℤ) : + Summable (Function.uncurry fun k n : ℤ => + ((h (n - 2 * k) / √2 : ℝ) : ℂ) * ((h' (n' - 2 * k) / √2 : ℝ) : ℂ) * a n) := by + refine summable_of_ne_finset_zero (s := Finset.Icc (n' / 2 - B) (n' / 2 + B) ×ˢ + Finset.Icc (n' - 4 * B - 1) (n' + 4 * B + 1)) fun kn hkn => ?_ + obtain ⟨k, n⟩ := kn + by_contra hne + simp only [Function.uncurry_apply_pair] at hne + obtain ⟨h1, -⟩ := mul_ne_zero_iff.1 hne + obtain ⟨h3, h4⟩ := mul_ne_zero_iff.1 h1 + have h3' : h (n - 2 * k) ≠ 0 := fun h0 => h3 (by rw [h0, zero_div, Complex.ofReal_zero]) + have h4' : h' (n' - 2 * k) ≠ 0 := fun h0 => h4 (by rw [h0, zero_div, Complex.ofReal_zero]) + obtain ⟨h5, h6⟩ := hh _ h3' + obtain ⟨h7, h8⟩ := hh' _ h4' + exact hkn (Finset.mem_product.2 + ⟨Finset.mem_Icc.2 ⟨by omega, by omega⟩, Finset.mem_Icc.2 ⟨by omega, by omega⟩⟩) + +/-- **The filter identity with normalised filters**: for all `n, n' ∈ ℤ`, +`∑_{k ∈ ℤ} ((c_{n-2k}/√2)(c_{n'-2k}/√2) + (g_{n-2k}/√2)(g_{n'-2k}/√2))` is `1` for `n = n'` and +`0` otherwise (`Daubechies.sum_coeff_mul_add_dual`); only finitely many terms are nonzero. -/ +theorem tsum_coeff_mul_add_dual (n n' : ℤ) : + ∑' k : ℤ, (((coeff m (n - 2 * k) / √2 : ℝ) : ℂ) * ((coeff m (n' - 2 * k) / √2 : ℝ) : ℂ) + + ((dualCoeff m (n - 2 * k) / √2 : ℝ) : ℂ) * ((dualCoeff m (n' - 2 * k) / √2 : ℝ) : ℂ)) = + if n = n' then 1 else 0 := by + have hinj : Function.Injective fun k : ℤ => n' - 2 * k := fun i i' hii' => by + simp only at hii' + omega + have hfin : Function.HasFiniteSupport fun k : ℤ => + coeff m (n - 2 * k) * coeff m (n' - 2 * k) + + dualCoeff m (n - 2 * k) * dualCoeff m (n' - 2 * k) := + Set.Finite.subset (Set.Finite.union + (Set.Finite.subset (Function.HasFiniteSupport.fun_comp_of_injective hinj + (finite_support_coeff m)) (Function.support_mul_subset_right _ _)) + (Set.Finite.subset (Function.HasFiniteSupport.fun_comp_of_injective hinj + (finite_support_dualCoeff m)) (Function.support_mul_subset_right _ _))) + (Function.support_add _ _) + have h : ∀ k : ℤ, + ((coeff m (n - 2 * k) / √2 : ℝ) : ℂ) * ((coeff m (n' - 2 * k) / √2 : ℝ) : ℂ) + + ((dualCoeff m (n - 2 * k) / √2 : ℝ) : ℂ) * ((dualCoeff m (n' - 2 * k) / √2 : ℝ) : ℂ) = + ((1 / 2 * (coeff m (n - 2 * k) * coeff m (n' - 2 * k) + + dualCoeff m (n - 2 * k) * dualCoeff m (n' - 2 * k)) : ℝ) : ℂ) := fun k => by + rw [← Complex.ofReal_mul, ← Complex.ofReal_mul, ← Complex.ofReal_add, div_mul_div_comm, + div_mul_div_comm, Real.mul_self_sqrt zero_le_two] + congr 1 + ring + simp_rw [h] + rw [← Complex.ofReal_tsum, tsum_mul_left, tsum_eq_finsum hfin, sum_coeff_mul_add_dual] + split_ifs <;> norm_num + +/-- **Perfect reconstruction**: for every `a : ℤ → ℂ` and `n' ∈ ℤ`, +`∑_k (∑_n (c_{n-2k}/√2) a_n)(c_{n'-2k}/√2) + ∑_k (∑_n (g_{n-2k}/√2) a_n)(g_{n'-2k}/√2) = a_{n'}`: +the left side is `∑_n a_n ∑_k ((c_{n-2k}/√2)(c_{n'-2k}/√2) + (g_{n-2k}/√2)(g_{n'-2k}/√2))` after +exchanging the sums (`Daubechies.summable_filter_mul_filter`, +`Daubechies.tsum_tsum_add_tsum_tsum`), and the inner sum is `δ_{nn'}` +(`Daubechies.tsum_coeff_mul_add_dual`). In terms of the refined coefficients +(`Daubechies.refineCoeff`, `Daubechies.waveletRefineCoeff`) this reads `H* H a + G* G a = a`. -/ +theorem refineCoeff_add_waveletRefineCoeff (a : ℤ → ℂ) (n' : ℤ) : + refineCoeff m (fun k => ∑' n, ((coeff m (n - 2 * k) / √2 : ℝ) : ℂ) * a n) n' + + waveletRefineCoeff m (fun k => ∑' n, ((dualCoeff m (n - 2 * k) / √2 : ℝ) : ℂ) * a n) n' = + a n' := by + have hc : ∀ i, coeff m i ≠ 0 → -(2 * N : ℤ) ≤ i ∧ i ≤ 2 * N := fun i hi => by + have := mem_Icc_of_coeff_ne_zero m hi + omega + have hg : ∀ i, dualCoeff m i ≠ 0 → -(2 * N : ℤ) ≤ i ∧ i ≤ 2 * N := fun i hi => by + have := mem_Icc_of_dualCoeff_ne_zero m hi + omega + have e1 : refineCoeff m (fun k => ∑' n, ((coeff m (n - 2 * k) / √2 : ℝ) : ℂ) * a n) n' = + ∑' k : ℤ, ∑' n : ℤ, + ((coeff m (n - 2 * k) / √2 : ℝ) : ℂ) * ((coeff m (n' - 2 * k) / √2 : ℝ) : ℂ) * a n := by + rw [refineCoeff] + refine tsum_congr fun k => ?_ + rw [← tsum_mul_right] + exact tsum_congr fun n => by ring + have e2 : waveletRefineCoeff m + (fun k => ∑' n, ((dualCoeff m (n - 2 * k) / √2 : ℝ) : ℂ) * a n) n' = + ∑' k : ℤ, ∑' n : ℤ, ((dualCoeff m (n - 2 * k) / √2 : ℝ) : ℂ) * + ((dualCoeff m (n' - 2 * k) / √2 : ℝ) : ℂ) * a n := by + rw [waveletRefineCoeff] + refine tsum_congr fun k => ?_ + rw [← tsum_mul_right] + exact tsum_congr fun n => by ring + have e3 : ∀ n : ℤ, ∑' k : ℤ, + (((coeff m (n - 2 * k) / √2 : ℝ) : ℂ) * ((coeff m (n' - 2 * k) / √2 : ℝ) : ℂ) * a n + + ((dualCoeff m (n - 2 * k) / √2 : ℝ) : ℂ) * ((dualCoeff m (n' - 2 * k) / √2 : ℝ) : ℂ) * + a n) = if n = n' then a n else 0 := fun n => by + rw [tsum_congr fun k => (add_mul _ _ (a n)).symm, tsum_mul_right, tsum_coeff_mul_add_dual] + split_ifs <;> simp + rw [e1, e2, tsum_tsum_add_tsum_tsum (summable_filter_mul_filter hc hc a n') + (summable_filter_mul_filter hg hg a n'), tsum_congr e3] + exact tsum_ite_eq n' a + +/-! ### The block identity -/ + +/-- **The wavelet part of level `j`, pointwise**: `Q_j f(x) = ∑_{k ∈ ℤ} ⟨f, ψ_{j,k}⟩ ψ_{j,k}(x)` +for every `f : ℝ → ℂ`, the expansion of level `j` in the wavelets with the coefficients +`⟨f, ψ_{j,k}⟩ = ∫ f(y) conj ψ_{j,k}(y) dy` (`Daubechies.coeffFun`). It is the difference +`P_{j+1} f - P_j f` of two consecutive projections (`Daubechies.projFun_succ_eq_add`). -/ +noncomputable def detailFun (j : ℕ) (f : ℝ → ℂ) : ℝ → ℂ := + expand (wavelet m) j (coeffFun (wavelet m) j f) + +/-- **The block identity, pointwise**: for `N ≥ 2`, locally integrable `f`, every level `j` and +point `x`, `P_{j+1} f(x) = P_j f(x) + ∑_k ⟨f, ψ_{j,k}⟩ ψ_{j,k}(x)`. Both terms on the right are +expansions of level `j + 1` (`Daubechies.expand_eq_expand_succ`, +`Daubechies.expand_wavelet_eq_expand_succ`) whose coefficients, written through +`a_n = ⟨f, φ_{j+1,n}⟩` (`Daubechies.coeffFun_scalingFun_eq_tsum`, +`Daubechies.coeffFun_wavelet_eq_tsum`), add up to `a` (perfect reconstruction, +`Daubechies.refineCoeff_add_waveletRefineCoeff`). -/ +theorem projFun_succ_eq_add (hN : 2 ≤ N) {f : ℝ → ℂ} (hf : LocallyIntegrable f volume) (j : ℕ) + (x : ℝ) : projFun m (j + 1) f x = projFun m j f x + detailFun m j f x := by + have hc : coeffFun (scalingFun m) (j + 1) f = fun n => + refineCoeff m (coeffFun (scalingFun m) j f) n + + waveletRefineCoeff m (coeffFun (wavelet m) j f) n := by + funext n + rw [funext (coeffFun_scalingFun_eq_tsum m hN hf j), funext (coeffFun_wavelet_eq_tsum m hN hf j), + refineCoeff_add_waveletRefineCoeff m (coeffFun (scalingFun m) (j + 1) f) n] + rw [projFun, projFun, detailFun, expand_eq_expand_succ m hN j (coeffFun (scalingFun m) j f) x, + expand_wavelet_eq_expand_succ m hN j (coeffFun (wavelet m) j f) x, + ← expand_add (fun _ hy => scalingFun_eq_zero m hN hy), ← hc] + +/-- **The wavelet part of an `L_p` function lies in `L_p`**: for `N ≥ 2`, `1 ≤ p < ∞`, `f ∈ L_p` +and every level `j` (`Daubechies.memLp_expand_coeffFun` for `g = ψ`). -/ +theorem memLp_detailFun (hN : 2 ≤ N) {p : ℝ≥0∞} (hp1 : 1 ≤ p) (hp : p ≠ ∞) {f : ℝ → ℂ} + (hf : MemLp f p volume) (j : ℕ) : MemLp (detailFun m j f) p volume := + memLp_expand_coeffFun (continuous_wavelet m hN) (fun _ hx => wavelet_eq_zero m hN hx) hp1 hp hf j + +/-! ### The kernel identity -/ + +/-- **The kernel identity at level `j`**: for `N ≥ 2`, every level `j` and all points `x, y`, +`∑_n φ_{j+1,n}(x) φ_{j+1,n}(y) = ∑_k φ_{j,k}(x) φ_{j,k}(y) + ∑_k ψ_{j,k}(x) ψ_{j,k}(y)`: the kernel +of `P_{j+1}` is the kernel of `P_j` plus the kernel of the wavelets of level `j`. As functions of +`x`, the two sums on the right are expansions of level `j` with the coefficients +`φ_{j,k}(y) = ∑_n (c_{n-2k}/√2) φ_{j+1,n}(y)` and `ψ_{j,k}(y) = ∑_n (g_{n-2k}/√2) φ_{j+1,n}(y)` +(`Daubechies.scaled_eq_expand`, `Daubechies.waveletScaled_eq_expand`), hence expansions of level +`j + 1`, and perfect reconstruction (`Daubechies.refineCoeff_add_waveletRefineCoeff`) with +`a_n = φ_{j+1,n}(y)` adds their coefficients up to `a`. -/ +theorem tsum_scaled_mul_scaled_succ (hN : 2 ≤ N) (j : ℕ) (x y : ℝ) : + ∑' n : ℤ, scaled m (j + 1) n x * scaled m (j + 1) n y = + ∑' k : ℤ, scaled m j k x * scaled m j k y + + ∑' k : ℤ, waveletScaled m j k x * waveletScaled m j k y := by + have hc : (fun n => scaled m (j + 1) n y) = fun n => + refineCoeff m (fun k => scaled m j k y) n + + waveletRefineCoeff m (fun k => waveletScaled m j k y) n := by + funext n + have hb : (fun k => scaled m j k y) = fun k => + ∑' i, ((coeff m (i - 2 * k) / √2 : ℝ) : ℂ) * scaled m (j + 1) i y := + funext fun k => scaled_eq_expand m hN j k y + have hb' : (fun k => waveletScaled m j k y) = fun k => + ∑' i, ((dualCoeff m (i - 2 * k) / √2 : ℝ) : ℂ) * scaled m (j + 1) i y := + funext fun k => waveletScaled_eq_expand m j k y + rw [hb, hb'] + exact (refineCoeff_add_waveletRefineCoeff m (fun i => scaled m (j + 1) i y) n).symm + have h1 : ∑' k : ℤ, scaled m j k x * scaled m j k y = + expand (scalingFun m) j (fun k => scaled m j k y) x := + tsum_congr fun k => mul_comm _ _ + have h2 : ∑' k : ℤ, waveletScaled m j k x * waveletScaled m j k y = + expand (wavelet m) j (fun k => waveletScaled m j k y) x := + tsum_congr fun k => mul_comm _ _ + rw [h1, h2, expand_eq_expand_succ m hN j _ x, expand_wavelet_eq_expand_succ m hN j _ x, + ← expand_add (fun _ hz => scalingFun_eq_zero m hN hz), ← hc] + exact tsum_congr fun n => mul_comm _ _ + +/-- **Products of generators of level `1`**: `g_{1,n}(x) g_{1,n}(y) = 2 g(2x - n) g(2y - n)` for +every `g : ℝ → ℂ`, `n ∈ ℤ` and `x, y ∈ ℝ`, since `2^(1/2) 2^(1/2) = 2` +(`ofReal_two_rpow_half_mul_self`). -/ +theorem scaledFun_one_mul_scaledFun_one (g : ℝ → ℂ) (n : ℤ) (x y : ℝ) : + scaledFun g 1 n x * scaledFun g 1 n y = 2 * (g (2 * x - n) * g (2 * y - n)) := by + have h := ofReal_two_rpow_half_mul_self 1 + rw [pow_one] at h + calc scaledFun g 1 n x * scaledFun g 1 n y + = ((((2 : ℝ) ^ (((1 : ℕ) : ℝ) / 2) : ℝ) : ℂ) * (((2 : ℝ) ^ (((1 : ℕ) : ℝ) / 2) : ℝ) : ℂ)) * + (g (2 ^ 1 * x - n) * g (2 ^ 1 * y - n)) := by + rw [scaledFun, scaledFun] + ring + _ = 2 * (g (2 * x - n) * g (2 * y - n)) := by rw [h, pow_one] + +/-- **The kernel identity**: for `N ≥ 2` and all `x, y ∈ ℝ`, the kernel +`K(x, y) = ∑_k φ(x - k) φ(y - k)` of the projection `P_0` satisfies +`2 K(2x, 2y) = K(x, y) + ∑_k ψ(x - k) ψ(y - k)`. This is the level `j = 0` of +`Daubechies.tsum_scaled_mul_scaled_succ`, with `φ_{0,k} = φ(· - k)` (`Daubechies.scaledFun_zero`) +and `φ_{1,n}(x) φ_{1,n}(y) = 2 φ(2x - n) φ(2y - n)` +(`Daubechies.scaledFun_one_mul_scaledFun_one`). -/ +theorem kernel_succ (hN : 2 ≤ N) (x y : ℝ) : + 2 * ∑' n : ℤ, scalingFun m (2 * x - n) * scalingFun m (2 * y - n) = + ∑' k : ℤ, scalingFun m (x - k) * scalingFun m (y - k) + + ∑' k : ℤ, wavelet m (x - k) * wavelet m (y - k) := by + have h := tsum_scaled_mul_scaled_succ m hN 0 x y + simp only [scaled, waveletScaled, zero_add, scaledFun_zero, scaledFun_one_mul_scaledFun_one, + tsum_mul_left] at h + exact h + +section Lp + +variable {p : ℝ≥0∞} [Fact (1 ≤ p)] + +/-- **The block identity on `L_p`**: for `N ≥ 2`, `1 ≤ p < ∞`, every level `j` and every +`f ∈ L_p`, `P_{j+1} f - P_j f` is the class of the wavelet part +`∑_k ⟨f, ψ_{j,k}⟩ ψ_{j,k}` (`Daubechies.detailFun`, `Daubechies.projFun_succ_eq_add`). -/ +theorem proj_succ_sub_proj (hN : 2 ≤ N) (hp : p ≠ ∞) (j : ℕ) (f : Lp ℂ p (volume : Measure ℝ)) : + proj m p hN hp (j + 1) f - proj m p hN hp j f = + (memLp_detailFun m hN Fact.out hp (Lp.memLp f) j).toLp _ := by + refine Lp.ext ?_ + filter_upwards [Lp.coeFn_sub (proj m p hN hp (j + 1) f) (proj m p hN hp j f), + proj_apply_ae m hN hp (j + 1) f, proj_apply_ae m hN hp j f, + MemLp.coeFn_toLp (memLp_detailFun m hN Fact.out hp (Lp.memLp f) j)] with x h1 h2 h3 h4 + rw [h1, Pi.sub_apply, h2, h3, h4, + projFun_succ_eq_add m hN ((Lp.memLp f).locallyIntegrable Fact.out) j x, add_sub_cancel_left] + +/-- **The norm of a block**: `‖P_{j+1} f - P_j f‖_p = ‖∑_k ⟨f, ψ_{j,k}⟩ ψ_{j,k}‖_p` for every +`f ∈ L_p` and every level `j` (`Daubechies.proj_succ_sub_proj`). -/ +theorem enorm_proj_succ_sub_proj (hN : 2 ≤ N) (hp : p ≠ ∞) (j : ℕ) + (f : Lp ℂ p (volume : Measure ℝ)) : + ‖proj m p hN hp (j + 1) f - proj m p hN hp j f‖ₑ = eLpNorm (detailFun m j f) p volume := by + rw [proj_succ_sub_proj, Lp.eNorm_def, eLpNorm_congr_ae (MemLp.coeFn_toLp _)] + +/-- **The norm of a projection**: `‖P_j f‖_p = ‖∑_k ⟨f, φ_{j,k}⟩ φ_{j,k}‖_p` for every +`f ∈ L_p` and every level `j` (`Daubechies.proj_apply_ae`). -/ +theorem enorm_proj_eq (hN : 2 ≤ N) (hp : p ≠ ∞) (j : ℕ) (f : Lp ℂ p (volume : Measure ℝ)) : + ‖proj m p hN hp j f‖ₑ = eLpNorm (projFun m j f) p volume := by + rw [Lp.eNorm_def, eLpNorm_congr_ae (proj_apply_ae m hN hp j f)] + +/-- **The norms of the blocks through the wavelet coefficients**: for `N ≥ 2` and `1 ≤ p < ∞` +there are constants `K, M < ∞` such that for every `f ∈ L_p` and every level `j` +`2^(j(1/2 - 1/p)) ‖(⟨f, ψ_{j,k}⟩)_k‖_{ℓ_p} ≤ K ‖P_{j+1} f - P_j f‖_p` and +`‖P_{j+1} f - P_j f‖_p ≤ M 2^(j(1/2 - 1/p)) ‖(⟨f, ψ_{j,k}⟩)_k‖_{ℓ_p}`. The block is the wavelet +expansion with the coefficients `⟨f, ψ_{j,k}⟩` (`Daubechies.enorm_proj_succ_sub_proj`), so the +lower and the upper stability of the expansions (`Daubechies.lqNorm_le_eLpNorm_expand`, which +uses the orthonormality of the translates of `ψ`, and `Daubechies.eLpNorm_expand_le`) give the +constants `K = Daubechies.coeffConst` and `M = Daubechies.expandConst` for `g = ψ`. -/ +theorem enorm_block_equiv (hN : 2 ≤ N) (hp : p ≠ ∞) : + ∃ K M : ℝ≥0∞, K ≠ ∞ ∧ M ≠ ∞ ∧ ∀ (f : Lp ℂ p (volume : Measure ℝ)) (j : ℕ), + dyadicWeight (1 / 2 - 1 / p.toReal) j * + ENNReal.lqNorm p (fun k : ℤ => ‖coeffFun (wavelet m) j f k‖ₑ) ≤ + K * ‖proj m p hN hp (j + 1) f - proj m p hN hp j f‖ₑ ∧ + ‖proj m p hN hp (j + 1) f - proj m p hN hp j f‖ₑ ≤ + M * (dyadicWeight (1 / 2 - 1 / p.toReal) j * + ENNReal.lqNorm p (fun k : ℤ => ‖coeffFun (wavelet m) j f k‖ₑ)) := by + refine ⟨coeffConst (wavelet m) (1 - N) N p, expandConst (wavelet m) (1 - N) N p, + coeffConst_ne_top _ _ (memLp_wavelet m hN _), expandConst_ne_top _ _ (memLp_wavelet m hN p), + fun f j => ⟨?_, ?_⟩⟩ + · rw [enorm_proj_succ_sub_proj] + exact lqNorm_le_eLpNorm_expand (continuous_wavelet m hN) (fun _ hx => wavelet_eq_zero m hN hx) + (integral_wavelet_translate_mul_conj_translate m hN) Fact.out hp j _ + · rw [enorm_proj_succ_sub_proj, expandConst, ← mul_assoc] + exact eLpNorm_expand_le (continuous_wavelet m hN).aestronglyMeasurable + (fun _ hx => wavelet_eq_zero m hN hx) Fact.out hp j _ + +/-- **The norms of the projections through the scaling coefficients**: for `N ≥ 2` and +`1 ≤ p < ∞` there are constants `K, M < ∞` such that for every `f ∈ L_p` and every level `j` +`2^(j(1/2 - 1/p)) ‖(⟨f, φ_{j,k}⟩)_k‖_{ℓ_p} ≤ K ‖P_j f‖_p` and +`‖P_j f‖_p ≤ M 2^(j(1/2 - 1/p)) ‖(⟨f, φ_{j,k}⟩)_k‖_{ℓ_p}`, by the stability of the expansions +(`Daubechies.lqNorm_le_eLpNorm_expand`, `Daubechies.eLpNorm_expand_le`) for `g = φ`. -/ +theorem enorm_proj_equiv (hN : 2 ≤ N) (hp : p ≠ ∞) : + ∃ K M : ℝ≥0∞, K ≠ ∞ ∧ M ≠ ∞ ∧ ∀ (f : Lp ℂ p (volume : Measure ℝ)) (j : ℕ), + dyadicWeight (1 / 2 - 1 / p.toReal) j * + ENNReal.lqNorm p (fun k : ℤ => ‖coeffFun (scalingFun m) j f k‖ₑ) ≤ + K * ‖proj m p hN hp j f‖ₑ ∧ + ‖proj m p hN hp j f‖ₑ ≤ + M * (dyadicWeight (1 / 2 - 1 / p.toReal) j * + ENNReal.lqNorm p (fun k : ℤ => ‖coeffFun (scalingFun m) j f k‖ₑ)) := by + refine ⟨coeffConst (scalingFun m) 0 (2 * N - 1) p, expandConst (scalingFun m) 0 (2 * N - 1) p, + coeffConst_ne_top _ _ (memLp_scalingFun m hN _), + expandConst_ne_top _ _ (memLp_scalingFun m hN p), fun f j => ⟨?_, ?_⟩⟩ + · rw [enorm_proj_eq] + exact lqNorm_le_eLpNorm_expand (continuous_scalingFun m hN) + (fun _ hx => scalingFun_eq_zero m hN hx) + (integral_scalingFun_translate_mul_conj_translate m hN) Fact.out hp j _ + · rw [enorm_proj_eq, expandConst, ← mul_assoc] + exact eLpNorm_expand_le (continuous_scalingFun m hN).aestronglyMeasurable + (fun _ hx => scalingFun_eq_zero m hN hx) Fact.out hp j _ + +/-- **The norm of the projection of level `0` through the scaling coefficients**: for `N ≥ 2` and +`1 ≤ p < ∞` there are constants `K, M < ∞` with `‖(⟨f, φ_{0,k}⟩)_k‖_{ℓ_p} ≤ K ‖P_0 f‖_p` and +`‖P_0 f‖_p ≤ M ‖(⟨f, φ_{0,k}⟩)_k‖_{ℓ_p}` for every `f ∈ L_p`, where `φ_{0,k} = φ(· - k)`: the level +`j = 0` of `Daubechies.enorm_proj_equiv`. -/ +theorem enorm_proj_zero_equiv (hN : 2 ≤ N) (hp : p ≠ ∞) : + ∃ K M : ℝ≥0∞, K ≠ ∞ ∧ M ≠ ∞ ∧ ∀ f : Lp ℂ p (volume : Measure ℝ), + ENNReal.lqNorm p (fun k : ℤ => ‖coeffFun (scalingFun m) 0 f k‖ₑ) ≤ + K * ‖proj m p hN hp 0 f‖ₑ ∧ + ‖proj m p hN hp 0 f‖ₑ ≤ + M * ENNReal.lqNorm p (fun k : ℤ => ‖coeffFun (scalingFun m) 0 f k‖ₑ) := by + obtain ⟨K, M, hK, hM, hKM⟩ := enorm_proj_equiv m hN hp + refine ⟨K, M, hK, hM, fun f => ?_⟩ + simpa only [ENNReal.dyadicWeight_zero_right, one_mul] using hKM f 0 + +end Lp + +/-! ### Vanishing moments -/ + +/-- For `N ≥ 2`, `l ∈ ℕ` and `k ∈ ℤ`, the function `x ↦ x^l φ(2x - k)` is integrable: it is +continuous and vanishes outside `[k/2, (k + 2N - 1)/2]` (`Daubechies.scalingFun_eq_zero`). -/ +theorem integrable_pow_mul_scalingFun_two_mul_sub (hN : 2 ≤ N) (l : ℕ) (k : ℤ) : + Integrable fun x : ℝ => (x : ℂ) ^ l * scalingFun m (2 * x - k) := by + have hφ := continuous_scalingFun m hN + refine Continuous.integrable_of_hasCompactSupport (by fun_prop) + (HasCompactSupport.intro (isCompact_Icc (a := (k : ℝ) / 2) (b := (k + (2 * N - 1)) / 2)) + fun x hx => ?_) + rw [scalingFun_eq_zero m hN fun h => hx ⟨by linarith [h.1], by linarith [h.2]⟩, mul_zero] + +/-- For `N ≥ 2` and `i ∈ ℕ`, the function `y ↦ y^i φ(y)` is integrable: it is continuous with +compact support (`Daubechies.hasCompactSupport_scalingFun`). -/ +theorem integrable_pow_mul_scalingFun (hN : 2 ≤ N) (i : ℕ) : + Integrable fun y : ℝ => (y : ℂ) ^ i * scalingFun m y := by + have hφ := continuous_scalingFun m hN + exact Continuous.integrable_of_hasCompactSupport (by fun_prop) + (hasCompactSupport_scalingFun m hN).mul_left + +/-- **The moments of a dilated translate of the scaling function**: for `N ≥ 2`, `l ∈ ℕ` and +`k ∈ ℤ`, `∫ x^l φ(2x - k) dx = 2^(-(l+1)) ∑_{i=0}^{l} k^(l-i) C(l, i) ∫ y^i φ(y) dy`. The +substitution `u = 2x` (Mathlib's `MeasureTheory.Measure.integral_comp_mul_left`) and the +translation `u = y + k` give `(1/2) ∫ ((y + k)/2)^l φ(y) dy`, and the binomial theorem (Mathlib's +`add_pow`) expands `(y + k)^l`. -/ +theorem integral_pow_mul_scalingFun_two_mul_sub (hN : 2 ≤ N) (l : ℕ) (k : ℤ) : + ∫ x : ℝ, (x : ℂ) ^ l * scalingFun m (2 * x - k) = + (1 / 2) ^ (l + 1) * ∑ i ∈ Finset.range (l + 1), + (k : ℂ) ^ (l - i) * (l.choose i : ℂ) * ∫ y : ℝ, (y : ℂ) ^ i * scalingFun m y := by + have h1 : ∫ x : ℝ, (x : ℂ) ^ l * scalingFun m (2 * x - k) = + 1 / 2 * ∫ u : ℝ, ((u / 2 : ℝ) : ℂ) ^ l * scalingFun m (u - k) := by + have h := Measure.integral_comp_mul_left + (fun u : ℝ => ((u / 2 : ℝ) : ℂ) ^ l * scalingFun m (u - k)) 2 + simp only [mul_div_cancel_left₀ _ (two_ne_zero' ℝ)] at h + rw [h, abs_of_pos (by norm_num), Complex.real_smul] + norm_num + have h2 : ∫ u : ℝ, ((u / 2 : ℝ) : ℂ) ^ l * scalingFun m (u - k) = + ∫ y : ℝ, (((y + k) / 2 : ℝ) : ℂ) ^ l * scalingFun m y := by + rw [← integral_add_right_eq_self _ (k : ℝ)] + simp only [add_sub_cancel_right] + have h3 : ∀ y : ℝ, (((y + k) / 2 : ℝ) : ℂ) ^ l * scalingFun m y = + ∑ i ∈ Finset.range (l + 1), (1 / 2) ^ l * ((k : ℂ) ^ (l - i) * (l.choose i : ℂ)) * + ((y : ℂ) ^ i * scalingFun m y) := fun y => by + rw [show (((y + k) / 2 : ℝ) : ℂ) = (1 / 2) * ((y : ℂ) + (k : ℂ)) by push_cast; ring, mul_pow, + add_pow, Finset.mul_sum, Finset.sum_mul] + exact Finset.sum_congr rfl fun i _ => by ring + rw [h1, h2] + simp_rw [h3] + rw [integral_finsetSum _ fun i _ => (integrable_pow_mul_scalingFun m hN i).const_mul _] + simp_rw [integral_const_mul] + rw [Finset.mul_sum, Finset.mul_sum] + exact Finset.sum_congr rfl fun i _ => by ring + +/-- **The moments of the dual filter, as complex numbers**: for `s < N`, +`∑_{k = 2 - 2N}^{1} g_k k^s = 0` (`Daubechies.sum_dualCoeff_mul_pow`, +`Daubechies.finsum_eq_sum_Icc_of_dualCoeff`). -/ +theorem sum_dualCoeff_mul_pow_eq_zero {s : ℕ} (hs : s < N) : + ∑ k ∈ Finset.Icc (2 - 2 * (N : ℤ)) 1, (dualCoeff m k : ℂ) * (k : ℂ) ^ s = 0 := by + have h := sum_dualCoeff_mul_pow m hs + rw [finsum_eq_sum_Icc_of_dualCoeff m _ fun k hk => by rw [hk, zero_mul]] at h + exact_mod_cast h + +/-- **Vanishing moments of the wavelet**: for `N ≥ 2` and `l < N`, `∫ x^l ψ(x) dx = 0`. By +`Daubechies.integral_pow_mul_scalingFun_two_mul_sub`, +`∫ x^l ψ(x) dx = 2^(-(l+1)) ∑_{i ≤ l} C(l, i) (∫ y^i φ(y) dy) ∑_k g_k k^(l-i)`, and every inner sum +vanishes since `l - i < N` (`Daubechies.sum_dualCoeff_mul_pow_eq_zero`). -/ +theorem vanishing_moments (hN : 2 ≤ N) {l : ℕ} (hl : l < N) : + ∫ x : ℝ, (x : ℂ) ^ l * wavelet m x = 0 := by + have h1 : ∀ x : ℝ, (x : ℂ) ^ l * wavelet m x = ∑ k ∈ Finset.Icc (2 - 2 * (N : ℤ)) 1, + (dualCoeff m k : ℂ) * ((x : ℂ) ^ l * scalingFun m (2 * x - k)) := fun x => by + rw [wavelet, Finset.mul_sum] + exact Finset.sum_congr rfl fun k _ => by ring + simp_rw [h1] + rw [integral_finsetSum _ fun k _ => + (integrable_pow_mul_scalingFun_two_mul_sub m hN l k).const_mul _] + simp_rw [integral_const_mul, integral_pow_mul_scalingFun_two_mul_sub m hN, Finset.mul_sum] + rw [Finset.sum_comm] + refine Finset.sum_eq_zero fun i hi => ?_ + have hs : l - i < N := by omega + calc ∑ k ∈ Finset.Icc (2 - 2 * (N : ℤ)) 1, (dualCoeff m k : ℂ) * ((1 / 2) ^ (l + 1) * + ((k : ℂ) ^ (l - i) * (l.choose i : ℂ) * ∫ y : ℝ, (y : ℂ) ^ i * scalingFun m y)) + = (1 / 2) ^ (l + 1) * (l.choose i : ℂ) * (∫ y : ℝ, (y : ℂ) ^ i * scalingFun m y) * + ∑ k ∈ Finset.Icc (2 - 2 * (N : ℤ)) 1, (dualCoeff m k : ℂ) * (k : ℂ) ^ (l - i) := by + rw [Finset.mul_sum] + exact Finset.sum_congr rfl fun k _ => by ring + _ = 0 := by rw [sum_dualCoeff_mul_pow_eq_zero m hs, mul_zero] + +end Daubechies diff --git a/LeanPool/FunctionSpaces/Wavelets/Examples/DyadicStepsQuasiBanach.lean b/LeanPool/FunctionSpaces/Wavelets/Examples/DyadicStepsQuasiBanach.lean new file mode 100644 index 0000000000..5dd4cd57d9 --- /dev/null +++ b/LeanPool/FunctionSpaces/Wavelets/Examples/DyadicStepsQuasiBanach.lean @@ -0,0 +1,694 @@ +/- +Copyright (c) 2026 Mario Ullrich. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Mario Ullrich +-/ +module + +public import LeanPool.FunctionSpaces.Wavelets.Examples.HaarBesov +public import LeanPool.FunctionSpaces.Domains.Interval.PiecewiseInverse +public import LeanPool.FunctionSpaces.ApproximationSpaces.Interpolation.EFunctionalModuli + +/- +Modified for Lean Pool: module names and imports adapted. +-/ + +/-! +# Dyadic step functions in `L_p[0, 1]`, `0 < p ≤ 1` + +For `0 < p < 1` the space `L_p[0, 1]` is a quasi-Banach space: Mathlib's `Lp ℂ p vol` is an +abelian group with the quasi-norm `‖·‖ₑ`, and the `p`-th power of the quasi-norm is subadditive, +`‖f + g‖_p^p ≤ ‖f‖_p^p + ‖g‖_p^p` (`MeasureTheory.Lp.enorm_add_rpow_le_of_le_one`). Approximation +by dyadic step functions is described by the **step couple** `Haar.stepCouple p`, the couple of +the quasi-norm and of the increasing subgroups `V_j` of `ℱ_j`-measurable elements, the step +functions of level `j` (`InterpCouple.ofMonotoneSubgroups`): its E-functional at `t = 2^j` is the +error of best approximation from `V_j` (`Haar.eFunctional_stepCouple_two_pow`), and its spaces +`E_{s,q}` are the approximation spaces `A^s_q(L_p, steps)`. For `1 ≤ p` the step couple is the +complexity couple of the Haar scheme (`Haar.stepCouple_eq_complexityCouple`, +`Haar.memEMethod_stepCouple_iff_memApprox`). + +The modulus of smoothness `ω_r(f, t, [0, 1])_p` satisfies, for `0 < p ≤ 1`, +`ω_r(f + g, t)_p^p ≤ ω_r(f, t)_p^p + ω_r(g, t)_p^p` and `ω_r(f, t)_p ≤ 2^(r/p) ‖f‖_p` +(`Interval.modulus_add_rpow_le`, `Interval.modulus_le_of_le_one`, and their forms on `L_p`, +`Interval.lpModulus_add_rpow_le`, `Interval.lpModulus_le_of_le_one`). Two inequalities connect +it with the steps: + +* **Jackson's inequality by averaging**, `E(2^j, f)_p ≤ 2^(1/p) ω_1(f, 2^(-j), [0, 1])_p` for + every `0 < p < ∞` (`Haar.eFunctional_stepCouple_le`). On each dyadic interval `I` some value + `f(y)` approximates `f` at least as well as the mean over `y` of `∫_I |f - f(y)|^p` + (`MeasureTheory.exists_setLIntegral_enorm_sub_rpow_le`, the first moment method), and the double + integrals over the dyadic squares add up to at most `2 ω_1(f, 2^(-j))_p^p` + (`Interval.two_pow_mul_sum_lintegral_le_modulus`). The proof averages pointwise and uses + Tonelli's theorem, so it holds for every `0 < p < ∞` with the constant `2^(1/p)`. +* **The inverse inequality of order `1/p`**: for a step function `a` of level `j`, + `ω_1(a, 2^(-k), [0, 1])_p ≤ 2^(1/p) 2^(-(k-j)/p) ‖a‖_p` (`Haar.lpModulus_le_of_mem_lpMeas`). + A difference `Δ_h a` lives on strips of width `h` left of the jumps, where + `|Δ_h a|^p ≤ |a_n|^p + |a_{n+1}|^p` (`Interval.enorm_higherDiff_one_rpow_le_stripBound`), and + the strip integral of the piecewise polynomials, `Interval.eLpNorm_le_of_strip`, adds these up + (`Interval.eLpNorm_higherDiff_one_le_of_step`). + +With the coincidence theorem for `ρ`-normed couples (`InterpCouple.ModulusData`, here +`Haar.stepModulusData` with `ρ = p` and `θ = 1/p`) this gives, for `0 < p ≤ 1`, `q ≠ 0` and +`0 < s < 1/p` (`Haar.memEMethod_stepCouple_iff_modulus`), + +`f ∈ A^s_q(L_p[0, 1], steps) ⟺ ‖f‖_p + ‖(2^(ks) ω_1(f, 2^(-k), [0, 1])_p)_k‖_{ℓ_q} < ∞`, + +the Besov space `B^s_{p,q,1}[0, 1]` of the first modulus (P. Oswald, *Approximation by splines in +the `L_p` metric, `0 < p < 1`*, Math. Nachr. 94 (1980), Theorem 6, in Russian; see Oswald, +*Haar system as Schauder basis in Besov spaces: The limiting cases for `0 < p ≤ 1`*, +arXiv:1808.08156, (7)). For `s < 1` it is the Besov space of DeVore–Popov (Trans. Amer. Math. Soc. +305 (1988), (2.4) with `r = 1`, Theorem 5.1); for `1/p - 1 < s < 1` and `q < ∞` it is also the +Fourier-analytic `B^s_{p,q}[0, 1]` (Oswald 2018, (2)). For `s > 1`, and for `s = 1` with +`q < ∞`, it differs from the space of the second modulus: the line `x ↦ x` has `ω_2 = 0` +(`Haar.lpModulus_two_idLp`) but `E(2^j, x)_p ≥ 2^(-1/p) 2^(-j)/4` +(`Haar.le_eFunctional_stepCouple_idLp`), so it lies outside `A^s_q(L_p, steps)` +(`Haar.not_memEMethod_stepCouple_idLp`). +-/ + +@[expose] public section + +open MeasureTheory Set Polynomial +open Rd (higherDiff measurable_higherDiff) +open scoped ENNReal +open ENNReal (dyadicWeight lqNorm) + +/-! ### The quasi-norm of `L_p` and the first moment method -/ + +namespace MeasureTheory + +variable {α : Type*} [MeasurableSpace α] {μ : Measure α} + +/-- The quasi-norm of `L_p(μ)` vanishes at `0`, for every `p`. -/ +theorem Lp.eNorm_zero {E : Type*} [NormedAddCommGroup E] {p : ℝ≥0∞} : + ‖(0 : Lp E p μ)‖ₑ = 0 := by + rw [Lp.eNorm_def, eLpNorm_congr_ae (Lp.coeFn_zero E p μ), eLpNorm_zero] + +/-- The quasi-norm of `L_p(μ)` is even, `‖-f‖_p = ‖f‖_p`, for every `p`. -/ +theorem Lp.eNorm_neg {E : Type*} [NormedAddCommGroup E] {p : ℝ≥0∞} (f : Lp E p μ) : + ‖-f‖ₑ = ‖f‖ₑ := by + rw [Lp.eNorm_def, Lp.eNorm_def, eLpNorm_congr_ae (Lp.coeFn_neg f), eLpNorm_neg] + +/-- **The `p`-th power of the quasi-norm of `L_p` is subadditive for `p ≤ 1`**: +`‖f + g‖_p^p ≤ ‖f‖_p^p + ‖g‖_p^p` for `f, g ∈ L_p(μ)`, from the same inequality for functions +(`MeasureTheory.eLpNorm_add_rpow_le_of_le_one`). At `p = 0` both sides are powers `x^0 = 1`. -/ +theorem Lp.enorm_add_rpow_le_of_le_one {E : Type*} [NormedAddCommGroup E] {p : ℝ≥0∞} + (hp1 : p ≤ 1) (f g : Lp E p μ) : + ‖f + g‖ₑ ^ p.toReal ≤ ‖f‖ₑ ^ p.toReal + ‖g‖ₑ ^ p.toReal := by + rcases eq_or_ne p 0 with rfl | hp0 + · simp only [ENNReal.toReal_zero, ENNReal.rpow_zero] + exact le_self_add + rw [Lp.eNorm_def, Lp.eNorm_def, Lp.eNorm_def, eLpNorm_congr_ae (Lp.coeFn_add f g)] + exact eLpNorm_add_rpow_le_of_le_one hp0 hp1 _ _ + +/-- **A value of `F` approximates `F` on `s` at least as well as the mean of all values** (the +first moment method, Mathlib's `exists_le_setLAverage`): for measurable `F`, a set `s` of finite +positive measure and every exponent `r`, some `y ∈ s` has +`∫_s |F(x) - F(y)|^r dx ≤ μ(s)⁻¹ ∫_s ∫_s |F(x) - F(z)|^r dx dz`. -/ +theorem exists_setLIntegral_enorm_sub_rpow_le [SFinite μ] {F : α → ℂ} (hF : Measurable F) + {s : Set α} (hμ0 : μ s ≠ 0) (hμ : μ s ≠ ∞) (r : ℝ) : + ∃ y ∈ s, ∫⁻ x in s, ‖F x - F y‖ₑ ^ r ∂μ ≤ + (μ s)⁻¹ * ∫⁻ y in s, ∫⁻ x in s, ‖F x - F y‖ₑ ^ r ∂μ ∂μ := by + have hG : Measurable fun y => ∫⁻ x in s, ‖F x - F y‖ₑ ^ r ∂μ := + Measurable.lintegral_prod_left' (f := fun z : α × α => ‖F z.1 - F z.2‖ₑ ^ r) + (((hF.comp measurable_fst).sub (hF.comp measurable_snd)).eNorm.pow_const r) + obtain ⟨y, hy, hle⟩ := exists_le_setLAverage hμ0 hμ hG.aemeasurable + exact ⟨y, hy, hle.trans_eq (by rw [setLAverage_eq, ENNReal.div_eq_inv_mul])⟩ + +end MeasureTheory + +/-! ### Averages over dyadic intervals -/ + +namespace Interval + +variable {p : ℝ≥0∞} + +/-- **Steps from point values**: for measurable `F : ℝ → ℂ`, every exponent `r` and every `j` +there are values `c_n` such that the step function `u = ∑_{n<2^j} 1_{I_{j,n}} c_n` satisfies +`∫_0^1 |F - u|^r ≤ 2^j ∑_{n<2^j} ∫_{I_{j,n}} ∫_{I_{j,n}} |F(x) - F(y)|^r dx dy`: on each dyadic +interval `c_n = F(y_n)` for a point `y_n` of +`MeasureTheory.exists_setLIntegral_enorm_sub_rpow_le`, and `|I_{j,n}| = 2^(-j)`. -/ +theorem exists_ppFun_lintegral_le {F : ℝ → ℂ} (hF : Measurable F) (r : ℝ) (j : ℕ) : + ∃ c : ℕ → ℂ, ∫⁻ x in Icc 0 1, ‖F x - ppFun j (fun n => C (c n)) x‖ₑ ^ r ≤ + 2 ^ j * ∑ n ∈ Finset.range (2 ^ j), + ∫⁻ y in dyadicIco j n, ∫⁻ x in dyadicIco j n, ‖F x - F y‖ₑ ^ r := by + have h0 : ∀ n, volume (dyadicIco j n) ≠ 0 := fun n => by + rw [volume_dyadicIco_eq_inv] + exact ENNReal.inv_ne_zero.2 (ENNReal.pow_ne_top ENNReal.ofNat_ne_top) + have ht : ∀ n, volume (dyadicIco j n) ≠ ∞ := fun n => by + rw [volume_dyadicIco_eq_inv] + exact ENNReal.inv_ne_top.2 (pow_ne_zero j two_ne_zero) + choose y hy hle using fun n => exists_setLIntegral_enorm_sub_rpow_le hF (h0 n) (ht n) r + refine ⟨fun n => F (y n), ?_⟩ + rw [lintegral_unit_eq_sum_dyadicIco _ j, Finset.mul_sum] + refine Finset.sum_le_sum fun n hn => ?_ + have hcongr : ∫⁻ x in dyadicIco j n, ‖F x - ppFun j (fun n => C (F (y n))) x‖ₑ ^ r = + ∫⁻ x in dyadicIco j n, ‖F x - F (y n)‖ₑ ^ r := + setLIntegral_congr_fun (measurableSet_dyadicIco j n) fun x hx => by + rw [ppFun_eq_of_mem _ (Finset.mem_range.1 hn) hx] + simp [polyFun] + rw [hcongr] + exact (hle n).trans_eq (by rw [volume_dyadicIco_eq_inv, inv_inv]) + +/-- **An integral over a dyadic interval as an integral over steps**: for `y ∈ I_{j,n}`, +`n < 2^j`, and every `g ≥ 0`, `∫_{I_{j,n}} g ≤ ∫_{|h| < 2^(-j)} 1_{[0, 1]}(y + h) g(y + h) dh`, +by the substitution `x = y + h` (Mathlib's `lintegral_add_left_eq_self`), since `y + h ∈ I_{j,n}` +forces `|h| < 2^(-j)` and `y + h ∈ [0, 1]`. -/ +theorem setLIntegral_dyadicIco_le {j n : ℕ} (hn : n < 2 ^ j) (g : ℝ → ℝ≥0∞) {y : ℝ} + (hy : y ∈ dyadicIco j n) : + ∫⁻ x in dyadicIco j n, g x ≤ + ∫⁻ h in Ioo (-(1 / 2 ^ j)) (1 / 2 ^ j), (Icc (0 : ℝ) 1).indicator g (y + h) := by + rw [← lintegral_indicator (measurableSet_dyadicIco j n), + ← lintegral_add_left_eq_self ((dyadicIco j n).indicator g) y, + ← lintegral_indicator measurableSet_Ioo] + refine lintegral_mono fun h => ?_ + by_cases hm : y + h ∈ dyadicIco j n + · have hIcc : y + h ∈ Icc (0 : ℝ) 1 := Ico_subset_Icc_self (dyadicIco_subset hn hm) + have hsplit : ((n : ℝ) + 1) / 2 ^ j = n / 2 ^ j + 1 / 2 ^ j := add_div _ _ _ + have hh : h ∈ Ioo (-(1 / 2 ^ j : ℝ)) (1 / 2 ^ j) := by + rw [dyadicIco, mem_Ico] at hy hm + constructor <;> linarith [hy.1, hy.2, hm.1, hm.2] + simp only [Set.indicator_of_mem hm, Set.indicator_of_mem hh, Set.indicator_of_mem hIcc] + exact le_rfl + · simp only [Set.indicator_of_notMem hm] + exact zero_le + +/-- **The integral over `y` of a difference with step `h`**: for `0 < p < ∞`, measurable `F` and +every `h`, `∫_0^1 1_{[0, 1]}(y + h) |F(y + h) - F(y)|^p dy = ‖Δ_h(F, ·, [0, 1])‖_p^p`, with the +restricted difference of `Rd.modulusOn`. -/ +theorem lintegral_indicator_add_eq_eLpNorm (hp0 : p ≠ 0) (hp : p ≠ ∞) {F : ℝ → ℂ} + (hF : Measurable F) (h : ℝ) : + ∫⁻ y in Icc 0 1, (Icc (0 : ℝ) 1).indicator (fun x => ‖F x - F y‖ₑ ^ p.toReal) (y + h) = + eLpNorm ((Rd.stepSet (Icc (0 : ℝ) 1) 1 h).indicator ((fwdDiff h)^[1] F)) p volume ^ + p.toReal := by + have hq : 0 < p.toReal := ENNReal.toReal_pos hp0 hp + have hmem : ∀ y : ℝ, y ∈ Rd.stepSet (Icc (0 : ℝ) 1) 1 h ↔ + y ∈ Icc (0 : ℝ) 1 ∧ y + h ∈ Icc (0 : ℝ) 1 := fun y => by + simp only [Rd.stepSet, Set.mem_ofPred_eq] + constructor + · intro H + exact ⟨by simpa using H 0 (Nat.zero_le 1), by simpa using H 1 le_rfl⟩ + · rintro ⟨h0, h1⟩ l hl + rcases Nat.le_one_iff_eq_zero_or_eq_one.1 hl with rfl | rfl + · simpa using h0 + · simpa using h1 + rw [eLpNorm_rpow_eq (g := (Rd.stepSet (Icc (0 : ℝ) 1) 1 h).indicator ((fwdDiff h)^[1] F)) + ((measurable_higherDiff hF 1 h).indicator + (Rd.measurableSet_stepSet measurableSet_Icc 1 h)).aestronglyMeasurable hp0 hp, + ← lintegral_indicator measurableSet_Icc] + refine lintegral_congr fun y => ?_ + by_cases hy : y ∈ Icc (0 : ℝ) 1 ∧ y + h ∈ Icc (0 : ℝ) 1 + · simp only [Set.indicator_of_mem hy.1, Set.indicator_of_mem hy.2, + Set.indicator_of_mem ((hmem y).2 hy), Function.iterate_one, fwdDiff] + · rw [Set.indicator_of_notMem (fun h' => hy ((hmem y).1 h')), eNorm_zero, + ENNReal.zero_rpow_of_pos hq] + by_cases hy1 : y ∈ Icc (0 : ℝ) 1 + · simp only [Set.indicator_of_mem hy1, Set.indicator_of_notMem (fun h2 => hy ⟨hy1, h2⟩)] + · simp only [Set.indicator_of_notMem hy1] + +/-- **The double integral over the dyadic squares by the modulus**: for `0 < p < ∞` and +measurable `F`, +`2^j ∑_{n<2^j} ∫_{I_{j,n}} ∫_{I_{j,n}} |F(x) - F(y)|^p dx dy ≤ 2 ω_1(F, 2^(-j), [0, 1])_p^p`. +After the substitution `x = y + h` (`Interval.setLIntegral_dyadicIco_le`) and the exchange of the +integrals (Mathlib's `lintegral_lintegral_swap`), the integral over `y` is +`‖Δ_h(F, ·, [0, 1])‖_p^p ≤ ω_1(F, 2^(-j))_p^p` for each `|h| < 2^(-j)` +(`Interval.lintegral_indicator_add_eq_eLpNorm`), and these steps fill an interval of length +`2 · 2^(-j)`. -/ +theorem two_pow_mul_sum_lintegral_le_modulus (hp0 : p ≠ 0) (hp : p ≠ ∞) {F : ℝ → ℂ} + (hF : Measurable F) (j : ℕ) : + 2 ^ j * ∑ n ∈ Finset.range (2 ^ j), + ∫⁻ y in dyadicIco j n, ∫⁻ x in dyadicIco j n, ‖F x - F y‖ₑ ^ p.toReal ≤ + 2 * modulus 1 p 0 1 F (1 / 2 ^ j) ^ p.toReal := by + have hq : 0 < p.toReal := ENNReal.toReal_pos hp0 hp + set t : ℝ := 1 / 2 ^ j with ht + set ω := modulus 1 p 0 1 F t + set Φ : ℝ → ℝ → ℝ≥0∞ := fun y h => + (Icc (0 : ℝ) 1).indicator (fun x => ‖F x - F y‖ₑ ^ p.toReal) (y + h) with hΦdef + have hΦ : Measurable (Function.uncurry Φ) := by + have hfun : Function.uncurry Φ = fun z : ℝ × ℝ => if z.1 + z.2 ∈ Icc (0 : ℝ) 1 then + ‖F (z.1 + z.2) - F z.1‖ₑ ^ p.toReal else 0 := by + funext z + simp only [Function.uncurry, hΦdef, Set.indicator_apply] + rw [hfun] + exact Measurable.ite ((measurable_fst.add measurable_snd) measurableSet_Icc) + (((hF.comp (measurable_fst.add measurable_snd)).sub (hF.comp measurable_fst)).eNorm.pow_const + _) measurable_const + have h1 : ∑ n ∈ Finset.range (2 ^ j), + ∫⁻ y in dyadicIco j n, ∫⁻ x in dyadicIco j n, ‖F x - F y‖ₑ ^ p.toReal ≤ + ∫⁻ y in Icc 0 1, ∫⁻ h in Ioo (-t) t, Φ y h := + (Finset.sum_le_sum fun n hn => setLIntegral_mono' (measurableSet_dyadicIco j n) fun y hy => + setLIntegral_dyadicIco_le (Finset.mem_range.1 hn) _ hy).trans + (sum_lintegral_dyadicIco_le _ j) + have h2 : ∫⁻ y in Icc 0 1, ∫⁻ h in Ioo (-t) t, Φ y h ≤ + ω ^ p.toReal * ENNReal.ofReal (t - -t) := by + rw [lintegral_lintegral_swap hΦ.aemeasurable, ← Real.volume_Ioo, ← setLIntegral_const] + refine setLIntegral_mono' measurableSet_Ioo fun h hh => ?_ + rw [hΦdef, lintegral_indicator_add_eq_eLpNorm hp0 hp hF h] + exact ENNReal.rpow_le_rpow (Rd.eLpNorm_indicator_higherDiff_le_modulusOn + (by rw [Real.norm_eq_abs]; exact abs_le.2 ⟨hh.1.le, hh.2.le⟩)) hq.le + have h3 : (2 : ℝ≥0∞) ^ j * ENNReal.ofReal (t - -t) = 2 := by + rw [show t - -t = 2 * t by ring, ENNReal.ofReal_mul zero_le_two, ENNReal.ofReal_ofNat, ht, + one_div, ENNReal.ofReal_inv_of_pos (by positivity), ENNReal.ofReal_pow zero_le_two, + ENNReal.ofReal_ofNat, mul_left_comm, + ENNReal.mul_inv_cancel (pow_ne_zero j two_ne_zero) (ENNReal.pow_ne_top ENNReal.ofNat_ne_top), + mul_one] + calc 2 ^ j * ∑ n ∈ Finset.range (2 ^ j), + ∫⁻ y in dyadicIco j n, ∫⁻ x in dyadicIco j n, ‖F x - F y‖ₑ ^ p.toReal + ≤ 2 ^ j * (ω ^ p.toReal * ENNReal.ofReal (t - -t)) := by gcongr; exact h1.trans h2 + _ = 2 * ω ^ p.toReal := by rw [mul_comm (ω ^ p.toReal), ← mul_assoc, h3] + +/-! ### Differences of step functions -/ + +/-- **Differences of a step function**: let `u` take the value `v_n` on every dyadic interval +`I_{j,n}`, `n ∈ ℕ`, and let `0 < p ≤ 1`, `0 ≤ h ≤ 2^(-j)` and `x ≥ 0`. Then `|Δ_h u(x)|^p` +vanishes unless `x` lies in the strip of width `h` left of the right end of its interval +`I_{j,n}`, and there it is at most `|v_n|^p + |v_{n+1}|^p`, since `x + h ∈ I_{j,n+1}`: this is the +strip function `Interval.stripBound` with `r = 1`. -/ +theorem enorm_higherDiff_one_rpow_le_stripBound (hp0 : p ≠ 0) (hp1 : p ≤ 1) {j : ℕ} + {u : ℝ → ℂ} {v : ℕ → ℂ} (hu : ∀ n : ℕ, ∀ x ∈ dyadicIco j n, u x = v n) {h x : ℝ} + (hh0 : 0 ≤ h) (hh : h ≤ 1 / 2 ^ j) (hx : 0 ≤ x) : + ‖higherDiff 1 h u x‖ₑ ^ p.toReal ≤ + stripBound j 1 h 1 (fun n => ‖v n‖ₑ ^ p.toReal + ‖v (n + 1)‖ₑ ^ p.toReal) x := by + have hq : 0 < p.toReal := ENNReal.toReal_pos hp0 (ne_top_of_le_ne_top ENNReal.one_ne_top hp1) + have hq1 : p.toReal ≤ 1 := ENNReal.toReal_le_of_le_ofReal zero_le_one (by simpa using hp1) + have hpos : (0 : ℝ) < 2 ^ j := by positivity + have hjh : 2 ^ j * h ≤ 1 := by + rw [le_div_iff₀ hpos] at hh + linarith + have hd : higherDiff 1 h u x = u (x + h) - u x := higherDiff_succ 0 h u x + have hxn : x ∈ dyadicIco j ⌊2 ^ j * x⌋₊ := + mem_dyadicIco.2 ⟨Nat.floor_le (by positivity), Nat.lt_floor_add_one _⟩ + rw [hd, stripBound, hu _ x hxn] + have hxn' := mem_dyadicIco.1 hxn + have hexp : 2 ^ j * (x + h) = 2 ^ j * x + 2 ^ j * h := mul_add _ _ _ + have hh2 : 0 ≤ 2 ^ j * h := mul_nonneg hpos.le hh0 + split_ifs with hbad + · rw [Nat.cast_one, one_mul, div_le_iff₀ hpos] at hbad + have hxh : x + h ∈ dyadicIco j (⌊2 ^ j * x⌋₊ + 1) := by + rw [mem_dyadicIco] + push_cast + constructor <;> linarith + rw [hu _ _ hxh, one_mul] + calc ‖v (⌊2 ^ j * x⌋₊ + 1) - v ⌊2 ^ j * x⌋₊‖ₑ ^ p.toReal + ≤ (‖v (⌊2 ^ j * x⌋₊ + 1)‖ₑ + ‖v ⌊2 ^ j * x⌋₊‖ₑ) ^ p.toReal := + ENNReal.rpow_le_rpow eNorm_sub_le hq.le + _ ≤ ‖v (⌊2 ^ j * x⌋₊ + 1)‖ₑ ^ p.toReal + ‖v ⌊2 ^ j * x⌋₊‖ₑ ^ p.toReal := + ENNReal.rpow_add_le_add_rpow _ _ hq.le hq1 + _ = _ := add_comm _ _ + · rw [Nat.cast_one, one_mul, not_le, lt_div_iff₀ hpos] at hbad + have hxh : x + h ∈ dyadicIco j ⌊2 ^ j * x⌋₊ := by + rw [mem_dyadicIco] + constructor <;> linarith + rw [hu _ _ hxh, sub_self, eNorm_zero, ENNReal.zero_rpow_of_pos hq] + +/-- **The `L_p` quasi-norm of a step function**: if `u = v_n` on `I_{j,n}` for `n < 2^j`, then +`∫_0^1 |u|^r = 2^(-j) ∑_{n<2^j} |v_n|^r` for every exponent `r`. -/ +theorem lintegral_rpow_eq_of_step {j : ℕ} {u : ℝ → ℂ} {v : ℕ → ℂ} + (hu : ∀ n < 2 ^ j, ∀ x ∈ dyadicIco j n, u x = v n) (r : ℝ) : + ∫⁻ x in Icc 0 1, ‖u x‖ₑ ^ r = ((2 : ℝ≥0∞) ^ j)⁻¹ * ∑ n ∈ Finset.range (2 ^ j), ‖v n‖ₑ ^ r := by + rw [lintegral_unit_eq_sum_dyadicIco _ j, Finset.mul_sum] + refine Finset.sum_congr rfl fun n hn => ?_ + rw [setLIntegral_congr_fun (measurableSet_dyadicIco j n) fun x hx => by + rw [hu n (Finset.mem_range.1 hn) x hx], setLIntegral_const, volume_dyadicIco_eq_inv, mul_comm] + +/-- **The inverse estimate for a step function of level `j`**: let `0 < p ≤ 1`, let `u` take the +value `v_n` on `I_{j,n}` for every `n ∈ ℕ`, with `v_{2^j} = 0`, and let `0 ≤ h ≤ 2^(-j)`. Then +`‖Δ_h u‖_{L_p[0, 1]} ≤ (2 · 2^j h)^(1/p) ‖u‖_{L_p[0, 1]}`. The strip function of +`Interval.enorm_higherDiff_one_rpow_le_stripBound` has the masses `M_n = |v_n|^p + |v_{n+1}|^p`, +whose sum over `n < 2^j` is at most `2 ∑_{n<2^j} |v_n|^p`, and the strip integral +`Interval.eLpNorm_le_of_strip` with `r = 1` gives the bound. -/ +theorem eLpNorm_higherDiff_one_le_of_step (hp0 : p ≠ 0) (hp1 : p ≤ 1) {j : ℕ} {u : ℝ → ℂ} + (hum : Measurable u) {v : ℕ → ℂ} (hu : ∀ n : ℕ, ∀ x ∈ dyadicIco j n, u x = v n) + (hv : v (2 ^ j) = 0) {h : ℝ} (hh0 : 0 ≤ h) (hh : h ≤ 1 / 2 ^ j) : + eLpNorm (higherDiff 1 h u) p unitVol ≤ + (2 * ENNReal.ofReal (2 ^ j * h)) ^ (1 / p.toReal) * eLpNorm u p unitVol := by + have hp : p ≠ ∞ := ne_top_of_le_ne_top ENNReal.one_ne_top hp1 + have hq : 0 < p.toReal := ENNReal.toReal_pos hp0 hp + set a : ℕ → ℝ≥0∞ := fun n => ‖v n‖ₑ ^ p.toReal with ha_def + set T := ∑ n ∈ Finset.range (2 ^ j), a n with hT + have ha : a (2 ^ j) = 0 := by simp only [ha_def, hv, eNorm_zero, ENNReal.zero_rpow_of_pos hq] + have hB : ∑ n ∈ Finset.range (2 ^ j), (a n + a (n + 1)) ≤ + (((1 : ℕ) : ℝ≥0∞) + 1) * (T ^ (1 / p.toReal)) ^ p.toReal := by + rw [← ENNReal.rpow_mul, one_div_mul_cancel hq.ne', ENNReal.rpow_one, Nat.cast_one, + one_add_one_eq_two, two_mul, Finset.sum_add_distrib] + refine add_le_add le_rfl ?_ + calc ∑ n ∈ Finset.range (2 ^ j), a (n + 1) + ≤ ∑ n ∈ Finset.range (2 ^ j), a (n + 1) + a 0 := le_self_add + _ = T + a (2 ^ j) := by rw [hT, ← Finset.sum_range_succ', Finset.sum_range_succ] + _ = T := by rw [ha, add_zero] + refine (eLpNorm_le_of_strip hp0 hp subset_rfl (measurable_higherDiff hum 1 h).aestronglyMeasurable + (r := 1) (h := h) (G := 1) (M := fun n => a n + a (n + 1)) ?_ hB).trans_eq ?_ + · filter_upwards [ae_restrict_mem measurableSet_Icc] with x hx + rw [ENNReal.one_rpow] + exact enorm_higherDiff_one_rpow_le_stripBound hp0 hp1 hu hh0 hh hx.1 + have hpinv : (0 : ℝ) ≤ 1 / p.toReal := by positivity + rw [eLpNorm_eq_lintegral_rpow_eNorm_toReal hp0 hp hum.aestronglyMeasurable, + lintegral_rpow_eq_of_step (fun n _ => hu n)] + simp only [Nat.cast_one, one_mul] + rw [← ENNReal.mul_rpow_of_nonneg _ _ hpinv, ← ENNReal.mul_rpow_of_nonneg _ _ hpinv] + congr 1 + rw [ENNReal.ofReal_mul (by positivity), ENNReal.ofReal_pow zero_le_two, ENNReal.ofReal_ofNat] + calc ENNReal.ofReal h * (1 + 1) * T = 2 * ENNReal.ofReal h * T * (2 ^ j * (2 ^ j)⁻¹) := by + rw [ENNReal.mul_inv_cancel (pow_ne_zero j two_ne_zero) + (ENNReal.pow_ne_top ENNReal.ofNat_ne_top), mul_one] + ring + _ = 2 * (2 ^ j * ENNReal.ofReal h) * ((2 ^ j)⁻¹ * T) := by ring + +/-! ### The line on a dyadic interval -/ + +/-- **The line is far from constants on every dyadic interval**: for every `c ∈ ℂ` and every +exponent `r ≥ 0`, `∫_{I_{j,n}} |x - c|^r dx ≥ (2^(-j)/4)^r · 2^(-j)/2`, since at most half of +`I_{j,n}` lies within `2^(-j)/4` of `Re c`. -/ +theorem le_lintegral_dyadicIco_enorm_sub_rpow (j n : ℕ) (c : ℂ) {r : ℝ} (hr : 0 ≤ r) : + ENNReal.ofReal (1 / 2 ^ j / 4) ^ r * ENNReal.ofReal (1 / 2 ^ j / 2) ≤ + ∫⁻ x in dyadicIco j n, ‖(x : ℂ) - c‖ₑ ^ r := by + set δ : ℝ := 1 / 2 ^ j with hδ + have hδ0 : 0 < δ := by positivity + set B := Ioo (c.re - δ / 4) (c.re + δ / 4) + have hvol : ENNReal.ofReal (δ / 2) ≤ volume (dyadicIco j n \ B) := by + calc ENNReal.ofReal (δ / 2) = volume (dyadicIco j n) - volume B := by + rw [volume_dyadicIco, Real.volume_Ioo, ← ENNReal.ofReal_sub _ (by linarith)] + congr 1 + ring + _ ≤ volume (dyadicIco j n \ B) := le_measure_sdiff + calc ENNReal.ofReal (δ / 4) ^ r * ENNReal.ofReal (δ / 2) + ≤ ENNReal.ofReal (δ / 4) ^ r * volume (dyadicIco j n \ B) := by gcongr + _ = ∫⁻ _ in dyadicIco j n \ B, ENNReal.ofReal (δ / 4) ^ r := (setLIntegral_const _ _).symm + _ ≤ ∫⁻ x in dyadicIco j n \ B, ‖(x : ℂ) - c‖ₑ ^ r := by + refine setLIntegral_mono' ((measurableSet_dyadicIco j n).diff measurableSet_Ioo) + fun x hx => ENNReal.rpow_le_rpow ?_ hr + rw [← ofReal_norm] + refine ENNReal.ofReal_le_ofReal ?_ + have hre : |x - c.re| ≤ ‖(x : ℂ) - c‖ := by simpa using Complex.abs_re_le_norm ((x : ℂ) - c) + have hfar : δ / 4 ≤ |x - c.re| := by + by_contra H + obtain ⟨h1, h2⟩ := abs_lt.1 (not_le.1 H) + exact hx.2 ⟨by linarith, by linarith⟩ + linarith + _ ≤ ∫⁻ x in dyadicIco j n, ‖(x : ℂ) - c‖ₑ ^ r := lintegral_mono_set sdiff_subset + +end Interval + +/-! ### The couple of dyadic step functions -/ + +namespace Haar + +open Interval + +variable {p : ℝ≥0∞} + +variable (p) in +/-- The **couple of dyadic step functions** in `L_p[0, 1]`, for every `p`: the quasi-norm +`N₀(f) = ‖f‖_p` and the complexity of the subgroups `V_j` of `ℱ_j`-measurable elements, the step +functions on the dyadic intervals of level `j`, with `V_j` at complexity `2^j` +(`InterpCouple.ofMonotoneSubgroups`). It uses the group structure and the quasi-norm `‖·‖ₑ` of +`Lp`, which exist for every `p`; for `1 ≤ p` it is the complexity couple of the Haar scheme +`Haar.scheme` (`Haar.stepCouple_eq_complexityCouple`). -/ +noncomputable def stepCouple : InterpCouple (Lp ℂ p vol) := + InterpCouple.ofMonotoneSubgroups (fun f => ‖f‖ₑ) + (fun j => lpMeasSubgroup ℂ (dyadicFiltration j) p vol) + (dyadicFiltration.monotone_lpMeasSubgroup ℂ) + +/-- **The E-functional of the step couple at `t = 2^j`** is the error of best approximation by +step functions of level `j`: `E(2^j, f) = inf {‖f - b‖_p : b ∈ L_p, b ℱ_j-measurable}`. -/ +theorem eFunctional_stepCouple_two_pow (j : ℕ) (f : Lp ℂ p vol) : + (stepCouple p).eFunctional ((2 ^ j : ℕ) : ℝ≥0∞) f = + ⨅ b ∈ lpMeasSubgroup ℂ (dyadicFiltration j) p vol, ‖f - b‖ₑ := + InterpCouple.eFunctional_ofMonotoneSubgroups_two_pow j f + +/-- An element of complexity at most `2^j` in the step couple is `ℱ_j`-measurable, a step +function of level `j`. -/ +theorem mem_lpMeas_of_stepCouple_norm1_le {j : ℕ} {a : Lp ℂ p vol} + (ha : (stepCouple p).norm1 a ≤ ((2 ^ j : ℕ) : ℝ≥0∞)) : + a ∈ lpMeas ℂ ℝ (dyadicFiltration j) p vol := by + have h := InterpCouple.mem_of_complexity_norm1_le (N := fun f : Lp ℂ p vol => ‖f‖ₑ) + (InterpCouple.monotone_dyadicLevels (dyadicFiltration.monotone_lpMeasSubgroup ℂ)) ha + rw [InterpCouple.dyadicLevels_two_pow] at h + exact h + +/-- **For `1 ≤ p` the step couple is the complexity couple of the Haar scheme**: both are the +complexity couple of the norm of `L_p[0, 1]` and of the sets `{0}` at complexity `0` and the +`ℱ_⌊log₂ n⌋`-measurable elements at complexity `n ≥ 1`. -/ +theorem stepCouple_eq_complexityCouple [Fact (1 ≤ p)] : + stepCouple p = (scheme p).complexityCouple := by + have hS : InterpCouple.dyadicLevels (fun j => lpMeasSubgroup ℂ (dyadicFiltration j) p vol) = + (scheme p).sets := by + funext n + ext f + rcases eq_or_ne n 0 with rfl | hn + · rw [InterpCouple.dyadicLevels_zero, (scheme p).sets_zero] + · simp only [InterpCouple.dyadicLevels, hn, ↓reduceIte, SetLike.mem_coe] + rw [mem_lpMeasSubgroup_iff_aestronglyMeasurable] + exact mem_lpMeas_iff_aestronglyMeasurable.symm.trans (dyadicFiltration.mem_scheme hn).symm + change InterpCouple.complexity _ _ = InterpCouple.complexity _ _ + rw [hS] + +/-- **For `1 ≤ p` the spaces of the step couple are the approximation spaces of the Haar +scheme**: for `s ≥ 0` and `q ≠ 0` with `s > 0` or `q = ∞`, `f ∈ E_{s,q}` iff +`f ∈ A^s_q(L_p, Haar)` (`ApproximationScheme.memEMethod_complexityCouple_iff`). -/ +theorem memEMethod_stepCouple_iff_memApprox [Fact (1 ≤ p)] {s : ℝ} {q : ℝ≥0∞} (hs : 0 ≤ s) + (hsq : 0 < s ∨ q = ∞) (hq0 : q ≠ 0) {f : Lp ℂ p vol} : + (stepCouple p).MemEMethod s q f ↔ (scheme p).MemApprox s q f := by + rw [stepCouple_eq_complexityCouple] + exact ApproximationScheme.memEMethod_complexityCouple_iff hs hsq hq0 + +/-! ### Jackson's inequality by averaging -/ + +/-- **Jackson's inequality for dyadic steps in `L_p`, `0 < p < ∞`, by averaging**: +`E(2^j, f) ≤ 2^(1/p) ω_1(f, 2^(-j), [0, 1])_p` in the step couple. The step function takes on +each dyadic interval a value `f(y_n)` at least as good as the average +(`Interval.exists_ppFun_lintegral_le`), and the double integrals over the dyadic squares add up to +at most `2 ω_1(f, 2^(-j))_p^p` (`Interval.two_pow_mul_sum_lintegral_le_modulus`). The proof +averages pointwise and uses Tonelli's theorem, so it holds for every `0 < p < ∞`; at `p = 0` the +quasi-norm vanishes. -/ +theorem eFunctional_stepCouple_le (hp : p ≠ ∞) (f : Lp ℂ p vol) (j : ℕ) : + (stepCouple p).eFunctional ((2 ^ j : ℕ) : ℝ≥0∞) f ≤ + 2 ^ (1 / p.toReal) * lpModulus p 1 f j := by + rcases eq_or_ne p 0 with rfl | hp0 + · refine (InterpCouple.eFunctional_le + (InterpCouple.ofMonotoneSubgroups_norm1_zero.trans_le zero_le)).trans ?_ + simp + have hq : 0 < p.toReal := ENNReal.toReal_pos hp0 hp + have hF : Measurable (f : ℝ → ℂ) := (Lp.stronglyMeasurable f).measurable + obtain ⟨c, hc⟩ := exists_ppFun_lintegral_le hF p.toReal j + have hQ : ∀ n, C (c n) ∈ degreeLT ℂ 1 := fun n => + mem_degreeLT.2 (degree_C_le.trans_lt (by norm_num)) + have hu : MemLp (ppFun j fun n => C (c n)) p vol := memLp_ppFun j _ p + have hb : hu.toLp _ ∈ lpMeasSubgroup ℂ (dyadicFiltration j) p vol := + mem_lpMeasSubgroup_iff_aestronglyMeasurable.2 ⟨stepFun (ppFun j fun n => C (c n)) j, + stronglyMeasurable_stepFun _ j, (MemLp.coeFn_toLp hu).trans (ppFun_ae_eq_stepFun hQ j)⟩ + rw [eFunctional_stepCouple_two_pow] + refine (iInf₂_le _ hb).trans ?_ + rw [Lp.eNorm_def, eLpNorm_congr_ae ((Lp.coeFn_sub f _).trans + (Filter.EventuallyEq.sub Filter.EventuallyEq.rfl (MemLp.coeFn_toLp hu)))] + refine eLpNorm_le_of_lintegral_le (hF.sub (measurable_ppFun j _)).aestronglyMeasurable hp0 hp ?_ + calc ∫⁻ x, ‖((f : ℝ → ℂ) - ppFun j fun n => C (c n)) x‖ₑ ^ p.toReal ∂vol + ≤ 2 ^ j * ∑ n ∈ Finset.range (2 ^ j), + ∫⁻ y in dyadicIco j n, ∫⁻ x in dyadicIco j n, ‖f x - f y‖ₑ ^ p.toReal := hc + _ ≤ 2 * lpModulus p 1 f j ^ p.toReal := two_pow_mul_sum_lintegral_le_modulus hp0 hp hF j + _ = (2 ^ (1 / p.toReal) * lpModulus p 1 f j) ^ p.toReal := by + rw [ENNReal.mul_rpow_of_nonneg _ _ hq.le, ← ENNReal.rpow_mul, one_div_mul_cancel hq.ne', + ENNReal.rpow_one] + +/-! ### The inverse inequality for jumps -/ + +/-- **The inverse inequality for dyadic steps in `L_p`, `0 < p ≤ 1`**, of order `1/p`: for an +`ℱ_j`-measurable `a ∈ L_p[0, 1]` and every `k`, +`ω_1(a, 2^(-k), [0, 1])_p ≤ 2^(1/p) 2^(-(k-j)/p) ‖a‖_p`, with `k - j` truncated at `0`. A +difference of first order of a step function lives on the strips at its jumps +(`Interval.enorm_higherDiff_one_rpow_le_stripBound`), so the order is `1/p`; DeVore–Popov's +general order `min(r, r - 1 + 1/p)` (their Theorem 4.8) is `1` for `r = 1`. -/ +theorem lpModulus_le_of_mem_lpMeas (hp0 : p ≠ 0) (hp1 : p ≤ 1) {j k : ℕ} {a : Lp ℂ p vol} + (ha : a ∈ lpMeas ℂ ℝ (dyadicFiltration j) p vol) : + lpModulus p 1 a k ≤ 2 ^ (1 / p.toReal) * dyadicWeight (-(1 / p.toReal)) (k - j) * ‖a‖ₑ := by + rcases lt_or_ge k j with hkj | hjk + · rw [Nat.sub_eq_zero_of_le hkj.le, ENNReal.dyadicWeight_zero_right, mul_one] + exact (lpModulus_le_of_le_one hp1 1 a k).trans_eq (by rw [Nat.cast_one]) + obtain ⟨g, hg, hag⟩ := mem_lpMeas_iff_aestronglyMeasurable.1 ha + have hae : (a : ℝ → ℂ) =ᵐ[vol] ppFun j fun m => C (g ((m : ℝ) / 2 ^ j)) := + hag.trans (ae_eq_ppFun_of_stronglyMeasurable hg) + have hu : ∀ n : ℕ, ∀ x ∈ dyadicIco j n, ppFun j (fun m => C (g ((m : ℝ) / 2 ^ j))) x = + if n < 2 ^ j then g ((n : ℝ) / 2 ^ j) else 0 := fun n x hx => by + rw [ppFun_eq_polyFun _ hx] + split_ifs <;> simp [polyFun] + have hnorm : ‖a‖ₑ = eLpNorm (ppFun j fun m => C (g ((m : ℝ) / 2 ^ j))) p vol := by + rw [Lp.eNorm_def] + exact eLpNorm_congr_ae hae + rw [lpModulus, modulus_congr_ae hae, hnorm, modulus_eq_iSup_nonneg] + refine iSup₂_le fun h hh => ?_ + have hhj : h ≤ 1 / 2 ^ j := hh.2.trans (one_div_le_one_div_of_le (by positivity) + (pow_le_pow_right₀ (by norm_num) hjk)) + have hsub : Icc (0 : ℝ) (1 - ((1 : ℕ) : ℝ) * h) ⊆ Icc 0 1 := + Icc_subset_Icc le_rfl (sub_le_self _ (mul_nonneg (Nat.cast_nonneg 1) hh.1)) + refine (eLpNorm_mono_measure _ (Measure.restrict_mono hsub le_rfl)).trans + ((eLpNorm_higherDiff_one_le_of_step hp0 hp1 (measurable_ppFun j _) hu + (by simp) hh.1 hhj).trans ?_) + rw [ENNReal.mul_rpow_of_nonneg _ _ (by positivity)] + gcongr + exact ENNReal.ofReal_two_pow_mul_rpow_le hjk hh.2 (by positivity) + +/-! ### The coincidence theorem -/ + +/-- **The first modulus is compatible with the step couple in `L_p`, `0 < p ≤ 1`**, with the +exponent `ρ = p` (the `p`-th power of the quasi-norm is subadditive) and inverse order +`θ = 1/p`: `ω_1(f, 2^(-k), [0, 1])_p ≤ 2^(1/p) ‖f‖_p`, Jackson's inequality +`E(2^k, f) ≤ 2^(1/p) ω_1(f, 2^(-k))_p` (`Haar.eFunctional_stepCouple_le`) and the inverse +inequality `ω_1(a, 2^(-k))_p ≤ 2^(1/p) 2^(-(k-j)/p) ‖a‖_p` for steps `a` of level `j` +(`Haar.lpModulus_le_of_mem_lpMeas`). -/ +noncomputable def stepModulusData (hp0 : p ≠ 0) (hp1 : p ≤ 1) : + (stepCouple p).ModulusData p.toReal (1 / p.toReal) where + rho_pos := ENNReal.toReal_pos hp0 (ne_top_of_le_ne_top ENNReal.one_ne_top hp1) + norm0_zero := Lp.eNorm_zero + norm0_neg := Lp.eNorm_neg + norm0_add_rpow_le := Lp.enorm_add_rpow_le_of_le_one hp1 + norm1_zero := InterpCouple.ofMonotoneSubgroups_norm1_zero + norm1_neg := InterpCouple.ofMonotoneSubgroups_norm1_neg + norm1_add_le := InterpCouple.ofMonotoneSubgroups_norm1_add_le + modulus f k := lpModulus p 1 f k + add_rpow_le f g k := lpModulus_add_rpow_le hp1 1 f g k + C0 := 2 ^ (1 / p.toReal) + C0_ne_top := ENNReal.two_rpow_ne_top _ + le_norm0 f k := (lpModulus_le_of_le_one hp1 1 f k).trans_eq (by rw [Nat.cast_one]; rfl) + CJ := 2 ^ (1 / p.toReal) + CJ_ne_top := ENNReal.two_rpow_ne_top _ + jackson f k := eFunctional_stepCouple_le (ne_top_of_le_ne_top ENNReal.one_ne_top hp1) f k + CB := 2 ^ (1 / p.toReal) + CB_ne_top := ENNReal.two_rpow_ne_top _ + inverse _ _ _ ha := lpModulus_le_of_mem_lpMeas hp0 hp1 (mem_lpMeas_of_stepCouple_norm1_le ha) + +variable {s : ℝ} {q : ℝ≥0∞} + +/-- **Dyadic steps in `L_p`, `0 < p ≤ 1`, in dyadic form**: for `0 ≤ s < 1/p` and every `q`, +`‖f‖_p + ‖(2^(ks) E(2^k, f))_k‖_{ℓ_q}` is finite iff the Besov quasi-norm of the first modulus +`‖f‖_p + ‖(2^(ks) ω_1(f, 2^(-k), [0, 1])_p)_k‖_{ℓ_q}` is finite. -/ +theorem eNormDyadic_stepCouple_lt_top_iff_modulus (hp0 : p ≠ 0) (hp1 : p ≤ 1) (hs : 0 ≤ s) + (hsp : s < 1 / p.toReal) (f : Lp ℂ p vol) : + (stepCouple p).eNormDyadic s q f < ∞ ↔ + ‖f‖ₑ + lqNorm q (fun k => dyadicWeight s k * lpModulus p 1 f k) < ∞ := + (stepModulusData hp0 hp1).eNormDyadic_lt_top_iff hs hsp f + +/-- **Approximation by dyadic step functions in `L_p[0, 1]`, `0 < p ≤ 1`.** For `q ≠ 0` and +`0 < s < 1/p`, `f ∈ L_p[0, 1]` lies in the approximation space `E_{s,q}` of the step couple +(`A^s_q(L_p, steps)`) iff +`‖f‖_p + ‖(2^(ks) ω_1(f, 2^(-k), [0, 1])_p)_k‖_{ℓ_q} < ∞`, the space `B^s_{p,q,1}[0, 1]` of the +first modulus (Oswald 1980, Theorem 6; Oswald 2018, (7)). For `s < 1` this is the Besov space of +DeVore–Popov (1988), (2.4) with `r = 1` (their Theorem 5.1 at `r = 1`); for `1/p - 1 < s < 1` +and `q < ∞` it is also the Fourier-analytic `B^s_{p,q}[0, 1]` (Oswald 2018, (2)); for `s > 1`, +and for `s = 1` with `q < ∞`, it misses the line `x ↦ x`, whose second modulus vanishes +(`Haar.not_memEMethod_stepCouple_idLp`). -/ +theorem memEMethod_stepCouple_iff_modulus (hp0 : p ≠ 0) (hp1 : p ≤ 1) (hq0 : q ≠ 0) + (hs : 0 < s) (hsp : s < 1 / p.toReal) (f : Lp ℂ p vol) : + (stepCouple p).MemEMethod s q f ↔ + ‖f‖ₑ + lqNorm q (fun k => dyadicWeight s k * lpModulus p 1 f k) < ∞ := + (stepModulusData hp0 hp1).memEMethod_iff_modNorm_lt_top + (fun _ hb => InterpCouple.eq_zero_of_ofMonotoneSubgroups_norm1_lt_one hb) hq0 hs hsp f + +/-! ### The line `x ↦ x` -/ + +variable (p) in +/-- The class of the line `x ↦ x` in `L_p[0, 1]`. -/ +noncomputable def idLp : Lp ℂ p vol := (memLp_polyFun X p 0 1).toLp (polyFun X) + +/-- **The line has vanishing second modulus in `L_p[0, 1]`**: +`ω_2(x ↦ x, 2^(-k), [0, 1])_p = 0` for every `p` and `k` (`Interval.modulus_two_id`). -/ +theorem lpModulus_two_idLp (k : ℕ) : lpModulus p 2 (idLp p) k = 0 := by + have hX : polyFun X = fun x : ℝ => (x : ℂ) := funext fun x => by simp [polyFun] + rw [lpModulus, idLp, modulus_congr_ae (MemLp.coeFn_toLp _), hX] + exact modulus_two_id p _ + +/-- **The line is far from the steps of level `j`**: for `0 < p < ∞`, +`E(2^j, x)_p ≥ 2^(-1/p) 2^(-j)/4` in the step couple, since every step function `b` of level `j` +has `‖x - b‖_p^p ≥ 2^j (2^(-j)/4)^p 2^(-j)/2` (`Interval.le_lintegral_dyadicIco_enorm_sub_rpow`). +-/ +theorem le_eFunctional_stepCouple_idLp (hp0 : p ≠ 0) (hp : p ≠ ∞) (j : ℕ) : + ENNReal.ofReal (1 / 2) ^ (1 / p.toReal) * ENNReal.ofReal (1 / 2 ^ j / 4) ≤ + (stepCouple p).eFunctional ((2 ^ j : ℕ) : ℝ≥0∞) (idLp p) := by + have hq : 0 < p.toReal := ENNReal.toReal_pos hp0 hp + rw [eFunctional_stepCouple_two_pow] + refine le_iInf₂ fun b hb => ?_ + obtain ⟨g, hg, hbg⟩ := mem_lpMeasSubgroup_iff_aestronglyMeasurable.1 hb + set u := ppFun j fun m => C (g ((m : ℝ) / 2 ^ j)) + have hae : ⇑(idLp p - b) =ᵐ[vol] polyFun X - u := (Lp.coeFn_sub _ _).trans + ((MemLp.coeFn_toLp _).sub (hbg.trans (ae_eq_ppFun_of_stronglyMeasurable hg))) + have hcount : ((2 ^ j : ℕ) : ℝ≥0∞) * ENNReal.ofReal (1 / 2 ^ j / 2) = ENNReal.ofReal (1 / 2) := by + rw [← ENNReal.ofReal_natCast, ← ENNReal.ofReal_mul (Nat.cast_nonneg _)] + congr 1 + push_cast + field_simp + rw [Lp.eNorm_def, eLpNorm_congr_ae hae, ← ENNReal.rpow_le_rpow_iff hq, + eLpNorm_rpow_eq ((measurable_polyFun X).sub (measurable_ppFun j _)).aestronglyMeasurable hp0 hp, + ENNReal.mul_rpow_of_nonneg _ _ hq.le, ← ENNReal.rpow_mul, one_div_mul_cancel hq.ne', + ENNReal.rpow_one, ← hcount] + calc ((2 ^ j : ℕ) : ℝ≥0∞) * ENNReal.ofReal (1 / 2 ^ j / 2) * + ENNReal.ofReal (1 / 2 ^ j / 4) ^ p.toReal + = ∑ n ∈ Finset.range (2 ^ j), + ENNReal.ofReal (1 / 2 ^ j / 4) ^ p.toReal * ENNReal.ofReal (1 / 2 ^ j / 2) := by + rw [Finset.sum_const, Finset.card_range, nsmul_eq_mul] + ring + _ ≤ ∑ n ∈ Finset.range (2 ^ j), ∫⁻ x in dyadicIco j n, ‖(polyFun X - u) x‖ₑ ^ p.toReal := + Finset.sum_le_sum fun n hn => by + have hc : ∀ x ∈ dyadicIco j n, ‖(polyFun X - u) x‖ₑ ^ p.toReal = + ‖(x : ℂ) - g ((n : ℝ) / 2 ^ j)‖ₑ ^ p.toReal := fun x hx => by + simp only [u, Pi.sub_apply, ppFun_eq_of_mem _ (Finset.mem_range.1 hn) hx, polyFun, + eval_X, eval_C] + rw [setLIntegral_congr_fun (measurableSet_dyadicIco j n) hc] + exact le_lintegral_dyadicIco_enorm_sub_rpow j n _ hq.le + _ = ∫⁻ x in Icc 0 1, ‖(polyFun X - u) x‖ₑ ^ p.toReal := + (lintegral_unit_eq_sum_dyadicIco _ j).symm + +/-- **The line is not approximated by steps at a rate `s > 1`, nor at the rate `1` in `ℓ_q`, +`q < ∞`**: for `0 < p < ∞`, `q ≠ 0` and `s ≥ 1` with `s > 1` or `q < ∞`, the line `x ↦ x` does +not lie in `E_{s,q}` of the step couple. By `Haar.le_eFunctional_stepCouple_idLp`, +`2^(ks) E(2^k, x)_p ≥ 2^(-1/p) 2^(k(s-1))/4`, which is unbounded for `s > 1` and bounded below by +a positive constant for `s = 1`. Its second modulus vanishes (`Haar.lpModulus_two_idLp`), so for +these `s < 1/p` the space of `Haar.memEMethod_stepCouple_iff_modulus` differs from the space +defined by the second modulus. -/ +theorem not_memEMethod_stepCouple_idLp (hp0 : p ≠ 0) (hp : p ≠ ∞) (hq0 : q ≠ 0) (hs : 1 ≤ s) + (hsq : 1 < s ∨ q ≠ ∞) : ¬ (stepCouple p).MemEMethod s q (idLp p) := by + intro hmem + rw [InterpCouple.memEMethod_iff_eNormDyadic_lt_top (A := stepCouple p) + InterpCouple.ofMonotoneSubgroups_norm1_zero + (fun _ hb => InterpCouple.eq_zero_of_ofMonotoneSubgroups_norm1_lt_one hb) (by linarith) + (Or.inl (by linarith)) hq0] at hmem + set N := (stepCouple p).eNormDyadic s q (idLp p) + set c := ENNReal.ofReal (1 / 2) ^ (1 / p.toReal) * ENNReal.ofReal (1 / 4) + have hc0 : c ≠ 0 := mul_ne_zero + (ENNReal.rpow_pos (ENNReal.ofReal_pos.2 (by norm_num)) ENNReal.ofReal_ne_top).ne' + (ENNReal.ofReal_pos.2 (by norm_num)).ne' + have hct : c ≠ ∞ := ENNReal.mul_ne_top + (ENNReal.rpow_ne_top_of_nonneg (by positivity) ENNReal.ofReal_ne_top) ENNReal.ofReal_ne_top + have hE : ∀ k : ℕ, c * dyadicWeight (s - 1) k ≤ + dyadicWeight s k * (stepCouple p).eFunctional ((2 ^ k : ℕ) : ℝ≥0∞) (idLp p) := fun k => by + have hk : ENNReal.ofReal (1 / 2 ^ k / 4) = dyadicWeight (-1) k * ENNReal.ofReal (1 / 4) := by + rw [div_eq_mul_one_div (1 / 2 ^ k), ENNReal.ofReal_mul (by positivity), ← Real.rpow_one + (1 / 2 ^ k), ENNReal.ofReal_one_div_two_pow_rpow] + calc c * dyadicWeight (s - 1) k = dyadicWeight s k * + (ENNReal.ofReal (1 / 2) ^ (1 / p.toReal) * ENNReal.ofReal (1 / 2 ^ k / 4)) := by + rw [hk, sub_eq_add_neg, ENNReal.dyadicWeight_add] + ring + _ ≤ _ := by + gcongr + exact le_eFunctional_stepCouple_idLp hp0 hp k + have hlq : lqNorm q (fun k : ℕ => dyadicWeight s k * + (stepCouple p).eFunctional ((2 ^ k : ℕ) : ℝ≥0∞) (idLp p)) ≤ N := le_add_self + rcases hs.lt_or_eq with hs1 | rfl + · obtain ⟨J, hJ⟩ := ENNReal.exists_dyadicWeight_neg_mul_le (sub_pos.2 hs1) hmem.ne + (ENNReal.half_pos hc0).ne' + have hcc : c ≤ c / 2 := calc + c = dyadicWeight (-(s - 1)) J * (c * dyadicWeight (s - 1) J) := by + rw [mul_left_comm, mul_comm (dyadicWeight (-(s - 1)) J), + ENNReal.dyadicWeight_mul_neg_self, mul_one] + _ ≤ dyadicWeight (-(s - 1)) J * N := by + gcongr + exact (hE J).trans ((ENNReal.le_lqNorm hq0 _ J).trans hlq) + _ ≤ c / 2 := hJ + exact absurd hcc (not_le.2 (ENNReal.half_lt_self hc0 hct)) + · have hq : q ≠ ∞ := hsq.resolve_left (lt_irrefl 1) + have hconst : lqNorm q (fun _ : ℕ => c) = ∞ := by + rw [ENNReal.lqNorm_eq_tsum hq0 hq, ENNReal.tsum_const_eq_top_of_ne_zero + (ENNReal.rpow_pos (pos_iff_ne_zero.2 hc0) hct).ne', + ENNReal.top_rpow_of_pos (one_div_pos.2 (ENNReal.toReal_pos hq0 hq))] + have hle : lqNorm q (fun _ : ℕ => c) ≤ N := (ENNReal.lqNorm_mono fun k => by + simpa only [sub_self, ENNReal.dyadicWeight_zero_left, mul_one] using hE k).trans hlq + exact absurd hmem (not_lt.2 (hconst ▸ hle)) + +end Haar diff --git a/LeanPool/FunctionSpaces/Wavelets/Examples/Haar.lean b/LeanPool/FunctionSpaces/Wavelets/Examples/Haar.lean new file mode 100644 index 0000000000..e4e6e179f1 --- /dev/null +++ b/LeanPool/FunctionSpaces/Wavelets/Examples/Haar.lean @@ -0,0 +1,485 @@ +/- +Copyright (c) 2026 Mario Ullrich. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Mario Ullrich +-/ +module + +public import LeanPool.FunctionSpaces.MeasureSpaces.Martingales.Filtration +public import LeanPool.FunctionSpaces.MeasureSpaces.Martingales.Partition +public import LeanPool.FunctionSpaces.Domains.Interval.PiecewisePoly +public import LeanPool.FunctionSpaces.Wavelets.DyadicNormalisation +public import LeanPool.FunctionSpaces.ApproximationSpaces.Decompositions.Atomic +public import Mathlib.MeasureTheory.Function.Floor +public import Mathlib.MeasureTheory.Measure.Lebesgue.Basic +public import Mathlib.MeasureTheory.Function.ContinuousMapDense + +/- +Modified for Lean Pool: module names and imports adapted. +-/ + +/-! +# The Haar system on `[0, 1]` + +The dyadic intervals of level `j` are `I_{j,n} = [n 2^(-j), (n + 1) 2^(-j))`, the fibres of +`x ↦ ⌊2^j x⌋` (`Haar.dyadicInterval`; for `n ∈ ℕ` this is `Interval.dyadicIco j n`). They +generate the dyadic σ-algebras `ℱ_j`, an increasing filtration of `ℝ` (`Haar.dyadicFiltration`), +and on `[0, 1]` with Lebesgue measure (`Haar.vol`, which is `Interval.unitVol`) the +conditional expectation `E[f | ℱ_j]` is the average of `f` over the dyadic interval of level `j` +(`Haar.condExp_dyadic_ae_eq`, from the general formula `MeasureTheory.condExp_comap_ae_eq` for +countable partitions). The filtration scheme `MeasureTheory.Filtration.scheme` is then the +scheme of dyadic step functions (`Haar.scheme`). + +The Haar function `h_{j,m} = 2^(j/2) (1_{I_{j+1,2m}} - 1_{I_{j+1,2m+1}})` +(`Haar.haarFunction`) lives on `I_{j,m}`, and the martingale differences are Haar sums of one +level (`Haar.condExpLp_succ_sub_ae_eq`): + +`E[f | ℱ_{k+1}] - E[f | ℱ_k] = ∑_{m < 2^k} ⟨f, h_{k,m}⟩ h_{k,m}`. + +The Haar functions of one level have disjoint supports, so +`‖∑_m c_m h_{j,m}‖_p = 2^(j(1/2 - 1/p)) ‖c‖_{ℓ_p}` (`Haar.eLpNorm_sum_haar`). With the density +of dyadic step functions in `L_p[0, 1]`, `p < ∞` (`Haar.closure_iUnion_scheme`), the +martingale-difference characterisation of filtration schemes becomes the **Haar coefficient +characterisation** (`Haar.memApprox_iff_haarCoeff`): for `s > 0`, + +`f ∈ A^s_q(L_p[0, 1], Haar)` iff +`|∫ f| + ‖(2^(k(s + 1/2 - 1/p)) ‖(⟨f, h_{k,m}⟩)_m‖_{ℓ_p})_k‖_{ℓ_q} < ∞`. +-/ + +@[expose] public section + +open MeasureTheory Set +open scoped ENNReal BoundedContinuousFunction + +namespace Haar + +/-- Lebesgue measure on `[0, 1]`, as a measure on `ℝ` (`Interval.unitVol`). -/ +noncomputable abbrev vol : Measure ℝ := Interval.unitVol + +/-- The index `⌊2^j x⌋` of the dyadic interval of level `j` containing `x`. -/ +noncomputable def dyadicIndex (j : ℕ) (x : ℝ) : ℤ := ⌊(2 : ℝ) ^ j * x⌋ + +/-- The dyadic interval `I_{j,n} = [n 2^(-j), (n + 1) 2^(-j))`, the fibre of `dyadicIndex j` +over `n` (`Haar.dyadicInterval_eq_Ico`). -/ +noncomputable def dyadicInterval (j : ℕ) (n : ℤ) : Set ℝ := dyadicIndex j ⁻¹' {n} + +/-- `x ∈ I_{j,n}` iff `⌊2^j x⌋ = n`. -/ +theorem mem_dyadicInterval {j : ℕ} {n : ℤ} {x : ℝ} : + x ∈ dyadicInterval j n ↔ dyadicIndex j x = n := Iff.rfl + +/-- The dyadic index is measurable. -/ +theorem measurable_dyadicIndex (j : ℕ) : Measurable (dyadicIndex j) := + Int.measurable_floor.comp (measurable_const_mul _) + +/-- Dyadic intervals are measurable. -/ +theorem measurableSet_dyadicInterval (j : ℕ) (n : ℤ) : MeasurableSet (dyadicInterval j n) := + measurable_dyadicIndex j (measurableSet_singleton n) + +/-- `I_{j,n} = [n 2^(-j), (n + 1) 2^(-j))`. -/ +theorem dyadicInterval_eq_Ico (j : ℕ) (n : ℤ) : + dyadicInterval j n = Ico ((n : ℝ) / 2 ^ j) ((n + 1) / 2 ^ j) := by + ext x + have h : (0 : ℝ) < 2 ^ j := by positivity + rw [mem_dyadicInterval, dyadicIndex, Int.floor_eq_iff, mem_Ico, div_le_iff₀ h, lt_div_iff₀ h, + mul_comm x] + +/-- For `n ∈ ℕ` the dyadic interval `I_{j,n}` is `Interval.dyadicIco j n`. -/ +theorem dyadicInterval_natCast (j n : ℕ) : dyadicInterval j n = Interval.dyadicIco j n := by + rw [dyadicInterval_eq_Ico, Int.cast_natCast] + rfl + +/-- Dyadic intervals of the same level with different indices are disjoint. -/ +theorem disjoint_dyadicInterval (j : ℕ) {n n' : ℤ} (h : n ≠ n') : + Disjoint (dyadicInterval j n) (dyadicInterval j n') := + Disjoint.preimage _ (disjoint_singleton.2 h) + +/-- The index of a point of `[0, 1)` is nonnegative. -/ +theorem dyadicIndex_nonneg {j : ℕ} {x : ℝ} (hx : x ∈ Ico (0 : ℝ) 1) : 0 ≤ dyadicIndex j x := + Int.floor_nonneg.2 (mul_nonneg (by positivity) hx.1) + +/-- The index of a point of `[0, 1)` is `< 2^j`. -/ +theorem dyadicIndex_lt {j : ℕ} {x : ℝ} (hx : x ∈ Ico (0 : ℝ) 1) : dyadicIndex j x < 2 ^ j := by + rw [dyadicIndex, Int.floor_lt] + push_cast + exact mul_lt_of_lt_one_right (by positivity) hx.2 + +/-- For `0 ≤ n < 2^j`, the dyadic interval `I_{j,n}` lies in `[0, 1)` +(`Interval.dyadicIco_subset`). -/ +theorem dyadicInterval_subset {j : ℕ} {n : ℤ} (h0 : 0 ≤ n) (h1 : n < 2 ^ j) : + dyadicInterval j n ⊆ Ico 0 1 := by + lift n to ℕ using h0 + rw [dyadicInterval_natCast] + exact Interval.dyadicIco_subset (by exact_mod_cast h1) + +/-- `|I_{j,n}| = 2^(-j)` for `0 ≤ n < 2^j`. -/ +theorem vol_real_dyadicInterval {j : ℕ} {n : ℤ} (h0 : 0 ≤ n) (h1 : n < 2 ^ j) : + vol.real (dyadicInterval j n) = ((2 : ℝ) ^ j)⁻¹ := by + rw [measureReal_def, Measure.restrict_apply (measurableSet_dyadicInterval j n), + inter_eq_left.2 ((dyadicInterval_subset h0 h1).trans Ico_subset_Icc_self), + dyadicInterval_eq_Ico, Real.volume_Ico, + show ((n : ℝ) + 1) / 2 ^ j - n / 2 ^ j = ((2 : ℝ) ^ j)⁻¹ by + rw [← sub_div, add_sub_cancel_left, one_div], + ENNReal.toReal_ofReal (by positivity)] + +/-- `|I_{j,n}| = 2^(-j)` for `0 ≤ n < 2^j`, in `ℝ≥0∞`. -/ +theorem vol_dyadicInterval {j : ℕ} {n : ℤ} (h0 : 0 ≤ n) (h1 : n < 2 ^ j) : + vol (dyadicInterval j n) = ENNReal.dyadicWeight (-1) j := by + have h := vol_real_dyadicInterval h0 h1 + rw [measureReal_def] at h + rw [← ENNReal.ofReal_toReal (measure_ne_top vol _), h, ENNReal.dyadicWeight_neg, + ENNReal.dyadicWeight_eq_pow, ENNReal.rpow_one, ENNReal.ofReal_inv_of_pos (by positivity), + ENNReal.ofReal_pow (by norm_num), ENNReal.ofReal_ofNat] + +/-- `⌊2^j x⌋ = ⌊2^(j+1) x⌋ / 2`: the dyadic interval of level `j` containing `x` is the parent of +the one of level `j + 1`. -/ +theorem dyadicIndex_succ_div (j : ℕ) (x : ℝ) : dyadicIndex (j + 1) x / 2 = dyadicIndex j x := by + have h := Int.floor_div_natCast ((2 : ℝ) ^ (j + 1) * x) 2 + rw [show (2 : ℝ) ^ (j + 1) * x / ((2 : ℕ) : ℝ) = 2 ^ j * x by push_cast; ring] at h + rw [dyadicIndex, dyadicIndex, h] + norm_num + +/-- `I_{j,n} = I_{j+1,2n} ∪ I_{j+1,2n+1}`. -/ +theorem dyadicInterval_eq_union (j : ℕ) (n : ℤ) : + dyadicInterval j n = dyadicInterval (j + 1) (2 * n) ∪ dyadicInterval (j + 1) (2 * n + 1) := by + ext x + simp only [mem_union, mem_dyadicInterval, ← dyadicIndex_succ_div j x] + omega + +/-- The dyadic σ-algebra `ℱ_j`, generated by the dyadic intervals of level `j`. -/ +@[instance_reducible] +noncomputable def dyadicSigma (j : ℕ) : MeasurableSpace ℝ := + MeasurableSpace.comap (dyadicIndex j) ⊤ + +/-- The dyadic σ-algebras increase. -/ +theorem dyadicSigma_mono : Monotone dyadicSigma := by + refine monotone_nat_of_le_succ fun j => ?_ + have h : dyadicIndex j = (fun n : ℤ => n / 2) ∘ dyadicIndex (j + 1) := + funext fun x => (dyadicIndex_succ_div j x).symm + change MeasurableSpace.comap (dyadicIndex j) ⊤ ≤ MeasurableSpace.comap (dyadicIndex (j + 1)) ⊤ + rw [h, ← MeasurableSpace.comap_comp] + exact MeasurableSpace.comap_mono le_top + +/-- The **dyadic filtration** `ℱ_0 ≤ ℱ_1 ≤ ⋯` of `ℝ`. -/ +noncomputable def dyadicFiltration : Filtration ℕ Real.measurableSpace where + seq := dyadicSigma + mono' := dyadicSigma_mono + le' j := comap_top_le (φ := dyadicIndex j) (measurableSet_dyadicInterval j) + +variable {p : ℝ≥0∞} [Fact (1 ≤ p)] + +variable (p) in +/-- The **Haar scheme** in `L_p[0, 1]`: the approximants of complexity `2^j` are the step +functions on the dyadic intervals of level `j`. -/ +noncomputable abbrev scheme : ApproximationScheme (Lp ℂ p vol) := dyadicFiltration.scheme p vol + +/-- **Conditional expectation onto `ℱ_j`**: `E[f | ℱ_j](x) = 2^j ∫_{I_{j,⌊2^j x⌋}} f`, the +average of `f` over the dyadic interval of level `j` containing `x`. -/ +theorem condExp_dyadic_ae_eq (j : ℕ) {f : ℝ → ℂ} (hf : Integrable f vol) : + vol[f | dyadicFiltration j] =ᵐ[vol] + fun x => ((2 : ℝ) ^ j) • ∫ y in dyadicInterval j (dyadicIndex j x), f y ∂vol := by + change vol[f | MeasurableSpace.comap (dyadicIndex j) ⊤] =ᵐ[vol] _ + filter_upwards [condExp_comap_ae_eq (φ := dyadicIndex j) (measurableSet_dyadicInterval j) hf, + Interval.ae_mem_Ico_unitVol] with x hx hx01 + rw [hx, show dyadicIndex j ⁻¹' {dyadicIndex j x} = dyadicInterval j (dyadicIndex j x) from rfl, + vol_real_dyadicInterval (dyadicIndex_nonneg hx01) (dyadicIndex_lt hx01), inv_inv] + +/-- `E[f | ℱ_j]` on `L_p[0, 1]` is the average over the dyadic interval of level `j`. -/ +theorem condExpLp_dyadic_ae_eq (j : ℕ) (f : Lp ℂ p vol) : + Lp.condExpLp (dyadicFiltration j) f =ᵐ[vol] + fun x => ((2 : ℝ) ^ j) • ∫ y in dyadicInterval j (dyadicIndex j x), f y ∂vol := + (Lp.coeFn_condExpLp f).trans (condExp_dyadic_ae_eq j ((Lp.memLp f).integrable Fact.out)) + +/-- `E[f | ℱ_0] = ∫_0^1 f`, a constant. -/ +theorem condExpLp_zero_ae_eq (f : Lp ℂ p vol) : + Lp.condExpLp (dyadicFiltration 0) f =ᵐ[vol] fun _ => ∫ x, f x ∂vol := by + filter_upwards [condExpLp_dyadic_ae_eq 0 f, Interval.ae_mem_Ico_unitVol] with x h hx + have h0 : dyadicIndex 0 x = 0 := by + have h1 := dyadicIndex_nonneg (j := 0) hx + have h2 := dyadicIndex_lt (j := 0) hx + rw [pow_zero] at h2 + omega + rw [h, pow_zero, one_smul, h0, + show dyadicInterval 0 0 = Ico 0 1 by rw [dyadicInterval_eq_Ico]; norm_num, + Measure.restrict_eq_self_of_ae_mem Interval.ae_mem_Ico_unitVol] + +/-- `‖E[f | ℱ_0]‖_p = |∫_0^1 f|`. -/ +theorem enorm_condExpLp_zero (f : Lp ℂ p vol) : + ‖Lp.condExpLp (dyadicFiltration 0) f‖ₑ = ‖∫ x, f x ∂vol‖ₑ := by + have hp0 : p ≠ 0 := (lt_of_lt_of_le zero_lt_one (Fact.out : 1 ≤ p)).ne' + rw [Lp.eNorm_def, eLpNorm_congr_ae (condExpLp_zero_ae_eq f), + eLpNorm_const _ hp0 (IsProbabilityMeasure.ne_zero vol), measure_univ, ENNReal.one_rpow, + mul_one] + +/-- A sum over the positions of level `j` whose terms vanish away from the index of a point +`x ∈ [0, 1)` is the term at that index. -/ +theorem sum_fin_eq_of_ne {M : Type*} [AddCommMonoid M] {j : ℕ} {x : ℝ} (hx : x ∈ Ico (0 : ℝ) 1) + (G : ℤ → M) (hG : ∀ m, m ≠ dyadicIndex j x → G m = 0) : + ∑ m : Fin (2 ^ j), G ((m : ℕ) : ℤ) = G (dyadicIndex j x) := by + have h0 := dyadicIndex_nonneg (j := j) hx + have h1 : dyadicIndex j x < ((2 ^ j : ℕ) : ℤ) := by exact_mod_cast dyadicIndex_lt (j := j) hx + let i : Fin (2 ^ j) := ⟨(dyadicIndex j x).toNat, by omega⟩ + have hi : (((i : ℕ) : ℤ)) = dyadicIndex j x := Int.toNat_of_nonneg h0 + rw [Finset.sum_eq_single i (fun b _ hb => hG _ fun h => hb (Fin.ext (by omega))) + (fun h => absurd (Finset.mem_univ i) h), hi] + +/-- The **Haar function** `h_{j,m} = 2^(j/2) (1_{I_{j+1,2m}} - 1_{I_{j+1,2m+1}})`, supported on +`I_{j,m}` and normalised in `L_2`. -/ +noncomputable def haarFunction (j : ℕ) (m : ℤ) (x : ℝ) : ℝ := + if dyadicIndex (j + 1) x = 2 * m then (2 : ℝ) ^ ((j : ℝ) / 2) + else if dyadicIndex (j + 1) x = 2 * m + 1 then -(2 : ℝ) ^ ((j : ℝ) / 2) else 0 + +/-- Haar functions are measurable: they are functions of `⌊2^(j+1) x⌋`. -/ +theorem measurable_haarFunction (j : ℕ) (m : ℤ) : Measurable (haarFunction j m) := + (measurable_of_countable (fun n : ℤ => if n = 2 * m then (2 : ℝ) ^ ((j : ℝ) / 2) + else if n = 2 * m + 1 then -(2 : ℝ) ^ ((j : ℝ) / 2) else 0)).comp + (measurable_dyadicIndex (j + 1)) + +/-- `h_{j,m}` vanishes outside `I_{j,m}`. -/ +theorem haarFunction_eq_zero {j : ℕ} {m : ℤ} {x : ℝ} (hx : dyadicIndex j x ≠ m) : + haarFunction j m x = 0 := by + rw [← dyadicIndex_succ_div] at hx + have h1 : dyadicIndex (j + 1) x ≠ 2 * m := by omega + have h2 : dyadicIndex (j + 1) x ≠ 2 * m + 1 := by omega + simp [haarFunction, h1, h2] + +/-- `|h_{j,m}| = 2^(j/2)` on `I_{j,m}`. -/ +theorem abs_haarFunction {j : ℕ} {m : ℤ} {x : ℝ} (hx : dyadicIndex j x = m) : + |haarFunction j m x| = (2 : ℝ) ^ ((j : ℝ) / 2) := by + rw [← dyadicIndex_succ_div] at hx + unfold haarFunction + split_ifs with h1 h2 + · exact abs_of_pos (by positivity) + · rw [abs_neg]; exact abs_of_pos (by positivity) + · omega + +/-- Haar functions are bounded: `|h_{j,m}| ≤ 2^(j/2)`. -/ +theorem abs_haarFunction_le (j : ℕ) (m : ℤ) (x : ℝ) : + |haarFunction j m x| ≤ (2 : ℝ) ^ ((j : ℝ) / 2) := by + by_cases hx : dyadicIndex j x = m + · exact (abs_haarFunction hx).le + · rw [haarFunction_eq_zero hx, abs_zero] + positivity + +/-- `h_{j,m} f = 2^(j/2) (1_{I_{j+1,2m}} f - 1_{I_{j+1,2m+1}} f)` pointwise. -/ +theorem haarFunction_mul (j : ℕ) (m : ℤ) (f : ℝ → ℂ) (x : ℝ) : + (haarFunction j m x : ℂ) * f x = (((2 : ℝ) ^ ((j : ℝ) / 2) : ℝ) : ℂ) * + ((dyadicInterval (j + 1) (2 * m)).indicator f x - + (dyadicInterval (j + 1) (2 * m + 1)).indicator f x) := by + unfold haarFunction + split_ifs with h1 h2 + · have h2' : x ∉ dyadicInterval (j + 1) (2 * m + 1) := by rw [mem_dyadicInterval, h1]; omega + rw [indicator_of_mem (mem_dyadicInterval.2 h1), indicator_of_notMem h2', sub_zero] + · rw [indicator_of_notMem (mem_dyadicInterval.not.2 h1), + indicator_of_mem (mem_dyadicInterval.2 h2), zero_sub, Complex.ofReal_neg] + ring + · rw [indicator_of_notMem (mem_dyadicInterval.not.2 h1), + indicator_of_notMem (mem_dyadicInterval.not.2 h2)] + simp + +/-- The **Haar coefficient** `⟨f, h_{j,m}⟩ = ∫ h_{j,m} f` of `f` on `[0, 1]`. -/ +noncomputable def haarCoeff (f : ℝ → ℂ) (j : ℕ) (m : ℤ) : ℂ := + ∫ x, (haarFunction j m x : ℂ) * f x ∂vol + +/-- `⟨f, h_{j,m}⟩ = 2^(j/2) (∫_{I_{j+1,2m}} f - ∫_{I_{j+1,2m+1}} f)`. -/ +theorem haarCoeff_eq {f : ℝ → ℂ} (hf : Integrable f vol) (j : ℕ) (m : ℤ) : + haarCoeff f j m = (((2 : ℝ) ^ ((j : ℝ) / 2) : ℝ) : ℂ) * + (∫ x in dyadicInterval (j + 1) (2 * m), f x ∂vol - + ∫ x in dyadicInterval (j + 1) (2 * m + 1), f x ∂vol) := by + simp_rw [haarCoeff, haarFunction_mul] + rw [integral_const_mul, integral_sub (hf.indicator (measurableSet_dyadicInterval _ _)) + (hf.indicator (measurableSet_dyadicInterval _ _)), + integral_indicator (measurableSet_dyadicInterval _ _), + integral_indicator (measurableSet_dyadicInterval _ _)] + +/-- Functions that agree almost everywhere have the same Haar coefficients. -/ +theorem haarCoeff_congr_ae {f g : ℝ → ℂ} (h : f =ᵐ[vol] g) (j : ℕ) (m : ℤ) : + haarCoeff f j m = haarCoeff g j m := by + unfold haarCoeff + exact integral_congr_ae (h.mono fun x hx => by simp only [hx]) + +/-- The integral over `I_{j,n}` is the sum of the integrals over its two halves. -/ +theorem setIntegral_dyadicInterval {f : ℝ → ℂ} (hf : Integrable f vol) (j : ℕ) (n : ℤ) : + ∫ x in dyadicInterval j n, f x ∂vol = ∫ x in dyadicInterval (j + 1) (2 * n), f x ∂vol + + ∫ x in dyadicInterval (j + 1) (2 * n + 1), f x ∂vol := by + rw [dyadicInterval_eq_union j n] + exact setIntegral_union (disjoint_dyadicInterval _ (by omega)) + (measurableSet_dyadicInterval _ _) hf.integrableOn hf.integrableOn + +/-- **Martingale differences are Haar sums**: +`E[f | ℱ_{k+1}] - E[f | ℱ_k] = ∑_{m < 2^k} ⟨f, h_{k,m}⟩ h_{k,m}`. -/ +theorem condExpLp_succ_sub_ae_eq (k : ℕ) (f : Lp ℂ p vol) : + ⇑(Lp.condExpLp (dyadicFiltration (k + 1)) f - Lp.condExpLp (dyadicFiltration k) f) =ᵐ[vol] + fun x => ∑ m : Fin (2 ^ k), haarCoeff f k ((m : ℕ) : ℤ) * + (haarFunction k ((m : ℕ) : ℤ) x : ℂ) := by + have hf := (Lp.memLp f).integrable (Fact.out : 1 ≤ p) + filter_upwards [Lp.coeFn_sub (Lp.condExpLp (dyadicFiltration (k + 1)) f) + (Lp.condExpLp (dyadicFiltration k) f), condExpLp_dyadic_ae_eq (k + 1) f, + condExpLp_dyadic_ae_eq k f, Interval.ae_mem_Ico_unitVol] with x h1 h2 h3 hx + rw [h1, Pi.sub_apply, h2, h3, + sum_fin_eq_of_ne hx (fun m => haarCoeff f k m * (haarFunction k m x : ℂ)) + fun m hm => by rw [haarFunction_eq_zero (Ne.symm hm), Complex.ofReal_zero, mul_zero], + haarCoeff_eq hf, setIntegral_dyadicInterval hf k (dyadicIndex k x)] + have hc := ofReal_two_rpow_half_mul_self k + have hn := dyadicIndex_succ_div k x + rcases (by omega : dyadicIndex (k + 1) x = 2 * dyadicIndex k x ∨ + dyadicIndex (k + 1) x = 2 * dyadicIndex k x + 1) with h | h + · have hh : haarFunction k (dyadicIndex k x) x = (2 : ℝ) ^ ((k : ℝ) / 2) := by + simp [haarFunction, h] + rw [hh, h] + simp only [Complex.real_smul, Complex.ofReal_pow, Complex.ofReal_ofNat] + linear_combination (∫ y in dyadicInterval (k + 1) (2 * dyadicIndex k x + 1), f y ∂vol - + ∫ y in dyadicInterval (k + 1) (2 * dyadicIndex k x), f y ∂vol) * hc + · have hh : haarFunction k (dyadicIndex k x) x = -(2 : ℝ) ^ ((k : ℝ) / 2) := by + simp [haarFunction, h] + rw [hh, h] + simp only [Complex.real_smul, Complex.ofReal_pow, Complex.ofReal_ofNat, Complex.ofReal_neg] + linear_combination (∫ y in dyadicInterval (k + 1) (2 * dyadicIndex k x), f y ∂vol - + ∫ y in dyadicInterval (k + 1) (2 * dyadicIndex k x + 1), f y ∂vol) * hc + +/-- `|h_{j,m}| = 2^(j/2)` on `I_{j,m}`, as a dyadic weight in `ℝ≥0∞`. -/ +theorem enorm_haarFunction {j : ℕ} {m : ℤ} {x : ℝ} (hx : dyadicIndex j x = m) : + ‖(haarFunction j m x : ℂ)‖ₑ = ENNReal.dyadicWeight (1 / 2) j := by + rw [← ofReal_norm, Complex.norm_real, Real.norm_eq_abs, abs_haarFunction hx, + ← ENNReal.ofReal_rpow_of_pos (by norm_num), ENNReal.ofReal_ofNat, ENNReal.dyadicWeight] + congr 1 + ring + +/-- **Level-wise norm of Haar sums**: for `1 ≤ p < ∞`, +`‖∑_{m < 2^j} c_m h_{j,m}‖_p = 2^(j(1/2 - 1/p)) ‖c‖_{ℓ_p}`, since the Haar functions of one level +have disjoint supports of measure `2^(-j)` and modulus `2^(j/2)` there. -/ +theorem eLpNorm_sum_haar (hp : p ≠ ∞) (j : ℕ) (c : Fin (2 ^ j) → ℂ) : + eLpNorm (fun x => ∑ m : Fin (2 ^ j), c m * (haarFunction j ((m : ℕ) : ℤ) x : ℂ)) p vol = + ENNReal.dyadicWeight (1 / 2 - 1 / p.toReal) j * ENNReal.lqNorm p (fun m => ‖c m‖ₑ) := by + have hp0 : p ≠ 0 := (lt_of_lt_of_le zero_lt_one (Fact.out : 1 ≤ p)).ne' + have hr : 0 < p.toReal := ENNReal.toReal_pos hp0 hp + set r := p.toReal + set C : ℤ → ℂ := fun m => if h : 0 ≤ m ∧ m < ((2 ^ j : ℕ) : ℤ) then c ⟨m.toNat, by omega⟩ else 0 + have hC : ∀ m : Fin (2 ^ j), C ((m : ℕ) : ℤ) = c m := fun m => by + have h1 : ((m : ℕ) : ℤ) < ((2 ^ j : ℕ) : ℤ) := by exact_mod_cast m.isLt + simp only [C, Int.natCast_nonneg, h1, and_self, ↓reduceDIte, Int.toNat_natCast] + have hpt : ∀ᵐ x ∂vol, ‖∑ m : Fin (2 ^ j), c m * (haarFunction j ((m : ℕ) : ℤ) x : ℂ)‖ₑ ^ r = + ∑ m : Fin (2 ^ j), (dyadicInterval j ((m : ℕ) : ℤ)).indicator + (fun _ => ‖c m‖ₑ ^ r * ENNReal.dyadicWeight (1 / 2 * r) j) x := by + filter_upwards [Interval.ae_mem_Ico_unitVol] with x hx + simp_rw [← hC] + rw [sum_fin_eq_of_ne hx (fun m => C m * (haarFunction j m x : ℂ)) + fun m hm => by rw [haarFunction_eq_zero (Ne.symm hm), Complex.ofReal_zero, mul_zero], + sum_fin_eq_of_ne hx (fun m => (dyadicInterval j m).indicator + (fun _ => ‖C m‖ₑ ^ r * ENNReal.dyadicWeight (1 / 2 * r) j) x) + fun m hm => indicator_of_notMem (fun h => hm (mem_dyadicInterval.1 h).symm) _, + indicator_of_mem (mem_dyadicInterval.2 rfl), eNorm_mul, ENNReal.mul_rpow_of_nonneg _ _ hr.le, + enorm_haarFunction rfl, ENNReal.dyadicWeight_rpow] + have hmeas : AEStronglyMeasurable + (fun x => ∑ m : Fin (2 ^ j), c m * (haarFunction j ((m : ℕ) : ℤ) x : ℂ)) vol := + (Finset.measurable_sum _ fun m _ => measurable_const.mul + (Complex.measurable_ofReal.comp (measurable_haarFunction _ _))).aestronglyMeasurable + rw [eLpNorm_eq_lintegral_rpow_eNorm_toReal hp0 hp hmeas, lintegral_congr_ae hpt, + lintegral_finsetSum _ fun m _ => measurable_const.indicator (measurableSet_dyadicInterval _ _)] + simp_rw [lintegral_indicator_const (measurableSet_dyadicInterval _ _)] + have hvol : ∀ m : Fin (2 ^ j), vol (dyadicInterval j ((m : ℕ) : ℤ)) = + ENNReal.dyadicWeight (-1) j := fun m => + vol_dyadicInterval (Int.natCast_nonneg _) (by exact_mod_cast m.isLt) + simp_rw [hvol, mul_assoc, ← Finset.sum_mul, mul_comm (∑ m : Fin (2 ^ j), ‖c m‖ₑ ^ r)] + rw [ENNReal.mul_rpow_of_nonneg _ _ (by positivity), ← ENNReal.dyadicWeight_add, + ENNReal.dyadicWeight_rpow] + simp only [ENNReal.lqNorm_eq_sum hp0 hp] + rw [show p.toReal = r from rfl] + congr 2 + field_simp + ring + +/-- The dyadic step function `x ↦ g(⌊2^j x⌋ 2^(-j))` of `g`: the value of `g` at the left end +point of the dyadic interval of level `j` containing `x`. -/ +noncomputable def stepFun (g : ℝ → ℂ) (j : ℕ) (x : ℝ) : ℂ := g ((dyadicIndex j x : ℝ) / 2 ^ j) + +/-- The step function of level `j` is `ℱ_j`-measurable. -/ +theorem stronglyMeasurable_stepFun (g : ℝ → ℂ) (j : ℕ) : + StronglyMeasurable[dyadicFiltration j] (stepFun g j) := + ((measurable_from_top (f := fun n : ℤ => g ((n : ℝ) / 2 ^ j))).comp + (comap_measurable (m := ⊤) (dyadicIndex j))).stronglyMeasurable + +/-- A uniformly continuous `g` on `[0, 1]` is uniformly close to its step functions: given +`ε > 0` there is a level `j` with `|g(x) - g(⌊2^j x⌋ 2^(-j))| ≤ ε` on `[0, 1)`. -/ +theorem exists_norm_sub_stepFun_le {g : ℝ → ℂ} (hg : Continuous g) {ε : ℝ} (hε : 0 < ε) : + ∃ j : ℕ, ∀ x ∈ Ico (0 : ℝ) 1, ‖g x - stepFun g j x‖ ≤ ε := by + obtain ⟨δ, hδ, hgδ⟩ := Metric.uniformContinuousOn_iff.1 + (isCompact_Icc.uniformContinuousOn_of_continuous hg.continuousOn) ε hε + obtain ⟨j, hj⟩ := exists_pow_lt_of_lt_one hδ (by norm_num : (1 / 2 : ℝ) < 1) + refine ⟨j, fun x hx => ?_⟩ + have h2 : (0 : ℝ) < 2 ^ j := by positivity + have hmem : x ∈ dyadicInterval j (dyadicIndex j x) := rfl + rw [dyadicInterval_eq_Ico, mem_Ico] at hmem + have h0 : (0 : ℝ) ≤ dyadicIndex j x := by exact_mod_cast dyadicIndex_nonneg hx + have h1 : (dyadicIndex j x : ℝ) + 1 ≤ 2 ^ j := by + exact_mod_cast Int.add_one_le_iff.2 (dyadicIndex_lt hx) + have hy : (dyadicIndex j x : ℝ) / 2 ^ j ∈ Icc (0 : ℝ) 1 := + ⟨div_nonneg h0 h2.le, (div_le_one h2).2 (by linarith)⟩ + have hdist : dist x ((dyadicIndex j x : ℝ) / 2 ^ j) < δ := by + rw [Real.dist_eq, abs_of_nonneg (by linarith [hmem.1])] + calc x - (dyadicIndex j x : ℝ) / 2 ^ j + < ((dyadicIndex j x : ℝ) + 1) / 2 ^ j - (dyadicIndex j x : ℝ) / 2 ^ j := by + linarith [hmem.2] + _ = (1 / 2) ^ j := by rw [← sub_div, add_sub_cancel_left, one_div_pow] + _ < δ := hj + rw [← dist_eq_norm] + exact (hgδ x (Ico_subset_Icc_self hx) _ hy hdist).le + +/-- **Bounded continuous functions are limits of dyadic step functions** in `L_p[0, 1]`, even +uniformly on `[0, 1)`: they lie in the closure of the Haar approximants. -/ +theorem toLp_mem_closure (g : ℝ →ᵇ ℂ) : + BoundedContinuousFunction.toLp (E := ℂ) p vol ℝ g ∈ closure (⋃ n, scheme p n) := by + rw [Metric.mem_closure_iff] + intro ε hε + obtain ⟨j, hj⟩ := exists_norm_sub_stepFun_le g.continuous (half_pos hε) + have hsm := stronglyMeasurable_stepFun g j + have hmeas : AEStronglyMeasurable (stepFun g j) vol := + (hsm.mono (dyadicFiltration.le j)).aestronglyMeasurable + have hmem : MemLp (stepFun g j) p vol := + MemLp.of_bound hmeas ‖g‖ (ae_of_all _ fun x => g.norm_coe_le_norm _) + refine ⟨hmem.toLp _, mem_iUnion.2 ⟨2 ^ j, ?_⟩, ?_⟩ + · rw [dyadicFiltration.mem_scheme (pow_ne_zero j two_ne_zero), Nat.log_pow Nat.one_lt_two, + mem_lpMeas_iff_aestronglyMeasurable] + exact hsm.aestronglyMeasurable.congr (MemLp.coeFn_toLp hmem).symm + · rw [dist_eq_norm, Lp.norm_def, eLpNorm_congr_ae ((Lp.coeFn_sub _ _).trans + ((BoundedContinuousFunction.coeFn_toLp p vol ℝ g).sub (MemLp.coeFn_toLp hmem)))] + have hb := eLpNorm_le_of_ae_bound (p := p) (g.continuous.aestronglyMeasurable.sub hmeas) + (C := ε / 2) (by filter_upwards [Interval.ae_mem_Ico_unitVol] with x hx using hj x hx) + rw [measure_univ, ENNReal.one_rpow, one_mul] at hb + calc (eLpNorm (⇑g - stepFun g j) p vol).toReal ≤ (ENNReal.ofReal (ε / 2)).toReal := + ENNReal.toReal_mono ENNReal.ofReal_ne_top hb + _ = ε / 2 := ENNReal.toReal_ofReal (by positivity) + _ < ε := half_lt_self hε + +/-- **The Haar approximants are dense** in `L_p[0, 1]` for `1 ≤ p < ∞`. -/ +theorem closure_iUnion_scheme (hp : p ≠ ∞) : closure (⋃ n, scheme p n) = univ := by + have hsub : range (BoundedContinuousFunction.toLp (E := ℂ) p vol ℝ) ⊆ + closure (⋃ n, scheme p n) := by + rintro _ ⟨g, rfl⟩ + exact toLp_mem_closure g + have h := closure_minimal hsub isClosed_closure + rw [(BoundedContinuousFunction.toLp_denseRange ℂ vol ℝ hp).closure_range] at h + exact eq_univ_of_univ_subset h + +/-- **Haar coefficient characterisation**: for `1 ≤ p < ∞`, `s > 0` and `1 ≤ q ≤ ∞`, `f` lies in +the approximation space `A^s_q(L_p[0, 1], Haar)` iff +`|∫_0^1 f| + ‖(2^(k(s + 1/2 - 1/p)) ‖(⟨f, h_{k,m}⟩)_{m < 2^k}‖_{ℓ_p})_k‖_{ℓ_q} < ∞`. + +For `0 < s < 1/p` this space is the classical Besov space `B^s_{p,q}[0, 1]`; for larger `s` it is +strictly smaller, since the Haar functions themselves are discontinuous. That comparison is not +formalised here. -/ +theorem memApprox_iff_haarCoeff (hp : p ≠ ∞) {s : ℝ} (hs : 0 < s) {q : ℝ≥0∞} (hq : 1 ≤ q) + (f : Lp ℂ p vol) : + (scheme p).MemApprox s q f ↔ ‖∫ x, f x ∂vol‖ₑ + ENNReal.lqNorm q (fun k => + ENNReal.dyadicWeight (s + (1 / 2 - 1 / p.toReal)) k * + ENNReal.lqNorm p (fun m : Fin (2 ^ k) => ‖haarCoeff f k ((m : ℕ) : ℤ)‖ₑ)) < ∞ := by + have h : ∀ k, ‖Lp.condExpLp (dyadicFiltration (k + 1)) f - + Lp.condExpLp (dyadicFiltration k) f‖ₑ = ENNReal.dyadicWeight (1 / 2 - 1 / p.toReal) k * + ENNReal.lqNorm p (fun m : Fin (2 ^ k) => ‖haarCoeff f k ((m : ℕ) : ℤ)‖ₑ) := + fun k => by + rw [Lp.eNorm_def, eLpNorm_congr_ae (condExpLp_succ_sub_ae_eq k f)] + exact eLpNorm_sum_haar hp k _ + rw [dyadicFiltration.memApprox_iff_martingale (closure_iUnion_scheme hp) hs hq, + enorm_condExpLp_zero] + simp_rw [h, ← mul_assoc, ← ENNReal.dyadicWeight_add] + +end Haar diff --git a/LeanPool/FunctionSpaces/Wavelets/Examples/HaarBesov.lean b/LeanPool/FunctionSpaces/Wavelets/Examples/HaarBesov.lean new file mode 100644 index 0000000000..27c7e4711b --- /dev/null +++ b/LeanPool/FunctionSpaces/Wavelets/Examples/HaarBesov.lean @@ -0,0 +1,152 @@ +/- +Copyright (c) 2026 Mario Ullrich. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Mario Ullrich +-/ +module + +public import LeanPool.FunctionSpaces.Wavelets.Examples.Haar +public import LeanPool.FunctionSpaces.Domains.Interval.PiecewisePeriodic +public import LeanPool.FunctionSpaces.ApproximationSpaces.Transfer + +/- +Modified for Lean Pool: module names and imports adapted. +-/ + +/-! +# Haar coefficients and Besov spaces on the interval and on the circle + +The Haar scheme of `FunctionSpaces.Wavelets.Examples.Haar` (step functions on the dyadic +intervals) and the scheme of dyadic piecewise polynomials of degree `< 1` (`Interval.ppScheme p 1`) +are the same scheme in `L_p[0, 1]` (`Haar.scheme_eq_ppScheme`): a function measurable for the +dyadic `σ`-algebra of level `j` is a step function on the dyadic intervals of level `j`, and +conversely. Hence the two schemes have the same approximation spaces +(`Haar.memApprox_ppScheme_one_iff`). + +Together with the characterisations through moduli of smoothness this gives, for `1 ≤ p < ∞`, +`1 ≤ q ≤ ∞` and `0 < s < 1/p`, three equivalent descriptions of one space: + +* `‖f‖_p + ‖(2^(ks) ω_1(f, 2^(-k), [0, 1])_p)_k‖_{ℓ_q} < ∞` (Besov space on the interval), +* `‖f‖_p + ‖(2^(ks) ω_1^per(f, 2^(-k))_p)_k‖_{ℓ_q} < ∞` (Besov space on the circle), +* `|∫_0^1 f| + ‖(2^(k(s+1/2-1/p)) ‖(⟨f, h_{k,m}⟩)_{m<2^k}‖_{ℓ_p})_k‖_{ℓ_q} < ∞` (Haar coefficients) + +(`Haar.lqNorm_modulus_lt_top_iff_haarCoeff`, `Haar.lqNorm_perModulus_lt_top_iff_haarCoeff`). +-/ + +@[expose] public section + +open MeasureTheory Set Polynomial +open scoped ENNReal +open ENNReal (dyadicWeight) + +namespace Haar + +open Interval + +variable {p : ℝ≥0∞} [Fact (1 ≤ p)] + +/-- A polynomial of degree `< 1` is constant. -/ +theorem polyFun_of_mem_degreeLT_one {P : ℂ[X]} (hP : P ∈ degreeLT ℂ 1) (x : ℝ) : + polyFun P x = P.coeff 0 := by + rw [polyFun, eq_C_of_degree_le_zero (Nat.WithBot.lt_one_iff_le_zero.1 (mem_degreeLT.1 hP)), + eval_C, coeff_C_zero] + +/-- On `[0, 1)` the dyadic index is the floor of `2^j x`. -/ +theorem dyadicIndex_eq_floor {j : ℕ} {x : ℝ} (hx : x ∈ Ico (0 : ℝ) 1) : + dyadicIndex j x = (⌊2 ^ j * x⌋₊ : ℤ) := + (Int.natCast_floor_eq_floor (mul_nonneg (by positivity) hx.1)).symm + +/-- The dyadic index of a left endpoint `n 2^(-j)` is `n`. -/ +theorem dyadicIndex_natCast_div (j n : ℕ) : dyadicIndex j ((n : ℝ) / 2 ^ j) = n := by + rw [dyadicIndex, mul_div_cancel₀ _ (by positivity), Int.floor_natCast] + +/-- A piecewise constant function agrees almost everywhere on `[0, 1]` with its step +function. -/ +theorem ppFun_ae_eq_stepFun {Q : ℕ → ℂ[X]} (hQ : ∀ n, Q n ∈ degreeLT ℂ 1) (j : ℕ) : + ppFun j Q =ᵐ[vol] stepFun (ppFun j Q) j := by + filter_upwards [ae_mem_Ico_unitVol] with x hx + obtain ⟨hmem, hlt⟩ := mem_dyadicIco_floor (k := j) hx + have hend : ((⌊2 ^ j * x⌋₊ : ℕ) : ℝ) / 2 ^ j ∈ dyadicIco j ⌊2 ^ j * x⌋₊ := by + rw [mem_dyadicIco, mul_div_cancel₀ _ (by positivity)] + exact ⟨le_rfl, lt_add_one _⟩ + rw [stepFun, dyadicIndex_eq_floor hx, Int.cast_natCast, ppFun_eq_of_mem Q hlt hmem, + ppFun_eq_of_mem Q hlt hend, polyFun_of_mem_degreeLT_one (hQ _), + polyFun_of_mem_degreeLT_one (hQ _)] + +/-- A function measurable for the dyadic `σ`-algebra of level `j` is almost everywhere on +`[0, 1]` a piecewise constant function. -/ +theorem ae_eq_ppFun_of_stronglyMeasurable {j : ℕ} {g : ℝ → ℂ} + (hg : StronglyMeasurable[dyadicFiltration j] g) : + g =ᵐ[vol] ppFun j (fun m => C (g ((m : ℝ) / 2 ^ j))) := by + filter_upwards [ae_mem_Ico_unitVol] with x hx + obtain ⟨hmem, hlt⟩ := mem_dyadicIco_floor (k := j) hx + rw [ppFun_eq_of_mem _ hlt hmem, polyFun, eval_C] + have hg' : StronglyMeasurable[MeasurableSpace.comap (dyadicIndex j) ⊤] g := hg + refine (hg'.eq_of_comap_top ?_).symm + rw [dyadicIndex_natCast_div, dyadicIndex_eq_floor hx] + +/-- The piecewise constant approximants are Haar approximants: a piecewise constant function +of level `j` agrees almost everywhere with its step function. -/ +theorem mem_scheme_of_mem_ppScheme {n : ℕ} {a : Lp ℂ p unitVol} (ha : a ∈ ppScheme p 1 n) : + a ∈ scheme p n := by + rcases eq_or_ne n 0 with rfl | hn + · rw [mem_ppScheme_zero.1 ha] + exact (scheme p).zero_mem 0 + · obtain ⟨Q, hQ, hae⟩ := (mem_ppScheme hn).1 ha + rw [dyadicFiltration.mem_scheme hn, mem_lpMeas_iff_aestronglyMeasurable] + exact ⟨stepFun (ppFun (Nat.log 2 n) Q) (Nat.log 2 n), stronglyMeasurable_stepFun _ _, + hae.trans (ppFun_ae_eq_stepFun hQ _)⟩ + +/-- The Haar approximants are piecewise constant approximants: a function measurable for the +dyadic `σ`-algebra of level `j` is a piecewise constant function of level `j`. -/ +theorem mem_ppScheme_of_mem_scheme {n : ℕ} {a : Lp ℂ p unitVol} (ha : a ∈ scheme p n) : + a ∈ ppScheme p 1 n := by + rcases eq_or_ne n 0 with rfl | hn + · rw [mem_ppScheme_zero, ApproximationScheme.mem_ofMonotoneSubmodules_zero.1 ha] + · rw [mem_ppScheme hn] + rw [dyadicFiltration.mem_scheme hn, mem_lpMeas_iff_aestronglyMeasurable] at ha + obtain ⟨g, hg, hag⟩ := ha + exact ⟨fun m => C (g ((m : ℝ) / 2 ^ Nat.log 2 n)), fun m => + mem_degreeLT.2 (degree_C_le.trans_lt (by norm_num)), + hag.trans (ae_eq_ppFun_of_stronglyMeasurable hg)⟩ + +/-- **The Haar scheme is the piecewise constant scheme** in `L_p[0, 1]`: both have the same +approximants of every complexity. -/ +theorem scheme_eq_ppScheme : scheme p = ppScheme p 1 := + ApproximationScheme.ext fun _ => Subset.antisymm (fun _ => mem_ppScheme_of_mem_scheme) + (fun _ => mem_scheme_of_mem_ppScheme) + +/-- **The Haar scheme and the piecewise constant scheme have the same approximation spaces**: +`f ∈ A^s_q` for the piecewise constants in `L_p[0, 1]` iff `f ∈ A^s_q` for the Haar scheme +(`Haar.scheme_eq_ppScheme`). -/ +theorem memApprox_ppScheme_one_iff {s : ℝ} {q : ℝ≥0∞} (f : Lp ℂ p unitVol) : + (ppScheme p 1).MemApprox s q f ↔ (scheme p).MemApprox s q f := by + rw [scheme_eq_ppScheme] + +/-- **Besov spaces on the interval through Haar coefficients.** For `1 ≤ p < ∞`, `1 ≤ q ≤ ∞` and +`0 < s < 1/p`, the Besov quasi-norm `‖f‖_p + ‖(2^(ks) ω_1(f, 2^(-k), [0, 1])_p)_k‖_{ℓ_q}` of +`f ∈ L_p[0, 1]` is finite iff +`|∫_0^1 f| + ‖(2^(k(s+1/2-1/p)) ‖(⟨f, h_{k,m}⟩)_{m<2^k}‖_{ℓ_p})_k‖_{ℓ_q} < ∞`. -/ +theorem lqNorm_modulus_lt_top_iff_haarCoeff (hp : p ≠ ∞) {s : ℝ} (hs : 0 < s) + (hsp : s < 1 / p.toReal) {q : ℝ≥0∞} (hq : 1 ≤ q) (f : Lp ℂ p unitVol) : + ‖f‖ₑ + ENNReal.lqNorm q (fun k => dyadicWeight s k * lpModulus p 1 f k) < ∞ ↔ + ‖∫ x, f x ∂vol‖ₑ + ENNReal.lqNorm q (fun k => + dyadicWeight (s + (1 / 2 - 1 / p.toReal)) k * + ENNReal.lqNorm p (fun m : Fin (2 ^ k) => ‖haarCoeff f k ((m : ℕ) : ℤ)‖ₑ)) < ∞ := by + rw [← memApprox_ppScheme_iff le_rfl hp hq hs.le hsp f, memApprox_ppScheme_one_iff, + memApprox_iff_haarCoeff hp hs hq] + +/-- **Besov spaces on the circle through Haar coefficients.** For `1 ≤ p < ∞`, `1 ≤ q ≤ ∞` and +`0 < s < 1/p`, the periodic Besov quasi-norm `‖f‖_p + ‖(2^(ks) ω_1^per(f, 2^(-k))_p)_k‖_{ℓ_q}` +of `f ∈ L_p(𝕋) = L_p[0, 1]` is finite iff +`|∫_0^1 f| + ‖(2^(k(s+1/2-1/p)) ‖(⟨f, h_{k,m}⟩)_{m<2^k}‖_{ℓ_p})_k‖_{ℓ_q} < ∞`. -/ +theorem lqNorm_perModulus_lt_top_iff_haarCoeff (hp : p ≠ ∞) {s : ℝ} (hs : 0 < s) + (hsp : s < 1 / p.toReal) {q : ℝ≥0∞} (hq : 1 ≤ q) (f : Lp ℂ p unitVol) : + ‖f‖ₑ + ENNReal.lqNorm q (fun k => dyadicWeight s k * lpPerModulus p 1 f k) < ∞ ↔ + ‖∫ x, f x ∂vol‖ₑ + ENNReal.lqNorm q (fun k => + dyadicWeight (s + (1 / 2 - 1 / p.toReal)) k * + ENNReal.lqNorm p (fun m : Fin (2 ^ k) => ‖haarCoeff f k ((m : ℕ) : ℤ)‖ₑ)) < ∞ := by + rw [← memApprox_ppScheme_iff_per le_rfl hp hq hs.le hsp f, memApprox_ppScheme_one_iff, + memApprox_iff_haarCoeff hp hs hq] + +end Haar diff --git a/LeanPool/projects/function-spaces.yaml b/LeanPool/projects/function-spaces.yaml new file mode 100644 index 0000000000..b58f4fb570 --- /dev/null +++ b/LeanPool/projects/function-spaces.yaml @@ -0,0 +1,54 @@ +slug: function-spaces +title: Characterizations of Besov, Triebel–Lizorkin and Sobolev spaces +summary: >- + Formalizes characterizations of function spaces by finite differences, local + means, atoms, wavelet coefficients and best approximation. The development + includes approximation schemes, real interpolation, and extensions and traces + on domains, as well as concrete results on Euclidean space and the torus. +branch: functional analysis +entry_module: LeanPool.FunctionSpaces +authors: +- Mario Ullrich +source: + url: https://github.com/mario-ullrich/Lean-FunctionSpaces/blob/d8b2b349567adb7ad049d517dec50bff4165e606/README.md + github_repo: mario-ullrich/Lean-FunctionSpaces + commit: d8b2b349567adb7ad049d517dec50bff4165e606 + completion_url: https://github.com/mario-ullrich/Lean-FunctionSpaces/commit/d8b2b349567adb7ad049d517dec50bff4165e606 + completion_date: '2026-11-20' + completion_time: '2026-11-20T09:11:57Z' +license: Apache-2.0 +status: verified +provenance: AI +provenance_evidence: >- + The upstream README credits Claude Code for the Lean formalization and Mario + Ullrich for the mathematical design and choice of statements. +main_declarations: +- Rd.LocalMeansBump.besov_iff_atomic +- Rd.LocalMeansBump.memTriebelLizorkin_iff_atomic +- Rd.memSobolev_bessel_iff_memTriebelLizorkinDistr +- Daubechies.besov_iff_coeff_d4 +- Haar.memEMethod_stepCouple_iff_modulus +- ApproximationScheme.memKMethod_reiteration +main_results: +- declaration: Rd.LocalMeansBump.besov_iff_atomic + informal: For finite p at least one, q at least one, and smoothness between zero and the integer atom order, finite Besov difference norm for a fixed local-means bump is equivalent to a regular-atom expansion with bounded overlap and finite coefficient norm. +- declaration: Rd.LocalMeansBump.memTriebelLizorkin_iff_atomic + informal: For 1 < p < infinity, q > 1, and positive smoothness below the atom order, Triebel–Lizorkin membership is equivalent to an expansion by smooth dyadic atoms with finite coefficient norm. +- declaration: Rd.memSobolev_bessel_iff_memTriebelLizorkinDistr + informal: In positive dimension and for 1 < p < infinity, Mathlib's Bessel potential space agrees with the distributional Triebel–Lizorkin space with second index two for every real smoothness. +- declaration: Daubechies.besov_iff_coeff_d4 + informal: For 1 ≤ p < infinity, q ≥ 1 and 0 < s < 2 − log₂(1 + √3), finiteness of the Besov difference norm on the real line is equivalent to finiteness of the norm of the D4 wavelet coefficients. +- declaration: Haar.memEMethod_stepCouple_iff_modulus + informal: For 0 < p ≤ 1, positive q and 0 < s < 1/p, approximation by dyadic steps in Lp on the unit interval characterizes the space given by the first-order modulus of smoothness. +- declaration: ApproximationScheme.memKMethod_reiteration + informal: The continuous real K-method satisfies the reiteration formula for a bounded linear map at two distinct interior interpolation parameters, an interior outer parameter, and exponents at least one. +tags: +- approximation-theory +- functional-analysis +- harmonic-analysis +- real-interpolation +- wavelets +msc: +- '46E35' +- '46B70' +- '42C40' From f8e94ad31c72b0d7ff3567898ef4209b2a9622e6 Mon Sep 17 00:00:00 2001 From: Vasily Ilin Date: Fri, 27 Nov 2026 12:29:48 +0000 Subject: [PATCH 2/7] Reuse pinned Tau Ceti convolution and derivative results --- .../Analysis/Fourier/Convolution.lean | 6 ++--- .../Analysis/Fourier/SchwartzCutoff.lean | 13 +-------- .../FunctionSpaces/Analysis/Lp/Young.lean | 27 ++++++------------- .../ApproximationSpaces/Sequences/Dyadic.lean | 18 +++---------- .../SingularIntegrals/ConvolutionAdjoint.lean | 10 +------ .../Rd/Sobolev/CriticalSobolevEmbedding.lean | 2 +- .../Rd/Sobolev/DerivativeKernels.lean | 25 +---------------- .../Rd/Sobolev/GagliardoNirenbergSobolev.lean | 17 +----------- .../Torus/PeriodicDistributions.lean | 2 +- 9 files changed, 20 insertions(+), 100 deletions(-) diff --git a/LeanPool/FunctionSpaces/Analysis/Fourier/Convolution.lean b/LeanPool/FunctionSpaces/Analysis/Fourier/Convolution.lean index 1800cf211d..386d46ba37 100644 --- a/LeanPool/FunctionSpaces/Analysis/Fourier/Convolution.lean +++ b/LeanPool/FunctionSpaces/Analysis/Fourier/Convolution.lean @@ -23,7 +23,7 @@ integrable kernel `K` with `f ∈ L_p` is `(K ⋆ f)(x) = ∫ K(y) f(x - y) dy` `MeasureTheory.convolution` with the multiplication of `ℂ`). **Young's inequality** `‖K ⋆ f‖_p ≤ ‖K‖_1 ‖f‖_p`, `1 ≤ p < ∞` (`Rd.eLpNorm_conv_le`), is the case -of the group `V` of `MeasureTheory.eLpNorm_convolution_le`. The integral of the convolution +of the group `V` of `MeasureTheory.eLpNorm_complexConvolution_le`. The integral of the convolution converges absolutely at almost every point (`MeasureTheory.ae_convolutionExistsAt`), so convolution is linear in `f` almost everywhere (`Rd.conv_add_ae`, `Rd.conv_sub_ae`, `Rd.conv_finsetSum_ae`, and `Rd.conv_add_ae_of_memLp` for `f ∈ L_p`, `g ∈ L_r`) and defines a @@ -76,11 +76,11 @@ theorem enorm_conv_le_lintegral (K f : V → ℂ) (x : V) : exact lintegral_congr fun y => eNorm_mul _ _ /-- **Young's inequality** for an integrable kernel: `‖K ⋆ f‖_p ≤ ‖K‖_1 ‖f‖_p`, `1 ≤ p < ∞` -(`MeasureTheory.eLpNorm_convolution_le` on the group `V`). -/ +(`MeasureTheory.eLpNorm_complexConvolution_le` on the group `V`). -/ theorem eLpNorm_conv_le {p : ℝ≥0∞} (hp1 : 1 ≤ p) (hp : p ≠ ∞) {K f : V → ℂ} (hK : AEStronglyMeasurable K μ) (hf : AEStronglyMeasurable f μ) : eLpNorm (conv K f μ) p μ ≤ eLpNorm K 1 μ * eLpNorm f p μ := - eLpNorm_convolution_le hp1 hp hK hf + eLpNorm_complexConvolution_le hp1 hp hK hf /-- Convolution of an integrable kernel with an `L_p` function is in `L_p`. -/ theorem memLp_conv {p : ℝ≥0∞} (hp1 : 1 ≤ p) (hp : p ≠ ∞) {K f : V → ℂ} (hK : Integrable K μ) diff --git a/LeanPool/FunctionSpaces/Analysis/Fourier/SchwartzCutoff.lean b/LeanPool/FunctionSpaces/Analysis/Fourier/SchwartzCutoff.lean index 0b33c797f7..0b4ba95865 100644 --- a/LeanPool/FunctionSpaces/Analysis/Fourier/SchwartzCutoff.lean +++ b/LeanPool/FunctionSpaces/Analysis/Fourier/SchwartzCutoff.lean @@ -6,6 +6,7 @@ Authors: Mario Ullrich module public import LeanPool.FunctionSpaces.Analysis.Fourier.LittlewoodPaleyKernels +public import TauCeti.Analysis.Distribution.SchwartzSpace.Deriv public import Mathlib.Analysis.Calculus.FDeriv.Symmetric public import Mathlib.Analysis.Distribution.Distribution public import Mathlib.Analysis.Distribution.TemperedDistribution @@ -66,18 +67,6 @@ namespace SchwartzMap variable {E F : Type*} [NormedAddCommGroup E] [NormedSpace ℝ E] [NormedAddCommGroup F] [NormedSpace ℝ F] -/-- Directional derivatives of a Schwartz function commute: `∂_a ∂_b u = ∂_b ∂_a u`. This is the -symmetry of the second derivative of a `C^2` function (Mathlib's -`ContDiffAt.isSymmSndFDerivAt`), read through `∂^{(a, b)} u(x) = D^2 u(x)(a, b)` -(`SchwartzMap.iteratedLineDerivOp_eq_iteratedFDeriv`). -/ -theorem lineDerivOp_comm (u : 𝓢(E, F)) (a b : E) : ∂_{a} (∂_{b} u) = ∂_{b} (∂_{a} u) := by - ext x - have h1 : ∂_{a} (∂_{b} u) x = ∂^{![a, b]} u x := rfl - have h2 : ∂_{b} (∂_{a} u) x = ∂^{![b, a]} u x := rfl - rw [h1, h2, iteratedLineDerivOp_eq_iteratedFDeriv, iteratedLineDerivOp_eq_iteratedFDeriv] - exact IsSymmSndFDerivAt.iteratedFDeriv_cons - (hf := ((u.smooth ⊤).contDiffAt).isSymmSndFDerivAt (by simp)) - /-- A directional derivative commutes with every iterated directional derivative of a Schwartz function: `∂_a ∂^v u = ∂^v ∂_a u`. -/ theorem lineDerivOp_iteratedLineDerivOp_comm {k : ℕ} (u : 𝓢(E, F)) (a : E) (v : Fin k → E) : diff --git a/LeanPool/FunctionSpaces/Analysis/Lp/Young.lean b/LeanPool/FunctionSpaces/Analysis/Lp/Young.lean index 12ec0dd04a..61fa399da5 100644 --- a/LeanPool/FunctionSpaces/Analysis/Lp/Young.lean +++ b/LeanPool/FunctionSpaces/Analysis/Lp/Young.lean @@ -6,6 +6,7 @@ Authors: Mario Ullrich module public import LeanPool.FunctionSpaces.Analysis.Lp.LintegralForm +public import TauCeti.Analysis.Convolution.Young public import Mathlib.Analysis.Convolution public import Mathlib.MeasureTheory.Integral.Prod @@ -19,7 +20,7 @@ Modified for Lean Pool: module names and imports adapted. On a measurable group `G` with a right-invariant s-finite measure `μ` (a Haar measure on `ℝ^d` or on the torus), the convolution `(K ⋆ f)(x) = ∫ K(y) f(x - y) dμ(y)` with the multiplication of `ℂ` satisfies **Young's inequality** `‖K ⋆ f‖_p ≤ ‖K‖_1 ‖f‖_p` for `1 ≤ p < ∞` -(`MeasureTheory.eLpNorm_convolution_le`). It comes from the weighted Jensen inequality +(`MeasureTheory.eLpNorm_complexConvolution_le`). It comes from the weighted Jensen inequality `(∫ a g)^p ≤ (∫ a)^(p-1) ∫ a g^p` @@ -169,25 +170,13 @@ theorem lintegral_rpow_lintegral_le {p : ℝ≥0∞} (hp1 : 1 ≤ p) (hp : p ≠ rw [ENNReal.mul_rpow_of_nonneg _ _ (by linarith), eLpNorm_one_eq_lintegral_eNorm hK, eLpNorm_rpow_eq hf hp0 hp] -omit [MeasurableAdd₂ G] [MeasurableNeg G] [SFinite μ] [μ.IsAddRightInvariant] in -/-- The pointwise bound `|(K ⋆ f)(x)| ≤ ∫ |K(y)| |f(x - y)| dy`. -/ -theorem enorm_convolution_le_lintegral (K f : G → ℂ) (x : G) : - ‖(K ⋆[ContinuousLinearMap.mul ℂ ℂ, μ] f) x‖ₑ ≤ ∫⁻ y, ‖K y‖ₑ * ‖f (x - y)‖ₑ ∂μ := by - rw [convolution_def] - refine (eNorm_integral_le_lintegral_eNorm _).trans (le_of_eq ?_) - exact lintegral_congr fun y => eNorm_mul _ _ - -/-- **Young's inequality** for an integrable kernel on a measurable group: -`‖K ⋆ f‖_p ≤ ‖K‖_1 ‖f‖_p`, `1 ≤ p < ∞`. -/ -theorem eLpNorm_convolution_le {p : ℝ≥0∞} (hp1 : 1 ≤ p) (hp : p ≠ ∞) {K f : G → ℂ} +/-- Young's inequality for complex-valued convolution with an integrable kernel. -/ +theorem eLpNorm_complexConvolution_le {p : ℝ≥0∞} (hp1 : 1 ≤ p) (_hp : p ≠ ∞) {K f : G → ℂ} (hK : AEStronglyMeasurable K μ) (hf : AEStronglyMeasurable f μ) : eLpNorm (K ⋆[ContinuousLinearMap.mul ℂ ℂ, μ] f) p μ ≤ eLpNorm K 1 μ * eLpNorm f p μ := by - have hp0 : p ≠ 0 := (lt_of_lt_of_le zero_lt_one hp1).ne' - have hq : 0 < p.toReal := ENNReal.toReal_pos hp0 hp - refine eLpNorm_le_of_lintegral_le - (hK.convolution_integrand (ContinuousLinearMap.mul ℂ ℂ) hf).integral_prod_right' hp0 hp ?_ - exact (lintegral_mono fun x => ENNReal.rpow_le_rpow (enorm_convolution_le_lintegral K f x) - hq.le).trans (lintegral_rpow_lintegral_le hp1 hp hK hf) + have hmul : ‖ContinuousLinearMap.mul ℂ ℂ‖ₑ = 1 := by + rw [← ofReal_norm, ContinuousLinearMap.opNorm_mul, ENNReal.ofReal_one] + simpa only [hmul, one_mul] using eLpNorm_convolution_le (ContinuousLinearMap.mul ℂ ℂ) hK hf hp1 /-- The convolution of an integrable kernel with an `L_p` function is in `L_p`. -/ theorem memLp_convolution {p : ℝ≥0∞} (hp1 : 1 ≤ p) (hp : p ≠ ∞) {K f : G → ℂ} @@ -195,7 +184,7 @@ theorem memLp_convolution {p : ℝ≥0∞} (hp1 : 1 ≤ p) (hp : p ≠ ∞) {K f MemLp (K ⋆[ContinuousLinearMap.mul ℂ ℂ, μ] f) p μ := lt_top_iff_ne_top.2 (ne_top_of_le_ne_top (ENNReal.mul_ne_top (memLp_one_iff_integrable.2 hK).eLpNorm_ne_top hf.eLpNorm_ne_top) - (eLpNorm_convolution_le hp1 hp hK.aestronglyMeasurable hf.aestronglyMeasurable)) + (eLpNorm_complexConvolution_le hp1 hp hK.aestronglyMeasurable hf.aestronglyMeasurable)) /-- **The convolution integral converges absolutely almost everywhere** for an integrable kernel and `f ∈ L_p`, `1 ≤ p < ∞`: the integral form of Young's inequality is finite. -/ diff --git a/LeanPool/FunctionSpaces/ApproximationSpaces/Sequences/Dyadic.lean b/LeanPool/FunctionSpaces/ApproximationSpaces/Sequences/Dyadic.lean index b17d080dbe..3e2e657ce0 100644 --- a/LeanPool/FunctionSpaces/ApproximationSpaces/Sequences/Dyadic.lean +++ b/LeanPool/FunctionSpaces/ApproximationSpaces/Sequences/Dyadic.lean @@ -6,6 +6,7 @@ Authors: Mario Ullrich module public import LeanPool.FunctionSpaces.ApproximationSpaces.Sequences.Lq +public import TauCeti.Analysis.SpecialFunctions.Pow.NNReal public import Mathlib.Algebra.BigOperators.Intervals public import Mathlib.Algebra.Order.Ring.GeomSum public import Mathlib.Analysis.PSeries @@ -68,14 +69,6 @@ open scoped ENNReal namespace ENNReal -/-- For a nonpositive exponent, `x ↦ x ^ z` is decreasing on `ℝ≥0∞`. -/ -theorem rpow_le_rpow_of_nonpos {x y : ℝ≥0∞} {z : ℝ} (hxy : x ≤ y) (hz : z ≤ 0) : - y ^ z ≤ x ^ z := by - have hy : y ^ z = (y ^ (-z))⁻¹ := by rw [← ENNReal.rpow_neg, neg_neg] - have hx : x ^ z = (x ^ (-z))⁻¹ := by rw [← ENNReal.rpow_neg, neg_neg] - rw [hy, hx] - exact ENNReal.inv_le_inv.2 (ENNReal.rpow_le_rpow hxy (neg_nonneg.2 hz)) - /-- The initial segment `[0, 2^K)` of `ℕ` is `{0}` together with the dyadic blocks `[2^k, 2^(k+1))`, `k < K`. -/ theorem sum_range_two_pow_eq {M : Type*} [AddCommMonoid M] (g : ℕ → M) (K : ℕ) : @@ -483,11 +476,6 @@ theorem dyadicInterpConst_ne_top {δ θ : ℝ} (hδ : 0 < δ) (hθ0 : 0 < θ) (h theorem one_le_dyadicInterpConst (δ θ : ℝ) : 1 ≤ dyadicInterpConst δ θ := (one_le_one_sub_two_rpow_neg_inv _).trans le_add_self -/-- `Y = Y^θ Y^(1-θ)` in `[0, ∞]` for `0 ≤ θ ≤ 1` (Mathlib's `ENNReal.rpow_add_of_nonneg`). -/ -theorem rpow_mul_rpow_one_sub {θ : ℝ} (hθ0 : 0 ≤ θ) (hθ1 : θ ≤ 1) (Y : ℝ≥0∞) : - Y ^ θ * Y ^ (1 - θ) = Y := by - rw [← ENNReal.rpow_add_of_nonneg _ _ hθ0 (sub_nonneg.2 hθ1), add_sub_cancel, ENNReal.rpow_one] - variable {δ θ : ℝ} {X Y : ℝ≥0∞} /-- **The low-index bound**: if `Y ≤ 2^(-Kδ) X`, then `2^(Kθδ) Y ≤ X^θ Y^(1-θ)` for @@ -502,7 +490,7 @@ theorem dyadicWeight_mul_le_rpow_mul_rpow (hθ0 : 0 ≤ θ) (hθ1 : θ ≤ 1) {K congr 2 ring calc dyadicWeight (θ * δ) K * Y = dyadicWeight (θ * δ) K * Y ^ θ * Y ^ (1 - θ) := by - rw [mul_assoc, rpow_mul_rpow_one_sub hθ0 hθ1] + rw [mul_assoc, rpow_mul_rpow_one_sub _ hθ0 hθ1] _ ≤ dyadicWeight (θ * δ) K * (dyadicWeight (-(θ * δ)) K * X ^ θ) * Y ^ (1 - θ) := by gcongr _ = X ^ θ * Y ^ (1 - θ) := by @@ -522,7 +510,7 @@ theorem dyadicWeight_neg_mul_le_rpow_mul_rpow (hθ0 : 0 ≤ θ) (hθ1 : θ ≤ 1 _ ≤ Y ^ (1 - θ) := ENNReal.rpow_le_rpow hJ (sub_nonneg.2 hθ1) calc dyadicWeight (-((1 - θ) * δ)) J * X = X ^ θ * (dyadicWeight (-((1 - θ) * δ)) J * X ^ (1 - θ)) := by - conv_lhs => rw [← rpow_mul_rpow_one_sub hθ0 hθ1 X] + conv_lhs => rw [← rpow_mul_rpow_one_sub X hθ0 hθ1] ring _ ≤ X ^ θ * Y ^ (1 - θ) := by gcongr diff --git a/LeanPool/FunctionSpaces/Rd/SingularIntegrals/ConvolutionAdjoint.lean b/LeanPool/FunctionSpaces/Rd/SingularIntegrals/ConvolutionAdjoint.lean index ae4f09e84f..5febceb019 100644 --- a/LeanPool/FunctionSpaces/Rd/SingularIntegrals/ConvolutionAdjoint.lean +++ b/LeanPool/FunctionSpaces/Rd/SingularIntegrals/ConvolutionAdjoint.lean @@ -6,6 +6,7 @@ Authors: Mario Ullrich module public import LeanPool.FunctionSpaces.Rd.SingularIntegrals.DilationFamilies +public import TauCeti.Analysis.Distribution.SchwartzSpace.Deriv public import LeanPool.FunctionSpaces.Rd.Sobolev.WeakDerivatives public import LeanPool.FunctionSpaces.Analysis.Lp.Young @@ -54,15 +55,6 @@ namespace SchwartzMap variable {E : Type*} [NormedAddCommGroup E] [NormedSpace ℝ E] -/-- **Derivatives commute with translations**: `∂_v (η(· - y)) = (∂_v η)(· - y)` for a Schwartz -function `η` (Mathlib's `SchwartzMap.compSubConstCLM` and `fderiv_comp_sub`). -/ -theorem lineDerivOp_compSubConstCLM (η : 𝓢(E, ℂ)) (y v : E) : - ∂_{v} (η.compSubConstCLM ℂ y) = (∂_{v} η).compSubConstCLM ℂ y := by - ext x - rw [lineDerivOp_apply_eq_fderiv, compSubConstCLM_apply, lineDerivOp_apply_eq_fderiv] - change fderiv ℝ (fun z => η (z - y)) x v = _ - rw [fderiv_comp_sub] - /-- Iterated derivatives commute with translations: `∂^w (η(· - y)) = (∂^w η)(· - y)`. -/ theorem iteratedLineDerivOp_compSubConstCLM {k : ℕ} (η : 𝓢(E, ℂ)) (y : E) (w : Fin k → E) : ∂^{w} (η.compSubConstCLM ℂ y) = (∂^{w} η).compSubConstCLM ℂ y := by diff --git a/LeanPool/FunctionSpaces/Rd/Sobolev/CriticalSobolevEmbedding.lean b/LeanPool/FunctionSpaces/Rd/Sobolev/CriticalSobolevEmbedding.lean index da0e7c193c..344f43a7cd 100644 --- a/LeanPool/FunctionSpaces/Rd/Sobolev/CriticalSobolevEmbedding.lean +++ b/LeanPool/FunctionSpaces/Rd/Sobolev/CriticalSobolevEmbedding.lean @@ -182,7 +182,7 @@ theorem eLpNorm_tsum_dyadicWeight_enorm_blockFun_le [Nontrivial V] (hp₀₁ : p (ENNReal.rpow_le_rpow hB (sub_nonneg.2 hθ1.le)))) le_rfl _ = criticalEmbeddingConst V p₀ p₁ * T := by rw [criticalEmbeddingConst, mul_assoc, mul_assoc, mul_assoc, mul_comm (T ^ (1 - θ)), - ENNReal.rpow_mul_rpow_one_sub hθ0.le hθ1.le] + ENNReal.rpow_mul_rpow_one_sub _ hθ0.le hθ1.le] /-! ### The embeddings -/ diff --git a/LeanPool/FunctionSpaces/Rd/Sobolev/DerivativeKernels.lean b/LeanPool/FunctionSpaces/Rd/Sobolev/DerivativeKernels.lean index efd8628f02..3d68a64cad 100644 --- a/LeanPool/FunctionSpaces/Rd/Sobolev/DerivativeKernels.lean +++ b/LeanPool/FunctionSpaces/Rd/Sobolev/DerivativeKernels.lean @@ -6,6 +6,7 @@ Authors: Mario Ullrich module public import LeanPool.FunctionSpaces.Rd.SingularIntegrals.DilationFamilies +public import TauCeti.Analysis.Distribution.SchwartzSpace.Fourier /- Modified for Lean Pool: module names and imports adapted. @@ -43,30 +44,6 @@ Fourier transform `𝓕η_i(ξ) = ∏_k ⟪ξ, e_{i_k}⟫ / ((2πi)^m ‖ξ‖^{ open MeasureTheory Module Metric Filter open scoped ENNReal SchwartzMap FourierTransform LineDeriv Real -namespace SchwartzMap - -variable {V : Type*} [NormedAddCommGroup V] [InnerProductSpace ℝ V] [FiniteDimensional ℝ V] - [MeasurableSpace V] [BorelSpace V] - -/-- **The Fourier transform of an iterated derivative**: for every Schwartz function `G` on `V` -with values in a complex normed space `E` and directions `w ∈ V^k`, with -`∂^w = ∂_{w_0} ⋯ ∂_{w_{k-1}}`, `𝓕(∂^w G)(ξ) = (∏_l 2πi ⟪ξ, w_l⟫) 𝓕G(ξ)`, by induction from -Mathlib's `SchwartzMap.fourier_lineDerivOp_eq`. -/ -theorem fourier_iteratedLineDerivOp_apply {E : Type*} [NormedAddCommGroup E] [NormedSpace ℂ E] - {k : ℕ} (w : Fin k → V) (G : 𝓢(V, E)) (ξ : V) : - 𝓕 (∂^{w} G) ξ = (∏ l, 2 * π * Complex.I * (inner ℝ ξ (w l) : ℂ)) • 𝓕 G ξ := by - induction k with - | zero => simp - | succ k ih => - have h : (fun x : V => inner ℝ x (w 0)).HasTemperateGrowth := by fun_prop - rw [LineDeriv.iteratedLineDerivOp_succ_left, SchwartzMap.fourier_lineDerivOp_eq, - smul_apply, SchwartzMap.smulLeftCLM_apply_apply h, ih, Fin.prod_univ_succ] - simp only [Fin.tail, ← Complex.coe_smul, smul_smul] - congr 1 - ring - -end SchwartzMap - namespace Rd variable {V : Type*} [NormedAddCommGroup V] [InnerProductSpace ℝ V] [FiniteDimensional ℝ V] diff --git a/LeanPool/FunctionSpaces/Rd/Sobolev/GagliardoNirenbergSobolev.lean b/LeanPool/FunctionSpaces/Rd/Sobolev/GagliardoNirenbergSobolev.lean index 5d35106199..fede82e290 100644 --- a/LeanPool/FunctionSpaces/Rd/Sobolev/GagliardoNirenbergSobolev.lean +++ b/LeanPool/FunctionSpaces/Rd/Sobolev/GagliardoNirenbergSobolev.lean @@ -6,6 +6,7 @@ Authors: Mario Ullrich module public import LeanPool.FunctionSpaces.Rd.Sobolev.CriticalSobolevEmbedding +public import TauCeti.Analysis.InnerProductSpace.Orthonormal.Multilinear public import LeanPool.FunctionSpaces.Rd.Sobolev.WeakDerivativeChangeOfVariables public import Mathlib.Analysis.FunctionalSpaces.SobolevInequality @@ -59,22 +60,6 @@ theorem MeasureTheory.eLpNorm_le_of_ae_tendsto_of_tendsto {α E : Type*} [Measur (Lp.eLpNorm_lim_le_liminf_eLpNorm hu f (aestronglyMeasurable_of_tendsto_ae atTop hu hlim) hlim).trans ((liminf_le_liminf (Eventually.of_forall hle)).trans_eq hB.liminf_eq) -/-- **The operator norm through an orthonormal basis**: for an orthonormal basis `b` of a real -inner product space `E` and a continuous linear map `L : E → F`, `‖L‖ ≤ ∑_i ‖L b_i‖`, since -`x = ∑_i ⟪b_i, x⟫ b_i` (Mathlib's `OrthonormalBasis.sum_repr'`) and `|⟪b_i, x⟫| ≤ ‖x‖`. -/ -theorem ContinuousLinearMap.opNorm_le_sum_norm_apply_orthonormalBasis {ι E F : Type*} - [Fintype ι] [NormedAddCommGroup E] [InnerProductSpace ℝ E] [NormedAddCommGroup F] - [NormedSpace ℝ F] (L : E →L[ℝ] F) (b : OrthonormalBasis ι ℝ E) : - ‖L‖ ≤ ∑ i, ‖L (b i)‖ := by - refine L.opNorm_le_bound (Finset.sum_nonneg fun i _ => norm_nonneg _) fun x => ?_ - conv_lhs => rw [← b.sum_repr' x] - rw [map_sum, Finset.sum_mul] - refine (norm_sum_le _ _).trans (Finset.sum_le_sum fun i _ => ?_) - rw [map_smul, norm_smul, mul_comm] - refine mul_le_mul_of_nonneg_left ?_ (norm_nonneg _) - calc ‖inner ℝ (b i) x‖ ≤ ‖b i‖ * ‖x‖ := norm_inner_le_norm _ _ - _ = ‖x‖ := by rw [b.orthonormal.1 i, one_mul] - namespace Rd variable {V : Type*} [NormedAddCommGroup V] [InnerProductSpace ℝ V] [FiniteDimensional ℝ V] diff --git a/LeanPool/FunctionSpaces/Torus/PeriodicDistributions.lean b/LeanPool/FunctionSpaces/Torus/PeriodicDistributions.lean index 66b60bfda9..a2bf804f66 100644 --- a/LeanPool/FunctionSpaces/Torus/PeriodicDistributions.lean +++ b/LeanPool/FunctionSpaces/Torus/PeriodicDistributions.lean @@ -180,7 +180,7 @@ theorem periodicPairing_iteratedLineDerivOp_mFourierLp (m : d → ℤ) : periodicPairing p (∂^{v} φ) (mFourierLp p m) = (-1) ^ k * lineSymbol v m * periodicPairing p φ (mFourierLp p m) := by - have h := SchwartzMap.fourier_iteratedLineDerivOp_apply v (Rd.testSchwartz φ) (latticeVec (-m)) + have h := SchwartzMap.fourier_iteratedLineDerivOp_apply (Rd.testSchwartz φ) v (latticeVec (-m)) rw [Rd.iteratedLineDerivOp_testSchwartz] at h rw [periodicPairing_mFourierLp, periodicPairing_mFourierLp, ← SchwartzMap.fourier_coe, h, ← SchwartzMap.fourier_coe, smul_eq_mul] From f2ce3ad513a8f1a35dcc0d48969f2b9cd6ab02bc Mon Sep 17 00:00:00 2001 From: Vasily Ilin Date: Fri, 27 Nov 2026 12:58:45 +0000 Subject: [PATCH 3/7] Optimize function-space imports and complete lint and source repairs --- LeanPool/FunctionSpaces.lean | 200 +----------------- .../Analysis/Differences/DomainModuli.lean | 2 +- .../Analysis/Fourier/ApproxIdentity.lean | 10 +- .../Analysis/Fourier/Convolution.lean | 16 +- .../Analysis/Maximal/FeffermanStein.lean | 16 +- .../Maximal/HardyLittlewoodMaximal.lean | 18 +- .../Decompositions/Atomic.lean | 2 +- .../Instances/NTermHilbertBasis.lean | 6 +- .../Interpolation/Reiteration.lean | 10 +- .../ApproximationSpaces/Sequences/Lq.lean | 4 +- .../Extension/HigherDivergenceKernels.lean | 7 +- .../Extension/HigherSobolevExtension.lean | 2 +- .../Domains/Extension/LocalExtension.lean | 4 +- .../Extension/ReflectionExtension.lean | 3 +- .../ReflectionExtensionOperator.lean | 3 +- .../Domains/Extension/SobolevExtension.lean | 4 +- .../Domains/Interval/LocalProjection.lean | 4 +- .../Domains/Interval/Periodic.lean | 23 +- .../Domains/Interval/PiecewisePeriodic.lean | 9 +- .../Domains/Interval/Polynomials.lean | 2 +- .../Domains/Interval/Smoothing.lean | 4 +- .../Domains/Interval/SplinePeriodic.lean | 2 +- .../Lipschitz/BesovDomainLocalisation.lean | 8 +- .../Domains/Lipschitz/BesovDomains.lean | 3 +- .../Domains/Lipschitz/BoundedLipschitz.lean | 12 +- .../Lipschitz/GraphParametrization.lean | 9 +- .../Domains/Lipschitz/LipschitzGraph.lean | 15 +- .../Domains/Lipschitz/LipschitzGraphArea.lean | 2 +- .../Domains/Manifolds/SmoothLocalGraphs.lean | 5 +- .../Domains/Sobolev/LipschitzGraphGreen.lean | 13 +- .../Domains/Sobolev/SobolevDuality.lean | 81 +++---- .../Sobolev/SobolevRestrictionSpaces.lean | 58 ++--- .../Domains/Spectral/ChartFormEigenbasis.lean | 30 ++- .../Domains/Spectral/DirichletEigenbasis.lean | 2 +- .../Domains/Spectral/NeumannEigenbasis.lean | 6 +- .../Domains/Traces/GraphTraceExtension.lean | 8 +- .../Domains/Traces/MollifiedGraph.lean | 6 +- .../Domains/Traces/TraceKernel.lean | 57 ++--- .../MeasureSpaces/Spectral/Blocks.lean | 6 +- .../Spectral/ContinuousSpectralBasis.lean | 14 +- .../MeasureSpaces/Spectral/LocalWeyl.lean | 19 +- .../FunctionSpaces/Rd/Atoms/AtomAnalysis.lean | 36 ++-- .../Rd/Atoms/AtomSynthesis.lean | 16 +- .../FunctionSpaces/Rd/Atoms/SmoothAtoms.lean | 5 +- .../BesselPotentialDistributions.lean | 8 +- .../BesselPotentialEmbedding.lean | 4 +- .../BesselPotentialLifting.lean | 4 +- .../Rd/Differences/BesovDifferences.lean | 2 +- .../Rd/FourierMultipliers/SymbolKernels.lean | 9 +- .../TriebelLizorkinMultipliers.lean | 21 +- .../Rd/Interpolation/BesovInterpolation.lean | 2 +- .../Rd/LocalMeans/KernelMajorants.lean | 11 +- .../Rd/LocalMeans/LocalMeans.lean | 11 +- .../VectorValuedWeakType.lean | 3 +- .../Rd/Sobolev/DivergenceKernels.lean | 5 +- .../Rd/Sobolev/GagliardoNirenbergSobolev.lean | 4 +- .../Rd/Sobolev/SobolevTriebelLizorkin.lean | 20 +- .../Rd/TriebelLizorkin/SquareFunction.lean | 9 +- .../TriebelLizorkin/TriebelLizorkinAtoms.lean | 10 +- .../TriebelLizorkinDifferences.lean | 2 +- .../Torus/BesovInterpolation.lean | 2 +- .../FunctionSpaces/Torus/LpBesovModuli.lean | 2 +- .../FunctionSpaces/Torus/NTermFourier.lean | 2 +- .../Torus/SobolevTriebelLizorkin.lean | 13 +- .../FunctionSpaces/Torus/SquareFunction.lean | 8 +- .../Wavelets/Examples/Daubechies/Besov.lean | 6 +- .../Examples/Daubechies/FejerRiesz.lean | 25 +-- .../Examples/DyadicStepsQuasiBanach.lean | 19 +- LeanPool/projects/function-spaces.yaml | 6 +- 69 files changed, 428 insertions(+), 542 deletions(-) diff --git a/LeanPool/FunctionSpaces.lean b/LeanPool/FunctionSpaces.lean index 27d4fa36c9..6f359b9473 100644 --- a/LeanPool/FunctionSpaces.lean +++ b/LeanPool/FunctionSpaces.lean @@ -6,232 +6,35 @@ Authors: Mario Ullrich module public import LeanPool.FunctionSpaces.ApproximationSpaces -public import LeanPool.FunctionSpaces.Analysis.Differences.Differences -public import LeanPool.FunctionSpaces.Analysis.Differences.DomainModuli -public import LeanPool.FunctionSpaces.Analysis.Differences.TranslationAlgebra -public import LeanPool.FunctionSpaces.Analysis.Fourier.ApproxIdentity -public import LeanPool.FunctionSpaces.Analysis.Fourier.Convolution -public import LeanPool.FunctionSpaces.Analysis.Fourier.LittlewoodPaleyKernels -public import LeanPool.FunctionSpaces.Analysis.Fourier.SchwartzCutoff -public import LeanPool.FunctionSpaces.Analysis.Lp.BoundedContinuous -public import LeanPool.FunctionSpaces.Analysis.Lp.Inclusion -public import LeanPool.FunctionSpaces.Analysis.Lp.IndicatorOperator -public import LeanPool.FunctionSpaces.Analysis.Lp.Interpolation -public import LeanPool.FunctionSpaces.Analysis.Lp.LayerCake -public import LeanPool.FunctionSpaces.Analysis.Lp.LintegralForm -public import LeanPool.FunctionSpaces.Analysis.Lp.Marcinkiewicz -public import LeanPool.FunctionSpaces.Analysis.Lp.MixedNorms -public import LeanPool.FunctionSpaces.Analysis.Lp.NormingFamily -public import LeanPool.FunctionSpaces.Analysis.Lp.WeakType -public import LeanPool.FunctionSpaces.Analysis.Lp.Young -public import LeanPool.FunctionSpaces.Analysis.Maximal.CalderonZygmund -public import LeanPool.FunctionSpaces.Analysis.Maximal.CalderonZygmundSigned -public import LeanPool.FunctionSpaces.Analysis.Maximal.DyadicCubes -public import LeanPool.FunctionSpaces.Analysis.Maximal.DyadicGrid -public import LeanPool.FunctionSpaces.Analysis.Maximal.FeffermanStein -public import LeanPool.FunctionSpaces.Analysis.Maximal.HardyLittlewoodMaximal -public import LeanPool.FunctionSpaces.Domains.Cube.Basic public import LeanPool.FunctionSpaces.Domains.Cube.IsoCoincidence -public import LeanPool.FunctionSpaces.Domains.Cube.IsoDifferences -public import LeanPool.FunctionSpaces.Domains.Cube.IsoInverse -public import LeanPool.FunctionSpaces.Domains.Cube.IsoModulus -public import LeanPool.FunctionSpaces.Domains.Cube.Modulus -public import LeanPool.FunctionSpaces.Domains.Cube.PiecewiseInverse -public import LeanPool.FunctionSpaces.Domains.Cube.PiecewiseJackson -public import LeanPool.FunctionSpaces.Domains.Cube.PiecewisePoly -public import LeanPool.FunctionSpaces.Domains.Cube.SlicewiseOperators -public import LeanPool.FunctionSpaces.Domains.Cube.Smoothing -public import LeanPool.FunctionSpaces.Domains.Cube.SplineInverse -public import LeanPool.FunctionSpaces.Domains.Cube.SplineJackson -public import LeanPool.FunctionSpaces.Domains.Cube.Splines -public import LeanPool.FunctionSpaces.Domains.Extension.HalfSpaceReflection -public import LeanPool.FunctionSpaces.Domains.Extension.HigherDivergenceKernels public import LeanPool.FunctionSpaces.Domains.Extension.HigherSobolevExtension -public import LeanPool.FunctionSpaces.Domains.Extension.LipschitzGraphBesov -public import LeanPool.FunctionSpaces.Domains.Extension.LocalExtension -public import LeanPool.FunctionSpaces.Domains.Extension.ReflectionExtension -public import LeanPool.FunctionSpaces.Domains.Extension.ReflectionExtensionOperator -public import LeanPool.FunctionSpaces.Domains.Extension.RychkovExtension -public import LeanPool.FunctionSpaces.Domains.Extension.SobolevExtension -public import LeanPool.FunctionSpaces.Domains.Extension.SobolevExtensionOperator -public import LeanPool.FunctionSpaces.Domains.Interval.BSpline -public import LeanPool.FunctionSpaces.Domains.Interval.Differences -public import LeanPool.FunctionSpaces.Domains.Interval.LocalProjection -public import LeanPool.FunctionSpaces.Domains.Interval.LowerDifferences -public import LeanPool.FunctionSpaces.Domains.Interval.Modulus -public import LeanPool.FunctionSpaces.Domains.Interval.Periodic -public import LeanPool.FunctionSpaces.Domains.Interval.PiecewiseInverse -public import LeanPool.FunctionSpaces.Domains.Interval.PiecewiseJackson -public import LeanPool.FunctionSpaces.Domains.Interval.PiecewisePeriodic -public import LeanPool.FunctionSpaces.Domains.Interval.PiecewisePoly -public import LeanPool.FunctionSpaces.Domains.Interval.PolyDifferences -public import LeanPool.FunctionSpaces.Domains.Interval.Polynomials -public import LeanPool.FunctionSpaces.Domains.Interval.QuasiInterp -public import LeanPool.FunctionSpaces.Domains.Interval.Smoothing -public import LeanPool.FunctionSpaces.Domains.Interval.SplineInverse -public import LeanPool.FunctionSpaces.Domains.Interval.SplineJackson -public import LeanPool.FunctionSpaces.Domains.Interval.SplinePeriodic public import LeanPool.FunctionSpaces.Domains.Interval.SplinePeriodicJackson -public import LeanPool.FunctionSpaces.Domains.Interval.Splines -public import LeanPool.FunctionSpaces.Domains.Interval.Steklov -public import LeanPool.FunctionSpaces.Domains.Interval.Taylor -public import LeanPool.FunctionSpaces.Domains.Interval.Whitney -public import LeanPool.FunctionSpaces.Domains.Lipschitz.BesovDomainLocalisation -public import LeanPool.FunctionSpaces.Domains.Lipschitz.BesovDomains -public import LeanPool.FunctionSpaces.Domains.Lipschitz.BoundedLipschitz -public import LeanPool.FunctionSpaces.Domains.Lipschitz.ConvexDomains -public import LeanPool.FunctionSpaces.Domains.Lipschitz.GraphParametrization -public import LeanPool.FunctionSpaces.Domains.Lipschitz.GraphStraightening -public import LeanPool.FunctionSpaces.Domains.Lipschitz.HalfSpace -public import LeanPool.FunctionSpaces.Domains.Lipschitz.LipschitzGraph -public import LeanPool.FunctionSpaces.Domains.Lipschitz.LipschitzGraphArea -public import LeanPool.FunctionSpaces.Domains.Lipschitz.LocalLipschitzGraphs -public import LeanPool.FunctionSpaces.Domains.Lipschitz.SurfaceMeasure -public import LeanPool.FunctionSpaces.Domains.Manifolds.Besov -public import LeanPool.FunctionSpaces.Domains.Manifolds.BesovAtlas -public import LeanPool.FunctionSpaces.Domains.Manifolds.BoundaryBesov public import LeanPool.FunctionSpaces.Domains.Manifolds.BoundaryTrace -public import LeanPool.FunctionSpaces.Domains.Manifolds.ChartSobolev -public import LeanPool.FunctionSpaces.Domains.Manifolds.SmoothDomain -public import LeanPool.FunctionSpaces.Domains.Manifolds.SmoothDomainBesov -public import LeanPool.FunctionSpaces.Domains.Manifolds.SmoothLocalGraphs -public import LeanPool.FunctionSpaces.Domains.Manifolds.SmoothMeasure -public import LeanPool.FunctionSpaces.Domains.Manifolds.SmoothMeasureExistence -public import LeanPool.FunctionSpaces.Domains.Sobolev.LipschitzDomainGreen -public import LeanPool.FunctionSpaces.Domains.Sobolev.LipschitzDomainH1 -public import LeanPool.FunctionSpaces.Domains.Sobolev.LipschitzDomainW1p -public import LeanPool.FunctionSpaces.Domains.Sobolev.LipschitzGraphGreen -public import LeanPool.FunctionSpaces.Domains.Sobolev.SobolevDuality -public import LeanPool.FunctionSpaces.Domains.Sobolev.SobolevRestrictionSpaces -public import LeanPool.FunctionSpaces.Domains.Spectral.ChartFormEigenbasis -public import LeanPool.FunctionSpaces.Domains.Spectral.DirichletEigenbasis public import LeanPool.FunctionSpaces.Domains.Spectral.ManifoldSpectralBesov -public import LeanPool.FunctionSpaces.Domains.Spectral.NeumannEigenbasis -public import LeanPool.FunctionSpaces.Domains.Spectral.SpectralBesov -public import LeanPool.FunctionSpaces.Domains.Traces.BoundaryBesovNorm public import LeanPool.FunctionSpaces.Domains.Traces.BoundaryGagliardo -public import LeanPool.FunctionSpaces.Domains.Traces.BoundaryTraceSpace -public import LeanPool.FunctionSpaces.Domains.Traces.GraphTrace -public import LeanPool.FunctionSpaces.Domains.Traces.GraphTraceCharts -public import LeanPool.FunctionSpaces.Domains.Traces.GraphTraceExtension -public import LeanPool.FunctionSpaces.Domains.Traces.HalfSpaceTrace -public import LeanPool.FunctionSpaces.Domains.Traces.LipschitzBoundaryTrace -public import LeanPool.FunctionSpaces.Domains.Traces.MollifiedGraph public import LeanPool.FunctionSpaces.Domains.Traces.TraceKernel -public import LeanPool.FunctionSpaces.Domains.Traces.TraceSpaceNorm -public import LeanPool.FunctionSpaces.MeasureSpaces.Besov.Basic -public import LeanPool.FunctionSpaces.MeasureSpaces.Besov.ElementaryEmbeddings -public import LeanPool.FunctionSpaces.MeasureSpaces.Besov.Embeddings public import LeanPool.FunctionSpaces.MeasureSpaces.Besov.Interpolation -public import LeanPool.FunctionSpaces.MeasureSpaces.Besov.Nikolskii -public import LeanPool.FunctionSpaces.MeasureSpaces.Martingales.Filtration -public import LeanPool.FunctionSpaces.MeasureSpaces.Martingales.Partition -public import LeanPool.FunctionSpaces.MeasureSpaces.Scheme -public import LeanPool.FunctionSpaces.MeasureSpaces.Sobolev.Embeddings -public import LeanPool.FunctionSpaces.MeasureSpaces.Spectral.Basic -public import LeanPool.FunctionSpaces.MeasureSpaces.Spectral.Blocks -public import LeanPool.FunctionSpaces.MeasureSpaces.Spectral.CompactEigenbasis -public import LeanPool.FunctionSpaces.MeasureSpaces.Spectral.CompactEmbedding -public import LeanPool.FunctionSpaces.MeasureSpaces.Spectral.ContinuousSpectralBasis -public import LeanPool.FunctionSpaces.MeasureSpaces.Spectral.LocalWeyl -public import LeanPool.FunctionSpaces.Rd.Approximation.BandInverse -public import LeanPool.FunctionSpaces.Rd.Approximation.BandJackson -public import LeanPool.FunctionSpaces.Rd.Approximation.BandLimited -public import LeanPool.FunctionSpaces.Rd.Atoms.AtomAnalysis -public import LeanPool.FunctionSpaces.Rd.Atoms.AtomComposition -public import LeanPool.FunctionSpaces.Rd.Atoms.AtomSynthesis -public import LeanPool.FunctionSpaces.Rd.Atoms.DiffeoInvariance -public import LeanPool.FunctionSpaces.Rd.Atoms.SmoothAtoms -public import LeanPool.FunctionSpaces.Rd.BesselPotentials.BesselPotentialDistributions public import LeanPool.FunctionSpaces.Rd.BesselPotentials.BesselPotentialEmbedding -public import LeanPool.FunctionSpaces.Rd.BesselPotentials.BesselPotentialLifting -public import LeanPool.FunctionSpaces.Rd.BesselPotentials.UniformSchwartzFamilies -public import LeanPool.FunctionSpaces.Rd.Differences.BesovDifferences -public import LeanPool.FunctionSpaces.Rd.Differences.ConvexDifferences -public import LeanPool.FunctionSpaces.Rd.Differences.DilatedDifferences -public import LeanPool.FunctionSpaces.Rd.Differences.MomentKernels -public import LeanPool.FunctionSpaces.Rd.Differences.PointwiseMultipliers -public import LeanPool.FunctionSpaces.Rd.Differences.SobolevSlobodeckij public import LeanPool.FunctionSpaces.Rd.FourierMultipliers.BesselPotentialMultipliers public import LeanPool.FunctionSpaces.Rd.FourierMultipliers.MihlinMultipliers -public import LeanPool.FunctionSpaces.Rd.FourierMultipliers.SymbolKernels -public import LeanPool.FunctionSpaces.Rd.FourierMultipliers.TriebelLizorkinMultipliers public import LeanPool.FunctionSpaces.Rd.Interpolation.BesovInterpolation -public import LeanPool.FunctionSpaces.Rd.Interpolation.BesselPotentialInterpolation public import LeanPool.FunctionSpaces.Rd.Interpolation.SobolevInterpolation -public import LeanPool.FunctionSpaces.Rd.Interpolation.TriebelLizorkinInterpolation -public import LeanPool.FunctionSpaces.Rd.LittlewoodPaley.LittlewoodPaley -public import LeanPool.FunctionSpaces.Rd.LocalMeans.KernelMajorants -public import LeanPool.FunctionSpaces.Rd.LocalMeans.LocalMeans public import LeanPool.FunctionSpaces.Rd.MixedSmoothness.HyperbolicCross -public import LeanPool.FunctionSpaces.Rd.MixedSmoothness.MixedAveragedDifferences -public import LeanPool.FunctionSpaces.Rd.MixedSmoothness.MixedDifferences -public import LeanPool.FunctionSpaces.Rd.MixedSmoothness.MixedLittlewoodPaley -public import LeanPool.FunctionSpaces.Rd.MixedSmoothness.MixedLocalMeans -public import LeanPool.FunctionSpaces.Rd.MixedSmoothness.MixedSequences -public import LeanPool.FunctionSpaces.Rd.MixedSmoothness.TensorKernels -public import LeanPool.FunctionSpaces.Rd.SingularIntegrals.ConvolutionAdjoint -public import LeanPool.FunctionSpaces.Rd.SingularIntegrals.DilationFamilies -public import LeanPool.FunctionSpaces.Rd.SingularIntegrals.PlancherelBounds -public import LeanPool.FunctionSpaces.Rd.SingularIntegrals.VectorValuedSingularIntegrals -public import LeanPool.FunctionSpaces.Rd.SingularIntegrals.VectorValuedWeakType -public import LeanPool.FunctionSpaces.Rd.Sobolev.CriticalSobolevEmbedding -public import LeanPool.FunctionSpaces.Rd.Sobolev.DerivativeKernels -public import LeanPool.FunctionSpaces.Rd.Sobolev.DivergenceKernels public import LeanPool.FunctionSpaces.Rd.Sobolev.GagliardoNirenbergSobolev -public import LeanPool.FunctionSpaces.Rd.Sobolev.RellichCompactness -public import LeanPool.FunctionSpaces.Rd.Sobolev.SobolevEmbedding -public import LeanPool.FunctionSpaces.Rd.Sobolev.SobolevJets -public import LeanPool.FunctionSpaces.Rd.Sobolev.SobolevTriebelLizorkin -public import LeanPool.FunctionSpaces.Rd.Sobolev.SobolevTwoLittlewoodPaley -public import LeanPool.FunctionSpaces.Rd.Sobolev.WeakDerivativeChangeOfVariables -public import LeanPool.FunctionSpaces.Rd.Sobolev.WeakDerivativeLeibniz -public import LeanPool.FunctionSpaces.Rd.Sobolev.WeakDerivatives public import LeanPool.FunctionSpaces.Rd.TriebelLizorkin.LittlewoodPaleyFamilies -public import LeanPool.FunctionSpaces.Rd.TriebelLizorkin.SquareFunction -public import LeanPool.FunctionSpaces.Rd.TriebelLizorkin.TriebelLizorkin public import LeanPool.FunctionSpaces.Rd.TriebelLizorkin.TriebelLizorkinAtoms public import LeanPool.FunctionSpaces.Rd.TriebelLizorkin.TriebelLizorkinDifferences -public import LeanPool.FunctionSpaces.Rd.TriebelLizorkin.TriebelLizorkinDistributions -public import LeanPool.FunctionSpaces.Rd.TriebelLizorkin.TriebelLizorkinLocalMeans public import LeanPool.FunctionSpaces.Torus.BesovInterpolation public import LeanPool.FunctionSpaces.Torus.BesovModuli -public import LeanPool.FunctionSpaces.Torus.Coefficients -public import LeanPool.FunctionSpaces.Torus.Embeddings -public import LeanPool.FunctionSpaces.Torus.EuclideanConvolution -public import LeanPool.FunctionSpaces.Torus.EuclideanConvolutionIdentities -public import LeanPool.FunctionSpaces.Torus.FeffermanStein public import LeanPool.FunctionSpaces.Torus.FourierSpectralBasis -public import LeanPool.FunctionSpaces.Torus.HaarMeasure -public import LeanPool.FunctionSpaces.Torus.LittlewoodPaley -public import LeanPool.FunctionSpaces.Torus.LpBesovModuli -public import LeanPool.FunctionSpaces.Torus.LpFourierCoefficients -public import LeanPool.FunctionSpaces.Torus.LpJackson -public import LeanPool.FunctionSpaces.Torus.LpWeakDerivatives -public import LeanPool.FunctionSpaces.Torus.Modulus public import LeanPool.FunctionSpaces.Torus.NTermFourier -public import LeanPool.FunctionSpaces.Torus.Nikolskii public import LeanPool.FunctionSpaces.Torus.PeriodicDistributions -public import LeanPool.FunctionSpaces.Torus.PeriodicLift -public import LeanPool.FunctionSpaces.Torus.SingularIntegrals -public import LeanPool.FunctionSpaces.Torus.Sobolev public import LeanPool.FunctionSpaces.Torus.SobolevEmbedding -public import LeanPool.FunctionSpaces.Torus.SobolevTriebelLizorkin -public import LeanPool.FunctionSpaces.Torus.SquareFunction -public import LeanPool.FunctionSpaces.Torus.Trace public import LeanPool.FunctionSpaces.Torus.TraceContinuous -public import LeanPool.FunctionSpaces.Torus.Translation -public import LeanPool.FunctionSpaces.Torus.TriebelLizorkin public import LeanPool.FunctionSpaces.Torus.TriebelLizorkinInterpolation -public import LeanPool.FunctionSpaces.Torus.TriebelLizorkinLocalMeans -public import LeanPool.FunctionSpaces.Torus.TrigPolynomials -public import LeanPool.FunctionSpaces.Torus.WeakDerivatives -public import LeanPool.FunctionSpaces.Wavelets.DyadicNormalisation -public import LeanPool.FunctionSpaces.Wavelets.Examples.Daubechies.Besov public import LeanPool.FunctionSpaces.Wavelets.Examples.Daubechies.D4Besov public import LeanPool.FunctionSpaces.Wavelets.Examples.Daubechies.OrderThree public import LeanPool.FunctionSpaces.Wavelets.Examples.DyadicStepsQuasiBanach -public import LeanPool.FunctionSpaces.Wavelets.Examples.HaarBesov /-! # Characterizations of Besov, Triebel–Lizorkin and Sobolev spaces @@ -239,8 +42,7 @@ public import LeanPool.FunctionSpaces.Wavelets.Examples.HaarBesov Source: url:https://github.com/mario-ullrich/Lean-FunctionSpaces/blob/d8b2b349567adb7ad049d517dec50bff4165e606/README.md Authors: Mario Ullrich Status: verified -Main declarations: `Rd.LocalMeansBump.besov_iff_atomic`, - `Rd.LocalMeansBump.memTriebelLizorkin_iff_atomic`, +Main declarations: `Rd.LocalMeansBump.besov_iff_atomic`, `Rd.memTriebelLizorkin_iff_atomic`, `Rd.memSobolev_bessel_iff_memTriebelLizorkinDistr`, `Daubechies.besov_iff_coeff_d4`, `Haar.memEMethod_stepCouple_iff_modulus`, `ApproximationScheme.memKMethod_reiteration` Tags: approximation-theory, functional-analysis, harmonic-analysis, real-interpolation, wavelets diff --git a/LeanPool/FunctionSpaces/Analysis/Differences/DomainModuli.lean b/LeanPool/FunctionSpaces/Analysis/Differences/DomainModuli.lean index d0af0746d3..e90e97f8cf 100644 --- a/LeanPool/FunctionSpaces/Analysis/Differences/DomainModuli.lean +++ b/LeanPool/FunctionSpaces/Analysis/Differences/DomainModuli.lean @@ -231,7 +231,7 @@ theorem lpModulusOn_succ_le (U : Set V) (r : ℕ) (f : Lp ℂ p μ) (k : ℕ) : omit [μ.IsAddHaarMeasure] in /-- `ω_r(f, 2^(-k), U)_p ≤ ω_r(f, 2^(-k))_p` on `L_p`. -/ -theorem lpModulusOn_le_lpModulus [Fact (1 ≤ p)] {U : Set V} (hU : MeasurableSet U) (r : ℕ) +theorem lpModulusOn_le_lpModulus {U : Set V} (hU : MeasurableSet U) (r : ℕ) (f : Lp ℂ p μ) (k : ℕ) : lpModulusOn p U r f k ≤ lpModulus p r f k := modulusOn_le_modulus hU r p _ _ diff --git a/LeanPool/FunctionSpaces/Analysis/Fourier/ApproxIdentity.lean b/LeanPool/FunctionSpaces/Analysis/Fourier/ApproxIdentity.lean index 0a6ff929d7..3d80263ae7 100644 --- a/LeanPool/FunctionSpaces/Analysis/Fourier/ApproxIdentity.lean +++ b/LeanPool/FunctionSpaces/Analysis/Fourier/ApproxIdentity.lean @@ -158,8 +158,9 @@ theorem smul_mem_tsupport_of_mem_tsupport_dilate {η : V → ℂ} {c : ℝ} (hc exact h2 omit [FiniteDimensional ℝ V] [MeasurableSpace V] [BorelSpace V] in -/-- **Dilated supports shrink**: if the closed support of `η` lies in `B̄(0, R)` and `c > 0`, the -closed support of `η_c` lies in `B̄(0, R/c)`. -/ +/-- **Dilated supports shrink**: if the closed support of `η` lies in `closedBall(0, R)` and `c +> 0`, the +closed support of `η_c` lies in `closedBall(0, R/c)`. -/ theorem norm_le_of_mem_tsupport_dilate {η : V → ℂ} {R : ℝ} (hηR : tsupport η ⊆ Metric.closedBall 0 R) {c : ℝ} (hc : 0 < c) {x : V} (hx : x ∈ tsupport (dilate c η)) : ‖x‖ ≤ R / c := by @@ -171,7 +172,8 @@ theorem norm_le_of_mem_tsupport_dilate {η : V → ℂ} {R : ℝ} omit [FiniteDimensional ℝ V] [MeasurableSpace V] [BorelSpace V] in open scoped Pointwise in /-- **Dilated supports plus a set lie in a thickening**: if the closed support of `η` lies in -`B̄(0, R)` and `δ > 0`, then `supp η_{2^n} + S` lies in the `δ`-neighbourhood of `S` for all large +`closedBall(0, R)` and `δ > 0`, then `supp η_{2^n} + S` lies in the `δ`-neighbourhood of `S` for +all large `n`: once `R / 2^n < δ`, `supp η_{2^n} ⊆ B(0, δ)` (`Rd.norm_le_of_mem_tsupport_dilate`), and `B(0, δ) + S` is the `δ`-neighbourhood of `S` (Mathlib's `ball_add_zero`). -/ theorem eventually_tsupport_dilate_add_subset_thickening {η : V → ℂ} {R δ : ℝ} @@ -425,7 +427,7 @@ theorem tendsto_apply_apply_of_tendsto {ι E F : Type*} [SeminormedAddCommGroup /-! ### Approximate identities at points of continuity -/ /-- **Approximate identities at points of continuity**: if `Φ` is integrable with `∫ Φ = 1` and -vanishes outside `B̄(0, R)`, and `F_J(z) → z₀` as `J → ∞` and `z → y`, then +vanishes outside `closedBall(0, R)`, and `F_J(z) → z₀` as `J → ∞` and `z → y`, then `(Φ_{2^J} ⋆ F_J)(z) → z₀` as `J → ∞` and `z → y`: for every `ε > 0` there are `J₀` and `δ > 0` with `|(Φ_{2^J} ⋆ F_J)(z) - z₀| < ε` for `J ≥ J₀` and `‖z - y‖ < δ`. Since `∫ Φ_{2^J} = 1`, `(Φ_{2^J} ⋆ F_J)(z) - z₀ = ∫ Φ_{2^J}(w) (F_J(z - w) - z₀) dw`, and only `‖w‖ ≤ R 2^(-J)` enters. -/ diff --git a/LeanPool/FunctionSpaces/Analysis/Fourier/Convolution.lean b/LeanPool/FunctionSpaces/Analysis/Fourier/Convolution.lean index 386d46ba37..ad257ab2f7 100644 --- a/LeanPool/FunctionSpaces/Analysis/Fourier/Convolution.lean +++ b/LeanPool/FunctionSpaces/Analysis/Fourier/Convolution.lean @@ -32,8 +32,8 @@ their kernels, `K ⋆ (L ⋆ f) = (K ⋆ L) ⋆ f` (`Rd.convLp_convLp`, from the `Rd.conv_conv_ae`), and are linear in the kernel (`Rd.convLp_sub_kernel`). **Pointwise -bounds**: if `|K| ≤ A` and `K = 0` outside `B̄(0, ρ)`, Hölder's inequality on balls gives -`|(K ⋆ g)(x)| ≤ A |B̄(0,ρ)|^(1-1/p) ‖g‖_p` (`Rd.lintegral_closedBall_le`, +bounds**: if `|K| ≤ A` and `K = 0` outside `closedBall(0, ρ)`, Hölder's inequality on balls gives +`|(K ⋆ g)(x)| ≤ A |closedBall(0,ρ)|^(1-1/p) ‖g‖_p` (`Rd.lintegral_closedBall_le`, `Rd.enorm_conv_le_of_bound`). -/ @@ -397,7 +397,8 @@ theorem one_sub_one_div_toReal_nonneg {p : ℝ≥0∞} (hp1 : 1 ≤ p) : 0 ≤ 1 rw [sub_nonneg, div_le_one (by linarith)] exact this -/-- **Hölder's inequality on a ball**: `∫_{B̄(x,ρ)} |g| ≤ |B̄(x,ρ)|^(1-1/p) ‖g‖_p`. -/ +/-- **Hölder's inequality on a ball**: `∫_{closedBall(x,ρ)} |g| ≤ |closedBall(x,ρ)|^(1-1/p) +‖g‖_p`. -/ theorem lintegral_closedBall_le {p : ℝ≥0∞} (hp1 : 1 ≤ p) {g : V → ℂ} (hg : AEStronglyMeasurable g volume) (x : V) (ρ : ℝ) : ∫⁻ z in closedBall x ρ, ‖g z‖ₑ ≤ @@ -410,8 +411,8 @@ theorem lintegral_closedBall_le {p : ℝ≥0∞} (hp1 : 1 ≤ p) {g : V → ℂ} rw [mul_comm] exact mul_le_mul' le_rfl (eLpNorm_mono_measure _ Measure.restrict_le_self) -/-- `∫ |K(y)| |g(x - y)| dy ≤ A |B̄(0,ρ)|^(1-1/p) ‖g‖_p` if `|K| ≤ A` and `K = 0` outside -`B̄(0, ρ)`. -/ +/-- `∫ |K(y)| |g(x - y)| dy ≤ A |closedBall(0,ρ)|^(1-1/p) ‖g‖_p` if `|K| ≤ A` and `K = 0` outside +`closedBall(0, ρ)`. -/ theorem lintegral_kernel_mul_le {p : ℝ≥0∞} (hp1 : 1 ≤ p) {K g : V → ℂ} (hg : AEStronglyMeasurable g volume) {A : ℝ≥0∞} (hK : ∀ y, ‖K y‖ₑ ≤ A) {ρ : ℝ} (hKρ : ∀ y, ρ < ‖y‖ → K y = 0) (x : V) : @@ -436,8 +437,9 @@ theorem lintegral_kernel_mul_le {p : ℝ≥0∞} (hp1 : 1 ≤ p) {K g : V → mul_le_mul' le_rfl (lintegral_closedBall_le hp1 hg x ρ) _ = _ := by rw [Measure.addHaar_closedBall_center, mul_assoc] -/-- **Pointwise bound of a convolution**: if `|K| ≤ A` and `K = 0` outside `B̄(0, ρ)`, then -`|(K ⋆ g)(x)| ≤ A |B̄(0,ρ)|^(1-1/p) ‖g‖_p`, by Hölder's inequality on the ball `B̄(x, ρ)`. -/ +/-- **Pointwise bound of a convolution**: if `|K| ≤ A` and `K = 0` outside `closedBall(0, ρ)`, then +`|(K ⋆ g)(x)| ≤ A |closedBall(0,ρ)|^(1-1/p) ‖g‖_p`, by Hölder's inequality on the ball +`closedBall(x, ρ)`. -/ theorem enorm_conv_le_of_bound {p : ℝ≥0∞} (hp1 : 1 ≤ p) {K g : V → ℂ} (hg : AEStronglyMeasurable g volume) {A : ℝ≥0∞} (hK : ∀ y, ‖K y‖ₑ ≤ A) {ρ : ℝ} (hKρ : ∀ y, ρ < ‖y‖ → K y = 0) (x : V) : diff --git a/LeanPool/FunctionSpaces/Analysis/Maximal/FeffermanStein.lean b/LeanPool/FunctionSpaces/Analysis/Maximal/FeffermanStein.lean index fcef4ce816..8dcef37329 100644 --- a/LeanPool/FunctionSpaces/Analysis/Maximal/FeffermanStein.lean +++ b/LeanPool/FunctionSpaces/Analysis/Maximal/FeffermanStein.lean @@ -52,7 +52,8 @@ variable {V : Type*} [NormedAddCommGroup V] [InnerProductSpace ℝ V] [FiniteDim /-! ### The maximal function off enlarged sets -/ -/-- The integral of `g` over the part of `Q ⊆ B̄(c, ρ)` in `B(x, r)`, for `x ∉ B̄(c, 2ρ)`, is at +/-- The integral of `g` over the part of `Q ⊆ closedBall(c, ρ)` in `B(x, r)`, for `x ∉ +closedBall(c, 2ρ)`, is at most `(⨍_Q g) |Q ∩ B(x, 3r)|`: either the two sets are disjoint, or `Q ⊆ B(x, 3r)`. -/ theorem setLIntegral_inter_ball_le {Q : Set V} {c x : V} {ρ r : ℝ} (hQ : Q ⊆ closedBall c ρ) (h0 : volume Q ≠ 0) (htop : volume Q ≠ ∞) (g : V → ℝ≥0∞) (hx : x ∉ closedBall c (2 * ρ)) : @@ -64,11 +65,14 @@ theorem setLIntegral_inter_ball_le {Q : Set V} {c x : V} {ρ r : ℝ} (hQ : Q ENNReal.div_mul_cancel h0 htop] exact lintegral_mono_set Set.inter_subset_left -/-- **The maximal function off enlarged sets**: let `Q_i ⊆ B̄(c_i, ρ_i)` be countably many -measurable sets of positive finite measure and `x` a point outside every `B̄(c_i, 2ρ_i)`. Then -`M(1_{⋃ Q_i} g)(x) ≤ 3^n M g̃(x)` for every `g : V → [0, ∞]`, where `g̃ = ∑_i (⨍_{Q_i} g) 1_{Q_i}` +/-- **The maximal function off enlarged sets**: let `Q_i ⊆ closedBall(c_i, ρ_i)` be countably many +measurable sets of positive finite measure and `x` a point outside every `closedBall(c_i, +2ρ_i)`. Then +`M(1_{⋃ Q_i} g)(x) ≤ 3^n M gTilde(x)` for every `g : V → [0, ∞]`, where `gTilde = ∑_i (⨍_{Q_i} +g) 1_{Q_i}` replaces `g` on each `Q_i` by its mean. A ball `B(x, r)` that meets `Q_i` has radius `r > ρ_i` -and `Q_i ⊆ B(x, 3r)`, so `∫_{B(x,r)} 1_{⋃ Q_i} g ≤ ∫_{B(x,3r)} g̃`. The bound holds for arbitrary, +and `Q_i ⊆ B(x, 3r)`, so `∫_{B(x,r)} 1_{⋃ Q_i} g ≤ ∫_{B(x,3r)} gTilde`. The bound holds for +arbitrary, possibly overlapping sets `Q_i` and every `g`. -/ theorem maximal_indicator_iUnion_le {ι : Type*} [Countable ι] (Q : ι → Set V) (c : ι → V) (ρ : ι → ℝ) (hQ : ∀ i, Q i ⊆ closedBall (c i) (ρ i)) (hm : ∀ i, MeasurableSet (Q i)) @@ -171,7 +175,7 @@ theorem czAverage_self_le (x : V) : czAverage G t G x ≤ 2 ^ finrank ℝ V * t /-- **Positivity of the maximal function off `Ω*`**: for `x` outside the enlarged exceptional set, `M(1_Ω h)(x) ≤ 3^n M(czAverage h)(x)` for every `h : V → [0, ∞]`, since every maximal big -cube `Q_{k,m}` lies in `B̄(c_{k,m}, n 2^(-k))` and `Ω*` contains the balls of twice this +cube `Q_{k,m}` lies in `closedBall(c_{k,m}, n 2^(-k))` and `Ω*` contains the balls of twice this radius. -/ theorem maximal_indicator_czSet_le (h : V → ℝ≥0∞) {x : V} (hx : x ∉ czEnlarged G t) : maximal ((czSet G t).indicator h) x ≤ 3 ^ finrank ℝ V * maximal (czAverage G t h) x := by diff --git a/LeanPool/FunctionSpaces/Analysis/Maximal/HardyLittlewoodMaximal.lean b/LeanPool/FunctionSpaces/Analysis/Maximal/HardyLittlewoodMaximal.lean index 650675cb96..69ab818c3f 100644 --- a/LeanPool/FunctionSpaces/Analysis/Maximal/HardyLittlewoodMaximal.lean +++ b/LeanPool/FunctionSpaces/Analysis/Maximal/HardyLittlewoodMaximal.lean @@ -39,7 +39,7 @@ with the explicit constant `C_{n,p} = p 2^p 5^n / (p - 1)` (`Rd.maximalConst`). Two geometric facts serve the covering arguments: the balls of radius `ρ 2^(-j)` have the volume `ρ^n |B_1| 2^(-jn)` (`Rd.volume_ball_div_two_pow`, `Rd.volume_closedBall_div_two_pow`), and a set -in `B̄(c, ρ)` that meets `B(x, r)` for some `x ∉ B̄(c, 2ρ)` lies in `B(x, 3r)` +in `closedBall(c, ρ)` that meets `B(x, r)` for some `x ∉ closedBall(c, 2ρ)` lies in `B(x, 3r)` (`Metric.subset_ball_three_mul_of_inter_nonempty`). -/ @@ -50,7 +50,8 @@ open scoped ENNReal Topology namespace Metric -/-- If a set `Q ⊆ B̄(c, ρ)` meets the ball `B(x, r)` around a point `x ∉ B̄(c, 2ρ)`, then +/-- If a set `Q ⊆ closedBall(c, ρ)` meets the ball `B(x, r)` around a point `x ∉ closedBall(c, +2ρ)`, then `Q ⊆ B(x, 3r)`: a point of `Q` in the ball forces `r > ρ`, so every point of `Q` lies within `r + 2ρ < 3r` of `x`. -/ theorem subset_ball_three_mul_of_inter_nonempty {α : Type*} [PseudoMetricSpace α] {Q : Set α} @@ -302,7 +303,7 @@ theorem iUnion_dyadicShell {ρ : ℝ} (hρ : 0 < ρ) : ⋃ i, dyadicShell (V := exact ⟨i, (div_lt_iff₀ hρ).1 hi2, Or.inr ((le_div_iff₀ hρ).1 hi1)⟩ omit [InnerProductSpace ℝ V] [FiniteDimensional ℝ V] [MeasurableSpace V] [BorelSpace V] in -/-- A kernel with the bound `A` on `B̄(0,ρ)` and the bound `A (ρ/‖y‖)^N` outside is at most +/-- A kernel with the bound `A` on `closedBall(0,ρ)` and the bound `A (ρ/‖y‖)^N` outside is at most `A 2^(-iN)` on the shell `i`. -/ theorem kernel_le_of_mem_dyadicShell {K : V → ℝ≥0∞} {A : ℝ≥0∞} {ρ : ℝ} {N : ℕ} (hρ : 0 < ρ) (hK₁ : ∀ y, ‖y‖ ≤ ρ → K y ≤ A) @@ -352,7 +353,8 @@ theorem tsum_two_inv_pow_mul_two_pow {n N : ℕ} (hN : n ≤ N) : simp_rw [hterm] rw [ENNReal.tsum_mul_left, ENNReal.tsum_geometric] -/-- **Kernels with a power tail.** If `K ≤ A` on `B̄(0,ρ)` and `K(y) ≤ A (ρ/‖y‖)^N` outside, with +/-- **Kernels with a power tail.** If `K ≤ A` on `closedBall(0,ρ)` and `K(y) ≤ A (ρ/‖y‖)^N` +outside, with `N > n`, then `∫ K(y) g(x - y) dy ≤ A |B(0,ρ)| 2^n (1 - 2^(-(N-n)))⁻¹ M g(x)` for every `g : V → [0, ∞]`. The proof covers `V` by the ball `B(0,2ρ)` and the dyadic shells `2^i ρ ≤ ‖y‖ < 2^(i+1) ρ`, `i ≥ 1`, applies the ball bound on each, and sums a geometric @@ -451,7 +453,8 @@ theorem lintegral_mul_le_maximal_of_one_add_norm {K : V → ℝ≥0∞} {A : ℝ /-! ### The weighted weak type `(1,1)` -/ -/-- For `y ∈ B(b,r)`: `∫_{B̄(b,4r)} w ≤ 5^n |B(0,r)| M w(y)`, since `B̄(b,4r) ⊆ B(y,5r)` and +/-- For `y ∈ B(b,r)`: `∫_{closedBall(b,4r)} w ≤ 5^n |B(0,r)| M w(y)`, since `closedBall(b,4r) ⊆ +B(y,5r)` and `|B(0,5r)| = 5^n |B(0,r)|`. -/ theorem setLIntegral_closedBall_le_maximal {r : ℝ} (hr : 0 < r) (w : V → ℝ≥0∞) {b y : V} (hy : y ∈ ball b r) : @@ -471,7 +474,8 @@ theorem setLIntegral_closedBall_le_maximal {r : ℝ} (hr : 0 < r) (w : V → ℝ ENNReal.ofReal_pow (by norm_num), ENNReal.ofReal_ofNat] /-- **One ball of the Vitali cover.** If `t |B(0,r)| ≤ ∫_{B(b,r)} g`, then -`t ∫_{B̄(b,4r)} w ≤ 5^n ∫_{B(b,r)} g M w`: the mass of `w` on the enlarged ball is spread over +`t ∫_{closedBall(b,4r)} w ≤ 5^n ∫_{B(b,r)} g M w`: the mass of `w` on the enlarged ball is +spread over `B(b,r)` with the weight `g`, at the price of `M w`. -/ theorem mul_setLIntegral_closedBall_le {r : ℝ} (hr : 0 < r) {g : V → ℝ≥0∞} (w : V → ℝ≥0∞) {b : V} {t : ℝ≥0∞} (hI : t * volume (ball (0 : V) r) ≤ ∫⁻ y in ball b r, g y) : @@ -512,7 +516,7 @@ theorem setOf_lt_maximal_subset (g : V → ℝ≥0∞) (t : ℝ≥0∞) : /-- **Vitali step.** `t ∫_{E_R} w ≤ 5^n ∫ g M w` for the set `E_R = bigBallSet g t R`: Vitali's covering lemma selects countably many disjoint balls `B(b, r_b)` from the balls that define -`E_R` such that the balls `B̄(b, 4 r_b)` cover `E_R`, and each of them is estimated by +`E_R` such that the balls `closedBall(b, 4 r_b)` cover `E_R`, and each of them is estimated by `Rd.mul_setLIntegral_closedBall_le`. -/ theorem mul_setLIntegral_bigBallSet_le (g w : V → ℝ≥0∞) (t : ℝ≥0∞) (R : ℝ) : t * ∫⁻ x in bigBallSet g t R, w x ≤ 5 ^ finrank ℝ V * ∫⁻ x, g x * maximal w x := by diff --git a/LeanPool/FunctionSpaces/ApproximationSpaces/Decompositions/Atomic.lean b/LeanPool/FunctionSpaces/ApproximationSpaces/Decompositions/Atomic.lean index 5197d4093b..01f8f91103 100644 --- a/LeanPool/FunctionSpaces/ApproximationSpaces/Decompositions/Atomic.lean +++ b/LeanPool/FunctionSpaces/ApproximationSpaces/Decompositions/Atomic.lean @@ -59,7 +59,7 @@ variable {X : Type*} [NormedAddCommGroup X] [NormedSpace ℝ X] /-- The quasi-norm of the **sequence space** `b^s_{p,q}`: `‖(2^(j(s - δ)) ‖λ_{j,·}‖_{ℓ_p})_j‖_{ℓ_q}` for coefficients `λ_{j,m}`, `m ∈ M j`. -/ -noncomputable def bNorm (M : ℕ → Type*) [∀ j, Fintype (M j)] [∀ j, MeasurableSpace (M j)] +noncomputable def bNorm (M : ℕ → Type*) [∀ j, MeasurableSpace (M j)] (s δ : ℝ) (p q : ℝ≥0∞) (c : ∀ j, M j → ℝ) : ℝ≥0∞ := lqNorm q (fun j => dyadicWeight (s - δ) j * lqNorm p (fun m => ‖c j m‖ₑ)) diff --git a/LeanPool/FunctionSpaces/ApproximationSpaces/Instances/NTermHilbertBasis.lean b/LeanPool/FunctionSpaces/ApproximationSpaces/Instances/NTermHilbertBasis.lean index 8299bccebd..73de2a1630 100644 --- a/LeanPool/FunctionSpaces/ApproximationSpaces/Instances/NTermHilbertBasis.lean +++ b/LeanPool/FunctionSpaces/ApproximationSpaces/Instances/NTermHilbertBasis.lean @@ -33,12 +33,12 @@ With the decreasing rearrangement `γ*_k` of the coefficients (`TauCeti.decreasi For `0 < τ ≤ 2` and `θ = 1/τ - 1/2` this gives the tail bound with constant `1` `E_n(f) ≤ (n + 1)^(-θ) ‖(γ_i(f))_i‖_{ℓ_τ}` for every `n ≥ 0` -(`HilbertBasis.approxError_nTerm_le`; Dũng–Temlyakov–Ullrich, *Hyperbolic Cross Approximation*, +(`HilbertBasis.approxError_nTerm_le`; Dung–Temlyakov–Ullrich, *Hyperbolic Cross Approximation*, Lemma 7.8 in the numbering of arXiv:1601.03978v3), and, for `τ < 2`, through the dyadic blocks `2^m (γ*_{2^(m+1)})² ≤ E_{2^m}(f)² ≤ 2 ∑_{l ≥ m} 2^l (γ*_{2^l})²`, the theorem of Stechkin and DeVore: -`f ∈ A^θ_τ(nTerm) ⟺ ∑_i |⟨e_i, f⟩|^τ < ∞` (`HilbertBasis.memApprox_nTerm_iff`), +`f ∈ A^θ_τ(nTerm) ↔ ∑_i |⟨e_i, f⟩|^τ < ∞` (`HilbertBasis.memApprox_nTerm_iff`), with the two-sided bound `∑_i γ_i(f)^τ ≤ 4 ‖f‖^τ_{A^θ_τ}` and `‖f‖_{A^θ_τ} ≤ C_τ ‖(γ_i(f))_i‖_{ℓ_τ}` for the dyadic quasi-norm @@ -257,7 +257,7 @@ private theorem approxError_nTerm_sq_le_mul {τ : ℝ} (hτ0 : 0 < τ) (hτ2 : `E_n(f) ≤ (n + 1)^(-θ) (∑_i |⟨e_i, f⟩|^τ)^(1/τ)`. Since `θ ≥ 0`, it gives `E_n(f) ≤ n^(-θ) (∑_i |⟨e_i, f⟩|^τ)^(1/τ)` for `n ≥ 1`, and `‖f‖ ≤ (∑_i |⟨e_i, f⟩|^τ)^(1/τ)` at `n = 0`. The error `E_n(f)` is the tail of the coefficients from the `(n + 1)`-th largest one -on, so this is Dũng–Temlyakov–Ullrich, *Hyperbolic Cross Approximation*, Lemma 7.8 (numbering of +on, so this is Dung–Temlyakov–Ullrich, *Hyperbolic Cross Approximation*, Lemma 7.8 (numbering of arXiv:1601.03978v3), with `m = n + 1`. With `S = ∑_i γ_i^τ`, the weak-type bound `(n + 1) (γ*_n)^τ ≤ S` turns `E_n(f)² ≤ S (γ*_n)^(2-τ)` into `E_n(f)² ≤ (n + 1)^(-2θ) S^(2/τ)`. -/ diff --git a/LeanPool/FunctionSpaces/ApproximationSpaces/Interpolation/Reiteration.lean b/LeanPool/FunctionSpaces/ApproximationSpaces/Interpolation/Reiteration.lean index 5bd5aef139..3bbd108509 100644 --- a/LeanPool/FunctionSpaces/ApproximationSpaces/Interpolation/Reiteration.lean +++ b/LeanPool/FunctionSpaces/ApproximationSpaces/Interpolation/Reiteration.lean @@ -35,8 +35,8 @@ The inclusion `⊆` is the class `C_K` (Bergh–Löfström, Definition 3.5.1): **Holmstedt's formula** (Holmstedt 1970; Bergh–Löfström, Theorem 3.6.1) in discrete form, with `ℓ₁` sums in place of the `ℓ_{q_i}` norms of Theorem 3.6.1, which is enough for the reiteration theorem: with `S₀(m) = ∑_{n < m} 2^(-nθ₀) K(2^n, u)` and `S₁(m) = ∑_{n ≥ m} 2^(-nθ₁) K(2^n, u)` -(`InterpCouple.kSumBelow`, `InterpCouple.kSumAbove`), the K-functional `K̄` of the couple of -K-spaces satisfies `K̄(2^(m(θ₁-θ₀)), u) ≤ c (S₀(m) + 2^(m(θ₁-θ₀)) S₁(m))` +(`InterpCouple.kSumBelow`, `InterpCouple.kSumAbove`), the K-functional `KBar` of the couple of +K-spaces satisfies `KBar(2^(m(θ₁-θ₀)), u) ≤ c (S₀(m) + 2^(m(θ₁-θ₀)) S₁(m))` (`InterpCouple.kFunctional_kCouple_le`; the endpoint versions are `InterpCouple.kFunctional_leftKCouple_le` and `InterpCouple.kFunctional_rightKCouple_le`). The proof bounds the two discrete K-norms of `u - b` and `b` for every `b` by geometric sums and @@ -400,7 +400,7 @@ theorem two_rpow_mul_kFunctional_le_kSumAbove (u : U) (m : ℤ) : Theorem 3.6.1, in discrete form, with `ℓ₁` sums in place of the `ℓ_{q_i}` norms of Theorem 3.6.1, which is enough for the reiteration theorem): for a couple quasi-normed with constant `C`, `q₀, q₁ ≥ 1`, `0 < θ₀, θ₁ < 1`, `m ∈ ℤ` and `s = 2^(m(θ₁-θ₀))`, the K-functional -of the couple of K-spaces satisfies `K̄(s, u) ≤ holmstedtConst C θ₀ θ₁ · (S₀(m) + s S₁(m))`, +of the couple of K-spaces satisfies `KBar(s, u) ≤ holmstedtConst C θ₀ θ₁ · (S₀(m) + s S₁(m))`, with `S₀(m) = ∑_{n < m} 2^(-nθ₀) K(2^n, u)` and `S₁(m) = ∑_{n ≥ m} 2^(-nθ₁) K(2^n, u)`. -/ theorem kFunctional_kCouple_le (hA : A.IsQuasiNormed C) (hq₀ : 1 ≤ q₀) (hq₁ : 1 ≤ q₁) (hθ₀ : 0 < θ₀) (hθ₀' : θ₀ < 1) (hθ₁ : 0 < θ₁) (hθ₁' : θ₁ < 1) (m : ℤ) (u : U) : @@ -463,7 +463,7 @@ theorem endpointHolmstedtConst_ne_top (hC : C ≠ ∞) (hθ₁ : 0 < θ₁) (hθ `ℓ₁` sum in place of the `ℓ_{q₁}` norm of Bergh–Löfström, Theorem 3.6.1, which is enough for the reiteration theorem): for a couple quasi-normed with constant `C`, `q₁ ≥ 1`, `0 < θ₁ < 1`, `m ∈ ℤ` and `s = 2^(mθ₁)`, the K-functional of `(N₀, ‖·‖_{θ₁,q₁})` satisfies -`K̄(s, u) ≤ endpointHolmstedtConst C θ₁ · s S₁(m)`, with +`KBar(s, u) ≤ endpointHolmstedtConst C θ₁ · s S₁(m)`, with `S₁(m) = ∑_{n ≥ m} 2^(-nθ₁) K(2^n, u)`. -/ theorem kFunctional_leftKCouple_le (hA : A.IsQuasiNormed C) (hq₁ : 1 ≤ q₁) (hθ₁ : 0 < θ₁) (hθ₁' : θ₁ < 1) (m : ℤ) (u : U) : @@ -515,7 +515,7 @@ theorem kSumAbove_swap (u : U) (m : ℤ) : /-- **Holmstedt's formula for the right endpoint couple**, the upper bound in `ℓ₁` form: for a couple quasi-normed with constant `C`, `q₀ ≥ 1`, `0 < θ₀ < 1` and `m ∈ ℤ`, the K-functional of `(‖·‖_{θ₀,q₀}, N₁)` satisfies -`K̄(2^(m(1-θ₀)), u) ≤ endpointHolmstedtConst C (1 - θ₀) · ∑_{n ≤ m} 2^(-nθ₀) K(2^n, u)`, the sum +`KBar(2^(m(1-θ₀)), u) ≤ endpointHolmstedtConst C (1 - θ₀) · ∑_{n ≤ m} 2^(-nθ₀) K(2^n, u)`, the sum being `S₀(m + 1)`. It is `kFunctional_leftKCouple_le` for the swapped couple (`rightKCouple_eq_swap`, `kFunctional_swap`). -/ theorem kFunctional_rightKCouple_le (hA : A.IsQuasiNormed C) (hq₀ : 1 ≤ q₀) (hθ₀ : 0 < θ₀) diff --git a/LeanPool/FunctionSpaces/ApproximationSpaces/Sequences/Lq.lean b/LeanPool/FunctionSpaces/ApproximationSpaces/Sequences/Lq.lean index ade171a2bc..89ebb1ac4f 100644 --- a/LeanPool/FunctionSpaces/ApproximationSpaces/Sequences/Lq.lean +++ b/LeanPool/FunctionSpaces/ApproximationSpaces/Sequences/Lq.lean @@ -456,8 +456,8 @@ end Generic /-- Restricting every member of a family to a set `S` restricts its pointwise `ℓ_q` norm: `‖(1_S g_i(x))_i‖_{ℓ_q} = 1_S(x) ‖(g_i(x))_i‖_{ℓ_q}`. -/ -theorem lqNorm_indicator {α ι : Type*} [MeasurableSpace ι] [Countable ι] - [MeasurableSingletonClass ι] (q : ℝ≥0∞) (S : Set α) (g : ι → α → ℝ≥0∞) (x : α) : +theorem lqNorm_indicator {α ι : Type*} [MeasurableSpace ι] (q : ℝ≥0∞) + (S : Set α) (g : ι → α → ℝ≥0∞) (x : α) : lqNorm q (fun i => S.indicator (g i) x) = S.indicator (fun y => lqNorm q (fun i => g i y)) x := by by_cases hx : x ∈ S diff --git a/LeanPool/FunctionSpaces/Domains/Extension/HigherDivergenceKernels.lean b/LeanPool/FunctionSpaces/Domains/Extension/HigherDivergenceKernels.lean index 2d6b713633..3646b9abbf 100644 --- a/LeanPool/FunctionSpaces/Domains/Extension/HigherDivergenceKernels.lean +++ b/LeanPool/FunctionSpaces/Domains/Extension/HigherDivergenceKernels.lean @@ -49,7 +49,8 @@ the orthonormal basis `(e_i)` of `Rd.gridBasis` and the dilations `G_c(x) = c^n divergence kernels of the bump (`Rd.LocalMeansBump.higherKernel`, `Rd.LocalMeansBump.kernel_succ_eq_sum_higherKernel`). For `m < L` their dyadic dilates form Calderón–Zygmund families (`Rd.LocalMeansBump.isCZFamily_higherKernel`); they have compact - support (`Rd.LocalMeansBump.hasCompactSupport_higherKernel`), for `L ≥ 1` in `B̄(0, L R)`, and + support (`Rd.LocalMeansBump.hasCompactSupport_higherKernel`), for `L ≥ 1` in `closedBall(0, L + R)`, and in the reflected closed cone for bumps supported in `-K` (`Rd.LipschitzGraph.tsupport_dilate_higherKernel_subset`). -/ @@ -130,7 +131,7 @@ theorem hasCompactSupport_weightedDilation [ProperSpace V] {a b : ℝ} (hab : a /-- The integrand `(x, s) ↦ w(s) G_{e^s}(x)` is integrable on `V × (a, b]` if `w` and `G` are continuous and `G` vanishes outside a ball: it is continuous and vanishes outside the compact set -`B̄(0, R e^{-a}) × [a, b]`. -/ +`closedBall(0, R e^{-a}) × [a, b]`. -/ theorem integrable_weight_mul_dilate_exp {a b : ℝ} {w : ℝ → ℂ} (hw : Continuous w) {G : V → ℂ} (hG : Continuous G) {R : ℝ} (hR : ∀ z, R < ‖z‖ → G z = 0) : Integrable (Function.uncurry fun (x : V) (s : ℝ) => w s * dilate (Real.exp s) G x) @@ -984,7 +985,7 @@ variable (Ω : LipschitzGraph V) /-- **The higher divergence kernels of a cone-supported bump lie in the reflected closed cone**: for a bump of radius `R` supported in `-K` and `L ≥ 1`, every dilate `(K_i)_{2^j}` of its higher -divergence kernels is supported in `{y : -y ∈ K̄, ‖y‖ ≤ L R}` +divergence kernels is supported in `{y : -y ∈ KBar, ‖y‖ ≤ L R}` (`Rd.LipschitzGraph.coneSupported_higherDivKernel`). -/ theorem tsupport_dilate_higherKernel_subset {b : LocalMeansBump V} (hb : Ω.ConeSupported b.toFun) {L m : ℕ} (hL : 1 ≤ L) (i : Fin m → Fin (finrank ℝ V)) (j : ℕ) : diff --git a/LeanPool/FunctionSpaces/Domains/Extension/HigherSobolevExtension.lean b/LeanPool/FunctionSpaces/Domains/Extension/HigherSobolevExtension.lean index 74e6630a65..db17ee5e17 100644 --- a/LeanPool/FunctionSpaces/Domains/Extension/HigherSobolevExtension.lean +++ b/LeanPool/FunctionSpaces/Domains/Extension/HigherSobolevExtension.lean @@ -617,7 +617,7 @@ dimension `n ≥ 1`, `1 < p < ∞` and `m ∈ ℕ` there is a finite constant `C with weak derivatives `g_{k,w} = ∂^{e_w} f ∈ L_p(Ω)` along all words `w` of length `k ≤ m` agrees on `Ω` with some `F ∈ W^m_p(V)` whose weak derivatives `G_{k,w} = ∂^{e_w} F` satisfy `∑_{k ≤ m} ∑_w ‖G_{k,w}‖_p ≤ C ∑_{k ≤ m} ∑_w ‖g_{k,w}‖_{L_p(Ω)}`. The patches -`Rd.BoundedLipschitzDomain.patch` cover `Ω̄` +`Rd.BoundedLipschitzDomain.patch` cover `ΩBar` (`Rd.BoundedLipschitzDomain.exists_extendsSobolevOrder_boundary`, `Rd.BoundedLipschitzDomain.exists_extendsSobolevOrder_interior`), pasted by `Rd.extendsSobolevOrder_of_cover` (`Rd.BoundedLipschitzDomain.exists_of_patches`); for `m = 0`, diff --git a/LeanPool/FunctionSpaces/Domains/Extension/LocalExtension.lean b/LeanPool/FunctionSpaces/Domains/Extension/LocalExtension.lean index caa4e79061..f6c831e85b 100644 --- a/LeanPool/FunctionSpaces/Domains/Extension/LocalExtension.lean +++ b/LeanPool/FunctionSpaces/Domains/Extension/LocalExtension.lean @@ -41,7 +41,7 @@ Two kinds of patches satisfy the conditions: these sets lie in `O` (`Rd.setOf_lt_infDist_compl_subset`), and so does `x - y` for `δ < infDist(x, Oᶜ)` and `‖y‖ ≤ δ` (`Rd.sub_mem_of_lt_infDist_of_norm_le`). -Short steps `-y ∈ K̄`, `‖y‖ ≤ ε`, take `Ω ∩ B(c, ρ - ε)` into `Ω ∩ B(c, ρ)` +Short steps `-y ∈ KBar`, `‖y‖ ≤ ε`, take `Ω ∩ B(c, ρ - ε)` into `Ω ∩ B(c, ρ)` (`Rd.LipschitzGraph.sub_mem_patch_of_mem_closedCone`); this gives the support conditions of all cone-supported kernels of small support. @@ -137,7 +137,7 @@ theorem exists_coneBump_radius_le {a ε : ℝ} (ha : 0 ≤ a) (hε : 0 < ε) : omit [FiniteDimensional ℝ V] [MeasurableSpace V] [BorelSpace V] in /-- **Short steps into the reflected closed cone stay in a patch**: if `x ∈ Ω ∩ B(c, ρ - ε)`, -`-y ∈ K̄` and `‖y‖ ≤ ε`, then `x - y ∈ Ω ∩ B(c, ρ)` (`Rd.LipschitzGraph.add_mem_of_mem_closedCone` +`-y ∈ KBar` and `‖y‖ ≤ ε`, then `x - y ∈ Ω ∩ B(c, ρ)` (`Rd.LipschitzGraph.add_mem_of_mem_closedCone` and the triangle inequality). -/ theorem sub_mem_patch_of_mem_closedCone {ε ρ : ℝ} {c x y : V} (hx : x ∈ Ω.domain ∩ ball c (ρ - ε)) (hy : -y ∈ Ω.closedCone) (hyR : ‖y‖ ≤ ε) : diff --git a/LeanPool/FunctionSpaces/Domains/Extension/ReflectionExtension.lean b/LeanPool/FunctionSpaces/Domains/Extension/ReflectionExtension.lean index 8cd6b7a50f..c31bcac74c 100644 --- a/LeanPool/FunctionSpaces/Domains/Extension/ReflectionExtension.lean +++ b/LeanPool/FunctionSpaces/Domains/Extension/ReflectionExtension.lean @@ -640,7 +640,8 @@ theorem exists_hasWeakLineDeriv_reflectionExtension_mul (j : Fin Ω.N) (hp : 1 omit [FiniteDimensional ℝ V] [MeasurableSpace V] [BorelSpace V] in /-- **The extension by reflection of a cutoff agrees with the function near the patch**: if -`χ = 1` near `B̄(c_j, ρ_j - 2ε)` with `ε ≥ 0`, then the extension by reflection of `χ f` in the +`χ = 1` near `closedBall(c_j, ρ_j - 2ε)` with `ε ≥ 0`, then the extension by reflection of `χ f` +in the graph domain `Ω_j` is `f` on `Ω ∩ B(c_j, ρ_j - 2ε)`, a subset of `Ω_j` (`Rd.BoundedLipschitzDomain.inter_ball_eq`, `Rd.LipschitzGraph.reflectionExtension_of_mem`). -/ theorem reflectionExtension_mul_eq_of_mem (j : Fin Ω.N) {ε : ℝ} (hε : 0 ≤ ε) {χ : V → ℝ} diff --git a/LeanPool/FunctionSpaces/Domains/Extension/ReflectionExtensionOperator.lean b/LeanPool/FunctionSpaces/Domains/Extension/ReflectionExtensionOperator.lean index 7790ed9c2f..3f4b6dcd80 100644 --- a/LeanPool/FunctionSpaces/Domains/Extension/ReflectionExtensionOperator.lean +++ b/LeanPool/FunctionSpaces/Domains/Extension/ReflectionExtensionOperator.lean @@ -212,7 +212,8 @@ variable (Ω : BoundedLipschitzDomain V) /-- **The boundary patches by reflection are linear**: for `1 ≤ p ≤ ∞`, `ε ≥ 0` and a smooth `χ` with values in `[0, 1]`, closed support in `B(c_j, ρ_j)`, `|∂_{e_i} χ| ≤ d_i` and `χ = 1` near -`B̄(c_j, ρ_j - 2ε)`, the map `f ↦ E_j(χ f)` (the extension by reflection in the graph domain `Ω_j`) +`closedBall(c_j, ρ_j - 2ε)`, the map `f ↦ E_j(χ f)` (the extension by reflection in the graph +domain `Ω_j`) is a linear extension of Sobolev functions on `Ω` from `Ω ∩ B(c_j, ρ_j - 2ε)` with the constant `Rd.reflectionConst` (`Rd.BoundedLipschitzDomain.exists_hasWeakLineDeriv_reflectionExtension_mul`, `Rd.BoundedLipschitzDomain.reflectionExtension_mul_eq_of_mem`). -/ diff --git a/LeanPool/FunctionSpaces/Domains/Extension/SobolevExtension.lean b/LeanPool/FunctionSpaces/Domains/Extension/SobolevExtension.lean index ace769e6ec..00fe8530d6 100644 --- a/LeanPool/FunctionSpaces/Domains/Extension/SobolevExtension.lean +++ b/LeanPool/FunctionSpaces/Domains/Extension/SobolevExtension.lean @@ -768,7 +768,7 @@ variable (G : LipschitzGraph V) /-- **The divergence kernels of a cone-supported bump lie in the reflected closed cone**: for a bump of radius `R` supported in `-K`, every dilate `(K_i)_{2^j}` of its divergence kernels is supported -in `{y : -y ∈ K̄, ‖y‖ ≤ 2R}`. -/ +in `{y : -y ∈ KBar, ‖y‖ ≤ 2R}`. -/ theorem tsupport_dilate_divKernel_subset {b : LocalMeansBump V} (hb : G.ConeSupported b.toFun) (i : Fin (finrank ℝ V)) (j : ℕ) : tsupport (dilate (2 ^ j) (b.divKernel i : V → ℂ)) ⊆ @@ -826,7 +826,7 @@ variable (Ω : BoundedLipschitzDomain V) omit [MeasurableSpace V] [BorelSpace V] in /-- **The cutoff of a boundary patch**: for `ε > 0` and every `j` there is a smooth `χ` with values in `[0, 1]`, compact closed support in the boundary ball `B(c_j, ρ_j)` and `χ = 1` near -`B̄(c_j, ρ_j - 2ε)` (`Rd.exists_contDiff_eventuallyEq_one`). -/ +`closedBall(c_j, ρ_j - 2ε)` (`Rd.exists_contDiff_eventuallyEq_one`). -/ theorem exists_cutoff_boundary {ε : ℝ} (hε : 0 < ε) (j : Fin Ω.N) : ∃ χ : V → ℝ, ContDiff ℝ ((⊤ : ℕ∞) : WithTop ℕ∞) χ ∧ HasCompactSupport χ ∧ tsupport χ ⊆ ball (Ω.center j) (Ω.radius j) ∧ (∀ x, χ x ∈ Set.Icc (0 : ℝ) 1) ∧ diff --git a/LeanPool/FunctionSpaces/Domains/Interval/LocalProjection.lean b/LeanPool/FunctionSpaces/Domains/Interval/LocalProjection.lean index 6bfc1bd138..ceb7a1a457 100644 --- a/LeanPool/FunctionSpaces/Domains/Interval/LocalProjection.lean +++ b/LeanPool/FunctionSpaces/Domains/Interval/LocalProjection.lean @@ -21,7 +21,7 @@ Modified for Lean Pool: module names and imports adapted. The **local projection** of a function `g` on an interval onto the polynomials of degree `< r` is computed from the moments of `g`. On `[0, 1]` the pairing `⟨P, Q⟩ = ∫_0^1 P Q` of polynomials of degree `< r` is nondegenerate (`Interval.polyPairing_nondegenerate`): pairing `P` -with its conjugate `P̄` gives `∫_0^1 |P|²`. So the monomial basis `b_i` has a dual basis `d_i`, +with its conjugate `PBar` gives `∫_0^1 |P|²`. So the monomial basis `b_i` has a dual basis `d_i`, `⟨d_i, b_k⟩ = δ_{ik}` (Mathlib's `LinearMap.BilinForm.dualBasis`), and every `P` of degree `< r` is `P = ∑_i ⟨P, b_i⟩ d_i` (`Interval.sum_polyPairing_smul_dualPoly`). For any function `g`, `Π g = ∑_i (∫_0^1 g b_i) d_i` is therefore a projection onto the polynomials, the @@ -75,7 +75,7 @@ theorem polyPairing_comm (r : ℕ) (P Q : degreeLT ℂ r) : polyPairing r P Q = simp only [polyPairing_apply, mul_comm] /-- **The pairing separates points**: if `∫_0^1 P Q = 0` for all `Q`, then `P = 0`; take -`Q = P̄`, so that `∫_0^1 |P|² = 0`. -/ +`Q = PBar`, so that `∫_0^1 |P|² = 0`. -/ theorem polyPairing_separatingLeft (r : ℕ) : (polyPairing r).SeparatingLeft := by intro P hP have hmem : (P : ℂ[X]).map (starRingEnd ℂ) ∈ degreeLT ℂ r := diff --git a/LeanPool/FunctionSpaces/Domains/Interval/Periodic.lean b/LeanPool/FunctionSpaces/Domains/Interval/Periodic.lean index 7bb736a3a3..180ea572a7 100644 --- a/LeanPool/FunctionSpaces/Domains/Interval/Periodic.lean +++ b/LeanPool/FunctionSpaces/Domains/Interval/Periodic.lean @@ -16,15 +16,16 @@ Modified for Lean Pool: module names and imports adapted. /-! # Periodic functions and the periodic modulus of smoothness -A function `f` on `[0, 1)` extends to the `1`-periodic function `f̃(x) = f(x - ⌊x⌋)` +A function `f` on `[0, 1)` extends to the `1`-periodic function `fTilde(x) = f(x - ⌊x⌋)` (`Interval.perExt`). This identifies functions on the circle `𝕋 = ℝ/ℤ` with functions on -`[0, 1)`, and `L_p(𝕋)` with `L_p[0, 1]`; working with `f̃` keeps everything on the real line. +`[0, 1)`, and `L_p(𝕋)` with `L_p[0, 1]`; working with `fTilde` keeps everything on the real line. The **periodic modulus of smoothness** -`ω_r^per(f, t)_p = sup_{0 ≤ h ≤ t} ‖Δ_h^r f̃‖_{L_p[0, 1]}` (`Interval.perModulus`) +`ω_r^per(f, t)_p = sup_{0 ≤ h ≤ t} ‖Δ_h^r fTilde‖_{L_p[0, 1]}` (`Interval.perModulus`) differs from the modulus on `[0, 1]` in that its differences wrap around and compare values near `1` with values near `0`. It depends only on the class of `f` in `L_p[0, 1]` -(`Interval.perModulus_congr_ae`), since `f̃` changes only on the integer translates of a null set +(`Interval.perModulus_congr_ae`), since `fTilde` changes only on the integer translates of a +null set (`Interval.perExt_ae_eq`), and it dominates the modulus on the interval (`Interval.modulus_le_perModulus`). The `L_p` norm of a periodic function over a unit interval does not depend on the interval (`Interval.lintegral_Icc_periodic`), from Mathlib's integration @@ -39,7 +40,7 @@ open scoped ENNReal namespace Interval -/-- The **periodic extension** `f̃(x) = f(x - ⌊x⌋)` of a function `f` on `[0, 1)`. -/ +/-- The **periodic extension** `fTilde(x) = f(x - ⌊x⌋)` of a function `f` on `[0, 1)`. -/ noncomputable def perExt (f : ℝ → ℂ) (x : ℝ) : ℂ := f (Int.fract x) /-- The periodic extension has period `1`. -/ @@ -70,7 +71,8 @@ theorem higherDiff_periodic {f : ℝ → ℂ} (hf : Function.Periodic f 1) (r : rw [show x + 1 + k * h = x + k * h + 1 by ring, hf] /-- **Periodic extensions of almost equal functions**: if `f = g` almost everywhere on `[0, 1]`, -then `f̃ = g̃` almost everywhere on `ℝ`, since `{f̃ ≠ g̃}` is the union of the integer translates +then `fTilde = gTilde` almost everywhere on `ℝ`, since `{fTilde ≠ gTilde}` is the union of the +integer translates of `{f ≠ g} ∩ [0, 1)`. -/ theorem perExt_ae_eq {f g : ℝ → ℂ} (hfg : f =ᵐ[volume.restrict (Icc 0 1)] g) : perExt f =ᵐ[volume] perExt g := by @@ -122,11 +124,12 @@ theorem lintegral_Icc_nat_le {G : ℝ → ℝ≥0∞} (hG : Function.Periodic G _ = ((n + 1 : ℕ) : ℝ≥0∞) * ∫⁻ x in Icc 0 1, G x := by push_cast; ring /-- The **periodic modulus of smoothness** -`ω_r^per(f, t)_p = sup_{0 ≤ h ≤ t} ‖Δ_h^r f̃‖_{L_p[0, 1]}` of the periodic extension `f̃`. -/ +`ω_r^per(f, t)_p = sup_{0 ≤ h ≤ t} ‖Δ_h^r fTilde‖_{L_p[0, 1]}` of the periodic extension +`fTilde`. -/ noncomputable def perModulus (r : ℕ) (p : ℝ≥0∞) (f : ℝ → ℂ) (t : ℝ) : ℝ≥0∞ := ⨆ (h : ℝ) (_ : h ∈ Icc 0 t), eLpNorm (higherDiff r h (perExt f)) p (volume.restrict (Icc 0 1)) -/-- `‖Δ_h^r f̃‖_{L_p[0, 1]} ≤ ω_r^per(f, t)` for `0 ≤ h ≤ t`. -/ +/-- `‖Δ_h^r fTilde‖_{L_p[0, 1]} ≤ ω_r^per(f, t)` for `0 ≤ h ≤ t`. -/ theorem eLpNorm_higherDiff_le_perModulus {r : ℕ} {p : ℝ≥0∞} {f : ℝ → ℂ} {t h : ℝ} (hh : h ∈ Icc 0 t) : eLpNorm (higherDiff r h (perExt f)) p (volume.restrict (Icc 0 1)) ≤ perModulus r p f t := @@ -179,7 +182,7 @@ theorem perModulus_le {f : ℝ → ℂ} (hf : Measurable f) {p : ℝ≥0∞} (hp eLpNorm_perExt_Icc hf hp0 hp'] /-- **The periodic modulus dominates the modulus on `[0, 1]`**: on `[0, 1 - rh)` the differences -of `f̃` and of `f` agree, since `x, …, x + rh` stay in `[0, 1)`. -/ +of `fTilde` and of `f` agree, since `x, …, x + rh` stay in `[0, 1)`. -/ theorem modulus_le_perModulus (r : ℕ) (p : ℝ≥0∞) (f : ℝ → ℂ) (t : ℝ) : modulus r p 0 1 f t ≤ perModulus r p f t := by rw [modulus_eq_iSup_nonneg] @@ -199,7 +202,7 @@ theorem modulus_le_perModulus (r : ℕ) (p : ℝ≥0∞) (f : ℝ → ℂ) (t : exact (eLpNorm_Icc_mono _ p le_rfl (by linarith)).trans (eLpNorm_higherDiff_le_perModulus hh) /-- **The modulus of a periodic extension over `n` periods**: -`ω_r(f̃, t, [0, n])_p ≤ n^(1/p) ω_r^per(f, t)_p`, since `Δ_h^r f̃` is `1`-periodic +`ω_r(fTilde, t, [0, n])_p ≤ n^(1/p) ω_r^per(f, t)_p`, since `Δ_h^r fTilde` is `1`-periodic (`Interval.lintegral_Icc_nat_le`). -/ theorem modulus_perExt_le {f : ℝ → ℂ} (hf : Measurable f) {p : ℝ≥0∞} (hp0 : p ≠ 0) (hp : p ≠ ∞) (r n : ℕ) (t : ℝ) : diff --git a/LeanPool/FunctionSpaces/Domains/Interval/PiecewisePeriodic.lean b/LeanPool/FunctionSpaces/Domains/Interval/PiecewisePeriodic.lean index a85f7e0702..8f519b30b8 100644 --- a/LeanPool/FunctionSpaces/Domains/Interval/PiecewisePeriodic.lean +++ b/LeanPool/FunctionSpaces/Domains/Interval/PiecewisePeriodic.lean @@ -16,7 +16,7 @@ Modified for Lean Pool: module names and imports adapted. # Piecewise polynomials on the circle On the circle `𝕋 = ℝ/ℤ`, identified with `[0, 1)` through the periodic extension -`f̃(x) = f(x - ⌊x⌋)`, the dyadic piecewise polynomials are the same functions as on `[0, 1)`, +`fTilde(x) = f(x - ⌊x⌋)`, the dyadic piecewise polynomials are the same functions as on `[0, 1)`, so their scheme is `Interval.ppScheme` in `L_p[0, 1] = L_p(𝕋)`. Only the modulus changes: the periodic modulus `ω_r^per(f, t)_p` of `FunctionSpaces.Domains.Interval.Periodic` also sees the knot `0 = 1` of the circle. @@ -106,7 +106,7 @@ theorem isPiecewisePoly_perExt_ppFun {r : ℕ} {Q : ℕ → ℂ[X]} (hQ : ∀ n, ⟨perPieces k Q m, perPieces_mem hQ k m, fun _ hx => perExt_ppFun_eq k Q hx⟩ /-- **The local masses of a periodic extension**: `2^k` consecutive pieces of the periodic -extension `ũ` make up one period, so `∑_{n < 2^k} ∫_{I_{k,n+l}} |ũ|^p ≤ ‖u‖_p^p`. -/ +extension `uTilde` make up one period, so `∑_{n < 2^k} ∫_{I_{k,n+l}} |uTilde|^p ≤ ‖u‖_p^p`. -/ theorem sum_localMass_perExt_le {u : ℝ → ℂ} (hu : Measurable u) (hp : p ≠ ∞) (k l : ℕ) : ∑ n ∈ Finset.range (2 ^ k), localMass p k (perExt u) (n + l) ≤ eLpNorm u p unitVol ^ p.toReal := by @@ -132,8 +132,9 @@ theorem sum_localMass_perExt_le {u : ℝ → ℂ} (hu : Measurable u) (hp : p ← setLIntegral_congr Ico_ae_eq_Icc] exact setLIntegral_congr_fun measurableSet_Ico fun x hx => by rw [perExt_of_mem u hx] -/-- **Bounded overlap on the circle**: `∑_{n < 2^k} ∑_{l ≤ r} ∫_{I_{k,n+l}} |ũ|^p ≤ (r + 1) ‖u‖_p^p` -for the periodic extension `ũ`. -/ +/-- **Bounded overlap on the circle**: `∑_{n < 2^k} ∑_{l ≤ r} ∫_{I_{k,n+l}} |uTilde|^p ≤ (r + 1) +‖u‖_p^p` +for the periodic extension `uTilde`. -/ theorem sum_sum_localMass_perExt_le {u : ℝ → ℂ} (hu : Measurable u) (hp : p ≠ ∞) (k r : ℕ) : ∑ n ∈ Finset.range (2 ^ k), ∑ l ∈ Finset.range (r + 1), localMass p k (perExt u) (n + l) ≤ (r + 1) * eLpNorm u p unitVol ^ p.toReal := by diff --git a/LeanPool/FunctionSpaces/Domains/Interval/Polynomials.lean b/LeanPool/FunctionSpaces/Domains/Interval/Polynomials.lean index 9ebf4ef1b3..a7352aaf39 100644 --- a/LeanPool/FunctionSpaces/Domains/Interval/Polynomials.lean +++ b/LeanPool/FunctionSpaces/Domains/Interval/Polynomials.lean @@ -305,7 +305,7 @@ theorem enorm_polyFun_le (r : ℕ) (hp : p ≠ ∞) : ∃ K : ℝ≥0∞, K ≠ gcongr linarith -/-- The polynomial `P̄` with conjugate coefficients takes the values `P̄(x) = conj P(x)` at real +/-- The polynomial `PBar` with conjugate coefficients takes the values `PBar(x) = conj P(x)` at real points. -/ theorem polyFun_map_conj (P : ℂ[X]) (x : ℝ) : polyFun (P.map (starRingEnd ℂ)) x = starRingEnd ℂ (polyFun P x) := by diff --git a/LeanPool/FunctionSpaces/Domains/Interval/Smoothing.lean b/LeanPool/FunctionSpaces/Domains/Interval/Smoothing.lean index f6f2675a0b..2180818b8e 100644 --- a/LeanPool/FunctionSpaces/Domains/Interval/Smoothing.lean +++ b/LeanPool/FunctionSpaces/Domains/Interval/Smoothing.lean @@ -105,7 +105,7 @@ theorem continuous_avgStepIter [TopologicalSpace α] {G : ℝ → α → ℂ} with the weight `Φ = δ^(-1) 1_{(0, δ]}` of total mass `1` (`MeasureTheory.eLpNorm_integral_kernel_le_of_bound`). -/ theorem eLpNorm_avg_le [TopologicalSpace α] [MeasurableSpace α] [OpensMeasurableSpace α] - [SecondCountableTopology α] {K : ℝ → α → ℂ} (hK : Continuous (Function.uncurry K)) {δ : ℝ} + {K : ℝ → α → ℂ} (hK : Continuous (Function.uncurry K)) {δ : ℝ} (hδ : 0 < δ) {p : ℝ≥0∞} (hp : 1 ≤ p) (hp' : p ≠ ∞) (μ : Measure α) [SFinite μ] : eLpNorm (fun x => ((δ : ℂ))⁻¹ * ∫ t in (0 : ℝ)..δ, K t x) p μ ≤ ⨆ t ∈ Icc 0 δ, eLpNorm (K t) p μ := by @@ -141,7 +141,7 @@ theorem eLpNorm_avg_le [TopologicalSpace α] [MeasurableSpace α] [OpensMeasurab /-- **Iterated averages are bounded by the sup over the steps**: `‖avg^m G(σ, ·)‖_{L_p(μ)} ≤ sup_{σ ≤ h ≤ σ + mδ} ‖G(h, ·)‖_{L_p(μ)}`. -/ theorem eLpNorm_avgStepIter_le [TopologicalSpace α] [MeasurableSpace α] [OpensMeasurableSpace α] - [SecondCountableTopology α] {G : ℝ → α → ℂ} (hG : Continuous (Function.uncurry G)) {δ : ℝ} + {G : ℝ → α → ℂ} (hG : Continuous (Function.uncurry G)) {δ : ℝ} (hδ : 0 < δ) {p : ℝ≥0∞} (hp : 1 ≤ p) (hp' : p ≠ ∞) (μ : Measure α) [SFinite μ] (m : ℕ) (σ : ℝ) : eLpNorm (avgStepIter m δ G σ) p μ ≤ ⨆ h ∈ Icc σ (σ + m * δ), eLpNorm (G h) p μ := by diff --git a/LeanPool/FunctionSpaces/Domains/Interval/SplinePeriodic.lean b/LeanPool/FunctionSpaces/Domains/Interval/SplinePeriodic.lean index 99f220bc2b..ccfbe9ea19 100644 --- a/LeanPool/FunctionSpaces/Domains/Interval/SplinePeriodic.lean +++ b/LeanPool/FunctionSpaces/Domains/Interval/SplinePeriodic.lean @@ -16,7 +16,7 @@ Modified for Lean Pool: module names and imports adapted. # Splines on the circle and their inverse inequality On the circle `𝕋 = ℝ/ℤ`, identified with `[0, 1)` through the periodic extension -`f̃(x) = f(x - ⌊x⌋)`, a **periodic spline of order `r` and level `k`** is a spline on `[0, 1]` +`fTilde(x) = f(x - ⌊x⌋)`, a **periodic spline of order `r` and level `k`** is a spline on `[0, 1]` (`Interval.SplineJoins`) whose last piece also joins the first one across the point `0 = 1` of the circle (`Interval.PerJoin`): the first piece moved to `[1, 1 + 2^(-k))` and the last piece differ by a multiple of `(x - 1)^(r-1)`. The periodic splines form subspaces `S_k(𝕋)` of diff --git a/LeanPool/FunctionSpaces/Domains/Lipschitz/BesovDomainLocalisation.lean b/LeanPool/FunctionSpaces/Domains/Lipschitz/BesovDomainLocalisation.lean index 8e64e85d37..de6603ce9b 100644 --- a/LeanPool/FunctionSpaces/Domains/Lipschitz/BesovDomainLocalisation.lean +++ b/LeanPool/FunctionSpaces/Domains/Lipschitz/BesovDomainLocalisation.lean @@ -27,7 +27,8 @@ described on the bounded convex pieces `D = O ∩ B(0, R')`, `R < R'` * **Localisation** (`Rd.BesovDomain.modNormOn_lt_top_iff_ballDomain`): for such functions the intrinsic quasi-norm `N_Ω` is finite iff `N_D` is finite. One direction is the monotonicity in the set (`Rd.modNormOn_mono_set`); for the other, extend from `D`, multiply by a cutoff equal to - `1` on `B̄(0, R)` and supported in `B(0, R')`, and restrict to `Ω`. Multiplication by a smooth + `1` on `closedBall(0, R)` and supported in `B(0, R')`, and restrict to `Ω`. Multiplication by + a smooth `χ` with compact support is bounded in the Besov quasi-norm by differences on `V`: `N(χ F) ≤ C N(F)` (`Rd.exists_mul_modNorm_le`). * **`W^1_2 = B^1_{2,2}`** (`Rd.BesovDomain.exists_hasWeakLineDeriv_iff_modNormOn_lt_top`): such a @@ -94,7 +95,7 @@ theorem ballDomain_subset (R : ℝ) : (ballDomain Ω R).carrier ⊆ Ω := variable {Ω} /-- **The cutoff identity**: let `g = 0` almost everywhere outside `B(0, R)`, `F = g` almost -everywhere on `D = O ∩ B(0, R')`, and let `χ` be `1` on `B̄(0, R)` with closed support in +everywhere on `D = O ∩ B(0, R')`, and let `χ` be `1` on `closedBall(0, R)` with closed support in `B(0, R')`. Then `χ F = g` almost everywhere on `Ω`: on `D` because `χ g = g`, outside `B(0, R')` because both sides vanish, and `Ω \ O` is a null set (`Rd.BesovDomain.restrict_interior`). -/ @@ -119,7 +120,8 @@ theorem mul_ae_eq_of_ballDomain {p : ℝ≥0∞} {R R' : ℝ} (hR : R ≤ R') `1 ≤ q ≤ ∞`, `R < R'` and `g ∈ L_p(V)` vanishing almost everywhere outside `B(0, R)`, if the intrinsic quasi-norm `N_D(g)` on the piece `D = O ∩ B(0, R')` is finite, so is `N_Ω(g)`. The piece has the extension property (`Rd.BoundedLipschitzDomain.hasBesovExtension`), which gives `F` on `V` -with `F = g` on `D`; for a smooth cutoff `χ` equal to `1` on `B̄(0, R)` with compact support in +with `F = g` on `D`; for a smooth cutoff `χ` equal to `1` on `closedBall(0, R)` with compact +support in `B(0, R')` (`Rd.exists_contDiff_eventuallyEq_one`), `χ F` has finite quasi-norm on `V` (`Rd.exists_mul_modNorm_le`) and agrees with `g` on `Ω` (`Rd.BesovDomain.mul_ae_eq_of_ballDomain`), so `N_Ω(g)` is finite (`Rd.modNormOn_le_modNorm_of_indicatorLp`). -/ diff --git a/LeanPool/FunctionSpaces/Domains/Lipschitz/BesovDomains.lean b/LeanPool/FunctionSpaces/Domains/Lipschitz/BesovDomains.lean index 5905a13f8c..c02e149642 100644 --- a/LeanPool/FunctionSpaces/Domains/Lipschitz/BesovDomains.lean +++ b/LeanPool/FunctionSpaces/Domains/Lipschitz/BesovDomains.lean @@ -336,7 +336,8 @@ theorem BesovDomain.closure_of_convex {U : Set V} (hc : Convex ℝ U) (ho : IsOp (hb : Bornology.IsBounded U) (hne : U.Nonempty) : BesovDomain (closure U) := closure_boundedLipschitzDomain (BoundedLipschitzDomain.ofConvex hc ho hb) hc hne -/-- **Closed balls are Besov domains**: for every `c` and `R > 0` the closed ball `B̄(c, R)` is +/-- **Closed balls are Besov domains**: for every `c` and `R > 0` the closed ball `closedBall(c, +R)` is the closure of the open ball (Mathlib's `closure_ball`), a nonempty bounded open convex set (`Rd.BesovDomain.closure_of_convex`). -/ theorem BesovDomain.closedBall (c : V) {R : ℝ} (hR : 0 < R) : diff --git a/LeanPool/FunctionSpaces/Domains/Lipschitz/BoundedLipschitz.lean b/LeanPool/FunctionSpaces/Domains/Lipschitz/BoundedLipschitz.lean index c2944dadd9..151a77843a 100644 --- a/LeanPool/FunctionSpaces/Domains/Lipschitz/BoundedLipschitz.lean +++ b/LeanPool/FunctionSpaces/Domains/Lipschitz/BoundedLipschitz.lean @@ -31,7 +31,7 @@ comes with a bound: its quasi-norm on `V` is at most `C` times the intrinsic one depending only on `Ω`, `p`, `r`, `s` and `q` (`Rd.BoundedLipschitzDomain.exists_besov_extension_le`). -The proof follows Schneider–Vybíral §3: a covering `Ω̄ ⊆ K_0 ∪ ⋃_j K_j` with an inner domain +The proof follows Schneider–Vybíral §3: a covering `ΩBar ⊆ K_0 ∪ ⋃_j K_j` with an inner domain `K_0`, a smooth resolution of unity, and pointwise multipliers. * The balls shrink: `Γ ⊆ ⋃_j B(c_j, ρ_j - 2ε)` for some `ε > 0` @@ -39,9 +39,9 @@ The proof follows Schneider–Vybíral §3: a covering `Ω̄ ⊆ K_0 ∪ ⋃_j K distance `> 2δ` from `Ωᶜ` (`Rd.BoundedLipschitzDomain.exists_interior_margin`), both by compactness; `Ωᶜ` is nonempty in dimension `n ≥ 1` (`Rd.BoundedLipschitzDomain.nonempty_compl`). The shrunk balls and the inner patch are bounded - open sets that cover `Ω̄` (`Rd.BoundedLipschitzDomain.patch`, + open sets that cover `ΩBar` (`Rd.BoundedLipschitzDomain.patch`, `Rd.BoundedLipschitzDomain.closure_subset_iUnion_patch`). A property that pastes over finite - covers of `Ω̄` thus passes from the patches to `Ω` + covers of `ΩBar` thus passes from the patches to `Ω` (`Rd.BoundedLipschitzDomain.exists_of_patches`). * Local extensions with a bound (`Rd.LocalMeansBump.exists_local_extension_le`) on the boundary patches `Ω ∩ B(c_j, ρ_j - 2ε)`, with the cone bump of `Ω_j` rescaled to radius `≤ ε / r`, and on @@ -424,7 +424,7 @@ theorem isBounded_patch (ε : ℝ) {δ : ℝ} (hδ : 0 ≤ δ) (i : Option (Fin | some j => exact isBounded_ball omit [FiniteDimensional ℝ V] in -/-- **The patches cover `Ω̄`** if the shrunk balls cover `Γ` and the points of `Ω` outside them +/-- **The patches cover `ΩBar`** if the shrunk balls cover `Γ` and the points of `Ω` outside them have distance `> 2δ` from `Ωᶜ` (`Rd.BoundedLipschitzDomain.exists_shrink`, `Rd.BoundedLipschitzDomain.exists_interior_margin`). -/ theorem closure_subset_iUnion_patch {ε δ : ℝ} @@ -446,12 +446,12 @@ theorem closure_subset_iUnion_patch {ε δ : ℝ} exact Set.mem_iUnion.2 ⟨none, hδ x hxΩ hxb⟩ /-- **Pasting over the patches**: let `P U C` be a property of a set `U ⊆ V` and a constant -`C ∈ [0, ∞]` that passes from the sets `Ω ∩ U_i` of every cover `(U_i)_{i ∈ {0, …, N}}` of `Ω̄` by +`C ∈ [0, ∞]` that passes from the sets `Ω ∩ U_i` of every cover `(U_i)_{i ∈ {0, …, N}}` of `ΩBar` by `N + 1` bounded open sets, one for each boundary ball and one inner set (indexed by `Option (Fin Ω.N)`), with finite constants, to `Ω`, with a finite constant. If `P` holds with a finite constant for every boundary patch `Ω ∩ B(c_j, ρ_j - 2ε)`, `ε > 0`, and for every inner patch `Ω ∩ {infDist(·, Ωᶜ) > 2δ}`, `δ > 0`, then it holds for `Ω` with a finite constant: for -suitable `ε` and `δ` the patches `Rd.BoundedLipschitzDomain.patch` cover `Ω̄` +suitable `ε` and `δ` the patches `Rd.BoundedLipschitzDomain.patch` cover `ΩBar` (`Rd.BoundedLipschitzDomain.exists_shrink`, `Rd.BoundedLipschitzDomain.exists_interior_margin`, `Rd.BoundedLipschitzDomain.closure_subset_iUnion_patch`). -/ theorem exists_of_patches [Nontrivial V] (P : Set V → ℝ≥0∞ → Prop) diff --git a/LeanPool/FunctionSpaces/Domains/Lipschitz/GraphParametrization.lean b/LeanPool/FunctionSpaces/Domains/Lipschitz/GraphParametrization.lean index 11baa9345c..43bc44611d 100644 --- a/LeanPool/FunctionSpaces/Domains/Lipschitz/GraphParametrization.lean +++ b/LeanPool/FunctionSpaces/Domains/Lipschitz/GraphParametrization.lean @@ -30,8 +30,10 @@ boundary of `Ω` is the graph: `y ∈ ∂Ω` iff `γ(Py) = y` iff `⟪y, e⟫ = is the range of `γ` (`Rd.LipschitzGraph.range_graphMap`). **Traces of atoms** (`Rd.LipschitzGraph.isRegularAtom_comp_graphMap`): a continuous `a` on `V` -that vanishes outside `B̄(c, d 2^(-j))`, with `|a| ≤ A` and `|a(x + h) - a(x)| ≤ A min(1, 2^j ‖h‖)`, -restricts to `a ∘ γ`, which vanishes outside `B̄(Pc, d 2^(-j))` in `H`, with `|a ∘ γ| ≤ A` and +that vanishes outside `closedBall(c, d 2^(-j))`, with `|a| ≤ A` and `|a(x + h) - a(x)| ≤ A +min(1, 2^j ‖h‖)`, +restricts to `a ∘ γ`, which vanishes outside `closedBall(Pc, d 2^(-j))` in `H`, with `|a ∘ γ| ≤ +A` and `|a ∘ γ(x' + h') - a ∘ γ(x')| ≤ (1 + M) A min(1, 2^j ‖h'‖)`: a regular atom of order and exponent `1` on `H`, as in the proof of Schneider–Vybíral, Theorem 4.2. Only sup bounds enter. -/ @@ -242,7 +244,8 @@ theorem range_graphMap : Set.range Ω.graphMap = frontier Ω.domain := by variable [FiniteDimensional ℝ V] [MeasurableSpace V] [BorelSpace V] /-- **Traces of atoms** (as in the proof of Schneider–Vybíral, Theorem 4.2): if `a` is continuous, -vanishes outside `B̄(c, d 2^(-j))`, `|a| ≤ A` and `|a(x + h) - a(x)| ≤ A min(1, 2^j ‖h‖)`, then +vanishes outside `closedBall(c, d 2^(-j))`, `|a| ≤ A` and `|a(x + h) - a(x)| ≤ A min(1, 2^j +‖h‖)`, then `a ∘ γ` is a regular atom of order and exponent `1` on `H` with centre `Pc`, radius factor `d` and constant `(1 + M) A (2 d^(n-1) |B_1|)^(1/p)`, since `γ` is Lipschitz with constant `1 + M`. -/ theorem isRegularAtom_comp_graphMap {p : ℝ≥0∞} {d : ℝ} (hd : 0 ≤ d) {A : ℝ≥0∞} {j : ℕ} {c : V} diff --git a/LeanPool/FunctionSpaces/Domains/Lipschitz/LipschitzGraph.lean b/LeanPool/FunctionSpaces/Domains/Lipschitz/LipschitzGraph.lean index ffe427c01d..1931d8205e 100644 --- a/LeanPool/FunctionSpaces/Domains/Lipschitz/LipschitzGraph.lean +++ b/LeanPool/FunctionSpaces/Domains/Lipschitz/LipschitzGraph.lean @@ -24,9 +24,9 @@ closure is `{x : φ(x) ≤ ⟪x, e⟫}` (`Rd.LipschitzGraph.closure_domain`). Wi cone `K = {y : M ‖y - ⟪y, e⟫ e‖ < ⟪y, e⟫}` (`Rd.LipschitzGraph.cone`), `Ω + K ⊆ Ω` (`Rd.LipschitzGraph.add_mem`): a step into the cone raises `⟪·, e⟫` faster than `φ`. The cone is closed under positive scaling and contains a ball around `e/4` -(`Rd.LipschitzGraph.ball_subset_cone`). The closed cone `K̄ = {y : M ‖y - ⟪y, e⟫ e‖ ≤ ⟪y, e⟫}` -(`Rd.LipschitzGraph.closedCone`) is closed under nonnegative scaling, and still `Ω + K̄ ⊆ Ω` -(`Rd.LipschitzGraph.add_mem_of_mem_closedCone`); for the closure, `Ω̄ + K ⊆ Ω` +(`Rd.LipschitzGraph.ball_subset_cone`). The closed cone `KBar = {y : M ‖y - ⟪y, e⟫ e‖ ≤ ⟪y, e⟫}` +(`Rd.LipschitzGraph.closedCone`) is closed under nonnegative scaling, and still `Ω + KBar ⊆ Ω` +(`Rd.LipschitzGraph.add_mem_of_mem_closedCone`); for the closure, `ΩBar + K ⊆ Ω` (`Rd.LipschitzGraph.add_mem_of_mem_closure`). Both rest on `φ(x + y) ≤ φ(x) + M ‖y - ⟪y, e⟫ e‖` (`Rd.LipschitzGraph.phi_add_le`). If the closed support of `η` lies in `K`, so does that of every dilate `η_c`, `c > 0` (`Rd.LipschitzGraph.mem_cone_of_mem_tsupport_dilate`). @@ -126,7 +126,7 @@ def domain : Set V := {x | Ω.phi x < inner ℝ x Ω.e} /-- The cone `K = {y : M ‖y - ⟪y, e⟫ e‖ < ⟪y, e⟫}`. -/ def cone : Set V := {y | Ω.M * ‖y - inner ℝ y Ω.e • Ω.e‖ < inner ℝ y Ω.e} -/-- The closed cone `K̄ = {y : M ‖y - ⟪y, e⟫ e‖ ≤ ⟪y, e⟫}`, which contains `K`. -/ +/-- The closed cone `KBar = {y : M ‖y - ⟪y, e⟫ e‖ ≤ ⟪y, e⟫}`, which contains `K`. -/ def closedCone : Set V := {y | Ω.M * ‖y - inner ℝ y Ω.e • Ω.e‖ ≤ inner ℝ y Ω.e} /-- The cone lies in the closed cone. -/ @@ -148,7 +148,8 @@ theorem phi_add_le (x y : V) : Ω.phi (x + y) ≤ Ω.phi x + Ω.M * ‖y - inner rw [h1] linarith [le_abs_self (Ω.phi (x + d) - Ω.phi x)] -/-- **Steps into the closed cone stay in the domain**: `Ω + K̄ ⊆ Ω`, since the domain is defined by +/-- **Steps into the closed cone stay in the domain**: `Ω + KBar ⊆ Ω`, since the domain is +defined by a strict inequality (`Rd.LipschitzGraph.phi_add_le`). -/ theorem add_mem_of_mem_closedCone {x y : V} (hx : x ∈ Ω.domain) (hy : y ∈ Ω.closedCone) : x + y ∈ Ω.domain := by @@ -158,7 +159,7 @@ theorem add_mem_of_mem_closedCone {x y : V} (hx : x ∈ Ω.domain) (hy : y ∈ rw [inner_add_left] linarith [Ω.phi_add_le x y] -/-- **Steps into the cone stay in the domain**: `Ω + K ⊆ Ω`, the case `K ⊆ K̄` of +/-- **Steps into the cone stay in the domain**: `Ω + K ⊆ Ω`, the case `K ⊆ KBar` of `Rd.LipschitzGraph.add_mem_of_mem_closedCone`. -/ theorem add_mem {x y : V} (hx : x ∈ Ω.domain) (hy : y ∈ Ω.cone) : x + y ∈ Ω.domain := Ω.add_mem_of_mem_closedCone hx (Ω.cone_subset_closedCone hy) @@ -200,7 +201,7 @@ theorem lipschitzWith_phi : LipschitzWith ⟨Ω.M, Ω.M_nonneg⟩ Ω.phi := theorem continuous_phi : Continuous Ω.phi := Ω.lipschitzWith_phi.continuous -/-- **Steps into the open cone from the closure stay in the domain**: `Ω̄ + K ⊆ Ω`, since +/-- **Steps into the open cone from the closure stay in the domain**: `ΩBar + K ⊆ Ω`, since `φ(x) ≤ ⟪x, e⟫` on the closure of `Ω` and the cone is defined by a strict inequality (`Rd.LipschitzGraph.phi_add_le`). -/ theorem add_mem_of_mem_closure {x y : V} (hx : x ∈ closure Ω.domain) (hy : y ∈ Ω.cone) : diff --git a/LeanPool/FunctionSpaces/Domains/Lipschitz/LipschitzGraphArea.lean b/LeanPool/FunctionSpaces/Domains/Lipschitz/LipschitzGraphArea.lean index 0a0c8bdc3e..9c373bce00 100644 --- a/LeanPool/FunctionSpaces/Domains/Lipschitz/LipschitzGraphArea.lean +++ b/LeanPool/FunctionSpaces/Domains/Lipschitz/LipschitzGraphArea.lean @@ -88,7 +88,7 @@ and let the increments of `f₁` differ from those of `f₂` by at most `δ ‖x left inverse `q` on `P` (Mathlib's `Function.invFunOn`), and `f₁ ∘ q` maps `f₂ '' P` onto `f₁ '' P` and is `(1 + δ)`-Lipschitz there. -/ theorem euclideanHausdorffMeasure_image_le_of_near {X Y : Type*} [NormedAddCommGroup X] - [MeasurableSpace X] [BorelSpace X] [NormedAddCommGroup Y] [MeasurableSpace Y] [BorelSpace Y] + [NormedAddCommGroup Y] [MeasurableSpace Y] [BorelSpace Y] {f₁ f₂ : X → Y} {P : Set X} {δ : ℝ} (hδ : 0 ≤ δ) (h₂ : ∀ x ∈ P, ∀ y ∈ P, ‖x - y‖ ≤ ‖f₂ x - f₂ y‖) (h : ∀ x ∈ P, ∀ y ∈ P, ‖(f₁ x - f₁ y) - (f₂ x - f₂ y)‖ ≤ δ * ‖x - y‖) (d : ℕ) : diff --git a/LeanPool/FunctionSpaces/Domains/Manifolds/SmoothLocalGraphs.lean b/LeanPool/FunctionSpaces/Domains/Manifolds/SmoothLocalGraphs.lean index 815a6c0f6c..fc7064accb 100644 --- a/LeanPool/FunctionSpaces/Domains/Manifolds/SmoothLocalGraphs.lean +++ b/LeanPool/FunctionSpaces/Domains/Manifolds/SmoothLocalGraphs.lean @@ -90,8 +90,9 @@ theorem contDiff_mul_of_tsupport_subset {E : Type*} [NormedAddCommGroup E] [Norm /-- **The smooth cut-off**: a function `φ` smooth on the ball `B(0, r)` of a finite-dimensional real inner product space agrees on `B(0, r/4)` with a smooth Lipschitz function `ψ` on the whole -space, namely `ψ = b φ` for a smooth bump `b` equal to `1` on `B̄(0, r/4)` and supported in -`B̄(0, r/2)`. `ψ` is smooth by `Rd.contDiff_mul_of_tsupport_subset` and has compact support, so +space, namely `ψ = b φ` for a smooth bump `b` equal to `1` on `closedBall(0, r/4)` and supported in +`closedBall(0, r/2)`. `ψ` is smooth by `Rd.contDiff_mul_of_tsupport_subset` and has compact +support, so it is Lipschitz (Mathlib's `ContDiff.lipschitzWith_of_hasCompactSupport`). -/ theorem exists_contDiff_lipschitzWith_eqOn_ball {E : Type*} [NormedAddCommGroup E] [InnerProductSpace ℝ E] [FiniteDimensional ℝ E] {φ : E → ℝ} {r : ℝ} (hr : 0 < r) diff --git a/LeanPool/FunctionSpaces/Domains/Sobolev/LipschitzGraphGreen.lean b/LeanPool/FunctionSpaces/Domains/Sobolev/LipschitzGraphGreen.lean index ddc3635ecf..7dd1978b19 100644 --- a/LeanPool/FunctionSpaces/Domains/Sobolev/LipschitzGraphGreen.lean +++ b/LeanPool/FunctionSpaces/Domains/Sobolev/LipschitzGraphGreen.lean @@ -99,7 +99,8 @@ theorem abs_add_inner_le_of_norm_add_smul_le {w : V} (hw : ‖w‖ = 1) {y : V} _ ≤ ‖y + t • w‖ * ‖w‖ := abs_real_inner_le_norm _ _ _ ≤ R := by rw [hw, mul_one]; exact h -/-- **A function supported in a ball, along a line**: if `tsupport h ⊆ B̄(0, R)` and `w` is a unit +/-- **A function supported in a ball, along a line**: if `tsupport h ⊆ closedBall(0, R)` and `w` +is a unit vector, then `h(y + t w) = 0` for every `t` outside `[-⟪y, w⟫ - R, -⟪y, w⟫ + R]`. -/ theorem apply_add_smul_eq_zero_of_notMem_Icc {F : Type*} [Zero F] {h : V → F} {R : ℝ} (hR : tsupport h ⊆ closedBall 0 R) {w : V} (hw : ‖w‖ = 1) (y : V) {t : ℝ} @@ -169,7 +170,7 @@ theorem hasFDerivAt_rayIntegral (hg : ContDiff ℝ 1 g) (hgc : HasCompactSupport /-- The derivative of the ray integral in a direction `v`: `DΨ(y) v = ∫_0^∞ Dg(y + t w) v dt` (Mathlib's `ContinuousLinearMap.integral_apply`). -/ -theorem fderiv_rayIntegral_apply [CompleteSpace E] (hg : ContDiff ℝ 1 g) +theorem fderiv_rayIntegral_apply (hg : ContDiff ℝ 1 g) (hgc : HasCompactSupport g) {w : V} (hw : ‖w‖ = 1) (y v : V) : fderiv ℝ (rayIntegral g w) y v = ∫ t in Ioi (0 : ℝ), fderiv ℝ g (y + t • w) v := by rw [(hasFDerivAt_rayIntegral hg hgc hw y).fderiv, ContinuousLinearMap.integral_apply @@ -205,7 +206,8 @@ theorem fderiv_rayIntegral_self [CompleteSpace E] (hg : ContDiff ℝ 1 g) rw [h, zero_smul, add_zero, zero_sub] /-- **The derivative of the ray integral is bounded**: there is `K` with `‖DΨ(y)‖ ≤ K` for every -`y`; the proof takes `K = C max(2R, 0)` for `‖Dg‖ ≤ C` and `tsupport g ⊆ B̄(0, R)`, since each line +`y`; the proof takes `K = C max(2R, 0)` for `‖Dg‖ ≤ C` and `tsupport g ⊆ closedBall(0, R)`, +since each line meets the support of `g` in an interval of length at most `2R`. -/ theorem exists_norm_fderiv_rayIntegral_le (hg : ContDiff ℝ 1 g) (hgc : HasCompactSupport g) {w : V} (hw : ‖w‖ = 1) : ∃ K : ℝ, ∀ y, ‖fderiv ℝ (rayIntegral g w) y‖ ≤ K := by @@ -431,7 +433,8 @@ theorem norm_le_norm_graphMap_add_smul (x' : Ω.hyperplane) (t : ℝ) : exact Ω.norm_le_norm_coe_add_smul_e x' _ omit [FiniteDimensional ℝ V] [MeasurableSpace V] [BorelSpace V] in -/-- If `tsupport h ⊆ B̄(0, R)` and `‖x'‖ > R`, then `h` vanishes on the vertical line through +/-- If `tsupport h ⊆ closedBall(0, R)` and `‖x'‖ > R`, then `h` vanishes on the vertical line +through `γ(x')`. -/ theorem apply_graphMap_add_smul_eq_zero_of_norm_lt {F : Type*} [Zero F] {h : V → F} {R : ℝ} (hR : tsupport h ⊆ closedBall 0 R) {x' : Ω.hyperplane} (hx : R < ‖x'‖) (t : ℝ) : @@ -496,7 +499,7 @@ theorem integrable_comp_graphMap {h : V → ℂ} (hh : Continuous h) (hhc : HasC simpa using Ω.apply_graphMap_add_smul_eq_zero_of_norm_lt hR hx' 0 /-- `x' ↦ DΨ(γ x') v` is integrable on `H`: it is bounded (`Rd.exists_norm_fderiv_rayIntegral_le`) -and vanishes for `‖x'‖ > R` when `tsupport g ⊆ B̄(0, R)`. -/ +and vanishes for `‖x'‖ > R` when `tsupport g ⊆ closedBall(0, R)`. -/ theorem integrable_fderiv_rayIntegral (hg : ContDiff ℝ 1 g) (hgc : HasCompactSupport g) (v : V) : Integrable fun x' => fderiv ℝ (rayIntegral g Ω.e) (Ω.graphMap x') v := by obtain ⟨R, hR⟩ := hgc.isCompact.isBounded.subset_closedBall 0 diff --git a/LeanPool/FunctionSpaces/Domains/Sobolev/SobolevDuality.lean b/LeanPool/FunctionSpaces/Domains/Sobolev/SobolevDuality.lean index 418d96082b..bc1b084277 100644 --- a/LeanPool/FunctionSpaces/Domains/Sobolev/SobolevDuality.lean +++ b/LeanPool/FunctionSpaces/Domains/Sobolev/SobolevDuality.lean @@ -16,7 +16,7 @@ Modified for Lean Pool: module names and imports adapted. # Duality of Sobolev spaces on open sets Let `V` be a finite-dimensional real inner product space, such as `ℝ^d`, with Lebesgue measure, -`Ω ⊆ V` open and `s` real. The Hilbert spaces `H̃^s(Ω)` and `H^{-s}(Ω)` of +`Ω ⊆ V` open and `s` real. The Hilbert spaces `HTilde^s(Ω)` and `H^{-s}(Ω)` of `FunctionSpaces/Domains/Sobolev/SobolevRestrictionSpaces.lean` are dual to each other, as in Chandler-Wilde, Hewett and Moiola (Theorem 3.3), for every open set and every real `s`. @@ -31,12 +31,13 @@ Chandler-Wilde, Hewett and Moiola (Theorem 3.3), for every open set and every re and `conj (W(φ))` for test functions `φ` (`Rd.pairing_ofTest_left`, `Rd.pairing_ofTest_right`); at `s = 1` and for Schwartz `W` it is the `L_2` inner product (`Rd.pairing_one_toLp`). * **Orthogonal complements**: `⟪U, φ⟫_{H^s} = conj ((J_{2s} U)(φ))` for test functions `φ` - (`Rd.inner_ofTest_eq`), so `U ⊥ H̃^s(Ω)` iff `J_{2s} U` vanishes on `Ω` - (`Rd.mem_orthogonal_tildeSpace_iff`), and `J_{2s}` maps `H̃^s(Ω)` onto `H^{-s}(Ω)` - (`Rd.tildeEquivRestriction`) and `H^s(Ω)` onto `H̃^{-s}(Ω)` (`Rd.restrictionEquivTilde`). - Elements vanishing on `Ω` pair to zero with `H̃^s(Ω)` (`Rd.pairing_eq_zero_of_mem_vanishOn_left`, + (`Rd.inner_ofTest_eq`), so `U ⊥ HTilde^s(Ω)` iff `J_{2s} U` vanishes on `Ω` + (`Rd.mem_orthogonal_tildeSpace_iff`), and `J_{2s}` maps `HTilde^s(Ω)` onto `H^{-s}(Ω)` + (`Rd.tildeEquivRestriction`) and `H^s(Ω)` onto `HTilde^{-s}(Ω)` (`Rd.restrictionEquivTilde`). + Elements vanishing on `Ω` pair to zero with `HTilde^s(Ω)` + (`Rd.pairing_eq_zero_of_mem_vanishOn_left`, `Rd.pairing_eq_zero_of_mem_vanishOn_right`). -* **Duality**: `(H̃^s(Ω))^* ≅ H^{-s}(Ω)` (`Rd.dualEquiv`), `(H^s(Ω))^* ≅ H̃^{-s}(Ω)` +* **Duality**: `(HTilde^s(Ω))^* ≅ H^{-s}(Ω)` (`Rd.dualEquiv`), `(H^s(Ω))^* ≅ HTilde^{-s}(Ω)` (`Rd.dualRestrictionEquiv`) and `(H^1_0(Ω))^* ≅ H^{-1}(Ω)` (`Rd.dualZeroBoundaryEquiv`), each through the pairing, conjugate-linear and isometric; the pairing may use every extension of the representing element (`Rd.dualEquiv_apply_of_restrictProj_eq`, @@ -305,9 +306,10 @@ theorem pairing_one_toLp (ψ : 𝓢(V, ℂ)) (U : H^{1}(V)) : map_mul, Complex.conj_ofReal] ring -/-! ### Orthogonal complements of `H̃^t(Ω)` -/ +/-! ### Orthogonal complements of `HTilde^t(Ω)` -/ -/-- **The orthogonal complement of `H̃^t(Ω)`**: `U ∈ H^t(V)` is orthogonal to `H̃^t(Ω)` iff the +/-- **The orthogonal complement of `HTilde^t(Ω)`**: `U ∈ H^t(V)` is orthogonal to `HTilde^t(Ω)` +iff the distribution `J_t (J_t U)` vanishes on every test function of `Ω`. The orthogonal complement of a closure is that of the set (Mathlib's `Submodule.orthogonal_closure`), orthogonality to a span is orthogonality to its generators, and `⟪φ, U⟫ = (J_t (J_t U))(φ)` (`Rd.inner_ofTest_left`). -/ @@ -328,8 +330,8 @@ theorem mem_orthogonal_tildeSpace_iff_toLp {t : ℝ} (U : H^{t}(V)) : | add x y _ _ hx hy => rw [inner_add_left, hx, hy, add_zero] | smul c x _ hx => rw [inner_smul_left, hx, mul_zero] -/-- **The orthogonal complement of `H̃^t(Ω)` as a preimage**: for a linear isometry `e` of -`H^t(V)` onto `H^{t'}(V)` whose values are the distributions `J_t (J_t U)`, `H̃^t(Ω)^⊥` is the +/-- **The orthogonal complement of `HTilde^t(Ω)` as a preimage**: for a linear isometry `e` of +`H^t(V)` onto `H^{t'}(V)` whose values are the distributions `J_t (J_t U)`, `HTilde^t(Ω)^⊥` is the preimage under `e` of the elements of `H^{t'}(V)` vanishing on `Ω` (`Rd.mem_orthogonal_tildeSpace_iff_toLp`). The hypothesis determines `e`, and such an `e` exists only for `t' = -t`; the lemma is stated with `t'` free so that it applies to both @@ -341,9 +343,10 @@ theorem orthogonal_tildeSpace_eq_comap {t t' : ℝ} (e : H^{t}(V) ≃ₗᵢ[ℂ] rw [mem_orthogonal_tildeSpace_iff_toLp, Submodule.mem_comap, mem_vanishOn_iff] simp only [LinearEquiv.coe_coe, LinearIsometryEquiv.coe_toLinearEquiv, he] -/-- **The image of `H̃^t(Ω)`**: for `e` as in `Rd.orthogonal_tildeSpace_eq_comap`, `e(H̃^t(Ω))` +/-- **The image of `HTilde^t(Ω)`**: for `e` as in `Rd.orthogonal_tildeSpace_eq_comap`, +`e(HTilde^t(Ω))` is `H^{t'}(Ω)`, the orthogonal complement of the elements of `H^{t'}(V)` vanishing on `Ω`. Since -`H̃^t(Ω)` is closed it is its double orthogonal complement, and `e` maps orthogonal complements +`HTilde^t(Ω)` is closed it is its double orthogonal complement, and `e` maps orthogonal complements to orthogonal complements (Mathlib's `Submodule.map_orthogonal_equiv`). As there, `t'` is free only so that the lemma applies to both `Rd.besselShift s` and its inverse. -/ theorem map_tildeSpace_eq_orthogonal {t t' : ℝ} (e : H^{t}(V) ≃ₗᵢ[ℂ] H^{t'}(V)) @@ -358,21 +361,23 @@ theorem map_tildeSpace_eq_orthogonal {t t' : ℝ} (e : H^{t}(V) ≃ₗᵢ[ℂ] H rw [orthogonal_tildeSpace_eq_comap e he, Submodule.map_comap_eq_of_surjective e.toLinearEquiv.surjective] -/-- **The orthogonal complement of `H̃^s(Ω)`**: `U ∈ H^s(V)` is orthogonal to `H̃^s(Ω)` iff +/-- **The orthogonal complement of `HTilde^s(Ω)`**: `U ∈ H^s(V)` is orthogonal to `HTilde^s(Ω)` iff `J_{2s} U ∈ H^{-s}(V)` vanishes on `Ω`. -/ theorem mem_orthogonal_tildeSpace_iff (U : H^{s}(V)) : U ∈ (tildeSpace s Ω)ᗮ ↔ besselShift s U ∈ vanishOn (-s) Ω := by rw [orthogonal_tildeSpace_eq_comap (besselShift s) toDistr_besselShift_eq_besselPotential_toLp] rfl -/-- **`J_{2s}` maps `H̃^s(Ω)` onto `H^{-s}(Ω)`**: the image of `H̃^s(Ω)` under `besselShift s` is +/-- **`J_{2s}` maps `HTilde^s(Ω)` onto `H^{-s}(Ω)`**: the image of `HTilde^s(Ω)` under +`besselShift s` is the orthogonal complement of the elements of `H^{-s}(V)` vanishing on `Ω`. -/ theorem map_tildeSpace_besselShift : (tildeSpace s Ω).map ((besselShift (V := V) s).toLinearEquiv : H^{s}(V) →ₗ[ℂ] H^{-s}(V)) = (vanishOn (-s) Ω)ᗮ := map_tildeSpace_eq_orthogonal (besselShift s) toDistr_besselShift_eq_besselPotential_toLp -/-- **`J_{-2s}` maps `H̃^{-s}(Ω)` onto `H^s(Ω)`**: the image of `H̃^{-s}(Ω)` under the inverse of +/-- **`J_{-2s}` maps `HTilde^{-s}(Ω)` onto `H^s(Ω)`**: the image of `HTilde^{-s}(Ω)` under the +inverse of `besselShift s` is the orthogonal complement of the elements of `H^s(V)` vanishing on `Ω`. -/ theorem map_tildeSpace_besselShift_symm : (tildeSpace (-s) Ω).map @@ -380,9 +385,9 @@ theorem map_tildeSpace_besselShift_symm : (vanishOn s Ω)ᗮ := map_tildeSpace_eq_orthogonal (besselShift s).symm toDistr_besselShift_symm -/-- **Elements vanishing on `Ω` pair to zero with `H̃^s(Ω)`**: for `W ∈ H^{-s}(V)` vanishing on -`Ω` and `U ∈ H̃^s(Ω)`, `[W, U] = 0`. With `U' = (besselShift s)⁻¹ W`, `[W, U] = ⟪U', U⟫_{H^s}`, -and `U'` is orthogonal to `H̃^s(Ω)` (`Rd.mem_orthogonal_tildeSpace_iff`). -/ +/-- **Elements vanishing on `Ω` pair to zero with `HTilde^s(Ω)`**: for `W ∈ H^{-s}(V)` vanishing on +`Ω` and `U ∈ HTilde^s(Ω)`, `[W, U] = 0`. With `U' = (besselShift s)⁻¹ W`, `[W, U] = ⟪U', U⟫_{H^s}`, +and `U'` is orthogonal to `HTilde^s(Ω)` (`Rd.mem_orthogonal_tildeSpace_iff`). -/ theorem pairing_eq_zero_of_mem_vanishOn_left {W : H^{-s}(V)} (hW : W ∈ vanishOn (-s) Ω) {U : H^{s}(V)} (hU : U ∈ tildeSpace s Ω) : pairing s W U = 0 := by have h : (besselShift s).symm W ∈ (tildeSpace s Ω)ᗮ := by @@ -391,7 +396,8 @@ theorem pairing_eq_zero_of_mem_vanishOn_left {W : H^{-s}(V)} (hW : W ∈ vanishO rw [pairing, ← toLp_besselShift_symm W, inner_toLp_toLp] exact Submodule.inner_left_of_mem_orthogonal hU h -/-- **`H̃^{-s}(Ω)` pairs to zero with the elements vanishing on `Ω`**: for `W ∈ H̃^{-s}(Ω)` and +/-- **`HTilde^{-s}(Ω)` pairs to zero with the elements vanishing on `Ω`**: for `W ∈ +HTilde^{-s}(Ω)` and `U ∈ H^s(V)` vanishing on `Ω`, `[W, U] = 0`, since `(besselShift s)⁻¹ W` lies in the orthogonal complement of the elements vanishing on `Ω` (`Rd.map_tildeSpace_besselShift_symm`). -/ theorem pairing_eq_zero_of_mem_vanishOn_right {W : H^{-s}(V)} (hW : W ∈ tildeSpace (-s) Ω) @@ -402,11 +408,11 @@ theorem pairing_eq_zero_of_mem_vanishOn_right {W : H^{-s}(V)} (hW : W ∈ tildeS rw [pairing, ← toLp_besselShift_symm W, inner_toLp_toLp] exact Submodule.inner_left_of_mem_orthogonal hU h -/-! ### `H̃^s(Ω) ≅ H^{-s}(Ω)` -/ +/-! ### `HTilde^s(Ω) ≅ H^{-s}(Ω)` -/ variable (s Ω) in -/-- **`H̃^s(Ω) ≅ H^{-s}(Ω)` by `J_{2s}`**: for every open set `Ω` and every real `s`, -`besselShift s` restricts to an isometric isomorphism of `H̃^s(Ω)` onto `H^{-s}(Ω)` +/-- **`HTilde^s(Ω) ≅ H^{-s}(Ω)` by `J_{2s}`**: for every open set `Ω` and every real `s`, +`besselShift s` restricts to an isometric isomorphism of `HTilde^s(Ω)` onto `H^{-s}(Ω)` (`Rd.map_tildeSpace_besselShift`, Mathlib's `LinearIsometryEquiv.submoduleMap`). -/ noncomputable def tildeEquivRestriction : tildeSpace s Ω ≃ₗᵢ[ℂ] RestrictionSpace (-s) Ω := ((besselShift s).submoduleMap (tildeSpace s Ω)).trans @@ -418,9 +424,10 @@ theorem coe_tildeEquivRestriction_apply (U : tildeSpace s Ω) : rfl variable (s Ω) in -/-- **`H^s(Ω) ≅ H̃^{-s}(Ω)` by `J_{2s}`**: for every open set `Ω` and every real `s`, -`besselShift s` restricts to an isometric isomorphism of `H^s(Ω)` onto `H̃^{-s}(Ω)`, the inverse -of the restriction of `(besselShift s)⁻¹` to `H̃^{-s}(Ω)` (`Rd.map_tildeSpace_besselShift_symm`). -/ +/-- **`H^s(Ω) ≅ HTilde^{-s}(Ω)` by `J_{2s}`**: for every open set `Ω` and every real `s`, +`besselShift s` restricts to an isometric isomorphism of `H^s(Ω)` onto `HTilde^{-s}(Ω)`, the inverse +of the restriction of `(besselShift s)⁻¹` to `HTilde^{-s}(Ω)` +(`Rd.map_tildeSpace_besselShift_symm`). -/ noncomputable def restrictionEquivTilde : RestrictionSpace s Ω ≃ₗᵢ[ℂ] tildeSpace (-s) Ω := (((besselShift s).symm.submoduleMap (tildeSpace (-s) Ω)).trans (LinearIsometryEquiv.ofEq _ _ map_tildeSpace_besselShift_symm)).symm @@ -434,11 +441,11 @@ theorem coe_restrictionEquivTilde_apply (u : RestrictionSpace s Ω) : rw [LinearIsometryEquiv.symm_apply_apply] at h rw [h, LinearIsometryEquiv.apply_symm_apply] -/-! ### The dual of `H̃^s(Ω)` -/ +/-! ### The dual of `HTilde^s(Ω)` -/ variable (s Ω) in -/-- **The dual of `H̃^s(Ω)` is `H^{-s}(Ω)`**: for every open set `Ω` and every real `s`, every -bounded functional `ℓ` on `H̃^s(Ω)` is `U ↦ [W, U]` for exactly one `W ∈ H^{-s}(Ω)` +/-- **The dual of `HTilde^s(Ω)` is `H^{-s}(Ω)`**: for every open set `Ω` and every real `s`, every +bounded functional `ℓ` on `HTilde^s(Ω)` is `U ↦ [W, U]` for exactly one `W ∈ H^{-s}(Ω)` (`Rd.dualEquiv_apply`, `Rd.dualEquiv_eq_iff`), with `‖W‖ = ‖ℓ‖`, and every extension of `W` to `V` gives the same pairing (`Rd.dualEquiv_apply_of_restrictProj_eq`); this is Theorem 3.3 of Chandler-Wilde, Hewett and Moiola with the sesquilinear pairing. The map `ℓ ↦ W` is Riesz's @@ -448,7 +455,7 @@ noncomputable def dualEquiv : StrongDual ℂ (tildeSpace s Ω) ≃ₗᵢ⋆[ℂ] (InnerProductSpace.toDual ℂ (tildeSpace s Ω)).symm.trans (tildeEquivRestriction s Ω) /-- **`ℓ` is the pairing with `dualEquiv s Ω ℓ`**: `ℓ(U) = [W, U]` for `W = dualEquiv s Ω ℓ` and -every `U ∈ H̃^s(Ω)` (Mathlib's `InnerProductSpace.toDual_symm_apply`, +every `U ∈ HTilde^s(Ω)` (Mathlib's `InnerProductSpace.toDual_symm_apply`, `Rd.pairing_besselShift`). -/ theorem dualEquiv_apply (ℓ : StrongDual ℂ (tildeSpace s Ω)) (U : tildeSpace s Ω) : ℓ U = pairing s (dualEquiv s Ω ℓ : H^{-s}(V)) (U : H^{s}(V)) := by @@ -461,7 +468,7 @@ theorem dualEquiv_symm_apply (W : RestrictionSpace (-s) Ω) (U : tildeSpace s Ω rw [dualEquiv_apply, LinearIsometryEquiv.apply_symm_apply] /-- **Uniqueness of the representing element**: `dualEquiv s Ω ℓ = W` iff `ℓ(U) = [W, U]` for -every `U ∈ H̃^s(Ω)` (Mathlib's `LinearIsometryEquiv.eq_symm_apply`). -/ +every `U ∈ HTilde^s(Ω)` (Mathlib's `LinearIsometryEquiv.eq_symm_apply`). -/ theorem dualEquiv_eq_iff (ℓ : StrongDual ℂ (tildeSpace s Ω)) (W : RestrictionSpace (-s) Ω) : dualEquiv s Ω ℓ = W ↔ ∀ U : tildeSpace s Ω, ℓ U = pairing s (W : H^{-s}(V)) (U : H^{s}(V)) := by @@ -473,8 +480,8 @@ theorem norm_dualEquiv (ℓ : StrongDual ℂ (tildeSpace s Ω)) : ‖dualEquiv s LinearIsometryEquiv.norm_map _ _ /-- **Every extension represents `ℓ`**: if `W ∈ H^{-s}(V)` restricts to `dualEquiv s Ω ℓ`, then -`ℓ(U) = [W, U]` for every `U ∈ H̃^s(Ω)`. `W` and its restriction differ by an element vanishing -on `Ω` (`Rd.sub_restrictProj_mem`), which pairs to zero with `H̃^s(Ω)` +`ℓ(U) = [W, U]` for every `U ∈ HTilde^s(Ω)`. `W` and its restriction differ by an element vanishing +on `Ω` (`Rd.sub_restrictProj_mem`), which pairs to zero with `HTilde^s(Ω)` (`Rd.pairing_eq_zero_of_mem_vanishOn_left`). -/ theorem dualEquiv_apply_of_restrictProj_eq (ℓ : StrongDual ℂ (tildeSpace s Ω)) (U : tildeSpace s Ω) {W : H^{-s}(V)} (hW : restrictProj (-s) Ω W = dualEquiv s Ω ℓ) : @@ -486,8 +493,8 @@ theorem dualEquiv_apply_of_restrictProj_eq (ℓ : StrongDual ℂ (tildeSpace s /-! ### The duals of `H^s(Ω)` and `H^1_0(Ω)` -/ variable (s Ω) in -/-- **The dual of `H^s(Ω)` is `H̃^{-s}(Ω)`**: for every open set `Ω` and every real `s`, every -bounded functional `ℓ` on `H^s(Ω)` is `u ↦ [W, u]` for exactly one `W ∈ H̃^{-s}(Ω)` +/-- **The dual of `H^s(Ω)` is `HTilde^{-s}(Ω)`**: for every open set `Ω` and every real `s`, every +bounded functional `ℓ` on `H^s(Ω)` is `u ↦ [W, u]` for exactly one `W ∈ HTilde^{-s}(Ω)` (`Rd.dualRestrictionEquiv_apply`, `Rd.dualRestrictionEquiv_eq_iff`), with `‖W‖ = ‖ℓ‖`, and `ℓ(U|_Ω) = [W, U]` for every `U ∈ H^s(V)` (`Rd.dualRestrictionEquiv_apply_restrictProj`): Riesz's representation followed by `Rd.restrictionEquivTilde`, conjugate-linear and isometric. -/ @@ -503,7 +510,7 @@ theorem dualRestrictionEquiv_apply (ℓ : StrongDual ℂ (RestrictionSpace s Ω) rw [← InnerProductSpace.toDual_symm_apply, Submodule.coe_inner, dualRestrictionEquiv, LinearIsometryEquiv.trans_apply, coe_restrictionEquivTilde_apply, pairing_besselShift] -/-- The functional of `W ∈ H̃^{-s}(Ω)` is `u ↦ [W, u]`. -/ +/-- The functional of `W ∈ HTilde^{-s}(Ω)` is `u ↦ [W, u]`. -/ theorem dualRestrictionEquiv_symm_apply (W : tildeSpace (-s) Ω) (u : RestrictionSpace s Ω) : (dualRestrictionEquiv s Ω).symm W u = pairing s (W : H^{-s}(V)) (u : H^{s}(V)) := by rw [dualRestrictionEquiv_apply, LinearIsometryEquiv.apply_symm_apply] @@ -519,7 +526,7 @@ theorem dualRestrictionEquiv_eq_iff (ℓ : StrongDual ℂ (RestrictionSpace s Ω /-- **The pairing with every extension**: `ℓ(U|_Ω) = [W, U]` for `W = dualRestrictionEquiv s Ω ℓ` and every `U ∈ H^s(V)`. `U` and its restriction differ by an element vanishing on `Ω` -(`Rd.sub_restrictProj_mem`), which pairs to zero with `H̃^{-s}(Ω)` +(`Rd.sub_restrictProj_mem`), which pairs to zero with `HTilde^{-s}(Ω)` (`Rd.pairing_eq_zero_of_mem_vanishOn_right`). -/ theorem dualRestrictionEquiv_apply_restrictProj (ℓ : StrongDual ℂ (RestrictionSpace s Ω)) (U : H^{s}(V)) : @@ -532,7 +539,7 @@ theorem dualRestrictionEquiv_apply_restrictProj (ℓ : StrongDual ℂ (Restricti variable (Ω) in /-- **The dual of `H^1_0(Ω)` is `H^{-1}(Ω)`**: for every open set `Ω`, every bounded functional `ℓ` on `H^1_0(Ω)` is `u ↦ [W, u]` for exactly one `W ∈ H^{-1}(Ω)` (`Rd.dualZeroBoundaryEquiv_apply`, -`Rd.dualZeroBoundaryEquiv_eq_iff`), with `‖W‖ = ‖ℓ‖`. Inside `H^1(V)`, `H^1_0(Ω)` is `H̃^1(Ω)` +`Rd.dualZeroBoundaryEquiv_eq_iff`), with `‖W‖ = ‖ℓ‖`. Inside `H^1(V)`, `H^1_0(Ω)` is `HTilde^1(Ω)` (`Rd.coe_tildeEquivZeroBoundary_symm_apply`), so `W` is paired with `u` itself. -/ noncomputable def dualZeroBoundaryEquiv : StrongDual ℂ (zeroBoundarySpace 1 Ω) ≃ₗᵢ⋆[ℂ] RestrictionSpace (-1) Ω := diff --git a/LeanPool/FunctionSpaces/Domains/Sobolev/SobolevRestrictionSpaces.lean b/LeanPool/FunctionSpaces/Domains/Sobolev/SobolevRestrictionSpaces.lean index e8a487e2c1..c3a8932209 100644 --- a/LeanPool/FunctionSpaces/Domains/Sobolev/SobolevRestrictionSpaces.lean +++ b/LeanPool/FunctionSpaces/Domains/Sobolev/SobolevRestrictionSpaces.lean @@ -50,15 +50,16 @@ and McLean (Chapter 3), and are Hilbert spaces as well. * **Differences in `H^1(V)`**: `‖Δ_v ι U‖_2 ≤ 2π ‖v‖ ‖U‖` (`Rd.norm_fwdDiffL2_toL2_le`), first for Schwartz functions, then by density; hence `ω_r(ι U, 2^(-k))_2 ≤ 2^(r-1) 2π 2^(-k) ‖U‖` for `r ≥ 1` (`Rd.lpModulus_toL2_le`). -* **`H̃^s(Ω)` and `H^s_0(Ω)`**: every test function of `Ω` lies in every `H^s(V)` (`Rd.ofTest`), +* **`HTilde^s(Ω)` and `H^s_0(Ω)`**: every test function of `Ω` lies in every `H^s(V)` (`Rd.ofTest`), and every Schwartz function with compact support in `Ω` lies in the span of the test functions (`Rd.ofSchwartz_mem_testSpan`). `Rd.tildeSpace s Ω` is the closure of the test functions of `Ω` in `H^s(V)`, `Rd.zeroBoundarySpace s Ω` the closure of their restrictions in `H^s(Ω)`. For `s = 1` and every - open `Ω`, restriction is an isometry of `H̃^1(Ω)` onto `H^1_0(Ω)` (`Rd.tildeEquivZeroBoundary`), + open `Ω`, restriction is an isometry of `HTilde^1(Ω)` onto `H^1_0(Ω)` + (`Rd.tildeEquivZeroBoundary`), and inside `H^1(V)` the two are the same subspace (`Rd.tildeSpace_one_le_orthogonal`, - `Rd.coe_tildeEquivZeroBoundary_symm_apply`); the elements of `H̃^1(Ω)` vanish outside `Ω` - (`Rd.toL2_ae_eq_zero_of_mem_tildeSpace`). On the whole space, `H̃^s(V) = H^s(V)` + `Rd.coe_tildeEquivZeroBoundary_symm_apply`); the elements of `HTilde^1(Ω)` vanish outside `Ω` + (`Rd.toL2_ae_eq_zero_of_mem_tildeSpace`). On the whole space, `HTilde^s(V) = H^s(V)` (`Rd.tildeSpace_top`). -/ @@ -486,7 +487,7 @@ theorem weakDeriv_ae_zero_of_mem_vanishOn {W : H^{1}(V)} (hW : W ∈ vanishOn 1 g =ᵐ[volume.restrict (Ω : Set V)] 0 := hg.ae_eq_zero_of_ae_eq_zero le_top ((mem_vanishOn_one_iff W).1 hW) -/-! ### Test functions, `H̃^s(Ω)` and `H^s_0(Ω)` -/ +/-! ### Test functions, `HTilde^s(Ω)` and `H^s_0(Ω)` -/ variable (s) in /-- **A test function as an element of `H^s(V)`**: a real test function `φ` of `Ω`, as the @@ -516,17 +517,17 @@ noncomputable def testSpan : Submodule ℂ H^{s}(V) := Submodule.span ℂ (Set.range (ofTest s : 𝓓(Ω, ℝ) → H^{s}(V))) variable (s Ω) in -/-- **The space `H̃^s(Ω)`** of Chandler-Wilde, Hewett and Moiola: the closure in `H^s(V)` of the +/-- **The space `HTilde^s(Ω)`** of Chandler-Wilde, Hewett and Moiola: the closure in `H^s(V)` of the test functions of `Ω`, a Hilbert space. -/ noncomputable def tildeSpace : Submodule ℂ H^{s}(V) := (testSpan s Ω).topologicalClosure variable (s Ω) in -/-- `H̃^s(Ω)` is closed in `H^s(V)`. -/ +/-- `HTilde^s(Ω)` is closed in `H^s(V)`. -/ theorem isClosed_tildeSpace : IsClosed (tildeSpace s Ω : Set H^{s}(V)) := Submodule.isClosed_topologicalClosure _ -/-- `H̃^s(Ω)` is complete, as a closed subspace of `H^s(V)`. -/ +/-- `HTilde^s(Ω)` is complete, as a closed subspace of `H^s(V)`. -/ instance completeSpace_tildeSpace (s : ℝ) (Ω : Opens V) : CompleteSpace (tildeSpace s Ω) := (isClosed_tildeSpace s Ω).completeSpace_coe @@ -624,7 +625,8 @@ theorem ofSchwartz_mem_testSpan {w : 𝓢(V, ℂ)} (hw : HasCompactSupport w) ((testSpan s Ω).smul_mem _ (Submodule.subset_span ⟨b, rfl⟩)) variable (s) in -/-- **`H̃^s(V) = H^s(V)`**: on the whole space, the test functions are dense in `H^s(V)` for every +/-- **`HTilde^s(V) = H^s(V)`**: on the whole space, the test functions are dense in `H^s(V)` for +every real `s`, since the compactly supported Schwartz functions are dense (`Rd.dense_ofSchwartz_hasCompactSupport`) and lie in the span of the test functions (`Rd.ofSchwartz_mem_testSpan`). -/ @@ -699,12 +701,12 @@ instance completeSpace_zeroBoundarySpace (s : ℝ) (Ω : Opens V) : (isClosed_zeroBoundarySpace s Ω).completeSpace_coe variable (s Ω) in -/-- **From `H̃^s(Ω)` to `H^s(Ω)`**: the restriction of the elements of `H̃^s(Ω)` to `Ω`, an +/-- **From `HTilde^s(Ω)` to `H^s(Ω)`**: the restriction of the elements of `HTilde^s(Ω)` to `Ω`, an operator of norm at most `1` with values in `H^s_0(Ω)` (`Rd.range_tildeToRestrictionL_le`). -/ noncomputable def tildeToRestrictionL : tildeSpace s Ω →L[ℂ] RestrictionSpace s Ω := restrictProj s Ω ∘L (tildeSpace s Ω).subtypeL -/-- The restriction maps `H̃^s(Ω)` into `H^s_0(Ω)`, by continuity of the restriction (Mathlib's +/-- The restriction maps `HTilde^s(Ω)` into `H^s_0(Ω)`, by continuity of the restriction (Mathlib's `map_mem_closure`). -/ theorem range_tildeToRestrictionL_le : (tildeToRestrictionL s Ω).range ≤ zeroBoundarySpace s Ω := by @@ -716,7 +718,7 @@ theorem range_tildeToRestrictionL_le : rw [← SetLike.mem_coe, zeroBoundarySpace, Submodule.topologicalClosure_coe] exact map_mem_closure (restrictProj s Ω).continuous hU fun W hW => Submodule.mem_map_of_mem hW -/-- `H^s_0(Ω)` is the closure of the image of `H̃^s(Ω)` under the restriction. -/ +/-- `H^s_0(Ω)` is the closure of the image of `HTilde^s(Ω)` under the restriction. -/ theorem closure_range_tildeToRestrictionL : (tildeToRestrictionL s Ω).range.topologicalClosure = zeroBoundarySpace s Ω := by refine le_antisymm (Submodule.topologicalClosure_minimal _ range_tildeToRestrictionL_le @@ -762,7 +764,8 @@ theorem exists_opens_toL2_ae_eq_zero {U : H^{1}(V)} (hU : U ∈ testSpan 1 Ω) : rw [hx] exact image_eq_zero_of_notMem_tsupport hxO -/-- **The elements of `H̃^1(Ω)` vanish outside `Ω`**: for every open `Ω` and `U ∈ H̃^1(Ω)`, the +/-- **The elements of `HTilde^1(Ω)` vanish outside `Ω`**: for every open `Ω` and `U ∈ +HTilde^1(Ω)`, the `L_2` function of `U` vanishes almost everywhere outside `Ω`. The `U` with this property form the kernel of `U ↦ (ι U)|_{V \ Ω}`, a closed subspace containing the test functions of `Ω` (`Rd.exists_opens_toL2_ae_eq_zero`). -/ @@ -843,7 +846,8 @@ theorem norm_restrictProj_of_mem_testSpan {U : H^{1}(V)} (hU : U ∈ testSpan 1 rw [h] exact norm_le_norm_add_of_mem_testSpan hU hW -/-- **Restriction is isometric on `H̃^1(Ω)`**: for `U ∈ H̃^1(Ω)`, `‖U|_Ω‖ = ‖U‖`, by continuity +/-- **Restriction is isometric on `HTilde^1(Ω)`**: for `U ∈ HTilde^1(Ω)`, `‖U|_Ω‖ = ‖U‖`, by +continuity from the test functions (`Rd.norm_restrictProj_of_mem_testSpan`). -/ theorem norm_restrictProj_of_mem_tildeSpace {U : H^{1}(V)} (hU : U ∈ tildeSpace 1 Ω) : ‖restrictProj 1 Ω U‖ = ‖U‖ := by @@ -854,9 +858,9 @@ theorem norm_restrictProj_of_mem_tildeSpace {U : H^{1}(V)} (hU : U ∈ tildeSpac exact hU variable (Ω) in -/-- **Restriction as an isometry of `H̃^1(Ω)` into `H^1(Ω)`**: for every open set `Ω`, the -restriction `H̃^1(Ω) → H^1(Ω)` as a linear isometry (`Rd.norm_restrictProj_of_mem_tildeSpace`), -the case `s = 1` of `H̃^s(Ω) = H^s_0(Ω)`. -/ +/-- **Restriction as an isometry of `HTilde^1(Ω)` into `H^1(Ω)`**: for every open set `Ω`, the +restriction `HTilde^1(Ω) → H^1(Ω)` as a linear isometry (`Rd.norm_restrictProj_of_mem_tildeSpace`), +the case `s = 1` of `HTilde^s(Ω) = H^s_0(Ω)`. -/ noncomputable def tildeToRestriction : tildeSpace 1 Ω →ₗᵢ[ℂ] RestrictionSpace 1 Ω where toLinearMap := (tildeToRestrictionL 1 Ω).toLinearMap norm_map' U := norm_restrictProj_of_mem_tildeSpace U.2 @@ -866,8 +870,8 @@ theorem tildeToRestriction_apply (U : tildeSpace 1 Ω) : tildeToRestriction Ω U = restrictProj 1 Ω U := rfl -/-- **The image of `H̃^1(Ω)` is `H^1_0(Ω)`**: the range of the isometry `tildeToRestriction` is -closed, since `H̃^1(Ω)` is complete (Mathlib's `Isometry.isClosedEmbedding`), and its closure is +/-- **The image of `HTilde^1(Ω)` is `H^1_0(Ω)`**: the range of the isometry `tildeToRestriction` is +closed, since `HTilde^1(Ω)` is complete (Mathlib's `Isometry.isClosedEmbedding`), and its closure is `H^1_0(Ω)` (`Rd.closure_range_tildeToRestrictionL`). -/ theorem range_tildeToRestriction : (tildeToRestriction Ω).toLinearMap.range = zeroBoundarySpace 1 Ω := by @@ -877,10 +881,10 @@ theorem range_tildeToRestriction : exact (IsClosed.submodule_topologicalClosure_eq hc).symm variable (Ω) in -/-- **`H̃^1(Ω) ≅ H^1_0(Ω)` isometrically, for every open set `Ω`**: the identity -`H̃^s(Ω) = H^s_0(Ω)` at `s = 1`, with equal norms. McLean (Theorem 3.33) proves -`H̃^s(Ω) = H^s_0(Ω)` on Lipschitz domains for `s ≥ 0` with `s - 1/2 ∉ ℤ`, in particular for -`s = 1`, up to equivalence of norms; for `s = 1` restriction is an isometry of `H̃^1(Ω)` onto +/-- **`HTilde^1(Ω) ≅ H^1_0(Ω)` isometrically, for every open set `Ω`**: the identity +`HTilde^s(Ω) = H^s_0(Ω)` at `s = 1`, with equal norms. McLean (Theorem 3.33) proves +`HTilde^s(Ω) = H^s_0(Ω)` on Lipschitz domains for `s ≥ 0` with `s - 1/2 ∉ ℤ`, in particular for +`s = 1`, up to equivalence of norms; for `s = 1` restriction is an isometry of `HTilde^1(Ω)` onto `H^1_0(Ω)` for every open `Ω` (`Rd.tildeToRestriction`, `Rd.range_tildeToRestriction`, Mathlib's `LinearIsometry.equivRange`). -/ noncomputable def tildeEquivZeroBoundary : tildeSpace 1 Ω ≃ₗᵢ[ℂ] zeroBoundarySpace 1 Ω := @@ -891,16 +895,16 @@ theorem coe_tildeEquivZeroBoundary_apply (U : tildeSpace 1 Ω) : (tildeEquivZeroBoundary Ω U : RestrictionSpace 1 Ω) = restrictProj 1 Ω U := rfl -/-- **`H̃^1(Ω)` lies in `H^1(Ω)`**: every element of `H̃^1(Ω)` is orthogonal to the elements +/-- **`HTilde^1(Ω)` lies in `H^1(Ω)`**: every element of `HTilde^1(Ω)` is orthogonal to the elements vanishing on `Ω`. Restriction is the orthogonal projection onto `H^1(Ω)` and keeps the norm of -`U ∈ H̃^1(Ω)` (`Rd.norm_restrictProj_of_mem_tildeSpace`), and a vector whose orthogonal +`U ∈ HTilde^1(Ω)` (`Rd.norm_restrictProj_of_mem_tildeSpace`), and a vector whose orthogonal projection has the same norm lies in the subspace (Mathlib's `Submodule.mem_iff_norm_starProjection`). -/ theorem tildeSpace_one_le_orthogonal : tildeSpace 1 Ω ≤ (vanishOn 1 Ω)ᗮ := fun U hU => ((vanishOn 1 Ω)ᗮ.mem_iff_norm_starProjection U).2 (norm_restrictProj_of_mem_tildeSpace hU) -/-- **The element of `H̃^1(Ω)` with restriction `u ∈ H^1_0(Ω)` is `u` itself**: inside `H^1(V)`, -`H̃^1(Ω)` and `H^1_0(Ω)` are the same subspace, and the inverse of `Rd.tildeEquivZeroBoundary` +/-- **The element of `HTilde^1(Ω)` with restriction `u ∈ H^1_0(Ω)` is `u` itself**: inside `H^1(V)`, +`HTilde^1(Ω)` and `H^1_0(Ω)` are the same subspace, and the inverse of `Rd.tildeEquivZeroBoundary` is the identity (`Rd.tildeSpace_one_le_orthogonal`, `Rd.restrictProj_coe`). -/ theorem coe_tildeEquivZeroBoundary_symm_apply (u : zeroBoundarySpace 1 Ω) : (((tildeEquivZeroBoundary Ω).symm u : tildeSpace 1 Ω) : H^{1}(V)) = diff --git a/LeanPool/FunctionSpaces/Domains/Spectral/ChartFormEigenbasis.lean b/LeanPool/FunctionSpaces/Domains/Spectral/ChartFormEigenbasis.lean index e48fa6f2bb..39010a4bf3 100644 --- a/LeanPool/FunctionSpaces/Domains/Spectral/ChartFormEigenbasis.lean +++ b/LeanPool/FunctionSpaces/Domains/Spectral/ChartFormEigenbasis.lean @@ -98,16 +98,21 @@ variable (μ) in a bounded linear operator from the chart Sobolev space to `L_2(D_k) × L_2(D_k)^n`. -/ noncomputable def toNeumannValueGradient (k : Fin A.n) : A.chartSobolev μ →L[ℂ] Rd.ValueGradientL2 (A.pieceDomain k).toOpens := - (WithLp.prodContinuousLinearEquiv 2 ℂ _ _).symm.toContinuousLinearMap ∘L - ((LpToLpRestrictCLM E ℂ ℂ volume 2 ((A.pieceDomain k).toOpens : Set E) ∘L - A.pieceCLM μ Rd.two_ne_top k ∘L A.chartSobolevEmbedding μ).prod - ((PiLp.continuousLinearEquiv 2 ℂ _).symm.toContinuousLinearMap ∘L - ContinuousLinearMap.pi fun j : Fin (finrank ℝ E) => - Rd.restrictSubsetLp (A.pieceDomain k).toOpens.isOpen.measurableSet - (A.pieceDomain_subset_interior k) ∘L - PiLp.proj 2 (𝕜 := ℂ) (fun _ : Fin A.n × Fin (finrank ℝ E) => - Lp ℂ 2 (volume.restrict (interior (range I)))) (k, j) ∘L - WithLp.sndL 2 ℂ _ _ ∘L (A.chartSobolev μ).subtypeL)) + let domain := (A.pieceDomain k).toOpens + let domainMeasure := volume.restrict (domain : Set E) + let value : A.chartSobolev μ →L[ℂ] Lp ℂ 2 domainMeasure := + LpToLpRestrictCLM E ℂ ℂ volume 2 (domain : Set E) ∘L + A.pieceCLM μ Rd.two_ne_top k ∘L A.chartSobolevEmbedding μ + let coordinate (j : Fin (finrank ℝ E)) : A.chartSobolev μ →L[ℂ] Lp ℂ 2 domainMeasure := + Rd.restrictSubsetLp domain.isOpen.measurableSet (A.pieceDomain_subset_interior k) ∘L + PiLp.proj 2 (𝕜 := ℂ) (fun _ : Fin A.n × Fin (finrank ℝ E) => + Lp ℂ 2 (volume.restrict (interior (range I)))) (k, j) ∘L + WithLp.sndL 2 ℂ _ _ ∘L (A.chartSobolev μ).subtypeL + let gradient : A.chartSobolev μ →L[ℂ] PiLp 2 + (fun _ : Fin (finrank ℝ E) => Lp ℂ 2 domainMeasure) := + (PiLp.continuousLinearEquiv 2 ℂ _).symm.toContinuousLinearMap ∘L + ContinuousLinearMap.pi coordinate + (WithLp.prodContinuousLinearEquiv 2 ℂ _ _).symm.toContinuousLinearMap ∘L value.prod gradient /-- The jets of the `k`-th piece on `D_k` lie in the Neumann space of `D_k`: weak derivatives on `O_I` are weak derivatives on `D_k ⊆ O_I` (`Rd.HasWeakLineDeriv.mono`). -/ @@ -224,7 +229,10 @@ is a Besov domain in dimension `n ≥ 1` (`Manifold.BesovAtlas.isCompactOperator_chartSobolevEmbedding`, `Manifold.BesovAtlas.chartSobolevEmbedding_injective`, `Manifold.BesovAtlas.denseRange_chartSobolevEmbedding`). -/ -noncomputable def chartCompactEmbedding : CompactDenseEmbedding (A.chartSobolev μ) (Lp ℂ 2 μ) where +noncomputable def chartCompactEmbedding : + @CompactDenseEmbedding (A.chartSobolev μ) (Lp ℂ 2 μ) + (Submodule.normedAddCommGroup (A.chartSobolev μ)) + (Submodule.innerProductSpace (A.chartSobolev μ)) inferInstance inferInstance where toCLM := A.chartSobolevEmbedding μ isCompact := A.isCompactOperator_chartSobolevEmbedding injective := A.chartSobolevEmbedding_injective diff --git a/LeanPool/FunctionSpaces/Domains/Spectral/DirichletEigenbasis.lean b/LeanPool/FunctionSpaces/Domains/Spectral/DirichletEigenbasis.lean index df654e94fa..866210b3ff 100644 --- a/LeanPool/FunctionSpaces/Domains/Spectral/DirichletEigenbasis.lean +++ b/LeanPool/FunctionSpaces/Domains/Spectral/DirichletEigenbasis.lean @@ -138,7 +138,7 @@ theorem isCompactOperator_dirichletEmbedding (hΩ : Bornology.IsBounded (Ω : Se (isCompactOperator_restrictL2 hΩ).comp_clm _ /-- The elements of `H^1_0(Ω)` vanish outside `Ω`: inside `H^1(V)` they are elements of -`H̃^1(Ω)` (`Rd.coe_tildeEquivZeroBoundary_symm_apply`), whose `L_2` functions vanish almost +`HTilde^1(Ω)` (`Rd.coe_tildeEquivZeroBoundary_symm_apply`), whose `L_2` functions vanish almost everywhere outside `Ω` (`Rd.toL2_ae_eq_zero_of_mem_tildeSpace`). -/ theorem toL2_ae_eq_zero_of_mem_zeroBoundarySpace (u : zeroBoundarySpace 1 Ω) : ∀ᵐ x ∂volume, x ∉ (Ω : Set V) → toL2 ((u : RestrictionSpace 1 Ω) : H^{1}(V)) x = 0 := by diff --git a/LeanPool/FunctionSpaces/Domains/Spectral/NeumannEigenbasis.lean b/LeanPool/FunctionSpaces/Domains/Spectral/NeumannEigenbasis.lean index aab0d2cd91..603ed55955 100644 --- a/LeanPool/FunctionSpaces/Domains/Spectral/NeumannEigenbasis.lean +++ b/LeanPool/FunctionSpaces/Domains/Spectral/NeumannEigenbasis.lean @@ -388,8 +388,10 @@ theorem isCompactOperator_neumannEmbedding : IsCompactOperator (neumannEmbedding dimension `n ≥ 1` (`Rd.BoundedLipschitzDomain.isCompactOperator_neumannEmbedding`, `Rd.neumannEmbedding_injective`, `Rd.denseRange_neumannEmbedding`). -/ noncomputable def neumannCompactEmbedding : - CompactDenseEmbedding (neumannSpace Ω.toOpens) - (Lp ℂ 2 (volume.restrict (Ω.toOpens : Set V))) where + @CompactDenseEmbedding (neumannSpace Ω.toOpens) + (Lp ℂ 2 (volume.restrict (Ω.toOpens : Set V))) + (Submodule.normedAddCommGroup (neumannSpace Ω.toOpens)) + (Submodule.innerProductSpace (neumannSpace Ω.toOpens)) inferInstance inferInstance where toCLM := neumannEmbedding Ω.toOpens isCompact := Ω.isCompactOperator_neumannEmbedding injective := neumannEmbedding_injective diff --git a/LeanPool/FunctionSpaces/Domains/Traces/GraphTraceExtension.lean b/LeanPool/FunctionSpaces/Domains/Traces/GraphTraceExtension.lean index 6a6202f2b8..37d2f6ada7 100644 --- a/LeanPool/FunctionSpaces/Domains/Traces/GraphTraceExtension.lean +++ b/LeanPool/FunctionSpaces/Domains/Traces/GraphTraceExtension.lean @@ -200,8 +200,9 @@ noncomputable def extendCenter (j : ℕ) (c' : Ω.hyperplane) : V := theorem proj_extendCenter (j : ℕ) (c' : Ω.hyperplane) : Ω.proj (Ω.extendCenter j c') = c' := by rw [extendCenter, map_add, map_smul, Ω.proj_e, smul_zero, add_zero, Ω.proj_coe] -/-- **The support of extended atoms**: if `a = 0` outside `B̄(c', d 2^(-j))`, then `A = 0` outside -`B̄(c' + φ_j(c') e, (d (1 + M ‖ρ‖_1) + c + 1) 2^(-j))`. -/ +/-- **The support of extended atoms**: if `a = 0` outside `closedBall(c', d 2^(-j))`, then `A = +0` outside +`closedBall(c' + φ_j(c') e, (d (1 + M ‖ρ‖_1) + c + 1) 2^(-j))`. -/ theorem extendAtom_eq_zero (j : ℕ) {a : Ω.hyperplane → ℂ} {d : ℝ} {c' : Ω.hyperplane} (h0 : ∀ y, d / 2 ^ j < ‖y - c'‖ → a y = 0) {x : V} (hx : Ω.extendRadius d / 2 ^ j < ‖x - Ω.extendCenter j c'‖) : Ω.extendAtom j a x = 0 := by @@ -239,7 +240,8 @@ theorem extendAtom_eq_zero (j : ℕ) {a : Ω.hyperplane → ℂ} {d : ℝ} {c' : exact absurd hle (not_le.2 hx) /-- **Extended atoms are regular atoms** of order and exponent `2` on `V`: if `a` is continuous, -vanishes outside `B̄(c', d 2^(-j))` and `|Δ_h^l a| ≤ A_0 min(1, (2^j ‖h‖)^l)` for `l ≤ 2`, then +vanishes outside `closedBall(c', d 2^(-j))` and `|Δ_h^l a| ≤ A_0 min(1, (2^j ‖h‖)^l)` for `l ≤ +2`, then `A = (a ∘ P) v_j` is a regular atom of level `j` with centre `c' + φ_j(c') e`. -/ theorem isRegularAtom_extendAtom {p : ℝ≥0∞} (j : ℕ) {a : Ω.hyperplane → ℂ} (hac : Continuous a) {d : ℝ} (hd : 0 ≤ d) {c' : Ω.hyperplane} (h0 : ∀ y, d / 2 ^ j < ‖y - c'‖ → a y = 0) diff --git a/LeanPool/FunctionSpaces/Domains/Traces/MollifiedGraph.lean b/LeanPool/FunctionSpaces/Domains/Traces/MollifiedGraph.lean index 003294b00c..a8d2141449 100644 --- a/LeanPool/FunctionSpaces/Domains/Traces/MollifiedGraph.lean +++ b/LeanPool/FunctionSpaces/Domains/Traces/MollifiedGraph.lean @@ -100,7 +100,7 @@ theorem norm_conv_sub_conv_le {K u : W → ℂ} (hK : Integrable K) {M : ℝ} ring /-- **Convolution moves Lipschitz functions little**: for `∫ K = 1` and `K = 0` outside -`B̄(0, R)`, `‖(K ⋆ u)(x) - u(x)‖ ≤ M R ‖K‖_1`. -/ +`closedBall(0, R)`, `‖(K ⋆ u)(x) - u(x)‖ ≤ M R ‖K‖_1`. -/ theorem norm_conv_sub_self_le {K u : W → ℂ} (hK : Integrable K) (h1 : ∫ z, K z = 1) {R : ℝ} (hKR : ∀ z, R < ‖z‖ → K z = 0) {M : ℝ} (hM : 0 ≤ M) (hu : ∀ x y, ‖u x - u y‖ ≤ M * ‖x - y‖) {x : W} (hint : Integrable (fun z => K z * u (x - z))) : @@ -122,7 +122,7 @@ theorem norm_conv_sub_self_le {K u : W → ℂ} (hK : Integrable K) (h1 : ∫ z, ring /-- **Second differences of convolutions with Lipschitz functions**: for `K = 0` outside -`B̄(0, R)`, `‖Δ_h^2 (K ⋆ u)(x)‖ ≤ M (R + 2‖h‖) ‖Δ_h^2 K‖_1`, since +`closedBall(0, R)`, `‖Δ_h^2 (K ⋆ u)(x)‖ ≤ M (R + 2‖h‖) ‖Δ_h^2 K‖_1`, since `Δ_h^2 (K ⋆ u) = (Δ_h^2 K) ⋆ u` and `∫ Δ_h^2 K = 0`. -/ theorem norm_higherDiff_two_conv_le {K u : W → ℂ} (hK : Integrable K) {R : ℝ} (hKR : ∀ z, R < ‖z‖ → K z = 0) {M : ℝ} (hM : 0 ≤ M) @@ -242,7 +242,7 @@ noncomputable def graphBumpDeriv : ℝ := (Ω.graphBump.derivNorm 2).toReal /-- `‖D^2 ρ‖_1 ≥ 0`. -/ theorem graphBumpDeriv_nonneg : 0 ≤ Ω.graphBumpDeriv := ENNReal.toReal_nonneg -/-- The mollifier vanishes outside `B̄(0, 2 · 2^(-j))`. -/ +/-- The mollifier vanishes outside `closedBall(0, 2 · 2^(-j))`. -/ theorem graphBump_scaled_eq_zero (j : ℕ) (z : Ω.hyperplane) (hz : 2 / 2 ^ j < ‖z‖) : Ω.graphBump.scaled 2 j z = 0 := Ω.graphBump.scaled_eq_zero_of_lt 2 j (by rw [graphBump_radius]; simpa using hz) diff --git a/LeanPool/FunctionSpaces/Domains/Traces/TraceKernel.lean b/LeanPool/FunctionSpaces/Domains/Traces/TraceKernel.lean index 13044eb5e5..008bdc48a3 100644 --- a/LeanPool/FunctionSpaces/Domains/Traces/TraceKernel.lean +++ b/LeanPool/FunctionSpaces/Domains/Traces/TraceKernel.lean @@ -19,19 +19,19 @@ Modified for Lean Pool: module names and imports adapted. Let `Ω` be a bounded Lipschitz domain with boundary `Γ` in a finite-dimensional real inner product space `V`, such as `ℝ^d`, with Lebesgue measure, `H^1(Ω)` the Hilbert space of restrictions of -`H^1(V)`, `H̃^1(Ω)` the closure of the test functions of `Ω` in `H^1(V)` and `H^1_0(Ω)` the +`H^1(V)`, `HTilde^1(Ω)` the closure of the test functions of `Ω` in `H^1(V)` and `H^1_0(Ω)` the closure of their restrictions in `H^1(Ω)`. * **Mollification in `H^1(V)`**: convergence of the `L_2` functions and of their weak derivatives gives convergence in `H^1(V)` (`Rd.tendsto_of_tendsto_toL2`), so the mollified `η_c ⋆ U` converge to `U` in `H^1(V)` as `c → ∞` (`Rd.tendsto_of_toL2_eq_convLp`). Mollifying a function that vanishes outside a compact set `S` gives Schwartz functions supported in - `supp η_c + S` (`Rd.exists_schwartz_eq_conv`), hence elements of `H̃^1(Ω)` when these sets lie + `supp η_c + S` (`Rd.exists_schwartz_eq_conv`), hence elements of `HTilde^1(Ω)` when these sets lie in `Ω` (`Rd.mem_tildeSpace_of_dilate`, `Rd.mem_tildeSpace_of_isCompact`); the mollifiers are normalised bump functions (`Rd.bumpMollifier`). -* **`H̃^1(Ω)` by supports**: for `U ∈ H^1(V)` vanishing outside an open set `Ω`, the zero +* **`HTilde^1(Ω)` by supports**: for `U ∈ H^1(V)` vanishing outside an open set `Ω`, the zero extension of `U|_Ω` is `U` (`Rd.indicatorLp_toL2_restrictProj`), and on a bounded Lipschitz - domain every `U ∈ H^1(V)` vanishing outside `Ω` lies in `H̃^1(Ω)` + domain every `U ∈ H^1(V)` vanishing outside `Ω` lies in `HTilde^1(Ω)` (`Rd.BoundedLipschitzDomain.mem_tildeSpace_iff`). The pieces of `U` near the boundary are pushed into `Ω` by a mollifier supported in the cone of the chart (`Rd.LipschitzGraph.coneMollifier`, @@ -39,11 +39,11 @@ closure of their restrictions in `H^1(Ω)`. * **`ker γ = H^1_0(Ω)`** (`Rd.BoundedLipschitzDomain.traceKer_eq_zeroBoundarySpace`, McLean, Theorem 3.40): `u ∈ H^1(Ω)` has zero trace iff its zero extension lies in `H^1(V)` (`Rd.BoundedLipschitzDomain.memSobolev_indicatorLp_iff_mem_traceKer`), iff the zero extension - lies in `H̃^1(Ω)`, iff `u ∈ H^1_0(Ω)`. + lies in `HTilde^1(Ω)`, iff `u ∈ H^1_0(Ω)`. * **The quotient and the duals**: `H^1(Ω) ⧸ H^1_0(Ω) ≅ H^{1/2}(Γ)` isometrically (`Rd.BoundedLipschitzDomain.quotientZeroBoundaryEquivTraceSpace`); its content is `ker γ = H^1_0(Ω)`, and the isometry holds by the definition of `H^{1/2}(Γ)` as the orthogonal - complement of `ker γ`. Further `H̃^1(Ω) ≅ ker γ` + complement of `ker γ`. Further `HTilde^1(Ω) ≅ ker γ` (`Rd.BoundedLipschitzDomain.tildeEquivTraceKer`) and `(ker γ)^* ≅ H^{-1}(Ω)` (`Rd.BoundedLipschitzDomain.dualTraceKerEquiv`). -/ @@ -121,9 +121,10 @@ theorem exists_schwartz_eq_conv {K f : V → ℂ} (hK : ContDiff ℝ ((⊤ : ℕ (add_subset_add (subset_tsupport K) (Function.support_subset_iff'.2 hfS))) (hKc.isCompact.add hS).isClosed⟩ -/-- **Mollified functions in `H̃^1(Ω)`**: let `Ω` be open, `U ∈ H^1(V)` vanishing almost everywhere +/-- **Mollified functions in `HTilde^1(Ω)`**: let `Ω` be open, `U ∈ H^1(V)` vanishing almost +everywhere outside a compact set `S`, and `η` a smooth function with compact support and `∫ η = 1`. If -`supp η_{2^n} + S ⊆ Ω` for all large `n`, then `U ∈ H̃^1(Ω)`: the functions `η_{2^n} ⋆ ι U` are +`supp η_{2^n} + S ⊆ Ω` for all large `n`, then `U ∈ HTilde^1(Ω)`: the functions `η_{2^n} ⋆ ι U` are Schwartz functions with compact support in `Ω` (`Rd.exists_schwartz_eq_conv`), hence in the span of the test functions (`Rd.ofSchwartz_mem_testSpan`), and they converge to `U` in `H^1(V)` (`Rd.tendsto_of_toL2_eq_convLp`). -/ @@ -158,9 +159,9 @@ theorem mem_tildeSpace_of_dilate {Ω : Opens V} {U : H^{1}(V)} {S : Set V} (hS : ofSchwartz_mem_testSpan 1 (hwc n) ((hws n).trans hn)) /-- **Mollified functions with compact support in `Ω`**: for an open set `Ω`, every `U ∈ H^1(V)` -vanishing almost everywhere outside a compact subset `S` of `Ω` lies in `H̃^1(Ω)`. Some +vanishing almost everywhere outside a compact subset `S` of `Ω` lies in `HTilde^1(Ω)`. Some thickening `S_δ` lies in `Ω` (Mathlib's `IsCompact.exists_thickening_subset_open`), and for the -mollifier of the standard bump `Rd.stdBumpBase`, supported in `B̄(0, 1)`, eventually +mollifier of the standard bump `Rd.stdBumpBase`, supported in `closedBall(0, 1)`, eventually `supp η_{2^n} + S ⊆ S_δ` (`Rd.eventually_tsupport_dilate_add_subset_thickening`, `Rd.mem_tildeSpace_of_dilate`). -/ theorem mem_tildeSpace_of_isCompact {Ω : Opens V} {U : H^{1}(V)} {S : Set V} (hS : IsCompact S) @@ -184,13 +185,15 @@ noncomputable def coneMollifierBase : ContDiffBump ((1 / 4 : ℝ) • Ω.e) := by have := Ω.coneRadius_pos; linarith⟩ /-- **The cone mollifier**: a smooth function with integral `1` and compact support in the open -cone `K` of the graph and in `B̄(0, 1/2)` (`Rd.LipschitzGraph.tsupport_coneMollifier_subset`), the +cone `K` of the graph and in `closedBall(0, 1/2)` +(`Rd.LipschitzGraph.tsupport_coneMollifier_subset`), the mollifier of the bump `Rd.LipschitzGraph.coneMollifierBase`. Convolution with its dilates moves the closure of the graph domain into the domain (`Rd.LipschitzGraph.add_mem_of_mem_closure`). -/ noncomputable def coneMollifier : V → ℂ := bumpMollifier Ω.coneMollifierBase -/-- The cone mollifier is supported in the open cone and in `B̄(0, 1/2)`: its closed support is -`B̄(e/4, ρ/2) ⊆ B(e/4, ρ) ⊆ K` (`Rd.LipschitzGraph.ball_subset_cone`), and +/-- The cone mollifier is supported in the open cone and in `closedBall(0, 1/2)`: its closed +support is +`closedBall(e/4, ρ/2) ⊆ B(e/4, ρ) ⊆ K` (`Rd.LipschitzGraph.ball_subset_cone`), and `‖e/4‖ + ρ/2 ≤ 1/2`. -/ theorem tsupport_coneMollifier_subset : tsupport Ω.coneMollifier ⊆ Ω.cone ∩ closedBall 0 (1 / 2) := by @@ -212,7 +215,7 @@ theorem tsupport_coneMollifier_subset : end LipschitzGraph -/-! ### `H̃^1(Ω)` by supports -/ +/-! ### `HTilde^1(Ω)` by supports -/ /-- **The zero extension of the restriction**: for an open `Ω` and `U ∈ H^1(V)` vanishing almost everywhere outside `Ω`, the zero extension of the `L_2` function of `U|_Ω ∈ H^1(Ω)` is `ι U`, since @@ -237,10 +240,11 @@ namespace BoundedLipschitzDomain variable (Ω : BoundedLipschitzDomain V) -/-- **The local lemma: chart pieces of functions vanishing outside `Ω` lie in `H̃^1(Ω)`**: let +/-- **The local lemma: chart pieces of functions vanishing outside `Ω` lie in `HTilde^1(Ω)`**: let `U ∈ H^1(V)` vanish almost everywhere outside `Ω`, and let `ζ` be a continuous bounded real function with closed support in the boundary ball `B_j`. Every `W ∈ H^1(V)` with `ι W = ζ ι U` -lies in `H̃^1(Ω)`. `W` vanishes outside the compact set `S = Ω̄_j ∩ supp ζ`, since `Ω ∩ B_j` is +lies in `HTilde^1(Ω)`. `W` vanishes outside the compact set `S = ΩBar_j ∩ supp ζ`, since `Ω ∩ +B_j` is the graph domain `Ω_j` inside `B_j`; the cone mollifier of the chart moves `S` into `Ω_j` (`Rd.LipschitzGraph.add_mem_of_mem_closure`, `Rd.LipschitzGraph.mem_cone_of_mem_tsupport_dilate`), and its small dilates keep it inside `B_j` @@ -307,12 +311,12 @@ theorem eq_sum_add_of_ae_eq_zero (ψ : Ω.BoundaryPartition) {χ : V → ℝ} · rw [map_add, map_sum, h5, Pi.add_apply, h6, h4, h2 hx] simp only [h3, h2 hx, mul_zero, Finset.sum_const_zero, add_zero] -/-- **Functions vanishing outside `Ω` lie in `H̃^1(Ω)`**: on a bounded Lipschitz domain, every +/-- **Functions vanishing outside `Ω` lie in `HTilde^1(Ω)`**: on a bounded Lipschitz domain, every `U ∈ H^1(V)` whose `L_2` function vanishes almost everywhere outside `Ω` lies in the closure of the test functions of `Ω`. With a resolution of unity `ψ` equal to one near `Γ` (`Rd.BoundedLipschitzDomain.exists_boundaryPartition_nhds`) and the interior cut-off `χ` (`Rd.BoundedLipschitzDomain.exists_interior_cutoff`), `U = ∑_j ψ_j U + χ U` -(`Rd.BoundedLipschitzDomain.eq_sum_add_of_ae_eq_zero`); the chart pieces lie in `H̃^1(Ω)` by the +(`Rd.BoundedLipschitzDomain.eq_sum_add_of_ae_eq_zero`); the chart pieces lie in `HTilde^1(Ω)` by the cone mollifiers (`Rd.BoundedLipschitzDomain.mem_tildeSpace_of_mulLp_chart`), the interior piece since it vanishes outside a compact subset of `Ω` (`Rd.mem_tildeSpace_of_isCompact`). -/ theorem mem_tildeSpace_of_ae_eq_zero {U : H^{1}(V)} @@ -331,11 +335,12 @@ theorem mem_tildeSpace_of_ae_eq_zero {U : H^{1}(V)} filter_upwards [mulLp_apply_ae hc hC (toL2 U)] with x hx hxS rw [hx, image_eq_zero_of_notMem_tsupport hxS, Complex.ofReal_zero, zero_mul] -/-- **`H̃^1(Ω)` is the space of `H^1(V)` functions vanishing outside `Ω`**: on a bounded Lipschitz -domain, `U ∈ H^1(V)` lies in `H̃^1(Ω)` iff its `L_2` function vanishes almost everywhere outside +/-- **`HTilde^1(Ω)` is the space of `H^1(V)` functions vanishing outside `Ω`**: on a bounded +Lipschitz +domain, `U ∈ H^1(V)` lies in `HTilde^1(Ω)` iff its `L_2` function vanishes almost everywhere outside `Ω` (`Rd.toL2_ae_eq_zero_of_mem_tildeSpace`, `Rd.BoundedLipschitzDomain.mem_tildeSpace_of_ae_eq_zero`). Since `Γ` is a null set -(`Rd.BoundedLipschitzDomain.volume_frontier`), this is `H̃^s(Ω) = H^s_{Ω̄}` of McLean +(`Rd.BoundedLipschitzDomain.volume_frontier`), this is `HTilde^s(Ω) = H^s_{ΩBar}` of McLean (Theorem 3.29) for `s = 1`. -/ theorem mem_tildeSpace_iff (U : H^{1}(V)) : U ∈ tildeSpace 1 Ω.toOpens ↔ ∀ᵐ x ∂volume, x ∉ Ω.carrier → toL2 U x = 0 := @@ -344,7 +349,7 @@ theorem mem_tildeSpace_iff (U : H^{1}(V)) : /-! ### `ker γ = H^1_0(Ω)` -/ /-- **`H^1_0(Ω) ⊆ ker γ`**: every element of `H^1_0(Ω)` is the restriction `U|_Ω` of some -`U ∈ H̃^1(Ω)` (`Rd.range_tildeToRestriction`); `U` vanishes outside `Ω` +`U ∈ HTilde^1(Ω)` (`Rd.range_tildeToRestriction`); `U` vanishes outside `Ω` (`Rd.toL2_ae_eq_zero_of_mem_tildeSpace`), so the zero extension of `U|_Ω` is `ι U ∈ W^1_2(V)` (`Rd.indicatorLp_toL2_restrictProj`), and its trace vanishes (`Rd.BoundedLipschitzDomain.memSobolev_indicatorLp_iff_mem_traceKer`). -/ @@ -361,7 +366,7 @@ theorem zeroBoundarySpace_le_traceKer : zeroBoundarySpace 1 Ω.toOpens ≤ Ω.tr /-- **`ker γ ⊆ H^1_0(Ω)`**: for `u` in the trace kernel, the zero extension `1_Ω ι u` is the `L_2` function of some `U ∈ H^1(V)` (`Rd.BoundedLipschitzDomain.memSobolev_indicatorLp_of_mem_traceKer`, -`Rd.exists_toL2_eq_of_memSobolev`). `U` vanishes outside `Ω`, so `U ∈ H̃^1(Ω)` +`Rd.exists_toL2_eq_of_memSobolev`). `U` vanishes outside `Ω`, so `U ∈ HTilde^1(Ω)` (`Rd.BoundedLipschitzDomain.mem_tildeSpace_of_ae_eq_zero`), and `u = U|_Ω` (`Rd.restrictProj_eq_of_ae_eq`) lies in `H^1_0(Ω)` (`Rd.range_tildeToRestriction`). -/ theorem traceKer_le_zeroBoundarySpace : Ω.traceKer ≤ zeroBoundarySpace 1 Ω.toOpens := by @@ -421,7 +426,7 @@ theorem quotientZeroBoundaryEquivTraceSpace_mk (u : Ω.SobolevOne) : Submodule.quotientEquivOrthogonal_mk _ _ hx] rfl -/-- **`H̃^1(Ω) ≅ ker γ` isometrically**: restriction is an isometry of `H̃^1(Ω)` onto +/-- **`HTilde^1(Ω) ≅ ker γ` isometrically**: restriction is an isometry of `HTilde^1(Ω)` onto `H^1_0(Ω) = ker γ` (`Rd.tildeEquivZeroBoundary`, `Rd.BoundedLipschitzDomain.traceKer_eq_zeroBoundarySpace`). -/ noncomputable def tildeEquivTraceKer : tildeSpace 1 Ω.toOpens ≃ₗᵢ[ℂ] Ω.traceKer := @@ -433,7 +438,7 @@ theorem coe_tildeEquivTraceKer_apply (U : tildeSpace 1 Ω.toOpens) : (Ω.tildeEquivTraceKer U : Ω.SobolevOne) = restrictProj 1 Ω.toOpens U := rfl -/-- **The element of `H̃^1(Ω)` with restriction `u ∈ ker γ` is `u` itself**, read in `H^1(V)` +/-- **The element of `HTilde^1(Ω)` with restriction `u ∈ ker γ` is `u` itself**, read in `H^1(V)` (`Rd.coe_tildeEquivZeroBoundary_symm_apply`). -/ theorem coe_tildeEquivTraceKer_symm_apply (u : Ω.traceKer) : ((Ω.tildeEquivTraceKer.symm u : tildeSpace 1 Ω.toOpens) : H^{1}(V)) = @@ -446,7 +451,7 @@ theorem coe_tildeEquivTraceKer_symm_apply (u : Ω.traceKer) : `u ↦ [W, u]` for exactly one `W ∈ H^{-1}(Ω)`, with `‖W‖ = ‖ℓ‖` (`Rd.BoundedLipschitzDomain.dualTraceKerEquiv_apply`, `Rd.BoundedLipschitzDomain.dualTraceKerEquiv_eq_iff`); Riesz on `ker γ`, the isometry -`Rd.BoundedLipschitzDomain.tildeEquivTraceKer` and the duality `H̃^1(Ω) ≅ H^{-1}(Ω)` +`Rd.BoundedLipschitzDomain.tildeEquivTraceKer` and the duality `HTilde^1(Ω) ≅ H^{-1}(Ω)` (`Rd.tildeEquivRestriction`), as for `Rd.dualZeroBoundaryEquiv`. -/ noncomputable def dualTraceKerEquiv : StrongDual ℂ Ω.traceKer ≃ₗᵢ⋆[ℂ] RestrictionSpace (-1) Ω.toOpens := diff --git a/LeanPool/FunctionSpaces/MeasureSpaces/Spectral/Blocks.lean b/LeanPool/FunctionSpaces/MeasureSpaces/Spectral/Blocks.lean index 54ecd59c78..eaf21b0436 100644 --- a/LeanPool/FunctionSpaces/MeasureSpaces/Spectral/Blocks.lean +++ b/LeanPool/FunctionSpaces/MeasureSpaces/Spectral/Blocks.lean @@ -110,7 +110,7 @@ theorem iUnion_span : (⋃ n, (S.span n : Set H)) = Submodule.span ℂ (Set.rang exact Set.mem_iUnion.2 this /-- The union of the approximants is dense. -/ -theorem closure_iUnion_toScheme [CompleteSpace H] : closure (⋃ n, S.toScheme n) = Set.univ := by +theorem closure_iUnion_toScheme : closure (⋃ n, S.toScheme n) = Set.univ := by have h : (⋃ n, S.toScheme n) = (Submodule.span ℂ (Set.range S.basis) : Set H) := S.iUnion_span rw [h, ← Submodule.topologicalClosure_coe, S.basis.dense_span, Submodule.top_coe] @@ -140,7 +140,7 @@ theorem enorm_block_sq (k : ℕ) (f : H) : /-- **Coefficient characterisation of `A^s_q`** for a spectral scheme in a Hilbert space: for `s > 0`, `f ∈ A^s_q` iff `‖P 1 f‖ + ‖(2^(ks) ‖Δ_k f‖)_k‖_q < ∞`, where `‖Δ_k f‖² = ∑_{2^k ≤ lvl i < 2^(k+1)} |⟨e_i, f⟩|²` (`enorm_block_sq`). -/ -theorem memApprox_iff_blockNorm_lt_top [CompleteSpace H] {s : ℝ} (hs : 0 < s) {q : ℝ≥0∞} +theorem memApprox_iff_blockNorm_lt_top {s : ℝ} (hs : 0 < s) {q : ℝ≥0∞} (hq : 1 ≤ q) {f : H} : S.toScheme.MemApprox s q f ↔ S.projectionScheme.blockNorm s q f < ∞ := S.projectionScheme.memApprox_iff_blockNorm_lt_top S.closure_iUnion_toScheme hs hq @@ -175,7 +175,7 @@ theorem tsum_ite_block_eq (s : ℝ) (m : ℕ) : /-- **`H^s = B^s_{2,2}`** for a spectral scheme: for `s > 0`, `f ∈ A^s_2` if and only if `∑_i (1 + lvl i)^(2s) |⟨e_i, f⟩|² < ∞`, i.e. `f` lies in the Sobolev space of order `s`. -/ -theorem memApprox_two_iff [CompleteSpace H] {s : ℝ} (hs : 0 < s) (f : H) : +theorem memApprox_two_iff {s : ℝ} (hs : 0 < s) (f : H) : S.toScheme.MemApprox s 2 f ↔ Memℓp (fun i => (S.weight s i : ℂ) * S.basis.repr f i) 2 := by set e : ι → ℝ≥0∞ := fun i => ‖S.basis.repr f i‖ₑ ^ 2 set Wt : ι → ℝ≥0∞ := fun i => ((1 + S.level i : ℕ) : ℝ≥0∞) ^ (2 * s) diff --git a/LeanPool/FunctionSpaces/MeasureSpaces/Spectral/ContinuousSpectralBasis.lean b/LeanPool/FunctionSpaces/MeasureSpaces/Spectral/ContinuousSpectralBasis.lean index 32239f9590..fbad783e1a 100644 --- a/LeanPool/FunctionSpaces/MeasureSpaces/Spectral/ContinuousSpectralBasis.lean +++ b/LeanPool/FunctionSpaces/MeasureSpaces/Spectral/ContinuousSpectralBasis.lean @@ -19,7 +19,7 @@ Modified for Lean Pool: module names and imports adapted. Let `M` be a topological space with a finite Borel measure `μ`. A **continuous spectral basis** of `L_2(μ)` (`ContinuousSpectralBasis`) is a spectral scheme in `L_2(μ)`, a Hilbert basis `(e_i)` with a level `λ : ι → ℕ` and finitely many basis elements of each level, whose elements are the -`L_2` classes of bounded continuous functions `ẽ_i` (`ContinuousSpectralBasis.basisFun`). The +`L_2` classes of bounded continuous functions `eTilde_i` (`ContinuousSpectralBasis.basisFun`). The model is the eigenbasis of the Laplace–Beltrami operator of a compact Riemannian manifold, continuous by elliptic regularity, with `λ(i) = ⌊√λ_i⌋`. The Dirichlet eigenbasis of a bounded open set, the Neumann eigenbasis of a bounded Lipschitz domain and the eigenbasis of the chart @@ -28,7 +28,7 @@ form of a compact manifold are spectral schemes (`Rd.dirichletScheme`, and continuity of their elements is elliptic regularity, a later goal. The Fourier basis of the torus is a continuous spectral basis (`Torus.fourierEigenbasis`). -The functions `ẽ_i` of level `< n` span the space `basisSpan n` of bounded continuous functions +The functions `eTilde_i` of level `< n` span the space `basisSpan n` of bounded continuous functions (`ContinuousSpectralBasis.basisSpan`), and these spaces form a scheme of functions (`ContinuousSpectralBasis.basisScheme`). Its classes in `L_2` are the spectral scheme (`ContinuousSpectralBasis.toLp_basisScheme_eq`), so the spectral theory applies: @@ -55,7 +55,7 @@ variable {M : Type*} [TopologicalSpace M] [MeasurableSpace M] [BorelSpace M] /-- A **continuous spectral basis** of `L_2(μ)`: a Hilbert basis `(e_i)` of `L_2(μ)` with a level `λ : ι → ℕ` that takes each value finitely often (a spectral scheme), together with bounded -continuous functions `ẽ_i` whose `L_2` classes are the `e_i`. The eigenfunctions of the +continuous functions `eTilde_i` whose `L_2` classes are the `e_i`. The eigenfunctions of the Laplace–Beltrami operator of a compact Riemannian manifold, with the level `⌊√λ⌋` of the eigenvalue `λ`, are the model; their continuity is elliptic regularity. On a bounded open set of `ℝ^d` the Dirichlet eigenbasis is a spectral scheme (`Rd.dirichletScheme`), and so are the Neumann @@ -68,14 +68,14 @@ structure ContinuousSpectralBasis (ι : Type*) (μ : Measure M) [IsFiniteMeasure extends SpectralScheme ι (Lp ℂ 2 μ) where /-- The continuous representatives of the basis elements. -/ basisFun : ι → (M →ᵇ ℂ) - /-- The `L_2` class of `ẽ_i` is the basis element `e_i`. -/ + /-- The `L_2` class of `eTilde_i` is the basis element `e_i`. -/ toLp_basisFun : ∀ i, BoundedContinuousFunction.toLp (E := ℂ) 2 μ ℂ (basisFun i) = basis i namespace ContinuousSpectralBasis variable {ι : Type*} {μ : Measure M} [IsFiniteMeasure μ] (B : ContinuousSpectralBasis ι μ) -/-- The **span of the continuous basis functions `ẽ_i` of level `< n`**, a space of bounded +/-- The **span of the continuous basis functions `eTilde_i` of level `< n`**, a space of bounded continuous functions. -/ noncomputable def basisSpan (n : ℕ) : Submodule ℂ (M →ᵇ ℂ) := Submodule.span ℂ (B.basisFun '' {i | B.level i < n}) @@ -88,13 +88,13 @@ theorem basisSpan_zero : B.basisSpan 0 = ⊥ := by simp [basisSpan] theorem basisSpan_mono : Monotone B.basisSpan := fun _ _ h => Submodule.span_mono (Set.image_mono fun _ hi => lt_of_lt_of_le hi h) -/-- A basis function `ẽ_i` of level `< n` lies in the span of level `< n`. -/ +/-- A basis function `eTilde_i` of level `< n` lies in the span of level `< n`. -/ theorem basisFun_mem_basisSpan {n : ℕ} {i : ι} (hi : B.level i < n) : B.basisFun i ∈ B.basisSpan n := Submodule.subset_span ⟨i, hi, rfl⟩ /-- The **scheme of the basis functions**: the approximants of complexity `n` are the -combinations of the continuous basis functions `ẽ_i` of level `< n`. -/ +combinations of the continuous basis functions `eTilde_i` of level `< n`. -/ noncomputable def basisScheme : FunctionScheme M := ApproximationScheme.ofSubmodules (fun n => (B.basisSpan n).restrictScalars ℝ) (by simp) (fun _ _ h => B.basisSpan_mono h) diff --git a/LeanPool/FunctionSpaces/MeasureSpaces/Spectral/LocalWeyl.lean b/LeanPool/FunctionSpaces/MeasureSpaces/Spectral/LocalWeyl.lean index a250716b7a..d8a0a3f0eb 100644 --- a/LeanPool/FunctionSpaces/MeasureSpaces/Spectral/LocalWeyl.lean +++ b/LeanPool/FunctionSpaces/MeasureSpaces/Spectral/LocalWeyl.lean @@ -16,10 +16,10 @@ Modified for Lean Pool: module names and imports adapted. # The local Weyl bound, the Nikolskii inequality and continuity A continuous spectral basis `(e_i)` on `M` (`ContinuousSpectralBasis`), with continuous basis -functions `ẽ_i`, satisfies the **local Weyl bound** of dimension `D` with constant `C` +functions `eTilde_i`, satisfies the **local Weyl bound** of dimension `D` with constant `C` (`ContinuousSpectralBasis.LocalWeylBound`) if -`∑_{λ(i) < n} |ẽ_i(x)|² ≤ C n^D` for every `x ∈ M` and `n ≥ 1`. +`∑_{λ(i) < n} |eTilde_i(x)|² ≤ C n^D` for every `x ∈ M` and `n ≥ 1`. For the Laplace–Beltrami operator of a compact Riemannian manifold of dimension `d` this is Hörmander's local Weyl law with `D = d`; on the torus `𝕋^d` it is the count of at most `(2n)^d` @@ -28,7 +28,7 @@ frequencies of degree `< n` (`Torus.localWeylBound_fourierEigenbasis`). * **The Nikolskii inequality from `L_2` to `L_∞`** (`ContinuousSpectralBasis.norm_sq_le_of_localWeyl`): for `a` in the span of the basis functions of level `< n`, `‖a‖_∞² ≤ C n^D ‖a‖_2²`, by the Cauchy–Schwarz inequality in - `a(x) = ∑_i c_i ẽ_i(x)` and Parseval's identity `‖a‖_2² = ∑_i |c_i|²`. + `a(x) = ∑_i c_i eTilde_i(x)` and Parseval's identity `‖a‖_2² = ∑_i |c_i|²`. * **The Nikolskii inequality for `1 ≤ p ≤ 2`** (`ContinuousSpectralBasis.norm_rpow_le_of_localWeyl`): `‖a‖_∞^p ≤ C n^D ‖a‖_p^p`, since `‖a‖_2² ≤ ‖a‖_∞^(2-p) ‖a‖_p^p`. For `p > 2` the inequality with `n^(D/p)` does not follow this @@ -39,7 +39,7 @@ frequencies of degree `< n` (`Torus.localWeylBound_fourierEigenbasis`). * **Continuity of `H^s` for `s > D/2`** (`ContinuousSpectralBasis.exists_continuous_of_localWeyl`): every `f ∈ L_2(μ)` with `∑_i (1 + λ(i))^(2s) |⟨e_i, f⟩|² < ∞` has a bounded continuous representative. The partial - sums `S_n f = ∑_{λ(i) < n} ⟨e_i, f⟩ ẽ_i` are continuous + sums `S_n f = ∑_{λ(i) < n} ⟨e_i, f⟩ eTilde_i` are continuous (`ContinuousSpectralBasis.partialSum`), and on the dyadic levels the Nikolskii inequality and the truncation error `‖f - P_n f‖_2 ≤ n^(-s) ‖c‖` give `‖S_{2^(k+1)} f - S_{2^k} f‖_∞ ≤ C^(1/2) 2^(D/2) ‖c‖ (2^(D/2 - s))^k`, a geometric series; the @@ -71,15 +71,15 @@ theorem mem_levelSet {n : ℕ} {i : ι} : i ∈ B.levelSet n ↔ B.level i < n : simp [levelSet] /-- The **local Weyl bound** of dimension `D` with constant `C ≥ 0`: -`∑_{λ(i) < n} |ẽ_i(x)|² ≤ C n^D` for every point `x` and every `n ≥ 1`. A hypothesis on the +`∑_{λ(i) < n} |eTilde_i(x)|² ≤ C n^D` for every point `x` and every `n ≥ 1`. A hypothesis on the basis; the torus satisfies it (`Torus.localWeylBound_fourierEigenbasis`). -/ structure LocalWeylBound (D C : ℝ) : Prop where /-- The constant is nonnegative. -/ nonneg : 0 ≤ C - /-- `∑_{λ(i) < n} |ẽ_i(x)|² ≤ C n^D` for every `n ≥ 1` and every `x`. -/ + /-- `∑_{λ(i) < n} |eTilde_i(x)|² ≤ C n^D` for every `n ≥ 1` and every `x`. -/ le : ∀ n : ℕ, 1 ≤ n → ∀ x : M, ∑ i ∈ B.levelSet n, ‖B.basisFun i x‖ ^ 2 ≤ C * (n : ℝ) ^ D -/-- An element of the span of level `< n` is a combination `∑_{λ(i) < n} c_i ẽ_i`. -/ +/-- An element of the span of level `< n` is a combination `∑_{λ(i) < n} c_i eTilde_i`. -/ theorem exists_sum_of_mem_basisSpan {n : ℕ} {a : M →ᵇ ℂ} (ha : a ∈ B.basisSpan n) : ∃ c : ι → ℂ, a = ∑ i ∈ B.levelSet n, c i • B.basisFun i := by classical @@ -93,7 +93,8 @@ theorem exists_sum_of_mem_basisSpan {n : ℕ} {a : M →ᵇ ℂ} (ha : a ∈ B.b _ = _ := Finset.sum_subset hsub fun i _ hi => by simp [hi] /-- **Parseval's identity for combinations of the basis functions**: -`‖∑ c_i ẽ_i‖_2² = ∑ |c_i|²` (Mathlib's `OrthogonalFamily.norm_sum` for the orthonormal basis). -/ +`‖∑ c_i eTilde_i‖_2² = ∑ |c_i|²` (Mathlib's `OrthogonalFamily.norm_sum` for the orthonormal +basis). -/ theorem norm_toLp_sum_sq (t : Finset ι) (c : ι → ℂ) : ‖BoundedContinuousFunction.toLp (E := ℂ) 2 μ ℂ (∑ i ∈ t, c i • B.basisFun i)‖ ^ 2 = ∑ i ∈ t, ‖c i‖ ^ 2 := by @@ -207,7 +208,7 @@ theorem norm_le_of_localWeyl {D C : ℝ} (hW : B.LocalWeylBound D C) {n : ℕ} ( variable (B) -/-- The **partial sum** `S_n f = ∑_{λ(i) < n} ⟨e_i, f⟩ ẽ_i`, a bounded continuous function. -/ +/-- The **partial sum** `S_n f = ∑_{λ(i) < n} ⟨e_i, f⟩ eTilde_i`, a bounded continuous function. -/ noncomputable def partialSum (n : ℕ) (f : Lp ℂ 2 μ) : M →ᵇ ℂ := ∑ i ∈ B.levelSet n, B.basis.repr f i • B.basisFun i diff --git a/LeanPool/FunctionSpaces/Rd/Atoms/AtomAnalysis.lean b/LeanPool/FunctionSpaces/Rd/Atoms/AtomAnalysis.lean index ee185823ab..3f183723d9 100644 --- a/LeanPool/FunctionSpaces/Rd/Atoms/AtomAnalysis.lean +++ b/LeanPool/FunctionSpaces/Rd/Atoms/AtomAnalysis.lean @@ -36,10 +36,12 @@ regular atoms (`Rd.isRegularAtom_cellAtom`). The dual kernels `η_j` of a bump satisfy these bounds (`Rd.LocalMeansBump.exists_higherDiff_dual_bound`). -**Atomic characterisation** (`Rd.LocalMeansBump.besov_iff_atomic`; Schneider–Vybíral, -Corollary 2.8, for `p ≥ 1`): for `0 < s < L`, `F ∈ B^s_{p,q}(V)` iff `F = ∑_j ∑_m λ_{j,m} a_{j,m}` +**Atomic characterisation** (`Rd.LocalMeansBump.besov_iff_atomic`): for `0 < s < L`, +`F ∈ B^s_{p,q}(V)` iff `F = ∑_j ∑_m λ_{j,m} a_{j,m}` with regular atoms of order and exponent `L`, centres of bounded overlap and -`‖λ‖_{b^s_{p,q}} < ∞`. The atoms of `F` are the cell atoms of `η_j ⋆ (k_j ⋆ F)` +`‖λ‖_{b^s_{p,q}} < ∞`. This is a regular-atom variant of Schneider–Vybíral +([arXiv:1201.2280](https://arxiv.org/abs/1201.2280), Theorem 2.6). Their Corollary 2.8 treats +Lipschitz atoms for `0 < s < 1`. The atoms of `F` here are the cell atoms of `η_j ⋆ (k_j ⋆ F)` (`Rd.LocalMeansBump.atomic_decomposition`); their coefficients have `‖λ‖_{b^s_{p,q}} = ‖(2^(js) ‖k_j ⋆ F‖_p)_j‖_{ℓ_q}`, the local means quasi-norm. -/ @@ -109,7 +111,8 @@ theorem cellCoef_mul_cellAtom {p : ℝ≥0∞} (hp0 : p ≠ 0) {g : V → ℂ} ( simp · rw [cellAtom, ← mul_assoc, mul_inv_cancel₀ h0, one_mul] -/-- The cells have finite volume: `P_{j,m}` lies in the closed ball `B̄(c_{j,m}, n 2^(-j))`. -/ +/-- The cells have finite volume: `P_{j,m}` lies in the closed ball `closedBall(c_{j,m}, n +2^(-j))`. -/ theorem volume_cell_ne_top (j : ℕ) (m : Fin (finrank ℝ V) → ℤ) : volume (cell (V := V) j m) ≠ ∞ := ne_top_of_le_ne_top measure_closedBall_lt_top.ne (measure_mono fun _ hx => by rw [mem_closedBall, dist_eq_norm] @@ -179,7 +182,7 @@ theorem tsum_indicator_cell (j : ℕ) (g : V → ℂ) (y : V) : /-- **Cell decomposition of a convolution, cellwise hypothesis**: `K ⋆ g = ∑_m λ_{j,m} a_{j,m}` at every point, with finitely many nonzero terms, for a continuous `K` that vanishes outside -`B̄(0, ρ)`, as soon as `1_{P_{j,m}} g ∈ L_p` for every cell. -/ +`closedBall(0, ρ)`, as soon as `1_{P_{j,m}} g ∈ L_p` for every cell. -/ theorem conv_eq_tsum_cellAtom_of_indicator {p : ℝ≥0∞} (hp1 : 1 ≤ p) {K g : V → ℂ} (hKc : Continuous K) {ρ : ℝ} (hρ : 0 ≤ ρ) (hKρ : ∀ y, ρ < ‖y‖ → K y = 0) {j : ℕ} (hg : ∀ m, MemLp ((cell j m).indicator g) p volume) (x : V) : @@ -211,7 +214,7 @@ theorem conv_eq_tsum_cellAtom_of_indicator {p : ℝ≥0∞} (hp1 : 1 ≤ p) {K g _ = _ := tsum_congr fun m => (cellCoef_mul_cellAtom_of_indicator hp0 (hg m) K x).symm /-- **Cell decomposition of a convolution**: `K ⋆ g = ∑_m λ_{j,m} a_{j,m}` at every point, with -finitely many nonzero terms, for a continuous `K` that vanishes outside `B̄(0, ρ)`. -/ +finitely many nonzero terms, for a continuous `K` that vanishes outside `closedBall(0, ρ)`. -/ theorem conv_eq_tsum_cellAtom {p : ℝ≥0∞} (hp1 : 1 ≤ p) {K g : V → ℂ} (hKc : Continuous K) {ρ : ℝ} (hρ : 0 ≤ ρ) (hKρ : ∀ y, ρ < ‖y‖ → K y = 0) (hg : MemLp g p volume) (j : ℕ) (x : V) : @@ -226,8 +229,8 @@ theorem continuous_cellAtom {p : ℝ≥0∞} (hp1 : 1 ≤ p) {K g : V → ℂ} ( continuous_const.mul (hKs.continuous_convolution_left (ContinuousLinearMap.mul ℂ ℂ) hKc ((hg.indicator (measurableSet_cell j m).nullMeasurableSet).locallyIntegrable hp1)) -/-- Cell atoms vanish outside `B̄(c_{j,m}, (ρ + n) 2^(-j))` if `K` vanishes outside -`B̄(0, ρ 2^(-j))`. -/ +/-- Cell atoms vanish outside `closedBall(c_{j,m}, (ρ + n) 2^(-j))` if `K` vanishes outside +`closedBall(0, ρ 2^(-j))`. -/ theorem cellAtom_eq_zero {p : ℝ≥0∞} {K g : V → ℂ} {ρ : ℝ} {j : ℕ} (hKρ : ∀ y, ρ / 2 ^ j < ‖y‖ → K y = 0) (m : Fin (finrank ℝ V) → ℤ) {x : V} (hx : (ρ + finrank ℝ V) / 2 ^ j < ‖x - cellCenter j m‖) : cellAtom p K j g m x = 0 := by @@ -246,7 +249,7 @@ theorem cellAtom_eq_zero {p : ℝ≥0∞} {K g : V → ℂ} {ρ : ℝ} {j : ℕ} rw [Set.indicator_of_notMem hxy, mul_zero] simp only [this, integral_zero, mul_zero] -/-- `|B̄(0, ρ 2^(-j))|^t = (ρ^n |B_1|)^t 2^(-jnt)`. -/ +/-- `|closedBall(0, ρ 2^(-j))|^t = (ρ^n |B_1|)^t 2^(-jnt)`. -/ theorem volume_closedBall_div_two_pow_rpow {ρ : ℝ} (hρ : 0 ≤ ρ) (j : ℕ) {t : ℝ} (ht : 0 ≤ t) : volume (closedBall (0 : V) (ρ / 2 ^ j)) ^ t = (ENNReal.ofReal (ρ ^ finrank ℝ V) * volume (ball (0 : V) 1)) ^ t * @@ -254,7 +257,7 @@ theorem volume_closedBall_div_two_pow_rpow {ρ : ℝ} (hρ : 0 ≤ ρ) (j : ℕ) rw [volume_closedBall_div_two_pow hρ j, ENNReal.mul_rpow_of_nonneg _ _ ht, ENNReal.dyadicWeight_rpow, neg_mul] -/-- **The scaling of cell atoms**: if `K'` vanishes outside `B̄(0, ρ 2^(-j))` and +/-- **The scaling of cell atoms**: if `K'` vanishes outside `closedBall(0, ρ 2^(-j))` and `|K'| ≤ A 2^(jn)`, then `|λ_{j,m}⁻¹ (K' ⋆ (1_{P_{j,m}} g))(x)| ≤ A (ρ^n |B_1|)^(1-1/p)`: the factors `2^(jn)`, `2^(-jn(1-1/p))` and `2^(-jn/p)` cancel. -/ theorem enorm_inv_cellCoef_mul_conv_le {p : ℝ≥0∞} (hp1 : 1 ≤ p) {g : V → ℂ} @@ -294,7 +297,7 @@ theorem enorm_inv_cellCoef_mul_conv_le {p : ℝ≥0∞} (hp1 : 1 ≤ p) {g : V rw [hW, ENNReal.inv_mul_cancel he0 he, mul_one, mul_one] /-- **Cell atoms are bounded**: `|a_{j,m}| ≤ A (ρ^n |B_1|)^(1-1/p)` if `|K| ≤ A 2^(jn)` and `K` -vanishes outside `B̄(0, ρ 2^(-j))`. -/ +vanishes outside `closedBall(0, ρ 2^(-j))`. -/ theorem enorm_cellAtom_le {p : ℝ≥0∞} (hp1 : 1 ≤ p) {K g : V → ℂ} (hg : MemLp g p volume) {j : ℕ} (m : Fin (finrank ℝ V) → ℤ) {A : ℝ≥0∞} (hK : ∀ y, ‖K y‖ₑ ≤ A * dyadicWeight (finrank ℝ V) j) {ρ : ℝ} (hρ : 0 ≤ ρ) @@ -304,9 +307,10 @@ theorem enorm_cellAtom_le {p : ℝ≥0∞} (hp1 : 1 ≤ p) {K g : V → ℂ} (hg enorm_inv_cellCoef_mul_conv_le hp1 hg m hK hρ hKρ x /-- **Differences of cell atoms**: if `K` is continuous with `|K| ≤ A 2^(jn)`, -`|Δ_h^r K| ≤ A 2^(jn) min(1, (2^j ‖h‖)^r)` and `K = 0` outside `B̄(0, ρ 2^(-j))`, then +`|Δ_h^r K| ≤ A 2^(jn) min(1, (2^j ‖h‖)^r)` and `K = 0` outside `closedBall(0, ρ 2^(-j))`, then `|Δ_h^r a_{j,m}| ≤ 2^r A ((ρ + r)^n |B_1|)^(1-1/p) min(1, (2^j ‖h‖)^r)`. For `‖h‖ ≤ 2^(-j)` the -kernel `Δ_h^r K` of `Δ_h^r a_{j,m}` vanishes outside `B̄(0, (ρ + r) 2^(-j))`; for larger `h` the +kernel `Δ_h^r K` of `Δ_h^r a_{j,m}` vanishes outside `closedBall(0, (ρ + r) 2^(-j))`; for larger +`h` the bound `2^r sup |a_{j,m}|` suffices. -/ theorem enorm_higherDiff_cellAtom_le {p : ℝ≥0∞} (hp1 : 1 ≤ p) {K g : V → ℂ} (hKc : Continuous K) (hg : MemLp g p volume) {j : ℕ} (m : Fin (finrank ℝ V) → ℤ) {A : ℝ≥0∞} {r : ℕ} @@ -394,7 +398,7 @@ theorem cellAtomConst_ne_top {p : ℝ≥0∞} (hp1 : 1 ≤ p) {A : ℝ≥0∞} ( /-- **Cell atoms are regular atoms** of order and exponent `r`, with radius factor `ρ + n` and the constant `Rd.cellAtomConst`, for a continuous kernel `K` with `|Δ_h^l K| ≤ A 2^(jn) min(1, -(2^j ‖h‖)^l)` (`l = 0, r`) that vanishes outside `B̄(0, ρ 2^(-j))`. -/ +(2^j ‖h‖)^l)` (`l = 0, r`) that vanishes outside `closedBall(0, ρ 2^(-j))`. -/ theorem isRegularAtom_cellAtom {p : ℝ≥0∞} (hp1 : 1 ≤ p) {K g : V → ℂ} (hKc : Continuous K) (hg : MemLp g p volume) {j : ℕ} (m : Fin (finrank ℝ V) → ℤ) {A : ℝ≥0∞} {r : ℕ} (hK : ∀ y, ‖K y‖ₑ ≤ A * dyadicWeight (finrank ℝ V) j) @@ -568,8 +572,8 @@ theorem atomic_decomposition (hp : p ≠ ∞) (L r : ℕ) : ∃ C : ℝ≥0∞, simp_rw [Lp.eNorm_def] include b in -/-- **Atomic characterisation of Besov spaces** (Schneider–Vybíral, Corollary 2.8, for `p ≥ 1`): -for `1 ≤ p < ∞`, `0 < s < L` and `1 ≤ q ≤ ∞`, `F ∈ B^s_{p,q}(V)` iff `F = ∑_j f_j` in `L_p` with +/-- **Atomic characterisation of Besov spaces** with regular atoms and bounded overlap. +For `1 ≤ p < ∞`, `0 < s < L` and `1 ≤ q ≤ ∞`, `F ∈ B^s_{p,q}(V)` iff `F = ∑_j f_j` in `L_p` with `f_j = ∑_m λ_{j,m} a_{j,m}` for regular atoms of order and exponent `L` whose centres have bounded overlap, and `‖λ‖_{b^s_{p,q}} < ∞`. The atoms of `F` are its cell atoms (`Rd.LocalMeansBump.atomic_decomposition`); the converse is the synthesis diff --git a/LeanPool/FunctionSpaces/Rd/Atoms/AtomSynthesis.lean b/LeanPool/FunctionSpaces/Rd/Atoms/AtomSynthesis.lean index 47a6798c4a..7eec550b41 100644 --- a/LeanPool/FunctionSpaces/Rd/Atoms/AtomSynthesis.lean +++ b/LeanPool/FunctionSpaces/Rd/Atoms/AtomSynthesis.lean @@ -27,8 +27,9 @@ outside the ball `B(c, d 2^(-j))` and satisfies, with a constant `C`, are regular with `σ = r = 1`, smooth `K`-atoms (`|D^α a| ≤ 2^(j|α|)`, Definition 1.3) with `σ = r = K`; both follow from pointwise bounds (`Rd.isRegularAtom_of_pointwise`). -**Synthesis** (`Rd.modNorm_le_coeffNorm`; Schneider–Vybíral, Theorem 2.6 and Corollary 2.8, -direction ⇐): if the centres of each level have bounded overlap and `F = ∑_j f_j` with the level +**Synthesis** (`Rd.modNorm_le_coeffNorm`) is the regular-atom analogue of the synthesis +in Schneider–Vybíral, Theorem 2.6. Their Corollary 2.8 uses Lipschitz atoms and `0 < s < 1`. +If the centres of each level have bounded overlap and `F = ∑_j f_j` with the level sums `f_j = ∑_m λ_{j,m} a_{j,m}`, then for `0 < s < σ` `‖F‖_p + ‖(2^(ks) ω_r(F, 2^(-k))_p)_k‖_{ℓ_q} ≤ K ‖λ‖_{b^s_{p,q}}`, @@ -435,8 +436,8 @@ theorem modNormOn_le_coeffNorm {p : ℝ≥0∞} [Fact (1 ≤ p)] (hp : p ≠ ∞ simp only [atomSynthConst, K0, ENNReal.almostDiagonalConst] ring -/-- **Atomic synthesis** (Schneider–Vybíral, Theorem 2.6 and Corollary 2.8, direction ⇐): if the -centres of the atoms with nonzero coefficients have overlap at most `N` on balls of radius +/-- **Atomic synthesis** for regular atoms. If the centres of the atoms with nonzero +coefficients have overlap at most `N` on balls of radius `(d + r) 2^(-j)` at every level `j`, `F = ∑_j f_j` in `L_p` with the level sums `f_j = ∑_m λ_{j,m} a_{j,m}` of regular atoms of exponent `σ` and order `r`, and `0 < s < σ`, then @@ -550,7 +551,8 @@ theorem eLpNorm_le_of_bound_of_support {α : Type*} [MeasurableSpace α] {μ : M refine (eLpNorm_le_of_ae_eNorm_bound hg.restrict (Eventually.of_forall hB)).trans_eq ?_ rw [Measure.restrict_apply_univ, one_div, smul_eq_mul] -/-- **Atoms on `Ω` from pointwise bounds**: a function that vanishes outside `B̄(c, d 2^(-j))` +/-- **Atoms on `Ω` from pointwise bounds**: a function that vanishes outside `closedBall(c, d +2^(-j))` with `|a| ≤ A` on `Ω` and `|Δ_h^r a(x)| ≤ A min(1, (2^j ‖h‖)^σ)` at the points `x` whose steps stay in `Ω` is a regular atom on `Ω` with the constant `A ((r + 1) d^n |B_1|)^(1/p)`. The support of `Δ_h^r a` lies in `r + 1` translated balls. -/ @@ -616,7 +618,7 @@ theorem isRegularAtomOn_of_pointwise {p : ℝ≥0∞} {σ : ℝ} {r : ℕ} {d : mul_le_mul' le_rfl hvol _ = _ := by ring -/-- **Atoms from pointwise bounds**: a function that vanishes outside `B̄(c, d 2^(-j))` with +/-- **Atoms from pointwise bounds**: a function that vanishes outside `closedBall(c, d 2^(-j))` with `|a| ≤ A` and `|Δ_h^r a| ≤ A min(1, (2^j ‖h‖)^σ)` is a regular atom with the constant `A ((r + 1) d^n |B_1|)^(1/p)`, the case `Ω = V` of `Rd.isRegularAtomOn_of_pointwise`. -/ theorem isRegularAtom_of_pointwise {p : ℝ≥0∞} {σ : ℝ} {r : ℕ} {d : ℝ} (hd : 0 ≤ d) @@ -629,7 +631,7 @@ theorem isRegularAtom_of_pointwise {p : ℝ≥0∞} {σ : ℝ} {r : ℕ} {d : (fun h x _ => hdiff h x) omit [FiniteDimensional ℝ V] [MeasurableSpace V] [BorelSpace V] in -/-- **Smooth atoms**: a smooth function vanishing outside `B̄(c, d 2^(-j))` with +/-- **Smooth atoms**: a smooth function vanishing outside `closedBall(c, d 2^(-j))` with `‖D^l a‖ ≤ A 2^(jl)` for `l ≤ r` satisfies the pointwise bounds of `Rd.isRegularAtom_of_pointwise` with exponent `σ = r` and the constant `2^r A`: `|Δ_h^r a| ≤ A (2^j ‖h‖)^r` by the mean value theorem and `|Δ_h^r a| ≤ 2^r A`. -/ diff --git a/LeanPool/FunctionSpaces/Rd/Atoms/SmoothAtoms.lean b/LeanPool/FunctionSpaces/Rd/Atoms/SmoothAtoms.lean index e4e1bb389d..2a2472d412 100644 --- a/LeanPool/FunctionSpaces/Rd/Atoms/SmoothAtoms.lean +++ b/LeanPool/FunctionSpaces/Rd/Atoms/SmoothAtoms.lean @@ -105,7 +105,8 @@ theorem iteratedFDeriv_conv_apply {K g : V → ℂ} (hK : ContDiff ℝ ((⊤ : ((hK.differentiable_iteratedFDeriv (by exact_mod_cast WithTop.coe_lt_top _)) y)] /-- **Bounds for the derivatives of a convolution**: if `‖D^n K‖ ≤ M` and `K = 0` outside -`B̄(0, ρ)`, the derivative of order `n` of `c (K ⋆ g)` is bounded through the convolutions with the +`closedBall(0, ρ)`, the derivative of order `n` of `c (K ⋆ g)` is bounded through the +convolutions with the directional derivatives `(D^n K)(·)(v)`, which satisfy `|(D^n K)(·)(v)| ≤ M ∏ ‖v_i‖`. -/ theorem norm_iteratedFDeriv_const_mul_conv_le {K g : V → ℂ} (hK : ContDiff ℝ ((⊤ : ℕ∞) : WithTop ℕ∞) K) (hKs : HasCompactSupport K) @@ -355,7 +356,7 @@ theorem isSmoothAtom_zero (Ω : Set V) (K : ℕ) (d : ℝ) {A : ℝ} (hA : 0 ≤ /-! ### Smooth cell atoms -/ -/-- **Derivatives of cell atoms**: if `K` is smooth, vanishes outside `B̄(0, ρ 2^(-j))` and +/-- **Derivatives of cell atoms**: if `K` is smooth, vanishes outside `closedBall(0, ρ 2^(-j))` and `‖D^l K‖ ≤ A 2^(j(n+l))`, then `‖D^l a_{j,m}‖ ≤ A 2^(jl) (ρ^n |B_1|)^(1-1/p)`. -/ theorem norm_iteratedFDeriv_cellAtom_le {p : ℝ≥0∞} (hp1 : 1 ≤ p) {K g : V → ℂ} (hK : ContDiff ℝ ((⊤ : ℕ∞) : WithTop ℕ∞) K) (hg : MemLp g p volume) {j : ℕ} diff --git a/LeanPool/FunctionSpaces/Rd/BesselPotentials/BesselPotentialDistributions.lean b/LeanPool/FunctionSpaces/Rd/BesselPotentials/BesselPotentialDistributions.lean index 8b53c084c7..7007eb8451 100644 --- a/LeanPool/FunctionSpaces/Rd/BesselPotentials/BesselPotentialDistributions.lean +++ b/LeanPool/FunctionSpaces/Rd/BesselPotentials/BesselPotentialDistributions.lean @@ -25,7 +25,8 @@ directions, also for Mathlib's bundled space. of order `-s` applied to `h ∈ L_p = F^0_{p,2}`, so `‖u‖_{F^s_{p,2}} ≤ C ‖h‖_p` (`Rd.exists_triebelLizorkinNormDistr_le_of_besselPotential_eq`). * **`F^s_{p,2} ⊆ H^{s,p}`**: if the blocks of `u` are `L_p` functions `g_j`, the blocks of `J_s u` - are `(J_s ψ̃_j) ⋆ g_j` (`Rd.distribBlock_besselPotential`), whose partial sums converge in `L_p` + are `(J_s ψTilde_j) ⋆ g_j` (`Rd.distribBlock_besselPotential`), whose partial sums converge in + `L_p` by the synthesis bound of the Calderón–Zygmund family of the dilated Bessel kernels (`Rd.eLpNorm_sum_conv_besselSchwartz_le`, `Rd.exists_tendsto_sum_convLp`); their limit is `J_s u` (`Rd.eq_of_tendsto_sum_distribBlock`), so @@ -87,7 +88,7 @@ theorem exists_tendsto_sum_convLp (hp : p ≠ ∞) {σ : ℝ} {K : ℕ → 𝓢( /-- **The blocks of a Bessel potential**: for `1 ≤ p < ∞`, real `s` and a tempered distribution `u` whose block `Δ_j u` is an `L_p` function `g`, the block `Δ_j(J_s u)` is the `L_p` function -`(J_s ψ̃_j) ⋆ g` (`Rd.distribBlock_fourierMultiplierCLM_eq_convLp` for the Bessel weight). -/ +`(J_s ψTilde_j) ⋆ g` (`Rd.distribBlock_fourierMultiplierCLM_eq_convLp` for the Bessel weight). -/ theorem distribBlock_besselPotential (hp : p ≠ ∞) (s : ℝ) {u : 𝓢'(V, ℂ)} {j : ℕ} {g : Lp ℂ p (volume : Measure V)} (hg : distribBlock j u = (g : 𝓢'(V, ℂ))) : distribBlock j (besselPotential V ℂ s u) = @@ -131,7 +132,8 @@ theorem exists_triebelLizorkinNormDistr_le_of_besselPotential_eq [Nontrivial V] for `1 < p < ∞` and every real `s` there is a finite constant `C` such that for every tempered distribution `u ∈ F^s_{p,2}` the Bessel potential `J_s u` is an `L_p` function `h` with `‖h‖_p ≤ C ‖u‖_{F^s_{p,2}}`; the constant is existential. If the blocks of `u` are the `L_p` -functions `g_j`, the blocks of `J_s u` are `(J_s ψ̃_j) ⋆ g_j` (`Rd.distribBlock_besselPotential`); +functions `g_j`, the blocks of `J_s u` are `(J_s ψTilde_j) ⋆ g_j` +(`Rd.distribBlock_besselPotential`); their partial sums converge in `L_p` (`Rd.exists_tendsto_sum_convLp`, with the synthesis bound `Rd.eLpNorm_sum_conv_besselSchwartz_le` of the Calderón–Zygmund family `Rd.exists_isCZFamily_besselBase_psiDualBase`), and the limit is `J_s u` diff --git a/LeanPool/FunctionSpaces/Rd/BesselPotentials/BesselPotentialEmbedding.lean b/LeanPool/FunctionSpaces/Rd/BesselPotentials/BesselPotentialEmbedding.lean index 90aa770f62..dd5f4d957b 100644 --- a/LeanPool/FunctionSpaces/Rd/BesselPotentials/BesselPotentialEmbedding.lean +++ b/LeanPool/FunctionSpaces/Rd/BesselPotentials/BesselPotentialEmbedding.lean @@ -56,8 +56,8 @@ theorem exists_memLp_eq_of_memSobolev_bessel [Nontrivial V] (hp1 : 1 < p) (hp : /-- **`H^{s,p} ↪ L_r` in Mathlib's bundled space**: let `n ≥ 1`, `1 < p < ∞`, `p ≤ r < ∞` and `s ≥ n(1/p - 1/r)`. There is a finite constant `C` such that every element `F` of Mathlib's `H^{s,p}(V)` is a function `g ∈ L_r(V)` with `‖g‖_r ≤ C ‖F‖_{H^{s,p}}`; the constant is -existential. For `r = p` it is `Q̃_{V,p} C₀`, from the lower square function bound -`‖g‖_p ≤ Q̃_{V,p} ‖g‖_{F^0_{p,2}}` (`Rd.enorm_le_triebelLizorkinNorm_zero_two`), and for `p < r` +existential. For `r = p` it is `QTilde_{V,p} C₀`, from the lower square function bound +`‖g‖_p ≤ QTilde_{V,p} ‖g‖_{F^0_{p,2}}` (`Rd.enorm_le_triebelLizorkinNorm_zero_two`), and for `p < r` it is `K_{V,p,r} C₀` (`Rd.exists_memLp_ae_eq_of_triebelLizorkinNorm_lt_top`), where `C₀` is the constant of `H^{s,p} ⊆ F^s_{p,2}` (`Rd.exists_memTriebelLizorkin_toDistr`). -/ theorem exists_enorm_le_of_besselPotentialSpace [Nontrivial V] (hp1 : 1 < p) (hp : p ≠ ∞) diff --git a/LeanPool/FunctionSpaces/Rd/BesselPotentials/BesselPotentialLifting.lean b/LeanPool/FunctionSpaces/Rd/BesselPotentials/BesselPotentialLifting.lean index 5b54add844..52cf7e134c 100644 --- a/LeanPool/FunctionSpaces/Rd/BesselPotentials/BesselPotentialLifting.lean +++ b/LeanPool/FunctionSpaces/Rd/BesselPotentials/BesselPotentialLifting.lean @@ -36,7 +36,7 @@ distribution by `⟨ξ⟩^s = (1 + ‖ξ‖²)^{s/2}`, and `f` lies in Mathlib's * **`F^s_{p,2} ⊆ H^{s,p}` for every real `s`** (`Rd.exists_besselPotential_eq_of_memTriebelLizorkin`), also in Mathlib's bundled space (`Rd.exists_enorm_toBesselPotentialSpace_le`): `J_s f` is the `L_p` limit of the synthesis - sums `∑_{j < J} (J_s ψ̃_j) ⋆ (ψ_j ⋆ f)` (`Rd.exists_tendsto_sum_conv_blockFun`, + sums `∑_{j < J} (J_s ψTilde_j) ⋆ (ψ_j ⋆ f)` (`Rd.exists_tendsto_sum_conv_blockFun`, `Rd.besselPotential_eq_of_tendsto`). * **`H^{s,p} ⊆ F^s_{p,2}`**: `‖g‖_{F^s_{p,2}} ≤ C ‖J_s g‖_p` for `g ∈ L_p` and every real `s` (`Rd.exists_triebelLizorkinNorm_le_of_besselPotential_eq`), and for `s ≥ 0` every `f` with @@ -382,7 +382,7 @@ theorem eLpNorm_sum_conv_besselSchwartz_le [Nontrivial V] (hp1 : 1 < p) (hp : p real `s` there is a finite constant `C` such that for every `f ∈ F^s_{p,2}(V)` the Bessel potential `J_s f` is an `L_p` function `h` with `‖h‖_p ≤ C ‖f‖_{F^s_{p,2}}`; the constant is existential. The function `h` is the limit of the synthesis sums -`∑_{j < J} (J_s ψ̃_j) ⋆ (ψ_j ⋆ f)`, which converge by the synthesis bound of the dilated Bessel +`∑_{j < J} (J_s ψTilde_j) ⋆ (ψ_j ⋆ f)`, which converge by the synthesis bound of the dilated Bessel kernels of `psiDualBase` (`Rd.exists_isCZFamily_besselBase_psiDualBase`, `Rd.eLpNorm_sum_conv_besselSchwartz_le`, `Rd.exists_tendsto_sum_conv_blockFun`); the sums without `J_s` tend to `f` (`Rd.tendsto_eLpNorm_sum_conv_psiDual_blockFun_sub`), so diff --git a/LeanPool/FunctionSpaces/Rd/Differences/BesovDifferences.lean b/LeanPool/FunctionSpaces/Rd/Differences/BesovDifferences.lean index e074a09f05..7c798de0db 100644 --- a/LeanPool/FunctionSpaces/Rd/Differences/BesovDifferences.lean +++ b/LeanPool/FunctionSpaces/Rd/Differences/BesovDifferences.lean @@ -26,7 +26,7 @@ inverse inequality `ω_r(a, 2^(-k))_p ≤ C_B 2^(-(k-j) r) ‖a‖_p` for `a ∈ coincidence theorem for moduli (`ApproximationScheme.ModulusData.memApprox_iff_modNorm_lt_top`) gives, for `0 ≤ s < r`: -`f ∈ A^s_q(L_p, (E_k)) ⟺ ‖f‖_p + ‖(2^(ks) ω_r(f, 2^(-k))_p)_k‖_{ℓ_q} < ∞` +`f ∈ A^s_q(L_p, (E_k)) ↔ ‖f‖_p + ‖(2^(ks) ω_r(f, 2^(-k))_p)_k‖_{ℓ_q} < ∞` (`Rd.memApprox_bandScheme_iff_modulus`). With the Littlewood–Paley characterisation (`Rd.memApprox_bandScheme_iff`), the three descriptions of `B^s_{p,q}(V)` coincide for `0 < s < r`: diff --git a/LeanPool/FunctionSpaces/Rd/FourierMultipliers/SymbolKernels.lean b/LeanPool/FunctionSpaces/Rd/FourierMultipliers/SymbolKernels.lean index d7f44d5f7f..1bedb2d495 100644 --- a/LeanPool/FunctionSpaces/Rd/FourierMultipliers/SymbolKernels.lean +++ b/LeanPool/FunctionSpaces/Rd/FourierMultipliers/SymbolKernels.lean @@ -38,8 +38,8 @@ A smooth function `m` on a real normed space has **symbol growth of order `σ`** `m(D) ω_{2^j} = 2^{jσ} (K_j)_{2^j}` with `ω = 𝓕⁻¹ ω̂` (`Rd.fourierMultiplierCLM_schwartzDilate`). For a family `(ω_j)` that is constant from some `M` on, with `𝓕ω_M` vanishing outside such an annulus, the kernels `K_j` of `𝓕ω_j` (`Rd.symbolBase`) are uniformly Schwartz - (`Rd.HasSymbolGrowth.exists_isUniformSchwartz_symbolBase`); for the synthesis kernels `ψ̃_j` - this gives `m(D) ψ̃_j = 2^{jσ} (G_j)_{2^j}` with a uniform family `(G_j)` + (`Rd.HasSymbolGrowth.exists_isUniformSchwartz_symbolBase`); for the synthesis kernels `ψTilde_j` + this gives `m(D) ψTilde_j = 2^{jσ} (G_j)_{2^j}` with a uniform family `(G_j)` (`Rd.HasSymbolGrowth.exists_isUniformSchwartz_psiDualS`). * **The maximal bound**: convolutions with the dilates `(G_j)_{2^j}` of a uniform family are bounded by the Hardy–Littlewood maximal function, uniformly in `j`, with the finite constant @@ -489,8 +489,9 @@ theorem HasSymbolGrowth.exists_isUniformSchwartz_symbolBase (hm : HasSymbolGrowt exact ⟨_, hA.of_forall_ge_eq (N := M) fun j hj => by rw [symbolBase, hω j hj]⟩ /-- **Symbols applied to the synthesis kernels**: for a symbol `m` of order `σ` there is a -uniformly Schwartz family `(G_j)` with `m(D) ψ̃_j = 2^{jσ} (G_j)_{2^j}` for every `j`, where -`ψ̃_j = (psiDualBase j)_{2^j}` (`Rd.psiDualS`). The family `psiDualBase` is constant from `2` on, +uniformly Schwartz family `(G_j)` with `m(D) ψTilde_j = 2^{jσ} (G_j)_{2^j}` for every `j`, where +`ψTilde_j = (psiDualBase j)_{2^j}` (`Rd.psiDualS`). The family `psiDualBase` is constant from +`2` on, with Fourier transform in `{1/4 ≤ ‖ζ‖ ≤ 4}` (`Rd.mem_annulus_of_fourier_psiDualBase_ne_zero`, `Rd.HasSymbolGrowth.exists_isUniformSchwartz_symbolBase`, `Rd.fourierMultiplierCLM_schwartzDilate`); the bounds are existential. -/ diff --git a/LeanPool/FunctionSpaces/Rd/FourierMultipliers/TriebelLizorkinMultipliers.lean b/LeanPool/FunctionSpaces/Rd/FourierMultipliers/TriebelLizorkinMultipliers.lean index 735114be5b..7234c3009e 100644 --- a/LeanPool/FunctionSpaces/Rd/FourierMultipliers/TriebelLizorkinMultipliers.lean +++ b/LeanPool/FunctionSpaces/Rd/FourierMultipliers/TriebelLizorkinMultipliers.lean @@ -21,14 +21,14 @@ tempered distributions, every real `s`, `1 < p < ∞` and `1 < q ≤ ∞`, with constant (`Rd.exists_triebelLizorkinNormDistr_fourierMultiplier_le`); on `L_p` functions this is a bound for the Triebel–Lizorkin quasi-norm (`Rd.exists_triebelLizorkinNorm_le_of_fourierMultiplier_eq`). For a given uniform family `(G_j)` -with `m(D) ψ̃_j = 2^{jσ} (G_j)_{2^j}` the constant is `C_{n,N} C_{A,0,N} C_{FS}` +with `m(D) ψTilde_j = 2^{jσ} (G_j)_{2^j}` the constant is `C_{n,N} C_{A,0,N} C_{FS}` (`Rd.triebelLizorkinNormDistr_fourierMultiplier_le`), and `m(D)` maps `F^s_{p,q}` into `F^{s-σ}_{p,q}` (`Rd.MemTriebelLizorkinDistr.fourierMultiplierCLM`). -The proof is pointwise. Since `𝓕ψ̃_j 𝓕ψ_j = 𝓕ψ_j`, the block of `m(D) u` is the multiplier -`𝓕(m(D) ψ̃_j)` applied to the block of `u` (`Rd.distribBlock_fourierMultiplierCLM`), so when -`Δ_j u = g_j ∈ L_p` it is the convolution `(m(D) ψ̃_j) ⋆ g_j` -(`Rd.distribBlock_fourierMultiplierCLM_eq_convLp`). Here `m(D) ψ̃_j = 2^{jσ} (G_j)_{2^j}` with a +The proof is pointwise. Since `𝓕ψTilde_j 𝓕ψ_j = 𝓕ψ_j`, the block of `m(D) u` is the multiplier +`𝓕(m(D) ψTilde_j)` applied to the block of `u` (`Rd.distribBlock_fourierMultiplierCLM`), so when +`Δ_j u = g_j ∈ L_p` it is the convolution `(m(D) ψTilde_j) ⋆ g_j` +(`Rd.distribBlock_fourierMultiplierCLM_eq_convLp`). Here `m(D) ψTilde_j = 2^{jσ} (G_j)_{2^j}` with a uniform family `(G_j)` (`Rd.HasSymbolGrowth.exists_isUniformSchwartz_psiDualS`), so `2^{j(s-σ)} |Δ_j(m(D) u)| ≤ C M(2^{js} |g_j|)` (`Rd.dyadicWeight_mul_enorm_conv_le_maximal`), and the Fefferman–Stein inequality (`Rd.eLpNorm_le_of_le_lqNorm_maximal`) finishes. @@ -49,9 +49,9 @@ variable {V : Type*} [NormedAddCommGroup V] [InnerProductSpace ℝ V] [FiniteDim /-! ### The blocks of a Fourier multiplier -/ /-- **The blocks of a Fourier multiplier**: for `m` of temperate growth and every tempered -distribution `u`, `Δ_j(m(D) u) = 𝓕(m(D) ψ̃_j)(D) Δ_j u`. Both sides are Fourier multipliers of +distribution `u`, `Δ_j(m(D) u) = 𝓕(m(D) ψTilde_j)(D) Δ_j u`. Both sides are Fourier multipliers of `u` (Mathlib's `TemperedDistribution.fourierMultiplierCLM_fourierMultiplierCLM_apply`), with the -symbols `m 𝓕ψ_j` and `𝓕ψ_j m 𝓕ψ̃_j`, equal since `𝓕ψ̃_j 𝓕ψ_j = 𝓕ψ_j` +symbols `m 𝓕ψ_j` and `𝓕ψ_j m 𝓕ψTilde_j`, equal since `𝓕ψTilde_j 𝓕ψ_j = 𝓕ψ_j` (`Rd.fourier_psiDual_mul_psi`). -/ theorem distribBlock_fourierMultiplierCLM (hm : m.HasTemperateGrowth) (u : 𝓢'(V, ℂ)) (j : ℕ) : distribBlock j (TemperedDistribution.fourierMultiplierCLM ℂ m u) = @@ -70,7 +70,7 @@ theorem distribBlock_fourierMultiplierCLM (hm : m.HasTemperateGrowth) (u : 𝓢' /-- **The blocks of a Fourier multiplier as convolutions**: if `m` has temperate growth, `1 ≤ p < ∞` and the block `Δ_j u` of a tempered distribution is an `L_p` function `g`, then -`Δ_j(m(D) u)` is the `L_p` function `(m(D) ψ̃_j) ⋆ g` (`Rd.distribBlock_fourierMultiplierCLM`, +`Δ_j(m(D) u)` is the `L_p` function `(m(D) ψTilde_j) ⋆ g` (`Rd.distribBlock_fourierMultiplierCLM`, `Rd.fourierMultiplierCLM_fourier_toLp_eq_conv`). -/ theorem distribBlock_fourierMultiplierCLM_eq_convLp {p : ℝ≥0∞} [Fact (1 ≤ p)] (hp : p ≠ ∞) (hm : m.HasTemperateGrowth) {u : 𝓢'(V, ℂ)} {j : ℕ} {g : Lp ℂ p (volume : Measure V)} @@ -112,11 +112,12 @@ theorem dyadicWeight_mul_enorm_conv_le_maximal {G : ℕ → 𝓢(V, ℂ)} {A : variable {p : ℝ≥0∞} [Fact (1 ≤ p)] /-- **The multiplier bound for one family of blocks**: for a function `m` of temperate growth -with `m(D) ψ̃_j = 2^{jσ} (G_j)_{2^j}` and `(G_j)` uniformly Schwartz with bounds `A`, `1 < p < ∞`, +with `m(D) ψTilde_j = 2^{jσ} (G_j)_{2^j}` and `(G_j)` uniformly Schwartz with bounds `A`, `1 < p +< ∞`, `1 < q ≤ ∞` and `N > n`, if the blocks of `u` are `L_p` functions `g_j`, then `‖m(D) u‖_{F^{s-σ}_{p,q}} ≤ C_{n,N} C_{A,0,N} C_{FS} ‖ x ↦ ‖(2^{js} |g_j(x)|)_j‖_{ℓ_q} ‖_p` with the Fefferman–Stein constant `C_{FS} = Rd.feffermanSteinConst V p q`. The blocks of -`m(D) u` are the convolutions `(m(D) ψ̃_j) ⋆ g_j` +`m(D) u` are the convolutions `(m(D) ψTilde_j) ⋆ g_j` (`Rd.distribBlock_fourierMultiplierCLM_eq_convLp`), bounded at almost every point by `Rd.dyadicWeight_mul_enorm_conv_le_maximal`, and `Rd.eLpNorm_le_of_le_lqNorm_maximal` applies. -/ theorem triebelLizorkinNormDistr_fourierMultiplier_le (hp1 : 1 < p) (hp : p ≠ ∞) {q : ℝ≥0∞} diff --git a/LeanPool/FunctionSpaces/Rd/Interpolation/BesovInterpolation.lean b/LeanPool/FunctionSpaces/Rd/Interpolation/BesovInterpolation.lean index 5288ab8806..d341329ca0 100644 --- a/LeanPool/FunctionSpaces/Rd/Interpolation/BesovInterpolation.lean +++ b/LeanPool/FunctionSpaces/Rd/Interpolation/BesovInterpolation.lean @@ -25,7 +25,7 @@ For **Besov spaces by differences** of order `r` the couple carries the quasi-no `ApproximationScheme.ModulusData.modCouple` of `Rd.bandModulusData`). For `0 < s₀ < s₁ < r` and `s = (1-η)s₀ + ηs₁`, -`f ∈ (B^{s₀}_{p,q₀}, B^{s₁}_{p,q₁})_{η,q} ⟺ ‖f‖_p + ‖(2^(ks) ω_r(f, 2^(-k))_p)_k‖_{ℓ_q} < ∞` +`f ∈ (B^{s₀}_{p,q₀}, B^{s₁}_{p,q₁})_{η,q} ↔ ‖f‖_p + ‖(2^(ks) ω_r(f, 2^(-k))_p)_k‖_{ℓ_q} < ∞` (Bergh–Löfström, Theorem 6.4.5(1); Triebel 1978, Section 2.4; `Rd.memKMethod_modCouple_iff`), and equivalently `‖(2^(js) ‖ψ_j ⋆ f‖_p)_j‖_{ℓ_q} < ∞` diff --git a/LeanPool/FunctionSpaces/Rd/LocalMeans/KernelMajorants.lean b/LeanPool/FunctionSpaces/Rd/LocalMeans/KernelMajorants.lean index b094b43f5b..137759c1ab 100644 --- a/LeanPool/FunctionSpaces/Rd/LocalMeans/KernelMajorants.lean +++ b/LeanPool/FunctionSpaces/Rd/LocalMeans/KernelMajorants.lean @@ -527,7 +527,7 @@ theorem norm_kernel_le (L j : ℕ) (y : V) : refine (norm_sub_le _ _).trans ?_ nlinarith -/-- The local means kernels vanish outside `B̄(0, 2 L R 2^(-j))`. -/ +/-- The local means kernels vanish outside `closedBall(0, 2 L R 2^(-j))`. -/ theorem kernel_eq_zero_of_lt (L j : ℕ) {y : V} (hy : 2 * L * b.radius / 2 ^ j < ‖y‖) : b.kernel L j y = 0 := by have hLR : 0 ≤ (L : ℝ) * b.radius := mul_nonneg (Nat.cast_nonneg L) b.radius_nonneg @@ -817,7 +817,7 @@ theorem lintegral_Theta_mul_kernel_le_far (L N : ℕ) {i j : ℕ} (hji : j ≤ i /-- **The support case**: for `j ≤ i` and every `y`, `|(k_j ⋆ Θ_i)(y)| ≤ C 2^(jn) (1 + 2^j ‖y‖)^(-N)` with `C = Rd.LocalMeansBump.kernelThetaSupportConst L N`: `k_j` is bounded by `2^(jn)` and supported -in `B̄(0, 2LR 2^(-j))`, and `Θ_i` has small tails. -/ +in `closedBall(0, 2LR 2^(-j))`, and `Θ_i` has small tails. -/ theorem enorm_conv_kernel_Theta_le_of_le (L N : ℕ) {i j : ℕ} (hji : j ≤ i) (y : V) : ‖conv (b.kernel L j) (Theta i) volume y‖ₑ ≤ b.kernelThetaSupportConst L N * 2 ^ (j * finrank ℝ V) * ((1 + 2 ^ j * ‖y‖ₑ) ^ N)⁻¹ := by @@ -1009,7 +1009,7 @@ theorem enorm_psi_le (j N : ℕ) (y : V) : /-! ### The cross kernel `ψ_j ⋆ η_i` -/ /-- **Integrals against a kernel of small support**: if `η` vanishes outside -`B̄(0, ρ 2^(-k))` and `|ψ(z)| ≤ C 2^(kn) (1 + 2^k ‖z‖)^(-N)`, then +`closedBall(0, ρ 2^(-k))` and `|ψ(z)| ≤ C 2^(kn) (1 + 2^k ‖z‖)^(-N)`, then `∫ |η(w)| |ψ(y - w)| dw ≤ ‖η‖_1 C (1 + ρ)^N 2^(kn) (1 + 2^k ‖y‖)^(-N)`, by Peetre's inequality `(1 + 2^k ‖y - w‖)^(-N) ≤ (1 + 2^k ‖w‖)^N (1 + 2^k ‖y‖)^(-N)`. -/ theorem lintegral_mul_peetre_le_of_support {η ψ : V → ℂ} (hη : AEStronglyMeasurable η volume) @@ -1059,7 +1059,8 @@ theorem lintegral_enorm_dual_le (L i : ℕ) : exact b.eLpNorm_dual_one_le L i /-- **The case `i > j`**: `|(ψ_j ⋆ η_i)(y)| ≤ C 2^(jn) (1 + 2^j ‖y‖)^(-N)` with -`C = Rd.LocalMeansBump.psiDualSupportConst L N`: `η_i` is supported in `B̄(0, 2LR 2^(-i))`, where +`C = Rd.LocalMeansBump.psiDualSupportConst L N`: `η_i` is supported in `closedBall(0, 2LR +2^(-i))`, where the Peetre weight at the scale `2^j` changes by at most `(1 + 2LR)^N`. -/ theorem enorm_conv_psi_dual_le_of_lt (L N : ℕ) {i j : ℕ} (hji : j < i) (y : V) : ‖conv (psi j) (b.dual L i) volume y‖ₑ ≤ @@ -1248,7 +1249,7 @@ theorem dualTailConst_ne_top (L L' N : ℕ) : b.dualTailConst L L' N ≠ ∞ := /-- For `L' ≥ 1` and `‖w‖ > 4LR 2^(-i)`, the difference `Δ^L'_{-2^(-j') z} η_i(w)` vanishes whenever `‖z‖ < 2^j' ‖w‖ / (2L')`: all points `w - l 2^(-j') z`, `l ≤ L'`, then lie outside -`B̄(0, 2LR 2^(-i))`, where `η_i` vanishes. -/ +`closedBall(0, 2LR 2^(-i))`, where `η_i` vanishes. -/ theorem higherDiff_dual_eq_zero_of_norm_lt (L L' i j' : ℕ) (hL' : 1 ≤ L') {w : V} (hw : 4 * L * b.radius / 2 ^ i < ‖w‖) {z : V} (hz : ‖z‖ < 2 ^ j' * ‖w‖ / (2 * L')) : (fwdDiff (-((2 : ℝ) ^ j')⁻¹ • z))^[L'] (b.dual L i) w = 0 := by diff --git a/LeanPool/FunctionSpaces/Rd/LocalMeans/LocalMeans.lean b/LeanPool/FunctionSpaces/Rd/LocalMeans/LocalMeans.lean index cfcaf28410..31729b8e48 100644 --- a/LeanPool/FunctionSpaces/Rd/LocalMeans/LocalMeans.lean +++ b/LeanPool/FunctionSpaces/Rd/LocalMeans/LocalMeans.lean @@ -185,7 +185,7 @@ theorem eLpNorm_kernel_one_le (L j : ℕ) : _ = 2 * eLpNorm (momentKernel b.toFun L) 1 volume := by rw [b.eLpNorm_scaled_one, b.eLpNorm_scaled_one, two_mul] -/-- The dilated moment kernels vanish outside `B̄(0, L R 2^(-j))`. -/ +/-- The dilated moment kernels vanish outside `closedBall(0, L R 2^(-j))`. -/ theorem scaled_eq_zero_of_lt (L j : ℕ) {y : V} (hy : L * b.radius / 2 ^ j < ‖y‖) : b.scaled L j y = 0 := by rw [scaled, dilate, b.momentKernel_eq_zero L, mul_zero] @@ -193,7 +193,7 @@ theorem scaled_eq_zero_of_lt (L j : ℕ) {y : V} (hy : L * b.radius / 2 ^ j < rw [div_lt_iff₀ (by positivity)] at hy linarith -/-- The dual kernels vanish outside `B̄(0, 2 L R 2^(-j))`. -/ +/-- The dual kernels vanish outside `closedBall(0, 2 L R 2^(-j))`. -/ theorem dual_eq_zero_of_lt (L j : ℕ) {y : V} (hy : 2 * L * b.radius / 2 ^ j < ‖y‖) : b.dual L j y = 0 := by have hLR : 0 ≤ (L : ℝ) * b.radius := mul_nonneg (Nat.cast_nonneg L) b.radius_nonneg @@ -594,7 +594,7 @@ end LocalMeansBump /-- **The mollifier of a bump function**: the normalised smooth bump `f` around `c` (Mathlib's `ContDiffBump.normed`), with complex values; it is smooth with compact support in the closed ball -`B̄(c, r_out)` and has integral `1`. -/ +`closedBall(c, r_out)` and has integral `1`. -/ noncomputable def bumpMollifier {c : V} (f : ContDiffBump c) : V → ℂ := fun z => ((f.normed volume z : ℝ) : ℂ) @@ -603,7 +603,7 @@ theorem contDiff_bumpMollifier {c : V} (f : ContDiffBump c) : ContDiff ℝ ((⊤ : ℕ∞) : WithTop ℕ∞) (bumpMollifier f) := Complex.ofRealCLM.contDiff.comp (f.contDiff_normed (n := ⊤)) -/-- The mollifier of a bump function has its closed support in `B̄(c, r_out)`. -/ +/-- The mollifier of a bump function has its closed support in `closedBall(c, r_out)`. -/ theorem tsupport_bumpMollifier_subset {c : V} (f : ContDiffBump c) : tsupport (bumpMollifier f) ⊆ Metric.closedBall c f.rOut := (tsupport_comp_subset Complex.ofReal_zero _).trans (f.tsupport_normed_eq (μ := volume)).subset @@ -620,7 +620,8 @@ theorem integral_bumpMollifier {c : V} (f : ContDiffBump c) : ∫ z, bumpMollifi rw [integral_complex_ofReal, f.integral_normed, Complex.ofReal_one] /-- **The bump for local means of a smooth bump function**: the mollifier of a smooth bump `f` -around `c` with outer radius `r_out` vanishes outside `B̄(c, r_out)`, hence outside the ball of +around `c` with outer radius `r_out` vanishes outside `closedBall(c, r_out)`, hence outside the +ball of every radius `R ≥ ‖c‖ + r_out` around `0`, since `‖z‖ ≤ ‖z - c‖ + ‖c‖`. -/ noncomputable def LocalMeansBump.ofContDiffBump {c : V} (f : ContDiffBump c) {R : ℝ} (hR : ‖c‖ + f.rOut ≤ R) : LocalMeansBump V where diff --git a/LeanPool/FunctionSpaces/Rd/SingularIntegrals/VectorValuedWeakType.lean b/LeanPool/FunctionSpaces/Rd/SingularIntegrals/VectorValuedWeakType.lean index a2d7704a9d..3a911ffbce 100644 --- a/LeanPool/FunctionSpaces/Rd/SingularIntegrals/VectorValuedWeakType.lean +++ b/LeanPool/FunctionSpaces/Rd/SingularIntegrals/VectorValuedWeakType.lean @@ -83,7 +83,8 @@ theorem IsCZFamily.measurable_lqNorm_sub (h : IsCZFamily θ B H) (c : V) : ((h.continuous j).comp (continuous_fst.sub continuous_const))).measurable.eNorm) 2 /-- **The bad part off the doubled ball** (scalar mass): for a Calderón–Zygmund family with -Hörmander constant `H`, a measurable set `Q ⊆ B̄(c, ρ)` and an almost everywhere measurable mass +Hörmander constant `H`, a measurable set `Q ⊆ closedBall(c, ρ)` and an almost everywhere +measurable mass `m : V → [0, ∞]`, `∫_{‖x - c‖ > 2ρ} ∫_Q ‖(θ_j(x - y) - θ_j(x - c))_j‖_{ℓ_2} m(y) dy dx ≤ H ∫_Q m`, by Tonelli's theorem (Mathlib's `lintegral_lintegral_swap`) and diff --git a/LeanPool/FunctionSpaces/Rd/Sobolev/DivergenceKernels.lean b/LeanPool/FunctionSpaces/Rd/Sobolev/DivergenceKernels.lean index eed1b5b872..11e87327cf 100644 --- a/LeanPool/FunctionSpaces/Rd/Sobolev/DivergenceKernels.lean +++ b/LeanPool/FunctionSpaces/Rd/Sobolev/DivergenceKernels.lean @@ -78,7 +78,8 @@ private theorem continuous_fderiv_fst_of_contDiff {E : Type w} [NormedAddCommGro /-- **Differentiation under the integral sign** for a jointly `C^1` integrand: if `(x, t) ↦ F x t` is `C^1` on `H × ℝ`, then `x ↦ ∫_a^b F x t dt` has the derivative `∫_a^b D_x F x₀ t dt` at every `x₀`. The partial derivative is bounded on the compact set -`B̄(x₀, 1) × [a, b]`, so Mathlib's `intervalIntegral.hasFDerivAt_integral_of_dominated_of_fderiv_le` +`closedBall(x₀, 1) × [a, b]`, so Mathlib's +`intervalIntegral.hasFDerivAt_integral_of_dominated_of_fderiv_le` applies. -/ theorem hasFDerivAt_integral_of_contDiff {E : Type w} [NormedAddCommGroup E] [NormedSpace ℝ E] {F : H → ℝ → E} (hF : ContDiff ℝ 1 (Function.uncurry F)) (a b : ℝ) @@ -397,7 +398,7 @@ theorem sum_fderiv_divergenceKernel {ι : Type*} [Fintype ι] (b : OrthonormalBa /-- The integrand `(x, s) ↦ ⟪w, x⟫ m_{e^s}(x)` of the dilation average is integrable on `V × (0, c]` if `m` is continuous and vanishes outside a ball: it is continuous and vanishes -outside the compact set `B̄(0, R) × [0, c]`. -/ +outside the compact set `closedBall(0, R) × [0, c]`. -/ theorem integrable_inner_mul_dilate_exp {m : V → ℂ} (hm : Continuous m) {R : ℝ} (hR : ∀ z, R < ‖z‖ → m z = 0) (w : V) (c : ℝ) : Integrable (Function.uncurry fun (x : V) (s : ℝ) => (inner ℝ w x : ℂ) * dilate (Real.exp s) m x) diff --git a/LeanPool/FunctionSpaces/Rd/Sobolev/GagliardoNirenbergSobolev.lean b/LeanPool/FunctionSpaces/Rd/Sobolev/GagliardoNirenbergSobolev.lean index fede82e290..6d21bb5d29 100644 --- a/LeanPool/FunctionSpaces/Rd/Sobolev/GagliardoNirenbergSobolev.lean +++ b/LeanPool/FunctionSpaces/Rd/Sobolev/GagliardoNirenbergSobolev.lean @@ -162,7 +162,7 @@ theorem eLpNorm_le_of_hasCompactSupport_of_hasWeakLineDeriv {p p' : ℝ≥0} (hp noncomputable def cutoffBump : ContDiffBump (0 : V) := ⟨1, 2, one_pos, one_lt_two⟩ /-- The **real cut-off** `χ_R(x) = b(x/R)` with the smooth bump `b = Rd.cutoffBump`, written -`b(R⁻¹ x)`: smooth, with values in `[0, 1]`, equal to `1` on `B̄(0, R)` for `R > 0`. -/ +`b(R⁻¹ x)`: smooth, with values in `[0, 1]`, equal to `1` on `closedBall(0, R)` for `R > 0`. -/ noncomputable def realCutoff (R : ℝ) (x : V) : ℝ := cutoffBump (V := V) (R⁻¹ • x) @@ -187,7 +187,7 @@ theorem hasCompactSupport_realCutoff {R : ℝ} (hR : R ≠ 0) : (Homeomorph.smulOfNeZero R⁻¹ (inv_ne_zero hR)) omit [MeasurableSpace V] [BorelSpace V] in -/-- The cut-off `χ_R` is `1` on `B̄(0, R)`, `R > 0`. -/ +/-- The cut-off `χ_R` is `1` on `closedBall(0, R)`, `R > 0`. -/ theorem realCutoff_eq_one {R : ℝ} (hR : 0 < R) {x : V} (hx : ‖x‖ ≤ R) : realCutoff R x = 1 := by refine (cutoffBump (V := V)).one_of_mem_closedBall ?_ rw [Metric.mem_closedBall, dist_zero_right, norm_smul, Real.norm_of_nonneg (inv_nonneg.2 hR.le)] diff --git a/LeanPool/FunctionSpaces/Rd/Sobolev/SobolevTriebelLizorkin.lean b/LeanPool/FunctionSpaces/Rd/Sobolev/SobolevTriebelLizorkin.lean index 80b9ce2bf9..d81e3c0c69 100644 --- a/LeanPool/FunctionSpaces/Rd/Sobolev/SobolevTriebelLizorkin.lean +++ b/LeanPool/FunctionSpaces/Rd/Sobolev/SobolevTriebelLizorkin.lean @@ -32,10 +32,10 @@ kernels that are proved finite. analysis bound of the Calderón–Zygmund families `((η_α)_{2^j})_j` bounds each sum. * **`F^m_{p,2} ⊆ W^m_p`** (`Rd.exists_hasWeakLineDeriv_of_memTriebelLizorkin`): for `f ∈ F^k_{p,2}(V)` and directions `w ∈ V^k`, the partial sums - `∑_{j < J} (∂^w ψ̃_j) ⋆ (ψ_j ⋆ f)` (`Rd.derivSynthesisSum`) are a Cauchy sequence in `L_p`, by - the synthesis bound of the Calderón–Zygmund family `((∂^w G̃_j)_{2^j})_j` and the tails of the + `∑_{j < J} (∂^w ψTilde_j) ⋆ (ψ_j ⋆ f)` (`Rd.derivSynthesisSum`) are a Cauchy sequence in `L_p`, by + the synthesis bound of the Calderón–Zygmund family `((∂^w GTilde_j)_{2^j})_j` and the tails of the coefficients `2^{jk} ψ_j ⋆ f` in `L_p(ℓ_2)`. They are the weak derivatives `∂^w` of the - reproducing sums `∑_{j < J} ψ̃_j ⋆ (ψ_j ⋆ f) → f`, so their limit `g` is the weak derivative + reproducing sums `∑_{j < J} ψTilde_j ⋆ (ψ_j ⋆ f) → f`, so their limit `g` is the weak derivative `∂^w f`, with `‖g‖_p ≤ C_w ‖f‖_{F^k_{p,2}}` (`Rd.tlToSobolevConst`). For `k ≤ m`, `F^m_{p,2} ⊆ F^k_{p,2}`. * **Synthesis sums**: for Schwartz kernels `K_j` with the synthesis bound @@ -205,7 +205,7 @@ theorem memTriebelLizorkin_of_memSobolev [Nontrivial V] (hp1 : 1 < p) (hp : p /-- The constant `C_w = S_{V,p}(4 ((8π)^k ∏_l ‖w_l‖)², 4 H_{Ã^w})` of the bound `F^k_{p,2} ⊆ W^k_p` for the directions `w ∈ V^k`: the strong type constant `Rd.czConst` of the -Calderón–Zygmund family `((∂^w G̃_j)_{2^j})_j` of the rescaled derivatives of the synthesis +Calderón–Zygmund family `((∂^w GTilde_j)_{2^j})_j` of the rescaled derivatives of the synthesis kernels (`Rd.isCZFamily_derivDualFamily`). -/ noncomputable def tlToSobolevConst (p : ℝ≥0∞) {k : ℕ} (w : Fin k → V) : ℝ≥0∞ := czConst V p (derivDualOverlap w) (4 * familyHormanderConst V (derivDualBound w)) @@ -264,10 +264,10 @@ theorem IsCZFamily.eLpNorm_sum_conv_smul_blockFun_le [Nontrivial V] {θ : ℕ /-- **The synthesis bound for derivatives of the synthesis kernels**: in dimension `n ≥ 1`, for `1 < p < ∞`, directions `w ∈ V^k`, every finite set `s ⊆ ℕ` and `f ∈ L_p(V)`, -`‖∑_{j ∈ s} (∂^w ψ̃_j) ⋆ (ψ_j ⋆ f)‖_p ≤ C_w ‖ x ↦ ‖(1_s(j) 2^{jk} (ψ_j ⋆ f)(x))_j‖_{ℓ_2} ‖_p` -with `C_w = Rd.tlToSobolevConst p w`. Since `∂^w ψ̃_j = 2^{jk} (∂^w G̃_j)_{2^j}` +`‖∑_{j ∈ s} (∂^w ψTilde_j) ⋆ (ψ_j ⋆ f)‖_p ≤ C_w ‖ x ↦ ‖(1_s(j) 2^{jk} (ψ_j ⋆ f)(x))_j‖_{ℓ_2} ‖_p` +with `C_w = Rd.tlToSobolevConst p w`. Since `∂^w ψTilde_j = 2^{jk} (∂^w GTilde_j)_{2^j}` (`Rd.iteratedLineDerivOp_psiDualS`), this is the synthesis bound of the family -`((∂^w G̃_j)_{2^j})_j` with the coefficients `2^{jk}`, `|2^{jk}| = 2^{jk}` +`((∂^w GTilde_j)_{2^j})_j` with the coefficients `2^{jk}`, `|2^{jk}| = 2^{jk}` (`Rd.IsCZFamily.eLpNorm_sum_conv_smul_blockFun_le`). -/ theorem eLpNorm_sum_conv_derivDual_le [Nontrivial V] (hp1 : 1 < p) (hp : p ≠ ∞) {k : ℕ} (w : Fin k → V) (s : Finset ℕ) (f : Lp ℂ p (volume : Measure V)) : @@ -364,8 +364,8 @@ theorem exists_tendsto_sum_conv_blockFun (hp : p ≠ ∞) {σ : ℝ} {K : ℕ exact eLpNorm_lqNorm_ite_blockFun_le _ _ f omit [Fact (1 ≤ p)] in -/-- The **partial sums of the derivative** `∂^w f`: `∑_{j < J} (∂^w ψ̃_j) ⋆ (ψ_j ⋆ f)`, the -derivatives of the reproducing sums `∑_{j < J} ψ̃_j ⋆ (ψ_j ⋆ f)`. -/ +/-- The **partial sums of the derivative** `∂^w f`: `∑_{j < J} (∂^w ψTilde_j) ⋆ (ψ_j ⋆ f)`, the +derivatives of the reproducing sums `∑_{j < J} ψTilde_j ⋆ (ψ_j ⋆ f)`. -/ noncomputable def derivSynthesisSum {k : ℕ} (w : Fin k → V) (f : Lp ℂ p (volume : Measure V)) (J : ℕ) : V → ℂ := fun x => ∑ j ∈ Finset.range J, conv (∂^{w} (psiDualS j) : 𝓢(V, ℂ)) (blockFun j f) volume x @@ -400,7 +400,7 @@ theorem cauchySeq_toLp_derivSynthesisSum [Nontrivial V] (hp1 : 1 < p) (hp : p /-- **The partial sums are weak derivatives**: for `1 ≤ p < ∞`, `w ∈ V^k` and `f ∈ L_p(V)`, `Rd.derivSynthesisSum w f J` is the weak derivative `∂^w` of the reproducing sum -`∑_{j < J} ψ̃_j ⋆ (ψ_j ⋆ f)` on `V` (`Rd.hasWeakLineDeriv_conv` for each term, +`∑_{j < J} ψTilde_j ⋆ (ψ_j ⋆ f)` on `V` (`Rd.hasWeakLineDeriv_conv` for each term, `Rd.HasWeakLineDeriv.sum`). -/ theorem hasWeakLineDeriv_sum_conv_psiDual (hp : p ≠ ∞) {k : ℕ} (w : Fin k → V) (f : Lp ℂ p (volume : Measure V)) (J : ℕ) : diff --git a/LeanPool/FunctionSpaces/Rd/TriebelLizorkin/SquareFunction.lean b/LeanPool/FunctionSpaces/Rd/TriebelLizorkin/SquareFunction.lean index e9904a24e3..da4a55dc38 100644 --- a/LeanPool/FunctionSpaces/Rd/TriebelLizorkin/SquareFunction.lean +++ b/LeanPool/FunctionSpaces/Rd/TriebelLizorkin/SquareFunction.lean @@ -24,7 +24,7 @@ finite (`Rd.squareFunctionConst_ne_top`, `Rd.squareSynthesisConst_ne_top`): * `‖f‖_{F^0_{p,2}} ≤ Q_{V,p} ‖f‖_p` (`Rd.triebelLizorkinNorm_zero_two_le`, constant `Rd.squareFunctionConst`): the analysis bound of the Calderón–Zygmund family `(ψ_j)_j`; -* `‖f‖_p ≤ Q̃_{V,p} ‖f‖_{F^0_{p,2}}` (`Rd.enorm_le_triebelLizorkinNorm_zero_two`, constant +* `‖f‖_p ≤ QTilde_{V,p} ‖f‖_{F^0_{p,2}}` (`Rd.enorm_le_triebelLizorkinNorm_zero_two`, constant `Rd.squareSynthesisConst`): the reproducing formula `∑_{j < J} psiDual_j ⋆ (ψ_j ⋆ f) = ∑_{j < J} Δ_j f` almost everywhere, and these partial sums tend to `f` in `L_p` (`Rd.sum_conv_psiDual_blockFun_ae`, @@ -66,8 +66,8 @@ theorem squareFunctionConst_ne_top {p : ℝ≥0∞} (hp1 : 1 < p) (hp : p ≠ (ENNReal.mul_ne_top ENNReal.ofNat_ne_top (familyHormanderConst_ne_top _)) variable (V) in -/-- The constant `Q̃_{V,p}` of the **lower square function bound** -`‖f‖_p ≤ Q̃_{V,p} ‖f‖_{F^0_{p,2}}`: the strong type constant `Rd.czConst` of the +/-- The constant `QTilde_{V,p}` of the **lower square function bound** +`‖f‖_p ≤ QTilde_{V,p} ‖f‖_{F^0_{p,2}}`: the strong type constant `Rd.czConst` of the Calderón–Zygmund family of the synthesis kernels `psiDual_j`, with overlap `4` and Hörmander constant `4 H_{Ã}`, where `Ã = Rd.psiDualBaseBound V` (`Rd.isCZFamily_psiDual`). -/ noncomputable def squareSynthesisConst (p : ℝ≥0∞) : ℝ≥0∞ := @@ -136,7 +136,8 @@ theorem tendsto_eLpNorm_sum_conv_psiDual_blockFun_sub (hp : p ≠ ∞) /-! ### The lower bound and `L_p = F^0_{p,2}` -/ /-- **The lower square function bound**: in dimension `n ≥ 1`, for `1 < p < ∞` and -`f ∈ L_p(V)`, `‖f‖_p ≤ Q̃_{V,p} ‖f‖_{F^0_{p,2}}` with `Q̃_{V,p} = Rd.squareSynthesisConst V p`. +`f ∈ L_p(V)`, `‖f‖_p ≤ QTilde_{V,p} ‖f‖_{F^0_{p,2}}` with `QTilde_{V,p} = +Rd.squareSynthesisConst V p`. The partial sums `∑_{j < J} Δ_j f` tend to `f` and equal `∑_{j < J} psiDual_j ⋆ (ψ_j ⋆ f)`, whose `L_p` norms the synthesis bound of the Calderón–Zygmund family `(psiDual_j)_j` controls. -/ theorem enorm_le_triebelLizorkinNorm_zero_two [Nontrivial V] (hp1 : 1 < p) (hp : p ≠ ∞) diff --git a/LeanPool/FunctionSpaces/Rd/TriebelLizorkin/TriebelLizorkinAtoms.lean b/LeanPool/FunctionSpaces/Rd/TriebelLizorkin/TriebelLizorkinAtoms.lean index 76245bc04c..8d7ebc4ab7 100644 --- a/LeanPool/FunctionSpaces/Rd/TriebelLizorkin/TriebelLizorkinAtoms.lean +++ b/LeanPool/FunctionSpaces/Rd/TriebelLizorkin/TriebelLizorkinAtoms.lean @@ -245,7 +245,7 @@ theorem IsSmoothAtom.continuous {K : ℕ} {d A : ℝ} {j : ℕ} {c : V} {a : V (ha : IsSmoothAtom univ K d A j c a) : Continuous a := continuousOn_univ.1 ha.contDiffOn.continuousOn -/-- A smooth atom has compact support, in `B̄(c, d 2^(-j))`. -/ +/-- A smooth atom has compact support, in `closedBall(c, d 2^(-j))`. -/ theorem IsSmoothAtom.hasCompactSupport {Ω : Set V} {K : ℕ} {d A : ℝ} {j : ℕ} {c : V} {a : V → ℂ} (ha : IsSmoothAtom Ω K d A j c a) : HasCompactSupport a := HasCompactSupport.intro (isCompact_closedBall c (d / 2 ^ j)) fun x hx => @@ -256,7 +256,8 @@ theorem IsSmoothAtom.integrable {K : ℕ} {d A : ℝ} {j : ℕ} {c : V} {a : V (ha : IsSmoothAtom univ K d A j c a) : Integrable a := ha.continuous.integrable_of_hasCompactSupport ha.hasCompactSupport -/-- `∫ |a| ≤ A |B̄(c, d 2^(-j))| = A d^n |B_1| 2^(-jn)` for a smooth atom `a` on `V` with radius +/-- `∫ |a| ≤ A |closedBall(c, d 2^(-j))| = A d^n |B_1| 2^(-jn)` for a smooth atom `a` on `V` +with radius factor `d ≥ 0`. -/ theorem IsSmoothAtom.lintegral_enorm_le {K : ℕ} {d A : ℝ} (hd : 0 ≤ d) {j : ℕ} {c : V} {a : V → ℂ} (ha : IsSmoothAtom univ K d A j c a) : @@ -273,7 +274,8 @@ theorem IsSmoothAtom.lintegral_enorm_le {K : ℕ} {d A : ℝ} (hd : 0 ≤ d) {j · rw [ENNReal.toReal_one, div_one, ENNReal.rpow_one] /-- **Convolution with a series of atoms, term by term**: for a continuous kernel `K` that -vanishes outside `B̄(0, ρ)`, `ρ ≥ 0`, and smooth atoms `a_m` of level `j` centred at the cells +vanishes outside `closedBall(0, ρ)`, `ρ ≥ 0`, and smooth atoms `a_m` of level `j` centred at the +cells with radius factor `d ≥ 0`, `K ⋆ (∑_m λ_m a_m) = ∑_m λ_m K ⋆ a_m` at every point. Near each point only finitely many atoms meet the support of `y ↦ K(x - y)`. -/ theorem conv_tsum_atom {K : V → ℂ} (hKc : Continuous K) {ρ : ℝ} (hρ : 0 ≤ ρ) @@ -308,7 +310,7 @@ theorem conv_tsum_atom {K : V → ℂ} (hKc : Continuous K) {ρ : ℝ} (hρ : 0 /-- **Convolution with a series of atoms, bounded term by term**: if `f = ∑_m λ_m a_m` almost everywhere, for smooth atoms `a_m` of level `j` centred at the cells with radius factor `d ≥ 0`, then `|K ⋆ f(x)| ≤ ∑_m |λ_m| |K ⋆ a_m(x)|` at every point, for a continuous kernel `K` that -vanishes outside `B̄(0, ρ)`, `ρ ≥ 0`. -/ +vanishes outside `closedBall(0, ρ)`, `ρ ≥ 0`. -/ theorem enorm_conv_le_tsum_atom {K : V → ℂ} (hKc : Continuous K) {ρ : ℝ} (hρ : 0 ≤ ρ) (hKρ : ∀ y, ρ < ‖y‖ → K y = 0) {k : ℕ} {d A : ℝ} (hd : 0 ≤ d) {j : ℕ} {coef : (Fin (finrank ℝ V) → ℤ) → ℂ} {a : (Fin (finrank ℝ V) → ℤ) → V → ℂ} diff --git a/LeanPool/FunctionSpaces/Rd/TriebelLizorkin/TriebelLizorkinDifferences.lean b/LeanPool/FunctionSpaces/Rd/TriebelLizorkin/TriebelLizorkinDifferences.lean index 36a7334e47..aadaf3df45 100644 --- a/LeanPool/FunctionSpaces/Rd/TriebelLizorkin/TriebelLizorkinDifferences.lean +++ b/LeanPool/FunctionSpaces/Rd/TriebelLizorkin/TriebelLizorkinDifferences.lean @@ -509,7 +509,7 @@ theorem enorm_higherDiff_dual_le_mul (L i : ℕ) (h y : V) : /-- **Differences of the dual kernels for short steps**: for `i ≤ j` and `‖h‖ < 2^(-j)`, `|Δ^L_h η_i| ≤ A_L 2^(in) 2^(-(j-i)L) 1_{B(0, (2LR + L + 1) 2^(-i))}`, since `η_i` vanishes -outside `B̄(0, 2LR 2^(-i))` and the points `y + l h`, `l ≤ L`, move by at most +outside `closedBall(0, 2LR 2^(-i))` and the points `y + l h`, `l ≤ L`, move by at most `L 2^(-j) ≤ L 2^(-i)`. -/ theorem enorm_higherDiff_dual_le_indicator (L : ℕ) {i j : ℕ} (hij : i ≤ j) {h : V} (hh : h ∈ ball (0 : V) (1 / 2 ^ j)) (y : V) : diff --git a/LeanPool/FunctionSpaces/Torus/BesovInterpolation.lean b/LeanPool/FunctionSpaces/Torus/BesovInterpolation.lean index 9c14fe63e4..a0f8fcde6e 100644 --- a/LeanPool/FunctionSpaces/Torus/BesovInterpolation.lean +++ b/LeanPool/FunctionSpaces/Torus/BesovInterpolation.lean @@ -19,7 +19,7 @@ For `1 ≤ p < ∞` and Besov spaces by differences of order `r` on `𝕋^d`, wi `ApproximationScheme.ModulusData.modCouple` of `Torus.lpModulusData`), `0 < s₀ < s₁ < r`, `0 < η < 1`, `1 ≤ q₀, q₁, q ≤ ∞` and `s = (1-η)s₀ + ηs₁`, -`f ∈ (B^{s₀}_{p,q₀}, B^{s₁}_{p,q₁})_{η,q} ⟺ ‖f‖_p + ‖(2^(ks) ω_r(f, 2^(-k))_p)_k‖_{ℓ_q} < ∞` +`f ∈ (B^{s₀}_{p,q₀}, B^{s₁}_{p,q₁})_{η,q} ↔ ‖f‖_p + ‖(2^(ks) ω_r(f, 2^(-k))_p)_k‖_{ℓ_q} < ∞` (`Torus.memKMethod_modCouple_iff`), and `(L_p, B^{s₁}_{p,q₁})_{η,q} = B^{ηs₁}_{p,q}` by differences (`Torus.memKMethod_leftModCouple_iff`). The approximation spaces of the diff --git a/LeanPool/FunctionSpaces/Torus/LpBesovModuli.lean b/LeanPool/FunctionSpaces/Torus/LpBesovModuli.lean index 3f5574c7e3..6688130420 100644 --- a/LeanPool/FunctionSpaces/Torus/LpBesovModuli.lean +++ b/LeanPool/FunctionSpaces/Torus/LpBesovModuli.lean @@ -28,7 +28,7 @@ For `1 ≤ p < ∞` and an order `r ≥ 1`, the modulus of smoothness `ω_r(f, 2 Hence, for `0 < s < r` and `1 ≤ q ≤ ∞`, the Besov space `B^s_{p,q}(𝕋^d)` of the trigonometric scheme is described by moduli of smoothness (`Torus.memBesov_iff_modNorm_lt_top_lp`): -`f ∈ B^s_{p,q}(𝕋^d) ⟺ ‖f‖_p + ‖(2^(ks) ω_r(f, 2^(-k))_p)_k‖_{ℓ_q} < ∞`, +`f ∈ B^s_{p,q}(𝕋^d) ↔ ‖f‖_p + ‖(2^(ks) ω_r(f, 2^(-k))_p)_k‖_{ℓ_q} < ∞`, with equivalent quasi-norms (`Torus.approxNormDyadic_le_modNorm_lp`, `Torus.modNorm_le_approxNormDyadic_lp`). diff --git a/LeanPool/FunctionSpaces/Torus/NTermFourier.lean b/LeanPool/FunctionSpaces/Torus/NTermFourier.lean index 6966fa7aec..47002b5730 100644 --- a/LeanPool/FunctionSpaces/Torus/NTermFourier.lean +++ b/LeanPool/FunctionSpaces/Torus/NTermFourier.lean @@ -23,7 +23,7 @@ approximates `f` by combinations `∑_{k ∈ Λ} c_k e_k` of at most `n` monomia (`HilbertBasis.memApprox_nTerm_iff`) describes its approximation spaces by the Fourier coefficients: for `0 < τ < 2` and `θ = 1/τ - 1/2`, -`f ∈ A^θ_τ(L_2(𝕋^d), n-term) ⟺ ∑_{k ∈ ℤ^d} |f̂(k)|^τ < ∞` (`Torus.memApprox_nTerm_iff`). +`f ∈ A^θ_τ(L_2(𝕋^d), n-term) ↔ ∑_{k ∈ ℤ^d} |f̂(k)|^τ < ∞` (`Torus.memApprox_nTerm_iff`). For `τ = 1` the right side says that the Fourier series of `f` converges absolutely, Stechkin's original setting. Linear approximation by the trigonometric polynomials of degree `< n` leads diff --git a/LeanPool/FunctionSpaces/Torus/SobolevTriebelLizorkin.lean b/LeanPool/FunctionSpaces/Torus/SobolevTriebelLizorkin.lean index d4fc37e0c4..d7da374bff 100644 --- a/LeanPool/FunctionSpaces/Torus/SobolevTriebelLizorkin.lean +++ b/LeanPool/FunctionSpaces/Torus/SobolevTriebelLizorkin.lean @@ -33,7 +33,7 @@ Calderón–Zygmund families of `FunctionSpaces.Rd.Sobolev.DerivativeKernels`. (`Torus.eLpNorm_lqNorm_econv_le`) bounds each sum. * **`F^m_{p,2} ⊆ W^m_p`** (`Torus.exists_hasWeakLineDeriv_of_memTriebelLizorkin`): for `f ∈ F^k_{p,2}(𝕋^d)` and directions `w ∈ (ℝ^d)^k`, the partial sums - `∑_{j < J} (∂^w ψ̃_j) ⋆ Δ_j f` (`Torus.derivSynthesisSum`) are the weak derivatives `∂^w` of + `∑_{j < J} (∂^w ψTilde_j) ⋆ Δ_j f` (`Torus.derivSynthesisSum`) are the weak derivatives `∂^w` of `∑_{j < J} Δ_j f → f`, and a Cauchy sequence in `L_p(𝕋^d)` by the synthesis bound on the torus (`Torus.eLpNorm_sum_econv_le`); their limit `g` is `∂^w f`, with `‖g‖_p ≤ C_w ‖f‖_{F^k_{p,2}}`. @@ -242,7 +242,8 @@ theorem memTriebelLizorkin_of_memSobolev [Nonempty d] (hp1 : 1 < p) (hp : p ≠ variable (d) in /-- The constant `C_w` of the bound `F^k_{p,2} ⊆ W^k_p` on the torus for the directions `w ∈ (ℝ^d)^k`: the constant `Torus.periodicCZConst d p B (4 H_{Ã^w}) (2 T_{Ã^w})` of the -Calderón–Zygmund family `((∂^w G̃_j)_{2^j})_j` (`Rd.isCZFamily_derivDualFamily`), with the overlap +Calderón–Zygmund family `((∂^w GTilde_j)_{2^j})_j` (`Rd.isCZFamily_derivDualFamily`), with the +overlap `B = 4 ((8π)^k ∏_l ‖w_l‖)²` (`Rd.derivDualOverlap`) and the far mass bound `2 T_{Ã^w}` (`Torus.farMass_derivDualFamily_le`), where `Ã^w = Rd.derivDualBound w`. -/ noncomputable def tlToSobolevConst (p : ℝ≥0∞) {k : ℕ} (w : Fin k → EuclideanSpace ℝ d) : @@ -261,8 +262,8 @@ theorem tlToSobolevConst_ne_top (hp1 : 1 < p) (hp : p ≠ ∞) {k : ℕ} /-- **The synthesis bound for derivatives of the synthesis kernels on the torus**: for `d ≥ 1`, `1 < p < ∞`, directions `w ∈ (ℝ^d)^k`, every finite set `s ⊆ ℕ` and `f ∈ L_p(𝕋^d)`, -`‖∑_{j ∈ s} (∂^w ψ̃_j) ⋆ Δ_j f‖_p ≤ C_w ‖ t ↦ ‖(1_s(j) 2^{jk} (ψ_j ⋆ f)(t))_j‖_{ℓ_2} ‖_p` with -`C_w = Torus.tlToSobolevConst d p w`. Since `∂^w ψ̃_j = 2^{jk} (∂^w G̃_j)_{2^j}` +`‖∑_{j ∈ s} (∂^w ψTilde_j) ⋆ Δ_j f‖_p ≤ C_w ‖ t ↦ ‖(1_s(j) 2^{jk} (ψ_j ⋆ f)(t))_j‖_{ℓ_2} ‖_p` with +`C_w = Torus.tlToSobolevConst d p w`. Since `∂^w ψTilde_j = 2^{jk} (∂^w GTilde_j)_{2^j}` (`Rd.iteratedLineDerivOp_psiDualS`), this is the synthesis bound on the torus (`Torus.eLpNorm_sum_econv_le`) with the coefficients `1_s(j) 2^{jk} Δ_j f`. -/ theorem enorm_sum_econvLp_derivDual_le [Nonempty d] (hp1 : 1 < p) (hp : p ≠ ∞) {k : ℕ} @@ -298,7 +299,7 @@ theorem enorm_sum_econvLp_derivDual_le [Nonempty d] (hp1 : 1 < p) (hp : p ≠ fun j => (Lp.memLp _).const_smul _ /-- The **partial sums of the derivative** `∂^w f` on the torus: -`∑_{j < J} (∂^w ψ̃_j) ⋆ Δ_j f ∈ L_p(𝕋^d)`, the derivatives of the partial sums +`∑_{j < J} (∂^w ψTilde_j) ⋆ Δ_j f ∈ L_p(𝕋^d)`, the derivatives of the partial sums `∑_{j < J} Δ_j f` (`Torus.hasWeakLineDeriv_sum_lpBlock`). -/ noncomputable def derivSynthesisSum (hp : p ≠ ∞) {k : ℕ} (w : Fin k → EuclideanSpace ℝ d) (f : Lp ℂ p (volume : Measure (UnitAddTorus d))) (J : ℕ) : @@ -308,7 +309,7 @@ noncomputable def derivSynthesisSum (hp : p ≠ ∞) {k : ℕ} (w : Fin k → Eu /-- **The partial sums are weak derivatives**: for `1 ≤ p < ∞`, `w ∈ (ℝ^d)^k` and `f ∈ L_p(𝕋^d)`, `Torus.derivSynthesisSum hp w f J = ∂^w (∑_{j < J} Δ_j f)`. Each term is -`∂^w (ψ̃_j ⋆ Δ_j f)` (`Torus.hasWeakLineDeriv_econvLp`), and `ψ̃_j ⋆ Δ_j f = Δ_j f` +`∂^w (ψTilde_j ⋆ Δ_j f)` (`Torus.hasWeakLineDeriv_econvLp`), and `ψTilde_j ⋆ Δ_j f = Δ_j f` (`Torus.econvLp_psiDual_lpBlock`). -/ theorem hasWeakLineDeriv_sum_lpBlock (hp : p ≠ ∞) {k : ℕ} (w : Fin k → EuclideanSpace ℝ d) (f : Lp ℂ p (volume : Measure (UnitAddTorus d))) (J : ℕ) : diff --git a/LeanPool/FunctionSpaces/Torus/SquareFunction.lean b/LeanPool/FunctionSpaces/Torus/SquareFunction.lean index 8be50afc30..bf57d97019 100644 --- a/LeanPool/FunctionSpaces/Torus/SquareFunction.lean +++ b/LeanPool/FunctionSpaces/Torus/SquareFunction.lean @@ -24,7 +24,7 @@ two-sided bound of this norm by `‖f‖_p`, with named constants that are prove * `‖f‖_{F^0_{p,2}(𝕋^d)} ≤ Q^𝕋_p ‖f‖_p` (`Torus.triebelLizorkinNorm_zero_two_le`, constant `Torus.squareFunctionConst`): the analysis bound of the vector-valued singular integrals on the torus for the Calderón–Zygmund family `(ψ_j)_j`; -* `‖f‖_p ≤ Q̃^𝕋_p ‖f‖_{F^0_{p,2}(𝕋^d)}` (`Torus.enorm_le_triebelLizorkinNorm_zero_two`, +* `‖f‖_p ≤ QTilde^𝕋_p ‖f‖_{F^0_{p,2}(𝕋^d)}` (`Torus.enorm_le_triebelLizorkinNorm_zero_two`, constant `Torus.squareSynthesisConst`): the synthesis kernels reproduce the blocks, `psiDual_j ⋆ Δ_j f = Δ_j f` (`Torus.econvLp_psiDual_lpBlock`), so `∑_{j ∈ s} psiDual_j ⋆ Δ_j f = ∑_{j ∈ s} Δ_j f` almost everywhere @@ -67,7 +67,7 @@ theorem squareFunctionConst_ne_top {p : ℝ≥0∞} (hp1 : 1 < p) (hp : p ≠ (ENNReal.mul_ne_top ENNReal.ofNat_ne_top (Rd.familyTailConst_ne_top _ _ _)) variable (d) in -/-- The constant `Q̃^𝕋_p` of the **lower square function bound on the torus**: the constant +/-- The constant `QTilde^𝕋_p` of the **lower square function bound on the torus**: the constant `Torus.periodicCZConst` of the Calderón–Zygmund family of the synthesis kernels `psiDual_j`, with overlap `4`, Hörmander constant `4 H_Ã` and far mass bound `2 T_Ã`, where `Ã = Rd.psiDualBaseBound` (`Rd.isCZFamily_psiDual`, `Torus.farMass_psiDual_le`). -/ @@ -127,8 +127,8 @@ theorem sum_econv_psiDual_lpBlock_ae (hp : p ≠ ∞) (s : Finset ℕ) /-! ### The lower bound and `L_p = F^0_{p,2}` -/ /-- **The lower square function bound on the torus**: for `d ≥ 1`, `1 < p < ∞` and -`f ∈ L_p(𝕋^d)`, `‖f‖_p ≤ Q̃^𝕋_p ‖f‖_{F^0_{p,2}(𝕋^d)}` with -`Q̃^𝕋_p = Torus.squareSynthesisConst d p`. The partial sums `∑_{j < J} Δ_j f` tend to `f` +`f ∈ L_p(𝕋^d)`, `‖f‖_p ≤ QTilde^𝕋_p ‖f‖_{F^0_{p,2}(𝕋^d)}` with +`QTilde^𝕋_p = Torus.squareSynthesisConst d p`. The partial sums `∑_{j < J} Δ_j f` tend to `f` (`Torus.tendsto_sum_lpBlock`) and equal `∑_{j < J} psiDual_j ⋆ Δ_j f`, whose `L_p` norms the synthesis bound on the torus (`Torus.eLpNorm_sum_econv_le`) for the family `(psiDual_j)_j` controls. -/ diff --git a/LeanPool/FunctionSpaces/Wavelets/Examples/Daubechies/Besov.lean b/LeanPool/FunctionSpaces/Wavelets/Examples/Daubechies/Besov.lean index 5bf4c09d92..d4d7d7dfcd 100644 --- a/LeanPool/FunctionSpaces/Wavelets/Examples/Daubechies/Besov.lean +++ b/LeanPool/FunctionSpaces/Wavelets/Examples/Daubechies/Besov.lean @@ -30,14 +30,14 @@ Besov spaces `B^s_{p,q}(ℝ)` by the coefficients `⟨f, φ(· - k)⟩` and `⟨ Bernstein bound `ω_N(φ, t)_p ≤ K t^θ` for `0 < t ≤ 1` (`Daubechies.BernsteinBound`), then for `0 < s < θ` and every `f ∈ L_p(ℝ)` -`‖f‖_p + ‖(2^(ks) ω_N(f, 2^(-k))_p)_k‖_{ℓ_q} < ∞ ⟺ ‖f‖_coef < ∞`. +`‖f‖_p + ‖(2^(ks) ω_N(f, 2^(-k))_p)_k‖_{ℓ_q} < ∞ ↔ ‖f‖_coef < ∞`. * **Approximation and moduli.** Jackson's inequality `E_{2^k}(f)_p ≤ C_J ω_N(f, 2^(-k))_p` (`Daubechies.approxError_scheme_le`) and the inverse inequality `ω_N(a, 2^(-k))_p ≤ C_B 2^(-(k-j)θ) ‖a‖_p` for `a ∈ V_j` (`Daubechies.inverse_scheme`) make the modulus of smoothness compatible with the Daubechies scheme (`Daubechies.modulusData`), so the coincidence theorem `ApproximationScheme.ModulusData.memApprox_iff_modNorm_lt_top` gives - `f ∈ A^s_q ⟺ ‖f‖_p + ‖(2^(ks) ω_N(f, 2^(-k))_p)_k‖_{ℓ_q} < ∞` for `0 ≤ s < θ` + `f ∈ A^s_q ↔ ‖f‖_p + ‖(2^(ks) ω_N(f, 2^(-k))_p)_k‖_{ℓ_q} < ∞` for `0 ≤ s < θ` (`Daubechies.memApprox_scheme_iff_modulus`). * **Approximation and coefficients.** The projections `P_j` form a projection scheme with dense union (`Daubechies.projectionScheme`, `Daubechies.closure_iUnion_scheme`), so `f ∈ A^s_q` iff @@ -46,7 +46,7 @@ Bernstein bound `ω_N(φ, t)_p ≤ K t^θ` for `0 < t ≤ 1` (`Daubechies.Bernst wavelet expansions of level `j` (`Daubechies.proj_succ_sub_proj`), and their norms are comparable with `2^(j(1/2 - 1/p)) ‖(⟨f, ψ_{j,k}⟩)_k‖_{ℓ_p}` (`Daubechies.enorm_block_equiv`); likewise `‖P_0 f‖_p` with `‖(⟨f, φ(· - k)⟩)_k‖_{ℓ_p}` (`Daubechies.enorm_proj_zero_equiv`). - Hence `f ∈ A^s_q ⟺ ‖f‖_coef < ∞` for `s > 0` (`Daubechies.memApprox_scheme_iff_coeff`). + Hence `f ∈ A^s_q ↔ ‖f‖_coef < ∞` for `s > 0` (`Daubechies.memApprox_scheme_iff_coeff`). * **Littlewood–Paley.** For `0 < s < min(θ, N)` the coefficient condition is also equivalent to the finiteness of the Littlewood–Paley quasi-norm `‖(2^(js) ‖Δ_j f‖_p)_j‖_{ℓ_q}` (`Daubechies.littlewoodPaleyNorm_lt_top_iff_coeff`, through diff --git a/LeanPool/FunctionSpaces/Wavelets/Examples/Daubechies/FejerRiesz.lean b/LeanPool/FunctionSpaces/Wavelets/Examples/Daubechies/FejerRiesz.lean index 18a2cc9c89..39fabe80d5 100644 --- a/LeanPool/FunctionSpaces/Wavelets/Examples/Daubechies/FejerRiesz.lean +++ b/LeanPool/FunctionSpaces/Wavelets/Examples/Daubechies/FejerRiesz.lean @@ -31,7 +31,7 @@ Lean the modulus is the norm `‖·‖` of `ℂ`, and `L(e^{iθ})` is `(a + a⁻¹)/2 = t`, has exactly one root `a(t)` with `|a(t)| < 1` (`Complex.joukowskyInv`): the two roots have product `1`, and a root on the unit circle would give `t = Re a ∈ [-1, 1]` (`Complex.exists_joukowsky_root`, `Complex.joukowsky_root_unique`). Uniqueness gives -`a(t̄) = conj (a(t))` (`Complex.joukowskyInv_conj`). On the unit circle the factor `cos θ - t` of +`a(tBar) = conj (a(t))` (`Complex.joukowskyInv_conj`). On the unit circle the factor `cos θ - t` of `Q` splits into two linear factors: for `z = e^{iθ}`, `2 |a| |cos θ - t| = |1 - a z| |1 - ā z|` (`Complex.joukowsky_two_mul_norm_mul_norm_re_sub`). @@ -41,7 +41,7 @@ in `[-1, 1]`, and the roots are invariant under conjugation (`Polynomial.map_con product `L₀ = ∏_t (1 - a(t) X)` (`Polynomial.fejerRieszFactor`) has its roots `1/a(t)` outside the closed unit disk (`Polynomial.eval_fejerRieszFactor_ne_zero`) and coefficients fixed by conjugation, so it is a real polynomial (`Polynomial.exists_map_eq_of_map_conj_eq`). With -`∏_t |1 - ā(t) z| = ∏_t |1 - a(t̄) z| = ∏_t |1 - a(t) z|` the identity above gives +`∏_t |1 - ā(t) z| = ∏_t |1 - a(tBar) z| = ∏_t |1 - a(t) z|` the identity above gives `Q(cos θ) = K |L₀(e^{iθ})|²` with `K = |c| / ∏_t 2|a(t)| > 0` (`Polynomial.exists_eval_cos_eq_mul_norm_sq`). Finally `L = ±√K L₀`, the sign chosen such that `L(1) > 0` (`Polynomial.exists_eval_one_pos_of_aeval_ne_zero`); here `L(1) ≠ 0` since `L` has no @@ -121,7 +121,7 @@ theorem joukowsky_root_ne_zero {a t : ℂ} (h : a ^ 2 - 2 * t * a + 1 = 0) : a rintro rfl norm_num at h -/-- If `a² - 2ta + 1 = 0`, then `ā² - 2 t̄ ā + 1 = 0`: conjugation is a ring homomorphism. -/ +/-- If `a² - 2ta + 1 = 0`, then `ā² - 2 tBar ā + 1 = 0`: conjugation is a ring homomorphism. -/ theorem joukowsky_root_conj {a t : ℂ} (h : a ^ 2 - 2 * t * a + 1 = 0) : conj a ^ 2 - 2 * conj t * conj a + 1 = 0 := by have := congrArg conj h @@ -150,9 +150,9 @@ theorem joukowskyInv_eq {a t : ℂ} (ha : ‖a‖ < 1) (h : a ^ 2 - 2 * t * a + have hspec := joukowskyInv_spec ⟨a, ha, h⟩ joukowsky_root_unique hspec.1 ha hspec.2 h -/-- **The inverse of the Joukowsky map commutes with conjugation**, `a(t̄) = conj (a(t))`, for +/-- **The inverse of the Joukowsky map commutes with conjugation**, `a(tBar) = conj (a(t))`, for every `t ∈ ℂ`: conjugation maps the roots of `a² - 2ta + 1` in the disk to those of -`a² - 2t̄a + 1`, and the root in the disk is unique. -/ +`a² - 2tBara + 1`, and the root in the disk is unique. -/ theorem joukowskyInv_conj (t : ℂ) : joukowskyInv (conj t) = conj (joukowskyInv t) := by by_cases h : ∃ a : ℂ, ‖a‖ < 1 ∧ a ^ 2 - 2 * t * a + 1 = 0 · have hspec := joukowskyInv_spec h @@ -162,7 +162,7 @@ theorem joukowskyInv_conj (t : ℂ) : joukowskyInv (conj t) = conj (joukowskyInv rw [joukowskyInv, dite_eq_right h', joukowskyInv, dite_eq_right h, map_zero] /-- **The factorisation on the unit circle**, algebraic form: if `a² - 2ta + 1 = 0` and -`z z̄ = 1`, then `2a (Re z - t) = -(1 - a z)(1 - a z̄)`, from `z + z̄ = 2 Re z`. -/ +`z zBar = 1`, then `2a (Re z - t) = -(1 - a z)(1 - a zBar)`, from `z + zBar = 2 Re z`. -/ theorem joukowsky_two_mul_mul_re_sub {a t z : ℂ} (h : a ^ 2 - 2 * t * a + 1 = 0) (hz : z * conj z = 1) : 2 * a * ((z.re : ℂ) - t) = -((1 - a * z) * (1 - a * conj z)) := by have h2 : z + conj z = 2 * (z.re : ℂ) := by @@ -173,7 +173,7 @@ theorem joukowsky_two_mul_mul_re_sub {a t z : ℂ} (h : a ^ 2 - 2 * t * a + 1 = /-- **The factorisation on the unit circle.** If `a² - 2ta + 1 = 0` and `|z| = 1`, then `2 |a| |Re z - t| = |1 - a z| |1 - ā z|`; for `z = e^{iθ}` the left side contains -`|cos θ - t|`. Here `|1 - a z̄| = |1 - ā z|` by conjugation. -/ +`|cos θ - t|`. Here `|1 - a zBar| = |1 - ā z|` by conjugation. -/ theorem joukowsky_two_mul_norm_mul_norm_re_sub {a t z : ℂ} (h : a ^ 2 - 2 * t * a + 1 = 0) (hz : ‖z‖ = 1) : 2 * ‖a‖ * ‖(z.re : ℂ) - t‖ = ‖1 - a * z‖ * ‖1 - conj a * z‖ := by have hz' : z * conj z = 1 := by @@ -192,7 +192,7 @@ namespace Polynomial /-! ### The complex roots of a real polynomial -/ /-- **The complex roots of a real polynomial are invariant under conjugation**, with -multiplicities: the multiset `t̄` over the roots `t` of `Q` is the multiset of roots of `Q`. -/ +multiplicities: the multiset `tBar` over the roots `t` of `Q` is the multiset of roots of `Q`. -/ theorem map_conj_aroots (Q : ℝ[X]) : (Q.aroots ℂ).map conj = Q.aroots ℂ := by rw [aroots_def, roots_map_of_injective_of_card_eq_natDegree (RingHom.injective _) IsAlgClosed.card_roots_eq_natDegree, Polynomial.map_map] @@ -200,7 +200,8 @@ theorem map_conj_aroots (Q : ℝ[X]) : (Q.aroots ℂ).map conj = Q.aroots ℂ := exact RingHom.ext fun r => by simp /-- Conjugation can be dropped inside a function of the complex roots of a real polynomial: -the multisets `g(t̄)` and `g(t)` over the roots `t` of `Q` agree (`Polynomial.map_conj_aroots`). -/ +the multisets `g(tBar)` and `g(t)` over the roots `t` of `Q` agree +(`Polynomial.map_conj_aroots`). -/ theorem map_comp_conj_aroots {M : Type*} (Q : ℝ[X]) (g : ℂ → M) : (Q.aroots ℂ).map (fun t => g (conj t)) = (Q.aroots ℂ).map g := by calc (Q.aroots ℂ).map (fun t => g (conj t)) = ((Q.aroots ℂ).map conj).map g := @@ -269,7 +270,7 @@ theorem natDegree_fejerRieszFactor_le (Q : ℝ[X]) : exact card_roots_map_le_natDegree Q /-- **The Fejér–Riesz factor has coefficients fixed by conjugation**: conjugating the -coefficients replaces `a(t)` by `conj (a(t)) = a(t̄)` (`Complex.joukowskyInv_conj`), and the roots +coefficients replaces `a(t)` by `conj (a(t)) = a(tBar)` (`Complex.joukowskyInv_conj`), and the roots `t` of `Q` are invariant under conjugation (`Polynomial.map_comp_conj_aroots`). -/ theorem map_conj_fejerRieszFactor (Q : ℝ[X]) : (fejerRieszFactor Q).map (starRingEnd ℂ) = fejerRieszFactor Q := by @@ -303,7 +304,7 @@ theorem eval_fejerRieszFactor_ne_zero {Q : ℝ[X]} (hQ : ∀ r ∈ Set.Icc (-1 : rw [← sub_eq_zero.1 h, norm_one] at h1 exact lt_irrefl _ h1 -/-- **A complex polynomial with coefficients fixed by conjugation is real**: if `P̄ = P` +/-- **A complex polynomial with coefficients fixed by conjugation is real**: if `PBar = P` coefficientwise, then `P` is the image of a real polynomial (each coefficient equals its real part; Mathlib's `Polynomial.lifts`). -/ theorem exists_map_eq_of_map_conj_eq {P : ℂ[X]} (h : P.map (starRingEnd ℂ) = P) : @@ -318,7 +319,7 @@ theorem exists_map_eq_of_map_conj_eq {P : ℂ[X]} (h : P.map (starRingEnd ℂ) = `∏_t 2|a(t)| · ∏_t |cos θ - t| = |L₀(e^{iθ})|²` over the complex roots `t` of `Q`: each factor is `|1 - a(t) z| |1 - conj (a(t)) z|` with `z = e^{iθ}` (`Complex.joukowsky_two_mul_norm_mul_norm_re_sub`), and -`∏_t |1 - conj (a(t)) z| = ∏_t |1 - a(t̄) z| = ∏_t |1 - a(t) z|`. -/ +`∏_t |1 - conj (a(t)) z| = ∏_t |1 - a(tBar) z| = ∏_t |1 - a(t) z|`. -/ theorem prod_two_mul_norm_mul_prod_norm_eq {Q : ℝ[X]} (hQ : ∀ r ∈ Set.Icc (-1 : ℝ) 1, 0 < Q.eval r) (θ : ℝ) : ((Q.aroots ℂ).map fun t => 2 * ‖Complex.joukowskyInv t‖).prod * diff --git a/LeanPool/FunctionSpaces/Wavelets/Examples/DyadicStepsQuasiBanach.lean b/LeanPool/FunctionSpaces/Wavelets/Examples/DyadicStepsQuasiBanach.lean index 5dd4cd57d9..4a9a0f607c 100644 --- a/LeanPool/FunctionSpaces/Wavelets/Examples/DyadicStepsQuasiBanach.lean +++ b/LeanPool/FunctionSpaces/Wavelets/Examples/DyadicStepsQuasiBanach.lean @@ -51,14 +51,18 @@ With the coincidence theorem for `ρ`-normed couples (`InterpCouple.ModulusData` `Haar.stepModulusData` with `ρ = p` and `θ = 1/p`) this gives, for `0 < p ≤ 1`, `q ≠ 0` and `0 < s < 1/p` (`Haar.memEMethod_stepCouple_iff_modulus`), -`f ∈ A^s_q(L_p[0, 1], steps) ⟺ ‖f‖_p + ‖(2^(ks) ω_1(f, 2^(-k), [0, 1])_p)_k‖_{ℓ_q} < ∞`, +`f ∈ A^s_q(L_p[0, 1], steps) ↔ ‖f‖_p + ‖(2^(ks) ω_1(f, 2^(-k), [0, 1])_p)_k‖_{ℓ_q} < ∞`, the Besov space `B^s_{p,q,1}[0, 1]` of the first modulus (P. Oswald, *Approximation by splines in the `L_p` metric, `0 < p < 1`*, Math. Nachr. 94 (1980), Theorem 6, in Russian; see Oswald, *Haar system as Schauder basis in Besov spaces: The limiting cases for `0 < p ≤ 1`*, -arXiv:1808.08156, (7)). For `s < 1` it is the Besov space of DeVore–Popov (Trans. Amer. Math. Soc. -305 (1988), (2.4) with `r = 1`, Theorem 5.1); for `1/p - 1 < s < 1` and `q < ∞` it is also the -Fourier-analytic `B^s_{p,q}[0, 1]` (Oswald 2018, (2)). For `s > 1`, and for `s = 1` with +[arXiv:1808.08156](https://arxiv.org/abs/1808.08156), (7), for `p < 1` and `q < ∞`). +Oswald's later [arXiv:2002.12917](https://arxiv.org/abs/2002.12917), Lemma 1, includes `p = 1` +and discusses `q = ∞`. The Lean result is the univariate membership equivalence for complex +functions. For `s < 1` the first-modulus space is the Besov space of DeVore–Popov +(Trans. Amer. Math. Soc. 305 (1988), (2.4) with `r = 1`, Theorem 5.1). For +`1/p - 1 < s < 1` and `q < ∞` it is also the Fourier-analytic `B^s_{p,q}[0, 1]` +(Oswald 2018, (2)). For `s > 1`, and for `s = 1` with `q < ∞`, it differs from the space of the second modulus: the line `x ↦ x` has `ω_2 = 0` (`Haar.lpModulus_two_idLp`) but `E(2^j, x)_p ≥ 2^(-1/p) 2^(-j)/4` (`Haar.le_eFunctional_stepCouple_idLp`), so it lies outside `A^s_q(L_p, steps)` @@ -570,9 +574,10 @@ theorem eNormDyadic_stepCouple_lt_top_iff_modulus (hp0 : p ≠ 0) (hp1 : p ≤ 1 `0 < s < 1/p`, `f ∈ L_p[0, 1]` lies in the approximation space `E_{s,q}` of the step couple (`A^s_q(L_p, steps)`) iff `‖f‖_p + ‖(2^(ks) ω_1(f, 2^(-k), [0, 1])_p)_k‖_{ℓ_q} < ∞`, the space `B^s_{p,q,1}[0, 1]` of the -first modulus (Oswald 1980, Theorem 6; Oswald 2018, (7)). For `s < 1` this is the Besov space of -DeVore–Popov (1988), (2.4) with `r = 1` (their Theorem 5.1 at `r = 1`); for `1/p - 1 < s < 1` -and `q < ∞` it is also the Fourier-analytic `B^s_{p,q}[0, 1]` (Oswald 2018, (2)); for `s > 1`, +first modulus (Oswald, arXiv:2002.12917, Lemma 1 and the discussion of `q = ∞`). +For `s < 1` this is the Besov space of DeVore–Popov (1988), (2.4) with `r = 1` +(their Theorem 5.1 at `r = 1`). For `1/p - 1 < s < 1` and `q < ∞` it is also the +Fourier-analytic `B^s_{p,q}[0, 1]` (Oswald 2018, (2)). For `s > 1`, and for `s = 1` with `q < ∞`, it misses the line `x ↦ x`, whose second modulus vanishes (`Haar.not_memEMethod_stepCouple_idLp`). -/ theorem memEMethod_stepCouple_iff_modulus (hp0 : p ≠ 0) (hp1 : p ≤ 1) (hq0 : q ≠ 0) diff --git a/LeanPool/projects/function-spaces.yaml b/LeanPool/projects/function-spaces.yaml index b58f4fb570..075ffb6d8f 100644 --- a/LeanPool/projects/function-spaces.yaml +++ b/LeanPool/projects/function-spaces.yaml @@ -24,15 +24,15 @@ provenance_evidence: >- Ullrich for the mathematical design and choice of statements. main_declarations: - Rd.LocalMeansBump.besov_iff_atomic -- Rd.LocalMeansBump.memTriebelLizorkin_iff_atomic +- Rd.memTriebelLizorkin_iff_atomic - Rd.memSobolev_bessel_iff_memTriebelLizorkinDistr - Daubechies.besov_iff_coeff_d4 - Haar.memEMethod_stepCouple_iff_modulus - ApproximationScheme.memKMethod_reiteration main_results: - declaration: Rd.LocalMeansBump.besov_iff_atomic - informal: For finite p at least one, q at least one, and smoothness between zero and the integer atom order, finite Besov difference norm for a fixed local-means bump is equivalent to a regular-atom expansion with bounded overlap and finite coefficient norm. -- declaration: Rd.LocalMeansBump.memTriebelLizorkin_iff_atomic + informal: Given a local-means bump, for finite p at least one, q at least one, and smoothness between zero and the integer atom order, finite Besov difference norm is equivalent to a regular-atom expansion with bounded overlap and finite coefficient norm. +- declaration: Rd.memTriebelLizorkin_iff_atomic informal: For 1 < p < infinity, q > 1, and positive smoothness below the atom order, Triebel–Lizorkin membership is equivalent to an expansion by smooth dyadic atoms with finite coefficient norm. - declaration: Rd.memSobolev_bessel_iff_memTriebelLizorkinDistr informal: In positive dimension and for 1 < p < infinity, Mathlib's Bessel potential space agrees with the distributional Triebel–Lizorkin space with second index two for every real smoothness. From 46ab22f84bddd8baeccc14cc2e6b54f09b5abbf8 Mon Sep 17 00:00:00 2001 From: Vasily Ilin Date: Fri, 27 Nov 2026 14:15:50 +0000 Subject: [PATCH 4/7] Clarify source variants and generalize convolution estimates --- .../Analysis/Fourier/Convolution.lean | 46 +++++++++---------- .../FunctionSpaces/Analysis/Lp/Young.lean | 11 +++-- .../FunctionSpaces/ApproximationSpaces.lean | 4 +- .../Interpolation/Couple.lean | 10 ++-- .../Interpolation/KMethod.lean | 20 ++++---- .../Interpolation/Reiteration.lean | 28 ++++++----- .../Domains/Traces/BoundaryBesovNorm.lean | 9 ++-- .../Domains/Traces/GraphTrace.lean | 13 +++--- .../Domains/Traces/GraphTraceExtension.lean | 19 ++++---- .../Traces/LipschitzBoundaryTrace.lean | 20 ++++---- .../Domains/Traces/TraceSpaceNorm.lean | 7 +-- .../Rd/Approximation/BandInverse.lean | 2 +- .../FunctionSpaces/Rd/Atoms/AtomAnalysis.lean | 10 ++-- .../BesselPotentialLifting.lean | 22 ++++----- .../Rd/Differences/DilatedDifferences.lean | 2 +- .../Rd/Differences/PointwiseMultipliers.lean | 10 ++-- .../MixedSmoothness/MixedLittlewoodPaley.lean | 4 +- .../Rd/MixedSmoothness/MixedLocalMeans.lean | 2 +- .../SingularIntegrals/ConvolutionAdjoint.lean | 8 ++-- .../VectorValuedSingularIntegrals.lean | 10 ++-- .../Rd/Sobolev/GagliardoNirenbergSobolev.lean | 2 +- .../Rd/Sobolev/SobolevEmbedding.lean | 4 +- .../Rd/Sobolev/SobolevTriebelLizorkin.lean | 22 ++++----- .../Rd/TriebelLizorkin/SquareFunction.lean | 2 +- .../Rd/TriebelLizorkin/TriebelLizorkin.lean | 12 ++--- .../TriebelLizorkin/TriebelLizorkinAtoms.lean | 2 +- 26 files changed, 160 insertions(+), 141 deletions(-) diff --git a/LeanPool/FunctionSpaces/Analysis/Fourier/Convolution.lean b/LeanPool/FunctionSpaces/Analysis/Fourier/Convolution.lean index ad257ab2f7..104361ba40 100644 --- a/LeanPool/FunctionSpaces/Analysis/Fourier/Convolution.lean +++ b/LeanPool/FunctionSpaces/Analysis/Fourier/Convolution.lean @@ -22,7 +22,7 @@ On a finite-dimensional real vector space `V` with a Haar measure `μ`, the **co integrable kernel `K` with `f ∈ L_p` is `(K ⋆ f)(x) = ∫ K(y) f(x - y) dy` (`Rd.conv`, Mathlib's `MeasureTheory.convolution` with the multiplication of `ℂ`). -**Young's inequality** `‖K ⋆ f‖_p ≤ ‖K‖_1 ‖f‖_p`, `1 ≤ p < ∞` (`Rd.eLpNorm_conv_le`), is the case +**Young's inequality** `‖K ⋆ f‖_p ≤ ‖K‖_1 ‖f‖_p`, `1 ≤ p ≤ ∞` (`Rd.eLpNorm_conv_le`), is the case of the group `V` of `MeasureTheory.eLpNorm_complexConvolution_le`. The integral of the convolution converges absolutely at almost every point (`MeasureTheory.ae_convolutionExistsAt`), so convolution is linear in `f` almost everywhere (`Rd.conv_add_ae`, `Rd.conv_sub_ae`, @@ -75,19 +75,17 @@ theorem enorm_conv_le_lintegral (K f : V → ℂ) (x : V) : refine (eNorm_integral_le_lintegral_eNorm _).trans (le_of_eq ?_) exact lintegral_congr fun y => eNorm_mul _ _ -/-- **Young's inequality** for an integrable kernel: `‖K ⋆ f‖_p ≤ ‖K‖_1 ‖f‖_p`, `1 ≤ p < ∞` +/-- **Young's inequality** for an integrable kernel: `‖K ⋆ f‖_p ≤ ‖K‖_1 ‖f‖_p`, `1 ≤ p ≤ ∞` (`MeasureTheory.eLpNorm_complexConvolution_le` on the group `V`). -/ -theorem eLpNorm_conv_le {p : ℝ≥0∞} (hp1 : 1 ≤ p) (hp : p ≠ ∞) {K f : V → ℂ} +theorem eLpNorm_conv_le {p : ℝ≥0∞} (hp1 : 1 ≤ p) {K f : V → ℂ} (hK : AEStronglyMeasurable K μ) (hf : AEStronglyMeasurable f μ) : eLpNorm (conv K f μ) p μ ≤ eLpNorm K 1 μ * eLpNorm f p μ := - eLpNorm_complexConvolution_le hp1 hp hK hf + eLpNorm_complexConvolution_le hp1 hK hf /-- Convolution of an integrable kernel with an `L_p` function is in `L_p`. -/ -theorem memLp_conv {p : ℝ≥0∞} (hp1 : 1 ≤ p) (hp : p ≠ ∞) {K f : V → ℂ} (hK : Integrable K μ) +theorem memLp_conv {p : ℝ≥0∞} (hp1 : 1 ≤ p) {K f : V → ℂ} (hK : Integrable K μ) (hf : MemLp f p μ) : MemLp (conv K f μ) p μ := - lt_top_iff_ne_top.2 (ne_top_of_le_ne_top (ENNReal.mul_ne_top - (memLp_one_iff_integrable.2 hK).eLpNorm_ne_top hf.eLpNorm_ne_top) - (eLpNorm_conv_le hp1 hp hK.aestronglyMeasurable hf.aestronglyMeasurable)) + memLp_convolution hp1 hK hf /-- **Convolution is additive** almost everywhere, in the two-exponent form: for `f ∈ L_p` and `g ∈ L_r` with `1 ≤ p, r < ∞`, `K ⋆ (f + g) = K ⋆ f + K ⋆ g` almost everywhere, since both @@ -272,12 +270,12 @@ variable {p : ℝ≥0∞} [Fact (1 ≤ p)] /-- **Young's inequality for the classes in `L_p`**: `‖K ⋆ f‖_p ≤ ‖K‖_1 ‖f‖_p` for `f ∈ L_p`. -/ -theorem norm_toLp_conv_le (hp : p ≠ ∞) {K : V → ℂ} (hK : Integrable K μ) (f : Lp ℂ p μ) : - ‖(memLp_conv Fact.out hp hK (Lp.memLp f)).toLp (conv K f μ)‖ ≤ +theorem norm_toLp_conv_le {K : V → ℂ} (hK : Integrable K μ) (f : Lp ℂ p μ) : + ‖(memLp_conv Fact.out hK (Lp.memLp f)).toLp (conv K f μ)‖ ≤ (eLpNorm K 1 μ).toReal * ‖f‖ := by rw [Lp.norm_toLp, Lp.norm_def, ← ENNReal.toReal_mul] exact ENNReal.toReal_mono (ENNReal.mul_ne_top (memLp_one_iff_integrable.2 hK).eLpNorm_ne_top - (Lp.eLpNorm_ne_top f)) (eLpNorm_conv_le Fact.out hp hK.aestronglyMeasurable + (Lp.eLpNorm_ne_top f)) (eLpNorm_conv_le Fact.out hK.aestronglyMeasurable (Lp.aestronglyMeasurable f)) /-- **Convolution with an integrable kernel as a bounded operator on `L_p`**, `1 ≤ p < ∞`, of @@ -285,42 +283,42 @@ norm at most `‖K‖_1` (Young's inequality). -/ noncomputable def convLp (hp : p ≠ ∞) {K : V → ℂ} (hK : Integrable K μ) : Lp ℂ p μ →L[ℂ] Lp ℂ p μ := LinearMap.mkContinuous - { toFun := fun f => (memLp_conv Fact.out hp hK (Lp.memLp f)).toLp (conv K f μ) + { toFun := fun f => (memLp_conv Fact.out hK (Lp.memLp f)).toLp (conv K f μ) map_add' := fun f g => by refine Lp.ext ?_ have hc : conv K (⇑(f + g)) μ = conv K (⇑f + ⇑g) μ := conv_congr_ae (Lp.coeFn_add f g) - filter_upwards [MemLp.coeFn_toLp (memLp_conv Fact.out hp hK (Lp.memLp (f + g))), - MemLp.coeFn_toLp (memLp_conv Fact.out hp hK (Lp.memLp f)), - MemLp.coeFn_toLp (memLp_conv Fact.out hp hK (Lp.memLp g)), - Lp.coeFn_add ((memLp_conv Fact.out hp hK (Lp.memLp f)).toLp (conv K f μ)) - ((memLp_conv Fact.out hp hK (Lp.memLp g)).toLp (conv K g μ)), + filter_upwards [MemLp.coeFn_toLp (memLp_conv Fact.out hK (Lp.memLp (f + g))), + MemLp.coeFn_toLp (memLp_conv Fact.out hK (Lp.memLp f)), + MemLp.coeFn_toLp (memLp_conv Fact.out hK (Lp.memLp g)), + Lp.coeFn_add ((memLp_conv Fact.out hK (Lp.memLp f)).toLp (conv K f μ)) + ((memLp_conv Fact.out hK (Lp.memLp g)).toLp (conv K g μ)), conv_add_ae Fact.out hp hK (Lp.memLp f) (Lp.memLp g)] with x h1 h2 h3 h4 h5 rw [h1, h4, Pi.add_apply, h2, h3, hc, h5, Pi.add_apply] map_smul' := fun c f => by refine Lp.ext ?_ have hc : conv K (⇑(c • f)) μ = conv K (c • ⇑f) μ := conv_congr_ae (Lp.coeFn_smul c f) - filter_upwards [MemLp.coeFn_toLp (memLp_conv Fact.out hp hK (Lp.memLp (c • f))), - MemLp.coeFn_toLp (memLp_conv Fact.out hp hK (Lp.memLp f)), - Lp.coeFn_smul c ((memLp_conv Fact.out hp hK (Lp.memLp f)).toLp (conv K f μ))] + filter_upwards [MemLp.coeFn_toLp (memLp_conv Fact.out hK (Lp.memLp (c • f))), + MemLp.coeFn_toLp (memLp_conv Fact.out hK (Lp.memLp f)), + Lp.coeFn_smul c ((memLp_conv Fact.out hK (Lp.memLp f)).toLp (conv K f μ))] with x h1 h2 h3 rw [h1, RingHom.id_apply, h3, Pi.smul_apply, h2, hc, conv_smul, Pi.smul_apply] } - (eLpNorm K 1 μ).toReal (norm_toLp_conv_le hp hK) + (eLpNorm K 1 μ).toReal (norm_toLp_conv_le hK) /-- The operator `convLp` is convolution, almost everywhere. -/ theorem convLp_apply_ae (hp : p ≠ ∞) {K : V → ℂ} (hK : Integrable K μ) (f : Lp ℂ p μ) : convLp hp hK f =ᵐ[μ] conv K f μ := - MemLp.coeFn_toLp (memLp_conv Fact.out hp hK (Lp.memLp f)) + MemLp.coeFn_toLp (memLp_conv Fact.out hK (Lp.memLp f)) /-- **Young's inequality on `L_p`**: `‖K ⋆ f‖_p ≤ ‖K‖_1 ‖f‖_p`. -/ theorem norm_convLp_le (hp : p ≠ ∞) {K : V → ℂ} (hK : Integrable K μ) (f : Lp ℂ p μ) : ‖convLp hp hK f‖ ≤ (eLpNorm K 1 μ).toReal * ‖f‖ := - norm_toLp_conv_le hp hK f + norm_toLp_conv_le hK f /-- **Young's inequality on `L_p`** in extended norms: `‖K ⋆ f‖_p ≤ ‖K‖_1 ‖f‖_p`. -/ theorem enorm_convLp_le (hp : p ≠ ∞) {K : V → ℂ} (hK : Integrable K μ) (f : Lp ℂ p μ) : ‖convLp hp hK f‖ₑ ≤ eLpNorm K 1 μ * ‖f‖ₑ := by rw [Lp.eNorm_def, Lp.eNorm_def, eLpNorm_congr_ae (convLp_apply_ae hp hK f)] - exact eLpNorm_conv_le Fact.out hp hK.aestronglyMeasurable (Lp.aestronglyMeasurable f) + exact eLpNorm_conv_le Fact.out hK.aestronglyMeasurable (Lp.aestronglyMeasurable f) /-- **Convolution operators compose like their kernels**: `K ⋆ (L ⋆ f) = (K ⋆ L) ⋆ f` in `L_p` (`Rd.conv_conv_ae`). -/ diff --git a/LeanPool/FunctionSpaces/Analysis/Lp/Young.lean b/LeanPool/FunctionSpaces/Analysis/Lp/Young.lean index 61fa399da5..557d046c22 100644 --- a/LeanPool/FunctionSpaces/Analysis/Lp/Young.lean +++ b/LeanPool/FunctionSpaces/Analysis/Lp/Young.lean @@ -19,8 +19,9 @@ Modified for Lean Pool: module names and imports adapted. On a measurable group `G` with a right-invariant s-finite measure `μ` (a Haar measure on `ℝ^d` or on the torus), the convolution `(K ⋆ f)(x) = ∫ K(y) f(x - y) dμ(y)` with the multiplication of -`ℂ` satisfies **Young's inequality** `‖K ⋆ f‖_p ≤ ‖K‖_1 ‖f‖_p` for `1 ≤ p < ∞` -(`MeasureTheory.eLpNorm_complexConvolution_le`). It comes from the weighted Jensen inequality +`ℂ` satisfies **Young's inequality** `‖K ⋆ f‖_p ≤ ‖K‖_1 ‖f‖_p` for `1 ≤ p ≤ ∞` +(`MeasureTheory.eLpNorm_complexConvolution_le`). For finite `p`, the integral estimate below uses +the weighted Jensen inequality `(∫ a g)^p ≤ (∫ a)^(p-1) ∫ a g^p` @@ -171,7 +172,7 @@ theorem lintegral_rpow_lintegral_le {p : ℝ≥0∞} (hp1 : 1 ≤ p) (hp : p ≠ eLpNorm_rpow_eq hf hp0 hp] /-- Young's inequality for complex-valued convolution with an integrable kernel. -/ -theorem eLpNorm_complexConvolution_le {p : ℝ≥0∞} (hp1 : 1 ≤ p) (_hp : p ≠ ∞) {K f : G → ℂ} +theorem eLpNorm_complexConvolution_le {p : ℝ≥0∞} (hp1 : 1 ≤ p) {K f : G → ℂ} (hK : AEStronglyMeasurable K μ) (hf : AEStronglyMeasurable f μ) : eLpNorm (K ⋆[ContinuousLinearMap.mul ℂ ℂ, μ] f) p μ ≤ eLpNorm K 1 μ * eLpNorm f p μ := by have hmul : ‖ContinuousLinearMap.mul ℂ ℂ‖ₑ = 1 := by @@ -179,12 +180,12 @@ theorem eLpNorm_complexConvolution_le {p : ℝ≥0∞} (hp1 : 1 ≤ p) (_hp : p simpa only [hmul, one_mul] using eLpNorm_convolution_le (ContinuousLinearMap.mul ℂ ℂ) hK hf hp1 /-- The convolution of an integrable kernel with an `L_p` function is in `L_p`. -/ -theorem memLp_convolution {p : ℝ≥0∞} (hp1 : 1 ≤ p) (hp : p ≠ ∞) {K f : G → ℂ} +theorem memLp_convolution {p : ℝ≥0∞} (hp1 : 1 ≤ p) {K f : G → ℂ} (hK : Integrable K μ) (hf : MemLp f p μ) : MemLp (K ⋆[ContinuousLinearMap.mul ℂ ℂ, μ] f) p μ := lt_top_iff_ne_top.2 (ne_top_of_le_ne_top (ENNReal.mul_ne_top (memLp_one_iff_integrable.2 hK).eLpNorm_ne_top hf.eLpNorm_ne_top) - (eLpNorm_complexConvolution_le hp1 hp hK.aestronglyMeasurable hf.aestronglyMeasurable)) + (eLpNorm_complexConvolution_le hp1 hK.aestronglyMeasurable hf.aestronglyMeasurable)) /-- **The convolution integral converges absolutely almost everywhere** for an integrable kernel and `f ∈ L_p`, `1 ≤ p < ∞`: the integral form of Young's inequality is finite. -/ diff --git a/LeanPool/FunctionSpaces/ApproximationSpaces.lean b/LeanPool/FunctionSpaces/ApproximationSpaces.lean index 457d0b2eb5..6617c7018b 100644 --- a/LeanPool/FunctionSpaces/ApproximationSpaces.lean +++ b/LeanPool/FunctionSpaces/ApproximationSpaces.lean @@ -182,8 +182,8 @@ in the root namespace. `A^s_q = (X, Y)_{s/r,q}` under Jackson's and Bernstein's inequalities of order `r` (`approxSpace_eq_interpSpace`). * `ApproximationSpaces.Interpolation.KMethod`: the continuous K-method `kMethodNorm` and its - equivalence with the discrete K-method on every dyadic grid (Bergh–Löfström, Lemma 3.1.3; - `memInterp_iff_memKMethod`). + equivalence with the discrete K-method on one-sided dyadic grids with an ambient-norm term + (`memInterp_iff_memKMethod`), extending the classical two-sided comparison. * `ApproximationSpaces.Interpolation.Couple`: couples `InterpCouple` of two extended quasi-norms on an abelian group, their K-functional and K-methods, and the couple `InterpCouple.ofMap ι` of a bounded linear map. diff --git a/LeanPool/FunctionSpaces/ApproximationSpaces/Interpolation/Couple.lean b/LeanPool/FunctionSpaces/ApproximationSpaces/Interpolation/Couple.lean index 8760ebcfdb..4c7e487665 100644 --- a/LeanPool/FunctionSpaces/ApproximationSpaces/Interpolation/Couple.lean +++ b/LeanPool/FunctionSpaces/ApproximationSpaces/Interpolation/Couple.lean @@ -26,7 +26,7 @@ The **K-functional** is `K(t, u) = inf_b (N₀(u - b) + t N₁(b))` (`InterpCoup the **discrete K-method** on the grid `t = 2^(nρ)`, `n ∈ ℤ`, is `‖(2^(-nρθ) K(2^(nρ), u))_n‖_{ℓ_q}` (`InterpCouple.discreteKMethodNorm`). For `θ ≥ 0` and `ρ > 0` both give the same space (`InterpCouple.memKMethod_iff_discreteKMethodNorm_lt_top`, -Bergh–Löfström, Lemma 3.1.3); swapping the couple replaces `θ` by `1 - θ` +an extension of Bergh–Löfström, Lemma 3.1.3). Swapping the couple replaces `θ` by `1 - θ` (`InterpCouple.discreteKMethodNorm_swap`); for a quasi-normed couple both K-norms satisfy a quasi-triangle inequality (`InterpCouple.kMethodNorm_add_le`, `InterpCouple.discreteKMethodNorm_add_le`), and for a quasi-normed homogeneous couple the space is @@ -369,9 +369,11 @@ theorem discreteKMethodNorm_le_mul_kMethodNorm (hθ : 0 ≤ θ) (u : U) : simpa only [one_mul] using discreteKMethodNorm_le_inv_mul_kMethodNorm (A := A) (q := q) hθ one_pos u -/-- **The discrete and the continuous K-method agree** (Bergh–Löfström, Lemma 3.1.3; Bonn's -`discreteKMethod_equiv_kmethod`): for `θ ≥ 0`, `ρ > 0` and every `q`, `‖u‖_{K,θ,q} < ∞` if and -only if `‖(2^(-nρθ) K(2^(nρ), u))_{n ∈ ℤ}‖_{ℓ_q} < ∞`. -/ +/-- **The discrete and the continuous K-method agree**. Bergh–Löfström, Lemma 3.1.3, +uses the two-sided grid `2^n` in the classical interpolation range. This version allows +`θ ≥ 0`, any two-sided grid `2^(nρ)` with `ρ > 0`, and every `q`, including the zero-exponent +convention. Then `‖u‖_{K,θ,q} < ∞` iff `‖(2^(-nρθ) K(2^(nρ), u))_{n ∈ ℤ}‖_{ℓ_q} < ∞`. +See also Bonn's `discreteKMethod_equiv_kmethod`. -/ theorem memKMethod_iff_discreteKMethodNorm_lt_top (hθ : 0 ≤ θ) (hρ : 0 < ρ) {u : U} : A.MemKMethod θ q u ↔ A.discreteKMethodNorm θ ρ q u < ∞ := by have hc0 := ApproximationScheme.ofReal_mul_log_two_rpow_ne_zero hρ q diff --git a/LeanPool/FunctionSpaces/ApproximationSpaces/Interpolation/KMethod.lean b/LeanPool/FunctionSpaces/ApproximationSpaces/Interpolation/KMethod.lean index dcf75d6fdf..7ee079fae0 100644 --- a/LeanPool/FunctionSpaces/ApproximationSpaces/Interpolation/KMethod.lean +++ b/LeanPool/FunctionSpaces/ApproximationSpaces/Interpolation/KMethod.lean @@ -48,8 +48,10 @@ for `t ≥ ‖ι‖` (`ApproximationScheme.enorm_le_kFunctional`). The functional `ApproximationScheme.phiFunctional` is the formula of `EQuasinorm.phiFunctional` in the project *MultilinearInterpolation* (Bonn; van Doorn, Portegies, Rothgang, Viana Reis; Apache 2.0). That project states the equivalence `discreteKMethod_equiv_kmethod` -(Bergh–Löfström, Lemma 3.1.3) for general couples of quasi-normed spaces on the grid `2^n`, -`n ∈ ℤ`. For `ρ = 1` and `θ ≥ 0`, the comparison of `phiFunctional` with its discrete version +for general quasi-normed couples on the grid `2^n`, `n ∈ ℤ`. The comparison below extends +Bergh–Löfström, Lemma 3.1.3, to a one-sided grid with arbitrary positive spacing, supplemented +by the ambient norm. For `ρ = 1` and `θ ≥ 0`, the comparison of `phiFunctional` with its +discrete version for increasing `φ` (`ApproximationScheme.phiFunctional_le_lqNorm_discretePhiSeq`, `ApproximationScheme.lqNorm_discretePhiSeq_le_phiFunctional`) gives the two inequalities of that equivalence for every couple whose K-functional is increasing in `t`. This file applies it to @@ -553,8 +555,8 @@ theorem kMethodUpperConst_ne_top (hθ : 0 < θ) (hρ : 0 < ρ) (q : ℝ≥0∞) (ENNReal.mul_ne_top (ENNReal.LpAddConst_lt_top q).ne (ENNReal.dyadicGeomConst_ne_top (mul_pos hρ hθ) q)) -/-- **The continuous K-norm by the discrete one** (Bergh–Löfström, Lemma 3.1.3): for `θ ≥ 0` -and `ρ > 0`, `‖f‖_{K,θ,q} ≤ kMethodUpperConst θ ρ q · ‖f‖_{θ,q}`, where `‖f‖_{θ,q}` is the +/-- **The continuous K-norm by the one-sided discrete norm**. For `θ ≥ 0` and `ρ > 0`, +`‖f‖_{K,θ,q} ≤ kMethodUpperConst θ ρ q · ‖f‖_{θ,q}`, where `‖f‖_{θ,q}` is the discrete K-method on the grid `2^(-kρ)`. The constant is finite for `θ > 0` (`kMethodUpperConst_ne_top`). -/ theorem kMethodNorm_le_interpNorm (hθ : 0 ≤ θ) (hρ : 0 < ρ) (f : X) : @@ -627,8 +629,8 @@ theorem kMethodLowerConst_ne_top (hρ : 0 < ρ) (q : ℝ≥0∞) : kMethodLowerC (ENNReal.mul_ne_top (ENNReal.two_rpow_ne_top _) (ENNReal.inv_ne_top.2 (ofReal_mul_log_two_rpow_ne_zero hρ q))) -/-- **The discrete K-norm by the continuous one** (Bergh–Löfström, Lemma 3.1.3): for `θ ≥ 0`, -`ρ > 0` and `q ≠ 0`, `‖f‖_{θ,q} ≤ kMethodLowerConst ι θ ρ q · ‖f‖_{K,θ,q}`, where `‖f‖_{θ,q}` +/-- **The one-sided discrete K-norm by the continuous norm**. For `θ ≥ 0`, `ρ > 0` and `q ≠ 0`, +`‖f‖_{θ,q} ≤ kMethodLowerConst ι θ ρ q · ‖f‖_{K,θ,q}`, where `‖f‖_{θ,q}` is the discrete K-method on the grid `2^(-kρ)`. -/ theorem interpNorm_le_kMethodNorm (hθ : 0 ≤ θ) (hρ : 0 < ρ) (hq : q ≠ 0) (f : X) : interpNorm ι θ ρ q f ≤ kMethodLowerConst ι θ ρ q * kMethodNorm ι θ q f := by @@ -660,8 +662,10 @@ theorem memInterp_zero_and_memKMethod_zero (f : X) : · simp [MemKMethod, kMethodNorm_eq, eLpNorm_exponent_zero (measurable_kMethodIntegrand (ι := ι) (θ := θ) f).aestronglyMeasurable] -/-- **The discrete and the continuous K-method agree** (Bergh–Löfström, Lemma 3.1.3): for -`θ > 0`, `ρ > 0` and every `q`, `f` lies in the interpolation space of the discrete K-method on +/-- **The one-sided discrete and continuous K-methods agree**, extending the two-sided +comparison of Bergh–Löfström, Lemma 3.1.3, for a bounded linear map. For +`θ > 0`, `ρ > 0` and every `q`, including the zero-exponent convention, `f` lies in the +interpolation space of the discrete K-method on the grid `t = 2^(-kρ)` if and only if `‖f‖_{K,θ,q} < ∞`, that is `∫_0^∞ (t^(-θ) K(t, f))^q dt/t < ∞` for `0 < q < ∞` and `t^(-θ) K(t, f)` essentially bounded for `q = ∞`. This is, for the couple given by a bounded linear map `ι`, the analogue of the diff --git a/LeanPool/FunctionSpaces/ApproximationSpaces/Interpolation/Reiteration.lean b/LeanPool/FunctionSpaces/ApproximationSpaces/Interpolation/Reiteration.lean index 3bbd108509..a25026f53c 100644 --- a/LeanPool/FunctionSpaces/ApproximationSpaces/Interpolation/Reiteration.lean +++ b/LeanPool/FunctionSpaces/ApproximationSpaces/Interpolation/Reiteration.lean @@ -21,13 +21,17 @@ constant (`InterpCouple.discreteKMethodNorm_add_le` of `ApproximationSpaces.Inte and they form the **couple of K-spaces** `(‖·‖_{θ₀,q₀}, ‖·‖_{θ₁,q₁})` (`InterpCouple.kCouple`) and the endpoint couples `(N₀, ‖·‖_{θ₁,q₁})` and `(‖·‖_{θ₀,q₀}, N₁)` (`InterpCouple.leftKCouple`, -`InterpCouple.rightKCouple`). The **reiteration theorem** (Bergh–Löfström, Theorems 3.5.3 and -3.11.5) says that for `0 < θ₀ < θ₁ < 1`, `0 < η < 1` and `θ = (1 - η) θ₀ + η θ₁`, +`InterpCouple.rightKCouple`). The classical reiteration results are in Bergh–Löfström, +Theorems 3.5.3 and 3.11.5, for complete intermediate spaces and an interior outer parameter. +Their quasi-normed result uses finite outer `q`. The membership comparison below uses the +stated quasi-norm laws and also permits infinite outer `q`. For `0 < θ₀ < θ₁ < 1`, +`0 < η < 1` and `θ = (1 - η) θ₀ + η θ₁`, it gives `((X₀, X₁)_{θ₀,q₀}, (X₀, X₁)_{θ₁,q₁})_{η,q} = (X₀, X₁)_{θ,q}` (`InterpCouple.memKMethod_kCouple_iff`), also for the continuous K-norms (`InterpCouple.memKMethod_kMethodCouple_iff`), the endpoint couples -(`InterpCouple.memKMethod_leftKCouple_iff`, `InterpCouple.memKMethod_rightKCouple_iff`) and the -couples of bounded linear maps (`ApproximationScheme.memKMethod_reiteration`). +(`InterpCouple.memKMethod_leftKCouple_iff`, `InterpCouple.memKMethod_rightKCouple_iff`), +including `η = 0` on the left and `η = 1` +on the right, and the couples of bounded linear maps (`ApproximationScheme.memKMethod_reiteration`). The inclusion `⊆` is the class `C_K` (Bergh–Löfström, Definition 3.5.1): `K(2^n, a) ≤ 2^(nθ_i) ‖a‖_{θ_i,q_i}` gives `‖u‖_{θ,q} ≤ C ‖u‖_{η,q}` termwise @@ -586,8 +590,8 @@ theorem reiterationConst_ne_top (hC : C ≠ ∞) (hθ₀ : 0 < θ₀) (hθ : θ (mul_pos hη (sub_pos.2 hθ)), ENNReal.one_sub_two_rpow_neg_inv_ne_top (mul_pos (sub_pos.2 hη') (sub_pos.2 hθ))⟩) -/-- **The reiteration bound** (the hard inclusion of Bergh–Löfström, Theorems 3.5.3 and -3.11.5): for a couple quasi-normed with constant `C`, `q₀, q₁, q ≥ 1`, `0 < θ₀, θ₁ < 1` and +/-- **The discrete reiteration bound**, via the Holmstedt estimate above. For a couple +quasi-normed with constant `C`, `q₀, q₁, q ≥ 1`, `0 < θ₀, θ₁ < 1` and `θ = (1 - η) θ₀ + η θ₁`, the discrete K-norm of the couple of K-spaces on the grid `t = 2^(n(θ₁-θ₀))` satisfies `‖u‖_{η,q} ≤ reiterationConst C θ₀ θ₁ η · ‖u‖_{θ,q}`. -/ theorem kCouple_discreteKMethodNorm_le (hA : A.IsQuasiNormed C) (hq₀ : 1 ≤ q₀) (hq₁ : 1 ≤ q₁) @@ -695,8 +699,8 @@ theorem memKMethod_iff_of_discreteKMethodNorm_le {B : InterpCouple U} {c c' : exact ⟨fun hB => h'.trans_lt (ENNReal.mul_lt_top hc'.lt_top hB), fun hA => h.trans_lt (ENNReal.mul_lt_top hc.lt_top hA)⟩ -/-- **The reiteration theorem** (Bergh–Löfström, Theorems 3.5.3 and 3.11.5): for a couple -quasi-normed with constant `C`, `0 < θ₀ < θ₁ < 1`, `0 < η < 1` and `q₀, q₁, q ≥ 1`, +/-- **Reiteration for discrete K-norms**, a variant of Bergh–Löfström, Theorems 3.5.3 and 3.11.5. +For a couple quasi-normed with constant `C`, `0 < θ₀ < θ₁ < 1`, `0 < η < 1` and `q₀, q₁, q ≥ 1`, `((X₀, X₁)_{θ₀,q₀}, (X₀, X₁)_{θ₁,q₁})_{η,q} = (X₀, X₁)_{θ,q}` with `θ = (1 - η) θ₀ + η θ₁`, for the discrete K-norms of the two K-spaces. -/ theorem memKMethod_kCouple_iff (hA : A.IsQuasiNormed C) (hθ₀ : 0 < θ₀) (hθ : θ₀ < θ₁) @@ -709,8 +713,8 @@ theorem memKMethod_kCouple_iff (hA : A.IsQuasiNormed C) (hθ₀ : 0 < θ₀) (h (discreteKMethodNorm_le_kCouple hA (one_pos.trans_le hq₀).ne' (one_pos.trans_le hq₁).ne' η q u) -/-- **The reiteration theorem for the left endpoint** (Bergh–Löfström, Theorem 3.5.3): for a -couple quasi-normed with constant `C`, `0 < θ₁ < 1`, `0 ≤ η < 1` and `q₁, q ≥ 1`, +/-- **Reiteration with the left endpoint space**, including the outer endpoint `η = 0`. +For a couple quasi-normed with constant `C`, `0 < θ₁ < 1`, `0 ≤ η < 1` and `q₁, q ≥ 1`, `(X₀, (X₀, X₁)_{θ₁,q₁})_{η,q} = (X₀, X₁)_{ηθ₁,q}`. -/ theorem memKMethod_leftKCouple_iff (hA : A.IsQuasiNormed C) (hθ₁ : 0 < θ₁) (hθ₁' : θ₁ < 1) (hη : 0 ≤ η) (hη' : η < 1) (hq₁ : 1 ≤ q₁) (hq : 1 ≤ q) {u : U} : @@ -720,8 +724,8 @@ theorem memKMethod_leftKCouple_iff (hA : A.IsQuasiNormed C) (hθ₁ : 0 < θ₁) (mul_nonneg hη hθ₁.le) (leftKCouple_discreteKMethodNorm_le hA hq₁ hq hθ₁ hθ₁' η u) (discreteKMethodNorm_le_leftKCouple hA (one_pos.trans_le hq₁).ne' η q u) -/-- **The reiteration theorem for the right endpoint** (Bergh–Löfström, Theorem 3.5.3): for a -couple quasi-normed with constant `C`, `0 < θ₀ < 1`, `η > 0` and `q₀, q ≥ 1`, +/-- **Reiteration with the right endpoint space**, including the outer endpoint `η = 1`. +For a couple quasi-normed with constant `C`, `0 < θ₀ < 1`, `η > 0` and `q₀, q ≥ 1`, `((X₀, X₁)_{θ₀,q₀}, X₁)_{η,q} = (X₀, X₁)_{(1-η)θ₀+η,q}`. -/ theorem memKMethod_rightKCouple_iff (hA : A.IsQuasiNormed C) (hθ₀ : 0 < θ₀) (hθ₀' : θ₀ < 1) (hη : 0 < η) (hq₀ : 1 ≤ q₀) (hq : 1 ≤ q) {u : U} : diff --git a/LeanPool/FunctionSpaces/Domains/Traces/BoundaryBesovNorm.lean b/LeanPool/FunctionSpaces/Domains/Traces/BoundaryBesovNorm.lean index de0ec5d695..22e87807f7 100644 --- a/LeanPool/FunctionSpaces/Domains/Traces/BoundaryBesovNorm.lean +++ b/LeanPool/FunctionSpaces/Domains/Traces/BoundaryBesovNorm.lean @@ -37,7 +37,8 @@ resolution of unity `(ψ_j)` on `Γ` (`Rd.BoundedLipschitzDomain.BoundaryPartiti of unity give equivalent quasi-norms. The constants depend on `Ω`, `ψ`, `p`, `s`, `q` and `L` and are fixed before the functions; the -bounds follow Schneider–Vybíral, Theorem 4.11, for `p ≥ 1`. +bounds give ambient-space estimates for the chart construction of the trace and its extension. +Schneider–Vybíral, Theorems 4.2 and 4.10, give the bounded-domain estimates. -/ @[expose] public section @@ -280,7 +281,7 @@ theorem chart_ae_eq_zero_of_boundaryBesovNorm_eq_zero (ψ : Ω.BoundaryPartition /-! ### The bounded trace and the bounded extension -/ -/-- **The boundary trace is bounded** (following Schneider–Vybíral, Theorem 4.11, for `p ≥ 1`): for +/-- **The boundary trace is bounded by the ambient Besov norm**. For `1 ≤ p < ∞`, `0 < s < 1`, `1 ≤ q ≤ ∞` and `s + 1/p < L` (so `L ≥ 1`), there is `C < ∞` with `‖Tr_Γ F‖_{B^s_{p,q}(Γ)} ≤ C (‖F‖_p + ‖(2^(k(s+1/p)) ω_L(F, 2^(-k))_p)_k‖_{ℓ_q})` for every `F` with a finite right side. The chart pieces of `Tr_Γ F` are the traces `Tr_j(ψ_j F)` @@ -305,8 +306,8 @@ theorem exists_boundaryBesovNorm_boundaryTrace_le (ψ : Ω.BoundaryPartition) (h Ω.trace_mulLp_ae_boundaryTrace ψ hp hL hs hsL hq hF j (hM j)).trans (Finset.sum_le_sum fun j _ => hle j F hF) -/-- **A bounded extension from the boundary** (following Schneider–Vybíral, Theorem 4.11, for -`p ≥ 1`): for `1 ≤ p < ∞`, `0 < s < 1`, `1 ≤ q ≤ ∞` and `L ≥ 2`, there is `C < ∞` such that every +/-- **A bounded extension from the boundary to the ambient space**. For `1 ≤ p < ∞`, `0 < s < +1`, `1 ≤ q ≤ ∞` and `L ≥ 2`, there is `C < ∞` such that every `g ∈ B^s_{p,q}(Γ)` is `Tr_Γ F` almost everywhere on `Γ` for some `F` with `‖F‖_p + ‖(2^(k(s+1/p)) ω_L(F, 2^(-k))_p)_k‖_{ℓ_q} ≤ C ‖g‖_{B^s_{p,q}(Γ)}`. The function is `F = ∑_j ζ_j E_j G_j` for the chart pieces `G_j` and the cut-offs `ζ_j` diff --git a/LeanPool/FunctionSpaces/Domains/Traces/GraphTrace.lean b/LeanPool/FunctionSpaces/Domains/Traces/GraphTrace.lean index 2ae24c605f..773f1cc63a 100644 --- a/LeanPool/FunctionSpaces/Domains/Traces/GraphTrace.lean +++ b/LeanPool/FunctionSpaces/Domains/Traces/GraphTrace.lean @@ -25,8 +25,9 @@ with the local means `k_j` and dual kernels `η_j` of the cone bump; by the supp `f` on `Ω` enters. More generally `Rd.LipschitzGraph.traceSeries` restricts `∑_j η_j ⋆ h_j` for any `h_j ∈ L_p(V)`. -**The trace theorem** (`Rd.LipschitzGraph.modNorm_trace_le`; Schneider–Vybíral, Theorem 4.2, -for `p ≥ 1`): for `1 ≤ p < ∞`, `0 < s < 1` and `1 ≤ q ≤ ∞`, +**The trace estimate on the whole Lipschitz epigraph** (`Rd.LipschitzGraph.modNorm_trace_le`) +is a graph-domain variant of Schneider–Vybíral, Theorem 4.2, for bounded Lipschitz domains. +For `1 ≤ p < ∞`, `0 < s < 1` and `1 ≤ q ≤ ∞`, `‖Tr f‖_{L_p(H)} + ‖(2^(ks) ω_1(Tr f, 2^(-k))_p)_k‖_{ℓ_q} ≤ K (‖f‖_{L_p(Ω)} + ‖(2^(k(s+1/p)) ω_L(f, 2^(-k), Ω)_p)_k‖_{ℓ_q})`. @@ -377,8 +378,8 @@ theorem modNorm_traceSeries_le_of_atoms (hp : p ≠ ∞) (L : ℕ) {r : ℕ} {s congr 2 ring -/-- **The trace of a series** (Schneider–Vybíral, Theorem 4.2): for `0 < s < 1` -there is `K < ∞` such that the trace `Tr = ∑_j (η_j ⋆ h_j) ∘ γ` has +/-- **The trace of a series** on a Lipschitz graph. For `0 < s < 1` there is `K < ∞` such that +the trace `Tr = ∑_j (η_j ⋆ h_j) ∘ γ` has `‖Tr‖_{L_p(H)} + ‖(2^(ks) ω_1(Tr, 2^(-k))_p)_k‖_{ℓ_q} ≤ K ‖(2^(j(s+1/p)) ‖h_j‖_p)_j‖_{ℓ_q}`, by the atomic synthesis on `H` with the trace atoms of order `1` (`Rd.LipschitzGraph.exists_trace_atoms`, `Rd.LipschitzGraph.modNorm_traceSeries_le_of_atoms`). -/ @@ -408,8 +409,8 @@ noncomputable def trace (hp : p ≠ ∞) (L : ℕ) (f : Lp ℂ p (volume : Measu Lp ℂ p (volume : Measure Ω.hyperplane) := Ω.traceSeries Ω.coneBump hp L fun j => Ω.cutoff (Ω.coneBump.localMean hp L j f) -/-- **The trace theorem on Lipschitz graph domains** (Schneider–Vybíral, Theorem 4.2, -for `p ≥ 1`): for `1 ≤ p < ∞`, `0 < s < 1` and `1 ≤ q ≤ ∞` there is `K < ∞` with +/-- **The trace estimate on Lipschitz graph domains**. For `1 ≤ p < ∞`, `0 < s < 1` and +`1 ≤ q ≤ ∞` there is `K < ∞` with `‖Tr f‖_{L_p(H)} + ‖(2^(ks) ω_1(Tr f, 2^(-k))_p)_k‖_{ℓ_q} ≤ K (‖f‖_{L_p(Ω)} + ‖(2^(k(s+1/p)) ω_L(f, 2^(-k), Ω)_p)_k‖_{ℓ_q})`. -/ theorem modNorm_trace_le (hp : p ≠ ∞) (L : ℕ) {s : ℝ} (hs : 0 < s) (hs1 : s < 1) {q : ℝ≥0∞} diff --git a/LeanPool/FunctionSpaces/Domains/Traces/GraphTraceExtension.lean b/LeanPool/FunctionSpaces/Domains/Traces/GraphTraceExtension.lean index 37d2f6ada7..1d9df3600b 100644 --- a/LeanPool/FunctionSpaces/Domains/Traces/GraphTraceExtension.lean +++ b/LeanPool/FunctionSpaces/Domains/Traces/GraphTraceExtension.lean @@ -43,8 +43,9 @@ On a Lipschitz graph the extended atoms form a package of order `2` (`Rd.LipschitzGraph.exists_extension_atoms`). This gives the bound for `0 < s < 1` (`Rd.LipschitzGraph.modNorm_graphExtension_le`, `Rd.LipschitzGraph.modNorm_graphExtension_lt_top`), `Tr (E g) = g` (`Rd.LipschitzGraph.trace_graphExtension`), and with the boundedness of the trace -the trace space (`Rd.LipschitzGraph.exists_trace_eq_iff`; Schneider–Vybíral, Theorem 4.11 for -graph domains and `p ≥ 1`): `g` is the trace of a function with finite intrinsic +the trace space (`Rd.LipschitzGraph.exists_trace_eq_iff`). This is a variant of +Schneider–Vybíral, Theorem 4.11, on the whole Lipschitz epigraph with `p ≥ 1`. +In this variant, `g` is the trace of a function with finite intrinsic `B^{s+1/p}_{p,q}`-norm on `Ω` iff `g ∈ B^s_{p,q}(H)`. On the half-space the extended atoms form packages of every order (`FunctionSpaces.Domains.Traces.HalfSpaceTrace`). @@ -528,8 +529,9 @@ theorem modNorm_graphExtension_le_of_atoms (hp : p ≠ ∞) (Lh : ℕ) {r : ℕ} (ENNReal.mul_lt_top (Ω.graphBump.upperConst_ne_top Lh s).lt_top hg))).trans (mul_le_mul' le_rfl hLM) -/-- **The extension is bounded** (Schneider–Vybíral, Theorem 4.10, for `p ≥ 1`): for `0 < s < 1` -there is `K < ∞` with +/-- **The extension is bounded in the ambient space**. This is the graph-domain variant of +Schneider–Vybíral, Theorem 4.10, whose estimate is on a bounded Lipschitz domain. +For `0 < s < 1` there is `K < ∞` with `‖E g‖_p + ‖(2^(k(s+1/p)) ω_2(E g, 2^(-k))_p)_k‖_{ℓ_q} ≤ K (‖g‖_{L_p(H)} + ‖(2^(ks) ω_1(g, 2^(-k))_p)_k‖_{ℓ_q})` for the extension of moment order `1`, by the atomic synthesis on `V` with the extended atoms of order `2`. -/ @@ -735,8 +737,8 @@ theorem trace_graphExtension_of_atoms (hp : p ≠ ∞) {Lh : ℕ} (hLh : 1 ≤ L simp_rw [← hpart] at hlim exact tendsto_nhds_unique hconv hlim -/-- **The trace of the extension** (Schneider–Vybíral, Theorem 4.11, for `p ≥ 1`): for -`0 < s < 1`, `L ≥ 2` and `g ∈ L_p(H)` with `‖g‖_p + ‖(2^(ks) ω_1(g, 2^(-k))_p)_k‖_{ℓ_q} < ∞`, +/-- **The trace of the constructed extension on a Lipschitz graph**. For `0 < s < 1`, `L ≥ 2` +and `g ∈ L_p(H)` with `‖g‖_p + ‖(2^(ks) ω_1(g, 2^(-k))_p)_k‖_{ℓ_q} < ∞`, the extension of moment order `1` has `Tr (E g) = g`, from the extended atoms of order `2` (`Rd.LipschitzGraph.exists_extension_atoms`, `Rd.LipschitzGraph.trace_graphExtension_of_atoms`). -/ theorem trace_graphExtension (hp : p ≠ ∞) {L : ℕ} (hL : 2 ≤ L) {s : ℝ} (hs : 0 < s) (hs1 : s < 1) @@ -749,8 +751,9 @@ theorem trace_graphExtension (hp : p ≠ ∞) {L : ℕ} (hL : 2 ≤ L) {s : ℝ} ((Ω.graphBump.localMeansNorm_le hp 1 s hq g).trans_lt (ENNReal.mul_lt_top (Ω.graphBump.upperConst_ne_top 1 s).lt_top hg)) -/-- **The trace space of a Lipschitz graph domain** (Schneider–Vybíral, Theorem 4.11, for -`p ≥ 1`): for `1 ≤ p < ∞`, `0 < s < 1`, `1 ≤ q ≤ ∞` and `L ≥ 2`, `g ∈ L_p(H)` is the trace of some +/-- **The trace space on the whole Lipschitz epigraph**, a graph-domain variant of +Schneider–Vybíral, Theorem 4.11. For `1 ≤ p < ∞`, `0 < s < 1`, `1 ≤ q ≤ ∞` and `L ≥ 2`, `g ∈ +L_p(H)` is the trace of some `f` with `‖f‖_{L_p(Ω)} + ‖(2^(k(s+1/p)) ω_L(f, 2^(-k), Ω)_p)_k‖_{ℓ_q} < ∞` iff `‖g‖_p + ‖(2^(ks) ω_1(g, 2^(-k))_p)_k‖_{ℓ_q} < ∞`. The trace is bounded (`Rd.LipschitzGraph.modNorm_trace_le`), and `E g` is such an `f` diff --git a/LeanPool/FunctionSpaces/Domains/Traces/LipschitzBoundaryTrace.lean b/LeanPool/FunctionSpaces/Domains/Traces/LipschitzBoundaryTrace.lean index d79537f217..0964935dbb 100644 --- a/LeanPool/FunctionSpaces/Domains/Traces/LipschitzBoundaryTrace.lean +++ b/LeanPool/FunctionSpaces/Domains/Traces/LipschitzBoundaryTrace.lean @@ -33,7 +33,9 @@ Let `Ω` be a bounded Lipschitz domain with boundary `Γ`: finitely many balls ` it is the trace of the graph domain (`Rd.BoundedLipschitzDomain.boundaryTrace_graphMap`), by the change of chart; hence it does not depend on the resolution of unity, and it is the restriction for continuous functions. -* **The trace space** (Schneider–Vybíral, Theorem 4.11, for `p ≥ 1`): for `1 ≤ p < ∞`, `0 < s < 1`, +* **The trace space via ambient functions.** The intrinsic trace-space equality below is the + range `1 ≤ p < ∞`, `1 ≤ q ≤ ∞` of Schneider–Vybíral, Theorem 4.11, on bounded Lipschitz + domains. The construction here gives an ambient representative. For `1 ≤ p < ∞`, `0 < s < 1`, `1 ≤ q ≤ ∞` and `L ≥ 2`, `g ∈ B^s_{p,q}(Γ)` iff `g = Tr_Γ F` almost everywhere on `Γ` for some `F ∈ L_p(V)` with `‖F‖_p + ‖(2^(k(s+1/p)) ω_L(F, 2^(-k))_p)_k‖_{ℓ_q} < ∞` (`Rd.BoundedLipschitzDomain.exists_boundaryTrace_eq_iff`). The chart pieces of `Tr_Γ F` are the @@ -390,8 +392,8 @@ theorem trace_mulLp_ae_boundaryTrace (ψ : Ω.BoundaryPartition) (hp : p ≠ ∞ · rw [ψ.toComplex_of_eq_zero hψ, zero_mul, zero_mul] · rw [h2 (ψ.mem_ball_of_ne_zero hψ)] -/-- **The boundary trace lies in `B^s_{p,q}(Γ)`** (Schneider–Vybíral, Theorem 4.11, for `p ≥ 1`, -the bound): for `1 ≤ p < ∞`, `0 < s < 1`, `1 ≤ q ≤ ∞`, `s + 1/p < L` and `F` with +/-- **The trace of an ambient Besov function lies in `B^s_{p,q}(Γ)`**. For `1 ≤ p < ∞`, `0 < s < +1`, `1 ≤ q ≤ ∞`, `s + 1/p < L` and `F` with `‖F‖_p + ‖(2^(k(s+1/p)) ω_L(F, 2^(-k))_p)_k‖_{ℓ_q} < ∞`. The chart pieces are the traces of `ψ_j F` on the graph domains (`Rd.LipschitzGraph.modNorm_trace_le`). -/ theorem memBoundaryBesov_boundaryTrace (ψ : Ω.BoundaryPartition) (hp : p ≠ ∞) {L : ℕ} @@ -488,8 +490,8 @@ theorem boundaryTrace_extensionSum_eventuallyEq (ψ : Ω.BoundaryPartition) (hp rw [h1 hk, htr, h2, Finset.sum_congr rfl fun j _ => hterm j, ← Finset.sum_mul, ψ.sum_toComplex_eq_one hΓ, one_mul] -/-- **Every function of `B^s_{p,q}(Γ)` is a boundary trace** (Schneider–Vybíral, Theorem 4.11, for -`p ≥ 1`, the extension): for `1 ≤ p < ∞`, `0 < s < 1`, `1 ≤ q ≤ ∞` and `L ≥ 2`, every +/-- **Every function of `B^s_{p,q}(Γ)` is the trace of an ambient representative**. For `1 ≤ p < +∞`, `0 < s < 1`, `1 ≤ q ≤ ∞` and `L ≥ 2`, every `g ∈ B^s_{p,q}(Γ)` is `Tr_Γ F` almost everywhere on `Γ` for some `F` with `‖F‖_p + ‖(2^(k(s+1/p)) ω_L(F, 2^(-k))_p)_k‖_{ℓ_q} < ∞`. With the chart pieces `G_j` of `g`, `F = ∑_j ζ_j E_j G_j` with the extensions `E_j` of the graph domains @@ -508,8 +510,8 @@ theorem exists_boundaryTrace_eq (ψ : Ω.BoundaryPartition) (hp : p ≠ ∞) {L exact ⟨_, Ω.modNorm_extensionSum_lt_top hp hL hs hs1 hq hζs hC G hGfin, Ω.boundaryTrace_extensionSum_eventuallyEq ψ hp hL hs hs1 hq hζs hζB hζ1 hC G hG hGfin⟩ -/-- **The trace space of a bounded Lipschitz domain** (Schneider–Vybíral, Theorem 4.11, for -`p ≥ 1`): for `1 ≤ p < ∞`, `0 < s < 1`, `1 ≤ q ≤ ∞` and `L ≥ 2`, `g ∈ B^s_{p,q}(Γ)` iff +/-- **The trace space of a bounded Lipschitz domain, specified using ambient functions**. For `1 +≤ p < ∞`, `0 < s < 1`, `1 ≤ q ≤ ∞` and `L ≥ 2`, `g ∈ B^s_{p,q}(Γ)` iff `g = Tr_Γ F` almost everywhere on `Γ` for some `F` with `‖F‖_p + ‖(2^(k(s+1/p)) ω_L(F, 2^(-k))_p)_k‖_{ℓ_q} < ∞`. -/ theorem exists_boundaryTrace_eq_iff (ψ : Ω.BoundaryPartition) (hp : p ≠ ∞) {L : ℕ} @@ -546,7 +548,9 @@ def IsBoundaryTrace (ψ : Ω.BoundaryPartition) (hp : p ≠ ∞) (L : ℕ) (σ : ‖F‖ₑ + lqNorm q (fun k => dyadicWeight σ k * lpModulus p L F k) < ∞ → Ω.boundaryTrace ψ hp L F =ᶠ[Ω.aeBoundary] g -/-- **The trace space of `B^{s+1/p}_{p,q}(Ω)`** (Schneider–Vybíral, Theorem 4.11, for `p ≥ 1`): for +/-- **The intrinsic trace space of `B^{s+1/p}_{p,q}(Ω)`**. In the range below this is the +trace-space equality of Schneider–Vybíral, Theorem 4.11, with the trace defined via ambient +extensions. For `1 ≤ p < ∞`, `0 < s < 1`, `1 ≤ q ≤ ∞` and `L ≥ 2`, `g ∈ B^s_{p,q}(Γ)` iff `g` is the boundary trace of some `f` with `‖f‖_{L_p(Ω)} + ‖(2^(k(s+1/p)) ω_L(f, 2^(-k), Ω)_p)_k‖_{ℓ_q} < ∞`. -/ theorem memBoundaryBesov_iff_exists_isBoundaryTrace (ψ : Ω.BoundaryPartition) (hp : p ≠ ∞) diff --git a/LeanPool/FunctionSpaces/Domains/Traces/TraceSpaceNorm.lean b/LeanPool/FunctionSpaces/Domains/Traces/TraceSpaceNorm.lean index 6ea7497051..ebd94148f8 100644 --- a/LeanPool/FunctionSpaces/Domains/Traces/TraceSpaceNorm.lean +++ b/LeanPool/FunctionSpaces/Domains/Traces/TraceSpaceNorm.lean @@ -200,9 +200,10 @@ theorem exists_enorm_le_boundaryBesovNorm_extend (ψ : Ω.BoundaryPartition) : obtain ⟨t', ht', hle'⟩ := hle _ (Ω.memBoundaryBesov_extend ψ t) rwa [(Ω.boundaryTrace_extend_eventuallyEq_iff ψ t' t).1 ht'] at hle' -/-- **`H^{1/2}(Γ)` and `B^{1/2}_{2,2}(Γ)` have equivalent norms** (McLean, Theorem 3.37; -following Schneider–Vybíral, Theorem 4.11, for `p = q = 2`): for every resolution of unity `ψ` -there is +/-- **`H^{1/2}(Γ)` and `B^{1/2}_{2,2}(Γ)` have equivalent norms**. The comparison uses the +Sobolev trace space, in the setting of McLean, Theorem 3.37, and the Besov trace-space +characterization with `p = q = 2`, as in Schneider–Vybíral, Theorem 4.11. +For every resolution of unity `ψ` there is `C < ∞` with `‖t‖ ≤ C ‖τ t‖_{B^{1/2}_{2,2}(Γ)}` and `‖τ t‖_{B^{1/2}_{2,2}(Γ)} ≤ C ‖t‖` for every `t ∈ H^{1/2}(Γ)`, with the trace `τ : H^{1/2}(Γ) → L_2(Γ)` (`Rd.BoundedLipschitzDomain.traceL2`). -/ diff --git a/LeanPool/FunctionSpaces/Rd/Approximation/BandInverse.lean b/LeanPool/FunctionSpaces/Rd/Approximation/BandInverse.lean index c983f4d0ea..67c093bf50 100644 --- a/LeanPool/FunctionSpaces/Rd/Approximation/BandInverse.lean +++ b/LeanPool/FunctionSpaces/Rd/Approximation/BandInverse.lean @@ -328,7 +328,7 @@ theorem lpModulus_le_of_mem_bandSpace (hp : p ≠ ∞) (r : ℕ) {j k : ℕ} eLpNorm ((fwdDiff h)^[r] (Theta (V := V) j)) 1 volume * ‖a‖ₑ := by rw [eLpNorm_congr_ae (higherDiff_conv_ae Fact.out hp (integrable_Theta j) (Lp.memLp a) r h), Lp.eNorm_def] - exact eLpNorm_conv_le Fact.out hp + exact eLpNorm_conv_le Fact.out (integrable_higherDiff (integrable_Theta j) r h).aestronglyMeasurable (Lp.aestronglyMeasurable a) have h2 : ENNReal.ofReal (2 ^ j * ‖h‖) ^ r ≤ dyadicWeight (-(r : ℝ)) (k - j) := by diff --git a/LeanPool/FunctionSpaces/Rd/Atoms/AtomAnalysis.lean b/LeanPool/FunctionSpaces/Rd/Atoms/AtomAnalysis.lean index 3f183723d9..15bd3002c6 100644 --- a/LeanPool/FunctionSpaces/Rd/Atoms/AtomAnalysis.lean +++ b/LeanPool/FunctionSpaces/Rd/Atoms/AtomAnalysis.lean @@ -14,8 +14,9 @@ Modified for Lean Pool: module names and imports adapted. /-! # Atomic decompositions -Every `F ∈ L_p(V)`, `1 ≤ p < ∞`, is a sum of atoms built from its local means -(Schneider–Vybíral, Theorem 2.6, direction ⇒). For a kernel `K` and `g ∈ L_p`, the dyadic cells +Each local-means term of `F ∈ L_p(V)`, `1 ≤ p < ∞`, has a cell-atom expansion. This +construction proves the forward direction of the regular-atom characterization below. +For a kernel `K` and `g ∈ L_p`, the dyadic cells `P_{j,m}` split the convolution into **cell atoms** (`Rd.cellAtom`): `K ⋆ g = ∑_m λ_{j,m} a_{j,m}`, `λ_{j,m} = 2^(jn/p) ‖1_{P_{j,m}} g‖_p`, @@ -538,8 +539,9 @@ theorem exists_cellAtom_pointwise_bound {p : ℝ≥0∞} (hp1 : 1 ≤ p) (L r : variable {p : ℝ≥0∞} [Fact (1 ≤ p)] -/-- **Atomic decomposition** (Schneider–Vybíral, Theorem 2.6, direction ⇒): for every order `r` -there is `C < ∞` such that for every `F ∈ L_p` the terms of the reproducing formula +/-- **Cell-atom decomposition of the local-means terms**. This gives the analysis step in +`Rd.LocalMeansBump.besov_iff_atomic`. For every order `r` there is `C < ∞` such that for +every `F ∈ L_p` the terms of the reproducing formula `F = ∑_j η_j ⋆ (k_j ⋆ F)` (`Rd.LocalMeansBump.tendsto_sum_dual_localMean`) are `η_j ⋆ (k_j ⋆ F) = ∑_m λ_{j,m} a_{j,m}` with the cell atoms, regular atoms of order and exponent `r` with radius factor `2LR + n` and constant `C`; the coefficients have diff --git a/LeanPool/FunctionSpaces/Rd/BesselPotentials/BesselPotentialLifting.lean b/LeanPool/FunctionSpaces/Rd/BesselPotentials/BesselPotentialLifting.lean index 52cf7e134c..cfe13ef500 100644 --- a/LeanPool/FunctionSpaces/Rd/BesselPotentials/BesselPotentialLifting.lean +++ b/LeanPool/FunctionSpaces/Rd/BesselPotentials/BesselPotentialLifting.lean @@ -212,21 +212,21 @@ Mathlib's Bessel potential maps the tempered distribution of `η ⋆ F` to that (`Rd.besselPotential_apply_apply`, `Rd.integral_besselSchwartz_mul_conv`). -/ theorem besselPotential_toLp_conv (hp : p ≠ ∞) (t : ℝ) (η : 𝓢(V, ℂ)) {F : V → ℂ} (hF : MemLp F p volume) : - besselPotential V ℂ t ((memLp_conv Fact.out hp η.integrable hF).toLp _ : 𝓢'(V, ℂ)) = - ((memLp_conv Fact.out hp (besselSchwartz t η).integrable hF).toLp _ : 𝓢'(V, ℂ)) := by + besselPotential V ℂ t ((memLp_conv Fact.out η.integrable hF).toLp _ : 𝓢'(V, ℂ)) = + ((memLp_conv Fact.out (besselSchwartz t η).integrable hF).toLp _ : 𝓢'(V, ℂ)) := by ext u rw [besselPotential_apply_apply, Lp.toTemperedDistribution_apply, Lp.toTemperedDistribution_apply] - calc ∫ x, besselSchwartz t u x • (memLp_conv Fact.out hp η.integrable hF).toLp _ x + calc ∫ x, besselSchwartz t u x • (memLp_conv Fact.out η.integrable hF).toLp _ x = ∫ x, besselSchwartz t u x * conv η F volume x := by refine integral_congr_ae ?_ - filter_upwards [MemLp.coeFn_toLp (memLp_conv Fact.out hp η.integrable hF)] with x hx + filter_upwards [MemLp.coeFn_toLp (memLp_conv Fact.out η.integrable hF)] with x hx rw [hx, smul_eq_mul] _ = ∫ x, u x * conv (besselSchwartz t η) F volume x := integral_besselSchwartz_mul_conv Fact.out hp hF t η u - _ = ∫ x, u x • (memLp_conv Fact.out hp (besselSchwartz t η).integrable hF).toLp _ x := by + _ = ∫ x, u x • (memLp_conv Fact.out (besselSchwartz t η).integrable hF).toLp _ x := by refine integral_congr_ae ?_ - filter_upwards [MemLp.coeFn_toLp (memLp_conv Fact.out hp (besselSchwartz t η).integrable + filter_upwards [MemLp.coeFn_toLp (memLp_conv Fact.out (besselSchwartz t η).integrable hF)] with x hx rw [hx, smul_eq_mul] @@ -243,15 +243,15 @@ theorem besselPotential_eq_of_tendsto (hp : p ≠ ∞) (t : ℝ) {η : ℕ → conv (besselSchwartz t (η j)) (F j) volume x) - ⇑g) p volume) atTop (𝓝 0)) : besselPotential V ℂ t (f : 𝓢'(V, ℂ)) = g := by set P : (ℕ → 𝓢(V, ℂ)) → ℕ → Lp ℂ p (volume : Measure V) := fun K J => - ∑ j ∈ Finset.range J, (memLp_conv Fact.out hp (K j).integrable (hF j)).toLp _ with hPdef + ∑ j ∈ Finset.range J, (memLp_conv Fact.out (K j).integrable (hF j)).toLp _ with hPdef have hcoe : ∀ (K : ℕ → 𝓢(V, ℂ)) (J : ℕ), ⇑(P K J) =ᵐ[volume] fun x => ∑ j ∈ Finset.range J, conv (K j) (F j) volume x := by intro K J have h1 : ∀ᵐ x ∂volume, ∀ j, - (memLp_conv Fact.out hp (K j).integrable (hF j)).toLp _ x = conv (K j) (F j) volume x := + (memLp_conv Fact.out (K j).integrable (hF j)).toLp _ x = conv (K j) (F j) volume x := ae_all_iff.2 fun j => MemLp.coeFn_toLp _ filter_upwards [h1, Lp.coeFn_fun_finsetSum (Finset.range J) fun j => - (memLp_conv Fact.out hp (K j).integrable (hF j)).toLp _] with x hx1 hx2 + (memLp_conv Fact.out (K j).integrable (hF j)).toLp _] with x hx1 hx2 rw [hPdef, hx2] exact Finset.sum_congr rfl fun j _ => hx1 j have hlim : ∀ (K : ℕ → 𝓢(V, ℂ)) (k : Lp ℂ p (volume : Measure V)), @@ -396,9 +396,9 @@ theorem exists_besselPotential_eq_of_memTriebelLizorkin [Nontrivial V] (hp1 : 1 refine ⟨czConst V p B H, czConst_ne_top hp1 hp hB hH, fun f hf => ?_⟩ obtain ⟨h, hlim, hnorm⟩ := exists_tendsto_sum_conv_blockFun hp (K := fun j => besselSchwartz s (psiDualS j)) (czConst_ne_top hp1 hp hB hH) hf - fun t => eLpNorm_sum_conv_besselSchwartz_le hp1 hp hθ t fun j => memLp_blockFun hp j f + fun t => eLpNorm_sum_conv_besselSchwartz_le hp1 hp hθ t fun j => memLp_blockFun j f refine ⟨h, besselPotential_eq_of_tendsto hp s (η := psiDualS) - (fun j => memLp_blockFun hp j f) ?_ hlim, hnorm⟩ + (fun j => memLp_blockFun j f) ?_ hlim, hnorm⟩ simpa only [coe_psiDualS] using tendsto_eLpNorm_sum_conv_psiDual_blockFun_sub hp f /-- **`F^s_{p,2} ⊆ H^{s,p}`**: in dimension `n ≥ 1`, for `1 < p < ∞` and real `s`, every diff --git a/LeanPool/FunctionSpaces/Rd/Differences/DilatedDifferences.lean b/LeanPool/FunctionSpaces/Rd/Differences/DilatedDifferences.lean index 25e9c9b7f8..474e25dea5 100644 --- a/LeanPool/FunctionSpaces/Rd/Differences/DilatedDifferences.lean +++ b/LeanPool/FunctionSpaces/Rd/Differences/DilatedDifferences.lean @@ -82,7 +82,7 @@ theorem lpModulus_convLp_le (hp : p ≠ ∞) {K : V → ℂ} (hK : Integrable K rw [lpModulus, modulus_congr_ae (convLp_apply_ae hp hK h)] refine iSup₂_le fun v hv => ?_ rw [eLpNorm_congr_ae (higherDiff_conv_ae Fact.out hp hK (Lp.memLp h) r v), Lp.eNorm_def] - exact (eLpNorm_conv_le Fact.out hp (integrable_higherDiff hK r v).aestronglyMeasurable + exact (eLpNorm_conv_le Fact.out (integrable_higherDiff hK r v).aestronglyMeasurable (Lp.aestronglyMeasurable h)).trans (by gcongr; exact hB v hv) end Rd diff --git a/LeanPool/FunctionSpaces/Rd/Differences/PointwiseMultipliers.lean b/LeanPool/FunctionSpaces/Rd/Differences/PointwiseMultipliers.lean index f95f6cfbad..ee5a53547c 100644 --- a/LeanPool/FunctionSpaces/Rd/Differences/PointwiseMultipliers.lean +++ b/LeanPool/FunctionSpaces/Rd/Differences/PointwiseMultipliers.lean @@ -419,9 +419,8 @@ theorem multiplierConst_ne_top (hp : p ≠ ∞) {r : ℕ} {s : ℝ} (hsr : s < r exact ENNReal.mul_ne_top (ENNReal.pow_ne_top ENNReal.ofNat_ne_top) (ENNReal.one_sub_two_rpow_neg_inv_ne_top (by linarith)) -/-- **The terms of order `l`**: `‖(2^(k(s-l)) ω_(r-l)(F, 2^(-k))_p)_k‖_{ℓ_q} ≤ K_l ‖F‖_{s,r}` for -`l ≤ r`. -/ -theorem lqNorm_lpModulus_le_multiplierConst (hp : p ≠ ∞) {r l : ℕ} (hlr : l ≤ r) {s : ℝ} +/-- **The terms of order `l`**: `‖(2^(k(s-l)) ω_(r-l)(F, 2^(-k))_p)_k‖_{ℓ_q} ≤ K_l ‖F‖_{s,r}`. -/ +theorem lqNorm_lpModulus_le_multiplierConst (hp : p ≠ ∞) {r l : ℕ} {s : ℝ} (hsr : s < r) {q : ℝ≥0∞} (hq : 1 ≤ q) (F : Lp ℂ p (volume : Measure V)) : lqNorm q (fun k => dyadicWeight (s - l) k * lpModulus p (r - l) F k) ≤ multiplierConst (V := V) hp r s l * @@ -495,9 +494,8 @@ theorem modNorm_mulLp_le (hp : p ≠ ∞) {ψ : V → ℂ} (hψ : ContDiff ℝ ( Finset.sum_congr rfl fun l _ => ENNReal.lqNorm_const_mul _ _ _ ≤ ∑ l ∈ Finset.range (r + 1), (r.choose l : ℝ≥0∞) * ENNReal.ofReal C * (multiplierConst (V := V) hp r s l * N) := - Finset.sum_le_sum fun l hl => mul_le_mul' le_rfl - (lqNorm_lpModulus_le_multiplierConst hp (Nat.lt_succ_iff.1 (Finset.mem_range.1 hl)) - hsr hq F) + Finset.sum_le_sum fun l _ => mul_le_mul' le_rfl + (lqNorm_lpModulus_le_multiplierConst hp hsr hq F) calc ‖G‖ₑ + lqNorm q (fun k => dyadicWeight s k * lpModulus p r G k) ≤ ENNReal.ofReal C * N + ∑ l ∈ Finset.range (r + 1), (r.choose l : ℝ≥0∞) * ENNReal.ofReal C * (multiplierConst (V := V) hp r s l * N) := diff --git a/LeanPool/FunctionSpaces/Rd/MixedSmoothness/MixedLittlewoodPaley.lean b/LeanPool/FunctionSpaces/Rd/MixedSmoothness/MixedLittlewoodPaley.lean index c75d9f944d..116e6b3d03 100644 --- a/LeanPool/FunctionSpaces/Rd/MixedSmoothness/MixedLittlewoodPaley.lean +++ b/LeanPool/FunctionSpaces/Rd/MixedSmoothness/MixedLittlewoodPaley.lean @@ -170,7 +170,7 @@ theorem exists_eLpNorm_conv_psi_dual_le (L : ℕ) : refine ⟨(C₀ + C₁) * dyadicWeight L 3, ENNReal.mul_ne_top (ENNReal.add_ne_top.2 ⟨hC₀, hC₁⟩) (ENNReal.dyadicWeight_ne_top _ _), fun m k => ?_⟩ have htriv : eLpNorm (conv (psi (V := ℝ) m) (b.dual L k) volume) 1 volume ≤ C₀ := - (eLpNorm_conv_le le_rfl h1 (integrable_psi m).aestronglyMeasurable + (eLpNorm_conv_le le_rfl (integrable_psi m).aestronglyMeasurable (b.integrable_dual L k).aestronglyMeasurable).trans (mul_le_mul' (eLpNorm_psi_one_le m) (b.eLpNorm_dual_one_le L k)) by_cases hkm : k + 3 ≤ m @@ -264,7 +264,7 @@ theorem exists_eLpNorm_conv_kernel_Theta_le (L : ℕ) : · rw [show m - k = 0 by omega, ENNReal.dyadicWeight_zero_right] · rfl rw [hc, mul_one] - refine (eLpNorm_conv_le le_rfl h1 (b.integrable_kernel L m).aestronglyMeasurable + refine (eLpNorm_conv_le le_rfl (b.integrable_kernel L m).aestronglyMeasurable (integrable_Theta k).aestronglyMeasurable).trans ?_ rw [eLpNorm_Theta_one] exact (mul_le_mul' (b.eLpNorm_kernel_one_le L m) le_rfl).trans le_self_add diff --git a/LeanPool/FunctionSpaces/Rd/MixedSmoothness/MixedLocalMeans.lean b/LeanPool/FunctionSpaces/Rd/MixedSmoothness/MixedLocalMeans.lean index 6e17ad2425..7d1ec1c5df 100644 --- a/LeanPool/FunctionSpaces/Rd/MixedSmoothness/MixedLocalMeans.lean +++ b/LeanPool/FunctionSpaces/Rd/MixedSmoothness/MixedLocalMeans.lean @@ -465,7 +465,7 @@ theorem lpMixedModulus_convLp_mixedDual_le (hp : p ≠ ∞) (L : ℕ) (m k : Fin split_ifs · exact integrable_higherDiff (b.integrable_dual L (k i)) L _ · exact b.integrable_dual L (k i) - refine (eLpNorm_conv_le hp1 hp + refine (eLpNorm_conv_le hp1 (integrable_mixedDiff (b.integrable_mixedDual L k) L e v).aestronglyMeasurable (Lp.aestronglyMeasurable h)).trans ?_ rw [Lp.eNorm_def] diff --git a/LeanPool/FunctionSpaces/Rd/SingularIntegrals/ConvolutionAdjoint.lean b/LeanPool/FunctionSpaces/Rd/SingularIntegrals/ConvolutionAdjoint.lean index 5febceb019..347246b671 100644 --- a/LeanPool/FunctionSpaces/Rd/SingularIntegrals/ConvolutionAdjoint.lean +++ b/LeanPool/FunctionSpaces/Rd/SingularIntegrals/ConvolutionAdjoint.lean @@ -142,7 +142,7 @@ theorem integrable_kernel_mul_mul {p q : ℝ≥0∞} [p.HolderConjugate q] (hp : simpa only [ContinuousLinearMap.mul_apply', sub_sub_cancel, Function.uncurry_apply_pair] using h · have hH : MemLp (conv (fun z => ((‖K z‖ : ℝ) : ℂ)) (fun z => ((‖f z‖ : ℝ) : ℂ)) volume) p - volume := memLp_conv hp1 hp hK.norm.ofReal hf.norm.ofReal + volume := memLp_conv hp1 hK.norm.ofReal hf.norm.ofReal refine ((hH.integrable_mul hg).norm).congr (ae_of_all _ fun x => ?_) have hHx : conv (fun z => ((‖K z‖ : ℝ) : ℂ)) (fun z => ((‖f z‖ : ℝ) : ℂ)) volume x = ((∫ y, ‖K (x - y)‖ * ‖f y‖ : ℝ) : ℂ) := by @@ -344,7 +344,7 @@ theorem hasWeakLineDeriv_conv {p : ℝ≥0∞} (hp1 : 1 ≤ p) (hp : p ≠ ∞) LocallyIntegrableOn (conv G f volume) ((⊤ : Opens V) : Set V) volume := fun G => locallyIntegrableOn_of_memLp hp1 (by rw [volume_restrict_top] - exact memLp_conv hp1 hp G.integrable hf) + exact memLp_conv hp1 G.integrable hf) refine (hasWeakLineDeriv_iff_integral (hloc η) (hloc _)).2 fun φ => ?_ have hA := integral_conv_iteratedLineDerivOp_mul hp1 hp hf η (testSchwartz φ) v rw [iteratedLineDerivOp_testSchwartz] at hA @@ -358,8 +358,8 @@ Schwartz function `η` and `v ∈ V^k`, the class of `(∂^v η) ⋆ f` in `L_p` `∂^v` of the class of `η ⋆ f` (`Rd.hasWeakLineDeriv_conv`). -/ theorem hasWeakLineDeriv_toLp_conv {p : ℝ≥0∞} (hp1 : 1 ≤ p) (hp : p ≠ ∞) {f : V → ℂ} (hf : MemLp f p) (η : 𝓢(V, ℂ)) {k : ℕ} (v : Fin k → V) : - HasWeakLineDeriv ⊤ v (memLp_conv hp1 hp η.integrable hf).toLp - (memLp_conv hp1 hp (∂^{v} η : 𝓢(V, ℂ)).integrable hf).toLp := by + HasWeakLineDeriv ⊤ v (memLp_conv hp1 η.integrable hf).toLp + (memLp_conv hp1 (∂^{v} η : 𝓢(V, ℂ)).integrable hf).toLp := by refine (hasWeakLineDeriv_conv hp1 hp hf η v).congr_ae ?_ ?_ <;> rw [volume_restrict_top] exacts [(MemLp.coeFn_toLp _).symm, (MemLp.coeFn_toLp _).symm] diff --git a/LeanPool/FunctionSpaces/Rd/SingularIntegrals/VectorValuedSingularIntegrals.lean b/LeanPool/FunctionSpaces/Rd/SingularIntegrals/VectorValuedSingularIntegrals.lean index 577428406f..8c0c44e6b1 100644 --- a/LeanPool/FunctionSpaces/Rd/SingularIntegrals/VectorValuedSingularIntegrals.lean +++ b/LeanPool/FunctionSpaces/Rd/SingularIntegrals/VectorValuedSingularIntegrals.lean @@ -324,14 +324,14 @@ theorem IsCZFamily.enorm_sum_integral_conv_mul_conj_le [Nontrivial V] (h : IsCZF have hp : p ≠ ∞ := ((ENNReal.HolderConjugate.lt_top_iff_one_lt p q).2 hq1).ne have hq : q ≠ ∞ := ne_top_of_lt hq2 have hS : MemLp (fun y => ∑ j ∈ s, conv (fun z => conj (θ j (-z))) (g j) volume y) q volume := - memLp_finsetSum s fun j _ => memLp_conv hq1.le hq (h.adjoint.integrable j) (hg j) + memLp_finsetSum s fun j _ => memLp_conv hq1.le (h.adjoint.integrable j) (hg j) calc ‖∑ j ∈ s, ∫ x, conv (θ j) f volume x * conj (g j x)‖ₑ = ‖∫ y, f y * conj (∑ j ∈ s, conv (fun z => conj (θ j (-z))) (g j) volume y)‖ₑ := by rw [Finset.sum_congr rfl fun j _ => integral_conv_mul_conj hp (h.integrable j) hf (hg j), ← integral_finsetSum (f := fun j y => f y * conj (conv (fun z => conj (θ j (-z))) (g j) volume y)) s fun j _ => hf.integrable_mul - (memLp_conv hq1.le hq (h.adjoint.integrable j) (hg j)).star] + (memLp_conv hq1.le (h.adjoint.integrable j) (hg j)).star] simp only [map_sum, Finset.mul_sum] _ ≤ ∫⁻ y, ‖f y‖ₑ * ‖∑ j ∈ s, conv (fun z => conj (θ j (-z))) (g j) volume y‖ₑ := by refine (eNorm_integral_le_lintegral_eNorm _).trans (le_of_eq ?_) @@ -376,7 +376,7 @@ theorem IsCZFamily.enorm_integral_sum_conv_mul_conj_le [Nontrivial V] (h : IsCZF simp_rw [Finset.sum_mul] rw [integral_finsetSum (f := fun j x => conv (θ j) (g j) volume x * conj (u x)) s fun j _ => - (memLp_conv hp1 hp (h.integrable j) (hg j)).integrable_mul hu.star] + (memLp_conv hp1 (h.integrable j) (hg j)).integrable_mul hu.star] rw [Finset.sum_congr rfl fun j _ => integral_conv_mul_conj hp (h.integrable j) (hg j) hu] _ ≤ ∑ j ∈ s, ∫⁻ y, ‖g j y‖ₑ * ‖conv (fun z => conj (θ j (-z))) u volume y‖ₑ := by refine (eNorm_sum_le _ _).trans (Finset.sum_le_sum fun j _ => ?_) @@ -419,7 +419,7 @@ theorem IsCZFamily.eLpNorm_lqNorm_conv_le_of_two_lt [Nontrivial V] (h : IsCZFami (u := fun j x => if j < J then conv (θ j) f volume x else 0) (fun j => ?_) (fun j hj => ?_) fun g hg => ?_ · by_cases hj : j < J - · simpa only [hj, ↓reduceIte] using memLp_conv hp1.le hp (h.integrable j) hf + · simpa only [hj, ↓reduceIte] using memLp_conv hp1.le (h.integrable j) hf · simp [hj] · funext x simp only [Finset.mem_range.not.1 hj, ↓reduceIte, Pi.zero_apply] @@ -465,7 +465,7 @@ theorem IsCZFamily.eLpNorm_sum_conv_le_of_two_lt [Nontrivial V] (h : IsCZFamily have hq1 : 1 < p.conjExponent := (ENNReal.HolderConjugate.lt_top_iff_one_lt p _).1 hp.lt_top have hq2 : p.conjExponent < 2 := ENNReal.HolderConjugate.lt_two_of_two_lt hp2 exact eLpNorm_le_of_forall_enorm_integral_mul_conj_le hp1 hp - (memLp_finsetSum s fun j _ => memLp_conv hp1.le hp (h.integrable j) (hg j)) fun u hu => + (memLp_finsetSum s fun j _ => memLp_conv hp1.le (h.integrable j) (hg j)) fun u hu => h.enorm_integral_sum_conv_mul_conj_le hq1 hq2 s hg hu /-! ### All `1 < p < ∞` -/ diff --git a/LeanPool/FunctionSpaces/Rd/Sobolev/GagliardoNirenbergSobolev.lean b/LeanPool/FunctionSpaces/Rd/Sobolev/GagliardoNirenbergSobolev.lean index 6d21bb5d29..0acb47bbf8 100644 --- a/LeanPool/FunctionSpaces/Rd/Sobolev/GagliardoNirenbergSobolev.lean +++ b/LeanPool/FunctionSpaces/Rd/Sobolev/GagliardoNirenbergSobolev.lean @@ -120,7 +120,7 @@ theorem eLpNorm_conv_le_of_hasWeakLineDeriv {p p' : ℝ≥0} (hp : 1 ≤ p) (hn have he : (fun x => fderiv ℝ (conv K h volume) x (gridBasis V k)) = conv K (g k) volume := funext fun x => fderiv_conv_apply_eq_conv hK hKs (hhg k) x rw [he] - exact eLpNorm_conv_le hp1 ENNReal.coe_ne_top hK.continuous.aestronglyMeasurable + exact eLpNorm_conv_le hp1 hK.continuous.aestronglyMeasurable (hhg k).locallyIntegrable_deriv.aestronglyMeasurable /-- **The Gagliardo–Nirenberg–Sobolev inequality with compact support**: let `n ≥ 1`, `1 ≤ p`, diff --git a/LeanPool/FunctionSpaces/Rd/Sobolev/SobolevEmbedding.lean b/LeanPool/FunctionSpaces/Rd/Sobolev/SobolevEmbedding.lean index 158c13ddc8..951e51f9a1 100644 --- a/LeanPool/FunctionSpaces/Rd/Sobolev/SobolevEmbedding.lean +++ b/LeanPool/FunctionSpaces/Rd/Sobolev/SobolevEmbedding.lean @@ -198,7 +198,7 @@ theorem conv_Theta_blockFun (hp : p ≠ ∞) (j : ℕ) (f : Lp ℂ p (volume : M exact h.symm refine (Continuous.ae_eq_iff_eq volume ?_ (continuous_blockFun hp j f)).1 hae rw [← coe_schwartzDilate_bandKernelS] - exact continuous_conv_schwartz Fact.out hp _ (memLp_blockFun hp j f) + exact continuous_conv_schwartz Fact.out hp _ (memLp_blockFun j f) /-- **The Nikolskii inequality for blocks at every point**: for `1 ≤ p < ∞`, `f ∈ L_p(V)` and every `x`, `|(ψ_j ⋆ f)(x)| ≤ N_p 2^(jn/p) ‖ψ_j ⋆ f‖_p`. The block is `Θ_j ⋆ (ψ_j ⋆ f)` @@ -266,7 +266,7 @@ theorem memLp_blockFun_of_le (hp : p ≠ ∞) {r : ℝ≥0∞} (hpr : p ≤ r) ( memLp_iff.2 <| (eLpNorm_blockFun_le_nikolskii hp hpr j f).trans_lt (ENNReal.mul_lt_top (ENNReal.mul_lt_top (ENNReal.rpow_lt_top_of_nonneg (ENNReal.one_sub_toReal_div_nonneg hpr) nikolskiiBlockConst_ne_top) - (ENNReal.dyadicWeight_lt_top _ _)) (memLp_blockFun hp j f).eLpNorm_lt_top) + (ENNReal.dyadicWeight_lt_top _ _)) (memLp_blockFun j f).eLpNorm_lt_top) /-! ### Besov embeddings -/ diff --git a/LeanPool/FunctionSpaces/Rd/Sobolev/SobolevTriebelLizorkin.lean b/LeanPool/FunctionSpaces/Rd/Sobolev/SobolevTriebelLizorkin.lean index d81e3c0c69..dcf3c0bec7 100644 --- a/LeanPool/FunctionSpaces/Rd/Sobolev/SobolevTriebelLizorkin.lean +++ b/LeanPool/FunctionSpaces/Rd/Sobolev/SobolevTriebelLizorkin.lean @@ -172,7 +172,7 @@ theorem triebelLizorkinNorm_le_of_hasWeakLineDeriv [Nontrivial V] (hp1 : 1 < p) fun j => (aestronglyMeasurable_blockFun j f).eNorm).trans ?_ gcongr · rw [eLpNorm_eNorm _ (aestronglyMeasurable_blockFun 0 f)] - exact eLpNorm_blockFun_zero_le hp f + exact eLpNorm_blockFun_zero_le f · exact eLpNorm_lqNorm_blockFun_succ_le hp1 hp hg /-- **The weak derivatives of order `m` along the basis vectors give `f ∈ F^m_{p,2}`**: in @@ -260,7 +260,7 @@ theorem IsCZFamily.eLpNorm_sum_conv_smul_blockFun_le [Nontrivial V] {θ : ℕ eLpNorm (fun x => ∑ j ∈ t, conv (θ j) (c j • blockFun j f) volume x) p volume ≤ czConst V p B H * eLpNorm (fun x => lqNorm 2 fun j => if j ∈ t then dyadicWeight σ j * ‖blockFun j f x‖ₑ else 0) p volume := - hθ.eLpNorm_sum_conv_smul_le hp1 hp hc t fun j => memLp_blockFun hp j f + hθ.eLpNorm_sum_conv_smul_le hp1 hp hc t fun j => memLp_blockFun j f /-- **The synthesis bound for derivatives of the synthesis kernels**: in dimension `n ≥ 1`, for `1 < p < ∞`, directions `w ∈ V^k`, every finite set `s ⊆ ℕ` and `f ∈ L_p(V)`, @@ -288,11 +288,11 @@ theorem eLpNorm_sum_conv_derivDual_le [Nontrivial V] (hp1 : 1 < p) (hp : p ≠ (fun j => by rw [ENNReal.dyadicWeight_natCast]; exact enorm_two_pow_complex _) s f /-- The **synthesis sums** `∑_{j ∈ t} K_j ⋆ (ψ_j ⋆ f)` of Schwartz kernels `K_j` and the blocks of -`f ∈ L_p(V)` lie in `L_p(V)` for `1 ≤ p < ∞`, by Young's inequality. -/ -theorem memLp_sum_conv_blockFun (hp : p ≠ ∞) (K : ℕ → 𝓢(V, ℂ)) +`f ∈ L_p(V)` lie in `L_p(V)` for `1 ≤ p ≤ ∞`, by Young's inequality. -/ +theorem memLp_sum_conv_blockFun (K : ℕ → 𝓢(V, ℂ)) (f : Lp ℂ p (volume : Measure V)) (t : Finset ℕ) : MemLp (fun x => ∑ j ∈ t, conv (K j) (blockFun j f) volume x) p volume := - memLp_finsetSum _ fun j _ => memLp_conv Fact.out hp (K j).integrable (memLp_blockFun hp j f) + memLp_finsetSum _ fun j _ => memLp_conv Fact.out (K j).integrable (memLp_blockFun j f) omit [Fact (1 ≤ p)] in /-- **Differences of synthesis sums**: let `σ` be real and `K_j` Schwartz kernels with @@ -334,7 +334,7 @@ theorem cauchySeq_toLp_sum_conv_blockFun (hp : p ≠ ∞) {σ : ℝ} {K : ℕ (hK : ∀ t : Finset ℕ, eLpNorm (fun x => ∑ j ∈ t, conv (K j) (blockFun j f) volume x) p volume ≤ C * eLpNorm (fun x => lqNorm 2 fun j => if j ∈ t then dyadicWeight σ j * ‖blockFun j f x‖ₑ else 0) p volume) : - CauchySeq fun J => (memLp_sum_conv_blockFun hp K f (Finset.range J)).toLp _ := + CauchySeq fun J => (memLp_sum_conv_blockFun K f (Finset.range J)).toLp _ := cauchySeq_of_edist_le_lqNorm_ite (p := p) (q := 2) (g := fun j x => dyadicWeight σ j * ‖blockFun j f x‖ₑ) hC (zero_lt_one.trans_le Fact.out).ne' hp two_ne_zero ENNReal.ofNat_ne_top @@ -370,11 +370,11 @@ noncomputable def derivSynthesisSum {k : ℕ} (w : Fin k → V) (f : Lp ℂ p (v (J : ℕ) : V → ℂ := fun x => ∑ j ∈ Finset.range J, conv (∂^{w} (psiDualS j) : 𝓢(V, ℂ)) (blockFun j f) volume x -/-- The partial sums of the derivative lie in `L_p(V)` for `1 ≤ p < ∞`, by Young's inequality +/-- The partial sums of the derivative lie in `L_p(V)` for `1 ≤ p ≤ ∞`, by Young's inequality (`Rd.memLp_sum_conv_blockFun`). -/ -theorem memLp_derivSynthesisSum (hp : p ≠ ∞) {k : ℕ} (w : Fin k → V) +theorem memLp_derivSynthesisSum {k : ℕ} (w : Fin k → V) (f : Lp ℂ p (volume : Measure V)) (J : ℕ) : MemLp (derivSynthesisSum w f J) p volume := - memLp_sum_conv_blockFun hp (fun j => ∂^{w} (psiDualS j)) f (Finset.range J) + memLp_sum_conv_blockFun (fun j => ∂^{w} (psiDualS j)) f (Finset.range J) /-- **Differences of partial sums**: in dimension `n ≥ 1`, for `1 < p < ∞` and `N ≤ N'`, the difference of the partial sums `Rd.derivSynthesisSum` at `N'` and at `N` has `L_p` norm at most @@ -394,7 +394,7 @@ theorem eLpNorm_derivSynthesisSum_sub_le [Nontrivial V] (hp1 : 1 < p) (hp : p the synthesis bound `Rd.eLpNorm_sum_conv_derivDual_le`). -/ theorem cauchySeq_toLp_derivSynthesisSum [Nontrivial V] (hp1 : 1 < p) (hp : p ≠ ∞) {k : ℕ} (w : Fin k → V) {f : Lp ℂ p (volume : Measure V)} (hf : MemTriebelLizorkin (k : ℝ) 2 f) : - CauchySeq fun J => (memLp_derivSynthesisSum hp w f J).toLp := + CauchySeq fun J => (memLp_derivSynthesisSum w f J).toLp := cauchySeq_toLp_sum_conv_blockFun hp (K := fun j => (∂^{w} (psiDualS j) : 𝓢(V, ℂ))) (tlToSobolevConst_ne_top hp1 hp w) hf fun t => eLpNorm_sum_conv_derivDual_le hp1 hp w t f @@ -408,7 +408,7 @@ theorem hasWeakLineDeriv_sum_conv_psiDual (hp : p ≠ ∞) {k : ℕ} (w : Fin k (fun x => ∑ j ∈ Finset.range J, conv (psiDual j) (blockFun j f) volume x) (derivSynthesisSum w f J) := by have h := HasWeakLineDeriv.sum (s := Finset.range J) fun j _ => - hasWeakLineDeriv_conv Fact.out hp (memLp_blockFun hp j f) (psiDualS j) w + hasWeakLineDeriv_conv Fact.out hp (memLp_blockFun j f) (psiDualS j) w simp only [coe_psiDualS] at h rw [Finset.sum_fn, Finset.sum_fn] at h exact h diff --git a/LeanPool/FunctionSpaces/Rd/TriebelLizorkin/SquareFunction.lean b/LeanPool/FunctionSpaces/Rd/TriebelLizorkin/SquareFunction.lean index da4a55dc38..19fccc561c 100644 --- a/LeanPool/FunctionSpaces/Rd/TriebelLizorkin/SquareFunction.lean +++ b/LeanPool/FunctionSpaces/Rd/TriebelLizorkin/SquareFunction.lean @@ -148,7 +148,7 @@ theorem enorm_le_triebelLizorkinNorm_zero_two [Nontrivial V] (hp1 : 1 < p) (hp : refine le_of_tendsto' h fun J => ?_ rw [Lp.eNorm_def, ← eLpNorm_congr_ae (sum_conv_psiDual_blockFun_ae hp _ f), triebelLizorkinNorm_zero_left] - exact isCZFamily_psiDual.eLpNorm_sum_conv_le hp1 hp _ fun j => memLp_blockFun hp j f + exact isCZFamily_psiDual.eLpNorm_sum_conv_le hp1 hp _ fun j => memLp_blockFun j f /-- **The square function theorem `L_p = F^0_{p,2}`**: in dimension `n ≥ 1`, for `1 < p < ∞`, the subspace `F^0_{p,2}` of `L_p(V)` is all of `L_p(V)`. The norms are equivalent by diff --git a/LeanPool/FunctionSpaces/Rd/TriebelLizorkin/TriebelLizorkin.lean b/LeanPool/FunctionSpaces/Rd/TriebelLizorkin/TriebelLizorkin.lean index 05ff656134..49ce05fd95 100644 --- a/LeanPool/FunctionSpaces/Rd/TriebelLizorkin/TriebelLizorkin.lean +++ b/LeanPool/FunctionSpaces/Rd/TriebelLizorkin/TriebelLizorkin.lean @@ -136,18 +136,18 @@ theorem aestronglyMeasurable_blockFun (j : ℕ) (f : Lp ℂ p (volume : Measure AEStronglyMeasurable (blockFun j f) volume := aestronglyMeasurable_conv (integrable_psi j).aestronglyMeasurable (Lp.aestronglyMeasurable f) -/-- The pointwise blocks `ψ_j ⋆ f` of `f ∈ L_p(V)` lie in `L_p(V)`, for `1 ≤ p < ∞`, by Young's +/-- The pointwise blocks `ψ_j ⋆ f` of `f ∈ L_p(V)` lie in `L_p(V)`, for `1 ≤ p ≤ ∞`, by Young's inequality (`Rd.memLp_conv`). -/ -theorem memLp_blockFun (hp : p ≠ ∞) (j : ℕ) (f : Lp ℂ p (volume : Measure V)) : +theorem memLp_blockFun (j : ℕ) (f : Lp ℂ p (volume : Measure V)) : MemLp (blockFun j f) p volume := - memLp_conv Fact.out hp (integrable_psi j) (Lp.memLp f) + memLp_conv Fact.out (integrable_psi j) (Lp.memLp f) -/-- **The first block**: `‖ψ_0 ⋆ f‖_p ≤ ‖Φ‖_1 ‖f‖_p` for `1 ≤ p < ∞`, by Young's inequality, +/-- **The first block**: `‖ψ_0 ⋆ f‖_p ≤ ‖Φ‖_1 ‖f‖_p` for `1 ≤ p ≤ ∞`, by Young's inequality, since `ψ_0 = Φ_0` and `‖Φ_0‖_1 = ‖Φ‖_1`. -/ -theorem eLpNorm_blockFun_zero_le (hp : p ≠ ∞) (f : Lp ℂ p (volume : Measure V)) : +theorem eLpNorm_blockFun_zero_le (f : Lp ℂ p (volume : Measure V)) : eLpNorm (blockFun 0 f) p volume ≤ eLpNorm (lpKernel (V := V)) 1 volume * ‖f‖ₑ := by rw [Lp.eNorm_def, ← eLpNorm_Phi_one 0] - exact eLpNorm_conv_le Fact.out hp (integrable_Phi 0).aestronglyMeasurable + exact eLpNorm_conv_le Fact.out (integrable_Phi 0).aestronglyMeasurable (Lp.aestronglyMeasurable f) /-- `‖Δ_j f‖_p` is the `L_p` norm of the pointwise block `ψ_j ⋆ f`. -/ diff --git a/LeanPool/FunctionSpaces/Rd/TriebelLizorkin/TriebelLizorkinAtoms.lean b/LeanPool/FunctionSpaces/Rd/TriebelLizorkin/TriebelLizorkinAtoms.lean index 8d7ebc4ab7..4bfb111547 100644 --- a/LeanPool/FunctionSpaces/Rd/TriebelLizorkin/TriebelLizorkinAtoms.lean +++ b/LeanPool/FunctionSpaces/Rd/TriebelLizorkin/TriebelLizorkinAtoms.lean @@ -727,7 +727,7 @@ theorem tl_atomic_decomposition {L : ℕ} (hL : 1 ≤ L) (K : ℕ) (hp : p ≠ convLp hp (b.integrable_dual L j) (b.localMean hp L j F)) atTop (𝓝 F) := by have hcell : ∀ j m, MemLp ((cell j m).indicator (conv (b.kernel L j) F volume)) 1 volume := fun j m => memLp_one_indicator_cell Fact.out - (memLp_conv Fact.out hp (b.integrable_kernel L j) (Lp.memLp F)) j m + (memLp_conv Fact.out (b.integrable_kernel L j) (Lp.memLp F)) j m refine ⟨fun j m => ?_, fun j x => ?_, b.tendsto_sum_dual_localMean hp hL F⟩ · have h := b.isSmoothAtom_cellAtom le_rfl L K j (hcell j m) m rw [cellAtom_indicator] at h From de3059618523462795aa23cb97fd08a27fbb0149 Mon Sep 17 00:00:00 2001 From: Vasily Ilin Date: Fri, 27 Nov 2026 14:27:44 +0000 Subject: [PATCH 5/7] Preserve source notices for FunctionSpaces adaptations --- LeanPool/FunctionSpaces.lean | 4 ++++ .../ApproximationSpaces/Interpolation/KMethod.lean | 13 ++++++++++--- .../MeasureSpaces/Spectral/CompactEigenbasis.lean | 5 +++++ LeanPool/projects/function-spaces.yaml | 2 +- 4 files changed, 20 insertions(+), 4 deletions(-) diff --git a/LeanPool/FunctionSpaces.lean b/LeanPool/FunctionSpaces.lean index 6f359b9473..86848a134f 100644 --- a/LeanPool/FunctionSpaces.lean +++ b/LeanPool/FunctionSpaces.lean @@ -36,6 +36,10 @@ public import LeanPool.FunctionSpaces.Wavelets.Examples.Daubechies.D4Besov public import LeanPool.FunctionSpaces.Wavelets.Examples.Daubechies.OrderThree public import LeanPool.FunctionSpaces.Wavelets.Examples.DyadicStepsQuasiBanach +/- +Modified for Lean Pool by adapting the module names and reducing direct imports. +-/ + /-! # Characterizations of Besov, Triebel–Lizorkin and Sobolev spaces diff --git a/LeanPool/FunctionSpaces/ApproximationSpaces/Interpolation/KMethod.lean b/LeanPool/FunctionSpaces/ApproximationSpaces/Interpolation/KMethod.lean index 7ee079fae0..be3db8dc35 100644 --- a/LeanPool/FunctionSpaces/ApproximationSpaces/Interpolation/KMethod.lean +++ b/LeanPool/FunctionSpaces/ApproximationSpaces/Interpolation/KMethod.lean @@ -11,6 +11,12 @@ public import Mathlib.Order.SuccPred.IntervalSucc /- Modified for Lean Pool: module names and imports adapted. + +The adapted `phiFunctional` definition is from `MultilinearInterpolation/KMethod.lean` +at commit a351feafa218223404e53711861dd986822cd270. +Copyright (c) 2026 Lua Viana Reis. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Floris van Doorn, Jim Potergies, Michael Rothgang, Lua Viana Reis -/ /-! @@ -23,9 +29,10 @@ measures `f ∈ X` by the essential supremum of `t^(-θ) K(t, f)` for `q = ∞`, and `(X, Y)_{θ,q}` is the space of the `f` with `‖f‖_{K,θ,q} < ∞` (`ApproximationScheme.MemKMethod`), as in Bergh–Löfström, -Section 3.1. The main theorem (`ApproximationScheme.memInterp_iff_memKMethod`, Bergh–Löfström, -Lemma 3.1.3) says that the discrete K-method on every dyadic grid `t = 2^(-kρ)`, `ρ > 0`, gives -the same space, with equivalent norms and explicit constants +Section 3.1. The main theorem (`ApproximationScheme.memInterp_iff_memKMethod`) extends the +two-sided comparison of their Lemma 3.1.3. For a bounded linear map, every one-sided grid +`t = 2^(-kρ)` with `ρ > 0` and the added ambient norm give the same space, with explicit +comparison constants (`ApproximationScheme.kMethodNorm_le_interpNorm`, `ApproximationScheme.interpNorm_le_kMethodNorm`). Hence the grid does not matter, and the representation theorem reads `A^s_q = (X, Y)_{s/r,q}` for the continuous K-method (`ApproximationScheme.memApprox_iff_memKMethod`). diff --git a/LeanPool/FunctionSpaces/MeasureSpaces/Spectral/CompactEigenbasis.lean b/LeanPool/FunctionSpaces/MeasureSpaces/Spectral/CompactEigenbasis.lean index 7981570e6f..b205430ffc 100644 --- a/LeanPool/FunctionSpaces/MeasureSpaces/Spectral/CompactEigenbasis.lean +++ b/LeanPool/FunctionSpaces/MeasureSpaces/Spectral/CompactEigenbasis.lean @@ -12,6 +12,11 @@ public import TauCeti.Analysis.InnerProductSpace.Spectrum /- Modified for Lean Pool: module names and imports adapted. + +The adapted orthogonal-span proof is from `TauCeti/Analysis/InnerProductSpace/Spectrum.lean`. +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 -/ /-! diff --git a/LeanPool/projects/function-spaces.yaml b/LeanPool/projects/function-spaces.yaml index 075ffb6d8f..36485a8aca 100644 --- a/LeanPool/projects/function-spaces.yaml +++ b/LeanPool/projects/function-spaces.yaml @@ -37,7 +37,7 @@ main_results: - declaration: Rd.memSobolev_bessel_iff_memTriebelLizorkinDistr informal: In positive dimension and for 1 < p < infinity, Mathlib's Bessel potential space agrees with the distributional Triebel–Lizorkin space with second index two for every real smoothness. - declaration: Daubechies.besov_iff_coeff_d4 - informal: For 1 ≤ p < infinity, q ≥ 1 and 0 < s < 2 − log₂(1 + √3), finiteness of the Besov difference norm on the real line is equivalent to finiteness of the norm of the D4 wavelet coefficients. + informal: For complex-valued Lp functions on the real line with 1 ≤ p < infinity, q ≥ 1 and 0 < s < 2 − log₂(1 + √3), the Besov difference norm is finite exactly when the combined norm of the D4 scaling and wavelet coefficients is finite. - declaration: Haar.memEMethod_stepCouple_iff_modulus informal: For 0 < p ≤ 1, positive q and 0 < s < 1/p, approximation by dyadic steps in Lp on the unit interval characterizes the space given by the first-order modulus of smoothness. - declaration: ApproximationScheme.memKMethod_reiteration From eca94e089a4c77b4da3769e8302177eaecd4dfa0 Mon Sep 17 00:00:00 2001 From: Vasily Ilin Date: Fri, 27 Nov 2026 15:28:13 +0000 Subject: [PATCH 6/7] Distinguish interpolation and trace variants from cited results --- .../Interpolation/Couple.lean | 10 ++++--- .../Interpolation/EFunctional.lean | 22 +++++++++------ .../Interpolation/KMethod.lean | 11 +++++--- .../Interpolation/Property.lean | 28 +++++++++++-------- .../Domains/Traces/BoundaryBesovNorm.lean | 12 ++++---- .../Traces/LipschitzBoundaryTrace.lean | 28 +++++++++++-------- .../Domains/Traces/TraceSpaceNorm.lean | 9 +++--- .../Interpolation/SobolevInterpolation.lean | 6 ++-- 8 files changed, 74 insertions(+), 52 deletions(-) diff --git a/LeanPool/FunctionSpaces/ApproximationSpaces/Interpolation/Couple.lean b/LeanPool/FunctionSpaces/ApproximationSpaces/Interpolation/Couple.lean index 4c7e487665..2d6841873b 100644 --- a/LeanPool/FunctionSpaces/ApproximationSpaces/Interpolation/Couple.lean +++ b/LeanPool/FunctionSpaces/ApproximationSpaces/Interpolation/Couple.lean @@ -285,8 +285,9 @@ variable {θ ρ : ℝ} {q : ℝ≥0∞} /-- The norm of the **continuous K-method** of the couple, `‖u‖_{K,θ,q} = Φ_{θ,q}(K(·, u))`, that is `(∫_0^∞ (t^(-θ) K(t, u))^q dt/t)^(1/q)` for `0 < q < ∞`, the essential supremum of -`t^(-θ) K(t, u)` for `q = ∞`, and `0` for `q = 0` (Bergh–Löfström, Sections 3.1 and 3.11; the -norm of Bonn's `kMethod`). -/ +`t^(-θ) K(t, u)` for `q = ∞`, and `0` for `q = 0` by the `eLpNorm` convention. +Bergh–Löfström, Sections 3.1 and 3.11, describe the classical norm and quasi-norm ranges. +The definition here takes arbitrary real `θ` and uses the functional of Bonn's `kMethod`. -/ noncomputable def kMethodNorm (A : InterpCouple U) (θ : ℝ) (q : ℝ≥0∞) (u : U) : ℝ≥0∞ := ApproximationScheme.phiFunctional θ q fun t => A.kFunctional t u @@ -436,8 +437,9 @@ theorem aestronglyMeasurable_phiIntegrand_kFunctional (u : U) : ApproximationScheme.kMethodMeasure := (ApproximationScheme.measurable_phiIntegrand (monotone_kFunctional u)).aestronglyMeasurable -/-- **The quasi-triangle inequality of the continuous K-norm** (Bergh–Löfström, Section 3.11): -for a couple quasi-normed with constant `C`, +/-- **The quasi-triangle inequality of the continuous K-norm** extends the estimate from +Bergh–Löfström, Section 3.11, to arbitrary real `θ` and includes the case `q = 0`. +For a couple quasi-normed with constant `C`, `‖u + v‖_{K,θ,q} ≤ C_q C (‖u‖_{K,θ,q} + ‖v‖_{K,θ,q})`, where `C_q` is Mathlib's constant `LpAddConst q` (`1` for `q ≥ 1`). -/ theorem kMethodNorm_add_le (hA : A.IsQuasiNormed C) (u v : U) : diff --git a/LeanPool/FunctionSpaces/ApproximationSpaces/Interpolation/EFunctional.lean b/LeanPool/FunctionSpaces/ApproximationSpaces/Interpolation/EFunctional.lean index f5db9617b8..1f1f03237d 100644 --- a/LeanPool/FunctionSpaces/ApproximationSpaces/Interpolation/EFunctional.lean +++ b/LeanPool/FunctionSpaces/ApproximationSpaces/Interpolation/EFunctional.lean @@ -31,15 +31,17 @@ homogeneity is needed, so the couple may consist of quasi-norms such as `‖· The **approximation space** `E_{α,q}` consists of the `u` with `‖u‖_{α,q;E} = Φ_{-α,q}(E(·, u)) = (∫_0^∞ (t^α E(t, u))^q dt/t)^(1/q) < ∞` -(Bergh–Löfström, Definition 7.1.5; `InterpCouple.eMethodNorm`, `InterpCouple.MemEMethod`). Its -dyadic form is `N₀(u) + ‖(2^(kα) E(2^k, u))_k‖_{ℓ_q}` (`InterpCouple.eNormDyadic`). When +(`InterpCouple.eMethodNorm`, `InterpCouple.MemEMethod`). Bergh–Löfström, Definition 7.1.5, +uses compatible quasi-normed couples, with `α > 0` and `q > 0` or with `α ≥ 0` and `q = ∞`. +The definitions here also use the `eLpNorm` convention for `q = 0`. +The dyadic form is `N₀(u) + ‖(2^(kα) E(2^k, u))_k‖_{ℓ_q}` (`InterpCouple.eNormDyadic`). When `N₁(0) = 0` and only `0` has complexity below `1`, the two give the same space for `α > 0` and `q ≠ 0`, and for `α = 0` and `q = ∞`, with explicit constants (`InterpCouple.memEMethod_iff_eNormDyadic_lt_top`); the comparison holds for every decreasing function in place of `E(·, u)` (`ApproximationScheme.phiFunctional_neg_le_of_antitone`, `ApproximationScheme.lqNorm_le_phiFunctional_neg_of_antitone`). The dyadic norm satisfies a -quasi-triangle inequality (Bergh–Löfström, Lemma 7.1.6, in dyadic form; -`InterpCouple.eNormDyadic_add_le`). +quasi-triangle inequality (`InterpCouple.eNormDyadic_add_le`), the counterpart with the added +ambient norm of the continuous estimate in Bergh–Löfström, Lemma 7.1.6. The **complexity couple** of a sequence of sets `S n` is `(N, min {n : b ∈ S n})` (`InterpCouple.complexity`); for increasing sets its E-functional at `t = n` is the error of best @@ -316,10 +318,11 @@ theorem eFunctional_add_rpow_le (hρ : 0 < ρ) /-! ### The spaces `E_{α,q}` -/ -/-- The norm of the **approximation space** `E_{α,q}` of the couple (Bergh–Löfström, -Definition 7.1.5): `‖u‖_{α,q;E} = Φ_{-α,q}(E(·, u))`, that is +/-- The norm of the **approximation space** `E_{α,q}` of the couple extends the formula +in Bergh–Löfström, Definition 7.1.5, to all real `α` and includes the case `q = 0`. +It is `‖u‖_{α,q;E} = Φ_{-α,q}(E(·, u))`, that is `(∫_0^∞ (t^α E(t, u))^q dt/t)^(1/q)` for `0 < q < ∞` and the essential supremum of -`t^α E(t, u)` for `q = ∞`. -/ +`t^α E(t, u)` for `q = ∞`, and `0` for `q = 0`. -/ noncomputable def eMethodNorm (A : InterpCouple U) (α : ℝ) (q : ℝ≥0∞) (u : U) : ℝ≥0∞ := ApproximationScheme.phiFunctional (-α) q fun t => A.eFunctional t u @@ -457,8 +460,9 @@ theorem dyadicWeight_succ_mul_eFunctional_add_le (hA : A.IsQuasiNormed C) exact eFunctional_add_le hA.ne_top hA.norm1_zero hA.norm0_add_le h1 _ _ u v _ = _ := by ring -/-- **The quasi-triangle inequality of the dyadic norm** (Bergh–Löfström, Lemma 7.1.6, in dyadic -form): for a couple quasi-normed with constant `C` whose complexity is subadditive, +/-- **The quasi-triangle inequality of the dyadic norm**. This is the dyadic estimate with the +added ambient norm, analogous to the continuous estimate in Bergh–Löfström, Lemma 7.1.6. +For a couple quasi-normed with constant `C` whose complexity is subadditive, `‖u + v‖ ≤ C C_q (2 + 2^s C_q) (‖u‖ + ‖v‖)` for the norm `N₀(u) + ‖(2^(ks) E(2^k, u))_k‖_{ℓ_q}`, by `E(2^(k+1), u + v) ≤ C (E(2^k, u) + E(2^k, v))` and the shift by one level. -/ theorem eNormDyadic_add_le (hA : A.IsQuasiNormed C) diff --git a/LeanPool/FunctionSpaces/ApproximationSpaces/Interpolation/KMethod.lean b/LeanPool/FunctionSpaces/ApproximationSpaces/Interpolation/KMethod.lean index be3db8dc35..d8635ce739 100644 --- a/LeanPool/FunctionSpaces/ApproximationSpaces/Interpolation/KMethod.lean +++ b/LeanPool/FunctionSpaces/ApproximationSpaces/Interpolation/KMethod.lean @@ -27,9 +27,11 @@ measures `f ∈ X` by `‖f‖_{K,θ,q} = (∫_0^∞ (t^(-θ) K(t, f))^q dt/t)^(1/q)` (`ApproximationScheme.kMethodNorm`), -the essential supremum of `t^(-θ) K(t, f)` for `q = ∞`, and `(X, Y)_{θ,q}` is the space of the -`f` with `‖f‖_{K,θ,q} < ∞` (`ApproximationScheme.MemKMethod`), as in Bergh–Löfström, -Section 3.1. The main theorem (`ApproximationScheme.memInterp_iff_memKMethod`) extends the +the essential supremum of `t^(-θ) K(t, f)` for `q = ∞`. The space `(X, Y)_{θ,q}` consists +of the `f` with `‖f‖_{K,θ,q} < ∞` (`ApproximationScheme.MemKMethod`). Bergh–Löfström, +Section 3.1, uses `0 < θ < 1` and `1 ≤ q ≤ ∞`, with `θ = 0, 1` also allowed when +`q = ∞`. The Lean definition admits all real `θ` and uses `eLpNorm`, which is zero for +`q = 0`. The main theorem (`ApproximationScheme.memInterp_iff_memKMethod`) extends the two-sided comparison of their Lemma 3.1.3. For a bounded linear map, every one-sided grid `t = 2^(-kρ)` with `ρ > 0` and the added ambient norm give the same space, with explicit comparison constants @@ -188,7 +190,8 @@ theorem phiFunctional_congr {ψ : ℝ≥0∞ → ℝ≥0∞} (h : ∀ t, t ≠ 0 variable (ι) in /-- The norm of the **continuous K-method**, `‖f‖_{K,θ,q} = Φ_{θ,q}(K(·, f))`, that is `(∫_0^∞ (t^(-θ) K(t, f))^q dt/t)^(1/q)` for `0 < q < ∞`, the essential supremum of -`t^(-θ) K(t, f)` for `q = ∞`, and `0` for `q = 0` (Bergh–Löfström, Section 3.1). -/ +`t^(-θ) K(t, f)` for `q = ∞`, and `0` for `q = 0` by the `eLpNorm` convention. This +extends the classical range of Bergh–Löfström, Section 3.1, described above. -/ noncomputable def kMethodNorm (θ : ℝ) (q : ℝ≥0∞) (f : X) : ℝ≥0∞ := phiFunctional θ q fun t => kFunctional ι t f diff --git a/LeanPool/FunctionSpaces/ApproximationSpaces/Interpolation/Property.lean b/LeanPool/FunctionSpaces/ApproximationSpaces/Interpolation/Property.lean index 9046e93d47..104085e6dd 100644 --- a/LeanPool/FunctionSpaces/ApproximationSpaces/Interpolation/Property.lean +++ b/LeanPool/FunctionSpaces/ApproximationSpaces/Interpolation/Property.lean @@ -14,9 +14,11 @@ Modified for Lean Pool: module names and imports adapted. /-! # The interpolation property of the K-method -The real interpolation spaces of the K-method are **exact of exponent `θ`** (Bergh–Löfström, -Theorems 3.1.2 and 3.11.2): if an additive map `T` from a couple `(N₀, N₁)` on `U` to a couple -`(N₀', N₁')` on `V` satisfies `N_i'(T a) ≤ M_i N_i(a)` with `0 < M_i < ∞`, then +Bergh–Löfström, Theorems 3.1.2 and 3.11.2, give **exactness of exponent `θ`** in their +interpolation ranges for normed linear spaces and quasi-normed abelian groups, respectively. +Here the same bound holds for couples of extended-valued functions on additive groups and +arbitrary `θ` and `q`, including `q = 0`. If an additive map `T` satisfies +`N_i'(T a) ≤ M_i N_i(a)` with `0 < M_i < ∞`, then `‖T u‖_{K,θ,q} ≤ M₀^(1-θ) M₁^θ ‖u‖_{K,θ,q}` (`InterpCouple.kMethodNorm_map_le`). The proof has two steps. The measure `dt/t` on `(0, ∞)` is invariant under every dilation @@ -32,7 +34,8 @@ Consequences: the discrete K-norms transform with the extra factor `2^(2ρθ)` K-norms and the same interpolation spaces (`InterpCouple.kMethodNorm_le_of_le`, `InterpCouple.memKMethod_congr`); the interpolation space of a retract is the image of the interpolation space (`InterpCouple.memKMethod_iff_of_retract`, -`InterpCouple.memKMethod_iff_exists_map_eq`, Bergh–Löfström, Theorem 6.4.2); +`InterpCouple.memKMethod_iff_exists_map_eq`). This is the additive-couple version of the +real-interpolation part of Bergh–Löfström, Theorem 6.4.2, for compatible normed linear couples. and for bounded linear maps `T : X → X'`, `S : Y → Y'` with `T ι = ι' S`, the map `T` is bounded between the spaces of `ApproximationSpaces.Interpolation.KMethod` (`ApproximationScheme.kMethodNorm_map_le_of_comp_eq`, `ApproximationScheme.MemInterp.map`). @@ -189,8 +192,9 @@ theorem kFunctional_map_le (T : U →+ V) (hM₀ : M₀ ≠ 0) (hM₀' : M₀ rw [ENNReal.mul_add_div_mul_mul hM₀ hM₀'] exact kFunctional_map_le_of_decomp (by rw [← map_add, sub_add_cancel]) (h₀ _) (h₁ _) -/-- **The K-functional under a map that is additive on pieces of finite norm** (the Remark after -Bergh–Löfström, Theorem 3.1.2): if `T u = T (u - b) + T b` whenever `N₀(u - b) < ∞` and +/-- **The K-functional under a map that is additive on pieces of finite norm**. The proof +uses the finite-piece argument as in the remark after Bergh–Löfström, Theorem 3.1.2. +If `T u = T (u - b) + T b` whenever `N₀(u - b) < ∞` and `N₁(b) < ∞`, `N_i'(T a) ≤ M_i N_i(a)` for every `a`, `0 < M₀ < ∞`, `M₁ ≠ 0` and `t ≠ 0`, then `K'(t, T u) ≤ M₀ K((M₁/M₀) t, u)`. The decompositions with a piece of infinite norm give the term `∞`. -/ @@ -235,8 +239,9 @@ theorem kMethodNorm_le_of_kFunctional_le {v : V} {u : U} (hM₀ : M₀ ≠ 0) (h _ = M₀ ^ (1 - θ) * M₁ ^ θ * A.kMethodNorm θ q u := by rw [← mul_assoc, ENNReal.mul_div_rpow_eq hM₀ hM₀'] -/-- **The interpolation property of the K-method** (Bergh–Löfström, Theorems 3.1.2 and 3.11.2): -the K-method is exact of exponent `θ`. If `T : U → V` is additive with `N₀'(T a) ≤ M₀ N₀(a)` +/-- **The interpolation property of the K-method**. This extends the exactness estimate in +Bergh–Löfström, Theorems 3.1.2 and 3.11.2, to extended-valued couples and arbitrary parameters. +If `T : U → V` is additive with `N₀'(T a) ≤ M₀ N₀(a)` and `N₁'(T a) ≤ M₁ N₁(a)` for every `a`, and `0 < M₀, M₁ < ∞`, then `‖T u‖_{K,θ,q} ≤ M₀^(1-θ) M₁^θ ‖u‖_{K,θ,q}` for every `θ`, `q` and `u`. Bounds with `M_i = 0` can be enlarged. -/ @@ -327,8 +332,9 @@ theorem kMethodNorm_le_of_retract (R : U →+ V) (E : V → U) (hRE : ∀ v, R ( (v : V) : B.kMethodNorm θ q v ≤ M₀ ^ (1 - θ) * M₁ ^ θ * A.kMethodNorm θ q (E v) := by simpa only [hRE] using kMethodNorm_map_le R hM₀ hM₀' hM₁ hM₁' hR₀ hR₁ (E v) -/-- **Interpolation of retracts** (Bergh–Löfström, Theorem 6.4.2): if `R : U → V` and -`E : V → U` are additive with `R (E v) = v`, `N_i'(R a) ≤ M_i N_i(a)` and +/-- **Interpolation of retracts on additive couples**. This is the real K-method +version of Bergh–Löfström, Theorem 6.4.2, with extended-valued norms and additive maps. +If `R : U → V` and `E : V → U` are additive with `R (E v) = v`, `N_i'(R a) ≤ M_i N_i(a)` and `N_i(E v) ≤ L_i N_i'(v)` with finite `M_i, L_i`, then `v ∈ (X₀', X₁')_{θ,q}` if and only if `E v ∈ (X₀, X₁)_{θ,q}`. -/ theorem memKMethod_iff_of_retract (R : U →+ V) (E : V →+ U) (hRE : ∀ v, R (E v) = v) @@ -339,7 +345,7 @@ theorem memKMethod_iff_of_retract (R : U →+ V) (E : V →+ U) (hRE : ∀ v, R ⟨fun h => h.map E hL₀ hL₁ hE₀ hE₁, fun h => by simpa only [hRE] using h.map R hM₀ hM₁ hR₀ hR₁⟩ -/-- **The space of a retract is the image of the space** (Bergh–Löfström, Theorem 6.4.2): under +/-- **The K-method space of a retract is the image of the space**. Under the hypotheses of `memKMethod_iff_of_retract`, `(X₀', X₁')_{θ,q} = R((X₀, X₁)_{θ,q})`, that is, `v ∈ (X₀', X₁')_{θ,q}` if and only if `v = R u` for some `u ∈ (X₀, X₁)_{θ,q}`. -/ theorem memKMethod_iff_exists_map_eq (R : U →+ V) (E : V →+ U) (hRE : ∀ v, R (E v) = v) diff --git a/LeanPool/FunctionSpaces/Domains/Traces/BoundaryBesovNorm.lean b/LeanPool/FunctionSpaces/Domains/Traces/BoundaryBesovNorm.lean index 22e87807f7..141933b545 100644 --- a/LeanPool/FunctionSpaces/Domains/Traces/BoundaryBesovNorm.lean +++ b/LeanPool/FunctionSpaces/Domains/Traces/BoundaryBesovNorm.lean @@ -18,8 +18,9 @@ Let `Ω` be a bounded Lipschitz domain with boundary `Γ`, charts `γ_j : H_j resolution of unity `(ψ_j)` on `Γ` (`Rd.BoundedLipschitzDomain.BoundaryPartition`). Let `1 ≤ p < ∞`, `0 < s < 1` and `1 ≤ q ≤ ∞`. -* **The quasi-norm** (`Rd.BoundedLipschitzDomain.boundaryBesovNorm`; Schneider–Vybíral, - Definition 3.3; Triebel 2002): `‖g‖_{B^s_{p,q}(Γ)}` is the sum over the charts of +* **The quasi-norm** (`Rd.BoundedLipschitzDomain.boundaryBesovNorm`): the chart definition + on domains of dimension at least two is in Schneider–Vybíral, Definition 3.3. See also Triebel + 2002. Here `‖g‖_{B^s_{p,q}(Γ)}` is the sum over the charts of `‖G_j‖_{L_p(H_j)} + ‖(2^(ks) ω_1(G_j, 2^(-k))_p)_k‖_{ℓ_q}` for the chart pieces `G_j = (ψ_j g) ∘ γ_j` (`Rd.BoundedLipschitzDomain.boundaryBesovNorm_eq_sum`). It is finite exactly on `B^s_{p,q}(Γ)` @@ -38,7 +39,7 @@ resolution of unity `(ψ_j)` on `Γ` (`Rd.BoundedLipschitzDomain.BoundaryPartiti The constants depend on `Ω`, `ψ`, `p`, `s`, `q` and `L` and are fixed before the functions; the bounds give ambient-space estimates for the chart construction of the trace and its extension. -Schneider–Vybíral, Theorems 4.2 and 4.10, give the bounded-domain estimates. +Schneider–Vybíral, Theorems 4.2 and 4.10, give bounded-domain estimates in dimension at least two. -/ @[expose] public section @@ -101,8 +102,9 @@ variable {V : Type*} [NormedAddCommGroup V] [InnerProductSpace ℝ V] [FiniteDim /-! ### The quasi-norm -/ variable (p) in -/-- **The Besov quasi-norm on the boundary** (Schneider–Vybíral, Definition 3.3; Triebel 2002, with -Lebesgue measure on the hyperplanes): for a resolution of unity `ψ`, +/-- **The Besov quasi-norm on the boundary**. This uses the chart formula of +Schneider–Vybíral, Definition 3.3, with Lebesgue measure on the hyperplanes and also +allows dimension one for the domain. For a resolution of unity `ψ`, `‖g‖_{B^s_{p,q}(Γ)} = ∑_j (‖G_j‖_{L_p(H_j)} + ‖(2^(ks) ω_1(G_j, 2^(-k))_p)_k‖_{ℓ_q})` for the chart pieces `G_j ∈ L_p(H_j)` with `G_j = (ψ_j g) ∘ γ_j` almost everywhere on `H_j`. Each infimum runs over at most one element of `L_p(H_j)`, the class of the chart piece, and is `∞` if the chart diff --git a/LeanPool/FunctionSpaces/Domains/Traces/LipschitzBoundaryTrace.lean b/LeanPool/FunctionSpaces/Domains/Traces/LipschitzBoundaryTrace.lean index 0964935dbb..75536440a5 100644 --- a/LeanPool/FunctionSpaces/Domains/Traces/LipschitzBoundaryTrace.lean +++ b/LeanPool/FunctionSpaces/Domains/Traces/LipschitzBoundaryTrace.lean @@ -24,8 +24,9 @@ Let `Ω` be a bounded Lipschitz domain with boundary `Γ`: finitely many balls ` almost everywhere on `Γ` if, for every `j`, it holds at `γ_j(x')` for almost every `x' ∈ H_j` with `γ_j(x') ∈ B_j`. The exceptional sets are the null sets of the surface measure, described in the charts. -* **Besov spaces on the boundary** (`Rd.BoundedLipschitzDomain.MemBoundaryBesov`, - Schneider–Vybíral, Definition 3.3): for a smooth resolution of unity `(ψ_j)` on `Γ` subordinate to +* **Besov spaces on the boundary** (`Rd.BoundedLipschitzDomain.MemBoundaryBesov`): the chart + construction follows Schneider–Vybíral, Definition 3.3, which assumes dimension at least two. + Here, for a smooth resolution of unity `(ψ_j)` on `Γ` subordinate to `(B_j)` (`Rd.BoundedLipschitzDomain.BoundaryPartition`), `g ∈ B^s_{p,q}(Γ)` if every chart piece `(ψ_j g) ∘ γ_j` lies in `B^s_{p,q}(H_j)`, with first differences for `0 < s < 1`. * **The boundary trace** (`Rd.BoundedLipschitzDomain.boundaryTrace`): @@ -33,9 +34,10 @@ Let `Ω` be a bounded Lipschitz domain with boundary `Γ`: finitely many balls ` it is the trace of the graph domain (`Rd.BoundedLipschitzDomain.boundaryTrace_graphMap`), by the change of chart; hence it does not depend on the resolution of unity, and it is the restriction for continuous functions. -* **The trace space via ambient functions.** The intrinsic trace-space equality below is the - range `1 ≤ p < ∞`, `1 ≤ q ≤ ∞` of Schneider–Vybíral, Theorem 4.11, on bounded Lipschitz - domains. The construction here gives an ambient representative. For `1 ≤ p < ∞`, `0 < s < 1`, +* **The trace space via ambient functions.** Schneider–Vybíral, Theorem 4.11, gives the + corresponding intrinsic equality on bounded Lipschitz domains in dimension at least two. + Here the equality extends to dimension one and the construction gives an ambient + representative. For `1 ≤ p < ∞`, `0 < s < 1`, `1 ≤ q ≤ ∞` and `L ≥ 2`, `g ∈ B^s_{p,q}(Γ)` iff `g = Tr_Γ F` almost everywhere on `Γ` for some `F ∈ L_p(V)` with `‖F‖_p + ‖(2^(k(s+1/p)) ω_L(F, 2^(-k))_p)_k‖_{ℓ_q} < ∞` (`Rd.BoundedLipschitzDomain.exists_boundaryTrace_eq_iff`). The chart pieces of `Tr_Γ F` are the @@ -254,8 +256,9 @@ variable {p : ℝ≥0∞} [Fact (1 ≤ p)] /-! ### Besov spaces on the boundary -/ variable (p) in -/-- **Besov spaces on the boundary** (Schneider–Vybíral, Definition 3.3, with Lebesgue measure on -the hyperplanes): `g ∈ B^s_{p,q}(Γ)` if every chart piece `(ψ_j g) ∘ γ_j` agrees almost everywhere +/-- **Besov spaces on the boundary**. The charts follow Schneider–Vybíral, Definition 3.3, in +dimension at least two. The construction uses Lebesgue measure and also covers dimension one. +Here `g ∈ B^s_{p,q}(Γ)` if every chart piece `(ψ_j g) ∘ γ_j` agrees almost everywhere on `H_j` with some `G_j ∈ L_p(H_j)` with `‖G_j‖_p + ‖(2^(ks) ω_1(G_j, 2^(-k))_p)_k‖_{ℓ_q} < ∞`. First differences suffice for `0 < s < 1`, the range of the trace theorem. -/ def MemBoundaryBesov (ψ : Ω.BoundaryPartition) (s : ℝ) (q : ℝ≥0∞) (g : V → ℂ) : Prop := @@ -548,11 +551,12 @@ def IsBoundaryTrace (ψ : Ω.BoundaryPartition) (hp : p ≠ ∞) (L : ℕ) (σ : ‖F‖ₑ + lqNorm q (fun k => dyadicWeight σ k * lpModulus p L F k) < ∞ → Ω.boundaryTrace ψ hp L F =ᶠ[Ω.aeBoundary] g -/-- **The intrinsic trace space of `B^{s+1/p}_{p,q}(Ω)`**. In the range below this is the -trace-space equality of Schneider–Vybíral, Theorem 4.11, with the trace defined via ambient -extensions. For -`1 ≤ p < ∞`, `0 < s < 1`, `1 ≤ q ≤ ∞` and `L ≥ 2`, `g ∈ B^s_{p,q}(Γ)` iff `g` is the boundary trace -of some `f` with `‖f‖_{L_p(Ω)} + ‖(2^(k(s+1/p)) ω_L(f, 2^(-k), Ω)_p)_k‖_{ℓ_q} < ∞`. -/ +/-- **The intrinsic trace space of `B^{s+1/p}_{p,q}(Ω)`**. This is the ambient-extension +form of the trace-space equality of Schneider–Vybíral, Theorem 4.11, in the range below. +Their theorem assumes dimension at least two. The Lean result also covers dimension one. +For `1 ≤ p < ∞`, `0 < s < 1`, `1 ≤ q ≤ ∞` and `L ≥ 2`, `g ∈ B^s_{p,q}(Γ)` iff `g` is the +boundary trace of some `f` with +`‖f‖_{L_p(Ω)} + ‖(2^(k(s+1/p)) ω_L(f, 2^(-k), Ω)_p)_k‖_{ℓ_q} < ∞`. -/ theorem memBoundaryBesov_iff_exists_isBoundaryTrace (ψ : Ω.BoundaryPartition) (hp : p ≠ ∞) {L : ℕ} (hL : 2 ≤ L) {s : ℝ} (hs : 0 < s) (hs1 : s < 1) {q : ℝ≥0∞} (hq : 1 ≤ q) (g : V → ℂ) : diff --git a/LeanPool/FunctionSpaces/Domains/Traces/TraceSpaceNorm.lean b/LeanPool/FunctionSpaces/Domains/Traces/TraceSpaceNorm.lean index ebd94148f8..3e77f82508 100644 --- a/LeanPool/FunctionSpaces/Domains/Traces/TraceSpaceNorm.lean +++ b/LeanPool/FunctionSpaces/Domains/Traces/TraceSpaceNorm.lean @@ -202,7 +202,8 @@ theorem exists_enorm_le_boundaryBesovNorm_extend (ψ : Ω.BoundaryPartition) : /-- **`H^{1/2}(Γ)` and `B^{1/2}_{2,2}(Γ)` have equivalent norms**. The comparison uses the Sobolev trace space, in the setting of McLean, Theorem 3.37, and the Besov trace-space -characterization with `p = q = 2`, as in Schneider–Vybíral, Theorem 4.11. +characterization with `p = q = 2`. Schneider–Vybíral, Theorem 4.11, treats domains of dimension +at least two. The characterization used here also covers dimension one. For every resolution of unity `ψ` there is `C < ∞` with `‖t‖ ≤ C ‖τ t‖_{B^{1/2}_{2,2}(Γ)}` and `‖τ t‖_{B^{1/2}_{2,2}(Γ)} ≤ C ‖t‖` for every `t ∈ H^{1/2}(Γ)`, with the trace `τ : H^{1/2}(Γ) → L_2(Γ)` @@ -483,10 +484,8 @@ theorem norm_traceSpaceLinearEquiv_symm_le (b : Ω.BoundaryBesovHalf) : exact ENNReal.toReal_mono (ENNReal.mul_ne_top Ω.traceNormConst_ne_top b.boundaryBesovNorm_lt_top.ne) h -/-- **`H^{1/2}(Γ) ≅ B^{1/2}_{2,2}(Γ)`** (McLean, Theorem 3.37; following Schneider–Vybíral, -Theorem 4.11, for `p = q = 2`): the trace `t ↦ τ t` is an isomorphism of normed spaces from the -trace space -onto `B^{1/2}_{2,2}(Γ)` with the norm by chart pieces (Mathlib's +/-- **`H^{1/2}(Γ) ≅ B^{1/2}_{2,2}(Γ)`**. The trace `t ↦ τ t` is an isomorphism of normed spaces +from the trace space onto `B^{1/2}_{2,2}(Γ)` with the norm by chart pieces (Mathlib's `LinearEquiv.toContinuousLinearEquivOfBounds`), with the bounds of `Rd.BoundedLipschitzDomain.exists_traceL2_norm_equiv` in both directions. -/ noncomputable def traceSpaceEquivBoundaryBesovHalf : Ω.TraceSpace ≃L[ℂ] Ω.BoundaryBesovHalf := diff --git a/LeanPool/FunctionSpaces/Rd/Interpolation/SobolevInterpolation.lean b/LeanPool/FunctionSpaces/Rd/Interpolation/SobolevInterpolation.lean index 33c9521071..7ce8c96ffc 100644 --- a/LeanPool/FunctionSpaces/Rd/Interpolation/SobolevInterpolation.lean +++ b/LeanPool/FunctionSpaces/Rd/Interpolation/SobolevInterpolation.lean @@ -290,8 +290,10 @@ theorem memKMethod_sobolevCouple_iff [Nontrivial V] (hp1 : 1 < p) (hp : p ≠ /-! ### Operators bounded on `L_p` and on `W^m_p` -/ -/-- **An operator bounded on `L_p` and on `W^m_p` is bounded on the interpolation space** -(Bergh–Löfström, Theorem 3.1.2): if `T : L_p(V) → L_p(V)` is additive with `‖T f‖_p ≤ M₀ ‖f‖_p` +/-- **An operator bounded on `L_p` and on `W^m_p` is bounded in the K-norm**. This applies +`InterpCouple.kMethodNorm_map_le` in its full parameter range, extending the classical +exactness estimate of Bergh–Löfström, Theorem 3.1.2. +If `T : L_p(V) → L_p(V)` is additive with `‖T f‖_p ≤ M₀ ‖f‖_p` and `‖T f‖_{W^m_p} ≤ M₁ ‖f‖_{W^m_p}` in the grid norm for every `f`, and `0 < M₀, M₁ < ∞`, then `‖T f‖_{K,θ,q} ≤ M₀^(1-θ) M₁^θ ‖f‖_{K,θ,q}` in the K-norm of `(L_p, W^m_p)`, whose space is `B^{θm}_{p,q}` for `n ≥ 1`, `1 < p < ∞`, `m ≥ 1`, `0 < θ < 1` and `1 ≤ q ≤ ∞` From e95d9eab28413ff3dec339b6676c748217d4da33 Mon Sep 17 00:00:00 2001 From: Vasily Ilin Date: Fri, 27 Nov 2026 16:03:47 +0000 Subject: [PATCH 7/7] Document generalized K-functional and endpoint conventions --- .../Interpolation/Couple.lean | 60 +++++++++++-------- .../Interpolation/Property.lean | 15 ++--- 2 files changed, 43 insertions(+), 32 deletions(-) diff --git a/LeanPool/FunctionSpaces/ApproximationSpaces/Interpolation/Couple.lean b/LeanPool/FunctionSpaces/ApproximationSpaces/Interpolation/Couple.lean index 2d6841873b..832dbd4899 100644 --- a/LeanPool/FunctionSpaces/ApproximationSpaces/Interpolation/Couple.lean +++ b/LeanPool/FunctionSpaces/ApproximationSpaces/Interpolation/Couple.lean @@ -14,11 +14,14 @@ Modified for Lean Pool: module names and imports adapted. /-! # Couples of extended quasi-norms and their K-method -A **couple** on an additive commutative group `U` is a pair of functions `N₀, N₁ : U → [0, ∞]` -(`InterpCouple`); its two spaces are `X_i = {N_i < ∞}`, and their sum and intersection stay -implicit. The axioms of extended quasi-norms (`InterpCouple.IsQuasiNormed`) and homogeneity -(`InterpCouple.IsHomogeneous`) are separate propositions, assumed only where they are used. -This is the setting of quasi-normed abelian groups in Bergh–Löfström, Sections 3.10 and 3.11. +A **couple** on an additive commutative group `U` consists of two extended-valued functions +`N₀, N₁ : U → [0, ∞]` (`InterpCouple`). The laws in `InterpCouple.IsQuasiNormed` make the +finite loci `X_i = {N_i < ∞}` additive subgroups. With definite restrictions of the two +functions to these subgroups, they have the component quasi-norms of Bergh–Löfström, +Section 3.10, using a quasi-triangle constant at least one. Classical compatibility also +uses continuous embeddings into a common Hausdorff topological group, as in Sections +2.3 and 3.10. The Lean results state the quasi-norm laws and any homogeneity +(`InterpCouple.IsHomogeneous`) where they are needed. The **K-functional** is `K(t, u) = inf_b (N₀(u - b) + t N₁(b))` (`InterpCouple.kFunctional`), the **continuous K-method** is `‖u‖_{K,θ,q} = Φ_{θ,q}(K(·, u))` with the functional @@ -55,16 +58,17 @@ open MeasureTheory Set Function open scoped ENNReal open ENNReal (lqNorm dyadicWeight LpAddConst dyadicGeomConst) -/-- A **couple** on an additive commutative group `U`: two functions `N₀, N₁ : U → [0, ∞]`, -whose spaces are `X_i = {u : N_i(u) < ∞}`. This is a couple of quasi-normed abelian groups of -Bergh–Löfström, Section 3.10, with the compatibility of Section 2.3 built in, since both spaces -lie in `U`; the axioms are the separate propositions `InterpCouple.IsQuasiNormed` and -`InterpCouple.IsHomogeneous`. `EQuasinorm.Couple` of the project *MultilinearInterpolation* -(Bonn, Apache 2.0) carries the axioms in its data. -/ +/-- An extended-valued encoding of a **couple** on an additive commutative group `U`. +Its two functions `N₀, N₁ : U → [0, ∞]` are arbitrary. Under `InterpCouple.IsQuasiNormed` the +finite loci are subgroups. With definite restrictions and a quasi-triangle constant at least +one they are quasi-normed abelian groups as in Bergh–Löfström, Section 3.10. The common +topological space for classical compatibility is described in Section 2.3. +`EQuasinorm.Couple` of *MultilinearInterpolation* (Bonn, Apache 2.0) carries its quasi-norm +axioms in the data. -/ structure InterpCouple (U : Type*) [AddCommGroup U] where - /-- The first extended quasi-norm `N₀`. -/ + /-- The first extended-valued function `N₀`. -/ norm0 : U → ℝ≥0∞ - /-- The second extended quasi-norm `N₁`. -/ + /-- The second extended-valued function `N₁`. -/ norm1 : U → ℝ≥0∞ namespace InterpCouple @@ -89,10 +93,10 @@ theorem swap_norm1 (A : InterpCouple U) : A.swap.norm1 = A.norm0 := rfl theorem swap_swap (A : InterpCouple U) : A.swap.swap = A := rfl /-- The couple is **quasi-normed with constant `C`**: `C < ∞`, and both `N_i` vanish at `0`, -are even and satisfy the quasi-triangle inequality `N_i(a + b) ≤ C (N_i(a) + N_i(b))`. These are -the axioms of a quasi-normed abelian group (Bergh–Löfström, Section 3.10) except definiteness; -the zero and quasi-triangle axioms are those of `EQuasinorm` in *MultilinearInterpolation*, which -lives on a monoid and asks `C ≥ 1`. -/ +are even and satisfy the quasi-triangle inequality `N_i(a + b) ≤ C (N_i(a) + N_i(b))`. +On the finite loci, adding definiteness and replacing `C` by `max 1 C` gives the axioms in +Bergh–Löfström, Section 3.10. The zero and quasi-triangle axioms also appear in +`EQuasinorm` in *MultilinearInterpolation*, which uses a monoid and assumes `C ≥ 1`. -/ structure IsQuasiNormed (A : InterpCouple U) (C : ℝ≥0∞) : Prop where /-- The quasi-triangle constant is finite. -/ ne_top : C ≠ ∞ @@ -135,9 +139,12 @@ theorem IsHomogeneous.norm1_zero [Module ℝ U] {A : InterpCouple U} (hH : A.IsH /-! ### The K-functional -/ -/-- The **K-functional** of the couple, `K(t, u) = inf_b (N₀(u - b) + t N₁(b))` for -`t ∈ [0, ∞]` (Bergh–Löfström, Section 3.1). It is `kNorm` of the project -*MultilinearInterpolation*, there an infimum over the pairs `u = a + b`. -/ +/-- The **K-functional** of the couple, `K(t, u) = inf_b (N₀(u - b) + t N₁(b))`. +For a classical compatible couple and `0 < t < ∞`, the finite contributions are exactly +the decompositions used in Bergh–Löfström, Section 3.1. The Lean definition also allows +`t = 0` and `t = ∞`. At `t = 0`, `0 * ∞ = 0` allows a candidate with `N₁(b) = ∞` to +contribute. At `t = ∞`, the penalty vanishes exactly when `N₁(b) = 0`. +This formula is `kNorm` in *MultilinearInterpolation*, expressed there using `u = a + b`. -/ noncomputable def kFunctional (A : InterpCouple U) (t : ℝ≥0∞) (u : U) : ℝ≥0∞ := ⨅ b : U, A.norm0 (u - b) + t * A.norm1 b @@ -178,8 +185,10 @@ theorem kFunctional_mono (h : t ≤ s) (u : U) : A.kFunctional t u ≤ A.kFuncti theorem monotone_kFunctional (u : U) : Monotone fun t => A.kFunctional t u := fun _ _ h => kFunctional_mono h u -/-- **The K-functional under a finite change of scale** (Bergh–Löfström, Lemma 3.1.1; Bonn's -`kNorm_le_mul`): `K(c t, u) ≤ max(1, c) K(t, u)` for `c < ∞`. -/ +/-- **The K-functional under a finite change of scale**. The bound +`K(c t, u) ≤ max(1, c) K(t, u)` extends Bergh–Löfström, Lemma 3.1.1, to `c = 0` and to +the endpoint scales `t = 0, ∞` of the extended-valued definition. See also Bonn's +`kNorm_le_mul`. -/ theorem kFunctional_mul_le_of_ne_top (hc : c ≠ ∞) (t : ℝ≥0∞) (u : U) : A.kFunctional (c * t) u ≤ max 1 c * A.kFunctional t u := by have hM0 : max 1 c ≠ 0 := (zero_lt_one.trans_le (le_max_left _ _)).ne' @@ -207,9 +216,10 @@ theorem kFunctional_add_le_of_decomp (hA : A.IsQuasiNormed C) (u v b b' : U) : · exact hA.norm1_add_le _ _ _ = _ := by ring -/-- **The quasi-triangle inequality of the K-functional** (Bergh–Löfström, Lemma 3.11.1; Bonn's -`kNorm_add_le_mul`): `K(t, u + v) ≤ C (K(t, u) + K(t, v))` for a couple quasi-normed with -constant `C`. -/ +/-- **The quasi-triangle inequality of the K-functional**. For a couple quasi-normed with +constant `C`, the bound `K(t, u + v) ≤ C (K(t, u) + K(t, v))` includes the extended-valued +endpoints. The common-constant case at positive finite scales is in Bergh–Löfström, +Lemma 3.11.1. See also Bonn's `kNorm_add_le_mul`. -/ theorem kFunctional_add_le (hA : A.IsQuasiNormed C) (u v : U) : A.kFunctional t (u + v) ≤ C * (A.kFunctional t u + A.kFunctional t v) := by rcases eq_or_ne C 0 with rfl | hC0 diff --git a/LeanPool/FunctionSpaces/ApproximationSpaces/Interpolation/Property.lean b/LeanPool/FunctionSpaces/ApproximationSpaces/Interpolation/Property.lean index 104085e6dd..f6f0cb1741 100644 --- a/LeanPool/FunctionSpaces/ApproximationSpaces/Interpolation/Property.lean +++ b/LeanPool/FunctionSpaces/ApproximationSpaces/Interpolation/Property.lean @@ -24,10 +24,10 @@ arbitrary `θ` and `q`, including `q = 0`. If an additive map `T` satisfies The proof has two steps. The measure `dt/t` on `(0, ∞)` is invariant under every dilation `t ↦ c t`, `c > 0` (`ApproximationScheme.measurePreserving_mul_left_kMethodMeasure`), so that `Φ_{θ,q}(φ(c ·)) = c^θ Φ_{θ,q}(φ)` (`ApproximationScheme.phiFunctional_comp_mul`, Bergh–Löfström -(3.1.7)); and `K(t, T u) ≤ M₀ K((M₁/M₀) t, u)` (`InterpCouple.kFunctional_map_le`, Bergh–Löfström -(3.1.8)). The second inequality needs additivity of `T` only on the decompositions -`u = (u - b) + b` into pieces of finite norm (`InterpCouple.kFunctional_map_le_of_additiveOn`, -the Remark after Bergh–Löfström, Theorem 3.1.2). +(3.1.7)). The bound `K(t, T u) ≤ M₀ K((M₁/M₀) t, u)` (`InterpCouple.kFunctional_map_le`) +extends (3.1.8) to the extended-valued couples and endpoint scales. At positive scales, the +proof only needs additivity of `T` on decompositions into pieces of finite norm +(`InterpCouple.kFunctional_map_le_of_additiveOn`), as in the remark after Theorem 3.1.2. Consequences: the discrete K-norms transform with the extra factor `2^(2ρθ)` (`InterpCouple.discreteKMethodNorm_map_le`); couples with comparable norms have comparable @@ -36,7 +36,7 @@ K-norms and the same interpolation spaces (`InterpCouple.kMethodNorm_le_of_le`, interpolation space (`InterpCouple.memKMethod_iff_of_retract`, `InterpCouple.memKMethod_iff_exists_map_eq`). This is the additive-couple version of the real-interpolation part of Bergh–Löfström, Theorem 6.4.2, for compatible normed linear couples. -and for bounded linear maps `T : X → X'`, `S : Y → Y'` with `T ι = ι' S`, the map `T` is bounded +For bounded linear maps `T : X → X'`, `S : Y → Y'` with `T ι = ι' S`, the map `T` is bounded between the spaces of `ApproximationSpaces.Interpolation.KMethod` (`ApproximationScheme.kMethodNorm_map_le_of_comp_eq`, `ApproximationScheme.MemInterp.map`). -/ @@ -180,8 +180,9 @@ theorem kFunctional_map_le_of_decomp {T : U → V} {u b : U} (hTu : T u = T (u - _ = B.norm0 (T (u - b)) + t * B.norm1 (T b) := by rw [hTu, add_sub_cancel_right] _ ≤ M₀ * A.norm0 (u - b) + t * (M₁ * A.norm1 b) := by gcongr -/-- **The K-functional under an additive map** (Bergh–Löfström (3.1.8)): if `T : U → V` is -additive with `N₀'(T a) ≤ M₀ N₀(a)` and `N₁'(T a) ≤ M₁ N₁(a)` for every `a`, and `0 < M₀ < ∞`, +/-- **The K-functional under an additive map**. This extends Bergh–Löfström (3.1.8) to +extended-valued couples and to endpoint scales. If `T : U → V` is additive with +`N₀'(T a) ≤ M₀ N₀(a)` and `N₁'(T a) ≤ M₁ N₁(a)` for every `a`, and `0 < M₀ < ∞`, then `K'(t, T u) ≤ M₀ K((M₁/M₀) t, u)` for every `t` and `u`. -/ theorem kFunctional_map_le (T : U →+ V) (hM₀ : M₀ ≠ 0) (hM₀' : M₀ ≠ ∞) (h₀ : ∀ a, B.norm0 (T a) ≤ M₀ * A.norm0 a) (h₁ : ∀ a, B.norm1 (T a) ≤ M₁ * A.norm1 a)